@synnaxlabs/pluto 0.39.1 → 0.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Center-DoAxDY5V.js → Center-CFEPOi_x.js} +2 -2
- package/dist/{Center-BjxFDxgi.cjs → Center-bD2cOjI8.cjs} +1 -1
- package/dist/{ContextMenu-DX6j7Wwi.js → ContextMenu-BXNN2_7t.js} +4 -4
- package/dist/{ContextMenu-BWGS1vXl.cjs → ContextMenu-CNSewKSD.cjs} +1 -1
- package/dist/{DateTime-DUuYjZr8.cjs → DateTime-BfnGq6C2.cjs} +1 -1
- package/dist/{DateTime-sO15tvDD.js → DateTime-Djw6pb3W.js} +3 -3
- package/dist/Divider-CJNDIsD4.cjs +22 -0
- package/dist/{Divider-C5m3c4pv.js → Divider-CMyzWvRC.js} +701 -854
- package/dist/{Dropdown-DurKTABg.cjs → Dropdown-CL7BefC8.cjs} +1 -1
- package/dist/{Dropdown-FSmdakic.js → Dropdown-D-aMufnM.js} +8 -8
- package/dist/{Haul-CoG7Jmz6.cjs → Haul-4OcHX8__.cjs} +1 -1
- package/dist/{Haul-DrdXQaTq.js → Haul-CaLW9ULm.js} +2 -2
- package/dist/{Item-CZAsnOoO.js → Item-CW2A2nuL.js} +6 -6
- package/dist/{Item-Dj7cQJ8t.cjs → Item-CpAZC-dF.cjs} +1 -1
- package/dist/{Keyboard-lwCx7plR.js → Keyboard--YA9DHRz.js} +2 -2
- package/dist/{Keyboard-D4FRdVej.cjs → Keyboard-DHGtnfsf.cjs} +1 -1
- package/dist/{Link-lleSh5eG.js → Link-BT_Kwmlr.js} +2 -2
- package/dist/{Link-BSZ-HrRf.cjs → Link-Bhto2KVL.cjs} +1 -1
- package/dist/{Pack-CzZzxA2R.cjs → Pack-C4NdZWyf.cjs} +1 -1
- package/dist/{Pack-Dlj4dZzQ.js → Pack-UzJJ9OhY.js} +2 -2
- package/dist/{Provider-CCZPt2M5.js → Provider-BH1uv6QX.js} +5 -5
- package/dist/{Provider-YIru1nvE.cjs → Provider-lJARiq5i.cjs} +1 -1
- package/dist/{Space-NNqCWFbg.cjs → Space-BrQoodma.cjs} +1 -1
- package/dist/{Space-DBmhvGQL.js → Space-I_hidXYi.js} +1 -1
- package/dist/{Text-DT2rIwXL.js → Text-B7AC8Z1e.js} +423 -390
- package/dist/{Text-B3pNXYhh.js → Text-C-o1z9sP.js} +7 -7
- package/dist/{Text-DrXyKZwR.cjs → Text-C_j_F67Q.cjs} +1 -1
- package/dist/Text-ClTuQXMF.cjs +4 -0
- package/dist/{Text-D1GKnp9s.cjs → Text-DEbr1cmH.cjs} +1 -1
- package/dist/{Text-g6btwQ6E.js → Text-DVv04lTs.js} +5 -5
- package/dist/{Toggle-BzORI5sE.cjs → Toggle-CYB9Vt6b.cjs} +1 -1
- package/dist/{Toggle-DZMcFiiI.js → Toggle-v77mEVLE.js} +5 -5
- package/dist/{Video-DPIAdJ-g.js → Video-TjJf_tXI.js} +1 -1
- package/dist/{Video-BJudMCoc.cjs → Video-hdvNT3La.cjs} +1 -1
- package/dist/{WithIcon-C6COgbZq.js → WithIcon-BnDZ-Qu7.js} +12 -12
- package/dist/{WithIcon-CJvuPkSy.cjs → WithIcon-tr8ELI3W.cjs} +1 -1
- package/dist/{aggregator-5XpEdQtr.js → aggregator-AgOKLWHz.js} +2 -2
- package/dist/{aggregator-BAdXZfPY.cjs → aggregator-QqWwGnYH.cjs} +1 -1
- package/dist/align.cjs +1 -1
- package/dist/align.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/{deep-BjupBYvk.cjs → deep-DsH2ji6Z.cjs} +1 -1
- package/dist/{deep-ChDJVfub.js → deep-T1-57GfG.js} +1 -1
- package/dist/{dimensions-Bt1NqWz6.js → dimensions-C9PXLcE0.js} +1 -1
- package/dist/{dimensions-IEzi7AOM.cjs → dimensions-e5IPRZhn.cjs} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{eraser-CnbMvm7W.cjs → eraser-D2I1qgOg.cjs} +1 -1
- package/dist/{eraser-DKQ5u3sz.js → eraser-Dmishn8h.js} +2 -2
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +8 -8
- package/dist/{external-vVwTqni5.cjs → external-B1ttDWzy.cjs} +1 -1
- package/dist/{external-C710XUvC.js → external-B9nbHICv.js} +5338 -5275
- package/dist/{external-DYUmsMj8.cjs → external-BWb18P9x.cjs} +2 -2
- package/dist/{external-DNC1e6Hi.js → external-BdxbwUpI.js} +9 -9
- package/dist/{external-BQtPGUNg.cjs → external-BpvGU0dZ.cjs} +1 -1
- package/dist/{external-D18IGHXh.js → external-C3e9emVy.js} +5 -5
- package/dist/{external-DYn3iC-U.js → external-C7Hy9XdI.js} +33 -33
- package/dist/{external-C8i1PCpN.js → external-CcIx4j5m.js} +12 -12
- package/dist/{external-Vjn4WKwt.cjs → external-ClyfPgqG.cjs} +35 -35
- package/dist/{external-CNyc2Q9k.cjs → external-CqhOyYDl.cjs} +1 -1
- package/dist/{external-DhX0dZoF.cjs → external-Cs8oKwvw.cjs} +1 -1
- package/dist/{external-Dmr3e50U.js → external-Csg4_wkz.js} +3 -3
- package/dist/{external-BJulb-Hm.cjs → external-CwvJvXL5.cjs} +1 -1
- package/dist/{external-BTGfIw_K.cjs → external-Cztvb3-K.cjs} +1 -1
- package/dist/{external-GUQ0NMxY.js → external-D12g_huj.js} +6 -6
- package/dist/{external-BOOtUi1D.js → external-DCflyFdb.js} +3 -3
- package/dist/{external-DrwngojV.cjs → external-DMEzx_kb.cjs} +1 -1
- package/dist/{external-Bxg2-RDn.js → external-DTjOTICM.js} +2 -2
- package/dist/{external-CL_RlqOT.cjs → external-D_21zZAf.cjs} +1 -1
- package/dist/{external-AOOzgEKd.cjs → external-DkQnAvKo.cjs} +1 -1
- package/dist/{external-DK_wU08V.js → external-JNlv7kxI.js} +2 -2
- package/dist/{external-BhaLdMzY.js → external-_b4lTCfZ.js} +12 -12
- package/dist/{external-CRbERCqd.cjs → external-dLVcM8tt.cjs} +1 -1
- package/dist/{external-CjZqwgDh.js → external-upiAayc4.js} +8 -8
- package/dist/{font-MRTGIokZ.cjs → font-Bas26Jn-.cjs} +1 -1
- package/dist/{font-CD9W5Tsh.js → font-CcRdsA3n.js} +2 -2
- package/dist/{fontString-MM82zgKY.cjs → fontString-C7H8Imxd.cjs} +1 -1
- package/dist/{fontString-p8gMjlA1.js → fontString-DdV9bi9l.js} +2 -2
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/{hooks-CwSxEEAh.js → hooks-B7ZV7Hz6.js} +4 -4
- package/dist/{hooks-BKLtEDxx.cjs → hooks-CJnV8Pt4.cjs} +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +6148 -6053
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/jsx-runtime-C5mzlN2N.js +284 -0
- package/dist/jsx-runtime-CITbqOLs.cjs +22 -0
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/pluto.css +1 -1
- package/dist/{provider-D3MPSb7n.cjs → provider-BrBEjlx5.cjs} +5 -5
- package/dist/{provider-DfVWtUxZ.js → provider-Dq9t3iAH.js} +40 -27
- package/dist/src/hardware/device/Select.d.ts +6 -2
- package/dist/src/hardware/device/Select.d.ts.map +1 -1
- package/dist/src/status/aether/aggregator.d.ts.map +1 -1
- package/dist/src/status/aether/types.d.ts.map +1 -1
- package/dist/src/synnax/aether/provider.d.ts.map +1 -1
- package/dist/src/table/aether/Table.d.ts.map +1 -1
- package/dist/src/table/cells/Cells.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/transformers.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
- package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts.map +1 -1
- package/dist/src/viewport/Mask.d.ts.map +1 -1
- package/dist/src/viewport/SelectMode.d.ts +2 -1
- package/dist/src/viewport/SelectMode.d.ts.map +1 -1
- package/dist/src/viewport/use.d.ts +3 -3
- package/dist/src/viewport/use.d.ts.map +1 -1
- package/dist/src/vis/axis/preciseTimeScale.d.ts +102 -0
- package/dist/src/vis/axis/preciseTimeScale.d.ts.map +1 -0
- package/dist/src/vis/axis/preciseTimeScale.spec.d.ts +2 -0
- package/dist/src/vis/axis/preciseTimeScale.spec.d.ts.map +1 -0
- package/dist/src/vis/axis/ticks.d.ts.map +1 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts.map +1 -1
- package/dist/src/vis/legend/Container.d.ts.map +1 -1
- package/dist/src/vis/legend/Simple.d.ts +6 -3
- package/dist/src/vis/legend/Simple.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +3 -1
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Line.d.ts +1 -1
- package/dist/src/vis/lineplot/Line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts +1 -0
- package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts.map +1 -1
- package/dist/src/vis/log/aether/Log.d.ts.map +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/use.d.ts.map +1 -1
- package/dist/{state-w46WTrh-.js → state-CUPEHHgf.js} +116 -110
- package/dist/{state-BKyv_jWZ.cjs → state-LaBGf4_k.cjs} +4 -4
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/{useClickOutside-vpv_GiBw.js → useClickOutside-N6MHxbOe.js} +2 -2
- package/dist/{useClickOutside-EJHWO4Q9.cjs → useClickOutside-PFl3AvPU.cjs} +1 -1
- package/dist/{useDebouncedCallback-DDLuEZa8.js → useDebouncedCallback-D4Ec7whQ.js} +1 -1
- package/dist/{useDebouncedCallback-CVLx7N1s.cjs → useDebouncedCallback-vg2DKTH7.cjs} +1 -1
- package/dist/{useMemoCompare-ONEAVO05.cjs → useMemoCompare-BGEWpAJU.cjs} +1 -1
- package/dist/{useMemoCompare-B-Y9Ft2w.js → useMemoCompare-Cq_C2ddc.js} +2 -2
- package/dist/{useVirtualCursorDragWebKit-DFC-XFfl.js → useVirtualCursorDragWebKit-BBTGd7Xe.js} +11 -11
- package/dist/useVirtualCursorDragWebKit-Rnok8Nft.cjs +1 -0
- package/dist/value-C6JZdCF2.cjs +57 -0
- package/dist/{value-DbcZ1sQB.js → value-Dk2DJbst.js} +1528 -1399
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +7 -7
- package/dist/Divider-MIbyu5ZH.cjs +0 -31
- package/dist/Text-Hnsb1fus.cjs +0 -4
- package/dist/jsx-runtime-CYK1ROHF.js +0 -445
- package/dist/jsx-runtime-UYeBbnYT.cjs +0 -31
- package/dist/useVirtualCursorDragWebKit-BLtwRQY7.cjs +0 -1
- package/dist/value-DQqKhQvt.cjs +0 -57
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { z as
|
|
1
|
+
import { z as ve, A as Ge, E as D, F as z, H as he, I as Z, U as Ye, V as Ze } from "./css-rxwBYwM1.js";
|
|
2
2
|
import { z as u } from "zod";
|
|
3
3
|
import { useState as ue } from "react";
|
|
4
|
-
const
|
|
4
|
+
const Se = (r) => r != null && typeof r == "object" && !Array.isArray(r);
|
|
5
5
|
var Je = Object.defineProperty, We = (r, e, t) => e in r ? Je(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, V = (r, e, t) => We(r, typeof e != "symbol" ? e + "" : e, t);
|
|
6
6
|
let He = class {
|
|
7
7
|
constructor() {
|
|
@@ -14,12 +14,12 @@ let He = class {
|
|
|
14
14
|
return this.decodeString(this.decoder.decode(e), t);
|
|
15
15
|
}
|
|
16
16
|
decodeString(e, t) {
|
|
17
|
-
const n = JSON.parse(e), s =
|
|
17
|
+
const n = JSON.parse(e), s = ve(n);
|
|
18
18
|
return t != null ? t.parse(s) : s;
|
|
19
19
|
}
|
|
20
20
|
encodeString(e) {
|
|
21
21
|
const t = Ge(e);
|
|
22
|
-
return JSON.stringify(t, (n, s) => ArrayBuffer.isView(s) ? Array.from(s) :
|
|
22
|
+
return JSON.stringify(t, (n, s) => ArrayBuffer.isView(s) ? Array.from(s) : Se(s) && "encode_value" in s ? typeof s.value == "bigint" ? s.value.toString() : s.value : typeof s == "bigint" ? s.toString() : s);
|
|
23
23
|
}
|
|
24
24
|
static registerCustomType() {
|
|
25
25
|
}
|
|
@@ -36,7 +36,7 @@ let He = class {
|
|
|
36
36
|
return this.decodeString(n, t);
|
|
37
37
|
}
|
|
38
38
|
encodeString(e) {
|
|
39
|
-
if (!Array.isArray(e) || e.length === 0 || !
|
|
39
|
+
if (!Array.isArray(e) || e.length === 0 || !Se(e[0]))
|
|
40
40
|
throw new Error("Payload must be an array of objects");
|
|
41
41
|
const t = Object.keys(e[0]), n = [t.join(",")];
|
|
42
42
|
return e.forEach((s) => {
|
|
@@ -55,9 +55,9 @@ let He = class {
|
|
|
55
55
|
l[m] = [];
|
|
56
56
|
}), s.forEach((m) => {
|
|
57
57
|
const f = m.split(",").map((g) => g.trim());
|
|
58
|
-
a.forEach((g,
|
|
59
|
-
const
|
|
60
|
-
|
|
58
|
+
a.forEach((g, v) => {
|
|
59
|
+
const c = this.parseValue(f[v]);
|
|
60
|
+
c != null && l[g].push(c);
|
|
61
61
|
});
|
|
62
62
|
}), t != null ? t.parse(l) : l;
|
|
63
63
|
}
|
|
@@ -97,7 +97,7 @@ const ne = (r) => [...new Set(r)], Qe = (r, e, t = !0) => {
|
|
|
97
97
|
__proto__: null,
|
|
98
98
|
by: Qe,
|
|
99
99
|
unique: ne
|
|
100
|
-
}, Symbol.toStringTag, { value: "Module" })), Ne = (r) => r != null && typeof r == "object" && "toString" in r,
|
|
100
|
+
}, Symbol.toStringTag, { value: "Module" })), Ne = (r) => r != null && typeof r == "object" && "toString" in r, vr = (r) => {
|
|
101
101
|
if (Ne(r)) return (r == null ? void 0 : r.toString().length) === 0;
|
|
102
102
|
switch (typeof r) {
|
|
103
103
|
case "string":
|
|
@@ -164,7 +164,7 @@ const ne = (r) => [...new Set(r)], Qe = (r, e, t = !0) => {
|
|
|
164
164
|
} else return isNaN(Number(l)) ? -1 : 1;
|
|
165
165
|
}
|
|
166
166
|
return n.length - s.length;
|
|
167
|
-
},
|
|
167
|
+
}, Sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
168
168
|
__proto__: null,
|
|
169
169
|
EQUAL: L,
|
|
170
170
|
GREATER_THAN: H,
|
|
@@ -208,22 +208,22 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
208
208
|
);
|
|
209
209
|
const n = r.valueOf() % t.valueOf();
|
|
210
210
|
return r instanceof w ? new w(n) : new O(n);
|
|
211
|
-
}, y = class
|
|
211
|
+
}, y = class h {
|
|
212
212
|
constructor(e, t = "UTC") {
|
|
213
|
-
if (i(this, "value"), i(this, "encodeValue", !0), e == null) this.value =
|
|
213
|
+
if (i(this, "value"), i(this, "encodeValue", !0), e == null) this.value = h.now().valueOf();
|
|
214
214
|
else if (e instanceof Date)
|
|
215
|
-
this.value = BigInt(e.getTime()) *
|
|
215
|
+
this.value = BigInt(e.getTime()) * h.MILLISECOND.valueOf();
|
|
216
216
|
else if (typeof e == "string")
|
|
217
|
-
this.value =
|
|
218
|
-
else if (Array.isArray(e)) this.value =
|
|
217
|
+
this.value = h.parseDateTimeString(e, t).valueOf();
|
|
218
|
+
else if (Array.isArray(e)) this.value = h.parseDate(e);
|
|
219
219
|
else {
|
|
220
220
|
let n = BigInt(0);
|
|
221
|
-
e instanceof Number && (e = e.valueOf()), t === "local" && (n =
|
|
221
|
+
e instanceof Number && (e = e.valueOf()), t === "local" && (n = h.utcOffset.valueOf()), typeof e == "number" && (isFinite(e) ? e = Math.trunc(e) : (isNaN(e) && (e = 0), e === 1 / 0 ? e = h.MAX : e = h.MIN)), this.value = BigInt(e.valueOf()) + n;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
static parseDate([e = 1970, t = 1, n = 1]) {
|
|
225
225
|
const s = new Date(e, t - 1, n, 0, 0, 0, 0);
|
|
226
|
-
return new
|
|
226
|
+
return new h(BigInt(s.getTime()) * h.MILLISECOND.valueOf()).truncate(h.DAY).valueOf();
|
|
227
227
|
}
|
|
228
228
|
encode() {
|
|
229
229
|
return this.value.toString();
|
|
@@ -235,15 +235,15 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
235
235
|
const [n, s, a] = e.split(":");
|
|
236
236
|
let l = "00", m = "00";
|
|
237
237
|
a != null && ([l, m] = a.split("."));
|
|
238
|
-
let f =
|
|
239
|
-
return t === "local" && (f = f.add(
|
|
238
|
+
let f = h.hours(parseInt(n ?? "00")).add(h.minutes(parseInt(s ?? "00"))).add(h.seconds(parseInt(l ?? "00"))).add(h.milliseconds(parseInt(m ?? "00")));
|
|
239
|
+
return t === "local" && (f = f.add(h.utcOffset)), f.valueOf();
|
|
240
240
|
}
|
|
241
241
|
static parseDateTimeString(e, t = "UTC") {
|
|
242
242
|
if (!e.includes("/") && !e.includes("-"))
|
|
243
|
-
return
|
|
243
|
+
return h.parseTimeString(e, t);
|
|
244
244
|
const n = new Date(e);
|
|
245
|
-
return e.includes(":") || n.setUTCHours(0, 0, 0, 0), new
|
|
246
|
-
BigInt(n.getTime()) *
|
|
245
|
+
return e.includes(":") || n.setUTCHours(0, 0, 0, 0), new h(
|
|
246
|
+
BigInt(n.getTime()) * h.MILLISECOND.valueOf(),
|
|
247
247
|
t
|
|
248
248
|
).valueOf();
|
|
249
249
|
}
|
|
@@ -268,7 +268,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
toISOString(e = "UTC") {
|
|
271
|
-
return e === "UTC" ? this.date().toISOString() : this.sub(
|
|
271
|
+
return e === "UTC" ? this.date().toISOString() : this.sub(h.utcOffset).date().toISOString();
|
|
272
272
|
}
|
|
273
273
|
timeString(e = !1, t = "UTC") {
|
|
274
274
|
const n = this.toISOString(t);
|
|
@@ -280,7 +280,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
280
280
|
}
|
|
281
281
|
static get utcOffset() {
|
|
282
282
|
return new O(
|
|
283
|
-
BigInt((/* @__PURE__ */ new Date()).getTimezoneOffset()) *
|
|
283
|
+
BigInt((/* @__PURE__ */ new Date()).getTimezoneOffset()) * h.MINUTE.valueOf()
|
|
284
284
|
);
|
|
285
285
|
}
|
|
286
286
|
/**
|
|
@@ -289,7 +289,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
289
289
|
* @param other - The other timestamp.
|
|
290
290
|
*/
|
|
291
291
|
static since(e) {
|
|
292
|
-
return new
|
|
292
|
+
return new h().span(e);
|
|
293
293
|
}
|
|
294
294
|
/** @returns A JavaScript Date object representing the TimeStamp. */
|
|
295
295
|
date() {
|
|
@@ -302,7 +302,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
302
302
|
* @returns True if the TimeStamps are equal, false otherwise.
|
|
303
303
|
*/
|
|
304
304
|
equals(e) {
|
|
305
|
-
return this.valueOf() === new
|
|
305
|
+
return this.valueOf() === new h(e).valueOf();
|
|
306
306
|
}
|
|
307
307
|
/**
|
|
308
308
|
* Creates a TimeSpan representing the duration between the two timestamps.
|
|
@@ -351,7 +351,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
351
351
|
* otherwise.
|
|
352
352
|
*/
|
|
353
353
|
after(e) {
|
|
354
|
-
return this.valueOf() > new
|
|
354
|
+
return this.valueOf() > new h(e).valueOf();
|
|
355
355
|
}
|
|
356
356
|
/**
|
|
357
357
|
* Checks if the TimeStamp is after or equal to the given TimeStamp.
|
|
@@ -361,7 +361,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
361
361
|
* false otherwise.
|
|
362
362
|
*/
|
|
363
363
|
afterEq(e) {
|
|
364
|
-
return this.valueOf() >= new
|
|
364
|
+
return this.valueOf() >= new h(e).valueOf();
|
|
365
365
|
}
|
|
366
366
|
/**
|
|
367
367
|
* Checks if the TimeStamp is before the given TimeStamp.
|
|
@@ -371,7 +371,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
371
371
|
* otherwise.
|
|
372
372
|
*/
|
|
373
373
|
before(e) {
|
|
374
|
-
return this.valueOf() < new
|
|
374
|
+
return this.valueOf() < new h(e).valueOf();
|
|
375
375
|
}
|
|
376
376
|
/**
|
|
377
377
|
* Checks if TimeStamp is before or equal to the current timestamp.
|
|
@@ -381,7 +381,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
381
381
|
* false otherwise.
|
|
382
382
|
*/
|
|
383
383
|
beforeEq(e) {
|
|
384
|
-
return this.valueOf() <= new
|
|
384
|
+
return this.valueOf() <= new h(e).valueOf();
|
|
385
385
|
}
|
|
386
386
|
/**
|
|
387
387
|
* Adds a TimeSpan to the TimeStamp.
|
|
@@ -391,7 +391,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
391
391
|
* TimeSpan.
|
|
392
392
|
*/
|
|
393
393
|
add(e) {
|
|
394
|
-
return new
|
|
394
|
+
return new h(this.valueOf() + BigInt(e.valueOf()));
|
|
395
395
|
}
|
|
396
396
|
/**
|
|
397
397
|
* Subtracts a TimeSpan from the TimeStamp.
|
|
@@ -401,7 +401,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
401
401
|
* TimeSpan.
|
|
402
402
|
*/
|
|
403
403
|
sub(e) {
|
|
404
|
-
return new
|
|
404
|
+
return new h(this.valueOf() - BigInt(e.valueOf()));
|
|
405
405
|
}
|
|
406
406
|
/**
|
|
407
407
|
* @returns the floating point number of hours since the unix epoch to the timestamp
|
|
@@ -435,7 +435,13 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
435
435
|
* @returns The number of milliseconds since the unix epoch.
|
|
436
436
|
*/
|
|
437
437
|
get milliseconds() {
|
|
438
|
-
return Number(this.valueOf()) / Number(
|
|
438
|
+
return Number(this.valueOf()) / Number(h.MILLISECOND.valueOf());
|
|
439
|
+
}
|
|
440
|
+
get microseconds() {
|
|
441
|
+
return Number(this.valueOf()) / Number(h.MICROSECOND.valueOf());
|
|
442
|
+
}
|
|
443
|
+
get nanoseconds() {
|
|
444
|
+
return Number(this.valueOf());
|
|
439
445
|
}
|
|
440
446
|
/** @returns the integer year that the timestamp corresponds to. */
|
|
441
447
|
get year() {
|
|
@@ -443,7 +449,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
443
449
|
}
|
|
444
450
|
setYear(e) {
|
|
445
451
|
const t = this.date();
|
|
446
|
-
return t.setFullYear(e), new
|
|
452
|
+
return t.setFullYear(e), new h(t);
|
|
447
453
|
}
|
|
448
454
|
/** @returns the integer month that the timestamp corresponds to with its year. */
|
|
449
455
|
get month() {
|
|
@@ -451,7 +457,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
451
457
|
}
|
|
452
458
|
setMonth(e) {
|
|
453
459
|
const t = this.date();
|
|
454
|
-
return t.setMonth(e), new
|
|
460
|
+
return t.setMonth(e), new h(t);
|
|
455
461
|
}
|
|
456
462
|
/** @returns the integer day that the timestamp corresponds to within its month. */
|
|
457
463
|
get day() {
|
|
@@ -459,7 +465,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
459
465
|
}
|
|
460
466
|
setDay(e) {
|
|
461
467
|
const t = this.date();
|
|
462
|
-
return t.setDate(e), new
|
|
468
|
+
return t.setDate(e), new h(t);
|
|
463
469
|
}
|
|
464
470
|
/** @returns the integer hour that the timestamp corresponds to within its day. */
|
|
465
471
|
get hour() {
|
|
@@ -467,7 +473,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
467
473
|
}
|
|
468
474
|
setHour(e) {
|
|
469
475
|
const t = this.date();
|
|
470
|
-
return t.setHours(e), new
|
|
476
|
+
return t.setHours(e), new h(t);
|
|
471
477
|
}
|
|
472
478
|
/** @returns the integer minute that the timestamp corresponds to within its hour. */
|
|
473
479
|
get minute() {
|
|
@@ -475,21 +481,21 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
475
481
|
}
|
|
476
482
|
setMinute(e) {
|
|
477
483
|
const t = this.date();
|
|
478
|
-
return t.setMinutes(e), new
|
|
484
|
+
return t.setMinutes(e), new h(t);
|
|
479
485
|
}
|
|
480
486
|
get second() {
|
|
481
487
|
return this.date().getSeconds();
|
|
482
488
|
}
|
|
483
489
|
setSecond(e) {
|
|
484
490
|
const t = this.date();
|
|
485
|
-
return t.setSeconds(e), new
|
|
491
|
+
return t.setSeconds(e), new h(t);
|
|
486
492
|
}
|
|
487
493
|
get millisecond() {
|
|
488
494
|
return this.date().getMilliseconds();
|
|
489
495
|
}
|
|
490
496
|
setMillisecond(e) {
|
|
491
497
|
const t = this.date();
|
|
492
|
-
return t.setMilliseconds(e), new
|
|
498
|
+
return t.setMilliseconds(e), new h(t);
|
|
493
499
|
}
|
|
494
500
|
toString() {
|
|
495
501
|
return this.date().toISOString();
|
|
@@ -510,7 +516,7 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
510
516
|
}
|
|
511
517
|
/** @returns true if the day portion TimeStamp is today, false otherwise. */
|
|
512
518
|
get isToday() {
|
|
513
|
-
return this.truncate(O.DAY).equals(
|
|
519
|
+
return this.truncate(O.DAY).equals(h.now().truncate(O.DAY));
|
|
514
520
|
}
|
|
515
521
|
truncate(e) {
|
|
516
522
|
return this.sub(this.remainder(e));
|
|
@@ -521,51 +527,51 @@ const ut = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", lt
|
|
|
521
527
|
* JavaScript can do).
|
|
522
528
|
*/
|
|
523
529
|
static now() {
|
|
524
|
-
return new
|
|
530
|
+
return new h(/* @__PURE__ */ new Date());
|
|
525
531
|
}
|
|
526
532
|
static max(...e) {
|
|
527
|
-
let t =
|
|
533
|
+
let t = h.MIN;
|
|
528
534
|
for (const n of e) {
|
|
529
|
-
const s = new
|
|
535
|
+
const s = new h(n);
|
|
530
536
|
s.after(t) && (t = s);
|
|
531
537
|
}
|
|
532
538
|
return t;
|
|
533
539
|
}
|
|
534
540
|
static min(...e) {
|
|
535
|
-
let t =
|
|
541
|
+
let t = h.MAX;
|
|
536
542
|
for (const n of e) {
|
|
537
|
-
const s = new
|
|
543
|
+
const s = new h(n);
|
|
538
544
|
s.before(t) && (t = s);
|
|
539
545
|
}
|
|
540
546
|
return t;
|
|
541
547
|
}
|
|
542
548
|
/** @returns a new TimeStamp n nanoseconds after the unix epoch */
|
|
543
549
|
static nanoseconds(e) {
|
|
544
|
-
return new
|
|
550
|
+
return new h(e);
|
|
545
551
|
}
|
|
546
552
|
/** @returns a new TimeStamp n microseconds after the unix epoch */
|
|
547
553
|
static microseconds(e) {
|
|
548
|
-
return
|
|
554
|
+
return h.nanoseconds(e * 1e3);
|
|
549
555
|
}
|
|
550
556
|
/** @returns a new TimeStamp n milliseconds after the unix epoch */
|
|
551
557
|
static milliseconds(e) {
|
|
552
|
-
return
|
|
558
|
+
return h.microseconds(e * 1e3);
|
|
553
559
|
}
|
|
554
560
|
/** @returns a new TimeStamp n seconds after the unix epoch */
|
|
555
561
|
static seconds(e) {
|
|
556
|
-
return
|
|
562
|
+
return h.milliseconds(e * 1e3);
|
|
557
563
|
}
|
|
558
564
|
/** @returns a new TimeStamp n minutes after the unix epoch */
|
|
559
565
|
static minutes(e) {
|
|
560
|
-
return
|
|
566
|
+
return h.seconds(e * 60);
|
|
561
567
|
}
|
|
562
568
|
/** @returns a new TimeStamp n hours after the unix epoch */
|
|
563
569
|
static hours(e) {
|
|
564
|
-
return
|
|
570
|
+
return h.minutes(e * 60);
|
|
565
571
|
}
|
|
566
572
|
/** @returns a new TimeStamp n days after the unix epoch */
|
|
567
573
|
static days(e) {
|
|
568
|
-
return
|
|
574
|
+
return h.hours(e * 24);
|
|
569
575
|
}
|
|
570
576
|
};
|
|
571
577
|
i(y, "NANOSECOND", y.nanoseconds(1)), /** One microsecond after the unix epoch */
|
|
@@ -623,9 +629,9 @@ const b = class d {
|
|
|
623
629
|
);
|
|
624
630
|
}
|
|
625
631
|
toString() {
|
|
626
|
-
const e = this.truncate(d.DAY), t = this.truncate(d.HOUR), n = this.truncate(d.MINUTE), s = this.truncate(d.SECOND), a = this.truncate(d.MILLISECOND), l = this.truncate(d.MICROSECOND), m = this.truncate(d.NANOSECOND), f = e, g = t.sub(e),
|
|
632
|
+
const e = this.truncate(d.DAY), t = this.truncate(d.HOUR), n = this.truncate(d.MINUTE), s = this.truncate(d.SECOND), a = this.truncate(d.MILLISECOND), l = this.truncate(d.MICROSECOND), m = this.truncate(d.NANOSECOND), f = e, g = t.sub(e), v = n.sub(t), c = s.sub(n), E = a.sub(s), $ = l.sub(a), le = m.sub(l);
|
|
627
633
|
let x = "";
|
|
628
|
-
return f.isZero || (x += `${f.days}d `), g.isZero || (x += `${g.hours}h `),
|
|
634
|
+
return f.isZero || (x += `${f.days}d `), g.isZero || (x += `${g.hours}h `), v.isZero || (x += `${v.minutes}m `), c.isZero || (x += `${c.seconds}s `), E.isZero || (x += `${E.milliseconds}ms `), $.isZero || (x += `${$.microseconds}µs `), le.isZero || (x += `${le.nanoseconds}ns`), x.trim();
|
|
629
635
|
}
|
|
630
636
|
mult(e) {
|
|
631
637
|
return new d(this.valueOf() * BigInt(e));
|
|
@@ -1153,7 +1159,7 @@ i(o, "z", u.union([
|
|
|
1153
1159
|
u.instanceof(o)
|
|
1154
1160
|
]));
|
|
1155
1161
|
let p = o;
|
|
1156
|
-
const I = class
|
|
1162
|
+
const I = class S extends Number {
|
|
1157
1163
|
constructor(e) {
|
|
1158
1164
|
super(e.valueOf());
|
|
1159
1165
|
}
|
|
@@ -1166,33 +1172,33 @@ const I = class v extends Number {
|
|
|
1166
1172
|
return this.valueOf() < e.valueOf();
|
|
1167
1173
|
}
|
|
1168
1174
|
add(e) {
|
|
1169
|
-
return
|
|
1175
|
+
return S.bytes(this.valueOf() + e.valueOf());
|
|
1170
1176
|
}
|
|
1171
1177
|
sub(e) {
|
|
1172
|
-
return
|
|
1178
|
+
return S.bytes(this.valueOf() - e.valueOf());
|
|
1173
1179
|
}
|
|
1174
1180
|
truncate(e) {
|
|
1175
|
-
return new
|
|
1181
|
+
return new S(Math.trunc(this.valueOf() / e.valueOf()) * e.valueOf());
|
|
1176
1182
|
}
|
|
1177
1183
|
remainder(e) {
|
|
1178
|
-
return
|
|
1184
|
+
return S.bytes(this.valueOf() % e.valueOf());
|
|
1179
1185
|
}
|
|
1180
1186
|
get gigabytes() {
|
|
1181
|
-
return this.valueOf() /
|
|
1187
|
+
return this.valueOf() / S.GIGABYTE.valueOf();
|
|
1182
1188
|
}
|
|
1183
1189
|
get megabytes() {
|
|
1184
|
-
return this.valueOf() /
|
|
1190
|
+
return this.valueOf() / S.MEGABYTE.valueOf();
|
|
1185
1191
|
}
|
|
1186
1192
|
get kilobytes() {
|
|
1187
|
-
return this.valueOf() /
|
|
1193
|
+
return this.valueOf() / S.KILOBYTE.valueOf();
|
|
1188
1194
|
}
|
|
1189
1195
|
get terabytes() {
|
|
1190
|
-
return this.valueOf() /
|
|
1196
|
+
return this.valueOf() / S.TERABYTE.valueOf();
|
|
1191
1197
|
}
|
|
1192
1198
|
toString() {
|
|
1193
|
-
const e = this.truncate(
|
|
1194
|
-
let
|
|
1195
|
-
return l.isZero || (
|
|
1199
|
+
const e = this.truncate(S.TERABYTE), t = this.truncate(S.GIGABYTE), n = this.truncate(S.MEGABYTE), s = this.truncate(S.KILOBYTE), a = this.truncate(S.BYTE), l = e, m = t.sub(e), f = n.sub(t), g = s.sub(n), v = a.sub(s);
|
|
1200
|
+
let c = "";
|
|
1201
|
+
return l.isZero || (c += `${l.terabytes}TB `), m.isZero || (c += `${m.gigabytes}GB `), f.isZero || (c += `${f.megabytes}MB `), g.isZero || (c += `${g.kilobytes}KB `), (!v.isZero || c === "") && (c += `${v.valueOf()}B`), c.trim();
|
|
1196
1202
|
}
|
|
1197
1203
|
/**
|
|
1198
1204
|
* Creates a Size from the given number of bytes.
|
|
@@ -1201,7 +1207,7 @@ const I = class v extends Number {
|
|
|
1201
1207
|
* @returns A Size representing the given number of bytes.
|
|
1202
1208
|
*/
|
|
1203
1209
|
static bytes(e = 1) {
|
|
1204
|
-
return new
|
|
1210
|
+
return new S(e);
|
|
1205
1211
|
}
|
|
1206
1212
|
/**
|
|
1207
1213
|
* Creates a Size from the given number if kilobytes.
|
|
@@ -1210,7 +1216,7 @@ const I = class v extends Number {
|
|
|
1210
1216
|
* @returns A Size representing the given number of kilobytes.
|
|
1211
1217
|
*/
|
|
1212
1218
|
static kilobytes(e = 1) {
|
|
1213
|
-
return
|
|
1219
|
+
return S.bytes(e.valueOf() * 1e3);
|
|
1214
1220
|
}
|
|
1215
1221
|
/**
|
|
1216
1222
|
* Creates a Size from the given number of megabytes.
|
|
@@ -1219,7 +1225,7 @@ const I = class v extends Number {
|
|
|
1219
1225
|
* @returns A Size representing the given number of megabytes.
|
|
1220
1226
|
*/
|
|
1221
1227
|
static megabytes(e = 1) {
|
|
1222
|
-
return
|
|
1228
|
+
return S.kilobytes(e.valueOf() * 1e3);
|
|
1223
1229
|
}
|
|
1224
1230
|
/**
|
|
1225
1231
|
* Creates a Size from the given number of gigabytes.
|
|
@@ -1228,7 +1234,7 @@ const I = class v extends Number {
|
|
|
1228
1234
|
* @returns A Size representing the given number of gigabytes.
|
|
1229
1235
|
*/
|
|
1230
1236
|
static gigabytes(e = 1) {
|
|
1231
|
-
return
|
|
1237
|
+
return S.megabytes(e.valueOf() * 1e3);
|
|
1232
1238
|
}
|
|
1233
1239
|
/**
|
|
1234
1240
|
* Creates a Size from the given number of terabytes.
|
|
@@ -1237,7 +1243,7 @@ const I = class v extends Number {
|
|
|
1237
1243
|
* @returns A Size representing the given number of terabytes.
|
|
1238
1244
|
*/
|
|
1239
1245
|
static terabytes(e) {
|
|
1240
|
-
return
|
|
1246
|
+
return S.gigabytes(e.valueOf() * 1e3);
|
|
1241
1247
|
}
|
|
1242
1248
|
get isZero() {
|
|
1243
1249
|
return this.valueOf() === 0;
|
|
@@ -1287,54 +1293,54 @@ const Ar = u.union([
|
|
|
1287
1293
|
key: m = Be()
|
|
1288
1294
|
} = e, f = e.data ?? [];
|
|
1289
1295
|
if (f instanceof B || typeof f == "object" && "isSynnaxSeries" in f && f.isSynnaxSeries === !0) {
|
|
1290
|
-
const
|
|
1291
|
-
this.key =
|
|
1296
|
+
const c = f;
|
|
1297
|
+
this.key = c.key, this.dataType = c.dataType, this.sampleOffset = c.sampleOffset, this.gl = c.gl, this._data = c._data, this._timeRange = c._timeRange, this.alignment = c.alignment, this._cachedMin = c._cachedMin, this._cachedMax = c._cachedMax, this.writePos = c.writePos, this._refCount = c._refCount, this._cachedLength = c._cachedLength;
|
|
1292
1298
|
return;
|
|
1293
1299
|
}
|
|
1294
|
-
const g = xe(f),
|
|
1300
|
+
const g = xe(f), v = Array.isArray(f);
|
|
1295
1301
|
if (t != null) this.dataType = new p(t);
|
|
1296
1302
|
else {
|
|
1297
1303
|
if (f instanceof ArrayBuffer)
|
|
1298
1304
|
throw new Error(
|
|
1299
1305
|
"cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type."
|
|
1300
1306
|
);
|
|
1301
|
-
if (
|
|
1302
|
-
let
|
|
1307
|
+
if (v || g) {
|
|
1308
|
+
let c = f;
|
|
1303
1309
|
if (!g) {
|
|
1304
1310
|
if (f.length === 0)
|
|
1305
1311
|
throw new Error(
|
|
1306
1312
|
"cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type."
|
|
1307
1313
|
);
|
|
1308
|
-
|
|
1314
|
+
c = f[0];
|
|
1309
1315
|
}
|
|
1310
|
-
if (typeof
|
|
1311
|
-
else if (typeof
|
|
1312
|
-
else if (typeof
|
|
1313
|
-
else if (typeof
|
|
1314
|
-
else if (
|
|
1316
|
+
if (typeof c == "string") this.dataType = p.STRING;
|
|
1317
|
+
else if (typeof c == "number") this.dataType = p.FLOAT64;
|
|
1318
|
+
else if (typeof c == "bigint") this.dataType = p.INT64;
|
|
1319
|
+
else if (typeof c == "boolean") this.dataType = p.BOOLEAN;
|
|
1320
|
+
else if (c instanceof w || c instanceof Date || c instanceof w)
|
|
1315
1321
|
this.dataType = p.TIMESTAMP;
|
|
1316
|
-
else if (typeof
|
|
1322
|
+
else if (typeof c == "object") this.dataType = p.JSON;
|
|
1317
1323
|
else
|
|
1318
1324
|
throw new Error(
|
|
1319
|
-
`cannot infer data type of ${typeof
|
|
1325
|
+
`cannot infer data type of ${typeof c} when constructing a Series from a JS array`
|
|
1320
1326
|
);
|
|
1321
1327
|
} else this.dataType = new p(f);
|
|
1322
1328
|
}
|
|
1323
|
-
if (!
|
|
1329
|
+
if (!v && !g) this._data = f;
|
|
1324
1330
|
else {
|
|
1325
|
-
let
|
|
1326
|
-
const E =
|
|
1327
|
-
(E instanceof w || E instanceof Date || E instanceof O) && (
|
|
1331
|
+
let c = g ? [f] : f;
|
|
1332
|
+
const E = c[0];
|
|
1333
|
+
(E instanceof w || E instanceof Date || E instanceof O) && (c = c.map(($) => new w($).valueOf())), this.dataType.equals(p.STRING) ? (this._cachedLength = c.length, this._data = new TextEncoder().encode(`${c.join(`
|
|
1328
1334
|
`)}
|
|
1329
|
-
`).buffer) : this.dataType.equals(p.JSON) ? (this._cachedLength =
|
|
1330
|
-
`${
|
|
1335
|
+
`).buffer) : this.dataType.equals(p.JSON) ? (this._cachedLength = c.length, this._data = new TextEncoder().encode(
|
|
1336
|
+
`${c.map(($) => J.encodeString($)).join(`
|
|
1331
1337
|
`)}
|
|
1332
1338
|
`
|
|
1333
1339
|
).buffer) : this.dataType.usesBigInt && typeof E == "number" ? this._data = new this.dataType.Array(
|
|
1334
|
-
|
|
1340
|
+
c.map(($) => BigInt(Math.round($)))
|
|
1335
1341
|
).buffer : !this.dataType.usesBigInt && typeof E == "bigint" ? this._data = new this.dataType.Array(
|
|
1336
|
-
|
|
1337
|
-
).buffer : this._data = new this.dataType.Array(
|
|
1342
|
+
c.map(($) => Number($))
|
|
1343
|
+
).buffer : this._data = new this.dataType.Array(c).buffer;
|
|
1338
1344
|
}
|
|
1339
1345
|
this.key = m, this.alignment = l, this.sampleOffset = s ?? 0, this._timeRange = n, this.gl = {
|
|
1340
1346
|
control: null,
|
|
@@ -1600,7 +1606,7 @@ const Ar = u.union([
|
|
|
1600
1606
|
}
|
|
1601
1607
|
}
|
|
1602
1608
|
const a = this.data.slice(n, s);
|
|
1603
|
-
return this.dataType.equals(p.STRING) ? new TextDecoder().decode(a) :
|
|
1609
|
+
return this.dataType.equals(p.STRING) ? new TextDecoder().decode(a) : ve(JSON.parse(new TextDecoder().decode(a)));
|
|
1604
1610
|
}
|
|
1605
1611
|
/**
|
|
1606
1612
|
* @returns the index of the first sample that is greater than or equal to the given value.
|
|
@@ -2053,12 +2059,12 @@ u.record(
|
|
|
2053
2059
|
u.union([u.number(), u.string(), u.symbol()]),
|
|
2054
2060
|
u.unknown()
|
|
2055
2061
|
);
|
|
2056
|
-
const De = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", Tt = De(), Le = ["macOS", "Windows", "Linux"],
|
|
2062
|
+
const De = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", Tt = De(), Le = ["macOS", "Windows", "Linux"], vt = ["macos", "windows", "linux"], St = {
|
|
2057
2063
|
macos: "macOS",
|
|
2058
2064
|
windows: "Windows",
|
|
2059
2065
|
linux: "Linux"
|
|
2060
2066
|
}, Nt = u.enum(Le).or(
|
|
2061
|
-
u.enum(
|
|
2067
|
+
u.enum(vt).transform((r) => St[r])
|
|
2062
2068
|
), It = () => {
|
|
2063
2069
|
if (typeof window > "u") return;
|
|
2064
2070
|
const r = window.navigator.userAgent.toLowerCase();
|
|
@@ -2193,7 +2199,7 @@ let rr = ke;
|
|
|
2193
2199
|
new rr();
|
|
2194
2200
|
const qr = (r) => r ? -1 : 1, oe = u.string().regex(/^\d+\.\d+\.\d+$/), Y = (r, e, t = {}) => {
|
|
2195
2201
|
t.checkMajor ?? (t.checkMajor = !0), t.checkMinor ?? (t.checkMinor = !0), t.checkPatch ?? (t.checkPatch = !0);
|
|
2196
|
-
const n = oe.parse(r), s = oe.parse(e), [a, l, m] = n.split(".").map(Number), [f, g,
|
|
2202
|
+
const n = oe.parse(r), s = oe.parse(e), [a, l, m] = n.split(".").map(Number), [f, g, v] = s.split(".").map(Number);
|
|
2197
2203
|
if (t.checkMajor) {
|
|
2198
2204
|
if (a < f) return W;
|
|
2199
2205
|
if (a > f) return H;
|
|
@@ -2203,8 +2209,8 @@ const qr = (r) => r ? -1 : 1, oe = u.string().regex(/^\d+\.\d+\.\d+$/), Y = (r,
|
|
|
2203
2209
|
if (l > g) return H;
|
|
2204
2210
|
}
|
|
2205
2211
|
if (t.checkPatch) {
|
|
2206
|
-
if (m <
|
|
2207
|
-
if (m >
|
|
2212
|
+
if (m < v) return W;
|
|
2213
|
+
if (m > v) return H;
|
|
2208
2214
|
}
|
|
2209
2215
|
return L;
|
|
2210
2216
|
}, nr = (r, e, t = {}) => Me(Y(r, e, t)), Fe = (r, e, t = {}) => $e(Y(r, e, t)), sr = (r, e, t = {}) => Ee(Y(r, e, t)), ir = ({
|
|
@@ -2235,8 +2241,8 @@ const qr = (r) => r ? -1 : 1, oe = u.string().regex(/^\d+\.\d+\.\d+$/), Y = (r,
|
|
|
2235
2241
|
), s;
|
|
2236
2242
|
try {
|
|
2237
2243
|
return t != null ? t.parse(g) : g;
|
|
2238
|
-
} catch (
|
|
2239
|
-
return console.log(`${r} failed to parse default. Exiting with default`), console.error(
|
|
2244
|
+
} catch (v) {
|
|
2245
|
+
return console.log(`${r} failed to parse default. Exiting with default`), console.error(v), s;
|
|
2240
2246
|
}
|
|
2241
2247
|
};
|
|
2242
2248
|
const l = Object.keys(e).length;
|
|
@@ -2245,12 +2251,12 @@ const qr = (r) => r ? -1 : 1, oe = u.string().regex(/^\d+\.\d+\.\d+$/), Y = (r,
|
|
|
2245
2251
|
try {
|
|
2246
2252
|
if (l === 0 || Fe(g.version, a))
|
|
2247
2253
|
return console.log(m ? `${r} ${g.version} now up to date` : `${r} version ${g.version} is up to date with target version ${s.version}`), g;
|
|
2248
|
-
const
|
|
2254
|
+
const v = g.version, c = e[v], E = c(g);
|
|
2249
2255
|
return m = !0, f(E);
|
|
2250
|
-
} catch (
|
|
2256
|
+
} catch (v) {
|
|
2251
2257
|
return console.log(
|
|
2252
2258
|
`${r} failed to migrate from ${g.version} to ${a}`
|
|
2253
|
-
), console.error(
|
|
2259
|
+
), console.error(v), s;
|
|
2254
2260
|
}
|
|
2255
2261
|
};
|
|
2256
2262
|
return (g) => {
|
|
@@ -2265,8 +2271,8 @@ const qr = (r) => r ? -1 : 1, oe = u.string().regex(/^\d+\.\d+\.\d+$/), Y = (r,
|
|
|
2265
2271
|
`${r} version is null and no default version set. Exiting with default`
|
|
2266
2272
|
), s;
|
|
2267
2273
|
return f(g);
|
|
2268
|
-
} catch (
|
|
2269
|
-
return console.log(`${r} failed to parse final result. Exiting with default`), console.error(
|
|
2274
|
+
} catch (v) {
|
|
2275
|
+
return console.log(`${r} failed to parse final result. Exiting with default`), console.error(v), s;
|
|
2270
2276
|
}
|
|
2271
2277
|
};
|
|
2272
2278
|
}, kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -2359,7 +2365,7 @@ export {
|
|
|
2359
2365
|
Wr as C,
|
|
2360
2366
|
$r as D,
|
|
2361
2367
|
kr as E,
|
|
2362
|
-
|
|
2368
|
+
Sr as F,
|
|
2363
2369
|
Vr as G,
|
|
2364
2370
|
Cr as H,
|
|
2365
2371
|
Kr as I,
|
|
@@ -2384,7 +2390,7 @@ export {
|
|
|
2384
2390
|
zr as l,
|
|
2385
2391
|
w as m,
|
|
2386
2392
|
cr as n,
|
|
2387
|
-
|
|
2393
|
+
Se as o,
|
|
2388
2394
|
xr as p,
|
|
2389
2395
|
Ve as q,
|
|
2390
2396
|
qr as r,
|
|
@@ -2393,7 +2399,7 @@ export {
|
|
|
2393
2399
|
Ot as u,
|
|
2394
2400
|
Fr as v,
|
|
2395
2401
|
Zr as w,
|
|
2396
|
-
|
|
2402
|
+
vr as x,
|
|
2397
2403
|
Dr as y,
|
|
2398
2404
|
p as z
|
|
2399
2405
|
};
|