@senitix/ui 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avatar-C0aVNCG9.cjs +2 -0
- package/dist/avatar-C0aVNCG9.cjs.map +1 -0
- package/dist/avatar-CN6wcrqY.js +288 -0
- package/dist/avatar-CN6wcrqY.js.map +1 -0
- package/dist/calendar-BFWc4IB7.js +1182 -0
- package/dist/calendar-BFWc4IB7.js.map +1 -0
- package/dist/calendar-BUm7YrNf.cjs +2 -0
- package/dist/calendar-BUm7YrNf.cjs.map +1 -0
- package/dist/calendar-ChJkFXXr.js +11 -0
- package/dist/calendar-ChJkFXXr.js.map +1 -0
- package/dist/calendar-SwL5isYC.cjs +2 -0
- package/dist/calendar-SwL5isYC.cjs.map +1 -0
- package/dist/card-K4fxyYwE.js +51 -0
- package/dist/card-K4fxyYwE.js.map +1 -0
- package/dist/card-tMkUxpmW.cjs +2 -0
- package/dist/card-tMkUxpmW.cjs.map +1 -0
- package/dist/checkbox-CpOq5hkT.js +289 -0
- package/dist/checkbox-CpOq5hkT.js.map +1 -0
- package/dist/checkbox-D7-LQyCl.cjs +2 -0
- package/dist/checkbox-D7-LQyCl.cjs.map +1 -0
- package/dist/chevron-down-DHdXqOqK.cjs +2 -0
- package/dist/chevron-down-DHdXqOqK.cjs.map +1 -0
- package/dist/chevron-down-DJ1_YIFu.js +8 -0
- package/dist/chevron-down-DJ1_YIFu.js.map +1 -0
- package/dist/chevron-right-B3bovvh0.js +8 -0
- package/dist/chevron-right-B3bovvh0.js.map +1 -0
- package/dist/chevron-right-Dvyd11q0.cjs +2 -0
- package/dist/chevron-right-Dvyd11q0.cjs.map +1 -0
- package/dist/chevron-up-B9fuiZhc.cjs +2 -0
- package/dist/chevron-up-B9fuiZhc.cjs.map +1 -0
- package/dist/chevron-up-CGtXOr51.js +6 -0
- package/dist/chevron-up-CGtXOr51.js.map +1 -0
- package/dist/components/charts/index.cjs.js +2 -0
- package/dist/components/charts/index.cjs.js.map +1 -0
- package/dist/components/charts/index.es.js +12 -0
- package/dist/components/charts/index.es.js.map +1 -0
- package/dist/components/data-display/index.cjs.js +2 -0
- package/dist/components/data-display/index.cjs.js.map +1 -0
- package/dist/components/data-display/index.es.js +25 -0
- package/dist/components/data-display/index.es.js.map +1 -0
- package/dist/components/dnd/index.cjs.js +2 -0
- package/dist/components/dnd/index.cjs.js.map +1 -0
- package/dist/components/dnd/index.es.js +9 -0
- package/dist/components/dnd/index.es.js.map +1 -0
- package/dist/components/feedback/index.cjs.js +2 -0
- package/dist/components/feedback/index.cjs.js.map +1 -0
- package/dist/components/feedback/index.es.js +16 -0
- package/dist/components/feedback/index.es.js.map +1 -0
- package/dist/components/forms/index.cjs.js +2 -0
- package/dist/components/forms/index.cjs.js.map +1 -0
- package/dist/components/forms/index.es.js +27 -0
- package/dist/components/forms/index.es.js.map +1 -0
- package/dist/components/layouts/index.cjs.js +2 -0
- package/dist/components/layouts/index.cjs.js.map +1 -0
- package/dist/components/layouts/index.es.js +25 -0
- package/dist/components/layouts/index.es.js.map +1 -0
- package/dist/components/navigation/index.cjs.js +2 -0
- package/dist/components/navigation/index.cjs.js.map +1 -0
- package/dist/components/navigation/index.es.js +42 -0
- package/dist/components/navigation/index.es.js.map +1 -0
- package/dist/components/ui/index.cjs.js +2 -0
- package/dist/components/ui/index.cjs.js.map +1 -0
- package/dist/components/ui/index.es.js +165 -0
- package/dist/components/ui/index.es.js.map +1 -0
- package/dist/createLucideIcon-BbeNo6vq.js +56 -0
- package/dist/createLucideIcon-BbeNo6vq.js.map +1 -0
- package/dist/createLucideIcon-i5GEhNMV.cjs +2 -0
- package/dist/createLucideIcon-i5GEhNMV.cjs.map +1 -0
- package/dist/ellipsis-BW2gWki8.cjs +2 -0
- package/dist/ellipsis-BW2gWki8.cjs.map +1 -0
- package/dist/ellipsis-CiKEaUNP.js +10 -0
- package/dist/ellipsis-CiKEaUNP.js.map +1 -0
- package/dist/file-V_hhCUhr.cjs +2 -0
- package/dist/file-V_hhCUhr.cjs.map +1 -0
- package/dist/file-wzTXnWqz.js +9 -0
- package/dist/file-wzTXnWqz.js.map +1 -0
- package/dist/filter-tags-DjUaNXHR.cjs +5 -0
- package/dist/filter-tags-DjUaNXHR.cjs.map +1 -0
- package/dist/filter-tags-i_I8qV1N.js +2658 -0
- package/dist/filter-tags-i_I8qV1N.js.map +1 -0
- package/dist/full-calendar-7ac2FFU6.js +3518 -0
- package/dist/full-calendar-7ac2FFU6.js.map +1 -0
- package/dist/full-calendar-Cpeh5xMP.cjs +8 -0
- package/dist/full-calendar-Cpeh5xMP.cjs.map +1 -0
- package/dist/global-search-UNXjoFlI.cjs +2 -0
- package/dist/global-search-UNXjoFlI.cjs.map +1 -0
- package/dist/global-search-h1rVbP2q.js +1188 -0
- package/dist/global-search-h1rVbP2q.js.map +1 -0
- package/dist/hooks/index.cjs.js +2 -0
- package/dist/hooks/index.cjs.js.map +1 -0
- package/dist/hooks/index.es.js +13 -0
- package/dist/hooks/index.es.js.map +1 -0
- package/dist/index-Co9o9StL.js +33 -0
- package/dist/index-Co9o9StL.js.map +1 -0
- package/dist/index-CwJPJKOE.js +2278 -0
- package/dist/index-CwJPJKOE.js.map +1 -0
- package/dist/index-CzVK9Zyb.cjs +6 -0
- package/dist/index-CzVK9Zyb.cjs.map +1 -0
- package/dist/index-l828OqQN.js +288 -0
- package/dist/index-l828OqQN.js.map +1 -0
- package/dist/index-lGzB9daF.cjs +2 -0
- package/dist/index-lGzB9daF.cjs.map +1 -0
- package/dist/index-lT9bLt9X.cjs +2 -0
- package/dist/index-lT9bLt9X.cjs.map +1 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.es.js +332 -0
- package/dist/index.es.js.map +1 -0
- package/dist/input-CZrckPLk.cjs +42 -0
- package/dist/input-CZrckPLk.cjs.map +1 -0
- package/dist/input-D4AoiWxo.js +3629 -0
- package/dist/input-D4AoiWxo.js.map +1 -0
- package/dist/locale-provider-DHMwuneF.cjs +2 -0
- package/dist/locale-provider-DHMwuneF.cjs.map +1 -0
- package/dist/locale-provider-DanG6RRG.js +1012 -0
- package/dist/locale-provider-DanG6RRG.js.map +1 -0
- package/dist/locale-selector-Ppe0KTi-.cjs +2 -0
- package/dist/locale-selector-Ppe0KTi-.cjs.map +1 -0
- package/dist/locale-selector-xn2GpdP9.js +1745 -0
- package/dist/locale-selector-xn2GpdP9.js.map +1 -0
- package/dist/minus-BXBFZSZs.cjs +2 -0
- package/dist/minus-BXBFZSZs.cjs.map +1 -0
- package/dist/minus-DvlYtl96.js +6 -0
- package/dist/minus-DvlYtl96.js.map +1 -0
- package/dist/multi-container-C2UpSw5f.js +731 -0
- package/dist/multi-container-C2UpSw5f.js.map +1 -0
- package/dist/multi-container-DMKL8c9B.cjs +2 -0
- package/dist/multi-container-DMKL8c9B.cjs.map +1 -0
- package/dist/pipeline-By5_8AFg.cjs +2 -0
- package/dist/pipeline-By5_8AFg.cjs.map +1 -0
- package/dist/pipeline-D-QNSU0U.js +1036 -0
- package/dist/pipeline-D-QNSU0U.js.map +1 -0
- package/dist/plus-8wKRkVu-.cjs +2 -0
- package/dist/plus-8wKRkVu-.cjs.map +1 -0
- package/dist/plus-CJD68KQD.js +9 -0
- package/dist/plus-CJD68KQD.js.map +1 -0
- package/dist/popover-4V4sGe1U.js +765 -0
- package/dist/popover-4V4sGe1U.js.map +1 -0
- package/dist/popover-ivh-plLc.cjs +2 -0
- package/dist/popover-ivh-plLc.cjs.map +1 -0
- package/dist/progress-CFnuLqnS.cjs +7 -0
- package/dist/progress-CFnuLqnS.cjs.map +1 -0
- package/dist/progress-D5AsrWa6.js +222 -0
- package/dist/progress-D5AsrWa6.js.map +1 -0
- package/dist/providers/index.cjs.js +2 -0
- package/dist/providers/index.cjs.js.map +1 -0
- package/dist/providers/index.es.js +9 -0
- package/dist/providers/index.es.js.map +1 -0
- package/dist/scroll-area-DQeqDp3Y.js +952 -0
- package/dist/scroll-area-DQeqDp3Y.js.map +1 -0
- package/dist/scroll-area-DYOiJMXh.cjs +2 -0
- package/dist/scroll-area-DYOiJMXh.cjs.map +1 -0
- package/dist/select-C1rNBi6c.js +974 -0
- package/dist/select-C1rNBi6c.js.map +1 -0
- package/dist/select-m-Mqwxu3.cjs +2 -0
- package/dist/select-m-Mqwxu3.cjs.map +1 -0
- package/dist/separator-DBUivkHq.cjs +2 -0
- package/dist/separator-DBUivkHq.cjs.map +1 -0
- package/dist/separator-DsfoJx-2.js +395 -0
- package/dist/separator-DsfoJx-2.js.map +1 -0
- package/dist/sheet-BVWCpq7E.js +84 -0
- package/dist/sheet-BVWCpq7E.js.map +1 -0
- package/dist/sheet-mKiFLVnK.cjs +2 -0
- package/dist/sheet-mKiFLVnK.cjs.map +1 -0
- package/dist/skeleton-BSwwYaQU.cjs +2 -0
- package/dist/skeleton-BSwwYaQU.cjs.map +1 -0
- package/dist/skeleton-BmGbfJw3.js +9 -0
- package/dist/skeleton-BmGbfJw3.js.map +1 -0
- package/dist/sortable.esm-Blhf_jh1.js +3391 -0
- package/dist/sortable.esm-Blhf_jh1.js.map +1 -0
- package/dist/sortable.esm-DcQYlXi3.cjs +6 -0
- package/dist/sortable.esm-DcQYlXi3.cjs.map +1 -0
- package/dist/sparkline-chart-Da-ehDGv.js +21082 -0
- package/dist/sparkline-chart-Da-ehDGv.js.map +1 -0
- package/dist/sparkline-chart-ca3uTzVK.cjs +68 -0
- package/dist/sparkline-chart-ca3uTzVK.cjs.map +1 -0
- package/dist/trending-up-D3Nfrhi3.cjs +2 -0
- package/dist/trending-up-D3Nfrhi3.cjs.map +1 -0
- package/dist/trending-up-DPwlYzQb.js +9 -0
- package/dist/trending-up-DPwlYzQb.js.map +1 -0
- package/dist/ui.css +1 -0
- package/dist/use-formatters-d97RVcmg.cjs +2 -0
- package/dist/use-formatters-d97RVcmg.cjs.map +1 -0
- package/dist/use-formatters-l1_2c8z0.js +6682 -0
- package/dist/use-formatters-l1_2c8z0.js.map +1 -0
- package/dist/use-local-storage-BjlrKzE-.js +42 -0
- package/dist/use-local-storage-BjlrKzE-.js.map +1 -0
- package/dist/use-local-storage-q-1odzIu.cjs +2 -0
- package/dist/use-local-storage-q-1odzIu.cjs.map +1 -0
- package/dist/use-mobile-C-LMK4T8.js +15 -0
- package/dist/use-mobile-C-LMK4T8.js.map +1 -0
- package/dist/use-mobile-DY7TJ5lx.cjs +2 -0
- package/dist/use-mobile-DY7TJ5lx.cjs.map +1 -0
- package/dist/use-toast-DG2qdYhl.js +97 -0
- package/dist/use-toast-DG2qdYhl.js.map +1 -0
- package/dist/use-toast-DxZJ8uUm.cjs +2 -0
- package/dist/use-toast-DxZJ8uUm.cjs.map +1 -0
- package/dist/utils/index.cjs.js +2 -0
- package/dist/utils/index.cjs.js.map +1 -0
- package/dist/utils/index.es.js +5 -0
- package/dist/utils/index.es.js.map +1 -0
- package/dist/welcome-card-CPolYl1D.cjs +2 -0
- package/dist/welcome-card-CPolYl1D.cjs.map +1 -0
- package/dist/welcome-card-CxMJZ8bv.js +963 -0
- package/dist/welcome-card-CxMJZ8bv.js.map +1 -0
- package/package.json +179 -0
|
@@ -0,0 +1,3518 @@
|
|
|
1
|
+
import { jsx as t, jsxs as p, Fragment as ie } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import H from "react";
|
|
4
|
+
import { g as X, P as k, j as P, m as ge, h as F, i as Ct, u as ve, e as Ke, c as St, a as G, B as fe, l as Rt, k as me, q as na, X as sa, C as ia } from "./scroll-area-DQeqDp3Y.js";
|
|
5
|
+
import { u as Z, p as He, q as ze, D as Tt, a as Et, b as At, c as Dt, y as be, z as Pt, B as kt, x as je, E as ca, G as la, H as da, P as ua, I as fa } from "./input-D4AoiWxo.js";
|
|
6
|
+
import { c as y } from "./index-CwJPJKOE.js";
|
|
7
|
+
import { C as Ge } from "./chevron-down-DJ1_YIFu.js";
|
|
8
|
+
import { c as We, T as ae, a as ne, b as se, S as ke } from "./separator-DsfoJx-2.js";
|
|
9
|
+
import { u as Ue } from "./checkbox-CpOq5hkT.js";
|
|
10
|
+
import { u as ma } from "./use-toast-DG2qdYhl.js";
|
|
11
|
+
import * as pa from "react-dom";
|
|
12
|
+
import { a as _t } from "./index-Co9o9StL.js";
|
|
13
|
+
import { c as Mt, R as ha, P as ga, T as va, O as ba, W as wa, a as ya, b as xa, D as Na, C as It } from "./index-l828OqQN.js";
|
|
14
|
+
import { i as Y, b as qe, c as $t, L as Ca, s as Ye, e as Xe, d as Je, f as we, g as Ot, h as Ft, a as Sa, j as Ra } from "./calendar-BFWc4IB7.js";
|
|
15
|
+
import { a as Ta, I as vt, C as Ea, T as Aa, F as bt, M as Da } from "./progress-D5AsrWa6.js";
|
|
16
|
+
import { A as Vt, a as Lt, b as Bt } from "./avatar-CN6wcrqY.js";
|
|
17
|
+
import { C as Kt } from "./chevron-right-B3bovvh0.js";
|
|
18
|
+
import { c as Pa, t as U, n as ka, a as ye, f as j, u as re, s as Ze, p as Ht } from "./use-formatters-l1_2c8z0.js";
|
|
19
|
+
import { C as _a, a as Ma, c as Ia, d as $a, e as Oa } from "./card-K4fxyYwE.js";
|
|
20
|
+
import { L as wt, P as Fa, r as Va, s as La } from "./popover-4V4sGe1U.js";
|
|
21
|
+
import { c as Qe } from "./createLucideIcon-BbeNo6vq.js";
|
|
22
|
+
import { S as R } from "./skeleton-BmGbfJw3.js";
|
|
23
|
+
import { S as Ba, c as Ka, b as Ha, d as za, f as de } from "./select-C1rNBi6c.js";
|
|
24
|
+
var xe = "Collapsible", [ja, zt] = X(xe), [Ga, et] = ja(xe), jt = c.forwardRef(
|
|
25
|
+
(e, o) => {
|
|
26
|
+
const {
|
|
27
|
+
__scopeCollapsible: r,
|
|
28
|
+
open: a,
|
|
29
|
+
defaultOpen: n,
|
|
30
|
+
disabled: i,
|
|
31
|
+
onOpenChange: s,
|
|
32
|
+
...d
|
|
33
|
+
} = e, [u, m] = Z({
|
|
34
|
+
prop: a,
|
|
35
|
+
defaultProp: n ?? !1,
|
|
36
|
+
onChange: s,
|
|
37
|
+
caller: xe
|
|
38
|
+
});
|
|
39
|
+
return /* @__PURE__ */ t(
|
|
40
|
+
Ga,
|
|
41
|
+
{
|
|
42
|
+
scope: r,
|
|
43
|
+
disabled: i,
|
|
44
|
+
contentId: He(),
|
|
45
|
+
open: u,
|
|
46
|
+
onOpenToggle: c.useCallback(() => m((f) => !f), [m]),
|
|
47
|
+
children: /* @__PURE__ */ t(
|
|
48
|
+
k.div,
|
|
49
|
+
{
|
|
50
|
+
"data-state": at(u),
|
|
51
|
+
"data-disabled": i ? "" : void 0,
|
|
52
|
+
...d,
|
|
53
|
+
ref: o
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
jt.displayName = xe;
|
|
61
|
+
var Gt = "CollapsibleTrigger", tt = c.forwardRef(
|
|
62
|
+
(e, o) => {
|
|
63
|
+
const { __scopeCollapsible: r, ...a } = e, n = et(Gt, r);
|
|
64
|
+
return /* @__PURE__ */ t(
|
|
65
|
+
k.button,
|
|
66
|
+
{
|
|
67
|
+
type: "button",
|
|
68
|
+
"aria-controls": n.contentId,
|
|
69
|
+
"aria-expanded": n.open || !1,
|
|
70
|
+
"data-state": at(n.open),
|
|
71
|
+
"data-disabled": n.disabled ? "" : void 0,
|
|
72
|
+
disabled: n.disabled,
|
|
73
|
+
...a,
|
|
74
|
+
ref: o,
|
|
75
|
+
onClick: P(e.onClick, n.onOpenToggle)
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
tt.displayName = Gt;
|
|
81
|
+
var rt = "CollapsibleContent", ot = c.forwardRef(
|
|
82
|
+
(e, o) => {
|
|
83
|
+
const { forceMount: r, ...a } = e, n = et(rt, e.__scopeCollapsible);
|
|
84
|
+
return /* @__PURE__ */ t(ge, { present: r || n.open, children: ({ present: i }) => /* @__PURE__ */ t(Wa, { ...a, ref: o, present: i }) });
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
ot.displayName = rt;
|
|
88
|
+
var Wa = c.forwardRef((e, o) => {
|
|
89
|
+
const { __scopeCollapsible: r, present: a, children: n, ...i } = e, s = et(rt, r), [d, u] = c.useState(a), m = c.useRef(null), f = F(o, m), l = c.useRef(0), g = l.current, h = c.useRef(0), b = h.current, v = s.open || d, w = c.useRef(v), N = c.useRef(void 0);
|
|
90
|
+
return c.useEffect(() => {
|
|
91
|
+
const x = requestAnimationFrame(() => w.current = !1);
|
|
92
|
+
return () => cancelAnimationFrame(x);
|
|
93
|
+
}, []), Ct(() => {
|
|
94
|
+
const x = m.current;
|
|
95
|
+
if (x) {
|
|
96
|
+
N.current = N.current || {
|
|
97
|
+
transitionDuration: x.style.transitionDuration,
|
|
98
|
+
animationName: x.style.animationName
|
|
99
|
+
}, x.style.transitionDuration = "0s", x.style.animationName = "none";
|
|
100
|
+
const C = x.getBoundingClientRect();
|
|
101
|
+
l.current = C.height, h.current = C.width, w.current || (x.style.transitionDuration = N.current.transitionDuration, x.style.animationName = N.current.animationName), u(a);
|
|
102
|
+
}
|
|
103
|
+
}, [s.open, a]), /* @__PURE__ */ t(
|
|
104
|
+
k.div,
|
|
105
|
+
{
|
|
106
|
+
"data-state": at(s.open),
|
|
107
|
+
"data-disabled": s.disabled ? "" : void 0,
|
|
108
|
+
id: s.contentId,
|
|
109
|
+
hidden: !v,
|
|
110
|
+
...i,
|
|
111
|
+
ref: f,
|
|
112
|
+
style: {
|
|
113
|
+
"--radix-collapsible-content-height": g ? `${g}px` : void 0,
|
|
114
|
+
"--radix-collapsible-content-width": b ? `${b}px` : void 0,
|
|
115
|
+
...e.style
|
|
116
|
+
},
|
|
117
|
+
children: v && n
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
});
|
|
121
|
+
function at(e) {
|
|
122
|
+
return e ? "open" : "closed";
|
|
123
|
+
}
|
|
124
|
+
var Wt = jt, Ua = tt, qa = ot, W = "Accordion", Ya = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [nt, Xa, Ja] = ze(W), [Ne] = X(W, [
|
|
125
|
+
Ja,
|
|
126
|
+
zt
|
|
127
|
+
]), st = zt(), Ut = H.forwardRef(
|
|
128
|
+
(e, o) => {
|
|
129
|
+
const { type: r, ...a } = e, n = a, i = a;
|
|
130
|
+
return /* @__PURE__ */ t(nt.Provider, { scope: e.__scopeAccordion, children: r === "multiple" ? /* @__PURE__ */ t(tn, { ...i, ref: o }) : /* @__PURE__ */ t(en, { ...n, ref: o }) });
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
Ut.displayName = W;
|
|
134
|
+
var [qt, Za] = Ne(W), [Yt, Qa] = Ne(
|
|
135
|
+
W,
|
|
136
|
+
{ collapsible: !1 }
|
|
137
|
+
), en = H.forwardRef(
|
|
138
|
+
(e, o) => {
|
|
139
|
+
const {
|
|
140
|
+
value: r,
|
|
141
|
+
defaultValue: a,
|
|
142
|
+
onValueChange: n = () => {
|
|
143
|
+
},
|
|
144
|
+
collapsible: i = !1,
|
|
145
|
+
...s
|
|
146
|
+
} = e, [d, u] = Z({
|
|
147
|
+
prop: r,
|
|
148
|
+
defaultProp: a ?? "",
|
|
149
|
+
onChange: n,
|
|
150
|
+
caller: W
|
|
151
|
+
});
|
|
152
|
+
return /* @__PURE__ */ t(
|
|
153
|
+
qt,
|
|
154
|
+
{
|
|
155
|
+
scope: e.__scopeAccordion,
|
|
156
|
+
value: H.useMemo(() => d ? [d] : [], [d]),
|
|
157
|
+
onItemOpen: u,
|
|
158
|
+
onItemClose: H.useCallback(() => i && u(""), [i, u]),
|
|
159
|
+
children: /* @__PURE__ */ t(Yt, { scope: e.__scopeAccordion, collapsible: i, children: /* @__PURE__ */ t(Xt, { ...s, ref: o }) })
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
), tn = H.forwardRef((e, o) => {
|
|
164
|
+
const {
|
|
165
|
+
value: r,
|
|
166
|
+
defaultValue: a,
|
|
167
|
+
onValueChange: n = () => {
|
|
168
|
+
},
|
|
169
|
+
...i
|
|
170
|
+
} = e, [s, d] = Z({
|
|
171
|
+
prop: r,
|
|
172
|
+
defaultProp: a ?? [],
|
|
173
|
+
onChange: n,
|
|
174
|
+
caller: W
|
|
175
|
+
}), u = H.useCallback(
|
|
176
|
+
(f) => d((l = []) => [...l, f]),
|
|
177
|
+
[d]
|
|
178
|
+
), m = H.useCallback(
|
|
179
|
+
(f) => d((l = []) => l.filter((g) => g !== f)),
|
|
180
|
+
[d]
|
|
181
|
+
);
|
|
182
|
+
return /* @__PURE__ */ t(
|
|
183
|
+
qt,
|
|
184
|
+
{
|
|
185
|
+
scope: e.__scopeAccordion,
|
|
186
|
+
value: s,
|
|
187
|
+
onItemOpen: u,
|
|
188
|
+
onItemClose: m,
|
|
189
|
+
children: /* @__PURE__ */ t(Yt, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ t(Xt, { ...i, ref: o }) })
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
}), [rn, Ce] = Ne(W), Xt = H.forwardRef(
|
|
193
|
+
(e, o) => {
|
|
194
|
+
const { __scopeAccordion: r, disabled: a, dir: n, orientation: i = "vertical", ...s } = e, d = H.useRef(null), u = F(d, o), m = Xa(r), l = ve(n) === "ltr", g = P(e.onKeyDown, (h) => {
|
|
195
|
+
if (!Ya.includes(h.key)) return;
|
|
196
|
+
const b = h.target, v = m().filter(($) => !$.ref.current?.disabled), w = v.findIndex(($) => $.ref.current === b), N = v.length;
|
|
197
|
+
if (w === -1) return;
|
|
198
|
+
h.preventDefault();
|
|
199
|
+
let x = w;
|
|
200
|
+
const C = 0, S = N - 1, T = () => {
|
|
201
|
+
x = w + 1, x > S && (x = C);
|
|
202
|
+
}, _ = () => {
|
|
203
|
+
x = w - 1, x < C && (x = S);
|
|
204
|
+
};
|
|
205
|
+
switch (h.key) {
|
|
206
|
+
case "Home":
|
|
207
|
+
x = C;
|
|
208
|
+
break;
|
|
209
|
+
case "End":
|
|
210
|
+
x = S;
|
|
211
|
+
break;
|
|
212
|
+
case "ArrowRight":
|
|
213
|
+
i === "horizontal" && (l ? T() : _());
|
|
214
|
+
break;
|
|
215
|
+
case "ArrowDown":
|
|
216
|
+
i === "vertical" && T();
|
|
217
|
+
break;
|
|
218
|
+
case "ArrowLeft":
|
|
219
|
+
i === "horizontal" && (l ? _() : T());
|
|
220
|
+
break;
|
|
221
|
+
case "ArrowUp":
|
|
222
|
+
i === "vertical" && _();
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
const A = x % N;
|
|
226
|
+
v[A].ref.current?.focus();
|
|
227
|
+
});
|
|
228
|
+
return /* @__PURE__ */ t(
|
|
229
|
+
rn,
|
|
230
|
+
{
|
|
231
|
+
scope: r,
|
|
232
|
+
disabled: a,
|
|
233
|
+
direction: n,
|
|
234
|
+
orientation: i,
|
|
235
|
+
children: /* @__PURE__ */ t(nt.Slot, { scope: r, children: /* @__PURE__ */ t(
|
|
236
|
+
k.div,
|
|
237
|
+
{
|
|
238
|
+
...s,
|
|
239
|
+
"data-orientation": i,
|
|
240
|
+
ref: u,
|
|
241
|
+
onKeyDown: a ? void 0 : g
|
|
242
|
+
}
|
|
243
|
+
) })
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
), pe = "AccordionItem", [on, it] = Ne(pe), Jt = H.forwardRef(
|
|
248
|
+
(e, o) => {
|
|
249
|
+
const { __scopeAccordion: r, value: a, ...n } = e, i = Ce(pe, r), s = Za(pe, r), d = st(r), u = He(), m = a && s.value.includes(a) || !1, f = i.disabled || e.disabled;
|
|
250
|
+
return /* @__PURE__ */ t(
|
|
251
|
+
on,
|
|
252
|
+
{
|
|
253
|
+
scope: r,
|
|
254
|
+
open: m,
|
|
255
|
+
disabled: f,
|
|
256
|
+
triggerId: u,
|
|
257
|
+
children: /* @__PURE__ */ t(
|
|
258
|
+
Wt,
|
|
259
|
+
{
|
|
260
|
+
"data-orientation": i.orientation,
|
|
261
|
+
"data-state": or(m),
|
|
262
|
+
...d,
|
|
263
|
+
...n,
|
|
264
|
+
ref: o,
|
|
265
|
+
disabled: f,
|
|
266
|
+
open: m,
|
|
267
|
+
onOpenChange: (l) => {
|
|
268
|
+
l ? s.onItemOpen(a) : s.onItemClose(a);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
)
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
);
|
|
276
|
+
Jt.displayName = pe;
|
|
277
|
+
var Zt = "AccordionHeader", Qt = H.forwardRef(
|
|
278
|
+
(e, o) => {
|
|
279
|
+
const { __scopeAccordion: r, ...a } = e, n = Ce(W, r), i = it(Zt, r);
|
|
280
|
+
return /* @__PURE__ */ t(
|
|
281
|
+
k.h3,
|
|
282
|
+
{
|
|
283
|
+
"data-orientation": n.orientation,
|
|
284
|
+
"data-state": or(i.open),
|
|
285
|
+
"data-disabled": i.disabled ? "" : void 0,
|
|
286
|
+
...a,
|
|
287
|
+
ref: o
|
|
288
|
+
}
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
Qt.displayName = Zt;
|
|
293
|
+
var Ie = "AccordionTrigger", er = H.forwardRef(
|
|
294
|
+
(e, o) => {
|
|
295
|
+
const { __scopeAccordion: r, ...a } = e, n = Ce(W, r), i = it(Ie, r), s = Qa(Ie, r), d = st(r);
|
|
296
|
+
return /* @__PURE__ */ t(nt.ItemSlot, { scope: r, children: /* @__PURE__ */ t(
|
|
297
|
+
Ua,
|
|
298
|
+
{
|
|
299
|
+
"aria-disabled": i.open && !s.collapsible || void 0,
|
|
300
|
+
"data-orientation": n.orientation,
|
|
301
|
+
id: i.triggerId,
|
|
302
|
+
...d,
|
|
303
|
+
...a,
|
|
304
|
+
ref: o
|
|
305
|
+
}
|
|
306
|
+
) });
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
er.displayName = Ie;
|
|
310
|
+
var tr = "AccordionContent", rr = H.forwardRef(
|
|
311
|
+
(e, o) => {
|
|
312
|
+
const { __scopeAccordion: r, ...a } = e, n = Ce(W, r), i = it(tr, r), s = st(r);
|
|
313
|
+
return /* @__PURE__ */ t(
|
|
314
|
+
qa,
|
|
315
|
+
{
|
|
316
|
+
role: "region",
|
|
317
|
+
"aria-labelledby": i.triggerId,
|
|
318
|
+
"data-orientation": n.orientation,
|
|
319
|
+
...s,
|
|
320
|
+
...a,
|
|
321
|
+
ref: o,
|
|
322
|
+
style: {
|
|
323
|
+
"--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
|
|
324
|
+
"--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
|
|
325
|
+
...e.style
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
rr.displayName = tr;
|
|
332
|
+
function or(e) {
|
|
333
|
+
return e ? "open" : "closed";
|
|
334
|
+
}
|
|
335
|
+
var an = Ut, nn = Jt, sn = Qt, ar = er, nr = rr;
|
|
336
|
+
const yt = Qe("Download", [
|
|
337
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
338
|
+
["polyline", { points: "7 10 12 15 17 10", key: "2ggqvy" }],
|
|
339
|
+
["line", { x1: "12", x2: "12", y1: "15", y2: "3", key: "1vk2je" }]
|
|
340
|
+
]);
|
|
341
|
+
const cn = Qe("FileJson", [
|
|
342
|
+
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
343
|
+
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
344
|
+
[
|
|
345
|
+
"path",
|
|
346
|
+
{ d: "M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1", key: "1oajmo" }
|
|
347
|
+
],
|
|
348
|
+
[
|
|
349
|
+
"path",
|
|
350
|
+
{ d: "M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1", key: "mpwhp6" }
|
|
351
|
+
]
|
|
352
|
+
]);
|
|
353
|
+
const ln = Qe("FileSpreadsheet", [
|
|
354
|
+
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
355
|
+
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
356
|
+
["path", { d: "M8 13h2", key: "yr2amv" }],
|
|
357
|
+
["path", { d: "M14 13h2", key: "un5t4a" }],
|
|
358
|
+
["path", { d: "M8 17h2", key: "2yhykz" }],
|
|
359
|
+
["path", { d: "M14 17h2", key: "10kma7" }]
|
|
360
|
+
]), Qi = an, dn = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(nn, { ref: r, className: y("border-b", e), ...o }));
|
|
361
|
+
dn.displayName = "AccordionItem";
|
|
362
|
+
const un = c.forwardRef(({ className: e, children: o, ...r }, a) => /* @__PURE__ */ t(sn, { className: "flex", children: /* @__PURE__ */ p(
|
|
363
|
+
ar,
|
|
364
|
+
{
|
|
365
|
+
ref: a,
|
|
366
|
+
className: y(
|
|
367
|
+
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
368
|
+
e
|
|
369
|
+
),
|
|
370
|
+
...r,
|
|
371
|
+
children: [
|
|
372
|
+
o,
|
|
373
|
+
/* @__PURE__ */ t(Ge, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
) }));
|
|
377
|
+
un.displayName = ar.displayName;
|
|
378
|
+
const fn = c.forwardRef(({ className: e, children: o, ...r }, a) => /* @__PURE__ */ t(
|
|
379
|
+
nr,
|
|
380
|
+
{
|
|
381
|
+
ref: a,
|
|
382
|
+
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
383
|
+
...r,
|
|
384
|
+
children: /* @__PURE__ */ t("div", { className: y("pb-4 pt-0", e), children: o })
|
|
385
|
+
}
|
|
386
|
+
));
|
|
387
|
+
fn.displayName = nr.displayName;
|
|
388
|
+
const mn = Ke(
|
|
389
|
+
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
390
|
+
{
|
|
391
|
+
variants: {
|
|
392
|
+
variant: {
|
|
393
|
+
default: "bg-background text-foreground",
|
|
394
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
395
|
+
success: "border-success/50 text-success dark:border-success [&>svg]:text-success bg-success/10",
|
|
396
|
+
warning: "border-warning/50 text-warning dark:border-warning [&>svg]:text-warning bg-warning/10",
|
|
397
|
+
info: "border-info/50 text-info dark:border-info [&>svg]:text-info bg-info/10"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
defaultVariants: {
|
|
401
|
+
variant: "default"
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
), pn = c.forwardRef(({ className: e, variant: o, ...r }, a) => /* @__PURE__ */ t("div", { ref: a, role: "alert", className: y(mn({ variant: o }), e), ...r }));
|
|
405
|
+
pn.displayName = "Alert";
|
|
406
|
+
const hn = c.forwardRef(
|
|
407
|
+
({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
408
|
+
"h5",
|
|
409
|
+
{
|
|
410
|
+
ref: r,
|
|
411
|
+
className: y("mb-1 font-medium leading-none tracking-tight", e),
|
|
412
|
+
...o
|
|
413
|
+
}
|
|
414
|
+
)
|
|
415
|
+
);
|
|
416
|
+
hn.displayName = "AlertTitle";
|
|
417
|
+
const gn = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t("div", { ref: r, className: y("text-sm [&_p]:leading-relaxed", e), ...o }));
|
|
418
|
+
gn.displayName = "AlertDescription";
|
|
419
|
+
var vn = /* @__PURE__ */ Symbol("radix.slottable");
|
|
420
|
+
// @__NO_SIDE_EFFECTS__
|
|
421
|
+
function bn(e) {
|
|
422
|
+
const o = ({ children: r }) => /* @__PURE__ */ t(ie, { children: r });
|
|
423
|
+
return o.displayName = `${e}.Slottable`, o.__radixId = vn, o;
|
|
424
|
+
}
|
|
425
|
+
var sr = "AlertDialog", [wn] = X(sr, [
|
|
426
|
+
Mt
|
|
427
|
+
]), J = Mt(), ir = (e) => {
|
|
428
|
+
const { __scopeAlertDialog: o, ...r } = e, a = J(o);
|
|
429
|
+
return /* @__PURE__ */ t(ha, { ...a, ...r, modal: !0 });
|
|
430
|
+
};
|
|
431
|
+
ir.displayName = sr;
|
|
432
|
+
var yn = "AlertDialogTrigger", cr = c.forwardRef(
|
|
433
|
+
(e, o) => {
|
|
434
|
+
const { __scopeAlertDialog: r, ...a } = e, n = J(r);
|
|
435
|
+
return /* @__PURE__ */ t(va, { ...n, ...a, ref: o });
|
|
436
|
+
}
|
|
437
|
+
);
|
|
438
|
+
cr.displayName = yn;
|
|
439
|
+
var xn = "AlertDialogPortal", lr = (e) => {
|
|
440
|
+
const { __scopeAlertDialog: o, ...r } = e, a = J(o);
|
|
441
|
+
return /* @__PURE__ */ t(ga, { ...a, ...r });
|
|
442
|
+
};
|
|
443
|
+
lr.displayName = xn;
|
|
444
|
+
var Nn = "AlertDialogOverlay", dr = c.forwardRef(
|
|
445
|
+
(e, o) => {
|
|
446
|
+
const { __scopeAlertDialog: r, ...a } = e, n = J(r);
|
|
447
|
+
return /* @__PURE__ */ t(ba, { ...n, ...a, ref: o });
|
|
448
|
+
}
|
|
449
|
+
);
|
|
450
|
+
dr.displayName = Nn;
|
|
451
|
+
var ee = "AlertDialogContent", [Cn, Sn] = wn(ee), Rn = /* @__PURE__ */ bn("AlertDialogContent"), ur = c.forwardRef(
|
|
452
|
+
(e, o) => {
|
|
453
|
+
const { __scopeAlertDialog: r, children: a, ...n } = e, i = J(r), s = c.useRef(null), d = F(o, s), u = c.useRef(null);
|
|
454
|
+
return /* @__PURE__ */ t(
|
|
455
|
+
wa,
|
|
456
|
+
{
|
|
457
|
+
contentName: ee,
|
|
458
|
+
titleName: fr,
|
|
459
|
+
docsSlug: "alert-dialog",
|
|
460
|
+
children: /* @__PURE__ */ t(Cn, { scope: r, cancelRef: u, children: /* @__PURE__ */ p(
|
|
461
|
+
ya,
|
|
462
|
+
{
|
|
463
|
+
role: "alertdialog",
|
|
464
|
+
...i,
|
|
465
|
+
...n,
|
|
466
|
+
ref: d,
|
|
467
|
+
onOpenAutoFocus: P(n.onOpenAutoFocus, (m) => {
|
|
468
|
+
m.preventDefault(), u.current?.focus({ preventScroll: !0 });
|
|
469
|
+
}),
|
|
470
|
+
onPointerDownOutside: (m) => m.preventDefault(),
|
|
471
|
+
onInteractOutside: (m) => m.preventDefault(),
|
|
472
|
+
children: [
|
|
473
|
+
/* @__PURE__ */ t(Rn, { children: a }),
|
|
474
|
+
/* @__PURE__ */ t(En, { contentRef: s })
|
|
475
|
+
]
|
|
476
|
+
}
|
|
477
|
+
) })
|
|
478
|
+
}
|
|
479
|
+
);
|
|
480
|
+
}
|
|
481
|
+
);
|
|
482
|
+
ur.displayName = ee;
|
|
483
|
+
var fr = "AlertDialogTitle", mr = c.forwardRef(
|
|
484
|
+
(e, o) => {
|
|
485
|
+
const { __scopeAlertDialog: r, ...a } = e, n = J(r);
|
|
486
|
+
return /* @__PURE__ */ t(xa, { ...n, ...a, ref: o });
|
|
487
|
+
}
|
|
488
|
+
);
|
|
489
|
+
mr.displayName = fr;
|
|
490
|
+
var pr = "AlertDialogDescription", hr = c.forwardRef((e, o) => {
|
|
491
|
+
const { __scopeAlertDialog: r, ...a } = e, n = J(r);
|
|
492
|
+
return /* @__PURE__ */ t(Na, { ...n, ...a, ref: o });
|
|
493
|
+
});
|
|
494
|
+
hr.displayName = pr;
|
|
495
|
+
var Tn = "AlertDialogAction", gr = c.forwardRef(
|
|
496
|
+
(e, o) => {
|
|
497
|
+
const { __scopeAlertDialog: r, ...a } = e, n = J(r);
|
|
498
|
+
return /* @__PURE__ */ t(It, { ...n, ...a, ref: o });
|
|
499
|
+
}
|
|
500
|
+
);
|
|
501
|
+
gr.displayName = Tn;
|
|
502
|
+
var vr = "AlertDialogCancel", br = c.forwardRef(
|
|
503
|
+
(e, o) => {
|
|
504
|
+
const { __scopeAlertDialog: r, ...a } = e, { cancelRef: n } = Sn(vr, r), i = J(r), s = F(o, n);
|
|
505
|
+
return /* @__PURE__ */ t(It, { ...i, ...a, ref: s });
|
|
506
|
+
}
|
|
507
|
+
);
|
|
508
|
+
br.displayName = vr;
|
|
509
|
+
var En = ({ contentRef: e }) => {
|
|
510
|
+
const o = `\`${ee}\` requires a description for the component to be accessible for screen reader users.
|
|
511
|
+
|
|
512
|
+
You can add a description to the \`${ee}\` by passing a \`${pr}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
513
|
+
|
|
514
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ee}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
515
|
+
|
|
516
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
|
517
|
+
return c.useEffect(() => {
|
|
518
|
+
document.getElementById(
|
|
519
|
+
e.current?.getAttribute("aria-describedby")
|
|
520
|
+
) || console.warn(o);
|
|
521
|
+
}, [o, e]), null;
|
|
522
|
+
}, An = ir, Dn = cr, Pn = lr, wr = dr, yr = ur, xr = gr, Nr = br, Cr = mr, Sr = hr;
|
|
523
|
+
const kn = An, ec = Dn, _n = Pn, Rr = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
524
|
+
wr,
|
|
525
|
+
{
|
|
526
|
+
className: y(
|
|
527
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
528
|
+
e
|
|
529
|
+
),
|
|
530
|
+
...o,
|
|
531
|
+
ref: r
|
|
532
|
+
}
|
|
533
|
+
));
|
|
534
|
+
Rr.displayName = wr.displayName;
|
|
535
|
+
const Tr = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ p(_n, { children: [
|
|
536
|
+
/* @__PURE__ */ t(Rr, {}),
|
|
537
|
+
/* @__PURE__ */ t(
|
|
538
|
+
yr,
|
|
539
|
+
{
|
|
540
|
+
ref: r,
|
|
541
|
+
className: y(
|
|
542
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
543
|
+
e
|
|
544
|
+
),
|
|
545
|
+
...o
|
|
546
|
+
}
|
|
547
|
+
)
|
|
548
|
+
] }));
|
|
549
|
+
Tr.displayName = yr.displayName;
|
|
550
|
+
const Er = ({ className: e, ...o }) => /* @__PURE__ */ t("div", { className: y("flex flex-col space-y-2 text-center sm:text-left", e), ...o });
|
|
551
|
+
Er.displayName = "AlertDialogHeader";
|
|
552
|
+
const Ar = ({ className: e, ...o }) => /* @__PURE__ */ t(
|
|
553
|
+
"div",
|
|
554
|
+
{
|
|
555
|
+
className: y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
|
|
556
|
+
...o
|
|
557
|
+
}
|
|
558
|
+
);
|
|
559
|
+
Ar.displayName = "AlertDialogFooter";
|
|
560
|
+
const Dr = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
561
|
+
Cr,
|
|
562
|
+
{
|
|
563
|
+
ref: r,
|
|
564
|
+
className: y("text-lg font-semibold", e),
|
|
565
|
+
...o
|
|
566
|
+
}
|
|
567
|
+
));
|
|
568
|
+
Dr.displayName = Cr.displayName;
|
|
569
|
+
const Pr = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
570
|
+
Sr,
|
|
571
|
+
{
|
|
572
|
+
ref: r,
|
|
573
|
+
className: y("text-sm text-muted-foreground", e),
|
|
574
|
+
...o
|
|
575
|
+
}
|
|
576
|
+
));
|
|
577
|
+
Pr.displayName = Sr.displayName;
|
|
578
|
+
const kr = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(xr, { ref: r, className: y(St(), e), ...o }));
|
|
579
|
+
kr.displayName = xr.displayName;
|
|
580
|
+
const _r = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
581
|
+
Nr,
|
|
582
|
+
{
|
|
583
|
+
ref: r,
|
|
584
|
+
className: y(St({ variant: "outline" }), "mt-2 sm:mt-0", e),
|
|
585
|
+
...o
|
|
586
|
+
}
|
|
587
|
+
));
|
|
588
|
+
_r.displayName = Nr.displayName;
|
|
589
|
+
const Mn = c.forwardRef(
|
|
590
|
+
({
|
|
591
|
+
className: e,
|
|
592
|
+
variant: o = "default",
|
|
593
|
+
size: r = "default",
|
|
594
|
+
children: a,
|
|
595
|
+
options: n,
|
|
596
|
+
onClick: i,
|
|
597
|
+
dropdownAlign: s = "end",
|
|
598
|
+
disabled: d,
|
|
599
|
+
...u
|
|
600
|
+
}, m) => /* @__PURE__ */ p("div", { className: "flex", children: [
|
|
601
|
+
/* @__PURE__ */ t(
|
|
602
|
+
G,
|
|
603
|
+
{
|
|
604
|
+
ref: m,
|
|
605
|
+
variant: o,
|
|
606
|
+
size: r,
|
|
607
|
+
className: y("rounded-r-none border-r-0", e),
|
|
608
|
+
onClick: i,
|
|
609
|
+
disabled: d,
|
|
610
|
+
...u,
|
|
611
|
+
children: a
|
|
612
|
+
}
|
|
613
|
+
),
|
|
614
|
+
/* @__PURE__ */ p(Tt, { children: [
|
|
615
|
+
/* @__PURE__ */ t(Et, { asChild: !0, children: /* @__PURE__ */ p(
|
|
616
|
+
G,
|
|
617
|
+
{
|
|
618
|
+
variant: o,
|
|
619
|
+
size: r,
|
|
620
|
+
className: "rounded-l-none px-2",
|
|
621
|
+
disabled: d,
|
|
622
|
+
children: [
|
|
623
|
+
/* @__PURE__ */ t(Ge, { className: "h-4 w-4" }),
|
|
624
|
+
/* @__PURE__ */ t("span", { className: "sr-only", children: "More options" })
|
|
625
|
+
]
|
|
626
|
+
}
|
|
627
|
+
) }),
|
|
628
|
+
/* @__PURE__ */ t(At, { align: s, children: n.map((f, l) => /* @__PURE__ */ p(
|
|
629
|
+
Dt,
|
|
630
|
+
{
|
|
631
|
+
onClick: f.onClick,
|
|
632
|
+
disabled: f.disabled,
|
|
633
|
+
className: "flex items-center gap-2",
|
|
634
|
+
children: [
|
|
635
|
+
f.icon && /* @__PURE__ */ t("span", { className: "h-4 w-4", children: f.icon }),
|
|
636
|
+
f.label
|
|
637
|
+
]
|
|
638
|
+
},
|
|
639
|
+
l
|
|
640
|
+
)) })
|
|
641
|
+
] })
|
|
642
|
+
] })
|
|
643
|
+
);
|
|
644
|
+
Mn.displayName = "SplitButton";
|
|
645
|
+
const In = Ke(
|
|
646
|
+
"inline-flex items-center justify-center rounded-lg transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
647
|
+
{
|
|
648
|
+
variants: {
|
|
649
|
+
variant: {
|
|
650
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
651
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
652
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
653
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
654
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
655
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
656
|
+
},
|
|
657
|
+
size: {
|
|
658
|
+
default: "h-10 w-10",
|
|
659
|
+
sm: "h-8 w-8",
|
|
660
|
+
lg: "h-12 w-12",
|
|
661
|
+
xl: "h-14 w-14"
|
|
662
|
+
}
|
|
663
|
+
},
|
|
664
|
+
defaultVariants: {
|
|
665
|
+
variant: "default",
|
|
666
|
+
size: "default"
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
), $n = c.forwardRef(
|
|
670
|
+
({
|
|
671
|
+
className: e,
|
|
672
|
+
variant: o,
|
|
673
|
+
size: r,
|
|
674
|
+
icon: a,
|
|
675
|
+
tooltip: n,
|
|
676
|
+
tooltipSide: i = "top",
|
|
677
|
+
loading: s = !1,
|
|
678
|
+
disabled: d,
|
|
679
|
+
...u
|
|
680
|
+
}, m) => {
|
|
681
|
+
const f = /* @__PURE__ */ t(
|
|
682
|
+
"button",
|
|
683
|
+
{
|
|
684
|
+
ref: m,
|
|
685
|
+
className: y(In({ variant: o, size: r }), e),
|
|
686
|
+
disabled: d || s,
|
|
687
|
+
...u,
|
|
688
|
+
children: s ? /* @__PURE__ */ p(
|
|
689
|
+
"svg",
|
|
690
|
+
{
|
|
691
|
+
className: "h-4 w-4 animate-spin",
|
|
692
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
693
|
+
fill: "none",
|
|
694
|
+
viewBox: "0 0 24 24",
|
|
695
|
+
children: [
|
|
696
|
+
/* @__PURE__ */ t(
|
|
697
|
+
"circle",
|
|
698
|
+
{
|
|
699
|
+
className: "opacity-25",
|
|
700
|
+
cx: "12",
|
|
701
|
+
cy: "12",
|
|
702
|
+
r: "10",
|
|
703
|
+
stroke: "currentColor",
|
|
704
|
+
strokeWidth: "4"
|
|
705
|
+
}
|
|
706
|
+
),
|
|
707
|
+
/* @__PURE__ */ t(
|
|
708
|
+
"path",
|
|
709
|
+
{
|
|
710
|
+
className: "opacity-75",
|
|
711
|
+
fill: "currentColor",
|
|
712
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
713
|
+
}
|
|
714
|
+
)
|
|
715
|
+
]
|
|
716
|
+
}
|
|
717
|
+
) : a
|
|
718
|
+
}
|
|
719
|
+
);
|
|
720
|
+
return n ? /* @__PURE__ */ t(We, { children: /* @__PURE__ */ p(ae, { children: [
|
|
721
|
+
/* @__PURE__ */ t(ne, { asChild: !0, children: f }),
|
|
722
|
+
/* @__PURE__ */ t(se, { side: i, children: /* @__PURE__ */ t("p", { children: n }) })
|
|
723
|
+
] }) }) : f;
|
|
724
|
+
}
|
|
725
|
+
);
|
|
726
|
+
$n.displayName = "IconButton";
|
|
727
|
+
const On = c.forwardRef(
|
|
728
|
+
({
|
|
729
|
+
className: e,
|
|
730
|
+
children: o,
|
|
731
|
+
badge: r,
|
|
732
|
+
badgeVariant: a = "destructive",
|
|
733
|
+
badgePosition: n = "top-right",
|
|
734
|
+
showBadge: i = !0,
|
|
735
|
+
...s
|
|
736
|
+
}, d) => {
|
|
737
|
+
const u = i && r !== void 0 && r !== null && r !== "";
|
|
738
|
+
if (n === "inline")
|
|
739
|
+
return /* @__PURE__ */ p(G, { ref: d, className: y("gap-2", e), ...s, children: [
|
|
740
|
+
o,
|
|
741
|
+
u && /* @__PURE__ */ t(fe, { variant: a, className: "ml-1 h-5 min-w-5 rounded-full px-1.5", children: r })
|
|
742
|
+
] });
|
|
743
|
+
const m = {
|
|
744
|
+
"top-right": "-right-1 -top-1",
|
|
745
|
+
"top-left": "-left-1 -top-1",
|
|
746
|
+
"bottom-right": "-bottom-1 -right-1",
|
|
747
|
+
"bottom-left": "-bottom-1 -left-1"
|
|
748
|
+
};
|
|
749
|
+
return /* @__PURE__ */ p("div", { className: "relative inline-flex", children: [
|
|
750
|
+
/* @__PURE__ */ t(G, { ref: d, className: e, ...s, children: o }),
|
|
751
|
+
u && /* @__PURE__ */ t(
|
|
752
|
+
fe,
|
|
753
|
+
{
|
|
754
|
+
variant: a,
|
|
755
|
+
className: y(
|
|
756
|
+
"absolute flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs",
|
|
757
|
+
m[n]
|
|
758
|
+
),
|
|
759
|
+
children: typeof r == "number" && r > 99 ? "99+" : r
|
|
760
|
+
}
|
|
761
|
+
)
|
|
762
|
+
] });
|
|
763
|
+
}
|
|
764
|
+
);
|
|
765
|
+
On.displayName = "ButtonWithBadge";
|
|
766
|
+
const tc = Wt, rc = tt, oc = ot;
|
|
767
|
+
var ct = "Radio", [Fn, Mr] = X(ct), [Vn, Ln] = Fn(ct), Ir = c.forwardRef(
|
|
768
|
+
(e, o) => {
|
|
769
|
+
const {
|
|
770
|
+
__scopeRadio: r,
|
|
771
|
+
name: a,
|
|
772
|
+
checked: n = !1,
|
|
773
|
+
required: i,
|
|
774
|
+
disabled: s,
|
|
775
|
+
value: d = "on",
|
|
776
|
+
onCheck: u,
|
|
777
|
+
form: m,
|
|
778
|
+
...f
|
|
779
|
+
} = e, [l, g] = c.useState(null), h = F(o, (w) => g(w)), b = c.useRef(!1), v = l ? m || !!l.closest("form") : !0;
|
|
780
|
+
return /* @__PURE__ */ p(Vn, { scope: r, checked: n, disabled: s, children: [
|
|
781
|
+
/* @__PURE__ */ t(
|
|
782
|
+
k.button,
|
|
783
|
+
{
|
|
784
|
+
type: "button",
|
|
785
|
+
role: "radio",
|
|
786
|
+
"aria-checked": n,
|
|
787
|
+
"data-state": Vr(n),
|
|
788
|
+
"data-disabled": s ? "" : void 0,
|
|
789
|
+
disabled: s,
|
|
790
|
+
value: d,
|
|
791
|
+
...f,
|
|
792
|
+
ref: h,
|
|
793
|
+
onClick: P(e.onClick, (w) => {
|
|
794
|
+
n || u?.(), v && (b.current = w.isPropagationStopped(), b.current || w.stopPropagation());
|
|
795
|
+
})
|
|
796
|
+
}
|
|
797
|
+
),
|
|
798
|
+
v && /* @__PURE__ */ t(
|
|
799
|
+
Fr,
|
|
800
|
+
{
|
|
801
|
+
control: l,
|
|
802
|
+
bubbles: !b.current,
|
|
803
|
+
name: a,
|
|
804
|
+
value: d,
|
|
805
|
+
checked: n,
|
|
806
|
+
required: i,
|
|
807
|
+
disabled: s,
|
|
808
|
+
form: m,
|
|
809
|
+
style: { transform: "translateX(-100%)" }
|
|
810
|
+
}
|
|
811
|
+
)
|
|
812
|
+
] });
|
|
813
|
+
}
|
|
814
|
+
);
|
|
815
|
+
Ir.displayName = ct;
|
|
816
|
+
var $r = "RadioIndicator", Or = c.forwardRef(
|
|
817
|
+
(e, o) => {
|
|
818
|
+
const { __scopeRadio: r, forceMount: a, ...n } = e, i = Ln($r, r);
|
|
819
|
+
return /* @__PURE__ */ t(ge, { present: a || i.checked, children: /* @__PURE__ */ t(
|
|
820
|
+
k.span,
|
|
821
|
+
{
|
|
822
|
+
"data-state": Vr(i.checked),
|
|
823
|
+
"data-disabled": i.disabled ? "" : void 0,
|
|
824
|
+
...n,
|
|
825
|
+
ref: o
|
|
826
|
+
}
|
|
827
|
+
) });
|
|
828
|
+
}
|
|
829
|
+
);
|
|
830
|
+
Or.displayName = $r;
|
|
831
|
+
var Bn = "RadioBubbleInput", Fr = c.forwardRef(
|
|
832
|
+
({
|
|
833
|
+
__scopeRadio: e,
|
|
834
|
+
control: o,
|
|
835
|
+
checked: r,
|
|
836
|
+
bubbles: a = !0,
|
|
837
|
+
...n
|
|
838
|
+
}, i) => {
|
|
839
|
+
const s = c.useRef(null), d = F(s, i), u = Ue(r), m = je(o);
|
|
840
|
+
return c.useEffect(() => {
|
|
841
|
+
const f = s.current;
|
|
842
|
+
if (!f) return;
|
|
843
|
+
const l = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(
|
|
844
|
+
l,
|
|
845
|
+
"checked"
|
|
846
|
+
).set;
|
|
847
|
+
if (u !== r && h) {
|
|
848
|
+
const b = new Event("click", { bubbles: a });
|
|
849
|
+
h.call(f, r), f.dispatchEvent(b);
|
|
850
|
+
}
|
|
851
|
+
}, [u, r, a]), /* @__PURE__ */ t(
|
|
852
|
+
k.input,
|
|
853
|
+
{
|
|
854
|
+
type: "radio",
|
|
855
|
+
"aria-hidden": !0,
|
|
856
|
+
defaultChecked: r,
|
|
857
|
+
...n,
|
|
858
|
+
tabIndex: -1,
|
|
859
|
+
ref: d,
|
|
860
|
+
style: {
|
|
861
|
+
...n.style,
|
|
862
|
+
...m,
|
|
863
|
+
position: "absolute",
|
|
864
|
+
pointerEvents: "none",
|
|
865
|
+
opacity: 0,
|
|
866
|
+
margin: 0
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
);
|
|
870
|
+
}
|
|
871
|
+
);
|
|
872
|
+
Fr.displayName = Bn;
|
|
873
|
+
function Vr(e) {
|
|
874
|
+
return e ? "checked" : "unchecked";
|
|
875
|
+
}
|
|
876
|
+
var Kn = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Se = "RadioGroup", [Hn] = X(Se, [
|
|
877
|
+
be,
|
|
878
|
+
Mr
|
|
879
|
+
]), Lr = be(), Br = Mr(), [zn, jn] = Hn(Se), Kr = c.forwardRef(
|
|
880
|
+
(e, o) => {
|
|
881
|
+
const {
|
|
882
|
+
__scopeRadioGroup: r,
|
|
883
|
+
name: a,
|
|
884
|
+
defaultValue: n,
|
|
885
|
+
value: i,
|
|
886
|
+
required: s = !1,
|
|
887
|
+
disabled: d = !1,
|
|
888
|
+
orientation: u,
|
|
889
|
+
dir: m,
|
|
890
|
+
loop: f = !0,
|
|
891
|
+
onValueChange: l,
|
|
892
|
+
...g
|
|
893
|
+
} = e, h = Lr(r), b = ve(m), [v, w] = Z({
|
|
894
|
+
prop: i,
|
|
895
|
+
defaultProp: n ?? null,
|
|
896
|
+
onChange: l,
|
|
897
|
+
caller: Se
|
|
898
|
+
});
|
|
899
|
+
return /* @__PURE__ */ t(
|
|
900
|
+
zn,
|
|
901
|
+
{
|
|
902
|
+
scope: r,
|
|
903
|
+
name: a,
|
|
904
|
+
required: s,
|
|
905
|
+
disabled: d,
|
|
906
|
+
value: v,
|
|
907
|
+
onValueChange: w,
|
|
908
|
+
children: /* @__PURE__ */ t(
|
|
909
|
+
Pt,
|
|
910
|
+
{
|
|
911
|
+
asChild: !0,
|
|
912
|
+
...h,
|
|
913
|
+
orientation: u,
|
|
914
|
+
dir: b,
|
|
915
|
+
loop: f,
|
|
916
|
+
children: /* @__PURE__ */ t(
|
|
917
|
+
k.div,
|
|
918
|
+
{
|
|
919
|
+
role: "radiogroup",
|
|
920
|
+
"aria-required": s,
|
|
921
|
+
"aria-orientation": u,
|
|
922
|
+
"data-disabled": d ? "" : void 0,
|
|
923
|
+
dir: b,
|
|
924
|
+
...g,
|
|
925
|
+
ref: o
|
|
926
|
+
}
|
|
927
|
+
)
|
|
928
|
+
}
|
|
929
|
+
)
|
|
930
|
+
}
|
|
931
|
+
);
|
|
932
|
+
}
|
|
933
|
+
);
|
|
934
|
+
Kr.displayName = Se;
|
|
935
|
+
var Hr = "RadioGroupItem", zr = c.forwardRef(
|
|
936
|
+
(e, o) => {
|
|
937
|
+
const { __scopeRadioGroup: r, disabled: a, ...n } = e, i = jn(Hr, r), s = i.disabled || a, d = Lr(r), u = Br(r), m = c.useRef(null), f = F(o, m), l = i.value === n.value, g = c.useRef(!1);
|
|
938
|
+
return c.useEffect(() => {
|
|
939
|
+
const h = (v) => {
|
|
940
|
+
Kn.includes(v.key) && (g.current = !0);
|
|
941
|
+
}, b = () => g.current = !1;
|
|
942
|
+
return document.addEventListener("keydown", h), document.addEventListener("keyup", b), () => {
|
|
943
|
+
document.removeEventListener("keydown", h), document.removeEventListener("keyup", b);
|
|
944
|
+
};
|
|
945
|
+
}, []), /* @__PURE__ */ t(
|
|
946
|
+
kt,
|
|
947
|
+
{
|
|
948
|
+
asChild: !0,
|
|
949
|
+
...d,
|
|
950
|
+
focusable: !s,
|
|
951
|
+
active: l,
|
|
952
|
+
children: /* @__PURE__ */ t(
|
|
953
|
+
Ir,
|
|
954
|
+
{
|
|
955
|
+
disabled: s,
|
|
956
|
+
required: i.required,
|
|
957
|
+
checked: l,
|
|
958
|
+
...u,
|
|
959
|
+
...n,
|
|
960
|
+
name: i.name,
|
|
961
|
+
ref: f,
|
|
962
|
+
onCheck: () => i.onValueChange(n.value),
|
|
963
|
+
onKeyDown: P((h) => {
|
|
964
|
+
h.key === "Enter" && h.preventDefault();
|
|
965
|
+
}),
|
|
966
|
+
onFocus: P(n.onFocus, () => {
|
|
967
|
+
g.current && m.current?.click();
|
|
968
|
+
})
|
|
969
|
+
}
|
|
970
|
+
)
|
|
971
|
+
}
|
|
972
|
+
);
|
|
973
|
+
}
|
|
974
|
+
);
|
|
975
|
+
zr.displayName = Hr;
|
|
976
|
+
var Gn = "RadioGroupIndicator", jr = c.forwardRef(
|
|
977
|
+
(e, o) => {
|
|
978
|
+
const { __scopeRadioGroup: r, ...a } = e, n = Br(r);
|
|
979
|
+
return /* @__PURE__ */ t(Or, { ...n, ...a, ref: o });
|
|
980
|
+
}
|
|
981
|
+
);
|
|
982
|
+
jr.displayName = Gn;
|
|
983
|
+
var Gr = Kr, Wr = zr, Wn = jr;
|
|
984
|
+
const Un = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(Gr, { className: y("grid gap-2", e), ...o, ref: r }));
|
|
985
|
+
Un.displayName = Gr.displayName;
|
|
986
|
+
const qn = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
987
|
+
Wr,
|
|
988
|
+
{
|
|
989
|
+
ref: r,
|
|
990
|
+
className: y(
|
|
991
|
+
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
992
|
+
e
|
|
993
|
+
),
|
|
994
|
+
...o,
|
|
995
|
+
children: /* @__PURE__ */ t(Wn, { className: "flex items-center justify-center", children: /* @__PURE__ */ t(ca, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
996
|
+
}
|
|
997
|
+
));
|
|
998
|
+
qn.displayName = Wr.displayName;
|
|
999
|
+
var Ur = ["PageUp", "PageDown"], qr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Yr = {
|
|
1000
|
+
"from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
1001
|
+
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
1002
|
+
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
1003
|
+
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
1004
|
+
}, oe = "Slider", [$e, Yn, Xn] = ze(oe), [Xr] = X(oe, [
|
|
1005
|
+
Xn
|
|
1006
|
+
]), [Jn, Re] = Xr(oe), Jr = c.forwardRef(
|
|
1007
|
+
(e, o) => {
|
|
1008
|
+
const {
|
|
1009
|
+
name: r,
|
|
1010
|
+
min: a = 0,
|
|
1011
|
+
max: n = 100,
|
|
1012
|
+
step: i = 1,
|
|
1013
|
+
orientation: s = "horizontal",
|
|
1014
|
+
disabled: d = !1,
|
|
1015
|
+
minStepsBetweenThumbs: u = 0,
|
|
1016
|
+
defaultValue: m = [a],
|
|
1017
|
+
value: f,
|
|
1018
|
+
onValueChange: l = () => {
|
|
1019
|
+
},
|
|
1020
|
+
onValueCommit: g = () => {
|
|
1021
|
+
},
|
|
1022
|
+
inverted: h = !1,
|
|
1023
|
+
form: b,
|
|
1024
|
+
...v
|
|
1025
|
+
} = e, w = c.useRef(/* @__PURE__ */ new Set()), N = c.useRef(0), C = s === "horizontal" ? Zn : Qn, [S = [], T] = Z({
|
|
1026
|
+
prop: f,
|
|
1027
|
+
defaultProp: m,
|
|
1028
|
+
onChange: (D) => {
|
|
1029
|
+
[...w.current][N.current]?.focus(), l(D);
|
|
1030
|
+
}
|
|
1031
|
+
}), _ = c.useRef(S);
|
|
1032
|
+
function A(D) {
|
|
1033
|
+
const V = as(S, D);
|
|
1034
|
+
M(D, V);
|
|
1035
|
+
}
|
|
1036
|
+
function $(D) {
|
|
1037
|
+
M(D, N.current);
|
|
1038
|
+
}
|
|
1039
|
+
function I() {
|
|
1040
|
+
const D = _.current[N.current];
|
|
1041
|
+
S[N.current] !== D && g(S);
|
|
1042
|
+
}
|
|
1043
|
+
function M(D, V, { commit: q } = { commit: !1 }) {
|
|
1044
|
+
const E = cs(i), B = ls(Math.round((D - a) / i) * i + a, E), L = Rt(B, [a, n]);
|
|
1045
|
+
T((z = []) => {
|
|
1046
|
+
const K = rs(z, L, V);
|
|
1047
|
+
if (is(K, u * i)) {
|
|
1048
|
+
N.current = K.indexOf(L);
|
|
1049
|
+
const Q = String(K) !== String(z);
|
|
1050
|
+
return Q && q && g(K), Q ? K : z;
|
|
1051
|
+
} else
|
|
1052
|
+
return z;
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
return /* @__PURE__ */ t(
|
|
1056
|
+
Jn,
|
|
1057
|
+
{
|
|
1058
|
+
scope: e.__scopeSlider,
|
|
1059
|
+
name: r,
|
|
1060
|
+
disabled: d,
|
|
1061
|
+
min: a,
|
|
1062
|
+
max: n,
|
|
1063
|
+
valueIndexToChangeRef: N,
|
|
1064
|
+
thumbs: w.current,
|
|
1065
|
+
values: S,
|
|
1066
|
+
orientation: s,
|
|
1067
|
+
form: b,
|
|
1068
|
+
children: /* @__PURE__ */ t($e.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ t($e.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ t(
|
|
1069
|
+
C,
|
|
1070
|
+
{
|
|
1071
|
+
"aria-disabled": d,
|
|
1072
|
+
"data-disabled": d ? "" : void 0,
|
|
1073
|
+
...v,
|
|
1074
|
+
ref: o,
|
|
1075
|
+
onPointerDown: P(v.onPointerDown, () => {
|
|
1076
|
+
d || (_.current = S);
|
|
1077
|
+
}),
|
|
1078
|
+
min: a,
|
|
1079
|
+
max: n,
|
|
1080
|
+
inverted: h,
|
|
1081
|
+
onSlideStart: d ? void 0 : A,
|
|
1082
|
+
onSlideMove: d ? void 0 : $,
|
|
1083
|
+
onSlideEnd: d ? void 0 : I,
|
|
1084
|
+
onHomeKeyDown: () => !d && M(a, 0, { commit: !0 }),
|
|
1085
|
+
onEndKeyDown: () => !d && M(n, S.length - 1, { commit: !0 }),
|
|
1086
|
+
onStepKeyDown: ({ event: D, direction: V }) => {
|
|
1087
|
+
if (!d) {
|
|
1088
|
+
const B = Ur.includes(D.key) || D.shiftKey && qr.includes(D.key) ? 10 : 1, L = N.current, z = S[L], K = i * B * V;
|
|
1089
|
+
M(z + K, L, { commit: !0 });
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
) }) })
|
|
1094
|
+
}
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
);
|
|
1098
|
+
Jr.displayName = oe;
|
|
1099
|
+
var [Zr, Qr] = Xr(oe, {
|
|
1100
|
+
startEdge: "left",
|
|
1101
|
+
endEdge: "right",
|
|
1102
|
+
size: "width",
|
|
1103
|
+
direction: 1
|
|
1104
|
+
}), Zn = c.forwardRef(
|
|
1105
|
+
(e, o) => {
|
|
1106
|
+
const {
|
|
1107
|
+
min: r,
|
|
1108
|
+
max: a,
|
|
1109
|
+
dir: n,
|
|
1110
|
+
inverted: i,
|
|
1111
|
+
onSlideStart: s,
|
|
1112
|
+
onSlideMove: d,
|
|
1113
|
+
onSlideEnd: u,
|
|
1114
|
+
onStepKeyDown: m,
|
|
1115
|
+
...f
|
|
1116
|
+
} = e, [l, g] = c.useState(null), h = F(o, (C) => g(C)), b = c.useRef(void 0), v = ve(n), w = v === "ltr", N = w && !i || !w && i;
|
|
1117
|
+
function x(C) {
|
|
1118
|
+
const S = b.current || l.getBoundingClientRect(), T = [0, S.width], A = lt(T, N ? [r, a] : [a, r]);
|
|
1119
|
+
return b.current = S, A(C - S.left);
|
|
1120
|
+
}
|
|
1121
|
+
return /* @__PURE__ */ t(
|
|
1122
|
+
Zr,
|
|
1123
|
+
{
|
|
1124
|
+
scope: e.__scopeSlider,
|
|
1125
|
+
startEdge: N ? "left" : "right",
|
|
1126
|
+
endEdge: N ? "right" : "left",
|
|
1127
|
+
direction: N ? 1 : -1,
|
|
1128
|
+
size: "width",
|
|
1129
|
+
children: /* @__PURE__ */ t(
|
|
1130
|
+
eo,
|
|
1131
|
+
{
|
|
1132
|
+
dir: v,
|
|
1133
|
+
"data-orientation": "horizontal",
|
|
1134
|
+
...f,
|
|
1135
|
+
ref: h,
|
|
1136
|
+
style: {
|
|
1137
|
+
...f.style,
|
|
1138
|
+
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
1139
|
+
},
|
|
1140
|
+
onSlideStart: (C) => {
|
|
1141
|
+
const S = x(C.clientX);
|
|
1142
|
+
s?.(S);
|
|
1143
|
+
},
|
|
1144
|
+
onSlideMove: (C) => {
|
|
1145
|
+
const S = x(C.clientX);
|
|
1146
|
+
d?.(S);
|
|
1147
|
+
},
|
|
1148
|
+
onSlideEnd: () => {
|
|
1149
|
+
b.current = void 0, u?.();
|
|
1150
|
+
},
|
|
1151
|
+
onStepKeyDown: (C) => {
|
|
1152
|
+
const T = Yr[N ? "from-left" : "from-right"].includes(C.key);
|
|
1153
|
+
m?.({ event: C, direction: T ? -1 : 1 });
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
)
|
|
1157
|
+
}
|
|
1158
|
+
);
|
|
1159
|
+
}
|
|
1160
|
+
), Qn = c.forwardRef(
|
|
1161
|
+
(e, o) => {
|
|
1162
|
+
const {
|
|
1163
|
+
min: r,
|
|
1164
|
+
max: a,
|
|
1165
|
+
inverted: n,
|
|
1166
|
+
onSlideStart: i,
|
|
1167
|
+
onSlideMove: s,
|
|
1168
|
+
onSlideEnd: d,
|
|
1169
|
+
onStepKeyDown: u,
|
|
1170
|
+
...m
|
|
1171
|
+
} = e, f = c.useRef(null), l = F(o, f), g = c.useRef(void 0), h = !n;
|
|
1172
|
+
function b(v) {
|
|
1173
|
+
const w = g.current || f.current.getBoundingClientRect(), N = [0, w.height], C = lt(N, h ? [a, r] : [r, a]);
|
|
1174
|
+
return g.current = w, C(v - w.top);
|
|
1175
|
+
}
|
|
1176
|
+
return /* @__PURE__ */ t(
|
|
1177
|
+
Zr,
|
|
1178
|
+
{
|
|
1179
|
+
scope: e.__scopeSlider,
|
|
1180
|
+
startEdge: h ? "bottom" : "top",
|
|
1181
|
+
endEdge: h ? "top" : "bottom",
|
|
1182
|
+
size: "height",
|
|
1183
|
+
direction: h ? 1 : -1,
|
|
1184
|
+
children: /* @__PURE__ */ t(
|
|
1185
|
+
eo,
|
|
1186
|
+
{
|
|
1187
|
+
"data-orientation": "vertical",
|
|
1188
|
+
...m,
|
|
1189
|
+
ref: l,
|
|
1190
|
+
style: {
|
|
1191
|
+
...m.style,
|
|
1192
|
+
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
1193
|
+
},
|
|
1194
|
+
onSlideStart: (v) => {
|
|
1195
|
+
const w = b(v.clientY);
|
|
1196
|
+
i?.(w);
|
|
1197
|
+
},
|
|
1198
|
+
onSlideMove: (v) => {
|
|
1199
|
+
const w = b(v.clientY);
|
|
1200
|
+
s?.(w);
|
|
1201
|
+
},
|
|
1202
|
+
onSlideEnd: () => {
|
|
1203
|
+
g.current = void 0, d?.();
|
|
1204
|
+
},
|
|
1205
|
+
onStepKeyDown: (v) => {
|
|
1206
|
+
const N = Yr[h ? "from-bottom" : "from-top"].includes(v.key);
|
|
1207
|
+
u?.({ event: v, direction: N ? -1 : 1 });
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
)
|
|
1211
|
+
}
|
|
1212
|
+
);
|
|
1213
|
+
}
|
|
1214
|
+
), eo = c.forwardRef(
|
|
1215
|
+
(e, o) => {
|
|
1216
|
+
const {
|
|
1217
|
+
__scopeSlider: r,
|
|
1218
|
+
onSlideStart: a,
|
|
1219
|
+
onSlideMove: n,
|
|
1220
|
+
onSlideEnd: i,
|
|
1221
|
+
onHomeKeyDown: s,
|
|
1222
|
+
onEndKeyDown: d,
|
|
1223
|
+
onStepKeyDown: u,
|
|
1224
|
+
...m
|
|
1225
|
+
} = e, f = Re(oe, r);
|
|
1226
|
+
return /* @__PURE__ */ t(
|
|
1227
|
+
k.span,
|
|
1228
|
+
{
|
|
1229
|
+
...m,
|
|
1230
|
+
ref: o,
|
|
1231
|
+
onKeyDown: P(e.onKeyDown, (l) => {
|
|
1232
|
+
l.key === "Home" ? (s(l), l.preventDefault()) : l.key === "End" ? (d(l), l.preventDefault()) : Ur.concat(qr).includes(l.key) && (u(l), l.preventDefault());
|
|
1233
|
+
}),
|
|
1234
|
+
onPointerDown: P(e.onPointerDown, (l) => {
|
|
1235
|
+
const g = l.target;
|
|
1236
|
+
g.setPointerCapture(l.pointerId), l.preventDefault(), f.thumbs.has(g) ? g.focus() : a(l);
|
|
1237
|
+
}),
|
|
1238
|
+
onPointerMove: P(e.onPointerMove, (l) => {
|
|
1239
|
+
l.target.hasPointerCapture(l.pointerId) && n(l);
|
|
1240
|
+
}),
|
|
1241
|
+
onPointerUp: P(e.onPointerUp, (l) => {
|
|
1242
|
+
const g = l.target;
|
|
1243
|
+
g.hasPointerCapture(l.pointerId) && (g.releasePointerCapture(l.pointerId), i(l));
|
|
1244
|
+
})
|
|
1245
|
+
}
|
|
1246
|
+
);
|
|
1247
|
+
}
|
|
1248
|
+
), to = "SliderTrack", ro = c.forwardRef(
|
|
1249
|
+
(e, o) => {
|
|
1250
|
+
const { __scopeSlider: r, ...a } = e, n = Re(to, r);
|
|
1251
|
+
return /* @__PURE__ */ t(
|
|
1252
|
+
k.span,
|
|
1253
|
+
{
|
|
1254
|
+
"data-disabled": n.disabled ? "" : void 0,
|
|
1255
|
+
"data-orientation": n.orientation,
|
|
1256
|
+
...a,
|
|
1257
|
+
ref: o
|
|
1258
|
+
}
|
|
1259
|
+
);
|
|
1260
|
+
}
|
|
1261
|
+
);
|
|
1262
|
+
ro.displayName = to;
|
|
1263
|
+
var Oe = "SliderRange", oo = c.forwardRef(
|
|
1264
|
+
(e, o) => {
|
|
1265
|
+
const { __scopeSlider: r, ...a } = e, n = Re(Oe, r), i = Qr(Oe, r), s = c.useRef(null), d = F(o, s), u = n.values.length, m = n.values.map(
|
|
1266
|
+
(g) => so(g, n.min, n.max)
|
|
1267
|
+
), f = u > 1 ? Math.min(...m) : 0, l = 100 - Math.max(...m);
|
|
1268
|
+
return /* @__PURE__ */ t(
|
|
1269
|
+
k.span,
|
|
1270
|
+
{
|
|
1271
|
+
"data-orientation": n.orientation,
|
|
1272
|
+
"data-disabled": n.disabled ? "" : void 0,
|
|
1273
|
+
...a,
|
|
1274
|
+
ref: d,
|
|
1275
|
+
style: {
|
|
1276
|
+
...e.style,
|
|
1277
|
+
[i.startEdge]: f + "%",
|
|
1278
|
+
[i.endEdge]: l + "%"
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
);
|
|
1282
|
+
}
|
|
1283
|
+
);
|
|
1284
|
+
oo.displayName = Oe;
|
|
1285
|
+
var Fe = "SliderThumb", ao = c.forwardRef(
|
|
1286
|
+
(e, o) => {
|
|
1287
|
+
const r = Yn(e.__scopeSlider), [a, n] = c.useState(null), i = F(o, (d) => n(d)), s = c.useMemo(
|
|
1288
|
+
() => a ? r().findIndex((d) => d.ref.current === a) : -1,
|
|
1289
|
+
[r, a]
|
|
1290
|
+
);
|
|
1291
|
+
return /* @__PURE__ */ t(es, { ...e, ref: i, index: s });
|
|
1292
|
+
}
|
|
1293
|
+
), es = c.forwardRef(
|
|
1294
|
+
(e, o) => {
|
|
1295
|
+
const { __scopeSlider: r, index: a, name: n, ...i } = e, s = Re(Fe, r), d = Qr(Fe, r), [u, m] = c.useState(null), f = F(o, (x) => m(x)), l = u ? s.form || !!u.closest("form") : !0, g = je(u), h = s.values[a], b = h === void 0 ? 0 : so(h, s.min, s.max), v = os(a, s.values.length), w = g?.[d.size], N = w ? ns(w, b, d.direction) : 0;
|
|
1296
|
+
return c.useEffect(() => {
|
|
1297
|
+
if (u)
|
|
1298
|
+
return s.thumbs.add(u), () => {
|
|
1299
|
+
s.thumbs.delete(u);
|
|
1300
|
+
};
|
|
1301
|
+
}, [u, s.thumbs]), /* @__PURE__ */ p(
|
|
1302
|
+
"span",
|
|
1303
|
+
{
|
|
1304
|
+
style: {
|
|
1305
|
+
transform: "var(--radix-slider-thumb-transform)",
|
|
1306
|
+
position: "absolute",
|
|
1307
|
+
[d.startEdge]: `calc(${b}% + ${N}px)`
|
|
1308
|
+
},
|
|
1309
|
+
children: [
|
|
1310
|
+
/* @__PURE__ */ t($e.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ t(
|
|
1311
|
+
k.span,
|
|
1312
|
+
{
|
|
1313
|
+
role: "slider",
|
|
1314
|
+
"aria-label": e["aria-label"] || v,
|
|
1315
|
+
"aria-valuemin": s.min,
|
|
1316
|
+
"aria-valuenow": h,
|
|
1317
|
+
"aria-valuemax": s.max,
|
|
1318
|
+
"aria-orientation": s.orientation,
|
|
1319
|
+
"data-orientation": s.orientation,
|
|
1320
|
+
"data-disabled": s.disabled ? "" : void 0,
|
|
1321
|
+
tabIndex: s.disabled ? void 0 : 0,
|
|
1322
|
+
...i,
|
|
1323
|
+
ref: f,
|
|
1324
|
+
style: h === void 0 ? { display: "none" } : e.style,
|
|
1325
|
+
onFocus: P(e.onFocus, () => {
|
|
1326
|
+
s.valueIndexToChangeRef.current = a;
|
|
1327
|
+
})
|
|
1328
|
+
}
|
|
1329
|
+
) }),
|
|
1330
|
+
l && /* @__PURE__ */ t(
|
|
1331
|
+
no,
|
|
1332
|
+
{
|
|
1333
|
+
name: n ?? (s.name ? s.name + (s.values.length > 1 ? "[]" : "") : void 0),
|
|
1334
|
+
form: s.form,
|
|
1335
|
+
value: h
|
|
1336
|
+
},
|
|
1337
|
+
a
|
|
1338
|
+
)
|
|
1339
|
+
]
|
|
1340
|
+
}
|
|
1341
|
+
);
|
|
1342
|
+
}
|
|
1343
|
+
);
|
|
1344
|
+
ao.displayName = Fe;
|
|
1345
|
+
var ts = "RadioBubbleInput", no = c.forwardRef(
|
|
1346
|
+
({ __scopeSlider: e, value: o, ...r }, a) => {
|
|
1347
|
+
const n = c.useRef(null), i = F(n, a), s = Ue(o);
|
|
1348
|
+
return c.useEffect(() => {
|
|
1349
|
+
const d = n.current;
|
|
1350
|
+
if (!d) return;
|
|
1351
|
+
const u = window.HTMLInputElement.prototype, f = Object.getOwnPropertyDescriptor(u, "value").set;
|
|
1352
|
+
if (s !== o && f) {
|
|
1353
|
+
const l = new Event("input", { bubbles: !0 });
|
|
1354
|
+
f.call(d, o), d.dispatchEvent(l);
|
|
1355
|
+
}
|
|
1356
|
+
}, [s, o]), /* @__PURE__ */ t(
|
|
1357
|
+
k.input,
|
|
1358
|
+
{
|
|
1359
|
+
style: { display: "none" },
|
|
1360
|
+
...r,
|
|
1361
|
+
ref: i,
|
|
1362
|
+
defaultValue: o
|
|
1363
|
+
}
|
|
1364
|
+
);
|
|
1365
|
+
}
|
|
1366
|
+
);
|
|
1367
|
+
no.displayName = ts;
|
|
1368
|
+
function rs(e = [], o, r) {
|
|
1369
|
+
const a = [...e];
|
|
1370
|
+
return a[r] = o, a.sort((n, i) => n - i);
|
|
1371
|
+
}
|
|
1372
|
+
function so(e, o, r) {
|
|
1373
|
+
const i = 100 / (r - o) * (e - o);
|
|
1374
|
+
return Rt(i, [0, 100]);
|
|
1375
|
+
}
|
|
1376
|
+
function os(e, o) {
|
|
1377
|
+
return o > 2 ? `Value ${e + 1} of ${o}` : o === 2 ? ["Minimum", "Maximum"][e] : void 0;
|
|
1378
|
+
}
|
|
1379
|
+
function as(e, o) {
|
|
1380
|
+
if (e.length === 1) return 0;
|
|
1381
|
+
const r = e.map((n) => Math.abs(n - o)), a = Math.min(...r);
|
|
1382
|
+
return r.indexOf(a);
|
|
1383
|
+
}
|
|
1384
|
+
function ns(e, o, r) {
|
|
1385
|
+
const a = e / 2, i = lt([0, 50], [0, a]);
|
|
1386
|
+
return (a - i(o) * r) * r;
|
|
1387
|
+
}
|
|
1388
|
+
function ss(e) {
|
|
1389
|
+
return e.slice(0, -1).map((o, r) => e[r + 1] - o);
|
|
1390
|
+
}
|
|
1391
|
+
function is(e, o) {
|
|
1392
|
+
if (o > 0) {
|
|
1393
|
+
const r = ss(e);
|
|
1394
|
+
return Math.min(...r) >= o;
|
|
1395
|
+
}
|
|
1396
|
+
return !0;
|
|
1397
|
+
}
|
|
1398
|
+
function lt(e, o) {
|
|
1399
|
+
return (r) => {
|
|
1400
|
+
if (e[0] === e[1] || o[0] === o[1]) return o[0];
|
|
1401
|
+
const a = (o[1] - o[0]) / (e[1] - e[0]);
|
|
1402
|
+
return o[0] + a * (r - e[0]);
|
|
1403
|
+
};
|
|
1404
|
+
}
|
|
1405
|
+
function cs(e) {
|
|
1406
|
+
return (String(e).split(".")[1] || "").length;
|
|
1407
|
+
}
|
|
1408
|
+
function ls(e, o) {
|
|
1409
|
+
const r = Math.pow(10, o);
|
|
1410
|
+
return Math.round(e * r) / r;
|
|
1411
|
+
}
|
|
1412
|
+
var io = Jr, ds = ro, us = oo, fs = ao;
|
|
1413
|
+
const ms = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ p(
|
|
1414
|
+
io,
|
|
1415
|
+
{
|
|
1416
|
+
ref: r,
|
|
1417
|
+
className: y("relative flex w-full touch-none select-none items-center", e),
|
|
1418
|
+
...o,
|
|
1419
|
+
children: [
|
|
1420
|
+
/* @__PURE__ */ t(ds, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ t(us, { className: "absolute h-full bg-primary" }) }),
|
|
1421
|
+
/* @__PURE__ */ t(fs, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
|
|
1422
|
+
]
|
|
1423
|
+
}
|
|
1424
|
+
));
|
|
1425
|
+
ms.displayName = io.displayName;
|
|
1426
|
+
var Te = "Switch", [ps] = X(Te), [hs, gs] = ps(Te), co = c.forwardRef(
|
|
1427
|
+
(e, o) => {
|
|
1428
|
+
const {
|
|
1429
|
+
__scopeSwitch: r,
|
|
1430
|
+
name: a,
|
|
1431
|
+
checked: n,
|
|
1432
|
+
defaultChecked: i,
|
|
1433
|
+
required: s,
|
|
1434
|
+
disabled: d,
|
|
1435
|
+
value: u = "on",
|
|
1436
|
+
onCheckedChange: m,
|
|
1437
|
+
form: f,
|
|
1438
|
+
...l
|
|
1439
|
+
} = e, [g, h] = c.useState(null), b = F(o, (C) => h(C)), v = c.useRef(!1), w = g ? f || !!g.closest("form") : !0, [N, x] = Z({
|
|
1440
|
+
prop: n,
|
|
1441
|
+
defaultProp: i ?? !1,
|
|
1442
|
+
onChange: m,
|
|
1443
|
+
caller: Te
|
|
1444
|
+
});
|
|
1445
|
+
return /* @__PURE__ */ p(hs, { scope: r, checked: N, disabled: d, children: [
|
|
1446
|
+
/* @__PURE__ */ t(
|
|
1447
|
+
k.button,
|
|
1448
|
+
{
|
|
1449
|
+
type: "button",
|
|
1450
|
+
role: "switch",
|
|
1451
|
+
"aria-checked": N,
|
|
1452
|
+
"aria-required": s,
|
|
1453
|
+
"data-state": mo(N),
|
|
1454
|
+
"data-disabled": d ? "" : void 0,
|
|
1455
|
+
disabled: d,
|
|
1456
|
+
value: u,
|
|
1457
|
+
...l,
|
|
1458
|
+
ref: b,
|
|
1459
|
+
onClick: P(e.onClick, (C) => {
|
|
1460
|
+
x((S) => !S), w && (v.current = C.isPropagationStopped(), v.current || C.stopPropagation());
|
|
1461
|
+
})
|
|
1462
|
+
}
|
|
1463
|
+
),
|
|
1464
|
+
w && /* @__PURE__ */ t(
|
|
1465
|
+
fo,
|
|
1466
|
+
{
|
|
1467
|
+
control: g,
|
|
1468
|
+
bubbles: !v.current,
|
|
1469
|
+
name: a,
|
|
1470
|
+
value: u,
|
|
1471
|
+
checked: N,
|
|
1472
|
+
required: s,
|
|
1473
|
+
disabled: d,
|
|
1474
|
+
form: f,
|
|
1475
|
+
style: { transform: "translateX(-100%)" }
|
|
1476
|
+
}
|
|
1477
|
+
)
|
|
1478
|
+
] });
|
|
1479
|
+
}
|
|
1480
|
+
);
|
|
1481
|
+
co.displayName = Te;
|
|
1482
|
+
var lo = "SwitchThumb", uo = c.forwardRef(
|
|
1483
|
+
(e, o) => {
|
|
1484
|
+
const { __scopeSwitch: r, ...a } = e, n = gs(lo, r);
|
|
1485
|
+
return /* @__PURE__ */ t(
|
|
1486
|
+
k.span,
|
|
1487
|
+
{
|
|
1488
|
+
"data-state": mo(n.checked),
|
|
1489
|
+
"data-disabled": n.disabled ? "" : void 0,
|
|
1490
|
+
...a,
|
|
1491
|
+
ref: o
|
|
1492
|
+
}
|
|
1493
|
+
);
|
|
1494
|
+
}
|
|
1495
|
+
);
|
|
1496
|
+
uo.displayName = lo;
|
|
1497
|
+
var vs = "SwitchBubbleInput", fo = c.forwardRef(
|
|
1498
|
+
({
|
|
1499
|
+
__scopeSwitch: e,
|
|
1500
|
+
control: o,
|
|
1501
|
+
checked: r,
|
|
1502
|
+
bubbles: a = !0,
|
|
1503
|
+
...n
|
|
1504
|
+
}, i) => {
|
|
1505
|
+
const s = c.useRef(null), d = F(s, i), u = Ue(r), m = je(o);
|
|
1506
|
+
return c.useEffect(() => {
|
|
1507
|
+
const f = s.current;
|
|
1508
|
+
if (!f) return;
|
|
1509
|
+
const l = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(
|
|
1510
|
+
l,
|
|
1511
|
+
"checked"
|
|
1512
|
+
).set;
|
|
1513
|
+
if (u !== r && h) {
|
|
1514
|
+
const b = new Event("click", { bubbles: a });
|
|
1515
|
+
h.call(f, r), f.dispatchEvent(b);
|
|
1516
|
+
}
|
|
1517
|
+
}, [u, r, a]), /* @__PURE__ */ t(
|
|
1518
|
+
"input",
|
|
1519
|
+
{
|
|
1520
|
+
type: "checkbox",
|
|
1521
|
+
"aria-hidden": !0,
|
|
1522
|
+
defaultChecked: r,
|
|
1523
|
+
...n,
|
|
1524
|
+
tabIndex: -1,
|
|
1525
|
+
ref: d,
|
|
1526
|
+
style: {
|
|
1527
|
+
...n.style,
|
|
1528
|
+
...m,
|
|
1529
|
+
position: "absolute",
|
|
1530
|
+
pointerEvents: "none",
|
|
1531
|
+
opacity: 0,
|
|
1532
|
+
margin: 0
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
);
|
|
1536
|
+
}
|
|
1537
|
+
);
|
|
1538
|
+
fo.displayName = vs;
|
|
1539
|
+
function mo(e) {
|
|
1540
|
+
return e ? "checked" : "unchecked";
|
|
1541
|
+
}
|
|
1542
|
+
var po = co, bs = uo;
|
|
1543
|
+
const ws = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
1544
|
+
po,
|
|
1545
|
+
{
|
|
1546
|
+
className: y(
|
|
1547
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
1548
|
+
e
|
|
1549
|
+
),
|
|
1550
|
+
...o,
|
|
1551
|
+
ref: r,
|
|
1552
|
+
children: /* @__PURE__ */ t(
|
|
1553
|
+
bs,
|
|
1554
|
+
{
|
|
1555
|
+
className: y(
|
|
1556
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
1557
|
+
)
|
|
1558
|
+
}
|
|
1559
|
+
)
|
|
1560
|
+
}
|
|
1561
|
+
));
|
|
1562
|
+
ws.displayName = po.displayName;
|
|
1563
|
+
var Ee = "Tabs", [ys] = X(Ee, [
|
|
1564
|
+
be
|
|
1565
|
+
]), ho = be(), [xs, dt] = ys(Ee), go = c.forwardRef(
|
|
1566
|
+
(e, o) => {
|
|
1567
|
+
const {
|
|
1568
|
+
__scopeTabs: r,
|
|
1569
|
+
value: a,
|
|
1570
|
+
onValueChange: n,
|
|
1571
|
+
defaultValue: i,
|
|
1572
|
+
orientation: s = "horizontal",
|
|
1573
|
+
dir: d,
|
|
1574
|
+
activationMode: u = "automatic",
|
|
1575
|
+
...m
|
|
1576
|
+
} = e, f = ve(d), [l, g] = Z({
|
|
1577
|
+
prop: a,
|
|
1578
|
+
onChange: n,
|
|
1579
|
+
defaultProp: i ?? "",
|
|
1580
|
+
caller: Ee
|
|
1581
|
+
});
|
|
1582
|
+
return /* @__PURE__ */ t(
|
|
1583
|
+
xs,
|
|
1584
|
+
{
|
|
1585
|
+
scope: r,
|
|
1586
|
+
baseId: He(),
|
|
1587
|
+
value: l,
|
|
1588
|
+
onValueChange: g,
|
|
1589
|
+
orientation: s,
|
|
1590
|
+
dir: f,
|
|
1591
|
+
activationMode: u,
|
|
1592
|
+
children: /* @__PURE__ */ t(
|
|
1593
|
+
k.div,
|
|
1594
|
+
{
|
|
1595
|
+
dir: f,
|
|
1596
|
+
"data-orientation": s,
|
|
1597
|
+
...m,
|
|
1598
|
+
ref: o
|
|
1599
|
+
}
|
|
1600
|
+
)
|
|
1601
|
+
}
|
|
1602
|
+
);
|
|
1603
|
+
}
|
|
1604
|
+
);
|
|
1605
|
+
go.displayName = Ee;
|
|
1606
|
+
var vo = "TabsList", bo = c.forwardRef(
|
|
1607
|
+
(e, o) => {
|
|
1608
|
+
const { __scopeTabs: r, loop: a = !0, ...n } = e, i = dt(vo, r), s = ho(r);
|
|
1609
|
+
return /* @__PURE__ */ t(
|
|
1610
|
+
Pt,
|
|
1611
|
+
{
|
|
1612
|
+
asChild: !0,
|
|
1613
|
+
...s,
|
|
1614
|
+
orientation: i.orientation,
|
|
1615
|
+
dir: i.dir,
|
|
1616
|
+
loop: a,
|
|
1617
|
+
children: /* @__PURE__ */ t(
|
|
1618
|
+
k.div,
|
|
1619
|
+
{
|
|
1620
|
+
role: "tablist",
|
|
1621
|
+
"aria-orientation": i.orientation,
|
|
1622
|
+
...n,
|
|
1623
|
+
ref: o
|
|
1624
|
+
}
|
|
1625
|
+
)
|
|
1626
|
+
}
|
|
1627
|
+
);
|
|
1628
|
+
}
|
|
1629
|
+
);
|
|
1630
|
+
bo.displayName = vo;
|
|
1631
|
+
var wo = "TabsTrigger", yo = c.forwardRef(
|
|
1632
|
+
(e, o) => {
|
|
1633
|
+
const { __scopeTabs: r, value: a, disabled: n = !1, ...i } = e, s = dt(wo, r), d = ho(r), u = Co(s.baseId, a), m = So(s.baseId, a), f = a === s.value;
|
|
1634
|
+
return /* @__PURE__ */ t(
|
|
1635
|
+
kt,
|
|
1636
|
+
{
|
|
1637
|
+
asChild: !0,
|
|
1638
|
+
...d,
|
|
1639
|
+
focusable: !n,
|
|
1640
|
+
active: f,
|
|
1641
|
+
children: /* @__PURE__ */ t(
|
|
1642
|
+
k.button,
|
|
1643
|
+
{
|
|
1644
|
+
type: "button",
|
|
1645
|
+
role: "tab",
|
|
1646
|
+
"aria-selected": f,
|
|
1647
|
+
"aria-controls": m,
|
|
1648
|
+
"data-state": f ? "active" : "inactive",
|
|
1649
|
+
"data-disabled": n ? "" : void 0,
|
|
1650
|
+
disabled: n,
|
|
1651
|
+
id: u,
|
|
1652
|
+
...i,
|
|
1653
|
+
ref: o,
|
|
1654
|
+
onMouseDown: P(e.onMouseDown, (l) => {
|
|
1655
|
+
!n && l.button === 0 && l.ctrlKey === !1 ? s.onValueChange(a) : l.preventDefault();
|
|
1656
|
+
}),
|
|
1657
|
+
onKeyDown: P(e.onKeyDown, (l) => {
|
|
1658
|
+
[" ", "Enter"].includes(l.key) && s.onValueChange(a);
|
|
1659
|
+
}),
|
|
1660
|
+
onFocus: P(e.onFocus, () => {
|
|
1661
|
+
const l = s.activationMode !== "manual";
|
|
1662
|
+
!f && !n && l && s.onValueChange(a);
|
|
1663
|
+
})
|
|
1664
|
+
}
|
|
1665
|
+
)
|
|
1666
|
+
}
|
|
1667
|
+
);
|
|
1668
|
+
}
|
|
1669
|
+
);
|
|
1670
|
+
yo.displayName = wo;
|
|
1671
|
+
var xo = "TabsContent", No = c.forwardRef(
|
|
1672
|
+
(e, o) => {
|
|
1673
|
+
const { __scopeTabs: r, value: a, forceMount: n, children: i, ...s } = e, d = dt(xo, r), u = Co(d.baseId, a), m = So(d.baseId, a), f = a === d.value, l = c.useRef(f);
|
|
1674
|
+
return c.useEffect(() => {
|
|
1675
|
+
const g = requestAnimationFrame(() => l.current = !1);
|
|
1676
|
+
return () => cancelAnimationFrame(g);
|
|
1677
|
+
}, []), /* @__PURE__ */ t(ge, { present: n || f, children: ({ present: g }) => /* @__PURE__ */ t(
|
|
1678
|
+
k.div,
|
|
1679
|
+
{
|
|
1680
|
+
"data-state": f ? "active" : "inactive",
|
|
1681
|
+
"data-orientation": d.orientation,
|
|
1682
|
+
role: "tabpanel",
|
|
1683
|
+
"aria-labelledby": u,
|
|
1684
|
+
hidden: !g,
|
|
1685
|
+
id: m,
|
|
1686
|
+
tabIndex: 0,
|
|
1687
|
+
...s,
|
|
1688
|
+
ref: o,
|
|
1689
|
+
style: {
|
|
1690
|
+
...e.style,
|
|
1691
|
+
animationDuration: l.current ? "0s" : void 0
|
|
1692
|
+
},
|
|
1693
|
+
children: g && i
|
|
1694
|
+
}
|
|
1695
|
+
) });
|
|
1696
|
+
}
|
|
1697
|
+
);
|
|
1698
|
+
No.displayName = xo;
|
|
1699
|
+
function Co(e, o) {
|
|
1700
|
+
return `${e}-trigger-${o}`;
|
|
1701
|
+
}
|
|
1702
|
+
function So(e, o) {
|
|
1703
|
+
return `${e}-content-${o}`;
|
|
1704
|
+
}
|
|
1705
|
+
var Ns = go, Ro = bo, To = yo, Eo = No;
|
|
1706
|
+
const ac = Ns, Cs = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
1707
|
+
Ro,
|
|
1708
|
+
{
|
|
1709
|
+
ref: r,
|
|
1710
|
+
className: y(
|
|
1711
|
+
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
1712
|
+
e
|
|
1713
|
+
),
|
|
1714
|
+
...o
|
|
1715
|
+
}
|
|
1716
|
+
));
|
|
1717
|
+
Cs.displayName = Ro.displayName;
|
|
1718
|
+
const Ss = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
1719
|
+
To,
|
|
1720
|
+
{
|
|
1721
|
+
ref: r,
|
|
1722
|
+
className: y(
|
|
1723
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
1724
|
+
e
|
|
1725
|
+
),
|
|
1726
|
+
...o
|
|
1727
|
+
}
|
|
1728
|
+
));
|
|
1729
|
+
Ss.displayName = To.displayName;
|
|
1730
|
+
const Rs = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
1731
|
+
Eo,
|
|
1732
|
+
{
|
|
1733
|
+
ref: r,
|
|
1734
|
+
className: y(
|
|
1735
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1736
|
+
e
|
|
1737
|
+
),
|
|
1738
|
+
...o
|
|
1739
|
+
}
|
|
1740
|
+
));
|
|
1741
|
+
Rs.displayName = Eo.displayName;
|
|
1742
|
+
const Ts = c.forwardRef(
|
|
1743
|
+
({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
1744
|
+
"textarea",
|
|
1745
|
+
{
|
|
1746
|
+
className: y(
|
|
1747
|
+
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1748
|
+
e
|
|
1749
|
+
),
|
|
1750
|
+
ref: r,
|
|
1751
|
+
...o
|
|
1752
|
+
}
|
|
1753
|
+
)
|
|
1754
|
+
);
|
|
1755
|
+
Ts.displayName = "Textarea";
|
|
1756
|
+
var ut = "ToastProvider", [ft, Es, As] = ze("Toast"), [Ao] = X("Toast", [As]), [Ds, Ae] = Ao(ut), Do = (e) => {
|
|
1757
|
+
const {
|
|
1758
|
+
__scopeToast: o,
|
|
1759
|
+
label: r = "Notification",
|
|
1760
|
+
duration: a = 5e3,
|
|
1761
|
+
swipeDirection: n = "right",
|
|
1762
|
+
swipeThreshold: i = 50,
|
|
1763
|
+
children: s
|
|
1764
|
+
} = e, [d, u] = c.useState(null), [m, f] = c.useState(0), l = c.useRef(!1), g = c.useRef(!1);
|
|
1765
|
+
return r.trim() || console.error(
|
|
1766
|
+
`Invalid prop \`label\` supplied to \`${ut}\`. Expected non-empty \`string\`.`
|
|
1767
|
+
), /* @__PURE__ */ t(ft.Provider, { scope: o, children: /* @__PURE__ */ t(
|
|
1768
|
+
Ds,
|
|
1769
|
+
{
|
|
1770
|
+
scope: o,
|
|
1771
|
+
label: r,
|
|
1772
|
+
duration: a,
|
|
1773
|
+
swipeDirection: n,
|
|
1774
|
+
swipeThreshold: i,
|
|
1775
|
+
toastCount: m,
|
|
1776
|
+
viewport: d,
|
|
1777
|
+
onViewportChange: u,
|
|
1778
|
+
onToastAdd: c.useCallback(() => f((h) => h + 1), []),
|
|
1779
|
+
onToastRemove: c.useCallback(() => f((h) => h - 1), []),
|
|
1780
|
+
isFocusedToastEscapeKeyDownRef: l,
|
|
1781
|
+
isClosePausedRef: g,
|
|
1782
|
+
children: s
|
|
1783
|
+
}
|
|
1784
|
+
) });
|
|
1785
|
+
};
|
|
1786
|
+
Do.displayName = ut;
|
|
1787
|
+
var Po = "ToastViewport", Ps = ["F8"], Ve = "toast.viewportPause", Le = "toast.viewportResume", ko = c.forwardRef(
|
|
1788
|
+
(e, o) => {
|
|
1789
|
+
const {
|
|
1790
|
+
__scopeToast: r,
|
|
1791
|
+
hotkey: a = Ps,
|
|
1792
|
+
label: n = "Notifications ({hotkey})",
|
|
1793
|
+
...i
|
|
1794
|
+
} = e, s = Ae(Po, r), d = Es(r), u = c.useRef(null), m = c.useRef(null), f = c.useRef(null), l = c.useRef(null), g = F(o, l, s.onViewportChange), h = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), b = s.toastCount > 0;
|
|
1795
|
+
c.useEffect(() => {
|
|
1796
|
+
const w = (N) => {
|
|
1797
|
+
a.length !== 0 && a.every((C) => N[C] || N.code === C) && l.current?.focus();
|
|
1798
|
+
};
|
|
1799
|
+
return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
|
|
1800
|
+
}, [a]), c.useEffect(() => {
|
|
1801
|
+
const w = u.current, N = l.current;
|
|
1802
|
+
if (b && w && N) {
|
|
1803
|
+
const x = () => {
|
|
1804
|
+
if (!s.isClosePausedRef.current) {
|
|
1805
|
+
const _ = new CustomEvent(Ve);
|
|
1806
|
+
N.dispatchEvent(_), s.isClosePausedRef.current = !0;
|
|
1807
|
+
}
|
|
1808
|
+
}, C = () => {
|
|
1809
|
+
if (s.isClosePausedRef.current) {
|
|
1810
|
+
const _ = new CustomEvent(Le);
|
|
1811
|
+
N.dispatchEvent(_), s.isClosePausedRef.current = !1;
|
|
1812
|
+
}
|
|
1813
|
+
}, S = (_) => {
|
|
1814
|
+
!w.contains(_.relatedTarget) && C();
|
|
1815
|
+
}, T = () => {
|
|
1816
|
+
w.contains(document.activeElement) || C();
|
|
1817
|
+
};
|
|
1818
|
+
return w.addEventListener("focusin", x), w.addEventListener("focusout", S), w.addEventListener("pointermove", x), w.addEventListener("pointerleave", T), window.addEventListener("blur", x), window.addEventListener("focus", C), () => {
|
|
1819
|
+
w.removeEventListener("focusin", x), w.removeEventListener("focusout", S), w.removeEventListener("pointermove", x), w.removeEventListener("pointerleave", T), window.removeEventListener("blur", x), window.removeEventListener("focus", C);
|
|
1820
|
+
};
|
|
1821
|
+
}
|
|
1822
|
+
}, [b, s.isClosePausedRef]);
|
|
1823
|
+
const v = c.useCallback(
|
|
1824
|
+
({ tabbingDirection: w }) => {
|
|
1825
|
+
const x = d().map((C) => {
|
|
1826
|
+
const S = C.ref.current, T = [S, ...zs(S)];
|
|
1827
|
+
return w === "forwards" ? T : T.reverse();
|
|
1828
|
+
});
|
|
1829
|
+
return (w === "forwards" ? x.reverse() : x).flat();
|
|
1830
|
+
},
|
|
1831
|
+
[d]
|
|
1832
|
+
);
|
|
1833
|
+
return c.useEffect(() => {
|
|
1834
|
+
const w = l.current;
|
|
1835
|
+
if (w) {
|
|
1836
|
+
const N = (x) => {
|
|
1837
|
+
const C = x.altKey || x.ctrlKey || x.metaKey;
|
|
1838
|
+
if (x.key === "Tab" && !C) {
|
|
1839
|
+
const T = document.activeElement, _ = x.shiftKey;
|
|
1840
|
+
if (x.target === w && _) {
|
|
1841
|
+
m.current?.focus();
|
|
1842
|
+
return;
|
|
1843
|
+
}
|
|
1844
|
+
const I = v({ tabbingDirection: _ ? "backwards" : "forwards" }), M = I.findIndex((D) => D === T);
|
|
1845
|
+
_e(I.slice(M + 1)) ? x.preventDefault() : _ ? m.current?.focus() : f.current?.focus();
|
|
1846
|
+
}
|
|
1847
|
+
};
|
|
1848
|
+
return w.addEventListener("keydown", N), () => w.removeEventListener("keydown", N);
|
|
1849
|
+
}
|
|
1850
|
+
}, [d, v]), /* @__PURE__ */ p(
|
|
1851
|
+
la,
|
|
1852
|
+
{
|
|
1853
|
+
ref: u,
|
|
1854
|
+
role: "region",
|
|
1855
|
+
"aria-label": n.replace("{hotkey}", h),
|
|
1856
|
+
tabIndex: -1,
|
|
1857
|
+
style: { pointerEvents: b ? void 0 : "none" },
|
|
1858
|
+
children: [
|
|
1859
|
+
b && /* @__PURE__ */ t(
|
|
1860
|
+
Be,
|
|
1861
|
+
{
|
|
1862
|
+
ref: m,
|
|
1863
|
+
onFocusFromOutsideViewport: () => {
|
|
1864
|
+
const w = v({
|
|
1865
|
+
tabbingDirection: "forwards"
|
|
1866
|
+
});
|
|
1867
|
+
_e(w);
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
),
|
|
1871
|
+
/* @__PURE__ */ t(ft.Slot, { scope: r, children: /* @__PURE__ */ t(k.ol, { tabIndex: -1, ...i, ref: g }) }),
|
|
1872
|
+
b && /* @__PURE__ */ t(
|
|
1873
|
+
Be,
|
|
1874
|
+
{
|
|
1875
|
+
ref: f,
|
|
1876
|
+
onFocusFromOutsideViewport: () => {
|
|
1877
|
+
const w = v({
|
|
1878
|
+
tabbingDirection: "backwards"
|
|
1879
|
+
});
|
|
1880
|
+
_e(w);
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
)
|
|
1884
|
+
]
|
|
1885
|
+
}
|
|
1886
|
+
);
|
|
1887
|
+
}
|
|
1888
|
+
);
|
|
1889
|
+
ko.displayName = Po;
|
|
1890
|
+
var _o = "ToastFocusProxy", Be = c.forwardRef(
|
|
1891
|
+
(e, o) => {
|
|
1892
|
+
const { __scopeToast: r, onFocusFromOutsideViewport: a, ...n } = e, i = Ae(_o, r);
|
|
1893
|
+
return /* @__PURE__ */ t(
|
|
1894
|
+
_t,
|
|
1895
|
+
{
|
|
1896
|
+
tabIndex: 0,
|
|
1897
|
+
...n,
|
|
1898
|
+
ref: o,
|
|
1899
|
+
style: { position: "fixed" },
|
|
1900
|
+
onFocus: (s) => {
|
|
1901
|
+
const d = s.relatedTarget;
|
|
1902
|
+
!i.viewport?.contains(d) && a();
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
);
|
|
1906
|
+
}
|
|
1907
|
+
);
|
|
1908
|
+
Be.displayName = _o;
|
|
1909
|
+
var ce = "Toast", ks = "toast.swipeStart", _s = "toast.swipeMove", Ms = "toast.swipeCancel", Is = "toast.swipeEnd", Mo = c.forwardRef(
|
|
1910
|
+
(e, o) => {
|
|
1911
|
+
const { forceMount: r, open: a, defaultOpen: n, onOpenChange: i, ...s } = e, [d, u] = Z({
|
|
1912
|
+
prop: a,
|
|
1913
|
+
defaultProp: n ?? !0,
|
|
1914
|
+
onChange: i,
|
|
1915
|
+
caller: ce
|
|
1916
|
+
});
|
|
1917
|
+
return /* @__PURE__ */ t(ge, { present: r || d, children: /* @__PURE__ */ t(
|
|
1918
|
+
Fs,
|
|
1919
|
+
{
|
|
1920
|
+
open: d,
|
|
1921
|
+
...s,
|
|
1922
|
+
ref: o,
|
|
1923
|
+
onClose: () => u(!1),
|
|
1924
|
+
onPause: me(e.onPause),
|
|
1925
|
+
onResume: me(e.onResume),
|
|
1926
|
+
onSwipeStart: P(e.onSwipeStart, (m) => {
|
|
1927
|
+
m.currentTarget.setAttribute("data-swipe", "start");
|
|
1928
|
+
}),
|
|
1929
|
+
onSwipeMove: P(e.onSwipeMove, (m) => {
|
|
1930
|
+
const { x: f, y: l } = m.detail.delta;
|
|
1931
|
+
m.currentTarget.setAttribute("data-swipe", "move"), m.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${f}px`), m.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${l}px`);
|
|
1932
|
+
}),
|
|
1933
|
+
onSwipeCancel: P(e.onSwipeCancel, (m) => {
|
|
1934
|
+
m.currentTarget.setAttribute("data-swipe", "cancel"), m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
|
|
1935
|
+
}),
|
|
1936
|
+
onSwipeEnd: P(e.onSwipeEnd, (m) => {
|
|
1937
|
+
const { x: f, y: l } = m.detail.delta;
|
|
1938
|
+
m.currentTarget.setAttribute("data-swipe", "end"), m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), m.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${f}px`), m.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${l}px`), u(!1);
|
|
1939
|
+
})
|
|
1940
|
+
}
|
|
1941
|
+
) });
|
|
1942
|
+
}
|
|
1943
|
+
);
|
|
1944
|
+
Mo.displayName = ce;
|
|
1945
|
+
var [$s, Os] = Ao(ce, {
|
|
1946
|
+
onClose() {
|
|
1947
|
+
}
|
|
1948
|
+
}), Fs = c.forwardRef(
|
|
1949
|
+
(e, o) => {
|
|
1950
|
+
const {
|
|
1951
|
+
__scopeToast: r,
|
|
1952
|
+
type: a = "foreground",
|
|
1953
|
+
duration: n,
|
|
1954
|
+
open: i,
|
|
1955
|
+
onClose: s,
|
|
1956
|
+
onEscapeKeyDown: d,
|
|
1957
|
+
onPause: u,
|
|
1958
|
+
onResume: m,
|
|
1959
|
+
onSwipeStart: f,
|
|
1960
|
+
onSwipeMove: l,
|
|
1961
|
+
onSwipeCancel: g,
|
|
1962
|
+
onSwipeEnd: h,
|
|
1963
|
+
...b
|
|
1964
|
+
} = e, v = Ae(ce, r), [w, N] = c.useState(null), x = F(o, (E) => N(E)), C = c.useRef(null), S = c.useRef(null), T = n || v.duration, _ = c.useRef(0), A = c.useRef(T), $ = c.useRef(0), { onToastAdd: I, onToastRemove: M } = v, D = me(() => {
|
|
1965
|
+
w?.contains(document.activeElement) && v.viewport?.focus(), s();
|
|
1966
|
+
}), V = c.useCallback(
|
|
1967
|
+
(E) => {
|
|
1968
|
+
!E || E === 1 / 0 || (window.clearTimeout($.current), _.current = (/* @__PURE__ */ new Date()).getTime(), $.current = window.setTimeout(D, E));
|
|
1969
|
+
},
|
|
1970
|
+
[D]
|
|
1971
|
+
);
|
|
1972
|
+
c.useEffect(() => {
|
|
1973
|
+
const E = v.viewport;
|
|
1974
|
+
if (E) {
|
|
1975
|
+
const B = () => {
|
|
1976
|
+
V(A.current), m?.();
|
|
1977
|
+
}, L = () => {
|
|
1978
|
+
const z = (/* @__PURE__ */ new Date()).getTime() - _.current;
|
|
1979
|
+
A.current = A.current - z, window.clearTimeout($.current), u?.();
|
|
1980
|
+
};
|
|
1981
|
+
return E.addEventListener(Ve, L), E.addEventListener(Le, B), () => {
|
|
1982
|
+
E.removeEventListener(Ve, L), E.removeEventListener(Le, B);
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
}, [v.viewport, T, u, m, V]), c.useEffect(() => {
|
|
1986
|
+
i && !v.isClosePausedRef.current && V(T);
|
|
1987
|
+
}, [i, T, v.isClosePausedRef, V]), c.useEffect(() => (I(), () => M()), [I, M]);
|
|
1988
|
+
const q = c.useMemo(() => w ? Bo(w) : null, [w]);
|
|
1989
|
+
return v.viewport ? /* @__PURE__ */ p(ie, { children: [
|
|
1990
|
+
q && /* @__PURE__ */ t(
|
|
1991
|
+
Vs,
|
|
1992
|
+
{
|
|
1993
|
+
__scopeToast: r,
|
|
1994
|
+
role: "status",
|
|
1995
|
+
"aria-live": a === "foreground" ? "assertive" : "polite",
|
|
1996
|
+
children: q
|
|
1997
|
+
}
|
|
1998
|
+
),
|
|
1999
|
+
/* @__PURE__ */ t($s, { scope: r, onClose: D, children: pa.createPortal(
|
|
2000
|
+
/* @__PURE__ */ t(ft.ItemSlot, { scope: r, children: /* @__PURE__ */ t(
|
|
2001
|
+
da,
|
|
2002
|
+
{
|
|
2003
|
+
asChild: !0,
|
|
2004
|
+
onEscapeKeyDown: P(d, () => {
|
|
2005
|
+
v.isFocusedToastEscapeKeyDownRef.current || D(), v.isFocusedToastEscapeKeyDownRef.current = !1;
|
|
2006
|
+
}),
|
|
2007
|
+
children: /* @__PURE__ */ t(
|
|
2008
|
+
k.li,
|
|
2009
|
+
{
|
|
2010
|
+
tabIndex: 0,
|
|
2011
|
+
"data-state": i ? "open" : "closed",
|
|
2012
|
+
"data-swipe-direction": v.swipeDirection,
|
|
2013
|
+
...b,
|
|
2014
|
+
ref: x,
|
|
2015
|
+
style: { userSelect: "none", touchAction: "none", ...e.style },
|
|
2016
|
+
onKeyDown: P(e.onKeyDown, (E) => {
|
|
2017
|
+
E.key === "Escape" && (d?.(E.nativeEvent), E.nativeEvent.defaultPrevented || (v.isFocusedToastEscapeKeyDownRef.current = !0, D()));
|
|
2018
|
+
}),
|
|
2019
|
+
onPointerDown: P(e.onPointerDown, (E) => {
|
|
2020
|
+
E.button === 0 && (C.current = { x: E.clientX, y: E.clientY });
|
|
2021
|
+
}),
|
|
2022
|
+
onPointerMove: P(e.onPointerMove, (E) => {
|
|
2023
|
+
if (!C.current) return;
|
|
2024
|
+
const B = E.clientX - C.current.x, L = E.clientY - C.current.y, z = !!S.current, K = ["left", "right"].includes(v.swipeDirection), Q = ["left", "up"].includes(v.swipeDirection) ? Math.min : Math.max, oa = K ? Q(0, B) : 0, aa = K ? 0 : Q(0, L), Pe = E.pointerType === "touch" ? 10 : 2, le = { x: oa, y: aa }, gt = { originalEvent: E, delta: le };
|
|
2025
|
+
z ? (S.current = le, ue(_s, l, gt, {
|
|
2026
|
+
discrete: !1
|
|
2027
|
+
})) : xt(le, v.swipeDirection, Pe) ? (S.current = le, ue(ks, f, gt, {
|
|
2028
|
+
discrete: !1
|
|
2029
|
+
}), E.target.setPointerCapture(E.pointerId)) : (Math.abs(B) > Pe || Math.abs(L) > Pe) && (C.current = null);
|
|
2030
|
+
}),
|
|
2031
|
+
onPointerUp: P(e.onPointerUp, (E) => {
|
|
2032
|
+
const B = S.current, L = E.target;
|
|
2033
|
+
if (L.hasPointerCapture(E.pointerId) && L.releasePointerCapture(E.pointerId), S.current = null, C.current = null, B) {
|
|
2034
|
+
const z = E.currentTarget, K = { originalEvent: E, delta: B };
|
|
2035
|
+
xt(B, v.swipeDirection, v.swipeThreshold) ? ue(Is, h, K, {
|
|
2036
|
+
discrete: !0
|
|
2037
|
+
}) : ue(
|
|
2038
|
+
Ms,
|
|
2039
|
+
g,
|
|
2040
|
+
K,
|
|
2041
|
+
{
|
|
2042
|
+
discrete: !0
|
|
2043
|
+
}
|
|
2044
|
+
), z.addEventListener("click", (Q) => Q.preventDefault(), {
|
|
2045
|
+
once: !0
|
|
2046
|
+
});
|
|
2047
|
+
}
|
|
2048
|
+
})
|
|
2049
|
+
}
|
|
2050
|
+
)
|
|
2051
|
+
}
|
|
2052
|
+
) }),
|
|
2053
|
+
v.viewport
|
|
2054
|
+
) })
|
|
2055
|
+
] }) : null;
|
|
2056
|
+
}
|
|
2057
|
+
), Vs = (e) => {
|
|
2058
|
+
const { __scopeToast: o, children: r, ...a } = e, n = Ae(ce, o), [i, s] = c.useState(!1), [d, u] = c.useState(!1);
|
|
2059
|
+
return Ks(() => s(!0)), c.useEffect(() => {
|
|
2060
|
+
const m = window.setTimeout(() => u(!0), 1e3);
|
|
2061
|
+
return () => window.clearTimeout(m);
|
|
2062
|
+
}, []), d ? null : /* @__PURE__ */ t(ua, { asChild: !0, children: /* @__PURE__ */ t(_t, { ...a, children: i && /* @__PURE__ */ p(ie, { children: [
|
|
2063
|
+
n.label,
|
|
2064
|
+
" ",
|
|
2065
|
+
r
|
|
2066
|
+
] }) }) });
|
|
2067
|
+
}, Ls = "ToastTitle", Io = c.forwardRef(
|
|
2068
|
+
(e, o) => {
|
|
2069
|
+
const { __scopeToast: r, ...a } = e;
|
|
2070
|
+
return /* @__PURE__ */ t(k.div, { ...a, ref: o });
|
|
2071
|
+
}
|
|
2072
|
+
);
|
|
2073
|
+
Io.displayName = Ls;
|
|
2074
|
+
var Bs = "ToastDescription", $o = c.forwardRef(
|
|
2075
|
+
(e, o) => {
|
|
2076
|
+
const { __scopeToast: r, ...a } = e;
|
|
2077
|
+
return /* @__PURE__ */ t(k.div, { ...a, ref: o });
|
|
2078
|
+
}
|
|
2079
|
+
);
|
|
2080
|
+
$o.displayName = Bs;
|
|
2081
|
+
var Oo = "ToastAction", Fo = c.forwardRef(
|
|
2082
|
+
(e, o) => {
|
|
2083
|
+
const { altText: r, ...a } = e;
|
|
2084
|
+
return r.trim() ? /* @__PURE__ */ t(Lo, { altText: r, asChild: !0, children: /* @__PURE__ */ t(mt, { ...a, ref: o }) }) : (console.error(
|
|
2085
|
+
`Invalid prop \`altText\` supplied to \`${Oo}\`. Expected non-empty \`string\`.`
|
|
2086
|
+
), null);
|
|
2087
|
+
}
|
|
2088
|
+
);
|
|
2089
|
+
Fo.displayName = Oo;
|
|
2090
|
+
var Vo = "ToastClose", mt = c.forwardRef(
|
|
2091
|
+
(e, o) => {
|
|
2092
|
+
const { __scopeToast: r, ...a } = e, n = Os(Vo, r);
|
|
2093
|
+
return /* @__PURE__ */ t(Lo, { asChild: !0, children: /* @__PURE__ */ t(
|
|
2094
|
+
k.button,
|
|
2095
|
+
{
|
|
2096
|
+
type: "button",
|
|
2097
|
+
...a,
|
|
2098
|
+
ref: o,
|
|
2099
|
+
onClick: P(e.onClick, n.onClose)
|
|
2100
|
+
}
|
|
2101
|
+
) });
|
|
2102
|
+
}
|
|
2103
|
+
);
|
|
2104
|
+
mt.displayName = Vo;
|
|
2105
|
+
var Lo = c.forwardRef((e, o) => {
|
|
2106
|
+
const { __scopeToast: r, altText: a, ...n } = e;
|
|
2107
|
+
return /* @__PURE__ */ t(
|
|
2108
|
+
k.div,
|
|
2109
|
+
{
|
|
2110
|
+
"data-radix-toast-announce-exclude": "",
|
|
2111
|
+
"data-radix-toast-announce-alt": a || void 0,
|
|
2112
|
+
...n,
|
|
2113
|
+
ref: o
|
|
2114
|
+
}
|
|
2115
|
+
);
|
|
2116
|
+
});
|
|
2117
|
+
function Bo(e) {
|
|
2118
|
+
const o = [];
|
|
2119
|
+
return Array.from(e.childNodes).forEach((a) => {
|
|
2120
|
+
if (a.nodeType === a.TEXT_NODE && a.textContent && o.push(a.textContent), Hs(a)) {
|
|
2121
|
+
const n = a.ariaHidden || a.hidden || a.style.display === "none", i = a.dataset.radixToastAnnounceExclude === "";
|
|
2122
|
+
if (!n)
|
|
2123
|
+
if (i) {
|
|
2124
|
+
const s = a.dataset.radixToastAnnounceAlt;
|
|
2125
|
+
s && o.push(s);
|
|
2126
|
+
} else
|
|
2127
|
+
o.push(...Bo(a));
|
|
2128
|
+
}
|
|
2129
|
+
}), o;
|
|
2130
|
+
}
|
|
2131
|
+
function ue(e, o, r, { discrete: a }) {
|
|
2132
|
+
const n = r.originalEvent.currentTarget, i = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: r });
|
|
2133
|
+
o && n.addEventListener(e, o, { once: !0 }), a ? na(n, i) : n.dispatchEvent(i);
|
|
2134
|
+
}
|
|
2135
|
+
var xt = (e, o, r = 0) => {
|
|
2136
|
+
const a = Math.abs(e.x), n = Math.abs(e.y), i = a > n;
|
|
2137
|
+
return o === "left" || o === "right" ? i && a > r : !i && n > r;
|
|
2138
|
+
};
|
|
2139
|
+
function Ks(e = () => {
|
|
2140
|
+
}) {
|
|
2141
|
+
const o = me(e);
|
|
2142
|
+
Ct(() => {
|
|
2143
|
+
let r = 0, a = 0;
|
|
2144
|
+
return r = window.requestAnimationFrame(() => a = window.requestAnimationFrame(o)), () => {
|
|
2145
|
+
window.cancelAnimationFrame(r), window.cancelAnimationFrame(a);
|
|
2146
|
+
};
|
|
2147
|
+
}, [o]);
|
|
2148
|
+
}
|
|
2149
|
+
function Hs(e) {
|
|
2150
|
+
return e.nodeType === e.ELEMENT_NODE;
|
|
2151
|
+
}
|
|
2152
|
+
function zs(e) {
|
|
2153
|
+
const o = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
2154
|
+
acceptNode: (a) => {
|
|
2155
|
+
const n = a.tagName === "INPUT" && a.type === "hidden";
|
|
2156
|
+
return a.disabled || a.hidden || n ? NodeFilter.FILTER_SKIP : a.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
2157
|
+
}
|
|
2158
|
+
});
|
|
2159
|
+
for (; r.nextNode(); ) o.push(r.currentNode);
|
|
2160
|
+
return o;
|
|
2161
|
+
}
|
|
2162
|
+
function _e(e) {
|
|
2163
|
+
const o = document.activeElement;
|
|
2164
|
+
return e.some((r) => r === o ? !0 : (r.focus(), document.activeElement !== o));
|
|
2165
|
+
}
|
|
2166
|
+
var js = Do, Ko = ko, Ho = Mo, zo = Io, jo = $o, Go = Fo, Wo = mt;
|
|
2167
|
+
const Gs = js, Uo = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
2168
|
+
Ko,
|
|
2169
|
+
{
|
|
2170
|
+
ref: r,
|
|
2171
|
+
className: y(
|
|
2172
|
+
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
2173
|
+
e
|
|
2174
|
+
),
|
|
2175
|
+
...o
|
|
2176
|
+
}
|
|
2177
|
+
));
|
|
2178
|
+
Uo.displayName = Ko.displayName;
|
|
2179
|
+
const Ws = Ke(
|
|
2180
|
+
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
2181
|
+
{
|
|
2182
|
+
variants: {
|
|
2183
|
+
variant: {
|
|
2184
|
+
default: "border bg-background text-foreground",
|
|
2185
|
+
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground",
|
|
2186
|
+
success: "border-success bg-success text-success-foreground",
|
|
2187
|
+
warning: "border-warning bg-warning text-warning-foreground"
|
|
2188
|
+
}
|
|
2189
|
+
},
|
|
2190
|
+
defaultVariants: {
|
|
2191
|
+
variant: "default"
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
), qo = c.forwardRef(({ className: e, variant: o, ...r }, a) => /* @__PURE__ */ t(
|
|
2195
|
+
Ho,
|
|
2196
|
+
{
|
|
2197
|
+
ref: a,
|
|
2198
|
+
className: y(Ws({ variant: o }), e),
|
|
2199
|
+
...r
|
|
2200
|
+
}
|
|
2201
|
+
));
|
|
2202
|
+
qo.displayName = Ho.displayName;
|
|
2203
|
+
const Us = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
2204
|
+
Go,
|
|
2205
|
+
{
|
|
2206
|
+
ref: r,
|
|
2207
|
+
className: y(
|
|
2208
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
|
|
2209
|
+
e
|
|
2210
|
+
),
|
|
2211
|
+
...o
|
|
2212
|
+
}
|
|
2213
|
+
));
|
|
2214
|
+
Us.displayName = Go.displayName;
|
|
2215
|
+
const Yo = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
2216
|
+
Wo,
|
|
2217
|
+
{
|
|
2218
|
+
ref: r,
|
|
2219
|
+
className: y(
|
|
2220
|
+
"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
|
|
2221
|
+
e
|
|
2222
|
+
),
|
|
2223
|
+
"toast-close": "",
|
|
2224
|
+
...o,
|
|
2225
|
+
children: /* @__PURE__ */ t(sa, { className: "h-4 w-4" })
|
|
2226
|
+
}
|
|
2227
|
+
));
|
|
2228
|
+
Yo.displayName = Wo.displayName;
|
|
2229
|
+
const Xo = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(zo, { ref: r, className: y("text-sm font-semibold", e), ...o }));
|
|
2230
|
+
Xo.displayName = zo.displayName;
|
|
2231
|
+
const Jo = c.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
2232
|
+
jo,
|
|
2233
|
+
{
|
|
2234
|
+
ref: r,
|
|
2235
|
+
className: y("text-sm opacity-90", e),
|
|
2236
|
+
...o
|
|
2237
|
+
}
|
|
2238
|
+
));
|
|
2239
|
+
Jo.displayName = jo.displayName;
|
|
2240
|
+
function nc() {
|
|
2241
|
+
const { toasts: e } = ma();
|
|
2242
|
+
return /* @__PURE__ */ p(Gs, { children: [
|
|
2243
|
+
e.map(function({ id: o, title: r, description: a, action: n, ...i }) {
|
|
2244
|
+
return /* @__PURE__ */ p(qo, { ...i, children: [
|
|
2245
|
+
/* @__PURE__ */ p("div", { className: "grid gap-1", children: [
|
|
2246
|
+
r && /* @__PURE__ */ t(Xo, { children: r }),
|
|
2247
|
+
a && /* @__PURE__ */ t(Jo, { children: a })
|
|
2248
|
+
] }),
|
|
2249
|
+
n,
|
|
2250
|
+
/* @__PURE__ */ t(Yo, {})
|
|
2251
|
+
] }, o);
|
|
2252
|
+
}),
|
|
2253
|
+
/* @__PURE__ */ t(Uo, {})
|
|
2254
|
+
] });
|
|
2255
|
+
}
|
|
2256
|
+
function qs(e) {
|
|
2257
|
+
return Pa(e, Date.now());
|
|
2258
|
+
}
|
|
2259
|
+
function Ys(e) {
|
|
2260
|
+
return (o) => {
|
|
2261
|
+
const r = Math.trunc, a = r(o);
|
|
2262
|
+
return a === 0 ? 0 : a;
|
|
2263
|
+
};
|
|
2264
|
+
}
|
|
2265
|
+
function Xs(e, o) {
|
|
2266
|
+
return +U(e) - +U(o);
|
|
2267
|
+
}
|
|
2268
|
+
function Zo(e, o, r) {
|
|
2269
|
+
const a = Xs(e, o) / ka;
|
|
2270
|
+
return Ys()(a);
|
|
2271
|
+
}
|
|
2272
|
+
function pt(e) {
|
|
2273
|
+
const o = U(e);
|
|
2274
|
+
return o.setHours(23, 59, 59, 999), o;
|
|
2275
|
+
}
|
|
2276
|
+
function Qo(e) {
|
|
2277
|
+
return U(e).getHours();
|
|
2278
|
+
}
|
|
2279
|
+
function ea(e) {
|
|
2280
|
+
return U(e).getMinutes();
|
|
2281
|
+
}
|
|
2282
|
+
function De(e) {
|
|
2283
|
+
return Y(e, qs(e));
|
|
2284
|
+
}
|
|
2285
|
+
function ht(e, o) {
|
|
2286
|
+
const r = +U(e), [a, n] = [
|
|
2287
|
+
+U(o.start),
|
|
2288
|
+
+U(o.end)
|
|
2289
|
+
].sort((i, s) => i - s);
|
|
2290
|
+
return r >= a && r <= n;
|
|
2291
|
+
}
|
|
2292
|
+
function he(e, o) {
|
|
2293
|
+
const r = U(e);
|
|
2294
|
+
return r.setHours(o), r;
|
|
2295
|
+
}
|
|
2296
|
+
function ta(e, o) {
|
|
2297
|
+
const r = U(e);
|
|
2298
|
+
return r.setMinutes(o), r;
|
|
2299
|
+
}
|
|
2300
|
+
function ra(e, o) {
|
|
2301
|
+
return qe(e, -1);
|
|
2302
|
+
}
|
|
2303
|
+
function Js(e, o) {
|
|
2304
|
+
return $t(e, -1);
|
|
2305
|
+
}
|
|
2306
|
+
const Zs = {
|
|
2307
|
+
default: {
|
|
2308
|
+
icon: vt,
|
|
2309
|
+
iconColor: "text-foreground",
|
|
2310
|
+
buttonVariant: "default"
|
|
2311
|
+
},
|
|
2312
|
+
destructive: {
|
|
2313
|
+
icon: Aa,
|
|
2314
|
+
iconColor: "text-destructive",
|
|
2315
|
+
buttonVariant: "destructive"
|
|
2316
|
+
},
|
|
2317
|
+
warning: {
|
|
2318
|
+
icon: Ea,
|
|
2319
|
+
iconColor: "text-warning",
|
|
2320
|
+
buttonVariant: "default"
|
|
2321
|
+
},
|
|
2322
|
+
info: {
|
|
2323
|
+
icon: vt,
|
|
2324
|
+
iconColor: "text-info",
|
|
2325
|
+
buttonVariant: "default"
|
|
2326
|
+
},
|
|
2327
|
+
success: {
|
|
2328
|
+
icon: Ta,
|
|
2329
|
+
iconColor: "text-success",
|
|
2330
|
+
buttonVariant: "default"
|
|
2331
|
+
}
|
|
2332
|
+
}, Qs = c.forwardRef(
|
|
2333
|
+
({
|
|
2334
|
+
open: e,
|
|
2335
|
+
onOpenChange: o,
|
|
2336
|
+
title: r,
|
|
2337
|
+
description: a,
|
|
2338
|
+
confirmLabel: n = "Confirm",
|
|
2339
|
+
cancelLabel: i = "Cancel",
|
|
2340
|
+
onConfirm: s,
|
|
2341
|
+
onCancel: d,
|
|
2342
|
+
variant: u = "default",
|
|
2343
|
+
loading: m = !1,
|
|
2344
|
+
confirmationText: f,
|
|
2345
|
+
confirmationPlaceholder: l = "Type to confirm"
|
|
2346
|
+
}, g) => {
|
|
2347
|
+
const [h, b] = c.useState(""), v = Zs[u], w = v.icon, N = f && h !== f || m, x = () => {
|
|
2348
|
+
s(), b("");
|
|
2349
|
+
}, C = () => {
|
|
2350
|
+
d?.(), b(""), o(!1);
|
|
2351
|
+
};
|
|
2352
|
+
return /* @__PURE__ */ t(kn, { open: e, onOpenChange: o, children: /* @__PURE__ */ p(Tr, { ref: g, children: [
|
|
2353
|
+
/* @__PURE__ */ t(Er, { children: /* @__PURE__ */ p("div", { className: "flex items-start gap-4", children: [
|
|
2354
|
+
/* @__PURE__ */ t(
|
|
2355
|
+
"div",
|
|
2356
|
+
{
|
|
2357
|
+
className: y(
|
|
2358
|
+
"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full",
|
|
2359
|
+
u === "destructive" && "bg-destructive/10",
|
|
2360
|
+
u === "warning" && "bg-warning/10",
|
|
2361
|
+
u === "info" && "bg-info/10",
|
|
2362
|
+
u === "success" && "bg-success/10",
|
|
2363
|
+
u === "default" && "bg-muted"
|
|
2364
|
+
),
|
|
2365
|
+
children: /* @__PURE__ */ t(w, { className: y("h-5 w-5", v.iconColor) })
|
|
2366
|
+
}
|
|
2367
|
+
),
|
|
2368
|
+
/* @__PURE__ */ p("div", { className: "flex-1", children: [
|
|
2369
|
+
/* @__PURE__ */ t(Dr, { children: r }),
|
|
2370
|
+
/* @__PURE__ */ t(Pr, { className: "mt-2", children: a })
|
|
2371
|
+
] })
|
|
2372
|
+
] }) }),
|
|
2373
|
+
f && /* @__PURE__ */ p("div", { className: "mt-4 space-y-2", children: [
|
|
2374
|
+
/* @__PURE__ */ p(Ca, { htmlFor: "confirmation-input", className: "text-sm", children: [
|
|
2375
|
+
"Type ",
|
|
2376
|
+
/* @__PURE__ */ t("span", { className: "font-mono font-bold", children: f }),
|
|
2377
|
+
" to confirm"
|
|
2378
|
+
] }),
|
|
2379
|
+
/* @__PURE__ */ t(
|
|
2380
|
+
fa,
|
|
2381
|
+
{
|
|
2382
|
+
id: "confirmation-input",
|
|
2383
|
+
value: h,
|
|
2384
|
+
onChange: (S) => b(S.target.value),
|
|
2385
|
+
placeholder: l,
|
|
2386
|
+
autoComplete: "off"
|
|
2387
|
+
}
|
|
2388
|
+
)
|
|
2389
|
+
] }),
|
|
2390
|
+
/* @__PURE__ */ p(Ar, { className: "mt-4", children: [
|
|
2391
|
+
/* @__PURE__ */ t(_r, { onClick: C, disabled: m, children: i }),
|
|
2392
|
+
/* @__PURE__ */ t(
|
|
2393
|
+
kr,
|
|
2394
|
+
{
|
|
2395
|
+
onClick: x,
|
|
2396
|
+
disabled: N,
|
|
2397
|
+
className: y(
|
|
2398
|
+
u === "destructive" && "bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
|
2399
|
+
),
|
|
2400
|
+
children: m ? "Loading..." : n
|
|
2401
|
+
}
|
|
2402
|
+
)
|
|
2403
|
+
] })
|
|
2404
|
+
] }) });
|
|
2405
|
+
}
|
|
2406
|
+
);
|
|
2407
|
+
Qs.displayName = "ConfirmationDialog";
|
|
2408
|
+
const Me = {
|
|
2409
|
+
sm: "h-6 w-6 text-[10px]",
|
|
2410
|
+
md: "h-8 w-8 text-xs",
|
|
2411
|
+
lg: "h-10 w-10 text-sm"
|
|
2412
|
+
}, ei = c.forwardRef(
|
|
2413
|
+
({
|
|
2414
|
+
className: e,
|
|
2415
|
+
avatars: o,
|
|
2416
|
+
max: r = 4,
|
|
2417
|
+
size: a = "md",
|
|
2418
|
+
showTooltip: n = !0,
|
|
2419
|
+
onMoreClick: i,
|
|
2420
|
+
...s
|
|
2421
|
+
}, d) => {
|
|
2422
|
+
const u = o.slice(0, r), m = o.length - r, f = m > 0, l = (h) => h.split(" ").map((b) => b[0]).join("").toUpperCase().slice(0, 2), g = (h, b) => {
|
|
2423
|
+
const v = /* @__PURE__ */ p(
|
|
2424
|
+
Vt,
|
|
2425
|
+
{
|
|
2426
|
+
className: y(
|
|
2427
|
+
Me[a],
|
|
2428
|
+
"border-2 border-background",
|
|
2429
|
+
b > 0 && "-ml-2"
|
|
2430
|
+
),
|
|
2431
|
+
children: [
|
|
2432
|
+
h.image && /* @__PURE__ */ t(Lt, { src: h.image, alt: h.name }),
|
|
2433
|
+
/* @__PURE__ */ t(Bt, { className: y(Me[a], "font-medium"), children: l(h.name) })
|
|
2434
|
+
]
|
|
2435
|
+
},
|
|
2436
|
+
b
|
|
2437
|
+
);
|
|
2438
|
+
return h.href ? /* @__PURE__ */ t("a", { href: h.href, className: "focus:outline-none focus:ring-2 focus:ring-ring rounded-full", children: n ? /* @__PURE__ */ p(ae, { children: [
|
|
2439
|
+
/* @__PURE__ */ t(ne, { asChild: !0, children: v }),
|
|
2440
|
+
/* @__PURE__ */ t(se, { children: /* @__PURE__ */ t("p", { children: h.name }) })
|
|
2441
|
+
] }) : v }, b) : n ? /* @__PURE__ */ p(ae, { children: [
|
|
2442
|
+
/* @__PURE__ */ t(ne, { asChild: !0, children: v }),
|
|
2443
|
+
/* @__PURE__ */ t(se, { children: /* @__PURE__ */ t("p", { children: h.name }) })
|
|
2444
|
+
] }, b) : v;
|
|
2445
|
+
};
|
|
2446
|
+
return /* @__PURE__ */ t(We, { children: /* @__PURE__ */ p("div", { ref: d, className: y("flex items-center", e), ...s, children: [
|
|
2447
|
+
u.map((h, b) => g(h, b)),
|
|
2448
|
+
f && /* @__PURE__ */ p(ae, { children: [
|
|
2449
|
+
/* @__PURE__ */ t(ne, { asChild: !0, children: /* @__PURE__ */ p(
|
|
2450
|
+
"button",
|
|
2451
|
+
{
|
|
2452
|
+
onClick: i,
|
|
2453
|
+
className: y(
|
|
2454
|
+
Me[a],
|
|
2455
|
+
"relative -ml-2 flex items-center justify-center rounded-full border-2 border-background bg-muted font-medium text-muted-foreground hover:bg-muted/80",
|
|
2456
|
+
i && "cursor-pointer"
|
|
2457
|
+
),
|
|
2458
|
+
children: [
|
|
2459
|
+
"+",
|
|
2460
|
+
m
|
|
2461
|
+
]
|
|
2462
|
+
}
|
|
2463
|
+
) }),
|
|
2464
|
+
/* @__PURE__ */ t(se, { children: /* @__PURE__ */ t("div", { className: "space-y-1", children: o.slice(r).map((h, b) => /* @__PURE__ */ t("p", { children: h.name }, b)) }) })
|
|
2465
|
+
] })
|
|
2466
|
+
] }) });
|
|
2467
|
+
}
|
|
2468
|
+
);
|
|
2469
|
+
ei.displayName = "AvatarGroup";
|
|
2470
|
+
const ti = {
|
|
2471
|
+
sm: "h-8 w-8",
|
|
2472
|
+
md: "h-10 w-10",
|
|
2473
|
+
lg: "h-12 w-12",
|
|
2474
|
+
xl: "h-16 w-16"
|
|
2475
|
+
}, ri = {
|
|
2476
|
+
sm: "h-2.5 w-2.5",
|
|
2477
|
+
md: "h-3 w-3",
|
|
2478
|
+
lg: "h-3.5 w-3.5",
|
|
2479
|
+
xl: "h-4 w-4"
|
|
2480
|
+
}, oi = {
|
|
2481
|
+
online: "bg-success",
|
|
2482
|
+
offline: "bg-muted-foreground",
|
|
2483
|
+
away: "bg-warning",
|
|
2484
|
+
busy: "bg-destructive",
|
|
2485
|
+
dnd: "bg-destructive"
|
|
2486
|
+
}, ai = {
|
|
2487
|
+
"bottom-right": "bottom-0 right-0",
|
|
2488
|
+
"bottom-left": "bottom-0 left-0",
|
|
2489
|
+
"top-right": "top-0 right-0",
|
|
2490
|
+
"top-left": "top-0 left-0"
|
|
2491
|
+
}, ni = c.forwardRef(
|
|
2492
|
+
({
|
|
2493
|
+
className: e,
|
|
2494
|
+
name: o,
|
|
2495
|
+
image: r,
|
|
2496
|
+
status: a = "offline",
|
|
2497
|
+
showStatus: n = !0,
|
|
2498
|
+
size: i = "md",
|
|
2499
|
+
statusPosition: s = "bottom-right",
|
|
2500
|
+
...d
|
|
2501
|
+
}, u) => {
|
|
2502
|
+
const m = (f) => f.split(" ").map((l) => l[0]).join("").toUpperCase().slice(0, 2);
|
|
2503
|
+
return /* @__PURE__ */ p("div", { ref: u, className: y("relative inline-block", e), ...d, children: [
|
|
2504
|
+
/* @__PURE__ */ p(Vt, { className: ti[i], children: [
|
|
2505
|
+
r && /* @__PURE__ */ t(Lt, { src: r, alt: o }),
|
|
2506
|
+
/* @__PURE__ */ t(Bt, { children: m(o) })
|
|
2507
|
+
] }),
|
|
2508
|
+
n && /* @__PURE__ */ t(
|
|
2509
|
+
"span",
|
|
2510
|
+
{
|
|
2511
|
+
className: y(
|
|
2512
|
+
"absolute block rounded-full border-2 border-background",
|
|
2513
|
+
ri[i],
|
|
2514
|
+
oi[a],
|
|
2515
|
+
ai[s]
|
|
2516
|
+
),
|
|
2517
|
+
title: a.charAt(0).toUpperCase() + a.slice(1)
|
|
2518
|
+
}
|
|
2519
|
+
)
|
|
2520
|
+
] });
|
|
2521
|
+
}
|
|
2522
|
+
);
|
|
2523
|
+
ni.displayName = "AvatarWithStatus";
|
|
2524
|
+
const si = c.forwardRef(
|
|
2525
|
+
({
|
|
2526
|
+
className: e,
|
|
2527
|
+
steps: o,
|
|
2528
|
+
currentStep: r,
|
|
2529
|
+
orientation: a = "horizontal",
|
|
2530
|
+
onStepClick: n,
|
|
2531
|
+
allowClickPast: i = !1,
|
|
2532
|
+
showStepNumber: s = !0,
|
|
2533
|
+
...d
|
|
2534
|
+
}, u) => {
|
|
2535
|
+
const m = (f) => {
|
|
2536
|
+
n && (i || f <= r) && n(f);
|
|
2537
|
+
};
|
|
2538
|
+
return /* @__PURE__ */ t(
|
|
2539
|
+
"div",
|
|
2540
|
+
{
|
|
2541
|
+
ref: u,
|
|
2542
|
+
className: y(
|
|
2543
|
+
"flex",
|
|
2544
|
+
a === "horizontal" ? "flex-row items-center" : "flex-col",
|
|
2545
|
+
e
|
|
2546
|
+
),
|
|
2547
|
+
...d,
|
|
2548
|
+
children: o.map((f, l) => {
|
|
2549
|
+
const g = l < r, h = l === r, b = n && (i || l <= r);
|
|
2550
|
+
return /* @__PURE__ */ p(c.Fragment, { children: [
|
|
2551
|
+
/* @__PURE__ */ p(
|
|
2552
|
+
"div",
|
|
2553
|
+
{
|
|
2554
|
+
className: y(
|
|
2555
|
+
"flex",
|
|
2556
|
+
a === "horizontal" ? "flex-col items-center" : "flex-row items-start gap-4",
|
|
2557
|
+
b && "cursor-pointer"
|
|
2558
|
+
),
|
|
2559
|
+
onClick: () => m(l),
|
|
2560
|
+
children: [
|
|
2561
|
+
/* @__PURE__ */ t(
|
|
2562
|
+
"div",
|
|
2563
|
+
{
|
|
2564
|
+
className: y(
|
|
2565
|
+
"flex h-10 w-10 items-center justify-center rounded-full border-2 text-sm font-medium transition-colors",
|
|
2566
|
+
g && "border-primary bg-primary text-primary-foreground",
|
|
2567
|
+
h && "border-primary text-primary",
|
|
2568
|
+
!g && !h && "border-muted-foreground/30 text-muted-foreground"
|
|
2569
|
+
),
|
|
2570
|
+
children: g ? /* @__PURE__ */ t(ia, { className: "h-5 w-5" }) : f.icon ? f.icon : s ? l + 1 : null
|
|
2571
|
+
}
|
|
2572
|
+
),
|
|
2573
|
+
/* @__PURE__ */ p(
|
|
2574
|
+
"div",
|
|
2575
|
+
{
|
|
2576
|
+
className: y(
|
|
2577
|
+
"text-center",
|
|
2578
|
+
a === "horizontal" ? "mt-2" : "flex-1",
|
|
2579
|
+
a === "vertical" && "text-left"
|
|
2580
|
+
),
|
|
2581
|
+
children: [
|
|
2582
|
+
/* @__PURE__ */ p(
|
|
2583
|
+
"p",
|
|
2584
|
+
{
|
|
2585
|
+
className: y(
|
|
2586
|
+
"text-sm font-medium",
|
|
2587
|
+
h && "text-primary",
|
|
2588
|
+
!g && !h && "text-muted-foreground"
|
|
2589
|
+
),
|
|
2590
|
+
children: [
|
|
2591
|
+
f.title,
|
|
2592
|
+
f.optional && /* @__PURE__ */ t("span", { className: "ml-1 text-xs font-normal text-muted-foreground", children: "(Optional)" })
|
|
2593
|
+
]
|
|
2594
|
+
}
|
|
2595
|
+
),
|
|
2596
|
+
f.description && /* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: f.description })
|
|
2597
|
+
]
|
|
2598
|
+
}
|
|
2599
|
+
)
|
|
2600
|
+
]
|
|
2601
|
+
}
|
|
2602
|
+
),
|
|
2603
|
+
l < o.length - 1 && /* @__PURE__ */ t(
|
|
2604
|
+
"div",
|
|
2605
|
+
{
|
|
2606
|
+
className: y(
|
|
2607
|
+
"bg-muted-foreground/30",
|
|
2608
|
+
a === "horizontal" ? "mx-4 h-0.5 flex-1" : "ml-5 mt-2 mb-2 w-0.5 min-h-8",
|
|
2609
|
+
l < r && "bg-primary"
|
|
2610
|
+
)
|
|
2611
|
+
}
|
|
2612
|
+
)
|
|
2613
|
+
] }, f.id);
|
|
2614
|
+
})
|
|
2615
|
+
}
|
|
2616
|
+
);
|
|
2617
|
+
}
|
|
2618
|
+
);
|
|
2619
|
+
si.displayName = "Stepper";
|
|
2620
|
+
const ii = c.forwardRef(
|
|
2621
|
+
({
|
|
2622
|
+
className: e,
|
|
2623
|
+
value: o,
|
|
2624
|
+
onChange: r,
|
|
2625
|
+
minDate: a,
|
|
2626
|
+
maxDate: n,
|
|
2627
|
+
disabledDates: i = [],
|
|
2628
|
+
highlightedDates: s = [],
|
|
2629
|
+
...d
|
|
2630
|
+
}, u) => {
|
|
2631
|
+
const [m, f] = c.useState(o || /* @__PURE__ */ new Date()), l = Ye(m), g = Xe(l), h = ye(l), b = Je(g), v = [];
|
|
2632
|
+
let w = h;
|
|
2633
|
+
for (; w <= b; )
|
|
2634
|
+
v.push(w), w = we(w, 1);
|
|
2635
|
+
const N = (A) => a && A < a || n && A > n ? !0 : i.some(($) => Y($, A)), x = (A) => s.some(($) => Y($, A)), C = () => f(ra(m)), S = () => f(qe(m, 1)), T = (A) => {
|
|
2636
|
+
N(A) || r?.(A);
|
|
2637
|
+
}, _ = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
2638
|
+
return /* @__PURE__ */ p("div", { ref: u, className: y("w-64 rounded-lg border bg-card p-3", e), ...d, children: [
|
|
2639
|
+
/* @__PURE__ */ p("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
2640
|
+
/* @__PURE__ */ t(
|
|
2641
|
+
G,
|
|
2642
|
+
{
|
|
2643
|
+
variant: "ghost",
|
|
2644
|
+
size: "icon",
|
|
2645
|
+
className: "h-7 w-7",
|
|
2646
|
+
onClick: C,
|
|
2647
|
+
children: /* @__PURE__ */ t(Ot, { className: "h-4 w-4" })
|
|
2648
|
+
}
|
|
2649
|
+
),
|
|
2650
|
+
/* @__PURE__ */ t("span", { className: "text-sm font-medium", children: j(m, "MMMM yyyy") }),
|
|
2651
|
+
/* @__PURE__ */ t(
|
|
2652
|
+
G,
|
|
2653
|
+
{
|
|
2654
|
+
variant: "ghost",
|
|
2655
|
+
size: "icon",
|
|
2656
|
+
className: "h-7 w-7",
|
|
2657
|
+
onClick: S,
|
|
2658
|
+
children: /* @__PURE__ */ t(Kt, { className: "h-4 w-4" })
|
|
2659
|
+
}
|
|
2660
|
+
)
|
|
2661
|
+
] }),
|
|
2662
|
+
/* @__PURE__ */ t("div", { className: "mb-1 grid grid-cols-7 gap-0", children: _.map((A) => /* @__PURE__ */ t(
|
|
2663
|
+
"div",
|
|
2664
|
+
{
|
|
2665
|
+
className: "flex h-8 items-center justify-center text-xs font-medium text-muted-foreground",
|
|
2666
|
+
children: A
|
|
2667
|
+
},
|
|
2668
|
+
A
|
|
2669
|
+
)) }),
|
|
2670
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-7 gap-0", children: v.map((A, $) => {
|
|
2671
|
+
const I = Ft(A, m), M = o && Y(A, o), D = De(A), V = N(A), q = x(A);
|
|
2672
|
+
return /* @__PURE__ */ p(
|
|
2673
|
+
"button",
|
|
2674
|
+
{
|
|
2675
|
+
onClick: () => T(A),
|
|
2676
|
+
disabled: V,
|
|
2677
|
+
className: y(
|
|
2678
|
+
"relative flex h-8 w-8 items-center justify-center rounded-md text-sm transition-colors",
|
|
2679
|
+
!I && "text-muted-foreground/40",
|
|
2680
|
+
I && "hover:bg-accent",
|
|
2681
|
+
D && "font-bold",
|
|
2682
|
+
D && !M && "text-primary",
|
|
2683
|
+
M && "bg-primary text-primary-foreground hover:bg-primary",
|
|
2684
|
+
V && "cursor-not-allowed opacity-50",
|
|
2685
|
+
q && !M && "bg-accent"
|
|
2686
|
+
),
|
|
2687
|
+
children: [
|
|
2688
|
+
j(A, "d"),
|
|
2689
|
+
q && !M && /* @__PURE__ */ t("span", { className: "absolute bottom-1 h-1 w-1 rounded-full bg-primary" })
|
|
2690
|
+
]
|
|
2691
|
+
},
|
|
2692
|
+
$
|
|
2693
|
+
);
|
|
2694
|
+
}) })
|
|
2695
|
+
] });
|
|
2696
|
+
}
|
|
2697
|
+
);
|
|
2698
|
+
ii.displayName = "MiniCalendar";
|
|
2699
|
+
const ci = c.forwardRef(
|
|
2700
|
+
({ className: e, title: o, description: r, children: a, footer: n, variant: i = "default", ...s }, d) => i === "card" ? /* @__PURE__ */ p(_a, { ref: d, className: e, ...s, children: [
|
|
2701
|
+
/* @__PURE__ */ p(Ma, { children: [
|
|
2702
|
+
/* @__PURE__ */ t(Ia, { className: "text-lg", children: o }),
|
|
2703
|
+
r && /* @__PURE__ */ t($a, { children: r })
|
|
2704
|
+
] }),
|
|
2705
|
+
/* @__PURE__ */ t(Oa, { className: "space-y-4", children: a }),
|
|
2706
|
+
n && /* @__PURE__ */ p(ie, { children: [
|
|
2707
|
+
/* @__PURE__ */ t(ke, {}),
|
|
2708
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-end gap-2 p-4", children: n })
|
|
2709
|
+
] })
|
|
2710
|
+
] }) : /* @__PURE__ */ p("div", { ref: d, className: y("space-y-4", e), ...s, children: [
|
|
2711
|
+
/* @__PURE__ */ p("div", { children: [
|
|
2712
|
+
/* @__PURE__ */ t("h3", { className: "text-lg font-medium", children: o }),
|
|
2713
|
+
r && /* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground", children: r })
|
|
2714
|
+
] }),
|
|
2715
|
+
/* @__PURE__ */ t(ke, {}),
|
|
2716
|
+
/* @__PURE__ */ t("div", { className: "space-y-4", children: a }),
|
|
2717
|
+
n && /* @__PURE__ */ p(ie, { children: [
|
|
2718
|
+
/* @__PURE__ */ t(ke, {}),
|
|
2719
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-end gap-2", children: n })
|
|
2720
|
+
] })
|
|
2721
|
+
] })
|
|
2722
|
+
);
|
|
2723
|
+
ci.displayName = "SettingsSection";
|
|
2724
|
+
const li = c.forwardRef(
|
|
2725
|
+
({ className: e, label: o, description: r, children: a, htmlFor: n, ...i }, s) => /* @__PURE__ */ p(
|
|
2726
|
+
"div",
|
|
2727
|
+
{
|
|
2728
|
+
ref: s,
|
|
2729
|
+
className: y("flex items-start justify-between gap-4", e),
|
|
2730
|
+
...i,
|
|
2731
|
+
children: [
|
|
2732
|
+
/* @__PURE__ */ p("div", { className: "space-y-0.5", children: [
|
|
2733
|
+
/* @__PURE__ */ t("label", { htmlFor: n, className: "text-sm font-medium", children: o }),
|
|
2734
|
+
r && /* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: r })
|
|
2735
|
+
] }),
|
|
2736
|
+
/* @__PURE__ */ t("div", { className: "flex-shrink-0", children: a })
|
|
2737
|
+
]
|
|
2738
|
+
}
|
|
2739
|
+
)
|
|
2740
|
+
);
|
|
2741
|
+
li.displayName = "SettingsRow";
|
|
2742
|
+
const di = [
|
|
2743
|
+
{ format: "csv", label: "Export as CSV", icon: /* @__PURE__ */ t(bt, { className: "h-4 w-4" }) },
|
|
2744
|
+
{ format: "excel", label: "Export as Excel", icon: /* @__PURE__ */ t(ln, { className: "h-4 w-4" }) },
|
|
2745
|
+
{ format: "pdf", label: "Export as PDF", icon: /* @__PURE__ */ t(bt, { className: "h-4 w-4" }) },
|
|
2746
|
+
{ format: "json", label: "Export as JSON", icon: /* @__PURE__ */ t(cn, { className: "h-4 w-4" }) }
|
|
2747
|
+
], ui = c.forwardRef(
|
|
2748
|
+
({
|
|
2749
|
+
className: e,
|
|
2750
|
+
onExport: o,
|
|
2751
|
+
options: r = di,
|
|
2752
|
+
loading: a = !1,
|
|
2753
|
+
defaultFormat: n = "csv",
|
|
2754
|
+
showDropdown: i = !0,
|
|
2755
|
+
variant: s = "outline",
|
|
2756
|
+
size: d = "sm",
|
|
2757
|
+
children: u,
|
|
2758
|
+
...m
|
|
2759
|
+
}, f) => {
|
|
2760
|
+
const [l, g] = c.useState(!1), h = async (v) => {
|
|
2761
|
+
g(!0);
|
|
2762
|
+
try {
|
|
2763
|
+
await o(v);
|
|
2764
|
+
} finally {
|
|
2765
|
+
g(!1);
|
|
2766
|
+
}
|
|
2767
|
+
}, b = a || l;
|
|
2768
|
+
return !i || r.length === 1 ? /* @__PURE__ */ p(
|
|
2769
|
+
G,
|
|
2770
|
+
{
|
|
2771
|
+
ref: f,
|
|
2772
|
+
variant: s,
|
|
2773
|
+
size: d,
|
|
2774
|
+
className: y("gap-2", e),
|
|
2775
|
+
onClick: () => h(r[0]?.format || n),
|
|
2776
|
+
disabled: b,
|
|
2777
|
+
...m,
|
|
2778
|
+
children: [
|
|
2779
|
+
b ? /* @__PURE__ */ t(wt, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ t(yt, { className: "h-4 w-4" }),
|
|
2780
|
+
u || "Export"
|
|
2781
|
+
]
|
|
2782
|
+
}
|
|
2783
|
+
) : /* @__PURE__ */ p(Tt, { children: [
|
|
2784
|
+
/* @__PURE__ */ t(Et, { asChild: !0, children: /* @__PURE__ */ p(
|
|
2785
|
+
G,
|
|
2786
|
+
{
|
|
2787
|
+
ref: f,
|
|
2788
|
+
variant: s,
|
|
2789
|
+
size: d,
|
|
2790
|
+
className: y("gap-2", e),
|
|
2791
|
+
disabled: b,
|
|
2792
|
+
...m,
|
|
2793
|
+
children: [
|
|
2794
|
+
b ? /* @__PURE__ */ t(wt, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ t(yt, { className: "h-4 w-4" }),
|
|
2795
|
+
u || "Export",
|
|
2796
|
+
/* @__PURE__ */ t(Ge, { className: "h-3 w-3 opacity-50" })
|
|
2797
|
+
]
|
|
2798
|
+
}
|
|
2799
|
+
) }),
|
|
2800
|
+
/* @__PURE__ */ t(At, { align: "end", children: r.map((v) => /* @__PURE__ */ p(
|
|
2801
|
+
Dt,
|
|
2802
|
+
{
|
|
2803
|
+
onClick: () => h(v.format),
|
|
2804
|
+
disabled: v.disabled,
|
|
2805
|
+
className: "gap-2",
|
|
2806
|
+
children: [
|
|
2807
|
+
v.icon,
|
|
2808
|
+
v.label
|
|
2809
|
+
]
|
|
2810
|
+
},
|
|
2811
|
+
v.format
|
|
2812
|
+
)) })
|
|
2813
|
+
] });
|
|
2814
|
+
}
|
|
2815
|
+
);
|
|
2816
|
+
ui.displayName = "ExportButton";
|
|
2817
|
+
const fi = c.forwardRef(
|
|
2818
|
+
({ className: e, ...o }, r) => /* @__PURE__ */ p("div", { ref: r, className: y("space-y-3 rounded-lg border p-4", e), ...o, children: [
|
|
2819
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-1/2" }),
|
|
2820
|
+
/* @__PURE__ */ t(R, { className: "h-8 w-3/4" }),
|
|
2821
|
+
/* @__PURE__ */ t(R, { className: "h-3 w-full" }),
|
|
2822
|
+
/* @__PURE__ */ t(R, { className: "h-3 w-2/3" })
|
|
2823
|
+
] })
|
|
2824
|
+
);
|
|
2825
|
+
fi.displayName = "SkeletonCard";
|
|
2826
|
+
const Nt = () => /* @__PURE__ */ p("div", { className: "space-y-3 rounded-lg border p-4", children: [
|
|
2827
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-1/2" }),
|
|
2828
|
+
/* @__PURE__ */ t(R, { className: "h-8 w-3/4" }),
|
|
2829
|
+
/* @__PURE__ */ t(R, { className: "h-3 w-full" }),
|
|
2830
|
+
/* @__PURE__ */ t(R, { className: "h-3 w-2/3" })
|
|
2831
|
+
] }), mi = c.forwardRef(
|
|
2832
|
+
({ className: e, rows: o = 5, columns: r = 4, ...a }, n) => /* @__PURE__ */ p("div", { ref: n, className: y("space-y-2", e), ...a, children: [
|
|
2833
|
+
/* @__PURE__ */ t("div", { className: "flex gap-4 border-b pb-2", children: Array.from({ length: r }).map((i, s) => /* @__PURE__ */ t(R, { className: "h-4 flex-1" }, s)) }),
|
|
2834
|
+
Array.from({ length: o }).map((i, s) => /* @__PURE__ */ t("div", { className: "flex gap-4 py-2", children: Array.from({ length: r }).map((d, u) => /* @__PURE__ */ t(R, { className: "h-4 flex-1" }, u)) }, s))
|
|
2835
|
+
] })
|
|
2836
|
+
);
|
|
2837
|
+
mi.displayName = "SkeletonTable";
|
|
2838
|
+
const pi = ({ rows: e = 5 }) => /* @__PURE__ */ p("div", { className: "space-y-2", children: [
|
|
2839
|
+
/* @__PURE__ */ p("div", { className: "flex gap-4 border-b pb-2", children: [
|
|
2840
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-1/4" }),
|
|
2841
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-1/4" }),
|
|
2842
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-1/4" }),
|
|
2843
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-1/4" })
|
|
2844
|
+
] }),
|
|
2845
|
+
Array.from({ length: e }).map((o, r) => /* @__PURE__ */ p("div", { className: "flex gap-4 py-2", children: [
|
|
2846
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-1/4" }),
|
|
2847
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-1/4" }),
|
|
2848
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-1/4" }),
|
|
2849
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-1/4" })
|
|
2850
|
+
] }, r))
|
|
2851
|
+
] }), hi = c.forwardRef(
|
|
2852
|
+
({ className: e, items: o = 3, ...r }, a) => /* @__PURE__ */ t("div", { ref: a, className: y("space-y-3", e), ...r, children: Array.from({ length: o }).map((n, i) => /* @__PURE__ */ p("div", { className: "flex items-center gap-3", children: [
|
|
2853
|
+
/* @__PURE__ */ t(R, { className: "h-10 w-10 rounded-full" }),
|
|
2854
|
+
/* @__PURE__ */ p("div", { className: "flex-1 space-y-1.5", children: [
|
|
2855
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-1/3" }),
|
|
2856
|
+
/* @__PURE__ */ t(R, { className: "h-3 w-2/3" })
|
|
2857
|
+
] })
|
|
2858
|
+
] }, i)) })
|
|
2859
|
+
);
|
|
2860
|
+
hi.displayName = "SkeletonList";
|
|
2861
|
+
const gi = ({ items: e = 3 }) => /* @__PURE__ */ t("div", { className: "space-y-3", children: Array.from({ length: e }).map((o, r) => /* @__PURE__ */ p("div", { className: "flex items-center gap-3", children: [
|
|
2862
|
+
/* @__PURE__ */ t(R, { className: "h-10 w-10 rounded-full" }),
|
|
2863
|
+
/* @__PURE__ */ p("div", { className: "flex-1 space-y-1.5", children: [
|
|
2864
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-1/3" }),
|
|
2865
|
+
/* @__PURE__ */ t(R, { className: "h-3 w-2/3" })
|
|
2866
|
+
] })
|
|
2867
|
+
] }, r)) }), vi = () => /* @__PURE__ */ p("div", { className: "space-y-4", children: [
|
|
2868
|
+
/* @__PURE__ */ p("div", { className: "space-y-2", children: [
|
|
2869
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-20" }),
|
|
2870
|
+
/* @__PURE__ */ t(R, { className: "h-10 w-full" })
|
|
2871
|
+
] }),
|
|
2872
|
+
/* @__PURE__ */ p("div", { className: "space-y-2", children: [
|
|
2873
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-24" }),
|
|
2874
|
+
/* @__PURE__ */ t(R, { className: "h-10 w-full" })
|
|
2875
|
+
] }),
|
|
2876
|
+
/* @__PURE__ */ p("div", { className: "space-y-2", children: [
|
|
2877
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-16" }),
|
|
2878
|
+
/* @__PURE__ */ t(R, { className: "h-24 w-full" })
|
|
2879
|
+
] }),
|
|
2880
|
+
/* @__PURE__ */ t(R, { className: "h-10 w-24" })
|
|
2881
|
+
] }), bi = c.forwardRef(
|
|
2882
|
+
({ className: e, ...o }, r) => /* @__PURE__ */ p("div", { ref: r, className: y("flex items-start gap-4", e), ...o, children: [
|
|
2883
|
+
/* @__PURE__ */ t(R, { className: "h-20 w-20 rounded-full" }),
|
|
2884
|
+
/* @__PURE__ */ p("div", { className: "flex-1 space-y-2", children: [
|
|
2885
|
+
/* @__PURE__ */ t(R, { className: "h-6 w-48" }),
|
|
2886
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-32" }),
|
|
2887
|
+
/* @__PURE__ */ t(R, { className: "h-3 w-64" })
|
|
2888
|
+
] })
|
|
2889
|
+
] })
|
|
2890
|
+
);
|
|
2891
|
+
bi.displayName = "SkeletonProfile";
|
|
2892
|
+
const wi = () => /* @__PURE__ */ p("div", { className: "flex items-start gap-4", children: [
|
|
2893
|
+
/* @__PURE__ */ t(R, { className: "h-20 w-20 rounded-full" }),
|
|
2894
|
+
/* @__PURE__ */ p("div", { className: "flex-1 space-y-2", children: [
|
|
2895
|
+
/* @__PURE__ */ t(R, { className: "h-6 w-48" }),
|
|
2896
|
+
/* @__PURE__ */ t(R, { className: "h-4 w-32" }),
|
|
2897
|
+
/* @__PURE__ */ t(R, { className: "h-3 w-64" })
|
|
2898
|
+
] })
|
|
2899
|
+
] }), yi = ({ count: e = 4 }) => /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-4", children: Array.from({ length: e }).map((o, r) => /* @__PURE__ */ p("div", { className: "space-y-2 rounded-lg border p-4", children: [
|
|
2900
|
+
/* @__PURE__ */ t(R, { className: "h-3 w-20" }),
|
|
2901
|
+
/* @__PURE__ */ t(R, { className: "h-8 w-24" }),
|
|
2902
|
+
/* @__PURE__ */ t(R, { className: "h-3 w-16" })
|
|
2903
|
+
] }, r)) }), xi = c.forwardRef(
|
|
2904
|
+
({ className: e, lines: o = 3, ...r }, a) => /* @__PURE__ */ t("div", { ref: a, className: y("space-y-2", e), ...r, children: Array.from({ length: o }).map((n, i) => /* @__PURE__ */ t(
|
|
2905
|
+
R,
|
|
2906
|
+
{
|
|
2907
|
+
className: y("h-4", i === o - 1 ? "w-3/4" : "w-full")
|
|
2908
|
+
},
|
|
2909
|
+
i
|
|
2910
|
+
)) })
|
|
2911
|
+
);
|
|
2912
|
+
xi.displayName = "SkeletonText";
|
|
2913
|
+
const Ni = c.forwardRef(
|
|
2914
|
+
({ className: e, variant: o = "card", count: r = 1, ...a }, n) => {
|
|
2915
|
+
const i = () => {
|
|
2916
|
+
switch (o) {
|
|
2917
|
+
case "card":
|
|
2918
|
+
return Array.from({ length: r }).map((s, d) => /* @__PURE__ */ t(Nt, {}, d));
|
|
2919
|
+
case "table":
|
|
2920
|
+
return /* @__PURE__ */ t(pi, { rows: r });
|
|
2921
|
+
case "list":
|
|
2922
|
+
return /* @__PURE__ */ t(gi, { items: r });
|
|
2923
|
+
case "form":
|
|
2924
|
+
return /* @__PURE__ */ t(vi, {});
|
|
2925
|
+
case "profile":
|
|
2926
|
+
return /* @__PURE__ */ t(wi, {});
|
|
2927
|
+
case "stats":
|
|
2928
|
+
return /* @__PURE__ */ t(yi, { count: r });
|
|
2929
|
+
default:
|
|
2930
|
+
return /* @__PURE__ */ t(Nt, {});
|
|
2931
|
+
}
|
|
2932
|
+
};
|
|
2933
|
+
return /* @__PURE__ */ t(
|
|
2934
|
+
"div",
|
|
2935
|
+
{
|
|
2936
|
+
ref: n,
|
|
2937
|
+
className: y(o === "card" && r > 1 && "grid gap-4 md:grid-cols-2 lg:grid-cols-3", e),
|
|
2938
|
+
...a,
|
|
2939
|
+
children: i()
|
|
2940
|
+
}
|
|
2941
|
+
);
|
|
2942
|
+
}
|
|
2943
|
+
);
|
|
2944
|
+
Ni.displayName = "SkeletonLoader";
|
|
2945
|
+
const Ci = {
|
|
2946
|
+
beta: {
|
|
2947
|
+
label: "Beta",
|
|
2948
|
+
className: "bg-info/20 text-info hover:bg-info/30 border-info/30",
|
|
2949
|
+
defaultTooltip: "This feature is in beta and may change"
|
|
2950
|
+
},
|
|
2951
|
+
new: {
|
|
2952
|
+
label: "New",
|
|
2953
|
+
className: "bg-success/20 text-success hover:bg-success/30 border-success/30",
|
|
2954
|
+
defaultTooltip: "This feature was recently added"
|
|
2955
|
+
},
|
|
2956
|
+
experimental: {
|
|
2957
|
+
label: "Experimental",
|
|
2958
|
+
className: "bg-warning/20 text-warning hover:bg-warning/30 border-warning/30",
|
|
2959
|
+
defaultTooltip: "This feature is experimental and may not work as expected"
|
|
2960
|
+
},
|
|
2961
|
+
"coming-soon": {
|
|
2962
|
+
label: "Coming Soon",
|
|
2963
|
+
className: "bg-muted text-muted-foreground hover:bg-muted/80 border-muted",
|
|
2964
|
+
defaultTooltip: "This feature is coming soon"
|
|
2965
|
+
},
|
|
2966
|
+
deprecated: {
|
|
2967
|
+
label: "Deprecated",
|
|
2968
|
+
className: "bg-destructive/20 text-destructive hover:bg-destructive/30 border-destructive/30",
|
|
2969
|
+
defaultTooltip: "This feature is deprecated and will be removed"
|
|
2970
|
+
}
|
|
2971
|
+
}, Si = c.forwardRef(
|
|
2972
|
+
({ className: e, variant: o = "beta", tooltip: r, showTooltip: a = !0, children: n, ...i }, s) => {
|
|
2973
|
+
const d = Ci[o], u = r || d.defaultTooltip, m = /* @__PURE__ */ t("span", { ref: s, children: /* @__PURE__ */ t(
|
|
2974
|
+
fe,
|
|
2975
|
+
{
|
|
2976
|
+
className: y("text-xs font-medium border", d.className, e),
|
|
2977
|
+
...i,
|
|
2978
|
+
children: n || d.label
|
|
2979
|
+
}
|
|
2980
|
+
) });
|
|
2981
|
+
return a ? /* @__PURE__ */ t(We, { children: /* @__PURE__ */ p(ae, { children: [
|
|
2982
|
+
/* @__PURE__ */ t(ne, { asChild: !0, children: m }),
|
|
2983
|
+
/* @__PURE__ */ t(se, { children: /* @__PURE__ */ t("p", { children: u }) })
|
|
2984
|
+
] }) }) : m;
|
|
2985
|
+
}
|
|
2986
|
+
);
|
|
2987
|
+
Si.displayName = "BetaBadge";
|
|
2988
|
+
const Ri = {
|
|
2989
|
+
default: { bg: "bg-primary/10", text: "text-primary", border: "border-primary" },
|
|
2990
|
+
work: { bg: "bg-blue-100", text: "text-blue-700", border: "border-blue-500" },
|
|
2991
|
+
personal: { bg: "bg-green-100", text: "text-green-700", border: "border-green-500" },
|
|
2992
|
+
meeting: { bg: "bg-purple-100", text: "text-purple-700", border: "border-purple-500" },
|
|
2993
|
+
reminder: { bg: "bg-yellow-100", text: "text-yellow-700", border: "border-yellow-500" },
|
|
2994
|
+
holiday: { bg: "bg-red-100", text: "text-red-700", border: "border-red-500" }
|
|
2995
|
+
}, O = (e) => typeof e == "string" ? Ht(e) : e, Ti = ({
|
|
2996
|
+
date: e,
|
|
2997
|
+
view: o,
|
|
2998
|
+
onViewChange: r,
|
|
2999
|
+
onNavigate: a,
|
|
3000
|
+
showViewSelector: n = !0,
|
|
3001
|
+
showNavigation: i = !0,
|
|
3002
|
+
showToday: s = !0
|
|
3003
|
+
}) => {
|
|
3004
|
+
const { t: d, formatDate: u } = re(), m = () => {
|
|
3005
|
+
switch (o) {
|
|
3006
|
+
case "month":
|
|
3007
|
+
return u(e, "MMMM yyyy");
|
|
3008
|
+
case "week":
|
|
3009
|
+
const f = ye(e), l = Je(e);
|
|
3010
|
+
return f.getMonth() === l.getMonth() ? `${u(f, "MMM d")} - ${u(l, "d, yyyy")}` : `${u(f, "MMM d")} - ${u(l, "MMM d, yyyy")}`;
|
|
3011
|
+
case "day":
|
|
3012
|
+
return u(e, "EEEE, MMMM d, yyyy");
|
|
3013
|
+
case "agenda":
|
|
3014
|
+
return u(e, "MMMM yyyy");
|
|
3015
|
+
default:
|
|
3016
|
+
return u(e, "MMMM yyyy");
|
|
3017
|
+
}
|
|
3018
|
+
};
|
|
3019
|
+
return /* @__PURE__ */ p("div", { className: "flex items-center justify-between border-b p-4", children: [
|
|
3020
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-4", children: [
|
|
3021
|
+
i && /* @__PURE__ */ p("div", { className: "flex items-center gap-1", children: [
|
|
3022
|
+
/* @__PURE__ */ t(
|
|
3023
|
+
G,
|
|
3024
|
+
{
|
|
3025
|
+
variant: "outline",
|
|
3026
|
+
size: "icon",
|
|
3027
|
+
onClick: () => a("prev"),
|
|
3028
|
+
className: "h-8 w-8",
|
|
3029
|
+
children: /* @__PURE__ */ t(Ot, { className: "h-4 w-4" })
|
|
3030
|
+
}
|
|
3031
|
+
),
|
|
3032
|
+
/* @__PURE__ */ t(
|
|
3033
|
+
G,
|
|
3034
|
+
{
|
|
3035
|
+
variant: "outline",
|
|
3036
|
+
size: "icon",
|
|
3037
|
+
onClick: () => a("next"),
|
|
3038
|
+
className: "h-8 w-8",
|
|
3039
|
+
children: /* @__PURE__ */ t(Kt, { className: "h-4 w-4" })
|
|
3040
|
+
}
|
|
3041
|
+
)
|
|
3042
|
+
] }),
|
|
3043
|
+
s && /* @__PURE__ */ t(G, { variant: "outline", size: "sm", onClick: () => a("today"), children: d("calendar.today") }),
|
|
3044
|
+
/* @__PURE__ */ t("h2", { className: "text-lg font-semibold", children: m() })
|
|
3045
|
+
] }),
|
|
3046
|
+
n && /* @__PURE__ */ p(Ba, { value: o, onValueChange: (f) => r(f), children: [
|
|
3047
|
+
/* @__PURE__ */ t(Ka, { className: "w-32", children: /* @__PURE__ */ t(Ha, {}) }),
|
|
3048
|
+
/* @__PURE__ */ p(za, { children: [
|
|
3049
|
+
/* @__PURE__ */ t(de, { value: "month", children: d("calendar.month") }),
|
|
3050
|
+
/* @__PURE__ */ t(de, { value: "week", children: d("calendar.week") }),
|
|
3051
|
+
/* @__PURE__ */ t(de, { value: "day", children: d("calendar.day") }),
|
|
3052
|
+
/* @__PURE__ */ t(de, { value: "agenda", children: d("calendar.agenda") })
|
|
3053
|
+
] })
|
|
3054
|
+
] })
|
|
3055
|
+
] });
|
|
3056
|
+
}, te = ({ event: e, compact: o = !1, onClick: r }) => {
|
|
3057
|
+
const { t: a, formatDate: n } = re(), i = e.category || "default", s = Ri[i], d = O(e.start), u = O(e.end);
|
|
3058
|
+
return o ? /* @__PURE__ */ p(
|
|
3059
|
+
"button",
|
|
3060
|
+
{
|
|
3061
|
+
onClick: () => r?.(e),
|
|
3062
|
+
className: y(
|
|
3063
|
+
"w-full truncate rounded px-1 py-0.5 text-left text-xs",
|
|
3064
|
+
s.bg,
|
|
3065
|
+
s.text,
|
|
3066
|
+
"hover:opacity-80 transition-opacity"
|
|
3067
|
+
),
|
|
3068
|
+
children: [
|
|
3069
|
+
!e.allDay && /* @__PURE__ */ p("span", { className: "font-medium", children: [
|
|
3070
|
+
j(d, "h:mm"),
|
|
3071
|
+
" "
|
|
3072
|
+
] }),
|
|
3073
|
+
e.title
|
|
3074
|
+
]
|
|
3075
|
+
}
|
|
3076
|
+
) : /* @__PURE__ */ p(Fa, { children: [
|
|
3077
|
+
/* @__PURE__ */ t(Va, { asChild: !0, children: /* @__PURE__ */ p(
|
|
3078
|
+
"button",
|
|
3079
|
+
{
|
|
3080
|
+
className: y(
|
|
3081
|
+
"w-full truncate rounded-md px-2 py-1 text-left text-sm border-l-2",
|
|
3082
|
+
s.bg,
|
|
3083
|
+
s.text,
|
|
3084
|
+
s.border,
|
|
3085
|
+
"hover:opacity-80 transition-opacity"
|
|
3086
|
+
),
|
|
3087
|
+
children: [
|
|
3088
|
+
/* @__PURE__ */ t("div", { className: "font-medium truncate", children: e.title }),
|
|
3089
|
+
!e.allDay && /* @__PURE__ */ p("div", { className: "text-xs opacity-75", children: [
|
|
3090
|
+
j(d, "h:mm a"),
|
|
3091
|
+
" - ",
|
|
3092
|
+
j(u, "h:mm a")
|
|
3093
|
+
] })
|
|
3094
|
+
]
|
|
3095
|
+
}
|
|
3096
|
+
) }),
|
|
3097
|
+
/* @__PURE__ */ t(La, { className: "w-80", align: "start", children: /* @__PURE__ */ p("div", { className: "space-y-3", children: [
|
|
3098
|
+
/* @__PURE__ */ p("div", { className: "flex items-start justify-between", children: [
|
|
3099
|
+
/* @__PURE__ */ t("h3", { className: "font-semibold text-lg", children: e.title }),
|
|
3100
|
+
/* @__PURE__ */ t(fe, { variant: "secondary", className: y("capitalize", s.bg, s.text), children: i })
|
|
3101
|
+
] }),
|
|
3102
|
+
/* @__PURE__ */ p("div", { className: "space-y-2 text-sm", children: [
|
|
3103
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
3104
|
+
/* @__PURE__ */ t(Sa, { className: "h-4 w-4" }),
|
|
3105
|
+
e.allDay ? /* @__PURE__ */ t("span", { children: a("calendar.allDay") }) : /* @__PURE__ */ p("span", { children: [
|
|
3106
|
+
n(d, "MMM d, h:mm a"),
|
|
3107
|
+
" - ",
|
|
3108
|
+
j(u, "h:mm a")
|
|
3109
|
+
] })
|
|
3110
|
+
] }),
|
|
3111
|
+
e.location && /* @__PURE__ */ p("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
3112
|
+
/* @__PURE__ */ t(Da, { className: "h-4 w-4" }),
|
|
3113
|
+
/* @__PURE__ */ t("span", { children: e.location })
|
|
3114
|
+
] }),
|
|
3115
|
+
e.description && /* @__PURE__ */ t("p", { className: "text-muted-foreground pt-2", children: e.description })
|
|
3116
|
+
] }),
|
|
3117
|
+
/* @__PURE__ */ t("div", { className: "flex gap-2 pt-2", children: /* @__PURE__ */ t(G, { size: "sm", className: "flex-1", onClick: () => r?.(e), children: a("calendar.viewDetails") }) })
|
|
3118
|
+
] }) })
|
|
3119
|
+
] });
|
|
3120
|
+
}, Ei = ({
|
|
3121
|
+
date: e,
|
|
3122
|
+
events: o,
|
|
3123
|
+
onEventClick: r,
|
|
3124
|
+
onDateClick: a
|
|
3125
|
+
}) => {
|
|
3126
|
+
const { t: n, formatDate: i } = re(), s = Ye(e), d = Xe(s), u = ye(s), m = Je(d), f = [];
|
|
3127
|
+
let l = u;
|
|
3128
|
+
for (; l <= m; )
|
|
3129
|
+
f.push(l), l = we(l, 1);
|
|
3130
|
+
const g = (b) => o.filter((v) => {
|
|
3131
|
+
const w = Ze(O(v.start)), N = pt(O(v.end));
|
|
3132
|
+
return ht(b, { start: w, end: N }) || Y(w, b);
|
|
3133
|
+
}), h = c.useMemo(() => [0, 1, 2, 3, 4, 5, 6].map((b) => {
|
|
3134
|
+
const v = new Date(2024, 0, b);
|
|
3135
|
+
return i(v, "EEE");
|
|
3136
|
+
}), [i]);
|
|
3137
|
+
return /* @__PURE__ */ p("div", { className: "flex-1 overflow-auto", children: [
|
|
3138
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-7 border-b", children: h.map((b, v) => /* @__PURE__ */ t(
|
|
3139
|
+
"div",
|
|
3140
|
+
{
|
|
3141
|
+
className: "border-r last:border-r-0 px-2 py-2 text-center text-sm font-medium text-muted-foreground",
|
|
3142
|
+
children: b
|
|
3143
|
+
},
|
|
3144
|
+
v
|
|
3145
|
+
)) }),
|
|
3146
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-7 flex-1", children: f.map((b, v) => {
|
|
3147
|
+
const w = Ft(b, e), N = De(b), x = g(b);
|
|
3148
|
+
return /* @__PURE__ */ p(
|
|
3149
|
+
"div",
|
|
3150
|
+
{
|
|
3151
|
+
className: y(
|
|
3152
|
+
"min-h-[100px] border-r border-b last:border-r-0 p-1",
|
|
3153
|
+
!w && "bg-muted/30"
|
|
3154
|
+
),
|
|
3155
|
+
onClick: () => a?.(b),
|
|
3156
|
+
children: [
|
|
3157
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-1", children: /* @__PURE__ */ t(
|
|
3158
|
+
"span",
|
|
3159
|
+
{
|
|
3160
|
+
className: y(
|
|
3161
|
+
"flex h-6 w-6 items-center justify-center rounded-full text-sm",
|
|
3162
|
+
N && "bg-primary text-primary-foreground font-bold",
|
|
3163
|
+
!w && "text-muted-foreground"
|
|
3164
|
+
),
|
|
3165
|
+
children: j(b, "d")
|
|
3166
|
+
}
|
|
3167
|
+
) }),
|
|
3168
|
+
/* @__PURE__ */ p("div", { className: "space-y-0.5", children: [
|
|
3169
|
+
x.slice(0, 3).map((C) => /* @__PURE__ */ t(
|
|
3170
|
+
te,
|
|
3171
|
+
{
|
|
3172
|
+
event: C,
|
|
3173
|
+
compact: !0,
|
|
3174
|
+
onClick: r
|
|
3175
|
+
},
|
|
3176
|
+
C.id
|
|
3177
|
+
)),
|
|
3178
|
+
x.length > 3 && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground px-1", children: n("calendar.more", { count: x.length - 3 }) })
|
|
3179
|
+
] })
|
|
3180
|
+
]
|
|
3181
|
+
},
|
|
3182
|
+
v
|
|
3183
|
+
);
|
|
3184
|
+
}) })
|
|
3185
|
+
] });
|
|
3186
|
+
}, Ai = ({
|
|
3187
|
+
date: e,
|
|
3188
|
+
events: o,
|
|
3189
|
+
onEventClick: r,
|
|
3190
|
+
onDateClick: a
|
|
3191
|
+
}) => {
|
|
3192
|
+
const { t: n, formatDate: i } = re(), s = ye(e), d = Array.from({ length: 24 }, (l, g) => g), u = Array.from({ length: 7 }, (l, g) => we(s, g)), m = (l, g) => o.filter((h) => {
|
|
3193
|
+
if (h.allDay) return !1;
|
|
3194
|
+
const b = O(h.start);
|
|
3195
|
+
return Y(b, l) && Qo(b) === g;
|
|
3196
|
+
}), f = (l) => o.filter((g) => {
|
|
3197
|
+
if (!g.allDay) return !1;
|
|
3198
|
+
const h = Ze(O(g.start)), b = pt(O(g.end));
|
|
3199
|
+
return ht(l, { start: h, end: b }) || Y(h, l);
|
|
3200
|
+
});
|
|
3201
|
+
return /* @__PURE__ */ p("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
|
|
3202
|
+
/* @__PURE__ */ p("div", { className: "flex border-b", children: [
|
|
3203
|
+
/* @__PURE__ */ t("div", { className: "w-16 flex-shrink-0" }),
|
|
3204
|
+
u.map((l) => /* @__PURE__ */ p(
|
|
3205
|
+
"div",
|
|
3206
|
+
{
|
|
3207
|
+
className: "flex-1 border-l px-2 py-2 text-center",
|
|
3208
|
+
children: [
|
|
3209
|
+
/* @__PURE__ */ t("div", { className: "text-sm text-muted-foreground", children: i(l, "EEE") }),
|
|
3210
|
+
/* @__PURE__ */ t(
|
|
3211
|
+
"div",
|
|
3212
|
+
{
|
|
3213
|
+
className: y(
|
|
3214
|
+
"text-lg font-semibold",
|
|
3215
|
+
De(l) && "text-primary"
|
|
3216
|
+
),
|
|
3217
|
+
children: j(l, "d")
|
|
3218
|
+
}
|
|
3219
|
+
)
|
|
3220
|
+
]
|
|
3221
|
+
},
|
|
3222
|
+
l.toISOString()
|
|
3223
|
+
))
|
|
3224
|
+
] }),
|
|
3225
|
+
/* @__PURE__ */ p("div", { className: "flex border-b", children: [
|
|
3226
|
+
/* @__PURE__ */ t("div", { className: "w-16 flex-shrink-0 px-2 py-1 text-xs text-muted-foreground", children: n("calendar.allDay") }),
|
|
3227
|
+
u.map((l) => {
|
|
3228
|
+
const g = f(l);
|
|
3229
|
+
return /* @__PURE__ */ t("div", { className: "flex-1 border-l px-1 py-1 min-h-[40px]", children: g.map((h) => /* @__PURE__ */ t(te, { event: h, compact: !0, onClick: r }, h.id)) }, l.toISOString());
|
|
3230
|
+
})
|
|
3231
|
+
] }),
|
|
3232
|
+
/* @__PURE__ */ t("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ t("div", { className: "relative", children: d.map((l) => /* @__PURE__ */ p("div", { className: "flex h-12 border-b", children: [
|
|
3233
|
+
/* @__PURE__ */ t("div", { className: "w-16 flex-shrink-0 px-2 py-1 text-xs text-muted-foreground text-right", children: j(he(/* @__PURE__ */ new Date(), l), "h a") }),
|
|
3234
|
+
u.map((g) => {
|
|
3235
|
+
const h = m(g, l);
|
|
3236
|
+
return /* @__PURE__ */ t(
|
|
3237
|
+
"div",
|
|
3238
|
+
{
|
|
3239
|
+
className: "flex-1 border-l relative",
|
|
3240
|
+
onClick: () => a?.(he(ta(g, 0), l)),
|
|
3241
|
+
children: h.map((b) => {
|
|
3242
|
+
const v = O(b.start), w = O(b.end), N = Zo(w, v), x = ea(v) / 60 * 100, C = Math.max(N / 60 * 100, 25);
|
|
3243
|
+
return /* @__PURE__ */ t(
|
|
3244
|
+
"div",
|
|
3245
|
+
{
|
|
3246
|
+
className: "absolute left-0 right-0 mx-0.5 overflow-hidden",
|
|
3247
|
+
style: {
|
|
3248
|
+
top: `${x}%`,
|
|
3249
|
+
height: `${C}%`,
|
|
3250
|
+
minHeight: "20px"
|
|
3251
|
+
},
|
|
3252
|
+
children: /* @__PURE__ */ t(te, { event: b, compact: !0, onClick: r })
|
|
3253
|
+
},
|
|
3254
|
+
b.id
|
|
3255
|
+
);
|
|
3256
|
+
})
|
|
3257
|
+
},
|
|
3258
|
+
g.toISOString()
|
|
3259
|
+
);
|
|
3260
|
+
})
|
|
3261
|
+
] }, l)) }) })
|
|
3262
|
+
] });
|
|
3263
|
+
}, Di = ({
|
|
3264
|
+
date: e,
|
|
3265
|
+
events: o,
|
|
3266
|
+
onEventClick: r,
|
|
3267
|
+
onDateClick: a
|
|
3268
|
+
}) => {
|
|
3269
|
+
const { t: n } = re(), i = Array.from({ length: 24 }, (u, m) => m), s = (u) => o.filter((m) => {
|
|
3270
|
+
if (m.allDay) return !1;
|
|
3271
|
+
const f = O(m.start);
|
|
3272
|
+
return Y(f, e) && Qo(f) === u;
|
|
3273
|
+
}), d = o.filter((u) => {
|
|
3274
|
+
if (!u.allDay) return !1;
|
|
3275
|
+
const m = Ze(O(u.start)), f = pt(O(u.end));
|
|
3276
|
+
return ht(e, { start: m, end: f }) || Y(m, e);
|
|
3277
|
+
});
|
|
3278
|
+
return /* @__PURE__ */ p("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
|
|
3279
|
+
d.length > 0 && /* @__PURE__ */ p("div", { className: "border-b p-2 space-y-1", children: [
|
|
3280
|
+
/* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground mb-1", children: n("calendar.allDay") }),
|
|
3281
|
+
d.map((u) => /* @__PURE__ */ t(te, { event: u, onClick: r }, u.id))
|
|
3282
|
+
] }),
|
|
3283
|
+
/* @__PURE__ */ t("div", { className: "flex-1 overflow-auto", children: i.map((u) => {
|
|
3284
|
+
const m = s(u);
|
|
3285
|
+
return /* @__PURE__ */ p(
|
|
3286
|
+
"div",
|
|
3287
|
+
{
|
|
3288
|
+
className: "flex h-16 border-b hover:bg-muted/50 transition-colors",
|
|
3289
|
+
onClick: () => a?.(he(ta(e, 0), u)),
|
|
3290
|
+
children: [
|
|
3291
|
+
/* @__PURE__ */ t("div", { className: "w-20 flex-shrink-0 px-3 py-1 text-sm text-muted-foreground text-right border-r", children: j(he(/* @__PURE__ */ new Date(), u), "h:mm a") }),
|
|
3292
|
+
/* @__PURE__ */ t("div", { className: "flex-1 px-2 py-1 relative", children: m.map((f) => {
|
|
3293
|
+
const l = O(f.start), g = O(f.end), h = Zo(g, l), b = Math.max(h / 60 * 64, 32);
|
|
3294
|
+
return /* @__PURE__ */ t(
|
|
3295
|
+
"div",
|
|
3296
|
+
{
|
|
3297
|
+
className: "absolute left-2 right-2",
|
|
3298
|
+
style: {
|
|
3299
|
+
top: `${ea(l) / 60 * 100}%`,
|
|
3300
|
+
height: `${b}px`
|
|
3301
|
+
},
|
|
3302
|
+
children: /* @__PURE__ */ t(te, { event: f, onClick: r })
|
|
3303
|
+
},
|
|
3304
|
+
f.id
|
|
3305
|
+
);
|
|
3306
|
+
}) })
|
|
3307
|
+
]
|
|
3308
|
+
},
|
|
3309
|
+
u
|
|
3310
|
+
);
|
|
3311
|
+
}) })
|
|
3312
|
+
] });
|
|
3313
|
+
}, Pi = ({ date: e, events: o, onEventClick: r }) => {
|
|
3314
|
+
const { t: a, formatDate: n } = re(), i = Ye(e), s = Xe(e), u = o.filter((f) => {
|
|
3315
|
+
const l = O(f.start);
|
|
3316
|
+
return l >= i && l <= s;
|
|
3317
|
+
}).sort((f, l) => O(f.start).getTime() - O(l.start).getTime()).reduce((f, l) => {
|
|
3318
|
+
const g = j(O(l.start), "yyyy-MM-dd");
|
|
3319
|
+
return f[g] || (f[g] = []), f[g].push(l), f;
|
|
3320
|
+
}, {}), m = Object.keys(u).sort();
|
|
3321
|
+
return m.length === 0 ? /* @__PURE__ */ t("div", { className: "flex-1 flex items-center justify-center text-muted-foreground", children: a("calendar.noEvents") }) : /* @__PURE__ */ t("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ t("div", { className: "space-y-6", children: m.map((f) => {
|
|
3322
|
+
const l = Ht(f), g = u[f];
|
|
3323
|
+
return /* @__PURE__ */ p("div", { children: [
|
|
3324
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
3325
|
+
/* @__PURE__ */ p(
|
|
3326
|
+
"div",
|
|
3327
|
+
{
|
|
3328
|
+
className: y(
|
|
3329
|
+
"flex h-12 w-12 flex-col items-center justify-center rounded-lg",
|
|
3330
|
+
De(l) ? "bg-primary text-primary-foreground" : "bg-muted"
|
|
3331
|
+
),
|
|
3332
|
+
children: [
|
|
3333
|
+
/* @__PURE__ */ t("span", { className: "text-xs font-medium uppercase", children: n(l, "EEE") }),
|
|
3334
|
+
/* @__PURE__ */ t("span", { className: "text-lg font-bold", children: j(l, "d") })
|
|
3335
|
+
]
|
|
3336
|
+
}
|
|
3337
|
+
),
|
|
3338
|
+
/* @__PURE__ */ p("div", { children: [
|
|
3339
|
+
/* @__PURE__ */ t("div", { className: "font-semibold", children: n(l, "EEEE") }),
|
|
3340
|
+
/* @__PURE__ */ t("div", { className: "text-sm text-muted-foreground", children: n(l, "MMMM d, yyyy") })
|
|
3341
|
+
] })
|
|
3342
|
+
] }),
|
|
3343
|
+
/* @__PURE__ */ t("div", { className: "space-y-2 pl-15", children: g.map((h) => /* @__PURE__ */ t(te, { event: h, onClick: r }, h.id)) })
|
|
3344
|
+
] }, f);
|
|
3345
|
+
}) }) });
|
|
3346
|
+
}, ki = c.forwardRef(
|
|
3347
|
+
({
|
|
3348
|
+
className: e,
|
|
3349
|
+
events: o = [],
|
|
3350
|
+
view: r,
|
|
3351
|
+
defaultView: a = "month",
|
|
3352
|
+
onViewChange: n,
|
|
3353
|
+
date: i,
|
|
3354
|
+
defaultDate: s,
|
|
3355
|
+
onDateChange: d,
|
|
3356
|
+
onEventClick: u,
|
|
3357
|
+
onDateClick: m,
|
|
3358
|
+
onEventCreate: f,
|
|
3359
|
+
showViewSelector: l = !0,
|
|
3360
|
+
showNavigation: g = !0,
|
|
3361
|
+
showToday: h = !0,
|
|
3362
|
+
...b
|
|
3363
|
+
}, v) => {
|
|
3364
|
+
const [w, N] = c.useState(a), [x, C] = c.useState(s || /* @__PURE__ */ new Date()), S = r ?? w, T = i ?? x, _ = (I) => {
|
|
3365
|
+
r === void 0 && N(I), n?.(I);
|
|
3366
|
+
}, A = (I) => {
|
|
3367
|
+
i === void 0 && C(I), d?.(I);
|
|
3368
|
+
}, $ = (I) => {
|
|
3369
|
+
let M;
|
|
3370
|
+
if (I === "today")
|
|
3371
|
+
M = /* @__PURE__ */ new Date();
|
|
3372
|
+
else {
|
|
3373
|
+
const D = I === "prev" ? -1 : 1;
|
|
3374
|
+
switch (S) {
|
|
3375
|
+
case "month":
|
|
3376
|
+
case "agenda":
|
|
3377
|
+
M = D > 0 ? qe(T, 1) : ra(T);
|
|
3378
|
+
break;
|
|
3379
|
+
case "week":
|
|
3380
|
+
M = D > 0 ? $t(T, 1) : Js(T);
|
|
3381
|
+
break;
|
|
3382
|
+
case "day":
|
|
3383
|
+
M = D > 0 ? we(T, 1) : Ra(T, 1);
|
|
3384
|
+
break;
|
|
3385
|
+
default:
|
|
3386
|
+
M = T;
|
|
3387
|
+
}
|
|
3388
|
+
}
|
|
3389
|
+
A(M);
|
|
3390
|
+
};
|
|
3391
|
+
return /* @__PURE__ */ p(
|
|
3392
|
+
"div",
|
|
3393
|
+
{
|
|
3394
|
+
ref: v,
|
|
3395
|
+
className: y("flex flex-col h-full border rounded-lg bg-background", e),
|
|
3396
|
+
...b,
|
|
3397
|
+
children: [
|
|
3398
|
+
/* @__PURE__ */ t(
|
|
3399
|
+
Ti,
|
|
3400
|
+
{
|
|
3401
|
+
date: T,
|
|
3402
|
+
view: S,
|
|
3403
|
+
onViewChange: _,
|
|
3404
|
+
onNavigate: $,
|
|
3405
|
+
showViewSelector: l,
|
|
3406
|
+
showNavigation: g,
|
|
3407
|
+
showToday: h
|
|
3408
|
+
}
|
|
3409
|
+
),
|
|
3410
|
+
S === "month" && /* @__PURE__ */ t(
|
|
3411
|
+
Ei,
|
|
3412
|
+
{
|
|
3413
|
+
date: T,
|
|
3414
|
+
events: o,
|
|
3415
|
+
onEventClick: u,
|
|
3416
|
+
onDateClick: m
|
|
3417
|
+
}
|
|
3418
|
+
),
|
|
3419
|
+
S === "week" && /* @__PURE__ */ t(
|
|
3420
|
+
Ai,
|
|
3421
|
+
{
|
|
3422
|
+
date: T,
|
|
3423
|
+
events: o,
|
|
3424
|
+
onEventClick: u,
|
|
3425
|
+
onDateClick: m
|
|
3426
|
+
}
|
|
3427
|
+
),
|
|
3428
|
+
S === "day" && /* @__PURE__ */ t(
|
|
3429
|
+
Di,
|
|
3430
|
+
{
|
|
3431
|
+
date: T,
|
|
3432
|
+
events: o,
|
|
3433
|
+
onEventClick: u,
|
|
3434
|
+
onDateClick: m
|
|
3435
|
+
}
|
|
3436
|
+
),
|
|
3437
|
+
S === "agenda" && /* @__PURE__ */ t(
|
|
3438
|
+
Pi,
|
|
3439
|
+
{
|
|
3440
|
+
date: T,
|
|
3441
|
+
events: o,
|
|
3442
|
+
onEventClick: u
|
|
3443
|
+
}
|
|
3444
|
+
)
|
|
3445
|
+
]
|
|
3446
|
+
}
|
|
3447
|
+
);
|
|
3448
|
+
}
|
|
3449
|
+
);
|
|
3450
|
+
ki.displayName = "FullCalendar";
|
|
3451
|
+
export {
|
|
3452
|
+
hi as $,
|
|
3453
|
+
Qi as A,
|
|
3454
|
+
On as B,
|
|
3455
|
+
tc as C,
|
|
3456
|
+
Ts as D,
|
|
3457
|
+
Gs as E,
|
|
3458
|
+
Uo as F,
|
|
3459
|
+
qo as G,
|
|
3460
|
+
Xo as H,
|
|
3461
|
+
$n as I,
|
|
3462
|
+
Jo as J,
|
|
3463
|
+
Yo as K,
|
|
3464
|
+
Us as L,
|
|
3465
|
+
nc as M,
|
|
3466
|
+
Qs as N,
|
|
3467
|
+
ei as O,
|
|
3468
|
+
ni as P,
|
|
3469
|
+
si as Q,
|
|
3470
|
+
Un as R,
|
|
3471
|
+
Mn as S,
|
|
3472
|
+
ac as T,
|
|
3473
|
+
ii as U,
|
|
3474
|
+
ci as V,
|
|
3475
|
+
li as W,
|
|
3476
|
+
ui as X,
|
|
3477
|
+
Ni as Y,
|
|
3478
|
+
fi as Z,
|
|
3479
|
+
mi as _,
|
|
3480
|
+
dn as a,
|
|
3481
|
+
bi as a0,
|
|
3482
|
+
xi as a1,
|
|
3483
|
+
Si as a2,
|
|
3484
|
+
ki as a3,
|
|
3485
|
+
Ti as a4,
|
|
3486
|
+
te as a5,
|
|
3487
|
+
Ei as a6,
|
|
3488
|
+
Ai as a7,
|
|
3489
|
+
Di as a8,
|
|
3490
|
+
Pi as a9,
|
|
3491
|
+
Ri as aa,
|
|
3492
|
+
un as b,
|
|
3493
|
+
fn as c,
|
|
3494
|
+
pn as d,
|
|
3495
|
+
hn as e,
|
|
3496
|
+
gn as f,
|
|
3497
|
+
kn as g,
|
|
3498
|
+
_n as h,
|
|
3499
|
+
Rr as i,
|
|
3500
|
+
ec as j,
|
|
3501
|
+
Tr as k,
|
|
3502
|
+
Er as l,
|
|
3503
|
+
Ar as m,
|
|
3504
|
+
Dr as n,
|
|
3505
|
+
Pr as o,
|
|
3506
|
+
kr as p,
|
|
3507
|
+
_r as q,
|
|
3508
|
+
In as r,
|
|
3509
|
+
rc as s,
|
|
3510
|
+
oc as t,
|
|
3511
|
+
qn as u,
|
|
3512
|
+
ms as v,
|
|
3513
|
+
ws as w,
|
|
3514
|
+
Cs as x,
|
|
3515
|
+
Ss as y,
|
|
3516
|
+
Rs as z
|
|
3517
|
+
};
|
|
3518
|
+
//# sourceMappingURL=full-calendar-7ac2FFU6.js.map
|