@overdoser/react-toolkit 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/index.css +1 -1
- package/index.js +629 -629
- package/index.layered.css +1 -1
- package/llms.txt +2 -0
- package/manifest.json +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -11,7 +11,7 @@ function zn(t) {
|
|
|
11
11
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
12
12
|
return r;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function f() {
|
|
15
15
|
for (var t, e, n = 0, r = "", o = arguments.length; n < o; n++) (t = arguments[n]) && (e = zn(t)) && (r && (r += " "), r += e);
|
|
16
16
|
return r;
|
|
17
17
|
}
|
|
@@ -52,14 +52,14 @@ const Sr = "crk-root-8RX49", Cr = "crk-loading-QfItr", Ir = "crk-primary-st6yY",
|
|
|
52
52
|
disabled: c,
|
|
53
53
|
classes: l,
|
|
54
54
|
className: a,
|
|
55
|
-
style:
|
|
56
|
-
children:
|
|
57
|
-
...
|
|
55
|
+
style: u,
|
|
56
|
+
children: d,
|
|
57
|
+
...h
|
|
58
58
|
}, m) => /* @__PURE__ */ Y(
|
|
59
59
|
"button",
|
|
60
60
|
{
|
|
61
61
|
ref: m,
|
|
62
|
-
className:
|
|
62
|
+
className: f(
|
|
63
63
|
Ot.root,
|
|
64
64
|
Ot[t],
|
|
65
65
|
Ot[e],
|
|
@@ -70,17 +70,17 @@ const Sr = "crk-root-8RX49", Cr = "crk-loading-QfItr", Ir = "crk-primary-st6yY",
|
|
|
70
70
|
l?.root,
|
|
71
71
|
a
|
|
72
72
|
),
|
|
73
|
-
style:
|
|
73
|
+
style: u,
|
|
74
74
|
disabled: c || n,
|
|
75
75
|
"aria-busy": n || void 0,
|
|
76
|
-
...
|
|
76
|
+
...h,
|
|
77
77
|
children: [
|
|
78
|
-
/* @__PURE__ */ i("div", { className:
|
|
79
|
-
/* @__PURE__ */ i("span", { className:
|
|
80
|
-
/* @__PURE__ */ Y("span", { className:
|
|
81
|
-
/* @__PURE__ */ i("span", { className:
|
|
82
|
-
/* @__PURE__ */ i("span", { className:
|
|
83
|
-
/* @__PURE__ */ i("span", { className:
|
|
78
|
+
/* @__PURE__ */ i("div", { className: f(Ot.shimmer, l?.shimmer) }),
|
|
79
|
+
/* @__PURE__ */ i("span", { className: f(Ot.content, l?.content), children: d }),
|
|
80
|
+
/* @__PURE__ */ Y("span", { className: f(Ot.dots, l?.dots), "aria-hidden": "true", children: [
|
|
81
|
+
/* @__PURE__ */ i("span", { className: f(Ot.dot, l?.dot) }),
|
|
82
|
+
/* @__PURE__ */ i("span", { className: f(Ot.dot, l?.dot) }),
|
|
83
|
+
/* @__PURE__ */ i("span", { className: f(Ot.dot, l?.dot) })
|
|
84
84
|
] })
|
|
85
85
|
]
|
|
86
86
|
}
|
|
@@ -109,7 +109,7 @@ const Qr = "crk-root-2j4Vp", Jr = "crk-muted-vReNc", to = "crk-danger-ugf9r", eo
|
|
|
109
109
|
"a",
|
|
110
110
|
{
|
|
111
111
|
ref: l,
|
|
112
|
-
className:
|
|
112
|
+
className: f(Oe.root, Oe[t], r),
|
|
113
113
|
style: o,
|
|
114
114
|
...e && {
|
|
115
115
|
target: "_blank",
|
|
@@ -184,11 +184,11 @@ const oo = "crk-root-U-oiq", co = "crk-h1-Aivwz", so = "crk-h2-CV8Oo", io = "crk
|
|
|
184
184
|
style: c,
|
|
185
185
|
children: l,
|
|
186
186
|
...a
|
|
187
|
-
},
|
|
187
|
+
}, u) => Mr(
|
|
188
188
|
t,
|
|
189
189
|
{
|
|
190
|
-
ref:
|
|
191
|
-
className:
|
|
190
|
+
ref: u,
|
|
191
|
+
className: f(
|
|
192
192
|
fe.root,
|
|
193
193
|
fe[t],
|
|
194
194
|
e && fe[e],
|
|
@@ -225,7 +225,7 @@ const Ro = "crk-root-PVrgx", Do = "crk-unordered-FhCWT", So = "crk-item-TfW82",
|
|
|
225
225
|
t === "ordered" ? "ol" : "ul",
|
|
226
226
|
{
|
|
227
227
|
ref: c,
|
|
228
|
-
className:
|
|
228
|
+
className: f(
|
|
229
229
|
Xe.root,
|
|
230
230
|
Xe[t],
|
|
231
231
|
Xe[e],
|
|
@@ -243,7 +243,7 @@ const Po = pt(
|
|
|
243
243
|
"li",
|
|
244
244
|
{
|
|
245
245
|
ref: o,
|
|
246
|
-
className:
|
|
246
|
+
className: f(Xe.item, t),
|
|
247
247
|
style: e,
|
|
248
248
|
...r,
|
|
249
249
|
children: n
|
|
@@ -281,37 +281,37 @@ function ic(t, e) {
|
|
|
281
281
|
}
|
|
282
282
|
function lc(t, e = []) {
|
|
283
283
|
const [n, r] = ut(e), o = G((a) => {
|
|
284
|
-
r((
|
|
285
|
-
const
|
|
286
|
-
return
|
|
284
|
+
r((u) => {
|
|
285
|
+
const d = u.find((h) => h.key === a);
|
|
286
|
+
return d ? d.direction === "asc" ? [{ key: a, direction: "desc" }] : [] : [{ key: a, direction: "asc" }];
|
|
287
287
|
});
|
|
288
288
|
}, []), s = G((a) => {
|
|
289
|
-
r((
|
|
290
|
-
const
|
|
291
|
-
if (
|
|
292
|
-
return [...
|
|
293
|
-
if (d
|
|
294
|
-
const m = [...
|
|
295
|
-
return m[
|
|
289
|
+
r((u) => {
|
|
290
|
+
const d = u.findIndex((m) => m.key === a);
|
|
291
|
+
if (d === -1)
|
|
292
|
+
return [...u, { key: a, direction: "asc" }];
|
|
293
|
+
if (u[d].direction === "asc") {
|
|
294
|
+
const m = [...u];
|
|
295
|
+
return m[d] = { key: a, direction: "desc" }, m;
|
|
296
296
|
}
|
|
297
|
-
return
|
|
297
|
+
return u.filter((m, k) => k !== d);
|
|
298
298
|
});
|
|
299
299
|
}, []), c = G(() => {
|
|
300
300
|
r([]);
|
|
301
301
|
}, []);
|
|
302
|
-
return { sortedData: wt(() => n.length === 0 ? t : [...t].sort((a,
|
|
303
|
-
for (const { key:
|
|
304
|
-
const m = ic(a[
|
|
302
|
+
return { sortedData: wt(() => n.length === 0 ? t : [...t].sort((a, u) => {
|
|
303
|
+
for (const { key: d, direction: h } of n) {
|
|
304
|
+
const m = ic(a[d], u[d]);
|
|
305
305
|
if (m !== 0)
|
|
306
|
-
return
|
|
306
|
+
return h === "asc" ? m : -m;
|
|
307
307
|
}
|
|
308
308
|
return 0;
|
|
309
309
|
}), [t, n]), sortConfig: n, requestSort: o, requestMultiSort: s, resetSort: c };
|
|
310
310
|
}
|
|
311
311
|
function ac({ direction: t, sortIndex: e }) {
|
|
312
312
|
return /* @__PURE__ */ Y("span", { className: Mt.sortIndicator, "aria-hidden": "true", children: [
|
|
313
|
-
/* @__PURE__ */ i("span", { className:
|
|
314
|
-
/* @__PURE__ */ i("span", { className:
|
|
313
|
+
/* @__PURE__ */ i("span", { className: f(Mt.sortArrow, t === "asc" && Mt.sortArrowActive), children: "▲" }),
|
|
314
|
+
/* @__PURE__ */ i("span", { className: f(Mt.sortArrow, t === "desc" && Mt.sortArrowActive), children: "▼" }),
|
|
315
315
|
e !== void 0 && e >= 0 && /* @__PURE__ */ i("span", { className: Mt.sortIndex, children: e + 1 })
|
|
316
316
|
] });
|
|
317
317
|
}
|
|
@@ -323,19 +323,19 @@ function dc({
|
|
|
323
323
|
onPageChange: o,
|
|
324
324
|
paginatorClasses: s
|
|
325
325
|
}) {
|
|
326
|
-
const c = Math.max(1, Math.ceil(n / e)), l = (t - 1) * e + 1, a = Math.min(t * e, n),
|
|
327
|
-
const
|
|
326
|
+
const c = Math.max(1, Math.ceil(n / e)), l = (t - 1) * e + 1, a = Math.min(t * e, n), u = wt(() => {
|
|
327
|
+
const d = [];
|
|
328
328
|
if (c <= 7)
|
|
329
|
-
for (let
|
|
329
|
+
for (let h = 1; h <= c; h++) d.push(h);
|
|
330
330
|
else {
|
|
331
|
-
|
|
332
|
-
for (let
|
|
333
|
-
|
|
334
|
-
t < c - 2 &&
|
|
331
|
+
d.push(1), t > 3 && d.push("ellipsis");
|
|
332
|
+
for (let h = Math.max(2, t - 1); h <= Math.min(c - 1, t + 1); h++)
|
|
333
|
+
d.push(h);
|
|
334
|
+
t < c - 2 && d.push("ellipsis"), d.push(c);
|
|
335
335
|
}
|
|
336
|
-
return
|
|
336
|
+
return d;
|
|
337
337
|
}, [t, c]);
|
|
338
|
-
return /* @__PURE__ */ Y("nav", { className:
|
|
338
|
+
return /* @__PURE__ */ Y("nav", { className: f(Mt.paginator, s?.paginator), "aria-label": "Table pagination", children: [
|
|
339
339
|
/* @__PURE__ */ Y("div", { className: Mt.paginatorInfo, children: [
|
|
340
340
|
/* @__PURE__ */ i("span", { className: Mt.paginatorText, children: n > 0 ? `${l}–${a} of ${n}` : "No results" }),
|
|
341
341
|
r.length > 1 && /* @__PURE__ */ i(
|
|
@@ -343,12 +343,12 @@ function dc({
|
|
|
343
343
|
{
|
|
344
344
|
className: Mt.pageSizeSelect,
|
|
345
345
|
value: e,
|
|
346
|
-
onChange: (
|
|
346
|
+
onChange: (d) => o(1, Number(d.target.value)),
|
|
347
347
|
"aria-label": "Rows per page",
|
|
348
|
-
children: r.map((
|
|
349
|
-
|
|
348
|
+
children: r.map((d) => /* @__PURE__ */ Y("option", { value: d, children: [
|
|
349
|
+
d,
|
|
350
350
|
" / page"
|
|
351
|
-
] },
|
|
351
|
+
] }, d))
|
|
352
352
|
}
|
|
353
353
|
)
|
|
354
354
|
] }),
|
|
@@ -357,32 +357,32 @@ function dc({
|
|
|
357
357
|
"button",
|
|
358
358
|
{
|
|
359
359
|
type: "button",
|
|
360
|
-
className:
|
|
360
|
+
className: f(Mt.pageButton, s?.pageButton),
|
|
361
361
|
disabled: t <= 1,
|
|
362
362
|
onClick: () => o(t - 1, e),
|
|
363
363
|
"aria-label": "Previous page",
|
|
364
364
|
children: "‹"
|
|
365
365
|
}
|
|
366
366
|
),
|
|
367
|
-
|
|
368
|
-
(
|
|
367
|
+
u.map(
|
|
368
|
+
(d, h) => d === "ellipsis" ? /* @__PURE__ */ i("span", { className: Mt.pageEllipsis, children: "…" }, `ellipsis-${h}`) : /* @__PURE__ */ i(
|
|
369
369
|
"button",
|
|
370
370
|
{
|
|
371
371
|
type: "button",
|
|
372
|
-
className:
|
|
373
|
-
onClick: () => o(
|
|
374
|
-
"aria-label": `Page ${
|
|
375
|
-
"aria-current":
|
|
376
|
-
children:
|
|
372
|
+
className: f(Mt.pageButton, d === t && Mt.pageButtonActive, s?.pageButton),
|
|
373
|
+
onClick: () => o(d, e),
|
|
374
|
+
"aria-label": `Page ${d}`,
|
|
375
|
+
"aria-current": d === t ? "page" : void 0,
|
|
376
|
+
children: d
|
|
377
377
|
},
|
|
378
|
-
|
|
378
|
+
d
|
|
379
379
|
)
|
|
380
380
|
),
|
|
381
381
|
/* @__PURE__ */ i(
|
|
382
382
|
"button",
|
|
383
383
|
{
|
|
384
384
|
type: "button",
|
|
385
|
-
className:
|
|
385
|
+
className: f(Mt.pageButton, s?.pageButton),
|
|
386
386
|
disabled: t >= c,
|
|
387
387
|
onClick: () => o(t + 1, e),
|
|
388
388
|
"aria-label": "Next page",
|
|
@@ -402,9 +402,9 @@ function uc({
|
|
|
402
402
|
hoverable: c = !1,
|
|
403
403
|
compact: l = !1,
|
|
404
404
|
className: a,
|
|
405
|
-
style:
|
|
406
|
-
rowKey:
|
|
407
|
-
rowClassName:
|
|
405
|
+
style: u,
|
|
406
|
+
rowKey: d,
|
|
407
|
+
rowClassName: h,
|
|
408
408
|
rowStyle: m,
|
|
409
409
|
emptyMessage: k = "No data",
|
|
410
410
|
pagination: w,
|
|
@@ -449,11 +449,11 @@ function uc({
|
|
|
449
449
|
const C = A.findIndex((N) => N.key === $);
|
|
450
450
|
return C >= 0 ? C : void 0;
|
|
451
451
|
};
|
|
452
|
-
return /* @__PURE__ */ Y("div", { className:
|
|
452
|
+
return /* @__PURE__ */ Y("div", { className: f(Mt.wrapper, b?.wrapper), children: [
|
|
453
453
|
/* @__PURE__ */ Y(
|
|
454
454
|
"table",
|
|
455
455
|
{
|
|
456
|
-
className:
|
|
456
|
+
className: f(
|
|
457
457
|
Mt.root,
|
|
458
458
|
s && Mt.striped,
|
|
459
459
|
c && Mt.hoverable,
|
|
@@ -461,12 +461,12 @@ function uc({
|
|
|
461
461
|
b?.root,
|
|
462
462
|
a
|
|
463
463
|
),
|
|
464
|
-
style:
|
|
464
|
+
style: u,
|
|
465
465
|
children: [
|
|
466
466
|
/* @__PURE__ */ i("thead", { children: /* @__PURE__ */ i("tr", { children: e.map(($) => /* @__PURE__ */ Y(
|
|
467
467
|
"th",
|
|
468
468
|
{
|
|
469
|
-
className:
|
|
469
|
+
className: f(
|
|
470
470
|
Mt.headerCell,
|
|
471
471
|
$.sortable && Mt.headerCellSortable,
|
|
472
472
|
b?.headerCell
|
|
@@ -490,17 +490,17 @@ function uc({
|
|
|
490
490
|
},
|
|
491
491
|
$.key
|
|
492
492
|
)) }) }),
|
|
493
|
-
/* @__PURE__ */ i("tbody", { children: x.length === 0 ? /* @__PURE__ */ i("tr", { className: Mt.emptyRow, children: /* @__PURE__ */ i("td", { className:
|
|
494
|
-
const N =
|
|
493
|
+
/* @__PURE__ */ i("tbody", { children: x.length === 0 ? /* @__PURE__ */ i("tr", { className: Mt.emptyRow, children: /* @__PURE__ */ i("td", { className: f(Mt.emptyCell, b?.emptyCell), colSpan: e.length, children: k }) }) : x.map(($, C) => {
|
|
494
|
+
const N = d ? String($[d]) : C, P = typeof h == "function" ? h($, C) : h, R = typeof m == "function" ? m($, C) : m;
|
|
495
495
|
return /* @__PURE__ */ i(
|
|
496
496
|
"tr",
|
|
497
497
|
{
|
|
498
|
-
className:
|
|
498
|
+
className: f(Mt.row, b?.row, P),
|
|
499
499
|
style: R,
|
|
500
500
|
children: e.map((q) => /* @__PURE__ */ i(
|
|
501
501
|
"td",
|
|
502
502
|
{
|
|
503
|
-
className:
|
|
503
|
+
className: f(Mt.cell, b?.cell),
|
|
504
504
|
style: { textAlign: q.align },
|
|
505
505
|
children: q.render ? q.render($[q.key], $, C) : $[q.key]
|
|
506
506
|
},
|
|
@@ -582,9 +582,9 @@ const Fn = pt(
|
|
|
582
582
|
onOpen: c,
|
|
583
583
|
onClose: l,
|
|
584
584
|
options: a,
|
|
585
|
-
placeholder:
|
|
586
|
-
value:
|
|
587
|
-
onChange:
|
|
585
|
+
placeholder: u = "Select...",
|
|
586
|
+
value: d,
|
|
587
|
+
onChange: h,
|
|
588
588
|
error: m = !1,
|
|
589
589
|
fullWidth: k = !0,
|
|
590
590
|
portal: w = !0,
|
|
@@ -603,9 +603,9 @@ const Fn = pt(
|
|
|
603
603
|
});
|
|
604
604
|
}, [c, l]), M = G(
|
|
605
605
|
(R) => {
|
|
606
|
-
|
|
606
|
+
h?.(R), x();
|
|
607
607
|
},
|
|
608
|
-
[
|
|
608
|
+
[h, x]
|
|
609
609
|
);
|
|
610
610
|
kt(() => {
|
|
611
611
|
if (!D) return;
|
|
@@ -620,15 +620,15 @@ const Fn = pt(
|
|
|
620
620
|
},
|
|
621
621
|
D
|
|
622
622
|
);
|
|
623
|
-
const y = Ge(A, D && w), L = a?.find((R) => R.value ===
|
|
623
|
+
const y = Ge(A, D && w), L = a?.find((R) => R.value === d)?.label, $ = a ? L || u : t, C = a && !L, N = a ? a.map((R) => /* @__PURE__ */ i(
|
|
624
624
|
"button",
|
|
625
625
|
{
|
|
626
626
|
type: "button",
|
|
627
627
|
role: "menuitem",
|
|
628
|
-
className:
|
|
628
|
+
className: f(
|
|
629
629
|
Ct.item,
|
|
630
630
|
R.disabled && Ct.itemDisabled,
|
|
631
|
-
R.value ===
|
|
631
|
+
R.value === d && Ct.itemSelected,
|
|
632
632
|
b?.item
|
|
633
633
|
),
|
|
634
634
|
disabled: R.disabled,
|
|
@@ -641,7 +641,7 @@ const Fn = pt(
|
|
|
641
641
|
{
|
|
642
642
|
ref: T,
|
|
643
643
|
id: X,
|
|
644
|
-
className:
|
|
644
|
+
className: f(
|
|
645
645
|
Ct.menu,
|
|
646
646
|
D && Ct.menuOpen,
|
|
647
647
|
n === "left" ? Ct.alignLeft : Ct.alignRight,
|
|
@@ -657,7 +657,7 @@ const Fn = pt(
|
|
|
657
657
|
"div",
|
|
658
658
|
{
|
|
659
659
|
ref: _,
|
|
660
|
-
className:
|
|
660
|
+
className: f(Ct.root, k && Ct.fullWidth, b?.root, r),
|
|
661
661
|
style: o,
|
|
662
662
|
children: [
|
|
663
663
|
/* @__PURE__ */ Y("div", { ref: B, style: k ? { width: "100%" } : void 0, children: [
|
|
@@ -667,7 +667,7 @@ const Fn = pt(
|
|
|
667
667
|
ref: A,
|
|
668
668
|
id: s,
|
|
669
669
|
type: "button",
|
|
670
|
-
className:
|
|
670
|
+
className: f(
|
|
671
671
|
Ct.trigger,
|
|
672
672
|
D && Ct.triggerOpen,
|
|
673
673
|
m && Ct.triggerError,
|
|
@@ -679,8 +679,8 @@ const Fn = pt(
|
|
|
679
679
|
"aria-haspopup": "menu",
|
|
680
680
|
"aria-controls": D ? X : void 0,
|
|
681
681
|
children: [
|
|
682
|
-
/* @__PURE__ */ i("span", { className:
|
|
683
|
-
/* @__PURE__ */ i("span", { className:
|
|
682
|
+
/* @__PURE__ */ i("span", { className: f(Ct.triggerLabel, C && Ct.placeholder, b?.triggerLabel), children: $ }),
|
|
683
|
+
/* @__PURE__ */ i("span", { className: f(Ct.chevron, b?.chevron), "aria-hidden": "true" })
|
|
684
684
|
]
|
|
685
685
|
}
|
|
686
686
|
),
|
|
@@ -715,7 +715,7 @@ const Tc = pt(
|
|
|
715
715
|
ref: o,
|
|
716
716
|
type: "button",
|
|
717
717
|
role: "menuitem",
|
|
718
|
-
className:
|
|
718
|
+
className: f(
|
|
719
719
|
Ct.item,
|
|
720
720
|
t && Ct.itemDisabled,
|
|
721
721
|
e
|
|
@@ -765,9 +765,9 @@ const Xn = pt(
|
|
|
765
765
|
onOpenChange: c,
|
|
766
766
|
classes: l,
|
|
767
767
|
className: a,
|
|
768
|
-
style:
|
|
769
|
-
},
|
|
770
|
-
const [
|
|
768
|
+
style: u
|
|
769
|
+
}, d) => {
|
|
770
|
+
const [h, m] = ut(!1), [k, w] = ut(r), [b, _] = ut(0), [D, U] = ut(0), B = Q(null), T = Q(null), A = Q(null), X = qt(), x = s !== void 0, S = x ? s : h, M = G(
|
|
771
771
|
(C) => {
|
|
772
772
|
x || m(C), c?.(C);
|
|
773
773
|
},
|
|
@@ -829,7 +829,7 @@ const Xn = pt(
|
|
|
829
829
|
onClick: (P) => {
|
|
830
830
|
C.props.onClick?.(P), L();
|
|
831
831
|
},
|
|
832
|
-
className:
|
|
832
|
+
className: f(C.props.className, l?.trigger),
|
|
833
833
|
"aria-expanded": S,
|
|
834
834
|
"aria-haspopup": "dialog",
|
|
835
835
|
"aria-controls": S ? X : void 0
|
|
@@ -840,7 +840,7 @@ const Xn = pt(
|
|
|
840
840
|
{
|
|
841
841
|
ref: A,
|
|
842
842
|
type: "button",
|
|
843
|
-
className:
|
|
843
|
+
className: f(He.trigger, l?.trigger),
|
|
844
844
|
onClick: L,
|
|
845
845
|
"aria-expanded": S,
|
|
846
846
|
"aria-haspopup": "dialog",
|
|
@@ -851,9 +851,9 @@ const Xn = pt(
|
|
|
851
851
|
return /* @__PURE__ */ i(
|
|
852
852
|
"div",
|
|
853
853
|
{
|
|
854
|
-
ref:
|
|
855
|
-
className:
|
|
856
|
-
style:
|
|
854
|
+
ref: d,
|
|
855
|
+
className: f(He.root, l?.root, a),
|
|
856
|
+
style: u,
|
|
857
857
|
children: /* @__PURE__ */ Y("div", { ref: B, children: [
|
|
858
858
|
$,
|
|
859
859
|
S && /* @__PURE__ */ i(
|
|
@@ -863,7 +863,7 @@ const Xn = pt(
|
|
|
863
863
|
id: X,
|
|
864
864
|
role: "dialog",
|
|
865
865
|
tabIndex: -1,
|
|
866
|
-
className:
|
|
866
|
+
className: f(He.popover, He[o ? k : r], l?.popover),
|
|
867
867
|
style: o ? {
|
|
868
868
|
"--crk-popover-shift-x": `${b}px`,
|
|
869
869
|
"--crk-popover-shift-y": `${D}px`
|
|
@@ -932,7 +932,7 @@ const Pc = "crk-backdrop-jYpTA", Oc = "crk-backdropIn-x5Z-A", Hc = "crk-modal-yN
|
|
|
932
932
|
"div",
|
|
933
933
|
{
|
|
934
934
|
id: s,
|
|
935
|
-
className:
|
|
935
|
+
className: f(ce.header, r && ce.headerWithClose, o.header, e),
|
|
936
936
|
style: n,
|
|
937
937
|
children: [
|
|
938
938
|
t,
|
|
@@ -940,7 +940,7 @@ const Pc = "crk-backdrop-jYpTA", Oc = "crk-backdropIn-x5Z-A", Hc = "crk-modal-yN
|
|
|
940
940
|
"button",
|
|
941
941
|
{
|
|
942
942
|
type: "button",
|
|
943
|
-
className:
|
|
943
|
+
className: f(ce.closeButton, o.closeButton),
|
|
944
944
|
onClick: r,
|
|
945
945
|
"aria-label": "Close",
|
|
946
946
|
children: "×"
|
|
@@ -953,12 +953,12 @@ const Pc = "crk-backdrop-jYpTA", Oc = "crk-backdropIn-x5Z-A", Hc = "crk-modal-yN
|
|
|
953
953
|
jn.displayName = "Modal.Header";
|
|
954
954
|
const Vn = ({ children: t, className: e, style: n }) => {
|
|
955
955
|
const { classes: r } = Kt(Ze);
|
|
956
|
-
return /* @__PURE__ */ i("div", { className:
|
|
956
|
+
return /* @__PURE__ */ i("div", { className: f(ce.body, r.body, e), style: n, children: t });
|
|
957
957
|
};
|
|
958
958
|
Vn.displayName = "Modal.Body";
|
|
959
959
|
const qn = ({ children: t, className: e, style: n }) => {
|
|
960
960
|
const { classes: r } = Kt(Ze);
|
|
961
|
-
return /* @__PURE__ */ i("div", { className:
|
|
961
|
+
return /* @__PURE__ */ i("div", { className: f(ce.footer, r.footer, e), style: n, children: t });
|
|
962
962
|
};
|
|
963
963
|
qn.displayName = "Modal.Footer";
|
|
964
964
|
const Qe = pt(
|
|
@@ -972,10 +972,10 @@ const Qe = pt(
|
|
|
972
972
|
className: c,
|
|
973
973
|
style: l,
|
|
974
974
|
children: a,
|
|
975
|
-
"aria-label":
|
|
976
|
-
"aria-labelledby":
|
|
977
|
-
},
|
|
978
|
-
const m = Q(null), k =
|
|
975
|
+
"aria-label": u,
|
|
976
|
+
"aria-labelledby": d
|
|
977
|
+
}, h) => {
|
|
978
|
+
const m = Q(null), k = h ?? m, w = qt(), b = d ?? `${w}-title`;
|
|
979
979
|
Un(k, t);
|
|
980
980
|
const _ = wt(
|
|
981
981
|
() => ({
|
|
@@ -999,19 +999,19 @@ const Qe = pt(
|
|
|
999
999
|
/* @__PURE__ */ i(
|
|
1000
1000
|
"div",
|
|
1001
1001
|
{
|
|
1002
|
-
className:
|
|
1002
|
+
className: f(ce.backdrop, s?.backdrop),
|
|
1003
1003
|
onClick: D,
|
|
1004
1004
|
role: "presentation",
|
|
1005
1005
|
children: /* @__PURE__ */ i(
|
|
1006
1006
|
"div",
|
|
1007
1007
|
{
|
|
1008
1008
|
ref: k,
|
|
1009
|
-
className:
|
|
1009
|
+
className: f(ce.modal, ce[o], s?.modal, c),
|
|
1010
1010
|
style: l,
|
|
1011
1011
|
role: "dialog",
|
|
1012
1012
|
"aria-modal": "true",
|
|
1013
|
-
"aria-label":
|
|
1014
|
-
"aria-labelledby":
|
|
1013
|
+
"aria-label": u,
|
|
1014
|
+
"aria-labelledby": u ? void 0 : b,
|
|
1015
1015
|
children: /* @__PURE__ */ i(Ze.Provider, { value: { classes: s ?? {}, titleId: b }, children: a })
|
|
1016
1016
|
}
|
|
1017
1017
|
)
|
|
@@ -1043,9 +1043,9 @@ const Gc = "crk-root-5Kdf2", Zc = "crk-surfaceDraggable-mIpX8", Qc = "crk-draggi
|
|
|
1043
1043
|
disabled: c = !1,
|
|
1044
1044
|
onDragStart: l,
|
|
1045
1045
|
onDrag: a,
|
|
1046
|
-
onDragEnd:
|
|
1047
|
-
classes:
|
|
1048
|
-
className:
|
|
1046
|
+
onDragEnd: u,
|
|
1047
|
+
classes: d,
|
|
1048
|
+
className: h,
|
|
1049
1049
|
style: m,
|
|
1050
1050
|
...k
|
|
1051
1051
|
}, w) => {
|
|
@@ -1100,12 +1100,12 @@ const Gc = "crk-root-5Kdf2", Zc = "crk-surfaceDraggable-mIpX8", Qc = "crk-draggi
|
|
|
1100
1100
|
const E = r === "y" ? p.origin.x : p.origin.x + (g.clientX - p.startX), tt = r === "x" ? p.origin.y : p.origin.y + (g.clientY - p.startY);
|
|
1101
1101
|
P(N(E, tt, p.base));
|
|
1102
1102
|
}, v = () => {
|
|
1103
|
-
X(!1), x.current = null,
|
|
1103
|
+
X(!1), x.current = null, u?.(T.current);
|
|
1104
1104
|
};
|
|
1105
1105
|
return window.addEventListener("pointermove", I), window.addEventListener("pointerup", v), () => {
|
|
1106
1106
|
window.removeEventListener("pointermove", I), window.removeEventListener("pointerup", v);
|
|
1107
1107
|
};
|
|
1108
|
-
}, [A, r, N, P,
|
|
1108
|
+
}, [A, r, N, P, u]);
|
|
1109
1109
|
const q = G(
|
|
1110
1110
|
(I) => {
|
|
1111
1111
|
if (c) return;
|
|
@@ -1118,14 +1118,14 @@ const Gc = "crk-root-5Kdf2", Zc = "crk-surfaceDraggable-mIpX8", Qc = "crk-draggi
|
|
|
1118
1118
|
if (!g || r === "x" && g[1] !== 0 || r === "y" && g[0] !== 0) return;
|
|
1119
1119
|
I.preventDefault();
|
|
1120
1120
|
const p = T.current, E = N(p.x + g[0], p.y + g[1], C(p));
|
|
1121
|
-
P(E),
|
|
1121
|
+
P(E), u?.(E);
|
|
1122
1122
|
},
|
|
1123
|
-
[r, N, P, c, C, s,
|
|
1123
|
+
[r, N, P, c, C, s, u]
|
|
1124
1124
|
), et = {
|
|
1125
1125
|
startPointerDrag: R,
|
|
1126
1126
|
onHandleKeyDown: q,
|
|
1127
1127
|
registerHandle: L,
|
|
1128
|
-
handleClassName:
|
|
1128
|
+
handleClassName: d?.handle,
|
|
1129
1129
|
disabled: c,
|
|
1130
1130
|
dragging: A
|
|
1131
1131
|
}, nt = `translate(${B.x}px, ${B.y}px)`, j = {
|
|
@@ -1136,12 +1136,12 @@ const Gc = "crk-root-5Kdf2", Zc = "crk-surfaceDraggable-mIpX8", Qc = "crk-draggi
|
|
|
1136
1136
|
"div",
|
|
1137
1137
|
{
|
|
1138
1138
|
ref: $,
|
|
1139
|
-
className:
|
|
1139
|
+
className: f(
|
|
1140
1140
|
ge.root,
|
|
1141
1141
|
!M && !c && ge.surfaceDraggable,
|
|
1142
1142
|
A && ge.dragging,
|
|
1143
|
-
|
|
1144
|
-
|
|
1143
|
+
d?.root,
|
|
1144
|
+
h
|
|
1145
1145
|
),
|
|
1146
1146
|
style: j,
|
|
1147
1147
|
onPointerDown: M ? void 0 : R,
|
|
@@ -1159,7 +1159,7 @@ function Zn({ children: t, className: e, style: n, ...r }) {
|
|
|
1159
1159
|
return kt(() => o.registerHandle(), [o.registerHandle]), /* @__PURE__ */ i(
|
|
1160
1160
|
"div",
|
|
1161
1161
|
{
|
|
1162
|
-
className:
|
|
1162
|
+
className: f(
|
|
1163
1163
|
ge.handle,
|
|
1164
1164
|
o.disabled && ge.handleDisabled,
|
|
1165
1165
|
o.dragging && ge.handleDragging,
|
|
@@ -1221,9 +1221,9 @@ const Jn = pt(
|
|
|
1221
1221
|
classes: c,
|
|
1222
1222
|
className: l,
|
|
1223
1223
|
children: a,
|
|
1224
|
-
...
|
|
1225
|
-
},
|
|
1226
|
-
const
|
|
1224
|
+
...u
|
|
1225
|
+
}, d) => {
|
|
1226
|
+
const h = qt(), m = t !== void 0, [k, w] = ut(e), b = m ? t : k, _ = G(
|
|
1227
1227
|
(U) => {
|
|
1228
1228
|
m || w(U), n?.(U);
|
|
1229
1229
|
},
|
|
@@ -1231,7 +1231,7 @@ const Jn = pt(
|
|
|
1231
1231
|
), D = {
|
|
1232
1232
|
value: b,
|
|
1233
1233
|
setValue: _,
|
|
1234
|
-
baseId:
|
|
1234
|
+
baseId: h,
|
|
1235
1235
|
orientation: r,
|
|
1236
1236
|
variant: o,
|
|
1237
1237
|
size: s,
|
|
@@ -1240,14 +1240,14 @@ const Jn = pt(
|
|
|
1240
1240
|
return /* @__PURE__ */ i(Qn.Provider, { value: D, children: /* @__PURE__ */ i(
|
|
1241
1241
|
"div",
|
|
1242
1242
|
{
|
|
1243
|
-
ref:
|
|
1244
|
-
className:
|
|
1243
|
+
ref: d,
|
|
1244
|
+
className: f(
|
|
1245
1245
|
Jt.root,
|
|
1246
1246
|
r === "vertical" && Jt.vertical,
|
|
1247
1247
|
c?.root,
|
|
1248
1248
|
l
|
|
1249
1249
|
),
|
|
1250
|
-
...
|
|
1250
|
+
...u,
|
|
1251
1251
|
children: a
|
|
1252
1252
|
}
|
|
1253
1253
|
) });
|
|
@@ -1257,23 +1257,23 @@ Jn.displayName = "Tabs";
|
|
|
1257
1257
|
const tr = pt(
|
|
1258
1258
|
({ className: t, children: e, onKeyDown: n, ...r }, o) => {
|
|
1259
1259
|
const s = bn("Tabs.List"), c = Q(null), l = G(
|
|
1260
|
-
(
|
|
1261
|
-
c.current =
|
|
1260
|
+
(u) => {
|
|
1261
|
+
c.current = u, typeof o == "function" ? o(u) : o && (o.current = u);
|
|
1262
1262
|
},
|
|
1263
1263
|
[o]
|
|
1264
|
-
), a = (
|
|
1265
|
-
if (n?.(
|
|
1266
|
-
const
|
|
1267
|
-
if (!
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1264
|
+
), a = (u) => {
|
|
1265
|
+
if (n?.(u), u.defaultPrevented) return;
|
|
1266
|
+
const d = c.current;
|
|
1267
|
+
if (!d) return;
|
|
1268
|
+
const h = Array.from(
|
|
1269
|
+
d.querySelectorAll('[role="tab"]:not([aria-disabled="true"])')
|
|
1270
1270
|
);
|
|
1271
|
-
if (
|
|
1272
|
-
const m = s.orientation === "vertical" ? "ArrowDown" : "ArrowRight", k = s.orientation === "vertical" ? "ArrowUp" : "ArrowLeft", w =
|
|
1271
|
+
if (h.length === 0) return;
|
|
1272
|
+
const m = s.orientation === "vertical" ? "ArrowDown" : "ArrowRight", k = s.orientation === "vertical" ? "ArrowUp" : "ArrowLeft", w = h.indexOf(document.activeElement);
|
|
1273
1273
|
let b = null;
|
|
1274
|
-
if (
|
|
1275
|
-
|
|
1276
|
-
const _ =
|
|
1274
|
+
if (u.key === m ? b = (w + 1) % h.length : u.key === k ? b = (w - 1 + h.length) % h.length : u.key === "Home" ? b = 0 : u.key === "End" && (b = h.length - 1), b === null) return;
|
|
1275
|
+
u.preventDefault();
|
|
1276
|
+
const _ = h[b];
|
|
1277
1277
|
_.focus();
|
|
1278
1278
|
const D = _.dataset.value;
|
|
1279
1279
|
D !== void 0 && s.setValue(D);
|
|
@@ -1284,7 +1284,7 @@ const tr = pt(
|
|
|
1284
1284
|
ref: l,
|
|
1285
1285
|
role: "tablist",
|
|
1286
1286
|
"aria-orientation": s.orientation,
|
|
1287
|
-
className:
|
|
1287
|
+
className: f(
|
|
1288
1288
|
Jt.list,
|
|
1289
1289
|
Jt[`list_${s.variant}`],
|
|
1290
1290
|
Jt[`list_${s.size}`],
|
|
@@ -1315,15 +1315,15 @@ const er = pt(
|
|
|
1315
1315
|
"aria-disabled": e || void 0,
|
|
1316
1316
|
tabIndex: a ? 0 : -1,
|
|
1317
1317
|
disabled: e,
|
|
1318
|
-
className:
|
|
1318
|
+
className: f(
|
|
1319
1319
|
Jt.tab,
|
|
1320
1320
|
Jt[`tab_${l.variant}`],
|
|
1321
1321
|
a && Jt.tabSelected,
|
|
1322
1322
|
l.classes?.tab,
|
|
1323
1323
|
n
|
|
1324
1324
|
),
|
|
1325
|
-
onClick: (
|
|
1326
|
-
o?.(
|
|
1325
|
+
onClick: (u) => {
|
|
1326
|
+
o?.(u), e || l.setValue(t);
|
|
1327
1327
|
},
|
|
1328
1328
|
...s,
|
|
1329
1329
|
children: r
|
|
@@ -1336,7 +1336,7 @@ const nr = pt(
|
|
|
1336
1336
|
({ value: t, keepMounted: e = !1, className: n, style: r, children: o, ...s }, c) => {
|
|
1337
1337
|
const l = bn("Tabs.Panel"), a = l.value === t;
|
|
1338
1338
|
if (!a && !e) return null;
|
|
1339
|
-
const
|
|
1339
|
+
const u = a ? r : { display: "none", ...r };
|
|
1340
1340
|
return /* @__PURE__ */ i(
|
|
1341
1341
|
"div",
|
|
1342
1342
|
{
|
|
@@ -1346,8 +1346,8 @@ const nr = pt(
|
|
|
1346
1346
|
"aria-labelledby": `${l.baseId}-tab-${t}`,
|
|
1347
1347
|
hidden: !a,
|
|
1348
1348
|
tabIndex: 0,
|
|
1349
|
-
className:
|
|
1350
|
-
style:
|
|
1349
|
+
className: f(Jt.panel, l.classes?.panel, n),
|
|
1350
|
+
style: u,
|
|
1351
1351
|
...s,
|
|
1352
1352
|
children: o
|
|
1353
1353
|
}
|
|
@@ -1414,26 +1414,26 @@ const np = Object.assign(Jn, {
|
|
|
1414
1414
|
className: c,
|
|
1415
1415
|
children: l,
|
|
1416
1416
|
...a
|
|
1417
|
-
},
|
|
1418
|
-
const
|
|
1417
|
+
}, u) => {
|
|
1418
|
+
const d = n === !0 ? Es[t] : n === !1 ? null : n;
|
|
1419
1419
|
return /* @__PURE__ */ Y(
|
|
1420
1420
|
"div",
|
|
1421
1421
|
{
|
|
1422
|
-
ref:
|
|
1422
|
+
ref: u,
|
|
1423
1423
|
role: "alert",
|
|
1424
|
-
className:
|
|
1424
|
+
className: f(ie.root, ie[t], s?.root, c),
|
|
1425
1425
|
...a,
|
|
1426
1426
|
children: [
|
|
1427
|
-
|
|
1428
|
-
/* @__PURE__ */ Y("div", { className:
|
|
1429
|
-
e != null && /* @__PURE__ */ i("div", { className:
|
|
1430
|
-
l != null && /* @__PURE__ */ i("div", { className:
|
|
1427
|
+
d != null && /* @__PURE__ */ i("span", { className: f(ie.icon, s?.icon), "aria-hidden": "true", children: d }),
|
|
1428
|
+
/* @__PURE__ */ Y("div", { className: f(ie.content, s?.content), children: [
|
|
1429
|
+
e != null && /* @__PURE__ */ i("div", { className: f(ie.title, s?.title), children: e }),
|
|
1430
|
+
l != null && /* @__PURE__ */ i("div", { className: f(ie.message, s?.message), children: l })
|
|
1431
1431
|
] }),
|
|
1432
1432
|
r && /* @__PURE__ */ i(
|
|
1433
1433
|
"button",
|
|
1434
1434
|
{
|
|
1435
1435
|
type: "button",
|
|
1436
|
-
className:
|
|
1436
|
+
className: f(ie.close, s?.close),
|
|
1437
1437
|
onClick: r,
|
|
1438
1438
|
"aria-label": o,
|
|
1439
1439
|
children: /* @__PURE__ */ i("svg", { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M6.3 6.3a1 1 0 011.4 0L10 8.6l2.3-2.3a1 1 0 111.4 1.4L11.4 10l2.3 2.3a1 1 0 01-1.4 1.4L10 11.4l-2.3 2.3a1 1 0 01-1.4-1.4L8.6 10 6.3 7.7a1 1 0 010-1.4z" }) })
|
|
@@ -1473,7 +1473,7 @@ const Os = "crk-root-KSuIQ", Hs = "crk-sm--vFVn", zs = "crk-md-zmWkB", Ws = "crk
|
|
|
1473
1473
|
"span",
|
|
1474
1474
|
{
|
|
1475
1475
|
ref: a,
|
|
1476
|
-
className:
|
|
1476
|
+
className: f(
|
|
1477
1477
|
we.root,
|
|
1478
1478
|
we[t],
|
|
1479
1479
|
we[e],
|
|
@@ -1483,7 +1483,7 @@ const Os = "crk-root-KSuIQ", Hs = "crk-sm--vFVn", zs = "crk-md-zmWkB", Ws = "crk
|
|
|
1483
1483
|
),
|
|
1484
1484
|
...l,
|
|
1485
1485
|
children: [
|
|
1486
|
-
r && /* @__PURE__ */ i("span", { className:
|
|
1486
|
+
r && /* @__PURE__ */ i("span", { className: f(we.dot, o?.dot), "aria-hidden": "true" }),
|
|
1487
1487
|
c
|
|
1488
1488
|
]
|
|
1489
1489
|
}
|
|
@@ -1506,12 +1506,12 @@ const Qs = "crk-root-wia8E", Js = "crk-circle-8olrz", ti = "crk-crk-spinner-rota
|
|
|
1506
1506
|
ref: l,
|
|
1507
1507
|
role: "status",
|
|
1508
1508
|
"aria-live": "polite",
|
|
1509
|
-
className:
|
|
1509
|
+
className: f(ze.root, ze[t], r?.root, o),
|
|
1510
1510
|
style: e ? { ...s, color: e } : s,
|
|
1511
1511
|
...c,
|
|
1512
1512
|
children: [
|
|
1513
|
-
/* @__PURE__ */ i("span", { className:
|
|
1514
|
-
n ? /* @__PURE__ */ i("span", { className:
|
|
1513
|
+
/* @__PURE__ */ i("span", { className: f(ze.circle, r?.circle), "aria-hidden": "true" }),
|
|
1514
|
+
n ? /* @__PURE__ */ i("span", { className: f(ze.label, r?.label), children: n }) : null
|
|
1515
1515
|
]
|
|
1516
1516
|
}
|
|
1517
1517
|
)
|
|
@@ -1530,21 +1530,21 @@ const si = "crk-line-8roAA", ii = "crk-stack-8QHed", li = "crk-text-4oj9n", ai =
|
|
|
1530
1530
|
"crk-skeleton-wave": "crk-crk-skeleton-wave-rDp6Z",
|
|
1531
1531
|
crkSkeletonWave: mi
|
|
1532
1532
|
}, We = (t) => typeof t == "number" ? `${t}px` : t, pi = pt(
|
|
1533
|
-
({ variant: t = "text", width: e, height: n, animation: r = "pulse", lines: o = 1, classes: s, className: c, style: l, ...a },
|
|
1534
|
-
const
|
|
1533
|
+
({ variant: t = "text", width: e, height: n, animation: r = "pulse", lines: o = 1, classes: s, className: c, style: l, ...a }, u) => {
|
|
1534
|
+
const d = r === "wave" ? le.wave : r === "none" ? void 0 : le.pulse;
|
|
1535
1535
|
if (t === "text" && o > 1)
|
|
1536
1536
|
return /* @__PURE__ */ i(
|
|
1537
1537
|
"div",
|
|
1538
1538
|
{
|
|
1539
|
-
ref:
|
|
1539
|
+
ref: u,
|
|
1540
1540
|
"aria-hidden": "true",
|
|
1541
|
-
className:
|
|
1541
|
+
className: f(le.stack, s?.root, c),
|
|
1542
1542
|
style: l,
|
|
1543
1543
|
...a,
|
|
1544
1544
|
children: Array.from({ length: o }).map((m, k) => /* @__PURE__ */ i(
|
|
1545
1545
|
"span",
|
|
1546
1546
|
{
|
|
1547
|
-
className:
|
|
1547
|
+
className: f(le.line, le.text, d, s?.line),
|
|
1548
1548
|
style: {
|
|
1549
1549
|
width: k === o - 1 ? "60%" : We(e) ?? "100%",
|
|
1550
1550
|
height: We(n)
|
|
@@ -1554,7 +1554,7 @@ const si = "crk-line-8roAA", ii = "crk-stack-8QHed", li = "crk-text-4oj9n", ai =
|
|
|
1554
1554
|
))
|
|
1555
1555
|
}
|
|
1556
1556
|
);
|
|
1557
|
-
const
|
|
1557
|
+
const h = {
|
|
1558
1558
|
width: We(e),
|
|
1559
1559
|
height: We(n),
|
|
1560
1560
|
...l
|
|
@@ -1562,10 +1562,10 @@ const si = "crk-line-8roAA", ii = "crk-stack-8QHed", li = "crk-text-4oj9n", ai =
|
|
|
1562
1562
|
return /* @__PURE__ */ i(
|
|
1563
1563
|
"div",
|
|
1564
1564
|
{
|
|
1565
|
-
ref:
|
|
1565
|
+
ref: u,
|
|
1566
1566
|
"aria-hidden": "true",
|
|
1567
|
-
className:
|
|
1568
|
-
style:
|
|
1567
|
+
className: f(le.line, le[t], d, s?.root, c),
|
|
1568
|
+
style: h,
|
|
1569
1569
|
...a
|
|
1570
1570
|
}
|
|
1571
1571
|
);
|
|
@@ -1595,7 +1595,7 @@ const gi = "crk-root-NGCl-", ki = "crk-horizontal-X75Kv", bi = "crk-vertical-RMt
|
|
|
1595
1595
|
ref: l,
|
|
1596
1596
|
role: "separator",
|
|
1597
1597
|
"aria-orientation": t,
|
|
1598
|
-
className:
|
|
1598
|
+
className: f(
|
|
1599
1599
|
ee.root,
|
|
1600
1600
|
ee[t],
|
|
1601
1601
|
ee[e],
|
|
@@ -1606,9 +1606,9 @@ const gi = "crk-root-NGCl-", ki = "crk-horizontal-X75Kv", bi = "crk-vertical-RMt
|
|
|
1606
1606
|
),
|
|
1607
1607
|
...c,
|
|
1608
1608
|
children: a ? /* @__PURE__ */ Y(jt, { children: [
|
|
1609
|
-
/* @__PURE__ */ i("span", { className:
|
|
1610
|
-
/* @__PURE__ */ i("span", { className:
|
|
1611
|
-
/* @__PURE__ */ i("span", { className:
|
|
1609
|
+
/* @__PURE__ */ i("span", { className: f(ee.line, o?.line) }),
|
|
1610
|
+
/* @__PURE__ */ i("span", { className: f(ee.label, o?.label), children: n }),
|
|
1611
|
+
/* @__PURE__ */ i("span", { className: f(ee.line, o?.line) })
|
|
1612
1612
|
] }) : null
|
|
1613
1613
|
}
|
|
1614
1614
|
);
|
|
@@ -1641,21 +1641,21 @@ function Ki(t) {
|
|
|
1641
1641
|
return e.length === 0 ? "" : e.length === 1 ? e[0].slice(0, 2).toUpperCase() : (e[0][0] + e[e.length - 1][0]).toUpperCase();
|
|
1642
1642
|
}
|
|
1643
1643
|
const Gi = pt(
|
|
1644
|
-
({ src: t, alt: e, name: n, fallback: r, size: o = "md", shape: s = "circle", status: c, classes: l, className: a, ...
|
|
1645
|
-
const [
|
|
1644
|
+
({ src: t, alt: e, name: n, fallback: r, size: o = "md", shape: s = "circle", status: c, classes: l, className: a, ...u }, d) => {
|
|
1645
|
+
const [h, m] = ut(!1);
|
|
1646
1646
|
kt(() => m(!1), [t]);
|
|
1647
|
-
const k = t && !
|
|
1647
|
+
const k = t && !h, w = n ? Ki(n) : "";
|
|
1648
1648
|
return /* @__PURE__ */ Y(
|
|
1649
1649
|
"span",
|
|
1650
1650
|
{
|
|
1651
|
-
ref:
|
|
1652
|
-
className:
|
|
1653
|
-
...
|
|
1651
|
+
ref: d,
|
|
1652
|
+
className: f(ae.root, ae[o], ae[s], l?.root, a),
|
|
1653
|
+
...u,
|
|
1654
1654
|
children: [
|
|
1655
1655
|
k ? /* @__PURE__ */ i(
|
|
1656
1656
|
"img",
|
|
1657
1657
|
{
|
|
1658
|
-
className:
|
|
1658
|
+
className: f(ae.image, l?.image),
|
|
1659
1659
|
src: t,
|
|
1660
1660
|
alt: e ?? n ?? "",
|
|
1661
1661
|
onError: () => m(!0)
|
|
@@ -1663,7 +1663,7 @@ const Gi = pt(
|
|
|
1663
1663
|
) : /* @__PURE__ */ i(
|
|
1664
1664
|
"span",
|
|
1665
1665
|
{
|
|
1666
|
-
className:
|
|
1666
|
+
className: f(ae.fallback, l?.fallback),
|
|
1667
1667
|
role: "img",
|
|
1668
1668
|
"aria-label": e ?? n ?? "Avatar",
|
|
1669
1669
|
children: r ?? (w || /* @__PURE__ */ i(Zi, {}))
|
|
@@ -1672,7 +1672,7 @@ const Gi = pt(
|
|
|
1672
1672
|
c && /* @__PURE__ */ i(
|
|
1673
1673
|
"span",
|
|
1674
1674
|
{
|
|
1675
|
-
className:
|
|
1675
|
+
className: f(ae.status, ae[`status_${c}`], l?.status),
|
|
1676
1676
|
"data-status": c,
|
|
1677
1677
|
"aria-hidden": "true"
|
|
1678
1678
|
}
|
|
@@ -1706,27 +1706,27 @@ const or = pt(
|
|
|
1706
1706
|
{
|
|
1707
1707
|
ref: c,
|
|
1708
1708
|
"aria-label": n,
|
|
1709
|
-
className:
|
|
1709
|
+
className: f(me.root, r?.root, o),
|
|
1710
1710
|
...s,
|
|
1711
|
-
children: /* @__PURE__ */ i("ol", { className:
|
|
1712
|
-
const
|
|
1711
|
+
children: /* @__PURE__ */ i("ol", { className: f(me.list, r?.list), children: l.map((a, u) => {
|
|
1712
|
+
const d = u === l.length - 1, h = a.props ?? {}, { href: m, current: k, children: w, className: b } = h, _ = k ?? d;
|
|
1713
1713
|
return /* @__PURE__ */ Y(
|
|
1714
1714
|
"li",
|
|
1715
1715
|
{
|
|
1716
|
-
className:
|
|
1716
|
+
className: f(me.item, r?.item, b),
|
|
1717
1717
|
children: [
|
|
1718
1718
|
_ || !m ? /* @__PURE__ */ i(
|
|
1719
1719
|
"span",
|
|
1720
1720
|
{
|
|
1721
|
-
className:
|
|
1721
|
+
className: f(me.current, r?.current),
|
|
1722
1722
|
"aria-current": _ ? "page" : void 0,
|
|
1723
1723
|
children: w
|
|
1724
1724
|
}
|
|
1725
|
-
) : /* @__PURE__ */ i("a", { className:
|
|
1726
|
-
!
|
|
1725
|
+
) : /* @__PURE__ */ i("a", { className: f(me.link, r?.link), href: m, children: w }),
|
|
1726
|
+
!d && /* @__PURE__ */ i("span", { className: f(me.separator, r?.separator), "aria-hidden": "true", children: e })
|
|
1727
1727
|
]
|
|
1728
1728
|
},
|
|
1729
|
-
a.key ??
|
|
1729
|
+
a.key ?? u
|
|
1730
1730
|
);
|
|
1731
1731
|
}) })
|
|
1732
1732
|
}
|
|
@@ -1759,17 +1759,17 @@ function gl({
|
|
|
1759
1759
|
hideArrow: c = !1,
|
|
1760
1760
|
classes: l
|
|
1761
1761
|
}) {
|
|
1762
|
-
const a = Q(null),
|
|
1763
|
-
|
|
1762
|
+
const a = Q(null), u = Q(null), d = Q(null), [h, m] = ut(!1), [k, w] = ut(n), [b, _] = ut({ top: 0, left: 0 }), D = qt(), U = G(() => {
|
|
1763
|
+
d.current && (clearTimeout(d.current), d.current = null);
|
|
1764
1764
|
}, []), B = G(() => {
|
|
1765
|
-
s || t == null || t === "" || (U(),
|
|
1765
|
+
s || t == null || t === "" || (U(), d.current = setTimeout(() => m(!0), r));
|
|
1766
1766
|
}, [s, t, U, r]), T = G(() => {
|
|
1767
|
-
U(), o > 0 ?
|
|
1767
|
+
U(), o > 0 ? d.current = setTimeout(() => m(!1), o) : m(!1);
|
|
1768
1768
|
}, [U, o]);
|
|
1769
1769
|
kt(() => U, [U]), qe(() => {
|
|
1770
|
-
if (!
|
|
1770
|
+
if (!h) return;
|
|
1771
1771
|
const x = () => {
|
|
1772
|
-
const S = a.current, M =
|
|
1772
|
+
const S = a.current, M = u.current;
|
|
1773
1773
|
if (!S || !M) return;
|
|
1774
1774
|
const y = S.getBoundingClientRect(), L = M.offsetWidth, $ = M.offsetHeight, C = typeof window < "u" ? window.innerWidth : 0, N = typeof window < "u" ? window.innerHeight : 0, P = (j) => j === "top" ? y.top - $ - Ft >= 0 : j === "bottom" ? y.bottom + $ + Ft <= N : j === "left" ? y.left - L - Ft >= 0 : y.right + L + Ft <= C, R = {
|
|
1775
1775
|
top: "bottom",
|
|
@@ -1784,19 +1784,19 @@ function gl({
|
|
|
1784
1784
|
return window.addEventListener("scroll", x, !0), window.addEventListener("resize", x), () => {
|
|
1785
1785
|
window.removeEventListener("scroll", x, !0), window.removeEventListener("resize", x);
|
|
1786
1786
|
};
|
|
1787
|
-
}, [
|
|
1788
|
-
if (!
|
|
1787
|
+
}, [h, n]), kt(() => {
|
|
1788
|
+
if (!h) return;
|
|
1789
1789
|
const x = (S) => {
|
|
1790
1790
|
S.key === "Escape" && m(!1);
|
|
1791
1791
|
};
|
|
1792
1792
|
return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
|
|
1793
|
-
}, [
|
|
1794
|
-
const A =
|
|
1793
|
+
}, [h]);
|
|
1794
|
+
const A = h ? D : void 0, X = { position: "fixed", top: b.top, left: b.left };
|
|
1795
1795
|
return /* @__PURE__ */ Y(
|
|
1796
1796
|
"span",
|
|
1797
1797
|
{
|
|
1798
1798
|
ref: a,
|
|
1799
|
-
className:
|
|
1799
|
+
className: f(Fe.wrapper, l?.wrapper),
|
|
1800
1800
|
onMouseEnter: B,
|
|
1801
1801
|
onMouseLeave: T,
|
|
1802
1802
|
onFocus: B,
|
|
@@ -1804,18 +1804,18 @@ function gl({
|
|
|
1804
1804
|
"aria-describedby": A,
|
|
1805
1805
|
children: [
|
|
1806
1806
|
e,
|
|
1807
|
-
|
|
1807
|
+
h && typeof document < "u" && se(
|
|
1808
1808
|
/* @__PURE__ */ Y(
|
|
1809
1809
|
"div",
|
|
1810
1810
|
{
|
|
1811
|
-
ref:
|
|
1811
|
+
ref: u,
|
|
1812
1812
|
id: D,
|
|
1813
1813
|
role: "tooltip",
|
|
1814
|
-
className:
|
|
1814
|
+
className: f(Fe.tooltip, Fe[`p_${k}`], l?.tooltip),
|
|
1815
1815
|
style: X,
|
|
1816
1816
|
children: [
|
|
1817
1817
|
t,
|
|
1818
|
-
!c && /* @__PURE__ */ i("span", { className:
|
|
1818
|
+
!c && /* @__PURE__ */ i("span", { className: f(Fe.arrow, l?.arrow), "aria-hidden": "true" })
|
|
1819
1819
|
]
|
|
1820
1820
|
}
|
|
1821
1821
|
),
|
|
@@ -1894,7 +1894,7 @@ const kl = "crk-backdrop-LBGhN", bl = "crk-crk-drawer-fade-in-fnZXU", vl = "crk-
|
|
|
1894
1894
|
"div",
|
|
1895
1895
|
{
|
|
1896
1896
|
id: s,
|
|
1897
|
-
className:
|
|
1897
|
+
className: f(Xt.header, r && Xt.headerWithClose, o.header, e),
|
|
1898
1898
|
style: n,
|
|
1899
1899
|
children: [
|
|
1900
1900
|
t,
|
|
@@ -1902,7 +1902,7 @@ const kl = "crk-backdrop-LBGhN", bl = "crk-crk-drawer-fade-in-fnZXU", vl = "crk-
|
|
|
1902
1902
|
"button",
|
|
1903
1903
|
{
|
|
1904
1904
|
type: "button",
|
|
1905
|
-
className:
|
|
1905
|
+
className: f(Xt.closeButton, o.closeButton),
|
|
1906
1906
|
onClick: r,
|
|
1907
1907
|
"aria-label": "Close",
|
|
1908
1908
|
children: "×"
|
|
@@ -1915,12 +1915,12 @@ const kl = "crk-backdrop-LBGhN", bl = "crk-crk-drawer-fade-in-fnZXU", vl = "crk-
|
|
|
1915
1915
|
cr.displayName = "Drawer.Header";
|
|
1916
1916
|
const sr = ({ children: t, className: e, style: n }) => {
|
|
1917
1917
|
const { classes: r } = Kt(Je);
|
|
1918
|
-
return /* @__PURE__ */ i("div", { className:
|
|
1918
|
+
return /* @__PURE__ */ i("div", { className: f(Xt.body, r.body, e), style: n, children: t });
|
|
1919
1919
|
};
|
|
1920
1920
|
sr.displayName = "Drawer.Body";
|
|
1921
1921
|
const ir = ({ children: t, className: e, style: n }) => {
|
|
1922
1922
|
const { classes: r } = Kt(Je);
|
|
1923
|
-
return /* @__PURE__ */ i("div", { className:
|
|
1923
|
+
return /* @__PURE__ */ i("div", { className: f(Xt.footer, r.footer, e), style: n, children: t });
|
|
1924
1924
|
};
|
|
1925
1925
|
ir.displayName = "Drawer.Footer";
|
|
1926
1926
|
const ma = 340, tn = pt(
|
|
@@ -1934,9 +1934,9 @@ const ma = 340, tn = pt(
|
|
|
1934
1934
|
closeOnEscape: c = !0,
|
|
1935
1935
|
classes: l,
|
|
1936
1936
|
className: a,
|
|
1937
|
-
style:
|
|
1938
|
-
children:
|
|
1939
|
-
"aria-label":
|
|
1937
|
+
style: u,
|
|
1938
|
+
children: d,
|
|
1939
|
+
"aria-label": h,
|
|
1940
1940
|
"aria-labelledby": m
|
|
1941
1941
|
}, k) => {
|
|
1942
1942
|
const w = Q(null), b = k ?? w, _ = qt(), D = m ?? `${_}-title`, U = o === "temporary", [B, T] = ut(t), [A, X] = ut(!1), [x, S] = ut(n), [M, y] = ut(r);
|
|
@@ -1966,7 +1966,7 @@ const ma = 340, tn = pt(
|
|
|
1966
1966
|
/* @__PURE__ */ i(
|
|
1967
1967
|
"div",
|
|
1968
1968
|
{
|
|
1969
|
-
className:
|
|
1969
|
+
className: f(
|
|
1970
1970
|
Xt.backdrop,
|
|
1971
1971
|
A && Xt.backdropClosing,
|
|
1972
1972
|
!U && Xt.backdropBare,
|
|
@@ -1978,7 +1978,7 @@ const ma = 340, tn = pt(
|
|
|
1978
1978
|
"div",
|
|
1979
1979
|
{
|
|
1980
1980
|
ref: b,
|
|
1981
|
-
className:
|
|
1981
|
+
className: f(
|
|
1982
1982
|
Xt.drawer,
|
|
1983
1983
|
Xt[`side_${x}`],
|
|
1984
1984
|
Xt[`size_${M}`],
|
|
@@ -1986,12 +1986,12 @@ const ma = 340, tn = pt(
|
|
|
1986
1986
|
l?.drawer,
|
|
1987
1987
|
a
|
|
1988
1988
|
),
|
|
1989
|
-
style:
|
|
1989
|
+
style: u,
|
|
1990
1990
|
role: "dialog",
|
|
1991
1991
|
"aria-modal": U ? "true" : void 0,
|
|
1992
|
-
"aria-label":
|
|
1993
|
-
"aria-labelledby":
|
|
1994
|
-
children: /* @__PURE__ */ i(Je.Provider, { value: { classes: l ?? {}, titleId: D }, children:
|
|
1992
|
+
"aria-label": h,
|
|
1993
|
+
"aria-labelledby": h ? void 0 : D,
|
|
1994
|
+
children: /* @__PURE__ */ i(Je.Provider, { value: { classes: l ?? {}, titleId: D }, children: d })
|
|
1995
1995
|
}
|
|
1996
1996
|
)
|
|
1997
1997
|
}
|
|
@@ -2058,9 +2058,9 @@ const Na = ({ dir: t }) => /* @__PURE__ */ i("svg", { viewBox: "0 0 12 12", fill
|
|
|
2058
2058
|
boundaryCount: c = 1,
|
|
2059
2059
|
siblingCount: l = 2,
|
|
2060
2060
|
showPrevNext: a = !0,
|
|
2061
|
-
showFirstLast:
|
|
2062
|
-
size:
|
|
2063
|
-
disabled:
|
|
2061
|
+
showFirstLast: u = !1,
|
|
2062
|
+
size: d = "md",
|
|
2063
|
+
disabled: h = !1,
|
|
2064
2064
|
label: m = "Pagination",
|
|
2065
2065
|
classes: k,
|
|
2066
2066
|
className: w,
|
|
@@ -2073,9 +2073,9 @@ const Na = ({ dir: t }) => /* @__PURE__ */ i("svg", { viewBox: "0 0 12 12", fill
|
|
|
2073
2073
|
"button",
|
|
2074
2074
|
{
|
|
2075
2075
|
type: "button",
|
|
2076
|
-
className:
|
|
2076
|
+
className: f(ne.item, ne.control, k?.item, k?.control),
|
|
2077
2077
|
onClick: () => X(L),
|
|
2078
|
-
disabled:
|
|
2078
|
+
disabled: h || A === L || (y === "left" || y === "first" ? A === 1 : A === D),
|
|
2079
2079
|
"aria-label": $,
|
|
2080
2080
|
children: /* @__PURE__ */ i(Na, { dir: y })
|
|
2081
2081
|
}
|
|
@@ -2085,19 +2085,19 @@ const Na = ({ dir: t }) => /* @__PURE__ */ i("svg", { viewBox: "0 0 12 12", fill
|
|
|
2085
2085
|
{
|
|
2086
2086
|
ref: _,
|
|
2087
2087
|
"aria-label": m,
|
|
2088
|
-
className:
|
|
2088
|
+
className: f(ne.root, ne[d], k?.root, w),
|
|
2089
2089
|
...b,
|
|
2090
|
-
children: /* @__PURE__ */ Y("ul", { className:
|
|
2091
|
-
|
|
2090
|
+
children: /* @__PURE__ */ Y("ul", { className: f(ne.list, k?.list), children: [
|
|
2091
|
+
u && S("first", "first", 1, "Go to first page"),
|
|
2092
2092
|
a && S("prev", "left", A - 1, "Go to previous page"),
|
|
2093
2093
|
x.map(
|
|
2094
|
-
(M, y) => M === "ellipsis" ? /* @__PURE__ */ i("li", { "aria-hidden": "true", className:
|
|
2094
|
+
(M, y) => M === "ellipsis" ? /* @__PURE__ */ i("li", { "aria-hidden": "true", className: f(ne.ellipsis, k?.ellipsis), children: "…" }, `e${y}`) : /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
2095
2095
|
"button",
|
|
2096
2096
|
{
|
|
2097
2097
|
type: "button",
|
|
2098
|
-
className:
|
|
2098
|
+
className: f(ne.item, M === A && ne.active, k?.item, M === A && k?.active),
|
|
2099
2099
|
onClick: () => X(M),
|
|
2100
|
-
disabled:
|
|
2100
|
+
disabled: h,
|
|
2101
2101
|
"aria-current": M === A ? "page" : void 0,
|
|
2102
2102
|
"aria-label": `Go to page ${M}`,
|
|
2103
2103
|
children: M
|
|
@@ -2105,7 +2105,7 @@ const Na = ({ dir: t }) => /* @__PURE__ */ i("svg", { viewBox: "0 0 12 12", fill
|
|
|
2105
2105
|
) }, M)
|
|
2106
2106
|
),
|
|
2107
2107
|
a && S("next", "right", A + 1, "Go to next page"),
|
|
2108
|
-
|
|
2108
|
+
u && S("last", "last", D, "Go to last page")
|
|
2109
2109
|
] })
|
|
2110
2110
|
}
|
|
2111
2111
|
);
|
|
@@ -2140,9 +2140,9 @@ const Pa = pt(
|
|
|
2140
2140
|
label: c = "Drag & drop files here, or click to browse",
|
|
2141
2141
|
hint: l,
|
|
2142
2142
|
children: a,
|
|
2143
|
-
classes:
|
|
2144
|
-
className:
|
|
2145
|
-
style:
|
|
2143
|
+
classes: u,
|
|
2144
|
+
className: d,
|
|
2145
|
+
style: h,
|
|
2146
2146
|
"aria-label": m = "Upload files"
|
|
2147
2147
|
}, k) => {
|
|
2148
2148
|
const w = Q(null), [b, _] = ut(!1), D = Q(0), U = qt(), B = (L) => {
|
|
@@ -2177,14 +2177,14 @@ const Pa = pt(
|
|
|
2177
2177
|
"aria-label": m,
|
|
2178
2178
|
"aria-disabled": s || void 0,
|
|
2179
2179
|
"aria-describedby": l ? `${U}-hint` : void 0,
|
|
2180
|
-
className:
|
|
2180
|
+
className: f(
|
|
2181
2181
|
re.root,
|
|
2182
2182
|
b && re.dragging,
|
|
2183
2183
|
s && re.disabled,
|
|
2184
|
-
|
|
2185
|
-
|
|
2184
|
+
u?.root,
|
|
2185
|
+
d
|
|
2186
2186
|
),
|
|
2187
|
-
style:
|
|
2187
|
+
style: h,
|
|
2188
2188
|
onClick: A,
|
|
2189
2189
|
onKeyDown: X,
|
|
2190
2190
|
onDragEnter: x,
|
|
@@ -2198,7 +2198,7 @@ const Pa = pt(
|
|
|
2198
2198
|
ref: B,
|
|
2199
2199
|
id: U,
|
|
2200
2200
|
type: "file",
|
|
2201
|
-
className:
|
|
2201
|
+
className: f(re.input, u?.input),
|
|
2202
2202
|
accept: n,
|
|
2203
2203
|
multiple: r,
|
|
2204
2204
|
disabled: s,
|
|
@@ -2208,13 +2208,13 @@ const Pa = pt(
|
|
|
2208
2208
|
}
|
|
2209
2209
|
}
|
|
2210
2210
|
),
|
|
2211
|
-
typeof a == "function" ? a({ isDragging: b }) : a ?? /* @__PURE__ */ Y("div", { className:
|
|
2212
|
-
/* @__PURE__ */ i("span", { className:
|
|
2211
|
+
typeof a == "function" ? a({ isDragging: b }) : a ?? /* @__PURE__ */ Y("div", { className: f(re.content, u?.content), children: [
|
|
2212
|
+
/* @__PURE__ */ i("span", { className: f(re.icon, u?.icon), "aria-hidden": "true", children: /* @__PURE__ */ Y("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2213
2213
|
/* @__PURE__ */ i("path", { d: "M12 16V4m0 0L8 8m4-4l4 4" }),
|
|
2214
2214
|
/* @__PURE__ */ i("path", { d: "M4 16v2a2 2 0 002 2h12a2 2 0 002-2v-2" })
|
|
2215
2215
|
] }) }),
|
|
2216
|
-
/* @__PURE__ */ i("span", { className:
|
|
2217
|
-
l != null && /* @__PURE__ */ i("span", { id: `${U}-hint`, className:
|
|
2216
|
+
/* @__PURE__ */ i("span", { className: f(re.label, u?.label), children: c }),
|
|
2217
|
+
l != null && /* @__PURE__ */ i("span", { id: `${U}-hint`, className: f(re.hint, u?.hint), children: l })
|
|
2218
2218
|
] })
|
|
2219
2219
|
]
|
|
2220
2220
|
}
|
|
@@ -2261,11 +2261,11 @@ function pd(t, e, n, r) {
|
|
|
2261
2261
|
const o = dd.filter((c) => e.includes(c));
|
|
2262
2262
|
let s = Math.max(0, Math.floor(t));
|
|
2263
2263
|
return o.map((c, l) => {
|
|
2264
|
-
const a = ud[c],
|
|
2264
|
+
const a = ud[c], u = Math.floor(s / a);
|
|
2265
2265
|
s %= a;
|
|
2266
|
-
const
|
|
2266
|
+
const d = l === 0 ? String(u) : String(u).padStart(2, "0"), h = r?.[c];
|
|
2267
2267
|
let m;
|
|
2268
|
-
return
|
|
2268
|
+
return h !== void 0 ? m = typeof h == "function" ? h(u) : h : m = n === "long" ? fd[c] : hd[c], { unit: c, value: u, text: d, label: m };
|
|
2269
2269
|
});
|
|
2270
2270
|
}
|
|
2271
2271
|
const gd = pt(
|
|
@@ -2279,9 +2279,9 @@ const gd = pt(
|
|
|
2279
2279
|
interval: c = 1e3,
|
|
2280
2280
|
variant: l = "digital",
|
|
2281
2281
|
size: a = "md",
|
|
2282
|
-
format:
|
|
2283
|
-
units:
|
|
2284
|
-
unitFormat:
|
|
2282
|
+
format: u = ad,
|
|
2283
|
+
units: d,
|
|
2284
|
+
unitFormat: h = "short",
|
|
2285
2285
|
unitLabels: m,
|
|
2286
2286
|
segmentVariant: k = "boxed",
|
|
2287
2287
|
renderSegment: w,
|
|
@@ -2341,14 +2341,14 @@ const gd = pt(
|
|
|
2341
2341
|
}),
|
|
2342
2342
|
[J, Z, ht, F, p, N]
|
|
2343
2343
|
);
|
|
2344
|
-
const O = p(), W = t === "countdown" || y ? Math.ceil(O) : Math.floor(O), it =
|
|
2344
|
+
const O = p(), W = t === "countdown" || y ? Math.ceil(O) : Math.floor(O), it = u(W), ft = y ? 0 : $ / 1e3;
|
|
2345
2345
|
let bt = 0;
|
|
2346
2346
|
ft > 0 && (bt = t === "countdown" ? O / ft : Math.min(1, O / ft)), bt = Math.max(0, Math.min(1, bt));
|
|
2347
|
-
const Rt = Math.max(W, e ?? 0), Dt =
|
|
2347
|
+
const Rt = Math.max(W, e ?? 0), Dt = d ?? md(Rt), st = pd(W, Dt, h, m), vt = D === "top" || D === "left", Nt = _ != null && /* @__PURE__ */ i("span", { className: f(Bt.label, T?.label), children: _ });
|
|
2348
2348
|
return /* @__PURE__ */ Y(
|
|
2349
2349
|
"div",
|
|
2350
2350
|
{
|
|
2351
|
-
className:
|
|
2351
|
+
className: f(
|
|
2352
2352
|
Bt.root,
|
|
2353
2353
|
Bt[a],
|
|
2354
2354
|
Bt[`label_${D}`],
|
|
@@ -2363,11 +2363,11 @@ const gd = pt(
|
|
|
2363
2363
|
vt && Nt,
|
|
2364
2364
|
l === "ring" ? /* @__PURE__ */ Y("span", { className: Bt.ringWrap, children: [
|
|
2365
2365
|
/* @__PURE__ */ Y("svg", { viewBox: "0 0 100 100", className: Bt.ring, "aria-hidden": "true", children: [
|
|
2366
|
-
/* @__PURE__ */ i("circle", { className:
|
|
2366
|
+
/* @__PURE__ */ i("circle", { className: f(Bt.ringTrack, T?.ringTrack), cx: "50", cy: "50", r: "44" }),
|
|
2367
2367
|
/* @__PURE__ */ i(
|
|
2368
2368
|
"circle",
|
|
2369
2369
|
{
|
|
2370
|
-
className:
|
|
2370
|
+
className: f(Bt.ringProgress, T?.ringProgress),
|
|
2371
2371
|
cx: "50",
|
|
2372
2372
|
cy: "50",
|
|
2373
2373
|
r: "44",
|
|
@@ -2375,24 +2375,24 @@ const gd = pt(
|
|
|
2375
2375
|
}
|
|
2376
2376
|
)
|
|
2377
2377
|
] }),
|
|
2378
|
-
/* @__PURE__ */ i("span", { className:
|
|
2379
|
-
] }) : l === "segments" ? /* @__PURE__ */ i("span", { className:
|
|
2378
|
+
/* @__PURE__ */ i("span", { className: f(Bt.display, Bt.ringDisplay, T?.display), children: it })
|
|
2379
|
+
] }) : l === "segments" ? /* @__PURE__ */ i("span", { className: f(Bt.segments, T?.segments), children: st.map((z, H) => /* @__PURE__ */ Y(Nr, { children: [
|
|
2380
2380
|
H > 0 && b != null && /* @__PURE__ */ i("span", { className: Bt.segmentSep, "aria-hidden": "true", children: b }),
|
|
2381
2381
|
w ? w(z, H) : /* @__PURE__ */ Y(
|
|
2382
2382
|
"span",
|
|
2383
2383
|
{
|
|
2384
|
-
className:
|
|
2384
|
+
className: f(
|
|
2385
2385
|
Bt.segment,
|
|
2386
2386
|
k === "boxed" ? Bt.segmentBoxed : Bt.segmentPlain,
|
|
2387
2387
|
T?.segment
|
|
2388
2388
|
),
|
|
2389
2389
|
children: [
|
|
2390
|
-
/* @__PURE__ */ i("span", { className:
|
|
2391
|
-
/* @__PURE__ */ i("span", { className:
|
|
2390
|
+
/* @__PURE__ */ i("span", { className: f(Bt.segmentValue, T?.segmentValue), children: z.text }),
|
|
2391
|
+
/* @__PURE__ */ i("span", { className: f(Bt.segmentLabel, T?.segmentLabel), children: z.label })
|
|
2392
2392
|
]
|
|
2393
2393
|
}
|
|
2394
2394
|
)
|
|
2395
|
-
] }, z.unit)) }) : /* @__PURE__ */ i("span", { className:
|
|
2395
|
+
] }, z.unit)) }) : /* @__PURE__ */ i("span", { className: f(Bt.display, T?.display), children: it }),
|
|
2396
2396
|
!vt && Nt
|
|
2397
2397
|
]
|
|
2398
2398
|
}
|
|
@@ -2500,27 +2500,27 @@ function cp({
|
|
|
2500
2500
|
max: r = 5,
|
|
2501
2501
|
classes: o
|
|
2502
2502
|
}) {
|
|
2503
|
-
const s = Lr(Yd, Xd, Ud), c = e.startsWith("top");
|
|
2504
|
-
kt(() => {
|
|
2503
|
+
const s = Lr(Yd, Xd, Ud), c = e.startsWith("top"), [l, a] = ut(!1);
|
|
2504
|
+
kt(() => a(!0), []), kt(() => {
|
|
2505
2505
|
jd({ duration: n, max: r });
|
|
2506
2506
|
}, [n, r]), kt(() => Vd(), []);
|
|
2507
|
-
const
|
|
2507
|
+
const u = c ? [...s].reverse() : s, d = l && typeof document < "u" ? se(
|
|
2508
2508
|
/* @__PURE__ */ i(
|
|
2509
2509
|
"div",
|
|
2510
2510
|
{
|
|
2511
|
-
className:
|
|
2511
|
+
className: f(Yt.viewport, Yt[`pos_${e}`], o?.viewport),
|
|
2512
2512
|
role: "region",
|
|
2513
2513
|
"aria-label": "Notifications",
|
|
2514
|
-
children:
|
|
2514
|
+
children: u.map((h) => /* @__PURE__ */ i(
|
|
2515
2515
|
Zd,
|
|
2516
2516
|
{
|
|
2517
|
-
record:
|
|
2518
|
-
exiting:
|
|
2517
|
+
record: h,
|
|
2518
|
+
exiting: h.exiting,
|
|
2519
2519
|
isTop: c,
|
|
2520
2520
|
onDismiss: en,
|
|
2521
2521
|
classes: o
|
|
2522
2522
|
},
|
|
2523
|
-
|
|
2523
|
+
h.id
|
|
2524
2524
|
))
|
|
2525
2525
|
}
|
|
2526
2526
|
),
|
|
@@ -2528,7 +2528,7 @@ function cp({
|
|
|
2528
2528
|
) : null;
|
|
2529
2529
|
return /* @__PURE__ */ Y(jt, { children: [
|
|
2530
2530
|
t,
|
|
2531
|
-
|
|
2531
|
+
d
|
|
2532
2532
|
] });
|
|
2533
2533
|
}
|
|
2534
2534
|
const Gd = {
|
|
@@ -2567,17 +2567,17 @@ const Gd = {
|
|
|
2567
2567
|
) })
|
|
2568
2568
|
};
|
|
2569
2569
|
function Zd({ record: t, exiting: e, isTop: n, onDismiss: r, classes: o }) {
|
|
2570
|
-
const { id: s, variant: c, title: l, description: a, duration:
|
|
2571
|
-
!
|
|
2572
|
-
}, [
|
|
2573
|
-
|
|
2570
|
+
const { id: s, variant: c, title: l, description: a, duration: u = 0 } = t, d = Q(null), h = G(() => {
|
|
2571
|
+
!u || !Number.isFinite(u) || (d.current = setTimeout(() => r(s), u));
|
|
2572
|
+
}, [u, s, r]), m = G(() => {
|
|
2573
|
+
d.current && (clearTimeout(d.current), d.current = null);
|
|
2574
2574
|
}, []);
|
|
2575
|
-
kt(() => (
|
|
2575
|
+
kt(() => (h(), m), [h, m]);
|
|
2576
2576
|
const k = Gd[c];
|
|
2577
2577
|
return /* @__PURE__ */ Y(
|
|
2578
2578
|
"div",
|
|
2579
2579
|
{
|
|
2580
|
-
className:
|
|
2580
|
+
className: f(
|
|
2581
2581
|
Yt.toast,
|
|
2582
2582
|
Yt[c],
|
|
2583
2583
|
n ? Yt.fromTop : Yt.fromBottom,
|
|
@@ -2587,18 +2587,18 @@ function Zd({ record: t, exiting: e, isTop: n, onDismiss: r, classes: o }) {
|
|
|
2587
2587
|
role: c === "danger" || c === "warning" ? "alert" : "status",
|
|
2588
2588
|
"aria-live": c === "danger" || c === "warning" ? "assertive" : "polite",
|
|
2589
2589
|
onMouseEnter: m,
|
|
2590
|
-
onMouseLeave:
|
|
2590
|
+
onMouseLeave: h,
|
|
2591
2591
|
children: [
|
|
2592
|
-
k && /* @__PURE__ */ i("span", { className:
|
|
2593
|
-
/* @__PURE__ */ Y("div", { className:
|
|
2594
|
-
l != null && /* @__PURE__ */ i("div", { className:
|
|
2595
|
-
a != null && /* @__PURE__ */ i("div", { className:
|
|
2592
|
+
k && /* @__PURE__ */ i("span", { className: f(Yt.icon, o?.icon), "aria-hidden": "true", children: k }),
|
|
2593
|
+
/* @__PURE__ */ Y("div", { className: f(Yt.content, o?.content), children: [
|
|
2594
|
+
l != null && /* @__PURE__ */ i("div", { className: f(Yt.title, o?.title), children: l }),
|
|
2595
|
+
a != null && /* @__PURE__ */ i("div", { className: f(Yt.description, o?.description), children: a })
|
|
2596
2596
|
] }),
|
|
2597
2597
|
/* @__PURE__ */ i(
|
|
2598
2598
|
"button",
|
|
2599
2599
|
{
|
|
2600
2600
|
type: "button",
|
|
2601
|
-
className:
|
|
2601
|
+
className: f(Yt.close, o?.close),
|
|
2602
2602
|
onClick: () => r(s),
|
|
2603
2603
|
"aria-label": "Dismiss notification",
|
|
2604
2604
|
children: /* @__PURE__ */ i("svg", { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M6.3 6.3a1 1 0 011.4 0L10 8.6l2.3-2.3a1 1 0 111.4 1.4L11.4 10l2.3 2.3a1 1 0 01-1.4 1.4L10 11.4l-2.3 2.3a1 1 0 01-1.4-1.4L8.6 10 6.3 7.7a1 1 0 010-1.4z" }) })
|
|
@@ -2632,18 +2632,18 @@ function sp({
|
|
|
2632
2632
|
style: c,
|
|
2633
2633
|
children: l
|
|
2634
2634
|
}) {
|
|
2635
|
-
const a = n && n.length > 0,
|
|
2635
|
+
const a = n && n.length > 0, u = wt(
|
|
2636
2636
|
() => ({ reserveErrorSpace: r, classes: o }),
|
|
2637
2637
|
[r, o]
|
|
2638
2638
|
);
|
|
2639
|
-
return /* @__PURE__ */ i(Tr, { ...t, children: /* @__PURE__ */ i(dr.Provider, { value:
|
|
2639
|
+
return /* @__PURE__ */ i(Tr, { ...t, children: /* @__PURE__ */ i(dr.Provider, { value: u, children: /* @__PURE__ */ Y(
|
|
2640
2640
|
"form",
|
|
2641
2641
|
{
|
|
2642
2642
|
onSubmit: t.handleSubmit(e),
|
|
2643
|
-
className:
|
|
2643
|
+
className: f(Ut.root, r === !1 && Ut.rootLooseGap, s),
|
|
2644
2644
|
style: c,
|
|
2645
2645
|
children: [
|
|
2646
|
-
a && /* @__PURE__ */ i("ul", { className: Ut.formErrors, role: "alert", children: n.map((
|
|
2646
|
+
a && /* @__PURE__ */ i("ul", { className: Ut.formErrors, role: "alert", children: n.map((d, h) => /* @__PURE__ */ i("li", { className: Ut.formError, children: d }, h)) }),
|
|
2647
2647
|
l
|
|
2648
2648
|
]
|
|
2649
2649
|
}
|
|
@@ -2666,9 +2666,9 @@ function ip({
|
|
|
2666
2666
|
classes: c,
|
|
2667
2667
|
className: l,
|
|
2668
2668
|
style: a,
|
|
2669
|
-
children:
|
|
2669
|
+
children: u
|
|
2670
2670
|
}) {
|
|
2671
|
-
const { control:
|
|
2671
|
+
const { control: d } = Rr(), { field: h, fieldState: m } = Dr({ name: t, control: d, rules: o }), k = Kt(dr), w = s ?? k?.reserveErrorSpace ?? !0, b = k?.classes, _ = u.type, D = typeof _ == "string" ? "" : _?.displayName ?? _?.name ?? "", U = du.has(D), { ref: B, ...T } = h, A = Q(B);
|
|
2672
2672
|
A.current = B;
|
|
2673
2673
|
const X = G(
|
|
2674
2674
|
(x) => {
|
|
@@ -2681,12 +2681,12 @@ function ip({
|
|
|
2681
2681
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2682
2682
|
[]
|
|
2683
2683
|
);
|
|
2684
|
-
return /* @__PURE__ */ Y("div", { className:
|
|
2685
|
-
e && /* @__PURE__ */ Y("label", { className:
|
|
2684
|
+
return /* @__PURE__ */ Y("div", { className: f(Ut.field, b?.field, c?.field, l), style: a, children: [
|
|
2685
|
+
e && /* @__PURE__ */ Y("label", { className: f(Ut.label, m.error && Ut.labelError, b?.label, c?.label), htmlFor: t, children: [
|
|
2686
2686
|
e,
|
|
2687
2687
|
r && /* @__PURE__ */ i("span", { className: Ut.required, children: "*" })
|
|
2688
2688
|
] }),
|
|
2689
|
-
On(
|
|
2689
|
+
On(u, {
|
|
2690
2690
|
...T,
|
|
2691
2691
|
ref: X,
|
|
2692
2692
|
id: t,
|
|
@@ -2704,20 +2704,20 @@ function ip({
|
|
|
2704
2704
|
// Bridge for Checkbox (expects checked, not value)
|
|
2705
2705
|
checked: typeof T.value == "boolean" ? T.value : void 0
|
|
2706
2706
|
}),
|
|
2707
|
-
m.error?.message && /* @__PURE__ */ i("span", { id: `${t}-error`, className:
|
|
2708
|
-
n && /* @__PURE__ */ i("span", { id: `${t}-helper`, className:
|
|
2707
|
+
m.error?.message && /* @__PURE__ */ i("span", { id: `${t}-error`, className: f(Ut.error, b?.error, c?.error), role: "alert", children: m.error.message }),
|
|
2708
|
+
n && /* @__PURE__ */ i("span", { id: `${t}-helper`, className: f(Ut.helperText, b?.helperText, c?.helperText), children: n }),
|
|
2709
2709
|
w !== !1 && !m.error?.message && /* @__PURE__ */ i(
|
|
2710
2710
|
"div",
|
|
2711
2711
|
{
|
|
2712
2712
|
"aria-hidden": "true",
|
|
2713
|
-
className:
|
|
2713
|
+
className: f(Ut.messageReserve, b?.message, c?.message),
|
|
2714
2714
|
style: typeof w == "number" ? { minHeight: `${w}px` } : typeof w == "string" ? { minHeight: w } : void 0
|
|
2715
2715
|
}
|
|
2716
2716
|
)
|
|
2717
2717
|
] });
|
|
2718
2718
|
}
|
|
2719
2719
|
function lp({ children: t, className: e, style: n }) {
|
|
2720
|
-
return /* @__PURE__ */ i("div", { className:
|
|
2720
|
+
return /* @__PURE__ */ i("div", { className: f(Ut.row, e), style: n, children: t });
|
|
2721
2721
|
}
|
|
2722
2722
|
const uu = "crk-root-rSgdy", hu = "crk-wrapper-GHy8V", fu = "crk-sm-DptM5", mu = "crk-md-F4B0G", pu = "crk-lg-pBxwX", gu = "crk-error-fucxe", ku = "crk-prefix-w53Md", bu = "crk-suffix-fcNgR", vu = "crk-hasPrefix--bqPD", yu = "crk-hasSuffix-zO0nX", Vt = {
|
|
2723
2723
|
root: uu,
|
|
@@ -2741,11 +2741,11 @@ const uu = "crk-root-rSgdy", hu = "crk-wrapper-GHy8V", fu = "crk-sm-DptM5", mu =
|
|
|
2741
2741
|
style: c,
|
|
2742
2742
|
...l
|
|
2743
2743
|
}, a) => {
|
|
2744
|
-
const
|
|
2744
|
+
const u = /* @__PURE__ */ i(
|
|
2745
2745
|
"input",
|
|
2746
2746
|
{
|
|
2747
2747
|
ref: a,
|
|
2748
|
-
className:
|
|
2748
|
+
className: f(
|
|
2749
2749
|
Vt.root,
|
|
2750
2750
|
Vt[t],
|
|
2751
2751
|
e && Vt.error,
|
|
@@ -2761,15 +2761,15 @@ const uu = "crk-root-rSgdy", hu = "crk-wrapper-GHy8V", fu = "crk-sm-DptM5", mu =
|
|
|
2761
2761
|
return n || r ? /* @__PURE__ */ Y(
|
|
2762
2762
|
"div",
|
|
2763
2763
|
{
|
|
2764
|
-
className:
|
|
2764
|
+
className: f(Vt.wrapper, Vt[t], e && Vt.error, o?.wrapper, s),
|
|
2765
2765
|
style: c,
|
|
2766
2766
|
children: [
|
|
2767
|
-
n && /* @__PURE__ */ i("span", { className:
|
|
2768
|
-
|
|
2769
|
-
r && /* @__PURE__ */ i("span", { className:
|
|
2767
|
+
n && /* @__PURE__ */ i("span", { className: f(Vt.prefix, o?.prefix), children: n }),
|
|
2768
|
+
u,
|
|
2769
|
+
r && /* @__PURE__ */ i("span", { className: f(Vt.suffix, o?.suffix), children: r })
|
|
2770
2770
|
]
|
|
2771
2771
|
}
|
|
2772
|
-
) :
|
|
2772
|
+
) : u;
|
|
2773
2773
|
}
|
|
2774
2774
|
);
|
|
2775
2775
|
wu.displayName = "Input";
|
|
@@ -2817,20 +2817,20 @@ const xu = "crk-wrapper-SP2JE", Mu = "crk-sm-DqshL", $u = "crk-md-j4AKI", Nu = "
|
|
|
2817
2817
|
style: c,
|
|
2818
2818
|
children: l,
|
|
2819
2819
|
searchable: a,
|
|
2820
|
-
searchPlaceholder:
|
|
2821
|
-
onChange:
|
|
2822
|
-
onValueChange:
|
|
2820
|
+
searchPlaceholder: u,
|
|
2821
|
+
onChange: d,
|
|
2822
|
+
onValueChange: h,
|
|
2823
2823
|
...m
|
|
2824
2824
|
}, k) => {
|
|
2825
|
-
const w =
|
|
2826
|
-
|
|
2825
|
+
const w = d || h ? (b) => {
|
|
2826
|
+
d?.(b), h?.(b.target.value);
|
|
2827
2827
|
} : void 0;
|
|
2828
|
-
return /* @__PURE__ */ Y("div", { className:
|
|
2828
|
+
return /* @__PURE__ */ Y("div", { className: f(ot.wrapper, ot[t], e && ot.error, o?.wrapper, s), style: c, children: [
|
|
2829
2829
|
/* @__PURE__ */ Y(
|
|
2830
2830
|
"select",
|
|
2831
2831
|
{
|
|
2832
2832
|
ref: k,
|
|
2833
|
-
className:
|
|
2833
|
+
className: f(ot.root, ot[t], e && ot.error, o?.root),
|
|
2834
2834
|
onChange: w,
|
|
2835
2835
|
...m,
|
|
2836
2836
|
children: [
|
|
@@ -2839,7 +2839,7 @@ const xu = "crk-wrapper-SP2JE", Mu = "crk-sm-DqshL", $u = "crk-md-j4AKI", Nu = "
|
|
|
2839
2839
|
]
|
|
2840
2840
|
}
|
|
2841
2841
|
),
|
|
2842
|
-
/* @__PURE__ */ i("span", { className:
|
|
2842
|
+
/* @__PURE__ */ i("span", { className: f(ot.arrow, o?.arrow) })
|
|
2843
2843
|
] });
|
|
2844
2844
|
}
|
|
2845
2845
|
);
|
|
@@ -2855,9 +2855,9 @@ const hr = pt(
|
|
|
2855
2855
|
style: c,
|
|
2856
2856
|
value: l,
|
|
2857
2857
|
disabled: a,
|
|
2858
|
-
id:
|
|
2859
|
-
searchPlaceholder:
|
|
2860
|
-
onChange:
|
|
2858
|
+
id: u,
|
|
2859
|
+
searchPlaceholder: d = "Search...",
|
|
2860
|
+
onChange: h,
|
|
2861
2861
|
onValueChange: m,
|
|
2862
2862
|
portal: k = !0
|
|
2863
2863
|
}, w) => {
|
|
@@ -2877,11 +2877,11 @@ const hr = pt(
|
|
|
2877
2877
|
"value"
|
|
2878
2878
|
)?.set?.call(C.current, v);
|
|
2879
2879
|
const p = new Event("change", { bubbles: !0 });
|
|
2880
|
-
C.current.dispatchEvent(p),
|
|
2880
|
+
C.current.dispatchEvent(p), h?.(p);
|
|
2881
2881
|
}
|
|
2882
2882
|
P();
|
|
2883
2883
|
},
|
|
2884
|
-
[m,
|
|
2884
|
+
[m, h, C, P]
|
|
2885
2885
|
), et = wt(() => {
|
|
2886
2886
|
if (!D) return n;
|
|
2887
2887
|
const v = D.toLowerCase();
|
|
@@ -2931,7 +2931,7 @@ const hr = pt(
|
|
|
2931
2931
|
"div",
|
|
2932
2932
|
{
|
|
2933
2933
|
ref: A,
|
|
2934
|
-
className:
|
|
2934
|
+
className: f(
|
|
2935
2935
|
ot.wrapper,
|
|
2936
2936
|
ot.searchableWrapper,
|
|
2937
2937
|
ot[t],
|
|
@@ -2960,9 +2960,9 @@ const hr = pt(
|
|
|
2960
2960
|
"button",
|
|
2961
2961
|
{
|
|
2962
2962
|
ref: x,
|
|
2963
|
-
id:
|
|
2963
|
+
id: u,
|
|
2964
2964
|
type: "button",
|
|
2965
|
-
className:
|
|
2965
|
+
className: f(
|
|
2966
2966
|
ot.root,
|
|
2967
2967
|
ot.searchableTrigger,
|
|
2968
2968
|
ot[t],
|
|
@@ -2977,8 +2977,8 @@ const hr = pt(
|
|
|
2977
2977
|
"aria-haspopup": "listbox",
|
|
2978
2978
|
"aria-controls": b ? y : void 0,
|
|
2979
2979
|
children: [
|
|
2980
|
-
/* @__PURE__ */ i("span", { className:
|
|
2981
|
-
/* @__PURE__ */ i("span", { className:
|
|
2980
|
+
/* @__PURE__ */ i("span", { className: f(ot.triggerLabel, !j && ot.placeholder), children: j || r }),
|
|
2981
|
+
/* @__PURE__ */ i("span", { className: f(ot.arrow, ot.arrowInline, o?.arrow) })
|
|
2982
2982
|
]
|
|
2983
2983
|
}
|
|
2984
2984
|
),
|
|
@@ -2988,7 +2988,7 @@ const hr = pt(
|
|
|
2988
2988
|
ref: X,
|
|
2989
2989
|
type: "text",
|
|
2990
2990
|
role: "combobox",
|
|
2991
|
-
className:
|
|
2991
|
+
className: f(
|
|
2992
2992
|
ot.root,
|
|
2993
2993
|
ot.searchableTrigger,
|
|
2994
2994
|
ot[t],
|
|
@@ -3020,7 +3020,7 @@ const hr = pt(
|
|
|
3020
3020
|
{
|
|
3021
3021
|
id: y,
|
|
3022
3022
|
ref: S,
|
|
3023
|
-
className:
|
|
3023
|
+
className: f(ot.menu, o?.menu),
|
|
3024
3024
|
style: v,
|
|
3025
3025
|
role: "listbox",
|
|
3026
3026
|
children: /* @__PURE__ */ i("div", { className: ot.menuItems, ref: M, children: et.length === 0 ? /* @__PURE__ */ i("div", { className: ot.noResults, children: "No results" }) : et.map((p, E) => /* @__PURE__ */ i(
|
|
@@ -3030,7 +3030,7 @@ const hr = pt(
|
|
|
3030
3030
|
type: "button",
|
|
3031
3031
|
role: "option",
|
|
3032
3032
|
"aria-selected": p.value === l,
|
|
3033
|
-
className:
|
|
3033
|
+
className: f(
|
|
3034
3034
|
ot.item,
|
|
3035
3035
|
p.disabled && ot.itemDisabled,
|
|
3036
3036
|
p.value === l && ot.itemSelected,
|
|
@@ -3065,9 +3065,9 @@ const fr = pt(
|
|
|
3065
3065
|
style: c,
|
|
3066
3066
|
value: l,
|
|
3067
3067
|
disabled: a,
|
|
3068
|
-
id:
|
|
3069
|
-
searchPlaceholder:
|
|
3070
|
-
onValuesChange:
|
|
3068
|
+
id: u,
|
|
3069
|
+
searchPlaceholder: d,
|
|
3070
|
+
onValuesChange: h,
|
|
3071
3071
|
clearSearchOnSelect: m = !0,
|
|
3072
3072
|
closeOnSelect: k = !0,
|
|
3073
3073
|
allowCreate: w = !1,
|
|
@@ -3082,14 +3082,14 @@ const fr = pt(
|
|
|
3082
3082
|
}, [a]), I = G(
|
|
3083
3083
|
(F) => {
|
|
3084
3084
|
const O = B.includes(F) ? B.filter((W) => W !== F) : [...B, F];
|
|
3085
|
-
|
|
3085
|
+
h?.(O), k ? nt() : m && x("");
|
|
3086
3086
|
},
|
|
3087
|
-
[B,
|
|
3087
|
+
[B, h, k, nt, m]
|
|
3088
3088
|
), v = G(
|
|
3089
3089
|
(F, O) => {
|
|
3090
|
-
O.stopPropagation(),
|
|
3090
|
+
O.stopPropagation(), h?.(B.filter((W) => W !== F));
|
|
3091
3091
|
},
|
|
3092
|
-
[B,
|
|
3092
|
+
[B, h]
|
|
3093
3093
|
), g = wt(() => {
|
|
3094
3094
|
if (!X) return n;
|
|
3095
3095
|
const F = X.toLowerCase();
|
|
@@ -3097,8 +3097,8 @@ const fr = pt(
|
|
|
3097
3097
|
}, [n, X]), p = X.trim(), E = w && p.length > 0 && !n.some(
|
|
3098
3098
|
(F) => F.label.toLowerCase() === p.toLowerCase() || F.value === p
|
|
3099
3099
|
) && !B.includes(p), tt = G(() => {
|
|
3100
|
-
p && (B.includes(p) || (b?.(p),
|
|
3101
|
-
}, [p, B, b,
|
|
3100
|
+
p && (B.includes(p) || (b?.(p), h?.([...B, p]), k ? nt() : m && x("")));
|
|
3101
|
+
}, [p, B, b, h, k, nt, m]);
|
|
3102
3102
|
kt(() => {
|
|
3103
3103
|
const F = g.findIndex((O) => !O.disabled);
|
|
3104
3104
|
M(F >= 0 ? F : 0);
|
|
@@ -3112,7 +3112,7 @@ const fr = pt(
|
|
|
3112
3112
|
(F) => {
|
|
3113
3113
|
const O = g.map((W, it) => W.disabled ? -1 : it).filter((W) => W >= 0);
|
|
3114
3114
|
if (E && O.push(J), F.key === "Backspace" && X === "" && B.length > 0) {
|
|
3115
|
-
F.preventDefault(),
|
|
3115
|
+
F.preventDefault(), h?.(B.slice(0, -1));
|
|
3116
3116
|
return;
|
|
3117
3117
|
}
|
|
3118
3118
|
if (O.length !== 0)
|
|
@@ -3139,7 +3139,7 @@ const fr = pt(
|
|
|
3139
3139
|
W && !W.disabled ? I(W.value) : E && tt();
|
|
3140
3140
|
} else F.key === "Escape" && (F.preventDefault(), nt());
|
|
3141
3141
|
},
|
|
3142
|
-
[g, S, I, nt, X, B,
|
|
3142
|
+
[g, S, I, nt, X, B, h, T, j, E, tt, J]
|
|
3143
3143
|
);
|
|
3144
3144
|
kt(() => {
|
|
3145
3145
|
if (!T) return;
|
|
@@ -3154,7 +3154,7 @@ const fr = pt(
|
|
|
3154
3154
|
"div",
|
|
3155
3155
|
{
|
|
3156
3156
|
ref: y,
|
|
3157
|
-
className:
|
|
3157
|
+
className: f(
|
|
3158
3158
|
ot.wrapper,
|
|
3159
3159
|
ot.searchableWrapper,
|
|
3160
3160
|
ot[t],
|
|
@@ -3184,7 +3184,7 @@ const fr = pt(
|
|
|
3184
3184
|
"div",
|
|
3185
3185
|
{
|
|
3186
3186
|
ref: N,
|
|
3187
|
-
className:
|
|
3187
|
+
className: f(
|
|
3188
3188
|
ot.multiTrigger,
|
|
3189
3189
|
ot[t],
|
|
3190
3190
|
T && ot.triggerOpen,
|
|
@@ -3200,13 +3200,13 @@ const fr = pt(
|
|
|
3200
3200
|
"aria-haspopup": "listbox",
|
|
3201
3201
|
"aria-controls": T ? P : void 0,
|
|
3202
3202
|
children: [
|
|
3203
|
-
ht.map((F) => /* @__PURE__ */ Y("span", { className:
|
|
3203
|
+
ht.map((F) => /* @__PURE__ */ Y("span", { className: f(ot.chip, o?.chip), children: [
|
|
3204
3204
|
/* @__PURE__ */ i("span", { className: ot.chipLabel, children: F.content ?? F.label }),
|
|
3205
3205
|
/* @__PURE__ */ i(
|
|
3206
3206
|
"button",
|
|
3207
3207
|
{
|
|
3208
3208
|
type: "button",
|
|
3209
|
-
className:
|
|
3209
|
+
className: f(ot.chipRemove, o?.chipRemove),
|
|
3210
3210
|
onClick: (O) => v(F.value, O),
|
|
3211
3211
|
"aria-label": `Remove ${F.label}`,
|
|
3212
3212
|
tabIndex: -1,
|
|
@@ -3218,7 +3218,7 @@ const fr = pt(
|
|
|
3218
3218
|
"input",
|
|
3219
3219
|
{
|
|
3220
3220
|
ref: L,
|
|
3221
|
-
id:
|
|
3221
|
+
id: u,
|
|
3222
3222
|
type: "text",
|
|
3223
3223
|
className: ot.multiSearch,
|
|
3224
3224
|
placeholder: B.length === 0 ? r : "",
|
|
@@ -3231,7 +3231,7 @@ const fr = pt(
|
|
|
3231
3231
|
"aria-label": "Search options"
|
|
3232
3232
|
}
|
|
3233
3233
|
),
|
|
3234
|
-
/* @__PURE__ */ i("span", { className:
|
|
3234
|
+
/* @__PURE__ */ i("span", { className: f(ot.arrow, ot.arrowMulti, o?.arrow) })
|
|
3235
3235
|
]
|
|
3236
3236
|
}
|
|
3237
3237
|
),
|
|
@@ -3248,7 +3248,7 @@ const fr = pt(
|
|
|
3248
3248
|
{
|
|
3249
3249
|
id: P,
|
|
3250
3250
|
ref: $,
|
|
3251
|
-
className:
|
|
3251
|
+
className: f(ot.menu, o?.menu),
|
|
3252
3252
|
style: F,
|
|
3253
3253
|
role: "listbox",
|
|
3254
3254
|
"aria-multiselectable": "true",
|
|
@@ -3263,7 +3263,7 @@ const fr = pt(
|
|
|
3263
3263
|
type: "button",
|
|
3264
3264
|
role: "option",
|
|
3265
3265
|
"aria-selected": ft,
|
|
3266
|
-
className:
|
|
3266
|
+
className: f(
|
|
3267
3267
|
ot.item,
|
|
3268
3268
|
W.disabled && ot.itemDisabled,
|
|
3269
3269
|
ft && ot.itemSelected,
|
|
@@ -3287,7 +3287,7 @@ const fr = pt(
|
|
|
3287
3287
|
type: "button",
|
|
3288
3288
|
role: "option",
|
|
3289
3289
|
"aria-selected": !1,
|
|
3290
|
-
className:
|
|
3290
|
+
className: f(
|
|
3291
3291
|
ot.item,
|
|
3292
3292
|
S === J && ot.itemHighlighted,
|
|
3293
3293
|
o?.item
|
|
@@ -3334,9 +3334,9 @@ const eh = "crk-root-fvpfd", nh = "crk-track-MP1oP", rh = "crk-range-fh4JV", oh
|
|
|
3334
3334
|
step: c = 1,
|
|
3335
3335
|
disabled: l = !1,
|
|
3336
3336
|
formatValue: a,
|
|
3337
|
-
classes:
|
|
3338
|
-
className:
|
|
3339
|
-
style:
|
|
3337
|
+
classes: u,
|
|
3338
|
+
className: d,
|
|
3339
|
+
style: h,
|
|
3340
3340
|
"aria-label": m,
|
|
3341
3341
|
"aria-labelledby": k
|
|
3342
3342
|
}, w) => {
|
|
@@ -3399,27 +3399,27 @@ const eh = "crk-root-fvpfd", nh = "crk-track-MP1oP", rh = "crk-range-fh4JV", oh
|
|
|
3399
3399
|
"div",
|
|
3400
3400
|
{
|
|
3401
3401
|
ref: w,
|
|
3402
|
-
className:
|
|
3403
|
-
style:
|
|
3402
|
+
className: f(Me.root, l && Me.disabled, u?.root, d),
|
|
3403
|
+
style: h,
|
|
3404
3404
|
"data-disabled": l || void 0,
|
|
3405
3405
|
children: /* @__PURE__ */ Y(
|
|
3406
3406
|
"div",
|
|
3407
3407
|
{
|
|
3408
3408
|
ref: T,
|
|
3409
|
-
className:
|
|
3409
|
+
className: f(Me.track, u?.track),
|
|
3410
3410
|
onPointerDown: P,
|
|
3411
3411
|
children: [
|
|
3412
3412
|
/* @__PURE__ */ i(
|
|
3413
3413
|
"div",
|
|
3414
3414
|
{
|
|
3415
|
-
className:
|
|
3415
|
+
className: f(Me.range, u?.range),
|
|
3416
3416
|
style: { left: `${j}%`, width: `${I - j}%` }
|
|
3417
3417
|
}
|
|
3418
3418
|
),
|
|
3419
3419
|
nt.map((v, g) => /* @__PURE__ */ i(
|
|
3420
3420
|
"div",
|
|
3421
3421
|
{
|
|
3422
|
-
className:
|
|
3422
|
+
className: f(Me.thumb, u?.thumb),
|
|
3423
3423
|
style: { left: `${y(v)}%` },
|
|
3424
3424
|
role: "slider",
|
|
3425
3425
|
tabIndex: l ? -1 : 0,
|
|
@@ -3470,9 +3470,9 @@ const ih = "crk-root-aUI4c", lh = "crk-sm-t2zR2", ah = "crk-input-82UG6", dh = "
|
|
|
3470
3470
|
precision: c,
|
|
3471
3471
|
inputSize: l = "md",
|
|
3472
3472
|
error: a = !1,
|
|
3473
|
-
hideControls:
|
|
3474
|
-
disabled:
|
|
3475
|
-
classes:
|
|
3473
|
+
hideControls: u = !1,
|
|
3474
|
+
disabled: d,
|
|
3475
|
+
classes: h,
|
|
3476
3476
|
className: m,
|
|
3477
3477
|
style: k,
|
|
3478
3478
|
onKeyDown: w,
|
|
@@ -3500,26 +3500,26 @@ const ih = "crk-root-aUI4c", lh = "crk-sm-t2zR2", ah = "crk-input-82UG6", dh = "
|
|
|
3500
3500
|
[U, n]
|
|
3501
3501
|
), y = G(
|
|
3502
3502
|
(N) => {
|
|
3503
|
-
if (
|
|
3503
|
+
if (d) return;
|
|
3504
3504
|
M(S((x ?? r ?? 0) + N * s));
|
|
3505
3505
|
},
|
|
3506
|
-
[
|
|
3506
|
+
[d, x, r, s, S, M]
|
|
3507
3507
|
), L = o != null && x != null && x >= o, $ = r != null && x != null && x <= r, C = (N) => {
|
|
3508
3508
|
w?.(N), !N.defaultPrevented && (N.key === "ArrowUp" ? (N.preventDefault(), y(1)) : N.key === "ArrowDown" && (N.preventDefault(), y(-1)));
|
|
3509
3509
|
};
|
|
3510
3510
|
return /* @__PURE__ */ Y(
|
|
3511
3511
|
"div",
|
|
3512
3512
|
{
|
|
3513
|
-
className:
|
|
3513
|
+
className: f(
|
|
3514
3514
|
oe.root,
|
|
3515
3515
|
oe[l],
|
|
3516
3516
|
a && oe.error,
|
|
3517
|
-
|
|
3518
|
-
|
|
3517
|
+
d && oe.disabled,
|
|
3518
|
+
h?.root,
|
|
3519
3519
|
m
|
|
3520
3520
|
),
|
|
3521
3521
|
style: k,
|
|
3522
|
-
"data-disabled":
|
|
3522
|
+
"data-disabled": d || void 0,
|
|
3523
3523
|
children: [
|
|
3524
3524
|
/* @__PURE__ */ i(
|
|
3525
3525
|
"input",
|
|
@@ -3527,9 +3527,9 @@ const ih = "crk-root-aUI4c", lh = "crk-sm-t2zR2", ah = "crk-input-82UG6", dh = "
|
|
|
3527
3527
|
ref: D,
|
|
3528
3528
|
type: "text",
|
|
3529
3529
|
inputMode: "decimal",
|
|
3530
|
-
className:
|
|
3530
|
+
className: f(oe.input, h?.input),
|
|
3531
3531
|
value: T,
|
|
3532
|
-
disabled:
|
|
3532
|
+
disabled: d,
|
|
3533
3533
|
"aria-invalid": a || void 0,
|
|
3534
3534
|
onChange: (N) => {
|
|
3535
3535
|
A(N.target.value), n?.(an(N.target.value));
|
|
@@ -3550,15 +3550,15 @@ const ih = "crk-root-aUI4c", lh = "crk-sm-t2zR2", ah = "crk-input-82UG6", dh = "
|
|
|
3550
3550
|
..._
|
|
3551
3551
|
}
|
|
3552
3552
|
),
|
|
3553
|
-
!
|
|
3553
|
+
!u && /* @__PURE__ */ Y("div", { className: f(oe.controls, h?.controls), children: [
|
|
3554
3554
|
/* @__PURE__ */ i(
|
|
3555
3555
|
"button",
|
|
3556
3556
|
{
|
|
3557
3557
|
type: "button",
|
|
3558
3558
|
tabIndex: -1,
|
|
3559
|
-
className:
|
|
3559
|
+
className: f(oe.increment, h?.increment),
|
|
3560
3560
|
onClick: () => y(1),
|
|
3561
|
-
disabled:
|
|
3561
|
+
disabled: d || L,
|
|
3562
3562
|
"aria-label": "Increment",
|
|
3563
3563
|
children: /* @__PURE__ */ i("svg", { viewBox: "0 0 10 6", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M1 5l4-4 4 4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
3564
3564
|
}
|
|
@@ -3568,9 +3568,9 @@ const ih = "crk-root-aUI4c", lh = "crk-sm-t2zR2", ah = "crk-input-82UG6", dh = "
|
|
|
3568
3568
|
{
|
|
3569
3569
|
type: "button",
|
|
3570
3570
|
tabIndex: -1,
|
|
3571
|
-
className:
|
|
3571
|
+
className: f(oe.decrement, h?.decrement),
|
|
3572
3572
|
onClick: () => y(-1),
|
|
3573
|
-
disabled:
|
|
3573
|
+
disabled: d || $,
|
|
3574
3574
|
"aria-label": "Decrement",
|
|
3575
3575
|
children: /* @__PURE__ */ i("svg", { viewBox: "0 0 10 6", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M1 1l4 4 4-4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
3576
3576
|
}
|
|
@@ -3645,9 +3645,9 @@ const zh = pt(
|
|
|
3645
3645
|
weekStartsOn: c = 0,
|
|
3646
3646
|
locale: l,
|
|
3647
3647
|
format: a,
|
|
3648
|
-
placeholder:
|
|
3649
|
-
inputSize:
|
|
3650
|
-
error:
|
|
3648
|
+
placeholder: u = "Select date",
|
|
3649
|
+
inputSize: d = "md",
|
|
3650
|
+
error: h = !1,
|
|
3651
3651
|
disabled: m = !1,
|
|
3652
3652
|
portal: k = !0,
|
|
3653
3653
|
classes: w,
|
|
@@ -3734,18 +3734,18 @@ const zh = pt(
|
|
|
3734
3734
|
"div",
|
|
3735
3735
|
{
|
|
3736
3736
|
ref: N,
|
|
3737
|
-
className:
|
|
3737
|
+
className: f(St.popover, k && St.portalled, w?.popover),
|
|
3738
3738
|
style: k ? { position: "fixed", top: R.top + 4, left: R.left } : void 0,
|
|
3739
3739
|
role: "dialog",
|
|
3740
3740
|
"aria-modal": "false",
|
|
3741
3741
|
"aria-label": "Choose date",
|
|
3742
3742
|
children: [
|
|
3743
|
-
/* @__PURE__ */ Y("div", { className:
|
|
3743
|
+
/* @__PURE__ */ Y("div", { className: f(St.header, w?.header), children: [
|
|
3744
3744
|
/* @__PURE__ */ i(
|
|
3745
3745
|
"button",
|
|
3746
3746
|
{
|
|
3747
3747
|
type: "button",
|
|
3748
|
-
className:
|
|
3748
|
+
className: f(St.nav, w?.nav),
|
|
3749
3749
|
onClick: () => y(Ye(M, -1)),
|
|
3750
3750
|
"aria-label": "Previous month",
|
|
3751
3751
|
children: /* @__PURE__ */ i("svg", { viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M7 2L3 6l4 4" }) })
|
|
@@ -3756,7 +3756,7 @@ const zh = pt(
|
|
|
3756
3756
|
"button",
|
|
3757
3757
|
{
|
|
3758
3758
|
type: "button",
|
|
3759
|
-
className:
|
|
3759
|
+
className: f(St.nav, w?.nav),
|
|
3760
3760
|
onClick: () => y(Ye(M, 1)),
|
|
3761
3761
|
"aria-label": "Next month",
|
|
3762
3762
|
children: /* @__PURE__ */ i("svg", { viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M5 2l4 4-4 4" }) })
|
|
@@ -3769,7 +3769,7 @@ const zh = pt(
|
|
|
3769
3769
|
{
|
|
3770
3770
|
ref: P,
|
|
3771
3771
|
role: "grid",
|
|
3772
|
-
className:
|
|
3772
|
+
className: f(St.grid, w?.grid),
|
|
3773
3773
|
onKeyDown: Z,
|
|
3774
3774
|
children: I.map((O) => {
|
|
3775
3775
|
const W = !Ln(O, M), it = dn(O, X), ft = dn(O, q), bt = v(O), Rt = dn(O, L);
|
|
@@ -3780,7 +3780,7 @@ const zh = pt(
|
|
|
3780
3780
|
role: "gridcell",
|
|
3781
3781
|
"data-date": un(O),
|
|
3782
3782
|
tabIndex: Rt ? 0 : -1,
|
|
3783
|
-
className:
|
|
3783
|
+
className: f(
|
|
3784
3784
|
St.day,
|
|
3785
3785
|
W && St.dayOutside,
|
|
3786
3786
|
ft && St.dayToday,
|
|
@@ -3809,7 +3809,7 @@ const zh = pt(
|
|
|
3809
3809
|
"div",
|
|
3810
3810
|
{
|
|
3811
3811
|
ref: C,
|
|
3812
|
-
className:
|
|
3812
|
+
className: f(St.root, St[d], h && St.error, m && St.disabled, w?.root, b),
|
|
3813
3813
|
style: _,
|
|
3814
3814
|
children: [
|
|
3815
3815
|
/* @__PURE__ */ i(
|
|
@@ -3818,14 +3818,14 @@ const zh = pt(
|
|
|
3818
3818
|
ref: U,
|
|
3819
3819
|
type: "text",
|
|
3820
3820
|
readOnly: !0,
|
|
3821
|
-
className:
|
|
3821
|
+
className: f(St.input, w?.input),
|
|
3822
3822
|
value: X ? et(X) : "",
|
|
3823
|
-
placeholder:
|
|
3823
|
+
placeholder: u,
|
|
3824
3824
|
disabled: m,
|
|
3825
3825
|
"aria-label": D,
|
|
3826
3826
|
"aria-haspopup": "dialog",
|
|
3827
3827
|
"aria-expanded": x,
|
|
3828
|
-
"aria-invalid":
|
|
3828
|
+
"aria-invalid": h || void 0,
|
|
3829
3829
|
onClick: p,
|
|
3830
3830
|
onKeyDown: ht
|
|
3831
3831
|
}
|
|
@@ -3835,7 +3835,7 @@ const zh = pt(
|
|
|
3835
3835
|
{
|
|
3836
3836
|
type: "button",
|
|
3837
3837
|
tabIndex: -1,
|
|
3838
|
-
className:
|
|
3838
|
+
className: f(St.icon, w?.icon),
|
|
3839
3839
|
onClick: p,
|
|
3840
3840
|
disabled: m,
|
|
3841
3841
|
"aria-label": "Open calendar",
|
|
@@ -3868,16 +3868,16 @@ const Wh = "crk-root-61cKD", Fh = "crk-input-bAjPU", Yh = "crk-switchInput-Ichse
|
|
|
3868
3868
|
style: s,
|
|
3869
3869
|
...c
|
|
3870
3870
|
}, l) => {
|
|
3871
|
-
const a = Q(null),
|
|
3871
|
+
const a = Q(null), u = e === "switch", d = n && !u;
|
|
3872
3872
|
return kt(() => {
|
|
3873
|
-
a.current && (a.current.indeterminate =
|
|
3874
|
-
}, [
|
|
3873
|
+
a.current && (a.current.indeterminate = d);
|
|
3874
|
+
}, [d]), /* @__PURE__ */ Y(
|
|
3875
3875
|
"label",
|
|
3876
3876
|
{
|
|
3877
|
-
className:
|
|
3877
|
+
className: f(
|
|
3878
3878
|
pe.root,
|
|
3879
|
-
|
|
3880
|
-
|
|
3879
|
+
u && pe.switchRoot,
|
|
3880
|
+
d && pe.indeterminate,
|
|
3881
3881
|
r?.root,
|
|
3882
3882
|
o
|
|
3883
3883
|
),
|
|
@@ -3886,15 +3886,15 @@ const Wh = "crk-root-61cKD", Fh = "crk-input-bAjPU", Yh = "crk-switchInput-Ichse
|
|
|
3886
3886
|
/* @__PURE__ */ i(
|
|
3887
3887
|
"input",
|
|
3888
3888
|
{
|
|
3889
|
-
ref: (
|
|
3890
|
-
a.current =
|
|
3889
|
+
ref: (h) => {
|
|
3890
|
+
a.current = h, typeof l == "function" ? l(h) : l && (l.current = h);
|
|
3891
3891
|
},
|
|
3892
3892
|
type: "checkbox",
|
|
3893
|
-
className:
|
|
3893
|
+
className: f(pe.input, u && pe.switchInput, r?.input),
|
|
3894
3894
|
...c
|
|
3895
3895
|
}
|
|
3896
3896
|
),
|
|
3897
|
-
t && /* @__PURE__ */ i("span", { className:
|
|
3897
|
+
t && /* @__PURE__ */ i("span", { className: f(pe.label, r?.label), children: t })
|
|
3898
3898
|
]
|
|
3899
3899
|
}
|
|
3900
3900
|
);
|
|
@@ -3926,9 +3926,9 @@ const jh = "crk-group-3jaV7", Vh = "crk-vertical--i2tD", qh = "crk-horizontal-4q
|
|
|
3926
3926
|
orientation: c,
|
|
3927
3927
|
disabled: l = !1,
|
|
3928
3928
|
error: a = !1,
|
|
3929
|
-
name:
|
|
3930
|
-
classes:
|
|
3931
|
-
className:
|
|
3929
|
+
name: u,
|
|
3930
|
+
classes: d,
|
|
3931
|
+
className: h,
|
|
3932
3932
|
style: m,
|
|
3933
3933
|
id: k,
|
|
3934
3934
|
"aria-label": w,
|
|
@@ -3956,13 +3956,13 @@ const jh = "crk-group-3jaV7", Vh = "crk-vertical--i2tD", qh = "crk-horizontal-4q
|
|
|
3956
3956
|
"aria-describedby": _,
|
|
3957
3957
|
"aria-invalid": D,
|
|
3958
3958
|
"aria-required": U || void 0,
|
|
3959
|
-
className:
|
|
3959
|
+
className: f(
|
|
3960
3960
|
Ht.group,
|
|
3961
3961
|
Ht[T],
|
|
3962
3962
|
r === "chips" && Ht.chipsGroup,
|
|
3963
3963
|
a && Ht.error,
|
|
3964
|
-
|
|
3965
|
-
|
|
3964
|
+
d?.group,
|
|
3965
|
+
h
|
|
3966
3966
|
),
|
|
3967
3967
|
style: m,
|
|
3968
3968
|
children: t.map((x) => {
|
|
@@ -3974,14 +3974,14 @@ const jh = "crk-group-3jaV7", Vh = "crk-vertical--i2tD", qh = "crk-horizontal-4q
|
|
|
3974
3974
|
role: "checkbox",
|
|
3975
3975
|
"aria-checked": S,
|
|
3976
3976
|
disabled: M,
|
|
3977
|
-
className:
|
|
3977
|
+
className: f(
|
|
3978
3978
|
Ht.chip,
|
|
3979
3979
|
A,
|
|
3980
3980
|
S && Ht.chipSelected,
|
|
3981
3981
|
s && S && Ht.chipChecked,
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
S &&
|
|
3982
|
+
d?.option,
|
|
3983
|
+
d?.chip,
|
|
3984
|
+
S && d?.chipSelected
|
|
3985
3985
|
),
|
|
3986
3986
|
onClick: () => X(x.value),
|
|
3987
3987
|
children: [
|
|
@@ -3991,7 +3991,7 @@ const jh = "crk-group-3jaV7", Vh = "crk-vertical--i2tD", qh = "crk-horizontal-4q
|
|
|
3991
3991
|
/* @__PURE__ */ i(
|
|
3992
3992
|
"span",
|
|
3993
3993
|
{
|
|
3994
|
-
className:
|
|
3994
|
+
className: f(Ht.chipCheck, S && Ht.chipCheckVisible),
|
|
3995
3995
|
"aria-hidden": "true"
|
|
3996
3996
|
}
|
|
3997
3997
|
),
|
|
@@ -4002,12 +4002,12 @@ const jh = "crk-group-3jaV7", Vh = "crk-vertical--i2tD", qh = "crk-horizontal-4q
|
|
|
4002
4002
|
) : /* @__PURE__ */ i(
|
|
4003
4003
|
mr,
|
|
4004
4004
|
{
|
|
4005
|
-
name:
|
|
4005
|
+
name: u,
|
|
4006
4006
|
value: x.value,
|
|
4007
4007
|
label: x.label,
|
|
4008
4008
|
checked: S,
|
|
4009
4009
|
disabled: M,
|
|
4010
|
-
className:
|
|
4010
|
+
className: f(Ht.option, d?.option),
|
|
4011
4011
|
onChange: () => X(x.value)
|
|
4012
4012
|
},
|
|
4013
4013
|
x.value
|
|
@@ -4033,18 +4033,18 @@ const sf = "crk-group-NNwCD", lf = "crk-root-7fGik", af = "crk-input-43PQW", df
|
|
|
4033
4033
|
id: c,
|
|
4034
4034
|
"aria-label": l,
|
|
4035
4035
|
"aria-labelledby": a,
|
|
4036
|
-
required:
|
|
4036
|
+
required: u
|
|
4037
4037
|
}) => /* @__PURE__ */ i(pr.Provider, { value: { name: t, value: e, onChange: n }, children: /* @__PURE__ */ i(
|
|
4038
4038
|
"div",
|
|
4039
4039
|
{
|
|
4040
4040
|
id: c,
|
|
4041
|
-
className:
|
|
4041
|
+
className: f(je.group, r),
|
|
4042
4042
|
style: o,
|
|
4043
4043
|
role: "radiogroup",
|
|
4044
4044
|
tabIndex: -1,
|
|
4045
4045
|
"aria-label": l,
|
|
4046
4046
|
"aria-labelledby": a,
|
|
4047
|
-
"aria-required":
|
|
4047
|
+
"aria-required": u || void 0,
|
|
4048
4048
|
children: s
|
|
4049
4049
|
}
|
|
4050
4050
|
) });
|
|
@@ -4060,25 +4060,25 @@ const hf = pt(
|
|
|
4060
4060
|
checked: c,
|
|
4061
4061
|
name: l,
|
|
4062
4062
|
...a
|
|
4063
|
-
},
|
|
4064
|
-
const
|
|
4065
|
-
|
|
4063
|
+
}, u) => {
|
|
4064
|
+
const d = Kt(pr), h = d?.name ?? l, m = d ? d.value === e : c, k = (w) => {
|
|
4065
|
+
d?.onChange?.(e), s?.(w);
|
|
4066
4066
|
};
|
|
4067
|
-
return /* @__PURE__ */ Y("label", { className:
|
|
4067
|
+
return /* @__PURE__ */ Y("label", { className: f(je.root, n?.root, r), style: o, children: [
|
|
4068
4068
|
/* @__PURE__ */ i(
|
|
4069
4069
|
"input",
|
|
4070
4070
|
{
|
|
4071
|
-
ref:
|
|
4071
|
+
ref: u,
|
|
4072
4072
|
type: "radio",
|
|
4073
|
-
className:
|
|
4074
|
-
name:
|
|
4073
|
+
className: f(je.input, n?.input),
|
|
4074
|
+
name: h,
|
|
4075
4075
|
value: e,
|
|
4076
4076
|
checked: m,
|
|
4077
4077
|
onChange: k,
|
|
4078
4078
|
...a
|
|
4079
4079
|
}
|
|
4080
4080
|
),
|
|
4081
|
-
t && /* @__PURE__ */ i("span", { className:
|
|
4081
|
+
t && /* @__PURE__ */ i("span", { className: f(je.label, n?.label), children: t })
|
|
4082
4082
|
] });
|
|
4083
4083
|
}
|
|
4084
4084
|
);
|
|
@@ -4110,26 +4110,26 @@ const ff = "crk-root-IGgdn", mf = "crk-sm-N-5I2", pf = "crk-md-bbyFl", gf = "crk
|
|
|
4110
4110
|
onChange: c,
|
|
4111
4111
|
...l
|
|
4112
4112
|
}, a) => {
|
|
4113
|
-
const
|
|
4114
|
-
const k =
|
|
4113
|
+
const u = Q(null), d = G(() => {
|
|
4114
|
+
const k = u.current;
|
|
4115
4115
|
k && (k.style.height = "auto", k.style.height = `${k.scrollHeight}px`);
|
|
4116
|
-
}, []),
|
|
4116
|
+
}, []), h = l.value ?? "";
|
|
4117
4117
|
kt(() => {
|
|
4118
|
-
r &&
|
|
4119
|
-
}, [r,
|
|
4118
|
+
r && d();
|
|
4119
|
+
}, [r, d, h]);
|
|
4120
4120
|
const m = G(
|
|
4121
4121
|
(k) => {
|
|
4122
|
-
r &&
|
|
4122
|
+
r && d(), c?.(k);
|
|
4123
4123
|
},
|
|
4124
|
-
[r,
|
|
4124
|
+
[r, d, c]
|
|
4125
4125
|
);
|
|
4126
4126
|
return /* @__PURE__ */ i(
|
|
4127
4127
|
"textarea",
|
|
4128
4128
|
{
|
|
4129
4129
|
ref: (k) => {
|
|
4130
|
-
|
|
4130
|
+
u.current = k, typeof a == "function" ? a(k) : a && (a.current = k);
|
|
4131
4131
|
},
|
|
4132
|
-
className:
|
|
4132
|
+
className: f(
|
|
4133
4133
|
Ne.root,
|
|
4134
4134
|
Ne[t],
|
|
4135
4135
|
e && Ne.error,
|
|
@@ -4150,16 +4150,16 @@ function Nf(t, e = { width: 600, height: 300 }) {
|
|
|
4150
4150
|
return kt(() => {
|
|
4151
4151
|
const s = t.current;
|
|
4152
4152
|
if (!s || typeof ResizeObserver > "u") return;
|
|
4153
|
-
const c = (
|
|
4154
|
-
const
|
|
4155
|
-
o.current.width ===
|
|
4153
|
+
const c = (u, d) => {
|
|
4154
|
+
const h = Math.max(0, Math.round(u)), m = Math.max(0, Math.round(d));
|
|
4155
|
+
o.current.width === h && o.current.height === m || (o.current = { width: h, height: m }, r({ width: h, height: m }));
|
|
4156
4156
|
}, l = s.getBoundingClientRect();
|
|
4157
4157
|
(l.width > 0 || l.height > 0) && c(l.width, l.height);
|
|
4158
|
-
const a = new ResizeObserver((
|
|
4159
|
-
const
|
|
4160
|
-
if (!
|
|
4161
|
-
const
|
|
4162
|
-
c(
|
|
4158
|
+
const a = new ResizeObserver((u) => {
|
|
4159
|
+
const d = u[0];
|
|
4160
|
+
if (!d) return;
|
|
4161
|
+
const h = d.contentRect;
|
|
4162
|
+
c(h.width, h.height);
|
|
4163
4163
|
});
|
|
4164
4164
|
return a.observe(s), () => a.disconnect();
|
|
4165
4165
|
}, [t]), n;
|
|
@@ -4195,26 +4195,26 @@ const Lf = "crk-root-uMSq0", Tf = "crk-canvas-zhFr0", Rf = "crk-svg-waPLB", Df =
|
|
|
4195
4195
|
tradingHeader: Jf
|
|
4196
4196
|
}, be = pt(
|
|
4197
4197
|
({ aspectRatio: t = 16 / 9, height: e, className: n, style: r, classes: o, legend: s, overlay: c, children: l }, a) => {
|
|
4198
|
-
const
|
|
4199
|
-
Hn(a, () =>
|
|
4200
|
-
const { width:
|
|
4198
|
+
const u = Q(null);
|
|
4199
|
+
Hn(a, () => u.current);
|
|
4200
|
+
const { width: d } = Nf(u), h = Math.max(0, d), m = e ?? Math.round(h / t);
|
|
4201
4201
|
return /* @__PURE__ */ Y(
|
|
4202
4202
|
"div",
|
|
4203
4203
|
{
|
|
4204
|
-
ref:
|
|
4205
|
-
className:
|
|
4204
|
+
ref: u,
|
|
4205
|
+
className: f(V.root, o?.root, n),
|
|
4206
4206
|
style: r,
|
|
4207
4207
|
children: [
|
|
4208
4208
|
/* @__PURE__ */ Y("div", { className: V.canvas, style: { height: m || void 0 }, children: [
|
|
4209
|
-
|
|
4209
|
+
h > 0 && m > 0 && /* @__PURE__ */ i(
|
|
4210
4210
|
"svg",
|
|
4211
4211
|
{
|
|
4212
|
-
className:
|
|
4213
|
-
width:
|
|
4212
|
+
className: f(V.svg, o?.svg),
|
|
4213
|
+
width: h,
|
|
4214
4214
|
height: m,
|
|
4215
|
-
viewBox: `0 0 ${
|
|
4215
|
+
viewBox: `0 0 ${h} ${m}`,
|
|
4216
4216
|
role: "img",
|
|
4217
|
-
children: l({ width:
|
|
4217
|
+
children: l({ width: h, height: m })
|
|
4218
4218
|
}
|
|
4219
4219
|
),
|
|
4220
4220
|
c
|
|
@@ -4228,9 +4228,9 @@ const Lf = "crk-root-uMSq0", Tf = "crk-canvas-zhFr0", Rf = "crk-svg-waPLB", Df =
|
|
|
4228
4228
|
be.displayName = "ChartContainer";
|
|
4229
4229
|
function nn({ config: t, order: e, classes: n }) {
|
|
4230
4230
|
const r = e ?? Object.keys(t);
|
|
4231
|
-
return /* @__PURE__ */ i("div", { className:
|
|
4231
|
+
return /* @__PURE__ */ i("div", { className: f(V.legend, n?.legend), role: "list", children: r.map((o) => {
|
|
4232
4232
|
const s = t[o];
|
|
4233
|
-
return s ? /* @__PURE__ */ Y("div", { className:
|
|
4233
|
+
return s ? /* @__PURE__ */ Y("div", { className: f(V.legendItem, n?.legendItem), role: "listitem", children: [
|
|
4234
4234
|
s.icon ? /* @__PURE__ */ i(
|
|
4235
4235
|
"span",
|
|
4236
4236
|
{
|
|
@@ -4261,15 +4261,15 @@ function De({
|
|
|
4261
4261
|
valueFormat: c = String,
|
|
4262
4262
|
titleKey: l,
|
|
4263
4263
|
resolveColor: a,
|
|
4264
|
-
classes:
|
|
4264
|
+
classes: u
|
|
4265
4265
|
}) {
|
|
4266
4266
|
if (!t) return null;
|
|
4267
|
-
const
|
|
4267
|
+
const d = 180, m = e + d + 16 > r ? e - d - 12 : e + 12, k = Math.max(8, n - 16);
|
|
4268
4268
|
return /* @__PURE__ */ i(
|
|
4269
4269
|
"div",
|
|
4270
4270
|
{
|
|
4271
|
-
className:
|
|
4272
|
-
style: { left: m, top: k, width:
|
|
4271
|
+
className: f(V.tooltip, u?.tooltip),
|
|
4272
|
+
style: { left: m, top: k, width: d },
|
|
4273
4273
|
role: "tooltip",
|
|
4274
4274
|
children: s ? s(t) : /* @__PURE__ */ Y(jt, { children: [
|
|
4275
4275
|
l && t[l] !== void 0 && /* @__PURE__ */ i("div", { className: V.tooltipTitle, children: String(t[l]) }),
|
|
@@ -4288,11 +4288,11 @@ function De({
|
|
|
4288
4288
|
);
|
|
4289
4289
|
}
|
|
4290
4290
|
function gr({ ticks: t, x: e, plotWidth: n, format: r, showGrid: o = !0, classes: s }) {
|
|
4291
|
-
return /* @__PURE__ */ i("g", { className:
|
|
4291
|
+
return /* @__PURE__ */ i("g", { className: f(V.axis, s?.axis), children: t.map(({ value: c, y: l }) => /* @__PURE__ */ Y("g", { children: [
|
|
4292
4292
|
o && /* @__PURE__ */ i(
|
|
4293
4293
|
"line",
|
|
4294
4294
|
{
|
|
4295
|
-
className:
|
|
4295
|
+
className: f(V.gridLine, s?.grid),
|
|
4296
4296
|
x1: e,
|
|
4297
4297
|
x2: e + n,
|
|
4298
4298
|
y1: l,
|
|
@@ -4302,7 +4302,7 @@ function gr({ ticks: t, x: e, plotWidth: n, format: r, showGrid: o = !0, classes
|
|
|
4302
4302
|
/* @__PURE__ */ i(
|
|
4303
4303
|
"text",
|
|
4304
4304
|
{
|
|
4305
|
-
className:
|
|
4305
|
+
className: f(V.axisLabel, s?.axisLabel),
|
|
4306
4306
|
x: e - 8,
|
|
4307
4307
|
y: l,
|
|
4308
4308
|
textAnchor: "end",
|
|
@@ -4313,10 +4313,10 @@ function gr({ ticks: t, x: e, plotWidth: n, format: r, showGrid: o = !0, classes
|
|
|
4313
4313
|
] }, `y-${c}`)) });
|
|
4314
4314
|
}
|
|
4315
4315
|
function kr({ ticks: t, y: e, format: n, classes: r }) {
|
|
4316
|
-
return /* @__PURE__ */ i("g", { className:
|
|
4316
|
+
return /* @__PURE__ */ i("g", { className: f(V.axis, r?.axis), children: t.map(({ label: o, x: s }) => /* @__PURE__ */ i(
|
|
4317
4317
|
"text",
|
|
4318
4318
|
{
|
|
4319
|
-
className:
|
|
4319
|
+
className: f(V.axisLabel, r?.axisLabel),
|
|
4320
4320
|
x: s,
|
|
4321
4321
|
y: e + 16,
|
|
4322
4322
|
textAnchor: "middle",
|
|
@@ -4335,17 +4335,17 @@ function rn(t) {
|
|
|
4335
4335
|
return [e, n];
|
|
4336
4336
|
}
|
|
4337
4337
|
function Re(t, e) {
|
|
4338
|
-
const [n, r] = t, [o, s] = e, c = r - n || 1, l = s - o, a = (
|
|
4339
|
-
return a.invert = (
|
|
4338
|
+
const [n, r] = t, [o, s] = e, c = r - n || 1, l = s - o, a = (u) => o + (u - n) / c * l;
|
|
4339
|
+
return a.invert = (u) => n + (u - o) / l * c, a;
|
|
4340
4340
|
}
|
|
4341
4341
|
function de(t, e, n = 0.2) {
|
|
4342
4342
|
const [r, o] = e, c = (o - r) / Math.max(1, t.length), l = c * (1 - n), a = /* @__PURE__ */ new Map();
|
|
4343
|
-
for (let
|
|
4344
|
-
const
|
|
4345
|
-
const
|
|
4346
|
-
return
|
|
4343
|
+
for (let d = 0; d < t.length; d++) a.set(t[d], d);
|
|
4344
|
+
const u = (d) => {
|
|
4345
|
+
const h = a.get(d);
|
|
4346
|
+
return h === void 0 ? r : r + h * c + c / 2;
|
|
4347
4347
|
};
|
|
4348
|
-
return
|
|
4348
|
+
return u.bandWidth = () => l, u.step = () => c, u;
|
|
4349
4349
|
}
|
|
4350
4350
|
function ve(t, e, n = 5) {
|
|
4351
4351
|
if (t === e)
|
|
@@ -4353,10 +4353,10 @@ function ve(t, e, n = 5) {
|
|
|
4353
4353
|
const o = (e - t) / Math.max(1, n), s = Math.pow(10, Math.floor(Math.log10(o))), c = o / s;
|
|
4354
4354
|
let l;
|
|
4355
4355
|
c < 1.5 ? l = s : c < 3 ? l = 2 * s : c < 7 ? l = 5 * s : l = 10 * s;
|
|
4356
|
-
const a = Math.floor(t / l) * l,
|
|
4357
|
-
for (let
|
|
4358
|
-
|
|
4359
|
-
return
|
|
4356
|
+
const a = Math.floor(t / l) * l, u = Math.ceil(e / l) * l, d = [];
|
|
4357
|
+
for (let h = a; h <= u + l / 2; h += l)
|
|
4358
|
+
d.push(Number(h.toFixed(10)));
|
|
4359
|
+
return d;
|
|
4360
4360
|
}
|
|
4361
4361
|
const tm = { top: 12, right: 16, bottom: 28, left: 48 };
|
|
4362
4362
|
function em(t, e) {
|
|
@@ -4372,8 +4372,8 @@ function em(t, e) {
|
|
|
4372
4372
|
}
|
|
4373
4373
|
let n = `M ${t[0].x} ${t[0].y}`;
|
|
4374
4374
|
for (let r = 0; r < t.length - 1; r++) {
|
|
4375
|
-
const o = t[r - 1] ?? t[r], s = t[r], c = t[r + 1], l = t[r + 2] ?? c, a = s.x + (c.x - o.x) / 6,
|
|
4376
|
-
n += ` C ${a} ${
|
|
4375
|
+
const o = t[r - 1] ?? t[r], s = t[r], c = t[r + 1], l = t[r + 2] ?? c, a = s.x + (c.x - o.x) / 6, u = s.y + (c.y - o.y) / 6, d = c.x - (l.x - s.x) / 6, h = c.y - (l.y - s.y) / 6;
|
|
4376
|
+
n += ` C ${a} ${u}, ${d} ${h}, ${c.x} ${c.y}`;
|
|
4377
4377
|
}
|
|
4378
4378
|
return n;
|
|
4379
4379
|
}
|
|
@@ -4392,9 +4392,9 @@ function ap({
|
|
|
4392
4392
|
showPoints: c = !0,
|
|
4393
4393
|
dotColorKey: l,
|
|
4394
4394
|
renderDot: a,
|
|
4395
|
-
showValues:
|
|
4396
|
-
valuePosition:
|
|
4397
|
-
renderLabel:
|
|
4395
|
+
showValues: u = !1,
|
|
4396
|
+
valuePosition: d = "top",
|
|
4397
|
+
renderLabel: h,
|
|
4398
4398
|
activeIndex: m,
|
|
4399
4399
|
onPointClick: k,
|
|
4400
4400
|
showGrid: w = !0,
|
|
@@ -4419,7 +4419,7 @@ function ap({
|
|
|
4419
4419
|
return n[nt]?.color ?? "var(--crk-chart-1)";
|
|
4420
4420
|
};
|
|
4421
4421
|
if (t.length === 0)
|
|
4422
|
-
return /* @__PURE__ */ i("div", { ref: P, className:
|
|
4422
|
+
return /* @__PURE__ */ i("div", { ref: P, className: f(V.root, y?.root, S), style: M, children: /* @__PURE__ */ i("div", { className: V.canvas, style: { height: o ?? 240 }, children: /* @__PURE__ */ i("div", { className: V.empty, children: x }) }) });
|
|
4423
4423
|
const et = _ && R !== null ? /* @__PURE__ */ i(
|
|
4424
4424
|
De,
|
|
4425
4425
|
{
|
|
@@ -4472,11 +4472,11 @@ function ap({
|
|
|
4472
4472
|
const lt = z[st], dt = typeof lt == "number" ? lt : 0;
|
|
4473
4473
|
return { x: Z(J[H]), y: ft(dt), value: dt, row: z };
|
|
4474
4474
|
});
|
|
4475
|
-
return /* @__PURE__ */ Y("g", { className:
|
|
4475
|
+
return /* @__PURE__ */ Y("g", { className: f(V.series, y?.series), children: [
|
|
4476
4476
|
/* @__PURE__ */ i(
|
|
4477
4477
|
"path",
|
|
4478
4478
|
{
|
|
4479
|
-
className:
|
|
4479
|
+
className: f(V.linePath),
|
|
4480
4480
|
d: em(Nt, s),
|
|
4481
4481
|
stroke: vt.color
|
|
4482
4482
|
}
|
|
@@ -4504,7 +4504,7 @@ function ap({
|
|
|
4504
4504
|
) : /* @__PURE__ */ i(
|
|
4505
4505
|
"circle",
|
|
4506
4506
|
{
|
|
4507
|
-
className:
|
|
4507
|
+
className: f(V.point, y?.point),
|
|
4508
4508
|
cx: z.x,
|
|
4509
4509
|
cy: z.y,
|
|
4510
4510
|
r: dt ? 5 : 3.5,
|
|
@@ -4516,18 +4516,18 @@ function ap({
|
|
|
4516
4516
|
`${st}-${H}`
|
|
4517
4517
|
);
|
|
4518
4518
|
}),
|
|
4519
|
-
(
|
|
4520
|
-
const lt =
|
|
4519
|
+
(u || h) && Nt.map((z, H) => {
|
|
4520
|
+
const lt = h ? h({ row: z.row, value: z.value, seriesKey: st, index: H }) : u ? T ? T(z.value) : String(z.value) : null;
|
|
4521
4521
|
if (lt == null) return null;
|
|
4522
|
-
const dt = 10, at =
|
|
4522
|
+
const dt = 10, at = d === "top" ? z.y - dt : z.y + dt + 4;
|
|
4523
4523
|
return /* @__PURE__ */ i(
|
|
4524
4524
|
"text",
|
|
4525
4525
|
{
|
|
4526
|
-
className:
|
|
4526
|
+
className: f(V.axisLabel),
|
|
4527
4527
|
x: z.x,
|
|
4528
4528
|
y: at,
|
|
4529
4529
|
textAnchor: "middle",
|
|
4530
|
-
dominantBaseline:
|
|
4530
|
+
dominantBaseline: d === "top" ? "auto" : "middle",
|
|
4531
4531
|
children: lt
|
|
4532
4532
|
},
|
|
4533
4533
|
`label-${st}-${H}`
|
|
@@ -4579,7 +4579,7 @@ function ap({
|
|
|
4579
4579
|
function rm(t, e, n, r, o) {
|
|
4580
4580
|
const s = o.current;
|
|
4581
4581
|
if (!s) return 0;
|
|
4582
|
-
const c = s.getBoundingClientRect().width, l = t.map((
|
|
4582
|
+
const c = s.getBoundingClientRect().width, l = t.map((u) => String(u[e]));
|
|
4583
4583
|
return de(l, [n.left, c - n.right], 0)(l[r]);
|
|
4584
4584
|
}
|
|
4585
4585
|
const om = { top: 12, right: 16, bottom: 28, left: 48 };
|
|
@@ -4596,8 +4596,8 @@ function kn(t, e) {
|
|
|
4596
4596
|
}
|
|
4597
4597
|
let n = `M ${t[0].x} ${t[0].y}`;
|
|
4598
4598
|
for (let r = 0; r < t.length - 1; r++) {
|
|
4599
|
-
const o = t[r - 1] ?? t[r], s = t[r], c = t[r + 1], l = t[r + 2] ?? c, a = s.x + (c.x - o.x) / 6,
|
|
4600
|
-
n += ` C ${a} ${
|
|
4599
|
+
const o = t[r - 1] ?? t[r], s = t[r], c = t[r + 1], l = t[r + 2] ?? c, a = s.x + (c.x - o.x) / 6, u = s.y + (c.y - o.y) / 6, d = c.x - (l.x - s.x) / 6, h = c.y - (l.y - s.y) / 6;
|
|
4600
|
+
n += ` C ${a} ${u}, ${d} ${h}, ${c.x} ${c.y}`;
|
|
4601
4601
|
}
|
|
4602
4602
|
return n;
|
|
4603
4603
|
}
|
|
@@ -4626,9 +4626,9 @@ function dp({
|
|
|
4626
4626
|
stacked: c = !1,
|
|
4627
4627
|
stackOffset: l = "none",
|
|
4628
4628
|
fillGradient: a = !1,
|
|
4629
|
-
showGrid:
|
|
4630
|
-
showXAxis:
|
|
4631
|
-
showYAxis:
|
|
4629
|
+
showGrid: u = !0,
|
|
4630
|
+
showXAxis: d = !0,
|
|
4631
|
+
showYAxis: h = !0,
|
|
4632
4632
|
showLegend: m = !0,
|
|
4633
4633
|
showTooltip: k = !0,
|
|
4634
4634
|
yTickCount: w = 5,
|
|
@@ -4645,13 +4645,13 @@ function dp({
|
|
|
4645
4645
|
const S = wt(
|
|
4646
4646
|
() => ({
|
|
4647
4647
|
...om,
|
|
4648
|
-
...
|
|
4648
|
+
...h ? {} : { left: 16 },
|
|
4649
4649
|
...B
|
|
4650
4650
|
}),
|
|
4651
|
-
[B,
|
|
4651
|
+
[B, h]
|
|
4652
4652
|
), M = wt(() => Object.keys(n), [n]), y = c && M.length > 0, L = y && l === "expand", [$, C] = ut(null), N = Q(null), P = qt();
|
|
4653
4653
|
if (t.length === 0)
|
|
4654
|
-
return /* @__PURE__ */ i("div", { ref: N, className:
|
|
4654
|
+
return /* @__PURE__ */ i("div", { ref: N, className: f(V.root, x?.root, A), style: X, children: /* @__PURE__ */ i("div", { className: V.canvas, style: { height: o ?? 240 }, children: /* @__PURE__ */ i("div", { className: V.empty, children: T }) }) });
|
|
4655
4655
|
const R = wt(() => {
|
|
4656
4656
|
const I = M.map(() => []), v = M.map(() => []);
|
|
4657
4657
|
for (let g = 0; g < t.length; g++) {
|
|
@@ -4727,20 +4727,20 @@ function dp({
|
|
|
4727
4727
|
},
|
|
4728
4728
|
st
|
|
4729
4729
|
)) }),
|
|
4730
|
-
|
|
4730
|
+
h ? /* @__PURE__ */ i(
|
|
4731
4731
|
gr,
|
|
4732
4732
|
{
|
|
4733
4733
|
ticks: ft,
|
|
4734
4734
|
x: g,
|
|
4735
4735
|
plotWidth: J,
|
|
4736
4736
|
format: Dt,
|
|
4737
|
-
showGrid:
|
|
4737
|
+
showGrid: u,
|
|
4738
4738
|
classes: x
|
|
4739
4739
|
}
|
|
4740
|
-
) :
|
|
4740
|
+
) : u && /* @__PURE__ */ i("g", { className: f(V.axis, x?.axis), children: ft.map(({ value: st, y: vt }) => /* @__PURE__ */ i(
|
|
4741
4741
|
"line",
|
|
4742
4742
|
{
|
|
4743
|
-
className:
|
|
4743
|
+
className: f(V.gridLine, x?.grid),
|
|
4744
4744
|
x1: g,
|
|
4745
4745
|
x2: p,
|
|
4746
4746
|
y1: vt,
|
|
@@ -4748,13 +4748,13 @@ function dp({
|
|
|
4748
4748
|
},
|
|
4749
4749
|
`grid-${st}`
|
|
4750
4750
|
)) }),
|
|
4751
|
-
|
|
4751
|
+
d && /* @__PURE__ */ i(kr, { ticks: Rt, y: tt, format: _, classes: x }),
|
|
4752
4752
|
M.map((st, vt) => {
|
|
4753
4753
|
const Nt = n[st], z = t.map((at, ct) => ({
|
|
4754
4754
|
x: F(ht[ct]),
|
|
4755
4755
|
y: W(q[vt][ct])
|
|
4756
4756
|
})), H = a ? `url(#${P}-${st})` : Nt.color, lt = a ? 1 : 0.18, dt = y ? Tn(z, et[vt].map((at) => W(at)), s) : Tn(z, it, s);
|
|
4757
|
-
return /* @__PURE__ */ Y("g", { className:
|
|
4757
|
+
return /* @__PURE__ */ Y("g", { className: f(V.series, x?.series), children: [
|
|
4758
4758
|
/* @__PURE__ */ i(
|
|
4759
4759
|
"path",
|
|
4760
4760
|
{
|
|
@@ -4768,7 +4768,7 @@ function dp({
|
|
|
4768
4768
|
!y && z.map((at, ct) => /* @__PURE__ */ i(
|
|
4769
4769
|
"circle",
|
|
4770
4770
|
{
|
|
4771
|
-
className:
|
|
4771
|
+
className: f(V.point, x?.point),
|
|
4772
4772
|
cx: at.x,
|
|
4773
4773
|
cy: at.y,
|
|
4774
4774
|
r: $ === ct ? 5 : 3,
|
|
@@ -4811,7 +4811,7 @@ function dp({
|
|
|
4811
4811
|
function sm(t, e, n, r, o) {
|
|
4812
4812
|
const s = o.current;
|
|
4813
4813
|
if (!s) return 0;
|
|
4814
|
-
const c = s.getBoundingClientRect().width, l = t.map((
|
|
4814
|
+
const c = s.getBoundingClientRect().width, l = t.map((u) => String(u[e]));
|
|
4815
4815
|
return de(l, [n.left, c - n.right], 0)(l[r]);
|
|
4816
4816
|
}
|
|
4817
4817
|
const im = [
|
|
@@ -4836,9 +4836,9 @@ function up({
|
|
|
4836
4836
|
height: c,
|
|
4837
4837
|
groupPadding: l = 0.2,
|
|
4838
4838
|
barPadding: a = 0.1,
|
|
4839
|
-
barRadius:
|
|
4840
|
-
showGrid:
|
|
4841
|
-
showLegend:
|
|
4839
|
+
barRadius: u = 4,
|
|
4840
|
+
showGrid: d = !0,
|
|
4841
|
+
showLegend: h = !0,
|
|
4842
4842
|
showTooltip: m = !0,
|
|
4843
4843
|
showValues: k = !1,
|
|
4844
4844
|
valuePosition: w = "outside",
|
|
@@ -4861,7 +4861,7 @@ function up({
|
|
|
4861
4861
|
}) {
|
|
4862
4862
|
const P = r === "horizontal", R = { ...P ? am : lm, ...y }, q = wt(() => Object.keys(n), [n]), et = o && q.length > 1, [nt, j] = ut(null), I = Q(null);
|
|
4863
4863
|
if (t.length === 0)
|
|
4864
|
-
return /* @__PURE__ */ i("div", { ref: I, className:
|
|
4864
|
+
return /* @__PURE__ */ i("div", { ref: I, className: f(V.root, N?.root, $), style: C, children: /* @__PURE__ */ i("div", { className: V.canvas, style: { height: c ?? 240 }, children: /* @__PURE__ */ i("div", { className: V.empty, children: L }) }) });
|
|
4865
4865
|
const v = t.map((F) => String(F[e])), g = B ?? nt, p = wt(() => {
|
|
4866
4866
|
if (et) {
|
|
4867
4867
|
let it = 0, ft = 0;
|
|
@@ -4910,7 +4910,7 @@ function up({
|
|
|
4910
4910
|
className: $,
|
|
4911
4911
|
style: C,
|
|
4912
4912
|
classes: N,
|
|
4913
|
-
legend:
|
|
4913
|
+
legend: h ? /* @__PURE__ */ i(nn, { config: n, classes: N }) : void 0,
|
|
4914
4914
|
overlay: ht,
|
|
4915
4915
|
children: ({ width: F, height: O }) => {
|
|
4916
4916
|
const W = R.left, it = F - R.right, ft = R.top, bt = O - R.bottom, Rt = Math.max(0, it - W), Dt = Math.max(0, bt - ft), vt = de(v, P ? [ft, bt] : [W, it], l), Nt = vt.bandWidth(), H = Re([tt, J], P ? [W, it] : [bt, ft]), lt = H(0), dt = et ? 1 : Math.max(1, q.length), at = Nt / dt, ct = at * (1 - a), Lt = E.map((K) => ({
|
|
@@ -4918,11 +4918,11 @@ function up({
|
|
|
4918
4918
|
pos: H(K)
|
|
4919
4919
|
})), yt = dm(v);
|
|
4920
4920
|
return /* @__PURE__ */ Y(jt, { children: [
|
|
4921
|
-
|
|
4921
|
+
d && /* @__PURE__ */ i("g", { className: f(V.axis, N?.axis), children: Lt.map(
|
|
4922
4922
|
({ value: K, pos: rt }) => P ? /* @__PURE__ */ i(
|
|
4923
4923
|
"line",
|
|
4924
4924
|
{
|
|
4925
|
-
className:
|
|
4925
|
+
className: f(V.gridLine, N?.grid),
|
|
4926
4926
|
x1: rt,
|
|
4927
4927
|
x2: rt,
|
|
4928
4928
|
y1: ft,
|
|
@@ -4932,7 +4932,7 @@ function up({
|
|
|
4932
4932
|
) : /* @__PURE__ */ i(
|
|
4933
4933
|
"line",
|
|
4934
4934
|
{
|
|
4935
|
-
className:
|
|
4935
|
+
className: f(V.gridLine, N?.grid),
|
|
4936
4936
|
x1: W,
|
|
4937
4937
|
x2: it,
|
|
4938
4938
|
y1: rt,
|
|
@@ -4941,12 +4941,12 @@ function up({
|
|
|
4941
4941
|
`g-${K}`
|
|
4942
4942
|
)
|
|
4943
4943
|
) }),
|
|
4944
|
-
/* @__PURE__ */ i("g", { className:
|
|
4944
|
+
/* @__PURE__ */ i("g", { className: f(V.axis, N?.axis), children: Lt.map(({ value: K, pos: rt }) => {
|
|
4945
4945
|
const mt = X ? X(K) : String(K);
|
|
4946
4946
|
return P ? /* @__PURE__ */ i(
|
|
4947
4947
|
"text",
|
|
4948
4948
|
{
|
|
4949
|
-
className:
|
|
4949
|
+
className: f(V.axisLabel, N?.axisLabel),
|
|
4950
4950
|
x: rt,
|
|
4951
4951
|
y: bt + 16,
|
|
4952
4952
|
textAnchor: "middle",
|
|
@@ -4956,7 +4956,7 @@ function up({
|
|
|
4956
4956
|
) : /* @__PURE__ */ i(
|
|
4957
4957
|
"text",
|
|
4958
4958
|
{
|
|
4959
|
-
className:
|
|
4959
|
+
className: f(V.axisLabel, N?.axisLabel),
|
|
4960
4960
|
x: W - 8,
|
|
4961
4961
|
y: rt,
|
|
4962
4962
|
textAnchor: "end",
|
|
@@ -4966,12 +4966,12 @@ function up({
|
|
|
4966
4966
|
`vt-${K}`
|
|
4967
4967
|
);
|
|
4968
4968
|
}) }),
|
|
4969
|
-
/* @__PURE__ */ i("g", { className:
|
|
4969
|
+
/* @__PURE__ */ i("g", { className: f(V.axis, N?.axis), children: yt.map((K) => {
|
|
4970
4970
|
const rt = vt(K), mt = x ? x(K) : K;
|
|
4971
4971
|
return P ? /* @__PURE__ */ i(
|
|
4972
4972
|
"text",
|
|
4973
4973
|
{
|
|
4974
|
-
className:
|
|
4974
|
+
className: f(V.axisLabel, N?.axisLabel),
|
|
4975
4975
|
x: W - 8,
|
|
4976
4976
|
y: rt,
|
|
4977
4977
|
textAnchor: "end",
|
|
@@ -4982,7 +4982,7 @@ function up({
|
|
|
4982
4982
|
) : /* @__PURE__ */ i(
|
|
4983
4983
|
"text",
|
|
4984
4984
|
{
|
|
4985
|
-
className:
|
|
4985
|
+
className: f(V.axisLabel, N?.axisLabel),
|
|
4986
4986
|
x: rt,
|
|
4987
4987
|
y: bt + 16,
|
|
4988
4988
|
textAnchor: "middle",
|
|
@@ -4994,7 +4994,7 @@ function up({
|
|
|
4994
4994
|
t.map((K, rt) => {
|
|
4995
4995
|
const $t = vt(v[rt]) - Nt / 2;
|
|
4996
4996
|
let xt = 0, zt = 0;
|
|
4997
|
-
return /* @__PURE__ */ i("g", { className:
|
|
4997
|
+
return /* @__PURE__ */ i("g", { className: f(V.series, N?.series), children: q.map((Pt, At) => {
|
|
4998
4998
|
const gt = K[Pt];
|
|
4999
4999
|
if (typeof gt != "number") return null;
|
|
5000
5000
|
const Et = gt, Gt = Z(Pt, rt), Se = U !== void 0 && Et < 0 ? U : Gt, Ce = B !== void 0 ? B === rt : nt === rt, Ie = B !== void 0 && !Ce;
|
|
@@ -5022,7 +5022,7 @@ function up({
|
|
|
5022
5022
|
/* @__PURE__ */ i(
|
|
5023
5023
|
"rect",
|
|
5024
5024
|
{
|
|
5025
|
-
className:
|
|
5025
|
+
className: f(
|
|
5026
5026
|
V.bar,
|
|
5027
5027
|
Ce && V.activeBar,
|
|
5028
5028
|
N?.point
|
|
@@ -5031,8 +5031,8 @@ function up({
|
|
|
5031
5031
|
y: Ae,
|
|
5032
5032
|
width: Math.max(0, Ee),
|
|
5033
5033
|
height: Math.max(0, Pe),
|
|
5034
|
-
rx:
|
|
5035
|
-
ry:
|
|
5034
|
+
rx: u,
|
|
5035
|
+
ry: u,
|
|
5036
5036
|
fill: Se,
|
|
5037
5037
|
opacity: Ie ? 0.35 : 1,
|
|
5038
5038
|
onClick: T ? () => T({ row: K, value: Et, seriesKey: Pt, index: rt }) : void 0,
|
|
@@ -5042,7 +5042,7 @@ function up({
|
|
|
5042
5042
|
on != null && /* @__PURE__ */ i(
|
|
5043
5043
|
"text",
|
|
5044
5044
|
{
|
|
5045
|
-
className:
|
|
5045
|
+
className: f(
|
|
5046
5046
|
V.axisLabel,
|
|
5047
5047
|
(w === "inside" || w === "inside-start") && V.barLabelInside
|
|
5048
5048
|
),
|
|
@@ -5061,7 +5061,7 @@ function up({
|
|
|
5061
5061
|
tt < 0 && J > 0 && /* @__PURE__ */ i(
|
|
5062
5062
|
"line",
|
|
5063
5063
|
{
|
|
5064
|
-
className:
|
|
5064
|
+
className: f(V.gridLine),
|
|
5065
5065
|
x1: P ? lt : W,
|
|
5066
5066
|
x2: P ? lt : it,
|
|
5067
5067
|
y1: P ? ft : lt,
|
|
@@ -5104,16 +5104,16 @@ function um({
|
|
|
5104
5104
|
if (t) {
|
|
5105
5105
|
if (e === "inside-start")
|
|
5106
5106
|
return c >= 0 ? { x: n + 6, y: r + s / 2, textAnchor: "start", dominantBaseline: "middle" } : { x: n + o - 6, y: r + s / 2, textAnchor: "end", dominantBaseline: "middle" };
|
|
5107
|
-
const
|
|
5107
|
+
const u = e === "inside";
|
|
5108
5108
|
return c >= 0 ? {
|
|
5109
|
-
x:
|
|
5109
|
+
x: u ? n + o - 6 : n + o + 6,
|
|
5110
5110
|
y: r + s / 2,
|
|
5111
|
-
textAnchor:
|
|
5111
|
+
textAnchor: u ? "end" : "start",
|
|
5112
5112
|
dominantBaseline: "middle"
|
|
5113
5113
|
} : {
|
|
5114
|
-
x:
|
|
5114
|
+
x: u ? n + 6 : n - 6,
|
|
5115
5115
|
y: r + s / 2,
|
|
5116
|
-
textAnchor:
|
|
5116
|
+
textAnchor: u ? "start" : "end",
|
|
5117
5117
|
dominantBaseline: "middle"
|
|
5118
5118
|
};
|
|
5119
5119
|
}
|
|
@@ -5147,13 +5147,13 @@ function um({
|
|
|
5147
5147
|
function hm(t, e, n, r, o, s, c) {
|
|
5148
5148
|
const l = o.current;
|
|
5149
5149
|
if (!l) return 0;
|
|
5150
|
-
const a = l.getBoundingClientRect(),
|
|
5151
|
-
return s ? a.width / 2 : de(
|
|
5150
|
+
const a = l.getBoundingClientRect(), u = t.map((h) => String(h[e]));
|
|
5151
|
+
return s ? a.width / 2 : de(u, [n.left, a.width - n.right], c)(u[r]);
|
|
5152
5152
|
}
|
|
5153
5153
|
function fm(t, e, n, r, o, s) {
|
|
5154
5154
|
const c = o.current;
|
|
5155
5155
|
if (!c) return 16;
|
|
5156
|
-
const l = c.getBoundingClientRect(), a = t.map((
|
|
5156
|
+
const l = c.getBoundingClientRect(), a = t.map((d) => String(d[e]));
|
|
5157
5157
|
return de(a, [n.top, l.height - n.bottom], s)(a[r]);
|
|
5158
5158
|
}
|
|
5159
5159
|
const mm = [
|
|
@@ -5184,12 +5184,12 @@ function pm(t, e, n, r, o, s) {
|
|
|
5184
5184
|
`A ${n} ${n} 0 1 1 ${t + n} ${e}`,
|
|
5185
5185
|
"Z"
|
|
5186
5186
|
].join(" ");
|
|
5187
|
-
const c = (o - 90) * Math.PI / 180, l = (s - 90) * Math.PI / 180, a = s - o > 180 ? 1 : 0,
|
|
5187
|
+
const c = (o - 90) * Math.PI / 180, l = (s - 90) * Math.PI / 180, a = s - o > 180 ? 1 : 0, u = t + n * Math.cos(c), d = e + n * Math.sin(c), h = t + n * Math.cos(l), m = e + n * Math.sin(l);
|
|
5188
5188
|
if (r > 0) {
|
|
5189
5189
|
const k = t + r * Math.cos(l), w = e + r * Math.sin(l), b = t + r * Math.cos(c), _ = e + r * Math.sin(c);
|
|
5190
5190
|
return [
|
|
5191
|
-
`M ${
|
|
5192
|
-
`A ${n} ${n} 0 ${a} 1 ${
|
|
5191
|
+
`M ${u} ${d}`,
|
|
5192
|
+
`A ${n} ${n} 0 ${a} 1 ${h} ${m}`,
|
|
5193
5193
|
`L ${k} ${w}`,
|
|
5194
5194
|
`A ${r} ${r} 0 ${a} 0 ${b} ${_}`,
|
|
5195
5195
|
"Z"
|
|
@@ -5197,8 +5197,8 @@ function pm(t, e, n, r, o, s) {
|
|
|
5197
5197
|
}
|
|
5198
5198
|
return [
|
|
5199
5199
|
`M ${t} ${e}`,
|
|
5200
|
-
`L ${
|
|
5201
|
-
`A ${n} ${n} 0 ${a} 1 ${
|
|
5200
|
+
`L ${u} ${d}`,
|
|
5201
|
+
`A ${n} ${n} 0 ${a} 1 ${h} ${m}`,
|
|
5202
5202
|
"Z"
|
|
5203
5203
|
].join(" ");
|
|
5204
5204
|
}
|
|
@@ -5216,9 +5216,9 @@ function hp({
|
|
|
5216
5216
|
height: c,
|
|
5217
5217
|
innerRadius: l = 0,
|
|
5218
5218
|
outerRadius: a = "90%",
|
|
5219
|
-
strokeWidth:
|
|
5220
|
-
strokeColor:
|
|
5221
|
-
padAngle:
|
|
5219
|
+
strokeWidth: u = 2,
|
|
5220
|
+
strokeColor: d = "var(--crk-color-bg)",
|
|
5221
|
+
padAngle: h = 0,
|
|
5222
5222
|
showLabels: m = !1,
|
|
5223
5223
|
valuePosition: k = "outside",
|
|
5224
5224
|
showLabelLines: w = !0,
|
|
@@ -5250,7 +5250,7 @@ function hp({
|
|
|
5250
5250
|
return j;
|
|
5251
5251
|
}, [t, e]);
|
|
5252
5252
|
if (t.length === 0 || R === 0)
|
|
5253
|
-
return /* @__PURE__ */ i("div", { ref: C, className:
|
|
5253
|
+
return /* @__PURE__ */ i("div", { ref: C, className: f(V.root, y?.root, S), style: M, children: /* @__PURE__ */ i("div", { className: V.canvas, style: { height: c ?? 240 }, children: /* @__PURE__ */ i("div", { className: V.empty, children: x }) }) });
|
|
5254
5254
|
const q = wt(() => {
|
|
5255
5255
|
const j = [];
|
|
5256
5256
|
let I = 0;
|
|
@@ -5261,7 +5261,7 @@ function hp({
|
|
|
5261
5261
|
j.push({ index: v, row: g, value: E, start: I, end: I + J, fraction: tt }), I += J;
|
|
5262
5262
|
}
|
|
5263
5263
|
return j;
|
|
5264
|
-
}, [t, e, R]), et = B ? /* @__PURE__ */ i("div", { className:
|
|
5264
|
+
}, [t, e, R]), et = B ? /* @__PURE__ */ i("div", { className: f(V.legend, y?.legend), role: "list", children: q.map((j) => /* @__PURE__ */ Y("div", { className: f(V.legendItem, y?.legendItem), role: "listitem", children: [
|
|
5265
5265
|
/* @__PURE__ */ i(
|
|
5266
5266
|
"span",
|
|
5267
5267
|
{
|
|
@@ -5308,14 +5308,14 @@ function hp({
|
|
|
5308
5308
|
const v = j / 2, g = I / 2, p = Math.min(j, I) / 2 - 4, E = Rn(a, p), tt = Math.min(E - 1, Rn(l, p)), J = Math.max(4, E * 0.06);
|
|
5309
5309
|
return /* @__PURE__ */ Y(jt, { children: [
|
|
5310
5310
|
/* @__PURE__ */ i("g", { children: q.map((Z) => {
|
|
5311
|
-
const ht =
|
|
5311
|
+
const ht = h / 2, F = Math.min(Z.end, Z.start + ht), O = Math.max(Z.start, Z.end - ht), W = P(Z.index), it = N === Z.index, ft = D !== void 0 && !it, bt = it && D !== void 0 ? E + J : E, Rt = pm(v, g, bt, tt, F, O), Dt = U ? () => U({ row: Z.row, value: Z.value, index: Z.index }) : void 0;
|
|
5312
5312
|
return /* @__PURE__ */ i(
|
|
5313
5313
|
"path",
|
|
5314
5314
|
{
|
|
5315
5315
|
d: Rt,
|
|
5316
5316
|
fill: W,
|
|
5317
|
-
stroke:
|
|
5318
|
-
strokeWidth:
|
|
5317
|
+
stroke: u > 0 ? d : "none",
|
|
5318
|
+
strokeWidth: u,
|
|
5319
5319
|
opacity: ft ? 0.45 : 1,
|
|
5320
5320
|
onMouseEnter: () => $(Z.index),
|
|
5321
5321
|
onMouseLeave: () => $(null),
|
|
@@ -5352,7 +5352,7 @@ function hp({
|
|
|
5352
5352
|
{
|
|
5353
5353
|
x: it.x,
|
|
5354
5354
|
y: it.y,
|
|
5355
|
-
className:
|
|
5355
|
+
className: f(
|
|
5356
5356
|
V.axisLabel,
|
|
5357
5357
|
F && V.barLabelInside
|
|
5358
5358
|
),
|
|
@@ -5415,9 +5415,9 @@ function fp({
|
|
|
5415
5415
|
showGrid: c = !0,
|
|
5416
5416
|
showRadialLines: l = !0,
|
|
5417
5417
|
showAxisLabels: a = !0,
|
|
5418
|
-
showRadiusAxis:
|
|
5419
|
-
levels:
|
|
5420
|
-
showPoints:
|
|
5418
|
+
showRadiusAxis: u = !1,
|
|
5419
|
+
levels: d = 5,
|
|
5420
|
+
showPoints: h = !0,
|
|
5421
5421
|
fillOpacity: m = 0.4,
|
|
5422
5422
|
strokeWidth: k = 2,
|
|
5423
5423
|
renderAxisLabel: w,
|
|
@@ -5433,7 +5433,7 @@ function fp({
|
|
|
5433
5433
|
}) {
|
|
5434
5434
|
const [S, M] = ut(null), y = Q(null), L = wt(() => Object.keys(n), [n]);
|
|
5435
5435
|
if (t.length === 0)
|
|
5436
|
-
return /* @__PURE__ */ i("div", { ref: y, className:
|
|
5436
|
+
return /* @__PURE__ */ i("div", { ref: y, className: f(V.root, x?.root, A), style: X, children: /* @__PURE__ */ i("div", { className: V.canvas, style: { height: o ?? 240 }, children: /* @__PURE__ */ i("div", { className: V.empty, children: T }) }) });
|
|
5437
5437
|
const $ = wt(
|
|
5438
5438
|
() => t.map((R, q) => q / t.length * 360),
|
|
5439
5439
|
[t]
|
|
@@ -5446,7 +5446,7 @@ function fp({
|
|
|
5446
5446
|
}
|
|
5447
5447
|
const [, q] = rn(R);
|
|
5448
5448
|
return Math.max(1, q);
|
|
5449
|
-
}, [t, L]), N = wt(() => ve(0, C,
|
|
5449
|
+
}, [t, L]), N = wt(() => ve(0, C, d).filter((q) => q > 0), [C, d]), P = N[N.length - 1] ?? C;
|
|
5450
5450
|
return /* @__PURE__ */ i(
|
|
5451
5451
|
be,
|
|
5452
5452
|
{
|
|
@@ -5479,7 +5479,7 @@ function fp({
|
|
|
5479
5479
|
return s === "circle" ? /* @__PURE__ */ i(
|
|
5480
5480
|
"circle",
|
|
5481
5481
|
{
|
|
5482
|
-
className:
|
|
5482
|
+
className: f(V.gridLine, x?.grid),
|
|
5483
5483
|
cx: nt,
|
|
5484
5484
|
cy: j,
|
|
5485
5485
|
r: p,
|
|
@@ -5489,7 +5489,7 @@ function fp({
|
|
|
5489
5489
|
) : /* @__PURE__ */ i(
|
|
5490
5490
|
"polygon",
|
|
5491
5491
|
{
|
|
5492
|
-
className:
|
|
5492
|
+
className: f(V.gridLine, x?.grid),
|
|
5493
5493
|
points: gm(nt, j, p, $),
|
|
5494
5494
|
fill: "none"
|
|
5495
5495
|
},
|
|
@@ -5501,7 +5501,7 @@ function fp({
|
|
|
5501
5501
|
return /* @__PURE__ */ i(
|
|
5502
5502
|
"line",
|
|
5503
5503
|
{
|
|
5504
|
-
className:
|
|
5504
|
+
className: f(V.gridLine, x?.grid),
|
|
5505
5505
|
x1: nt,
|
|
5506
5506
|
y1: j,
|
|
5507
5507
|
x2: E.x,
|
|
@@ -5510,12 +5510,12 @@ function fp({
|
|
|
5510
5510
|
`spoke-${p}`
|
|
5511
5511
|
);
|
|
5512
5512
|
}),
|
|
5513
|
-
|
|
5513
|
+
u && N.map((g) => {
|
|
5514
5514
|
const p = v(g);
|
|
5515
5515
|
return /* @__PURE__ */ i(
|
|
5516
5516
|
"text",
|
|
5517
5517
|
{
|
|
5518
|
-
className:
|
|
5518
|
+
className: f(V.axisLabel, x?.axisLabel),
|
|
5519
5519
|
x: nt + 4,
|
|
5520
5520
|
y: j - p,
|
|
5521
5521
|
textAnchor: "start",
|
|
@@ -5540,7 +5540,7 @@ function fp({
|
|
|
5540
5540
|
return /* @__PURE__ */ i(
|
|
5541
5541
|
"text",
|
|
5542
5542
|
{
|
|
5543
|
-
className:
|
|
5543
|
+
className: f(V.axisLabel, x?.axisLabel),
|
|
5544
5544
|
x: tt.x,
|
|
5545
5545
|
y: tt.y,
|
|
5546
5546
|
textAnchor: J,
|
|
@@ -5555,7 +5555,7 @@ function fp({
|
|
|
5555
5555
|
const ht = J[g], O = v(typeof ht == "number" ? ht : 0);
|
|
5556
5556
|
return Ve(nt, j, O, $[Z]);
|
|
5557
5557
|
}), tt = E.map((J) => `${J.x},${J.y}`).join(" ");
|
|
5558
|
-
return /* @__PURE__ */ Y("g", { className:
|
|
5558
|
+
return /* @__PURE__ */ Y("g", { className: f(V.series, x?.series), children: [
|
|
5559
5559
|
/* @__PURE__ */ i(
|
|
5560
5560
|
"polygon",
|
|
5561
5561
|
{
|
|
@@ -5568,10 +5568,10 @@ function fp({
|
|
|
5568
5568
|
strokeLinecap: "round"
|
|
5569
5569
|
}
|
|
5570
5570
|
),
|
|
5571
|
-
|
|
5571
|
+
h && E.map((J, Z) => /* @__PURE__ */ i(
|
|
5572
5572
|
"circle",
|
|
5573
5573
|
{
|
|
5574
|
-
className:
|
|
5574
|
+
className: f(V.point, x?.point),
|
|
5575
5575
|
cx: J.x,
|
|
5576
5576
|
cy: J.y,
|
|
5577
5577
|
r: S === Z ? 5 : 3.5,
|
|
@@ -5633,15 +5633,15 @@ function vm(t, e, n = 2) {
|
|
|
5633
5633
|
for (let l = e - 1; l < r; l++) {
|
|
5634
5634
|
let a = 0;
|
|
5635
5635
|
for (let m = l - e + 1; m <= l; m++) a += t[m].close;
|
|
5636
|
-
const
|
|
5637
|
-
let
|
|
5636
|
+
const u = a / e;
|
|
5637
|
+
let d = 0;
|
|
5638
5638
|
for (let m = l - e + 1; m <= l; m++) {
|
|
5639
|
-
const k = t[m].close -
|
|
5640
|
-
|
|
5639
|
+
const k = t[m].close - u;
|
|
5640
|
+
d += k * k;
|
|
5641
5641
|
}
|
|
5642
|
-
|
|
5643
|
-
const
|
|
5644
|
-
o[l] =
|
|
5642
|
+
d /= e;
|
|
5643
|
+
const h = Math.sqrt(d);
|
|
5644
|
+
o[l] = u, s[l] = u + n * h, c[l] = u - n * h;
|
|
5645
5645
|
}
|
|
5646
5646
|
return { middle: o, upper: s, lower: c };
|
|
5647
5647
|
}
|
|
@@ -5744,9 +5744,9 @@ function kp({
|
|
|
5744
5744
|
precision: c = 2,
|
|
5745
5745
|
initialLookback: l = Lm,
|
|
5746
5746
|
height: a = wm,
|
|
5747
|
-
upColor:
|
|
5748
|
-
downColor:
|
|
5749
|
-
lineColor:
|
|
5747
|
+
upColor: u = "var(--crk-color-success)",
|
|
5748
|
+
downColor: d = "var(--crk-color-danger)",
|
|
5749
|
+
lineColor: h = "var(--crk-chart-1)",
|
|
5750
5750
|
timezone: m,
|
|
5751
5751
|
defaultTimezone: k = "local",
|
|
5752
5752
|
onTimezoneChange: w,
|
|
@@ -5768,8 +5768,8 @@ function kp({
|
|
|
5768
5768
|
},
|
|
5769
5769
|
[m, w]
|
|
5770
5770
|
), J = wt(
|
|
5771
|
-
() => ({ up:
|
|
5772
|
-
[
|
|
5771
|
+
() => ({ up: u, down: d, line: h }),
|
|
5772
|
+
[u, d, h]
|
|
5773
5773
|
), Z = s, ht = Z.some((z) => z.type === "rsi"), F = Z.some((z) => z.type === "volume"), O = G(() => {
|
|
5774
5774
|
const z = S.current;
|
|
5775
5775
|
if (!z) return;
|
|
@@ -5967,7 +5967,7 @@ function kp({
|
|
|
5967
5967
|
"div",
|
|
5968
5968
|
{
|
|
5969
5969
|
ref: x,
|
|
5970
|
-
className:
|
|
5970
|
+
className: f(V.root, A),
|
|
5971
5971
|
style: { ...X, height: a, position: "relative" },
|
|
5972
5972
|
tabIndex: 0,
|
|
5973
5973
|
role: "figure",
|
|
@@ -6107,12 +6107,12 @@ function Sm() {
|
|
|
6107
6107
|
);
|
|
6108
6108
|
}
|
|
6109
6109
|
function hn(t, e, n, r) {
|
|
6110
|
-
const s = Math.max(0, t - vn), c = xm, l = Math.max(c, e - yn), a = Math.max(0, s - 0),
|
|
6111
|
-
let
|
|
6112
|
-
const m = { top: c, bottom: l, height:
|
|
6110
|
+
const s = Math.max(0, t - vn), c = xm, l = Math.max(c, e - yn), a = Math.max(0, s - 0), u = Math.max(0, l - c);
|
|
6111
|
+
let d = u, h = c;
|
|
6112
|
+
const m = { top: c, bottom: l, height: u };
|
|
6113
6113
|
let k = null, w = null;
|
|
6114
6114
|
const b = n ? Cn.rsi : 0, _ = r ? Cn.volume : 0;
|
|
6115
|
-
return
|
|
6115
|
+
return d = u * (1 - b - _), m.top = h, m.height = d, m.bottom = m.top + d, h = m.bottom, n && (k = { top: h, height: u * b, bottom: h + u * b }, h = k.bottom), r && (w = { top: h, height: u * _, bottom: h + u * _ }), { width: t, height: e, plotLeft: 0, plotRight: s, plotTop: c, plotBottom: l, plotWidth: a, plotHeight: u, main: m, rsi: k, volume: w };
|
|
6116
6116
|
}
|
|
6117
6117
|
function Cm(t, e) {
|
|
6118
6118
|
if (e === 0) return { from: 0, to: 0 };
|
|
@@ -6143,10 +6143,10 @@ function Im(t, e) {
|
|
|
6143
6143
|
}
|
|
6144
6144
|
function vr(t, e, n, r, o) {
|
|
6145
6145
|
let s = 1 / 0, c = -1 / 0;
|
|
6146
|
-
for (const
|
|
6147
|
-
|
|
6148
|
-
for (const
|
|
6149
|
-
const m =
|
|
6146
|
+
for (const h of e)
|
|
6147
|
+
h.low < s && (s = h.low), h.high > c && (c = h.high);
|
|
6148
|
+
for (const h of n) {
|
|
6149
|
+
const m = h.kind === "line" ? [h.values] : [h.upper, h.lower];
|
|
6150
6150
|
for (const k of m) {
|
|
6151
6151
|
const w = Math.max(0, Math.floor(r)), b = Math.min(k.length - 1, Math.ceil(o));
|
|
6152
6152
|
for (let _ = w; _ <= b; _++) {
|
|
@@ -6156,15 +6156,15 @@ function vr(t, e, n, r, o) {
|
|
|
6156
6156
|
}
|
|
6157
6157
|
}
|
|
6158
6158
|
(!isFinite(s) || !isFinite(c)) && (s = 0, c = 1);
|
|
6159
|
-
const l = (c - s) * 0.08 || 1, a = ve(s - l, c + l, 5),
|
|
6160
|
-
return { paneTop: t.top, paneBottom: t.bottom, paneHeight: t.height, priceMin:
|
|
6159
|
+
const l = (c - s) * 0.08 || 1, a = ve(s - l, c + l, 5), u = Math.min(a[0], s), d = Math.max(a[a.length - 1], c);
|
|
6160
|
+
return { paneTop: t.top, paneBottom: t.bottom, paneHeight: t.height, priceMin: u, priceMax: d, ticks: a };
|
|
6161
6161
|
}
|
|
6162
6162
|
function Bm(t, e, n, r) {
|
|
6163
6163
|
let o = 0;
|
|
6164
6164
|
const s = Math.max(0, Math.floor(n)), c = Math.min(e.length - 1, Math.ceil(r));
|
|
6165
|
-
for (let
|
|
6166
|
-
const
|
|
6167
|
-
|
|
6165
|
+
for (let u = s; u <= c; u++) {
|
|
6166
|
+
const d = e[u].volume ?? 0;
|
|
6167
|
+
d > o && (o = d);
|
|
6168
6168
|
}
|
|
6169
6169
|
const l = ve(0, o || 1, 3), a = Math.max(l[l.length - 1], o);
|
|
6170
6170
|
return { paneTop: t.top, paneBottom: t.bottom, paneHeight: t.height, priceMin: 0, priceMax: a, ticks: l };
|
|
@@ -6222,31 +6222,31 @@ function Em(t, e, n, r, o) {
|
|
|
6222
6222
|
}
|
|
6223
6223
|
}
|
|
6224
6224
|
function Pm(t, e, n, r, o, s, c, l) {
|
|
6225
|
-
const a = Math.max(0, Math.floor(n)),
|
|
6226
|
-
for (let
|
|
6227
|
-
const m = e[
|
|
6225
|
+
const a = Math.max(0, Math.floor(n)), u = Math.min(e.length - 1, Math.ceil(r)), d = Math.max(1, s * 0.7);
|
|
6226
|
+
for (let h = a; h <= u; h++) {
|
|
6227
|
+
const m = e[h], k = o(h), w = It(m.open, c), b = It(m.close, c), _ = It(m.high, c), D = It(m.low, c), B = m.close >= m.open ? l.up : l.down;
|
|
6228
6228
|
t.strokeStyle = B, t.fillStyle = B, t.beginPath();
|
|
6229
6229
|
const T = Math.round(k) + 0.5;
|
|
6230
6230
|
t.moveTo(T, _), t.lineTo(T, D), t.stroke();
|
|
6231
6231
|
const A = Math.min(w, b), X = Math.max(1, Math.abs(b - w));
|
|
6232
|
-
t.fillRect(Math.round(k -
|
|
6232
|
+
t.fillRect(Math.round(k - d / 2), Math.round(A), Math.round(d), Math.round(X));
|
|
6233
6233
|
}
|
|
6234
6234
|
}
|
|
6235
6235
|
function Om(t, e, n, r, o, s, c, l) {
|
|
6236
|
-
const a = Math.max(0, Math.floor(n)),
|
|
6236
|
+
const a = Math.max(0, Math.floor(n)), u = Math.min(e.length - 1, Math.ceil(r)), d = Math.max(2, Math.min(s * 0.4, 8));
|
|
6237
6237
|
t.lineWidth = Math.max(1, Math.min(2, s * 0.18)), t.lineCap = "butt";
|
|
6238
|
-
for (let
|
|
6239
|
-
const m = e[
|
|
6240
|
-
t.strokeStyle = U ? l.up : l.down, t.beginPath(), t.moveTo(k, w), t.lineTo(k, b), t.moveTo(k -
|
|
6238
|
+
for (let h = a; h <= u; h++) {
|
|
6239
|
+
const m = e[h], k = Math.round(o(h)) + 0.5, w = It(m.high, c), b = It(m.low, c), _ = It(m.open, c), D = It(m.close, c), U = m.close >= m.open;
|
|
6240
|
+
t.strokeStyle = U ? l.up : l.down, t.beginPath(), t.moveTo(k, w), t.lineTo(k, b), t.moveTo(k - d, _), t.lineTo(k, _), t.moveTo(k, D), t.lineTo(k + d, D), t.stroke();
|
|
6241
6241
|
}
|
|
6242
6242
|
}
|
|
6243
6243
|
function Hm(t, e, n, r, o, s, c, l) {
|
|
6244
|
-
const a = Math.max(0, Math.floor(n)),
|
|
6245
|
-
if (!(
|
|
6244
|
+
const a = Math.max(0, Math.floor(n)), u = Math.min(e.length - 1, Math.ceil(r));
|
|
6245
|
+
if (!(u <= a)) {
|
|
6246
6246
|
t.strokeStyle = c, t.lineWidth = 1.5, t.beginPath(), t.moveTo(o(a), It(e[a].close, s));
|
|
6247
|
-
for (let
|
|
6248
|
-
t.lineTo(o(
|
|
6249
|
-
t.stroke(), l && (t.globalAlpha = 0.18, t.fillStyle = c, t.lineTo(o(
|
|
6247
|
+
for (let d = a + 1; d <= u; d++)
|
|
6248
|
+
t.lineTo(o(d), It(e[d].close, s));
|
|
6249
|
+
t.stroke(), l && (t.globalAlpha = 0.18, t.fillStyle = c, t.lineTo(o(u), s.paneBottom), t.lineTo(o(a), s.paneBottom), t.closePath(), t.fill(), t.globalAlpha = 1);
|
|
6250
6250
|
}
|
|
6251
6251
|
}
|
|
6252
6252
|
function zm(t, e, n, r, o, s, c, l) {
|
|
@@ -6254,45 +6254,45 @@ function zm(t, e, n, r, o, s, c, l) {
|
|
|
6254
6254
|
Le(t, e.values, o, s, c, l, e.color);
|
|
6255
6255
|
return;
|
|
6256
6256
|
}
|
|
6257
|
-
const a = Math.max(0, Math.floor(o)),
|
|
6257
|
+
const a = Math.max(0, Math.floor(o)), u = Math.min(r.length - 1, Math.ceil(s));
|
|
6258
6258
|
t.globalAlpha = e.fillOpacity, t.fillStyle = e.color, t.beginPath();
|
|
6259
|
-
let
|
|
6260
|
-
for (let
|
|
6261
|
-
const m = e.upper[
|
|
6259
|
+
let d = !1;
|
|
6260
|
+
for (let h = a; h <= u; h++) {
|
|
6261
|
+
const m = e.upper[h];
|
|
6262
6262
|
if (m == null) continue;
|
|
6263
|
-
const k = c(
|
|
6264
|
-
|
|
6263
|
+
const k = c(h), w = It(m, l);
|
|
6264
|
+
d ? t.lineTo(k, w) : (t.moveTo(k, w), d = !0);
|
|
6265
6265
|
}
|
|
6266
|
-
for (let
|
|
6267
|
-
const m = e.lower[
|
|
6268
|
-
m != null && t.lineTo(c(
|
|
6266
|
+
for (let h = u; h >= a; h--) {
|
|
6267
|
+
const m = e.lower[h];
|
|
6268
|
+
m != null && t.lineTo(c(h), It(m, l));
|
|
6269
6269
|
}
|
|
6270
6270
|
t.closePath(), t.fill(), t.globalAlpha = 1, Le(t, e.upper, o, s, c, l, e.color), Le(t, e.lower, o, s, c, l, e.color), Le(t, e.middle, o, s, c, l, e.color);
|
|
6271
6271
|
}
|
|
6272
6272
|
function Le(t, e, n, r, o, s, c) {
|
|
6273
6273
|
t.strokeStyle = c, t.lineWidth = 1.25, t.beginPath();
|
|
6274
6274
|
let l = !1;
|
|
6275
|
-
const a = Math.max(0, Math.floor(n)),
|
|
6276
|
-
for (let
|
|
6277
|
-
const
|
|
6278
|
-
if (
|
|
6275
|
+
const a = Math.max(0, Math.floor(n)), u = Math.min(e.length - 1, Math.ceil(r));
|
|
6276
|
+
for (let d = a; d <= u; d++) {
|
|
6277
|
+
const h = e[d];
|
|
6278
|
+
if (h == null) {
|
|
6279
6279
|
l = !1;
|
|
6280
6280
|
continue;
|
|
6281
6281
|
}
|
|
6282
|
-
const m = o(
|
|
6282
|
+
const m = o(d), k = It(h, s);
|
|
6283
6283
|
l ? t.lineTo(m, k) : (t.moveTo(m, k), l = !0);
|
|
6284
6284
|
}
|
|
6285
6285
|
t.stroke();
|
|
6286
6286
|
}
|
|
6287
6287
|
function Wm(t, e, n, r, o, s, c, l) {
|
|
6288
|
-
const a = Math.max(0, Math.floor(n)),
|
|
6289
|
-
for (let
|
|
6290
|
-
const m = e[
|
|
6288
|
+
const a = Math.max(0, Math.floor(n)), u = Math.min(e.length - 1, Math.ceil(r)), d = Math.max(1, s * 0.7);
|
|
6289
|
+
for (let h = a; h <= u; h++) {
|
|
6290
|
+
const m = e[h], k = m.volume ?? 0;
|
|
6291
6291
|
if (k === 0) continue;
|
|
6292
6292
|
const w = m.close >= m.open;
|
|
6293
6293
|
t.fillStyle = w ? l.up : l.down, t.globalAlpha = 0.55;
|
|
6294
6294
|
const b = It(k, c), _ = c.paneBottom - b;
|
|
6295
|
-
t.fillRect(Math.round(o(
|
|
6295
|
+
t.fillRect(Math.round(o(h) - d / 2), Math.round(b), Math.round(d), Math.round(_));
|
|
6296
6296
|
}
|
|
6297
6297
|
t.globalAlpha = 1;
|
|
6298
6298
|
}
|
|
@@ -6308,35 +6308,35 @@ function Bn(t, e, n, r, o) {
|
|
|
6308
6308
|
t.fillStyle = o.textMuted, t.font = "11px system-ui, sans-serif", t.textAlign = "left", t.textBaseline = "top", t.fillText(r, e.plotLeft + 6, n.top + 4);
|
|
6309
6309
|
}
|
|
6310
6310
|
function Ym(t, e, n, r, o, s, c) {
|
|
6311
|
-
const l = o - r + 1, a = e.plotWidth / l,
|
|
6311
|
+
const l = o - r + 1, a = e.plotWidth / l, u = Math.max(1, Math.round(80 / a));
|
|
6312
6312
|
t.fillStyle = c.axis, t.font = "11px system-ui, sans-serif", t.textAlign = "center", t.textBaseline = "middle";
|
|
6313
|
-
const
|
|
6314
|
-
for (let k =
|
|
6313
|
+
const d = Math.max(0, Math.floor(r)), h = Math.min(n.length - 1, Math.ceil(o)), m = e.plotBottom + yn / 2;
|
|
6314
|
+
for (let k = d; k <= h; k += u) {
|
|
6315
6315
|
const w = n[k], b = e.plotLeft + (k - r + 0.5) * a;
|
|
6316
6316
|
t.fillText(jm(w.time, s), b, m);
|
|
6317
6317
|
}
|
|
6318
6318
|
}
|
|
6319
|
-
function Xm(t, e, n, r, o, s, c, l, a,
|
|
6319
|
+
function Xm(t, e, n, r, o, s, c, l, a, u, d, h, m, k, w) {
|
|
6320
6320
|
if (n.x < e.plotLeft || n.x > e.plotRight) return;
|
|
6321
6321
|
const b = s - o + 1, _ = e.plotWidth / b, D = o + (n.x - e.plotLeft) / _ - 0.5, U = Math.round(D), B = Math.max(0, Math.min(r.length - 1, U)), T = c(B);
|
|
6322
|
-
if (t.save(), t.strokeStyle =
|
|
6322
|
+
if (t.save(), t.strokeStyle = d.textMuted, t.setLineDash([3, 3]), t.lineWidth = 1, t.beginPath(), t.moveTo(T + 0.5, e.plotTop), t.lineTo(T + 0.5, e.plotBottom), t.moveTo(e.plotLeft, n.y + 0.5), t.lineTo(e.plotRight, n.y + 0.5), t.stroke(), t.setLineDash([]), n.y >= a.paneTop && n.y <= a.paneBottom) {
|
|
6323
6323
|
const A = a.priceMax - (n.y - a.paneTop) / a.paneHeight * (a.priceMax - a.priceMin);
|
|
6324
|
-
t.fillStyle =
|
|
6324
|
+
t.fillStyle = d.text, t.fillRect(e.plotRight, n.y - 9, vn, 18), t.fillStyle = d.bg, t.font = "11px system-ui, sans-serif", t.textAlign = "left", t.textBaseline = "middle", t.fillText(A.toFixed(l), e.plotRight + 6, n.y);
|
|
6325
6325
|
}
|
|
6326
6326
|
if (r[B]) {
|
|
6327
|
-
const A = xr(r[B].time,
|
|
6327
|
+
const A = xr(r[B].time, u);
|
|
6328
6328
|
t.font = "11px system-ui, sans-serif", t.textBaseline = "middle";
|
|
6329
6329
|
const S = t.measureText(A).width + 8 * 2, M = yn, y = Math.max(
|
|
6330
6330
|
e.plotLeft,
|
|
6331
6331
|
Math.min(e.plotRight - S, T - S / 2)
|
|
6332
6332
|
), L = e.plotBottom;
|
|
6333
|
-
t.fillStyle =
|
|
6333
|
+
t.fillStyle = d.text, t.fillRect(y, L, S, M), t.fillStyle = d.bg, t.textAlign = "center", t.fillText(A, y + S / 2, L + M / 2);
|
|
6334
6334
|
}
|
|
6335
6335
|
if (r[B]) {
|
|
6336
6336
|
const A = r[B], X = A.close.toFixed(l);
|
|
6337
6337
|
let x = X;
|
|
6338
6338
|
if (k) {
|
|
6339
|
-
const N = (w ?? wr)(A.time,
|
|
6339
|
+
const N = (w ?? wr)(A.time, h, u);
|
|
6340
6340
|
N && (x = `${X} · ${N}`);
|
|
6341
6341
|
}
|
|
6342
6342
|
t.font = "11px system-ui, sans-serif", t.textBaseline = "middle";
|
|
@@ -6346,9 +6346,9 @@ function Xm(t, e, n, r, o, s, c, l, a, d, u, f, m, k, w) {
|
|
|
6346
6346
|
), C = Math.max(0, e.plotTop - L - 2);
|
|
6347
6347
|
if (m) {
|
|
6348
6348
|
const N = A.close >= A.open;
|
|
6349
|
-
t.fillStyle = N ?
|
|
6349
|
+
t.fillStyle = N ? d.up : d.down, t.fillRect($, C, y, L), t.fillStyle = "#ffffff";
|
|
6350
6350
|
} else
|
|
6351
|
-
t.fillStyle =
|
|
6351
|
+
t.fillStyle = d.text, t.fillRect($, C, y, L), t.fillStyle = d.bg;
|
|
6352
6352
|
t.textAlign = "center", t.fillText(x, $ + y / 2, C + L / 2);
|
|
6353
6353
|
}
|
|
6354
6354
|
t.restore();
|
|
@@ -6377,11 +6377,11 @@ const _n = [
|
|
|
6377
6377
|
], An = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
6378
6378
|
function wr(t, e, n) {
|
|
6379
6379
|
const r = new Date(t * 1e3), o = e === "D" || e === "W" || e === "M";
|
|
6380
|
-
let s, c, l, a,
|
|
6380
|
+
let s, c, l, a, u, d;
|
|
6381
6381
|
if (n === "local")
|
|
6382
|
-
s = r.getDate(), c = r.getMonth(), l = r.getFullYear(), a = r.getHours(),
|
|
6382
|
+
s = r.getDate(), c = r.getMonth(), l = r.getFullYear(), a = r.getHours(), u = r.getMinutes(), d = r.getDay();
|
|
6383
6383
|
else if (n === "utc")
|
|
6384
|
-
s = r.getUTCDate(), c = r.getUTCMonth(), l = r.getUTCFullYear(), a = r.getUTCHours(),
|
|
6384
|
+
s = r.getUTCDate(), c = r.getUTCMonth(), l = r.getUTCFullYear(), a = r.getUTCHours(), u = r.getUTCMinutes(), d = r.getUTCDay();
|
|
6385
6385
|
else
|
|
6386
6386
|
try {
|
|
6387
6387
|
const m = new Intl.DateTimeFormat("en-US", {
|
|
@@ -6395,13 +6395,13 @@ function wr(t, e, n) {
|
|
|
6395
6395
|
hour12: !1,
|
|
6396
6396
|
hourCycle: "h23"
|
|
6397
6397
|
}).formatToParts(r), k = (_) => m.find((D) => D.type === _)?.value ?? "";
|
|
6398
|
-
s = Number(k("day")), c = Number(k("month")) - 1, l = Number(k("year")), a = Number(k("hour")),
|
|
6398
|
+
s = Number(k("day")), c = Number(k("month")) - 1, l = Number(k("year")), a = Number(k("hour")), u = Number(k("minute"));
|
|
6399
6399
|
const w = k("weekday"), b = An.indexOf(w);
|
|
6400
|
-
|
|
6400
|
+
d = b >= 0 ? b : 0;
|
|
6401
6401
|
} catch {
|
|
6402
6402
|
return wr(t, e, "utc");
|
|
6403
6403
|
}
|
|
6404
|
-
return o ? `${s} ${_n[c]} ${l}` : `${An[
|
|
6404
|
+
return o ? `${s} ${_n[c]} ${l}` : `${An[d]} ${s} ${_n[c]} ${_t(a)}:${_t(u)}`;
|
|
6405
6405
|
}
|
|
6406
6406
|
function xr(t, e) {
|
|
6407
6407
|
const n = new Date(t * 1e3);
|
|
@@ -6456,8 +6456,8 @@ function qm(t, e) {
|
|
|
6456
6456
|
return t.map((r, o) => `${o === 0 ? "M" : "L"} ${r.x} ${r.y}`).join(" ");
|
|
6457
6457
|
let n = `M ${t[0].x} ${t[0].y}`;
|
|
6458
6458
|
for (let r = 0; r < t.length - 1; r++) {
|
|
6459
|
-
const o = t[r - 1] ?? t[r], s = t[r], c = t[r + 1], l = t[r + 2] ?? c, a = s.x + (c.x - o.x) / 6,
|
|
6460
|
-
n += ` C ${a} ${
|
|
6459
|
+
const o = t[r - 1] ?? t[r], s = t[r], c = t[r + 1], l = t[r + 2] ?? c, a = s.x + (c.x - o.x) / 6, u = s.y + (c.y - o.y) / 6, d = c.x - (l.x - s.x) / 6, h = c.y - (l.y - s.y) / 6;
|
|
6460
|
+
n += ` C ${a} ${u}, ${d} ${h}, ${c.x} ${c.y}`;
|
|
6461
6461
|
}
|
|
6462
6462
|
return n;
|
|
6463
6463
|
}
|
|
@@ -6472,9 +6472,9 @@ const Km = pt(
|
|
|
6472
6472
|
fill: c = !1,
|
|
6473
6473
|
showLastPoint: l = !1,
|
|
6474
6474
|
"aria-label": a,
|
|
6475
|
-
className:
|
|
6476
|
-
style:
|
|
6477
|
-
},
|
|
6475
|
+
className: u,
|
|
6476
|
+
style: d
|
|
6477
|
+
}, h) => {
|
|
6478
6478
|
const { line: m, area: k, last: w } = wt(() => {
|
|
6479
6479
|
if (t.length === 0) return { line: "", area: "", last: null };
|
|
6480
6480
|
const b = o, _ = Math.max(1, e - b * 2), D = Math.max(1, n - b * 2), [U, B] = rn(t), T = Re([0, Math.max(1, t.length - 1)], [b, b + _]), A = Re([U, B], [b + D, b]), X = t.map((M, y) => ({ x: T(y), y: A(M) })), x = qm(X, s), S = c ? `${x} L ${X[X.length - 1].x} ${b + D} L ${X[0].x} ${b + D} Z` : "";
|
|
@@ -6483,9 +6483,9 @@ const Km = pt(
|
|
|
6483
6483
|
return /* @__PURE__ */ Y(
|
|
6484
6484
|
"svg",
|
|
6485
6485
|
{
|
|
6486
|
-
ref:
|
|
6487
|
-
className:
|
|
6488
|
-
style:
|
|
6486
|
+
ref: h,
|
|
6487
|
+
className: f(V.sparkline, u),
|
|
6488
|
+
style: d,
|
|
6489
6489
|
width: e,
|
|
6490
6490
|
height: n,
|
|
6491
6491
|
viewBox: `0 0 ${e} ${n}`,
|