@synnaxlabs/x 0.49.0 → 0.49.2
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 +5 -5
- package/dist/src/csv/csv.d.ts +5 -7
- package/dist/src/csv/csv.d.ts.map +1 -1
- package/dist/x.cjs +5 -5
- package/dist/x.js +738 -722
- package/package.json +3 -3
- package/src/csv/csv.spec.ts +59 -11
- package/src/csv/csv.ts +27 -11
- package/tsconfig.tsbuildinfo +1 -1
package/dist/x.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import b, { z as c } from "zod";
|
|
2
|
-
const
|
|
2
|
+
const dn = (e) => b.union([
|
|
3
3
|
b.union([b.null(), b.undefined()]).transform(() => []),
|
|
4
4
|
e.array()
|
|
5
|
-
]), zr = (e) => Array.isArray(e) ? e : e == null ? [] : [e],
|
|
5
|
+
]), zr = (e) => Array.isArray(e) ? e : e == null ? [] : [e], gn = (e, t) => {
|
|
6
6
|
if (Array.isArray(t))
|
|
7
|
-
return t.reduce((s, i) =>
|
|
7
|
+
return t.reduce((s, i) => gn(s, i), e ?? []);
|
|
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
|
+
}), yn = (e, t) => {
|
|
15
15
|
if (Array.isArray(t))
|
|
16
|
-
return t.reduce((s, i) =>
|
|
16
|
+
return t.reduce((s, i) => yn(s, i), e ?? []);
|
|
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
|
+
}, Gr = ((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
|
+
}), fu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
24
24
|
__proto__: null,
|
|
25
|
-
nullableZ:
|
|
26
|
-
remove:
|
|
27
|
-
removeKeyed:
|
|
25
|
+
nullableZ: dn,
|
|
26
|
+
remove: Yr,
|
|
27
|
+
removeKeyed: Gr,
|
|
28
28
|
toArray: zr,
|
|
29
|
-
upsert:
|
|
30
|
-
upsertKeyed:
|
|
31
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
29
|
+
upsert: gn,
|
|
30
|
+
upsertKeyed: yn
|
|
31
|
+
}, Symbol.toStringTag, { value: "Module" })), Hr = (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
|
+
}, zt = (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));
|
|
38
38
|
if (!ee(n)) return n;
|
|
39
|
-
r =
|
|
39
|
+
r = Xr(r);
|
|
40
40
|
const s = {}, i = n;
|
|
41
41
|
return "toJSON" in i && typeof i.toJSON == "function" ? t(i.toJSON(), r) : (Object.keys(i).forEach((o) => {
|
|
42
42
|
let a = i[o];
|
|
@@ -48,20 +48,20 @@ const hn = (e) => b.union([
|
|
|
48
48
|
}), s);
|
|
49
49
|
};
|
|
50
50
|
return t;
|
|
51
|
-
}, Ae =
|
|
51
|
+
}, Ae = zt(Hr), Dr = (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
|
-
),
|
|
58
|
+
), mn = zt(Dr), pn = (e) => e.length === 0 ? e : e[0].toUpperCase() + e.slice(1), Jr = [Number, String, Uint8Array], oe = {
|
|
59
59
|
recursive: !0,
|
|
60
60
|
recursiveInArray: !0
|
|
61
|
-
},
|
|
61
|
+
}, Xr = (e = oe) => (e.recursive == null ? e = oe : e.recursiveInArray ??= !1, e), nn = (e) => e != null && Array.isArray(e), ee = (e) => e != null && typeof e == "object" && !Array.isArray(e), rn = (e) => Jr.some((t) => e instanceof t), Kr = (e) => e.replace(/[\s_]+/g, "-").replace(
|
|
62
62
|
/([a-z0-9])([A-Z])/g,
|
|
63
63
|
(t, n, r) => `${n}-${r.toLowerCase()}`
|
|
64
|
-
).toLowerCase(),
|
|
64
|
+
).toLowerCase(), Qr = zt(Kr), ts = (e) => {
|
|
65
65
|
if (e.length === 0) return e;
|
|
66
66
|
let t = e.replace(/[_-]/g, " ");
|
|
67
67
|
return t = t.replace(
|
|
@@ -71,18 +71,18 @@ const hn = (e) => b.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
|
-
},
|
|
74
|
+
}, es = zt(ts), hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
75
75
|
__proto__: null,
|
|
76
|
-
camelToSnake:
|
|
77
|
-
capitalize:
|
|
76
|
+
camelToSnake: mn,
|
|
77
|
+
capitalize: pn,
|
|
78
78
|
snakeToCamel: Ae,
|
|
79
|
-
toKebab:
|
|
80
|
-
toProperNoun:
|
|
81
|
-
}, Symbol.toStringTag, { value: "Module" })), pt = (e) => e != null && typeof e == "object" && !Array.isArray(e),
|
|
79
|
+
toKebab: Qr,
|
|
80
|
+
toProperNoun: es
|
|
81
|
+
}, Symbol.toStringTag, { value: "Module" })), pt = (e) => e != null && typeof e == "object" && !Array.isArray(e), du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82
82
|
__proto__: null,
|
|
83
83
|
isObject: pt
|
|
84
84
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
85
|
-
class
|
|
85
|
+
class bn {
|
|
86
86
|
contentType = "application/json";
|
|
87
87
|
decoder;
|
|
88
88
|
encoder;
|
|
@@ -100,11 +100,11 @@ class pn {
|
|
|
100
100
|
return n != null ? n.parse(s) : s;
|
|
101
101
|
}
|
|
102
102
|
encodeString(t) {
|
|
103
|
-
const n =
|
|
103
|
+
const n = mn(t);
|
|
104
104
|
return JSON.stringify(n, (r, s) => ArrayBuffer.isView(s) ? Array.from(s) : typeof s == "bigint" ? s.toString() : s);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
class
|
|
107
|
+
class wn {
|
|
108
108
|
contentType = "text/csv";
|
|
109
109
|
encode(t) {
|
|
110
110
|
const n = this.encodeString(t);
|
|
@@ -146,7 +146,7 @@ class bn {
|
|
|
146
146
|
return isNaN(n) ? t.startsWith('"') && t.endsWith('"') ? t.slice(1, -1) : t : n;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
class
|
|
149
|
+
class On {
|
|
150
150
|
contentType = "text/plain";
|
|
151
151
|
encode(t) {
|
|
152
152
|
if (typeof t != "string")
|
|
@@ -158,15 +158,15 @@ class wn {
|
|
|
158
158
|
return n != null ? n.parse(r) : r;
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
const at = new
|
|
161
|
+
const at = new bn(), ns = new wn(), rs = new On(), ss = [at], gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
162
162
|
__proto__: null,
|
|
163
|
-
CSVCodec:
|
|
164
|
-
CSV_CODEC:
|
|
165
|
-
ENCODERS:
|
|
166
|
-
JSONCodec:
|
|
163
|
+
CSVCodec: wn,
|
|
164
|
+
CSV_CODEC: ns,
|
|
165
|
+
ENCODERS: ss,
|
|
166
|
+
JSONCodec: bn,
|
|
167
167
|
JSON_CODEC: at,
|
|
168
|
-
TEXT_CODEC:
|
|
169
|
-
TextCodec:
|
|
168
|
+
TEXT_CODEC: rs,
|
|
169
|
+
TextCodec: On
|
|
170
170
|
}, Symbol.toStringTag, { value: "Module" })), B = (e) => e != null && typeof e == "object" && "value" in e;
|
|
171
171
|
class rt {
|
|
172
172
|
/** The underlying primitive value */
|
|
@@ -188,7 +188,7 @@ class rt {
|
|
|
188
188
|
return this.value.toString();
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
const Ee = (e) => e != null && typeof e == "object" && "toString" in e,
|
|
191
|
+
const Ee = (e) => e != null && typeof e == "object" && "toString" in e, xn = (e) => {
|
|
192
192
|
if (Ee(e)) return e?.toString().length === 0;
|
|
193
193
|
switch (typeof e) {
|
|
194
194
|
case "string":
|
|
@@ -206,14 +206,14 @@ const Ee = (e) => e != null && typeof e == "object" && "toString" in e, On = (e)
|
|
|
206
206
|
default:
|
|
207
207
|
return !1;
|
|
208
208
|
}
|
|
209
|
-
},
|
|
209
|
+
}, is = (e) => !xn(e), yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
210
210
|
__proto__: null,
|
|
211
211
|
ValueExtension: rt,
|
|
212
212
|
isCrudeValueExtension: B,
|
|
213
|
-
isNonZero:
|
|
213
|
+
isNonZero: is,
|
|
214
214
|
isStringer: Ee,
|
|
215
|
-
isZero:
|
|
216
|
-
}, Symbol.toStringTag, { value: "Module" })), ce = (e) => [...new Set(e)],
|
|
215
|
+
isZero: xn
|
|
216
|
+
}, Symbol.toStringTag, { value: "Module" })), ce = (e) => [...new Set(e)], os = (e, t, n = !0) => {
|
|
217
217
|
const r = /* @__PURE__ */ new Map();
|
|
218
218
|
return e.forEach((s) => {
|
|
219
219
|
const i = t(s);
|
|
@@ -223,9 +223,9 @@ const Ee = (e) => e != null && typeof e == "object" && "toString" in e, On = (e)
|
|
|
223
223
|
}
|
|
224
224
|
r.set(i, s);
|
|
225
225
|
}), Array.from(r.values());
|
|
226
|
-
},
|
|
226
|
+
}, mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
227
227
|
__proto__: null,
|
|
228
|
-
by:
|
|
228
|
+
by: os,
|
|
229
229
|
unique: ce
|
|
230
230
|
}, Symbol.toStringTag, { value: "Module" })), At = (e, t = !1) => {
|
|
231
231
|
const n = Ee(e) ? "stringer" : typeof e;
|
|
@@ -252,19 +252,19 @@ const Ee = (e) => e != null && typeof e == "object" && "toString" in e, On = (e)
|
|
|
252
252
|
default:
|
|
253
253
|
return console.warn(`sortFunc: unknown type ${n}`), () => -1;
|
|
254
254
|
}
|
|
255
|
-
return t ?
|
|
256
|
-
},
|
|
255
|
+
return t ? Nn(r) : r;
|
|
256
|
+
}, cs = (e, t, n) => {
|
|
257
257
|
const r = At(t[e], n);
|
|
258
258
|
return (s, i) => r(s[e], i[e]);
|
|
259
|
-
},
|
|
259
|
+
}, as = (e, t) => e.length !== t.length ? e.length - t.length : e.every((n, r) => n === t[r]) ? 0 : -1, In = (e, t) => {
|
|
260
260
|
if (e.length !== t.length) return e.length - t.length;
|
|
261
261
|
if (e.length === 0) return 0;
|
|
262
262
|
const n = At(e[0]), r = [...e].sort(n), s = [...t].sort(n);
|
|
263
263
|
return r.every((i, o) => i === s[o]) ? 0 : -1;
|
|
264
|
-
},
|
|
264
|
+
}, us = (e, t) => {
|
|
265
265
|
const n = ce(e), r = ce(t);
|
|
266
|
-
return
|
|
267
|
-
},
|
|
266
|
+
return In(n, r);
|
|
267
|
+
}, ls = (e, t) => e === t ? 0 : e === "first" && t === "last" ? 1 : -1, Nn = (e) => (t, n) => e(n, t), st = 0, z = -1, Y = 1, vn = (e) => e < st, Mn = (e) => e > st, fs = (e) => e >= st, An = (e) => e === st, hs = (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++) {
|
|
@@ -278,7 +278,7 @@ const Ee = (e) => e != null && typeof e == "object" && "toString" in e, On = (e)
|
|
|
278
278
|
} else return isNaN(Number(o)) ? -1 : 1;
|
|
279
279
|
}
|
|
280
280
|
return r.length - s.length;
|
|
281
|
-
},
|
|
281
|
+
}, En = (e, t, n) => {
|
|
282
282
|
let r = 0, s = e.length;
|
|
283
283
|
const i = n ?? At(t);
|
|
284
284
|
for (; r < s; ) {
|
|
@@ -287,43 +287,43 @@ const Ee = (e) => e != null && typeof e == "object" && "toString" in e, On = (e)
|
|
|
287
287
|
a < 0 ? r = o + 1 : s = o;
|
|
288
288
|
}
|
|
289
289
|
return r;
|
|
290
|
-
},
|
|
291
|
-
const r =
|
|
290
|
+
}, ds = (e, t, n) => {
|
|
291
|
+
const r = En(e, t, n);
|
|
292
292
|
e.splice(r, 0, t);
|
|
293
|
-
},
|
|
293
|
+
}, pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
294
294
|
__proto__: null,
|
|
295
295
|
EQUAL: st,
|
|
296
296
|
GREATER_THAN: Y,
|
|
297
|
-
LESS_THAN:
|
|
298
|
-
insert:
|
|
299
|
-
isEqualTo:
|
|
300
|
-
isGreaterThan:
|
|
301
|
-
isGreaterThanEqual:
|
|
302
|
-
isLessThan:
|
|
297
|
+
LESS_THAN: z,
|
|
298
|
+
insert: ds,
|
|
299
|
+
isEqualTo: An,
|
|
300
|
+
isGreaterThan: Mn,
|
|
301
|
+
isGreaterThanEqual: fs,
|
|
302
|
+
isLessThan: vn,
|
|
303
303
|
newF: At,
|
|
304
|
-
newFieldF:
|
|
305
|
-
order:
|
|
306
|
-
primitiveArrays:
|
|
307
|
-
reverseF:
|
|
308
|
-
search:
|
|
309
|
-
stringsWithNumbers:
|
|
310
|
-
uniqueUnorderedPrimitiveArrays:
|
|
311
|
-
unorderedPrimitiveArrays:
|
|
304
|
+
newFieldF: cs,
|
|
305
|
+
order: ls,
|
|
306
|
+
primitiveArrays: as,
|
|
307
|
+
reverseF: Nn,
|
|
308
|
+
search: En,
|
|
309
|
+
stringsWithNumbers: hs,
|
|
310
|
+
uniqueUnorderedPrimitiveArrays: us,
|
|
311
|
+
unorderedPrimitiveArrays: In
|
|
312
312
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
313
|
-
let
|
|
313
|
+
let Sn = (e, t = 21) => (n = t) => {
|
|
314
314
|
let r = "", s = n | 0;
|
|
315
315
|
for (; s--; )
|
|
316
316
|
r += e[Math.random() * e.length | 0];
|
|
317
317
|
return r;
|
|
318
318
|
};
|
|
319
|
-
const
|
|
319
|
+
const Tn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", gs = `0123456789${Tn}`, $n = 11, ys = Sn(Tn, 1), ms = Sn(gs, $n - 1), Se = () => `${ys()}${ms()}`, bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
320
320
|
__proto__: null,
|
|
321
|
-
LENGTH:
|
|
321
|
+
LENGTH: $n,
|
|
322
322
|
create: Se
|
|
323
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
323
|
+
}, Symbol.toStringTag, { value: "Module" })), Un = (e, t) => (n) => n instanceof t || typeof n == "object" && n !== null && "discriminator" in n && n.discriminator === e, wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
324
324
|
__proto__: null,
|
|
325
|
-
createMatcher:
|
|
326
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
325
|
+
createMatcher: Un
|
|
326
|
+
}, Symbol.toStringTag, { value: "Module" })), ps = 2 ** 8 - 1, jn = 2 ** 12 - 1, bs = 2 ** 16 - 1, ws = 2 ** 32 - 1, Os = 2n ** 64n - 1n, xs = 2 ** 64 - 1, Is = -128, Ns = 2 ** 7 - 1, vs = -32768, Ms = 2 ** 15 - 1, As = -2147483648, Es = 2 ** 31 - 1, Ss = -(2n ** 63n), _t = 2n ** 63n - 1n, Ts = -9223372036854776e3, Cn = 2 ** 63 - 1, lt = (e) => (t, n) => {
|
|
327
327
|
if (typeof t == "bigint") {
|
|
328
328
|
if (qt(n))
|
|
329
329
|
return e(t, BigInt(n));
|
|
@@ -331,16 +331,16 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
331
331
|
return typeof r == "number" ? BigInt(Math.round(r)) : r;
|
|
332
332
|
}
|
|
333
333
|
return e(Number(t), Number(n));
|
|
334
|
-
}, F = lt((e, t) => e - t), G = lt((e, t) => e + t),
|
|
334
|
+
}, F = lt((e, t) => e - t), G = lt((e, t) => e + t), $s = (e, t, n = 1e-4) => Math.abs(e - t) < n, ae = (e, t) => {
|
|
335
335
|
const n = typeof e == "bigint", r = typeof t == "bigint";
|
|
336
336
|
return n && r ? e === t : n && qt(t) ? e === BigInt(t) : r && qt(e) ? t === BigInt(e) : e === t;
|
|
337
|
-
},
|
|
337
|
+
}, Us = (e) => {
|
|
338
338
|
const t = 10 ** Math.floor(Math.log10(e));
|
|
339
339
|
return Math.round(e / t) * t;
|
|
340
|
-
},
|
|
340
|
+
}, Bn = lt((e, t) => e <= t ? e : t), qt = (e) => typeof e == "bigint" ? !0 : Number.isInteger(e), js = lt((e, t) => e >= t ? e : t), Rn = (e) => typeof e == "bigint" ? e < 0n ? -e : e : e < 0 ? -e : e, L = lt((e, t) => e * t), Et = lt((e, t) => e / t), Pn = c.tuple([c.number(), c.number()]), Te = c.object({ width: c.number(), height: c.number() }), Cs = c.object({
|
|
341
341
|
signedWidth: c.number(),
|
|
342
342
|
signedHeight: c.number()
|
|
343
|
-
}),
|
|
343
|
+
}), Ln = ["start", "center", "end"], ut = c.object({ x: c.number(), y: c.number() }), kn = c.object({ clientX: c.number(), clientY: c.number() }), Yt = ["x", "y"], $e = c.enum(Yt), Ue = ["top", "right", "bottom", "left"], Bs = c.enum(Ue), Gt = ["left", "right"], je = c.enum(Gt), Ht = ["top", "bottom"], Ce = c.enum(Ht), Be = ["center"], ue = c.enum(Be), Rs = [...Ue, ...Be], Re = c.enum(Rs), Ps = c.enum(Ln), Zn = ["first", "last"], Ls = c.enum(Zn), ks = c.object({ lower: c.number(), upper: c.number() }), Zs = c.enum([...$e.options, ...Re.options]), _s = c.union([$e, Re, 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);
|
|
@@ -349,13 +349,13 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
349
349
|
[r.lower, r.upper] = e;
|
|
350
350
|
} else
|
|
351
351
|
r.lower = e.lower, r.upper = e.upper;
|
|
352
|
-
return n?.makeValid ?
|
|
353
|
-
},
|
|
352
|
+
return n?.makeValid ? _n(r) : r;
|
|
353
|
+
}, qs = Object.freeze({ lower: 0, upper: 0 }), Fs = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), Ws = Object.freeze({ lower: 0, upper: 1 }), Vs = Object.freeze({ lower: -1, upper: 1 }), zs = (e, t) => {
|
|
354
354
|
if (e == null && t == null) return !0;
|
|
355
355
|
if (e == null || t == null) return !1;
|
|
356
356
|
const n = w(e), r = w(t);
|
|
357
357
|
return n?.lower === r?.lower && n?.upper === r?.upper;
|
|
358
|
-
},
|
|
358
|
+
}, _n = (e) => e.lower > e.upper ? { lower: e.upper, upper: e.lower } : e, le = (e, t) => {
|
|
359
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) => {
|
|
@@ -364,31 +364,31 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
364
364
|
return t >= n.lower && t < n.upper;
|
|
365
365
|
const r = w(t);
|
|
366
366
|
return r.lower >= n.lower && r.upper <= n.upper;
|
|
367
|
-
},
|
|
367
|
+
}, Ys = (e, t) => {
|
|
368
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
|
}, ft = (e) => {
|
|
371
371
|
const t = w(e);
|
|
372
372
|
return t.upper - t.lower;
|
|
373
|
-
},
|
|
373
|
+
}, Gs = (e) => {
|
|
374
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
|
+
}, Hs = (e) => {
|
|
377
377
|
const t = ft(e);
|
|
378
378
|
return typeof t == "number" ? t === 0 : t === 0n;
|
|
379
|
-
},
|
|
379
|
+
}, Ds = (e) => {
|
|
380
380
|
const t = w(e);
|
|
381
381
|
return typeof t.lower == "bigint" ? !0 : Number.isFinite(t.lower) && Number.isFinite(t.upper);
|
|
382
|
-
},
|
|
382
|
+
}, Js = (e) => {
|
|
383
383
|
const t = w(e);
|
|
384
384
|
return (t.upper + t.lower) / 2;
|
|
385
|
-
},
|
|
385
|
+
}, qn = (e) => ({
|
|
386
386
|
lower: Math.min(...e.map((t) => w(t).lower)),
|
|
387
387
|
upper: Math.max(...e.map((t) => w(t).upper))
|
|
388
|
-
}),
|
|
388
|
+
}), Xs = (e) => ({
|
|
389
389
|
lower: Math.max(...e.map((t) => w(t).lower)),
|
|
390
390
|
upper: Math.min(...e.map((t) => w(t).upper))
|
|
391
|
-
}),
|
|
391
|
+
}), Ks = (e) => {
|
|
392
392
|
const t = w(e), n = typeof t.lower == "bigint";
|
|
393
393
|
return Array.from({ length: Number(ft(e)) }, (r, s) => n ? t.lower + BigInt(s) : t.lower + s);
|
|
394
394
|
}, fe = (e, t) => {
|
|
@@ -401,7 +401,7 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
401
401
|
removeAfter: 0,
|
|
402
402
|
insertInto: 0,
|
|
403
403
|
deleteInBetween: 0
|
|
404
|
-
},
|
|
404
|
+
}, Qs = (e, t) => {
|
|
405
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);
|
|
@@ -421,7 +421,7 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
421
421
|
insertInto: a,
|
|
422
422
|
deleteInBetween: o
|
|
423
423
|
};
|
|
424
|
-
},
|
|
424
|
+
}, Fn = (e, t, n) => {
|
|
425
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;
|
|
@@ -431,7 +431,7 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
431
431
|
const u = r[a];
|
|
432
432
|
let l;
|
|
433
433
|
if (s > 0 ? l = F(u.upper, o) : l = F(o, u.lower), l > 0) {
|
|
434
|
-
const h =
|
|
434
|
+
const h = Bn(Rn(i), l);
|
|
435
435
|
if (o = G(o, s > 0 ? h : -h), i = F(i, s > 0 ? h : -h), ae(i, 0)) return o;
|
|
436
436
|
continue;
|
|
437
437
|
}
|
|
@@ -448,7 +448,7 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
return o;
|
|
451
|
-
},
|
|
451
|
+
}, Wn = (e, t, n) => {
|
|
452
452
|
const r = e.map((o) => w(o));
|
|
453
453
|
if (t === n) return typeof t == "bigint" ? 0n : 0;
|
|
454
454
|
const s = t < n ? w([t, n]) : w([n, t]);
|
|
@@ -461,40 +461,40 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
return i;
|
|
464
|
-
},
|
|
464
|
+
}, Ou = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
465
465
|
__proto__: null,
|
|
466
|
-
CLIP:
|
|
467
|
-
DECIMAL:
|
|
468
|
-
INFINITE:
|
|
469
|
-
ZERO:
|
|
470
|
-
bounds:
|
|
471
|
-
buildInsertionPlan:
|
|
466
|
+
CLIP: Vs,
|
|
467
|
+
DECIMAL: Ws,
|
|
468
|
+
INFINITE: Fs,
|
|
469
|
+
ZERO: qs,
|
|
470
|
+
bounds: ks,
|
|
471
|
+
buildInsertionPlan: Qs,
|
|
472
472
|
clamp: le,
|
|
473
473
|
construct: w,
|
|
474
474
|
contains: k,
|
|
475
|
-
distance:
|
|
475
|
+
distance: Wn,
|
|
476
476
|
equals: zs,
|
|
477
477
|
findInsertPosition: fe,
|
|
478
|
-
isFinite:
|
|
479
|
-
isZero:
|
|
480
|
-
linspace:
|
|
481
|
-
makeValid:
|
|
482
|
-
max:
|
|
483
|
-
mean:
|
|
484
|
-
min:
|
|
485
|
-
overlapsWith:
|
|
478
|
+
isFinite: Ds,
|
|
479
|
+
isZero: Gs,
|
|
480
|
+
linspace: Ks,
|
|
481
|
+
makeValid: _n,
|
|
482
|
+
max: qn,
|
|
483
|
+
mean: Js,
|
|
484
|
+
min: Xs,
|
|
485
|
+
overlapsWith: Ys,
|
|
486
486
|
span: ft,
|
|
487
|
-
spanIsZero:
|
|
488
|
-
traverse:
|
|
489
|
-
}, Symbol.toStringTag, { value: "Module" })), he = 2, de = 3,
|
|
487
|
+
spanIsZero: Hs,
|
|
488
|
+
traverse: Fn
|
|
489
|
+
}, Symbol.toStringTag, { value: "Module" })), he = 2, de = 3, Vn = 2, ti = (e, t) => {
|
|
490
490
|
if (Number.isNaN(e) || !Number.isFinite(e)) return e;
|
|
491
491
|
const n = ft(t);
|
|
492
492
|
if (n == 0) return e;
|
|
493
493
|
let r;
|
|
494
|
-
n >= 1e3 ? r = he : n >= 1 ? r = de : r = Math.ceil(-Math.log10(n)) +
|
|
494
|
+
n >= 1e3 ? r = he : n >= 1 ? r = de : r = Math.ceil(-Math.log10(n)) + Vn;
|
|
495
495
|
const s = 10 ** r;
|
|
496
496
|
return Math.round(e * s) / s;
|
|
497
|
-
},
|
|
497
|
+
}, ei = 5, ni = 1e-10, ri = (e, t) => {
|
|
498
498
|
if (Number.isNaN(e) || !Number.isFinite(e)) return e;
|
|
499
499
|
const n = Math.abs(e);
|
|
500
500
|
if (n === 0) return 0;
|
|
@@ -502,11 +502,11 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
502
502
|
if (t != null) {
|
|
503
503
|
s = ft(t);
|
|
504
504
|
const u = s / n;
|
|
505
|
-
r = s > 0 && u >
|
|
505
|
+
r = s > 0 && u > ni;
|
|
506
506
|
}
|
|
507
507
|
if (r) {
|
|
508
508
|
let u;
|
|
509
|
-
s >= 1e3 ? u = he : s >= 1 ? u = de : u = Math.ceil(-Math.log10(s)) +
|
|
509
|
+
s >= 1e3 ? u = he : s >= 1 ? u = de : u = Math.ceil(-Math.log10(s)) + Vn;
|
|
510
510
|
const l = 10 ** u;
|
|
511
511
|
return Math.round(e * l) / l;
|
|
512
512
|
}
|
|
@@ -518,70 +518,70 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
518
518
|
const u = 10 ** de;
|
|
519
519
|
return Math.round(e * u) / u;
|
|
520
520
|
}
|
|
521
|
-
const i = Math.floor(Math.log10(n)), a = 10 ** (
|
|
521
|
+
const i = Math.floor(Math.log10(n)), a = 10 ** (ei - i - 1);
|
|
522
522
|
return Math.round(e * a) / a;
|
|
523
|
-
},
|
|
523
|
+
}, xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
524
524
|
__proto__: null,
|
|
525
|
-
MAX_INT16:
|
|
526
|
-
MAX_INT32:
|
|
525
|
+
MAX_INT16: Ms,
|
|
526
|
+
MAX_INT32: Es,
|
|
527
527
|
MAX_INT64: _t,
|
|
528
|
-
MAX_INT64_NUMBER:
|
|
529
|
-
MAX_INT8:
|
|
530
|
-
MAX_UINT12:
|
|
531
|
-
MAX_UINT16:
|
|
532
|
-
MAX_UINT32:
|
|
533
|
-
MAX_UINT64:
|
|
534
|
-
MAX_UINT64_NUMBER:
|
|
535
|
-
MAX_UINT8:
|
|
536
|
-
MIN_INT16:
|
|
537
|
-
MIN_INT32:
|
|
538
|
-
MIN_INT64:
|
|
539
|
-
MIN_INT64_NUMBER:
|
|
540
|
-
MIN_INT8:
|
|
541
|
-
abs:
|
|
528
|
+
MAX_INT64_NUMBER: Cn,
|
|
529
|
+
MAX_INT8: Ns,
|
|
530
|
+
MAX_UINT12: jn,
|
|
531
|
+
MAX_UINT16: bs,
|
|
532
|
+
MAX_UINT32: ws,
|
|
533
|
+
MAX_UINT64: Os,
|
|
534
|
+
MAX_UINT64_NUMBER: xs,
|
|
535
|
+
MAX_UINT8: ps,
|
|
536
|
+
MIN_INT16: vs,
|
|
537
|
+
MIN_INT32: As,
|
|
538
|
+
MIN_INT64: Ss,
|
|
539
|
+
MIN_INT64_NUMBER: Ts,
|
|
540
|
+
MIN_INT8: Is,
|
|
541
|
+
abs: Rn,
|
|
542
542
|
add: G,
|
|
543
|
-
closeTo:
|
|
543
|
+
closeTo: $s,
|
|
544
544
|
div: Et,
|
|
545
545
|
equal: ae,
|
|
546
546
|
isInteger: qt,
|
|
547
|
-
max:
|
|
548
|
-
min:
|
|
547
|
+
max: js,
|
|
548
|
+
min: Bn,
|
|
549
549
|
mult: L,
|
|
550
|
-
roundBySpan:
|
|
551
|
-
roundToNearestMagnitude:
|
|
552
|
-
smartRound:
|
|
550
|
+
roundBySpan: ti,
|
|
551
|
+
roundToNearestMagnitude: Us,
|
|
552
|
+
smartRound: ri,
|
|
553
553
|
sub: F
|
|
554
|
-
}, Symbol.toStringTag, { value: "Module" })), zn =
|
|
554
|
+
}, Symbol.toStringTag, { value: "Module" })), zn = Zs, _ = (e) => Yt.includes(e) ? e : Ht.includes(e) ? "y" : "x", si = (e) => _(e) === "x" ? "y" : "x", ii = (e) => _(e) === "x" ? "width" : "height", oi = (e) => _(e) === "x" ? "left" : "top", ci = (e) => zn.safeParse(e).success, ai = (e) => _(e) === "x" ? "signedWidth" : "signedHeight", ui = (e) => e === "center" ? !1 : _(e) === "x", li = (e) => _(e) === "y", Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
555
555
|
__proto__: null,
|
|
556
556
|
DIRECTIONS: Yt,
|
|
557
557
|
construct: _,
|
|
558
558
|
crude: zn,
|
|
559
|
-
dimension:
|
|
559
|
+
dimension: ii,
|
|
560
560
|
direction: $e,
|
|
561
|
-
isDirection:
|
|
562
|
-
isX:
|
|
563
|
-
isY:
|
|
564
|
-
location:
|
|
565
|
-
signedDimension:
|
|
566
|
-
swap:
|
|
567
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
561
|
+
isDirection: ci,
|
|
562
|
+
isX: ui,
|
|
563
|
+
isY: li,
|
|
564
|
+
location: oi,
|
|
565
|
+
signedDimension: ai,
|
|
566
|
+
swap: si
|
|
567
|
+
}, Symbol.toStringTag, { value: "Module" })), fi = je, hi = Ce, di = ue, gi = {
|
|
568
568
|
top: "bottom",
|
|
569
569
|
right: "left",
|
|
570
570
|
bottom: "top",
|
|
571
571
|
left: "right",
|
|
572
572
|
center: "center"
|
|
573
|
-
},
|
|
573
|
+
}, yi = {
|
|
574
574
|
top: { clockwise: "left", counterclockwise: "right" },
|
|
575
575
|
right: { clockwise: "top", counterclockwise: "bottom" },
|
|
576
576
|
bottom: { clockwise: "right", counterclockwise: "left" },
|
|
577
577
|
left: { clockwise: "bottom", counterclockwise: "top" }
|
|
578
|
-
},
|
|
578
|
+
}, mi = _s, et = (e) => e instanceof String || !Yt.includes(e) ? e : e === "x" ? "left" : "top", pi = (e) => gi[et(e)], bi = (e, t) => yi[e][t], It = (e) => {
|
|
579
579
|
const t = et(e);
|
|
580
580
|
return t === "top" || t === "bottom" ? "y" : "x";
|
|
581
|
-
},
|
|
581
|
+
}, wi = c.object({
|
|
582
582
|
x: je.or(ue),
|
|
583
583
|
y: Ce.or(ue)
|
|
584
|
-
}), Pe = c.object({ x: je, y: Ce }), ht = Object.freeze({ x: "left", y: "top" }), Le = Object.freeze({ x: "right", y: "top" }), Dt = Object.freeze({ x: "left", y: "bottom" }), ke = Object.freeze({ x: "right", y: "bottom" }), Ze = Object.freeze({ x: "center", y: "center" }), _e = Object.freeze({ x: "center", y: "top" }), qe = Object.freeze({ x: "center", y: "bottom" }), Fe = Object.freeze({ x: "right", y: "center" }), We = Object.freeze({ x: "left", y: "center" }),
|
|
584
|
+
}), Pe = c.object({ x: je, y: Ce }), ht = Object.freeze({ x: "left", y: "top" }), Le = Object.freeze({ x: "right", y: "top" }), Dt = Object.freeze({ x: "left", y: "bottom" }), ke = Object.freeze({ x: "right", y: "bottom" }), Ze = Object.freeze({ x: "center", y: "center" }), _e = Object.freeze({ x: "center", y: "top" }), qe = Object.freeze({ x: "center", y: "bottom" }), Fe = Object.freeze({ x: "right", y: "center" }), We = Object.freeze({ x: "left", y: "center" }), Oi = Object.freeze([
|
|
585
585
|
We,
|
|
586
586
|
Fe,
|
|
587
587
|
_e,
|
|
@@ -591,13 +591,13 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
591
591
|
Dt,
|
|
592
592
|
ke,
|
|
593
593
|
Ze
|
|
594
|
-
]),
|
|
594
|
+
]), Ve = (e, t) => e.x === t.x && e.y === t.y, xi = (e, t) => {
|
|
595
595
|
if (typeof t == "object") {
|
|
596
596
|
let n = !0;
|
|
597
597
|
return "x" in t && (e.x === t.x || (n = !1)), "y" in t && (e.y === t.y || (n = !1)), n;
|
|
598
598
|
}
|
|
599
599
|
return e.x === t || e.y === t;
|
|
600
|
-
},
|
|
600
|
+
}, Yn = (e) => [e.x, e.y], Rt = (e) => It(et(e)) === "x", Ii = (e) => It(et(e)) === "y", Ni = (e) => `${e.x}${pn(e.y)}`, vi = (e, t) => {
|
|
601
601
|
let n, r;
|
|
602
602
|
if (typeof e == "object" && "x" in e ? (n = e.x, r = e.y) : (n = et(e), r = et(t ?? e)), It(n) === It(r) && n !== "center" && r !== "center")
|
|
603
603
|
throw new Error(
|
|
@@ -605,7 +605,7 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
605
605
|
);
|
|
606
606
|
const s = { ...Ze };
|
|
607
607
|
return n === "center" ? Rt(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r] : r === "center" ? Rt(n) ? [s.x, s.y] = [n, r] : [s.x, s.y] = [r, n] : Rt(n) ? [s.x, s.y] = [n, r] : [s.x, s.y] = [r, n], s;
|
|
608
|
-
},
|
|
608
|
+
}, Nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
609
609
|
__proto__: null,
|
|
610
610
|
BOTTOM_CENTER: qe,
|
|
611
611
|
BOTTOM_LEFT: Dt,
|
|
@@ -618,57 +618,57 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
618
618
|
TOP_CENTER: _e,
|
|
619
619
|
TOP_LEFT: ht,
|
|
620
620
|
TOP_RIGHT: Le,
|
|
621
|
-
XY_LOCATIONS:
|
|
621
|
+
XY_LOCATIONS: Oi,
|
|
622
622
|
X_LOCATIONS: Gt,
|
|
623
623
|
Y_LOCATIONS: Ht,
|
|
624
|
-
center:
|
|
624
|
+
center: di,
|
|
625
625
|
construct: et,
|
|
626
|
-
constructXY:
|
|
626
|
+
constructXY: vi,
|
|
627
627
|
corner: Pe,
|
|
628
|
-
crude:
|
|
628
|
+
crude: mi,
|
|
629
629
|
direction: It,
|
|
630
630
|
isX: Rt,
|
|
631
|
-
isY:
|
|
631
|
+
isY: Ii,
|
|
632
632
|
location: Re,
|
|
633
|
-
outer:
|
|
634
|
-
rotate:
|
|
635
|
-
swap:
|
|
636
|
-
x:
|
|
637
|
-
xy:
|
|
638
|
-
xyCouple:
|
|
639
|
-
xyEquals:
|
|
640
|
-
xyMatches:
|
|
641
|
-
xyToString:
|
|
642
|
-
y:
|
|
633
|
+
outer: Bs,
|
|
634
|
+
rotate: bi,
|
|
635
|
+
swap: pi,
|
|
636
|
+
x: fi,
|
|
637
|
+
xy: wi,
|
|
638
|
+
xyCouple: Yn,
|
|
639
|
+
xyEquals: Ve,
|
|
640
|
+
xyMatches: xi,
|
|
641
|
+
xyToString: Ni,
|
|
642
|
+
y: hi
|
|
643
643
|
}, Symbol.toStringTag, { value: "Module" })), ge = c.union([
|
|
644
644
|
c.number(),
|
|
645
645
|
ut,
|
|
646
|
-
|
|
646
|
+
Pn,
|
|
647
647
|
Te,
|
|
648
|
-
|
|
649
|
-
|
|
648
|
+
Cs,
|
|
649
|
+
kn
|
|
650
650
|
]), I = (e, t) => {
|
|
651
651
|
if (typeof e == "string") {
|
|
652
652
|
if (t === void 0) throw new Error("The y coordinate must be given.");
|
|
653
653
|
return e === "x" ? { x: t, y: 0 } : { x: 0, y: t };
|
|
654
654
|
}
|
|
655
655
|
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 };
|
|
656
|
-
}, W = Object.freeze({ x: 0, y: 0 }),
|
|
656
|
+
}, W = Object.freeze({ x: 0, y: 0 }), Gn = Object.freeze({ x: 1, y: 1 }), Mi = Object.freeze({ x: 1 / 0, y: 1 / 0 }), Ai = Object.freeze({ x: NaN, y: NaN }), Ft = (e, t, n = 0) => {
|
|
657
657
|
const r = I(e), s = I(t);
|
|
658
658
|
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;
|
|
659
|
-
},
|
|
659
|
+
}, Ei = (e) => Ft(e, W), ze = (e, t, n) => {
|
|
660
660
|
const r = I(e), s = I(t, n);
|
|
661
661
|
return { x: r.x * s.x, y: r.y * s.y };
|
|
662
|
-
},
|
|
662
|
+
}, Hn = (e, t) => {
|
|
663
663
|
const n = I(e);
|
|
664
664
|
return { x: n.x + t, y: n.y };
|
|
665
|
-
},
|
|
665
|
+
}, Dn = (e, t) => {
|
|
666
666
|
const n = I(e);
|
|
667
667
|
return { x: n.x, y: n.y + t };
|
|
668
668
|
}, Nt = (e, t, n, ...r) => {
|
|
669
669
|
if (typeof t == "string") {
|
|
670
670
|
if (typeof n != "number") throw new Error("The value must be a number.");
|
|
671
|
-
return t === "x" ?
|
|
671
|
+
return t === "x" ? Hn(e, n) : Dn(e, n);
|
|
672
672
|
}
|
|
673
673
|
if (typeof t == "object" && "x" in t && typeof t.x == "string") {
|
|
674
674
|
const s = I(n), i = I(e);
|
|
@@ -678,25 +678,25 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
678
678
|
const o = I(i);
|
|
679
679
|
return { x: s.x + o.x, y: s.y + o.y };
|
|
680
680
|
}, W);
|
|
681
|
-
},
|
|
681
|
+
}, Si = (e, t, n) => {
|
|
682
682
|
const r = I(e);
|
|
683
683
|
return _(t) === "x" ? { x: n, y: r.y } : { x: r.x, y: n };
|
|
684
|
-
},
|
|
684
|
+
}, Ti = (e, t) => {
|
|
685
685
|
const n = I(e), r = I(t);
|
|
686
686
|
return Math.sqrt((n.x - r.x) ** 2 + (n.y - r.y) ** 2);
|
|
687
|
-
},
|
|
687
|
+
}, $i = (e, t) => {
|
|
688
688
|
const n = I(e), r = I(t);
|
|
689
689
|
return { x: r.x - n.x, y: r.y - n.y };
|
|
690
|
-
},
|
|
690
|
+
}, Ui = (e) => {
|
|
691
691
|
const t = I(e);
|
|
692
692
|
return Number.isNaN(t.x) || Number.isNaN(t.y);
|
|
693
|
-
},
|
|
693
|
+
}, ji = (e) => {
|
|
694
694
|
const t = I(e);
|
|
695
695
|
return Number.isFinite(t.x) && Number.isFinite(t.y);
|
|
696
|
-
},
|
|
696
|
+
}, Ci = (e) => {
|
|
697
697
|
const t = I(e);
|
|
698
698
|
return [t.x, t.y];
|
|
699
|
-
},
|
|
699
|
+
}, Bi = (e) => {
|
|
700
700
|
const t = I(e);
|
|
701
701
|
return { left: t.x, top: t.y };
|
|
702
702
|
}, Wt = (e, t = 0) => {
|
|
@@ -711,13 +711,13 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
711
711
|
}, yt = (e) => {
|
|
712
712
|
const t = I(e), n = Math.hypot(t.x, t.y);
|
|
713
713
|
return n === 0 ? { x: 0, y: 0 } : { x: -t.y / n, y: t.x / n };
|
|
714
|
-
},
|
|
714
|
+
}, Jn = (e) => {
|
|
715
715
|
const t = I(e), n = Math.hypot(t.x, t.y);
|
|
716
716
|
return n === 0 ? { x: 0, y: 0 } : { x: t.x / n, y: t.y / n };
|
|
717
|
-
},
|
|
717
|
+
}, Xn = (...e) => {
|
|
718
718
|
const t = e.reduce((n, r) => Nt(n, r), W);
|
|
719
|
-
return
|
|
720
|
-
},
|
|
719
|
+
return ze(t, 1 / e.length);
|
|
720
|
+
}, Ri = (e, t) => {
|
|
721
721
|
const n = [];
|
|
722
722
|
for (let r = 0; r < e.length; r++) {
|
|
723
723
|
const s = e[r];
|
|
@@ -734,74 +734,74 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
734
734
|
const A = Math.acos(
|
|
735
735
|
(y.x * m.x + y.y * m.y) / (Math.hypot(y.x, y.y) * Math.hypot(m.x, m.y))
|
|
736
736
|
), T = Math.sin(A / 2);
|
|
737
|
-
T === 0 ? u = t : u = t / T, a =
|
|
737
|
+
T === 0 ? u = t : u = t / T, a = Jn(Xn(i, o));
|
|
738
738
|
}
|
|
739
|
-
n.push(
|
|
739
|
+
n.push(ze(a, u));
|
|
740
740
|
}
|
|
741
741
|
return n;
|
|
742
|
-
},
|
|
742
|
+
}, Pi = (e) => {
|
|
743
743
|
const t = I(e);
|
|
744
744
|
return { x: t.y, y: t.x };
|
|
745
745
|
}, ye = (e) => {
|
|
746
746
|
const t = I(e);
|
|
747
747
|
return { x: Math.round(t.x), y: Math.round(t.y) };
|
|
748
|
-
},
|
|
748
|
+
}, Li = (e) => {
|
|
749
749
|
const t = I(e);
|
|
750
750
|
return { x: 1 / t.x, y: 1 / t.y };
|
|
751
|
-
},
|
|
751
|
+
}, ki = (e, t, n) => {
|
|
752
752
|
const r = I(e), s = I(t), i = n === "clockwise" ? Math.PI / 2 : -Math.PI / 2, o = r.x - s.x, a = r.y - s.y, u = o * Math.cos(i) - a * Math.sin(i), l = o * Math.sin(i) + a * Math.cos(i);
|
|
753
753
|
return {
|
|
754
754
|
x: u + s.x,
|
|
755
755
|
y: l + s.y
|
|
756
756
|
};
|
|
757
|
-
},
|
|
757
|
+
}, vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
758
758
|
__proto__: null,
|
|
759
|
-
INFINITY:
|
|
760
|
-
NAN:
|
|
761
|
-
ONE:
|
|
759
|
+
INFINITY: Mi,
|
|
760
|
+
NAN: Ai,
|
|
761
|
+
ONE: Gn,
|
|
762
762
|
ZERO: W,
|
|
763
|
-
average:
|
|
764
|
-
calculateMiters:
|
|
765
|
-
clientXY:
|
|
763
|
+
average: Xn,
|
|
764
|
+
calculateMiters: Ri,
|
|
765
|
+
clientXY: kn,
|
|
766
766
|
construct: I,
|
|
767
|
-
couple:
|
|
767
|
+
couple: Ci,
|
|
768
768
|
crudeZ: ge,
|
|
769
|
-
css:
|
|
770
|
-
distance:
|
|
769
|
+
css: Bi,
|
|
770
|
+
distance: Ti,
|
|
771
771
|
equals: Ft,
|
|
772
|
-
isFinite:
|
|
773
|
-
isNan:
|
|
774
|
-
isZero:
|
|
772
|
+
isFinite: ji,
|
|
773
|
+
isNan: Ui,
|
|
774
|
+
isZero: Ei,
|
|
775
775
|
normal: yt,
|
|
776
|
-
normalize:
|
|
777
|
-
reciprocal:
|
|
778
|
-
rotate:
|
|
776
|
+
normalize: Jn,
|
|
777
|
+
reciprocal: Li,
|
|
778
|
+
rotate: ki,
|
|
779
779
|
round: ye,
|
|
780
|
-
scale:
|
|
781
|
-
set:
|
|
780
|
+
scale: ze,
|
|
781
|
+
set: Si,
|
|
782
782
|
sub: gt,
|
|
783
|
-
swap:
|
|
783
|
+
swap: Pi,
|
|
784
784
|
translate: Nt,
|
|
785
|
-
translateX:
|
|
786
|
-
translateY:
|
|
787
|
-
translation:
|
|
785
|
+
translateX: Hn,
|
|
786
|
+
translateY: Dn,
|
|
787
|
+
translation: $i,
|
|
788
788
|
truncate: Wt,
|
|
789
789
|
xy: ut
|
|
790
|
-
}, Symbol.toStringTag, { value: "Module" })), $t = c.union([c.number(), c.string()]),
|
|
790
|
+
}, Symbol.toStringTag, { value: "Module" })), $t = c.union([c.number(), c.string()]), Zi = c.object({
|
|
791
791
|
top: $t,
|
|
792
792
|
left: $t,
|
|
793
793
|
width: $t,
|
|
794
794
|
height: $t
|
|
795
|
-
}),
|
|
795
|
+
}), _i = c.object({
|
|
796
796
|
left: c.number(),
|
|
797
797
|
top: c.number(),
|
|
798
798
|
right: c.number(),
|
|
799
799
|
bottom: c.number()
|
|
800
|
-
}),
|
|
800
|
+
}), qi = c.object({
|
|
801
801
|
one: ut,
|
|
802
802
|
two: ut,
|
|
803
803
|
root: Pe
|
|
804
|
-
}),
|
|
804
|
+
}), Kn = { one: W, two: W, root: ht }, Fi = { one: W, two: Gn, root: Dt }, Qn = (e, t) => ({
|
|
805
805
|
one: e.one,
|
|
806
806
|
two: e.two,
|
|
807
807
|
root: t ?? e.root
|
|
@@ -823,7 +823,7 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
823
823
|
x: i.one.x + t.signedWidth,
|
|
824
824
|
y: i.one.y + t.signedHeight
|
|
825
825
|
} : i.two = t, i));
|
|
826
|
-
},
|
|
826
|
+
}, Wi = (e, t, n) => {
|
|
827
827
|
const r = v(e);
|
|
828
828
|
if (typeof t == "string") {
|
|
829
829
|
if (n == null) throw new Error("Invalid arguments for resize");
|
|
@@ -837,17 +837,17 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
837
837
|
);
|
|
838
838
|
}
|
|
839
839
|
return v(r.one, t, void 0, void 0, r.root);
|
|
840
|
-
},
|
|
840
|
+
}, Vi = (e, t, n = !0) => {
|
|
841
841
|
const r = v(e);
|
|
842
842
|
let s = (i, o) => i < o;
|
|
843
843
|
return n && (s = (i, o) => i <= o), "one" in t ? s(J(r), J(t)) && s(Q(t), Q(r)) && s(X(r), X(t)) && s(tt(t), tt(r)) : s(J(r), t.x) && s(t.x, Q(r)) && s(X(r), t.y) && s(t.y, tt(r));
|
|
844
|
-
}, zi = (e, t) => Ft(e.one, t.one) && Ft(e.two, t.two) &&
|
|
844
|
+
}, zi = (e, t) => Ft(e.one, t.one) && Ft(e.two, t.two) && Ve(e.root, t.root), tr = (e) => ({
|
|
845
845
|
width: U(e),
|
|
846
846
|
height: j(e)
|
|
847
|
-
}),
|
|
847
|
+
}), Yi = (e) => ({
|
|
848
848
|
signedWidth: Jt(e),
|
|
849
849
|
signedHeight: Xt(e)
|
|
850
|
-
}),
|
|
850
|
+
}), Gi = (e) => ({
|
|
851
851
|
top: X(e),
|
|
852
852
|
left: J(e),
|
|
853
853
|
width: U(e),
|
|
@@ -862,15 +862,15 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
862
862
|
y: t.y === "center" ? me(n).y : nt(n, t.y)
|
|
863
863
|
};
|
|
864
864
|
}, nt = (e, t) => {
|
|
865
|
-
const n = v(e), r =
|
|
865
|
+
const n = v(e), r = Yn(n.root).includes(t) ? Math.min : Math.max;
|
|
866
866
|
return Gt.includes(t) ? r(n.one.x, n.two.x) : r(n.one.y, n.two.y);
|
|
867
|
-
},
|
|
867
|
+
}, Hi = (e) => rr(e) === 0, U = (e) => Ye(e, "x"), j = (e) => Ye(e, "y"), Jt = (e) => {
|
|
868
868
|
const t = v(e);
|
|
869
869
|
return t.two.x - t.one.x;
|
|
870
870
|
}, Xt = (e) => {
|
|
871
871
|
const t = v(e);
|
|
872
872
|
return t.two.y - t.one.y;
|
|
873
|
-
},
|
|
873
|
+
}, er = (e) => H(e, ht), Di = (e) => H(e, _e), Ji = (e) => H(e, Le), Xi = (e) => H(e, Dt), Ki = (e) => H(e, qe), Qi = (e) => H(e, ke), to = (e) => H(e, We), eo = (e) => H(e, Fe), Q = (e) => nt(e, "right"), tt = (e) => nt(e, "bottom"), J = (e) => nt(e, "left"), X = (e) => nt(e, "top"), me = (e) => Nt(er(e), {
|
|
874
874
|
x: Jt(e) / 2,
|
|
875
875
|
y: Xt(e) / 2
|
|
876
876
|
}), Ge = (e) => {
|
|
@@ -879,21 +879,21 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
879
879
|
}, He = (e) => {
|
|
880
880
|
const t = v(e);
|
|
881
881
|
return t.root.y === "top" ? X(t) : tt(t);
|
|
882
|
-
},
|
|
882
|
+
}, no = (e) => ({ x: Ge(e), y: He(e) }), Pt = (e) => {
|
|
883
883
|
const t = v(e);
|
|
884
884
|
return { lower: t.one.x, upper: t.two.x };
|
|
885
885
|
}, Lt = (e) => {
|
|
886
886
|
const t = v(e);
|
|
887
887
|
return { lower: t.one.y, upper: t.two.y };
|
|
888
|
-
},
|
|
888
|
+
}, ro = (e, t) => Qn(e, t), so = (e, t) => {
|
|
889
889
|
const n = v(e), r = Gt.includes(t) ? "x" : Ht.includes(t) ? "y" : null;
|
|
890
890
|
if (r === null) throw new Error(`Invalid location: ${t}`);
|
|
891
891
|
const s = t === "top" || t === "left" ? Math.min : Math.max, i = { ...n.one }, o = { ...n.two };
|
|
892
892
|
return i[r] = s(n.one[r], n.two[r]), o[r] = s(n.one[r], n.two[r]), [i, o];
|
|
893
|
-
},
|
|
893
|
+
}, io = (e, t) => {
|
|
894
894
|
const n = v(e), r = v(t), s = Ge(r) + (U(r) - U(n)) / 2, i = He(r) + (j(r) - j(n)) / 2;
|
|
895
|
-
return v({ x: s, y: i },
|
|
896
|
-
},
|
|
895
|
+
return v({ x: s, y: i }, tr(n));
|
|
896
|
+
}, nr = (e) => typeof e != "object" || e == null ? !1 : "one" in e && "two" in e && "root" in e, oo = (e) => U(e) / j(e), co = (e, t, n) => {
|
|
897
897
|
if (typeof t == "string") {
|
|
898
898
|
if (n == null) throw new Error("Undefined amount passed into box.translate");
|
|
899
899
|
const s = _(t);
|
|
@@ -907,10 +907,10 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
907
907
|
void 0,
|
|
908
908
|
r.root
|
|
909
909
|
);
|
|
910
|
-
},
|
|
910
|
+
}, ao = (e, t) => {
|
|
911
911
|
const n = Math.max(J(e), J(t)), r = Math.max(X(e), X(t)), s = Math.min(Q(e), Q(t)), i = Math.min(tt(e), tt(t));
|
|
912
|
-
return n > s || r > i ?
|
|
913
|
-
},
|
|
912
|
+
return n > s || r > i ? Kn : v({ x: n, y: r }, { x: s, y: i }, void 0, void 0, e.root);
|
|
913
|
+
}, rr = (e) => U(e) * j(e), uo = (e, t) => {
|
|
914
914
|
const n = v(e);
|
|
915
915
|
return v(
|
|
916
916
|
Wt(n.one, t),
|
|
@@ -919,123 +919,123 @@ const Sn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ds = `0123456
|
|
|
919
919
|
void 0,
|
|
920
920
|
n.root
|
|
921
921
|
);
|
|
922
|
-
},
|
|
922
|
+
}, lo = (e, t, n, r, s, i) => {
|
|
923
923
|
const o = { x: e, y: t }, a = { x: e + n, y: t + r };
|
|
924
924
|
return s.x !== i.x && (s.x === "center" ? (o.x -= n / 2, a.x -= n / 2) : (o.x -= n, a.x -= n)), s.y !== i.y && (s.y === "center" ? (o.y -= r / 2, a.y -= r / 2) : (o.y -= r, a.y -= r)), v(o, a, void 0, void 0, i);
|
|
925
|
-
},
|
|
925
|
+
}, fo = (e) => {
|
|
926
926
|
const t = v(e);
|
|
927
927
|
return v(ye(t.one), ye(t.two), void 0, void 0, t.root);
|
|
928
|
-
},
|
|
928
|
+
}, Mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
929
929
|
__proto__: null,
|
|
930
|
-
DECIMAL:
|
|
931
|
-
ZERO:
|
|
932
|
-
area:
|
|
933
|
-
areaIsZero:
|
|
934
|
-
aspect:
|
|
930
|
+
DECIMAL: Fi,
|
|
931
|
+
ZERO: Kn,
|
|
932
|
+
area: rr,
|
|
933
|
+
areaIsZero: Hi,
|
|
934
|
+
aspect: oo,
|
|
935
935
|
bottom: tt,
|
|
936
|
-
bottomCenter:
|
|
937
|
-
bottomLeft:
|
|
938
|
-
bottomRight:
|
|
939
|
-
box:
|
|
936
|
+
bottomCenter: Ki,
|
|
937
|
+
bottomLeft: Xi,
|
|
938
|
+
bottomRight: Qi,
|
|
939
|
+
box: qi,
|
|
940
940
|
center: me,
|
|
941
|
-
centerLeft:
|
|
942
|
-
centerRight:
|
|
941
|
+
centerLeft: to,
|
|
942
|
+
centerRight: eo,
|
|
943
943
|
construct: v,
|
|
944
|
-
constructWithAlternateRoot:
|
|
945
|
-
contains:
|
|
946
|
-
copy:
|
|
947
|
-
css:
|
|
948
|
-
cssBox:
|
|
944
|
+
constructWithAlternateRoot: lo,
|
|
945
|
+
contains: Vi,
|
|
946
|
+
copy: Qn,
|
|
947
|
+
css: Gi,
|
|
948
|
+
cssBox: Zi,
|
|
949
949
|
dim: Ye,
|
|
950
|
-
dims:
|
|
951
|
-
domRect:
|
|
952
|
-
edgePoints:
|
|
950
|
+
dims: tr,
|
|
951
|
+
domRect: _i,
|
|
952
|
+
edgePoints: so,
|
|
953
953
|
equals: zi,
|
|
954
954
|
height: j,
|
|
955
|
-
intersection:
|
|
956
|
-
isBox:
|
|
955
|
+
intersection: ao,
|
|
956
|
+
isBox: nr,
|
|
957
957
|
left: J,
|
|
958
958
|
loc: nt,
|
|
959
|
-
positionInCenter:
|
|
960
|
-
reRoot:
|
|
961
|
-
resize:
|
|
959
|
+
positionInCenter: io,
|
|
960
|
+
reRoot: ro,
|
|
961
|
+
resize: Wi,
|
|
962
962
|
right: Q,
|
|
963
|
-
root:
|
|
964
|
-
round:
|
|
965
|
-
signedDims:
|
|
963
|
+
root: no,
|
|
964
|
+
round: fo,
|
|
965
|
+
signedDims: Yi,
|
|
966
966
|
signedHeight: Xt,
|
|
967
967
|
signedWidth: Jt,
|
|
968
968
|
top: X,
|
|
969
|
-
topCenter:
|
|
970
|
-
topLeft:
|
|
971
|
-
topRight:
|
|
972
|
-
translate:
|
|
973
|
-
truncate:
|
|
969
|
+
topCenter: Di,
|
|
970
|
+
topLeft: er,
|
|
971
|
+
topRight: Ji,
|
|
972
|
+
translate: co,
|
|
973
|
+
truncate: uo,
|
|
974
974
|
width: U,
|
|
975
975
|
x: Ge,
|
|
976
976
|
xBounds: Pt,
|
|
977
977
|
xyLoc: H,
|
|
978
978
|
y: He,
|
|
979
979
|
yBounds: Lt
|
|
980
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
980
|
+
}, Symbol.toStringTag, { value: "Module" })), sr = c.object({ signedWidth: c.number(), signedHeight: c.number() }), ho = c.union([Te, sr, ut, Pn]), go = { width: 0, height: 0 }, yo = { 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 }, mo = (e, t) => {
|
|
981
981
|
if (t == null) return !1;
|
|
982
982
|
const n = Z(e), r = Z(t);
|
|
983
983
|
return n.width === r.width && n.height === r.height;
|
|
984
|
-
},
|
|
984
|
+
}, po = (e) => {
|
|
985
985
|
const t = Z(e);
|
|
986
986
|
return { width: t.height, height: t.width };
|
|
987
|
-
},
|
|
987
|
+
}, bo = (e) => {
|
|
988
988
|
const t = Z(e);
|
|
989
989
|
return `0 0 ${t.width} ${t.height}`;
|
|
990
|
-
},
|
|
990
|
+
}, wo = (e) => {
|
|
991
991
|
const t = Z(e);
|
|
992
992
|
return [t.width, t.height];
|
|
993
|
-
},
|
|
993
|
+
}, Oo = (e) => ({
|
|
994
994
|
width: Math.max(...e.map((t) => Z(t).width)),
|
|
995
995
|
height: Math.max(...e.map((t) => Z(t).height))
|
|
996
|
-
}),
|
|
996
|
+
}), xo = (e) => ({
|
|
997
997
|
width: Math.min(...e.map((t) => Z(t).width)),
|
|
998
998
|
height: Math.min(...e.map((t) => Z(t).height))
|
|
999
|
-
}),
|
|
999
|
+
}), Io = (e, t) => {
|
|
1000
1000
|
const n = Z(e);
|
|
1001
1001
|
return { width: n.width * t, height: n.height * t };
|
|
1002
|
-
},
|
|
1002
|
+
}, Au = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1003
1003
|
__proto__: null,
|
|
1004
|
-
DECIMAL:
|
|
1005
|
-
ZERO:
|
|
1004
|
+
DECIMAL: yo,
|
|
1005
|
+
ZERO: go,
|
|
1006
1006
|
construct: Z,
|
|
1007
|
-
couple:
|
|
1008
|
-
crude:
|
|
1007
|
+
couple: wo,
|
|
1008
|
+
crude: ho,
|
|
1009
1009
|
dimensions: Te,
|
|
1010
|
-
equals:
|
|
1011
|
-
max:
|
|
1012
|
-
min:
|
|
1013
|
-
scale:
|
|
1014
|
-
signed:
|
|
1015
|
-
svgViewBox:
|
|
1016
|
-
swap:
|
|
1017
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1010
|
+
equals: mo,
|
|
1011
|
+
max: Oo,
|
|
1012
|
+
min: xo,
|
|
1013
|
+
scale: Io,
|
|
1014
|
+
signed: sr,
|
|
1015
|
+
svgViewBox: bo,
|
|
1016
|
+
swap: po
|
|
1017
|
+
}, Symbol.toStringTag, { value: "Module" })), No = (e, t, n) => t !== void 0 && e < t ? t : n !== void 0 && e > n ? n : e, vo = c.object({ offset: ge, scale: ge }), Mo = c.object({ offset: c.number(), scale: c.number() }), Ao = (e) => (t, n, r, s) => n === "dimension" ? [t, r] : [
|
|
1018
1018
|
t,
|
|
1019
1019
|
s ? r - e : r + e
|
|
1020
|
-
],
|
|
1020
|
+
], Eo = (e) => (t, n, r, s) => [
|
|
1021
1021
|
t,
|
|
1022
1022
|
s ? r / e : r * e
|
|
1023
|
-
],
|
|
1023
|
+
], So = (e) => (t, n, r) => {
|
|
1024
1024
|
if (t === null) return [e, r];
|
|
1025
1025
|
const { lower: s, upper: i } = t, { lower: o, upper: a } = e, u = i - s, l = a - o;
|
|
1026
1026
|
if (n === "dimension") return [e, r * (l / u)];
|
|
1027
1027
|
const h = (r - s) * (l / u) + o;
|
|
1028
1028
|
return [e, h];
|
|
1029
|
-
},
|
|
1029
|
+
}, To = (e) => (t, n, r) => [e, r], $o = () => (e, t, n) => {
|
|
1030
1030
|
if (e === null) throw new Error("cannot invert without bounds");
|
|
1031
1031
|
if (t === "dimension") return [e, n];
|
|
1032
1032
|
const { lower: r, upper: s } = e;
|
|
1033
1033
|
return [e, s - (n - r)];
|
|
1034
|
-
},
|
|
1034
|
+
}, Uo = (e) => (t, n, r) => {
|
|
1035
1035
|
const { lower: s, upper: i } = e;
|
|
1036
|
-
return r =
|
|
1036
|
+
return r = No(r, s, i), [t, r];
|
|
1037
1037
|
};
|
|
1038
|
-
class
|
|
1038
|
+
class V {
|
|
1039
1039
|
ops = [];
|
|
1040
1040
|
currBounds = null;
|
|
1041
1041
|
currType = null;
|
|
@@ -1049,7 +1049,7 @@ class z {
|
|
|
1049
1049
|
* @param value - The amount to translate by.
|
|
1050
1050
|
*/
|
|
1051
1051
|
static translate(t) {
|
|
1052
|
-
return new
|
|
1052
|
+
return new V().translate(t);
|
|
1053
1053
|
}
|
|
1054
1054
|
/**
|
|
1055
1055
|
* @returns a new scale with a magnification as its first operation. Any number provided
|
|
@@ -1057,10 +1057,10 @@ class z {
|
|
|
1057
1057
|
* @param value - The amount to translate by.
|
|
1058
1058
|
*/
|
|
1059
1059
|
static magnify(t) {
|
|
1060
|
-
return new
|
|
1060
|
+
return new V().magnify(t);
|
|
1061
1061
|
}
|
|
1062
1062
|
static scale(t, n) {
|
|
1063
|
-
return new
|
|
1063
|
+
return new V().scale(t, n);
|
|
1064
1064
|
}
|
|
1065
1065
|
/**
|
|
1066
1066
|
* @returns a copy of the scale with a translation as its next operation. Any
|
|
@@ -1069,7 +1069,7 @@ class z {
|
|
|
1069
1069
|
* @param value - The amount to translate by.
|
|
1070
1070
|
*/
|
|
1071
1071
|
translate(t) {
|
|
1072
|
-
const n = this.new(), r =
|
|
1072
|
+
const n = this.new(), r = Ao(t);
|
|
1073
1073
|
return r.type = "translate", n.ops.push(r), n;
|
|
1074
1074
|
}
|
|
1075
1075
|
/**
|
|
@@ -1079,23 +1079,23 @@ class z {
|
|
|
1079
1079
|
* @param value - The amount to magnify by.
|
|
1080
1080
|
*/
|
|
1081
1081
|
magnify(t) {
|
|
1082
|
-
const n = this.new(), r =
|
|
1082
|
+
const n = this.new(), r = Eo(t);
|
|
1083
1083
|
return r.type = "magnify", n.ops.push(r), n;
|
|
1084
1084
|
}
|
|
1085
1085
|
scale(t, n) {
|
|
1086
|
-
const r = w(t, n), s = this.new(), i =
|
|
1086
|
+
const r = w(t, n), s = this.new(), i = So(r);
|
|
1087
1087
|
return i.type = "scale", s.ops.push(i), s;
|
|
1088
1088
|
}
|
|
1089
1089
|
clamp(t, n) {
|
|
1090
|
-
const r = w(t, n), s = this.new(), i =
|
|
1090
|
+
const r = w(t, n), s = this.new(), i = Uo(r);
|
|
1091
1091
|
return i.type = "clamp", s.ops.push(i), s;
|
|
1092
1092
|
}
|
|
1093
1093
|
reBound(t, n) {
|
|
1094
|
-
const r = w(t, n), s = this.new(), i =
|
|
1094
|
+
const r = w(t, n), s = this.new(), i = To(r);
|
|
1095
1095
|
return i.type = "re-bound", s.ops.push(i), s;
|
|
1096
1096
|
}
|
|
1097
1097
|
invert() {
|
|
1098
|
-
const t =
|
|
1098
|
+
const t = $o();
|
|
1099
1099
|
t.type = "invert";
|
|
1100
1100
|
const n = this.new();
|
|
1101
1101
|
return n.ops.push(t), n;
|
|
@@ -1107,7 +1107,7 @@ class z {
|
|
|
1107
1107
|
return this.exec("dimension", t);
|
|
1108
1108
|
}
|
|
1109
1109
|
new() {
|
|
1110
|
-
const t = new
|
|
1110
|
+
const t = new V();
|
|
1111
1111
|
return t.ops = this.ops.slice(), t.reversed = this.reversed, t;
|
|
1112
1112
|
}
|
|
1113
1113
|
exec(t, n) {
|
|
@@ -1133,13 +1133,13 @@ class z {
|
|
|
1133
1133
|
get transform() {
|
|
1134
1134
|
return { scale: this.dim(1), offset: this.pos(0) };
|
|
1135
1135
|
}
|
|
1136
|
-
static IDENTITY = new
|
|
1136
|
+
static IDENTITY = new V();
|
|
1137
1137
|
}
|
|
1138
1138
|
class P {
|
|
1139
1139
|
x;
|
|
1140
1140
|
y;
|
|
1141
1141
|
currRoot;
|
|
1142
|
-
constructor(t = new
|
|
1142
|
+
constructor(t = new V(), n = new V(), r = null) {
|
|
1143
1143
|
this.x = t, this.y = n, this.currRoot = r;
|
|
1144
1144
|
}
|
|
1145
1145
|
static translate(t, n) {
|
|
@@ -1181,9 +1181,9 @@ class P {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
scale(t) {
|
|
1183
1183
|
const n = this.copy();
|
|
1184
|
-
if (
|
|
1184
|
+
if (nr(t)) {
|
|
1185
1185
|
const r = this.currRoot;
|
|
1186
|
-
return n.currRoot = t.root, r != null && !
|
|
1186
|
+
return n.currRoot = t.root, r != null && !Ve(r, t.root) && (r.x !== t.root.x && (n.x = n.x.invert()), r.y !== t.root.y && (n.y = n.y.invert())), n.x = n.x.scale(Pt(t)), n.y = n.y.scale(Lt(t)), n;
|
|
1187
1187
|
}
|
|
1188
1188
|
return n.x = n.x.scale(t.width), n.y = n.y.scale(t.height), n;
|
|
1189
1189
|
}
|
|
@@ -1226,35 +1226,35 @@ class P {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
static IDENTITY = new P();
|
|
1228
1228
|
}
|
|
1229
|
-
const
|
|
1229
|
+
const Eu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1230
1230
|
__proto__: null,
|
|
1231
|
-
Scale:
|
|
1231
|
+
Scale: V,
|
|
1232
1232
|
XY: P,
|
|
1233
|
-
crudeXYTransform:
|
|
1234
|
-
transform:
|
|
1235
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1233
|
+
crudeXYTransform: vo,
|
|
1234
|
+
transform: Mo
|
|
1235
|
+
}, Symbol.toStringTag, { value: "Module" })), Su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1236
1236
|
__proto__: null,
|
|
1237
|
-
ALIGNMENTS:
|
|
1238
|
-
ORDERS:
|
|
1239
|
-
alignment:
|
|
1240
|
-
order:
|
|
1241
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1237
|
+
ALIGNMENTS: Ln,
|
|
1238
|
+
ORDERS: Zn,
|
|
1239
|
+
alignment: Ps,
|
|
1240
|
+
order: Ls
|
|
1241
|
+
}, Symbol.toStringTag, { value: "Module" })), ir = ut.extend({
|
|
1242
1242
|
root: Pe,
|
|
1243
1243
|
units: b.object({
|
|
1244
1244
|
x: b.enum(["px", "decimal"]),
|
|
1245
1245
|
y: b.enum(["px", "decimal"])
|
|
1246
1246
|
})
|
|
1247
|
-
}),
|
|
1247
|
+
}), jo = ir.partial({ root: !0, units: !0 }), Co = (e) => {
|
|
1248
1248
|
const t = {};
|
|
1249
1249
|
return t[e.root?.x ?? "left"] = e?.units?.x === "px" ? `${e.x}px` : `${e.x * 100}%`, t[e.root?.y ?? "top"] = e?.units?.y === "px" ? `${e.y}px` : `${e.y * 100}%`, t;
|
|
1250
|
-
},
|
|
1250
|
+
}, Bo = ({
|
|
1251
1251
|
position: e,
|
|
1252
1252
|
element: t,
|
|
1253
1253
|
container: n
|
|
1254
1254
|
}) => {
|
|
1255
1255
|
const r = { x: e.x, y: e.y };
|
|
1256
1256
|
return e.units?.x === "decimal" ? e.root?.x === "right" && (r.x = 1 - e.x) : e.root?.x === "right" ? r.x = 1 - (e.x + U(t)) / U(n) : r.x /= U(n), e.units?.y === "decimal" ? e.root?.y === "bottom" && (r.y = 1 - e.y) : e.root?.y === "bottom" ? r.y = 1 - (e.y + j(t)) / j(n) : r.y /= j(n), r;
|
|
1257
|
-
},
|
|
1257
|
+
}, Ro = ({
|
|
1258
1258
|
position: e,
|
|
1259
1259
|
element: t,
|
|
1260
1260
|
container: n,
|
|
@@ -1268,18 +1268,18 @@ const Au = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1268
1268
|
units: { x: "px", y: "px" }
|
|
1269
1269
|
};
|
|
1270
1270
|
return e.x > s ? (i.x = (1 - e.x) * U(n) - U(t), i.root.x = "right") : e.x < r ? i.x = e.x * U(n) : i.units.x = "decimal", e.y > s ? (i.y = (1 - e.y) * j(n) - j(t), i.root.y = "bottom") : e.y < r ? i.y = e.y * j(n) : i.units.y = "decimal", i.x = Math.round(i.x * 100) / 100, { ...i, ...Wt(i, 3) };
|
|
1271
|
-
},
|
|
1271
|
+
}, Tu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1272
1272
|
__proto__: null,
|
|
1273
|
-
calculate:
|
|
1274
|
-
completeXY:
|
|
1275
|
-
toCSS:
|
|
1276
|
-
toDecimal:
|
|
1277
|
-
xy:
|
|
1278
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1273
|
+
calculate: Ro,
|
|
1274
|
+
completeXY: ir,
|
|
1275
|
+
toCSS: Co,
|
|
1276
|
+
toDecimal: Bo,
|
|
1277
|
+
xy: jo
|
|
1278
|
+
}, Symbol.toStringTag, { value: "Module" })), Po = c.enum(["static", "dynamic"]), sn = 365, Ut = 30, Lo = c.union([
|
|
1279
1279
|
c.tuple([c.int()]),
|
|
1280
1280
|
c.tuple([c.int(), c.int().min(1).max(12)]),
|
|
1281
1281
|
c.tuple([c.int(), c.int().min(1).max(12), c.int().min(1).max(31)])
|
|
1282
|
-
]),
|
|
1282
|
+
]), or = (e, t) => {
|
|
1283
1283
|
const n = new d(t);
|
|
1284
1284
|
if (![
|
|
1285
1285
|
g.DAY,
|
|
@@ -1306,7 +1306,7 @@ class d extends rt {
|
|
|
1306
1306
|
else if (Array.isArray(t)) super(d.parseDate(t));
|
|
1307
1307
|
else {
|
|
1308
1308
|
let r = 0n;
|
|
1309
|
-
t instanceof Number && (t = t.valueOf()), n === "local" && (r = d.utcOffset.valueOf()), typeof t == "number" && (isFinite(t) ? t ===
|
|
1309
|
+
t instanceof Number && (t = t.valueOf()), n === "local" && (r = d.utcOffset.valueOf()), typeof t == "number" && (isFinite(t) ? t === Cn ? t = _t : t = Math.trunc(t) : (isNaN(t) && (t = 0), t === 1 / 0 ? t = d.MAX : t = d.MIN)), B(t) && (t = t.value), super(BigInt(t.valueOf()) + r);
|
|
1310
1310
|
}
|
|
1311
1311
|
}
|
|
1312
1312
|
static parseDate([t = 1970, n = 1, r = 1]) {
|
|
@@ -1673,7 +1673,7 @@ class d extends rt {
|
|
|
1673
1673
|
* @example TimeStamp.now().remainder(TimeStamp.DAY) // => TimeStamp representing the current day
|
|
1674
1674
|
*/
|
|
1675
1675
|
remainder(t) {
|
|
1676
|
-
return
|
|
1676
|
+
return or(this, t);
|
|
1677
1677
|
}
|
|
1678
1678
|
/** @returns true if the day portion TimeStamp is today, false otherwise. */
|
|
1679
1679
|
get isToday() {
|
|
@@ -1802,7 +1802,7 @@ class d extends rt {
|
|
|
1802
1802
|
c.bigint().transform((t) => new d(t)),
|
|
1803
1803
|
c.date().transform((t) => new d(t)),
|
|
1804
1804
|
c.custom((t) => t instanceof g).transform((t) => new d(t)),
|
|
1805
|
-
|
|
1805
|
+
Lo.transform((t) => new d(t))
|
|
1806
1806
|
]);
|
|
1807
1807
|
/**
|
|
1808
1808
|
* Sorts two timestamps.
|
|
@@ -1888,7 +1888,7 @@ class g extends rt {
|
|
|
1888
1888
|
* @returns A new TimeSpan representing the remainder.
|
|
1889
1889
|
*/
|
|
1890
1890
|
remainder(t) {
|
|
1891
|
-
return
|
|
1891
|
+
return or(this, t);
|
|
1892
1892
|
}
|
|
1893
1893
|
/**
|
|
1894
1894
|
* Truncates the TimeSpan to the nearest multiple of the given span.
|
|
@@ -2905,10 +2905,10 @@ class p extends rt {
|
|
|
2905
2905
|
return this.valueOf() === 0;
|
|
2906
2906
|
}
|
|
2907
2907
|
}
|
|
2908
|
-
const
|
|
2908
|
+
const $u = c.object({
|
|
2909
2909
|
start: c.number(),
|
|
2910
2910
|
end: c.number()
|
|
2911
|
-
}),
|
|
2911
|
+
}), Uu = c.union([
|
|
2912
2912
|
c.instanceof(Uint8Array),
|
|
2913
2913
|
c.instanceof(Uint16Array),
|
|
2914
2914
|
c.instanceof(Uint32Array),
|
|
@@ -2919,64 +2919,64 @@ const Tu = c.object({
|
|
|
2919
2919
|
c.instanceof(Int16Array),
|
|
2920
2920
|
c.instanceof(Int32Array),
|
|
2921
2921
|
c.instanceof(BigInt64Array)
|
|
2922
|
-
]),
|
|
2922
|
+
]), cr = (e) => {
|
|
2923
2923
|
const t = typeof e;
|
|
2924
2924
|
return t === "string" || t === "number" || t === "boolean" || t === "bigint" || e instanceof d || e instanceof g || e instanceof Date;
|
|
2925
|
-
},
|
|
2926
|
-
function
|
|
2927
|
-
return typeof e == "string" &&
|
|
2925
|
+
}, ko = (e, t, n, r = 0) => e.usesBigInt && !t.usesBigInt ? Number(n) - Number(r) : !e.usesBigInt && t.usesBigInt ? BigInt(n.valueOf()) - BigInt(r.valueOf()) : F(n, r), Zo = "00000000-0000-0000-0000-000000000000", _o = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
|
|
2926
|
+
function qo(e) {
|
|
2927
|
+
return typeof e == "string" && _o.test(e);
|
|
2928
2928
|
}
|
|
2929
2929
|
const E = [];
|
|
2930
2930
|
for (let e = 0; e < 256; ++e)
|
|
2931
2931
|
E.push((e + 256).toString(16).slice(1));
|
|
2932
|
-
function
|
|
2932
|
+
function ar(e, t = 0) {
|
|
2933
2933
|
return (E[e[t + 0]] + E[e[t + 1]] + E[e[t + 2]] + E[e[t + 3]] + "-" + E[e[t + 4]] + E[e[t + 5]] + "-" + E[e[t + 6]] + E[e[t + 7]] + "-" + E[e[t + 8]] + E[e[t + 9]] + "-" + E[e[t + 10]] + E[e[t + 11]] + E[e[t + 12]] + E[e[t + 13]] + E[e[t + 14]] + E[e[t + 15]]).toLowerCase();
|
|
2934
2934
|
}
|
|
2935
|
-
function
|
|
2936
|
-
const n =
|
|
2937
|
-
if (!
|
|
2935
|
+
function Fo(e, t = 0) {
|
|
2936
|
+
const n = ar(e, t);
|
|
2937
|
+
if (!qo(n))
|
|
2938
2938
|
throw TypeError("Stringified UUID is invalid");
|
|
2939
2939
|
return n;
|
|
2940
2940
|
}
|
|
2941
2941
|
let re;
|
|
2942
|
-
const
|
|
2943
|
-
function
|
|
2942
|
+
const Wo = new Uint8Array(16);
|
|
2943
|
+
function Vo() {
|
|
2944
2944
|
if (!re) {
|
|
2945
2945
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
2946
2946
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
2947
2947
|
re = crypto.getRandomValues.bind(crypto);
|
|
2948
2948
|
}
|
|
2949
|
-
return re(
|
|
2949
|
+
return re(Wo);
|
|
2950
2950
|
}
|
|
2951
2951
|
const zo = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), on = { randomUUID: zo };
|
|
2952
|
-
function
|
|
2952
|
+
function Yo(e, t, n) {
|
|
2953
2953
|
e = e || {};
|
|
2954
|
-
const r = e.random ?? e.rng?.() ??
|
|
2954
|
+
const r = e.random ?? e.rng?.() ?? Vo();
|
|
2955
2955
|
if (r.length < 16)
|
|
2956
2956
|
throw new Error("Random bytes length must be >= 16");
|
|
2957
|
-
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128,
|
|
2957
|
+
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, ar(r);
|
|
2958
2958
|
}
|
|
2959
|
-
function
|
|
2960
|
-
return on.randomUUID && !e ? on.randomUUID() :
|
|
2959
|
+
function Go(e, t, n) {
|
|
2960
|
+
return on.randomUUID && !e ? on.randomUUID() : Yo(e);
|
|
2961
2961
|
}
|
|
2962
|
-
const
|
|
2962
|
+
const Ho = () => Go(), De = (e, t) => Fo(e, t), Do = Zo, ju = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2963
2963
|
__proto__: null,
|
|
2964
|
-
ZERO:
|
|
2965
|
-
create:
|
|
2964
|
+
ZERO: Do,
|
|
2965
|
+
create: Ho,
|
|
2966
2966
|
parse: De
|
|
2967
2967
|
}, Symbol.toStringTag, { value: "Module" })), D = -1, pe = {
|
|
2968
2968
|
[Symbol.iterator]: () => pe,
|
|
2969
2969
|
next: () => ({ done: !0, value: void 0 })
|
|
2970
|
-
},
|
|
2970
|
+
}, Jo = c.string().transform(
|
|
2971
2971
|
(e) => new Uint8Array(
|
|
2972
2972
|
atob(e).split("").map((t) => t.charCodeAt(0))
|
|
2973
2973
|
).buffer
|
|
2974
|
-
),
|
|
2974
|
+
), Xo = c.union([c.null(), c.undefined()]).transform(() => new Uint8Array().buffer), be = 10, ur = (e, t) => {
|
|
2975
2975
|
if (e === "number" && !t.isNumeric)
|
|
2976
2976
|
throw new Error(`cannot convert series of type ${t.toString()} to number`);
|
|
2977
2977
|
if (e === "bigint" && !t.usesBigInt)
|
|
2978
2978
|
throw new Error(`cannot convert series of type ${t.toString()} to bigint`);
|
|
2979
|
-
},
|
|
2979
|
+
}, lr = "sy_x_telem_series";
|
|
2980
2980
|
class q {
|
|
2981
2981
|
/**
|
|
2982
2982
|
* A unique identifier for the series. If specified by the user, it is their
|
|
@@ -2988,7 +2988,7 @@ class q {
|
|
|
2988
2988
|
* A discriminator used for identifying instances of the series class even
|
|
2989
2989
|
* when bundlers mangle the class name.
|
|
2990
2990
|
*/
|
|
2991
|
-
discriminator =
|
|
2991
|
+
discriminator = lr;
|
|
2992
2992
|
/** The data type of the series. */
|
|
2993
2993
|
dataType;
|
|
2994
2994
|
/**
|
|
@@ -3037,12 +3037,12 @@ class q {
|
|
|
3037
3037
|
dataType: f.z,
|
|
3038
3038
|
alignment: c.coerce.bigint().optional(),
|
|
3039
3039
|
data: c.union([
|
|
3040
|
-
Do,
|
|
3041
3040
|
Jo,
|
|
3041
|
+
Xo,
|
|
3042
3042
|
c.instanceof(ArrayBuffer),
|
|
3043
3043
|
c.instanceof(Uint8Array)
|
|
3044
3044
|
]),
|
|
3045
|
-
glBufferUsage:
|
|
3045
|
+
glBufferUsage: Po.default("static").optional()
|
|
3046
3046
|
});
|
|
3047
3047
|
/**
|
|
3048
3048
|
* A zod schema that validates and constructs a series from it's crude
|
|
@@ -3123,7 +3123,7 @@ class q {
|
|
|
3123
3123
|
* @throws Error if data type cannot be inferred from input
|
|
3124
3124
|
*/
|
|
3125
3125
|
constructor(t) {
|
|
3126
|
-
|
|
3126
|
+
Ko(t) && (t = { data: t }), t.data ??= [];
|
|
3127
3127
|
const {
|
|
3128
3128
|
dataType: n,
|
|
3129
3129
|
timeRange: r,
|
|
@@ -3134,12 +3134,12 @@ class q {
|
|
|
3134
3134
|
key: u = Se(),
|
|
3135
3135
|
data: l
|
|
3136
3136
|
} = t;
|
|
3137
|
-
if (
|
|
3137
|
+
if (fr(l)) {
|
|
3138
3138
|
const m = l;
|
|
3139
3139
|
this.key = m.key, this.dataType = m.dataType, this.sampleOffset = m.sampleOffset, this.gl = m.gl, this._data = m._data, this.timeRange = m.timeRange, this.alignment = m.alignment, this.alignmentMultiple = m.alignmentMultiple, this.cachedMin = m.cachedMin, this.cachedMax = m.cachedMax, this.writePos = m.writePos, this._refCount = m._refCount, this.cachedLength = m.cachedLength;
|
|
3140
3140
|
return;
|
|
3141
3141
|
}
|
|
3142
|
-
const h =
|
|
3142
|
+
const h = cr(l), y = Array.isArray(l);
|
|
3143
3143
|
if (n != null) this.dataType = new f(n);
|
|
3144
3144
|
else {
|
|
3145
3145
|
if (l instanceof ArrayBuffer)
|
|
@@ -3350,7 +3350,7 @@ class q {
|
|
|
3350
3350
|
if (this.dataType.equals(t)) return this;
|
|
3351
3351
|
const r = new t.Array(this.length);
|
|
3352
3352
|
for (let s = 0; s < this.length; s++)
|
|
3353
|
-
r[s] =
|
|
3353
|
+
r[s] = ko(this.dataType, t, this.data[s], n);
|
|
3354
3354
|
return new q({
|
|
3355
3355
|
data: r.buffer,
|
|
3356
3356
|
dataType: t,
|
|
@@ -3508,7 +3508,7 @@ class q {
|
|
|
3508
3508
|
), this.gl.prevBuffer = D;
|
|
3509
3509
|
}
|
|
3510
3510
|
as(t) {
|
|
3511
|
-
return
|
|
3511
|
+
return ur(t, this.dataType), this;
|
|
3512
3512
|
}
|
|
3513
3513
|
/** @returns a digest containing information about the series. */
|
|
3514
3514
|
get digest() {
|
|
@@ -3556,10 +3556,10 @@ class q {
|
|
|
3556
3556
|
}
|
|
3557
3557
|
[Symbol.iterator]() {
|
|
3558
3558
|
if (this.dataType.isVariable) {
|
|
3559
|
-
const t = new
|
|
3559
|
+
const t = new Qo(this);
|
|
3560
3560
|
return this.dataType.equals(f.JSON) ? new Je(t) : t;
|
|
3561
3561
|
}
|
|
3562
|
-
return this.dataType.equals(f.UUID) ? new
|
|
3562
|
+
return this.dataType.equals(f.UUID) ? new tc(this) : new ec(this);
|
|
3563
3563
|
}
|
|
3564
3564
|
/**
|
|
3565
3565
|
* Returns a slice of the series from start to end.
|
|
@@ -3659,7 +3659,7 @@ class q {
|
|
|
3659
3659
|
return t += "])", t;
|
|
3660
3660
|
}
|
|
3661
3661
|
}
|
|
3662
|
-
const
|
|
3662
|
+
const Ko = (e) => e == null ? !1 : Array.isArray(e) || e instanceof ArrayBuffer || ArrayBuffer.isView(e) && !(e instanceof DataView) || e instanceof q ? !0 : cr(e), fr = Un(lr, q);
|
|
3663
3663
|
class cn {
|
|
3664
3664
|
series;
|
|
3665
3665
|
end;
|
|
@@ -3673,7 +3673,7 @@ class cn {
|
|
|
3673
3673
|
return this.index >= this.end ? { done: !0, value: void 0 } : { done: !1, value: this.series.at(this.index++, !0) };
|
|
3674
3674
|
}
|
|
3675
3675
|
}
|
|
3676
|
-
class
|
|
3676
|
+
class Qo {
|
|
3677
3677
|
series;
|
|
3678
3678
|
index;
|
|
3679
3679
|
decoder;
|
|
@@ -3705,7 +3705,7 @@ class Je {
|
|
|
3705
3705
|
};
|
|
3706
3706
|
}
|
|
3707
3707
|
}
|
|
3708
|
-
class
|
|
3708
|
+
class tc {
|
|
3709
3709
|
series;
|
|
3710
3710
|
index;
|
|
3711
3711
|
data;
|
|
@@ -3721,7 +3721,7 @@ class Qo {
|
|
|
3721
3721
|
return this.index++, { done: !1, value: t };
|
|
3722
3722
|
}
|
|
3723
3723
|
}
|
|
3724
|
-
class
|
|
3724
|
+
class ec {
|
|
3725
3725
|
series;
|
|
3726
3726
|
index;
|
|
3727
3727
|
constructor(t) {
|
|
@@ -3734,7 +3734,7 @@ class tc {
|
|
|
3734
3734
|
};
|
|
3735
3735
|
}
|
|
3736
3736
|
}
|
|
3737
|
-
class
|
|
3737
|
+
class Cu {
|
|
3738
3738
|
/** The array of series in this collection */
|
|
3739
3739
|
series;
|
|
3740
3740
|
/**
|
|
@@ -3787,7 +3787,7 @@ class ju {
|
|
|
3787
3787
|
this.series = t;
|
|
3788
3788
|
}
|
|
3789
3789
|
as(t) {
|
|
3790
|
-
return
|
|
3790
|
+
return ur(t, this.dataType), this;
|
|
3791
3791
|
}
|
|
3792
3792
|
/**
|
|
3793
3793
|
* Returns the data type of the series in this collection. If the collection is empty,
|
|
@@ -3829,7 +3829,7 @@ class ju {
|
|
|
3829
3829
|
const n = () => new Error(
|
|
3830
3830
|
`cannot push a ${t.dataType.toString()} series to a ${this.dataType.toString()} multi-series`
|
|
3831
3831
|
), r = t.dataType.equals(this.dataType);
|
|
3832
|
-
if (
|
|
3832
|
+
if (fr(t)) {
|
|
3833
3833
|
if (this.series.length !== 0 && !r) throw n();
|
|
3834
3834
|
this.series.push(t);
|
|
3835
3835
|
} else {
|
|
@@ -3935,7 +3935,7 @@ class ju {
|
|
|
3935
3935
|
* Returns the bounds containing the minimum and maximum values across all series.
|
|
3936
3936
|
*/
|
|
3937
3937
|
get bounds() {
|
|
3938
|
-
return
|
|
3938
|
+
return qn(this.series.map((t) => t.bounds));
|
|
3939
3939
|
}
|
|
3940
3940
|
/**
|
|
3941
3941
|
* Returns the sum of the byte lengths of all series.
|
|
@@ -3962,7 +3962,7 @@ class ju {
|
|
|
3962
3962
|
*/
|
|
3963
3963
|
traverseAlignment(t, n) {
|
|
3964
3964
|
const r = this.series.map((s) => s.alignmentBounds);
|
|
3965
|
-
return
|
|
3965
|
+
return Fn(r, t, n);
|
|
3966
3966
|
}
|
|
3967
3967
|
/**
|
|
3968
3968
|
* Acquires a reference to the WebGL buffer for all series.
|
|
@@ -3985,7 +3985,7 @@ class ju {
|
|
|
3985
3985
|
*/
|
|
3986
3986
|
distance(t, n) {
|
|
3987
3987
|
const r = this.series.map((s) => s.alignmentBounds);
|
|
3988
|
-
return
|
|
3988
|
+
return Wn(r, t, n);
|
|
3989
3989
|
}
|
|
3990
3990
|
/**
|
|
3991
3991
|
* Parses a JSON multi-series into an array of values using the provided zod schema.
|
|
@@ -4008,7 +4008,7 @@ class ju {
|
|
|
4008
4008
|
next() {
|
|
4009
4009
|
return { done: !0, value: void 0 };
|
|
4010
4010
|
}
|
|
4011
|
-
} : new
|
|
4011
|
+
} : new nc(this.series);
|
|
4012
4012
|
}
|
|
4013
4013
|
/**
|
|
4014
4014
|
* Returns an array of the values in the multi-series as strings.
|
|
@@ -4019,7 +4019,7 @@ class ju {
|
|
|
4019
4019
|
return this.series.flatMap((t) => t.toStrings());
|
|
4020
4020
|
}
|
|
4021
4021
|
}
|
|
4022
|
-
class
|
|
4022
|
+
class nc {
|
|
4023
4023
|
series;
|
|
4024
4024
|
seriesIndex;
|
|
4025
4025
|
internal;
|
|
@@ -4051,13 +4051,13 @@ class se {
|
|
|
4051
4051
|
const an = (e) => {
|
|
4052
4052
|
const t = e >> 32n, n = e & 0xffffffffn;
|
|
4053
4053
|
return { domain: t, sample: n };
|
|
4054
|
-
},
|
|
4054
|
+
}, hr = async (e) => await new Promise(
|
|
4055
4055
|
(t) => setTimeout(t, g.fromMilliseconds(e).milliseconds)
|
|
4056
|
-
),
|
|
4056
|
+
), Bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4057
4057
|
__proto__: null,
|
|
4058
|
-
sleep:
|
|
4058
|
+
sleep: hr
|
|
4059
4059
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4060
|
-
class
|
|
4060
|
+
class rc {
|
|
4061
4061
|
config;
|
|
4062
4062
|
retries;
|
|
4063
4063
|
interval;
|
|
@@ -4066,7 +4066,7 @@ class nc {
|
|
|
4066
4066
|
baseInterval: new g(t?.baseInterval ?? g.seconds(1)),
|
|
4067
4067
|
maxRetries: t?.maxRetries ?? 5,
|
|
4068
4068
|
scale: t?.scale ?? 1,
|
|
4069
|
-
sleepFn: t?.sleepFn ??
|
|
4069
|
+
sleepFn: t?.sleepFn ?? hr
|
|
4070
4070
|
}, this.retries = 0, this.interval = new g(this.config.baseInterval);
|
|
4071
4071
|
}
|
|
4072
4072
|
async wait() {
|
|
@@ -4080,25 +4080,25 @@ class nc {
|
|
|
4080
4080
|
this.retries = 0, this.interval = this.config.baseInterval;
|
|
4081
4081
|
}
|
|
4082
4082
|
}
|
|
4083
|
-
const
|
|
4083
|
+
const sc = c.object({
|
|
4084
4084
|
baseInterval: g.z.optional(),
|
|
4085
4085
|
maxRetries: c.number().optional(),
|
|
4086
4086
|
scale: c.number().optional()
|
|
4087
|
-
}),
|
|
4087
|
+
}), Ru = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4088
4088
|
__proto__: null,
|
|
4089
|
-
Breaker:
|
|
4090
|
-
breakerConfigZ:
|
|
4091
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4089
|
+
Breaker: rc,
|
|
4090
|
+
breakerConfigZ: sc
|
|
4091
|
+
}, Symbol.toStringTag, { value: "Module" })), ic = (e) => c.object({
|
|
4092
4092
|
variant: c.enum(["set", "delete"]),
|
|
4093
4093
|
key: c.string(),
|
|
4094
4094
|
value: e
|
|
4095
|
-
}),
|
|
4095
|
+
}), Pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4096
4096
|
__proto__: null,
|
|
4097
|
-
Z:
|
|
4098
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4097
|
+
Z: ic
|
|
4098
|
+
}, Symbol.toStringTag, { value: "Module" })), oc = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Vt = c.string().regex(oc), ct = c.number().min(0).max(255), dr = c.number().min(0).max(1), Kt = c.tuple([ct, ct, ct, dr]), cc = c.tuple([ct, ct, ct]), ac = c.object({ rgba255: Kt }), uc = c.number().min(0).max(360), lc = c.number().min(0).max(100), fc = c.number().min(0).max(100), gr = c.tuple([uc, lc, fc, dr]), Qt = c.union([Vt, cc, Kt, gr, ac]), te = Qt.transform((e) => N(e)), hc = (e) => te.safeParse(e).success, dc = (e) => Kt.safeParse(e).success, gc = ((e) => {
|
|
4099
4099
|
if (e == null) return;
|
|
4100
4100
|
const t = te.safeParse(e);
|
|
4101
|
-
if (t.success) return
|
|
4101
|
+
if (t.success) return mr(t.data);
|
|
4102
4102
|
if (typeof e == "string") return e;
|
|
4103
4103
|
throw t.error;
|
|
4104
4104
|
}), N = (e, t = 1) => {
|
|
@@ -4109,25 +4109,25 @@ const rc = c.object({
|
|
|
4109
4109
|
return e.length === 3 ? [...e, t] : e;
|
|
4110
4110
|
}
|
|
4111
4111
|
return e.rgba255;
|
|
4112
|
-
},
|
|
4112
|
+
}, yr = (e, t) => {
|
|
4113
4113
|
if (e == null || t == null) return e == t;
|
|
4114
4114
|
const n = N(e), r = N(t);
|
|
4115
4115
|
return n.every((s, i) => s === r[i]);
|
|
4116
|
-
},
|
|
4116
|
+
}, yc = ((e) => {
|
|
4117
4117
|
if (e == null) return;
|
|
4118
4118
|
const [t, n, r, s] = N(e);
|
|
4119
4119
|
return `#${jt(t)}${jt(n)}${jt(r)}${s === 1 ? "" : jt(s * 255)}`;
|
|
4120
|
-
}),
|
|
4120
|
+
}), mr = (e) => {
|
|
4121
4121
|
const [t, n, r, s] = N(e);
|
|
4122
4122
|
return `rgba(${t}, ${n}, ${r}, ${s})`;
|
|
4123
|
-
},
|
|
4123
|
+
}, mc = (e) => `rgb(${pr(e)})`, pr = (e) => {
|
|
4124
4124
|
const [t, n, r] = N(e);
|
|
4125
4125
|
return `${t}, ${n}, ${r}`;
|
|
4126
|
-
},
|
|
4126
|
+
}, pc = (e) => [...Xe(e), xt(e)], Xe = (e) => [
|
|
4127
4127
|
bt(e) / 255,
|
|
4128
4128
|
wt(e) / 255,
|
|
4129
4129
|
Ot(e) / 255
|
|
4130
|
-
], bt = (e) => N(e)[0], wt = (e) => N(e)[1], Ot = (e) => N(e)[2], xt = (e) => N(e)[3],
|
|
4130
|
+
], bt = (e) => N(e)[0], wt = (e) => N(e)[1], Ot = (e) => N(e)[2], xt = (e) => N(e)[3], bc = (e) => yr(Ke, e), wc = (e) => Sc(N(e)), Oc = (e, t) => {
|
|
4131
4131
|
const [n, r, s] = N(e);
|
|
4132
4132
|
if (t > 100)
|
|
4133
4133
|
throw new Error(`Color opacity must be between 0 and 100, got ${t}`);
|
|
@@ -4137,23 +4137,23 @@ const rc = c.object({
|
|
|
4137
4137
|
(s) => s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4
|
|
4138
4138
|
);
|
|
4139
4139
|
return Number((0.2126 * t + 0.7152 * n + 0.0722 * r).toFixed(3));
|
|
4140
|
-
},
|
|
4140
|
+
}, xc = (e) => {
|
|
4141
4141
|
const [t, n, r] = Xe(e);
|
|
4142
4142
|
return 1 - (Math.max(t, n, r) - Math.min(t, n, r));
|
|
4143
4143
|
}, we = (e, t) => {
|
|
4144
4144
|
const n = N(e), r = N(t), s = vt(n), i = vt(r);
|
|
4145
4145
|
return (Math.max(s, i) + 0.5) / (Math.min(s, i) + 0.5);
|
|
4146
|
-
},
|
|
4146
|
+
}, Ic = (e, ...t) => {
|
|
4147
4147
|
if (t.length === 0)
|
|
4148
4148
|
throw new Error("[Color.pickByContrast] - must provide at least one color");
|
|
4149
4149
|
const n = N(e), [r] = t.sort((s, i) => we(n, i) - we(n, s));
|
|
4150
4150
|
return N(r);
|
|
4151
|
-
},
|
|
4151
|
+
}, Nc = (e) => vt(e) < 0.5, vc = (e) => vt(e) > 0.5, kt = (e, t = 1) => (e = Vt.parse(e), e = Mc(e), [
|
|
4152
4152
|
Ct(e, 0),
|
|
4153
4153
|
Ct(e, 2),
|
|
4154
4154
|
Ct(e, 4),
|
|
4155
4155
|
e.length === 8 ? Ct(e, 6) / 255 : t
|
|
4156
|
-
]), Ke = [0, 0, 0, 0], jt = (e) => Math.floor(e).toString(16).padStart(2, "0"), Ct = (e, t) => parseInt(e.slice(t, t + 2), 16),
|
|
4156
|
+
]), Ke = [0, 0, 0, 0], jt = (e) => Math.floor(e).toString(16).padStart(2, "0"), Ct = (e, t) => parseInt(e.slice(t, t + 2), 16), Mc = (e) => e.startsWith("#") ? e.slice(1) : e, un = {
|
|
4157
4157
|
black: "#000000",
|
|
4158
4158
|
white: "#ffffff",
|
|
4159
4159
|
red: "#ff0000",
|
|
@@ -4185,16 +4185,16 @@ const rc = c.object({
|
|
|
4185
4185
|
khaki: "#f0e68c",
|
|
4186
4186
|
crimson: "#dc143c",
|
|
4187
4187
|
transparent: "transparent"
|
|
4188
|
-
},
|
|
4188
|
+
}, Ac = (e) => {
|
|
4189
4189
|
if (!e) return;
|
|
4190
4190
|
const t = e.trim().toLowerCase();
|
|
4191
4191
|
if (!(t === "transparent" || t === "none")) {
|
|
4192
4192
|
if (t.startsWith("#")) {
|
|
4193
4193
|
if (t.length === 4) {
|
|
4194
4194
|
const n = t[1], r = t[2], s = t[3], i = `#${n}${n}${r}${r}${s}${s}`;
|
|
4195
|
-
if (
|
|
4195
|
+
if (Vt.safeParse(i).success) return kt(i);
|
|
4196
4196
|
}
|
|
4197
|
-
return (t.length === 7 || t.length === 9) &&
|
|
4197
|
+
return (t.length === 7 || t.length === 9) && Vt.safeParse(t).success ? kt(t) : void 0;
|
|
4198
4198
|
}
|
|
4199
4199
|
if (t.startsWith("rgb")) {
|
|
4200
4200
|
const n = t.match(
|
|
@@ -4207,8 +4207,8 @@ const rc = c.object({
|
|
|
4207
4207
|
}
|
|
4208
4208
|
if (un[t]) return kt(un[t]);
|
|
4209
4209
|
}
|
|
4210
|
-
},
|
|
4211
|
-
e =
|
|
4210
|
+
}, Ec = (e) => {
|
|
4211
|
+
e = gr.parse(e);
|
|
4212
4212
|
let [t, n, r] = e;
|
|
4213
4213
|
const s = e[3];
|
|
4214
4214
|
t /= 360, n /= 100, r /= 100;
|
|
@@ -4220,7 +4220,7 @@ const rc = c.object({
|
|
|
4220
4220
|
i = ie(l, u, t + 1 / 3), o = ie(l, u, t), a = ie(l, u, t - 1 / 3);
|
|
4221
4221
|
}
|
|
4222
4222
|
return [Math.round(i * 255), Math.round(o * 255), Math.round(a * 255), s];
|
|
4223
|
-
}, ie = (e, t, n) => (n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e),
|
|
4223
|
+
}, ie = (e, t, n) => (n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e), Sc = (e) => {
|
|
4224
4224
|
e = Kt.parse(e);
|
|
4225
4225
|
let [t, n, r] = e;
|
|
4226
4226
|
const s = e[3];
|
|
@@ -4234,12 +4234,12 @@ const rc = c.object({
|
|
|
4234
4234
|
u = l > 0.5 ? h / (2 - i - o) : h / (i + o), i === t ? a = (n - r) / h + (n < r ? 6 : 0) : i === n ? a = (r - t) / h + 2 : a = (t - n) / h + 4, a /= 6;
|
|
4235
4235
|
}
|
|
4236
4236
|
return a *= 360, u *= 100, l *= 100, [Math.round(a), Math.round(u), Math.round(l), s];
|
|
4237
|
-
},
|
|
4237
|
+
}, Tc = N("#000000"), $c = N("#ffffff"), br = c.object({
|
|
4238
4238
|
key: c.string(),
|
|
4239
4239
|
color: Qt,
|
|
4240
4240
|
position: c.number(),
|
|
4241
4241
|
switched: c.boolean().optional()
|
|
4242
|
-
}),
|
|
4242
|
+
}), Uc = c.array(br), jc = (e, t) => {
|
|
4243
4243
|
if (e.length === 0) return Ke;
|
|
4244
4244
|
if (e = e.slice().sort((n, r) => n.position - r.position), t <= e[0].position) return N(e[0].color);
|
|
4245
4245
|
if (t >= e[e.length - 1].position)
|
|
@@ -4259,18 +4259,18 @@ const rc = c.object({
|
|
|
4259
4259
|
return N([u, l, h, y]);
|
|
4260
4260
|
}
|
|
4261
4261
|
return N(e[e.length - 1].color);
|
|
4262
|
-
},
|
|
4262
|
+
}, Cc = c.object({
|
|
4263
4263
|
key: c.string(),
|
|
4264
4264
|
name: c.string(),
|
|
4265
4265
|
color: te
|
|
4266
|
-
}),
|
|
4266
|
+
}), Bc = c.object({
|
|
4267
4267
|
key: c.string(),
|
|
4268
4268
|
name: c.string(),
|
|
4269
|
-
swatches: c.array(
|
|
4270
|
-
}),
|
|
4269
|
+
swatches: c.array(Cc)
|
|
4270
|
+
}), Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4271
4271
|
__proto__: null,
|
|
4272
|
-
BLACK:
|
|
4273
|
-
WHITE:
|
|
4272
|
+
BLACK: Tc,
|
|
4273
|
+
WHITE: $c,
|
|
4274
4274
|
ZERO: Ke,
|
|
4275
4275
|
aValue: xt,
|
|
4276
4276
|
bValue: Ot,
|
|
@@ -4278,85 +4278,101 @@ const rc = c.object({
|
|
|
4278
4278
|
construct: N,
|
|
4279
4279
|
contrast: we,
|
|
4280
4280
|
crudeZ: Qt,
|
|
4281
|
-
cssString:
|
|
4282
|
-
equals:
|
|
4283
|
-
fromCSS:
|
|
4284
|
-
fromGradient:
|
|
4285
|
-
fromHSLA:
|
|
4281
|
+
cssString: gc,
|
|
4282
|
+
equals: yr,
|
|
4283
|
+
fromCSS: Ac,
|
|
4284
|
+
fromGradient: jc,
|
|
4285
|
+
fromHSLA: Ec,
|
|
4286
4286
|
gValue: wt,
|
|
4287
|
-
gradientZ:
|
|
4288
|
-
grayness:
|
|
4289
|
-
hex:
|
|
4290
|
-
hsla:
|
|
4291
|
-
isColor:
|
|
4292
|
-
isCrude:
|
|
4293
|
-
isDark:
|
|
4294
|
-
isLight:
|
|
4295
|
-
isZero:
|
|
4287
|
+
gradientZ: Uc,
|
|
4288
|
+
grayness: xc,
|
|
4289
|
+
hex: yc,
|
|
4290
|
+
hsla: wc,
|
|
4291
|
+
isColor: dc,
|
|
4292
|
+
isCrude: hc,
|
|
4293
|
+
isDark: Nc,
|
|
4294
|
+
isLight: vc,
|
|
4295
|
+
isZero: bc,
|
|
4296
4296
|
luminance: vt,
|
|
4297
|
-
paletteZ:
|
|
4298
|
-
pickByContrast:
|
|
4297
|
+
paletteZ: Bc,
|
|
4298
|
+
pickByContrast: Ic,
|
|
4299
4299
|
rValue: bt,
|
|
4300
|
-
rgbCSS:
|
|
4301
|
-
rgbString:
|
|
4302
|
-
rgba1:
|
|
4303
|
-
rgbaCSS:
|
|
4304
|
-
setAlpha:
|
|
4305
|
-
stopZ:
|
|
4306
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4307
|
-
lower:
|
|
4308
|
-
upper:
|
|
4309
|
-
},
|
|
4300
|
+
rgbCSS: mc,
|
|
4301
|
+
rgbString: pr,
|
|
4302
|
+
rgba1: pc,
|
|
4303
|
+
rgbaCSS: mr,
|
|
4304
|
+
setAlpha: Oc,
|
|
4305
|
+
stopZ: br
|
|
4306
|
+
}, Symbol.toStringTag, { value: "Module" })), wr = c.int().min(0).max(255), Or = 255, xr = 0, Rc = {
|
|
4307
|
+
lower: xr,
|
|
4308
|
+
upper: Or + 1
|
|
4309
|
+
}, Ir = c.object({
|
|
4310
4310
|
name: c.string(),
|
|
4311
4311
|
key: c.string()
|
|
4312
4312
|
}), Mt = (e) => c.object({
|
|
4313
|
-
subject:
|
|
4313
|
+
subject: Ir,
|
|
4314
4314
|
resource: e,
|
|
4315
|
-
authority:
|
|
4316
|
-
}),
|
|
4315
|
+
authority: wr
|
|
4316
|
+
}), Pc = (...e) => (t) => t.filter((n) => {
|
|
4317
4317
|
let r = !1;
|
|
4318
4318
|
return n.to != null && (r = e.includes(n.to.resource)), n.from != null && !r && (r = e.includes(n.from.resource)), r;
|
|
4319
|
-
}),
|
|
4319
|
+
}), Nr = (e) => c.object({
|
|
4320
4320
|
from: Mt(e),
|
|
4321
4321
|
to: c.null()
|
|
4322
|
-
}),
|
|
4322
|
+
}), vr = (e) => c.object({
|
|
4323
4323
|
from: c.null(),
|
|
4324
4324
|
to: Mt(e)
|
|
4325
|
-
}),
|
|
4326
|
-
Ir(e),
|
|
4325
|
+
}), Lc = (e) => c.union([
|
|
4327
4326
|
Nr(e),
|
|
4327
|
+
vr(e),
|
|
4328
4328
|
c.object({
|
|
4329
4329
|
from: Mt(e),
|
|
4330
4330
|
to: Mt(e)
|
|
4331
4331
|
})
|
|
4332
|
-
]),
|
|
4332
|
+
]), ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4333
4333
|
__proto__: null,
|
|
4334
|
-
ABSOLUTE_AUTHORITY:
|
|
4335
|
-
AUTHORITY_BOUNDS:
|
|
4336
|
-
ZERO_AUTHORITY:
|
|
4337
|
-
acquireZ:
|
|
4338
|
-
authorityZ:
|
|
4339
|
-
filterTransfersByChannelKey:
|
|
4340
|
-
releaseZ:
|
|
4334
|
+
ABSOLUTE_AUTHORITY: Or,
|
|
4335
|
+
AUTHORITY_BOUNDS: Rc,
|
|
4336
|
+
ZERO_AUTHORITY: xr,
|
|
4337
|
+
acquireZ: vr,
|
|
4338
|
+
authorityZ: wr,
|
|
4339
|
+
filterTransfersByChannelKey: Pc,
|
|
4340
|
+
releaseZ: Nr,
|
|
4341
4341
|
stateZ: Mt,
|
|
4342
|
-
subjectZ:
|
|
4343
|
-
transferZ:
|
|
4344
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4342
|
+
subjectZ: Ir,
|
|
4343
|
+
transferZ: Lc
|
|
4344
|
+
}, Symbol.toStringTag, { value: "Module" })), kc = (e) => {
|
|
4345
|
+
switch (typeof e) {
|
|
4346
|
+
case "bigint":
|
|
4347
|
+
case "number":
|
|
4348
|
+
return e.toString();
|
|
4349
|
+
case "boolean":
|
|
4350
|
+
return e ? "1" : "0";
|
|
4351
|
+
case "undefined":
|
|
4352
|
+
return "";
|
|
4353
|
+
case "string":
|
|
4354
|
+
case "symbol":
|
|
4355
|
+
case "function":
|
|
4356
|
+
return ln(e.toString());
|
|
4357
|
+
case "object":
|
|
4358
|
+
return e == null ? "" : ln(JSON.stringify(e));
|
|
4359
|
+
}
|
|
4360
|
+
}, Zc = /[",\n]/, ln = (e) => Zc.test(e) ? `"${e.replace(/"/g, '""')}"` : e, Zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4345
4361
|
__proto__: null,
|
|
4346
|
-
|
|
4347
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4362
|
+
formatValue: kc
|
|
4363
|
+
}, Symbol.toStringTag, { value: "Module" })), _u = (e, t) => {
|
|
4348
4364
|
let n = null;
|
|
4349
4365
|
return t === 0 ? e : (...s) => {
|
|
4350
4366
|
n !== null && (clearTimeout(n), n = null), n = setTimeout(() => e(...s), t);
|
|
4351
4367
|
};
|
|
4352
|
-
},
|
|
4368
|
+
}, qu = (e, t) => {
|
|
4353
4369
|
let n = null;
|
|
4354
4370
|
return t === 0 ? e : (...s) => {
|
|
4355
4371
|
n === null && (n = setTimeout(() => {
|
|
4356
4372
|
e(...s), n = null;
|
|
4357
4373
|
}, t));
|
|
4358
4374
|
};
|
|
4359
|
-
},
|
|
4375
|
+
}, _c = (e) => {
|
|
4360
4376
|
try {
|
|
4361
4377
|
return structuredClone(e);
|
|
4362
4378
|
} catch {
|
|
@@ -4365,7 +4381,7 @@ const rc = c.object({
|
|
|
4365
4381
|
e
|
|
4366
4382
|
), console.trace(), JSON.parse(JSON.stringify(e));
|
|
4367
4383
|
}
|
|
4368
|
-
},
|
|
4384
|
+
}, qc = (e, t, n = "") => {
|
|
4369
4385
|
const r = {}, s = (i, o, a) => {
|
|
4370
4386
|
if (typeof i != typeof o || i === null || o === null) {
|
|
4371
4387
|
r[a] = [i, o];
|
|
@@ -4410,18 +4426,18 @@ const rc = c.object({
|
|
|
4410
4426
|
} else if (a !== u) return !1;
|
|
4411
4427
|
}
|
|
4412
4428
|
return !0;
|
|
4413
|
-
},
|
|
4429
|
+
}, Mr = (e, t) => {
|
|
4414
4430
|
if (typeof e != "object" || e == null) return e === t;
|
|
4415
4431
|
const n = Object.keys(e), r = Object.keys(t);
|
|
4416
4432
|
if (r.length > n.length) return !1;
|
|
4417
4433
|
for (const s of r) {
|
|
4418
4434
|
const i = e[s], o = t[s];
|
|
4419
4435
|
if (typeof i == "object" && typeof o == "object") {
|
|
4420
|
-
if (!
|
|
4436
|
+
if (!Mr(i, o)) return !1;
|
|
4421
4437
|
} else if (i !== o) return !1;
|
|
4422
4438
|
}
|
|
4423
4439
|
return !0;
|
|
4424
|
-
}, C = ".",
|
|
4440
|
+
}, C = ".", Ar = (e, t, n = C) => {
|
|
4425
4441
|
const r = e.split(n);
|
|
4426
4442
|
return r.map((i, o) => {
|
|
4427
4443
|
const a = t(i, o, r);
|
|
@@ -4434,15 +4450,15 @@ const rc = c.object({
|
|
|
4434
4450
|
const r = e[0];
|
|
4435
4451
|
if (typeof r == "object" && "key" in r)
|
|
4436
4452
|
return e.find((s) => s.key === t);
|
|
4437
|
-
},
|
|
4453
|
+
}, Fc = (e, t) => {
|
|
4438
4454
|
const n = e.split(C);
|
|
4439
4455
|
return n.forEach((r, s) => {
|
|
4440
4456
|
t = dt(t, r), t != null && typeof t == "object" && "key" in t && (n[s] = t.key);
|
|
4441
4457
|
}), n.join(C);
|
|
4442
|
-
},
|
|
4458
|
+
}, Wc = (e, t) => {
|
|
4443
4459
|
const n = e.split(C);
|
|
4444
4460
|
return t < 0 ? n[n.length + t] : n[t];
|
|
4445
|
-
},
|
|
4461
|
+
}, Vc = (e, t) => {
|
|
4446
4462
|
if (t.length === 0) return !0;
|
|
4447
4463
|
const n = e.split(C), r = t.split(C);
|
|
4448
4464
|
if (r.length > n.length) return !1;
|
|
@@ -4501,7 +4517,7 @@ const rc = c.object({
|
|
|
4501
4517
|
throw s instanceof TypeError ? new TypeError(`.${r}: ${s.message}`) : s;
|
|
4502
4518
|
}
|
|
4503
4519
|
return Ie(e, ...t);
|
|
4504
|
-
},
|
|
4520
|
+
}, Yc = (e, t, n) => {
|
|
4505
4521
|
const r = (s, i, o) => {
|
|
4506
4522
|
if (o.def?.type === "union")
|
|
4507
4523
|
return o.def.options.reduce(
|
|
@@ -4531,7 +4547,7 @@ const rc = c.object({
|
|
|
4531
4547
|
return s;
|
|
4532
4548
|
};
|
|
4533
4549
|
return r({ ...e }, t, n);
|
|
4534
|
-
},
|
|
4550
|
+
}, Gc = (e, t) => {
|
|
4535
4551
|
const n = t.split(C);
|
|
4536
4552
|
let r = e, s = 0;
|
|
4537
4553
|
for (; s < n.length; ) {
|
|
@@ -4591,7 +4607,7 @@ const rc = c.object({
|
|
|
4591
4607
|
r = o, s++;
|
|
4592
4608
|
}
|
|
4593
4609
|
}
|
|
4594
|
-
},
|
|
4610
|
+
}, Hc = (e, t, n) => {
|
|
4595
4611
|
const r = t.split(C);
|
|
4596
4612
|
let s = e, i = 0;
|
|
4597
4613
|
for (; i < r.length - 1; ) {
|
|
@@ -4646,41 +4662,41 @@ const rc = c.object({
|
|
|
4646
4662
|
} catch (o) {
|
|
4647
4663
|
throw console.error("failed to set value", n, "at path", t, "on object", e), o;
|
|
4648
4664
|
}
|
|
4649
|
-
},
|
|
4665
|
+
}, Fu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4650
4666
|
__proto__: null,
|
|
4651
4667
|
SEPARATOR: C,
|
|
4652
|
-
copy:
|
|
4668
|
+
copy: _c,
|
|
4653
4669
|
defaultGetter: dt,
|
|
4654
|
-
difference:
|
|
4655
|
-
element:
|
|
4670
|
+
difference: qc,
|
|
4671
|
+
element: Wc,
|
|
4656
4672
|
equal: Oe,
|
|
4657
4673
|
findBestKey: xe,
|
|
4658
4674
|
get: Qe,
|
|
4659
4675
|
getIndex: it,
|
|
4660
4676
|
has: zc,
|
|
4661
4677
|
override: Ie,
|
|
4662
|
-
overrideValidItems:
|
|
4663
|
-
partialEqual:
|
|
4664
|
-
pathsMatch:
|
|
4665
|
-
remove:
|
|
4666
|
-
resolvePath:
|
|
4667
|
-
set:
|
|
4668
|
-
transformPath:
|
|
4669
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4678
|
+
overrideValidItems: Yc,
|
|
4679
|
+
partialEqual: Mr,
|
|
4680
|
+
pathsMatch: Vc,
|
|
4681
|
+
remove: Gc,
|
|
4682
|
+
resolvePath: Fc,
|
|
4683
|
+
set: Hc,
|
|
4684
|
+
transformPath: Ar
|
|
4685
|
+
}, Symbol.toStringTag, { value: "Module" })), Wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4670
4686
|
__proto__: null
|
|
4671
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4687
|
+
}, Symbol.toStringTag, { value: "Module" })), Dc = (e) => Object.getOwnPropertySymbols(globalThis).includes(e), Jc = (e, t) => {
|
|
4672
4688
|
const n = Symbol.for(e);
|
|
4673
|
-
if (!
|
|
4689
|
+
if (!Dc(n)) {
|
|
4674
4690
|
const r = t();
|
|
4675
4691
|
Object.defineProperty(globalThis, n, { value: r });
|
|
4676
4692
|
}
|
|
4677
4693
|
return () => globalThis[n];
|
|
4678
|
-
},
|
|
4679
|
-
static discriminator =
|
|
4694
|
+
}, Er = "sy_x_error", Xc = (e) => (t) => t != null && typeof t == "object" && "type" in t && typeof t.type == "string" ? t.type.startsWith(e) : t instanceof Error ? t.message.startsWith(e) : typeof t != "string" ? !1 : t.startsWith(e), St = (e) => class mt extends Error {
|
|
4695
|
+
static discriminator = Er;
|
|
4680
4696
|
discriminator = mt.discriminator;
|
|
4681
4697
|
static TYPE = e;
|
|
4682
4698
|
type = mt.TYPE;
|
|
4683
|
-
static matches =
|
|
4699
|
+
static matches = Xc(e);
|
|
4684
4700
|
matches = mt.matches;
|
|
4685
4701
|
constructor(n, r) {
|
|
4686
4702
|
super(n, r), this.name = mt.TYPE;
|
|
@@ -4688,24 +4704,24 @@ const rc = c.object({
|
|
|
4688
4704
|
static sub(n) {
|
|
4689
4705
|
return St(`${e}.${n}`);
|
|
4690
4706
|
}
|
|
4691
|
-
},
|
|
4707
|
+
}, Sr = (e) => {
|
|
4692
4708
|
if (e == null || typeof e != "object") return !1;
|
|
4693
4709
|
const t = e;
|
|
4694
|
-
if (t.discriminator !==
|
|
4710
|
+
if (t.discriminator !== Er) return !1;
|
|
4695
4711
|
if (!("type" in t))
|
|
4696
4712
|
throw new Error(
|
|
4697
4713
|
`X Error is missing its type property: ${JSON.stringify(t)}`
|
|
4698
4714
|
);
|
|
4699
4715
|
return !0;
|
|
4700
4716
|
}, ot = "unknown", Ne = "nil";
|
|
4701
|
-
class
|
|
4717
|
+
class Kc {
|
|
4702
4718
|
providers = [];
|
|
4703
4719
|
register(t) {
|
|
4704
4720
|
this.providers.push(t);
|
|
4705
4721
|
}
|
|
4706
4722
|
encode(t) {
|
|
4707
4723
|
if (t == null) return { type: Ne, data: "" };
|
|
4708
|
-
if (
|
|
4724
|
+
if (Sr(t))
|
|
4709
4725
|
for (const n of this.providers) {
|
|
4710
4726
|
const r = n.encode(t);
|
|
4711
4727
|
if (r != null) return r;
|
|
@@ -4728,28 +4744,28 @@ class Xc {
|
|
|
4728
4744
|
return new ve(t.data);
|
|
4729
4745
|
}
|
|
4730
4746
|
}
|
|
4731
|
-
const tn =
|
|
4747
|
+
const tn = Jc("synnax-error-registry", () => new Kc()), Qc = ({ encode: e, decode: t }) => tn().register({ encode: e, decode: t }), ta = (e) => tn().encode(e), ea = (e) => e == null ? null : tn().decode(e);
|
|
4732
4748
|
class ve extends St("unknown") {
|
|
4733
4749
|
}
|
|
4734
|
-
const
|
|
4735
|
-
class
|
|
4750
|
+
const na = c.object({ type: c.string(), data: c.string() });
|
|
4751
|
+
class ra extends St("canceled") {
|
|
4736
4752
|
}
|
|
4737
|
-
class
|
|
4753
|
+
class sa extends St("not_implemented") {
|
|
4738
4754
|
}
|
|
4739
|
-
const
|
|
4755
|
+
const Vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4740
4756
|
__proto__: null,
|
|
4741
|
-
Canceled:
|
|
4757
|
+
Canceled: ra,
|
|
4742
4758
|
NONE: Ne,
|
|
4743
|
-
NotImplemented:
|
|
4759
|
+
NotImplemented: sa,
|
|
4744
4760
|
UNKNOWN: ot,
|
|
4745
4761
|
Unknown: ve,
|
|
4746
4762
|
createTyped: St,
|
|
4747
|
-
decode:
|
|
4748
|
-
encode:
|
|
4749
|
-
isTyped:
|
|
4750
|
-
payloadZ:
|
|
4751
|
-
register:
|
|
4752
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4763
|
+
decode: ea,
|
|
4764
|
+
encode: ta,
|
|
4765
|
+
isTyped: Sr,
|
|
4766
|
+
payloadZ: na,
|
|
4767
|
+
register: Qc
|
|
4768
|
+
}, Symbol.toStringTag, { value: "Module" })), Tr = b.object({
|
|
4753
4769
|
jsonrpc: b.literal("2.0"),
|
|
4754
4770
|
method: b.string(),
|
|
4755
4771
|
// params should be z.union([z.record(z.string(), z.json()),
|
|
@@ -4757,12 +4773,12 @@ const Wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4757
4773
|
// definition of params then in the JSON-RPC spec.
|
|
4758
4774
|
params: b.any().optional(),
|
|
4759
4775
|
id: b.union([b.string(), b.number(), b.null()]).optional()
|
|
4760
|
-
}),
|
|
4776
|
+
}), $r = b.object({
|
|
4761
4777
|
jsonrpc: b.literal("2.0"),
|
|
4762
4778
|
id: b.union([b.string(), b.number(), b.null()])
|
|
4763
|
-
}),
|
|
4779
|
+
}), ia = $r.extend({
|
|
4764
4780
|
result: b.json()
|
|
4765
|
-
}),
|
|
4781
|
+
}), oa = $r.extend({
|
|
4766
4782
|
error: b.object({
|
|
4767
4783
|
code: b.number().int(),
|
|
4768
4784
|
// This should be z.string(), but the VSCode JSON RPC implementation uses a looser
|
|
@@ -4770,7 +4786,7 @@ const Wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4770
4786
|
message: b.string().optional(),
|
|
4771
4787
|
data: b.json().optional()
|
|
4772
4788
|
})
|
|
4773
|
-
}),
|
|
4789
|
+
}), Ur = b.union([ia, oa]), jr = b.union([Tr, Ur]), ca = (e) => {
|
|
4774
4790
|
const t = new TextDecoder();
|
|
4775
4791
|
let n = new Uint8Array(0), r = null;
|
|
4776
4792
|
return (s) => {
|
|
@@ -4788,25 +4804,25 @@ const Wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4788
4804
|
if (r !== null && n.length >= r) {
|
|
4789
4805
|
const a = n.slice(0, r);
|
|
4790
4806
|
n = n.slice(r), r = null;
|
|
4791
|
-
const u = t.decode(a), l = at.decodeString(u,
|
|
4807
|
+
const u = t.decode(a), l = at.decodeString(u, jr);
|
|
4792
4808
|
e(l);
|
|
4793
4809
|
} else break;
|
|
4794
4810
|
}
|
|
4795
4811
|
};
|
|
4796
|
-
},
|
|
4812
|
+
}, aa = (e) => {
|
|
4797
4813
|
const t = JSON.stringify(e);
|
|
4798
4814
|
return `Content-Length: ${new TextEncoder().encode(t).length}\r
|
|
4799
4815
|
\r
|
|
4800
4816
|
` + t;
|
|
4801
4817
|
}, zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4802
4818
|
__proto__: null,
|
|
4803
|
-
encodeMessage:
|
|
4804
|
-
messageZ:
|
|
4805
|
-
requestZ:
|
|
4806
|
-
responseZ:
|
|
4807
|
-
streamDecodeChunks:
|
|
4819
|
+
encodeMessage: aa,
|
|
4820
|
+
messageZ: jr,
|
|
4821
|
+
requestZ: Tr,
|
|
4822
|
+
responseZ: Ur,
|
|
4823
|
+
streamDecodeChunks: ca
|
|
4808
4824
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4809
|
-
class
|
|
4825
|
+
class ua {
|
|
4810
4826
|
store = /* @__PURE__ */ new Map();
|
|
4811
4827
|
async get(t) {
|
|
4812
4828
|
return this.store.get(t) ?? null;
|
|
@@ -4824,7 +4840,7 @@ class aa {
|
|
|
4824
4840
|
this.store.clear();
|
|
4825
4841
|
}
|
|
4826
4842
|
}
|
|
4827
|
-
class
|
|
4843
|
+
class la {
|
|
4828
4844
|
store = /* @__PURE__ */ new Map();
|
|
4829
4845
|
get(t) {
|
|
4830
4846
|
return this.store.get(t) ?? null;
|
|
@@ -4836,46 +4852,46 @@ class ua {
|
|
|
4836
4852
|
this.store.delete(t);
|
|
4837
4853
|
}
|
|
4838
4854
|
}
|
|
4839
|
-
const
|
|
4855
|
+
const fa = c.object({ key: c.string(), value: c.string() }), Yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4840
4856
|
__proto__: null,
|
|
4841
|
-
MockAsync:
|
|
4842
|
-
MockSync:
|
|
4843
|
-
stringPairZ:
|
|
4844
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4845
|
-
key:
|
|
4857
|
+
MockAsync: ua,
|
|
4858
|
+
MockSync: la,
|
|
4859
|
+
stringPairZ: fa
|
|
4860
|
+
}, Symbol.toStringTag, { value: "Module" })), Cr = b.uuid(), Br = b.object({
|
|
4861
|
+
key: Cr,
|
|
4846
4862
|
name: b.string().min(1),
|
|
4847
4863
|
color: b.string()
|
|
4848
|
-
}),
|
|
4864
|
+
}), Gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4849
4865
|
__proto__: null,
|
|
4850
|
-
keyZ:
|
|
4851
|
-
labelZ:
|
|
4852
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4866
|
+
keyZ: Cr,
|
|
4867
|
+
labelZ: Br
|
|
4868
|
+
}, Symbol.toStringTag, { value: "Module" })), ha = new RegExp(
|
|
4853
4869
|
"^(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_]*)?$"
|
|
4854
4870
|
// fragment identifier (optional)
|
|
4855
|
-
),
|
|
4871
|
+
), da = (e) => ha.test(e), Hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4856
4872
|
__proto__: null,
|
|
4857
|
-
is:
|
|
4858
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4873
|
+
is: da
|
|
4874
|
+
}, Symbol.toStringTag, { value: "Module" })), ga = (e, t, n) => {
|
|
4859
4875
|
const r = e.get(t);
|
|
4860
4876
|
return r === void 0 ? (e.set(t, n), n) : r;
|
|
4861
|
-
},
|
|
4877
|
+
}, Du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4862
4878
|
__proto__: null,
|
|
4863
|
-
getOrSetDefault:
|
|
4864
|
-
}, Symbol.toStringTag, { value: "Module" })), Me = c.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/),
|
|
4879
|
+
getOrSetDefault: ga
|
|
4880
|
+
}, Symbol.toStringTag, { value: "Module" })), Me = c.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/), ya = (e, t) => {
|
|
4865
4881
|
const n = e.split("."), r = t.split("."), s = Math.max(n.length, r.length);
|
|
4866
4882
|
for (let i = 0; i < s; i++) {
|
|
4867
4883
|
const o = n[i], a = r[i];
|
|
4868
|
-
if (o === void 0) return
|
|
4884
|
+
if (o === void 0) return z;
|
|
4869
4885
|
if (a === void 0) return Y;
|
|
4870
4886
|
const u = /^\d+$/.test(o), l = /^\d+$/.test(a);
|
|
4871
|
-
if (u && !l) return
|
|
4887
|
+
if (u && !l) return z;
|
|
4872
4888
|
if (!u && l) return Y;
|
|
4873
4889
|
if (u && l) {
|
|
4874
4890
|
const h = parseInt(o), y = parseInt(a);
|
|
4875
|
-
if (h < y) return
|
|
4891
|
+
if (h < y) return z;
|
|
4876
4892
|
if (h > y) return Y;
|
|
4877
4893
|
} else {
|
|
4878
|
-
if (o < a) return
|
|
4894
|
+
if (o < a) return z;
|
|
4879
4895
|
if (o > a) return Y;
|
|
4880
4896
|
}
|
|
4881
4897
|
}
|
|
@@ -4884,19 +4900,19 @@ const la = c.object({ key: c.string(), value: c.string() }), Vu = /* @__PURE__ *
|
|
|
4884
4900
|
n.checkMajor ??= !0, n.checkMinor ??= !0, n.checkPatch ??= !0;
|
|
4885
4901
|
const r = Me.parse(e), s = Me.parse(t), [i, o] = r.split("-"), [a, u] = s.split("-"), [l, h, y] = i.split(".").map(Number), [m, A, T] = a.split(".").map(Number);
|
|
4886
4902
|
if (n.checkMajor) {
|
|
4887
|
-
if (l < m) return
|
|
4903
|
+
if (l < m) return z;
|
|
4888
4904
|
if (l > m) return Y;
|
|
4889
4905
|
}
|
|
4890
4906
|
if (n.checkMinor) {
|
|
4891
|
-
if (h < A) return
|
|
4907
|
+
if (h < A) return z;
|
|
4892
4908
|
if (h > A) return Y;
|
|
4893
4909
|
}
|
|
4894
4910
|
if (n.checkPatch) {
|
|
4895
|
-
if (y < T) return
|
|
4911
|
+
if (y < T) return z;
|
|
4896
4912
|
if (y > T) return Y;
|
|
4897
4913
|
}
|
|
4898
|
-
return o === void 0 && u === void 0 ? st : o === void 0 ? Y : u === void 0 ?
|
|
4899
|
-
}),
|
|
4914
|
+
return o === void 0 && u === void 0 ? st : o === void 0 ? Y : u === void 0 ? z : ya(o, u);
|
|
4915
|
+
}), ma = (e, t, n = {}) => An(Tt(e, t, n)), Rr = (e, t, n = {}) => Mn(Tt(e, t, n)), pa = (e, t, n = {}) => vn(Tt(e, t, n)), ba = ({
|
|
4900
4916
|
name: e,
|
|
4901
4917
|
migrate: t
|
|
4902
4918
|
}) => (n) => {
|
|
@@ -4906,7 +4922,7 @@ const la = c.object({ key: c.string(), value: c.string() }), Vu = /* @__PURE__ *
|
|
|
4906
4922
|
} catch (r) {
|
|
4907
4923
|
throw console.log(`${e} failed to migrate from ${n.version}`), console.error(r), r;
|
|
4908
4924
|
}
|
|
4909
|
-
},
|
|
4925
|
+
}, wa = ({
|
|
4910
4926
|
name: e,
|
|
4911
4927
|
migrations: t,
|
|
4912
4928
|
targetSchema: n,
|
|
@@ -4932,7 +4948,7 @@ const la = c.object({ key: c.string(), value: c.string() }), Vu = /* @__PURE__ *
|
|
|
4932
4948
|
let a = !1;
|
|
4933
4949
|
const u = (l) => {
|
|
4934
4950
|
try {
|
|
4935
|
-
if (o === 0 ||
|
|
4951
|
+
if (o === 0 || Rr(l.version, i))
|
|
4936
4952
|
return console.log(a ? `${e} ${l.version} now up to date` : `${e} version ${l.version} is up to date with target version ${s.version}`), l;
|
|
4937
4953
|
const h = l.version, y = t[h], m = y(l);
|
|
4938
4954
|
return a = !0, u(m);
|
|
@@ -4958,16 +4974,16 @@ const la = c.object({ key: c.string(), value: c.string() }), Vu = /* @__PURE__ *
|
|
|
4958
4974
|
return console.log(`${e} failed to parse final result. Exiting with default`), console.error(h), s;
|
|
4959
4975
|
}
|
|
4960
4976
|
};
|
|
4961
|
-
},
|
|
4977
|
+
}, Ju = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4962
4978
|
__proto__: null,
|
|
4963
4979
|
compareSemVer: Tt,
|
|
4964
|
-
createMigration:
|
|
4965
|
-
migrator:
|
|
4966
|
-
semVerNewer:
|
|
4967
|
-
semVerOlder:
|
|
4980
|
+
createMigration: ba,
|
|
4981
|
+
migrator: wa,
|
|
4982
|
+
semVerNewer: Rr,
|
|
4983
|
+
semVerOlder: pa,
|
|
4968
4984
|
semVerZ: Me,
|
|
4969
|
-
versionsEqual:
|
|
4970
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4985
|
+
versionsEqual: ma
|
|
4986
|
+
}, Symbol.toStringTag, { value: "Module" })), Pr = ["standard", "scientific", "engineering"], Oa = c.enum(Pr), xa = (e, t, n) => {
|
|
4971
4987
|
if (Number.isNaN(e)) return "NaN";
|
|
4972
4988
|
if (e === 1 / 0) return "∞";
|
|
4973
4989
|
if (e === -1 / 0) return "-∞";
|
|
@@ -4976,13 +4992,13 @@ const la = c.object({ key: c.string(), value: c.string() }), Vu = /* @__PURE__ *
|
|
|
4976
4992
|
return t === 0 ? "0ᴇ0" : `0.${"0".repeat(t)}ᴇ0`;
|
|
4977
4993
|
let r;
|
|
4978
4994
|
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}`;
|
|
4979
|
-
},
|
|
4995
|
+
}, Xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4980
4996
|
__proto__: null,
|
|
4981
|
-
NOTATIONS:
|
|
4982
|
-
notationZ:
|
|
4983
|
-
stringifyNumber:
|
|
4997
|
+
NOTATIONS: Pr,
|
|
4998
|
+
notationZ: Oa,
|
|
4999
|
+
stringifyNumber: xa
|
|
4984
5000
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4985
|
-
class
|
|
5001
|
+
class Ia {
|
|
4986
5002
|
handlers;
|
|
4987
5003
|
transform;
|
|
4988
5004
|
closer;
|
|
@@ -5010,7 +5026,7 @@ class xa {
|
|
|
5010
5026
|
return await this.closer?.();
|
|
5011
5027
|
}
|
|
5012
5028
|
}
|
|
5013
|
-
class
|
|
5029
|
+
class Na {
|
|
5014
5030
|
handlers;
|
|
5015
5031
|
constructor(t) {
|
|
5016
5032
|
this.handlers = t ?? /* @__PURE__ */ new Map();
|
|
@@ -5022,33 +5038,33 @@ class Ia {
|
|
|
5022
5038
|
this.handlers.forEach((n, r) => r(t));
|
|
5023
5039
|
}
|
|
5024
5040
|
}
|
|
5025
|
-
const
|
|
5041
|
+
const Ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5026
5042
|
__proto__: null,
|
|
5027
|
-
BaseObserver:
|
|
5028
|
-
Observer:
|
|
5029
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5043
|
+
BaseObserver: Na,
|
|
5044
|
+
Observer: Ia
|
|
5045
|
+
}, Symbol.toStringTag, { value: "Module" })), Qu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5030
5046
|
__proto__: null
|
|
5031
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5047
|
+
}, Symbol.toStringTag, { value: "Module" })), va = c.record(
|
|
5032
5048
|
c.union([c.number(), c.string(), c.symbol()]),
|
|
5033
5049
|
c.unknown()
|
|
5034
|
-
), en = (e) => Object.entries(e),
|
|
5050
|
+
), en = (e) => Object.entries(e), Ma = (e, t) => Object.fromEntries(en(e).map(([n, r]) => [n, t(r, n)])), Aa = (e) => Object.fromEntries(en(e).filter(([t, n]) => n !== void 0)), Ea = (e, ...t) => {
|
|
5035
5051
|
const n = { ...e };
|
|
5036
5052
|
for (const r of t) delete n[r];
|
|
5037
5053
|
return n;
|
|
5038
|
-
},
|
|
5054
|
+
}, tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5039
5055
|
__proto__: null,
|
|
5040
5056
|
entries: en,
|
|
5041
|
-
map:
|
|
5042
|
-
omit:
|
|
5043
|
-
purgeUndefined:
|
|
5044
|
-
unknownZ:
|
|
5045
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5057
|
+
map: Ma,
|
|
5058
|
+
omit: Ea,
|
|
5059
|
+
purgeUndefined: Aa,
|
|
5060
|
+
unknownZ: va
|
|
5061
|
+
}, Symbol.toStringTag, { value: "Module" })), Lr = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", Sa = Lr(), kr = ["macOS", "Windows", "Linux"], Ta = ["macos", "windows", "linux"], $a = {
|
|
5046
5062
|
macos: "macOS",
|
|
5047
5063
|
windows: "Windows",
|
|
5048
5064
|
linux: "Linux"
|
|
5049
|
-
},
|
|
5050
|
-
c.enum(
|
|
5051
|
-
),
|
|
5065
|
+
}, Ua = c.enum(kr).or(
|
|
5066
|
+
c.enum(Ta).transform((e) => $a[e])
|
|
5067
|
+
), ja = () => {
|
|
5052
5068
|
if (typeof window > "u") return;
|
|
5053
5069
|
const e = window.navigator.userAgent.toLowerCase();
|
|
5054
5070
|
if (e.includes("mac")) return "macOS";
|
|
@@ -5056,79 +5072,79 @@ const Xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5056
5072
|
if (e.includes("linux")) return "Linux";
|
|
5057
5073
|
};
|
|
5058
5074
|
let Bt;
|
|
5059
|
-
const
|
|
5075
|
+
const Ca = ((e = {}) => {
|
|
5060
5076
|
const { force: t, default: n } = e;
|
|
5061
|
-
return t ?? Bt ?? (Bt =
|
|
5062
|
-
}),
|
|
5077
|
+
return t ?? Bt ?? (Bt = ja(), Bt ?? n);
|
|
5078
|
+
}), el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5063
5079
|
__proto__: null,
|
|
5064
|
-
OPERATING_SYSTEMS:
|
|
5065
|
-
RUNTIME:
|
|
5066
|
-
detect:
|
|
5067
|
-
getOS:
|
|
5068
|
-
osZ:
|
|
5069
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5080
|
+
OPERATING_SYSTEMS: kr,
|
|
5081
|
+
RUNTIME: Sa,
|
|
5082
|
+
detect: Lr,
|
|
5083
|
+
getOS: Ca,
|
|
5084
|
+
osZ: Ua
|
|
5085
|
+
}, Symbol.toStringTag, { value: "Module" })), Ba = () => Promise.resolve(), Ra = () => new Promise((e) => setTimeout(e, 0)), nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5070
5086
|
__proto__: null,
|
|
5071
|
-
flushMicrotasks:
|
|
5072
|
-
flushTaskQueue:
|
|
5073
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5087
|
+
flushMicrotasks: Ba,
|
|
5088
|
+
flushTaskQueue: Ra
|
|
5089
|
+
}, Symbol.toStringTag, { value: "Module" })), Pa = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e !== null ? { ...e } : e, rl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5074
5090
|
__proto__: null,
|
|
5075
|
-
copy:
|
|
5076
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5091
|
+
copy: Pa
|
|
5092
|
+
}, Symbol.toStringTag, { value: "Module" })), Zr = c.enum([
|
|
5077
5093
|
"success",
|
|
5078
5094
|
"info",
|
|
5079
5095
|
"warning",
|
|
5080
5096
|
"error",
|
|
5081
5097
|
"loading",
|
|
5082
5098
|
"disabled"
|
|
5083
|
-
]),
|
|
5099
|
+
]), La = (e) => c.object({
|
|
5084
5100
|
key: c.string(),
|
|
5085
5101
|
name: c.string().default(""),
|
|
5086
|
-
variant:
|
|
5102
|
+
variant: Zr,
|
|
5087
5103
|
message: c.string(),
|
|
5088
5104
|
description: c.string().optional(),
|
|
5089
5105
|
time: d.z,
|
|
5090
|
-
labels:
|
|
5106
|
+
labels: dn(Br).optional(),
|
|
5091
5107
|
details: e ?? c.unknown().optional()
|
|
5092
|
-
}),
|
|
5108
|
+
}), ka = c.object({
|
|
5093
5109
|
stack: c.string(),
|
|
5094
5110
|
error: c.instanceof(Error)
|
|
5095
|
-
}),
|
|
5111
|
+
}), Za = (e, t) => {
|
|
5096
5112
|
if (!(e instanceof Error)) throw e;
|
|
5097
|
-
return
|
|
5113
|
+
return _r({
|
|
5098
5114
|
variant: "error",
|
|
5099
5115
|
message: t ?? e.message,
|
|
5100
5116
|
description: t != null ? e.message : void 0,
|
|
5101
5117
|
details: { stack: e.stack ?? "", error: e }
|
|
5102
5118
|
});
|
|
5103
|
-
},
|
|
5119
|
+
}, _r = (e) => ({
|
|
5104
5120
|
key: Se(),
|
|
5105
5121
|
time: d.now(),
|
|
5106
5122
|
name: "",
|
|
5107
5123
|
...e
|
|
5108
|
-
}),
|
|
5124
|
+
}), _a = (e, t = []) => {
|
|
5109
5125
|
if (e != null)
|
|
5110
5126
|
return Array.isArray(t) ? t.includes(e) ? e : void 0 : t === e ? e : void 0;
|
|
5111
|
-
},
|
|
5127
|
+
}, qa = (e, t = []) => {
|
|
5112
5128
|
if (e != null)
|
|
5113
5129
|
return Array.isArray(t) ? t.includes(e) ? void 0 : e : t === e ? void 0 : e;
|
|
5114
|
-
},
|
|
5130
|
+
}, sl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5115
5131
|
__proto__: null,
|
|
5116
|
-
create:
|
|
5117
|
-
exceptionDetailsSchema:
|
|
5118
|
-
fromException:
|
|
5119
|
-
keepVariants:
|
|
5120
|
-
removeVariants:
|
|
5121
|
-
statusZ:
|
|
5122
|
-
variantZ:
|
|
5123
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5132
|
+
create: _r,
|
|
5133
|
+
exceptionDetailsSchema: ka,
|
|
5134
|
+
fromException: Za,
|
|
5135
|
+
keepVariants: _a,
|
|
5136
|
+
removeVariants: qa,
|
|
5137
|
+
statusZ: La,
|
|
5138
|
+
variantZ: Zr
|
|
5139
|
+
}, Symbol.toStringTag, { value: "Module" })), Fa = (e, t) => {
|
|
5124
5140
|
if (!t.has(e)) return e;
|
|
5125
5141
|
let n = e, r = 1, s = e;
|
|
5126
5142
|
for (; t.has(s); ) {
|
|
5127
|
-
const i = s.match(
|
|
5143
|
+
const i = s.match(Wa);
|
|
5128
5144
|
i ? (n = s.slice(0, i.index).trim(), r = parseInt(i[1]) + 1) : (n = s, r = 1), s = `${n} (${r})`;
|
|
5129
5145
|
}
|
|
5130
5146
|
return s;
|
|
5131
|
-
},
|
|
5147
|
+
}, Wa = /\((\d+)\)$/, Va = (e, t = "") => {
|
|
5132
5148
|
if (typeof e == "string") return e;
|
|
5133
5149
|
const n = e.length;
|
|
5134
5150
|
return n === 0 ? t : n === 1 ? e[0] : n === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")}, and ${e[n - 1]}`;
|
|
@@ -5150,14 +5166,14 @@ const ja = ((e = {}) => {
|
|
|
5150
5166
|
return n.add(o.join("").replace(/-/g, "_")), n.add(o.join("_").replace(/-/g, "_")), Array.from(n).filter(
|
|
5151
5167
|
(u) => u.length >= 2 && u.length <= 12 && !/^\d/.test(u)
|
|
5152
5168
|
);
|
|
5153
|
-
},
|
|
5169
|
+
}, Ya = (e, t) => e.startsWith(t) ? e.slice(t.length) : e, il = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5154
5170
|
__proto__: null,
|
|
5155
5171
|
createShortIdentifiers: za,
|
|
5156
|
-
deduplicateFileName:
|
|
5157
|
-
naturalLanguageJoin:
|
|
5158
|
-
trimPrefix:
|
|
5159
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5160
|
-
var
|
|
5172
|
+
deduplicateFileName: Fa,
|
|
5173
|
+
naturalLanguageJoin: Va,
|
|
5174
|
+
trimPrefix: Ya
|
|
5175
|
+
}, Symbol.toStringTag, { value: "Module" })), Ga = new Error("request for lock canceled");
|
|
5176
|
+
var Ha = function(e, t, n, r) {
|
|
5161
5177
|
function s(i) {
|
|
5162
5178
|
return i instanceof n ? i : new n(function(o) {
|
|
5163
5179
|
o(i);
|
|
@@ -5184,20 +5200,20 @@ var Ga = function(e, t, n, r) {
|
|
|
5184
5200
|
l((r = r.apply(e, t || [])).next());
|
|
5185
5201
|
});
|
|
5186
5202
|
};
|
|
5187
|
-
class
|
|
5188
|
-
constructor(t, n =
|
|
5203
|
+
class Da {
|
|
5204
|
+
constructor(t, n = Ga) {
|
|
5189
5205
|
this._value = t, this._cancelError = n, this._queue = [], this._weightedWaiters = [];
|
|
5190
5206
|
}
|
|
5191
5207
|
acquire(t = 1, n = 0) {
|
|
5192
5208
|
if (t <= 0)
|
|
5193
5209
|
throw new Error(`invalid weight ${t}: must be positive`);
|
|
5194
5210
|
return new Promise((r, s) => {
|
|
5195
|
-
const i = { resolve: r, reject: s, weight: t, priority: n }, o =
|
|
5211
|
+
const i = { resolve: r, reject: s, weight: t, priority: n }, o = qr(this._queue, (a) => n <= a.priority);
|
|
5196
5212
|
o === -1 && t <= this._value ? this._dispatchItem(i) : this._queue.splice(o + 1, 0, i);
|
|
5197
5213
|
});
|
|
5198
5214
|
}
|
|
5199
5215
|
runExclusive(t) {
|
|
5200
|
-
return
|
|
5216
|
+
return Ha(this, arguments, void 0, function* (n, r = 1, s = 0) {
|
|
5201
5217
|
const [i, o] = yield this.acquire(r, s);
|
|
5202
5218
|
try {
|
|
5203
5219
|
return yield n(i);
|
|
@@ -5210,7 +5226,7 @@ class Ha {
|
|
|
5210
5226
|
if (t <= 0)
|
|
5211
5227
|
throw new Error(`invalid weight ${t}: must be positive`);
|
|
5212
5228
|
return this._couldLockImmediately(t, n) ? Promise.resolve() : new Promise((r) => {
|
|
5213
|
-
this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []),
|
|
5229
|
+
this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []), Ja(this._weightedWaiters[t - 1], { resolve: r, priority: n });
|
|
5214
5230
|
});
|
|
5215
5231
|
}
|
|
5216
5232
|
isLocked() {
|
|
@@ -5265,17 +5281,17 @@ class Ha {
|
|
|
5265
5281
|
return (this._queue.length === 0 || this._queue[0].priority < n) && t <= this._value;
|
|
5266
5282
|
}
|
|
5267
5283
|
}
|
|
5268
|
-
function
|
|
5269
|
-
const n =
|
|
5284
|
+
function Ja(e, t) {
|
|
5285
|
+
const n = qr(e, (r) => t.priority <= r.priority);
|
|
5270
5286
|
e.splice(n + 1, 0, t);
|
|
5271
5287
|
}
|
|
5272
|
-
function
|
|
5288
|
+
function qr(e, t) {
|
|
5273
5289
|
for (let n = e.length - 1; n >= 0; n--)
|
|
5274
5290
|
if (t(e[n]))
|
|
5275
5291
|
return n;
|
|
5276
5292
|
return -1;
|
|
5277
5293
|
}
|
|
5278
|
-
var
|
|
5294
|
+
var Xa = function(e, t, n, r) {
|
|
5279
5295
|
function s(i) {
|
|
5280
5296
|
return i instanceof n ? i : new n(function(o) {
|
|
5281
5297
|
o(i);
|
|
@@ -5302,12 +5318,12 @@ var Ja = function(e, t, n, r) {
|
|
|
5302
5318
|
l((r = r.apply(e, t || [])).next());
|
|
5303
5319
|
});
|
|
5304
5320
|
};
|
|
5305
|
-
class
|
|
5321
|
+
class Ka {
|
|
5306
5322
|
constructor(t) {
|
|
5307
|
-
this._semaphore = new
|
|
5323
|
+
this._semaphore = new Da(1, t);
|
|
5308
5324
|
}
|
|
5309
5325
|
acquire() {
|
|
5310
|
-
return
|
|
5326
|
+
return Xa(this, arguments, void 0, function* (t = 0) {
|
|
5311
5327
|
const [, n] = yield this._semaphore.acquire(1, t);
|
|
5312
5328
|
return n;
|
|
5313
5329
|
});
|
|
@@ -5328,24 +5344,24 @@ class Xa {
|
|
|
5328
5344
|
return this._semaphore.cancel();
|
|
5329
5345
|
}
|
|
5330
5346
|
}
|
|
5331
|
-
class
|
|
5347
|
+
class Fr extends Ka {
|
|
5332
5348
|
constructor(t) {
|
|
5333
5349
|
super(), Object.assign(this, t);
|
|
5334
5350
|
}
|
|
5335
5351
|
}
|
|
5336
|
-
const
|
|
5352
|
+
const Qa = (e) => new Fr(e), ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5337
5353
|
__proto__: null,
|
|
5338
|
-
mutex:
|
|
5339
|
-
newMutex:
|
|
5340
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5354
|
+
mutex: Fr,
|
|
5355
|
+
newMutex: Qa
|
|
5356
|
+
}, Symbol.toStringTag, { value: "Module" })), tu = (e) => JSON.stringify(e, (t, n) => typeof n == "bigint" ? n.toString() : n), eu = async (e, t = 200, n = 20) => {
|
|
5341
5357
|
const r = Date.now();
|
|
5342
5358
|
for (; Date.now() - r < t; )
|
|
5343
5359
|
await e(), await new Promise((s) => setTimeout(s, n));
|
|
5344
|
-
},
|
|
5360
|
+
}, cl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5345
5361
|
__proto__: null,
|
|
5346
|
-
expectAlways:
|
|
5347
|
-
toString:
|
|
5348
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5362
|
+
expectAlways: eu,
|
|
5363
|
+
toString: tu
|
|
5364
|
+
}, Symbol.toStringTag, { value: "Module" })), nu = (...e) => e.map(Wr).join(""), Wr = (e) => (e.endsWith("/") || (e += "/"), e.startsWith("/") && (e = e.slice(1)), e), ru = (e) => e.endsWith("/") ? e.slice(0, -1) : e, al = (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("&")}`;
|
|
5349
5365
|
class Zt {
|
|
5350
5366
|
protocol;
|
|
5351
5367
|
host;
|
|
@@ -5358,7 +5374,7 @@ class Zt {
|
|
|
5358
5374
|
* @param pathPrefix - A path prefix to use for all requests. Defaults to "".
|
|
5359
5375
|
*/
|
|
5360
5376
|
constructor({ host: t, port: n, protocol: r = "", pathPrefix: s = "" }) {
|
|
5361
|
-
this.protocol = r, this.host = t, this.port = n, this.path =
|
|
5377
|
+
this.protocol = r, this.host = t, this.port = n, this.path = Wr(s);
|
|
5362
5378
|
}
|
|
5363
5379
|
/**
|
|
5364
5380
|
* Replaces creates a new URL with the specified properties replaced.
|
|
@@ -5381,18 +5397,18 @@ class Zt {
|
|
|
5381
5397
|
child(t) {
|
|
5382
5398
|
return new Zt({
|
|
5383
5399
|
...this,
|
|
5384
|
-
pathPrefix:
|
|
5400
|
+
pathPrefix: nu(this.path, t)
|
|
5385
5401
|
});
|
|
5386
5402
|
}
|
|
5387
5403
|
/** @returns a string representation of the url */
|
|
5388
5404
|
toString() {
|
|
5389
|
-
return
|
|
5405
|
+
return ru(
|
|
5390
5406
|
`${this.protocol}://${this.host}:${this.port}/${this.path}`
|
|
5391
5407
|
);
|
|
5392
5408
|
}
|
|
5393
5409
|
static UNKNOWN = new Zt({ host: "unknown", port: 0 });
|
|
5394
5410
|
}
|
|
5395
|
-
class
|
|
5411
|
+
class fn {
|
|
5396
5412
|
sender;
|
|
5397
5413
|
handlers;
|
|
5398
5414
|
constructor(t) {
|
|
@@ -5403,12 +5419,12 @@ class ln {
|
|
|
5403
5419
|
n == null ? console.warn(`No handler for ${t.type}`) : n(t.payload);
|
|
5404
5420
|
}
|
|
5405
5421
|
route(t) {
|
|
5406
|
-
const n =
|
|
5422
|
+
const n = su(t, this.sender), r = new iu(n);
|
|
5407
5423
|
return this.handlers.set(t, r), r;
|
|
5408
5424
|
}
|
|
5409
5425
|
}
|
|
5410
|
-
const
|
|
5411
|
-
class
|
|
5426
|
+
const su = (e, t) => (n, r) => t({ type: e, payload: n }, r);
|
|
5427
|
+
class iu {
|
|
5412
5428
|
_send;
|
|
5413
5429
|
handler;
|
|
5414
5430
|
constructor(t) {
|
|
@@ -5421,101 +5437,101 @@ class su {
|
|
|
5421
5437
|
this.handler = t;
|
|
5422
5438
|
}
|
|
5423
5439
|
}
|
|
5424
|
-
const
|
|
5440
|
+
const ul = () => {
|
|
5425
5441
|
let e, t;
|
|
5426
5442
|
const n = (s) => {
|
|
5427
5443
|
t.handle({ data: s });
|
|
5428
5444
|
}, r = (s) => {
|
|
5429
5445
|
e.handle({ data: s });
|
|
5430
5446
|
};
|
|
5431
|
-
return e = new
|
|
5432
|
-
},
|
|
5447
|
+
return e = new fn(n), t = new fn(r), [e, t];
|
|
5448
|
+
}, ou = (e) => e.nullable().transform((t) => t === null ? void 0 : t).optional(), cu = c.int().min(0).max(jn), au = (e) => b.array(e).or(e.transform((t) => [t])), Vr = (e) => Ar(e, (t, n, r) => {
|
|
5433
5449
|
const s = n === r.length - 1, i = !isNaN(parseInt(t)), o = !isNaN(parseInt(r[n + 1]));
|
|
5434
5450
|
return i && (t = "element"), s || o ? t : [t, "shape"];
|
|
5435
|
-
}),
|
|
5451
|
+
}), hn = (e, t) => {
|
|
5436
5452
|
if (e == null) return null;
|
|
5437
5453
|
const n = e[t];
|
|
5438
5454
|
return n == null && typeof e == "object" && "sourceType" in e ? e.sourceType()[t] : n;
|
|
5439
|
-
},
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
{ ...n, getter:
|
|
5443
|
-
)),
|
|
5455
|
+
}, uu = ((e, t, n) => t === "" ? e : Qe(
|
|
5456
|
+
hn(e, "shape"),
|
|
5457
|
+
Vr(t),
|
|
5458
|
+
{ ...n, getter: hn }
|
|
5459
|
+
)), ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5444
5460
|
__proto__: null,
|
|
5445
|
-
getFieldSchema:
|
|
5446
|
-
getFieldSchemaPath:
|
|
5447
|
-
nullToUndefined:
|
|
5448
|
-
toArray:
|
|
5449
|
-
uint12:
|
|
5461
|
+
getFieldSchema: uu,
|
|
5462
|
+
getFieldSchemaPath: Vr,
|
|
5463
|
+
nullToUndefined: ou,
|
|
5464
|
+
toArray: au,
|
|
5465
|
+
uint12: cu
|
|
5450
5466
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5451
5467
|
export {
|
|
5452
5468
|
f as DataType,
|
|
5453
5469
|
x as Density,
|
|
5454
|
-
|
|
5470
|
+
Cu as MultiSeries,
|
|
5455
5471
|
$ as Rate,
|
|
5456
|
-
|
|
5472
|
+
fn as RoutedWorker,
|
|
5457
5473
|
q as Series,
|
|
5458
5474
|
p as Size,
|
|
5459
5475
|
S as TimeRange,
|
|
5460
5476
|
g as TimeSpan,
|
|
5461
5477
|
d as TimeStamp,
|
|
5462
|
-
|
|
5478
|
+
iu as TypedWorker,
|
|
5463
5479
|
Zt as URL,
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5480
|
+
fu as array,
|
|
5481
|
+
gu as binary,
|
|
5482
|
+
Ou as bounds,
|
|
5483
|
+
Mu as box,
|
|
5484
|
+
Ru as breaker,
|
|
5485
|
+
al as buildQueryString,
|
|
5486
|
+
hu as caseconv,
|
|
5487
|
+
Pu as change,
|
|
5488
|
+
No as clamp,
|
|
5489
|
+
Lu as color,
|
|
5490
|
+
pu as compare,
|
|
5491
|
+
ku as control,
|
|
5492
|
+
ko as convertDataType,
|
|
5493
|
+
ul as createMockWorkers,
|
|
5494
|
+
Zu as csv,
|
|
5495
|
+
_u as debounce,
|
|
5496
|
+
Fu as deep,
|
|
5497
|
+
Wu as destructor,
|
|
5498
|
+
Au as dimensions,
|
|
5499
|
+
Iu as direction,
|
|
5500
|
+
Vu as errors,
|
|
5501
|
+
bu as id,
|
|
5502
|
+
wu as instance,
|
|
5503
|
+
Ko as isCrudeSeries,
|
|
5504
|
+
cr as isTelemValue,
|
|
5489
5505
|
zu as jsonRPC,
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5506
|
+
Yu as kv,
|
|
5507
|
+
Gu as label,
|
|
5508
|
+
Hu as link,
|
|
5509
|
+
Nu as location,
|
|
5510
|
+
Du as map,
|
|
5511
|
+
xu as math,
|
|
5512
|
+
Ju as migrate,
|
|
5513
|
+
du as narrow,
|
|
5514
|
+
Xu as notation,
|
|
5515
|
+
$u as numericTimeRangeZ,
|
|
5516
|
+
Ku as observe,
|
|
5517
|
+
Qu as optional,
|
|
5518
|
+
yu as primitive,
|
|
5519
|
+
tl as record,
|
|
5520
|
+
el as runtime,
|
|
5521
|
+
Eu as scale,
|
|
5522
|
+
nl as scheduler,
|
|
5523
|
+
rl as shallow,
|
|
5524
|
+
Bu as sleep,
|
|
5525
|
+
Su as spatial,
|
|
5526
|
+
sl as status,
|
|
5527
|
+
Tu as sticky,
|
|
5528
|
+
il as strings,
|
|
5529
|
+
ol as sync,
|
|
5530
|
+
cl as testutil,
|
|
5531
|
+
qu as throttle,
|
|
5532
|
+
Uu as typedArrayZ,
|
|
5533
|
+
mu as unique,
|
|
5534
|
+
ju as uuid,
|
|
5535
|
+
vu as xy,
|
|
5536
|
+
ll as zod
|
|
5521
5537
|
};
|