@datapos/datapos-development 0.3.353 → 0.3.356
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { promises as
|
|
1
|
+
import { promises as ge } from "node:fs";
|
|
2
2
|
import { nanoid as Vs } from "nanoid";
|
|
3
|
-
import Dt from "node:path";
|
|
4
3
|
import { fileURLToPath as Pr, URL as zs } from "node:url";
|
|
4
|
+
import Dt from "node:path";
|
|
5
5
|
import { promisify as js } from "node:util";
|
|
6
6
|
import { exec as Fs, spawn as $s } from "node:child_process";
|
|
7
7
|
import { CONNECTOR_SOURCE_OPERATIONS as Bs, CONNECTOR_DESTINATION_OPERATIONS as Zs } from "@datapos/datapos-shared";
|
|
@@ -39,7 +39,7 @@ function k(e, t, i) {
|
|
|
39
39
|
value: (d) => i?.Parent && d instanceof i.Parent ? !0 : d?._zod?.traits?.has(e)
|
|
40
40
|
}), Object.defineProperty(h, "name", { value: e }), h;
|
|
41
41
|
}
|
|
42
|
-
class
|
|
42
|
+
class st extends Error {
|
|
43
43
|
constructor() {
|
|
44
44
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
45
45
|
}
|
|
@@ -57,10 +57,10 @@ function Us(e) {
|
|
|
57
57
|
const t = Object.values(e).filter((r) => typeof r == "number");
|
|
58
58
|
return Object.entries(e).filter(([r, n]) => t.indexOf(+r) === -1).map(([r, n]) => n);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function li(e, t) {
|
|
61
61
|
return typeof t == "bigint" ? t.toString() : t;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function gi(e) {
|
|
64
64
|
return {
|
|
65
65
|
get value() {
|
|
66
66
|
{
|
|
@@ -70,10 +70,10 @@ function xi(e) {
|
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function bi(e) {
|
|
74
74
|
return e == null;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function _i(e) {
|
|
77
77
|
const t = e.startsWith("^") ? 1 : 0, i = e.endsWith("$") ? e.length - 1 : e.length;
|
|
78
78
|
return e.slice(t, i);
|
|
79
79
|
}
|
|
@@ -104,7 +104,7 @@ function U(e, t, i) {
|
|
|
104
104
|
configurable: !0
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Je(e, t, i) {
|
|
108
108
|
Object.defineProperty(e, t, {
|
|
109
109
|
value: i,
|
|
110
110
|
writable: !0,
|
|
@@ -112,7 +112,7 @@ function Xe(e, t, i) {
|
|
|
112
112
|
configurable: !0
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Ye(...e) {
|
|
116
116
|
const t = {};
|
|
117
117
|
for (const i of e) {
|
|
118
118
|
const r = Object.getOwnPropertyDescriptors(i);
|
|
@@ -131,7 +131,7 @@ const Er = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
|
131
131
|
function Mt(e) {
|
|
132
132
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
133
133
|
}
|
|
134
|
-
const Gs =
|
|
134
|
+
const Gs = gi(() => {
|
|
135
135
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
136
136
|
return !1;
|
|
137
137
|
try {
|
|
@@ -141,7 +141,7 @@ const Gs = xi(() => {
|
|
|
141
141
|
return !1;
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
|
-
function
|
|
144
|
+
function nt(e) {
|
|
145
145
|
if (Mt(e) === !1)
|
|
146
146
|
return !1;
|
|
147
147
|
const t = e.constructor;
|
|
@@ -151,10 +151,10 @@ function st(e) {
|
|
|
151
151
|
return !(Mt(i) === !1 || Object.prototype.hasOwnProperty.call(i, "isPrototypeOf") === !1);
|
|
152
152
|
}
|
|
153
153
|
function Ir(e) {
|
|
154
|
-
return
|
|
154
|
+
return nt(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
155
155
|
}
|
|
156
156
|
const Ws = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
157
|
-
function
|
|
157
|
+
function at(e) {
|
|
158
158
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
159
159
|
}
|
|
160
160
|
function Ge(e, t, i) {
|
|
@@ -185,7 +185,7 @@ const Xs = {
|
|
|
185
185
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
186
186
|
};
|
|
187
187
|
function Js(e, t) {
|
|
188
|
-
const i = e._zod.def, r =
|
|
188
|
+
const i = e._zod.def, r = Ye(e._zod.def, {
|
|
189
189
|
get shape() {
|
|
190
190
|
const n = {};
|
|
191
191
|
for (const u in t) {
|
|
@@ -193,14 +193,14 @@ function Js(e, t) {
|
|
|
193
193
|
throw new Error(`Unrecognized key: "${u}"`);
|
|
194
194
|
t[u] && (n[u] = i.shape[u]);
|
|
195
195
|
}
|
|
196
|
-
return
|
|
196
|
+
return Je(this, "shape", n), n;
|
|
197
197
|
},
|
|
198
198
|
checks: []
|
|
199
199
|
});
|
|
200
200
|
return Ge(e, r);
|
|
201
201
|
}
|
|
202
202
|
function Ys(e, t) {
|
|
203
|
-
const i = e._zod.def, r =
|
|
203
|
+
const i = e._zod.def, r = Ye(e._zod.def, {
|
|
204
204
|
get shape() {
|
|
205
205
|
const n = { ...e._zod.def.shape };
|
|
206
206
|
for (const u in t) {
|
|
@@ -208,45 +208,45 @@ function Ys(e, t) {
|
|
|
208
208
|
throw new Error(`Unrecognized key: "${u}"`);
|
|
209
209
|
t[u] && delete n[u];
|
|
210
210
|
}
|
|
211
|
-
return
|
|
211
|
+
return Je(this, "shape", n), n;
|
|
212
212
|
},
|
|
213
213
|
checks: []
|
|
214
214
|
});
|
|
215
215
|
return Ge(e, r);
|
|
216
216
|
}
|
|
217
217
|
function Qs(e, t) {
|
|
218
|
-
if (!
|
|
218
|
+
if (!nt(t))
|
|
219
219
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
220
220
|
const i = e._zod.def.checks;
|
|
221
221
|
if (i && i.length > 0)
|
|
222
222
|
throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
|
|
223
|
-
const n =
|
|
223
|
+
const n = Ye(e._zod.def, {
|
|
224
224
|
get shape() {
|
|
225
225
|
const u = { ...e._zod.def.shape, ...t };
|
|
226
|
-
return
|
|
226
|
+
return Je(this, "shape", u), u;
|
|
227
227
|
},
|
|
228
228
|
checks: []
|
|
229
229
|
});
|
|
230
230
|
return Ge(e, n);
|
|
231
231
|
}
|
|
232
232
|
function en(e, t) {
|
|
233
|
-
if (!
|
|
233
|
+
if (!nt(t))
|
|
234
234
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
235
235
|
const i = {
|
|
236
236
|
...e._zod.def,
|
|
237
237
|
get shape() {
|
|
238
238
|
const r = { ...e._zod.def.shape, ...t };
|
|
239
|
-
return
|
|
239
|
+
return Je(this, "shape", r), r;
|
|
240
240
|
},
|
|
241
241
|
checks: e._zod.def.checks
|
|
242
242
|
};
|
|
243
243
|
return Ge(e, i);
|
|
244
244
|
}
|
|
245
245
|
function tn(e, t) {
|
|
246
|
-
const i =
|
|
246
|
+
const i = Ye(e._zod.def, {
|
|
247
247
|
get shape() {
|
|
248
248
|
const r = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
249
|
-
return
|
|
249
|
+
return Je(this, "shape", r), r;
|
|
250
250
|
},
|
|
251
251
|
get catchall() {
|
|
252
252
|
return t._zod.def.catchall;
|
|
@@ -257,7 +257,7 @@ function tn(e, t) {
|
|
|
257
257
|
return Ge(e, i);
|
|
258
258
|
}
|
|
259
259
|
function rn(e, t, i) {
|
|
260
|
-
const r =
|
|
260
|
+
const r = Ye(t._zod.def, {
|
|
261
261
|
get shape() {
|
|
262
262
|
const n = t._zod.def.shape, u = { ...n };
|
|
263
263
|
if (i)
|
|
@@ -275,14 +275,14 @@ function rn(e, t, i) {
|
|
|
275
275
|
type: "optional",
|
|
276
276
|
innerType: n[h]
|
|
277
277
|
}) : n[h];
|
|
278
|
-
return
|
|
278
|
+
return Je(this, "shape", u), u;
|
|
279
279
|
},
|
|
280
280
|
checks: []
|
|
281
281
|
});
|
|
282
282
|
return Ge(t, r);
|
|
283
283
|
}
|
|
284
284
|
function sn(e, t, i) {
|
|
285
|
-
const r =
|
|
285
|
+
const r = Ye(t._zod.def, {
|
|
286
286
|
get shape() {
|
|
287
287
|
const n = t._zod.def.shape, u = { ...n };
|
|
288
288
|
if (i)
|
|
@@ -300,13 +300,13 @@ function sn(e, t, i) {
|
|
|
300
300
|
type: "nonoptional",
|
|
301
301
|
innerType: n[h]
|
|
302
302
|
});
|
|
303
|
-
return
|
|
303
|
+
return Je(this, "shape", u), u;
|
|
304
304
|
},
|
|
305
305
|
checks: []
|
|
306
306
|
});
|
|
307
307
|
return Ge(t, r);
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function it(e, t = 0) {
|
|
310
310
|
if (e.aborted === !0)
|
|
311
311
|
return !0;
|
|
312
312
|
for (let i = t; i < e.issues.length; i++)
|
|
@@ -314,7 +314,7 @@ function tt(e, t = 0) {
|
|
|
314
314
|
return !0;
|
|
315
315
|
return !1;
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function rt(e, t) {
|
|
318
318
|
return t.map((i) => {
|
|
319
319
|
var r;
|
|
320
320
|
return (r = i).path ?? (r.path = []), i.path.unshift(e), i;
|
|
@@ -331,10 +331,10 @@ function qe(e, t, i) {
|
|
|
331
331
|
}
|
|
332
332
|
return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function ki(e) {
|
|
335
335
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function _t(...e) {
|
|
338
338
|
const [t, i, r] = e;
|
|
339
339
|
return typeof t == "string" ? {
|
|
340
340
|
message: t,
|
|
@@ -350,7 +350,7 @@ const Nr = (e, t) => {
|
|
|
350
350
|
}), Object.defineProperty(e, "issues", {
|
|
351
351
|
value: t,
|
|
352
352
|
enumerable: !1
|
|
353
|
-
}), e.message = JSON.stringify(t,
|
|
353
|
+
}), e.message = JSON.stringify(t, li, 2), Object.defineProperty(e, "toString", {
|
|
354
354
|
value: () => e.message,
|
|
355
355
|
enumerable: !1
|
|
356
356
|
});
|
|
@@ -382,16 +382,16 @@ function an(e, t = (i) => i.message) {
|
|
|
382
382
|
};
|
|
383
383
|
return r(e), i;
|
|
384
384
|
}
|
|
385
|
-
const
|
|
385
|
+
const wi = (e) => (t, i, r, n) => {
|
|
386
386
|
const u = r ? Object.assign(r, { async: !1 }) : { async: !1 }, h = t._zod.run({ value: i, issues: [] }, u);
|
|
387
387
|
if (h instanceof Promise)
|
|
388
|
-
throw new
|
|
388
|
+
throw new st();
|
|
389
389
|
if (h.issues.length) {
|
|
390
390
|
const d = new (n?.Err ?? e)(h.issues.map((y) => qe(y, u, Ue())));
|
|
391
391
|
throw Er(d, n?.callee), d;
|
|
392
392
|
}
|
|
393
393
|
return h.value;
|
|
394
|
-
},
|
|
394
|
+
}, Si = (e) => async (t, i, r, n) => {
|
|
395
395
|
const u = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
396
396
|
let h = t._zod.run({ value: i, issues: [] }, u);
|
|
397
397
|
if (h instanceof Promise && (h = await h), h.issues.length) {
|
|
@@ -402,7 +402,7 @@ const ki = (e) => (t, i, r, n) => {
|
|
|
402
402
|
}, qt = (e) => (t, i, r) => {
|
|
403
403
|
const n = r ? { ...r, async: !1 } : { async: !1 }, u = t._zod.run({ value: i, issues: [] }, n);
|
|
404
404
|
if (u instanceof Promise)
|
|
405
|
-
throw new
|
|
405
|
+
throw new st();
|
|
406
406
|
return u.issues.length ? {
|
|
407
407
|
success: !1,
|
|
408
408
|
error: new (e ?? Lr)(u.issues.map((h) => qe(h, n, Ue())))
|
|
@@ -415,12 +415,12 @@ const ki = (e) => (t, i, r, n) => {
|
|
|
415
415
|
error: new e(u.issues.map((h) => qe(h, n, Ue())))
|
|
416
416
|
} : { success: !0, data: u.value };
|
|
417
417
|
}, un = /* @__PURE__ */ Ht(Or), cn = (e) => (t, i, r) => {
|
|
418
|
-
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
419
|
-
return ki(e)(t, i, n);
|
|
420
|
-
}, hn = (e) => (t, i, r) => ki(e)(t, i, r), ln = (e) => async (t, i, r) => {
|
|
421
418
|
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
422
419
|
return wi(e)(t, i, n);
|
|
423
|
-
},
|
|
420
|
+
}, hn = (e) => (t, i, r) => wi(e)(t, i, r), ln = (e) => async (t, i, r) => {
|
|
421
|
+
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
422
|
+
return Si(e)(t, i, n);
|
|
423
|
+
}, pn = (e) => async (t, i, r) => Si(e)(t, i, r), fn = (e) => (t, i, r) => {
|
|
424
424
|
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
425
425
|
return qt(e)(t, i, n);
|
|
426
426
|
}, dn = (e) => (t, i, r) => qt(e)(t, i, r), mn = (e) => async (t, i, r) => {
|
|
@@ -447,7 +447,7 @@ function Mn(e) {
|
|
|
447
447
|
const Vn = (e) => {
|
|
448
448
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
449
449
|
return new RegExp(`^${t}$`);
|
|
450
|
-
}, zn = /^-?\d+$/, jn = /^-?\d+(?:\.\d+)?/, Fn = /^(?:true|false)$/i, $n = /^[^A-Z]*$/, Bn = /^[^a-z]*$/,
|
|
450
|
+
}, zn = /^-?\d+$/, jn = /^-?\d+(?:\.\d+)?/, Fn = /^(?:true|false)$/i, $n = /^[^A-Z]*$/, Bn = /^[^a-z]*$/, me = /* @__PURE__ */ k("$ZodCheck", (e, t) => {
|
|
451
451
|
var i;
|
|
452
452
|
e._zod ?? (e._zod = {}), e._zod.def = t, (i = e._zod).onattach ?? (i.onattach = []);
|
|
453
453
|
}), Vr = {
|
|
@@ -455,7 +455,7 @@ const Vn = (e) => {
|
|
|
455
455
|
bigint: "bigint",
|
|
456
456
|
object: "date"
|
|
457
457
|
}, zr = /* @__PURE__ */ k("$ZodCheckLessThan", (e, t) => {
|
|
458
|
-
|
|
458
|
+
me.init(e, t);
|
|
459
459
|
const i = Vr[typeof t.value];
|
|
460
460
|
e._zod.onattach.push((r) => {
|
|
461
461
|
const n = r._zod.bag, u = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
@@ -472,7 +472,7 @@ const Vn = (e) => {
|
|
|
472
472
|
});
|
|
473
473
|
};
|
|
474
474
|
}), jr = /* @__PURE__ */ k("$ZodCheckGreaterThan", (e, t) => {
|
|
475
|
-
|
|
475
|
+
me.init(e, t);
|
|
476
476
|
const i = Vr[typeof t.value];
|
|
477
477
|
e._zod.onattach.push((r) => {
|
|
478
478
|
const n = r._zod.bag, u = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
@@ -489,7 +489,7 @@ const Vn = (e) => {
|
|
|
489
489
|
});
|
|
490
490
|
};
|
|
491
491
|
}), Zn = /* @__PURE__ */ k("$ZodCheckMultipleOf", (e, t) => {
|
|
492
|
-
|
|
492
|
+
me.init(e, t), e._zod.onattach.push((i) => {
|
|
493
493
|
var r;
|
|
494
494
|
(r = i._zod.bag).multipleOf ?? (r.multipleOf = t.value);
|
|
495
495
|
}), e._zod.check = (i) => {
|
|
@@ -505,7 +505,7 @@ const Vn = (e) => {
|
|
|
505
505
|
});
|
|
506
506
|
};
|
|
507
507
|
}), Un = /* @__PURE__ */ k("$ZodCheckNumberFormat", (e, t) => {
|
|
508
|
-
|
|
508
|
+
me.init(e, t), t.format = t.format || "float64";
|
|
509
509
|
const i = t.format?.includes("int"), r = i ? "int" : "number", [n, u] = Xs[t.format];
|
|
510
510
|
e._zod.onattach.push((h) => {
|
|
511
511
|
const d = h._zod.bag;
|
|
@@ -563,9 +563,9 @@ const Vn = (e) => {
|
|
|
563
563
|
};
|
|
564
564
|
}), qn = /* @__PURE__ */ k("$ZodCheckMaxLength", (e, t) => {
|
|
565
565
|
var i;
|
|
566
|
-
|
|
566
|
+
me.init(e, t), (i = e._zod.def).when ?? (i.when = (r) => {
|
|
567
567
|
const n = r.value;
|
|
568
|
-
return !
|
|
568
|
+
return !bi(n) && n.length !== void 0;
|
|
569
569
|
}), e._zod.onattach.push((r) => {
|
|
570
570
|
const n = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
571
571
|
t.maximum < n && (r._zod.bag.maximum = t.maximum);
|
|
@@ -573,7 +573,7 @@ const Vn = (e) => {
|
|
|
573
573
|
const n = r.value;
|
|
574
574
|
if (n.length <= t.maximum)
|
|
575
575
|
return;
|
|
576
|
-
const h =
|
|
576
|
+
const h = ki(n);
|
|
577
577
|
r.issues.push({
|
|
578
578
|
origin: h,
|
|
579
579
|
code: "too_big",
|
|
@@ -586,9 +586,9 @@ const Vn = (e) => {
|
|
|
586
586
|
};
|
|
587
587
|
}), Hn = /* @__PURE__ */ k("$ZodCheckMinLength", (e, t) => {
|
|
588
588
|
var i;
|
|
589
|
-
|
|
589
|
+
me.init(e, t), (i = e._zod.def).when ?? (i.when = (r) => {
|
|
590
590
|
const n = r.value;
|
|
591
|
-
return !
|
|
591
|
+
return !bi(n) && n.length !== void 0;
|
|
592
592
|
}), e._zod.onattach.push((r) => {
|
|
593
593
|
const n = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
594
594
|
t.minimum > n && (r._zod.bag.minimum = t.minimum);
|
|
@@ -596,7 +596,7 @@ const Vn = (e) => {
|
|
|
596
596
|
const n = r.value;
|
|
597
597
|
if (n.length >= t.minimum)
|
|
598
598
|
return;
|
|
599
|
-
const h =
|
|
599
|
+
const h = ki(n);
|
|
600
600
|
r.issues.push({
|
|
601
601
|
origin: h,
|
|
602
602
|
code: "too_small",
|
|
@@ -609,9 +609,9 @@ const Vn = (e) => {
|
|
|
609
609
|
};
|
|
610
610
|
}), Gn = /* @__PURE__ */ k("$ZodCheckLengthEquals", (e, t) => {
|
|
611
611
|
var i;
|
|
612
|
-
|
|
612
|
+
me.init(e, t), (i = e._zod.def).when ?? (i.when = (r) => {
|
|
613
613
|
const n = r.value;
|
|
614
|
-
return !
|
|
614
|
+
return !bi(n) && n.length !== void 0;
|
|
615
615
|
}), e._zod.onattach.push((r) => {
|
|
616
616
|
const n = r._zod.bag;
|
|
617
617
|
n.minimum = t.length, n.maximum = t.length, n.length = t.length;
|
|
@@ -619,7 +619,7 @@ const Vn = (e) => {
|
|
|
619
619
|
const n = r.value, u = n.length;
|
|
620
620
|
if (u === t.length)
|
|
621
621
|
return;
|
|
622
|
-
const h =
|
|
622
|
+
const h = ki(n), d = u > t.length;
|
|
623
623
|
r.issues.push({
|
|
624
624
|
origin: h,
|
|
625
625
|
...d ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
|
|
@@ -632,7 +632,7 @@ const Vn = (e) => {
|
|
|
632
632
|
};
|
|
633
633
|
}), Gt = /* @__PURE__ */ k("$ZodCheckStringFormat", (e, t) => {
|
|
634
634
|
var i, r;
|
|
635
|
-
|
|
635
|
+
me.init(e, t), e._zod.onattach.push((n) => {
|
|
636
636
|
const u = n._zod.bag;
|
|
637
637
|
u.format = t.format, t.pattern && (u.patterns ?? (u.patterns = /* @__PURE__ */ new Set()), u.patterns.add(t.pattern));
|
|
638
638
|
}), t.pattern ? (i = e._zod).check ?? (i.check = (n) => {
|
|
@@ -664,8 +664,8 @@ const Vn = (e) => {
|
|
|
664
664
|
}), Xn = /* @__PURE__ */ k("$ZodCheckUpperCase", (e, t) => {
|
|
665
665
|
t.pattern ?? (t.pattern = Bn), Gt.init(e, t);
|
|
666
666
|
}), Jn = /* @__PURE__ */ k("$ZodCheckIncludes", (e, t) => {
|
|
667
|
-
|
|
668
|
-
const i =
|
|
667
|
+
me.init(e, t);
|
|
668
|
+
const i = at(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${i}` : i);
|
|
669
669
|
t.pattern = r, e._zod.onattach.push((n) => {
|
|
670
670
|
const u = n._zod.bag;
|
|
671
671
|
u.patterns ?? (u.patterns = /* @__PURE__ */ new Set()), u.patterns.add(r);
|
|
@@ -681,8 +681,8 @@ const Vn = (e) => {
|
|
|
681
681
|
});
|
|
682
682
|
};
|
|
683
683
|
}), Yn = /* @__PURE__ */ k("$ZodCheckStartsWith", (e, t) => {
|
|
684
|
-
|
|
685
|
-
const i = new RegExp(`^${
|
|
684
|
+
me.init(e, t);
|
|
685
|
+
const i = new RegExp(`^${at(t.prefix)}.*`);
|
|
686
686
|
t.pattern ?? (t.pattern = i), e._zod.onattach.push((r) => {
|
|
687
687
|
const n = r._zod.bag;
|
|
688
688
|
n.patterns ?? (n.patterns = /* @__PURE__ */ new Set()), n.patterns.add(i);
|
|
@@ -698,8 +698,8 @@ const Vn = (e) => {
|
|
|
698
698
|
});
|
|
699
699
|
};
|
|
700
700
|
}), Qn = /* @__PURE__ */ k("$ZodCheckEndsWith", (e, t) => {
|
|
701
|
-
|
|
702
|
-
const i = new RegExp(`.*${
|
|
701
|
+
me.init(e, t);
|
|
702
|
+
const i = new RegExp(`.*${at(t.suffix)}$`);
|
|
703
703
|
t.pattern ?? (t.pattern = i), e._zod.onattach.push((r) => {
|
|
704
704
|
const n = r._zod.bag;
|
|
705
705
|
n.patterns ?? (n.patterns = /* @__PURE__ */ new Set()), n.patterns.add(i);
|
|
@@ -715,7 +715,7 @@ const Vn = (e) => {
|
|
|
715
715
|
});
|
|
716
716
|
};
|
|
717
717
|
}), ea = /* @__PURE__ */ k("$ZodCheckOverwrite", (e, t) => {
|
|
718
|
-
|
|
718
|
+
me.init(e, t), e._zod.check = (i) => {
|
|
719
719
|
i.value = t.tx(i.value);
|
|
720
720
|
};
|
|
721
721
|
});
|
|
@@ -760,7 +760,7 @@ const ia = {
|
|
|
760
760
|
});
|
|
761
761
|
else {
|
|
762
762
|
const n = (h, d, y) => {
|
|
763
|
-
let o =
|
|
763
|
+
let o = it(h), w;
|
|
764
764
|
for (const S of d) {
|
|
765
765
|
if (S._zod.def.when) {
|
|
766
766
|
if (!S._zod.def.when(h))
|
|
@@ -769,25 +769,25 @@ const ia = {
|
|
|
769
769
|
continue;
|
|
770
770
|
const A = h.issues.length, F = S._zod.check(h);
|
|
771
771
|
if (F instanceof Promise && y?.async === !1)
|
|
772
|
-
throw new
|
|
772
|
+
throw new st();
|
|
773
773
|
if (w || F instanceof Promise)
|
|
774
774
|
w = (w ?? Promise.resolve()).then(async () => {
|
|
775
|
-
await F, h.issues.length !== A && (o || (o =
|
|
775
|
+
await F, h.issues.length !== A && (o || (o = it(h, A)));
|
|
776
776
|
});
|
|
777
777
|
else {
|
|
778
778
|
if (h.issues.length === A)
|
|
779
779
|
continue;
|
|
780
|
-
o || (o =
|
|
780
|
+
o || (o = it(h, A));
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
783
|
return w ? w.then(() => h) : h;
|
|
784
784
|
}, u = (h, d, y) => {
|
|
785
|
-
if (
|
|
785
|
+
if (it(h))
|
|
786
786
|
return h.aborted = !0, h;
|
|
787
787
|
const o = n(d, r, y);
|
|
788
788
|
if (o instanceof Promise) {
|
|
789
789
|
if (y.async === !1)
|
|
790
|
-
throw new
|
|
790
|
+
throw new st();
|
|
791
791
|
return o.then((w) => e._zod.parse(w, y));
|
|
792
792
|
}
|
|
793
793
|
return e._zod.parse(o, y);
|
|
@@ -802,7 +802,7 @@ const ia = {
|
|
|
802
802
|
const y = e._zod.parse(h, d);
|
|
803
803
|
if (y instanceof Promise) {
|
|
804
804
|
if (d.async === !1)
|
|
805
|
-
throw new
|
|
805
|
+
throw new st();
|
|
806
806
|
return y.then((o) => n(o, r, d));
|
|
807
807
|
}
|
|
808
808
|
return n(y, r, d);
|
|
@@ -820,7 +820,7 @@ const ia = {
|
|
|
820
820
|
vendor: "zod",
|
|
821
821
|
version: 1
|
|
822
822
|
};
|
|
823
|
-
}),
|
|
823
|
+
}), Ti = /* @__PURE__ */ k("$ZodString", (e, t) => {
|
|
824
824
|
Y.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Vn(e._zod.bag), e._zod.parse = (i, r) => {
|
|
825
825
|
if (t.coerce)
|
|
826
826
|
try {
|
|
@@ -835,7 +835,7 @@ const ia = {
|
|
|
835
835
|
}), i;
|
|
836
836
|
};
|
|
837
837
|
}), W = /* @__PURE__ */ k("$ZodStringFormat", (e, t) => {
|
|
838
|
-
Gt.init(e, t),
|
|
838
|
+
Gt.init(e, t), Ti.init(e, t);
|
|
839
839
|
}), ra = /* @__PURE__ */ k("$ZodGUID", (e, t) => {
|
|
840
840
|
t.pattern ?? (t.pattern = Sn), W.init(e, t);
|
|
841
841
|
}), sa = /* @__PURE__ */ k("$ZodUUID", (e, t) => {
|
|
@@ -1068,7 +1068,7 @@ const Ca = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
|
1068
1068
|
}), i);
|
|
1069
1069
|
});
|
|
1070
1070
|
function Zi(e, t, i) {
|
|
1071
|
-
e.issues.length && t.issues.push(...
|
|
1071
|
+
e.issues.length && t.issues.push(...rt(i, e.issues)), t.value[i] = e.value;
|
|
1072
1072
|
}
|
|
1073
1073
|
const La = /* @__PURE__ */ k("$ZodArray", (e, t) => {
|
|
1074
1074
|
Y.init(e, t), e._zod.parse = (i, r) => {
|
|
@@ -1093,7 +1093,7 @@ const La = /* @__PURE__ */ k("$ZodArray", (e, t) => {
|
|
|
1093
1093
|
};
|
|
1094
1094
|
});
|
|
1095
1095
|
function Vt(e, t, i, r) {
|
|
1096
|
-
e.issues.length && t.issues.push(...
|
|
1096
|
+
e.issues.length && t.issues.push(...rt(i, e.issues)), e.value === void 0 ? i in r && (t.value[i] = void 0) : t.value[i] = e.value;
|
|
1097
1097
|
}
|
|
1098
1098
|
function Br(e) {
|
|
1099
1099
|
const t = Object.keys(e.shape);
|
|
@@ -1140,7 +1140,7 @@ const Oa = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1140
1140
|
}
|
|
1141
1141
|
});
|
|
1142
1142
|
}
|
|
1143
|
-
const r =
|
|
1143
|
+
const r = gi(() => Br(t));
|
|
1144
1144
|
U(e._zod, "propValues", () => {
|
|
1145
1145
|
const d = t.shape, y = {};
|
|
1146
1146
|
for (const o in d) {
|
|
@@ -1169,14 +1169,14 @@ const Oa = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1169
1169
|
const w = [], S = h.shape;
|
|
1170
1170
|
for (const A of h.keys) {
|
|
1171
1171
|
const Z = S[A]._zod.run({ value: o[A], issues: [] }, y);
|
|
1172
|
-
Z instanceof Promise ? w.push(Z.then((
|
|
1172
|
+
Z instanceof Promise ? w.push(Z.then((le) => Vt(le, d, A, o))) : Vt(Z, d, A, o);
|
|
1173
1173
|
}
|
|
1174
1174
|
return u ? Zr(w, o, d, y, r.value, e) : w.length ? Promise.all(w).then(() => d) : d;
|
|
1175
1175
|
};
|
|
1176
1176
|
}), Ra = /* @__PURE__ */ k("$ZodObjectJIT", (e, t) => {
|
|
1177
1177
|
Oa.init(e, t);
|
|
1178
|
-
const i = e._zod.parse, r =
|
|
1179
|
-
const F = new ta(["shape", "payload", "ctx"]), Z = r.value,
|
|
1178
|
+
const i = e._zod.parse, r = gi(() => Br(t)), n = (A) => {
|
|
1179
|
+
const F = new ta(["shape", "payload", "ctx"]), Z = r.value, le = (Ae) => {
|
|
1180
1180
|
const _e = $i(Ae);
|
|
1181
1181
|
return `shape[${_e}]._zod.run({ value: input[${_e}], issues: [] }, ctx)`;
|
|
1182
1182
|
};
|
|
@@ -1188,7 +1188,7 @@ const Oa = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1188
1188
|
F.write("const newResult = {};");
|
|
1189
1189
|
for (const Ae of Z.keys) {
|
|
1190
1190
|
const _e = D[Ae], Ke = $i(Ae);
|
|
1191
|
-
F.write(`const ${_e} = ${
|
|
1191
|
+
F.write(`const ${_e} = ${le(Ae)};`), F.write(`
|
|
1192
1192
|
if (${_e}.issues.length) {
|
|
1193
1193
|
payload.issues = payload.issues.concat(${_e}.issues.map(iss => ({
|
|
1194
1194
|
...iss,
|
|
@@ -1208,8 +1208,8 @@ const Oa = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1208
1208
|
`);
|
|
1209
1209
|
}
|
|
1210
1210
|
F.write("payload.value = newResult;"), F.write("return payload;");
|
|
1211
|
-
const
|
|
1212
|
-
return (Ae, _e) =>
|
|
1211
|
+
const dt = F.compile();
|
|
1212
|
+
return (Ae, _e) => dt(A, Ae, _e);
|
|
1213
1213
|
};
|
|
1214
1214
|
let u;
|
|
1215
1215
|
const h = Mt, d = !Ar.jitless, o = d && Gs.value, w = t.catchall;
|
|
@@ -1229,7 +1229,7 @@ function Ui(e, t, i, r) {
|
|
|
1229
1229
|
for (const u of e)
|
|
1230
1230
|
if (u.issues.length === 0)
|
|
1231
1231
|
return t.value = u.value, t;
|
|
1232
|
-
const n = e.filter((u) => !
|
|
1232
|
+
const n = e.filter((u) => !it(u));
|
|
1233
1233
|
return n.length === 1 ? (t.value = n[0].value, n[0]) : (t.issues.push({
|
|
1234
1234
|
code: "invalid_union",
|
|
1235
1235
|
input: t.value,
|
|
@@ -1244,7 +1244,7 @@ const Da = /* @__PURE__ */ k("$ZodUnion", (e, t) => {
|
|
|
1244
1244
|
}), U(e._zod, "pattern", () => {
|
|
1245
1245
|
if (t.options.every((n) => n._zod.pattern)) {
|
|
1246
1246
|
const n = t.options.map((u) => u._zod.pattern);
|
|
1247
|
-
return new RegExp(`^(${n.map((u) =>
|
|
1247
|
+
return new RegExp(`^(${n.map((u) => _i(u.source)).join("|")})$`);
|
|
1248
1248
|
}
|
|
1249
1249
|
});
|
|
1250
1250
|
const i = t.options.length === 1, r = t.options[0]._zod.run;
|
|
@@ -1274,15 +1274,15 @@ const Da = /* @__PURE__ */ k("$ZodUnion", (e, t) => {
|
|
|
1274
1274
|
return u instanceof Promise || h instanceof Promise ? Promise.all([u, h]).then(([y, o]) => qi(i, y, o)) : qi(i, u, h);
|
|
1275
1275
|
};
|
|
1276
1276
|
});
|
|
1277
|
-
function
|
|
1277
|
+
function pi(e, t) {
|
|
1278
1278
|
if (e === t)
|
|
1279
1279
|
return { valid: !0, data: e };
|
|
1280
1280
|
if (e instanceof Date && t instanceof Date && +e == +t)
|
|
1281
1281
|
return { valid: !0, data: e };
|
|
1282
|
-
if (
|
|
1282
|
+
if (nt(e) && nt(t)) {
|
|
1283
1283
|
const i = Object.keys(t), r = Object.keys(e).filter((u) => i.indexOf(u) !== -1), n = { ...e, ...t };
|
|
1284
1284
|
for (const u of r) {
|
|
1285
|
-
const h =
|
|
1285
|
+
const h = pi(e[u], t[u]);
|
|
1286
1286
|
if (!h.valid)
|
|
1287
1287
|
return {
|
|
1288
1288
|
valid: !1,
|
|
@@ -1297,7 +1297,7 @@ function li(e, t) {
|
|
|
1297
1297
|
return { valid: !1, mergeErrorPath: [] };
|
|
1298
1298
|
const i = [];
|
|
1299
1299
|
for (let r = 0; r < e.length; r++) {
|
|
1300
|
-
const n = e[r], u = t[r], h =
|
|
1300
|
+
const n = e[r], u = t[r], h = pi(n, u);
|
|
1301
1301
|
if (!h.valid)
|
|
1302
1302
|
return {
|
|
1303
1303
|
valid: !1,
|
|
@@ -1310,9 +1310,9 @@ function li(e, t) {
|
|
|
1310
1310
|
return { valid: !1, mergeErrorPath: [] };
|
|
1311
1311
|
}
|
|
1312
1312
|
function qi(e, t, i) {
|
|
1313
|
-
if (t.issues.length && e.issues.push(...t.issues), i.issues.length && e.issues.push(...i.issues),
|
|
1313
|
+
if (t.issues.length && e.issues.push(...t.issues), i.issues.length && e.issues.push(...i.issues), it(e))
|
|
1314
1314
|
return e;
|
|
1315
|
-
const r =
|
|
1315
|
+
const r = pi(t.value, i.value);
|
|
1316
1316
|
if (!r.valid)
|
|
1317
1317
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
|
|
1318
1318
|
return e.value = r.data, e;
|
|
@@ -1320,7 +1320,7 @@ function qi(e, t, i) {
|
|
|
1320
1320
|
const Va = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
1321
1321
|
Y.init(e, t), e._zod.parse = (i, r) => {
|
|
1322
1322
|
const n = i.value;
|
|
1323
|
-
if (!
|
|
1323
|
+
if (!nt(n))
|
|
1324
1324
|
return i.issues.push({
|
|
1325
1325
|
expected: "record",
|
|
1326
1326
|
code: "invalid_type",
|
|
@@ -1336,8 +1336,8 @@ const Va = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1336
1336
|
d.add(typeof o == "number" ? o.toString() : o);
|
|
1337
1337
|
const w = t.valueType._zod.run({ value: n[o], issues: [] }, r);
|
|
1338
1338
|
w instanceof Promise ? u.push(w.then((S) => {
|
|
1339
|
-
S.issues.length && i.issues.push(...
|
|
1340
|
-
})) : (w.issues.length && i.issues.push(...
|
|
1339
|
+
S.issues.length && i.issues.push(...rt(o, S.issues)), i.value[o] = S.value;
|
|
1340
|
+
})) : (w.issues.length && i.issues.push(...rt(o, w.issues)), i.value[o] = w.value);
|
|
1341
1341
|
}
|
|
1342
1342
|
let y;
|
|
1343
1343
|
for (const o in n)
|
|
@@ -1369,8 +1369,8 @@ const Va = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1369
1369
|
}
|
|
1370
1370
|
const o = t.valueType._zod.run({ value: n[d], issues: [] }, r);
|
|
1371
1371
|
o instanceof Promise ? u.push(o.then((w) => {
|
|
1372
|
-
w.issues.length && i.issues.push(...
|
|
1373
|
-
})) : (o.issues.length && i.issues.push(...
|
|
1372
|
+
w.issues.length && i.issues.push(...rt(d, w.issues)), i.value[y.value] = w.value;
|
|
1373
|
+
})) : (o.issues.length && i.issues.push(...rt(d, o.issues)), i.value[y.value] = o.value);
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
1376
|
return u.length ? Promise.all(u).then(() => i) : i;
|
|
@@ -1378,7 +1378,7 @@ const Va = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1378
1378
|
}), za = /* @__PURE__ */ k("$ZodEnum", (e, t) => {
|
|
1379
1379
|
Y.init(e, t);
|
|
1380
1380
|
const i = Us(t.entries), r = new Set(i);
|
|
1381
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${i.filter((n) => Ws.has(typeof n)).map((n) => typeof n == "string" ?
|
|
1381
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${i.filter((n) => Ws.has(typeof n)).map((n) => typeof n == "string" ? at(n) : n.toString()).join("|")})$`), e._zod.parse = (n, u) => {
|
|
1382
1382
|
const h = n.value;
|
|
1383
1383
|
return r.has(h) || n.issues.push({
|
|
1384
1384
|
code: "invalid_value",
|
|
@@ -1391,7 +1391,7 @@ const Va = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1391
1391
|
if (Y.init(e, t), t.values.length === 0)
|
|
1392
1392
|
throw new Error("Cannot create literal schema with no valid values");
|
|
1393
1393
|
const i = new Set(t.values);
|
|
1394
|
-
e._zod.values = i, e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ?
|
|
1394
|
+
e._zod.values = i, e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ? at(r) : r ? at(r.toString()) : String(r)).join("|")})$`), e._zod.parse = (r, n) => {
|
|
1395
1395
|
const u = r.value;
|
|
1396
1396
|
return i.has(u) || r.issues.push({
|
|
1397
1397
|
code: "invalid_value",
|
|
@@ -1408,7 +1408,7 @@ const Va = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1408
1408
|
if (r.async)
|
|
1409
1409
|
return (n instanceof Promise ? n : Promise.resolve(n)).then((h) => (i.value = h, i));
|
|
1410
1410
|
if (n instanceof Promise)
|
|
1411
|
-
throw new
|
|
1411
|
+
throw new st();
|
|
1412
1412
|
return i.value = n, i;
|
|
1413
1413
|
};
|
|
1414
1414
|
});
|
|
@@ -1418,7 +1418,7 @@ function Hi(e, t) {
|
|
|
1418
1418
|
const $a = /* @__PURE__ */ k("$ZodOptional", (e, t) => {
|
|
1419
1419
|
Y.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", U(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), U(e._zod, "pattern", () => {
|
|
1420
1420
|
const i = t.innerType._zod.pattern;
|
|
1421
|
-
return i ? new RegExp(`^(${
|
|
1421
|
+
return i ? new RegExp(`^(${_i(i.source)})?$`) : void 0;
|
|
1422
1422
|
}), e._zod.parse = (i, r) => {
|
|
1423
1423
|
if (t.innerType._zod.optin === "optional") {
|
|
1424
1424
|
const n = t.innerType._zod.run(i, r);
|
|
@@ -1429,7 +1429,7 @@ const $a = /* @__PURE__ */ k("$ZodOptional", (e, t) => {
|
|
|
1429
1429
|
}), Ba = /* @__PURE__ */ k("$ZodNullable", (e, t) => {
|
|
1430
1430
|
Y.init(e, t), U(e._zod, "optin", () => t.innerType._zod.optin), U(e._zod, "optout", () => t.innerType._zod.optout), U(e._zod, "pattern", () => {
|
|
1431
1431
|
const i = t.innerType._zod.pattern;
|
|
1432
|
-
return i ? new RegExp(`^(${
|
|
1432
|
+
return i ? new RegExp(`^(${_i(i.source)}|null)$`) : void 0;
|
|
1433
1433
|
}), U(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (i, r) => i.value === null ? i : t.innerType._zod.run(i, r);
|
|
1434
1434
|
}), Za = /* @__PURE__ */ k("$ZodDefault", (e, t) => {
|
|
1435
1435
|
Y.init(e, t), e._zod.optin = "optional", U(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (i, r) => {
|
|
@@ -1507,7 +1507,7 @@ function Ki(e) {
|
|
|
1507
1507
|
return e.value = Object.freeze(e.value), e;
|
|
1508
1508
|
}
|
|
1509
1509
|
const Ka = /* @__PURE__ */ k("$ZodCustom", (e, t) => {
|
|
1510
|
-
|
|
1510
|
+
me.init(e, t), Y.init(e, t), e._zod.parse = (i, r) => i, e._zod.check = (i) => {
|
|
1511
1511
|
const r = i.value, n = t.fn(r);
|
|
1512
1512
|
if (n instanceof Promise)
|
|
1513
1513
|
return n.then((u) => Xi(u, i, r, e));
|
|
@@ -1526,7 +1526,7 @@ function Xi(e, t, i, r) {
|
|
|
1526
1526
|
continue: !r._zod.def.abort
|
|
1527
1527
|
// params: inst._zod.def.params,
|
|
1528
1528
|
};
|
|
1529
|
-
r._zod.def.params && (n.params = r._zod.def.params), t.issues.push(
|
|
1529
|
+
r._zod.def.params && (n.params = r._zod.def.params), t.issues.push(_t(n));
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
1532
|
var Ji;
|
|
@@ -1853,7 +1853,7 @@ function Qi(e, t) {
|
|
|
1853
1853
|
inclusive: !1
|
|
1854
1854
|
});
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1856
|
+
function si(e, t) {
|
|
1857
1857
|
return new zr({
|
|
1858
1858
|
check: "less_than",
|
|
1859
1859
|
...R(t),
|
|
@@ -1869,7 +1869,7 @@ function er(e, t) {
|
|
|
1869
1869
|
inclusive: !1
|
|
1870
1870
|
});
|
|
1871
1871
|
}
|
|
1872
|
-
function
|
|
1872
|
+
function ni(e, t) {
|
|
1873
1873
|
return new jr({
|
|
1874
1874
|
check: "greater_than",
|
|
1875
1875
|
...R(t),
|
|
@@ -1951,26 +1951,26 @@ function Do(e, t) {
|
|
|
1951
1951
|
suffix: e
|
|
1952
1952
|
});
|
|
1953
1953
|
}
|
|
1954
|
-
function
|
|
1954
|
+
function ht(e) {
|
|
1955
1955
|
return new ea({
|
|
1956
1956
|
check: "overwrite",
|
|
1957
1957
|
tx: e
|
|
1958
1958
|
});
|
|
1959
1959
|
}
|
|
1960
1960
|
function Mo(e) {
|
|
1961
|
-
return
|
|
1961
|
+
return ht((t) => t.normalize(e));
|
|
1962
1962
|
}
|
|
1963
1963
|
function Vo() {
|
|
1964
|
-
return
|
|
1964
|
+
return ht((e) => e.trim());
|
|
1965
1965
|
}
|
|
1966
1966
|
function zo() {
|
|
1967
|
-
return
|
|
1967
|
+
return ht((e) => e.toLowerCase());
|
|
1968
1968
|
}
|
|
1969
1969
|
function jo() {
|
|
1970
|
-
return
|
|
1970
|
+
return ht((e) => e.toUpperCase());
|
|
1971
1971
|
}
|
|
1972
1972
|
function Fo() {
|
|
1973
|
-
return
|
|
1973
|
+
return ht((e) => Hs(e));
|
|
1974
1974
|
}
|
|
1975
1975
|
function $o(e, t, i) {
|
|
1976
1976
|
return new e({
|
|
@@ -1993,16 +1993,16 @@ function Bo(e, t, i) {
|
|
|
1993
1993
|
function Zo(e) {
|
|
1994
1994
|
const t = Uo((i) => (i.addIssue = (r) => {
|
|
1995
1995
|
if (typeof r == "string")
|
|
1996
|
-
i.issues.push(
|
|
1996
|
+
i.issues.push(_t(r, i.value, t._zod.def));
|
|
1997
1997
|
else {
|
|
1998
1998
|
const n = r;
|
|
1999
|
-
n.fatal && (n.continue = !1), n.code ?? (n.code = "custom"), n.input ?? (n.input = i.value), n.inst ?? (n.inst = t), n.continue ?? (n.continue = !t._zod.def.abort), i.issues.push(
|
|
1999
|
+
n.fatal && (n.continue = !1), n.code ?? (n.code = "custom"), n.input ?? (n.input = i.value), n.inst ?? (n.inst = t), n.continue ?? (n.continue = !t._zod.def.abort), i.issues.push(_t(n));
|
|
2000
2000
|
}
|
|
2001
2001
|
}, e(i.value, i)));
|
|
2002
2002
|
return t;
|
|
2003
2003
|
}
|
|
2004
2004
|
function Uo(e, t) {
|
|
2005
|
-
const i = new
|
|
2005
|
+
const i = new me({
|
|
2006
2006
|
check: "custom",
|
|
2007
2007
|
...R(t)
|
|
2008
2008
|
});
|
|
@@ -2044,13 +2044,13 @@ const Qo = (e, t) => {
|
|
|
2044
2044
|
},
|
|
2045
2045
|
addIssue: {
|
|
2046
2046
|
value: (i) => {
|
|
2047
|
-
e.issues.push(i), e.message = JSON.stringify(e.issues,
|
|
2047
|
+
e.issues.push(i), e.message = JSON.stringify(e.issues, li, 2);
|
|
2048
2048
|
}
|
|
2049
2049
|
// enumerable: false,
|
|
2050
2050
|
},
|
|
2051
2051
|
addIssues: {
|
|
2052
2052
|
value: (i) => {
|
|
2053
|
-
e.issues.push(...i), e.message = JSON.stringify(e.issues,
|
|
2053
|
+
e.issues.push(...i), e.message = JSON.stringify(e.issues, li, 2);
|
|
2054
2054
|
}
|
|
2055
2055
|
// enumerable: false,
|
|
2056
2056
|
},
|
|
@@ -2063,12 +2063,12 @@ const Qo = (e, t) => {
|
|
|
2063
2063
|
});
|
|
2064
2064
|
}, Pe = k("ZodError", Qo, {
|
|
2065
2065
|
Parent: Error
|
|
2066
|
-
}), eu = /* @__PURE__ */
|
|
2066
|
+
}), eu = /* @__PURE__ */ wi(Pe), tu = /* @__PURE__ */ Si(Pe), iu = /* @__PURE__ */ qt(Pe), ru = /* @__PURE__ */ Ht(Pe), su = /* @__PURE__ */ cn(Pe), nu = /* @__PURE__ */ hn(Pe), au = /* @__PURE__ */ ln(Pe), ou = /* @__PURE__ */ pn(Pe), uu = /* @__PURE__ */ fn(Pe), cu = /* @__PURE__ */ dn(Pe), hu = /* @__PURE__ */ mn(Pe), lu = /* @__PURE__ */ yn(Pe), ee = /* @__PURE__ */ k("ZodType", (e, t) => (Y.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...i) => e.clone(Ye(t, {
|
|
2067
2067
|
checks: [
|
|
2068
2068
|
...t.checks ?? [],
|
|
2069
2069
|
...i.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
2070
2070
|
]
|
|
2071
|
-
})), e.clone = (i, r) => Ge(e, i, r), e.brand = () => e, e.register = ((i, r) => (i.add(e, r), e)), e.parse = (i, r) => eu(e, i, r, { callee: e.parse }), e.safeParse = (i, r) => iu(e, i, r), e.parseAsync = async (i, r) => tu(e, i, r, { callee: e.parseAsync }), e.safeParseAsync = async (i, r) => ru(e, i, r), e.spa = e.safeParseAsync, e.encode = (i, r) => su(e, i, r), e.decode = (i, r) => nu(e, i, r), e.encodeAsync = async (i, r) => au(e, i, r), e.decodeAsync = async (i, r) => ou(e, i, r), e.safeEncode = (i, r) => uu(e, i, r), e.safeDecode = (i, r) => cu(e, i, r), e.safeEncodeAsync = async (i, r) => hu(e, i, r), e.safeDecodeAsync = async (i, r) => lu(e, i, r), e.refine = (i, r) => e.check(rc(i, r)), e.superRefine = (i) => e.check(sc(i)), e.overwrite = (i) => e.check(
|
|
2071
|
+
})), e.clone = (i, r) => Ge(e, i, r), e.brand = () => e, e.register = ((i, r) => (i.add(e, r), e)), e.parse = (i, r) => eu(e, i, r, { callee: e.parse }), e.safeParse = (i, r) => iu(e, i, r), e.parseAsync = async (i, r) => tu(e, i, r, { callee: e.parseAsync }), e.safeParseAsync = async (i, r) => ru(e, i, r), e.spa = e.safeParseAsync, e.encode = (i, r) => su(e, i, r), e.decode = (i, r) => nu(e, i, r), e.encodeAsync = async (i, r) => au(e, i, r), e.decodeAsync = async (i, r) => ou(e, i, r), e.safeEncode = (i, r) => uu(e, i, r), e.safeDecode = (i, r) => cu(e, i, r), e.safeEncodeAsync = async (i, r) => hu(e, i, r), e.safeDecodeAsync = async (i, r) => lu(e, i, r), e.refine = (i, r) => e.check(rc(i, r)), e.superRefine = (i) => e.check(sc(i)), e.overwrite = (i) => e.check(ht(i)), e.optional = () => nr(e), e.nullable = () => ar(e), e.nullish = () => nr(ar(e)), e.nonoptional = (i) => Xu(e, i), e.array = () => He(e), e.or = (i) => ae([e, i]), e.and = (i) => Fu(e, i), e.transform = (i) => or(e, Uu(i)), e.default = (i) => Gu(e, i), e.prefault = (i) => Ku(e, i), e.catch = (i) => Yu(e, i), e.pipe = (i) => or(e, i), e.readonly = () => tc(e), e.describe = (i) => {
|
|
2072
2072
|
const r = e.clone();
|
|
2073
2073
|
return Lt.add(r, { description: i }), r;
|
|
2074
2074
|
}, Object.defineProperty(e, "description", {
|
|
@@ -2082,11 +2082,11 @@ const Qo = (e, t) => {
|
|
|
2082
2082
|
const r = e.clone();
|
|
2083
2083
|
return Lt.add(r, i[0]), r;
|
|
2084
2084
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Hr = /* @__PURE__ */ k("_ZodString", (e, t) => {
|
|
2085
|
-
|
|
2085
|
+
Ti.init(e, t), ee.init(e, t);
|
|
2086
2086
|
const i = e._zod.bag;
|
|
2087
2087
|
e.format = i.format ?? null, e.minLength = i.minimum ?? null, e.maxLength = i.maximum ?? null, e.regex = (...r) => e.check(Io(...r)), e.includes = (...r) => e.check(Oo(...r)), e.startsWith = (...r) => e.check(Ro(...r)), e.endsWith = (...r) => e.check(Do(...r)), e.min = (...r) => e.check(zt(...r)), e.max = (...r) => e.check(Ur(...r)), e.length = (...r) => e.check(qr(...r)), e.nonempty = (...r) => e.check(zt(1, ...r)), e.lowercase = (r) => e.check(No(r)), e.uppercase = (r) => e.check(Lo(r)), e.trim = () => e.check(Vo()), e.normalize = (...r) => e.check(Mo(...r)), e.toLowerCase = () => e.check(zo()), e.toUpperCase = () => e.check(jo()), e.slugify = () => e.check(Fo());
|
|
2088
2088
|
}), pu = /* @__PURE__ */ k("ZodString", (e, t) => {
|
|
2089
|
-
|
|
2089
|
+
Ti.init(e, t), Hr.init(e, t), e.email = (i) => e.check(Qa(fu, i)), e.url = (i) => e.check(so(du, i)), e.jwt = (i) => e.check(bo(Eu, i)), e.emoji = (i) => e.check(no(mu, i)), e.guid = (i) => e.check(Yi(ir, i)), e.uuid = (i) => e.check(eo(Ot, i)), e.uuidv4 = (i) => e.check(to(Ot, i)), e.uuidv6 = (i) => e.check(io(Ot, i)), e.uuidv7 = (i) => e.check(ro(Ot, i)), e.nanoid = (i) => e.check(ao(yu, i)), e.guid = (i) => e.check(Yi(ir, i)), e.cuid = (i) => e.check(oo(vu, i)), e.cuid2 = (i) => e.check(uo(xu, i)), e.ulid = (i) => e.check(co(gu, i)), e.base64 = (i) => e.check(vo(Pu, i)), e.base64url = (i) => e.check(xo(Cu, i)), e.xid = (i) => e.check(ho(bu, i)), e.ksuid = (i) => e.check(lo(_u, i)), e.ipv4 = (i) => e.check(po(ku, i)), e.ipv6 = (i) => e.check(fo(wu, i)), e.cidrv4 = (i) => e.check(mo(Su, i)), e.cidrv6 = (i) => e.check(yo(Tu, i)), e.e164 = (i) => e.check(go(Au, i)), e.datetime = (i) => e.check(Ho(i)), e.date = (i) => e.check(Wo(i)), e.time = (i) => e.check(Xo(i)), e.duration = (i) => e.check(Yo(i));
|
|
2090
2090
|
});
|
|
2091
2091
|
function O(e) {
|
|
2092
2092
|
return Ya(pu, e);
|
|
@@ -2132,7 +2132,7 @@ const Q = /* @__PURE__ */ k("ZodStringFormat", (e, t) => {
|
|
|
2132
2132
|
}), Eu = /* @__PURE__ */ k("ZodJWT", (e, t) => {
|
|
2133
2133
|
Ca.init(e, t), Q.init(e, t);
|
|
2134
2134
|
}), Gr = /* @__PURE__ */ k("ZodNumber", (e, t) => {
|
|
2135
|
-
$r.init(e, t), ee.init(e, t), e.gt = (r, n) => e.check(er(r, n)), e.gte = (r, n) => e.check(
|
|
2135
|
+
$r.init(e, t), ee.init(e, t), e.gt = (r, n) => e.check(er(r, n)), e.gte = (r, n) => e.check(ni(r, n)), e.min = (r, n) => e.check(ni(r, n)), e.lt = (r, n) => e.check(Qi(r, n)), e.lte = (r, n) => e.check(si(r, n)), e.max = (r, n) => e.check(si(r, n)), e.int = (r) => e.check(rr(r)), e.safe = (r) => e.check(rr(r)), e.positive = (r) => e.check(er(0, r)), e.nonnegative = (r) => e.check(ni(0, r)), e.negative = (r) => e.check(Qi(0, r)), e.nonpositive = (r) => e.check(si(0, r)), e.multipleOf = (r, n) => e.check(tr(r, n)), e.step = (r, n) => e.check(tr(r, n)), e.finite = () => e;
|
|
2136
2136
|
const i = e._zod.bag;
|
|
2137
2137
|
e.minValue = Math.max(i.minimum ?? Number.NEGATIVE_INFINITY, i.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(i.maximum ?? Number.POSITIVE_INFINITY, i.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (i.format ?? "").includes("int") || Number.isSafeInteger(i.multipleOf ?? 0.5), e.isFinite = !0, e.format = i.format ?? null;
|
|
2138
2138
|
});
|
|
@@ -2183,7 +2183,7 @@ function Oe(e, t) {
|
|
|
2183
2183
|
const zu = /* @__PURE__ */ k("ZodUnion", (e, t) => {
|
|
2184
2184
|
Da.init(e, t), ee.init(e, t), e.options = t.options;
|
|
2185
2185
|
});
|
|
2186
|
-
function
|
|
2186
|
+
function ae(e, t) {
|
|
2187
2187
|
return new zu({
|
|
2188
2188
|
type: "union",
|
|
2189
2189
|
options: e,
|
|
@@ -2211,7 +2211,7 @@ function be(e, t, i) {
|
|
|
2211
2211
|
...R(i)
|
|
2212
2212
|
});
|
|
2213
2213
|
}
|
|
2214
|
-
const
|
|
2214
|
+
const fi = /* @__PURE__ */ k("ZodEnum", (e, t) => {
|
|
2215
2215
|
za.init(e, t), ee.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
2216
2216
|
const i = new Set(Object.keys(t.entries));
|
|
2217
2217
|
e.extract = (r, n) => {
|
|
@@ -2221,7 +2221,7 @@ const pi = /* @__PURE__ */ k("ZodEnum", (e, t) => {
|
|
|
2221
2221
|
u[h] = t.entries[h];
|
|
2222
2222
|
else
|
|
2223
2223
|
throw new Error(`Key ${h} not found in enum`);
|
|
2224
|
-
return new
|
|
2224
|
+
return new fi({
|
|
2225
2225
|
...t,
|
|
2226
2226
|
checks: [],
|
|
2227
2227
|
...R(n),
|
|
@@ -2234,7 +2234,7 @@ const pi = /* @__PURE__ */ k("ZodEnum", (e, t) => {
|
|
|
2234
2234
|
delete u[h];
|
|
2235
2235
|
else
|
|
2236
2236
|
throw new Error(`Key ${h} not found in enum`);
|
|
2237
|
-
return new
|
|
2237
|
+
return new fi({
|
|
2238
2238
|
...t,
|
|
2239
2239
|
checks: [],
|
|
2240
2240
|
...R(n),
|
|
@@ -2244,7 +2244,7 @@ const pi = /* @__PURE__ */ k("ZodEnum", (e, t) => {
|
|
|
2244
2244
|
});
|
|
2245
2245
|
function Wt(e, t) {
|
|
2246
2246
|
const i = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
2247
|
-
return new
|
|
2247
|
+
return new fi({
|
|
2248
2248
|
type: "enum",
|
|
2249
2249
|
entries: i,
|
|
2250
2250
|
...R(t)
|
|
@@ -2272,10 +2272,10 @@ const Zu = /* @__PURE__ */ k("ZodTransform", (e, t) => {
|
|
|
2272
2272
|
throw new Cr(e.constructor.name);
|
|
2273
2273
|
i.addIssue = (u) => {
|
|
2274
2274
|
if (typeof u == "string")
|
|
2275
|
-
i.issues.push(
|
|
2275
|
+
i.issues.push(_t(u, i.value, t));
|
|
2276
2276
|
else {
|
|
2277
2277
|
const h = u;
|
|
2278
|
-
h.fatal && (h.continue = !1), h.code ?? (h.code = "custom"), h.input ?? (h.input = i.value), h.inst ?? (h.inst = e), i.issues.push(
|
|
2278
|
+
h.fatal && (h.continue = !1), h.code ?? (h.code = "custom"), h.input ?? (h.input = i.value), h.inst ?? (h.inst = e), i.issues.push(_t(h));
|
|
2279
2279
|
}
|
|
2280
2280
|
};
|
|
2281
2281
|
const n = t.transform(i.value, i);
|
|
@@ -2403,7 +2403,7 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2403
2403
|
"presenter",
|
|
2404
2404
|
"presenterPresentation",
|
|
2405
2405
|
"tool"
|
|
2406
|
-
], hc = Wt(cc), lc =
|
|
2406
|
+
], hc = Wt(cc), lc = ae([b("en-au"), b("en-gb"), b("en-us"), b("es-es")]), pc = be(lc, O()), fc = Oe({
|
|
2407
2407
|
id: O(),
|
|
2408
2408
|
color: ac,
|
|
2409
2409
|
label: O()
|
|
@@ -2418,18 +2418,18 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2418
2418
|
status: fc.nullable().optional(),
|
|
2419
2419
|
statusId: uc,
|
|
2420
2420
|
typeId: hc
|
|
2421
|
-
}), mc =
|
|
2421
|
+
}), mc = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), yc = Oe({
|
|
2422
2422
|
id: O(),
|
|
2423
2423
|
label: O()
|
|
2424
2424
|
}), vc = Oe({
|
|
2425
2425
|
activeConnectionCount: Me().optional(),
|
|
2426
2426
|
canDescribe: Lu().optional(),
|
|
2427
2427
|
id: O().optional(),
|
|
2428
|
-
authMethodId:
|
|
2428
|
+
authMethodId: ae([b("apiKey"), b("disabled"), b("oAuth2"), b("none")]),
|
|
2429
2429
|
label: pc.optional(),
|
|
2430
2430
|
maxConnectionCount: Me().optional(),
|
|
2431
2431
|
params: He(be(O(), O())).optional()
|
|
2432
|
-
}), xc =
|
|
2432
|
+
}), xc = ae([b("application"), b("curatedDataset"), b("database"), b("fileStore")]), gc = ae([
|
|
2433
2433
|
b("abortOperation"),
|
|
2434
2434
|
b("authenticateConnection"),
|
|
2435
2435
|
b("createObject"),
|
|
@@ -2442,7 +2442,7 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2442
2442
|
b("removeRecords"),
|
|
2443
2443
|
b("retrieveRecords"),
|
|
2444
2444
|
b("upsertRecords")
|
|
2445
|
-
]), bc =
|
|
2445
|
+
]), bc = ae([b("bidirectional"), b("destination"), b("source"), b("unknown")]), _c = dc.extend({
|
|
2446
2446
|
typeId: mc,
|
|
2447
2447
|
version: O()
|
|
2448
2448
|
}), kc = _c.extend({
|
|
@@ -2455,7 +2455,7 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2455
2455
|
vendorAccountURL: O().nullable().optional(),
|
|
2456
2456
|
vendorDocumentationURL: O().nullable().optional(),
|
|
2457
2457
|
vendorHomeURL: O().nullable().optional()
|
|
2458
|
-
}), wc =
|
|
2458
|
+
}), wc = ae([b("amber"), b("green"), b("red"), b("other")]), Sc = ae([
|
|
2459
2459
|
b("alpha"),
|
|
2460
2460
|
b("beta"),
|
|
2461
2461
|
b("generalAvailability"),
|
|
@@ -2465,7 +2465,7 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2465
2465
|
b("releaseCandidate"),
|
|
2466
2466
|
b("unavailable"),
|
|
2467
2467
|
b("underReview")
|
|
2468
|
-
]), Tc =
|
|
2468
|
+
]), Tc = ae([
|
|
2469
2469
|
b("app"),
|
|
2470
2470
|
b("connector"),
|
|
2471
2471
|
b("connectorConnection"),
|
|
@@ -2512,7 +2512,7 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2512
2512
|
status: Pc.optional(),
|
|
2513
2513
|
statusId: Sc,
|
|
2514
2514
|
typeId: Tc
|
|
2515
|
-
}), Ac =
|
|
2515
|
+
}), Ac = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), Ec = Xr.extend({
|
|
2516
2516
|
typeId: Ac,
|
|
2517
2517
|
version: O()
|
|
2518
2518
|
}), Ic = Xr.extend({
|
|
@@ -2522,7 +2522,7 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2522
2522
|
models: He(Ic),
|
|
2523
2523
|
operations: He(Nc),
|
|
2524
2524
|
typeId: b("context")
|
|
2525
|
-
}), Oc =
|
|
2525
|
+
}), Oc = ae([b("amber"), b("green"), b("red"), b("other")]), Rc = ae([
|
|
2526
2526
|
b("alpha"),
|
|
2527
2527
|
b("beta"),
|
|
2528
2528
|
b("generalAvailability"),
|
|
@@ -2532,7 +2532,7 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2532
2532
|
b("releaseCandidate"),
|
|
2533
2533
|
b("unavailable"),
|
|
2534
2534
|
b("underReview")
|
|
2535
|
-
]), Dc =
|
|
2535
|
+
]), Dc = ae([
|
|
2536
2536
|
b("app"),
|
|
2537
2537
|
b("connector"),
|
|
2538
2538
|
b("connectorConnection"),
|
|
@@ -2579,26 +2579,26 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2579
2579
|
status: Mc.optional(),
|
|
2580
2580
|
statusId: Rc,
|
|
2581
2581
|
typeId: Dc
|
|
2582
|
-
}), jc =
|
|
2582
|
+
}), jc = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), Fc = zc.extend({
|
|
2583
2583
|
typeId: jc,
|
|
2584
2584
|
version: O()
|
|
2585
|
-
}), $c =
|
|
2585
|
+
}), $c = ae([b("list"), b("render"), b("setColorMode")]), Bc = Fc.extend({
|
|
2586
2586
|
presentations: He(Vc),
|
|
2587
2587
|
operations: He($c),
|
|
2588
2588
|
typeId: b("presenter")
|
|
2589
2589
|
});
|
|
2590
|
-
var Zc = [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], Jr = [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], Uc = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Yr = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",
|
|
2590
|
+
var Zc = [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], Jr = [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], Uc = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Yr = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", ai = {
|
|
2591
2591
|
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",
|
|
2592
2592
|
5: "class enum extends super const export import",
|
|
2593
2593
|
6: "enum",
|
|
2594
2594
|
strict: "implements interface let package private protected public static yield",
|
|
2595
2595
|
strictBind: "eval arguments"
|
|
2596
|
-
},
|
|
2597
|
-
5:
|
|
2598
|
-
"5module":
|
|
2599
|
-
6:
|
|
2596
|
+
}, oi = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", qc = {
|
|
2597
|
+
5: oi,
|
|
2598
|
+
"5module": oi + " export import",
|
|
2599
|
+
6: oi + " const class extends export import super"
|
|
2600
2600
|
}, Hc = /^in(stanceof)?$/, Gc = new RegExp("[" + Yr + "]"), Wc = new RegExp("[" + Yr + Uc + "]");
|
|
2601
|
-
function
|
|
2601
|
+
function di(e, t) {
|
|
2602
2602
|
for (var i = 65536, r = 0; r < t.length; r += 2) {
|
|
2603
2603
|
if (i += t[r], i > e)
|
|
2604
2604
|
return !1;
|
|
@@ -2608,10 +2608,10 @@ function fi(e, t) {
|
|
|
2608
2608
|
return !1;
|
|
2609
2609
|
}
|
|
2610
2610
|
function Ee(e, t) {
|
|
2611
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Gc.test(String.fromCharCode(e)) : t === !1 ? !1 :
|
|
2611
|
+
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Gc.test(String.fromCharCode(e)) : t === !1 ? !1 : di(e, Jr);
|
|
2612
2612
|
}
|
|
2613
2613
|
function Ve(e, t) {
|
|
2614
|
-
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Wc.test(String.fromCharCode(e)) : t === !1 ? !1 :
|
|
2614
|
+
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Wc.test(String.fromCharCode(e)) : t === !1 ? !1 : di(e, Jr) || di(e, Zc);
|
|
2615
2615
|
}
|
|
2616
2616
|
var z = function(t, i) {
|
|
2617
2617
|
i === void 0 && (i = {}), this.label = t, this.keyword = i.keyword, this.beforeExpr = !!i.beforeExpr, this.startsExpr = !!i.startsExpr, this.isLoop = !!i.isLoop, this.isAssign = !!i.isAssign, this.prefix = !!i.prefix, this.postfix = !!i.postfix, this.binop = i.binop || null, this.updateContext = null;
|
|
@@ -2619,16 +2619,16 @@ var z = function(t, i) {
|
|
|
2619
2619
|
function ke(e, t) {
|
|
2620
2620
|
return new z(e, { beforeExpr: !0, binop: t });
|
|
2621
2621
|
}
|
|
2622
|
-
var we = { beforeExpr: !0 },
|
|
2622
|
+
var we = { beforeExpr: !0 }, fe = { startsExpr: !0 }, ot = {};
|
|
2623
2623
|
function $(e, t) {
|
|
2624
|
-
return t === void 0 && (t = {}), t.keyword = e,
|
|
2624
|
+
return t === void 0 && (t = {}), t.keyword = e, ot[e] = new z(e, t);
|
|
2625
2625
|
}
|
|
2626
2626
|
var l = {
|
|
2627
|
-
num: new z("num",
|
|
2628
|
-
regexp: new z("regexp",
|
|
2629
|
-
string: new z("string",
|
|
2630
|
-
name: new z("name",
|
|
2631
|
-
privateId: new z("privateId",
|
|
2627
|
+
num: new z("num", fe),
|
|
2628
|
+
regexp: new z("regexp", fe),
|
|
2629
|
+
string: new z("string", fe),
|
|
2630
|
+
name: new z("name", fe),
|
|
2631
|
+
privateId: new z("privateId", fe),
|
|
2632
2632
|
eof: new z("eof"),
|
|
2633
2633
|
// Punctuation token types.
|
|
2634
2634
|
bracketL: new z("[", { beforeExpr: !0, startsExpr: !0 }),
|
|
@@ -2647,7 +2647,7 @@ var l = {
|
|
|
2647
2647
|
template: new z("template"),
|
|
2648
2648
|
invalidTemplate: new z("invalidTemplate"),
|
|
2649
2649
|
ellipsis: new z("...", we),
|
|
2650
|
-
backQuote: new z("`",
|
|
2650
|
+
backQuote: new z("`", fe),
|
|
2651
2651
|
dollarBraceL: new z("${", { beforeExpr: !0, startsExpr: !0 }),
|
|
2652
2652
|
// Operators. These carry several kinds of properties to help the
|
|
2653
2653
|
// parser use them properly (the presence of these properties is
|
|
@@ -2691,7 +2691,7 @@ var l = {
|
|
|
2691
2691
|
_else: $("else", we),
|
|
2692
2692
|
_finally: $("finally"),
|
|
2693
2693
|
_for: $("for", { isLoop: !0 }),
|
|
2694
|
-
_function: $("function",
|
|
2694
|
+
_function: $("function", fe),
|
|
2695
2695
|
_if: $("if"),
|
|
2696
2696
|
_return: $("return", we),
|
|
2697
2697
|
_switch: $("switch"),
|
|
@@ -2702,34 +2702,34 @@ var l = {
|
|
|
2702
2702
|
_while: $("while", { isLoop: !0 }),
|
|
2703
2703
|
_with: $("with"),
|
|
2704
2704
|
_new: $("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
2705
|
-
_this: $("this",
|
|
2706
|
-
_super: $("super",
|
|
2707
|
-
_class: $("class",
|
|
2705
|
+
_this: $("this", fe),
|
|
2706
|
+
_super: $("super", fe),
|
|
2707
|
+
_class: $("class", fe),
|
|
2708
2708
|
_extends: $("extends", we),
|
|
2709
2709
|
_export: $("export"),
|
|
2710
|
-
_import: $("import",
|
|
2711
|
-
_null: $("null",
|
|
2712
|
-
_true: $("true",
|
|
2713
|
-
_false: $("false",
|
|
2710
|
+
_import: $("import", fe),
|
|
2711
|
+
_null: $("null", fe),
|
|
2712
|
+
_true: $("true", fe),
|
|
2713
|
+
_false: $("false", fe),
|
|
2714
2714
|
_in: $("in", { beforeExpr: !0, binop: 7 }),
|
|
2715
2715
|
_instanceof: $("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
2716
2716
|
_typeof: $("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
2717
2717
|
_void: $("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
2718
2718
|
_delete: $("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
2719
|
-
},
|
|
2720
|
-
function
|
|
2719
|
+
}, ce = /\r\n?|\n|\u2028|\u2029/, Qr = new RegExp(ce.source, "g");
|
|
2720
|
+
function Qe(e) {
|
|
2721
2721
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
2722
2722
|
}
|
|
2723
2723
|
function es(e, t, i) {
|
|
2724
2724
|
i === void 0 && (i = e.length);
|
|
2725
2725
|
for (var r = t; r < i; r++) {
|
|
2726
2726
|
var n = e.charCodeAt(r);
|
|
2727
|
-
if (
|
|
2727
|
+
if (Qe(n))
|
|
2728
2728
|
return r < i - 1 && n === 13 && e.charCodeAt(r + 1) === 10 ? r + 2 : r + 1;
|
|
2729
2729
|
}
|
|
2730
2730
|
return -1;
|
|
2731
2731
|
}
|
|
2732
|
-
var
|
|
2732
|
+
var Pi = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, ne = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, ts = Object.prototype, Kc = ts.hasOwnProperty, Xc = ts.toString, lt = Object.hasOwn || (function(e, t) {
|
|
2733
2733
|
return Kc.call(e, t);
|
|
2734
2734
|
}), hr = Array.isArray || (function(e) {
|
|
2735
2735
|
return Xc.call(e) === "[object Array]";
|
|
@@ -2740,20 +2740,20 @@ function Ze(e) {
|
|
|
2740
2740
|
function ze(e) {
|
|
2741
2741
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
2742
2742
|
}
|
|
2743
|
-
var Jc = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,
|
|
2743
|
+
var Jc = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, ut = function(t, i) {
|
|
2744
2744
|
this.line = t, this.column = i;
|
|
2745
2745
|
};
|
|
2746
|
-
|
|
2747
|
-
return new
|
|
2746
|
+
ut.prototype.offset = function(t) {
|
|
2747
|
+
return new ut(this.line, this.column + t);
|
|
2748
2748
|
};
|
|
2749
|
-
var
|
|
2749
|
+
var wt = function(t, i, r) {
|
|
2750
2750
|
this.start = i, this.end = r, t.sourceFile !== null && (this.source = t.sourceFile);
|
|
2751
2751
|
};
|
|
2752
|
-
function
|
|
2752
|
+
function Ci(e, t) {
|
|
2753
2753
|
for (var i = 1, r = 0; ; ) {
|
|
2754
2754
|
var n = es(e, r, t);
|
|
2755
2755
|
if (n < 0)
|
|
2756
|
-
return new
|
|
2756
|
+
return new ut(i, t - r);
|
|
2757
2757
|
++i, r = n;
|
|
2758
2758
|
}
|
|
2759
2759
|
}
|
|
@@ -2857,7 +2857,7 @@ var jt = {
|
|
|
2857
2857
|
function Yc(e) {
|
|
2858
2858
|
var t = {};
|
|
2859
2859
|
for (var i in jt)
|
|
2860
|
-
t[i] = e &&
|
|
2860
|
+
t[i] = e && lt(e, i) ? e[i] : jt[i];
|
|
2861
2861
|
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!pr && typeof console == "object" && console.warn && (pr = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
2862
2862
|
Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved == null && (t.allowReserved = t.ecmaVersion < 5), (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14), hr(t.onToken)) {
|
|
2863
2863
|
var r = t.onToken;
|
|
@@ -2875,41 +2875,41 @@ function Qc(e, t) {
|
|
|
2875
2875
|
start: n,
|
|
2876
2876
|
end: u
|
|
2877
2877
|
};
|
|
2878
|
-
e.locations && (y.loc = new
|
|
2878
|
+
e.locations && (y.loc = new wt(this, h, d)), e.ranges && (y.range = [n, u]), t.push(y);
|
|
2879
2879
|
};
|
|
2880
2880
|
}
|
|
2881
|
-
var
|
|
2882
|
-
function
|
|
2883
|
-
return
|
|
2881
|
+
var kt = 1, pt = 2, Ai = 4, is = 8, Ei = 16, rs = 32, Kt = 64, ss = 128, et = 256, St = 512, Xt = kt | pt | et;
|
|
2882
|
+
function Ii(e, t) {
|
|
2883
|
+
return pt | (e ? Ai : 0) | (t ? is : 0);
|
|
2884
2884
|
}
|
|
2885
|
-
var Ft = 0,
|
|
2885
|
+
var Ft = 0, Ni = 1, Fe = 2, ns = 3, as = 4, os = 5, J = function(t, i, r) {
|
|
2886
2886
|
this.options = t = Yc(t), this.sourceFile = t.sourceFile, this.keywords = Ze(qc[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]);
|
|
2887
2887
|
var n = "";
|
|
2888
|
-
t.allowReserved !== !0 && (n =
|
|
2889
|
-
var u = (n ? n + " " : "") +
|
|
2890
|
-
this.reservedWordsStrict = Ze(u), this.reservedWordsStrictBind = Ze(u + " " +
|
|
2891
|
-
`, r - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(
|
|
2888
|
+
t.allowReserved !== !0 && (n = ai[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (n += " await")), this.reservedWords = Ze(n);
|
|
2889
|
+
var u = (n ? n + " " : "") + ai.strict;
|
|
2890
|
+
this.reservedWordsStrict = Ze(u), this.reservedWordsStrictBind = Ze(u + " " + ai.strictBind), this.input = String(i), this.containsEsc = !1, r ? (this.pos = r, this.lineStart = this.input.lastIndexOf(`
|
|
2891
|
+
`, r - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(ce).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = l.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = t.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && t.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(kt), this.regexpState = null, this.privateNameStack = [];
|
|
2892
2892
|
}, Re = { 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 } };
|
|
2893
2893
|
J.prototype.parse = function() {
|
|
2894
2894
|
var t = this.options.program || this.startNode();
|
|
2895
2895
|
return this.nextToken(), this.parseTopLevel(t);
|
|
2896
2896
|
};
|
|
2897
2897
|
Re.inFunction.get = function() {
|
|
2898
|
-
return (this.currentVarScope().flags &
|
|
2898
|
+
return (this.currentVarScope().flags & pt) > 0;
|
|
2899
2899
|
};
|
|
2900
2900
|
Re.inGenerator.get = function() {
|
|
2901
2901
|
return (this.currentVarScope().flags & is) > 0;
|
|
2902
2902
|
};
|
|
2903
2903
|
Re.inAsync.get = function() {
|
|
2904
|
-
return (this.currentVarScope().flags &
|
|
2904
|
+
return (this.currentVarScope().flags & Ai) > 0;
|
|
2905
2905
|
};
|
|
2906
2906
|
Re.canAwait.get = function() {
|
|
2907
2907
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
2908
2908
|
var t = this.scopeStack[e], i = t.flags;
|
|
2909
|
-
if (i & (
|
|
2909
|
+
if (i & (et | St))
|
|
2910
2910
|
return !1;
|
|
2911
|
-
if (i &
|
|
2912
|
-
return (i &
|
|
2911
|
+
if (i & pt)
|
|
2912
|
+
return (i & Ai) > 0;
|
|
2913
2913
|
}
|
|
2914
2914
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
2915
2915
|
};
|
|
@@ -2926,13 +2926,13 @@ Re.treatFunctionsAsVar.get = function() {
|
|
|
2926
2926
|
Re.allowNewDotTarget.get = function() {
|
|
2927
2927
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
2928
2928
|
var t = this.scopeStack[e], i = t.flags;
|
|
2929
|
-
if (i & (
|
|
2929
|
+
if (i & (et | St) || i & pt && !(i & Ei))
|
|
2930
2930
|
return !0;
|
|
2931
2931
|
}
|
|
2932
2932
|
return !1;
|
|
2933
2933
|
};
|
|
2934
2934
|
Re.inClassStaticBlock.get = function() {
|
|
2935
|
-
return (this.currentVarScope().flags &
|
|
2935
|
+
return (this.currentVarScope().flags & et) > 0;
|
|
2936
2936
|
};
|
|
2937
2937
|
J.extend = function() {
|
|
2938
2938
|
for (var t = [], i = arguments.length; i--; ) t[i] = arguments[i];
|
|
@@ -2951,8 +2951,8 @@ J.tokenizer = function(t, i) {
|
|
|
2951
2951
|
return new this(i, t);
|
|
2952
2952
|
};
|
|
2953
2953
|
Object.defineProperties(J.prototype, Re);
|
|
2954
|
-
var
|
|
2955
|
-
|
|
2954
|
+
var he = J.prototype, eh = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
2955
|
+
he.strictDirective = function(e) {
|
|
2956
2956
|
if (this.options.ecmaVersion < 5)
|
|
2957
2957
|
return !1;
|
|
2958
2958
|
for (; ; ) {
|
|
@@ -2963,54 +2963,54 @@ le.strictDirective = function(e) {
|
|
|
2963
2963
|
if ((t[1] || t[2]) === "use strict") {
|
|
2964
2964
|
ne.lastIndex = e + t[0].length;
|
|
2965
2965
|
var i = ne.exec(this.input), r = i.index + i[0].length, n = this.input.charAt(r);
|
|
2966
|
-
return n === ";" || n === "}" ||
|
|
2966
|
+
return n === ";" || n === "}" || ce.test(i[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(n) || n === "!" && this.input.charAt(r + 1) === "=");
|
|
2967
2967
|
}
|
|
2968
2968
|
e += t[0].length, ne.lastIndex = e, e += ne.exec(this.input)[0].length, this.input[e] === ";" && e++;
|
|
2969
2969
|
}
|
|
2970
2970
|
};
|
|
2971
|
-
|
|
2971
|
+
he.eat = function(e) {
|
|
2972
2972
|
return this.type === e ? (this.next(), !0) : !1;
|
|
2973
2973
|
};
|
|
2974
|
-
|
|
2974
|
+
he.isContextual = function(e) {
|
|
2975
2975
|
return this.type === l.name && this.value === e && !this.containsEsc;
|
|
2976
2976
|
};
|
|
2977
|
-
|
|
2977
|
+
he.eatContextual = function(e) {
|
|
2978
2978
|
return this.isContextual(e) ? (this.next(), !0) : !1;
|
|
2979
2979
|
};
|
|
2980
|
-
|
|
2980
|
+
he.expectContextual = function(e) {
|
|
2981
2981
|
this.eatContextual(e) || this.unexpected();
|
|
2982
2982
|
};
|
|
2983
|
-
|
|
2984
|
-
return this.type === l.eof || this.type === l.braceR ||
|
|
2983
|
+
he.canInsertSemicolon = function() {
|
|
2984
|
+
return this.type === l.eof || this.type === l.braceR || ce.test(this.input.slice(this.lastTokEnd, this.start));
|
|
2985
2985
|
};
|
|
2986
|
-
|
|
2986
|
+
he.insertSemicolon = function() {
|
|
2987
2987
|
if (this.canInsertSemicolon())
|
|
2988
2988
|
return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
|
|
2989
2989
|
};
|
|
2990
|
-
|
|
2990
|
+
he.semicolon = function() {
|
|
2991
2991
|
!this.eat(l.semi) && !this.insertSemicolon() && this.unexpected();
|
|
2992
2992
|
};
|
|
2993
|
-
|
|
2993
|
+
he.afterTrailingComma = function(e, t) {
|
|
2994
2994
|
if (this.type === e)
|
|
2995
2995
|
return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t || this.next(), !0;
|
|
2996
2996
|
};
|
|
2997
|
-
|
|
2997
|
+
he.expect = function(e) {
|
|
2998
2998
|
this.eat(e) || this.unexpected();
|
|
2999
2999
|
};
|
|
3000
|
-
|
|
3000
|
+
he.unexpected = function(e) {
|
|
3001
3001
|
this.raise(e ?? this.start, "Unexpected token");
|
|
3002
3002
|
};
|
|
3003
3003
|
var Jt = function() {
|
|
3004
3004
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
3005
3005
|
};
|
|
3006
|
-
|
|
3006
|
+
he.checkPatternErrors = function(e, t) {
|
|
3007
3007
|
if (e) {
|
|
3008
3008
|
e.trailingComma > -1 && this.raiseRecoverable(e.trailingComma, "Comma is not permitted after the rest element");
|
|
3009
3009
|
var i = t ? e.parenthesizedAssign : e.parenthesizedBind;
|
|
3010
3010
|
i > -1 && this.raiseRecoverable(i, t ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
3011
3011
|
}
|
|
3012
3012
|
};
|
|
3013
|
-
|
|
3013
|
+
he.checkExpressionErrors = function(e, t) {
|
|
3014
3014
|
if (!e)
|
|
3015
3015
|
return !1;
|
|
3016
3016
|
var i = e.shorthandAssign, r = e.doubleProto;
|
|
@@ -3018,10 +3018,10 @@ le.checkExpressionErrors = function(e, t) {
|
|
|
3018
3018
|
return i >= 0 || r >= 0;
|
|
3019
3019
|
i >= 0 && this.raise(i, "Shorthand property assignments are valid only in destructuring patterns"), r >= 0 && this.raiseRecoverable(r, "Redefinition of __proto__ property");
|
|
3020
3020
|
};
|
|
3021
|
-
|
|
3021
|
+
he.checkYieldAwaitInDefaultParams = function() {
|
|
3022
3022
|
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");
|
|
3023
3023
|
};
|
|
3024
|
-
|
|
3024
|
+
he.isSimpleAssignTarget = function(e) {
|
|
3025
3025
|
return e.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(e.expression) : e.type === "Identifier" || e.type === "MemberExpression";
|
|
3026
3026
|
};
|
|
3027
3027
|
var I = J.prototype;
|
|
@@ -3038,7 +3038,7 @@ I.parseTopLevel = function(e) {
|
|
|
3038
3038
|
}
|
|
3039
3039
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType, this.finishNode(e, "Program");
|
|
3040
3040
|
};
|
|
3041
|
-
var
|
|
3041
|
+
var Li = { kind: "loop" }, th = { kind: "switch" };
|
|
3042
3042
|
I.isLet = function(e) {
|
|
3043
3043
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
3044
3044
|
return !1;
|
|
@@ -3066,14 +3066,14 @@ I.isAsyncFunction = function() {
|
|
|
3066
3066
|
return !1;
|
|
3067
3067
|
ne.lastIndex = this.pos;
|
|
3068
3068
|
var e = ne.exec(this.input), t = this.pos + e[0].length, i;
|
|
3069
|
-
return !
|
|
3069
|
+
return !ce.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(Ve(i = this.input.charCodeAt(t + 8)) || i > 55295 && i < 56320));
|
|
3070
3070
|
};
|
|
3071
3071
|
I.isUsingKeyword = function(e, t) {
|
|
3072
3072
|
if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using"))
|
|
3073
3073
|
return !1;
|
|
3074
3074
|
ne.lastIndex = this.pos;
|
|
3075
3075
|
var i = ne.exec(this.input), r = this.pos + i[0].length;
|
|
3076
|
-
if (
|
|
3076
|
+
if (ce.test(this.input.slice(this.pos, r)))
|
|
3077
3077
|
return !1;
|
|
3078
3078
|
if (e) {
|
|
3079
3079
|
var n = r + 5, u;
|
|
@@ -3081,7 +3081,7 @@ I.isUsingKeyword = function(e, t) {
|
|
|
3081
3081
|
return !1;
|
|
3082
3082
|
ne.lastIndex = n;
|
|
3083
3083
|
var h = ne.exec(this.input);
|
|
3084
|
-
if (h &&
|
|
3084
|
+
if (h && ce.test(this.input.slice(n, n + h[0].length)))
|
|
3085
3085
|
return !1;
|
|
3086
3086
|
}
|
|
3087
3087
|
if (t) {
|
|
@@ -3173,12 +3173,12 @@ I.parseDebuggerStatement = function(e) {
|
|
|
3173
3173
|
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
|
|
3174
3174
|
};
|
|
3175
3175
|
I.parseDoStatement = function(e) {
|
|
3176
|
-
return this.next(), this.labels.push(
|
|
3176
|
+
return this.next(), this.labels.push(Li), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(l._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(l.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement");
|
|
3177
3177
|
};
|
|
3178
3178
|
I.parseForStatement = function(e) {
|
|
3179
3179
|
this.next();
|
|
3180
3180
|
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
3181
|
-
if (this.labels.push(
|
|
3181
|
+
if (this.labels.push(Li), this.enterScope(0), this.expect(l.parenL), this.type === l.semi)
|
|
3182
3182
|
return t > -1 && this.unexpected(t), this.parseFor(e, null);
|
|
3183
3183
|
var i = this.isLet();
|
|
3184
3184
|
if (this.type === l._var || this.type === l._const || i) {
|
|
@@ -3197,7 +3197,7 @@ I.parseForAfterInit = function(e, t, i) {
|
|
|
3197
3197
|
return (this.type === l._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === l._in ? i > -1 && this.unexpected(i) : e.await = i > -1), this.parseForIn(e, t)) : (i > -1 && this.unexpected(i), this.parseFor(e, t));
|
|
3198
3198
|
};
|
|
3199
3199
|
I.parseFunctionStatement = function(e, t, i) {
|
|
3200
|
-
return this.next(), this.parseFunction(e,
|
|
3200
|
+
return this.next(), this.parseFunction(e, gt | (i ? 0 : mi), !1, t);
|
|
3201
3201
|
};
|
|
3202
3202
|
I.parseIfStatement = function(e) {
|
|
3203
3203
|
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(l._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement");
|
|
@@ -3216,7 +3216,7 @@ I.parseSwitchStatement = function(e) {
|
|
|
3216
3216
|
return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement");
|
|
3217
3217
|
};
|
|
3218
3218
|
I.parseThrowStatement = function(e) {
|
|
3219
|
-
return this.next(),
|
|
3219
|
+
return this.next(), ce.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e.argument = this.parseExpression(), this.semicolon(), this.finishNode(e, "ThrowStatement");
|
|
3220
3220
|
};
|
|
3221
3221
|
var ih = [];
|
|
3222
3222
|
I.parseCatchClauseParam = function() {
|
|
@@ -3234,7 +3234,7 @@ I.parseVarStatement = function(e, t, i) {
|
|
|
3234
3234
|
return this.next(), this.parseVar(e, !1, t, i), this.semicolon(), this.finishNode(e, "VariableDeclaration");
|
|
3235
3235
|
};
|
|
3236
3236
|
I.parseWhileStatement = function(e) {
|
|
3237
|
-
return this.next(), e.test = this.parseParenExpression(), this.labels.push(
|
|
3237
|
+
return this.next(), e.test = this.parseParenExpression(), this.labels.push(Li), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement");
|
|
3238
3238
|
};
|
|
3239
3239
|
I.parseWithStatement = function(e) {
|
|
3240
3240
|
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e.object = this.parseParenExpression(), e.body = this.parseStatement("with"), this.finishNode(e, "WithStatement");
|
|
@@ -3285,13 +3285,13 @@ I.parseVar = function(e, t, i, r) {
|
|
|
3285
3285
|
return e;
|
|
3286
3286
|
};
|
|
3287
3287
|
I.parseVarId = function(e, t) {
|
|
3288
|
-
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ?
|
|
3288
|
+
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? Ni : Fe, !1);
|
|
3289
3289
|
};
|
|
3290
|
-
var
|
|
3290
|
+
var gt = 1, mi = 2, us = 4;
|
|
3291
3291
|
I.parseFunction = function(e, t, i, r, n) {
|
|
3292
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === l.star && t &
|
|
3292
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === l.star && t & mi && this.unexpected(), e.generator = this.eat(l.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), t & gt && (e.id = t & us && this.type !== l.name ? null : this.parseIdent(), e.id && !(t & mi) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? Ni : Fe : ns));
|
|
3293
3293
|
var u = this.yieldPos, h = this.awaitPos, d = this.awaitIdentPos;
|
|
3294
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
3294
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ii(e.async, e.generator)), t & gt || (e.id = this.type === l.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, i, !1, n), this.yieldPos = u, this.awaitPos = h, this.awaitIdentPos = d, this.finishNode(e, t & gt ? "FunctionDeclaration" : "FunctionExpression");
|
|
3295
3295
|
};
|
|
3296
3296
|
I.parseFunctionParams = function(e) {
|
|
3297
3297
|
this.expect(l.parenL), e.params = this.parseBindingList(l.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
@@ -3340,12 +3340,12 @@ I.parseClassMethod = function(e, t, i, r) {
|
|
|
3340
3340
|
return e.kind === "get" && u.params.length !== 0 && this.raiseRecoverable(u.start, "getter should have no params"), e.kind === "set" && u.params.length !== 1 && this.raiseRecoverable(u.start, "setter should have exactly one param"), e.kind === "set" && u.params[0].type === "RestElement" && this.raiseRecoverable(u.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
3341
3341
|
};
|
|
3342
3342
|
I.parseClassField = function(e) {
|
|
3343
|
-
return $t(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && $t(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(l.eq) ? (this.enterScope(
|
|
3343
|
+
return $t(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && $t(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(l.eq) ? (this.enterScope(St | Kt), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
|
|
3344
3344
|
};
|
|
3345
3345
|
I.parseClassStaticBlock = function(e) {
|
|
3346
3346
|
e.body = [];
|
|
3347
3347
|
var t = this.labels;
|
|
3348
|
-
for (this.labels = [], this.enterScope(
|
|
3348
|
+
for (this.labels = [], this.enterScope(et | Kt); this.type !== l.braceR; ) {
|
|
3349
3349
|
var i = this.parseStatement(null);
|
|
3350
3350
|
e.body.push(i);
|
|
3351
3351
|
}
|
|
@@ -3366,7 +3366,7 @@ I.exitClassBody = function() {
|
|
|
3366
3366
|
if (this.options.checkPrivateFields)
|
|
3367
3367
|
for (var r = this.privateNameStack.length, n = r === 0 ? null : this.privateNameStack[r - 1], u = 0; u < i.length; ++u) {
|
|
3368
3368
|
var h = i[u];
|
|
3369
|
-
|
|
3369
|
+
lt(t, h.name) || (n ? n.used.push(h) : this.raiseRecoverable(h.start, "Private field '#" + h.name + "' must be declared in an enclosing class"));
|
|
3370
3370
|
}
|
|
3371
3371
|
};
|
|
3372
3372
|
function rh(e, t) {
|
|
@@ -3408,7 +3408,7 @@ I.parseExportDefaultDeclaration = function() {
|
|
|
3408
3408
|
var e;
|
|
3409
3409
|
if (this.type === l._function || (e = this.isAsyncFunction())) {
|
|
3410
3410
|
var t = this.startNode();
|
|
3411
|
-
return this.next(), e && this.next(), this.parseFunction(t,
|
|
3411
|
+
return this.next(), e && this.next(), this.parseFunction(t, gt | us, !1, e);
|
|
3412
3412
|
} else if (this.type === l._class) {
|
|
3413
3413
|
var i = this.startNode();
|
|
3414
3414
|
return this.parseClass(i, "nullableID");
|
|
@@ -3418,7 +3418,7 @@ I.parseExportDefaultDeclaration = function() {
|
|
|
3418
3418
|
}
|
|
3419
3419
|
};
|
|
3420
3420
|
I.checkExport = function(e, t, i) {
|
|
3421
|
-
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value),
|
|
3421
|
+
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), lt(e, t) && this.raiseRecoverable(i, "Duplicate export '" + t + "'"), e[t] = !0);
|
|
3422
3422
|
};
|
|
3423
3423
|
I.checkPatternExport = function(e, t) {
|
|
3424
3424
|
var i = t.type;
|
|
@@ -3506,7 +3506,7 @@ I.parseWithClause = function() {
|
|
|
3506
3506
|
else if (this.expect(l.comma), this.afterTrailingComma(l.braceR))
|
|
3507
3507
|
break;
|
|
3508
3508
|
var r = this.parseImportAttribute(), n = r.key.type === "Identifier" ? r.key.name : r.key.value;
|
|
3509
|
-
|
|
3509
|
+
lt(t, n) && this.raiseRecoverable(r.key.start, "Duplicate attribute key '" + n + "'"), t[n] = !0, e.push(r);
|
|
3510
3510
|
}
|
|
3511
3511
|
return e;
|
|
3512
3512
|
};
|
|
@@ -3639,7 +3639,7 @@ Ce.checkLValSimple = function(e, t, i) {
|
|
|
3639
3639
|
var r = t !== Ft;
|
|
3640
3640
|
switch (e.type) {
|
|
3641
3641
|
case "Identifier":
|
|
3642
|
-
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (r ? "Binding " : "Assigning to ") + e.name + " in strict mode"), r && (t === Fe && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (
|
|
3642
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (r ? "Binding " : "Assigning to ") + e.name + " in strict mode"), r && (t === Fe && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (lt(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !== os && this.declareName(e.name, t, e.start));
|
|
3643
3643
|
break;
|
|
3644
3644
|
case "ChainExpression":
|
|
3645
3645
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -3686,33 +3686,33 @@ Ce.checkLValInnerPattern = function(e, t, i) {
|
|
|
3686
3686
|
this.checkLValPattern(e, t, i);
|
|
3687
3687
|
}
|
|
3688
3688
|
};
|
|
3689
|
-
var
|
|
3689
|
+
var ue = function(t, i, r, n, u) {
|
|
3690
3690
|
this.token = t, this.isExpr = !!i, this.preserveSpace = !!r, this.override = n, this.generator = !!u;
|
|
3691
3691
|
}, H = {
|
|
3692
|
-
b_stat: new
|
|
3693
|
-
b_expr: new
|
|
3694
|
-
b_tmpl: new
|
|
3695
|
-
p_stat: new
|
|
3696
|
-
p_expr: new
|
|
3697
|
-
q_tmpl: new
|
|
3692
|
+
b_stat: new ue("{", !1),
|
|
3693
|
+
b_expr: new ue("{", !0),
|
|
3694
|
+
b_tmpl: new ue("${", !1),
|
|
3695
|
+
p_stat: new ue("(", !1),
|
|
3696
|
+
p_expr: new ue("(", !0),
|
|
3697
|
+
q_tmpl: new ue("`", !0, !0, function(e) {
|
|
3698
3698
|
return e.tryReadTemplateToken();
|
|
3699
3699
|
}),
|
|
3700
|
-
f_stat: new
|
|
3701
|
-
f_expr: new
|
|
3702
|
-
f_expr_gen: new
|
|
3703
|
-
f_gen: new
|
|
3704
|
-
},
|
|
3705
|
-
|
|
3700
|
+
f_stat: new ue("function", !1),
|
|
3701
|
+
f_expr: new ue("function", !0),
|
|
3702
|
+
f_expr_gen: new ue("function", !0, !1, null, !0),
|
|
3703
|
+
f_gen: new ue("function", !1, !1, null, !0)
|
|
3704
|
+
}, ft = J.prototype;
|
|
3705
|
+
ft.initialContext = function() {
|
|
3706
3706
|
return [H.b_stat];
|
|
3707
3707
|
};
|
|
3708
|
-
|
|
3708
|
+
ft.curContext = function() {
|
|
3709
3709
|
return this.context[this.context.length - 1];
|
|
3710
3710
|
};
|
|
3711
|
-
|
|
3711
|
+
ft.braceIsBlock = function(e) {
|
|
3712
3712
|
var t = this.curContext();
|
|
3713
|
-
return t === H.f_expr || t === H.f_stat ? !0 : e === l.colon && (t === H.b_stat || t === H.b_expr) ? !t.isExpr : e === l._return || e === l.name && this.exprAllowed ?
|
|
3713
|
+
return t === H.f_expr || t === H.f_stat ? !0 : e === l.colon && (t === H.b_stat || t === H.b_expr) ? !t.isExpr : e === l._return || e === l.name && this.exprAllowed ? ce.test(this.input.slice(this.lastTokEnd, this.start)) : e === l._else || e === l.semi || e === l.eof || e === l.parenR || e === l.arrow ? !0 : e === l.braceL ? t === H.b_stat : e === l._var || e === l._const || e === l.name ? !1 : !this.exprAllowed;
|
|
3714
3714
|
};
|
|
3715
|
-
|
|
3715
|
+
ft.inGeneratorContext = function() {
|
|
3716
3716
|
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
3717
3717
|
var t = this.context[e];
|
|
3718
3718
|
if (t.token === "function")
|
|
@@ -3720,11 +3720,11 @@ pt.inGeneratorContext = function() {
|
|
|
3720
3720
|
}
|
|
3721
3721
|
return !1;
|
|
3722
3722
|
};
|
|
3723
|
-
|
|
3723
|
+
ft.updateContext = function(e) {
|
|
3724
3724
|
var t, i = this.type;
|
|
3725
3725
|
i.keyword && e === l.dot ? this.exprAllowed = !1 : (t = i.updateContext) ? t.call(this, e) : this.exprAllowed = i.beforeExpr;
|
|
3726
3726
|
};
|
|
3727
|
-
|
|
3727
|
+
ft.overrideContext = function(e) {
|
|
3728
3728
|
this.curContext() !== e && (this.context[this.context.length - 1] = e);
|
|
3729
3729
|
};
|
|
3730
3730
|
l.parenR.updateContext = l.braceR.updateContext = function() {
|
|
@@ -3748,7 +3748,7 @@ l.parenL.updateContext = function(e) {
|
|
|
3748
3748
|
l.incDec.updateContext = function() {
|
|
3749
3749
|
};
|
|
3750
3750
|
l._function.updateContext = l._class.updateContext = function(e) {
|
|
3751
|
-
e.beforeExpr && e !== l._else && !(e === l.semi && this.curContext() !== H.p_stat) && !(e === l._return &&
|
|
3751
|
+
e.beforeExpr && e !== l._else && !(e === l.semi && this.curContext() !== H.p_stat) && !(e === l._return && ce.test(this.input.slice(this.lastTokEnd, this.start))) && !((e === l.colon || e === l.braceL) && this.curContext() === H.b_stat) ? this.context.push(H.f_expr) : this.context.push(H.f_stat), this.exprAllowed = !1;
|
|
3752
3752
|
};
|
|
3753
3753
|
l.colon.updateContext = function() {
|
|
3754
3754
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
@@ -3865,7 +3865,7 @@ M.parseMaybeUnary = function(e, t, i, r) {
|
|
|
3865
3865
|
h = this.parseAwait(r), t = !0;
|
|
3866
3866
|
else if (this.type.prefix) {
|
|
3867
3867
|
var d = this.startNode(), y = this.type === l.incDec;
|
|
3868
|
-
d.operator = this.value, d.prefix = !0, this.next(), d.argument = this.parseMaybeUnary(null, !0, y, r), this.checkExpressionErrors(e, !0), y ? this.checkLValSimple(d.argument) : this.strict && d.operator === "delete" && cs(d.argument) ? this.raiseRecoverable(d.start, "Deleting local variable in strict mode") : d.operator === "delete" &&
|
|
3868
|
+
d.operator = this.value, d.prefix = !0, this.next(), d.argument = this.parseMaybeUnary(null, !0, y, r), this.checkExpressionErrors(e, !0), y ? this.checkLValSimple(d.argument) : this.strict && d.operator === "delete" && cs(d.argument) ? this.raiseRecoverable(d.start, "Deleting local variable in strict mode") : d.operator === "delete" && yi(d.argument) ? this.raiseRecoverable(d.start, "Private fields can not be deleted") : t = !0, h = this.finishNode(d, y ? "UpdateExpression" : "UnaryExpression");
|
|
3869
3869
|
} else if (!t && this.type === l.privateId)
|
|
3870
3870
|
(r || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), h = this.parsePrivateIdent(), this.type !== l._in && this.unexpected();
|
|
3871
3871
|
else {
|
|
@@ -3887,8 +3887,8 @@ M.parseMaybeUnary = function(e, t, i, r) {
|
|
|
3887
3887
|
function cs(e) {
|
|
3888
3888
|
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && cs(e.expression);
|
|
3889
3889
|
}
|
|
3890
|
-
function
|
|
3891
|
-
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" &&
|
|
3890
|
+
function yi(e) {
|
|
3891
|
+
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && yi(e.expression) || e.type === "ParenthesizedExpression" && yi(e.expression);
|
|
3892
3892
|
}
|
|
3893
3893
|
M.parseExprSubscripts = function(e, t) {
|
|
3894
3894
|
var i = this.start, r = this.startLoc, n = this.parseExprAtom(e, t);
|
|
@@ -3926,12 +3926,12 @@ M.parseSubscript = function(e, t, i, r, n, u, h) {
|
|
|
3926
3926
|
} else if (!r && this.eat(l.parenL)) {
|
|
3927
3927
|
var S = new Jt(), A = this.yieldPos, F = this.awaitPos, Z = this.awaitIdentPos;
|
|
3928
3928
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
3929
|
-
var
|
|
3929
|
+
var le = this.parseExprList(l.parenR, this.options.ecmaVersion >= 8, !1, S);
|
|
3930
3930
|
if (n && !y && this.shouldParseAsyncArrow())
|
|
3931
|
-
return this.checkPatternErrors(S, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = A, this.awaitPos = F, this.awaitIdentPos = Z, this.parseSubscriptAsyncArrow(t, i,
|
|
3931
|
+
return this.checkPatternErrors(S, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = A, this.awaitPos = F, this.awaitIdentPos = Z, this.parseSubscriptAsyncArrow(t, i, le, h);
|
|
3932
3932
|
this.checkExpressionErrors(S, !0), this.yieldPos = A || this.yieldPos, this.awaitPos = F || this.awaitPos, this.awaitIdentPos = Z || this.awaitIdentPos;
|
|
3933
3933
|
var D = this.startNodeAt(t, i);
|
|
3934
|
-
D.callee = e, D.arguments =
|
|
3934
|
+
D.callee = e, D.arguments = le, d && (D.optional = y), e = this.finishNode(D, "CallExpression");
|
|
3935
3935
|
} else if (this.type === l.backQuote) {
|
|
3936
3936
|
(y || u) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
3937
3937
|
var se = this.startNodeAt(t, i);
|
|
@@ -4045,10 +4045,10 @@ M.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
4045
4045
|
break;
|
|
4046
4046
|
} else
|
|
4047
4047
|
y.push(this.parseMaybeAssign(!1, S, this.parseParenItem));
|
|
4048
|
-
var
|
|
4048
|
+
var le = this.lastTokEnd, D = this.lastTokEndLoc;
|
|
4049
4049
|
if (this.expect(l.parenR), e && this.shouldParseArrow(y) && this.eat(l.arrow))
|
|
4050
4050
|
return this.checkPatternErrors(S, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = A, this.awaitPos = F, this.parseParenArrowList(i, r, y, t);
|
|
4051
|
-
(!y.length || w) && this.unexpected(this.lastTokStart), Z && this.unexpected(Z), this.checkExpressionErrors(S, !0), this.yieldPos = A || this.yieldPos, this.awaitPos = F || this.awaitPos, y.length > 1 ? (n = this.startNodeAt(h, d), n.expressions = y, this.finishNodeAt(n, "SequenceExpression",
|
|
4051
|
+
(!y.length || w) && this.unexpected(this.lastTokStart), Z && this.unexpected(Z), this.checkExpressionErrors(S, !0), this.yieldPos = A || this.yieldPos, this.awaitPos = F || this.awaitPos, y.length > 1 ? (n = this.startNodeAt(h, d), n.expressions = y, this.finishNodeAt(n, "SequenceExpression", le, D)) : n = y[0];
|
|
4052
4052
|
} else
|
|
4053
4053
|
n = this.parseParenExpression();
|
|
4054
4054
|
if (this.options.preserveParens) {
|
|
@@ -4100,7 +4100,7 @@ M.parseTemplate = function(e) {
|
|
|
4100
4100
|
return this.next(), this.finishNode(i, "TemplateLiteral");
|
|
4101
4101
|
};
|
|
4102
4102
|
M.isAsyncProp = function(e) {
|
|
4103
|
-
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === l.name || this.type === l.num || this.type === l.string || this.type === l.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === l.star) && !
|
|
4103
|
+
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === l.name || this.type === l.num || this.type === l.string || this.type === l.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === l.star) && !ce.test(this.input.slice(this.lastTokEnd, this.start));
|
|
4104
4104
|
};
|
|
4105
4105
|
M.parseObj = function(e, t) {
|
|
4106
4106
|
var i = this.startNode(), r = !0, n = {};
|
|
@@ -4148,11 +4148,11 @@ M.initFunction = function(e) {
|
|
|
4148
4148
|
};
|
|
4149
4149
|
M.parseMethod = function(e, t, i) {
|
|
4150
4150
|
var r = this.startNode(), n = this.yieldPos, u = this.awaitPos, h = this.awaitIdentPos;
|
|
4151
|
-
return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
4151
|
+
return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ii(t, r.generator) | Kt | (i ? ss : 0)), this.expect(l.parenL), r.params = this.parseBindingList(l.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(r, !1, !0, !1), this.yieldPos = n, this.awaitPos = u, this.awaitIdentPos = h, this.finishNode(r, "FunctionExpression");
|
|
4152
4152
|
};
|
|
4153
4153
|
M.parseArrowExpression = function(e, t, i, r) {
|
|
4154
4154
|
var n = this.yieldPos, u = this.awaitPos, h = this.awaitIdentPos;
|
|
4155
|
-
return this.enterScope(
|
|
4155
|
+
return this.enterScope(Ii(i, !1) | Ei), this.initFunction(e), this.options.ecmaVersion >= 8 && (e.async = !!i), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e.params = this.toAssignableList(t, !0), this.parseFunctionBody(e, !0, !1, r), this.yieldPos = n, this.awaitPos = u, this.awaitIdentPos = h, this.finishNode(e, "ArrowFunctionExpression");
|
|
4156
4156
|
};
|
|
4157
4157
|
M.parseFunctionBody = function(e, t, i, r) {
|
|
4158
4158
|
var n = t && this.type !== l.braceL, u = this.strict, h = !1;
|
|
@@ -4177,7 +4177,7 @@ M.isSimpleParamList = function(e) {
|
|
|
4177
4177
|
M.checkParams = function(e, t) {
|
|
4178
4178
|
for (var i = /* @__PURE__ */ Object.create(null), r = 0, n = e.params; r < n.length; r += 1) {
|
|
4179
4179
|
var u = n[r];
|
|
4180
|
-
this.checkLValInnerPattern(u,
|
|
4180
|
+
this.checkLValInnerPattern(u, Ni, t ? null : i);
|
|
4181
4181
|
}
|
|
4182
4182
|
};
|
|
4183
4183
|
M.parseExprList = function(e, t, i, r) {
|
|
@@ -4222,7 +4222,7 @@ M.parseAwait = function(e) {
|
|
|
4222
4222
|
};
|
|
4223
4223
|
var Bt = J.prototype;
|
|
4224
4224
|
Bt.raise = function(e, t) {
|
|
4225
|
-
var i =
|
|
4225
|
+
var i = Ci(this.input, e);
|
|
4226
4226
|
t += " (" + i.line + ":" + i.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
4227
4227
|
var r = new SyntaxError(t);
|
|
4228
4228
|
throw r.pos = e, r.loc = i, r.raisedAt = this.pos, r;
|
|
@@ -4230,7 +4230,7 @@ Bt.raise = function(e, t) {
|
|
|
4230
4230
|
Bt.raiseRecoverable = Bt.raise;
|
|
4231
4231
|
Bt.curPosition = function() {
|
|
4232
4232
|
if (this.options.locations)
|
|
4233
|
-
return new
|
|
4233
|
+
return new ut(this.curLine, this.pos - this.lineStart);
|
|
4234
4234
|
};
|
|
4235
4235
|
var We = J.prototype, nh = function(t) {
|
|
4236
4236
|
this.flags = t, this.var = [], this.lexical = [], this.functions = [];
|
|
@@ -4242,13 +4242,13 @@ We.exitScope = function() {
|
|
|
4242
4242
|
this.scopeStack.pop();
|
|
4243
4243
|
};
|
|
4244
4244
|
We.treatFunctionsAsVarInScope = function(e) {
|
|
4245
|
-
return e.flags &
|
|
4245
|
+
return e.flags & pt || !this.inModule && e.flags & kt;
|
|
4246
4246
|
};
|
|
4247
4247
|
We.declareName = function(e, t, i) {
|
|
4248
4248
|
var r = !1;
|
|
4249
4249
|
if (t === Fe) {
|
|
4250
4250
|
var n = this.currentScope();
|
|
4251
|
-
r = n.lexical.indexOf(e) > -1 || n.functions.indexOf(e) > -1 || n.var.indexOf(e) > -1, n.lexical.push(e), this.inModule && n.flags &
|
|
4251
|
+
r = n.lexical.indexOf(e) > -1 || n.functions.indexOf(e) > -1 || n.var.indexOf(e) > -1, n.lexical.push(e), this.inModule && n.flags & kt && delete this.undefinedExports[e];
|
|
4252
4252
|
} else if (t === as) {
|
|
4253
4253
|
var u = this.currentScope();
|
|
4254
4254
|
u.lexical.push(e);
|
|
@@ -4262,7 +4262,7 @@ We.declareName = function(e, t, i) {
|
|
|
4262
4262
|
r = !0;
|
|
4263
4263
|
break;
|
|
4264
4264
|
}
|
|
4265
|
-
if (y.var.push(e), this.inModule && y.flags &
|
|
4265
|
+
if (y.var.push(e), this.inModule && y.flags & kt && delete this.undefinedExports[e], y.flags & Xt)
|
|
4266
4266
|
break;
|
|
4267
4267
|
}
|
|
4268
4268
|
r && this.raiseRecoverable(i, "Identifier '" + e + "' has already been declared");
|
|
@@ -4276,37 +4276,37 @@ We.currentScope = function() {
|
|
|
4276
4276
|
We.currentVarScope = function() {
|
|
4277
4277
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
4278
4278
|
var t = this.scopeStack[e];
|
|
4279
|
-
if (t.flags & (Xt |
|
|
4279
|
+
if (t.flags & (Xt | St | et))
|
|
4280
4280
|
return t;
|
|
4281
4281
|
}
|
|
4282
4282
|
};
|
|
4283
4283
|
We.currentThisScope = function() {
|
|
4284
4284
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
4285
4285
|
var t = this.scopeStack[e];
|
|
4286
|
-
if (t.flags & (Xt |
|
|
4286
|
+
if (t.flags & (Xt | St | et) && !(t.flags & Ei))
|
|
4287
4287
|
return t;
|
|
4288
4288
|
}
|
|
4289
4289
|
};
|
|
4290
|
-
var
|
|
4291
|
-
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new
|
|
4292
|
-
},
|
|
4293
|
-
|
|
4294
|
-
return new
|
|
4290
|
+
var Tt = function(t, i, r) {
|
|
4291
|
+
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new wt(t, r)), t.options.directSourceFile && (this.sourceFile = t.options.directSourceFile), t.options.ranges && (this.range = [i, 0]);
|
|
4292
|
+
}, Pt = J.prototype;
|
|
4293
|
+
Pt.startNode = function() {
|
|
4294
|
+
return new Tt(this, this.start, this.startLoc);
|
|
4295
4295
|
};
|
|
4296
|
-
|
|
4297
|
-
return new
|
|
4296
|
+
Pt.startNodeAt = function(e, t) {
|
|
4297
|
+
return new Tt(this, e, t);
|
|
4298
4298
|
};
|
|
4299
4299
|
function hs(e, t, i, r) {
|
|
4300
4300
|
return e.type = t, e.end = i, this.options.locations && (e.loc.end = r), this.options.ranges && (e.range[1] = i), e;
|
|
4301
4301
|
}
|
|
4302
|
-
|
|
4302
|
+
Pt.finishNode = function(e, t) {
|
|
4303
4303
|
return hs.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
4304
4304
|
};
|
|
4305
|
-
|
|
4305
|
+
Pt.finishNodeAt = function(e, t, i, r) {
|
|
4306
4306
|
return hs.call(this, e, t, i, r);
|
|
4307
4307
|
};
|
|
4308
|
-
|
|
4309
|
-
var t = new
|
|
4308
|
+
Pt.copyNode = function(e) {
|
|
4309
|
+
var t = new Tt(this, e.start, this.startLoc);
|
|
4310
4310
|
for (var i in e)
|
|
4311
4311
|
t[i] = e[i];
|
|
4312
4312
|
return t;
|
|
@@ -4344,8 +4344,8 @@ function fh(e) {
|
|
|
4344
4344
|
};
|
|
4345
4345
|
t.nonBinary.Script_Extensions = t.nonBinary.Script, t.nonBinary.gc = t.nonBinary.General_Category, t.nonBinary.sc = t.nonBinary.Script, t.nonBinary.scx = t.nonBinary.Script_Extensions;
|
|
4346
4346
|
}
|
|
4347
|
-
for (var
|
|
4348
|
-
var dh = dr[
|
|
4347
|
+
for (var ui = 0, dr = [9, 10, 11, 12, 13, 14]; ui < dr.length; ui += 1) {
|
|
4348
|
+
var dh = dr[ui];
|
|
4349
4349
|
fh(dh);
|
|
4350
4350
|
}
|
|
4351
4351
|
var C = J.prototype, Zt = function(t, i) {
|
|
@@ -4872,7 +4872,7 @@ C.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
4872
4872
|
return Ss;
|
|
4873
4873
|
};
|
|
4874
4874
|
C.regexp_validateUnicodePropertyNameAndValue = function(e, t, i) {
|
|
4875
|
-
|
|
4875
|
+
lt(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(i) || e.raise("Invalid property value");
|
|
4876
4876
|
};
|
|
4877
4877
|
C.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
4878
4878
|
if (e.unicodeProperties.binary.test(t))
|
|
@@ -5179,7 +5179,7 @@ C.regexp_eatFixedHexDigits = function(e, t) {
|
|
|
5179
5179
|
return !0;
|
|
5180
5180
|
};
|
|
5181
5181
|
var Qt = function(t) {
|
|
5182
|
-
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new
|
|
5182
|
+
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new wt(t, t.startLoc, t.endLoc)), t.options.ranges && (this.range = [t.start, t.end]);
|
|
5183
5183
|
}, j = J.prototype;
|
|
5184
5184
|
j.next = function(e) {
|
|
5185
5185
|
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Qt(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
@@ -5232,7 +5232,7 @@ j.skipBlockComment = function() {
|
|
|
5232
5232
|
);
|
|
5233
5233
|
};
|
|
5234
5234
|
j.skipLineComment = function(e) {
|
|
5235
|
-
for (var t = this.pos, i = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !
|
|
5235
|
+
for (var t = this.pos, i = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !Qe(r); )
|
|
5236
5236
|
r = this.input.charCodeAt(++this.pos);
|
|
5237
5237
|
this.options.onComment && this.options.onComment(
|
|
5238
5238
|
!1,
|
|
@@ -5271,7 +5271,7 @@ j.skipSpace = function() {
|
|
|
5271
5271
|
}
|
|
5272
5272
|
break;
|
|
5273
5273
|
default:
|
|
5274
|
-
if (e > 8 && e < 14 || e >= 5760 &&
|
|
5274
|
+
if (e > 8 && e < 14 || e >= 5760 && Pi.test(String.fromCharCode(e)))
|
|
5275
5275
|
++this.pos;
|
|
5276
5276
|
else
|
|
5277
5277
|
break e;
|
|
@@ -5316,7 +5316,7 @@ j.readToken_caret = function() {
|
|
|
5316
5316
|
};
|
|
5317
5317
|
j.readToken_plus_min = function(e) {
|
|
5318
5318
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
5319
|
-
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
5319
|
+
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || ce.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(l.incDec, 2) : t === 61 ? this.finishOp(l.assign, 2) : this.finishOp(l.plusMin, 1);
|
|
5320
5320
|
};
|
|
5321
5321
|
j.readToken_lt_gt = function(e) {
|
|
5322
5322
|
var t = this.input.charCodeAt(this.pos + 1), i = 1;
|
|
@@ -5447,7 +5447,7 @@ j.readRegexp = function() {
|
|
|
5447
5447
|
for (var e, t, i = this.pos; ; ) {
|
|
5448
5448
|
this.pos >= this.input.length && this.raise(i, "Unterminated regular expression");
|
|
5449
5449
|
var r = this.input.charAt(this.pos);
|
|
5450
|
-
if (
|
|
5450
|
+
if (ce.test(r) && this.raise(i, "Unterminated regular expression"), e)
|
|
5451
5451
|
e = !1;
|
|
5452
5452
|
else {
|
|
5453
5453
|
if (r === "[")
|
|
@@ -5528,7 +5528,7 @@ j.readString = function(e) {
|
|
|
5528
5528
|
var r = this.input.charCodeAt(this.pos);
|
|
5529
5529
|
if (r === e)
|
|
5530
5530
|
break;
|
|
5531
|
-
r === 92 ? (t += this.input.slice(i, this.pos), t += this.readEscapedChar(!1), i = this.pos) : r === 8232 || r === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (
|
|
5531
|
+
r === 92 ? (t += this.input.slice(i, this.pos), t += this.readEscapedChar(!1), i = this.pos) : r === 8232 || r === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (Qe(r) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
5532
5532
|
}
|
|
5533
5533
|
return t += this.input.slice(i, this.pos++), this.finishToken(l.string, t);
|
|
5534
5534
|
};
|
|
@@ -5558,7 +5558,7 @@ j.readTmplToken = function() {
|
|
|
5558
5558
|
return this.pos === this.start && (this.type === l.template || this.type === l.invalidTemplate) ? i === 36 ? (this.pos += 2, this.finishToken(l.dollarBraceL)) : (++this.pos, this.finishToken(l.backQuote)) : (e += this.input.slice(t, this.pos), this.finishToken(l.template, e));
|
|
5559
5559
|
if (i === 92)
|
|
5560
5560
|
e += this.input.slice(t, this.pos), e += this.readEscapedChar(!0), t = this.pos;
|
|
5561
|
-
else if (
|
|
5561
|
+
else if (Qe(i)) {
|
|
5562
5562
|
switch (e += this.input.slice(t, this.pos), ++this.pos, i) {
|
|
5563
5563
|
case 13:
|
|
5564
5564
|
this.input.charCodeAt(this.pos) === 10 && ++this.pos;
|
|
@@ -5653,7 +5653,7 @@ j.readEscapedChar = function(e) {
|
|
|
5653
5653
|
e ? "Octal literal in template string" : "Octal literal in strict mode"
|
|
5654
5654
|
), String.fromCharCode(n);
|
|
5655
5655
|
}
|
|
5656
|
-
return
|
|
5656
|
+
return Qe(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t);
|
|
5657
5657
|
}
|
|
5658
5658
|
};
|
|
5659
5659
|
j.readHexChar = function(e) {
|
|
@@ -5680,29 +5680,29 @@ j.readWord1 = function() {
|
|
|
5680
5680
|
};
|
|
5681
5681
|
j.readWord = function() {
|
|
5682
5682
|
var e = this.readWord1(), t = l.name;
|
|
5683
|
-
return this.keywords.test(e) && (t =
|
|
5683
|
+
return this.keywords.test(e) && (t = ot[e]), this.finishToken(t, e);
|
|
5684
5684
|
};
|
|
5685
5685
|
var Ns = "8.15.0";
|
|
5686
5686
|
J.acorn = {
|
|
5687
5687
|
Parser: J,
|
|
5688
5688
|
version: Ns,
|
|
5689
5689
|
defaultOptions: jt,
|
|
5690
|
-
Position:
|
|
5691
|
-
SourceLocation:
|
|
5692
|
-
getLineInfo:
|
|
5693
|
-
Node:
|
|
5690
|
+
Position: ut,
|
|
5691
|
+
SourceLocation: wt,
|
|
5692
|
+
getLineInfo: Ci,
|
|
5693
|
+
Node: Tt,
|
|
5694
5694
|
TokenType: z,
|
|
5695
5695
|
tokTypes: l,
|
|
5696
|
-
keywordTypes:
|
|
5697
|
-
TokContext:
|
|
5696
|
+
keywordTypes: ot,
|
|
5697
|
+
TokContext: ue,
|
|
5698
5698
|
tokContexts: H,
|
|
5699
5699
|
isIdentifierChar: Ve,
|
|
5700
5700
|
isIdentifierStart: Ee,
|
|
5701
5701
|
Token: Qt,
|
|
5702
|
-
isNewLine:
|
|
5703
|
-
lineBreak:
|
|
5702
|
+
isNewLine: Qe,
|
|
5703
|
+
lineBreak: ce,
|
|
5704
5704
|
lineBreakG: Qr,
|
|
5705
|
-
nonASCIIwhitespace:
|
|
5705
|
+
nonASCIIwhitespace: Pi
|
|
5706
5706
|
};
|
|
5707
5707
|
function Ph(e, t) {
|
|
5708
5708
|
return J.parse(e, t);
|
|
@@ -5715,22 +5715,22 @@ function Ah(e, t) {
|
|
|
5715
5715
|
}
|
|
5716
5716
|
const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5717
5717
|
__proto__: null,
|
|
5718
|
-
Node:
|
|
5718
|
+
Node: Tt,
|
|
5719
5719
|
Parser: J,
|
|
5720
|
-
Position:
|
|
5721
|
-
SourceLocation:
|
|
5722
|
-
TokContext:
|
|
5720
|
+
Position: ut,
|
|
5721
|
+
SourceLocation: wt,
|
|
5722
|
+
TokContext: ue,
|
|
5723
5723
|
Token: Qt,
|
|
5724
5724
|
TokenType: z,
|
|
5725
5725
|
defaultOptions: jt,
|
|
5726
|
-
getLineInfo:
|
|
5726
|
+
getLineInfo: Ci,
|
|
5727
5727
|
isIdentifierChar: Ve,
|
|
5728
5728
|
isIdentifierStart: Ee,
|
|
5729
|
-
isNewLine:
|
|
5730
|
-
keywordTypes:
|
|
5731
|
-
lineBreak:
|
|
5729
|
+
isNewLine: Qe,
|
|
5730
|
+
keywordTypes: ot,
|
|
5731
|
+
lineBreak: ce,
|
|
5732
5732
|
lineBreakG: Qr,
|
|
5733
|
-
nonASCIIwhitespace:
|
|
5733
|
+
nonASCIIwhitespace: Pi,
|
|
5734
5734
|
parse: Ph,
|
|
5735
5735
|
parseExpressionAt: Ch,
|
|
5736
5736
|
tokContexts: H,
|
|
@@ -5764,12 +5764,12 @@ function Ut() {
|
|
|
5764
5764
|
}, Ut.apply(this, arguments);
|
|
5765
5765
|
}
|
|
5766
5766
|
function Rt(e, t) {
|
|
5767
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
5767
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, vi(e, t);
|
|
5768
5768
|
}
|
|
5769
|
-
function
|
|
5770
|
-
return
|
|
5769
|
+
function vi(e, t) {
|
|
5770
|
+
return vi = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, r) {
|
|
5771
5771
|
return i.__proto__ = r, i;
|
|
5772
|
-
},
|
|
5772
|
+
}, vi(e, t);
|
|
5773
5773
|
}
|
|
5774
5774
|
function yr(e, t) {
|
|
5775
5775
|
(t == null || t > e.length) && (t = e.length);
|
|
@@ -5795,24 +5795,24 @@ function vr(e, t) {
|
|
|
5795
5795
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
5796
5796
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
5797
5797
|
}
|
|
5798
|
-
var
|
|
5799
|
-
function
|
|
5798
|
+
var ve = !0;
|
|
5799
|
+
function xe(e, t) {
|
|
5800
5800
|
return t === void 0 && (t = {}), new z("name", t);
|
|
5801
5801
|
}
|
|
5802
5802
|
var Ih = /* @__PURE__ */ new WeakMap();
|
|
5803
5803
|
function Nh(e) {
|
|
5804
5804
|
var t = Ih.get(e.Parser.acorn || e);
|
|
5805
5805
|
if (!t) {
|
|
5806
|
-
var i = { assert:
|
|
5806
|
+
var i = { assert: xe(0, { startsExpr: ve }), asserts: xe(0, { startsExpr: ve }), global: xe(0, { startsExpr: ve }), keyof: xe(0, { startsExpr: ve }), readonly: xe(0, { startsExpr: ve }), unique: xe(0, { startsExpr: ve }), abstract: xe(0, { startsExpr: ve }), declare: xe(0, { startsExpr: ve }), enum: xe(0, { startsExpr: ve }), module: xe(0, { startsExpr: ve }), namespace: xe(0, { startsExpr: ve }), interface: xe(0, { startsExpr: ve }), type: xe(0, { startsExpr: ve }) }, r = { at: new z("@"), jsxName: new z("jsxName"), jsxText: new z("jsxText", { beforeExpr: !0 }), jsxTagStart: new z("jsxTagStart", { startsExpr: !0 }), jsxTagEnd: new z("jsxTagEnd") }, n = { tc_oTag: new ue("<tag", !1, !1), tc_cTag: new ue("</tag", !1, !1), tc_expr: new ue("<tag>...</tag>", !0, !0) }, u = new RegExp("^(?:" + Object.keys(i).join("|") + ")$");
|
|
5807
5807
|
r.jsxTagStart.updateContext = function() {
|
|
5808
5808
|
this.context.push(n.tc_expr), this.context.push(n.tc_oTag), this.exprAllowed = !1;
|
|
5809
5809
|
}, r.jsxTagEnd.updateContext = function(h) {
|
|
5810
5810
|
var d = this.context.pop();
|
|
5811
5811
|
d === n.tc_oTag && h === l.slash || d === n.tc_cTag ? (this.context.pop(), this.exprAllowed = this.curContext() === n.tc_expr) : this.exprAllowed = !0;
|
|
5812
5812
|
}, t = { tokTypes: Ut({}, i, r), tokContexts: Ut({}, n), keywordsRegExp: u, tokenIsLiteralPropertyName: function(h) {
|
|
5813
|
-
return [l.name, l.string, l.num].concat(Object.values(
|
|
5813
|
+
return [l.name, l.string, l.num].concat(Object.values(ot), Object.values(i)).includes(h);
|
|
5814
5814
|
}, tokenIsKeywordOrIdentifier: function(h) {
|
|
5815
|
-
return [l.name].concat(Object.values(
|
|
5815
|
+
return [l.name].concat(Object.values(ot), Object.values(i)).includes(h);
|
|
5816
5816
|
}, tokenIsIdentifier: function(h) {
|
|
5817
5817
|
return [].concat(Object.values(i), [l.name]).includes(h);
|
|
5818
5818
|
}, tokenIsTSDeclarationStart: function(h) {
|
|
@@ -5825,7 +5825,7 @@ function Nh(e) {
|
|
|
5825
5825
|
}
|
|
5826
5826
|
return t;
|
|
5827
5827
|
}
|
|
5828
|
-
var
|
|
5828
|
+
var vt = 1024, Lh = new RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y"), xr = new RegExp("(?=(" + Lh.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"), xt = function() {
|
|
5829
5829
|
this.shorthandAssign = void 0, this.trailingComma = void 0, this.parenthesizedAssign = void 0, this.parenthesizedBind = void 0, this.doubleProto = void 0, this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
5830
5830
|
};
|
|
5831
5831
|
function Oh(e, t) {
|
|
@@ -5874,10 +5874,10 @@ var N = { AbstractMethodHasImplementation: function(e) {
|
|
|
5874
5874
|
}, StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", GenericsEndWithComma: "Trailing comma is not allowed at the end of generics.", UnexpectedTypeAnnotation: "Did not expect a type annotation here.", UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", UnsupportedSignatureParameterKind: function(e) {
|
|
5875
5875
|
return "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + e.type + ".";
|
|
5876
5876
|
}, LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, Rh = { quot: '"', amp: "&", apos: "'", lt: "<", gt: ">", nbsp: " ", iexcl: "¡", cent: "¢", pound: "£", curren: "¤", yen: "¥", brvbar: "¦", sect: "§", uml: "¨", copy: "©", ordf: "ª", laquo: "«", not: "¬", shy: "", reg: "®", macr: "¯", deg: "°", plusmn: "±", sup2: "²", sup3: "³", acute: "´", micro: "µ", para: "¶", middot: "·", cedil: "¸", sup1: "¹", ordm: "º", raquo: "»", frac14: "¼", frac12: "½", frac34: "¾", iquest: "¿", Agrave: "À", Aacute: "Á", Acirc: "Â", Atilde: "Ã", Auml: "Ä", Aring: "Å", AElig: "Æ", Ccedil: "Ç", Egrave: "È", Eacute: "É", Ecirc: "Ê", Euml: "Ë", Igrave: "Ì", Iacute: "Í", Icirc: "Î", Iuml: "Ï", ETH: "Ð", Ntilde: "Ñ", Ograve: "Ò", Oacute: "Ó", Ocirc: "Ô", Otilde: "Õ", Ouml: "Ö", times: "×", Oslash: "Ø", Ugrave: "Ù", Uacute: "Ú", Ucirc: "Û", Uuml: "Ü", Yacute: "Ý", THORN: "Þ", szlig: "ß", agrave: "à", aacute: "á", acirc: "â", atilde: "ã", auml: "ä", aring: "å", aelig: "æ", ccedil: "ç", egrave: "è", eacute: "é", ecirc: "ê", euml: "ë", igrave: "ì", iacute: "í", icirc: "î", iuml: "ï", eth: "ð", ntilde: "ñ", ograve: "ò", oacute: "ó", ocirc: "ô", otilde: "õ", ouml: "ö", divide: "÷", oslash: "ø", ugrave: "ù", uacute: "ú", ucirc: "û", uuml: "ü", yacute: "ý", thorn: "þ", yuml: "ÿ", OElig: "Œ", oelig: "œ", Scaron: "Š", scaron: "š", Yuml: "Ÿ", fnof: "ƒ", circ: "ˆ", tilde: "˜", Alpha: "Α", Beta: "Β", Gamma: "Γ", Delta: "Δ", Epsilon: "Ε", Zeta: "Ζ", Eta: "Η", Theta: "Θ", Iota: "Ι", Kappa: "Κ", Lambda: "Λ", Mu: "Μ", Nu: "Ν", Xi: "Ξ", Omicron: "Ο", Pi: "Π", Rho: "Ρ", Sigma: "Σ", Tau: "Τ", Upsilon: "Υ", Phi: "Φ", Chi: "Χ", Psi: "Ψ", Omega: "Ω", alpha: "α", beta: "β", gamma: "γ", delta: "δ", epsilon: "ε", zeta: "ζ", eta: "η", theta: "θ", iota: "ι", kappa: "κ", lambda: "λ", mu: "μ", nu: "ν", xi: "ξ", omicron: "ο", pi: "π", rho: "ρ", sigmaf: "ς", sigma: "σ", tau: "τ", upsilon: "υ", phi: "φ", chi: "χ", psi: "ψ", omega: "ω", thetasym: "ϑ", upsih: "ϒ", piv: "ϖ", ensp: " ", emsp: " ", thinsp: " ", zwnj: "", zwj: "", lrm: "", rlm: "", ndash: "–", mdash: "—", lsquo: "‘", rsquo: "’", sbquo: "‚", ldquo: "“", rdquo: "”", bdquo: "„", dagger: "†", Dagger: "‡", bull: "•", hellip: "…", permil: "‰", prime: "′", Prime: "″", lsaquo: "‹", rsaquo: "›", oline: "‾", frasl: "⁄", euro: "€", image: "ℑ", weierp: "℘", real: "ℜ", trade: "™", alefsym: "ℵ", larr: "←", uarr: "↑", rarr: "→", darr: "↓", harr: "↔", crarr: "↵", lArr: "⇐", uArr: "⇑", rArr: "⇒", dArr: "⇓", hArr: "⇔", forall: "∀", part: "∂", exist: "∃", empty: "∅", nabla: "∇", isin: "∈", notin: "∉", ni: "∋", prod: "∏", sum: "∑", minus: "−", lowast: "∗", radic: "√", prop: "∝", infin: "∞", ang: "∠", and: "∧", or: "∨", cap: "∩", cup: "∪", int: "∫", there4: "∴", sim: "∼", cong: "≅", asymp: "≈", ne: "≠", equiv: "≡", le: "≤", ge: "≥", sub: "⊂", sup: "⊃", nsub: "⊄", sube: "⊆", supe: "⊇", oplus: "⊕", otimes: "⊗", perp: "⊥", sdot: "⋅", lceil: "⌈", rceil: "⌉", lfloor: "⌊", rfloor: "⌋", lang: "〈", rang: "〉", loz: "◊", spades: "♠", clubs: "♣", hearts: "♥", diams: "♦" }, Dh = /^[\da-fA-F]+$/, Mh = /^\d+$/;
|
|
5877
|
-
function
|
|
5878
|
-
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ?
|
|
5877
|
+
function bt(e) {
|
|
5878
|
+
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ? bt(e.object) + "." + bt(e.property) : void 0);
|
|
5879
5879
|
}
|
|
5880
|
-
var
|
|
5880
|
+
var ci = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
5881
5881
|
function br(e) {
|
|
5882
5882
|
if (!e) throw new Error("Assert fail");
|
|
5883
5883
|
}
|
|
@@ -5887,7 +5887,7 @@ function Vh(e) {
|
|
|
5887
5887
|
function zh(e) {
|
|
5888
5888
|
return e === "in" || e === "out";
|
|
5889
5889
|
}
|
|
5890
|
-
function
|
|
5890
|
+
function hi(e, t) {
|
|
5891
5891
|
return 2 | (e ? 4 : 0) | (t ? 8 : 0);
|
|
5892
5892
|
}
|
|
5893
5893
|
function jh(e) {
|
|
@@ -5904,17 +5904,17 @@ function _r(e) {
|
|
|
5904
5904
|
function Fh(e) {
|
|
5905
5905
|
var t = {}, i = t.dts, r = i !== void 0 && i, n = t.allowSatisfies, u = n !== void 0 && n;
|
|
5906
5906
|
return function(h) {
|
|
5907
|
-
var d = h.acorn || Eh, y = Nh(d), o = d.tokTypes, w = d.keywordTypes, S = d.isIdentifierStart, A = d.lineBreak, F = d.isNewLine, Z = d.tokContexts,
|
|
5908
|
-
function Ds(P,
|
|
5909
|
-
|
|
5910
|
-
for (var te =
|
|
5907
|
+
var d = h.acorn || Eh, y = Nh(d), o = d.tokTypes, w = d.keywordTypes, S = d.isIdentifierStart, A = d.lineBreak, F = d.isNewLine, Z = d.tokContexts, le = d.isIdentifierChar, D = y.tokTypes, se = y.tokContexts, dt = y.keywordsRegExp, Ae = y.tokenIsLiteralPropertyName, _e = y.tokenIsTemplate, Ke = y.tokenIsTSDeclarationStart, q = y.tokenIsIdentifier, Ct = y.tokenIsKeywordOrIdentifier, Rs = y.tokenIsTSTypeOperator;
|
|
5908
|
+
function Ds(P, pe, oe) {
|
|
5909
|
+
oe === void 0 && (oe = P.length);
|
|
5910
|
+
for (var te = pe; te < oe; te++) {
|
|
5911
5911
|
var B = P.charCodeAt(te);
|
|
5912
|
-
if (F(B)) return te <
|
|
5912
|
+
if (F(B)) return te < oe - 1 && B === 13 && P.charCodeAt(te + 1) === 10 ? te + 2 : te + 1;
|
|
5913
5913
|
}
|
|
5914
5914
|
return -1;
|
|
5915
5915
|
}
|
|
5916
|
-
h = (function(P,
|
|
5917
|
-
var te =
|
|
5916
|
+
h = (function(P, pe, oe) {
|
|
5917
|
+
var te = oe.tokTypes, B = pe.tokTypes;
|
|
5918
5918
|
return (function(f) {
|
|
5919
5919
|
function s() {
|
|
5920
5920
|
return f.apply(this, arguments) || this;
|
|
@@ -5953,8 +5953,8 @@ function Fh(e) {
|
|
|
5953
5953
|
return c;
|
|
5954
5954
|
}, s;
|
|
5955
5955
|
})(P);
|
|
5956
|
-
})(h, y, d), h = (function(P,
|
|
5957
|
-
var B = P.tokTypes, f =
|
|
5956
|
+
})(h, y, d), h = (function(P, pe, oe, te) {
|
|
5957
|
+
var B = P.tokTypes, f = pe.tokTypes, s = P.isNewLine, a = P.isIdentifierChar, c = Object.assign({ allowNamespaces: !0, allowNamespacedObjects: !0 }, {});
|
|
5958
5958
|
return (function(p) {
|
|
5959
5959
|
function m() {
|
|
5960
5960
|
return p.apply(this, arguments) || this;
|
|
@@ -6074,7 +6074,7 @@ function Fh(e) {
|
|
|
6074
6074
|
default:
|
|
6075
6075
|
this.unexpected();
|
|
6076
6076
|
}
|
|
6077
|
-
|
|
6077
|
+
bt(V.name) !== bt(L.name) && this.raise(V.start, "Expected corresponding JSX closing tag for <" + bt(L.name) + ">");
|
|
6078
6078
|
}
|
|
6079
6079
|
var E = L.name ? "Element" : "Fragment";
|
|
6080
6080
|
return _["opening" + E] = L, _["closing" + E] = V, _.children = T, this.type === B.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(_, "JSX" + E);
|
|
@@ -6085,9 +6085,9 @@ function Fh(e) {
|
|
|
6085
6085
|
var x = this.start, g = this.startLoc;
|
|
6086
6086
|
return this.next(), this.jsx_parseElementAt(x, g);
|
|
6087
6087
|
}, m;
|
|
6088
|
-
})(
|
|
6089
|
-
})(d, y, h), h = (function(P,
|
|
6090
|
-
var te =
|
|
6088
|
+
})(oe);
|
|
6089
|
+
})(d, y, h), h = (function(P, pe, oe) {
|
|
6090
|
+
var te = pe.tokTypes, B = oe.tokTypes;
|
|
6091
6091
|
return (function(f) {
|
|
6092
6092
|
function s() {
|
|
6093
6093
|
return f.apply(this, arguments) || this;
|
|
@@ -6116,15 +6116,15 @@ function Fh(e) {
|
|
|
6116
6116
|
})(P);
|
|
6117
6117
|
})(h, y, d);
|
|
6118
6118
|
var Ms = /* @__PURE__ */ (function(P) {
|
|
6119
|
-
function
|
|
6119
|
+
function pe(s, a, c) {
|
|
6120
6120
|
var p;
|
|
6121
6121
|
return (p = P.call(this, s, a, c) || this).preValue = null, p.preToken = null, p.isLookahead = !1, p.isAmbientContext = !1, p.inAbstractClass = !1, p.inType = !1, p.inDisallowConditionalTypesContext = !1, p.maybeInArrowParameters = !1, p.shouldParseArrowReturnType = void 0, p.shouldParseAsyncArrowReturnType = void 0, p.decoratorStack = [[]], p.importsStack = [[]], p.importOrExportOuterKind = void 0, p.tsParseConstModifier = p.tsParseModifiers.bind((function(m) {
|
|
6122
6122
|
if (m === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6123
6123
|
return m;
|
|
6124
6124
|
})(p), { allowedModifiers: ["const"], disallowedModifiers: ["in", "out"], errorTemplate: N.InvalidModifierOnTypeParameterPositions }), p;
|
|
6125
6125
|
}
|
|
6126
|
-
Rt(
|
|
6127
|
-
var
|
|
6126
|
+
Rt(pe, P);
|
|
6127
|
+
var oe, te, B, f = pe.prototype;
|
|
6128
6128
|
return f.getTokenFromCodeInType = function(s) {
|
|
6129
6129
|
return s === 62 || s === 60 ? this.finishOp(o.relational, 1) : P.prototype.getTokenFromCode.call(this, s);
|
|
6130
6130
|
}, f.readToken = function(s) {
|
|
@@ -6216,13 +6216,13 @@ function Fh(e) {
|
|
|
6216
6216
|
var c = s + a.length;
|
|
6217
6217
|
if (this.input.slice(s, c) === a) {
|
|
6218
6218
|
var p = this.input.charCodeAt(c);
|
|
6219
|
-
return !(
|
|
6219
|
+
return !(le(p) || (64512 & p) == 55296);
|
|
6220
6220
|
}
|
|
6221
6221
|
return !1;
|
|
6222
6222
|
}, f.isAbstractConstructorSignature = function() {
|
|
6223
6223
|
return this.ts_isContextual(D.abstract) && this.lookahead().type === o._new;
|
|
6224
6224
|
}, f.nextTokenStartSince = function(s) {
|
|
6225
|
-
return
|
|
6225
|
+
return ci.lastIndex = s, ci.test(this.input) ? ci.lastIndex : s;
|
|
6226
6226
|
}, f.lookaheadCharCode = function() {
|
|
6227
6227
|
return this.input.charCodeAt(this.nextTokenStart());
|
|
6228
6228
|
}, f.compareLookaheadState = function(s, a) {
|
|
@@ -6251,7 +6251,7 @@ function Fh(e) {
|
|
|
6251
6251
|
return this.setLookaheadState(a), p;
|
|
6252
6252
|
}, f.readWord = function() {
|
|
6253
6253
|
var s = this.readWord1(), a = o.name;
|
|
6254
|
-
return this.keywords.test(s) ? a = w[s] : new RegExp(
|
|
6254
|
+
return this.keywords.test(s) ? a = w[s] : new RegExp(dt).test(s) && (a = D[s]), this.finishToken(a, s);
|
|
6255
6255
|
}, f.skipBlockComment = function() {
|
|
6256
6256
|
var s;
|
|
6257
6257
|
this.isLookahead || (s = this.options.onComment && this.curPosition());
|
|
@@ -6322,7 +6322,7 @@ function Fh(e) {
|
|
|
6322
6322
|
}
|
|
6323
6323
|
return !1;
|
|
6324
6324
|
}, f.ts_eatContextualWithState = function(s, a, c) {
|
|
6325
|
-
if (
|
|
6325
|
+
if (dt.test(s)) {
|
|
6326
6326
|
if (this.ts_isContextualWithState(c, D[s])) {
|
|
6327
6327
|
for (var p = 0; p < a; p++) this.next();
|
|
6328
6328
|
return !0;
|
|
@@ -6335,7 +6335,7 @@ function Fh(e) {
|
|
|
6335
6335
|
}, f.canHaveLeadingDecorator = function() {
|
|
6336
6336
|
return this.match(o._class);
|
|
6337
6337
|
}, f.eatContextual = function(s) {
|
|
6338
|
-
return
|
|
6338
|
+
return dt.test(s) ? !!this.ts_isContextual(D[s]) && (this.next(), !0) : P.prototype.eatContextual.call(this, s);
|
|
6339
6339
|
}, f.tsIsExternalModuleReference = function() {
|
|
6340
6340
|
return this.isContextual("require") && this.lookaheadCharCode() === 40;
|
|
6341
6341
|
}, f.tsParseExternalModuleReference = function() {
|
|
@@ -6361,7 +6361,7 @@ function Fh(e) {
|
|
|
6361
6361
|
}
|
|
6362
6362
|
return this.next(), P.prototype.exitScope.call(this), this.finishNode(s, "TSModuleBlock");
|
|
6363
6363
|
}, f.tsParseAmbientExternalModuleDeclaration = function(s) {
|
|
6364
|
-
return this.ts_isContextual(D.global) ? (s.global = !0, s.id = this.parseIdent()) : this.match(o.string) ? s.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (P.prototype.enterScope.call(this,
|
|
6364
|
+
return this.ts_isContextual(D.global) ? (s.global = !0, s.id = this.parseIdent()) : this.match(o.string) ? s.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (P.prototype.enterScope.call(this, vt), s.body = this.tsParseModuleBlock(), P.prototype.exitScope.call(this)) : P.prototype.semicolon.call(this), this.finishNode(s, "TSModuleDeclaration");
|
|
6365
6365
|
}, f.tsTryParseDeclare = function(s) {
|
|
6366
6366
|
var a = this;
|
|
6367
6367
|
if (!this.isLineTerminator()) {
|
|
@@ -6763,10 +6763,10 @@ function Fh(e) {
|
|
|
6763
6763
|
a[v] = c[v];
|
|
6764
6764
|
}
|
|
6765
6765
|
}, f.tsParseModifiers = function(s) {
|
|
6766
|
-
for (var a = this, c = s.modified, p = s.allowedModifiers, m = s.disallowedModifiers, v = s.stopOnStartOfClassStaticBlock, x = s.errorTemplate, g = x === void 0 ? N.InvalidModifierOnTypeMember : x, _ = {}, T = function(K, G, X,
|
|
6767
|
-
G === X && c[
|
|
6768
|
-
}, L = function(K, G, X,
|
|
6769
|
-
(c[X] && G ===
|
|
6766
|
+
for (var a = this, c = s.modified, p = s.allowedModifiers, m = s.disallowedModifiers, v = s.stopOnStartOfClassStaticBlock, x = s.errorTemplate, g = x === void 0 ? N.InvalidModifierOnTypeMember : x, _ = {}, T = function(K, G, X, ie) {
|
|
6767
|
+
G === X && c[ie] && a.raise(K.column, N.InvalidModifiersOrder({ orderedModifiers: [X, ie] }));
|
|
6768
|
+
}, L = function(K, G, X, ie) {
|
|
6769
|
+
(c[X] && G === ie || c[ie] && G === X) && a.raise(K.column, N.IncompatibleModifiers({ modifiers: [X, ie] }));
|
|
6770
6770
|
}; ; ) {
|
|
6771
6771
|
var V = this.startLoc, E = this.tsParseModifier(p.concat(m ?? []), v);
|
|
6772
6772
|
if (!E) break;
|
|
@@ -6855,7 +6855,7 @@ function Fh(e) {
|
|
|
6855
6855
|
break;
|
|
6856
6856
|
case "global":
|
|
6857
6857
|
if (this.match(o.braceL)) {
|
|
6858
|
-
P.prototype.enterScope.call(this,
|
|
6858
|
+
P.prototype.enterScope.call(this, vt);
|
|
6859
6859
|
var p = s;
|
|
6860
6860
|
return p.global = !0, p.id = a, p.body = this.tsParseModuleBlock(), P.prototype.exitScope.call(this), this.finishNode(p, "TSModuleDeclaration");
|
|
6861
6861
|
}
|
|
@@ -6895,7 +6895,7 @@ function Fh(e) {
|
|
|
6895
6895
|
if (a === void 0 && (a = !1), s.id = this.parseIdent(), a || this.checkLValSimple(s.id, 8), this.eat(o.dot)) {
|
|
6896
6896
|
var c = this.startNode();
|
|
6897
6897
|
this.tsParseModuleOrNamespaceDeclaration(c, !0), s.body = c;
|
|
6898
|
-
} else P.prototype.enterScope.call(this,
|
|
6898
|
+
} else P.prototype.enterScope.call(this, vt), s.body = this.tsParseModuleBlock(), P.prototype.exitScope.call(this);
|
|
6899
6899
|
return this.finishNode(s, "TSModuleDeclaration");
|
|
6900
6900
|
}, f.checkLValSimple = function(s, a, c) {
|
|
6901
6901
|
return a === void 0 && (a = 0), P.prototype.checkLValSimple.call(this, s, a, c);
|
|
@@ -6957,7 +6957,7 @@ function Fh(e) {
|
|
|
6957
6957
|
}, f.parseFunction = function(s, a, c, p, m) {
|
|
6958
6958
|
this.initFunction(s), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !p) && (this.type === o.star && 2 & a && this.unexpected(), s.generator = this.eat(o.star)), this.options.ecmaVersion >= 8 && (s.async = !!p), 1 & a && (s.id = 4 & a && this.type !== o.name ? null : this.parseIdent());
|
|
6959
6959
|
var v = this.yieldPos, x = this.awaitPos, g = this.awaitIdentPos, _ = this.maybeInArrowParameters;
|
|
6960
|
-
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
6960
|
+
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(hi(s.async, s.generator)), 1 & a || (s.id = this.type === o.name ? this.parseIdent() : null), this.parseFunctionParams(s);
|
|
6961
6961
|
var T = 1 & a;
|
|
6962
6962
|
return this.parseFunctionBody(s, c, !1, m, { isFunctionDeclaration: T }), this.yieldPos = v, this.awaitPos = x, this.awaitIdentPos = g, 1 & a && s.id && !(2 & a) && this.checkLValSimple(s.id, s.body ? this.strict || s.generator || s.async ? this.treatFunctionsAsVar ? 1 : 2 : 3 : 0), this.maybeInArrowParameters = _, this.finishNode(s, T ? "FunctionDeclaration" : "FunctionExpression");
|
|
6963
6963
|
}, f.parseFunctionBody = function(s, a, c, p, m) {
|
|
@@ -7231,7 +7231,7 @@ function Fh(e) {
|
|
|
7231
7231
|
}, f.parseArrowExpression = function(s, a, c, p) {
|
|
7232
7232
|
this.match(o.colon) && (s.returnType = this.tsParseTypeAnnotation());
|
|
7233
7233
|
var m = this.yieldPos, v = this.awaitPos, x = this.awaitIdentPos;
|
|
7234
|
-
this.enterScope(16 |
|
|
7234
|
+
this.enterScope(16 | hi(c, !1)), this.initFunction(s);
|
|
7235
7235
|
var g = this.maybeInArrowParameters;
|
|
7236
7236
|
return this.options.ecmaVersion >= 8 && (s.async = !!c), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.maybeInArrowParameters = !0, s.params = this.toAssignableList(a, !0), this.maybeInArrowParameters = !1, this.parseFunctionBody(s, !0, !1, p), this.yieldPos = m, this.awaitPos = v, this.awaitIdentPos = x, this.maybeInArrowParameters = g, this.finishNode(s, "ArrowFunctionExpression");
|
|
7237
7237
|
}, f.parseMaybeAssignOrigin = function(s, a, c) {
|
|
@@ -7240,7 +7240,7 @@ function Fh(e) {
|
|
|
7240
7240
|
this.exprAllowed = !1;
|
|
7241
7241
|
}
|
|
7242
7242
|
var p = !1, m = -1, v = -1, x = -1;
|
|
7243
|
-
a ? (m = a.parenthesizedAssign, v = a.trailingComma, x = a.doubleProto, a.parenthesizedAssign = a.trailingComma = -1) : (a = new
|
|
7243
|
+
a ? (m = a.parenthesizedAssign, v = a.trailingComma, x = a.doubleProto, a.parenthesizedAssign = a.trailingComma = -1) : (a = new xt(), p = !0);
|
|
7244
7244
|
var g = this.start, _ = this.startLoc;
|
|
7245
7245
|
(this.type === o.parenL || q(this.type)) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = s === "await");
|
|
7246
7246
|
var T = this.parseMaybeConditional(s, a);
|
|
@@ -7255,25 +7255,25 @@ function Fh(e) {
|
|
|
7255
7255
|
if (L = this.cloneCurLookaheadState(), !(V = this.tryParse(function() {
|
|
7256
7256
|
return G.parseMaybeAssignOrigin(s, a, c);
|
|
7257
7257
|
}, L)).error) return V.node;
|
|
7258
|
-
var X = this.context,
|
|
7259
|
-
|
|
7258
|
+
var X = this.context, ie = X[X.length - 1];
|
|
7259
|
+
ie === y.tokContexts.tc_oTag && X[X.length - 2] === y.tokContexts.tc_expr ? (X.pop(), X.pop()) : ie !== y.tokContexts.tc_oTag && ie !== y.tokContexts.tc_expr || X.pop();
|
|
7260
7260
|
}
|
|
7261
7261
|
if (!((p = V) != null && p.error || this.tsMatchLeftRelational())) return this.parseMaybeAssignOrigin(s, a, c);
|
|
7262
7262
|
L && !this.compareLookaheadState(L, this.getCurLookaheadState()) || (L = this.cloneCurLookaheadState());
|
|
7263
|
-
var
|
|
7264
|
-
var
|
|
7263
|
+
var ye = this.tryParse(function($e) {
|
|
7264
|
+
var mt, yt;
|
|
7265
7265
|
K = G.tsParseTypeParameters();
|
|
7266
7266
|
var Be = G.parseMaybeAssignOrigin(s, a, c);
|
|
7267
|
-
return (Be.type !== "ArrowFunctionExpression" || (
|
|
7267
|
+
return (Be.type !== "ArrowFunctionExpression" || (mt = Be.extra) != null && mt.parenthesized) && $e(), ((yt = K) == null ? void 0 : yt.params.length) !== 0 && G.resetStartLocationFromNode(Be, K), Be.typeParameters = K, Be;
|
|
7268
7268
|
}, L);
|
|
7269
|
-
if (!
|
|
7269
|
+
if (!ye.error && !ye.aborted) return K && this.reportReservedArrowTypeParam(K), ye.node;
|
|
7270
7270
|
if (!V && (br(!0), !(E = this.tryParse(function() {
|
|
7271
7271
|
return G.parseMaybeAssignOrigin(s, a, c);
|
|
7272
7272
|
}, L)).error)) return E.node;
|
|
7273
7273
|
if ((m = V) != null && m.node) return this.setLookaheadState(V.failState), V.node;
|
|
7274
|
-
if (
|
|
7274
|
+
if (ye.node) return this.setLookaheadState(ye.failState), K && this.reportReservedArrowTypeParam(K), ye.node;
|
|
7275
7275
|
if ((v = E) != null && v.node) return this.setLookaheadState(E.failState), E.node;
|
|
7276
|
-
throw (x = V) != null && x.thrown ? V.error :
|
|
7276
|
+
throw (x = V) != null && x.thrown ? V.error : ye.thrown ? ye.error : (g = E) != null && g.thrown ? E.error : ((_ = V) == null ? void 0 : _.error) || ye.error || ((T = E) == null ? void 0 : T.error);
|
|
7277
7277
|
}, f.parseAssignableListItem = function(s) {
|
|
7278
7278
|
for (var a = []; this.match(D.at); ) a.push(this.parseDecorator());
|
|
7279
7279
|
var c, p = this.start, m = this.startLoc, v = !1, x = !1;
|
|
@@ -7332,7 +7332,7 @@ function Fh(e) {
|
|
|
7332
7332
|
return !1;
|
|
7333
7333
|
}
|
|
7334
7334
|
}, f.toAssignable = function(s, a, c) {
|
|
7335
|
-
switch (a === void 0 && (a = !1), c === void 0 && (c = new
|
|
7335
|
+
switch (a === void 0 && (a = !1), c === void 0 && (c = new xt()), s.type) {
|
|
7336
7336
|
case "ParenthesizedExpression":
|
|
7337
7337
|
return this.toAssignableParenthesizedExpression(s, a, c);
|
|
7338
7338
|
case "TSAsExpression":
|
|
@@ -7397,7 +7397,7 @@ function Fh(e) {
|
|
|
7397
7397
|
if (this.options.ecmaVersion >= 6) {
|
|
7398
7398
|
var x = this.maybeInArrowParameters;
|
|
7399
7399
|
this.maybeInArrowParameters = !0, this.next();
|
|
7400
|
-
var g, _ = this.start, T = this.startLoc, L = [], V = !0, E = !1, K = new
|
|
7400
|
+
var g, _ = this.start, T = this.startLoc, L = [], V = !0, E = !1, K = new xt(), G = this.yieldPos, X = this.awaitPos;
|
|
7401
7401
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR; ) {
|
|
7402
7402
|
if (V ? V = !1 : this.expect(o.comma), v && this.afterTrailingComma(o.parenR, !0)) {
|
|
7403
7403
|
E = !0;
|
|
@@ -7409,9 +7409,9 @@ function Fh(e) {
|
|
|
7409
7409
|
}
|
|
7410
7410
|
L.push(this.parseMaybeAssign(a, K, this.parseParenItem));
|
|
7411
7411
|
}
|
|
7412
|
-
var
|
|
7412
|
+
var ie = this.lastTokEnd, ye = this.lastTokEndLoc;
|
|
7413
7413
|
if (this.expect(o.parenR), this.maybeInArrowParameters = x, s && this.shouldParseArrow(L) && this.eat(o.arrow)) return this.checkPatternErrors(K, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = G, this.awaitPos = X, this.parseParenArrowList(p, m, L, a);
|
|
7414
|
-
L.length && !E || this.unexpected(this.lastTokStart), g && this.unexpected(g), this.checkExpressionErrors(K, !0), this.yieldPos = G || this.yieldPos, this.awaitPos = X || this.awaitPos, L.length > 1 ? ((c = this.startNodeAt(_, T)).expressions = L, this.finishNodeAt(c, "SequenceExpression",
|
|
7414
|
+
L.length && !E || this.unexpected(this.lastTokStart), g && this.unexpected(g), this.checkExpressionErrors(K, !0), this.yieldPos = G || this.yieldPos, this.awaitPos = X || this.awaitPos, L.length > 1 ? ((c = this.startNodeAt(_, T)).expressions = L, this.finishNodeAt(c, "SequenceExpression", ie, ye)) : c = L[0];
|
|
7415
7415
|
} else c = this.parseParenExpression();
|
|
7416
7416
|
if (this.options.preserveParens) {
|
|
7417
7417
|
var $e = this.startNodeAt(p, m);
|
|
@@ -7466,13 +7466,13 @@ function Fh(e) {
|
|
|
7466
7466
|
return Vi.typeParameters = Et, Vi;
|
|
7467
7467
|
}
|
|
7468
7468
|
if (!p && g.eat(o.parenL)) {
|
|
7469
|
-
var zi = new
|
|
7470
|
-
return
|
|
7469
|
+
var zi = new xt(), tt = g.startNodeAt(a, c);
|
|
7470
|
+
return tt.callee = s, tt.arguments = g.parseExprList(o.parenR, g.options.ecmaVersion >= 8, !1, zi), g.tsCheckForInvalidTypeCasts(tt.arguments), tt.typeParameters = Et, _ && (tt.optional = L), g.checkExpressionErrors(zi, !0), s = g.finishNode(tt, "CallExpression");
|
|
7471
7471
|
}
|
|
7472
|
-
var
|
|
7473
|
-
if (!(g.tsMatchRightRelational() ||
|
|
7474
|
-
var ji,
|
|
7475
|
-
return
|
|
7472
|
+
var ii = g.type;
|
|
7473
|
+
if (!(g.tsMatchRightRelational() || ii === o.bitShift || ii !== o.parenL && (ji = ii, !!ji.startsExpr) && !g.hasPrecedingLineBreak())) {
|
|
7474
|
+
var ji, ri = g.startNodeAt(a, c);
|
|
7475
|
+
return ri.expression = s, ri.typeParameters = Et, g.finishNode(ri, "TSInstantiationExpression");
|
|
7476
7476
|
}
|
|
7477
7477
|
});
|
|
7478
7478
|
if (V && this.unexpected(V), E) return E.type === "TSInstantiationExpression" && (this.match(o.dot) || this.match(o.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start, N.InvalidPropertyAccessAfterInstantiationExpression), s = E;
|
|
@@ -7481,25 +7481,25 @@ function Fh(e) {
|
|
|
7481
7481
|
p && G && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
7482
7482
|
var X = this.eat(o.bracketL);
|
|
7483
7483
|
if (X || G && this.type !== o.parenL && this.type !== o.backQuote || this.eat(o.dot)) {
|
|
7484
|
-
var
|
|
7485
|
-
|
|
7484
|
+
var ie = this.startNodeAt(a, c);
|
|
7485
|
+
ie.object = s, X ? (ie.property = this.parseExpression(), this.expect(o.bracketR)) : ie.property = this.type === o.privateId && s.type !== "Super" ? this.parsePrivateIdent() : this.parseIdent(this.options.allowReserved !== "never"), ie.computed = !!X, K && (ie.optional = G), s = this.finishNode(ie, "MemberExpression");
|
|
7486
7486
|
} else if (!p && this.eat(o.parenL)) {
|
|
7487
|
-
var
|
|
7487
|
+
var ye = this.maybeInArrowParameters;
|
|
7488
7488
|
this.maybeInArrowParameters = !0;
|
|
7489
|
-
var $e = new
|
|
7489
|
+
var $e = new xt(), mt = this.yieldPos, yt = this.awaitPos, Be = this.awaitIdentPos;
|
|
7490
7490
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
7491
7491
|
var Di = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, $e);
|
|
7492
|
-
if (m && !G && this.shouldParseAsyncArrow()) this.checkPatternErrors($e, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos =
|
|
7492
|
+
if (m && !G && this.shouldParseAsyncArrow()) this.checkPatternErrors($e, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = mt, this.awaitPos = yt, this.awaitIdentPos = Be, s = this.parseSubscriptAsyncArrow(a, c, Di, x);
|
|
7493
7493
|
else {
|
|
7494
|
-
this.checkExpressionErrors($e, !0), this.yieldPos =
|
|
7494
|
+
this.checkExpressionErrors($e, !0), this.yieldPos = mt || this.yieldPos, this.awaitPos = yt || this.awaitPos, this.awaitIdentPos = Be || this.awaitIdentPos;
|
|
7495
7495
|
var At = this.startNodeAt(a, c);
|
|
7496
7496
|
At.callee = s, At.arguments = Di, K && (At.optional = G), s = this.finishNode(At, "CallExpression");
|
|
7497
7497
|
}
|
|
7498
|
-
this.maybeInArrowParameters =
|
|
7498
|
+
this.maybeInArrowParameters = ye;
|
|
7499
7499
|
} else if (this.type === o.backQuote) {
|
|
7500
7500
|
(G || _) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
7501
|
-
var
|
|
7502
|
-
|
|
7501
|
+
var ti = this.startNodeAt(a, c);
|
|
7502
|
+
ti.tag = s, ti.quasi = this.parseTemplate({ isTagged: !0 }), s = this.finishNode(ti, "TaggedTemplateExpression");
|
|
7503
7503
|
}
|
|
7504
7504
|
return s;
|
|
7505
7505
|
}, f.parseGetterSetter = function(s) {
|
|
@@ -7543,17 +7543,17 @@ function Fh(e) {
|
|
|
7543
7543
|
return s && (a.typeParameters = s), a;
|
|
7544
7544
|
}, f.parseMethod = function(s, a, c, p, m) {
|
|
7545
7545
|
var v = this.startNode(), x = this.yieldPos, g = this.awaitPos, _ = this.awaitIdentPos;
|
|
7546
|
-
if (this.initFunction(v), this.options.ecmaVersion >= 6 && (v.generator = s), this.options.ecmaVersion >= 8 && (v.async = !!a), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 |
|
|
7546
|
+
if (this.initFunction(v), this.options.ecmaVersion >= 6 && (v.generator = s), this.options.ecmaVersion >= 8 && (v.async = !!a), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | hi(a, v.generator) | (c ? 128 : 0)), this.expect(o.parenL), v.params = this.parseClassFunctionParams(), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(v, !1, !0, !1, { isClassMethod: p }), this.yieldPos = x, this.awaitPos = g, this.awaitIdentPos = _, m && m.abstract && v.body) {
|
|
7547
7547
|
var T = m.key;
|
|
7548
7548
|
this.raise(m.start, N.AbstractMethodHasImplementation({ methodName: T.type !== "Identifier" || m.computed ? "[" + this.input.slice(T.start, T.end) + "]" : T.name }));
|
|
7549
7549
|
}
|
|
7550
7550
|
return this.finishNode(v, "FunctionExpression");
|
|
7551
|
-
},
|
|
7551
|
+
}, pe.parse = function(s, a) {
|
|
7552
7552
|
if (a.locations === !1) throw new Error("You have to enable options.locations while using acorn-typescript");
|
|
7553
7553
|
a.locations = !0;
|
|
7554
7554
|
var c = new this(a, s);
|
|
7555
7555
|
return r && (c.isAmbientContext = !0), c.parse();
|
|
7556
|
-
},
|
|
7556
|
+
}, pe.parseExpressionAt = function(s, a, c) {
|
|
7557
7557
|
if (c.locations === !1) throw new Error("You have to enable options.locations while using acorn-typescript");
|
|
7558
7558
|
c.locations = !0;
|
|
7559
7559
|
var p = new this(c, s, a);
|
|
@@ -7609,11 +7609,11 @@ function Fh(e) {
|
|
|
7609
7609
|
for (p.attributes = []; this.type !== o.slash && this.type !== D.jsxTagEnd; ) p.attributes.push(this.jsx_parseAttribute());
|
|
7610
7610
|
return p.selfClosing = this.eat(o.slash), this.expect(D.jsxTagEnd), this.finishNode(p, m ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
7611
7611
|
}, f.enterScope = function(s) {
|
|
7612
|
-
s ===
|
|
7612
|
+
s === vt && this.importsStack.push([]), P.prototype.enterScope.call(this, s);
|
|
7613
7613
|
var a = P.prototype.currentScope.call(this);
|
|
7614
7614
|
a.types = [], a.enums = [], a.constEnums = [], a.classes = [], a.exportOnlyBindings = [];
|
|
7615
7615
|
}, f.exitScope = function() {
|
|
7616
|
-
P.prototype.currentScope.call(this).flags ===
|
|
7616
|
+
P.prototype.currentScope.call(this).flags === vt && this.importsStack.pop(), P.prototype.exitScope.call(this);
|
|
7617
7617
|
}, f.hasImport = function(s, a) {
|
|
7618
7618
|
var c = this.importsStack.length;
|
|
7619
7619
|
if (this.importsStack[c - 1].indexOf(s) > -1) return !0;
|
|
@@ -7641,11 +7641,11 @@ function Fh(e) {
|
|
|
7641
7641
|
}
|
|
7642
7642
|
P.prototype.checkLocalExport.call(this, s);
|
|
7643
7643
|
}
|
|
7644
|
-
},
|
|
7644
|
+
}, oe = pe, B = [{ key: "acornTypeScript", get: function() {
|
|
7645
7645
|
return y;
|
|
7646
7646
|
} }], (te = [{ key: "acornTypeScript", get: function() {
|
|
7647
7647
|
return y;
|
|
7648
|
-
} }]) && mr(
|
|
7648
|
+
} }]) && mr(oe.prototype, te), B && mr(oe, B), Object.defineProperty(oe, "prototype", { writable: !1 }), pe;
|
|
7649
7649
|
})(h);
|
|
7650
7650
|
return Ms;
|
|
7651
7651
|
};
|
|
@@ -7654,7 +7654,7 @@ const $h = js(Fs);
|
|
|
7654
7654
|
async function Bh(e) {
|
|
7655
7655
|
let t;
|
|
7656
7656
|
try {
|
|
7657
|
-
t = await
|
|
7657
|
+
t = await ge.readdir(e, { withFileTypes: !0 });
|
|
7658
7658
|
} catch (i) {
|
|
7659
7659
|
if (i.code === "ENOENT") return;
|
|
7660
7660
|
throw i;
|
|
@@ -7663,20 +7663,20 @@ async function Bh(e) {
|
|
|
7663
7663
|
t.map(async (i) => {
|
|
7664
7664
|
const r = Dt.join(e, i.name);
|
|
7665
7665
|
try {
|
|
7666
|
-
await
|
|
7666
|
+
await ge.rm(r, { recursive: !0, force: !0 });
|
|
7667
7667
|
} catch (n) {
|
|
7668
7668
|
if (n.code !== "ENOENT") throw n;
|
|
7669
7669
|
}
|
|
7670
7670
|
})
|
|
7671
7671
|
);
|
|
7672
7672
|
}
|
|
7673
|
-
function
|
|
7673
|
+
function Oi(e) {
|
|
7674
7674
|
const i = J.extend(Fh()).parse(e, {
|
|
7675
7675
|
ecmaVersion: "latest",
|
|
7676
7676
|
sourceType: "module",
|
|
7677
7677
|
locations: !0
|
|
7678
7678
|
}), r = [];
|
|
7679
|
-
return
|
|
7679
|
+
return xi(i, (n) => {
|
|
7680
7680
|
if (n.type !== "MethodDefinition") return;
|
|
7681
7681
|
const u = n, h = u.key;
|
|
7682
7682
|
if (h.type !== "Identifier") return;
|
|
@@ -7686,15 +7686,15 @@ function Li(e) {
|
|
|
7686
7686
|
}
|
|
7687
7687
|
async function Te(e, t, i = [], r) {
|
|
7688
7688
|
const n = `${t} ${i.join(" ")}`;
|
|
7689
|
-
e !== void 0 &&
|
|
7689
|
+
e !== void 0 && re(`${e} - exec(${n})`);
|
|
7690
7690
|
const { stdout: u, stderr: h } = await $h(n);
|
|
7691
|
-
r === void 0 ? u.trim() && console.log(u.trim()) : await
|
|
7691
|
+
r === void 0 ? u.trim() && console.log(u.trim()) : await ge.writeFile(r, u.trim(), "utf8"), h.trim() && console.error(h.trim());
|
|
7692
7692
|
}
|
|
7693
7693
|
async function Zh(e, t) {
|
|
7694
|
-
return
|
|
7694
|
+
return ge.readdir(e, t);
|
|
7695
7695
|
}
|
|
7696
|
-
async function
|
|
7697
|
-
|
|
7696
|
+
async function Ri() {
|
|
7697
|
+
re("Load environment variables"), (await import("dotenv")).config();
|
|
7698
7698
|
}
|
|
7699
7699
|
function Ne(e) {
|
|
7700
7700
|
const t = "\x1B[36m", i = "\x1B[0m", r = "─".repeat(Math.max(e.length + 60, 60));
|
|
@@ -7706,55 +7706,38 @@ function Ie(e) {
|
|
|
7706
7706
|
✅ ${e}
|
|
7707
7707
|
`);
|
|
7708
7708
|
}
|
|
7709
|
-
function
|
|
7709
|
+
function re(e) {
|
|
7710
7710
|
console.info(`
|
|
7711
7711
|
${e}
|
|
7712
7712
|
`);
|
|
7713
7713
|
}
|
|
7714
|
-
async function
|
|
7715
|
-
return JSON.parse(await
|
|
7714
|
+
async function de(e) {
|
|
7715
|
+
return JSON.parse(await ge.readFile(e, "utf8"));
|
|
7716
7716
|
}
|
|
7717
|
-
async function
|
|
7718
|
-
return await
|
|
7717
|
+
async function Xe(e) {
|
|
7718
|
+
return await ge.readFile(e, "utf8");
|
|
7719
7719
|
}
|
|
7720
7720
|
async function Uh(e) {
|
|
7721
7721
|
try {
|
|
7722
|
-
await
|
|
7722
|
+
await ge.unlink(e);
|
|
7723
7723
|
} catch (t) {
|
|
7724
7724
|
if (t.code !== "ENOENT") throw t;
|
|
7725
7725
|
}
|
|
7726
7726
|
}
|
|
7727
7727
|
async function Le(e, t, i = [], r = !1) {
|
|
7728
|
-
return
|
|
7728
|
+
return re(`${e} - spawn(${t} ${i.join(" ")})`), new Promise((n, u) => {
|
|
7729
7729
|
$s(t, i, { stdio: "inherit" }).on("close", (d) => {
|
|
7730
7730
|
d === 0 || r ? n() : u(new Error(`${t} exited with code ${d}`));
|
|
7731
7731
|
});
|
|
7732
7732
|
});
|
|
7733
7733
|
}
|
|
7734
|
-
async function
|
|
7735
|
-
|
|
7736
|
-
const e = Dt.dirname(Pr(import.meta.url)), t = Dt.resolve(e, "../.editorconfig"), i = Dt.resolve(process.cwd(), ".editorconfig");
|
|
7737
|
-
ie(`Template: ${t}`), ie(`Destination: ${i}`);
|
|
7738
|
-
const r = await ae.readFile(t, "utf8");
|
|
7739
|
-
let n;
|
|
7740
|
-
try {
|
|
7741
|
-
n = await ae.readFile(i, "utf8");
|
|
7742
|
-
} catch (u) {
|
|
7743
|
-
if (u.code !== "ENOENT") throw u;
|
|
7744
|
-
}
|
|
7745
|
-
if (n === r) {
|
|
7746
|
-
Ie(".editorconfig already up to date.");
|
|
7747
|
-
return;
|
|
7748
|
-
}
|
|
7749
|
-
await ae.writeFile(i, r, "utf8"), Ie(".editorconfig synchronised.");
|
|
7750
|
-
}
|
|
7751
|
-
async function ut(e, t) {
|
|
7752
|
-
await ae.writeFile(e, JSON.stringify(t, void 0, 4), "utf8");
|
|
7734
|
+
async function ct(e, t) {
|
|
7735
|
+
await ge.writeFile(e, JSON.stringify(t, void 0, 4), "utf8");
|
|
7753
7736
|
}
|
|
7754
|
-
async function
|
|
7755
|
-
await
|
|
7737
|
+
async function ei(e, t) {
|
|
7738
|
+
await ge.writeFile(e, t, "utf8");
|
|
7756
7739
|
}
|
|
7757
|
-
function
|
|
7740
|
+
function xi(e, t) {
|
|
7758
7741
|
t(e);
|
|
7759
7742
|
for (const [i, r] of Object.entries(e)) {
|
|
7760
7743
|
if (["loc", "range", "start", "end", "comments"].includes(i)) continue;
|
|
@@ -7762,13 +7745,13 @@ function vi(e, t) {
|
|
|
7762
7745
|
if (Array.isArray(n))
|
|
7763
7746
|
for (const u of n) {
|
|
7764
7747
|
const h = u;
|
|
7765
|
-
h && typeof h.type == "string" &&
|
|
7748
|
+
h && typeof h.type == "string" && xi(h, t);
|
|
7766
7749
|
}
|
|
7767
|
-
else n && typeof n == "object" && typeof n.type == "string" &&
|
|
7750
|
+
else n && typeof n == "object" && typeof n.type == "string" && xi(n, t);
|
|
7768
7751
|
}
|
|
7769
7752
|
}
|
|
7770
7753
|
async function qh() {
|
|
7771
|
-
const e = await
|
|
7754
|
+
const e = await de("config.json"), t = {
|
|
7772
7755
|
body: JSON.stringify(e),
|
|
7773
7756
|
headers: { "Content-Type": "application/json" },
|
|
7774
7757
|
method: "PUT"
|
|
@@ -7808,17 +7791,26 @@ const Hh = [
|
|
|
7808
7791
|
{ idPrefix: "datapos-shared", typeId: "shared", publish: !0, uploadGroupName: void 0 },
|
|
7809
7792
|
{ idPrefix: "datapos-tool", typeId: "tool", publish: !0, uploadGroupName: "tools" }
|
|
7810
7793
|
];
|
|
7811
|
-
async function
|
|
7794
|
+
async function fl() {
|
|
7812
7795
|
try {
|
|
7813
7796
|
Ne("Build Project"), await Le("1️⃣ Bundle project", "vite", ["build"]), Ie("Project built.");
|
|
7814
7797
|
} catch (e) {
|
|
7815
7798
|
console.error("❌ Error building project.", e), process.exit(1);
|
|
7816
7799
|
}
|
|
7817
7800
|
}
|
|
7801
|
+
async function dl(e) {
|
|
7802
|
+
Ne("Synchronise config files");
|
|
7803
|
+
const t = Dt.dirname(Pr(import.meta.url)), i = Dt.resolve(t, "../.editorconfig"), r = await Xe(i), n = Dt.resolve(process.cwd(), ".editorconfig");
|
|
7804
|
+
if (await Xe(n) === r) {
|
|
7805
|
+
Ie("File '.editorconfig' is already up to date.");
|
|
7806
|
+
return;
|
|
7807
|
+
}
|
|
7808
|
+
await ei(n, r), Ie("File '.editorconfig' synchronised.");
|
|
7809
|
+
}
|
|
7818
7810
|
async function ml() {
|
|
7819
7811
|
try {
|
|
7820
|
-
Ne("Release Project"), await
|
|
7821
|
-
const e = await
|
|
7812
|
+
Ne("Release Project"), await Ri();
|
|
7813
|
+
const e = await de("package.json"), t = await de("config.json");
|
|
7822
7814
|
await Os("1️⃣", e);
|
|
7823
7815
|
const i = Hh.find((r) => t.id.startsWith(r.idPrefix));
|
|
7824
7816
|
if (!i) throw new Error(`Failed to locate module type configuration for identifier '${t.id}'.`);
|
|
@@ -7836,26 +7828,26 @@ async function ml() {
|
|
|
7836
7828
|
await Gh("2️⃣", e);
|
|
7837
7829
|
}
|
|
7838
7830
|
if (await Le("3️⃣ Bundle project", "vite", ["build"]), await Te("4️⃣ Stage changes", "git", ["add", "."]), await Te("5️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await Te("6️⃣ Push changes", "git", ["push", "origin", "main:main"]), i.typeId === "app")
|
|
7839
|
-
|
|
7831
|
+
re("7️⃣ Register module"), await qh();
|
|
7840
7832
|
else if (i.typeId === "engine")
|
|
7841
|
-
|
|
7833
|
+
re("7️⃣ Register module"), await kr(t), await wr(e, `datapos-engine-eu/${i.uploadGroupName}`);
|
|
7842
7834
|
else if (i.uploadGroupName === void 0)
|
|
7843
|
-
|
|
7835
|
+
re("7️⃣ Registration NOT required.");
|
|
7844
7836
|
else {
|
|
7845
|
-
|
|
7837
|
+
re("7️⃣ Register module"), await kr(t);
|
|
7846
7838
|
const r = t.id.split("-").slice(2).join("-");
|
|
7847
7839
|
await wr(e, `datapos-engine-eu/${i.uploadGroupName}/${r}`);
|
|
7848
7840
|
}
|
|
7849
7841
|
if (i.publish) {
|
|
7850
7842
|
const r = ".npmrc";
|
|
7851
7843
|
try {
|
|
7852
|
-
await
|
|
7844
|
+
await ei(r, `registry=https://registry.npmjs.org/
|
|
7853
7845
|
//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Le("8️⃣ Publish to npm", "npm", ["publish", "--access", "public"]);
|
|
7854
7846
|
} finally {
|
|
7855
7847
|
await Uh(r);
|
|
7856
7848
|
}
|
|
7857
7849
|
} else
|
|
7858
|
-
|
|
7850
|
+
re(`8️⃣ Publishing NOT required for package with type identifier of '${i.typeId}'.`);
|
|
7859
7851
|
Ie(`Project version '${e.version}' released.`);
|
|
7860
7852
|
} catch (e) {
|
|
7861
7853
|
console.error("❌ Error releasing project.", e), process.exit(1);
|
|
@@ -7864,8 +7856,8 @@ async function ml() {
|
|
|
7864
7856
|
async function yl() {
|
|
7865
7857
|
try {
|
|
7866
7858
|
Ne("Synchronise Project with GitHub");
|
|
7867
|
-
const e = await
|
|
7868
|
-
|
|
7859
|
+
const e = await de("package.json");
|
|
7860
|
+
re("Bump project version"), await Os("1️⃣", e), await Te("2️⃣ Stage changes", "git", ["add", "."]), await Te("3️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await Te("4️⃣ Push changes", "git", ["push", "origin", "main:main"]), Ie(`Project version '${e.version}' synchronised with GitHub.`);
|
|
7869
7861
|
} catch (e) {
|
|
7870
7862
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
7871
7863
|
}
|
|
@@ -7880,46 +7872,46 @@ function vl() {
|
|
|
7880
7872
|
}
|
|
7881
7873
|
}
|
|
7882
7874
|
async function Gh(e, t) {
|
|
7883
|
-
|
|
7884
|
-
const i = await
|
|
7885
|
-
t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), await
|
|
7875
|
+
re(`${e} Build project configuration`);
|
|
7876
|
+
const i = await de("config.json");
|
|
7877
|
+
t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), await ct("config.json", i);
|
|
7886
7878
|
}
|
|
7887
7879
|
async function Wh(e, t) {
|
|
7888
|
-
|
|
7889
|
-
const [i, r] = await Promise.all([
|
|
7880
|
+
re(`${e} Build connector project configuration`);
|
|
7881
|
+
const [i, r] = await Promise.all([de("config.json"), Xe("src/index.ts")]), n = kc.safeParse(i);
|
|
7890
7882
|
if (!n.success) {
|
|
7891
7883
|
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7892
7884
|
return;
|
|
7893
7885
|
}
|
|
7894
|
-
const u =
|
|
7895
|
-
u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), h === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${h}' usage.`), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, i.usageId = h, await
|
|
7886
|
+
const u = Oi(r), h = Jh(u);
|
|
7887
|
+
u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), h === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${h}' usage.`), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, i.usageId = h, await ct("config.json", i);
|
|
7896
7888
|
}
|
|
7897
7889
|
async function Kh(e, t) {
|
|
7898
|
-
|
|
7899
|
-
const [i, r] = await Promise.all([
|
|
7890
|
+
re(`${e} Build context project configuration`);
|
|
7891
|
+
const [i, r] = await Promise.all([de("config.json"), Xe("src/index.ts")]), n = Lc.safeParse(i);
|
|
7900
7892
|
if (!n.success) {
|
|
7901
7893
|
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7902
7894
|
return;
|
|
7903
7895
|
}
|
|
7904
|
-
const u =
|
|
7905
|
-
u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, await
|
|
7896
|
+
const u = Oi(r);
|
|
7897
|
+
u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, await ct("config.json", i);
|
|
7906
7898
|
}
|
|
7907
7899
|
async function Xh(e, t) {
|
|
7908
|
-
|
|
7909
|
-
const [i, r] = await Promise.all([
|
|
7900
|
+
re(`${e} Build presenter project configuration`);
|
|
7901
|
+
const [i, r] = await Promise.all([de("config.json"), Xe("src/index.ts")]), n = Bc.safeParse(i);
|
|
7910
7902
|
if (!n.success) {
|
|
7911
7903
|
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7912
7904
|
return;
|
|
7913
7905
|
}
|
|
7914
|
-
const u =
|
|
7915
|
-
u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, await
|
|
7906
|
+
const u = Oi(r);
|
|
7907
|
+
u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, await ct("config.json", i);
|
|
7916
7908
|
}
|
|
7917
7909
|
async function Os(e, t, i = "./") {
|
|
7918
|
-
if (
|
|
7919
|
-
t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`), await
|
|
7910
|
+
if (re(`${e} Bump project version`), t.version == null)
|
|
7911
|
+
t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`), await ct(`${i}package.json`, t);
|
|
7920
7912
|
else {
|
|
7921
7913
|
const r = t.version, n = t.version.split(".");
|
|
7922
|
-
t.version = `${n[0]}.${n[1]}.${Number(n[2]) + 1}`, console.info(`Project version bumped from '${r}' to '${t.version}'.`), await
|
|
7914
|
+
t.version = `${n[0]}.${n[1]}.${Number(n[2]) + 1}`, console.info(`Project version bumped from '${r}' to '${t.version}'.`), await ct(`${i}package.json`, t);
|
|
7923
7915
|
}
|
|
7924
7916
|
}
|
|
7925
7917
|
function Jh(e) {
|
|
@@ -7938,8 +7930,8 @@ const Yh = {
|
|
|
7938
7930
|
}, Sr = "<!-- OWASP_BADGES_START -->", Qh = "<!-- OWASP_BADGES_END -->";
|
|
7939
7931
|
async function xl() {
|
|
7940
7932
|
try {
|
|
7941
|
-
Ne("Audit Dependencies"), await
|
|
7942
|
-
const e = await
|
|
7933
|
+
Ne("Audit Dependencies"), await Ri();
|
|
7934
|
+
const e = await de("package.json");
|
|
7943
7935
|
console.log(1111, process.env.OWASP_NVD_API_KEY), await Le("1️⃣", "owasp-dependency-check", [
|
|
7944
7936
|
"--out",
|
|
7945
7937
|
"dependency-check-reports",
|
|
@@ -7955,24 +7947,24 @@ async function xl() {
|
|
|
7955
7947
|
}
|
|
7956
7948
|
}
|
|
7957
7949
|
async function el(e) {
|
|
7958
|
-
|
|
7959
|
-
const t = await
|
|
7950
|
+
re(`${e} Insert OWASP Badge(s) into 'README.md'`);
|
|
7951
|
+
const t = await de("dependency-check-reports/dependency-check-report.json"), i = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
|
|
7960
7952
|
for (const o of t.dependencies)
|
|
7961
7953
|
if (o.vulnerabilities != null)
|
|
7962
7954
|
for (const w of o.vulnerabilities) {
|
|
7963
7955
|
const S = w.severity?.toLowerCase() ?? "unknown";
|
|
7964
7956
|
S in i ? i[S]++ : i.unknown++;
|
|
7965
7957
|
}
|
|
7966
|
-
const r = await tl(i), n = await
|
|
7958
|
+
const r = await tl(i), n = await Xe("./README.md"), u = n.indexOf(Sr), h = n.indexOf(Qh);
|
|
7967
7959
|
if (u === -1 || h === -1) {
|
|
7968
7960
|
console.error("❌ No OWASP badge markers found in 'README.md'.");
|
|
7969
7961
|
return;
|
|
7970
7962
|
}
|
|
7971
7963
|
const d = r.join(" "), y = n.slice(0, Math.max(0, u + Sr.length)) + d + n.slice(Math.max(0, h));
|
|
7972
|
-
await
|
|
7964
|
+
await ei("README.md", y), console.info("OWASP audit badge(s) inserted into 'README.md'");
|
|
7973
7965
|
}
|
|
7974
7966
|
async function tl(e) {
|
|
7975
|
-
const t = await
|
|
7967
|
+
const t = await de("config.json"), i = [];
|
|
7976
7968
|
if (Object.values(e).reduce((n, u) => n + u, 0) === 0)
|
|
7977
7969
|
console.info("No vulnerabilities found."), i.push(`[](https://data-positioning.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
7978
7970
|
else
|
|
@@ -7994,7 +7986,7 @@ async function gl() {
|
|
|
7994
7986
|
const Tr = "<!-- DEPENDENCY_LICENSES_START -->", il = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
7995
7987
|
async function bl(e = [], t = !0) {
|
|
7996
7988
|
try {
|
|
7997
|
-
Ne("Document Dependencies"), await
|
|
7989
|
+
Ne("Document Dependencies"), await Ri();
|
|
7998
7990
|
const i = e.flatMap((n) => ["--allowed", `'${n}'`]), r = Pr(new zs(import.meta.resolve("@datapos/datapos-development/license-report-config")));
|
|
7999
7991
|
await Te(
|
|
8000
7992
|
"1️⃣ Generate 'licenses.json' file",
|
|
@@ -8006,7 +7998,7 @@ async function bl(e = [], t = !0) {
|
|
|
8006
7998
|
"license-report-recursive",
|
|
8007
7999
|
["--only=prod,peer", "--output=tree", "--recurse", "--department.value=n/a", "--licensePeriod.value=n/a", "--material.value=n/a", "--relatedTo.value=n/a"],
|
|
8008
8000
|
"licenses/licenseTree.json"
|
|
8009
|
-
), await Te("4️⃣ Check 'licenseTree.json' file", "license-report-check", ["--source", "licenses/licenseTree.json", "--output=table", ...i])) : (
|
|
8001
|
+
), await Te("4️⃣ Check 'licenseTree.json' file", "license-report-check", ["--source", "licenses/licenseTree.json", "--output=table", ...i])) : (re("3️⃣ Skip 'licenses/licenseTree.json' file generate"), re("4️⃣ Skip 'licenses/licenseTree.json' file check")), await Bh("licenses/downloads"), await Te("5️⃣ Download license files", "license-downloader", [
|
|
8010
8002
|
"--source",
|
|
8011
8003
|
"licenses/licenses.json",
|
|
8012
8004
|
"--licDir",
|
|
@@ -8020,15 +8012,15 @@ async function bl(e = [], t = !0) {
|
|
|
8020
8012
|
}
|
|
8021
8013
|
}
|
|
8022
8014
|
async function rl(e, t) {
|
|
8023
|
-
|
|
8024
|
-
const i = await
|
|
8015
|
+
re(`${e} Insert licenses into 'README.md'`);
|
|
8016
|
+
const i = await Xe("./README.md"), r = i.indexOf(Tr), n = i.indexOf(il);
|
|
8025
8017
|
if (r === -1 || n === -1) {
|
|
8026
8018
|
console.error("❌ No dependency license markers found in 'README.md'.");
|
|
8027
8019
|
return;
|
|
8028
8020
|
}
|
|
8029
|
-
const u = await
|
|
8021
|
+
const u = await de("licenses/licenses.json"), h = await de("licenses/downloads/licenses.ext.json");
|
|
8030
8022
|
let d = [];
|
|
8031
|
-
t && (d = await
|
|
8023
|
+
t && (d = await de("licenses/licenseTree.json"));
|
|
8032
8024
|
const y = [
|
|
8033
8025
|
...(() => {
|
|
8034
8026
|
const S = /* @__PURE__ */ new Map();
|
|
@@ -8050,14 +8042,14 @@ async function rl(e, t) {
|
|
|
8050
8042
|
`;
|
|
8051
8043
|
for (const S of y) {
|
|
8052
8044
|
const A = S.installedVersion === S.remoteVersion ? S.installedVersion : `${S.installedVersion} ⚠️`, F = S.latestRemoteModified ? sl(S.latestRemoteModified.split("T")[0]) : "n/a", Z = S.dependencyCount != null && S.dependencyCount >= 0 ? S.dependencyCount : "n/a";
|
|
8053
|
-
let
|
|
8054
|
-
S.licenseFileLink == null || S.licenseFileLink == "" ?
|
|
8045
|
+
let le;
|
|
8046
|
+
S.licenseFileLink == null || S.licenseFileLink == "" ? le = "⚠️ No license file" : le = `[${S.licenseFileLink.slice(Math.max(0, S.licenseFileLink.lastIndexOf("/") + 1))}](${S.licenseFileLink})`, o += `|${S.name}|${S.licenseType}|${A}|${S.remoteVersion}|${F}|${Z}|${le}|
|
|
8055
8047
|
`;
|
|
8056
8048
|
}
|
|
8057
8049
|
const w = `${i.slice(0, Math.max(0, r + Tr.length))}
|
|
8058
8050
|
${o}
|
|
8059
8051
|
${i.slice(Math.max(0, n))}`;
|
|
8060
|
-
await
|
|
8052
|
+
await ei("README.md", w);
|
|
8061
8053
|
}
|
|
8062
8054
|
function sl(e) {
|
|
8063
8055
|
if (e == null || e === "") return "n/a";
|
|
@@ -8105,9 +8097,9 @@ async function Sl(e) {
|
|
|
8105
8097
|
for (const y of u) {
|
|
8106
8098
|
const o = `${n}/${y}`;
|
|
8107
8099
|
try {
|
|
8108
|
-
const w = await
|
|
8100
|
+
const w = await ge.stat(o);
|
|
8109
8101
|
if (w.isDirectory()) {
|
|
8110
|
-
const S = await
|
|
8102
|
+
const S = await ge.readdir(o), A = { childCount: S.length, name: y, typeId: "folder" };
|
|
8111
8103
|
h.push(A), await i(o, S);
|
|
8112
8104
|
} else {
|
|
8113
8105
|
const S = { id: Vs(), lastModifiedAt: w.mtimeMs, name: y, size: w.size, typeId: "object" };
|
|
@@ -8122,8 +8114,8 @@ async function Sl(e) {
|
|
|
8122
8114
|
return w === 0 ? y.name.localeCompare(o.name) : w;
|
|
8123
8115
|
});
|
|
8124
8116
|
}
|
|
8125
|
-
const r = await
|
|
8126
|
-
await i(`public/${e}`, r), await
|
|
8117
|
+
const r = await ge.readdir(`public/${e}`);
|
|
8118
|
+
await i(`public/${e}`, r), await ge.writeFile(`./public/${e}Index.json`, JSON.stringify(t), "utf8"), console.info("✅ Public directory index built.");
|
|
8127
8119
|
} catch (t) {
|
|
8128
8120
|
console.error("❌ Error building public directory index.", t);
|
|
8129
8121
|
}
|
|
@@ -8131,13 +8123,13 @@ async function Sl(e) {
|
|
|
8131
8123
|
export {
|
|
8132
8124
|
xl as auditDependencies,
|
|
8133
8125
|
Sl as buildDirectoryIndex,
|
|
8134
|
-
|
|
8126
|
+
fl as buildProject,
|
|
8135
8127
|
gl as checkDependencies,
|
|
8136
8128
|
bl as documentDependencies,
|
|
8137
8129
|
_l as formatCode,
|
|
8138
8130
|
kl as lintCode,
|
|
8139
8131
|
ml as releaseProject,
|
|
8140
|
-
|
|
8132
|
+
dl as syncProjectConfigFiles,
|
|
8141
8133
|
yl as syncProjectWithGitHub,
|
|
8142
8134
|
vl as testProject,
|
|
8143
8135
|
wl as updateDataPosDependencies
|