@synnaxlabs/pluto 0.36.1 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Animated-BAoBw9cC.cjs → Animated-BOjwPkTJ.cjs} +1 -1
- package/dist/{Animated-DkZIfEYP.js → Animated-ByIJT_wA.js} +2 -2
- package/dist/{Item-BjErngVu.cjs → Item-Bamd13Tl.cjs} +1 -1
- package/dist/{Item-C7Q_zqsK.js → Item-CQ2ZuDfi.js} +8 -8
- package/dist/{LinePlot-Cyj5fPvs.js → LinePlot-Ci-61YDW.js} +111 -108
- package/dist/LinePlot-D4V1ltNT.cjs +24 -0
- package/dist/{Link-DIP4E5h4.cjs → Link-Cm6yn4zC.cjs} +1 -1
- package/dist/{Link-DkPbZ9Vw.js → Link-ZlOdu4jA.js} +1 -1
- package/dist/{Pack-ClLR2ywa.cjs → Pack-CyaEXvnu.cjs} +1 -1
- package/dist/{Pack-D8EcIVa2.js → Pack-DNCFnyuR.js} +1 -1
- package/dist/{Toggle-CZlnDV1Y.js → Toggle-DlYB4nmh.js} +10838 -10799
- package/dist/{Toggle-Dwz8HiqJ.cjs → Toggle-vgmhy8wZ.cjs} +56 -56
- package/dist/{Video-xr1Ey5qV.cjs → Video-g30B90s-.cjs} +1 -1
- package/dist/{Video-CI9sBV9l.js → Video-jaT7Y97L.js} +1 -1
- package/dist/{aggregator-D6gAHK4j.js → aggregator-CWsCIyed.js} +1276 -1258
- package/dist/aggregator-DX8ts24k.cjs +77 -0
- package/dist/align.cjs +1 -1
- package/dist/align.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/css-Bo-hsQHb.cjs +1 -0
- package/dist/{css-DnIb4t_E.js → css-Csw1Dn4s.js} +449 -446
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +5 -5
- package/dist/{external-CetHCRLx.js → external-2PznkZYs.js} +36 -36
- package/dist/{external-BxiJID8F.js → external-4ikhWnyq.js} +2 -2
- package/dist/{external-CIm5lpCQ.cjs → external-BS9Bfsj3.cjs} +1 -1
- package/dist/{external-wgG3P6Dp.js → external-BTnFzhMM.js} +1 -1
- package/dist/{external-BeoanEV1.js → external-BpeQ9rNJ.js} +144 -133
- package/dist/external-Bt_kX5KM.cjs +1 -0
- package/dist/{external-C-tizEE4.js → external-CEcxrva2.js} +5 -5
- package/dist/{external-AQutxNrw.cjs → external-CMEDU76u.cjs} +1 -1
- package/dist/{external-Lmd8cJhx.cjs → external-CWincA61.cjs} +1 -1
- package/dist/{external-Czhk9fZS.cjs → external-C_th4MW9.cjs} +1 -1
- package/dist/{external-BX17kwZc.cjs → external-CyPQsB1T.cjs} +1 -1
- package/dist/{external-BpqHq8f8.js → external-CyYaJ5TW.js} +4 -4
- package/dist/{external-6FH5NjXf.js → external-DIwKYTmY.js} +2 -2
- package/dist/{external-feiUnuJI.js → external-DXD4PtTK.js} +2 -2
- package/dist/{external-xPdBJlsz.js → external-Dn4tpDVi.js} +2 -2
- package/dist/{external-CXQMoMS3.cjs → external-DsJYjdNk.cjs} +1 -1
- package/dist/{external-bByVUOOg.cjs → external-Dtr4ZxR6.cjs} +1 -1
- package/dist/{external-8w5Eg-ce.cjs → external-IztUjYjX.cjs} +1 -1
- package/dist/{external-DAn-_GLc.cjs → external-VEFOprRU.cjs} +1 -1
- package/dist/{external-CFaZ_vCi.js → external-WZW4OBZx.js} +4 -4
- package/dist/{external-Cy8UF9vk.cjs → external-kAduhcvp.cjs} +1 -1
- package/dist/{external-BDzzt6lF.js → external-rGv5AzBK.js} +12 -12
- package/dist/{external-DlCfhkx8.cjs → external-vMTeF1dc.cjs} +1 -1
- package/dist/{external-Ckaptp3S.js → external-vYsKqfFS.js} +4 -4
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +9767 -7504
- 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/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/pluto.css +1 -1
- package/dist/src/breadcrumb/Breadcrumb.d.ts +2 -1
- package/dist/src/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/src/breadcrumb/Breadcrumb.spec.d.ts +2 -0
- package/dist/src/breadcrumb/Breadcrumb.spec.d.ts.map +1 -0
- package/dist/src/color/core/color.d.ts +4 -0
- package/dist/src/color/core/color.d.ts.map +1 -1
- package/dist/src/haul/Haul.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/DateTime.d.ts.map +1 -1
- package/dist/src/input/Numeric.d.ts.map +1 -1
- package/dist/src/input/Text.d.ts +1 -0
- package/dist/src/input/Text.d.ts.map +1 -1
- package/dist/src/modal/Modal.d.ts.map +1 -1
- package/dist/src/pluto/Pluto.d.ts +1 -4
- package/dist/src/pluto/Pluto.d.ts.map +1 -1
- package/dist/src/select/ComponentSize.d.ts +12 -0
- package/dist/src/select/ComponentSize.d.ts.map +1 -0
- package/dist/src/select/DataType.d.ts +3 -2
- package/dist/src/select/DataType.d.ts.map +1 -1
- package/dist/src/select/external.d.ts +1 -0
- package/dist/src/select/external.d.ts.map +1 -1
- package/dist/src/table/aether/Table.d.ts.map +1 -1
- package/dist/src/table/cells/Cells.d.ts.map +1 -1
- package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
- package/dist/src/text/Editable.d.ts +2 -1
- package/dist/src/text/Editable.d.ts.map +1 -1
- package/dist/src/text/Keyboard.d.ts.map +1 -1
- package/dist/src/theming/Provider.d.ts.map +1 -1
- package/dist/src/tree/Tree.d.ts +2 -2
- package/dist/src/tree/Tree.d.ts.map +1 -1
- package/dist/src/tree/core.d.ts +5 -2
- package/dist/src/tree/core.d.ts.map +1 -1
- package/dist/src/util/canDisable.d.ts +10 -0
- package/dist/src/util/canDisable.d.ts.map +1 -0
- package/dist/src/util/removeProps.d.ts +26 -0
- package/dist/src/util/removeProps.d.ts.map +1 -0
- package/dist/src/util/removeProps.spec.d.ts +2 -0
- package/dist/src/util/removeProps.spec.d.ts.map +1 -0
- package/dist/src/vis/canvas/aether/canvas.d.ts +4 -4
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/rule/aether/aether.d.ts.map +1 -1
- package/dist/src/vis/schematic/Forms.d.ts +9 -2
- package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
- package/dist/src/vis/schematic/SelectOrientation.d.ts +3 -3
- package/dist/src/vis/schematic/SelectOrientation.d.ts.map +1 -1
- package/dist/src/vis/schematic/Symbols.d.ts +183 -3
- package/dist/src/vis/schematic/Symbols.d.ts.map +1 -1
- package/dist/src/vis/schematic/primitives/Primitives.d.ts +115 -6
- package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
- package/dist/src/vis/schematic/registry.d.ts +1 -1
- package/dist/src/vis/schematic/registry.d.ts.map +1 -1
- package/dist/src/vis/setpoint/aether/setpoint.d.ts +1 -1
- package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.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-CKQQRvyD.js → units-CJ76Jzvw.js} +1 -1
- package/dist/{units-YvMXZR11.cjs → units-CXFC0OLO.cjs} +1 -1
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +13 -13
- package/dist/LinePlot-CFpCtIU5.cjs +0 -24
- package/dist/aggregator-q3hNa4qv.cjs +0 -77
- package/dist/css-C3zWKgOb.cjs +0 -1
- package/dist/external-DtsEr2ls.cjs +0 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var C = (t, e, r) =>
|
|
1
|
+
var $t = Object.defineProperty;
|
|
2
|
+
var vt = (t, e, r) => e in t ? $t(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var C = (t, e, r) => vt(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
4
|
import { z as i } from "zod";
|
|
5
|
-
const
|
|
5
|
+
const Q = i.tuple([i.number(), i.number()]);
|
|
6
6
|
i.tuple([i.bigint(), i.bigint()]);
|
|
7
|
-
const
|
|
7
|
+
const $e = i.object({ width: i.number(), height: i.number() }), Ot = i.object({
|
|
8
8
|
signedWidth: i.number(),
|
|
9
9
|
signedHeight: i.number()
|
|
10
|
-
}),
|
|
11
|
-
i.enum(
|
|
12
|
-
const
|
|
13
|
-
i.enum(It);
|
|
14
|
-
const H = i.object({ x: i.number(), y: i.number() }), ke = i.object({ clientX: i.number(), clientY: i.number() }), Me = ["x", "y"], je = i.enum(Me), Fe = ["top", "right", "bottom", "left"], Et = i.enum(Fe), re = ["left", "right"], Te = i.enum(re), ne = ["top", "bottom"], Ie = i.enum(ne), Ee = ["center"], ce = i.enum(Ee), St = [...Fe, ...Ee], Se = i.enum(St);
|
|
10
|
+
}), Mt = ["width", "height"];
|
|
11
|
+
i.enum(Mt);
|
|
12
|
+
const jt = ["start", "center", "end"], Tt = ["signedWidth", "signedHeight"];
|
|
15
13
|
i.enum(Tt);
|
|
16
|
-
const
|
|
17
|
-
i.enum(
|
|
18
|
-
const
|
|
19
|
-
i.
|
|
20
|
-
i.
|
|
21
|
-
|
|
14
|
+
const H = i.object({ x: i.number(), y: i.number() }), Fe = i.object({ clientX: i.number(), clientY: i.number() }), ve = ["x", "y"], Oe = i.enum(ve), We = ["top", "right", "bottom", "left"], It = i.enum(We), ee = ["left", "right"], Me = i.enum(ee), te = ["top", "bottom"], je = i.enum(te), Te = ["center"], ce = i.enum(Te), Et = [...We, ...Te], Ie = i.enum(Et);
|
|
15
|
+
i.enum(jt);
|
|
16
|
+
const St = ["first", "last"];
|
|
17
|
+
i.enum(St);
|
|
18
|
+
const Xe = i.object({ lower: i.number(), upper: i.number() }), Bt = i.object({ lower: i.bigint(), upper: i.bigint() });
|
|
19
|
+
i.union([Xe, Q]);
|
|
20
|
+
i.union([Bt, Q]);
|
|
21
|
+
const Nt = i.union([Oe, Ie]), zt = i.union([Oe, Ie, i.instanceof(String)]), T = (t) => typeof t == "bigint" || t instanceof BigInt, Z = (t, e) => T(t) ? t.valueOf() - BigInt(e.valueOf().valueOf()) : t.valueOf() - Number(e.valueOf()), De = (t, e) => T(t) ? t.valueOf() + BigInt(e.valueOf().valueOf()) : t + Number(e.valueOf()), Ct = (t, e, r = 1e-4) => Math.abs(t - e) < r, le = (t, e) => T(t) ? t === BigInt(e.valueOf().valueOf()) : t === Number(e.valueOf()), At = (t) => {
|
|
22
22
|
const e = 10 ** Math.floor(Math.log10(t));
|
|
23
23
|
return Math.round(t / e) * e;
|
|
24
|
-
},
|
|
24
|
+
}, qe = (t, e) => T(t) ? t.valueOf() < BigInt(e.valueOf()) ? t : BigInt(e.valueOf()) : t.valueOf() < Number(e.valueOf()) ? t : Number(e.valueOf()), Rt = (t, e) => T(t) ? t.valueOf() > BigInt(e.valueOf()) ? t : BigInt(e.valueOf()) : t.valueOf() > Number(e.valueOf()) ? t : Number(e.valueOf()), Ve = (t) => T(t) || t instanceof BigInt ? t.valueOf() < 0n ? -t : t : t.valueOf() < 0 ? -t : t, Lt = (t, e) => T(t) ? t.valueOf() * BigInt(e.valueOf()) : t.valueOf() * Number(e.valueOf()), _t = (t, e) => T(t) ? t.valueOf() / BigInt(e.valueOf()) : t.valueOf() / Number(e.valueOf()), Dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
25
25
|
__proto__: null,
|
|
26
26
|
abs: Ve,
|
|
27
|
-
add:
|
|
28
|
-
closeTo:
|
|
29
|
-
div:
|
|
30
|
-
equal:
|
|
31
|
-
max:
|
|
32
|
-
min:
|
|
33
|
-
mult:
|
|
34
|
-
roundToNearestMagnitude:
|
|
27
|
+
add: De,
|
|
28
|
+
closeTo: Ct,
|
|
29
|
+
div: _t,
|
|
30
|
+
equal: le,
|
|
31
|
+
max: Rt,
|
|
32
|
+
min: qe,
|
|
33
|
+
mult: Lt,
|
|
34
|
+
roundToNearestMagnitude: At,
|
|
35
35
|
sub: Z
|
|
36
36
|
}, Symbol.toStringTag, { value: "Module" })), p = (t, e) => {
|
|
37
37
|
const r = {};
|
|
@@ -40,14 +40,14 @@ const zt = i.union([je, Se]), Ct = i.union([je, Se, i.instanceof(String)]), T =
|
|
|
40
40
|
else if (Array.isArray(t)) {
|
|
41
41
|
if (t.length !== 2) throw new Error("bounds: expected array of length 2");
|
|
42
42
|
[r.lower, r.upper] = t;
|
|
43
|
-
} else return
|
|
44
|
-
return
|
|
45
|
-
},
|
|
43
|
+
} else return pe(t);
|
|
44
|
+
return pe(r);
|
|
45
|
+
}, Pt = Object.freeze({ lower: 0, upper: 0 }), Zt = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), Ht = Object.freeze({ lower: 0, upper: 1 }), Yt = Object.freeze({ lower: -1, upper: 1 }), kt = (t, e) => {
|
|
46
46
|
if (t == null && e == null) return !0;
|
|
47
47
|
if (t == null || e == null) return !1;
|
|
48
48
|
const r = p(t), n = p(e);
|
|
49
49
|
return (r == null ? void 0 : r.lower) === (n == null ? void 0 : n.lower) && (r == null ? void 0 : r.upper) === (n == null ? void 0 : n.upper);
|
|
50
|
-
},
|
|
50
|
+
}, pe = (t) => t.lower > t.upper ? { lower: t.upper, upper: t.lower } : t, Ft = (t, e) => {
|
|
51
51
|
const r = p(t);
|
|
52
52
|
return e < r.lower ? r.lower : e >= r.upper ? r.upper - (typeof r.upper == "number" ? 1 : 1n) : e;
|
|
53
53
|
}, S = (t, e) => {
|
|
@@ -56,49 +56,49 @@ const zt = i.union([je, Se]), Ct = i.union([je, Se, i.instanceof(String)]), T =
|
|
|
56
56
|
return e >= r.lower && e < r.upper;
|
|
57
57
|
const n = p(e);
|
|
58
58
|
return n.lower >= r.lower && n.upper <= r.upper;
|
|
59
|
-
},
|
|
59
|
+
}, Wt = (t, e) => {
|
|
60
60
|
const r = p(t), n = p(e);
|
|
61
61
|
return r.lower === n.lower ? !0 : n.upper === r.lower || n.lower === r.upper ? !1 : S(r, n.upper) || S(r, n.lower) || S(n, r.upper) || S(n, r.lower);
|
|
62
|
-
},
|
|
62
|
+
}, re = (t) => {
|
|
63
63
|
const e = p(t);
|
|
64
64
|
return e.upper - e.lower;
|
|
65
|
-
},
|
|
65
|
+
}, Xt = (t) => {
|
|
66
66
|
const e = p(t);
|
|
67
67
|
return typeof e.lower == "bigint" ? e.lower === 0n && e.upper === 0n : e.lower === 0 && e.upper === 0;
|
|
68
|
-
},
|
|
69
|
-
const e =
|
|
68
|
+
}, Dt = (t) => {
|
|
69
|
+
const e = re(t);
|
|
70
70
|
return typeof e == "number" ? e === 0 : e === 0n;
|
|
71
71
|
}, qt = (t) => {
|
|
72
72
|
const e = p(t);
|
|
73
73
|
return typeof e.lower == "bigint" ? !0 : Number.isFinite(e.lower) && Number.isFinite(e.upper);
|
|
74
|
-
},
|
|
74
|
+
}, Vt = (t) => {
|
|
75
75
|
const e = p(t);
|
|
76
76
|
return (e.upper + e.lower) / 2;
|
|
77
|
-
},
|
|
77
|
+
}, Ut = (t) => ({
|
|
78
78
|
lower: Math.min(...t.map((e) => p(e).lower)),
|
|
79
79
|
upper: Math.max(...t.map((e) => p(e).upper))
|
|
80
|
-
}),
|
|
80
|
+
}), Gt = (t) => ({
|
|
81
81
|
lower: Math.max(...t.map((e) => p(e).lower)),
|
|
82
82
|
upper: Math.min(...t.map((e) => p(e).upper))
|
|
83
|
-
}),
|
|
83
|
+
}), Kt = (t) => {
|
|
84
84
|
const e = p(t), r = typeof e.lower == "bigint";
|
|
85
|
-
return Array.from({ length: Number(
|
|
86
|
-
},
|
|
85
|
+
return Array.from({ length: Number(re(t)) }, (n, o) => r ? e.lower + BigInt(o) : e.lower + o);
|
|
86
|
+
}, he = (t, e) => {
|
|
87
87
|
const r = t.map((s) => p(s)), n = r.findIndex((s) => S(s, e) || e < s.lower);
|
|
88
88
|
if (n === -1) return { index: t.length, position: 0 };
|
|
89
89
|
const o = r[n];
|
|
90
90
|
return S(o, e) ? { index: n, position: Number(e - o.lower) } : { index: n, position: 0 };
|
|
91
|
-
},
|
|
91
|
+
}, ie = {
|
|
92
92
|
removeBefore: 0,
|
|
93
93
|
removeAfter: 0,
|
|
94
94
|
insertInto: 0,
|
|
95
95
|
deleteInBetween: 0
|
|
96
|
-
},
|
|
97
|
-
const r = t.map((
|
|
98
|
-
if (r.length === 0) return
|
|
99
|
-
const o =
|
|
100
|
-
if (o.index === t.length) return { ...
|
|
101
|
-
if (s.index === 0) return { ...
|
|
96
|
+
}, Jt = (t, e) => {
|
|
97
|
+
const r = t.map((l) => p(l)), n = p(e);
|
|
98
|
+
if (r.length === 0) return ie;
|
|
99
|
+
const o = he(r, n.lower), s = he(r, n.upper);
|
|
100
|
+
if (o.index === t.length) return { ...ie, insertInto: t.length };
|
|
101
|
+
if (s.index === 0) return { ...ie, removeAfter: s.position };
|
|
102
102
|
if (o.index === s.index)
|
|
103
103
|
return o.position !== 0 && s.position !== 0 ? null : {
|
|
104
104
|
removeAfter: s.position,
|
|
@@ -106,255 +106,251 @@ const zt = i.union([je, Se]), Ct = i.union([je, Se, i.instanceof(String)]), T =
|
|
|
106
106
|
insertInto: o.index,
|
|
107
107
|
deleteInBetween: 0
|
|
108
108
|
};
|
|
109
|
-
let u = s.index - o.index, a = o.index,
|
|
110
|
-
return o.position !== 0 ? (u -= 1, a += 1) :
|
|
111
|
-
removeBefore:
|
|
109
|
+
let u = s.index - o.index, a = o.index, c = Z(Number(re(r[o.index])), o.position);
|
|
110
|
+
return o.position !== 0 ? (u -= 1, a += 1) : c = 0, {
|
|
111
|
+
removeBefore: c,
|
|
112
112
|
removeAfter: s.position,
|
|
113
113
|
insertInto: a,
|
|
114
114
|
deleteInBetween: u
|
|
115
115
|
};
|
|
116
|
-
},
|
|
116
|
+
}, Qt = (t, e, r) => {
|
|
117
117
|
const n = t.map((a) => p(a)), o = r > 0 ? 1 : r < 0 ? -1 : 0;
|
|
118
118
|
if (o === 0) return e;
|
|
119
119
|
let s = r, u = e;
|
|
120
|
-
for (;
|
|
121
|
-
const a = n.findIndex((
|
|
120
|
+
for (; le(s, 0) === !1; ) {
|
|
121
|
+
const a = n.findIndex((c) => o > 0 ? u >= c.lower && u < c.upper : u > c.lower && u <= c.upper);
|
|
122
122
|
if (a !== -1) {
|
|
123
|
-
const
|
|
124
|
-
let
|
|
125
|
-
if (o > 0 ?
|
|
126
|
-
const h =
|
|
127
|
-
if (u =
|
|
123
|
+
const c = n[a];
|
|
124
|
+
let l;
|
|
125
|
+
if (o > 0 ? l = Z(c.upper, u) : l = Z(u, c.lower), l > 0) {
|
|
126
|
+
const h = qe(Ve(s), l);
|
|
127
|
+
if (u = De(
|
|
128
128
|
u,
|
|
129
129
|
o > 0 ? h : -h
|
|
130
|
-
), s = Z(s, o > 0 ? h : -h),
|
|
130
|
+
), s = Z(s, o > 0 ? h : -h), le(s, 0)) return u;
|
|
131
131
|
continue;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
if (o > 0) {
|
|
135
|
-
const
|
|
136
|
-
if (
|
|
135
|
+
const c = n.filter((l) => l.lower > u);
|
|
136
|
+
if (c.length > 0) u = c[0].lower;
|
|
137
137
|
else return u;
|
|
138
138
|
} else {
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
u =
|
|
139
|
+
const c = n.filter((l) => l.upper < u);
|
|
140
|
+
if (c.length > 0)
|
|
141
|
+
u = c[c.length - 1].upper;
|
|
142
142
|
else return u;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
return u;
|
|
146
|
-
},
|
|
146
|
+
}, er = (t, e, r) => {
|
|
147
147
|
const n = t.map((u) => p(u));
|
|
148
148
|
if (e === r) return typeof e == "bigint" ? 0n : 0;
|
|
149
149
|
const o = e < r ? p([e, r]) : p([r, e]);
|
|
150
150
|
let s = typeof e == "bigint" ? 0n : 0;
|
|
151
151
|
for (const u of n) {
|
|
152
|
-
const a = u.lower > o.lower ? u.lower : o.lower,
|
|
153
|
-
if (a <
|
|
154
|
-
const
|
|
155
|
-
s = s +
|
|
152
|
+
const a = u.lower > o.lower ? u.lower : o.lower, c = u.upper < o.upper ? u.upper : o.upper;
|
|
153
|
+
if (a < c) {
|
|
154
|
+
const l = c - a;
|
|
155
|
+
s = s + l;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
return s;
|
|
159
|
-
},
|
|
159
|
+
}, qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
160
160
|
__proto__: null,
|
|
161
|
-
CLIP:
|
|
162
|
-
DECIMAL:
|
|
163
|
-
INFINITE:
|
|
164
|
-
ZERO:
|
|
165
|
-
bounds:
|
|
166
|
-
buildInsertionPlan:
|
|
167
|
-
clamp:
|
|
161
|
+
CLIP: Yt,
|
|
162
|
+
DECIMAL: Ht,
|
|
163
|
+
INFINITE: Zt,
|
|
164
|
+
ZERO: Pt,
|
|
165
|
+
bounds: Xe,
|
|
166
|
+
buildInsertionPlan: Jt,
|
|
167
|
+
clamp: Ft,
|
|
168
168
|
construct: p,
|
|
169
169
|
contains: S,
|
|
170
|
-
distance:
|
|
171
|
-
equals:
|
|
172
|
-
findInsertPosition:
|
|
170
|
+
distance: er,
|
|
171
|
+
equals: kt,
|
|
172
|
+
findInsertPosition: he,
|
|
173
173
|
isFinite: qt,
|
|
174
|
-
isZero:
|
|
175
|
-
linspace:
|
|
176
|
-
makeValid:
|
|
177
|
-
max:
|
|
178
|
-
mean:
|
|
179
|
-
min:
|
|
180
|
-
overlapsWith:
|
|
181
|
-
span:
|
|
182
|
-
spanIsZero:
|
|
183
|
-
traverse:
|
|
184
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
174
|
+
isZero: Xt,
|
|
175
|
+
linspace: Kt,
|
|
176
|
+
makeValid: pe,
|
|
177
|
+
max: Ut,
|
|
178
|
+
mean: Vt,
|
|
179
|
+
min: Gt,
|
|
180
|
+
overlapsWith: Wt,
|
|
181
|
+
span: re,
|
|
182
|
+
spanIsZero: Dt,
|
|
183
|
+
traverse: Qt
|
|
184
|
+
}, Symbol.toStringTag, { value: "Module" })), Ue = Nt, I = (t) => ve.includes(t) ? t : te.includes(t) ? "y" : "x", tr = (t) => I(t) === "x" ? "y" : "x", rr = (t) => I(t) === "x" ? "width" : "height", nr = (t) => I(t) === "x" ? "left" : "top", or = (t) => Ue.safeParse(t).success, sr = (t) => I(t) === "x" ? "signedWidth" : "signedHeight", ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
185
185
|
__proto__: null,
|
|
186
186
|
construct: I,
|
|
187
|
-
crude:
|
|
188
|
-
dimension:
|
|
189
|
-
direction:
|
|
190
|
-
isDirection:
|
|
191
|
-
location:
|
|
192
|
-
signedDimension:
|
|
193
|
-
swap:
|
|
194
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
187
|
+
crude: Ue,
|
|
188
|
+
dimension: rr,
|
|
189
|
+
direction: Oe,
|
|
190
|
+
isDirection: or,
|
|
191
|
+
location: nr,
|
|
192
|
+
signedDimension: sr,
|
|
193
|
+
swap: tr
|
|
194
|
+
}, Symbol.toStringTag, { value: "Module" })), ur = (t) => {
|
|
195
195
|
const e = t.replace(/_[a-z]/g, (r) => r[1].toUpperCase());
|
|
196
196
|
return e.length > 1 && e[0] === e[0].toUpperCase() && e[1] === e[1].toUpperCase() || e.length === 0 ? e : e[0].toLowerCase() + e.slice(1);
|
|
197
|
-
},
|
|
198
|
-
const e = (r, n =
|
|
197
|
+
}, Ee = (t) => {
|
|
198
|
+
const e = (r, n = ye) => {
|
|
199
199
|
if (typeof r == "string") return t(r);
|
|
200
200
|
if (Array.isArray(r)) return r.map((u) => e(u, n));
|
|
201
|
-
if (!
|
|
202
|
-
n =
|
|
201
|
+
if (!ue(r)) return r;
|
|
202
|
+
n = pr(n);
|
|
203
203
|
const o = {}, s = r;
|
|
204
204
|
return Object.keys(s).forEach((u) => {
|
|
205
205
|
let a = s[u];
|
|
206
|
-
const
|
|
207
|
-
n.recursive && (
|
|
208
|
-
let h =
|
|
209
|
-
return
|
|
210
|
-
}))), o[
|
|
206
|
+
const c = t(u);
|
|
207
|
+
n.recursive && (ue(a) ? He(a, n.keepTypesOnRecursion) || (a = e(a, n)) : n.recursiveInArray && Ze(a) && (a = [...a].map((l) => {
|
|
208
|
+
let h = l;
|
|
209
|
+
return ue(l) ? He(h, n.keepTypesOnRecursion) || (h = e(l, n)) : Ze(l) && (h = e({ key: l }, n).key), h;
|
|
210
|
+
}))), o[c] = a;
|
|
211
211
|
}), o;
|
|
212
212
|
};
|
|
213
213
|
return e;
|
|
214
|
-
},
|
|
214
|
+
}, ar = Ee(ur), cr = (t) => (
|
|
215
215
|
// Don't convert the first character and don't convert a character that is after a
|
|
216
216
|
// non-alphanumeric character
|
|
217
217
|
t.replace(/([a-z0-9])([A-Z])/g, (e, r, n) => `${r}_${n.toLowerCase()}`)
|
|
218
|
-
),
|
|
218
|
+
), lr = Ee(cr), Ge = (t) => t.length === 0 ? t : t[0].toUpperCase() + t.slice(1), ye = {
|
|
219
219
|
recursive: !0,
|
|
220
220
|
recursiveInArray: !0,
|
|
221
221
|
keepTypesOnRecursion: [Number, String, Uint8Array]
|
|
222
|
-
},
|
|
222
|
+
}, pr = (t = ye) => (t.recursive == null ? t = ye : t.recursiveInArray ?? (t.recursiveInArray = !1), t), Ze = (t) => t != null && Array.isArray(t), ue = (t) => t != null && typeof t == "object" && !Array.isArray(t), He = (t, e) => (e || []).some((r) => t instanceof r), hr = (t) => t.replace(/\s+/g, "-").replace(/([a-z0-9])([A-Z])/g, (e, r, n) => `${r}-${n.toLowerCase()}`).toLowerCase(), yr = Ee(hr), Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
223
223
|
__proto__: null,
|
|
224
|
-
|
|
225
|
-
camelToSnake: pr,
|
|
224
|
+
camelToSnake: lr,
|
|
226
225
|
capitalize: Ge,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
snakeToCamel: lr,
|
|
231
|
-
validateOptions: Ke
|
|
232
|
-
}, Symbol.toStringTag, { value: "Module" })), hr = Te, yr = Ie, fr = ce, dr = {
|
|
226
|
+
snakeToCamel: ar,
|
|
227
|
+
toKebab: yr
|
|
228
|
+
}, Symbol.toStringTag, { value: "Module" })), fr = Me, gr = je, dr = ce, br = {
|
|
233
229
|
top: "bottom",
|
|
234
230
|
right: "left",
|
|
235
231
|
bottom: "top",
|
|
236
232
|
left: "right",
|
|
237
233
|
center: "center"
|
|
238
|
-
},
|
|
234
|
+
}, xr = {
|
|
239
235
|
top: "left",
|
|
240
236
|
right: "top",
|
|
241
237
|
bottom: "right",
|
|
242
238
|
left: "bottom",
|
|
243
239
|
center: "center"
|
|
244
|
-
},
|
|
240
|
+
}, mr = zt, O = (t) => t instanceof String || !ve.includes(t) ? t : t === "x" ? "left" : "top", wr = (t) => br[O(t)], $r = (t) => xr[O(t)], Y = (t) => {
|
|
245
241
|
const e = O(t);
|
|
246
242
|
return e === "top" || e === "bottom" ? "y" : "x";
|
|
247
|
-
},
|
|
248
|
-
x:
|
|
249
|
-
y:
|
|
250
|
-
}),
|
|
251
|
-
rt,
|
|
243
|
+
}, vr = i.object({
|
|
244
|
+
x: Me.or(ce),
|
|
245
|
+
y: je.or(ce)
|
|
246
|
+
}), Ke = i.object({ x: Me, y: je }), F = Object.freeze({ x: "left", y: "top" }), Se = Object.freeze({ x: "right", y: "top" }), ne = Object.freeze({ x: "left", y: "bottom" }), Be = Object.freeze({ x: "right", y: "bottom" }), Ne = Object.freeze({ x: "center", y: "center" }), Je = Object.freeze({ x: "center", y: "top" }), Qe = Object.freeze({ x: "center", y: "bottom" }), et = Object.freeze({ x: "right", y: "center" }), tt = Object.freeze({ x: "left", y: "center" }), Or = Object.freeze([
|
|
252
247
|
tt,
|
|
253
|
-
Qe,
|
|
254
248
|
et,
|
|
249
|
+
Je,
|
|
250
|
+
Qe,
|
|
255
251
|
F,
|
|
252
|
+
Se,
|
|
253
|
+
ne,
|
|
256
254
|
Be,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
ze
|
|
260
|
-
]), Ce = (t, e) => t.x === e.x && t.y === e.y, vr = (t, e) => {
|
|
255
|
+
Ne
|
|
256
|
+
]), ze = (t, e) => t.x === e.x && t.y === e.y, Mr = (t, e) => {
|
|
261
257
|
if (typeof e == "object") {
|
|
262
258
|
let r = !0;
|
|
263
259
|
return "x" in e && (t.x === e.x || (r = !1)), "y" in e && (t.y === e.y || (r = !1)), r;
|
|
264
260
|
}
|
|
265
261
|
return t.x === e || t.y === e;
|
|
266
|
-
},
|
|
262
|
+
}, rt = (t) => [t.x, t.y], U = (t) => Y(O(t)) === "x", jr = (t) => Y(O(t)) === "y", Tr = (t) => `${t.x}${Ge(t.y)}`, Ir = (t, e) => {
|
|
267
263
|
let r, n;
|
|
268
264
|
if (typeof t == "object" && "x" in t ? (r = t.x, n = t.y) : (r = O(t), n = O(e ?? t)), Y(r) === Y(n) && r !== "center" && n !== "center")
|
|
269
265
|
throw new Error(
|
|
270
266
|
`[XYLocation] - encountered two locations with the same direction: ${r.toString()} - ${n.toString()}`
|
|
271
267
|
);
|
|
272
|
-
const o = { ...
|
|
273
|
-
return r === "center" ?
|
|
274
|
-
},
|
|
268
|
+
const o = { ...Ne };
|
|
269
|
+
return r === "center" ? U(n) ? [o.x, o.y] = [n, r] : [o.x, o.y] = [r, n] : n === "center" ? U(r) ? [o.x, o.y] = [r, n] : [o.x, o.y] = [n, r] : U(r) ? [o.x, o.y] = [r, n] : [o.x, o.y] = [n, r], o;
|
|
270
|
+
}, nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
275
271
|
__proto__: null,
|
|
276
|
-
BOTTOM_CENTER:
|
|
277
|
-
BOTTOM_LEFT:
|
|
278
|
-
BOTTOM_RIGHT:
|
|
279
|
-
CENTER:
|
|
280
|
-
CENTER_LOCATIONS:
|
|
281
|
-
LEFT_CENTER:
|
|
282
|
-
RIGHT_CENTER:
|
|
283
|
-
TOP_CENTER:
|
|
272
|
+
BOTTOM_CENTER: Qe,
|
|
273
|
+
BOTTOM_LEFT: ne,
|
|
274
|
+
BOTTOM_RIGHT: Be,
|
|
275
|
+
CENTER: Ne,
|
|
276
|
+
CENTER_LOCATIONS: Te,
|
|
277
|
+
LEFT_CENTER: tt,
|
|
278
|
+
RIGHT_CENTER: et,
|
|
279
|
+
TOP_CENTER: Je,
|
|
284
280
|
TOP_LEFT: F,
|
|
285
|
-
TOP_RIGHT:
|
|
286
|
-
XY_LOCATIONS:
|
|
287
|
-
X_LOCATIONS:
|
|
288
|
-
Y_LOCATIONS:
|
|
289
|
-
center:
|
|
281
|
+
TOP_RIGHT: Se,
|
|
282
|
+
XY_LOCATIONS: Or,
|
|
283
|
+
X_LOCATIONS: ee,
|
|
284
|
+
Y_LOCATIONS: te,
|
|
285
|
+
center: dr,
|
|
290
286
|
construct: O,
|
|
291
|
-
constructXY:
|
|
292
|
-
corner:
|
|
293
|
-
crude:
|
|
287
|
+
constructXY: Ir,
|
|
288
|
+
corner: Ke,
|
|
289
|
+
crude: mr,
|
|
294
290
|
direction: Y,
|
|
295
|
-
isX:
|
|
296
|
-
isY:
|
|
297
|
-
location:
|
|
298
|
-
outer:
|
|
299
|
-
rotate90:
|
|
300
|
-
swap:
|
|
301
|
-
x:
|
|
302
|
-
xy:
|
|
303
|
-
xyCouple:
|
|
304
|
-
xyEquals:
|
|
305
|
-
xyMatches:
|
|
306
|
-
xyToString:
|
|
307
|
-
y:
|
|
308
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
291
|
+
isX: U,
|
|
292
|
+
isY: jr,
|
|
293
|
+
location: Ie,
|
|
294
|
+
outer: It,
|
|
295
|
+
rotate90: $r,
|
|
296
|
+
swap: wr,
|
|
297
|
+
x: fr,
|
|
298
|
+
xy: vr,
|
|
299
|
+
xyCouple: rt,
|
|
300
|
+
xyEquals: ze,
|
|
301
|
+
xyMatches: Mr,
|
|
302
|
+
xyToString: Tr,
|
|
303
|
+
y: gr
|
|
304
|
+
}, Symbol.toStringTag, { value: "Module" })), fe = i.union([
|
|
309
305
|
i.number(),
|
|
310
306
|
H,
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
307
|
+
Q,
|
|
308
|
+
$e,
|
|
309
|
+
Ot,
|
|
310
|
+
Fe
|
|
315
311
|
]), f = (t, e) => {
|
|
316
312
|
if (typeof t == "string") {
|
|
317
313
|
if (e === void 0) throw new Error("The y coordinate must be given.");
|
|
318
314
|
return t === "x" ? { x: e, y: 0 } : { x: 0, y: e };
|
|
319
315
|
}
|
|
320
316
|
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 };
|
|
321
|
-
}, x = Object.freeze({ x: 0, y: 0 }),
|
|
317
|
+
}, x = Object.freeze({ x: 0, y: 0 }), ot = Object.freeze({ x: 1, y: 1 }), Er = Object.freeze({ x: 1 / 0, y: 1 / 0 }), Sr = Object.freeze({ x: NaN, y: NaN }), J = (t, e, r = 0) => {
|
|
322
318
|
const n = f(t), o = f(e);
|
|
323
319
|
return r === 0 ? n.x === o.x && n.y === o.y : Math.abs(n.x - o.x) <= r && Math.abs(n.y - o.y) <= r;
|
|
324
|
-
},
|
|
320
|
+
}, Br = (t) => J(t, x), Ce = (t, e, r) => {
|
|
325
321
|
const n = f(t), o = f(e, r);
|
|
326
322
|
return { x: n.x * o.x, y: n.y * o.y };
|
|
327
|
-
},
|
|
323
|
+
}, st = (t, e) => {
|
|
328
324
|
const r = f(t);
|
|
329
325
|
return { x: r.x + e, y: r.y };
|
|
330
|
-
},
|
|
326
|
+
}, it = (t, e) => {
|
|
331
327
|
const r = f(t);
|
|
332
328
|
return { x: r.x, y: r.y + e };
|
|
333
|
-
}, k = (t, e, r, ...n) => typeof e == "string" && typeof r == "number" ? e === "x" ?
|
|
329
|
+
}, k = (t, e, r, ...n) => typeof e == "string" && typeof r == "number" ? e === "x" ? st(t, r) : it(t, r) : [t, e, r ?? x, ...n].reduce((o, s) => {
|
|
334
330
|
const u = f(s);
|
|
335
331
|
return { x: o.x + u.x, y: o.y + u.y };
|
|
336
|
-
}, x),
|
|
332
|
+
}, x), Nr = (t, e, r) => {
|
|
337
333
|
const n = f(t);
|
|
338
334
|
return e === "x" ? { x: r, y: n.y } : { x: n.x, y: r };
|
|
339
|
-
},
|
|
335
|
+
}, zr = (t, e) => {
|
|
340
336
|
const r = f(t), n = f(e);
|
|
341
337
|
return Math.sqrt((r.x - n.x) ** 2 + (r.y - n.y) ** 2);
|
|
342
|
-
},
|
|
338
|
+
}, Cr = (t, e) => {
|
|
343
339
|
const r = f(t), n = f(e);
|
|
344
340
|
return { x: n.x - r.x, y: n.y - r.y };
|
|
345
|
-
},
|
|
341
|
+
}, Ar = (t) => {
|
|
346
342
|
const e = f(t);
|
|
347
343
|
return Number.isNaN(e.x) || Number.isNaN(e.y);
|
|
348
|
-
},
|
|
344
|
+
}, Rr = (t) => {
|
|
349
345
|
const e = f(t);
|
|
350
346
|
return Number.isFinite(e.x) && Number.isFinite(e.y);
|
|
351
|
-
},
|
|
347
|
+
}, Lr = (t) => {
|
|
352
348
|
const e = f(t);
|
|
353
349
|
return [e.x, e.y];
|
|
354
|
-
},
|
|
350
|
+
}, _r = (t) => {
|
|
355
351
|
const e = f(t);
|
|
356
352
|
return { left: e.x, top: e.y };
|
|
357
|
-
},
|
|
353
|
+
}, ge = (t, e = 0) => {
|
|
358
354
|
const r = f(t);
|
|
359
355
|
return { x: Number(r.x.toFixed(e)), y: Number(r.y.toFixed(e)) };
|
|
360
356
|
}, L = (t, e) => {
|
|
@@ -363,78 +359,78 @@ const zt = i.union([je, Se]), Ct = i.union([je, Se, i.instanceof(String)]), T =
|
|
|
363
359
|
}, _ = (t) => {
|
|
364
360
|
const e = f(t), r = Math.hypot(e.x, e.y);
|
|
365
361
|
return r === 0 ? { x: 0, y: 0 } : { x: -e.y / r, y: e.x / r };
|
|
366
|
-
},
|
|
362
|
+
}, ut = (t) => {
|
|
367
363
|
const e = f(t), r = Math.hypot(e.x, e.y);
|
|
368
364
|
return r === 0 ? { x: 0, y: 0 } : { x: e.x / r, y: e.y / r };
|
|
369
|
-
},
|
|
365
|
+
}, at = (...t) => {
|
|
370
366
|
const e = t.reduce((r, n) => k(r, n), x);
|
|
371
|
-
return
|
|
372
|
-
},
|
|
367
|
+
return Ce(e, 1 / t.length);
|
|
368
|
+
}, Pr = (t, e) => {
|
|
373
369
|
const r = [];
|
|
374
370
|
for (let n = 0; n < t.length; n++) {
|
|
375
371
|
const o = t[n];
|
|
376
|
-
let s, u, a,
|
|
372
|
+
let s, u, a, c;
|
|
377
373
|
if (n === 0) {
|
|
378
|
-
const
|
|
379
|
-
u = _(h), a = u,
|
|
374
|
+
const l = t[n + 1], h = L(l, o);
|
|
375
|
+
u = _(h), a = u, c = e;
|
|
380
376
|
} else if (n === t.length - 1) {
|
|
381
|
-
const
|
|
382
|
-
s = _(h), a = s,
|
|
377
|
+
const l = t[n - 1], h = L(o, l);
|
|
378
|
+
s = _(h), a = s, c = e;
|
|
383
379
|
} else {
|
|
384
|
-
const
|
|
380
|
+
const l = t[n - 1], h = t[n + 1], E = L(o, l), R = L(h, o);
|
|
385
381
|
s = _(E), u = _(R);
|
|
386
|
-
const
|
|
382
|
+
const wt = Math.acos(
|
|
387
383
|
(E.x * R.x + E.y * R.y) / (Math.hypot(E.x, E.y) * Math.hypot(R.x, R.y))
|
|
388
|
-
),
|
|
389
|
-
|
|
384
|
+
), Pe = Math.sin(wt / 2);
|
|
385
|
+
Pe === 0 ? c = e : c = e / Pe, a = ut(at(s, u));
|
|
390
386
|
}
|
|
391
|
-
r.push(
|
|
387
|
+
r.push(Ce(a, c));
|
|
392
388
|
}
|
|
393
389
|
return r;
|
|
394
|
-
},
|
|
390
|
+
}, Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
395
391
|
__proto__: null,
|
|
396
|
-
INFINITY:
|
|
397
|
-
NAN:
|
|
398
|
-
ONE:
|
|
392
|
+
INFINITY: Er,
|
|
393
|
+
NAN: Sr,
|
|
394
|
+
ONE: ot,
|
|
399
395
|
ZERO: x,
|
|
400
|
-
average:
|
|
401
|
-
calculateMiters:
|
|
402
|
-
clientXY:
|
|
396
|
+
average: at,
|
|
397
|
+
calculateMiters: Pr,
|
|
398
|
+
clientXY: Fe,
|
|
403
399
|
construct: f,
|
|
404
|
-
couple:
|
|
405
|
-
crudeZ:
|
|
406
|
-
css:
|
|
407
|
-
distance:
|
|
408
|
-
equals:
|
|
409
|
-
isFinite:
|
|
410
|
-
isNan:
|
|
411
|
-
isZero:
|
|
400
|
+
couple: Lr,
|
|
401
|
+
crudeZ: fe,
|
|
402
|
+
css: _r,
|
|
403
|
+
distance: zr,
|
|
404
|
+
equals: J,
|
|
405
|
+
isFinite: Rr,
|
|
406
|
+
isNan: Ar,
|
|
407
|
+
isZero: Br,
|
|
412
408
|
normal: _,
|
|
413
|
-
normalize:
|
|
414
|
-
scale:
|
|
415
|
-
set:
|
|
409
|
+
normalize: ut,
|
|
410
|
+
scale: Ce,
|
|
411
|
+
set: Nr,
|
|
416
412
|
sub: L,
|
|
417
413
|
translate: k,
|
|
418
|
-
translateX:
|
|
419
|
-
translateY:
|
|
420
|
-
translation:
|
|
421
|
-
truncate:
|
|
414
|
+
translateX: st,
|
|
415
|
+
translateY: it,
|
|
416
|
+
translation: Cr,
|
|
417
|
+
truncate: ge,
|
|
422
418
|
xy: H
|
|
423
|
-
}, Symbol.toStringTag, { value: "Module" })), X = i.union([i.number(), i.string()]),
|
|
419
|
+
}, Symbol.toStringTag, { value: "Module" })), X = i.union([i.number(), i.string()]), Zr = i.object({
|
|
424
420
|
top: X,
|
|
425
421
|
left: X,
|
|
426
422
|
width: X,
|
|
427
423
|
height: X
|
|
428
|
-
}),
|
|
424
|
+
}), Hr = i.object({
|
|
429
425
|
left: i.number(),
|
|
430
426
|
top: i.number(),
|
|
431
427
|
right: i.number(),
|
|
432
428
|
bottom: i.number()
|
|
433
|
-
}),
|
|
429
|
+
}), Yr = i.object({
|
|
434
430
|
one: H,
|
|
435
431
|
two: H,
|
|
436
|
-
root:
|
|
437
|
-
}), ct = { one: x, two: x, root: F },
|
|
432
|
+
root: Ke
|
|
433
|
+
}), ct = { one: x, two: x, root: F }, kr = { one: x, two: ot, root: ne }, lt = (t, e) => ({
|
|
438
434
|
one: t.one,
|
|
439
435
|
two: t.two,
|
|
440
436
|
root: e ?? t.root
|
|
@@ -456,7 +452,7 @@ const zt = i.union([je, Se]), Ct = i.union([je, Se, i.instanceof(String)]), T =
|
|
|
456
452
|
x: s.one.x + e.signedWidth,
|
|
457
453
|
y: s.one.y + e.signedHeight
|
|
458
454
|
} : s.two = e, s));
|
|
459
|
-
},
|
|
455
|
+
}, Fr = (t, e, r) => {
|
|
460
456
|
const n = y(t);
|
|
461
457
|
if (typeof e == "string") {
|
|
462
458
|
if (r == null) throw new Error("Invalid arguments for resize");
|
|
@@ -470,63 +466,63 @@ const zt = i.union([je, Se]), Ct = i.union([je, Se, i.instanceof(String)]), T =
|
|
|
470
466
|
);
|
|
471
467
|
}
|
|
472
468
|
return y(n.one, e, void 0, void 0, n.root);
|
|
473
|
-
},
|
|
469
|
+
}, Wr = (t, e, r = !0) => {
|
|
474
470
|
const n = y(t);
|
|
475
471
|
let o = (s, u) => s < u;
|
|
476
472
|
return r && (o = (s, u) => s <= u), "one" in e ? o($(n), $(e)) && o(B(e), B(n)) && o(v(n), v(e)) && o(N(e), N(n)) : o($(n), e.x) && o(e.x, B(n)) && o(v(n), e.y) && o(e.y, N(n));
|
|
477
|
-
},
|
|
473
|
+
}, Xr = (t, e) => J(t.one, e.one) && J(t.two, e.two) && ze(t.root, e.root), pt = (t) => ({
|
|
478
474
|
width: M(t),
|
|
479
475
|
height: j(t)
|
|
480
|
-
}),
|
|
481
|
-
signedWidth:
|
|
482
|
-
signedHeight:
|
|
483
|
-
}),
|
|
476
|
+
}), Dr = (t) => ({
|
|
477
|
+
signedWidth: oe(t),
|
|
478
|
+
signedHeight: se(t)
|
|
479
|
+
}), qr = (t) => ({
|
|
484
480
|
top: v(t),
|
|
485
481
|
left: $(t),
|
|
486
482
|
width: M(t),
|
|
487
483
|
height: j(t)
|
|
488
|
-
}),
|
|
489
|
-
const n = I(e) === "y" ?
|
|
484
|
+
}), Ae = (t, e, r = !1) => {
|
|
485
|
+
const n = I(e) === "y" ? se(t) : oe(t);
|
|
490
486
|
return r ? n : Math.abs(n);
|
|
491
487
|
}, W = (t, e) => {
|
|
492
488
|
const r = y(t);
|
|
493
489
|
return {
|
|
494
|
-
x: e.x === "center" ?
|
|
495
|
-
y: e.y === "center" ?
|
|
490
|
+
x: e.x === "center" ? de(r).x : z(r, e.x),
|
|
491
|
+
y: e.y === "center" ? de(r).y : z(r, e.y)
|
|
496
492
|
};
|
|
497
493
|
}, z = (t, e) => {
|
|
498
|
-
const r = y(t), n =
|
|
499
|
-
return
|
|
500
|
-
},
|
|
494
|
+
const r = y(t), n = rt(r.root).includes(e) ? Math.min : Math.max;
|
|
495
|
+
return ee.includes(e) ? n(r.one.x, r.two.x) : n(r.one.y, r.two.y);
|
|
496
|
+
}, Vr = (t) => t.one.x === t.two.x && t.one.y === t.two.y, M = (t) => Ae(t, "x"), j = (t) => Ae(t, "y"), oe = (t) => {
|
|
501
497
|
const e = y(t);
|
|
502
498
|
return e.two.x - e.one.x;
|
|
503
|
-
},
|
|
499
|
+
}, se = (t) => {
|
|
504
500
|
const e = y(t);
|
|
505
501
|
return e.two.y - e.one.y;
|
|
506
|
-
},
|
|
507
|
-
x:
|
|
508
|
-
y:
|
|
509
|
-
}),
|
|
502
|
+
}, ht = (t) => W(t, F), Ur = (t) => W(t, Se), Gr = (t) => W(t, ne), Kr = (t) => W(t, Be), B = (t) => z(t, "right"), N = (t) => z(t, "bottom"), $ = (t) => z(t, "left"), v = (t) => z(t, "top"), de = (t) => k(ht(t), {
|
|
503
|
+
x: oe(t) / 2,
|
|
504
|
+
y: se(t) / 2
|
|
505
|
+
}), Re = (t) => {
|
|
510
506
|
const e = y(t);
|
|
511
507
|
return e.root.x === "left" ? $(e) : B(e);
|
|
512
|
-
},
|
|
508
|
+
}, Le = (t) => {
|
|
513
509
|
const e = y(t);
|
|
514
510
|
return e.root.y === "top" ? v(e) : N(e);
|
|
515
|
-
},
|
|
511
|
+
}, Jr = (t) => ({ x: Re(t), y: Le(t) }), G = (t) => {
|
|
516
512
|
const e = y(t);
|
|
517
513
|
return { lower: e.one.x, upper: e.two.x };
|
|
518
|
-
},
|
|
514
|
+
}, K = (t) => {
|
|
519
515
|
const e = y(t);
|
|
520
516
|
return { lower: e.one.y, upper: e.two.y };
|
|
521
|
-
},
|
|
522
|
-
const r = y(t), n =
|
|
523
|
-
if (n === null) throw new Error(`Invalid location: ${
|
|
517
|
+
}, Qr = (t, e) => lt(t, e), en = (t, e) => {
|
|
518
|
+
const r = y(t), n = ee.includes(e) ? "x" : te.includes(e) ? "y" : null;
|
|
519
|
+
if (n === null) throw new Error(`Invalid location: ${nt}`);
|
|
524
520
|
const o = e === "top" || e === "left" ? Math.min : Math.max, s = { ...r.one }, u = { ...r.two };
|
|
525
521
|
return s[n] = o(r.one[n], r.two[n]), u[n] = o(r.one[n], r.two[n]), [s, u];
|
|
526
|
-
},
|
|
527
|
-
const r = y(t), n = y(e), o =
|
|
528
|
-
return y({ x: o, y: s },
|
|
529
|
-
},
|
|
522
|
+
}, tn = (t, e) => {
|
|
523
|
+
const r = y(t), n = y(e), o = Re(n) + (M(n) - M(r)) / 2, s = Le(n) + (j(n) - j(r)) / 2;
|
|
524
|
+
return y({ x: o, y: s }, pt(r));
|
|
525
|
+
}, yt = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, rn = (t) => M(t) / j(t), nn = (t, e, r) => {
|
|
530
526
|
if (typeof e == "string") {
|
|
531
527
|
if (r == null) throw new Error("Undefined amount passed into box.translate");
|
|
532
528
|
const o = I(e);
|
|
@@ -540,128 +536,128 @@ const zt = i.union([je, Se]), Ct = i.union([je, Se, i.instanceof(String)]), T =
|
|
|
540
536
|
void 0,
|
|
541
537
|
n.root
|
|
542
538
|
);
|
|
543
|
-
},
|
|
539
|
+
}, on = (t, e) => {
|
|
544
540
|
const r = Math.max($(t), $(e)), n = Math.max(v(t), v(e)), o = Math.min(B(t), B(e)), s = Math.min(N(t), N(e));
|
|
545
541
|
return r > o || n > s ? ct : y({ x: r, y: n }, { x: o, y: s }, void 0, void 0, t.root);
|
|
546
|
-
},
|
|
542
|
+
}, sn = (t) => M(t) * j(t), un = (t, e) => {
|
|
547
543
|
const r = y(t);
|
|
548
544
|
return y(
|
|
549
|
-
|
|
550
|
-
|
|
545
|
+
ge(r.one, e),
|
|
546
|
+
ge(r.two, e),
|
|
551
547
|
void 0,
|
|
552
548
|
void 0,
|
|
553
549
|
r.root
|
|
554
550
|
);
|
|
555
|
-
},
|
|
551
|
+
}, an = (t, e, r, n, o, s) => {
|
|
556
552
|
const u = { x: t, y: e }, a = { x: t + r, y: e + n };
|
|
557
553
|
return o.x !== s.x && (o.x === "center" ? (u.x -= r / 2, a.x -= r / 2) : (u.x -= r, a.x -= r)), o.y !== s.y && (o.y === "center" ? (u.y -= n / 2, a.y -= n / 2) : (u.y -= n, a.y -= n)), y(u, a, void 0, void 0, s);
|
|
558
|
-
},
|
|
554
|
+
}, Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
559
555
|
__proto__: null,
|
|
560
|
-
DECIMAL:
|
|
556
|
+
DECIMAL: kr,
|
|
561
557
|
ZERO: ct,
|
|
562
|
-
area:
|
|
563
|
-
areaIsZero:
|
|
564
|
-
aspect:
|
|
558
|
+
area: sn,
|
|
559
|
+
areaIsZero: Vr,
|
|
560
|
+
aspect: rn,
|
|
565
561
|
bottom: N,
|
|
566
|
-
bottomLeft:
|
|
567
|
-
bottomRight:
|
|
568
|
-
box:
|
|
569
|
-
center:
|
|
562
|
+
bottomLeft: Gr,
|
|
563
|
+
bottomRight: Kr,
|
|
564
|
+
box: Yr,
|
|
565
|
+
center: de,
|
|
570
566
|
construct: y,
|
|
571
|
-
constructWithAlternateRoot:
|
|
572
|
-
contains:
|
|
573
|
-
copy:
|
|
574
|
-
css:
|
|
575
|
-
cssBox:
|
|
576
|
-
dim:
|
|
577
|
-
dims:
|
|
578
|
-
domRect:
|
|
579
|
-
edgePoints:
|
|
580
|
-
equals:
|
|
567
|
+
constructWithAlternateRoot: an,
|
|
568
|
+
contains: Wr,
|
|
569
|
+
copy: lt,
|
|
570
|
+
css: qr,
|
|
571
|
+
cssBox: Zr,
|
|
572
|
+
dim: Ae,
|
|
573
|
+
dims: pt,
|
|
574
|
+
domRect: Hr,
|
|
575
|
+
edgePoints: en,
|
|
576
|
+
equals: Xr,
|
|
581
577
|
height: j,
|
|
582
|
-
intersection:
|
|
583
|
-
isBox:
|
|
578
|
+
intersection: on,
|
|
579
|
+
isBox: yt,
|
|
584
580
|
left: $,
|
|
585
581
|
loc: z,
|
|
586
|
-
positionInCenter:
|
|
587
|
-
reRoot:
|
|
588
|
-
resize:
|
|
582
|
+
positionInCenter: tn,
|
|
583
|
+
reRoot: Qr,
|
|
584
|
+
resize: Fr,
|
|
589
585
|
right: B,
|
|
590
|
-
root:
|
|
591
|
-
signedDims:
|
|
592
|
-
signedHeight:
|
|
593
|
-
signedWidth:
|
|
586
|
+
root: Jr,
|
|
587
|
+
signedDims: Dr,
|
|
588
|
+
signedHeight: se,
|
|
589
|
+
signedWidth: oe,
|
|
594
590
|
top: v,
|
|
595
|
-
topLeft:
|
|
596
|
-
topRight:
|
|
597
|
-
translate:
|
|
598
|
-
truncate:
|
|
591
|
+
topLeft: ht,
|
|
592
|
+
topRight: Ur,
|
|
593
|
+
translate: nn,
|
|
594
|
+
truncate: un,
|
|
599
595
|
width: M,
|
|
600
|
-
x:
|
|
601
|
-
xBounds:
|
|
596
|
+
x: Re,
|
|
597
|
+
xBounds: G,
|
|
602
598
|
xyLoc: W,
|
|
603
|
-
y:
|
|
604
|
-
yBounds:
|
|
605
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
599
|
+
y: Le,
|
|
600
|
+
yBounds: K
|
|
601
|
+
}, Symbol.toStringTag, { value: "Module" })), ft = i.object({ signedWidth: i.number(), signedHeight: i.number() }), cn = i.union([$e, ft, H, Q]), ln = { width: 0, height: 0 }, pn = { width: 1, height: 1 }, d = (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 }, hn = (t, e) => {
|
|
606
602
|
if (e == null) return !1;
|
|
607
|
-
const r =
|
|
603
|
+
const r = d(t), n = d(e);
|
|
608
604
|
return r.width === n.width && r.height === n.height;
|
|
609
|
-
},
|
|
610
|
-
const e =
|
|
605
|
+
}, yn = (t) => {
|
|
606
|
+
const e = d(t);
|
|
611
607
|
return { width: e.height, height: e.width };
|
|
612
|
-
},
|
|
613
|
-
const e =
|
|
608
|
+
}, fn = (t) => {
|
|
609
|
+
const e = d(t);
|
|
614
610
|
return `0 0 ${e.width} ${e.height}`;
|
|
615
|
-
},
|
|
616
|
-
const e =
|
|
611
|
+
}, gn = (t) => {
|
|
612
|
+
const e = d(t);
|
|
617
613
|
return [e.width, e.height];
|
|
618
|
-
},
|
|
619
|
-
width: Math.max(...t.map((e) =>
|
|
620
|
-
height: Math.max(...t.map((e) =>
|
|
621
|
-
}),
|
|
622
|
-
width: Math.min(...t.map((e) =>
|
|
623
|
-
height: Math.min(...t.map((e) =>
|
|
624
|
-
}),
|
|
625
|
-
const r =
|
|
614
|
+
}, dn = (t) => ({
|
|
615
|
+
width: Math.max(...t.map((e) => d(e).width)),
|
|
616
|
+
height: Math.max(...t.map((e) => d(e).height))
|
|
617
|
+
}), bn = (t) => ({
|
|
618
|
+
width: Math.min(...t.map((e) => d(e).width)),
|
|
619
|
+
height: Math.min(...t.map((e) => d(e).height))
|
|
620
|
+
}), xn = (t, e) => {
|
|
621
|
+
const r = d(t);
|
|
626
622
|
return { width: r.width * e, height: r.height * e };
|
|
627
|
-
},
|
|
623
|
+
}, Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
628
624
|
__proto__: null,
|
|
629
|
-
DECIMAL:
|
|
630
|
-
ZERO:
|
|
631
|
-
construct:
|
|
632
|
-
couple:
|
|
633
|
-
crude:
|
|
634
|
-
dimensions:
|
|
635
|
-
equals:
|
|
636
|
-
max:
|
|
637
|
-
min:
|
|
638
|
-
scale:
|
|
639
|
-
signed:
|
|
640
|
-
svgViewBox:
|
|
641
|
-
swap:
|
|
625
|
+
DECIMAL: pn,
|
|
626
|
+
ZERO: ln,
|
|
627
|
+
construct: d,
|
|
628
|
+
couple: gn,
|
|
629
|
+
crude: cn,
|
|
630
|
+
dimensions: $e,
|
|
631
|
+
equals: hn,
|
|
632
|
+
max: dn,
|
|
633
|
+
min: bn,
|
|
634
|
+
scale: xn,
|
|
635
|
+
signed: ft,
|
|
636
|
+
svgViewBox: fn,
|
|
637
|
+
swap: yn
|
|
642
638
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
643
|
-
var
|
|
644
|
-
const
|
|
639
|
+
var mn = Object.defineProperty, wn = (t, e, r) => e in t ? mn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, w = (t, e, r) => wn(t, typeof e != "symbol" ? e + "" : e, r);
|
|
640
|
+
const $n = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r : t, vn = i.object({ offset: fe, scale: fe }), On = i.object({ offset: i.number(), scale: i.number() }), Mn = (t) => (e, r, n, o) => r === "dimension" ? [e, n] : [
|
|
645
641
|
e,
|
|
646
642
|
o ? n - t : n + t
|
|
647
|
-
],
|
|
643
|
+
], jn = (t) => (e, r, n, o) => [
|
|
648
644
|
e,
|
|
649
645
|
o ? n / t : n * t
|
|
650
|
-
],
|
|
646
|
+
], Tn = (t) => (e, r, n) => {
|
|
651
647
|
if (e === null) return [t, n];
|
|
652
|
-
const { lower: o, upper: s } = e, { lower: u, upper: a } = t,
|
|
653
|
-
if (r === "dimension") return [t, n * (
|
|
654
|
-
const h = (n - o) * (
|
|
648
|
+
const { lower: o, upper: s } = e, { lower: u, upper: a } = t, c = s - o, l = a - u;
|
|
649
|
+
if (r === "dimension") return [t, n * (l / c)];
|
|
650
|
+
const h = (n - o) * (l / c) + u;
|
|
655
651
|
return [t, h];
|
|
656
|
-
},
|
|
652
|
+
}, In = (t) => (e, r, n) => [t, n], En = () => (t, e, r) => {
|
|
657
653
|
if (t === null) throw new Error("cannot invert without bounds");
|
|
658
654
|
if (e === "dimension") return [t, r];
|
|
659
655
|
const { lower: n, upper: o } = t;
|
|
660
656
|
return [t, o - (r - n)];
|
|
661
|
-
},
|
|
657
|
+
}, Sn = (t) => (e, r, n) => {
|
|
662
658
|
const { lower: o, upper: s } = t;
|
|
663
|
-
return n =
|
|
664
|
-
},
|
|
659
|
+
return n = $n(n, o, s), [e, n];
|
|
660
|
+
}, be = class P {
|
|
665
661
|
constructor() {
|
|
666
662
|
w(this, "ops", []), w(this, "currBounds", null), w(this, "currType", null), w(this, "reversed", !1), this.ops = [];
|
|
667
663
|
}
|
|
@@ -691,7 +687,7 @@ const mn = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r :
|
|
|
691
687
|
* @param value - The amount to translate by.
|
|
692
688
|
*/
|
|
693
689
|
translate(e) {
|
|
694
|
-
const r = this.new(), n =
|
|
690
|
+
const r = this.new(), n = Mn(e);
|
|
695
691
|
return n.type = "translate", r.ops.push(n), r;
|
|
696
692
|
}
|
|
697
693
|
/**
|
|
@@ -701,23 +697,23 @@ const mn = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r :
|
|
|
701
697
|
* @param value - The amount to magnify by.
|
|
702
698
|
*/
|
|
703
699
|
magnify(e) {
|
|
704
|
-
const r = this.new(), n =
|
|
700
|
+
const r = this.new(), n = jn(e);
|
|
705
701
|
return n.type = "magnify", r.ops.push(n), r;
|
|
706
702
|
}
|
|
707
703
|
scale(e, r) {
|
|
708
|
-
const n = p(e, r), o = this.new(), s =
|
|
704
|
+
const n = p(e, r), o = this.new(), s = Tn(n);
|
|
709
705
|
return s.type = "scale", o.ops.push(s), o;
|
|
710
706
|
}
|
|
711
707
|
clamp(e, r) {
|
|
712
|
-
const n = p(e, r), o = this.new(), s =
|
|
708
|
+
const n = p(e, r), o = this.new(), s = Sn(n);
|
|
713
709
|
return s.type = "clamp", o.ops.push(s), o;
|
|
714
710
|
}
|
|
715
711
|
reBound(e, r) {
|
|
716
|
-
const n = p(e, r), o = this.new(), s =
|
|
712
|
+
const n = p(e, r), o = this.new(), s = In(n);
|
|
717
713
|
return s.type = "re-bound", o.ops.push(s), o;
|
|
718
714
|
}
|
|
719
715
|
invert() {
|
|
720
|
-
const e =
|
|
716
|
+
const e = En();
|
|
721
717
|
e.type = "invert";
|
|
722
718
|
const r = this.new();
|
|
723
719
|
return r.ops.push(e), r;
|
|
@@ -756,10 +752,10 @@ const mn = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r :
|
|
|
756
752
|
return { scale: this.dim(1), offset: this.pos(0) };
|
|
757
753
|
}
|
|
758
754
|
};
|
|
759
|
-
w(
|
|
760
|
-
let
|
|
761
|
-
const
|
|
762
|
-
constructor(e = new
|
|
755
|
+
w(be, "IDENTITY", new be());
|
|
756
|
+
let xe = be;
|
|
757
|
+
const me = class m {
|
|
758
|
+
constructor(e = new xe(), r = new xe(), n = null) {
|
|
763
759
|
w(this, "x"), w(this, "y"), w(this, "currRoot"), this.x = e, this.y = r, this.currRoot = n;
|
|
764
760
|
}
|
|
765
761
|
static translate(e, r) {
|
|
@@ -801,19 +797,19 @@ const $e = class m {
|
|
|
801
797
|
}
|
|
802
798
|
scale(e) {
|
|
803
799
|
const r = this.copy();
|
|
804
|
-
if (
|
|
800
|
+
if (yt(e)) {
|
|
805
801
|
const n = this.currRoot;
|
|
806
|
-
return r.currRoot = e.root, n != null && !
|
|
802
|
+
return r.currRoot = e.root, n != null && !ze(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(G(e)), r.y = r.y.scale(K(e)), r;
|
|
807
803
|
}
|
|
808
804
|
return r.x = r.x.scale(e.width), r.y = r.y.scale(e.height), r;
|
|
809
805
|
}
|
|
810
806
|
reBound(e) {
|
|
811
807
|
const r = this.copy();
|
|
812
|
-
return r.x = this.x.reBound(
|
|
808
|
+
return r.x = this.x.reBound(G(e)), r.y = this.y.reBound(K(e)), r;
|
|
813
809
|
}
|
|
814
810
|
clamp(e) {
|
|
815
811
|
const r = this.copy();
|
|
816
|
-
return r.x = this.x.clamp(
|
|
812
|
+
return r.x = this.x.clamp(G(e)), r.y = this.y.clamp(K(e)), r;
|
|
817
813
|
}
|
|
818
814
|
copy() {
|
|
819
815
|
const e = new m();
|
|
@@ -845,14 +841,14 @@ const $e = class m {
|
|
|
845
841
|
};
|
|
846
842
|
}
|
|
847
843
|
};
|
|
848
|
-
w(
|
|
849
|
-
let
|
|
850
|
-
const
|
|
844
|
+
w(me, "IDENTITY", new me());
|
|
845
|
+
let Bn = me;
|
|
846
|
+
const Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
851
847
|
__proto__: null,
|
|
852
|
-
Scale:
|
|
853
|
-
XY:
|
|
854
|
-
crudeXYTransform:
|
|
855
|
-
transform:
|
|
848
|
+
Scale: xe,
|
|
849
|
+
XY: Bn,
|
|
850
|
+
crudeXYTransform: vn,
|
|
851
|
+
transform: On
|
|
856
852
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
857
853
|
function gt(t) {
|
|
858
854
|
var e, r, n = "";
|
|
@@ -863,16 +859,16 @@ function gt(t) {
|
|
|
863
859
|
} else for (r in t) t[r] && (n && (n += " "), n += r);
|
|
864
860
|
return n;
|
|
865
861
|
}
|
|
866
|
-
function
|
|
862
|
+
function Nn() {
|
|
867
863
|
for (var t, e, r = 0, n = "", o = arguments.length; r < o; r++) (t = arguments[r]) && (e = gt(t)) && (n && (n += " "), n += e);
|
|
868
864
|
return n;
|
|
869
865
|
}
|
|
870
|
-
const
|
|
871
|
-
const e = (...r) =>
|
|
872
|
-
return e.B = (r) => t +
|
|
873
|
-
},
|
|
866
|
+
const zn = Nn, Ye = "-", ke = "__", D = "--", dt = (t) => {
|
|
867
|
+
const e = (...r) => zn(...r);
|
|
868
|
+
return e.B = (r) => t + Ye + r, e.E = (r) => t + ke + r, e.M = (r) => t + D + r, e.BM = (r, n) => e.B(r) + D + n, e.BE = (r, n) => e.B(r) + ke + n, e.BEM = (r, n, o) => e.BE(r, n) + D + o, e.extend = (r) => dt(e.B(r)), e.var = (r) => D + t + Ye + r, e;
|
|
869
|
+
}, Cn = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, we = i.string().regex(Cn), A = i.number().min(0).max(255), An = i.number().min(0).max(1), _e = i.tuple([A, A, A, An]), bt = i.tuple([A, A, A]), xt = i.object({ rgba255: _e }), Qn = (t) => t == null ? void 0 : new g(t).hex, eo = (t) => {
|
|
874
870
|
if (t == null) return;
|
|
875
|
-
const e =
|
|
871
|
+
const e = g.z.safeParse(t);
|
|
876
872
|
if (e.success) return e.data.rgbaCSS;
|
|
877
873
|
if (typeof t == "string") return t;
|
|
878
874
|
throw e.error;
|
|
@@ -920,7 +916,7 @@ const Bn = Sn, He = "-", Ye = "__", D = "--", bt = (t) => {
|
|
|
920
916
|
*/
|
|
921
917
|
get hex() {
|
|
922
918
|
const [e, r, n, o] = this.rgba255;
|
|
923
|
-
return `#${
|
|
919
|
+
return `#${q(e)}${q(r)}${q(n)}${o === 1 ? "" : q(o * 255)}`;
|
|
924
920
|
}
|
|
925
921
|
/**
|
|
926
922
|
* @returns the color as a CSS RGBA string.
|
|
@@ -971,10 +967,10 @@ const Bn = Sn, He = "-", Ye = "__", D = "--", bt = (t) => {
|
|
|
971
967
|
}
|
|
972
968
|
/** @returns true if all RGBA values are 0. */
|
|
973
969
|
get isZero() {
|
|
974
|
-
return this.equals(
|
|
970
|
+
return this.equals(mt);
|
|
975
971
|
}
|
|
976
972
|
get hsla() {
|
|
977
|
-
return
|
|
973
|
+
return Ln(this.rgba255);
|
|
978
974
|
}
|
|
979
975
|
/**
|
|
980
976
|
* Creates a new color with the given alpha.
|
|
@@ -998,6 +994,13 @@ const Bn = Sn, He = "-", Ye = "__", D = "--", bt = (t) => {
|
|
|
998
994
|
);
|
|
999
995
|
return Number((0.2126 * e + 0.7152 * r + 0.0722 * n).toFixed(3));
|
|
1000
996
|
}
|
|
997
|
+
/**
|
|
998
|
+
* @returns the grayness of the color, between 0 and 1.
|
|
999
|
+
*/
|
|
1000
|
+
get grayness() {
|
|
1001
|
+
const [e, r, n] = this.rgb1;
|
|
1002
|
+
return 1 - (Math.max(e, r, n) - Math.min(e, r, n));
|
|
1003
|
+
}
|
|
1001
1004
|
/**
|
|
1002
1005
|
* @returns the contrast ratio between this color and the given color. The contrast
|
|
1003
1006
|
* ratio is a number between 1 and 21, where 1 is the lowest contrast and 21 is the
|
|
@@ -1022,18 +1025,18 @@ const Bn = Sn, He = "-", Ye = "__", D = "--", bt = (t) => {
|
|
|
1022
1025
|
return !this.isDark;
|
|
1023
1026
|
}
|
|
1024
1027
|
static fromHex(e, r = 1) {
|
|
1025
|
-
if (!
|
|
1026
|
-
return e =
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
e.length === 8 ?
|
|
1028
|
+
if (!we.safeParse(e).success) throw new Error(`Invalid hex color: ${e}`);
|
|
1029
|
+
return e = Rn(e), [
|
|
1030
|
+
V(e, 0),
|
|
1031
|
+
V(e, 2),
|
|
1032
|
+
V(e, 4),
|
|
1033
|
+
e.length === 8 ? V(e, 6) / 255 : r
|
|
1031
1034
|
];
|
|
1032
1035
|
}
|
|
1033
1036
|
};
|
|
1034
|
-
C(b, "z", i.union([
|
|
1035
|
-
let
|
|
1036
|
-
const
|
|
1037
|
+
C(b, "z", i.union([we, _e, bt, i.instanceof(b), xt]).transform((e) => new b(e)));
|
|
1038
|
+
let g = b;
|
|
1039
|
+
const mt = new g([0, 0, 0, 0]), q = (t) => Math.floor(t).toString(16).padStart(2, "0"), V = (t, e) => parseInt(t.slice(e, e + 2), 16), Rn = (t) => t.startsWith("#") ? t.slice(1) : t, to = (t) => {
|
|
1037
1040
|
let [e, r, n] = t;
|
|
1038
1041
|
const o = t[3];
|
|
1039
1042
|
e /= 360, r /= 100, n /= 100;
|
|
@@ -1041,60 +1044,60 @@ const wt = new d([0, 0, 0, 0]), V = (t) => Math.floor(t).toString(16).padStart(2
|
|
|
1041
1044
|
if (r === 0)
|
|
1042
1045
|
s = u = a = n;
|
|
1043
1046
|
else {
|
|
1044
|
-
const
|
|
1045
|
-
s =
|
|
1047
|
+
const c = n < 0.5 ? n * (1 + r) : n + r - n * r, l = 2 * n - c;
|
|
1048
|
+
s = ae(l, c, e + 1 / 3), u = ae(l, c, e), a = ae(l, c, e - 1 / 3);
|
|
1046
1049
|
}
|
|
1047
1050
|
return [Math.round(s * 255), Math.round(u * 255), Math.round(a * 255), o];
|
|
1048
|
-
},
|
|
1051
|
+
}, ae = (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), Ln = (t) => {
|
|
1049
1052
|
let [e, r, n] = t;
|
|
1050
1053
|
const o = t[3];
|
|
1051
1054
|
e /= 255, r /= 255, n /= 255, e /= 255, r /= 255, n /= 255;
|
|
1052
1055
|
const s = Math.max(e, r, n), u = Math.min(e, r, n);
|
|
1053
|
-
let a,
|
|
1056
|
+
let a, c, l = (s + u) / 2;
|
|
1054
1057
|
if (s === u)
|
|
1055
|
-
a =
|
|
1058
|
+
a = c = 0;
|
|
1056
1059
|
else {
|
|
1057
1060
|
const h = s - u;
|
|
1058
|
-
|
|
1061
|
+
c = l > 0.5 ? h / (2 - s - u) : h / (s + u), s === e ? a = (r - n) / h + (r < n ? 6 : 0) : s === r ? a = (n - e) / h + 2 : a = (e - r) / h + 4, a /= 6;
|
|
1059
1062
|
}
|
|
1060
|
-
return a *= 360,
|
|
1061
|
-
},
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
i.instanceof(
|
|
1063
|
+
return a *= 360, c *= 100, l *= 100, [Math.round(a), Math.round(c), Math.round(l), o];
|
|
1064
|
+
}, _n = i.union([
|
|
1065
|
+
we,
|
|
1066
|
+
_e,
|
|
1067
|
+
i.instanceof(g),
|
|
1065
1068
|
i.string(),
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
]),
|
|
1069
|
+
bt,
|
|
1070
|
+
xt
|
|
1071
|
+
]), Pn = i.object({
|
|
1069
1072
|
key: i.string(),
|
|
1070
|
-
color:
|
|
1073
|
+
color: _n,
|
|
1071
1074
|
position: i.number(),
|
|
1072
1075
|
switched: i.boolean().optional()
|
|
1073
|
-
}),
|
|
1074
|
-
if (t.length === 0) return
|
|
1075
|
-
if (t = t.slice().sort((r, n) => r.position - n.position), e <= t[0].position) return new
|
|
1076
|
+
}), ro = i.array(Pn), no = (t, e) => {
|
|
1077
|
+
if (t.length === 0) return mt;
|
|
1078
|
+
if (t = t.slice().sort((r, n) => r.position - n.position), e <= t[0].position) return new g(t[0].color);
|
|
1076
1079
|
if (e >= t[t.length - 1].position)
|
|
1077
|
-
return new
|
|
1080
|
+
return new g(t[t.length - 1].color);
|
|
1078
1081
|
for (let r = 0; r < t.length - 1; r++) {
|
|
1079
1082
|
const n = t[r], o = t[r + 1];
|
|
1080
1083
|
if (e >= n.position && e <= o.position) {
|
|
1081
|
-
if (e === n.position) return new
|
|
1082
|
-
if (e === o.position) return new
|
|
1083
|
-
const s = (e - n.position) / (o.position - n.position), u = new
|
|
1084
|
-
return new
|
|
1084
|
+
if (e === n.position) return new g(n.color);
|
|
1085
|
+
if (e === o.position) return new g(o.color);
|
|
1086
|
+
const s = (e - n.position) / (o.position - n.position), u = new g(n.color), a = new g(o.color), c = Math.round(u.r + s * (a.r - u.r)), l = Math.round(u.g + s * (a.g - u.g)), h = Math.round(u.b + s * (a.b - u.b)), E = u.a + s * (a.a - u.a);
|
|
1087
|
+
return new g([c, l, h, E]);
|
|
1085
1088
|
}
|
|
1086
1089
|
}
|
|
1087
|
-
return new
|
|
1088
|
-
},
|
|
1090
|
+
return new g(t[t.length - 1].color);
|
|
1091
|
+
}, Zn = i.object({
|
|
1089
1092
|
key: i.string(),
|
|
1090
1093
|
name: i.string(),
|
|
1091
|
-
color:
|
|
1092
|
-
}),
|
|
1094
|
+
color: g.z
|
|
1095
|
+
}), oo = i.object({
|
|
1093
1096
|
key: i.string(),
|
|
1094
1097
|
name: i.string(),
|
|
1095
|
-
swatches: i.array(
|
|
1098
|
+
swatches: i.array(Zn)
|
|
1096
1099
|
});
|
|
1097
|
-
class
|
|
1100
|
+
class Hn {
|
|
1098
1101
|
constructor(e = "") {
|
|
1099
1102
|
C(this, "rows", []);
|
|
1100
1103
|
C(this, "columns", []);
|
|
@@ -1123,63 +1126,63 @@ class Pn {
|
|
|
1123
1126
|
};
|
|
1124
1127
|
}
|
|
1125
1128
|
}
|
|
1126
|
-
const
|
|
1129
|
+
const Yn = (t, e) => Object.entries(e).forEach(
|
|
1127
1130
|
([r, n]) => n != null && t.style.setProperty(r, `${n}`)
|
|
1128
|
-
),
|
|
1131
|
+
), kn = (t, e) => Array.from(t.style).forEach((r) => {
|
|
1129
1132
|
r.startsWith(e) && t.style.removeProperty(r);
|
|
1130
|
-
}),
|
|
1131
|
-
const e =
|
|
1132
|
-
return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M(
|
|
1133
|
+
}), Fn = (t) => {
|
|
1134
|
+
const e = dt(t);
|
|
1135
|
+
return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M(nt.construct(r)), e.disabled = (r) => r === !0 && e.M("disabled"), e.align = (r) => e.M(r), e.dir = (r) => r != null && e.M(ir.construct(r)), e.size = (r) => typeof r == "string" && e.M(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}`) : 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.noWrap = (r) => r && e.M("no-wrap"), e.applyVars = Yn, e.removeVars = kn, e.newGridBuilder = (r) => new Hn(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) => e.M(`shade-${r}`), e.shadeVar = (r) => {
|
|
1133
1136
|
if (r != null)
|
|
1134
1137
|
return `var(--${t}-gray-l${r})`;
|
|
1135
1138
|
}, e.levelSizeVar = (r) => `var(--${t}-${r}-size)`, e;
|
|
1136
|
-
},
|
|
1139
|
+
}, so = Fn("pluto");
|
|
1137
1140
|
export {
|
|
1138
|
-
|
|
1141
|
+
Or as $,
|
|
1139
1142
|
j as A,
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1143
|
+
ze as B,
|
|
1144
|
+
so as C,
|
|
1145
|
+
Mr as D,
|
|
1146
|
+
Gn as E,
|
|
1144
1147
|
M as F,
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1148
|
+
Un as G,
|
|
1149
|
+
qn as H,
|
|
1150
|
+
sn as I,
|
|
1151
|
+
on as J,
|
|
1152
|
+
nt as K,
|
|
1153
|
+
Nn as L,
|
|
1154
|
+
Lt as M,
|
|
1155
|
+
wr as P,
|
|
1156
|
+
Ft as T,
|
|
1157
|
+
Qt as U,
|
|
1158
|
+
er as V,
|
|
1159
|
+
$n as Y,
|
|
1160
|
+
mt as Z,
|
|
1161
|
+
Kn as _,
|
|
1162
|
+
g as a,
|
|
1163
|
+
eo as b,
|
|
1164
|
+
_n as c,
|
|
1165
|
+
to as d,
|
|
1166
|
+
ir as e,
|
|
1167
|
+
no as f,
|
|
1168
|
+
ro as g,
|
|
1169
|
+
ar as h,
|
|
1167
1170
|
p as i,
|
|
1168
1171
|
S as j,
|
|
1169
1172
|
lr as k,
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1173
|
+
Jn as l,
|
|
1174
|
+
Dn as m,
|
|
1175
|
+
dt as n,
|
|
1176
|
+
Vn as o,
|
|
1177
|
+
oo as p,
|
|
1178
|
+
Ie as q,
|
|
1176
1179
|
I as r,
|
|
1177
|
-
|
|
1178
|
-
|
|
1180
|
+
Pn as s,
|
|
1181
|
+
Qn as t,
|
|
1179
1182
|
y as u,
|
|
1180
1183
|
W as v,
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
+
vr as w,
|
|
1185
|
+
Ne as x,
|
|
1186
|
+
an as y,
|
|
1184
1187
|
F as z
|
|
1185
1188
|
};
|