@datapos/datapos-development 0.3.164 → 0.3.165
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 +225 -224
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { exec as Ei } from "node:child_process";
|
|
2
|
-
import { promises as
|
|
2
|
+
import { promises as M } from "node:fs";
|
|
3
3
|
import { nanoid as Ii } from "nanoid";
|
|
4
4
|
import { promisify as _i } from "node:util";
|
|
5
5
|
var Ni = [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 = {
|
|
@@ -144,7 +144,7 @@ function He(t, e, r) {
|
|
|
144
144
|
}
|
|
145
145
|
return -1;
|
|
146
146
|
}
|
|
147
|
-
var ye = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,
|
|
147
|
+
var ye = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, $ = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, We = Object.prototype, Vi = We.hasOwnProperty, Fi = We.toString, wt = Object.hasOwn || (function(t, e) {
|
|
148
148
|
return Vi.call(t, e);
|
|
149
149
|
}), Ee = Array.isArray || (function(t) {
|
|
150
150
|
return Fi.call(t) === "[object Array]";
|
|
@@ -297,7 +297,7 @@ var Vt = 1, Et = 2, ve = 4, Ke = 8, ge = 16, ze = 32, Yt = 64, Je = 128, Pt = 25
|
|
|
297
297
|
function be(t, e) {
|
|
298
298
|
return Et | (t ? ve : 0) | (e ? Ke : 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, W = 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);
|
|
@@ -305,7 +305,7 @@ var Jt = 0, Se = 1, xt = 2, Ge = 3, $e = 4, Xe = 5, K = function(e, r, a) {
|
|
|
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
306
|
`, a - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(Z).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
|
+
W.prototype.parse = function() {
|
|
309
309
|
var e = this.options.program || this.startNode();
|
|
310
310
|
return this.nextToken(), this.parseTopLevel(e);
|
|
311
311
|
};
|
|
@@ -349,38 +349,38 @@ lt.allowNewDotTarget.get = function() {
|
|
|
349
349
|
lt.inClassStaticBlock.get = function() {
|
|
350
350
|
return (this.currentVarScope().flags & Pt) > 0;
|
|
351
351
|
};
|
|
352
|
-
|
|
352
|
+
W.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
|
+
W.parse = function(e, r) {
|
|
359
359
|
return new this(r, e).parse();
|
|
360
360
|
};
|
|
361
|
-
|
|
361
|
+
W.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
|
+
W.tokenizer = function(e, r) {
|
|
366
366
|
return new this(r, e);
|
|
367
367
|
};
|
|
368
|
-
Object.defineProperties(
|
|
369
|
-
var tt =
|
|
368
|
+
Object.defineProperties(W.prototype, lt);
|
|
369
|
+
var tt = W.prototype, qi = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
370
370
|
tt.strictDirective = function(t) {
|
|
371
371
|
if (this.options.ecmaVersion < 5)
|
|
372
372
|
return !1;
|
|
373
373
|
for (; ; ) {
|
|
374
|
-
|
|
374
|
+
$.lastIndex = t, t += $.exec(this.input)[0].length;
|
|
375
375
|
var e = qi.exec(this.input.slice(t));
|
|
376
376
|
if (!e)
|
|
377
377
|
return !1;
|
|
378
378
|
if ((e[1] || e[2]) === "use strict") {
|
|
379
|
-
|
|
380
|
-
var r =
|
|
379
|
+
$.lastIndex = t + e[0].length;
|
|
380
|
+
var r = $.exec(this.input), a = r.index + r[0].length, u = this.input.charAt(a);
|
|
381
381
|
return u === ";" || u === "}" || Z.test(r[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(u) || u === "!" && this.input.charAt(a + 1) === "=");
|
|
382
382
|
}
|
|
383
|
-
t += e[0].length,
|
|
383
|
+
t += e[0].length, $.lastIndex = t, t += $.exec(this.input)[0].length, this.input[t] === ";" && t++;
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
386
|
tt.eat = function(t) {
|
|
@@ -439,7 +439,7 @@ tt.checkYieldAwaitInDefaultParams = function() {
|
|
|
439
439
|
tt.isSimpleAssignTarget = function(t) {
|
|
440
440
|
return t.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(t.expression) : t.type === "Identifier" || t.type === "MemberExpression";
|
|
441
441
|
};
|
|
442
|
-
var A =
|
|
442
|
+
var A = W.prototype;
|
|
443
443
|
A.parseTopLevel = function(t) {
|
|
444
444
|
var e = /* @__PURE__ */ Object.create(null);
|
|
445
445
|
for (t.body || (t.body = []); this.type !== h.eof; ) {
|
|
@@ -457,8 +457,8 @@ var Te = { kind: "loop" }, Hi = { kind: "switch" };
|
|
|
457
457
|
A.isLet = function(t) {
|
|
458
458
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
459
459
|
return !1;
|
|
460
|
-
|
|
461
|
-
var e =
|
|
460
|
+
$.lastIndex = this.pos;
|
|
461
|
+
var e = $.exec(this.input), r = this.pos + e[0].length, a = this.input.charCodeAt(r);
|
|
462
462
|
if (a === 91 || a === 92)
|
|
463
463
|
return !0;
|
|
464
464
|
if (t)
|
|
@@ -479,23 +479,23 @@ A.isLet = function(t) {
|
|
|
479
479
|
A.isAsyncFunction = function() {
|
|
480
480
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
|
|
481
481
|
return !1;
|
|
482
|
-
|
|
483
|
-
var t =
|
|
482
|
+
$.lastIndex = this.pos;
|
|
483
|
+
var t = $.exec(this.input), e = this.pos + t[0].length, r;
|
|
484
484
|
return !Z.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
|
A.isUsingKeyword = function(t, e) {
|
|
487
487
|
if (this.options.ecmaVersion < 17 || !this.isContextual(t ? "await" : "using"))
|
|
488
488
|
return !1;
|
|
489
|
-
|
|
490
|
-
var r =
|
|
489
|
+
$.lastIndex = this.pos;
|
|
490
|
+
var r = $.exec(this.input), a = this.pos + r[0].length;
|
|
491
491
|
if (Z.test(this.input.slice(this.pos, a)))
|
|
492
492
|
return !1;
|
|
493
493
|
if (t) {
|
|
494
494
|
var u = a + 5, f;
|
|
495
495
|
if (this.input.slice(a, u) !== "using" || u === this.input.length || dt(f = this.input.charCodeAt(u)) || f > 55295 && f < 56320)
|
|
496
496
|
return !1;
|
|
497
|
-
|
|
498
|
-
var d =
|
|
497
|
+
$.lastIndex = u;
|
|
498
|
+
var d = $.exec(this.input);
|
|
499
499
|
if (d && Z.test(this.input.slice(u, u + d[0].length)))
|
|
500
500
|
return !1;
|
|
501
501
|
}
|
|
@@ -553,8 +553,8 @@ A.parseStatement = function(t, e, r) {
|
|
|
553
553
|
case h._export:
|
|
554
554
|
case h._import:
|
|
555
555
|
if (this.options.ecmaVersion > 10 && a === h._import) {
|
|
556
|
-
|
|
557
|
-
var d =
|
|
556
|
+
$.lastIndex = this.pos;
|
|
557
|
+
var d = $.exec(this.input), g = this.pos + d[0].length, v = this.input.charCodeAt(g);
|
|
558
558
|
if (v === 40 || v === 46)
|
|
559
559
|
return this.parseExpressionStatement(u, this.parseExpression());
|
|
560
560
|
}
|
|
@@ -570,8 +570,8 @@ A.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
|
|
574
|
-
return a === h.name && _.type === "Identifier" && this.eat(h.colon) ? this.parseLabeledStatement(u,
|
|
573
|
+
var P = this.value, _ = this.parseExpression();
|
|
574
|
+
return a === h.name && _.type === "Identifier" && this.eat(h.colon) ? this.parseLabeledStatement(u, P, _, t) : this.parseExpressionStatement(u, _);
|
|
575
575
|
}
|
|
576
576
|
};
|
|
577
577
|
A.parseBreakContinueStatement = function(t, e) {
|
|
@@ -605,8 +605,8 @@ A.parseForStatement = function(t) {
|
|
|
605
605
|
var v = this.startNode();
|
|
606
606
|
return this.next(), g === "await using" && this.next(), this.parseVar(v, !0, g), this.finishNode(v, "VariableDeclaration"), this.parseForAfterInit(t, v, e);
|
|
607
607
|
}
|
|
608
|
-
var o = this.containsEsc,
|
|
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 && (
|
|
608
|
+
var o = this.containsEsc, P = new te(), _ = this.start, R = e > -1 ? this.parseExprSubscripts(P, "await") : this.parseExpression(!0, P);
|
|
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 && (R.start === _ && !o && R.type === "Identifier" && R.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (t.await = !1)), f && d && this.raise(R.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(R, !1, P), this.checkLValPattern(R), this.parseForIn(t, R)) : (this.checkExpressionErrors(P, !0), e > -1 && this.unexpected(e), this.parseFor(t, R));
|
|
610
610
|
};
|
|
611
611
|
A.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));
|
|
@@ -736,8 +736,8 @@ A.parseClassElement = function(t) {
|
|
|
736
736
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? d = v : a = v);
|
|
737
737
|
}
|
|
738
738
|
if (a ? (r.computed = !1, r.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), r.key.name = a, this.finishNode(r.key, "Identifier")) : this.parseClassElementName(r), e < 13 || this.type === h.parenL || d !== "method" || u || f) {
|
|
739
|
-
var o = !r.static && Gt(r, "constructor"),
|
|
740
|
-
o && d !== "method" && this.raise(r.key.start, "Constructor can't have get/set modifier"), r.kind = o ? "constructor" : d, this.parseClassMethod(r, u, f,
|
|
739
|
+
var o = !r.static && Gt(r, "constructor"), P = o && t;
|
|
740
|
+
o && d !== "method" && this.raise(r.key.start, "Constructor can't have get/set modifier"), r.kind = o ? "constructor" : d, this.parseClassMethod(r, u, f, P);
|
|
741
741
|
} else
|
|
742
742
|
this.parseClassField(r);
|
|
743
743
|
return r;
|
|
@@ -944,7 +944,7 @@ A.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 = W.prototype;
|
|
948
948
|
ct.toAssignable = function(t, e, r) {
|
|
949
949
|
if (this.options.ecmaVersion >= 6 && t)
|
|
950
950
|
switch (t.type) {
|
|
@@ -1116,7 +1116,7 @@ var Y = function(e, r, a, u, f) {
|
|
|
1116
1116
|
f_expr: new Y("function", !0),
|
|
1117
1117
|
f_expr_gen: new Y("function", !0, !1, null, !0),
|
|
1118
1118
|
f_gen: new Y("function", !1, !1, null, !0)
|
|
1119
|
-
}, It =
|
|
1119
|
+
}, It = W.prototype;
|
|
1120
1120
|
It.initialContext = function() {
|
|
1121
1121
|
return [j.b_stat];
|
|
1122
1122
|
};
|
|
@@ -1182,7 +1182,7 @@ 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 N =
|
|
1185
|
+
var N = W.prototype;
|
|
1186
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;
|
|
@@ -1237,8 +1237,8 @@ N.parseMaybeAssign = function(t, e, r) {
|
|
|
1237
1237
|
(this.type === h.parenL || this.type === h.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = t === "await");
|
|
1238
1238
|
var o = this.parseMaybeConditional(t, e);
|
|
1239
1239
|
if (r && (o = r.call(this, o, g, v)), this.type.isAssign) {
|
|
1240
|
-
var
|
|
1241
|
-
return
|
|
1240
|
+
var P = this.startNodeAt(g, v);
|
|
1241
|
+
return P.operator = this.value, this.type === h.eq && (o = this.toAssignable(o, !1, e)), a || (e.parenthesizedAssign = e.trailingComma = e.doubleProto = -1), e.shorthandAssign >= o.start && (e.shorthandAssign = -1), this.type === h.eq ? this.checkLValPattern(o) : this.checkLValSimple(o), P.left = o, this.next(), P.right = this.parseMaybeAssign(t), d > -1 && (e.doubleProto = d), this.finishNode(P, "AssignmentExpression");
|
|
1242
1242
|
} else
|
|
1243
1243
|
a && this.checkExpressionErrors(e, !0);
|
|
1244
1244
|
return u > -1 && (e.parenthesizedAssign = u), f > -1 && (e.trailingComma = f), o;
|
|
@@ -1264,8 +1264,8 @@ N.parseExprOp = function(t, e, r, a, u) {
|
|
|
1264
1264
|
g && (f = h.logicalAND.binop);
|
|
1265
1265
|
var v = this.value;
|
|
1266
1266
|
this.next();
|
|
1267
|
-
var o = this.start,
|
|
1268
|
-
return (d && this.type === h.coalesce || g && (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(
|
|
1267
|
+
var o = this.start, P = this.startLoc, _ = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, u), o, P, f, u), R = this.buildBinary(e, r, t, _, v, d || g);
|
|
1268
|
+
return (d && this.type === h.coalesce || g && (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(R, e, r, a, u);
|
|
1269
1269
|
}
|
|
1270
1270
|
return t;
|
|
1271
1271
|
};
|
|
@@ -1336,17 +1336,17 @@ N.parseSubscript = function(t, e, r, a, u, f, d) {
|
|
|
1336
1336
|
a && v && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
1337
1337
|
var o = this.eat(h.bracketL);
|
|
1338
1338
|
if (o || v && this.type !== h.parenL && this.type !== h.backQuote || this.eat(h.dot)) {
|
|
1339
|
-
var
|
|
1340
|
-
|
|
1339
|
+
var P = this.startNodeAt(e, r);
|
|
1340
|
+
P.object = t, o ? (P.property = this.parseExpression(), this.expect(h.bracketR)) : this.type === h.privateId && t.type !== "Super" ? P.property = this.parsePrivateIdent() : P.property = this.parseIdent(this.options.allowReserved !== "never"), P.computed = !!o, g && (P.optional = v), t = this.finishNode(P, "MemberExpression");
|
|
1341
1341
|
} else if (!a && this.eat(h.parenL)) {
|
|
1342
|
-
var _ = new te(),
|
|
1342
|
+
var _ = new te(), R = this.yieldPos, K = this.awaitPos, z = this.awaitIdentPos;
|
|
1343
1343
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1344
|
-
var
|
|
1344
|
+
var X = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1, _);
|
|
1345
1345
|
if (u && !v && this.shouldParseAsyncArrow())
|
|
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 =
|
|
1347
|
-
this.checkExpressionErrors(_, !0), this.yieldPos =
|
|
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 = R, this.awaitPos = K, this.awaitIdentPos = z, this.parseSubscriptAsyncArrow(e, r, X, d);
|
|
1347
|
+
this.checkExpressionErrors(_, !0), this.yieldPos = R || this.yieldPos, this.awaitPos = K || this.awaitPos, this.awaitIdentPos = z || this.awaitIdentPos;
|
|
1348
1348
|
var I = this.startNodeAt(e, r);
|
|
1349
|
-
I.callee = t, I.arguments =
|
|
1349
|
+
I.callee = t, I.arguments = X, g && (I.optional = v), t = this.finishNode(I, "CallExpression");
|
|
1350
1350
|
} else if (this.type === h.backQuote) {
|
|
1351
1351
|
(v || f) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1352
1352
|
var et = this.startNodeAt(e, r);
|
|
@@ -1384,8 +1384,8 @@ N.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
|
|
1388
|
-
return t && (t.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(_) && (t.parenthesizedAssign =
|
|
1387
|
+
var P = this.start, _ = this.parseParenAndDistinguishExpression(u, e);
|
|
1388
|
+
return t && (t.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(_) && (t.parenthesizedAssign = P), t.parenthesizedBind < 0 && (t.parenthesizedBind = P)), _;
|
|
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:
|
|
@@ -1447,10 +1447,10 @@ 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, g = this.startLoc, v = [], o = !0,
|
|
1450
|
+
var d = this.start, g = this.startLoc, v = [], o = !0, P = !1, _ = new te(), R = this.yieldPos, K = this.awaitPos, z;
|
|
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
|
+
P = !0;
|
|
1454
1454
|
break;
|
|
1455
1455
|
} else if (this.type === h.ellipsis) {
|
|
1456
1456
|
z = this.start, v.push(this.parseParenItem(this.parseRestBinding())), this.type === h.comma && this.raiseRecoverable(
|
|
@@ -1460,10 +1460,10 @@ N.parseParenAndDistinguishExpression = function(t, e) {
|
|
|
1460
1460
|
break;
|
|
1461
1461
|
} else
|
|
1462
1462
|
v.push(this.parseMaybeAssign(!1, _, this.parseParenItem));
|
|
1463
|
-
var
|
|
1463
|
+
var X = this.lastTokEnd, I = this.lastTokEndLoc;
|
|
1464
1464
|
if (this.expect(h.parenR), t && this.shouldParseArrow(v) && this.eat(h.arrow))
|
|
1465
|
-
return this.checkPatternErrors(_, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos =
|
|
1466
|
-
(!v.length ||
|
|
1465
|
+
return this.checkPatternErrors(_, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = R, this.awaitPos = K, this.parseParenArrowList(r, a, v, e);
|
|
1466
|
+
(!v.length || P) && this.unexpected(this.lastTokStart), z && this.unexpected(z), this.checkExpressionErrors(_, !0), this.yieldPos = R || this.yieldPos, this.awaitPos = K || this.awaitPos, v.length > 1 ? (u = this.startNodeAt(d, g), u.expressions = v, this.finishNodeAt(u, "SequenceExpression", X, I)) : u = v[0];
|
|
1467
1467
|
} else
|
|
1468
1468
|
u = this.parseParenExpression();
|
|
1469
1469
|
if (this.options.preserveParens) {
|
|
@@ -1635,7 +1635,7 @@ N.parseAwait = function(t) {
|
|
|
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 = W.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 = W.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 = W.prototype;
|
|
1708
1708
|
Ut.startNode = function() {
|
|
1709
1709
|
return new jt(this, this.start, this.startLoc);
|
|
1710
1710
|
};
|
|
@@ -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
|
|
1766
|
+
var C = W.prototype, Xt = function(e, r) {
|
|
1767
1767
|
this.parent = e, this.base = r || this;
|
|
1768
1768
|
};
|
|
1769
1769
|
Xt.prototype.separatedFrom = function(e) {
|
|
@@ -1827,7 +1827,7 @@ ft.prototype.eatChars = function(e, r) {
|
|
|
1827
1827
|
}
|
|
1828
1828
|
return this.pos = a, !0;
|
|
1829
1829
|
};
|
|
1830
|
-
|
|
1830
|
+
C.validateRegExpFlags = function(t) {
|
|
1831
1831
|
for (var e = t.validFlags, r = t.flags, a = !1, u = !1, f = 0; f < r.length; f++) {
|
|
1832
1832
|
var d = r.charAt(f);
|
|
1833
1833
|
e.indexOf(d) === -1 && this.raise(t.start, "Invalid regular expression flag"), r.indexOf(d, f + 1) > -1 && this.raise(t.start, "Duplicate regular expression flag"), d === "u" && (a = !0), d === "v" && (u = !0);
|
|
@@ -1839,10 +1839,10 @@ function ss(t) {
|
|
|
1839
1839
|
return !0;
|
|
1840
1840
|
return !1;
|
|
1841
1841
|
}
|
|
1842
|
-
|
|
1842
|
+
C.validateRegExpPattern = function(t) {
|
|
1843
1843
|
this.regexp_pattern(t), !t.switchN && this.options.ecmaVersion >= 9 && ss(t.groupNames) && (t.switchN = !0, this.regexp_pattern(t));
|
|
1844
1844
|
};
|
|
1845
|
-
|
|
1845
|
+
C.regexp_pattern = function(t) {
|
|
1846
1846
|
t.pos = 0, t.lastIntValue = 0, t.lastStringValue = "", t.lastAssertionIsQuantifiable = !1, t.numCapturingParens = 0, t.maxBackReference = 0, t.groupNames = /* @__PURE__ */ Object.create(null), t.backReferenceNames.length = 0, t.branchID = null, this.regexp_disjunction(t), t.pos !== t.source.length && (t.eat(
|
|
1847
1847
|
41
|
|
1848
1848
|
/* ) */
|
|
@@ -1858,7 +1858,7 @@ P.regexp_pattern = function(t) {
|
|
|
1858
1858
|
t.groupNames[a] || t.raise("Invalid named capture referenced");
|
|
1859
1859
|
}
|
|
1860
1860
|
};
|
|
1861
|
-
|
|
1861
|
+
C.regexp_disjunction = function(t) {
|
|
1862
1862
|
var e = this.options.ecmaVersion >= 16;
|
|
1863
1863
|
for (e && (t.branchID = new Xt(t.branchID, null)), this.regexp_alternative(t); t.eat(
|
|
1864
1864
|
124
|
|
@@ -1870,14 +1870,14 @@ P.regexp_disjunction = function(t) {
|
|
|
1870
1870
|
/* { */
|
|
1871
1871
|
) && t.raise("Lone quantifier brackets");
|
|
1872
1872
|
};
|
|
1873
|
-
|
|
1873
|
+
C.regexp_alternative = function(t) {
|
|
1874
1874
|
for (; t.pos < t.source.length && this.regexp_eatTerm(t); )
|
|
1875
1875
|
;
|
|
1876
1876
|
};
|
|
1877
|
-
|
|
1877
|
+
C.regexp_eatTerm = function(t) {
|
|
1878
1878
|
return this.regexp_eatAssertion(t) ? (t.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(t) && t.switchU && t.raise("Invalid quantifier"), !0) : (t.switchU ? this.regexp_eatAtom(t) : this.regexp_eatExtendedAtom(t)) ? (this.regexp_eatQuantifier(t), !0) : !1;
|
|
1879
1879
|
};
|
|
1880
|
-
|
|
1880
|
+
C.regexp_eatAssertion = function(t) {
|
|
1881
1881
|
var e = t.pos;
|
|
1882
1882
|
if (t.lastAssertionIsQuantifiable = !1, t.eat(
|
|
1883
1883
|
94
|
|
@@ -1926,13 +1926,13 @@ P.regexp_eatAssertion = function(t) {
|
|
|
1926
1926
|
}
|
|
1927
1927
|
return t.pos = e, !1;
|
|
1928
1928
|
};
|
|
1929
|
-
|
|
1929
|
+
C.regexp_eatQuantifier = function(t, e) {
|
|
1930
1930
|
return e === void 0 && (e = !1), this.regexp_eatQuantifierPrefix(t, e) ? (t.eat(
|
|
1931
1931
|
63
|
|
1932
1932
|
/* ? */
|
|
1933
1933
|
), !0) : !1;
|
|
1934
1934
|
};
|
|
1935
|
-
|
|
1935
|
+
C.regexp_eatQuantifierPrefix = function(t, e) {
|
|
1936
1936
|
return t.eat(
|
|
1937
1937
|
42
|
|
1938
1938
|
/* * */
|
|
@@ -1944,7 +1944,7 @@ P.regexp_eatQuantifierPrefix = function(t, e) {
|
|
|
1944
1944
|
/* ? */
|
|
1945
1945
|
) || this.regexp_eatBracedQuantifier(t, e);
|
|
1946
1946
|
};
|
|
1947
|
-
|
|
1947
|
+
C.regexp_eatBracedQuantifier = function(t, e) {
|
|
1948
1948
|
var r = t.pos;
|
|
1949
1949
|
if (t.eat(
|
|
1950
1950
|
123
|
|
@@ -1963,13 +1963,13 @@ P.regexp_eatBracedQuantifier = function(t, e) {
|
|
|
1963
1963
|
}
|
|
1964
1964
|
return !1;
|
|
1965
1965
|
};
|
|
1966
|
-
|
|
1966
|
+
C.regexp_eatAtom = function(t) {
|
|
1967
1967
|
return this.regexp_eatPatternCharacters(t) || t.eat(
|
|
1968
1968
|
46
|
|
1969
1969
|
/* . */
|
|
1970
1970
|
) || this.regexp_eatReverseSolidusAtomEscape(t) || this.regexp_eatCharacterClass(t) || this.regexp_eatUncapturingGroup(t) || this.regexp_eatCapturingGroup(t);
|
|
1971
1971
|
};
|
|
1972
|
-
|
|
1972
|
+
C.regexp_eatReverseSolidusAtomEscape = function(t) {
|
|
1973
1973
|
var e = t.pos;
|
|
1974
1974
|
if (t.eat(
|
|
1975
1975
|
92
|
|
@@ -1981,7 +1981,7 @@ P.regexp_eatReverseSolidusAtomEscape = function(t) {
|
|
|
1981
1981
|
}
|
|
1982
1982
|
return !1;
|
|
1983
1983
|
};
|
|
1984
|
-
|
|
1984
|
+
C.regexp_eatUncapturingGroup = function(t) {
|
|
1985
1985
|
var e = t.pos;
|
|
1986
1986
|
if (t.eat(
|
|
1987
1987
|
40
|
|
@@ -2027,7 +2027,7 @@ P.regexp_eatUncapturingGroup = function(t) {
|
|
|
2027
2027
|
}
|
|
2028
2028
|
return !1;
|
|
2029
2029
|
};
|
|
2030
|
-
|
|
2030
|
+
C.regexp_eatCapturingGroup = function(t) {
|
|
2031
2031
|
if (t.eat(
|
|
2032
2032
|
40
|
|
2033
2033
|
/* ( */
|
|
@@ -2041,7 +2041,7 @@ P.regexp_eatCapturingGroup = function(t) {
|
|
|
2041
2041
|
}
|
|
2042
2042
|
return !1;
|
|
2043
2043
|
};
|
|
2044
|
-
|
|
2044
|
+
C.regexp_eatModifiers = function(t) {
|
|
2045
2045
|
for (var e = "", r = 0; (r = t.current()) !== -1 && rs(r); )
|
|
2046
2046
|
e += mt(r), t.advance();
|
|
2047
2047
|
return e;
|
|
@@ -2049,32 +2049,32 @@ P.regexp_eatModifiers = function(t) {
|
|
|
2049
2049
|
function rs(t) {
|
|
2050
2050
|
return t === 105 || t === 109 || t === 115;
|
|
2051
2051
|
}
|
|
2052
|
-
|
|
2052
|
+
C.regexp_eatExtendedAtom = function(t) {
|
|
2053
2053
|
return t.eat(
|
|
2054
2054
|
46
|
|
2055
2055
|
/* . */
|
|
2056
2056
|
) || this.regexp_eatReverseSolidusAtomEscape(t) || this.regexp_eatCharacterClass(t) || this.regexp_eatUncapturingGroup(t) || this.regexp_eatCapturingGroup(t) || this.regexp_eatInvalidBracedQuantifier(t) || this.regexp_eatExtendedPatternCharacter(t);
|
|
2057
2057
|
};
|
|
2058
|
-
|
|
2058
|
+
C.regexp_eatInvalidBracedQuantifier = function(t) {
|
|
2059
2059
|
return this.regexp_eatBracedQuantifier(t, !0) && t.raise("Nothing to repeat"), !1;
|
|
2060
2060
|
};
|
|
2061
|
-
|
|
2061
|
+
C.regexp_eatSyntaxCharacter = function(t) {
|
|
2062
2062
|
var e = t.current();
|
|
2063
2063
|
return pi(e) ? (t.lastIntValue = e, t.advance(), !0) : !1;
|
|
2064
2064
|
};
|
|
2065
2065
|
function pi(t) {
|
|
2066
2066
|
return t === 36 || t >= 40 && t <= 43 || t === 46 || t === 63 || t >= 91 && t <= 94 || t >= 123 && t <= 125;
|
|
2067
2067
|
}
|
|
2068
|
-
|
|
2068
|
+
C.regexp_eatPatternCharacters = function(t) {
|
|
2069
2069
|
for (var e = t.pos, r = 0; (r = t.current()) !== -1 && !pi(r); )
|
|
2070
2070
|
t.advance();
|
|
2071
2071
|
return t.pos !== e;
|
|
2072
2072
|
};
|
|
2073
|
-
|
|
2073
|
+
C.regexp_eatExtendedPatternCharacter = function(t) {
|
|
2074
2074
|
var e = t.current();
|
|
2075
2075
|
return e !== -1 && e !== 36 && !(e >= 40 && e <= 43) && e !== 46 && e !== 63 && e !== 91 && e !== 94 && e !== 124 ? (t.advance(), !0) : !1;
|
|
2076
2076
|
};
|
|
2077
|
-
|
|
2077
|
+
C.regexp_groupSpecifier = function(t) {
|
|
2078
2078
|
if (t.eat(
|
|
2079
2079
|
63
|
|
2080
2080
|
/* ? */
|
|
@@ -2092,7 +2092,7 @@ P.regexp_groupSpecifier = function(t) {
|
|
|
2092
2092
|
e ? (r || (t.groupNames[t.lastStringValue] = [])).push(t.branchID) : t.groupNames[t.lastStringValue] = !0;
|
|
2093
2093
|
}
|
|
2094
2094
|
};
|
|
2095
|
-
|
|
2095
|
+
C.regexp_eatGroupName = function(t) {
|
|
2096
2096
|
if (t.lastStringValue = "", t.eat(
|
|
2097
2097
|
60
|
|
2098
2098
|
/* < */
|
|
@@ -2106,7 +2106,7 @@ P.regexp_eatGroupName = function(t) {
|
|
|
2106
2106
|
}
|
|
2107
2107
|
return !1;
|
|
2108
2108
|
};
|
|
2109
|
-
|
|
2109
|
+
C.regexp_eatRegExpIdentifierName = function(t) {
|
|
2110
2110
|
if (t.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(t)) {
|
|
2111
2111
|
for (t.lastStringValue += mt(t.lastIntValue); this.regexp_eatRegExpIdentifierPart(t); )
|
|
2112
2112
|
t.lastStringValue += mt(t.lastIntValue);
|
|
@@ -2114,24 +2114,24 @@ P.regexp_eatRegExpIdentifierName = function(t) {
|
|
|
2114
2114
|
}
|
|
2115
2115
|
return !1;
|
|
2116
2116
|
};
|
|
2117
|
-
|
|
2117
|
+
C.regexp_eatRegExpIdentifierStart = function(t) {
|
|
2118
2118
|
var e = t.pos, r = this.options.ecmaVersion >= 11, a = t.current(r);
|
|
2119
2119
|
return t.advance(r), a === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(t, r) && (a = t.lastIntValue), as(a) ? (t.lastIntValue = a, !0) : (t.pos = e, !1);
|
|
2120
2120
|
};
|
|
2121
2121
|
function as(t) {
|
|
2122
2122
|
return pt(t, !0) || t === 36 || t === 95;
|
|
2123
2123
|
}
|
|
2124
|
-
|
|
2124
|
+
C.regexp_eatRegExpIdentifierPart = function(t) {
|
|
2125
2125
|
var e = t.pos, r = this.options.ecmaVersion >= 11, a = t.current(r);
|
|
2126
2126
|
return t.advance(r), a === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(t, r) && (a = t.lastIntValue), ns(a) ? (t.lastIntValue = a, !0) : (t.pos = e, !1);
|
|
2127
2127
|
};
|
|
2128
2128
|
function ns(t) {
|
|
2129
2129
|
return dt(t, !0) || t === 36 || t === 95 || t === 8204 || t === 8205;
|
|
2130
2130
|
}
|
|
2131
|
-
|
|
2131
|
+
C.regexp_eatAtomEscape = function(t) {
|
|
2132
2132
|
return this.regexp_eatBackReference(t) || this.regexp_eatCharacterClassEscape(t) || this.regexp_eatCharacterEscape(t) || t.switchN && this.regexp_eatKGroupName(t) ? !0 : (t.switchU && (t.current() === 99 && t.raise("Invalid unicode escape"), t.raise("Invalid escape")), !1);
|
|
2133
2133
|
};
|
|
2134
|
-
|
|
2134
|
+
C.regexp_eatBackReference = function(t) {
|
|
2135
2135
|
var e = t.pos;
|
|
2136
2136
|
if (this.regexp_eatDecimalEscape(t)) {
|
|
2137
2137
|
var r = t.lastIntValue;
|
|
@@ -2143,7 +2143,7 @@ P.regexp_eatBackReference = function(t) {
|
|
|
2143
2143
|
}
|
|
2144
2144
|
return !1;
|
|
2145
2145
|
};
|
|
2146
|
-
|
|
2146
|
+
C.regexp_eatKGroupName = function(t) {
|
|
2147
2147
|
if (t.eat(
|
|
2148
2148
|
107
|
|
2149
2149
|
/* k */
|
|
@@ -2154,10 +2154,10 @@ P.regexp_eatKGroupName = function(t) {
|
|
|
2154
2154
|
}
|
|
2155
2155
|
return !1;
|
|
2156
2156
|
};
|
|
2157
|
-
|
|
2157
|
+
C.regexp_eatCharacterEscape = function(t) {
|
|
2158
2158
|
return this.regexp_eatControlEscape(t) || this.regexp_eatCControlLetter(t) || this.regexp_eatZero(t) || this.regexp_eatHexEscapeSequence(t) || this.regexp_eatRegExpUnicodeEscapeSequence(t, !1) || !t.switchU && this.regexp_eatLegacyOctalEscapeSequence(t) || this.regexp_eatIdentityEscape(t);
|
|
2159
2159
|
};
|
|
2160
|
-
|
|
2160
|
+
C.regexp_eatCControlLetter = function(t) {
|
|
2161
2161
|
var e = t.pos;
|
|
2162
2162
|
if (t.eat(
|
|
2163
2163
|
99
|
|
@@ -2169,21 +2169,21 @@ P.regexp_eatCControlLetter = function(t) {
|
|
|
2169
2169
|
}
|
|
2170
2170
|
return !1;
|
|
2171
2171
|
};
|
|
2172
|
-
|
|
2172
|
+
C.regexp_eatZero = function(t) {
|
|
2173
2173
|
return t.current() === 48 && !ee(t.lookahead()) ? (t.lastIntValue = 0, t.advance(), !0) : !1;
|
|
2174
2174
|
};
|
|
2175
|
-
|
|
2175
|
+
C.regexp_eatControlEscape = function(t) {
|
|
2176
2176
|
var e = t.current();
|
|
2177
2177
|
return e === 116 ? (t.lastIntValue = 9, t.advance(), !0) : e === 110 ? (t.lastIntValue = 10, t.advance(), !0) : e === 118 ? (t.lastIntValue = 11, t.advance(), !0) : e === 102 ? (t.lastIntValue = 12, t.advance(), !0) : e === 114 ? (t.lastIntValue = 13, t.advance(), !0) : !1;
|
|
2178
2178
|
};
|
|
2179
|
-
|
|
2179
|
+
C.regexp_eatControlLetter = function(t) {
|
|
2180
2180
|
var e = t.current();
|
|
2181
2181
|
return li(e) ? (t.lastIntValue = e % 32, t.advance(), !0) : !1;
|
|
2182
2182
|
};
|
|
2183
2183
|
function li(t) {
|
|
2184
2184
|
return t >= 65 && t <= 90 || t >= 97 && t <= 122;
|
|
2185
2185
|
}
|
|
2186
|
-
|
|
2186
|
+
C.regexp_eatRegExpUnicodeEscapeSequence = function(t, e) {
|
|
2187
2187
|
e === void 0 && (e = !1);
|
|
2188
2188
|
var r = t.pos, a = e || t.switchU;
|
|
2189
2189
|
if (t.eat(
|
|
@@ -2224,7 +2224,7 @@ P.regexp_eatRegExpUnicodeEscapeSequence = function(t, e) {
|
|
|
2224
2224
|
function os(t) {
|
|
2225
2225
|
return t >= 0 && t <= 1114111;
|
|
2226
2226
|
}
|
|
2227
|
-
|
|
2227
|
+
C.regexp_eatIdentityEscape = function(t) {
|
|
2228
2228
|
if (t.switchU)
|
|
2229
2229
|
return this.regexp_eatSyntaxCharacter(t) ? !0 : t.eat(
|
|
2230
2230
|
47
|
|
@@ -2233,7 +2233,7 @@ P.regexp_eatIdentityEscape = function(t) {
|
|
|
2233
2233
|
var e = t.current();
|
|
2234
2234
|
return e !== 99 && (!t.switchN || e !== 107) ? (t.lastIntValue = e, t.advance(), !0) : !1;
|
|
2235
2235
|
};
|
|
2236
|
-
|
|
2236
|
+
C.regexp_eatDecimalEscape = function(t) {
|
|
2237
2237
|
t.lastIntValue = 0;
|
|
2238
2238
|
var e = t.current();
|
|
2239
2239
|
if (e >= 49 && e <= 57) {
|
|
@@ -2245,7 +2245,7 @@ P.regexp_eatDecimalEscape = function(t) {
|
|
|
2245
2245
|
return !1;
|
|
2246
2246
|
};
|
|
2247
2247
|
var fi = 0, yt = 1, ut = 2;
|
|
2248
|
-
|
|
2248
|
+
C.regexp_eatCharacterClassEscape = function(t) {
|
|
2249
2249
|
var e = t.current();
|
|
2250
2250
|
if (hs(e))
|
|
2251
2251
|
return t.lastIntValue = -1, t.advance(), yt;
|
|
@@ -2268,7 +2268,7 @@ P.regexp_eatCharacterClassEscape = function(t) {
|
|
|
2268
2268
|
function hs(t) {
|
|
2269
2269
|
return t === 100 || t === 68 || t === 115 || t === 83 || t === 119 || t === 87;
|
|
2270
2270
|
}
|
|
2271
|
-
|
|
2271
|
+
C.regexp_eatUnicodePropertyValueExpression = function(t) {
|
|
2272
2272
|
var e = t.pos;
|
|
2273
2273
|
if (this.regexp_eatUnicodePropertyName(t) && t.eat(
|
|
2274
2274
|
61
|
|
@@ -2286,17 +2286,17 @@ P.regexp_eatUnicodePropertyValueExpression = function(t) {
|
|
|
2286
2286
|
}
|
|
2287
2287
|
return fi;
|
|
2288
2288
|
};
|
|
2289
|
-
|
|
2289
|
+
C.regexp_validateUnicodePropertyNameAndValue = function(t, e, r) {
|
|
2290
2290
|
wt(t.unicodeProperties.nonBinary, e) || t.raise("Invalid property name"), t.unicodeProperties.nonBinary[e].test(r) || t.raise("Invalid property value");
|
|
2291
2291
|
};
|
|
2292
|
-
|
|
2292
|
+
C.regexp_validateUnicodePropertyNameOrValue = function(t, e) {
|
|
2293
2293
|
if (t.unicodeProperties.binary.test(e))
|
|
2294
2294
|
return yt;
|
|
2295
2295
|
if (t.switchV && t.unicodeProperties.binaryOfStrings.test(e))
|
|
2296
2296
|
return ut;
|
|
2297
2297
|
t.raise("Invalid property name");
|
|
2298
2298
|
};
|
|
2299
|
-
|
|
2299
|
+
C.regexp_eatUnicodePropertyName = function(t) {
|
|
2300
2300
|
var e = 0;
|
|
2301
2301
|
for (t.lastStringValue = ""; di(e = t.current()); )
|
|
2302
2302
|
t.lastStringValue += mt(e), t.advance();
|
|
@@ -2305,7 +2305,7 @@ P.regexp_eatUnicodePropertyName = function(t) {
|
|
|
2305
2305
|
function di(t) {
|
|
2306
2306
|
return li(t) || t === 95;
|
|
2307
2307
|
}
|
|
2308
|
-
|
|
2308
|
+
C.regexp_eatUnicodePropertyValue = function(t) {
|
|
2309
2309
|
var e = 0;
|
|
2310
2310
|
for (t.lastStringValue = ""; us(e = t.current()); )
|
|
2311
2311
|
t.lastStringValue += mt(e), t.advance();
|
|
@@ -2314,10 +2314,10 @@ P.regexp_eatUnicodePropertyValue = function(t) {
|
|
|
2314
2314
|
function us(t) {
|
|
2315
2315
|
return di(t) || ee(t);
|
|
2316
2316
|
}
|
|
2317
|
-
|
|
2317
|
+
C.regexp_eatLoneUnicodePropertyNameOrValue = function(t) {
|
|
2318
2318
|
return this.regexp_eatUnicodePropertyValue(t);
|
|
2319
2319
|
};
|
|
2320
|
-
|
|
2320
|
+
C.regexp_eatCharacterClass = function(t) {
|
|
2321
2321
|
if (t.eat(
|
|
2322
2322
|
91
|
|
2323
2323
|
/* [ */
|
|
@@ -2333,10 +2333,10 @@ P.regexp_eatCharacterClass = function(t) {
|
|
|
2333
2333
|
}
|
|
2334
2334
|
return !1;
|
|
2335
2335
|
};
|
|
2336
|
-
|
|
2336
|
+
C.regexp_classContents = function(t) {
|
|
2337
2337
|
return t.current() === 93 ? yt : t.switchV ? this.regexp_classSetExpression(t) : (this.regexp_nonEmptyClassRanges(t), yt);
|
|
2338
2338
|
};
|
|
2339
|
-
|
|
2339
|
+
C.regexp_nonEmptyClassRanges = function(t) {
|
|
2340
2340
|
for (; this.regexp_eatClassAtom(t); ) {
|
|
2341
2341
|
var e = t.lastIntValue;
|
|
2342
2342
|
if (t.eat(
|
|
@@ -2348,7 +2348,7 @@ P.regexp_nonEmptyClassRanges = function(t) {
|
|
|
2348
2348
|
}
|
|
2349
2349
|
}
|
|
2350
2350
|
};
|
|
2351
|
-
|
|
2351
|
+
C.regexp_eatClassAtom = function(t) {
|
|
2352
2352
|
var e = t.pos;
|
|
2353
2353
|
if (t.eat(
|
|
2354
2354
|
92
|
|
@@ -2365,7 +2365,7 @@ P.regexp_eatClassAtom = function(t) {
|
|
|
2365
2365
|
var a = t.current();
|
|
2366
2366
|
return a !== 93 ? (t.lastIntValue = a, t.advance(), !0) : !1;
|
|
2367
2367
|
};
|
|
2368
|
-
|
|
2368
|
+
C.regexp_eatClassEscape = function(t) {
|
|
2369
2369
|
var e = t.pos;
|
|
2370
2370
|
if (t.eat(
|
|
2371
2371
|
98
|
|
@@ -2387,7 +2387,7 @@ P.regexp_eatClassEscape = function(t) {
|
|
|
2387
2387
|
}
|
|
2388
2388
|
return this.regexp_eatCharacterClassEscape(t) || this.regexp_eatCharacterEscape(t);
|
|
2389
2389
|
};
|
|
2390
|
-
|
|
2390
|
+
C.regexp_classSetExpression = function(t) {
|
|
2391
2391
|
var e = yt, r;
|
|
2392
2392
|
if (!this.regexp_eatClassSetRange(t)) if (r = this.regexp_eatClassSetOperand(t)) {
|
|
2393
2393
|
r === ut && (e = ut);
|
|
@@ -2419,7 +2419,7 @@ P.regexp_classSetExpression = function(t) {
|
|
|
2419
2419
|
r === ut && (e = ut);
|
|
2420
2420
|
}
|
|
2421
2421
|
};
|
|
2422
|
-
|
|
2422
|
+
C.regexp_eatClassSetRange = function(t) {
|
|
2423
2423
|
var e = t.pos;
|
|
2424
2424
|
if (this.regexp_eatClassSetCharacter(t)) {
|
|
2425
2425
|
var r = t.lastIntValue;
|
|
@@ -2434,10 +2434,10 @@ P.regexp_eatClassSetRange = function(t) {
|
|
|
2434
2434
|
}
|
|
2435
2435
|
return !1;
|
|
2436
2436
|
};
|
|
2437
|
-
|
|
2437
|
+
C.regexp_eatClassSetOperand = function(t) {
|
|
2438
2438
|
return this.regexp_eatClassSetCharacter(t) ? yt : this.regexp_eatClassStringDisjunction(t) || this.regexp_eatNestedClass(t);
|
|
2439
2439
|
};
|
|
2440
|
-
|
|
2440
|
+
C.regexp_eatNestedClass = function(t) {
|
|
2441
2441
|
var e = t.pos;
|
|
2442
2442
|
if (t.eat(
|
|
2443
2443
|
91
|
|
@@ -2465,7 +2465,7 @@ P.regexp_eatNestedClass = function(t) {
|
|
|
2465
2465
|
}
|
|
2466
2466
|
return null;
|
|
2467
2467
|
};
|
|
2468
|
-
|
|
2468
|
+
C.regexp_eatClassStringDisjunction = function(t) {
|
|
2469
2469
|
var e = t.pos;
|
|
2470
2470
|
if (t.eatChars(
|
|
2471
2471
|
[92, 113]
|
|
@@ -2487,7 +2487,7 @@ P.regexp_eatClassStringDisjunction = function(t) {
|
|
|
2487
2487
|
}
|
|
2488
2488
|
return null;
|
|
2489
2489
|
};
|
|
2490
|
-
|
|
2490
|
+
C.regexp_classStringDisjunctionContents = function(t) {
|
|
2491
2491
|
for (var e = this.regexp_classString(t); t.eat(
|
|
2492
2492
|
124
|
|
2493
2493
|
/* | */
|
|
@@ -2495,12 +2495,12 @@ P.regexp_classStringDisjunctionContents = function(t) {
|
|
|
2495
2495
|
this.regexp_classString(t) === ut && (e = ut);
|
|
2496
2496
|
return e;
|
|
2497
2497
|
};
|
|
2498
|
-
|
|
2498
|
+
C.regexp_classString = function(t) {
|
|
2499
2499
|
for (var e = 0; this.regexp_eatClassSetCharacter(t); )
|
|
2500
2500
|
e++;
|
|
2501
2501
|
return e === 1 ? yt : ut;
|
|
2502
2502
|
};
|
|
2503
|
-
|
|
2503
|
+
C.regexp_eatClassSetCharacter = function(t) {
|
|
2504
2504
|
var e = t.pos;
|
|
2505
2505
|
if (t.eat(
|
|
2506
2506
|
92
|
|
@@ -2519,18 +2519,18 @@ function cs(t) {
|
|
|
2519
2519
|
function ps(t) {
|
|
2520
2520
|
return t === 40 || t === 41 || t === 45 || t === 47 || t >= 91 && t <= 93 || t >= 123 && t <= 125;
|
|
2521
2521
|
}
|
|
2522
|
-
|
|
2522
|
+
C.regexp_eatClassSetReservedPunctuator = function(t) {
|
|
2523
2523
|
var e = t.current();
|
|
2524
2524
|
return ls(e) ? (t.lastIntValue = e, t.advance(), !0) : !1;
|
|
2525
2525
|
};
|
|
2526
2526
|
function ls(t) {
|
|
2527
2527
|
return t === 33 || t === 35 || t === 37 || t === 38 || t === 44 || t === 45 || t >= 58 && t <= 62 || t === 64 || t === 96 || t === 126;
|
|
2528
2528
|
}
|
|
2529
|
-
|
|
2529
|
+
C.regexp_eatClassControlLetter = function(t) {
|
|
2530
2530
|
var e = t.current();
|
|
2531
2531
|
return ee(e) || e === 95 ? (t.lastIntValue = e % 32, t.advance(), !0) : !1;
|
|
2532
2532
|
};
|
|
2533
|
-
|
|
2533
|
+
C.regexp_eatHexEscapeSequence = function(t) {
|
|
2534
2534
|
var e = t.pos;
|
|
2535
2535
|
if (t.eat(
|
|
2536
2536
|
120
|
|
@@ -2542,7 +2542,7 @@ P.regexp_eatHexEscapeSequence = function(t) {
|
|
|
2542
2542
|
}
|
|
2543
2543
|
return !1;
|
|
2544
2544
|
};
|
|
2545
|
-
|
|
2545
|
+
C.regexp_eatDecimalDigits = function(t) {
|
|
2546
2546
|
var e = t.pos, r = 0;
|
|
2547
2547
|
for (t.lastIntValue = 0; ee(r = t.current()); )
|
|
2548
2548
|
t.lastIntValue = 10 * t.lastIntValue + (r - 48), t.advance();
|
|
@@ -2551,7 +2551,7 @@ P.regexp_eatDecimalDigits = function(t) {
|
|
|
2551
2551
|
function ee(t) {
|
|
2552
2552
|
return t >= 48 && t <= 57;
|
|
2553
2553
|
}
|
|
2554
|
-
|
|
2554
|
+
C.regexp_eatHexDigits = function(t) {
|
|
2555
2555
|
var e = t.pos, r = 0;
|
|
2556
2556
|
for (t.lastIntValue = 0; mi(r = t.current()); )
|
|
2557
2557
|
t.lastIntValue = 16 * t.lastIntValue + yi(r), t.advance();
|
|
@@ -2563,7 +2563,7 @@ function mi(t) {
|
|
|
2563
2563
|
function yi(t) {
|
|
2564
2564
|
return t >= 65 && t <= 70 ? 10 + (t - 65) : t >= 97 && t <= 102 ? 10 + (t - 97) : t - 48;
|
|
2565
2565
|
}
|
|
2566
|
-
|
|
2566
|
+
C.regexp_eatLegacyOctalEscapeSequence = function(t) {
|
|
2567
2567
|
if (this.regexp_eatOctalDigit(t)) {
|
|
2568
2568
|
var e = t.lastIntValue;
|
|
2569
2569
|
if (this.regexp_eatOctalDigit(t)) {
|
|
@@ -2575,14 +2575,14 @@ P.regexp_eatLegacyOctalEscapeSequence = function(t) {
|
|
|
2575
2575
|
}
|
|
2576
2576
|
return !1;
|
|
2577
2577
|
};
|
|
2578
|
-
|
|
2578
|
+
C.regexp_eatOctalDigit = function(t) {
|
|
2579
2579
|
var e = t.current();
|
|
2580
2580
|
return xi(e) ? (t.lastIntValue = e - 48, t.advance(), !0) : (t.lastIntValue = 0, !1);
|
|
2581
2581
|
};
|
|
2582
2582
|
function xi(t) {
|
|
2583
2583
|
return t >= 48 && t <= 55;
|
|
2584
2584
|
}
|
|
2585
|
-
|
|
2585
|
+
C.regexp_eatFixedHexDigits = function(t, e) {
|
|
2586
2586
|
var r = t.pos;
|
|
2587
2587
|
t.lastIntValue = 0;
|
|
2588
2588
|
for (var a = 0; a < e; ++a) {
|
|
@@ -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 = W.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
|
};
|
|
@@ -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, g = 0, v = 0, o = e ?? 1 / 0; v < o; ++v, ++this.pos) {
|
|
2893
|
-
var
|
|
2894
|
-
if (a &&
|
|
2895
|
-
u && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), g === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), v === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), g =
|
|
2893
|
+
var P = this.input.charCodeAt(this.pos), _ = void 0;
|
|
2894
|
+
if (a && P === 95) {
|
|
2895
|
+
u && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), g === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), v === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), g = P;
|
|
2896
2896
|
continue;
|
|
2897
2897
|
}
|
|
2898
|
-
if (
|
|
2898
|
+
if (P >= 97 ? _ = P - 97 + 10 : P >= 65 ? _ = P - 65 + 10 : P >= 48 && P <= 57 ? _ = P - 48 : _ = 1 / 0, _ >= t)
|
|
2899
2899
|
break;
|
|
2900
|
-
g =
|
|
2900
|
+
g = P, d = d * t + _;
|
|
2901
2901
|
}
|
|
2902
2902
|
return a && g === 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
|
+
W.acorn = {
|
|
3102
|
+
Parser: W,
|
|
3103
3103
|
version: bi,
|
|
3104
3104
|
defaultOptions: zt,
|
|
3105
3105
|
Position: At,
|
|
@@ -3120,18 +3120,18 @@ K.acorn = {
|
|
|
3120
3120
|
nonASCIIwhitespace: ye
|
|
3121
3121
|
};
|
|
3122
3122
|
function ds(t, e) {
|
|
3123
|
-
return
|
|
3123
|
+
return W.parse(t, e);
|
|
3124
3124
|
}
|
|
3125
3125
|
function ms(t, e, r) {
|
|
3126
|
-
return
|
|
3126
|
+
return W.parseExpressionAt(t, e, r);
|
|
3127
3127
|
}
|
|
3128
3128
|
function ys(t, e) {
|
|
3129
|
-
return
|
|
3129
|
+
return W.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: W,
|
|
3135
3135
|
Position: At,
|
|
3136
3136
|
SourceLocation: Ft,
|
|
3137
3137
|
TokContext: Y,
|
|
@@ -3319,12 +3319,12 @@ 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 g = d.acorn || xs, v = gs(g), o = g.tokTypes,
|
|
3322
|
+
var g = d.acorn || xs, v = gs(g), o = g.tokTypes, P = g.keywordTypes, _ = g.isIdentifierStart, R = g.lineBreak, K = g.isNewLine, z = g.tokContexts, X = g.isIdentifierChar, I = v.tokTypes, et = v.tokContexts, se = v.keywordsRegExp, Ti = v.tokenIsLiteralPropertyName, Pi = v.tokenIsTemplate, Ci = v.tokenIsTSDeclarationStart, B = v.tokenIsIdentifier, qt = v.tokenIsKeywordOrIdentifier, ki = v.tokenIsTSTypeOperator;
|
|
3323
3323
|
function Ai(T, it, Q) {
|
|
3324
3324
|
Q === void 0 && (Q = T.length);
|
|
3325
3325
|
for (var J = it; J < Q; J++) {
|
|
3326
3326
|
var F = T.charCodeAt(J);
|
|
3327
|
-
if (
|
|
3327
|
+
if (K(F)) return J < Q - 1 && F === 13 && T.charCodeAt(J + 1) === 10 ? J + 2 : J + 1;
|
|
3328
3328
|
}
|
|
3329
3329
|
return -1;
|
|
3330
3330
|
}
|
|
@@ -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 !(X(c) || (64512 & c) == 55296);
|
|
3635
3635
|
}
|
|
3636
3636
|
return !1;
|
|
3637
3637
|
}, p.isAbstractConstructorSignature = function() {
|
|
@@ -3666,7 +3666,7 @@ function Es(t) {
|
|
|
3666
3666
|
return this.setLookaheadState(s), c;
|
|
3667
3667
|
}, p.readWord = function() {
|
|
3668
3668
|
var i = this.readWord1(), s = o.name;
|
|
3669
|
-
return this.keywords.test(i) ? s =
|
|
3669
|
+
return this.keywords.test(i) ? s = P[i] : new RegExp(se).test(i) && (s = I[i]), this.finishToken(s, i);
|
|
3670
3670
|
}, p.skipBlockComment = function() {
|
|
3671
3671
|
var i;
|
|
3672
3672
|
this.isLookahead || (i = this.options.onComment && this.curPosition());
|
|
@@ -3676,7 +3676,7 @@ function Es(t) {
|
|
|
3676
3676
|
}, p.skipLineComment = function(i) {
|
|
3677
3677
|
var s, n = this.pos;
|
|
3678
3678
|
this.isLookahead || (s = this.options.onComment && this.curPosition());
|
|
3679
|
-
for (var c = this.input.charCodeAt(this.pos += i); this.pos < this.input.length && !
|
|
3679
|
+
for (var c = this.input.charCodeAt(this.pos += i); this.pos < this.input.length && !K(c); ) c = this.input.charCodeAt(++this.pos);
|
|
3680
3680
|
this.isLookahead || this.options.onComment && this.options.onComment(!1, this.input.slice(n + i, this.pos), n, this.pos, s, this.curPosition());
|
|
3681
3681
|
}, p.finishToken = function(i, s) {
|
|
3682
3682
|
this.preValue = this.value, this.preToken = this.type, this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
@@ -3696,7 +3696,7 @@ function Es(t) {
|
|
|
3696
3696
|
}, p.isLiteralPropertyName = function() {
|
|
3697
3697
|
return Ti(this.type);
|
|
3698
3698
|
}, p.hasPrecedingLineBreak = function() {
|
|
3699
|
-
return
|
|
3699
|
+
return R.test(this.input.slice(this.lastTokEndLoc.index, this.start));
|
|
3700
3700
|
}, p.createIdentifier = function(i, s) {
|
|
3701
3701
|
return i.name = s, this.finishNode(i, "Identifier");
|
|
3702
3702
|
}, p.resetStartLocationFromNode = function(i, s) {
|
|
@@ -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 ? w.InvalidModifierOnTypeMember : y, b = {}, S = function(
|
|
4182
|
-
U ===
|
|
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 ? w.InvalidModifierOnTypeMember : y, b = {}, S = function(q, U, H, G) {
|
|
4182
|
+
U === H && n[G] && s.raise(q.column, w.InvalidModifiersOrder({ orderedModifiers: [H, G] }));
|
|
4183
|
+
}, E = function(q, U, H, G) {
|
|
4184
|
+
(n[H] && U === G || n[G] && U === H) && s.raise(q.column, w.IncompatibleModifiers({ modifiers: [H, G] }));
|
|
4185
4185
|
}; ; ) {
|
|
4186
4186
|
var L = this.startLoc, k = this.tsParseModifier(c.concat(l ?? []), m);
|
|
4187
4187
|
if (!k) break;
|
|
@@ -4620,12 +4620,12 @@ function Es(t) {
|
|
|
4620
4620
|
var k = s.tsTryParseIndexSignature(l);
|
|
4621
4621
|
if (k) return l.abstract && s.raise(l.start, w.IndexSignatureHasAbstract), l.accessibility && s.raise(l.start, w.IndexSignatureHasAccessibility({ modifier: l.accessibility })), l.declare && s.raise(l.start, w.IndexSignatureHasDeclare), l.override && s.raise(l.start, w.IndexSignatureHasOverride), k;
|
|
4622
4622
|
if (!s.inAbstractClass && l.abstract && s.raise(l.start, w.NonAbstractClassHasAbstractMethod), l.override && i && s.raise(l.start, w.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 q = s.value;
|
|
4624
|
+
(s.eatContextual("get") || s.eatContextual("set")) && (s.isClassElementNameStart() ? b = q : m = q);
|
|
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 U = !l.static && Ve(l, "constructor"),
|
|
4628
|
-
U && b !== "method" && s.raise(l.key.start, "Constructor can't have get/set modifier"), l.kind = U ? "constructor" : b, s.parseClassMethod(l, y, x,
|
|
4627
|
+
var U = !l.static && Ve(l, "constructor"), H = U && i;
|
|
4628
|
+
U && b !== "method" && s.raise(l.key.start, "Constructor can't have get/set modifier"), l.kind = U ? "constructor" : b, s.parseClassMethod(l, y, x, H);
|
|
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, k,
|
|
4668
|
+
var c, l, m, y, x, b, S, E, L, k, q, U = this;
|
|
4669
4669
|
if (this.matchJsx("jsxTagStart") || this.tsMatchLeftRelational()) {
|
|
4670
4670
|
if (E = this.cloneCurLookaheadState(), !(L = this.tryParse(function() {
|
|
4671
4671
|
return U.parseMaybeAssignOrigin(i, s, n);
|
|
4672
4672
|
}, E)).error) return L.node;
|
|
4673
|
-
var
|
|
4674
|
-
G === v.tokContexts.tc_oTag &&
|
|
4673
|
+
var H = this.context, G = H[H.length - 1];
|
|
4674
|
+
G === v.tokContexts.tc_oTag && H[H.length - 2] === v.tokContexts.tc_expr ? (H.pop(), H.pop()) : G !== v.tokContexts.tc_oTag && G !== v.tokContexts.tc_expr || H.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
4679
|
var _t, Nt;
|
|
4680
|
-
|
|
4680
|
+
q = U.tsParseTypeParameters();
|
|
4681
4681
|
var gt = U.parseMaybeAssignOrigin(i, s, n);
|
|
4682
|
-
return (gt.type !== "ArrowFunctionExpression" || (_t = gt.extra) != null && _t.parenthesized) && vt(), ((Nt =
|
|
4682
|
+
return (gt.type !== "ArrowFunctionExpression" || (_t = gt.extra) != null && _t.parenthesized) && vt(), ((Nt = q) == null ? void 0 : Nt.params.length) !== 0 && U.resetStartLocationFromNode(gt, q), gt.typeParameters = q, gt;
|
|
4683
4683
|
}, E);
|
|
4684
|
-
if (!rt.error && !rt.aborted) return
|
|
4684
|
+
if (!rt.error && !rt.aborted) return q && this.reportReservedArrowTypeParam(q), rt.node;
|
|
4685
4685
|
if (!L && (Fe(!0), !(k = this.tryParse(function() {
|
|
4686
4686
|
return U.parseMaybeAssignOrigin(i, s, n);
|
|
4687
4687
|
}, E)).error)) return k.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), q && this.reportReservedArrowTypeParam(q), rt.node;
|
|
4690
4690
|
if ((m = k) != null && m.node) return this.setLookaheadState(k.failState), k.node;
|
|
4691
4691
|
throw (y = L) != null && y.thrown ? L.error : rt.thrown ? rt.error : (x = k) != null && x.thrown ? k.error : ((b = L) == null ? void 0 : b.error) || rt.error || ((S = k) == 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, k = !1,
|
|
4815
|
+
var x, b = this.start, S = this.startLoc, E = [], L = !0, k = !1, q = new Ot(), U = this.yieldPos, H = 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
|
k = !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, q, this.parseParenItem));
|
|
4826
4826
|
}
|
|
4827
4827
|
var G = 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 && !k || 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(q, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = U, this.awaitPos = H, this.parseParenArrowList(c, l, E, s);
|
|
4829
|
+
E.length && !k || this.unexpected(this.lastTokStart), x && this.unexpected(x), this.checkExpressionErrors(q, !0), this.yieldPos = U || this.yieldPos, this.awaitPos = H || this.awaitPos, E.length > 1 ? ((n = this.startNodeAt(b, S)).expressions = E, this.finishNodeAt(n, "SequenceExpression", G, 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,12 +4892,12 @@ function Es(t) {
|
|
|
4892
4892
|
});
|
|
4893
4893
|
if (L && this.unexpected(L), k) return k.type === "TSInstantiationExpression" && (this.match(o.dot) || this.match(o.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start, w.InvalidPropertyAccessAfterInstantiationExpression), i = k;
|
|
4894
4894
|
}
|
|
4895
|
-
var
|
|
4895
|
+
var q = this.options.ecmaVersion >= 11, U = q && this.eat(o.questionDot);
|
|
4896
4896
|
c && U && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
4897
|
-
var
|
|
4898
|
-
if (
|
|
4897
|
+
var H = this.eat(o.bracketL);
|
|
4898
|
+
if (H || U && this.type !== o.parenL && this.type !== o.backQuote || this.eat(o.dot)) {
|
|
4899
4899
|
var G = this.startNodeAt(s, n);
|
|
4900
|
-
G.object = i,
|
|
4900
|
+
G.object = i, H ? (G.property = this.parseExpression(), this.expect(o.bracketR)) : G.property = this.type === o.privateId && i.type !== "Super" ? this.parsePrivateIdent() : this.parseIdent(this.options.allowReserved !== "never"), G.computed = !!H, q && (G.optional = U), i = this.finishNode(G, "MemberExpression");
|
|
4901
4901
|
} else if (!c && this.eat(o.parenL)) {
|
|
4902
4902
|
var rt = this.maybeInArrowParameters;
|
|
4903
4903
|
this.maybeInArrowParameters = !0;
|
|
@@ -4908,7 +4908,7 @@ function Es(t) {
|
|
|
4908
4908
|
else {
|
|
4909
4909
|
this.checkExpressionErrors(vt, !0), this.yieldPos = _t || this.yieldPos, this.awaitPos = Nt || 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, q && (Ht.optional = U), i = this.finishNode(Ht, "CallExpression");
|
|
4912
4912
|
}
|
|
4913
4913
|
this.maybeInArrowParameters = rt;
|
|
4914
4914
|
} else if (this.type === o.backQuote) {
|
|
@@ -5069,8 +5069,8 @@ const Is = ["createObject", "dropObject", "removeRecords", "upsertRecords"], _s
|
|
|
5069
5069
|
async function Ms() {
|
|
5070
5070
|
try {
|
|
5071
5071
|
console.info("🚀 Building configuration...");
|
|
5072
|
-
const t = JSON.parse(await
|
|
5073
|
-
t.name != null && (e.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (e.version = t.version), await
|
|
5072
|
+
const t = JSON.parse(await M.readFile("package.json", "utf8")), e = JSON.parse(await M.readFile("config.json", "utf8"));
|
|
5073
|
+
t.name != null && (e.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (e.version = t.version), await M.writeFile("config.json", JSON.stringify(e, void 0, 4), "utf8"), console.info("✅ Configuration built.");
|
|
5074
5074
|
} catch (t) {
|
|
5075
5075
|
console.error("❌ Error building configuration.", t);
|
|
5076
5076
|
}
|
|
@@ -5086,49 +5086,50 @@ async function Ds(t) {
|
|
|
5086
5086
|
for (const v of f) {
|
|
5087
5087
|
const o = `${u}/${v}`;
|
|
5088
5088
|
try {
|
|
5089
|
-
const
|
|
5090
|
-
if (
|
|
5091
|
-
const _ = await
|
|
5092
|
-
d.push(
|
|
5089
|
+
const P = await M.stat(o);
|
|
5090
|
+
if (P.isDirectory()) {
|
|
5091
|
+
const _ = await M.readdir(o), R = { childCount: _.length, name: v, typeId: "folder" };
|
|
5092
|
+
d.push(R), await r(o, _);
|
|
5093
5093
|
} else {
|
|
5094
|
-
const _ = { id: Ii(), lastModifiedAt:
|
|
5094
|
+
const _ = { id: Ii(), lastModifiedAt: P.mtimeMs, name: v, size: P.size, typeId: "object" };
|
|
5095
5095
|
d.push(_);
|
|
5096
5096
|
}
|
|
5097
|
-
} catch (
|
|
5098
|
-
throw new Error(`Unable to get information for '${v}' in 'buildPublicDirectoryIndex'. ${String(
|
|
5097
|
+
} catch (P) {
|
|
5098
|
+
throw new Error(`Unable to get information for '${v}' in 'buildPublicDirectoryIndex'. ${String(P)}`);
|
|
5099
5099
|
}
|
|
5100
5100
|
}
|
|
5101
5101
|
d.sort((v, o) => {
|
|
5102
|
-
const
|
|
5103
|
-
return
|
|
5102
|
+
const P = v.typeId.localeCompare(o.typeId);
|
|
5103
|
+
return P === 0 ? v.name.localeCompare(o.name) : P;
|
|
5104
5104
|
});
|
|
5105
5105
|
}
|
|
5106
|
-
const a = await
|
|
5107
|
-
await r(`public/${t}`, a), await
|
|
5106
|
+
const a = await M.readdir(`public/${t}`);
|
|
5107
|
+
await r(`public/${t}`, a), await M.writeFile(`./public/${t}Index.json`, JSON.stringify(e), "utf8"), console.info("✅ Public directory index built.");
|
|
5108
5108
|
} catch (e) {
|
|
5109
5109
|
console.error("❌ Error building public directory index.", e);
|
|
5110
5110
|
}
|
|
5111
5111
|
}
|
|
5112
5112
|
async function Vs() {
|
|
5113
5113
|
try {
|
|
5114
|
-
let t = function(
|
|
5115
|
-
if (
|
|
5116
|
-
const _ =
|
|
5117
|
-
|
|
5114
|
+
let t = function(P) {
|
|
5115
|
+
if (P.type === "MethodDefinition") {
|
|
5116
|
+
const _ = P, K = _.key.name, z = K === "constructor", X = _.accessibility ?? !1;
|
|
5117
|
+
K && !z && !X && (v.push(K), Is.includes(K) && (u = !0), _s.includes(K) && (f = !0));
|
|
5118
5118
|
}
|
|
5119
|
-
for (const _ in
|
|
5119
|
+
for (const _ in P) {
|
|
5120
5120
|
if (_ === "loc" || _ === "range" || _ === "start" || _ === "end" || _ === "comments") continue;
|
|
5121
|
-
|
|
5122
|
-
|
|
5121
|
+
console.log(1111, P);
|
|
5122
|
+
const R = P[_];
|
|
5123
|
+
console.log(2222, R), Array.isArray(R) ? R.forEach(t) : R && typeof R == "object" && typeof R.type == "string" && t(R);
|
|
5123
5124
|
}
|
|
5124
5125
|
};
|
|
5125
5126
|
console.info("🚀 Building connector configuration...");
|
|
5126
|
-
const e = JSON.parse(await
|
|
5127
|
+
const e = JSON.parse(await M.readFile("package.json", "utf8")), r = JSON.parse(await M.readFile("config.json", "utf8")), a = await M.readFile("src/index.ts", "utf8");
|
|
5127
5128
|
let u = !1, f = !1;
|
|
5128
|
-
const g =
|
|
5129
|
+
const g = W.extend(Es()).parse(a, { ecmaVersion: "latest", sourceType: "module", locations: !0 }), v = [];
|
|
5129
5130
|
t(g), console.log(`Extracted ${v.length} functions:`, [...v]), v.length > 0 ? console.info(`ℹ️ Implements ${v.length} operations.`) : console.warn("⚠️ Implements no operations.");
|
|
5130
5131
|
let o;
|
|
5131
|
-
f && u ? o = "bidirectional" : f ? o = "source" : u ? o = "destination" : o = "unknown", o === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports ${o} usage.`), e.name != null && (r.id = e.name), r.operations = v, r.usageId = o, e.version != null && (r.version = e.version), await
|
|
5132
|
+
f && u ? o = "bidirectional" : f ? o = "source" : u ? o = "destination" : o = "unknown", o === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports ${o} usage.`), e.name != null && (r.id = e.name), r.operations = v, r.usageId = o, e.version != null && (r.version = e.version), await M.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8"), console.info("✅ Connector configuration built.");
|
|
5132
5133
|
} catch (t) {
|
|
5133
5134
|
console.error("❌ Error building connector configuration.", t);
|
|
5134
5135
|
}
|
|
@@ -5136,8 +5137,8 @@ async function Vs() {
|
|
|
5136
5137
|
async function Fs() {
|
|
5137
5138
|
try {
|
|
5138
5139
|
console.info("🚀 Building context configuration...");
|
|
5139
|
-
const t = JSON.parse(await
|
|
5140
|
-
t.name != null && (e.id = t.name), e.operations = u, t.version != null && (e.version = t.version), await
|
|
5140
|
+
const t = JSON.parse(await M.readFile("package.json", "utf8")), e = JSON.parse(await M.readFile("config.json", "utf8")), r = await M.readFile("src/index.ts", "utf8"), a = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, u = [...r.matchAll(a)].filter((f) => f[1] == null && f[2] !== "constructor").map((f) => f[2]);
|
|
5141
|
+
t.name != null && (e.id = t.name), e.operations = u, t.version != null && (e.version = t.version), await M.writeFile("config.json", JSON.stringify(e, void 0, 4), "utf8"), console.info("✅ Context configuration built.");
|
|
5141
5142
|
} catch (t) {
|
|
5142
5143
|
console.error("❌ Error building context configuration.", t);
|
|
5143
5144
|
}
|
|
@@ -5145,8 +5146,8 @@ async function Fs() {
|
|
|
5145
5146
|
async function Bs() {
|
|
5146
5147
|
try {
|
|
5147
5148
|
console.info("🚀 Building presenter configuration...");
|
|
5148
|
-
const t = JSON.parse(await
|
|
5149
|
-
t.name != null && (e.id = t.name), e.operations = u, t.version != null && (e.version = t.version), await
|
|
5149
|
+
const t = JSON.parse(await M.readFile("package.json", "utf8")), e = JSON.parse(await M.readFile("config.json", "utf8")), r = await M.readFile("src/index.ts", "utf8"), a = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, u = [...r.matchAll(a)].filter((f) => f[1] == null && f[2] !== "constructor").map((f) => f[2]);
|
|
5150
|
+
t.name != null && (e.id = t.name), e.operations = u, t.version != null && (e.version = t.version), await M.writeFile("config.json", JSON.stringify(e, void 0, 4), "utf8"), console.info("✅ Presenter configuration built.");
|
|
5150
5151
|
} catch (t) {
|
|
5151
5152
|
console.error("❌ Error building context configuration.", t);
|
|
5152
5153
|
}
|
|
@@ -5154,12 +5155,12 @@ async function Bs() {
|
|
|
5154
5155
|
async function js(t = "./") {
|
|
5155
5156
|
try {
|
|
5156
5157
|
console.info("🚀 Bumping version...");
|
|
5157
|
-
const e = JSON.parse(await
|
|
5158
|
+
const e = JSON.parse(await M.readFile(`${t}package.json`, "utf8"));
|
|
5158
5159
|
if (e.version == null)
|
|
5159
|
-
e.version = "0.0.001", await
|
|
5160
|
+
e.version = "0.0.001", await M.writeFile(`${t}package.json`, JSON.stringify(e, void 0, 4), "utf8"), console.warn(`⚠️ Version initialised to ${e.version}.`);
|
|
5160
5161
|
else {
|
|
5161
5162
|
const r = e.version, a = e.version.split(".");
|
|
5162
|
-
e.version = `${a[0]}.${a[1]}.${Number(a[2]) + 1}`, await
|
|
5163
|
+
e.version = `${a[0]}.${a[1]}.${Number(a[2]) + 1}`, await M.writeFile(`${t}package.json`, JSON.stringify(e, void 0, 4), "utf8"), console.info(`✅ Version bumped from ${r} to ${e.version}.`);
|
|
5163
5164
|
}
|
|
5164
5165
|
} catch (e) {
|
|
5165
5166
|
console.error("❌ Error bumping package version.", e);
|
|
@@ -5171,12 +5172,12 @@ function Us(t) {
|
|
|
5171
5172
|
async function qs() {
|
|
5172
5173
|
const t = "<!-- DEPENDENCY_LICENSES_START -->", e = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
5173
5174
|
try {
|
|
5174
|
-
const r = (await
|
|
5175
|
+
const r = (await M.readFile("./licenses.md", "utf8")).trim(), a = await M.readFile("./README.md", "utf8"), u = a.indexOf(t), f = a.indexOf(e);
|
|
5175
5176
|
(u === -1 || f === -1) && (console.error("❌ Dependency license markers not found in readme file."), process.exit(1));
|
|
5176
5177
|
const d = a.substring(0, u + t.length) + `
|
|
5177
5178
|
` + r + `
|
|
5178
5179
|
` + a.substring(f);
|
|
5179
|
-
await
|
|
5180
|
+
await M.writeFile("README.md", d, "utf8"), console.log("✅ Readme file updated with license information");
|
|
5180
5181
|
} catch (r) {
|
|
5181
5182
|
console.error("❌ Error updating readme file.", r), process.exit(1);
|
|
5182
5183
|
}
|
|
@@ -5184,12 +5185,12 @@ async function qs() {
|
|
|
5184
5185
|
async function Hs() {
|
|
5185
5186
|
const t = "<!-- OWASP_BADGE_START -->", e = "<!-- OWASP_BADGE_END -->";
|
|
5186
5187
|
try {
|
|
5187
|
-
const r = JSON.parse(await
|
|
5188
|
-
for (const
|
|
5189
|
-
if (
|
|
5190
|
-
for (const z of
|
|
5191
|
-
const
|
|
5192
|
-
|
|
5188
|
+
const r = JSON.parse(await M.readFile("./dependency-check-reports/dependency-check-report.json", "utf-8")), a = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
|
|
5189
|
+
for (const K of r.dependencies)
|
|
5190
|
+
if (K.vulnerabilities != null)
|
|
5191
|
+
for (const z of K.vulnerabilities) {
|
|
5192
|
+
const X = z.severity?.toLowerCase() ?? "unknown";
|
|
5193
|
+
X in a ? a[X]++ : a.unknown++;
|
|
5193
5194
|
}
|
|
5194
5195
|
const u = {
|
|
5195
5196
|
critical: { color: "D32F2F", label: "critical" },
|
|
@@ -5197,20 +5198,20 @@ async function Hs() {
|
|
|
5197
5198
|
moderate: { color: "FBC02D", label: "moderate" },
|
|
5198
5199
|
low: { color: "6D8C31", label: "low" },
|
|
5199
5200
|
unknown: { color: "616161", label: "unknown" }
|
|
5200
|
-
}, f = JSON.parse(await
|
|
5201
|
-
if (Object.values(a).reduce((
|
|
5201
|
+
}, f = JSON.parse(await M.readFile("config.json", "utf8")), d = [];
|
|
5202
|
+
if (Object.values(a).reduce((K, z) => K + z, 0) === 0)
|
|
5202
5203
|
console.info("✅ No vulnerabilities found."), d.push(`[](https://data-positioning.github.io/${f.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5203
5204
|
else
|
|
5204
|
-
for (const [
|
|
5205
|
-
const
|
|
5206
|
-
if (console.warn(`⚠️ ${z} ${
|
|
5207
|
-
const I = `https://img.shields.io/badge/OWASP-${z}%20${
|
|
5205
|
+
for (const [K, z] of Object.entries(a)) {
|
|
5206
|
+
const X = u[K];
|
|
5207
|
+
if (console.warn(`⚠️ ${z} ${X.label} vulnerability(ies) found.`), z === 0) continue;
|
|
5208
|
+
const I = `https://img.shields.io/badge/OWASP-${z}%20${X.label}-${X.color}`;
|
|
5208
5209
|
d.push(`[](https://data-positioning.github.io/${f.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5209
5210
|
}
|
|
5210
|
-
const v = await
|
|
5211
|
-
(o === -1 ||
|
|
5212
|
-
const _ = d.join(" "),
|
|
5213
|
-
await
|
|
5211
|
+
const v = await M.readFile("./README.md", "utf8"), o = v.indexOf(t), P = v.indexOf(e);
|
|
5212
|
+
(o === -1 || P === -1) && (console.error("❌ OWASP badge markers not found in README.md."), process.exit(1));
|
|
5213
|
+
const _ = d.join(" "), R = v.substring(0, o + t.length) + _ + v.substring(P);
|
|
5214
|
+
await M.writeFile("README.md", R, "utf8"), console.info("✅ OWASP dependency check badge(s) inserted into README.md");
|
|
5214
5215
|
} catch (r) {
|
|
5215
5216
|
console.error("❌ Error updating README with OWASP badges:", r), process.exit(1);
|
|
5216
5217
|
}
|
|
@@ -5218,7 +5219,7 @@ async function Hs() {
|
|
|
5218
5219
|
async function Ws() {
|
|
5219
5220
|
try {
|
|
5220
5221
|
console.info("🚀 Sending deployment notice...");
|
|
5221
|
-
const t = JSON.parse(await
|
|
5222
|
+
const t = JSON.parse(await M.readFile("config.json", "utf8")), e = {
|
|
5222
5223
|
body: JSON.stringify(t),
|
|
5223
5224
|
headers: { "Content-Type": "application/json" },
|
|
5224
5225
|
method: "PUT"
|
|
@@ -5232,7 +5233,7 @@ async function Ws() {
|
|
|
5232
5233
|
async function Ks() {
|
|
5233
5234
|
try {
|
|
5234
5235
|
console.info("🚀 Synchronising with GitHub....");
|
|
5235
|
-
const t = JSON.parse(await
|
|
5236
|
+
const t = JSON.parse(await M.readFile("package.json", "utf8"));
|
|
5236
5237
|
await Dt("git add ."), await Dt(`git commit -m "v${t.version}"`), await Dt("git push origin main:main"), console.info(`✅ Synchronised version ${t.version} with GitHub.`);
|
|
5237
5238
|
} catch (t) {
|
|
5238
5239
|
console.error("❌ Error synchronising with GitHub.", t);
|
|
@@ -5244,17 +5245,17 @@ async function zs(t, e) {
|
|
|
5244
5245
|
async function r(u, f, d) {
|
|
5245
5246
|
for (const g of d) {
|
|
5246
5247
|
const v = `${u}/${g}`, o = `${f}/${g}`;
|
|
5247
|
-
if ((await
|
|
5248
|
-
const _ = await
|
|
5248
|
+
if ((await M.stat(v)).isDirectory()) {
|
|
5249
|
+
const _ = await M.readdir(v);
|
|
5249
5250
|
await r(v, o, _);
|
|
5250
5251
|
} else {
|
|
5251
5252
|
console.info(`⚙️ Uploading '${u}/${g}'...`);
|
|
5252
|
-
const _ = `wrangler r2 object put "datapos-sample-data-eu/${f}/${g}" --file="${u}/${g}" --jurisdiction=eu --remote`,
|
|
5253
|
-
if (
|
|
5253
|
+
const _ = `wrangler r2 object put "datapos-sample-data-eu/${f}/${g}" --file="${u}/${g}" --jurisdiction=eu --remote`, R = await Dt(_);
|
|
5254
|
+
if (R.stderr) throw new Error(R.stderr);
|
|
5254
5255
|
}
|
|
5255
5256
|
}
|
|
5256
5257
|
}
|
|
5257
|
-
const a = await
|
|
5258
|
+
const a = await M.readdir(`${t}/${e}/`);
|
|
5258
5259
|
await r(`${t}/${e}`, e, a), console.info("✅ Directory uploaded to R2.");
|
|
5259
5260
|
} catch (r) {
|
|
5260
5261
|
console.error("❌ Error uploading directory to R2.", r);
|
|
@@ -5263,7 +5264,7 @@ async function zs(t, e) {
|
|
|
5263
5264
|
async function Js() {
|
|
5264
5265
|
try {
|
|
5265
5266
|
console.info("🚀 Uploading module configuration....");
|
|
5266
|
-
const t = JSON.parse(await
|
|
5267
|
+
const t = JSON.parse(await M.readFile("config.json", "utf8")), e = t.id, r = {
|
|
5267
5268
|
body: JSON.stringify(t),
|
|
5268
5269
|
headers: { "Content-Type": "application/json" },
|
|
5269
5270
|
method: "PUT"
|
|
@@ -5277,16 +5278,16 @@ async function Js() {
|
|
|
5277
5278
|
async function Gs(t) {
|
|
5278
5279
|
try {
|
|
5279
5280
|
console.info("🚀 Uploading module to R2...");
|
|
5280
|
-
const r = `v${JSON.parse(await
|
|
5281
|
+
const r = `v${JSON.parse(await M.readFile("package.json", "utf8")).version}`;
|
|
5281
5282
|
async function a(u, f = "") {
|
|
5282
|
-
const d = await
|
|
5283
|
+
const d = await M.readdir(u, { withFileTypes: !0 });
|
|
5283
5284
|
for (const g of d) {
|
|
5284
5285
|
const v = `${u}/${g.name}`, o = f ? `${f}/${g.name}` : g.name;
|
|
5285
5286
|
if (!g.isDirectory()) {
|
|
5286
|
-
const
|
|
5287
|
-
console.info(`⚙️ Uploading '${o}' → '${
|
|
5288
|
-
const { stderr:
|
|
5289
|
-
if (
|
|
5287
|
+
const P = `${t}_${r}/${o}`.replace(/\\/g, "/"), _ = g.name.endsWith(".js") ? "application/javascript" : g.name.endsWith(".css") ? "text/css" : "application/octet-stream";
|
|
5288
|
+
console.info(`⚙️ Uploading '${o}' → '${P}'...`);
|
|
5289
|
+
const { stderr: R } = await Dt(`wrangler r2 object put "${P}" --file="${v}" --content-type ${_} --jurisdiction=eu --remote`);
|
|
5290
|
+
if (R) throw new Error(R);
|
|
5290
5291
|
}
|
|
5291
5292
|
}
|
|
5292
5293
|
}
|