@datapos/datapos-development 0.3.326 → 0.3.328
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,9 +1,10 @@
|
|
|
1
|
-
import { promises as
|
|
1
|
+
import { promises as ge } from "node:fs";
|
|
2
2
|
import { nanoid as Ds } from "nanoid";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import Ms from "node:path";
|
|
4
|
+
import { promisify as Vs } from "node:util";
|
|
5
|
+
import { exec as zs, spawn as js } from "node:child_process";
|
|
6
|
+
import { CONNECTOR_SOURCE_OPERATIONS as Fs, CONNECTOR_DESTINATION_OPERATIONS as $s } from "@datapos/datapos-shared";
|
|
7
|
+
import { fileURLToPath as Bs, URL as Zs } from "node:url";
|
|
7
8
|
function k(e, t, i) {
|
|
8
9
|
function r(d, y) {
|
|
9
10
|
if (d._zod || Object.defineProperty(d, "_zod", {
|
|
@@ -16,9 +17,9 @@ function k(e, t, i) {
|
|
|
16
17
|
}), d._zod.traits.has(e))
|
|
17
18
|
return;
|
|
18
19
|
d._zod.traits.add(e), t(d, y);
|
|
19
|
-
const o = h.prototype,
|
|
20
|
-
for (let
|
|
21
|
-
const A = S
|
|
20
|
+
const o = h.prototype, w = Object.keys(o);
|
|
21
|
+
for (let S = 0; S < w.length; S++) {
|
|
22
|
+
const A = w[S];
|
|
22
23
|
A in d || (d[A] = o[A].bind(d));
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -30,8 +31,8 @@ function k(e, t, i) {
|
|
|
30
31
|
var y;
|
|
31
32
|
const o = i?.Parent ? new u() : this;
|
|
32
33
|
r(o, d), (y = o._zod).deferred ?? (y.deferred = []);
|
|
33
|
-
for (const
|
|
34
|
-
|
|
34
|
+
for (const w of o._zod.deferred)
|
|
35
|
+
w();
|
|
35
36
|
return o;
|
|
36
37
|
}
|
|
37
38
|
return Object.defineProperty(h, "init", { value: r }), Object.defineProperty(h, Symbol.hasInstance, {
|
|
@@ -52,7 +53,7 @@ const Pr = {};
|
|
|
52
53
|
function Ue(e) {
|
|
53
54
|
return Pr;
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function Us(e) {
|
|
56
57
|
const t = Object.values(e).filter((r) => typeof r == "number");
|
|
57
58
|
return Object.entries(e).filter(([r, n]) => t.indexOf(+r) === -1).map(([r, n]) => n);
|
|
58
59
|
}
|
|
@@ -76,7 +77,7 @@ function gi(e) {
|
|
|
76
77
|
const t = e.startsWith("^") ? 1 : 0, i = e.endsWith("$") ? e.length - 1 : e.length;
|
|
77
78
|
return e.slice(t, i);
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function qs(e, t) {
|
|
80
81
|
const i = (e.toString().split(".")[1] || "").length, r = t.toString();
|
|
81
82
|
let n = (r.split(".")[1] || "").length;
|
|
82
83
|
if (n === 0 && /\d?e-\d?/.test(r)) {
|
|
@@ -119,10 +120,10 @@ function Je(...e) {
|
|
|
119
120
|
}
|
|
120
121
|
return Object.defineProperties({}, t);
|
|
121
122
|
}
|
|
122
|
-
function
|
|
123
|
+
function Fi(e) {
|
|
123
124
|
return JSON.stringify(e);
|
|
124
125
|
}
|
|
125
|
-
function
|
|
126
|
+
function Hs(e) {
|
|
126
127
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
127
128
|
}
|
|
128
129
|
const Cr = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
@@ -130,7 +131,7 @@ const Cr = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
|
130
131
|
function Dt(e) {
|
|
131
132
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
132
133
|
}
|
|
133
|
-
const
|
|
134
|
+
const Gs = vi(() => {
|
|
134
135
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
135
136
|
return !1;
|
|
136
137
|
try {
|
|
@@ -152,7 +153,7 @@ function st(e) {
|
|
|
152
153
|
function Ar(e) {
|
|
153
154
|
return st(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
154
155
|
}
|
|
155
|
-
const
|
|
156
|
+
const Ws = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
156
157
|
function nt(e) {
|
|
157
158
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
158
159
|
}
|
|
@@ -173,17 +174,17 @@ function R(e) {
|
|
|
173
174
|
}
|
|
174
175
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
175
176
|
}
|
|
176
|
-
function
|
|
177
|
+
function Ks(e) {
|
|
177
178
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
178
179
|
}
|
|
179
|
-
const
|
|
180
|
+
const Xs = {
|
|
180
181
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
181
182
|
int32: [-2147483648, 2147483647],
|
|
182
183
|
uint32: [0, 4294967295],
|
|
183
184
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
184
185
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
185
186
|
};
|
|
186
|
-
function
|
|
187
|
+
function Js(e, t) {
|
|
187
188
|
const i = e._zod.def, r = Je(e._zod.def, {
|
|
188
189
|
get shape() {
|
|
189
190
|
const n = {};
|
|
@@ -198,7 +199,7 @@ function Xs(e, t) {
|
|
|
198
199
|
});
|
|
199
200
|
return Ge(e, r);
|
|
200
201
|
}
|
|
201
|
-
function
|
|
202
|
+
function Ys(e, t) {
|
|
202
203
|
const i = e._zod.def, r = Je(e._zod.def, {
|
|
203
204
|
get shape() {
|
|
204
205
|
const n = { ...e._zod.def.shape };
|
|
@@ -213,7 +214,7 @@ function Js(e, t) {
|
|
|
213
214
|
});
|
|
214
215
|
return Ge(e, r);
|
|
215
216
|
}
|
|
216
|
-
function
|
|
217
|
+
function Qs(e, t) {
|
|
217
218
|
if (!st(t))
|
|
218
219
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
219
220
|
const i = e._zod.def.checks;
|
|
@@ -228,7 +229,7 @@ function Ys(e, t) {
|
|
|
228
229
|
});
|
|
229
230
|
return Ge(e, n);
|
|
230
231
|
}
|
|
231
|
-
function
|
|
232
|
+
function en(e, t) {
|
|
232
233
|
if (!st(t))
|
|
233
234
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
234
235
|
const i = {
|
|
@@ -241,7 +242,7 @@ function Qs(e, t) {
|
|
|
241
242
|
};
|
|
242
243
|
return Ge(e, i);
|
|
243
244
|
}
|
|
244
|
-
function
|
|
245
|
+
function tn(e, t) {
|
|
245
246
|
const i = Je(e._zod.def, {
|
|
246
247
|
get shape() {
|
|
247
248
|
const r = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
@@ -255,7 +256,7 @@ function en(e, t) {
|
|
|
255
256
|
});
|
|
256
257
|
return Ge(e, i);
|
|
257
258
|
}
|
|
258
|
-
function
|
|
259
|
+
function rn(e, t, i) {
|
|
259
260
|
const r = Je(t._zod.def, {
|
|
260
261
|
get shape() {
|
|
261
262
|
const n = t._zod.def.shape, u = { ...n };
|
|
@@ -280,7 +281,7 @@ function tn(e, t, i) {
|
|
|
280
281
|
});
|
|
281
282
|
return Ge(t, r);
|
|
282
283
|
}
|
|
283
|
-
function
|
|
284
|
+
function sn(e, t, i) {
|
|
284
285
|
const r = Je(t._zod.def, {
|
|
285
286
|
get shape() {
|
|
286
287
|
const n = t._zod.def.shape, u = { ...n };
|
|
@@ -354,13 +355,13 @@ const Er = (e, t) => {
|
|
|
354
355
|
enumerable: !1
|
|
355
356
|
});
|
|
356
357
|
}, Ir = k("$ZodError", Er), Nr = k("$ZodError", Er, { Parent: Error });
|
|
357
|
-
function
|
|
358
|
+
function nn(e, t = (i) => i.message) {
|
|
358
359
|
const i = {}, r = [];
|
|
359
360
|
for (const n of e.issues)
|
|
360
361
|
n.path.length > 0 ? (i[n.path[0]] = i[n.path[0]] || [], i[n.path[0]].push(t(n))) : r.push(t(n));
|
|
361
362
|
return { formErrors: r, fieldErrors: i };
|
|
362
363
|
}
|
|
363
|
-
function
|
|
364
|
+
function an(e, t = (i) => i.message) {
|
|
364
365
|
const i = { _errors: [] }, r = (n) => {
|
|
365
366
|
for (const u of n.issues)
|
|
366
367
|
if (u.code === "invalid_union" && u.errors.length)
|
|
@@ -406,47 +407,47 @@ const _i = (e) => (t, i, r, n) => {
|
|
|
406
407
|
success: !1,
|
|
407
408
|
error: new (e ?? Ir)(u.issues.map((h) => qe(h, n, Ue())))
|
|
408
409
|
} : { success: !0, data: u.value };
|
|
409
|
-
},
|
|
410
|
+
}, on = /* @__PURE__ */ Ut(Nr), qt = (e) => async (t, i, r) => {
|
|
410
411
|
const n = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
411
412
|
let u = t._zod.run({ value: i, issues: [] }, n);
|
|
412
413
|
return u instanceof Promise && (u = await u), u.issues.length ? {
|
|
413
414
|
success: !1,
|
|
414
415
|
error: new e(u.issues.map((h) => qe(h, n, Ue())))
|
|
415
416
|
} : { success: !0, data: u.value };
|
|
416
|
-
},
|
|
417
|
+
}, un = /* @__PURE__ */ qt(Nr), cn = (e) => (t, i, r) => {
|
|
417
418
|
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
418
419
|
return _i(e)(t, i, n);
|
|
419
|
-
},
|
|
420
|
+
}, hn = (e) => (t, i, r) => _i(e)(t, i, r), ln = (e) => async (t, i, r) => {
|
|
420
421
|
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
421
422
|
return ki(e)(t, i, n);
|
|
422
|
-
},
|
|
423
|
+
}, pn = (e) => async (t, i, r) => ki(e)(t, i, r), fn = (e) => (t, i, r) => {
|
|
423
424
|
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
424
425
|
return Ut(e)(t, i, n);
|
|
425
|
-
},
|
|
426
|
+
}, dn = (e) => (t, i, r) => Ut(e)(t, i, r), mn = (e) => async (t, i, r) => {
|
|
426
427
|
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
427
428
|
return qt(e)(t, i, n);
|
|
428
|
-
},
|
|
429
|
-
function
|
|
430
|
-
return new RegExp(
|
|
429
|
+
}, yn = (e) => async (t, i, r) => qt(e)(t, i, r), vn = /^[cC][^\s-]{8,}$/, xn = /^[0-9a-z]+$/, gn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, bn = /^[0-9a-vA-V]{20}$/, _n = /^[A-Za-z0-9]{27}$/, kn = /^[a-zA-Z0-9_-]{21}$/, wn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Sn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, $i = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Tn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Pn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
430
|
+
function Cn() {
|
|
431
|
+
return new RegExp(Pn, "u");
|
|
431
432
|
}
|
|
432
|
-
const
|
|
433
|
+
const An = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, En = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, In = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Nn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ln = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Lr = /^[A-Za-z0-9_-]*$/, On = /^\+(?:[0-9]){6,14}[0-9]$/, Or = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", Rn = /* @__PURE__ */ new RegExp(`^${Or}$`);
|
|
433
434
|
function Rr(e) {
|
|
434
435
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
435
436
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
436
437
|
}
|
|
437
|
-
function
|
|
438
|
+
function Dn(e) {
|
|
438
439
|
return new RegExp(`^${Rr(e)}$`);
|
|
439
440
|
}
|
|
440
|
-
function
|
|
441
|
+
function Mn(e) {
|
|
441
442
|
const t = Rr({ precision: e.precision }), i = ["Z"];
|
|
442
443
|
e.local && i.push(""), e.offset && i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
443
444
|
const r = `${t}(?:${i.join("|")})`;
|
|
444
445
|
return new RegExp(`^${Or}T(?:${r})$`);
|
|
445
446
|
}
|
|
446
|
-
const
|
|
447
|
+
const Vn = (e) => {
|
|
447
448
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
448
449
|
return new RegExp(`^${t}$`);
|
|
449
|
-
},
|
|
450
|
+
}, zn = /^-?\d+$/, jn = /^-?\d+(?:\.\d+)?/, Fn = /^(?:true|false)$/i, $n = /^[^A-Z]*$/, Bn = /^[^a-z]*$/, me = /* @__PURE__ */ k("$ZodCheck", (e, t) => {
|
|
450
451
|
var i;
|
|
451
452
|
e._zod ?? (e._zod = {}), e._zod.def = t, (i = e._zod).onattach ?? (i.onattach = []);
|
|
452
453
|
}), Dr = {
|
|
@@ -487,14 +488,14 @@ const Mn = (e) => {
|
|
|
487
488
|
continue: !t.abort
|
|
488
489
|
});
|
|
489
490
|
};
|
|
490
|
-
}),
|
|
491
|
+
}), Zn = /* @__PURE__ */ k("$ZodCheckMultipleOf", (e, t) => {
|
|
491
492
|
me.init(e, t), e._zod.onattach.push((i) => {
|
|
492
493
|
var r;
|
|
493
494
|
(r = i._zod.bag).multipleOf ?? (r.multipleOf = t.value);
|
|
494
495
|
}), e._zod.check = (i) => {
|
|
495
496
|
if (typeof i.value != typeof t.value)
|
|
496
497
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
497
|
-
(typeof i.value == "bigint" ? i.value % t.value === BigInt(0) :
|
|
498
|
+
(typeof i.value == "bigint" ? i.value % t.value === BigInt(0) : qs(i.value, t.value) === 0) || i.issues.push({
|
|
498
499
|
origin: typeof i.value,
|
|
499
500
|
code: "not_multiple_of",
|
|
500
501
|
divisor: t.value,
|
|
@@ -503,12 +504,12 @@ const Mn = (e) => {
|
|
|
503
504
|
continue: !t.abort
|
|
504
505
|
});
|
|
505
506
|
};
|
|
506
|
-
}),
|
|
507
|
+
}), Un = /* @__PURE__ */ k("$ZodCheckNumberFormat", (e, t) => {
|
|
507
508
|
me.init(e, t), t.format = t.format || "float64";
|
|
508
|
-
const i = t.format?.includes("int"), r = i ? "int" : "number", [n, u] =
|
|
509
|
+
const i = t.format?.includes("int"), r = i ? "int" : "number", [n, u] = Xs[t.format];
|
|
509
510
|
e._zod.onattach.push((h) => {
|
|
510
511
|
const d = h._zod.bag;
|
|
511
|
-
d.format = t.format, d.minimum = n, d.maximum = u, i && (d.pattern =
|
|
512
|
+
d.format = t.format, d.minimum = n, d.maximum = u, i && (d.pattern = zn);
|
|
512
513
|
}), e._zod.check = (h) => {
|
|
513
514
|
const d = h.value;
|
|
514
515
|
if (i) {
|
|
@@ -560,7 +561,7 @@ const Mn = (e) => {
|
|
|
560
561
|
inst: e
|
|
561
562
|
});
|
|
562
563
|
};
|
|
563
|
-
}),
|
|
564
|
+
}), qn = /* @__PURE__ */ k("$ZodCheckMaxLength", (e, t) => {
|
|
564
565
|
var i;
|
|
565
566
|
me.init(e, t), (i = e._zod.def).when ?? (i.when = (r) => {
|
|
566
567
|
const n = r.value;
|
|
@@ -583,7 +584,7 @@ const Mn = (e) => {
|
|
|
583
584
|
continue: !t.abort
|
|
584
585
|
});
|
|
585
586
|
};
|
|
586
|
-
}),
|
|
587
|
+
}), Hn = /* @__PURE__ */ k("$ZodCheckMinLength", (e, t) => {
|
|
587
588
|
var i;
|
|
588
589
|
me.init(e, t), (i = e._zod.def).when ?? (i.when = (r) => {
|
|
589
590
|
const n = r.value;
|
|
@@ -606,7 +607,7 @@ const Mn = (e) => {
|
|
|
606
607
|
continue: !t.abort
|
|
607
608
|
});
|
|
608
609
|
};
|
|
609
|
-
}),
|
|
610
|
+
}), Gn = /* @__PURE__ */ k("$ZodCheckLengthEquals", (e, t) => {
|
|
610
611
|
var i;
|
|
611
612
|
me.init(e, t), (i = e._zod.def).when ?? (i.when = (r) => {
|
|
612
613
|
const n = r.value;
|
|
@@ -646,7 +647,7 @@ const Mn = (e) => {
|
|
|
646
647
|
});
|
|
647
648
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
648
649
|
});
|
|
649
|
-
}),
|
|
650
|
+
}), Wn = /* @__PURE__ */ k("$ZodCheckRegex", (e, t) => {
|
|
650
651
|
Ht.init(e, t), e._zod.check = (i) => {
|
|
651
652
|
t.pattern.lastIndex = 0, !t.pattern.test(i.value) && i.issues.push({
|
|
652
653
|
origin: "string",
|
|
@@ -658,11 +659,11 @@ const Mn = (e) => {
|
|
|
658
659
|
continue: !t.abort
|
|
659
660
|
});
|
|
660
661
|
};
|
|
661
|
-
}),
|
|
662
|
+
}), Kn = /* @__PURE__ */ k("$ZodCheckLowerCase", (e, t) => {
|
|
662
663
|
t.pattern ?? (t.pattern = $n), Ht.init(e, t);
|
|
663
|
-
}),
|
|
664
|
-
t.pattern ?? (t.pattern =
|
|
665
|
-
}),
|
|
664
|
+
}), Xn = /* @__PURE__ */ k("$ZodCheckUpperCase", (e, t) => {
|
|
665
|
+
t.pattern ?? (t.pattern = Bn), Ht.init(e, t);
|
|
666
|
+
}), Jn = /* @__PURE__ */ k("$ZodCheckIncludes", (e, t) => {
|
|
666
667
|
me.init(e, t);
|
|
667
668
|
const i = nt(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${i}` : i);
|
|
668
669
|
t.pattern = r, e._zod.onattach.push((n) => {
|
|
@@ -679,7 +680,7 @@ const Mn = (e) => {
|
|
|
679
680
|
continue: !t.abort
|
|
680
681
|
});
|
|
681
682
|
};
|
|
682
|
-
}),
|
|
683
|
+
}), Yn = /* @__PURE__ */ k("$ZodCheckStartsWith", (e, t) => {
|
|
683
684
|
me.init(e, t);
|
|
684
685
|
const i = new RegExp(`^${nt(t.prefix)}.*`);
|
|
685
686
|
t.pattern ?? (t.pattern = i), e._zod.onattach.push((r) => {
|
|
@@ -696,7 +697,7 @@ const Mn = (e) => {
|
|
|
696
697
|
continue: !t.abort
|
|
697
698
|
});
|
|
698
699
|
};
|
|
699
|
-
}),
|
|
700
|
+
}), Qn = /* @__PURE__ */ k("$ZodCheckEndsWith", (e, t) => {
|
|
700
701
|
me.init(e, t);
|
|
701
702
|
const i = new RegExp(`.*${nt(t.suffix)}$`);
|
|
702
703
|
t.pattern ?? (t.pattern = i), e._zod.onattach.push((r) => {
|
|
@@ -713,12 +714,12 @@ const Mn = (e) => {
|
|
|
713
714
|
continue: !t.abort
|
|
714
715
|
});
|
|
715
716
|
};
|
|
716
|
-
}),
|
|
717
|
+
}), ea = /* @__PURE__ */ k("$ZodCheckOverwrite", (e, t) => {
|
|
717
718
|
me.init(e, t), e._zod.check = (i) => {
|
|
718
719
|
i.value = t.tx(i.value);
|
|
719
720
|
};
|
|
720
721
|
});
|
|
721
|
-
class
|
|
722
|
+
class ta {
|
|
722
723
|
constructor(t = []) {
|
|
723
724
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
724
725
|
}
|
|
@@ -741,13 +742,13 @@ class ea {
|
|
|
741
742
|
`));
|
|
742
743
|
}
|
|
743
744
|
}
|
|
744
|
-
const
|
|
745
|
+
const ia = {
|
|
745
746
|
major: 4,
|
|
746
747
|
minor: 1,
|
|
747
748
|
patch: 13
|
|
748
749
|
}, Y = /* @__PURE__ */ k("$ZodType", (e, t) => {
|
|
749
750
|
var i;
|
|
750
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
751
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = ia;
|
|
751
752
|
const r = [...e._zod.def.checks ?? []];
|
|
752
753
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
753
754
|
for (const n of r)
|
|
@@ -759,19 +760,19 @@ const ta = {
|
|
|
759
760
|
});
|
|
760
761
|
else {
|
|
761
762
|
const n = (h, d, y) => {
|
|
762
|
-
let o = tt(h),
|
|
763
|
-
for (const
|
|
764
|
-
if (
|
|
765
|
-
if (!
|
|
763
|
+
let o = tt(h), w;
|
|
764
|
+
for (const S of d) {
|
|
765
|
+
if (S._zod.def.when) {
|
|
766
|
+
if (!S._zod.def.when(h))
|
|
766
767
|
continue;
|
|
767
768
|
} else if (o)
|
|
768
769
|
continue;
|
|
769
|
-
const A = h.issues.length,
|
|
770
|
-
if (
|
|
770
|
+
const A = h.issues.length, F = S._zod.check(h);
|
|
771
|
+
if (F instanceof Promise && y?.async === !1)
|
|
771
772
|
throw new rt();
|
|
772
|
-
if (
|
|
773
|
-
|
|
774
|
-
await
|
|
773
|
+
if (w || F instanceof Promise)
|
|
774
|
+
w = (w ?? Promise.resolve()).then(async () => {
|
|
775
|
+
await F, h.issues.length !== A && (o || (o = tt(h, A)));
|
|
775
776
|
});
|
|
776
777
|
else {
|
|
777
778
|
if (h.issues.length === A)
|
|
@@ -779,7 +780,7 @@ const ta = {
|
|
|
779
780
|
o || (o = tt(h, A));
|
|
780
781
|
}
|
|
781
782
|
}
|
|
782
|
-
return
|
|
783
|
+
return w ? w.then(() => h) : h;
|
|
783
784
|
}, u = (h, d, y) => {
|
|
784
785
|
if (tt(h))
|
|
785
786
|
return h.aborted = !0, h;
|
|
@@ -787,7 +788,7 @@ const ta = {
|
|
|
787
788
|
if (o instanceof Promise) {
|
|
788
789
|
if (y.async === !1)
|
|
789
790
|
throw new rt();
|
|
790
|
-
return o.then((
|
|
791
|
+
return o.then((w) => e._zod.parse(w, y));
|
|
791
792
|
}
|
|
792
793
|
return e._zod.parse(o, y);
|
|
793
794
|
};
|
|
@@ -796,7 +797,7 @@ const ta = {
|
|
|
796
797
|
return e._zod.parse(h, d);
|
|
797
798
|
if (d.direction === "backward") {
|
|
798
799
|
const o = e._zod.parse({ value: h.value, issues: [] }, { ...d, skipChecks: !0 });
|
|
799
|
-
return o instanceof Promise ? o.then((
|
|
800
|
+
return o instanceof Promise ? o.then((w) => u(w, h, d)) : u(o, h, d);
|
|
800
801
|
}
|
|
801
802
|
const y = e._zod.parse(h, d);
|
|
802
803
|
if (y instanceof Promise) {
|
|
@@ -810,17 +811,17 @@ const ta = {
|
|
|
810
811
|
e["~standard"] = {
|
|
811
812
|
validate: (n) => {
|
|
812
813
|
try {
|
|
813
|
-
const u =
|
|
814
|
+
const u = on(e, n);
|
|
814
815
|
return u.success ? { value: u.data } : { issues: u.error?.issues };
|
|
815
816
|
} catch {
|
|
816
|
-
return
|
|
817
|
+
return un(e, n).then((h) => h.success ? { value: h.data } : { issues: h.error?.issues });
|
|
817
818
|
}
|
|
818
819
|
},
|
|
819
820
|
vendor: "zod",
|
|
820
821
|
version: 1
|
|
821
822
|
};
|
|
822
|
-
}),
|
|
823
|
-
Y.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ??
|
|
823
|
+
}), wi = /* @__PURE__ */ k("$ZodString", (e, t) => {
|
|
824
|
+
Y.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Vn(e._zod.bag), e._zod.parse = (i, r) => {
|
|
824
825
|
if (t.coerce)
|
|
825
826
|
try {
|
|
826
827
|
i.value = String(i.value);
|
|
@@ -834,10 +835,10 @@ const ta = {
|
|
|
834
835
|
}), i;
|
|
835
836
|
};
|
|
836
837
|
}), W = /* @__PURE__ */ k("$ZodStringFormat", (e, t) => {
|
|
837
|
-
Ht.init(e, t),
|
|
838
|
-
}),
|
|
838
|
+
Ht.init(e, t), wi.init(e, t);
|
|
839
|
+
}), ra = /* @__PURE__ */ k("$ZodGUID", (e, t) => {
|
|
839
840
|
t.pattern ?? (t.pattern = Sn), W.init(e, t);
|
|
840
|
-
}),
|
|
841
|
+
}), sa = /* @__PURE__ */ k("$ZodUUID", (e, t) => {
|
|
841
842
|
if (t.version) {
|
|
842
843
|
const r = {
|
|
843
844
|
v1: 1,
|
|
@@ -851,13 +852,13 @@ const ta = {
|
|
|
851
852
|
}[t.version];
|
|
852
853
|
if (r === void 0)
|
|
853
854
|
throw new Error(`Invalid UUID version: "${t.version}"`);
|
|
854
|
-
t.pattern ?? (t.pattern =
|
|
855
|
+
t.pattern ?? (t.pattern = $i(r));
|
|
855
856
|
} else
|
|
856
|
-
t.pattern ?? (t.pattern =
|
|
857
|
+
t.pattern ?? (t.pattern = $i());
|
|
857
858
|
W.init(e, t);
|
|
858
|
-
}),
|
|
859
|
-
t.pattern ?? (t.pattern =
|
|
860
|
-
}),
|
|
859
|
+
}), na = /* @__PURE__ */ k("$ZodEmail", (e, t) => {
|
|
860
|
+
t.pattern ?? (t.pattern = Tn), W.init(e, t);
|
|
861
|
+
}), aa = /* @__PURE__ */ k("$ZodURL", (e, t) => {
|
|
861
862
|
W.init(e, t), e._zod.check = (i) => {
|
|
862
863
|
try {
|
|
863
864
|
const r = i.value.trim(), n = new URL(r);
|
|
@@ -889,32 +890,32 @@ const ta = {
|
|
|
889
890
|
});
|
|
890
891
|
}
|
|
891
892
|
};
|
|
892
|
-
}),
|
|
893
|
-
t.pattern ?? (t.pattern =
|
|
894
|
-
}),
|
|
895
|
-
t.pattern ?? (t.pattern =
|
|
896
|
-
}),
|
|
897
|
-
t.pattern ?? (t.pattern = yn), W.init(e, t);
|
|
898
|
-
}), ca = /* @__PURE__ */ k("$ZodCUID2", (e, t) => {
|
|
893
|
+
}), oa = /* @__PURE__ */ k("$ZodEmoji", (e, t) => {
|
|
894
|
+
t.pattern ?? (t.pattern = Cn()), W.init(e, t);
|
|
895
|
+
}), ua = /* @__PURE__ */ k("$ZodNanoID", (e, t) => {
|
|
896
|
+
t.pattern ?? (t.pattern = kn), W.init(e, t);
|
|
897
|
+
}), ca = /* @__PURE__ */ k("$ZodCUID", (e, t) => {
|
|
899
898
|
t.pattern ?? (t.pattern = vn), W.init(e, t);
|
|
900
|
-
}), ha = /* @__PURE__ */ k("$
|
|
899
|
+
}), ha = /* @__PURE__ */ k("$ZodCUID2", (e, t) => {
|
|
901
900
|
t.pattern ?? (t.pattern = xn), W.init(e, t);
|
|
902
|
-
}), la = /* @__PURE__ */ k("$
|
|
901
|
+
}), la = /* @__PURE__ */ k("$ZodULID", (e, t) => {
|
|
903
902
|
t.pattern ?? (t.pattern = gn), W.init(e, t);
|
|
904
|
-
}), pa = /* @__PURE__ */ k("$
|
|
903
|
+
}), pa = /* @__PURE__ */ k("$ZodXID", (e, t) => {
|
|
905
904
|
t.pattern ?? (t.pattern = bn), W.init(e, t);
|
|
906
|
-
}), fa = /* @__PURE__ */ k("$
|
|
905
|
+
}), fa = /* @__PURE__ */ k("$ZodKSUID", (e, t) => {
|
|
906
|
+
t.pattern ?? (t.pattern = _n), W.init(e, t);
|
|
907
|
+
}), da = /* @__PURE__ */ k("$ZodISODateTime", (e, t) => {
|
|
908
|
+
t.pattern ?? (t.pattern = Mn(t)), W.init(e, t);
|
|
909
|
+
}), ma = /* @__PURE__ */ k("$ZodISODate", (e, t) => {
|
|
910
|
+
t.pattern ?? (t.pattern = Rn), W.init(e, t);
|
|
911
|
+
}), ya = /* @__PURE__ */ k("$ZodISOTime", (e, t) => {
|
|
907
912
|
t.pattern ?? (t.pattern = Dn(t)), W.init(e, t);
|
|
908
|
-
}),
|
|
909
|
-
t.pattern ?? (t.pattern =
|
|
910
|
-
}),
|
|
911
|
-
t.pattern ?? (t.pattern =
|
|
912
|
-
}),
|
|
913
|
-
t.pattern ?? (t.pattern =
|
|
914
|
-
}), va = /* @__PURE__ */ k("$ZodIPv4", (e, t) => {
|
|
915
|
-
t.pattern ?? (t.pattern = Cn), W.init(e, t), e._zod.bag.format = "ipv4";
|
|
916
|
-
}), xa = /* @__PURE__ */ k("$ZodIPv6", (e, t) => {
|
|
917
|
-
t.pattern ?? (t.pattern = An), W.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (i) => {
|
|
913
|
+
}), va = /* @__PURE__ */ k("$ZodISODuration", (e, t) => {
|
|
914
|
+
t.pattern ?? (t.pattern = wn), W.init(e, t);
|
|
915
|
+
}), xa = /* @__PURE__ */ k("$ZodIPv4", (e, t) => {
|
|
916
|
+
t.pattern ?? (t.pattern = An), W.init(e, t), e._zod.bag.format = "ipv4";
|
|
917
|
+
}), ga = /* @__PURE__ */ k("$ZodIPv6", (e, t) => {
|
|
918
|
+
t.pattern ?? (t.pattern = En), W.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (i) => {
|
|
918
919
|
try {
|
|
919
920
|
new URL(`http://[${i.value}]`);
|
|
920
921
|
} catch {
|
|
@@ -927,10 +928,10 @@ const ta = {
|
|
|
927
928
|
});
|
|
928
929
|
}
|
|
929
930
|
};
|
|
930
|
-
}),
|
|
931
|
-
t.pattern ?? (t.pattern =
|
|
932
|
-
}),
|
|
933
|
-
t.pattern ?? (t.pattern =
|
|
931
|
+
}), ba = /* @__PURE__ */ k("$ZodCIDRv4", (e, t) => {
|
|
932
|
+
t.pattern ?? (t.pattern = In), W.init(e, t);
|
|
933
|
+
}), _a = /* @__PURE__ */ k("$ZodCIDRv6", (e, t) => {
|
|
934
|
+
t.pattern ?? (t.pattern = Nn), W.init(e, t), e._zod.check = (i) => {
|
|
934
935
|
const r = i.value.split("/");
|
|
935
936
|
try {
|
|
936
937
|
if (r.length !== 2)
|
|
@@ -966,8 +967,8 @@ function zr(e) {
|
|
|
966
967
|
return !1;
|
|
967
968
|
}
|
|
968
969
|
}
|
|
969
|
-
const
|
|
970
|
-
t.pattern ?? (t.pattern =
|
|
970
|
+
const ka = /* @__PURE__ */ k("$ZodBase64", (e, t) => {
|
|
971
|
+
t.pattern ?? (t.pattern = Ln), W.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (i) => {
|
|
971
972
|
zr(i.value) || i.issues.push({
|
|
972
973
|
code: "invalid_format",
|
|
973
974
|
format: "base64",
|
|
@@ -977,7 +978,7 @@ const _a = /* @__PURE__ */ k("$ZodBase64", (e, t) => {
|
|
|
977
978
|
});
|
|
978
979
|
};
|
|
979
980
|
});
|
|
980
|
-
function
|
|
981
|
+
function wa(e) {
|
|
981
982
|
if (!Lr.test(e))
|
|
982
983
|
return !1;
|
|
983
984
|
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), i = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
@@ -985,7 +986,7 @@ function ka(e) {
|
|
|
985
986
|
}
|
|
986
987
|
const Sa = /* @__PURE__ */ k("$ZodBase64URL", (e, t) => {
|
|
987
988
|
t.pattern ?? (t.pattern = Lr), W.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (i) => {
|
|
988
|
-
|
|
989
|
+
wa(i.value) || i.issues.push({
|
|
989
990
|
code: "invalid_format",
|
|
990
991
|
format: "base64url",
|
|
991
992
|
input: i.value,
|
|
@@ -993,10 +994,10 @@ const Sa = /* @__PURE__ */ k("$ZodBase64URL", (e, t) => {
|
|
|
993
994
|
continue: !t.abort
|
|
994
995
|
});
|
|
995
996
|
};
|
|
996
|
-
}),
|
|
997
|
-
t.pattern ?? (t.pattern =
|
|
997
|
+
}), Ta = /* @__PURE__ */ k("$ZodE164", (e, t) => {
|
|
998
|
+
t.pattern ?? (t.pattern = On), W.init(e, t);
|
|
998
999
|
});
|
|
999
|
-
function
|
|
1000
|
+
function Pa(e, t = null) {
|
|
1000
1001
|
try {
|
|
1001
1002
|
const i = e.split(".");
|
|
1002
1003
|
if (i.length !== 3)
|
|
@@ -1010,9 +1011,9 @@ function Ta(e, t = null) {
|
|
|
1010
1011
|
return !1;
|
|
1011
1012
|
}
|
|
1012
1013
|
}
|
|
1013
|
-
const
|
|
1014
|
+
const Ca = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
1014
1015
|
W.init(e, t), e._zod.check = (i) => {
|
|
1015
|
-
|
|
1016
|
+
Pa(i.value, t.alg) || i.issues.push({
|
|
1016
1017
|
code: "invalid_format",
|
|
1017
1018
|
format: "jwt",
|
|
1018
1019
|
input: i.value,
|
|
@@ -1021,7 +1022,7 @@ const Pa = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
|
1021
1022
|
});
|
|
1022
1023
|
};
|
|
1023
1024
|
}), jr = /* @__PURE__ */ k("$ZodNumber", (e, t) => {
|
|
1024
|
-
Y.init(e, t), e._zod.pattern = e._zod.bag.pattern ??
|
|
1025
|
+
Y.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? jn, e._zod.parse = (i, r) => {
|
|
1025
1026
|
if (t.coerce)
|
|
1026
1027
|
try {
|
|
1027
1028
|
i.value = Number(i.value);
|
|
@@ -1039,10 +1040,10 @@ const Pa = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
|
1039
1040
|
...u ? { received: u } : {}
|
|
1040
1041
|
}), i;
|
|
1041
1042
|
};
|
|
1042
|
-
}),
|
|
1043
|
-
|
|
1044
|
-
}),
|
|
1045
|
-
Y.init(e, t), e._zod.pattern =
|
|
1043
|
+
}), Aa = /* @__PURE__ */ k("$ZodNumberFormat", (e, t) => {
|
|
1044
|
+
Un.init(e, t), jr.init(e, t);
|
|
1045
|
+
}), Ea = /* @__PURE__ */ k("$ZodBoolean", (e, t) => {
|
|
1046
|
+
Y.init(e, t), e._zod.pattern = Fn, e._zod.parse = (i, r) => {
|
|
1046
1047
|
if (t.coerce)
|
|
1047
1048
|
try {
|
|
1048
1049
|
i.value = !!i.value;
|
|
@@ -1056,9 +1057,9 @@ const Pa = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
|
1056
1057
|
inst: e
|
|
1057
1058
|
}), i;
|
|
1058
1059
|
};
|
|
1059
|
-
}),
|
|
1060
|
+
}), Ia = /* @__PURE__ */ k("$ZodUnknown", (e, t) => {
|
|
1060
1061
|
Y.init(e, t), e._zod.parse = (i) => i;
|
|
1061
|
-
}),
|
|
1062
|
+
}), Na = /* @__PURE__ */ k("$ZodNever", (e, t) => {
|
|
1062
1063
|
Y.init(e, t), e._zod.parse = (i, r) => (i.issues.push({
|
|
1063
1064
|
expected: "never",
|
|
1064
1065
|
code: "invalid_type",
|
|
@@ -1069,7 +1070,7 @@ const Pa = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
|
1069
1070
|
function Bi(e, t, i) {
|
|
1070
1071
|
e.issues.length && t.issues.push(...it(i, e.issues)), t.value[i] = e.value;
|
|
1071
1072
|
}
|
|
1072
|
-
const
|
|
1073
|
+
const La = /* @__PURE__ */ k("$ZodArray", (e, t) => {
|
|
1073
1074
|
Y.init(e, t), e._zod.parse = (i, r) => {
|
|
1074
1075
|
const n = i.value;
|
|
1075
1076
|
if (!Array.isArray(n))
|
|
@@ -1094,12 +1095,12 @@ const Na = /* @__PURE__ */ k("$ZodArray", (e, t) => {
|
|
|
1094
1095
|
function Mt(e, t, i, r) {
|
|
1095
1096
|
e.issues.length && t.issues.push(...it(i, e.issues)), e.value === void 0 ? i in r && (t.value[i] = void 0) : t.value[i] = e.value;
|
|
1096
1097
|
}
|
|
1097
|
-
function
|
|
1098
|
+
function Fr(e) {
|
|
1098
1099
|
const t = Object.keys(e.shape);
|
|
1099
1100
|
for (const r of t)
|
|
1100
1101
|
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
1101
1102
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
1102
|
-
const i =
|
|
1103
|
+
const i = Ks(e.shape);
|
|
1103
1104
|
return {
|
|
1104
1105
|
...e,
|
|
1105
1106
|
keys: t,
|
|
@@ -1108,17 +1109,17 @@ function $r(e) {
|
|
|
1108
1109
|
optionalKeys: new Set(i)
|
|
1109
1110
|
};
|
|
1110
1111
|
}
|
|
1111
|
-
function
|
|
1112
|
+
function $r(e, t, i, r, n, u) {
|
|
1112
1113
|
const h = [], d = n.keySet, y = n.catchall._zod, o = y.def.type;
|
|
1113
|
-
for (const
|
|
1114
|
-
if (d.has(
|
|
1114
|
+
for (const w in t) {
|
|
1115
|
+
if (d.has(w))
|
|
1115
1116
|
continue;
|
|
1116
1117
|
if (o === "never") {
|
|
1117
|
-
h.push(
|
|
1118
|
+
h.push(w);
|
|
1118
1119
|
continue;
|
|
1119
1120
|
}
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1121
|
+
const S = y.run({ value: t[w], issues: [] }, r);
|
|
1122
|
+
S instanceof Promise ? e.push(S.then((A) => Mt(A, i, w, t))) : Mt(S, i, w, t);
|
|
1122
1123
|
}
|
|
1123
1124
|
return h.length && i.issues.push({
|
|
1124
1125
|
code: "unrecognized_keys",
|
|
@@ -1127,7 +1128,7 @@ function Fr(e, t, i, r, n, u) {
|
|
|
1127
1128
|
inst: u
|
|
1128
1129
|
}), e.length ? Promise.all(e).then(() => i) : i;
|
|
1129
1130
|
}
|
|
1130
|
-
const
|
|
1131
|
+
const Oa = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
1131
1132
|
if (Y.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1132
1133
|
const d = t.shape;
|
|
1133
1134
|
Object.defineProperty(t, "shape", {
|
|
@@ -1139,15 +1140,15 @@ const La = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1139
1140
|
}
|
|
1140
1141
|
});
|
|
1141
1142
|
}
|
|
1142
|
-
const r = vi(() =>
|
|
1143
|
+
const r = vi(() => Fr(t));
|
|
1143
1144
|
U(e._zod, "propValues", () => {
|
|
1144
1145
|
const d = t.shape, y = {};
|
|
1145
1146
|
for (const o in d) {
|
|
1146
|
-
const
|
|
1147
|
-
if (
|
|
1147
|
+
const w = d[o]._zod;
|
|
1148
|
+
if (w.values) {
|
|
1148
1149
|
y[o] ?? (y[o] = /* @__PURE__ */ new Set());
|
|
1149
|
-
for (const
|
|
1150
|
-
y[o].add(
|
|
1150
|
+
for (const S of w.values)
|
|
1151
|
+
y[o].add(S);
|
|
1151
1152
|
}
|
|
1152
1153
|
}
|
|
1153
1154
|
return y;
|
|
@@ -1165,58 +1166,58 @@ const La = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1165
1166
|
inst: e
|
|
1166
1167
|
}), d;
|
|
1167
1168
|
d.value = {};
|
|
1168
|
-
const
|
|
1169
|
+
const w = [], S = h.shape;
|
|
1169
1170
|
for (const A of h.keys) {
|
|
1170
|
-
const Z =
|
|
1171
|
-
Z instanceof Promise ?
|
|
1171
|
+
const Z = S[A]._zod.run({ value: o[A], issues: [] }, y);
|
|
1172
|
+
Z instanceof Promise ? w.push(Z.then((le) => Mt(le, d, A, o))) : Mt(Z, d, A, o);
|
|
1172
1173
|
}
|
|
1173
|
-
return u ?
|
|
1174
|
+
return u ? $r(w, o, d, y, r.value, e) : w.length ? Promise.all(w).then(() => d) : d;
|
|
1174
1175
|
};
|
|
1175
|
-
}),
|
|
1176
|
-
|
|
1177
|
-
const i = e._zod.parse, r = vi(() =>
|
|
1178
|
-
const
|
|
1179
|
-
const
|
|
1180
|
-
return `shape[${
|
|
1176
|
+
}), Ra = /* @__PURE__ */ k("$ZodObjectJIT", (e, t) => {
|
|
1177
|
+
Oa.init(e, t);
|
|
1178
|
+
const i = e._zod.parse, r = vi(() => Fr(t)), n = (A) => {
|
|
1179
|
+
const F = new ta(["shape", "payload", "ctx"]), Z = r.value, le = (Ae) => {
|
|
1180
|
+
const _e = Fi(Ae);
|
|
1181
|
+
return `shape[${_e}]._zod.run({ value: input[${_e}], issues: [] }, ctx)`;
|
|
1181
1182
|
};
|
|
1182
|
-
|
|
1183
|
+
F.write("const input = payload.value;");
|
|
1183
1184
|
const D = /* @__PURE__ */ Object.create(null);
|
|
1184
1185
|
let se = 0;
|
|
1185
|
-
for (const
|
|
1186
|
-
D[
|
|
1187
|
-
|
|
1188
|
-
for (const
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1191
|
-
if (${
|
|
1192
|
-
payload.issues = payload.issues.concat(${
|
|
1186
|
+
for (const Ae of Z.keys)
|
|
1187
|
+
D[Ae] = `key_${se++}`;
|
|
1188
|
+
F.write("const newResult = {};");
|
|
1189
|
+
for (const Ae of Z.keys) {
|
|
1190
|
+
const _e = D[Ae], Ke = Fi(Ae);
|
|
1191
|
+
F.write(`const ${_e} = ${le(Ae)};`), F.write(`
|
|
1192
|
+
if (${_e}.issues.length) {
|
|
1193
|
+
payload.issues = payload.issues.concat(${_e}.issues.map(iss => ({
|
|
1193
1194
|
...iss,
|
|
1194
1195
|
path: iss.path ? [${Ke}, ...iss.path] : [${Ke}]
|
|
1195
1196
|
})));
|
|
1196
1197
|
}
|
|
1197
1198
|
|
|
1198
1199
|
|
|
1199
|
-
if (${
|
|
1200
|
+
if (${_e}.value === undefined) {
|
|
1200
1201
|
if (${Ke} in input) {
|
|
1201
1202
|
newResult[${Ke}] = undefined;
|
|
1202
1203
|
}
|
|
1203
1204
|
} else {
|
|
1204
|
-
newResult[${Ke}] = ${
|
|
1205
|
+
newResult[${Ke}] = ${_e}.value;
|
|
1205
1206
|
}
|
|
1206
1207
|
|
|
1207
1208
|
`);
|
|
1208
1209
|
}
|
|
1209
|
-
|
|
1210
|
-
const ft =
|
|
1211
|
-
return (
|
|
1210
|
+
F.write("payload.value = newResult;"), F.write("return payload;");
|
|
1211
|
+
const ft = F.compile();
|
|
1212
|
+
return (Ae, _e) => ft(A, Ae, _e);
|
|
1212
1213
|
};
|
|
1213
1214
|
let u;
|
|
1214
|
-
const h = Dt, d = !Pr.jitless, o = d &&
|
|
1215
|
-
let
|
|
1216
|
-
e._zod.parse = (A,
|
|
1217
|
-
|
|
1215
|
+
const h = Dt, d = !Pr.jitless, o = d && Gs.value, w = t.catchall;
|
|
1216
|
+
let S;
|
|
1217
|
+
e._zod.parse = (A, F) => {
|
|
1218
|
+
S ?? (S = r.value);
|
|
1218
1219
|
const Z = A.value;
|
|
1219
|
-
return h(Z) ? d && o &&
|
|
1220
|
+
return h(Z) ? d && o && F?.async === !1 && F.jitless !== !0 ? (u || (u = n(t.shape)), A = u(A, F), w ? $r([], Z, A, F, S, e) : A) : i(A, F) : (A.issues.push({
|
|
1220
1221
|
expected: "object",
|
|
1221
1222
|
code: "invalid_type",
|
|
1222
1223
|
input: Z,
|
|
@@ -1236,7 +1237,7 @@ function Zi(e, t, i, r) {
|
|
|
1236
1237
|
errors: e.map((u) => u.issues.map((h) => qe(h, r, Ue())))
|
|
1237
1238
|
}), t);
|
|
1238
1239
|
}
|
|
1239
|
-
const
|
|
1240
|
+
const Da = /* @__PURE__ */ k("$ZodUnion", (e, t) => {
|
|
1240
1241
|
Y.init(e, t), U(e._zod, "optin", () => t.options.some((n) => n._zod.optin === "optional") ? "optional" : void 0), U(e._zod, "optout", () => t.options.some((n) => n._zod.optout === "optional") ? "optional" : void 0), U(e._zod, "values", () => {
|
|
1241
1242
|
if (t.options.every((n) => n._zod.values))
|
|
1242
1243
|
return new Set(t.options.flatMap((n) => Array.from(n._zod.values)));
|
|
@@ -1267,7 +1268,7 @@ const Ra = /* @__PURE__ */ k("$ZodUnion", (e, t) => {
|
|
|
1267
1268
|
}
|
|
1268
1269
|
return h ? Promise.all(d).then((y) => Zi(y, n, e, u)) : Zi(d, n, e, u);
|
|
1269
1270
|
};
|
|
1270
|
-
}),
|
|
1271
|
+
}), Ma = /* @__PURE__ */ k("$ZodIntersection", (e, t) => {
|
|
1271
1272
|
Y.init(e, t), e._zod.parse = (i, r) => {
|
|
1272
1273
|
const n = i.value, u = t.left._zod.run({ value: n, issues: [] }, r), h = t.right._zod.run({ value: n, issues: [] }, r);
|
|
1273
1274
|
return u instanceof Promise || h instanceof Promise ? Promise.all([u, h]).then(([y, o]) => Ui(i, y, o)) : Ui(i, u, h);
|
|
@@ -1316,7 +1317,7 @@ function Ui(e, t, i) {
|
|
|
1316
1317
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
|
|
1317
1318
|
return e.value = r.data, e;
|
|
1318
1319
|
}
|
|
1319
|
-
const
|
|
1320
|
+
const Va = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
1320
1321
|
Y.init(e, t), e._zod.parse = (i, r) => {
|
|
1321
1322
|
const n = i.value;
|
|
1322
1323
|
if (!st(n))
|
|
@@ -1333,10 +1334,10 @@ const Ma = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1333
1334
|
for (const o of h)
|
|
1334
1335
|
if (typeof o == "string" || typeof o == "number" || typeof o == "symbol") {
|
|
1335
1336
|
d.add(typeof o == "number" ? o.toString() : o);
|
|
1336
|
-
const
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
})) : (
|
|
1337
|
+
const w = t.valueType._zod.run({ value: n[o], issues: [] }, r);
|
|
1338
|
+
w instanceof Promise ? u.push(w.then((S) => {
|
|
1339
|
+
S.issues.length && i.issues.push(...it(o, S.issues)), i.value[o] = S.value;
|
|
1340
|
+
})) : (w.issues.length && i.issues.push(...it(o, w.issues)), i.value[o] = w.value);
|
|
1340
1341
|
}
|
|
1341
1342
|
let y;
|
|
1342
1343
|
for (const o in n)
|
|
@@ -1359,7 +1360,7 @@ const Ma = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1359
1360
|
i.issues.push({
|
|
1360
1361
|
code: "invalid_key",
|
|
1361
1362
|
origin: "record",
|
|
1362
|
-
issues: y.issues.map((
|
|
1363
|
+
issues: y.issues.map((w) => qe(w, r, Ue())),
|
|
1363
1364
|
input: d,
|
|
1364
1365
|
path: [d],
|
|
1365
1366
|
inst: e
|
|
@@ -1367,17 +1368,17 @@ const Ma = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1367
1368
|
continue;
|
|
1368
1369
|
}
|
|
1369
1370
|
const o = t.valueType._zod.run({ value: n[d], issues: [] }, r);
|
|
1370
|
-
o instanceof Promise ? u.push(o.then((
|
|
1371
|
-
|
|
1371
|
+
o instanceof Promise ? u.push(o.then((w) => {
|
|
1372
|
+
w.issues.length && i.issues.push(...it(d, w.issues)), i.value[y.value] = w.value;
|
|
1372
1373
|
})) : (o.issues.length && i.issues.push(...it(d, o.issues)), i.value[y.value] = o.value);
|
|
1373
1374
|
}
|
|
1374
1375
|
}
|
|
1375
1376
|
return u.length ? Promise.all(u).then(() => i) : i;
|
|
1376
1377
|
};
|
|
1377
|
-
}),
|
|
1378
|
+
}), za = /* @__PURE__ */ k("$ZodEnum", (e, t) => {
|
|
1378
1379
|
Y.init(e, t);
|
|
1379
|
-
const i =
|
|
1380
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${i.filter((n) =>
|
|
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" ? nt(n) : n.toString()).join("|")})$`), e._zod.parse = (n, u) => {
|
|
1381
1382
|
const h = n.value;
|
|
1382
1383
|
return r.has(h) || n.issues.push({
|
|
1383
1384
|
code: "invalid_value",
|
|
@@ -1386,7 +1387,7 @@ const Ma = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1386
1387
|
inst: e
|
|
1387
1388
|
}), n;
|
|
1388
1389
|
};
|
|
1389
|
-
}),
|
|
1390
|
+
}), ja = /* @__PURE__ */ k("$ZodLiteral", (e, t) => {
|
|
1390
1391
|
if (Y.init(e, t), t.values.length === 0)
|
|
1391
1392
|
throw new Error("Cannot create literal schema with no valid values");
|
|
1392
1393
|
const i = new Set(t.values);
|
|
@@ -1399,7 +1400,7 @@ const Ma = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1399
1400
|
inst: e
|
|
1400
1401
|
}), r;
|
|
1401
1402
|
};
|
|
1402
|
-
}),
|
|
1403
|
+
}), Fa = /* @__PURE__ */ k("$ZodTransform", (e, t) => {
|
|
1403
1404
|
Y.init(e, t), e._zod.parse = (i, r) => {
|
|
1404
1405
|
if (r.direction === "backward")
|
|
1405
1406
|
throw new Tr(e.constructor.name);
|
|
@@ -1425,12 +1426,12 @@ const $a = /* @__PURE__ */ k("$ZodOptional", (e, t) => {
|
|
|
1425
1426
|
}
|
|
1426
1427
|
return i.value === void 0 ? i : t.innerType._zod.run(i, r);
|
|
1427
1428
|
};
|
|
1428
|
-
}),
|
|
1429
|
+
}), Ba = /* @__PURE__ */ k("$ZodNullable", (e, t) => {
|
|
1429
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", () => {
|
|
1430
1431
|
const i = t.innerType._zod.pattern;
|
|
1431
1432
|
return i ? new RegExp(`^(${gi(i.source)}|null)$`) : void 0;
|
|
1432
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);
|
|
1433
|
-
}),
|
|
1434
|
+
}), Za = /* @__PURE__ */ k("$ZodDefault", (e, t) => {
|
|
1434
1435
|
Y.init(e, t), e._zod.optin = "optional", U(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (i, r) => {
|
|
1435
1436
|
if (r.direction === "backward")
|
|
1436
1437
|
return t.innerType._zod.run(i, r);
|
|
@@ -1443,9 +1444,9 @@ const $a = /* @__PURE__ */ k("$ZodOptional", (e, t) => {
|
|
|
1443
1444
|
function Hi(e, t) {
|
|
1444
1445
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1445
1446
|
}
|
|
1446
|
-
const
|
|
1447
|
+
const Ua = /* @__PURE__ */ k("$ZodPrefault", (e, t) => {
|
|
1447
1448
|
Y.init(e, t), e._zod.optin = "optional", U(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (i, r) => (r.direction === "backward" || i.value === void 0 && (i.value = t.defaultValue), t.innerType._zod.run(i, r));
|
|
1448
|
-
}),
|
|
1449
|
+
}), qa = /* @__PURE__ */ k("$ZodNonOptional", (e, t) => {
|
|
1449
1450
|
Y.init(e, t), U(e._zod, "values", () => {
|
|
1450
1451
|
const i = t.innerType._zod.values;
|
|
1451
1452
|
return i ? new Set([...i].filter((r) => r !== void 0)) : void 0;
|
|
@@ -1462,7 +1463,7 @@ function Gi(e, t) {
|
|
|
1462
1463
|
inst: t
|
|
1463
1464
|
}), e;
|
|
1464
1465
|
}
|
|
1465
|
-
const
|
|
1466
|
+
const Ha = /* @__PURE__ */ k("$ZodCatch", (e, t) => {
|
|
1466
1467
|
Y.init(e, t), U(e._zod, "optin", () => t.innerType._zod.optin), U(e._zod, "optout", () => t.innerType._zod.optout), U(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (i, r) => {
|
|
1467
1468
|
if (r.direction === "backward")
|
|
1468
1469
|
return t.innerType._zod.run(i, r);
|
|
@@ -1481,7 +1482,7 @@ const qa = /* @__PURE__ */ k("$ZodCatch", (e, t) => {
|
|
|
1481
1482
|
input: i.value
|
|
1482
1483
|
}), i.issues = []), i);
|
|
1483
1484
|
};
|
|
1484
|
-
}),
|
|
1485
|
+
}), Ga = /* @__PURE__ */ k("$ZodPipe", (e, t) => {
|
|
1485
1486
|
Y.init(e, t), U(e._zod, "values", () => t.in._zod.values), U(e._zod, "optin", () => t.in._zod.optin), U(e._zod, "optout", () => t.out._zod.optout), U(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (i, r) => {
|
|
1486
1487
|
if (r.direction === "backward") {
|
|
1487
1488
|
const u = t.out._zod.run(i, r);
|
|
@@ -1494,7 +1495,7 @@ const qa = /* @__PURE__ */ k("$ZodCatch", (e, t) => {
|
|
|
1494
1495
|
function Nt(e, t, i) {
|
|
1495
1496
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, i);
|
|
1496
1497
|
}
|
|
1497
|
-
const
|
|
1498
|
+
const Wa = /* @__PURE__ */ k("$ZodReadonly", (e, t) => {
|
|
1498
1499
|
Y.init(e, t), U(e._zod, "propValues", () => t.innerType._zod.propValues), U(e._zod, "values", () => t.innerType._zod.values), U(e._zod, "optin", () => t.innerType?._zod?.optin), U(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (i, r) => {
|
|
1499
1500
|
if (r.direction === "backward")
|
|
1500
1501
|
return t.innerType._zod.run(i, r);
|
|
@@ -1505,7 +1506,7 @@ const Ga = /* @__PURE__ */ k("$ZodReadonly", (e, t) => {
|
|
|
1505
1506
|
function Wi(e) {
|
|
1506
1507
|
return e.value = Object.freeze(e.value), e;
|
|
1507
1508
|
}
|
|
1508
|
-
const
|
|
1509
|
+
const Ka = /* @__PURE__ */ k("$ZodCustom", (e, t) => {
|
|
1509
1510
|
me.init(e, t), Y.init(e, t), e._zod.parse = (i, r) => i, e._zod.check = (i) => {
|
|
1510
1511
|
const r = i.value, n = t.fn(r);
|
|
1511
1512
|
if (n instanceof Promise)
|
|
@@ -1529,7 +1530,7 @@ function Ki(e, t, i, r) {
|
|
|
1529
1530
|
}
|
|
1530
1531
|
}
|
|
1531
1532
|
var Xi;
|
|
1532
|
-
class
|
|
1533
|
+
class Xa {
|
|
1533
1534
|
constructor() {
|
|
1534
1535
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
1535
1536
|
}
|
|
@@ -1563,18 +1564,18 @@ class Ka {
|
|
|
1563
1564
|
return this._map.has(t);
|
|
1564
1565
|
}
|
|
1565
1566
|
}
|
|
1566
|
-
function
|
|
1567
|
-
return new
|
|
1567
|
+
function Ja() {
|
|
1568
|
+
return new Xa();
|
|
1568
1569
|
}
|
|
1569
|
-
(Xi = globalThis).__zod_globalRegistry ?? (Xi.__zod_globalRegistry =
|
|
1570
|
+
(Xi = globalThis).__zod_globalRegistry ?? (Xi.__zod_globalRegistry = Ja());
|
|
1570
1571
|
const Lt = globalThis.__zod_globalRegistry;
|
|
1571
|
-
function
|
|
1572
|
+
function Ya(e, t) {
|
|
1572
1573
|
return new e({
|
|
1573
1574
|
type: "string",
|
|
1574
1575
|
...R(t)
|
|
1575
1576
|
});
|
|
1576
1577
|
}
|
|
1577
|
-
function
|
|
1578
|
+
function Qa(e, t) {
|
|
1578
1579
|
return new e({
|
|
1579
1580
|
type: "string",
|
|
1580
1581
|
format: "email",
|
|
@@ -1592,7 +1593,7 @@ function Ji(e, t) {
|
|
|
1592
1593
|
...R(t)
|
|
1593
1594
|
});
|
|
1594
1595
|
}
|
|
1595
|
-
function
|
|
1596
|
+
function eo(e, t) {
|
|
1596
1597
|
return new e({
|
|
1597
1598
|
type: "string",
|
|
1598
1599
|
format: "uuid",
|
|
@@ -1601,7 +1602,7 @@ function Qa(e, t) {
|
|
|
1601
1602
|
...R(t)
|
|
1602
1603
|
});
|
|
1603
1604
|
}
|
|
1604
|
-
function
|
|
1605
|
+
function to(e, t) {
|
|
1605
1606
|
return new e({
|
|
1606
1607
|
type: "string",
|
|
1607
1608
|
format: "uuid",
|
|
@@ -1611,7 +1612,7 @@ function eo(e, t) {
|
|
|
1611
1612
|
...R(t)
|
|
1612
1613
|
});
|
|
1613
1614
|
}
|
|
1614
|
-
function
|
|
1615
|
+
function io(e, t) {
|
|
1615
1616
|
return new e({
|
|
1616
1617
|
type: "string",
|
|
1617
1618
|
format: "uuid",
|
|
@@ -1621,7 +1622,7 @@ function to(e, t) {
|
|
|
1621
1622
|
...R(t)
|
|
1622
1623
|
});
|
|
1623
1624
|
}
|
|
1624
|
-
function
|
|
1625
|
+
function ro(e, t) {
|
|
1625
1626
|
return new e({
|
|
1626
1627
|
type: "string",
|
|
1627
1628
|
format: "uuid",
|
|
@@ -1631,7 +1632,7 @@ function io(e, t) {
|
|
|
1631
1632
|
...R(t)
|
|
1632
1633
|
});
|
|
1633
1634
|
}
|
|
1634
|
-
function
|
|
1635
|
+
function so(e, t) {
|
|
1635
1636
|
return new e({
|
|
1636
1637
|
type: "string",
|
|
1637
1638
|
format: "url",
|
|
@@ -1640,7 +1641,7 @@ function ro(e, t) {
|
|
|
1640
1641
|
...R(t)
|
|
1641
1642
|
});
|
|
1642
1643
|
}
|
|
1643
|
-
function
|
|
1644
|
+
function no(e, t) {
|
|
1644
1645
|
return new e({
|
|
1645
1646
|
type: "string",
|
|
1646
1647
|
format: "emoji",
|
|
@@ -1649,7 +1650,7 @@ function so(e, t) {
|
|
|
1649
1650
|
...R(t)
|
|
1650
1651
|
});
|
|
1651
1652
|
}
|
|
1652
|
-
function
|
|
1653
|
+
function ao(e, t) {
|
|
1653
1654
|
return new e({
|
|
1654
1655
|
type: "string",
|
|
1655
1656
|
format: "nanoid",
|
|
@@ -1658,7 +1659,7 @@ function no(e, t) {
|
|
|
1658
1659
|
...R(t)
|
|
1659
1660
|
});
|
|
1660
1661
|
}
|
|
1661
|
-
function
|
|
1662
|
+
function oo(e, t) {
|
|
1662
1663
|
return new e({
|
|
1663
1664
|
type: "string",
|
|
1664
1665
|
format: "cuid",
|
|
@@ -1667,7 +1668,7 @@ function ao(e, t) {
|
|
|
1667
1668
|
...R(t)
|
|
1668
1669
|
});
|
|
1669
1670
|
}
|
|
1670
|
-
function
|
|
1671
|
+
function uo(e, t) {
|
|
1671
1672
|
return new e({
|
|
1672
1673
|
type: "string",
|
|
1673
1674
|
format: "cuid2",
|
|
@@ -1676,7 +1677,7 @@ function oo(e, t) {
|
|
|
1676
1677
|
...R(t)
|
|
1677
1678
|
});
|
|
1678
1679
|
}
|
|
1679
|
-
function
|
|
1680
|
+
function co(e, t) {
|
|
1680
1681
|
return new e({
|
|
1681
1682
|
type: "string",
|
|
1682
1683
|
format: "ulid",
|
|
@@ -1685,7 +1686,7 @@ function uo(e, t) {
|
|
|
1685
1686
|
...R(t)
|
|
1686
1687
|
});
|
|
1687
1688
|
}
|
|
1688
|
-
function
|
|
1689
|
+
function ho(e, t) {
|
|
1689
1690
|
return new e({
|
|
1690
1691
|
type: "string",
|
|
1691
1692
|
format: "xid",
|
|
@@ -1694,7 +1695,7 @@ function co(e, t) {
|
|
|
1694
1695
|
...R(t)
|
|
1695
1696
|
});
|
|
1696
1697
|
}
|
|
1697
|
-
function
|
|
1698
|
+
function lo(e, t) {
|
|
1698
1699
|
return new e({
|
|
1699
1700
|
type: "string",
|
|
1700
1701
|
format: "ksuid",
|
|
@@ -1703,7 +1704,7 @@ function ho(e, t) {
|
|
|
1703
1704
|
...R(t)
|
|
1704
1705
|
});
|
|
1705
1706
|
}
|
|
1706
|
-
function
|
|
1707
|
+
function po(e, t) {
|
|
1707
1708
|
return new e({
|
|
1708
1709
|
type: "string",
|
|
1709
1710
|
format: "ipv4",
|
|
@@ -1712,7 +1713,7 @@ function lo(e, t) {
|
|
|
1712
1713
|
...R(t)
|
|
1713
1714
|
});
|
|
1714
1715
|
}
|
|
1715
|
-
function
|
|
1716
|
+
function fo(e, t) {
|
|
1716
1717
|
return new e({
|
|
1717
1718
|
type: "string",
|
|
1718
1719
|
format: "ipv6",
|
|
@@ -1721,7 +1722,7 @@ function po(e, t) {
|
|
|
1721
1722
|
...R(t)
|
|
1722
1723
|
});
|
|
1723
1724
|
}
|
|
1724
|
-
function
|
|
1725
|
+
function mo(e, t) {
|
|
1725
1726
|
return new e({
|
|
1726
1727
|
type: "string",
|
|
1727
1728
|
format: "cidrv4",
|
|
@@ -1730,7 +1731,7 @@ function fo(e, t) {
|
|
|
1730
1731
|
...R(t)
|
|
1731
1732
|
});
|
|
1732
1733
|
}
|
|
1733
|
-
function
|
|
1734
|
+
function yo(e, t) {
|
|
1734
1735
|
return new e({
|
|
1735
1736
|
type: "string",
|
|
1736
1737
|
format: "cidrv6",
|
|
@@ -1739,7 +1740,7 @@ function mo(e, t) {
|
|
|
1739
1740
|
...R(t)
|
|
1740
1741
|
});
|
|
1741
1742
|
}
|
|
1742
|
-
function
|
|
1743
|
+
function vo(e, t) {
|
|
1743
1744
|
return new e({
|
|
1744
1745
|
type: "string",
|
|
1745
1746
|
format: "base64",
|
|
@@ -1748,7 +1749,7 @@ function yo(e, t) {
|
|
|
1748
1749
|
...R(t)
|
|
1749
1750
|
});
|
|
1750
1751
|
}
|
|
1751
|
-
function
|
|
1752
|
+
function xo(e, t) {
|
|
1752
1753
|
return new e({
|
|
1753
1754
|
type: "string",
|
|
1754
1755
|
format: "base64url",
|
|
@@ -1757,7 +1758,7 @@ function vo(e, t) {
|
|
|
1757
1758
|
...R(t)
|
|
1758
1759
|
});
|
|
1759
1760
|
}
|
|
1760
|
-
function
|
|
1761
|
+
function go(e, t) {
|
|
1761
1762
|
return new e({
|
|
1762
1763
|
type: "string",
|
|
1763
1764
|
format: "e164",
|
|
@@ -1766,7 +1767,7 @@ function xo(e, t) {
|
|
|
1766
1767
|
...R(t)
|
|
1767
1768
|
});
|
|
1768
1769
|
}
|
|
1769
|
-
function
|
|
1770
|
+
function bo(e, t) {
|
|
1770
1771
|
return new e({
|
|
1771
1772
|
type: "string",
|
|
1772
1773
|
format: "jwt",
|
|
@@ -1775,7 +1776,7 @@ function go(e, t) {
|
|
|
1775
1776
|
...R(t)
|
|
1776
1777
|
});
|
|
1777
1778
|
}
|
|
1778
|
-
function
|
|
1779
|
+
function _o(e, t) {
|
|
1779
1780
|
return new e({
|
|
1780
1781
|
type: "string",
|
|
1781
1782
|
format: "datetime",
|
|
@@ -1786,7 +1787,7 @@ function bo(e, t) {
|
|
|
1786
1787
|
...R(t)
|
|
1787
1788
|
});
|
|
1788
1789
|
}
|
|
1789
|
-
function
|
|
1790
|
+
function ko(e, t) {
|
|
1790
1791
|
return new e({
|
|
1791
1792
|
type: "string",
|
|
1792
1793
|
format: "date",
|
|
@@ -1794,7 +1795,7 @@ function _o(e, t) {
|
|
|
1794
1795
|
...R(t)
|
|
1795
1796
|
});
|
|
1796
1797
|
}
|
|
1797
|
-
function
|
|
1798
|
+
function wo(e, t) {
|
|
1798
1799
|
return new e({
|
|
1799
1800
|
type: "string",
|
|
1800
1801
|
format: "time",
|
|
@@ -1811,14 +1812,14 @@ function So(e, t) {
|
|
|
1811
1812
|
...R(t)
|
|
1812
1813
|
});
|
|
1813
1814
|
}
|
|
1814
|
-
function
|
|
1815
|
+
function To(e, t) {
|
|
1815
1816
|
return new e({
|
|
1816
1817
|
type: "number",
|
|
1817
1818
|
checks: [],
|
|
1818
1819
|
...R(t)
|
|
1819
1820
|
});
|
|
1820
1821
|
}
|
|
1821
|
-
function
|
|
1822
|
+
function Po(e, t) {
|
|
1822
1823
|
return new e({
|
|
1823
1824
|
type: "number",
|
|
1824
1825
|
check: "number_format",
|
|
@@ -1827,18 +1828,18 @@ function To(e, t) {
|
|
|
1827
1828
|
...R(t)
|
|
1828
1829
|
});
|
|
1829
1830
|
}
|
|
1830
|
-
function
|
|
1831
|
+
function Co(e, t) {
|
|
1831
1832
|
return new e({
|
|
1832
1833
|
type: "boolean",
|
|
1833
1834
|
...R(t)
|
|
1834
1835
|
});
|
|
1835
1836
|
}
|
|
1836
|
-
function
|
|
1837
|
+
function Ao(e) {
|
|
1837
1838
|
return new e({
|
|
1838
1839
|
type: "unknown"
|
|
1839
1840
|
});
|
|
1840
1841
|
}
|
|
1841
|
-
function
|
|
1842
|
+
function Eo(e, t) {
|
|
1842
1843
|
return new e({
|
|
1843
1844
|
type: "never",
|
|
1844
1845
|
...R(t)
|
|
@@ -1877,73 +1878,73 @@ function ri(e, t) {
|
|
|
1877
1878
|
});
|
|
1878
1879
|
}
|
|
1879
1880
|
function er(e, t) {
|
|
1880
|
-
return new
|
|
1881
|
+
return new Zn({
|
|
1881
1882
|
check: "multiple_of",
|
|
1882
1883
|
...R(t),
|
|
1883
1884
|
value: e
|
|
1884
1885
|
});
|
|
1885
1886
|
}
|
|
1886
1887
|
function Br(e, t) {
|
|
1887
|
-
return new
|
|
1888
|
+
return new qn({
|
|
1888
1889
|
check: "max_length",
|
|
1889
1890
|
...R(t),
|
|
1890
1891
|
maximum: e
|
|
1891
1892
|
});
|
|
1892
1893
|
}
|
|
1893
1894
|
function Vt(e, t) {
|
|
1894
|
-
return new
|
|
1895
|
+
return new Hn({
|
|
1895
1896
|
check: "min_length",
|
|
1896
1897
|
...R(t),
|
|
1897
1898
|
minimum: e
|
|
1898
1899
|
});
|
|
1899
1900
|
}
|
|
1900
1901
|
function Zr(e, t) {
|
|
1901
|
-
return new
|
|
1902
|
+
return new Gn({
|
|
1902
1903
|
check: "length_equals",
|
|
1903
1904
|
...R(t),
|
|
1904
1905
|
length: e
|
|
1905
1906
|
});
|
|
1906
1907
|
}
|
|
1907
|
-
function
|
|
1908
|
-
return new
|
|
1908
|
+
function Io(e, t) {
|
|
1909
|
+
return new Wn({
|
|
1909
1910
|
check: "string_format",
|
|
1910
1911
|
format: "regex",
|
|
1911
1912
|
...R(t),
|
|
1912
1913
|
pattern: e
|
|
1913
1914
|
});
|
|
1914
1915
|
}
|
|
1915
|
-
function
|
|
1916
|
-
return new
|
|
1916
|
+
function No(e) {
|
|
1917
|
+
return new Kn({
|
|
1917
1918
|
check: "string_format",
|
|
1918
1919
|
format: "lowercase",
|
|
1919
1920
|
...R(e)
|
|
1920
1921
|
});
|
|
1921
1922
|
}
|
|
1922
|
-
function
|
|
1923
|
-
return new
|
|
1923
|
+
function Lo(e) {
|
|
1924
|
+
return new Xn({
|
|
1924
1925
|
check: "string_format",
|
|
1925
1926
|
format: "uppercase",
|
|
1926
1927
|
...R(e)
|
|
1927
1928
|
});
|
|
1928
1929
|
}
|
|
1929
|
-
function
|
|
1930
|
-
return new
|
|
1930
|
+
function Oo(e, t) {
|
|
1931
|
+
return new Jn({
|
|
1931
1932
|
check: "string_format",
|
|
1932
1933
|
format: "includes",
|
|
1933
1934
|
...R(t),
|
|
1934
1935
|
includes: e
|
|
1935
1936
|
});
|
|
1936
1937
|
}
|
|
1937
|
-
function
|
|
1938
|
-
return new
|
|
1938
|
+
function Ro(e, t) {
|
|
1939
|
+
return new Yn({
|
|
1939
1940
|
check: "string_format",
|
|
1940
1941
|
format: "starts_with",
|
|
1941
1942
|
...R(t),
|
|
1942
1943
|
prefix: e
|
|
1943
1944
|
});
|
|
1944
1945
|
}
|
|
1945
|
-
function
|
|
1946
|
-
return new
|
|
1946
|
+
function Do(e, t) {
|
|
1947
|
+
return new Qn({
|
|
1947
1948
|
check: "string_format",
|
|
1948
1949
|
format: "ends_with",
|
|
1949
1950
|
...R(t),
|
|
@@ -1951,25 +1952,25 @@ function Ro(e, t) {
|
|
|
1951
1952
|
});
|
|
1952
1953
|
}
|
|
1953
1954
|
function ct(e) {
|
|
1954
|
-
return new
|
|
1955
|
+
return new ea({
|
|
1955
1956
|
check: "overwrite",
|
|
1956
1957
|
tx: e
|
|
1957
1958
|
});
|
|
1958
1959
|
}
|
|
1959
|
-
function
|
|
1960
|
+
function Mo(e) {
|
|
1960
1961
|
return ct((t) => t.normalize(e));
|
|
1961
1962
|
}
|
|
1962
|
-
function
|
|
1963
|
+
function Vo() {
|
|
1963
1964
|
return ct((e) => e.trim());
|
|
1964
1965
|
}
|
|
1965
|
-
function
|
|
1966
|
+
function zo() {
|
|
1966
1967
|
return ct((e) => e.toLowerCase());
|
|
1967
1968
|
}
|
|
1968
|
-
function
|
|
1969
|
+
function jo() {
|
|
1969
1970
|
return ct((e) => e.toUpperCase());
|
|
1970
1971
|
}
|
|
1971
|
-
function
|
|
1972
|
-
return ct((e) =>
|
|
1972
|
+
function Fo() {
|
|
1973
|
+
return ct((e) => Hs(e));
|
|
1973
1974
|
}
|
|
1974
1975
|
function $o(e, t, i) {
|
|
1975
1976
|
return new e({
|
|
@@ -1981,7 +1982,7 @@ function $o(e, t, i) {
|
|
|
1981
1982
|
...R(i)
|
|
1982
1983
|
});
|
|
1983
1984
|
}
|
|
1984
|
-
function
|
|
1985
|
+
function Bo(e, t, i) {
|
|
1985
1986
|
return new e({
|
|
1986
1987
|
type: "custom",
|
|
1987
1988
|
check: "custom",
|
|
@@ -1989,8 +1990,8 @@ function Fo(e, t, i) {
|
|
|
1989
1990
|
...R(i)
|
|
1990
1991
|
});
|
|
1991
1992
|
}
|
|
1992
|
-
function
|
|
1993
|
-
const t =
|
|
1993
|
+
function Zo(e) {
|
|
1994
|
+
const t = Uo((i) => (i.addIssue = (r) => {
|
|
1994
1995
|
if (typeof r == "string")
|
|
1995
1996
|
i.issues.push(bt(r, i.value, t._zod.def));
|
|
1996
1997
|
else {
|
|
@@ -2000,45 +2001,45 @@ function Bo(e) {
|
|
|
2000
2001
|
}, e(i.value, i)));
|
|
2001
2002
|
return t;
|
|
2002
2003
|
}
|
|
2003
|
-
function
|
|
2004
|
+
function Uo(e, t) {
|
|
2004
2005
|
const i = new me({
|
|
2005
2006
|
check: "custom",
|
|
2006
2007
|
...R(t)
|
|
2007
2008
|
});
|
|
2008
2009
|
return i._zod.check = e, i;
|
|
2009
2010
|
}
|
|
2010
|
-
const
|
|
2011
|
-
fa.init(e, t), Q.init(e, t);
|
|
2012
|
-
});
|
|
2013
|
-
function qo(e) {
|
|
2014
|
-
return bo(Uo, e);
|
|
2015
|
-
}
|
|
2016
|
-
const Ho = /* @__PURE__ */ k("ZodISODate", (e, t) => {
|
|
2011
|
+
const qo = /* @__PURE__ */ k("ZodISODateTime", (e, t) => {
|
|
2017
2012
|
da.init(e, t), Q.init(e, t);
|
|
2018
2013
|
});
|
|
2019
|
-
function
|
|
2020
|
-
return _o(
|
|
2014
|
+
function Ho(e) {
|
|
2015
|
+
return _o(qo, e);
|
|
2021
2016
|
}
|
|
2022
|
-
const
|
|
2017
|
+
const Go = /* @__PURE__ */ k("ZodISODate", (e, t) => {
|
|
2023
2018
|
ma.init(e, t), Q.init(e, t);
|
|
2024
2019
|
});
|
|
2025
|
-
function
|
|
2026
|
-
return ko(
|
|
2020
|
+
function Wo(e) {
|
|
2021
|
+
return ko(Go, e);
|
|
2027
2022
|
}
|
|
2028
|
-
const
|
|
2023
|
+
const Ko = /* @__PURE__ */ k("ZodISOTime", (e, t) => {
|
|
2029
2024
|
ya.init(e, t), Q.init(e, t);
|
|
2030
2025
|
});
|
|
2031
|
-
function
|
|
2032
|
-
return
|
|
2026
|
+
function Xo(e) {
|
|
2027
|
+
return wo(Ko, e);
|
|
2028
|
+
}
|
|
2029
|
+
const Jo = /* @__PURE__ */ k("ZodISODuration", (e, t) => {
|
|
2030
|
+
va.init(e, t), Q.init(e, t);
|
|
2031
|
+
});
|
|
2032
|
+
function Yo(e) {
|
|
2033
|
+
return So(Jo, e);
|
|
2033
2034
|
}
|
|
2034
|
-
const
|
|
2035
|
+
const Qo = (e, t) => {
|
|
2035
2036
|
Ir.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2036
2037
|
format: {
|
|
2037
|
-
value: (i) =>
|
|
2038
|
+
value: (i) => an(e, i)
|
|
2038
2039
|
// enumerable: false,
|
|
2039
2040
|
},
|
|
2040
2041
|
flatten: {
|
|
2041
|
-
value: (i) =>
|
|
2042
|
+
value: (i) => nn(e, i)
|
|
2042
2043
|
// enumerable: false,
|
|
2043
2044
|
},
|
|
2044
2045
|
addIssue: {
|
|
@@ -2060,14 +2061,14 @@ const Yo = (e, t) => {
|
|
|
2060
2061
|
// enumerable: false,
|
|
2061
2062
|
}
|
|
2062
2063
|
});
|
|
2063
|
-
},
|
|
2064
|
+
}, Pe = k("ZodError", Qo, {
|
|
2064
2065
|
Parent: Error
|
|
2065
|
-
}),
|
|
2066
|
+
}), eu = /* @__PURE__ */ _i(Pe), tu = /* @__PURE__ */ ki(Pe), iu = /* @__PURE__ */ Ut(Pe), ru = /* @__PURE__ */ qt(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(Je(t, {
|
|
2066
2067
|
checks: [
|
|
2067
2068
|
...t.checks ?? [],
|
|
2068
2069
|
...i.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
2069
2070
|
]
|
|
2070
|
-
})), e.clone = (i, r) => Ge(e, i, r), e.brand = () => e, e.register = ((i, r) => (i.add(e, r), e)), e.parse = (i, r) =>
|
|
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(ct(i)), e.optional = () => sr(e), e.nullable = () => nr(e), e.nullish = () => sr(nr(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) => ar(e, Uu(i)), e.default = (i) => Gu(e, i), e.prefault = (i) => Ku(e, i), e.catch = (i) => Yu(e, i), e.pipe = (i) => ar(e, i), e.readonly = () => tc(e), e.describe = (i) => {
|
|
2071
2072
|
const r = e.clone();
|
|
2072
2073
|
return Lt.add(r, { description: i }), r;
|
|
2073
2074
|
}, Object.defineProperty(e, "description", {
|
|
@@ -2081,95 +2082,95 @@ const Yo = (e, t) => {
|
|
|
2081
2082
|
const r = e.clone();
|
|
2082
2083
|
return Lt.add(r, i[0]), r;
|
|
2083
2084
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Ur = /* @__PURE__ */ k("_ZodString", (e, t) => {
|
|
2084
|
-
|
|
2085
|
+
wi.init(e, t), ee.init(e, t);
|
|
2085
2086
|
const i = e._zod.bag;
|
|
2086
|
-
e.format = i.format ?? null, e.minLength = i.minimum ?? null, e.maxLength = i.maximum ?? null, e.regex = (...r) => e.check(
|
|
2087
|
-
}),
|
|
2088
|
-
|
|
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(Vt(...r)), e.max = (...r) => e.check(Br(...r)), e.length = (...r) => e.check(Zr(...r)), e.nonempty = (...r) => e.check(Vt(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
|
+
}), pu = /* @__PURE__ */ k("ZodString", (e, t) => {
|
|
2089
|
+
wi.init(e, t), Ur.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(Ji(tr, 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(Ji(tr, 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));
|
|
2089
2090
|
});
|
|
2090
2091
|
function O(e) {
|
|
2091
|
-
return
|
|
2092
|
+
return Ya(pu, e);
|
|
2092
2093
|
}
|
|
2093
2094
|
const Q = /* @__PURE__ */ k("ZodStringFormat", (e, t) => {
|
|
2094
2095
|
W.init(e, t), Ur.init(e, t);
|
|
2095
|
-
}),
|
|
2096
|
-
|
|
2096
|
+
}), fu = /* @__PURE__ */ k("ZodEmail", (e, t) => {
|
|
2097
|
+
na.init(e, t), Q.init(e, t);
|
|
2097
2098
|
}), tr = /* @__PURE__ */ k("ZodGUID", (e, t) => {
|
|
2098
|
-
ia.init(e, t), Q.init(e, t);
|
|
2099
|
-
}), Ot = /* @__PURE__ */ k("ZodUUID", (e, t) => {
|
|
2100
2099
|
ra.init(e, t), Q.init(e, t);
|
|
2101
|
-
}),
|
|
2102
|
-
|
|
2103
|
-
}), du = /* @__PURE__ */ k("
|
|
2100
|
+
}), Ot = /* @__PURE__ */ k("ZodUUID", (e, t) => {
|
|
2101
|
+
sa.init(e, t), Q.init(e, t);
|
|
2102
|
+
}), du = /* @__PURE__ */ k("ZodURL", (e, t) => {
|
|
2104
2103
|
aa.init(e, t), Q.init(e, t);
|
|
2105
|
-
}), mu = /* @__PURE__ */ k("
|
|
2104
|
+
}), mu = /* @__PURE__ */ k("ZodEmoji", (e, t) => {
|
|
2106
2105
|
oa.init(e, t), Q.init(e, t);
|
|
2107
|
-
}), yu = /* @__PURE__ */ k("
|
|
2106
|
+
}), yu = /* @__PURE__ */ k("ZodNanoID", (e, t) => {
|
|
2108
2107
|
ua.init(e, t), Q.init(e, t);
|
|
2109
|
-
}), vu = /* @__PURE__ */ k("
|
|
2108
|
+
}), vu = /* @__PURE__ */ k("ZodCUID", (e, t) => {
|
|
2110
2109
|
ca.init(e, t), Q.init(e, t);
|
|
2111
|
-
}), xu = /* @__PURE__ */ k("
|
|
2110
|
+
}), xu = /* @__PURE__ */ k("ZodCUID2", (e, t) => {
|
|
2112
2111
|
ha.init(e, t), Q.init(e, t);
|
|
2113
|
-
}), gu = /* @__PURE__ */ k("
|
|
2112
|
+
}), gu = /* @__PURE__ */ k("ZodULID", (e, t) => {
|
|
2114
2113
|
la.init(e, t), Q.init(e, t);
|
|
2115
|
-
}), bu = /* @__PURE__ */ k("
|
|
2114
|
+
}), bu = /* @__PURE__ */ k("ZodXID", (e, t) => {
|
|
2116
2115
|
pa.init(e, t), Q.init(e, t);
|
|
2117
|
-
}), _u = /* @__PURE__ */ k("
|
|
2118
|
-
|
|
2119
|
-
}), ku = /* @__PURE__ */ k("
|
|
2116
|
+
}), _u = /* @__PURE__ */ k("ZodKSUID", (e, t) => {
|
|
2117
|
+
fa.init(e, t), Q.init(e, t);
|
|
2118
|
+
}), ku = /* @__PURE__ */ k("ZodIPv4", (e, t) => {
|
|
2120
2119
|
xa.init(e, t), Q.init(e, t);
|
|
2121
|
-
}),
|
|
2120
|
+
}), wu = /* @__PURE__ */ k("ZodIPv6", (e, t) => {
|
|
2122
2121
|
ga.init(e, t), Q.init(e, t);
|
|
2123
|
-
}),
|
|
2122
|
+
}), Su = /* @__PURE__ */ k("ZodCIDRv4", (e, t) => {
|
|
2124
2123
|
ba.init(e, t), Q.init(e, t);
|
|
2125
|
-
}), Tu = /* @__PURE__ */ k("
|
|
2124
|
+
}), Tu = /* @__PURE__ */ k("ZodCIDRv6", (e, t) => {
|
|
2126
2125
|
_a.init(e, t), Q.init(e, t);
|
|
2127
|
-
}), Pu = /* @__PURE__ */ k("
|
|
2126
|
+
}), Pu = /* @__PURE__ */ k("ZodBase64", (e, t) => {
|
|
2127
|
+
ka.init(e, t), Q.init(e, t);
|
|
2128
|
+
}), Cu = /* @__PURE__ */ k("ZodBase64URL", (e, t) => {
|
|
2128
2129
|
Sa.init(e, t), Q.init(e, t);
|
|
2129
|
-
}),
|
|
2130
|
-
|
|
2131
|
-
}),
|
|
2132
|
-
|
|
2130
|
+
}), Au = /* @__PURE__ */ k("ZodE164", (e, t) => {
|
|
2131
|
+
Ta.init(e, t), Q.init(e, t);
|
|
2132
|
+
}), Eu = /* @__PURE__ */ k("ZodJWT", (e, t) => {
|
|
2133
|
+
Ca.init(e, t), Q.init(e, t);
|
|
2133
2134
|
}), qr = /* @__PURE__ */ k("ZodNumber", (e, t) => {
|
|
2134
2135
|
jr.init(e, t), ee.init(e, t), e.gt = (r, n) => e.check(Qi(r, n)), e.gte = (r, n) => e.check(ri(r, n)), e.min = (r, n) => e.check(ri(r, n)), e.lt = (r, n) => e.check(Yi(r, n)), e.lte = (r, n) => e.check(ii(r, n)), e.max = (r, n) => e.check(ii(r, n)), e.int = (r) => e.check(ir(r)), e.safe = (r) => e.check(ir(r)), e.positive = (r) => e.check(Qi(0, r)), e.nonnegative = (r) => e.check(ri(0, r)), e.negative = (r) => e.check(Yi(0, r)), e.nonpositive = (r) => e.check(ii(0, r)), e.multipleOf = (r, n) => e.check(er(r, n)), e.step = (r, n) => e.check(er(r, n)), e.finite = () => e;
|
|
2135
2136
|
const i = e._zod.bag;
|
|
2136
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;
|
|
2137
2138
|
});
|
|
2138
2139
|
function De(e) {
|
|
2139
|
-
return
|
|
2140
|
+
return To(qr, e);
|
|
2140
2141
|
}
|
|
2141
|
-
const
|
|
2142
|
-
|
|
2142
|
+
const Iu = /* @__PURE__ */ k("ZodNumberFormat", (e, t) => {
|
|
2143
|
+
Aa.init(e, t), qr.init(e, t);
|
|
2143
2144
|
});
|
|
2144
2145
|
function ir(e) {
|
|
2145
|
-
return To(Eu, e);
|
|
2146
|
-
}
|
|
2147
|
-
const Iu = /* @__PURE__ */ k("ZodBoolean", (e, t) => {
|
|
2148
|
-
Aa.init(e, t), ee.init(e, t);
|
|
2149
|
-
});
|
|
2150
|
-
function Nu(e) {
|
|
2151
2146
|
return Po(Iu, e);
|
|
2152
2147
|
}
|
|
2153
|
-
const
|
|
2148
|
+
const Nu = /* @__PURE__ */ k("ZodBoolean", (e, t) => {
|
|
2154
2149
|
Ea.init(e, t), ee.init(e, t);
|
|
2155
2150
|
});
|
|
2156
|
-
function
|
|
2157
|
-
return Co(
|
|
2151
|
+
function Lu(e) {
|
|
2152
|
+
return Co(Nu, e);
|
|
2158
2153
|
}
|
|
2159
|
-
const Ou = /* @__PURE__ */ k("
|
|
2154
|
+
const Ou = /* @__PURE__ */ k("ZodUnknown", (e, t) => {
|
|
2160
2155
|
Ia.init(e, t), ee.init(e, t);
|
|
2161
2156
|
});
|
|
2162
|
-
function
|
|
2163
|
-
return Ao(Ou
|
|
2157
|
+
function rr() {
|
|
2158
|
+
return Ao(Ou);
|
|
2164
2159
|
}
|
|
2165
|
-
const
|
|
2166
|
-
Na.init(e, t), ee.init(e, t)
|
|
2160
|
+
const Ru = /* @__PURE__ */ k("ZodNever", (e, t) => {
|
|
2161
|
+
Na.init(e, t), ee.init(e, t);
|
|
2162
|
+
});
|
|
2163
|
+
function Du(e) {
|
|
2164
|
+
return Eo(Ru, e);
|
|
2165
|
+
}
|
|
2166
|
+
const Mu = /* @__PURE__ */ k("ZodArray", (e, t) => {
|
|
2167
|
+
La.init(e, t), ee.init(e, t), e.element = t.element, e.min = (i, r) => e.check(Vt(i, r)), e.nonempty = (i) => e.check(Vt(1, i)), e.max = (i, r) => e.check(Br(i, r)), e.length = (i, r) => e.check(Zr(i, r)), e.unwrap = () => e.element;
|
|
2167
2168
|
});
|
|
2168
2169
|
function He(e, t) {
|
|
2169
|
-
return $o(
|
|
2170
|
+
return $o(Mu, e, t);
|
|
2170
2171
|
}
|
|
2171
|
-
const
|
|
2172
|
-
|
|
2172
|
+
const Vu = /* @__PURE__ */ k("ZodObject", (e, t) => {
|
|
2173
|
+
Ra.init(e, t), ee.init(e, t), U(e, "shape", () => t.shape), e.keyof = () => Gt(Object.keys(e._zod.def.shape)), e.catchall = (i) => e.clone({ ...e._zod.def, catchall: i }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: rr() }), e.loose = () => e.clone({ ...e._zod.def, catchall: rr() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Du() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (i) => Qs(e, i), e.safeExtend = (i) => en(e, i), e.merge = (i) => tn(e, i), e.pick = (i) => Js(e, i), e.omit = (i) => Ys(e, i), e.partial = (...i) => rn(Hr, e, i[0]), e.required = (...i) => sn(Gr, e, i[0]);
|
|
2173
2174
|
});
|
|
2174
2175
|
function Ne(e, t) {
|
|
2175
2176
|
const i = {
|
|
@@ -2177,32 +2178,32 @@ function Ne(e, t) {
|
|
|
2177
2178
|
shape: e ?? {},
|
|
2178
2179
|
...R(t)
|
|
2179
2180
|
};
|
|
2180
|
-
return new
|
|
2181
|
+
return new Vu(i);
|
|
2181
2182
|
}
|
|
2182
|
-
const
|
|
2183
|
-
|
|
2183
|
+
const zu = /* @__PURE__ */ k("ZodUnion", (e, t) => {
|
|
2184
|
+
Da.init(e, t), ee.init(e, t), e.options = t.options;
|
|
2184
2185
|
});
|
|
2185
2186
|
function ae(e, t) {
|
|
2186
|
-
return new
|
|
2187
|
+
return new zu({
|
|
2187
2188
|
type: "union",
|
|
2188
2189
|
options: e,
|
|
2189
2190
|
...R(t)
|
|
2190
2191
|
});
|
|
2191
2192
|
}
|
|
2192
|
-
const
|
|
2193
|
-
|
|
2193
|
+
const ju = /* @__PURE__ */ k("ZodIntersection", (e, t) => {
|
|
2194
|
+
Ma.init(e, t), ee.init(e, t);
|
|
2194
2195
|
});
|
|
2195
|
-
function
|
|
2196
|
-
return new
|
|
2196
|
+
function Fu(e, t) {
|
|
2197
|
+
return new ju({
|
|
2197
2198
|
type: "intersection",
|
|
2198
2199
|
left: e,
|
|
2199
2200
|
right: t
|
|
2200
2201
|
});
|
|
2201
2202
|
}
|
|
2202
2203
|
const $u = /* @__PURE__ */ k("ZodRecord", (e, t) => {
|
|
2203
|
-
|
|
2204
|
+
Va.init(e, t), ee.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
2204
2205
|
});
|
|
2205
|
-
function
|
|
2206
|
+
function be(e, t, i) {
|
|
2206
2207
|
return new $u({
|
|
2207
2208
|
type: "record",
|
|
2208
2209
|
keyType: e,
|
|
@@ -2211,7 +2212,7 @@ function ge(e, t, i) {
|
|
|
2211
2212
|
});
|
|
2212
2213
|
}
|
|
2213
2214
|
const li = /* @__PURE__ */ k("ZodEnum", (e, t) => {
|
|
2214
|
-
|
|
2215
|
+
za.init(e, t), ee.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
2215
2216
|
const i = new Set(Object.keys(t.entries));
|
|
2216
2217
|
e.extract = (r, n) => {
|
|
2217
2218
|
const u = {};
|
|
@@ -2249,8 +2250,8 @@ function Gt(e, t) {
|
|
|
2249
2250
|
...R(t)
|
|
2250
2251
|
});
|
|
2251
2252
|
}
|
|
2252
|
-
const
|
|
2253
|
-
|
|
2253
|
+
const Bu = /* @__PURE__ */ k("ZodLiteral", (e, t) => {
|
|
2254
|
+
ja.init(e, t), ee.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
2254
2255
|
get() {
|
|
2255
2256
|
if (t.values.length > 1)
|
|
2256
2257
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -2259,14 +2260,14 @@ const Fu = /* @__PURE__ */ k("ZodLiteral", (e, t) => {
|
|
|
2259
2260
|
});
|
|
2260
2261
|
});
|
|
2261
2262
|
function b(e, t) {
|
|
2262
|
-
return new
|
|
2263
|
+
return new Bu({
|
|
2263
2264
|
type: "literal",
|
|
2264
2265
|
values: Array.isArray(e) ? e : [e],
|
|
2265
2266
|
...R(t)
|
|
2266
2267
|
});
|
|
2267
2268
|
}
|
|
2268
|
-
const
|
|
2269
|
-
|
|
2269
|
+
const Zu = /* @__PURE__ */ k("ZodTransform", (e, t) => {
|
|
2270
|
+
Fa.init(e, t), ee.init(e, t), e._zod.parse = (i, r) => {
|
|
2270
2271
|
if (r.direction === "backward")
|
|
2271
2272
|
throw new Tr(e.constructor.name);
|
|
2272
2273
|
i.addIssue = (u) => {
|
|
@@ -2281,8 +2282,8 @@ const Bu = /* @__PURE__ */ k("ZodTransform", (e, t) => {
|
|
|
2281
2282
|
return n instanceof Promise ? n.then((u) => (i.value = u, i)) : (i.value = n, i);
|
|
2282
2283
|
};
|
|
2283
2284
|
});
|
|
2284
|
-
function
|
|
2285
|
-
return new
|
|
2285
|
+
function Uu(e) {
|
|
2286
|
+
return new Zu({
|
|
2286
2287
|
type: "transform",
|
|
2287
2288
|
transform: e
|
|
2288
2289
|
});
|
|
@@ -2296,20 +2297,20 @@ function sr(e) {
|
|
|
2296
2297
|
innerType: e
|
|
2297
2298
|
});
|
|
2298
2299
|
}
|
|
2299
|
-
const
|
|
2300
|
-
|
|
2300
|
+
const qu = /* @__PURE__ */ k("ZodNullable", (e, t) => {
|
|
2301
|
+
Ba.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2301
2302
|
});
|
|
2302
2303
|
function nr(e) {
|
|
2303
|
-
return new
|
|
2304
|
+
return new qu({
|
|
2304
2305
|
type: "nullable",
|
|
2305
2306
|
innerType: e
|
|
2306
2307
|
});
|
|
2307
2308
|
}
|
|
2308
|
-
const
|
|
2309
|
-
|
|
2309
|
+
const Hu = /* @__PURE__ */ k("ZodDefault", (e, t) => {
|
|
2310
|
+
Za.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
2310
2311
|
});
|
|
2311
|
-
function
|
|
2312
|
-
return new
|
|
2312
|
+
function Gu(e, t) {
|
|
2313
|
+
return new Hu({
|
|
2313
2314
|
type: "default",
|
|
2314
2315
|
innerType: e,
|
|
2315
2316
|
get defaultValue() {
|
|
@@ -2317,11 +2318,11 @@ function Hu(e, t) {
|
|
|
2317
2318
|
}
|
|
2318
2319
|
});
|
|
2319
2320
|
}
|
|
2320
|
-
const
|
|
2321
|
-
|
|
2321
|
+
const Wu = /* @__PURE__ */ k("ZodPrefault", (e, t) => {
|
|
2322
|
+
Ua.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2322
2323
|
});
|
|
2323
|
-
function
|
|
2324
|
-
return new
|
|
2324
|
+
function Ku(e, t) {
|
|
2325
|
+
return new Wu({
|
|
2325
2326
|
type: "prefault",
|
|
2326
2327
|
innerType: e,
|
|
2327
2328
|
get defaultValue() {
|
|
@@ -2330,55 +2331,55 @@ function Wu(e, t) {
|
|
|
2330
2331
|
});
|
|
2331
2332
|
}
|
|
2332
2333
|
const Gr = /* @__PURE__ */ k("ZodNonOptional", (e, t) => {
|
|
2333
|
-
|
|
2334
|
+
qa.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2334
2335
|
});
|
|
2335
|
-
function
|
|
2336
|
+
function Xu(e, t) {
|
|
2336
2337
|
return new Gr({
|
|
2337
2338
|
type: "nonoptional",
|
|
2338
2339
|
innerType: e,
|
|
2339
2340
|
...R(t)
|
|
2340
2341
|
});
|
|
2341
2342
|
}
|
|
2342
|
-
const
|
|
2343
|
-
|
|
2343
|
+
const Ju = /* @__PURE__ */ k("ZodCatch", (e, t) => {
|
|
2344
|
+
Ha.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
2344
2345
|
});
|
|
2345
|
-
function
|
|
2346
|
-
return new
|
|
2346
|
+
function Yu(e, t) {
|
|
2347
|
+
return new Ju({
|
|
2347
2348
|
type: "catch",
|
|
2348
2349
|
innerType: e,
|
|
2349
2350
|
catchValue: typeof t == "function" ? t : () => t
|
|
2350
2351
|
});
|
|
2351
2352
|
}
|
|
2352
|
-
const
|
|
2353
|
-
|
|
2353
|
+
const Qu = /* @__PURE__ */ k("ZodPipe", (e, t) => {
|
|
2354
|
+
Ga.init(e, t), ee.init(e, t), e.in = t.in, e.out = t.out;
|
|
2354
2355
|
});
|
|
2355
2356
|
function ar(e, t) {
|
|
2356
|
-
return new
|
|
2357
|
+
return new Qu({
|
|
2357
2358
|
type: "pipe",
|
|
2358
2359
|
in: e,
|
|
2359
2360
|
out: t
|
|
2360
2361
|
// ...util.normalizeParams(params),
|
|
2361
2362
|
});
|
|
2362
2363
|
}
|
|
2363
|
-
const
|
|
2364
|
-
|
|
2364
|
+
const ec = /* @__PURE__ */ k("ZodReadonly", (e, t) => {
|
|
2365
|
+
Wa.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2365
2366
|
});
|
|
2366
|
-
function
|
|
2367
|
-
return new
|
|
2367
|
+
function tc(e) {
|
|
2368
|
+
return new ec({
|
|
2368
2369
|
type: "readonly",
|
|
2369
2370
|
innerType: e
|
|
2370
2371
|
});
|
|
2371
2372
|
}
|
|
2372
|
-
const
|
|
2373
|
-
|
|
2373
|
+
const ic = /* @__PURE__ */ k("ZodCustom", (e, t) => {
|
|
2374
|
+
Ka.init(e, t), ee.init(e, t);
|
|
2374
2375
|
});
|
|
2375
|
-
function
|
|
2376
|
-
return
|
|
2376
|
+
function rc(e, t = {}) {
|
|
2377
|
+
return Bo(ic, e, t);
|
|
2377
2378
|
}
|
|
2378
|
-
function
|
|
2379
|
-
return
|
|
2379
|
+
function sc(e) {
|
|
2380
|
+
return Zo(e);
|
|
2380
2381
|
}
|
|
2381
|
-
const
|
|
2382
|
+
const nc = ["amber", "green", "red", "other"], ac = Gt(nc), oc = ["alpha", "beta", "generalAvailability", "notApplicable", "preAlpha", "proposed", "releaseCandidate", "unavailable", "underReview"], uc = Gt(oc), cc = [
|
|
2382
2383
|
"app",
|
|
2383
2384
|
"connector",
|
|
2384
2385
|
"connectorConnection",
|
|
@@ -2402,33 +2403,33 @@ const sc = ["amber", "green", "red", "other"], nc = Gt(sc), ac = ["alpha", "beta
|
|
|
2402
2403
|
"presenter",
|
|
2403
2404
|
"presenterPresentation",
|
|
2404
2405
|
"tool"
|
|
2405
|
-
],
|
|
2406
|
+
], hc = Gt(cc), lc = ae([b("en-au"), b("en-gb"), b("en-us"), b("es-es")]), pc = be(lc, O()), fc = Ne({
|
|
2406
2407
|
id: O(),
|
|
2407
|
-
color:
|
|
2408
|
+
color: ac,
|
|
2408
2409
|
label: O()
|
|
2409
|
-
}),
|
|
2410
|
+
}), dc = Ne({
|
|
2410
2411
|
id: O(),
|
|
2411
|
-
label:
|
|
2412
|
-
description:
|
|
2412
|
+
label: be(O(), O()),
|
|
2413
|
+
description: be(O(), O()),
|
|
2413
2414
|
firstCreatedAt: De().optional(),
|
|
2414
2415
|
icon: O().optional(),
|
|
2415
2416
|
iconDark: O().optional(),
|
|
2416
2417
|
lastUpdatedAt: De().optional(),
|
|
2417
|
-
status:
|
|
2418
|
-
statusId:
|
|
2419
|
-
typeId:
|
|
2420
|
-
}),
|
|
2418
|
+
status: fc.nullable().optional(),
|
|
2419
|
+
statusId: uc,
|
|
2420
|
+
typeId: hc
|
|
2421
|
+
}), mc = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), yc = Ne({
|
|
2421
2422
|
id: O(),
|
|
2422
2423
|
label: O()
|
|
2423
|
-
}),
|
|
2424
|
+
}), vc = Ne({
|
|
2424
2425
|
activeConnectionCount: De().optional(),
|
|
2425
|
-
canDescribe:
|
|
2426
|
+
canDescribe: Lu().optional(),
|
|
2426
2427
|
id: O().optional(),
|
|
2427
2428
|
authMethodId: ae([b("apiKey"), b("disabled"), b("oAuth2"), b("none")]),
|
|
2428
|
-
label:
|
|
2429
|
+
label: pc.optional(),
|
|
2429
2430
|
maxConnectionCount: De().optional(),
|
|
2430
|
-
params: He(
|
|
2431
|
-
}),
|
|
2431
|
+
params: He(be(O(), O())).optional()
|
|
2432
|
+
}), xc = ae([b("application"), b("curatedDataset"), b("database"), b("fileStore")]), gc = ae([
|
|
2432
2433
|
b("abortOperation"),
|
|
2433
2434
|
b("authenticateConnection"),
|
|
2434
2435
|
b("createObject"),
|
|
@@ -2441,20 +2442,20 @@ const sc = ["amber", "green", "red", "other"], nc = Gt(sc), ac = ["alpha", "beta
|
|
|
2441
2442
|
b("removeRecords"),
|
|
2442
2443
|
b("retrieveRecords"),
|
|
2443
2444
|
b("upsertRecords")
|
|
2444
|
-
]),
|
|
2445
|
-
typeId:
|
|
2445
|
+
]), bc = ae([b("bidirectional"), b("destination"), b("source"), b("unknown")]), _c = dc.extend({
|
|
2446
|
+
typeId: mc,
|
|
2446
2447
|
version: O()
|
|
2447
|
-
}),
|
|
2448
|
-
category:
|
|
2449
|
-
categoryId:
|
|
2450
|
-
implementations:
|
|
2451
|
-
operations: He(
|
|
2448
|
+
}), kc = _c.extend({
|
|
2449
|
+
category: yc.optional(),
|
|
2450
|
+
categoryId: xc,
|
|
2451
|
+
implementations: be(O(), vc),
|
|
2452
|
+
operations: He(gc),
|
|
2452
2453
|
typeId: b("connector"),
|
|
2453
|
-
usageId:
|
|
2454
|
+
usageId: bc,
|
|
2454
2455
|
vendorAccountURL: O().nullable().optional(),
|
|
2455
2456
|
vendorDocumentationURL: O().nullable().optional(),
|
|
2456
2457
|
vendorHomeURL: O().nullable().optional()
|
|
2457
|
-
}),
|
|
2458
|
+
}), wc = ae([b("amber"), b("green"), b("red"), b("other")]), Sc = ae([
|
|
2458
2459
|
b("alpha"),
|
|
2459
2460
|
b("beta"),
|
|
2460
2461
|
b("generalAvailability"),
|
|
@@ -2464,7 +2465,7 @@ const sc = ["amber", "green", "red", "other"], nc = Gt(sc), ac = ["alpha", "beta
|
|
|
2464
2465
|
b("releaseCandidate"),
|
|
2465
2466
|
b("unavailable"),
|
|
2466
2467
|
b("underReview")
|
|
2467
|
-
]),
|
|
2468
|
+
]), Tc = ae([
|
|
2468
2469
|
b("app"),
|
|
2469
2470
|
b("connector"),
|
|
2470
2471
|
b("connectorConnection"),
|
|
@@ -2488,40 +2489,40 @@ const sc = ["amber", "green", "red", "other"], nc = Gt(sc), ac = ["alpha", "beta
|
|
|
2488
2489
|
b("presenter"),
|
|
2489
2490
|
b("presenterPresentation"),
|
|
2490
2491
|
b("tool")
|
|
2491
|
-
]), or = De(),
|
|
2492
|
+
]), or = De(), Pc = Ne({
|
|
2492
2493
|
id: O(),
|
|
2493
|
-
color:
|
|
2494
|
+
color: wc,
|
|
2494
2495
|
label: O()
|
|
2495
|
-
}),
|
|
2496
|
+
}), Cc = Ne({
|
|
2496
2497
|
id: O(),
|
|
2497
|
-
label:
|
|
2498
|
-
description:
|
|
2498
|
+
label: be(O(), O()),
|
|
2499
|
+
description: be(O(), O()),
|
|
2499
2500
|
icon: O().optional(),
|
|
2500
2501
|
iconDark: O().optional(),
|
|
2501
2502
|
order: De(),
|
|
2502
2503
|
path: O()
|
|
2503
2504
|
}), Wr = Ne({
|
|
2504
2505
|
id: O(),
|
|
2505
|
-
label:
|
|
2506
|
-
description:
|
|
2506
|
+
label: be(O(), O()),
|
|
2507
|
+
description: be(O(), O()),
|
|
2507
2508
|
firstCreatedAt: or.optional(),
|
|
2508
2509
|
icon: O().optional(),
|
|
2509
2510
|
iconDark: O().optional(),
|
|
2510
2511
|
lastUpdatedAt: or.optional(),
|
|
2511
|
-
status:
|
|
2512
|
+
status: Pc.optional(),
|
|
2512
2513
|
statusId: Sc,
|
|
2513
|
-
typeId:
|
|
2514
|
-
}),
|
|
2515
|
-
typeId:
|
|
2514
|
+
typeId: Tc
|
|
2515
|
+
}), Ac = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), Ec = Wr.extend({
|
|
2516
|
+
typeId: Ac,
|
|
2516
2517
|
version: O()
|
|
2517
|
-
}),
|
|
2518
|
-
modelRefs: He(
|
|
2518
|
+
}), Ic = Wr.extend({
|
|
2519
|
+
modelRefs: He(Cc),
|
|
2519
2520
|
order: De()
|
|
2520
|
-
}),
|
|
2521
|
-
models: He(
|
|
2522
|
-
operations: He(
|
|
2521
|
+
}), Nc = b("list"), Lc = Ec.extend({
|
|
2522
|
+
models: He(Ic),
|
|
2523
|
+
operations: He(Nc),
|
|
2523
2524
|
typeId: b("context")
|
|
2524
|
-
}),
|
|
2525
|
+
}), Oc = ae([b("amber"), b("green"), b("red"), b("other")]), Rc = ae([
|
|
2525
2526
|
b("alpha"),
|
|
2526
2527
|
b("beta"),
|
|
2527
2528
|
b("generalAvailability"),
|
|
@@ -2531,7 +2532,7 @@ const sc = ["amber", "green", "red", "other"], nc = Gt(sc), ac = ["alpha", "beta
|
|
|
2531
2532
|
b("releaseCandidate"),
|
|
2532
2533
|
b("unavailable"),
|
|
2533
2534
|
b("underReview")
|
|
2534
|
-
]),
|
|
2535
|
+
]), Dc = ae([
|
|
2535
2536
|
b("app"),
|
|
2536
2537
|
b("connector"),
|
|
2537
2538
|
b("connectorConnection"),
|
|
@@ -2555,48 +2556,48 @@ const sc = ["amber", "green", "red", "other"], nc = Gt(sc), ac = ["alpha", "beta
|
|
|
2555
2556
|
b("presenter"),
|
|
2556
2557
|
b("presenterPresentation"),
|
|
2557
2558
|
b("tool")
|
|
2558
|
-
]), ur = De(),
|
|
2559
|
+
]), ur = De(), Mc = Ne({
|
|
2559
2560
|
id: O(),
|
|
2560
|
-
color:
|
|
2561
|
+
color: Oc,
|
|
2561
2562
|
label: O()
|
|
2562
|
-
}),
|
|
2563
|
+
}), Vc = Ne({
|
|
2563
2564
|
id: O(),
|
|
2564
|
-
label:
|
|
2565
|
-
description:
|
|
2565
|
+
label: be(O(), O()),
|
|
2566
|
+
description: be(O(), O()),
|
|
2566
2567
|
icon: O().optional(),
|
|
2567
2568
|
iconDark: O().optional(),
|
|
2568
2569
|
order: De(),
|
|
2569
2570
|
path: O()
|
|
2570
|
-
}),
|
|
2571
|
+
}), zc = Ne({
|
|
2571
2572
|
id: O(),
|
|
2572
|
-
label:
|
|
2573
|
-
description:
|
|
2573
|
+
label: be(O(), O()),
|
|
2574
|
+
description: be(O(), O()),
|
|
2574
2575
|
firstCreatedAt: ur.optional(),
|
|
2575
2576
|
icon: O().optional(),
|
|
2576
2577
|
iconDark: O().optional(),
|
|
2577
2578
|
lastUpdatedAt: ur.optional(),
|
|
2578
|
-
status:
|
|
2579
|
-
statusId:
|
|
2580
|
-
typeId:
|
|
2581
|
-
}),
|
|
2582
|
-
typeId:
|
|
2579
|
+
status: Mc.optional(),
|
|
2580
|
+
statusId: Rc,
|
|
2581
|
+
typeId: Dc
|
|
2582
|
+
}), jc = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), Fc = zc.extend({
|
|
2583
|
+
typeId: jc,
|
|
2583
2584
|
version: O()
|
|
2584
|
-
}), $c = ae([b("list"), b("render"), b("setColorMode")]),
|
|
2585
|
-
presentations: He(
|
|
2585
|
+
}), $c = ae([b("list"), b("render"), b("setColorMode")]), Bc = Fc.extend({
|
|
2586
|
+
presentations: He(Vc),
|
|
2586
2587
|
operations: He($c),
|
|
2587
2588
|
typeId: b("presenter")
|
|
2588
2589
|
});
|
|
2589
|
-
var
|
|
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], Kr = [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_・", Xr = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", si = {
|
|
2590
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",
|
|
2591
2592
|
5: "class enum extends super const export import",
|
|
2592
2593
|
6: "enum",
|
|
2593
2594
|
strict: "implements interface let package private protected public static yield",
|
|
2594
2595
|
strictBind: "eval arguments"
|
|
2595
|
-
}, ni = "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",
|
|
2596
|
+
}, ni = "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 = {
|
|
2596
2597
|
5: ni,
|
|
2597
2598
|
"5module": ni + " export import",
|
|
2598
2599
|
6: ni + " const class extends export import super"
|
|
2599
|
-
},
|
|
2600
|
+
}, Hc = /^in(stanceof)?$/, Gc = new RegExp("[" + Xr + "]"), Wc = new RegExp("[" + Xr + Uc + "]");
|
|
2600
2601
|
function pi(e, t) {
|
|
2601
2602
|
for (var i = 65536, r = 0; r < t.length; r += 2) {
|
|
2602
2603
|
if (i += t[r], i > e)
|
|
@@ -2607,19 +2608,19 @@ function pi(e, t) {
|
|
|
2607
2608
|
return !1;
|
|
2608
2609
|
}
|
|
2609
2610
|
function Ee(e, t) {
|
|
2610
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
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 : pi(e, Kr);
|
|
2611
2612
|
}
|
|
2612
2613
|
function Me(e, t) {
|
|
2613
|
-
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 &&
|
|
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 : pi(e, Kr) || pi(e, Zc);
|
|
2614
2615
|
}
|
|
2615
2616
|
var z = function(t, i) {
|
|
2616
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;
|
|
2617
2618
|
};
|
|
2618
|
-
function
|
|
2619
|
+
function ke(e, t) {
|
|
2619
2620
|
return new z(e, { beforeExpr: !0, binop: t });
|
|
2620
2621
|
}
|
|
2621
|
-
var
|
|
2622
|
-
function
|
|
2622
|
+
var we = { beforeExpr: !0 }, fe = { startsExpr: !0 }, at = {};
|
|
2623
|
+
function $(e, t) {
|
|
2623
2624
|
return t === void 0 && (t = {}), t.keyword = e, at[e] = new z(e, t);
|
|
2624
2625
|
}
|
|
2625
2626
|
var l = {
|
|
@@ -2636,16 +2637,16 @@ var l = {
|
|
|
2636
2637
|
braceR: new z("}"),
|
|
2637
2638
|
parenL: new z("(", { beforeExpr: !0, startsExpr: !0 }),
|
|
2638
2639
|
parenR: new z(")"),
|
|
2639
|
-
comma: new z(",",
|
|
2640
|
-
semi: new z(";",
|
|
2641
|
-
colon: new z(":",
|
|
2640
|
+
comma: new z(",", we),
|
|
2641
|
+
semi: new z(";", we),
|
|
2642
|
+
colon: new z(":", we),
|
|
2642
2643
|
dot: new z("."),
|
|
2643
|
-
question: new z("?",
|
|
2644
|
+
question: new z("?", we),
|
|
2644
2645
|
questionDot: new z("?."),
|
|
2645
|
-
arrow: new z("=>",
|
|
2646
|
+
arrow: new z("=>", we),
|
|
2646
2647
|
template: new z("template"),
|
|
2647
2648
|
invalidTemplate: new z("invalidTemplate"),
|
|
2648
|
-
ellipsis: new z("...",
|
|
2649
|
+
ellipsis: new z("...", we),
|
|
2649
2650
|
backQuote: new z("`", fe),
|
|
2650
2651
|
dollarBraceL: new z("${", { beforeExpr: !0, startsExpr: !0 }),
|
|
2651
2652
|
// Operators. These carry several kinds of properties to help the
|
|
@@ -2665,56 +2666,56 @@ var l = {
|
|
|
2665
2666
|
assign: new z("_=", { beforeExpr: !0, isAssign: !0 }),
|
|
2666
2667
|
incDec: new z("++/--", { prefix: !0, postfix: !0, startsExpr: !0 }),
|
|
2667
2668
|
prefix: new z("!/~", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
2668
|
-
logicalOR:
|
|
2669
|
-
logicalAND:
|
|
2670
|
-
bitwiseOR:
|
|
2671
|
-
bitwiseXOR:
|
|
2672
|
-
bitwiseAND:
|
|
2673
|
-
equality:
|
|
2674
|
-
relational:
|
|
2675
|
-
bitShift:
|
|
2669
|
+
logicalOR: ke("||", 1),
|
|
2670
|
+
logicalAND: ke("&&", 2),
|
|
2671
|
+
bitwiseOR: ke("|", 3),
|
|
2672
|
+
bitwiseXOR: ke("^", 4),
|
|
2673
|
+
bitwiseAND: ke("&", 5),
|
|
2674
|
+
equality: ke("==/!=/===/!==", 6),
|
|
2675
|
+
relational: ke("</>/<=/>=", 7),
|
|
2676
|
+
bitShift: ke("<</>>/>>>", 8),
|
|
2676
2677
|
plusMin: new z("+/-", { beforeExpr: !0, binop: 9, prefix: !0, startsExpr: !0 }),
|
|
2677
|
-
modulo:
|
|
2678
|
-
star:
|
|
2679
|
-
slash:
|
|
2678
|
+
modulo: ke("%", 10),
|
|
2679
|
+
star: ke("*", 10),
|
|
2680
|
+
slash: ke("/", 10),
|
|
2680
2681
|
starstar: new z("**", { beforeExpr: !0 }),
|
|
2681
|
-
coalesce:
|
|
2682
|
+
coalesce: ke("??", 1),
|
|
2682
2683
|
// Keyword token types.
|
|
2683
|
-
_break:
|
|
2684
|
-
_case:
|
|
2685
|
-
_catch:
|
|
2686
|
-
_continue:
|
|
2687
|
-
_debugger:
|
|
2688
|
-
_default:
|
|
2689
|
-
_do:
|
|
2690
|
-
_else:
|
|
2691
|
-
_finally:
|
|
2692
|
-
_for:
|
|
2693
|
-
_function:
|
|
2694
|
-
_if:
|
|
2695
|
-
_return:
|
|
2696
|
-
_switch:
|
|
2697
|
-
_throw:
|
|
2698
|
-
_try:
|
|
2699
|
-
_var:
|
|
2700
|
-
_const:
|
|
2701
|
-
_while:
|
|
2702
|
-
_with:
|
|
2703
|
-
_new:
|
|
2704
|
-
_this:
|
|
2705
|
-
_super:
|
|
2706
|
-
_class:
|
|
2707
|
-
_extends:
|
|
2708
|
-
_export:
|
|
2709
|
-
_import:
|
|
2710
|
-
_null:
|
|
2711
|
-
_true:
|
|
2712
|
-
_false:
|
|
2713
|
-
_in:
|
|
2714
|
-
_instanceof:
|
|
2715
|
-
_typeof:
|
|
2716
|
-
_void:
|
|
2717
|
-
_delete:
|
|
2684
|
+
_break: $("break"),
|
|
2685
|
+
_case: $("case", we),
|
|
2686
|
+
_catch: $("catch"),
|
|
2687
|
+
_continue: $("continue"),
|
|
2688
|
+
_debugger: $("debugger"),
|
|
2689
|
+
_default: $("default", we),
|
|
2690
|
+
_do: $("do", { isLoop: !0, beforeExpr: !0 }),
|
|
2691
|
+
_else: $("else", we),
|
|
2692
|
+
_finally: $("finally"),
|
|
2693
|
+
_for: $("for", { isLoop: !0 }),
|
|
2694
|
+
_function: $("function", fe),
|
|
2695
|
+
_if: $("if"),
|
|
2696
|
+
_return: $("return", we),
|
|
2697
|
+
_switch: $("switch"),
|
|
2698
|
+
_throw: $("throw", we),
|
|
2699
|
+
_try: $("try"),
|
|
2700
|
+
_var: $("var"),
|
|
2701
|
+
_const: $("const"),
|
|
2702
|
+
_while: $("while", { isLoop: !0 }),
|
|
2703
|
+
_with: $("with"),
|
|
2704
|
+
_new: $("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
2705
|
+
_this: $("this", fe),
|
|
2706
|
+
_super: $("super", fe),
|
|
2707
|
+
_class: $("class", fe),
|
|
2708
|
+
_extends: $("extends", we),
|
|
2709
|
+
_export: $("export"),
|
|
2710
|
+
_import: $("import", fe),
|
|
2711
|
+
_null: $("null", fe),
|
|
2712
|
+
_true: $("true", fe),
|
|
2713
|
+
_false: $("false", fe),
|
|
2714
|
+
_in: $("in", { beforeExpr: !0, binop: 7 }),
|
|
2715
|
+
_instanceof: $("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
2716
|
+
_typeof: $("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
2717
|
+
_void: $("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
2718
|
+
_delete: $("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
2718
2719
|
}, ce = /\r\n?|\n|\u2028|\u2029/, Jr = new RegExp(ce.source, "g");
|
|
2719
2720
|
function Ye(e) {
|
|
2720
2721
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
@@ -2728,10 +2729,10 @@ function Yr(e, t, i) {
|
|
|
2728
2729
|
}
|
|
2729
2730
|
return -1;
|
|
2730
2731
|
}
|
|
2731
|
-
var
|
|
2732
|
-
return
|
|
2732
|
+
var Si = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, ne = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Qr = Object.prototype, Kc = Qr.hasOwnProperty, Xc = Qr.toString, ht = Object.hasOwn || (function(e, t) {
|
|
2733
|
+
return Kc.call(e, t);
|
|
2733
2734
|
}), cr = Array.isArray || (function(e) {
|
|
2734
|
-
return
|
|
2735
|
+
return Xc.call(e) === "[object Array]";
|
|
2735
2736
|
}), hr = /* @__PURE__ */ Object.create(null);
|
|
2736
2737
|
function Ze(e) {
|
|
2737
2738
|
return hr[e] || (hr[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
@@ -2739,7 +2740,7 @@ function Ze(e) {
|
|
|
2739
2740
|
function Ve(e) {
|
|
2740
2741
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
2741
2742
|
}
|
|
2742
|
-
var
|
|
2743
|
+
var Jc = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, ot = function(t, i) {
|
|
2743
2744
|
this.line = t, this.column = i;
|
|
2744
2745
|
};
|
|
2745
2746
|
ot.prototype.offset = function(t) {
|
|
@@ -2853,7 +2854,7 @@ var zt = {
|
|
|
2853
2854
|
// (non-standard) ParenthesizedExpression nodes
|
|
2854
2855
|
preserveParens: !1
|
|
2855
2856
|
}, lr = !1;
|
|
2856
|
-
function
|
|
2857
|
+
function Yc(e) {
|
|
2857
2858
|
var t = {};
|
|
2858
2859
|
for (var i in zt)
|
|
2859
2860
|
t[i] = e && ht(e, i) ? e[i] : zt[i];
|
|
@@ -2864,9 +2865,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
|
|
|
2864
2865
|
return r.push(n);
|
|
2865
2866
|
};
|
|
2866
2867
|
}
|
|
2867
|
-
return cr(t.onComment) && (t.onComment =
|
|
2868
|
+
return cr(t.onComment) && (t.onComment = Qc(t, t.onComment)), t;
|
|
2868
2869
|
}
|
|
2869
|
-
function
|
|
2870
|
+
function Qc(e, t) {
|
|
2870
2871
|
return function(i, r, n, u, h, d) {
|
|
2871
2872
|
var y = {
|
|
2872
2873
|
type: i ? "Block" : "Line",
|
|
@@ -2877,12 +2878,12 @@ function Yc(e, t) {
|
|
|
2877
2878
|
e.locations && (y.loc = new kt(this, h, d)), e.ranges && (y.range = [n, u]), t.push(y);
|
|
2878
2879
|
};
|
|
2879
2880
|
}
|
|
2880
|
-
var _t = 1, lt = 2, Pi = 4, es = 8, Ci = 16, ts = 32, Wt = 64, is = 128, Qe = 256,
|
|
2881
|
+
var _t = 1, lt = 2, Pi = 4, es = 8, Ci = 16, ts = 32, Wt = 64, is = 128, Qe = 256, wt = 512, Kt = _t | lt | Qe;
|
|
2881
2882
|
function Ai(e, t) {
|
|
2882
2883
|
return lt | (e ? Pi : 0) | (t ? es : 0);
|
|
2883
2884
|
}
|
|
2884
2885
|
var jt = 0, Ei = 1, je = 2, rs = 3, ss = 4, ns = 5, J = function(t, i, r) {
|
|
2885
|
-
this.options = t =
|
|
2886
|
+
this.options = t = Yc(t), this.sourceFile = t.sourceFile, this.keywords = Ze(qc[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]);
|
|
2886
2887
|
var n = "";
|
|
2887
2888
|
t.allowReserved !== !0 && (n = si[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (n += " await")), this.reservedWords = Ze(n);
|
|
2888
2889
|
var u = (n ? n + " " : "") + si.strict;
|
|
@@ -2905,7 +2906,7 @@ Le.inAsync.get = function() {
|
|
|
2905
2906
|
Le.canAwait.get = function() {
|
|
2906
2907
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
2907
2908
|
var t = this.scopeStack[e], i = t.flags;
|
|
2908
|
-
if (i & (Qe |
|
|
2909
|
+
if (i & (Qe | wt))
|
|
2909
2910
|
return !1;
|
|
2910
2911
|
if (i & lt)
|
|
2911
2912
|
return (i & Pi) > 0;
|
|
@@ -2925,7 +2926,7 @@ Le.treatFunctionsAsVar.get = function() {
|
|
|
2925
2926
|
Le.allowNewDotTarget.get = function() {
|
|
2926
2927
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
2927
2928
|
var t = this.scopeStack[e], i = t.flags;
|
|
2928
|
-
if (i & (Qe |
|
|
2929
|
+
if (i & (Qe | wt) || i & lt && !(i & Ci))
|
|
2929
2930
|
return !0;
|
|
2930
2931
|
}
|
|
2931
2932
|
return !1;
|
|
@@ -2950,13 +2951,13 @@ J.tokenizer = function(t, i) {
|
|
|
2950
2951
|
return new this(i, t);
|
|
2951
2952
|
};
|
|
2952
2953
|
Object.defineProperties(J.prototype, Le);
|
|
2953
|
-
var he = J.prototype,
|
|
2954
|
+
var he = J.prototype, eh = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
2954
2955
|
he.strictDirective = function(e) {
|
|
2955
2956
|
if (this.options.ecmaVersion < 5)
|
|
2956
2957
|
return !1;
|
|
2957
2958
|
for (; ; ) {
|
|
2958
2959
|
ne.lastIndex = e, e += ne.exec(this.input)[0].length;
|
|
2959
|
-
var t =
|
|
2960
|
+
var t = eh.exec(this.input.slice(e));
|
|
2960
2961
|
if (!t)
|
|
2961
2962
|
return !1;
|
|
2962
2963
|
if ((t[1] || t[2]) === "use strict") {
|
|
@@ -3037,7 +3038,7 @@ I.parseTopLevel = function(e) {
|
|
|
3037
3038
|
}
|
|
3038
3039
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType, this.finishNode(e, "Program");
|
|
3039
3040
|
};
|
|
3040
|
-
var Ii = { kind: "loop" },
|
|
3041
|
+
var Ii = { kind: "loop" }, th = { kind: "switch" };
|
|
3041
3042
|
I.isLet = function(e) {
|
|
3042
3043
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
3043
3044
|
return !1;
|
|
@@ -3055,7 +3056,7 @@ I.isLet = function(e) {
|
|
|
3055
3056
|
if (r === 92 || r > 55295 && r < 56320)
|
|
3056
3057
|
return !0;
|
|
3057
3058
|
var u = this.input.slice(i, n);
|
|
3058
|
-
if (!
|
|
3059
|
+
if (!Hc.test(u))
|
|
3059
3060
|
return !0;
|
|
3060
3061
|
}
|
|
3061
3062
|
return !1;
|
|
@@ -3154,8 +3155,8 @@ I.parseStatement = function(e, t, i) {
|
|
|
3154
3155
|
var o = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
|
|
3155
3156
|
if (o)
|
|
3156
3157
|
return t && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), o === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(n, !1, o), this.semicolon(), this.finishNode(n, "VariableDeclaration");
|
|
3157
|
-
var
|
|
3158
|
-
return r === l.name &&
|
|
3158
|
+
var w = this.value, S = this.parseExpression();
|
|
3159
|
+
return r === l.name && S.type === "Identifier" && this.eat(l.colon) ? this.parseLabeledStatement(n, w, S, e) : this.parseExpressionStatement(n, S);
|
|
3159
3160
|
}
|
|
3160
3161
|
};
|
|
3161
3162
|
I.parseBreakContinueStatement = function(e, t) {
|
|
@@ -3189,8 +3190,8 @@ I.parseForStatement = function(e) {
|
|
|
3189
3190
|
var y = this.startNode();
|
|
3190
3191
|
return this.next(), d === "await using" && this.next(), this.parseVar(y, !0, d), this.finishNode(y, "VariableDeclaration"), this.parseForAfterInit(e, y, t);
|
|
3191
3192
|
}
|
|
3192
|
-
var o = this.containsEsc,
|
|
3193
|
-
return this.type === l._in || (h = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === l._in && this.unexpected(t), e.await = !0) : h && this.options.ecmaVersion >= 8 && (A.start ===
|
|
3193
|
+
var o = this.containsEsc, w = new Xt(), S = this.start, A = t > -1 ? this.parseExprSubscripts(w, "await") : this.parseExpression(!0, w);
|
|
3194
|
+
return this.type === l._in || (h = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === l._in && this.unexpected(t), e.await = !0) : h && this.options.ecmaVersion >= 8 && (A.start === S && !o && A.type === "Identifier" && A.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), u && h && this.raise(A.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(A, !1, w), this.checkLValPattern(A), this.parseForIn(e, A)) : (this.checkExpressionErrors(w, !0), t > -1 && this.unexpected(t), this.parseFor(e, A));
|
|
3194
3195
|
};
|
|
3195
3196
|
I.parseForAfterInit = function(e, t, i) {
|
|
3196
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));
|
|
@@ -3205,7 +3206,7 @@ I.parseReturnStatement = function(e) {
|
|
|
3205
3206
|
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(l.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
3206
3207
|
};
|
|
3207
3208
|
I.parseSwitchStatement = function(e) {
|
|
3208
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(l.braceL), this.labels.push(
|
|
3209
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(l.braceL), this.labels.push(th), this.enterScope(0);
|
|
3209
3210
|
for (var t, i = !1; this.type !== l.braceR; )
|
|
3210
3211
|
if (this.type === l._case || this.type === l._default) {
|
|
3211
3212
|
var r = this.type === l._case;
|
|
@@ -3217,7 +3218,7 @@ I.parseSwitchStatement = function(e) {
|
|
|
3217
3218
|
I.parseThrowStatement = function(e) {
|
|
3218
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");
|
|
3219
3220
|
};
|
|
3220
|
-
var
|
|
3221
|
+
var ih = [];
|
|
3221
3222
|
I.parseCatchClauseParam = function() {
|
|
3222
3223
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
3223
3224
|
return this.enterScope(t ? ts : 0), this.checkLValPattern(e, t ? ss : je), this.expect(l.parenR), e;
|
|
@@ -3302,7 +3303,7 @@ I.parseClass = function(e, t) {
|
|
|
3302
3303
|
var r = this.enterClassBody(), n = this.startNode(), u = !1;
|
|
3303
3304
|
for (n.body = [], this.expect(l.braceL); this.type !== l.braceR; ) {
|
|
3304
3305
|
var h = this.parseClassElement(e.superClass !== null);
|
|
3305
|
-
h && (n.body.push(h), h.type === "MethodDefinition" && h.kind === "constructor" ? (u && this.raiseRecoverable(h.start, "Duplicate constructor in the same class"), u = !0) : h.key && h.key.type === "PrivateIdentifier" &&
|
|
3306
|
+
h && (n.body.push(h), h.type === "MethodDefinition" && h.kind === "constructor" ? (u && this.raiseRecoverable(h.start, "Duplicate constructor in the same class"), u = !0) : h.key && h.key.type === "PrivateIdentifier" && rh(r, h) && this.raiseRecoverable(h.key.start, "Identifier '#" + h.key.name + "' has already been declared"));
|
|
3306
3307
|
}
|
|
3307
3308
|
return this.strict = i, this.next(), e.body = this.finishNode(n, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
3308
3309
|
};
|
|
@@ -3320,8 +3321,8 @@ I.parseClassElement = function(e) {
|
|
|
3320
3321
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? h = y : r = y);
|
|
3321
3322
|
}
|
|
3322
3323
|
if (r ? (i.computed = !1, i.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i.key.name = r, this.finishNode(i.key, "Identifier")) : this.parseClassElementName(i), t < 13 || this.type === l.parenL || h !== "method" || n || u) {
|
|
3323
|
-
var o = !i.static &&
|
|
3324
|
-
o && h !== "method" && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = o ? "constructor" : h, this.parseClassMethod(i, n, u,
|
|
3324
|
+
var o = !i.static && Ft(i, "constructor"), w = o && e;
|
|
3325
|
+
o && h !== "method" && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = o ? "constructor" : h, this.parseClassMethod(i, n, u, w);
|
|
3325
3326
|
} else
|
|
3326
3327
|
this.parseClassField(i);
|
|
3327
3328
|
return i;
|
|
@@ -3334,12 +3335,12 @@ I.parseClassElementName = function(e) {
|
|
|
3334
3335
|
};
|
|
3335
3336
|
I.parseClassMethod = function(e, t, i, r) {
|
|
3336
3337
|
var n = e.key;
|
|
3337
|
-
e.kind === "constructor" ? (t && this.raise(n.start, "Constructor can't be a generator"), i && this.raise(n.start, "Constructor can't be an async method")) : e.static &&
|
|
3338
|
+
e.kind === "constructor" ? (t && this.raise(n.start, "Constructor can't be a generator"), i && this.raise(n.start, "Constructor can't be an async method")) : e.static && Ft(e, "prototype") && this.raise(n.start, "Classes may not have a static property named prototype");
|
|
3338
3339
|
var u = e.value = this.parseMethod(t, i, r);
|
|
3339
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");
|
|
3340
3341
|
};
|
|
3341
3342
|
I.parseClassField = function(e) {
|
|
3342
|
-
return
|
|
3343
|
+
return Ft(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && Ft(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(l.eq) ? (this.enterScope(wt | Wt), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
|
|
3343
3344
|
};
|
|
3344
3345
|
I.parseClassStaticBlock = function(e) {
|
|
3345
3346
|
e.body = [];
|
|
@@ -3368,11 +3369,11 @@ I.exitClassBody = function() {
|
|
|
3368
3369
|
ht(t, h.name) || (n ? n.used.push(h) : this.raiseRecoverable(h.start, "Private field '#" + h.name + "' must be declared in an enclosing class"));
|
|
3369
3370
|
}
|
|
3370
3371
|
};
|
|
3371
|
-
function
|
|
3372
|
+
function rh(e, t) {
|
|
3372
3373
|
var i = t.key.name, r = e[i], n = "true";
|
|
3373
3374
|
return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (n = (t.static ? "s" : "i") + t.kind), r === "iget" && n === "iset" || r === "iset" && n === "iget" || r === "sget" && n === "sset" || r === "sset" && n === "sget" ? (e[i] = "true", !1) : r ? !0 : (e[i] = n, !1);
|
|
3374
3375
|
}
|
|
3375
|
-
function
|
|
3376
|
+
function Ft(e, t) {
|
|
3376
3377
|
var i = e.computed, r = e.key;
|
|
3377
3378
|
return !i && (r.type === "Identifier" && r.name === t || r.type === "Literal" && r.value === t);
|
|
3378
3379
|
}
|
|
@@ -3465,7 +3466,7 @@ I.parseExportSpecifiers = function(e) {
|
|
|
3465
3466
|
return t;
|
|
3466
3467
|
};
|
|
3467
3468
|
I.parseImport = function(e) {
|
|
3468
|
-
return this.next(), this.type === l.string ? (e.specifiers =
|
|
3469
|
+
return this.next(), this.type === l.string ? (e.specifiers = ih, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === l.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration");
|
|
3469
3470
|
};
|
|
3470
3471
|
I.parseImportSpecifier = function() {
|
|
3471
3472
|
var e = this.startNode();
|
|
@@ -3516,7 +3517,7 @@ I.parseImportAttribute = function() {
|
|
|
3516
3517
|
I.parseModuleExportName = function() {
|
|
3517
3518
|
if (this.options.ecmaVersion >= 13 && this.type === l.string) {
|
|
3518
3519
|
var e = this.parseLiteral(this.value);
|
|
3519
|
-
return
|
|
3520
|
+
return Jc.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
3520
3521
|
}
|
|
3521
3522
|
return this.parseIdent(!0);
|
|
3522
3523
|
};
|
|
@@ -3528,8 +3529,8 @@ I.isDirectiveCandidate = function(e) {
|
|
|
3528
3529
|
return this.options.ecmaVersion >= 5 && e.type === "ExpressionStatement" && e.expression.type === "Literal" && typeof e.expression.value == "string" && // Reject parenthesized strings.
|
|
3529
3530
|
(this.input[e.start] === '"' || this.input[e.start] === "'");
|
|
3530
3531
|
};
|
|
3531
|
-
var
|
|
3532
|
-
|
|
3532
|
+
var Ce = J.prototype;
|
|
3533
|
+
Ce.toAssignable = function(e, t, i) {
|
|
3533
3534
|
if (this.options.ecmaVersion >= 6 && e)
|
|
3534
3535
|
switch (e.type) {
|
|
3535
3536
|
case "Identifier":
|
|
@@ -3574,7 +3575,7 @@ Pe.toAssignable = function(e, t, i) {
|
|
|
3574
3575
|
else i && this.checkPatternErrors(i, !0);
|
|
3575
3576
|
return e;
|
|
3576
3577
|
};
|
|
3577
|
-
|
|
3578
|
+
Ce.toAssignableList = function(e, t) {
|
|
3578
3579
|
for (var i = e.length, r = 0; r < i; r++) {
|
|
3579
3580
|
var n = e[r];
|
|
3580
3581
|
n && this.toAssignable(n, t);
|
|
@@ -3585,15 +3586,15 @@ Pe.toAssignableList = function(e, t) {
|
|
|
3585
3586
|
}
|
|
3586
3587
|
return e;
|
|
3587
3588
|
};
|
|
3588
|
-
|
|
3589
|
+
Ce.parseSpread = function(e) {
|
|
3589
3590
|
var t = this.startNode();
|
|
3590
3591
|
return this.next(), t.argument = this.parseMaybeAssign(!1, e), this.finishNode(t, "SpreadElement");
|
|
3591
3592
|
};
|
|
3592
|
-
|
|
3593
|
+
Ce.parseRestBinding = function() {
|
|
3593
3594
|
var e = this.startNode();
|
|
3594
3595
|
return this.next(), this.options.ecmaVersion === 6 && this.type !== l.name && this.unexpected(), e.argument = this.parseBindingAtom(), this.finishNode(e, "RestElement");
|
|
3595
3596
|
};
|
|
3596
|
-
|
|
3597
|
+
Ce.parseBindingAtom = function() {
|
|
3597
3598
|
if (this.options.ecmaVersion >= 6)
|
|
3598
3599
|
switch (this.type) {
|
|
3599
3600
|
case l.bracketL:
|
|
@@ -3604,7 +3605,7 @@ Pe.parseBindingAtom = function() {
|
|
|
3604
3605
|
}
|
|
3605
3606
|
return this.parseIdent();
|
|
3606
3607
|
};
|
|
3607
|
-
|
|
3608
|
+
Ce.parseBindingList = function(e, t, i, r) {
|
|
3608
3609
|
for (var n = [], u = !0; !this.eat(e); )
|
|
3609
3610
|
if (u ? u = !1 : this.expect(l.comma), t && this.type === l.comma)
|
|
3610
3611
|
n.push(null);
|
|
@@ -3620,20 +3621,20 @@ Pe.parseBindingList = function(e, t, i, r) {
|
|
|
3620
3621
|
}
|
|
3621
3622
|
return n;
|
|
3622
3623
|
};
|
|
3623
|
-
|
|
3624
|
+
Ce.parseAssignableListItem = function(e) {
|
|
3624
3625
|
var t = this.parseMaybeDefault(this.start, this.startLoc);
|
|
3625
3626
|
return this.parseBindingListItem(t), t;
|
|
3626
3627
|
};
|
|
3627
|
-
|
|
3628
|
+
Ce.parseBindingListItem = function(e) {
|
|
3628
3629
|
return e;
|
|
3629
3630
|
};
|
|
3630
|
-
|
|
3631
|
+
Ce.parseMaybeDefault = function(e, t, i) {
|
|
3631
3632
|
if (i = i || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(l.eq))
|
|
3632
3633
|
return i;
|
|
3633
3634
|
var r = this.startNodeAt(e, t);
|
|
3634
3635
|
return r.left = i, r.right = this.parseMaybeAssign(), this.finishNode(r, "AssignmentPattern");
|
|
3635
3636
|
};
|
|
3636
|
-
|
|
3637
|
+
Ce.checkLValSimple = function(e, t, i) {
|
|
3637
3638
|
t === void 0 && (t = jt);
|
|
3638
3639
|
var r = t !== jt;
|
|
3639
3640
|
switch (e.type) {
|
|
@@ -3652,7 +3653,7 @@ Pe.checkLValSimple = function(e, t, i) {
|
|
|
3652
3653
|
this.raise(e.start, (r ? "Binding" : "Assigning to") + " rvalue");
|
|
3653
3654
|
}
|
|
3654
3655
|
};
|
|
3655
|
-
|
|
3656
|
+
Ce.checkLValPattern = function(e, t, i) {
|
|
3656
3657
|
switch (t === void 0 && (t = jt), e.type) {
|
|
3657
3658
|
case "ObjectPattern":
|
|
3658
3659
|
for (var r = 0, n = e.properties; r < n.length; r += 1) {
|
|
@@ -3670,7 +3671,7 @@ Pe.checkLValPattern = function(e, t, i) {
|
|
|
3670
3671
|
this.checkLValSimple(e, t, i);
|
|
3671
3672
|
}
|
|
3672
3673
|
};
|
|
3673
|
-
|
|
3674
|
+
Ce.checkLValInnerPattern = function(e, t, i) {
|
|
3674
3675
|
switch (t === void 0 && (t = jt), e.type) {
|
|
3675
3676
|
case "Property":
|
|
3676
3677
|
this.checkLValInnerPattern(e.value, t, i);
|
|
@@ -3821,8 +3822,8 @@ M.parseMaybeAssign = function(e, t, i) {
|
|
|
3821
3822
|
(this.type === l.parenL || this.type === l.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
3822
3823
|
var o = this.parseMaybeConditional(e, t);
|
|
3823
3824
|
if (i && (o = i.call(this, o, d, y)), this.type.isAssign) {
|
|
3824
|
-
var
|
|
3825
|
-
return
|
|
3825
|
+
var w = this.startNodeAt(d, y);
|
|
3826
|
+
return w.operator = this.value, this.type === l.eq && (o = this.toAssignable(o, !1, t)), r || (t.parenthesizedAssign = t.trailingComma = t.doubleProto = -1), t.shorthandAssign >= o.start && (t.shorthandAssign = -1), this.type === l.eq ? this.checkLValPattern(o) : this.checkLValSimple(o), w.left = o, this.next(), w.right = this.parseMaybeAssign(e), h > -1 && (t.doubleProto = h), this.finishNode(w, "AssignmentExpression");
|
|
3826
3827
|
} else
|
|
3827
3828
|
r && this.checkExpressionErrors(t, !0);
|
|
3828
3829
|
return n > -1 && (t.parenthesizedAssign = n), u > -1 && (t.trailingComma = u), o;
|
|
@@ -3848,7 +3849,7 @@ M.parseExprOp = function(e, t, i, r, n) {
|
|
|
3848
3849
|
d && (u = l.logicalAND.binop);
|
|
3849
3850
|
var y = this.value;
|
|
3850
3851
|
this.next();
|
|
3851
|
-
var o = this.start,
|
|
3852
|
+
var o = this.start, w = this.startLoc, S = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, n), o, w, u, n), A = this.buildBinary(t, i, e, S, y, h || d);
|
|
3852
3853
|
return (h && this.type === l.coalesce || d && (this.type === l.logicalOR || this.type === l.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(A, t, i, r, n);
|
|
3853
3854
|
}
|
|
3854
3855
|
return e;
|
|
@@ -3920,15 +3921,15 @@ M.parseSubscript = function(e, t, i, r, n, u, h) {
|
|
|
3920
3921
|
r && y && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
3921
3922
|
var o = this.eat(l.bracketL);
|
|
3922
3923
|
if (o || y && this.type !== l.parenL && this.type !== l.backQuote || this.eat(l.dot)) {
|
|
3923
|
-
var
|
|
3924
|
-
|
|
3924
|
+
var w = this.startNodeAt(t, i);
|
|
3925
|
+
w.object = e, o ? (w.property = this.parseExpression(), this.expect(l.bracketR)) : this.type === l.privateId && e.type !== "Super" ? w.property = this.parsePrivateIdent() : w.property = this.parseIdent(this.options.allowReserved !== "never"), w.computed = !!o, d && (w.optional = y), e = this.finishNode(w, "MemberExpression");
|
|
3925
3926
|
} else if (!r && this.eat(l.parenL)) {
|
|
3926
|
-
var
|
|
3927
|
+
var S = new Xt(), A = this.yieldPos, F = this.awaitPos, Z = this.awaitIdentPos;
|
|
3927
3928
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
3928
|
-
var le = this.parseExprList(l.parenR, this.options.ecmaVersion >= 8, !1,
|
|
3929
|
+
var le = this.parseExprList(l.parenR, this.options.ecmaVersion >= 8, !1, S);
|
|
3929
3930
|
if (n && !y && this.shouldParseAsyncArrow())
|
|
3930
|
-
return this.checkPatternErrors(
|
|
3931
|
-
this.checkExpressionErrors(
|
|
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
|
+
this.checkExpressionErrors(S, !0), this.yieldPos = A || this.yieldPos, this.awaitPos = F || this.awaitPos, this.awaitIdentPos = Z || this.awaitIdentPos;
|
|
3932
3933
|
var D = this.startNodeAt(t, i);
|
|
3933
3934
|
D.callee = e, D.arguments = le, d && (D.optional = y), e = this.finishNode(D, "CallExpression");
|
|
3934
3935
|
} else if (this.type === l.backQuote) {
|
|
@@ -3968,8 +3969,8 @@ M.parseExprAtom = function(e, t, i) {
|
|
|
3968
3969
|
case l._false:
|
|
3969
3970
|
return r = this.startNode(), r.value = this.type === l._null ? null : this.type === l._true, r.raw = this.type.keyword, this.next(), this.finishNode(r, "Literal");
|
|
3970
3971
|
case l.parenL:
|
|
3971
|
-
var
|
|
3972
|
-
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(
|
|
3972
|
+
var w = this.start, S = this.parseParenAndDistinguishExpression(n, t);
|
|
3973
|
+
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(S) && (e.parenthesizedAssign = w), e.parenthesizedBind < 0 && (e.parenthesizedBind = w)), S;
|
|
3973
3974
|
case l.bracketL:
|
|
3974
3975
|
return r = this.startNode(), this.next(), r.elements = this.parseExprList(l.bracketR, !0, !0, e), this.finishNode(r, "ArrayExpression");
|
|
3975
3976
|
case l.braceL:
|
|
@@ -4031,10 +4032,10 @@ M.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
4031
4032
|
var i = this.start, r = this.startLoc, n, u = this.options.ecmaVersion >= 8;
|
|
4032
4033
|
if (this.options.ecmaVersion >= 6) {
|
|
4033
4034
|
this.next();
|
|
4034
|
-
var h = this.start, d = this.startLoc, y = [], o = !0,
|
|
4035
|
+
var h = this.start, d = this.startLoc, y = [], o = !0, w = !1, S = new Xt(), A = this.yieldPos, F = this.awaitPos, Z;
|
|
4035
4036
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== l.parenR; )
|
|
4036
4037
|
if (o ? o = !1 : this.expect(l.comma), u && this.afterTrailingComma(l.parenR, !0)) {
|
|
4037
|
-
|
|
4038
|
+
w = !0;
|
|
4038
4039
|
break;
|
|
4039
4040
|
} else if (this.type === l.ellipsis) {
|
|
4040
4041
|
Z = this.start, y.push(this.parseParenItem(this.parseRestBinding())), this.type === l.comma && this.raiseRecoverable(
|
|
@@ -4043,11 +4044,11 @@ M.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
4043
4044
|
);
|
|
4044
4045
|
break;
|
|
4045
4046
|
} else
|
|
4046
|
-
y.push(this.parseMaybeAssign(!1,
|
|
4047
|
+
y.push(this.parseMaybeAssign(!1, S, this.parseParenItem));
|
|
4047
4048
|
var le = this.lastTokEnd, D = this.lastTokEndLoc;
|
|
4048
4049
|
if (this.expect(l.parenR), e && this.shouldParseArrow(y) && this.eat(l.arrow))
|
|
4049
|
-
return this.checkPatternErrors(
|
|
4050
|
-
(!y.length ||
|
|
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", le, D)) : n = y[0];
|
|
4051
4052
|
} else
|
|
4052
4053
|
n = this.parseParenExpression();
|
|
4053
4054
|
if (this.options.preserveParens) {
|
|
@@ -4062,7 +4063,7 @@ M.parseParenItem = function(e) {
|
|
|
4062
4063
|
M.parseParenArrowList = function(e, t, i, r) {
|
|
4063
4064
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, !1, r);
|
|
4064
4065
|
};
|
|
4065
|
-
var
|
|
4066
|
+
var sh = [];
|
|
4066
4067
|
M.parseNew = function() {
|
|
4067
4068
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
4068
4069
|
var e = this.startNode();
|
|
@@ -4073,7 +4074,7 @@ M.parseNew = function() {
|
|
|
4073
4074
|
return e.property = this.parseIdent(!0), e.property.name !== "target" && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), i && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty");
|
|
4074
4075
|
}
|
|
4075
4076
|
var r = this.start, n = this.startLoc;
|
|
4076
|
-
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, n, !0, !1), this.eat(l.parenL) ? e.arguments = this.parseExprList(l.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments =
|
|
4077
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, n, !0, !1), this.eat(l.parenL) ? e.arguments = this.parseExprList(l.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = sh, this.finishNode(e, "NewExpression");
|
|
4077
4078
|
};
|
|
4078
4079
|
M.parseTemplateElement = function(e) {
|
|
4079
4080
|
var t = e.isTagged, i = this.startNode();
|
|
@@ -4219,23 +4220,23 @@ M.parseAwait = function(e) {
|
|
|
4219
4220
|
var t = this.startNode();
|
|
4220
4221
|
return this.next(), t.argument = this.parseMaybeUnary(null, !0, !1, e), this.finishNode(t, "AwaitExpression");
|
|
4221
4222
|
};
|
|
4222
|
-
var
|
|
4223
|
-
|
|
4223
|
+
var $t = J.prototype;
|
|
4224
|
+
$t.raise = function(e, t) {
|
|
4224
4225
|
var i = Ti(this.input, e);
|
|
4225
4226
|
t += " (" + i.line + ":" + i.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
4226
4227
|
var r = new SyntaxError(t);
|
|
4227
4228
|
throw r.pos = e, r.loc = i, r.raisedAt = this.pos, r;
|
|
4228
4229
|
};
|
|
4229
|
-
|
|
4230
|
-
|
|
4230
|
+
$t.raiseRecoverable = $t.raise;
|
|
4231
|
+
$t.curPosition = function() {
|
|
4231
4232
|
if (this.options.locations)
|
|
4232
4233
|
return new ot(this.curLine, this.pos - this.lineStart);
|
|
4233
4234
|
};
|
|
4234
|
-
var We = J.prototype,
|
|
4235
|
+
var We = J.prototype, nh = function(t) {
|
|
4235
4236
|
this.flags = t, this.var = [], this.lexical = [], this.functions = [];
|
|
4236
4237
|
};
|
|
4237
4238
|
We.enterScope = function(e) {
|
|
4238
|
-
this.scopeStack.push(new
|
|
4239
|
+
this.scopeStack.push(new nh(e));
|
|
4239
4240
|
};
|
|
4240
4241
|
We.exitScope = function() {
|
|
4241
4242
|
this.scopeStack.pop();
|
|
@@ -4275,25 +4276,25 @@ We.currentScope = function() {
|
|
|
4275
4276
|
We.currentVarScope = function() {
|
|
4276
4277
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
4277
4278
|
var t = this.scopeStack[e];
|
|
4278
|
-
if (t.flags & (Kt |
|
|
4279
|
+
if (t.flags & (Kt | wt | Qe))
|
|
4279
4280
|
return t;
|
|
4280
4281
|
}
|
|
4281
4282
|
};
|
|
4282
4283
|
We.currentThisScope = function() {
|
|
4283
4284
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
4284
4285
|
var t = this.scopeStack[e];
|
|
4285
|
-
if (t.flags & (Kt |
|
|
4286
|
+
if (t.flags & (Kt | wt | Qe) && !(t.flags & Ci))
|
|
4286
4287
|
return t;
|
|
4287
4288
|
}
|
|
4288
4289
|
};
|
|
4289
|
-
var
|
|
4290
|
+
var St = function(t, i, r) {
|
|
4290
4291
|
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new kt(t, r)), t.options.directSourceFile && (this.sourceFile = t.options.directSourceFile), t.options.ranges && (this.range = [i, 0]);
|
|
4291
4292
|
}, Tt = J.prototype;
|
|
4292
4293
|
Tt.startNode = function() {
|
|
4293
|
-
return new
|
|
4294
|
+
return new St(this, this.start, this.startLoc);
|
|
4294
4295
|
};
|
|
4295
4296
|
Tt.startNodeAt = function(e, t) {
|
|
4296
|
-
return new
|
|
4297
|
+
return new St(this, e, t);
|
|
4297
4298
|
};
|
|
4298
4299
|
function us(e, t, i, r) {
|
|
4299
4300
|
return e.type = t, e.end = i, this.options.locations && (e.loc.end = r), this.options.ranges && (e.range[1] = i), e;
|
|
@@ -4305,47 +4306,47 @@ Tt.finishNodeAt = function(e, t, i, r) {
|
|
|
4305
4306
|
return us.call(this, e, t, i, r);
|
|
4306
4307
|
};
|
|
4307
4308
|
Tt.copyNode = function(e) {
|
|
4308
|
-
var t = new
|
|
4309
|
+
var t = new St(this, e.start, this.startLoc);
|
|
4309
4310
|
for (var i in e)
|
|
4310
4311
|
t[i] = e[i];
|
|
4311
4312
|
return t;
|
|
4312
4313
|
};
|
|
4313
|
-
var
|
|
4314
|
+
var ah = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz", cs = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", hs = cs + " Extended_Pictographic", ls = hs, ps = ls + " EBase EComp EMod EPres ExtPict", fs = ps, oh = fs, uh = {
|
|
4314
4315
|
9: cs,
|
|
4315
4316
|
10: hs,
|
|
4316
4317
|
11: ls,
|
|
4317
4318
|
12: ps,
|
|
4318
4319
|
13: fs,
|
|
4319
|
-
14:
|
|
4320
|
-
},
|
|
4320
|
+
14: oh
|
|
4321
|
+
}, ch = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", hh = {
|
|
4321
4322
|
9: "",
|
|
4322
4323
|
10: "",
|
|
4323
4324
|
11: "",
|
|
4324
4325
|
12: "",
|
|
4325
4326
|
13: "",
|
|
4326
|
-
14:
|
|
4327
|
-
}, pr = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", ds = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", ms = ds + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", ys = ms + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", vs = ys + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", xs = vs + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",
|
|
4327
|
+
14: ch
|
|
4328
|
+
}, pr = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", ds = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", ms = ds + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", ys = ms + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", vs = ys + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", xs = vs + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", lh = xs + " " + ah, ph = {
|
|
4328
4329
|
9: ds,
|
|
4329
4330
|
10: ms,
|
|
4330
4331
|
11: ys,
|
|
4331
4332
|
12: vs,
|
|
4332
4333
|
13: xs,
|
|
4333
|
-
14:
|
|
4334
|
+
14: lh
|
|
4334
4335
|
}, gs = {};
|
|
4335
|
-
function
|
|
4336
|
+
function fh(e) {
|
|
4336
4337
|
var t = gs[e] = {
|
|
4337
|
-
binary: Ze(
|
|
4338
|
-
binaryOfStrings: Ze(
|
|
4338
|
+
binary: Ze(uh[e] + " " + pr),
|
|
4339
|
+
binaryOfStrings: Ze(hh[e]),
|
|
4339
4340
|
nonBinary: {
|
|
4340
4341
|
General_Category: Ze(pr),
|
|
4341
|
-
Script: Ze(
|
|
4342
|
+
Script: Ze(ph[e])
|
|
4342
4343
|
}
|
|
4343
4344
|
};
|
|
4344
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;
|
|
4345
4346
|
}
|
|
4346
4347
|
for (var ai = 0, fr = [9, 10, 11, 12, 13, 14]; ai < fr.length; ai += 1) {
|
|
4347
|
-
var
|
|
4348
|
-
|
|
4348
|
+
var dh = fr[ai];
|
|
4349
|
+
fh(dh);
|
|
4349
4350
|
}
|
|
4350
4351
|
var C = J.prototype, Bt = function(t, i) {
|
|
4351
4352
|
this.parent = t, this.base = i || this;
|
|
@@ -4418,13 +4419,13 @@ C.validateRegExpFlags = function(e) {
|
|
|
4418
4419
|
}
|
|
4419
4420
|
this.options.ecmaVersion >= 15 && r && n && this.raise(e.start, "Invalid regular expression flag");
|
|
4420
4421
|
};
|
|
4421
|
-
function
|
|
4422
|
+
function mh(e) {
|
|
4422
4423
|
for (var t in e)
|
|
4423
4424
|
return !0;
|
|
4424
4425
|
return !1;
|
|
4425
4426
|
}
|
|
4426
4427
|
C.validateRegExpPattern = function(e) {
|
|
4427
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
4428
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && mh(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
4428
4429
|
};
|
|
4429
4430
|
C.regexp_pattern = function(e) {
|
|
4430
4431
|
e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = !1, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = /* @__PURE__ */ Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(
|
|
@@ -4626,11 +4627,11 @@ C.regexp_eatCapturingGroup = function(e) {
|
|
|
4626
4627
|
return !1;
|
|
4627
4628
|
};
|
|
4628
4629
|
C.regexp_eatModifiers = function(e) {
|
|
4629
|
-
for (var t = "", i = 0; (i = e.current()) !== -1 &&
|
|
4630
|
+
for (var t = "", i = 0; (i = e.current()) !== -1 && yh(i); )
|
|
4630
4631
|
t += Ve(i), e.advance();
|
|
4631
4632
|
return t;
|
|
4632
4633
|
};
|
|
4633
|
-
function
|
|
4634
|
+
function yh(e) {
|
|
4634
4635
|
return e === 105 || e === 109 || e === 115;
|
|
4635
4636
|
}
|
|
4636
4637
|
C.regexp_eatExtendedAtom = function(e) {
|
|
@@ -4700,16 +4701,16 @@ C.regexp_eatRegExpIdentifierName = function(e) {
|
|
|
4700
4701
|
};
|
|
4701
4702
|
C.regexp_eatRegExpIdentifierStart = function(e) {
|
|
4702
4703
|
var t = e.pos, i = this.options.ecmaVersion >= 11, r = e.current(i);
|
|
4703
|
-
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue),
|
|
4704
|
+
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue), vh(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
4704
4705
|
};
|
|
4705
|
-
function
|
|
4706
|
+
function vh(e) {
|
|
4706
4707
|
return Ee(e, !0) || e === 36 || e === 95;
|
|
4707
4708
|
}
|
|
4708
4709
|
C.regexp_eatRegExpIdentifierPart = function(e) {
|
|
4709
4710
|
var t = e.pos, i = this.options.ecmaVersion >= 11, r = e.current(i);
|
|
4710
|
-
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue),
|
|
4711
|
+
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue), xh(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
4711
4712
|
};
|
|
4712
|
-
function
|
|
4713
|
+
function xh(e) {
|
|
4713
4714
|
return Me(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
4714
4715
|
}
|
|
4715
4716
|
C.regexp_eatAtomEscape = function(e) {
|
|
@@ -4799,13 +4800,13 @@ C.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
4799
4800
|
) && this.regexp_eatHexDigits(e) && e.eat(
|
|
4800
4801
|
125
|
|
4801
4802
|
/* } */
|
|
4802
|
-
) &&
|
|
4803
|
+
) && gh(e.lastIntValue))
|
|
4803
4804
|
return !0;
|
|
4804
4805
|
r && e.raise("Invalid unicode escape"), e.pos = i;
|
|
4805
4806
|
}
|
|
4806
4807
|
return !1;
|
|
4807
4808
|
};
|
|
4808
|
-
function
|
|
4809
|
+
function gh(e) {
|
|
4809
4810
|
return e >= 0 && e <= 1114111;
|
|
4810
4811
|
}
|
|
4811
4812
|
C.regexp_eatIdentityEscape = function(e) {
|
|
@@ -4831,7 +4832,7 @@ C.regexp_eatDecimalEscape = function(e) {
|
|
|
4831
4832
|
var ks = 0, ze = 1, Se = 2;
|
|
4832
4833
|
C.regexp_eatCharacterClassEscape = function(e) {
|
|
4833
4834
|
var t = e.current();
|
|
4834
|
-
if (
|
|
4835
|
+
if (bh(t))
|
|
4835
4836
|
return e.lastIntValue = -1, e.advance(), ze;
|
|
4836
4837
|
var i = !1;
|
|
4837
4838
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((i = t === 80) || t === 112)) {
|
|
@@ -4849,7 +4850,7 @@ C.regexp_eatCharacterClassEscape = function(e) {
|
|
|
4849
4850
|
}
|
|
4850
4851
|
return ks;
|
|
4851
4852
|
};
|
|
4852
|
-
function
|
|
4853
|
+
function bh(e) {
|
|
4853
4854
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
4854
4855
|
}
|
|
4855
4856
|
C.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
@@ -4882,21 +4883,21 @@ C.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
|
4882
4883
|
};
|
|
4883
4884
|
C.regexp_eatUnicodePropertyName = function(e) {
|
|
4884
4885
|
var t = 0;
|
|
4885
|
-
for (e.lastStringValue = "";
|
|
4886
|
+
for (e.lastStringValue = ""; ws(t = e.current()); )
|
|
4886
4887
|
e.lastStringValue += Ve(t), e.advance();
|
|
4887
4888
|
return e.lastStringValue !== "";
|
|
4888
4889
|
};
|
|
4889
|
-
function
|
|
4890
|
+
function ws(e) {
|
|
4890
4891
|
return _s(e) || e === 95;
|
|
4891
4892
|
}
|
|
4892
4893
|
C.regexp_eatUnicodePropertyValue = function(e) {
|
|
4893
4894
|
var t = 0;
|
|
4894
|
-
for (e.lastStringValue = "";
|
|
4895
|
+
for (e.lastStringValue = ""; _h(t = e.current()); )
|
|
4895
4896
|
e.lastStringValue += Ve(t), e.advance();
|
|
4896
4897
|
return e.lastStringValue !== "";
|
|
4897
4898
|
};
|
|
4898
|
-
function
|
|
4899
|
-
return
|
|
4899
|
+
function _h(e) {
|
|
4900
|
+
return ws(e) || Jt(e);
|
|
4900
4901
|
}
|
|
4901
4902
|
C.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
4902
4903
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
@@ -5095,12 +5096,12 @@ C.regexp_eatClassSetCharacter = function(e) {
|
|
|
5095
5096
|
/* b */
|
|
5096
5097
|
) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
|
|
5097
5098
|
var i = e.current();
|
|
5098
|
-
return i < 0 || i === e.lookahead() &&
|
|
5099
|
+
return i < 0 || i === e.lookahead() && kh(i) || wh(i) ? !1 : (e.advance(), e.lastIntValue = i, !0);
|
|
5099
5100
|
};
|
|
5100
|
-
function
|
|
5101
|
+
function kh(e) {
|
|
5101
5102
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
5102
5103
|
}
|
|
5103
|
-
function
|
|
5104
|
+
function wh(e) {
|
|
5104
5105
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
5105
5106
|
}
|
|
5106
5107
|
C.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
@@ -5137,11 +5138,11 @@ function Jt(e) {
|
|
|
5137
5138
|
}
|
|
5138
5139
|
C.regexp_eatHexDigits = function(e) {
|
|
5139
5140
|
var t = e.pos, i = 0;
|
|
5140
|
-
for (e.lastIntValue = 0;
|
|
5141
|
+
for (e.lastIntValue = 0; Ss(i = e.current()); )
|
|
5141
5142
|
e.lastIntValue = 16 * e.lastIntValue + Ts(i), e.advance();
|
|
5142
5143
|
return e.pos !== t;
|
|
5143
5144
|
};
|
|
5144
|
-
function
|
|
5145
|
+
function Ss(e) {
|
|
5145
5146
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
5146
5147
|
}
|
|
5147
5148
|
function Ts(e) {
|
|
@@ -5171,7 +5172,7 @@ C.regexp_eatFixedHexDigits = function(e, t) {
|
|
|
5171
5172
|
e.lastIntValue = 0;
|
|
5172
5173
|
for (var r = 0; r < t; ++r) {
|
|
5173
5174
|
var n = e.current();
|
|
5174
|
-
if (!
|
|
5175
|
+
if (!Ss(n))
|
|
5175
5176
|
return e.pos = i, !1;
|
|
5176
5177
|
e.lastIntValue = 16 * e.lastIntValue + Ts(n), e.advance();
|
|
5177
5178
|
}
|
|
@@ -5270,7 +5271,7 @@ j.skipSpace = function() {
|
|
|
5270
5271
|
}
|
|
5271
5272
|
break;
|
|
5272
5273
|
default:
|
|
5273
|
-
if (e > 8 && e < 14 || e >= 5760 &&
|
|
5274
|
+
if (e > 8 && e < 14 || e >= 5760 && Si.test(String.fromCharCode(e)))
|
|
5274
5275
|
++this.pos;
|
|
5275
5276
|
else
|
|
5276
5277
|
break e;
|
|
@@ -5474,18 +5475,18 @@ j.readRegexp = function() {
|
|
|
5474
5475
|
};
|
|
5475
5476
|
j.readInt = function(e, t, i) {
|
|
5476
5477
|
for (var r = this.options.ecmaVersion >= 12 && t === void 0, n = i && this.input.charCodeAt(this.pos) === 48, u = this.pos, h = 0, d = 0, y = 0, o = t ?? 1 / 0; y < o; ++y, ++this.pos) {
|
|
5477
|
-
var
|
|
5478
|
-
if (r &&
|
|
5479
|
-
n && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), d === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), y === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), d =
|
|
5478
|
+
var w = this.input.charCodeAt(this.pos), S = void 0;
|
|
5479
|
+
if (r && w === 95) {
|
|
5480
|
+
n && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), d === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), y === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), d = w;
|
|
5480
5481
|
continue;
|
|
5481
5482
|
}
|
|
5482
|
-
if (
|
|
5483
|
+
if (w >= 97 ? S = w - 97 + 10 : w >= 65 ? S = w - 65 + 10 : w >= 48 && w <= 57 ? S = w - 48 : S = 1 / 0, S >= e)
|
|
5483
5484
|
break;
|
|
5484
|
-
d =
|
|
5485
|
+
d = w, h = h * e + S;
|
|
5485
5486
|
}
|
|
5486
5487
|
return r && d === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === u || t != null && this.pos - u !== t ? null : h;
|
|
5487
5488
|
};
|
|
5488
|
-
function
|
|
5489
|
+
function Th(e, t) {
|
|
5489
5490
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
5490
5491
|
}
|
|
5491
5492
|
function Cs(e) {
|
|
@@ -5508,7 +5509,7 @@ j.readNumber = function(e) {
|
|
|
5508
5509
|
return ++this.pos, Ee(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(l.num, n);
|
|
5509
5510
|
}
|
|
5510
5511
|
i && /[89]/.test(this.input.slice(t, this.pos)) && (i = !1), r === 46 && !i && (++this.pos, this.readInt(10), r = this.input.charCodeAt(this.pos)), (r === 69 || r === 101) && !i && (r = this.input.charCodeAt(++this.pos), (r === 43 || r === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), Ee(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
5511
|
-
var u =
|
|
5512
|
+
var u = Th(this.input.slice(t, this.pos), i);
|
|
5512
5513
|
return this.finishToken(l.num, u);
|
|
5513
5514
|
};
|
|
5514
5515
|
j.readCodePoint = function() {
|
|
@@ -5689,7 +5690,7 @@ J.acorn = {
|
|
|
5689
5690
|
Position: ot,
|
|
5690
5691
|
SourceLocation: kt,
|
|
5691
5692
|
getLineInfo: Ti,
|
|
5692
|
-
Node:
|
|
5693
|
+
Node: St,
|
|
5693
5694
|
TokenType: z,
|
|
5694
5695
|
tokTypes: l,
|
|
5695
5696
|
keywordTypes: at,
|
|
@@ -5701,20 +5702,20 @@ J.acorn = {
|
|
|
5701
5702
|
isNewLine: Ye,
|
|
5702
5703
|
lineBreak: ce,
|
|
5703
5704
|
lineBreakG: Jr,
|
|
5704
|
-
nonASCIIwhitespace:
|
|
5705
|
+
nonASCIIwhitespace: Si
|
|
5705
5706
|
};
|
|
5706
|
-
function
|
|
5707
|
+
function Ph(e, t) {
|
|
5707
5708
|
return J.parse(e, t);
|
|
5708
5709
|
}
|
|
5709
|
-
function
|
|
5710
|
+
function Ch(e, t, i) {
|
|
5710
5711
|
return J.parseExpressionAt(e, t, i);
|
|
5711
5712
|
}
|
|
5712
|
-
function
|
|
5713
|
+
function Ah(e, t) {
|
|
5713
5714
|
return J.tokenizer(e, t);
|
|
5714
5715
|
}
|
|
5715
|
-
const
|
|
5716
|
+
const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5716
5717
|
__proto__: null,
|
|
5717
|
-
Node:
|
|
5718
|
+
Node: St,
|
|
5718
5719
|
Parser: J,
|
|
5719
5720
|
Position: ot,
|
|
5720
5721
|
SourceLocation: kt,
|
|
@@ -5729,12 +5730,12 @@ const Ah = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5729
5730
|
keywordTypes: at,
|
|
5730
5731
|
lineBreak: ce,
|
|
5731
5732
|
lineBreakG: Jr,
|
|
5732
|
-
nonASCIIwhitespace:
|
|
5733
|
-
parse:
|
|
5734
|
-
parseExpressionAt:
|
|
5733
|
+
nonASCIIwhitespace: Si,
|
|
5734
|
+
parse: Ph,
|
|
5735
|
+
parseExpressionAt: Ch,
|
|
5735
5736
|
tokContexts: H,
|
|
5736
5737
|
tokTypes: l,
|
|
5737
|
-
tokenizer:
|
|
5738
|
+
tokenizer: Ah,
|
|
5738
5739
|
version: Es
|
|
5739
5740
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5740
5741
|
function dr(e, t) {
|
|
@@ -5798,9 +5799,9 @@ var ve = !0;
|
|
|
5798
5799
|
function xe(e, t) {
|
|
5799
5800
|
return t === void 0 && (t = {}), new z("name", t);
|
|
5800
5801
|
}
|
|
5801
|
-
var
|
|
5802
|
-
function
|
|
5803
|
-
var t =
|
|
5802
|
+
var Ih = /* @__PURE__ */ new WeakMap();
|
|
5803
|
+
function Nh(e) {
|
|
5804
|
+
var t = Ih.get(e.Parser.acorn || e);
|
|
5804
5805
|
if (!t) {
|
|
5805
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("|") + ")$");
|
|
5806
5807
|
r.jsxTagStart.updateContext = function() {
|
|
@@ -5824,10 +5825,10 @@ function Ih(e) {
|
|
|
5824
5825
|
}
|
|
5825
5826
|
return t;
|
|
5826
5827
|
}
|
|
5827
|
-
var yt = 1024,
|
|
5828
|
+
var yt = 1024, Lh = new RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y"), vr = new RegExp("(?=(" + Lh.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"), vt = function() {
|
|
5828
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;
|
|
5829
5830
|
};
|
|
5830
|
-
function
|
|
5831
|
+
function Oh(e, t) {
|
|
5831
5832
|
var i = t.key.name, r = e[i], n = "true";
|
|
5832
5833
|
return t.type !== "MethodDefinition" || t.kind !== "get" && t.kind !== "set" || (n = (t.static ? "s" : "i") + t.kind), r === "iget" && n === "iset" || r === "iset" && n === "iget" || r === "sget" && n === "sset" || r === "sset" && n === "sget" ? (e[i] = "true", !1) : !!r || (e[i] = n, !1);
|
|
5833
5834
|
}
|
|
@@ -5872,7 +5873,7 @@ var N = { AbstractMethodHasImplementation: function(e) {
|
|
|
5872
5873
|
return "Single type parameter " + t + " should have a trailing comma. Example usage: <" + t + ",>.";
|
|
5873
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) {
|
|
5874
5875
|
return "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + e.type + ".";
|
|
5875
|
-
}, LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
|
|
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+$/;
|
|
5876
5877
|
function gt(e) {
|
|
5877
5878
|
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ? gt(e.object) + "." + gt(e.property) : void 0);
|
|
5878
5879
|
}
|
|
@@ -5880,16 +5881,16 @@ var oi = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
|
5880
5881
|
function gr(e) {
|
|
5881
5882
|
if (!e) throw new Error("Assert fail");
|
|
5882
5883
|
}
|
|
5883
|
-
function
|
|
5884
|
+
function Vh(e) {
|
|
5884
5885
|
return e === "accessor";
|
|
5885
5886
|
}
|
|
5886
|
-
function
|
|
5887
|
+
function zh(e) {
|
|
5887
5888
|
return e === "in" || e === "out";
|
|
5888
5889
|
}
|
|
5889
5890
|
function ui(e, t) {
|
|
5890
5891
|
return 2 | (e ? 4 : 0) | (t ? 8 : 0);
|
|
5891
5892
|
}
|
|
5892
|
-
function
|
|
5893
|
+
function jh(e) {
|
|
5893
5894
|
if (e.type !== "MemberExpression") return !1;
|
|
5894
5895
|
var t = e.property;
|
|
5895
5896
|
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) && Is(e.object);
|
|
@@ -5900,15 +5901,15 @@ function Is(e) {
|
|
|
5900
5901
|
function br(e) {
|
|
5901
5902
|
return e === "private" || e === "public" || e === "protected";
|
|
5902
5903
|
}
|
|
5903
|
-
function
|
|
5904
|
+
function Fh(e) {
|
|
5904
5905
|
var t = {}, i = t.dts, r = i !== void 0 && i, n = t.allowSatisfies, u = n !== void 0 && n;
|
|
5905
5906
|
return function(h) {
|
|
5906
|
-
var d = h.acorn ||
|
|
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, ft = y.keywordsRegExp, Ae = y.tokenIsLiteralPropertyName, _e = y.tokenIsTemplate, Ke = y.tokenIsTSDeclarationStart, q = y.tokenIsIdentifier, Ct = y.tokenIsKeywordOrIdentifier, Ls = y.tokenIsTSTypeOperator;
|
|
5907
5908
|
function Os(P, pe, oe) {
|
|
5908
5909
|
oe === void 0 && (oe = P.length);
|
|
5909
5910
|
for (var te = pe; te < oe; te++) {
|
|
5910
5911
|
var B = P.charCodeAt(te);
|
|
5911
|
-
if (
|
|
5912
|
+
if (F(B)) return te < oe - 1 && B === 13 && P.charCodeAt(te + 1) === 10 ? te + 2 : te + 1;
|
|
5912
5913
|
}
|
|
5913
5914
|
return -1;
|
|
5914
5915
|
}
|
|
@@ -5996,7 +5997,7 @@ function jh(e) {
|
|
|
5996
5997
|
T !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
|
|
5997
5998
|
for (var L = ++this.pos; this.pos < this.input.length && _++ < 10; ) {
|
|
5998
5999
|
if ((T = this.input[this.pos++]) === ";") {
|
|
5999
|
-
g[0] === "#" ? g[1] === "x" ? (g = g.substr(2),
|
|
6000
|
+
g[0] === "#" ? g[1] === "x" ? (g = g.substr(2), Dh.test(g) && (x = String.fromCharCode(parseInt(g, 16)))) : (g = g.substr(1), Mh.test(g) && (x = String.fromCharCode(parseInt(g, 10)))) : x = Rh[g];
|
|
6000
6001
|
break;
|
|
6001
6002
|
}
|
|
6002
6003
|
g += T;
|
|
@@ -6131,7 +6132,7 @@ function jh(e) {
|
|
|
6131
6132
|
var a = this.curContext();
|
|
6132
6133
|
if (a === se.tc_expr) return this.jsx_readToken();
|
|
6133
6134
|
if (a === se.tc_oTag || a === se.tc_cTag) {
|
|
6134
|
-
if (
|
|
6135
|
+
if (S(s)) return this.jsx_readWord();
|
|
6135
6136
|
if (s == 62) return ++this.pos, this.finishToken(D.jsxTagEnd);
|
|
6136
6137
|
if ((s === 34 || s === 39) && a == se.tc_oTag) return this.jsx_readString(s);
|
|
6137
6138
|
}
|
|
@@ -6250,7 +6251,7 @@ function jh(e) {
|
|
|
6250
6251
|
return this.setLookaheadState(a), p;
|
|
6251
6252
|
}, f.readWord = function() {
|
|
6252
6253
|
var s = this.readWord1(), a = o.name;
|
|
6253
|
-
return this.keywords.test(s) ? a =
|
|
6254
|
+
return this.keywords.test(s) ? a = w[s] : new RegExp(ft).test(s) && (a = D[s]), this.finishToken(a, s);
|
|
6254
6255
|
}, f.skipBlockComment = function() {
|
|
6255
6256
|
var s;
|
|
6256
6257
|
this.isLookahead || (s = this.options.onComment && this.curPosition());
|
|
@@ -6260,7 +6261,7 @@ function jh(e) {
|
|
|
6260
6261
|
}, f.skipLineComment = function(s) {
|
|
6261
6262
|
var a, c = this.pos;
|
|
6262
6263
|
this.isLookahead || (a = this.options.onComment && this.curPosition());
|
|
6263
|
-
for (var p = this.input.charCodeAt(this.pos += s); this.pos < this.input.length &&
|
|
6264
|
+
for (var p = this.input.charCodeAt(this.pos += s); this.pos < this.input.length && !F(p); ) p = this.input.charCodeAt(++this.pos);
|
|
6264
6265
|
this.isLookahead || this.options.onComment && this.options.onComment(!1, this.input.slice(c + s, this.pos), c, this.pos, a, this.curPosition());
|
|
6265
6266
|
}, f.finishToken = function(s, a) {
|
|
6266
6267
|
this.preValue = this.value, this.preToken = this.type, this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
@@ -6278,7 +6279,7 @@ function jh(e) {
|
|
|
6278
6279
|
p ? m[a] = c : Object.defineProperty(m, a, { enumerable: p, value: c });
|
|
6279
6280
|
}
|
|
6280
6281
|
}, f.isLiteralPropertyName = function() {
|
|
6281
|
-
return
|
|
6282
|
+
return Ae(this.type);
|
|
6282
6283
|
}, f.hasPrecedingLineBreak = function() {
|
|
6283
6284
|
return A.test(this.input.slice(this.lastTokEndLoc.index, this.start));
|
|
6284
6285
|
}, f.createIdentifier = function(s, a) {
|
|
@@ -6769,7 +6770,7 @@ function jh(e) {
|
|
|
6769
6770
|
}; ; ) {
|
|
6770
6771
|
var V = this.startLoc, E = this.tsParseModifier(p.concat(m ?? []), v);
|
|
6771
6772
|
if (!E) break;
|
|
6772
|
-
br(E) ? c.accessibility ? this.raise(this.start, N.DuplicateAccessibilityModifier()) : (T(V, E, E, "override"), T(V, E, E, "static"), T(V, E, E, "readonly"), T(V, E, E, "accessor"), _.accessibility = E, c.accessibility = E) :
|
|
6773
|
+
br(E) ? c.accessibility ? this.raise(this.start, N.DuplicateAccessibilityModifier()) : (T(V, E, E, "override"), T(V, E, E, "static"), T(V, E, E, "readonly"), T(V, E, E, "accessor"), _.accessibility = E, c.accessibility = E) : zh(E) ? c[E] ? this.raise(this.start, N.DuplicateModifier({ modifier: E })) : (T(V, E, "in", "out"), _[E] = E, c[E] = !0) : Vh(E) ? c[E] ? this.raise(this.start, N.DuplicateModifier({ modifier: E })) : (L(V, E, "accessor", "readonly"), L(V, E, "accessor", "static"), L(V, E, "accessor", "override"), _[E] = E, c[E] = !0) : Object.hasOwnProperty.call(c, E) ? this.raise(this.start, N.DuplicateModifier({ modifier: E })) : (T(V, E, "static", "readonly"), T(V, E, "static", "override"), T(V, E, "override", "readonly"), T(V, E, "abstract", "override"), L(V, E, "declare", "override"), L(V, E, "static", "abstract"), _[E] = E, c[E] = !0), m != null && m.includes(E) && this.raise(this.start, g);
|
|
6773
6774
|
}
|
|
6774
6775
|
return _;
|
|
6775
6776
|
}, f.tsParseInOutModifiers = function(s) {
|
|
@@ -7114,7 +7115,7 @@ function jh(e) {
|
|
|
7114
7115
|
if (!p) return m;
|
|
7115
7116
|
for (var v, x = yr(m.declarations); !(v = x()).done; ) {
|
|
7116
7117
|
var g = v.value, _ = g.init;
|
|
7117
|
-
_ && (a !== "const" || g.id.typeAnnotation ? this.raise(_.start, N.InitializerNotAllowedInAmbientContext) : _.type !== "StringLiteral" && _.type !== "BooleanLiteral" && _.type !== "NumericLiteral" && _.type !== "BigIntLiteral" && (_.type !== "TemplateLiteral" || _.expressions.length > 0) && !
|
|
7118
|
+
_ && (a !== "const" || g.id.typeAnnotation ? this.raise(_.start, N.InitializerNotAllowedInAmbientContext) : _.type !== "StringLiteral" && _.type !== "BooleanLiteral" && _.type !== "NumericLiteral" && _.type !== "BigIntLiteral" && (_.type !== "TemplateLiteral" || _.expressions.length > 0) && !jh(_) && this.raise(_.start, N.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference));
|
|
7118
7119
|
}
|
|
7119
7120
|
return m;
|
|
7120
7121
|
}, f.parseStatement = function(s, a, c) {
|
|
@@ -7259,11 +7260,11 @@ function jh(e) {
|
|
|
7259
7260
|
}
|
|
7260
7261
|
if (!((p = V) != null && p.error || this.tsMatchLeftRelational())) return this.parseMaybeAssignOrigin(s, a, c);
|
|
7261
7262
|
L && !this.compareLookaheadState(L, this.getCurLookaheadState()) || (L = this.cloneCurLookaheadState());
|
|
7262
|
-
var ye = this.tryParse(function(
|
|
7263
|
+
var ye = this.tryParse(function($e) {
|
|
7263
7264
|
var dt, mt;
|
|
7264
7265
|
K = G.tsParseTypeParameters();
|
|
7265
7266
|
var Be = G.parseMaybeAssignOrigin(s, a, c);
|
|
7266
|
-
return (Be.type !== "ArrowFunctionExpression" || (dt = Be.extra) != null && dt.parenthesized) &&
|
|
7267
|
+
return (Be.type !== "ArrowFunctionExpression" || (dt = Be.extra) != null && dt.parenthesized) && $e(), ((mt = K) == null ? void 0 : mt.params.length) !== 0 && G.resetStartLocationFromNode(Be, K), Be.typeParameters = K, Be;
|
|
7267
7268
|
}, L);
|
|
7268
7269
|
if (!ye.error && !ye.aborted) return K && this.reportReservedArrowTypeParam(K), ye.node;
|
|
7269
7270
|
if (!V && (gr(!0), !(E = this.tryParse(function() {
|
|
@@ -7413,8 +7414,8 @@ function jh(e) {
|
|
|
7413
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];
|
|
7414
7415
|
} else c = this.parseParenExpression();
|
|
7415
7416
|
if (this.options.preserveParens) {
|
|
7416
|
-
var
|
|
7417
|
-
return
|
|
7417
|
+
var $e = this.startNodeAt(p, m);
|
|
7418
|
+
return $e.expression = c, this.finishNode($e, "ParenthesizedExpression");
|
|
7418
7419
|
}
|
|
7419
7420
|
return c;
|
|
7420
7421
|
}, f.parseTaggedTemplateExpression = function(s, a, c, p) {
|
|
@@ -7460,7 +7461,7 @@ function jh(e) {
|
|
|
7460
7461
|
var Et = g.tsParseTypeArgumentsInExpression();
|
|
7461
7462
|
if (!Et) return s;
|
|
7462
7463
|
if (L && !g.match(o.parenL)) return V = g.curPosition(), s;
|
|
7463
|
-
if (
|
|
7464
|
+
if (_e(g.type) || g.type === o.backQuote) {
|
|
7464
7465
|
var Mi = g.parseTaggedTemplateExpression(s, a, c, _);
|
|
7465
7466
|
return Mi.typeParameters = Et, Mi;
|
|
7466
7467
|
}
|
|
@@ -7485,12 +7486,12 @@ function jh(e) {
|
|
|
7485
7486
|
} else if (!p && this.eat(o.parenL)) {
|
|
7486
7487
|
var ye = this.maybeInArrowParameters;
|
|
7487
7488
|
this.maybeInArrowParameters = !0;
|
|
7488
|
-
var
|
|
7489
|
+
var $e = new vt(), dt = this.yieldPos, mt = this.awaitPos, Be = this.awaitIdentPos;
|
|
7489
7490
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
7490
|
-
var Ri = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1,
|
|
7491
|
-
if (m && !G && this.shouldParseAsyncArrow()) this.checkPatternErrors(
|
|
7491
|
+
var Ri = 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 = dt, this.awaitPos = mt, this.awaitIdentPos = Be, s = this.parseSubscriptAsyncArrow(a, c, Ri, x);
|
|
7492
7493
|
else {
|
|
7493
|
-
this.checkExpressionErrors(
|
|
7494
|
+
this.checkExpressionErrors($e, !0), this.yieldPos = dt || this.yieldPos, this.awaitPos = mt || this.awaitPos, this.awaitIdentPos = Be || this.awaitIdentPos;
|
|
7494
7495
|
var At = this.startNodeAt(a, c);
|
|
7495
7496
|
At.callee = s, At.arguments = Ri, K && (At.optional = G), s = this.finishNode(At, "CallExpression");
|
|
7496
7497
|
}
|
|
@@ -7531,7 +7532,7 @@ function jh(e) {
|
|
|
7531
7532
|
for (this.expect(o.braceL); this.type !== o.braceR; ) if (this.match(D.at)) g.push(this.parseDecorator());
|
|
7532
7533
|
else {
|
|
7533
7534
|
var _ = this.parseClassElement(s.superClass !== null);
|
|
7534
|
-
g.length && (_.decorators = g, this.resetStartLocationFromNode(_, g[0]), g = []), _ && (v.body.push(_), _.type === "MethodDefinition" && _.kind === "constructor" && _.value.type === "FunctionExpression" ? (x && this.raiseRecoverable(_.start, "Duplicate constructor in the same class"), x = !0, _.decorators && _.decorators.length > 0 && this.raise(_.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : _.key && _.key.type === "PrivateIdentifier" &&
|
|
7535
|
+
g.length && (_.decorators = g, this.resetStartLocationFromNode(_, g[0]), g = []), _ && (v.body.push(_), _.type === "MethodDefinition" && _.kind === "constructor" && _.value.type === "FunctionExpression" ? (x && this.raiseRecoverable(_.start, "Duplicate constructor in the same class"), x = !0, _.decorators && _.decorators.length > 0 && this.raise(_.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : _.key && _.key.type === "PrivateIdentifier" && Oh(m, _) && this.raiseRecoverable(_.key.start, "Identifier '#" + _.key.name + "' has already been declared"));
|
|
7535
7536
|
}
|
|
7536
7537
|
return this.strict = p, this.next(), g.length && this.raise(this.start, "Decorators must be attached to a class element."), s.body = this.finishNode(v, "ClassBody"), this.exitClassBody(), this.finishNode(s, a ? "ClassDeclaration" : "ClassExpression");
|
|
7537
7538
|
} finally {
|
|
@@ -7649,9 +7650,28 @@ function jh(e) {
|
|
|
7649
7650
|
return Rs;
|
|
7650
7651
|
};
|
|
7651
7652
|
}
|
|
7652
|
-
const $h =
|
|
7653
|
+
const $h = Vs(zs);
|
|
7654
|
+
async function Bh(e) {
|
|
7655
|
+
let t;
|
|
7656
|
+
try {
|
|
7657
|
+
t = await ge.readdir(e, { withFileTypes: !0 });
|
|
7658
|
+
} catch (i) {
|
|
7659
|
+
if (i.code === "ENOENT") return;
|
|
7660
|
+
throw i;
|
|
7661
|
+
}
|
|
7662
|
+
await Promise.all(
|
|
7663
|
+
t.map(async (i) => {
|
|
7664
|
+
const r = Ms.join(e, i.name);
|
|
7665
|
+
try {
|
|
7666
|
+
await ge.rm(r, { recursive: !0, force: !0 });
|
|
7667
|
+
} catch (n) {
|
|
7668
|
+
if (n.code !== "ENOENT") throw n;
|
|
7669
|
+
}
|
|
7670
|
+
})
|
|
7671
|
+
);
|
|
7672
|
+
}
|
|
7653
7673
|
function Ni(e) {
|
|
7654
|
-
const i = J.extend(
|
|
7674
|
+
const i = J.extend(Fh()).parse(e, {
|
|
7655
7675
|
ecmaVersion: "latest",
|
|
7656
7676
|
sourceType: "module",
|
|
7657
7677
|
locations: !0
|
|
@@ -7664,14 +7684,14 @@ function Ni(e) {
|
|
|
7664
7684
|
d && d !== "constructor" && u.accessibility !== "private" && r.push(d);
|
|
7665
7685
|
}), r;
|
|
7666
7686
|
}
|
|
7667
|
-
async function
|
|
7687
|
+
async function Te(e, t, i = [], r) {
|
|
7668
7688
|
const n = `${t} ${i.join(" ")}`;
|
|
7669
7689
|
e !== void 0 && re(`${e} - exec(${n})`);
|
|
7670
7690
|
const { stdout: u, stderr: h } = await $h(n);
|
|
7671
|
-
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());
|
|
7672
7692
|
}
|
|
7673
|
-
async function
|
|
7674
|
-
return
|
|
7693
|
+
async function Zh(e, t) {
|
|
7694
|
+
return ge.readdir(e, t);
|
|
7675
7695
|
}
|
|
7676
7696
|
async function Li() {
|
|
7677
7697
|
re("Load environment variables"), (await import("dotenv")).config();
|
|
@@ -7681,7 +7701,7 @@ function Re(e) {
|
|
|
7681
7701
|
console.info(`
|
|
7682
7702
|
${t}${r}`), console.info(`▶️ ${e}`), console.info(`${r}${i}`);
|
|
7683
7703
|
}
|
|
7684
|
-
function
|
|
7704
|
+
function Fe(e) {
|
|
7685
7705
|
console.info(`
|
|
7686
7706
|
✅ ${e}
|
|
7687
7707
|
`);
|
|
@@ -7692,30 +7712,30 @@ ${e}
|
|
|
7692
7712
|
`);
|
|
7693
7713
|
}
|
|
7694
7714
|
async function de(e) {
|
|
7695
|
-
return JSON.parse(await
|
|
7715
|
+
return JSON.parse(await ge.readFile(e, "utf8"));
|
|
7696
7716
|
}
|
|
7697
7717
|
async function Pt(e) {
|
|
7698
|
-
return await
|
|
7718
|
+
return await ge.readFile(e, "utf8");
|
|
7699
7719
|
}
|
|
7700
|
-
async function
|
|
7720
|
+
async function Uh(e) {
|
|
7701
7721
|
try {
|
|
7702
|
-
await
|
|
7722
|
+
await ge.unlink(e);
|
|
7703
7723
|
} catch (t) {
|
|
7704
7724
|
if (t.code !== "ENOENT") throw t;
|
|
7705
7725
|
}
|
|
7706
7726
|
}
|
|
7707
7727
|
async function Ie(e, t, i = [], r = !1) {
|
|
7708
7728
|
return re(`${e} - spawn(${t} ${i.join(" ")})`), new Promise((n, u) => {
|
|
7709
|
-
|
|
7729
|
+
js(t, i, { stdio: "inherit" }).on("close", (d) => {
|
|
7710
7730
|
d === 0 || r ? n() : u(new Error(`${t} exited with code ${d}`));
|
|
7711
7731
|
});
|
|
7712
7732
|
});
|
|
7713
7733
|
}
|
|
7714
7734
|
async function ut(e, t) {
|
|
7715
|
-
await
|
|
7735
|
+
await ge.writeFile(e, JSON.stringify(t, void 0, 4), "utf8");
|
|
7716
7736
|
}
|
|
7717
7737
|
async function Oi(e, t) {
|
|
7718
|
-
await
|
|
7738
|
+
await ge.writeFile(e, t, "utf8");
|
|
7719
7739
|
}
|
|
7720
7740
|
function yi(e, t) {
|
|
7721
7741
|
t(e);
|
|
@@ -7730,7 +7750,7 @@ function yi(e, t) {
|
|
|
7730
7750
|
else n && typeof n == "object" && typeof n.type == "string" && yi(n, t);
|
|
7731
7751
|
}
|
|
7732
7752
|
}
|
|
7733
|
-
async function
|
|
7753
|
+
async function qh() {
|
|
7734
7754
|
const e = await de("config.json"), t = {
|
|
7735
7755
|
body: JSON.stringify(e),
|
|
7736
7756
|
headers: { "Content-Type": "application/json" },
|
|
@@ -7749,17 +7769,17 @@ async function _r(e) {
|
|
|
7749
7769
|
async function kr(e, t) {
|
|
7750
7770
|
const i = `v${e.version}`;
|
|
7751
7771
|
async function r(n, u = "") {
|
|
7752
|
-
const h = await
|
|
7772
|
+
const h = await Zh(n, { withFileTypes: !0 });
|
|
7753
7773
|
for (const d of h) {
|
|
7754
7774
|
const y = `${n}/${d.name}`, o = u ? `${u}/${d.name}` : d.name;
|
|
7755
7775
|
if (d.isDirectory()) continue;
|
|
7756
|
-
const
|
|
7757
|
-
console.info(`⚙️ Uploading '${o}' → '${
|
|
7776
|
+
const w = `${t}_${i}/${o}`.replaceAll("\\", "/"), S = d.name.endsWith(".css") ? "text/css" : "application/octet-stream", A = d.name.endsWith(".js") ? "application/javascript" : S;
|
|
7777
|
+
console.info(`⚙️ Uploading '${o}' → '${w}'...`), await Te(void 0, `wrangler r2 object put "${w}" --file="${y}" --content-type ${A} --jurisdiction=eu --remote`);
|
|
7758
7778
|
}
|
|
7759
7779
|
}
|
|
7760
7780
|
await r("dist");
|
|
7761
7781
|
}
|
|
7762
|
-
const
|
|
7782
|
+
const Hh = [
|
|
7763
7783
|
{ idPrefix: "datapos-app-nuxt", typeId: "app", publish: !1, uploadGroupName: void 0 },
|
|
7764
7784
|
{ idPrefix: "datapos-api", typeId: "api", publish: !1, uploadGroupName: void 0 },
|
|
7765
7785
|
{ idPrefix: "datapos-connector", typeId: "connector", publish: !0, uploadGroupName: "connectors" },
|
|
@@ -7771,35 +7791,35 @@ const Uh = [
|
|
|
7771
7791
|
{ idPrefix: "datapos-shared", typeId: "shared", publish: !0, uploadGroupName: void 0 },
|
|
7772
7792
|
{ idPrefix: "datapos-tool", typeId: "tool", publish: !0, uploadGroupName: "tools" }
|
|
7773
7793
|
];
|
|
7774
|
-
async function
|
|
7794
|
+
async function fl() {
|
|
7775
7795
|
try {
|
|
7776
|
-
Re("Build Project"), await Ie("1️⃣ Bundle project", "vite", ["build"]),
|
|
7796
|
+
Re("Build Project"), await Ie("1️⃣ Bundle project", "vite", ["build"]), Fe("Project built.");
|
|
7777
7797
|
} catch (e) {
|
|
7778
7798
|
console.error("❌ Error building project.", e), process.exit(1);
|
|
7779
7799
|
}
|
|
7780
7800
|
}
|
|
7781
|
-
async function
|
|
7801
|
+
async function dl() {
|
|
7782
7802
|
try {
|
|
7783
7803
|
Re("Release Project"), await Li();
|
|
7784
7804
|
const e = await de("package.json"), t = await de("config.json");
|
|
7785
7805
|
await Ns("1️⃣", e);
|
|
7786
|
-
const i =
|
|
7806
|
+
const i = Hh.find((r) => t.id.startsWith(r.idPrefix));
|
|
7787
7807
|
if (!i) throw new Error(`Failed to locate module type configuration for identifier '${t.id}'.`);
|
|
7788
|
-
switch (
|
|
7808
|
+
switch (i.typeId) {
|
|
7789
7809
|
case "connector":
|
|
7790
|
-
await
|
|
7810
|
+
await Wh("2️⃣", e);
|
|
7791
7811
|
break;
|
|
7792
7812
|
case "context":
|
|
7793
|
-
await
|
|
7813
|
+
await Kh("2️⃣", e);
|
|
7794
7814
|
break;
|
|
7795
7815
|
case "presenter":
|
|
7796
|
-
await
|
|
7816
|
+
await Xh("2️⃣", e);
|
|
7797
7817
|
break;
|
|
7798
7818
|
default:
|
|
7799
|
-
await
|
|
7819
|
+
await Gh("2️⃣", e);
|
|
7800
7820
|
}
|
|
7801
|
-
if (await Ie("3️⃣ Bundle project", "vite", ["build"]), await
|
|
7802
|
-
re("7️⃣ Register module"), await
|
|
7821
|
+
if (await Ie("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")
|
|
7822
|
+
re("7️⃣ Register module"), await qh();
|
|
7803
7823
|
else if (i.typeId === "engine")
|
|
7804
7824
|
re("7️⃣ Register module"), await _r(t), await kr(e, `datapos-engine-eu/${i.uploadGroupName}`);
|
|
7805
7825
|
else if (i.uploadGroupName === void 0)
|
|
@@ -7815,25 +7835,25 @@ async function ll() {
|
|
|
7815
7835
|
await Oi(r, `registry=https://registry.npmjs.org/
|
|
7816
7836
|
//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Ie("8️⃣ Publish to npm", "npm", ["publish", "--access", "public"]);
|
|
7817
7837
|
} finally {
|
|
7818
|
-
await
|
|
7838
|
+
await Uh(r);
|
|
7819
7839
|
}
|
|
7820
7840
|
} else
|
|
7821
7841
|
re(`8️⃣ Publishing NOT required for package with type identifier of '${i.typeId}'.`);
|
|
7822
|
-
|
|
7842
|
+
Fe(`Project version '${e.version}' released.`);
|
|
7823
7843
|
} catch (e) {
|
|
7824
7844
|
console.error("❌ Error releasing project.", e), process.exit(1);
|
|
7825
7845
|
}
|
|
7826
7846
|
}
|
|
7827
|
-
async function
|
|
7847
|
+
async function ml() {
|
|
7828
7848
|
try {
|
|
7829
7849
|
Re("Synchronise Project with GitHub");
|
|
7830
7850
|
const e = await de("package.json");
|
|
7831
|
-
re("Bump project version"), await Ns("1️⃣", e), await
|
|
7851
|
+
re("Bump project version"), await Ns("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"]), Fe(`Project version '${e.version}' synchronised with GitHub.`);
|
|
7832
7852
|
} catch (e) {
|
|
7833
7853
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
7834
7854
|
}
|
|
7835
7855
|
}
|
|
7836
|
-
function
|
|
7856
|
+
function yl() {
|
|
7837
7857
|
try {
|
|
7838
7858
|
Re("Test Project"), console.log(`
|
|
7839
7859
|
❌ Test project is not implemented. No 'vitest' command.
|
|
@@ -7842,24 +7862,24 @@ function fl() {
|
|
|
7842
7862
|
console.error("❌ Error testing project.", e), process.exit(1);
|
|
7843
7863
|
}
|
|
7844
7864
|
}
|
|
7845
|
-
async function
|
|
7865
|
+
async function Gh(e, t) {
|
|
7846
7866
|
re(`${e} Build project configuration`);
|
|
7847
7867
|
const i = await de("config.json");
|
|
7848
7868
|
t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), await ut("config.json", i);
|
|
7849
7869
|
}
|
|
7850
|
-
async function
|
|
7870
|
+
async function Wh(e, t) {
|
|
7851
7871
|
re(`${e} Build connector project configuration`);
|
|
7852
|
-
const [i, r] = await Promise.all([de("config.json"), Pt("src/index.ts")]), n =
|
|
7872
|
+
const [i, r] = await Promise.all([de("config.json"), Pt("src/index.ts")]), n = kc.safeParse(i);
|
|
7853
7873
|
if (!n.success) {
|
|
7854
7874
|
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7855
7875
|
return;
|
|
7856
7876
|
}
|
|
7857
|
-
const u = Ni(r), h =
|
|
7877
|
+
const u = Ni(r), h = Jh(u);
|
|
7858
7878
|
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 ut("config.json", i);
|
|
7859
7879
|
}
|
|
7860
|
-
async function
|
|
7880
|
+
async function Kh(e, t) {
|
|
7861
7881
|
re(`${e} Build context project configuration`);
|
|
7862
|
-
const [i, r] = await Promise.all([de("config.json"), Pt("src/index.ts")]), n =
|
|
7882
|
+
const [i, r] = await Promise.all([de("config.json"), Pt("src/index.ts")]), n = Lc.safeParse(i);
|
|
7863
7883
|
if (!n.success) {
|
|
7864
7884
|
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7865
7885
|
return;
|
|
@@ -7867,9 +7887,9 @@ async function Gh(e, t) {
|
|
|
7867
7887
|
const u = Ni(r);
|
|
7868
7888
|
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 ut("config.json", i);
|
|
7869
7889
|
}
|
|
7870
|
-
async function
|
|
7890
|
+
async function Xh(e, t) {
|
|
7871
7891
|
re(`${e} Build presenter project configuration`);
|
|
7872
|
-
const [i, r] = await Promise.all([de("config.json"), Pt("src/index.ts")]), n =
|
|
7892
|
+
const [i, r] = await Promise.all([de("config.json"), Pt("src/index.ts")]), n = Bc.safeParse(i);
|
|
7873
7893
|
if (!n.success) {
|
|
7874
7894
|
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7875
7895
|
return;
|
|
@@ -7885,21 +7905,21 @@ async function Ns(e, t, i = "./") {
|
|
|
7885
7905
|
t.version = `${n[0]}.${n[1]}.${Number(n[2]) + 1}`, console.info(`Project version bumped from '${r}' to '${t.version}'.`), await ut(`${i}package.json`, t);
|
|
7886
7906
|
}
|
|
7887
7907
|
}
|
|
7888
|
-
function
|
|
7908
|
+
function Jh(e) {
|
|
7889
7909
|
let t = !1, i = !1;
|
|
7890
7910
|
for (const r of e)
|
|
7891
|
-
|
|
7911
|
+
Fs.includes(r) && (t = !0), $s.includes(r) && (i = !0);
|
|
7892
7912
|
return t && i ? "bidirectional" : t ? "source" : i ? "destination" : "unknown";
|
|
7893
7913
|
}
|
|
7894
|
-
const
|
|
7914
|
+
const Yh = {
|
|
7895
7915
|
critical: { color: "D32F2F", label: "critical" },
|
|
7896
7916
|
high: { color: "EF6C00", label: "high" },
|
|
7897
7917
|
moderate: { color: "FBC02D", label: "moderate" },
|
|
7898
7918
|
low: { color: "6D8C31", label: "low" },
|
|
7899
7919
|
unknown: { color: "616161", label: "unknown" }
|
|
7900
7920
|
// See sample badges in ~/tests/sampleBadges.md. Also included 'info' colouring.
|
|
7901
|
-
},
|
|
7902
|
-
async function
|
|
7921
|
+
}, wr = "<!-- OWASP_BADGES_START -->", Qh = "<!-- OWASP_BADGES_END -->";
|
|
7922
|
+
async function vl() {
|
|
7903
7923
|
try {
|
|
7904
7924
|
Re("Audit Dependencies"), await Li();
|
|
7905
7925
|
const e = await de("package.json");
|
|
@@ -7912,71 +7932,71 @@ async function dl() {
|
|
|
7912
7932
|
"--nodePackageSkipDevDependencies",
|
|
7913
7933
|
"--nvdApiKey",
|
|
7914
7934
|
process.env.OWASP_NVD_API_KEY ?? ""
|
|
7915
|
-
]), await
|
|
7935
|
+
]), await el("2️⃣"), await Ie("3️⃣ Check using 'npm outdated'", "npm", ["audit"]), Fe("Dependencies audited.");
|
|
7916
7936
|
} catch (e) {
|
|
7917
7937
|
console.error("❌ Error auditing dependencies.", e), process.exit(1);
|
|
7918
7938
|
}
|
|
7919
7939
|
}
|
|
7920
|
-
async function
|
|
7940
|
+
async function el(e) {
|
|
7921
7941
|
re(`${e} Insert OWASP Badge(s) into 'README.md'`);
|
|
7922
7942
|
const t = await de("dependency-check-reports/dependency-check-report.json"), i = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
|
|
7923
7943
|
for (const o of t.dependencies)
|
|
7924
7944
|
if (o.vulnerabilities != null)
|
|
7925
|
-
for (const
|
|
7926
|
-
const
|
|
7927
|
-
|
|
7945
|
+
for (const w of o.vulnerabilities) {
|
|
7946
|
+
const S = w.severity?.toLowerCase() ?? "unknown";
|
|
7947
|
+
S in i ? i[S]++ : i.unknown++;
|
|
7928
7948
|
}
|
|
7929
|
-
const r = await
|
|
7949
|
+
const r = await tl(i), n = await Pt("./README.md"), u = n.indexOf(wr), h = n.indexOf(Qh);
|
|
7930
7950
|
if (u === -1 || h === -1) {
|
|
7931
7951
|
console.error("❌ No OWASP badge markers found in 'README.md'.");
|
|
7932
7952
|
return;
|
|
7933
7953
|
}
|
|
7934
|
-
const d = r.join(" "), y = n.slice(0, Math.max(0, u +
|
|
7954
|
+
const d = r.join(" "), y = n.slice(0, Math.max(0, u + wr.length)) + d + n.slice(Math.max(0, h));
|
|
7935
7955
|
await Oi("README.md", y), console.info("OWASP audit badge(s) inserted into 'README.md'");
|
|
7936
7956
|
}
|
|
7937
|
-
async function
|
|
7957
|
+
async function tl(e) {
|
|
7938
7958
|
const t = await de("config.json"), i = [];
|
|
7939
7959
|
if (Object.values(e).reduce((n, u) => n + u, 0) === 0)
|
|
7940
7960
|
console.info("No vulnerabilities found."), i.push(`[](https://data-positioning.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
7941
7961
|
else
|
|
7942
7962
|
for (const [n, u] of Object.entries(e)) {
|
|
7943
|
-
const h =
|
|
7963
|
+
const h = Yh[n];
|
|
7944
7964
|
if (console.warn(`⚠️ ${u} ${h.label} vulnerability(ies) found.`), u === 0) continue;
|
|
7945
7965
|
const d = `https://img.shields.io/badge/OWASP-${u}%20${h.label}-${h.color}`;
|
|
7946
7966
|
i.push(`[](https://data-positioning.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
7947
7967
|
}
|
|
7948
7968
|
return i;
|
|
7949
7969
|
}
|
|
7950
|
-
async function
|
|
7970
|
+
async function xl() {
|
|
7951
7971
|
try {
|
|
7952
|
-
Re("Check Dependencies"), await Ie("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await Ie("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", ["-i"]),
|
|
7972
|
+
Re("Check Dependencies"), await Ie("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await Ie("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", ["-i"]), Fe("Dependencies checked.");
|
|
7953
7973
|
} catch (e) {
|
|
7954
7974
|
console.error("❌ Error checking dependencies.", e), process.exit(1);
|
|
7955
7975
|
}
|
|
7956
7976
|
}
|
|
7957
|
-
const
|
|
7958
|
-
async function
|
|
7977
|
+
const Sr = "<!-- DEPENDENCY_LICENSES_START -->", il = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
7978
|
+
async function gl(e = [], t = !0) {
|
|
7959
7979
|
try {
|
|
7960
7980
|
Re("Document Dependencies"), await Li();
|
|
7961
|
-
const i = e.flatMap((n) => ["--allowed", `'${n}'`]), r =
|
|
7962
|
-
await
|
|
7981
|
+
const i = e.flatMap((n) => ["--allowed", `'${n}'`]), r = Bs(new Zs(import.meta.resolve("@datapos/datapos-development/license-report-config")));
|
|
7982
|
+
await Te(
|
|
7963
7983
|
"1️⃣ Generate 'licenses.json' file",
|
|
7964
7984
|
"license-report",
|
|
7965
7985
|
["--config", `'${r}'`, "--only=prod,peer", "--output=json"],
|
|
7966
7986
|
"licenses/licenses.json"
|
|
7967
|
-
), await
|
|
7987
|
+
), await Te("2️⃣ Check 'licenses.json' file", "license-report-check", ["--source", "licenses/licenses.json", "--output=table", ...i]), t ? (await Te(
|
|
7968
7988
|
"3️⃣ Generate 'licenseTree.json' file",
|
|
7969
7989
|
"license-report-recursive",
|
|
7970
7990
|
["--only=prod,peer", "--output=tree", "--recurse", "--department.value=n/a", "--licensePeriod.value=n/a", "--material.value=n/a", "--relatedTo.value=n/a"],
|
|
7971
7991
|
"licenses/licenseTree.json"
|
|
7972
|
-
), await
|
|
7992
|
+
), 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", ["--source", "licenses/licenses.json", "--licDir", "licenses/downloads", "--download"]), await rl("6️⃣", t), Fe("Dependencies documented.");
|
|
7973
7993
|
} catch (i) {
|
|
7974
7994
|
console.error("❌ Error documenting dependencies.", i), process.exit(1);
|
|
7975
7995
|
}
|
|
7976
7996
|
}
|
|
7977
|
-
async function
|
|
7997
|
+
async function rl(e, t) {
|
|
7978
7998
|
re(`${e} Insert licenses into 'README.md'`);
|
|
7979
|
-
const i = await Pt("./README.md"), r = i.indexOf(
|
|
7999
|
+
const i = await Pt("./README.md"), r = i.indexOf(Sr), n = i.indexOf(il);
|
|
7980
8000
|
if (r === -1 || n === -1) {
|
|
7981
8001
|
console.error("❌ No dependency license markers found in 'README.md'.");
|
|
7982
8002
|
return;
|
|
@@ -7986,35 +8006,35 @@ async function tl(e, t) {
|
|
|
7986
8006
|
t && (d = await de("licenses/licenseTree.json"));
|
|
7987
8007
|
const y = [
|
|
7988
8008
|
...(() => {
|
|
7989
|
-
const
|
|
8009
|
+
const S = /* @__PURE__ */ new Map();
|
|
7990
8010
|
for (const A of u)
|
|
7991
|
-
|
|
8011
|
+
S.set(A.name, { ...A });
|
|
7992
8012
|
for (const A of h) {
|
|
7993
|
-
const
|
|
7994
|
-
|
|
8013
|
+
const F = S.get(A.name);
|
|
8014
|
+
S.set(A.name, F ? { ...F, ...A } : { ...A });
|
|
7995
8015
|
}
|
|
7996
8016
|
for (const A of d) {
|
|
7997
|
-
const
|
|
7998
|
-
|
|
8017
|
+
const F = S.get(A.name);
|
|
8018
|
+
F && S.set(A.name, { ...F, dependencyCount: A.requires?.length ?? 0 });
|
|
7999
8019
|
}
|
|
8000
|
-
return
|
|
8020
|
+
return S.values();
|
|
8001
8021
|
})()
|
|
8002
8022
|
];
|
|
8003
8023
|
let o = `|Name|Type|Installed|Latest|Latest Release|Deps|Document|
|
|
8004
8024
|
|:-|:-|:-:|:-:|:-|-:|:-|
|
|
8005
8025
|
`;
|
|
8006
|
-
for (const
|
|
8007
|
-
const A =
|
|
8026
|
+
for (const S of y) {
|
|
8027
|
+
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";
|
|
8008
8028
|
let le;
|
|
8009
|
-
|
|
8029
|
+
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}|
|
|
8010
8030
|
`;
|
|
8011
8031
|
}
|
|
8012
|
-
const
|
|
8032
|
+
const w = `${i.slice(0, Math.max(0, r + Sr.length))}
|
|
8013
8033
|
${o}
|
|
8014
8034
|
${i.slice(Math.max(0, n))}`;
|
|
8015
|
-
await Oi("README.md",
|
|
8035
|
+
await Oi("README.md", w);
|
|
8016
8036
|
}
|
|
8017
|
-
function
|
|
8037
|
+
function sl(e) {
|
|
8018
8038
|
if (e == null || e === "") return "n/a";
|
|
8019
8039
|
const t = e.split("T")[0];
|
|
8020
8040
|
if (t == null || t === "") return "n/a";
|
|
@@ -8022,34 +8042,34 @@ function il(e) {
|
|
|
8022
8042
|
let n = (r.getFullYear() - i.getFullYear()) * 12 + (r.getMonth() - i.getMonth());
|
|
8023
8043
|
return r.getDate() < i.getDate() && (n -= 1), n === 0 ? `this month: ${t}` : n === 1 ? `1 month ago: ${t}` : n <= 6 ? `${n} months ago: ${t}` : n <= 12 ? `${n} months ago: ${t} ⚠️` : `${n} months ago: ${t}❗`;
|
|
8024
8044
|
}
|
|
8025
|
-
async function
|
|
8045
|
+
async function bl() {
|
|
8026
8046
|
try {
|
|
8027
|
-
Re("Format Code"), await Ie("1️⃣ Format", "prettier", ["--write", "src/"]),
|
|
8047
|
+
Re("Format Code"), await Ie("1️⃣ Format", "prettier", ["--write", "src/"]), Fe("Code formatted.");
|
|
8028
8048
|
} catch (e) {
|
|
8029
8049
|
console.error("❌ Error formatting code.", e), process.exit(1);
|
|
8030
8050
|
}
|
|
8031
8051
|
}
|
|
8032
|
-
async function
|
|
8052
|
+
async function _l() {
|
|
8033
8053
|
try {
|
|
8034
|
-
Re("Lint Code"), await Ie("1️⃣ Lint", "eslint", []),
|
|
8054
|
+
Re("Lint Code"), await Ie("1️⃣ Lint", "eslint", []), Fe("Code linted.");
|
|
8035
8055
|
} catch (e) {
|
|
8036
8056
|
console.error("❌ Error linting code.", e), process.exit(1);
|
|
8037
8057
|
}
|
|
8038
8058
|
}
|
|
8039
|
-
const
|
|
8040
|
-
async function
|
|
8059
|
+
const nl = ["1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣"];
|
|
8060
|
+
async function kl(e = []) {
|
|
8041
8061
|
try {
|
|
8042
8062
|
Re("Update '@datapos/datapos' Dependencies");
|
|
8043
8063
|
for (const [t, i] of e.entries()) {
|
|
8044
|
-
const r =
|
|
8064
|
+
const r = nl.at(t) ?? "🔢";
|
|
8045
8065
|
await Ie(`${r} Update '${i}'`, "npm", ["install", `@datapos/datapos-${i}@latest`]);
|
|
8046
8066
|
}
|
|
8047
|
-
|
|
8067
|
+
Fe("'@datapos/datapos' dependencies updated.");
|
|
8048
8068
|
} catch (t) {
|
|
8049
8069
|
console.error("❌ Error updating '@datapos/datapos' dependencies.", t), process.exit(1);
|
|
8050
8070
|
}
|
|
8051
8071
|
}
|
|
8052
|
-
async function
|
|
8072
|
+
async function wl(e) {
|
|
8053
8073
|
try {
|
|
8054
8074
|
console.info(`🚀 Building public directory index for identifier '${e}'...`);
|
|
8055
8075
|
const t = {};
|
|
@@ -8060,40 +8080,40 @@ async function bl(e) {
|
|
|
8060
8080
|
for (const y of u) {
|
|
8061
8081
|
const o = `${n}/${y}`;
|
|
8062
8082
|
try {
|
|
8063
|
-
const
|
|
8064
|
-
if (
|
|
8065
|
-
const
|
|
8066
|
-
h.push(A), await i(o,
|
|
8083
|
+
const w = await ge.stat(o);
|
|
8084
|
+
if (w.isDirectory()) {
|
|
8085
|
+
const S = await ge.readdir(o), A = { childCount: S.length, name: y, typeId: "folder" };
|
|
8086
|
+
h.push(A), await i(o, S);
|
|
8067
8087
|
} else {
|
|
8068
|
-
const
|
|
8069
|
-
h.push(
|
|
8088
|
+
const S = { id: Ds(), lastModifiedAt: w.mtimeMs, name: y, size: w.size, typeId: "object" };
|
|
8089
|
+
h.push(S);
|
|
8070
8090
|
}
|
|
8071
|
-
} catch (
|
|
8072
|
-
throw new Error(`Unable to get information for '${y}' in 'buildPublicDirectoryIndex'. ${String(
|
|
8091
|
+
} catch (w) {
|
|
8092
|
+
throw new Error(`Unable to get information for '${y}' in 'buildPublicDirectoryIndex'. ${String(w)}`);
|
|
8073
8093
|
}
|
|
8074
8094
|
}
|
|
8075
8095
|
h.sort((y, o) => {
|
|
8076
|
-
const
|
|
8077
|
-
return
|
|
8096
|
+
const w = y.typeId.localeCompare(o.typeId);
|
|
8097
|
+
return w === 0 ? y.name.localeCompare(o.name) : w;
|
|
8078
8098
|
});
|
|
8079
8099
|
}
|
|
8080
|
-
const r = await
|
|
8081
|
-
await i(`public/${e}`, r), await
|
|
8100
|
+
const r = await ge.readdir(`public/${e}`);
|
|
8101
|
+
await i(`public/${e}`, r), await ge.writeFile(`./public/${e}Index.json`, JSON.stringify(t), "utf8"), console.info("✅ Public directory index built.");
|
|
8082
8102
|
} catch (t) {
|
|
8083
8103
|
console.error("❌ Error building public directory index.", t);
|
|
8084
8104
|
}
|
|
8085
8105
|
}
|
|
8086
8106
|
export {
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8107
|
+
vl as auditDependencies,
|
|
8108
|
+
wl as buildDirectoryIndex,
|
|
8109
|
+
fl as buildProject,
|
|
8110
|
+
xl as checkDependencies,
|
|
8111
|
+
gl as documentDependencies,
|
|
8112
|
+
bl as formatCode,
|
|
8113
|
+
_l as lintCode,
|
|
8114
|
+
dl as releaseProject,
|
|
8115
|
+
ml as syncProjectWithGitHub,
|
|
8116
|
+
yl as testProject,
|
|
8117
|
+
kl as updateDataPosDependencies
|
|
8098
8118
|
};
|
|
8099
8119
|
//# sourceMappingURL=datapos-development.es.js.map
|