@synnaxlabs/pluto 0.46.2 → 0.46.3
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/{Toggle-Djy3iEFS.js → Toggle-BvHOvpZl.js} +1 -1
- package/dist/{Toggle-D7uuc8BY.cjs → Toggle-YrCaaWoP.cjs} +1 -1
- package/dist/{Video-Com7iIjJ.js → Video-B3mUCF7w.js} +1 -1
- package/dist/{Video-BgaQjOlJ.cjs → Video-PX9PWa1_.cjs} +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/css-BJh3xDSW.cjs +8 -0
- package/dist/{css-qKD7ZG81.js → css-C24hS2UX.js} +903 -875
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +6 -6
- package/dist/{external-CfY-kR5_.js → external-1ucYXJx8.js} +2 -2
- package/dist/{external-CwtqVaYf.js → external-BN2wbDrK.js} +3 -3
- package/dist/{external-Bfddv9ir.cjs → external-BwkIuXvQ.cjs} +1 -1
- package/dist/{external-CG-WeHt1.js → external-C-ExavVe.js} +3 -3
- package/dist/{external-C0szVQZ4.js → external-CC9QgzfY.js} +3 -3
- package/dist/{external-BwAIT4Et.js → external-Cg3K8ETl.js} +4 -4
- package/dist/{external-Bp0LGk7L.cjs → external-ChJFeBx4.cjs} +1 -1
- package/dist/{external-BwzXukg6.js → external-ChfziUeG.js} +2 -2
- package/dist/{external-fThC1Pt0.js → external-Ck9vwLNn.js} +3 -3
- package/dist/{external-iLU86byd.cjs → external-Clg5_LVL.cjs} +1 -1
- package/dist/{external-BatQDwpn.cjs → external-CtPQhs2L.cjs} +1 -1
- package/dist/{external-R1DnhHJ8.cjs → external-D-7LQcc1.cjs} +1 -1
- package/dist/{external-ok-onqCX.cjs → external-D7ez6YFA.cjs} +1 -1
- package/dist/{external-CtIn5ns5.js → external-DSC98ftR.js} +3 -3
- package/dist/{external-JI_JLXE9.cjs → external-DcJjrD1A.cjs} +2 -2
- package/dist/{external-qAqWNZPd.cjs → external-DfxokOST.cjs} +1 -1
- package/dist/{external-DPsERPGZ.js → external-Dia3MCeO.js} +3 -3
- package/dist/external-Dxu0KYI_.cjs +1 -0
- package/dist/{external-BH7AW9vg.cjs → external-NOoRXXaT.cjs} +1 -1
- package/dist/{external-B_BNwXoG.js → external-RDyCOmKR.js} +21 -21
- package/dist/{external-BXAiwKcS.js → external-S4v-IR_C.js} +3 -3
- package/dist/{external-CaehDJtX.cjs → external-VIR_Vvod.cjs} +1 -1
- package/dist/{external-BqSq3_g3.js → external-mtaOrZVh.js} +2 -2
- package/dist/{external-DZ9ZLLOd.cjs → external-orHcg1KY.cjs} +1 -1
- package/dist/{external-CM-K5NTq.js → external-ree9J7kb.js} +1 -1
- package/dist/{external-DLIuO7_6.cjs → external-s4B9EjQm.cjs} +1 -1
- package/dist/flex.cjs +1 -1
- package/dist/flex.js +1 -1
- package/dist/{fontString-BpD7ezh8.cjs → fontString-BMITZjR-.cjs} +1 -1
- package/dist/{fontString-CpT1noV1.js → fontString-CNdpxtJg.js} +2 -2
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +12 -12
- package/dist/index.js +4689 -4692
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{main-DCwBsS0F.js → main-9Dw_ngUE.js} +3 -3
- package/dist/{main-20msMsI6.cjs → main-rewFivKu.cjs} +30 -30
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/{provider-B-VPfAGa.js → provider-BMcIM58p.js} +3 -3
- package/dist/{provider-D295Uocj.cjs → provider-CedWF-id.cjs} +3 -3
- package/dist/{provider-qIzR8Puy.js → provider-DXuSQEu0.js} +2816 -2791
- package/dist/provider-DshN-WBB.cjs +83 -0
- package/dist/src/ontology/queries.d.ts +3 -10
- package/dist/src/ontology/queries.d.ts.map +1 -1
- package/dist/src/schematic/symbol/queries.d.ts +1 -3
- package/dist/src/schematic/symbol/queries.d.ts.map +1 -1
- 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/{units-WtYBE1br.js → units-BfWwpiDe.js} +1 -1
- package/dist/units-DOj-2MGY.cjs +1 -0
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +5 -5
- package/dist/css-DA2F4zE4.cjs +0 -8
- package/dist/external-BaO1j7U1.cjs +0 -1
- package/dist/provider-DVqod4rl.cjs +0 -83
- package/dist/units-CLbZ5ejs.cjs +0 -1
|
@@ -14,19 +14,12 @@ export declare const useListChildren: Flux.UseList<DependentQuery, string, ontol
|
|
|
14
14
|
export interface ListQuery extends ontology.RetrieveRequest {
|
|
15
15
|
}
|
|
16
16
|
export declare const useResourceList: Flux.UseList<ListQuery, string, ontology.Resource<import('node_modules/@synnaxlabs/x/dist/src/record/record').Unknown>>;
|
|
17
|
-
export declare const retrieveCachedParentID: (store: FluxSubStore, id: ontology.ID) =>
|
|
18
|
-
export declare const filterRelationshipsThatHaveIDs: (resources: ontology.ID[]) => (rel: ontology.Relationship) => boolean;
|
|
17
|
+
export declare const retrieveCachedParentID: (store: FluxSubStore, id: ontology.ID) => ontology.ID | null;
|
|
19
18
|
export interface RetrieveParentIDQuery {
|
|
20
19
|
id: ontology.ID;
|
|
21
|
-
type?: ontology.ResourceType;
|
|
22
20
|
}
|
|
23
|
-
export declare const retrieveParentID: Flux.
|
|
24
|
-
|
|
25
|
-
key: string;
|
|
26
|
-
} | {
|
|
27
|
-
type: "node" | "label" | "table" | "range" | "group" | "log" | "status" | "cluster" | "schematic" | "channel" | "workspace" | "user" | "task" | "device" | "rack" | "arc" | "allow_all" | "builtin" | "framer" | "range-alias" | "lineplot" | "policy" | "schematic_symbol";
|
|
28
|
-
key: string;
|
|
29
|
-
} | null>;
|
|
21
|
+
export declare const retrieveParentID: ({ client, query: { id }, store, }: Flux.RetrieveParams<RetrieveParentIDQuery, FluxSubStore>) => Promise<ontology.ID>;
|
|
22
|
+
export declare const filterRelationshipsThatHaveIDs: (resources: ontology.ID[]) => (rel: ontology.Relationship) => boolean;
|
|
30
23
|
export interface MoveChildrenParams {
|
|
31
24
|
source: ontology.ID;
|
|
32
25
|
destination: ontology.ID;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/ontology/queries.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,0BAA0B,GACrC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,KAAK,IAAI,KAC3C,IAGF,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,UAAU,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,KAAK,IAAI,KAClC,IAQF,CAAC;AAEF,eAAO,MAAM,8BAA8B,GACzC,OAAO,CAAC,YAAY,EAAE,QAAQ,CAAC,YAAY,KAAK,IAAI,KACnD,IAGF,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAC5C,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,YAAY,KAAK,IAAI,KACtD,IASF,CAAC;AAEF,UAAU,cAAe,SAAQ,IAAI,CAAC,WAAW;IAC/C,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC;CAClB;AAED,eAAO,MAAM,wBAAwB,GACnC,WAAW,QAAQ,CAAC,qBAAqB,EACzC,MAAM,MAAM,iIA6CV,CAAC;AAEL,eAAO,MAAM,eAAe,8HAG3B,CAAC;AAEF,MAAM,WAAW,SAAU,SAAQ,QAAQ,CAAC,eAAe;CAAG;AAE9D,eAAO,MAAM,eAAe,yHAsB1B,CAAC;AAEH,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/ontology/queries.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,0BAA0B,GACrC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,KAAK,IAAI,KAC3C,IAGF,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,UAAU,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,KAAK,IAAI,KAClC,IAQF,CAAC;AAEF,eAAO,MAAM,8BAA8B,GACzC,OAAO,CAAC,YAAY,EAAE,QAAQ,CAAC,YAAY,KAAK,IAAI,KACnD,IAGF,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAC5C,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,YAAY,KAAK,IAAI,KACtD,IASF,CAAC;AAEF,UAAU,cAAe,SAAQ,IAAI,CAAC,WAAW;IAC/C,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC;CAClB;AAED,eAAO,MAAM,wBAAwB,GACnC,WAAW,QAAQ,CAAC,qBAAqB,EACzC,MAAM,MAAM,iIA6CV,CAAC;AAEL,eAAO,MAAM,eAAe,8HAG3B,CAAC;AAEF,MAAM,WAAW,SAAU,SAAQ,QAAQ,CAAC,eAAe;CAAG;AAE9D,eAAO,MAAM,eAAe,yHAsB1B,CAAC;AAEH,eAAO,MAAM,sBAAsB,GACjC,OAAO,YAAY,EACnB,IAAI,QAAQ,CAAC,EAAE,KACd,QAAQ,CAAC,EAAE,GAAG,IAShB,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC;CACjB;AAED,eAAO,MAAM,gBAAgB,GAAU,mCAIpC,IAAI,CAAC,cAAc,CAAC,qBAAqB,EAAE,YAAY,CAAC,KAAG,OAAO,CAAC,QAAQ,CAAC,EAAE,CAYhF,CAAC;AAEF,eAAO,MAAM,8BAA8B,GACxC,WAAW,QAAQ,CAAC,EAAE,EAAE,MAAM,KAAK,QAAQ,CAAC,YAAY,YAItD,CAAC;AAEN,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC;IACpB,WAAW,EAAE,QAAQ,CAAC,EAAE,CAAC;IACzB,GAAG,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC;CACpB;AAQD,eAAO,MAAmB,eAAe,gFA8BvC,CAAC;AAEH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,YAAY,EACnB,IAAI,QAAQ,CAAC,EAAE,EACf,MAAM,MAAM,uCAC6D,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC;CACjB;AAED,eAAO,MAA+B,6BAA6B,6IAQ/D,CAAC;AAEL,UAAU,qBAAqB;IAC7B,GAAG,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC;CACpB;AAED,eAAO,MACQ,mBAAmB,qIACT,6BAA6B,6IAUpD,CAAC"}
|
|
@@ -4,9 +4,8 @@ import { Ontology } from '../../ontology';
|
|
|
4
4
|
export declare const FLUX_STORE_KEY = "schematicSymbols";
|
|
5
5
|
export interface FluxStore extends Flux.UnaryStore<schematic.symbol.Key, schematic.symbol.Symbol> {
|
|
6
6
|
}
|
|
7
|
-
export interface FluxSubStore extends
|
|
7
|
+
export interface FluxSubStore extends Ontology.FluxSubStore {
|
|
8
8
|
[FLUX_STORE_KEY]: FluxStore;
|
|
9
|
-
[Ontology.RELATIONSHIPS_FLUX_STORE_KEY]: Ontology.RelationshipFluxStore;
|
|
10
9
|
}
|
|
11
10
|
export declare const STORE_CONFIG: Flux.UnaryStoreConfig<FluxSubStore, schematic.symbol.Key, schematic.symbol.Symbol>;
|
|
12
11
|
export interface RetrieveQuery {
|
|
@@ -23,7 +22,6 @@ export interface ListQuery {
|
|
|
23
22
|
export declare const useList: Flux.UseList<ListQuery, string, schematic.symbol.Symbol>;
|
|
24
23
|
export interface FormQuery {
|
|
25
24
|
key?: string;
|
|
26
|
-
parent?: ontology.ID;
|
|
27
25
|
}
|
|
28
26
|
export declare const formSchema: import('zod').ZodObject<{
|
|
29
27
|
key: import('zod').ZodOptional<import('zod').ZodUUID>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../src/schematic/symbol/queries.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAErE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../src/schematic/symbol/queries.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAErE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,eAAO,MAAM,cAAc,qBAAqB,CAAC;AAIjD,MAAM,WAAW,SACf,SAAQ,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;CAAG;AAE3E,MAAM,WAAW,YAAa,SAAQ,QAAQ,CAAC,YAAY;IACzD,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;CAC7B;AAoBD,eAAO,MAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAC9C,YAAY,EACZ,SAAS,CAAC,MAAM,CAAC,GAAG,EACpB,SAAS,CAAC,MAAM,CAAC,MAAM,CAGxB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;CACb;AAcD,eAAO,MAAQ,WAAW,4DAAE,iBAAiB,gEAU3C,CAAC;AAEH,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAQD,eAAO,MAAM,OAAO,0DAyDlB,CAAC;AAEH,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAEY,CAAC;AAEpC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CA6DlB,CAAC;AAEH,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC;CAAG;AAEtF,eAAO,MAAmB,SAAS,oEAcjC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AAEzE,eAAO,MAAmB,SAAS,oEAQjC,CAAC;AAEH,eAAO,MAAqB,gBAAgB,mCAW1C,CAAC"}
|
package/dist/tabs.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-ChJFeBx4.cjs");exports.Tabs=e.external;
|
package/dist/tabs.js
CHANGED
package/dist/text.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./main-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./main-rewFivKu.cjs");const e=require("./external-orHcg1KY.cjs");exports.Text=e.external;
|
package/dist/text.js
CHANGED
package/dist/theming.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./main-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./main-rewFivKu.cjs");const e=require("./external-VIR_Vvod.cjs");exports.Theming=e.external;
|
package/dist/theming.js
CHANGED
package/dist/tree.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-D7ez6YFA.cjs");exports.Tree=e.external;
|
package/dist/tree.js
CHANGED
package/dist/triggers.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-s4B9EjQm.cjs");exports.Triggers=e.external;
|
package/dist/triggers.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const c=require("./css-BJh3xDSW.cjs"),n=(r,e,s)=>Object.fromEntries(s.map(t=>[`${r}-${t}`,c.Rr.hex(c.Rr.setAlpha(c.Rr.construct(e),t))])),a=(r,e,s=!1)=>{const t=`${r}${e}`;return s?`round(${t}, 1px)`:t};exports.createHexOpacityVariants=n;exports.unitProperty=a;
|
package/dist/video.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Video-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Video-PX9PWa1_.cjs");exports.Video=e.Video;
|
package/dist/video.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synnaxlabs/pluto",
|
|
3
|
-
"version": "0.46.
|
|
3
|
+
"version": "0.46.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@fontsource-variable/inter": "^5.2.7",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"zod": "^4.1.8",
|
|
23
23
|
"@synnaxlabs/alamos": "^0.46.0",
|
|
24
24
|
"@synnaxlabs/client": "^0.46.0",
|
|
25
|
-
"@synnaxlabs/
|
|
26
|
-
"@synnaxlabs/
|
|
25
|
+
"@synnaxlabs/freighter": "0.46.0",
|
|
26
|
+
"@synnaxlabs/x": "^0.46.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@juggle/resize-observer": "^3.4.0",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"vitest": "^3.2.4",
|
|
47
47
|
"@synnaxlabs/tsconfig": "^0.43.0",
|
|
48
48
|
"@synnaxlabs/vite-plugin": "^0.43.0",
|
|
49
|
-
"
|
|
50
|
-
"
|
|
49
|
+
"stylelint-config-synnaxlabs": "^0.43.0",
|
|
50
|
+
"eslint-config-synnaxlabs": "^0.43.0"
|
|
51
51
|
},
|
|
52
52
|
"files": [
|
|
53
53
|
"dist"
|
package/dist/css-DA2F4zE4.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("zod"),or=t=>a.union([a.union([a.null(),a.undefined()]).transform(()=>[]),t.array()]),An=t=>Array.isArray(t)?t:t==null?[]:[t],ur=(t,e)=>{if(Array.isArray(e))return e.reduce((s,i)=>ur(s,i),t??[]);if(t==null)return[e];const r=t.findIndex(s=>s==e),n=[...t];return r===-1?n.push(e):n[r]=e,n},En=((t,e)=>{if(t!=null)return Array.isArray(e)?t.filter(r=>!e.includes(r)):t.filter(r=>r!=e)}),lr=(t,e)=>{if(Array.isArray(e))return e.reduce((s,i)=>lr(s,i),t??[]);if(t==null)return[e];const r=t.findIndex(s=>s.key===e.key),n=[...t];return r===-1?n.push(e):n[r]=e,n},Un=((t,e)=>{if(t!=null)return Array.isArray(e)?t.filter(r=>!e.includes(r.key)):t.filter(r=>r.key!==e)}),Bn=Object.freeze(Object.defineProperty({__proto__:null,nullableZ:or,remove:En,removeKeyed:Un,toArray:An,upsert:ur,upsertKeyed:lr},Symbol.toStringTag,{value:"Module"})),jn=t=>{const e=t.replace(/_[a-z]/g,r=>r[1].toUpperCase());return e.length>1&&e[0]===e[0].toUpperCase()&&e[1]===e[1].toUpperCase()||e.length===0?e:e[0].toLowerCase()+e.slice(1)},Ye=t=>{const e=(r,n=ut)=>{if(typeof r=="string")return t(r);if(Array.isArray(r))return r.map(o=>e(o,n));if(!rt(r))return r;n=Ln(n);const s={},i=r;return"toJSON"in i&&typeof i.toJSON=="function"?e(i.toJSON(),n):(Object.keys(i).forEach(o=>{let h=i[o];const f=t(o);n.recursive&&(rt(h)?Qt(h)||(h=e(h,n)):n.recursiveInArray&&Kt(h)&&(h=[...h].map(l=>{let d=l;return rt(l)?Qt(d)||(d=e(l,n)):Kt(l)&&(d=e({key:l},n).key),d}))),s[f]=h}),s)};return e},xt=Ye(jn),Cn=t=>t.replace(/([a-z0-9])([A-Z])/g,(e,r,n)=>`${r}_${n.toLowerCase()}`),cr=Ye(Cn),hr=t=>t.length===0?t:t[0].toUpperCase()+t.slice(1),Rn=[Number,String,Uint8Array],ut={recursive:!0,recursiveInArray:!0},Ln=(t=ut)=>(t.recursive==null?t=ut:t.recursiveInArray??=!1,t),Kt=t=>t!=null&&Array.isArray(t),rt=t=>t!=null&&typeof t=="object"&&!Array.isArray(t),Qt=t=>Rn.some(e=>t instanceof e),Dn=t=>t.replace(/[\s_]+/g,"-").replace(/([a-z0-9])([A-Z])/g,(e,r,n)=>`${r}-${n.toLowerCase()}`).toLowerCase(),Pn=Ye(Dn),kn=t=>{if(t.length===0)return t;let e=t.replace(/[_-]/g," ");return e=e.replace(/([a-z0-9])([A-Z])/g,(r,n,s)=>`${n} ${s}`),e=e.replace(/([A-Z]+)([A-Z][a-z])/g,(r,n,s)=>`${n} ${s}`),e=e.replace(/\s+/g," ").trim(),e=e.replace(/\b\w/g,r=>r.toUpperCase()),e},qn=Ye(kn),Zn=Object.freeze(Object.defineProperty({__proto__:null,camelToSnake:cr,capitalize:hr,snakeToCamel:xt,toKebab:Pn,toProperNoun:qn},Symbol.toStringTag,{value:"Module"}));let Fn=class{contentType="application/json";decoder;encoder;constructor(){this.decoder=new TextDecoder,this.encoder=new TextEncoder}encode(e){return this.encoder.encode(this.encodeString(e))}decode(e,r){return this.decodeString(this.decoder.decode(e),r)}decodeString(e,r){const n=JSON.parse(e),s=xt(n);return r!=null?r.parse(s):s}encodeString(e){const r=cr(e);return JSON.stringify(r,(n,s)=>ArrayBuffer.isView(s)?Array.from(s):typeof s=="bigint"?s.toString():s)}};const lt=new Fn,ct=t=>[...new Set(t)],Yn=(t,e,r=!0)=>{const n=new Map;return t.forEach(s=>{const i=e(s);if(n.has(i)){if(r)return;n.delete(i)}n.set(i,s)}),Array.from(n.values())},Wn=Object.freeze(Object.defineProperty({__proto__:null,by:Yn,unique:ct},Symbol.toStringTag,{value:"Module"})),E=t=>t!=null&&typeof t=="object"&&"value"in t;let te=class{value;constructor(e){this.value=e}valueOf(){return this.value}toJSON(){return this.value}toString(){return this.value.toString()}};const St=t=>t!=null&&typeof t=="object"&&"toString"in t,fr=t=>{if(St(t))return t?.toString().length===0;switch(typeof t){case"string":return t.length===0;case"number":return t===0;case"bigint":return t===0n;case"boolean":return!t;case"undefined":return!0;case"object":return t==null;default:return!1}},Vn=t=>!fr(t),Gn=Object.freeze(Object.defineProperty({__proto__:null,ValueExtension:te,isCrudeValueExtension:E,isNonZero:Vn,isStringer:St,isZero:fr},Symbol.toStringTag,{value:"Module"})),We=(t,e=!1)=>{const r=St(t)?"stringer":typeof t;let n;switch(r){case"string":n=(s,i)=>s.localeCompare(i);break;case"stringer":n=(s,i)=>s.toString().localeCompare(i.toString());break;case"number":n=(s,i)=>Number(s)-Number(i);break;case"bigint":n=(s,i)=>BigInt(s)-BigInt(i)>0n?1:-1;break;case"boolean":n=(s,i)=>Number(s)-Number(i);break;case"undefined":n=()=>0;break;default:return console.warn(`sortFunc: unknown type ${r}`),()=>-1}return e?gr(n):n},Hn=(t,e,r)=>{const n=We(e[t],r);return(s,i)=>n(s[t],i[t])},Xn=(t,e)=>t.length!==e.length?t.length-e.length:t.every((r,n)=>r===e[n])?0:-1,dr=(t,e)=>{if(t.length!==e.length)return t.length-e.length;if(t.length===0)return 0;const r=We(t[0]),n=[...t].sort(r),s=[...e].sort(r);return n.every((i,o)=>i===s[o])?0:-1},Jn=(t,e)=>{const r=ct(t),n=ct(e);return dr(r,n)},Kn=(t,e)=>t===e?0:t==="first"&&e==="last"?1:-1,gr=t=>(e,r)=>t(r,e),ie=0,Ee=-1,Ue=1,pr=t=>t<ie,mr=t=>t>ie,Qn=t=>t>=ie,yr=t=>t===ie,_n=(t,e)=>{const r=/([a-zA-Z]+)|(\d+)/g,n=t.replace(/[\s_.-]+/g,"").match(r),s=e.replace(/[\s_.-]+/g,"").match(r);if(!n||!s)return 0;for(let i=0;i<Math.min(n.length,s.length);i++){const o=n[i],h=s[i];if(isNaN(Number(o))&&isNaN(Number(h))){const f=o.localeCompare(h);if(f!==0)return f}else if(!isNaN(Number(o))&&!isNaN(Number(h))){const f=Number(o)-Number(h);if(f!==0)return f}else return isNaN(Number(o))?-1:1}return n.length-s.length},es=Object.freeze(Object.defineProperty({__proto__:null,EQUAL:ie,GREATER_THAN:Ue,LESS_THAN:Ee,isEqualTo:yr,isGreaterThan:mr,isGreaterThanEqual:Qn,isLessThan:pr,newF:We,newFieldF:Hn,order:Kn,primitiveArrays:Xn,reverseF:gr,stringsWithNumbers:_n,uniqueUnorderedPrimitiveArrays:Jn,unorderedPrimitiveArrays:dr},Symbol.toStringTag,{value:"Module"})),Ve=a.z.tuple([a.z.number(),a.z.number()]);a.z.tuple([a.z.bigint(),a.z.bigint()]);const Nt=a.z.object({width:a.z.number(),height:a.z.number()}),ts=a.z.object({signedWidth:a.z.number(),signedHeight:a.z.number()}),rs=["width","height"];a.z.enum(rs);const ns=["start","center","end"],ss=["signedWidth","signedHeight"];a.z.enum(ss);const me=a.z.object({x:a.z.number(),y:a.z.number()}),br=a.z.object({clientX:a.z.number(),clientY:a.z.number()}),Ge=["x","y"],It=a.z.enum(Ge),Mt=["top","right","bottom","left"],is=a.z.enum(Mt),He=["left","right"],zt=a.z.enum(He),Xe=["top","bottom"],At=a.z.enum(Xe),Et=["center"],ht=a.z.enum(Et),as=[...Mt,...Et],Ut=a.z.enum(as);a.z.enum(ns);const os=["first","last"];a.z.enum(os);const wr=a.z.object({lower:a.z.number(),upper:a.z.number()}),us=a.z.object({lower:a.z.bigint(),upper:a.z.bigint()});a.z.union([wr,Ve]);a.z.union([us,Ve]);const ls=a.z.enum([...It.options,...Ut.options]);a.z.enum(["x","left","right"]);a.z.enum(["y","top","bottom"]);const cs=a.z.union([It,Ut,a.z.instanceof(String)]),ae=t=>(e,r)=>{if(typeof e=="bigint"){if(ke(r))return t(e,BigInt(r));const n=t(Number(e),Number(r));return typeof n=="number"?BigInt(Math.round(n)):n}return t(Number(e),Number(r))},q=ae((t,e)=>t-e),oe=ae((t,e)=>t+e),hs=(t,e,r=1e-4)=>Math.abs(t-e)<r,ft=(t,e)=>{const r=typeof t=="bigint",n=typeof e=="bigint";return r&&n?t===e:r&&ke(e)?t===BigInt(e):n&&ke(t)?e===BigInt(t):t===e},fs=t=>{const e=10**Math.floor(Math.log10(t));return Math.round(t/e)*e},$r=ae((t,e)=>t<=e?t:e),ke=t=>typeof t=="bigint"?!0:Number.isInteger(t),ds=ae((t,e)=>t>=e?t:e),Or=t=>typeof t=="bigint"?t<0n?-t:t:t<0?-t:t,j=ae((t,e)=>t*e),ve=ae((t,e)=>t/e),b=(t,e,r)=>{const n={};if(typeof e=="object"&&(r=e,e=void 0),r={makeValid:!0,...r},typeof t=="number"||typeof t=="bigint")e!=null?(n.lower=t,n.upper=e):(n.lower=typeof t=="bigint"?0n:0,n.upper=t);else if(Array.isArray(t)){if(t.length!==2)throw new Error("bounds: expected array of length 2");[n.lower,n.upper]=t}else n.lower=t.lower,n.upper=t.upper;return r?.makeValid?vr(n):n},gs=Object.freeze({lower:0,upper:0}),ps=Object.freeze({lower:-1/0,upper:1/0}),ms=Object.freeze({lower:0,upper:1}),ys=Object.freeze({lower:-1,upper:1}),bs=(t,e)=>{if(t==null&&e==null)return!0;if(t==null||e==null)return!1;const r=b(t),n=b(e);return r?.lower===n?.lower&&r?.upper===n?.upper},vr=t=>t.lower>t.upper?{lower:t.upper,upper:t.lower}:t,dt=(t,e)=>{const r=b(t);return e<r.lower?r.lower:e>=r.upper?r.upper-(typeof r.upper=="number"?1:1n):e},C=(t,e)=>{const r=b(t);if(typeof e=="number"||typeof e=="bigint")return e>=r.lower&&e<r.upper;const n=b(e);return n.lower>=r.lower&&n.upper<=r.upper},ws=(t,e)=>{const r=b(t),n=b(e);return r.lower===n.lower?!0:n.upper===r.lower||n.lower===r.upper?!1:C(r,n.upper)||C(r,n.lower)||C(n,r.upper)||C(n,r.lower)},Te=t=>{const e=b(t);return e.upper-e.lower},$s=t=>{const e=b(t);return typeof e.lower=="bigint"?e.lower===0n&&e.upper===0n:e.lower===0&&e.upper===0},Os=t=>{const e=Te(t);return typeof e=="number"?e===0:e===0n},vs=t=>{const e=b(t);return typeof e.lower=="bigint"?!0:Number.isFinite(e.lower)&&Number.isFinite(e.upper)},Ts=t=>{const e=b(t);return(e.upper+e.lower)/2},Tr=t=>({lower:Math.min(...t.map(e=>b(e).lower)),upper:Math.max(...t.map(e=>b(e).upper))}),xs=t=>({lower:Math.max(...t.map(e=>b(e).lower)),upper:Math.min(...t.map(e=>b(e).upper))}),Ss=t=>{const e=b(t),r=typeof e.lower=="bigint";return Array.from({length:Number(Te(t))},(n,s)=>r?e.lower+BigInt(s):e.lower+s)},gt=(t,e)=>{const r=t.map(i=>b(i)),n=r.findIndex(i=>C(i,e)||e<i.lower);if(n===-1)return{index:t.length,position:0};const s=r[n];return C(s,e)?{index:n,position:Number(e-s.lower)}:{index:n,position:0}},nt={removeBefore:0,removeAfter:0,insertInto:0,deleteInBetween:0},Ns=(t,e)=>{const r=t.map(l=>b(l)),n=b(e);if(r.length===0)return nt;const s=gt(r,n.lower),i=gt(r,n.upper);if(s.index===t.length)return{...nt,insertInto:t.length};if(i.index===0)return{...nt,removeAfter:i.position};if(s.index===i.index)return s.position!==0&&i.position!==0?null:{removeAfter:i.position,removeBefore:s.position,insertInto:s.index,deleteInBetween:0};let o=i.index-s.index,h=s.index,f=q(Number(Te(r[s.index])),s.position);return s.position!==0?(o-=1,h+=1):f=0,{removeBefore:f,removeAfter:i.position,insertInto:h,deleteInBetween:o}},xr=(t,e,r)=>{const n=t.map(h=>b(h)),s=r>0?1:r<0?-1:0;if(s===0)return e;let i=r,o=e;for(;ft(i,0)===!1;){const h=n.findIndex(f=>s>0?o>=f.lower&&o<f.upper:o>f.lower&&o<=f.upper);if(h!==-1){const f=n[h];let l;if(s>0?l=q(f.upper,o):l=q(o,f.lower),l>0){const d=$r(Or(i),l);if(o=oe(o,s>0?d:-d),i=q(i,s>0?d:-d),ft(i,0))return o;continue}}if(s>0){const f=n.filter(l=>l.lower>o);if(f.length>0)o=f[0].lower;else return o}else{const f=n.filter(l=>l.upper<o);if(f.length>0)o=f[f.length-1].upper;else return o}}return o},Sr=(t,e,r)=>{const n=t.map(o=>b(o));if(e===r)return typeof e=="bigint"?0n:0;const s=e<r?b([e,r]):b([r,e]);let i=typeof e=="bigint"?0n:0;for(const o of n){const h=o.lower>s.lower?o.lower:s.lower,f=o.upper<s.upper?o.upper:s.upper;if(h<f){const l=f-h;i=i+l}}return i},Is=Object.freeze(Object.defineProperty({__proto__:null,CLIP:ys,DECIMAL:ms,INFINITE:ps,ZERO:gs,bounds:wr,buildInsertionPlan:Ns,clamp:dt,construct:b,contains:C,distance:Sr,equals:bs,findInsertPosition:gt,isFinite:vs,isZero:$s,linspace:Ss,makeValid:vr,max:Tr,mean:Ts,min:xs,overlapsWith:ws,span:Te,spanIsZero:Os,traverse:xr},Symbol.toStringTag,{value:"Module"})),Nr=ls,k=t=>Ge.includes(t)?t:Xe.includes(t)?"y":"x",Ms=t=>k(t)==="x"?"y":"x",zs=t=>k(t)==="x"?"width":"height",As=t=>k(t)==="x"?"left":"top",Es=t=>Nr.safeParse(t).success,Us=t=>k(t)==="x"?"signedWidth":"signedHeight",Bs=t=>t==="center"?!1:k(t)==="x",js=t=>k(t)==="y",Ir=Object.freeze(Object.defineProperty({__proto__:null,DIRECTIONS:Ge,construct:k,crude:Nr,dimension:zs,direction:It,isDirection:Es,isX:Bs,isY:js,location:As,signedDimension:Us,swap:Ms},Symbol.toStringTag,{value:"Module"})),Cs=zt,Rs=At,Ls=ht,Ds={top:"bottom",right:"left",bottom:"top",left:"right",center:"center"},Ps={top:"left",right:"top",bottom:"right",left:"bottom",center:"center"},ks=cs,H=t=>t instanceof String||!Ge.includes(t)?t:t==="x"?"left":"top",qs=t=>Ds[H(t)],Zs=t=>Ps[H(t)],ye=t=>{const e=H(t);return e==="top"||e==="bottom"?"y":"x"},Fs=a.z.object({x:zt.or(ht),y:At.or(ht)}),Mr=a.z.object({x:zt,y:At}),xe=Object.freeze({x:"left",y:"top"}),Bt=Object.freeze({x:"right",y:"top"}),Je=Object.freeze({x:"left",y:"bottom"}),jt=Object.freeze({x:"right",y:"bottom"}),Ct=Object.freeze({x:"center",y:"center"}),Rt=Object.freeze({x:"center",y:"top"}),Lt=Object.freeze({x:"center",y:"bottom"}),Dt=Object.freeze({x:"right",y:"center"}),Pt=Object.freeze({x:"left",y:"center"}),Ys=Object.freeze([Pt,Dt,Rt,Lt,xe,Bt,Je,jt,Ct]),kt=(t,e)=>t.x===e.x&&t.y===e.y,Ws=(t,e)=>{if(typeof e=="object"){let r=!0;return"x"in e&&(t.x===e.x||(r=!1)),"y"in e&&(t.y===e.y||(r=!1)),r}return t.x===e||t.y===e},zr=t=>[t.x,t.y],Be=t=>ye(H(t))==="x",Vs=t=>ye(H(t))==="y",Gs=t=>`${t.x}${hr(t.y)}`,Hs=(t,e)=>{let r,n;if(typeof t=="object"&&"x"in t?(r=t.x,n=t.y):(r=H(t),n=H(e??t)),ye(r)===ye(n)&&r!=="center"&&n!=="center")throw new Error(`[XYLocation] - encountered two locations with the same direction: ${r.toString()} - ${n.toString()}`);const s={...Ct};return r==="center"?Be(n)?[s.x,s.y]=[n,r]:[s.x,s.y]=[r,n]:n==="center"?Be(r)?[s.x,s.y]=[r,n]:[s.x,s.y]=[n,r]:Be(r)?[s.x,s.y]=[r,n]:[s.x,s.y]=[n,r],s},Ar=Object.freeze(Object.defineProperty({__proto__:null,BOTTOM_CENTER:Lt,BOTTOM_LEFT:Je,BOTTOM_RIGHT:jt,CENTER:Ct,CENTER_LEFT:Pt,CENTER_LOCATIONS:Et,CENTER_RIGHT:Dt,OUTER_LOCATIONS:Mt,TOP_CENTER:Rt,TOP_LEFT:xe,TOP_RIGHT:Bt,XY_LOCATIONS:Ys,X_LOCATIONS:He,Y_LOCATIONS:Xe,center:Ls,construct:H,constructXY:Hs,corner:Mr,crude:ks,direction:ye,isX:Be,isY:Vs,location:Ut,outer:is,rotate90:Zs,swap:qs,x:Cs,xy:Fs,xyCouple:zr,xyEquals:kt,xyMatches:Ws,xyToString:Gs,y:Rs},Symbol.toStringTag,{value:"Module"})),pt=a.z.union([a.z.number(),me,Ve,Nt,ts,br]),O=(t,e)=>{if(typeof t=="string"){if(e===void 0)throw new Error("The y coordinate must be given.");return t==="x"?{x:e,y:0}:{x:0,y:e}}return typeof t=="number"?{x:t,y:e??t}:Array.isArray(t)?{x:t[0],y:t[1]}:"signedWidth"in t?{x:t.signedWidth,y:t.signedHeight}:"clientX"in t?{x:t.clientX,y:t.clientY}:"width"in t?{x:t.width,y:t.height}:{x:t.x,y:t.y}},P=Object.freeze({x:0,y:0}),Er=Object.freeze({x:1,y:1}),Xs=Object.freeze({x:1/0,y:1/0}),Js=Object.freeze({x:NaN,y:NaN}),qe=(t,e,r=0)=>{const n=O(t),s=O(e);return r===0?n.x===s.x&&n.y===s.y:Math.abs(n.x-s.x)<=r&&Math.abs(n.y-s.y)<=r},Ks=t=>qe(t,P),qt=(t,e,r)=>{const n=O(t),s=O(e,r);return{x:n.x*s.x,y:n.y*s.y}},Ur=(t,e)=>{const r=O(t);return{x:r.x+e,y:r.y}},Br=(t,e)=>{const r=O(t);return{x:r.x,y:r.y+e}},be=(t,e,r,...n)=>{if(typeof e=="string"){if(typeof r!="number")throw new Error("The value must be a number.");return e==="x"?Ur(t,r):Br(t,r)}if(typeof e=="object"&&"x"in e&&typeof e.x=="string"){const s=O(r),i=O(t);return e.x==="left"?s.x=-s.x:e.x==="center"&&(s.x=0),e.y==="top"?s.y=-s.y:e.y==="center"&&(s.y=0),{x:i.x+s.x,y:i.y+s.y}}return[t,e,r??P,...n].reduce((s,i)=>{const o=O(i);return{x:s.x+o.x,y:s.y+o.y}},P)},Qs=(t,e,r)=>{const n=O(t);return e==="x"?{x:r,y:n.y}:{x:n.x,y:r}},_s=(t,e)=>{const r=O(t),n=O(e);return Math.sqrt((r.x-n.x)**2+(r.y-n.y)**2)},ei=(t,e)=>{const r=O(t),n=O(e);return{x:n.x-r.x,y:n.y-r.y}},ti=t=>{const e=O(t);return Number.isNaN(e.x)||Number.isNaN(e.y)},ri=t=>{const e=O(t);return Number.isFinite(e.x)&&Number.isFinite(e.y)},ni=t=>{const e=O(t);return[e.x,e.y]},si=t=>{const e=O(t);return{left:e.x,top:e.y}},mt=(t,e=0)=>{const r=O(t);return{x:Number(r.x.toFixed(e)),y:Number(r.y.toFixed(e))}},le=(t,e)=>{const r=O(t),n=O(e);return{x:r.x-n.x,y:r.y-n.y}},ce=t=>{const e=O(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:-e.y/r,y:e.x/r}},jr=t=>{const e=O(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:e.x/r,y:e.y/r}},Cr=(...t)=>{const e=t.reduce((r,n)=>be(r,n),P);return qt(e,1/t.length)},ii=(t,e)=>{const r=[];for(let n=0;n<t.length;n++){const s=t[n];let i,o,h,f;if(n===0){const l=t[n+1],d=le(l,s);o=ce(d),h=o,f=e}else if(n===t.length-1){const l=t[n-1],d=le(s,l);i=ce(d),h=i,f=e}else{const l=t[n-1],d=t[n+1],m=le(s,l),p=le(d,s);i=ce(m),o=ce(p);const M=Math.acos((m.x*p.x+m.y*p.y)/(Math.hypot(m.x,m.y)*Math.hypot(p.x,p.y))),A=Math.sin(M/2);A===0?f=e:f=e/A,h=jr(Cr(i,o))}r.push(qt(h,f))}return r},ai=t=>{const e=O(t);return{x:e.y,y:e.x}},yt=t=>{const e=O(t);return{x:Math.round(e.x),y:Math.round(e.y)}},oi=t=>{const e=O(t);return{x:1/e.x,y:1/e.y}},ui=Object.freeze(Object.defineProperty({__proto__:null,INFINITY:Xs,NAN:Js,ONE:Er,ZERO:P,average:Cr,calculateMiters:ii,clientXY:br,construct:O,couple:ni,crudeZ:pt,css:si,distance:_s,equals:qe,isFinite:ri,isNan:ti,isZero:Ks,normal:ce,normalize:jr,reciprocal:oi,round:yt,scale:qt,set:Qs,sub:le,swap:ai,translate:be,translateX:Ur,translateY:Br,translation:ei,truncate:mt,xy:me},Symbol.toStringTag,{value:"Module"})),Ne=a.z.union([a.z.number(),a.z.string()]),li=a.z.object({top:Ne,left:Ne,width:Ne,height:Ne}),ci=a.z.object({left:a.z.number(),top:a.z.number(),right:a.z.number(),bottom:a.z.number()}),hi=a.z.object({one:me,two:me,root:Mr}),Rr={one:P,two:P,root:xe},fi={one:P,two:Er,root:Je},Lr=(t,e)=>({one:t.one,two:t.two,root:e??t.root}),x=(t,e,r=0,n=0,s)=>{const i={one:{...P},two:{...P},root:s??xe};if(typeof t=="number"){if(typeof e!="number")throw new Error("Box constructor called with invalid arguments");return i.one={x:t,y:e},i.two={x:i.one.x+r,y:i.one.y+n},i}return"one"in t&&"two"in t&&"root"in t?{...t,root:s??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(i.one={x:t.left,y:t.top},i.two={x:t.right,y:t.bottom},i):(i.one=t,e==null?i.two={x:i.one.x+r,y:i.one.y+n}:typeof e=="number"?i.two={x:i.one.x+e,y:i.one.y+r}:"width"in e?i.two={x:i.one.x+e.width,y:i.one.y+e.height}:"signedWidth"in e?i.two={x:i.one.x+e.signedWidth,y:i.one.y+e.signedHeight}:i.two=e,i))},di=(t,e,r)=>{const n=x(t);if(typeof e=="string"){if(r==null)throw new Error("Invalid arguments for resize");const s=k(e);return x(n.one,void 0,s==="x"?r:X(n),s==="y"?r:J(n),n.root)}return x(n.one,e,void 0,void 0,n.root)},gi=(t,e,r=!0)=>{const n=x(t);let s=(i,o)=>i<o;return r&&(s=(i,o)=>i<=o),"one"in e?s(V(n),V(e))&&s(Q(e),Q(n))&&s(G(n),G(e))&&s(_(e),_(n)):s(V(n),e.x)&&s(e.x,Q(n))&&s(G(n),e.y)&&s(e.y,_(n))},pi=(t,e)=>qe(t.one,e.one)&&qe(t.two,e.two)&&kt(t.root,e.root),Dr=t=>({width:X(t),height:J(t)}),mi=t=>({signedWidth:Ke(t),signedHeight:Qe(t)}),yi=t=>({top:G(t),left:V(t),width:X(t),height:J(t)}),Zt=(t,e,r=!1)=>{const n=k(e)==="y"?Qe(t):Ke(t);return r?n:Math.abs(n)},Z=(t,e)=>{const r=x(t);return{x:e.x==="center"?bt(r).x:ee(r,e.x),y:e.y==="center"?bt(r).y:ee(r,e.y)}},ee=(t,e)=>{const r=x(t),n=zr(r.root).includes(e)?Math.min:Math.max;return He.includes(e)?n(r.one.x,r.two.x):n(r.one.y,r.two.y)},bi=t=>qr(t)===0,X=t=>Zt(t,"x"),J=t=>Zt(t,"y"),Ke=t=>{const e=x(t);return e.two.x-e.one.x},Qe=t=>{const e=x(t);return e.two.y-e.one.y},Pr=t=>Z(t,xe),wi=t=>Z(t,Rt),$i=t=>Z(t,Bt),Oi=t=>Z(t,Je),vi=t=>Z(t,Lt),Ti=t=>Z(t,jt),xi=t=>Z(t,Pt),Si=t=>Z(t,Dt),Q=t=>ee(t,"right"),_=t=>ee(t,"bottom"),V=t=>ee(t,"left"),G=t=>ee(t,"top"),bt=t=>be(Pr(t),{x:Ke(t)/2,y:Qe(t)/2}),Ft=t=>{const e=x(t);return e.root.x==="left"?V(e):Q(e)},Yt=t=>{const e=x(t);return e.root.y==="top"?G(e):_(e)},Ni=t=>({x:Ft(t),y:Yt(t)}),je=t=>{const e=x(t);return{lower:e.one.x,upper:e.two.x}},Ce=t=>{const e=x(t);return{lower:e.one.y,upper:e.two.y}},Ii=(t,e)=>Lr(t,e),Mi=(t,e)=>{const r=x(t),n=He.includes(e)?"x":Xe.includes(e)?"y":null;if(n===null)throw new Error(`Invalid location: ${e}`);const s=e==="top"||e==="left"?Math.min:Math.max,i={...r.one},o={...r.two};return i[n]=s(r.one[n],r.two[n]),o[n]=s(r.one[n],r.two[n]),[i,o]},zi=(t,e)=>{const r=x(t),n=x(e),s=Ft(n)+(X(n)-X(r))/2,i=Yt(n)+(J(n)-J(r))/2;return x({x:s,y:i},Dr(r))},kr=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,Ai=t=>X(t)/J(t),Ei=(t,e,r)=>{if(typeof e=="string"){if(r==null)throw new Error("Undefined amount passed into box.translate");const s=k(e);e=O(s,r)}const n=x(t);return x(be(n.one,e),be(n.two,e),void 0,void 0,n.root)},Ui=(t,e)=>{const r=Math.max(V(t),V(e)),n=Math.max(G(t),G(e)),s=Math.min(Q(t),Q(e)),i=Math.min(_(t),_(e));return r>s||n>i?Rr:x({x:r,y:n},{x:s,y:i},void 0,void 0,t.root)},qr=t=>X(t)*J(t),Bi=(t,e)=>{const r=x(t);return x(mt(r.one,e),mt(r.two,e),void 0,void 0,r.root)},ji=(t,e,r,n,s,i)=>{const o={x:t,y:e},h={x:t+r,y:e+n};return s.x!==i.x&&(s.x==="center"?(o.x-=r/2,h.x-=r/2):(o.x-=r,h.x-=r)),s.y!==i.y&&(s.y==="center"?(o.y-=n/2,h.y-=n/2):(o.y-=n,h.y-=n)),x(o,h,void 0,void 0,i)},Ci=t=>{const e=x(t);return x(yt(e.one),yt(e.two),void 0,void 0,e.root)},Ri=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:fi,ZERO:Rr,area:qr,areaIsZero:bi,aspect:Ai,bottom:_,bottomCenter:vi,bottomLeft:Oi,bottomRight:Ti,box:hi,center:bt,centerLeft:xi,centerRight:Si,construct:x,constructWithAlternateRoot:ji,contains:gi,copy:Lr,css:yi,cssBox:li,dim:Zt,dims:Dr,domRect:ci,edgePoints:Mi,equals:pi,height:J,intersection:Ui,isBox:kr,left:V,loc:ee,positionInCenter:zi,reRoot:Ii,resize:di,right:Q,root:Ni,round:Ci,signedDims:mi,signedHeight:Qe,signedWidth:Ke,top:G,topCenter:wi,topLeft:Pr,topRight:$i,translate:Ei,truncate:Bi,width:X,x:Ft,xBounds:je,xyLoc:Z,y:Yt,yBounds:Ce},Symbol.toStringTag,{value:"Module"})),Zr=a.z.object({signedWidth:a.z.number(),signedHeight:a.z.number()}),Li=a.z.union([Nt,Zr,me,Ve]),Di={width:0,height:0},Pi={width:1,height:1},R=(t,e)=>typeof t=="number"?{width:t,height:e??t}:Array.isArray(t)?{width:t[0],height:t[1]}:"x"in t?{width:t.x,height:t.y}:"signedWidth"in t?{width:t.signedWidth,height:t.signedHeight}:{...t},ki=(t,e)=>{if(e==null)return!1;const r=R(t),n=R(e);return r.width===n.width&&r.height===n.height},qi=t=>{const e=R(t);return{width:e.height,height:e.width}},Zi=t=>{const e=R(t);return`0 0 ${e.width} ${e.height}`},Fi=t=>{const e=R(t);return[e.width,e.height]},Yi=t=>({width:Math.max(...t.map(e=>R(e).width)),height:Math.max(...t.map(e=>R(e).height))}),Wi=t=>({width:Math.min(...t.map(e=>R(e).width)),height:Math.min(...t.map(e=>R(e).height))}),Vi=(t,e)=>{const r=R(t);return{width:r.width*e,height:r.height*e}},Gi=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:Pi,ZERO:Di,construct:R,couple:Fi,crude:Li,dimensions:Nt,equals:ki,max:Yi,min:Wi,scale:Vi,signed:Zr,svgViewBox:Zi,swap:qi},Symbol.toStringTag,{value:"Module"})),Fr=(t,e,r)=>e!==void 0&&t<e?e:r!==void 0&&t>r?r:t,Hi=a.z.object({offset:pt,scale:pt}),Xi=a.z.object({offset:a.z.number(),scale:a.z.number()}),Ji=t=>(e,r,n,s)=>r==="dimension"?[e,n]:[e,s?n-t:n+t],Ki=t=>(e,r,n,s)=>[e,s?n/t:n*t],Qi=t=>(e,r,n)=>{if(e===null)return[t,n];const{lower:s,upper:i}=e,{lower:o,upper:h}=t,f=i-s,l=h-o;if(r==="dimension")return[t,n*(l/f)];const d=(n-s)*(l/f)+o;return[t,d]},_i=t=>(e,r,n)=>[t,n],ea=()=>(t,e,r)=>{if(t===null)throw new Error("cannot invert without bounds");if(e==="dimension")return[t,r];const{lower:n,upper:s}=t;return[t,s-(r-n)]},ta=t=>(e,r,n)=>{const{lower:s,upper:i}=t;return n=Fr(n,s,i),[e,n]};let wt=class ne{ops=[];currBounds=null;currType=null;reversed=!1;constructor(){this.ops=[]}static translate(e){return new ne().translate(e)}static magnify(e){return new ne().magnify(e)}static scale(e,r){return new ne().scale(e,r)}translate(e){const r=this.new(),n=Ji(e);return n.type="translate",r.ops.push(n),r}magnify(e){const r=this.new(),n=Ki(e);return n.type="magnify",r.ops.push(n),r}scale(e,r){const n=b(e,r),s=this.new(),i=Qi(n);return i.type="scale",s.ops.push(i),s}clamp(e,r){const n=b(e,r),s=this.new(),i=ta(n);return i.type="clamp",s.ops.push(i),s}reBound(e,r){const n=b(e,r),s=this.new(),i=_i(n);return i.type="re-bound",s.ops.push(i),s}invert(){const e=ea();e.type="invert";const r=this.new();return r.ops.push(e),r}pos(e){return this.exec("position",e)}dim(e){return this.exec("dimension",e)}new(){const e=new ne;return e.ops=this.ops.slice(),e.reversed=this.reversed,e}exec(e,r){return this.currBounds=null,this.ops.reduce(([n,s],i)=>i(n,e,s,this.reversed),[null,r])[1]}reverse(){const e=this.new();e.ops.reverse();const r=[];return e.ops.forEach((n,s)=>{if(n.type==="scale"||r.some(([o,h])=>s>=o&&s<=h))return;const i=e.ops.findIndex((o,h)=>o.type==="scale"&&h>s);i!==-1&&r.push([s,i])}),r.forEach(([n,s])=>{const i=e.ops.slice(n,s);i.unshift(e.ops[s]),e.ops.splice(n,s-n+1,...i)}),e.reversed=!e.reversed,e}get transform(){return{scale:this.dim(1),offset:this.pos(0)}}static IDENTITY=new ne},ra=class L{x;y;currRoot;constructor(e=new wt,r=new wt,n=null){this.x=e,this.y=r,this.currRoot=n}static translate(e,r){return new L().translate(e,r)}static translateX(e){return new L().translateX(e)}static translateY(e){return new L().translateY(e)}static clamp(e){return new L().clamp(e)}static magnify(e){return new L().magnify(e)}static scale(e){return new L().scale(e)}static reBound(e){return new L().reBound(e)}translate(e,r){const n=O(e,r),s=this.copy();return s.x=this.x.translate(n.x),s.y=this.y.translate(n.y),s}translateX(e){const r=this.copy();return r.x=this.x.translate(e),r}translateY(e){const r=this.copy();return r.y=this.y.translate(e),r}magnify(e){const r=this.copy();return r.x=this.x.magnify(e.x),r.y=this.y.magnify(e.y),r}scale(e){const r=this.copy();if(kr(e)){const n=this.currRoot;return r.currRoot=e.root,n!=null&&!kt(n,e.root)&&(n.x!==e.root.x&&(r.x=r.x.invert()),n.y!==e.root.y&&(r.y=r.y.invert())),r.x=r.x.scale(je(e)),r.y=r.y.scale(Ce(e)),r}return r.x=r.x.scale(e.width),r.y=r.y.scale(e.height),r}reBound(e){const r=this.copy();return r.x=this.x.reBound(je(e)),r.y=this.y.reBound(Ce(e)),r}clamp(e){const r=this.copy();return r.x=this.x.clamp(je(e)),r.y=this.y.clamp(Ce(e)),r}copy(){const e=new L;return e.currRoot=this.currRoot,e.x=this.x,e.y=this.y,e}reverse(){const e=this.copy();return e.x=this.x.reverse(),e.y=this.y.reverse(),e}pos(e){return{x:this.x.pos(e.x),y:this.y.pos(e.y)}}dim(e){return{x:this.x.dim(e.x),y:this.y.dim(e.y)}}box(e){return x(this.pos(e.one),this.pos(e.two),0,0,this.currRoot??e.root)}get transform(){return{scale:this.dim({x:1,y:1}),offset:this.pos({x:0,y:0})}}static IDENTITY=new L};const na=Object.freeze(Object.defineProperty({__proto__:null,Scale:wt,XY:ra,crudeXYTransform:Hi,transform:Xi},Symbol.toStringTag,{value:"Module"}));let Yr=(t,e=21)=>(r=e)=>{let n="",s=r|0;for(;s--;)n+=t[Math.random()*t.length|0];return n};const Wr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",sa=`0123456789${Wr}`,Vr=11,ia=Yr(Wr,1),aa=Yr(sa,Vr-1),Wt=()=>`${ia()}${aa()}`,oa=Object.freeze(Object.defineProperty({__proto__:null,LENGTH:Vr,create:Wt},Symbol.toStringTag,{value:"Module"})),ua=(t,e)=>r=>r instanceof e||typeof r=="object"&&r!==null&&"discriminator"in r&&r.discriminator===t,la=2**8-1,ca=2**16-1,ha=2**32-1,fa=2n**64n-1n,da=2**64-1,ga=-128,pa=2**7-1,ma=-32768,ya=2**15-1,ba=-2147483648,wa=2**31-1,$a=-(2n**63n),Ze=2n**63n-1n,Oa=-9223372036854776e3,Gr=2**63-1,va=a.z.enum(["static","dynamic"]),_t=365,Ie=30,Ta=a.z.union([a.z.tuple([a.z.int()]),a.z.tuple([a.z.int(),a.z.int().min(1).max(12)]),a.z.tuple([a.z.int(),a.z.int().min(1).max(12),a.z.int().min(1).max(31)])]),Hr=(t,e)=>{const r=new $(e);if(![c.DAY,c.HOUR,c.MINUTE,c.SECOND,c.MILLISECOND,c.MICROSECOND,c.NANOSECOND].some(s=>s.equals(r)))throw new Error("Invalid argument for remainder. Must be an even TimeSpan or Timestamp");const n=t.valueOf()%r.valueOf();return t instanceof $?new $(n):new c(n)};let $=class g extends te{constructor(e,r="UTC"){if(e==null)super(g.now().valueOf());else if(e instanceof Date)super(BigInt(e.getTime())*g.MILLISECOND.valueOf());else if(typeof e=="string")super(g.parseDateTimeString(e,r).valueOf());else if(Array.isArray(e))super(g.parseDate(e));else{let n=0n;e instanceof Number&&(e=e.valueOf()),r==="local"&&(n=g.utcOffset.valueOf()),typeof e=="number"&&(isFinite(e)?e===Gr?e=Ze:e=Math.trunc(e):(isNaN(e)&&(e=0),e===1/0?e=g.MAX:e=g.MIN)),E(e)&&(e=e.value),super(BigInt(e.valueOf())+n)}}static parseDate([e=1970,r=1,n=1]){const s=new Date(e,r-1,n,0,0,0,0);return new g(BigInt(s.getTime())*g.MILLISECOND.valueOf()).truncate(g.DAY).valueOf()}valueOf(){return this.value}static parseTimeString(e,r="UTC"){const[n,s,i]=e.split(":");let o="00",h="00";i!=null&&([o,h]=i.split("."));let f=g.hours(parseInt(n??"00")).add(g.minutes(parseInt(s??"00"))).add(g.seconds(parseInt(o??"00"))).add(g.milliseconds(parseInt(h??"00")));return r==="local"&&(f=f.add(g.utcOffset)),f.valueOf()}static parseDateTimeString(e,r="UTC"){if(!e.includes("/")&&!e.includes("-"))return g.parseTimeString(e,r);const n=new Date(e);return e.includes(":")||n.setUTCHours(0,0,0,0),new g(BigInt(n.getTime())*g.MILLISECOND.valueOf(),r).valueOf()}toISOString(e="UTC"){return e==="UTC"?this.date().toISOString():this.sub(g.utcOffset).date().toISOString()}timeString(e=!1,r="UTC"){const n=this.toISOString(r);return e?n.slice(11,23):n.slice(11,19)}dateString(){const e=this.date(),r=e.toLocaleString("default",{month:"short"}),n=e.toLocaleString("default",{day:"numeric"});return`${r} ${n}`}static get utcOffset(){return new c(BigInt(new Date().getTimezoneOffset())*g.MINUTE.valueOf())}static since(e){return new g().span(e)}date(){return new Date(this.milliseconds)}equals(e){return this.valueOf()===new g(e).valueOf()}span(e){return this.range(e).span}range(e){return new W(this,e).makeValid()}spanRange(e){return this.range(this.add(e)).makeValid()}get isZero(){return this.valueOf()===0n}after(e){return this.valueOf()>new g(e).valueOf()}afterEq(e){return this.valueOf()>=new g(e).valueOf()}before(e){return this.valueOf()<new g(e).valueOf()}beforeEq(e){return this.valueOf()<=new g(e).valueOf()}add(e){return new g(oe(this.valueOf(),new c(e).valueOf()))}sub(e){return new g(q(this.valueOf(),new c(e).valueOf()))}get hours(){return Number(this.valueOf())/Number(c.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(c.MINUTE.valueOf())}get days(){return Number(this.valueOf())/Number(c.DAY.valueOf())}get seconds(){return Number(this.valueOf())/Number(c.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(g.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(g.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get year(){return this.date().getUTCFullYear()}setYear(e){const r=this.date();return r.setUTCFullYear(e),new g(r)}get month(){return this.date().getUTCMonth()}setMonth(e){const r=this.date();return r.setUTCMonth(e),new g(r)}get day(){return this.date().getUTCDate()}setDay(e){const r=this.date();return r.setUTCDate(e),new g(r)}get hour(){return this.date().getUTCHours()}get localHour(){return this.date().getHours()}setLocalHour(e){const r=this.date();return r.setHours(e),new g(r)}setHour(e){const r=this.date();return r.setUTCHours(e),new g(r)}get minute(){return this.date().getUTCMinutes()}setMinute(e){const r=this.date();return r.setUTCMinutes(e),new g(r)}get second(){return this.date().getUTCSeconds()}setSecond(e){const r=this.date();return r.setUTCSeconds(e),new g(r)}get millisecond(){return this.date().getUTCMilliseconds()}setMillisecond(e){const r=this.date();return r.setUTCMilliseconds(e),new g(r)}toString(e="ISO",r="UTC"){switch(e){case"ISODate":return this.toISOString(r).slice(0,10);case"ISOTime":return this.toISOString(r).slice(11,23);case"time":return this.timeString(!1,r);case"preciseTime":return this.timeString(!0,r);case"date":return this.dateString();case"preciseDate":return`${this.dateString()} ${this.timeString(!0,r)}`;case"dateTime":return`${this.dateString()} ${this.timeString(!1,r)}`;default:return this.toISOString(r)}}remainder(e){return Hr(this,e)}get isToday(){return this.truncate(c.DAY).equals(g.now().truncate(c.DAY))}truncate(e){return this.sub(this.remainder(e))}static now(){return new g(new Date)}static max(...e){let r=g.MIN;for(const n of e){const s=new g(n);s.after(r)&&(r=s)}return r}static min(...e){let r=g.MAX;for(const n of e){const s=new g(n);s.before(r)&&(r=s)}return r}static nanoseconds(e,r="UTC"){return new g(e,r)}static NANOSECOND=g.nanoseconds(1);static microseconds(e,r="UTC"){return g.nanoseconds(e*1e3,r)}static MICROSECOND=g.microseconds(1);static milliseconds(e,r="UTC"){return g.microseconds(e*1e3,r)}static MILLISECOND=g.milliseconds(1);static seconds(e,r="UTC"){return g.milliseconds(e*1e3,r)}static SECOND=g.seconds(1);static minutes(e,r="UTC"){return g.seconds(e*60,r)}static MINUTE=g.minutes(1);static hours(e,r="UTC"){return g.minutes(e*60,r)}static HOUR=g.hours(1);static days(e,r="UTC"){return g.hours(e*24,r)}static DAY=g.days(1);static MAX=new g(Ze);static MIN=new g(0);static ZERO=new g(0);static z=a.z.union([a.z.instanceof(g),a.z.object({value:a.z.bigint()}).transform(e=>new g(e.value)),a.z.string().transform(e=>new g(BigInt(e))),a.z.number().transform(e=>new g(e)),a.z.bigint().transform(e=>new g(e)),a.z.date().transform(e=>new g(e)),a.z.custom(e=>e instanceof c).transform(e=>new g(e)),Ta.transform(e=>new g(e))]);static sort(e,r){return Number(e.valueOf()-r.valueOf())}};class c extends te{constructor(e){typeof e=="number"&&(e=Math.trunc(e.valueOf())),E(e)&&(e=e.value),super(BigInt(e.valueOf()))}static fromSeconds(e){return e instanceof c?e:e instanceof Re?e.period:e instanceof $?new c(e):(E(e)&&(e=e.value),["number","bigint"].includes(typeof e)?c.seconds(e):new c(e))}static fromMilliseconds(e){return e instanceof c?e:e instanceof Re?e.period:e instanceof $?new c(e):(E(e)&&(e=e.value),["number","bigint"].includes(typeof e)?c.milliseconds(e):new c(e))}valueOf(){return this.value}lessThan(e){return this.valueOf()<new c(e).valueOf()}greaterThan(e){return this.valueOf()>new c(e).valueOf()}lessThanOrEqual(e){return this.valueOf()<=new c(e).valueOf()}greaterThanOrEqual(e){return this.valueOf()>=new c(e).valueOf()}remainder(e){return Hr(this,e)}truncate(e){return new c(BigInt(Math.trunc(Number(this.valueOf()/e.valueOf())))*e.valueOf())}toString(e="full"){if(e==="semantic")return this.toSemanticString();const r=this.truncate(c.DAY),n=this.truncate(c.HOUR),s=this.truncate(c.MINUTE),i=this.truncate(c.SECOND),o=this.truncate(c.MILLISECOND),h=this.truncate(c.MICROSECOND),f=this.truncate(c.NANOSECOND),l=r,d=n.sub(r),m=s.sub(n),p=i.sub(s),M=o.sub(i),A=h.sub(o),B=f.sub(h);let w="";return l.isZero||(w+=`${l.days}d `),d.isZero||(w+=`${d.hours}h `),m.isZero||(w+=`${m.minutes}m `),p.isZero||(w+=`${p.seconds}s `),M.isZero||(w+=`${M.milliseconds}ms `),A.isZero||(w+=`${A.microseconds}µs `),B.isZero||(w+=`${B.nanoseconds}ns`),w.trim()}toSemanticString(){const e=this.valueOf()<0n?-this.valueOf():this.valueOf(),r=new c(e),n=this.valueOf()<0n;if(r.valueOf()===0n)return"0s";if(r.lessThan(c.SECOND))return"< 1s";const s=r.days,i=r.hours,o=r.minutes,h=r.seconds,f=Math.floor(s/_t),l=Math.floor(s/Ie),d=Math.floor(s/7),m=Math.floor(s),p=Math.floor(i),M=Math.floor(o),A=Math.floor(h),B=n?"-":"";if(f>=1){let w=`${f}y`;if(f<2){const S=Math.floor(s%_t/Ie);S>0&&(w+=` ${S}mo`)}return B+w}if(d>=1&&s<Ie&&s%7===0){let w=`${d}w`;const S=Math.floor(s%7),K=Math.floor(i-d*7*24);return d<2&&(S>0?w+=` ${S}d`:K>0&&K<24&&(w+=` ${K}h`)),B+w}if(l>=1){let w=`${l}mo`;if(l<3){const S=Math.floor(s%Ie);S>0&&(w+=` ${S}d`)}return B+w}if(d>=1){let w=`${d}w`;const S=Math.floor(s%7),K=Math.floor(i-d*7*24);return d<2&&(S>0?w+=` ${S}d`:K>0&&K<24&&(w+=` ${K}h`)),B+w}if(m>=1){let w=`${m}d`;const S=Math.floor(i-m*24);return m<2&&S>0&&(w+=` ${S}h`),B+w}if(p>=1){let w=`${p}h`;if(p<3){const S=Math.floor(o-p*60);S>0&&(w+=` ${S}m`)}return B+w}if(M>=1){let w=`${M}m`;if(M<5){const S=Math.floor(h-M*60);S>0&&(w+=` ${S}s`)}return B+w}return`${B}${A}s`}mult(e){return new c(j(this.valueOf(),e))}div(e){return new c(ve(this.valueOf(),e))}get days(){return Number(this.valueOf())/Number(c.DAY.valueOf())}get hours(){return Number(this.valueOf())/Number(c.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(c.MINUTE.valueOf())}get seconds(){return Number(this.valueOf())/Number(c.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(c.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(c.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get isZero(){return this.valueOf()===0n}equals(e){return this.valueOf()===new c(e).valueOf()}add(e){return new c(this.valueOf()+new c(e).valueOf())}sub(e){return new c(this.valueOf()-new c(e).valueOf())}static nanoseconds(e=1){return new c(e)}static NANOSECOND=c.nanoseconds(1);static microseconds(e=1){return c.nanoseconds(j(e,1e3))}static MICROSECOND=c.microseconds(1);static milliseconds(e=1){return c.microseconds(j(e,1e3))}static MILLISECOND=c.milliseconds(1);static seconds(e=1){return c.milliseconds(j(e,1e3))}static SECOND=c.seconds(1);static minutes(e=1){return c.seconds(j(e,60))}static MINUTE=c.minutes(1);static hours(e){return c.minutes(j(e,60))}static HOUR=c.hours(1);static days(e){return c.hours(j(e,24))}static DAY=c.days(1);static MAX=new c(Ze);static MIN=new c(0);static ZERO=new c(0);static z=a.z.union([a.z.object({value:a.z.bigint()}).transform(e=>new c(e.value)),a.z.string().transform(e=>new c(BigInt(e))),a.z.number().transform(e=>new c(e)),a.z.bigint().transform(e=>new c(e)),a.z.instanceof(c),a.z.instanceof($).transform(e=>new c(e)),a.z.custom(e=>e instanceof Re).transform(e=>new c(e))])}let Re=class U extends te{constructor(e){E(e)&&(e=e.value),super(e.valueOf())}toString(){return`${this.valueOf()} Hz`}equals(e){return this.valueOf()===new U(e).valueOf()}get period(){return c.seconds(1/this.valueOf())}sampleCount(e){return new c(e).seconds*this.valueOf()}byteCount(e,r){return this.sampleCount(e)*new I(r).valueOf()}span(e){return c.seconds(e/this.valueOf())}byteSpan(e,r){return this.span(e.valueOf()/new I(r).valueOf())}add(e){return new U(oe(this.valueOf(),new U(e).valueOf()))}sub(e){return new U(q(this.valueOf(),new U(e).valueOf()))}mult(e){return new U(j(this.valueOf(),e))}div(e){return new U(ve(this.valueOf(),e))}static hz(e){return new U(e)}static khz(e){return U.hz(e*1e3)}static z=a.z.union([a.z.number().transform(e=>new U(e)),a.z.instanceof(U)])},I=class z extends te{constructor(e){E(e)&&(e=e.value),super(e.valueOf())}length(e){return e.valueOf()/this.valueOf()}size(e){return new we(e*this.valueOf())}add(e){return new z(oe(this.valueOf(),new z(e).valueOf()))}sub(e){return new z(q(this.valueOf(),new z(e).valueOf()))}mult(e){return new z(j(this.valueOf(),e))}div(e){return new z(ve(this.valueOf(),e))}static UNKNOWN=new z(0);static BIT128=new z(16);static BIT64=new z(8);static BIT32=new z(4);static BIT16=new z(2);static BIT8=new z(1);static z=a.z.union([a.z.number().transform(e=>new z(e)),a.z.instanceof(z)])},W=class D{start;end;constructor(e,r){typeof e=="object"&&"start"in e?(this.start=new $(e.start),this.end=new $(e.end)):(this.start=new $(e),this.end=new $(r))}get span(){return new c(this.end.valueOf()-this.start.valueOf())}get isValid(){return this.start.valueOf()<=this.end.valueOf()}makeValid(){return this.isValid?this:this.swap()}get isZero(){return this.start.isZero&&this.end.isZero}get numeric(){return{start:Number(this.start.valueOf()),end:Number(this.end.valueOf())}}swap(){return new D(this.end,this.start)}get numericBounds(){return{lower:Number(this.start.valueOf()),upper:Number(this.end.valueOf())}}equals(e,r=c.ZERO){if(r.isZero)return this.start.equals(e.start)&&this.end.equals(e.end);let n=this.start.sub(e.start).valueOf(),s=this.end.sub(e.end).valueOf();return n<0&&(n=-n),s<0&&(s=-s),n<=r.valueOf()&&s<=r.valueOf()}toString(){return`${this.start.toString()} - ${this.end.toString()}`}toPrettyString(){return`${this.start.toString("preciseDate")} - ${this.span.toString()}`}overlapsWith(e,r=c.ZERO){e=e.makeValid();const n=this.makeValid();if(this.equals(e))return!0;if(e.end.equals(n.start)||n.end.equals(e.start))return!1;const s=$.max(n.start,e.start),i=$.min(n.end,e.end);return i.before(s)?!1:new c(i.sub(s)).greaterThanOrEqual(r)}contains(e){return e instanceof D?this.contains(e.start)&&this.contains(e.end):this.start.beforeEq(e)&&this.end.after(e)}boundBy(e){const r=new D(this.start,this.end);return e.start.after(this.start)&&(r.start=e.start),e.start.after(this.end)&&(r.end=e.start),e.end.before(this.end)&&(r.end=e.end),e.end.before(this.start)&&(r.start=e.end),r}static max(...e){return new D($.min(...e.map(r=>r.start)),$.max(...e.map(r=>r.end)))}static MAX=new D($.MIN,$.MAX);static ZERO=new D($.ZERO,$.ZERO);static z=a.z.union([a.z.object({start:$.z,end:$.z}).transform(e=>new D(e.start,e.end)),a.z.instanceof(D)]);static sort(e,r){return $.sort(e.start,r.start)||$.sort(e.end,r.end)}static simplify(e){return e.map(r=>r.makeValid()).sort((r,n)=>D.sort(r,n)).reduce((r,n)=>{if(n.span.isZero)return r;if(r.length===0)return r.push(n),r;const s=r[r.length-1];return s.overlapsWith(n)||s.end.equals(n.start)?s.end=$.max(s.end,n.end):r.push(n),r},[])}},T=class u extends te{constructor(e){if(E(e)&&(e=e.value),e instanceof u||typeof e=="string"||typeof e.valueOf()=="string")super(e.valueOf());else{const r=u.ARRAY_CONSTRUCTOR_DATA_TYPES.get(e.constructor.name);if(r==null)throw new Error(`unable to find data type for ${e.toString()}`);super(r.valueOf())}}get Array(){const e=u.ARRAY_CONSTRUCTORS.get(this.toString());if(e==null)throw new Error(`unable to find array constructor for ${this.valueOf()}`);return e}equals(e){return this.valueOf()===e.valueOf()}matches(...e){return e.some(r=>this.equals(r))}toString(e=!1){return e?u.SHORT_STRINGS.get(this.valueOf())??this.valueOf():this.valueOf()}get isVariable(){return this.equals(u.JSON)||this.equals(u.STRING)}get isNumeric(){return!this.isVariable&&!this.equals(u.UUID)}get isInteger(){const e=this.toString();return e.startsWith("int")||e.startsWith("uint")}get isFloat(){return this.toString().startsWith("float")}get density(){const e=u.DENSITIES.get(this.toString());if(e==null)throw new Error(`unable to find density for ${this.valueOf()}`);return e}get isUnsignedInteger(){return this.equals(u.UINT8)||this.equals(u.UINT16)||this.equals(u.UINT32)||this.equals(u.UINT64)}get isSignedInteger(){return this.equals(u.INT8)||this.equals(u.INT16)||this.equals(u.INT32)||this.equals(u.INT64)}canSafelyCastTo(e){return this.equals(e)?!0:!this.isNumeric||!e.isNumeric||this.isVariable||e.isVariable||this.isUnsignedInteger&&e.isSignedInteger?!1:this.isFloat?e.isFloat&&this.density.valueOf()<=e.density.valueOf():this.equals(u.INT32)&&e.equals(u.FLOAT64)||this.equals(u.INT8)&&e.equals(u.FLOAT32)?!0:this.isInteger&&e.isInteger?this.density.valueOf()<=e.density.valueOf()&&this.isUnsignedInteger===e.isUnsignedInteger:!1}canCastTo(e){return this.isNumeric&&e.isNumeric?!0:this.equals(e)}checkArray(e){return e.constructor===this.Array}get usesBigInt(){return u.BIG_INT_TYPES.some(e=>e.equals(this))}static UNKNOWN=new u("unknown");static FLOAT64=new u("float64");static FLOAT32=new u("float32");static INT64=new u("int64");static INT32=new u("int32");static INT16=new u("int16");static INT8=new u("int8");static UINT64=new u("uint64");static UINT32=new u("uint32");static UINT16=new u("uint16");static UINT8=new u("uint8");static BOOLEAN=new u("boolean");static TIMESTAMP=new u("timestamp");static UUID=new u("uuid");static STRING=new u("string");static JSON=new u("json");static ARRAY_CONSTRUCTORS=new Map([[u.UINT8.toString(),Uint8Array],[u.UINT16.toString(),Uint16Array],[u.UINT32.toString(),Uint32Array],[u.UINT64.toString(),BigUint64Array],[u.FLOAT32.toString(),Float32Array],[u.FLOAT64.toString(),Float64Array],[u.INT8.toString(),Int8Array],[u.INT16.toString(),Int16Array],[u.INT32.toString(),Int32Array],[u.INT64.toString(),BigInt64Array],[u.TIMESTAMP.toString(),BigInt64Array],[u.STRING.toString(),Uint8Array],[u.JSON.toString(),Uint8Array],[u.UUID.toString(),Uint8Array]]);static ARRAY_CONSTRUCTOR_DATA_TYPES=new Map([[Uint8Array.name,u.UINT8],[Uint16Array.name,u.UINT16],[Uint32Array.name,u.UINT32],[BigUint64Array.name,u.UINT64],[Float32Array.name,u.FLOAT32],[Float64Array.name,u.FLOAT64],[Int8Array.name,u.INT8],[Int16Array.name,u.INT16],[Int32Array.name,u.INT32],[BigInt64Array.name,u.INT64]]);static DENSITIES=new Map([[u.UINT8.toString(),I.BIT8],[u.UINT16.toString(),I.BIT16],[u.UINT32.toString(),I.BIT32],[u.UINT64.toString(),I.BIT64],[u.FLOAT32.toString(),I.BIT32],[u.FLOAT64.toString(),I.BIT64],[u.INT8.toString(),I.BIT8],[u.INT16.toString(),I.BIT16],[u.INT32.toString(),I.BIT32],[u.INT64.toString(),I.BIT64],[u.TIMESTAMP.toString(),I.BIT64],[u.STRING.toString(),I.UNKNOWN],[u.JSON.toString(),I.UNKNOWN],[u.UUID.toString(),I.BIT128]]);static ALL=[u.UNKNOWN,u.FLOAT64,u.FLOAT32,u.INT64,u.INT32,u.INT16,u.INT8,u.UINT64,u.UINT32,u.UINT16,u.UINT8,u.TIMESTAMP,u.UUID,u.STRING,u.JSON];static SHORT_STRINGS=new Map([[u.UINT8.toString(),"u8"],[u.UINT16.toString(),"u16"],[u.UINT32.toString(),"u32"],[u.UINT64.toString(),"u64"],[u.INT8.toString(),"i8"],[u.INT16.toString(),"i16"],[u.INT32.toString(),"i32"],[u.INT64.toString(),"i64"],[u.FLOAT32.toString(),"f32"],[u.FLOAT64.toString(),"f64"],[u.BOOLEAN.toString(),"bool"],[u.TIMESTAMP.toString(),"ts"],[u.UUID.toString(),"uuid"],[u.STRING.toString(),"str"],[u.JSON.toString(),"json"]]);static BIG_INT_TYPES=[u.INT64,u.UINT64,u.TIMESTAMP];static z=a.z.union([a.z.string().transform(e=>new u(e)),a.z.instanceof(u)])},we=class y extends te{constructor(e){E(e)&&(e=e.value),super(e.valueOf())}largerThan(e){return E(e)&&(e=e.value),this.valueOf()>e.valueOf()}smallerThan(e){return E(e)&&(e=e.value),this.valueOf()<e.valueOf()}add(e){return E(e)&&(e=e.value),new y(oe(this.valueOf(),e.valueOf()))}sub(e){return E(e)&&(e=e.value),new y(q(this.valueOf(),e.valueOf()))}mult(e){return new y(j(this.valueOf(),e))}div(e){return new y(ve(this.valueOf(),e))}truncate(e){return new y(Math.trunc(this.valueOf()/new y(e).valueOf())*new y(e).valueOf())}remainder(e){return y.bytes(this.valueOf()%new y(e).valueOf())}get gigabytes(){return this.valueOf()/y.GIGABYTE.valueOf()}get megabytes(){return this.valueOf()/y.MEGABYTE.valueOf()}get kilobytes(){return this.valueOf()/y.KILOBYTE.valueOf()}get terabytes(){return this.valueOf()/y.TERABYTE.valueOf()}toString(){const e=this.truncate(y.TERABYTE),r=this.truncate(y.GIGABYTE),n=this.truncate(y.MEGABYTE),s=this.truncate(y.KILOBYTE),i=this.truncate(y.BYTE),o=e,h=r.sub(e),f=n.sub(r),l=s.sub(n),d=i.sub(s);let m="";return o.isZero||(m+=`${o.terabytes}TB `),h.isZero||(m+=`${h.gigabytes}GB `),f.isZero||(m+=`${f.megabytes}MB `),l.isZero||(m+=`${l.kilobytes}KB `),(!d.isZero||m==="")&&(m+=`${d.valueOf()}B`),m.trim()}static bytes(e=1){return new y(e)}static BYTE=new y(1);static kilobytes(e=1){return y.bytes(new y(e).valueOf()*1e3)}static KILOBYTE=y.kilobytes(1);static megabytes(e=1){return y.kilobytes(new y(e).valueOf()*1e3)}static MEGABYTE=y.megabytes(1);static gigabytes(e=1){return y.megabytes(new y(e).valueOf()*1e3)}static GIGABYTE=y.gigabytes(1);static terabytes(e){return y.gigabytes(new y(e).valueOf()*1e3)}static TERABYTE=y.terabytes(1);static ZERO=new y(0);static z=a.z.union([a.z.number().transform(e=>new y(e)),a.z.instanceof(y)]);get isZero(){return this.valueOf()===0}};a.z.object({start:a.z.number(),end:a.z.number()});const xa=a.z.union([a.z.instanceof(Uint8Array),a.z.instanceof(Uint16Array),a.z.instanceof(Uint32Array),a.z.instanceof(BigUint64Array),a.z.instanceof(Float32Array),a.z.instanceof(Float64Array),a.z.instanceof(Int8Array),a.z.instanceof(Int16Array),a.z.instanceof(Int32Array),a.z.instanceof(BigInt64Array)]),Xr=t=>{const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e==="bigint"||t instanceof $||t instanceof c||t instanceof Date},Sa=(t,e,r,n=0)=>t.usesBigInt&&!e.usesBigInt?Number(r)-Number(n):!t.usesBigInt&&e.usesBigInt?BigInt(r.valueOf())-BigInt(n.valueOf()):Le(r,-n),Le=(t,e)=>e==0?t:t==0?e:typeof t=="bigint"&&typeof e=="bigint"||typeof t=="number"&&typeof e=="number"?t+e:Number(t)+Number(e),Na="00000000-0000-0000-0000-000000000000",Ia=/^(?:[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;function Ma(t){return typeof t=="string"&&Ia.test(t)}const N=[];for(let t=0;t<256;++t)N.push((t+256).toString(16).slice(1));function Jr(t,e=0){return(N[t[e+0]]+N[t[e+1]]+N[t[e+2]]+N[t[e+3]]+"-"+N[t[e+4]]+N[t[e+5]]+"-"+N[t[e+6]]+N[t[e+7]]+"-"+N[t[e+8]]+N[t[e+9]]+"-"+N[t[e+10]]+N[t[e+11]]+N[t[e+12]]+N[t[e+13]]+N[t[e+14]]+N[t[e+15]]).toLowerCase()}function za(t,e=0){const r=Jr(t,e);if(!Ma(r))throw TypeError("Stringified UUID is invalid");return r}let st;const Aa=new Uint8Array(16);function Ea(){if(!st){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");st=crypto.getRandomValues.bind(crypto)}return st(Aa)}const Ua=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),er={randomUUID:Ua};function Ba(t,e,r){t=t||{};const n=t.random??t.rng?.()??Ea();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Jr(n)}function ja(t,e,r){return er.randomUUID&&!t?er.randomUUID():Ba(t)}const Ca=()=>ja(),Vt=(t,e)=>za(t,e),Ra=Na,La=Object.freeze(Object.defineProperty({__proto__:null,ZERO:Ra,create:Ca,parse:Vt},Symbol.toStringTag,{value:"Module"})),F=-1,$t={[Symbol.iterator]:()=>$t,next:()=>({done:!0,value:void 0})},Da=a.z.string().transform(t=>new Uint8Array(atob(t).split("").map(e=>e.charCodeAt(0))).buffer),Pa=a.z.union([a.z.null(),a.z.undefined()]).transform(()=>new Uint8Array().buffer),Ot=10,Kr=(t,e)=>{if(t==="number"&&!e.isNumeric)throw new Error(`cannot convert series of type ${e.toString()} to number`);if(t==="bigint"&&!e.usesBigInt)throw new Error(`cannot convert series of type ${e.toString()} to bigint`)},Qr="sy_x_telem_series";let Gt=class Y{key;discriminator=Qr;dataType;sampleOffset;gl;_data;timeRange=W.ZERO;alignment=0n;alignmentMultiple=1n;cachedMin;cachedMax;writePos=F;_refCount=0;cachedLength;_cachedIndexes;static crudeZ=a.z.object({timeRange:W.z.optional(),dataType:T.z,alignment:a.z.coerce.bigint().optional(),data:a.z.union([Da,Pa,a.z.instanceof(ArrayBuffer),a.z.instanceof(Uint8Array)]),glBufferUsage:va.optional().default("static").optional()});static z=Y.crudeZ.transform(e=>new Y(e));constructor(e){ka(e)&&(e={data:e}),e.data??=[];const{dataType:r,timeRange:n,sampleOffset:s=0,glBufferUsage:i="static",alignment:o=0n,alignmentMultiple:h=1n,key:f=Wt(),data:l}=e;if(_r(l)){const p=l;this.key=p.key,this.dataType=p.dataType,this.sampleOffset=p.sampleOffset,this.gl=p.gl,this._data=p._data,this.timeRange=p.timeRange,this.alignment=p.alignment,this.alignmentMultiple=p.alignmentMultiple,this.cachedMin=p.cachedMin,this.cachedMax=p.cachedMax,this.writePos=p.writePos,this._refCount=p._refCount,this.cachedLength=p.cachedLength;return}const d=Xr(l),m=Array.isArray(l);if(r!=null)this.dataType=new T(r);else{if(l instanceof ArrayBuffer)throw new Error("cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type.");if(m||d){let p=l;if(!d){if(l.length===0)throw new Error("cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type.");p=l[0]}if(typeof p=="string")this.dataType=T.STRING;else if(typeof p=="number")this.dataType=T.FLOAT64;else if(typeof p=="bigint")this.dataType=T.INT64;else if(typeof p=="boolean")this.dataType=T.BOOLEAN;else if(p instanceof $||p instanceof Date||p instanceof $)this.dataType=T.TIMESTAMP;else if(typeof p=="object")this.dataType=T.JSON;else throw new Error(`cannot infer data type of ${typeof p} when constructing a Series from a JS array`)}else this.dataType=new T(l)}if(!m&&!d)this._data=l;else if(m&&l.length===0)this._data=new this.dataType.Array([]).buffer;else{let p=d?[l]:l;const M=p[0];(M instanceof $||M instanceof Date||M instanceof c)&&(p=p.map(A=>new $(A).valueOf())),this.dataType.equals(T.STRING)?(this.cachedLength=p.length,this._data=new TextEncoder().encode(`${p.join(`
|
|
2
|
-
`)}
|
|
3
|
-
`).buffer):this.dataType.equals(T.JSON)?(this.cachedLength=p.length,this._data=new TextEncoder().encode(`${p.map(A=>lt.encodeString(A)).join(`
|
|
4
|
-
`)}
|
|
5
|
-
`).buffer):this.dataType.usesBigInt&&typeof M=="number"?this._data=new this.dataType.Array(p.map(A=>BigInt(Math.round(A)))).buffer:!this.dataType.usesBigInt&&typeof M=="bigint"?this._data=new this.dataType.Array(p.map(Number)).buffer:this._data=new this.dataType.Array(p).buffer}this.key=f,this.alignment=o,this.alignmentMultiple=h,this.sampleOffset=s??0,this.timeRange=n??W.ZERO,this.gl={control:null,buffer:null,prevBuffer:0,bufferUsage:i}}static alloc({capacity:e,dataType:r,...n}){if(e===0)throw new Error("[Series] - cannot allocate an array of length 0");const s=new new T(r).Array(e),i=new Y({data:s.buffer,dataType:r,...n});return i.writePos=0,i}get refCount(){return this._refCount}acquire(e){this._refCount++,e!=null&&this.updateGLBuffer(e)}release(){this._refCount--,this.refCount===0&&this.gl.control!=null?this.maybeGarbageCollectGLBuffer(this.gl.control):this.refCount<0&&console.warn("cannot release a series with a negative reference count")}write(e){if(!e.dataType.equals(this.dataType))throw new Error("buffer must be of the same type as this array");return this.dataType.isVariable?this.writeVariable(e):this.writeFixed(e)}writeVariable(e){if(this.writePos===F)return 0;const r=this.byteCapacity.valueOf()-this.writePos,n=e.subBytes(0,r);return this.writeToUnderlyingData(n),this.writePos+=n.byteLength.valueOf(),this.cachedLength!=null&&(this.cachedLength+=n.length,this.calculateCachedLength()),n.length}writeFixed(e){if(this.writePos===F)return 0;const r=this.capacity-this.writePos,n=e.sub(0,r);return this.writeToUnderlyingData(n),this.cachedLength=void 0,this.maybeRecomputeMinMax(n),this.writePos+=n.length,n.length}writeToUnderlyingData(e){this.underlyingData.set(e.data,this.writePos)}get buffer(){return typeof this._data=="object"&&"buffer"in this._data?this._data.buffer:this._data}get underlyingData(){return new this.dataType.Array(this._data)}get data(){return this.writePos===F?this.underlyingData:new this.dataType.Array(this._data,0,this.writePos)}toStrings(){return this.dataType.isVariable?new TextDecoder().decode(this.underlyingData).split(`
|
|
6
|
-
`).slice(0,-1):Array.from(this).map(e=>e.toString())}parseJSON(e){if(!this.dataType.equals(T.JSON))throw new Error("cannot parse non-JSON series as JSON");return this.toStrings().map(r=>e.parse(lt.decodeString(r)))}get byteCapacity(){return new we(this.underlyingData.byteLength)}get capacity(){return this.dataType.isVariable?this.byteCapacity.valueOf():this.dataType.density.length(this.byteCapacity)}get byteLength(){return this.writePos===F?this.byteCapacity:this.dataType.isVariable?new we(this.writePos):this.dataType.density.size(this.writePos)}get length(){return this.cachedLength!=null?this.cachedLength:this.dataType.isVariable?this.calculateCachedLength():this.writePos===F?this.byteCapacity.valueOf()/this.dataType.density.valueOf():this.writePos}calculateCachedLength(){if(!this.dataType.isVariable)throw new Error("cannot calculate length of a non-variable length data type");let e=0;const r=[0];return this.data.forEach((n,s)=>{n===Ot&&(e++,r.push(s+1))}),this._cachedIndexes=r,this.cachedLength=e,e}convert(e,r=0){if(this.dataType.equals(e))return this;const n=new e.Array(this.length);for(let s=0;s<this.length;s++)n[s]=Sa(this.dataType,e,this.data[s],r);return new Y({data:n.buffer,dataType:e,timeRange:this.timeRange,sampleOffset:r,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment})}calcRawMax(){if(this.length===0)return-1/0;if(this.dataType.equals(T.TIMESTAMP))this.cachedMax=this.data[this.data.length-1];else if(this.dataType.usesBigInt){const e=this.data;this.cachedMax=e.reduce((r,n)=>r>n?r:n)}else{const e=this.data;this.cachedMax=e.reduce((r,n)=>r>n?r:n)}return this.cachedMax}get max(){return this.calcMax()}calcMax(){if(this.dataType.isVariable)throw new Error("cannot calculate maximum on a variable length data type");return this.writePos===0?-1/0:(this.cachedMax??=this.calcRawMax(),Le(this.cachedMax,this.sampleOffset))}calcRawMin(){if(this.length===0)return 1/0;if(this.dataType.equals(T.TIMESTAMP))this.cachedMin=this.data[0];else if(this.dataType.usesBigInt){const e=this.data;this.cachedMin=e.reduce((r,n)=>r<n?r:n)}else{const e=this.data;this.cachedMin=e.reduce((r,n)=>r<n?r:n)}return this.cachedMin}get min(){return this.calcMin()}calcMin(){if(this.dataType.isVariable)throw new Error("cannot calculate minimum on a variable length data type");return this.writePos===0?1/0:(this.cachedMin??=this.calcRawMin(),Le(this.cachedMin,this.sampleOffset))}get bounds(){return b(Number(this.min),Number(this.max),{makeValid:!1})}maybeRecomputeMinMax(e){if(this.cachedMin!=null){const r=e.cachedMin??e.calcRawMin();r<this.cachedMin&&(this.cachedMin=r)}if(this.cachedMax!=null){const r=e.cachedMax??e.calcRawMax();r>this.cachedMax&&(this.cachedMax=r)}}atAlignment(e,r){const n=Number((e-this.alignment)/this.alignmentMultiple);if(n<0||n>=this.length){if(r===!0)throw new Error(`[series] - no value at index ${n}`);return}return this.at(n,r)}at(e,r=!1){if(this.dataType.isVariable)return this.atVariable(e,r??!1);if(this.dataType.equals(T.UUID))return this.atUUID(e,r);e<0&&(e=this.length+e);const n=this.data[e];if(n==null){if(r===!0)throw new Error(`[series] - no value at index ${e}`);return}return Le(n,this.sampleOffset)}atUUID(e,r){e<0&&(e=this.length+e);const n=Vt(new Uint8Array(this.buffer,e*this.dataType.density.valueOf()));if(n==null){if(r)throw new Error(`[series] - no value at index ${e}`);return}return n}atVariable(e,r){let n=0,s=0;if(this._cachedIndexes!=null)n=this._cachedIndexes[e],s=this._cachedIndexes[e+1]-1;else{e<0&&(e=this.length+e);for(let o=0;o<this.data.length;o++)if(this.data[o]===Ot){if(e===0){s=o;break}n=o+1,e--}if(s===0&&(s=this.data.length),n>=s||e>0){if(r)throw new Error(`[series] - no value at index ${e}`);return}}const i=this.data.slice(n,s);return this.dataType.equals(T.STRING)?new TextDecoder().decode(i):xt(JSON.parse(new TextDecoder().decode(i)))}binarySearch(e){let r=0,n=this.length-1;const s=We(e);for(;r<=n;){const i=Math.floor((r+n)/2),o=s(this.at(i,!0),e);if(o===0)return i;o<0?r=i+1:n=i-1}return r}updateGLBuffer(e){if(this.gl.control=e,!this.dataType.equals(T.FLOAT32)&&!this.dataType.equals(T.UINT8))throw new Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");const{buffer:r,bufferUsage:n,prevBuffer:s}=this.gl;if(r==null&&(this.gl.buffer=e.createBuffer()),this.writePos!==s)if(e.bindBuffer(e.ARRAY_BUFFER,this.gl.buffer),this.writePos!==F){s===0&&e.bufferData(e.ARRAY_BUFFER,this.byteCapacity.valueOf(),e.STATIC_DRAW);const i=this.dataType.density.size(s).valueOf(),o=this.underlyingData.slice(this.gl.prevBuffer,this.writePos);e.bufferSubData(e.ARRAY_BUFFER,i,o.buffer),this.gl.prevBuffer=this.writePos}else e.bufferData(e.ARRAY_BUFFER,this.buffer,n==="static"?e.STATIC_DRAW:e.DYNAMIC_DRAW),this.gl.prevBuffer=F}as(e){return Kr(e,this.dataType),this}get digest(){return{key:this.key,dataType:this.dataType.toString(),sampleOffset:this.sampleOffset,alignment:{lower:rr(this.alignmentBounds.lower),upper:rr(this.alignmentBounds.upper),multiple:this.alignmentMultiple},timeRange:this.timeRange.toString(),length:this.length,capacity:this.capacity}}get alignmentBounds(){return b(this.alignment,this.alignment+BigInt(this.length)*this.alignmentMultiple)}maybeGarbageCollectGLBuffer(e){this.gl.buffer!=null&&(e.deleteBuffer(this.gl.buffer),this.gl.buffer=null,this.gl.prevBuffer=0,this.gl.control=null)}get glBuffer(){if(this.gl.buffer==null)throw new Error("gl buffer not initialized");return this.gl.prevBuffer!==this.writePos&&console.warn("buffer not updated"),this.gl.buffer}[Symbol.iterator](){if(this.dataType.isVariable){const e=new qa(this);return this.dataType.equals(T.JSON)?new Za(e):e}return this.dataType.equals(T.UUID)?new Fa(this):new Ya(this)}slice(e,r){return this.sliceSub(!1,e,r)}sub(e,r){return this.sliceSub(!0,e,r)}subIterator(e,r){return new tr(this,e,r??this.length)}subAlignmentIterator(e,r){const n=Math.ceil(Number(e-this.alignment)/Number(this.alignmentMultiple)),s=Math.ceil(Number(r-this.alignment)/Number(this.alignmentMultiple));return new tr(this,n,s)}subBytes(e,r){if(e>=0&&(r==null||r>=this.byteLength.valueOf()))return this;const n=this.data.subarray(e,r);return new Y({data:n,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(e)})}sliceSub(e,r,n){if(r<=0&&(n==null||n>=this.length))return this;let s;return e?s=this.data.subarray(r,n):s=this.data.slice(r,n),new Y({data:s,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(r)})}reAlign(e){return new Y({data:this.buffer,dataType:this.dataType,timeRange:W.ZERO,sampleOffset:this.sampleOffset,glBufferUsage:"static",alignment:e})}toString(){let e=`Series(${this.dataType.toString()} ${this.length} [`;if(this.length<=10)e+=Array.from(this).map(r=>r.toString());else{for(let r=0;r<5;r++)e+=`${this.at(r)?.toString()}`,e+=",";e+="...,";for(let r=-5;r<0;r++)e+=this.at(r)?.toString(),r<-1&&(e+=",")}return e+="])",e}};const ka=t=>t==null?!1:Array.isArray(t)||t instanceof ArrayBuffer||ArrayBuffer.isView(t)&&!(t instanceof DataView)||t instanceof Gt?!0:Xr(t),_r=ua(Qr,Gt);let tr=class{series;end;index;constructor(e,r,n){this.series=e;const s=b(0,e.length+1);this.end=dt(s,n),this.index=dt(s,r)}next(){return this.index>=this.end?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}},qa=class{series;index;decoder;constructor(e){if(!e.dataType.isVariable)throw new Error("cannot create a variable series iterator for a non-variable series");this.series=e,this.index=0,this.decoder=new TextDecoder}next(){const e=this.index,r=this.series.data;for(;this.index<r.length&&r[this.index]!==Ot;)this.index++;const n=this.index;return e===n?{done:!0,value:void 0}:(this.index++,{done:!1,value:this.decoder.decode(this.series.buffer.slice(e,n))})}},Za=class en{wrapped;static schema=a.z.record(a.z.string(),a.z.unknown());constructor(e){this.wrapped=e}next(){const e=this.wrapped.next();return e.done===!0?{done:!0,value:void 0}:{done:!1,value:lt.decodeString(e.value,en.schema)}}},Fa=class{series;index;data;density;constructor(e){if(!e.dataType.equals(T.UUID))throw new Error("cannot create a UUID series iterator for a non-UUID series");this.series=e,this.index=0,this.data=new Uint8Array(e.buffer),this.density=T.UUID.density.valueOf()}next(){if(this.index>=this.series.length)return{done:!0,value:void 0};const e=Vt(this.data,this.index*this.density);return this.index++,{done:!1,value:e}}};class Ya{series;index;constructor(e){this.series=e,this.index=0}next(){return this.index>=this.series.length?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}}class Wa{series;constructor(e=[]){if(e.length!==0){const r=e[0].dataType;for(let n=1;n<e.length;n++)if(!e[n].dataType.equals(r))throw new Error("[multi-series] - series must have the same data type")}this.series=e}as(e){return Kr(e,this.dataType),this}get dataType(){return this.series.length===0?T.UNKNOWN:this.series[0].dataType}get timeRange(){return this.series.length===0?W.ZERO:new W(this.series[0].timeRange.start,this.series[this.series.length-1].timeRange.end)}get alignment(){return this.series.length===0?0n:this.series[0].alignment}get alignmentBounds(){return this.series.length===0?b(0n,0n):b(this.series[0].alignmentBounds.lower,this.series[this.series.length-1].alignmentBounds.upper)}push(e){const r=()=>new Error(`cannot push a ${e.dataType.toString()} series to a ${this.dataType.toString()} multi-series`),n=e.dataType.equals(this.dataType);if(_r(e)){if(this.series.length!==0&&!n)throw r();this.series.push(e)}else{if(this.series.length!==0&&e.series.length!==0&&!n)throw r();this.series.push(...e.series)}}get length(){return this.series.reduce((e,r)=>e+r.length,0)}atAlignment(e,r){for(const n of this.series)if(C(n.alignmentBounds,e))return n.atAlignment(e,r);if(r)throw new Error(`[series] - no value at alignment ${e}`)}at(e,r=!1){e<0&&(e=this.length+e);for(const n of this.series){if(e<n.length)return n.at(e,r);e-=n.length}if(r)throw new Error(`[series] - no value at index ${e}`)}subIterator(e,r){return new it(this,e,r??this.length)}subAlignmentIterator(e,r){if(e>=this.alignmentBounds.upper||r<=this.alignmentBounds.lower)return $t;let n=0;for(let i=0;i<this.series.length;i++){const o=this.series[i];if(e<o.alignment)break;if(e>=o.alignmentBounds.upper)n+=o.length;else if(C(o.alignmentBounds,e)){n+=Math.ceil(Number(e-o.alignment)/Number(o.alignmentMultiple));break}}let s=0;for(let i=0;i<this.series.length;i++){const o=this.series[i];if(r<o.alignment)break;if(r>=o.alignmentBounds.upper)s+=o.length;else if(C(o.alignmentBounds,r)){s+=Math.ceil(Number(r-o.alignment)/Number(o.alignmentMultiple));break}}return new it(this,n,s)}subAlignmentSpanIterator(e,r){if(e>=this.alignmentBounds.upper)return $t;r=Math.min(r,Number(this.distance(e,this.alignmentBounds.upper)));let n=0;for(let s=0;s<this.series.length;s++){const i=this.series[s];if(e<i.alignment)break;if(e>=i.alignmentBounds.upper)n+=i.length;else if(C(i.alignmentBounds,e)){n+=Number(e-i.alignment);break}}return new it(this,n,n+r)}updateGLBuffer(e){this.series.forEach(r=>r.updateGLBuffer(e))}get bounds(){return Tr(this.series.map(e=>e.bounds))}get byteLength(){return new we(this.series.reduce((e,r)=>e+r.byteLength.valueOf(),0))}get data(){const e=new this.dataType.Array(this.length);let r=0;for(const n of this.series)e.set(n.data,r),r+=n.length;return new this.dataType.Array(e.buffer)}traverseAlignment(e,r){const n=this.series.map(s=>s.alignmentBounds);return xr(n,e,r)}acquire(e){this.series.forEach(r=>r.acquire(e))}release(){this.series.forEach(e=>e.release())}distance(e,r){const n=this.series.map(s=>s.alignmentBounds);return Sr(n,e,r)}parseJSON(e){if(!this.dataType.equals(T.JSON))throw new Error("cannot parse non-JSON series as JSON");return this.series.flatMap(r=>r.parseJSON(e))}[Symbol.iterator](){return this.series.length===0?{next(){return{done:!0,value:void 0}}}:new Va(this.series)}toStrings(){return this.series.flatMap(e=>e.toStrings())}}let Va=class{series;seriesIndex;internal;constructor(e){this.series=e,this.seriesIndex=0,this.internal=e[0][Symbol.iterator]()}next(){const e=this.internal.next();return e.done===!1?e:this.seriesIndex===this.series.length-1?{done:!0,value:void 0}:(this.internal=this.series[++this.seriesIndex][Symbol.iterator](),this.next())}[Symbol.iterator](){return this}},it=class{series;index;end;constructor(e,r,n){this.series=e,this.end=n,this.index=r}next(){return this.index>=this.end?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}[Symbol.iterator](){return this}};const rr=t=>{const e=t>>32n,r=t&0xffffffffn;return{domain:e,sample:r}};a.z.object({key:a.z.string(),value:a.z.string()});const Ga=a.z.record(a.z.union([a.z.number(),a.z.string(),a.z.symbol()]),a.z.unknown()),Ht=t=>Object.entries(t),Ha=(t,e)=>Object.fromEntries(Ht(t).map(([r,n])=>[r,e(n,r)])),Xa=t=>Object.fromEntries(Ht(t).filter(([e,r])=>r!==void 0)),Ja=(t,...e)=>{const r={...t};for(const n of e)delete r[n];return r},Ka=Object.freeze(Object.defineProperty({__proto__:null,entries:Ht,map:Ha,omit:Ja,purgeUndefined:Xa,unknownZ:Ga},Symbol.toStringTag,{value:"Module"})),tn=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",Qa=tn(),rn=["macOS","Windows","Linux"],_a=["macos","windows","linux"],eo={macos:"macOS",windows:"Windows",linux:"Linux"},to=a.z.enum(rn).or(a.z.enum(_a).transform(t=>eo[t])),ro=()=>{if(typeof window>"u")return;const t=window.navigator.userAgent.toLowerCase();if(t.includes("mac"))return"macOS";if(t.includes("win"))return"Windows";if(t.includes("linux"))return"Linux"};let at;const no=((t={})=>{const{force:e,default:r}=t;return e??at??(at=ro(),at??r)}),so=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:rn,RUNTIME:Qa,detect:tn,getOS:no,osZ:to},Symbol.toStringTag,{value:"Module"})),io=(...t)=>t.map(nn).join(""),nn=t=>(t.endsWith("/")||(t+="/"),t.startsWith("/")&&(t=t.slice(1)),t),ao=t=>t.endsWith("/")?t.slice(0,-1):t;class De{protocol;host;port;path;constructor({host:e,port:r,protocol:n="",pathPrefix:s=""}){this.protocol=n,this.host=e,this.port=r,this.path=nn(s)}replace(e){return new De({host:e.host??this.host,port:e.port??this.port,protocol:e.protocol??this.protocol,pathPrefix:e.pathPrefix??this.path})}child(e){return new De({...this,pathPrefix:io(this.path,e)})}toString(){return ao(`${this.protocol}://${this.host}:${this.port}/${this.path}`)}static UNKNOWN=new De({host:"unknown",port:0})}const oo=2,uo=3,lo=2,co=(t,e)=>{if(Number.isNaN(t)||!Number.isFinite(t))return t;const r=Te(e);if(r==0)return t;let n;r>=1e3?n=oo:r>=1?n=uo:n=Math.ceil(-Math.log10(r))+lo;const s=10**n;return Math.round(t*s)/s},ho=Object.freeze(Object.defineProperty({__proto__:null,MAX_INT16:ya,MAX_INT32:wa,MAX_INT64:Ze,MAX_INT64_NUMBER:Gr,MAX_INT8:pa,MAX_UINT16:ca,MAX_UINT32:ha,MAX_UINT64:fa,MAX_UINT64_NUMBER:da,MAX_UINT8:la,MIN_INT16:ma,MIN_INT32:ba,MIN_INT64:$a,MIN_INT64_NUMBER:Oa,MIN_INT8:ga,abs:Or,add:oe,closeTo:hs,div:ve,equal:ft,isInteger:ke,max:ds,min:$r,mult:j,roundBySpan:co,roundToNearestMagnitude:fs,sub:q},Symbol.toStringTag,{value:"Module"}));a.z.object({baseInterval:c.z.optional(),maxRetries:a.z.number().optional(),scale:a.z.number().optional()});const fo=/^#?([0-9a-f]{6}|[0-9a-f]{8})$/i,Fe=a.z.string().regex(fo),se=a.z.number().min(0).max(255),sn=a.z.number().min(0).max(1),_e=a.z.tuple([se,se,se,sn]),go=a.z.tuple([se,se,se]),po=a.z.object({rgba255:_e}),mo=a.z.number().min(0).max(360),yo=a.z.number().min(0).max(100),bo=a.z.number().min(0).max(100),an=a.z.tuple([mo,yo,bo,sn]),et=a.z.union([Fe,go,_e,an,po]),tt=et.transform(t=>v(t)),wo=t=>tt.safeParse(t).success,$o=t=>_e.safeParse(t).success,Oo=(t=>{if(t==null)return;const e=tt.safeParse(t);if(e.success)return un(e.data);if(typeof t=="string")return t;throw e.error}),v=(t,e=1)=>{if(t=et.parse(t),typeof t=="string")return Pe(t,e);if(Array.isArray(t)){if(t.length<3||t.length>4)throw new Error(`Invalid color: [${t.join(", ")}]`);return t.length===3?[...t,e]:t}return t.rgba255},on=(t,e)=>{if(t==null||e==null)return t==e;const r=v(t),n=v(e);return r.every((s,i)=>s===n[i])},vo=(t=>{if(t==null)return;const[e,r,n,s]=v(t);return`#${Me(e)}${Me(r)}${Me(n)}${s===1?"":Me(s*255)}`}),un=t=>{const[e,r,n,s]=v(t);return`rgba(${e}, ${r}, ${n}, ${s})`},To=t=>`rgb(${ln(t)})`,ln=t=>{const[e,r,n]=v(t);return`${e}, ${r}, ${n}`},xo=t=>[...Xt(t),pe(t)],Xt=t=>[fe(t)/255,de(t)/255,ge(t)/255],fe=t=>v(t)[0],de=t=>v(t)[1],ge=t=>v(t)[2],pe=t=>v(t)[3],So=t=>on(Jt,t),No=t=>Co(v(t)),Io=(t,e)=>{const[r,n,s]=v(t);if(e>100)throw new Error(`Color opacity must be between 0 and 100, got ${e}`);return e>1&&(e/=100),[r,n,s,e]},$e=t=>{const[e,r,n]=Xt(t).map(s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4);return Number((.2126*e+.7152*r+.0722*n).toFixed(3))},Mo=t=>{const[e,r,n]=Xt(t);return 1-(Math.max(e,r,n)-Math.min(e,r,n))},vt=(t,e)=>{const r=v(t),n=v(e),s=$e(r),i=$e(n);return(Math.max(s,i)+.5)/(Math.min(s,i)+.5)},zo=(t,...e)=>{if(e.length===0)throw new Error("[Color.pickByContrast] - must provide at least one color");const r=v(t),[n]=e.sort((s,i)=>vt(r,i)-vt(r,s));return v(n)},Ao=t=>$e(t)<.5,Eo=t=>$e(t)>.5,Pe=(t,e=1)=>(t=Fe.parse(t),t=Uo(t),[ze(t,0),ze(t,2),ze(t,4),t.length===8?ze(t,6)/255:e]),Jt=[0,0,0,0],Me=t=>Math.floor(t).toString(16).padStart(2,"0"),ze=(t,e)=>parseInt(t.slice(e,e+2),16),Uo=t=>t.startsWith("#")?t.slice(1):t,nr={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",yellow:"#ffff00",cyan:"#00ffff",magenta:"#ff00ff",silver:"#c0c0c0",gray:"#808080",grey:"#808080",maroon:"#800000",olive:"#808000",lime:"#00ff00",aqua:"#00ffff",teal:"#008080",navy:"#000080",fuchsia:"#ff00ff",purple:"#800080",orange:"#ffa500",brown:"#a52a2a",tan:"#d2b48c",gold:"#ffd700",indigo:"#4b0082",violet:"#ee82ee",pink:"#ffc0cb",coral:"#ff7f50",salmon:"#fa8072",khaki:"#f0e68c",crimson:"#dc143c",transparent:"transparent"},Bo=t=>{if(!t)return;const e=t.trim().toLowerCase();if(!(e==="transparent"||e==="none")){if(e.startsWith("#")){if(e.length===4){const r=e[1],n=e[2],s=e[3],i=`#${r}${r}${n}${n}${s}${s}`;if(Fe.safeParse(i).success)return Pe(i)}return(e.length===7||e.length===9)&&Fe.safeParse(e).success?Pe(e):void 0}if(e.startsWith("rgb")){const r=e.match(/rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);if(r){const[,n,s,i,o]=r;return[parseInt(n),parseInt(s),parseInt(i),o?parseFloat(o):1]}}if(nr[e])return Pe(nr[e])}},jo=t=>{t=an.parse(t);let[e,r,n]=t;const s=t[3];e/=360,r/=100,n/=100;let i,o,h;if(r===0)i=o=h=n;else{const f=n<.5?n*(1+r):n+r-n*r,l=2*n-f;i=ot(l,f,e+1/3),o=ot(l,f,e),h=ot(l,f,e-1/3)}return[Math.round(i*255),Math.round(o*255),Math.round(h*255),s]},ot=(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),Co=t=>{t=_e.parse(t);let[e,r,n]=t;const s=t[3];e/=255,r/=255,n/=255;const i=Math.max(e,r,n),o=Math.min(e,r,n);let h,f,l=(i+o)/2;if(i===o)h=f=0;else{const d=i-o;f=l>.5?d/(2-i-o):d/(i+o),i===e?h=(r-n)/d+(r<n?6:0):i===r?h=(n-e)/d+2:h=(e-r)/d+4,h/=6}return h*=360,f*=100,l*=100,[Math.round(h),Math.round(f),Math.round(l),s]},Ro=v("#000000"),Lo=v("#ffffff"),cn=a.z.object({key:a.z.string(),color:et,position:a.z.number(),switched:a.z.boolean().optional()}),Do=a.z.array(cn),Po=(t,e)=>{if(t.length===0)return Jt;if(t=t.slice().sort((r,n)=>r.position-n.position),e<=t[0].position)return v(t[0].color);if(e>=t[t.length-1].position)return v(t[t.length-1].color);for(let r=0;r<t.length-1;r++){const n=t[r],s=t[r+1];if(e<n.position||e>s.position)continue;if(e===n.position)return v(n.color);if(e===s.position)return v(s.color);const i=(e-n.position)/(s.position-n.position),o=v(n.color),h=v(s.color),f=Math.round(fe(o)+i*(fe(h)-fe(o))),l=Math.round(de(o)+i*(de(h)-de(o))),d=Math.round(ge(o)+i*(ge(h)-ge(o))),m=pe(o)+i*(pe(h)-pe(o));return v([f,l,d,m])}return v(t[t.length-1].color)},ko=a.z.object({key:a.z.string(),name:a.z.string(),color:tt}),qo=a.z.object({key:a.z.string(),name:a.z.string(),swatches:a.z.array(ko)}),hn=Object.freeze(Object.defineProperty({__proto__:null,BLACK:Ro,WHITE:Lo,ZERO:Jt,aValue:pe,bValue:ge,colorZ:tt,construct:v,contrast:vt,crudeZ:et,cssString:Oo,equals:on,fromCSS:Bo,fromGradient:Po,fromHSLA:jo,gValue:de,gradientZ:Do,grayness:Mo,hex:vo,hsla:No,isColor:$o,isCrude:wo,isDark:Ao,isLight:Eo,isZero:So,luminance:$e,paletteZ:qo,pickByContrast:zo,rValue:fe,rgbCSS:To,rgbString:ln,rgba1:xo,rgbaCSS:un,setAlpha:Io,stopZ:cn},Symbol.toStringTag,{value:"Module"})),fn=a.z.int().min(0).max(255),dn=255,gn=0,Zo={lower:gn,upper:dn+1},pn=a.z.object({name:a.z.string(),key:a.z.string()}),Oe=t=>a.z.object({subject:pn,resource:t,authority:fn}),Fo=(...t)=>e=>e.filter(r=>{let n=!1;return r.to!=null&&(n=t.includes(r.to.resource)),r.from!=null&&!n&&(n=t.includes(r.from.resource)),n}),mn=t=>a.z.object({from:Oe(t),to:a.z.null()}),yn=t=>a.z.object({from:a.z.null(),to:Oe(t)}),Yo=t=>a.z.union([mn(t),yn(t),a.z.object({from:Oe(t),to:Oe(t)})]),Wo=Object.freeze(Object.defineProperty({__proto__:null,ABSOLUTE_AUTHORITY:dn,AUTHORITY_BOUNDS:Zo,ZERO_AUTHORITY:gn,acquireZ:yn,authorityZ:fn,filterTransfersByChannelKey:Fo,releaseZ:mn,stateZ:Oe,subjectZ:pn,transferZ:Yo},Symbol.toStringTag,{value:"Module"})),Vo=t=>Object.getOwnPropertySymbols(globalThis).includes(t),Go=(t,e)=>{const r=Symbol.for(t);if(!Vo(r)){const n=e();Object.defineProperty(globalThis,r,{value:n})}return()=>globalThis[r]},bn="sy_x_error",Ho=t=>e=>e!=null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"?e.type.startsWith(t):e instanceof Error?e.message.startsWith(t):typeof e!="string"?!1:e.startsWith(t),wn=t=>class he extends Error{static discriminator=bn;discriminator=he.discriminator;static TYPE=t;type=he.TYPE;static matches=Ho(t);matches=he.matches;constructor(r,n){super(r,n),this.name=he.TYPE}static sub(r){return wn(`${t}.${r}`)}},Xo=t=>{if(t==null||typeof t!="object")return!1;const e=t;if(e.discriminator!==bn)return!1;if(!("type"in e))throw new Error(`X Error is missing its type property: ${JSON.stringify(e)}`);return!0},ue="unknown",sr="nil";class Jo{providers=[];register(e){this.providers.push(e)}encode(e){if(e==null)return{type:sr,data:""};if(Xo(e))for(const r of this.providers){const n=r.encode(e);if(n!=null)return n}if(e instanceof Error)return{type:ue,data:e.message};if(typeof e=="string")return{type:ue,data:e};try{return{type:ue,data:JSON.stringify(e)}}catch{return{type:ue,data:"unable to encode error information"}}}decode(e){if(e==null||e.type===sr)return null;if(e.type===ue)return new ir(e.data);for(const r of this.providers){const n=r.decode(e);if(n!=null)return n}return new ir(e.data)}}Go("synnax-error-registry",()=>new Jo);class ir extends wn("unknown"){}a.z.object({type:a.z.string(),data:a.z.string()});const Ko=()=>new Promise(t=>setTimeout(t,0)),Qo=a.object({jsonrpc:a.literal("2.0"),method:a.string(),params:a.any().optional(),id:a.union([a.string(),a.number(),a.null()]).optional()}),$n=a.object({jsonrpc:a.literal("2.0"),id:a.union([a.string(),a.number(),a.null()])}),_o=$n.extend({result:a.json()}),eu=$n.extend({error:a.object({code:a.number().int(),message:a.string().optional(),data:a.json().optional()})}),tu=a.union([_o,eu]);a.union([Qo,tu]);const ru=a.uuid(),nu=a.object({key:ru,name:a.string().min(1),color:a.string()}),su=(t,e,r)=>{const n=t.get(e);return n===void 0?(t.set(e,r),r):n},iu=Object.freeze(Object.defineProperty({__proto__:null,getOrSetDefault:su},Symbol.toStringTag,{value:"Module"})),Tt=a.z.string().regex(/^\d+\.\d+\.\d+$/),Se=((t,e,r={})=>{r.checkMajor??=!0,r.checkMinor??=!0,r.checkPatch??=!0;const n=Tt.parse(t),s=Tt.parse(e),[i,o,h]=n.split(".").map(Number),[f,l,d]=s.split(".").map(Number);if(r.checkMajor){if(i<f)return Ee;if(i>f)return Ue}if(r.checkMinor){if(o<l)return Ee;if(o>l)return Ue}if(r.checkPatch){if(h<d)return Ee;if(h>d)return Ue}return ie}),au=(t,e,r={})=>yr(Se(t,e,r)),On=(t,e,r={})=>mr(Se(t,e,r)),ou=(t,e,r={})=>pr(Se(t,e,r)),uu=({name:t,migrate:e})=>r=>{try{const n=e(r);return console.log(`${t} migrated: ${r.version} -> ${n.version}`),n}catch(n){throw console.log(`${t} failed to migrate from ${r.version}`),console.error(n),n}},lu=({name:t,migrations:e,targetSchema:r,defaultVersion:n,def:s})=>{const i=Object.keys(e).sort(Se).pop();if(i==null)return l=>{if(l.version??=n,l.version!==s.version)return console.log(`${t} version ${l.version} is newer than latest version of ${s.version}.
|
|
7
|
-
Returning default instead.
|
|
8
|
-
`),s;try{return r!=null?r.parse(l):l}catch(d){return console.log(`${t} failed to parse default. Exiting with default`),console.error(d),s}};const o=Object.keys(e).length;let h=!1;const f=l=>{try{if(o===0||On(l.version,i))return console.log(h?`${t} ${l.version} now up to date`:`${t} version ${l.version} is up to date with target version ${s.version}`),l;const d=l.version,m=e[d],p=m(l);return h=!0,f(p)}catch(d){return console.log(`${t} failed to migrate from ${l.version} to ${i}`),console.error(d),s}};return l=>{try{if(l.version==null)if(n!=null)console.log(`${t} version is null. Setting version to default of ${n}`),l.version=n;else return console.log(`${t} version is null and no default version set. Exiting with default`),s;return f(l)}catch(d){return console.log(`${t} failed to parse final result. Exiting with default`),console.error(d),s}}},cu=Object.freeze(Object.defineProperty({__proto__:null,compareSemVer:Se,createMigration:uu,migrator:lu,semVerNewer:On,semVerOlder:ou,semVerZ:Tt,versionsEqual:au},Symbol.toStringTag,{value:"Module"})),vn=["standard","scientific","engineering"],hu=a.z.enum(vn),fu=(t,e,r)=>{if(Number.isNaN(t))return"NaN";if(t===1/0)return"∞";if(t===-1/0)return"-∞";if(r==="standard")return t.toFixed(e);if(t===0)return e===0?"0ᴇ0":`0.${"0".repeat(e)}ᴇ0`;let n;return r==="scientific"?n=Math.floor(Math.log10(Math.abs(t))):n=Math.floor(Math.log10(Math.abs(t))/3)*3,`${(t/10**n).toFixed(e)}ᴇ${n}`},du=Object.freeze(Object.defineProperty({__proto__:null,NOTATIONS:vn,notationZ:hu,stringifyNumber:fu},Symbol.toStringTag,{value:"Module"})),gu=t=>Array.isArray(t)?[...t]:typeof t=="object"&&t!==null?{...t}:t,Tn=a.z.enum(["success","info","warning","error","loading","disabled"]),pu=t=>a.z.object({key:a.z.string(),name:a.z.string().default(""),variant:Tn,message:a.z.string(),description:a.z.string().optional(),time:$.z,labels:or(nu).optional(),details:t??a.z.unknown().optional()}),mu=a.z.object({stack:a.z.string()}),yu=(t,e)=>{if(!(t instanceof Error))throw t;return xn({variant:"error",message:e??t.message,description:e!=null?t.message:void 0,details:{stack:t.stack??""}})},xn=t=>({key:Wt(),time:$.now(),name:"",...t}),bu=(t,e=[])=>{if(t!=null)return Array.isArray(e)?e.includes(t)?t:void 0:e===t?t:void 0},wu=(t,e=[])=>{if(t!=null)return Array.isArray(e)?e.includes(t)?void 0:t:e===t?void 0:t},$u=Object.freeze(Object.defineProperty({__proto__:null,create:xn,exceptionDetailsSchema:mu,fromException:yu,keepVariants:bu,removeVariants:wu,statusZ:pu,variantZ:Tn},Symbol.toStringTag,{value:"Module"})),Ou=(t,e="")=>{if(typeof t=="string")return t;const r=t.length;return r===0?e:r===1?t[0]:r===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[r-1]}`},vu=t=>{const e=t.split(" "),r=new Set,n=e.map(o=>o.charAt(0).toLowerCase()).join("");r.add(n.replace(/-/g,"_")),r.add(n.replace(/(.)(.)/g,"$1_$2").replace(/-/g,"_"));const s=/\d+/g;t.match(s)&&e.forEach((o,h)=>{if(s.test(o)){const f=e.map((l,d)=>d!==h?l.charAt(0).toLowerCase():l).join("");r.add(f.replace(/-/g,"_")),r.add(f.replace(/(.)(.)/g,"$1_$2").replace(/-/g,"_"))}});const i=e.map(o=>(o.length>3?o.substring(0,3):o).toLowerCase());return r.add(i.join("").replace(/-/g,"_")),r.add(i.join("_").replace(/-/g,"_")),Array.from(r).filter(o=>o.length>=2&&o.length<=12&&!/^\d/.test(o))},Tu=(t,e)=>t.startsWith(e)?t.slice(e.length):t,xu=t=>t.length===0?t:t[t.length-1]==="y"?`${t.slice(0,-1)}ies`:t[t.length-1]==="s"||t[t.length-1]==="x"||t[t.length-1]==="z"||t.endsWith("ch")||t.endsWith("sh")?`${t}es`:`${t}s`,Su=Object.freeze(Object.defineProperty({__proto__:null,createShortIdentifiers:vu,naturalLanguageJoin:Ou,pluralName:xu,trimPrefix:Tu},Symbol.toStringTag,{value:"Module"})),Nu=new Error("request for lock canceled");var Iu=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function h(d){try{l(n.next(d))}catch(m){o(m)}}function f(d){try{l(n.throw(d))}catch(m){o(m)}}function l(d){d.done?i(d.value):s(d.value).then(h,f)}l((n=n.apply(t,e||[])).next())})};class Mu{constructor(e,r=Nu){this._value=e,this._cancelError=r,this._queue=[],this._weightedWaiters=[]}acquire(e=1,r=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((n,s)=>{const i={resolve:n,reject:s,weight:e,priority:r},o=Sn(this._queue,h=>r<=h.priority);o===-1&&e<=this._value?this._dispatchItem(i):this._queue.splice(o+1,0,i)})}runExclusive(e){return Iu(this,arguments,void 0,function*(r,n=1,s=0){const[i,o]=yield this.acquire(n,s);try{return yield r(i)}finally{o()}})}waitForUnlock(e=1,r=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,r)?Promise.resolve():new Promise(n=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),zu(this._weightedWaiters[e-1],{resolve:n,priority:r})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const r=this._value;this._value-=e.weight,e.resolve([r,this._newReleaser(e.weight)])}_newReleaser(e){let r=!1;return()=>{r||(r=!0,this.release(e))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let e=this._value;e>0;e--){const r=this._weightedWaiters[e-1];r&&(r.forEach(n=>n.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let r=this._value;r>0;r--){const n=this._weightedWaiters[r-1];if(!n)continue;const s=n.findIndex(i=>i.priority<=e);(s===-1?n:n.splice(0,s)).forEach((i=>i.resolve()))}}}_couldLockImmediately(e,r){return(this._queue.length===0||this._queue[0].priority<r)&&e<=this._value}}function zu(t,e){const r=Sn(t,n=>e.priority<=n.priority);t.splice(r+1,0,e)}function Sn(t,e){for(let r=t.length-1;r>=0;r--)if(e(t[r]))return r;return-1}var Au=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function h(d){try{l(n.next(d))}catch(m){o(m)}}function f(d){try{l(n.throw(d))}catch(m){o(m)}}function l(d){d.done?i(d.value):s(d.value).then(h,f)}l((n=n.apply(t,e||[])).next())})};class Eu{constructor(e){this._semaphore=new Mu(1,e)}acquire(){return Au(this,arguments,void 0,function*(e=0){const[,r]=yield this._semaphore.acquire(1,e);return r})}runExclusive(e,r=0){return this._semaphore.runExclusive(()=>e(),1,r)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}class Nn extends Eu{constructor(e){super(),Object.assign(this,e)}}const Uu=t=>new Nn(t),Bu=Object.freeze(Object.defineProperty({__proto__:null,mutex:Nn,newMutex:Uu},Symbol.toStringTag,{value:"Module"}));function In(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=In(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Mn(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=In(t))&&(n&&(n+=" "),n+=e);return n}const ju=Mn,re="-",ar="__",Ae="--",zn=t=>{const e=(...r)=>ju(...r);return e.B=(...r)=>t+re+r.join(re),e.E=r=>t+ar+r,e.M=(...r)=>t+Ae+r.join("-"),e.BM=(r,...n)=>e.B(r)+Ae+n.join("-"),e.BE=(r,...n)=>e.B(r)+ar+n.join(re),e.BEM=(r,n,...s)=>e.BE(r,n)+Ae+s.join(re),e.var=(...r)=>Ae+t+re+r.join(re),e};class Cu{rows=[];columns=[];prefix;constructor(e=""){this.prefix=e}row(e,r,n){const{prefix:s}=this;return this.rows.push({startLabel:s+e,endLabel:s+r,size:n}),this}col(e,r,n){const{prefix:s}=this;return this.columns.push({startLabel:s+e,endLabel:s+r,size:n}),this}build(){return{display:"grid",gridTemplateRows:this.rows.map((e,r)=>{let n=r===0?"[":"";return n+=`${e.startLabel}] ${e.size}${typeof e.size=="number"?"px":""} [${e.endLabel}`,n+=r===this.rows.length-1?"]":"",n}).join(" "),gridTemplateColumns:this.columns.map((e,r)=>{let n=r===0?"[":"";return n+=`${e.startLabel}] ${e.size}${typeof e.size=="number"?"px":""} [${e.endLabel}`,n+=r===this.columns.length-1?"]":"",n}).join(" ")}}}const Ru=(t,e)=>Object.entries(e).forEach(([r,n])=>n!=null&&t.style.setProperty(r,`${n}`)),Lu=(t,e)=>Array.from(t.style).forEach(r=>{r.startsWith(e)&&t.style.removeProperty(r)}),Du=t=>{const e=zn(t);return e.visible=r=>e.M(r?"visible":"hidden"),e.expanded=r=>e.M(r?"expanded":"collapsed"),e.loc=r=>e.M("location",Ar.construct(r)),e.disabled=r=>r===!0&&e.M("disabled"),e.align=r=>e.M(r),e.dir=r=>r!=null&&e.M("direction",Ir.construct(r)),e.sharp=r=>r!==!1&&e.M("sharp"),e.rounded=r=>r!==!1&&e.M("rounded"),e.bordered=r=>typeof r=="boolean"?r&&e.M("bordered"):r!=null?e.M(`bordered-${r.toString()}`):e.M("bordered"),e.selected=r=>r&&e.M("selected"),e.altColor=r=>r&&e.M("alt-color"),e.editable=r=>r&&e.M("editable"),e.noSelect=e.M("no-select"),e.applyVars=Ru,e.removeVars=Lu,e.newGridBuilder=r=>new Cu(r),e.dropRegion=r=>r&&e.B("haul-drop-region"),e.px=r=>`${r}px`,e.inheritDims=(r=!0)=>r&&e.M("inherit-dims"),e.shade=(r=>r!=null&&e.M(`shade-${r}`)),e.colorVar=r=>{if(!(r==null||r===!1))return typeof r=="number"?`var(--${t}-gray-l${r})`:hn.cssString(r)},e.levelSizeVar=r=>`var(--${t}-${r}-size)`,e.level=r=>e.M(`level-${r}`),e},Pu=Du("pluto");exports.Ar=Wo;exports.Br=gu;exports.C=na;exports.CSS=Pu;exports.Dt=oa;exports.Fr=Su;exports.H=Is;exports.K=Ar;exports.Nr=ho;exports.O=Gn;exports.Oe=Wa;exports.Q=ui;exports.R=Fr;exports.Rr=Ko;exports.S=so;exports.U=Zn;exports.Vr=$u;exports.Wr=cu;exports.Xr=Bu;exports._=Gi;exports.a=Bn;exports.a$1=c;exports.c=Wn;exports.c$1=we;exports.clsx=Mn;exports.de=xa;exports.g=I;exports.ge=La;exports.jt=Ri;exports.k=es;exports.kr=hn;exports.l=Ka;exports.m=W;exports.n=T;exports.newBEM=zn;exports.p=Ir;exports.qr=iu;exports.r=$;exports.v=Re;exports.x=Gt;exports.zr=du;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./main-20msMsI6.cjs"),t=require("./Toggle-D7uuc8BY.cjs"),o=Object.freeze(Object.defineProperty({__proto__:null,Button:e.Button,Toggle:t.Toggle},Symbol.toStringTag,{value:"Module"}));exports.external=o;
|