okno 1.0.0-beta.21 → 1.0.0-beta.23
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/codegen/generate.d.ts.map +1 -1
- package/dist/{dispatch-CmTJLIKc.js → dispatch-Ce0p8-Vu.js} +113 -102
- package/dist/editor/index.js +12803 -12646
- package/dist/encode-BfJY0Xy5.js +20 -0
- package/dist/engine/index.js +14 -13
- package/dist/engine/parse.d.ts +5 -3
- package/dist/engine/parse.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp.js +14 -13
- package/dist/next/index.js +1 -1
- package/dist/{acorn-CZBJD705.js → parse-tlTHgSSs.js} +253 -195
- package/dist/{plugin-DcdYJY8n.js → plugin-TY1948ID.js} +2 -2
- package/dist/runtime/wrap.d.ts.map +1 -1
- package/dist/runtime/wrap.js +26 -23
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
- package/src/runtime/wrap.ts +21 -4
- package/dist/encode-DoojdsVU.js +0 -80
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
1
|
+
var dt = [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, 78, 5, 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, 199, 7, 137, 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, 55, 9, 266, 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, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239], Ve = [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, 7, 25, 39, 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, 5, 57, 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, 24, 43, 261, 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, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 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, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 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, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489], xt = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Te = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", le = {
|
|
2
2
|
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",
|
|
3
3
|
5: "class enum extends super const export import",
|
|
4
4
|
6: "enum",
|
|
5
5
|
strict: "implements interface let package private protected public static yield",
|
|
6
6
|
strictBind: "eval arguments"
|
|
7
|
-
}, pe = "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",
|
|
7
|
+
}, pe = "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", mt = {
|
|
8
8
|
5: pe,
|
|
9
9
|
"5module": pe + " export import",
|
|
10
10
|
6: pe + " const class extends export import super"
|
|
11
|
-
},
|
|
11
|
+
}, Le = /^in(stanceof)?$/, vt = new RegExp("[" + Te + "]"), gt = new RegExp("[" + Te + xt + "]");
|
|
12
12
|
function de(e, t) {
|
|
13
13
|
for (var i = 65536, s = 0; s < t.length; s += 2) {
|
|
14
14
|
if (i += t[s], i > e)
|
|
@@ -19,20 +19,20 @@ function de(e, t) {
|
|
|
19
19
|
return !1;
|
|
20
20
|
}
|
|
21
21
|
function T(e, t) {
|
|
22
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
22
|
+
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && vt.test(String.fromCharCode(e)) : t === !1 ? !1 : de(e, Ve);
|
|
23
23
|
}
|
|
24
24
|
function F(e, t) {
|
|
25
|
-
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
25
|
+
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && gt.test(String.fromCharCode(e)) : t === !1 ? !1 : de(e, Ve) || de(e, dt);
|
|
26
26
|
}
|
|
27
27
|
var v = function(t, i) {
|
|
28
28
|
i === void 0 && (i = {}), this.label = t, this.keyword = i.keyword, this.beforeExpr = !!i.beforeExpr, this.startsExpr = !!i.startsExpr, this.isLoop = !!i.isLoop, this.isAssign = !!i.isAssign, this.prefix = !!i.prefix, this.postfix = !!i.postfix, this.binop = i.binop || null, this.updateContext = null;
|
|
29
29
|
};
|
|
30
|
-
function
|
|
30
|
+
function E(e, t) {
|
|
31
31
|
return new v(e, { beforeExpr: !0, binop: t });
|
|
32
32
|
}
|
|
33
|
-
var
|
|
33
|
+
var A = { beforeExpr: !0 }, k = { startsExpr: !0 }, be = {};
|
|
34
34
|
function m(e, t) {
|
|
35
|
-
return t === void 0 && (t = {}), t.keyword = e,
|
|
35
|
+
return t === void 0 && (t = {}), t.keyword = e, be[e] = new v(e, t);
|
|
36
36
|
}
|
|
37
37
|
var a = {
|
|
38
38
|
num: new v("num", k),
|
|
@@ -48,16 +48,16 @@ var a = {
|
|
|
48
48
|
braceR: new v("}"),
|
|
49
49
|
parenL: new v("(", { beforeExpr: !0, startsExpr: !0 }),
|
|
50
50
|
parenR: new v(")"),
|
|
51
|
-
comma: new v(",",
|
|
52
|
-
semi: new v(";",
|
|
53
|
-
colon: new v(":",
|
|
51
|
+
comma: new v(",", A),
|
|
52
|
+
semi: new v(";", A),
|
|
53
|
+
colon: new v(":", A),
|
|
54
54
|
dot: new v("."),
|
|
55
|
-
question: new v("?",
|
|
55
|
+
question: new v("?", A),
|
|
56
56
|
questionDot: new v("?."),
|
|
57
|
-
arrow: new v("=>",
|
|
57
|
+
arrow: new v("=>", A),
|
|
58
58
|
template: new v("template"),
|
|
59
59
|
invalidTemplate: new v("invalidTemplate"),
|
|
60
|
-
ellipsis: new v("...",
|
|
60
|
+
ellipsis: new v("...", A),
|
|
61
61
|
backQuote: new v("`", k),
|
|
62
62
|
dollarBraceL: new v("${", { beforeExpr: !0, startsExpr: !0 }),
|
|
63
63
|
// Operators. These carry several kinds of properties to help the
|
|
@@ -77,36 +77,36 @@ var a = {
|
|
|
77
77
|
assign: new v("_=", { beforeExpr: !0, isAssign: !0 }),
|
|
78
78
|
incDec: new v("++/--", { prefix: !0, postfix: !0, startsExpr: !0 }),
|
|
79
79
|
prefix: new v("!/~", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
80
|
-
logicalOR:
|
|
81
|
-
logicalAND:
|
|
82
|
-
bitwiseOR:
|
|
83
|
-
bitwiseXOR:
|
|
84
|
-
bitwiseAND:
|
|
85
|
-
equality:
|
|
86
|
-
relational:
|
|
87
|
-
bitShift:
|
|
80
|
+
logicalOR: E("||", 1),
|
|
81
|
+
logicalAND: E("&&", 2),
|
|
82
|
+
bitwiseOR: E("|", 3),
|
|
83
|
+
bitwiseXOR: E("^", 4),
|
|
84
|
+
bitwiseAND: E("&", 5),
|
|
85
|
+
equality: E("==/!=/===/!==", 6),
|
|
86
|
+
relational: E("</>/<=/>=", 7),
|
|
87
|
+
bitShift: E("<</>>/>>>", 8),
|
|
88
88
|
plusMin: new v("+/-", { beforeExpr: !0, binop: 9, prefix: !0, startsExpr: !0 }),
|
|
89
|
-
modulo:
|
|
90
|
-
star:
|
|
91
|
-
slash:
|
|
89
|
+
modulo: E("%", 10),
|
|
90
|
+
star: E("*", 10),
|
|
91
|
+
slash: E("/", 10),
|
|
92
92
|
starstar: new v("**", { beforeExpr: !0 }),
|
|
93
|
-
coalesce:
|
|
93
|
+
coalesce: E("??", 1),
|
|
94
94
|
// Keyword token types.
|
|
95
95
|
_break: m("break"),
|
|
96
|
-
_case: m("case",
|
|
96
|
+
_case: m("case", A),
|
|
97
97
|
_catch: m("catch"),
|
|
98
98
|
_continue: m("continue"),
|
|
99
99
|
_debugger: m("debugger"),
|
|
100
|
-
_default: m("default",
|
|
100
|
+
_default: m("default", A),
|
|
101
101
|
_do: m("do", { isLoop: !0, beforeExpr: !0 }),
|
|
102
|
-
_else: m("else",
|
|
102
|
+
_else: m("else", A),
|
|
103
103
|
_finally: m("finally"),
|
|
104
104
|
_for: m("for", { isLoop: !0 }),
|
|
105
105
|
_function: m("function", k),
|
|
106
106
|
_if: m("if"),
|
|
107
|
-
_return: m("return",
|
|
107
|
+
_return: m("return", A),
|
|
108
108
|
_switch: m("switch"),
|
|
109
|
-
_throw: m("throw",
|
|
109
|
+
_throw: m("throw", A),
|
|
110
110
|
_try: m("try"),
|
|
111
111
|
_var: m("var"),
|
|
112
112
|
_const: m("const"),
|
|
@@ -116,7 +116,7 @@ var a = {
|
|
|
116
116
|
_this: m("this", k),
|
|
117
117
|
_super: m("super", k),
|
|
118
118
|
_class: m("class", k),
|
|
119
|
-
_extends: m("extends",
|
|
119
|
+
_extends: m("extends", A),
|
|
120
120
|
_export: m("export"),
|
|
121
121
|
_import: m("import", k),
|
|
122
122
|
_null: m("null", k),
|
|
@@ -127,11 +127,11 @@ var a = {
|
|
|
127
127
|
_typeof: m("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
128
128
|
_void: m("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
129
129
|
_delete: m("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
130
|
-
}, w = /\r\n?|\n|\u2028|\u2029/,
|
|
130
|
+
}, w = /\r\n?|\n|\u2028|\u2029/, bt = new RegExp(w.source, "g");
|
|
131
131
|
function z(e) {
|
|
132
132
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Re(e, t, i) {
|
|
135
135
|
i === void 0 && (i = e.length);
|
|
136
136
|
for (var s = t; s < i; s++) {
|
|
137
137
|
var r = e.charCodeAt(s);
|
|
@@ -140,10 +140,10 @@ function Le(e, t, i) {
|
|
|
140
140
|
}
|
|
141
141
|
return -1;
|
|
142
142
|
}
|
|
143
|
-
var
|
|
144
|
-
return
|
|
145
|
-
}),
|
|
146
|
-
return
|
|
143
|
+
var Oe = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, C = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Be = Object.prototype, yt = Be.hasOwnProperty, _t = Be.toString, K = Object.hasOwn || (function(e, t) {
|
|
144
|
+
return yt.call(e, t);
|
|
145
|
+
}), Ee = Array.isArray || (function(e) {
|
|
146
|
+
return _t.call(e) === "[object Array]";
|
|
147
147
|
}), Ae = /* @__PURE__ */ Object.create(null);
|
|
148
148
|
function D(e) {
|
|
149
149
|
return Ae[e] || (Ae[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
@@ -151,7 +151,7 @@ function D(e) {
|
|
|
151
151
|
function R(e) {
|
|
152
152
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
153
153
|
}
|
|
154
|
-
var
|
|
154
|
+
var Ct = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, Z = function(t, i) {
|
|
155
155
|
this.line = t, this.column = i;
|
|
156
156
|
};
|
|
157
157
|
Z.prototype.offset = function(t) {
|
|
@@ -160,9 +160,9 @@ Z.prototype.offset = function(t) {
|
|
|
160
160
|
var re = function(t, i, s) {
|
|
161
161
|
this.start = i, this.end = s, t.sourceFile !== null && (this.source = t.sourceFile);
|
|
162
162
|
};
|
|
163
|
-
function
|
|
163
|
+
function De(e, t) {
|
|
164
164
|
for (var i = 1, s = 0; ; ) {
|
|
165
|
-
var r =
|
|
165
|
+
var r = Re(e, s, t);
|
|
166
166
|
if (r < 0)
|
|
167
167
|
return new Z(i, t - s);
|
|
168
168
|
++i, s = r;
|
|
@@ -264,23 +264,23 @@ var xe = {
|
|
|
264
264
|
// When enabled, parenthesized expressions are represented by
|
|
265
265
|
// (non-standard) ParenthesizedExpression nodes
|
|
266
266
|
preserveParens: !1
|
|
267
|
-
},
|
|
268
|
-
function
|
|
267
|
+
}, Ie = !1;
|
|
268
|
+
function St(e) {
|
|
269
269
|
var t = {};
|
|
270
270
|
for (var i in xe)
|
|
271
271
|
t[i] = e && K(e, i) ? e[i] : xe[i];
|
|
272
|
-
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!
|
|
273
|
-
Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved == null && (t.allowReserved = t.ecmaVersion < 5), (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14),
|
|
272
|
+
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!Ie && typeof console == "object" && console.warn && (Ie = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
273
|
+
Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved == null && (t.allowReserved = t.ecmaVersion < 5), (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14), Ee(t.onToken)) {
|
|
274
274
|
var s = t.onToken;
|
|
275
275
|
t.onToken = function(r) {
|
|
276
276
|
return s.push(r);
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
|
-
if (
|
|
279
|
+
if (Ee(t.onComment) && (t.onComment = kt(t, t.onComment)), t.sourceType === "commonjs" && t.allowAwaitOutsideFunction)
|
|
280
280
|
throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");
|
|
281
281
|
return t;
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function kt(e, t) {
|
|
284
284
|
return function(i, s, r, n, u, o) {
|
|
285
285
|
var h = {
|
|
286
286
|
type: i ? "Block" : "Line",
|
|
@@ -291,18 +291,18 @@ function St(e, t) {
|
|
|
291
291
|
e.locations && (h.loc = new re(this, u, o)), e.ranges && (h.range = [r, n]), t.push(h);
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
|
-
var U = 1,
|
|
295
|
-
function
|
|
296
|
-
return
|
|
294
|
+
var U = 1, j = 2, ye = 4, Fe = 8, _e = 16, Me = 32, ne = 64, Ue = 128, q = 256, J = 512, je = 1024, ue = U | j | q;
|
|
295
|
+
function Ce(e, t) {
|
|
296
|
+
return j | (e ? ye : 0) | (t ? Fe : 0);
|
|
297
297
|
}
|
|
298
|
-
var te = 0,
|
|
299
|
-
this.options = t =
|
|
298
|
+
var te = 0, Se = 1, B = 2, qe = 3, Ge = 4, We = 5, y = function(t, i, s) {
|
|
299
|
+
this.options = t = St(t), this.sourceFile = t.sourceFile, this.keywords = D(mt[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]);
|
|
300
300
|
var r = "";
|
|
301
301
|
t.allowReserved !== !0 && (r = le[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (r += " await")), this.reservedWords = D(r);
|
|
302
302
|
var n = (r ? r + " " : "") + le.strict;
|
|
303
303
|
this.reservedWordsStrict = D(n), this.reservedWordsStrictBind = D(n + " " + le.strictBind), this.input = String(i), this.containsEsc = !1, s ? (this.pos = s, this.lineStart = this.input.lastIndexOf(`
|
|
304
304
|
`, s - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(w).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = a.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 = t.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 = /* @__PURE__ */ Object.create(null), this.pos === 0 && t.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(
|
|
305
|
-
this.options.sourceType === "commonjs" ?
|
|
305
|
+
this.options.sourceType === "commonjs" ? j : U
|
|
306
306
|
), this.regexpState = null, this.privateNameStack = [];
|
|
307
307
|
}, P = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowReturn: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, allowUsing: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
|
|
308
308
|
y.prototype.parse = function() {
|
|
@@ -310,21 +310,21 @@ y.prototype.parse = function() {
|
|
|
310
310
|
return this.nextToken(), this.parseTopLevel(t);
|
|
311
311
|
};
|
|
312
312
|
P.inFunction.get = function() {
|
|
313
|
-
return (this.currentVarScope().flags &
|
|
313
|
+
return (this.currentVarScope().flags & j) > 0;
|
|
314
314
|
};
|
|
315
315
|
P.inGenerator.get = function() {
|
|
316
|
-
return (this.currentVarScope().flags &
|
|
316
|
+
return (this.currentVarScope().flags & Fe) > 0;
|
|
317
317
|
};
|
|
318
318
|
P.inAsync.get = function() {
|
|
319
|
-
return (this.currentVarScope().flags &
|
|
319
|
+
return (this.currentVarScope().flags & ye) > 0;
|
|
320
320
|
};
|
|
321
321
|
P.canAwait.get = function() {
|
|
322
322
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
323
323
|
var t = this.scopeStack[e], i = t.flags;
|
|
324
|
-
if (i & (
|
|
324
|
+
if (i & (q | J))
|
|
325
325
|
return !1;
|
|
326
|
-
if (i &
|
|
327
|
-
return (i &
|
|
326
|
+
if (i & j)
|
|
327
|
+
return (i & ye) > 0;
|
|
328
328
|
}
|
|
329
329
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
330
330
|
};
|
|
@@ -336,7 +336,7 @@ P.allowSuper.get = function() {
|
|
|
336
336
|
return (t & ne) > 0 || this.options.allowSuperOutsideMethod;
|
|
337
337
|
};
|
|
338
338
|
P.allowDirectSuper.get = function() {
|
|
339
|
-
return (this.currentThisScope().flags &
|
|
339
|
+
return (this.currentThisScope().flags & Ue) > 0;
|
|
340
340
|
};
|
|
341
341
|
P.treatFunctionsAsVar.get = function() {
|
|
342
342
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
@@ -344,17 +344,17 @@ P.treatFunctionsAsVar.get = function() {
|
|
|
344
344
|
P.allowNewDotTarget.get = function() {
|
|
345
345
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
346
346
|
var t = this.scopeStack[e], i = t.flags;
|
|
347
|
-
if (i & (
|
|
347
|
+
if (i & (q | J) || i & j && !(i & _e))
|
|
348
348
|
return !0;
|
|
349
349
|
}
|
|
350
350
|
return !1;
|
|
351
351
|
};
|
|
352
352
|
P.allowUsing.get = function() {
|
|
353
353
|
var e = this.currentScope(), t = e.flags;
|
|
354
|
-
return !(t &
|
|
354
|
+
return !(t & je || !this.inModule && t & U);
|
|
355
355
|
};
|
|
356
356
|
P.inClassStaticBlock.get = function() {
|
|
357
|
-
return (this.currentVarScope().flags &
|
|
357
|
+
return (this.currentVarScope().flags & q) > 0;
|
|
358
358
|
};
|
|
359
359
|
y.extend = function() {
|
|
360
360
|
for (var t = [], i = arguments.length; i--; ) t[i] = arguments[i];
|
|
@@ -373,13 +373,13 @@ y.tokenizer = function(t, i) {
|
|
|
373
373
|
return new this(i, t);
|
|
374
374
|
};
|
|
375
375
|
Object.defineProperties(y.prototype, P);
|
|
376
|
-
var S = y.prototype,
|
|
376
|
+
var S = y.prototype, wt = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
377
377
|
S.strictDirective = function(e) {
|
|
378
378
|
if (this.options.ecmaVersion < 5)
|
|
379
379
|
return !1;
|
|
380
380
|
for (; ; ) {
|
|
381
381
|
C.lastIndex = e, e += C.exec(this.input)[0].length;
|
|
382
|
-
var t =
|
|
382
|
+
var t = wt.exec(this.input.slice(e));
|
|
383
383
|
if (!t)
|
|
384
384
|
return !1;
|
|
385
385
|
if ((t[1] || t[2]) === "use strict") {
|
|
@@ -460,7 +460,7 @@ l.parseTopLevel = function(e) {
|
|
|
460
460
|
}
|
|
461
461
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType, this.finishNode(e, "Program");
|
|
462
462
|
};
|
|
463
|
-
var
|
|
463
|
+
var ke = { kind: "loop" }, Et = { kind: "switch" };
|
|
464
464
|
l.isLet = function(e) {
|
|
465
465
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
466
466
|
return !1;
|
|
@@ -480,7 +480,7 @@ l.isLet = function(e) {
|
|
|
480
480
|
if (s === 92)
|
|
481
481
|
return !0;
|
|
482
482
|
var n = this.input.slice(r, i);
|
|
483
|
-
if (!
|
|
483
|
+
if (!Le.test(n))
|
|
484
484
|
return !0;
|
|
485
485
|
}
|
|
486
486
|
return !1;
|
|
@@ -518,7 +518,7 @@ l.isUsingKeyword = function(e, t) {
|
|
|
518
518
|
if (o === 92)
|
|
519
519
|
return !0;
|
|
520
520
|
var p = this.input.slice(h, s);
|
|
521
|
-
return !(
|
|
521
|
+
return !(Le.test(p) || t && p === "of");
|
|
522
522
|
};
|
|
523
523
|
l.isAwaitUsing = function(e) {
|
|
524
524
|
return this.isUsingKeyword(!0, e);
|
|
@@ -601,12 +601,12 @@ l.parseDebuggerStatement = function(e) {
|
|
|
601
601
|
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
|
|
602
602
|
};
|
|
603
603
|
l.parseDoStatement = function(e) {
|
|
604
|
-
return this.next(), this.labels.push(
|
|
604
|
+
return this.next(), this.labels.push(ke), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(a._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(a.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement");
|
|
605
605
|
};
|
|
606
606
|
l.parseForStatement = function(e) {
|
|
607
607
|
this.next();
|
|
608
608
|
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
609
|
-
if (this.labels.push(
|
|
609
|
+
if (this.labels.push(ke), this.enterScope(0), this.expect(a.parenL), this.type === a.semi)
|
|
610
610
|
return t > -1 && this.unexpected(t), this.parseFor(e, null);
|
|
611
611
|
var i = this.isLet();
|
|
612
612
|
if (this.type === a._var || this.type === a._const || i) {
|
|
@@ -634,7 +634,7 @@ l.parseReturnStatement = function(e) {
|
|
|
634
634
|
return this.allowReturn || this.raise(this.start, "'return' outside of function"), this.next(), this.eat(a.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
635
635
|
};
|
|
636
636
|
l.parseSwitchStatement = function(e) {
|
|
637
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(a.braceL), this.labels.push(
|
|
637
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(a.braceL), this.labels.push(Et), this.enterScope(je);
|
|
638
638
|
for (var t, i = !1; this.type !== a.braceR; )
|
|
639
639
|
if (this.type === a._case || this.type === a._default) {
|
|
640
640
|
var s = this.type === a._case;
|
|
@@ -649,7 +649,7 @@ l.parseThrowStatement = function(e) {
|
|
|
649
649
|
var At = [];
|
|
650
650
|
l.parseCatchClauseParam = function() {
|
|
651
651
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
652
|
-
return this.enterScope(t ?
|
|
652
|
+
return this.enterScope(t ? Me : 0), this.checkLValPattern(e, t ? Ge : B), this.expect(a.parenR), e;
|
|
653
653
|
};
|
|
654
654
|
l.parseTryStatement = function(e) {
|
|
655
655
|
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === a._catch) {
|
|
@@ -662,7 +662,7 @@ l.parseVarStatement = function(e, t, i) {
|
|
|
662
662
|
return this.next(), this.parseVar(e, !1, t, i), this.semicolon(), this.finishNode(e, "VariableDeclaration");
|
|
663
663
|
};
|
|
664
664
|
l.parseWhileStatement = function(e) {
|
|
665
|
-
return this.next(), e.test = this.parseParenExpression(), this.labels.push(
|
|
665
|
+
return this.next(), e.test = this.parseParenExpression(), this.labels.push(ke), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement");
|
|
666
666
|
};
|
|
667
667
|
l.parseWithStatement = function(e) {
|
|
668
668
|
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e.object = this.parseParenExpression(), e.body = this.parseStatement("with"), this.finishNode(e, "WithStatement");
|
|
@@ -713,13 +713,13 @@ l.parseVar = function(e, t, i, s) {
|
|
|
713
713
|
return e;
|
|
714
714
|
};
|
|
715
715
|
l.parseVarId = function(e, t) {
|
|
716
|
-
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ?
|
|
716
|
+
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? Se : B, !1);
|
|
717
717
|
};
|
|
718
718
|
var X = 1, me = 2, He = 4;
|
|
719
719
|
l.parseFunction = function(e, t, i, s, r) {
|
|
720
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === a.star && t & me && this.unexpected(), e.generator = this.eat(a.star)), this.options.ecmaVersion >= 8 && (e.async = !!s), t & X && (e.id = t & He && this.type !== a.name ? null : this.parseIdent(), e.id && !(t & me) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ?
|
|
720
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === a.star && t & me && this.unexpected(), e.generator = this.eat(a.star)), this.options.ecmaVersion >= 8 && (e.async = !!s), t & X && (e.id = t & He && this.type !== a.name ? null : this.parseIdent(), e.id && !(t & me) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? Se : B : qe));
|
|
721
721
|
var n = this.yieldPos, u = this.awaitPos, o = this.awaitIdentPos;
|
|
722
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
722
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ce(e.async, e.generator)), t & X || (e.id = this.type === a.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, i, !1, r), this.yieldPos = n, this.awaitPos = u, this.awaitIdentPos = o, this.finishNode(e, t & X ? "FunctionDeclaration" : "FunctionExpression");
|
|
723
723
|
};
|
|
724
724
|
l.parseFunctionParams = function(e) {
|
|
725
725
|
this.expect(a.parenL), e.params = this.parseBindingList(a.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
@@ -731,7 +731,7 @@ l.parseClass = function(e, t) {
|
|
|
731
731
|
var s = this.enterClassBody(), r = this.startNode(), n = !1;
|
|
732
732
|
for (r.body = [], this.expect(a.braceL); this.type !== a.braceR; ) {
|
|
733
733
|
var u = this.parseClassElement(e.superClass !== null);
|
|
734
|
-
u && (r.body.push(u), u.type === "MethodDefinition" && u.kind === "constructor" ? (n && this.raiseRecoverable(u.start, "Duplicate constructor in the same class"), n = !0) : u.key && u.key.type === "PrivateIdentifier" &&
|
|
734
|
+
u && (r.body.push(u), u.type === "MethodDefinition" && u.kind === "constructor" ? (n && this.raiseRecoverable(u.start, "Duplicate constructor in the same class"), n = !0) : u.key && u.key.type === "PrivateIdentifier" && It(s, u) && this.raiseRecoverable(u.key.start, "Identifier '#" + u.key.name + "' has already been declared"));
|
|
735
735
|
}
|
|
736
736
|
return this.strict = i, this.next(), e.body = this.finishNode(r, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
737
737
|
};
|
|
@@ -773,7 +773,7 @@ l.parseClassField = function(e) {
|
|
|
773
773
|
l.parseClassStaticBlock = function(e) {
|
|
774
774
|
e.body = [];
|
|
775
775
|
var t = this.labels;
|
|
776
|
-
for (this.labels = [], this.enterScope(
|
|
776
|
+
for (this.labels = [], this.enterScope(q | ne); this.type !== a.braceR; ) {
|
|
777
777
|
var i = this.parseStatement(null);
|
|
778
778
|
e.body.push(i);
|
|
779
779
|
}
|
|
@@ -797,7 +797,7 @@ l.exitClassBody = function() {
|
|
|
797
797
|
K(t, u.name) || (r ? r.used.push(u) : this.raiseRecoverable(u.start, "Private field '#" + u.name + "' must be declared in an enclosing class"));
|
|
798
798
|
}
|
|
799
799
|
};
|
|
800
|
-
function
|
|
800
|
+
function It(e, t) {
|
|
801
801
|
var i = t.key.name, s = e[i], r = "true";
|
|
802
802
|
return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (r = (t.static ? "s" : "i") + t.kind), s === "iget" && r === "iset" || s === "iset" && r === "iget" || s === "sget" && r === "sset" || s === "sset" && r === "sget" ? (e[i] = "true", !1) : s ? !0 : (e[i] = r, !1);
|
|
803
803
|
}
|
|
@@ -945,7 +945,7 @@ l.parseImportAttribute = function() {
|
|
|
945
945
|
l.parseModuleExportName = function() {
|
|
946
946
|
if (this.options.ecmaVersion >= 13 && this.type === a.string) {
|
|
947
947
|
var e = this.parseLiteral(this.value);
|
|
948
|
-
return
|
|
948
|
+
return Ct.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
949
949
|
}
|
|
950
950
|
return this.parseIdent(!0);
|
|
951
951
|
};
|
|
@@ -1067,7 +1067,7 @@ N.checkLValSimple = function(e, t, i) {
|
|
|
1067
1067
|
var s = t !== te;
|
|
1068
1068
|
switch (e.type) {
|
|
1069
1069
|
case "Identifier":
|
|
1070
|
-
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (s ? "Binding " : "Assigning to ") + e.name + " in strict mode"), s && (t === B && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (K(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !==
|
|
1070
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (s ? "Binding " : "Assigning to ") + e.name + " in strict mode"), s && (t === B && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (K(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !== We && this.declareName(e.name, t, e.start));
|
|
1071
1071
|
break;
|
|
1072
1072
|
case "ChainExpression":
|
|
1073
1073
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -1293,7 +1293,7 @@ f.parseMaybeUnary = function(e, t, i, s) {
|
|
|
1293
1293
|
u = this.parseAwait(s), t = !0;
|
|
1294
1294
|
else if (this.type.prefix) {
|
|
1295
1295
|
var o = this.startNode(), h = this.type === a.incDec;
|
|
1296
|
-
o.operator = this.value, o.prefix = !0, this.next(), o.argument = this.parseMaybeUnary(null, !0, h, s), this.checkExpressionErrors(e, !0), h ? this.checkLValSimple(o.argument) : this.strict && o.operator === "delete" &&
|
|
1296
|
+
o.operator = this.value, o.prefix = !0, this.next(), o.argument = this.parseMaybeUnary(null, !0, h, s), this.checkExpressionErrors(e, !0), h ? this.checkLValSimple(o.argument) : this.strict && o.operator === "delete" && ze(o.argument) ? this.raiseRecoverable(o.start, "Deleting local variable in strict mode") : o.operator === "delete" && ve(o.argument) ? this.raiseRecoverable(o.start, "Private fields can not be deleted") : t = !0, u = this.finishNode(o, h ? "UpdateExpression" : "UnaryExpression");
|
|
1297
1297
|
} else if (!t && this.type === a.privateId)
|
|
1298
1298
|
(s || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), u = this.parsePrivateIdent(), this.type !== a._in && this.unexpected();
|
|
1299
1299
|
else {
|
|
@@ -1312,8 +1312,8 @@ f.parseMaybeUnary = function(e, t, i, s) {
|
|
|
1312
1312
|
else
|
|
1313
1313
|
return u;
|
|
1314
1314
|
};
|
|
1315
|
-
function
|
|
1316
|
-
return e.type === "Identifier" || e.type === "ParenthesizedExpression" &&
|
|
1315
|
+
function ze(e) {
|
|
1316
|
+
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && ze(e.expression);
|
|
1317
1317
|
}
|
|
1318
1318
|
function ve(e) {
|
|
1319
1319
|
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && ve(e.expression) || e.type === "ParenthesizedExpression" && ve(e.expression);
|
|
@@ -1358,12 +1358,12 @@ f.parseSubscript = function(e, t, i, s, r, n, u) {
|
|
|
1358
1358
|
if (r && !h && this.shouldParseAsyncArrow())
|
|
1359
1359
|
return this.checkPatternErrors(g, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = _, this.awaitPos = Y, this.awaitIdentPos = G, this.parseSubscriptAsyncArrow(t, i, ee, u);
|
|
1360
1360
|
this.checkExpressionErrors(g, !0), this.yieldPos = _ || this.yieldPos, this.awaitPos = Y || this.awaitPos, this.awaitIdentPos = G || this.awaitIdentPos;
|
|
1361
|
-
var
|
|
1362
|
-
|
|
1361
|
+
var W = this.startNodeAt(t, i);
|
|
1362
|
+
W.callee = e, W.arguments = ee, o && (W.optional = h), e = this.finishNode(W, "CallExpression");
|
|
1363
1363
|
} else if (this.type === a.backQuote) {
|
|
1364
1364
|
(h || n) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1365
|
-
var
|
|
1366
|
-
|
|
1365
|
+
var H = this.startNodeAt(t, i);
|
|
1366
|
+
H.tag = e, H.quasi = this.parseTemplate({ isTagged: !0 }), e = this.finishNode(H, "TaggedTemplateExpression");
|
|
1367
1367
|
}
|
|
1368
1368
|
return e;
|
|
1369
1369
|
};
|
|
@@ -1473,15 +1473,15 @@ f.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
1473
1473
|
break;
|
|
1474
1474
|
} else
|
|
1475
1475
|
h.push(this.parseMaybeAssign(!1, g, this.parseParenItem));
|
|
1476
|
-
var ee = this.lastTokEnd,
|
|
1476
|
+
var ee = this.lastTokEnd, W = this.lastTokEndLoc;
|
|
1477
1477
|
if (this.expect(a.parenR), e && this.shouldParseArrow(h) && this.eat(a.arrow))
|
|
1478
1478
|
return this.checkPatternErrors(g, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = _, this.awaitPos = Y, this.parseParenArrowList(i, s, h, t);
|
|
1479
|
-
(!h.length || d) && this.unexpected(this.lastTokStart), G && this.unexpected(G), this.checkExpressionErrors(g, !0), this.yieldPos = _ || this.yieldPos, this.awaitPos = Y || this.awaitPos, h.length > 1 ? (r = this.startNodeAt(u, o), r.expressions = h, this.finishNodeAt(r, "SequenceExpression", ee,
|
|
1479
|
+
(!h.length || d) && this.unexpected(this.lastTokStart), G && this.unexpected(G), this.checkExpressionErrors(g, !0), this.yieldPos = _ || this.yieldPos, this.awaitPos = Y || this.awaitPos, h.length > 1 ? (r = this.startNodeAt(u, o), r.expressions = h, this.finishNodeAt(r, "SequenceExpression", ee, W)) : r = h[0];
|
|
1480
1480
|
} else
|
|
1481
1481
|
r = this.parseParenExpression();
|
|
1482
1482
|
if (this.options.preserveParens) {
|
|
1483
|
-
var
|
|
1484
|
-
return
|
|
1483
|
+
var H = this.startNodeAt(i, s);
|
|
1484
|
+
return H.expression = r, this.finishNode(H, "ParenthesizedExpression");
|
|
1485
1485
|
} else
|
|
1486
1486
|
return r;
|
|
1487
1487
|
};
|
|
@@ -1491,7 +1491,7 @@ f.parseParenItem = function(e) {
|
|
|
1491
1491
|
f.parseParenArrowList = function(e, t, i, s) {
|
|
1492
1492
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, !1, s);
|
|
1493
1493
|
};
|
|
1494
|
-
var
|
|
1494
|
+
var Pt = [];
|
|
1495
1495
|
f.parseNew = function() {
|
|
1496
1496
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
1497
1497
|
var e = this.startNode();
|
|
@@ -1502,7 +1502,7 @@ f.parseNew = function() {
|
|
|
1502
1502
|
return e.property = this.parseIdent(!0), e.property.name !== "target" && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), i && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty");
|
|
1503
1503
|
}
|
|
1504
1504
|
var s = this.start, r = this.startLoc;
|
|
1505
|
-
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), s, r, !0, !1), this.eat(a.parenL) ? e.arguments = this.parseExprList(a.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments =
|
|
1505
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), s, r, !0, !1), this.eat(a.parenL) ? e.arguments = this.parseExprList(a.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = Pt, this.finishNode(e, "NewExpression");
|
|
1506
1506
|
};
|
|
1507
1507
|
f.parseTemplateElement = function(e) {
|
|
1508
1508
|
var t = e.isTagged, i = this.startNode();
|
|
@@ -1576,11 +1576,11 @@ f.initFunction = function(e) {
|
|
|
1576
1576
|
};
|
|
1577
1577
|
f.parseMethod = function(e, t, i) {
|
|
1578
1578
|
var s = this.startNode(), r = this.yieldPos, n = this.awaitPos, u = this.awaitIdentPos;
|
|
1579
|
-
return this.initFunction(s), this.options.ecmaVersion >= 6 && (s.generator = e), this.options.ecmaVersion >= 8 && (s.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
1579
|
+
return this.initFunction(s), this.options.ecmaVersion >= 6 && (s.generator = e), this.options.ecmaVersion >= 8 && (s.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ce(t, s.generator) | ne | (i ? Ue : 0)), this.expect(a.parenL), s.params = this.parseBindingList(a.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(s, !1, !0, !1), this.yieldPos = r, this.awaitPos = n, this.awaitIdentPos = u, this.finishNode(s, "FunctionExpression");
|
|
1580
1580
|
};
|
|
1581
1581
|
f.parseArrowExpression = function(e, t, i, s) {
|
|
1582
1582
|
var r = this.yieldPos, n = this.awaitPos, u = this.awaitIdentPos;
|
|
1583
|
-
return this.enterScope(
|
|
1583
|
+
return this.enterScope(Ce(i, !1) | _e), this.initFunction(e), this.options.ecmaVersion >= 8 && (e.async = !!i), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e.params = this.toAssignableList(t, !0), this.parseFunctionBody(e, !0, !1, s), this.yieldPos = r, this.awaitPos = n, this.awaitIdentPos = u, this.finishNode(e, "ArrowFunctionExpression");
|
|
1584
1584
|
};
|
|
1585
1585
|
f.parseFunctionBody = function(e, t, i, s) {
|
|
1586
1586
|
var r = t && this.type !== a.braceL, n = this.strict, u = !1;
|
|
@@ -1590,7 +1590,7 @@ f.parseFunctionBody = function(e, t, i, s) {
|
|
|
1590
1590
|
var o = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
1591
1591
|
(!n || o) && (u = this.strictDirective(this.end), u && o && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
1592
1592
|
var h = this.labels;
|
|
1593
|
-
this.labels = [], u && (this.strict = !0), this.checkParams(e, !n && !u && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id,
|
|
1593
|
+
this.labels = [], u && (this.strict = !0), this.checkParams(e, !n && !u && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, We), e.body = this.parseBlock(!1, void 0, u && !n), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = h;
|
|
1594
1594
|
}
|
|
1595
1595
|
this.exitScope();
|
|
1596
1596
|
};
|
|
@@ -1605,7 +1605,7 @@ f.isSimpleParamList = function(e) {
|
|
|
1605
1605
|
f.checkParams = function(e, t) {
|
|
1606
1606
|
for (var i = /* @__PURE__ */ Object.create(null), s = 0, r = e.params; s < r.length; s += 1) {
|
|
1607
1607
|
var n = r[s];
|
|
1608
|
-
this.checkLValInnerPattern(n,
|
|
1608
|
+
this.checkLValInnerPattern(n, Se, t ? null : i);
|
|
1609
1609
|
}
|
|
1610
1610
|
};
|
|
1611
1611
|
f.parseExprList = function(e, t, i, s) {
|
|
@@ -1650,7 +1650,7 @@ f.parseAwait = function(e) {
|
|
|
1650
1650
|
};
|
|
1651
1651
|
var se = y.prototype;
|
|
1652
1652
|
se.raise = function(e, t) {
|
|
1653
|
-
var i =
|
|
1653
|
+
var i = De(this.input, e);
|
|
1654
1654
|
t += " (" + i.line + ":" + i.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
1655
1655
|
var s = new SyntaxError(t);
|
|
1656
1656
|
throw s.pos = e, s.loc = i, s.raisedAt = this.pos, s;
|
|
@@ -1660,24 +1660,24 @@ se.curPosition = function() {
|
|
|
1660
1660
|
if (this.options.locations)
|
|
1661
1661
|
return new Z(this.curLine, this.pos - this.lineStart);
|
|
1662
1662
|
};
|
|
1663
|
-
var M = y.prototype,
|
|
1663
|
+
var M = y.prototype, Nt = function(t) {
|
|
1664
1664
|
this.flags = t, this.var = [], this.lexical = [], this.functions = [];
|
|
1665
1665
|
};
|
|
1666
1666
|
M.enterScope = function(e) {
|
|
1667
|
-
this.scopeStack.push(new
|
|
1667
|
+
this.scopeStack.push(new Nt(e));
|
|
1668
1668
|
};
|
|
1669
1669
|
M.exitScope = function() {
|
|
1670
1670
|
this.scopeStack.pop();
|
|
1671
1671
|
};
|
|
1672
1672
|
M.treatFunctionsAsVarInScope = function(e) {
|
|
1673
|
-
return e.flags &
|
|
1673
|
+
return e.flags & j || !this.inModule && e.flags & U;
|
|
1674
1674
|
};
|
|
1675
1675
|
M.declareName = function(e, t, i) {
|
|
1676
1676
|
var s = !1;
|
|
1677
1677
|
if (t === B) {
|
|
1678
1678
|
var r = this.currentScope();
|
|
1679
1679
|
s = r.lexical.indexOf(e) > -1 || r.functions.indexOf(e) > -1 || r.var.indexOf(e) > -1, r.lexical.push(e), this.inModule && r.flags & U && delete this.undefinedExports[e];
|
|
1680
|
-
} else if (t ===
|
|
1680
|
+
} else if (t === Ge) {
|
|
1681
1681
|
var n = this.currentScope();
|
|
1682
1682
|
n.lexical.push(e);
|
|
1683
1683
|
} else if (t === qe) {
|
|
@@ -1686,7 +1686,7 @@ M.declareName = function(e, t, i) {
|
|
|
1686
1686
|
} else
|
|
1687
1687
|
for (var o = this.scopeStack.length - 1; o >= 0; --o) {
|
|
1688
1688
|
var h = this.scopeStack[o];
|
|
1689
|
-
if (h.lexical.indexOf(e) > -1 && !(h.flags &
|
|
1689
|
+
if (h.lexical.indexOf(e) > -1 && !(h.flags & Me && h.lexical[0] === e) || !this.treatFunctionsAsVarInScope(h) && h.functions.indexOf(e) > -1) {
|
|
1690
1690
|
s = !0;
|
|
1691
1691
|
break;
|
|
1692
1692
|
}
|
|
@@ -1704,14 +1704,14 @@ M.currentScope = function() {
|
|
|
1704
1704
|
M.currentVarScope = function() {
|
|
1705
1705
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
1706
1706
|
var t = this.scopeStack[e];
|
|
1707
|
-
if (t.flags & (ue | J |
|
|
1707
|
+
if (t.flags & (ue | J | q))
|
|
1708
1708
|
return t;
|
|
1709
1709
|
}
|
|
1710
1710
|
};
|
|
1711
1711
|
M.currentThisScope = function() {
|
|
1712
1712
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
1713
1713
|
var t = this.scopeStack[e];
|
|
1714
|
-
if (t.flags & (ue | J |
|
|
1714
|
+
if (t.flags & (ue | J | q) && !(t.flags & _e))
|
|
1715
1715
|
return t;
|
|
1716
1716
|
}
|
|
1717
1717
|
};
|
|
@@ -1724,14 +1724,14 @@ $.startNode = function() {
|
|
|
1724
1724
|
$.startNodeAt = function(e, t) {
|
|
1725
1725
|
return new he(this, e, t);
|
|
1726
1726
|
};
|
|
1727
|
-
function
|
|
1727
|
+
function Ke(e, t, i, s) {
|
|
1728
1728
|
return e.type = t, e.end = i, this.options.locations && (e.loc.end = s), this.options.ranges && (e.range[1] = i), e;
|
|
1729
1729
|
}
|
|
1730
1730
|
$.finishNode = function(e, t) {
|
|
1731
|
-
return
|
|
1731
|
+
return Ke.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
1732
1732
|
};
|
|
1733
1733
|
$.finishNodeAt = function(e, t, i, s) {
|
|
1734
|
-
return
|
|
1734
|
+
return Ke.call(this, e, t, i, s);
|
|
1735
1735
|
};
|
|
1736
1736
|
$.copyNode = function(e) {
|
|
1737
1737
|
var t = new he(this, e.start, this.startLoc);
|
|
@@ -1739,42 +1739,42 @@ $.copyNode = function(e) {
|
|
|
1739
1739
|
t[i] = e[i];
|
|
1740
1740
|
return t;
|
|
1741
1741
|
};
|
|
1742
|
-
var
|
|
1743
|
-
9:
|
|
1744
|
-
10:
|
|
1745
|
-
11:
|
|
1746
|
-
12:
|
|
1747
|
-
13:
|
|
1748
|
-
14:
|
|
1749
|
-
},
|
|
1742
|
+
var Vt = "Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz", Qe = "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", Ye = Qe + " Extended_Pictographic", Xe = Ye, Ze = Xe + " EBase EComp EMod EPres ExtPict", Je = Ze, Tt = Je, Lt = {
|
|
1743
|
+
9: Qe,
|
|
1744
|
+
10: Ye,
|
|
1745
|
+
11: Xe,
|
|
1746
|
+
12: Ze,
|
|
1747
|
+
13: Je,
|
|
1748
|
+
14: Tt
|
|
1749
|
+
}, Rt = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", Ot = {
|
|
1750
1750
|
9: "",
|
|
1751
1751
|
10: "",
|
|
1752
1752
|
11: "",
|
|
1753
1753
|
12: "",
|
|
1754
1754
|
13: "",
|
|
1755
|
-
14:
|
|
1756
|
-
},
|
|
1757
|
-
9:
|
|
1758
|
-
10:
|
|
1759
|
-
11:
|
|
1760
|
-
12:
|
|
1761
|
-
13:
|
|
1762
|
-
14:
|
|
1763
|
-
},
|
|
1764
|
-
function
|
|
1765
|
-
var t =
|
|
1766
|
-
binary: D(
|
|
1767
|
-
binaryOfStrings: D(
|
|
1755
|
+
14: Rt
|
|
1756
|
+
}, Pe = "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", $e = "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", et = $e + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", tt = et + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", it = tt + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", st = it + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", Bt = st + " " + Vt, Dt = {
|
|
1757
|
+
9: $e,
|
|
1758
|
+
10: et,
|
|
1759
|
+
11: tt,
|
|
1760
|
+
12: it,
|
|
1761
|
+
13: st,
|
|
1762
|
+
14: Bt
|
|
1763
|
+
}, at = {};
|
|
1764
|
+
function Ft(e) {
|
|
1765
|
+
var t = at[e] = {
|
|
1766
|
+
binary: D(Lt[e] + " " + Pe),
|
|
1767
|
+
binaryOfStrings: D(Ot[e]),
|
|
1768
1768
|
nonBinary: {
|
|
1769
|
-
General_Category: D(
|
|
1770
|
-
Script: D(
|
|
1769
|
+
General_Category: D(Pe),
|
|
1770
|
+
Script: D(Dt[e])
|
|
1771
1771
|
}
|
|
1772
1772
|
};
|
|
1773
1773
|
t.nonBinary.Script_Extensions = t.nonBinary.Script, t.nonBinary.gc = t.nonBinary.General_Category, t.nonBinary.sc = t.nonBinary.Script, t.nonBinary.scx = t.nonBinary.Script_Extensions;
|
|
1774
1774
|
}
|
|
1775
|
-
for (var fe = 0,
|
|
1776
|
-
var
|
|
1777
|
-
|
|
1775
|
+
for (var fe = 0, Ne = [9, 10, 11, 12, 13, 14]; fe < Ne.length; fe += 1) {
|
|
1776
|
+
var Mt = Ne[fe];
|
|
1777
|
+
Ft(Mt);
|
|
1778
1778
|
}
|
|
1779
1779
|
var c = y.prototype, ae = function(t, i) {
|
|
1780
1780
|
this.parent = t, this.base = i || this;
|
|
@@ -1790,7 +1790,7 @@ ae.prototype.sibling = function() {
|
|
|
1790
1790
|
return new ae(this.parent, this.base);
|
|
1791
1791
|
};
|
|
1792
1792
|
var L = function(t) {
|
|
1793
|
-
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 =
|
|
1793
|
+
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 = at[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 = /* @__PURE__ */ Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
1794
1794
|
};
|
|
1795
1795
|
L.prototype.reset = function(t, i, s) {
|
|
1796
1796
|
var r = s.indexOf("v") !== -1, n = s.indexOf("u") !== -1;
|
|
@@ -1847,13 +1847,13 @@ c.validateRegExpFlags = function(e) {
|
|
|
1847
1847
|
}
|
|
1848
1848
|
this.options.ecmaVersion >= 15 && s && r && this.raise(e.start, "Invalid regular expression flag");
|
|
1849
1849
|
};
|
|
1850
|
-
function
|
|
1850
|
+
function Ut(e) {
|
|
1851
1851
|
for (var t in e)
|
|
1852
1852
|
return !0;
|
|
1853
1853
|
return !1;
|
|
1854
1854
|
}
|
|
1855
1855
|
c.validateRegExpPattern = function(e) {
|
|
1856
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
1856
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && Ut(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
1857
1857
|
};
|
|
1858
1858
|
c.regexp_pattern = function(e) {
|
|
1859
1859
|
e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = !1, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = /* @__PURE__ */ Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(
|
|
@@ -2055,11 +2055,11 @@ c.regexp_eatCapturingGroup = function(e) {
|
|
|
2055
2055
|
return !1;
|
|
2056
2056
|
};
|
|
2057
2057
|
c.regexp_eatModifiers = function(e) {
|
|
2058
|
-
for (var t = "", i = 0; (i = e.current()) !== -1 &&
|
|
2058
|
+
for (var t = "", i = 0; (i = e.current()) !== -1 && jt(i); )
|
|
2059
2059
|
t += R(i), e.advance();
|
|
2060
2060
|
return t;
|
|
2061
2061
|
};
|
|
2062
|
-
function
|
|
2062
|
+
function jt(e) {
|
|
2063
2063
|
return e === 105 || e === 109 || e === 115;
|
|
2064
2064
|
}
|
|
2065
2065
|
c.regexp_eatExtendedAtom = function(e) {
|
|
@@ -2073,13 +2073,13 @@ c.regexp_eatInvalidBracedQuantifier = function(e) {
|
|
|
2073
2073
|
};
|
|
2074
2074
|
c.regexp_eatSyntaxCharacter = function(e) {
|
|
2075
2075
|
var t = e.current();
|
|
2076
|
-
return
|
|
2076
|
+
return rt(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2077
2077
|
};
|
|
2078
|
-
function
|
|
2078
|
+
function rt(e) {
|
|
2079
2079
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
2080
2080
|
}
|
|
2081
2081
|
c.regexp_eatPatternCharacters = function(e) {
|
|
2082
|
-
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !
|
|
2082
|
+
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !rt(i); )
|
|
2083
2083
|
e.advance();
|
|
2084
2084
|
return e.pos !== t;
|
|
2085
2085
|
};
|
|
@@ -2136,9 +2136,9 @@ function qt(e) {
|
|
|
2136
2136
|
}
|
|
2137
2137
|
c.regexp_eatRegExpIdentifierPart = function(e) {
|
|
2138
2138
|
var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i);
|
|
2139
|
-
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue),
|
|
2139
|
+
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), Gt(s) ? (e.lastIntValue = s, !0) : (e.pos = t, !1);
|
|
2140
2140
|
};
|
|
2141
|
-
function
|
|
2141
|
+
function Gt(e) {
|
|
2142
2142
|
return F(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
2143
2143
|
}
|
|
2144
2144
|
c.regexp_eatAtomEscape = function(e) {
|
|
@@ -2191,9 +2191,9 @@ c.regexp_eatControlEscape = function(e) {
|
|
|
2191
2191
|
};
|
|
2192
2192
|
c.regexp_eatControlLetter = function(e) {
|
|
2193
2193
|
var t = e.current();
|
|
2194
|
-
return
|
|
2194
|
+
return nt(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2195
2195
|
};
|
|
2196
|
-
function
|
|
2196
|
+
function nt(e) {
|
|
2197
2197
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
2198
2198
|
}
|
|
2199
2199
|
c.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
@@ -2228,13 +2228,13 @@ c.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
2228
2228
|
) && this.regexp_eatHexDigits(e) && e.eat(
|
|
2229
2229
|
125
|
|
2230
2230
|
/* } */
|
|
2231
|
-
) &&
|
|
2231
|
+
) && Wt(e.lastIntValue))
|
|
2232
2232
|
return !0;
|
|
2233
2233
|
s && e.raise("Invalid unicode escape"), e.pos = i;
|
|
2234
2234
|
}
|
|
2235
2235
|
return !1;
|
|
2236
2236
|
};
|
|
2237
|
-
function
|
|
2237
|
+
function Wt(e) {
|
|
2238
2238
|
return e >= 0 && e <= 1114111;
|
|
2239
2239
|
}
|
|
2240
2240
|
c.regexp_eatIdentityEscape = function(e) {
|
|
@@ -2257,7 +2257,7 @@ c.regexp_eatDecimalEscape = function(e) {
|
|
|
2257
2257
|
}
|
|
2258
2258
|
return !1;
|
|
2259
2259
|
};
|
|
2260
|
-
var
|
|
2260
|
+
var ut = 0, O = 1, I = 2;
|
|
2261
2261
|
c.regexp_eatCharacterClassEscape = function(e) {
|
|
2262
2262
|
var t = e.current();
|
|
2263
2263
|
if (Ht(t))
|
|
@@ -2276,7 +2276,7 @@ c.regexp_eatCharacterClassEscape = function(e) {
|
|
|
2276
2276
|
return i && s === I && e.raise("Invalid property name"), s;
|
|
2277
2277
|
e.raise("Invalid property name");
|
|
2278
2278
|
}
|
|
2279
|
-
return
|
|
2279
|
+
return ut;
|
|
2280
2280
|
};
|
|
2281
2281
|
function Ht(e) {
|
|
2282
2282
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
@@ -2297,7 +2297,7 @@ c.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
2297
2297
|
var r = e.lastStringValue;
|
|
2298
2298
|
return this.regexp_validateUnicodePropertyNameOrValue(e, r);
|
|
2299
2299
|
}
|
|
2300
|
-
return
|
|
2300
|
+
return ut;
|
|
2301
2301
|
};
|
|
2302
2302
|
c.regexp_validateUnicodePropertyNameAndValue = function(e, t, i) {
|
|
2303
2303
|
K(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(i) || e.raise("Invalid property value");
|
|
@@ -2311,21 +2311,21 @@ c.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
|
2311
2311
|
};
|
|
2312
2312
|
c.regexp_eatUnicodePropertyName = function(e) {
|
|
2313
2313
|
var t = 0;
|
|
2314
|
-
for (e.lastStringValue = "";
|
|
2314
|
+
for (e.lastStringValue = ""; ot(t = e.current()); )
|
|
2315
2315
|
e.lastStringValue += R(t), e.advance();
|
|
2316
2316
|
return e.lastStringValue !== "";
|
|
2317
2317
|
};
|
|
2318
|
-
function
|
|
2319
|
-
return
|
|
2318
|
+
function ot(e) {
|
|
2319
|
+
return nt(e) || e === 95;
|
|
2320
2320
|
}
|
|
2321
2321
|
c.regexp_eatUnicodePropertyValue = function(e) {
|
|
2322
2322
|
var t = 0;
|
|
2323
|
-
for (e.lastStringValue = "";
|
|
2323
|
+
for (e.lastStringValue = ""; zt(t = e.current()); )
|
|
2324
2324
|
e.lastStringValue += R(t), e.advance();
|
|
2325
2325
|
return e.lastStringValue !== "";
|
|
2326
2326
|
};
|
|
2327
|
-
function
|
|
2328
|
-
return
|
|
2327
|
+
function zt(e) {
|
|
2328
|
+
return ot(e) || ce(e);
|
|
2329
2329
|
}
|
|
2330
2330
|
c.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
2331
2331
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
@@ -2371,7 +2371,7 @@ c.regexp_eatClassAtom = function(e) {
|
|
|
2371
2371
|
return !0;
|
|
2372
2372
|
if (e.switchU) {
|
|
2373
2373
|
var i = e.current();
|
|
2374
|
-
(i === 99 ||
|
|
2374
|
+
(i === 99 || lt(i)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
2375
2375
|
}
|
|
2376
2376
|
e.pos = t;
|
|
2377
2377
|
}
|
|
@@ -2524,19 +2524,19 @@ c.regexp_eatClassSetCharacter = function(e) {
|
|
|
2524
2524
|
/* b */
|
|
2525
2525
|
) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
|
|
2526
2526
|
var i = e.current();
|
|
2527
|
-
return i < 0 || i === e.lookahead() &&
|
|
2527
|
+
return i < 0 || i === e.lookahead() && Kt(i) || Qt(i) ? !1 : (e.advance(), e.lastIntValue = i, !0);
|
|
2528
2528
|
};
|
|
2529
|
-
function
|
|
2529
|
+
function Kt(e) {
|
|
2530
2530
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
2531
2531
|
}
|
|
2532
|
-
function
|
|
2532
|
+
function Qt(e) {
|
|
2533
2533
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
2534
2534
|
}
|
|
2535
2535
|
c.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
2536
2536
|
var t = e.current();
|
|
2537
|
-
return
|
|
2537
|
+
return Yt(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2538
2538
|
};
|
|
2539
|
-
function
|
|
2539
|
+
function Yt(e) {
|
|
2540
2540
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
2541
2541
|
}
|
|
2542
2542
|
c.regexp_eatClassControlLetter = function(e) {
|
|
@@ -2566,14 +2566,14 @@ function ce(e) {
|
|
|
2566
2566
|
}
|
|
2567
2567
|
c.regexp_eatHexDigits = function(e) {
|
|
2568
2568
|
var t = e.pos, i = 0;
|
|
2569
|
-
for (e.lastIntValue = 0;
|
|
2570
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
2569
|
+
for (e.lastIntValue = 0; ht(i = e.current()); )
|
|
2570
|
+
e.lastIntValue = 16 * e.lastIntValue + ct(i), e.advance();
|
|
2571
2571
|
return e.pos !== t;
|
|
2572
2572
|
};
|
|
2573
|
-
function
|
|
2573
|
+
function ht(e) {
|
|
2574
2574
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
2575
2575
|
}
|
|
2576
|
-
function
|
|
2576
|
+
function ct(e) {
|
|
2577
2577
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
2578
2578
|
}
|
|
2579
2579
|
c.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
@@ -2590,9 +2590,9 @@ c.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
2590
2590
|
};
|
|
2591
2591
|
c.regexp_eatOctalDigit = function(e) {
|
|
2592
2592
|
var t = e.current();
|
|
2593
|
-
return
|
|
2593
|
+
return lt(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
2594
2594
|
};
|
|
2595
|
-
function
|
|
2595
|
+
function lt(e) {
|
|
2596
2596
|
return e >= 48 && e <= 55;
|
|
2597
2597
|
}
|
|
2598
2598
|
c.regexp_eatFixedHexDigits = function(e, t) {
|
|
@@ -2600,20 +2600,20 @@ c.regexp_eatFixedHexDigits = function(e, t) {
|
|
|
2600
2600
|
e.lastIntValue = 0;
|
|
2601
2601
|
for (var s = 0; s < t; ++s) {
|
|
2602
2602
|
var r = e.current();
|
|
2603
|
-
if (!
|
|
2603
|
+
if (!ht(r))
|
|
2604
2604
|
return e.pos = i, !1;
|
|
2605
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
2605
|
+
e.lastIntValue = 16 * e.lastIntValue + ct(r), e.advance();
|
|
2606
2606
|
}
|
|
2607
2607
|
return !0;
|
|
2608
2608
|
};
|
|
2609
|
-
var
|
|
2609
|
+
var we = function(t) {
|
|
2610
2610
|
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new re(t, t.startLoc, t.endLoc)), t.options.ranges && (this.range = [t.start, t.end]);
|
|
2611
2611
|
}, x = y.prototype;
|
|
2612
2612
|
x.next = function(e) {
|
|
2613
|
-
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
2613
|
+
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new we(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2614
2614
|
};
|
|
2615
2615
|
x.getToken = function() {
|
|
2616
|
-
return this.next(), new
|
|
2616
|
+
return this.next(), new we(this);
|
|
2617
2617
|
};
|
|
2618
2618
|
typeof Symbol < "u" && (x[Symbol.iterator] = function() {
|
|
2619
2619
|
var e = this;
|
|
@@ -2651,7 +2651,7 @@ x.fullCharCodeAtPos = function() {
|
|
|
2651
2651
|
x.skipBlockComment = function() {
|
|
2652
2652
|
var e = this.options.onComment && this.curPosition(), t = this.pos, i = this.input.indexOf("*/", this.pos += 2);
|
|
2653
2653
|
if (i === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i + 2, this.options.locations)
|
|
2654
|
-
for (var s = void 0, r = t; (s =
|
|
2654
|
+
for (var s = void 0, r = t; (s = Re(this.input, r, this.pos)) > -1; )
|
|
2655
2655
|
++this.curLine, r = this.lineStart = s;
|
|
2656
2656
|
this.options.onComment && this.options.onComment(
|
|
2657
2657
|
!0,
|
|
@@ -2702,7 +2702,7 @@ x.skipSpace = function() {
|
|
|
2702
2702
|
}
|
|
2703
2703
|
break;
|
|
2704
2704
|
default:
|
|
2705
|
-
if (e > 8 && e < 14 || e >= 5760 &&
|
|
2705
|
+
if (e > 8 && e < 14 || e >= 5760 && Oe.test(String.fromCharCode(e)))
|
|
2706
2706
|
++this.pos;
|
|
2707
2707
|
else
|
|
2708
2708
|
break e;
|
|
@@ -2917,17 +2917,17 @@ x.readInt = function(e, t, i) {
|
|
|
2917
2917
|
}
|
|
2918
2918
|
return s && o === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === n || t != null && this.pos - n !== t ? null : u;
|
|
2919
2919
|
};
|
|
2920
|
-
function
|
|
2920
|
+
function Xt(e, t) {
|
|
2921
2921
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
2922
2922
|
}
|
|
2923
|
-
function
|
|
2923
|
+
function pt(e) {
|
|
2924
2924
|
return typeof BigInt != "function" ? null : BigInt(e.replace(/_/g, ""));
|
|
2925
2925
|
}
|
|
2926
2926
|
x.readRadixNumber = function(e) {
|
|
2927
2927
|
var t = this.pos;
|
|
2928
2928
|
this.pos += 2;
|
|
2929
2929
|
var i = this.readInt(e);
|
|
2930
|
-
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i =
|
|
2930
|
+
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i = pt(this.input.slice(t, this.pos)), ++this.pos) : T(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(a.num, i);
|
|
2931
2931
|
};
|
|
2932
2932
|
x.readNumber = function(e) {
|
|
2933
2933
|
var t = this.pos;
|
|
@@ -2936,11 +2936,11 @@ x.readNumber = function(e) {
|
|
|
2936
2936
|
i && this.strict && this.raise(t, "Invalid number");
|
|
2937
2937
|
var s = this.input.charCodeAt(this.pos);
|
|
2938
2938
|
if (!i && !e && this.options.ecmaVersion >= 11 && s === 110) {
|
|
2939
|
-
var r =
|
|
2939
|
+
var r = pt(this.input.slice(t, this.pos));
|
|
2940
2940
|
return ++this.pos, T(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(a.num, r);
|
|
2941
2941
|
}
|
|
2942
2942
|
i && /[89]/.test(this.input.slice(t, this.pos)) && (i = !1), s === 46 && !i && (++this.pos, this.readInt(10), s = this.input.charCodeAt(this.pos)), (s === 69 || s === 101) && !i && (s = this.input.charCodeAt(++this.pos), (s === 43 || s === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), T(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
2943
|
-
var n =
|
|
2943
|
+
var n = Xt(this.input.slice(t, this.pos), i);
|
|
2944
2944
|
return this.finishToken(a.num, n);
|
|
2945
2945
|
};
|
|
2946
2946
|
x.readCodePoint = function() {
|
|
@@ -2963,13 +2963,13 @@ x.readString = function(e) {
|
|
|
2963
2963
|
}
|
|
2964
2964
|
return t += this.input.slice(i, this.pos++), this.finishToken(a.string, t);
|
|
2965
2965
|
};
|
|
2966
|
-
var
|
|
2966
|
+
var ft = {};
|
|
2967
2967
|
x.tryReadTemplateToken = function() {
|
|
2968
2968
|
this.inTemplateElement = !0;
|
|
2969
2969
|
try {
|
|
2970
2970
|
this.readTmplToken();
|
|
2971
2971
|
} catch (e) {
|
|
2972
|
-
if (e ===
|
|
2972
|
+
if (e === ft)
|
|
2973
2973
|
this.readInvalidTemplateToken();
|
|
2974
2974
|
else
|
|
2975
2975
|
throw e;
|
|
@@ -2978,7 +2978,7 @@ x.tryReadTemplateToken = function() {
|
|
|
2978
2978
|
};
|
|
2979
2979
|
x.invalidStringToken = function(e, t) {
|
|
2980
2980
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
2981
|
-
throw
|
|
2981
|
+
throw ft;
|
|
2982
2982
|
this.raise(e, t);
|
|
2983
2983
|
};
|
|
2984
2984
|
x.readTmplToken = function() {
|
|
@@ -3111,33 +3111,91 @@ x.readWord1 = function() {
|
|
|
3111
3111
|
};
|
|
3112
3112
|
x.readWord = function() {
|
|
3113
3113
|
var e = this.readWord1(), t = a.name;
|
|
3114
|
-
return this.keywords.test(e) && (t =
|
|
3114
|
+
return this.keywords.test(e) && (t = be[e]), this.finishToken(t, e);
|
|
3115
3115
|
};
|
|
3116
|
-
var
|
|
3116
|
+
var Zt = "8.16.0";
|
|
3117
3117
|
y.acorn = {
|
|
3118
3118
|
Parser: y,
|
|
3119
|
-
version:
|
|
3119
|
+
version: Zt,
|
|
3120
3120
|
defaultOptions: xe,
|
|
3121
3121
|
Position: Z,
|
|
3122
3122
|
SourceLocation: re,
|
|
3123
|
-
getLineInfo:
|
|
3123
|
+
getLineInfo: De,
|
|
3124
3124
|
Node: he,
|
|
3125
3125
|
TokenType: v,
|
|
3126
3126
|
tokTypes: a,
|
|
3127
|
-
keywordTypes:
|
|
3127
|
+
keywordTypes: be,
|
|
3128
3128
|
TokContext: V,
|
|
3129
3129
|
tokContexts: b,
|
|
3130
3130
|
isIdentifierChar: F,
|
|
3131
3131
|
isIdentifierStart: T,
|
|
3132
|
-
Token:
|
|
3132
|
+
Token: we,
|
|
3133
3133
|
isNewLine: z,
|
|
3134
3134
|
lineBreak: w,
|
|
3135
|
-
lineBreakG:
|
|
3136
|
-
nonASCIIwhitespace:
|
|
3135
|
+
lineBreakG: bt,
|
|
3136
|
+
nonASCIIwhitespace: Oe
|
|
3137
3137
|
};
|
|
3138
|
-
function
|
|
3138
|
+
function Jt(e, t, i) {
|
|
3139
3139
|
return y.parseExpressionAt(e, t, i);
|
|
3140
3140
|
}
|
|
3141
|
+
function ge(e) {
|
|
3142
|
+
const t = e;
|
|
3143
|
+
switch (t.type) {
|
|
3144
|
+
case "Literal": {
|
|
3145
|
+
if (t.regex) throw new Error("regex literals are not allowed");
|
|
3146
|
+
return t.value;
|
|
3147
|
+
}
|
|
3148
|
+
case "TemplateLiteral": {
|
|
3149
|
+
if (t.expressions.length > 0) throw new Error("template expressions are not allowed");
|
|
3150
|
+
return t.quasis.map((i) => i.value.cooked).join("");
|
|
3151
|
+
}
|
|
3152
|
+
case "UnaryExpression": {
|
|
3153
|
+
if ((t.operator === "-" || t.operator === "+") && t.argument?.type === "Literal" && typeof t.argument.value == "number")
|
|
3154
|
+
return t.operator === "-" ? -t.argument.value : +t.argument.value;
|
|
3155
|
+
throw new Error(`unary operator ${t.operator} is not allowed`);
|
|
3156
|
+
}
|
|
3157
|
+
case "Identifier": {
|
|
3158
|
+
if (t.name === "undefined") return;
|
|
3159
|
+
throw new Error(`identifier ${t.name} is not allowed`);
|
|
3160
|
+
}
|
|
3161
|
+
case "ArrayExpression":
|
|
3162
|
+
return t.elements.map((i) => {
|
|
3163
|
+
if (i === null) throw new Error("array holes are not allowed");
|
|
3164
|
+
if (i.type === "SpreadElement") throw new Error("spread is not allowed");
|
|
3165
|
+
return ge(i);
|
|
3166
|
+
});
|
|
3167
|
+
case "ObjectExpression": {
|
|
3168
|
+
const i = {};
|
|
3169
|
+
for (const s of t.properties) {
|
|
3170
|
+
if (s.type !== "Property") throw new Error("spread is not allowed");
|
|
3171
|
+
if (s.computed) throw new Error("computed keys are not allowed");
|
|
3172
|
+
if (s.kind !== "init") throw new Error("getters/setters are not allowed");
|
|
3173
|
+
if (s.method) throw new Error("methods are not allowed");
|
|
3174
|
+
let r;
|
|
3175
|
+
if (s.key.type === "Identifier") r = s.key.name;
|
|
3176
|
+
else if (s.key.type === "Literal") r = String(s.key.value);
|
|
3177
|
+
else throw new Error("unsupported object key");
|
|
3178
|
+
i[r] = ge(s.value);
|
|
3179
|
+
}
|
|
3180
|
+
return i;
|
|
3181
|
+
}
|
|
3182
|
+
default:
|
|
3183
|
+
throw new Error(`unsupported node: ${t.type}`);
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
function $t(e) {
|
|
3187
|
+
try {
|
|
3188
|
+
let t = e.trim();
|
|
3189
|
+
const i = t.match(/export\s+default\s+([\s\S]+)/);
|
|
3190
|
+
if (!i)
|
|
3191
|
+
return console.warn("Could not find export default"), {};
|
|
3192
|
+
t = i[1].trim(), t.endsWith(";") && (t = t.slice(0, -1)), t = t.replace(/\s+satisfies\s+\w+\s*$/, ""), t = t.replace(/\s+as\s+\w+\s*$/, "");
|
|
3193
|
+
const s = Jt(`(${t})`, 0, { ecmaVersion: "latest" });
|
|
3194
|
+
return ge(s);
|
|
3195
|
+
} catch (t) {
|
|
3196
|
+
return console.error("Failed to parse TypeScript export:", t), {};
|
|
3197
|
+
}
|
|
3198
|
+
}
|
|
3141
3199
|
export {
|
|
3142
|
-
|
|
3200
|
+
$t as p
|
|
3143
3201
|
};
|