@synnaxlabs/drift 0.40.1 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/electron.cjs +1 -1
- package/dist/electron.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +8 -8
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/{selectors-CVXi0LBk.js → selectors-BJ5IDnos.js} +1 -1
- package/dist/{selectors-DsoUWQIE.cjs → selectors-DPMyygQa.cjs} +1 -1
- package/dist/{state-B_nrpWi0.js → state-DO5anaj4.js} +795 -799
- package/dist/state-DliTJ_c2.cjs +13 -0
- package/dist/tauri.cjs +1 -1
- package/dist/tauri.js +1 -1
- package/package.json +13 -13
- package/dist/state-u8UjvjPJ.cjs +0 -13
|
@@ -36,11 +36,11 @@ const dt = (n = !1, ...e) => {
|
|
|
36
36
|
recursive: !0,
|
|
37
37
|
recursiveInArray: !0,
|
|
38
38
|
keepTypesOnRecursion: [Number, String, Uint8Array]
|
|
39
|
-
}, $r = (n = Zt) => (n.recursive == null ? n = Zt : n.recursiveInArray ?? (n.recursiveInArray = !1), n), fn = (n) => n != null && Array.isArray(n), Ct = (n) => n != null && typeof n == "object" && !Array.isArray(n), pn = (n, e) => (e || []).some((t) => n instanceof t),
|
|
40
|
-
var Cr = Object.defineProperty, Rr = (n, e, t) => e in n ? Cr(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t,
|
|
39
|
+
}, $r = (n = Zt) => (n.recursive == null ? n = Zt : n.recursiveInArray ?? (n.recursiveInArray = !1), n), fn = (n) => n != null && Array.isArray(n), Ct = (n) => n != null && typeof n == "object" && !Array.isArray(n), pn = (n, e) => (e || []).some((t) => n instanceof t), Ye = (n) => n != null && typeof n == "object" && !Array.isArray(n);
|
|
40
|
+
var Cr = Object.defineProperty, Rr = (n, e, t) => e in n ? Cr(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Ge = (n, e, t) => Rr(n, typeof e != "symbol" ? e + "" : e, t);
|
|
41
41
|
let Mr = class {
|
|
42
42
|
constructor() {
|
|
43
|
-
|
|
43
|
+
Ge(this, "contentType", "application/json"), Ge(this, "decoder"), Ge(this, "encoder"), this.decoder = new TextDecoder(), this.encoder = new TextEncoder();
|
|
44
44
|
}
|
|
45
45
|
encode(e) {
|
|
46
46
|
return this.encoder.encode(this.encodeString(e)).buffer;
|
|
@@ -54,13 +54,13 @@ let Mr = class {
|
|
|
54
54
|
}
|
|
55
55
|
encodeString(e) {
|
|
56
56
|
const t = Er(e);
|
|
57
|
-
return JSON.stringify(t, (r, s) => ArrayBuffer.isView(s) ? Array.from(s) :
|
|
57
|
+
return JSON.stringify(t, (r, s) => ArrayBuffer.isView(s) ? Array.from(s) : Ye(s) && "encode_value" in s ? typeof s.value == "bigint" ? s.value.toString() : s.value : typeof s == "bigint" ? s.toString() : s);
|
|
58
58
|
}
|
|
59
59
|
static registerCustomType() {
|
|
60
60
|
}
|
|
61
61
|
}, jr = class {
|
|
62
62
|
constructor() {
|
|
63
|
-
|
|
63
|
+
Ge(this, "contentType", "text/csv");
|
|
64
64
|
}
|
|
65
65
|
encode(e) {
|
|
66
66
|
const t = this.encodeString(e);
|
|
@@ -71,7 +71,7 @@ let Mr = class {
|
|
|
71
71
|
return this.decodeString(r, t);
|
|
72
72
|
}
|
|
73
73
|
encodeString(e) {
|
|
74
|
-
if (!Array.isArray(e) || e.length === 0 || !
|
|
74
|
+
if (!Array.isArray(e) || e.length === 0 || !Ye(e[0]))
|
|
75
75
|
throw new Error("Payload must be an array of objects");
|
|
76
76
|
const t = Object.keys(e[0]), r = [t.join(",")];
|
|
77
77
|
return e.forEach((s) => {
|
|
@@ -105,7 +105,7 @@ let Mr = class {
|
|
|
105
105
|
}
|
|
106
106
|
}, Zr = class {
|
|
107
107
|
constructor() {
|
|
108
|
-
|
|
108
|
+
Ge(this, "contentType", "text/plain");
|
|
109
109
|
}
|
|
110
110
|
encode(e) {
|
|
111
111
|
return new TextEncoder().encode(e).buffer;
|
|
@@ -282,7 +282,7 @@ class W extends Error {
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
W.create = (n) => new W(n);
|
|
285
|
-
const
|
|
285
|
+
const Ce = (n, e) => {
|
|
286
286
|
let t;
|
|
287
287
|
switch (n.code) {
|
|
288
288
|
case f.invalid_type:
|
|
@@ -338,14 +338,14 @@ const $e = (n, e) => {
|
|
|
338
338
|
}
|
|
339
339
|
return { message: t };
|
|
340
340
|
};
|
|
341
|
-
let Mn =
|
|
341
|
+
let Mn = Ce;
|
|
342
342
|
function Ur(n) {
|
|
343
343
|
Mn = n;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function bt() {
|
|
346
346
|
return Mn;
|
|
347
347
|
}
|
|
348
|
-
const
|
|
348
|
+
const wt = (n) => {
|
|
349
349
|
const { data: e, path: t, errorMaps: r, issueData: s } = n, i = [...t, ...s.path || []], a = {
|
|
350
350
|
...s,
|
|
351
351
|
path: i
|
|
@@ -367,7 +367,7 @@ const bt = (n) => {
|
|
|
367
367
|
};
|
|
368
368
|
}, Dr = [];
|
|
369
369
|
function m(n, e) {
|
|
370
|
-
const t =
|
|
370
|
+
const t = bt(), r = wt({
|
|
371
371
|
issueData: e,
|
|
372
372
|
data: n.data,
|
|
373
373
|
path: n.path,
|
|
@@ -378,13 +378,13 @@ function m(n, e) {
|
|
|
378
378
|
// then schema-bound map if available
|
|
379
379
|
t,
|
|
380
380
|
// then global override map
|
|
381
|
-
t ===
|
|
381
|
+
t === Ce ? void 0 : Ce
|
|
382
382
|
// then global default map
|
|
383
383
|
].filter((s) => !!s)
|
|
384
384
|
});
|
|
385
385
|
n.common.issues.push(r);
|
|
386
386
|
}
|
|
387
|
-
class
|
|
387
|
+
class P {
|
|
388
388
|
constructor() {
|
|
389
389
|
this.value = "valid";
|
|
390
390
|
}
|
|
@@ -412,7 +412,7 @@ class L {
|
|
|
412
412
|
value: a
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
|
-
return
|
|
415
|
+
return P.mergeObjectSync(e, r);
|
|
416
416
|
}
|
|
417
417
|
static mergeObjectSync(e, t) {
|
|
418
418
|
const r = {};
|
|
@@ -427,7 +427,7 @@ class L {
|
|
|
427
427
|
}
|
|
428
428
|
const x = Object.freeze({
|
|
429
429
|
status: "aborted"
|
|
430
|
-
}),
|
|
430
|
+
}), Ae = (n) => ({ status: "dirty", value: n }), z = (n) => ({ status: "valid", value: n }), Ut = (n) => n.status === "aborted", Dt = (n) => n.status === "dirty", Te = (n) => n.status === "valid", Je = (n) => typeof Promise < "u" && n instanceof Promise;
|
|
431
431
|
function xt(n, e, t, r) {
|
|
432
432
|
if (typeof e == "function" ? n !== e || !0 : !e.has(n)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
433
433
|
return e.get(n);
|
|
@@ -440,7 +440,7 @@ var v;
|
|
|
440
440
|
(function(n) {
|
|
441
441
|
n.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, n.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
442
442
|
})(v || (v = {}));
|
|
443
|
-
var
|
|
443
|
+
var Ze, Be;
|
|
444
444
|
class K {
|
|
445
445
|
constructor(e, t, r, s) {
|
|
446
446
|
this._cachedPath = [], this.parent = e, this.data = t, this._path = r, this._key = s;
|
|
@@ -450,7 +450,7 @@ class K {
|
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
const mn = (n, e) => {
|
|
453
|
-
if (
|
|
453
|
+
if (Te(e))
|
|
454
454
|
return { success: !0, data: e.value };
|
|
455
455
|
if (!n.common.issues.length)
|
|
456
456
|
throw new Error("Validation failed but no issues detected.");
|
|
@@ -495,7 +495,7 @@ class O {
|
|
|
495
495
|
}
|
|
496
496
|
_processInputParams(e) {
|
|
497
497
|
return {
|
|
498
|
-
status: new
|
|
498
|
+
status: new P(),
|
|
499
499
|
ctx: {
|
|
500
500
|
common: e.parent.common,
|
|
501
501
|
data: e.data,
|
|
@@ -508,7 +508,7 @@ class O {
|
|
|
508
508
|
}
|
|
509
509
|
_parseSync(e) {
|
|
510
510
|
const t = this._parse(e);
|
|
511
|
-
if (
|
|
511
|
+
if (Je(t))
|
|
512
512
|
throw new Error("Synchronous parse encountered promise.");
|
|
513
513
|
return t;
|
|
514
514
|
}
|
|
@@ -554,7 +554,7 @@ class O {
|
|
|
554
554
|
if (!this["~standard"].async)
|
|
555
555
|
try {
|
|
556
556
|
const i = this._parseSync({ data: e, path: [], parent: s });
|
|
557
|
-
return
|
|
557
|
+
return Te(i) ? {
|
|
558
558
|
value: i.value
|
|
559
559
|
} : {
|
|
560
560
|
issues: s.common.issues
|
|
@@ -565,7 +565,7 @@ class O {
|
|
|
565
565
|
async: !0
|
|
566
566
|
};
|
|
567
567
|
}
|
|
568
|
-
return this._parseAsync({ data: e, path: [], parent: s }).then((i) =>
|
|
568
|
+
return this._parseAsync({ data: e, path: [], parent: s }).then((i) => Te(i) ? {
|
|
569
569
|
value: i.value
|
|
570
570
|
} : {
|
|
571
571
|
issues: s.common.issues
|
|
@@ -589,7 +589,7 @@ class O {
|
|
|
589
589
|
parent: null,
|
|
590
590
|
data: e,
|
|
591
591
|
parsedType: se(e)
|
|
592
|
-
}, s = this._parse({ data: e, path: r.path, parent: r }), i = await (
|
|
592
|
+
}, s = this._parse({ data: e, path: r.path, parent: r }), i = await (Je(s) ? s : Promise.resolve(s));
|
|
593
593
|
return mn(r, i);
|
|
594
594
|
}
|
|
595
595
|
refine(e, t) {
|
|
@@ -608,7 +608,7 @@ class O {
|
|
|
608
608
|
_refinement(e) {
|
|
609
609
|
return new Y({
|
|
610
610
|
schema: this,
|
|
611
|
-
typeName:
|
|
611
|
+
typeName: w.ZodEffects,
|
|
612
612
|
effect: { type: "refinement", refinement: e }
|
|
613
613
|
});
|
|
614
614
|
}
|
|
@@ -626,7 +626,7 @@ class O {
|
|
|
626
626
|
return X.create(this, this._def);
|
|
627
627
|
}
|
|
628
628
|
nullable() {
|
|
629
|
-
return
|
|
629
|
+
return me.create(this, this._def);
|
|
630
630
|
}
|
|
631
631
|
nullish() {
|
|
632
632
|
return this.nullable().optional();
|
|
@@ -635,45 +635,45 @@ class O {
|
|
|
635
635
|
return F.create(this);
|
|
636
636
|
}
|
|
637
637
|
promise() {
|
|
638
|
-
return
|
|
638
|
+
return Me.create(this, this._def);
|
|
639
639
|
}
|
|
640
640
|
or(e) {
|
|
641
|
-
return
|
|
641
|
+
return Qe.create([this, e], this._def);
|
|
642
642
|
}
|
|
643
643
|
and(e) {
|
|
644
|
-
return
|
|
644
|
+
return et.create(this, e, this._def);
|
|
645
645
|
}
|
|
646
646
|
transform(e) {
|
|
647
647
|
return new Y({
|
|
648
648
|
..._(this._def),
|
|
649
649
|
schema: this,
|
|
650
|
-
typeName:
|
|
650
|
+
typeName: w.ZodEffects,
|
|
651
651
|
effect: { type: "transform", transform: e }
|
|
652
652
|
});
|
|
653
653
|
}
|
|
654
654
|
default(e) {
|
|
655
655
|
const t = typeof e == "function" ? e : () => e;
|
|
656
|
-
return new
|
|
656
|
+
return new it({
|
|
657
657
|
..._(this._def),
|
|
658
658
|
innerType: this,
|
|
659
659
|
defaultValue: t,
|
|
660
|
-
typeName:
|
|
660
|
+
typeName: w.ZodDefault
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
663
|
brand() {
|
|
664
664
|
return new Kt({
|
|
665
|
-
typeName:
|
|
665
|
+
typeName: w.ZodBranded,
|
|
666
666
|
type: this,
|
|
667
667
|
..._(this._def)
|
|
668
668
|
});
|
|
669
669
|
}
|
|
670
670
|
catch(e) {
|
|
671
671
|
const t = typeof e == "function" ? e : () => e;
|
|
672
|
-
return new
|
|
672
|
+
return new at({
|
|
673
673
|
..._(this._def),
|
|
674
674
|
innerType: this,
|
|
675
675
|
catchValue: t,
|
|
676
|
-
typeName:
|
|
676
|
+
typeName: w.ZodCatch
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
679
|
describe(e) {
|
|
@@ -684,10 +684,10 @@ class O {
|
|
|
684
684
|
});
|
|
685
685
|
}
|
|
686
686
|
pipe(e) {
|
|
687
|
-
return
|
|
687
|
+
return lt.create(this, e);
|
|
688
688
|
}
|
|
689
689
|
readonly() {
|
|
690
|
-
return
|
|
690
|
+
return ot.create(this);
|
|
691
691
|
}
|
|
692
692
|
isOptional() {
|
|
693
693
|
return this.safeParse(void 0).success;
|
|
@@ -696,7 +696,7 @@ class O {
|
|
|
696
696
|
return this.safeParse(null).success;
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
const
|
|
699
|
+
const Pr = /^c[^\s-]{8,}$/i, Lr = /^[0-9a-z]+$/, zr = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Wr = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Vr = /^[a-z0-9_-]{21}$/i, qr = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Fr = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Yr = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Gr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
700
700
|
let Rt;
|
|
701
701
|
const Jr = /^(?:(?: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])$/, Hr = /^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/, Xr = /^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Kr = /^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Qr = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, es = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Zn = "((\\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])))", ts = new RegExp(`^${Zn}$`);
|
|
702
702
|
function Bn(n) {
|
|
@@ -737,7 +737,7 @@ class q extends O {
|
|
|
737
737
|
received: i.parsedType
|
|
738
738
|
}), x;
|
|
739
739
|
}
|
|
740
|
-
const r = new
|
|
740
|
+
const r = new P();
|
|
741
741
|
let s;
|
|
742
742
|
for (const i of this._def.checks)
|
|
743
743
|
if (i.kind === "min")
|
|
@@ -800,13 +800,13 @@ class q extends O {
|
|
|
800
800
|
message: i.message
|
|
801
801
|
}), r.dirty());
|
|
802
802
|
else if (i.kind === "cuid")
|
|
803
|
-
|
|
803
|
+
Pr.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
|
|
804
804
|
validation: "cuid",
|
|
805
805
|
code: f.invalid_string,
|
|
806
806
|
message: i.message
|
|
807
807
|
}), r.dirty());
|
|
808
808
|
else if (i.kind === "cuid2")
|
|
809
|
-
|
|
809
|
+
Lr.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
|
|
810
810
|
validation: "cuid2",
|
|
811
811
|
code: f.invalid_string,
|
|
812
812
|
message: i.message
|
|
@@ -1109,7 +1109,7 @@ q.create = (n) => {
|
|
|
1109
1109
|
var e;
|
|
1110
1110
|
return new q({
|
|
1111
1111
|
checks: [],
|
|
1112
|
-
typeName:
|
|
1112
|
+
typeName: w.ZodString,
|
|
1113
1113
|
coerce: (e = n == null ? void 0 : n.coerce) !== null && e !== void 0 ? e : !1,
|
|
1114
1114
|
..._(n)
|
|
1115
1115
|
});
|
|
@@ -1118,7 +1118,7 @@ function as(n, e) {
|
|
|
1118
1118
|
const t = (n.toString().split(".")[1] || "").length, r = (e.toString().split(".")[1] || "").length, s = t > r ? t : r, i = parseInt(n.toFixed(s).replace(".", "")), a = parseInt(e.toFixed(s).replace(".", ""));
|
|
1119
1119
|
return i % a / Math.pow(10, s);
|
|
1120
1120
|
}
|
|
1121
|
-
class
|
|
1121
|
+
class he extends O {
|
|
1122
1122
|
constructor() {
|
|
1123
1123
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1124
1124
|
}
|
|
@@ -1132,7 +1132,7 @@ class de extends O {
|
|
|
1132
1132
|
}), x;
|
|
1133
1133
|
}
|
|
1134
1134
|
let r;
|
|
1135
|
-
const s = new
|
|
1135
|
+
const s = new P();
|
|
1136
1136
|
for (const i of this._def.checks)
|
|
1137
1137
|
i.kind === "int" ? S.isInteger(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
1138
1138
|
code: f.invalid_type,
|
|
@@ -1176,7 +1176,7 @@ class de extends O {
|
|
|
1176
1176
|
return this.setLimit("max", e, !1, v.toString(t));
|
|
1177
1177
|
}
|
|
1178
1178
|
setLimit(e, t, r, s) {
|
|
1179
|
-
return new
|
|
1179
|
+
return new he({
|
|
1180
1180
|
...this._def,
|
|
1181
1181
|
checks: [
|
|
1182
1182
|
...this._def.checks,
|
|
@@ -1190,7 +1190,7 @@ class de extends O {
|
|
|
1190
1190
|
});
|
|
1191
1191
|
}
|
|
1192
1192
|
_addCheck(e) {
|
|
1193
|
-
return new
|
|
1193
|
+
return new he({
|
|
1194
1194
|
...this._def,
|
|
1195
1195
|
checks: [...this._def.checks, e]
|
|
1196
1196
|
});
|
|
@@ -1284,13 +1284,13 @@ class de extends O {
|
|
|
1284
1284
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
|
-
|
|
1287
|
+
he.create = (n) => new he({
|
|
1288
1288
|
checks: [],
|
|
1289
|
-
typeName:
|
|
1289
|
+
typeName: w.ZodNumber,
|
|
1290
1290
|
coerce: (n == null ? void 0 : n.coerce) || !1,
|
|
1291
1291
|
..._(n)
|
|
1292
1292
|
});
|
|
1293
|
-
class
|
|
1293
|
+
class fe extends O {
|
|
1294
1294
|
constructor() {
|
|
1295
1295
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
1296
1296
|
}
|
|
@@ -1304,7 +1304,7 @@ class he extends O {
|
|
|
1304
1304
|
if (this._getType(e) !== g.bigint)
|
|
1305
1305
|
return this._getInvalidInput(e);
|
|
1306
1306
|
let r;
|
|
1307
|
-
const s = new
|
|
1307
|
+
const s = new P();
|
|
1308
1308
|
for (const i of this._def.checks)
|
|
1309
1309
|
i.kind === "min" ? (i.inclusive ? e.data < i.value : e.data <= i.value) && (r = this._getOrReturnCtx(e, r), m(r, {
|
|
1310
1310
|
code: f.too_small,
|
|
@@ -1346,7 +1346,7 @@ class he extends O {
|
|
|
1346
1346
|
return this.setLimit("max", e, !1, v.toString(t));
|
|
1347
1347
|
}
|
|
1348
1348
|
setLimit(e, t, r, s) {
|
|
1349
|
-
return new
|
|
1349
|
+
return new fe({
|
|
1350
1350
|
...this._def,
|
|
1351
1351
|
checks: [
|
|
1352
1352
|
...this._def.checks,
|
|
@@ -1360,7 +1360,7 @@ class he extends O {
|
|
|
1360
1360
|
});
|
|
1361
1361
|
}
|
|
1362
1362
|
_addCheck(e) {
|
|
1363
|
-
return new
|
|
1363
|
+
return new fe({
|
|
1364
1364
|
...this._def,
|
|
1365
1365
|
checks: [...this._def.checks, e]
|
|
1366
1366
|
});
|
|
@@ -1417,16 +1417,16 @@ class he extends O {
|
|
|
1417
1417
|
return e;
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
|
-
|
|
1420
|
+
fe.create = (n) => {
|
|
1421
1421
|
var e;
|
|
1422
|
-
return new
|
|
1422
|
+
return new fe({
|
|
1423
1423
|
checks: [],
|
|
1424
|
-
typeName:
|
|
1424
|
+
typeName: w.ZodBigInt,
|
|
1425
1425
|
coerce: (e = n == null ? void 0 : n.coerce) !== null && e !== void 0 ? e : !1,
|
|
1426
1426
|
..._(n)
|
|
1427
1427
|
});
|
|
1428
1428
|
};
|
|
1429
|
-
class
|
|
1429
|
+
class He extends O {
|
|
1430
1430
|
_parse(e) {
|
|
1431
1431
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== g.boolean) {
|
|
1432
1432
|
const r = this._getOrReturnCtx(e);
|
|
@@ -1439,12 +1439,12 @@ class Je extends O {
|
|
|
1439
1439
|
return z(e.data);
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
|
-
|
|
1443
|
-
typeName:
|
|
1442
|
+
He.create = (n) => new He({
|
|
1443
|
+
typeName: w.ZodBoolean,
|
|
1444
1444
|
coerce: (n == null ? void 0 : n.coerce) || !1,
|
|
1445
1445
|
..._(n)
|
|
1446
1446
|
});
|
|
1447
|
-
class
|
|
1447
|
+
class Oe extends O {
|
|
1448
1448
|
_parse(e) {
|
|
1449
1449
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== g.date) {
|
|
1450
1450
|
const i = this._getOrReturnCtx(e);
|
|
@@ -1460,7 +1460,7 @@ class Te extends O {
|
|
|
1460
1460
|
code: f.invalid_date
|
|
1461
1461
|
}), x;
|
|
1462
1462
|
}
|
|
1463
|
-
const r = new
|
|
1463
|
+
const r = new P();
|
|
1464
1464
|
let s;
|
|
1465
1465
|
for (const i of this._def.checks)
|
|
1466
1466
|
i.kind === "min" ? e.data.getTime() < i.value && (s = this._getOrReturnCtx(e, s), m(s, {
|
|
@@ -1484,7 +1484,7 @@ class Te extends O {
|
|
|
1484
1484
|
};
|
|
1485
1485
|
}
|
|
1486
1486
|
_addCheck(e) {
|
|
1487
|
-
return new
|
|
1487
|
+
return new Oe({
|
|
1488
1488
|
...this._def,
|
|
1489
1489
|
checks: [...this._def.checks, e]
|
|
1490
1490
|
});
|
|
@@ -1516,10 +1516,10 @@ class Te extends O {
|
|
|
1516
1516
|
return e != null ? new Date(e) : null;
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
|
-
|
|
1519
|
+
Oe.create = (n) => new Oe({
|
|
1520
1520
|
checks: [],
|
|
1521
1521
|
coerce: (n == null ? void 0 : n.coerce) || !1,
|
|
1522
|
-
typeName:
|
|
1522
|
+
typeName: w.ZodDate,
|
|
1523
1523
|
..._(n)
|
|
1524
1524
|
});
|
|
1525
1525
|
class _t extends O {
|
|
@@ -1536,10 +1536,10 @@ class _t extends O {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
}
|
|
1538
1538
|
_t.create = (n) => new _t({
|
|
1539
|
-
typeName:
|
|
1539
|
+
typeName: w.ZodSymbol,
|
|
1540
1540
|
..._(n)
|
|
1541
1541
|
});
|
|
1542
|
-
class
|
|
1542
|
+
class Xe extends O {
|
|
1543
1543
|
_parse(e) {
|
|
1544
1544
|
if (this._getType(e) !== g.undefined) {
|
|
1545
1545
|
const r = this._getOrReturnCtx(e);
|
|
@@ -1552,11 +1552,11 @@ class He extends O {
|
|
|
1552
1552
|
return z(e.data);
|
|
1553
1553
|
}
|
|
1554
1554
|
}
|
|
1555
|
-
|
|
1556
|
-
typeName:
|
|
1555
|
+
Xe.create = (n) => new Xe({
|
|
1556
|
+
typeName: w.ZodUndefined,
|
|
1557
1557
|
..._(n)
|
|
1558
1558
|
});
|
|
1559
|
-
class
|
|
1559
|
+
class Ke extends O {
|
|
1560
1560
|
_parse(e) {
|
|
1561
1561
|
if (this._getType(e) !== g.null) {
|
|
1562
1562
|
const r = this._getOrReturnCtx(e);
|
|
@@ -1569,11 +1569,11 @@ class Xe extends O {
|
|
|
1569
1569
|
return z(e.data);
|
|
1570
1570
|
}
|
|
1571
1571
|
}
|
|
1572
|
-
|
|
1573
|
-
typeName:
|
|
1572
|
+
Ke.create = (n) => new Ke({
|
|
1573
|
+
typeName: w.ZodNull,
|
|
1574
1574
|
..._(n)
|
|
1575
1575
|
});
|
|
1576
|
-
class
|
|
1576
|
+
class Re extends O {
|
|
1577
1577
|
constructor() {
|
|
1578
1578
|
super(...arguments), this._any = !0;
|
|
1579
1579
|
}
|
|
@@ -1581,11 +1581,11 @@ class Ce extends O {
|
|
|
1581
1581
|
return z(e.data);
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
|
-
|
|
1585
|
-
typeName:
|
|
1584
|
+
Re.create = (n) => new Re({
|
|
1585
|
+
typeName: w.ZodAny,
|
|
1586
1586
|
..._(n)
|
|
1587
1587
|
});
|
|
1588
|
-
class
|
|
1588
|
+
class be extends O {
|
|
1589
1589
|
constructor() {
|
|
1590
1590
|
super(...arguments), this._unknown = !0;
|
|
1591
1591
|
}
|
|
@@ -1593,8 +1593,8 @@ class ve extends O {
|
|
|
1593
1593
|
return z(e.data);
|
|
1594
1594
|
}
|
|
1595
1595
|
}
|
|
1596
|
-
|
|
1597
|
-
typeName:
|
|
1596
|
+
be.create = (n) => new be({
|
|
1597
|
+
typeName: w.ZodUnknown,
|
|
1598
1598
|
..._(n)
|
|
1599
1599
|
});
|
|
1600
1600
|
class ae extends O {
|
|
@@ -1608,7 +1608,7 @@ class ae extends O {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
1610
|
ae.create = (n) => new ae({
|
|
1611
|
-
typeName:
|
|
1611
|
+
typeName: w.ZodNever,
|
|
1612
1612
|
..._(n)
|
|
1613
1613
|
});
|
|
1614
1614
|
class Tt extends O {
|
|
@@ -1625,7 +1625,7 @@ class Tt extends O {
|
|
|
1625
1625
|
}
|
|
1626
1626
|
}
|
|
1627
1627
|
Tt.create = (n) => new Tt({
|
|
1628
|
-
typeName:
|
|
1628
|
+
typeName: w.ZodVoid,
|
|
1629
1629
|
..._(n)
|
|
1630
1630
|
});
|
|
1631
1631
|
class F extends O {
|
|
@@ -1664,9 +1664,9 @@ class F extends O {
|
|
|
1664
1664
|
exact: !1,
|
|
1665
1665
|
message: s.maxLength.message
|
|
1666
1666
|
}), r.dirty()), t.common.async)
|
|
1667
|
-
return Promise.all([...t.data].map((a, o) => s.type._parseAsync(new K(t, a, t.path, o)))).then((a) =>
|
|
1667
|
+
return Promise.all([...t.data].map((a, o) => s.type._parseAsync(new K(t, a, t.path, o)))).then((a) => P.mergeArray(r, a));
|
|
1668
1668
|
const i = [...t.data].map((a, o) => s.type._parseSync(new K(t, a, t.path, o)));
|
|
1669
|
-
return
|
|
1669
|
+
return P.mergeArray(r, i);
|
|
1670
1670
|
}
|
|
1671
1671
|
get element() {
|
|
1672
1672
|
return this._def.type;
|
|
@@ -1698,15 +1698,15 @@ F.create = (n, e) => new F({
|
|
|
1698
1698
|
minLength: null,
|
|
1699
1699
|
maxLength: null,
|
|
1700
1700
|
exactLength: null,
|
|
1701
|
-
typeName:
|
|
1701
|
+
typeName: w.ZodArray,
|
|
1702
1702
|
..._(e)
|
|
1703
1703
|
});
|
|
1704
|
-
function
|
|
1704
|
+
function ke(n) {
|
|
1705
1705
|
if (n instanceof R) {
|
|
1706
1706
|
const e = {};
|
|
1707
1707
|
for (const t in n.shape) {
|
|
1708
1708
|
const r = n.shape[t];
|
|
1709
|
-
e[t] = X.create(
|
|
1709
|
+
e[t] = X.create(ke(r));
|
|
1710
1710
|
}
|
|
1711
1711
|
return new R({
|
|
1712
1712
|
...n._def,
|
|
@@ -1714,8 +1714,8 @@ function Ie(n) {
|
|
|
1714
1714
|
});
|
|
1715
1715
|
} else return n instanceof F ? new F({
|
|
1716
1716
|
...n._def,
|
|
1717
|
-
type:
|
|
1718
|
-
}) : n instanceof X ? X.create(
|
|
1717
|
+
type: ke(n.element)
|
|
1718
|
+
}) : n instanceof X ? X.create(ke(n.unwrap())) : n instanceof me ? me.create(ke(n.unwrap())) : n instanceof Q ? Q.create(n.items.map((e) => ke(e))) : n;
|
|
1719
1719
|
}
|
|
1720
1720
|
class R extends O {
|
|
1721
1721
|
constructor() {
|
|
@@ -1788,7 +1788,7 @@ class R extends O {
|
|
|
1788
1788
|
});
|
|
1789
1789
|
}
|
|
1790
1790
|
return l;
|
|
1791
|
-
}).then((l) =>
|
|
1791
|
+
}).then((l) => P.mergeObjectSync(r, l)) : P.mergeObjectSync(r, c);
|
|
1792
1792
|
}
|
|
1793
1793
|
get shape() {
|
|
1794
1794
|
return this._def.shape();
|
|
@@ -1861,7 +1861,7 @@ class R extends O {
|
|
|
1861
1861
|
...this._def.shape(),
|
|
1862
1862
|
...e._def.shape()
|
|
1863
1863
|
}),
|
|
1864
|
-
typeName:
|
|
1864
|
+
typeName: w.ZodObject
|
|
1865
1865
|
});
|
|
1866
1866
|
}
|
|
1867
1867
|
// merge<
|
|
@@ -1951,7 +1951,7 @@ class R extends O {
|
|
|
1951
1951
|
* @deprecated
|
|
1952
1952
|
*/
|
|
1953
1953
|
deepPartial() {
|
|
1954
|
-
return
|
|
1954
|
+
return ke(this);
|
|
1955
1955
|
}
|
|
1956
1956
|
partial(e) {
|
|
1957
1957
|
const t = {};
|
|
@@ -1987,24 +1987,24 @@ R.create = (n, e) => new R({
|
|
|
1987
1987
|
shape: () => n,
|
|
1988
1988
|
unknownKeys: "strip",
|
|
1989
1989
|
catchall: ae.create(),
|
|
1990
|
-
typeName:
|
|
1990
|
+
typeName: w.ZodObject,
|
|
1991
1991
|
..._(e)
|
|
1992
1992
|
});
|
|
1993
1993
|
R.strictCreate = (n, e) => new R({
|
|
1994
1994
|
shape: () => n,
|
|
1995
1995
|
unknownKeys: "strict",
|
|
1996
1996
|
catchall: ae.create(),
|
|
1997
|
-
typeName:
|
|
1997
|
+
typeName: w.ZodObject,
|
|
1998
1998
|
..._(e)
|
|
1999
1999
|
});
|
|
2000
2000
|
R.lazycreate = (n, e) => new R({
|
|
2001
2001
|
shape: n,
|
|
2002
2002
|
unknownKeys: "strip",
|
|
2003
2003
|
catchall: ae.create(),
|
|
2004
|
-
typeName:
|
|
2004
|
+
typeName: w.ZodObject,
|
|
2005
2005
|
..._(e)
|
|
2006
2006
|
});
|
|
2007
|
-
class
|
|
2007
|
+
class Qe extends O {
|
|
2008
2008
|
_parse(e) {
|
|
2009
2009
|
const { ctx: t } = this._processInputParams(e), r = this._def.options;
|
|
2010
2010
|
function s(i) {
|
|
@@ -2072,12 +2072,12 @@ class Ke extends O {
|
|
|
2072
2072
|
return this._def.options;
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
|
-
|
|
2075
|
+
Qe.create = (n, e) => new Qe({
|
|
2076
2076
|
options: n,
|
|
2077
|
-
typeName:
|
|
2077
|
+
typeName: w.ZodUnion,
|
|
2078
2078
|
..._(e)
|
|
2079
2079
|
});
|
|
2080
|
-
const ne = (n) => n instanceof
|
|
2080
|
+
const ne = (n) => n instanceof nt ? ne(n.schema) : n instanceof Y ? ne(n.innerType()) : n instanceof rt ? [n.value] : n instanceof pe ? n.options : n instanceof st ? S.objectValues(n.enum) : n instanceof it ? ne(n._def.innerType) : n instanceof Xe ? [void 0] : n instanceof Ke ? [null] : n instanceof X ? [void 0, ...ne(n.unwrap())] : n instanceof me ? [null, ...ne(n.unwrap())] : n instanceof Kt || n instanceof ot ? ne(n.unwrap()) : n instanceof at ? ne(n._def.innerType) : [];
|
|
2081
2081
|
class It extends O {
|
|
2082
2082
|
_parse(e) {
|
|
2083
2083
|
const { ctx: t } = this._processInputParams(e);
|
|
@@ -2132,7 +2132,7 @@ class It extends O {
|
|
|
2132
2132
|
}
|
|
2133
2133
|
}
|
|
2134
2134
|
return new It({
|
|
2135
|
-
typeName:
|
|
2135
|
+
typeName: w.ZodDiscriminatedUnion,
|
|
2136
2136
|
discriminator: e,
|
|
2137
2137
|
options: t,
|
|
2138
2138
|
optionsMap: s,
|
|
@@ -2140,14 +2140,14 @@ class It extends O {
|
|
|
2140
2140
|
});
|
|
2141
2141
|
}
|
|
2142
2142
|
}
|
|
2143
|
-
function
|
|
2143
|
+
function Pt(n, e) {
|
|
2144
2144
|
const t = se(n), r = se(e);
|
|
2145
2145
|
if (n === e)
|
|
2146
2146
|
return { valid: !0, data: n };
|
|
2147
2147
|
if (t === g.object && r === g.object) {
|
|
2148
2148
|
const s = S.objectKeys(e), i = S.objectKeys(n).filter((o) => s.indexOf(o) !== -1), a = { ...n, ...e };
|
|
2149
2149
|
for (const o of i) {
|
|
2150
|
-
const c =
|
|
2150
|
+
const c = Pt(n[o], e[o]);
|
|
2151
2151
|
if (!c.valid)
|
|
2152
2152
|
return { valid: !1 };
|
|
2153
2153
|
a[o] = c.data;
|
|
@@ -2158,7 +2158,7 @@ function Lt(n, e) {
|
|
|
2158
2158
|
return { valid: !1 };
|
|
2159
2159
|
const s = [];
|
|
2160
2160
|
for (let i = 0; i < n.length; i++) {
|
|
2161
|
-
const a = n[i], o = e[i], c =
|
|
2161
|
+
const a = n[i], o = e[i], c = Pt(a, o);
|
|
2162
2162
|
if (!c.valid)
|
|
2163
2163
|
return { valid: !1 };
|
|
2164
2164
|
s.push(c.data);
|
|
@@ -2166,12 +2166,12 @@ function Lt(n, e) {
|
|
|
2166
2166
|
return { valid: !0, data: s };
|
|
2167
2167
|
} else return t === g.date && r === g.date && +n == +e ? { valid: !0, data: n } : { valid: !1 };
|
|
2168
2168
|
}
|
|
2169
|
-
class
|
|
2169
|
+
class et extends O {
|
|
2170
2170
|
_parse(e) {
|
|
2171
2171
|
const { status: t, ctx: r } = this._processInputParams(e), s = (i, a) => {
|
|
2172
2172
|
if (Ut(i) || Ut(a))
|
|
2173
2173
|
return x;
|
|
2174
|
-
const o =
|
|
2174
|
+
const o = Pt(i.value, a.value);
|
|
2175
2175
|
return o.valid ? ((Dt(i) || Dt(a)) && t.dirty(), { status: t.value, value: o.data }) : (m(r, {
|
|
2176
2176
|
code: f.invalid_intersection_types
|
|
2177
2177
|
}), x);
|
|
@@ -2198,10 +2198,10 @@ class Qe extends O {
|
|
|
2198
2198
|
}));
|
|
2199
2199
|
}
|
|
2200
2200
|
}
|
|
2201
|
-
|
|
2201
|
+
et.create = (n, e, t) => new et({
|
|
2202
2202
|
left: n,
|
|
2203
2203
|
right: e,
|
|
2204
|
-
typeName:
|
|
2204
|
+
typeName: w.ZodIntersection,
|
|
2205
2205
|
..._(t)
|
|
2206
2206
|
});
|
|
2207
2207
|
class Q extends O {
|
|
@@ -2232,7 +2232,7 @@ class Q extends O {
|
|
|
2232
2232
|
const c = this._def.items[o] || this._def.rest;
|
|
2233
2233
|
return c ? c._parse(new K(r, a, r.path, o)) : null;
|
|
2234
2234
|
}).filter((a) => !!a);
|
|
2235
|
-
return r.common.async ? Promise.all(i).then((a) =>
|
|
2235
|
+
return r.common.async ? Promise.all(i).then((a) => P.mergeArray(t, a)) : P.mergeArray(t, i);
|
|
2236
2236
|
}
|
|
2237
2237
|
get items() {
|
|
2238
2238
|
return this._def.items;
|
|
@@ -2249,12 +2249,12 @@ Q.create = (n, e) => {
|
|
|
2249
2249
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2250
2250
|
return new Q({
|
|
2251
2251
|
items: n,
|
|
2252
|
-
typeName:
|
|
2252
|
+
typeName: w.ZodTuple,
|
|
2253
2253
|
rest: null,
|
|
2254
2254
|
..._(e)
|
|
2255
2255
|
});
|
|
2256
2256
|
};
|
|
2257
|
-
class
|
|
2257
|
+
class tt extends O {
|
|
2258
2258
|
get keySchema() {
|
|
2259
2259
|
return this._def.keyType;
|
|
2260
2260
|
}
|
|
@@ -2276,21 +2276,21 @@ class et extends O {
|
|
|
2276
2276
|
value: a._parse(new K(r, r.data[o], r.path, o)),
|
|
2277
2277
|
alwaysSet: o in r.data
|
|
2278
2278
|
});
|
|
2279
|
-
return r.common.async ?
|
|
2279
|
+
return r.common.async ? P.mergeObjectAsync(t, s) : P.mergeObjectSync(t, s);
|
|
2280
2280
|
}
|
|
2281
2281
|
get element() {
|
|
2282
2282
|
return this._def.valueType;
|
|
2283
2283
|
}
|
|
2284
2284
|
static create(e, t, r) {
|
|
2285
|
-
return t instanceof O ? new
|
|
2285
|
+
return t instanceof O ? new tt({
|
|
2286
2286
|
keyType: e,
|
|
2287
2287
|
valueType: t,
|
|
2288
|
-
typeName:
|
|
2288
|
+
typeName: w.ZodRecord,
|
|
2289
2289
|
..._(r)
|
|
2290
|
-
}) : new
|
|
2290
|
+
}) : new tt({
|
|
2291
2291
|
keyType: q.create(),
|
|
2292
2292
|
valueType: e,
|
|
2293
|
-
typeName:
|
|
2293
|
+
typeName: w.ZodRecord,
|
|
2294
2294
|
..._(t)
|
|
2295
2295
|
});
|
|
2296
2296
|
}
|
|
@@ -2340,10 +2340,10 @@ class Ot extends O {
|
|
|
2340
2340
|
Ot.create = (n, e, t) => new Ot({
|
|
2341
2341
|
valueType: e,
|
|
2342
2342
|
keyType: n,
|
|
2343
|
-
typeName:
|
|
2343
|
+
typeName: w.ZodMap,
|
|
2344
2344
|
..._(t)
|
|
2345
2345
|
});
|
|
2346
|
-
class
|
|
2346
|
+
class Se extends O {
|
|
2347
2347
|
_parse(e) {
|
|
2348
2348
|
const { status: t, ctx: r } = this._processInputParams(e);
|
|
2349
2349
|
if (r.parsedType !== g.set)
|
|
@@ -2382,13 +2382,13 @@ class Oe extends O {
|
|
|
2382
2382
|
return r.common.async ? Promise.all(o).then((c) => a(c)) : a(o);
|
|
2383
2383
|
}
|
|
2384
2384
|
min(e, t) {
|
|
2385
|
-
return new
|
|
2385
|
+
return new Se({
|
|
2386
2386
|
...this._def,
|
|
2387
2387
|
minSize: { value: e, message: v.toString(t) }
|
|
2388
2388
|
});
|
|
2389
2389
|
}
|
|
2390
2390
|
max(e, t) {
|
|
2391
|
-
return new
|
|
2391
|
+
return new Se({
|
|
2392
2392
|
...this._def,
|
|
2393
2393
|
maxSize: { value: e, message: v.toString(t) }
|
|
2394
2394
|
});
|
|
@@ -2400,14 +2400,14 @@ class Oe extends O {
|
|
|
2400
2400
|
return this.min(1, e);
|
|
2401
2401
|
}
|
|
2402
2402
|
}
|
|
2403
|
-
|
|
2403
|
+
Se.create = (n, e) => new Se({
|
|
2404
2404
|
valueType: n,
|
|
2405
2405
|
minSize: null,
|
|
2406
2406
|
maxSize: null,
|
|
2407
|
-
typeName:
|
|
2407
|
+
typeName: w.ZodSet,
|
|
2408
2408
|
..._(e)
|
|
2409
2409
|
});
|
|
2410
|
-
class
|
|
2410
|
+
class $e extends O {
|
|
2411
2411
|
constructor() {
|
|
2412
2412
|
super(...arguments), this.validate = this.implement;
|
|
2413
2413
|
}
|
|
@@ -2420,14 +2420,14 @@ class Ee extends O {
|
|
|
2420
2420
|
received: t.parsedType
|
|
2421
2421
|
}), x;
|
|
2422
2422
|
function r(o, c) {
|
|
2423
|
-
return
|
|
2423
|
+
return wt({
|
|
2424
2424
|
data: o,
|
|
2425
2425
|
path: t.path,
|
|
2426
2426
|
errorMaps: [
|
|
2427
2427
|
t.common.contextualErrorMap,
|
|
2428
2428
|
t.schemaErrorMap,
|
|
2429
|
-
|
|
2430
|
-
|
|
2429
|
+
bt(),
|
|
2430
|
+
Ce
|
|
2431
2431
|
].filter((l) => !!l),
|
|
2432
2432
|
issueData: {
|
|
2433
2433
|
code: f.invalid_arguments,
|
|
@@ -2436,14 +2436,14 @@ class Ee extends O {
|
|
|
2436
2436
|
});
|
|
2437
2437
|
}
|
|
2438
2438
|
function s(o, c) {
|
|
2439
|
-
return
|
|
2439
|
+
return wt({
|
|
2440
2440
|
data: o,
|
|
2441
2441
|
path: t.path,
|
|
2442
2442
|
errorMaps: [
|
|
2443
2443
|
t.common.contextualErrorMap,
|
|
2444
2444
|
t.schemaErrorMap,
|
|
2445
|
-
|
|
2446
|
-
|
|
2445
|
+
bt(),
|
|
2446
|
+
Ce
|
|
2447
2447
|
].filter((l) => !!l),
|
|
2448
2448
|
issueData: {
|
|
2449
2449
|
code: f.invalid_return_type,
|
|
@@ -2452,7 +2452,7 @@ class Ee extends O {
|
|
|
2452
2452
|
});
|
|
2453
2453
|
}
|
|
2454
2454
|
const i = { errorMap: t.common.contextualErrorMap }, a = t.data;
|
|
2455
|
-
if (this._def.returns instanceof
|
|
2455
|
+
if (this._def.returns instanceof Me) {
|
|
2456
2456
|
const o = this;
|
|
2457
2457
|
return z(async function(...c) {
|
|
2458
2458
|
const l = new W([]), p = await o._def.args.parseAsync(c, i).catch((U) => {
|
|
@@ -2482,13 +2482,13 @@ class Ee extends O {
|
|
|
2482
2482
|
return this._def.returns;
|
|
2483
2483
|
}
|
|
2484
2484
|
args(...e) {
|
|
2485
|
-
return new
|
|
2485
|
+
return new $e({
|
|
2486
2486
|
...this._def,
|
|
2487
|
-
args: Q.create(e).rest(
|
|
2487
|
+
args: Q.create(e).rest(be.create())
|
|
2488
2488
|
});
|
|
2489
2489
|
}
|
|
2490
2490
|
returns(e) {
|
|
2491
|
-
return new
|
|
2491
|
+
return new $e({
|
|
2492
2492
|
...this._def,
|
|
2493
2493
|
returns: e
|
|
2494
2494
|
});
|
|
@@ -2500,15 +2500,15 @@ class Ee extends O {
|
|
|
2500
2500
|
return this.parse(e);
|
|
2501
2501
|
}
|
|
2502
2502
|
static create(e, t, r) {
|
|
2503
|
-
return new
|
|
2504
|
-
args: e || Q.create([]).rest(
|
|
2505
|
-
returns: t ||
|
|
2506
|
-
typeName:
|
|
2503
|
+
return new $e({
|
|
2504
|
+
args: e || Q.create([]).rest(be.create()),
|
|
2505
|
+
returns: t || be.create(),
|
|
2506
|
+
typeName: w.ZodFunction,
|
|
2507
2507
|
..._(r)
|
|
2508
2508
|
});
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
|
-
class
|
|
2511
|
+
class nt extends O {
|
|
2512
2512
|
get schema() {
|
|
2513
2513
|
return this._def.getter();
|
|
2514
2514
|
}
|
|
@@ -2517,12 +2517,12 @@ class tt extends O {
|
|
|
2517
2517
|
return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
|
|
2518
2518
|
}
|
|
2519
2519
|
}
|
|
2520
|
-
|
|
2520
|
+
nt.create = (n, e) => new nt({
|
|
2521
2521
|
getter: n,
|
|
2522
|
-
typeName:
|
|
2522
|
+
typeName: w.ZodLazy,
|
|
2523
2523
|
..._(e)
|
|
2524
2524
|
});
|
|
2525
|
-
class
|
|
2525
|
+
class rt extends O {
|
|
2526
2526
|
_parse(e) {
|
|
2527
2527
|
if (e.data !== this._def.value) {
|
|
2528
2528
|
const t = this._getOrReturnCtx(e);
|
|
@@ -2538,21 +2538,21 @@ class nt extends O {
|
|
|
2538
2538
|
return this._def.value;
|
|
2539
2539
|
}
|
|
2540
2540
|
}
|
|
2541
|
-
|
|
2541
|
+
rt.create = (n, e) => new rt({
|
|
2542
2542
|
value: n,
|
|
2543
|
-
typeName:
|
|
2543
|
+
typeName: w.ZodLiteral,
|
|
2544
2544
|
..._(e)
|
|
2545
2545
|
});
|
|
2546
2546
|
function Dn(n, e) {
|
|
2547
|
-
return new
|
|
2547
|
+
return new pe({
|
|
2548
2548
|
values: n,
|
|
2549
|
-
typeName:
|
|
2549
|
+
typeName: w.ZodEnum,
|
|
2550
2550
|
..._(e)
|
|
2551
2551
|
});
|
|
2552
2552
|
}
|
|
2553
|
-
class
|
|
2553
|
+
class pe extends O {
|
|
2554
2554
|
constructor() {
|
|
2555
|
-
super(...arguments),
|
|
2555
|
+
super(...arguments), Ze.set(this, void 0);
|
|
2556
2556
|
}
|
|
2557
2557
|
_parse(e) {
|
|
2558
2558
|
if (typeof e.data != "string") {
|
|
@@ -2563,7 +2563,7 @@ class fe extends O {
|
|
|
2563
2563
|
code: f.invalid_type
|
|
2564
2564
|
}), x;
|
|
2565
2565
|
}
|
|
2566
|
-
if (xt(this,
|
|
2566
|
+
if (xt(this, Ze) || jn(this, Ze, new Set(this._def.values)), !xt(this, Ze).has(e.data)) {
|
|
2567
2567
|
const t = this._getOrReturnCtx(e), r = this._def.values;
|
|
2568
2568
|
return m(t, {
|
|
2569
2569
|
received: t.data,
|
|
@@ -2595,23 +2595,23 @@ class fe extends O {
|
|
|
2595
2595
|
return e;
|
|
2596
2596
|
}
|
|
2597
2597
|
extract(e, t = this._def) {
|
|
2598
|
-
return
|
|
2598
|
+
return pe.create(e, {
|
|
2599
2599
|
...this._def,
|
|
2600
2600
|
...t
|
|
2601
2601
|
});
|
|
2602
2602
|
}
|
|
2603
2603
|
exclude(e, t = this._def) {
|
|
2604
|
-
return
|
|
2604
|
+
return pe.create(this.options.filter((r) => !e.includes(r)), {
|
|
2605
2605
|
...this._def,
|
|
2606
2606
|
...t
|
|
2607
2607
|
});
|
|
2608
2608
|
}
|
|
2609
2609
|
}
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
class
|
|
2610
|
+
Ze = /* @__PURE__ */ new WeakMap();
|
|
2611
|
+
pe.create = Dn;
|
|
2612
|
+
class st extends O {
|
|
2613
2613
|
constructor() {
|
|
2614
|
-
super(...arguments),
|
|
2614
|
+
super(...arguments), Be.set(this, void 0);
|
|
2615
2615
|
}
|
|
2616
2616
|
_parse(e) {
|
|
2617
2617
|
const t = S.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(e);
|
|
@@ -2623,7 +2623,7 @@ class rt extends O {
|
|
|
2623
2623
|
code: f.invalid_type
|
|
2624
2624
|
}), x;
|
|
2625
2625
|
}
|
|
2626
|
-
if (xt(this,
|
|
2626
|
+
if (xt(this, Be) || jn(this, Be, new Set(S.getValidEnumValues(this._def.values))), !xt(this, Be).has(e.data)) {
|
|
2627
2627
|
const s = S.objectValues(t);
|
|
2628
2628
|
return m(r, {
|
|
2629
2629
|
received: r.data,
|
|
@@ -2637,13 +2637,13 @@ class rt extends O {
|
|
|
2637
2637
|
return this._def.values;
|
|
2638
2638
|
}
|
|
2639
2639
|
}
|
|
2640
|
-
|
|
2641
|
-
|
|
2640
|
+
Be = /* @__PURE__ */ new WeakMap();
|
|
2641
|
+
st.create = (n, e) => new st({
|
|
2642
2642
|
values: n,
|
|
2643
|
-
typeName:
|
|
2643
|
+
typeName: w.ZodNativeEnum,
|
|
2644
2644
|
..._(e)
|
|
2645
2645
|
});
|
|
2646
|
-
class
|
|
2646
|
+
class Me extends O {
|
|
2647
2647
|
unwrap() {
|
|
2648
2648
|
return this._def.type;
|
|
2649
2649
|
}
|
|
@@ -2662,9 +2662,9 @@ class Re extends O {
|
|
|
2662
2662
|
})));
|
|
2663
2663
|
}
|
|
2664
2664
|
}
|
|
2665
|
-
|
|
2665
|
+
Me.create = (n, e) => new Me({
|
|
2666
2666
|
type: n,
|
|
2667
|
-
typeName:
|
|
2667
|
+
typeName: w.ZodPromise,
|
|
2668
2668
|
..._(e)
|
|
2669
2669
|
});
|
|
2670
2670
|
class Y extends O {
|
|
@@ -2672,7 +2672,7 @@ class Y extends O {
|
|
|
2672
2672
|
return this._def.schema;
|
|
2673
2673
|
}
|
|
2674
2674
|
sourceType() {
|
|
2675
|
-
return this._def.schema._def.typeName ===
|
|
2675
|
+
return this._def.schema._def.typeName === w.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
2676
2676
|
}
|
|
2677
2677
|
_parse(e) {
|
|
2678
2678
|
const { status: t, ctx: r } = this._processInputParams(e), s = this._def.effect || null, i = {
|
|
@@ -2694,7 +2694,7 @@ class Y extends O {
|
|
|
2694
2694
|
path: r.path,
|
|
2695
2695
|
parent: r
|
|
2696
2696
|
});
|
|
2697
|
-
return c.status === "aborted" ? x : c.status === "dirty" || t.value === "dirty" ?
|
|
2697
|
+
return c.status === "aborted" ? x : c.status === "dirty" || t.value === "dirty" ? Ae(c.value) : c;
|
|
2698
2698
|
});
|
|
2699
2699
|
{
|
|
2700
2700
|
if (t.value === "aborted")
|
|
@@ -2704,7 +2704,7 @@ class Y extends O {
|
|
|
2704
2704
|
path: r.path,
|
|
2705
2705
|
parent: r
|
|
2706
2706
|
});
|
|
2707
|
-
return o.status === "aborted" ? x : o.status === "dirty" || t.value === "dirty" ?
|
|
2707
|
+
return o.status === "aborted" ? x : o.status === "dirty" || t.value === "dirty" ? Ae(o.value) : o;
|
|
2708
2708
|
}
|
|
2709
2709
|
}
|
|
2710
2710
|
if (s.type === "refinement") {
|
|
@@ -2733,27 +2733,27 @@ class Y extends O {
|
|
|
2733
2733
|
path: r.path,
|
|
2734
2734
|
parent: r
|
|
2735
2735
|
});
|
|
2736
|
-
if (!
|
|
2736
|
+
if (!Te(a))
|
|
2737
2737
|
return a;
|
|
2738
2738
|
const o = s.transform(a.value, i);
|
|
2739
2739
|
if (o instanceof Promise)
|
|
2740
2740
|
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
2741
2741
|
return { status: t.value, value: o };
|
|
2742
2742
|
} else
|
|
2743
|
-
return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((a) =>
|
|
2743
|
+
return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((a) => Te(a) ? Promise.resolve(s.transform(a.value, i)).then((o) => ({ status: t.value, value: o })) : a);
|
|
2744
2744
|
S.assertNever(s);
|
|
2745
2745
|
}
|
|
2746
2746
|
}
|
|
2747
2747
|
Y.create = (n, e, t) => new Y({
|
|
2748
2748
|
schema: n,
|
|
2749
|
-
typeName:
|
|
2749
|
+
typeName: w.ZodEffects,
|
|
2750
2750
|
effect: e,
|
|
2751
2751
|
..._(t)
|
|
2752
2752
|
});
|
|
2753
2753
|
Y.createWithPreprocess = (n, e, t) => new Y({
|
|
2754
2754
|
schema: e,
|
|
2755
2755
|
effect: { type: "preprocess", transform: n },
|
|
2756
|
-
typeName:
|
|
2756
|
+
typeName: w.ZodEffects,
|
|
2757
2757
|
..._(t)
|
|
2758
2758
|
});
|
|
2759
2759
|
class X extends O {
|
|
@@ -2766,10 +2766,10 @@ class X extends O {
|
|
|
2766
2766
|
}
|
|
2767
2767
|
X.create = (n, e) => new X({
|
|
2768
2768
|
innerType: n,
|
|
2769
|
-
typeName:
|
|
2769
|
+
typeName: w.ZodOptional,
|
|
2770
2770
|
..._(e)
|
|
2771
2771
|
});
|
|
2772
|
-
class
|
|
2772
|
+
class me extends O {
|
|
2773
2773
|
_parse(e) {
|
|
2774
2774
|
return this._getType(e) === g.null ? z(null) : this._def.innerType._parse(e);
|
|
2775
2775
|
}
|
|
@@ -2777,12 +2777,12 @@ class pe extends O {
|
|
|
2777
2777
|
return this._def.innerType;
|
|
2778
2778
|
}
|
|
2779
2779
|
}
|
|
2780
|
-
|
|
2780
|
+
me.create = (n, e) => new me({
|
|
2781
2781
|
innerType: n,
|
|
2782
|
-
typeName:
|
|
2782
|
+
typeName: w.ZodNullable,
|
|
2783
2783
|
..._(e)
|
|
2784
2784
|
});
|
|
2785
|
-
class
|
|
2785
|
+
class it extends O {
|
|
2786
2786
|
_parse(e) {
|
|
2787
2787
|
const { ctx: t } = this._processInputParams(e);
|
|
2788
2788
|
let r = t.data;
|
|
@@ -2796,13 +2796,13 @@ class st extends O {
|
|
|
2796
2796
|
return this._def.innerType;
|
|
2797
2797
|
}
|
|
2798
2798
|
}
|
|
2799
|
-
|
|
2799
|
+
it.create = (n, e) => new it({
|
|
2800
2800
|
innerType: n,
|
|
2801
|
-
typeName:
|
|
2801
|
+
typeName: w.ZodDefault,
|
|
2802
2802
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
2803
2803
|
..._(e)
|
|
2804
2804
|
});
|
|
2805
|
-
class
|
|
2805
|
+
class at extends O {
|
|
2806
2806
|
_parse(e) {
|
|
2807
2807
|
const { ctx: t } = this._processInputParams(e), r = {
|
|
2808
2808
|
...t,
|
|
@@ -2817,7 +2817,7 @@ class it extends O {
|
|
|
2817
2817
|
...r
|
|
2818
2818
|
}
|
|
2819
2819
|
});
|
|
2820
|
-
return
|
|
2820
|
+
return Je(s) ? s.then((i) => ({
|
|
2821
2821
|
status: "valid",
|
|
2822
2822
|
value: i.status === "valid" ? i.value : this._def.catchValue({
|
|
2823
2823
|
get error() {
|
|
@@ -2839,9 +2839,9 @@ class it extends O {
|
|
|
2839
2839
|
return this._def.innerType;
|
|
2840
2840
|
}
|
|
2841
2841
|
}
|
|
2842
|
-
|
|
2842
|
+
at.create = (n, e) => new at({
|
|
2843
2843
|
innerType: n,
|
|
2844
|
-
typeName:
|
|
2844
|
+
typeName: w.ZodCatch,
|
|
2845
2845
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2846
2846
|
..._(e)
|
|
2847
2847
|
});
|
|
@@ -2859,7 +2859,7 @@ class St extends O {
|
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
2861
|
St.create = (n) => new St({
|
|
2862
|
-
typeName:
|
|
2862
|
+
typeName: w.ZodNaN,
|
|
2863
2863
|
..._(n)
|
|
2864
2864
|
});
|
|
2865
2865
|
const os = Symbol("zod_brand");
|
|
@@ -2876,7 +2876,7 @@ class Kt extends O {
|
|
|
2876
2876
|
return this._def.type;
|
|
2877
2877
|
}
|
|
2878
2878
|
}
|
|
2879
|
-
class
|
|
2879
|
+
class lt extends O {
|
|
2880
2880
|
_parse(e) {
|
|
2881
2881
|
const { status: t, ctx: r } = this._processInputParams(e);
|
|
2882
2882
|
if (r.common.async)
|
|
@@ -2886,7 +2886,7 @@ class ct extends O {
|
|
|
2886
2886
|
path: r.path,
|
|
2887
2887
|
parent: r
|
|
2888
2888
|
});
|
|
2889
|
-
return i.status === "aborted" ? x : i.status === "dirty" ? (t.dirty(),
|
|
2889
|
+
return i.status === "aborted" ? x : i.status === "dirty" ? (t.dirty(), Ae(i.value)) : this._def.out._parseAsync({
|
|
2890
2890
|
data: i.value,
|
|
2891
2891
|
path: r.path,
|
|
2892
2892
|
parent: r
|
|
@@ -2909,33 +2909,33 @@ class ct extends O {
|
|
|
2909
2909
|
}
|
|
2910
2910
|
}
|
|
2911
2911
|
static create(e, t) {
|
|
2912
|
-
return new
|
|
2912
|
+
return new lt({
|
|
2913
2913
|
in: e,
|
|
2914
2914
|
out: t,
|
|
2915
|
-
typeName:
|
|
2915
|
+
typeName: w.ZodPipeline
|
|
2916
2916
|
});
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
|
-
class
|
|
2919
|
+
class ot extends O {
|
|
2920
2920
|
_parse(e) {
|
|
2921
|
-
const t = this._def.innerType._parse(e), r = (s) => (
|
|
2922
|
-
return
|
|
2921
|
+
const t = this._def.innerType._parse(e), r = (s) => (Te(s) && (s.value = Object.freeze(s.value)), s);
|
|
2922
|
+
return Je(t) ? t.then((s) => r(s)) : r(t);
|
|
2923
2923
|
}
|
|
2924
2924
|
unwrap() {
|
|
2925
2925
|
return this._def.innerType;
|
|
2926
2926
|
}
|
|
2927
2927
|
}
|
|
2928
|
-
|
|
2928
|
+
ot.create = (n, e) => new ot({
|
|
2929
2929
|
innerType: n,
|
|
2930
|
-
typeName:
|
|
2930
|
+
typeName: w.ZodReadonly,
|
|
2931
2931
|
..._(e)
|
|
2932
2932
|
});
|
|
2933
2933
|
function yn(n, e) {
|
|
2934
2934
|
const t = typeof n == "function" ? n(e) : typeof n == "string" ? { message: n } : n;
|
|
2935
2935
|
return typeof t == "string" ? { message: t } : t;
|
|
2936
2936
|
}
|
|
2937
|
-
function
|
|
2938
|
-
return n ?
|
|
2937
|
+
function Pn(n, e = {}, t) {
|
|
2938
|
+
return n ? Re.create().superRefine((r, s) => {
|
|
2939
2939
|
var i, a;
|
|
2940
2940
|
const o = n(r);
|
|
2941
2941
|
if (o instanceof Promise)
|
|
@@ -2950,43 +2950,43 @@ function Ln(n, e = {}, t) {
|
|
|
2950
2950
|
const c = yn(e, r), l = (a = (i = c.fatal) !== null && i !== void 0 ? i : t) !== null && a !== void 0 ? a : !0;
|
|
2951
2951
|
s.addIssue({ code: "custom", ...c, fatal: l });
|
|
2952
2952
|
}
|
|
2953
|
-
}) :
|
|
2953
|
+
}) : Re.create();
|
|
2954
2954
|
}
|
|
2955
2955
|
const us = {
|
|
2956
2956
|
object: R.lazycreate
|
|
2957
2957
|
};
|
|
2958
|
-
var
|
|
2958
|
+
var w;
|
|
2959
2959
|
(function(n) {
|
|
2960
2960
|
n.ZodString = "ZodString", n.ZodNumber = "ZodNumber", n.ZodNaN = "ZodNaN", n.ZodBigInt = "ZodBigInt", n.ZodBoolean = "ZodBoolean", n.ZodDate = "ZodDate", n.ZodSymbol = "ZodSymbol", n.ZodUndefined = "ZodUndefined", n.ZodNull = "ZodNull", n.ZodAny = "ZodAny", n.ZodUnknown = "ZodUnknown", n.ZodNever = "ZodNever", n.ZodVoid = "ZodVoid", n.ZodArray = "ZodArray", n.ZodObject = "ZodObject", n.ZodUnion = "ZodUnion", n.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", n.ZodIntersection = "ZodIntersection", n.ZodTuple = "ZodTuple", n.ZodRecord = "ZodRecord", n.ZodMap = "ZodMap", n.ZodSet = "ZodSet", n.ZodFunction = "ZodFunction", n.ZodLazy = "ZodLazy", n.ZodLiteral = "ZodLiteral", n.ZodEnum = "ZodEnum", n.ZodEffects = "ZodEffects", n.ZodNativeEnum = "ZodNativeEnum", n.ZodOptional = "ZodOptional", n.ZodNullable = "ZodNullable", n.ZodDefault = "ZodDefault", n.ZodCatch = "ZodCatch", n.ZodPromise = "ZodPromise", n.ZodBranded = "ZodBranded", n.ZodPipeline = "ZodPipeline", n.ZodReadonly = "ZodReadonly";
|
|
2961
|
-
})(
|
|
2961
|
+
})(w || (w = {}));
|
|
2962
2962
|
const cs = (n, e = {
|
|
2963
2963
|
message: `Input not instance of ${n.name}`
|
|
2964
|
-
}) =>
|
|
2964
|
+
}) => Pn((t) => t instanceof n, e), Ln = q.create, zn = he.create, ls = St.create, ds = fe.create, Wn = He.create, hs = Oe.create, fs = _t.create, ps = Xe.create, ms = Ke.create, ys = Re.create, gs = be.create, vs = ae.create, bs = Tt.create, ws = F.create, xs = R.create, _s = R.strictCreate, Ts = Qe.create, Os = It.create, Ss = et.create, Ns = Q.create, Is = tt.create, ks = Ot.create, As = Se.create, Es = $e.create, $s = nt.create, Cs = rt.create, Rs = pe.create, Ms = st.create, js = Me.create, gn = Y.create, Zs = X.create, Bs = me.create, Us = Y.createWithPreprocess, Ds = lt.create, Ps = () => Ln().optional(), Ls = () => zn().optional(), zs = () => Wn().optional(), Ws = {
|
|
2965
2965
|
string: (n) => q.create({ ...n, coerce: !0 }),
|
|
2966
|
-
number: (n) =>
|
|
2967
|
-
boolean: (n) =>
|
|
2966
|
+
number: (n) => he.create({ ...n, coerce: !0 }),
|
|
2967
|
+
boolean: (n) => He.create({
|
|
2968
2968
|
...n,
|
|
2969
2969
|
coerce: !0
|
|
2970
2970
|
}),
|
|
2971
|
-
bigint: (n) =>
|
|
2972
|
-
date: (n) =>
|
|
2971
|
+
bigint: (n) => fe.create({ ...n, coerce: !0 }),
|
|
2972
|
+
date: (n) => Oe.create({ ...n, coerce: !0 })
|
|
2973
2973
|
}, Vs = x;
|
|
2974
2974
|
var u = /* @__PURE__ */ Object.freeze({
|
|
2975
2975
|
__proto__: null,
|
|
2976
|
-
defaultErrorMap:
|
|
2976
|
+
defaultErrorMap: Ce,
|
|
2977
2977
|
setErrorMap: Ur,
|
|
2978
|
-
getErrorMap:
|
|
2979
|
-
makeIssue:
|
|
2978
|
+
getErrorMap: bt,
|
|
2979
|
+
makeIssue: wt,
|
|
2980
2980
|
EMPTY_PATH: Dr,
|
|
2981
2981
|
addIssueToContext: m,
|
|
2982
|
-
ParseStatus:
|
|
2982
|
+
ParseStatus: P,
|
|
2983
2983
|
INVALID: x,
|
|
2984
|
-
DIRTY:
|
|
2984
|
+
DIRTY: Ae,
|
|
2985
2985
|
OK: z,
|
|
2986
2986
|
isAborted: Ut,
|
|
2987
2987
|
isDirty: Dt,
|
|
2988
|
-
isValid:
|
|
2989
|
-
isAsync:
|
|
2988
|
+
isValid: Te,
|
|
2989
|
+
isAsync: Je,
|
|
2990
2990
|
get util() {
|
|
2991
2991
|
return S;
|
|
2992
2992
|
},
|
|
@@ -2998,53 +2998,53 @@ var u = /* @__PURE__ */ Object.freeze({
|
|
|
2998
2998
|
ZodType: O,
|
|
2999
2999
|
datetimeRegex: Un,
|
|
3000
3000
|
ZodString: q,
|
|
3001
|
-
ZodNumber:
|
|
3002
|
-
ZodBigInt:
|
|
3003
|
-
ZodBoolean:
|
|
3004
|
-
ZodDate:
|
|
3001
|
+
ZodNumber: he,
|
|
3002
|
+
ZodBigInt: fe,
|
|
3003
|
+
ZodBoolean: He,
|
|
3004
|
+
ZodDate: Oe,
|
|
3005
3005
|
ZodSymbol: _t,
|
|
3006
|
-
ZodUndefined:
|
|
3007
|
-
ZodNull:
|
|
3008
|
-
ZodAny:
|
|
3009
|
-
ZodUnknown:
|
|
3006
|
+
ZodUndefined: Xe,
|
|
3007
|
+
ZodNull: Ke,
|
|
3008
|
+
ZodAny: Re,
|
|
3009
|
+
ZodUnknown: be,
|
|
3010
3010
|
ZodNever: ae,
|
|
3011
3011
|
ZodVoid: Tt,
|
|
3012
3012
|
ZodArray: F,
|
|
3013
3013
|
ZodObject: R,
|
|
3014
|
-
ZodUnion:
|
|
3014
|
+
ZodUnion: Qe,
|
|
3015
3015
|
ZodDiscriminatedUnion: It,
|
|
3016
|
-
ZodIntersection:
|
|
3016
|
+
ZodIntersection: et,
|
|
3017
3017
|
ZodTuple: Q,
|
|
3018
|
-
ZodRecord:
|
|
3018
|
+
ZodRecord: tt,
|
|
3019
3019
|
ZodMap: Ot,
|
|
3020
|
-
ZodSet:
|
|
3021
|
-
ZodFunction:
|
|
3022
|
-
ZodLazy:
|
|
3023
|
-
ZodLiteral:
|
|
3024
|
-
ZodEnum:
|
|
3025
|
-
ZodNativeEnum:
|
|
3026
|
-
ZodPromise:
|
|
3020
|
+
ZodSet: Se,
|
|
3021
|
+
ZodFunction: $e,
|
|
3022
|
+
ZodLazy: nt,
|
|
3023
|
+
ZodLiteral: rt,
|
|
3024
|
+
ZodEnum: pe,
|
|
3025
|
+
ZodNativeEnum: st,
|
|
3026
|
+
ZodPromise: Me,
|
|
3027
3027
|
ZodEffects: Y,
|
|
3028
3028
|
ZodTransformer: Y,
|
|
3029
3029
|
ZodOptional: X,
|
|
3030
|
-
ZodNullable:
|
|
3031
|
-
ZodDefault:
|
|
3032
|
-
ZodCatch:
|
|
3030
|
+
ZodNullable: me,
|
|
3031
|
+
ZodDefault: it,
|
|
3032
|
+
ZodCatch: at,
|
|
3033
3033
|
ZodNaN: St,
|
|
3034
3034
|
BRAND: os,
|
|
3035
3035
|
ZodBranded: Kt,
|
|
3036
|
-
ZodPipeline:
|
|
3037
|
-
ZodReadonly:
|
|
3038
|
-
custom:
|
|
3036
|
+
ZodPipeline: lt,
|
|
3037
|
+
ZodReadonly: ot,
|
|
3038
|
+
custom: Pn,
|
|
3039
3039
|
Schema: O,
|
|
3040
3040
|
ZodSchema: O,
|
|
3041
3041
|
late: us,
|
|
3042
3042
|
get ZodFirstPartyTypeKind() {
|
|
3043
|
-
return
|
|
3043
|
+
return w;
|
|
3044
3044
|
},
|
|
3045
3045
|
coerce: Ws,
|
|
3046
3046
|
any: ys,
|
|
3047
|
-
array:
|
|
3047
|
+
array: ws,
|
|
3048
3048
|
bigint: ds,
|
|
3049
3049
|
boolean: Wn,
|
|
3050
3050
|
date: hs,
|
|
@@ -3065,23 +3065,23 @@ var u = /* @__PURE__ */ Object.freeze({
|
|
|
3065
3065
|
number: zn,
|
|
3066
3066
|
object: xs,
|
|
3067
3067
|
oboolean: zs,
|
|
3068
|
-
onumber:
|
|
3068
|
+
onumber: Ls,
|
|
3069
3069
|
optional: Zs,
|
|
3070
|
-
ostring:
|
|
3070
|
+
ostring: Ps,
|
|
3071
3071
|
pipeline: Ds,
|
|
3072
3072
|
preprocess: Us,
|
|
3073
3073
|
promise: js,
|
|
3074
3074
|
record: Is,
|
|
3075
3075
|
set: As,
|
|
3076
3076
|
strictObject: _s,
|
|
3077
|
-
string:
|
|
3077
|
+
string: Ln,
|
|
3078
3078
|
symbol: fs,
|
|
3079
3079
|
transformer: gn,
|
|
3080
3080
|
tuple: Ns,
|
|
3081
3081
|
undefined: ps,
|
|
3082
3082
|
union: Ts,
|
|
3083
3083
|
unknown: gs,
|
|
3084
|
-
void:
|
|
3084
|
+
void: bs,
|
|
3085
3085
|
NEVER: Vs,
|
|
3086
3086
|
ZodIssueCode: f,
|
|
3087
3087
|
quotelessJson: Br,
|
|
@@ -3122,7 +3122,7 @@ const Qt = u.object({ width: u.number(), height: u.number() }), Gs = u.object({
|
|
|
3122
3122
|
u.enum(Js);
|
|
3123
3123
|
const Hs = ["start", "center", "end"], Xs = ["signedWidth", "signedHeight"];
|
|
3124
3124
|
u.enum(Xs);
|
|
3125
|
-
const
|
|
3125
|
+
const ut = u.object({ x: u.number(), y: u.number() }), Vn = u.object({ clientX: u.number(), clientY: u.number() }), qn = ["x", "y"], Fn = u.enum(qn), Yn = ["top", "right", "bottom", "left"];
|
|
3126
3126
|
u.enum(Yn);
|
|
3127
3127
|
const en = ["left", "right"], Gn = u.enum(en), tn = ["top", "bottom"], Jn = u.enum(tn), Hn = ["center"], vn = u.enum(Hn), Ks = [...Yn, ...Hn], Xn = u.enum(Ks);
|
|
3128
3128
|
u.enum(Hs);
|
|
@@ -3133,16 +3133,16 @@ u.union([ei, kt]);
|
|
|
3133
3133
|
u.union([ti, kt]);
|
|
3134
3134
|
u.enum([...Fn.options, ...Xn.options]);
|
|
3135
3135
|
u.union([Fn, Xn, u.instanceof(String)]);
|
|
3136
|
-
const ni = (n) => typeof n == "bigint" || n instanceof BigInt,
|
|
3136
|
+
const ni = (n) => typeof n == "bigint" || n instanceof BigInt, Ie = (n, e) => ni(n) ? n.valueOf() * BigInt(e.valueOf()) : n.valueOf() * Number(e.valueOf()), we = (n, e) => {
|
|
3137
3137
|
const t = {};
|
|
3138
3138
|
if (typeof n == "number" || typeof n == "bigint")
|
|
3139
3139
|
e != null ? (t.lower = n, t.upper = e) : (t.lower = typeof n == "bigint" ? 0n : 0, t.upper = n);
|
|
3140
3140
|
else if (Array.isArray(n)) {
|
|
3141
3141
|
if (n.length !== 2) throw new Error("bounds: expected array of length 2");
|
|
3142
3142
|
[t.lower, t.upper] = n;
|
|
3143
|
-
} else return
|
|
3144
|
-
return
|
|
3145
|
-
},
|
|
3143
|
+
} else return bn(n);
|
|
3144
|
+
return bn(t);
|
|
3145
|
+
}, bn = (n) => n.lower > n.upper ? { lower: n.upper, upper: n.lower } : n, wn = (n, e) => {
|
|
3146
3146
|
const t = we(n);
|
|
3147
3147
|
return e < t.lower ? t.lower : e >= t.upper ? t.upper - (typeof t.upper == "number" ? 1 : 1n) : e;
|
|
3148
3148
|
}, nn = (n) => qn.includes(n) ? n : tn.includes(n) ? "y" : "x";
|
|
@@ -3150,140 +3150,144 @@ u.object({
|
|
|
3150
3150
|
x: Gn.or(vn),
|
|
3151
3151
|
y: Jn.or(vn)
|
|
3152
3152
|
});
|
|
3153
|
-
const ri = u.object({ x: Gn, y: Jn }), rn = Object.freeze({ x: "left", y: "top" }), si = Object.freeze({ x: "right", y: "top" }), Kn = Object.freeze({ x: "left", y: "bottom" }), ii = Object.freeze({ x: "right", y: "bottom" }), Qn = (n, e) => n.x === e.x && n.y === e.y,
|
|
3153
|
+
const ri = u.object({ x: Gn, y: Jn }), rn = Object.freeze({ x: "left", y: "top" }), si = Object.freeze({ x: "right", y: "top" }), Kn = Object.freeze({ x: "left", y: "bottom" }), ii = Object.freeze({ x: "right", y: "bottom" }), ai = Object.freeze({ x: "center", y: "top" }), oi = Object.freeze({ x: "center", y: "bottom" }), ui = Object.freeze({ x: "right", y: "center" }), ci = Object.freeze({ x: "left", y: "center" }), Qn = (n, e) => n.x === e.x && n.y === e.y, li = (n) => [n.x, n.y], Lt = u.union([
|
|
3154
3154
|
u.number(),
|
|
3155
|
-
|
|
3155
|
+
ut,
|
|
3156
3156
|
kt,
|
|
3157
3157
|
Qt,
|
|
3158
3158
|
Gs,
|
|
3159
3159
|
Vn
|
|
3160
|
-
]),
|
|
3160
|
+
]), E = (n, e) => {
|
|
3161
3161
|
if (typeof n == "string") {
|
|
3162
3162
|
if (e === void 0) throw new Error("The y coordinate must be given.");
|
|
3163
3163
|
return n === "x" ? { x: e, y: 0 } : { x: 0, y: e };
|
|
3164
3164
|
}
|
|
3165
3165
|
return typeof n == "number" ? { x: n, y: e ?? n } : Array.isArray(n) ? { x: n[0], y: n[1] } : "signedWidth" in n ? { x: n.signedWidth, y: n.signedHeight } : "clientX" in n ? { x: n.clientX, y: n.clientY } : "width" in n ? { x: n.width, y: n.height } : { x: n.x, y: n.y };
|
|
3166
|
-
}, ee = Object.freeze({ x: 0, y: 0 }), er = Object.freeze({ x: 1, y: 1 }),
|
|
3167
|
-
const r =
|
|
3166
|
+
}, ee = Object.freeze({ x: 0, y: 0 }), er = Object.freeze({ x: 1, y: 1 }), di = Object.freeze({ x: 1 / 0, y: 1 / 0 }), hi = Object.freeze({ x: NaN, y: NaN }), Nt = (n, e, t = 0) => {
|
|
3167
|
+
const r = E(n), s = E(e);
|
|
3168
3168
|
return t === 0 ? r.x === s.x && r.y === s.y : Math.abs(r.x - s.x) <= t && Math.abs(r.y - s.y) <= t;
|
|
3169
|
-
},
|
|
3170
|
-
const r =
|
|
3169
|
+
}, fi = (n) => Nt(n, ee), sn = (n, e, t) => {
|
|
3170
|
+
const r = E(n), s = E(e, t);
|
|
3171
3171
|
return { x: r.x * s.x, y: r.y * s.y };
|
|
3172
3172
|
}, tr = (n, e) => {
|
|
3173
|
-
const t =
|
|
3173
|
+
const t = E(n);
|
|
3174
3174
|
return { x: t.x + e, y: t.y };
|
|
3175
3175
|
}, nr = (n, e) => {
|
|
3176
|
-
const t =
|
|
3176
|
+
const t = E(n);
|
|
3177
3177
|
return { x: t.x, y: t.y + e };
|
|
3178
|
-
},
|
|
3179
|
-
const a =
|
|
3178
|
+
}, ct = (n, e, t, ...r) => typeof e == "string" && typeof t == "number" ? e === "x" ? tr(n, t) : nr(n, t) : [n, e, t ?? ee, ...r].reduce((s, i) => {
|
|
3179
|
+
const a = E(i);
|
|
3180
3180
|
return { x: s.x + a.x, y: s.y + a.y };
|
|
3181
|
-
}, ee),
|
|
3182
|
-
const r =
|
|
3181
|
+
}, ee), pi = (n, e, t) => {
|
|
3182
|
+
const r = E(n);
|
|
3183
3183
|
return e === "x" ? { x: t, y: r.y } : { x: r.x, y: t };
|
|
3184
|
-
},
|
|
3185
|
-
const t =
|
|
3184
|
+
}, mi = (n, e) => {
|
|
3185
|
+
const t = E(n), r = E(e);
|
|
3186
3186
|
return Math.sqrt((t.x - r.x) ** 2 + (t.y - r.y) ** 2);
|
|
3187
|
-
},
|
|
3188
|
-
const t =
|
|
3187
|
+
}, yi = (n, e) => {
|
|
3188
|
+
const t = E(n), r = E(e);
|
|
3189
3189
|
return { x: r.x - t.x, y: r.y - t.y };
|
|
3190
|
-
},
|
|
3191
|
-
const e =
|
|
3190
|
+
}, gi = (n) => {
|
|
3191
|
+
const e = E(n);
|
|
3192
3192
|
return Number.isNaN(e.x) || Number.isNaN(e.y);
|
|
3193
|
-
},
|
|
3194
|
-
const e =
|
|
3193
|
+
}, vi = (n) => {
|
|
3194
|
+
const e = E(n);
|
|
3195
3195
|
return Number.isFinite(e.x) && Number.isFinite(e.y);
|
|
3196
|
-
},
|
|
3197
|
-
const e =
|
|
3196
|
+
}, bi = (n) => {
|
|
3197
|
+
const e = E(n);
|
|
3198
3198
|
return [e.x, e.y];
|
|
3199
|
-
},
|
|
3200
|
-
const e =
|
|
3199
|
+
}, wi = (n) => {
|
|
3200
|
+
const e = E(n);
|
|
3201
3201
|
return { left: e.x, top: e.y };
|
|
3202
3202
|
}, zt = (n, e = 0) => {
|
|
3203
|
-
const t =
|
|
3203
|
+
const t = E(n);
|
|
3204
3204
|
return { x: Number(t.x.toFixed(e)), y: Number(t.y.toFixed(e)) };
|
|
3205
|
-
},
|
|
3206
|
-
const t =
|
|
3205
|
+
}, Ue = (n, e) => {
|
|
3206
|
+
const t = E(n), r = E(e);
|
|
3207
3207
|
return { x: t.x - r.x, y: t.y - r.y };
|
|
3208
|
-
},
|
|
3209
|
-
const e =
|
|
3208
|
+
}, De = (n) => {
|
|
3209
|
+
const e = E(n), t = Math.hypot(e.x, e.y);
|
|
3210
3210
|
return t === 0 ? { x: 0, y: 0 } : { x: -e.y / t, y: e.x / t };
|
|
3211
3211
|
}, rr = (n) => {
|
|
3212
|
-
const e =
|
|
3212
|
+
const e = E(n), t = Math.hypot(e.x, e.y);
|
|
3213
3213
|
return t === 0 ? { x: 0, y: 0 } : { x: e.x / t, y: e.y / t };
|
|
3214
3214
|
}, sr = (...n) => {
|
|
3215
|
-
const e = n.reduce((t, r) =>
|
|
3215
|
+
const e = n.reduce((t, r) => ct(t, r), ee);
|
|
3216
3216
|
return sn(e, 1 / n.length);
|
|
3217
|
-
},
|
|
3217
|
+
}, xi = (n, e) => {
|
|
3218
3218
|
const t = [];
|
|
3219
3219
|
for (let r = 0; r < n.length; r++) {
|
|
3220
3220
|
const s = n[r];
|
|
3221
3221
|
let i, a, o, c;
|
|
3222
3222
|
if (r === 0) {
|
|
3223
|
-
const l = n[r + 1], p =
|
|
3224
|
-
a =
|
|
3223
|
+
const l = n[r + 1], p = Ue(l, s);
|
|
3224
|
+
a = De(p), o = a, c = e;
|
|
3225
3225
|
} else if (r === n.length - 1) {
|
|
3226
|
-
const l = n[r - 1], p =
|
|
3227
|
-
i =
|
|
3226
|
+
const l = n[r - 1], p = Ue(s, l);
|
|
3227
|
+
i = De(p), o = i, c = e;
|
|
3228
3228
|
} else {
|
|
3229
|
-
const l = n[r - 1], p = n[r + 1], y =
|
|
3230
|
-
i =
|
|
3229
|
+
const l = n[r - 1], p = n[r + 1], y = Ue(s, l), j = Ue(p, s);
|
|
3230
|
+
i = De(y), a = De(j);
|
|
3231
3231
|
const U = Math.acos(
|
|
3232
3232
|
(y.x * j.x + y.y * j.y) / (Math.hypot(y.x, y.y) * Math.hypot(j.x, j.y))
|
|
3233
|
-
),
|
|
3234
|
-
|
|
3233
|
+
), je = Math.sin(U / 2);
|
|
3234
|
+
je === 0 ? c = e : c = e / je, o = rr(sr(i, a));
|
|
3235
3235
|
}
|
|
3236
3236
|
t.push(sn(o, c));
|
|
3237
3237
|
}
|
|
3238
3238
|
return t;
|
|
3239
|
+
}, _i = (n) => {
|
|
3240
|
+
const e = E(n);
|
|
3241
|
+
return { x: e.y, y: e.x };
|
|
3239
3242
|
}, Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3240
3243
|
__proto__: null,
|
|
3241
|
-
INFINITY:
|
|
3242
|
-
NAN:
|
|
3244
|
+
INFINITY: di,
|
|
3245
|
+
NAN: hi,
|
|
3243
3246
|
ONE: er,
|
|
3244
3247
|
ZERO: ee,
|
|
3245
3248
|
average: sr,
|
|
3246
|
-
calculateMiters:
|
|
3249
|
+
calculateMiters: xi,
|
|
3247
3250
|
clientXY: Vn,
|
|
3248
|
-
construct:
|
|
3249
|
-
couple:
|
|
3250
|
-
crudeZ:
|
|
3251
|
-
css:
|
|
3252
|
-
distance:
|
|
3251
|
+
construct: E,
|
|
3252
|
+
couple: bi,
|
|
3253
|
+
crudeZ: Lt,
|
|
3254
|
+
css: wi,
|
|
3255
|
+
distance: mi,
|
|
3253
3256
|
equals: Nt,
|
|
3254
|
-
isFinite:
|
|
3255
|
-
isNan:
|
|
3256
|
-
isZero:
|
|
3257
|
-
normal:
|
|
3257
|
+
isFinite: vi,
|
|
3258
|
+
isNan: gi,
|
|
3259
|
+
isZero: fi,
|
|
3260
|
+
normal: De,
|
|
3258
3261
|
normalize: rr,
|
|
3259
3262
|
scale: sn,
|
|
3260
|
-
set:
|
|
3261
|
-
sub:
|
|
3262
|
-
|
|
3263
|
+
set: pi,
|
|
3264
|
+
sub: Ue,
|
|
3265
|
+
swap: _i,
|
|
3266
|
+
translate: ct,
|
|
3263
3267
|
translateX: tr,
|
|
3264
3268
|
translateY: nr,
|
|
3265
|
-
translation:
|
|
3269
|
+
translation: yi,
|
|
3266
3270
|
truncate: zt,
|
|
3267
|
-
xy:
|
|
3268
|
-
}, Symbol.toStringTag, { value: "Module" })), ht = u.union([u.number(), u.string()]),
|
|
3271
|
+
xy: ut
|
|
3272
|
+
}, Symbol.toStringTag, { value: "Module" })), ht = u.union([u.number(), u.string()]), Ti = u.object({
|
|
3269
3273
|
top: ht,
|
|
3270
3274
|
left: ht,
|
|
3271
3275
|
width: ht,
|
|
3272
3276
|
height: ht
|
|
3273
|
-
}),
|
|
3277
|
+
}), Oi = u.object({
|
|
3274
3278
|
left: u.number(),
|
|
3275
3279
|
top: u.number(),
|
|
3276
3280
|
right: u.number(),
|
|
3277
3281
|
bottom: u.number()
|
|
3278
|
-
}),
|
|
3279
|
-
one:
|
|
3280
|
-
two:
|
|
3282
|
+
}), Si = u.object({
|
|
3283
|
+
one: ut,
|
|
3284
|
+
two: ut,
|
|
3281
3285
|
root: ri
|
|
3282
|
-
}), ir = { one: ee, two: ee, root: rn },
|
|
3286
|
+
}), ir = { one: ee, two: ee, root: rn }, Ni = { one: ee, two: er, root: Kn }, ar = (n, e) => ({
|
|
3283
3287
|
one: n.one,
|
|
3284
3288
|
two: n.two,
|
|
3285
3289
|
root: e ?? n.root
|
|
3286
|
-
}),
|
|
3290
|
+
}), C = (n, e, t = 0, r = 0, s) => {
|
|
3287
3291
|
const i = {
|
|
3288
3292
|
one: { ...ee },
|
|
3289
3293
|
two: { ...ee },
|
|
@@ -3301,215 +3305,219 @@ const ri = u.object({ x: Gn, y: Jn }), rn = Object.freeze({ x: "left", y: "top"
|
|
|
3301
3305
|
x: i.one.x + e.signedWidth,
|
|
3302
3306
|
y: i.one.y + e.signedHeight
|
|
3303
3307
|
} : i.two = e, i));
|
|
3304
|
-
},
|
|
3305
|
-
const r =
|
|
3308
|
+
}, Ii = (n, e, t) => {
|
|
3309
|
+
const r = C(n);
|
|
3306
3310
|
if (typeof e == "string") {
|
|
3307
3311
|
if (t == null) throw new Error("Invalid arguments for resize");
|
|
3308
3312
|
const s = nn(e);
|
|
3309
|
-
return
|
|
3313
|
+
return C(
|
|
3310
3314
|
r.one,
|
|
3311
3315
|
void 0,
|
|
3312
|
-
s === "x" ? t :
|
|
3313
|
-
s === "y" ? t :
|
|
3316
|
+
s === "x" ? t : ye(r),
|
|
3317
|
+
s === "y" ? t : ge(r),
|
|
3314
3318
|
r.root
|
|
3315
3319
|
);
|
|
3316
3320
|
}
|
|
3317
|
-
return
|
|
3318
|
-
},
|
|
3319
|
-
const r =
|
|
3321
|
+
return C(r.one, e, void 0, void 0, r.root);
|
|
3322
|
+
}, ki = (n, e, t = !0) => {
|
|
3323
|
+
const r = C(n);
|
|
3320
3324
|
let s = (i, a) => i < a;
|
|
3321
|
-
return t && (s = (i, a) => i <= a), "one" in e ? s(
|
|
3322
|
-
},
|
|
3323
|
-
width:
|
|
3324
|
-
height:
|
|
3325
|
-
}),
|
|
3325
|
+
return t && (s = (i, a) => i <= a), "one" in e ? s(le(r), le(e)) && s(xe(e), xe(r)) && s(de(r), de(e)) && s(_e(e), _e(r)) : s(le(r), e.x) && s(e.x, xe(r)) && s(de(r), e.y) && s(e.y, _e(r));
|
|
3326
|
+
}, Ai = (n, e) => Nt(n.one, e.one) && Nt(n.two, e.two) && Qn(n.root, e.root), or = (n) => ({
|
|
3327
|
+
width: ye(n),
|
|
3328
|
+
height: ge(n)
|
|
3329
|
+
}), Ei = (n) => ({
|
|
3326
3330
|
signedWidth: At(n),
|
|
3327
3331
|
signedHeight: Et(n)
|
|
3328
|
-
}),
|
|
3329
|
-
top:
|
|
3330
|
-
left:
|
|
3331
|
-
width:
|
|
3332
|
-
height:
|
|
3332
|
+
}), $i = (n) => ({
|
|
3333
|
+
top: de(n),
|
|
3334
|
+
left: le(n),
|
|
3335
|
+
width: ye(n),
|
|
3336
|
+
height: ge(n)
|
|
3333
3337
|
}), an = (n, e, t = !1) => {
|
|
3334
3338
|
const r = nn(e) === "y" ? Et(n) : At(n);
|
|
3335
3339
|
return t ? r : Math.abs(r);
|
|
3336
|
-
},
|
|
3337
|
-
const t =
|
|
3340
|
+
}, oe = (n, e) => {
|
|
3341
|
+
const t = C(n);
|
|
3338
3342
|
return {
|
|
3339
|
-
x: e.x === "center" ? Vt(t).x :
|
|
3340
|
-
y: e.y === "center" ? Vt(t).y :
|
|
3343
|
+
x: e.x === "center" ? Vt(t).x : Ne(t, e.x),
|
|
3344
|
+
y: e.y === "center" ? Vt(t).y : Ne(t, e.y)
|
|
3341
3345
|
};
|
|
3342
|
-
},
|
|
3343
|
-
const t =
|
|
3346
|
+
}, Ne = (n, e) => {
|
|
3347
|
+
const t = C(n), r = li(t.root).includes(e) ? Math.min : Math.max;
|
|
3344
3348
|
return en.includes(e) ? r(t.one.x, t.two.x) : r(t.one.y, t.two.y);
|
|
3345
|
-
},
|
|
3346
|
-
const e =
|
|
3349
|
+
}, Ci = (n) => n.one.x === n.two.x && n.one.y === n.two.y, ye = (n) => an(n, "x"), ge = (n) => an(n, "y"), At = (n) => {
|
|
3350
|
+
const e = C(n);
|
|
3347
3351
|
return e.two.x - e.one.x;
|
|
3348
3352
|
}, Et = (n) => {
|
|
3349
|
-
const e =
|
|
3353
|
+
const e = C(n);
|
|
3350
3354
|
return e.two.y - e.one.y;
|
|
3351
|
-
}, ur = (n) =>
|
|
3355
|
+
}, ur = (n) => oe(n, rn), Ri = (n) => oe(n, ai), Mi = (n) => oe(n, si), ji = (n) => oe(n, Kn), Zi = (n) => oe(n, oi), Bi = (n) => oe(n, ii), Ui = (n) => oe(n, ci), Di = (n) => oe(n, ui), xe = (n) => Ne(n, "right"), _e = (n) => Ne(n, "bottom"), le = (n) => Ne(n, "left"), de = (n) => Ne(n, "top"), Vt = (n) => ct(ur(n), {
|
|
3352
3356
|
x: At(n) / 2,
|
|
3353
3357
|
y: Et(n) / 2
|
|
3354
3358
|
}), on = (n) => {
|
|
3355
|
-
const e =
|
|
3356
|
-
return e.root.x === "left" ?
|
|
3359
|
+
const e = C(n);
|
|
3360
|
+
return e.root.x === "left" ? le(e) : xe(e);
|
|
3357
3361
|
}, un = (n) => {
|
|
3358
|
-
const e =
|
|
3359
|
-
return e.root.y === "top" ?
|
|
3360
|
-
},
|
|
3361
|
-
const e =
|
|
3362
|
+
const e = C(n);
|
|
3363
|
+
return e.root.y === "top" ? de(e) : _e(e);
|
|
3364
|
+
}, Pi = (n) => ({ x: on(n), y: un(n) }), mt = (n) => {
|
|
3365
|
+
const e = C(n);
|
|
3362
3366
|
return { lower: e.one.x, upper: e.two.x };
|
|
3363
3367
|
}, yt = (n) => {
|
|
3364
|
-
const e =
|
|
3368
|
+
const e = C(n);
|
|
3365
3369
|
return { lower: e.one.y, upper: e.two.y };
|
|
3366
|
-
},
|
|
3367
|
-
const t =
|
|
3370
|
+
}, Li = (n, e) => ar(n, e), zi = (n, e) => {
|
|
3371
|
+
const t = C(n), r = en.includes(e) ? "x" : tn.includes(e) ? "y" : null;
|
|
3368
3372
|
if (r === null) throw new Error(`Invalid location: ${e}`);
|
|
3369
3373
|
const s = e === "top" || e === "left" ? Math.min : Math.max, i = { ...t.one }, a = { ...t.two };
|
|
3370
3374
|
return i[r] = s(t.one[r], t.two[r]), a[r] = s(t.one[r], t.two[r]), [i, a];
|
|
3371
|
-
},
|
|
3372
|
-
const t =
|
|
3373
|
-
return
|
|
3374
|
-
}, cr = (n) => typeof n != "object" || n == null ? !1 : "one" in n && "two" in n && "root" in n,
|
|
3375
|
+
}, Wi = (n, e) => {
|
|
3376
|
+
const t = C(n), r = C(e), s = on(r) + (ye(r) - ye(t)) / 2, i = un(r) + (ge(r) - ge(t)) / 2;
|
|
3377
|
+
return C({ x: s, y: i }, or(t));
|
|
3378
|
+
}, cr = (n) => typeof n != "object" || n == null ? !1 : "one" in n && "two" in n && "root" in n, Vi = (n) => ye(n) / ge(n), qi = (n, e, t) => {
|
|
3375
3379
|
if (typeof e == "string") {
|
|
3376
3380
|
if (t == null) throw new Error("Undefined amount passed into box.translate");
|
|
3377
3381
|
const s = nn(e);
|
|
3378
|
-
e =
|
|
3382
|
+
e = E(s, t);
|
|
3379
3383
|
}
|
|
3380
|
-
const r =
|
|
3381
|
-
return
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
+
const r = C(n);
|
|
3385
|
+
return C(
|
|
3386
|
+
ct(r.one, e),
|
|
3387
|
+
ct(r.two, e),
|
|
3384
3388
|
void 0,
|
|
3385
3389
|
void 0,
|
|
3386
3390
|
r.root
|
|
3387
3391
|
);
|
|
3388
|
-
},
|
|
3389
|
-
const t = Math.max(
|
|
3390
|
-
return t > s || r > i ? ir :
|
|
3391
|
-
},
|
|
3392
|
-
const t =
|
|
3393
|
-
return
|
|
3392
|
+
}, Fi = (n, e) => {
|
|
3393
|
+
const t = Math.max(le(n), le(e)), r = Math.max(de(n), de(e)), s = Math.min(xe(n), xe(e)), i = Math.min(_e(n), _e(e));
|
|
3394
|
+
return t > s || r > i ? ir : C({ x: t, y: r }, { x: s, y: i }, void 0, void 0, n.root);
|
|
3395
|
+
}, Yi = (n) => ye(n) * ge(n), Gi = (n, e) => {
|
|
3396
|
+
const t = C(n);
|
|
3397
|
+
return C(
|
|
3394
3398
|
zt(t.one, e),
|
|
3395
3399
|
zt(t.two, e),
|
|
3396
3400
|
void 0,
|
|
3397
3401
|
void 0,
|
|
3398
3402
|
t.root
|
|
3399
3403
|
);
|
|
3400
|
-
},
|
|
3404
|
+
}, Ji = (n, e, t, r, s, i) => {
|
|
3401
3405
|
const a = { x: n, y: e }, o = { x: n + t, y: e + r };
|
|
3402
|
-
return s.x !== i.x && (s.x === "center" ? (a.x -= t / 2, o.x -= t / 2) : (a.x -= t, o.x -= t)), s.y !== i.y && (s.y === "center" ? (a.y -= r / 2, o.y -= r / 2) : (a.y -= r, o.y -= r)),
|
|
3406
|
+
return s.x !== i.x && (s.x === "center" ? (a.x -= t / 2, o.x -= t / 2) : (a.x -= t, o.x -= t)), s.y !== i.y && (s.y === "center" ? (a.y -= r / 2, o.y -= r / 2) : (a.y -= r, o.y -= r)), C(a, o, void 0, void 0, i);
|
|
3403
3407
|
}, ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3404
3408
|
__proto__: null,
|
|
3405
|
-
DECIMAL:
|
|
3409
|
+
DECIMAL: Ni,
|
|
3406
3410
|
ZERO: ir,
|
|
3407
|
-
area:
|
|
3408
|
-
areaIsZero:
|
|
3409
|
-
aspect:
|
|
3410
|
-
bottom:
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3411
|
+
area: Yi,
|
|
3412
|
+
areaIsZero: Ci,
|
|
3413
|
+
aspect: Vi,
|
|
3414
|
+
bottom: _e,
|
|
3415
|
+
bottomCenter: Zi,
|
|
3416
|
+
bottomLeft: ji,
|
|
3417
|
+
bottomRight: Bi,
|
|
3418
|
+
box: Si,
|
|
3414
3419
|
center: Vt,
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3420
|
+
centerLeft: Ui,
|
|
3421
|
+
centerRight: Di,
|
|
3422
|
+
construct: C,
|
|
3423
|
+
constructWithAlternateRoot: Ji,
|
|
3424
|
+
contains: ki,
|
|
3418
3425
|
copy: ar,
|
|
3419
|
-
css:
|
|
3420
|
-
cssBox:
|
|
3426
|
+
css: $i,
|
|
3427
|
+
cssBox: Ti,
|
|
3421
3428
|
dim: an,
|
|
3422
3429
|
dims: or,
|
|
3423
|
-
domRect:
|
|
3424
|
-
edgePoints:
|
|
3425
|
-
equals:
|
|
3426
|
-
height:
|
|
3427
|
-
intersection:
|
|
3430
|
+
domRect: Oi,
|
|
3431
|
+
edgePoints: zi,
|
|
3432
|
+
equals: Ai,
|
|
3433
|
+
height: ge,
|
|
3434
|
+
intersection: Fi,
|
|
3428
3435
|
isBox: cr,
|
|
3429
|
-
left:
|
|
3430
|
-
loc:
|
|
3431
|
-
positionInCenter:
|
|
3432
|
-
reRoot:
|
|
3433
|
-
resize:
|
|
3434
|
-
right:
|
|
3435
|
-
root:
|
|
3436
|
-
signedDims:
|
|
3436
|
+
left: le,
|
|
3437
|
+
loc: Ne,
|
|
3438
|
+
positionInCenter: Wi,
|
|
3439
|
+
reRoot: Li,
|
|
3440
|
+
resize: Ii,
|
|
3441
|
+
right: xe,
|
|
3442
|
+
root: Pi,
|
|
3443
|
+
signedDims: Ei,
|
|
3437
3444
|
signedHeight: Et,
|
|
3438
3445
|
signedWidth: At,
|
|
3439
|
-
top:
|
|
3446
|
+
top: de,
|
|
3447
|
+
topCenter: Ri,
|
|
3440
3448
|
topLeft: ur,
|
|
3441
|
-
topRight:
|
|
3442
|
-
translate:
|
|
3443
|
-
truncate:
|
|
3444
|
-
width:
|
|
3449
|
+
topRight: Mi,
|
|
3450
|
+
translate: qi,
|
|
3451
|
+
truncate: Gi,
|
|
3452
|
+
width: ye,
|
|
3445
3453
|
x: on,
|
|
3446
3454
|
xBounds: mt,
|
|
3447
|
-
xyLoc:
|
|
3455
|
+
xyLoc: oe,
|
|
3448
3456
|
y: un,
|
|
3449
3457
|
yBounds: yt
|
|
3450
|
-
}, Symbol.toStringTag, { value: "Module" })), lr = u.object({ signedWidth: u.number(), signedHeight: u.number() }),
|
|
3458
|
+
}, Symbol.toStringTag, { value: "Module" })), lr = u.object({ signedWidth: u.number(), signedHeight: u.number() }), Hi = u.union([Qt, lr, ut, kt]), Xi = { width: 0, height: 0 }, Ki = { width: 1, height: 1 }, G = (n, e) => typeof n == "number" ? { width: n, height: e ?? n } : Array.isArray(n) ? { width: n[0], height: n[1] } : "x" in n ? { width: n.x, height: n.y } : "signedWidth" in n ? { width: n.signedWidth, height: n.signedHeight } : { ...n }, Qi = (n, e) => {
|
|
3451
3459
|
if (e == null) return !1;
|
|
3452
3460
|
const t = G(n), r = G(e);
|
|
3453
3461
|
return t.width === r.width && t.height === r.height;
|
|
3454
|
-
},
|
|
3462
|
+
}, ea = (n) => {
|
|
3455
3463
|
const e = G(n);
|
|
3456
3464
|
return { width: e.height, height: e.width };
|
|
3457
|
-
},
|
|
3465
|
+
}, ta = (n) => {
|
|
3458
3466
|
const e = G(n);
|
|
3459
3467
|
return `0 0 ${e.width} ${e.height}`;
|
|
3460
|
-
},
|
|
3468
|
+
}, na = (n) => {
|
|
3461
3469
|
const e = G(n);
|
|
3462
3470
|
return [e.width, e.height];
|
|
3463
|
-
},
|
|
3471
|
+
}, ra = (n) => ({
|
|
3464
3472
|
width: Math.max(...n.map((e) => G(e).width)),
|
|
3465
3473
|
height: Math.max(...n.map((e) => G(e).height))
|
|
3466
|
-
}),
|
|
3474
|
+
}), sa = (n) => ({
|
|
3467
3475
|
width: Math.min(...n.map((e) => G(e).width)),
|
|
3468
3476
|
height: Math.min(...n.map((e) => G(e).height))
|
|
3469
|
-
}),
|
|
3477
|
+
}), ia = (n, e) => {
|
|
3470
3478
|
const t = G(n);
|
|
3471
3479
|
return { width: t.width * e, height: t.height * e };
|
|
3472
3480
|
}, Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3473
3481
|
__proto__: null,
|
|
3474
|
-
DECIMAL:
|
|
3475
|
-
ZERO:
|
|
3482
|
+
DECIMAL: Ki,
|
|
3483
|
+
ZERO: Xi,
|
|
3476
3484
|
construct: G,
|
|
3477
|
-
couple:
|
|
3478
|
-
crude:
|
|
3485
|
+
couple: na,
|
|
3486
|
+
crude: Hi,
|
|
3479
3487
|
dimensions: Qt,
|
|
3480
|
-
equals:
|
|
3481
|
-
max:
|
|
3482
|
-
min:
|
|
3483
|
-
scale:
|
|
3488
|
+
equals: Qi,
|
|
3489
|
+
max: ra,
|
|
3490
|
+
min: sa,
|
|
3491
|
+
scale: ia,
|
|
3484
3492
|
signed: lr,
|
|
3485
|
-
svgViewBox:
|
|
3486
|
-
swap:
|
|
3493
|
+
svgViewBox: ta,
|
|
3494
|
+
swap: ea
|
|
3487
3495
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3488
|
-
var
|
|
3489
|
-
const
|
|
3490
|
-
u.object({ offset:
|
|
3496
|
+
var aa = Object.defineProperty, oa = (n, e, t) => e in n ? aa(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, ie = (n, e, t) => oa(n, typeof e != "symbol" ? e + "" : e, t);
|
|
3497
|
+
const ua = (n, e, t) => e !== void 0 && n < e ? e : t !== void 0 && n > t ? t : n;
|
|
3498
|
+
u.object({ offset: Lt, scale: Lt });
|
|
3491
3499
|
u.object({ offset: u.number(), scale: u.number() });
|
|
3492
|
-
const
|
|
3500
|
+
const ca = (n) => (e, t, r, s) => t === "dimension" ? [e, r] : [
|
|
3493
3501
|
e,
|
|
3494
3502
|
s ? r - n : r + n
|
|
3495
|
-
],
|
|
3503
|
+
], la = (n) => (e, t, r, s) => [
|
|
3496
3504
|
e,
|
|
3497
3505
|
s ? r / n : r * n
|
|
3498
|
-
],
|
|
3506
|
+
], da = (n) => (e, t, r) => {
|
|
3499
3507
|
if (e === null) return [n, r];
|
|
3500
3508
|
const { lower: s, upper: i } = e, { lower: a, upper: o } = n, c = i - s, l = o - a;
|
|
3501
3509
|
if (t === "dimension") return [n, r * (l / c)];
|
|
3502
3510
|
const p = (r - s) * (l / c) + a;
|
|
3503
3511
|
return [n, p];
|
|
3504
|
-
},
|
|
3512
|
+
}, ha = (n) => (e, t, r) => [n, r], fa = () => (n, e, t) => {
|
|
3505
3513
|
if (n === null) throw new Error("cannot invert without bounds");
|
|
3506
3514
|
if (e === "dimension") return [n, t];
|
|
3507
3515
|
const { lower: r, upper: s } = n;
|
|
3508
3516
|
return [n, s - (t - r)];
|
|
3509
|
-
},
|
|
3517
|
+
}, pa = (n) => (e, t, r) => {
|
|
3510
3518
|
const { lower: s, upper: i } = n;
|
|
3511
|
-
return r =
|
|
3512
|
-
}, qt = class
|
|
3519
|
+
return r = ua(r, s, i), [e, r];
|
|
3520
|
+
}, qt = class Pe {
|
|
3513
3521
|
constructor() {
|
|
3514
3522
|
ie(this, "ops", []), ie(this, "currBounds", null), ie(this, "currType", null), ie(this, "reversed", !1), this.ops = [];
|
|
3515
3523
|
}
|
|
@@ -3519,7 +3527,7 @@ const ea = (n) => (e, t, r, s) => t === "dimension" ? [e, r] : [
|
|
|
3519
3527
|
* @param value - The amount to translate by.
|
|
3520
3528
|
*/
|
|
3521
3529
|
static translate(e) {
|
|
3522
|
-
return new
|
|
3530
|
+
return new Pe().translate(e);
|
|
3523
3531
|
}
|
|
3524
3532
|
/**
|
|
3525
3533
|
* @returns a new scale with a magnification as its first operation. Any number provided
|
|
@@ -3527,10 +3535,10 @@ const ea = (n) => (e, t, r, s) => t === "dimension" ? [e, r] : [
|
|
|
3527
3535
|
* @param value - The amount to translate by.
|
|
3528
3536
|
*/
|
|
3529
3537
|
static magnify(e) {
|
|
3530
|
-
return new
|
|
3538
|
+
return new Pe().magnify(e);
|
|
3531
3539
|
}
|
|
3532
3540
|
static scale(e, t) {
|
|
3533
|
-
return new
|
|
3541
|
+
return new Pe().scale(e, t);
|
|
3534
3542
|
}
|
|
3535
3543
|
/**
|
|
3536
3544
|
* @returns a copy of the scale with a translation as its next operation. Any
|
|
@@ -3539,7 +3547,7 @@ const ea = (n) => (e, t, r, s) => t === "dimension" ? [e, r] : [
|
|
|
3539
3547
|
* @param value - The amount to translate by.
|
|
3540
3548
|
*/
|
|
3541
3549
|
translate(e) {
|
|
3542
|
-
const t = this.new(), r =
|
|
3550
|
+
const t = this.new(), r = ca(e);
|
|
3543
3551
|
return r.type = "translate", t.ops.push(r), t;
|
|
3544
3552
|
}
|
|
3545
3553
|
/**
|
|
@@ -3549,23 +3557,23 @@ const ea = (n) => (e, t, r, s) => t === "dimension" ? [e, r] : [
|
|
|
3549
3557
|
* @param value - The amount to magnify by.
|
|
3550
3558
|
*/
|
|
3551
3559
|
magnify(e) {
|
|
3552
|
-
const t = this.new(), r =
|
|
3560
|
+
const t = this.new(), r = la(e);
|
|
3553
3561
|
return r.type = "magnify", t.ops.push(r), t;
|
|
3554
3562
|
}
|
|
3555
3563
|
scale(e, t) {
|
|
3556
|
-
const r = we(e, t), s = this.new(), i =
|
|
3564
|
+
const r = we(e, t), s = this.new(), i = da(r);
|
|
3557
3565
|
return i.type = "scale", s.ops.push(i), s;
|
|
3558
3566
|
}
|
|
3559
3567
|
clamp(e, t) {
|
|
3560
|
-
const r = we(e, t), s = this.new(), i =
|
|
3568
|
+
const r = we(e, t), s = this.new(), i = pa(r);
|
|
3561
3569
|
return i.type = "clamp", s.ops.push(i), s;
|
|
3562
3570
|
}
|
|
3563
3571
|
reBound(e, t) {
|
|
3564
|
-
const r = we(e, t), s = this.new(), i =
|
|
3572
|
+
const r = we(e, t), s = this.new(), i = ha(r);
|
|
3565
3573
|
return i.type = "re-bound", s.ops.push(i), s;
|
|
3566
3574
|
}
|
|
3567
3575
|
invert() {
|
|
3568
|
-
const e =
|
|
3576
|
+
const e = fa();
|
|
3569
3577
|
e.type = "invert";
|
|
3570
3578
|
const t = this.new();
|
|
3571
3579
|
return t.ops.push(e), t;
|
|
@@ -3577,7 +3585,7 @@ const ea = (n) => (e, t, r, s) => t === "dimension" ? [e, r] : [
|
|
|
3577
3585
|
return this.exec("dimension", e);
|
|
3578
3586
|
}
|
|
3579
3587
|
new() {
|
|
3580
|
-
const e = new
|
|
3588
|
+
const e = new Pe();
|
|
3581
3589
|
return e.ops = this.ops.slice(), e.reversed = this.reversed, e;
|
|
3582
3590
|
}
|
|
3583
3591
|
exec(e, t) {
|
|
@@ -3632,7 +3640,7 @@ const _n = class re {
|
|
|
3632
3640
|
return new re().reBound(e);
|
|
3633
3641
|
}
|
|
3634
3642
|
translate(e, t) {
|
|
3635
|
-
const r =
|
|
3643
|
+
const r = E(e, t), s = this.copy();
|
|
3636
3644
|
return s.x = this.x.translate(r.x), s.y = this.y.translate(r.y), s;
|
|
3637
3645
|
}
|
|
3638
3646
|
translateX(e) {
|
|
@@ -3678,7 +3686,7 @@ const _n = class re {
|
|
|
3678
3686
|
return { x: this.x.dim(e.x), y: this.y.dim(e.y) };
|
|
3679
3687
|
}
|
|
3680
3688
|
box(e) {
|
|
3681
|
-
return
|
|
3689
|
+
return C(
|
|
3682
3690
|
this.pos(e.one),
|
|
3683
3691
|
this.pos(e.two),
|
|
3684
3692
|
0,
|
|
@@ -3694,18 +3702,18 @@ const _n = class re {
|
|
|
3694
3702
|
}
|
|
3695
3703
|
};
|
|
3696
3704
|
ie(_n, "IDENTITY", new _n());
|
|
3697
|
-
var
|
|
3698
|
-
let
|
|
3705
|
+
var ma = Object.defineProperty, ya = (n, e, t) => e in n ? ma(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, h = (n, e, t) => ya(n, typeof e != "symbol" ? e + "" : e, t);
|
|
3706
|
+
let ga = (n, e = 21) => (t = e) => {
|
|
3699
3707
|
let r = "", s = t | 0;
|
|
3700
3708
|
for (; s--; )
|
|
3701
3709
|
r += n[Math.random() * n.length | 0];
|
|
3702
3710
|
return r;
|
|
3703
3711
|
};
|
|
3704
|
-
const
|
|
3712
|
+
const va = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ba = ga(va, 11), dr = () => ba(), Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3705
3713
|
__proto__: null,
|
|
3706
3714
|
create: dr
|
|
3707
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3708
|
-
const t = new
|
|
3715
|
+
}, Symbol.toStringTag, { value: "Module" })), wa = u.enum(["static", "dynamic"]), hr = (n, e) => {
|
|
3716
|
+
const t = new $(e);
|
|
3709
3717
|
if (![
|
|
3710
3718
|
A.DAY,
|
|
3711
3719
|
A.HOUR,
|
|
@@ -3719,23 +3727,23 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3719
3727
|
"Invalid argument for remainder. Must be an even TimeSpan or Timestamp"
|
|
3720
3728
|
);
|
|
3721
3729
|
const r = n.valueOf() % t.valueOf();
|
|
3722
|
-
return n instanceof
|
|
3723
|
-
},
|
|
3730
|
+
return n instanceof $ ? new $(r) : new A(r);
|
|
3731
|
+
}, N = class b {
|
|
3724
3732
|
constructor(e, t = "UTC") {
|
|
3725
|
-
if (h(this, "value"), h(this, "encodeValue", !0), e == null) this.value =
|
|
3733
|
+
if (h(this, "value"), h(this, "encodeValue", !0), e == null) this.value = b.now().valueOf();
|
|
3726
3734
|
else if (e instanceof Date)
|
|
3727
|
-
this.value = BigInt(e.getTime()) *
|
|
3735
|
+
this.value = BigInt(e.getTime()) * b.MILLISECOND.valueOf();
|
|
3728
3736
|
else if (typeof e == "string")
|
|
3729
|
-
this.value =
|
|
3730
|
-
else if (Array.isArray(e)) this.value =
|
|
3737
|
+
this.value = b.parseDateTimeString(e, t).valueOf();
|
|
3738
|
+
else if (Array.isArray(e)) this.value = b.parseDate(e);
|
|
3731
3739
|
else {
|
|
3732
3740
|
let r = BigInt(0);
|
|
3733
|
-
e instanceof Number && (e = e.valueOf()), t === "local" && (r =
|
|
3741
|
+
e instanceof Number && (e = e.valueOf()), t === "local" && (r = b.utcOffset.valueOf()), typeof e == "number" && (isFinite(e) ? e = Math.trunc(e) : (isNaN(e) && (e = 0), e === 1 / 0 ? e = b.MAX : e = b.MIN)), this.value = BigInt(e.valueOf()) + r;
|
|
3734
3742
|
}
|
|
3735
3743
|
}
|
|
3736
3744
|
static parseDate([e = 1970, t = 1, r = 1]) {
|
|
3737
3745
|
const s = new Date(e, t - 1, r, 0, 0, 0, 0);
|
|
3738
|
-
return new
|
|
3746
|
+
return new b(BigInt(s.getTime()) * b.MILLISECOND.valueOf()).truncate(b.DAY).valueOf();
|
|
3739
3747
|
}
|
|
3740
3748
|
encode() {
|
|
3741
3749
|
return this.value.toString();
|
|
@@ -3747,15 +3755,15 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3747
3755
|
const [r, s, i] = e.split(":");
|
|
3748
3756
|
let a = "00", o = "00";
|
|
3749
3757
|
i != null && ([a, o] = i.split("."));
|
|
3750
|
-
let c =
|
|
3751
|
-
return t === "local" && (c = c.add(
|
|
3758
|
+
let c = b.hours(parseInt(r ?? "00")).add(b.minutes(parseInt(s ?? "00"))).add(b.seconds(parseInt(a ?? "00"))).add(b.milliseconds(parseInt(o ?? "00")));
|
|
3759
|
+
return t === "local" && (c = c.add(b.utcOffset)), c.valueOf();
|
|
3752
3760
|
}
|
|
3753
3761
|
static parseDateTimeString(e, t = "UTC") {
|
|
3754
3762
|
if (!e.includes("/") && !e.includes("-"))
|
|
3755
|
-
return
|
|
3763
|
+
return b.parseTimeString(e, t);
|
|
3756
3764
|
const r = new Date(e);
|
|
3757
|
-
return e.includes(":") || r.setUTCHours(0, 0, 0, 0), new
|
|
3758
|
-
BigInt(r.getTime()) *
|
|
3765
|
+
return e.includes(":") || r.setUTCHours(0, 0, 0, 0), new b(
|
|
3766
|
+
BigInt(r.getTime()) * b.MILLISECOND.valueOf(),
|
|
3759
3767
|
t
|
|
3760
3768
|
).valueOf();
|
|
3761
3769
|
}
|
|
@@ -3780,7 +3788,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3780
3788
|
}
|
|
3781
3789
|
}
|
|
3782
3790
|
toISOString(e = "UTC") {
|
|
3783
|
-
return e === "UTC" ? this.date().toISOString() : this.sub(
|
|
3791
|
+
return e === "UTC" ? this.date().toISOString() : this.sub(b.utcOffset).date().toISOString();
|
|
3784
3792
|
}
|
|
3785
3793
|
timeString(e = !1, t = "UTC") {
|
|
3786
3794
|
const r = this.toISOString(t);
|
|
@@ -3792,7 +3800,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3792
3800
|
}
|
|
3793
3801
|
static get utcOffset() {
|
|
3794
3802
|
return new A(
|
|
3795
|
-
BigInt((/* @__PURE__ */ new Date()).getTimezoneOffset()) *
|
|
3803
|
+
BigInt((/* @__PURE__ */ new Date()).getTimezoneOffset()) * b.MINUTE.valueOf()
|
|
3796
3804
|
);
|
|
3797
3805
|
}
|
|
3798
3806
|
/**
|
|
@@ -3801,7 +3809,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3801
3809
|
* @param other - The other timestamp.
|
|
3802
3810
|
*/
|
|
3803
3811
|
static since(e) {
|
|
3804
|
-
return new
|
|
3812
|
+
return new b().span(e);
|
|
3805
3813
|
}
|
|
3806
3814
|
/** @returns A JavaScript Date object representing the TimeStamp. */
|
|
3807
3815
|
date() {
|
|
@@ -3814,7 +3822,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3814
3822
|
* @returns True if the TimeStamps are equal, false otherwise.
|
|
3815
3823
|
*/
|
|
3816
3824
|
equals(e) {
|
|
3817
|
-
return this.valueOf() === new
|
|
3825
|
+
return this.valueOf() === new b(e).valueOf();
|
|
3818
3826
|
}
|
|
3819
3827
|
/**
|
|
3820
3828
|
* Creates a TimeSpan representing the duration between the two timestamps.
|
|
@@ -3863,7 +3871,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3863
3871
|
* otherwise.
|
|
3864
3872
|
*/
|
|
3865
3873
|
after(e) {
|
|
3866
|
-
return this.valueOf() > new
|
|
3874
|
+
return this.valueOf() > new b(e).valueOf();
|
|
3867
3875
|
}
|
|
3868
3876
|
/**
|
|
3869
3877
|
* Checks if the TimeStamp is after or equal to the given TimeStamp.
|
|
@@ -3873,7 +3881,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3873
3881
|
* false otherwise.
|
|
3874
3882
|
*/
|
|
3875
3883
|
afterEq(e) {
|
|
3876
|
-
return this.valueOf() >= new
|
|
3884
|
+
return this.valueOf() >= new b(e).valueOf();
|
|
3877
3885
|
}
|
|
3878
3886
|
/**
|
|
3879
3887
|
* Checks if the TimeStamp is before the given TimeStamp.
|
|
@@ -3883,7 +3891,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3883
3891
|
* otherwise.
|
|
3884
3892
|
*/
|
|
3885
3893
|
before(e) {
|
|
3886
|
-
return this.valueOf() < new
|
|
3894
|
+
return this.valueOf() < new b(e).valueOf();
|
|
3887
3895
|
}
|
|
3888
3896
|
/**
|
|
3889
3897
|
* Checks if TimeStamp is before or equal to the current timestamp.
|
|
@@ -3893,7 +3901,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3893
3901
|
* false otherwise.
|
|
3894
3902
|
*/
|
|
3895
3903
|
beforeEq(e) {
|
|
3896
|
-
return this.valueOf() <= new
|
|
3904
|
+
return this.valueOf() <= new b(e).valueOf();
|
|
3897
3905
|
}
|
|
3898
3906
|
/**
|
|
3899
3907
|
* Adds a TimeSpan to the TimeStamp.
|
|
@@ -3903,7 +3911,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3903
3911
|
* TimeSpan.
|
|
3904
3912
|
*/
|
|
3905
3913
|
add(e) {
|
|
3906
|
-
return new
|
|
3914
|
+
return new b(this.valueOf() + BigInt(e.valueOf()));
|
|
3907
3915
|
}
|
|
3908
3916
|
/**
|
|
3909
3917
|
* Subtracts a TimeSpan from the TimeStamp.
|
|
@@ -3913,7 +3921,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3913
3921
|
* TimeSpan.
|
|
3914
3922
|
*/
|
|
3915
3923
|
sub(e) {
|
|
3916
|
-
return new
|
|
3924
|
+
return new b(this.valueOf() - BigInt(e.valueOf()));
|
|
3917
3925
|
}
|
|
3918
3926
|
/**
|
|
3919
3927
|
* @returns the floating point number of hours since the unix epoch to the timestamp
|
|
@@ -3947,10 +3955,10 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3947
3955
|
* @returns The number of milliseconds since the unix epoch.
|
|
3948
3956
|
*/
|
|
3949
3957
|
get milliseconds() {
|
|
3950
|
-
return Number(this.valueOf()) / Number(
|
|
3958
|
+
return Number(this.valueOf()) / Number(b.MILLISECOND.valueOf());
|
|
3951
3959
|
}
|
|
3952
3960
|
get microseconds() {
|
|
3953
|
-
return Number(this.valueOf()) / Number(
|
|
3961
|
+
return Number(this.valueOf()) / Number(b.MICROSECOND.valueOf());
|
|
3954
3962
|
}
|
|
3955
3963
|
get nanoseconds() {
|
|
3956
3964
|
return Number(this.valueOf());
|
|
@@ -3961,7 +3969,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3961
3969
|
}
|
|
3962
3970
|
setYear(e) {
|
|
3963
3971
|
const t = this.date();
|
|
3964
|
-
return t.setFullYear(e), new
|
|
3972
|
+
return t.setFullYear(e), new b(t);
|
|
3965
3973
|
}
|
|
3966
3974
|
/** @returns the integer month that the timestamp corresponds to with its year. */
|
|
3967
3975
|
get month() {
|
|
@@ -3969,7 +3977,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3969
3977
|
}
|
|
3970
3978
|
setMonth(e) {
|
|
3971
3979
|
const t = this.date();
|
|
3972
|
-
return t.setMonth(e), new
|
|
3980
|
+
return t.setMonth(e), new b(t);
|
|
3973
3981
|
}
|
|
3974
3982
|
/** @returns the integer day that the timestamp corresponds to within its month. */
|
|
3975
3983
|
get day() {
|
|
@@ -3977,7 +3985,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3977
3985
|
}
|
|
3978
3986
|
setDay(e) {
|
|
3979
3987
|
const t = this.date();
|
|
3980
|
-
return t.setDate(e), new
|
|
3988
|
+
return t.setDate(e), new b(t);
|
|
3981
3989
|
}
|
|
3982
3990
|
/** @returns the integer hour that the timestamp corresponds to within its day. */
|
|
3983
3991
|
get hour() {
|
|
@@ -3985,7 +3993,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3985
3993
|
}
|
|
3986
3994
|
setHour(e) {
|
|
3987
3995
|
const t = this.date();
|
|
3988
|
-
return t.setHours(e), new
|
|
3996
|
+
return t.setHours(e), new b(t);
|
|
3989
3997
|
}
|
|
3990
3998
|
/** @returns the integer minute that the timestamp corresponds to within its hour. */
|
|
3991
3999
|
get minute() {
|
|
@@ -3993,21 +4001,21 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
3993
4001
|
}
|
|
3994
4002
|
setMinute(e) {
|
|
3995
4003
|
const t = this.date();
|
|
3996
|
-
return t.setMinutes(e), new
|
|
4004
|
+
return t.setMinutes(e), new b(t);
|
|
3997
4005
|
}
|
|
3998
4006
|
get second() {
|
|
3999
4007
|
return this.date().getSeconds();
|
|
4000
4008
|
}
|
|
4001
4009
|
setSecond(e) {
|
|
4002
4010
|
const t = this.date();
|
|
4003
|
-
return t.setSeconds(e), new
|
|
4011
|
+
return t.setSeconds(e), new b(t);
|
|
4004
4012
|
}
|
|
4005
4013
|
get millisecond() {
|
|
4006
4014
|
return this.date().getMilliseconds();
|
|
4007
4015
|
}
|
|
4008
4016
|
setMillisecond(e) {
|
|
4009
4017
|
const t = this.date();
|
|
4010
|
-
return t.setMilliseconds(e), new
|
|
4018
|
+
return t.setMilliseconds(e), new b(t);
|
|
4011
4019
|
}
|
|
4012
4020
|
toString() {
|
|
4013
4021
|
return this.date().toISOString();
|
|
@@ -4028,7 +4036,7 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
4028
4036
|
}
|
|
4029
4037
|
/** @returns true if the day portion TimeStamp is today, false otherwise. */
|
|
4030
4038
|
get isToday() {
|
|
4031
|
-
return this.truncate(A.DAY).equals(
|
|
4039
|
+
return this.truncate(A.DAY).equals(b.now().truncate(A.DAY));
|
|
4032
4040
|
}
|
|
4033
4041
|
truncate(e) {
|
|
4034
4042
|
return this.sub(this.remainder(e));
|
|
@@ -4039,80 +4047,80 @@ const ca = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", la
|
|
|
4039
4047
|
* JavaScript can do).
|
|
4040
4048
|
*/
|
|
4041
4049
|
static now() {
|
|
4042
|
-
return new
|
|
4050
|
+
return new b(/* @__PURE__ */ new Date());
|
|
4043
4051
|
}
|
|
4044
4052
|
static max(...e) {
|
|
4045
|
-
let t =
|
|
4053
|
+
let t = b.MIN;
|
|
4046
4054
|
for (const r of e) {
|
|
4047
|
-
const s = new
|
|
4055
|
+
const s = new b(r);
|
|
4048
4056
|
s.after(t) && (t = s);
|
|
4049
4057
|
}
|
|
4050
4058
|
return t;
|
|
4051
4059
|
}
|
|
4052
4060
|
static min(...e) {
|
|
4053
|
-
let t =
|
|
4061
|
+
let t = b.MAX;
|
|
4054
4062
|
for (const r of e) {
|
|
4055
|
-
const s = new
|
|
4063
|
+
const s = new b(r);
|
|
4056
4064
|
s.before(t) && (t = s);
|
|
4057
4065
|
}
|
|
4058
4066
|
return t;
|
|
4059
4067
|
}
|
|
4060
4068
|
/** @returns a new TimeStamp n nanoseconds after the unix epoch */
|
|
4061
4069
|
static nanoseconds(e) {
|
|
4062
|
-
return new
|
|
4070
|
+
return new b(e);
|
|
4063
4071
|
}
|
|
4064
4072
|
/** @returns a new TimeStamp n microseconds after the unix epoch */
|
|
4065
4073
|
static microseconds(e) {
|
|
4066
|
-
return
|
|
4074
|
+
return b.nanoseconds(e * 1e3);
|
|
4067
4075
|
}
|
|
4068
4076
|
/** @returns a new TimeStamp n milliseconds after the unix epoch */
|
|
4069
4077
|
static milliseconds(e) {
|
|
4070
|
-
return
|
|
4078
|
+
return b.microseconds(e * 1e3);
|
|
4071
4079
|
}
|
|
4072
4080
|
/** @returns a new TimeStamp n seconds after the unix epoch */
|
|
4073
4081
|
static seconds(e) {
|
|
4074
|
-
return
|
|
4082
|
+
return b.milliseconds(e * 1e3);
|
|
4075
4083
|
}
|
|
4076
4084
|
/** @returns a new TimeStamp n minutes after the unix epoch */
|
|
4077
4085
|
static minutes(e) {
|
|
4078
|
-
return
|
|
4086
|
+
return b.seconds(e * 60);
|
|
4079
4087
|
}
|
|
4080
4088
|
/** @returns a new TimeStamp n hours after the unix epoch */
|
|
4081
4089
|
static hours(e) {
|
|
4082
|
-
return
|
|
4090
|
+
return b.minutes(e * 60);
|
|
4083
4091
|
}
|
|
4084
4092
|
/** @returns a new TimeStamp n days after the unix epoch */
|
|
4085
4093
|
static days(e) {
|
|
4086
|
-
return
|
|
4094
|
+
return b.hours(e * 24);
|
|
4087
4095
|
}
|
|
4088
4096
|
};
|
|
4089
|
-
h(
|
|
4090
|
-
h(
|
|
4091
|
-
h(
|
|
4092
|
-
h(
|
|
4093
|
-
h(
|
|
4094
|
-
h(
|
|
4095
|
-
h(
|
|
4096
|
-
h(
|
|
4097
|
-
h(
|
|
4098
|
-
h(
|
|
4099
|
-
h(
|
|
4100
|
-
u.object({ value: u.bigint() }).transform((n) => new
|
|
4101
|
-
u.string().transform((n) => new
|
|
4102
|
-
u.instanceof(Number).transform((n) => new
|
|
4103
|
-
u.number().transform((n) => new
|
|
4104
|
-
u.instanceof(
|
|
4097
|
+
h(N, "NANOSECOND", N.nanoseconds(1)), /** One microsecond after the unix epoch */
|
|
4098
|
+
h(N, "MICROSECOND", N.microseconds(1)), /** One millisecond after the unix epoch */
|
|
4099
|
+
h(N, "MILLISECOND", N.milliseconds(1)), /** One second after the unix epoch */
|
|
4100
|
+
h(N, "SECOND", N.seconds(1)), /** One minute after the unix epoch */
|
|
4101
|
+
h(N, "MINUTE", N.minutes(1)), /** One hour after the unix epoch */
|
|
4102
|
+
h(N, "HOUR", N.hours(1)), /** One day after the unix epoch */
|
|
4103
|
+
h(N, "DAY", N.days(1)), /** The maximum possible value for a timestamp */
|
|
4104
|
+
h(N, "MAX", new N((1n << 63n) - 1n)), /** The minimum possible value for a timestamp */
|
|
4105
|
+
h(N, "MIN", new N(0)), /** The unix epoch */
|
|
4106
|
+
h(N, "ZERO", new N(0)), /** A zod schema for validating timestamps */
|
|
4107
|
+
h(N, "z", u.union([
|
|
4108
|
+
u.object({ value: u.bigint() }).transform((n) => new N(n.value)),
|
|
4109
|
+
u.string().transform((n) => new N(BigInt(n))),
|
|
4110
|
+
u.instanceof(Number).transform((n) => new N(n)),
|
|
4111
|
+
u.number().transform((n) => new N(n)),
|
|
4112
|
+
u.instanceof(N)
|
|
4105
4113
|
]));
|
|
4106
|
-
let
|
|
4107
|
-
const
|
|
4114
|
+
let $ = N;
|
|
4115
|
+
const I = class T {
|
|
4108
4116
|
constructor(e) {
|
|
4109
4117
|
h(this, "value"), h(this, "encodeValue", !0), typeof e == "number" && (e = Math.trunc(e.valueOf())), this.value = BigInt(e.valueOf());
|
|
4110
4118
|
}
|
|
4111
4119
|
static fromSeconds(e) {
|
|
4112
|
-
return e instanceof T ? e : e instanceof Tn ? e.period : e instanceof
|
|
4120
|
+
return e instanceof T ? e : e instanceof Tn ? e.period : e instanceof $ ? new T(e) : ["number", "bigint"].includes(typeof e) ? T.seconds(e) : new T(e);
|
|
4113
4121
|
}
|
|
4114
4122
|
static fromMilliseconds(e) {
|
|
4115
|
-
return e instanceof T ? e : e instanceof Tn ? e.period : e instanceof
|
|
4123
|
+
return e instanceof T ? e : e instanceof Tn ? e.period : e instanceof $ ? new T(e) : ["number", "bigint"].includes(typeof e) ? T.milliseconds(e) : new T(e);
|
|
4116
4124
|
}
|
|
4117
4125
|
encode() {
|
|
4118
4126
|
return this.value.toString();
|
|
@@ -4141,9 +4149,9 @@ const k = class T {
|
|
|
4141
4149
|
);
|
|
4142
4150
|
}
|
|
4143
4151
|
toString() {
|
|
4144
|
-
const e = this.truncate(T.DAY), t = this.truncate(T.HOUR), r = this.truncate(T.MINUTE), s = this.truncate(T.SECOND), i = this.truncate(T.MILLISECOND), a = this.truncate(T.MICROSECOND), o = this.truncate(T.NANOSECOND), c = e, l = t.sub(e), p = r.sub(t), y = s.sub(r), j = i.sub(s), U = a.sub(i),
|
|
4145
|
-
let
|
|
4146
|
-
return c.isZero || (
|
|
4152
|
+
const e = this.truncate(T.DAY), t = this.truncate(T.HOUR), r = this.truncate(T.MINUTE), s = this.truncate(T.SECOND), i = this.truncate(T.MILLISECOND), a = this.truncate(T.MICROSECOND), o = this.truncate(T.NANOSECOND), c = e, l = t.sub(e), p = r.sub(t), y = s.sub(r), j = i.sub(s), U = a.sub(i), je = o.sub(a);
|
|
4153
|
+
let ue = "";
|
|
4154
|
+
return c.isZero || (ue += `${c.days}d `), l.isZero || (ue += `${l.hours}h `), p.isZero || (ue += `${p.minutes}m `), y.isZero || (ue += `${y.seconds}s `), j.isZero || (ue += `${j.milliseconds}ms `), U.isZero || (ue += `${U.microseconds}µs `), je.isZero || (ue += `${je.nanoseconds}ns`), ue.trim();
|
|
4147
4155
|
}
|
|
4148
4156
|
mult(e) {
|
|
4149
4157
|
return new T(this.valueOf() * BigInt(e));
|
|
@@ -4222,7 +4230,7 @@ const k = class T {
|
|
|
4222
4230
|
* @returns A TimeSpan representing the given number of microseconds.
|
|
4223
4231
|
*/
|
|
4224
4232
|
static microseconds(e = 1) {
|
|
4225
|
-
return T.nanoseconds(
|
|
4233
|
+
return T.nanoseconds(Ie(e, 1e3));
|
|
4226
4234
|
}
|
|
4227
4235
|
/**
|
|
4228
4236
|
* Creates a TimeSpan representing the given number of milliseconds.
|
|
@@ -4231,7 +4239,7 @@ const k = class T {
|
|
|
4231
4239
|
* @returns A TimeSpan representing the given number of milliseconds.
|
|
4232
4240
|
*/
|
|
4233
4241
|
static milliseconds(e = 1) {
|
|
4234
|
-
return T.microseconds(
|
|
4242
|
+
return T.microseconds(Ie(e, 1e3));
|
|
4235
4243
|
}
|
|
4236
4244
|
/**
|
|
4237
4245
|
* Creates a TimeSpan representing the given number of seconds.
|
|
@@ -4240,7 +4248,7 @@ const k = class T {
|
|
|
4240
4248
|
* @returns A TimeSpan representing the given number of seconds.
|
|
4241
4249
|
*/
|
|
4242
4250
|
static seconds(e = 1) {
|
|
4243
|
-
return T.milliseconds(
|
|
4251
|
+
return T.milliseconds(Ie(e, 1e3));
|
|
4244
4252
|
}
|
|
4245
4253
|
/**
|
|
4246
4254
|
* Creates a TimeSpan representing the given number of minutes.
|
|
@@ -4249,7 +4257,7 @@ const k = class T {
|
|
|
4249
4257
|
* @returns A TimeSpan representing the given number of minutes.
|
|
4250
4258
|
*/
|
|
4251
4259
|
static minutes(e = 1) {
|
|
4252
|
-
return T.seconds(
|
|
4260
|
+
return T.seconds(Ie(e, 60));
|
|
4253
4261
|
}
|
|
4254
4262
|
/**
|
|
4255
4263
|
* Creates a TimeSpan representing the given number of hours.
|
|
@@ -4258,7 +4266,7 @@ const k = class T {
|
|
|
4258
4266
|
* @returns A TimeSpan representing the given number of hours.
|
|
4259
4267
|
*/
|
|
4260
4268
|
static hours(e) {
|
|
4261
|
-
return T.minutes(
|
|
4269
|
+
return T.minutes(Ie(e, 60));
|
|
4262
4270
|
}
|
|
4263
4271
|
/**
|
|
4264
4272
|
* Creates a TimeSpan representing the given number of days.
|
|
@@ -4267,27 +4275,27 @@ const k = class T {
|
|
|
4267
4275
|
* @returns A TimeSpan representing the given number of days.
|
|
4268
4276
|
*/
|
|
4269
4277
|
static days(e) {
|
|
4270
|
-
return T.hours(
|
|
4278
|
+
return T.hours(Ie(e, 24));
|
|
4271
4279
|
}
|
|
4272
4280
|
};
|
|
4273
|
-
h(
|
|
4274
|
-
h(
|
|
4275
|
-
h(
|
|
4276
|
-
h(
|
|
4277
|
-
h(
|
|
4278
|
-
h(
|
|
4279
|
-
h(
|
|
4280
|
-
h(
|
|
4281
|
-
h(
|
|
4282
|
-
h(
|
|
4283
|
-
h(
|
|
4284
|
-
u.object({ value: u.bigint() }).transform((n) => new
|
|
4285
|
-
u.string().transform((n) => new
|
|
4286
|
-
u.instanceof(Number).transform((n) => new
|
|
4287
|
-
u.number().transform((n) => new
|
|
4288
|
-
u.instanceof(
|
|
4281
|
+
h(I, "NANOSECOND", I.nanoseconds(1)), /** A microsecond. */
|
|
4282
|
+
h(I, "MICROSECOND", I.microseconds(1)), /** A millisecond. */
|
|
4283
|
+
h(I, "MILLISECOND", I.milliseconds(1)), /** A second. */
|
|
4284
|
+
h(I, "SECOND", I.seconds(1)), /** A minute. */
|
|
4285
|
+
h(I, "MINUTE", I.minutes(1)), /** Represents an hour. */
|
|
4286
|
+
h(I, "HOUR", I.hours(1)), /** Represents a day. */
|
|
4287
|
+
h(I, "DAY", I.days(1)), /** The maximum possible value for a TimeSpan. */
|
|
4288
|
+
h(I, "MAX", new I((1n << 63n) - 1n)), /** The minimum possible value for a TimeSpan. */
|
|
4289
|
+
h(I, "MIN", new I(0)), /** The zero value for a TimeSpan. */
|
|
4290
|
+
h(I, "ZERO", new I(0)), /** A zod schema for validating and transforming timespans */
|
|
4291
|
+
h(I, "z", u.union([
|
|
4292
|
+
u.object({ value: u.bigint() }).transform((n) => new I(n.value)),
|
|
4293
|
+
u.string().transform((n) => new I(BigInt(n))),
|
|
4294
|
+
u.instanceof(Number).transform((n) => new I(n)),
|
|
4295
|
+
u.number().transform((n) => new I(n)),
|
|
4296
|
+
u.instanceof(I)
|
|
4289
4297
|
]));
|
|
4290
|
-
let A =
|
|
4298
|
+
let A = I;
|
|
4291
4299
|
const Le = class gt extends Number {
|
|
4292
4300
|
constructor(e) {
|
|
4293
4301
|
e instanceof Number ? super(e.valueOf()) : super(e);
|
|
@@ -4325,7 +4333,7 @@ const Le = class gt extends Number {
|
|
|
4325
4333
|
* @returns The number of bytes in the given TimeSpan at this rate.
|
|
4326
4334
|
*/
|
|
4327
4335
|
byteCount(e, t) {
|
|
4328
|
-
return this.sampleCount(e) * new
|
|
4336
|
+
return this.sampleCount(e) * new L(t).valueOf();
|
|
4329
4337
|
}
|
|
4330
4338
|
/**
|
|
4331
4339
|
* Calculates a TimeSpan given the number of samples at this rate.
|
|
@@ -4400,7 +4408,7 @@ h(B, "z", u.union([
|
|
|
4400
4408
|
u.instanceof(Number).transform((n) => new B(n)),
|
|
4401
4409
|
u.instanceof(B)
|
|
4402
4410
|
]));
|
|
4403
|
-
let
|
|
4411
|
+
let L = B;
|
|
4404
4412
|
const J = class vt {
|
|
4405
4413
|
/**
|
|
4406
4414
|
* Creates a TimeRange from the given start and end TimeStamps.
|
|
@@ -4409,7 +4417,7 @@ const J = class vt {
|
|
|
4409
4417
|
* @param end - A TimeStamp representing the end of the range.
|
|
4410
4418
|
*/
|
|
4411
4419
|
constructor(e, t) {
|
|
4412
|
-
h(this, "start"), h(this, "end"), typeof e == "object" && "start" in e ? (this.start = new
|
|
4420
|
+
h(this, "start"), h(this, "end"), typeof e == "object" && "start" in e ? (this.start = new $(e.start), this.end = new $(e.end)) : (this.start = new $(e), this.end = new $(t));
|
|
4413
4421
|
}
|
|
4414
4422
|
/** @returns The TimeSpan occupied by the TimeRange. */
|
|
4415
4423
|
get span() {
|
|
@@ -4481,7 +4489,7 @@ const J = class vt {
|
|
|
4481
4489
|
const r = this.makeValid();
|
|
4482
4490
|
if (this.equals(e)) return !0;
|
|
4483
4491
|
if (e.end.equals(r.start) || r.end.equals(e.start)) return !1;
|
|
4484
|
-
const s =
|
|
4492
|
+
const s = $.max(r.start, e.start), i = $.min(r.end, e.end);
|
|
4485
4493
|
return i.before(s) ? !1 : new A(i.sub(s)).greaterThanOrEqual(t);
|
|
4486
4494
|
}
|
|
4487
4495
|
roughlyEquals(e, t) {
|
|
@@ -4496,11 +4504,11 @@ const J = class vt {
|
|
|
4496
4504
|
return e.start.after(this.start) && (t.start = e.start), e.start.after(this.end) && (t.end = e.start), e.end.before(this.end) && (t.end = e.end), e.end.before(this.start) && (t.start = e.end), t;
|
|
4497
4505
|
}
|
|
4498
4506
|
};
|
|
4499
|
-
h(J, "MAX", new J(
|
|
4500
|
-
h(J, "MIN", new J(
|
|
4501
|
-
h(J, "ZERO", new J(
|
|
4507
|
+
h(J, "MAX", new J($.MIN, $.MAX)), /** The minimum possible time range. */
|
|
4508
|
+
h(J, "MIN", new J($.MAX, $.MIN)), /** A zero time range. */
|
|
4509
|
+
h(J, "ZERO", new J($.ZERO, $.ZERO)), /** A zod schema for validating and transforming time ranges */
|
|
4502
4510
|
h(J, "z", u.union([
|
|
4503
|
-
u.object({ start:
|
|
4511
|
+
u.object({ start: $.z, end: $.z }).transform((n) => new J(n.start, n.end)),
|
|
4504
4512
|
u.instanceof(J)
|
|
4505
4513
|
]));
|
|
4506
4514
|
let cn = J;
|
|
@@ -4634,20 +4642,20 @@ h(d, "JSON", new d("json")), h(d, "ARRAY_CONSTRUCTORS", /* @__PURE__ */ new Map(
|
|
|
4634
4642
|
[Int32Array.name, d.INT32],
|
|
4635
4643
|
[BigInt64Array.name, d.INT64]
|
|
4636
4644
|
])), h(d, "DENSITIES", /* @__PURE__ */ new Map([
|
|
4637
|
-
[d.UINT8.toString(),
|
|
4638
|
-
[d.UINT16.toString(),
|
|
4639
|
-
[d.UINT32.toString(),
|
|
4640
|
-
[d.UINT64.toString(),
|
|
4641
|
-
[d.FLOAT32.toString(),
|
|
4642
|
-
[d.FLOAT64.toString(),
|
|
4643
|
-
[d.INT8.toString(),
|
|
4644
|
-
[d.INT16.toString(),
|
|
4645
|
-
[d.INT32.toString(),
|
|
4646
|
-
[d.INT64.toString(),
|
|
4647
|
-
[d.TIMESTAMP.toString(),
|
|
4648
|
-
[d.STRING.toString(),
|
|
4649
|
-
[d.JSON.toString(),
|
|
4650
|
-
[d.UUID.toString(),
|
|
4645
|
+
[d.UINT8.toString(), L.BIT8],
|
|
4646
|
+
[d.UINT16.toString(), L.BIT16],
|
|
4647
|
+
[d.UINT32.toString(), L.BIT32],
|
|
4648
|
+
[d.UINT64.toString(), L.BIT64],
|
|
4649
|
+
[d.FLOAT32.toString(), L.BIT32],
|
|
4650
|
+
[d.FLOAT64.toString(), L.BIT64],
|
|
4651
|
+
[d.INT8.toString(), L.BIT8],
|
|
4652
|
+
[d.INT16.toString(), L.BIT16],
|
|
4653
|
+
[d.INT32.toString(), L.BIT32],
|
|
4654
|
+
[d.INT64.toString(), L.BIT64],
|
|
4655
|
+
[d.TIMESTAMP.toString(), L.BIT64],
|
|
4656
|
+
[d.STRING.toString(), L.UNKNOWN],
|
|
4657
|
+
[d.JSON.toString(), L.UNKNOWN],
|
|
4658
|
+
[d.UUID.toString(), L.BIT128]
|
|
4651
4659
|
])), /** All the data types. */
|
|
4652
4660
|
h(d, "ALL", [
|
|
4653
4661
|
d.UNKNOWN,
|
|
@@ -4670,7 +4678,7 @@ h(d, "z", u.union([
|
|
|
4670
4678
|
u.string().transform((n) => new d(n)),
|
|
4671
4679
|
u.instanceof(d)
|
|
4672
4680
|
]));
|
|
4673
|
-
let
|
|
4681
|
+
let k = d;
|
|
4674
4682
|
const D = class Z extends Number {
|
|
4675
4683
|
constructor(e) {
|
|
4676
4684
|
super(e.valueOf());
|
|
@@ -4786,14 +4794,21 @@ u.union([
|
|
|
4786
4794
|
]);
|
|
4787
4795
|
const fr = (n) => {
|
|
4788
4796
|
const e = typeof n;
|
|
4789
|
-
return e === "string" || e === "number" || e === "boolean" || e === "bigint" || n instanceof
|
|
4790
|
-
},
|
|
4797
|
+
return e === "string" || e === "number" || e === "boolean" || e === "bigint" || n instanceof $ || n instanceof A || n instanceof Date;
|
|
4798
|
+
}, xa = (n, e, t, r = 0) => n.usesBigInt && !e.usesBigInt ? Number(t) - Number(r) : !n.usesBigInt && e.usesBigInt ? BigInt(t.valueOf()) - BigInt(r.valueOf()) : ze(t, -r).valueOf(), ze = (n, e) => typeof n == "bigint" && typeof e == "bigint" || typeof n == "number" && typeof e == "number" ? n + e : e === 0 ? n : n === 0 ? e : Number(n) + Number(e), _a = (n) => n == null ? !1 : Array.isArray(n) || n instanceof ArrayBuffer || ArrayBuffer.isView(n) && !(n instanceof DataView) || n instanceof Na ? !0 : fr(n), ce = -1, Ta = u.string().transform(
|
|
4791
4799
|
(n) => new Uint8Array(
|
|
4792
4800
|
atob(n).split("").map((e) => e.charCodeAt(0))
|
|
4793
4801
|
).buffer
|
|
4794
|
-
),
|
|
4802
|
+
), Oa = u.union([u.null(), u.undefined()]).transform(() => new Uint8Array().buffer), Gt = 10, Sa = (n, e) => {
|
|
4803
|
+
if (n === "string" && !e.isVariable)
|
|
4804
|
+
throw new Error(`cannot convert series of type ${e.toString()} to string`);
|
|
4805
|
+
if (n === "number" && !e.isNumeric)
|
|
4806
|
+
throw new Error(`cannot convert series of type ${e.toString()} to number`);
|
|
4807
|
+
if (n === "bigint" && !e.usesBigInt)
|
|
4808
|
+
throw new Error(`cannot convert series of type ${e.toString()} to bigint`);
|
|
4809
|
+
}, We = class H {
|
|
4795
4810
|
constructor(e) {
|
|
4796
|
-
h(this, "key", ""), h(this, "isSynnaxSeries", !0), h(this, "dataType"), h(this, "sampleOffset"), h(this, "gl"), h(this, "_data"), h(this, "_timeRange"), h(this, "alignment", 0n), h(this, "_cachedMin"), h(this, "_cachedMax"), h(this, "writePos",
|
|
4811
|
+
h(this, "key", ""), h(this, "isSynnaxSeries", !0), h(this, "dataType"), h(this, "sampleOffset"), h(this, "gl"), h(this, "_data"), h(this, "_timeRange"), h(this, "alignment", 0n), h(this, "_cachedMin"), h(this, "_cachedMax"), h(this, "writePos", ce), h(this, "_refCount", 0), h(this, "_cachedLength"), h(this, "_cachedIndexes"), _a(e) && (e = { data: e });
|
|
4797
4812
|
const {
|
|
4798
4813
|
dataType: t,
|
|
4799
4814
|
timeRange: r,
|
|
@@ -4808,7 +4823,7 @@ const fr = (n) => {
|
|
|
4808
4823
|
return;
|
|
4809
4824
|
}
|
|
4810
4825
|
const l = fr(c), p = Array.isArray(c);
|
|
4811
|
-
if (t != null) this.dataType = new
|
|
4826
|
+
if (t != null) this.dataType = new k(t);
|
|
4812
4827
|
else {
|
|
4813
4828
|
if (c instanceof ArrayBuffer)
|
|
4814
4829
|
throw new Error(
|
|
@@ -4823,26 +4838,26 @@ const fr = (n) => {
|
|
|
4823
4838
|
);
|
|
4824
4839
|
y = c[0];
|
|
4825
4840
|
}
|
|
4826
|
-
if (typeof y == "string") this.dataType =
|
|
4827
|
-
else if (typeof y == "number") this.dataType =
|
|
4828
|
-
else if (typeof y == "bigint") this.dataType =
|
|
4829
|
-
else if (typeof y == "boolean") this.dataType =
|
|
4830
|
-
else if (y instanceof
|
|
4831
|
-
this.dataType =
|
|
4832
|
-
else if (typeof y == "object") this.dataType =
|
|
4841
|
+
if (typeof y == "string") this.dataType = k.STRING;
|
|
4842
|
+
else if (typeof y == "number") this.dataType = k.FLOAT64;
|
|
4843
|
+
else if (typeof y == "bigint") this.dataType = k.INT64;
|
|
4844
|
+
else if (typeof y == "boolean") this.dataType = k.BOOLEAN;
|
|
4845
|
+
else if (y instanceof $ || y instanceof Date || y instanceof $)
|
|
4846
|
+
this.dataType = k.TIMESTAMP;
|
|
4847
|
+
else if (typeof y == "object") this.dataType = k.JSON;
|
|
4833
4848
|
else
|
|
4834
4849
|
throw new Error(
|
|
4835
4850
|
`cannot infer data type of ${typeof y} when constructing a Series from a JS array`
|
|
4836
4851
|
);
|
|
4837
|
-
} else this.dataType = new
|
|
4852
|
+
} else this.dataType = new k(c);
|
|
4838
4853
|
}
|
|
4839
4854
|
if (!p && !l) this._data = c;
|
|
4840
4855
|
else {
|
|
4841
4856
|
let y = l ? [c] : c;
|
|
4842
4857
|
const j = y[0];
|
|
4843
|
-
(j instanceof
|
|
4858
|
+
(j instanceof $ || j instanceof Date || j instanceof A) && (y = y.map((U) => new $(U).valueOf())), this.dataType.equals(k.STRING) ? (this._cachedLength = y.length, this._data = new TextEncoder().encode(`${y.join(`
|
|
4844
4859
|
`)}
|
|
4845
|
-
`).buffer) : this.dataType.equals(
|
|
4860
|
+
`).buffer) : this.dataType.equals(k.JSON) ? (this._cachedLength = y.length, this._data = new TextEncoder().encode(
|
|
4846
4861
|
`${y.map((U) => pt.encodeString(U)).join(`
|
|
4847
4862
|
`)}
|
|
4848
4863
|
`
|
|
@@ -4862,7 +4877,7 @@ const fr = (n) => {
|
|
|
4862
4877
|
static alloc({ capacity: e, dataType: t, ...r }) {
|
|
4863
4878
|
if (e === 0)
|
|
4864
4879
|
throw new Error("[Series] - cannot allocate an array of length 0");
|
|
4865
|
-
const s = new new
|
|
4880
|
+
const s = new new k(t).Array(e), i = new H({
|
|
4866
4881
|
data: s.buffer,
|
|
4867
4882
|
dataType: t,
|
|
4868
4883
|
...r
|
|
@@ -4873,7 +4888,7 @@ const fr = (n) => {
|
|
|
4873
4888
|
const s = r.spanRange(t.span(e)), i = new BigInt64Array(e);
|
|
4874
4889
|
for (let a = 0; a < e; a++)
|
|
4875
4890
|
i[a] = BigInt(r.add(t.span(a)).valueOf());
|
|
4876
|
-
return new H({ data: i, dataType:
|
|
4891
|
+
return new H({ data: i, dataType: k.TIMESTAMP, timeRange: s });
|
|
4877
4892
|
}
|
|
4878
4893
|
get refCount() {
|
|
4879
4894
|
return this._refCount;
|
|
@@ -4884,7 +4899,7 @@ const fr = (n) => {
|
|
|
4884
4899
|
`)}
|
|
4885
4900
|
`
|
|
4886
4901
|
);
|
|
4887
|
-
return new H({ data: r, dataType:
|
|
4902
|
+
return new H({ data: r, dataType: k.STRING, timeRange: t });
|
|
4888
4903
|
}
|
|
4889
4904
|
static fromJSON(e, t) {
|
|
4890
4905
|
const r = new TextEncoder().encode(
|
|
@@ -4892,7 +4907,7 @@ const fr = (n) => {
|
|
|
4892
4907
|
`)}
|
|
4893
4908
|
`
|
|
4894
4909
|
);
|
|
4895
|
-
return new H({ data: r, dataType:
|
|
4910
|
+
return new H({ data: r, dataType: k.JSON, timeRange: t });
|
|
4896
4911
|
}
|
|
4897
4912
|
acquire(e) {
|
|
4898
4913
|
this._refCount++, e != null && this.updateGLBuffer(e);
|
|
@@ -4917,12 +4932,12 @@ const fr = (n) => {
|
|
|
4917
4932
|
return this.dataType.isVariable ? this.writeVariable(e) : this.writeFixed(e);
|
|
4918
4933
|
}
|
|
4919
4934
|
writeVariable(e) {
|
|
4920
|
-
if (this.writePos ===
|
|
4935
|
+
if (this.writePos === ce) return 0;
|
|
4921
4936
|
const t = this.byteCapacity.valueOf() - this.writePos, r = e.subBytes(0, t);
|
|
4922
4937
|
return this.writeToUnderlyingData(r), this.writePos += r.byteLength.valueOf(), this._cachedLength != null && (this._cachedLength += r.length, this.calculateCachedLength()), r.length;
|
|
4923
4938
|
}
|
|
4924
4939
|
writeFixed(e) {
|
|
4925
|
-
if (this.writePos ===
|
|
4940
|
+
if (this.writePos === ce) return 0;
|
|
4926
4941
|
const t = this.capacity - this.writePos, r = e.sub(0, t);
|
|
4927
4942
|
return this.writeToUnderlyingData(r), this._cachedLength = void 0, this.maybeRecomputeMinMax(r), this.writePos += r.length, r.length;
|
|
4928
4943
|
}
|
|
@@ -4941,18 +4956,18 @@ const fr = (n) => {
|
|
|
4941
4956
|
}
|
|
4942
4957
|
/** @returns a native typed array with the proper data type. */
|
|
4943
4958
|
get data() {
|
|
4944
|
-
return this.writePos ===
|
|
4959
|
+
return this.writePos === ce ? this.underlyingData : new this.dataType.Array(this._data, 0, this.writePos);
|
|
4945
4960
|
}
|
|
4946
4961
|
toStrings() {
|
|
4947
|
-
if (!this.dataType.matches(
|
|
4962
|
+
if (!this.dataType.matches(k.STRING, k.UUID))
|
|
4948
4963
|
throw new Error("cannot convert non-string series to strings");
|
|
4949
4964
|
return new TextDecoder().decode(this.underlyingData).split(`
|
|
4950
4965
|
`).slice(0, -1);
|
|
4951
4966
|
}
|
|
4952
4967
|
toUUIDs() {
|
|
4953
|
-
if (!this.dataType.equals(
|
|
4968
|
+
if (!this.dataType.equals(k.UUID))
|
|
4954
4969
|
throw new Error("cannot convert non-uuid series to uuids");
|
|
4955
|
-
const e =
|
|
4970
|
+
const e = k.UUID.density.valueOf(), t = Array(this.length);
|
|
4956
4971
|
for (let r = 0; r < this.length; r++) {
|
|
4957
4972
|
const s = this.underlyingData.slice(r * e, (r + 1) * e), i = Array.from(
|
|
4958
4973
|
new Uint8Array(s.buffer),
|
|
@@ -4963,7 +4978,7 @@ const fr = (n) => {
|
|
|
4963
4978
|
return t;
|
|
4964
4979
|
}
|
|
4965
4980
|
parseJSON(e) {
|
|
4966
|
-
if (!this.dataType.equals(
|
|
4981
|
+
if (!this.dataType.equals(k.JSON))
|
|
4967
4982
|
throw new Error("cannot parse non-JSON series as JSON");
|
|
4968
4983
|
return new TextDecoder().decode(this.underlyingData).split(`
|
|
4969
4984
|
`).slice(0, -1).map((t) => e.parse(pt.decodeString(t)));
|
|
@@ -4983,11 +4998,11 @@ const fr = (n) => {
|
|
|
4983
4998
|
}
|
|
4984
4999
|
/** @returns the length of the series in bytes. */
|
|
4985
5000
|
get byteLength() {
|
|
4986
|
-
return this.writePos ===
|
|
5001
|
+
return this.writePos === ce ? this.byteCapacity : this.dataType.isVariable ? new Yt(this.writePos) : this.dataType.density.size(this.writePos);
|
|
4987
5002
|
}
|
|
4988
5003
|
/** @returns the number of samples in this array. */
|
|
4989
5004
|
get length() {
|
|
4990
|
-
return this._cachedLength != null ? this._cachedLength : this.dataType.isVariable ? this.calculateCachedLength() : this.writePos ===
|
|
5005
|
+
return this._cachedLength != null ? this._cachedLength : this.dataType.isVariable ? this.calculateCachedLength() : this.writePos === ce ? this.data.length : this.writePos;
|
|
4991
5006
|
}
|
|
4992
5007
|
calculateCachedLength() {
|
|
4993
5008
|
if (!this.dataType.isVariable)
|
|
@@ -5011,7 +5026,7 @@ const fr = (n) => {
|
|
|
5011
5026
|
if (this.dataType.equals(e)) return this;
|
|
5012
5027
|
const r = new e.Array(this.length);
|
|
5013
5028
|
for (let s = 0; s < this.length; s++)
|
|
5014
|
-
r[s] =
|
|
5029
|
+
r[s] = xa(this.dataType, e, this.data[s], t);
|
|
5015
5030
|
return new H({
|
|
5016
5031
|
data: r.buffer,
|
|
5017
5032
|
dataType: e,
|
|
@@ -5023,7 +5038,7 @@ const fr = (n) => {
|
|
|
5023
5038
|
}
|
|
5024
5039
|
calcRawMax() {
|
|
5025
5040
|
if (this.length === 0) return -1 / 0;
|
|
5026
|
-
if (this.dataType.equals(
|
|
5041
|
+
if (this.dataType.equals(k.TIMESTAMP))
|
|
5027
5042
|
this._cachedMax = this.data[this.data.length - 1];
|
|
5028
5043
|
else if (this.dataType.usesBigInt) {
|
|
5029
5044
|
const e = this.data;
|
|
@@ -5038,11 +5053,11 @@ const fr = (n) => {
|
|
|
5038
5053
|
get max() {
|
|
5039
5054
|
if (this.dataType.isVariable)
|
|
5040
5055
|
throw new Error("cannot calculate maximum on a variable length data type");
|
|
5041
|
-
return this.writePos === 0 ? -1 / 0 : (this._cachedMax ?? (this._cachedMax = this.calcRawMax()),
|
|
5056
|
+
return this.writePos === 0 ? -1 / 0 : (this._cachedMax ?? (this._cachedMax = this.calcRawMax()), ze(this._cachedMax, this.sampleOffset));
|
|
5042
5057
|
}
|
|
5043
5058
|
calcRawMin() {
|
|
5044
5059
|
if (this.length === 0) return 1 / 0;
|
|
5045
|
-
if (this.dataType.equals(
|
|
5060
|
+
if (this.dataType.equals(k.TIMESTAMP)) this._cachedMin = this.data[0];
|
|
5046
5061
|
else if (this.dataType.usesBigInt) {
|
|
5047
5062
|
const e = this.data;
|
|
5048
5063
|
this._cachedMin = e.reduce((t, r) => t < r ? t : r);
|
|
@@ -5056,7 +5071,7 @@ const fr = (n) => {
|
|
|
5056
5071
|
get min() {
|
|
5057
5072
|
if (this.dataType.isVariable)
|
|
5058
5073
|
throw new Error("cannot calculate minimum on a variable length data type");
|
|
5059
|
-
return this.writePos === 0 ? 1 / 0 : (this._cachedMin ?? (this._cachedMin = this.calcRawMin()),
|
|
5074
|
+
return this.writePos === 0 ? 1 / 0 : (this._cachedMin ?? (this._cachedMin = this.calcRawMin()), ze(this._cachedMin, this.sampleOffset));
|
|
5060
5075
|
}
|
|
5061
5076
|
/** @returns the bounds of this array. */
|
|
5062
5077
|
get bounds() {
|
|
@@ -5076,7 +5091,7 @@ const fr = (n) => {
|
|
|
5076
5091
|
this.max, this.min;
|
|
5077
5092
|
}
|
|
5078
5093
|
get range() {
|
|
5079
|
-
return
|
|
5094
|
+
return ze(this.max, -this.min);
|
|
5080
5095
|
}
|
|
5081
5096
|
atAlignment(e, t) {
|
|
5082
5097
|
const r = Number(e - this.alignment);
|
|
@@ -5094,7 +5109,7 @@ const fr = (n) => {
|
|
|
5094
5109
|
if (t === !0) throw new Error(`[series] - no value at index ${e}`);
|
|
5095
5110
|
return;
|
|
5096
5111
|
}
|
|
5097
|
-
return
|
|
5112
|
+
return ze(r, this.sampleOffset);
|
|
5098
5113
|
}
|
|
5099
5114
|
atVariable(e, t) {
|
|
5100
5115
|
let r = 0, s = 0;
|
|
@@ -5116,7 +5131,7 @@ const fr = (n) => {
|
|
|
5116
5131
|
}
|
|
5117
5132
|
}
|
|
5118
5133
|
const i = this.data.slice(r, s);
|
|
5119
|
-
return this.dataType.equals(
|
|
5134
|
+
return this.dataType.equals(k.STRING) ? new TextDecoder().decode(i) : Rn(JSON.parse(new TextDecoder().decode(i)));
|
|
5120
5135
|
}
|
|
5121
5136
|
/**
|
|
5122
5137
|
* @returns the index of the first sample that is greater than or equal to the given value.
|
|
@@ -5134,11 +5149,11 @@ const fr = (n) => {
|
|
|
5134
5149
|
return t;
|
|
5135
5150
|
}
|
|
5136
5151
|
updateGLBuffer(e) {
|
|
5137
|
-
if (this.gl.control = e, !this.dataType.equals(
|
|
5152
|
+
if (this.gl.control = e, !this.dataType.equals(k.FLOAT32) && !this.dataType.equals(k.UINT8))
|
|
5138
5153
|
throw new Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");
|
|
5139
5154
|
const { buffer: t, bufferUsage: r, prevBuffer: s } = this.gl;
|
|
5140
5155
|
if (t == null && (this.gl.buffer = e.createBuffer()), this.writePos !== s)
|
|
5141
|
-
if (e.bindBuffer(e.ARRAY_BUFFER, this.gl.buffer), this.writePos !==
|
|
5156
|
+
if (e.bindBuffer(e.ARRAY_BUFFER, this.gl.buffer), this.writePos !== ce) {
|
|
5142
5157
|
s === 0 && e.bufferData(e.ARRAY_BUFFER, this.byteCapacity.valueOf(), e.STATIC_DRAW);
|
|
5143
5158
|
const i = this.dataType.density.size(s).valueOf(), a = this.underlyingData.slice(this.gl.prevBuffer, this.writePos);
|
|
5144
5159
|
e.bufferSubData(e.ARRAY_BUFFER, i, a.buffer), this.gl.prevBuffer = this.writePos;
|
|
@@ -5147,31 +5162,10 @@ const fr = (n) => {
|
|
|
5147
5162
|
e.ARRAY_BUFFER,
|
|
5148
5163
|
this.buffer,
|
|
5149
5164
|
r === "static" ? e.STATIC_DRAW : e.DYNAMIC_DRAW
|
|
5150
|
-
), this.gl.prevBuffer =
|
|
5165
|
+
), this.gl.prevBuffer = ce;
|
|
5151
5166
|
}
|
|
5152
5167
|
as(e) {
|
|
5153
|
-
|
|
5154
|
-
if (!this.dataType.equals(N.STRING))
|
|
5155
|
-
throw new Error(
|
|
5156
|
-
`cannot convert series of type ${this.dataType.toString()} to string`
|
|
5157
|
-
);
|
|
5158
|
-
return this;
|
|
5159
|
-
}
|
|
5160
|
-
if (e === "number") {
|
|
5161
|
-
if (!this.dataType.isNumeric)
|
|
5162
|
-
throw new Error(
|
|
5163
|
-
`cannot convert series of type ${this.dataType.toString()} to number`
|
|
5164
|
-
);
|
|
5165
|
-
return this;
|
|
5166
|
-
}
|
|
5167
|
-
if (e === "bigint") {
|
|
5168
|
-
if (!this.dataType.equals(N.INT64))
|
|
5169
|
-
throw new Error(
|
|
5170
|
-
`cannot convert series of type ${this.dataType.toString()} to bigint`
|
|
5171
|
-
);
|
|
5172
|
-
return this;
|
|
5173
|
-
}
|
|
5174
|
-
throw new Error(`cannot convert series to ${e}`);
|
|
5168
|
+
return Sa(e, this.dataType), this;
|
|
5175
5169
|
}
|
|
5176
5170
|
get digest() {
|
|
5177
5171
|
var e;
|
|
@@ -5208,10 +5202,10 @@ const fr = (n) => {
|
|
|
5208
5202
|
}
|
|
5209
5203
|
[Symbol.iterator]() {
|
|
5210
5204
|
if (this.dataType.isVariable) {
|
|
5211
|
-
const e = new
|
|
5212
|
-
return this.dataType.equals(
|
|
5205
|
+
const e = new Ia(this);
|
|
5206
|
+
return this.dataType.equals(k.JSON) ? new ka(e) : e;
|
|
5213
5207
|
}
|
|
5214
|
-
return new
|
|
5208
|
+
return new Aa(this);
|
|
5215
5209
|
}
|
|
5216
5210
|
slice(e, t) {
|
|
5217
5211
|
return this.sliceSub(!1, e, t);
|
|
@@ -5264,24 +5258,24 @@ const fr = (n) => {
|
|
|
5264
5258
|
});
|
|
5265
5259
|
}
|
|
5266
5260
|
};
|
|
5267
|
-
h(
|
|
5261
|
+
h(We, "crudeZ", u.object({
|
|
5268
5262
|
timeRange: cn.z.optional(),
|
|
5269
|
-
dataType:
|
|
5263
|
+
dataType: k.z,
|
|
5270
5264
|
alignment: u.coerce.bigint().optional(),
|
|
5271
5265
|
data: u.union([
|
|
5272
|
-
|
|
5273
|
-
|
|
5266
|
+
Ta,
|
|
5267
|
+
Oa,
|
|
5274
5268
|
u.instanceof(ArrayBuffer),
|
|
5275
5269
|
u.instanceof(Uint8Array)
|
|
5276
5270
|
]),
|
|
5277
|
-
glBufferUsage:
|
|
5278
|
-
})), h(
|
|
5279
|
-
let
|
|
5271
|
+
glBufferUsage: wa.optional().default("static").optional()
|
|
5272
|
+
})), h(We, "z", We.crudeZ.transform((n) => new We(n)));
|
|
5273
|
+
let Na = We;
|
|
5280
5274
|
class On {
|
|
5281
5275
|
constructor(e, t, r) {
|
|
5282
5276
|
h(this, "series"), h(this, "end"), h(this, "index"), this.series = e;
|
|
5283
5277
|
const s = we(0, e.length);
|
|
5284
|
-
this.end =
|
|
5278
|
+
this.end = wn(s, r), this.index = wn(s, t);
|
|
5285
5279
|
}
|
|
5286
5280
|
next() {
|
|
5287
5281
|
return this.index >= this.end ? { done: !0, value: void 0 } : { done: !1, value: this.series.at(this.index++, !0) };
|
|
@@ -5290,7 +5284,7 @@ class On {
|
|
|
5290
5284
|
return this;
|
|
5291
5285
|
}
|
|
5292
5286
|
}
|
|
5293
|
-
class
|
|
5287
|
+
class Ia {
|
|
5294
5288
|
constructor(e) {
|
|
5295
5289
|
if (h(this, "series"), h(this, "index"), h(this, "decoder"), !e.dataType.isVariable)
|
|
5296
5290
|
throw new Error(
|
|
@@ -5309,7 +5303,7 @@ class ga {
|
|
|
5309
5303
|
}
|
|
5310
5304
|
}
|
|
5311
5305
|
var Sn, Nn;
|
|
5312
|
-
class
|
|
5306
|
+
class ka {
|
|
5313
5307
|
constructor(e) {
|
|
5314
5308
|
h(this, "wrapped"), h(this, Sn, "JSONSeriesIterator"), this.wrapped = e;
|
|
5315
5309
|
}
|
|
@@ -5325,7 +5319,7 @@ class va {
|
|
|
5325
5319
|
}
|
|
5326
5320
|
}
|
|
5327
5321
|
var In, kn;
|
|
5328
|
-
class
|
|
5322
|
+
class Aa {
|
|
5329
5323
|
constructor(e) {
|
|
5330
5324
|
h(this, "series"), h(this, "index"), h(this, In, "SeriesIterator"), this.series = e, this.index = 0;
|
|
5331
5325
|
}
|
|
@@ -5342,7 +5336,7 @@ class wa {
|
|
|
5342
5336
|
const An = (n) => {
|
|
5343
5337
|
const e = n >> 32n, t = n & 0xffffffffn;
|
|
5344
5338
|
return { domain: e, sample: t };
|
|
5345
|
-
},
|
|
5339
|
+
}, Ea = (n, e, t = ".") => {
|
|
5346
5340
|
const r = n.split(t);
|
|
5347
5341
|
return r.map((s, i) => {
|
|
5348
5342
|
const a = e(s, i, r);
|
|
@@ -5362,7 +5356,7 @@ const An = (n) => {
|
|
|
5362
5356
|
a = c;
|
|
5363
5357
|
}
|
|
5364
5358
|
return a;
|
|
5365
|
-
},
|
|
5359
|
+
}, $a = (n, e, t) => {
|
|
5366
5360
|
const r = e.split(".");
|
|
5367
5361
|
let s = n;
|
|
5368
5362
|
for (let i = 0; i < r.length - 1; i++) {
|
|
@@ -5374,7 +5368,7 @@ const An = (n) => {
|
|
|
5374
5368
|
} catch (i) {
|
|
5375
5369
|
throw console.error("failed to set value", t, "at path", e, "on object", n), i;
|
|
5376
5370
|
}
|
|
5377
|
-
},
|
|
5371
|
+
}, Ca = (n, e) => {
|
|
5378
5372
|
const t = e.split(".");
|
|
5379
5373
|
let r = n;
|
|
5380
5374
|
for (let s = 0; s < t.length - 1; s++) {
|
|
@@ -5389,16 +5383,16 @@ const An = (n) => {
|
|
|
5389
5383
|
return;
|
|
5390
5384
|
}
|
|
5391
5385
|
delete r[t[t.length - 1]];
|
|
5392
|
-
},
|
|
5386
|
+
}, Ra = (n, e) => {
|
|
5393
5387
|
const t = n.split(".");
|
|
5394
5388
|
return e < 0 ? t[t.length + e] : t[e];
|
|
5395
|
-
},
|
|
5389
|
+
}, Ma = (n, e) => {
|
|
5396
5390
|
try {
|
|
5397
5391
|
return pr(n, e), !0;
|
|
5398
5392
|
} catch {
|
|
5399
5393
|
return !1;
|
|
5400
5394
|
}
|
|
5401
|
-
},
|
|
5395
|
+
}, ja = (n, e) => {
|
|
5402
5396
|
if (e.length === 0) return !0;
|
|
5403
5397
|
const t = n.split("."), r = e.split(".");
|
|
5404
5398
|
if (r.length > t.length) return !1;
|
|
@@ -5408,13 +5402,13 @@ const An = (n) => {
|
|
|
5408
5402
|
return !1;
|
|
5409
5403
|
}
|
|
5410
5404
|
return !0;
|
|
5411
|
-
},
|
|
5405
|
+
}, Za = (n) => JSON.parse(JSON.stringify(n)), Ba = (n, ...e) => (e.forEach((t) => {
|
|
5412
5406
|
let r = n;
|
|
5413
5407
|
const s = t.split(".");
|
|
5414
5408
|
s.forEach((i, a) => {
|
|
5415
5409
|
a === s.length - 1 ? delete r[i] : i in r && (r = r[i]);
|
|
5416
5410
|
});
|
|
5417
|
-
}), n),
|
|
5411
|
+
}), n), Ua = (n, e, t = "") => {
|
|
5418
5412
|
const r = {}, s = (i, a, o) => {
|
|
5419
5413
|
if (typeof i != typeof a || i === null || a === null) {
|
|
5420
5414
|
r[o] = [i, a];
|
|
@@ -5469,15 +5463,15 @@ const An = (n) => {
|
|
|
5469
5463
|
}, Ht = (n, ...e) => {
|
|
5470
5464
|
if (e.length === 0) return n;
|
|
5471
5465
|
const t = e.shift();
|
|
5472
|
-
if (
|
|
5466
|
+
if (Ye(n) && Ye(t))
|
|
5473
5467
|
for (const r in t)
|
|
5474
5468
|
try {
|
|
5475
|
-
|
|
5469
|
+
Ye(t[r]) ? (r in n || Object.assign(n, { [r]: {} }), Ht(n[r], t[r])) : Object.assign(n, { [r]: t[r] });
|
|
5476
5470
|
} catch (s) {
|
|
5477
5471
|
throw s instanceof TypeError ? new TypeError(`.${r}: ${s.message}`) : s;
|
|
5478
5472
|
}
|
|
5479
5473
|
return Ht(n, ...e);
|
|
5480
|
-
},
|
|
5474
|
+
}, Da = (n, e, t) => {
|
|
5481
5475
|
const r = (s, i, a) => {
|
|
5482
5476
|
for (const o in i) {
|
|
5483
5477
|
const c = i[o], l = yr(a);
|
|
@@ -5494,33 +5488,33 @@ const An = (n) => {
|
|
|
5494
5488
|
return ((e = n._def) == null ? void 0 : e.typeName) === "ZodEffects" ? yr(n._def.schema) : n == null ? void 0 : n.shape;
|
|
5495
5489
|
}, gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5496
5490
|
__proto__: null,
|
|
5497
|
-
copy:
|
|
5498
|
-
deleteD:
|
|
5499
|
-
difference:
|
|
5500
|
-
element:
|
|
5491
|
+
copy: Za,
|
|
5492
|
+
deleteD: Ba,
|
|
5493
|
+
difference: Ua,
|
|
5494
|
+
element: Ra,
|
|
5501
5495
|
equal: Jt,
|
|
5502
5496
|
get: pr,
|
|
5503
|
-
has:
|
|
5497
|
+
has: Ma,
|
|
5504
5498
|
override: Ht,
|
|
5505
|
-
overrideValidItems:
|
|
5499
|
+
overrideValidItems: Da,
|
|
5506
5500
|
partialEqual: mr,
|
|
5507
|
-
pathsMatch:
|
|
5508
|
-
remove:
|
|
5509
|
-
set:
|
|
5510
|
-
transformPath:
|
|
5501
|
+
pathsMatch: ja,
|
|
5502
|
+
remove: Ca,
|
|
5503
|
+
set: $a,
|
|
5504
|
+
transformPath: Ea
|
|
5511
5505
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5512
5506
|
u.object({ key: u.string(), value: u.string() });
|
|
5513
5507
|
u.record(
|
|
5514
5508
|
u.union([u.number(), u.string(), u.symbol()]),
|
|
5515
5509
|
u.unknown()
|
|
5516
5510
|
);
|
|
5517
|
-
const vr = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser",
|
|
5511
|
+
const vr = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", Pa = vr(), br = ["macOS", "Windows", "Linux"], La = ["macos", "windows", "linux"], za = {
|
|
5518
5512
|
macos: "macOS",
|
|
5519
5513
|
windows: "Windows",
|
|
5520
5514
|
linux: "Linux"
|
|
5521
|
-
},
|
|
5522
|
-
u.enum(
|
|
5523
|
-
),
|
|
5515
|
+
}, Wa = u.enum(br).or(
|
|
5516
|
+
u.enum(La).transform((n) => za[n])
|
|
5517
|
+
), Va = () => {
|
|
5524
5518
|
if (typeof window > "u") return;
|
|
5525
5519
|
const n = window.navigator.userAgent.toLowerCase();
|
|
5526
5520
|
if (n.includes("mac")) return "macOS";
|
|
@@ -5528,19 +5522,19 @@ const vr = () => typeof process < "u" && process.versions != null && process.ver
|
|
|
5528
5522
|
if (n.includes("linux")) return "Linux";
|
|
5529
5523
|
};
|
|
5530
5524
|
let jt;
|
|
5531
|
-
const
|
|
5525
|
+
const qa = (n = {}) => {
|
|
5532
5526
|
const { force: e, default: t } = n;
|
|
5533
|
-
return e ?? jt ?? (jt =
|
|
5534
|
-
},
|
|
5527
|
+
return e ?? jt ?? (jt = Va(), jt ?? t);
|
|
5528
|
+
}, Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5535
5529
|
__proto__: null,
|
|
5536
|
-
OPERATING_SYSTEMS:
|
|
5537
|
-
RUNTIME:
|
|
5530
|
+
OPERATING_SYSTEMS: br,
|
|
5531
|
+
RUNTIME: Pa,
|
|
5538
5532
|
detect: vr,
|
|
5539
|
-
getOS:
|
|
5540
|
-
osZ:
|
|
5533
|
+
getOS: qa,
|
|
5534
|
+
osZ: Wa
|
|
5541
5535
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5542
|
-
var
|
|
5543
|
-
const
|
|
5536
|
+
var Fa = Object.defineProperty, Ya = (n, e, t) => e in n ? Fa(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Ve = (n, e, t) => Ya(n, typeof e != "symbol" ? e + "" : e, t);
|
|
5537
|
+
const Ga = (...n) => n.map(wr).join(""), wr = (n) => (n.endsWith("/") || (n += "/"), n.startsWith("/") && (n = n.slice(1)), n), Ja = (n) => n.endsWith("/") ? n.slice(0, -1) : n, En = class Xt {
|
|
5544
5538
|
/**
|
|
5545
5539
|
* @param host - The hostname or IP address of the server.
|
|
5546
5540
|
* @param port - The port number of the server.
|
|
@@ -5548,7 +5542,7 @@ const Ua = (...n) => n.map(br).join(""), br = (n) => (n.endsWith("/") || (n += "
|
|
|
5548
5542
|
* @param pathPrefix - A path prefix to use for all requests. Defaults to "".
|
|
5549
5543
|
*/
|
|
5550
5544
|
constructor({ host: e, port: t, protocol: r = "", pathPrefix: s = "" }) {
|
|
5551
|
-
|
|
5545
|
+
Ve(this, "protocol"), Ve(this, "host"), Ve(this, "port"), Ve(this, "path"), this.protocol = r, this.host = e, this.port = t, this.path = wr(s);
|
|
5552
5546
|
}
|
|
5553
5547
|
/**
|
|
5554
5548
|
* Replaces creates a new URL with the specified properties replaced.
|
|
@@ -5571,34 +5565,34 @@ const Ua = (...n) => n.map(br).join(""), br = (n) => (n.endsWith("/") || (n += "
|
|
|
5571
5565
|
child(e) {
|
|
5572
5566
|
return new Xt({
|
|
5573
5567
|
...this,
|
|
5574
|
-
pathPrefix:
|
|
5568
|
+
pathPrefix: Ga(this.path, e)
|
|
5575
5569
|
});
|
|
5576
5570
|
}
|
|
5577
5571
|
/** @returns a string representation of the url */
|
|
5578
5572
|
toString() {
|
|
5579
|
-
return
|
|
5573
|
+
return Ja(
|
|
5580
5574
|
`${this.protocol}://${this.host}:${this.port}/${this.path}`
|
|
5581
5575
|
);
|
|
5582
5576
|
}
|
|
5583
5577
|
};
|
|
5584
|
-
|
|
5585
|
-
const
|
|
5586
|
-
u.number().int().min(
|
|
5587
|
-
const
|
|
5588
|
-
u.number().int().min(
|
|
5589
|
-
const
|
|
5590
|
-
u.number().int().min(
|
|
5591
|
-
const
|
|
5592
|
-
u.bigint().min(
|
|
5593
|
-
const
|
|
5594
|
-
u.number().int().min(0).max(
|
|
5595
|
-
const
|
|
5596
|
-
u.number().int().min(0).max(
|
|
5597
|
-
const
|
|
5598
|
-
u.number().int().min(0).max(
|
|
5599
|
-
const
|
|
5600
|
-
u.bigint().min(0n).max(
|
|
5601
|
-
var
|
|
5578
|
+
Ve(En, "UNKNOWN", new En({ host: "unknown", port: 0 }));
|
|
5579
|
+
const Ha = -128, Xa = 127;
|
|
5580
|
+
u.number().int().min(Ha).max(Xa);
|
|
5581
|
+
const Ka = -32768, Qa = 32767;
|
|
5582
|
+
u.number().int().min(Ka).max(Qa);
|
|
5583
|
+
const eo = -2147483648, to = 2147483647;
|
|
5584
|
+
u.number().int().min(eo).max(to);
|
|
5585
|
+
const no = -9223372036854775808n, ro = 9223372036854775807n;
|
|
5586
|
+
u.bigint().min(no).max(ro);
|
|
5587
|
+
const so = 255;
|
|
5588
|
+
u.number().int().min(0).max(so);
|
|
5589
|
+
const io = 65535;
|
|
5590
|
+
u.number().int().min(0).max(io);
|
|
5591
|
+
const ao = 4294967295;
|
|
5592
|
+
u.number().int().min(0).max(ao);
|
|
5593
|
+
const oo = 18446744073709551615n;
|
|
5594
|
+
u.bigint().min(0n).max(oo);
|
|
5595
|
+
var uo = Object.defineProperty, co = (n, e, t) => e in n ? uo(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, qe = (n, e, t) => co(n, typeof e != "symbol" ? e + "" : e, t);
|
|
5602
5596
|
u.object({
|
|
5603
5597
|
interval: A.z.optional(),
|
|
5604
5598
|
maxRetries: u.number().optional(),
|
|
@@ -5606,11 +5600,11 @@ u.object({
|
|
|
5606
5600
|
});
|
|
5607
5601
|
const te = class extends Number {
|
|
5608
5602
|
};
|
|
5609
|
-
|
|
5603
|
+
qe(te, "ABSOLUTE", 255), qe(te, "MINIMUM", 0), qe(te, "BOUNDS", {
|
|
5610
5604
|
lower: te.MINIMUM,
|
|
5611
5605
|
// upper bound is exclusive, so we add 1
|
|
5612
5606
|
upper: te.ABSOLUTE + 1
|
|
5613
|
-
}),
|
|
5607
|
+
}), qe(te, "z", u.union([
|
|
5614
5608
|
u.instanceof(te),
|
|
5615
5609
|
u.number().int().min(0).max(255).transform((n) => new te(n)),
|
|
5616
5610
|
u.instanceof(Number).transform((n) => new te(n))
|
|
@@ -5619,20 +5613,22 @@ u.object({
|
|
|
5619
5613
|
name: u.string(),
|
|
5620
5614
|
key: u.string()
|
|
5621
5615
|
});
|
|
5622
|
-
const xr = class
|
|
5616
|
+
const xr = class Fe extends Error {
|
|
5623
5617
|
constructor() {
|
|
5624
|
-
super(
|
|
5618
|
+
super(Fe.MESSAGE);
|
|
5625
5619
|
}
|
|
5626
5620
|
/** Returns true if the error or message is a cancellation error" */
|
|
5627
5621
|
matches(e) {
|
|
5628
|
-
return typeof e == "string" ? e.includes(
|
|
5622
|
+
return typeof e == "string" ? e.includes(Fe.MESSAGE) : e instanceof Fe || e.message.includes(Fe.MESSAGE);
|
|
5629
5623
|
}
|
|
5630
5624
|
};
|
|
5631
|
-
|
|
5632
|
-
let
|
|
5633
|
-
new
|
|
5625
|
+
qe(xr, "MESSAGE", "canceled");
|
|
5626
|
+
let lo = xr;
|
|
5627
|
+
new lo();
|
|
5634
5628
|
u.string().regex(/^\d+\.\d+\.\d+$/);
|
|
5635
|
-
const
|
|
5629
|
+
const ho = ["standard", "scientific", "engineering"];
|
|
5630
|
+
u.enum(ho);
|
|
5631
|
+
const Ee = "main", ln = "prerender", dn = {
|
|
5636
5632
|
stage: "creating",
|
|
5637
5633
|
processCount: 0,
|
|
5638
5634
|
reserved: !1,
|
|
@@ -5642,7 +5638,7 @@ const Ae = "main", ln = "prerender", dn = {
|
|
|
5642
5638
|
...dn,
|
|
5643
5639
|
key: ln,
|
|
5644
5640
|
visible: !1
|
|
5645
|
-
},
|
|
5641
|
+
}, Ho = u.object({
|
|
5646
5642
|
key: u.string(),
|
|
5647
5643
|
url: u.string().optional(),
|
|
5648
5644
|
title: u.string().optional(),
|
|
@@ -5662,8 +5658,8 @@ const Ae = "main", ln = "prerender", dn = {
|
|
|
5662
5658
|
fileDropEnabled: u.boolean().optional(),
|
|
5663
5659
|
transparent: u.boolean().optional(),
|
|
5664
5660
|
alwaysOnTop: u.boolean().optional()
|
|
5665
|
-
}),
|
|
5666
|
-
label:
|
|
5661
|
+
}), fo = A.milliseconds(50), Tr = () => setTimeout(() => window.location.reload(), fo.milliseconds), po = {
|
|
5662
|
+
label: Ee,
|
|
5667
5663
|
config: {
|
|
5668
5664
|
enablePrerender: !0,
|
|
5669
5665
|
debug: !1,
|
|
@@ -5672,19 +5668,19 @@ const Ae = "main", ln = "prerender", dn = {
|
|
|
5672
5668
|
windows: {
|
|
5673
5669
|
main: {
|
|
5674
5670
|
...dn,
|
|
5675
|
-
key:
|
|
5671
|
+
key: Ee,
|
|
5676
5672
|
reserved: !0
|
|
5677
5673
|
}
|
|
5678
5674
|
},
|
|
5679
5675
|
labelKeys: {
|
|
5680
|
-
main:
|
|
5676
|
+
main: Ee
|
|
5681
5677
|
},
|
|
5682
5678
|
keyLabels: {
|
|
5683
|
-
main:
|
|
5679
|
+
main: Ee
|
|
5684
5680
|
}
|
|
5685
|
-
},
|
|
5686
|
-
if (n.type ===
|
|
5687
|
-
return e.label !==
|
|
5681
|
+
}, Xo = (n, e) => {
|
|
5682
|
+
if (n.type === Po.type)
|
|
5683
|
+
return e.label !== Ee || (n.payload.label = Ft.create(), n.payload.prerenderLabel = Ft.create()), n;
|
|
5688
5684
|
if ("label" in n.payload) return n;
|
|
5689
5685
|
let t = e.label;
|
|
5690
5686
|
const r = n.payload;
|
|
@@ -5692,7 +5688,7 @@ const Ae = "main", ln = "prerender", dn = {
|
|
|
5692
5688
|
}, V = (n) => (e, t) => {
|
|
5693
5689
|
if (!("label" in t.payload)) throw new Error("Missing label");
|
|
5694
5690
|
n(e, t);
|
|
5695
|
-
},
|
|
5691
|
+
}, ve = (n, e = !1) => V((t, r) => {
|
|
5696
5692
|
let s = e;
|
|
5697
5693
|
const i = t.windows[r.payload.label];
|
|
5698
5694
|
if (i != null) {
|
|
@@ -5709,19 +5705,19 @@ const Ae = "main", ln = "prerender", dn = {
|
|
|
5709
5705
|
...s,
|
|
5710
5706
|
[n]: s[n] + (e ? -1 : 1)
|
|
5711
5707
|
});
|
|
5712
|
-
},
|
|
5708
|
+
}, mo = (n) => Object.values(n.windows).some((e) => e.key === ln && !e.reserved), Or = "drift", yo = (n, e, t) => n.position != null && n.size != null && e == null ? ft.topLeft(
|
|
5713
5709
|
ft.positionInCenter(
|
|
5714
5710
|
ft.construct(Wt.ZERO, t ?? Wt.ZERO),
|
|
5715
5711
|
ft.construct(n.position, n.size)
|
|
5716
5712
|
)
|
|
5717
|
-
) : e,
|
|
5713
|
+
) : e, go = (n, { payload: e }) => {
|
|
5718
5714
|
if (e.key === ln) return;
|
|
5719
5715
|
const { key: t, label: r, prerenderLabel: s } = e;
|
|
5720
5716
|
if (r == null || s == null)
|
|
5721
5717
|
throw new Error("[drift] - bug - missing label and prerender label");
|
|
5722
5718
|
console.log(n.config.debug), Ir(n.config.debug, "reducer create window");
|
|
5723
5719
|
const i = n.windows.main;
|
|
5724
|
-
if (e.position =
|
|
5720
|
+
if (e.position = yo(i, e.position, e.size), t in n.keyLabels) {
|
|
5725
5721
|
dt(n.config.debug, "window already exists, un-minimize and focus it");
|
|
5726
5722
|
const c = n.keyLabels[e.key];
|
|
5727
5723
|
n.windows[c].visible = !0, n.windows[c].focusCount += 1, n.windows[c].minimized = !1, n.windows[c].position = e.position, hn(n.config.debug);
|
|
@@ -5742,50 +5738,50 @@ const Ae = "main", ln = "prerender", dn = {
|
|
|
5742
5738
|
...dn,
|
|
5743
5739
|
...e,
|
|
5744
5740
|
reserved: !0
|
|
5745
|
-
}, n.labelKeys[r] = t, n.keyLabels[t] = r), n.config.enablePrerender && !
|
|
5741
|
+
}, n.labelKeys[r] = t, n.keyLabels[t] = r), n.config.enablePrerender && !mo(n) && (dt(n.config.debug, "creating pre-render window"), n.windows[s] = gr.copy({
|
|
5746
5742
|
...n.config.defaultWindowProps,
|
|
5747
5743
|
..._r
|
|
5748
5744
|
})), hn(n.config.debug);
|
|
5749
|
-
},
|
|
5745
|
+
}, vo = V((n, e) => {
|
|
5750
5746
|
const t = n.windows[e.payload.label];
|
|
5751
5747
|
t != null && (t.stage = e.payload.stage);
|
|
5752
|
-
}),
|
|
5748
|
+
}), bo = V(
|
|
5753
5749
|
(n, { payload: { label: e } }) => {
|
|
5754
5750
|
const t = n.windows[e];
|
|
5755
5751
|
t == null || t.processCount > 0 || (t.stage = "closing", delete n.windows[e], delete n.labelKeys[e], delete n.keyLabels[t.key]);
|
|
5756
5752
|
}
|
|
5757
|
-
),
|
|
5753
|
+
), wo = V((n, e) => {
|
|
5758
5754
|
const t = n.windows[e.payload.label];
|
|
5759
5755
|
t == null || t.processCount > 0 || (t.stage = "reloading", Tr());
|
|
5760
|
-
}),
|
|
5756
|
+
}), xo = V(
|
|
5761
5757
|
$t("processCount")
|
|
5762
|
-
),
|
|
5758
|
+
), _o = V((n, e) => {
|
|
5763
5759
|
$t("processCount", !0)(n, e);
|
|
5764
5760
|
const t = n.windows[e.payload.label];
|
|
5765
5761
|
t != null && t.processCount === 0 && (t.stage === "reloading" ? Tr() : (n.windows[e.payload.label].visible = !1, delete n.windows[e.payload.label], delete n.labelKeys[e.payload.label], delete n.keyLabels[t.key]));
|
|
5766
|
-
}),
|
|
5762
|
+
}), To = (n, e) => {
|
|
5767
5763
|
const t = n.windows[e.payload.key];
|
|
5768
5764
|
t != null && (t.error = e.payload.message);
|
|
5769
|
-
},
|
|
5765
|
+
}, Oo = V((n, e) => {
|
|
5770
5766
|
const t = n.windows[e.payload.label];
|
|
5771
5767
|
t != null && (t.visible !== !0 && (t.visible = !0), $t("focusCount")(n, e));
|
|
5772
|
-
}),
|
|
5768
|
+
}), So = ve("minimized"), No = ve("maximized"), Io = ve("visible", !0), ko = ve("fullscreen", !0), Ao = V(
|
|
5773
5769
|
$t("centerCount")
|
|
5774
|
-
),
|
|
5770
|
+
), Eo = V((n, e) => {
|
|
5775
5771
|
n.windows[e.payload.label].position = e.payload.position;
|
|
5776
|
-
}),
|
|
5772
|
+
}), $o = V((n, e) => {
|
|
5777
5773
|
n.windows[e.payload.label].size = e.payload.size;
|
|
5778
|
-
}),
|
|
5774
|
+
}), Co = V((n, e) => {
|
|
5779
5775
|
n.windows[e.payload.label].minSize = e.payload.size;
|
|
5780
|
-
}),
|
|
5776
|
+
}), Ro = V((n, e) => {
|
|
5781
5777
|
n.windows[e.payload.label].maxSize = e.payload.size;
|
|
5782
|
-
}),
|
|
5778
|
+
}), Mo = ve("resizable"), jo = ve("skipTaskbar"), Zo = ve("alwaysOnTop"), Bo = V((n, e) => {
|
|
5783
5779
|
n.windows[e.payload.label].title = e.payload.title;
|
|
5784
|
-
}),
|
|
5780
|
+
}), Uo = ve("decorations"), $n = (n, e) => {
|
|
5785
5781
|
const t = n.windows[e.payload.label];
|
|
5786
5782
|
gr.partialEqual(t, e.payload) || (n.windows[e.payload.label] = { ...t, ...e.payload });
|
|
5787
|
-
},
|
|
5788
|
-
if (n.config = { ...n.config, ...e.payload }, n.label = e.payload.label, n.label ===
|
|
5783
|
+
}, Do = (n, e) => {
|
|
5784
|
+
if (n.config = { ...n.config, ...e.payload }, n.label = e.payload.label, n.label === Ee && n.config.enablePrerender) {
|
|
5789
5785
|
const t = Ft.create();
|
|
5790
5786
|
n.windows[t] = {
|
|
5791
5787
|
...n.config.defaultWindowProps,
|
|
@@ -5794,104 +5790,104 @@ const Ae = "main", ln = "prerender", dn = {
|
|
|
5794
5790
|
}
|
|
5795
5791
|
}, Sr = Nr({
|
|
5796
5792
|
name: Or,
|
|
5797
|
-
initialState:
|
|
5793
|
+
initialState: po,
|
|
5798
5794
|
reducers: {
|
|
5799
|
-
internalSetInitial:
|
|
5800
|
-
createWindow:
|
|
5801
|
-
setWindowStage:
|
|
5802
|
-
closeWindow:
|
|
5803
|
-
registerProcess:
|
|
5804
|
-
completeProcess:
|
|
5805
|
-
setWindowError:
|
|
5806
|
-
focusWindow:
|
|
5807
|
-
reloadWindow:
|
|
5808
|
-
setWindowMinimized:
|
|
5809
|
-
setWindowMaximized:
|
|
5810
|
-
setWindowVisible:
|
|
5811
|
-
setWindowFullscreen:
|
|
5812
|
-
centerWindow:
|
|
5813
|
-
setWindowPosition:
|
|
5814
|
-
setWindowSize:
|
|
5815
|
-
setWindowMinSize:
|
|
5816
|
-
setWindowMaxSize:
|
|
5817
|
-
setWindowResizable:
|
|
5818
|
-
setWindowSkipTaskbar:
|
|
5819
|
-
setWindowAlwaysOnTop:
|
|
5820
|
-
setWindowTitle:
|
|
5821
|
-
setWindowDecorations:
|
|
5795
|
+
internalSetInitial: Do,
|
|
5796
|
+
createWindow: go,
|
|
5797
|
+
setWindowStage: vo,
|
|
5798
|
+
closeWindow: bo,
|
|
5799
|
+
registerProcess: xo,
|
|
5800
|
+
completeProcess: _o,
|
|
5801
|
+
setWindowError: To,
|
|
5802
|
+
focusWindow: Oo,
|
|
5803
|
+
reloadWindow: wo,
|
|
5804
|
+
setWindowMinimized: So,
|
|
5805
|
+
setWindowMaximized: No,
|
|
5806
|
+
setWindowVisible: Io,
|
|
5807
|
+
setWindowFullscreen: ko,
|
|
5808
|
+
centerWindow: Ao,
|
|
5809
|
+
setWindowPosition: Eo,
|
|
5810
|
+
setWindowSize: $o,
|
|
5811
|
+
setWindowMinSize: Co,
|
|
5812
|
+
setWindowMaxSize: Ro,
|
|
5813
|
+
setWindowResizable: Mo,
|
|
5814
|
+
setWindowSkipTaskbar: jo,
|
|
5815
|
+
setWindowAlwaysOnTop: Zo,
|
|
5816
|
+
setWindowTitle: Bo,
|
|
5817
|
+
setWindowDecorations: Uo,
|
|
5822
5818
|
runtimeSetWindowProps: $n,
|
|
5823
5819
|
setWindowProps: $n
|
|
5824
5820
|
}
|
|
5825
5821
|
}), {
|
|
5826
5822
|
actions: {
|
|
5827
|
-
runtimeSetWindowProps:
|
|
5828
|
-
setWindowProps:
|
|
5829
|
-
createWindow:
|
|
5830
|
-
internalSetInitial:
|
|
5831
|
-
setWindowStage:
|
|
5832
|
-
closeWindow:
|
|
5833
|
-
registerProcess:
|
|
5834
|
-
completeProcess:
|
|
5835
|
-
setWindowError:
|
|
5836
|
-
focusWindow:
|
|
5837
|
-
reloadWindow:
|
|
5838
|
-
setWindowMinimized:
|
|
5839
|
-
setWindowMaximized:
|
|
5840
|
-
setWindowVisible:
|
|
5841
|
-
setWindowFullscreen:
|
|
5842
|
-
centerWindow:
|
|
5843
|
-
setWindowPosition:
|
|
5844
|
-
setWindowSize:
|
|
5845
|
-
setWindowMinSize:
|
|
5846
|
-
setWindowMaxSize:
|
|
5847
|
-
setWindowResizable:
|
|
5848
|
-
setWindowSkipTaskbar:
|
|
5849
|
-
setWindowAlwaysOnTop:
|
|
5850
|
-
setWindowTitle:
|
|
5851
|
-
setWindowDecorations:
|
|
5852
|
-
}
|
|
5853
|
-
} = Sr,
|
|
5823
|
+
runtimeSetWindowProps: Ko,
|
|
5824
|
+
setWindowProps: Qo,
|
|
5825
|
+
createWindow: Po,
|
|
5826
|
+
internalSetInitial: Lo,
|
|
5827
|
+
setWindowStage: eu,
|
|
5828
|
+
closeWindow: tu,
|
|
5829
|
+
registerProcess: nu,
|
|
5830
|
+
completeProcess: ru,
|
|
5831
|
+
setWindowError: su,
|
|
5832
|
+
focusWindow: iu,
|
|
5833
|
+
reloadWindow: au,
|
|
5834
|
+
setWindowMinimized: ou,
|
|
5835
|
+
setWindowMaximized: uu,
|
|
5836
|
+
setWindowVisible: cu,
|
|
5837
|
+
setWindowFullscreen: lu,
|
|
5838
|
+
centerWindow: du,
|
|
5839
|
+
setWindowPosition: hu,
|
|
5840
|
+
setWindowSize: fu,
|
|
5841
|
+
setWindowMinSize: pu,
|
|
5842
|
+
setWindowMaxSize: mu,
|
|
5843
|
+
setWindowResizable: yu,
|
|
5844
|
+
setWindowSkipTaskbar: gu,
|
|
5845
|
+
setWindowAlwaysOnTop: vu,
|
|
5846
|
+
setWindowTitle: bu,
|
|
5847
|
+
setWindowDecorations: wu
|
|
5848
|
+
}
|
|
5849
|
+
} = Sr, xu = Sr.reducer, _u = (n) => n.startsWith(Or), zo = [Lo.type], Tu = (n, e) => !n && !zo.includes(e);
|
|
5854
5850
|
export {
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
A as
|
|
5851
|
+
ft as $,
|
|
5852
|
+
yu as A,
|
|
5853
|
+
fu as B,
|
|
5854
|
+
gu as C,
|
|
5855
|
+
bu as D,
|
|
5856
|
+
cu as E,
|
|
5857
|
+
Ho as F,
|
|
5858
|
+
A as G,
|
|
5859
|
+
Go as H,
|
|
5863
5860
|
dn as I,
|
|
5864
|
-
|
|
5861
|
+
Wt as J,
|
|
5865
5862
|
gr as K,
|
|
5866
|
-
|
|
5867
|
-
Ae as M,
|
|
5863
|
+
Ee as M,
|
|
5868
5864
|
Or as S,
|
|
5869
|
-
|
|
5865
|
+
po as Z,
|
|
5870
5866
|
Mt as _,
|
|
5871
5867
|
hn as a,
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5868
|
+
au as b,
|
|
5869
|
+
Xo as c,
|
|
5870
|
+
su as d,
|
|
5871
|
+
Lo as e,
|
|
5872
|
+
eu as f,
|
|
5877
5873
|
Ir as g,
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5874
|
+
tu as h,
|
|
5875
|
+
_u as i,
|
|
5876
|
+
ru as j,
|
|
5877
|
+
Po as k,
|
|
5882
5878
|
dt as l,
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5879
|
+
iu as m,
|
|
5880
|
+
xu as n,
|
|
5881
|
+
nu as o,
|
|
5882
|
+
vu as p,
|
|
5883
|
+
wu as q,
|
|
5884
|
+
Ko as r,
|
|
5885
|
+
Tu as s,
|
|
5886
|
+
lu as t,
|
|
5887
|
+
mu as u,
|
|
5888
|
+
uu as v,
|
|
5889
|
+
pu as w,
|
|
5890
|
+
ou as x,
|
|
5891
|
+
hu as y,
|
|
5892
|
+
Qo as z
|
|
5897
5893
|
};
|