@datapos/datapos-development 0.3.155 → 0.3.156
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/datapos-development.es.js +296 -289
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { exec as Ei } from "node:child_process";
|
|
2
2
|
import { promises as R } from "node:fs";
|
|
3
3
|
import { nanoid as Ii } from "nanoid";
|
|
4
|
-
import { promisify as
|
|
5
|
-
var
|
|
4
|
+
import { promisify as Ni } from "node:util";
|
|
5
|
+
var _i = [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], je = [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], Li = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Ue = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", oe = {
|
|
6
6
|
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",
|
|
7
7
|
5: "class enum extends super const export import",
|
|
8
8
|
6: "enum",
|
|
@@ -26,7 +26,7 @@ function pt(t, e) {
|
|
|
26
26
|
return t < 65 ? t === 36 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && Mi.test(String.fromCharCode(t)) : e === !1 ? !1 : le(t, je);
|
|
27
27
|
}
|
|
28
28
|
function dt(t, e) {
|
|
29
|
-
return t < 48 ? t === 36 : t < 58 ? !0 : t < 65 ? !1 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && Di.test(String.fromCharCode(t)) : e === !1 ? !1 : le(t, je) || le(t,
|
|
29
|
+
return t < 48 ? t === 36 : t < 58 ? !0 : t < 65 ? !1 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && Di.test(String.fromCharCode(t)) : e === !1 ? !1 : le(t, je) || le(t, _i);
|
|
30
30
|
}
|
|
31
31
|
var O = function(e, r) {
|
|
32
32
|
r === void 0 && (r = {}), this.label = e, this.keyword = r.keyword, this.beforeExpr = !!r.beforeExpr, this.startsExpr = !!r.startsExpr, this.isLoop = !!r.isLoop, this.isAssign = !!r.isAssign, this.prefix = !!r.prefix, this.postfix = !!r.postfix, this.binop = r.binop || null, this.updateContext = null;
|
|
@@ -35,7 +35,7 @@ function ot(t, e) {
|
|
|
35
35
|
return new O(t, { beforeExpr: !0, binop: e });
|
|
36
36
|
}
|
|
37
37
|
var ht = { beforeExpr: !0 }, st = { startsExpr: !0 }, kt = {};
|
|
38
|
-
function
|
|
38
|
+
function F(t, e) {
|
|
39
39
|
return e === void 0 && (e = {}), e.keyword = t, kt[t] = new O(t, e);
|
|
40
40
|
}
|
|
41
41
|
var h = {
|
|
@@ -96,42 +96,42 @@ var h = {
|
|
|
96
96
|
starstar: new O("**", { beforeExpr: !0 }),
|
|
97
97
|
coalesce: ot("??", 1),
|
|
98
98
|
// Keyword token types.
|
|
99
|
-
_break:
|
|
100
|
-
_case:
|
|
101
|
-
_catch:
|
|
102
|
-
_continue:
|
|
103
|
-
_debugger:
|
|
104
|
-
_default:
|
|
105
|
-
_do:
|
|
106
|
-
_else:
|
|
107
|
-
_finally:
|
|
108
|
-
_for:
|
|
109
|
-
_function:
|
|
110
|
-
_if:
|
|
111
|
-
_return:
|
|
112
|
-
_switch:
|
|
113
|
-
_throw:
|
|
114
|
-
_try:
|
|
115
|
-
_var:
|
|
116
|
-
_const:
|
|
117
|
-
_while:
|
|
118
|
-
_with:
|
|
119
|
-
_new:
|
|
120
|
-
_this:
|
|
121
|
-
_super:
|
|
122
|
-
_class:
|
|
123
|
-
_extends:
|
|
124
|
-
_export:
|
|
125
|
-
_import:
|
|
126
|
-
_null:
|
|
127
|
-
_true:
|
|
128
|
-
_false:
|
|
129
|
-
_in:
|
|
130
|
-
_instanceof:
|
|
131
|
-
_typeof:
|
|
132
|
-
_void:
|
|
133
|
-
_delete:
|
|
134
|
-
},
|
|
99
|
+
_break: F("break"),
|
|
100
|
+
_case: F("case", ht),
|
|
101
|
+
_catch: F("catch"),
|
|
102
|
+
_continue: F("continue"),
|
|
103
|
+
_debugger: F("debugger"),
|
|
104
|
+
_default: F("default", ht),
|
|
105
|
+
_do: F("do", { isLoop: !0, beforeExpr: !0 }),
|
|
106
|
+
_else: F("else", ht),
|
|
107
|
+
_finally: F("finally"),
|
|
108
|
+
_for: F("for", { isLoop: !0 }),
|
|
109
|
+
_function: F("function", st),
|
|
110
|
+
_if: F("if"),
|
|
111
|
+
_return: F("return", ht),
|
|
112
|
+
_switch: F("switch"),
|
|
113
|
+
_throw: F("throw", ht),
|
|
114
|
+
_try: F("try"),
|
|
115
|
+
_var: F("var"),
|
|
116
|
+
_const: F("const"),
|
|
117
|
+
_while: F("while", { isLoop: !0 }),
|
|
118
|
+
_with: F("with"),
|
|
119
|
+
_new: F("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
120
|
+
_this: F("this", st),
|
|
121
|
+
_super: F("super", st),
|
|
122
|
+
_class: F("class", st),
|
|
123
|
+
_extends: F("extends", ht),
|
|
124
|
+
_export: F("export"),
|
|
125
|
+
_import: F("import", st),
|
|
126
|
+
_null: F("null", st),
|
|
127
|
+
_true: F("true", st),
|
|
128
|
+
_false: F("false", st),
|
|
129
|
+
_in: F("in", { beforeExpr: !0, binop: 7 }),
|
|
130
|
+
_instanceof: F("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
131
|
+
_typeof: F("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
132
|
+
_void: F("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
133
|
+
_delete: F("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
134
|
+
}, tt = /\r\n?|\n|\u2028|\u2029/, qe = new RegExp(tt.source, "g");
|
|
135
135
|
function Tt(t) {
|
|
136
136
|
return t === 10 || t === 13 || t === 8232 || t === 8233;
|
|
137
137
|
}
|
|
@@ -268,12 +268,12 @@ var Kt = {
|
|
|
268
268
|
// When enabled, parenthesized expressions are represented by
|
|
269
269
|
// (non-standard) ParenthesizedExpression nodes
|
|
270
270
|
preserveParens: !1
|
|
271
|
-
},
|
|
271
|
+
}, Ne = !1;
|
|
272
272
|
function ji(t) {
|
|
273
273
|
var e = {};
|
|
274
274
|
for (var r in Kt)
|
|
275
275
|
e[r] = t && wt(t, r) ? t[r] : Kt[r];
|
|
276
|
-
if (e.ecmaVersion === "latest" ? e.ecmaVersion = 1e8 : e.ecmaVersion == null ? (!
|
|
276
|
+
if (e.ecmaVersion === "latest" ? e.ecmaVersion = 1e8 : e.ecmaVersion == null ? (!Ne && typeof console == "object" && console.warn && (Ne = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
277
277
|
Defaulting to 2020, but this will stop working in the future.`)), e.ecmaVersion = 11) : e.ecmaVersion >= 2015 && (e.ecmaVersion -= 2009), e.allowReserved == null && (e.allowReserved = e.ecmaVersion < 5), (!t || t.allowHashBang == null) && (e.allowHashBang = e.ecmaVersion >= 14), Ee(e.onToken)) {
|
|
278
278
|
var a = e.onToken;
|
|
279
279
|
e.onToken = function(u) {
|
|
@@ -297,15 +297,15 @@ var Vt = 1, Et = 2, ve = 4, We = 8, ge = 16, Ke = 32, Yt = 64, Je = 128, Pt = 25
|
|
|
297
297
|
function be(t, e) {
|
|
298
298
|
return Et | (t ? ve : 0) | (e ? We : 0);
|
|
299
299
|
}
|
|
300
|
-
var Jt = 0, Se = 1, xt = 2, Ge = 3, $e = 4, Xe = 5,
|
|
300
|
+
var Jt = 0, Se = 1, xt = 2, Ge = 3, $e = 4, Xe = 5, J = function(e, r, a) {
|
|
301
301
|
this.options = e = ji(e), this.sourceFile = e.sourceFile, this.keywords = bt(Oi[e.ecmaVersion >= 6 ? 6 : e.sourceType === "module" ? "5module" : 5]);
|
|
302
302
|
var u = "";
|
|
303
303
|
e.allowReserved !== !0 && (u = oe[e.ecmaVersion >= 6 ? 6 : e.ecmaVersion === 5 ? 5 : 3], e.sourceType === "module" && (u += " await")), this.reservedWords = bt(u);
|
|
304
304
|
var f = (u ? u + " " : "") + oe.strict;
|
|
305
305
|
this.reservedWordsStrict = bt(f), this.reservedWordsStrictBind = bt(f + " " + oe.strictBind), this.input = String(r), this.containsEsc = !1, a ? (this.pos = a, this.lineStart = this.input.lastIndexOf(`
|
|
306
|
-
`, a - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(
|
|
306
|
+
`, a - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(tt).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = h.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 = e.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 && e.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(Vt), this.regexpState = null, this.privateNameStack = [];
|
|
307
307
|
}, lt = { 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 } };
|
|
308
|
-
|
|
308
|
+
J.prototype.parse = function() {
|
|
309
309
|
var e = this.options.program || this.startNode();
|
|
310
310
|
return this.nextToken(), this.parseTopLevel(e);
|
|
311
311
|
};
|
|
@@ -349,25 +349,25 @@ lt.allowNewDotTarget.get = function() {
|
|
|
349
349
|
lt.inClassStaticBlock.get = function() {
|
|
350
350
|
return (this.currentVarScope().flags & Pt) > 0;
|
|
351
351
|
};
|
|
352
|
-
|
|
352
|
+
J.extend = function() {
|
|
353
353
|
for (var e = [], r = arguments.length; r--; ) e[r] = arguments[r];
|
|
354
354
|
for (var a = this, u = 0; u < e.length; u++)
|
|
355
355
|
a = e[u](a);
|
|
356
356
|
return a;
|
|
357
357
|
};
|
|
358
|
-
|
|
358
|
+
J.parse = function(e, r) {
|
|
359
359
|
return new this(r, e).parse();
|
|
360
360
|
};
|
|
361
|
-
|
|
361
|
+
J.parseExpressionAt = function(e, r, a) {
|
|
362
362
|
var u = new this(a, e, r);
|
|
363
363
|
return u.nextToken(), u.parseExpression();
|
|
364
364
|
};
|
|
365
|
-
|
|
365
|
+
J.tokenizer = function(e, r) {
|
|
366
366
|
return new this(r, e);
|
|
367
367
|
};
|
|
368
|
-
Object.defineProperties(
|
|
369
|
-
var
|
|
370
|
-
|
|
368
|
+
Object.defineProperties(J.prototype, lt);
|
|
369
|
+
var et = J.prototype, qi = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
370
|
+
et.strictDirective = function(t) {
|
|
371
371
|
if (this.options.ecmaVersion < 5)
|
|
372
372
|
return !1;
|
|
373
373
|
for (; ; ) {
|
|
@@ -378,54 +378,54 @@ tt.strictDirective = function(t) {
|
|
|
378
378
|
if ((e[1] || e[2]) === "use strict") {
|
|
379
379
|
X.lastIndex = t + e[0].length;
|
|
380
380
|
var r = X.exec(this.input), a = r.index + r[0].length, u = this.input.charAt(a);
|
|
381
|
-
return u === ";" || u === "}" ||
|
|
381
|
+
return u === ";" || u === "}" || tt.test(r[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(u) || u === "!" && this.input.charAt(a + 1) === "=");
|
|
382
382
|
}
|
|
383
383
|
t += e[0].length, X.lastIndex = t, t += X.exec(this.input)[0].length, this.input[t] === ";" && t++;
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
|
-
|
|
386
|
+
et.eat = function(t) {
|
|
387
387
|
return this.type === t ? (this.next(), !0) : !1;
|
|
388
388
|
};
|
|
389
|
-
|
|
389
|
+
et.isContextual = function(t) {
|
|
390
390
|
return this.type === h.name && this.value === t && !this.containsEsc;
|
|
391
391
|
};
|
|
392
|
-
|
|
392
|
+
et.eatContextual = function(t) {
|
|
393
393
|
return this.isContextual(t) ? (this.next(), !0) : !1;
|
|
394
394
|
};
|
|
395
|
-
|
|
395
|
+
et.expectContextual = function(t) {
|
|
396
396
|
this.eatContextual(t) || this.unexpected();
|
|
397
397
|
};
|
|
398
|
-
|
|
399
|
-
return this.type === h.eof || this.type === h.braceR ||
|
|
398
|
+
et.canInsertSemicolon = function() {
|
|
399
|
+
return this.type === h.eof || this.type === h.braceR || tt.test(this.input.slice(this.lastTokEnd, this.start));
|
|
400
400
|
};
|
|
401
|
-
|
|
401
|
+
et.insertSemicolon = function() {
|
|
402
402
|
if (this.canInsertSemicolon())
|
|
403
403
|
return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
|
|
404
404
|
};
|
|
405
|
-
|
|
405
|
+
et.semicolon = function() {
|
|
406
406
|
!this.eat(h.semi) && !this.insertSemicolon() && this.unexpected();
|
|
407
407
|
};
|
|
408
|
-
|
|
408
|
+
et.afterTrailingComma = function(t, e) {
|
|
409
409
|
if (this.type === t)
|
|
410
410
|
return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), e || this.next(), !0;
|
|
411
411
|
};
|
|
412
|
-
|
|
412
|
+
et.expect = function(t) {
|
|
413
413
|
this.eat(t) || this.unexpected();
|
|
414
414
|
};
|
|
415
|
-
|
|
415
|
+
et.unexpected = function(t) {
|
|
416
416
|
this.raise(t ?? this.start, "Unexpected token");
|
|
417
417
|
};
|
|
418
418
|
var te = function() {
|
|
419
419
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
420
420
|
};
|
|
421
|
-
|
|
421
|
+
et.checkPatternErrors = function(t, e) {
|
|
422
422
|
if (t) {
|
|
423
423
|
t.trailingComma > -1 && this.raiseRecoverable(t.trailingComma, "Comma is not permitted after the rest element");
|
|
424
424
|
var r = e ? t.parenthesizedAssign : t.parenthesizedBind;
|
|
425
425
|
r > -1 && this.raiseRecoverable(r, e ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
426
426
|
}
|
|
427
427
|
};
|
|
428
|
-
|
|
428
|
+
et.checkExpressionErrors = function(t, e) {
|
|
429
429
|
if (!t)
|
|
430
430
|
return !1;
|
|
431
431
|
var r = t.shorthandAssign, a = t.doubleProto;
|
|
@@ -433,13 +433,13 @@ tt.checkExpressionErrors = function(t, e) {
|
|
|
433
433
|
return r >= 0 || a >= 0;
|
|
434
434
|
r >= 0 && this.raise(r, "Shorthand property assignments are valid only in destructuring patterns"), a >= 0 && this.raiseRecoverable(a, "Redefinition of __proto__ property");
|
|
435
435
|
};
|
|
436
|
-
|
|
436
|
+
et.checkYieldAwaitInDefaultParams = function() {
|
|
437
437
|
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");
|
|
438
438
|
};
|
|
439
|
-
|
|
439
|
+
et.isSimpleAssignTarget = function(t) {
|
|
440
440
|
return t.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(t.expression) : t.type === "Identifier" || t.type === "MemberExpression";
|
|
441
441
|
};
|
|
442
|
-
var k =
|
|
442
|
+
var k = J.prototype;
|
|
443
443
|
k.parseTopLevel = function(t) {
|
|
444
444
|
var e = /* @__PURE__ */ Object.create(null);
|
|
445
445
|
for (t.body || (t.body = []); this.type !== h.eof; ) {
|
|
@@ -481,14 +481,14 @@ k.isAsyncFunction = function() {
|
|
|
481
481
|
return !1;
|
|
482
482
|
X.lastIndex = this.pos;
|
|
483
483
|
var t = X.exec(this.input), e = this.pos + t[0].length, r;
|
|
484
|
-
return !
|
|
484
|
+
return !tt.test(this.input.slice(this.pos, e)) && this.input.slice(e, e + 8) === "function" && (e + 8 === this.input.length || !(dt(r = this.input.charCodeAt(e + 8)) || r > 55295 && r < 56320));
|
|
485
485
|
};
|
|
486
486
|
k.isUsingKeyword = function(t, e) {
|
|
487
487
|
if (this.options.ecmaVersion < 17 || !this.isContextual(t ? "await" : "using"))
|
|
488
488
|
return !1;
|
|
489
489
|
X.lastIndex = this.pos;
|
|
490
490
|
var r = X.exec(this.input), a = this.pos + r[0].length;
|
|
491
|
-
if (
|
|
491
|
+
if (tt.test(this.input.slice(this.pos, a)))
|
|
492
492
|
return !1;
|
|
493
493
|
if (t) {
|
|
494
494
|
var u = a + 5, f;
|
|
@@ -496,7 +496,7 @@ k.isUsingKeyword = function(t, e) {
|
|
|
496
496
|
return !1;
|
|
497
497
|
X.lastIndex = u;
|
|
498
498
|
var d = X.exec(this.input);
|
|
499
|
-
if (d &&
|
|
499
|
+
if (d && tt.test(this.input.slice(u, u + d[0].length)))
|
|
500
500
|
return !1;
|
|
501
501
|
}
|
|
502
502
|
if (e) {
|
|
@@ -570,8 +570,8 @@ k.parseStatement = function(t, e, r) {
|
|
|
570
570
|
var o = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
|
|
571
571
|
if (o)
|
|
572
572
|
return e && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), o === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(u, !1, o), this.semicolon(), this.finishNode(u, "VariableDeclaration");
|
|
573
|
-
var w = this.value,
|
|
574
|
-
return a === h.name &&
|
|
573
|
+
var w = this.value, _ = this.parseExpression();
|
|
574
|
+
return a === h.name && _.type === "Identifier" && this.eat(h.colon) ? this.parseLabeledStatement(u, w, _, t) : this.parseExpressionStatement(u, _);
|
|
575
575
|
}
|
|
576
576
|
};
|
|
577
577
|
k.parseBreakContinueStatement = function(t, e) {
|
|
@@ -605,8 +605,8 @@ k.parseForStatement = function(t) {
|
|
|
605
605
|
var g = this.startNode();
|
|
606
606
|
return this.next(), v === "await using" && this.next(), this.parseVar(g, !0, v), this.finishNode(g, "VariableDeclaration"), this.parseForAfterInit(t, g, e);
|
|
607
607
|
}
|
|
608
|
-
var o = this.containsEsc, w = new te(),
|
|
609
|
-
return this.type === h._in || (d = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (e > -1 ? (this.type === h._in && this.unexpected(e), t.await = !0) : d && this.options.ecmaVersion >= 8 && (M.start ===
|
|
608
|
+
var o = this.containsEsc, w = new te(), _ = this.start, M = e > -1 ? this.parseExprSubscripts(w, "await") : this.parseExpression(!0, w);
|
|
609
|
+
return this.type === h._in || (d = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (e > -1 ? (this.type === h._in && this.unexpected(e), t.await = !0) : d && this.options.ecmaVersion >= 8 && (M.start === _ && !o && M.type === "Identifier" && M.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (t.await = !1)), f && d && this.raise(M.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(M, !1, w), this.checkLValPattern(M), this.parseForIn(t, M)) : (this.checkExpressionErrors(w, !0), e > -1 && this.unexpected(e), this.parseFor(t, M));
|
|
610
610
|
};
|
|
611
611
|
k.parseForAfterInit = function(t, e, r) {
|
|
612
612
|
return (this.type === h._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && e.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === h._in ? r > -1 && this.unexpected(r) : t.await = r > -1), this.parseForIn(t, e)) : (r > -1 && this.unexpected(r), this.parseFor(t, e));
|
|
@@ -631,7 +631,7 @@ k.parseSwitchStatement = function(t) {
|
|
|
631
631
|
return this.exitScope(), e && this.finishNode(e, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(t, "SwitchStatement");
|
|
632
632
|
};
|
|
633
633
|
k.parseThrowStatement = function(t) {
|
|
634
|
-
return this.next(),
|
|
634
|
+
return this.next(), tt.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");
|
|
635
635
|
};
|
|
636
636
|
var zi = [];
|
|
637
637
|
k.parseCatchClauseParam = function() {
|
|
@@ -944,7 +944,7 @@ k.isDirectiveCandidate = function(t) {
|
|
|
944
944
|
return this.options.ecmaVersion >= 5 && t.type === "ExpressionStatement" && t.expression.type === "Literal" && typeof t.expression.value == "string" && // Reject parenthesized strings.
|
|
945
945
|
(this.input[t.start] === '"' || this.input[t.start] === "'");
|
|
946
946
|
};
|
|
947
|
-
var ct =
|
|
947
|
+
var ct = J.prototype;
|
|
948
948
|
ct.toAssignable = function(t, e, r) {
|
|
949
949
|
if (this.options.ecmaVersion >= 6 && t)
|
|
950
950
|
switch (t.type) {
|
|
@@ -1101,22 +1101,22 @@ ct.checkLValInnerPattern = function(t, e, r) {
|
|
|
1101
1101
|
this.checkLValPattern(t, e, r);
|
|
1102
1102
|
}
|
|
1103
1103
|
};
|
|
1104
|
-
var
|
|
1104
|
+
var Z = function(e, r, a, u, f) {
|
|
1105
1105
|
this.token = e, this.isExpr = !!r, this.preserveSpace = !!a, this.override = u, this.generator = !!f;
|
|
1106
1106
|
}, q = {
|
|
1107
|
-
b_stat: new
|
|
1108
|
-
b_expr: new
|
|
1109
|
-
b_tmpl: new
|
|
1110
|
-
p_stat: new
|
|
1111
|
-
p_expr: new
|
|
1112
|
-
q_tmpl: new
|
|
1107
|
+
b_stat: new Z("{", !1),
|
|
1108
|
+
b_expr: new Z("{", !0),
|
|
1109
|
+
b_tmpl: new Z("${", !1),
|
|
1110
|
+
p_stat: new Z("(", !1),
|
|
1111
|
+
p_expr: new Z("(", !0),
|
|
1112
|
+
q_tmpl: new Z("`", !0, !0, function(t) {
|
|
1113
1113
|
return t.tryReadTemplateToken();
|
|
1114
1114
|
}),
|
|
1115
|
-
f_stat: new
|
|
1116
|
-
f_expr: new
|
|
1117
|
-
f_expr_gen: new
|
|
1118
|
-
f_gen: new
|
|
1119
|
-
}, It =
|
|
1115
|
+
f_stat: new Z("function", !1),
|
|
1116
|
+
f_expr: new Z("function", !0),
|
|
1117
|
+
f_expr_gen: new Z("function", !0, !1, null, !0),
|
|
1118
|
+
f_gen: new Z("function", !1, !1, null, !0)
|
|
1119
|
+
}, It = J.prototype;
|
|
1120
1120
|
It.initialContext = function() {
|
|
1121
1121
|
return [q.b_stat];
|
|
1122
1122
|
};
|
|
@@ -1125,7 +1125,7 @@ It.curContext = function() {
|
|
|
1125
1125
|
};
|
|
1126
1126
|
It.braceIsBlock = function(t) {
|
|
1127
1127
|
var e = this.curContext();
|
|
1128
|
-
return e === q.f_expr || e === q.f_stat ? !0 : t === h.colon && (e === q.b_stat || e === q.b_expr) ? !e.isExpr : t === h._return || t === h.name && this.exprAllowed ?
|
|
1128
|
+
return e === q.f_expr || e === q.f_stat ? !0 : t === h.colon && (e === q.b_stat || e === q.b_expr) ? !e.isExpr : t === h._return || t === h.name && this.exprAllowed ? tt.test(this.input.slice(this.lastTokEnd, this.start)) : t === h._else || t === h.semi || t === h.eof || t === h.parenR || t === h.arrow ? !0 : t === h.braceL ? e === q.b_stat : t === h._var || t === h._const || t === h.name ? !1 : !this.exprAllowed;
|
|
1129
1129
|
};
|
|
1130
1130
|
It.inGeneratorContext = function() {
|
|
1131
1131
|
for (var t = this.context.length - 1; t >= 1; t--) {
|
|
@@ -1163,7 +1163,7 @@ h.parenL.updateContext = function(t) {
|
|
|
1163
1163
|
h.incDec.updateContext = function() {
|
|
1164
1164
|
};
|
|
1165
1165
|
h._function.updateContext = h._class.updateContext = function(t) {
|
|
1166
|
-
t.beforeExpr && t !== h._else && !(t === h.semi && this.curContext() !== q.p_stat) && !(t === h._return &&
|
|
1166
|
+
t.beforeExpr && t !== h._else && !(t === h.semi && this.curContext() !== q.p_stat) && !(t === h._return && tt.test(this.input.slice(this.lastTokEnd, this.start))) && !((t === h.colon || t === h.braceL) && this.curContext() === q.b_stat) ? this.context.push(q.f_expr) : this.context.push(q.f_stat), this.exprAllowed = !1;
|
|
1167
1167
|
};
|
|
1168
1168
|
h.colon.updateContext = function() {
|
|
1169
1169
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
@@ -1182,8 +1182,8 @@ h.name.updateContext = function(t) {
|
|
|
1182
1182
|
var e = !1;
|
|
1183
1183
|
this.options.ecmaVersion >= 6 && t !== h.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (e = !0), this.exprAllowed = e;
|
|
1184
1184
|
};
|
|
1185
|
-
var
|
|
1186
|
-
|
|
1185
|
+
var N = J.prototype;
|
|
1186
|
+
N.checkPropClash = function(t, e, r) {
|
|
1187
1187
|
if (!(this.options.ecmaVersion >= 9 && t.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (t.computed || t.method || t.shorthand))) {
|
|
1188
1188
|
var a = t.key, u;
|
|
1189
1189
|
switch (a.type) {
|
|
@@ -1215,7 +1215,7 @@ _.checkPropClash = function(t, e, r) {
|
|
|
1215
1215
|
d[f] = !0;
|
|
1216
1216
|
}
|
|
1217
1217
|
};
|
|
1218
|
-
|
|
1218
|
+
N.parseExpression = function(t, e) {
|
|
1219
1219
|
var r = this.start, a = this.startLoc, u = this.parseMaybeAssign(t, e);
|
|
1220
1220
|
if (this.type === h.comma) {
|
|
1221
1221
|
var f = this.startNodeAt(r, a);
|
|
@@ -1225,7 +1225,7 @@ _.parseExpression = function(t, e) {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
return u;
|
|
1227
1227
|
};
|
|
1228
|
-
|
|
1228
|
+
N.parseMaybeAssign = function(t, e, r) {
|
|
1229
1229
|
if (this.isContextual("yield")) {
|
|
1230
1230
|
if (this.inGenerator)
|
|
1231
1231
|
return this.parseYield(t);
|
|
@@ -1243,7 +1243,7 @@ _.parseMaybeAssign = function(t, e, r) {
|
|
|
1243
1243
|
a && this.checkExpressionErrors(e, !0);
|
|
1244
1244
|
return u > -1 && (e.parenthesizedAssign = u), f > -1 && (e.trailingComma = f), o;
|
|
1245
1245
|
};
|
|
1246
|
-
|
|
1246
|
+
N.parseMaybeConditional = function(t, e) {
|
|
1247
1247
|
var r = this.start, a = this.startLoc, u = this.parseExprOps(t, e);
|
|
1248
1248
|
if (this.checkExpressionErrors(e))
|
|
1249
1249
|
return u;
|
|
@@ -1253,28 +1253,28 @@ _.parseMaybeConditional = function(t, e) {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
return u;
|
|
1255
1255
|
};
|
|
1256
|
-
|
|
1256
|
+
N.parseExprOps = function(t, e) {
|
|
1257
1257
|
var r = this.start, a = this.startLoc, u = this.parseMaybeUnary(e, !1, !1, t);
|
|
1258
1258
|
return this.checkExpressionErrors(e) || u.start === r && u.type === "ArrowFunctionExpression" ? u : this.parseExprOp(u, r, a, -1, t);
|
|
1259
1259
|
};
|
|
1260
|
-
|
|
1260
|
+
N.parseExprOp = function(t, e, r, a, u) {
|
|
1261
1261
|
var f = this.type.binop;
|
|
1262
1262
|
if (f != null && (!u || this.type !== h._in) && f > a) {
|
|
1263
1263
|
var d = this.type === h.logicalOR || this.type === h.logicalAND, v = this.type === h.coalesce;
|
|
1264
1264
|
v && (f = h.logicalAND.binop);
|
|
1265
1265
|
var g = this.value;
|
|
1266
1266
|
this.next();
|
|
1267
|
-
var o = this.start, w = this.startLoc,
|
|
1267
|
+
var o = this.start, w = this.startLoc, _ = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, u), o, w, f, u), M = this.buildBinary(e, r, t, _, g, d || v);
|
|
1268
1268
|
return (d && this.type === h.coalesce || v && (this.type === h.logicalOR || this.type === h.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(M, e, r, a, u);
|
|
1269
1269
|
}
|
|
1270
1270
|
return t;
|
|
1271
1271
|
};
|
|
1272
|
-
|
|
1272
|
+
N.buildBinary = function(t, e, r, a, u, f) {
|
|
1273
1273
|
a.type === "PrivateIdentifier" && this.raise(a.start, "Private identifier can only be left side of binary expression");
|
|
1274
1274
|
var d = this.startNodeAt(t, e);
|
|
1275
1275
|
return d.left = r, d.operator = u, d.right = a, this.finishNode(d, f ? "LogicalExpression" : "BinaryExpression");
|
|
1276
1276
|
};
|
|
1277
|
-
|
|
1277
|
+
N.parseMaybeUnary = function(t, e, r, a) {
|
|
1278
1278
|
var u = this.start, f = this.startLoc, d;
|
|
1279
1279
|
if (this.isContextual("await") && this.canAwait)
|
|
1280
1280
|
d = this.parseAwait(a), e = !0;
|
|
@@ -1305,14 +1305,14 @@ function Ye(t) {
|
|
|
1305
1305
|
function de(t) {
|
|
1306
1306
|
return t.type === "MemberExpression" && t.property.type === "PrivateIdentifier" || t.type === "ChainExpression" && de(t.expression) || t.type === "ParenthesizedExpression" && de(t.expression);
|
|
1307
1307
|
}
|
|
1308
|
-
|
|
1308
|
+
N.parseExprSubscripts = function(t, e) {
|
|
1309
1309
|
var r = this.start, a = this.startLoc, u = this.parseExprAtom(t, e);
|
|
1310
1310
|
if (u.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")")
|
|
1311
1311
|
return u;
|
|
1312
1312
|
var f = this.parseSubscripts(u, r, a, !1, e);
|
|
1313
1313
|
return t && f.type === "MemberExpression" && (t.parenthesizedAssign >= f.start && (t.parenthesizedAssign = -1), t.parenthesizedBind >= f.start && (t.parenthesizedBind = -1), t.trailingComma >= f.start && (t.trailingComma = -1)), f;
|
|
1314
1314
|
};
|
|
1315
|
-
|
|
1315
|
+
N.parseSubscripts = function(t, e, r, a, u) {
|
|
1316
1316
|
for (var f = this.options.ecmaVersion >= 8 && t.type === "Identifier" && t.name === "async" && this.lastTokEnd === t.end && !this.canInsertSemicolon() && t.end - t.start === 5 && this.potentialArrowAt === t.start, d = !1; ; ) {
|
|
1317
1317
|
var v = this.parseSubscript(t, e, r, a, f, d, u);
|
|
1318
1318
|
if (v.optional && (d = !0), v === t || v.type === "ArrowFunctionExpression") {
|
|
@@ -1325,13 +1325,13 @@ _.parseSubscripts = function(t, e, r, a, u) {
|
|
|
1325
1325
|
t = v;
|
|
1326
1326
|
}
|
|
1327
1327
|
};
|
|
1328
|
-
|
|
1328
|
+
N.shouldParseAsyncArrow = function() {
|
|
1329
1329
|
return !this.canInsertSemicolon() && this.eat(h.arrow);
|
|
1330
1330
|
};
|
|
1331
|
-
|
|
1331
|
+
N.parseSubscriptAsyncArrow = function(t, e, r, a) {
|
|
1332
1332
|
return this.parseArrowExpression(this.startNodeAt(t, e), r, !0, a);
|
|
1333
1333
|
};
|
|
1334
|
-
|
|
1334
|
+
N.parseSubscript = function(t, e, r, a, u, f, d) {
|
|
1335
1335
|
var v = this.options.ecmaVersion >= 11, g = v && this.eat(h.questionDot);
|
|
1336
1336
|
a && g && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
1337
1337
|
var o = this.eat(h.bracketL);
|
|
@@ -1339,22 +1339,22 @@ _.parseSubscript = function(t, e, r, a, u, f, d) {
|
|
|
1339
1339
|
var w = this.startNodeAt(e, r);
|
|
1340
1340
|
w.object = t, o ? (w.property = this.parseExpression(), this.expect(h.bracketR)) : this.type === h.privateId && t.type !== "Super" ? w.property = this.parsePrivateIdent() : w.property = this.parseIdent(this.options.allowReserved !== "never"), w.computed = !!o, v && (w.optional = g), t = this.finishNode(w, "MemberExpression");
|
|
1341
1341
|
} else if (!a && this.eat(h.parenL)) {
|
|
1342
|
-
var
|
|
1342
|
+
var _ = new te(), M = this.yieldPos, j = this.awaitPos, V = this.awaitIdentPos;
|
|
1343
1343
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1344
|
-
var
|
|
1344
|
+
var H = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1, _);
|
|
1345
1345
|
if (u && !g && this.shouldParseAsyncArrow())
|
|
1346
|
-
return this.checkPatternErrors(
|
|
1347
|
-
this.checkExpressionErrors(
|
|
1346
|
+
return this.checkPatternErrors(_, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = M, this.awaitPos = j, this.awaitIdentPos = V, this.parseSubscriptAsyncArrow(e, r, H, d);
|
|
1347
|
+
this.checkExpressionErrors(_, !0), this.yieldPos = M || this.yieldPos, this.awaitPos = j || this.awaitPos, this.awaitIdentPos = V || this.awaitIdentPos;
|
|
1348
1348
|
var I = this.startNodeAt(e, r);
|
|
1349
|
-
I.callee = t, I.arguments =
|
|
1349
|
+
I.callee = t, I.arguments = H, v && (I.optional = g), t = this.finishNode(I, "CallExpression");
|
|
1350
1350
|
} else if (this.type === h.backQuote) {
|
|
1351
1351
|
(g || f) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1352
|
-
var
|
|
1353
|
-
|
|
1352
|
+
var Q = this.startNodeAt(e, r);
|
|
1353
|
+
Q.tag = t, Q.quasi = this.parseTemplate({ isTagged: !0 }), t = this.finishNode(Q, "TaggedTemplateExpression");
|
|
1354
1354
|
}
|
|
1355
1355
|
return t;
|
|
1356
1356
|
};
|
|
1357
|
-
|
|
1357
|
+
N.parseExprAtom = function(t, e, r) {
|
|
1358
1358
|
this.type === h.slash && this.readRegexp();
|
|
1359
1359
|
var a, u = this.potentialArrowAt === this.start;
|
|
1360
1360
|
switch (this.type) {
|
|
@@ -1384,8 +1384,8 @@ _.parseExprAtom = function(t, e, r) {
|
|
|
1384
1384
|
case h._false:
|
|
1385
1385
|
return a = this.startNode(), a.value = this.type === h._null ? null : this.type === h._true, a.raw = this.type.keyword, this.next(), this.finishNode(a, "Literal");
|
|
1386
1386
|
case h.parenL:
|
|
1387
|
-
var w = this.start,
|
|
1388
|
-
return t && (t.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(
|
|
1387
|
+
var w = this.start, _ = this.parseParenAndDistinguishExpression(u, e);
|
|
1388
|
+
return t && (t.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(_) && (t.parenthesizedAssign = w), t.parenthesizedBind < 0 && (t.parenthesizedBind = w)), _;
|
|
1389
1389
|
case h.bracketL:
|
|
1390
1390
|
return a = this.startNode(), this.next(), a.elements = this.parseExprList(h.bracketR, !0, !0, t), this.finishNode(a, "ArrayExpression");
|
|
1391
1391
|
case h.braceL:
|
|
@@ -1404,10 +1404,10 @@ _.parseExprAtom = function(t, e, r) {
|
|
|
1404
1404
|
return this.parseExprAtomDefault();
|
|
1405
1405
|
}
|
|
1406
1406
|
};
|
|
1407
|
-
|
|
1407
|
+
N.parseExprAtomDefault = function() {
|
|
1408
1408
|
this.unexpected();
|
|
1409
1409
|
};
|
|
1410
|
-
|
|
1410
|
+
N.parseExprImport = function(t) {
|
|
1411
1411
|
var e = this.startNode();
|
|
1412
1412
|
if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === h.parenL && !t)
|
|
1413
1413
|
return this.parseDynamicImport(e);
|
|
@@ -1417,7 +1417,7 @@ _.parseExprImport = function(t) {
|
|
|
1417
1417
|
} else
|
|
1418
1418
|
this.unexpected();
|
|
1419
1419
|
};
|
|
1420
|
-
|
|
1420
|
+
N.parseDynamicImport = function(t) {
|
|
1421
1421
|
if (this.next(), t.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16)
|
|
1422
1422
|
this.eat(h.parenR) ? t.options = null : (this.expect(h.comma), this.afterTrailingComma(h.parenR) ? t.options = null : (t.options = this.parseMaybeAssign(), this.eat(h.parenR) || (this.expect(h.comma), this.afterTrailingComma(h.parenR) || this.unexpected())));
|
|
1423
1423
|
else if (!this.eat(h.parenR)) {
|
|
@@ -1426,60 +1426,60 @@ _.parseDynamicImport = function(t) {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
return this.finishNode(t, "ImportExpression");
|
|
1428
1428
|
};
|
|
1429
|
-
|
|
1429
|
+
N.parseImportMeta = function(t) {
|
|
1430
1430
|
this.next();
|
|
1431
1431
|
var e = this.containsEsc;
|
|
1432
1432
|
return t.property = this.parseIdent(!0), t.property.name !== "meta" && this.raiseRecoverable(t.property.start, "The only valid meta property for import is 'import.meta'"), e && this.raiseRecoverable(t.start, "'import.meta' must not contain escaped characters"), this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere && this.raiseRecoverable(t.start, "Cannot use 'import.meta' outside a module"), this.finishNode(t, "MetaProperty");
|
|
1433
1433
|
};
|
|
1434
|
-
|
|
1434
|
+
N.parseLiteral = function(t) {
|
|
1435
1435
|
var e = this.startNode();
|
|
1436
1436
|
return e.value = t, e.raw = this.input.slice(this.start, this.end), e.raw.charCodeAt(e.raw.length - 1) === 110 && (e.bigint = e.value != null ? e.value.toString() : e.raw.slice(0, -1).replace(/_/g, "")), this.next(), this.finishNode(e, "Literal");
|
|
1437
1437
|
};
|
|
1438
|
-
|
|
1438
|
+
N.parseParenExpression = function() {
|
|
1439
1439
|
this.expect(h.parenL);
|
|
1440
1440
|
var t = this.parseExpression();
|
|
1441
1441
|
return this.expect(h.parenR), t;
|
|
1442
1442
|
};
|
|
1443
|
-
|
|
1443
|
+
N.shouldParseArrow = function(t) {
|
|
1444
1444
|
return !this.canInsertSemicolon();
|
|
1445
1445
|
};
|
|
1446
|
-
|
|
1446
|
+
N.parseParenAndDistinguishExpression = function(t, e) {
|
|
1447
1447
|
var r = this.start, a = this.startLoc, u, f = this.options.ecmaVersion >= 8;
|
|
1448
1448
|
if (this.options.ecmaVersion >= 6) {
|
|
1449
1449
|
this.next();
|
|
1450
|
-
var d = this.start, v = this.startLoc, g = [], o = !0, w = !1,
|
|
1450
|
+
var d = this.start, v = this.startLoc, g = [], o = !0, w = !1, _ = new te(), M = this.yieldPos, j = this.awaitPos, V;
|
|
1451
1451
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== h.parenR; )
|
|
1452
1452
|
if (o ? o = !1 : this.expect(h.comma), f && this.afterTrailingComma(h.parenR, !0)) {
|
|
1453
1453
|
w = !0;
|
|
1454
1454
|
break;
|
|
1455
1455
|
} else if (this.type === h.ellipsis) {
|
|
1456
|
-
|
|
1456
|
+
V = this.start, g.push(this.parseParenItem(this.parseRestBinding())), this.type === h.comma && this.raiseRecoverable(
|
|
1457
1457
|
this.start,
|
|
1458
1458
|
"Comma is not permitted after the rest element"
|
|
1459
1459
|
);
|
|
1460
1460
|
break;
|
|
1461
1461
|
} else
|
|
1462
|
-
g.push(this.parseMaybeAssign(!1,
|
|
1463
|
-
var
|
|
1462
|
+
g.push(this.parseMaybeAssign(!1, _, this.parseParenItem));
|
|
1463
|
+
var H = this.lastTokEnd, I = this.lastTokEndLoc;
|
|
1464
1464
|
if (this.expect(h.parenR), t && this.shouldParseArrow(g) && this.eat(h.arrow))
|
|
1465
|
-
return this.checkPatternErrors(
|
|
1466
|
-
(!g.length || w) && this.unexpected(this.lastTokStart),
|
|
1465
|
+
return this.checkPatternErrors(_, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = M, this.awaitPos = j, this.parseParenArrowList(r, a, g, e);
|
|
1466
|
+
(!g.length || w) && this.unexpected(this.lastTokStart), V && this.unexpected(V), this.checkExpressionErrors(_, !0), this.yieldPos = M || this.yieldPos, this.awaitPos = j || this.awaitPos, g.length > 1 ? (u = this.startNodeAt(d, v), u.expressions = g, this.finishNodeAt(u, "SequenceExpression", H, I)) : u = g[0];
|
|
1467
1467
|
} else
|
|
1468
1468
|
u = this.parseParenExpression();
|
|
1469
1469
|
if (this.options.preserveParens) {
|
|
1470
|
-
var
|
|
1471
|
-
return
|
|
1470
|
+
var Q = this.startNodeAt(r, a);
|
|
1471
|
+
return Q.expression = u, this.finishNode(Q, "ParenthesizedExpression");
|
|
1472
1472
|
} else
|
|
1473
1473
|
return u;
|
|
1474
1474
|
};
|
|
1475
|
-
|
|
1475
|
+
N.parseParenItem = function(t) {
|
|
1476
1476
|
return t;
|
|
1477
1477
|
};
|
|
1478
|
-
|
|
1478
|
+
N.parseParenArrowList = function(t, e, r, a) {
|
|
1479
1479
|
return this.parseArrowExpression(this.startNodeAt(t, e), r, !1, a);
|
|
1480
1480
|
};
|
|
1481
1481
|
var Ki = [];
|
|
1482
|
-
|
|
1482
|
+
N.parseNew = function() {
|
|
1483
1483
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
1484
1484
|
var t = this.startNode();
|
|
1485
1485
|
if (this.next(), this.options.ecmaVersion >= 6 && this.type === h.dot) {
|
|
@@ -1491,7 +1491,7 @@ _.parseNew = function() {
|
|
|
1491
1491
|
var a = this.start, u = this.startLoc;
|
|
1492
1492
|
return t.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), a, u, !0, !1), this.eat(h.parenL) ? t.arguments = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1) : t.arguments = Ki, this.finishNode(t, "NewExpression");
|
|
1493
1493
|
};
|
|
1494
|
-
|
|
1494
|
+
N.parseTemplateElement = function(t) {
|
|
1495
1495
|
var e = t.isTagged, r = this.startNode();
|
|
1496
1496
|
return this.type === h.invalidTemplate ? (e || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), r.value = {
|
|
1497
1497
|
raw: this.value.replace(/\r\n?/g, `
|
|
@@ -1503,7 +1503,7 @@ _.parseTemplateElement = function(t) {
|
|
|
1503
1503
|
cooked: this.value
|
|
1504
1504
|
}, this.next(), r.tail = this.type === h.backQuote, this.finishNode(r, "TemplateElement");
|
|
1505
1505
|
};
|
|
1506
|
-
|
|
1506
|
+
N.parseTemplate = function(t) {
|
|
1507
1507
|
t === void 0 && (t = {});
|
|
1508
1508
|
var e = t.isTagged;
|
|
1509
1509
|
e === void 0 && (e = !1);
|
|
@@ -1514,10 +1514,10 @@ _.parseTemplate = function(t) {
|
|
|
1514
1514
|
this.type === h.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(h.dollarBraceL), r.expressions.push(this.parseExpression()), this.expect(h.braceR), r.quasis.push(a = this.parseTemplateElement({ isTagged: e }));
|
|
1515
1515
|
return this.next(), this.finishNode(r, "TemplateLiteral");
|
|
1516
1516
|
};
|
|
1517
|
-
|
|
1518
|
-
return !t.computed && t.key.type === "Identifier" && t.key.name === "async" && (this.type === h.name || this.type === h.num || this.type === h.string || this.type === h.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === h.star) && !
|
|
1517
|
+
N.isAsyncProp = function(t) {
|
|
1518
|
+
return !t.computed && t.key.type === "Identifier" && t.key.name === "async" && (this.type === h.name || this.type === h.num || this.type === h.string || this.type === h.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === h.star) && !tt.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1519
1519
|
};
|
|
1520
|
-
|
|
1520
|
+
N.parseObj = function(t, e) {
|
|
1521
1521
|
var r = this.startNode(), a = !0, u = {};
|
|
1522
1522
|
for (r.properties = [], this.next(); !this.eat(h.braceR); ) {
|
|
1523
1523
|
if (a)
|
|
@@ -1529,7 +1529,7 @@ _.parseObj = function(t, e) {
|
|
|
1529
1529
|
}
|
|
1530
1530
|
return this.finishNode(r, t ? "ObjectPattern" : "ObjectExpression");
|
|
1531
1531
|
};
|
|
1532
|
-
|
|
1532
|
+
N.parseProperty = function(t, e) {
|
|
1533
1533
|
var r = this.startNode(), a, u, f, d;
|
|
1534
1534
|
if (this.options.ecmaVersion >= 9 && this.eat(h.ellipsis))
|
|
1535
1535
|
return t ? (r.argument = this.parseIdent(!1), this.type === h.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(r, "RestElement")) : (r.argument = this.parseMaybeAssign(!1, e), this.type === h.comma && e && e.trailingComma < 0 && (e.trailingComma = this.start), this.finishNode(r, "SpreadElement"));
|
|
@@ -1537,7 +1537,7 @@ _.parseProperty = function(t, e) {
|
|
|
1537
1537
|
var v = this.containsEsc;
|
|
1538
1538
|
return this.parsePropertyName(r), !t && !v && this.options.ecmaVersion >= 8 && !a && this.isAsyncProp(r) ? (u = !0, a = this.options.ecmaVersion >= 9 && this.eat(h.star), this.parsePropertyName(r)) : u = !1, this.parsePropertyValue(r, t, a, u, f, d, e, v), this.finishNode(r, "Property");
|
|
1539
1539
|
};
|
|
1540
|
-
|
|
1540
|
+
N.parseGetterSetter = function(t) {
|
|
1541
1541
|
var e = t.key.name;
|
|
1542
1542
|
this.parsePropertyName(t), t.value = this.parseMethod(!1), t.kind = e;
|
|
1543
1543
|
var r = t.kind === "get" ? 0 : 1;
|
|
@@ -1547,10 +1547,10 @@ _.parseGetterSetter = function(t) {
|
|
|
1547
1547
|
} else
|
|
1548
1548
|
t.kind === "set" && t.value.params[0].type === "RestElement" && this.raiseRecoverable(t.value.params[0].start, "Setter cannot use rest params");
|
|
1549
1549
|
};
|
|
1550
|
-
|
|
1550
|
+
N.parsePropertyValue = function(t, e, r, a, u, f, d, v) {
|
|
1551
1551
|
(r || a) && this.type === h.colon && this.unexpected(), this.eat(h.colon) ? (t.value = e ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, d), t.kind = "init") : this.options.ecmaVersion >= 6 && this.type === h.parenL ? (e && this.unexpected(), t.method = !0, t.value = this.parseMethod(r, a), t.kind = "init") : !e && !v && this.options.ecmaVersion >= 5 && !t.computed && t.key.type === "Identifier" && (t.key.name === "get" || t.key.name === "set") && this.type !== h.comma && this.type !== h.braceR && this.type !== h.eq ? ((r || a) && this.unexpected(), this.parseGetterSetter(t)) : this.options.ecmaVersion >= 6 && !t.computed && t.key.type === "Identifier" ? ((r || a) && this.unexpected(), this.checkUnreserved(t.key), t.key.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = u), e ? t.value = this.parseMaybeDefault(u, f, this.copyNode(t.key)) : this.type === h.eq && d ? (d.shorthandAssign < 0 && (d.shorthandAssign = this.start), t.value = this.parseMaybeDefault(u, f, this.copyNode(t.key))) : t.value = this.copyNode(t.key), t.kind = "init", t.shorthand = !0) : this.unexpected();
|
|
1552
1552
|
};
|
|
1553
|
-
|
|
1553
|
+
N.parsePropertyName = function(t) {
|
|
1554
1554
|
if (this.options.ecmaVersion >= 6) {
|
|
1555
1555
|
if (this.eat(h.bracketL))
|
|
1556
1556
|
return t.computed = !0, t.key = this.parseMaybeAssign(), this.expect(h.bracketR), t.key;
|
|
@@ -1558,18 +1558,18 @@ _.parsePropertyName = function(t) {
|
|
|
1558
1558
|
}
|
|
1559
1559
|
return t.key = this.type === h.num || this.type === h.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
|
|
1560
1560
|
};
|
|
1561
|
-
|
|
1561
|
+
N.initFunction = function(t) {
|
|
1562
1562
|
t.id = null, this.options.ecmaVersion >= 6 && (t.generator = t.expression = !1), this.options.ecmaVersion >= 8 && (t.async = !1);
|
|
1563
1563
|
};
|
|
1564
|
-
|
|
1564
|
+
N.parseMethod = function(t, e, r) {
|
|
1565
1565
|
var a = this.startNode(), u = this.yieldPos, f = this.awaitPos, d = this.awaitIdentPos;
|
|
1566
1566
|
return this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = t), this.options.ecmaVersion >= 8 && (a.async = !!e), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(be(e, a.generator) | Yt | (r ? Je : 0)), this.expect(h.parenL), a.params = this.parseBindingList(h.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(a, !1, !0, !1), this.yieldPos = u, this.awaitPos = f, this.awaitIdentPos = d, this.finishNode(a, "FunctionExpression");
|
|
1567
1567
|
};
|
|
1568
|
-
|
|
1568
|
+
N.parseArrowExpression = function(t, e, r, a) {
|
|
1569
1569
|
var u = this.yieldPos, f = this.awaitPos, d = this.awaitIdentPos;
|
|
1570
1570
|
return this.enterScope(be(r, !1) | ge), this.initFunction(t), this.options.ecmaVersion >= 8 && (t.async = !!r), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, t.params = this.toAssignableList(e, !0), this.parseFunctionBody(t, !0, !1, a), this.yieldPos = u, this.awaitPos = f, this.awaitIdentPos = d, this.finishNode(t, "ArrowFunctionExpression");
|
|
1571
1571
|
};
|
|
1572
|
-
|
|
1572
|
+
N.parseFunctionBody = function(t, e, r, a) {
|
|
1573
1573
|
var u = e && this.type !== h.braceL, f = this.strict, d = !1;
|
|
1574
1574
|
if (u)
|
|
1575
1575
|
t.body = this.parseMaybeAssign(a), t.expression = !0, this.checkParams(t, !1);
|
|
@@ -1581,7 +1581,7 @@ _.parseFunctionBody = function(t, e, r, a) {
|
|
|
1581
1581
|
}
|
|
1582
1582
|
this.exitScope();
|
|
1583
1583
|
};
|
|
1584
|
-
|
|
1584
|
+
N.isSimpleParamList = function(t) {
|
|
1585
1585
|
for (var e = 0, r = t; e < r.length; e += 1) {
|
|
1586
1586
|
var a = r[e];
|
|
1587
1587
|
if (a.type !== "Identifier")
|
|
@@ -1589,13 +1589,13 @@ _.isSimpleParamList = function(t) {
|
|
|
1589
1589
|
}
|
|
1590
1590
|
return !0;
|
|
1591
1591
|
};
|
|
1592
|
-
|
|
1592
|
+
N.checkParams = function(t, e) {
|
|
1593
1593
|
for (var r = /* @__PURE__ */ Object.create(null), a = 0, u = t.params; a < u.length; a += 1) {
|
|
1594
1594
|
var f = u[a];
|
|
1595
1595
|
this.checkLValInnerPattern(f, Se, e ? null : r);
|
|
1596
1596
|
}
|
|
1597
1597
|
};
|
|
1598
|
-
|
|
1598
|
+
N.parseExprList = function(t, e, r, a) {
|
|
1599
1599
|
for (var u = [], f = !0; !this.eat(t); ) {
|
|
1600
1600
|
if (f)
|
|
1601
1601
|
f = !1;
|
|
@@ -1606,36 +1606,36 @@ _.parseExprList = function(t, e, r, a) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
return u;
|
|
1608
1608
|
};
|
|
1609
|
-
|
|
1609
|
+
N.checkUnreserved = function(t) {
|
|
1610
1610
|
var e = t.start, r = t.end, a = t.name;
|
|
1611
1611
|
if (this.inGenerator && a === "yield" && this.raiseRecoverable(e, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && a === "await" && this.raiseRecoverable(e, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & Zt) && a === "arguments" && this.raiseRecoverable(e, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (a === "arguments" || a === "await") && this.raise(e, "Cannot use " + a + " in class static initialization block"), this.keywords.test(a) && this.raise(e, "Unexpected keyword '" + a + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(e, r).indexOf("\\") !== -1)) {
|
|
1612
1612
|
var u = this.strict ? this.reservedWordsStrict : this.reservedWords;
|
|
1613
1613
|
u.test(a) && (!this.inAsync && a === "await" && this.raiseRecoverable(e, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(e, "The keyword '" + a + "' is reserved"));
|
|
1614
1614
|
}
|
|
1615
1615
|
};
|
|
1616
|
-
|
|
1616
|
+
N.parseIdent = function(t) {
|
|
1617
1617
|
var e = this.parseIdentNode();
|
|
1618
1618
|
return this.next(!!t), this.finishNode(e, "Identifier"), t || (this.checkUnreserved(e), e.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = e.start)), e;
|
|
1619
1619
|
};
|
|
1620
|
-
|
|
1620
|
+
N.parseIdentNode = function() {
|
|
1621
1621
|
var t = this.startNode();
|
|
1622
1622
|
return this.type === h.name ? t.name = this.value : this.type.keyword ? (t.name = this.type.keyword, (t.name === "class" || t.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46) && this.context.pop(), this.type = h.name) : this.unexpected(), t;
|
|
1623
1623
|
};
|
|
1624
|
-
|
|
1624
|
+
N.parsePrivateIdent = function() {
|
|
1625
1625
|
var t = this.startNode();
|
|
1626
1626
|
return this.type === h.privateId ? t.name = this.value : this.unexpected(), this.next(), this.finishNode(t, "PrivateIdentifier"), this.options.checkPrivateFields && (this.privateNameStack.length === 0 ? this.raise(t.start, "Private field '#" + t.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(t)), t;
|
|
1627
1627
|
};
|
|
1628
|
-
|
|
1628
|
+
N.parseYield = function(t) {
|
|
1629
1629
|
this.yieldPos || (this.yieldPos = this.start);
|
|
1630
1630
|
var e = this.startNode();
|
|
1631
1631
|
return this.next(), this.type === h.semi || this.canInsertSemicolon() || this.type !== h.star && !this.type.startsExpr ? (e.delegate = !1, e.argument = null) : (e.delegate = this.eat(h.star), e.argument = this.parseMaybeAssign(t)), this.finishNode(e, "YieldExpression");
|
|
1632
1632
|
};
|
|
1633
|
-
|
|
1633
|
+
N.parseAwait = function(t) {
|
|
1634
1634
|
this.awaitPos || (this.awaitPos = this.start);
|
|
1635
1635
|
var e = this.startNode();
|
|
1636
1636
|
return this.next(), e.argument = this.parseMaybeUnary(null, !0, !1, t), this.finishNode(e, "AwaitExpression");
|
|
1637
1637
|
};
|
|
1638
|
-
var $t =
|
|
1638
|
+
var $t = J.prototype;
|
|
1639
1639
|
$t.raise = function(t, e) {
|
|
1640
1640
|
var r = xe(this.input, t);
|
|
1641
1641
|
e += " (" + r.line + ":" + r.column + ")", this.sourceFile && (e += " in " + this.sourceFile);
|
|
@@ -1647,7 +1647,7 @@ $t.curPosition = function() {
|
|
|
1647
1647
|
if (this.options.locations)
|
|
1648
1648
|
return new At(this.curLine, this.pos - this.lineStart);
|
|
1649
1649
|
};
|
|
1650
|
-
var St =
|
|
1650
|
+
var St = J.prototype, Ji = function(e) {
|
|
1651
1651
|
this.flags = e, this.var = [], this.lexical = [], this.functions = [];
|
|
1652
1652
|
};
|
|
1653
1653
|
St.enterScope = function(t) {
|
|
@@ -1704,7 +1704,7 @@ St.currentThisScope = function() {
|
|
|
1704
1704
|
};
|
|
1705
1705
|
var jt = function(e, r, a) {
|
|
1706
1706
|
this.type = "", this.start = r, this.end = 0, e.options.locations && (this.loc = new Ft(e, a)), e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile), e.options.ranges && (this.range = [r, 0]);
|
|
1707
|
-
}, Ut =
|
|
1707
|
+
}, Ut = J.prototype;
|
|
1708
1708
|
Ut.startNode = function() {
|
|
1709
1709
|
return new jt(this, this.start, this.startLoc);
|
|
1710
1710
|
};
|
|
@@ -1740,7 +1740,7 @@ var Gi = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai
|
|
|
1740
1740
|
12: "",
|
|
1741
1741
|
13: "",
|
|
1742
1742
|
14: Qi
|
|
1743
|
-
},
|
|
1743
|
+
}, _e = "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", ai = "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", ni = ai + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", oi = ni + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", hi = oi + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", ui = hi + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", Zi = ui + " " + Gi, ts = {
|
|
1744
1744
|
9: ai,
|
|
1745
1745
|
10: ni,
|
|
1746
1746
|
11: oi,
|
|
@@ -1750,10 +1750,10 @@ var Gi = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai
|
|
|
1750
1750
|
}, ci = {};
|
|
1751
1751
|
function es(t) {
|
|
1752
1752
|
var e = ci[t] = {
|
|
1753
|
-
binary: bt(Xi[t] + " " +
|
|
1753
|
+
binary: bt(Xi[t] + " " + _e),
|
|
1754
1754
|
binaryOfStrings: bt(Yi[t]),
|
|
1755
1755
|
nonBinary: {
|
|
1756
|
-
General_Category: bt(
|
|
1756
|
+
General_Category: bt(_e),
|
|
1757
1757
|
Script: bt(ts[t])
|
|
1758
1758
|
}
|
|
1759
1759
|
};
|
|
@@ -1763,7 +1763,7 @@ for (var ue = 0, Le = [9, 10, 11, 12, 13, 14]; ue < Le.length; ue += 1) {
|
|
|
1763
1763
|
var is = Le[ue];
|
|
1764
1764
|
es(is);
|
|
1765
1765
|
}
|
|
1766
|
-
var P =
|
|
1766
|
+
var P = J.prototype, Xt = function(e, r) {
|
|
1767
1767
|
this.parent = e, this.base = r || this;
|
|
1768
1768
|
};
|
|
1769
1769
|
Xt.prototype.separatedFrom = function(e) {
|
|
@@ -2595,7 +2595,7 @@ P.regexp_eatFixedHexDigits = function(t, e) {
|
|
|
2595
2595
|
};
|
|
2596
2596
|
var ie = function(e) {
|
|
2597
2597
|
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new Ft(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
2598
|
-
}, D =
|
|
2598
|
+
}, D = J.prototype;
|
|
2599
2599
|
D.next = function(t) {
|
|
2600
2600
|
!t && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new ie(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2601
2601
|
};
|
|
@@ -2731,7 +2731,7 @@ D.readToken_caret = function() {
|
|
|
2731
2731
|
};
|
|
2732
2732
|
D.readToken_plus_min = function(t) {
|
|
2733
2733
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2734
|
-
return e === t ? e === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
2734
|
+
return e === t ? e === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || tt.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(h.incDec, 2) : e === 61 ? this.finishOp(h.assign, 2) : this.finishOp(h.plusMin, 1);
|
|
2735
2735
|
};
|
|
2736
2736
|
D.readToken_lt_gt = function(t) {
|
|
2737
2737
|
var e = this.input.charCodeAt(this.pos + 1), r = 1;
|
|
@@ -2862,7 +2862,7 @@ D.readRegexp = function() {
|
|
|
2862
2862
|
for (var t, e, r = this.pos; ; ) {
|
|
2863
2863
|
this.pos >= this.input.length && this.raise(r, "Unterminated regular expression");
|
|
2864
2864
|
var a = this.input.charAt(this.pos);
|
|
2865
|
-
if (
|
|
2865
|
+
if (tt.test(a) && this.raise(r, "Unterminated regular expression"), t)
|
|
2866
2866
|
t = !1;
|
|
2867
2867
|
else {
|
|
2868
2868
|
if (a === "[")
|
|
@@ -2890,14 +2890,14 @@ D.readRegexp = function() {
|
|
|
2890
2890
|
};
|
|
2891
2891
|
D.readInt = function(t, e, r) {
|
|
2892
2892
|
for (var a = this.options.ecmaVersion >= 12 && e === void 0, u = r && this.input.charCodeAt(this.pos) === 48, f = this.pos, d = 0, v = 0, g = 0, o = e ?? 1 / 0; g < o; ++g, ++this.pos) {
|
|
2893
|
-
var w = this.input.charCodeAt(this.pos),
|
|
2893
|
+
var w = this.input.charCodeAt(this.pos), _ = void 0;
|
|
2894
2894
|
if (a && w === 95) {
|
|
2895
2895
|
u && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), v === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), g === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), v = w;
|
|
2896
2896
|
continue;
|
|
2897
2897
|
}
|
|
2898
|
-
if (w >= 97 ?
|
|
2898
|
+
if (w >= 97 ? _ = w - 97 + 10 : w >= 65 ? _ = w - 65 + 10 : w >= 48 && w <= 57 ? _ = w - 48 : _ = 1 / 0, _ >= t)
|
|
2899
2899
|
break;
|
|
2900
|
-
v = w, d = d * t +
|
|
2900
|
+
v = w, d = d * t + _;
|
|
2901
2901
|
}
|
|
2902
2902
|
return a && v === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === f || e != null && this.pos - f !== e ? null : d;
|
|
2903
2903
|
};
|
|
@@ -3098,8 +3098,8 @@ D.readWord = function() {
|
|
|
3098
3098
|
return this.keywords.test(t) && (e = kt[t]), this.finishToken(e, t);
|
|
3099
3099
|
};
|
|
3100
3100
|
var bi = "8.15.0";
|
|
3101
|
-
|
|
3102
|
-
Parser:
|
|
3101
|
+
J.acorn = {
|
|
3102
|
+
Parser: J,
|
|
3103
3103
|
version: bi,
|
|
3104
3104
|
defaultOptions: Kt,
|
|
3105
3105
|
Position: At,
|
|
@@ -3109,32 +3109,32 @@ K.acorn = {
|
|
|
3109
3109
|
TokenType: O,
|
|
3110
3110
|
tokTypes: h,
|
|
3111
3111
|
keywordTypes: kt,
|
|
3112
|
-
TokContext:
|
|
3112
|
+
TokContext: Z,
|
|
3113
3113
|
tokContexts: q,
|
|
3114
3114
|
isIdentifierChar: dt,
|
|
3115
3115
|
isIdentifierStart: pt,
|
|
3116
3116
|
Token: ie,
|
|
3117
3117
|
isNewLine: Tt,
|
|
3118
|
-
lineBreak:
|
|
3118
|
+
lineBreak: tt,
|
|
3119
3119
|
lineBreakG: qe,
|
|
3120
3120
|
nonASCIIwhitespace: ye
|
|
3121
3121
|
};
|
|
3122
3122
|
function ds(t, e) {
|
|
3123
|
-
return
|
|
3123
|
+
return J.parse(t, e);
|
|
3124
3124
|
}
|
|
3125
3125
|
function ms(t, e, r) {
|
|
3126
|
-
return
|
|
3126
|
+
return J.parseExpressionAt(t, e, r);
|
|
3127
3127
|
}
|
|
3128
3128
|
function ys(t, e) {
|
|
3129
|
-
return
|
|
3129
|
+
return J.tokenizer(t, e);
|
|
3130
3130
|
}
|
|
3131
3131
|
const xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3132
3132
|
__proto__: null,
|
|
3133
3133
|
Node: jt,
|
|
3134
|
-
Parser:
|
|
3134
|
+
Parser: J,
|
|
3135
3135
|
Position: At,
|
|
3136
3136
|
SourceLocation: Ft,
|
|
3137
|
-
TokContext:
|
|
3137
|
+
TokContext: Z,
|
|
3138
3138
|
Token: ie,
|
|
3139
3139
|
TokenType: O,
|
|
3140
3140
|
defaultOptions: Kt,
|
|
@@ -3143,7 +3143,7 @@ const xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3143
3143
|
isIdentifierStart: pt,
|
|
3144
3144
|
isNewLine: Tt,
|
|
3145
3145
|
keywordTypes: kt,
|
|
3146
|
-
lineBreak:
|
|
3146
|
+
lineBreak: tt,
|
|
3147
3147
|
lineBreakG: qe,
|
|
3148
3148
|
nonASCIIwhitespace: ye,
|
|
3149
3149
|
parse: ds,
|
|
@@ -3218,7 +3218,7 @@ var vs = /* @__PURE__ */ new WeakMap();
|
|
|
3218
3218
|
function gs(t) {
|
|
3219
3219
|
var e = vs.get(t.Parser.acorn || t);
|
|
3220
3220
|
if (!e) {
|
|
3221
|
-
var r = { assert: nt(0, { startsExpr: at }), asserts: nt(0, { startsExpr: at }), global: nt(0, { startsExpr: at }), keyof: nt(0, { startsExpr: at }), readonly: nt(0, { startsExpr: at }), unique: nt(0, { startsExpr: at }), abstract: nt(0, { startsExpr: at }), declare: nt(0, { startsExpr: at }), enum: nt(0, { startsExpr: at }), module: nt(0, { startsExpr: at }), namespace: nt(0, { startsExpr: at }), interface: nt(0, { startsExpr: at }), type: nt(0, { startsExpr: at }) }, a = { at: new O("@"), jsxName: new O("jsxName"), jsxText: new O("jsxText", { beforeExpr: !0 }), jsxTagStart: new O("jsxTagStart", { startsExpr: !0 }), jsxTagEnd: new O("jsxTagEnd") }, u = { tc_oTag: new
|
|
3221
|
+
var r = { assert: nt(0, { startsExpr: at }), asserts: nt(0, { startsExpr: at }), global: nt(0, { startsExpr: at }), keyof: nt(0, { startsExpr: at }), readonly: nt(0, { startsExpr: at }), unique: nt(0, { startsExpr: at }), abstract: nt(0, { startsExpr: at }), declare: nt(0, { startsExpr: at }), enum: nt(0, { startsExpr: at }), module: nt(0, { startsExpr: at }), namespace: nt(0, { startsExpr: at }), interface: nt(0, { startsExpr: at }), type: nt(0, { startsExpr: at }) }, a = { at: new O("@"), jsxName: new O("jsxName"), jsxText: new O("jsxText", { beforeExpr: !0 }), jsxTagStart: new O("jsxTagStart", { startsExpr: !0 }), jsxTagEnd: new O("jsxTagEnd") }, u = { tc_oTag: new Z("<tag", !1, !1), tc_cTag: new Z("</tag", !1, !1), tc_expr: new Z("<tag>...</tag>", !0, !0) }, f = new RegExp("^(?:" + Object.keys(r).join("|") + ")$");
|
|
3222
3222
|
a.jsxTagStart.updateContext = function() {
|
|
3223
3223
|
this.context.push(u.tc_expr), this.context.push(u.tc_oTag), this.exprAllowed = !1;
|
|
3224
3224
|
}, a.jsxTagEnd.updateContext = function(d) {
|
|
@@ -3319,17 +3319,17 @@ function Be(t) {
|
|
|
3319
3319
|
function Es(t) {
|
|
3320
3320
|
var e = {}, r = e.dts, a = r !== void 0 && r, u = e.allowSatisfies, f = u !== void 0 && u;
|
|
3321
3321
|
return function(d) {
|
|
3322
|
-
var v = d.acorn || xs, g = gs(v), o = v.tokTypes, w = v.keywordTypes,
|
|
3323
|
-
function Ai(T, it,
|
|
3324
|
-
|
|
3325
|
-
for (var G = it; G <
|
|
3326
|
-
var
|
|
3327
|
-
if (j(
|
|
3322
|
+
var v = d.acorn || xs, g = gs(v), o = v.tokTypes, w = v.keywordTypes, _ = v.isIdentifierStart, M = v.lineBreak, j = v.isNewLine, V = v.tokContexts, H = v.isIdentifierChar, I = g.tokTypes, Q = g.tokContexts, se = g.keywordsRegExp, Ti = g.tokenIsLiteralPropertyName, Pi = g.tokenIsTemplate, Ci = g.tokenIsTSDeclarationStart, U = g.tokenIsIdentifier, qt = g.tokenIsKeywordOrIdentifier, ki = g.tokenIsTSTypeOperator;
|
|
3323
|
+
function Ai(T, it, Y) {
|
|
3324
|
+
Y === void 0 && (Y = T.length);
|
|
3325
|
+
for (var G = it; G < Y; G++) {
|
|
3326
|
+
var B = T.charCodeAt(G);
|
|
3327
|
+
if (j(B)) return G < Y - 1 && B === 13 && T.charCodeAt(G + 1) === 10 ? G + 2 : G + 1;
|
|
3328
3328
|
}
|
|
3329
3329
|
return -1;
|
|
3330
3330
|
}
|
|
3331
|
-
d = (function(T, it,
|
|
3332
|
-
var G =
|
|
3331
|
+
d = (function(T, it, Y) {
|
|
3332
|
+
var G = Y.tokTypes, B = it.tokTypes;
|
|
3333
3333
|
return (function(p) {
|
|
3334
3334
|
function i() {
|
|
3335
3335
|
return p.apply(this, arguments) || this;
|
|
@@ -3340,7 +3340,7 @@ function Es(t) {
|
|
|
3340
3340
|
var c = this.decoratorStack[this.decoratorStack.length - 1];
|
|
3341
3341
|
c.length && (n.decorators = c, this.resetStartLocationFromNode(n, c[0]), this.decoratorStack[this.decoratorStack.length - 1] = []);
|
|
3342
3342
|
}, s.parseDecorators = function(n) {
|
|
3343
|
-
for (var c = this.decoratorStack[this.decoratorStack.length - 1]; this.match(
|
|
3343
|
+
for (var c = this.decoratorStack[this.decoratorStack.length - 1]; this.match(B.at); ) {
|
|
3344
3344
|
var l = this.parseDecorator();
|
|
3345
3345
|
c.push(l);
|
|
3346
3346
|
}
|
|
@@ -3368,8 +3368,8 @@ function Es(t) {
|
|
|
3368
3368
|
return n;
|
|
3369
3369
|
}, i;
|
|
3370
3370
|
})(T);
|
|
3371
|
-
})(d, g, v), d = (function(T, it,
|
|
3372
|
-
var
|
|
3371
|
+
})(d, g, v), d = (function(T, it, Y, G) {
|
|
3372
|
+
var B = T.tokTypes, p = it.tokTypes, i = T.isNewLine, s = T.isIdentifierChar, n = Object.assign({ allowNamespaces: !0, allowNamespacedObjects: !0 }, {});
|
|
3373
3373
|
return (function(c) {
|
|
3374
3374
|
function l() {
|
|
3375
3375
|
return c.apply(this, arguments) || this;
|
|
@@ -3406,7 +3406,7 @@ function Es(t) {
|
|
|
3406
3406
|
if (S === y) break;
|
|
3407
3407
|
S === 38 ? (x += this.input.slice(b, this.pos), x += this.jsx_readEntity(), b = this.pos) : i(S) ? (x += this.input.slice(b, this.pos), x += this.jsx_readNewLine(!1), b = this.pos) : ++this.pos;
|
|
3408
3408
|
}
|
|
3409
|
-
return x += this.input.slice(b, this.pos++), this.finishToken(
|
|
3409
|
+
return x += this.input.slice(b, this.pos++), this.finishToken(B.string, x);
|
|
3410
3410
|
}, m.jsx_readEntity = function() {
|
|
3411
3411
|
var y, x = "", b = 0, S = this.input[this.pos];
|
|
3412
3412
|
S !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
|
|
@@ -3429,24 +3429,24 @@ function Es(t) {
|
|
|
3429
3429
|
return this.type === p.jsxName ? y.name = this.value : this.type.keyword ? y.name = this.type.keyword : this.unexpected(), this.next(), this.finishNode(y, "JSXIdentifier");
|
|
3430
3430
|
}, m.jsx_parseNamespacedName = function() {
|
|
3431
3431
|
var y = this.start, x = this.startLoc, b = this.jsx_parseIdentifier();
|
|
3432
|
-
if (!n.allowNamespaces || !this.eat(
|
|
3432
|
+
if (!n.allowNamespaces || !this.eat(B.colon)) return b;
|
|
3433
3433
|
var S = this.startNodeAt(y, x);
|
|
3434
3434
|
return S.namespace = b, S.name = this.jsx_parseIdentifier(), this.finishNode(S, "JSXNamespacedName");
|
|
3435
3435
|
}, m.jsx_parseElementName = function() {
|
|
3436
3436
|
if (this.type === p.jsxTagEnd) return "";
|
|
3437
3437
|
var y = this.start, x = this.startLoc, b = this.jsx_parseNamespacedName();
|
|
3438
|
-
for (this.type !==
|
|
3438
|
+
for (this.type !== B.dot || b.type !== "JSXNamespacedName" || n.allowNamespacedObjects || this.unexpected(); this.eat(B.dot); ) {
|
|
3439
3439
|
var S = this.startNodeAt(y, x);
|
|
3440
3440
|
S.object = b, S.property = this.jsx_parseIdentifier(), b = this.finishNode(S, "JSXMemberExpression");
|
|
3441
3441
|
}
|
|
3442
3442
|
return b;
|
|
3443
3443
|
}, m.jsx_parseAttributeValue = function() {
|
|
3444
3444
|
switch (this.type) {
|
|
3445
|
-
case
|
|
3445
|
+
case B.braceL:
|
|
3446
3446
|
var y = this.jsx_parseExpressionContainer();
|
|
3447
3447
|
return y.expression.type === "JSXEmptyExpression" && this.raise(y.start, "JSX attributes must only be assigned a non-empty expression"), y;
|
|
3448
3448
|
case p.jsxTagStart:
|
|
3449
|
-
case
|
|
3449
|
+
case B.string:
|
|
3450
3450
|
return this.parseExprAtom();
|
|
3451
3451
|
default:
|
|
3452
3452
|
this.raise(this.start, "JSX value should be either an expression or a quoted JSX text");
|
|
@@ -3456,16 +3456,16 @@ function Es(t) {
|
|
|
3456
3456
|
return this.finishNodeAt(y, "JSXEmptyExpression", this.start, this.startLoc);
|
|
3457
3457
|
}, m.jsx_parseExpressionContainer = function() {
|
|
3458
3458
|
var y = this.startNode();
|
|
3459
|
-
return this.next(), y.expression = this.type ===
|
|
3459
|
+
return this.next(), y.expression = this.type === B.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression(), this.expect(B.braceR), this.finishNode(y, "JSXExpressionContainer");
|
|
3460
3460
|
}, m.jsx_parseAttribute = function() {
|
|
3461
3461
|
var y = this.startNode();
|
|
3462
|
-
return this.eat(
|
|
3462
|
+
return this.eat(B.braceL) ? (this.expect(B.ellipsis), y.argument = this.parseMaybeAssign(), this.expect(B.braceR), this.finishNode(y, "JSXSpreadAttribute")) : (y.name = this.jsx_parseNamespacedName(), y.value = this.eat(B.eq) ? this.jsx_parseAttributeValue() : null, this.finishNode(y, "JSXAttribute"));
|
|
3463
3463
|
}, m.jsx_parseOpeningElementAt = function(y, x) {
|
|
3464
3464
|
var b = this.startNodeAt(y, x);
|
|
3465
3465
|
b.attributes = [];
|
|
3466
3466
|
var S = this.jsx_parseElementName();
|
|
3467
|
-
for (S && (b.name = S); this.type !==
|
|
3468
|
-
return b.selfClosing = this.eat(
|
|
3467
|
+
for (S && (b.name = S); this.type !== B.slash && this.type !== p.jsxTagEnd; ) b.attributes.push(this.jsx_parseAttribute());
|
|
3468
|
+
return b.selfClosing = this.eat(B.slash), this.expect(p.jsxTagEnd), this.finishNode(b, S ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
3469
3469
|
}, m.jsx_parseClosingElementAt = function(y, x) {
|
|
3470
3470
|
var b = this.startNodeAt(y, x), S = this.jsx_parseElementName();
|
|
3471
3471
|
return S && (b.name = S), this.expect(p.jsxTagEnd), this.finishNode(b, S ? "JSXClosingElement" : "JSXClosingFragment");
|
|
@@ -3474,7 +3474,7 @@ function Es(t) {
|
|
|
3474
3474
|
if (!E.selfClosing) {
|
|
3475
3475
|
t: for (; ; ) switch (this.type) {
|
|
3476
3476
|
case p.jsxTagStart:
|
|
3477
|
-
if (y = this.start, x = this.startLoc, this.next(), this.eat(
|
|
3477
|
+
if (y = this.start, x = this.startLoc, this.next(), this.eat(B.slash)) {
|
|
3478
3478
|
L = this.jsx_parseClosingElementAt(y, x);
|
|
3479
3479
|
break t;
|
|
3480
3480
|
}
|
|
@@ -3483,7 +3483,7 @@ function Es(t) {
|
|
|
3483
3483
|
case p.jsxText:
|
|
3484
3484
|
S.push(this.parseExprAtom());
|
|
3485
3485
|
break;
|
|
3486
|
-
case
|
|
3486
|
+
case B.braceL:
|
|
3487
3487
|
S.push(this.jsx_parseExpressionContainer());
|
|
3488
3488
|
break;
|
|
3489
3489
|
default:
|
|
@@ -3492,7 +3492,7 @@ function Es(t) {
|
|
|
3492
3492
|
Mt(L.name) !== Mt(E.name) && this.raise(L.start, "Expected corresponding JSX closing tag for <" + Mt(E.name) + ">");
|
|
3493
3493
|
}
|
|
3494
3494
|
var C = E.name ? "Element" : "Fragment";
|
|
3495
|
-
return b["opening" + C] = E, b["closing" + C] = L, b.children = S, this.type ===
|
|
3495
|
+
return b["opening" + C] = E, b["closing" + C] = L, b.children = S, this.type === B.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(b, "JSX" + C);
|
|
3496
3496
|
}, m.jsx_parseText = function() {
|
|
3497
3497
|
var y = this.parseLiteral(this.value);
|
|
3498
3498
|
return y.type = "JSXText", y;
|
|
@@ -3500,9 +3500,9 @@ function Es(t) {
|
|
|
3500
3500
|
var y = this.start, x = this.startLoc;
|
|
3501
3501
|
return this.next(), this.jsx_parseElementAt(y, x);
|
|
3502
3502
|
}, l;
|
|
3503
|
-
})(
|
|
3504
|
-
})(v, g, d), d = (function(T, it,
|
|
3505
|
-
var G = it.tokTypes,
|
|
3503
|
+
})(Y);
|
|
3504
|
+
})(v, g, d), d = (function(T, it, Y) {
|
|
3505
|
+
var G = it.tokTypes, B = Y.tokTypes;
|
|
3506
3506
|
return (function(p) {
|
|
3507
3507
|
function i() {
|
|
3508
3508
|
return p.apply(this, arguments) || this;
|
|
@@ -3510,22 +3510,22 @@ function Es(t) {
|
|
|
3510
3510
|
Wt(i, p);
|
|
3511
3511
|
var s = i.prototype;
|
|
3512
3512
|
return s.parseMaybeImportAttributes = function(n) {
|
|
3513
|
-
if (this.type ===
|
|
3513
|
+
if (this.type === B._with || this.type === G.assert) {
|
|
3514
3514
|
this.next();
|
|
3515
3515
|
var c = this.parseImportAttributes();
|
|
3516
3516
|
c && (n.attributes = c);
|
|
3517
3517
|
}
|
|
3518
3518
|
}, s.parseImportAttributes = function() {
|
|
3519
|
-
this.expect(
|
|
3519
|
+
this.expect(B.braceL);
|
|
3520
3520
|
var n = this.parseWithEntries();
|
|
3521
|
-
return this.expect(
|
|
3521
|
+
return this.expect(B.braceR), n;
|
|
3522
3522
|
}, s.parseWithEntries = function() {
|
|
3523
3523
|
var n = [], c = /* @__PURE__ */ new Set();
|
|
3524
3524
|
do {
|
|
3525
|
-
if (this.type ===
|
|
3525
|
+
if (this.type === B.braceR) break;
|
|
3526
3526
|
var l, m = this.startNode();
|
|
3527
|
-
l = this.type ===
|
|
3528
|
-
} while (this.eat(
|
|
3527
|
+
l = this.type === B.string ? this.parseLiteral(this.value) : this.parseIdent(!0), this.next(), m.key = l, c.has(m.key.name) && this.raise(this.pos, "Duplicated key in attributes"), c.add(m.key.name), this.type !== B.string && this.raise(this.pos, "Only string is supported as an attribute value"), m.value = this.parseLiteral(this.value), n.push(this.finishNode(m, "ImportAttribute"));
|
|
3528
|
+
} while (this.eat(B.comma));
|
|
3529
3529
|
return n;
|
|
3530
3530
|
}, i;
|
|
3531
3531
|
})(T);
|
|
@@ -3539,17 +3539,17 @@ function Es(t) {
|
|
|
3539
3539
|
})(c), { allowedModifiers: ["const"], disallowedModifiers: ["in", "out"], errorTemplate: A.InvalidModifierOnTypeParameterPositions }), c;
|
|
3540
3540
|
}
|
|
3541
3541
|
Wt(it, T);
|
|
3542
|
-
var
|
|
3542
|
+
var Y, G, B, p = it.prototype;
|
|
3543
3543
|
return p.getTokenFromCodeInType = function(i) {
|
|
3544
3544
|
return i === 62 || i === 60 ? this.finishOp(o.relational, 1) : T.prototype.getTokenFromCode.call(this, i);
|
|
3545
3545
|
}, p.readToken = function(i) {
|
|
3546
3546
|
if (!this.inType) {
|
|
3547
3547
|
var s = this.curContext();
|
|
3548
|
-
if (s ===
|
|
3549
|
-
if (s ===
|
|
3550
|
-
if (
|
|
3548
|
+
if (s === Q.tc_expr) return this.jsx_readToken();
|
|
3549
|
+
if (s === Q.tc_oTag || s === Q.tc_cTag) {
|
|
3550
|
+
if (_(i)) return this.jsx_readWord();
|
|
3551
3551
|
if (i == 62) return ++this.pos, this.finishToken(I.jsxTagEnd);
|
|
3552
|
-
if ((i === 34 || i === 39) && s ==
|
|
3552
|
+
if ((i === 34 || i === 39) && s == Q.tc_oTag) return this.jsx_readString(i);
|
|
3553
3553
|
}
|
|
3554
3554
|
if (i === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) return ++this.pos, this.finishToken(I.jsxTagStart);
|
|
3555
3555
|
}
|
|
@@ -3631,7 +3631,7 @@ function Es(t) {
|
|
|
3631
3631
|
var n = i + s.length;
|
|
3632
3632
|
if (this.input.slice(i, n) === s) {
|
|
3633
3633
|
var c = this.input.charCodeAt(n);
|
|
3634
|
-
return !(
|
|
3634
|
+
return !(H(c) || (64512 & c) == 55296);
|
|
3635
3635
|
}
|
|
3636
3636
|
return !1;
|
|
3637
3637
|
}, p.isAbstractConstructorSignature = function() {
|
|
@@ -4178,10 +4178,10 @@ function Es(t) {
|
|
|
4178
4178
|
s[m] = n[m];
|
|
4179
4179
|
}
|
|
4180
4180
|
}, p.tsParseModifiers = function(i) {
|
|
4181
|
-
for (var s = this, n = i.modified, c = i.allowedModifiers, l = i.disallowedModifiers, m = i.stopOnStartOfClassStaticBlock, y = i.errorTemplate, x = y === void 0 ? A.InvalidModifierOnTypeMember : y, b = {}, S = function(
|
|
4182
|
-
|
|
4183
|
-
}, E = function(
|
|
4184
|
-
(n[
|
|
4181
|
+
for (var s = this, n = i.modified, c = i.allowedModifiers, l = i.disallowedModifiers, m = i.stopOnStartOfClassStaticBlock, y = i.errorTemplate, x = y === void 0 ? A.InvalidModifierOnTypeMember : y, b = {}, S = function(W, z, K, $) {
|
|
4182
|
+
z === K && n[$] && s.raise(W.column, A.InvalidModifiersOrder({ orderedModifiers: [K, $] }));
|
|
4183
|
+
}, E = function(W, z, K, $) {
|
|
4184
|
+
(n[K] && z === $ || n[$] && z === K) && s.raise(W.column, A.IncompatibleModifiers({ modifiers: [K, $] }));
|
|
4185
4185
|
}; ; ) {
|
|
4186
4186
|
var L = this.startLoc, C = this.tsParseModifier(c.concat(l ?? []), m);
|
|
4187
4187
|
if (!C) break;
|
|
@@ -4494,7 +4494,7 @@ function Es(t) {
|
|
|
4494
4494
|
if (this.type === I.at) return this.parseDecorators(), this.parseExprAtom();
|
|
4495
4495
|
if (U(this.type)) {
|
|
4496
4496
|
var c = this.potentialArrowAt === this.start, l = this.start, m = this.startLoc, y = this.containsEsc, x = this.parseIdent(!1);
|
|
4497
|
-
if (this.options.ecmaVersion >= 8 && !y && x.name === "async" && !this.canInsertSemicolon() && this.eat(o._function)) return this.overrideContext(
|
|
4497
|
+
if (this.options.ecmaVersion >= 8 && !y && x.name === "async" && !this.canInsertSemicolon() && this.eat(o._function)) return this.overrideContext(V.f_expr), this.parseFunction(this.startNodeAt(l, m), 0, !1, !0, s);
|
|
4498
4498
|
if (c && !this.canInsertSemicolon()) {
|
|
4499
4499
|
if (this.eat(o.arrow)) return this.parseArrowExpression(this.startNodeAt(l, m), [x], !1, s);
|
|
4500
4500
|
if (this.options.ecmaVersion >= 8 && x.name === "async" && this.type === o.name && !y && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) return x = this.parseIdent(!1), !this.canInsertSemicolon() && this.eat(o.arrow) || this.unexpected(), this.parseArrowExpression(this.startNodeAt(l, m), [x], !0, s);
|
|
@@ -4620,12 +4620,12 @@ function Es(t) {
|
|
|
4620
4620
|
var C = s.tsTryParseIndexSignature(l);
|
|
4621
4621
|
if (C) return l.abstract && s.raise(l.start, A.IndexSignatureHasAbstract), l.accessibility && s.raise(l.start, A.IndexSignatureHasAccessibility({ modifier: l.accessibility })), l.declare && s.raise(l.start, A.IndexSignatureHasDeclare), l.override && s.raise(l.start, A.IndexSignatureHasOverride), C;
|
|
4622
4622
|
if (!s.inAbstractClass && l.abstract && s.raise(l.start, A.NonAbstractClassHasAbstractMethod), l.override && i && s.raise(l.start, A.OverrideNotInSubClass), l.static = n, n && (s.isClassElementNameStart() || s.type === o.star || (m = "static")), !m && c >= 8 && s.eatContextual("async") && (!s.isClassElementNameStart() && s.type !== o.star || s.canInsertSemicolon() ? m = "async" : x = !0), !m && (c >= 9 || !x) && s.eat(o.star) && (y = !0), !m && !x && !y) {
|
|
4623
|
-
var
|
|
4624
|
-
(s.eatContextual("get") || s.eatContextual("set")) && (s.isClassElementNameStart() ? b =
|
|
4623
|
+
var W = s.value;
|
|
4624
|
+
(s.eatContextual("get") || s.eatContextual("set")) && (s.isClassElementNameStart() ? b = W : m = W);
|
|
4625
4625
|
}
|
|
4626
4626
|
if (m ? (l.computed = !1, l.key = s.startNodeAt(s.lastTokStart, s.lastTokStartLoc), l.key.name = m, s.finishNode(l.key, "Identifier")) : s.parseClassElementName(l), s.parsePostMemberNameModifiers(l), s.isClassMethod() || c < 13 || s.type === o.parenL || b !== "method" || y || x) {
|
|
4627
|
-
var
|
|
4628
|
-
|
|
4627
|
+
var z = !l.static && Ve(l, "constructor"), K = z && i;
|
|
4628
|
+
z && b !== "method" && s.raise(l.key.start, "Constructor can't have get/set modifier"), l.kind = z ? "constructor" : b, s.parseClassMethod(l, y, x, K);
|
|
4629
4629
|
} else s.parseClassField(l);
|
|
4630
4630
|
return l;
|
|
4631
4631
|
}
|
|
@@ -4665,28 +4665,28 @@ function Es(t) {
|
|
|
4665
4665
|
}
|
|
4666
4666
|
return c && this.checkExpressionErrors(s, !0), l > -1 && (s.parenthesizedAssign = l), m > -1 && (s.trailingComma = m), S;
|
|
4667
4667
|
}, p.parseMaybeAssign = function(i, s, n) {
|
|
4668
|
-
var c, l, m, y, x, b, S, E, L, C,
|
|
4668
|
+
var c, l, m, y, x, b, S, E, L, C, W, z = this;
|
|
4669
4669
|
if (this.matchJsx("jsxTagStart") || this.tsMatchLeftRelational()) {
|
|
4670
4670
|
if (E = this.cloneCurLookaheadState(), !(L = this.tryParse(function() {
|
|
4671
|
-
return
|
|
4671
|
+
return z.parseMaybeAssignOrigin(i, s, n);
|
|
4672
4672
|
}, E)).error) return L.node;
|
|
4673
|
-
var
|
|
4674
|
-
$ === g.tokContexts.tc_oTag &&
|
|
4673
|
+
var K = this.context, $ = K[K.length - 1];
|
|
4674
|
+
$ === g.tokContexts.tc_oTag && K[K.length - 2] === g.tokContexts.tc_expr ? (K.pop(), K.pop()) : $ !== g.tokContexts.tc_oTag && $ !== g.tokContexts.tc_expr || K.pop();
|
|
4675
4675
|
}
|
|
4676
4676
|
if (!((c = L) != null && c.error || this.tsMatchLeftRelational())) return this.parseMaybeAssignOrigin(i, s, n);
|
|
4677
4677
|
E && !this.compareLookaheadState(E, this.getCurLookaheadState()) || (E = this.cloneCurLookaheadState());
|
|
4678
4678
|
var rt = this.tryParse(function(vt) {
|
|
4679
|
-
var
|
|
4680
|
-
|
|
4681
|
-
var gt =
|
|
4682
|
-
return (gt.type !== "ArrowFunctionExpression" || (
|
|
4679
|
+
var Nt, _t;
|
|
4680
|
+
W = z.tsParseTypeParameters();
|
|
4681
|
+
var gt = z.parseMaybeAssignOrigin(i, s, n);
|
|
4682
|
+
return (gt.type !== "ArrowFunctionExpression" || (Nt = gt.extra) != null && Nt.parenthesized) && vt(), ((_t = W) == null ? void 0 : _t.params.length) !== 0 && z.resetStartLocationFromNode(gt, W), gt.typeParameters = W, gt;
|
|
4683
4683
|
}, E);
|
|
4684
|
-
if (!rt.error && !rt.aborted) return
|
|
4684
|
+
if (!rt.error && !rt.aborted) return W && this.reportReservedArrowTypeParam(W), rt.node;
|
|
4685
4685
|
if (!L && (Fe(!0), !(C = this.tryParse(function() {
|
|
4686
|
-
return
|
|
4686
|
+
return z.parseMaybeAssignOrigin(i, s, n);
|
|
4687
4687
|
}, E)).error)) return C.node;
|
|
4688
4688
|
if ((l = L) != null && l.node) return this.setLookaheadState(L.failState), L.node;
|
|
4689
|
-
if (rt.node) return this.setLookaheadState(rt.failState),
|
|
4689
|
+
if (rt.node) return this.setLookaheadState(rt.failState), W && this.reportReservedArrowTypeParam(W), rt.node;
|
|
4690
4690
|
if ((m = C) != null && m.node) return this.setLookaheadState(C.failState), C.node;
|
|
4691
4691
|
throw (y = L) != null && y.thrown ? L.error : rt.thrown ? rt.error : (x = C) != null && x.thrown ? C.error : ((b = L) == null ? void 0 : b.error) || rt.error || ((S = C) == null ? void 0 : S.error);
|
|
4692
4692
|
}, p.parseAssignableListItem = function(i) {
|
|
@@ -4812,7 +4812,7 @@ function Es(t) {
|
|
|
4812
4812
|
if (this.options.ecmaVersion >= 6) {
|
|
4813
4813
|
var y = this.maybeInArrowParameters;
|
|
4814
4814
|
this.maybeInArrowParameters = !0, this.next();
|
|
4815
|
-
var x, b = this.start, S = this.startLoc, E = [], L = !0, C = !1,
|
|
4815
|
+
var x, b = this.start, S = this.startLoc, E = [], L = !0, C = !1, W = new Ot(), z = this.yieldPos, K = this.awaitPos;
|
|
4816
4816
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR; ) {
|
|
4817
4817
|
if (L ? L = !1 : this.expect(o.comma), m && this.afterTrailingComma(o.parenR, !0)) {
|
|
4818
4818
|
C = !0;
|
|
@@ -4822,11 +4822,11 @@ function Es(t) {
|
|
|
4822
4822
|
x = this.start, E.push(this.parseParenItem(this.parseRestBinding())), this.type === o.comma && this.raise(this.start, "Comma is not permitted after the rest element");
|
|
4823
4823
|
break;
|
|
4824
4824
|
}
|
|
4825
|
-
E.push(this.parseMaybeAssign(s,
|
|
4825
|
+
E.push(this.parseMaybeAssign(s, W, this.parseParenItem));
|
|
4826
4826
|
}
|
|
4827
4827
|
var $ = this.lastTokEnd, rt = this.lastTokEndLoc;
|
|
4828
|
-
if (this.expect(o.parenR), this.maybeInArrowParameters = y, i && this.shouldParseArrow(E) && this.eat(o.arrow)) return this.checkPatternErrors(
|
|
4829
|
-
E.length && !C || this.unexpected(this.lastTokStart), x && this.unexpected(x), this.checkExpressionErrors(
|
|
4828
|
+
if (this.expect(o.parenR), this.maybeInArrowParameters = y, i && this.shouldParseArrow(E) && this.eat(o.arrow)) return this.checkPatternErrors(W, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = z, this.awaitPos = K, this.parseParenArrowList(c, l, E, s);
|
|
4829
|
+
E.length && !C || this.unexpected(this.lastTokStart), x && this.unexpected(x), this.checkExpressionErrors(W, !0), this.yieldPos = z || this.yieldPos, this.awaitPos = K || this.awaitPos, E.length > 1 ? ((n = this.startNodeAt(b, S)).expressions = E, this.finishNodeAt(n, "SequenceExpression", $, rt)) : n = E[0];
|
|
4830
4830
|
} else n = this.parseParenExpression();
|
|
4831
4831
|
if (this.options.preserveParens) {
|
|
4832
4832
|
var vt = this.startNodeAt(c, l);
|
|
@@ -4892,27 +4892,27 @@ function Es(t) {
|
|
|
4892
4892
|
});
|
|
4893
4893
|
if (L && this.unexpected(L), C) return C.type === "TSInstantiationExpression" && (this.match(o.dot) || this.match(o.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start, A.InvalidPropertyAccessAfterInstantiationExpression), i = C;
|
|
4894
4894
|
}
|
|
4895
|
-
var
|
|
4896
|
-
c &&
|
|
4897
|
-
var
|
|
4898
|
-
if (
|
|
4895
|
+
var W = this.options.ecmaVersion >= 11, z = W && this.eat(o.questionDot);
|
|
4896
|
+
c && z && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
4897
|
+
var K = this.eat(o.bracketL);
|
|
4898
|
+
if (K || z && this.type !== o.parenL && this.type !== o.backQuote || this.eat(o.dot)) {
|
|
4899
4899
|
var $ = this.startNodeAt(s, n);
|
|
4900
|
-
$.object = i,
|
|
4900
|
+
$.object = i, K ? ($.property = this.parseExpression(), this.expect(o.bracketR)) : $.property = this.type === o.privateId && i.type !== "Super" ? this.parsePrivateIdent() : this.parseIdent(this.options.allowReserved !== "never"), $.computed = !!K, W && ($.optional = z), i = this.finishNode($, "MemberExpression");
|
|
4901
4901
|
} else if (!c && this.eat(o.parenL)) {
|
|
4902
4902
|
var rt = this.maybeInArrowParameters;
|
|
4903
4903
|
this.maybeInArrowParameters = !0;
|
|
4904
|
-
var vt = new Ot(),
|
|
4904
|
+
var vt = new Ot(), Nt = this.yieldPos, _t = this.awaitPos, gt = this.awaitIdentPos;
|
|
4905
4905
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
4906
4906
|
var Pe = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, vt);
|
|
4907
|
-
if (l && !
|
|
4907
|
+
if (l && !z && this.shouldParseAsyncArrow()) this.checkPatternErrors(vt, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = Nt, this.awaitPos = _t, this.awaitIdentPos = gt, i = this.parseSubscriptAsyncArrow(s, n, Pe, y);
|
|
4908
4908
|
else {
|
|
4909
|
-
this.checkExpressionErrors(vt, !0), this.yieldPos =
|
|
4909
|
+
this.checkExpressionErrors(vt, !0), this.yieldPos = Nt || this.yieldPos, this.awaitPos = _t || this.awaitPos, this.awaitIdentPos = gt || this.awaitIdentPos;
|
|
4910
4910
|
var Ht = this.startNodeAt(s, n);
|
|
4911
|
-
Ht.callee = i, Ht.arguments = Pe,
|
|
4911
|
+
Ht.callee = i, Ht.arguments = Pe, W && (Ht.optional = z), i = this.finishNode(Ht, "CallExpression");
|
|
4912
4912
|
}
|
|
4913
4913
|
this.maybeInArrowParameters = rt;
|
|
4914
4914
|
} else if (this.type === o.backQuote) {
|
|
4915
|
-
(
|
|
4915
|
+
(z || b) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
4916
4916
|
var re = this.startNodeAt(s, n);
|
|
4917
4917
|
re.tag = i, re.quasi = this.parseTemplate({ isTagged: !0 }), i = this.finishNode(re, "TaggedTemplateExpression");
|
|
4918
4918
|
}
|
|
@@ -5008,10 +5008,10 @@ function Es(t) {
|
|
|
5008
5008
|
var s = this.type;
|
|
5009
5009
|
if (s == o.braceL) {
|
|
5010
5010
|
var n = this.curContext();
|
|
5011
|
-
n ==
|
|
5011
|
+
n == Q.tc_oTag ? this.context.push(V.b_expr) : n == Q.tc_expr ? this.context.push(V.b_tmpl) : T.prototype.updateContext.call(this, i), this.exprAllowed = !0;
|
|
5012
5012
|
} else {
|
|
5013
5013
|
if (s !== o.slash || i !== I.jsxTagStart) return T.prototype.updateContext.call(this, i);
|
|
5014
|
-
this.context.length -= 2, this.context.push(
|
|
5014
|
+
this.context.length -= 2, this.context.push(Q.tc_cTag), this.exprAllowed = !1;
|
|
5015
5015
|
}
|
|
5016
5016
|
}, p.jsx_parseOpeningElementAt = function(i, s) {
|
|
5017
5017
|
var n = this, c = this.startNodeAt(i, s), l = this.jsx_parseElementName();
|
|
@@ -5056,16 +5056,16 @@ function Es(t) {
|
|
|
5056
5056
|
}
|
|
5057
5057
|
T.prototype.checkLocalExport.call(this, i);
|
|
5058
5058
|
}
|
|
5059
|
-
},
|
|
5059
|
+
}, Y = it, B = [{ key: "acornTypeScript", get: function() {
|
|
5060
5060
|
return g;
|
|
5061
5061
|
} }], (G = [{ key: "acornTypeScript", get: function() {
|
|
5062
5062
|
return g;
|
|
5063
|
-
} }]) && Oe(
|
|
5063
|
+
} }]) && Oe(Y.prototype, G), B && Oe(Y, B), Object.defineProperty(Y, "prototype", { writable: !1 }), it;
|
|
5064
5064
|
})(d);
|
|
5065
5065
|
return wi;
|
|
5066
5066
|
};
|
|
5067
5067
|
}
|
|
5068
|
-
const Is = ["createObject", "dropObject", "removeRecords", "upsertRecords"],
|
|
5068
|
+
const Is = ["createObject", "dropObject", "removeRecords", "upsertRecords"], Ns = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], Dt = Ni(Ei);
|
|
5069
5069
|
async function Ms() {
|
|
5070
5070
|
try {
|
|
5071
5071
|
console.info("🚀 Building configuration...");
|
|
@@ -5088,11 +5088,11 @@ async function Ds(t) {
|
|
|
5088
5088
|
try {
|
|
5089
5089
|
const w = await R.stat(o);
|
|
5090
5090
|
if (w.isDirectory()) {
|
|
5091
|
-
const
|
|
5092
|
-
d.push(M), await r(o,
|
|
5091
|
+
const _ = await R.readdir(o), M = { childCount: _.length, name: g, typeId: "folder" };
|
|
5092
|
+
d.push(M), await r(o, _);
|
|
5093
5093
|
} else {
|
|
5094
|
-
const
|
|
5095
|
-
d.push(
|
|
5094
|
+
const _ = { id: Ii(), lastModifiedAt: w.mtimeMs, name: g, size: w.size, typeId: "object" };
|
|
5095
|
+
d.push(_);
|
|
5096
5096
|
}
|
|
5097
5097
|
} catch (w) {
|
|
5098
5098
|
throw new Error(`Unable to get information for '${g}' in 'buildPublicDirectoryIndex'. ${String(w)}`);
|
|
@@ -5114,29 +5114,36 @@ async function Vs() {
|
|
|
5114
5114
|
let t = function(j) {
|
|
5115
5115
|
switch (j.type) {
|
|
5116
5116
|
case "FunctionDeclaration": {
|
|
5117
|
-
const
|
|
5118
|
-
|
|
5117
|
+
const V = j;
|
|
5118
|
+
V.id?.name != null && d.add(V.id.name);
|
|
5119
|
+
break;
|
|
5120
|
+
}
|
|
5121
|
+
case "MethodDefinition": {
|
|
5122
|
+
const V = j;
|
|
5123
|
+
console.log(1111, V);
|
|
5124
|
+
const H = V.key?.name, I = j.key?.type === "PrivateIdentifier";
|
|
5125
|
+
H && !I && !(H === "constructor") && d.add(H);
|
|
5119
5126
|
break;
|
|
5120
5127
|
}
|
|
5121
5128
|
}
|
|
5122
|
-
for (const
|
|
5123
|
-
if (
|
|
5124
|
-
const
|
|
5125
|
-
Array.isArray(
|
|
5129
|
+
for (const V in j) {
|
|
5130
|
+
if (V === "loc" || V === "range" || V === "start" || V === "end" || V === "comments") continue;
|
|
5131
|
+
const H = j[V];
|
|
5132
|
+
Array.isArray(H) ? H.forEach(t) : H && typeof H == "object" && typeof H.type == "string" && t(H);
|
|
5126
5133
|
}
|
|
5127
5134
|
};
|
|
5128
5135
|
console.info("🚀 Building connector configuration...");
|
|
5129
|
-
const e = JSON.parse(await R.readFile("package.json", "utf8")), r = JSON.parse(await R.readFile("config.json", "utf8")), a = await R.readFile("src/index.ts", "utf8"), f =
|
|
5136
|
+
const e = JSON.parse(await R.readFile("package.json", "utf8")), r = JSON.parse(await R.readFile("config.json", "utf8")), a = await R.readFile("src/index.ts", "utf8"), f = J.extend(Es()).parse(a, { ecmaVersion: "latest", sourceType: "module", locations: !0 }), d = /* @__PURE__ */ new Set();
|
|
5130
5137
|
t(f), console.log(`Extracted ${d.size} functions:`, Array.from(d));
|
|
5131
5138
|
let v = !1, g = !1;
|
|
5132
|
-
const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, w = [...a.matchAll(o)].filter((j) => j[1] == null && j[2] !== "constructor"),
|
|
5139
|
+
const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, w = [...a.matchAll(o)].filter((j) => j[1] == null && j[2] !== "constructor"), _ = [];
|
|
5133
5140
|
for (const j of w) {
|
|
5134
|
-
const
|
|
5135
|
-
|
|
5141
|
+
const V = j[2];
|
|
5142
|
+
_.push(V), Is.includes(V) && (v = !0), Ns.includes(V) && (g = !0);
|
|
5136
5143
|
}
|
|
5137
|
-
|
|
5144
|
+
_.length > 0 ? console.info(`ℹ️ Implements ${_.length} operations.`) : console.warn("⚠️ Implements no operations.");
|
|
5138
5145
|
let M;
|
|
5139
|
-
g && v ? M = "bidirectional" : g ? M = "source" : v ? M = "destination" : M = "unknown", M === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports ${M} usage.`), e.name != null && (r.id = e.name), r.operations =
|
|
5146
|
+
g && v ? M = "bidirectional" : g ? M = "source" : v ? M = "destination" : M = "unknown", M === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports ${M} usage.`), e.name != null && (r.id = e.name), r.operations = _, r.usageId = M, e.version != null && (r.version = e.version), await R.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8"), console.info("✅ Connector configuration built.");
|
|
5140
5147
|
} catch (t) {
|
|
5141
5148
|
console.error("❌ Error building connector configuration.", t);
|
|
5142
5149
|
}
|
|
@@ -5195,9 +5202,9 @@ async function Hs() {
|
|
|
5195
5202
|
const r = JSON.parse(await R.readFile("./dependency-check-reports/dependency-check-report.json", "utf-8")), a = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
|
|
5196
5203
|
for (const j of r.dependencies)
|
|
5197
5204
|
if (j.vulnerabilities != null)
|
|
5198
|
-
for (const
|
|
5199
|
-
const
|
|
5200
|
-
|
|
5205
|
+
for (const V of j.vulnerabilities) {
|
|
5206
|
+
const H = V.severity?.toLowerCase() ?? "unknown";
|
|
5207
|
+
H in a ? a[H]++ : a.unknown++;
|
|
5201
5208
|
}
|
|
5202
5209
|
const u = {
|
|
5203
5210
|
critical: { color: "D32F2F", label: "critical" },
|
|
@@ -5206,18 +5213,18 @@ async function Hs() {
|
|
|
5206
5213
|
low: { color: "6D8C31", label: "low" },
|
|
5207
5214
|
unknown: { color: "616161", label: "unknown" }
|
|
5208
5215
|
}, f = JSON.parse(await R.readFile("config.json", "utf8")), d = [];
|
|
5209
|
-
if (Object.values(a).reduce((j,
|
|
5216
|
+
if (Object.values(a).reduce((j, V) => j + V, 0) === 0)
|
|
5210
5217
|
console.info("✅ No vulnerabilities found."), d.push(`[](https://data-positioning.github.io/${f.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5211
5218
|
else
|
|
5212
|
-
for (const [j,
|
|
5213
|
-
const
|
|
5214
|
-
if (console.warn(`⚠️ ${
|
|
5215
|
-
const I = `https://img.shields.io/badge/OWASP-${
|
|
5219
|
+
for (const [j, V] of Object.entries(a)) {
|
|
5220
|
+
const H = u[j];
|
|
5221
|
+
if (console.warn(`⚠️ ${V} ${H.label} vulnerability(ies) found.`), V === 0) continue;
|
|
5222
|
+
const I = `https://img.shields.io/badge/OWASP-${V}%20${H.label}-${H.color}`;
|
|
5216
5223
|
d.push(`[](https://data-positioning.github.io/${f.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5217
5224
|
}
|
|
5218
5225
|
const g = await R.readFile("./README.md", "utf8"), o = g.indexOf(t), w = g.indexOf(e);
|
|
5219
5226
|
(o === -1 || w === -1) && (console.error("❌ OWASP badge markers not found in README.md."), process.exit(1));
|
|
5220
|
-
const
|
|
5227
|
+
const _ = d.join(" "), M = g.substring(0, o + t.length) + _ + g.substring(w);
|
|
5221
5228
|
await R.writeFile("README.md", M, "utf8"), console.info("✅ OWASP dependency check badge(s) inserted into README.md");
|
|
5222
5229
|
} catch (r) {
|
|
5223
5230
|
console.error("❌ Error updating README with OWASP badges:", r), process.exit(1);
|
|
@@ -5253,11 +5260,11 @@ async function Ks(t, e) {
|
|
|
5253
5260
|
for (const v of d) {
|
|
5254
5261
|
const g = `${u}/${v}`, o = `${f}/${v}`;
|
|
5255
5262
|
if ((await R.stat(g)).isDirectory()) {
|
|
5256
|
-
const
|
|
5257
|
-
await r(g, o,
|
|
5263
|
+
const _ = await R.readdir(g);
|
|
5264
|
+
await r(g, o, _);
|
|
5258
5265
|
} else {
|
|
5259
5266
|
console.info(`⚙️ Uploading '${u}/${v}'...`);
|
|
5260
|
-
const
|
|
5267
|
+
const _ = `wrangler r2 object put "datapos-sample-data-eu/${f}/${v}" --file="${u}/${v}" --jurisdiction=eu --remote`, M = await Dt(_);
|
|
5261
5268
|
if (M.stderr) throw new Error(M.stderr);
|
|
5262
5269
|
}
|
|
5263
5270
|
}
|
|
@@ -5291,9 +5298,9 @@ async function Gs(t) {
|
|
|
5291
5298
|
for (const v of d) {
|
|
5292
5299
|
const g = `${u}/${v.name}`, o = f ? `${f}/${v.name}` : v.name;
|
|
5293
5300
|
if (!v.isDirectory()) {
|
|
5294
|
-
const w = `${t}_${r}/${o}`.replace(/\\/g, "/"),
|
|
5301
|
+
const w = `${t}_${r}/${o}`.replace(/\\/g, "/"), _ = v.name.endsWith(".js") ? "application/javascript" : v.name.endsWith(".css") ? "text/css" : "application/octet-stream";
|
|
5295
5302
|
console.info(`⚙️ Uploading '${o}' → '${w}'...`);
|
|
5296
|
-
const { stderr: M } = await Dt(`wrangler r2 object put "${w}" --file="${g}" --content-type ${
|
|
5303
|
+
const { stderr: M } = await Dt(`wrangler r2 object put "${w}" --file="${g}" --content-type ${_} --jurisdiction=eu --remote`);
|
|
5297
5304
|
if (M) throw new Error(M);
|
|
5298
5305
|
}
|
|
5299
5306
|
}
|