@hpcc-js/observablehq-compiler 3.3.7 → 3.3.9
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/index.js +4390 -1383
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +4 -36
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +4 -4
package/dist/index.umd.cjs
CHANGED
|
@@ -1,37 +1,5 @@
|
|
|
1
|
-
(function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports):typeof define=="function"&&define.amd?define(["exports"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global["@hpcc-js/observablehq-compiler"]={}))})(this,function(exports2){"use strict";var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value;var __publicField=(obj,key,value)=>__defNormalProp(obj,typeof key!="symbol"?key+"":key,value);var astralIdentifierCodes=[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],astralIdentifierStartCodes=[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],nonASCIIidentifierChars="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",reservedWords={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"},ecma5AndLessKeywords="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",keywords$1={5:ecma5AndLessKeywords,"5module":ecma5AndLessKeywords+" export import",6:ecma5AndLessKeywords+" const class extends export import super"},keywordRelationalOperator=/^in(stanceof)?$/,nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]"),nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");function isInAstralSet(code,set){for(var pos=65536,i2=0;i2<set.length;i2+=2){if(pos+=set[i2],pos>code)return!1;if(pos+=set[i2+1],pos>=code)return!0}return!1}function isIdentifierStart(code,astral){return code<65?code===36:code<91?!0:code<97?code===95:code<123?!0:code<=65535?code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code)):astral===!1?!1:isInAstralSet(code,astralIdentifierStartCodes)}function isIdentifierChar(code,astral){return code<48?code===36:code<58?!0:code<65?!1:code<91?!0:code<97?code===95:code<123?!0:code<=65535?code>=170&&nonASCIIidentifier.test(String.fromCharCode(code)):astral===!1?!1:isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}var TokenType=function(label,conf){conf===void 0&&(conf={}),this.label=label,this.keyword=conf.keyword,this.beforeExpr=!!conf.beforeExpr,this.startsExpr=!!conf.startsExpr,this.isLoop=!!conf.isLoop,this.isAssign=!!conf.isAssign,this.prefix=!!conf.prefix,this.postfix=!!conf.postfix,this.binop=conf.binop||null,this.updateContext=null};function binop(name,prec){return new TokenType(name,{beforeExpr:!0,binop:prec})}var beforeExpr={beforeExpr:!0},startsExpr={startsExpr:!0},keywords={};function kw(name,options){return options===void 0&&(options={}),options.keyword=name,keywords[name]=new TokenType(name,options)}var types$1={num:new TokenType("num",startsExpr),regexp:new TokenType("regexp",startsExpr),string:new TokenType("string",startsExpr),name:new TokenType("name",startsExpr),privateId:new TokenType("privateId",startsExpr),eof:new TokenType("eof"),bracketL:new TokenType("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new TokenType("]"),braceL:new TokenType("{",{beforeExpr:!0,startsExpr:!0}),braceR:new TokenType("}"),parenL:new TokenType("(",{beforeExpr:!0,startsExpr:!0}),parenR:new TokenType(")"),comma:new TokenType(",",beforeExpr),semi:new TokenType(";",beforeExpr),colon:new TokenType(":",beforeExpr),dot:new TokenType("."),question:new TokenType("?",beforeExpr),questionDot:new TokenType("?."),arrow:new TokenType("=>",beforeExpr),template:new TokenType("template"),invalidTemplate:new TokenType("invalidTemplate"),ellipsis:new TokenType("...",beforeExpr),backQuote:new TokenType("`",startsExpr),dollarBraceL:new TokenType("${",{beforeExpr:!0,startsExpr:!0}),eq:new TokenType("=",{beforeExpr:!0,isAssign:!0}),assign:new TokenType("_=",{beforeExpr:!0,isAssign:!0}),incDec:new TokenType("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new TokenType("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=/===/!==",6),relational:binop("</>/<=/>=",7),bitShift:binop("<</>>/>>>",8),plusMin:new TokenType("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),starstar:new TokenType("**",{beforeExpr:!0}),coalesce:binop("??",1),_break:kw("break"),_case:kw("case",beforeExpr),_catch:kw("catch"),_continue:kw("continue"),_debugger:kw("debugger"),_default:kw("default",beforeExpr),_do:kw("do",{isLoop:!0,beforeExpr:!0}),_else:kw("else",beforeExpr),_finally:kw("finally"),_for:kw("for",{isLoop:!0}),_function:kw("function",startsExpr),_if:kw("if"),_return:kw("return",beforeExpr),_switch:kw("switch"),_throw:kw("throw",beforeExpr),_try:kw("try"),_var:kw("var"),_const:kw("const"),_while:kw("while",{isLoop:!0}),_with:kw("with"),_new:kw("new",{beforeExpr:!0,startsExpr:!0}),_this:kw("this",startsExpr),_super:kw("super",startsExpr),_class:kw("class",startsExpr),_extends:kw("extends",beforeExpr),_export:kw("export"),_import:kw("import",startsExpr),_null:kw("null",startsExpr),_true:kw("true",startsExpr),_false:kw("false",startsExpr),_in:kw("in",{beforeExpr:!0,binop:7}),_instanceof:kw("instanceof",{beforeExpr:!0,binop:7}),_typeof:kw("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:kw("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:kw("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},lineBreak=/\r\n?|\n|\u2028|\u2029/,lineBreakG=new RegExp(lineBreak.source,"g");function isNewLine(code){return code===10||code===13||code===8232||code===8233}function nextLineBreak(code,from,end){end===void 0&&(end=code.length);for(var i2=from;i2<end;i2++){var next=code.charCodeAt(i2);if(isNewLine(next))return i2<end-1&&next===13&&code.charCodeAt(i2+1)===10?i2+2:i2+1}return-1}var nonASCIIwhitespace=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,skipWhiteSpace=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ref=Object.prototype,hasOwnProperty=ref.hasOwnProperty,toString=ref.toString,hasOwn=Object.hasOwn||function(obj,propName){return hasOwnProperty.call(obj,propName)},isArray=Array.isArray||function(obj){return toString.call(obj)==="[object Array]"},regexpCache=Object.create(null);function wordsRegexp(words){return regexpCache[words]||(regexpCache[words]=new RegExp("^(?:"+words.replace(/ /g,"|")+")$"))}function codePointToString(code){return code<=65535?String.fromCharCode(code):(code-=65536,String.fromCharCode((code>>10)+55296,(code&1023)+56320))}var loneSurrogate=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Position=function(line,col){this.line=line,this.column=col};Position.prototype.offset=function(n){return new Position(this.line,this.column+n)};var SourceLocation=function(p,start,end){this.start=start,this.end=end,p.sourceFile!==null&&(this.source=p.sourceFile)};function getLineInfo(input,offset){for(var line=1,cur=0;;){var nextBreak=nextLineBreak(input,cur,offset);if(nextBreak<0)return new Position(line,offset-cur);++line,cur=nextBreak}}var defaultOptions={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,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},warnedAboutEcmaVersion=!1;function getOptions(opts){var options={};for(var opt in defaultOptions)options[opt]=opts&&hasOwn(opts,opt)?opts[opt]:defaultOptions[opt];if(options.ecmaVersion==="latest"?options.ecmaVersion=1e8:options.ecmaVersion==null?(!warnedAboutEcmaVersion&&typeof console=="object"&&console.warn&&(warnedAboutEcmaVersion=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
2
|
-
|
|
3
|
-
`,startPos-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(lineBreak).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=types$1.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=options.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&options.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(SCOPE_TOP),this.regexpState=null,this.privateNameStack=[]},prototypeAccessors={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}};Parser.prototype.parse=function(){var node=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(node)},prototypeAccessors.inFunction.get=function(){return(this.currentVarScope().flags&SCOPE_FUNCTION$1)>0},prototypeAccessors.inGenerator.get=function(){return(this.currentVarScope().flags&SCOPE_GENERATOR$1)>0},prototypeAccessors.inAsync.get=function(){return(this.currentVarScope().flags&SCOPE_ASYNC$1)>0},prototypeAccessors.canAwait.get=function(){for(var i2=this.scopeStack.length-1;i2>=0;i2--){var ref2=this.scopeStack[i2],flags=ref2.flags;if(flags&(SCOPE_CLASS_STATIC_BLOCK|SCOPE_CLASS_FIELD_INIT))return!1;if(flags&SCOPE_FUNCTION$1)return(flags&SCOPE_ASYNC$1)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},prototypeAccessors.allowSuper.get=function(){var ref2=this.currentThisScope(),flags=ref2.flags;return(flags&SCOPE_SUPER)>0||this.options.allowSuperOutsideMethod},prototypeAccessors.allowDirectSuper.get=function(){return(this.currentThisScope().flags&SCOPE_DIRECT_SUPER)>0},prototypeAccessors.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},prototypeAccessors.allowNewDotTarget.get=function(){for(var i2=this.scopeStack.length-1;i2>=0;i2--){var ref2=this.scopeStack[i2],flags=ref2.flags;if(flags&(SCOPE_CLASS_STATIC_BLOCK|SCOPE_CLASS_FIELD_INIT)||flags&SCOPE_FUNCTION$1&&!(flags&SCOPE_ARROW))return!0}return!1},prototypeAccessors.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&SCOPE_CLASS_STATIC_BLOCK)>0},Parser.extend=function(){for(var plugins=[],len=arguments.length;len--;)plugins[len]=arguments[len];for(var cls=this,i2=0;i2<plugins.length;i2++)cls=plugins[i2](cls);return cls},Parser.parse=function(input,options){return new this(options,input).parse()},Parser.parseExpressionAt=function(input,pos,options){var parser=new this(options,input,pos);return parser.nextToken(),parser.parseExpression()},Parser.tokenizer=function(input,options){return new this(options,input)},Object.defineProperties(Parser.prototype,prototypeAccessors);var pp$9=Parser.prototype,literal=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;pp$9.strictDirective=function(start){if(this.options.ecmaVersion<5)return!1;for(;;){skipWhiteSpace.lastIndex=start,start+=skipWhiteSpace.exec(this.input)[0].length;var match=literal.exec(this.input.slice(start));if(!match)return!1;if((match[1]||match[2])==="use strict"){skipWhiteSpace.lastIndex=start+match[0].length;var spaceAfter=skipWhiteSpace.exec(this.input),end=spaceAfter.index+spaceAfter[0].length,next=this.input.charAt(end);return next===";"||next==="}"||lineBreak.test(spaceAfter[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(next)||next==="!"&&this.input.charAt(end+1)==="=")}start+=match[0].length,skipWhiteSpace.lastIndex=start,start+=skipWhiteSpace.exec(this.input)[0].length,this.input[start]===";"&&start++}},pp$9.eat=function(type){return this.type===type?(this.next(),!0):!1},pp$9.isContextual=function(name){return this.type===types$1.name&&this.value===name&&!this.containsEsc},pp$9.eatContextual=function(name){return this.isContextual(name)?(this.next(),!0):!1},pp$9.expectContextual=function(name){this.eatContextual(name)||this.unexpected()},pp$9.canInsertSemicolon=function(){return this.type===types$1.eof||this.type===types$1.braceR||lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},pp$9.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},pp$9.semicolon=function(){!this.eat(types$1.semi)&&!this.insertSemicolon()&&this.unexpected()},pp$9.afterTrailingComma=function(tokType,notNext){if(this.type===tokType)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),notNext||this.next(),!0},pp$9.expect=function(type){this.eat(type)||this.unexpected()},pp$9.unexpected=function(pos){this.raise(pos??this.start,"Unexpected token")};var DestructuringErrors=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};pp$9.checkPatternErrors=function(refDestructuringErrors,isAssign){if(refDestructuringErrors){refDestructuringErrors.trailingComma>-1&&this.raiseRecoverable(refDestructuringErrors.trailingComma,"Comma is not permitted after the rest element");var parens=isAssign?refDestructuringErrors.parenthesizedAssign:refDestructuringErrors.parenthesizedBind;parens>-1&&this.raiseRecoverable(parens,isAssign?"Assigning to rvalue":"Parenthesized pattern")}},pp$9.checkExpressionErrors=function(refDestructuringErrors,andThrow){if(!refDestructuringErrors)return!1;var shorthandAssign=refDestructuringErrors.shorthandAssign,doubleProto=refDestructuringErrors.doubleProto;if(!andThrow)return shorthandAssign>=0||doubleProto>=0;shorthandAssign>=0&&this.raise(shorthandAssign,"Shorthand property assignments are valid only in destructuring patterns"),doubleProto>=0&&this.raiseRecoverable(doubleProto,"Redefinition of __proto__ property")},pp$9.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")},pp$9.isSimpleAssignTarget=function(expr){return expr.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(expr.expression):expr.type==="Identifier"||expr.type==="MemberExpression"};var pp$8=Parser.prototype;pp$8.parseTopLevel=function(node){var exports3=Object.create(null);for(node.body||(node.body=[]);this.type!==types$1.eof;){var stmt=this.parseStatement(null,!0,exports3);node.body.push(stmt)}if(this.inModule)for(var i2=0,list2=Object.keys(this.undefinedExports);i2<list2.length;i2+=1){var name=list2[i2];this.raiseRecoverable(this.undefinedExports[name].start,"Export '"+name+"' is not defined")}return this.adaptDirectivePrologue(node.body),this.next(),node.sourceType=this.options.sourceType,this.finishNode(node,"Program")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp$8.isLet=function(context){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;skipWhiteSpace.lastIndex=this.pos;var skip=skipWhiteSpace.exec(this.input),next=this.pos+skip[0].length,nextCh=this.input.charCodeAt(next);if(nextCh===91||nextCh===92)return!0;if(context)return!1;if(nextCh===123||nextCh>55295&&nextCh<56320)return!0;if(isIdentifierStart(nextCh,!0)){for(var pos=next+1;isIdentifierChar(nextCh=this.input.charCodeAt(pos),!0);)++pos;if(nextCh===92||nextCh>55295&&nextCh<56320)return!0;var ident=this.input.slice(next,pos);if(!keywordRelationalOperator.test(ident))return!0}return!1},pp$8.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;skipWhiteSpace.lastIndex=this.pos;var skip=skipWhiteSpace.exec(this.input),next=this.pos+skip[0].length,after;return!lineBreak.test(this.input.slice(this.pos,next))&&this.input.slice(next,next+8)==="function"&&(next+8===this.input.length||!(isIdentifierChar(after=this.input.charCodeAt(next+8))||after>55295&&after<56320))},pp$8.isUsingKeyword=function(isAwaitUsing,isFor){if(this.options.ecmaVersion<17||!this.isContextual(isAwaitUsing?"await":"using"))return!1;skipWhiteSpace.lastIndex=this.pos;var skip=skipWhiteSpace.exec(this.input),next=this.pos+skip[0].length;if(lineBreak.test(this.input.slice(this.pos,next)))return!1;if(isAwaitUsing){var awaitEndPos=next+5,after;if(this.input.slice(next,awaitEndPos)!=="using"||awaitEndPos===this.input.length||isIdentifierChar(after=this.input.charCodeAt(awaitEndPos))||after>55295&&after<56320)return!1;skipWhiteSpace.lastIndex=awaitEndPos;var skipAfterUsing=skipWhiteSpace.exec(this.input);if(skipAfterUsing&&lineBreak.test(this.input.slice(awaitEndPos,awaitEndPos+skipAfterUsing[0].length)))return!1}if(isFor){var ofEndPos=next+2,after$1;if(this.input.slice(next,ofEndPos)==="of"&&(ofEndPos===this.input.length||!isIdentifierChar(after$1=this.input.charCodeAt(ofEndPos))&&!(after$1>55295&&after$1<56320)))return!1}var ch=this.input.charCodeAt(next);return isIdentifierStart(ch,!0)||ch===92},pp$8.isAwaitUsing=function(isFor){return this.isUsingKeyword(!0,isFor)},pp$8.isUsing=function(isFor){return this.isUsingKeyword(!1,isFor)},pp$8.parseStatement=function(context,topLevel,exports3){var starttype=this.type,node=this.startNode(),kind;switch(this.isLet(context)&&(starttype=types$1._var,kind="let"),starttype){case types$1._break:case types$1._continue:return this.parseBreakContinueStatement(node,starttype.keyword);case types$1._debugger:return this.parseDebuggerStatement(node);case types$1._do:return this.parseDoStatement(node);case types$1._for:return this.parseForStatement(node);case types$1._function:return context&&(this.strict||context!=="if"&&context!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(node,!1,!context);case types$1._class:return context&&this.unexpected(),this.parseClass(node,!0);case types$1._if:return this.parseIfStatement(node);case types$1._return:return this.parseReturnStatement(node);case types$1._switch:return this.parseSwitchStatement(node);case types$1._throw:return this.parseThrowStatement(node);case types$1._try:return this.parseTryStatement(node);case types$1._const:case types$1._var:return kind=kind||this.value,context&&kind!=="var"&&this.unexpected(),this.parseVarStatement(node,kind);case types$1._while:return this.parseWhileStatement(node);case types$1._with:return this.parseWithStatement(node);case types$1.braceL:return this.parseBlock(!0,node);case types$1.semi:return this.parseEmptyStatement(node);case types$1._export:case types$1._import:if(this.options.ecmaVersion>10&&starttype===types$1._import){skipWhiteSpace.lastIndex=this.pos;var skip=skipWhiteSpace.exec(this.input),next=this.pos+skip[0].length,nextCh=this.input.charCodeAt(next);if(nextCh===40||nextCh===46)return this.parseExpressionStatement(node,this.parseExpression())}return this.options.allowImportExportEverywhere||(topLevel||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'")),starttype===types$1._import?this.parseImport(node):this.parseExport(node,exports3);default:if(this.isAsyncFunction())return context&&this.unexpected(),this.next(),this.parseFunctionStatement(node,!0,!context);var usingKind=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(usingKind)return topLevel&&this.options.sourceType==="script"&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),usingKind==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(node,!1,usingKind),this.semicolon(),this.finishNode(node,"VariableDeclaration");var maybeName=this.value,expr=this.parseExpression();return starttype===types$1.name&&expr.type==="Identifier"&&this.eat(types$1.colon)?this.parseLabeledStatement(node,maybeName,expr,context):this.parseExpressionStatement(node,expr)}},pp$8.parseBreakContinueStatement=function(node,keyword){var isBreak=keyword==="break";this.next(),this.eat(types$1.semi)||this.insertSemicolon()?node.label=null:this.type!==types$1.name?this.unexpected():(node.label=this.parseIdent(),this.semicolon());for(var i2=0;i2<this.labels.length;++i2){var lab=this.labels[i2];if((node.label==null||lab.name===node.label.name)&&(lab.kind!=null&&(isBreak||lab.kind==="loop")||node.label&&isBreak))break}return i2===this.labels.length&&this.raise(node.start,"Unsyntactic "+keyword),this.finishNode(node,isBreak?"BreakStatement":"ContinueStatement")},pp$8.parseDebuggerStatement=function(node){return this.next(),this.semicolon(),this.finishNode(node,"DebuggerStatement")},pp$8.parseDoStatement=function(node){return this.next(),this.labels.push(loopLabel),node.body=this.parseStatement("do"),this.labels.pop(),this.expect(types$1._while),node.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(types$1.semi):this.semicolon(),this.finishNode(node,"DoWhileStatement")},pp$8.parseForStatement=function(node){this.next();var awaitAt=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(loopLabel),this.enterScope(0),this.expect(types$1.parenL),this.type===types$1.semi)return awaitAt>-1&&this.unexpected(awaitAt),this.parseFor(node,null);var isLet=this.isLet();if(this.type===types$1._var||this.type===types$1._const||isLet){var init$1=this.startNode(),kind=isLet?"let":this.value;return this.next(),this.parseVar(init$1,!0,kind),this.finishNode(init$1,"VariableDeclaration"),this.parseForAfterInit(node,init$1,awaitAt)}var startsWithLet=this.isContextual("let"),isForOf=!1,usingKind=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(usingKind){var init$2=this.startNode();return this.next(),usingKind==="await using"&&this.next(),this.parseVar(init$2,!0,usingKind),this.finishNode(init$2,"VariableDeclaration"),this.parseForAfterInit(node,init$2,awaitAt)}var containsEsc=this.containsEsc,refDestructuringErrors=new DestructuringErrors,initPos=this.start,init=awaitAt>-1?this.parseExprSubscripts(refDestructuringErrors,"await"):this.parseExpression(!0,refDestructuringErrors);return this.type===types$1._in||(isForOf=this.options.ecmaVersion>=6&&this.isContextual("of"))?(awaitAt>-1?(this.type===types$1._in&&this.unexpected(awaitAt),node.await=!0):isForOf&&this.options.ecmaVersion>=8&&(init.start===initPos&&!containsEsc&&init.type==="Identifier"&&init.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(node.await=!1)),startsWithLet&&isForOf&&this.raise(init.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(init,!1,refDestructuringErrors),this.checkLValPattern(init),this.parseForIn(node,init)):(this.checkExpressionErrors(refDestructuringErrors,!0),awaitAt>-1&&this.unexpected(awaitAt),this.parseFor(node,init))},pp$8.parseForAfterInit=function(node,init,awaitAt){return(this.type===types$1._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&init.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===types$1._in?awaitAt>-1&&this.unexpected(awaitAt):node.await=awaitAt>-1),this.parseForIn(node,init)):(awaitAt>-1&&this.unexpected(awaitAt),this.parseFor(node,init))},pp$8.parseFunctionStatement=function(node,isAsync,declarationPosition){return this.next(),this.parseFunction(node,FUNC_STATEMENT|(declarationPosition?0:FUNC_HANGING_STATEMENT),!1,isAsync)},pp$8.parseIfStatement=function(node){return this.next(),node.test=this.parseParenExpression(),node.consequent=this.parseStatement("if"),node.alternate=this.eat(types$1._else)?this.parseStatement("if"):null,this.finishNode(node,"IfStatement")},pp$8.parseReturnStatement=function(node){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(types$1.semi)||this.insertSemicolon()?node.argument=null:(node.argument=this.parseExpression(),this.semicolon()),this.finishNode(node,"ReturnStatement")},pp$8.parseSwitchStatement=function(node){this.next(),node.discriminant=this.parseParenExpression(),node.cases=[],this.expect(types$1.braceL),this.labels.push(switchLabel),this.enterScope(0);for(var cur,sawDefault=!1;this.type!==types$1.braceR;)if(this.type===types$1._case||this.type===types$1._default){var isCase=this.type===types$1._case;cur&&this.finishNode(cur,"SwitchCase"),node.cases.push(cur=this.startNode()),cur.consequent=[],this.next(),isCase?cur.test=this.parseExpression():(sawDefault&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),sawDefault=!0,cur.test=null),this.expect(types$1.colon)}else cur||this.unexpected(),cur.consequent.push(this.parseStatement(null));return this.exitScope(),cur&&this.finishNode(cur,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(node,"SwitchStatement")},pp$8.parseThrowStatement=function(node){return this.next(),lineBreak.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),node.argument=this.parseExpression(),this.semicolon(),this.finishNode(node,"ThrowStatement")};var empty$1=[];pp$8.parseCatchClauseParam=function(){var param=this.parseBindingAtom(),simple2=param.type==="Identifier";return this.enterScope(simple2?SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(param,simple2?BIND_SIMPLE_CATCH:BIND_LEXICAL),this.expect(types$1.parenR),param},pp$8.parseTryStatement=function(node){if(this.next(),node.block=this.parseBlock(),node.handler=null,this.type===types$1._catch){var clause=this.startNode();this.next(),this.eat(types$1.parenL)?clause.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),clause.param=null,this.enterScope(0)),clause.body=this.parseBlock(!1),this.exitScope(),node.handler=this.finishNode(clause,"CatchClause")}return node.finalizer=this.eat(types$1._finally)?this.parseBlock():null,!node.handler&&!node.finalizer&&this.raise(node.start,"Missing catch or finally clause"),this.finishNode(node,"TryStatement")},pp$8.parseVarStatement=function(node,kind,allowMissingInitializer){return this.next(),this.parseVar(node,!1,kind,allowMissingInitializer),this.semicolon(),this.finishNode(node,"VariableDeclaration")},pp$8.parseWhileStatement=function(node){return this.next(),node.test=this.parseParenExpression(),this.labels.push(loopLabel),node.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(node,"WhileStatement")},pp$8.parseWithStatement=function(node){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),node.object=this.parseParenExpression(),node.body=this.parseStatement("with"),this.finishNode(node,"WithStatement")},pp$8.parseEmptyStatement=function(node){return this.next(),this.finishNode(node,"EmptyStatement")},pp$8.parseLabeledStatement=function(node,maybeName,expr,context){for(var i$1=0,list2=this.labels;i$1<list2.length;i$1+=1){var label=list2[i$1];label.name===maybeName&&this.raise(expr.start,"Label '"+maybeName+"' is already declared")}for(var kind=this.type.isLoop?"loop":this.type===types$1._switch?"switch":null,i2=this.labels.length-1;i2>=0;i2--){var label$1=this.labels[i2];if(label$1.statementStart===node.start)label$1.statementStart=this.start,label$1.kind=kind;else break}return this.labels.push({name:maybeName,kind,statementStart:this.start}),node.body=this.parseStatement(context?context.indexOf("label")===-1?context+"label":context:"label"),this.labels.pop(),node.label=expr,this.finishNode(node,"LabeledStatement")},pp$8.parseExpressionStatement=function(node,expr){return node.expression=expr,this.semicolon(),this.finishNode(node,"ExpressionStatement")},pp$8.parseBlock=function(createNewLexicalScope,node,exitStrict){for(createNewLexicalScope===void 0&&(createNewLexicalScope=!0),node===void 0&&(node=this.startNode()),node.body=[],this.expect(types$1.braceL),createNewLexicalScope&&this.enterScope(0);this.type!==types$1.braceR;){var stmt=this.parseStatement(null);node.body.push(stmt)}return exitStrict&&(this.strict=!1),this.next(),createNewLexicalScope&&this.exitScope(),this.finishNode(node,"BlockStatement")},pp$8.parseFor=function(node,init){return node.init=init,this.expect(types$1.semi),node.test=this.type===types$1.semi?null:this.parseExpression(),this.expect(types$1.semi),node.update=this.type===types$1.parenR?null:this.parseExpression(),this.expect(types$1.parenR),node.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(node,"ForStatement")},pp$8.parseForIn=function(node,init){var isForIn=this.type===types$1._in;return this.next(),init.type==="VariableDeclaration"&&init.declarations[0].init!=null&&(!isForIn||this.options.ecmaVersion<8||this.strict||init.kind!=="var"||init.declarations[0].id.type!=="Identifier")&&this.raise(init.start,(isForIn?"for-in":"for-of")+" loop variable declaration may not have an initializer"),node.left=init,node.right=isForIn?this.parseExpression():this.parseMaybeAssign(),this.expect(types$1.parenR),node.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(node,isForIn?"ForInStatement":"ForOfStatement")},pp$8.parseVar=function(node,isFor,kind,allowMissingInitializer){for(node.declarations=[],node.kind=kind;;){var decl=this.startNode();if(this.parseVarId(decl,kind),this.eat(types$1.eq)?decl.init=this.parseMaybeAssign(isFor):!allowMissingInitializer&&kind==="const"&&!(this.type===types$1._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!allowMissingInitializer&&(kind==="using"||kind==="await using")&&this.options.ecmaVersion>=17&&this.type!==types$1._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+kind+" declaration"):!allowMissingInitializer&&decl.id.type!=="Identifier"&&!(isFor&&(this.type===types$1._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):decl.init=null,node.declarations.push(this.finishNode(decl,"VariableDeclarator")),!this.eat(types$1.comma))break}return node},pp$8.parseVarId=function(decl,kind){decl.id=kind==="using"||kind==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(decl.id,kind==="var"?BIND_VAR:BIND_LEXICAL,!1)};var FUNC_STATEMENT=1,FUNC_HANGING_STATEMENT=2,FUNC_NULLABLE_ID=4;pp$8.parseFunction=function(node,statement,allowExpressionBody,isAsync,forInit){this.initFunction(node),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!isAsync)&&(this.type===types$1.star&&statement&FUNC_HANGING_STATEMENT&&this.unexpected(),node.generator=this.eat(types$1.star)),this.options.ecmaVersion>=8&&(node.async=!!isAsync),statement&FUNC_STATEMENT&&(node.id=statement&FUNC_NULLABLE_ID&&this.type!==types$1.name?null:this.parseIdent(),node.id&&!(statement&FUNC_HANGING_STATEMENT)&&this.checkLValSimple(node.id,this.strict||node.generator||node.async?this.treatFunctionsAsVar?BIND_VAR:BIND_LEXICAL:BIND_FUNCTION));var oldYieldPos=this.yieldPos,oldAwaitPos=this.awaitPos,oldAwaitIdentPos=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(functionFlags(node.async,node.generator)),statement&FUNC_STATEMENT||(node.id=this.type===types$1.name?this.parseIdent():null),this.parseFunctionParams(node),this.parseFunctionBody(node,allowExpressionBody,!1,forInit),this.yieldPos=oldYieldPos,this.awaitPos=oldAwaitPos,this.awaitIdentPos=oldAwaitIdentPos,this.finishNode(node,statement&FUNC_STATEMENT?"FunctionDeclaration":"FunctionExpression")},pp$8.parseFunctionParams=function(node){this.expect(types$1.parenL),node.params=this.parseBindingList(types$1.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},pp$8.parseClass=function(node,isStatement){this.next();var oldStrict=this.strict;this.strict=!0,this.parseClassId(node,isStatement),this.parseClassSuper(node);var privateNameMap=this.enterClassBody(),classBody=this.startNode(),hadConstructor=!1;for(classBody.body=[],this.expect(types$1.braceL);this.type!==types$1.braceR;){var element=this.parseClassElement(node.superClass!==null);element&&(classBody.body.push(element),element.type==="MethodDefinition"&&element.kind==="constructor"?(hadConstructor&&this.raiseRecoverable(element.start,"Duplicate constructor in the same class"),hadConstructor=!0):element.key&&element.key.type==="PrivateIdentifier"&&isPrivateNameConflicted(privateNameMap,element)&&this.raiseRecoverable(element.key.start,"Identifier '#"+element.key.name+"' has already been declared"))}return this.strict=oldStrict,this.next(),node.body=this.finishNode(classBody,"ClassBody"),this.exitClassBody(),this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")},pp$8.parseClassElement=function(constructorAllowsSuper){if(this.eat(types$1.semi))return null;var ecmaVersion2=this.options.ecmaVersion,node=this.startNode(),keyName="",isGenerator=!1,isAsync=!1,kind="method",isStatic=!1;if(this.eatContextual("static")){if(ecmaVersion2>=13&&this.eat(types$1.braceL))return this.parseClassStaticBlock(node),node;this.isClassElementNameStart()||this.type===types$1.star?isStatic=!0:keyName="static"}if(node.static=isStatic,!keyName&&ecmaVersion2>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===types$1.star)&&!this.canInsertSemicolon()?isAsync=!0:keyName="async"),!keyName&&(ecmaVersion2>=9||!isAsync)&&this.eat(types$1.star)&&(isGenerator=!0),!keyName&&!isAsync&&!isGenerator){var lastValue=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?kind=lastValue:keyName=lastValue)}if(keyName?(node.computed=!1,node.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),node.key.name=keyName,this.finishNode(node.key,"Identifier")):this.parseClassElementName(node),ecmaVersion2<13||this.type===types$1.parenL||kind!=="method"||isGenerator||isAsync){var isConstructor=!node.static&&checkKeyName(node,"constructor"),allowsDirectSuper=isConstructor&&constructorAllowsSuper;isConstructor&&kind!=="method"&&this.raise(node.key.start,"Constructor can't have get/set modifier"),node.kind=isConstructor?"constructor":kind,this.parseClassMethod(node,isGenerator,isAsync,allowsDirectSuper)}else this.parseClassField(node);return node},pp$8.isClassElementNameStart=function(){return this.type===types$1.name||this.type===types$1.privateId||this.type===types$1.num||this.type===types$1.string||this.type===types$1.bracketL||this.type.keyword},pp$8.parseClassElementName=function(element){this.type===types$1.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),element.computed=!1,element.key=this.parsePrivateIdent()):this.parsePropertyName(element)},pp$8.parseClassMethod=function(method,isGenerator,isAsync,allowsDirectSuper){var key=method.key;method.kind==="constructor"?(isGenerator&&this.raise(key.start,"Constructor can't be a generator"),isAsync&&this.raise(key.start,"Constructor can't be an async method")):method.static&&checkKeyName(method,"prototype")&&this.raise(key.start,"Classes may not have a static property named prototype");var value=method.value=this.parseMethod(isGenerator,isAsync,allowsDirectSuper);return method.kind==="get"&&value.params.length!==0&&this.raiseRecoverable(value.start,"getter should have no params"),method.kind==="set"&&value.params.length!==1&&this.raiseRecoverable(value.start,"setter should have exactly one param"),method.kind==="set"&&value.params[0].type==="RestElement"&&this.raiseRecoverable(value.params[0].start,"Setter cannot use rest params"),this.finishNode(method,"MethodDefinition")},pp$8.parseClassField=function(field){return checkKeyName(field,"constructor")?this.raise(field.key.start,"Classes can't have a field named 'constructor'"):field.static&&checkKeyName(field,"prototype")&&this.raise(field.key.start,"Classes can't have a static field named 'prototype'"),this.eat(types$1.eq)?(this.enterScope(SCOPE_CLASS_FIELD_INIT|SCOPE_SUPER),field.value=this.parseMaybeAssign(),this.exitScope()):field.value=null,this.semicolon(),this.finishNode(field,"PropertyDefinition")},pp$8.parseClassStaticBlock=function(node){node.body=[];var oldLabels=this.labels;for(this.labels=[],this.enterScope(SCOPE_CLASS_STATIC_BLOCK|SCOPE_SUPER);this.type!==types$1.braceR;){var stmt=this.parseStatement(null);node.body.push(stmt)}return this.next(),this.exitScope(),this.labels=oldLabels,this.finishNode(node,"StaticBlock")},pp$8.parseClassId=function(node,isStatement){this.type===types$1.name?(node.id=this.parseIdent(),isStatement&&this.checkLValSimple(node.id,BIND_LEXICAL,!1)):(isStatement===!0&&this.unexpected(),node.id=null)},pp$8.parseClassSuper=function(node){node.superClass=this.eat(types$1._extends)?this.parseExprSubscripts(null,!1):null},pp$8.enterClassBody=function(){var element={declared:Object.create(null),used:[]};return this.privateNameStack.push(element),element.declared},pp$8.exitClassBody=function(){var ref2=this.privateNameStack.pop(),declared=ref2.declared,used=ref2.used;if(this.options.checkPrivateFields)for(var len=this.privateNameStack.length,parent=len===0?null:this.privateNameStack[len-1],i2=0;i2<used.length;++i2){var id=used[i2];hasOwn(declared,id.name)||(parent?parent.used.push(id):this.raiseRecoverable(id.start,"Private field '#"+id.name+"' must be declared in an enclosing class"))}};function isPrivateNameConflicted(privateNameMap,element){var name=element.key.name,curr=privateNameMap[name],next="true";return element.type==="MethodDefinition"&&(element.kind==="get"||element.kind==="set")&&(next=(element.static?"s":"i")+element.kind),curr==="iget"&&next==="iset"||curr==="iset"&&next==="iget"||curr==="sget"&&next==="sset"||curr==="sset"&&next==="sget"?(privateNameMap[name]="true",!1):curr?!0:(privateNameMap[name]=next,!1)}function checkKeyName(node,name){var computed=node.computed,key=node.key;return!computed&&(key.type==="Identifier"&&key.name===name||key.type==="Literal"&&key.value===name)}pp$8.parseExportAllDeclaration=function(node,exports3){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(node.exported=this.parseModuleExportName(),this.checkExport(exports3,node.exported,this.lastTokStart)):node.exported=null),this.expectContextual("from"),this.type!==types$1.string&&this.unexpected(),node.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(node.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(node,"ExportAllDeclaration")},pp$8.parseExport=function(node,exports3){if(this.next(),this.eat(types$1.star))return this.parseExportAllDeclaration(node,exports3);if(this.eat(types$1._default))return this.checkExport(exports3,"default",this.lastTokStart),node.declaration=this.parseExportDefaultDeclaration(),this.finishNode(node,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())node.declaration=this.parseExportDeclaration(node),node.declaration.type==="VariableDeclaration"?this.checkVariableExport(exports3,node.declaration.declarations):this.checkExport(exports3,node.declaration.id,node.declaration.id.start),node.specifiers=[],node.source=null,this.options.ecmaVersion>=16&&(node.attributes=[]);else{if(node.declaration=null,node.specifiers=this.parseExportSpecifiers(exports3),this.eatContextual("from"))this.type!==types$1.string&&this.unexpected(),node.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(node.attributes=this.parseWithClause());else{for(var i2=0,list2=node.specifiers;i2<list2.length;i2+=1){var spec=list2[i2];this.checkUnreserved(spec.local),this.checkLocalExport(spec.local),spec.local.type==="Literal"&&this.raise(spec.local.start,"A string literal cannot be used as an exported binding without `from`.")}node.source=null,this.options.ecmaVersion>=16&&(node.attributes=[])}this.semicolon()}return this.finishNode(node,"ExportNamedDeclaration")},pp$8.parseExportDeclaration=function(node){return this.parseStatement(null)},pp$8.parseExportDefaultDeclaration=function(){var isAsync;if(this.type===types$1._function||(isAsync=this.isAsyncFunction())){var fNode=this.startNode();return this.next(),isAsync&&this.next(),this.parseFunction(fNode,FUNC_STATEMENT|FUNC_NULLABLE_ID,!1,isAsync)}else if(this.type===types$1._class){var cNode=this.startNode();return this.parseClass(cNode,"nullableID")}else{var declaration=this.parseMaybeAssign();return this.semicolon(),declaration}},pp$8.checkExport=function(exports3,name,pos){exports3&&(typeof name!="string"&&(name=name.type==="Identifier"?name.name:name.value),hasOwn(exports3,name)&&this.raiseRecoverable(pos,"Duplicate export '"+name+"'"),exports3[name]=!0)},pp$8.checkPatternExport=function(exports3,pat){var type=pat.type;if(type==="Identifier")this.checkExport(exports3,pat,pat.start);else if(type==="ObjectPattern")for(var i2=0,list2=pat.properties;i2<list2.length;i2+=1){var prop=list2[i2];this.checkPatternExport(exports3,prop)}else if(type==="ArrayPattern")for(var i$1=0,list$1=pat.elements;i$1<list$1.length;i$1+=1){var elt=list$1[i$1];elt&&this.checkPatternExport(exports3,elt)}else type==="Property"?this.checkPatternExport(exports3,pat.value):type==="AssignmentPattern"?this.checkPatternExport(exports3,pat.left):type==="RestElement"&&this.checkPatternExport(exports3,pat.argument)},pp$8.checkVariableExport=function(exports3,decls){if(exports3)for(var i2=0,list2=decls;i2<list2.length;i2+=1){var decl=list2[i2];this.checkPatternExport(exports3,decl.id)}},pp$8.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},pp$8.parseExportSpecifier=function(exports3){var node=this.startNode();return node.local=this.parseModuleExportName(),node.exported=this.eatContextual("as")?this.parseModuleExportName():node.local,this.checkExport(exports3,node.exported,node.exported.start),this.finishNode(node,"ExportSpecifier")},pp$8.parseExportSpecifiers=function(exports3){var nodes=[],first=!0;for(this.expect(types$1.braceL);!this.eat(types$1.braceR);){if(first)first=!1;else if(this.expect(types$1.comma),this.afterTrailingComma(types$1.braceR))break;nodes.push(this.parseExportSpecifier(exports3))}return nodes},pp$8.parseImport=function(node){return this.next(),this.type===types$1.string?(node.specifiers=empty$1,node.source=this.parseExprAtom()):(node.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),node.source=this.type===types$1.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(node.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(node,"ImportDeclaration")},pp$8.parseImportSpecifier=function(){var node=this.startNode();return node.imported=this.parseModuleExportName(),this.eatContextual("as")?node.local=this.parseIdent():(this.checkUnreserved(node.imported),node.local=node.imported),this.checkLValSimple(node.local,BIND_LEXICAL),this.finishNode(node,"ImportSpecifier")},pp$8.parseImportDefaultSpecifier=function(){var node=this.startNode();return node.local=this.parseIdent(),this.checkLValSimple(node.local,BIND_LEXICAL),this.finishNode(node,"ImportDefaultSpecifier")},pp$8.parseImportNamespaceSpecifier=function(){var node=this.startNode();return this.next(),this.expectContextual("as"),node.local=this.parseIdent(),this.checkLValSimple(node.local,BIND_LEXICAL),this.finishNode(node,"ImportNamespaceSpecifier")},pp$8.parseImportSpecifiers=function(){var nodes=[],first=!0;if(this.type===types$1.name&&(nodes.push(this.parseImportDefaultSpecifier()),!this.eat(types$1.comma)))return nodes;if(this.type===types$1.star)return nodes.push(this.parseImportNamespaceSpecifier()),nodes;for(this.expect(types$1.braceL);!this.eat(types$1.braceR);){if(first)first=!1;else if(this.expect(types$1.comma),this.afterTrailingComma(types$1.braceR))break;nodes.push(this.parseImportSpecifier())}return nodes},pp$8.parseWithClause=function(){var nodes=[];if(!this.eat(types$1._with))return nodes;this.expect(types$1.braceL);for(var attributeKeys={},first=!0;!this.eat(types$1.braceR);){if(first)first=!1;else if(this.expect(types$1.comma),this.afterTrailingComma(types$1.braceR))break;var attr=this.parseImportAttribute(),keyName=attr.key.type==="Identifier"?attr.key.name:attr.key.value;hasOwn(attributeKeys,keyName)&&this.raiseRecoverable(attr.key.start,"Duplicate attribute key '"+keyName+"'"),attributeKeys[keyName]=!0,nodes.push(attr)}return nodes},pp$8.parseImportAttribute=function(){var node=this.startNode();return node.key=this.type===types$1.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(types$1.colon),this.type!==types$1.string&&this.unexpected(),node.value=this.parseExprAtom(),this.finishNode(node,"ImportAttribute")},pp$8.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===types$1.string){var stringLiteral=this.parseLiteral(this.value);return loneSurrogate.test(stringLiteral.value)&&this.raise(stringLiteral.start,"An export name cannot include a lone surrogate."),stringLiteral}return this.parseIdent(!0)},pp$8.adaptDirectivePrologue=function(statements){for(var i2=0;i2<statements.length&&this.isDirectiveCandidate(statements[i2]);++i2)statements[i2].directive=statements[i2].expression.raw.slice(1,-1)},pp$8.isDirectiveCandidate=function(statement){return this.options.ecmaVersion>=5&&statement.type==="ExpressionStatement"&&statement.expression.type==="Literal"&&typeof statement.expression.value=="string"&&(this.input[statement.start]==='"'||this.input[statement.start]==="'")};var pp$7=Parser.prototype;pp$7.toAssignable=function(node,isBinding,refDestructuringErrors){if(this.options.ecmaVersion>=6&&node)switch(node.type){case"Identifier":this.inAsync&&node.name==="await"&&this.raise(node.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":node.type="ObjectPattern",refDestructuringErrors&&this.checkPatternErrors(refDestructuringErrors,!0);for(var i2=0,list2=node.properties;i2<list2.length;i2+=1){var prop=list2[i2];this.toAssignable(prop,isBinding),prop.type==="RestElement"&&(prop.argument.type==="ArrayPattern"||prop.argument.type==="ObjectPattern")&&this.raise(prop.argument.start,"Unexpected token")}break;case"Property":node.kind!=="init"&&this.raise(node.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(node.value,isBinding);break;case"ArrayExpression":node.type="ArrayPattern",refDestructuringErrors&&this.checkPatternErrors(refDestructuringErrors,!0),this.toAssignableList(node.elements,isBinding);break;case"SpreadElement":node.type="RestElement",this.toAssignable(node.argument,isBinding),node.argument.type==="AssignmentPattern"&&this.raise(node.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":node.operator!=="="&&this.raise(node.left.end,"Only '=' operator can be used for specifying default value."),node.type="AssignmentPattern",delete node.operator,this.toAssignable(node.left,isBinding);break;case"ParenthesizedExpression":this.toAssignable(node.expression,isBinding,refDestructuringErrors);break;case"ChainExpression":this.raiseRecoverable(node.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!isBinding)break;default:this.raise(node.start,"Assigning to rvalue")}else refDestructuringErrors&&this.checkPatternErrors(refDestructuringErrors,!0);return node},pp$7.toAssignableList=function(exprList,isBinding){for(var end=exprList.length,i2=0;i2<end;i2++){var elt=exprList[i2];elt&&this.toAssignable(elt,isBinding)}if(end){var last=exprList[end-1];this.options.ecmaVersion===6&&isBinding&&last&&last.type==="RestElement"&&last.argument.type!=="Identifier"&&this.unexpected(last.argument.start)}return exprList},pp$7.parseSpread=function(refDestructuringErrors){var node=this.startNode();return this.next(),node.argument=this.parseMaybeAssign(!1,refDestructuringErrors),this.finishNode(node,"SpreadElement")},pp$7.parseRestBinding=function(){var node=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==types$1.name&&this.unexpected(),node.argument=this.parseBindingAtom(),this.finishNode(node,"RestElement")},pp$7.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case types$1.bracketL:var node=this.startNode();return this.next(),node.elements=this.parseBindingList(types$1.bracketR,!0,!0),this.finishNode(node,"ArrayPattern");case types$1.braceL:return this.parseObj(!0)}return this.parseIdent()},pp$7.parseBindingList=function(close,allowEmpty,allowTrailingComma,allowModifiers){for(var elts=[],first=!0;!this.eat(close);)if(first?first=!1:this.expect(types$1.comma),allowEmpty&&this.type===types$1.comma)elts.push(null);else{if(allowTrailingComma&&this.afterTrailingComma(close))break;if(this.type===types$1.ellipsis){var rest=this.parseRestBinding();this.parseBindingListItem(rest),elts.push(rest),this.type===types$1.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(close);break}else elts.push(this.parseAssignableListItem(allowModifiers))}return elts},pp$7.parseAssignableListItem=function(allowModifiers){var elem=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(elem),elem},pp$7.parseBindingListItem=function(param){return param},pp$7.parseMaybeDefault=function(startPos,startLoc,left){if(left=left||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(types$1.eq))return left;var node=this.startNodeAt(startPos,startLoc);return node.left=left,node.right=this.parseMaybeAssign(),this.finishNode(node,"AssignmentPattern")},pp$7.checkLValSimple=function(expr,bindingType,checkClashes){bindingType===void 0&&(bindingType=BIND_NONE);var isBind=bindingType!==BIND_NONE;switch(expr.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(expr.name)&&this.raiseRecoverable(expr.start,(isBind?"Binding ":"Assigning to ")+expr.name+" in strict mode"),isBind&&(bindingType===BIND_LEXICAL&&expr.name==="let"&&this.raiseRecoverable(expr.start,"let is disallowed as a lexically bound name"),checkClashes&&(hasOwn(checkClashes,expr.name)&&this.raiseRecoverable(expr.start,"Argument name clash"),checkClashes[expr.name]=!0),bindingType!==BIND_OUTSIDE&&this.declareName(expr.name,bindingType,expr.start));break;case"ChainExpression":this.raiseRecoverable(expr.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":isBind&&this.raiseRecoverable(expr.start,"Binding member expression");break;case"ParenthesizedExpression":return isBind&&this.raiseRecoverable(expr.start,"Binding parenthesized expression"),this.checkLValSimple(expr.expression,bindingType,checkClashes);default:this.raise(expr.start,(isBind?"Binding":"Assigning to")+" rvalue")}},pp$7.checkLValPattern=function(expr,bindingType,checkClashes){switch(bindingType===void 0&&(bindingType=BIND_NONE),expr.type){case"ObjectPattern":for(var i2=0,list2=expr.properties;i2<list2.length;i2+=1){var prop=list2[i2];this.checkLValInnerPattern(prop,bindingType,checkClashes)}break;case"ArrayPattern":for(var i$1=0,list$1=expr.elements;i$1<list$1.length;i$1+=1){var elem=list$1[i$1];elem&&this.checkLValInnerPattern(elem,bindingType,checkClashes)}break;default:this.checkLValSimple(expr,bindingType,checkClashes)}},pp$7.checkLValInnerPattern=function(expr,bindingType,checkClashes){switch(bindingType===void 0&&(bindingType=BIND_NONE),expr.type){case"Property":this.checkLValInnerPattern(expr.value,bindingType,checkClashes);break;case"AssignmentPattern":this.checkLValPattern(expr.left,bindingType,checkClashes);break;case"RestElement":this.checkLValPattern(expr.argument,bindingType,checkClashes);break;default:this.checkLValPattern(expr,bindingType,checkClashes)}};var TokContext=function(token,isExpr,preserveSpace,override,generator){this.token=token,this.isExpr=!!isExpr,this.preserveSpace=!!preserveSpace,this.override=override,this.generator=!!generator},types={b_stat:new TokContext("{",!1),b_expr:new TokContext("{",!0),b_tmpl:new TokContext("${",!1),p_stat:new TokContext("(",!1),p_expr:new TokContext("(",!0),q_tmpl:new TokContext("`",!0,!0,function(p){return p.tryReadTemplateToken()}),f_stat:new TokContext("function",!1),f_expr:new TokContext("function",!0),f_expr_gen:new TokContext("function",!0,!1,null,!0),f_gen:new TokContext("function",!1,!1,null,!0)},pp$6=Parser.prototype;pp$6.initialContext=function(){return[types.b_stat]},pp$6.curContext=function(){return this.context[this.context.length-1]},pp$6.braceIsBlock=function(prevType){var parent=this.curContext();return parent===types.f_expr||parent===types.f_stat?!0:prevType===types$1.colon&&(parent===types.b_stat||parent===types.b_expr)?!parent.isExpr:prevType===types$1._return||prevType===types$1.name&&this.exprAllowed?lineBreak.test(this.input.slice(this.lastTokEnd,this.start)):prevType===types$1._else||prevType===types$1.semi||prevType===types$1.eof||prevType===types$1.parenR||prevType===types$1.arrow?!0:prevType===types$1.braceL?parent===types.b_stat:prevType===types$1._var||prevType===types$1._const||prevType===types$1.name?!1:!this.exprAllowed},pp$6.inGeneratorContext=function(){for(var i2=this.context.length-1;i2>=1;i2--){var context=this.context[i2];if(context.token==="function")return context.generator}return!1},pp$6.updateContext=function(prevType){var update,type=this.type;type.keyword&&prevType===types$1.dot?this.exprAllowed=!1:(update=type.updateContext)?update.call(this,prevType):this.exprAllowed=type.beforeExpr},pp$6.overrideContext=function(tokenCtx){this.curContext()!==tokenCtx&&(this.context[this.context.length-1]=tokenCtx)},types$1.parenR.updateContext=types$1.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var out=this.context.pop();out===types.b_stat&&this.curContext().token==="function"&&(out=this.context.pop()),this.exprAllowed=!out.isExpr},types$1.braceL.updateContext=function(prevType){this.context.push(this.braceIsBlock(prevType)?types.b_stat:types.b_expr),this.exprAllowed=!0},types$1.dollarBraceL.updateContext=function(){this.context.push(types.b_tmpl),this.exprAllowed=!0},types$1.parenL.updateContext=function(prevType){var statementParens=prevType===types$1._if||prevType===types$1._for||prevType===types$1._with||prevType===types$1._while;this.context.push(statementParens?types.p_stat:types.p_expr),this.exprAllowed=!0},types$1.incDec.updateContext=function(){},types$1._function.updateContext=types$1._class.updateContext=function(prevType){prevType.beforeExpr&&prevType!==types$1._else&&!(prevType===types$1.semi&&this.curContext()!==types.p_stat)&&!(prevType===types$1._return&&lineBreak.test(this.input.slice(this.lastTokEnd,this.start)))&&!((prevType===types$1.colon||prevType===types$1.braceL)&&this.curContext()===types.b_stat)?this.context.push(types.f_expr):this.context.push(types.f_stat),this.exprAllowed=!1},types$1.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},types$1.backQuote.updateContext=function(){this.curContext()===types.q_tmpl?this.context.pop():this.context.push(types.q_tmpl),this.exprAllowed=!1},types$1.star.updateContext=function(prevType){if(prevType===types$1._function){var index=this.context.length-1;this.context[index]===types.f_expr?this.context[index]=types.f_expr_gen:this.context[index]=types.f_gen}this.exprAllowed=!0},types$1.name.updateContext=function(prevType){var allowed=!1;this.options.ecmaVersion>=6&&prevType!==types$1.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(allowed=!0),this.exprAllowed=allowed};var pp$5=Parser.prototype;pp$5.checkPropClash=function(prop,propHash,refDestructuringErrors){if(!(this.options.ecmaVersion>=9&&prop.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(prop.computed||prop.method||prop.shorthand))){var key=prop.key,name;switch(key.type){case"Identifier":name=key.name;break;case"Literal":name=String(key.value);break;default:return}var kind=prop.kind;if(this.options.ecmaVersion>=6){name==="__proto__"&&kind==="init"&&(propHash.proto&&(refDestructuringErrors?refDestructuringErrors.doubleProto<0&&(refDestructuringErrors.doubleProto=key.start):this.raiseRecoverable(key.start,"Redefinition of __proto__ property")),propHash.proto=!0);return}name="$"+name;var other=propHash[name];if(other){var redefinition;kind==="init"?redefinition=this.strict&&other.init||other.get||other.set:redefinition=other.init||other[kind],redefinition&&this.raiseRecoverable(key.start,"Redefinition of property")}else other=propHash[name]={init:!1,get:!1,set:!1};other[kind]=!0}},pp$5.parseExpression=function(forInit,refDestructuringErrors){var startPos=this.start,startLoc=this.startLoc,expr=this.parseMaybeAssign(forInit,refDestructuringErrors);if(this.type===types$1.comma){var node=this.startNodeAt(startPos,startLoc);for(node.expressions=[expr];this.eat(types$1.comma);)node.expressions.push(this.parseMaybeAssign(forInit,refDestructuringErrors));return this.finishNode(node,"SequenceExpression")}return expr},pp$5.parseMaybeAssign=function(forInit,refDestructuringErrors,afterLeftParse){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(forInit);this.exprAllowed=!1}var ownDestructuringErrors=!1,oldParenAssign=-1,oldTrailingComma=-1,oldDoubleProto=-1;refDestructuringErrors?(oldParenAssign=refDestructuringErrors.parenthesizedAssign,oldTrailingComma=refDestructuringErrors.trailingComma,oldDoubleProto=refDestructuringErrors.doubleProto,refDestructuringErrors.parenthesizedAssign=refDestructuringErrors.trailingComma=-1):(refDestructuringErrors=new DestructuringErrors,ownDestructuringErrors=!0);var startPos=this.start,startLoc=this.startLoc;(this.type===types$1.parenL||this.type===types$1.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=forInit==="await");var left=this.parseMaybeConditional(forInit,refDestructuringErrors);if(afterLeftParse&&(left=afterLeftParse.call(this,left,startPos,startLoc)),this.type.isAssign){var node=this.startNodeAt(startPos,startLoc);return node.operator=this.value,this.type===types$1.eq&&(left=this.toAssignable(left,!1,refDestructuringErrors)),ownDestructuringErrors||(refDestructuringErrors.parenthesizedAssign=refDestructuringErrors.trailingComma=refDestructuringErrors.doubleProto=-1),refDestructuringErrors.shorthandAssign>=left.start&&(refDestructuringErrors.shorthandAssign=-1),this.type===types$1.eq?this.checkLValPattern(left):this.checkLValSimple(left),node.left=left,this.next(),node.right=this.parseMaybeAssign(forInit),oldDoubleProto>-1&&(refDestructuringErrors.doubleProto=oldDoubleProto),this.finishNode(node,"AssignmentExpression")}else ownDestructuringErrors&&this.checkExpressionErrors(refDestructuringErrors,!0);return oldParenAssign>-1&&(refDestructuringErrors.parenthesizedAssign=oldParenAssign),oldTrailingComma>-1&&(refDestructuringErrors.trailingComma=oldTrailingComma),left},pp$5.parseMaybeConditional=function(forInit,refDestructuringErrors){var startPos=this.start,startLoc=this.startLoc,expr=this.parseExprOps(forInit,refDestructuringErrors);if(this.checkExpressionErrors(refDestructuringErrors))return expr;if(this.eat(types$1.question)){var node=this.startNodeAt(startPos,startLoc);return node.test=expr,node.consequent=this.parseMaybeAssign(),this.expect(types$1.colon),node.alternate=this.parseMaybeAssign(forInit),this.finishNode(node,"ConditionalExpression")}return expr},pp$5.parseExprOps=function(forInit,refDestructuringErrors){var startPos=this.start,startLoc=this.startLoc,expr=this.parseMaybeUnary(refDestructuringErrors,!1,!1,forInit);return this.checkExpressionErrors(refDestructuringErrors)||expr.start===startPos&&expr.type==="ArrowFunctionExpression"?expr:this.parseExprOp(expr,startPos,startLoc,-1,forInit)},pp$5.parseExprOp=function(left,leftStartPos,leftStartLoc,minPrec,forInit){var prec=this.type.binop;if(prec!=null&&(!forInit||this.type!==types$1._in)&&prec>minPrec){var logical=this.type===types$1.logicalOR||this.type===types$1.logicalAND,coalesce=this.type===types$1.coalesce;coalesce&&(prec=types$1.logicalAND.binop);var op=this.value;this.next();var startPos=this.start,startLoc=this.startLoc,right=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,forInit),startPos,startLoc,prec,forInit),node=this.buildBinary(leftStartPos,leftStartLoc,left,right,op,logical||coalesce);return(logical&&this.type===types$1.coalesce||coalesce&&(this.type===types$1.logicalOR||this.type===types$1.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(node,leftStartPos,leftStartLoc,minPrec,forInit)}return left},pp$5.buildBinary=function(startPos,startLoc,left,right,op,logical){right.type==="PrivateIdentifier"&&this.raise(right.start,"Private identifier can only be left side of binary expression");var node=this.startNodeAt(startPos,startLoc);return node.left=left,node.operator=op,node.right=right,this.finishNode(node,logical?"LogicalExpression":"BinaryExpression")},pp$5.parseMaybeUnary=function(refDestructuringErrors,sawUnary,incDec,forInit){var startPos=this.start,startLoc=this.startLoc,expr;if(this.isContextual("await")&&this.canAwait)expr=this.parseAwait(forInit),sawUnary=!0;else if(this.type.prefix){var node=this.startNode(),update=this.type===types$1.incDec;node.operator=this.value,node.prefix=!0,this.next(),node.argument=this.parseMaybeUnary(null,!0,update,forInit),this.checkExpressionErrors(refDestructuringErrors,!0),update?this.checkLValSimple(node.argument):this.strict&&node.operator==="delete"&&isLocalVariableAccess(node.argument)?this.raiseRecoverable(node.start,"Deleting local variable in strict mode"):node.operator==="delete"&&isPrivateFieldAccess(node.argument)?this.raiseRecoverable(node.start,"Private fields can not be deleted"):sawUnary=!0,expr=this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}else if(!sawUnary&&this.type===types$1.privateId)(forInit||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),expr=this.parsePrivateIdent(),this.type!==types$1._in&&this.unexpected();else{if(expr=this.parseExprSubscripts(refDestructuringErrors,forInit),this.checkExpressionErrors(refDestructuringErrors))return expr;for(;this.type.postfix&&!this.canInsertSemicolon();){var node$1=this.startNodeAt(startPos,startLoc);node$1.operator=this.value,node$1.prefix=!1,node$1.argument=expr,this.checkLValSimple(expr),this.next(),expr=this.finishNode(node$1,"UpdateExpression")}}if(!incDec&&this.eat(types$1.starstar))if(sawUnary)this.unexpected(this.lastTokStart);else return this.buildBinary(startPos,startLoc,expr,this.parseMaybeUnary(null,!1,!1,forInit),"**",!1);else return expr};function isLocalVariableAccess(node){return node.type==="Identifier"||node.type==="ParenthesizedExpression"&&isLocalVariableAccess(node.expression)}function isPrivateFieldAccess(node){return node.type==="MemberExpression"&&node.property.type==="PrivateIdentifier"||node.type==="ChainExpression"&&isPrivateFieldAccess(node.expression)||node.type==="ParenthesizedExpression"&&isPrivateFieldAccess(node.expression)}pp$5.parseExprSubscripts=function(refDestructuringErrors,forInit){var startPos=this.start,startLoc=this.startLoc,expr=this.parseExprAtom(refDestructuringErrors,forInit);if(expr.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return expr;var result=this.parseSubscripts(expr,startPos,startLoc,!1,forInit);return refDestructuringErrors&&result.type==="MemberExpression"&&(refDestructuringErrors.parenthesizedAssign>=result.start&&(refDestructuringErrors.parenthesizedAssign=-1),refDestructuringErrors.parenthesizedBind>=result.start&&(refDestructuringErrors.parenthesizedBind=-1),refDestructuringErrors.trailingComma>=result.start&&(refDestructuringErrors.trailingComma=-1)),result},pp$5.parseSubscripts=function(base2,startPos,startLoc,noCalls,forInit){for(var maybeAsyncArrow=this.options.ecmaVersion>=8&&base2.type==="Identifier"&&base2.name==="async"&&this.lastTokEnd===base2.end&&!this.canInsertSemicolon()&&base2.end-base2.start===5&&this.potentialArrowAt===base2.start,optionalChained=!1;;){var element=this.parseSubscript(base2,startPos,startLoc,noCalls,maybeAsyncArrow,optionalChained,forInit);if(element.optional&&(optionalChained=!0),element===base2||element.type==="ArrowFunctionExpression"){if(optionalChained){var chainNode=this.startNodeAt(startPos,startLoc);chainNode.expression=element,element=this.finishNode(chainNode,"ChainExpression")}return element}base2=element}},pp$5.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(types$1.arrow)},pp$5.parseSubscriptAsyncArrow=function(startPos,startLoc,exprList,forInit){return this.parseArrowExpression(this.startNodeAt(startPos,startLoc),exprList,!0,forInit)},pp$5.parseSubscript=function(base2,startPos,startLoc,noCalls,maybeAsyncArrow,optionalChained,forInit){var optionalSupported=this.options.ecmaVersion>=11,optional=optionalSupported&&this.eat(types$1.questionDot);noCalls&&optional&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var computed=this.eat(types$1.bracketL);if(computed||optional&&this.type!==types$1.parenL&&this.type!==types$1.backQuote||this.eat(types$1.dot)){var node=this.startNodeAt(startPos,startLoc);node.object=base2,computed?(node.property=this.parseExpression(),this.expect(types$1.bracketR)):this.type===types$1.privateId&&base2.type!=="Super"?node.property=this.parsePrivateIdent():node.property=this.parseIdent(this.options.allowReserved!=="never"),node.computed=!!computed,optionalSupported&&(node.optional=optional),base2=this.finishNode(node,"MemberExpression")}else if(!noCalls&&this.eat(types$1.parenL)){var refDestructuringErrors=new DestructuringErrors,oldYieldPos=this.yieldPos,oldAwaitPos=this.awaitPos,oldAwaitIdentPos=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var exprList=this.parseExprList(types$1.parenR,this.options.ecmaVersion>=8,!1,refDestructuringErrors);if(maybeAsyncArrow&&!optional&&this.shouldParseAsyncArrow())return this.checkPatternErrors(refDestructuringErrors,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=oldYieldPos,this.awaitPos=oldAwaitPos,this.awaitIdentPos=oldAwaitIdentPos,this.parseSubscriptAsyncArrow(startPos,startLoc,exprList,forInit);this.checkExpressionErrors(refDestructuringErrors,!0),this.yieldPos=oldYieldPos||this.yieldPos,this.awaitPos=oldAwaitPos||this.awaitPos,this.awaitIdentPos=oldAwaitIdentPos||this.awaitIdentPos;var node$1=this.startNodeAt(startPos,startLoc);node$1.callee=base2,node$1.arguments=exprList,optionalSupported&&(node$1.optional=optional),base2=this.finishNode(node$1,"CallExpression")}else if(this.type===types$1.backQuote){(optional||optionalChained)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var node$2=this.startNodeAt(startPos,startLoc);node$2.tag=base2,node$2.quasi=this.parseTemplate({isTagged:!0}),base2=this.finishNode(node$2,"TaggedTemplateExpression")}return base2},pp$5.parseExprAtom=function(refDestructuringErrors,forInit,forNew){this.type===types$1.slash&&this.readRegexp();var node,canBeArrow=this.potentialArrowAt===this.start;switch(this.type){case types$1._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),node=this.startNode(),this.next(),this.type===types$1.parenL&&!this.allowDirectSuper&&this.raise(node.start,"super() call outside constructor of a subclass"),this.type!==types$1.dot&&this.type!==types$1.bracketL&&this.type!==types$1.parenL&&this.unexpected(),this.finishNode(node,"Super");case types$1._this:return node=this.startNode(),this.next(),this.finishNode(node,"ThisExpression");case types$1.name:var startPos=this.start,startLoc=this.startLoc,containsEsc=this.containsEsc,id=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!containsEsc&&id.name==="async"&&!this.canInsertSemicolon()&&this.eat(types$1._function))return this.overrideContext(types.f_expr),this.parseFunction(this.startNodeAt(startPos,startLoc),0,!1,!0,forInit);if(canBeArrow&&!this.canInsertSemicolon()){if(this.eat(types$1.arrow))return this.parseArrowExpression(this.startNodeAt(startPos,startLoc),[id],!1,forInit);if(this.options.ecmaVersion>=8&&id.name==="async"&&this.type===types$1.name&&!containsEsc&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return id=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(types$1.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(startPos,startLoc),[id],!0,forInit)}return id;case types$1.regexp:var value=this.value;return node=this.parseLiteral(value.value),node.regex={pattern:value.pattern,flags:value.flags},node;case types$1.num:case types$1.string:return this.parseLiteral(this.value);case types$1._null:case types$1._true:case types$1._false:return node=this.startNode(),node.value=this.type===types$1._null?null:this.type===types$1._true,node.raw=this.type.keyword,this.next(),this.finishNode(node,"Literal");case types$1.parenL:var start=this.start,expr=this.parseParenAndDistinguishExpression(canBeArrow,forInit);return refDestructuringErrors&&(refDestructuringErrors.parenthesizedAssign<0&&!this.isSimpleAssignTarget(expr)&&(refDestructuringErrors.parenthesizedAssign=start),refDestructuringErrors.parenthesizedBind<0&&(refDestructuringErrors.parenthesizedBind=start)),expr;case types$1.bracketL:return node=this.startNode(),this.next(),node.elements=this.parseExprList(types$1.bracketR,!0,!0,refDestructuringErrors),this.finishNode(node,"ArrayExpression");case types$1.braceL:return this.overrideContext(types.b_expr),this.parseObj(!1,refDestructuringErrors);case types$1._function:return node=this.startNode(),this.next(),this.parseFunction(node,0);case types$1._class:return this.parseClass(this.startNode(),!1);case types$1._new:return this.parseNew();case types$1.backQuote:return this.parseTemplate();case types$1._import:return this.options.ecmaVersion>=11?this.parseExprImport(forNew):this.unexpected();default:return this.parseExprAtomDefault()}},pp$5.parseExprAtomDefault=function(){this.unexpected()},pp$5.parseExprImport=function(forNew){var node=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===types$1.parenL&&!forNew)return this.parseDynamicImport(node);if(this.type===types$1.dot){var meta=this.startNodeAt(node.start,node.loc&&node.loc.start);return meta.name="import",node.meta=this.finishNode(meta,"Identifier"),this.parseImportMeta(node)}else this.unexpected()},pp$5.parseDynamicImport=function(node){if(this.next(),node.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(types$1.parenR)?node.options=null:(this.expect(types$1.comma),this.afterTrailingComma(types$1.parenR)?node.options=null:(node.options=this.parseMaybeAssign(),this.eat(types$1.parenR)||(this.expect(types$1.comma),this.afterTrailingComma(types$1.parenR)||this.unexpected())));else if(!this.eat(types$1.parenR)){var errorPos=this.start;this.eat(types$1.comma)&&this.eat(types$1.parenR)?this.raiseRecoverable(errorPos,"Trailing comma is not allowed in import()"):this.unexpected(errorPos)}return this.finishNode(node,"ImportExpression")},pp$5.parseImportMeta=function(node){this.next();var containsEsc=this.containsEsc;return node.property=this.parseIdent(!0),node.property.name!=="meta"&&this.raiseRecoverable(node.property.start,"The only valid meta property for import is 'import.meta'"),containsEsc&&this.raiseRecoverable(node.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(node.start,"Cannot use 'import.meta' outside a module"),this.finishNode(node,"MetaProperty")},pp$5.parseLiteral=function(value){var node=this.startNode();return node.value=value,node.raw=this.input.slice(this.start,this.end),node.raw.charCodeAt(node.raw.length-1)===110&&(node.bigint=node.value!=null?node.value.toString():node.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(node,"Literal")},pp$5.parseParenExpression=function(){this.expect(types$1.parenL);var val=this.parseExpression();return this.expect(types$1.parenR),val},pp$5.shouldParseArrow=function(exprList){return!this.canInsertSemicolon()},pp$5.parseParenAndDistinguishExpression=function(canBeArrow,forInit){var startPos=this.start,startLoc=this.startLoc,val,allowTrailingComma=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var innerStartPos=this.start,innerStartLoc=this.startLoc,exprList=[],first=!0,lastIsComma=!1,refDestructuringErrors=new DestructuringErrors,oldYieldPos=this.yieldPos,oldAwaitPos=this.awaitPos,spreadStart;for(this.yieldPos=0,this.awaitPos=0;this.type!==types$1.parenR;)if(first?first=!1:this.expect(types$1.comma),allowTrailingComma&&this.afterTrailingComma(types$1.parenR,!0)){lastIsComma=!0;break}else if(this.type===types$1.ellipsis){spreadStart=this.start,exprList.push(this.parseParenItem(this.parseRestBinding())),this.type===types$1.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else exprList.push(this.parseMaybeAssign(!1,refDestructuringErrors,this.parseParenItem));var innerEndPos=this.lastTokEnd,innerEndLoc=this.lastTokEndLoc;if(this.expect(types$1.parenR),canBeArrow&&this.shouldParseArrow(exprList)&&this.eat(types$1.arrow))return this.checkPatternErrors(refDestructuringErrors,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=oldYieldPos,this.awaitPos=oldAwaitPos,this.parseParenArrowList(startPos,startLoc,exprList,forInit);(!exprList.length||lastIsComma)&&this.unexpected(this.lastTokStart),spreadStart&&this.unexpected(spreadStart),this.checkExpressionErrors(refDestructuringErrors,!0),this.yieldPos=oldYieldPos||this.yieldPos,this.awaitPos=oldAwaitPos||this.awaitPos,exprList.length>1?(val=this.startNodeAt(innerStartPos,innerStartLoc),val.expressions=exprList,this.finishNodeAt(val,"SequenceExpression",innerEndPos,innerEndLoc)):val=exprList[0]}else val=this.parseParenExpression();if(this.options.preserveParens){var par=this.startNodeAt(startPos,startLoc);return par.expression=val,this.finishNode(par,"ParenthesizedExpression")}else return val},pp$5.parseParenItem=function(item){return item},pp$5.parseParenArrowList=function(startPos,startLoc,exprList,forInit){return this.parseArrowExpression(this.startNodeAt(startPos,startLoc),exprList,!1,forInit)};var empty=[];pp$5.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var node=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===types$1.dot){var meta=this.startNodeAt(node.start,node.loc&&node.loc.start);meta.name="new",node.meta=this.finishNode(meta,"Identifier"),this.next();var containsEsc=this.containsEsc;return node.property=this.parseIdent(!0),node.property.name!=="target"&&this.raiseRecoverable(node.property.start,"The only valid meta property for new is 'new.target'"),containsEsc&&this.raiseRecoverable(node.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(node.start,"'new.target' can only be used in functions and class static block"),this.finishNode(node,"MetaProperty")}var startPos=this.start,startLoc=this.startLoc;return node.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),startPos,startLoc,!0,!1),this.eat(types$1.parenL)?node.arguments=this.parseExprList(types$1.parenR,this.options.ecmaVersion>=8,!1):node.arguments=empty,this.finishNode(node,"NewExpression")},pp$5.parseTemplateElement=function(ref2){var isTagged=ref2.isTagged,elem=this.startNode();return this.type===types$1.invalidTemplate?(isTagged||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),elem.value={raw:this.value.replace(/\r\n?/g,`
|
|
4
|
-
`),cooked:null}):elem.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
5
|
-
`),cooked:this.value},this.next(),elem.tail=this.type===types$1.backQuote,this.finishNode(elem,"TemplateElement")},pp$5.parseTemplate=function(ref2){ref2===void 0&&(ref2={});var isTagged=ref2.isTagged;isTagged===void 0&&(isTagged=!1);var node=this.startNode();this.next(),node.expressions=[];var curElt=this.parseTemplateElement({isTagged});for(node.quasis=[curElt];!curElt.tail;)this.type===types$1.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(types$1.dollarBraceL),node.expressions.push(this.parseExpression()),this.expect(types$1.braceR),node.quasis.push(curElt=this.parseTemplateElement({isTagged}));return this.next(),this.finishNode(node,"TemplateLiteral")},pp$5.isAsyncProp=function(prop){return!prop.computed&&prop.key.type==="Identifier"&&prop.key.name==="async"&&(this.type===types$1.name||this.type===types$1.num||this.type===types$1.string||this.type===types$1.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===types$1.star)&&!lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},pp$5.parseObj=function(isPattern,refDestructuringErrors){var node=this.startNode(),first=!0,propHash={};for(node.properties=[],this.next();!this.eat(types$1.braceR);){if(first)first=!1;else if(this.expect(types$1.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(types$1.braceR))break;var prop=this.parseProperty(isPattern,refDestructuringErrors);isPattern||this.checkPropClash(prop,propHash,refDestructuringErrors),node.properties.push(prop)}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")},pp$5.parseProperty=function(isPattern,refDestructuringErrors){var prop=this.startNode(),isGenerator,isAsync,startPos,startLoc;if(this.options.ecmaVersion>=9&&this.eat(types$1.ellipsis))return isPattern?(prop.argument=this.parseIdent(!1),this.type===types$1.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(prop,"RestElement")):(prop.argument=this.parseMaybeAssign(!1,refDestructuringErrors),this.type===types$1.comma&&refDestructuringErrors&&refDestructuringErrors.trailingComma<0&&(refDestructuringErrors.trailingComma=this.start),this.finishNode(prop,"SpreadElement"));this.options.ecmaVersion>=6&&(prop.method=!1,prop.shorthand=!1,(isPattern||refDestructuringErrors)&&(startPos=this.start,startLoc=this.startLoc),isPattern||(isGenerator=this.eat(types$1.star)));var containsEsc=this.containsEsc;return this.parsePropertyName(prop),!isPattern&&!containsEsc&&this.options.ecmaVersion>=8&&!isGenerator&&this.isAsyncProp(prop)?(isAsync=!0,isGenerator=this.options.ecmaVersion>=9&&this.eat(types$1.star),this.parsePropertyName(prop)):isAsync=!1,this.parsePropertyValue(prop,isPattern,isGenerator,isAsync,startPos,startLoc,refDestructuringErrors,containsEsc),this.finishNode(prop,"Property")},pp$5.parseGetterSetter=function(prop){var kind=prop.key.name;this.parsePropertyName(prop),prop.value=this.parseMethod(!1),prop.kind=kind;var paramCount=prop.kind==="get"?0:1;if(prop.value.params.length!==paramCount){var start=prop.value.start;prop.kind==="get"?this.raiseRecoverable(start,"getter should have no params"):this.raiseRecoverable(start,"setter should have exactly one param")}else prop.kind==="set"&&prop.value.params[0].type==="RestElement"&&this.raiseRecoverable(prop.value.params[0].start,"Setter cannot use rest params")},pp$5.parsePropertyValue=function(prop,isPattern,isGenerator,isAsync,startPos,startLoc,refDestructuringErrors,containsEsc){(isGenerator||isAsync)&&this.type===types$1.colon&&this.unexpected(),this.eat(types$1.colon)?(prop.value=isPattern?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,refDestructuringErrors),prop.kind="init"):this.options.ecmaVersion>=6&&this.type===types$1.parenL?(isPattern&&this.unexpected(),prop.method=!0,prop.value=this.parseMethod(isGenerator,isAsync),prop.kind="init"):!isPattern&&!containsEsc&&this.options.ecmaVersion>=5&&!prop.computed&&prop.key.type==="Identifier"&&(prop.key.name==="get"||prop.key.name==="set")&&this.type!==types$1.comma&&this.type!==types$1.braceR&&this.type!==types$1.eq?((isGenerator||isAsync)&&this.unexpected(),this.parseGetterSetter(prop)):this.options.ecmaVersion>=6&&!prop.computed&&prop.key.type==="Identifier"?((isGenerator||isAsync)&&this.unexpected(),this.checkUnreserved(prop.key),prop.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=startPos),isPattern?prop.value=this.parseMaybeDefault(startPos,startLoc,this.copyNode(prop.key)):this.type===types$1.eq&&refDestructuringErrors?(refDestructuringErrors.shorthandAssign<0&&(refDestructuringErrors.shorthandAssign=this.start),prop.value=this.parseMaybeDefault(startPos,startLoc,this.copyNode(prop.key))):prop.value=this.copyNode(prop.key),prop.kind="init",prop.shorthand=!0):this.unexpected()},pp$5.parsePropertyName=function(prop){if(this.options.ecmaVersion>=6){if(this.eat(types$1.bracketL))return prop.computed=!0,prop.key=this.parseMaybeAssign(),this.expect(types$1.bracketR),prop.key;prop.computed=!1}return prop.key=this.type===types$1.num||this.type===types$1.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},pp$5.initFunction=function(node){node.id=null,this.options.ecmaVersion>=6&&(node.generator=node.expression=!1),this.options.ecmaVersion>=8&&(node.async=!1)},pp$5.parseMethod=function(isGenerator,isAsync,allowDirectSuper){var node=this.startNode(),oldYieldPos=this.yieldPos,oldAwaitPos=this.awaitPos,oldAwaitIdentPos=this.awaitIdentPos;return this.initFunction(node),this.options.ecmaVersion>=6&&(node.generator=isGenerator),this.options.ecmaVersion>=8&&(node.async=!!isAsync),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(functionFlags(isAsync,node.generator)|SCOPE_SUPER|(allowDirectSuper?SCOPE_DIRECT_SUPER:0)),this.expect(types$1.parenL),node.params=this.parseBindingList(types$1.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(node,!1,!0,!1),this.yieldPos=oldYieldPos,this.awaitPos=oldAwaitPos,this.awaitIdentPos=oldAwaitIdentPos,this.finishNode(node,"FunctionExpression")},pp$5.parseArrowExpression=function(node,params,isAsync,forInit){var oldYieldPos=this.yieldPos,oldAwaitPos=this.awaitPos,oldAwaitIdentPos=this.awaitIdentPos;return this.enterScope(functionFlags(isAsync,!1)|SCOPE_ARROW),this.initFunction(node),this.options.ecmaVersion>=8&&(node.async=!!isAsync),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,node.params=this.toAssignableList(params,!0),this.parseFunctionBody(node,!0,!1,forInit),this.yieldPos=oldYieldPos,this.awaitPos=oldAwaitPos,this.awaitIdentPos=oldAwaitIdentPos,this.finishNode(node,"ArrowFunctionExpression")},pp$5.parseFunctionBody=function(node,isArrowFunction,isMethod,forInit){var isExpression=isArrowFunction&&this.type!==types$1.braceL,oldStrict=this.strict,useStrict=!1;if(isExpression)node.body=this.parseMaybeAssign(forInit),node.expression=!0,this.checkParams(node,!1);else{var nonSimple=this.options.ecmaVersion>=7&&!this.isSimpleParamList(node.params);(!oldStrict||nonSimple)&&(useStrict=this.strictDirective(this.end),useStrict&&nonSimple&&this.raiseRecoverable(node.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var oldLabels=this.labels;this.labels=[],useStrict&&(this.strict=!0),this.checkParams(node,!oldStrict&&!useStrict&&!isArrowFunction&&!isMethod&&this.isSimpleParamList(node.params)),this.strict&&node.id&&this.checkLValSimple(node.id,BIND_OUTSIDE),node.body=this.parseBlock(!1,void 0,useStrict&&!oldStrict),node.expression=!1,this.adaptDirectivePrologue(node.body.body),this.labels=oldLabels}this.exitScope()},pp$5.isSimpleParamList=function(params){for(var i2=0,list2=params;i2<list2.length;i2+=1){var param=list2[i2];if(param.type!=="Identifier")return!1}return!0},pp$5.checkParams=function(node,allowDuplicates){for(var nameHash=Object.create(null),i2=0,list2=node.params;i2<list2.length;i2+=1){var param=list2[i2];this.checkLValInnerPattern(param,BIND_VAR,allowDuplicates?null:nameHash)}},pp$5.parseExprList=function(close,allowTrailingComma,allowEmpty,refDestructuringErrors){for(var elts=[],first=!0;!this.eat(close);){if(first)first=!1;else if(this.expect(types$1.comma),allowTrailingComma&&this.afterTrailingComma(close))break;var elt=void 0;allowEmpty&&this.type===types$1.comma?elt=null:this.type===types$1.ellipsis?(elt=this.parseSpread(refDestructuringErrors),refDestructuringErrors&&this.type===types$1.comma&&refDestructuringErrors.trailingComma<0&&(refDestructuringErrors.trailingComma=this.start)):elt=this.parseMaybeAssign(!1,refDestructuringErrors),elts.push(elt)}return elts},pp$5.checkUnreserved=function(ref2){var start=ref2.start,end=ref2.end,name=ref2.name;if(this.inGenerator&&name==="yield"&&this.raiseRecoverable(start,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&name==="await"&&this.raiseRecoverable(start,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&SCOPE_VAR)&&name==="arguments"&&this.raiseRecoverable(start,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(name==="arguments"||name==="await")&&this.raise(start,"Cannot use "+name+" in class static initialization block"),this.keywords.test(name)&&this.raise(start,"Unexpected keyword '"+name+"'"),!(this.options.ecmaVersion<6&&this.input.slice(start,end).indexOf("\\")!==-1)){var re=this.strict?this.reservedWordsStrict:this.reservedWords;re.test(name)&&(!this.inAsync&&name==="await"&&this.raiseRecoverable(start,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(start,"The keyword '"+name+"' is reserved"))}},pp$5.parseIdent=function(liberal){var node=this.parseIdentNode();return this.next(!!liberal),this.finishNode(node,"Identifier"),liberal||(this.checkUnreserved(node),node.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=node.start)),node},pp$5.parseIdentNode=function(){var node=this.startNode();return this.type===types$1.name?node.name=this.value:this.type.keyword?(node.name=this.type.keyword,(node.name==="class"||node.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=types$1.name):this.unexpected(),node},pp$5.parsePrivateIdent=function(){var node=this.startNode();return this.type===types$1.privateId?node.name=this.value:this.unexpected(),this.next(),this.finishNode(node,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(node.start,"Private field '#"+node.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(node)),node},pp$5.parseYield=function(forInit){this.yieldPos||(this.yieldPos=this.start);var node=this.startNode();return this.next(),this.type===types$1.semi||this.canInsertSemicolon()||this.type!==types$1.star&&!this.type.startsExpr?(node.delegate=!1,node.argument=null):(node.delegate=this.eat(types$1.star),node.argument=this.parseMaybeAssign(forInit)),this.finishNode(node,"YieldExpression")},pp$5.parseAwait=function(forInit){this.awaitPos||(this.awaitPos=this.start);var node=this.startNode();return this.next(),node.argument=this.parseMaybeUnary(null,!0,!1,forInit),this.finishNode(node,"AwaitExpression")};var pp$4=Parser.prototype;pp$4.raise=function(pos,message){var loc=getLineInfo(this.input,pos);message+=" ("+loc.line+":"+loc.column+")",this.sourceFile&&(message+=" in "+this.sourceFile);var err=new SyntaxError(message);throw err.pos=pos,err.loc=loc,err.raisedAt=this.pos,err},pp$4.raiseRecoverable=pp$4.raise,pp$4.curPosition=function(){if(this.options.locations)return new Position(this.curLine,this.pos-this.lineStart)};var pp$3=Parser.prototype,Scope=function(flags){this.flags=flags,this.var=[],this.lexical=[],this.functions=[]};pp$3.enterScope=function(flags){this.scopeStack.push(new Scope(flags))},pp$3.exitScope=function(){this.scopeStack.pop()},pp$3.treatFunctionsAsVarInScope=function(scope){return scope.flags&SCOPE_FUNCTION$1||!this.inModule&&scope.flags&SCOPE_TOP},pp$3.declareName=function(name,bindingType,pos){var redeclared=!1;if(bindingType===BIND_LEXICAL){var scope=this.currentScope();redeclared=scope.lexical.indexOf(name)>-1||scope.functions.indexOf(name)>-1||scope.var.indexOf(name)>-1,scope.lexical.push(name),this.inModule&&scope.flags&SCOPE_TOP&&delete this.undefinedExports[name]}else if(bindingType===BIND_SIMPLE_CATCH){var scope$1=this.currentScope();scope$1.lexical.push(name)}else if(bindingType===BIND_FUNCTION){var scope$2=this.currentScope();this.treatFunctionsAsVar?redeclared=scope$2.lexical.indexOf(name)>-1:redeclared=scope$2.lexical.indexOf(name)>-1||scope$2.var.indexOf(name)>-1,scope$2.functions.push(name)}else for(var i2=this.scopeStack.length-1;i2>=0;--i2){var scope$3=this.scopeStack[i2];if(scope$3.lexical.indexOf(name)>-1&&!(scope$3.flags&SCOPE_SIMPLE_CATCH&&scope$3.lexical[0]===name)||!this.treatFunctionsAsVarInScope(scope$3)&&scope$3.functions.indexOf(name)>-1){redeclared=!0;break}if(scope$3.var.push(name),this.inModule&&scope$3.flags&SCOPE_TOP&&delete this.undefinedExports[name],scope$3.flags&SCOPE_VAR)break}redeclared&&this.raiseRecoverable(pos,"Identifier '"+name+"' has already been declared")},pp$3.checkLocalExport=function(id){this.scopeStack[0].lexical.indexOf(id.name)===-1&&this.scopeStack[0].var.indexOf(id.name)===-1&&(this.undefinedExports[id.name]=id)},pp$3.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},pp$3.currentVarScope=function(){for(var i2=this.scopeStack.length-1;;i2--){var scope=this.scopeStack[i2];if(scope.flags&(SCOPE_VAR|SCOPE_CLASS_FIELD_INIT|SCOPE_CLASS_STATIC_BLOCK))return scope}},pp$3.currentThisScope=function(){for(var i2=this.scopeStack.length-1;;i2--){var scope=this.scopeStack[i2];if(scope.flags&(SCOPE_VAR|SCOPE_CLASS_FIELD_INIT|SCOPE_CLASS_STATIC_BLOCK)&&!(scope.flags&SCOPE_ARROW))return scope}};var Node=function(parser,pos,loc){this.type="",this.start=pos,this.end=0,parser.options.locations&&(this.loc=new SourceLocation(parser,loc)),parser.options.directSourceFile&&(this.sourceFile=parser.options.directSourceFile),parser.options.ranges&&(this.range=[pos,0])},pp$2=Parser.prototype;pp$2.startNode=function(){return new Node(this,this.start,this.startLoc)},pp$2.startNodeAt=function(pos,loc){return new Node(this,pos,loc)};function finishNodeAt(node,type,pos,loc){return node.type=type,node.end=pos,this.options.locations&&(node.loc.end=loc),this.options.ranges&&(node.range[1]=pos),node}pp$2.finishNode=function(node,type){return finishNodeAt.call(this,node,type,this.lastTokEnd,this.lastTokEndLoc)},pp$2.finishNodeAt=function(node,type,pos,loc){return finishNodeAt.call(this,node,type,pos,loc)},pp$2.copyNode=function(node){var newNode=new Node(this,node.start,this.startLoc);for(var prop in node)newNode[prop]=node[prop];return newNode};var scriptValuesAddedInUnicode="Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz",ecma9BinaryProperties="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ecma10BinaryProperties=ecma9BinaryProperties+" Extended_Pictographic",ecma11BinaryProperties=ecma10BinaryProperties,ecma12BinaryProperties=ecma11BinaryProperties+" EBase EComp EMod EPres ExtPict",ecma13BinaryProperties=ecma12BinaryProperties,ecma14BinaryProperties=ecma13BinaryProperties,unicodeBinaryProperties={9:ecma9BinaryProperties,10:ecma10BinaryProperties,11:ecma11BinaryProperties,12:ecma12BinaryProperties,13:ecma13BinaryProperties,14:ecma14BinaryProperties},ecma14BinaryPropertiesOfStrings="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",unicodeBinaryPropertiesOfStrings={9:"",10:"",11:"",12:"",13:"",14:ecma14BinaryPropertiesOfStrings},unicodeGeneralCategoryValues="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",ecma9ScriptValues="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",ecma10ScriptValues=ecma9ScriptValues+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ecma11ScriptValues=ecma10ScriptValues+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",ecma12ScriptValues=ecma11ScriptValues+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",ecma13ScriptValues=ecma12ScriptValues+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ecma14ScriptValues=ecma13ScriptValues+" "+scriptValuesAddedInUnicode,unicodeScriptValues={9:ecma9ScriptValues,10:ecma10ScriptValues,11:ecma11ScriptValues,12:ecma12ScriptValues,13:ecma13ScriptValues,14:ecma14ScriptValues},data={};function buildUnicodeData(ecmaVersion2){var d=data[ecmaVersion2]={binary:wordsRegexp(unicodeBinaryProperties[ecmaVersion2]+" "+unicodeGeneralCategoryValues),binaryOfStrings:wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion2]),nonBinary:{General_Category:wordsRegexp(unicodeGeneralCategoryValues),Script:wordsRegexp(unicodeScriptValues[ecmaVersion2])}};d.nonBinary.Script_Extensions=d.nonBinary.Script,d.nonBinary.gc=d.nonBinary.General_Category,d.nonBinary.sc=d.nonBinary.Script,d.nonBinary.scx=d.nonBinary.Script_Extensions}for(var i=0,list=[9,10,11,12,13,14];i<list.length;i+=1){var ecmaVersion=list[i];buildUnicodeData(ecmaVersion)}var pp$1=Parser.prototype,BranchID=function(parent,base2){this.parent=parent,this.base=base2||this};BranchID.prototype.separatedFrom=function(alt){for(var self2=this;self2;self2=self2.parent)for(var other=alt;other;other=other.parent)if(self2.base===other.base&&self2!==other)return!0;return!1},BranchID.prototype.sibling=function(){return new BranchID(this.parent,this.base)};var RegExpValidationState=function(parser){this.parser=parser,this.validFlags="gim"+(parser.options.ecmaVersion>=6?"uy":"")+(parser.options.ecmaVersion>=9?"s":"")+(parser.options.ecmaVersion>=13?"d":"")+(parser.options.ecmaVersion>=15?"v":""),this.unicodeProperties=data[parser.options.ecmaVersion>=14?14:parser.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};RegExpValidationState.prototype.reset=function(start,pattern,flags){var unicodeSets=flags.indexOf("v")!==-1,unicode=flags.indexOf("u")!==-1;this.start=start|0,this.source=pattern+"",this.flags=flags,unicodeSets&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=unicode&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=unicode&&this.parser.options.ecmaVersion>=9)},RegExpValidationState.prototype.raise=function(message){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+message)},RegExpValidationState.prototype.at=function(i2,forceU){forceU===void 0&&(forceU=!1);var s=this.source,l=s.length;if(i2>=l)return-1;var c=s.charCodeAt(i2);if(!(forceU||this.switchU)||c<=55295||c>=57344||i2+1>=l)return c;var next=s.charCodeAt(i2+1);return next>=56320&&next<=57343?(c<<10)+next-56613888:c},RegExpValidationState.prototype.nextIndex=function(i2,forceU){forceU===void 0&&(forceU=!1);var s=this.source,l=s.length;if(i2>=l)return l;var c=s.charCodeAt(i2),next;return!(forceU||this.switchU)||c<=55295||c>=57344||i2+1>=l||(next=s.charCodeAt(i2+1))<56320||next>57343?i2+1:i2+2},RegExpValidationState.prototype.current=function(forceU){return forceU===void 0&&(forceU=!1),this.at(this.pos,forceU)},RegExpValidationState.prototype.lookahead=function(forceU){return forceU===void 0&&(forceU=!1),this.at(this.nextIndex(this.pos,forceU),forceU)},RegExpValidationState.prototype.advance=function(forceU){forceU===void 0&&(forceU=!1),this.pos=this.nextIndex(this.pos,forceU)},RegExpValidationState.prototype.eat=function(ch,forceU){return forceU===void 0&&(forceU=!1),this.current(forceU)===ch?(this.advance(forceU),!0):!1},RegExpValidationState.prototype.eatChars=function(chs,forceU){forceU===void 0&&(forceU=!1);for(var pos=this.pos,i2=0,list2=chs;i2<list2.length;i2+=1){var ch=list2[i2],current=this.at(pos,forceU);if(current===-1||current!==ch)return!1;pos=this.nextIndex(pos,forceU)}return this.pos=pos,!0},pp$1.validateRegExpFlags=function(state){for(var validFlags=state.validFlags,flags=state.flags,u=!1,v=!1,i2=0;i2<flags.length;i2++){var flag=flags.charAt(i2);validFlags.indexOf(flag)===-1&&this.raise(state.start,"Invalid regular expression flag"),flags.indexOf(flag,i2+1)>-1&&this.raise(state.start,"Duplicate regular expression flag"),flag==="u"&&(u=!0),flag==="v"&&(v=!0)}this.options.ecmaVersion>=15&&u&&v&&this.raise(state.start,"Invalid regular expression flag")};function hasProp(obj){for(var _ in obj)return!0;return!1}pp$1.validateRegExpPattern=function(state){this.regexp_pattern(state),!state.switchN&&this.options.ecmaVersion>=9&&hasProp(state.groupNames)&&(state.switchN=!0,this.regexp_pattern(state))},pp$1.regexp_pattern=function(state){state.pos=0,state.lastIntValue=0,state.lastStringValue="",state.lastAssertionIsQuantifiable=!1,state.numCapturingParens=0,state.maxBackReference=0,state.groupNames=Object.create(null),state.backReferenceNames.length=0,state.branchID=null,this.regexp_disjunction(state),state.pos!==state.source.length&&(state.eat(41)&&state.raise("Unmatched ')'"),(state.eat(93)||state.eat(125))&&state.raise("Lone quantifier brackets")),state.maxBackReference>state.numCapturingParens&&state.raise("Invalid escape");for(var i2=0,list2=state.backReferenceNames;i2<list2.length;i2+=1){var name=list2[i2];state.groupNames[name]||state.raise("Invalid named capture referenced")}},pp$1.regexp_disjunction=function(state){var trackDisjunction=this.options.ecmaVersion>=16;for(trackDisjunction&&(state.branchID=new BranchID(state.branchID,null)),this.regexp_alternative(state);state.eat(124);)trackDisjunction&&(state.branchID=state.branchID.sibling()),this.regexp_alternative(state);trackDisjunction&&(state.branchID=state.branchID.parent),this.regexp_eatQuantifier(state,!0)&&state.raise("Nothing to repeat"),state.eat(123)&&state.raise("Lone quantifier brackets")},pp$1.regexp_alternative=function(state){for(;state.pos<state.source.length&&this.regexp_eatTerm(state););},pp$1.regexp_eatTerm=function(state){return this.regexp_eatAssertion(state)?(state.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(state)&&state.switchU&&state.raise("Invalid quantifier"),!0):(state.switchU?this.regexp_eatAtom(state):this.regexp_eatExtendedAtom(state))?(this.regexp_eatQuantifier(state),!0):!1},pp$1.regexp_eatAssertion=function(state){var start=state.pos;if(state.lastAssertionIsQuantifiable=!1,state.eat(94)||state.eat(36))return!0;if(state.eat(92)){if(state.eat(66)||state.eat(98))return!0;state.pos=start}if(state.eat(40)&&state.eat(63)){var lookbehind=!1;if(this.options.ecmaVersion>=9&&(lookbehind=state.eat(60)),state.eat(61)||state.eat(33))return this.regexp_disjunction(state),state.eat(41)||state.raise("Unterminated group"),state.lastAssertionIsQuantifiable=!lookbehind,!0}return state.pos=start,!1},pp$1.regexp_eatQuantifier=function(state,noError){return noError===void 0&&(noError=!1),this.regexp_eatQuantifierPrefix(state,noError)?(state.eat(63),!0):!1},pp$1.regexp_eatQuantifierPrefix=function(state,noError){return state.eat(42)||state.eat(43)||state.eat(63)||this.regexp_eatBracedQuantifier(state,noError)},pp$1.regexp_eatBracedQuantifier=function(state,noError){var start=state.pos;if(state.eat(123)){var min=0,max=-1;if(this.regexp_eatDecimalDigits(state)&&(min=state.lastIntValue,state.eat(44)&&this.regexp_eatDecimalDigits(state)&&(max=state.lastIntValue),state.eat(125)))return max!==-1&&max<min&&!noError&&state.raise("numbers out of order in {} quantifier"),!0;state.switchU&&!noError&&state.raise("Incomplete quantifier"),state.pos=start}return!1},pp$1.regexp_eatAtom=function(state){return this.regexp_eatPatternCharacters(state)||state.eat(46)||this.regexp_eatReverseSolidusAtomEscape(state)||this.regexp_eatCharacterClass(state)||this.regexp_eatUncapturingGroup(state)||this.regexp_eatCapturingGroup(state)},pp$1.regexp_eatReverseSolidusAtomEscape=function(state){var start=state.pos;if(state.eat(92)){if(this.regexp_eatAtomEscape(state))return!0;state.pos=start}return!1},pp$1.regexp_eatUncapturingGroup=function(state){var start=state.pos;if(state.eat(40)){if(state.eat(63)){if(this.options.ecmaVersion>=16){var addModifiers=this.regexp_eatModifiers(state),hasHyphen=state.eat(45);if(addModifiers||hasHyphen){for(var i2=0;i2<addModifiers.length;i2++){var modifier=addModifiers.charAt(i2);addModifiers.indexOf(modifier,i2+1)>-1&&state.raise("Duplicate regular expression modifiers")}if(hasHyphen){var removeModifiers=this.regexp_eatModifiers(state);!addModifiers&&!removeModifiers&&state.current()===58&&state.raise("Invalid regular expression modifiers");for(var i$1=0;i$1<removeModifiers.length;i$1++){var modifier$1=removeModifiers.charAt(i$1);(removeModifiers.indexOf(modifier$1,i$1+1)>-1||addModifiers.indexOf(modifier$1)>-1)&&state.raise("Duplicate regular expression modifiers")}}}}if(state.eat(58)){if(this.regexp_disjunction(state),state.eat(41))return!0;state.raise("Unterminated group")}}state.pos=start}return!1},pp$1.regexp_eatCapturingGroup=function(state){if(state.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(state):state.current()===63&&state.raise("Invalid group"),this.regexp_disjunction(state),state.eat(41))return state.numCapturingParens+=1,!0;state.raise("Unterminated group")}return!1},pp$1.regexp_eatModifiers=function(state){for(var modifiers="",ch=0;(ch=state.current())!==-1&&isRegularExpressionModifier(ch);)modifiers+=codePointToString(ch),state.advance();return modifiers};function isRegularExpressionModifier(ch){return ch===105||ch===109||ch===115}pp$1.regexp_eatExtendedAtom=function(state){return state.eat(46)||this.regexp_eatReverseSolidusAtomEscape(state)||this.regexp_eatCharacterClass(state)||this.regexp_eatUncapturingGroup(state)||this.regexp_eatCapturingGroup(state)||this.regexp_eatInvalidBracedQuantifier(state)||this.regexp_eatExtendedPatternCharacter(state)},pp$1.regexp_eatInvalidBracedQuantifier=function(state){return this.regexp_eatBracedQuantifier(state,!0)&&state.raise("Nothing to repeat"),!1},pp$1.regexp_eatSyntaxCharacter=function(state){var ch=state.current();return isSyntaxCharacter(ch)?(state.lastIntValue=ch,state.advance(),!0):!1};function isSyntaxCharacter(ch){return ch===36||ch>=40&&ch<=43||ch===46||ch===63||ch>=91&&ch<=94||ch>=123&&ch<=125}pp$1.regexp_eatPatternCharacters=function(state){for(var start=state.pos,ch=0;(ch=state.current())!==-1&&!isSyntaxCharacter(ch);)state.advance();return state.pos!==start},pp$1.regexp_eatExtendedPatternCharacter=function(state){var ch=state.current();return ch!==-1&&ch!==36&&!(ch>=40&&ch<=43)&&ch!==46&&ch!==63&&ch!==91&&ch!==94&&ch!==124?(state.advance(),!0):!1},pp$1.regexp_groupSpecifier=function(state){if(state.eat(63)){this.regexp_eatGroupName(state)||state.raise("Invalid group");var trackDisjunction=this.options.ecmaVersion>=16,known=state.groupNames[state.lastStringValue];if(known)if(trackDisjunction)for(var i2=0,list2=known;i2<list2.length;i2+=1){var altID=list2[i2];altID.separatedFrom(state.branchID)||state.raise("Duplicate capture group name")}else state.raise("Duplicate capture group name");trackDisjunction?(known||(state.groupNames[state.lastStringValue]=[])).push(state.branchID):state.groupNames[state.lastStringValue]=!0}},pp$1.regexp_eatGroupName=function(state){if(state.lastStringValue="",state.eat(60)){if(this.regexp_eatRegExpIdentifierName(state)&&state.eat(62))return!0;state.raise("Invalid capture group name")}return!1},pp$1.regexp_eatRegExpIdentifierName=function(state){if(state.lastStringValue="",this.regexp_eatRegExpIdentifierStart(state)){for(state.lastStringValue+=codePointToString(state.lastIntValue);this.regexp_eatRegExpIdentifierPart(state);)state.lastStringValue+=codePointToString(state.lastIntValue);return!0}return!1},pp$1.regexp_eatRegExpIdentifierStart=function(state){var start=state.pos,forceU=this.options.ecmaVersion>=11,ch=state.current(forceU);return state.advance(forceU),ch===92&&this.regexp_eatRegExpUnicodeEscapeSequence(state,forceU)&&(ch=state.lastIntValue),isRegExpIdentifierStart(ch)?(state.lastIntValue=ch,!0):(state.pos=start,!1)};function isRegExpIdentifierStart(ch){return isIdentifierStart(ch,!0)||ch===36||ch===95}pp$1.regexp_eatRegExpIdentifierPart=function(state){var start=state.pos,forceU=this.options.ecmaVersion>=11,ch=state.current(forceU);return state.advance(forceU),ch===92&&this.regexp_eatRegExpUnicodeEscapeSequence(state,forceU)&&(ch=state.lastIntValue),isRegExpIdentifierPart(ch)?(state.lastIntValue=ch,!0):(state.pos=start,!1)};function isRegExpIdentifierPart(ch){return isIdentifierChar(ch,!0)||ch===36||ch===95||ch===8204||ch===8205}pp$1.regexp_eatAtomEscape=function(state){return this.regexp_eatBackReference(state)||this.regexp_eatCharacterClassEscape(state)||this.regexp_eatCharacterEscape(state)||state.switchN&&this.regexp_eatKGroupName(state)?!0:(state.switchU&&(state.current()===99&&state.raise("Invalid unicode escape"),state.raise("Invalid escape")),!1)},pp$1.regexp_eatBackReference=function(state){var start=state.pos;if(this.regexp_eatDecimalEscape(state)){var n=state.lastIntValue;if(state.switchU)return n>state.maxBackReference&&(state.maxBackReference=n),!0;if(n<=state.numCapturingParens)return!0;state.pos=start}return!1},pp$1.regexp_eatKGroupName=function(state){if(state.eat(107)){if(this.regexp_eatGroupName(state))return state.backReferenceNames.push(state.lastStringValue),!0;state.raise("Invalid named reference")}return!1},pp$1.regexp_eatCharacterEscape=function(state){return this.regexp_eatControlEscape(state)||this.regexp_eatCControlLetter(state)||this.regexp_eatZero(state)||this.regexp_eatHexEscapeSequence(state)||this.regexp_eatRegExpUnicodeEscapeSequence(state,!1)||!state.switchU&&this.regexp_eatLegacyOctalEscapeSequence(state)||this.regexp_eatIdentityEscape(state)},pp$1.regexp_eatCControlLetter=function(state){var start=state.pos;if(state.eat(99)){if(this.regexp_eatControlLetter(state))return!0;state.pos=start}return!1},pp$1.regexp_eatZero=function(state){return state.current()===48&&!isDecimalDigit(state.lookahead())?(state.lastIntValue=0,state.advance(),!0):!1},pp$1.regexp_eatControlEscape=function(state){var ch=state.current();return ch===116?(state.lastIntValue=9,state.advance(),!0):ch===110?(state.lastIntValue=10,state.advance(),!0):ch===118?(state.lastIntValue=11,state.advance(),!0):ch===102?(state.lastIntValue=12,state.advance(),!0):ch===114?(state.lastIntValue=13,state.advance(),!0):!1},pp$1.regexp_eatControlLetter=function(state){var ch=state.current();return isControlLetter(ch)?(state.lastIntValue=ch%32,state.advance(),!0):!1};function isControlLetter(ch){return ch>=65&&ch<=90||ch>=97&&ch<=122}pp$1.regexp_eatRegExpUnicodeEscapeSequence=function(state,forceU){forceU===void 0&&(forceU=!1);var start=state.pos,switchU=forceU||state.switchU;if(state.eat(117)){if(this.regexp_eatFixedHexDigits(state,4)){var lead=state.lastIntValue;if(switchU&&lead>=55296&&lead<=56319){var leadSurrogateEnd=state.pos;if(state.eat(92)&&state.eat(117)&&this.regexp_eatFixedHexDigits(state,4)){var trail=state.lastIntValue;if(trail>=56320&&trail<=57343)return state.lastIntValue=(lead-55296)*1024+(trail-56320)+65536,!0}state.pos=leadSurrogateEnd,state.lastIntValue=lead}return!0}if(switchU&&state.eat(123)&&this.regexp_eatHexDigits(state)&&state.eat(125)&&isValidUnicode(state.lastIntValue))return!0;switchU&&state.raise("Invalid unicode escape"),state.pos=start}return!1};function isValidUnicode(ch){return ch>=0&&ch<=1114111}pp$1.regexp_eatIdentityEscape=function(state){if(state.switchU)return this.regexp_eatSyntaxCharacter(state)?!0:state.eat(47)?(state.lastIntValue=47,!0):!1;var ch=state.current();return ch!==99&&(!state.switchN||ch!==107)?(state.lastIntValue=ch,state.advance(),!0):!1},pp$1.regexp_eatDecimalEscape=function(state){state.lastIntValue=0;var ch=state.current();if(ch>=49&&ch<=57){do state.lastIntValue=10*state.lastIntValue+(ch-48),state.advance();while((ch=state.current())>=48&&ch<=57);return!0}return!1};var CharSetNone=0,CharSetOk=1,CharSetString=2;pp$1.regexp_eatCharacterClassEscape=function(state){var ch=state.current();if(isCharacterClassEscape(ch))return state.lastIntValue=-1,state.advance(),CharSetOk;var negate=!1;if(state.switchU&&this.options.ecmaVersion>=9&&((negate=ch===80)||ch===112)){state.lastIntValue=-1,state.advance();var result;if(state.eat(123)&&(result=this.regexp_eatUnicodePropertyValueExpression(state))&&state.eat(125))return negate&&result===CharSetString&&state.raise("Invalid property name"),result;state.raise("Invalid property name")}return CharSetNone};function isCharacterClassEscape(ch){return ch===100||ch===68||ch===115||ch===83||ch===119||ch===87}pp$1.regexp_eatUnicodePropertyValueExpression=function(state){var start=state.pos;if(this.regexp_eatUnicodePropertyName(state)&&state.eat(61)){var name=state.lastStringValue;if(this.regexp_eatUnicodePropertyValue(state)){var value=state.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(state,name,value),CharSetOk}}if(state.pos=start,this.regexp_eatLoneUnicodePropertyNameOrValue(state)){var nameOrValue=state.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(state,nameOrValue)}return CharSetNone},pp$1.regexp_validateUnicodePropertyNameAndValue=function(state,name,value){hasOwn(state.unicodeProperties.nonBinary,name)||state.raise("Invalid property name"),state.unicodeProperties.nonBinary[name].test(value)||state.raise("Invalid property value")},pp$1.regexp_validateUnicodePropertyNameOrValue=function(state,nameOrValue){if(state.unicodeProperties.binary.test(nameOrValue))return CharSetOk;if(state.switchV&&state.unicodeProperties.binaryOfStrings.test(nameOrValue))return CharSetString;state.raise("Invalid property name")},pp$1.regexp_eatUnicodePropertyName=function(state){var ch=0;for(state.lastStringValue="";isUnicodePropertyNameCharacter(ch=state.current());)state.lastStringValue+=codePointToString(ch),state.advance();return state.lastStringValue!==""};function isUnicodePropertyNameCharacter(ch){return isControlLetter(ch)||ch===95}pp$1.regexp_eatUnicodePropertyValue=function(state){var ch=0;for(state.lastStringValue="";isUnicodePropertyValueCharacter(ch=state.current());)state.lastStringValue+=codePointToString(ch),state.advance();return state.lastStringValue!==""};function isUnicodePropertyValueCharacter(ch){return isUnicodePropertyNameCharacter(ch)||isDecimalDigit(ch)}pp$1.regexp_eatLoneUnicodePropertyNameOrValue=function(state){return this.regexp_eatUnicodePropertyValue(state)},pp$1.regexp_eatCharacterClass=function(state){if(state.eat(91)){var negate=state.eat(94),result=this.regexp_classContents(state);return state.eat(93)||state.raise("Unterminated character class"),negate&&result===CharSetString&&state.raise("Negated character class may contain strings"),!0}return!1},pp$1.regexp_classContents=function(state){return state.current()===93?CharSetOk:state.switchV?this.regexp_classSetExpression(state):(this.regexp_nonEmptyClassRanges(state),CharSetOk)},pp$1.regexp_nonEmptyClassRanges=function(state){for(;this.regexp_eatClassAtom(state);){var left=state.lastIntValue;if(state.eat(45)&&this.regexp_eatClassAtom(state)){var right=state.lastIntValue;state.switchU&&(left===-1||right===-1)&&state.raise("Invalid character class"),left!==-1&&right!==-1&&left>right&&state.raise("Range out of order in character class")}}},pp$1.regexp_eatClassAtom=function(state){var start=state.pos;if(state.eat(92)){if(this.regexp_eatClassEscape(state))return!0;if(state.switchU){var ch$1=state.current();(ch$1===99||isOctalDigit(ch$1))&&state.raise("Invalid class escape"),state.raise("Invalid escape")}state.pos=start}var ch=state.current();return ch!==93?(state.lastIntValue=ch,state.advance(),!0):!1},pp$1.regexp_eatClassEscape=function(state){var start=state.pos;if(state.eat(98))return state.lastIntValue=8,!0;if(state.switchU&&state.eat(45))return state.lastIntValue=45,!0;if(!state.switchU&&state.eat(99)){if(this.regexp_eatClassControlLetter(state))return!0;state.pos=start}return this.regexp_eatCharacterClassEscape(state)||this.regexp_eatCharacterEscape(state)},pp$1.regexp_classSetExpression=function(state){var result=CharSetOk,subResult;if(!this.regexp_eatClassSetRange(state))if(subResult=this.regexp_eatClassSetOperand(state)){subResult===CharSetString&&(result=CharSetString);for(var start=state.pos;state.eatChars([38,38]);){if(state.current()!==38&&(subResult=this.regexp_eatClassSetOperand(state))){subResult!==CharSetString&&(result=CharSetOk);continue}state.raise("Invalid character in character class")}if(start!==state.pos)return result;for(;state.eatChars([45,45]);)this.regexp_eatClassSetOperand(state)||state.raise("Invalid character in character class");if(start!==state.pos)return result}else state.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(state)){if(subResult=this.regexp_eatClassSetOperand(state),!subResult)return result;subResult===CharSetString&&(result=CharSetString)}},pp$1.regexp_eatClassSetRange=function(state){var start=state.pos;if(this.regexp_eatClassSetCharacter(state)){var left=state.lastIntValue;if(state.eat(45)&&this.regexp_eatClassSetCharacter(state)){var right=state.lastIntValue;return left!==-1&&right!==-1&&left>right&&state.raise("Range out of order in character class"),!0}state.pos=start}return!1},pp$1.regexp_eatClassSetOperand=function(state){return this.regexp_eatClassSetCharacter(state)?CharSetOk:this.regexp_eatClassStringDisjunction(state)||this.regexp_eatNestedClass(state)},pp$1.regexp_eatNestedClass=function(state){var start=state.pos;if(state.eat(91)){var negate=state.eat(94),result=this.regexp_classContents(state);if(state.eat(93))return negate&&result===CharSetString&&state.raise("Negated character class may contain strings"),result;state.pos=start}if(state.eat(92)){var result$1=this.regexp_eatCharacterClassEscape(state);if(result$1)return result$1;state.pos=start}return null},pp$1.regexp_eatClassStringDisjunction=function(state){var start=state.pos;if(state.eatChars([92,113])){if(state.eat(123)){var result=this.regexp_classStringDisjunctionContents(state);if(state.eat(125))return result}else state.raise("Invalid escape");state.pos=start}return null},pp$1.regexp_classStringDisjunctionContents=function(state){for(var result=this.regexp_classString(state);state.eat(124);)this.regexp_classString(state)===CharSetString&&(result=CharSetString);return result},pp$1.regexp_classString=function(state){for(var count=0;this.regexp_eatClassSetCharacter(state);)count++;return count===1?CharSetOk:CharSetString},pp$1.regexp_eatClassSetCharacter=function(state){var start=state.pos;if(state.eat(92))return this.regexp_eatCharacterEscape(state)||this.regexp_eatClassSetReservedPunctuator(state)?!0:state.eat(98)?(state.lastIntValue=8,!0):(state.pos=start,!1);var ch=state.current();return ch<0||ch===state.lookahead()&&isClassSetReservedDoublePunctuatorCharacter(ch)||isClassSetSyntaxCharacter(ch)?!1:(state.advance(),state.lastIntValue=ch,!0)};function isClassSetReservedDoublePunctuatorCharacter(ch){return ch===33||ch>=35&&ch<=38||ch>=42&&ch<=44||ch===46||ch>=58&&ch<=64||ch===94||ch===96||ch===126}function isClassSetSyntaxCharacter(ch){return ch===40||ch===41||ch===45||ch===47||ch>=91&&ch<=93||ch>=123&&ch<=125}pp$1.regexp_eatClassSetReservedPunctuator=function(state){var ch=state.current();return isClassSetReservedPunctuator(ch)?(state.lastIntValue=ch,state.advance(),!0):!1};function isClassSetReservedPunctuator(ch){return ch===33||ch===35||ch===37||ch===38||ch===44||ch===45||ch>=58&&ch<=62||ch===64||ch===96||ch===126}pp$1.regexp_eatClassControlLetter=function(state){var ch=state.current();return isDecimalDigit(ch)||ch===95?(state.lastIntValue=ch%32,state.advance(),!0):!1},pp$1.regexp_eatHexEscapeSequence=function(state){var start=state.pos;if(state.eat(120)){if(this.regexp_eatFixedHexDigits(state,2))return!0;state.switchU&&state.raise("Invalid escape"),state.pos=start}return!1},pp$1.regexp_eatDecimalDigits=function(state){var start=state.pos,ch=0;for(state.lastIntValue=0;isDecimalDigit(ch=state.current());)state.lastIntValue=10*state.lastIntValue+(ch-48),state.advance();return state.pos!==start};function isDecimalDigit(ch){return ch>=48&&ch<=57}pp$1.regexp_eatHexDigits=function(state){var start=state.pos,ch=0;for(state.lastIntValue=0;isHexDigit(ch=state.current());)state.lastIntValue=16*state.lastIntValue+hexToInt(ch),state.advance();return state.pos!==start};function isHexDigit(ch){return ch>=48&&ch<=57||ch>=65&&ch<=70||ch>=97&&ch<=102}function hexToInt(ch){return ch>=65&&ch<=70?10+(ch-65):ch>=97&&ch<=102?10+(ch-97):ch-48}pp$1.regexp_eatLegacyOctalEscapeSequence=function(state){if(this.regexp_eatOctalDigit(state)){var n1=state.lastIntValue;if(this.regexp_eatOctalDigit(state)){var n2=state.lastIntValue;n1<=3&&this.regexp_eatOctalDigit(state)?state.lastIntValue=n1*64+n2*8+state.lastIntValue:state.lastIntValue=n1*8+n2}else state.lastIntValue=n1;return!0}return!1},pp$1.regexp_eatOctalDigit=function(state){var ch=state.current();return isOctalDigit(ch)?(state.lastIntValue=ch-48,state.advance(),!0):(state.lastIntValue=0,!1)};function isOctalDigit(ch){return ch>=48&&ch<=55}pp$1.regexp_eatFixedHexDigits=function(state,length){var start=state.pos;state.lastIntValue=0;for(var i2=0;i2<length;++i2){var ch=state.current();if(!isHexDigit(ch))return state.pos=start,!1;state.lastIntValue=16*state.lastIntValue+hexToInt(ch),state.advance()}return!0};var Token=function(p){this.type=p.type,this.value=p.value,this.start=p.start,this.end=p.end,p.options.locations&&(this.loc=new SourceLocation(p,p.startLoc,p.endLoc)),p.options.ranges&&(this.range=[p.start,p.end])},pp=Parser.prototype;pp.next=function(ignoreEscapeSequenceInKeyword){!ignoreEscapeSequenceInKeyword&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Token(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},pp.getToken=function(){return this.next(),new Token(this)},typeof Symbol<"u"&&(pp[Symbol.iterator]=function(){var this$1$1=this;return{next:function(){var token=this$1$1.getToken();return{done:token.type===types$1.eof,value:token}}}}),pp.nextToken=function(){var curContext=this.curContext();if((!curContext||!curContext.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(types$1.eof);if(curContext.override)return curContext.override(this);this.readToken(this.fullCharCodeAtPos())},pp.readToken=function(code){return isIdentifierStart(code,this.options.ecmaVersion>=6)||code===92?this.readWord():this.getTokenFromCode(code)},pp.fullCharCodeAtPos=function(){var code=this.input.charCodeAt(this.pos);if(code<=55295||code>=56320)return code;var next=this.input.charCodeAt(this.pos+1);return next<=56319||next>=57344?code:(code<<10)+next-56613888},pp.skipBlockComment=function(){var startLoc=this.options.onComment&&this.curPosition(),start=this.pos,end=this.input.indexOf("*/",this.pos+=2);if(end===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=end+2,this.options.locations)for(var nextBreak=void 0,pos=start;(nextBreak=nextLineBreak(this.input,pos,this.pos))>-1;)++this.curLine,pos=this.lineStart=nextBreak;this.options.onComment&&this.options.onComment(!0,this.input.slice(start+2,end),start,this.pos,startLoc,this.curPosition())},pp.skipLineComment=function(startSkip){for(var start=this.pos,startLoc=this.options.onComment&&this.curPosition(),ch=this.input.charCodeAt(this.pos+=startSkip);this.pos<this.input.length&&!isNewLine(ch);)ch=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(start+startSkip,this.pos),start,this.pos,startLoc,this.curPosition())},pp.skipSpace=function(){loop:for(;this.pos<this.input.length;){var ch=this.input.charCodeAt(this.pos);switch(ch){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break loop}break;default:if(ch>8&&ch<14||ch>=5760&&nonASCIIwhitespace.test(String.fromCharCode(ch)))++this.pos;else break loop}}},pp.finishToken=function(type,val){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var prevType=this.type;this.type=type,this.value=val,this.updateContext(prevType)},pp.readToken_dot=function(){var next=this.input.charCodeAt(this.pos+1);if(next>=48&&next<=57)return this.readNumber(!0);var next2=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&next===46&&next2===46?(this.pos+=3,this.finishToken(types$1.ellipsis)):(++this.pos,this.finishToken(types$1.dot))},pp.readToken_slash=function(){var next=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):next===61?this.finishOp(types$1.assign,2):this.finishOp(types$1.slash,1)},pp.readToken_mult_modulo_exp=function(code){var next=this.input.charCodeAt(this.pos+1),size=1,tokentype=code===42?types$1.star:types$1.modulo;return this.options.ecmaVersion>=7&&code===42&&next===42&&(++size,tokentype=types$1.starstar,next=this.input.charCodeAt(this.pos+2)),next===61?this.finishOp(types$1.assign,size+1):this.finishOp(tokentype,size)},pp.readToken_pipe_amp=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===code){if(this.options.ecmaVersion>=12){var next2=this.input.charCodeAt(this.pos+2);if(next2===61)return this.finishOp(types$1.assign,3)}return this.finishOp(code===124?types$1.logicalOR:types$1.logicalAND,2)}return next===61?this.finishOp(types$1.assign,2):this.finishOp(code===124?types$1.bitwiseOR:types$1.bitwiseAND,1)},pp.readToken_caret=function(){var next=this.input.charCodeAt(this.pos+1);return next===61?this.finishOp(types$1.assign,2):this.finishOp(types$1.bitwiseXOR,1)},pp.readToken_plus_min=function(code){var next=this.input.charCodeAt(this.pos+1);return next===code?next===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||lineBreak.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(types$1.incDec,2):next===61?this.finishOp(types$1.assign,2):this.finishOp(types$1.plusMin,1)},pp.readToken_lt_gt=function(code){var next=this.input.charCodeAt(this.pos+1),size=1;return next===code?(size=code===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+size)===61?this.finishOp(types$1.assign,size+1):this.finishOp(types$1.bitShift,size)):next===33&&code===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(next===61&&(size=2),this.finishOp(types$1.relational,size))},pp.readToken_eq_excl=function(code){var next=this.input.charCodeAt(this.pos+1);return next===61?this.finishOp(types$1.equality,this.input.charCodeAt(this.pos+2)===61?3:2):code===61&&next===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(types$1.arrow)):this.finishOp(code===61?types$1.eq:types$1.prefix,1)},pp.readToken_question=function(){var ecmaVersion2=this.options.ecmaVersion;if(ecmaVersion2>=11){var next=this.input.charCodeAt(this.pos+1);if(next===46){var next2=this.input.charCodeAt(this.pos+2);if(next2<48||next2>57)return this.finishOp(types$1.questionDot,2)}if(next===63){if(ecmaVersion2>=12){var next2$1=this.input.charCodeAt(this.pos+2);if(next2$1===61)return this.finishOp(types$1.assign,3)}return this.finishOp(types$1.coalesce,2)}}return this.finishOp(types$1.question,1)},pp.readToken_numberSign=function(){var ecmaVersion2=this.options.ecmaVersion,code=35;if(ecmaVersion2>=13&&(++this.pos,code=this.fullCharCodeAtPos(),isIdentifierStart(code,!0)||code===92))return this.finishToken(types$1.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+codePointToString(code)+"'")},pp.getTokenFromCode=function(code){switch(code){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(types$1.parenL);case 41:return++this.pos,this.finishToken(types$1.parenR);case 59:return++this.pos,this.finishToken(types$1.semi);case 44:return++this.pos,this.finishToken(types$1.comma);case 91:return++this.pos,this.finishToken(types$1.bracketL);case 93:return++this.pos,this.finishToken(types$1.bracketR);case 123:return++this.pos,this.finishToken(types$1.braceL);case 125:return++this.pos,this.finishToken(types$1.braceR);case 58:return++this.pos,this.finishToken(types$1.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(types$1.backQuote);case 48:var next=this.input.charCodeAt(this.pos+1);if(next===120||next===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(next===111||next===79)return this.readRadixNumber(8);if(next===98||next===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(code);case 124:case 38:return this.readToken_pipe_amp(code);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(code);case 60:case 62:return this.readToken_lt_gt(code);case 61:case 33:return this.readToken_eq_excl(code);case 63:return this.readToken_question();case 126:return this.finishOp(types$1.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+codePointToString(code)+"'")},pp.finishOp=function(type,size){var str=this.input.slice(this.pos,this.pos+size);return this.pos+=size,this.finishToken(type,str)},pp.readRegexp=function(){for(var escaped,inClass,start=this.pos;;){this.pos>=this.input.length&&this.raise(start,"Unterminated regular expression");var ch=this.input.charAt(this.pos);if(lineBreak.test(ch)&&this.raise(start,"Unterminated regular expression"),escaped)escaped=!1;else{if(ch==="[")inClass=!0;else if(ch==="]"&&inClass)inClass=!1;else if(ch==="/"&&!inClass)break;escaped=ch==="\\"}++this.pos}var pattern=this.input.slice(start,this.pos);++this.pos;var flagsStart=this.pos,flags=this.readWord1();this.containsEsc&&this.unexpected(flagsStart);var state=this.regexpState||(this.regexpState=new RegExpValidationState(this));state.reset(start,pattern,flags),this.validateRegExpFlags(state),this.validateRegExpPattern(state);var value=null;try{value=new RegExp(pattern,flags)}catch{}return this.finishToken(types$1.regexp,{pattern,flags,value})},pp.readInt=function(radix,len,maybeLegacyOctalNumericLiteral){for(var allowSeparators=this.options.ecmaVersion>=12&&len===void 0,isLegacyOctalNumericLiteral=maybeLegacyOctalNumericLiteral&&this.input.charCodeAt(this.pos)===48,start=this.pos,total=0,lastCode=0,i2=0,e=len??1/0;i2<e;++i2,++this.pos){var code=this.input.charCodeAt(this.pos),val=void 0;if(allowSeparators&&code===95){isLegacyOctalNumericLiteral&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),lastCode===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),i2===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),lastCode=code;continue}if(code>=97?val=code-97+10:code>=65?val=code-65+10:code>=48&&code<=57?val=code-48:val=1/0,val>=radix)break;lastCode=code,total=total*radix+val}return allowSeparators&&lastCode===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===start||len!=null&&this.pos-start!==len?null:total};function stringToNumber(str,isLegacyOctalNumericLiteral){return isLegacyOctalNumericLiteral?parseInt(str,8):parseFloat(str.replace(/_/g,""))}function stringToBigInt(str){return typeof BigInt!="function"?null:BigInt(str.replace(/_/g,""))}pp.readRadixNumber=function(radix){var start=this.pos;this.pos+=2;var val=this.readInt(radix);return val==null&&this.raise(this.start+2,"Expected number in radix "+radix),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(val=stringToBigInt(this.input.slice(start,this.pos)),++this.pos):isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(types$1.num,val)},pp.readNumber=function(startsWithDot){var start=this.pos;!startsWithDot&&this.readInt(10,void 0,!0)===null&&this.raise(start,"Invalid number");var octal=this.pos-start>=2&&this.input.charCodeAt(start)===48;octal&&this.strict&&this.raise(start,"Invalid number");var next=this.input.charCodeAt(this.pos);if(!octal&&!startsWithDot&&this.options.ecmaVersion>=11&&next===110){var val$1=stringToBigInt(this.input.slice(start,this.pos));return++this.pos,isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(types$1.num,val$1)}octal&&/[89]/.test(this.input.slice(start,this.pos))&&(octal=!1),next===46&&!octal&&(++this.pos,this.readInt(10),next=this.input.charCodeAt(this.pos)),(next===69||next===101)&&!octal&&(next=this.input.charCodeAt(++this.pos),(next===43||next===45)&&++this.pos,this.readInt(10)===null&&this.raise(start,"Invalid number")),isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var val=stringToNumber(this.input.slice(start,this.pos),octal);return this.finishToken(types$1.num,val)},pp.readCodePoint=function(){var ch=this.input.charCodeAt(this.pos),code;if(ch===123){this.options.ecmaVersion<6&&this.unexpected();var codePos=++this.pos;code=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,code>1114111&&this.invalidStringToken(codePos,"Code point out of bounds")}else code=this.readHexChar(4);return code},pp.readString=function(quote){for(var out="",chunkStart=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var ch=this.input.charCodeAt(this.pos);if(ch===quote)break;ch===92?(out+=this.input.slice(chunkStart,this.pos),out+=this.readEscapedChar(!1),chunkStart=this.pos):ch===8232||ch===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(isNewLine(ch)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return out+=this.input.slice(chunkStart,this.pos++),this.finishToken(types$1.string,out)};var INVALID_TEMPLATE_ESCAPE_ERROR={};pp.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(err){if(err===INVALID_TEMPLATE_ESCAPE_ERROR)this.readInvalidTemplateToken();else throw err}this.inTemplateElement=!1},pp.invalidStringToken=function(position,message){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw INVALID_TEMPLATE_ESCAPE_ERROR;this.raise(position,message)},pp.readTmplToken=function(){for(var out="",chunkStart=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var ch=this.input.charCodeAt(this.pos);if(ch===96||ch===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===types$1.template||this.type===types$1.invalidTemplate)?ch===36?(this.pos+=2,this.finishToken(types$1.dollarBraceL)):(++this.pos,this.finishToken(types$1.backQuote)):(out+=this.input.slice(chunkStart,this.pos),this.finishToken(types$1.template,out));if(ch===92)out+=this.input.slice(chunkStart,this.pos),out+=this.readEscapedChar(!0),chunkStart=this.pos;else if(isNewLine(ch)){switch(out+=this.input.slice(chunkStart,this.pos),++this.pos,ch){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:out+=`
|
|
6
|
-
`;break;default:out+=String.fromCharCode(ch);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),chunkStart=this.pos}else++this.pos}},pp.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(types$1.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
|
7
|
-
`&&++this.pos;case`
|
|
8
|
-
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")},pp.readEscapedChar=function(inTemplate){var ch=this.input.charCodeAt(++this.pos);switch(++this.pos,ch){case 110:return`
|
|
9
|
-
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(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"),inTemplate){var codePos=this.pos-1;this.invalidStringToken(codePos,"Invalid escape sequence in template string")}default:if(ch>=48&&ch<=55){var octalStr=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],octal=parseInt(octalStr,8);return octal>255&&(octalStr=octalStr.slice(0,-1),octal=parseInt(octalStr,8)),this.pos+=octalStr.length-1,ch=this.input.charCodeAt(this.pos),(octalStr!=="0"||ch===56||ch===57)&&(this.strict||inTemplate)&&this.invalidStringToken(this.pos-1-octalStr.length,inTemplate?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(octal)}return isNewLine(ch)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(ch)}},pp.readHexChar=function(len){var codePos=this.pos,n=this.readInt(16,len);return n===null&&this.invalidStringToken(codePos,"Bad character escape sequence"),n},pp.readWord1=function(){this.containsEsc=!1;for(var word="",first=!0,chunkStart=this.pos,astral=this.options.ecmaVersion>=6;this.pos<this.input.length;){var ch=this.fullCharCodeAtPos();if(isIdentifierChar(ch,astral))this.pos+=ch<=65535?1:2;else if(ch===92){this.containsEsc=!0,word+=this.input.slice(chunkStart,this.pos);var escStart=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var esc=this.readCodePoint();(first?isIdentifierStart:isIdentifierChar)(esc,astral)||this.invalidStringToken(escStart,"Invalid Unicode escape"),word+=codePointToString(esc),chunkStart=this.pos}else break;first=!1}return word+this.input.slice(chunkStart,this.pos)},pp.readWord=function(){var word=this.readWord1(),type=types$1.name;return this.keywords.test(word)&&(type=keywords[word]),this.finishToken(type,word)};var version="8.15.0";Parser.acorn={Parser,version,defaultOptions,Position,SourceLocation,getLineInfo,Node,TokenType,tokTypes:types$1,keywordTypes:keywords,TokContext,tokContexts:types,isIdentifierChar,isIdentifierStart,Token,isNewLine,lineBreak,lineBreakG,nonASCIIwhitespace};function simple(node,visitors,baseVisitor,state,override){baseVisitor||(baseVisitor=base),function c(node2,st,override2){var type=override2||node2.type;baseVisitor[type](node2,st,c),visitors[type]&&visitors[type](node2,st)}(node,state,override)}function ancestor(node,visitors,baseVisitor,state,override){var ancestors=[];baseVisitor||(baseVisitor=base),function c(node2,st,override2){var type=override2||node2.type,isNew=node2!==ancestors[ancestors.length-1];isNew&&ancestors.push(node2),baseVisitor[type](node2,st,c),visitors[type]&&visitors[type](node2,st||ancestors,ancestors),isNew&&ancestors.pop()}(node,state,override)}function make(funcs,baseVisitor){var visitor=Object.create(base);for(var type in funcs)visitor[type]=funcs[type];return visitor}function skipThrough(node,st,c){c(node,st)}function ignore(_node,_st,_c){}var base={};base.Program=base.BlockStatement=base.StaticBlock=function(node,st,c){for(var i2=0,list2=node.body;i2<list2.length;i2+=1){var stmt=list2[i2];c(stmt,st,"Statement")}},base.Statement=skipThrough,base.EmptyStatement=ignore,base.ExpressionStatement=base.ParenthesizedExpression=base.ChainExpression=function(node,st,c){return c(node.expression,st,"Expression")},base.IfStatement=function(node,st,c){c(node.test,st,"Expression"),c(node.consequent,st,"Statement"),node.alternate&&c(node.alternate,st,"Statement")},base.LabeledStatement=function(node,st,c){return c(node.body,st,"Statement")},base.BreakStatement=base.ContinueStatement=ignore,base.WithStatement=function(node,st,c){c(node.object,st,"Expression"),c(node.body,st,"Statement")},base.SwitchStatement=function(node,st,c){c(node.discriminant,st,"Expression");for(var i2=0,list2=node.cases;i2<list2.length;i2+=1){var cs=list2[i2];c(cs,st)}},base.SwitchCase=function(node,st,c){node.test&&c(node.test,st,"Expression");for(var i2=0,list2=node.consequent;i2<list2.length;i2+=1){var cons=list2[i2];c(cons,st,"Statement")}},base.ReturnStatement=base.YieldExpression=base.AwaitExpression=function(node,st,c){node.argument&&c(node.argument,st,"Expression")},base.ThrowStatement=base.SpreadElement=function(node,st,c){return c(node.argument,st,"Expression")},base.TryStatement=function(node,st,c){c(node.block,st,"Statement"),node.handler&&c(node.handler,st),node.finalizer&&c(node.finalizer,st,"Statement")},base.CatchClause=function(node,st,c){node.param&&c(node.param,st,"Pattern"),c(node.body,st,"Statement")},base.WhileStatement=base.DoWhileStatement=function(node,st,c){c(node.test,st,"Expression"),c(node.body,st,"Statement")},base.ForStatement=function(node,st,c){node.init&&c(node.init,st,"ForInit"),node.test&&c(node.test,st,"Expression"),node.update&&c(node.update,st,"Expression"),c(node.body,st,"Statement")},base.ForInStatement=base.ForOfStatement=function(node,st,c){c(node.left,st,"ForInit"),c(node.right,st,"Expression"),c(node.body,st,"Statement")},base.ForInit=function(node,st,c){node.type==="VariableDeclaration"?c(node,st):c(node,st,"Expression")},base.DebuggerStatement=ignore,base.FunctionDeclaration=function(node,st,c){return c(node,st,"Function")},base.VariableDeclaration=function(node,st,c){for(var i2=0,list2=node.declarations;i2<list2.length;i2+=1){var decl=list2[i2];c(decl,st)}},base.VariableDeclarator=function(node,st,c){c(node.id,st,"Pattern"),node.init&&c(node.init,st,"Expression")},base.Function=function(node,st,c){node.id&&c(node.id,st,"Pattern");for(var i2=0,list2=node.params;i2<list2.length;i2+=1){var param=list2[i2];c(param,st,"Pattern")}c(node.body,st,node.expression?"Expression":"Statement")},base.Pattern=function(node,st,c){node.type==="Identifier"?c(node,st,"VariablePattern"):node.type==="MemberExpression"?c(node,st,"MemberPattern"):c(node,st)},base.VariablePattern=ignore,base.MemberPattern=skipThrough,base.RestElement=function(node,st,c){return c(node.argument,st,"Pattern")},base.ArrayPattern=function(node,st,c){for(var i2=0,list2=node.elements;i2<list2.length;i2+=1){var elt=list2[i2];elt&&c(elt,st,"Pattern")}},base.ObjectPattern=function(node,st,c){for(var i2=0,list2=node.properties;i2<list2.length;i2+=1){var prop=list2[i2];prop.type==="Property"?(prop.computed&&c(prop.key,st,"Expression"),c(prop.value,st,"Pattern")):prop.type==="RestElement"&&c(prop.argument,st,"Pattern")}},base.Expression=skipThrough,base.ThisExpression=base.Super=base.MetaProperty=ignore,base.ArrayExpression=function(node,st,c){for(var i2=0,list2=node.elements;i2<list2.length;i2+=1){var elt=list2[i2];elt&&c(elt,st,"Expression")}},base.ObjectExpression=function(node,st,c){for(var i2=0,list2=node.properties;i2<list2.length;i2+=1){var prop=list2[i2];c(prop,st)}},base.FunctionExpression=base.ArrowFunctionExpression=base.FunctionDeclaration,base.SequenceExpression=function(node,st,c){for(var i2=0,list2=node.expressions;i2<list2.length;i2+=1){var expr=list2[i2];c(expr,st,"Expression")}},base.TemplateLiteral=function(node,st,c){for(var i2=0,list2=node.quasis;i2<list2.length;i2+=1){var quasi=list2[i2];c(quasi,st)}for(var i$1=0,list$1=node.expressions;i$1<list$1.length;i$1+=1){var expr=list$1[i$1];c(expr,st,"Expression")}},base.TemplateElement=ignore,base.UnaryExpression=base.UpdateExpression=function(node,st,c){c(node.argument,st,"Expression")},base.BinaryExpression=base.LogicalExpression=function(node,st,c){c(node.left,st,"Expression"),c(node.right,st,"Expression")},base.AssignmentExpression=base.AssignmentPattern=function(node,st,c){c(node.left,st,"Pattern"),c(node.right,st,"Expression")},base.ConditionalExpression=function(node,st,c){c(node.test,st,"Expression"),c(node.consequent,st,"Expression"),c(node.alternate,st,"Expression")},base.NewExpression=base.CallExpression=function(node,st,c){if(c(node.callee,st,"Expression"),node.arguments)for(var i2=0,list2=node.arguments;i2<list2.length;i2+=1){var arg=list2[i2];c(arg,st,"Expression")}},base.MemberExpression=function(node,st,c){c(node.object,st,"Expression"),node.computed&&c(node.property,st,"Expression")},base.ExportNamedDeclaration=base.ExportDefaultDeclaration=function(node,st,c){node.declaration&&c(node.declaration,st,node.type==="ExportNamedDeclaration"||node.declaration.id?"Statement":"Expression"),node.source&&c(node.source,st,"Expression")},base.ExportAllDeclaration=function(node,st,c){node.exported&&c(node.exported,st),c(node.source,st,"Expression")},base.ImportDeclaration=function(node,st,c){for(var i2=0,list2=node.specifiers;i2<list2.length;i2+=1){var spec=list2[i2];c(spec,st)}c(node.source,st,"Expression")},base.ImportExpression=function(node,st,c){c(node.source,st,"Expression")},base.ImportSpecifier=base.ImportDefaultSpecifier=base.ImportNamespaceSpecifier=base.Identifier=base.PrivateIdentifier=base.Literal=ignore,base.TaggedTemplateExpression=function(node,st,c){c(node.tag,st,"Expression"),c(node.quasi,st,"Expression")},base.ClassDeclaration=base.ClassExpression=function(node,st,c){return c(node,st,"Class")},base.Class=function(node,st,c){node.id&&c(node.id,st,"Pattern"),node.superClass&&c(node.superClass,st,"Expression"),c(node.body,st)},base.ClassBody=function(node,st,c){for(var i2=0,list2=node.body;i2<list2.length;i2+=1){var elt=list2[i2];c(elt,st)}},base.MethodDefinition=base.PropertyDefinition=base.Property=function(node,st,c){node.computed&&c(node.key,st,"Expression"),node.value&&c(node.value,st,"Expression")};const defaultGlobals=new Set(["Array","ArrayBuffer","atob","AudioContext","Blob","Boolean","BigInt","btoa","clearInterval","clearTimeout","console","crypto","CustomEvent","DataView","Date","decodeURI","decodeURIComponent","devicePixelRatio","document","encodeURI","encodeURIComponent","Error","escape","eval","fetch","File","FileList","FileReader","Float32Array","Float64Array","Function","Headers","Image","ImageData","Infinity","Int16Array","Int32Array","Int8Array","Intl","isFinite","isNaN","JSON","Map","Math","NaN","Number","navigator","Object","parseFloat","parseInt","performance","Path2D","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","cancelAnimationFrame","requestAnimationFrame","Set","setInterval","setTimeout","String","Symbol","SyntaxError","TextDecoder","TextEncoder","this","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","URIError","URL","WeakMap","WeakSet","WebSocket","Worker","window"]),ohqWalk=make({Import(){},ViewExpression(node,st,c){c(node.id,st,"Identifier")},MutableExpression(node,st,c){c(node.id,st,"Identifier")}});function isScope(node){return node.type==="FunctionExpression"||node.type==="FunctionDeclaration"||node.type==="ArrowFunctionExpression"||node.type==="Program"}function isBlockScope(node){return node.type==="BlockStatement"||node.type==="ForInStatement"||node.type==="ForOfStatement"||node.type==="ForStatement"||isScope(node)}function declaresArguments(node){return node.type==="FunctionExpression"||node.type==="FunctionDeclaration"}function findReferences(cell,globals){const ast={type:"Program",body:[cell.body]},locals=new Map,globalSet=new Set(globals),references=[];function hasLocal(node,name){const l=locals.get(node);return l?l.has(name):!1}function declareLocal(node,id){const l=locals.get(node);l?l.add(id.name):locals.set(node,new Set([id.name]))}function declareClass(node){node.id&&declareLocal(node,node.id)}function declareFunction(node){node.params.forEach(param=>declarePattern(param,node)),node.id&&declareLocal(node,node.id)}function declareCatchClause(node){node.param&&declarePattern(node.param,node)}function declarePattern(node,parent){switch(node.type){case"Identifier":declareLocal(parent,node);break;case"ObjectPattern":node.properties.forEach(node2=>declarePattern(node2,parent));break;case"ArrayPattern":node.elements.forEach(node2=>node2&&declarePattern(node2,parent));break;case"Property":declarePattern(node.value,parent);break;case"RestElement":declarePattern(node.argument,parent);break;case"AssignmentPattern":declarePattern(node.left,parent);break;default:throw new Error("Unrecognized pattern type: "+node.type)}}function declareModuleSpecifier(node){declareLocal(ast,node.local)}ancestor(ast,{VariableDeclaration:(node,parents)=>{let parent=null;for(let i2=parents.length-1;i2>=0&&parent===null;--i2)(node.kind==="var"?isScope(parents[i2]):isBlockScope(parents[i2]))&&(parent=parents[i2]);node.declarations.forEach(declaration=>declarePattern(declaration.id,parent))},FunctionDeclaration:(node,parents)=>{let parent=null;for(let i2=parents.length-2;i2>=0&&parent===null;--i2)isScope(parents[i2])&&(parent=parents[i2]);declareLocal(parent,node.id),declareFunction(node)},Function:declareFunction,ClassDeclaration:(node,parents)=>{let parent=null;for(let i2=parents.length-2;i2>=0&&parent===null;i2--)isScope(parents[i2])&&(parent=parents[i2]);declareLocal(parent,node.id)},Class:declareClass,CatchClause:declareCatchClause,ImportDefaultSpecifier:declareModuleSpecifier,ImportSpecifier:declareModuleSpecifier,ImportNamespaceSpecifier:declareModuleSpecifier},ohqWalk);function identifier(node,parents){let name=node.name;if(name!=="undefined"){for(let i2=parents.length-2;i2>=0;--i2){if(name==="arguments"&&declaresArguments(parents[i2])||hasLocal(parents[i2],name))return;parents[i2].type==="ViewExpression"&&(node=parents[i2],name=`viewof ${node.id.name}`),parents[i2].type==="MutableExpression"&&(node=parents[i2],name=`mutable ${node.id.name}`)}if(!globalSet.has(name)){if(name==="arguments")throw Object.assign(new SyntaxError("arguments is not allowed"),{node});references.push(node)}}}ancestor(ast,{VariablePattern:identifier,Identifier:identifier},ohqWalk);function checkConst(node,parents){if(node)switch(node.type){case"Identifier":case"VariablePattern":{for(const parent of parents)if(hasLocal(parent,node.name))return;if(parents[parents.length-2].type==="MutableExpression")return;throw Object.assign(new SyntaxError(`Assignment to constant variable ${node.name}`),{node})}case"ArrayPattern":{for(const element of node.elements)checkConst(element,parents);return}case"ObjectPattern":{for(const property of node.properties)checkConst(property,parents);return}case"Property":{checkConst(node.value,parents);return}case"RestElement":{checkConst(node.argument,parents);return}}}function checkConstArgument(node,parents){checkConst(node.argument,parents)}function checkConstLeft(node,parents){checkConst(node.left,parents)}return ancestor(ast,{AssignmentExpression:checkConstLeft,AssignmentPattern:checkConstLeft,UpdateExpression:checkConstArgument,ForOfStatement:checkConstLeft,ForInStatement:checkConstLeft},ohqWalk),references}function findFeatures(cell,featureName){const ast={type:"Program",body:[cell.body]},features=new Map,{references}=cell;return simple(ast,{CallExpression:node=>{const{callee,arguments:args}=node;if(callee.type!=="Identifier"||callee.name!==featureName||references.indexOf(callee)<0)return;if(args.length!==1||!(args[0].type==="Literal"&&/^['"]/.test(args[0].raw)||args[0].type==="TemplateLiteral"&&args[0].expressions.length===0))throw Object.assign(new SyntaxError(`${featureName} requires a single literal string argument`),{node});const[arg]=args,name=arg.type==="Literal"?arg.value:arg.quasis[0].value.cooked,location={start:arg.start,end:arg.end};features.has(name)?features.get(name).push(location):features.set(name,[location])}},ohqWalk),features}const SCOPE_FUNCTION=2,SCOPE_ASYNC=4,SCOPE_GENERATOR=8;function parseCell$2(input,{tag,raw,globals,...options}={}){let cell;if(tag!=null&&input){cell=TemplateCellParser.parse(input,options);const parsedTag=CellTagParser.parse(tag,options);parseReferences(parsedTag,tag,globals),parseFeatures(parsedTag,tag),cell.tag=parsedTag,cell.raw=!!raw}else cell=CellParser.parse(input,options);return parseReferences(cell,input,globals),parseFeatures(cell,input),cell}class CellParser extends Parser{constructor(options,...args){super(Object.assign({ecmaVersion:13},options),...args)}enterScope(flags){return flags&SCOPE_FUNCTION&&++this.O_function,super.enterScope(flags)}exitScope(){return this.currentScope().flags&SCOPE_FUNCTION&&--this.O_function,super.exitScope()}parseForIn(node,init){return this.O_function===1&&node.await&&(this.O_async=!0),super.parseForIn(node,init)}parseAwait(){return this.O_function===1&&(this.O_async=!0),super.parseAwait()}parseYield(noIn){return this.O_function===1&&(this.O_generator=!0),super.parseYield(noIn)}parseImport(node){return this.next(),node.specifiers=this.parseImportSpecifiers(),this.type===types$1._with&&(this.next(),node.injections=this.parseImportSpecifiers()),this.expectContextual("from"),node.source=this.type===types$1.string?this.parseExprAtom():this.unexpected(),this.finishNode(node,"ImportDeclaration")}parseImportSpecifiers(){const nodes=[],identifiers=new Set;let first=!0;for(this.expect(types$1.braceL);!this.eat(types$1.braceR);){if(first)first=!1;else if(this.expect(types$1.comma),this.afterTrailingComma(types$1.braceR))break;const node=this.startNode();node.view=this.eatContextual("viewof"),node.mutable=node.view?!1:this.eatContextual("mutable"),node.imported=this.parseIdent(),this.checkUnreserved(node.imported),this.checkLocal(node.imported),this.eatContextual("as")?(node.local=this.parseIdent(),this.checkUnreserved(node.local),this.checkLocal(node.local)):node.local=node.imported,this.checkLValSimple(node.local,"let"),identifiers.has(node.local.name)&&this.raise(node.local.start,`Identifier '${node.local.name}' has already been declared`),identifiers.add(node.local.name),nodes.push(this.finishNode(node,"ImportSpecifier"))}return nodes}parseExprAtom(refDestructuringErrors){return this.parseMaybeKeywordExpression("viewof","ViewExpression")||this.parseMaybeKeywordExpression("mutable","MutableExpression")||super.parseExprAtom(refDestructuringErrors)}startCell(){this.O_function=0,this.O_async=!1,this.O_generator=!1,this.strict=!0,this.enterScope(SCOPE_FUNCTION|SCOPE_ASYNC|SCOPE_GENERATOR)}finishCell(node,body,id){return id&&this.checkLocal(id),node.id=id,node.body=body,node.async=this.O_async,node.generator=this.O_generator,this.exitScope(),this.finishNode(node,"Cell")}parseCell(node,eof){const lookahead=new CellParser({},this.input,this.start);let token=lookahead.getToken(),body=null,id=null;return this.startCell(),token.type===types$1._import&&lookahead.getToken().type!==types$1.parenL?body=this.parseImport(this.startNode()):token.type!==types$1.eof&&token.type!==types$1.semi&&(token.type===types$1.name&&((token.value==="viewof"||token.value==="mutable")&&(token=lookahead.getToken(),token.type!==types$1.name&&lookahead.unexpected()),token=lookahead.getToken(),token.type===types$1.eq&&(id=this.parseMaybeKeywordExpression("viewof","ViewExpression")||this.parseMaybeKeywordExpression("mutable","MutableExpression")||this.parseIdent(),token=lookahead.getToken(),this.expect(types$1.eq))),token.type===types$1.braceL?body=this.parseBlock():(body=this.parseExpression(),id===null&&(body.type==="FunctionExpression"||body.type==="ClassExpression")&&(id=body.id))),this.semicolon(),eof&&this.expect(types$1.eof),this.finishCell(node,body,id)}parseTopLevel(node){return this.parseCell(node,!0)}toAssignable(node,isBinding,refDestructuringErrors){return node.type==="MutableExpression"?node:super.toAssignable(node,isBinding,refDestructuringErrors)}checkLocal(id){const node=id.id||id;(defaultGlobals.has(node.name)||node.name==="arguments")&&this.raise(node.start,`Identifier '${node.name}' is reserved`)}checkUnreserved(node){return(node.name==="viewof"||node.name==="mutable")&&this.raise(node.start,`Unexpected keyword '${node.name}'`),super.checkUnreserved(node)}checkLValSimple(expr,bindingType,checkClashes){return super.checkLValSimple(expr.type==="MutableExpression"?expr.id:expr,bindingType,checkClashes)}unexpected(pos){this.raise(pos??this.start,this.type===types$1.eof?"Unexpected end of input":"Unexpected token")}parseMaybeKeywordExpression(keyword,type){if(this.isContextual(keyword)){const node=this.startNode();return this.next(),node.id=this.parseIdent(),this.finishNode(node,type)}}}const o_tmpl=new TokContext("`",!0,!0,parser=>readTemplateToken.call(parser));class TemplateCellParser extends CellParser{constructor(...args){super(...args),this.type=types$1.backQuote,this.exprAllowed=!1}initialContext(){return[o_tmpl]}parseCell(node){this.startCell(),this.type===types$1.eof&&(this.value="");const isTagged=!0,body=this.startNode();body.expressions=[];let curElt=this.parseTemplateElement({isTagged});for(body.quasis=[curElt];this.type!==types$1.eof;)this.expect(types$1.dollarBraceL),body.expressions.push(this.parseExpression()),this.expect(types$1.braceR),body.quasis.push(curElt=this.parseTemplateElement({isTagged}));return curElt.tail=!0,this.next(),this.finishNode(body,"TemplateLiteral"),this.expect(types$1.eof),this.finishCell(node,body,null)}}function readTemplateToken(){out:for(;this.pos<this.input.length;this.pos++)switch(this.input.charCodeAt(this.pos)){case 92:{this.pos<this.input.length-1&&++this.pos;break}case 36:{if(this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&this.type===types$1.invalidTemplate)return this.pos+=2,this.finishToken(types$1.dollarBraceL);break out}break}}return this.finishToken(types$1.invalidTemplate,this.input.slice(this.start,this.pos))}class CellTagParser extends Parser{constructor(options,...args){super(Object.assign({ecmaVersion:12},options),...args)}enterScope(flags){return flags&SCOPE_FUNCTION&&++this.O_function,super.enterScope(flags)}exitScope(){return this.currentScope().flags&SCOPE_FUNCTION&&--this.O_function,super.exitScope()}parseForIn(node,init){return this.O_function===1&&node.await&&(this.O_async=!0),super.parseForIn(node,init)}parseAwait(){return this.O_function===1&&(this.O_async=!0),super.parseAwait()}parseYield(noIn){return this.O_function===1&&(this.O_generator=!0),super.parseYield(noIn)}parseTopLevel(node){return this.O_function=0,this.O_async=!1,this.O_generator=!1,this.strict=!0,this.enterScope(SCOPE_FUNCTION|SCOPE_ASYNC|SCOPE_GENERATOR),node.body=this.parseExpression(),node.input=this.input,node.async=this.O_async,node.generator=this.O_generator,this.exitScope(),this.finishNode(node,"CellTag")}}function parseReferences(cell,input,globals=defaultGlobals){if(!cell.body)cell.references=[];else if(cell.body.type==="ImportDeclaration")cell.references=cell.body.injections?cell.body.injections.map(i2=>i2.imported):[];else try{cell.references=findReferences(cell,globals)}catch(error){if(error.node){const loc=getLineInfo(input,error.node.start);error.message+=` (${loc.line}:${loc.column})`,error.pos=error.node.start,error.loc=loc,delete error.node}throw error}return cell}function parseFeatures(cell,input){if(cell.body&&cell.body.type!=="ImportDeclaration")try{cell.fileAttachments=findFeatures(cell,"FileAttachment"),cell.databaseClients=findFeatures(cell,"DatabaseClient"),cell.secrets=findFeatures(cell,"Secret"),cell.notificationClients=findFeatures(cell,"NotificationClient")}catch(error){if(error.node){const loc=getLineInfo(input,error.node.start);error.message+=` (${loc.line}:${loc.column})`,error.pos=error.node.start,error.loc=loc,delete error.node}throw error}else cell.fileAttachments=new Map,cell.databaseClients=new Map,cell.secrets=new Map,cell.notificationClients=new Map;return cell}class ModuleParser extends CellParser{parseTopLevel(node){for(node.cells||(node.cells=[]);this.type!==types$1.eof;){const cell=this.parseCell(this.startNode());cell.input=this.input,node.cells.push(cell)}return this.next(),this.finishNode(node,"Program")}}function splitModule(input){return ModuleParser.parse(input,{ecmaVersion:"latest"}).cells.map(cell=>({type:"Cell",text:input.substring(cell.start,cell.end),start:cell.start,end:cell.end}))}function parseCell$1(input){return parseCell$2(input)}const walk=ohqWalk,FuncTypes={functionType:Object.getPrototypeOf(function(){}).constructor,asyncFunctionType:Object.getPrototypeOf(async function(){}).constructor,generatorFunctionType:Object.getPrototypeOf(function*(){}).constructor,asyncGeneratorFunctionType:Object.getPrototypeOf(async function*(){}).constructor};function funcType(async=!1,generator=!1){return!async&&!generator?FuncTypes.functionType:async&&!generator?FuncTypes.asyncFunctionType:!async&&generator?FuncTypes.generatorFunctionType:FuncTypes.asyncGeneratorFunctionType}function createFunction(refs,async=!1,generator=!1,blockStatement=!1,body){if(body!==void 0)return refs.patches.sort((l,r)=>r.start-l.start),refs.patches.forEach(r=>{body=body.substring(0,r.start)+r.newText+body.substring(r.end)}),new(funcType(async,generator))(...refs.args,blockStatement?body.substring(1,body.length-1).trim():`return (
|
|
10
|
-
${body}
|
|
11
|
-
);`)}function join(baseURL,relativeURL){return relativeURL?baseURL.replace(/\/+$/,"")+"/"+relativeURL.replace(/^\/+/,""):baseURL}const isRelativePath=path=>path[0]===".",fixRelativeUrl=(path,basePath)=>isRelativePath(path)?join(basePath,path):path;async function obfuscatedImport(url){return new FuncTypes.asyncFunctionType("url","return import(url)")(url)}function encodeBacktick(str){return str.split("`").join("\\`")}function createParsedOJS(ojs,offset,inlineMD){let cell,error;try{cell=parseCell$1(ojs)}catch(e){error=e}return{ojs,offset,inlineMD,cell,error}}function splitOmd(_){const retVal=[],re=/(```(?:\s|\S)[\s\S]*?```)/g;let prevOffset=0,match=re.exec(_);for(;match!==null;){match.index>prevOffset&&retVal.push(createParsedOJS(_.substring(prevOffset,match.index),prevOffset,!0));const outer=match[0];if(outer.indexOf("``` ")===0||outer.indexOf("```\n")===0||outer.indexOf("```\r\n")===0){const inner=outer.substring(3,outer.length-3);retVal.push(createParsedOJS(inner,match.index+3,!1))}else retVal.push(createParsedOJS(outer,match.index,!0));prevOffset=match.index+match[0].length,match=re.exec(_)}return _.length>prevOffset&&retVal.push(createParsedOJS(_.substring(prevOffset,_.length),prevOffset,!0)),retVal}function ojs2notebook(ojs){const cells=splitModule(ojs);return{files:[],nodes:cells.map((cell,idx)=>({id:idx,mode:"js",value:cell.text,start:cell.start,end:cell.end}))}}function omd2notebook(omd){const cells=splitOmd(omd);return{files:[],nodes:cells.map((cell,idx)=>({id:idx,mode:cell.inlineMD?"md":"js",value:cell.ojs,start:cell.offset,end:cell.offset+cell.ojs.length}))}}function fetchEx(url,proxyPrefix="https://api.codetabs.com/v1/proxy/?quest=",proxyPostfix=""){const matches=url.match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n?]+)/img);if(!matches||matches.length===0)throw new Error(`Invalid URL: ${url}`);return fetch(url,{headers:{origin:matches[0],referer:url}}).then(response=>{if(response.ok)return response;throw new Error("CORS?")}).catch(e=>(url=`${proxyPrefix}${url}${proxyPostfix}`,fetch(url,{headers:{origin:matches[0],referer:url}})))}function download(impUrl,proxyPrefix,proxyPostfix){const isShared=impUrl.indexOf("https://observablehq.com/d")===0;return fetchEx(impUrl.replace(`https://observablehq.com/${isShared?"d/":""}`,"https://api.observablehq.com/document/"),proxyPrefix,proxyPostfix).then(r=>r.json())}function calcRefs(cellAst,cellStr){if(cellAst.references===void 0)return{inputs:[],args:[],patches:[]};const dedup={};cellAst.references.forEach(r=>dedup[cellStr.substring(r.start,r.end)]=!0);const retVal={inputs:Object.keys(dedup),args:Object.keys(dedup).map(r=>r.split(" ").join("_")),patches:[]},pushPatch=(node,newText)=>{var _a,_b;return retVal.patches.push({start:node.start-(((_a=cellAst.body)==null?void 0:_a.start)??0),end:node.end-(((_b=cellAst.body)==null?void 0:_b.start)??0),newText})};return cellAst.body&&ancestor(cellAst.body,{Identifier(node){cellStr.substring(node.start,node.end)},MutableExpression(node){const newText=cellStr.substring(node.start,node.end).split(" ").join("_")+".value";pushPatch(node,newText)},ViewExpression(node){const newText=cellStr.substring(node.start,node.end).split(" ").join("_");pushPatch(node,newText)},ThisExpression(node,ancestors){cellStr.substring(node.start,node.end)==="this"&&!ancestors.find(n=>n.type==="FunctionExpression")&&pushPatch(node,"((this === globalThis || this === globalThis.window)? undefined : this?.valueOf())")}},walk),retVal}function parseImportDeclaration(cellAst){var _a,_b;return{type:"import",src:cellAst.body.source.value,specifiers:((_a=cellAst.body.specifiers)==null?void 0:_a.map(spec=>{var _a2;return{view:spec.view,name:spec.imported.name,alias:(_a2=spec.local)!=null&&_a2.name&&spec.imported.name!==spec.local.name?spec.local.name:spec.imported.name}}))??[],injections:((_b=cellAst.body.injections)==null?void 0:_b.map(inj=>{var _a2;return{name:inj.imported.name,alias:((_a2=inj.local)==null?void 0:_a2.name)??inj.imported.name}}))??[]}}function parseViewExpression(cellStr,cellAst,refs,bodyStr){var _a,_b;const id=cellAst.id&&cellStr.substring(cellAst.id.start,cellAst.id.end);return{type:"viewof",variable:{type:"variable",id,inputs:refs.inputs,func:createFunction(refs,cellAst.async,cellAst.generator,cellAst.body.type==="BlockStatement",bodyStr)},variableValue:{type:"variable",id:(_b=(_a=cellAst==null?void 0:cellAst.id)==null?void 0:_a.id)==null?void 0:_b.name,inputs:["Generators",id],func:(G,_)=>G.input(_)}}}function parseMutableExpression(cellStr,cellAst,refs,bodyStr){var _a,_b;const id=cellAst.id&&cellStr.substring(cellAst.id.start,cellAst.id.end),initialValueId=(_b=(_a=cellAst==null?void 0:cellAst.id)==null?void 0:_a.id)==null?void 0:_b.name,initialId=`initial ${initialValueId}`;return{type:"mutable",initial:{type:"variable",id:initialId,inputs:refs.inputs,func:createFunction(refs,cellAst.async,cellAst.generator,cellAst.body.type==="BlockStatement",bodyStr)},variable:{type:"variable",id,inputs:["Mutable",initialId],func:(M,_)=>new M(_)},variableValue:{type:"variable",id:initialValueId,inputs:[id],func:_=>_.generator}}}function parseVariableExpression(cellStr,cellAst,refs,bodyStr){var _a,_b;return{type:"variable",id:cellAst.id&&cellStr.substring((_a=cellAst.id)==null?void 0:_a.start,(_b=cellAst.id)==null?void 0:_b.end),inputs:refs.inputs,func:createFunction(refs,cellAst.async,cellAst.generator,cellAst.body.type==="BlockStatement",bodyStr)}}function parseCell(cellStr,baseUrl){var _a,_b;const cellAst=parseCell$1(cellStr);let bodyStr=cellAst.body&&cellStr.substring(cellAst.body.start,cellAst.body.end);switch((_a=cellAst.body)==null?void 0:_a.type){case"ImportDeclaration":return parseImportDeclaration(cellAst);case"ImportExpression":switch(cellAst.body.source.type){case"Literal":bodyStr=`import("${fixRelativeUrl(""+cellAst.body.source.value,baseUrl)}")`;break;default:console.error("Unexpected import value")}}const refs=calcRefs(cellAst,cellStr);switch((_b=cellAst.id)==null?void 0:_b.type){case"ViewExpression":return parseViewExpression(cellStr,cellAst,refs,bodyStr);case"MutableExpression":return parseMutableExpression(cellStr,cellAst,refs,bodyStr);default:return parseVariableExpression(cellStr,cellAst,refs,bodyStr)}}class Writer{constructor(){__publicField(this,"_files",[]);__publicField(this,"_imports",[]);__publicField(this,"_functions",[]);__publicField(this,"_defines",[]);__publicField(this,"_defineUid",0);__publicField(this,"_functionUid",0)}toString(){return`${this._imports.join(`
|
|
12
|
-
`)}
|
|
13
|
-
|
|
14
|
-
${this._functions.join(`
|
|
15
|
-
`).split(`
|
|
16
|
-
) {`).join("){")}
|
|
17
|
-
|
|
18
|
-
export default function define(runtime, observer) {
|
|
19
|
-
const main = runtime.module();
|
|
20
|
-
|
|
21
|
-
function toString() { return this.url; }
|
|
22
|
-
const fileAttachments = new Map([
|
|
23
|
-
${this._files.map(f=>`["${f.name}", { url: new URL("${f.url}"), mimeType: ${JSON.stringify(f.mime_type)}, toString }]`).join(`,
|
|
24
|
-
`)}
|
|
25
|
-
]);
|
|
26
|
-
main.builtin("FileAttachment", runtime.fileAttachments(name => fileAttachments.get(name)));
|
|
27
|
-
|
|
28
|
-
${this._defines.join(`
|
|
29
|
-
`)}
|
|
30
|
-
|
|
31
|
-
return main;
|
|
32
|
-
}
|
|
33
|
-
`}files(files){this._files=[...this._files,...files]}import(url){this._imports.push(`import define${++this._defineUid} from "${url}"; `)}importDefine(imp){const impInjections=imp.injections??[],injections=impInjections.map(inj=>inj.name===inj.alias?`"${inj.name}"`:`{name: "${inj.name}", alias: "${inj.alias}"}`),derive=impInjections.length?`.derive([${injections.join(", ")}], main)`:"";this._defines.push(`const child${this._defineUid} = runtime.module(define${this._defineUid})${derive};`),(imp.specifiers??[]).forEach(s=>{this._defines.push(`main.import("${s.name}"${s.alias&&s.alias!==s.name?`, "${s.alias}"`:""}, child${this._defineUid}); `)})}function(variable){var _a,_b;let id=variable.id??`${++this._functionUid}`;const idParts=id.split(" ");return id=`_${idParts[idParts.length-1]}`,this._functions.push(`${(_b=(_a=variable.func)==null?void 0:_a.toString())==null?void 0:_b.replace("anonymous",`${id}`)}`),id}define(variable,observable=!0,inlineFunc=!1,funcId){var _a;funcId=funcId??variable.id;const observe=observable?`.variable(observer(${variable.id?JSON.stringify(variable.id):""}))`:"",id=variable.id?`${JSON.stringify(variable.id)}, `:"",variableInputs=variable.inputs??[],inputs=variableInputs.length?`[${variableInputs.map(i2=>JSON.stringify(i2)).join(", ")}], `:"",func=inlineFunc?(_a=variable.func)==null?void 0:_a.toString():funcId;this._defines.push(`main${observe}.define(${id}${inputs}${func});`)}error(msg){}}async function importFile(relativePath,baseUrl){const path=fixRelativeUrl(relativePath,baseUrl),content=await fetchEx(path).then(r=>r.text());let notebook2;relativePath.endsWith(".ojsnb")?notebook2=JSON.parse(content):relativePath.endsWith(".ojs")?notebook2=ojs2notebook(content):relativePath.endsWith(".omd")?notebook2=omd2notebook(content):(console.warn(`Unknown file type: ${relativePath}, assuming .ojsnb`),notebook2=JSON.parse(content));const retVal=compile(notebook2,{baseUrl});return retVal.delete=()=>{},retVal.write=w=>{w.import(path)},retVal}async function importCompiledNotebook(partial){const url=`https://api.observablehq.com/${partial[0]==="@"?partial:`d/${partial}`}.js?v=3`;let impMod={default:function(runtime,inspector){}};try{impMod=await obfuscatedImport(url)}catch{}const retVal=impMod.default;return retVal.delete=()=>{},retVal.write=w=>{w.import(url)},retVal}async function importNotebook(partial){const url=`https://api.observablehq.com/document/${partial}`,notebook2=fetchEx(url).then(r=>r.json()).catch(e=>{console.error(url),console.error(e)}),retVal=compile(await notebook2);return retVal.delete=()=>{},retVal.write=w=>{w.import(url)},retVal}async function createModule(node,parsed,text,{baseUrl,importMode}){const otherModule=isRelativePath(parsed.src)?await importFile(parsed.src,baseUrl??""):importMode==="recursive"?await importNotebook(parsed.src):await importCompiledNotebook(parsed.src),importVariables=[],variables=[];parsed.specifiers.forEach(spec=>{const viewof=spec.view?"viewof ":"";importVariables.push(createImportVariable(viewof+spec.name,viewof+spec.alias)),spec.view&&importVariables.push(createImportVariable(spec.name,spec.alias))});const retVal=(runtime,main,inspector)=>{let mod=runtime.module(otherModule);return parsed.injections.length&&(mod=mod.derive(parsed.injections,main)),variables.forEach(v=>v(main,inspector)),importVariables.forEach(v=>v(main,mod)),mod};return retVal.importVariables=importVariables,retVal.variables=variables,retVal.delete=()=>{importVariables.forEach(v=>v.delete()),variables.forEach(v=>v.delete()),otherModule.delete()},retVal.write=w=>{otherModule.write(w),w.importDefine(parsed)},retVal}function createVariable(node,inspect,name,inputs,definition,inline=!1){let i2,v;const retVal=(module2,inspector)=>{if(inspect&&inspector&&(i2=inspector(name,node.id)),v=module2.variable(i2),arguments.length>1)try{v.define(name,inputs,definition)}catch(e){console.error(e==null?void 0:e.message)}if(node.pinned){v=inspector?module2.variable(inspector(name,node.id)):module2.variable();try{v.define(void 0,["md"],md=>md`\`\`\`js
|
|
34
|
-
${node.value}
|
|
35
|
-
\`\`\``)}catch(e){console.error(e==null?void 0:e.message)}}return v};return retVal.delete=()=>{var _a;try{(_a=i2==null?void 0:i2._node)==null||_a.remove()}catch{}i2=void 0;try{v==null||v.delete()}catch{}v=void 0},retVal.write=w=>{if(inline)w.define({id:name,inputs,func:definition},inspect,!0);else{const id=w.function({id:name,func:definition});w.define({id:name,inputs,func:definition},inspect,!1,id)}},retVal}function createImportVariable(name,alias){let v;const retVal=(main,otherModule)=>{v=main.variable(),alias===void 0?v.import(name,otherModule):v.import(name,alias,otherModule)};return retVal.delete=()=>{v==null||v.delete()},retVal}async function createCell(node,options){const modules=[],variables=[];try{const text=node.mode&&node.mode!=="js"?`${node.mode}\`${encodeBacktick(node.value)}\``:node.value,parsedModule=splitModule(text);for(const cell of parsedModule){const parsed=parseCell(cell.text,options.baseUrl??"");switch(parsed.type){case"import":modules.push(await createModule(node,parsed,cell.text,options));break;case"viewof":variables.push(createVariable(node,!0,parsed.variable.id,parsed.variable.inputs,parsed.variable.func)),variables.push(createVariable(node,!1,parsed.variableValue.id,parsed.variableValue.inputs,parsed.variableValue.func,!0));break;case"mutable":variables.push(createVariable(node,!1,parsed.initial.id,parsed.initial.inputs,parsed.initial.func)),variables.push(createVariable(node,!1,parsed.variable.id,parsed.variable.inputs,parsed.variable.func)),variables.push(createVariable(node,!0,parsed.variableValue.id,parsed.variableValue.inputs,parsed.variableValue.func,!0));break;case"variable":variables.push(createVariable(node,!0,parsed.id,parsed.inputs,parsed.func));break}}}catch(e){variables.push(createVariable(node,!0,void 0,[],e.message??"Unkown error"))}const retVal=(runtime,main,inspector)=>{modules.forEach(imp=>imp(runtime,main,inspector)),variables.forEach(v=>v(main,inspector))};return retVal.id=node.id,retVal.modules=modules,retVal.variables=variables,retVal.delete=()=>{variables.forEach(v=>v.delete()),modules.forEach(mod=>mod.delete())},retVal.write=w=>{modules.forEach(imp=>imp.write(w)),variables.forEach(v=>v.write(w))},retVal}function createFile(file,options){function toString2(){return globalThis.url??""}return[file.name,{url:new URL(fixRelativeUrl(file.url,options.baseUrl??"")),mimeType:file.mime_type,toString:toString2}]}function notebook(_files=[],_cells=[],{baseUrl=".",importMode="precompiled"}={}){const files=_files.map(f=>createFile(f,{baseUrl})),fileAttachments=new Map(files),cells=new Map(_cells.map(c=>[c.id,c])),retVal=(runtime,inspector)=>{const main=runtime.module();return main.builtin("FileAttachment",runtime.fileAttachments(name=>fileAttachments.get(name)??{url:new URL(fixRelativeUrl(name,baseUrl)),mimeType:null})),main.builtin("fetchEx",fetchEx),cells.forEach(cell=>{cell(runtime,main,inspector)}),main};return retVal.fileAttachments=fileAttachments,retVal.cells=cells,retVal.set=async n=>{const cell=await createCell(n,{baseUrl,importMode});return retVal.delete(cell.id),cells.set(cell.id,cell),cell},retVal.get=id=>cells.get(id),retVal.delete=id=>{const cell=cells.get(id);return cell?(cell.delete(),cells.delete(id)):!1},retVal.clear=()=>{cells.forEach(cell=>cell.delete()),cells.clear()},retVal.write=w=>{w.files(_files),cells.forEach(cell=>cell.write(w))},retVal.toString=(w=new Writer)=>(retVal.write(w),w.toString().trim()),retVal}async function compile(notebookOrOjs,{baseUrl=".",importMode="precompiled"}={}){const ojsNotebook=typeof notebookOrOjs=="string"?ojs2notebook(notebookOrOjs):notebookOrOjs,_cells=await Promise.all(ojsNotebook.nodes.map(n=>createCell(n,{baseUrl,importMode})));return notebook(ojsNotebook.files,_cells,{baseUrl,importMode})}exports2.Writer=Writer,exports2.compile=compile,exports2.download=download,exports2.notebook=notebook,exports2.ojs2notebook=ojs2notebook,exports2.omd2notebook=omd2notebook,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/observablehq-compiler"]={})}(this,function(t){"use strict";var e=Object.defineProperty,i=(t,i)=>e(t,"name",{value:i,configurable:!0}),s=(t,i,s)=>((t,i,s)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s)(t,"symbol"!=typeof i?i+"":i,s),r=[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],n=[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],a="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",o={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"},h="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",p={5:h,"5module":h+" export import",6:h+" const class extends export import super"},c=/^in(stanceof)?$/,l=new RegExp("["+a+"]"),u=new RegExp("["+a+"·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function d(t,e){for(var i=65536,s=0;s<e.length;s+=2){if((i+=e[s])>t)return!1;if((i+=e[s+1])>=t)return!0}return!1}function f(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&l.test(String.fromCharCode(t)):!1!==e&&d(t,n)))}function m(t,e){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&u.test(String.fromCharCode(t)):!1!==e&&(d(t,n)||d(t,r)))))}i(d,"isInAstralSet"),i(f,"isIdentifierStart"),i(m,"isIdentifierChar");var g=i(function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null},"TokenType");function x(t,e){return new g(t,{beforeExpr:!0,binop:e})}i(x,"binop");var v={beforeExpr:!0},y={startsExpr:!0},b={};function S(t,e){return void 0===e&&(e={}),e.keyword=t,b[t]=new g(t,e)}i(S,"kw");var k={num:new g("num",y),regexp:new g("regexp",y),string:new g("string",y),name:new g("name",y),privateId:new g("privateId",y),eof:new g("eof"),bracketL:new g("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new g("]"),braceL:new g("{",{beforeExpr:!0,startsExpr:!0}),braceR:new g("}"),parenL:new g("(",{beforeExpr:!0,startsExpr:!0}),parenR:new g(")"),comma:new g(",",v),semi:new g(";",v),colon:new g(":",v),dot:new g("."),question:new g("?",v),questionDot:new g("?."),arrow:new g("=>",v),template:new g("template"),invalidTemplate:new g("invalidTemplate"),ellipsis:new g("...",v),backQuote:new g("`",y),dollarBraceL:new g("${",{beforeExpr:!0,startsExpr:!0}),eq:new g("=",{beforeExpr:!0,isAssign:!0}),assign:new g("_=",{beforeExpr:!0,isAssign:!0}),incDec:new g("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new g("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:x("||",1),logicalAND:x("&&",2),bitwiseOR:x("|",3),bitwiseXOR:x("^",4),bitwiseAND:x("&",5),equality:x("==/!=/===/!==",6),relational:x("</>/<=/>=",7),bitShift:x("<</>>/>>>",8),plusMin:new g("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:x("%",10),star:x("*",10),slash:x("/",10),starstar:new g("**",{beforeExpr:!0}),coalesce:x("??",1),_break:S("break"),_case:S("case",v),_catch:S("catch"),_continue:S("continue"),_debugger:S("debugger"),_default:S("default",v),_do:S("do",{isLoop:!0,beforeExpr:!0}),_else:S("else",v),_finally:S("finally"),_for:S("for",{isLoop:!0}),_function:S("function",y),_if:S("if"),_return:S("return",v),_switch:S("switch"),_throw:S("throw",v),_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",y),_super:S("super",y),_class:S("class",y),_extends:S("extends",v),_export:S("export"),_import:S("import",y),_null:S("null",y),_true:S("true",y),_false:S("false",y),_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})},_=/\r\n?|\n|\u2028|\u2029/,w=new RegExp(_.source,"g");function E(t){return 10===t||13===t||8232===t||8233===t}function C(t,e,i){void 0===i&&(i=t.length);for(var s=e;s<i;s++){var r=t.charCodeAt(s);if(E(r))return s<i-1&&13===r&&10===t.charCodeAt(s+1)?s+2:s+1}return-1}i(E,"isNewLine"),i(C,"nextLineBreak");var I=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,A=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,P=Object.prototype,T=P.hasOwnProperty,V=P.toString,N=Object.hasOwn||function(t,e){return T.call(t,e)},L=Array.isArray||function(t){return"[object Array]"===V.call(t)},R=Object.create(null);function O(t){return R[t]||(R[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function D(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}i(O,"wordsRegexp"),i(D,"codePointToString");var M=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,F=i(function(t,e){this.line=t,this.column=e},"Position");F.prototype.offset=i(function(t){return new F(this.line,this.column+t)},"offset");var B=i(function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)},"SourceLocation");function U(t,e){for(var i=1,s=0;;){var r=C(t,s,e);if(r<0)return new F(i,e-s);++i,s=r}}i(U,"getLineInfo");var j={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,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},q=!1;function $(t){var e={};for(var i in j)e[i]=t&&N(t,i)?t[i]:j[i];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!q&&"object"==typeof console&&console.warn&&(q=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),t&&null!=t.allowHashBang||(e.allowHashBang=e.ecmaVersion>=14),L(e.onToken)){var s=e.onToken;e.onToken=function(t){return s.push(t)}}return L(e.onComment)&&(e.onComment=W(e,e.onComment)),e}function W(t,e){return function(i,s,r,n,a,o){var h={type:i?"Block":"Line",value:s,start:r,end:n};t.locations&&(h.loc=new B(this,a,o)),t.ranges&&(h.range=[r,n]),e.push(h)}}i($,"getOptions"),i(W,"pushComment");var G=256,H=259;function z(t,e){return 2|(t?4:0)|(e?8:0)}i(z,"functionFlags");var K=i(function(t,e,i){this.options=t=$(t),this.sourceFile=t.sourceFile,this.keywords=O(p[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var s="";!0!==t.allowReserved&&(s=o[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(s+=" await")),this.reservedWords=O(s);var r=(s?s+" ":"")+o.strict;this.reservedWordsStrict=O(r),this.reservedWordsStrictBind=O(r+" "+o.strictBind),this.input=String(e),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(_).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=k.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"===t.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&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},"Parser"),Q={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}};K.prototype.parse=i(function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},"parse"),Q.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Q.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},Q.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},Q.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e)return!1;if(2&e)return(4&e)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Q.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},Q.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Q.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Q.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e||2&e&&!(16&e))return!0}return!1},Q.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&G)>0},K.extend=i(function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=this,s=0;s<t.length;s++)i=t[s](i);return i},"extend"),K.parse=i(function(t,e){return new this(e,t).parse()},"parse"),K.parseExpressionAt=i(function(t,e,i){var s=new this(i,t,e);return s.nextToken(),s.parseExpression()},"parseExpressionAt"),K.tokenizer=i(function(t,e){return new this(e,t)},"tokenizer"),Object.defineProperties(K.prototype,Q);var Y=K.prototype,J=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Y.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){A.lastIndex=t,t+=A.exec(this.input)[0].length;var e=J.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){A.lastIndex=t+e[0].length;var i=A.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return";"===r||"}"===r||_.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||"!"===r&&"="===this.input.charAt(s+1))}t+=e[0].length,A.lastIndex=t,t+=A.exec(this.input)[0].length,";"===this.input[t]&&t++}},Y.eat=function(t){return this.type===t&&(this.next(),!0)},Y.isContextual=function(t){return this.type===k.name&&this.value===t&&!this.containsEsc},Y.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},Y.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},Y.canInsertSemicolon=function(){return this.type===k.eof||this.type===k.braceR||_.test(this.input.slice(this.lastTokEnd,this.start))},Y.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Y.semicolon=function(){this.eat(k.semi)||this.insertSemicolon()||this.unexpected()},Y.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},Y.expect=function(t){this.eat(t)||this.unexpected()},Y.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")};var X=i(function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1},"DestructuringErrors");Y.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;i>-1&&this.raiseRecoverable(i,e?"Assigning to rvalue":"Parenthesized pattern")}},Y.checkExpressionErrors=function(t,e){if(!t)return!1;var i=t.shorthandAssign,s=t.doubleProto;if(!e)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")},Y.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")},Y.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var Z=K.prototype;Z.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==k.eof;){var i=this.parseStatement(null,!0,e);t.body.push(i)}if(this.inModule)for(var s=0,r=Object.keys(this.undefinedExports);s<r.length;s+=1){var n=r[s];this.raiseRecoverable(this.undefinedExports[n].start,"Export '"+n+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType,this.finishNode(t,"Program")};var tt={kind:"loop"},et={kind:"switch"};Z.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;A.lastIndex=this.pos;var e=A.exec(this.input),i=this.pos+e[0].length,s=this.input.charCodeAt(i);if(91===s||92===s)return!0;if(t)return!1;if(123===s||s>55295&&s<56320)return!0;if(f(s,!0)){for(var r=i+1;m(s=this.input.charCodeAt(r),!0);)++r;if(92===s||s>55295&&s<56320)return!0;var n=this.input.slice(i,r);if(!c.test(n))return!0}return!1},Z.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;A.lastIndex=this.pos;var t,e=A.exec(this.input),i=this.pos+e[0].length;return!(_.test(this.input.slice(this.pos,i))||"function"!==this.input.slice(i,i+8)||i+8!==this.input.length&&(m(t=this.input.charCodeAt(i+8))||t>55295&&t<56320))},Z.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;A.lastIndex=this.pos;var i=A.exec(this.input),s=this.pos+i[0].length;if(_.test(this.input.slice(this.pos,s)))return!1;if(t){var r,n=s+5;if("using"!==this.input.slice(s,n)||n===this.input.length||m(r=this.input.charCodeAt(n))||r>55295&&r<56320)return!1;A.lastIndex=n;var a=A.exec(this.input);if(a&&_.test(this.input.slice(n,n+a[0].length)))return!1}if(e){var o,h=s+2;if(!("of"!==this.input.slice(s,h)||h!==this.input.length&&(m(o=this.input.charCodeAt(h))||o>55295&&o<56320)))return!1}var p=this.input.charCodeAt(s);return f(p,!0)||92===p},Z.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},Z.isUsing=function(t){return this.isUsingKeyword(!1,t)},Z.parseStatement=function(t,e,i){var s,r=this.type,n=this.startNode();switch(this.isLet(t)&&(r=k._var,s="let"),r){case k._break:case k._continue:return this.parseBreakContinueStatement(n,r.keyword);case k._debugger:return this.parseDebuggerStatement(n);case k._do:return this.parseDoStatement(n);case k._for:return this.parseForStatement(n);case k._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(n,!1,!t);case k._class:return t&&this.unexpected(),this.parseClass(n,!0);case k._if:return this.parseIfStatement(n);case k._return:return this.parseReturnStatement(n);case k._switch:return this.parseSwitchStatement(n);case k._throw:return this.parseThrowStatement(n);case k._try:return this.parseTryStatement(n);case k._const:case k._var:return s=s||this.value,t&&"var"!==s&&this.unexpected(),this.parseVarStatement(n,s);case k._while:return this.parseWhileStatement(n);case k._with:return this.parseWithStatement(n);case k.braceL:return this.parseBlock(!0,n);case k.semi:return this.parseEmptyStatement(n);case k._export:case k._import:if(this.options.ecmaVersion>10&&r===k._import){A.lastIndex=this.pos;var a=A.exec(this.input),o=this.pos+a[0].length,h=this.input.charCodeAt(o);if(40===h||46===h)return this.parseExpressionStatement(n,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===k._import?this.parseImport(n):this.parseExport(n,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(n,!0,!t);var p=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(p)return e&&"script"===this.options.sourceType&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),"await using"===p&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(n,!1,p),this.semicolon(),this.finishNode(n,"VariableDeclaration");var c=this.value,l=this.parseExpression();return r===k.name&&"Identifier"===l.type&&this.eat(k.colon)?this.parseLabeledStatement(n,c,l,t):this.parseExpressionStatement(n,l)}},Z.parseBreakContinueStatement=function(t,e){var i="break"===e;this.next(),this.eat(k.semi)||this.insertSemicolon()?t.label=null:this.type!==k.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var s=0;s<this.labels.length;++s){var r=this.labels[s];if(null==t.label||r.name===t.label.name){if(null!=r.kind&&(i||"loop"===r.kind))break;if(t.label&&i)break}}return s===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")},Z.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},Z.parseDoStatement=function(t){return this.next(),this.labels.push(tt),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(k._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(k.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},Z.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(tt),this.enterScope(0),this.expect(k.parenL),this.type===k.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===k._var||this.type===k._const||i){var s=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),this.parseForAfterInit(t,s,e)}var n=this.isContextual("let"),a=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var h=this.startNode();return this.next(),"await using"===o&&this.next(),this.parseVar(h,!0,o),this.finishNode(h,"VariableDeclaration"),this.parseForAfterInit(t,h,e)}var p=this.containsEsc,c=new X,l=this.start,u=e>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===k._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===k._in&&this.unexpected(e),t.await=!0):a&&this.options.ecmaVersion>=8&&(u.start!==l||p||"Identifier"!==u.type||"async"!==u.name?this.options.ecmaVersion>=9&&(t.await=!1):this.unexpected()),n&&a&&this.raise(u.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(u,!1,c),this.checkLValPattern(u),this.parseForIn(t,u)):(this.checkExpressionErrors(c,!0),e>-1&&this.unexpected(e),this.parseFor(t,u))},Z.parseForAfterInit=function(t,e,i){return(this.type===k._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===e.declarations.length?(this.options.ecmaVersion>=9&&(this.type===k._in?i>-1&&this.unexpected(i):t.await=i>-1),this.parseForIn(t,e)):(i>-1&&this.unexpected(i),this.parseFor(t,e))},Z.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,st|(i?0:rt),!1,e)},Z.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(k._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},Z.parseReturnStatement=function(t){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(k.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},Z.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(k.braceL),this.labels.push(et),this.enterScope(0);for(var i=!1;this.type!==k.braceR;)if(this.type===k._case||this.type===k._default){var s=this.type===k._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),s?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(k.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},Z.parseThrowStatement=function(t){return this.next(),_.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var it=[];Z.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e="Identifier"===t.type;return this.enterScope(e?32:0),this.checkLValPattern(t,e?4:2),this.expect(k.parenR),t},Z.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===k._catch){var e=this.startNode();this.next(),this.eat(k.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(k._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},Z.parseVarStatement=function(t,e,i){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")},Z.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(tt),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},Z.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},Z.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},Z.parseLabeledStatement=function(t,e,i,s){for(var r=0,n=this.labels;r<n.length;r+=1){n[r].name===e&&this.raise(i.start,"Label '"+e+"' is already declared")}for(var a=this.type.isLoop?"loop":this.type===k._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var h=this.labels[o];if(h.statementStart!==t.start)break;h.statementStart=this.start,h.kind=a}return this.labels.push({name:e,kind:a,statementStart:this.start}),t.body=this.parseStatement(s?-1===s.indexOf("label")?s+"label":s:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},Z.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},Z.parseBlock=function(t,e,i){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(k.braceL),t&&this.enterScope(0);this.type!==k.braceR;){var s=this.parseStatement(null);e.body.push(s)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},Z.parseFor=function(t,e){return t.init=e,this.expect(k.semi),t.test=this.type===k.semi?null:this.parseExpression(),this.expect(k.semi),t.update=this.type===k.parenR?null:this.parseExpression(),this.expect(k.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},Z.parseForIn=function(t,e){var i=this.type===k._in;return this.next(),"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(!i||this.options.ecmaVersion<8||this.strict||"var"!==e.kind||"Identifier"!==e.declarations[0].id.type)&&this.raise(e.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(k.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},Z.parseVar=function(t,e,i,s){for(t.declarations=[],t.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(k.eq)?r.init=this.parseMaybeAssign(e):s||"const"!==i||this.type===k._in||this.options.ecmaVersion>=6&&this.isContextual("of")?s||"using"!==i&&"await using"!==i||!(this.options.ecmaVersion>=17)||this.type===k._in||this.isContextual("of")?s||"Identifier"===r.id.type||e&&(this.type===k._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+i+" declaration"):this.unexpected(),t.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(k.comma))break}return t},Z.parseVarId=function(t,e){t.id="using"===e||"await using"===e?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,"var"===e?1:2,!1)};var st=1,rt=2;function nt(t,e){var i=e.key.name,s=t[i],r="true";return"MethodDefinition"!==e.type||"get"!==e.kind&&"set"!==e.kind||(r=(e.static?"s":"i")+e.kind),"iget"===s&&"iset"===r||"iset"===s&&"iget"===r||"sget"===s&&"sset"===r||"sset"===s&&"sget"===r?(t[i]="true",!1):!!s||(t[i]=r,!1)}function at(t,e){var i=t.computed,s=t.key;return!i&&("Identifier"===s.type&&s.name===e||"Literal"===s.type&&s.value===e)}Z.parseFunction=function(t,e,i,s,r){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===k.star&&e&rt&&this.unexpected(),t.generator=this.eat(k.star)),this.options.ecmaVersion>=8&&(t.async=!!s),e&st&&(t.id=4&e&&this.type!==k.name?null:this.parseIdent(),!t.id||e&rt||this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?1:2:3));var n=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(z(t.async,t.generator)),e&st||(t.id=this.type===k.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1,r),this.yieldPos=n,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(t,e&st?"FunctionDeclaration":"FunctionExpression")},Z.parseFunctionParams=function(t){this.expect(k.parenL),t.params=this.parseBindingList(k.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Z.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var s=this.enterClassBody(),r=this.startNode(),n=!1;for(r.body=[],this.expect(k.braceL);this.type!==k.braceR;){var a=this.parseClassElement(null!==t.superClass);a&&(r.body.push(a),"MethodDefinition"===a.type&&"constructor"===a.kind?(n&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),n=!0):a.key&&"PrivateIdentifier"===a.key.type&&nt(s,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=i,this.next(),t.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},Z.parseClassElement=function(t){if(this.eat(k.semi))return null;var e=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,n=!1,a="method",o=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(k.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===k.star?o=!0:s="static"}if(i.static=o,!s&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==k.star||this.canInsertSemicolon()?s="async":n=!0),!s&&(e>=9||!n)&&this.eat(k.star)&&(r=!0),!s&&!n&&!r){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=h:s=h)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),e<13||this.type===k.parenL||"method"!==a||r||n){var p=!i.static&&at(i,"constructor"),c=p&&t;p&&"method"!==a&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=p?"constructor":a,this.parseClassMethod(i,r,n,c)}else this.parseClassField(i);return i},Z.isClassElementNameStart=function(){return this.type===k.name||this.type===k.privateId||this.type===k.num||this.type===k.string||this.type===k.bracketL||this.type.keyword},Z.parseClassElementName=function(t){this.type===k.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},Z.parseClassMethod=function(t,e,i,s){var r=t.key;"constructor"===t.kind?(e&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):t.static&&at(t,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var n=t.value=this.parseMethod(e,i,s);return"get"===t.kind&&0!==n.params.length&&this.raiseRecoverable(n.start,"getter should have no params"),"set"===t.kind&&1!==n.params.length&&this.raiseRecoverable(n.start,"setter should have exactly one param"),"set"===t.kind&&"RestElement"===n.params[0].type&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},Z.parseClassField=function(t){return at(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&at(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(k.eq)?(this.enterScope(576),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},Z.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(320);this.type!==k.braceR;){var i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},Z.parseClassId=function(t,e){this.type===k.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,2,!1)):(!0===e&&this.unexpected(),t.id=null)},Z.parseClassSuper=function(t){t.superClass=this.eat(k._extends)?this.parseExprSubscripts(null,!1):null},Z.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},Z.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,i=t.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=0===s?null:this.privateNameStack[s-1],n=0;n<i.length;++n){var a=i[n];N(e,a.name)||(r?r.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},i(nt,"isPrivateNameConflicted"),i(at,"checkKeyName"),Z.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==k.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},Z.parseExport=function(t,e){if(this.next(),this.eat(k.star))return this.parseExportAllDeclaration(t,e);if(this.eat(k._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==k.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var i=0,s=t.specifiers;i<s.length;i+=1){var r=s[i];this.checkUnreserved(r.local),this.checkLocalExport(r.local),"Literal"===r.local.type&&this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},Z.parseExportDeclaration=function(t){return this.parseStatement(null)},Z.parseExportDefaultDeclaration=function(){var t;if(this.type===k._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,4|st,!1,t)}if(this.type===k._class){var i=this.startNode();return this.parseClass(i,"nullableID")}var s=this.parseMaybeAssign();return this.semicolon(),s},Z.checkExport=function(t,e,i){t&&("string"!=typeof e&&(e="Identifier"===e.type?e.name:e.value),N(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},Z.checkPatternExport=function(t,e){var i=e.type;if("Identifier"===i)this.checkExport(t,e,e.start);else if("ObjectPattern"===i)for(var s=0,r=e.properties;s<r.length;s+=1){var n=r[s];this.checkPatternExport(t,n)}else if("ArrayPattern"===i)for(var a=0,o=e.elements;a<o.length;a+=1){var h=o[a];h&&this.checkPatternExport(t,h)}else"Property"===i?this.checkPatternExport(t,e.value):"AssignmentPattern"===i?this.checkPatternExport(t,e.left):"RestElement"===i&&this.checkPatternExport(t,e.argument)},Z.checkVariableExport=function(t,e){if(t)for(var i=0,s=e;i<s.length;i+=1){var r=s[i];this.checkPatternExport(t,r.id)}},Z.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Z.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")},Z.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(k.braceL);!this.eat(k.braceR);){if(i)i=!1;else if(this.expect(k.comma),this.afterTrailingComma(k.braceR))break;e.push(this.parseExportSpecifier(t))}return e},Z.parseImport=function(t){return this.next(),this.type===k.string?(t.specifiers=it,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===k.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},Z.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportSpecifier")},Z.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportDefaultSpecifier")},Z.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportNamespaceSpecifier")},Z.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===k.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(k.comma)))return t;if(this.type===k.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(k.braceL);!this.eat(k.braceR);){if(e)e=!1;else if(this.expect(k.comma),this.afterTrailingComma(k.braceR))break;t.push(this.parseImportSpecifier())}return t},Z.parseWithClause=function(){var t=[];if(!this.eat(k._with))return t;this.expect(k.braceL);for(var e={},i=!0;!this.eat(k.braceR);){if(i)i=!1;else if(this.expect(k.comma),this.afterTrailingComma(k.braceR))break;var s=this.parseImportAttribute(),r="Identifier"===s.key.type?s.key.name:s.key.value;N(e,r)&&this.raiseRecoverable(s.key.start,"Duplicate attribute key '"+r+"'"),e[r]=!0,t.push(s)}return t},Z.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===k.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(k.colon),this.type!==k.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},Z.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===k.string){var t=this.parseLiteral(this.value);return M.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},Z.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},Z.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&('"'===this.input[t.start]||"'"===this.input[t.start])};var ot=K.prototype;ot.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,r=t.properties;s<r.length;s+=1){var n=r[s];this.toAssignable(n,e),"RestElement"!==n.type||"ArrayPattern"!==n.argument.type&&"ObjectPattern"!==n.argument.type||this.raise(n.argument.start,"Unexpected token")}break;case"Property":"init"!==t.kind&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),"AssignmentPattern"===t.argument.type&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t},ot.toAssignableList=function(t,e){for(var i=t.length,s=0;s<i;s++){var r=t[s];r&&this.toAssignable(r,e)}if(i){var n=t[i-1];6===this.options.ecmaVersion&&e&&n&&"RestElement"===n.type&&"Identifier"!==n.argument.type&&this.unexpected(n.argument.start)}return t},ot.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},ot.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==k.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},ot.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case k.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(k.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case k.braceL:return this.parseObj(!0)}return this.parseIdent()},ot.parseBindingList=function(t,e,i,s){for(var r=[],n=!0;!this.eat(t);)if(n?n=!1:this.expect(k.comma),e&&this.type===k.comma)r.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===k.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),r.push(a),this.type===k.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}r.push(this.parseAssignableListItem(s))}return r},ot.parseAssignableListItem=function(t){var e=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(e),e},ot.parseBindingListItem=function(t){return t},ot.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(k.eq))return i;var s=this.startNodeAt(t,e);return s.left=i,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")},ot.checkLValSimple=function(t,e,i){void 0===e&&(e=0);var s=0!==e;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(s?"Binding ":"Assigning to ")+t.name+" in strict mode"),s&&(2===e&&"let"===t.name&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),i&&(N(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),5!==e&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(s?"Binding":"Assigning to")+" rvalue")}},ot.checkLValPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"ObjectPattern":for(var s=0,r=t.properties;s<r.length;s+=1){var n=r[s];this.checkLValInnerPattern(n,e,i)}break;case"ArrayPattern":for(var a=0,o=t.elements;a<o.length;a+=1){var h=o[a];h&&this.checkLValInnerPattern(h,e,i)}break;default:this.checkLValSimple(t,e,i)}},ot.checkLValInnerPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var ht=i(function(t,e,i,s,r){this.token=t,this.isExpr=!!e,this.preserveSpace=!!i,this.override=s,this.generator=!!r},"TokContext"),pt={b_stat:new ht("{",!1),b_expr:new ht("{",!0),b_tmpl:new ht("${",!1),p_stat:new ht("(",!1),p_expr:new ht("(",!0),q_tmpl:new ht("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new ht("function",!1),f_expr:new ht("function",!0),f_expr_gen:new ht("function",!0,!1,null,!0),f_gen:new ht("function",!1,!1,null,!0)},ct=K.prototype;ct.initialContext=function(){return[pt.b_stat]},ct.curContext=function(){return this.context[this.context.length-1]},ct.braceIsBlock=function(t){var e=this.curContext();return e===pt.f_expr||e===pt.f_stat||(t!==k.colon||e!==pt.b_stat&&e!==pt.b_expr?t===k._return||t===k.name&&this.exprAllowed?_.test(this.input.slice(this.lastTokEnd,this.start)):t===k._else||t===k.semi||t===k.eof||t===k.parenR||t===k.arrow||(t===k.braceL?e===pt.b_stat:t!==k._var&&t!==k._const&&t!==k.name&&!this.exprAllowed):!e.isExpr)},ct.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if("function"===e.token)return e.generator}return!1},ct.updateContext=function(t){var e,i=this.type;i.keyword&&t===k.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr},ct.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},k.parenR.updateContext=k.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===pt.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},k.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?pt.b_stat:pt.b_expr),this.exprAllowed=!0},k.dollarBraceL.updateContext=function(){this.context.push(pt.b_tmpl),this.exprAllowed=!0},k.parenL.updateContext=function(t){var e=t===k._if||t===k._for||t===k._with||t===k._while;this.context.push(e?pt.p_stat:pt.p_expr),this.exprAllowed=!0},k.incDec.updateContext=function(){},k._function.updateContext=k._class.updateContext=function(t){!t.beforeExpr||t===k._else||t===k.semi&&this.curContext()!==pt.p_stat||t===k._return&&_.test(this.input.slice(this.lastTokEnd,this.start))||(t===k.colon||t===k.braceL)&&this.curContext()===pt.b_stat?this.context.push(pt.f_stat):this.context.push(pt.f_expr),this.exprAllowed=!1},k.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},k.backQuote.updateContext=function(){this.curContext()===pt.q_tmpl?this.context.pop():this.context.push(pt.q_tmpl),this.exprAllowed=!1},k.star.updateContext=function(t){if(t===k._function){var e=this.context.length-1;this.context[e]===pt.f_expr?this.context[e]=pt.f_expr_gen:this.context[e]=pt.f_gen}this.exprAllowed=!0},k.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==k.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var lt=K.prototype;function ut(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&ut(t.expression)}function dt(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&dt(t.expression)||"ParenthesizedExpression"===t.type&&dt(t.expression)}lt.checkPropClash=function(t,e,i){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var s,r=t.key;switch(r.type){case"Identifier":s=r.name;break;case"Literal":s=String(r.value);break;default:return}var n=t.kind;if(this.options.ecmaVersion>=6)"__proto__"===s&&"init"===n&&(e.proto&&(i?i.doubleProto<0&&(i.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),e.proto=!0);else{var a=e[s="$"+s];if(a)("init"===n?this.strict&&a.init||a.get||a.set:a.init||a[n])&&this.raiseRecoverable(r.start,"Redefinition of property");else a=e[s]={init:!1,get:!1,set:!1};a[n]=!0}}},lt.parseExpression=function(t,e){var i=this.start,s=this.startLoc,r=this.parseMaybeAssign(t,e);if(this.type===k.comma){var n=this.startNodeAt(i,s);for(n.expressions=[r];this.eat(k.comma);)n.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(n,"SequenceExpression")}return r},lt.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var s=!1,r=-1,n=-1,a=-1;e?(r=e.parenthesizedAssign,n=e.trailingComma,a=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new X,s=!0);var o=this.start,h=this.startLoc;this.type!==k.parenL&&this.type!==k.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===t);var p=this.parseMaybeConditional(t,e);if(i&&(p=i.call(this,p,o,h)),this.type.isAssign){var c=this.startNodeAt(o,h);return c.operator=this.value,this.type===k.eq&&(p=this.toAssignable(p,!1,e)),s||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=p.start&&(e.shorthandAssign=-1),this.type===k.eq?this.checkLValPattern(p):this.checkLValSimple(p),c.left=p,this.next(),c.right=this.parseMaybeAssign(t),a>-1&&(e.doubleProto=a),this.finishNode(c,"AssignmentExpression")}return s&&this.checkExpressionErrors(e,!0),r>-1&&(e.parenthesizedAssign=r),n>-1&&(e.trailingComma=n),p},lt.parseMaybeConditional=function(t,e){var i=this.start,s=this.startLoc,r=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return r;if(this.eat(k.question)){var n=this.startNodeAt(i,s);return n.test=r,n.consequent=this.parseMaybeAssign(),this.expect(k.colon),n.alternate=this.parseMaybeAssign(t),this.finishNode(n,"ConditionalExpression")}return r},lt.parseExprOps=function(t,e){var i=this.start,s=this.startLoc,r=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||r.start===i&&"ArrowFunctionExpression"===r.type?r:this.parseExprOp(r,i,s,-1,t)},lt.parseExprOp=function(t,e,i,s,r){var n=this.type.binop;if(null!=n&&(!r||this.type!==k._in)&&n>s){var a=this.type===k.logicalOR||this.type===k.logicalAND,o=this.type===k.coalesce;o&&(n=k.logicalAND.binop);var h=this.value;this.next();var p=this.start,c=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),p,c,n,r),u=this.buildBinary(e,i,t,l,h,a||o);return(a&&this.type===k.coalesce||o&&(this.type===k.logicalOR||this.type===k.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(u,e,i,s,r)}return t},lt.buildBinary=function(t,e,i,s,r,n){"PrivateIdentifier"===s.type&&this.raise(s.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(t,e);return a.left=i,a.operator=r,a.right=s,this.finishNode(a,n?"LogicalExpression":"BinaryExpression")},lt.parseMaybeUnary=function(t,e,i,s){var r,n=this.start,a=this.startLoc;if(this.isContextual("await")&&this.canAwait)r=this.parseAwait(s),e=!0;else if(this.type.prefix){var o=this.startNode(),h=this.type===k.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,h,s),this.checkExpressionErrors(t,!0),h?this.checkLValSimple(o.argument):this.strict&&"delete"===o.operator&&ut(o.argument)?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):"delete"===o.operator&&dt(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):e=!0,r=this.finishNode(o,h?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==k.privateId){if(r=this.parseExprSubscripts(t,s),this.checkExpressionErrors(t))return r;for(;this.type.postfix&&!this.canInsertSemicolon();){var p=this.startNodeAt(n,a);p.operator=this.value,p.prefix=!1,p.argument=r,this.checkLValSimple(r),this.next(),r=this.finishNode(p,"UpdateExpression")}}else(s||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),r=this.parsePrivateIdent(),this.type!==k._in&&this.unexpected();return i||!this.eat(k.starstar)?r:e?void this.unexpected(this.lastTokStart):this.buildBinary(n,a,r,this.parseMaybeUnary(null,!1,!1,s),"**",!1)},i(ut,"isLocalVariableAccess"),i(dt,"isPrivateFieldAccess"),lt.parseExprSubscripts=function(t,e){var i=this.start,s=this.startLoc,r=this.parseExprAtom(t,e);if("ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return r;var n=this.parseSubscripts(r,i,s,!1,e);return t&&"MemberExpression"===n.type&&(t.parenthesizedAssign>=n.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=n.start&&(t.parenthesizedBind=-1),t.trailingComma>=n.start&&(t.trailingComma=-1)),n},lt.parseSubscripts=function(t,e,i,s,r){for(var n=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.potentialArrowAt===t.start,a=!1;;){var o=this.parseSubscript(t,e,i,s,n,a,r);if(o.optional&&(a=!0),o===t||"ArrowFunctionExpression"===o.type){if(a){var h=this.startNodeAt(e,i);h.expression=o,o=this.finishNode(h,"ChainExpression")}return o}t=o}},lt.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(k.arrow)},lt.parseSubscriptAsyncArrow=function(t,e,i,s){return this.parseArrowExpression(this.startNodeAt(t,e),i,!0,s)},lt.parseSubscript=function(t,e,i,s,r,n,a){var o=this.options.ecmaVersion>=11,h=o&&this.eat(k.questionDot);s&&h&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var p=this.eat(k.bracketL);if(p||h&&this.type!==k.parenL&&this.type!==k.backQuote||this.eat(k.dot)){var c=this.startNodeAt(e,i);c.object=t,p?(c.property=this.parseExpression(),this.expect(k.bracketR)):this.type===k.privateId&&"Super"!==t.type?c.property=this.parsePrivateIdent():c.property=this.parseIdent("never"!==this.options.allowReserved),c.computed=!!p,o&&(c.optional=h),t=this.finishNode(c,"MemberExpression")}else if(!s&&this.eat(k.parenL)){var l=new X,u=this.yieldPos,d=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(k.parenR,this.options.ecmaVersion>=8,!1,l);if(r&&!h&&this.shouldParseAsyncArrow())return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=u,this.awaitPos=d,this.awaitIdentPos=f,this.parseSubscriptAsyncArrow(e,i,m,a);this.checkExpressionErrors(l,!0),this.yieldPos=u||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var g=this.startNodeAt(e,i);g.callee=t,g.arguments=m,o&&(g.optional=h),t=this.finishNode(g,"CallExpression")}else if(this.type===k.backQuote){(h||n)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var x=this.startNodeAt(e,i);x.tag=t,x.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(x,"TaggedTemplateExpression")}return t},lt.parseExprAtom=function(t,e,i){this.type===k.slash&&this.readRegexp();var s,r=this.potentialArrowAt===this.start;switch(this.type){case k._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),s=this.startNode(),this.next(),this.type!==k.parenL||this.allowDirectSuper||this.raise(s.start,"super() call outside constructor of a subclass"),this.type!==k.dot&&this.type!==k.bracketL&&this.type!==k.parenL&&this.unexpected(),this.finishNode(s,"Super");case k._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case k.name:var n=this.start,a=this.startLoc,o=this.containsEsc,h=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&"async"===h.name&&!this.canInsertSemicolon()&&this.eat(k._function))return this.overrideContext(pt.f_expr),this.parseFunction(this.startNodeAt(n,a),0,!1,!0,e);if(r&&!this.canInsertSemicolon()){if(this.eat(k.arrow))return this.parseArrowExpression(this.startNodeAt(n,a),[h],!1,e);if(this.options.ecmaVersion>=8&&"async"===h.name&&this.type===k.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return h=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(k.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,a),[h],!0,e)}return h;case k.regexp:var p=this.value;return(s=this.parseLiteral(p.value)).regex={pattern:p.pattern,flags:p.flags},s;case k.num:case k.string:return this.parseLiteral(this.value);case k._null:case k._true:case k._false:return(s=this.startNode()).value=this.type===k._null?null:this.type===k._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case k.parenL:var c=this.start,l=this.parseParenAndDistinguishExpression(r,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(l)&&(t.parenthesizedAssign=c),t.parenthesizedBind<0&&(t.parenthesizedBind=c)),l;case k.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(k.bracketR,!0,!0,t),this.finishNode(s,"ArrayExpression");case k.braceL:return this.overrideContext(pt.b_expr),this.parseObj(!1,t);case k._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case k._class:return this.parseClass(this.startNode(),!1);case k._new:return this.parseNew();case k.backQuote:return this.parseTemplate();case k._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}},lt.parseExprAtomDefault=function(){this.unexpected()},lt.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===k.parenL&&!t)return this.parseDynamicImport(e);if(this.type===k.dot){var i=this.startNodeAt(e.start,e.loc&&e.loc.start);return i.name="import",e.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(e)}this.unexpected()},lt.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(k.parenR)?t.options=null:(this.expect(k.comma),this.afterTrailingComma(k.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(k.parenR)||(this.expect(k.comma),this.afterTrailingComma(k.parenR)||this.unexpected())));else if(!this.eat(k.parenR)){var e=this.start;this.eat(k.comma)&&this.eat(k.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},lt.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},lt.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=null!=e.value?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},lt.parseParenExpression=function(){this.expect(k.parenL);var t=this.parseExpression();return this.expect(k.parenR),t},lt.shouldParseArrow=function(t){return!this.canInsertSemicolon()},lt.parseParenAndDistinguishExpression=function(t,e){var i,s=this.start,r=this.startLoc,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,o=this.start,h=this.startLoc,p=[],c=!0,l=!1,u=new X,d=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==k.parenR;){if(c?c=!1:this.expect(k.comma),n&&this.afterTrailingComma(k.parenR,!0)){l=!0;break}if(this.type===k.ellipsis){a=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===k.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}p.push(this.parseMaybeAssign(!1,u,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(k.parenR),t&&this.shouldParseArrow(p)&&this.eat(k.arrow))return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=f,this.parseParenArrowList(s,r,p,e);p.length&&!l||this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(u,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,p.length>1?((i=this.startNodeAt(o,h)).expressions=p,this.finishNodeAt(i,"SequenceExpression",m,g)):i=p[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var x=this.startNodeAt(s,r);return x.expression=i,this.finishNode(x,"ParenthesizedExpression")}return i},lt.parseParenItem=function(t){return t},lt.parseParenArrowList=function(t,e,i,s){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,s)};var ft=[];lt.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===k.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var i=this.containsEsc;return t.property=this.parseIdent(!0),"target"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var s=this.start,r=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),this.eat(k.parenL)?t.arguments=this.parseExprList(k.parenR,this.options.ecmaVersion>=8,!1):t.arguments=ft,this.finishNode(t,"NewExpression")},lt.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===k.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),i.tail=this.type===k.backQuote,this.finishNode(i,"TemplateElement")},lt.parseTemplate=function(t){void 0===t&&(t={});var e=t.isTagged;void 0===e&&(e=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:e});for(i.quasis=[s];!s.tail;)this.type===k.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(k.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(k.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")},lt.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===k.name||this.type===k.num||this.type===k.string||this.type===k.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===k.star)&&!_.test(this.input.slice(this.lastTokEnd,this.start))},lt.parseObj=function(t,e){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(k.braceR);){if(s)s=!1;else if(this.expect(k.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(k.braceR))break;var n=this.parseProperty(t,e);t||this.checkPropClash(n,r,e),i.properties.push(n)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},lt.parseProperty=function(t,e){var i,s,r,n,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(k.ellipsis))return t?(a.argument=this.parseIdent(!1),this.type===k.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(a.argument=this.parseMaybeAssign(!1,e),this.type===k.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(t||e)&&(r=this.start,n=this.startLoc),t||(i=this.eat(k.star)));var o=this.containsEsc;return this.parsePropertyName(a),!t&&!o&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(a)?(s=!0,i=this.options.ecmaVersion>=9&&this.eat(k.star),this.parsePropertyName(a)):s=!1,this.parsePropertyValue(a,t,i,s,r,n,e,o),this.finishNode(a,"Property")},lt.parseGetterSetter=function(t){var e=t.key.name;this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e;var i="get"===t.kind?0:1;if(t.value.params.length!==i){var s=t.value.start;"get"===t.kind?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")},lt.parsePropertyValue=function(t,e,i,s,r,n,a,o){(i||s)&&this.type===k.colon&&this.unexpected(),this.eat(k.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),t.kind="init"):this.options.ecmaVersion>=6&&this.type===k.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(i,s),t.kind="init"):e||o||!(this.options.ecmaVersion>=5)||t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.type===k.comma||this.type===k.braceR||this.type===k.eq?this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?((i||s)&&this.unexpected(),this.checkUnreserved(t.key),"await"!==t.key.name||this.awaitIdentPos||(this.awaitIdentPos=r),e?t.value=this.parseMaybeDefault(r,n,this.copyNode(t.key)):this.type===k.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),t.value=this.parseMaybeDefault(r,n,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected():((i||s)&&this.unexpected(),this.parseGetterSetter(t))},lt.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(k.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(k.bracketR),t.key;t.computed=!1}return t.key=this.type===k.num||this.type===k.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},lt.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},lt.parseMethod=function(t,e,i){var s=this.startNode(),r=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=t),this.options.ecmaVersion>=8&&(s.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|z(e,s.generator)|(i?128:0)),this.expect(k.parenL),s.params=this.parseBindingList(k.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(s,"FunctionExpression")},lt.parseArrowExpression=function(t,e,i,s){var r=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(16|z(i,!1)),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,s),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(t,"ArrowFunctionExpression")},lt.parseFunctionBody=function(t,e,i,s){var r=e&&this.type!==k.braceL,n=this.strict,a=!1;if(r)t.body=this.parseMaybeAssign(s),t.expression=!0,this.checkParams(t,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);n&&!o||(a=this.strictDirective(this.end))&&o&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");var h=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(t,!n&&!a&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,5),t.body=this.parseBlock(!1,void 0,a&&!n),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=h}this.exitScope()},lt.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1){if("Identifier"!==i[e].type)return!1}return!0},lt.checkParams=function(t,e){for(var i=Object.create(null),s=0,r=t.params;s<r.length;s+=1){var n=r[s];this.checkLValInnerPattern(n,1,e?null:i)}},lt.parseExprList=function(t,e,i,s){for(var r=[],n=!0;!this.eat(t);){if(n)n=!1;else if(this.expect(k.comma),e&&this.afterTrailingComma(t))break;var a=void 0;i&&this.type===k.comma?a=null:this.type===k.ellipsis?(a=this.parseSpread(s),s&&this.type===k.comma&&s.trailingComma<0&&(s.trailingComma=this.start)):a=this.parseMaybeAssign(!1,s),r.push(a)}return r},lt.checkUnreserved=function(t){var e=t.start,i=t.end,s=t.name;(this.inGenerator&&"yield"===s&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===s&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&H||"arguments"!==s||this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==s&&"await"!==s||this.raise(e,"Cannot use "+s+" in class static initialization block"),this.keywords.test(s)&&this.raise(e,"Unexpected keyword '"+s+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(e,i).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(s)&&(this.inAsync||"await"!==s||this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+s+"' is reserved"))},lt.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),"await"!==e.name||this.awaitIdentPos||(this.awaitIdentPos=e.start)),e},lt.parseIdentNode=function(){var t=this.startNode();return this.type===k.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,"class"!==t.name&&"function"!==t.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=k.name):this.unexpected(),t},lt.parsePrivateIdent=function(){var t=this.startNode();return this.type===k.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t},lt.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===k.semi||this.canInsertSemicolon()||this.type!==k.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(k.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},lt.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var mt=K.prototype;mt.raise=function(t,e){var i=U(this.input,t);e+=" ("+i.line+":"+i.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var s=new SyntaxError(e);throw s.pos=t,s.loc=i,s.raisedAt=this.pos,s},mt.raiseRecoverable=mt.raise,mt.curPosition=function(){if(this.options.locations)return new F(this.curLine,this.pos-this.lineStart)};var gt=K.prototype,xt=i(function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]},"Scope");gt.enterScope=function(t){this.scopeStack.push(new xt(t))},gt.exitScope=function(){this.scopeStack.pop()},gt.treatFunctionsAsVarInScope=function(t){return 2&t.flags||!this.inModule&&1&t.flags},gt.declareName=function(t,e,i){var s=!1;if(2===e){var r=this.currentScope();s=r.lexical.indexOf(t)>-1||r.functions.indexOf(t)>-1||r.var.indexOf(t)>-1,r.lexical.push(t),this.inModule&&1&r.flags&&delete this.undefinedExports[t]}else if(4===e){this.currentScope().lexical.push(t)}else if(3===e){var n=this.currentScope();s=this.treatFunctionsAsVar?n.lexical.indexOf(t)>-1:n.lexical.indexOf(t)>-1||n.var.indexOf(t)>-1,n.functions.push(t)}else for(var a=this.scopeStack.length-1;a>=0;--a){var o=this.scopeStack[a];if(o.lexical.indexOf(t)>-1&&!(32&o.flags&&o.lexical[0]===t)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(t)>-1){s=!0;break}if(o.var.push(t),this.inModule&&1&o.flags&&delete this.undefinedExports[t],o.flags&H)break}s&&this.raiseRecoverable(i,"Identifier '"+t+"' has already been declared")},gt.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},gt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},gt.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags)return e}},gt.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags&&!(16&e.flags))return e}};var vt=i(function(t,e,i){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new B(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},"Node"),yt=K.prototype;function bt(t,e,i,s){return t.type=e,t.end=i,this.options.locations&&(t.loc.end=s),this.options.ranges&&(t.range[1]=i),t}yt.startNode=function(){return new vt(this,this.start,this.startLoc)},yt.startNodeAt=function(t,e){return new vt(this,t,e)},i(bt,"finishNodeAt"),yt.finishNode=function(t,e){return bt.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},yt.finishNodeAt=function(t,e,i,s){return bt.call(this,t,e,i,s)},yt.copyNode=function(t){var e=new vt(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var St="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",kt=St+" Extended_Pictographic",_t=kt+" EBase EComp EMod EPres ExtPict",wt={9:St,10:kt,11:kt,12:_t,13:_t,14:_t},Et={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},Ct="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",It="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",At=It+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Pt=At+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Tt=Pt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Vt=Tt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Nt={9:It,10:At,11:Pt,12:Tt,13:Vt,14:Vt+" Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"},Lt={};function Rt(t){var e=Lt[t]={binary:O(wt[t]+" "+Ct),binaryOfStrings:O(Et[t]),nonBinary:{General_Category:O(Ct),Script:O(Nt[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}i(Rt,"buildUnicodeData");for(var Ot=0,Dt=[9,10,11,12,13,14];Ot<Dt.length;Ot+=1){Rt(Dt[Ot])}var Mt=K.prototype,Ft=i(function(t,e){this.parent=t,this.base=e||this},"BranchID");Ft.prototype.separatedFrom=i(function(t){for(var e=this;e;e=e.parent)for(var i=t;i;i=i.parent)if(e.base===i.base&&e!==i)return!0;return!1},"separatedFrom"),Ft.prototype.sibling=i(function(){return new Ft(this.parent,this.base)},"sibling");var Bt=i(function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Lt[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null},"RegExpValidationState");function Ut(t){for(var e in t)return!0;return!1}function jt(t){return 105===t||109===t||115===t}function qt(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function $t(t){return f(t,!0)||36===t||95===t}function Wt(t){return m(t,!0)||36===t||95===t||8204===t||8205===t}function Gt(t){return t>=65&&t<=90||t>=97&&t<=122}function Ht(t){return t>=0&&t<=1114111}Bt.prototype.reset=i(function(t,e,i){var s=-1!==i.indexOf("v"),r=-1!==i.indexOf("u");this.start=0|t,this.source=e+"",this.flags=i,s&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=r&&this.parser.options.ecmaVersion>=9)},"reset"),Bt.prototype.raise=i(function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},"raise"),Bt.prototype.at=i(function(t,e){void 0===e&&(e=!1);var i=this.source,s=i.length;if(t>=s)return-1;var r=i.charCodeAt(t);if(!e&&!this.switchU||r<=55295||r>=57344||t+1>=s)return r;var n=i.charCodeAt(t+1);return n>=56320&&n<=57343?(r<<10)+n-56613888:r},"at"),Bt.prototype.nextIndex=i(function(t,e){void 0===e&&(e=!1);var i=this.source,s=i.length;if(t>=s)return s;var r,n=i.charCodeAt(t);return!e&&!this.switchU||n<=55295||n>=57344||t+1>=s||(r=i.charCodeAt(t+1))<56320||r>57343?t+1:t+2},"nextIndex"),Bt.prototype.current=i(function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},"current"),Bt.prototype.lookahead=i(function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},"lookahead"),Bt.prototype.advance=i(function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},"advance"),Bt.prototype.eat=i(function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},"eat"),Bt.prototype.eatChars=i(function(t,e){void 0===e&&(e=!1);for(var i=this.pos,s=0,r=t;s<r.length;s+=1){var n=r[s],a=this.at(i,e);if(-1===a||a!==n)return!1;i=this.nextIndex(i,e)}return this.pos=i,!0},"eatChars"),Mt.validateRegExpFlags=function(t){for(var e=t.validFlags,i=t.flags,s=!1,r=!1,n=0;n<i.length;n++){var a=i.charAt(n);-1===e.indexOf(a)&&this.raise(t.start,"Invalid regular expression flag"),i.indexOf(a,n+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),"u"===a&&(s=!0),"v"===a&&(r=!0)}this.options.ecmaVersion>=15&&s&&r&&this.raise(t.start,"Invalid regular expression flag")},i(Ut,"hasProp"),Mt.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&Ut(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))},Mt.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,i=t.backReferenceNames;e<i.length;e+=1){var s=i[e];t.groupNames[s]||t.raise("Invalid named capture referenced")}},Mt.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new Ft(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")},Mt.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},Mt.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):!!(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))&&(this.regexp_eatQuantifier(t),!0)},Mt.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!i,!0}return t.pos=e,!1},Mt.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},Mt.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},Mt.regexp_eatBracedQuantifier=function(t,e){var i=t.pos;if(t.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(t)&&(s=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue),t.eat(125)))return-1!==r&&r<s&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=i}return!1},Mt.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)},Mt.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},Mt.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var i=this.regexp_eatModifiers(t),s=t.eat(45);if(i||s){for(var r=0;r<i.length;r++){var n=i.charAt(r);i.indexOf(n,r+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(s){var a=this.regexp_eatModifiers(t);i||a||58!==t.current()||t.raise("Invalid regular expression modifiers");for(var o=0;o<a.length;o++){var h=a.charAt(o);(a.indexOf(h,o+1)>-1||i.indexOf(h)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1},Mt.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):63===t.current()&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},Mt.regexp_eatModifiers=function(t){for(var e="",i=0;-1!==(i=t.current())&&jt(i);)e+=D(i),t.advance();return e},i(jt,"isRegularExpressionModifier"),Mt.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},Mt.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},Mt.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!qt(e)&&(t.lastIntValue=e,t.advance(),!0)},i(qt,"isSyntaxCharacter"),Mt.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;-1!==(i=t.current())&&!qt(i);)t.advance();return t.pos!==e},Mt.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(-1===e||36===e||e>=40&&e<=43||46===e||63===e||91===e||94===e||124===e)&&(t.advance(),!0)},Mt.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,i=t.groupNames[t.lastStringValue];if(i)if(e)for(var s=0,r=i;s<r.length;s+=1){r[s].separatedFrom(t.branchID)||t.raise("Duplicate capture group name")}else t.raise("Duplicate capture group name");e?(i||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}},Mt.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},Mt.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=D(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=D(t.lastIntValue);return!0}return!1},Mt.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,s=t.current(i);return t.advance(i),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(s=t.lastIntValue),$t(s)?(t.lastIntValue=s,!0):(t.pos=e,!1)},i($t,"isRegExpIdentifierStart"),Mt.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,s=t.current(i);return t.advance(i),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(s=t.lastIntValue),Wt(s)?(t.lastIntValue=s,!0):(t.pos=e,!1)},i(Wt,"isRegExpIdentifierPart"),Mt.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(99===t.current()&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},Mt.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var i=t.lastIntValue;if(t.switchU)return i>t.maxBackReference&&(t.maxBackReference=i),!0;if(i<=t.numCapturingParens)return!0;t.pos=e}return!1},Mt.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},Mt.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},Mt.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},Mt.regexp_eatZero=function(t){return 48===t.current()&&!Zt(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},Mt.regexp_eatControlEscape=function(t){var e=t.current();return 116===e?(t.lastIntValue=9,t.advance(),!0):110===e?(t.lastIntValue=10,t.advance(),!0):118===e?(t.lastIntValue=11,t.advance(),!0):102===e?(t.lastIntValue=12,t.advance(),!0):114===e&&(t.lastIntValue=13,t.advance(),!0)},Mt.regexp_eatControlLetter=function(t){var e=t.current();return!!Gt(e)&&(t.lastIntValue=e%32,t.advance(),!0)},i(Gt,"isControlLetter"),Mt.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){void 0===e&&(e=!1);var i=t.pos,s=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var r=t.lastIntValue;if(s&&r>=55296&&r<=56319){var n=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var a=t.lastIntValue;if(a>=56320&&a<=57343)return t.lastIntValue=1024*(r-55296)+(a-56320)+65536,!0}t.pos=n,t.lastIntValue=r}return!0}if(s&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&Ht(t.lastIntValue))return!0;s&&t.raise("Invalid unicode escape"),t.pos=i}return!1},i(Ht,"isValidUnicode"),Mt.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(99===e||t.switchN&&107===e)&&(t.lastIntValue=e,t.advance(),!0)},Mt.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do{t.lastIntValue=10*t.lastIntValue+(e-48),t.advance()}while((e=t.current())>=48&&e<=57);return!0}return!1};function zt(t){return 100===t||68===t||115===t||83===t||119===t||87===t}function Kt(t){return Gt(t)||95===t}function Qt(t){return Kt(t)||Zt(t)}function Yt(t){return 33===t||t>=35&&t<=38||t>=42&&t<=44||46===t||t>=58&&t<=64||94===t||96===t||126===t}function Jt(t){return 40===t||41===t||45===t||47===t||t>=91&&t<=93||t>=123&&t<=125}function Xt(t){return 33===t||35===t||37===t||38===t||44===t||45===t||t>=58&&t<=62||64===t||96===t||126===t}function Zt(t){return t>=48&&t<=57}function te(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function ee(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function ie(t){return t>=48&&t<=55}Mt.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(zt(e))return t.lastIntValue=-1,t.advance(),1;var i=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((i=80===e)||112===e)){var s;if(t.lastIntValue=-1,t.advance(),t.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return i&&2===s&&t.raise("Invalid property name"),s;t.raise("Invalid property name")}return 0},i(zt,"isCharacterClassEscape"),Mt.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var i=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var s=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,i,s),1}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var r=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,r)}return 0},Mt.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){N(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")},Mt.regexp_validateUnicodePropertyNameOrValue=function(t,e){return t.unicodeProperties.binary.test(e)?1:t.switchV&&t.unicodeProperties.binaryOfStrings.test(e)?2:void t.raise("Invalid property name")},Mt.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";Kt(e=t.current());)t.lastStringValue+=D(e),t.advance();return""!==t.lastStringValue},i(Kt,"isUnicodePropertyNameCharacter"),Mt.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Qt(e=t.current());)t.lastStringValue+=D(e),t.advance();return""!==t.lastStringValue},i(Qt,"isUnicodePropertyValueCharacter"),Mt.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},Mt.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),i=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&2===i&&t.raise("Negated character class may contain strings"),!0}return!1},Mt.regexp_classContents=function(t){return 93===t.current()?1:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),1)},Mt.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var i=t.lastIntValue;!t.switchU||-1!==e&&-1!==i||t.raise("Invalid character class"),-1!==e&&-1!==i&&e>i&&t.raise("Range out of order in character class")}}},Mt.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var i=t.current();(99===i||ie(i))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var s=t.current();return 93!==s&&(t.lastIntValue=s,t.advance(),!0)},Mt.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},Mt.regexp_classSetExpression=function(t){var e,i=1;if(this.regexp_eatClassSetRange(t));else if(e=this.regexp_eatClassSetOperand(t)){2===e&&(i=2);for(var s=t.pos;t.eatChars([38,38]);)38!==t.current()&&(e=this.regexp_eatClassSetOperand(t))?2!==e&&(i=1):t.raise("Invalid character in character class");if(s!==t.pos)return i;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(s!==t.pos)return i}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(!(e=this.regexp_eatClassSetOperand(t)))return i;2===e&&(i=2)}},Mt.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var s=t.lastIntValue;return-1!==i&&-1!==s&&i>s&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1},Mt.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?1:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},Mt.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var i=t.eat(94),s=this.regexp_classContents(t);if(t.eat(93))return i&&2===s&&t.raise("Negated character class may contain strings"),s;t.pos=e}if(t.eat(92)){var r=this.regexp_eatCharacterClassEscape(t);if(r)return r;t.pos=e}return null},Mt.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var i=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return i}else t.raise("Invalid escape");t.pos=e}return null},Mt.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)2===this.regexp_classString(t)&&(e=2);return e},Mt.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return 1===e?1:2},Mt.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return!(!this.regexp_eatCharacterEscape(t)&&!this.regexp_eatClassSetReservedPunctuator(t))||(t.eat(98)?(t.lastIntValue=8,!0):(t.pos=e,!1));var i=t.current();return!(i<0||i===t.lookahead()&&Yt(i))&&(!Jt(i)&&(t.advance(),t.lastIntValue=i,!0))},i(Yt,"isClassSetReservedDoublePunctuatorCharacter"),i(Jt,"isClassSetSyntaxCharacter"),Mt.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return!!Xt(e)&&(t.lastIntValue=e,t.advance(),!0)},i(Xt,"isClassSetReservedPunctuator"),Mt.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!Zt(e)&&95!==e)&&(t.lastIntValue=e%32,t.advance(),!0)},Mt.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},Mt.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Zt(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e},i(Zt,"isDecimalDigit"),Mt.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;te(i=t.current());)t.lastIntValue=16*t.lastIntValue+ee(i),t.advance();return t.pos!==e},i(te,"isHexDigit"),i(ee,"hexToInt"),Mt.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var i=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=64*e+8*i+t.lastIntValue:t.lastIntValue=8*e+i}else t.lastIntValue=e;return!0}return!1},Mt.regexp_eatOctalDigit=function(t){var e=t.current();return ie(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},i(ie,"isOctalDigit"),Mt.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var s=0;s<e;++s){var r=t.current();if(!te(r))return t.pos=i,!1;t.lastIntValue=16*t.lastIntValue+ee(r),t.advance()}return!0};var se=i(function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new B(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},"Token"),re=K.prototype;function ne(t,e){return e?parseInt(t,8):parseFloat(t.replace(/_/g,""))}function ae(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}re.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new se(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},re.getToken=function(){return this.next(),new se(this)},"undefined"!=typeof Symbol&&(re[Symbol.iterator]=function(){var t=this;return{next:i(function(){var e=t.getToken();return{done:e.type===k.eof,value:e}},"next")}}),re.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(k.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},re.readToken=function(t){return f(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},re.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);if(t<=55295||t>=56320)return t;var e=this.input.charCodeAt(this.pos+1);return e<=56319||e>=57344?t:(t<<10)+e-56613888},re.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var s=void 0,r=e;(s=C(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,i),e,this.pos,t,this.curPosition())},re.skipLineComment=function(t){for(var e=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!E(s);)s=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,i,this.curPosition())},re.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&I.test(String.fromCharCode(t))))break t;++this.pos}}},re.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=t,this.value=e,this.updateContext(i)},re.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(k.ellipsis)):(++this.pos,this.finishToken(k.dot))},re.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(k.assign,2):this.finishOp(k.slash,1)},re.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,s=42===t?k.star:k.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++i,s=k.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(k.assign,i+1):this.finishOp(s,i)},re.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(k.assign,3);return this.finishOp(124===t?k.logicalOR:k.logicalAND,2)}return 61===e?this.finishOp(k.assign,2):this.finishOp(124===t?k.bitwiseOR:k.bitwiseAND,1)},re.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(k.assign,2):this.finishOp(k.bitwiseXOR,1)},re.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?45!==e||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!_.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(k.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(k.assign,2):this.finishOp(k.plusMin,1)},re.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;return e===t?(i=62===t&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+i)?this.finishOp(k.assign,i+1):this.finishOp(k.bitShift,i)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===e&&(i=2),this.finishOp(k.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},re.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(k.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(k.arrow)):this.finishOp(61===t?k.eq:k.prefix,1)},re.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(46===e){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(k.questionDot,2)}if(63===e){if(t>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(k.assign,3);return this.finishOp(k.coalesce,2)}}return this.finishOp(k.question,1)},re.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,f(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(k.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+D(t)+"'")},re.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(k.parenL);case 41:return++this.pos,this.finishToken(k.parenR);case 59:return++this.pos,this.finishToken(k.semi);case 44:return++this.pos,this.finishToken(k.comma);case 91:return++this.pos,this.finishToken(k.bracketL);case 93:return++this.pos,this.finishToken(k.bracketR);case 123:return++this.pos,this.finishToken(k.braceL);case 125:return++this.pos,this.finishToken(k.braceR);case 58:return++this.pos,this.finishToken(k.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(k.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(k.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+D(t)+"'")},re.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)},re.readRegexp=function(){for(var t,e,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(_.test(s)&&this.raise(i,"Unterminated regular expression"),t)t=!1;else{if("["===s)e=!0;else if("]"===s&&e)e=!1;else if("/"===s&&!e)break;t="\\"===s}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var n=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(n);var o=this.regexpState||(this.regexpState=new Bt(this));o.reset(i,r,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var h=null;try{h=new RegExp(r,a)}catch(p){}return this.finishToken(k.regexp,{pattern:r,flags:a,value:h})},re.readInt=function(t,e,i){for(var s=this.options.ecmaVersion>=12&&void 0===e,r=i&&48===this.input.charCodeAt(this.pos),n=this.pos,a=0,o=0,h=0,p=null==e?1/0:e;h<p;++h,++this.pos){var c=this.input.charCodeAt(this.pos),l=void 0;if(s&&95===c)r&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===o&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===h&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=c;else{if((l=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=t)break;o=c,a=a*t+l}}return s&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||null!=e&&this.pos-n!==e?null:a},i(ne,"stringToNumber"),i(ae,"stringToBigInt"),re.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var i=this.readInt(t);return null==i&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(i=ae(this.input.slice(e,this.pos)),++this.pos):f(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(k.num,i)},re.readNumber=function(t){var e=this.pos;t||null!==this.readInt(10,void 0,!0)||this.raise(e,"Invalid number");var i=this.pos-e>=2&&48===this.input.charCodeAt(e);i&&this.strict&&this.raise(e,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!t&&this.options.ecmaVersion>=11&&110===s){var r=ae(this.input.slice(e,this.pos));return++this.pos,f(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(k.num,r)}i&&/[89]/.test(this.input.slice(e,this.pos))&&(i=!1),46!==s||i||(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(43!==(s=this.input.charCodeAt(++this.pos))&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number")),f(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=ne(this.input.slice(e,this.pos),i);return this.finishToken(k.num,n)},re.readCodePoint=function(){var t;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var e=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(e,"Code point out of bounds")}else t=this.readHexChar(4);return t},re.readString=function(t){for(var e="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===t)break;92===s?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(!1),i=this.pos):8232===s||8233===s?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(E(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(k.string,e)};var oe={};re.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==oe)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},re.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw oe;this.raise(t,e)},re.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==k.template&&this.type!==k.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(k.template,t)):36===i?(this.pos+=2,this.finishToken(k.dollarBraceL)):(++this.pos,this.finishToken(k.backQuote));if(92===i)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(E(i)){switch(t+=this.input.slice(e,this.pos),++this.pos,i){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},re.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(k.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},re.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return D(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++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"),t){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,e=this.input.charCodeAt(this.pos),"0"===s&&56!==e&&57!==e||!this.strict&&!t||this.invalidStringToken(this.pos-1-s.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return E(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},re.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return null===i&&this.invalidStringToken(e,"Bad character escape sequence"),i},re.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(m(r,s))this.pos+=r<=65535?1:2;else{if(92!==r)break;this.containsEsc=!0,t+=this.input.slice(i,this.pos);var n=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(e?f:m)(a,s)||this.invalidStringToken(n,"Invalid Unicode escape"),t+=D(a),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},re.readWord=function(){var t=this.readWord1(),e=k.name;return this.keywords.test(t)&&(e=b[t]),this.finishToken(e,t)};function he(t,e,s,r,n){s||(s=de),i(function t(i,r,n){var a=n||i.type;s[a](i,r,t),e[a]&&e[a](i,r)},"c")(t,r,n)}function pe(t,e,s,r,n){var a=[];s||(s=de),i(function t(i,r,n){var o=n||i.type,h=i!==a[a.length-1];h&&a.push(i),s[o](i,r,t),e[o]&&e[o](i,r||a,a),h&&a.pop()},"c")(t,r,n)}function ce(t,e){var i=Object.create(de);for(var s in t)i[s]=t[s];return i}function le(t,e,i){i(t,e)}function ue(t,e,i){}K.acorn={Parser:K,version:"8.15.0",defaultOptions:j,Position:F,SourceLocation:B,getLineInfo:U,Node:vt,TokenType:g,tokTypes:k,keywordTypes:b,TokContext:ht,tokContexts:pt,isIdentifierChar:m,isIdentifierStart:f,Token:se,isNewLine:E,lineBreak:_,lineBreakG:w,nonASCIIwhitespace:I},i(he,"simple"),i(pe,"ancestor"),i(ce,"make"),i(le,"skipThrough"),i(ue,"ignore");var de={};de.Program=de.BlockStatement=de.StaticBlock=function(t,e,i){for(var s=0,r=t.body;s<r.length;s+=1){i(r[s],e,"Statement")}},de.Statement=le,de.EmptyStatement=ue,de.ExpressionStatement=de.ParenthesizedExpression=de.ChainExpression=function(t,e,i){return i(t.expression,e,"Expression")},de.IfStatement=function(t,e,i){i(t.test,e,"Expression"),i(t.consequent,e,"Statement"),t.alternate&&i(t.alternate,e,"Statement")},de.LabeledStatement=function(t,e,i){return i(t.body,e,"Statement")},de.BreakStatement=de.ContinueStatement=ue,de.WithStatement=function(t,e,i){i(t.object,e,"Expression"),i(t.body,e,"Statement")},de.SwitchStatement=function(t,e,i){i(t.discriminant,e,"Expression");for(var s=0,r=t.cases;s<r.length;s+=1){i(r[s],e)}},de.SwitchCase=function(t,e,i){t.test&&i(t.test,e,"Expression");for(var s=0,r=t.consequent;s<r.length;s+=1){i(r[s],e,"Statement")}},de.ReturnStatement=de.YieldExpression=de.AwaitExpression=function(t,e,i){t.argument&&i(t.argument,e,"Expression")},de.ThrowStatement=de.SpreadElement=function(t,e,i){return i(t.argument,e,"Expression")},de.TryStatement=function(t,e,i){i(t.block,e,"Statement"),t.handler&&i(t.handler,e),t.finalizer&&i(t.finalizer,e,"Statement")},de.CatchClause=function(t,e,i){t.param&&i(t.param,e,"Pattern"),i(t.body,e,"Statement")},de.WhileStatement=de.DoWhileStatement=function(t,e,i){i(t.test,e,"Expression"),i(t.body,e,"Statement")},de.ForStatement=function(t,e,i){t.init&&i(t.init,e,"ForInit"),t.test&&i(t.test,e,"Expression"),t.update&&i(t.update,e,"Expression"),i(t.body,e,"Statement")},de.ForInStatement=de.ForOfStatement=function(t,e,i){i(t.left,e,"ForInit"),i(t.right,e,"Expression"),i(t.body,e,"Statement")},de.ForInit=function(t,e,i){"VariableDeclaration"===t.type?i(t,e):i(t,e,"Expression")},de.DebuggerStatement=ue,de.FunctionDeclaration=function(t,e,i){return i(t,e,"Function")},de.VariableDeclaration=function(t,e,i){for(var s=0,r=t.declarations;s<r.length;s+=1){i(r[s],e)}},de.VariableDeclarator=function(t,e,i){i(t.id,e,"Pattern"),t.init&&i(t.init,e,"Expression")},de.Function=function(t,e,i){t.id&&i(t.id,e,"Pattern");for(var s=0,r=t.params;s<r.length;s+=1){i(r[s],e,"Pattern")}i(t.body,e,t.expression?"Expression":"Statement")},de.Pattern=function(t,e,i){"Identifier"===t.type?i(t,e,"VariablePattern"):"MemberExpression"===t.type?i(t,e,"MemberPattern"):i(t,e)},de.VariablePattern=ue,de.MemberPattern=le,de.RestElement=function(t,e,i){return i(t.argument,e,"Pattern")},de.ArrayPattern=function(t,e,i){for(var s=0,r=t.elements;s<r.length;s+=1){var n=r[s];n&&i(n,e,"Pattern")}},de.ObjectPattern=function(t,e,i){for(var s=0,r=t.properties;s<r.length;s+=1){var n=r[s];"Property"===n.type?(n.computed&&i(n.key,e,"Expression"),i(n.value,e,"Pattern")):"RestElement"===n.type&&i(n.argument,e,"Pattern")}},de.Expression=le,de.ThisExpression=de.Super=de.MetaProperty=ue,de.ArrayExpression=function(t,e,i){for(var s=0,r=t.elements;s<r.length;s+=1){var n=r[s];n&&i(n,e,"Expression")}},de.ObjectExpression=function(t,e,i){for(var s=0,r=t.properties;s<r.length;s+=1){i(r[s],e)}},de.FunctionExpression=de.ArrowFunctionExpression=de.FunctionDeclaration,de.SequenceExpression=function(t,e,i){for(var s=0,r=t.expressions;s<r.length;s+=1){i(r[s],e,"Expression")}},de.TemplateLiteral=function(t,e,i){for(var s=0,r=t.quasis;s<r.length;s+=1){i(r[s],e)}for(var n=0,a=t.expressions;n<a.length;n+=1){i(a[n],e,"Expression")}},de.TemplateElement=ue,de.UnaryExpression=de.UpdateExpression=function(t,e,i){i(t.argument,e,"Expression")},de.BinaryExpression=de.LogicalExpression=function(t,e,i){i(t.left,e,"Expression"),i(t.right,e,"Expression")},de.AssignmentExpression=de.AssignmentPattern=function(t,e,i){i(t.left,e,"Pattern"),i(t.right,e,"Expression")},de.ConditionalExpression=function(t,e,i){i(t.test,e,"Expression"),i(t.consequent,e,"Expression"),i(t.alternate,e,"Expression")},de.NewExpression=de.CallExpression=function(t,e,i){if(i(t.callee,e,"Expression"),t.arguments)for(var s=0,r=t.arguments;s<r.length;s+=1){i(r[s],e,"Expression")}},de.MemberExpression=function(t,e,i){i(t.object,e,"Expression"),t.computed&&i(t.property,e,"Expression")},de.ExportNamedDeclaration=de.ExportDefaultDeclaration=function(t,e,i){t.declaration&&i(t.declaration,e,"ExportNamedDeclaration"===t.type||t.declaration.id?"Statement":"Expression"),t.source&&i(t.source,e,"Expression")},de.ExportAllDeclaration=function(t,e,i){t.exported&&i(t.exported,e),i(t.source,e,"Expression")},de.ImportDeclaration=function(t,e,i){for(var s=0,r=t.specifiers;s<r.length;s+=1){i(r[s],e)}i(t.source,e,"Expression")},de.ImportExpression=function(t,e,i){i(t.source,e,"Expression")},de.ImportSpecifier=de.ImportDefaultSpecifier=de.ImportNamespaceSpecifier=de.Identifier=de.PrivateIdentifier=de.Literal=ue,de.TaggedTemplateExpression=function(t,e,i){i(t.tag,e,"Expression"),i(t.quasi,e,"Expression")},de.ClassDeclaration=de.ClassExpression=function(t,e,i){return i(t,e,"Class")},de.Class=function(t,e,i){t.id&&i(t.id,e,"Pattern"),t.superClass&&i(t.superClass,e,"Expression"),i(t.body,e)},de.ClassBody=function(t,e,i){for(var s=0,r=t.body;s<r.length;s+=1){i(r[s],e)}},de.MethodDefinition=de.PropertyDefinition=de.Property=function(t,e,i){t.computed&&i(t.key,e,"Expression"),t.value&&i(t.value,e,"Expression")};const fe=new Set(["Array","ArrayBuffer","atob","AudioContext","Blob","Boolean","BigInt","btoa","clearInterval","clearTimeout","console","crypto","CustomEvent","DataView","Date","decodeURI","decodeURIComponent","devicePixelRatio","document","encodeURI","encodeURIComponent","Error","escape","eval","fetch","File","FileList","FileReader","Float32Array","Float64Array","Function","Headers","Image","ImageData","Infinity","Int16Array","Int32Array","Int8Array","Intl","isFinite","isNaN","JSON","Map","Math","NaN","Number","navigator","Object","parseFloat","parseInt","performance","Path2D","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","cancelAnimationFrame","requestAnimationFrame","Set","setInterval","setTimeout","String","Symbol","SyntaxError","TextDecoder","TextEncoder","this","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","URIError","URL","WeakMap","WeakSet","WebSocket","Worker","window"]),me=ce({Import(){},ViewExpression(t,e,i){i(t.id,e,"Identifier")},MutableExpression(t,e,i){i(t.id,e,"Identifier")}});function ge(t){return"FunctionExpression"===t.type||"FunctionDeclaration"===t.type||"ArrowFunctionExpression"===t.type||"Program"===t.type}function xe(t){return"BlockStatement"===t.type||"ForInStatement"===t.type||"ForOfStatement"===t.type||"ForStatement"===t.type||ge(t)}function ve(t){return"FunctionExpression"===t.type||"FunctionDeclaration"===t.type}function ye(t,e){const s={type:"Program",body:[t.body]},r=new Map,n=new Set(e),a=[];function o(t,e){const i=r.get(t);return!!i&&i.has(e)}function h(t,e){const i=r.get(t);i?i.add(e.name):r.set(t,new Set([e.name]))}function p(t){t.id&&h(t,t.id)}function c(t){t.params.forEach(e=>u(e,t)),t.id&&h(t,t.id)}function l(t){t.param&&u(t.param,t)}function u(t,e){switch(t.type){case"Identifier":h(e,t);break;case"ObjectPattern":t.properties.forEach(t=>u(t,e));break;case"ArrayPattern":t.elements.forEach(t=>t&&u(t,e));break;case"Property":u(t.value,e);break;case"RestElement":u(t.argument,e);break;case"AssignmentPattern":u(t.left,e);break;default:throw new Error("Unrecognized pattern type: "+t.type)}}function d(t){h(s,t.local)}function f(t,e){let i=t.name;if("undefined"!==i){for(let s=e.length-2;s>=0;--s){if("arguments"===i&&ve(e[s]))return;if(o(e[s],i))return;"ViewExpression"===e[s].type&&(i=`viewof ${(t=e[s]).id.name}`),"MutableExpression"===e[s].type&&(i=`mutable ${(t=e[s]).id.name}`)}if(!n.has(i)){if("arguments"===i)throw Object.assign(new SyntaxError("arguments is not allowed"),{node:t});a.push(t)}}}function m(t,e){if(t)switch(t.type){case"Identifier":case"VariablePattern":for(const i of e)if(o(i,t.name))return;if("MutableExpression"===e[e.length-2].type)return;throw Object.assign(new SyntaxError(`Assignment to constant variable ${t.name}`),{node:t});case"ArrayPattern":for(const i of t.elements)m(i,e);return;case"ObjectPattern":for(const i of t.properties)m(i,e);return;case"Property":return void m(t.value,e);case"RestElement":return void m(t.argument,e)}}function g(t,e){m(t.argument,e)}function x(t,e){m(t.left,e)}return i(o,"hasLocal"),i(h,"declareLocal"),i(p,"declareClass"),i(c,"declareFunction"),i(l,"declareCatchClause"),i(u,"declarePattern"),i(d,"declareModuleSpecifier"),pe(s,{VariableDeclaration:i((t,e)=>{let i=null;for(let s=e.length-1;s>=0&&null===i;--s)("var"===t.kind?ge(e[s]):xe(e[s]))&&(i=e[s]);t.declarations.forEach(t=>u(t.id,i))},"VariableDeclaration"),FunctionDeclaration:i((t,e)=>{let i=null;for(let s=e.length-2;s>=0&&null===i;--s)ge(e[s])&&(i=e[s]);h(i,t.id),c(t)},"FunctionDeclaration"),Function:c,ClassDeclaration:i((t,e)=>{let i=null;for(let s=e.length-2;s>=0&&null===i;s--)ge(e[s])&&(i=e[s]);h(i,t.id)},"ClassDeclaration"),Class:p,CatchClause:l,ImportDefaultSpecifier:d,ImportSpecifier:d,ImportNamespaceSpecifier:d},me),i(f,"identifier"),pe(s,{VariablePattern:f,Identifier:f},me),i(m,"checkConst"),i(g,"checkConstArgument"),i(x,"checkConstLeft"),pe(s,{AssignmentExpression:x,AssignmentPattern:x,UpdateExpression:g,ForOfStatement:x,ForInStatement:x},me),a}function be(t,e){const s={type:"Program",body:[t.body]},r=new Map,{references:n}=t;return he(s,{CallExpression:i(t=>{const{callee:i,arguments:s}=t;if("Identifier"!==i.type||i.name!==e||n.indexOf(i)<0)return;if(1!==s.length||!("Literal"===s[0].type&&/^['"]/.test(s[0].raw)||"TemplateLiteral"===s[0].type&&0===s[0].expressions.length))throw Object.assign(new SyntaxError(`${e} requires a single literal string argument`),{node:t});const[a]=s,o="Literal"===a.type?a.value:a.quasis[0].value.cooked,h={start:a.start,end:a.end};r.has(o)?r.get(o).push(h):r.set(o,[h])},"CallExpression")},me),r}i(ge,"isScope"),i(xe,"isBlockScope"),i(ve,"declaresArguments"),i(ye,"findReferences"),i(be,"findFeatures");function Se(t,{tag:e,raw:i,globals:s,...r}={}){let n;if(null!=e&&t){n=Ce.parse(t,r);const a=Pe.parse(e,r);Te(a,e,s),Ve(a,e),n.tag=a,n.raw=!!i}else n=_e.parse(t,r);return Te(n,t,s),Ve(n,t),n}i(Se,"parseCell$2");const ke=class _CellParser extends K{constructor(t,...e){super(Object.assign({ecmaVersion:13},t),...e)}enterScope(t){return 2&t&&++this.O_function,super.enterScope(t)}exitScope(){return 2&this.currentScope().flags&&--this.O_function,super.exitScope()}parseForIn(t,e){return 1===this.O_function&&t.await&&(this.O_async=!0),super.parseForIn(t,e)}parseAwait(){return 1===this.O_function&&(this.O_async=!0),super.parseAwait()}parseYield(t){return 1===this.O_function&&(this.O_generator=!0),super.parseYield(t)}parseImport(t){return this.next(),t.specifiers=this.parseImportSpecifiers(),this.type===k._with&&(this.next(),t.injections=this.parseImportSpecifiers()),this.expectContextual("from"),t.source=this.type===k.string?this.parseExprAtom():this.unexpected(),this.finishNode(t,"ImportDeclaration")}parseImportSpecifiers(){const t=[],e=new Set;let i=!0;for(this.expect(k.braceL);!this.eat(k.braceR);){if(i)i=!1;else if(this.expect(k.comma),this.afterTrailingComma(k.braceR))break;const s=this.startNode();s.view=this.eatContextual("viewof"),s.mutable=!s.view&&this.eatContextual("mutable"),s.imported=this.parseIdent(),this.checkUnreserved(s.imported),this.checkLocal(s.imported),this.eatContextual("as")?(s.local=this.parseIdent(),this.checkUnreserved(s.local),this.checkLocal(s.local)):s.local=s.imported,this.checkLValSimple(s.local,"let"),e.has(s.local.name)&&this.raise(s.local.start,`Identifier '${s.local.name}' has already been declared`),e.add(s.local.name),t.push(this.finishNode(s,"ImportSpecifier"))}return t}parseExprAtom(t){return this.parseMaybeKeywordExpression("viewof","ViewExpression")||this.parseMaybeKeywordExpression("mutable","MutableExpression")||super.parseExprAtom(t)}startCell(){this.O_function=0,this.O_async=!1,this.O_generator=!1,this.strict=!0,this.enterScope(14)}finishCell(t,e,i){return i&&this.checkLocal(i),t.id=i,t.body=e,t.async=this.O_async,t.generator=this.O_generator,this.exitScope(),this.finishNode(t,"Cell")}parseCell(t,e){const i=new _CellParser({},this.input,this.start);let s=i.getToken(),r=null,n=null;return this.startCell(),s.type===k._import&&i.getToken().type!==k.parenL?r=this.parseImport(this.startNode()):s.type!==k.eof&&s.type!==k.semi&&(s.type===k.name&&("viewof"!==s.value&&"mutable"!==s.value||(s=i.getToken(),s.type!==k.name&&i.unexpected()),s=i.getToken(),s.type===k.eq&&(n=this.parseMaybeKeywordExpression("viewof","ViewExpression")||this.parseMaybeKeywordExpression("mutable","MutableExpression")||this.parseIdent(),s=i.getToken(),this.expect(k.eq))),s.type===k.braceL?r=this.parseBlock():(r=this.parseExpression(),null!==n||"FunctionExpression"!==r.type&&"ClassExpression"!==r.type||(n=r.id))),this.semicolon(),e&&this.expect(k.eof),this.finishCell(t,r,n)}parseTopLevel(t){return this.parseCell(t,!0)}toAssignable(t,e,i){return"MutableExpression"===t.type?t:super.toAssignable(t,e,i)}checkLocal(t){const e=t.id||t;(fe.has(e.name)||"arguments"===e.name)&&this.raise(e.start,`Identifier '${e.name}' is reserved`)}checkUnreserved(t){return"viewof"!==t.name&&"mutable"!==t.name||this.raise(t.start,`Unexpected keyword '${t.name}'`),super.checkUnreserved(t)}checkLValSimple(t,e,i){return super.checkLValSimple("MutableExpression"===t.type?t.id:t,e,i)}unexpected(t){this.raise(null!=t?t:this.start,this.type===k.eof?"Unexpected end of input":"Unexpected token")}parseMaybeKeywordExpression(t,e){if(this.isContextual(t)){const t=this.startNode();return this.next(),t.id=this.parseIdent(),this.finishNode(t,e)}}};i(ke,"CellParser");let _e=ke;const we=new ht("`",!0,!0,t=>Ie.call(t)),Ee=class _TemplateCellParser extends _e{constructor(...t){super(...t),this.type=k.backQuote,this.exprAllowed=!1}initialContext(){return[we]}parseCell(t){this.startCell(),this.type===k.eof&&(this.value="");const e=!0,i=this.startNode();i.expressions=[];let s=this.parseTemplateElement({isTagged:e});for(i.quasis=[s];this.type!==k.eof;)this.expect(k.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(k.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:e}));return s.tail=!0,this.next(),this.finishNode(i,"TemplateLiteral"),this.expect(k.eof),this.finishCell(t,i,null)}};i(Ee,"TemplateCellParser");let Ce=Ee;function Ie(){t:for(;this.pos<this.input.length;this.pos++)switch(this.input.charCodeAt(this.pos)){case 92:this.pos<this.input.length-1&&++this.pos;break;case 36:if(123===this.input.charCodeAt(this.pos+1)){if(this.pos===this.start&&this.type===k.invalidTemplate)return this.pos+=2,this.finishToken(k.dollarBraceL);break t}}return this.finishToken(k.invalidTemplate,this.input.slice(this.start,this.pos))}i(Ie,"readTemplateToken");const Ae=class _CellTagParser extends K{constructor(t,...e){super(Object.assign({ecmaVersion:12},t),...e)}enterScope(t){return 2&t&&++this.O_function,super.enterScope(t)}exitScope(){return 2&this.currentScope().flags&&--this.O_function,super.exitScope()}parseForIn(t,e){return 1===this.O_function&&t.await&&(this.O_async=!0),super.parseForIn(t,e)}parseAwait(){return 1===this.O_function&&(this.O_async=!0),super.parseAwait()}parseYield(t){return 1===this.O_function&&(this.O_generator=!0),super.parseYield(t)}parseTopLevel(t){return this.O_function=0,this.O_async=!1,this.O_generator=!1,this.strict=!0,this.enterScope(14),t.body=this.parseExpression(),t.input=this.input,t.async=this.O_async,t.generator=this.O_generator,this.exitScope(),this.finishNode(t,"CellTag")}};i(Ae,"CellTagParser");let Pe=Ae;function Te(t,e,i=fe){if(t.body)if("ImportDeclaration"===t.body.type)t.references=t.body.injections?t.body.injections.map(t=>t.imported):[];else try{t.references=ye(t,i)}catch(s){if(s.node){const t=U(e,s.node.start);s.message+=` (${t.line}:${t.column})`,s.pos=s.node.start,s.loc=t,delete s.node}throw s}else t.references=[];return t}function Ve(t,e){if(t.body&&"ImportDeclaration"!==t.body.type)try{t.fileAttachments=be(t,"FileAttachment"),t.databaseClients=be(t,"DatabaseClient"),t.secrets=be(t,"Secret"),t.notificationClients=be(t,"NotificationClient")}catch(i){if(i.node){const t=U(e,i.node.start);i.message+=` (${t.line}:${t.column})`,i.pos=i.node.start,i.loc=t,delete i.node}throw i}else t.fileAttachments=new Map,t.databaseClients=new Map,t.secrets=new Map,t.notificationClients=new Map;return t}i(Te,"parseReferences"),i(Ve,"parseFeatures");const Ne=class _ModuleParser extends _e{parseTopLevel(t){for(t.cells||(t.cells=[]);this.type!==k.eof;){const e=this.parseCell(this.startNode());e.input=this.input,t.cells.push(e)}return this.next(),this.finishNode(t,"Program")}};i(Ne,"ModuleParser");let Le=Ne;function Re(t){return Le.parse(t,{ecmaVersion:"latest"}).cells.map(e=>({type:"Cell",text:t.substring(e.start,e.end),start:e.start,end:e.end}))}function Oe(t){return Se(t)}i(Re,"splitModule"),i(Oe,"parseCell$1");const De=me,Me={functionType:Object.getPrototypeOf(function(){}).constructor,asyncFunctionType:Object.getPrototypeOf(async function(){}).constructor,generatorFunctionType:Object.getPrototypeOf(function*(){}).constructor,asyncGeneratorFunctionType:Object.getPrototypeOf(async function*(){}).constructor};function Fe(t=!1,e=!1){return t||e?t&&!e?Me.asyncFunctionType:!t&&e?Me.generatorFunctionType:Me.asyncGeneratorFunctionType:Me.functionType}function Be(t,e=!1,i=!1,s=!1,r){if(void 0!==r)return t.patches.sort((t,e)=>e.start-t.start),t.patches.forEach(t=>{r=r.substring(0,t.start)+t.newText+r.substring(t.end)}),new(Fe(e,i))(...t.args,s?r.substring(1,r.length-1).trim():`return (\n${r}\n);`)}function Ue(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}i(Fe,"funcType"),i(Be,"createFunction"),i(Ue,"join");const je=i(t=>"."===t[0],"isRelativePath"),qe=i((t,e)=>je(t)?Ue(e,t):t,"fixRelativeUrl");async function $e(t){return new Me.asyncFunctionType("url","return import(url)")(t)}function We(t){return t.split("`").join("\\`")}function Ge(t,e,i){let s,r;try{s=Oe(t)}catch(n){r=n}return{ojs:t,offset:e,inlineMD:i,cell:s,error:r}}function He(t){const e=[],i=/(```(?:\s|\S)[\s\S]*?```)/g;let s=0,r=i.exec(t);for(;null!==r;){r.index>s&&e.push(Ge(t.substring(s,r.index),s,!0));const n=r[0];if(0===n.indexOf("``` ")||0===n.indexOf("```\n")||0===n.indexOf("```\r\n")){const t=3,i=n.substring(t,n.length-t);e.push(Ge(i,r.index+t,!1))}else e.push(Ge(n,r.index,!0));s=r.index+r[0].length,r=i.exec(t)}return t.length>s&&e.push(Ge(t.substring(s,t.length),s,!0)),e}function ze(t){return{files:[],nodes:Re(t).map((t,e)=>({id:e,mode:"js",value:t.text,start:t.start,end:t.end}))}}function Ke(t){return{files:[],nodes:He(t).map((t,e)=>({id:e,mode:t.inlineMD?"md":"js",value:t.ojs,start:t.offset,end:t.offset+t.ojs.length}))}}function Qe(t,e="https://api.codetabs.com/v1/proxy/?quest=",i=""){const s=t.match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n?]+)/gim);if(!s||0===s.length)throw new Error(`Invalid URL: ${t}`);return fetch(t,{headers:{origin:s[0],referer:t}}).then(t=>{if(t.ok)return t;throw new Error("CORS?")}).catch(r=>(t=`${e}${t}${i}`,fetch(t,{headers:{origin:s[0],referer:t}})))}function Ye(t,e,i){const s=0===t.indexOf("https://observablehq.com/d");return Qe(t.replace("https://observablehq.com/"+(s?"d/":""),"https://api.observablehq.com/document/"),e,i).then(t=>t.json())}function Je(t,e){if(void 0===t.references)return{inputs:[],args:[],patches:[]};const s={};t.references.forEach(t=>s[e.substring(t.start,t.end)]=!0);const r={inputs:Object.keys(s),args:Object.keys(s).map(t=>t.split(" ").join("_")),patches:[]},n=i((e,i)=>{var s,n;return r.patches.push({start:e.start-((null==(s=t.body)?void 0:s.start)??0),end:e.end-((null==(n=t.body)?void 0:n.start)??0),newText:i})},"pushPatch");return t.body&&pe(t.body,{Identifier(t){e.substring(t.start,t.end)},MutableExpression(t){const i=e.substring(t.start,t.end).split(" ").join("_")+".value";n(t,i)},ViewExpression(t){const i=e.substring(t.start,t.end).split(" ").join("_");n(t,i)},ThisExpression(t,i){"this"!==e.substring(t.start,t.end)||i.find(t=>"FunctionExpression"===t.type)||n(t,"((this === globalThis || this === globalThis.window)? undefined : this?.valueOf())")}},De),r}function Xe(t){var e,i;return{type:"import",src:t.body.source.value,specifiers:(null==(e=t.body.specifiers)?void 0:e.map(t=>{var e;return{view:t.view,name:t.imported.name,alias:(null==(e=t.local)?void 0:e.name)&&t.imported.name!==t.local.name?t.local.name:t.imported.name}}))??[],injections:(null==(i=t.body.injections)?void 0:i.map(t=>{var e;return{name:t.imported.name,alias:(null==(e=t.local)?void 0:e.name)??t.imported.name}}))??[]}}function Ze(t,e,s,r){var n,a;const o=e.id&&t.substring(e.id.start,e.id.end);return{type:"viewof",variable:{type:"variable",id:o,inputs:s.inputs,func:Be(s,e.async,e.generator,"BlockStatement"===e.body.type,r)},variableValue:{type:"variable",id:null==(a=null==(n=null==e?void 0:e.id)?void 0:n.id)?void 0:a.name,inputs:["Generators",o],func:i((t,e)=>t.input(e),"func")}}}function ti(t,e,s,r){var n,a;const o=e.id&&t.substring(e.id.start,e.id.end),h=null==(a=null==(n=null==e?void 0:e.id)?void 0:n.id)?void 0:a.name,p=`initial ${h}`;return{type:"mutable",initial:{type:"variable",id:p,inputs:s.inputs,func:Be(s,e.async,e.generator,"BlockStatement"===e.body.type,r)},variable:{type:"variable",id:o,inputs:["Mutable",p],func:i((t,e)=>new t(e),"func")},variableValue:{type:"variable",id:h,inputs:[o],func:i(t=>t.generator,"func")}}}function ei(t,e,i,s){var r,n;return{type:"variable",id:e.id&&t.substring(null==(r=e.id)?void 0:r.start,null==(n=e.id)?void 0:n.end),inputs:i.inputs,func:Be(i,e.async,e.generator,"BlockStatement"===e.body.type,s)}}function ii(t,e){var i,s;const r=Oe(t);let n=r.body&&t.substring(r.body.start,r.body.end);switch(null==(i=r.body)?void 0:i.type){case"ImportDeclaration":return Xe(r);case"ImportExpression":if("Literal"===r.body.source.type)n=`import("${qe(""+r.body.source.value,e)}")`;else console.error("Unexpected import value")}const a=Je(r,t);switch(null==(s=r.id)?void 0:s.type){case"ViewExpression":return Ze(t,r,a,n);case"MutableExpression":return ti(t,r,a,n);default:return ei(t,r,a,n)}}i($e,"obfuscatedImport"),i(We,"encodeBacktick"),i(Ge,"createParsedOJS"),i(He,"splitOmd"),i(ze,"ojs2notebook"),i(Ke,"omd2notebook"),i(Qe,"fetchEx"),i(Ye,"download"),i(Je,"calcRefs"),i(Xe,"parseImportDeclaration"),i(Ze,"parseViewExpression"),i(ti,"parseMutableExpression"),i(ei,"parseVariableExpression"),i(ii,"parseCell");const si=class _Writer{constructor(){s(this,"_files",[]),s(this,"_imports",[]),s(this,"_functions",[]),s(this,"_defines",[]),s(this,"_defineUid",0),s(this,"_functionUid",0)}toString(){return`${this._imports.join("\n")}\n\n${this._functions.join("\n").split("\n) {").join("){")}\n\nexport default function define(runtime, observer) {\n const main = runtime.module();\n\n function toString() { return this.url; }\n const fileAttachments = new Map([\n ${this._files.map(t=>`["${t.name}", { url: new URL("${t.url}"), mimeType: ${JSON.stringify(t.mime_type)}, toString }]`).join(",\n ")}\n ]);\n main.builtin("FileAttachment", runtime.fileAttachments(name => fileAttachments.get(name)));\n\n ${this._defines.join("\n ")}\n\n return main;\n}\n`}files(t){this._files=[...this._files,...t]}import(t){this._imports.push(`import define${++this._defineUid} from "${t}"; `)}importDefine(t){const e=t.injections??[],i=e.map(t=>t.name===t.alias?`"${t.name}"`:`{name: "${t.name}", alias: "${t.alias}"}`),s=e.length?`.derive([${i.join(", ")}], main)`:"";this._defines.push(`const child${this._defineUid} = runtime.module(define${this._defineUid})${s};`);(t.specifiers??[]).forEach(t=>{this._defines.push(`main.import("${t.name}"${t.alias&&t.alias!==t.name?`, "${t.alias}"`:""}, child${this._defineUid}); `)})}function(t){var e,i;let s=t.id??""+ ++this._functionUid;const r=s.split(" ");return s=`_${r[r.length-1]}`,this._functions.push(`${null==(i=null==(e=t.func)?void 0:e.toString())?void 0:i.replace("anonymous",`${s}`)}`),s}define(t,e=!0,i=!1,s){var r;s=s??t.id;const n=e?`.variable(observer(${t.id?JSON.stringify(t.id):""}))`:"",a=t.id?`${JSON.stringify(t.id)}, `:"",o=t.inputs??[],h=o.length?`[${o.map(t=>JSON.stringify(t)).join(", ")}], `:"",p=i?null==(r=t.func)?void 0:r.toString():s;this._defines.push(`main${n}.define(${a}${h}${p});`)}error(t){}};i(si,"Writer");let ri=si;async function ni(t,e){const i=qe(t,e),s=await Qe(i).then(t=>t.text());let r;t.endsWith(".ojsnb")?r=JSON.parse(s):t.endsWith(".ojs")?r=ze(s):t.endsWith(".omd")?r=Ke(s):(console.warn(`Unknown file type: ${t}, assuming .ojsnb`),r=JSON.parse(s));const n=fi(r,{baseUrl:e});return n.delete=()=>{},n.write=t=>{t.import(i)},n}async function ai(t){const e=`https://api.observablehq.com/${"@"===t[0]?t:`d/${t}`}.js?v=3`;let s={default:i(function(t,e){},"default")};try{s=await $e(e)}catch(n){}const r=s.default;return r.delete=()=>{},r.write=t=>{t.import(e)},r}async function oi(t){const e=`https://api.observablehq.com/document/${t}`,i=Qe(e).then(t=>t.json()).catch(t=>{console.error(e),console.error(t)}),s=fi(await i);return s.delete=()=>{},s.write=t=>{t.import(e)},s}async function hi(t,e,s,{baseUrl:r,importMode:n}){const a=je(e.src)?await ni(e.src,r??""):"recursive"===n?await oi(e.src):await ai(e.src),o=[],h=[];e.specifiers.forEach(t=>{const e=t.view?"viewof ":"";o.push(ci(e+t.name,e+t.alias)),t.view&&o.push(ci(t.name,t.alias))});const p=i((t,i,s)=>{let r=t.module(a);return e.injections.length&&(r=r.derive(e.injections,i)),h.forEach(t=>t(i,s)),o.forEach(t=>t(i,r)),r},"retVal");return p.importVariables=o,p.variables=h,p.delete=()=>{o.forEach(t=>t.delete()),h.forEach(t=>t.delete()),a.delete()},p.write=t=>{a.write(t),t.importDefine(e)},p}function pi(t,e,s,r,n,a=!1){let o,h;const p=i((i,a)=>{if(e&&a&&(o=a(s,t.id)),h=i.variable(o),arguments.length>1)try{h.define(s,r,n)}catch(p){console.error(null==p?void 0:p.message)}if(t.pinned){h=a?i.variable(a(s,t.id)):i.variable();try{h.define(void 0,["md"],e=>e`\`\`\`js
|
|
2
|
+
${t.value}
|
|
3
|
+
\`\`\``)}catch(p){console.error(null==p?void 0:p.message)}}return h},"retVal");return p.delete=()=>{var t;try{null==(t=null==o?void 0:o._node)||t.remove()}catch(e){}o=void 0;try{null==h||h.delete()}catch(e){}h=void 0},p.write=t=>{if(a)t.define({id:s,inputs:r,func:n},e,!0);else{const i=t.function({id:s,func:n});t.define({id:s,inputs:r,func:n},e,!1,i)}},p}function ci(t,e){let s;const r=i((i,r)=>{s=i.variable(),void 0===e?s.import(t,r):s.import(t,e,r)},"retVal");return r.delete=()=>{null==s||s.delete()},r}async function li(t,e){const s=[],r=[];try{const i=Re(t.mode&&"js"!==t.mode?`${t.mode}\`${We(t.value)}\``:t.value);for(const n of i){const i=ii(n.text,e.baseUrl??"");switch(i.type){case"import":s.push(await hi(0,i,n.text,e));break;case"viewof":r.push(pi(t,!0,i.variable.id,i.variable.inputs,i.variable.func)),r.push(pi(t,!1,i.variableValue.id,i.variableValue.inputs,i.variableValue.func,!0));break;case"mutable":r.push(pi(t,!1,i.initial.id,i.initial.inputs,i.initial.func)),r.push(pi(t,!1,i.variable.id,i.variable.inputs,i.variable.func)),r.push(pi(t,!0,i.variableValue.id,i.variableValue.inputs,i.variableValue.func,!0));break;case"variable":r.push(pi(t,!0,i.id,i.inputs,i.func))}}}catch(a){r.push(pi(t,!0,void 0,[],a.message??"Unkown error"))}const n=i((t,e,i)=>{s.forEach(s=>s(t,e,i)),r.forEach(t=>t(e,i))},"retVal");return n.id=t.id,n.modules=s,n.variables=r,n.delete=()=>{r.forEach(t=>t.delete()),s.forEach(t=>t.delete())},n.write=t=>{s.forEach(e=>e.write(t)),r.forEach(e=>e.write(t))},n}function ui(t,e){function s(){return globalThis.url??""}return i(s,"toString"),[t.name,{url:new URL(qe(t.url,e.baseUrl??"")),mimeType:t.mime_type,toString:s}]}function di(t=[],e=[],{baseUrl:s=".",importMode:r="precompiled"}={}){const n=t.map(t=>ui(t,{baseUrl:s})),a=new Map(n),o=new Map(e.map(t=>[t.id,t])),h=i((t,e)=>{const i=t.module();return i.builtin("FileAttachment",t.fileAttachments(t=>a.get(t)??{url:new URL(qe(t,s)),mimeType:null})),i.builtin("fetchEx",Qe),o.forEach(s=>{s(t,i,e)}),i},"retVal");return h.fileAttachments=a,h.cells=o,h.set=async t=>{const e=await li(t,{baseUrl:s,importMode:r});return h.delete(e.id),o.set(e.id,e),e},h.get=t=>o.get(t),h.delete=t=>{const e=o.get(t);return!!e&&(e.delete(),o.delete(t))},h.clear=()=>{o.forEach(t=>t.delete()),o.clear()},h.write=e=>{e.files(t),o.forEach(t=>t.write(e))},h.toString=(t=new ri)=>(h.write(t),t.toString().trim()),h}async function fi(t,{baseUrl:e=".",importMode:i="precompiled"}={}){const s="string"==typeof t?ze(t):t,r=await Promise.all(s.nodes.map(t=>li(t,{baseUrl:e,importMode:i})));return di(s.files,r,{baseUrl:e,importMode:i})}i(ni,"importFile"),i(ai,"importCompiledNotebook"),i(oi,"importNotebook"),i(hi,"createModule"),i(pi,"createVariable"),i(ci,"createImportVariable"),i(li,"createCell"),i(ui,"createFile"),i(di,"notebook"),i(fi,"compile"),t.Writer=ri,t.compile=fi,t.download=Ye,t.notebook=di,t.ojs2notebook=ze,t.omd2notebook=Ke,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|
|
36
4
|
//# sourceMappingURL=index.umd.cjs.map
|
|
37
|
-
|
|
5
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap";:root{--syntax-normal: #1b1e23;--syntax-comment: #828282;--syntax-number: #20a5ba;--syntax-keyword: #c30771;--syntax-atom: #10a778;--syntax-string: #008ec4;--syntax-error: #ffbedc;--syntax-unknown-variable: #838383;--syntax-known-variable: #005f87;--syntax-matchbracket: #20bbfc;--syntax-key: #6636b4;--mono-fonts: 82%/1.5 Menlo, Consolas, monospace}.observablehq--expanded,.observablehq--collapsed,.observablehq--function,.observablehq--import,.observablehq--string:before,.observablehq--string:after,.observablehq--gray{color:var(--syntax-normal)}.observablehq--collapsed,.observablehq--expanded.observablehq--inspect a{cursor:pointer}.observablehq--field{text-indent:-1em;margin-left:1em}.observablehq--empty{color:var(--syntax_comment)}a[href],.observablehq--keyword,.observablehq--blue{color:#3182bd}.hljs-deletion,.hljs-variable,.observablehq--forbidden,.observablehq--pink{color:#e377c2}.observablehq--orange{color:#e6550d}.observablehq--null,.observablehq--undefined,.observablehq--boolean,.hljs-literal{color:var(--syntax-atom)}.hljs-number,.hljs-regexp,.hljs-bullet,.hljs-link,.observablehq--bigint,.observablehq--number,.observablehq--date,.observablehq--regexp,.observablehq--symbol,.observablehq--green{color:var(--syntax-number)}.observablehq--index,.observablehq--key{color:var(--syntax-key)}.observablehq--prototype-key{color:#aaa}.observablehq--empty{font-style:oblique}.hljs-string,.hljs-meta,.hljs-symbol,.hljs-template-tag,.hljs-template-variable,.hljs-addition,.observablehq--string,.observablehq--purple{color:var(--syntax-string)}.observablehq--error,.observablehq--red{color:#e7040f}.observablehq:empty:after,.observablehq>link:only-child,.observablehq>style:only-child,.observablehq--inspect{font:var(--monospace-font);overflow-x:auto;display:block;padding:4px 0;white-space:pre}.observablehq--error .observablehq--inspect{word-break:break-all;white-space:pre-wrap}:root{--syntax-diff: #24292e;--syntax-diff-bg: #ffffff;--hr: rgba(0, 0, 0, .05);--monospace: Menlo, Consolas, monospace;--monospace-font: 14px/1.5 var(--monospace);--serif: "Source Serif Pro", "Iowan Old Style", "Apple Garamond", "Palatino Linotype", "Times New Roman", "Droid Serif", Times, serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sans-serif: -apple-system, BlinkMacSystemFont, "avenir next", avenir, helvetica, "helvetica neue", ubuntu, roboto, noto, "segoe ui", arial, sans-serif}html{font:17px/1.5 var(--serif);-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#1b1e23}body{margin:0 14px}body.fullscreen{margin:0}h1,h2,h3,h4,h5,h6{color:#333;font-weight:700;line-height:1.15;margin-top:0;margin-bottom:.25rem}h2~p,h3~p,h4~p,h2~table,h3~table,h4~table{margin-top:0}.observablehq:first-of-type h1+h2{font-size:20px;font-style:italic;font-weight:400;margin-bottom:1rem}a[href]{text-decoration:none}a[href]:hover{text-decoration:underline}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-size:90%}pre,code,tt{font-family:var(--monospace);font-size:14px;line-height:1.5}img{max-width:calc(100vw - 28px)}p,table,figure,figcaption,h1,h2,h3,h4,h5,h6,.katex-display{max-width:640px}blockquote,ol,ul{max-width:600px}blockquote{margin:1rem 1.5rem}ul,ol{padding-left:28px}hr{height:1px;margin:1rem 0;padding:1rem 0;border:none;background:no-repeat center/100% 1px linear-gradient(to right,var(--hr),var(--hr))}pre{padding:2px 0}.observablehq--md-pre{overflow-x:auto}input:not([type]),input[type=email],input[type=number],input[type=password],input[type=range],input[type=search],input[type=tel],input[type=text],input[type=url]{width:240px}input,canvas,button{vertical-align:middle}button,input,textarea{accent-color:#3b5fc0}table{width:100%;border-collapse:collapse;font:13px/1.2 var(--sans-serif)}table pre,table code,table tt{font-size:inherit;line-height:inherit}th>pre:only-child,td>pre:only-child{margin:0;padding:0}th{color:#111;text-align:left;vertical-align:bottom}td{color:#444;vertical-align:top}th,td{padding:3px 6.5px 3px 0}th:last-child,td:last-child{padding-right:0}tr:not(:last-child){border-bottom:solid 1px #eee}thead tr{border-bottom:solid 1px #ccc}figure,table{margin:1rem 0}figure img{max-width:100%}figcaption{font:small var(--sans-serif);color:var(--syntax-unknown-variable)}.observablehq--caret{margin-right:4px;vertical-align:baseline}.observablehq--field{text-indent:-1rem;margin-left:1rem}.observablehq--prototype-key,.observablehq--empty,.hljs-comment{color:var(--syntax-comment)}.hljs-built_in{color:var(--syntax-known-variable)}.observablehq--unknown{color:var(--syntax-unknown-variable)}.hljs-keyword,.hljs-selector-tag,.hljs-section,.hljs-doctag,.hljs-type,.hljs-tag,.hljs-name,.hljs-selector-id,.hljs-selector-class,.hljs-strong{color:var(--syntax-keyword)}.observablehq{position:relative;margin:17px 0;min-height:1.5rem}.observablehq:before{content:"";position:absolute;left:-14px;top:0;bottom:1px;width:4px;transition:background-color .25s linear}.observablehq--running:before,.observablehq--changed:before{background-color:#a9b0bc;transition:none}.observablehq--error:before{background-color:#e7040f}.observablehq:not(.observablehq--running):empty:after{content:"<detached>";color:var(--syntax-comment);font-style:oblique}.observablehq>link:only-child,.observablehq>style:only-child{visibility:hidden;white-space:nowrap;color:var(--syntax-keyword)}.observablehq>link:only-child:before{content:"<link>";visibility:visible;text-decoration:none;pointer-events:none}.observablehq>style:only-child:before{content:"<style>";visibility:visible}.observablehq--inspect.observablehq--import{white-space:normal}.observablehq--inspect::-webkit-scrollbar{display:none}.observablehq--string-expand{margin-left:6px;padding:2px 6px;border-radius:2px;font-size:80%;background:#eee;color:var(--syntax-normal);cursor:pointer;vertical-align:middle;position:sticky;right:0}.observablehq--string-expand:hover,.observablehq--string-expand:active{background:#ddd}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
|