@inkorange/space-ui 1.11.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Slider.d.ts +10 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +911 -858
- package/dist/index.js.map +1 -1
- package/dist/space-ui.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { forwardRef as ae, createElement as rt, isValidElement as Re, cloneElement as Ye, useId as se, useMemo as _e, Children as _t, useRef as P, useState as Q, useCallback as pe, useLayoutEffect as ye, useEffect as te, createContext as Ee, useContext as
|
|
3
|
-
import { jsx as n, jsxs as
|
|
2
|
+
import { forwardRef as ae, createElement as rt, isValidElement as Re, cloneElement as Ye, useId as se, useMemo as _e, Children as _t, useRef as P, useState as Q, useCallback as pe, useLayoutEffect as ye, useEffect as te, createContext as Ee, useContext as De } from "react";
|
|
3
|
+
import { jsx as n, jsxs as E, Fragment as he } from "react/jsx-runtime";
|
|
4
4
|
const He = {
|
|
5
5
|
0: "0",
|
|
6
6
|
1: "var(--spacing-xs)",
|
|
@@ -10,7 +10,7 @@ const He = {
|
|
|
10
10
|
5: "var(--spacing-lg)",
|
|
11
11
|
6: "var(--spacing-xl)"
|
|
12
12
|
};
|
|
13
|
-
function
|
|
13
|
+
function Ce({ m: e, mt: t, mb: o, p: r, pb: a }, l) {
|
|
14
14
|
const s = {
|
|
15
15
|
...e !== void 0 && { margin: He[e] },
|
|
16
16
|
...t !== void 0 && { marginTop: He[t] },
|
|
@@ -21,7 +21,7 @@ function ve({ m: e, mt: t, mb: o, p: r, pb: a }, l) {
|
|
|
21
21
|
};
|
|
22
22
|
return Object.keys(s).length > 0 ? s : void 0;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function H(...e) {
|
|
25
25
|
return e.filter(Boolean).join(" ");
|
|
26
26
|
}
|
|
27
27
|
const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At = "_size3_rzzow_16", Ot = "_size4_rzzow_21", Bt = "_size5_rzzow_27", Zt = "_size6_rzzow_33", Vt = "_medium_rzzow_39", Wt = "_bold_rzzow_43", Pt = "_colorMuted_rzzow_47", Ft = "_colorDanger_rzzow_51", jt = "_colorSuccess_rzzow_55", Gt = "_colorWarning_rzzow_59", Pe = {
|
|
@@ -38,22 +38,22 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
|
|
|
38
38
|
colorDanger: Ft,
|
|
39
39
|
colorSuccess: jt,
|
|
40
40
|
colorWarning: Gt
|
|
41
|
-
}, Ut = ae(function({ as: t = "span", size: o, weight: r, color: a, className: l, style: s, m: c, mt: h, mb: m, p:
|
|
41
|
+
}, Ut = ae(function({ as: t = "span", size: o, weight: r, color: a, className: l, style: s, m: c, mt: h, mb: m, p: u, pb: C, ...x }, M) {
|
|
42
42
|
return rt(t, {
|
|
43
|
-
|
|
44
|
-
ref:
|
|
45
|
-
className:
|
|
43
|
+
...x,
|
|
44
|
+
ref: M,
|
|
45
|
+
className: H(
|
|
46
46
|
Pe.text,
|
|
47
47
|
o && Pe[`size${o}`],
|
|
48
48
|
r && Pe[r],
|
|
49
49
|
a && Pe[`color${a[0].toUpperCase()}${a.slice(1)}`],
|
|
50
50
|
l
|
|
51
51
|
),
|
|
52
|
-
style:
|
|
52
|
+
style: Ce({ m: c, mt: h, mb: m, p: u, pb: C }, s)
|
|
53
53
|
});
|
|
54
|
-
}),
|
|
55
|
-
heading:
|
|
56
|
-
size4:
|
|
54
|
+
}), Xt = "_heading_15fm0_1", Kt = "_size4_15fm0_7", Yt = "_size5_15fm0_13", Qt = "_size6_15fm0_19", Jt = "_size7_15fm0_25", en = "_size8_15fm0_31", tn = "_size9_15fm0_37", nn = "_colorMuted_15fm0_43", on = "_colorDanger_15fm0_47", rn = "_alignCenter_15fm0_51", Se = {
|
|
55
|
+
heading: Xt,
|
|
56
|
+
size4: Kt,
|
|
57
57
|
size5: Yt,
|
|
58
58
|
size6: Qt,
|
|
59
59
|
size7: Jt,
|
|
@@ -62,11 +62,11 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
|
|
|
62
62
|
colorMuted: nn,
|
|
63
63
|
colorDanger: on,
|
|
64
64
|
alignCenter: rn
|
|
65
|
-
}, sn = ae(function({ as: t = "h2", size: o, color: r, align: a, className: l, style: s, m: c, mt: h, mb: m, p:
|
|
65
|
+
}, sn = ae(function({ as: t = "h2", size: o, color: r, align: a, className: l, style: s, m: c, mt: h, mb: m, p: u, pb: C, ...x }, M) {
|
|
66
66
|
return rt(t, {
|
|
67
|
-
|
|
68
|
-
ref:
|
|
69
|
-
className:
|
|
67
|
+
...x,
|
|
68
|
+
ref: M,
|
|
69
|
+
className: H(
|
|
70
70
|
Se.heading,
|
|
71
71
|
o && Se[`size${o}`],
|
|
72
72
|
r === "muted" && Se.colorMuted,
|
|
@@ -74,25 +74,25 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
|
|
|
74
74
|
a === "center" && Se.alignCenter,
|
|
75
75
|
l
|
|
76
76
|
),
|
|
77
|
-
style:
|
|
77
|
+
style: Ce({ m: c, mt: h, mb: m, p: u, pb: C }, s)
|
|
78
78
|
});
|
|
79
79
|
}), an = "_link_1o4sa_1", ln = "_size1_1o4sa_10", cn = "_size2_1o4sa_16", dn = "_size3_1o4sa_21", lt = {
|
|
80
80
|
link: an,
|
|
81
81
|
size1: ln,
|
|
82
82
|
size2: cn,
|
|
83
83
|
size3: dn
|
|
84
|
-
}, ll = ae(function({ asChild: t, size: o, className: r, style: a, m: l, mt: s, mb: c, p: h, pb: m, children:
|
|
85
|
-
const
|
|
86
|
-
if (t && Re(
|
|
87
|
-
const
|
|
88
|
-
return Ye(
|
|
84
|
+
}, ll = ae(function({ asChild: t, size: o, className: r, style: a, m: l, mt: s, mb: c, p: h, pb: m, children: u, ...C }, x) {
|
|
85
|
+
const M = H(lt.link, o && lt[`size${o}`], r), _ = Ce({ m: l, mt: s, mb: c, p: h, pb: m }, a);
|
|
86
|
+
if (t && Re(u)) {
|
|
87
|
+
const y = u;
|
|
88
|
+
return Ye(y, {
|
|
89
89
|
...C,
|
|
90
|
-
className:
|
|
91
|
-
style: { ...
|
|
90
|
+
className: H(M, y.props.className),
|
|
91
|
+
style: { ..._, ...y.props.style }
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
-
return /* @__PURE__ */ n("a", { ...C, ref:
|
|
95
|
-
}), un = "_flex_v4ziu_1", fn = "_gap1_v4ziu_5", pn = "_gap2_v4ziu_9", _n = "_gap3_v4ziu_13", hn = "_gap4_v4ziu_17", mn = "_gap5_v4ziu_21", gn = "_gap6_v4ziu_25",
|
|
94
|
+
return /* @__PURE__ */ n("a", { ...C, ref: x, className: M, style: _, children: u });
|
|
95
|
+
}), un = "_flex_v4ziu_1", fn = "_gap1_v4ziu_5", pn = "_gap2_v4ziu_9", _n = "_gap3_v4ziu_13", hn = "_gap4_v4ziu_17", mn = "_gap5_v4ziu_21", gn = "_gap6_v4ziu_25", vn = "_directionRow_v4ziu_29", Cn = "_directionColumn_v4ziu_33", bn = "_alignStart_v4ziu_37", wn = "_alignCenter_v4ziu_41", $n = "_alignEnd_v4ziu_45", yn = "_alignBaseline_v4ziu_49", xn = "_alignStretch_v4ziu_53", Nn = "_justifyStart_v4ziu_57", Mn = "_justifyCenter_v4ziu_61", Ln = "_justifyEnd_v4ziu_65", kn = "_justifyBetween_v4ziu_69", zn = "_wrapWrap_v4ziu_73", Rn = "_wrapNowrap_v4ziu_77", xe = {
|
|
96
96
|
flex: un,
|
|
97
97
|
gap1: fn,
|
|
98
98
|
gap2: pn,
|
|
@@ -100,8 +100,8 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
|
|
|
100
100
|
gap4: hn,
|
|
101
101
|
gap5: mn,
|
|
102
102
|
gap6: gn,
|
|
103
|
-
directionRow:
|
|
104
|
-
directionColumn:
|
|
103
|
+
directionRow: vn,
|
|
104
|
+
directionColumn: Cn,
|
|
105
105
|
alignStart: bn,
|
|
106
106
|
alignCenter: wn,
|
|
107
107
|
alignEnd: $n,
|
|
@@ -113,8 +113,8 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
|
|
|
113
113
|
justifyBetween: kn,
|
|
114
114
|
wrapWrap: zn,
|
|
115
115
|
wrapNowrap: Rn
|
|
116
|
-
}, Fe = (e) => e[0].toUpperCase() + e.slice(1), cl = ae(function({ asChild: t, gap: o, direction: r, align: a, justify: l, wrap: s, className: c, style: h, m, mt:
|
|
117
|
-
const
|
|
116
|
+
}, Fe = (e) => e[0].toUpperCase() + e.slice(1), cl = ae(function({ asChild: t, gap: o, direction: r, align: a, justify: l, wrap: s, className: c, style: h, m, mt: u, mb: C, p: x, pb: M, children: _, ...y }, g) {
|
|
117
|
+
const L = H(
|
|
118
118
|
xe.flex,
|
|
119
119
|
o && xe[`gap${o}`],
|
|
120
120
|
r && xe[`direction${Fe(r)}`],
|
|
@@ -122,22 +122,22 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
|
|
|
122
122
|
l && xe[`justify${Fe(l)}`],
|
|
123
123
|
s && xe[`wrap${Fe(s)}`],
|
|
124
124
|
c
|
|
125
|
-
),
|
|
126
|
-
if (t && Re(
|
|
127
|
-
const
|
|
128
|
-
return Ye(
|
|
129
|
-
...
|
|
130
|
-
className:
|
|
131
|
-
style: { ...
|
|
125
|
+
), T = Ce({ m, mt: u, mb: C, p: x, pb: M }, h);
|
|
126
|
+
if (t && Re(_)) {
|
|
127
|
+
const q = _;
|
|
128
|
+
return Ye(q, {
|
|
129
|
+
...y,
|
|
130
|
+
className: H(L, q.props.className),
|
|
131
|
+
style: { ...T, ...q.props.style }
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
return /* @__PURE__ */ n("div", { ...
|
|
134
|
+
return /* @__PURE__ */ n("div", { ...y, ref: g, className: L, style: T, children: _ });
|
|
135
135
|
}), il = ae(function({ style: t, m: o, mt: r, mb: a, p: l, pb: s, ...c }, h) {
|
|
136
|
-
return /* @__PURE__ */ n("div", { ...c, ref: h, style:
|
|
137
|
-
}), En = "_grid_erpqq_1",
|
|
136
|
+
return /* @__PURE__ */ n("div", { ...c, ref: h, style: Ce({ m: o, mt: r, mb: a, p: l, pb: s }, t) });
|
|
137
|
+
}), En = "_grid_erpqq_1", Dn = "_cols1_erpqq_5", In = "_cols2_erpqq_9", Hn = "_cols3_erpqq_13", Sn = "_smCols2_erpqq_18", Tn = "_smCols3_erpqq_21", qn = "_mdCols2_erpqq_26", An = "_mdCols3_erpqq_29", On = "_gap1_erpqq_33", Bn = "_gap2_erpqq_37", Zn = "_gap3_erpqq_41", Vn = "_gap4_erpqq_45", Wn = "_gap5_erpqq_49", Pn = "_gap6_erpqq_53", Ne = {
|
|
138
138
|
grid: En,
|
|
139
|
-
cols1:
|
|
140
|
-
cols2:
|
|
139
|
+
cols1: Dn,
|
|
140
|
+
cols2: In,
|
|
141
141
|
cols3: Hn,
|
|
142
142
|
smCols2: Sn,
|
|
143
143
|
smCols3: Tn,
|
|
@@ -149,8 +149,8 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
|
|
|
149
149
|
gap4: Vn,
|
|
150
150
|
gap5: Wn,
|
|
151
151
|
gap6: Pn
|
|
152
|
-
}, dl = ae(function({ columns: t, gap: o, className: r, style: a, m: l, mt: s, mb: c, p: h, pb: m, ...
|
|
153
|
-
const
|
|
152
|
+
}, dl = ae(function({ columns: t, gap: o, className: r, style: a, m: l, mt: s, mb: c, p: h, pb: m, ...u }, C) {
|
|
153
|
+
const x = typeof t == "string" ? [Ne[`cols${t}`]] : t ? [
|
|
154
154
|
t.initial && Ne[`cols${t.initial}`],
|
|
155
155
|
t.sm && Ne[`smCols${t.sm}`],
|
|
156
156
|
t.md && Ne[`mdCols${t.md}`]
|
|
@@ -158,19 +158,19 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
|
|
|
158
158
|
return /* @__PURE__ */ n(
|
|
159
159
|
"div",
|
|
160
160
|
{
|
|
161
|
-
...
|
|
161
|
+
...u,
|
|
162
162
|
ref: C,
|
|
163
|
-
className:
|
|
164
|
-
style:
|
|
163
|
+
className: H(Ne.grid, ...x, o && Ne[`gap${o}`], r),
|
|
164
|
+
style: Ce({ m: l, mt: s, mb: c, p: h, pb: m }, a)
|
|
165
165
|
}
|
|
166
166
|
);
|
|
167
|
-
}), Fn = "_badge_3q9da_2", jn = "_size1_3q9da_10", Gn = "_size2_3q9da_17", Un = "_colorMuted_3q9da_24",
|
|
167
|
+
}), Fn = "_badge_3q9da_2", jn = "_size1_3q9da_10", Gn = "_size2_3q9da_17", Un = "_colorMuted_3q9da_24", Xn = "_colorPrimary_3q9da_29", Kn = "_colorSuccess_3q9da_34", Yn = "_colorDanger_3q9da_39", Qn = "_colorWarning_3q9da_44", Jn = "_colorCyan_3q9da_49", eo = "_colorPurple_3q9da_54", to = "_colorOrange_3q9da_59", no = "_colorAccent_3q9da_64", oo = "_colorYellow_3q9da_69", ro = "_solid_3q9da_77", so = "_wrap_3q9da_85", Te = {
|
|
168
168
|
badge: Fn,
|
|
169
169
|
size1: jn,
|
|
170
170
|
size2: Gn,
|
|
171
171
|
colorMuted: Un,
|
|
172
|
-
colorPrimary:
|
|
173
|
-
colorSuccess:
|
|
172
|
+
colorPrimary: Xn,
|
|
173
|
+
colorSuccess: Kn,
|
|
174
174
|
colorDanger: Yn,
|
|
175
175
|
colorWarning: Qn,
|
|
176
176
|
colorCyan: Jn,
|
|
@@ -180,13 +180,13 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
|
|
|
180
180
|
colorYellow: oo,
|
|
181
181
|
solid: ro,
|
|
182
182
|
wrap: so
|
|
183
|
-
}, ao = (e) => e[0].toUpperCase() + e.slice(1), ul = ae(function({ color: t = "primary", variant: o = "soft", size: r = "1", wrap: a, className: l, style: s, m: c, mt: h, mb: m, p:
|
|
183
|
+
}, ao = (e) => e[0].toUpperCase() + e.slice(1), ul = ae(function({ color: t = "primary", variant: o = "soft", size: r = "1", wrap: a, className: l, style: s, m: c, mt: h, mb: m, p: u, pb: C, ...x }, M) {
|
|
184
184
|
return /* @__PURE__ */ n(
|
|
185
185
|
"span",
|
|
186
186
|
{
|
|
187
|
-
|
|
188
|
-
ref:
|
|
189
|
-
className:
|
|
187
|
+
...x,
|
|
188
|
+
ref: M,
|
|
189
|
+
className: H(
|
|
190
190
|
Te.badge,
|
|
191
191
|
Te[`color${ao(t)}`],
|
|
192
192
|
o === "solid" && Te.solid,
|
|
@@ -194,7 +194,7 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
|
|
|
194
194
|
a && Te.wrap,
|
|
195
195
|
l
|
|
196
196
|
),
|
|
197
|
-
style:
|
|
197
|
+
style: Ce({ m: c, mt: h, mb: m, p: u, pb: C }, s)
|
|
198
198
|
}
|
|
199
199
|
);
|
|
200
200
|
}), lo = "_separator_vao01_1", co = "_full_vao01_7", ct = {
|
|
@@ -207,35 +207,35 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
|
|
|
207
207
|
...r,
|
|
208
208
|
ref: a,
|
|
209
209
|
role: "separator",
|
|
210
|
-
className:
|
|
210
|
+
className: H(ct.separator, t === "4" && ct.full, o)
|
|
211
211
|
}
|
|
212
212
|
);
|
|
213
213
|
}), io = "_card_4k34c_2", uo = "_image_4k34c_14", fo = "_hasImage_4k34c_41", et = {
|
|
214
214
|
card: io,
|
|
215
215
|
image: uo,
|
|
216
216
|
hasImage: fo
|
|
217
|
-
}, pl = ae(function({ className: t, style: o, image: r, children: a, m: l, mt: s, mb: c, p: h, pb: m, ...
|
|
218
|
-
return /* @__PURE__ */
|
|
217
|
+
}, pl = ae(function({ className: t, style: o, image: r, children: a, m: l, mt: s, mb: c, p: h, pb: m, ...u }, C) {
|
|
218
|
+
return /* @__PURE__ */ E(
|
|
219
219
|
"div",
|
|
220
220
|
{
|
|
221
|
-
...
|
|
221
|
+
...u,
|
|
222
222
|
ref: C,
|
|
223
|
-
className:
|
|
224
|
-
style:
|
|
223
|
+
className: H(et.card, r != null && et.hasImage, t),
|
|
224
|
+
style: Ce({ m: l, mt: s, mb: c, p: h, pb: m }, o),
|
|
225
225
|
children: [
|
|
226
226
|
r != null && /* @__PURE__ */ n("div", { className: et.image, children: r }),
|
|
227
227
|
a
|
|
228
228
|
]
|
|
229
229
|
}
|
|
230
230
|
);
|
|
231
|
-
}), po = "_spaceButton_1ewbr_14", _o = "_rimRotate_1ewbr_1", ho = "_glintSweep_1ewbr_1", mo = "_iconOnly_1ewbr_105", go = "_lg_1ewbr_113",
|
|
231
|
+
}), po = "_spaceButton_1ewbr_14", _o = "_rimRotate_1ewbr_1", ho = "_glintSweep_1ewbr_1", mo = "_iconOnly_1ewbr_105", go = "_lg_1ewbr_113", vo = "_sm_1ewbr_120", Co = "_micro_1ewbr_133", bo = "_stars_1ewbr_150", wo = "_fullWidth_1ewbr_155", $o = "_ember_1ewbr_161", yo = "_label_1ewbr_171", xo = "_star_1ewbr_150", No = "_twinkle_1ewbr_1", ge = {
|
|
232
232
|
spaceButton: po,
|
|
233
233
|
rimRotate: _o,
|
|
234
234
|
glintSweep: ho,
|
|
235
235
|
iconOnly: mo,
|
|
236
236
|
lg: go,
|
|
237
|
-
sm:
|
|
238
|
-
micro:
|
|
237
|
+
sm: vo,
|
|
238
|
+
micro: Co,
|
|
239
239
|
stars: bo,
|
|
240
240
|
fullWidth: wo,
|
|
241
241
|
ember: $o,
|
|
@@ -256,17 +256,17 @@ function Lo(e) {
|
|
|
256
256
|
t ^= e.charCodeAt(o), t = Math.imul(t, 16777619);
|
|
257
257
|
return t >>> 0;
|
|
258
258
|
}
|
|
259
|
-
const
|
|
259
|
+
const Xe = ae(
|
|
260
260
|
function({ iconOnly: t, ember: o, size: r = "md", fullWidth: a, animated: l = !0, className: s, children: c, ...h }, m) {
|
|
261
|
-
const
|
|
262
|
-
const
|
|
261
|
+
const u = se(), C = _e(() => {
|
|
262
|
+
const M = Mo(Lo(u));
|
|
263
263
|
return Array.from({ length: 3 }, () => ({
|
|
264
|
-
top: `${12 +
|
|
265
|
-
left: `${8 +
|
|
266
|
-
animationDelay: `${(
|
|
267
|
-
animationDuration: `${(2.8 +
|
|
264
|
+
top: `${12 + M() * 58}%`,
|
|
265
|
+
left: `${8 + M() * 80}%`,
|
|
266
|
+
animationDelay: `${(M() * 3.2).toFixed(2)}s`,
|
|
267
|
+
animationDuration: `${(2.8 + M() * 1.8).toFixed(2)}s`
|
|
268
268
|
}));
|
|
269
|
-
}, [
|
|
269
|
+
}, [u]), x = [
|
|
270
270
|
ge.spaceButton,
|
|
271
271
|
t ? ge.iconOnly : "",
|
|
272
272
|
o ? ge.ember : "",
|
|
@@ -274,15 +274,15 @@ const Ke = ae(
|
|
|
274
274
|
a ? ge.fullWidth : "",
|
|
275
275
|
s ?? ""
|
|
276
276
|
].filter(Boolean).join(" ");
|
|
277
|
-
return /* @__PURE__ */
|
|
277
|
+
return /* @__PURE__ */ E(
|
|
278
278
|
"button",
|
|
279
279
|
{
|
|
280
280
|
ref: m,
|
|
281
|
-
className:
|
|
281
|
+
className: x,
|
|
282
282
|
"data-animated": l ? void 0 : "false",
|
|
283
283
|
...h,
|
|
284
284
|
children: [
|
|
285
|
-
r !== "micro" && /* @__PURE__ */ n("span", { className: ge.stars, "aria-hidden": !0, children: C.map((
|
|
285
|
+
r !== "micro" && /* @__PURE__ */ n("span", { className: ge.stars, "aria-hidden": !0, children: C.map((M, _) => /* @__PURE__ */ n("i", { className: ge.star, style: M }, _)) }),
|
|
286
286
|
/* @__PURE__ */ n("span", { className: ge.label, children: c })
|
|
287
287
|
]
|
|
288
288
|
}
|
|
@@ -340,7 +340,7 @@ function gl(e) {
|
|
|
340
340
|
}
|
|
341
341
|
) });
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function vl(e) {
|
|
344
344
|
return /* @__PURE__ */ n("svg", { ...J, ...e, children: /* @__PURE__ */ n(
|
|
345
345
|
"path",
|
|
346
346
|
{
|
|
@@ -351,7 +351,7 @@ function Cl(e) {
|
|
|
351
351
|
}
|
|
352
352
|
) });
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function Cl(e) {
|
|
355
355
|
return /* @__PURE__ */ n("svg", { ...J, ...e, children: /* @__PURE__ */ n(
|
|
356
356
|
"path",
|
|
357
357
|
{
|
|
@@ -547,9 +547,9 @@ function Eo(e) {
|
|
|
547
547
|
}
|
|
548
548
|
) });
|
|
549
549
|
}
|
|
550
|
-
const
|
|
551
|
-
root:
|
|
552
|
-
viewport:
|
|
550
|
+
const Do = "_root_tv9ho_12", Io = "_viewport_tv9ho_17", Ho = "_track_tv9ho_21", So = "_slide_tv9ho_66", To = "_arrow_tv9ho_78", qo = "_prev_tv9ho_99", Ao = "_next_tv9ho_104", Oo = "_arrowButton_tv9ho_109", Bo = "_dots_tv9ho_115", Zo = "_dot_tv9ho_115", le = {
|
|
551
|
+
root: Do,
|
|
552
|
+
viewport: Io,
|
|
553
553
|
track: Ho,
|
|
554
554
|
slide: So,
|
|
555
555
|
arrow: To,
|
|
@@ -569,167 +569,167 @@ function El({
|
|
|
569
569
|
"aria-label": s = "Carousel",
|
|
570
570
|
...c
|
|
571
571
|
}) {
|
|
572
|
-
const h = _t.toArray(e), m = h.length,
|
|
573
|
-
}),
|
|
574
|
-
const
|
|
575
|
-
if (!
|
|
576
|
-
const
|
|
577
|
-
if (Math.abs(
|
|
578
|
-
|
|
572
|
+
const h = _t.toArray(e), m = h.length, u = se(), C = P(null), x = o === "page" ? Math.max(1, Math.floor(t)) : 1, M = m <= t ? 1 : o === "page" ? Math.ceil((m - t) / x) + 1 : Math.ceil(m - t) + 1, [_, y] = Q(x), [g, L] = Q(Math.max(1, M)), [T, q] = Q(0), [X, U] = Q(!0), [D, A] = Q(m <= t), F = P([0]), K = P(0), k = P(0), z = P(() => {
|
|
573
|
+
}), B = pe(() => {
|
|
574
|
+
const b = C.current;
|
|
575
|
+
if (!b) return;
|
|
576
|
+
const R = b.scrollLeft, w = Math.max(0, b.scrollWidth - b.clientWidth);
|
|
577
|
+
if (Math.abs(w - K.current) > 1) {
|
|
578
|
+
z.current();
|
|
579
579
|
return;
|
|
580
580
|
}
|
|
581
|
-
const
|
|
582
|
-
let
|
|
583
|
-
|
|
584
|
-
Math.abs(
|
|
585
|
-
}),
|
|
586
|
-
}, []),
|
|
587
|
-
const
|
|
588
|
-
if (!
|
|
589
|
-
const
|
|
590
|
-
if (!
|
|
591
|
-
const
|
|
592
|
-
Math.max(0, Math.min(
|
|
581
|
+
const v = R <= 1, N = R >= k.current - 1;
|
|
582
|
+
let d = 0;
|
|
583
|
+
N ? d = F.current.length - 1 : v || F.current.forEach(($, i) => {
|
|
584
|
+
Math.abs($ - R) <= Math.abs(F.current[d] - R) && (d = i);
|
|
585
|
+
}), q(d), U(v), A(N);
|
|
586
|
+
}, []), j = pe(() => {
|
|
587
|
+
const b = C.current;
|
|
588
|
+
if (!b) return;
|
|
589
|
+
const R = Array.from(b.children);
|
|
590
|
+
if (!R.length) return;
|
|
591
|
+
const w = Math.max(0, b.scrollWidth - b.clientWidth), v = R[0], N = R.length > 1 ? R[1].offsetLeft - v.offsetLeft - v.offsetWidth : 0, d = (b.clientWidth + N) / (v.offsetWidth + N), $ = o === "page" ? Math.max(1, Math.floor(d + 0.01)) : 1, i = R[R.length - 1], f = Math.round(
|
|
592
|
+
Math.max(0, Math.min(w, i.offsetLeft - v.offsetLeft + i.offsetWidth - b.clientWidth))
|
|
593
593
|
), S = [];
|
|
594
|
-
|
|
595
|
-
if (
|
|
596
|
-
const
|
|
597
|
-
S[S.length - 1] !==
|
|
598
|
-
}),
|
|
599
|
-
}, [o,
|
|
594
|
+
R.forEach((O, V) => {
|
|
595
|
+
if (V % $ !== 0) return;
|
|
596
|
+
const G = Math.round(Math.min(O.offsetLeft - v.offsetLeft, f));
|
|
597
|
+
S[S.length - 1] !== G && S.push(G);
|
|
598
|
+
}), f > 0 && S[S.length - 1] < f - 1 && S.push(f), F.current = S, K.current = Math.round(w), k.current = f, y($), L(S.length), B();
|
|
599
|
+
}, [o, B]);
|
|
600
600
|
ye(() => {
|
|
601
|
-
|
|
602
|
-
}, [
|
|
603
|
-
const
|
|
604
|
-
if (!
|
|
605
|
-
const
|
|
606
|
-
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
let
|
|
610
|
-
const
|
|
611
|
-
cancelAnimationFrame(
|
|
601
|
+
z.current = j, j();
|
|
602
|
+
}, [j, m]), te(() => {
|
|
603
|
+
const b = C.current;
|
|
604
|
+
if (!b) return;
|
|
605
|
+
const R = new ResizeObserver(() => j());
|
|
606
|
+
R.observe(b);
|
|
607
|
+
const w = b.firstElementChild;
|
|
608
|
+
w && R.observe(w);
|
|
609
|
+
let v = 0;
|
|
610
|
+
const N = () => {
|
|
611
|
+
cancelAnimationFrame(v), v = requestAnimationFrame(B);
|
|
612
612
|
};
|
|
613
|
-
return
|
|
614
|
-
|
|
613
|
+
return b.addEventListener("scroll", N, { passive: !0 }), () => {
|
|
614
|
+
R.disconnect(), cancelAnimationFrame(v), b.removeEventListener("scroll", N);
|
|
615
615
|
};
|
|
616
|
-
}, [
|
|
617
|
-
const
|
|
618
|
-
if (!
|
|
619
|
-
const
|
|
620
|
-
let
|
|
621
|
-
const
|
|
622
|
-
clearTimeout(
|
|
623
|
-
},
|
|
624
|
-
|
|
625
|
-
}, S = (
|
|
626
|
-
if (
|
|
627
|
-
const ee =
|
|
628
|
-
if (!
|
|
629
|
-
if (Math.abs(ee) <
|
|
630
|
-
|
|
616
|
+
}, [j, B, m]), te(() => {
|
|
617
|
+
const b = C.current;
|
|
618
|
+
if (!b) return;
|
|
619
|
+
const R = 4;
|
|
620
|
+
let w = null, v = 0, N = 0, d = !1, $ = 0;
|
|
621
|
+
const i = () => {
|
|
622
|
+
clearTimeout($), delete b.dataset.settling;
|
|
623
|
+
}, f = (W) => {
|
|
624
|
+
W.pointerType !== "mouse" || W.button !== 0 || b.scrollWidth <= b.clientWidth || (i(), w = W.pointerId, v = W.clientX, N = b.scrollLeft, d = !1);
|
|
625
|
+
}, S = (W) => {
|
|
626
|
+
if (W.pointerId !== w) return;
|
|
627
|
+
const ee = W.clientX - v;
|
|
628
|
+
if (!d) {
|
|
629
|
+
if (Math.abs(ee) < R) return;
|
|
630
|
+
d = !0, b.setPointerCapture(W.pointerId), b.dataset.dragging = "";
|
|
631
631
|
}
|
|
632
|
-
|
|
633
|
-
},
|
|
634
|
-
if (
|
|
635
|
-
delete
|
|
636
|
-
const ee =
|
|
637
|
-
let ie = ne.reduce((me,
|
|
638
|
-
ee >
|
|
632
|
+
b.scrollLeft = N - ee;
|
|
633
|
+
}, O = (W) => {
|
|
634
|
+
if (W.pointerId !== w || (w = null, !d)) return;
|
|
635
|
+
delete b.dataset.dragging;
|
|
636
|
+
const ee = b.scrollLeft, ne = F.current;
|
|
637
|
+
let ie = ne.reduce((me, Ie) => Math.abs(Ie - ee) < Math.abs(me - ee) ? Ie : me, ne[0]);
|
|
638
|
+
ee > N + 1 && ie <= N + 1 ? ie = ne.find((me) => me > N + 1) ?? ie : ee < N - 1 && ie >= N - 1 && (ie = [...ne].reverse().find((me) => me < N - 1) ?? ie), b.dataset.settling = "";
|
|
639
639
|
const Je = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
640
|
-
|
|
641
|
-
},
|
|
642
|
-
|
|
643
|
-
},
|
|
644
|
-
return
|
|
645
|
-
|
|
640
|
+
b.scrollTo({ left: ie, behavior: Je ? "auto" : "smooth" }), b.addEventListener("scrollend", i, { once: !0 }), $ = window.setTimeout(i, 700);
|
|
641
|
+
}, V = (W) => {
|
|
642
|
+
d && (d = !1, W.preventDefault(), W.stopPropagation());
|
|
643
|
+
}, G = (W) => W.preventDefault();
|
|
644
|
+
return b.addEventListener("pointerdown", f), b.addEventListener("pointermove", S), b.addEventListener("pointerup", O), b.addEventListener("pointercancel", O), b.addEventListener("click", V, !0), b.addEventListener("dragstart", G), () => {
|
|
645
|
+
i(), b.removeEventListener("pointerdown", f), b.removeEventListener("pointermove", S), b.removeEventListener("pointerup", O), b.removeEventListener("pointercancel", O), b.removeEventListener("click", V, !0), b.removeEventListener("dragstart", G);
|
|
646
646
|
};
|
|
647
647
|
}, []);
|
|
648
|
-
const
|
|
649
|
-
var
|
|
650
|
-
return (
|
|
651
|
-
},
|
|
652
|
-
const
|
|
653
|
-
if (!
|
|
654
|
-
const
|
|
655
|
-
|
|
656
|
-
},
|
|
657
|
-
return /* @__PURE__ */
|
|
648
|
+
const p = (b) => {
|
|
649
|
+
var R;
|
|
650
|
+
return (R = C.current) == null ? void 0 : R.scrollTo({ left: b });
|
|
651
|
+
}, I = (b) => {
|
|
652
|
+
const R = C.current;
|
|
653
|
+
if (!R) return;
|
|
654
|
+
const w = R.scrollLeft, v = b > 0 ? F.current.find((N) => N > w + 1) : [...F.current].reverse().find((N) => N < w - 1);
|
|
655
|
+
v !== void 0 && p(v);
|
|
656
|
+
}, Z = g > 1;
|
|
657
|
+
return /* @__PURE__ */ E(
|
|
658
658
|
"section",
|
|
659
659
|
{
|
|
660
660
|
...c,
|
|
661
661
|
"aria-roledescription": "carousel",
|
|
662
662
|
"aria-label": s,
|
|
663
|
-
className:
|
|
664
|
-
"data-scrollable":
|
|
663
|
+
className: H(le.root, l),
|
|
664
|
+
"data-scrollable": Z ? "" : void 0,
|
|
665
665
|
children: [
|
|
666
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ E("div", { className: le.viewport, children: [
|
|
667
667
|
/* @__PURE__ */ n(
|
|
668
668
|
"div",
|
|
669
669
|
{
|
|
670
670
|
ref: C,
|
|
671
|
-
id:
|
|
671
|
+
id: u,
|
|
672
672
|
className: le.track,
|
|
673
673
|
tabIndex: 0,
|
|
674
674
|
style: { "--_view-count-default": t },
|
|
675
|
-
children: h.map((
|
|
675
|
+
children: h.map((b, R) => /* @__PURE__ */ n(
|
|
676
676
|
"div",
|
|
677
677
|
{
|
|
678
678
|
className: le.slide,
|
|
679
679
|
role: "group",
|
|
680
680
|
"aria-roledescription": "slide",
|
|
681
|
-
"aria-label": `${
|
|
682
|
-
"data-snap":
|
|
683
|
-
children:
|
|
681
|
+
"aria-label": `${R + 1} of ${m}`,
|
|
682
|
+
"data-snap": R % _ === 0 ? "" : void 0,
|
|
683
|
+
children: b
|
|
684
684
|
},
|
|
685
|
-
|
|
685
|
+
b.key ?? R
|
|
686
686
|
))
|
|
687
687
|
}
|
|
688
688
|
),
|
|
689
|
-
/* @__PURE__ */ n("span", { className:
|
|
690
|
-
|
|
689
|
+
/* @__PURE__ */ n("span", { className: H(le.arrow, le.prev), children: /* @__PURE__ */ n(
|
|
690
|
+
Xe,
|
|
691
691
|
{
|
|
692
692
|
iconOnly: !0,
|
|
693
693
|
className: le.arrowButton,
|
|
694
694
|
animated: a,
|
|
695
695
|
"aria-label": "Previous",
|
|
696
|
-
"aria-controls":
|
|
696
|
+
"aria-controls": u,
|
|
697
697
|
disabled: X,
|
|
698
|
-
onClick: () =>
|
|
698
|
+
onClick: () => I(-1),
|
|
699
699
|
children: /* @__PURE__ */ n(mt, { "aria-hidden": "true" })
|
|
700
700
|
}
|
|
701
701
|
) }),
|
|
702
|
-
/* @__PURE__ */ n("span", { className:
|
|
703
|
-
|
|
702
|
+
/* @__PURE__ */ n("span", { className: H(le.arrow, le.next), children: /* @__PURE__ */ n(
|
|
703
|
+
Xe,
|
|
704
704
|
{
|
|
705
705
|
iconOnly: !0,
|
|
706
706
|
className: le.arrowButton,
|
|
707
707
|
animated: a,
|
|
708
708
|
"aria-label": "Next",
|
|
709
|
-
"aria-controls":
|
|
709
|
+
"aria-controls": u,
|
|
710
710
|
disabled: D,
|
|
711
|
-
onClick: () =>
|
|
711
|
+
onClick: () => I(1),
|
|
712
712
|
children: /* @__PURE__ */ n(ht, { "aria-hidden": "true" })
|
|
713
713
|
}
|
|
714
714
|
) })
|
|
715
715
|
] }),
|
|
716
|
-
r &&
|
|
716
|
+
r && Z && /* @__PURE__ */ n("div", { className: le.dots, children: Array.from({ length: g }, (b, R) => /* @__PURE__ */ n(
|
|
717
717
|
"button",
|
|
718
718
|
{
|
|
719
719
|
type: "button",
|
|
720
720
|
className: le.dot,
|
|
721
|
-
"aria-label": o === "page" ? `Page ${
|
|
722
|
-
"aria-controls":
|
|
723
|
-
"aria-current":
|
|
724
|
-
onClick: () =>
|
|
721
|
+
"aria-label": o === "page" ? `Page ${R + 1} of ${g}` : `Position ${R + 1} of ${g}`,
|
|
722
|
+
"aria-controls": u,
|
|
723
|
+
"aria-current": R === T ? "true" : void 0,
|
|
724
|
+
onClick: () => p(F.current[R] ?? 0)
|
|
725
725
|
},
|
|
726
|
-
|
|
726
|
+
R
|
|
727
727
|
)) })
|
|
728
728
|
]
|
|
729
729
|
}
|
|
730
730
|
);
|
|
731
731
|
}
|
|
732
|
-
const Vo = "_nav_mwel8_6", Wo = "_pages_mwel8_21", Po = "_item_mwel8_30", Fo = "_current_mwel8_48", jo = "_page_mwel8_21", Go = "_gap_mwel8_82", Uo = "_stepText_mwel8_92",
|
|
732
|
+
const Vo = "_nav_mwel8_6", Wo = "_pages_mwel8_21", Po = "_item_mwel8_30", Fo = "_current_mwel8_48", jo = "_page_mwel8_21", Go = "_gap_mwel8_82", Uo = "_stepText_mwel8_92", Xo = "_step_mwel8_92", ce = {
|
|
733
733
|
nav: Vo,
|
|
734
734
|
pages: Wo,
|
|
735
735
|
item: Po,
|
|
@@ -737,9 +737,9 @@ const Vo = "_nav_mwel8_6", Wo = "_pages_mwel8_21", Po = "_item_mwel8_30", Fo = "
|
|
|
737
737
|
page: jo,
|
|
738
738
|
gap: Go,
|
|
739
739
|
stepText: Uo,
|
|
740
|
-
step:
|
|
741
|
-
},
|
|
742
|
-
spaceControl:
|
|
740
|
+
step: Xo
|
|
741
|
+
}, Ko = "_spaceControl_1e9gg_17", Yo = "_spaceSlider_1e9gg_74", Qo = "_spacePanel_1e9gg_111", Jo = "_spaceInput_1e9gg_34", er = "_spaceTextArea_1e9gg_226", tr = {
|
|
742
|
+
spaceControl: Ko,
|
|
743
743
|
spaceSlider: Yo,
|
|
744
744
|
spacePanel: Qo,
|
|
745
745
|
spaceInput: Jo,
|
|
@@ -749,12 +749,12 @@ function nr({ pageSize: e, totalItems: t }) {
|
|
|
749
749
|
return e <= 0 ? 1 : Math.max(1, Math.ceil(t / e));
|
|
750
750
|
}
|
|
751
751
|
function or(e, t, o = 1) {
|
|
752
|
-
const r = (C,
|
|
752
|
+
const r = (C, x) => Array.from({ length: Math.max(0, x - C + 1) }, (M, _) => C + _), a = o * 2 + 5;
|
|
753
753
|
if (t <= a) return r(1, t);
|
|
754
|
-
const l = Math.min(Math.max(e, 1), t), s = Math.max(l - o, 1), c = Math.min(l + o, t), h = s > 3, m = c < t - 2,
|
|
755
|
-
return h ? m ? [1, null, ...r(s, c), null, t] : [1, null, ...r(t -
|
|
754
|
+
const l = Math.min(Math.max(e, 1), t), s = Math.max(l - o, 1), c = Math.min(l + o, t), h = s > 3, m = c < t - 2, u = o * 2 + 3;
|
|
755
|
+
return h ? m ? [1, null, ...r(s, c), null, t] : [1, null, ...r(t - u + 1, t)] : [...r(1, u), null, t];
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function Dl({
|
|
758
758
|
pagination: e,
|
|
759
759
|
onPageClick: t,
|
|
760
760
|
siblings: o = 1,
|
|
@@ -765,15 +765,15 @@ function Il({
|
|
|
765
765
|
}) {
|
|
766
766
|
const c = nr(e);
|
|
767
767
|
if (c <= 1) return null;
|
|
768
|
-
const h = Math.min(Math.max(e.page, 1), c), m = (
|
|
769
|
-
|
|
768
|
+
const h = Math.min(Math.max(e.page, 1), c), m = (u) => {
|
|
769
|
+
u !== h && u >= 1 && u <= c && t(u);
|
|
770
770
|
};
|
|
771
|
-
return /* @__PURE__ */
|
|
772
|
-
/* @__PURE__ */
|
|
771
|
+
return /* @__PURE__ */ E("nav", { ...s, "aria-label": l, className: H(ce.nav, a), children: [
|
|
772
|
+
/* @__PURE__ */ E(
|
|
773
773
|
"button",
|
|
774
774
|
{
|
|
775
775
|
type: "button",
|
|
776
|
-
className:
|
|
776
|
+
className: H(ue.spaceControl, ce.item, ce.step),
|
|
777
777
|
disabled: h <= 1,
|
|
778
778
|
"aria-label": "Previous page",
|
|
779
779
|
onClick: () => m(h - 1),
|
|
@@ -784,7 +784,7 @@ function Il({
|
|
|
784
784
|
}
|
|
785
785
|
),
|
|
786
786
|
/* @__PURE__ */ n("ol", { className: ce.pages, children: or(h, c, o).map(
|
|
787
|
-
(
|
|
787
|
+
(u, C) => u === null ? (
|
|
788
788
|
// Presentational: "ellipsis" read aloud between page numbers tells
|
|
789
789
|
// nobody anything.
|
|
790
790
|
// eslint-disable-next-line react/no-array-index-key
|
|
@@ -793,25 +793,25 @@ function Il({
|
|
|
793
793
|
"button",
|
|
794
794
|
{
|
|
795
795
|
type: "button",
|
|
796
|
-
className:
|
|
796
|
+
className: H(
|
|
797
797
|
ue.spaceControl,
|
|
798
798
|
ce.item,
|
|
799
799
|
ce.page,
|
|
800
|
-
|
|
800
|
+
u === h && ce.current
|
|
801
801
|
),
|
|
802
|
-
"data-animated":
|
|
803
|
-
"aria-label": `Page ${
|
|
804
|
-
"aria-current":
|
|
805
|
-
onClick: () => m(
|
|
806
|
-
children:
|
|
802
|
+
"data-animated": u === h && !r ? "false" : void 0,
|
|
803
|
+
"aria-label": `Page ${u}`,
|
|
804
|
+
"aria-current": u === h ? "page" : void 0,
|
|
805
|
+
onClick: () => m(u),
|
|
806
|
+
children: u
|
|
807
807
|
}
|
|
808
|
-
) },
|
|
808
|
+
) }, u)
|
|
809
809
|
) }),
|
|
810
|
-
/* @__PURE__ */
|
|
810
|
+
/* @__PURE__ */ E(
|
|
811
811
|
"button",
|
|
812
812
|
{
|
|
813
813
|
type: "button",
|
|
814
|
-
className:
|
|
814
|
+
className: H(ue.spaceControl, ce.item, ce.step),
|
|
815
815
|
disabled: h >= c,
|
|
816
816
|
"aria-label": "Next page",
|
|
817
817
|
onClick: () => m(h + 1),
|
|
@@ -836,16 +836,16 @@ const rr = "_wrap_dwcut_5", sr = "_sm_dwcut_30", ar = "_md_dwcut_36", lr = "_lg_
|
|
|
836
836
|
label: ur,
|
|
837
837
|
"sp-loader-reduced-pulse": "_sp-loader-reduced-pulse_dwcut_1"
|
|
838
838
|
};
|
|
839
|
-
function
|
|
840
|
-
return /* @__PURE__ */
|
|
839
|
+
function Il({ size: e = "md", label: t, className: o }) {
|
|
840
|
+
return /* @__PURE__ */ E(
|
|
841
841
|
"div",
|
|
842
842
|
{
|
|
843
|
-
className:
|
|
843
|
+
className: H(Me.wrap, Me[e], o),
|
|
844
844
|
role: "status",
|
|
845
845
|
"aria-live": "polite",
|
|
846
846
|
"aria-label": t ?? "Loading",
|
|
847
847
|
children: [
|
|
848
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ E("span", { className: Me.orbit, children: [
|
|
849
849
|
/* @__PURE__ */ n("span", { className: Me.planet }),
|
|
850
850
|
/* @__PURE__ */ n("span", { className: Me.moon })
|
|
851
851
|
] }),
|
|
@@ -894,51 +894,51 @@ function mr({ triggerRef: e, tooltipId: t, show: o, hide: r, children: a }) {
|
|
|
894
894
|
});
|
|
895
895
|
}
|
|
896
896
|
function gr({ label: e, side: t = "bottom", children: o }) {
|
|
897
|
-
const r = se(), [a, l] = Q(!1), [s, c] = Q(null), h = P(null), m = P(null),
|
|
898
|
-
|
|
899
|
-
},
|
|
900
|
-
if (
|
|
897
|
+
const r = se(), [a, l] = Q(!1), [s, c] = Q(null), h = P(null), m = P(null), u = P(null), C = P(null), x = () => {
|
|
898
|
+
u.current && (clearTimeout(u.current), u.current = null), C.current && (clearTimeout(C.current), C.current = null);
|
|
899
|
+
}, M = (y = !1) => {
|
|
900
|
+
if (x(), y) {
|
|
901
901
|
l(!0);
|
|
902
902
|
return;
|
|
903
903
|
}
|
|
904
|
-
|
|
905
|
-
},
|
|
906
|
-
|
|
904
|
+
u.current = setTimeout(() => l(!0), _r);
|
|
905
|
+
}, _ = () => {
|
|
906
|
+
x(), C.current = setTimeout(() => l(!1), hr);
|
|
907
907
|
};
|
|
908
|
-
return te(() =>
|
|
909
|
-
const
|
|
910
|
-
if (!
|
|
908
|
+
return te(() => x, []), ye(() => {
|
|
909
|
+
const y = m.current;
|
|
910
|
+
if (!y) return;
|
|
911
911
|
if (!a) {
|
|
912
|
-
|
|
912
|
+
y.matches(":popover-open") && y.hidePopover();
|
|
913
913
|
return;
|
|
914
914
|
}
|
|
915
915
|
const g = h.current;
|
|
916
916
|
if (!g) return;
|
|
917
|
-
const
|
|
918
|
-
const
|
|
919
|
-
Math.max(
|
|
920
|
-
Math.max(
|
|
921
|
-
), D = (
|
|
922
|
-
fitsNear:
|
|
923
|
-
fitsFar:
|
|
917
|
+
const L = () => {
|
|
918
|
+
const T = g.getBoundingClientRect(), q = y.offsetWidth, X = y.offsetHeight, U = (B, j, p, I) => Math.min(
|
|
919
|
+
Math.max(B + j / 2 - p / 2, qe),
|
|
920
|
+
Math.max(I - p - qe, qe)
|
|
921
|
+
), D = (B, j, p, I) => ({
|
|
922
|
+
fitsNear: B >= qe,
|
|
923
|
+
fitsFar: j + p <= I - qe
|
|
924
924
|
});
|
|
925
925
|
if (t === "left" || t === "right") {
|
|
926
|
-
const
|
|
927
|
-
|
|
926
|
+
const B = T.right + je, j = T.left - q - je, { fitsNear: p, fitsFar: I } = D(j, B, q, window.innerWidth), Z = t === "right" ? I || !p ? B : j : p || !I ? j : B;
|
|
927
|
+
y.dataset.side = Z === B ? "right" : "left", c({ top: U(T.top, T.height, X, window.innerHeight), left: Z });
|
|
928
928
|
return;
|
|
929
929
|
}
|
|
930
|
-
const
|
|
931
|
-
|
|
930
|
+
const A = T.bottom + je, F = T.top - X - je, { fitsNear: K, fitsFar: k } = D(F, A, X, window.innerHeight), z = t === "bottom" ? k || !K ? A : F : K || !k ? F : A;
|
|
931
|
+
y.dataset.side = z === A ? "bottom" : "top", c({ top: z, left: U(T.left, T.width, q, window.innerWidth) });
|
|
932
932
|
};
|
|
933
|
-
|
|
934
|
-
}, [a, t, e]), !e || !Re(o) ? /* @__PURE__ */ n(he, { children: o }) : /* @__PURE__ */
|
|
933
|
+
y.matches(":popover-open") ? L() : Qe(y, L);
|
|
934
|
+
}, [a, t, e]), !e || !Re(o) ? /* @__PURE__ */ n(he, { children: o }) : /* @__PURE__ */ E(he, { children: [
|
|
935
935
|
/* @__PURE__ */ n(
|
|
936
936
|
mr,
|
|
937
937
|
{
|
|
938
938
|
triggerRef: h,
|
|
939
939
|
tooltipId: r,
|
|
940
|
-
show:
|
|
941
|
-
hide:
|
|
940
|
+
show: M,
|
|
941
|
+
hide: _,
|
|
942
942
|
children: o
|
|
943
943
|
}
|
|
944
944
|
),
|
|
@@ -951,17 +951,17 @@ function gr({ label: e, side: t = "bottom", children: o }) {
|
|
|
951
951
|
role: "tooltip",
|
|
952
952
|
className: pr.content,
|
|
953
953
|
style: s ? { top: s.top, left: s.left } : void 0,
|
|
954
|
-
onToggle: (
|
|
955
|
-
|
|
954
|
+
onToggle: (y) => {
|
|
955
|
+
y.nativeEvent.newState === "closed" && a && l(!1);
|
|
956
956
|
},
|
|
957
957
|
children: e
|
|
958
958
|
}
|
|
959
959
|
)
|
|
960
960
|
] });
|
|
961
961
|
}
|
|
962
|
-
const
|
|
963
|
-
group:
|
|
964
|
-
segment:
|
|
962
|
+
const vr = "_group_14c05_4", Cr = "_segment_14c05_15", br = "_active_14c05_35", wr = "_vertical_14c05_46", Ge = {
|
|
963
|
+
group: vr,
|
|
964
|
+
segment: Cr,
|
|
965
965
|
active: br,
|
|
966
966
|
vertical: wr
|
|
967
967
|
};
|
|
@@ -1000,7 +1000,7 @@ function Hl({
|
|
|
1000
1000
|
}
|
|
1001
1001
|
);
|
|
1002
1002
|
}
|
|
1003
|
-
const $r = "_root_10w57_2", yr = "_trigger_10w57_7", xr = "_labelWrap_10w57_30", Nr = "_sizer_10w57_8", Mr = "_triggerLabel_10w57_70", Lr = "_chevron_10w57_77", kr = "_listbox_10w57_82", zr = "_item_10w57_178",
|
|
1003
|
+
const $r = "_root_10w57_2", yr = "_trigger_10w57_7", xr = "_labelWrap_10w57_30", Nr = "_sizer_10w57_8", Mr = "_triggerLabel_10w57_70", Lr = "_chevron_10w57_77", kr = "_listbox_10w57_82", zr = "_item_10w57_178", ve = {
|
|
1004
1004
|
root: $r,
|
|
1005
1005
|
trigger: yr,
|
|
1006
1006
|
labelWrap: xr,
|
|
@@ -1010,21 +1010,21 @@ const $r = "_root_10w57_2", yr = "_trigger_10w57_7", xr = "_labelWrap_10w57_30",
|
|
|
1010
1010
|
listbox: kr,
|
|
1011
1011
|
item: zr
|
|
1012
1012
|
}, gt = Ee(null), Rr = () => {
|
|
1013
|
-
const e =
|
|
1013
|
+
const e = De(gt);
|
|
1014
1014
|
if (!e) throw new Error("Select.Item must be inside a Select");
|
|
1015
1015
|
return e;
|
|
1016
|
-
},
|
|
1016
|
+
}, vt = (e, t) => `${e}-${encodeURIComponent(t)}`, Ae = 4, Le = 8;
|
|
1017
1017
|
function Er(e) {
|
|
1018
1018
|
const t = [], o = (r) => {
|
|
1019
1019
|
_t.forEach(r, (a) => {
|
|
1020
1020
|
if (!Re(a)) return;
|
|
1021
1021
|
const l = a.props;
|
|
1022
|
-
a.type ===
|
|
1022
|
+
a.type === Ct && typeof l.value == "string" ? t.push({ value: l.value, label: l.children, disabled: l.disabled }) : l.children && o(l.children);
|
|
1023
1023
|
});
|
|
1024
1024
|
};
|
|
1025
1025
|
return o(e), t;
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function Dr({
|
|
1028
1028
|
value: e,
|
|
1029
1029
|
onValueChange: t,
|
|
1030
1030
|
disabled: o,
|
|
@@ -1034,58 +1034,58 @@ function Ir({
|
|
|
1034
1034
|
children: s,
|
|
1035
1035
|
...c
|
|
1036
1036
|
}) {
|
|
1037
|
-
const [h, m] = Q(!1), [
|
|
1038
|
-
(
|
|
1039
|
-
var
|
|
1040
|
-
return ((
|
|
1037
|
+
const [h, m] = Q(!1), [u, C] = Q(null), x = se(), M = P(null), _ = P(null), y = P(null), [g, L] = Q(null), [T, q] = Q(null), [X, U] = Q(null), D = _e(() => Er(s), [s]), A = _e(() => D.filter((p) => !p.disabled).map((p) => p.value), [D]), F = _e(() => D.map((p) => p.label), [D]), K = pe(
|
|
1038
|
+
(p) => {
|
|
1039
|
+
var I;
|
|
1040
|
+
return ((I = D.find((Z) => Z.value === p)) == null ? void 0 : I.label) ?? null;
|
|
1041
1041
|
},
|
|
1042
1042
|
[D]
|
|
1043
1043
|
);
|
|
1044
1044
|
te(() => {
|
|
1045
1045
|
if (!h) return;
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1046
|
+
const p = (I) => {
|
|
1047
|
+
_.current && !_.current.contains(I.target) && m(!1);
|
|
1048
1048
|
};
|
|
1049
|
-
return document.addEventListener("mousedown",
|
|
1049
|
+
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
1050
1050
|
}, [h]);
|
|
1051
|
-
const
|
|
1052
|
-
const
|
|
1053
|
-
if (!
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1056
|
-
const
|
|
1057
|
-
|
|
1058
|
-
const
|
|
1059
|
-
Math.max(
|
|
1060
|
-
Math.max(window.innerWidth -
|
|
1051
|
+
const k = pe(() => {
|
|
1052
|
+
const p = M.current, I = y.current;
|
|
1053
|
+
if (!p || !I) return;
|
|
1054
|
+
const Z = p.getBoundingClientRect();
|
|
1055
|
+
L(p.offsetWidth);
|
|
1056
|
+
const b = window.innerHeight - Z.bottom - Le, R = Z.top - Le, w = b < Math.min(I.offsetHeight + Ae, 200) && R > b, v = Math.max(120, Math.min(380, w ? R - Ae : b - Ae));
|
|
1057
|
+
q(v), I.dataset.side = w ? "top" : "bottom";
|
|
1058
|
+
const N = Math.min(I.offsetHeight, v), d = w ? Math.max(Le, Z.top - Ae - N) : Z.bottom + Ae, $ = Math.min(
|
|
1059
|
+
Math.max(Z.left, Le),
|
|
1060
|
+
Math.max(window.innerWidth - I.offsetWidth - Le, Le)
|
|
1061
1061
|
);
|
|
1062
|
-
|
|
1062
|
+
U((i) => i && i.top === d && i.left === $ ? i : { top: d, left: $ });
|
|
1063
1063
|
}, []);
|
|
1064
1064
|
ye(() => {
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1067
|
-
}, [h,
|
|
1065
|
+
const p = y.current;
|
|
1066
|
+
p && (h ? (Qe(p, k), k()) : p.matches(":popover-open") && p.hidePopover());
|
|
1067
|
+
}, [h, k]), te(() => {
|
|
1068
1068
|
if (!h) return;
|
|
1069
|
-
let
|
|
1070
|
-
const
|
|
1071
|
-
const
|
|
1072
|
-
if (
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1069
|
+
let p = 0, I = "";
|
|
1070
|
+
const Z = () => {
|
|
1071
|
+
const b = M.current;
|
|
1072
|
+
if (b) {
|
|
1073
|
+
const R = b.getBoundingClientRect(), w = `${R.top}|${R.left}|${R.width}|${window.innerWidth}|${window.innerHeight}`;
|
|
1074
|
+
w !== I && (I = w, k());
|
|
1075
1075
|
}
|
|
1076
|
-
|
|
1076
|
+
p = requestAnimationFrame(Z);
|
|
1077
1077
|
};
|
|
1078
|
-
return
|
|
1079
|
-
}, [h,
|
|
1080
|
-
var
|
|
1081
|
-
h && ((
|
|
1078
|
+
return p = requestAnimationFrame(Z), () => cancelAnimationFrame(p);
|
|
1079
|
+
}, [h, k]), te(() => {
|
|
1080
|
+
var p;
|
|
1081
|
+
h && ((p = y.current) == null || p.focus());
|
|
1082
1082
|
}, [h]);
|
|
1083
|
-
const
|
|
1084
|
-
C(
|
|
1085
|
-
},
|
|
1086
|
-
const
|
|
1087
|
-
C(
|
|
1088
|
-
},
|
|
1083
|
+
const z = (p) => {
|
|
1084
|
+
C(p ?? A[0] ?? null), m(!0);
|
|
1085
|
+
}, B = (p) => {
|
|
1086
|
+
const I = u ? A.indexOf(u) : -1, Z = Math.min(Math.max(I + p, 0), A.length - 1);
|
|
1087
|
+
C(A[Z] ?? null);
|
|
1088
|
+
}, j = e ? K(e) : null;
|
|
1089
1089
|
return /* @__PURE__ */ n(
|
|
1090
1090
|
gt.Provider,
|
|
1091
1091
|
{
|
|
@@ -1095,66 +1095,66 @@ function Ir({
|
|
|
1095
1095
|
disabled: o,
|
|
1096
1096
|
open: h,
|
|
1097
1097
|
setOpen: m,
|
|
1098
|
-
highlighted:
|
|
1098
|
+
highlighted: u,
|
|
1099
1099
|
setHighlighted: C,
|
|
1100
|
-
listboxId:
|
|
1101
|
-
values:
|
|
1100
|
+
listboxId: x,
|
|
1101
|
+
values: A,
|
|
1102
1102
|
labelFor: K,
|
|
1103
|
-
triggerRef:
|
|
1103
|
+
triggerRef: M
|
|
1104
1104
|
},
|
|
1105
|
-
children: /* @__PURE__ */
|
|
1106
|
-
/* @__PURE__ */
|
|
1105
|
+
children: /* @__PURE__ */ E("div", { ref: _, className: ve.root, children: [
|
|
1106
|
+
/* @__PURE__ */ E(
|
|
1107
1107
|
"button",
|
|
1108
1108
|
{
|
|
1109
1109
|
type: "button",
|
|
1110
1110
|
...c,
|
|
1111
|
-
ref:
|
|
1111
|
+
ref: M,
|
|
1112
1112
|
disabled: o,
|
|
1113
|
-
className:
|
|
1113
|
+
className: H(ve.trigger, ue.spaceControl, "spSelectTrigger", l),
|
|
1114
1114
|
"data-animated": a ? void 0 : "false",
|
|
1115
1115
|
"data-state": h ? "open" : "closed",
|
|
1116
1116
|
"aria-haspopup": "listbox",
|
|
1117
1117
|
"aria-expanded": h,
|
|
1118
|
-
"aria-controls":
|
|
1119
|
-
onClick: () => h ? m(!1) :
|
|
1120
|
-
onKeyDown: (
|
|
1121
|
-
(
|
|
1118
|
+
"aria-controls": x,
|
|
1119
|
+
onClick: () => h ? m(!1) : z(e || null),
|
|
1120
|
+
onKeyDown: (p) => {
|
|
1121
|
+
(p.key === "ArrowDown" || p.key === "Enter" || p.key === " ") && (p.preventDefault(), z(e || null));
|
|
1122
1122
|
},
|
|
1123
1123
|
children: [
|
|
1124
|
-
/* @__PURE__ */
|
|
1125
|
-
/* @__PURE__ */
|
|
1126
|
-
|
|
1124
|
+
/* @__PURE__ */ E("span", { className: ve.labelWrap, children: [
|
|
1125
|
+
/* @__PURE__ */ E("span", { className: ve.sizer, "data-sizer": "", "aria-hidden": "true", children: [
|
|
1126
|
+
F.map((p, I) => (
|
|
1127
1127
|
// eslint-disable-next-line react/no-array-index-key
|
|
1128
|
-
/* @__PURE__ */ n("span", { children:
|
|
1128
|
+
/* @__PURE__ */ n("span", { children: p }, I)
|
|
1129
1129
|
)),
|
|
1130
1130
|
r && /* @__PURE__ */ n("span", { children: r })
|
|
1131
1131
|
] }),
|
|
1132
|
-
/* @__PURE__ */ n("span", { className:
|
|
1132
|
+
/* @__PURE__ */ n("span", { className: ve.triggerLabel, children: j ?? r ?? "" })
|
|
1133
1133
|
] }),
|
|
1134
|
-
/* @__PURE__ */ n("svg", { className:
|
|
1134
|
+
/* @__PURE__ */ n("svg", { className: ve.chevron, width: "9", height: "9", viewBox: "0 0 9 9", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M0.5 3 L4.5 7 L8.5 3", fill: "none", stroke: "currentColor", strokeWidth: "1.2" }) })
|
|
1135
1135
|
]
|
|
1136
1136
|
}
|
|
1137
1137
|
),
|
|
1138
1138
|
/* @__PURE__ */ n(
|
|
1139
1139
|
"div",
|
|
1140
1140
|
{
|
|
1141
|
-
ref:
|
|
1142
|
-
id:
|
|
1141
|
+
ref: y,
|
|
1142
|
+
id: x,
|
|
1143
1143
|
role: "listbox",
|
|
1144
1144
|
tabIndex: -1,
|
|
1145
1145
|
popover: "manual",
|
|
1146
1146
|
"data-side": "bottom",
|
|
1147
|
-
"aria-activedescendant":
|
|
1148
|
-
className:
|
|
1147
|
+
"aria-activedescendant": u ? vt(x, u) : void 0,
|
|
1148
|
+
className: H(ve.listbox, ue.spacePanel),
|
|
1149
1149
|
"data-animated": a ? void 0 : "false",
|
|
1150
1150
|
style: {
|
|
1151
1151
|
...g != null ? { "--_select-trigger-width": `${g}px` } : {},
|
|
1152
|
-
...
|
|
1152
|
+
...T != null ? { maxHeight: `${T}px` } : {},
|
|
1153
1153
|
...X ? { top: X.top, left: X.left } : {}
|
|
1154
1154
|
},
|
|
1155
|
-
onKeyDown: (
|
|
1156
|
-
var
|
|
1157
|
-
|
|
1155
|
+
onKeyDown: (p) => {
|
|
1156
|
+
var I, Z;
|
|
1157
|
+
p.key === "Escape" ? (p.stopPropagation(), m(!1), (I = M.current) == null || I.focus()) : p.key === "ArrowDown" ? (p.preventDefault(), B(1)) : p.key === "ArrowUp" ? (p.preventDefault(), B(-1)) : p.key === "Home" ? (p.preventDefault(), C(A[0] ?? null)) : p.key === "End" ? (p.preventDefault(), C(A[A.length - 1] ?? null)) : p.key === "Enter" || p.key === " " ? (p.preventDefault(), u && (t(u), m(!1), (Z = M.current) == null || Z.focus())) : p.key === "Tab" && m(!1);
|
|
1158
1158
|
},
|
|
1159
1159
|
children: s
|
|
1160
1160
|
}
|
|
@@ -1163,17 +1163,17 @@ function Ir({
|
|
|
1163
1163
|
}
|
|
1164
1164
|
);
|
|
1165
1165
|
}
|
|
1166
|
-
function
|
|
1166
|
+
function Ct({ value: e, disabled: t, children: o }) {
|
|
1167
1167
|
const r = Rr(), a = r.value === e, l = r.highlighted === e;
|
|
1168
1168
|
return /* @__PURE__ */ n(
|
|
1169
1169
|
"div",
|
|
1170
1170
|
{
|
|
1171
|
-
id:
|
|
1171
|
+
id: vt(r.listboxId, e),
|
|
1172
1172
|
role: "option",
|
|
1173
1173
|
"aria-selected": a,
|
|
1174
1174
|
"aria-disabled": t || void 0,
|
|
1175
1175
|
"data-highlighted": l ? "" : void 0,
|
|
1176
|
-
className:
|
|
1176
|
+
className: H(ve.item, "spSelectItem"),
|
|
1177
1177
|
onMouseEnter: () => !t && r.setHighlighted(e),
|
|
1178
1178
|
onClick: () => {
|
|
1179
1179
|
var s;
|
|
@@ -1183,20 +1183,20 @@ function vt({ value: e, disabled: t, children: o }) {
|
|
|
1183
1183
|
}
|
|
1184
1184
|
);
|
|
1185
1185
|
}
|
|
1186
|
-
const Sl = Object.assign(
|
|
1187
|
-
root:
|
|
1186
|
+
const Sl = Object.assign(Dr, { Item: Ct }), Ir = "_root_1hali_1", Hr = "_input_1hali_7", Sr = "_slot_1hali_17", nt = {
|
|
1187
|
+
root: Ir,
|
|
1188
1188
|
input: Hr,
|
|
1189
1189
|
slot: Sr
|
|
1190
1190
|
}, Tr = ae(function({ className: t, style: o, animated: r = !0, children: a, ...l }, s) {
|
|
1191
|
-
return /* @__PURE__ */
|
|
1191
|
+
return /* @__PURE__ */ E(
|
|
1192
1192
|
"div",
|
|
1193
1193
|
{
|
|
1194
|
-
className:
|
|
1194
|
+
className: H(nt.root, ue.spaceInput, "spTextFieldRoot", t),
|
|
1195
1195
|
"data-animated": r ? void 0 : "false",
|
|
1196
1196
|
style: o,
|
|
1197
1197
|
children: [
|
|
1198
1198
|
a,
|
|
1199
|
-
/* @__PURE__ */ n("input", { ...l, ref: s, className:
|
|
1199
|
+
/* @__PURE__ */ n("input", { ...l, ref: s, className: H(nt.input, "spTextFieldInput") })
|
|
1200
1200
|
]
|
|
1201
1201
|
}
|
|
1202
1202
|
);
|
|
@@ -1213,13 +1213,13 @@ const it = Object.assign(Tr, { Slot: qr }), Ar = "_root_1qu6w_1", Or = "_textare
|
|
|
1213
1213
|
return /* @__PURE__ */ n(
|
|
1214
1214
|
"div",
|
|
1215
1215
|
{
|
|
1216
|
-
className:
|
|
1216
|
+
className: H(dt.root, ue.spaceInput, ue.spaceTextArea, "spTextFieldRoot", t),
|
|
1217
1217
|
"data-animated": r ? void 0 : "false",
|
|
1218
1218
|
style: o,
|
|
1219
|
-
children: /* @__PURE__ */ n("textarea", { ...a, ref: l, className:
|
|
1219
|
+
children: /* @__PURE__ */ n("textarea", { ...a, ref: l, className: H(dt.textarea, "spTextAreaInput") })
|
|
1220
1220
|
}
|
|
1221
1221
|
);
|
|
1222
|
-
}), Br = "_wrap_sccqq_12", Zr = "_field_sccqq_16", Vr = "_panel_sccqq_25", Wr = "_status_sccqq_91", Pr = "_list_sccqq_101", Fr = "_option_sccqq_114", jr = "_active_sccqq_126", Gr = "_label_sccqq_136", Ur = "_meta_sccqq_143",
|
|
1222
|
+
}), Br = "_wrap_sccqq_12", Zr = "_field_sccqq_16", Vr = "_panel_sccqq_25", Wr = "_status_sccqq_91", Pr = "_list_sccqq_101", Fr = "_option_sccqq_114", jr = "_active_sccqq_126", Gr = "_label_sccqq_136", Ur = "_meta_sccqq_143", Xr = "_footer_sccqq_149", de = {
|
|
1223
1223
|
wrap: Br,
|
|
1224
1224
|
field: Zr,
|
|
1225
1225
|
panel: Vr,
|
|
@@ -1229,7 +1229,7 @@ const it = Object.assign(Tr, { Slot: qr }), Ar = "_root_1qu6w_1", Or = "_textare
|
|
|
1229
1229
|
active: jr,
|
|
1230
1230
|
label: Gr,
|
|
1231
1231
|
meta: Ur,
|
|
1232
|
-
footer:
|
|
1232
|
+
footer: Xr
|
|
1233
1233
|
}, ut = 8, tt = 8;
|
|
1234
1234
|
function ql({
|
|
1235
1235
|
value: e,
|
|
@@ -1242,182 +1242,182 @@ function ql({
|
|
|
1242
1242
|
loading: c = !1,
|
|
1243
1243
|
loadingMessage: h = "Loading…",
|
|
1244
1244
|
emptyMessage: m,
|
|
1245
|
-
footer:
|
|
1245
|
+
footer: u,
|
|
1246
1246
|
animated: C = !0,
|
|
1247
|
-
className:
|
|
1248
|
-
style:
|
|
1249
|
-
...
|
|
1247
|
+
className: x,
|
|
1248
|
+
style: M,
|
|
1249
|
+
..._
|
|
1250
1250
|
}) {
|
|
1251
|
-
const [
|
|
1252
|
-
if (!
|
|
1251
|
+
const [y, g] = Q(!1), [L, T] = Q(0), q = P(null), X = P(null), U = P(null), D = se(), [A, F] = Q(null), K = (d) => typeof d.label == "string" ? d.label : d.search ?? d.value, k = e.trim() !== "", z = _e(() => {
|
|
1252
|
+
if (!k) return [];
|
|
1253
1253
|
if (s) return o;
|
|
1254
|
-
const
|
|
1255
|
-
return o.filter((
|
|
1256
|
-
}, [o, e, l, s,
|
|
1257
|
-
te(() =>
|
|
1258
|
-
var
|
|
1259
|
-
if (!
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
}, [
|
|
1263
|
-
const
|
|
1264
|
-
const
|
|
1265
|
-
if (!
|
|
1266
|
-
const
|
|
1267
|
-
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1270
|
-
(
|
|
1254
|
+
const d = l ? e : e.toLowerCase();
|
|
1255
|
+
return o.filter(($) => (l ? K($) : K($).toLowerCase()).includes(d));
|
|
1256
|
+
}, [o, e, l, s, k]), B = _e(() => z.filter((d) => !d.disabled), [z]), j = k && (z.length > 0 || c || m != null), p = y && j;
|
|
1257
|
+
te(() => T(0), [z]), te(() => {
|
|
1258
|
+
var $;
|
|
1259
|
+
if (!p) return;
|
|
1260
|
+
const d = ($ = U.current) == null ? void 0 : $.querySelector(`[data-index="${L}"]`);
|
|
1261
|
+
d == null || d.scrollIntoView({ block: "nearest" });
|
|
1262
|
+
}, [L, p]);
|
|
1263
|
+
const I = pe(() => {
|
|
1264
|
+
const d = q.current, $ = X.current;
|
|
1265
|
+
if (!d || !$) return;
|
|
1266
|
+
const f = (d.firstElementChild ?? d).getBoundingClientRect(), S = $.offsetHeight, O = window.innerHeight - f.bottom - tt, V = O < S && f.top - tt > O;
|
|
1267
|
+
$.dataset.side = V ? "top" : "bottom";
|
|
1268
|
+
const G = V ? Math.max(tt, f.top - ut - S) : f.bottom + ut;
|
|
1269
|
+
F(
|
|
1270
|
+
(W) => W && W.top === G && W.left === f.left && W.width === f.width ? W : { top: G, left: f.left, width: f.width }
|
|
1271
1271
|
);
|
|
1272
1272
|
}, []);
|
|
1273
1273
|
ye(() => {
|
|
1274
|
-
const
|
|
1275
|
-
|
|
1276
|
-
}, [
|
|
1277
|
-
if (!
|
|
1278
|
-
let
|
|
1279
|
-
const
|
|
1280
|
-
const
|
|
1281
|
-
if (
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1274
|
+
const d = X.current;
|
|
1275
|
+
d && (p ? (Qe(d, I), I()) : d.matches(":popover-open") && d.hidePopover());
|
|
1276
|
+
}, [p, I]), te(() => {
|
|
1277
|
+
if (!p) return;
|
|
1278
|
+
let d = 0, $ = "";
|
|
1279
|
+
const i = () => {
|
|
1280
|
+
const f = q.current, S = X.current;
|
|
1281
|
+
if (f && S) {
|
|
1282
|
+
const O = (f.firstElementChild ?? f).getBoundingClientRect(), V = `${O.top}|${O.left}|${O.width}|${S.offsetHeight}|${window.innerHeight}`;
|
|
1283
|
+
V !== $ && ($ = V, I());
|
|
1284
1284
|
}
|
|
1285
|
-
|
|
1285
|
+
d = requestAnimationFrame(i);
|
|
1286
1286
|
};
|
|
1287
|
-
return
|
|
1288
|
-
}, [
|
|
1289
|
-
const
|
|
1287
|
+
return d = requestAnimationFrame(i), () => cancelAnimationFrame(d);
|
|
1288
|
+
}, [p, I]);
|
|
1289
|
+
const Z = pe(() => g(!1), []);
|
|
1290
1290
|
te(() => {
|
|
1291
|
-
if (!
|
|
1292
|
-
const
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1291
|
+
if (!p) return;
|
|
1292
|
+
const d = ($) => {
|
|
1293
|
+
const i = q.current;
|
|
1294
|
+
i && $.target instanceof Node && !i.contains($.target) && Z();
|
|
1295
1295
|
};
|
|
1296
|
-
return document.addEventListener("pointerdown",
|
|
1297
|
-
}, [
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1300
|
-
},
|
|
1301
|
-
if (
|
|
1302
|
-
const
|
|
1303
|
-
S &&
|
|
1304
|
-
},
|
|
1305
|
-
if (
|
|
1306
|
-
|
|
1296
|
+
return document.addEventListener("pointerdown", d), () => document.removeEventListener("pointerdown", d);
|
|
1297
|
+
}, [p, Z]);
|
|
1298
|
+
const b = P(!1), R = (d) => {
|
|
1299
|
+
d.disabled || (t(K(d)), r(d.value, d), b.current = !1, g(!1));
|
|
1300
|
+
}, w = (d) => {
|
|
1301
|
+
if (B.length === 0) return;
|
|
1302
|
+
const $ = z[L], f = (($ && !$.disabled ? B.indexOf($) : -1) + d + B.length) % B.length, S = B[f];
|
|
1303
|
+
S && T(z.indexOf(S));
|
|
1304
|
+
}, v = (d) => {
|
|
1305
|
+
if (d.key === "Escape") {
|
|
1306
|
+
p && d.stopPropagation(), g(!1);
|
|
1307
1307
|
return;
|
|
1308
1308
|
}
|
|
1309
|
-
if (
|
|
1309
|
+
if (d.key === "Tab") {
|
|
1310
1310
|
g(!1);
|
|
1311
1311
|
return;
|
|
1312
1312
|
}
|
|
1313
|
-
if (!
|
|
1314
|
-
|
|
1313
|
+
if (!p) {
|
|
1314
|
+
d.key === "ArrowDown" && g(!0);
|
|
1315
1315
|
return;
|
|
1316
1316
|
}
|
|
1317
|
-
if (
|
|
1318
|
-
|
|
1319
|
-
else if (
|
|
1320
|
-
|
|
1321
|
-
else if (
|
|
1322
|
-
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1325
|
-
} else if (
|
|
1326
|
-
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1329
|
-
} else if (
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1317
|
+
if (d.key === "ArrowDown")
|
|
1318
|
+
d.preventDefault(), b.current = !0, w(1);
|
|
1319
|
+
else if (d.key === "ArrowUp")
|
|
1320
|
+
d.preventDefault(), b.current = !0, w(-1);
|
|
1321
|
+
else if (d.key === "Home") {
|
|
1322
|
+
d.preventDefault(), b.current = !0;
|
|
1323
|
+
const $ = B[0];
|
|
1324
|
+
$ && T(z.indexOf($));
|
|
1325
|
+
} else if (d.key === "End") {
|
|
1326
|
+
d.preventDefault(), b.current = !0;
|
|
1327
|
+
const $ = B[B.length - 1];
|
|
1328
|
+
$ && T(z.indexOf($));
|
|
1329
|
+
} else if (d.key === "Enter" || d.key === " " && b.current) {
|
|
1330
|
+
const $ = z[L];
|
|
1331
|
+
$ && !$.disabled && (d.preventDefault(), R($));
|
|
1332
1332
|
}
|
|
1333
|
-
},
|
|
1334
|
-
return /* @__PURE__ */
|
|
1333
|
+
}, N = p ? z[L] : void 0;
|
|
1334
|
+
return /* @__PURE__ */ E("div", { ref: q, className: H(de.wrap, x), style: M, children: [
|
|
1335
1335
|
/* @__PURE__ */ n(
|
|
1336
1336
|
it,
|
|
1337
1337
|
{
|
|
1338
|
-
...
|
|
1339
|
-
type:
|
|
1338
|
+
..._,
|
|
1339
|
+
type: _.type ?? "text",
|
|
1340
1340
|
role: "combobox",
|
|
1341
1341
|
animated: C,
|
|
1342
1342
|
className: de.field,
|
|
1343
1343
|
autoComplete: "off",
|
|
1344
|
-
"aria-expanded":
|
|
1344
|
+
"aria-expanded": p,
|
|
1345
1345
|
"aria-controls": D,
|
|
1346
1346
|
"aria-autocomplete": "list",
|
|
1347
|
-
"aria-activedescendant":
|
|
1347
|
+
"aria-activedescendant": N && !N.disabled ? `${D}-${L}` : void 0,
|
|
1348
1348
|
value: e,
|
|
1349
|
-
onFocus: (
|
|
1350
|
-
var
|
|
1351
|
-
(
|
|
1349
|
+
onFocus: (d) => {
|
|
1350
|
+
var $;
|
|
1351
|
+
($ = _.onFocus) == null || $.call(_, d), g(!0);
|
|
1352
1352
|
},
|
|
1353
|
-
onClick: (
|
|
1354
|
-
var
|
|
1355
|
-
(
|
|
1353
|
+
onClick: (d) => {
|
|
1354
|
+
var $;
|
|
1355
|
+
($ = _.onClick) == null || $.call(_, d), g(!0);
|
|
1356
1356
|
},
|
|
1357
|
-
onKeyDown: (
|
|
1358
|
-
var
|
|
1359
|
-
(
|
|
1357
|
+
onKeyDown: (d) => {
|
|
1358
|
+
var $;
|
|
1359
|
+
($ = _.onKeyDown) == null || $.call(_, d), v(d);
|
|
1360
1360
|
},
|
|
1361
|
-
onChange: (
|
|
1362
|
-
|
|
1361
|
+
onChange: (d) => {
|
|
1362
|
+
b.current = !1, t(d.target.value), g(!0);
|
|
1363
1363
|
},
|
|
1364
1364
|
children: a != null && /* @__PURE__ */ n(it.Slot, { children: a })
|
|
1365
1365
|
}
|
|
1366
1366
|
),
|
|
1367
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ E(
|
|
1368
1368
|
"div",
|
|
1369
1369
|
{
|
|
1370
1370
|
ref: X,
|
|
1371
1371
|
popover: "manual",
|
|
1372
1372
|
"data-side": "bottom",
|
|
1373
|
-
className:
|
|
1373
|
+
className: H(de.panel, ue.spacePanel),
|
|
1374
1374
|
"data-animated": C ? void 0 : "false",
|
|
1375
|
-
style:
|
|
1375
|
+
style: A ? { top: A.top, left: A.left, width: A.width } : void 0,
|
|
1376
1376
|
children: [
|
|
1377
|
-
|
|
1378
|
-
|
|
1377
|
+
k && c && /* @__PURE__ */ n("p", { className: de.status, children: h }),
|
|
1378
|
+
k && !c && z.length === 0 && m != null && /* @__PURE__ */ n("p", { className: de.status, children: m }),
|
|
1379
1379
|
/* @__PURE__ */ n(
|
|
1380
1380
|
"ul",
|
|
1381
1381
|
{
|
|
1382
|
-
ref:
|
|
1382
|
+
ref: U,
|
|
1383
1383
|
id: D,
|
|
1384
1384
|
role: "listbox",
|
|
1385
1385
|
className: de.list,
|
|
1386
|
-
hidden: c ||
|
|
1387
|
-
children:
|
|
1386
|
+
hidden: c || z.length === 0,
|
|
1387
|
+
children: z.map((d, $) => /* @__PURE__ */ E(
|
|
1388
1388
|
"li",
|
|
1389
1389
|
{
|
|
1390
|
-
id: `${D}-${
|
|
1391
|
-
"data-index":
|
|
1390
|
+
id: `${D}-${$}`,
|
|
1391
|
+
"data-index": $,
|
|
1392
1392
|
role: "option",
|
|
1393
|
-
"aria-selected":
|
|
1394
|
-
"aria-disabled":
|
|
1395
|
-
className:
|
|
1393
|
+
"aria-selected": $ === L,
|
|
1394
|
+
"aria-disabled": d.disabled || void 0,
|
|
1395
|
+
className: H(
|
|
1396
1396
|
de.option,
|
|
1397
|
-
|
|
1397
|
+
$ === L && !d.disabled && de.active,
|
|
1398
1398
|
"spAutocompleteOption"
|
|
1399
1399
|
),
|
|
1400
|
-
onMouseEnter: () => !
|
|
1401
|
-
onPointerDown: (
|
|
1402
|
-
|
|
1400
|
+
onMouseEnter: () => !d.disabled && T($),
|
|
1401
|
+
onPointerDown: (i) => {
|
|
1402
|
+
i.preventDefault(), R(d);
|
|
1403
1403
|
},
|
|
1404
1404
|
children: [
|
|
1405
|
-
/* @__PURE__ */ n("span", { className: de.label, children:
|
|
1406
|
-
|
|
1405
|
+
/* @__PURE__ */ n("span", { className: de.label, children: d.label }),
|
|
1406
|
+
d.meta != null && /* @__PURE__ */ n("span", { className: de.meta, children: d.meta })
|
|
1407
1407
|
]
|
|
1408
1408
|
},
|
|
1409
|
-
|
|
1409
|
+
d.value
|
|
1410
1410
|
))
|
|
1411
1411
|
}
|
|
1412
1412
|
),
|
|
1413
|
-
|
|
1413
|
+
u != null && /* @__PURE__ */ n("div", { className: de.footer, children: u })
|
|
1414
1414
|
]
|
|
1415
1415
|
}
|
|
1416
1416
|
)
|
|
1417
1417
|
] });
|
|
1418
1418
|
}
|
|
1419
|
-
const
|
|
1420
|
-
root:
|
|
1419
|
+
const Kr = "_root_1csru_2", Yr = "_track_1csru_19", Qr = "_range_1csru_31", Jr = "_thumb_1csru_42", es = "_input_1csru_65", Oe = {
|
|
1420
|
+
root: Kr,
|
|
1421
1421
|
track: Yr,
|
|
1422
1422
|
range: Qr,
|
|
1423
1423
|
thumb: Jr,
|
|
@@ -1432,76 +1432,129 @@ const Xr = "_root_1x14g_2", Yr = "_track_1x14g_13", Qr = "_range_1x14g_25", Jr =
|
|
|
1432
1432
|
disabled: c,
|
|
1433
1433
|
className: h,
|
|
1434
1434
|
"aria-label": m,
|
|
1435
|
-
thumbLabels:
|
|
1435
|
+
thumbLabels: u
|
|
1436
1436
|
}, C) {
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
const
|
|
1441
|
-
|
|
1442
|
-
}, V = (w) => {
|
|
1443
|
-
if (!u) return 0;
|
|
1444
|
-
const H = Math.abs(w - g), i = Math.abs(w - N);
|
|
1445
|
-
return H === i ? w < g ? 0 : 1 : H < i ? 0 : 1;
|
|
1437
|
+
const x = P(null), M = P([]), _ = P([]), y = P(null), g = P(null), L = t.length > 1, T = a - r || 1, q = be(t[0] ?? r, r, a), X = L ? be(t[1] ?? a, r, a) : q, U = L ? [q, X] : [q], D = (w) => (w - r) / T * 100, A = P({ values: U, min: r, max: a, span: T, step: l, minDistance: s, isRange: L, onValueChange: o });
|
|
1438
|
+
A.current = { values: U, min: r, max: a, span: T, step: l, minDistance: s, isRange: L, onValueChange: o };
|
|
1439
|
+
const F = (w) => {
|
|
1440
|
+
const v = A.current;
|
|
1441
|
+
return v.min + Math.floor(Number(((w - v.min) / v.step).toFixed(8))) * v.step;
|
|
1446
1442
|
}, K = (w) => {
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1443
|
+
const v = A.current;
|
|
1444
|
+
return v.min + Math.ceil(Number(((w - v.min) / v.step).toFixed(8))) * v.step;
|
|
1445
|
+
}, k = (w, v) => {
|
|
1446
|
+
const N = A.current;
|
|
1447
|
+
return N.isRange ? w === 0 ? be(v, N.min, Math.max(N.min, F(N.values[1] - N.minDistance))) : be(v, Math.min(N.max, K(N.values[0] + N.minDistance)), N.max) : be(v, N.min, N.max);
|
|
1448
|
+
}, z = (w, v) => {
|
|
1449
|
+
const N = A.current, d = k(w, v);
|
|
1450
|
+
if (d === N.values[w]) return;
|
|
1451
|
+
const $ = [...N.values];
|
|
1452
|
+
$[w] = d, N.onValueChange($);
|
|
1453
|
+
}, B = (w) => {
|
|
1454
|
+
var i;
|
|
1455
|
+
const v = A.current, N = (i = x.current) == null ? void 0 : i.getBoundingClientRect();
|
|
1456
|
+
if (!N || N.width === 0) return v.values[0];
|
|
1457
|
+
const d = be((w - N.left) / N.width, 0, 1), $ = v.min + d * v.span;
|
|
1458
|
+
return be(v.min + Math.round(($ - v.min) / v.step) * v.step, v.min, v.max);
|
|
1459
|
+
}, j = (w) => {
|
|
1460
|
+
var v;
|
|
1461
|
+
return (v = _.current[w]) == null ? void 0 : v.getBoundingClientRect();
|
|
1462
|
+
}, p = (w) => {
|
|
1463
|
+
if (!A.current.isRange) return 0;
|
|
1464
|
+
const v = j(0), N = j(1);
|
|
1465
|
+
if (!v || !N) return 0;
|
|
1466
|
+
const d = v.left + v.width / 2, $ = Math.abs(w - d), i = Math.abs(w - (N.left + N.width / 2));
|
|
1467
|
+
return $ !== i ? $ < i ? 0 : 1 : Math.abs(w - d) <= 1 ? null : w < d ? 0 : 1;
|
|
1468
|
+
}, I = (w, v) => {
|
|
1469
|
+
const N = j(w);
|
|
1470
|
+
return N ? Math.abs(v - (N.left + N.width / 2)) <= N.width / 2 : !1;
|
|
1471
|
+
}, Z = () => {
|
|
1472
|
+
var w, v;
|
|
1473
|
+
y.current = null, (w = x.current) == null || w.removeAttribute("data-dragging"), (v = g.current) == null || v.call(g);
|
|
1474
|
+
}, b = (w) => {
|
|
1475
|
+
var d, $, i, f;
|
|
1476
|
+
if (c || w.button !== 0) return;
|
|
1477
|
+
(d = g.current) == null || d.call(g);
|
|
1478
|
+
const v = p(w.clientX);
|
|
1479
|
+
y.current = { index: v, startX: w.clientX }, ($ = x.current) == null || $.setAttribute("data-dragging", ""), v !== null && (I(v, w.clientX) || z(v, B(w.clientX)), (i = M.current[v]) == null || i.focus());
|
|
1480
|
+
try {
|
|
1481
|
+
(f = x.current) == null || f.setPointerCapture(w.pointerId);
|
|
1482
|
+
} catch {
|
|
1483
|
+
}
|
|
1484
|
+
const N = (S) => {
|
|
1485
|
+
var V;
|
|
1486
|
+
const O = y.current;
|
|
1487
|
+
if (O) {
|
|
1488
|
+
if (O.index === null) {
|
|
1489
|
+
const G = S.clientX - O.startX;
|
|
1490
|
+
if (Math.abs(G) < 1) return;
|
|
1491
|
+
O.index = G < 0 ? 0 : 1, (V = M.current[O.index]) == null || V.focus();
|
|
1492
|
+
}
|
|
1493
|
+
z(O.index, B(S.clientX));
|
|
1494
|
+
}
|
|
1495
|
+
};
|
|
1496
|
+
window.addEventListener("pointermove", N), window.addEventListener("pointerup", Z), window.addEventListener("pointercancel", Z), g.current = () => {
|
|
1497
|
+
window.removeEventListener("pointermove", N), window.removeEventListener("pointerup", Z), window.removeEventListener("pointercancel", Z), g.current = null;
|
|
1498
|
+
}, w.preventDefault();
|
|
1499
|
+
};
|
|
1500
|
+
te(() => () => {
|
|
1501
|
+
var w;
|
|
1502
|
+
return (w = g.current) == null ? void 0 : w.call(g);
|
|
1503
|
+
}, []);
|
|
1504
|
+
const R = (w) => u ? u[w] : L ? m ? `${m} ${w === 0 ? "minimum" : "maximum"}` : w === 0 ? "Minimum" : "Maximum" : m;
|
|
1505
|
+
return /* @__PURE__ */ E(
|
|
1455
1506
|
"span",
|
|
1456
1507
|
{
|
|
1457
|
-
ref:
|
|
1458
|
-
className:
|
|
1508
|
+
ref: x,
|
|
1509
|
+
className: H(Oe.root, ue.spaceSlider, h),
|
|
1459
1510
|
"data-disabled": c || void 0,
|
|
1460
|
-
"data-range":
|
|
1461
|
-
onPointerDown:
|
|
1511
|
+
"data-range": L || void 0,
|
|
1512
|
+
onPointerDown: b,
|
|
1462
1513
|
children: [
|
|
1463
|
-
/* @__PURE__ */ n("span", { className:
|
|
1514
|
+
/* @__PURE__ */ n("span", { className: H(Oe.track, "spSliderTrack"), children: /* @__PURE__ */ n(
|
|
1464
1515
|
"span",
|
|
1465
1516
|
{
|
|
1466
|
-
className:
|
|
1517
|
+
className: H(Oe.range, "spSliderRange"),
|
|
1467
1518
|
style: {
|
|
1468
|
-
insetInlineStart: `${
|
|
1469
|
-
width: `${
|
|
1519
|
+
insetInlineStart: `${L ? D(q) : 0}%`,
|
|
1520
|
+
width: `${L ? D(X) - D(q) : D(q)}%`
|
|
1470
1521
|
}
|
|
1471
1522
|
}
|
|
1472
1523
|
) }),
|
|
1473
|
-
|
|
1524
|
+
U.map((w, v) => /* @__PURE__ */ n(
|
|
1474
1525
|
"span",
|
|
1475
1526
|
{
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1527
|
+
ref: (N) => {
|
|
1528
|
+
_.current[v] = N;
|
|
1529
|
+
},
|
|
1530
|
+
className: H(Oe.thumb, "spSliderThumb"),
|
|
1531
|
+
style: { left: `${D(w)}%` },
|
|
1532
|
+
"data-thumb": v
|
|
1479
1533
|
},
|
|
1480
|
-
|
|
1534
|
+
v
|
|
1481
1535
|
)),
|
|
1482
|
-
|
|
1536
|
+
U.map((w, v) => /* @__PURE__ */ n(
|
|
1483
1537
|
"input",
|
|
1484
1538
|
{
|
|
1485
|
-
ref: (
|
|
1486
|
-
|
|
1539
|
+
ref: (N) => {
|
|
1540
|
+
M.current[v] = N, v === 0 && (typeof C == "function" ? C(N) : C && (C.current = N));
|
|
1487
1541
|
},
|
|
1488
1542
|
type: "range",
|
|
1489
|
-
className:
|
|
1543
|
+
className: H(Oe.input, "spSliderInput"),
|
|
1490
1544
|
value: w,
|
|
1491
1545
|
min: r,
|
|
1492
1546
|
max: a,
|
|
1493
1547
|
step: l,
|
|
1494
1548
|
disabled: c,
|
|
1495
|
-
"aria-label":
|
|
1496
|
-
|
|
1497
|
-
onChange: (i) => q(H, Number(i.target.value))
|
|
1549
|
+
"aria-label": R(v),
|
|
1550
|
+
onChange: (N) => z(v, Number(N.target.value))
|
|
1498
1551
|
},
|
|
1499
|
-
|
|
1552
|
+
v
|
|
1500
1553
|
))
|
|
1501
1554
|
]
|
|
1502
1555
|
}
|
|
1503
1556
|
);
|
|
1504
|
-
}), ts = "_root_1fiei_15", ns = "_plot_1fiei_24", os = "_svg_1fiei_30", rs = "_grid_1fiei_35", ss = "_zeroLine_1fiei_42", as = "_axisLabel_1fiei_46", ls = "_bar_1fiei_56", cs = "_hatch_1fiei_76", is = "_partialNote_1fiei_80", ds = "_line_1fiei_85", us = "_area_1fiei_119", fs = "_dot_1fiei_125", ps = "_crosshair_1fiei_136", _s = "_clickable_1fiei_143", hs = "_tooltip_1fiei_150", ms = "_tooltipHead_1fiei_164", gs = "_tooltipList_1fiei_170",
|
|
1557
|
+
}), ts = "_root_1fiei_15", ns = "_plot_1fiei_24", os = "_svg_1fiei_30", rs = "_grid_1fiei_35", ss = "_zeroLine_1fiei_42", as = "_axisLabel_1fiei_46", ls = "_bar_1fiei_56", cs = "_hatch_1fiei_76", is = "_partialNote_1fiei_80", ds = "_line_1fiei_85", us = "_area_1fiei_119", fs = "_dot_1fiei_125", ps = "_crosshair_1fiei_136", _s = "_clickable_1fiei_143", hs = "_tooltip_1fiei_150", ms = "_tooltipHead_1fiei_164", gs = "_tooltipList_1fiei_170", vs = "_tooltipRow_1fiei_178", Cs = "_tooltipName_1fiei_186", bs = "_tooltipValue_1fiei_190", ws = "_swatch_1fiei_195", $s = "_legend_1fiei_202", ys = "_legendItem_1fiei_211", xs = "_data_1fiei_220", Y = {
|
|
1505
1558
|
root: ts,
|
|
1506
1559
|
plot: ns,
|
|
1507
1560
|
svg: os,
|
|
@@ -1519,8 +1572,8 @@ const Xr = "_root_1x14g_2", Yr = "_track_1x14g_13", Qr = "_range_1x14g_25", Jr =
|
|
|
1519
1572
|
tooltip: hs,
|
|
1520
1573
|
tooltipHead: ms,
|
|
1521
1574
|
tooltipList: gs,
|
|
1522
|
-
tooltipRow:
|
|
1523
|
-
tooltipName:
|
|
1575
|
+
tooltipRow: vs,
|
|
1576
|
+
tooltipName: Cs,
|
|
1524
1577
|
tooltipValue: bs,
|
|
1525
1578
|
swatch: ws,
|
|
1526
1579
|
legend: $s,
|
|
@@ -1535,20 +1588,20 @@ const Xr = "_root_1x14g_2", Yr = "_track_1x14g_13", Qr = "_range_1x14g_25", Jr =
|
|
|
1535
1588
|
"var(--sp-chart-series-6-color)",
|
|
1536
1589
|
"var(--sp-chart-series-7-color)",
|
|
1537
1590
|
"var(--sp-chart-series-8-color)"
|
|
1538
|
-
], ot = bt.length,
|
|
1591
|
+
], ot = bt.length, Ke = (e) => bt[e % ot];
|
|
1539
1592
|
function Ns(e) {
|
|
1540
1593
|
if (e <= 0) return 1;
|
|
1541
1594
|
const t = 10 ** Math.floor(Math.log10(e)), o = e / t;
|
|
1542
1595
|
return (o <= 1 ? 1 : o <= 2 ? 2 : o <= 5 ? 5 : 10) * t;
|
|
1543
1596
|
}
|
|
1544
1597
|
function Ms(e, { tickCount: t = 5, zeroBased: o = !0 } = {}) {
|
|
1545
|
-
const r = e.filter((
|
|
1598
|
+
const r = e.filter((_) => Number.isFinite(_)), a = r.length ? Math.min(...r) : 0, l = r.length ? Math.max(...r) : 0;
|
|
1546
1599
|
let s = o ? Math.min(0, a) : a, c = o ? Math.max(0, l) : l;
|
|
1547
1600
|
s === c && (s === 0 ? c = 1 : (s = Math.min(0, s), c = Math.max(0, c)));
|
|
1548
|
-
const h = Ns((c - s) / Math.max(1, t)), m = Math.floor(s / h) * h,
|
|
1549
|
-
for (let
|
|
1550
|
-
const
|
|
1551
|
-
return { min: m, max:
|
|
1601
|
+
const h = Ns((c - s) / Math.max(1, t)), m = Math.floor(s / h) * h, u = Math.ceil(c / h) * h, C = [], x = Math.round((u - m) / h);
|
|
1602
|
+
for (let _ = 0; _ <= x; _++) C.push(Number((m + _ * h).toPrecision(12)));
|
|
1603
|
+
const M = u - m || 1;
|
|
1604
|
+
return { min: m, max: u, ticks: C, ratio: (_) => (_ - m) / M };
|
|
1552
1605
|
}
|
|
1553
1606
|
function Ls(e, t = 0.25) {
|
|
1554
1607
|
if (e <= 0) return { centre: [], width: 0 };
|
|
@@ -1580,258 +1633,258 @@ function Ol({
|
|
|
1580
1633
|
formatValue: c = st,
|
|
1581
1634
|
tickCount: h = 5,
|
|
1582
1635
|
animated: m = !0,
|
|
1583
|
-
partialFrom:
|
|
1636
|
+
partialFrom: u,
|
|
1584
1637
|
onPointClick: C,
|
|
1585
|
-
className:
|
|
1586
|
-
"aria-label":
|
|
1587
|
-
...
|
|
1638
|
+
className: x,
|
|
1639
|
+
"aria-label": M,
|
|
1640
|
+
..._
|
|
1588
1641
|
}) {
|
|
1589
|
-
const
|
|
1642
|
+
const y = se(), g = P(null), [L, T] = Q(0), [q, X] = Q(null);
|
|
1590
1643
|
te(() => {
|
|
1591
|
-
const
|
|
1592
|
-
if (!
|
|
1593
|
-
const
|
|
1594
|
-
|
|
1644
|
+
const i = g.current;
|
|
1645
|
+
if (!i) return;
|
|
1646
|
+
const f = new ResizeObserver(([S]) => {
|
|
1647
|
+
T(Math.round(S.contentRect.width));
|
|
1595
1648
|
});
|
|
1596
|
-
return
|
|
1649
|
+
return f.observe(i), T(Math.round(i.getBoundingClientRect().width)), () => f.disconnect();
|
|
1597
1650
|
}, []), te(() => {
|
|
1598
1651
|
if (!Rs()) return;
|
|
1599
1652
|
o.length > ot && console.warn(
|
|
1600
1653
|
`Chart: ${o.length} series, but the palette names ${ot}. Past that the colours repeat. Group the tail into an "Other" series, or split the chart.`
|
|
1601
1654
|
);
|
|
1602
|
-
const
|
|
1603
|
-
|
|
1604
|
-
`Chart: ${
|
|
1655
|
+
const i = o.filter((f) => f.data.length !== t.length);
|
|
1656
|
+
i.length && console.warn(
|
|
1657
|
+
`Chart: ${i.map((f) => `"${f.name}"`).join(", ")} ${i.length === 1 ? "has" : "have"} a different number of values than there are categories (${t.length}). Values line up with categories by position, so the tail will be missing.`
|
|
1605
1658
|
);
|
|
1606
1659
|
}, [o, t.length]);
|
|
1607
|
-
const
|
|
1608
|
-
const
|
|
1609
|
-
return
|
|
1610
|
-
let
|
|
1611
|
-
o.forEach((
|
|
1612
|
-
const
|
|
1613
|
-
typeof
|
|
1614
|
-
}),
|
|
1615
|
-
}) : o.forEach((
|
|
1616
|
-
typeof S == "number" &&
|
|
1617
|
-
})), Ms(
|
|
1618
|
-
}, [o, t,
|
|
1619
|
-
var
|
|
1620
|
-
return ((
|
|
1621
|
-
},
|
|
1622
|
-
const
|
|
1623
|
-
return t.forEach((
|
|
1624
|
-
let
|
|
1625
|
-
o.forEach((
|
|
1626
|
-
const ee =
|
|
1627
|
-
if (!
|
|
1628
|
-
|
|
1660
|
+
const U = a && (e === "bar" || e === "area"), D = e === "bar" && typeof u == "number" && u >= 0, A = (i) => D && i >= u, F = _e(() => {
|
|
1661
|
+
const i = [];
|
|
1662
|
+
return U ? t.forEach((f, S) => {
|
|
1663
|
+
let O = 0, V = 0;
|
|
1664
|
+
o.forEach((G) => {
|
|
1665
|
+
const W = G.data[S];
|
|
1666
|
+
typeof W == "number" && (W >= 0 ? O += W : V += W);
|
|
1667
|
+
}), i.push(O, V);
|
|
1668
|
+
}) : o.forEach((f) => f.data.forEach((S) => {
|
|
1669
|
+
typeof S == "number" && i.push(S);
|
|
1670
|
+
})), Ms(i, { tickCount: h, zeroBased: e !== "line" || i.some((f) => f < 0) });
|
|
1671
|
+
}, [o, t, U, h, e]), K = _e(() => F.ticks.map(c), [F.ticks, c]), k = Math.max(...K.map((i) => i.length * 7), 24) + ft, z = Math.max(0, L - k - we.right), B = Math.max(0, r - we.top - we.bottom), j = e === "bar" ? 0 : 16, p = (i) => k + j + i * Math.max(0, z - j * 2), I = (i) => we.top + (1 - F.ratio(i)) * B, Z = Ls(t.length), b = zs(t.length), R = (i) => {
|
|
1672
|
+
var f;
|
|
1673
|
+
return ((f = o[i]) == null ? void 0 : f.color) ?? Ke(i);
|
|
1674
|
+
}, w = l ?? o.length > 1, v = _e(() => {
|
|
1675
|
+
const i = o.map(() => []);
|
|
1676
|
+
return t.forEach((f, S) => {
|
|
1677
|
+
let O = 0, V = 0;
|
|
1678
|
+
o.forEach((G, W) => {
|
|
1679
|
+
const ee = G.data[S];
|
|
1680
|
+
if (!U || typeof ee != "number") {
|
|
1681
|
+
i[W][S] = 0;
|
|
1629
1682
|
return;
|
|
1630
1683
|
}
|
|
1631
|
-
ee >= 0 ? (
|
|
1684
|
+
ee >= 0 ? (i[W][S] = O, O += ee) : (i[W][S] = V, V += ee);
|
|
1632
1685
|
});
|
|
1633
|
-
}),
|
|
1634
|
-
}, [o, t,
|
|
1635
|
-
(
|
|
1636
|
-
const
|
|
1637
|
-
if (!
|
|
1638
|
-
const S =
|
|
1639
|
-
let
|
|
1640
|
-
return
|
|
1641
|
-
Math.abs(ee -
|
|
1642
|
-
}), { index:
|
|
1686
|
+
}), i;
|
|
1687
|
+
}, [o, t, U]), N = pe(
|
|
1688
|
+
(i) => {
|
|
1689
|
+
const f = g.current;
|
|
1690
|
+
if (!f || !t.length || z <= 0) return null;
|
|
1691
|
+
const S = f.getBoundingClientRect(), O = e === "bar" ? z : Math.max(1, z - 32), V = (i - S.left - k - (e === "bar" ? 0 : 16)) / O, G = e === "bar" ? Z.centre : b;
|
|
1692
|
+
let W = 0;
|
|
1693
|
+
return G.forEach((ee, ne) => {
|
|
1694
|
+
Math.abs(ee - V) < Math.abs(G[W] - V) && (W = ne);
|
|
1695
|
+
}), { index: W, x: p(G[W]) };
|
|
1643
1696
|
},
|
|
1644
1697
|
// x and the position arrays are derived from these; listing them keeps the
|
|
1645
1698
|
// callback honest without re-creating it on every render.
|
|
1646
|
-
[t.length,
|
|
1699
|
+
[t.length, k, z, e, Z.centre, b]
|
|
1647
1700
|
// eslint-disable-line react-hooks/exhaustive-deps
|
|
1648
|
-
),
|
|
1649
|
-
var
|
|
1650
|
-
const S = (
|
|
1701
|
+
), d = (i, f) => {
|
|
1702
|
+
var O;
|
|
1703
|
+
const S = (O = o[i]) == null ? void 0 : O.data[f];
|
|
1651
1704
|
typeof S != "number" || !C || C({
|
|
1652
|
-
series: o[
|
|
1653
|
-
seriesIndex:
|
|
1654
|
-
category: t[
|
|
1655
|
-
categoryIndex:
|
|
1705
|
+
series: o[i].name,
|
|
1706
|
+
seriesIndex: i,
|
|
1707
|
+
category: t[f],
|
|
1708
|
+
categoryIndex: f,
|
|
1656
1709
|
value: S
|
|
1657
1710
|
});
|
|
1658
|
-
},
|
|
1659
|
-
return /* @__PURE__ */
|
|
1711
|
+
}, $ = U || o.length === 1 ? Z.width * z : Z.width * z / o.length;
|
|
1712
|
+
return /* @__PURE__ */ E(
|
|
1660
1713
|
"div",
|
|
1661
1714
|
{
|
|
1662
|
-
...
|
|
1663
|
-
className:
|
|
1715
|
+
..._,
|
|
1716
|
+
className: H(Y.root, x),
|
|
1664
1717
|
"data-type": e,
|
|
1665
1718
|
"data-animated": m ? "" : void 0,
|
|
1666
|
-
style: { ...
|
|
1719
|
+
style: { ..._.style },
|
|
1667
1720
|
children: [
|
|
1668
|
-
/* @__PURE__ */
|
|
1721
|
+
/* @__PURE__ */ E(
|
|
1669
1722
|
"div",
|
|
1670
1723
|
{
|
|
1671
1724
|
ref: g,
|
|
1672
1725
|
className: Y.plot,
|
|
1673
1726
|
style: { height: r },
|
|
1674
|
-
onPointerMove: (
|
|
1675
|
-
|
|
1727
|
+
onPointerMove: (i) => {
|
|
1728
|
+
i.pointerType !== "touch" && X(N(i.clientX));
|
|
1676
1729
|
},
|
|
1677
1730
|
onPointerLeave: () => X(null),
|
|
1678
1731
|
children: [
|
|
1679
|
-
/* @__PURE__ */
|
|
1732
|
+
/* @__PURE__ */ E(
|
|
1680
1733
|
"svg",
|
|
1681
1734
|
{
|
|
1682
1735
|
className: Y.svg,
|
|
1683
|
-
width:
|
|
1736
|
+
width: L || void 0,
|
|
1684
1737
|
height: r,
|
|
1685
|
-
viewBox:
|
|
1738
|
+
viewBox: L ? `0 0 ${L} ${r}` : void 0,
|
|
1686
1739
|
role: "img",
|
|
1687
|
-
"aria-labelledby":
|
|
1688
|
-
"aria-label":
|
|
1740
|
+
"aria-labelledby": M ? void 0 : y,
|
|
1741
|
+
"aria-label": M,
|
|
1689
1742
|
children: [
|
|
1690
|
-
/* @__PURE__ */
|
|
1691
|
-
o.map((
|
|
1692
|
-
/* @__PURE__ */ n("stop", { offset: "0%", stopColor:
|
|
1693
|
-
/* @__PURE__ */ n("stop", { offset: "100%", stopColor:
|
|
1694
|
-
] }, `grad-${
|
|
1695
|
-
o.map((
|
|
1696
|
-
/* @__PURE__ */ n("stop", { offset: "0%", stopColor:
|
|
1697
|
-
/* @__PURE__ */ n("stop", { offset: "100%", stopColor:
|
|
1698
|
-
] }, `area-${
|
|
1743
|
+
/* @__PURE__ */ E("defs", { children: [
|
|
1744
|
+
o.map((i, f) => /* @__PURE__ */ E("linearGradient", { id: `${y}-grad-${f}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
1745
|
+
/* @__PURE__ */ n("stop", { offset: "0%", stopColor: R(f), stopOpacity: "1" }),
|
|
1746
|
+
/* @__PURE__ */ n("stop", { offset: "100%", stopColor: R(f), stopOpacity: "0.55" })
|
|
1747
|
+
] }, `grad-${f}`)),
|
|
1748
|
+
o.map((i, f) => /* @__PURE__ */ E("linearGradient", { id: `${y}-area-${f}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
1749
|
+
/* @__PURE__ */ n("stop", { offset: "0%", stopColor: R(f), stopOpacity: "0.45" }),
|
|
1750
|
+
/* @__PURE__ */ n("stop", { offset: "100%", stopColor: R(f), stopOpacity: "0.02" })
|
|
1751
|
+
] }, `area-${f}`))
|
|
1699
1752
|
] }),
|
|
1700
|
-
D && /* @__PURE__ */ n("defs", { children: o.map((
|
|
1753
|
+
D && /* @__PURE__ */ n("defs", { children: o.map((i, f) => /* @__PURE__ */ E(
|
|
1701
1754
|
"pattern",
|
|
1702
1755
|
{
|
|
1703
|
-
id: `${
|
|
1756
|
+
id: `${y}-hatch-${f}`,
|
|
1704
1757
|
width: "8",
|
|
1705
1758
|
height: "8",
|
|
1706
1759
|
patternUnits: "userSpaceOnUse",
|
|
1707
1760
|
patternTransform: "rotate(45)",
|
|
1708
1761
|
children: [
|
|
1709
1762
|
/* @__PURE__ */ n("rect", { width: "8", height: "8", fill: "transparent" }),
|
|
1710
|
-
/* @__PURE__ */ n("line", { className: Y.hatch, x1: "2", y1: "0", x2: "2", y2: "8", stroke:
|
|
1711
|
-
/* @__PURE__ */ n("line", { className: Y.hatch, x1: "6", y1: "0", x2: "6", y2: "8", stroke:
|
|
1763
|
+
/* @__PURE__ */ n("line", { className: Y.hatch, x1: "2", y1: "0", x2: "2", y2: "8", stroke: R(f) }),
|
|
1764
|
+
/* @__PURE__ */ n("line", { className: Y.hatch, x1: "6", y1: "0", x2: "6", y2: "8", stroke: R(f) })
|
|
1712
1765
|
]
|
|
1713
1766
|
},
|
|
1714
|
-
`hatch-${
|
|
1767
|
+
`hatch-${f}`
|
|
1715
1768
|
)) }),
|
|
1716
|
-
s &&
|
|
1769
|
+
s && F.ticks.map((i) => /* @__PURE__ */ n(
|
|
1717
1770
|
"line",
|
|
1718
1771
|
{
|
|
1719
|
-
className:
|
|
1720
|
-
x1:
|
|
1721
|
-
x2:
|
|
1722
|
-
y1:
|
|
1723
|
-
y2:
|
|
1772
|
+
className: H(Y.grid, i === 0 && F.min < 0 && Y.zeroLine),
|
|
1773
|
+
x1: k,
|
|
1774
|
+
x2: k + z,
|
|
1775
|
+
y1: I(i),
|
|
1776
|
+
y2: I(i)
|
|
1724
1777
|
},
|
|
1725
|
-
`grid-${
|
|
1778
|
+
`grid-${i}`
|
|
1726
1779
|
)),
|
|
1727
|
-
|
|
1728
|
-
t.map((
|
|
1780
|
+
F.ticks.map((i, f) => /* @__PURE__ */ n("text", { className: Y.axisLabel, x: k - ft, y: I(i), textAnchor: "end", dominantBaseline: "middle", children: K[f] }, `label-${i}`)),
|
|
1781
|
+
t.map((i, f) => /* @__PURE__ */ n(
|
|
1729
1782
|
"text",
|
|
1730
1783
|
{
|
|
1731
1784
|
className: Y.axisLabel,
|
|
1732
|
-
x:
|
|
1785
|
+
x: p(e === "bar" ? Z.centre[f] : b[f]),
|
|
1733
1786
|
y: r - we.bottom / 2,
|
|
1734
1787
|
textAnchor: "middle",
|
|
1735
1788
|
dominantBaseline: "middle",
|
|
1736
|
-
children:
|
|
1789
|
+
children: i
|
|
1737
1790
|
},
|
|
1738
|
-
`cat-${
|
|
1791
|
+
`cat-${i}-${f}`
|
|
1739
1792
|
)),
|
|
1740
|
-
e === "bar" && o.map((
|
|
1741
|
-
const
|
|
1742
|
-
if (typeof
|
|
1743
|
-
const
|
|
1793
|
+
e === "bar" && o.map((i, f) => /* @__PURE__ */ n("g", { children: t.map((S, O) => {
|
|
1794
|
+
const V = i.data[O];
|
|
1795
|
+
if (typeof V != "number") return null;
|
|
1796
|
+
const G = v[f][O], W = I(G + V), ee = I(G), ne = p(Z.centre[O]) - Z.width * z / 2, ie = U || o.length === 1 ? ne : ne + f * $, Je = Math.max(1, $ - (o.length > 1 && !U ? 2 : 0)), me = Math.max(1, Math.abs(ee - W)), Ie = D && O >= u;
|
|
1744
1797
|
return /* @__PURE__ */ n(
|
|
1745
1798
|
"path",
|
|
1746
1799
|
{
|
|
1747
|
-
className:
|
|
1748
|
-
d: ks(ie, Math.min(
|
|
1749
|
-
fill:
|
|
1750
|
-
color:
|
|
1751
|
-
"data-dim":
|
|
1752
|
-
onClick: () =>
|
|
1753
|
-
children: /* @__PURE__ */ n("title", { children: `${
|
|
1800
|
+
className: H(Y.bar, C && Y.clickable),
|
|
1801
|
+
d: ks(ie, Math.min(W, ee), Je, me, 4, V >= 0),
|
|
1802
|
+
fill: Ie ? `url(#${y}-hatch-${f})` : `url(#${y}-grad-${f})`,
|
|
1803
|
+
color: R(f),
|
|
1804
|
+
"data-dim": q && q.index !== O ? "" : void 0,
|
|
1805
|
+
onClick: () => d(f, O),
|
|
1806
|
+
children: /* @__PURE__ */ n("title", { children: `${i.name}, ${S}: ${c(V)}${Ie ? " so far" : ""}` })
|
|
1754
1807
|
},
|
|
1755
|
-
`bar-${S}-${
|
|
1808
|
+
`bar-${S}-${O}`
|
|
1756
1809
|
);
|
|
1757
|
-
}) }, `bars-${
|
|
1758
|
-
e !== "bar" && o.map((
|
|
1810
|
+
}) }, `bars-${i.name}-${f}`)),
|
|
1811
|
+
e !== "bar" && o.map((i, f) => {
|
|
1759
1812
|
const S = [];
|
|
1760
|
-
let
|
|
1761
|
-
return
|
|
1762
|
-
if (typeof
|
|
1763
|
-
|
|
1813
|
+
let O = [];
|
|
1814
|
+
return i.data.forEach((V, G) => {
|
|
1815
|
+
if (typeof V != "number") {
|
|
1816
|
+
O.length && S.push(O), O = [];
|
|
1764
1817
|
return;
|
|
1765
1818
|
}
|
|
1766
|
-
|
|
1767
|
-
}),
|
|
1768
|
-
S.map((
|
|
1769
|
-
const
|
|
1770
|
-
return /* @__PURE__ */
|
|
1771
|
-
ee && /* @__PURE__ */ n("path", { className: Y.area, d: ee, fill: `url(#${
|
|
1819
|
+
O.push({ i: G, value: V, base: v[f][G] });
|
|
1820
|
+
}), O.length && S.push(O), /* @__PURE__ */ E("g", { children: [
|
|
1821
|
+
S.map((V, G) => {
|
|
1822
|
+
const W = V.map((ne, ie) => `${ie === 0 ? "M" : "L"}${p(b[ne.i])},${I(ne.base + ne.value)}`).join(" "), ee = e === "area" ? `${W} L${p(b[V[V.length - 1].i])},${I(V[V.length - 1].base)} ` + V.slice().reverse().map((ne) => `L${p(b[ne.i])},${I(ne.base)}`).join(" ") + " Z" : null;
|
|
1823
|
+
return /* @__PURE__ */ E("g", { children: [
|
|
1824
|
+
ee && /* @__PURE__ */ n("path", { className: Y.area, d: ee, fill: `url(#${y}-area-${f})` }),
|
|
1772
1825
|
/* @__PURE__ */ n(
|
|
1773
1826
|
"path",
|
|
1774
1827
|
{
|
|
1775
1828
|
className: Y.line,
|
|
1776
|
-
d:
|
|
1777
|
-
stroke:
|
|
1778
|
-
color:
|
|
1829
|
+
d: W,
|
|
1830
|
+
stroke: R(f),
|
|
1831
|
+
color: R(f),
|
|
1779
1832
|
fill: "none",
|
|
1780
1833
|
pathLength: 1
|
|
1781
1834
|
}
|
|
1782
1835
|
)
|
|
1783
|
-
] }, `run-${
|
|
1836
|
+
] }, `run-${G}`);
|
|
1784
1837
|
}),
|
|
1785
|
-
|
|
1786
|
-
(
|
|
1838
|
+
i.data.map(
|
|
1839
|
+
(V, G) => typeof V == "number" ? /* @__PURE__ */ n(
|
|
1787
1840
|
"circle",
|
|
1788
1841
|
{
|
|
1789
|
-
className:
|
|
1790
|
-
cx:
|
|
1791
|
-
cy:
|
|
1842
|
+
className: H(Y.dot, C && Y.clickable),
|
|
1843
|
+
cx: p(b[G]),
|
|
1844
|
+
cy: I(v[f][G] + V),
|
|
1792
1845
|
r: 4,
|
|
1793
|
-
fill:
|
|
1794
|
-
color:
|
|
1795
|
-
"data-on": (
|
|
1796
|
-
onClick: () =>
|
|
1797
|
-
children: /* @__PURE__ */ n("title", { children: `${
|
|
1846
|
+
fill: R(f),
|
|
1847
|
+
color: R(f),
|
|
1848
|
+
"data-on": (q == null ? void 0 : q.index) === G ? "" : void 0,
|
|
1849
|
+
onClick: () => d(f, G),
|
|
1850
|
+
children: /* @__PURE__ */ n("title", { children: `${i.name}, ${t[G]}: ${c(V)}` })
|
|
1798
1851
|
},
|
|
1799
|
-
`dot-${
|
|
1852
|
+
`dot-${G}`
|
|
1800
1853
|
) : null
|
|
1801
1854
|
)
|
|
1802
|
-
] }, `line-${
|
|
1855
|
+
] }, `line-${i.name}-${f}`);
|
|
1803
1856
|
}),
|
|
1804
|
-
|
|
1857
|
+
q && /* @__PURE__ */ n(
|
|
1805
1858
|
"line",
|
|
1806
1859
|
{
|
|
1807
1860
|
className: Y.crosshair,
|
|
1808
|
-
x1:
|
|
1809
|
-
x2:
|
|
1861
|
+
x1: q.x,
|
|
1862
|
+
x2: q.x,
|
|
1810
1863
|
y1: we.top,
|
|
1811
|
-
y2: we.top +
|
|
1864
|
+
y2: we.top + B
|
|
1812
1865
|
}
|
|
1813
1866
|
)
|
|
1814
1867
|
]
|
|
1815
1868
|
}
|
|
1816
1869
|
),
|
|
1817
|
-
|
|
1870
|
+
q && /* @__PURE__ */ E(
|
|
1818
1871
|
"div",
|
|
1819
1872
|
{
|
|
1820
1873
|
className: Y.tooltip,
|
|
1821
|
-
style:
|
|
1874
|
+
style: q.x > k + z / 2 ? { right: Math.max(0, L - q.x + 12) } : { left: q.x + 12 },
|
|
1822
1875
|
role: "status",
|
|
1823
1876
|
children: [
|
|
1824
|
-
/* @__PURE__ */ n("p", { className: Y.tooltipHead, children: t[
|
|
1825
|
-
/* @__PURE__ */ n("ul", { className: Y.tooltipList, children: o.map((
|
|
1826
|
-
const S =
|
|
1827
|
-
return /* @__PURE__ */
|
|
1828
|
-
/* @__PURE__ */ n("span", { className: Y.swatch, style: { background:
|
|
1829
|
-
/* @__PURE__ */ n("span", { className: Y.tooltipName, children:
|
|
1830
|
-
/* @__PURE__ */
|
|
1877
|
+
/* @__PURE__ */ n("p", { className: Y.tooltipHead, children: t[q.index] }),
|
|
1878
|
+
/* @__PURE__ */ n("ul", { className: Y.tooltipList, children: o.map((i, f) => {
|
|
1879
|
+
const S = i.data[q.index];
|
|
1880
|
+
return /* @__PURE__ */ E("li", { className: Y.tooltipRow, children: [
|
|
1881
|
+
/* @__PURE__ */ n("span", { className: Y.swatch, style: { background: R(f) }, "aria-hidden": "true" }),
|
|
1882
|
+
/* @__PURE__ */ n("span", { className: Y.tooltipName, children: i.name }),
|
|
1883
|
+
/* @__PURE__ */ E("span", { className: Y.tooltipValue, children: [
|
|
1831
1884
|
typeof S == "number" ? c(S) : "—",
|
|
1832
|
-
q
|
|
1885
|
+
A(q.index) && typeof S == "number" && /* @__PURE__ */ n("span", { className: Y.partialNote, children: "so far" })
|
|
1833
1886
|
] })
|
|
1834
|
-
] },
|
|
1887
|
+
] }, i.name);
|
|
1835
1888
|
}) })
|
|
1836
1889
|
]
|
|
1837
1890
|
}
|
|
@@ -1839,32 +1892,32 @@ function Ol({
|
|
|
1839
1892
|
]
|
|
1840
1893
|
}
|
|
1841
1894
|
),
|
|
1842
|
-
|
|
1843
|
-
/* @__PURE__ */ n("span", { className: Y.swatch, style: { background:
|
|
1844
|
-
|
|
1845
|
-
] },
|
|
1846
|
-
/* @__PURE__ */
|
|
1847
|
-
/* @__PURE__ */ n("caption", { children:
|
|
1848
|
-
/* @__PURE__ */ n("thead", { children: /* @__PURE__ */
|
|
1895
|
+
w && /* @__PURE__ */ n("ul", { className: Y.legend, children: o.map((i, f) => /* @__PURE__ */ E("li", { className: Y.legendItem, children: [
|
|
1896
|
+
/* @__PURE__ */ n("span", { className: Y.swatch, style: { background: R(f) }, "aria-hidden": "true" }),
|
|
1897
|
+
i.name
|
|
1898
|
+
] }, i.name)) }),
|
|
1899
|
+
/* @__PURE__ */ E("table", { className: Y.data, id: y, children: [
|
|
1900
|
+
/* @__PURE__ */ n("caption", { children: M ?? "Chart data" }),
|
|
1901
|
+
/* @__PURE__ */ n("thead", { children: /* @__PURE__ */ E("tr", { children: [
|
|
1849
1902
|
/* @__PURE__ */ n("th", { scope: "col", children: "Category" }),
|
|
1850
|
-
o.map((
|
|
1903
|
+
o.map((i) => /* @__PURE__ */ n("th", { scope: "col", children: i.name }, i.name))
|
|
1851
1904
|
] }) }),
|
|
1852
|
-
/* @__PURE__ */ n("tbody", { children: t.map((
|
|
1853
|
-
/* @__PURE__ */ n("th", { scope: "row", children:
|
|
1854
|
-
o.map((S) => /* @__PURE__ */
|
|
1855
|
-
typeof S.data[
|
|
1856
|
-
|
|
1905
|
+
/* @__PURE__ */ n("tbody", { children: t.map((i, f) => /* @__PURE__ */ E("tr", { children: [
|
|
1906
|
+
/* @__PURE__ */ n("th", { scope: "row", children: i }),
|
|
1907
|
+
o.map((S) => /* @__PURE__ */ E("td", { children: [
|
|
1908
|
+
typeof S.data[f] == "number" ? c(S.data[f]) : "—",
|
|
1909
|
+
A(f) && typeof S.data[f] == "number" ? " so far" : ""
|
|
1857
1910
|
] }, S.name))
|
|
1858
|
-
] },
|
|
1911
|
+
] }, i)) })
|
|
1859
1912
|
] })
|
|
1860
1913
|
]
|
|
1861
1914
|
}
|
|
1862
1915
|
);
|
|
1863
1916
|
}
|
|
1864
|
-
const Es = "_root_1v7ph_8",
|
|
1917
|
+
const Es = "_root_1v7ph_8", Ds = "_row_1v7ph_15", Is = "_line_1v7ph_21", Hs = "_pressable_1v7ph_36", Ss = "_fill_1v7ph_50", Ts = "_label_1v7ph_58", qs = "_track_1v7ph_66", As = "_value_1v7ph_101", Os = "_percent_1v7ph_106", fe = {
|
|
1865
1918
|
root: Es,
|
|
1866
|
-
row:
|
|
1867
|
-
line:
|
|
1919
|
+
row: Ds,
|
|
1920
|
+
line: Is,
|
|
1868
1921
|
pressable: Hs,
|
|
1869
1922
|
fill: Ss,
|
|
1870
1923
|
label: Ts,
|
|
@@ -1884,37 +1937,37 @@ function Bl({
|
|
|
1884
1937
|
"aria-label": h,
|
|
1885
1938
|
...m
|
|
1886
1939
|
}) {
|
|
1887
|
-
const
|
|
1940
|
+
const u = t ?? Math.max(0, ...e.map((x) => x.value)), C = e.reduce((x, M) => x + (M.value > 0 ? M.value : 0), 0);
|
|
1888
1941
|
return /* @__PURE__ */ n(
|
|
1889
1942
|
"div",
|
|
1890
1943
|
{
|
|
1891
1944
|
...m,
|
|
1892
|
-
className:
|
|
1945
|
+
className: H(fe.root, c),
|
|
1893
1946
|
role: "list",
|
|
1894
1947
|
"aria-label": h,
|
|
1895
1948
|
"data-animated": l ? "" : void 0,
|
|
1896
|
-
children: e.map((
|
|
1897
|
-
const
|
|
1898
|
-
/* @__PURE__ */ n("span", { className: fe.label, children:
|
|
1949
|
+
children: e.map((x, M) => {
|
|
1950
|
+
const _ = u > 0 ? Math.max(0, x.value) / u : 0, y = C > 0 ? x.value / C * 100 : 0, g = x.color ?? (a ? Ke(M) : "var(--sp-chart-series-1-color)"), L = /* @__PURE__ */ E(he, { children: [
|
|
1951
|
+
/* @__PURE__ */ n("span", { className: fe.label, children: x.label }),
|
|
1899
1952
|
/* @__PURE__ */ n("span", { className: fe.track, children: /* @__PURE__ */ n(
|
|
1900
1953
|
"span",
|
|
1901
1954
|
{
|
|
1902
1955
|
className: fe.fill,
|
|
1903
1956
|
style: {
|
|
1904
|
-
width: `${
|
|
1957
|
+
width: `${_ * 100}%`,
|
|
1905
1958
|
background: g,
|
|
1906
1959
|
// Each row starts a little after the one above, so a poll
|
|
1907
1960
|
// reads as counting up rather than snapping into place.
|
|
1908
1961
|
// Capped, or a long list would still be filling when the
|
|
1909
1962
|
// reader has finished reading it.
|
|
1910
|
-
animationDelay: `${Math.min(
|
|
1963
|
+
animationDelay: `${Math.min(M * 60, 360)}ms`
|
|
1911
1964
|
}
|
|
1912
1965
|
}
|
|
1913
1966
|
) }),
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
-
r(
|
|
1916
|
-
o && /* @__PURE__ */
|
|
1917
|
-
Math.round(
|
|
1967
|
+
/* @__PURE__ */ E("span", { className: fe.value, children: [
|
|
1968
|
+
r(x.value),
|
|
1969
|
+
o && /* @__PURE__ */ E("span", { className: fe.percent, children: [
|
|
1970
|
+
Math.round(y),
|
|
1918
1971
|
"%"
|
|
1919
1972
|
] })
|
|
1920
1973
|
] })
|
|
@@ -1923,16 +1976,16 @@ function Bl({
|
|
|
1923
1976
|
"button",
|
|
1924
1977
|
{
|
|
1925
1978
|
type: "button",
|
|
1926
|
-
className:
|
|
1927
|
-
onClick: () => s(
|
|
1928
|
-
children:
|
|
1979
|
+
className: H(fe.line, fe.pressable),
|
|
1980
|
+
onClick: () => s(x, M),
|
|
1981
|
+
children: L
|
|
1929
1982
|
}
|
|
1930
|
-
) : /* @__PURE__ */ n("span", { className: fe.line, children:
|
|
1983
|
+
) : /* @__PURE__ */ n("span", { className: fe.line, children: L }) }, `${x.label}-${M}`);
|
|
1931
1984
|
})
|
|
1932
1985
|
}
|
|
1933
1986
|
);
|
|
1934
1987
|
}
|
|
1935
|
-
const Bs = "_root_ep6xn_6", Zs = "_svg_ep6xn_15", Vs = "_face_ep6xn_24", Ws = "_hole_ep6xn_25", Ps = "_slice_ep6xn_35", Fs = "_sweep_ep6xn_57", js = "_clickable_ep6xn_70", Gs = "_total_ep6xn_76", Us = "_totalLabel_ep6xn_84",
|
|
1988
|
+
const Bs = "_root_ep6xn_6", Zs = "_svg_ep6xn_15", Vs = "_face_ep6xn_24", Ws = "_hole_ep6xn_25", Ps = "_slice_ep6xn_35", Fs = "_sweep_ep6xn_57", js = "_clickable_ep6xn_70", Gs = "_total_ep6xn_76", Us = "_totalLabel_ep6xn_84", Xs = "_legend_ep6xn_89", Ks = "_legendItem_ep6xn_98", Ys = "_legendName_ep6xn_113", Qs = "_legendValue_ep6xn_121", Js = "_legendPercent_ep6xn_126", ea = "_swatch_ep6xn_131", oe = {
|
|
1936
1989
|
root: Bs,
|
|
1937
1990
|
svg: Zs,
|
|
1938
1991
|
face: Vs,
|
|
@@ -1942,8 +1995,8 @@ const Bs = "_root_ep6xn_6", Zs = "_svg_ep6xn_15", Vs = "_face_ep6xn_24", Ws = "_
|
|
|
1942
1995
|
clickable: js,
|
|
1943
1996
|
total: Gs,
|
|
1944
1997
|
totalLabel: Us,
|
|
1945
|
-
legend:
|
|
1946
|
-
legendItem:
|
|
1998
|
+
legend: Xs,
|
|
1999
|
+
legendItem: Ks,
|
|
1947
2000
|
legendName: Ys,
|
|
1948
2001
|
legendValue: Qs,
|
|
1949
2002
|
legendPercent: Js,
|
|
@@ -1963,18 +2016,18 @@ function Zl({
|
|
|
1963
2016
|
onSliceClick: c,
|
|
1964
2017
|
className: h,
|
|
1965
2018
|
"aria-label": m,
|
|
1966
|
-
...
|
|
2019
|
+
...u
|
|
1967
2020
|
}) {
|
|
1968
|
-
const [C,
|
|
1969
|
-
let
|
|
1970
|
-
const X =
|
|
1971
|
-
const
|
|
1972
|
-
|
|
1973
|
-
const
|
|
1974
|
-
return { slice: D, index:
|
|
1975
|
-
}),
|
|
1976
|
-
return /* @__PURE__ */
|
|
1977
|
-
/* @__PURE__ */
|
|
2021
|
+
const [C, x] = Q(null), M = se(), _ = e.filter((D) => D.value > 0), y = _.reduce((D, A) => D + A.value, 0), g = r / 2, L = g - 2, T = t ? L * 0.62 : 0;
|
|
2022
|
+
let q = 0;
|
|
2023
|
+
const X = _.map((D, A) => {
|
|
2024
|
+
const F = y > 0 ? D.value / y : 0, K = q;
|
|
2025
|
+
q += F;
|
|
2026
|
+
const k = ke(g, L, K), z = ke(g, L, q), B = F > 0.5 ? 1 : 0, j = F >= 0.999, p = j ? t ? `M${g},${g - L} A${L},${L} 0 1 1 ${g - 0.01},${g - L} Z M${g},${g - T} A${T},${T} 0 1 0 ${g + 0.01},${g - T} Z` : `M${g},${g - L} A${L},${L} 0 1 1 ${g - 0.01},${g - L} Z` : t ? `M${k.x},${k.y} A${L},${L} 0 ${B} 1 ${z.x},${z.y} L${ke(g, T, q).x},${ke(g, T, q).y} A${T},${T} 0 ${B} 0 ${ke(g, T, K).x},${ke(g, T, K).y} Z` : `M${g},${g} L${k.x},${k.y} A${L},${L} 0 ${B} 1 ${z.x},${z.y} Z`;
|
|
2027
|
+
return { slice: D, index: A, d: p, fraction: F, fillRule: j && t ? "evenodd" : void 0 };
|
|
2028
|
+
}), U = (D) => e.indexOf(D);
|
|
2029
|
+
return /* @__PURE__ */ E("div", { ...u, className: H(oe.root, h), "data-animated": l ? "" : void 0, children: [
|
|
2030
|
+
/* @__PURE__ */ E(
|
|
1978
2031
|
"svg",
|
|
1979
2032
|
{
|
|
1980
2033
|
className: oe.svg,
|
|
@@ -1984,35 +2037,35 @@ function Zl({
|
|
|
1984
2037
|
role: "img",
|
|
1985
2038
|
"aria-label": m ?? "Pie chart",
|
|
1986
2039
|
children: [
|
|
1987
|
-
/* @__PURE__ */
|
|
1988
|
-
/* @__PURE__ */
|
|
2040
|
+
/* @__PURE__ */ E("defs", { children: [
|
|
2041
|
+
/* @__PURE__ */ E("radialGradient", { id: `${M}-face`, cx: "32%", cy: "26%", r: "78%", children: [
|
|
1989
2042
|
/* @__PURE__ */ n("stop", { offset: "0%", stopColor: "#fff", stopOpacity: "0.22" }),
|
|
1990
2043
|
/* @__PURE__ */ n("stop", { offset: "55%", stopColor: "#fff", stopOpacity: "0.04" }),
|
|
1991
2044
|
/* @__PURE__ */ n("stop", { offset: "100%", stopColor: "#000", stopOpacity: "0.28" })
|
|
1992
2045
|
] }),
|
|
1993
|
-
/* @__PURE__ */
|
|
2046
|
+
/* @__PURE__ */ E("radialGradient", { id: `${M}-edge`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
1994
2047
|
/* @__PURE__ */ n("stop", { offset: "88%", stopColor: "#000", stopOpacity: "0" }),
|
|
1995
2048
|
/* @__PURE__ */ n("stop", { offset: "100%", stopColor: "#000", stopOpacity: "0.45" })
|
|
1996
2049
|
] })
|
|
1997
2050
|
] }),
|
|
1998
|
-
/* @__PURE__ */
|
|
1999
|
-
X.map(({ slice: D, index:
|
|
2051
|
+
/* @__PURE__ */ E("g", { className: oe.sweep, children: [
|
|
2052
|
+
X.map(({ slice: D, index: A, d: F, fillRule: K }) => /* @__PURE__ */ n(
|
|
2000
2053
|
"path",
|
|
2001
2054
|
{
|
|
2002
|
-
className:
|
|
2003
|
-
d:
|
|
2004
|
-
fill: D.color ??
|
|
2055
|
+
className: H(oe.slice, c && oe.clickable),
|
|
2056
|
+
d: F,
|
|
2057
|
+
fill: D.color ?? Ke(U(D)),
|
|
2005
2058
|
fillRule: K,
|
|
2006
|
-
"data-dim": C !== null && C !==
|
|
2007
|
-
onPointerEnter: () =>
|
|
2008
|
-
onPointerLeave: () =>
|
|
2009
|
-
onClick: () => c == null ? void 0 : c(D,
|
|
2059
|
+
"data-dim": C !== null && C !== A ? "" : void 0,
|
|
2060
|
+
onPointerEnter: () => x(A),
|
|
2061
|
+
onPointerLeave: () => x(null),
|
|
2062
|
+
onClick: () => c == null ? void 0 : c(D, U(D)),
|
|
2010
2063
|
children: /* @__PURE__ */ n("title", { children: `${D.label}: ${s(D.value)}` })
|
|
2011
2064
|
},
|
|
2012
|
-
`${D.label}-${
|
|
2065
|
+
`${D.label}-${A}`
|
|
2013
2066
|
)),
|
|
2014
|
-
/* @__PURE__ */ n("circle", { className: oe.face, cx: g, cy: g, r:
|
|
2015
|
-
/* @__PURE__ */ n("circle", { className: oe.face, cx: g, cy: g, r:
|
|
2067
|
+
/* @__PURE__ */ n("circle", { className: oe.face, cx: g, cy: g, r: L, fill: `url(#${M}-face)` }),
|
|
2068
|
+
/* @__PURE__ */ n("circle", { className: oe.face, cx: g, cy: g, r: L, fill: `url(#${M}-edge)` }),
|
|
2016
2069
|
t && // The wall of the hole, so the middle reads as cut through the
|
|
2017
2070
|
// disc rather than printed on it.
|
|
2018
2071
|
/* @__PURE__ */ n(
|
|
@@ -2021,7 +2074,7 @@ function Zl({
|
|
|
2021
2074
|
className: oe.hole,
|
|
2022
2075
|
cx: g,
|
|
2023
2076
|
cy: g,
|
|
2024
|
-
r:
|
|
2077
|
+
r: T,
|
|
2025
2078
|
fill: "none",
|
|
2026
2079
|
stroke: "#000",
|
|
2027
2080
|
strokeOpacity: "0.45",
|
|
@@ -2029,38 +2082,38 @@ function Zl({
|
|
|
2029
2082
|
}
|
|
2030
2083
|
)
|
|
2031
2084
|
] }),
|
|
2032
|
-
t && /* @__PURE__ */
|
|
2033
|
-
/* @__PURE__ */ n("text", { className: oe.total, x: g, y: g - (o ? 6 : 0), textAnchor: "middle", dominantBaseline: "middle", children: s(C !== null ?
|
|
2034
|
-
o && /* @__PURE__ */ n("text", { className: oe.totalLabel, x: g, y: g + 14, textAnchor: "middle", dominantBaseline: "middle", children: C !== null ?
|
|
2085
|
+
t && /* @__PURE__ */ E(he, { children: [
|
|
2086
|
+
/* @__PURE__ */ n("text", { className: oe.total, x: g, y: g - (o ? 6 : 0), textAnchor: "middle", dominantBaseline: "middle", children: s(C !== null ? _[C].value : y) }),
|
|
2087
|
+
o && /* @__PURE__ */ n("text", { className: oe.totalLabel, x: g, y: g + 14, textAnchor: "middle", dominantBaseline: "middle", children: C !== null ? _[C].label : o })
|
|
2035
2088
|
] })
|
|
2036
2089
|
]
|
|
2037
2090
|
}
|
|
2038
2091
|
),
|
|
2039
|
-
a && /* @__PURE__ */ n("ul", { className: oe.legend, children:
|
|
2092
|
+
a && /* @__PURE__ */ n("ul", { className: oe.legend, children: _.map((D, A) => /* @__PURE__ */ E(
|
|
2040
2093
|
"li",
|
|
2041
2094
|
{
|
|
2042
2095
|
className: oe.legendItem,
|
|
2043
|
-
"data-dim": C !== null && C !==
|
|
2096
|
+
"data-dim": C !== null && C !== A ? "" : void 0,
|
|
2044
2097
|
children: [
|
|
2045
2098
|
/* @__PURE__ */ n(
|
|
2046
2099
|
"span",
|
|
2047
2100
|
{
|
|
2048
2101
|
className: oe.swatch,
|
|
2049
|
-
style: { background: D.color ??
|
|
2102
|
+
style: { background: D.color ?? Ke(U(D)) },
|
|
2050
2103
|
"aria-hidden": "true"
|
|
2051
2104
|
}
|
|
2052
2105
|
),
|
|
2053
2106
|
/* @__PURE__ */ n("span", { className: oe.legendName, children: D.label }),
|
|
2054
|
-
/* @__PURE__ */
|
|
2107
|
+
/* @__PURE__ */ E("span", { className: oe.legendValue, children: [
|
|
2055
2108
|
s(D.value),
|
|
2056
|
-
/* @__PURE__ */
|
|
2057
|
-
|
|
2109
|
+
/* @__PURE__ */ E("span", { className: oe.legendPercent, children: [
|
|
2110
|
+
y > 0 ? Math.round(D.value / y * 100) : 0,
|
|
2058
2111
|
"%"
|
|
2059
2112
|
] })
|
|
2060
2113
|
] })
|
|
2061
2114
|
]
|
|
2062
2115
|
},
|
|
2063
|
-
`${D.label}-${
|
|
2116
|
+
`${D.label}-${A}`
|
|
2064
2117
|
)) })
|
|
2065
2118
|
] });
|
|
2066
2119
|
}
|
|
@@ -2086,7 +2139,7 @@ function $t({
|
|
|
2086
2139
|
const s = P(null);
|
|
2087
2140
|
return te(() => {
|
|
2088
2141
|
s.current && (s.current.indeterminate = t === !0);
|
|
2089
|
-
}, [t]), /* @__PURE__ */
|
|
2142
|
+
}, [t]), /* @__PURE__ */ E(he, { children: [
|
|
2090
2143
|
/* @__PURE__ */ n(
|
|
2091
2144
|
"input",
|
|
2092
2145
|
{
|
|
@@ -2100,7 +2153,7 @@ function $t({
|
|
|
2100
2153
|
onChange: (c) => r(c.currentTarget.checked)
|
|
2101
2154
|
}
|
|
2102
2155
|
),
|
|
2103
|
-
/* @__PURE__ */
|
|
2156
|
+
/* @__PURE__ */ E("span", { className: re.box, "aria-hidden": "true", children: [
|
|
2104
2157
|
/* @__PURE__ */ n("svg", { className: re.tick, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ n(
|
|
2105
2158
|
"path",
|
|
2106
2159
|
{
|
|
@@ -2125,10 +2178,10 @@ function da({
|
|
|
2125
2178
|
"aria-label": a,
|
|
2126
2179
|
children: l
|
|
2127
2180
|
}) {
|
|
2128
|
-
return /* @__PURE__ */ n(wt.Provider, { value: { value: e, onValueChange: t, disabled: o }, children: /* @__PURE__ */ n("div", { role: "group", "aria-label": a, className:
|
|
2181
|
+
return /* @__PURE__ */ n(wt.Provider, { value: { value: e, onValueChange: t, disabled: o }, children: /* @__PURE__ */ n("div", { role: "group", "aria-label": a, className: H(re.root, r), children: l }) });
|
|
2129
2182
|
}
|
|
2130
2183
|
function ua({ value: e, disabled: t, children: o }) {
|
|
2131
|
-
const r =
|
|
2184
|
+
const r = De(wt);
|
|
2132
2185
|
if (!r) throw new Error("CheckboxGroup.Item must be inside a CheckboxGroup");
|
|
2133
2186
|
const a = t || r.disabled, l = r.value.includes(e), s = /* @__PURE__ */ n(
|
|
2134
2187
|
$t,
|
|
@@ -2139,7 +2192,7 @@ function ua({ value: e, disabled: t, children: o }) {
|
|
|
2139
2192
|
onToggle: (c) => r.onValueChange(c ? [...r.value, e] : r.value.filter((h) => h !== e))
|
|
2140
2193
|
}
|
|
2141
2194
|
);
|
|
2142
|
-
return o == null ? /* @__PURE__ */ n("span", { className: re.item, children: s }) : /* @__PURE__ */
|
|
2195
|
+
return o == null ? /* @__PURE__ */ n("span", { className: re.item, children: s }) : /* @__PURE__ */ E("label", { className: H(re.item, re.selfLabeled), children: [
|
|
2143
2196
|
s,
|
|
2144
2197
|
/* @__PURE__ */ n("span", { className: re.label, children: o })
|
|
2145
2198
|
] });
|
|
@@ -2164,7 +2217,7 @@ function Wl({
|
|
|
2164
2217
|
onToggle: t
|
|
2165
2218
|
}
|
|
2166
2219
|
);
|
|
2167
|
-
return s == null ? /* @__PURE__ */ n("span", { className:
|
|
2220
|
+
return s == null ? /* @__PURE__ */ n("span", { className: H(re.item, a), children: c }) : /* @__PURE__ */ E("label", { className: H(re.item, re.selfLabeled, a), children: [
|
|
2168
2221
|
c,
|
|
2169
2222
|
/* @__PURE__ */ n("span", { className: re.label, children: s })
|
|
2170
2223
|
] });
|
|
@@ -2177,14 +2230,14 @@ const fa = "_root_mhh35_15", pa = "_item_mhh35_23", _a = "_selfLabeled_mhh35_32"
|
|
|
2177
2230
|
orb: ma,
|
|
2178
2231
|
burst: ga
|
|
2179
2232
|
}, yt = Ee(null);
|
|
2180
|
-
function
|
|
2233
|
+
function va({ value: e, onValueChange: t, disabled: o, className: r, children: a }) {
|
|
2181
2234
|
const l = se();
|
|
2182
|
-
return /* @__PURE__ */ n(yt.Provider, { value: { value: e, onValueChange: t, disabled: o, name: l }, children: /* @__PURE__ */ n("div", { role: "radiogroup", className:
|
|
2235
|
+
return /* @__PURE__ */ n(yt.Provider, { value: { value: e, onValueChange: t, disabled: o, name: l }, children: /* @__PURE__ */ n("div", { role: "radiogroup", className: H($e.root, r), children: a }) });
|
|
2183
2236
|
}
|
|
2184
|
-
function
|
|
2185
|
-
const r =
|
|
2237
|
+
function Ca({ value: e, disabled: t, children: o }) {
|
|
2238
|
+
const r = De(yt);
|
|
2186
2239
|
if (!r) throw new Error("RadioGroup.Item must be inside a RadioGroup");
|
|
2187
|
-
const a = t || r.disabled, l = /* @__PURE__ */
|
|
2240
|
+
const a = t || r.disabled, l = /* @__PURE__ */ E(he, { children: [
|
|
2188
2241
|
/* @__PURE__ */ n(
|
|
2189
2242
|
"input",
|
|
2190
2243
|
{
|
|
@@ -2197,14 +2250,14 @@ function va({ value: e, disabled: t, children: o }) {
|
|
|
2197
2250
|
onChange: () => r.onValueChange(e)
|
|
2198
2251
|
}
|
|
2199
2252
|
),
|
|
2200
|
-
/* @__PURE__ */ n("span", { className:
|
|
2253
|
+
/* @__PURE__ */ n("span", { className: H($e.orb, "spRadioOrb"), "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: $e.burst }) })
|
|
2201
2254
|
] });
|
|
2202
|
-
return o == null ? /* @__PURE__ */ n("span", { className: $e.item, children: l }) : /* @__PURE__ */
|
|
2255
|
+
return o == null ? /* @__PURE__ */ n("span", { className: $e.item, children: l }) : /* @__PURE__ */ E("label", { className: H($e.item, $e.selfLabeled), children: [
|
|
2203
2256
|
l,
|
|
2204
2257
|
o
|
|
2205
2258
|
] });
|
|
2206
2259
|
}
|
|
2207
|
-
const Pl = Object.assign(
|
|
2260
|
+
const Pl = Object.assign(va, { Item: Ca }), ba = "_progress_1cre6_16", wa = {
|
|
2208
2261
|
progress: ba
|
|
2209
2262
|
};
|
|
2210
2263
|
function Fl({ value: e, max: t = 100, className: o, style: r, ...a }) {
|
|
@@ -2217,7 +2270,7 @@ function Fl({ value: e, max: t = 100, className: o, style: r, ...a }) {
|
|
|
2217
2270
|
"aria-valuenow": e,
|
|
2218
2271
|
"aria-valuemin": 0,
|
|
2219
2272
|
"aria-valuemax": t,
|
|
2220
|
-
className:
|
|
2273
|
+
className: H(wa.progress, o),
|
|
2221
2274
|
style: r,
|
|
2222
2275
|
children: /* @__PURE__ */ n("div", { style: { width: `${l}%`, height: "100%" } })
|
|
2223
2276
|
}
|
|
@@ -2241,43 +2294,43 @@ const $a = "_message_ca22y_14", ya = "_info_ca22y_44", xa = "_warning_ca22y_49",
|
|
|
2241
2294
|
warning: { role: "status", live: "polite" },
|
|
2242
2295
|
alert: { role: "alert" }
|
|
2243
2296
|
}, jl = ae(function({ variant: t = "info", title: o, icon: r, className: a, children: l, ...s }, c) {
|
|
2244
|
-
const h = r === void 0 ? Ra[t] : r, { role: m, live:
|
|
2245
|
-
return /* @__PURE__ */
|
|
2297
|
+
const h = r === void 0 ? Ra[t] : r, { role: m, live: u } = Ea[t];
|
|
2298
|
+
return /* @__PURE__ */ E(
|
|
2246
2299
|
"div",
|
|
2247
2300
|
{
|
|
2248
2301
|
...s,
|
|
2249
2302
|
ref: c,
|
|
2250
2303
|
role: m,
|
|
2251
|
-
"aria-live":
|
|
2252
|
-
className:
|
|
2304
|
+
"aria-live": u,
|
|
2305
|
+
className: H(ze.message, ze[t], a),
|
|
2253
2306
|
children: [
|
|
2254
2307
|
h != null && /* @__PURE__ */ n("span", { className: ze.icon, "aria-hidden": "true", children: h }),
|
|
2255
|
-
/* @__PURE__ */
|
|
2308
|
+
/* @__PURE__ */ E("div", { className: ze.body, children: [
|
|
2256
2309
|
o != null && /* @__PURE__ */ n("p", { className: ze.title, children: o }),
|
|
2257
2310
|
l != null && /* @__PURE__ */ n("div", { className: ze.text, children: l })
|
|
2258
2311
|
] })
|
|
2259
2312
|
]
|
|
2260
2313
|
}
|
|
2261
2314
|
);
|
|
2262
|
-
}),
|
|
2263
|
-
dialog:
|
|
2264
|
-
inner:
|
|
2315
|
+
}), Da = "_dialog_zbndh_2", Ia = "_inner_zbndh_71", Ha = "_size4_zbndh_76", Sa = "_title_zbndh_80", Ta = "_closeX_zbndh_88", Ze = {
|
|
2316
|
+
dialog: Da,
|
|
2317
|
+
inner: Ia,
|
|
2265
2318
|
size4: Ha,
|
|
2266
2319
|
title: Sa,
|
|
2267
2320
|
closeX: Ta
|
|
2268
2321
|
};
|
|
2269
2322
|
let Ue = 0;
|
|
2270
2323
|
const xt = Ee(null), We = () => {
|
|
2271
|
-
const e =
|
|
2324
|
+
const e = De(xt);
|
|
2272
2325
|
if (!e) throw new Error("Dialog parts must be inside a Dialog");
|
|
2273
2326
|
return e;
|
|
2274
2327
|
};
|
|
2275
2328
|
function Nt(e) {
|
|
2276
2329
|
return function({ open: o, onOpenChange: r, children: a }) {
|
|
2277
|
-
const [l, s] = Q(!1), c = o !== void 0, h = c ? o : l, m = (
|
|
2278
|
-
c || s(
|
|
2279
|
-
},
|
|
2280
|
-
return /* @__PURE__ */ n(xt.Provider, { value: { open: h, setOpen: m, titleId:
|
|
2330
|
+
const [l, s] = Q(!1), c = o !== void 0, h = c ? o : l, m = (_) => {
|
|
2331
|
+
c || s(_), r == null || r(_);
|
|
2332
|
+
}, u = se(), C = se(), [x, M] = Q(!1);
|
|
2333
|
+
return /* @__PURE__ */ n(xt.Provider, { value: { open: h, setOpen: m, titleId: u, descId: C, alert: e, hasDesc: x, setHasDesc: M }, children: a });
|
|
2281
2334
|
};
|
|
2282
2335
|
}
|
|
2283
2336
|
const qa = Nt(!1), Mt = (e, t) => {
|
|
@@ -2305,8 +2358,8 @@ function at({
|
|
|
2305
2358
|
function kt({ size: e = "3", maxWidth: t, className: o, style: r, children: a, ...l }) {
|
|
2306
2359
|
const s = We(), c = P(null), h = P(!1), m = P(!1);
|
|
2307
2360
|
return te(() => {
|
|
2308
|
-
const
|
|
2309
|
-
|
|
2361
|
+
const u = c.current;
|
|
2362
|
+
u && (s.open && !u.open ? u.showModal() : !s.open && u.open && u.close());
|
|
2310
2363
|
}, [s.open]), te(() => {
|
|
2311
2364
|
if (s.open)
|
|
2312
2365
|
return Ue += 1, Ue === 1 && (document.body.style.overflow = "hidden"), () => {
|
|
@@ -2320,14 +2373,14 @@ function kt({ size: e = "3", maxWidth: t, className: o, style: r, children: a, .
|
|
|
2320
2373
|
role: s.alert ? "alertdialog" : void 0,
|
|
2321
2374
|
"aria-labelledby": s.titleId,
|
|
2322
2375
|
"aria-describedby": s.hasDesc ? s.descId : void 0,
|
|
2323
|
-
className:
|
|
2376
|
+
className: H(Ze.dialog, "spDialog", e === "4" && Ze.size4, o),
|
|
2324
2377
|
style: { ...t ? { maxWidth: t } : null, ...r },
|
|
2325
|
-
onKeyDownCapture: (
|
|
2326
|
-
var C,
|
|
2327
|
-
|
|
2378
|
+
onKeyDownCapture: (u) => {
|
|
2379
|
+
var C, x;
|
|
2380
|
+
u.key === "Escape" && ((C = c.current) != null && C.querySelector("dialog[open]") || (x = c.current) != null && x.querySelector('[role="listbox"]:not([hidden])') && (h.current = !0));
|
|
2328
2381
|
},
|
|
2329
|
-
onCancel: (
|
|
2330
|
-
if (
|
|
2382
|
+
onCancel: (u) => {
|
|
2383
|
+
if (u.preventDefault(), h.current) {
|
|
2331
2384
|
h.current = !1;
|
|
2332
2385
|
return;
|
|
2333
2386
|
}
|
|
@@ -2336,13 +2389,13 @@ function kt({ size: e = "3", maxWidth: t, className: o, style: r, children: a, .
|
|
|
2336
2389
|
onClose: () => {
|
|
2337
2390
|
s.open && s.setOpen(!1);
|
|
2338
2391
|
},
|
|
2339
|
-
onPointerDown: (
|
|
2340
|
-
m.current =
|
|
2392
|
+
onPointerDown: (u) => {
|
|
2393
|
+
m.current = u.target === c.current;
|
|
2341
2394
|
},
|
|
2342
|
-
onClick: (
|
|
2343
|
-
!s.alert &&
|
|
2395
|
+
onClick: (u) => {
|
|
2396
|
+
!s.alert && u.target === c.current && m.current && s.setOpen(!1);
|
|
2344
2397
|
},
|
|
2345
|
-
children: /* @__PURE__ */
|
|
2398
|
+
children: /* @__PURE__ */ E("div", { className: Ze.inner, children: [
|
|
2346
2399
|
!s.alert && /* @__PURE__ */ n(
|
|
2347
2400
|
"button",
|
|
2348
2401
|
{
|
|
@@ -2360,7 +2413,7 @@ function kt({ size: e = "3", maxWidth: t, className: o, style: r, children: a, .
|
|
|
2360
2413
|
}
|
|
2361
2414
|
function zt({ className: e, ...t }) {
|
|
2362
2415
|
const o = We();
|
|
2363
|
-
return /* @__PURE__ */ n(sn, { as: "h2", size: "5", ...t, id: o.titleId, className:
|
|
2416
|
+
return /* @__PURE__ */ n(sn, { as: "h2", size: "5", ...t, id: o.titleId, className: H(Ze.title, e) });
|
|
2364
2417
|
}
|
|
2365
2418
|
function Rt(e) {
|
|
2366
2419
|
const t = We(), { setHasDesc: o } = t;
|
|
@@ -2386,54 +2439,54 @@ const Gl = Object.assign(qa, {
|
|
|
2386
2439
|
danger: Wa,
|
|
2387
2440
|
separator: Pa
|
|
2388
2441
|
}, Et = Ee(null), Fa = () => {
|
|
2389
|
-
const e =
|
|
2442
|
+
const e = De(Et);
|
|
2390
2443
|
if (!e) throw new Error("DropdownMenu parts must be inside a DropdownMenu");
|
|
2391
2444
|
return e;
|
|
2392
2445
|
};
|
|
2393
2446
|
function ja({ label: e, align: t = "start", children: o, ...r }) {
|
|
2394
|
-
const [a, l] = Q(!1), s = se(), c = P(null), h = P(null), m = P(null),
|
|
2395
|
-
|
|
2396
|
-
const C = pe((
|
|
2397
|
-
|
|
2398
|
-
}, []), [
|
|
2447
|
+
const [a, l] = Q(!1), s = se(), c = P(null), h = P(null), m = P(null), u = P(a);
|
|
2448
|
+
u.current = a;
|
|
2449
|
+
const C = pe((_) => {
|
|
2450
|
+
u.current !== _ && (u.current = _, l(_));
|
|
2451
|
+
}, []), [x, M] = Q(null);
|
|
2399
2452
|
return ye(() => {
|
|
2400
|
-
var
|
|
2401
|
-
const
|
|
2402
|
-
if (
|
|
2453
|
+
var y;
|
|
2454
|
+
const _ = h.current;
|
|
2455
|
+
if (_)
|
|
2403
2456
|
if (a) {
|
|
2404
2457
|
const g = c.current;
|
|
2405
2458
|
if (g) {
|
|
2406
|
-
const
|
|
2407
|
-
|
|
2459
|
+
const L = g.getBoundingClientRect(), T = t === "end" ? "auto" : L.left, q = t === "end" ? window.innerWidth - L.right : "auto";
|
|
2460
|
+
M({ top: L.bottom + 6, left: T, right: q });
|
|
2408
2461
|
}
|
|
2409
|
-
|
|
2410
|
-
} else
|
|
2462
|
+
_.showPopover(), (y = _.querySelector('[role="menuitem"]')) == null || y.focus();
|
|
2463
|
+
} else _.matches(":popover-open") && _.hidePopover();
|
|
2411
2464
|
}, [a, t]), te(() => {
|
|
2412
2465
|
if (!a) return;
|
|
2413
|
-
const
|
|
2414
|
-
return window.addEventListener("resize",
|
|
2415
|
-
}, [a]), /* @__PURE__ */
|
|
2466
|
+
const _ = () => C(!1);
|
|
2467
|
+
return window.addEventListener("resize", _), () => window.removeEventListener("resize", _);
|
|
2468
|
+
}, [a]), /* @__PURE__ */ E(Et.Provider, { value: { open: a, setOpen: C, menuId: s }, children: [
|
|
2416
2469
|
/* @__PURE__ */ n(
|
|
2417
|
-
|
|
2470
|
+
Xe,
|
|
2418
2471
|
{
|
|
2419
2472
|
...r,
|
|
2420
2473
|
ref: c,
|
|
2421
2474
|
"aria-haspopup": "menu",
|
|
2422
2475
|
"aria-expanded": a,
|
|
2423
2476
|
"aria-controls": s,
|
|
2424
|
-
onPointerDown: (
|
|
2425
|
-
var
|
|
2426
|
-
(
|
|
2477
|
+
onPointerDown: (_) => {
|
|
2478
|
+
var y;
|
|
2479
|
+
(y = r.onPointerDown) == null || y.call(r, _), m.current = !u.current;
|
|
2427
2480
|
},
|
|
2428
|
-
onKeyDown: (
|
|
2429
|
-
var
|
|
2430
|
-
(
|
|
2481
|
+
onKeyDown: (_) => {
|
|
2482
|
+
var y;
|
|
2483
|
+
(y = r.onKeyDown) == null || y.call(r, _), (_.key === "Enter" || _.key === " ") && (m.current = null);
|
|
2431
2484
|
},
|
|
2432
|
-
onClick: (
|
|
2485
|
+
onClick: (_) => {
|
|
2433
2486
|
var g;
|
|
2434
|
-
(g = r.onClick) == null || g.call(r,
|
|
2435
|
-
const
|
|
2436
|
-
m.current = null, C(
|
|
2487
|
+
(g = r.onClick) == null || g.call(r, _);
|
|
2488
|
+
const y = m.current ?? !u.current;
|
|
2489
|
+
m.current = null, C(y);
|
|
2437
2490
|
},
|
|
2438
2491
|
children: e
|
|
2439
2492
|
}
|
|
@@ -2446,20 +2499,20 @@ function ja({ label: e, align: t = "start", children: o, ...r }) {
|
|
|
2446
2499
|
role: "menu",
|
|
2447
2500
|
popover: "auto",
|
|
2448
2501
|
className: Ve.menu,
|
|
2449
|
-
style:
|
|
2450
|
-
top:
|
|
2451
|
-
left:
|
|
2452
|
-
right:
|
|
2502
|
+
style: x ? {
|
|
2503
|
+
top: x.top,
|
|
2504
|
+
left: x.left === "auto" ? "auto" : x.left,
|
|
2505
|
+
right: x.right === "auto" ? "auto" : x.right
|
|
2453
2506
|
} : void 0,
|
|
2454
|
-
onToggle: (
|
|
2455
|
-
|
|
2507
|
+
onToggle: (_) => {
|
|
2508
|
+
_.nativeEvent.newState === "closed" && C(!1);
|
|
2456
2509
|
},
|
|
2457
|
-
onKeyDown: (
|
|
2458
|
-
var
|
|
2459
|
-
const
|
|
2460
|
-
((
|
|
2461
|
-
), g =
|
|
2462
|
-
|
|
2510
|
+
onKeyDown: (_) => {
|
|
2511
|
+
var L, T, q, X, U, D;
|
|
2512
|
+
const y = Array.from(
|
|
2513
|
+
((L = h.current) == null ? void 0 : L.querySelectorAll('[role="menuitem"]')) ?? []
|
|
2514
|
+
), g = y.indexOf(document.activeElement);
|
|
2515
|
+
_.key === "ArrowDown" ? (_.preventDefault(), (T = y[Math.min(g + 1, y.length - 1)]) == null || T.focus()) : _.key === "ArrowUp" ? (_.preventDefault(), (q = y[Math.max(g - 1, 0)]) == null || q.focus()) : _.key === "Home" ? (_.preventDefault(), (X = y[0]) == null || X.focus()) : _.key === "End" ? (_.preventDefault(), (U = y[y.length - 1]) == null || U.focus()) : _.key === "Escape" && (C(!1), (D = c.current) == null || D.focus());
|
|
2463
2516
|
},
|
|
2464
2517
|
children: o
|
|
2465
2518
|
}
|
|
@@ -2472,50 +2525,50 @@ function Ga({
|
|
|
2472
2525
|
return /* @__PURE__ */ n("div", { className: Ve.label, children: e });
|
|
2473
2526
|
}
|
|
2474
2527
|
function Ua({ asChild: e, color: t, onSelect: o, children: r }) {
|
|
2475
|
-
const a = Fa(), l =
|
|
2528
|
+
const a = Fa(), l = H(Ve.item, t === "danger" && Ve.danger), s = () => {
|
|
2476
2529
|
a.setOpen(!1), o == null || o();
|
|
2477
2530
|
};
|
|
2478
2531
|
if (e && Re(r)) {
|
|
2479
2532
|
const c = r, {
|
|
2480
2533
|
className: h,
|
|
2481
2534
|
onClick: m,
|
|
2482
|
-
children:
|
|
2535
|
+
children: u,
|
|
2483
2536
|
role: C,
|
|
2484
|
-
tabIndex:
|
|
2485
|
-
...
|
|
2486
|
-
} = c.props,
|
|
2537
|
+
tabIndex: x,
|
|
2538
|
+
...M
|
|
2539
|
+
} = c.props, _ = c.ref;
|
|
2487
2540
|
return rt(
|
|
2488
2541
|
c.type,
|
|
2489
2542
|
{
|
|
2490
2543
|
key: c.key,
|
|
2491
|
-
ref:
|
|
2544
|
+
ref: _,
|
|
2492
2545
|
role: "menuitem",
|
|
2493
2546
|
tabIndex: -1,
|
|
2494
|
-
...
|
|
2495
|
-
className:
|
|
2496
|
-
onClick: (
|
|
2497
|
-
m == null || m(
|
|
2547
|
+
...M,
|
|
2548
|
+
className: H(l, h),
|
|
2549
|
+
onClick: (y) => {
|
|
2550
|
+
m == null || m(y), a.setOpen(!1);
|
|
2498
2551
|
}
|
|
2499
2552
|
},
|
|
2500
|
-
|
|
2553
|
+
u
|
|
2501
2554
|
);
|
|
2502
2555
|
}
|
|
2503
2556
|
return /* @__PURE__ */ n("button", { type: "button", role: "menuitem", tabIndex: -1, className: l, onClick: s, children: r });
|
|
2504
2557
|
}
|
|
2505
|
-
function
|
|
2558
|
+
function Xa() {
|
|
2506
2559
|
return /* @__PURE__ */ n("div", { role: "separator", className: Ve.separator });
|
|
2507
2560
|
}
|
|
2508
|
-
const
|
|
2509
|
-
list:
|
|
2561
|
+
const Xl = Object.assign(ja, { Item: Ua, Separator: Xa, Label: Ga }), Ka = "_list_1b44l_19", Ya = "_trigger_1b44l_28", Dt = {
|
|
2562
|
+
list: Ka,
|
|
2510
2563
|
trigger: Ya
|
|
2511
|
-
},
|
|
2512
|
-
const e =
|
|
2564
|
+
}, It = Ee(null), Ht = () => {
|
|
2565
|
+
const e = De(It);
|
|
2513
2566
|
if (!e) throw new Error("Tabs parts must be inside a Tabs");
|
|
2514
2567
|
return e;
|
|
2515
2568
|
};
|
|
2516
2569
|
function Qa({ value: e, onValueChange: t, className: o, children: r }) {
|
|
2517
2570
|
const a = se();
|
|
2518
|
-
return /* @__PURE__ */ n(
|
|
2571
|
+
return /* @__PURE__ */ n(It.Provider, { value: { value: e, onValueChange: t, id: a }, children: /* @__PURE__ */ n("div", { className: o, children: r }) });
|
|
2519
2572
|
}
|
|
2520
2573
|
function Ja({
|
|
2521
2574
|
children: e
|
|
@@ -2524,7 +2577,7 @@ function Ja({
|
|
|
2524
2577
|
"div",
|
|
2525
2578
|
{
|
|
2526
2579
|
role: "tablist",
|
|
2527
|
-
className:
|
|
2580
|
+
className: H(Dt.list, "spTabsList"),
|
|
2528
2581
|
onKeyDown: (t) => {
|
|
2529
2582
|
const o = Array.from(
|
|
2530
2583
|
t.currentTarget.querySelectorAll('[role="tab"]')
|
|
@@ -2566,7 +2619,7 @@ function el({ value: e, className: t, children: o, ...r }) {
|
|
|
2566
2619
|
"aria-controls": `${a.id}-panel-${e}`,
|
|
2567
2620
|
tabIndex: l ? 0 : -1,
|
|
2568
2621
|
"data-state": l ? "active" : "inactive",
|
|
2569
|
-
className:
|
|
2622
|
+
className: H(Dt.trigger, "spTabsTrigger", t),
|
|
2570
2623
|
onClick: () => a.onValueChange(e),
|
|
2571
2624
|
children: o
|
|
2572
2625
|
}
|
|
@@ -2579,7 +2632,7 @@ function tl({
|
|
|
2579
2632
|
const o = Ht();
|
|
2580
2633
|
return o.value !== e ? null : /* @__PURE__ */ n("div", { role: "tabpanel", id: `${o.id}-panel-${e}`, "aria-labelledby": `${o.id}-tab-${e}`, children: t });
|
|
2581
2634
|
}
|
|
2582
|
-
const
|
|
2635
|
+
const Kl = Object.assign(Qa, { List: Ja, Trigger: el, Content: tl }), nl = "_panel_5axce_9", ol = {
|
|
2583
2636
|
panel: nl
|
|
2584
2637
|
}, pt = 8, Be = 8, rl = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
2585
2638
|
function Yl({
|
|
@@ -2594,63 +2647,63 @@ function Yl({
|
|
|
2594
2647
|
onClick: h,
|
|
2595
2648
|
...m
|
|
2596
2649
|
}) {
|
|
2597
|
-
const [
|
|
2598
|
-
|
|
2599
|
-
const
|
|
2600
|
-
(
|
|
2601
|
-
|
|
2650
|
+
const [u, C] = Q(a), x = o !== void 0, M = x ? o : u, _ = se(), y = se(), g = P(null), L = P(null), [T, q] = Q(null), X = P(!1), U = P(!1), D = P(null), A = P(M);
|
|
2651
|
+
A.current = M;
|
|
2652
|
+
const F = pe(
|
|
2653
|
+
(k) => {
|
|
2654
|
+
A.current !== k && (A.current = k, x || C(k), r == null || r(k));
|
|
2602
2655
|
},
|
|
2603
|
-
[
|
|
2656
|
+
[x, r]
|
|
2604
2657
|
), K = pe(() => {
|
|
2605
|
-
const
|
|
2606
|
-
if (!
|
|
2607
|
-
const
|
|
2608
|
-
|
|
2609
|
-
const
|
|
2610
|
-
Math.max(
|
|
2611
|
-
Math.max(window.innerWidth -
|
|
2658
|
+
const k = g.current, z = L.current;
|
|
2659
|
+
if (!k || !z) return;
|
|
2660
|
+
const B = k.getBoundingClientRect(), j = z.offsetWidth, p = z.offsetHeight, I = B.bottom + pt, Z = B.top - p - pt, b = I + p <= window.innerHeight - Be, R = Z >= Be, w = l === "bottom" ? b || !R ? I : Z : R || !b ? Z : I, v = w === I ? "bottom" : "top";
|
|
2661
|
+
z.dataset.side = v;
|
|
2662
|
+
const N = s === "start" ? B.left : s === "end" ? B.right - j : B.left + B.width / 2 - j / 2, d = Math.min(
|
|
2663
|
+
Math.max(N, Be),
|
|
2664
|
+
Math.max(window.innerWidth - j - Be, Be)
|
|
2612
2665
|
);
|
|
2613
|
-
|
|
2614
|
-
(
|
|
2666
|
+
q(
|
|
2667
|
+
($) => $ && $.top === w && $.left === d && $.placed === v ? $ : { top: w, left: d, placed: v }
|
|
2615
2668
|
);
|
|
2616
2669
|
}, [l, s]);
|
|
2617
2670
|
return ye(() => {
|
|
2618
|
-
const
|
|
2619
|
-
|
|
2620
|
-
}, [
|
|
2621
|
-
if (!
|
|
2622
|
-
let
|
|
2623
|
-
const
|
|
2624
|
-
const
|
|
2625
|
-
if (
|
|
2626
|
-
const
|
|
2627
|
-
|
|
2671
|
+
const k = L.current;
|
|
2672
|
+
k && (M ? (Qe(k, K), K(), X.current && (X.current = !1, (k.querySelector(rl) ?? k).focus({ preventScroll: !0 }))) : k.matches(":popover-open") && k.hidePopover());
|
|
2673
|
+
}, [M, K]), te(() => {
|
|
2674
|
+
if (!M) return;
|
|
2675
|
+
let k = 0, z = "";
|
|
2676
|
+
const B = () => {
|
|
2677
|
+
const j = g.current, p = L.current;
|
|
2678
|
+
if (j && p) {
|
|
2679
|
+
const I = j.getBoundingClientRect(), Z = `${I.top}|${I.left}|${I.width}|${I.height}|${p.offsetWidth}|${p.offsetHeight}|${window.innerWidth}|${window.innerHeight}`;
|
|
2680
|
+
Z !== z && (z = Z, K());
|
|
2628
2681
|
}
|
|
2629
|
-
|
|
2682
|
+
k = requestAnimationFrame(B);
|
|
2630
2683
|
};
|
|
2631
|
-
return
|
|
2632
|
-
}, [
|
|
2684
|
+
return k = requestAnimationFrame(B), () => cancelAnimationFrame(k);
|
|
2685
|
+
}, [M, K]), /* @__PURE__ */ E(he, { children: [
|
|
2633
2686
|
/* @__PURE__ */ n(
|
|
2634
|
-
|
|
2687
|
+
Xe,
|
|
2635
2688
|
{
|
|
2636
2689
|
...m,
|
|
2637
2690
|
ref: g,
|
|
2638
|
-
id:
|
|
2691
|
+
id: _,
|
|
2639
2692
|
"aria-haspopup": "dialog",
|
|
2640
|
-
"aria-expanded":
|
|
2641
|
-
"aria-controls":
|
|
2642
|
-
onPointerDown: (
|
|
2643
|
-
var
|
|
2644
|
-
(
|
|
2693
|
+
"aria-expanded": M,
|
|
2694
|
+
"aria-controls": y,
|
|
2695
|
+
onPointerDown: (k) => {
|
|
2696
|
+
var z;
|
|
2697
|
+
(z = m.onPointerDown) == null || z.call(m, k), D.current = !A.current;
|
|
2645
2698
|
},
|
|
2646
|
-
onKeyDown: (
|
|
2647
|
-
var
|
|
2648
|
-
(
|
|
2699
|
+
onKeyDown: (k) => {
|
|
2700
|
+
var z;
|
|
2701
|
+
(z = m.onKeyDown) == null || z.call(m, k), (k.key === "Enter" || k.key === " ") && (D.current = null);
|
|
2649
2702
|
},
|
|
2650
|
-
onClick: (
|
|
2651
|
-
h == null || h(
|
|
2652
|
-
const
|
|
2653
|
-
D.current = null,
|
|
2703
|
+
onClick: (k) => {
|
|
2704
|
+
h == null || h(k);
|
|
2705
|
+
const z = D.current ?? !A.current;
|
|
2706
|
+
D.current = null, z && (X.current = !0), F(z);
|
|
2654
2707
|
},
|
|
2655
2708
|
children: e
|
|
2656
2709
|
}
|
|
@@ -2658,22 +2711,22 @@ function Yl({
|
|
|
2658
2711
|
/* @__PURE__ */ n(
|
|
2659
2712
|
"div",
|
|
2660
2713
|
{
|
|
2661
|
-
ref:
|
|
2662
|
-
id:
|
|
2714
|
+
ref: L,
|
|
2715
|
+
id: y,
|
|
2663
2716
|
popover: "auto",
|
|
2664
2717
|
role: "dialog",
|
|
2665
|
-
"aria-labelledby":
|
|
2718
|
+
"aria-labelledby": _,
|
|
2666
2719
|
tabIndex: -1,
|
|
2667
|
-
className:
|
|
2720
|
+
className: H(ol.panel, ue.spacePanel, c),
|
|
2668
2721
|
"data-animated": m.animated === !1 ? "false" : void 0,
|
|
2669
|
-
"data-side": (
|
|
2670
|
-
style:
|
|
2671
|
-
onKeyDown: (
|
|
2672
|
-
|
|
2722
|
+
"data-side": (T == null ? void 0 : T.placed) ?? l,
|
|
2723
|
+
style: T ? { top: T.top, left: T.left } : void 0,
|
|
2724
|
+
onKeyDown: (k) => {
|
|
2725
|
+
k.key === "Escape" && (U.current = !0, k.stopPropagation());
|
|
2673
2726
|
},
|
|
2674
|
-
onToggle: (
|
|
2675
|
-
var
|
|
2676
|
-
|
|
2727
|
+
onToggle: (k) => {
|
|
2728
|
+
var z;
|
|
2729
|
+
k.nativeEvent.newState === "closed" && (U.current && (U.current = !1, (z = g.current) == null || z.focus()), F(!1));
|
|
2677
2730
|
},
|
|
2678
2731
|
children: t
|
|
2679
2732
|
}
|
|
@@ -2687,7 +2740,7 @@ export {
|
|
|
2687
2740
|
Bl as BarList,
|
|
2688
2741
|
Rl as BookmarkIcon,
|
|
2689
2742
|
il as Box,
|
|
2690
|
-
|
|
2743
|
+
Xe as Button,
|
|
2691
2744
|
pl as Card,
|
|
2692
2745
|
El as Carousel,
|
|
2693
2746
|
Ol as Chart,
|
|
@@ -2701,23 +2754,23 @@ export {
|
|
|
2701
2754
|
kl as ChevronUpIcon,
|
|
2702
2755
|
Eo as CrossCircledIcon,
|
|
2703
2756
|
Gl as Dialog,
|
|
2704
|
-
|
|
2757
|
+
Xl as DropdownMenu,
|
|
2705
2758
|
bl as EnterFullScreenIcon,
|
|
2706
2759
|
Ro as ExclamationTriangleIcon,
|
|
2707
|
-
|
|
2760
|
+
Cl as ExitFullScreenIcon,
|
|
2708
2761
|
cl as Flex,
|
|
2709
2762
|
dl as Grid,
|
|
2710
2763
|
sn as Heading,
|
|
2711
|
-
|
|
2764
|
+
vl as HeartFilledIcon,
|
|
2712
2765
|
Ll as HeartIcon,
|
|
2713
2766
|
Hl as IconToggle,
|
|
2714
2767
|
zo as InfoCircledIcon,
|
|
2715
2768
|
ll as Link,
|
|
2716
|
-
|
|
2769
|
+
Il as Loader,
|
|
2717
2770
|
Ml as MagnifyingGlassIcon,
|
|
2718
2771
|
jl as Message,
|
|
2719
2772
|
Nl as MinusIcon,
|
|
2720
|
-
|
|
2773
|
+
Dl as Pagination,
|
|
2721
2774
|
gl as Pencil1Icon,
|
|
2722
2775
|
xl as PersonIcon,
|
|
2723
2776
|
Zl as PieChart,
|
|
@@ -2730,7 +2783,7 @@ export {
|
|
|
2730
2783
|
fl as Separator,
|
|
2731
2784
|
_l as Share2Icon,
|
|
2732
2785
|
Al as Slider,
|
|
2733
|
-
|
|
2786
|
+
Kl as Tabs,
|
|
2734
2787
|
Ut as Text,
|
|
2735
2788
|
Tl as TextArea,
|
|
2736
2789
|
it as TextField,
|