UNPKG

sval

Version:

A javascript interpreter written in javascript

1 lines 188 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sval=t()}(this,function(){"use strict";var R=Object.freeze({__proto__:null,get ExpressionStatement(){return Ut},get BlockStatement(){return qt},get EmptyStatement(){return Wt},get DebuggerStatement(){return Gt},get ReturnStatement(){return Ht},get BreakStatement(){return zt},get ContinueStatement(){return Kt},get LabeledStatement(){return Qt},get WithStatement(){return Xt},get IfStatement(){return Yt},get SwitchStatement(){return Zt},get SwitchCase(){return Jt},get ThrowStatement(){return $t},get TryStatement(){return er},get CatchClause(){return tr},get WhileStatement(){return rr},get DoWhileStatement(){return ir},get ForStatement(){return nr},get ForInStatement(){return sr},get ForOfStatement(){return ar}}),O=Object.freeze({__proto__:null,get FunctionDeclaration(){return or},get VariableDeclaration(){return cr},get VariableDeclarator(){return hr},get ClassDeclaration(){return lr},get ClassBody(){return ur},get MethodDefinition(){return pr},get PropertyDefinition(){return dr},get StaticBlock(){return fr},get ImportDeclaration(){return mr},get ExportDefaultDeclaration(){return yr},get ExportNamedDeclaration(){return gr},get ExportAllDeclaration(){return vr}}),M=Object.freeze({__proto__:null,get ExpressionStatement(){return Dr},get BlockStatement(){return Rr},get EmptyStatement(){return Or},get DebuggerStatement(){return Mr},get ReturnStatement(){return Fr},get BreakStatement(){return jr},get ContinueStatement(){return Ur},get LabeledStatement(){return qr},get WithStatement(){return Wr},get IfStatement(){return Gr},get SwitchStatement(){return Hr},get SwitchCase(){return zr},get ThrowStatement(){return Kr},get TryStatement(){return Qr},get CatchClause(){return Xr},get WhileStatement(){return Yr},get DoWhileStatement(){return Zr},get ForStatement(){return Jr},get ForInStatement(){return $r},get ForOfStatement(){return ei}}),F=Object.freeze({__proto__:null,get FunctionDeclaration(){return ti},get VariableDeclaration(){return ri},get VariableDeclarator(){return ii},get ClassDeclaration(){return ni},get ClassBody(){return si},get MethodDefinition(){return ai},get PropertyDefinition(){return oi},get StaticBlock(){return ci},get ImportDeclaration(){return hi},get ExportDefaultDeclaration(){return li},get ExportNamedDeclaration(){return ui},get ExportAllDeclaration(){return pi}});function y(i,n){var s,a,o,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(s)throw new TypeError("Generator is already executing.");for(;c;)try{if(s=1,a&&(o=2&t[0]?a.return:t[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,t[1])).done)return o;switch(a=0,(t=o?[2&t[0],o.value]:t)[0]){case 0:case 1:o=t;break;case 4:return c.label++,{value:t[1],done:!1};case 5:c.label++,a=t[1],t=[0];continue;case 7:t=c.ops.pop(),c.trys.pop();continue;default:if(!(o=0<(o=c.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){c=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3]))c.label=t[1];else if(6===t[0]&&c.label<o[1])c.label=o[1],o=t;else{if(!(o&&c.label<o[2])){o[2]&&c.ops.pop(),c.trys.pop();continue}c.label=o[2],c.ops.push(t)}}t=n.call(i,c)}catch(e){t=[6,e],a=0}finally{s=o=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function g(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}}function j(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,s=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(i=s.next()).done;)a.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return a}(arguments[t]));return e}var U=Object.freeze,f=Object.defineProperty,q=Object.getOwnPropertyDescriptor,W=Object.prototype.hasOwnProperty;function G(e,t){return W.call(e,t)}var H=Object.getOwnPropertyNames,z=Object.setPrototypeOf;var K=Object.getPrototypeOf;var Q=Object.getOwnPropertyDescriptor;function X(e,t,r){for(;t;){var i=Q(t,r),i=void 0!==i&&void 0===i.writable&&"function"==typeof i[e]&&i[e];if(i)return i;i=t,t=K?K(i):i.__proto__}}function Y(e,t){return X("get",e,t)}function Z(e,t){return X("set",e,t)}var J=Object.create;function $(e,t){var r,i;r=e,i=t,z?z(r,i):r.__proto__=i,e.prototype=J(t.prototype,{constructor:{value:e,writable:!0}})}function ee(e){if(!e.Object)throw 0;te=H(i=e).filter(function(e){return-1===["webkitStorageInfo","GLOBAL","root"].indexOf(e)})}var m=Object.assign||function(e){for(var t=1;t<arguments.length;++t){var r,i=arguments[t];for(r in i)G(i,r)&&(e[r]=i[r])}return e},te=[],i=J(null);try{ee(window)}catch(e){try{ee(self)}catch(e){try{ee(global)}catch(e){try{ee(globalThis)}catch(e){try{i.Object=Object}catch(e){}try{i.Function=Function}catch(e){}try{i.Array=Array}catch(e){}try{i.Number=Number}catch(e){}try{i.parseFloat=parseFloat}catch(e){}try{i.parseInt=parseInt}catch(e){}try{i.Infinity=1/0}catch(e){}try{i.NaN=NaN}catch(e){}try{i.undefined=void 0}catch(e){}try{i.Boolean=Boolean}catch(e){}try{i.String=String}catch(e){}try{i.Symbol=Symbol}catch(e){}try{i.Date=Date}catch(e){}try{i.Promise=Promise}catch(e){}try{i.RegExp=RegExp}catch(e){}try{i.Error=Error}catch(e){}try{i.EvalError=EvalError}catch(e){}try{i.RangeError=RangeError}catch(e){}try{i.ReferenceError=ReferenceError}catch(e){}try{i.SyntaxError=SyntaxError}catch(e){}try{i.TypeError=TypeError}catch(e){}try{i.URIError=URIError}catch(e){}try{i.JSON=JSON}catch(e){}try{i.Math=Math}catch(e){}try{i.console=console}catch(e){}try{i.Intl=Intl}catch(e){}try{i.ArrayBuffer=ArrayBuffer}catch(e){}try{i.Uint8Array=Uint8Array}catch(e){}try{i.Int8Array=Int8Array}catch(e){}try{i.Uint16Array=Uint16Array}catch(e){}try{i.Int16Array=Int16Array}catch(e){}try{i.Uint32Array=Uint32Array}catch(e){}try{i.Int32Array=Int32Array}catch(e){}try{i.Float32Array=Float32Array}catch(e){}try{i.Float64Array=Float64Array}catch(e){}try{i.Uint8ClampedArray=Uint8ClampedArray}catch(e){}try{i.DataView=DataView}catch(e){}try{i.Map=Map}catch(e){}try{i.Set=Set}catch(e){}try{i.WeakMap=WeakMap}catch(e){}try{i.WeakSet=WeakSet}catch(e){}try{i.Proxy=Proxy}catch(e){}try{i.Reflect=Reflect}catch(e){}try{i.BigInt=BigInt}catch(e){}try{i.decodeURI=decodeURI}catch(e){}try{i.decodeURIComponent=decodeURIComponent}catch(e){}try{i.encodeURI=encodeURI}catch(e){}try{i.encodeURIComponent=encodeURIComponent}catch(e){}try{i.escape=escape}catch(e){}try{i.unescape=unescape}catch(e){}try{i.eval=eval}catch(e){}try{i.isFinite=isFinite}catch(e){}try{i.isNaN=isNaN}catch(e){}try{i.SharedArrayBuffer=SharedArrayBuffer}catch(e){}try{i.Atomics=Atomics}catch(e){}try{i.WebAssembly=WebAssembly}catch(e){}try{i.clearInterval=clearInterval}catch(e){}try{i.clearTimeout=clearTimeout}catch(e){}try{i.setInterval=setInterval}catch(e){}try{i.setTimeout=setTimeout}catch(e){}try{i.crypto=crypto}catch(e){}try{i.URL=URL}catch(e){}te=H(i)}}}}i.Symbol&&(i.Symbol.iterator||(i.Symbol.iterator=p("iterator")),i.Symbol.asyncIterator||(i.Symbol.asyncIterator=p("asynciterator")));for(var re=J({}),ie=0;ie<te.length;ie++){var ne=te[ie];try{re[ne]=i[ne]}catch(e){}}var se=p("window");function p(e){return e+Math.random().toString(36).substring(2)}var ae=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],oe=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],e="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",ce={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},t="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",he={5:t,"5module":t+" export import",6:t+" const class extends export import super"},le=/^in(stanceof)?$/,ue=new RegExp("["+e+"]"),pe=new RegExp("["+e+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function de(e,t){for(var r=65536,i=0;i<t.length;i+=2){if(e<(r+=t[i]))return!1;if(e<=(r+=t[i+1]))return!0}return!1}function a(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?170<=e&&ue.test(String.fromCharCode(e)):!1!==t&&de(e,oe)))}function fe(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?170<=e&&pe.test(String.fromCharCode(e)):!1!==t&&(de(e,oe)||de(e,ae)))))}function r(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null}function n(e,t){return new r(e,{beforeExpr:!0,binop:t})}var t={beforeExpr:!0},e={startsExpr:!0},me={};function s(e,t){return(t=void 0===t?{}:t).keyword=e,me[e]=new r(e,t)}var v={num:new r("num",e),regexp:new r("regexp",e),string:new r("string",e),name:new r("name",e),privateId:new r("privateId",e),eof:new r("eof"),bracketL:new r("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new r("]"),braceL:new r("{",{beforeExpr:!0,startsExpr:!0}),braceR:new r("}"),parenL:new r("(",{beforeExpr:!0,startsExpr:!0}),parenR:new r(")"),comma:new r(",",t),semi:new r(";",t),colon:new r(":",t),dot:new r("."),question:new r("?",t),questionDot:new r("?."),arrow:new r("=>",t),template:new r("template"),invalidTemplate:new r("invalidTemplate"),ellipsis:new r("...",t),backQuote:new r("`",e),dollarBraceL:new r("${",{beforeExpr:!0,startsExpr:!0}),eq:new r("=",{beforeExpr:!0,isAssign:!0}),assign:new r("_=",{beforeExpr:!0,isAssign:!0}),incDec:new r("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new r("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:n("||",1),logicalAND:n("&&",2),bitwiseOR:n("|",3),bitwiseXOR:n("^",4),bitwiseAND:n("&",5),equality:n("==/!=/===/!==",6),relational:n("</>/<=/>=",7),bitShift:n("<</>>/>>>",8),plusMin:new r("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:n("%",10),star:n("*",10),slash:n("/",10),starstar:new r("**",{beforeExpr:!0}),coalesce:n("??",1),_break:s("break"),_case:s("case",t),_catch:s("catch"),_continue:s("continue"),_debugger:s("debugger"),_default:s("default",t),_do:s("do",{isLoop:!0,beforeExpr:!0}),_else:s("else",t),_finally:s("finally"),_for:s("for",{isLoop:!0}),_function:s("function",e),_if:s("if"),_return:s("return",t),_switch:s("switch"),_throw:s("throw",t),_try:s("try"),_var:s("var"),_const:s("const"),_while:s("while",{isLoop:!0}),_with:s("with"),_new:s("new",{beforeExpr:!0,startsExpr:!0}),_this:s("this",e),_super:s("super",e),_class:s("class",e),_extends:s("extends",t),_export:s("export"),_import:s("import",e),_null:s("null",e),_true:s("true",e),_false:s("false",e),_in:s("in",{beforeExpr:!0,binop:7}),_instanceof:s("instanceof",{beforeExpr:!0,binop:7}),_typeof:s("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:s("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:s("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},o=/\r\n?|\n|\u2028|\u2029/,t=new RegExp(o.source,"g");function ye(e){return 10===e||13===e||8232===e||8233===e}function ge(e,t,r){void 0===r&&(r=e.length);for(var i=t;i<r;i++){var n=e.charCodeAt(i);if(ye(n))return i<r-1&&13===n&&10===e.charCodeAt(i+1)?i+2:i+1}return-1}var ve=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,c=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,e=Object.prototype,be=e.hasOwnProperty,xe=e.toString,we=Object.hasOwn||function(e,t){return be.call(e,t)},Se=Array.isArray||function(e){return"[object Array]"===xe.call(e)},ke=Object.create(null);function _e(e){return ke[e]||(ke[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function h(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function Ee(e,t){this.line=e,this.column=t}function Ce(e,t,r){this.start=t,this.end=r,null!==e.sourceFile&&(this.source=e.sourceFile)}var Ie=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;function Ae(e,t){for(var r=1,i=0;;){var n=ge(e,i,t);if(n<0)return new Ee(r,t-i);++r,i=n}}var Pe={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!(Ee.prototype.offset=function(e){return new Ee(this.line,this.column+e)}),allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Le=!1;function Te(e){var t,r,a,o,i={};for(t in Pe)i[t]=(e&&we(e,t)?e:Pe)[t];return"latest"===i.ecmaVersion?i.ecmaVersion=1e8:null==i.ecmaVersion?(!Le&&"object"==typeof console&&console.warn&&(Le=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),i.ecmaVersion=11):2015<=i.ecmaVersion&&(i.ecmaVersion-=2009),null==i.allowReserved&&(i.allowReserved=i.ecmaVersion<5),e&&null!=e.allowHashBang||(i.allowHashBang=14<=i.ecmaVersion),Se(i.onToken)&&(r=i.onToken,i.onToken=function(e){return r.push(e)}),Se(i.onComment)&&(i.onComment=(o=(a=i).onComment,function(e,t,r,i,n,s){e={type:e?"Block":"Line",value:t,start:r,end:i};a.locations&&(e.loc=new Ce(this,n,s)),a.ranges&&(e.range=[r,i]),o.push(e)})),i}function Ve(e,t){return 2|(e?4:0)|(t?8:0)}function l(e,t,r){this.options=e=Te(e),this.sourceFile=e.sourceFile,this.keywords=_e(he[6<=e.ecmaVersion?6:"module"===e.sourceType?"5module":5]);var i="",i=(!0!==e.allowReserved&&(i=ce[6<=e.ecmaVersion?6:5===e.ecmaVersion?5:3],"module"===e.sourceType)&&(i+=" await"),this.reservedWords=_e(i),(i?i+" ":"")+ce.strict);this.reservedWordsStrict=_e(i),this.reservedWordsStrictBind=_e(i+" "+ce.strictBind),this.input=String(t),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf("\n",r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(o).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=v.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]}function Ne(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}var e={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}},e=(l.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},e.inFunction.get=function(){return 0<(2&this.currentVarScope().flags)},e.inGenerator.get=function(){return 0<(8&this.currentVarScope().flags)&&!this.currentVarScope().inClassFieldInit},e.inAsync.get=function(){return 0<(4&this.currentVarScope().flags)&&!this.currentVarScope().inClassFieldInit},e.canAwait.get=function(){for(var e=this.scopeStack.length-1;0<=e;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||256&t.flags)return!1;if(2&t.flags)return 0<(4&t.flags)}return this.inModule&&13<=this.options.ecmaVersion||this.options.allowAwaitOutsideFunction},e.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,e=e.inClassFieldInit;return 0<(64&t)||e||this.options.allowSuperOutsideMethod},e.allowDirectSuper.get=function(){return 0<(128&this.currentThisScope().flags)},e.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},e.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,e=e.inClassFieldInit;return 0<(258&t)||e},e.inClassStaticBlock.get=function(){return 0<(256&this.currentVarScope().flags)},l.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r=this,i=0;i<e.length;i++)r=e[i](r);return r},l.parse=function(e,t){return new this(t,e).parse()},l.parseExpressionAt=function(e,t,r){r=new this(r,e,t);return r.nextToken(),r.parseExpression()},l.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(l.prototype,e),l.prototype),Be=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/,e=(e.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){c.lastIndex=e,e+=c.exec(this.input)[0].length;var t,r,i,n=Be.exec(this.input.slice(e));if(!n)return!1;if("use strict"===(n[1]||n[2]))return c.lastIndex=e+n[0].length,r=(t=c.exec(this.input)).index+t[0].length,";"===(i=this.input.charAt(r))||"}"===i||o.test(t[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(r+1));e+=n[0].length,c.lastIndex=e,e+=c.exec(this.input)[0].length,";"===this.input[e]&&e++}},e.eat=function(e){return this.type===e&&(this.next(),!0)},e.isContextual=function(e){return this.type===v.name&&this.value===e&&!this.containsEsc},e.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},e.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},e.canInsertSemicolon=function(){return this.type===v.eof||this.type===v.braceR||o.test(this.input.slice(this.lastTokEnd,this.start))},e.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},e.semicolon=function(){this.eat(v.semi)||this.insertSemicolon()||this.unexpected()},e.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},e.expect=function(e){this.eat(e)||this.unexpected()},e.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},e.checkPatternErrors=function(e,t){e&&(-1<e.trailingComma&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element"),-1<(e=t?e.parenthesizedAssign:e.parenthesizedBind))&&this.raiseRecoverable(e,t?"Assigning to rvalue":"Parenthesized pattern")},e.checkExpressionErrors=function(e,t){var r;return!!e&&(r=e.shorthandAssign,e=e.doubleProto,t?(0<=r&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),void(0<=e&&this.raiseRecoverable(e,"Redefinition of __proto__ property"))):0<=r||0<=e)},e.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},e.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type},l.prototype),De=(e.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==v.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var i=0,n=Object.keys(this.undefinedExports);i<n.length;i+=1){var s=n[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")},{kind:"loop"}),Re={kind:"switch"},Oe=(e.isLet=function(e){if(!(this.options.ecmaVersion<6)&&this.isContextual("let")){c.lastIndex=this.pos;var t=c.exec(this.input),t=this.pos+t[0].length,r=this.input.charCodeAt(t);if(91===r||92===r)return!0;if(!e){if(123===r||55295<r&&r<56320)return!0;if(a(r,!0)){for(var i=t+1;fe(r=this.input.charCodeAt(i),!0);)++i;if(92===r||55295<r&&r<56320)return!0;e=this.input.slice(t,i);if(!le.test(e))return!0}}}return!1},e.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;c.lastIndex=this.pos;var e=c.exec(this.input),e=this.pos+e[0].length;return!(o.test(this.input.slice(this.pos,e))||"function"!==this.input.slice(e,e+8)||e+8!==this.input.length&&(fe(e=this.input.charCodeAt(e+8))||55295<e&&e<56320))},e.parseStatement=function(e,t,r){var i,n,s=this.type,a=this.startNode();switch(this.isLet(e)&&(s=v._var,i="let"),s){case v._break:case v._continue:return this.parseBreakContinueStatement(a,s.keyword);case v._debugger:return this.parseDebuggerStatement(a);case v._do:return this.parseDoStatement(a);case v._for:return this.parseForStatement(a);case v._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&6<=this.options.ecmaVersion&&this.unexpected(),this.parseFunctionStatement(a,!1,!e);case v._class:return e&&this.unexpected(),this.parseClass(a,!0);case v._if:return this.parseIfStatement(a);case v._return:return this.parseReturnStatement(a);case v._switch:return this.parseSwitchStatement(a);case v._throw:return this.parseThrowStatement(a);case v._try:return this.parseTryStatement(a);case v._const:case v._var:return i=i||this.value,e&&"var"!==i&&this.unexpected(),this.parseVarStatement(a,i);case v._while:return this.parseWhileStatement(a);case v._with:return this.parseWithStatement(a);case v.braceL:return this.parseBlock(!0,a);case v.semi:return this.parseEmptyStatement(a);case v._export:case v._import:if(10<this.options.ecmaVersion&&s===v._import){c.lastIndex=this.pos;var o=c.exec(this.input),o=this.pos+o[0].length,o=this.input.charCodeAt(o);if(40===o||46===o)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule)||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'"),s===v._import?this.parseImport(a):this.parseExport(a,r);default:return this.isAsyncFunction()?(e&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!e)):(o=this.value,n=this.parseExpression(),s===v.name&&"Identifier"===n.type&&this.eat(v.colon)?this.parseLabeledStatement(a,o,n,e):this.parseExpressionStatement(a,n))}},e.parseBreakContinueStatement=function(e,t){for(var r="break"===t,i=(this.next(),this.eat(v.semi)||this.insertSemicolon()?e.label=null:this.type!==v.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon()),0);i<this.labels.length;++i){var n=this.labels[i];if(null==e.label||n.name===e.label.name){if(null!=n.kind&&(r||"loop"===n.kind))break;if(e.label&&r)break}}return i===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},e.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},e.parseDoStatement=function(e){return this.next(),this.labels.push(De),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(v._while),e.test=this.parseParenExpression(),6<=this.options.ecmaVersion?this.eat(v.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},e.parseForStatement=function(e){this.next();var t,r,i,n,s,a,o=9<=this.options.ecmaVersion&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;return this.labels.push(De),this.enterScope(0),this.expect(v.parenL),this.type===v.semi?(-1<o&&this.unexpected(o),this.parseFor(e,null)):(t=this.isLet(),this.type===v._var||this.type===v._const||t?(r=this.startNode(),t=t?"let":this.value,this.next(),this.parseVar(r,!0,t),this.finishNode(r,"VariableDeclaration"),(this.type===v._in||6<=this.options.ecmaVersion&&this.isContextual("of"))&&1===r.declarations.length?(9<=this.options.ecmaVersion&&(this.type===v._in?-1<o&&this.unexpected(o):e.await=-1<o),this.parseForIn(e,r)):(-1<o&&this.unexpected(o),this.parseFor(e,r))):(t=this.isContextual("let"),r=!1,i=this.containsEsc,n=new Ne,s=this.start,a=-1<o?this.parseExprSubscripts(n,"await"):this.parseExpression(!0,n),this.type===v._in||(r=6<=this.options.ecmaVersion&&this.isContextual("of"))?(-1<o?(this.type===v._in&&this.unexpected(o),e.await=!0):r&&8<=this.options.ecmaVersion&&(a.start!==s||i||"Identifier"!==a.type||"async"!==a.name?9<=this.options.ecmaVersion&&(e.await=!1):this.unexpected()),t&&r&&this.raise(a.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(a,!1,n),this.checkLValPattern(a),this.parseForIn(e,a)):(this.checkExpressionErrors(n,!0),-1<o&&this.unexpected(o),this.parseFor(e,a))))},e.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,Me|(r?0:Fe),!1,t)},e.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(v._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},e.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(v.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},e.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(v.braceL),this.labels.push(Re),this.enterScope(0);for(var r,i=!1;this.type!==v.braceR;)this.type===v._case||this.type===v._default?(r=this.type===v._case,t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(v.colon)):(t||this.unexpected(),t.consequent.push(this.parseStatement(null)));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},e.parseThrowStatement=function(e){return this.next(),o.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")},[]),Me=(e.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect(v.parenR),e},e.parseTryStatement=function(e){var t;return this.next(),e.block=this.parseBlock(),e.handler=null,this.type===v._catch&&(t=this.startNode(),this.next(),this.eat(v.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")),e.finalizer=this.eat(v._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},e.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")},e.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(De),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},e.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},e.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},e.parseLabeledStatement=function(e,t,r,i){for(var n=0,s=this.labels;n<s.length;n+=1)s[n].name===t&&this.raise(r.start,"Label '"+t+"' is already declared");for(var a=this.type.isLoop?"loop":this.type===v._switch?"switch":null,o=this.labels.length-1;0<=o;o--){var c=this.labels[o];if(c.statementStart!==e.start)break;c.statementStart=this.start,c.kind=a}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},e.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},e.parseBlock=function(e,t,r){for(void 0===e&&(e=!0),(t=void 0===t?this.startNode():t).body=[],this.expect(v.braceL),e&&this.enterScope(0);this.type!==v.braceR;){var i=this.parseStatement(null);t.body.push(i)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},e.parseFor=function(e,t){return e.init=t,this.expect(v.semi),e.test=this.type===v.semi?null:this.parseExpression(),this.expect(v.semi),e.update=this.type===v.parenR?null:this.parseExpression(),this.expect(v.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},e.parseForIn=function(e,t){var r=this.type===v._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!r||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(v.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")},e.parseVar=function(e,t,r,i){for(e.declarations=[],e.kind=r;;){var n=this.startNode();if(this.parseVarId(n,r),this.eat(v.eq)?n.init=this.parseMaybeAssign(t):i||"const"!==r||this.type===v._in||6<=this.options.ecmaVersion&&this.isContextual("of")?i||"Identifier"===n.id.type||t&&(this.type===v._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(v.comma))break}return e},e.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)},1),Fe=2;function je(e,t){var r=e.computed,e=e.key;return!r&&("Identifier"===e.type&&e.name===t||"Literal"===e.type&&e.value===t)}e.parseFunction=function(e,t,r,i,n){this.initFunction(e),(9<=this.options.ecmaVersion||6<=this.options.ecmaVersion&&!i)&&(this.type===v.star&&t&Fe&&this.unexpected(),e.generator=this.eat(v.star)),8<=this.options.ecmaVersion&&(e.async=!!i),t&Me&&(e.id=4&t&&this.type!==v.name?null:this.parseIdent(),!e.id||t&Fe||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ve(e.async,e.generator)),t&Me||(e.id=this.type===v.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,n),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(e,t&Me?"FunctionDeclaration":"FunctionExpression")},e.parseFunctionParams=function(e){this.expect(v.parenL),e.params=this.parseBindingList(v.parenR,!1,8<=this.options.ecmaVersion),this.checkYieldAwaitInDefaultParams()},e.parseClass=function(e,t){this.next();var r=this.strict,i=(this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e),this.enterClassBody()),n=this.startNode(),s=!1;for(n.body=[],this.expect(v.braceL);this.type!==v.braceR;){var a=this.parseClassElement(null!==e.superClass);a&&(n.body.push(a),"MethodDefinition"===a.type&&"constructor"===a.kind?(s&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),s=!0):a.key&&"PrivateIdentifier"===a.key.type&&function(e,t){var r=t.key.name,i=e[r],n="true";"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(n=(t.static?"s":"i")+t.kind);if("iget"===i&&"iset"===n||"iset"===i&&"iget"===n||"sget"===i&&"sset"===n||"sset"===i&&"sget"===n)e[r]="true";else{if(i)return 1;e[r]=n}}(i,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},e.parseClassElement=function(e){if(this.eat(v.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),i="",n=!1,s=!1,a="method",o=!1;if(this.eatContextual("static")){if(13<=t&&this.eat(v.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===v.star?o=!0:i="static"}return r.static=o,!i&&8<=t&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==v.star||this.canInsertSemicolon()?i="async":s=!0),!i&&(9<=t||!s)&&this.eat(v.star)&&(n=!0),i||s||n||(o=this.value,(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=o:i=o)),i?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=i,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===v.parenL||"method"!==a||n||s?(i=(o=!r.static&&je(r,"constructor"))&&e,o&&"method"!==a&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=o?"constructor":a,this.parseClassMethod(r,n,s,i)):this.parseClassField(r),r},e.isClassElementNameStart=function(){return this.type===v.name||this.type===v.privateId||this.type===v.num||this.type===v.string||this.type===v.bracketL||this.type.keyword},e.parseClassElementName=function(e){this.type===v.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},e.parseClassMethod=function(e,t,r,i){var n=e.key,n=("constructor"===e.kind?(t&&this.raise(n.start,"Constructor can't be a generator"),r&&this.raise(n.start,"Constructor can't be an async method")):e.static&&je(e,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype"),e.value=this.parseMethod(t,r,i));return"get"===e.kind&&0!==n.params.length&&this.raiseRecoverable(n.start,"getter should have no params"),"set"===e.kind&&1!==n.params.length&&this.raiseRecoverable(n.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===n.params[0].type&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},e.parseClassField=function(e){var t,r;return je(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&je(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(v.eq)?(r=(t=this.currentThisScope()).inClassFieldInit,t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=r):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},e.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==v.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},e.parseClassId=function(e,t){this.type===v.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},e.parseClassSuper=function(e){e.superClass=this.eat(v._extends)?this.parseExprSubscripts(null,!1):null},e.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},e.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(this.options.checkPrivateFields)for(var e=this.privateNameStack.length,i=0===e?null:this.privateNameStack[e-1],n=0;n<r.length;++n){var s=r[n];we(t,s.name)||(i?i.used.push(s):this.raiseRecoverable(s.start,"Private field '#"+s.name+"' must be declared in an enclosing class"))}},e.parseExportAllDeclaration=function(e,t){return 11<=this.options.ecmaVersion&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==v.string&&this.unexpected(),e.source=this.parseExprAtom(),16<=this.options.ecmaVersion&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},e.parseExport=function(e,t){if(this.next(),this.eat(v.star))return this.parseExportAllDeclaration(e,t);if(this.eat(v._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==v.string&&this.unexpected(),e.source=this.parseExprAtom(),16<=this.options.ecmaVersion&&(e.attributes=this.parseWithClause());else{for(var r=0,i=e.specifiers;r<i.length;r+=1){var n=i[r];this.checkUnreserved(n.local),this.checkLocalExport(n.local),"Literal"===n.local.type&&this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},e.parseExportDeclaration=function(e){return this.parseStatement(null)},e.parseExportDefaultDeclaration=function(){var e,t;return this.type===v._function||(t=this.isAsyncFunction())?(e=this.startNode(),this.next(),t&&this.next(),this.parseFunction(e,4|Me,!1,t)):this.type===v._class?(e=this.startNode(),this.parseClass(e,"nullableID")):(t=this.parseMaybeAssign(),this.semicolon(),t)},e.checkExport=function(e,t,r){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),we(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)},e.checkPatternExport=function(e,t){var r=t.type;if("Identifier"===r)this.checkExport(e,t,t.start);else if("ObjectPattern"===r)for(var i=0,n=t.properties;i<n.length;i+=1){var s=n[i];this.checkPatternExport(e,s)}else if("ArrayPattern"===r)for(var a=0,o=t.elements;a<o.length;a+=1){var c=o[a];c&&this.checkPatternExport(e,c)}else"Property"===r?this.checkPatternExport(e,t.value):"AssignmentPattern"===r?this.checkPatternExport(e,t.left):"RestElement"===r&&this.checkPatternExport(e,t.argument)},e.checkVariableExport=function(e,t){if(e)for(var r=0,i=t;r<i.length;r+=1){var n=i[r];this.checkPatternExport(e,n.id)}},e.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},e.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")},e.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(v.braceL);!this.eat(v.braceR);){if(r)r=!1;else if(this.expect(v.comma),this.afterTrailingComma(v.braceR))break;t.push(this.parseExportSpecifier(e))}return t},e.parseImport=function(e){return this.next(),this.type===v.string?(e.specifiers=Oe,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===v.string?this.parseExprAtom():this.unexpected()),16<=this.options.ecmaVersion&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},e.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportSpecifier")},e.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportDefaultSpecifier")},e.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportNamespaceSpecifier")},e.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type!==v.name||(e.push(this.parseImportDefaultSpecifier()),this.eat(v.comma)))if(this.type===v.star)e.push(this.parseImportNamespaceSpecifier());else for(this.expect(v.braceL);!this.eat(v.braceR);){if(t)t=!1;else if(this.expect(v.comma),this.afterTrailingComma(v.braceR))break;e.push(this.parseImportSpecifier())}return e},e.parseWithClause=function(){var e=[];if(this.eat(v._with)){this.expect(v.braceL);for(var t={},r=!0;!this.eat(v.braceR);){if(r)r=!1;else if(this.expect(v.comma),this.afterTrailingComma(v.braceR))break;var i=this.parseImportAttribute(),n="Identifier"===i.key.type?i.key.name:i.key.value;we(t,n)&&this.raiseRecoverable(i.key.start,"Duplicate attribute key '"+n+"'"),t[n]=!0,e.push(i)}}return e},e.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===v.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(v.colon),this.type!==v.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},e.parseModuleExportName=function(){var e;return 13<=this.options.ecmaVersion&&this.type===v.string?(e=this.parseLiteral(this.value),Ie.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e):this.parseIdent(!0)},e.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},e.isDirectiveCandidate=function(e){return 5<=this.options.ecmaVersion&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};function u(e,t,r,i,n){this.token=e,this.isExpr=!!t,this.preserveSpace=!!r,this.override=i,this.generator=!!n}var e=l.prototype,d=(e.toAssignable=function(e,t,r){if(6<=this.options.ecmaVersion&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var i=0,n=e.properties;i<n.length;i+=1){var s=n[i];this.toAssignable(s,t),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e},e.toAssignableList=function(e,t){for(var r,i=e.length,n=0;n<i;n++){var s=e[n];s&&this.toAssignable(s,t)}return i&&(r=e[i-1],6===this.options.ecmaVersion)&&t&&r&&"RestElement"===r.type&&"Identifier"!==r.argument.type&&this.unexpected(r.argument.start),e},e.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},e.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==v.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},e.parseBindingAtom=function(){if(6<=this.options.ecmaVersion)switch(this.type){case v.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(v.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case v.braceL:return this.parseObj(!0)}return this.parseIdent()},e.parseBindingList=function(e,t,r,i){for(var n=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect(v.comma),t&&this.type===v.comma)n.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===v.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),n.push(a),this.type===v.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}n.push(this.parseAssignableListItem(i))}return n},e.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},e.parseBindingListItem=function(e){return e},e.parseMaybeDefault=function(e,t,r){return r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(v.eq)?r:((e=this.startNodeAt(e,t)).left=r,e.right=this.parseMaybeAssign(),this.finishNode(e,"AssignmentPattern"))},e.checkLValSimple=function(e,t,r){var i=0!==(t=void 0===t?0:t);switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(i?"Binding ":"Assigning to ")+e.name+" in strict mode"),i&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),r&&(we(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),5!==t)&&this.declareName(e.name,t,e.start);break;case"ChainExpression