@synnaxlabs/x 0.52.5 → 0.53.1
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/.turbo/turbo-build.log +6 -6
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/json/index.d.ts +2 -0
- package/dist/src/json/index.d.ts.map +1 -0
- package/dist/src/json/json.d.ts +21 -0
- package/dist/src/json/json.d.ts.map +1 -0
- package/dist/src/json/json.spec.d.ts +2 -0
- package/dist/src/json/json.spec.d.ts.map +1 -0
- package/dist/src/telem/telem.d.ts +3 -2
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/x.cjs +7 -7
- package/dist/x.js +419 -399
- package/package.json +3 -3
- package/src/index.ts +1 -0
- package/src/json/index.ts +10 -0
- package/src/json/json.spec.ts +96 -0
- package/src/json/json.ts +32 -0
- package/src/telem/series.ts +1 -1
- package/src/telem/telem.spec.ts +28 -9
- package/src/telem/telem.ts +26 -14
- package/tsconfig.tsbuildinfo +1 -1
package/dist/x.js
CHANGED
|
@@ -8,7 +8,7 @@ const gn = (e) => L.union([
|
|
|
8
8
|
if (e == null) return [t];
|
|
9
9
|
const n = e.findIndex((s) => s == t), r = [...e];
|
|
10
10
|
return n === -1 ? r.push(t) : r[n] = t, r;
|
|
11
|
-
},
|
|
11
|
+
}, Yr = ((e, t) => {
|
|
12
12
|
if (e != null)
|
|
13
13
|
return Array.isArray(t) ? e.filter((n) => !t.includes(n)) : e.filter((n) => n != t);
|
|
14
14
|
}), mn = (e, t) => {
|
|
@@ -17,21 +17,21 @@ const gn = (e) => L.union([
|
|
|
17
17
|
if (e == null) return [t];
|
|
18
18
|
const n = e.findIndex((s) => s.key === t.key), r = [...e];
|
|
19
19
|
return n === -1 ? r.push(t) : r[n] = t, r;
|
|
20
|
-
},
|
|
20
|
+
}, zr = ((e, t) => {
|
|
21
21
|
if (e != null)
|
|
22
22
|
return Array.isArray(t) ? e.filter((n) => !t.includes(n.key)) : e.filter((n) => n.key !== t);
|
|
23
|
-
}),
|
|
23
|
+
}), hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
24
24
|
__proto__: null,
|
|
25
25
|
nullableZ: gn,
|
|
26
|
-
remove:
|
|
27
|
-
removeKeyed:
|
|
26
|
+
remove: Yr,
|
|
27
|
+
removeKeyed: zr,
|
|
28
28
|
toArray: Fr,
|
|
29
29
|
upsert: yn,
|
|
30
30
|
upsertKeyed: mn
|
|
31
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
31
|
+
}, Symbol.toStringTag, { value: "Module" })), Vr = (e) => {
|
|
32
32
|
const t = e.replace(/_[a-z]/g, (n) => n[1].toUpperCase());
|
|
33
33
|
return t.length > 1 && t[0] === t[0].toUpperCase() && t[1] === t[1].toUpperCase() || t.length === 0 ? t : t[0].toLowerCase() + t.slice(1);
|
|
34
|
-
},
|
|
34
|
+
}, Wt = (e) => {
|
|
35
35
|
const t = (n, r = oe) => {
|
|
36
36
|
if (typeof n == "string") return e(n);
|
|
37
37
|
if (Array.isArray(n)) return n.map((o) => t(o, r));
|
|
@@ -48,20 +48,20 @@ const gn = (e) => L.union([
|
|
|
48
48
|
}), s);
|
|
49
49
|
};
|
|
50
50
|
return t;
|
|
51
|
-
}, ve =
|
|
51
|
+
}, ve = Wt(Vr), Wr = (e) => (
|
|
52
52
|
// Don't convert the first character and don't convert a character that is after a
|
|
53
53
|
// non-alphanumeric character
|
|
54
54
|
e.replace(
|
|
55
55
|
/([a-z0-9])([A-Z])/g,
|
|
56
56
|
(t, n, r) => `${n}_${r.toLowerCase()}`
|
|
57
57
|
)
|
|
58
|
-
), pn =
|
|
58
|
+
), pn = Wt(Wr), bn = (e) => e.length === 0 ? e : e[0].toUpperCase() + e.slice(1), Gr = [Number, String, Uint8Array], oe = {
|
|
59
59
|
recursive: !0,
|
|
60
60
|
recursiveInArray: !0
|
|
61
61
|
}, Hr = (e = oe) => (e.recursive == null ? e = oe : e.recursiveInArray ??= !1, e), en = (e) => e != null && Array.isArray(e), ee = (e) => e != null && typeof e == "object" && !Array.isArray(e), nn = (e) => Gr.some((t) => e instanceof t), Dr = (e) => e.replace(/[\s_]+/g, "-").replace(
|
|
62
62
|
/([a-z0-9])([A-Z])/g,
|
|
63
63
|
(t, n, r) => `${n}-${r.toLowerCase()}`
|
|
64
|
-
).toLowerCase(), Jr =
|
|
64
|
+
).toLowerCase(), Jr = Wt(Dr), Xr = (e) => {
|
|
65
65
|
if (e.length === 0) return e;
|
|
66
66
|
let t = e.replace(/[_-]/g, " ");
|
|
67
67
|
return t = t.replace(
|
|
@@ -71,14 +71,14 @@ const gn = (e) => L.union([
|
|
|
71
71
|
/([A-Z]+)([A-Z][a-z])/g,
|
|
72
72
|
(n, r, s) => `${r} ${s}`
|
|
73
73
|
), t = t.replace(/\s+/g, " ").trim(), t = t.replace(/\b\w/g, (n) => n.toUpperCase()), t;
|
|
74
|
-
}, Kr =
|
|
74
|
+
}, Kr = Wt(Xr), du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
75
75
|
__proto__: null,
|
|
76
76
|
camelToSnake: pn,
|
|
77
77
|
capitalize: bn,
|
|
78
78
|
snakeToCamel: ve,
|
|
79
79
|
toKebab: Jr,
|
|
80
80
|
toProperNoun: Kr
|
|
81
|
-
}, Symbol.toStringTag, { value: "Module" })), at = (e) => e != null && typeof e == "object" && !Array.isArray(e),
|
|
81
|
+
}, Symbol.toStringTag, { value: "Module" })), at = (e) => e != null && typeof e == "object" && !Array.isArray(e), gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82
82
|
__proto__: null,
|
|
83
83
|
isObject: at
|
|
84
84
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -158,7 +158,7 @@ class xn {
|
|
|
158
158
|
return n != null ? n.parse(r) : r;
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
const Ot = new wn(), Qr = new On(), ts = new xn(), es = [Ot],
|
|
161
|
+
const Ot = new wn(), Qr = new On(), ts = new xn(), es = [Ot], yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
162
162
|
__proto__: null,
|
|
163
163
|
CSVCodec: On,
|
|
164
164
|
CSV_CODEC: Qr,
|
|
@@ -206,7 +206,7 @@ const Me = (e) => e != null && typeof e == "object" && "toString" in e, In = (e)
|
|
|
206
206
|
default:
|
|
207
207
|
return !1;
|
|
208
208
|
}
|
|
209
|
-
}, ns = (e) => !In(e),
|
|
209
|
+
}, ns = (e) => !In(e), mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
210
210
|
__proto__: null,
|
|
211
211
|
ValueExtension: st,
|
|
212
212
|
isCrudeValueExtension: C,
|
|
@@ -223,7 +223,7 @@ const Me = (e) => e != null && typeof e == "object" && "toString" in e, In = (e)
|
|
|
223
223
|
}
|
|
224
224
|
r.set(i, s);
|
|
225
225
|
}), Array.from(r.values());
|
|
226
|
-
},
|
|
226
|
+
}, pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
227
227
|
__proto__: null,
|
|
228
228
|
by: rs,
|
|
229
229
|
unique: ce
|
|
@@ -264,7 +264,7 @@ const Me = (e) => e != null && typeof e == "object" && "toString" in e, In = (e)
|
|
|
264
264
|
}, os = (e, t) => {
|
|
265
265
|
const n = ce(e), r = ce(t);
|
|
266
266
|
return Nn(n, r);
|
|
267
|
-
}, cs = (e, t) => e === t ? 0 : e === "first" && t === "last" ? 1 : -1, vn = (e) => (t, n) => e(n, t), it = 0,
|
|
267
|
+
}, cs = (e, t) => e === t ? 0 : e === "first" && t === "last" ? 1 : -1, vn = (e) => (t, n) => e(n, t), it = 0, V = -1, W = 1, Mn = (e) => e < it, An = (e) => e > it, as = (e) => e >= it, En = (e) => e === it, us = (e, t) => {
|
|
268
268
|
const n = /([a-zA-Z]+)|(\d+)/g, r = e.replace(/[\s_.-]+/g, "").match(n), s = t.replace(/[\s_.-]+/g, "").match(n);
|
|
269
269
|
if (!r || !s) return 0;
|
|
270
270
|
for (let i = 0; i < Math.min(r.length, s.length); i++) {
|
|
@@ -290,11 +290,11 @@ const Me = (e) => e != null && typeof e == "object" && "toString" in e, In = (e)
|
|
|
290
290
|
}, ls = (e, t, n) => {
|
|
291
291
|
const r = Sn(e, t, n);
|
|
292
292
|
e.splice(r, 0, t);
|
|
293
|
-
},
|
|
293
|
+
}, bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
294
294
|
__proto__: null,
|
|
295
295
|
EQUAL: it,
|
|
296
|
-
GREATER_THAN:
|
|
297
|
-
LESS_THAN:
|
|
296
|
+
GREATER_THAN: W,
|
|
297
|
+
LESS_THAN: V,
|
|
298
298
|
insert: ls,
|
|
299
299
|
isEqualTo: En,
|
|
300
300
|
isGreaterThan: An,
|
|
@@ -316,11 +316,11 @@ let Tn = (e, t = 21) => (n = t) => {
|
|
|
316
316
|
r += e[Math.random() * e.length | 0];
|
|
317
317
|
return r;
|
|
318
318
|
};
|
|
319
|
-
const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456789${$n}`, Un = 11, hs = Tn($n, 1), ds = Tn(fs, Un - 1), Ae = () => `${hs()}${ds()}`,
|
|
319
|
+
const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456789${$n}`, Un = 11, hs = Tn($n, 1), ds = Tn(fs, Un - 1), Ae = () => `${hs()}${ds()}`, wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
320
320
|
__proto__: null,
|
|
321
321
|
LENGTH: Un,
|
|
322
322
|
create: Ae
|
|
323
|
-
}, Symbol.toStringTag, { value: "Module" })), jn = (e, t) => (n) => n instanceof t || typeof n == "object" && n !== null && "discriminator" in n && n.discriminator === e,
|
|
323
|
+
}, Symbol.toStringTag, { value: "Module" })), jn = (e, t) => (n) => n instanceof t || typeof n == "object" && n !== null && "discriminator" in n && n.discriminator === e, Ou = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
324
324
|
__proto__: null,
|
|
325
325
|
createMatcher: jn
|
|
326
326
|
}, Symbol.toStringTag, { value: "Module" })), gs = 2 ** 8 - 1, Cn = 2 ** 12 - 1, ys = 2 ** 16 - 1, ms = 2 ** 32 - 1, ps = 2n ** 64n - 1n, bs = 2 ** 64 - 1, ws = -128, Os = 2 ** 7 - 1, xs = -32768, Is = 2 ** 15 - 1, Ns = -2147483648, vs = 2 ** 31 - 1, Ms = -(2n ** 63n), qt = 2n ** 63n - 1n, As = -9223372036854776e3, Bn = 2 ** 63 - 1, lt = (e) => (t, n) => {
|
|
@@ -340,7 +340,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
340
340
|
}, Rn = lt((e, t) => e <= t ? e : t), Ft = (e) => typeof e == "bigint" ? !0 : Number.isInteger(e), Ts = lt((e, t) => e >= t ? e : t), Pn = (e) => typeof e == "bigint" ? e < 0n ? -e : e : e < 0 ? -e : e, P = lt((e, t) => e * t), At = lt((e, t) => e / t), Ln = c.tuple([c.number(), c.number()]), Ee = c.object({ width: c.number(), height: c.number() }), $s = c.object({
|
|
341
341
|
signedWidth: c.number(),
|
|
342
342
|
signedHeight: c.number()
|
|
343
|
-
}), kn = ["start", "center", "end"], ut = c.object({ x: c.number(), y: c.number() }), Zn = c.object({ clientX: c.number(), clientY: c.number() }), Gt = ["x", "y"], Se = c.enum(Gt), Te = ["top", "right", "bottom", "left"], Us = c.enum(Te), Ht = ["left", "right"], $e = c.enum(Ht), Dt = ["top", "bottom"], Ue = c.enum(Dt), je = ["center"], ue = c.enum(je), js = [...Te, ...je], Ce = c.enum(js), Cs = c.enum(kn), _n = ["first", "last"], Bs = c.enum(_n), Rs = c.object({ lower: c.number(), upper: c.number() }), Ps = c.enum([...Se.options, ...Ce.options]), Ls = c.union([Se, Ce, c.instanceof(String)]),
|
|
343
|
+
}), kn = ["start", "center", "end"], ut = c.object({ x: c.number(), y: c.number() }), Zn = c.object({ clientX: c.number(), clientY: c.number() }), Gt = ["x", "y"], Se = c.enum(Gt), Te = ["top", "right", "bottom", "left"], Us = c.enum(Te), Ht = ["left", "right"], $e = c.enum(Ht), Dt = ["top", "bottom"], Ue = c.enum(Dt), je = ["center"], ue = c.enum(je), js = [...Te, ...je], Ce = c.enum(js), Cs = c.enum(kn), _n = ["first", "last"], Bs = c.enum(_n), Rs = c.object({ lower: c.number(), upper: c.number() }), Ps = c.enum([...Se.options, ...Ce.options]), Ls = c.union([Se, Ce, c.instanceof(String)]), w = (e, t, n) => {
|
|
344
344
|
const r = {};
|
|
345
345
|
if (typeof t == "object" && (n = t, t = void 0), n = { makeValid: !0, ...n }, typeof e == "number" || typeof e == "bigint")
|
|
346
346
|
t != null ? (r.lower = e, r.upper = t) : (r.lower = typeof e == "bigint" ? 0n : 0, r.upper = e);
|
|
@@ -353,46 +353,46 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
353
353
|
}, ks = Object.freeze({ lower: 0, upper: 0 }), Zs = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), _s = Object.freeze({ lower: 0, upper: 1 }), qs = Object.freeze({ lower: -1, upper: 1 }), Fs = (e, t) => {
|
|
354
354
|
if (e == null && t == null) return !0;
|
|
355
355
|
if (e == null || t == null) return !1;
|
|
356
|
-
const n =
|
|
356
|
+
const n = w(e), r = w(t);
|
|
357
357
|
return n?.lower === r?.lower && n?.upper === r?.upper;
|
|
358
358
|
}, qn = (e) => e.lower > e.upper ? { lower: e.upper, upper: e.lower } : e, le = (e, t) => {
|
|
359
|
-
const n =
|
|
359
|
+
const n = w(e);
|
|
360
360
|
return t < n.lower ? n.lower : t >= n.upper ? n.upper - (typeof n.upper == "number" ? 1 : 1n) : t;
|
|
361
361
|
}, k = (e, t) => {
|
|
362
|
-
const n =
|
|
362
|
+
const n = w(e);
|
|
363
363
|
if (typeof t == "number" || typeof t == "bigint")
|
|
364
364
|
return t >= n.lower && t < n.upper;
|
|
365
|
-
const r =
|
|
365
|
+
const r = w(t);
|
|
366
366
|
return r.lower >= n.lower && r.upper <= n.upper;
|
|
367
|
-
},
|
|
368
|
-
const n =
|
|
367
|
+
}, Ys = (e, t) => {
|
|
368
|
+
const n = w(e), r = w(t);
|
|
369
369
|
return n.lower === r.lower ? !0 : r.upper === n.lower || r.lower === n.upper ? !1 : k(n, r.upper) || k(n, r.lower) || k(r, n.upper) || k(r, n.lower);
|
|
370
370
|
}, Et = (e) => {
|
|
371
|
-
const t =
|
|
371
|
+
const t = w(e);
|
|
372
372
|
return t.upper - t.lower;
|
|
373
|
-
},
|
|
374
|
-
const t =
|
|
373
|
+
}, zs = (e) => {
|
|
374
|
+
const t = w(e);
|
|
375
375
|
return typeof t.lower == "bigint" ? t.lower === 0n && t.upper === 0n : t.lower === 0 && t.upper === 0;
|
|
376
|
-
},
|
|
376
|
+
}, Vs = (e) => {
|
|
377
377
|
const t = Et(e);
|
|
378
378
|
return typeof t == "number" ? t === 0 : t === 0n;
|
|
379
|
-
},
|
|
380
|
-
const t =
|
|
379
|
+
}, Ws = (e) => {
|
|
380
|
+
const t = w(e);
|
|
381
381
|
return typeof t.lower == "bigint" ? !0 : Number.isFinite(t.lower) && Number.isFinite(t.upper);
|
|
382
382
|
}, Gs = (e) => {
|
|
383
|
-
const t =
|
|
383
|
+
const t = w(e);
|
|
384
384
|
return (t.upper + t.lower) / 2;
|
|
385
385
|
}, Fn = (e) => ({
|
|
386
|
-
lower: Math.min(...e.map((t) =>
|
|
387
|
-
upper: Math.max(...e.map((t) =>
|
|
386
|
+
lower: Math.min(...e.map((t) => w(t).lower)),
|
|
387
|
+
upper: Math.max(...e.map((t) => w(t).upper))
|
|
388
388
|
}), Hs = (e) => ({
|
|
389
|
-
lower: Math.max(...e.map((t) =>
|
|
390
|
-
upper: Math.min(...e.map((t) =>
|
|
389
|
+
lower: Math.max(...e.map((t) => w(t).lower)),
|
|
390
|
+
upper: Math.min(...e.map((t) => w(t).upper))
|
|
391
391
|
}), Ds = (e) => {
|
|
392
|
-
const t =
|
|
392
|
+
const t = w(e), n = typeof t.lower == "bigint";
|
|
393
393
|
return Array.from({ length: Number(Et(e)) }, (r, s) => n ? t.lower + BigInt(s) : t.lower + s);
|
|
394
394
|
}, fe = (e, t) => {
|
|
395
|
-
const n = e.map((i) =>
|
|
395
|
+
const n = e.map((i) => w(i)), r = n.findIndex((i) => k(i, t) || t < i.lower);
|
|
396
396
|
if (r === -1) return { index: e.length, position: 0 };
|
|
397
397
|
const s = n[r];
|
|
398
398
|
return k(s, t) ? { index: r, position: Number(t - s.lower) } : { index: r, position: 0 };
|
|
@@ -402,7 +402,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
402
402
|
insertInto: 0,
|
|
403
403
|
deleteInBetween: 0
|
|
404
404
|
}, Js = (e, t) => {
|
|
405
|
-
const n = e.map((l) =>
|
|
405
|
+
const n = e.map((l) => w(l)), r = w(t);
|
|
406
406
|
if (n.length === 0) return ne;
|
|
407
407
|
const s = fe(n, r.lower), i = fe(n, r.upper);
|
|
408
408
|
if (s.index === e.length) return { ...ne, insertInto: e.length };
|
|
@@ -421,8 +421,8 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
421
421
|
insertInto: a,
|
|
422
422
|
deleteInBetween: o
|
|
423
423
|
};
|
|
424
|
-
},
|
|
425
|
-
const r = e.map((a) =>
|
|
424
|
+
}, Yn = (e, t, n) => {
|
|
425
|
+
const r = e.map((a) => w(a)), s = n > 0 ? 1 : n < 0 ? -1 : 0;
|
|
426
426
|
if (s === 0) return t;
|
|
427
427
|
let i = n, o = t;
|
|
428
428
|
for (; ae(i, 0) === !1; ) {
|
|
@@ -448,10 +448,10 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
return o;
|
|
451
|
-
},
|
|
452
|
-
const r = e.map((o) =>
|
|
451
|
+
}, zn = (e, t, n) => {
|
|
452
|
+
const r = e.map((o) => w(o));
|
|
453
453
|
if (t === n) return typeof t == "bigint" ? 0n : 0;
|
|
454
|
-
const s = t < n ?
|
|
454
|
+
const s = t < n ? w([t, n]) : w([n, t]);
|
|
455
455
|
let i = typeof t == "bigint" ? 0n : 0;
|
|
456
456
|
for (const o of r) {
|
|
457
457
|
const a = o.lower > s.lower ? o.lower : s.lower, u = o.upper < s.upper ? o.upper : s.upper;
|
|
@@ -461,7 +461,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
return i;
|
|
464
|
-
},
|
|
464
|
+
}, xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
465
465
|
__proto__: null,
|
|
466
466
|
CLIP: qs,
|
|
467
467
|
DECIMAL: _s,
|
|
@@ -470,22 +470,22 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
470
470
|
bounds: Rs,
|
|
471
471
|
buildInsertionPlan: Js,
|
|
472
472
|
clamp: le,
|
|
473
|
-
construct:
|
|
473
|
+
construct: w,
|
|
474
474
|
contains: k,
|
|
475
|
-
distance:
|
|
475
|
+
distance: zn,
|
|
476
476
|
equals: Fs,
|
|
477
477
|
findInsertPosition: fe,
|
|
478
|
-
isFinite:
|
|
479
|
-
isZero:
|
|
478
|
+
isFinite: Ws,
|
|
479
|
+
isZero: zs,
|
|
480
480
|
linspace: Ds,
|
|
481
481
|
makeValid: qn,
|
|
482
482
|
max: Fn,
|
|
483
483
|
mean: Gs,
|
|
484
484
|
min: Hs,
|
|
485
|
-
overlapsWith:
|
|
485
|
+
overlapsWith: Ys,
|
|
486
486
|
span: Et,
|
|
487
|
-
spanIsZero:
|
|
488
|
-
traverse:
|
|
487
|
+
spanIsZero: Vs,
|
|
488
|
+
traverse: Yn
|
|
489
489
|
}, Symbol.toStringTag, { value: "Module" })), rn = 2, sn = 3, Xs = 2, Ks = 5, Qs = 1e-10, ti = (e, t) => {
|
|
490
490
|
if (Number.isNaN(e) || !Number.isFinite(e)) return e;
|
|
491
491
|
const n = Math.abs(e);
|
|
@@ -512,7 +512,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
512
512
|
}
|
|
513
513
|
const i = Math.floor(Math.log10(n)), a = 10 ** (Ks - i - 1);
|
|
514
514
|
return Math.round(e * a) / a;
|
|
515
|
-
},
|
|
515
|
+
}, Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
516
516
|
__proto__: null,
|
|
517
517
|
MAX_INT16: Is,
|
|
518
518
|
MAX_INT32: vs,
|
|
@@ -542,11 +542,11 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
542
542
|
roundToNearestMagnitude: Ss,
|
|
543
543
|
smartRound: ti,
|
|
544
544
|
sub: F
|
|
545
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
545
|
+
}, Symbol.toStringTag, { value: "Module" })), Vn = Ps, _ = (e) => Gt.includes(e) ? e : Dt.includes(e) ? "y" : "x", ei = (e) => _(e) === "x" ? "y" : "x", ni = (e) => _(e) === "x" ? "width" : "height", ri = (e) => _(e) === "x" ? "left" : "top", si = (e) => Vn.safeParse(e).success, ii = (e) => _(e) === "x" ? "signedWidth" : "signedHeight", oi = (e) => e === "center" ? !1 : _(e) === "x", ci = (e) => _(e) === "y", Nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
546
546
|
__proto__: null,
|
|
547
547
|
DIRECTIONS: Gt,
|
|
548
548
|
construct: _,
|
|
549
|
-
crude:
|
|
549
|
+
crude: Vn,
|
|
550
550
|
dimension: ni,
|
|
551
551
|
direction: Se,
|
|
552
552
|
isDirection: si,
|
|
@@ -588,7 +588,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
588
588
|
return "x" in t && (e.x === t.x || (n = !1)), "y" in t && (e.y === t.y || (n = !1)), n;
|
|
589
589
|
}
|
|
590
590
|
return e.x === t || e.y === t;
|
|
591
|
-
},
|
|
591
|
+
}, Wn = (e) => [e.x, e.y], Pt = (e) => xt(nt(e)) === "x", wi = (e) => xt(nt(e)) === "y", Oi = (e) => `${e.x}${bn(e.y)}`, xi = (e, t) => {
|
|
592
592
|
let n, r;
|
|
593
593
|
if (typeof e == "object" && "x" in e ? (n = e.x, r = e.y) : (n = nt(e), r = nt(t ?? e)), xt(n) === xt(r) && n !== "center" && r !== "center")
|
|
594
594
|
throw new Error(
|
|
@@ -596,7 +596,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
596
596
|
);
|
|
597
597
|
const s = { ...Le };
|
|
598
598
|
return n === "center" ? Pt(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r] : r === "center" ? Pt(n) ? [s.x, s.y] = [n, r] : [s.x, s.y] = [r, n] : Pt(n) ? [s.x, s.y] = [n, r] : [s.x, s.y] = [r, n], s;
|
|
599
|
-
},
|
|
599
|
+
}, vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
600
600
|
__proto__: null,
|
|
601
601
|
BOTTOM_CENTER: Ze,
|
|
602
602
|
BOTTOM_LEFT: Jt,
|
|
@@ -626,7 +626,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
626
626
|
swap: gi,
|
|
627
627
|
x: ai,
|
|
628
628
|
xy: mi,
|
|
629
|
-
xyCouple:
|
|
629
|
+
xyCouple: Wn,
|
|
630
630
|
xyEquals: Fe,
|
|
631
631
|
xyMatches: bi,
|
|
632
632
|
xyToString: Oi,
|
|
@@ -644,10 +644,10 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
644
644
|
return e === "x" ? { x: t, y: 0 } : { x: 0, y: t };
|
|
645
645
|
}
|
|
646
646
|
return typeof e == "number" ? { x: e, y: t ?? e } : Array.isArray(e) ? { x: e[0], y: e[1] } : "signedWidth" in e ? { x: e.signedWidth, y: e.signedHeight } : "clientX" in e ? { x: e.clientX, y: e.clientY } : "width" in e ? { x: e.width, y: e.height } : { x: e.x, y: e.y };
|
|
647
|
-
},
|
|
647
|
+
}, Y = Object.freeze({ x: 0, y: 0 }), Gn = Object.freeze({ x: 1, y: 1 }), Ii = Object.freeze({ x: 1 / 0, y: 1 / 0 }), Ni = Object.freeze({ x: NaN, y: NaN }), Yt = (e, t, n = 0) => {
|
|
648
648
|
const r = x(e), s = x(t);
|
|
649
649
|
return n === 0 ? r.x === s.x && r.y === s.y : Math.abs(r.x - s.x) <= n && Math.abs(r.y - s.y) <= n;
|
|
650
|
-
}, vi = (e) =>
|
|
650
|
+
}, vi = (e) => Yt(e, Y), Ye = (e, t, n) => {
|
|
651
651
|
const r = x(e), s = x(t, n);
|
|
652
652
|
return { x: r.x * s.x, y: r.y * s.y };
|
|
653
653
|
}, Hn = (e, t) => {
|
|
@@ -665,10 +665,10 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
665
665
|
const s = x(n), i = x(e);
|
|
666
666
|
return t.x === "left" ? s.x = -s.x : t.x === "center" && (s.x = 0), t.y === "top" ? s.y = -s.y : t.y === "center" && (s.y = 0), { x: i.x + s.x, y: i.y + s.y };
|
|
667
667
|
}
|
|
668
|
-
return [e, t, n ??
|
|
668
|
+
return [e, t, n ?? Y, ...r].reduce((s, i) => {
|
|
669
669
|
const o = x(i);
|
|
670
670
|
return { x: s.x + o.x, y: s.y + o.y };
|
|
671
|
-
},
|
|
671
|
+
}, Y);
|
|
672
672
|
}, Mi = (e, t, n) => {
|
|
673
673
|
const r = x(e);
|
|
674
674
|
return _(t) === "x" ? { x: n, y: r.y } : { x: r.x, y: n };
|
|
@@ -690,7 +690,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
690
690
|
}, Ui = (e) => {
|
|
691
691
|
const t = x(e);
|
|
692
692
|
return { left: t.x, top: t.y };
|
|
693
|
-
},
|
|
693
|
+
}, zt = (e, t = 0) => {
|
|
694
694
|
const n = x(e);
|
|
695
695
|
return {
|
|
696
696
|
x: Number(n.x.toFixed(t)),
|
|
@@ -706,8 +706,8 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
706
706
|
const t = x(e), n = Math.hypot(t.x, t.y);
|
|
707
707
|
return n === 0 ? { x: 0, y: 0 } : { x: t.x / n, y: t.y / n };
|
|
708
708
|
}, Xn = (...e) => {
|
|
709
|
-
const t = e.reduce((n, r) => It(n, r),
|
|
710
|
-
return
|
|
709
|
+
const t = e.reduce((n, r) => It(n, r), Y);
|
|
710
|
+
return Ye(t, 1 / e.length);
|
|
711
711
|
}, ji = (e, t) => {
|
|
712
712
|
const n = [];
|
|
713
713
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -727,7 +727,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
727
727
|
), S = Math.sin(M / 2);
|
|
728
728
|
S === 0 ? u = t : u = t / S, a = Jn(Xn(i, o));
|
|
729
729
|
}
|
|
730
|
-
n.push(
|
|
730
|
+
n.push(Ye(a, u));
|
|
731
731
|
}
|
|
732
732
|
return n;
|
|
733
733
|
}, Ci = (e) => {
|
|
@@ -745,12 +745,12 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
745
745
|
x: u + s.x,
|
|
746
746
|
y: l + s.y
|
|
747
747
|
};
|
|
748
|
-
},
|
|
748
|
+
}, Mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
749
749
|
__proto__: null,
|
|
750
750
|
INFINITY: Ii,
|
|
751
751
|
NAN: Ni,
|
|
752
752
|
ONE: Gn,
|
|
753
|
-
ZERO:
|
|
753
|
+
ZERO: Y,
|
|
754
754
|
average: Xn,
|
|
755
755
|
calculateMiters: ji,
|
|
756
756
|
clientXY: Zn,
|
|
@@ -759,7 +759,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
759
759
|
crudeZ: he,
|
|
760
760
|
css: Ui,
|
|
761
761
|
distance: Ai,
|
|
762
|
-
equals:
|
|
762
|
+
equals: Yt,
|
|
763
763
|
isFinite: Ti,
|
|
764
764
|
isNan: Si,
|
|
765
765
|
isZero: vi,
|
|
@@ -768,7 +768,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
768
768
|
reciprocal: Bi,
|
|
769
769
|
rotate: Ri,
|
|
770
770
|
round: de,
|
|
771
|
-
scale:
|
|
771
|
+
scale: Ye,
|
|
772
772
|
set: Mi,
|
|
773
773
|
sub: dt,
|
|
774
774
|
swap: Ci,
|
|
@@ -776,7 +776,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
776
776
|
translateX: Hn,
|
|
777
777
|
translateY: Dn,
|
|
778
778
|
translation: Ei,
|
|
779
|
-
truncate:
|
|
779
|
+
truncate: zt,
|
|
780
780
|
xy: ut
|
|
781
781
|
}, Symbol.toStringTag, { value: "Module" })), Ut = c.union([c.number(), c.string()]), Pi = c.object({
|
|
782
782
|
top: Ut,
|
|
@@ -792,14 +792,14 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
792
792
|
one: ut,
|
|
793
793
|
two: ut,
|
|
794
794
|
root: Be
|
|
795
|
-
}), Kn = { one:
|
|
795
|
+
}), Kn = { one: Y, two: Y, root: ft }, Zi = { one: Y, two: Gn, root: Jt }, Qn = (e, t) => ({
|
|
796
796
|
one: e.one,
|
|
797
797
|
two: e.two,
|
|
798
798
|
root: t ?? e.root
|
|
799
799
|
}), N = (e, t, n = 0, r = 0, s) => {
|
|
800
800
|
const i = {
|
|
801
|
-
one: { ...
|
|
802
|
-
two: { ...
|
|
801
|
+
one: { ...Y },
|
|
802
|
+
two: { ...Y },
|
|
803
803
|
root: s ?? ft
|
|
804
804
|
};
|
|
805
805
|
if (typeof e == "number") {
|
|
@@ -832,18 +832,18 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
832
832
|
const r = N(e);
|
|
833
833
|
let s = (i, o) => i < o;
|
|
834
834
|
return n && (s = (i, o) => i <= o), "one" in t ? s(X(r), X(t)) && s(tt(t), tt(r)) && s(K(r), K(t)) && s(et(t), et(r)) : s(X(r), t.x) && s(t.x, tt(r)) && s(K(r), t.y) && s(t.y, et(r));
|
|
835
|
-
}, Fi = (e, t) =>
|
|
835
|
+
}, Fi = (e, t) => Yt(e.one, t.one) && Yt(e.two, t.two) && Fe(e.root, t.root), tr = (e) => ({
|
|
836
836
|
width: $(e),
|
|
837
837
|
height: U(e)
|
|
838
|
-
}),
|
|
838
|
+
}), Yi = (e) => ({
|
|
839
839
|
signedWidth: Xt(e),
|
|
840
840
|
signedHeight: Kt(e)
|
|
841
|
-
}),
|
|
841
|
+
}), zi = (e) => ({
|
|
842
842
|
top: K(e),
|
|
843
843
|
left: X(e),
|
|
844
844
|
width: $(e),
|
|
845
845
|
height: U(e)
|
|
846
|
-
}),
|
|
846
|
+
}), ze = (e, t, n = !1) => {
|
|
847
847
|
const r = _(t) === "y" ? Kt(e) : Xt(e);
|
|
848
848
|
return n ? r : Math.abs(r);
|
|
849
849
|
}, D = (e, t) => {
|
|
@@ -853,24 +853,24 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
853
853
|
y: t.y === "center" ? ge(n).y : rt(n, t.y)
|
|
854
854
|
};
|
|
855
855
|
}, rt = (e, t) => {
|
|
856
|
-
const n = N(e), r =
|
|
856
|
+
const n = N(e), r = Wn(n.root).includes(t) ? Math.min : Math.max;
|
|
857
857
|
return Ht.includes(t) ? r(n.one.x, n.two.x) : r(n.one.y, n.two.y);
|
|
858
|
-
},
|
|
858
|
+
}, Vi = (e) => rr(e) === 0, $ = (e) => ze(e, "x"), U = (e) => ze(e, "y"), Xt = (e) => {
|
|
859
859
|
const t = N(e);
|
|
860
860
|
return t.two.x - t.one.x;
|
|
861
861
|
}, Kt = (e) => {
|
|
862
862
|
const t = N(e);
|
|
863
863
|
return t.two.y - t.one.y;
|
|
864
|
-
}, er = (e) => D(e, ft),
|
|
864
|
+
}, er = (e) => D(e, ft), Wi = (e) => D(e, ke), Gi = (e) => D(e, Re), Hi = (e) => D(e, Jt), Di = (e) => D(e, Ze), Ji = (e) => D(e, Pe), Xi = (e) => D(e, qe), Ki = (e) => D(e, _e), tt = (e) => rt(e, "right"), et = (e) => rt(e, "bottom"), X = (e) => rt(e, "left"), K = (e) => rt(e, "top"), ge = (e) => It(er(e), {
|
|
865
865
|
x: Xt(e) / 2,
|
|
866
866
|
y: Kt(e) / 2
|
|
867
|
-
}),
|
|
867
|
+
}), Ve = (e) => {
|
|
868
868
|
const t = N(e);
|
|
869
869
|
return t.root.x === "left" ? X(t) : tt(t);
|
|
870
|
-
},
|
|
870
|
+
}, We = (e) => {
|
|
871
871
|
const t = N(e);
|
|
872
872
|
return t.root.y === "top" ? K(t) : et(t);
|
|
873
|
-
}, Qi = (e) => ({ x:
|
|
873
|
+
}, Qi = (e) => ({ x: Ve(e), y: We(e) }), Lt = (e) => {
|
|
874
874
|
const t = N(e);
|
|
875
875
|
return { lower: t.one.x, upper: t.two.x };
|
|
876
876
|
}, kt = (e) => {
|
|
@@ -882,7 +882,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
882
882
|
const s = t === "top" || t === "left" ? Math.min : Math.max, i = { ...n.one }, o = { ...n.two };
|
|
883
883
|
return i[r] = s(n.one[r], n.two[r]), o[r] = s(n.one[r], n.two[r]), [i, o];
|
|
884
884
|
}, no = (e, t) => {
|
|
885
|
-
const n = N(e), r = N(t), s =
|
|
885
|
+
const n = N(e), r = N(t), s = Ve(r) + ($(r) - $(n)) / 2, i = We(r) + (U(r) - U(n)) / 2;
|
|
886
886
|
return N({ x: s, y: i }, tr(n));
|
|
887
887
|
}, nr = (e) => typeof e != "object" || e == null ? !1 : "one" in e && "two" in e && "root" in e, ro = (e) => $(e) / U(e), so = (e, t, n) => {
|
|
888
888
|
if (typeof t == "string") {
|
|
@@ -904,8 +904,8 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
904
904
|
}, rr = (e) => $(e) * U(e), oo = (e, t) => {
|
|
905
905
|
const n = N(e);
|
|
906
906
|
return N(
|
|
907
|
-
|
|
908
|
-
|
|
907
|
+
zt(n.one, t),
|
|
908
|
+
zt(n.two, t),
|
|
909
909
|
void 0,
|
|
910
910
|
void 0,
|
|
911
911
|
n.root
|
|
@@ -916,12 +916,12 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
916
916
|
}, ao = (e) => {
|
|
917
917
|
const t = N(e);
|
|
918
918
|
return N(de(t.one), de(t.two), void 0, void 0, t.root);
|
|
919
|
-
},
|
|
919
|
+
}, Au = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
920
920
|
__proto__: null,
|
|
921
921
|
DECIMAL: Zi,
|
|
922
922
|
ZERO: Kn,
|
|
923
923
|
area: rr,
|
|
924
|
-
areaIsZero:
|
|
924
|
+
areaIsZero: Vi,
|
|
925
925
|
aspect: ro,
|
|
926
926
|
bottom: et,
|
|
927
927
|
bottomCenter: Di,
|
|
@@ -935,9 +935,9 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
935
935
|
constructWithAlternateRoot: co,
|
|
936
936
|
contains: qi,
|
|
937
937
|
copy: Qn,
|
|
938
|
-
css:
|
|
938
|
+
css: zi,
|
|
939
939
|
cssBox: Pi,
|
|
940
|
-
dim:
|
|
940
|
+
dim: ze,
|
|
941
941
|
dims: tr,
|
|
942
942
|
domRect: Li,
|
|
943
943
|
edgePoints: eo,
|
|
@@ -953,20 +953,20 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
953
953
|
right: tt,
|
|
954
954
|
root: Qi,
|
|
955
955
|
round: ao,
|
|
956
|
-
signedDims:
|
|
956
|
+
signedDims: Yi,
|
|
957
957
|
signedHeight: Kt,
|
|
958
958
|
signedWidth: Xt,
|
|
959
959
|
top: K,
|
|
960
|
-
topCenter:
|
|
960
|
+
topCenter: Wi,
|
|
961
961
|
topLeft: er,
|
|
962
962
|
topRight: Gi,
|
|
963
963
|
translate: so,
|
|
964
964
|
truncate: oo,
|
|
965
965
|
width: $,
|
|
966
|
-
x:
|
|
966
|
+
x: Ve,
|
|
967
967
|
xBounds: Lt,
|
|
968
968
|
xyLoc: D,
|
|
969
|
-
y:
|
|
969
|
+
y: We,
|
|
970
970
|
yBounds: kt
|
|
971
971
|
}, Symbol.toStringTag, { value: "Module" })), sr = c.object({ signedWidth: c.number(), signedHeight: c.number() }), uo = c.union([Ee, sr, ut, Ln]), lo = { width: 0, height: 0 }, fo = { width: 1, height: 1 }, Z = (e, t) => typeof e == "number" ? { width: e, height: t ?? e } : Array.isArray(e) ? { width: e[0], height: e[1] } : "x" in e ? { width: e.x, height: e.y } : "signedWidth" in e ? { width: e.signedWidth, height: e.signedHeight } : { ...e }, ho = (e, t) => {
|
|
972
972
|
if (t == null) return !1;
|
|
@@ -990,7 +990,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
990
990
|
}), wo = (e, t) => {
|
|
991
991
|
const n = Z(e);
|
|
992
992
|
return { width: n.width * t, height: n.height * t };
|
|
993
|
-
},
|
|
993
|
+
}, Eu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
994
994
|
__proto__: null,
|
|
995
995
|
DECIMAL: fo,
|
|
996
996
|
ZERO: lo,
|
|
@@ -1026,7 +1026,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", fs = `0123456
|
|
|
1026
1026
|
const { lower: s, upper: i } = e;
|
|
1027
1027
|
return r = Oo(r, s, i), [t, r];
|
|
1028
1028
|
};
|
|
1029
|
-
class
|
|
1029
|
+
class z {
|
|
1030
1030
|
ops = [];
|
|
1031
1031
|
currBounds = null;
|
|
1032
1032
|
currType = null;
|
|
@@ -1040,7 +1040,7 @@ class W {
|
|
|
1040
1040
|
* @param value - The amount to translate by.
|
|
1041
1041
|
*/
|
|
1042
1042
|
static translate(t) {
|
|
1043
|
-
return new
|
|
1043
|
+
return new z().translate(t);
|
|
1044
1044
|
}
|
|
1045
1045
|
/**
|
|
1046
1046
|
* @returns a new scale with a magnification as its first operation. Any number provided
|
|
@@ -1048,10 +1048,10 @@ class W {
|
|
|
1048
1048
|
* @param value - The amount to translate by.
|
|
1049
1049
|
*/
|
|
1050
1050
|
static magnify(t) {
|
|
1051
|
-
return new
|
|
1051
|
+
return new z().magnify(t);
|
|
1052
1052
|
}
|
|
1053
1053
|
static scale(t, n) {
|
|
1054
|
-
return new
|
|
1054
|
+
return new z().scale(t, n);
|
|
1055
1055
|
}
|
|
1056
1056
|
/**
|
|
1057
1057
|
* @returns a copy of the scale with a translation as its next operation. Any
|
|
@@ -1074,15 +1074,15 @@ class W {
|
|
|
1074
1074
|
return r.type = "magnify", n.ops.push(r), n;
|
|
1075
1075
|
}
|
|
1076
1076
|
scale(t, n) {
|
|
1077
|
-
const r =
|
|
1077
|
+
const r = w(t, n), s = this.new(), i = Mo(r);
|
|
1078
1078
|
return i.type = "scale", s.ops.push(i), s;
|
|
1079
1079
|
}
|
|
1080
1080
|
clamp(t, n) {
|
|
1081
|
-
const r =
|
|
1081
|
+
const r = w(t, n), s = this.new(), i = So(r);
|
|
1082
1082
|
return i.type = "clamp", s.ops.push(i), s;
|
|
1083
1083
|
}
|
|
1084
1084
|
reBound(t, n) {
|
|
1085
|
-
const r =
|
|
1085
|
+
const r = w(t, n), s = this.new(), i = Ao(r);
|
|
1086
1086
|
return i.type = "re-bound", s.ops.push(i), s;
|
|
1087
1087
|
}
|
|
1088
1088
|
invert() {
|
|
@@ -1098,7 +1098,7 @@ class W {
|
|
|
1098
1098
|
return this.exec("dimension", t);
|
|
1099
1099
|
}
|
|
1100
1100
|
new() {
|
|
1101
|
-
const t = new
|
|
1101
|
+
const t = new z();
|
|
1102
1102
|
return t.ops = this.ops.slice(), t.reversed = this.reversed, t;
|
|
1103
1103
|
}
|
|
1104
1104
|
exec(t, n) {
|
|
@@ -1124,13 +1124,13 @@ class W {
|
|
|
1124
1124
|
get transform() {
|
|
1125
1125
|
return { scale: this.dim(1), offset: this.pos(0) };
|
|
1126
1126
|
}
|
|
1127
|
-
static IDENTITY = new
|
|
1127
|
+
static IDENTITY = new z();
|
|
1128
1128
|
}
|
|
1129
1129
|
class R {
|
|
1130
1130
|
x;
|
|
1131
1131
|
y;
|
|
1132
1132
|
currRoot;
|
|
1133
|
-
constructor(t = new
|
|
1133
|
+
constructor(t = new z(), n = new z(), r = null) {
|
|
1134
1134
|
this.x = t, this.y = n, this.currRoot = r;
|
|
1135
1135
|
}
|
|
1136
1136
|
static translate(t, n) {
|
|
@@ -1217,13 +1217,13 @@ class R {
|
|
|
1217
1217
|
}
|
|
1218
1218
|
static IDENTITY = new R();
|
|
1219
1219
|
}
|
|
1220
|
-
const
|
|
1220
|
+
const Su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1221
1221
|
__proto__: null,
|
|
1222
|
-
Scale:
|
|
1222
|
+
Scale: z,
|
|
1223
1223
|
XY: R,
|
|
1224
1224
|
crudeXYTransform: xo,
|
|
1225
1225
|
transform: Io
|
|
1226
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1226
|
+
}, Symbol.toStringTag, { value: "Module" })), Tu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1227
1227
|
__proto__: null,
|
|
1228
1228
|
ALIGNMENTS: kn,
|
|
1229
1229
|
ORDERS: _n,
|
|
@@ -1258,8 +1258,8 @@ const vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1258
1258
|
root: { ...ft },
|
|
1259
1259
|
units: { x: "px", y: "px" }
|
|
1260
1260
|
};
|
|
1261
|
-
return e.x > s ? (i.x = (1 - e.x) * $(n) - $(t), i.root.x = "right") : e.x < r ? i.x = e.x * $(n) : i.units.x = "decimal", e.y > s ? (i.y = (1 - e.y) * U(n) - U(t), i.root.y = "bottom") : e.y < r ? i.y = e.y * U(n) : i.units.y = "decimal", i.x = Math.round(i.x * 100) / 100, { ...i, ...
|
|
1262
|
-
},
|
|
1261
|
+
return e.x > s ? (i.x = (1 - e.x) * $(n) - $(t), i.root.x = "right") : e.x < r ? i.x = e.x * $(n) : i.units.x = "decimal", e.y > s ? (i.y = (1 - e.y) * U(n) - U(t), i.root.y = "bottom") : e.y < r ? i.y = e.y * U(n) : i.units.y = "decimal", i.x = Math.round(i.x * 100) / 100, { ...i, ...zt(i, 3) };
|
|
1262
|
+
}, $u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1263
1263
|
__proto__: null,
|
|
1264
1264
|
calculate: jo,
|
|
1265
1265
|
completeXY: ir,
|
|
@@ -1339,7 +1339,11 @@ class d extends st {
|
|
|
1339
1339
|
).valueOf();
|
|
1340
1340
|
}
|
|
1341
1341
|
toISOString(t = "UTC") {
|
|
1342
|
-
|
|
1342
|
+
if (t === "UTC") return this.date().toISOString();
|
|
1343
|
+
const n = this.date(), r = new g(
|
|
1344
|
+
BigInt(n.getTimezoneOffset()) * d.MINUTE.valueOf()
|
|
1345
|
+
);
|
|
1346
|
+
return this.sub(r).date().toISOString();
|
|
1343
1347
|
}
|
|
1344
1348
|
timeString(t = !1, n = "UTC") {
|
|
1345
1349
|
const r = this.toISOString(n);
|
|
@@ -1988,8 +1992,8 @@ class g extends st {
|
|
|
1988
1992
|
toString(t = "full") {
|
|
1989
1993
|
if (t === "semantic") return this.toSemanticString();
|
|
1990
1994
|
const n = this.truncate(g.DAY), r = this.truncate(g.HOUR), s = this.truncate(g.MINUTE), i = this.truncate(g.SECOND), o = this.truncate(g.MILLISECOND), a = this.truncate(g.MICROSECOND), u = this.truncate(g.NANOSECOND), l = n, h = r.sub(n), y = s.sub(r), m = i.sub(s), M = o.sub(i), S = a.sub(o), B = u.sub(a);
|
|
1991
|
-
let
|
|
1992
|
-
return l.isZero || (
|
|
1995
|
+
let O = "";
|
|
1996
|
+
return l.isZero || (O += `${l.days}d `), h.isZero || (O += `${h.hours}h `), y.isZero || (O += `${y.minutes}m `), m.isZero || (O += `${m.seconds}s `), M.isZero || (O += `${M.milliseconds}ms `), S.isZero || (O += `${S.microseconds}µs `), B.isZero || (O += `${B.nanoseconds}ns`), O.trim();
|
|
1993
1997
|
}
|
|
1994
1998
|
toSemanticString() {
|
|
1995
1999
|
const t = this.valueOf() < 0n ? -this.valueOf() : this.valueOf(), n = new g(t), r = this.valueOf() < 0n;
|
|
@@ -1997,53 +2001,53 @@ class g extends st {
|
|
|
1997
2001
|
if (n.lessThan(g.SECOND)) return "< 1s";
|
|
1998
2002
|
const s = n.days, i = n.hours, o = n.minutes, a = n.seconds, u = Math.floor(s / on), l = Math.floor(s / jt), h = Math.floor(s / 7), y = Math.floor(s), m = Math.floor(i), M = Math.floor(o), S = Math.floor(a), B = r ? "-" : "";
|
|
1999
2003
|
if (u >= 1) {
|
|
2000
|
-
let
|
|
2004
|
+
let O = `${u}y`;
|
|
2001
2005
|
if (u < 2) {
|
|
2002
2006
|
const v = Math.floor(
|
|
2003
2007
|
s % on / jt
|
|
2004
2008
|
);
|
|
2005
|
-
v > 0 && (
|
|
2009
|
+
v > 0 && (O += ` ${v}mo`);
|
|
2006
2010
|
}
|
|
2007
|
-
return B +
|
|
2011
|
+
return B + O;
|
|
2008
2012
|
}
|
|
2009
2013
|
if (h >= 1 && s < jt && s % 7 === 0) {
|
|
2010
|
-
let
|
|
2014
|
+
let O = `${h}w`;
|
|
2011
2015
|
const v = Math.floor(s % 7), Q = Math.floor(i - h * 7 * 24);
|
|
2012
|
-
return h < 2 && (v > 0 ?
|
|
2016
|
+
return h < 2 && (v > 0 ? O += ` ${v}d` : Q > 0 && Q < 24 && (O += ` ${Q}h`)), B + O;
|
|
2013
2017
|
}
|
|
2014
2018
|
if (l >= 1) {
|
|
2015
|
-
let
|
|
2019
|
+
let O = `${l}mo`;
|
|
2016
2020
|
if (l < 3) {
|
|
2017
2021
|
const v = Math.floor(s % jt);
|
|
2018
|
-
v > 0 && (
|
|
2022
|
+
v > 0 && (O += ` ${v}d`);
|
|
2019
2023
|
}
|
|
2020
|
-
return B +
|
|
2024
|
+
return B + O;
|
|
2021
2025
|
}
|
|
2022
2026
|
if (h >= 1) {
|
|
2023
|
-
let
|
|
2027
|
+
let O = `${h}w`;
|
|
2024
2028
|
const v = Math.floor(s % 7), Q = Math.floor(i - h * 7 * 24);
|
|
2025
|
-
return h < 2 && (v > 0 ?
|
|
2029
|
+
return h < 2 && (v > 0 ? O += ` ${v}d` : Q > 0 && Q < 24 && (O += ` ${Q}h`)), B + O;
|
|
2026
2030
|
}
|
|
2027
2031
|
if (y >= 1) {
|
|
2028
|
-
let
|
|
2032
|
+
let O = `${y}d`;
|
|
2029
2033
|
const v = Math.floor(i - y * 24);
|
|
2030
|
-
return y < 2 && v > 0 && (
|
|
2034
|
+
return y < 2 && v > 0 && (O += ` ${v}h`), B + O;
|
|
2031
2035
|
}
|
|
2032
2036
|
if (m >= 1) {
|
|
2033
|
-
let
|
|
2037
|
+
let O = `${m}h`;
|
|
2034
2038
|
if (m < 3) {
|
|
2035
2039
|
const v = Math.floor(o - m * 60);
|
|
2036
|
-
v > 0 && (
|
|
2040
|
+
v > 0 && (O += ` ${v}m`);
|
|
2037
2041
|
}
|
|
2038
|
-
return B +
|
|
2042
|
+
return B + O;
|
|
2039
2043
|
}
|
|
2040
2044
|
if (M >= 1) {
|
|
2041
|
-
let
|
|
2045
|
+
let O = `${M}m`;
|
|
2042
2046
|
if (M < 5) {
|
|
2043
2047
|
const v = Math.floor(a - M * 60);
|
|
2044
|
-
v > 0 && (
|
|
2048
|
+
v > 0 && (O += ` ${v}s`);
|
|
2045
2049
|
}
|
|
2046
|
-
return B +
|
|
2050
|
+
return B + O;
|
|
2047
2051
|
}
|
|
2048
2052
|
return `${B}${S}s`;
|
|
2049
2053
|
}
|
|
@@ -2256,7 +2260,7 @@ class T extends st {
|
|
|
2256
2260
|
* @returns The number of bytes in the given TimeSpan at this rate.
|
|
2257
2261
|
*/
|
|
2258
2262
|
byteCount(t, n) {
|
|
2259
|
-
return this.sampleCount(t) * new
|
|
2263
|
+
return this.sampleCount(t) * new b(n).valueOf();
|
|
2260
2264
|
}
|
|
2261
2265
|
/**
|
|
2262
2266
|
* Calculates a TimeSpan given the number of samples at this rate.
|
|
@@ -2275,7 +2279,7 @@ class T extends st {
|
|
|
2275
2279
|
* @returns A TimeSpan that corresponds to the given number of bytes.
|
|
2276
2280
|
*/
|
|
2277
2281
|
byteSpan(t, n) {
|
|
2278
|
-
return this.span(t.valueOf() / new
|
|
2282
|
+
return this.span(t.valueOf() / new b(n).valueOf());
|
|
2279
2283
|
}
|
|
2280
2284
|
/**
|
|
2281
2285
|
* Adds another Rate to this Rate.
|
|
@@ -2337,7 +2341,7 @@ class T extends st {
|
|
|
2337
2341
|
c.instanceof(T)
|
|
2338
2342
|
]);
|
|
2339
2343
|
}
|
|
2340
|
-
class
|
|
2344
|
+
class b extends st {
|
|
2341
2345
|
/**
|
|
2342
2346
|
* Creates a Density representing the given number of bytes per value.
|
|
2343
2347
|
*
|
|
@@ -2373,7 +2377,7 @@ class O extends st {
|
|
|
2373
2377
|
* @returns A new Density representing the sum of the two densities.
|
|
2374
2378
|
*/
|
|
2375
2379
|
add(t) {
|
|
2376
|
-
return new
|
|
2380
|
+
return new b(G(this.valueOf(), new b(t).valueOf()));
|
|
2377
2381
|
}
|
|
2378
2382
|
/**
|
|
2379
2383
|
* Subtracts another Density from this Density.
|
|
@@ -2382,7 +2386,7 @@ class O extends st {
|
|
|
2382
2386
|
* @returns A new Density representing the difference of the two densities.
|
|
2383
2387
|
*/
|
|
2384
2388
|
sub(t) {
|
|
2385
|
-
return new
|
|
2389
|
+
return new b(F(this.valueOf(), new b(t).valueOf()));
|
|
2386
2390
|
}
|
|
2387
2391
|
/**
|
|
2388
2392
|
* Multiplies this Density by a scalar value.
|
|
@@ -2391,7 +2395,7 @@ class O extends st {
|
|
|
2391
2395
|
* @returns A new Density representing this Density multiplied by the value.
|
|
2392
2396
|
*/
|
|
2393
2397
|
mult(t) {
|
|
2394
|
-
return new
|
|
2398
|
+
return new b(P(this.valueOf(), t));
|
|
2395
2399
|
}
|
|
2396
2400
|
/**
|
|
2397
2401
|
* Divides this Density by a scalar value.
|
|
@@ -2400,24 +2404,24 @@ class O extends st {
|
|
|
2400
2404
|
* @returns A new Density representing this Density divided by the value.
|
|
2401
2405
|
*/
|
|
2402
2406
|
div(t) {
|
|
2403
|
-
return new
|
|
2407
|
+
return new b(At(this.valueOf(), t));
|
|
2404
2408
|
}
|
|
2405
2409
|
/** Unknown/Invalid Density. */
|
|
2406
|
-
static UNKNOWN = new
|
|
2410
|
+
static UNKNOWN = new b(0);
|
|
2407
2411
|
/** 128 bits per value. */
|
|
2408
|
-
static BIT128 = new
|
|
2412
|
+
static BIT128 = new b(16);
|
|
2409
2413
|
/** 64 bits per value. */
|
|
2410
|
-
static BIT64 = new
|
|
2414
|
+
static BIT64 = new b(8);
|
|
2411
2415
|
/** 32 bits per value. */
|
|
2412
|
-
static BIT32 = new
|
|
2416
|
+
static BIT32 = new b(4);
|
|
2413
2417
|
/** 16 bits per value. */
|
|
2414
|
-
static BIT16 = new
|
|
2418
|
+
static BIT16 = new b(2);
|
|
2415
2419
|
/** 8 bits per value. */
|
|
2416
|
-
static BIT8 = new
|
|
2420
|
+
static BIT8 = new b(1);
|
|
2417
2421
|
/** A zod schema for validating and transforming densities */
|
|
2418
2422
|
static z = c.union([
|
|
2419
|
-
c.number().transform((t) => new
|
|
2420
|
-
c.instanceof(
|
|
2423
|
+
c.number().transform((t) => new b(t)),
|
|
2424
|
+
c.instanceof(b)
|
|
2421
2425
|
]);
|
|
2422
2426
|
}
|
|
2423
2427
|
class A {
|
|
@@ -2644,7 +2648,7 @@ class f extends st {
|
|
|
2644
2648
|
* @example DataType.INT32.isVariable // false
|
|
2645
2649
|
*/
|
|
2646
2650
|
get isVariable() {
|
|
2647
|
-
return this.equals(f.JSON) || this.equals(f.STRING);
|
|
2651
|
+
return this.equals(f.JSON) || this.equals(f.STRING) || this.equals(f.BYTES);
|
|
2648
2652
|
}
|
|
2649
2653
|
/**
|
|
2650
2654
|
* @returns true if the DataType is numeric.
|
|
@@ -2740,8 +2744,6 @@ class f extends st {
|
|
|
2740
2744
|
static UINT16 = new f("uint16");
|
|
2741
2745
|
/** Represents a 8-bit unsigned integer value. */
|
|
2742
2746
|
static UINT8 = new f("uint8");
|
|
2743
|
-
/** Represents a boolean value. Stored as a 8-bit unsigned integer. */
|
|
2744
|
-
static BOOLEAN = new f("boolean");
|
|
2745
2747
|
/** Represents a 64-bit unix epoch. */
|
|
2746
2748
|
static TIMESTAMP = new f("timestamp");
|
|
2747
2749
|
/** Represents a UUID data type. */
|
|
@@ -2752,6 +2754,9 @@ class f extends st {
|
|
|
2752
2754
|
/** Represents a JSON data type. JSON has an unknown density, and is separated by a
|
|
2753
2755
|
* newline character. */
|
|
2754
2756
|
static JSON = new f("json");
|
|
2757
|
+
/** Represents a bytes data type for arbitrary byte arrays. Bytes have an unknown
|
|
2758
|
+
* density, and are separated by a newline character. */
|
|
2759
|
+
static BYTES = new f("bytes");
|
|
2755
2760
|
static ARRAY_CONSTRUCTORS = /* @__PURE__ */ new Map([
|
|
2756
2761
|
[f.UINT8.toString(), Uint8Array],
|
|
2757
2762
|
[f.UINT16.toString(), Uint16Array],
|
|
@@ -2766,7 +2771,8 @@ class f extends st {
|
|
|
2766
2771
|
[f.TIMESTAMP.toString(), BigInt64Array],
|
|
2767
2772
|
[f.STRING.toString(), Uint8Array],
|
|
2768
2773
|
[f.JSON.toString(), Uint8Array],
|
|
2769
|
-
[f.UUID.toString(), Uint8Array]
|
|
2774
|
+
[f.UUID.toString(), Uint8Array],
|
|
2775
|
+
[f.BYTES.toString(), Uint8Array]
|
|
2770
2776
|
]);
|
|
2771
2777
|
static ARRAY_CONSTRUCTOR_DATA_TYPES = /* @__PURE__ */ new Map([
|
|
2772
2778
|
[Uint8Array.name, f.UINT8],
|
|
@@ -2781,38 +2787,40 @@ class f extends st {
|
|
|
2781
2787
|
[BigInt64Array.name, f.INT64]
|
|
2782
2788
|
]);
|
|
2783
2789
|
static DENSITIES = /* @__PURE__ */ new Map([
|
|
2784
|
-
[f.UINT8.toString(),
|
|
2785
|
-
[f.UINT16.toString(),
|
|
2786
|
-
[f.UINT32.toString(),
|
|
2787
|
-
[f.UINT64.toString(),
|
|
2788
|
-
[f.FLOAT32.toString(),
|
|
2789
|
-
[f.FLOAT64.toString(),
|
|
2790
|
-
[f.INT8.toString(),
|
|
2791
|
-
[f.INT16.toString(),
|
|
2792
|
-
[f.INT32.toString(),
|
|
2793
|
-
[f.INT64.toString(),
|
|
2794
|
-
[f.TIMESTAMP.toString(),
|
|
2795
|
-
[f.STRING.toString(),
|
|
2796
|
-
[f.JSON.toString(),
|
|
2797
|
-
[f.UUID.toString(),
|
|
2790
|
+
[f.UINT8.toString(), b.BIT8],
|
|
2791
|
+
[f.UINT16.toString(), b.BIT16],
|
|
2792
|
+
[f.UINT32.toString(), b.BIT32],
|
|
2793
|
+
[f.UINT64.toString(), b.BIT64],
|
|
2794
|
+
[f.FLOAT32.toString(), b.BIT32],
|
|
2795
|
+
[f.FLOAT64.toString(), b.BIT64],
|
|
2796
|
+
[f.INT8.toString(), b.BIT8],
|
|
2797
|
+
[f.INT16.toString(), b.BIT16],
|
|
2798
|
+
[f.INT32.toString(), b.BIT32],
|
|
2799
|
+
[f.INT64.toString(), b.BIT64],
|
|
2800
|
+
[f.TIMESTAMP.toString(), b.BIT64],
|
|
2801
|
+
[f.STRING.toString(), b.UNKNOWN],
|
|
2802
|
+
[f.JSON.toString(), b.UNKNOWN],
|
|
2803
|
+
[f.UUID.toString(), b.BIT128],
|
|
2804
|
+
[f.BYTES.toString(), b.UNKNOWN]
|
|
2798
2805
|
]);
|
|
2799
2806
|
/** All the data types. */
|
|
2800
2807
|
static ALL = [
|
|
2801
2808
|
f.UNKNOWN,
|
|
2802
|
-
f.FLOAT64,
|
|
2803
|
-
f.FLOAT32,
|
|
2804
|
-
f.INT64,
|
|
2805
|
-
f.INT32,
|
|
2806
|
-
f.INT16,
|
|
2807
|
-
f.INT8,
|
|
2808
|
-
f.UINT64,
|
|
2809
|
-
f.UINT32,
|
|
2810
|
-
f.UINT16,
|
|
2811
2809
|
f.UINT8,
|
|
2810
|
+
f.UINT16,
|
|
2811
|
+
f.UINT32,
|
|
2812
|
+
f.UINT64,
|
|
2813
|
+
f.INT8,
|
|
2814
|
+
f.INT16,
|
|
2815
|
+
f.INT32,
|
|
2816
|
+
f.INT64,
|
|
2817
|
+
f.FLOAT32,
|
|
2818
|
+
f.FLOAT64,
|
|
2812
2819
|
f.TIMESTAMP,
|
|
2813
2820
|
f.UUID,
|
|
2814
2821
|
f.STRING,
|
|
2815
|
-
f.JSON
|
|
2822
|
+
f.JSON,
|
|
2823
|
+
f.BYTES
|
|
2816
2824
|
];
|
|
2817
2825
|
static SHORT_STRINGS = /* @__PURE__ */ new Map([
|
|
2818
2826
|
[f.UINT8.toString(), "u8"],
|
|
@@ -2825,11 +2833,11 @@ class f extends st {
|
|
|
2825
2833
|
[f.INT64.toString(), "i64"],
|
|
2826
2834
|
[f.FLOAT32.toString(), "f32"],
|
|
2827
2835
|
[f.FLOAT64.toString(), "f64"],
|
|
2828
|
-
[f.BOOLEAN.toString(), "bool"],
|
|
2829
2836
|
[f.TIMESTAMP.toString(), "ts"],
|
|
2830
2837
|
[f.UUID.toString(), "uuid"],
|
|
2831
2838
|
[f.STRING.toString(), "str"],
|
|
2832
|
-
[f.JSON.toString(), "json"]
|
|
2839
|
+
[f.JSON.toString(), "json"],
|
|
2840
|
+
[f.BYTES.toString(), "bytes"]
|
|
2833
2841
|
]);
|
|
2834
2842
|
static BIG_INT_TYPES = [f.INT64, f.UINT64, f.TIMESTAMP];
|
|
2835
2843
|
/** A zod schema for a DataType. */
|
|
@@ -2975,10 +2983,10 @@ class p extends st {
|
|
|
2975
2983
|
return this.valueOf() === 0;
|
|
2976
2984
|
}
|
|
2977
2985
|
}
|
|
2978
|
-
const
|
|
2986
|
+
const Uu = c.object({
|
|
2979
2987
|
start: c.number(),
|
|
2980
2988
|
end: c.number()
|
|
2981
|
-
}),
|
|
2989
|
+
}), ju = c.union([
|
|
2982
2990
|
c.instanceof(Uint8Array),
|
|
2983
2991
|
c.instanceof(Uint16Array),
|
|
2984
2992
|
c.instanceof(Uint32Array),
|
|
@@ -3019,20 +3027,20 @@ function qo() {
|
|
|
3019
3027
|
return re(_o);
|
|
3020
3028
|
}
|
|
3021
3029
|
const Fo = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), cn = { randomUUID: Fo };
|
|
3022
|
-
function
|
|
3030
|
+
function Yo(e, t, n) {
|
|
3023
3031
|
e = e || {};
|
|
3024
3032
|
const r = e.random ?? e.rng?.() ?? qo();
|
|
3025
3033
|
if (r.length < 16)
|
|
3026
3034
|
throw new Error("Random bytes length must be >= 16");
|
|
3027
3035
|
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, ar(r);
|
|
3028
3036
|
}
|
|
3029
|
-
function
|
|
3030
|
-
return cn.randomUUID && !e ? cn.randomUUID() :
|
|
3037
|
+
function zo(e, t, n) {
|
|
3038
|
+
return cn.randomUUID && !e ? cn.randomUUID() : Yo(e);
|
|
3031
3039
|
}
|
|
3032
|
-
const
|
|
3040
|
+
const Vo = () => zo(), Ge = (e, t) => Zo(e, t), Wo = Po, Cu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3033
3041
|
__proto__: null,
|
|
3034
|
-
ZERO:
|
|
3035
|
-
create:
|
|
3042
|
+
ZERO: Wo,
|
|
3043
|
+
create: Vo,
|
|
3036
3044
|
parse: Ge
|
|
3037
3045
|
}, Symbol.toStringTag, { value: "Module" })), J = -1, ye = {
|
|
3038
3046
|
[Symbol.iterator]: () => ye,
|
|
@@ -3228,7 +3236,7 @@ class q {
|
|
|
3228
3236
|
if (typeof m == "string") this.dataType = f.STRING;
|
|
3229
3237
|
else if (typeof m == "number") this.dataType = f.FLOAT64;
|
|
3230
3238
|
else if (typeof m == "bigint") this.dataType = f.INT64;
|
|
3231
|
-
else if (typeof m == "boolean") this.dataType = f.
|
|
3239
|
+
else if (typeof m == "boolean") this.dataType = f.UINT8;
|
|
3232
3240
|
else if (m instanceof d || m instanceof Date || m instanceof d)
|
|
3233
3241
|
this.dataType = f.TIMESTAMP;
|
|
3234
3242
|
else if (typeof m == "object") this.dataType = f.JSON;
|
|
@@ -3475,7 +3483,7 @@ class q {
|
|
|
3475
3483
|
}
|
|
3476
3484
|
/** @returns the bounds of the series. */
|
|
3477
3485
|
get bounds() {
|
|
3478
|
-
return
|
|
3486
|
+
return w(Number(this.min), Number(this.max), { makeValid: !1 });
|
|
3479
3487
|
}
|
|
3480
3488
|
maybeRecomputeMinMax(t) {
|
|
3481
3489
|
if (this.cachedMin != null) {
|
|
@@ -3606,7 +3614,7 @@ class q {
|
|
|
3606
3614
|
* is exclusive.
|
|
3607
3615
|
*/
|
|
3608
3616
|
get alignmentBounds() {
|
|
3609
|
-
return
|
|
3617
|
+
return w(
|
|
3610
3618
|
this.alignment,
|
|
3611
3619
|
this.alignment + BigInt(this.length) * this.alignmentMultiple
|
|
3612
3620
|
);
|
|
@@ -3736,7 +3744,7 @@ class an {
|
|
|
3736
3744
|
index;
|
|
3737
3745
|
constructor(t, n, r) {
|
|
3738
3746
|
this.series = t;
|
|
3739
|
-
const s =
|
|
3747
|
+
const s = w(0, t.length + 1);
|
|
3740
3748
|
this.end = le(s, r), this.index = le(s, n);
|
|
3741
3749
|
}
|
|
3742
3750
|
next() {
|
|
@@ -3804,7 +3812,7 @@ class Ko {
|
|
|
3804
3812
|
};
|
|
3805
3813
|
}
|
|
3806
3814
|
}
|
|
3807
|
-
class
|
|
3815
|
+
class Bu {
|
|
3808
3816
|
/** The array of series in this collection */
|
|
3809
3817
|
series;
|
|
3810
3818
|
/**
|
|
@@ -3890,7 +3898,7 @@ class $u {
|
|
|
3890
3898
|
* series + its length. If the collection is empty, returns bounds.construct(0n, 0n).
|
|
3891
3899
|
*/
|
|
3892
3900
|
get alignmentBounds() {
|
|
3893
|
-
return this.series.length === 0 ?
|
|
3901
|
+
return this.series.length === 0 ? w(0n, 0n) : w(
|
|
3894
3902
|
this.series[0].alignmentBounds.lower,
|
|
3895
3903
|
this.series[this.series.length - 1].alignmentBounds.upper
|
|
3896
3904
|
);
|
|
@@ -4032,7 +4040,7 @@ class $u {
|
|
|
4032
4040
|
*/
|
|
4033
4041
|
traverseAlignment(t, n) {
|
|
4034
4042
|
const r = this.series.map((s) => s.alignmentBounds);
|
|
4035
|
-
return
|
|
4043
|
+
return Yn(r, t, n);
|
|
4036
4044
|
}
|
|
4037
4045
|
/**
|
|
4038
4046
|
* Acquires a reference to the WebGL buffer for all series.
|
|
@@ -4055,7 +4063,7 @@ class $u {
|
|
|
4055
4063
|
*/
|
|
4056
4064
|
distance(t, n) {
|
|
4057
4065
|
const r = this.series.map((s) => s.alignmentBounds);
|
|
4058
|
-
return
|
|
4066
|
+
return zn(r, t, n);
|
|
4059
4067
|
}
|
|
4060
4068
|
/**
|
|
4061
4069
|
* Parses a JSON multi-series into an array of values using the provided zod schema.
|
|
@@ -4123,7 +4131,7 @@ const un = (e) => {
|
|
|
4123
4131
|
return { domain: t, sample: n };
|
|
4124
4132
|
}, hr = async (e) => await new Promise(
|
|
4125
4133
|
(t) => setTimeout(t, g.fromMilliseconds(e).milliseconds)
|
|
4126
|
-
),
|
|
4134
|
+
), Ru = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4127
4135
|
__proto__: null,
|
|
4128
4136
|
sleep: hr
|
|
4129
4137
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -4154,7 +4162,7 @@ const ec = c.object({
|
|
|
4154
4162
|
baseInterval: g.z.optional(),
|
|
4155
4163
|
maxRetries: c.number().optional(),
|
|
4156
4164
|
scale: c.number().optional()
|
|
4157
|
-
}),
|
|
4165
|
+
}), Pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4158
4166
|
__proto__: null,
|
|
4159
4167
|
Breaker: tc,
|
|
4160
4168
|
breakerConfigZ: ec
|
|
@@ -4162,10 +4170,10 @@ const ec = c.object({
|
|
|
4162
4170
|
variant: c.enum(["set", "delete"]),
|
|
4163
4171
|
key: c.string(),
|
|
4164
4172
|
value: e
|
|
4165
|
-
}),
|
|
4173
|
+
}), Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4166
4174
|
__proto__: null,
|
|
4167
4175
|
Z: nc
|
|
4168
|
-
}, Symbol.toStringTag, { value: "Module" })), rc = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i,
|
|
4176
|
+
}, Symbol.toStringTag, { value: "Module" })), rc = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Vt = c.string().regex(rc), H = c.number().min(0).max(255), De = c.number().min(0).max(1), Qt = c.tuple([H, H, H, De]), sc = c.tuple([H, H, H]), ic = c.object({ rgba255: Qt }), oc = c.object({ r: H, g: H, b: H, a: De }), cc = c.number().min(0).max(360), ac = c.number().min(0).max(100), uc = c.number().min(0).max(100), dr = c.tuple([cc, ac, uc, De]), te = c.union([Vt, sc, Qt, dr, ic, oc]), St = te.transform((e) => I(e)), lc = (e) => St.safeParse(e).success, fc = (e) => Qt.safeParse(e).success, hc = ((e) => {
|
|
4169
4177
|
if (e == null) return;
|
|
4170
4178
|
const t = St.safeParse(e);
|
|
4171
4179
|
if (t.success) return yr(t.data);
|
|
@@ -4218,7 +4226,7 @@ const ec = c.object({
|
|
|
4218
4226
|
throw new Error("[Color.pickByContrast] - must provide at least one color");
|
|
4219
4227
|
const n = I(e), [r] = t.sort((s, i) => pe(n, i) - pe(n, s));
|
|
4220
4228
|
return I(r);
|
|
4221
|
-
}, xc = (e) => Nt(e) < 0.5, Ic = (e) => Nt(e) > 0.5, Zt = (e, t = 1) => (e =
|
|
4229
|
+
}, xc = (e) => Nt(e) < 0.5, Ic = (e) => Nt(e) > 0.5, Zt = (e, t = 1) => (e = Vt.parse(e), e = Nc(e), [
|
|
4222
4230
|
Bt(e, 0),
|
|
4223
4231
|
Bt(e, 2),
|
|
4224
4232
|
Bt(e, 4),
|
|
@@ -4262,9 +4270,9 @@ const ec = c.object({
|
|
|
4262
4270
|
if (t.startsWith("#")) {
|
|
4263
4271
|
if (t.length === 4) {
|
|
4264
4272
|
const n = t[1], r = t[2], s = t[3], i = `#${n}${n}${r}${r}${s}${s}`;
|
|
4265
|
-
if (
|
|
4273
|
+
if (Vt.safeParse(i).success) return Zt(i);
|
|
4266
4274
|
}
|
|
4267
|
-
return (t.length === 7 || t.length === 9) &&
|
|
4275
|
+
return (t.length === 7 || t.length === 9) && Vt.safeParse(t).success ? Zt(t) : void 0;
|
|
4268
4276
|
}
|
|
4269
4277
|
if (t.startsWith("rgb")) {
|
|
4270
4278
|
const n = t.match(
|
|
@@ -4337,7 +4345,7 @@ const ec = c.object({
|
|
|
4337
4345
|
key: c.string(),
|
|
4338
4346
|
name: c.string(),
|
|
4339
4347
|
swatches: c.array(Uc)
|
|
4340
|
-
}),
|
|
4348
|
+
}), ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4341
4349
|
__proto__: null,
|
|
4342
4350
|
BLACK: Ec,
|
|
4343
4351
|
WHITE: Sc,
|
|
@@ -4399,7 +4407,7 @@ const ec = c.object({
|
|
|
4399
4407
|
from: vt(e),
|
|
4400
4408
|
to: vt(e)
|
|
4401
4409
|
})
|
|
4402
|
-
]),
|
|
4410
|
+
]), Zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4403
4411
|
__proto__: null,
|
|
4404
4412
|
ABSOLUTE_AUTHORITY: wr,
|
|
4405
4413
|
AUTHORITY_BOUNDS: Cc,
|
|
@@ -4427,15 +4435,15 @@ const ec = c.object({
|
|
|
4427
4435
|
case "object":
|
|
4428
4436
|
return e == null ? "" : fn(JSON.stringify(e));
|
|
4429
4437
|
}
|
|
4430
|
-
}, Lc = /[",\n]/, fn = (e) => Lc.test(e) ? `"${e.replace(/"/g, '""')}"` : e,
|
|
4438
|
+
}, Lc = /[",\n]/, fn = (e) => Lc.test(e) ? `"${e.replace(/"/g, '""')}"` : e, _u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4431
4439
|
__proto__: null,
|
|
4432
4440
|
formatValue: Pc
|
|
4433
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4441
|
+
}, Symbol.toStringTag, { value: "Module" })), qu = (e, t) => {
|
|
4434
4442
|
let n = null;
|
|
4435
4443
|
return t === 0 ? e : (...s) => {
|
|
4436
4444
|
n !== null && (clearTimeout(n), n = null), n = setTimeout(() => e(...s), t);
|
|
4437
4445
|
};
|
|
4438
|
-
},
|
|
4446
|
+
}, Fu = (e, t) => {
|
|
4439
4447
|
let n = null;
|
|
4440
4448
|
return t === 0 ? e : (...s) => {
|
|
4441
4449
|
n === null && (n = setTimeout(() => {
|
|
@@ -4576,7 +4584,7 @@ const ec = c.object({
|
|
|
4576
4584
|
throw new Error(`Path ${t} does not exist. ${i[u]} is undefined`);
|
|
4577
4585
|
};
|
|
4578
4586
|
return o(e, 0);
|
|
4579
|
-
}),
|
|
4587
|
+
}), Yc = (e, t) => Ke(e, t, { optional: !0 }) !== null, Oe = (e, ...t) => {
|
|
4580
4588
|
if (t.length === 0) return e;
|
|
4581
4589
|
const n = t.shift();
|
|
4582
4590
|
if (at(e) && at(n))
|
|
@@ -4587,7 +4595,7 @@ const ec = c.object({
|
|
|
4587
4595
|
throw s instanceof TypeError ? new TypeError(`.${r}: ${s.message}`) : s;
|
|
4588
4596
|
}
|
|
4589
4597
|
return Oe(e, ...t);
|
|
4590
|
-
},
|
|
4598
|
+
}, zc = (e, t, n) => {
|
|
4591
4599
|
const r = (s, i, o) => {
|
|
4592
4600
|
if (o.def?.type === "union")
|
|
4593
4601
|
return o.def.options.reduce(
|
|
@@ -4617,7 +4625,7 @@ const ec = c.object({
|
|
|
4617
4625
|
return s;
|
|
4618
4626
|
};
|
|
4619
4627
|
return r({ ...e }, t, n);
|
|
4620
|
-
},
|
|
4628
|
+
}, Vc = (e, t) => {
|
|
4621
4629
|
const n = t.split(j);
|
|
4622
4630
|
let r = e, s = 0;
|
|
4623
4631
|
for (; s < n.length; ) {
|
|
@@ -4677,7 +4685,7 @@ const ec = c.object({
|
|
|
4677
4685
|
r = o, s++;
|
|
4678
4686
|
}
|
|
4679
4687
|
}
|
|
4680
|
-
},
|
|
4688
|
+
}, Wc = (e, t, n) => {
|
|
4681
4689
|
const r = t.split(j);
|
|
4682
4690
|
let s = e, i = 0;
|
|
4683
4691
|
for (; i < r.length - 1; ) {
|
|
@@ -4732,7 +4740,7 @@ const ec = c.object({
|
|
|
4732
4740
|
} catch (o) {
|
|
4733
4741
|
throw console.error("failed to set value", n, "at path", t, "on object", e), o;
|
|
4734
4742
|
}
|
|
4735
|
-
},
|
|
4743
|
+
}, Yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4736
4744
|
__proto__: null,
|
|
4737
4745
|
SEPARATOR: j,
|
|
4738
4746
|
copy: kc,
|
|
@@ -4743,16 +4751,16 @@ const ec = c.object({
|
|
|
4743
4751
|
findBestKey: we,
|
|
4744
4752
|
get: Ke,
|
|
4745
4753
|
getIndex: ot,
|
|
4746
|
-
has:
|
|
4754
|
+
has: Yc,
|
|
4747
4755
|
override: Oe,
|
|
4748
|
-
overrideValidItems:
|
|
4756
|
+
overrideValidItems: zc,
|
|
4749
4757
|
partialEqual: vr,
|
|
4750
4758
|
pathsMatch: Fc,
|
|
4751
|
-
remove:
|
|
4759
|
+
remove: Vc,
|
|
4752
4760
|
resolvePath: _c,
|
|
4753
|
-
set:
|
|
4761
|
+
set: Wc,
|
|
4754
4762
|
transformPath: Mr
|
|
4755
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4763
|
+
}, Symbol.toStringTag, { value: "Module" })), zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4756
4764
|
__proto__: null
|
|
4757
4765
|
}, Symbol.toStringTag, { value: "Module" })), Gc = (e) => Object.getOwnPropertySymbols(globalThis).includes(e), Hc = (e, t) => {
|
|
4758
4766
|
const n = Symbol.for(e);
|
|
@@ -4822,7 +4830,7 @@ class ea extends Tt("canceled") {
|
|
|
4822
4830
|
}
|
|
4823
4831
|
class na extends Tt("not_implemented") {
|
|
4824
4832
|
}
|
|
4825
|
-
const
|
|
4833
|
+
const Vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4826
4834
|
__proto__: null,
|
|
4827
4835
|
Canceled: ea,
|
|
4828
4836
|
NONE: xe,
|
|
@@ -4835,8 +4843,19 @@ const qu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4835
4843
|
isTyped: Er,
|
|
4836
4844
|
payloadZ: ta,
|
|
4837
4845
|
register: Xc
|
|
4846
|
+
}, Symbol.toStringTag, { value: "Module" })), ra = c.string().regex(/^(?:$|(?:\/(?:[^~/]|~0|~1)*)+)$/, "must be a valid JSON pointer (RFC 6901)"), sa = c.union([c.string(), c.number(), c.boolean(), c.null()]), ia = c.enum(["string", "number", "boolean", "null"]), oa = {
|
|
4847
|
+
string: "",
|
|
4848
|
+
number: 0,
|
|
4849
|
+
boolean: !1,
|
|
4850
|
+
null: null
|
|
4851
|
+
}, Wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4852
|
+
__proto__: null,
|
|
4853
|
+
ZERO_PRIMITIVES: oa,
|
|
4854
|
+
pointerZ: ra,
|
|
4855
|
+
primitiveTypeZ: ia,
|
|
4856
|
+
primitiveZ: sa
|
|
4838
4857
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4839
|
-
class
|
|
4858
|
+
class ca {
|
|
4840
4859
|
store = /* @__PURE__ */ new Map();
|
|
4841
4860
|
async get(t) {
|
|
4842
4861
|
return this.store.get(t) ?? null;
|
|
@@ -4854,7 +4873,7 @@ class ra {
|
|
|
4854
4873
|
this.store.clear();
|
|
4855
4874
|
}
|
|
4856
4875
|
}
|
|
4857
|
-
class
|
|
4876
|
+
class aa {
|
|
4858
4877
|
store = /* @__PURE__ */ new Map();
|
|
4859
4878
|
get(t) {
|
|
4860
4879
|
return this.store.get(t) ?? null;
|
|
@@ -4866,47 +4885,47 @@ class sa {
|
|
|
4866
4885
|
this.store.delete(t);
|
|
4867
4886
|
}
|
|
4868
4887
|
}
|
|
4869
|
-
const
|
|
4888
|
+
const ua = c.object({ key: c.string(), value: c.string() }), Gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4870
4889
|
__proto__: null,
|
|
4871
|
-
MockAsync:
|
|
4872
|
-
MockSync:
|
|
4873
|
-
stringPairZ:
|
|
4890
|
+
MockAsync: ca,
|
|
4891
|
+
MockSync: aa,
|
|
4892
|
+
stringPairZ: ua
|
|
4874
4893
|
}, Symbol.toStringTag, { value: "Module" })), Sr = L.uuid(), Tr = L.object({
|
|
4875
4894
|
key: Sr,
|
|
4876
4895
|
name: L.string().min(1),
|
|
4877
4896
|
color: St
|
|
4878
|
-
}),
|
|
4897
|
+
}), Hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4879
4898
|
__proto__: null,
|
|
4880
4899
|
keyZ: Sr,
|
|
4881
4900
|
labelZ: Tr
|
|
4882
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4901
|
+
}, Symbol.toStringTag, { value: "Module" })), la = new RegExp(
|
|
4883
4902
|
"^(https?:\\/\\/)?((([a-zA-Z0-9][a-zA-Z0-9-]*\\.)+[a-zA-Z]{2,})|localhost|(\\d{1,3}\\.){3}\\d{1,3})(\\:\\d+)?(\\/[-a-zA-Z0-9@:%._\\+~#=]*)*(\\?[;&a-zA-Z0-9%_.,~+=-]*)?(#[-a-zA-Z0-9_]*)?$"
|
|
4884
4903
|
// fragment identifier (optional)
|
|
4885
|
-
),
|
|
4904
|
+
), fa = (e) => la.test(e), Du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4886
4905
|
__proto__: null,
|
|
4887
|
-
is:
|
|
4888
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4906
|
+
is: fa
|
|
4907
|
+
}, Symbol.toStringTag, { value: "Module" })), ha = (e, t, n) => {
|
|
4889
4908
|
const r = e.get(t);
|
|
4890
4909
|
return r === void 0 ? (e.set(t, n), n) : r;
|
|
4891
|
-
},
|
|
4910
|
+
}, Ju = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4892
4911
|
__proto__: null,
|
|
4893
|
-
getOrSetDefault:
|
|
4894
|
-
}, Symbol.toStringTag, { value: "Module" })), Ne = c.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/),
|
|
4912
|
+
getOrSetDefault: ha
|
|
4913
|
+
}, Symbol.toStringTag, { value: "Module" })), Ne = c.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/), da = (e, t) => {
|
|
4895
4914
|
const n = e.split("."), r = t.split("."), s = Math.max(n.length, r.length);
|
|
4896
4915
|
for (let i = 0; i < s; i++) {
|
|
4897
4916
|
const o = n[i], a = r[i];
|
|
4898
|
-
if (o === void 0) return
|
|
4899
|
-
if (a === void 0) return
|
|
4917
|
+
if (o === void 0) return V;
|
|
4918
|
+
if (a === void 0) return W;
|
|
4900
4919
|
const u = /^\d+$/.test(o), l = /^\d+$/.test(a);
|
|
4901
|
-
if (u && !l) return
|
|
4902
|
-
if (!u && l) return
|
|
4920
|
+
if (u && !l) return V;
|
|
4921
|
+
if (!u && l) return W;
|
|
4903
4922
|
if (u && l) {
|
|
4904
4923
|
const h = parseInt(o), y = parseInt(a);
|
|
4905
|
-
if (h < y) return
|
|
4906
|
-
if (h > y) return
|
|
4924
|
+
if (h < y) return V;
|
|
4925
|
+
if (h > y) return W;
|
|
4907
4926
|
} else {
|
|
4908
|
-
if (o < a) return
|
|
4909
|
-
if (o > a) return
|
|
4927
|
+
if (o < a) return V;
|
|
4928
|
+
if (o > a) return W;
|
|
4910
4929
|
}
|
|
4911
4930
|
}
|
|
4912
4931
|
return it;
|
|
@@ -4914,19 +4933,19 @@ const ia = c.object({ key: c.string(), value: c.string() }), Fu = /* @__PURE__ *
|
|
|
4914
4933
|
n.checkMajor ??= !0, n.checkMinor ??= !0, n.checkPatch ??= !0;
|
|
4915
4934
|
const r = Ne.parse(e), s = Ne.parse(t), [i, o] = r.split("-"), [a, u] = s.split("-"), [l, h, y] = i.split(".").map(Number), [m, M, S] = a.split(".").map(Number);
|
|
4916
4935
|
if (n.checkMajor) {
|
|
4917
|
-
if (l < m) return
|
|
4918
|
-
if (l > m) return
|
|
4936
|
+
if (l < m) return V;
|
|
4937
|
+
if (l > m) return W;
|
|
4919
4938
|
}
|
|
4920
4939
|
if (n.checkMinor) {
|
|
4921
|
-
if (h < M) return
|
|
4922
|
-
if (h > M) return
|
|
4940
|
+
if (h < M) return V;
|
|
4941
|
+
if (h > M) return W;
|
|
4923
4942
|
}
|
|
4924
4943
|
if (n.checkPatch) {
|
|
4925
|
-
if (y < S) return
|
|
4926
|
-
if (y > S) return
|
|
4944
|
+
if (y < S) return V;
|
|
4945
|
+
if (y > S) return W;
|
|
4927
4946
|
}
|
|
4928
|
-
return o === void 0 && u === void 0 ? it : o === void 0 ?
|
|
4929
|
-
}),
|
|
4947
|
+
return o === void 0 && u === void 0 ? it : o === void 0 ? W : u === void 0 ? V : da(o, u);
|
|
4948
|
+
}), ga = (e, t, n = {}) => En($t(e, t, n)), $r = (e, t, n = {}) => An($t(e, t, n)), ya = (e, t, n = {}) => Mn($t(e, t, n)), ma = ({
|
|
4930
4949
|
name: e,
|
|
4931
4950
|
migrate: t
|
|
4932
4951
|
}) => (n) => {
|
|
@@ -4936,7 +4955,7 @@ const ia = c.object({ key: c.string(), value: c.string() }), Fu = /* @__PURE__ *
|
|
|
4936
4955
|
} catch (r) {
|
|
4937
4956
|
throw console.log(`${e} failed to migrate from ${n.version}`), console.error(r), r;
|
|
4938
4957
|
}
|
|
4939
|
-
},
|
|
4958
|
+
}, pa = ({
|
|
4940
4959
|
name: e,
|
|
4941
4960
|
migrations: t,
|
|
4942
4961
|
targetSchema: n,
|
|
@@ -4988,16 +5007,16 @@ const ia = c.object({ key: c.string(), value: c.string() }), Fu = /* @__PURE__ *
|
|
|
4988
5007
|
return console.log(`${e} failed to parse final result. Exiting with default`), console.error(h), s;
|
|
4989
5008
|
}
|
|
4990
5009
|
};
|
|
4991
|
-
},
|
|
5010
|
+
}, Xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4992
5011
|
__proto__: null,
|
|
4993
5012
|
compareSemVer: $t,
|
|
4994
|
-
createMigration:
|
|
4995
|
-
migrator:
|
|
5013
|
+
createMigration: ma,
|
|
5014
|
+
migrator: pa,
|
|
4996
5015
|
semVerNewer: $r,
|
|
4997
|
-
semVerOlder:
|
|
5016
|
+
semVerOlder: ya,
|
|
4998
5017
|
semVerZ: Ne,
|
|
4999
|
-
versionsEqual:
|
|
5000
|
-
}, Symbol.toStringTag, { value: "Module" })), Ur = ["standard", "scientific", "engineering"],
|
|
5018
|
+
versionsEqual: ga
|
|
5019
|
+
}, Symbol.toStringTag, { value: "Module" })), Ur = ["standard", "scientific", "engineering"], ba = c.enum(Ur), wa = (e, t, n) => {
|
|
5001
5020
|
if (Number.isNaN(e)) return "NaN";
|
|
5002
5021
|
if (e === 1 / 0) return "∞";
|
|
5003
5022
|
if (e === -1 / 0) return "-∞";
|
|
@@ -5006,13 +5025,13 @@ const ia = c.object({ key: c.string(), value: c.string() }), Fu = /* @__PURE__ *
|
|
|
5006
5025
|
return t === 0 ? "0ᴇ0" : `0.${"0".repeat(t)}ᴇ0`;
|
|
5007
5026
|
let r;
|
|
5008
5027
|
return n === "scientific" ? r = Math.floor(Math.log10(Math.abs(e))) : r = Math.floor(Math.log10(Math.abs(e)) / 3) * 3, `${(e / 10 ** r).toFixed(t)}ᴇ${r}`;
|
|
5009
|
-
},
|
|
5028
|
+
}, Ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5010
5029
|
__proto__: null,
|
|
5011
5030
|
NOTATIONS: Ur,
|
|
5012
|
-
notationZ:
|
|
5013
|
-
stringifyNumber:
|
|
5031
|
+
notationZ: ba,
|
|
5032
|
+
stringifyNumber: wa
|
|
5014
5033
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5015
|
-
class
|
|
5034
|
+
class Oa {
|
|
5016
5035
|
handlers;
|
|
5017
5036
|
transform;
|
|
5018
5037
|
closer;
|
|
@@ -5040,7 +5059,7 @@ class ma {
|
|
|
5040
5059
|
return await this.closer?.();
|
|
5041
5060
|
}
|
|
5042
5061
|
}
|
|
5043
|
-
class
|
|
5062
|
+
class xa {
|
|
5044
5063
|
handlers;
|
|
5045
5064
|
constructor(t) {
|
|
5046
5065
|
this.handlers = t ?? /* @__PURE__ */ new Map();
|
|
@@ -5052,35 +5071,35 @@ class pa {
|
|
|
5052
5071
|
this.handlers.forEach((n, r) => r(t));
|
|
5053
5072
|
}
|
|
5054
5073
|
}
|
|
5055
|
-
const
|
|
5074
|
+
const Qu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5056
5075
|
__proto__: null,
|
|
5057
|
-
BaseObserver:
|
|
5058
|
-
Observer:
|
|
5059
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5076
|
+
BaseObserver: xa,
|
|
5077
|
+
Observer: Oa
|
|
5078
|
+
}, Symbol.toStringTag, { value: "Module" })), tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5060
5079
|
__proto__: null
|
|
5061
|
-
}, Symbol.toStringTag, { value: "Module" })), jr = c.union([c.string(), c.number()]), Cr = c.record(jr, c.unknown()),
|
|
5080
|
+
}, Symbol.toStringTag, { value: "Module" })), jr = c.union([c.string(), c.number()]), Cr = c.record(jr, c.unknown()), Ia = () => c.union([
|
|
5062
5081
|
c.union([c.null(), c.undefined()]).transform(() => ({})),
|
|
5063
5082
|
Cr
|
|
5064
|
-
]), tn = (e) => Object.entries(e),
|
|
5083
|
+
]), tn = (e) => Object.entries(e), Na = (e, t) => Object.fromEntries(tn(e).map(([n, r]) => [n, t(r, n)])), va = (e) => Object.fromEntries(tn(e).filter(([t, n]) => n !== void 0)), Ma = (e, ...t) => {
|
|
5065
5084
|
const n = { ...e };
|
|
5066
5085
|
for (const r of t) delete n[r];
|
|
5067
5086
|
return n;
|
|
5068
|
-
},
|
|
5087
|
+
}, el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5069
5088
|
__proto__: null,
|
|
5070
5089
|
entries: tn,
|
|
5071
5090
|
keyZ: jr,
|
|
5072
|
-
map:
|
|
5073
|
-
nullishToEmpty:
|
|
5074
|
-
omit:
|
|
5075
|
-
purgeUndefined:
|
|
5091
|
+
map: Na,
|
|
5092
|
+
nullishToEmpty: Ia,
|
|
5093
|
+
omit: Ma,
|
|
5094
|
+
purgeUndefined: va,
|
|
5076
5095
|
unknownZ: Cr
|
|
5077
|
-
}, Symbol.toStringTag, { value: "Module" })), Br = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser",
|
|
5096
|
+
}, Symbol.toStringTag, { value: "Module" })), Br = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", Aa = Br(), Rr = ["macOS", "Windows", "Linux"], Ea = ["macos", "windows", "linux"], Sa = {
|
|
5078
5097
|
macos: "macOS",
|
|
5079
5098
|
windows: "Windows",
|
|
5080
5099
|
linux: "Linux"
|
|
5081
|
-
},
|
|
5082
|
-
c.enum(
|
|
5083
|
-
),
|
|
5100
|
+
}, Ta = c.enum(Rr).or(
|
|
5101
|
+
c.enum(Ea).transform((e) => Sa[e])
|
|
5102
|
+
), $a = () => {
|
|
5084
5103
|
if (typeof window > "u") return;
|
|
5085
5104
|
const e = window.navigator.userAgent.toLowerCase();
|
|
5086
5105
|
if (e.includes("mac")) return "macOS";
|
|
@@ -5088,23 +5107,23 @@ const Hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5088
5107
|
if (e.includes("linux")) return "Linux";
|
|
5089
5108
|
};
|
|
5090
5109
|
let Rt;
|
|
5091
|
-
const
|
|
5110
|
+
const Ua = ((e = {}) => {
|
|
5092
5111
|
const { force: t, default: n } = e;
|
|
5093
|
-
return t ?? Rt ?? (Rt =
|
|
5094
|
-
}),
|
|
5112
|
+
return t ?? Rt ?? (Rt = $a(), Rt ?? n);
|
|
5113
|
+
}), nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5095
5114
|
__proto__: null,
|
|
5096
5115
|
OPERATING_SYSTEMS: Rr,
|
|
5097
|
-
RUNTIME:
|
|
5116
|
+
RUNTIME: Aa,
|
|
5098
5117
|
detect: Br,
|
|
5099
|
-
getOS:
|
|
5100
|
-
osZ:
|
|
5101
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5118
|
+
getOS: Ua,
|
|
5119
|
+
osZ: Ta
|
|
5120
|
+
}, Symbol.toStringTag, { value: "Module" })), ja = () => Promise.resolve(), Ca = () => new Promise((e) => setTimeout(e, 0)), rl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5102
5121
|
__proto__: null,
|
|
5103
|
-
flushMicrotasks:
|
|
5104
|
-
flushTaskQueue:
|
|
5105
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5122
|
+
flushMicrotasks: ja,
|
|
5123
|
+
flushTaskQueue: Ca
|
|
5124
|
+
}, Symbol.toStringTag, { value: "Module" })), Ba = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e !== null ? { ...e } : e, sl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5106
5125
|
__proto__: null,
|
|
5107
|
-
copy:
|
|
5126
|
+
copy: Ba
|
|
5108
5127
|
}, Symbol.toStringTag, { value: "Module" })), Pr = c.enum([
|
|
5109
5128
|
"success",
|
|
5110
5129
|
"info",
|
|
@@ -5112,7 +5131,7 @@ const Ea = ((e = {}) => {
|
|
|
5112
5131
|
"error",
|
|
5113
5132
|
"loading",
|
|
5114
5133
|
"disabled"
|
|
5115
|
-
]),
|
|
5134
|
+
]), Ra = (e) => c.object({
|
|
5116
5135
|
key: c.string(),
|
|
5117
5136
|
name: c.string().default(""),
|
|
5118
5137
|
variant: Pr,
|
|
@@ -5121,10 +5140,10 @@ const Ea = ((e = {}) => {
|
|
|
5121
5140
|
time: d.z,
|
|
5122
5141
|
labels: gn(Tr).optional(),
|
|
5123
5142
|
details: e ?? c.unknown().optional()
|
|
5124
|
-
}),
|
|
5143
|
+
}), Pa = c.object({
|
|
5125
5144
|
stack: c.string(),
|
|
5126
5145
|
error: c.instanceof(Error)
|
|
5127
|
-
}),
|
|
5146
|
+
}), La = (e, t) => {
|
|
5128
5147
|
if (!(e instanceof Error)) throw e;
|
|
5129
5148
|
return Lr({
|
|
5130
5149
|
variant: "error",
|
|
@@ -5137,17 +5156,17 @@ const Ea = ((e = {}) => {
|
|
|
5137
5156
|
time: d.now(),
|
|
5138
5157
|
name: "",
|
|
5139
5158
|
...e
|
|
5140
|
-
}),
|
|
5159
|
+
}), ka = (e, t = []) => {
|
|
5141
5160
|
if (e != null)
|
|
5142
5161
|
return Array.isArray(t) ? t.includes(e) ? e : void 0 : t === e ? e : void 0;
|
|
5143
|
-
},
|
|
5162
|
+
}, Za = (e, t = []) => {
|
|
5144
5163
|
if (e != null)
|
|
5145
5164
|
return Array.isArray(t) ? t.includes(e) ? void 0 : e : t === e ? void 0 : e;
|
|
5146
|
-
},
|
|
5165
|
+
}, _a = {
|
|
5147
5166
|
includeTimestamp: !1,
|
|
5148
5167
|
includeName: !0
|
|
5149
|
-
},
|
|
5150
|
-
const n = { ...
|
|
5168
|
+
}, qa = (e, t = {}) => {
|
|
5169
|
+
const n = { ..._a, ...t }, r = [];
|
|
5151
5170
|
let s = e.variant.toUpperCase();
|
|
5152
5171
|
if (n.includeName && e.name.length > 0 && (s += ` [${e.name}]`), s += `: ${e.message}`, n.includeTimestamp && (s += ` (${e.time.toString("dateTime", "local")})`), r.push(s), e.description != null) {
|
|
5153
5172
|
let i;
|
|
@@ -5173,29 +5192,29 @@ ${JSON.stringify(o, null, 2)}`);
|
|
|
5173
5192
|
return r.join(`
|
|
5174
5193
|
|
|
5175
5194
|
`);
|
|
5176
|
-
},
|
|
5195
|
+
}, il = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5177
5196
|
__proto__: null,
|
|
5178
5197
|
create: Lr,
|
|
5179
|
-
exceptionDetailsSchema:
|
|
5180
|
-
fromException:
|
|
5181
|
-
keepVariants:
|
|
5182
|
-
removeVariants:
|
|
5183
|
-
statusZ:
|
|
5184
|
-
toString:
|
|
5198
|
+
exceptionDetailsSchema: Pa,
|
|
5199
|
+
fromException: La,
|
|
5200
|
+
keepVariants: ka,
|
|
5201
|
+
removeVariants: Za,
|
|
5202
|
+
statusZ: Ra,
|
|
5203
|
+
toString: qa,
|
|
5185
5204
|
variantZ: Pr
|
|
5186
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5205
|
+
}, Symbol.toStringTag, { value: "Module" })), Fa = (e, t) => {
|
|
5187
5206
|
if (!t.has(e)) return e;
|
|
5188
5207
|
let n = e, r = 1, s = e;
|
|
5189
5208
|
for (; t.has(s); ) {
|
|
5190
|
-
const i = s.match(
|
|
5209
|
+
const i = s.match(Ya);
|
|
5191
5210
|
i ? (n = s.slice(0, i.index).trim(), r = parseInt(i[1]) + 1) : (n = s, r = 1), s = `${n} (${r})`;
|
|
5192
5211
|
}
|
|
5193
5212
|
return s;
|
|
5194
|
-
},
|
|
5213
|
+
}, Ya = /\((\d+)\)$/, za = (e, t = "") => {
|
|
5195
5214
|
if (typeof e == "string") return e;
|
|
5196
5215
|
const n = e.length;
|
|
5197
5216
|
return n === 0 ? t : n === 1 ? e[0] : n === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")}, and ${e[n - 1]}`;
|
|
5198
|
-
},
|
|
5217
|
+
}, Va = (e) => {
|
|
5199
5218
|
const t = e.split(" "), n = /* @__PURE__ */ new Set(), r = t.map((u) => u.charAt(0).toLowerCase()).join("");
|
|
5200
5219
|
n.add(r.replace(/-/g, "_")), n.add(r.replace(/(.)(.)/g, "$1_$2").replace(/-/g, "_"));
|
|
5201
5220
|
const s = /\d+/g;
|
|
@@ -5213,14 +5232,14 @@ ${JSON.stringify(o, null, 2)}`);
|
|
|
5213
5232
|
return n.add(o.join("").replace(/-/g, "_")), n.add(o.join("_").replace(/-/g, "_")), Array.from(n).filter(
|
|
5214
5233
|
(u) => u.length >= 2 && u.length <= 12 && !/^\d/.test(u)
|
|
5215
5234
|
);
|
|
5216
|
-
},
|
|
5235
|
+
}, Wa = (e, t) => e.startsWith(t) ? e.slice(t.length) : e, ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5217
5236
|
__proto__: null,
|
|
5218
|
-
createShortIdentifiers:
|
|
5219
|
-
deduplicateFileName:
|
|
5220
|
-
naturalLanguageJoin:
|
|
5221
|
-
trimPrefix:
|
|
5222
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5223
|
-
var
|
|
5237
|
+
createShortIdentifiers: Va,
|
|
5238
|
+
deduplicateFileName: Fa,
|
|
5239
|
+
naturalLanguageJoin: za,
|
|
5240
|
+
trimPrefix: Wa
|
|
5241
|
+
}, Symbol.toStringTag, { value: "Module" })), Ga = new Error("request for lock canceled");
|
|
5242
|
+
var Ha = function(e, t, n, r) {
|
|
5224
5243
|
function s(i) {
|
|
5225
5244
|
return i instanceof n ? i : new n(function(o) {
|
|
5226
5245
|
o(i);
|
|
@@ -5247,8 +5266,8 @@ var Wa = function(e, t, n, r) {
|
|
|
5247
5266
|
l((r = r.apply(e, t || [])).next());
|
|
5248
5267
|
});
|
|
5249
5268
|
};
|
|
5250
|
-
class
|
|
5251
|
-
constructor(t, n =
|
|
5269
|
+
class Da {
|
|
5270
|
+
constructor(t, n = Ga) {
|
|
5252
5271
|
this._value = t, this._cancelError = n, this._queue = [], this._weightedWaiters = [];
|
|
5253
5272
|
}
|
|
5254
5273
|
acquire(t = 1, n = 0) {
|
|
@@ -5260,7 +5279,7 @@ class Ya {
|
|
|
5260
5279
|
});
|
|
5261
5280
|
}
|
|
5262
5281
|
runExclusive(t) {
|
|
5263
|
-
return
|
|
5282
|
+
return Ha(this, arguments, void 0, function* (n, r = 1, s = 0) {
|
|
5264
5283
|
const [i, o] = yield this.acquire(r, s);
|
|
5265
5284
|
try {
|
|
5266
5285
|
return yield n(i);
|
|
@@ -5273,7 +5292,7 @@ class Ya {
|
|
|
5273
5292
|
if (t <= 0)
|
|
5274
5293
|
throw new Error(`invalid weight ${t}: must be positive`);
|
|
5275
5294
|
return this._couldLockImmediately(t, n) ? Promise.resolve() : new Promise((r) => {
|
|
5276
|
-
this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []),
|
|
5295
|
+
this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []), Ja(this._weightedWaiters[t - 1], { resolve: r, priority: n });
|
|
5277
5296
|
});
|
|
5278
5297
|
}
|
|
5279
5298
|
isLocked() {
|
|
@@ -5328,7 +5347,7 @@ class Ya {
|
|
|
5328
5347
|
return (this._queue.length === 0 || this._queue[0].priority < n) && t <= this._value;
|
|
5329
5348
|
}
|
|
5330
5349
|
}
|
|
5331
|
-
function
|
|
5350
|
+
function Ja(e, t) {
|
|
5332
5351
|
const n = kr(e, (r) => t.priority <= r.priority);
|
|
5333
5352
|
e.splice(n + 1, 0, t);
|
|
5334
5353
|
}
|
|
@@ -5338,7 +5357,7 @@ function kr(e, t) {
|
|
|
5338
5357
|
return n;
|
|
5339
5358
|
return -1;
|
|
5340
5359
|
}
|
|
5341
|
-
var
|
|
5360
|
+
var Xa = function(e, t, n, r) {
|
|
5342
5361
|
function s(i) {
|
|
5343
5362
|
return i instanceof n ? i : new n(function(o) {
|
|
5344
5363
|
o(i);
|
|
@@ -5365,12 +5384,12 @@ var Ga = function(e, t, n, r) {
|
|
|
5365
5384
|
l((r = r.apply(e, t || [])).next());
|
|
5366
5385
|
});
|
|
5367
5386
|
};
|
|
5368
|
-
class
|
|
5387
|
+
class Ka {
|
|
5369
5388
|
constructor(t) {
|
|
5370
|
-
this._semaphore = new
|
|
5389
|
+
this._semaphore = new Da(1, t);
|
|
5371
5390
|
}
|
|
5372
5391
|
acquire() {
|
|
5373
|
-
return
|
|
5392
|
+
return Xa(this, arguments, void 0, function* (t = 0) {
|
|
5374
5393
|
const [, n] = yield this._semaphore.acquire(1, t);
|
|
5375
5394
|
return n;
|
|
5376
5395
|
});
|
|
@@ -5391,24 +5410,24 @@ class Ha {
|
|
|
5391
5410
|
return this._semaphore.cancel();
|
|
5392
5411
|
}
|
|
5393
5412
|
}
|
|
5394
|
-
class Zr extends
|
|
5413
|
+
class Zr extends Ka {
|
|
5395
5414
|
constructor(t) {
|
|
5396
5415
|
super(), Object.assign(this, t);
|
|
5397
5416
|
}
|
|
5398
5417
|
}
|
|
5399
|
-
const
|
|
5418
|
+
const Qa = (e) => new Zr(e), cl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5400
5419
|
__proto__: null,
|
|
5401
5420
|
mutex: Zr,
|
|
5402
|
-
newMutex:
|
|
5403
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5421
|
+
newMutex: Qa
|
|
5422
|
+
}, Symbol.toStringTag, { value: "Module" })), tu = (e) => JSON.stringify(e, (t, n) => typeof n == "bigint" ? n.toString() : n), eu = async (e, t = 200, n = 20) => {
|
|
5404
5423
|
const r = Date.now();
|
|
5405
5424
|
for (; Date.now() - r < t; )
|
|
5406
5425
|
await e(), await new Promise((s) => setTimeout(s, n));
|
|
5407
|
-
},
|
|
5426
|
+
}, al = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5408
5427
|
__proto__: null,
|
|
5409
|
-
expectAlways:
|
|
5410
|
-
toString:
|
|
5411
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5428
|
+
expectAlways: eu,
|
|
5429
|
+
toString: tu
|
|
5430
|
+
}, Symbol.toStringTag, { value: "Module" })), nu = (...e) => e.map(_r).join(""), _r = (e) => (e.endsWith("/") || (e += "/"), e.startsWith("/") && (e = e.slice(1)), e), ru = (e) => e.endsWith("/") ? e.slice(0, -1) : e, ul = (e, t = "") => e === null ? "" : `?${Object.entries(e).filter(([, n]) => n == null ? !1 : Array.isArray(n) ? n.length > 0 : !0).map(([n, r]) => `${t}${n}=${r}`).join("&")}`;
|
|
5412
5431
|
class _t {
|
|
5413
5432
|
protocol;
|
|
5414
5433
|
host;
|
|
@@ -5444,12 +5463,12 @@ class _t {
|
|
|
5444
5463
|
child(t) {
|
|
5445
5464
|
return new _t({
|
|
5446
5465
|
...this,
|
|
5447
|
-
pathPrefix:
|
|
5466
|
+
pathPrefix: nu(this.path, t)
|
|
5448
5467
|
});
|
|
5449
5468
|
}
|
|
5450
5469
|
/** @returns a string representation of the url */
|
|
5451
5470
|
toString() {
|
|
5452
|
-
return
|
|
5471
|
+
return ru(
|
|
5453
5472
|
`${this.protocol}://${this.host}:${this.port}/${this.path}`
|
|
5454
5473
|
);
|
|
5455
5474
|
}
|
|
@@ -5466,12 +5485,12 @@ class hn {
|
|
|
5466
5485
|
n == null ? console.warn(`No handler for ${t.type}`) : n(t.payload);
|
|
5467
5486
|
}
|
|
5468
5487
|
route(t) {
|
|
5469
|
-
const n =
|
|
5488
|
+
const n = su(t, this.sender), r = new iu(n);
|
|
5470
5489
|
return this.handlers.set(t, r), r;
|
|
5471
5490
|
}
|
|
5472
5491
|
}
|
|
5473
|
-
const
|
|
5474
|
-
class
|
|
5492
|
+
const su = (e, t) => (n, r) => t({ type: e, payload: n }, r);
|
|
5493
|
+
class iu {
|
|
5475
5494
|
_send;
|
|
5476
5495
|
handler;
|
|
5477
5496
|
constructor(t) {
|
|
@@ -5484,7 +5503,7 @@ class eu {
|
|
|
5484
5503
|
this.handler = t;
|
|
5485
5504
|
}
|
|
5486
5505
|
}
|
|
5487
|
-
const
|
|
5506
|
+
const ll = () => {
|
|
5488
5507
|
let e, t;
|
|
5489
5508
|
const n = (s) => {
|
|
5490
5509
|
t.handle({ data: s });
|
|
@@ -5492,30 +5511,30 @@ const il = () => {
|
|
|
5492
5511
|
e.handle({ data: s });
|
|
5493
5512
|
};
|
|
5494
5513
|
return e = new hn(n), t = new hn(r), [e, t];
|
|
5495
|
-
},
|
|
5514
|
+
}, ou = (e) => e.nullable().transform((t) => t === null ? void 0 : t).optional(), cu = c.int().min(0).max(Cn), au = (e) => L.array(e).or(e.transform((t) => [t])), uu = (e) => e._zod.def.output, qr = (e) => Mr(e, (t, n, r) => {
|
|
5496
5515
|
const s = n === r.length - 1, i = !isNaN(parseInt(t)), o = !isNaN(parseInt(r[n + 1]));
|
|
5497
5516
|
return i && (t = "element"), s || o ? t : [t, "shape"];
|
|
5498
5517
|
}), dn = (e, t) => {
|
|
5499
5518
|
if (e == null) return null;
|
|
5500
5519
|
const n = e[t];
|
|
5501
5520
|
return n == null && typeof e == "object" && "sourceType" in e ? e.sourceType()[t] : n;
|
|
5502
|
-
},
|
|
5521
|
+
}, lu = ((e, t, n) => t === "" ? e : Ke(
|
|
5503
5522
|
dn(e, "shape"),
|
|
5504
5523
|
qr(t),
|
|
5505
5524
|
{ ...n, getter: dn }
|
|
5506
|
-
)),
|
|
5525
|
+
)), fl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5507
5526
|
__proto__: null,
|
|
5508
|
-
functionOutput:
|
|
5509
|
-
getFieldSchema:
|
|
5527
|
+
functionOutput: uu,
|
|
5528
|
+
getFieldSchema: lu,
|
|
5510
5529
|
getFieldSchemaPath: qr,
|
|
5511
|
-
nullToUndefined:
|
|
5512
|
-
toArray:
|
|
5513
|
-
uint12:
|
|
5530
|
+
nullToUndefined: ou,
|
|
5531
|
+
toArray: au,
|
|
5532
|
+
uint12: cu
|
|
5514
5533
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5515
5534
|
export {
|
|
5516
5535
|
f as DataType,
|
|
5517
|
-
|
|
5518
|
-
|
|
5536
|
+
b as Density,
|
|
5537
|
+
Bu as MultiSeries,
|
|
5519
5538
|
T as Rate,
|
|
5520
5539
|
hn as RoutedWorker,
|
|
5521
5540
|
q as Series,
|
|
@@ -5523,62 +5542,63 @@ export {
|
|
|
5523
5542
|
A as TimeRange,
|
|
5524
5543
|
g as TimeSpan,
|
|
5525
5544
|
d as TimeStamp,
|
|
5526
|
-
|
|
5545
|
+
iu as TypedWorker,
|
|
5527
5546
|
_t as URL,
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5547
|
+
hu as array,
|
|
5548
|
+
yu as binary,
|
|
5549
|
+
xu as bounds,
|
|
5550
|
+
Au as box,
|
|
5551
|
+
Pu as breaker,
|
|
5552
|
+
ul as buildQueryString,
|
|
5553
|
+
du as caseconv,
|
|
5554
|
+
Lu as change,
|
|
5536
5555
|
Oo as clamp,
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5556
|
+
ku as color,
|
|
5557
|
+
bu as compare,
|
|
5558
|
+
Zu as control,
|
|
5540
5559
|
Ro as convertDataType,
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5560
|
+
ll as createMockWorkers,
|
|
5561
|
+
_u as csv,
|
|
5562
|
+
qu as debounce,
|
|
5563
|
+
Yu as deep,
|
|
5564
|
+
zu as destructor,
|
|
5565
|
+
Eu as dimensions,
|
|
5566
|
+
Nu as direction,
|
|
5567
|
+
Vu as errors,
|
|
5568
|
+
wu as id,
|
|
5569
|
+
Ou as instance,
|
|
5551
5570
|
Do as isCrudeSeries,
|
|
5552
5571
|
cr as isTelemValue,
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5572
|
+
Wu as json,
|
|
5573
|
+
Gu as kv,
|
|
5574
|
+
Hu as label,
|
|
5575
|
+
Du as link,
|
|
5576
|
+
vu as location,
|
|
5577
|
+
Ju as map,
|
|
5578
|
+
Iu as math,
|
|
5579
|
+
Xu as migrate,
|
|
5580
|
+
gu as narrow,
|
|
5581
|
+
Ku as notation,
|
|
5582
|
+
Uu as numericTimeRangeZ,
|
|
5583
|
+
Qu as observe,
|
|
5584
|
+
tl as optional,
|
|
5585
|
+
mu as primitive,
|
|
5586
|
+
el as record,
|
|
5587
|
+
nl as runtime,
|
|
5588
|
+
Su as scale,
|
|
5589
|
+
rl as scheduler,
|
|
5590
|
+
sl as shallow,
|
|
5591
|
+
Ru as sleep,
|
|
5592
|
+
Tu as spatial,
|
|
5593
|
+
il as status,
|
|
5594
|
+
$u as sticky,
|
|
5595
|
+
ol as strings,
|
|
5596
|
+
cl as sync,
|
|
5597
|
+
al as testutil,
|
|
5598
|
+
Fu as throttle,
|
|
5599
|
+
ju as typedArrayZ,
|
|
5600
|
+
pu as unique,
|
|
5601
|
+
Cu as uuid,
|
|
5602
|
+
Mu as xy,
|
|
5603
|
+
fl as zod
|
|
5584
5604
|
};
|