@stackable-labs/embeddables 1.66.0 → 1.66.2
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/react.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as U, jsx as p, Fragment as _e } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import I, { createContext as Xc, useState as le, useRef as
|
|
2
|
+
import * as u from "react";
|
|
3
|
+
import I, { createContext as Xc, useState as le, useRef as Me, useEffect as ce, useContext as Zc, createElement as pn, useMemo as Bt, forwardRef as us, useLayoutEffect as Jc, useCallback as Re } from "react";
|
|
4
4
|
import * as Cn from "react-dom";
|
|
5
5
|
import fs from "react-dom";
|
|
6
6
|
const Qc = () => {
|
|
7
7
|
try {
|
|
8
|
-
return "
|
|
8
|
+
return "458bb472-143d-4e12-bf00-358554e89a52";
|
|
9
9
|
} catch {
|
|
10
10
|
return "dev";
|
|
11
11
|
}
|
|
@@ -50,7 +50,7 @@ const Qc = () => {
|
|
|
50
50
|
messageHandlers: /* @__PURE__ */ new Set()
|
|
51
51
|
}, a = (i) => {
|
|
52
52
|
const c = i.data;
|
|
53
|
-
!c || typeof c != "object" || !("type" in c) || ("extensionId" in c ? c.extensionId : void 0) !== e.id || (c.type === "extension-ready" && (s.ready = !0), s.messageHandlers.forEach((
|
|
53
|
+
!c || typeof c != "object" || !("type" in c) || ("extensionId" in c ? c.extensionId : void 0) !== e.id || (c.type === "extension-ready" && (s.ready = !0), s.messageHandlers.forEach((f) => f(c)));
|
|
54
54
|
};
|
|
55
55
|
return window.addEventListener("message", a), dt.set(e.id, s), s;
|
|
56
56
|
}, Ue = (e, t) => {
|
|
@@ -434,44 +434,47 @@ const il = (e) => {
|
|
|
434
434
|
components: n = {},
|
|
435
435
|
children: o
|
|
436
436
|
}) => {
|
|
437
|
-
const [r, s] = le(!1), a =
|
|
438
|
-
return ce(() => {
|
|
437
|
+
const [r, s] = le(!1), a = Me(null), i = Me(null), c = Me(t);
|
|
438
|
+
return c.current = t, ce(() => {
|
|
439
439
|
if (!a.current) return;
|
|
440
|
-
let
|
|
440
|
+
let d = !1;
|
|
441
441
|
return (async () => {
|
|
442
|
-
const
|
|
443
|
-
if (
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
442
|
+
const l = a.current;
|
|
443
|
+
if (!l) return;
|
|
444
|
+
console.log("[ExtensionProvider] Initializing with", e.length, "extensions");
|
|
445
|
+
const m = new Proxy({}, {
|
|
446
|
+
get: (h, b) => c.current[b]
|
|
447
|
+
});
|
|
448
|
+
i.current = il(m);
|
|
449
|
+
for (const h of e)
|
|
450
|
+
h.enabled && !d && (console.log("[ExtensionProvider] Creating sandbox for", h.id, "bundleUrl:", h.bundleUrl), await el(h, l), console.log("[ExtensionProvider] Sandbox created for", h.id));
|
|
451
|
+
d || (console.log("[ExtensionProvider] Ready"), s(!0));
|
|
449
452
|
})(), () => {
|
|
450
|
-
var
|
|
451
|
-
|
|
452
|
-
for (const
|
|
453
|
-
tl(
|
|
454
|
-
(
|
|
453
|
+
var l;
|
|
454
|
+
d = !0;
|
|
455
|
+
for (const m of e)
|
|
456
|
+
tl(m.id);
|
|
457
|
+
(l = i.current) == null || l.call(i);
|
|
455
458
|
};
|
|
456
|
-
}, [e
|
|
459
|
+
}, [e]), /* @__PURE__ */ U(hs.Provider, { value: { extensions: e, components: n, ready: r }, children: [
|
|
457
460
|
/* @__PURE__ */ p("div", { ref: a, style: { display: "none" } }),
|
|
458
461
|
o
|
|
459
462
|
] });
|
|
460
463
|
}, gs = () => Zc(hs), ll = (e) => Ut.includes(e), dl = (e, t = {}) => {
|
|
461
464
|
const { surfaceId: n, logPrefix: o = "[NodeRenderer]" } = t, r = (s, a, i = 0) => {
|
|
462
|
-
var
|
|
465
|
+
var h, b, g;
|
|
463
466
|
if (s.type === "text")
|
|
464
467
|
return s.text || null;
|
|
465
468
|
if (!s.tag) return null;
|
|
466
469
|
if (s.tag === "__fragment")
|
|
467
|
-
return /* @__PURE__ */ p(I.Fragment, { children: (
|
|
470
|
+
return /* @__PURE__ */ p(I.Fragment, { children: (h = s.children) == null ? void 0 : h.map((v, y) => r(v, a, y)) }, i);
|
|
468
471
|
if (!ll(s.tag))
|
|
469
472
|
return console.warn(`${o} Unknown UI tag rejected: <${s.tag}>`), null;
|
|
470
473
|
const c = e[s.tag];
|
|
471
474
|
if (!c)
|
|
472
475
|
return s.tag.startsWith("ui-") ? (console.warn(`${o} Unregistered UI tag: <${s.tag}>`), null) : /* @__PURE__ */ p(I.Fragment, { children: (b = s.children) == null ? void 0 : b.map((v, y) => r(v, a, y)) }, i);
|
|
473
|
-
const { filtered: d, stripped:
|
|
474
|
-
|
|
476
|
+
const { filtered: d, stripped: f } = ul(s.tag, s.attrs);
|
|
477
|
+
f.length > 0 && console.warn(`${o} Attributes not allowed on <${s.tag}>, stripped: ${f.join(", ")}`);
|
|
475
478
|
const l = fl(s.tag, s.children);
|
|
476
479
|
if (l.length > 0 && console.warn(`${o} Invalid children in <${s.tag}>: ${l.join(", ")}`), s.actionId) {
|
|
477
480
|
const v = s.actionId;
|
|
@@ -493,7 +496,7 @@ const il = (e) => {
|
|
|
493
496
|
);
|
|
494
497
|
};
|
|
495
498
|
}
|
|
496
|
-
const m = (
|
|
499
|
+
const m = (g = s.children) == null ? void 0 : g.map((v, y) => r(v, a, y));
|
|
497
500
|
return /* @__PURE__ */ pn(c, { ...d, key: i }, m && m.length > 0 ? m : void 0);
|
|
498
501
|
};
|
|
499
502
|
return r;
|
|
@@ -529,10 +532,10 @@ const il = (e) => {
|
|
|
529
532
|
fallback: r = null,
|
|
530
533
|
render: s
|
|
531
534
|
}) => {
|
|
532
|
-
const { extensions: a, components: i, ready: c } = gs(), [d,
|
|
535
|
+
const { extensions: a, components: i, ready: c } = gs(), [d, f] = le({}), l = Me(""), m = Bt(() => a.filter((v) => v.enabled && v.manifest.targets.includes(e)), [a.map((v) => v.id).join(","), e]), h = Bt(() => dl(i, { surfaceId: e, logPrefix: "[ExtensionSlot]" }), [e, i]);
|
|
533
536
|
if (ce(() => {
|
|
534
537
|
const v = m.map((w) => w.id).join(",");
|
|
535
|
-
if (l.current !== v && (l.current = v,
|
|
538
|
+
if (l.current !== v && (l.current = v, f({})), !c || m.length === 0)
|
|
536
539
|
return;
|
|
537
540
|
const y = (w) => {
|
|
538
541
|
const x = w.data;
|
|
@@ -547,8 +550,8 @@ const il = (e) => {
|
|
|
547
550
|
});
|
|
548
551
|
if (!N)
|
|
549
552
|
return;
|
|
550
|
-
const T =
|
|
551
|
-
|
|
553
|
+
const T = h(x.tree, w.source ?? null);
|
|
554
|
+
f((R) => ({
|
|
552
555
|
...R,
|
|
553
556
|
[N.id]: T
|
|
554
557
|
}));
|
|
@@ -576,11 +579,11 @@ const il = (e) => {
|
|
|
576
579
|
}), () => {
|
|
577
580
|
window.removeEventListener("message", y);
|
|
578
581
|
};
|
|
579
|
-
}, [c, m, e, t,
|
|
582
|
+
}, [c, m, e, t, h]), !c)
|
|
580
583
|
return null;
|
|
581
584
|
if (m.length === 0)
|
|
582
585
|
return r ? /* @__PURE__ */ p("div", { "data-extension-slot": e, title: e, className: n, children: r }) : null;
|
|
583
|
-
const b = m.map((v) => ({ id: v.id, children: d[v.id] })).filter((v) => !!v.children),
|
|
586
|
+
const b = m.map((v) => ({ id: v.id, children: d[v.id] })).filter((v) => !!v.children), g = b.length > 0 ? b.flatMap((v, y, w) => {
|
|
584
587
|
const x = s ? s({
|
|
585
588
|
extensionId: v.id,
|
|
586
589
|
children: v.children,
|
|
@@ -600,7 +603,7 @@ const il = (e) => {
|
|
|
600
603
|
k
|
|
601
604
|
];
|
|
602
605
|
}) : r;
|
|
603
|
-
return /* @__PURE__ */ p("div", { "data-extension-slot": e, title: e, className: n, children:
|
|
606
|
+
return /* @__PURE__ */ p("div", { "data-extension-slot": e, title: e, className: n, children: g });
|
|
604
607
|
};
|
|
605
608
|
function ml(e) {
|
|
606
609
|
if (typeof document > "u") return;
|
|
@@ -827,19 +830,19 @@ class kl {
|
|
|
827
830
|
d
|
|
828
831
|
], n.error !== void 0) {
|
|
829
832
|
s = !1;
|
|
830
|
-
const
|
|
831
|
-
message:
|
|
833
|
+
const f = typeof n.error == "function" ? await n.error(d) : n.error, l = typeof n.description == "function" ? await n.description(d) : n.description, h = typeof f == "object" && !I.isValidElement(f) ? f : {
|
|
834
|
+
message: f
|
|
832
835
|
};
|
|
833
836
|
this.create({
|
|
834
837
|
id: o,
|
|
835
838
|
type: "error",
|
|
836
839
|
description: l,
|
|
837
|
-
...
|
|
840
|
+
...h
|
|
838
841
|
});
|
|
839
842
|
}
|
|
840
843
|
}).finally(() => {
|
|
841
844
|
s && (this.dismiss(o), o = void 0), n.finally == null || n.finally.call(n);
|
|
842
|
-
}), c = () => new Promise((d,
|
|
845
|
+
}), c = () => new Promise((d, f) => i.then(() => a[0] === "reject" ? f(a[1]) : d(a[1])).catch(f));
|
|
843
846
|
return typeof o != "string" && typeof o != "number" ? {
|
|
844
847
|
unwrap: c
|
|
845
848
|
} : Object.assign(o, {
|
|
@@ -881,7 +884,7 @@ function en(e) {
|
|
|
881
884
|
return e.label !== void 0;
|
|
882
885
|
}
|
|
883
886
|
const Al = 3, Il = "24px", _l = "16px", vr = 4e3, Ml = 356, Ol = 14, Ll = 45, Dl = 200;
|
|
884
|
-
function
|
|
887
|
+
function ze(...e) {
|
|
885
888
|
return e.filter(Boolean).join(" ");
|
|
886
889
|
}
|
|
887
890
|
function zl(e) {
|
|
@@ -890,7 +893,7 @@ function zl(e) {
|
|
|
890
893
|
}
|
|
891
894
|
const $l = (e) => {
|
|
892
895
|
var t, n, o, r, s, a, i, c, d;
|
|
893
|
-
const { invert:
|
|
896
|
+
const { invert: f, toast: l, unstyled: m, interacting: h, setHeights: b, visibleToasts: g, heights: v, index: y, toasts: w, expanded: x, removeToast: k, defaultRichColors: N, closeButton: T, style: R, cancelButtonStyle: S, actionButtonStyle: A, className: D = "", descriptionClassName: O = "", duration: H, position: V, gap: W, expandByDefault: Q, classNames: _, icons: G, closeButtonAriaLabel: E = "Close toast" } = e, [P, C] = I.useState(null), [L, F] = I.useState(null), [M, Y] = I.useState(!1), [j, ee] = I.useState(!1), [z, q] = I.useState(!1), [Z, ie] = I.useState(!1), [re, ne] = I.useState(!1), [ue, fe] = I.useState(0), [at, Ke] = I.useState(0), Te = I.useRef(l.duration || H || vr), Kt = I.useRef(null), be = I.useRef(null), Bc = y === 0, Hc = y + 1 <= g, xe = l.type, gt = l.dismissible !== !1, Vc = l.className || "", Wc = l.descriptionClassName || "", Xt = I.useMemo(() => v.findIndex((te) => te.toastId === l.id) || 0, [
|
|
894
897
|
v,
|
|
895
898
|
l.id
|
|
896
899
|
]), Uc = I.useMemo(() => {
|
|
@@ -905,7 +908,7 @@ const $l = (e) => {
|
|
|
905
908
|
]), Yn = I.useRef(0), vt = I.useRef(0), dr = I.useRef(0), bt = I.useRef(null), [jc, Gc] = V.split("-"), ur = I.useMemo(() => v.reduce((te, me, ge) => ge >= Xt ? te : te + me.height, 0), [
|
|
906
909
|
v,
|
|
907
910
|
Xt
|
|
908
|
-
]), fr = Cl(), Yc = l.invert ||
|
|
911
|
+
]), fr = Cl(), Yc = l.invert || f, qn = xe === "loading";
|
|
909
912
|
vt.current = I.useMemo(() => Xt * W + ur, [
|
|
910
913
|
Xt,
|
|
911
914
|
ur
|
|
@@ -970,7 +973,7 @@ const $l = (e) => {
|
|
|
970
973
|
I.useEffect(() => {
|
|
971
974
|
if (l.promise && xe === "loading" || l.duration === 1 / 0 || l.type === "loading") return;
|
|
972
975
|
let te;
|
|
973
|
-
return x ||
|
|
976
|
+
return x || h || fr ? (() => {
|
|
974
977
|
if (dr.current < Yn.current) {
|
|
975
978
|
const Se = (/* @__PURE__ */ new Date()).getTime() - Yn.current;
|
|
976
979
|
Te.current = Te.current - Se;
|
|
@@ -983,7 +986,7 @@ const $l = (e) => {
|
|
|
983
986
|
})(), () => clearTimeout(te);
|
|
984
987
|
}, [
|
|
985
988
|
x,
|
|
986
|
-
|
|
989
|
+
h,
|
|
987
990
|
l,
|
|
988
991
|
xe,
|
|
989
992
|
fr,
|
|
@@ -999,12 +1002,12 @@ const $l = (e) => {
|
|
|
999
1002
|
if (G != null && G.loading) {
|
|
1000
1003
|
var me;
|
|
1001
1004
|
return /* @__PURE__ */ I.createElement("div", {
|
|
1002
|
-
className:
|
|
1005
|
+
className: ze(_ == null ? void 0 : _.loader, l == null || (me = l.classNames) == null ? void 0 : me.loader, "sonner-loader"),
|
|
1003
1006
|
"data-visible": xe === "loading"
|
|
1004
1007
|
}, G.loading);
|
|
1005
1008
|
}
|
|
1006
1009
|
return /* @__PURE__ */ I.createElement(vl, {
|
|
1007
|
-
className:
|
|
1010
|
+
className: ze(_ == null ? void 0 : _.loader, l == null || (te = l.classNames) == null ? void 0 : te.loader),
|
|
1008
1011
|
visible: xe === "loading"
|
|
1009
1012
|
});
|
|
1010
1013
|
}
|
|
@@ -1013,7 +1016,7 @@ const $l = (e) => {
|
|
|
1013
1016
|
return /* @__PURE__ */ I.createElement("li", {
|
|
1014
1017
|
tabIndex: 0,
|
|
1015
1018
|
ref: be,
|
|
1016
|
-
className:
|
|
1019
|
+
className: ze(D, Vc, _ == null ? void 0 : _.toast, l == null || (t = l.classNames) == null ? void 0 : t.toast, _ == null ? void 0 : _.default, _ == null ? void 0 : _[xe], l == null || (n = l.classNames) == null ? void 0 : n[xe]),
|
|
1017
1020
|
"data-sonner-toast": "",
|
|
1018
1021
|
"data-rich-colors": (pr = l.richColors) != null ? pr : N,
|
|
1019
1022
|
"data-styled": !(l.jsx || l.unstyled || m),
|
|
@@ -1103,19 +1106,19 @@ const $l = (e) => {
|
|
|
1103
1106
|
} : () => {
|
|
1104
1107
|
Xe(), l.onDismiss == null || l.onDismiss.call(l, l);
|
|
1105
1108
|
},
|
|
1106
|
-
className:
|
|
1109
|
+
className: ze(_ == null ? void 0 : _.closeButton, l == null || (o = l.classNames) == null ? void 0 : o.closeButton)
|
|
1107
1110
|
}, (mr = G == null ? void 0 : G.close) != null ? mr : Sl) : null, (xe || l.icon || l.promise) && l.icon !== null && ((G == null ? void 0 : G[xe]) !== null || l.icon) ? /* @__PURE__ */ I.createElement("div", {
|
|
1108
1111
|
"data-icon": "",
|
|
1109
|
-
className:
|
|
1112
|
+
className: ze(_ == null ? void 0 : _.icon, l == null || (r = l.classNames) == null ? void 0 : r.icon)
|
|
1110
1113
|
}, l.promise || l.type === "loading" && !l.icon ? l.icon || qc() : null, l.type !== "loading" ? Kc : null) : null, /* @__PURE__ */ I.createElement("div", {
|
|
1111
1114
|
"data-content": "",
|
|
1112
|
-
className:
|
|
1115
|
+
className: ze(_ == null ? void 0 : _.content, l == null || (s = l.classNames) == null ? void 0 : s.content)
|
|
1113
1116
|
}, /* @__PURE__ */ I.createElement("div", {
|
|
1114
1117
|
"data-title": "",
|
|
1115
|
-
className:
|
|
1118
|
+
className: ze(_ == null ? void 0 : _.title, l == null || (a = l.classNames) == null ? void 0 : a.title)
|
|
1116
1119
|
}, l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title), l.description ? /* @__PURE__ */ I.createElement("div", {
|
|
1117
1120
|
"data-description": "",
|
|
1118
|
-
className:
|
|
1121
|
+
className: ze(O, Wc, _ == null ? void 0 : _.description, l == null || (i = l.classNames) == null ? void 0 : i.description)
|
|
1119
1122
|
}, typeof l.description == "function" ? l.description() : l.description) : null), /* @__PURE__ */ I.isValidElement(l.cancel) ? l.cancel : l.cancel && en(l.cancel) ? /* @__PURE__ */ I.createElement("button", {
|
|
1120
1123
|
"data-button": !0,
|
|
1121
1124
|
"data-cancel": !0,
|
|
@@ -1123,7 +1126,7 @@ const $l = (e) => {
|
|
|
1123
1126
|
onClick: (te) => {
|
|
1124
1127
|
en(l.cancel) && gt && (l.cancel.onClick == null || l.cancel.onClick.call(l.cancel, te), Xe());
|
|
1125
1128
|
},
|
|
1126
|
-
className:
|
|
1129
|
+
className: ze(_ == null ? void 0 : _.cancelButton, l == null || (c = l.classNames) == null ? void 0 : c.cancelButton)
|
|
1127
1130
|
}, l.cancel.label) : null, /* @__PURE__ */ I.isValidElement(l.action) ? l.action : l.action && en(l.action) ? /* @__PURE__ */ I.createElement("button", {
|
|
1128
1131
|
"data-button": !0,
|
|
1129
1132
|
"data-action": !0,
|
|
@@ -1131,7 +1134,7 @@ const $l = (e) => {
|
|
|
1131
1134
|
onClick: (te) => {
|
|
1132
1135
|
en(l.action) && (l.action.onClick == null || l.action.onClick.call(l.action, te), !te.defaultPrevented && Xe());
|
|
1133
1136
|
},
|
|
1134
|
-
className:
|
|
1137
|
+
className: ze(_ == null ? void 0 : _.actionButton, l == null || (d = l.classNames) == null ? void 0 : d.actionButton)
|
|
1135
1138
|
}, l.action.label) : null);
|
|
1136
1139
|
};
|
|
1137
1140
|
function br() {
|
|
@@ -1152,8 +1155,8 @@ function Fl(e, t) {
|
|
|
1152
1155
|
"right",
|
|
1153
1156
|
"bottom",
|
|
1154
1157
|
"left"
|
|
1155
|
-
].forEach((
|
|
1156
|
-
n[`${a}-${
|
|
1158
|
+
].forEach((f) => {
|
|
1159
|
+
n[`${a}-${f}`] = typeof d == "number" ? `${d}px` : d;
|
|
1157
1160
|
});
|
|
1158
1161
|
}
|
|
1159
1162
|
typeof o == "number" || typeof o == "string" ? c(o) : typeof o == "object" ? [
|
|
@@ -1170,7 +1173,7 @@ const Bl = /* @__PURE__ */ I.forwardRef(function(t, n) {
|
|
|
1170
1173
|
const { id: o, invert: r, position: s = "bottom-right", hotkey: a = [
|
|
1171
1174
|
"altKey",
|
|
1172
1175
|
"KeyT"
|
|
1173
|
-
], expand: i, closeButton: c, className: d, offset:
|
|
1176
|
+
], expand: i, closeButton: c, className: d, offset: f, mobileOffset: l, theme: m = "light", richColors: h, duration: b, style: g, visibleToasts: v = Al, toastOptions: y, dir: w = br(), gap: x = Ol, icons: k, containerAriaLabel: N = "Notifications" } = t, [T, R] = I.useState([]), S = I.useMemo(() => o ? T.filter((M) => M.toasterId === o) : T.filter((M) => !M.toasterId), [
|
|
1174
1177
|
T,
|
|
1175
1178
|
o
|
|
1176
1179
|
]), A = I.useMemo(() => Array.from(new Set([
|
|
@@ -1287,8 +1290,8 @@ const Bl = /* @__PURE__ */ I.forwardRef(function(t, n) {
|
|
|
1287
1290
|
"--front-toast-height": `${((j = D[0]) == null ? void 0 : j.height) || 0}px`,
|
|
1288
1291
|
"--width": `${Ml}px`,
|
|
1289
1292
|
"--gap": `${x}px`,
|
|
1290
|
-
...
|
|
1291
|
-
...Fl(
|
|
1293
|
+
...g,
|
|
1294
|
+
...Fl(f, l)
|
|
1292
1295
|
},
|
|
1293
1296
|
onBlur: (q) => {
|
|
1294
1297
|
L.current && !q.currentTarget.contains(q.relatedTarget) && (L.current = !1, C.current && (C.current.focus({
|
|
@@ -1315,7 +1318,7 @@ const Bl = /* @__PURE__ */ I.forwardRef(function(t, n) {
|
|
|
1315
1318
|
icons: k,
|
|
1316
1319
|
index: Z,
|
|
1317
1320
|
toast: q,
|
|
1318
|
-
defaultRichColors:
|
|
1321
|
+
defaultRichColors: h,
|
|
1319
1322
|
duration: (ie = y == null ? void 0 : y.duration) != null ? ie : b,
|
|
1320
1323
|
className: y == null ? void 0 : y.className,
|
|
1321
1324
|
descriptionClassName: y == null ? void 0 : y.descriptionClassName,
|
|
@@ -1503,7 +1506,7 @@ const Kl = us(
|
|
|
1503
1506
|
...i
|
|
1504
1507
|
},
|
|
1505
1508
|
[
|
|
1506
|
-
...a.map(([d,
|
|
1509
|
+
...a.map(([d, f]) => pn(d, f)),
|
|
1507
1510
|
...Array.isArray(s) ? s : [s]
|
|
1508
1511
|
]
|
|
1509
1512
|
)
|
|
@@ -2028,9 +2031,9 @@ const tu = (e, t) => {
|
|
|
2028
2031
|
return;
|
|
2029
2032
|
const i = t === 0 ? e.join(mn) : e.slice(t).join(mn), c = a.length;
|
|
2030
2033
|
for (let d = 0; d < c; d++) {
|
|
2031
|
-
const
|
|
2032
|
-
if (
|
|
2033
|
-
return
|
|
2034
|
+
const f = a[d];
|
|
2035
|
+
if (f.validator(i))
|
|
2036
|
+
return f.classGroupId;
|
|
2034
2037
|
}
|
|
2035
2038
|
}, su = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
2036
2039
|
const t = e.slice(1, -1), n = t.indexOf(":"), o = t.slice(0, n);
|
|
@@ -2126,32 +2129,32 @@ const tu = (e, t) => {
|
|
|
2126
2129
|
let o = (r) => {
|
|
2127
2130
|
const s = [];
|
|
2128
2131
|
let a = 0, i = 0, c = 0, d;
|
|
2129
|
-
const
|
|
2130
|
-
for (let
|
|
2131
|
-
const v = r[
|
|
2132
|
+
const f = r.length;
|
|
2133
|
+
for (let g = 0; g < f; g++) {
|
|
2134
|
+
const v = r[g];
|
|
2132
2135
|
if (a === 0 && i === 0) {
|
|
2133
2136
|
if (v === Cr) {
|
|
2134
|
-
s.push(r.slice(c,
|
|
2137
|
+
s.push(r.slice(c, g)), c = g + 1;
|
|
2135
2138
|
continue;
|
|
2136
2139
|
}
|
|
2137
2140
|
if (v === "/") {
|
|
2138
|
-
d =
|
|
2141
|
+
d = g;
|
|
2139
2142
|
continue;
|
|
2140
2143
|
}
|
|
2141
2144
|
}
|
|
2142
2145
|
v === "[" ? a++ : v === "]" ? a-- : v === "(" ? i++ : v === ")" && i--;
|
|
2143
2146
|
}
|
|
2144
2147
|
const l = s.length === 0 ? r : r.slice(c);
|
|
2145
|
-
let m = l,
|
|
2146
|
-
l.endsWith(ho) ? (m = l.slice(0, -1),
|
|
2148
|
+
let m = l, h = !1;
|
|
2149
|
+
l.endsWith(ho) ? (m = l.slice(0, -1), h = !0) : (
|
|
2147
2150
|
/**
|
|
2148
2151
|
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
2149
2152
|
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
2150
2153
|
*/
|
|
2151
|
-
l.startsWith(ho) && (m = l.slice(1),
|
|
2154
|
+
l.startsWith(ho) && (m = l.slice(1), h = !0)
|
|
2152
2155
|
);
|
|
2153
2156
|
const b = d && d > c ? d - c : void 0;
|
|
2154
|
-
return kr(s,
|
|
2157
|
+
return kr(s, h, m, b);
|
|
2155
2158
|
};
|
|
2156
2159
|
if (t) {
|
|
2157
2160
|
const r = t + Cr, s = o;
|
|
@@ -2192,30 +2195,30 @@ const tu = (e, t) => {
|
|
|
2192
2195
|
} = t, a = [], i = e.trim().split(bu);
|
|
2193
2196
|
let c = "";
|
|
2194
2197
|
for (let d = i.length - 1; d >= 0; d -= 1) {
|
|
2195
|
-
const
|
|
2198
|
+
const f = i[d], {
|
|
2196
2199
|
isExternal: l,
|
|
2197
2200
|
modifiers: m,
|
|
2198
|
-
hasImportantModifier:
|
|
2201
|
+
hasImportantModifier: h,
|
|
2199
2202
|
baseClassName: b,
|
|
2200
|
-
maybePostfixModifierPosition:
|
|
2201
|
-
} = n(
|
|
2203
|
+
maybePostfixModifierPosition: g
|
|
2204
|
+
} = n(f);
|
|
2202
2205
|
if (l) {
|
|
2203
|
-
c =
|
|
2206
|
+
c = f + (c.length > 0 ? " " + c : c);
|
|
2204
2207
|
continue;
|
|
2205
2208
|
}
|
|
2206
|
-
let v = !!
|
|
2209
|
+
let v = !!g, y = o(v ? b.substring(0, g) : b);
|
|
2207
2210
|
if (!y) {
|
|
2208
2211
|
if (!v) {
|
|
2209
|
-
c =
|
|
2212
|
+
c = f + (c.length > 0 ? " " + c : c);
|
|
2210
2213
|
continue;
|
|
2211
2214
|
}
|
|
2212
2215
|
if (y = o(b), !y) {
|
|
2213
|
-
c =
|
|
2216
|
+
c = f + (c.length > 0 ? " " + c : c);
|
|
2214
2217
|
continue;
|
|
2215
2218
|
}
|
|
2216
2219
|
v = !1;
|
|
2217
2220
|
}
|
|
2218
|
-
const w = m.length === 0 ? "" : m.length === 1 ? m[0] : s(m).join(":"), x =
|
|
2221
|
+
const w = m.length === 0 ? "" : m.length === 1 ? m[0] : s(m).join(":"), x = h ? w + ho : w, k = x + y;
|
|
2219
2222
|
if (a.indexOf(k) > -1)
|
|
2220
2223
|
continue;
|
|
2221
2224
|
a.push(k);
|
|
@@ -2224,7 +2227,7 @@ const tu = (e, t) => {
|
|
|
2224
2227
|
const R = N[T];
|
|
2225
2228
|
a.push(x + R);
|
|
2226
2229
|
}
|
|
2227
|
-
c =
|
|
2230
|
+
c = f + (c.length > 0 ? " " + c : c);
|
|
2228
2231
|
}
|
|
2229
2232
|
return c;
|
|
2230
2233
|
}, wu = (...e) => {
|
|
@@ -2242,14 +2245,14 @@ const tu = (e, t) => {
|
|
|
2242
2245
|
}, xu = (e, ...t) => {
|
|
2243
2246
|
let n, o, r, s;
|
|
2244
2247
|
const a = (c) => {
|
|
2245
|
-
const d = t.reduce((
|
|
2248
|
+
const d = t.reduce((f, l) => l(f), e());
|
|
2246
2249
|
return n = vu(d), o = n.cache.get, r = n.cache.set, s = i, i(c);
|
|
2247
2250
|
}, i = (c) => {
|
|
2248
2251
|
const d = o(c);
|
|
2249
2252
|
if (d)
|
|
2250
2253
|
return d;
|
|
2251
|
-
const
|
|
2252
|
-
return r(c,
|
|
2254
|
+
const f = yu(c, n);
|
|
2255
|
+
return r(c, f), f;
|
|
2253
2256
|
};
|
|
2254
2257
|
return s = a, (...c) => s(wu(...c));
|
|
2255
2258
|
}, Su = [], pe = (e) => {
|
|
@@ -2267,7 +2270,7 @@ const tu = (e, t) => {
|
|
|
2267
2270
|
const o = Os.exec(e);
|
|
2268
2271
|
return o ? o[1] ? t(o[1]) : n : !1;
|
|
2269
2272
|
}, Ds = (e) => e === "position" || e === "percentage", zs = (e) => e === "image" || e === "url", $s = (e) => e === "length" || e === "size" || e === "bg-size", Fs = (e) => e === "length", Hu = (e) => e === "number", Bs = (e) => e === "family-name", Hs = (e) => e === "number" || e === "weight", Vs = (e) => e === "shadow", Vu = () => {
|
|
2270
|
-
const e = pe("color"), t = pe("font"), n = pe("text"), o = pe("font-weight"), r = pe("tracking"), s = pe("leading"), a = pe("breakpoint"), i = pe("container"), c = pe("spacing"), d = pe("radius"),
|
|
2273
|
+
const e = pe("color"), t = pe("font"), n = pe("text"), o = pe("font-weight"), r = pe("tracking"), s = pe("leading"), a = pe("breakpoint"), i = pe("container"), c = pe("spacing"), d = pe("radius"), f = pe("shadow"), l = pe("inset-shadow"), m = pe("text-shadow"), h = pe("drop-shadow"), b = pe("blur"), g = pe("perspective"), v = pe("aspect"), y = pe("ease"), w = pe("animate"), x = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], k = () => [
|
|
2271
2274
|
"center",
|
|
2272
2275
|
"top",
|
|
2273
2276
|
"bottom",
|
|
@@ -3788,7 +3791,7 @@ const tu = (e, t) => {
|
|
|
3788
3791
|
// Deprecated since Tailwind CSS v4.0.0
|
|
3789
3792
|
"",
|
|
3790
3793
|
"none",
|
|
3791
|
-
|
|
3794
|
+
f,
|
|
3792
3795
|
nn,
|
|
3793
3796
|
tn
|
|
3794
3797
|
]
|
|
@@ -4144,7 +4147,7 @@ const tu = (e, t) => {
|
|
|
4144
4147
|
// Deprecated since Tailwind CSS v4.0.0
|
|
4145
4148
|
"",
|
|
4146
4149
|
"none",
|
|
4147
|
-
|
|
4150
|
+
h,
|
|
4148
4151
|
nn,
|
|
4149
4152
|
tn
|
|
4150
4153
|
]
|
|
@@ -4372,7 +4375,7 @@ const tu = (e, t) => {
|
|
|
4372
4375
|
* @see https://tailwindcss.com/docs/perspective
|
|
4373
4376
|
*/
|
|
4374
4377
|
perspective: [{
|
|
4375
|
-
perspective: [
|
|
4378
|
+
perspective: [g, B, $]
|
|
4376
4379
|
}],
|
|
4377
4380
|
/**
|
|
4378
4381
|
* Perspective Origin
|
|
@@ -4936,24 +4939,24 @@ const Tr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Pr = Ts, E
|
|
|
4936
4939
|
var o;
|
|
4937
4940
|
if ((t == null ? void 0 : t.variants) == null) return Pr(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
|
|
4938
4941
|
const { variants: r, defaultVariants: s } = t, a = Object.keys(r).map((d) => {
|
|
4939
|
-
const
|
|
4940
|
-
if (
|
|
4941
|
-
const m = Tr(
|
|
4942
|
+
const f = n == null ? void 0 : n[d], l = s == null ? void 0 : s[d];
|
|
4943
|
+
if (f === null) return null;
|
|
4944
|
+
const m = Tr(f) || Tr(l);
|
|
4942
4945
|
return r[d][m];
|
|
4943
|
-
}), i = n && Object.entries(n).reduce((d,
|
|
4944
|
-
let [l, m] =
|
|
4946
|
+
}), i = n && Object.entries(n).reduce((d, f) => {
|
|
4947
|
+
let [l, m] = f;
|
|
4945
4948
|
return m === void 0 || (d[l] = m), d;
|
|
4946
|
-
}, {}), c = t == null || (o = t.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((d,
|
|
4947
|
-
let { class: l, className: m, ...
|
|
4948
|
-
return Object.entries(
|
|
4949
|
-
let [
|
|
4949
|
+
}, {}), c = t == null || (o = t.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((d, f) => {
|
|
4950
|
+
let { class: l, className: m, ...h } = f;
|
|
4951
|
+
return Object.entries(h).every((b) => {
|
|
4952
|
+
let [g, v] = b;
|
|
4950
4953
|
return Array.isArray(v) ? v.includes({
|
|
4951
4954
|
...s,
|
|
4952
4955
|
...i
|
|
4953
|
-
}[
|
|
4956
|
+
}[g]) : {
|
|
4954
4957
|
...s,
|
|
4955
4958
|
...i
|
|
4956
|
-
}[
|
|
4959
|
+
}[g] === v;
|
|
4957
4960
|
}) ? [
|
|
4958
4961
|
...d,
|
|
4959
4962
|
l,
|
|
@@ -4984,15 +4987,15 @@ function Ws(...e) {
|
|
|
4984
4987
|
};
|
|
4985
4988
|
}
|
|
4986
4989
|
function ae(...e) {
|
|
4987
|
-
return
|
|
4990
|
+
return u.useCallback(Ws(...e), e);
|
|
4988
4991
|
}
|
|
4989
4992
|
// @__NO_SIDE_EFFECTS__
|
|
4990
4993
|
function Ht(e) {
|
|
4991
|
-
const t = /* @__PURE__ */ ju(e), n =
|
|
4992
|
-
const { children: s, ...a } = o, i =
|
|
4994
|
+
const t = /* @__PURE__ */ ju(e), n = u.forwardRef((o, r) => {
|
|
4995
|
+
const { children: s, ...a } = o, i = u.Children.toArray(s), c = i.find(Yu);
|
|
4993
4996
|
if (c) {
|
|
4994
|
-
const d = c.props.children,
|
|
4995
|
-
return /* @__PURE__ */ p(t, { ...a, ref: r, children:
|
|
4997
|
+
const d = c.props.children, f = i.map((l) => l === c ? u.Children.count(d) > 1 ? u.Children.only(null) : u.isValidElement(d) ? d.props.children : null : l);
|
|
4998
|
+
return /* @__PURE__ */ p(t, { ...a, ref: r, children: u.isValidElement(d) ? u.cloneElement(d, void 0, f) : null });
|
|
4996
4999
|
}
|
|
4997
5000
|
return /* @__PURE__ */ p(t, { ...a, ref: r, children: s });
|
|
4998
5001
|
});
|
|
@@ -5001,13 +5004,13 @@ function Ht(e) {
|
|
|
5001
5004
|
var Us = /* @__PURE__ */ Ht("Slot");
|
|
5002
5005
|
// @__NO_SIDE_EFFECTS__
|
|
5003
5006
|
function ju(e) {
|
|
5004
|
-
const t =
|
|
5007
|
+
const t = u.forwardRef((n, o) => {
|
|
5005
5008
|
const { children: r, ...s } = n;
|
|
5006
|
-
if (
|
|
5009
|
+
if (u.isValidElement(r)) {
|
|
5007
5010
|
const a = Ku(r), i = qu(s, r.props);
|
|
5008
|
-
return r.type !==
|
|
5011
|
+
return r.type !== u.Fragment && (i.ref = o ? Ws(o, a) : a), u.cloneElement(r, i);
|
|
5009
5012
|
}
|
|
5010
|
-
return
|
|
5013
|
+
return u.Children.count(r) > 1 ? u.Children.only(null) : null;
|
|
5011
5014
|
});
|
|
5012
5015
|
return t.displayName = `${e}.SlotClone`, t;
|
|
5013
5016
|
}
|
|
@@ -5018,7 +5021,7 @@ function Gu(e) {
|
|
|
5018
5021
|
return t.displayName = `${e}.Slottable`, t.__radixId = js, t;
|
|
5019
5022
|
}
|
|
5020
5023
|
function Yu(e) {
|
|
5021
|
-
return
|
|
5024
|
+
return u.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === js;
|
|
5022
5025
|
}
|
|
5023
5026
|
function qu(e, t) {
|
|
5024
5027
|
const n = { ...t };
|
|
@@ -5055,7 +5058,7 @@ var Xu = [
|
|
|
5055
5058
|
"svg",
|
|
5056
5059
|
"ul"
|
|
5057
5060
|
], X = Xu.reduce((e, t) => {
|
|
5058
|
-
const n = /* @__PURE__ */ Ht(`Primitive.${t}`), o =
|
|
5061
|
+
const n = /* @__PURE__ */ Ht(`Primitive.${t}`), o = u.forwardRef((r, s) => {
|
|
5059
5062
|
const { asChild: a, ...i } = r, c = a ? n : t;
|
|
5060
5063
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(c, { ...i, ref: s });
|
|
5061
5064
|
});
|
|
@@ -5076,7 +5079,7 @@ var Gs = Object.freeze({
|
|
|
5076
5079
|
clip: "rect(0, 0, 0, 0)",
|
|
5077
5080
|
whiteSpace: "nowrap",
|
|
5078
5081
|
wordWrap: "normal"
|
|
5079
|
-
}), Ju = "VisuallyHidden", Ys =
|
|
5082
|
+
}), Ju = "VisuallyHidden", Ys = u.forwardRef(
|
|
5080
5083
|
(e, t) => /* @__PURE__ */ p(
|
|
5081
5084
|
X.span,
|
|
5082
5085
|
{
|
|
@@ -5091,28 +5094,28 @@ var Qu = Ys;
|
|
|
5091
5094
|
function we(e, t = []) {
|
|
5092
5095
|
let n = [];
|
|
5093
5096
|
function o(s, a) {
|
|
5094
|
-
const i =
|
|
5097
|
+
const i = u.createContext(a), c = n.length;
|
|
5095
5098
|
n = [...n, a];
|
|
5096
5099
|
const d = (l) => {
|
|
5097
5100
|
var y;
|
|
5098
|
-
const { scope: m, children:
|
|
5099
|
-
return /* @__PURE__ */ p(
|
|
5101
|
+
const { scope: m, children: h, ...b } = l, g = ((y = m == null ? void 0 : m[e]) == null ? void 0 : y[c]) || i, v = u.useMemo(() => b, Object.values(b));
|
|
5102
|
+
return /* @__PURE__ */ p(g.Provider, { value: v, children: h });
|
|
5100
5103
|
};
|
|
5101
5104
|
d.displayName = s + "Provider";
|
|
5102
|
-
function
|
|
5103
|
-
var
|
|
5104
|
-
const
|
|
5105
|
+
function f(l, m) {
|
|
5106
|
+
var g;
|
|
5107
|
+
const h = ((g = m == null ? void 0 : m[e]) == null ? void 0 : g[c]) || i, b = u.useContext(h);
|
|
5105
5108
|
if (b) return b;
|
|
5106
5109
|
if (a !== void 0) return a;
|
|
5107
5110
|
throw new Error(`\`${l}\` must be used within \`${s}\``);
|
|
5108
5111
|
}
|
|
5109
|
-
return [d,
|
|
5112
|
+
return [d, f];
|
|
5110
5113
|
}
|
|
5111
5114
|
const r = () => {
|
|
5112
|
-
const s = n.map((a) =>
|
|
5115
|
+
const s = n.map((a) => u.createContext(a));
|
|
5113
5116
|
return function(i) {
|
|
5114
5117
|
const c = (i == null ? void 0 : i[e]) || s;
|
|
5115
|
-
return
|
|
5118
|
+
return u.useMemo(
|
|
5116
5119
|
() => ({ [`__scope${e}`]: { ...i, [e]: c } }),
|
|
5117
5120
|
[i, c]
|
|
5118
5121
|
);
|
|
@@ -5133,7 +5136,7 @@ function ef(...e) {
|
|
|
5133
5136
|
const l = c(s)[`__scope${d}`];
|
|
5134
5137
|
return { ...i, ...l };
|
|
5135
5138
|
}, {});
|
|
5136
|
-
return
|
|
5139
|
+
return u.useMemo(() => ({ [`__scope${t.scopeName}`]: a }), [a]);
|
|
5137
5140
|
};
|
|
5138
5141
|
};
|
|
5139
5142
|
return n.scopeName = t.scopeName, n;
|
|
@@ -5142,27 +5145,27 @@ function qs(e) {
|
|
|
5142
5145
|
const t = e + "CollectionProvider", [n, o] = we(t), [r, s] = n(
|
|
5143
5146
|
t,
|
|
5144
5147
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
5145
|
-
), a = (
|
|
5146
|
-
const { scope: v, children: y } =
|
|
5148
|
+
), a = (g) => {
|
|
5149
|
+
const { scope: v, children: y } = g, w = I.useRef(null), x = I.useRef(/* @__PURE__ */ new Map()).current;
|
|
5147
5150
|
return /* @__PURE__ */ p(r, { scope: v, itemMap: x, collectionRef: w, children: y });
|
|
5148
5151
|
};
|
|
5149
5152
|
a.displayName = t;
|
|
5150
5153
|
const i = e + "CollectionSlot", c = /* @__PURE__ */ Ht(i), d = I.forwardRef(
|
|
5151
|
-
(
|
|
5152
|
-
const { scope: y, children: w } =
|
|
5154
|
+
(g, v) => {
|
|
5155
|
+
const { scope: y, children: w } = g, x = s(i, y), k = ae(v, x.collectionRef);
|
|
5153
5156
|
return /* @__PURE__ */ p(c, { ref: k, children: w });
|
|
5154
5157
|
}
|
|
5155
5158
|
);
|
|
5156
5159
|
d.displayName = i;
|
|
5157
|
-
const
|
|
5158
|
-
(
|
|
5159
|
-
const { scope: y, children: w, ...x } =
|
|
5160
|
+
const f = e + "CollectionItemSlot", l = "data-radix-collection-item", m = /* @__PURE__ */ Ht(f), h = I.forwardRef(
|
|
5161
|
+
(g, v) => {
|
|
5162
|
+
const { scope: y, children: w, ...x } = g, k = I.useRef(null), N = ae(v, k), T = s(f, y);
|
|
5160
5163
|
return I.useEffect(() => (T.itemMap.set(k, { ref: k, ...x }), () => void T.itemMap.delete(k))), /* @__PURE__ */ p(m, { [l]: "", ref: N, children: w });
|
|
5161
5164
|
}
|
|
5162
5165
|
);
|
|
5163
|
-
|
|
5164
|
-
function b(
|
|
5165
|
-
const v = s(e + "CollectionConsumer",
|
|
5166
|
+
h.displayName = f;
|
|
5167
|
+
function b(g) {
|
|
5168
|
+
const v = s(e + "CollectionConsumer", g);
|
|
5166
5169
|
return I.useCallback(() => {
|
|
5167
5170
|
const w = v.collectionRef.current;
|
|
5168
5171
|
if (!w) return [];
|
|
@@ -5173,7 +5176,7 @@ function qs(e) {
|
|
|
5173
5176
|
}, [v.collectionRef, v.itemMap]);
|
|
5174
5177
|
}
|
|
5175
5178
|
return [
|
|
5176
|
-
{ Provider: a, Slot: d, ItemSlot:
|
|
5179
|
+
{ Provider: a, Slot: d, ItemSlot: h },
|
|
5177
5180
|
b,
|
|
5178
5181
|
o
|
|
5179
5182
|
];
|
|
@@ -5184,8 +5187,8 @@ function J(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
|
5184
5187
|
return t == null ? void 0 : t(r);
|
|
5185
5188
|
};
|
|
5186
5189
|
}
|
|
5187
|
-
var de = globalThis != null && globalThis.document ?
|
|
5188
|
-
}, tf =
|
|
5190
|
+
var de = globalThis != null && globalThis.document ? u.useLayoutEffect : () => {
|
|
5191
|
+
}, tf = u[" useInsertionEffect ".trim().toString()] || de;
|
|
5189
5192
|
function je({
|
|
5190
5193
|
prop: e,
|
|
5191
5194
|
defaultProp: t,
|
|
@@ -5198,22 +5201,22 @@ function je({
|
|
|
5198
5201
|
onChange: n
|
|
5199
5202
|
}), i = e !== void 0, c = i ? e : r;
|
|
5200
5203
|
{
|
|
5201
|
-
const
|
|
5202
|
-
|
|
5203
|
-
const l =
|
|
5204
|
+
const f = u.useRef(e !== void 0);
|
|
5205
|
+
u.useEffect(() => {
|
|
5206
|
+
const l = f.current;
|
|
5204
5207
|
l !== i && console.warn(
|
|
5205
5208
|
`${o} is changing from ${l ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
5206
|
-
),
|
|
5209
|
+
), f.current = i;
|
|
5207
5210
|
}, [i, o]);
|
|
5208
5211
|
}
|
|
5209
|
-
const d =
|
|
5210
|
-
(
|
|
5212
|
+
const d = u.useCallback(
|
|
5213
|
+
(f) => {
|
|
5211
5214
|
var l;
|
|
5212
5215
|
if (i) {
|
|
5213
|
-
const m = of(
|
|
5216
|
+
const m = of(f) ? f(e) : f;
|
|
5214
5217
|
m !== e && ((l = a.current) == null || l.call(a, m));
|
|
5215
5218
|
} else
|
|
5216
|
-
s(
|
|
5219
|
+
s(f);
|
|
5217
5220
|
},
|
|
5218
5221
|
[i, e, s, a]
|
|
5219
5222
|
);
|
|
@@ -5223,10 +5226,10 @@ function nf({
|
|
|
5223
5226
|
defaultProp: e,
|
|
5224
5227
|
onChange: t
|
|
5225
5228
|
}) {
|
|
5226
|
-
const [n, o] =
|
|
5229
|
+
const [n, o] = u.useState(e), r = u.useRef(n), s = u.useRef(t);
|
|
5227
5230
|
return tf(() => {
|
|
5228
5231
|
s.current = t;
|
|
5229
|
-
}, [t]),
|
|
5232
|
+
}, [t]), u.useEffect(() => {
|
|
5230
5233
|
var a;
|
|
5231
5234
|
r.current !== n && ((a = s.current) == null || a.call(s, n), r.current = n);
|
|
5232
5235
|
}, [n, r]), [n, o, s];
|
|
@@ -5235,15 +5238,15 @@ function of(e) {
|
|
|
5235
5238
|
return typeof e == "function";
|
|
5236
5239
|
}
|
|
5237
5240
|
function rf(e, t) {
|
|
5238
|
-
return
|
|
5241
|
+
return u.useReducer((n, o) => t[n][o] ?? n, e);
|
|
5239
5242
|
}
|
|
5240
|
-
var
|
|
5241
|
-
const { present: t, children: n } = e, o = sf(t), r = typeof n == "function" ? n({ present: o.isPresent }) :
|
|
5242
|
-
return typeof n == "function" || o.isPresent ?
|
|
5243
|
+
var De = (e) => {
|
|
5244
|
+
const { present: t, children: n } = e, o = sf(t), r = typeof n == "function" ? n({ present: o.isPresent }) : u.Children.only(n), s = ae(o.ref, af(r));
|
|
5245
|
+
return typeof n == "function" || o.isPresent ? u.cloneElement(r, { ref: s }) : null;
|
|
5243
5246
|
};
|
|
5244
|
-
|
|
5247
|
+
De.displayName = "Presence";
|
|
5245
5248
|
function sf(e) {
|
|
5246
|
-
const [t, n] =
|
|
5249
|
+
const [t, n] = u.useState(), o = u.useRef(null), r = u.useRef(e), s = u.useRef("none"), a = e ? "mounted" : "unmounted", [i, c] = rf(a, {
|
|
5247
5250
|
mounted: {
|
|
5248
5251
|
UNMOUNT: "unmounted",
|
|
5249
5252
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -5256,37 +5259,37 @@ function sf(e) {
|
|
|
5256
5259
|
MOUNT: "mounted"
|
|
5257
5260
|
}
|
|
5258
5261
|
});
|
|
5259
|
-
return
|
|
5262
|
+
return u.useEffect(() => {
|
|
5260
5263
|
const d = on(o.current);
|
|
5261
5264
|
s.current = i === "mounted" ? d : "none";
|
|
5262
5265
|
}, [i]), de(() => {
|
|
5263
|
-
const d = o.current,
|
|
5264
|
-
if (
|
|
5265
|
-
const m = s.current,
|
|
5266
|
-
e ? c("MOUNT") :
|
|
5266
|
+
const d = o.current, f = r.current;
|
|
5267
|
+
if (f !== e) {
|
|
5268
|
+
const m = s.current, h = on(d);
|
|
5269
|
+
e ? c("MOUNT") : h === "none" || (d == null ? void 0 : d.display) === "none" ? c("UNMOUNT") : c(f && m !== h ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
|
|
5267
5270
|
}
|
|
5268
5271
|
}, [e, c]), de(() => {
|
|
5269
5272
|
if (t) {
|
|
5270
5273
|
let d;
|
|
5271
|
-
const
|
|
5272
|
-
const
|
|
5273
|
-
if (
|
|
5274
|
+
const f = t.ownerDocument.defaultView ?? window, l = (h) => {
|
|
5275
|
+
const g = on(o.current).includes(CSS.escape(h.animationName));
|
|
5276
|
+
if (h.target === t && g && (c("ANIMATION_END"), !r.current)) {
|
|
5274
5277
|
const v = t.style.animationFillMode;
|
|
5275
|
-
t.style.animationFillMode = "forwards", d =
|
|
5278
|
+
t.style.animationFillMode = "forwards", d = f.setTimeout(() => {
|
|
5276
5279
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
|
|
5277
5280
|
});
|
|
5278
5281
|
}
|
|
5279
|
-
}, m = (
|
|
5280
|
-
|
|
5282
|
+
}, m = (h) => {
|
|
5283
|
+
h.target === t && (s.current = on(o.current));
|
|
5281
5284
|
};
|
|
5282
5285
|
return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", l), t.addEventListener("animationend", l), () => {
|
|
5283
|
-
|
|
5286
|
+
f.clearTimeout(d), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", l), t.removeEventListener("animationend", l);
|
|
5284
5287
|
};
|
|
5285
5288
|
} else
|
|
5286
5289
|
c("ANIMATION_END");
|
|
5287
5290
|
}, [t, c]), {
|
|
5288
5291
|
isPresent: ["mounted", "unmountSuspended"].includes(i),
|
|
5289
|
-
ref:
|
|
5292
|
+
ref: u.useCallback((d) => {
|
|
5290
5293
|
o.current = d ? getComputedStyle(d) : null, n(d);
|
|
5291
5294
|
}, [])
|
|
5292
5295
|
};
|
|
@@ -5299,15 +5302,15 @@ function af(e) {
|
|
|
5299
5302
|
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
5300
5303
|
return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
5301
5304
|
}
|
|
5302
|
-
var cf =
|
|
5305
|
+
var cf = u[" useId ".trim().toString()] || (() => {
|
|
5303
5306
|
}), lf = 0;
|
|
5304
5307
|
function ht(e) {
|
|
5305
|
-
const [t, n] =
|
|
5308
|
+
const [t, n] = u.useState(cf());
|
|
5306
5309
|
return de(() => {
|
|
5307
5310
|
n((o) => o ?? String(lf++));
|
|
5308
5311
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
5309
5312
|
}
|
|
5310
|
-
var Rn = "Collapsible", [df] = we(Rn), [uf, $o] = df(Rn), Ks =
|
|
5313
|
+
var Rn = "Collapsible", [df] = we(Rn), [uf, $o] = df(Rn), Ks = u.forwardRef(
|
|
5311
5314
|
(e, t) => {
|
|
5312
5315
|
const {
|
|
5313
5316
|
__scopeCollapsible: n,
|
|
@@ -5329,7 +5332,7 @@ var Rn = "Collapsible", [df] = we(Rn), [uf, $o] = df(Rn), Ks = f.forwardRef(
|
|
|
5329
5332
|
disabled: s,
|
|
5330
5333
|
contentId: ht(),
|
|
5331
5334
|
open: c,
|
|
5332
|
-
onOpenToggle:
|
|
5335
|
+
onOpenToggle: u.useCallback(() => d((f) => !f), [d]),
|
|
5333
5336
|
children: /* @__PURE__ */ p(
|
|
5334
5337
|
X.div,
|
|
5335
5338
|
{
|
|
@@ -5344,7 +5347,7 @@ var Rn = "Collapsible", [df] = we(Rn), [uf, $o] = df(Rn), Ks = f.forwardRef(
|
|
|
5344
5347
|
}
|
|
5345
5348
|
);
|
|
5346
5349
|
Ks.displayName = Rn;
|
|
5347
|
-
var Xs = "CollapsibleTrigger", Zs =
|
|
5350
|
+
var Xs = "CollapsibleTrigger", Zs = u.forwardRef(
|
|
5348
5351
|
(e, t) => {
|
|
5349
5352
|
const { __scopeCollapsible: n, ...o } = e, r = $o(Xs, n);
|
|
5350
5353
|
return /* @__PURE__ */ p(
|
|
@@ -5364,16 +5367,16 @@ var Xs = "CollapsibleTrigger", Zs = f.forwardRef(
|
|
|
5364
5367
|
}
|
|
5365
5368
|
);
|
|
5366
5369
|
Zs.displayName = Xs;
|
|
5367
|
-
var Fo = "CollapsibleContent", Js =
|
|
5370
|
+
var Fo = "CollapsibleContent", Js = u.forwardRef(
|
|
5368
5371
|
(e, t) => {
|
|
5369
5372
|
const { forceMount: n, ...o } = e, r = $o(Fo, e.__scopeCollapsible);
|
|
5370
|
-
return /* @__PURE__ */ p(
|
|
5373
|
+
return /* @__PURE__ */ p(De, { present: n || r.open, children: ({ present: s }) => /* @__PURE__ */ p(ff, { ...o, ref: t, present: s }) });
|
|
5371
5374
|
}
|
|
5372
5375
|
);
|
|
5373
5376
|
Js.displayName = Fo;
|
|
5374
|
-
var ff =
|
|
5375
|
-
const { __scopeCollapsible: n, present: o, children: r, ...s } = e, a = $o(Fo, n), [i, c] =
|
|
5376
|
-
return
|
|
5377
|
+
var ff = u.forwardRef((e, t) => {
|
|
5378
|
+
const { __scopeCollapsible: n, present: o, children: r, ...s } = e, a = $o(Fo, n), [i, c] = u.useState(o), d = u.useRef(null), f = ae(t, d), l = u.useRef(0), m = l.current, h = u.useRef(0), b = h.current, g = a.open || i, v = u.useRef(g), y = u.useRef(void 0);
|
|
5379
|
+
return u.useEffect(() => {
|
|
5377
5380
|
const w = requestAnimationFrame(() => v.current = !1);
|
|
5378
5381
|
return () => cancelAnimationFrame(w);
|
|
5379
5382
|
}, []), de(() => {
|
|
@@ -5384,7 +5387,7 @@ var ff = f.forwardRef((e, t) => {
|
|
|
5384
5387
|
animationName: w.style.animationName
|
|
5385
5388
|
}, w.style.transitionDuration = "0s", w.style.animationName = "none";
|
|
5386
5389
|
const x = w.getBoundingClientRect();
|
|
5387
|
-
l.current = x.height,
|
|
5390
|
+
l.current = x.height, h.current = x.width, v.current || (w.style.transitionDuration = y.current.transitionDuration, w.style.animationName = y.current.animationName), c(o);
|
|
5388
5391
|
}
|
|
5389
5392
|
}, [a.open, o]), /* @__PURE__ */ p(
|
|
5390
5393
|
X.div,
|
|
@@ -5392,49 +5395,49 @@ var ff = f.forwardRef((e, t) => {
|
|
|
5392
5395
|
"data-state": Bo(a.open),
|
|
5393
5396
|
"data-disabled": a.disabled ? "" : void 0,
|
|
5394
5397
|
id: a.contentId,
|
|
5395
|
-
hidden: !
|
|
5398
|
+
hidden: !g,
|
|
5396
5399
|
...s,
|
|
5397
|
-
ref:
|
|
5400
|
+
ref: f,
|
|
5398
5401
|
style: {
|
|
5399
5402
|
"--radix-collapsible-content-height": m ? `${m}px` : void 0,
|
|
5400
5403
|
"--radix-collapsible-content-width": b ? `${b}px` : void 0,
|
|
5401
5404
|
...e.style
|
|
5402
5405
|
},
|
|
5403
|
-
children:
|
|
5406
|
+
children: g && r
|
|
5404
5407
|
}
|
|
5405
5408
|
);
|
|
5406
5409
|
});
|
|
5407
5410
|
function Bo(e) {
|
|
5408
5411
|
return e ? "open" : "closed";
|
|
5409
5412
|
}
|
|
5410
|
-
var pf = Ks, mf =
|
|
5413
|
+
var pf = Ks, mf = u.createContext(void 0);
|
|
5411
5414
|
function jt(e) {
|
|
5412
|
-
const t =
|
|
5415
|
+
const t = u.useContext(mf);
|
|
5413
5416
|
return e || t || "ltr";
|
|
5414
5417
|
}
|
|
5415
5418
|
function ve(e) {
|
|
5416
|
-
const t =
|
|
5417
|
-
return
|
|
5419
|
+
const t = u.useRef(e);
|
|
5420
|
+
return u.useEffect(() => {
|
|
5418
5421
|
t.current = e;
|
|
5419
|
-
}),
|
|
5422
|
+
}), u.useMemo(() => (...n) => {
|
|
5420
5423
|
var o;
|
|
5421
5424
|
return (o = t.current) == null ? void 0 : o.call(t, ...n);
|
|
5422
5425
|
}, []);
|
|
5423
5426
|
}
|
|
5424
5427
|
function hf(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
5425
5428
|
const n = ve(e);
|
|
5426
|
-
|
|
5429
|
+
u.useEffect(() => {
|
|
5427
5430
|
const o = (r) => {
|
|
5428
5431
|
r.key === "Escape" && n(r);
|
|
5429
5432
|
};
|
|
5430
5433
|
return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
|
|
5431
5434
|
}, [n, t]);
|
|
5432
5435
|
}
|
|
5433
|
-
var gf = "DismissableLayer", go = "dismissableLayer.update", vf = "dismissableLayer.pointerDownOutside", bf = "dismissableLayer.focusOutside", Ir, Qs =
|
|
5436
|
+
var gf = "DismissableLayer", go = "dismissableLayer.update", vf = "dismissableLayer.pointerDownOutside", bf = "dismissableLayer.focusOutside", Ir, Qs = u.createContext({
|
|
5434
5437
|
layers: /* @__PURE__ */ new Set(),
|
|
5435
5438
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
5436
5439
|
branches: /* @__PURE__ */ new Set()
|
|
5437
|
-
}), Ho =
|
|
5440
|
+
}), Ho = u.forwardRef(
|
|
5438
5441
|
(e, t) => {
|
|
5439
5442
|
const {
|
|
5440
5443
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -5444,7 +5447,7 @@ var gf = "DismissableLayer", go = "dismissableLayer.update", vf = "dismissableLa
|
|
|
5444
5447
|
onInteractOutside: a,
|
|
5445
5448
|
onDismiss: i,
|
|
5446
5449
|
...c
|
|
5447
|
-
} = e, d =
|
|
5450
|
+
} = e, d = u.useContext(Qs), [f, l] = u.useState(null), m = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = u.useState({}), b = ae(t, (R) => l(R)), g = Array.from(d.layers), [v] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), y = g.indexOf(v), w = f ? g.indexOf(f) : -1, x = d.layersWithOutsidePointerEventsDisabled.size > 0, k = w >= y, N = xf((R) => {
|
|
5448
5451
|
const S = R.target, A = [...d.branches].some((D) => D.contains(S));
|
|
5449
5452
|
!k || A || (r == null || r(R), a == null || a(R), R.defaultPrevented || i == null || i());
|
|
5450
5453
|
}, m), T = Sf((R) => {
|
|
@@ -5453,15 +5456,15 @@ var gf = "DismissableLayer", go = "dismissableLayer.update", vf = "dismissableLa
|
|
|
5453
5456
|
}, m);
|
|
5454
5457
|
return hf((R) => {
|
|
5455
5458
|
w === d.layers.size - 1 && (o == null || o(R), !R.defaultPrevented && i && (R.preventDefault(), i()));
|
|
5456
|
-
}, m),
|
|
5457
|
-
if (
|
|
5458
|
-
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (Ir = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(
|
|
5459
|
+
}, m), u.useEffect(() => {
|
|
5460
|
+
if (f)
|
|
5461
|
+
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (Ir = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(f)), d.layers.add(f), _r(), () => {
|
|
5459
5462
|
n && d.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = Ir);
|
|
5460
5463
|
};
|
|
5461
|
-
}, [
|
|
5462
|
-
|
|
5463
|
-
}, [
|
|
5464
|
-
const R = () =>
|
|
5464
|
+
}, [f, m, n, d]), u.useEffect(() => () => {
|
|
5465
|
+
f && (d.layers.delete(f), d.layersWithOutsidePointerEventsDisabled.delete(f), _r());
|
|
5466
|
+
}, [f, d]), u.useEffect(() => {
|
|
5467
|
+
const R = () => h({});
|
|
5465
5468
|
return document.addEventListener(go, R), () => document.removeEventListener(go, R);
|
|
5466
5469
|
}, []), /* @__PURE__ */ p(
|
|
5467
5470
|
X.div,
|
|
@@ -5483,9 +5486,9 @@ var gf = "DismissableLayer", go = "dismissableLayer.update", vf = "dismissableLa
|
|
|
5483
5486
|
}
|
|
5484
5487
|
);
|
|
5485
5488
|
Ho.displayName = gf;
|
|
5486
|
-
var yf = "DismissableLayerBranch", wf =
|
|
5487
|
-
const n =
|
|
5488
|
-
return
|
|
5489
|
+
var yf = "DismissableLayerBranch", wf = u.forwardRef((e, t) => {
|
|
5490
|
+
const n = u.useContext(Qs), o = u.useRef(null), r = ae(t, o);
|
|
5491
|
+
return u.useEffect(() => {
|
|
5489
5492
|
const s = o.current;
|
|
5490
5493
|
if (s)
|
|
5491
5494
|
return n.branches.add(s), () => {
|
|
@@ -5495,9 +5498,9 @@ var yf = "DismissableLayerBranch", wf = f.forwardRef((e, t) => {
|
|
|
5495
5498
|
});
|
|
5496
5499
|
wf.displayName = yf;
|
|
5497
5500
|
function xf(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
5498
|
-
const n = ve(e), o =
|
|
5501
|
+
const n = ve(e), o = u.useRef(!1), r = u.useRef(() => {
|
|
5499
5502
|
});
|
|
5500
|
-
return
|
|
5503
|
+
return u.useEffect(() => {
|
|
5501
5504
|
const s = (i) => {
|
|
5502
5505
|
if (i.target && !o.current) {
|
|
5503
5506
|
let c = function() {
|
|
@@ -5525,8 +5528,8 @@ function xf(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
5525
5528
|
};
|
|
5526
5529
|
}
|
|
5527
5530
|
function Sf(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
5528
|
-
const n = ve(e), o =
|
|
5529
|
-
return
|
|
5531
|
+
const n = ve(e), o = u.useRef(!1);
|
|
5532
|
+
return u.useEffect(() => {
|
|
5530
5533
|
const r = (s) => {
|
|
5531
5534
|
s.target && !o.current && ea(bf, n, { originalEvent: s }, {
|
|
5532
5535
|
discrete: !1
|
|
@@ -5546,14 +5549,14 @@ function ea(e, t, n, { discrete: o }) {
|
|
|
5546
5549
|
const r = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
5547
5550
|
t && r.addEventListener(e, t, { once: !0 }), o ? Zu(r, s) : r.dispatchEvent(s);
|
|
5548
5551
|
}
|
|
5549
|
-
var Xn = "focusScope.autoFocusOnMount", Zn = "focusScope.autoFocusOnUnmount", Mr = { bubbles: !1, cancelable: !0 }, Cf = "FocusScope", ta =
|
|
5552
|
+
var Xn = "focusScope.autoFocusOnMount", Zn = "focusScope.autoFocusOnUnmount", Mr = { bubbles: !1, cancelable: !0 }, Cf = "FocusScope", ta = u.forwardRef((e, t) => {
|
|
5550
5553
|
const {
|
|
5551
5554
|
loop: n = !1,
|
|
5552
5555
|
trapped: o = !1,
|
|
5553
5556
|
onMountAutoFocus: r,
|
|
5554
5557
|
onUnmountAutoFocus: s,
|
|
5555
5558
|
...a
|
|
5556
|
-
} = e, [i, c] =
|
|
5559
|
+
} = e, [i, c] = u.useState(null), d = ve(r), f = ve(s), l = u.useRef(null), m = ae(t, (g) => c(g)), h = u.useRef({
|
|
5557
5560
|
paused: !1,
|
|
5558
5561
|
pause() {
|
|
5559
5562
|
this.paused = !0;
|
|
@@ -5562,14 +5565,14 @@ var Xn = "focusScope.autoFocusOnMount", Zn = "focusScope.autoFocusOnUnmount", Mr
|
|
|
5562
5565
|
this.paused = !1;
|
|
5563
5566
|
}
|
|
5564
5567
|
}).current;
|
|
5565
|
-
|
|
5568
|
+
u.useEffect(() => {
|
|
5566
5569
|
if (o) {
|
|
5567
|
-
let
|
|
5568
|
-
if (
|
|
5570
|
+
let g = function(x) {
|
|
5571
|
+
if (h.paused || !i) return;
|
|
5569
5572
|
const k = x.target;
|
|
5570
5573
|
i.contains(k) ? l.current = k : Qe(l.current, { select: !0 });
|
|
5571
5574
|
}, v = function(x) {
|
|
5572
|
-
if (
|
|
5575
|
+
if (h.paused || !i) return;
|
|
5573
5576
|
const k = x.relatedTarget;
|
|
5574
5577
|
k !== null && (i.contains(k) || Qe(l.current, { select: !0 }));
|
|
5575
5578
|
}, y = function(x) {
|
|
@@ -5577,38 +5580,38 @@ var Xn = "focusScope.autoFocusOnMount", Zn = "focusScope.autoFocusOnUnmount", Mr
|
|
|
5577
5580
|
for (const N of x)
|
|
5578
5581
|
N.removedNodes.length > 0 && Qe(i);
|
|
5579
5582
|
};
|
|
5580
|
-
document.addEventListener("focusin",
|
|
5583
|
+
document.addEventListener("focusin", g), document.addEventListener("focusout", v);
|
|
5581
5584
|
const w = new MutationObserver(y);
|
|
5582
5585
|
return i && w.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
5583
|
-
document.removeEventListener("focusin",
|
|
5586
|
+
document.removeEventListener("focusin", g), document.removeEventListener("focusout", v), w.disconnect();
|
|
5584
5587
|
};
|
|
5585
5588
|
}
|
|
5586
|
-
}, [o, i,
|
|
5589
|
+
}, [o, i, h.paused]), u.useEffect(() => {
|
|
5587
5590
|
if (i) {
|
|
5588
|
-
Lr.add(
|
|
5589
|
-
const
|
|
5590
|
-
if (!i.contains(
|
|
5591
|
+
Lr.add(h);
|
|
5592
|
+
const g = document.activeElement;
|
|
5593
|
+
if (!i.contains(g)) {
|
|
5591
5594
|
const y = new CustomEvent(Xn, Mr);
|
|
5592
|
-
i.addEventListener(Xn, d), i.dispatchEvent(y), y.defaultPrevented || (kf(Pf(na(i)), { select: !0 }), document.activeElement ===
|
|
5595
|
+
i.addEventListener(Xn, d), i.dispatchEvent(y), y.defaultPrevented || (kf(Pf(na(i)), { select: !0 }), document.activeElement === g && Qe(i));
|
|
5593
5596
|
}
|
|
5594
5597
|
return () => {
|
|
5595
5598
|
i.removeEventListener(Xn, d), setTimeout(() => {
|
|
5596
5599
|
const y = new CustomEvent(Zn, Mr);
|
|
5597
|
-
i.addEventListener(Zn,
|
|
5600
|
+
i.addEventListener(Zn, f), i.dispatchEvent(y), y.defaultPrevented || Qe(g ?? document.body, { select: !0 }), i.removeEventListener(Zn, f), Lr.remove(h);
|
|
5598
5601
|
}, 0);
|
|
5599
5602
|
};
|
|
5600
5603
|
}
|
|
5601
|
-
}, [i, d,
|
|
5602
|
-
const b =
|
|
5603
|
-
(
|
|
5604
|
-
if (!n && !o ||
|
|
5605
|
-
const v =
|
|
5604
|
+
}, [i, d, f, h]);
|
|
5605
|
+
const b = u.useCallback(
|
|
5606
|
+
(g) => {
|
|
5607
|
+
if (!n && !o || h.paused) return;
|
|
5608
|
+
const v = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, y = document.activeElement;
|
|
5606
5609
|
if (v && y) {
|
|
5607
|
-
const w =
|
|
5608
|
-
x && k ? !
|
|
5610
|
+
const w = g.currentTarget, [x, k] = Ef(w);
|
|
5611
|
+
x && k ? !g.shiftKey && y === k ? (g.preventDefault(), n && Qe(x, { select: !0 })) : g.shiftKey && y === x && (g.preventDefault(), n && Qe(k, { select: !0 })) : y === w && g.preventDefault();
|
|
5609
5612
|
}
|
|
5610
5613
|
},
|
|
5611
|
-
[n, o,
|
|
5614
|
+
[n, o, h.paused]
|
|
5612
5615
|
);
|
|
5613
5616
|
return /* @__PURE__ */ p(X.div, { tabIndex: -1, ...a, ref: m, onKeyDown: b });
|
|
5614
5617
|
});
|
|
@@ -5675,9 +5678,9 @@ function Dr(e, t) {
|
|
|
5675
5678
|
function Pf(e) {
|
|
5676
5679
|
return e.filter((t) => t.tagName !== "A");
|
|
5677
5680
|
}
|
|
5678
|
-
var Af = "Portal", Vo =
|
|
5681
|
+
var Af = "Portal", Vo = u.forwardRef((e, t) => {
|
|
5679
5682
|
var i;
|
|
5680
|
-
const { container: n, ...o } = e, [r, s] =
|
|
5683
|
+
const { container: n, ...o } = e, [r, s] = u.useState(!1);
|
|
5681
5684
|
de(() => s(!0), []);
|
|
5682
5685
|
const a = n || r && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
5683
5686
|
return a ? fs.createPortal(/* @__PURE__ */ p(X.div, { ...o, ref: t }), a) : null;
|
|
@@ -5685,7 +5688,7 @@ var Af = "Portal", Vo = f.forwardRef((e, t) => {
|
|
|
5685
5688
|
Vo.displayName = Af;
|
|
5686
5689
|
var Jn = 0;
|
|
5687
5690
|
function If() {
|
|
5688
|
-
|
|
5691
|
+
u.useEffect(() => {
|
|
5689
5692
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
5690
5693
|
return document.body.insertAdjacentElement("afterbegin", e[0] ?? zr()), document.body.insertAdjacentElement("beforeend", e[1] ?? zr()), Jn++, () => {
|
|
5691
5694
|
Jn === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Jn--;
|
|
@@ -5696,14 +5699,14 @@ function zr() {
|
|
|
5696
5699
|
const e = document.createElement("span");
|
|
5697
5700
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
5698
5701
|
}
|
|
5699
|
-
var
|
|
5700
|
-
return
|
|
5702
|
+
var $e = function() {
|
|
5703
|
+
return $e = Object.assign || function(t) {
|
|
5701
5704
|
for (var n, o = 1, r = arguments.length; o < r; o++) {
|
|
5702
5705
|
n = arguments[o];
|
|
5703
5706
|
for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
|
|
5704
5707
|
}
|
|
5705
5708
|
return t;
|
|
5706
|
-
},
|
|
5709
|
+
}, $e.apply(this, arguments);
|
|
5707
5710
|
};
|
|
5708
5711
|
function oa(e, t) {
|
|
5709
5712
|
var n = {};
|
|
@@ -5743,7 +5746,7 @@ function Lf(e, t) {
|
|
|
5743
5746
|
})[0];
|
|
5744
5747
|
return n.callback = t, n.facade;
|
|
5745
5748
|
}
|
|
5746
|
-
var Df = typeof window < "u" ?
|
|
5749
|
+
var Df = typeof window < "u" ? u.useLayoutEffect : u.useEffect, $r = /* @__PURE__ */ new WeakMap();
|
|
5747
5750
|
function zf(e, t) {
|
|
5748
5751
|
var n = Lf(null, function(o) {
|
|
5749
5752
|
return e.forEach(function(r) {
|
|
@@ -5804,17 +5807,17 @@ function Ff(e, t) {
|
|
|
5804
5807
|
n = [], i.forEach(s), a = n;
|
|
5805
5808
|
}
|
|
5806
5809
|
var c = function() {
|
|
5807
|
-
var
|
|
5808
|
-
a = [],
|
|
5810
|
+
var f = a;
|
|
5811
|
+
a = [], f.forEach(s);
|
|
5809
5812
|
}, d = function() {
|
|
5810
5813
|
return Promise.resolve().then(c);
|
|
5811
5814
|
};
|
|
5812
5815
|
d(), n = {
|
|
5813
|
-
push: function(
|
|
5814
|
-
a.push(
|
|
5816
|
+
push: function(f) {
|
|
5817
|
+
a.push(f), d();
|
|
5815
5818
|
},
|
|
5816
|
-
filter: function(
|
|
5817
|
-
return a = a.filter(
|
|
5819
|
+
filter: function(f) {
|
|
5820
|
+
return a = a.filter(f), n;
|
|
5818
5821
|
}
|
|
5819
5822
|
};
|
|
5820
5823
|
}
|
|
@@ -5824,7 +5827,7 @@ function Ff(e, t) {
|
|
|
5824
5827
|
function Bf(e) {
|
|
5825
5828
|
e === void 0 && (e = {});
|
|
5826
5829
|
var t = Ff(null);
|
|
5827
|
-
return t.options =
|
|
5830
|
+
return t.options = $e({ async: !0, ssr: !1 }, e), t;
|
|
5828
5831
|
}
|
|
5829
5832
|
var ra = function(e) {
|
|
5830
5833
|
var t = e.sideCar, n = oa(e, ["sideCar"]);
|
|
@@ -5833,24 +5836,24 @@ var ra = function(e) {
|
|
|
5833
5836
|
var o = t.read();
|
|
5834
5837
|
if (!o)
|
|
5835
5838
|
throw new Error("Sidecar medium not found");
|
|
5836
|
-
return
|
|
5839
|
+
return u.createElement(o, $e({}, n));
|
|
5837
5840
|
};
|
|
5838
5841
|
ra.isSideCarExport = !0;
|
|
5839
5842
|
function Hf(e, t) {
|
|
5840
5843
|
return e.useMedium(t), ra;
|
|
5841
5844
|
}
|
|
5842
5845
|
var sa = Bf(), eo = function() {
|
|
5843
|
-
}, Nn =
|
|
5844
|
-
var n =
|
|
5846
|
+
}, Nn = u.forwardRef(function(e, t) {
|
|
5847
|
+
var n = u.useRef(null), o = u.useState({
|
|
5845
5848
|
onScrollCapture: eo,
|
|
5846
5849
|
onWheelCapture: eo,
|
|
5847
5850
|
onTouchMoveCapture: eo
|
|
5848
|
-
}), r = o[0], s = o[1], a = e.forwardProps, i = e.children, c = e.className, d = e.removeScrollBar,
|
|
5849
|
-
return
|
|
5850
|
-
|
|
5851
|
+
}), r = o[0], s = o[1], a = e.forwardProps, i = e.children, c = e.className, d = e.removeScrollBar, f = e.enabled, l = e.shards, m = e.sideCar, h = e.noRelative, b = e.noIsolation, g = e.inert, v = e.allowPinchZoom, y = e.as, w = y === void 0 ? "div" : y, x = e.gapMode, k = oa(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), N = m, T = zf([n, t]), R = $e($e({}, k), r);
|
|
5852
|
+
return u.createElement(
|
|
5853
|
+
u.Fragment,
|
|
5851
5854
|
null,
|
|
5852
|
-
|
|
5853
|
-
a ?
|
|
5855
|
+
f && u.createElement(N, { sideCar: sa, removeScrollBar: d, shards: l, noRelative: h, noIsolation: b, inert: g, setCallbacks: s, allowPinchZoom: !!v, lockRef: n, gapMode: x }),
|
|
5856
|
+
a ? u.cloneElement(u.Children.only(i), $e($e({}, R), { ref: T })) : u.createElement(w, $e({}, R, { className: c, ref: T }), i)
|
|
5854
5857
|
);
|
|
5855
5858
|
});
|
|
5856
5859
|
Nn.defaultProps = {
|
|
@@ -5894,7 +5897,7 @@ var Gf = function() {
|
|
|
5894
5897
|
}, Yf = function() {
|
|
5895
5898
|
var e = Gf();
|
|
5896
5899
|
return function(t, n) {
|
|
5897
|
-
|
|
5900
|
+
u.useEffect(function() {
|
|
5898
5901
|
return e.add(t), function() {
|
|
5899
5902
|
e.remove();
|
|
5900
5903
|
};
|
|
@@ -5974,7 +5977,7 @@ var Gf = function() {
|
|
|
5974
5977
|
var e = parseInt(document.body.getAttribute(kt) || "0", 10);
|
|
5975
5978
|
return isFinite(e) ? e : 0;
|
|
5976
5979
|
}, Qf = function() {
|
|
5977
|
-
|
|
5980
|
+
u.useEffect(function() {
|
|
5978
5981
|
return document.body.setAttribute(kt, (Fr() + 1).toString()), function() {
|
|
5979
5982
|
var e = Fr() - 1;
|
|
5980
5983
|
e <= 0 ? document.body.removeAttribute(kt) : document.body.setAttribute(kt, e.toString());
|
|
@@ -5983,10 +5986,10 @@ var Gf = function() {
|
|
|
5983
5986
|
}, ep = function(e) {
|
|
5984
5987
|
var t = e.noRelative, n = e.noImportant, o = e.gapMode, r = o === void 0 ? "margin" : o;
|
|
5985
5988
|
Qf();
|
|
5986
|
-
var s =
|
|
5989
|
+
var s = u.useMemo(function() {
|
|
5987
5990
|
return Xf(r);
|
|
5988
5991
|
}, [r]);
|
|
5989
|
-
return
|
|
5992
|
+
return u.createElement(Zf, { styles: Jf(s, !t, r, n ? "" : "!important") });
|
|
5990
5993
|
}, vo = !1;
|
|
5991
5994
|
if (typeof window < "u")
|
|
5992
5995
|
try {
|
|
@@ -6048,11 +6051,11 @@ var wt = vo ? { passive: !1 } : !1, tp = function(e) {
|
|
|
6048
6051
|
}, ap = function(e, t) {
|
|
6049
6052
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
6050
6053
|
}, ip = function(e, t, n, o, r) {
|
|
6051
|
-
var s = ap(e, window.getComputedStyle(t).direction), a = s * o, i = n.target, c = t.contains(i), d = !1,
|
|
6054
|
+
var s = ap(e, window.getComputedStyle(t).direction), a = s * o, i = n.target, c = t.contains(i), d = !1, f = a > 0, l = 0, m = 0;
|
|
6052
6055
|
do {
|
|
6053
6056
|
if (!i)
|
|
6054
6057
|
break;
|
|
6055
|
-
var
|
|
6058
|
+
var h = la(e, i), b = h[0], g = h[1], v = h[2], y = g - v - s * b;
|
|
6056
6059
|
(b || y) && ca(e, i) && (l += y, m += b);
|
|
6057
6060
|
var w = i.parentNode;
|
|
6058
6061
|
i = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
|
|
@@ -6061,7 +6064,7 @@ var wt = vo ? { passive: !1 } : !1, tp = function(e) {
|
|
|
6061
6064
|
!c && i !== document.body || // self content
|
|
6062
6065
|
c && (t.contains(i) || t === i)
|
|
6063
6066
|
);
|
|
6064
|
-
return (
|
|
6067
|
+
return (f && Math.abs(l) < 1 || !f && Math.abs(m) < 1) && (d = !0), d;
|
|
6065
6068
|
}, sn = function(e) {
|
|
6066
6069
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
6067
6070
|
}, Hr = function(e) {
|
|
@@ -6077,27 +6080,27 @@ var wt = vo ? { passive: !1 } : !1, tp = function(e) {
|
|
|
6077
6080
|
`);
|
|
6078
6081
|
}, dp = 0, xt = [];
|
|
6079
6082
|
function up(e) {
|
|
6080
|
-
var t =
|
|
6081
|
-
|
|
6083
|
+
var t = u.useRef([]), n = u.useRef([0, 0]), o = u.useRef(), r = u.useState(dp++)[0], s = u.useState(aa)[0], a = u.useRef(e);
|
|
6084
|
+
u.useEffect(function() {
|
|
6082
6085
|
a.current = e;
|
|
6083
|
-
}, [e]),
|
|
6086
|
+
}, [e]), u.useEffect(function() {
|
|
6084
6087
|
if (e.inert) {
|
|
6085
6088
|
document.body.classList.add("block-interactivity-".concat(r));
|
|
6086
|
-
var
|
|
6087
|
-
return
|
|
6089
|
+
var g = _f([e.lockRef.current], (e.shards || []).map(Vr), !0).filter(Boolean);
|
|
6090
|
+
return g.forEach(function(v) {
|
|
6088
6091
|
return v.classList.add("allow-interactivity-".concat(r));
|
|
6089
6092
|
}), function() {
|
|
6090
|
-
document.body.classList.remove("block-interactivity-".concat(r)),
|
|
6093
|
+
document.body.classList.remove("block-interactivity-".concat(r)), g.forEach(function(v) {
|
|
6091
6094
|
return v.classList.remove("allow-interactivity-".concat(r));
|
|
6092
6095
|
});
|
|
6093
6096
|
};
|
|
6094
6097
|
}
|
|
6095
6098
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
6096
|
-
var i =
|
|
6097
|
-
if ("touches" in
|
|
6099
|
+
var i = u.useCallback(function(g, v) {
|
|
6100
|
+
if ("touches" in g && g.touches.length === 2 || g.type === "wheel" && g.ctrlKey)
|
|
6098
6101
|
return !a.current.allowPinchZoom;
|
|
6099
|
-
var y = sn(
|
|
6100
|
-
if ("touches" in
|
|
6102
|
+
var y = sn(g), w = n.current, x = "deltaX" in g ? g.deltaX : w[0] - y[0], k = "deltaY" in g ? g.deltaY : w[1] - y[1], N, T = g.target, R = Math.abs(x) > Math.abs(k) ? "h" : "v";
|
|
6103
|
+
if ("touches" in g && R === "h" && T.type === "range")
|
|
6101
6104
|
return !1;
|
|
6102
6105
|
var S = window.getSelection(), A = S && S.anchorNode, D = A ? A === T || A.contains(T) : !1;
|
|
6103
6106
|
if (D)
|
|
@@ -6107,12 +6110,12 @@ function up(e) {
|
|
|
6107
6110
|
return !0;
|
|
6108
6111
|
if (O ? N = R : (N = R === "v" ? "h" : "v", O = Br(R, T)), !O)
|
|
6109
6112
|
return !1;
|
|
6110
|
-
if (!o.current && "changedTouches" in
|
|
6113
|
+
if (!o.current && "changedTouches" in g && (x || k) && (o.current = N), !N)
|
|
6111
6114
|
return !0;
|
|
6112
6115
|
var H = o.current || N;
|
|
6113
|
-
return ip(H, v,
|
|
6114
|
-
}, []), c =
|
|
6115
|
-
var v =
|
|
6116
|
+
return ip(H, v, g, H === "h" ? x : k);
|
|
6117
|
+
}, []), c = u.useCallback(function(g) {
|
|
6118
|
+
var v = g;
|
|
6116
6119
|
if (!(!xt.length || xt[xt.length - 1] !== s)) {
|
|
6117
6120
|
var y = "deltaY" in v ? Hr(v) : sn(v), w = t.current.filter(function(N) {
|
|
6118
6121
|
return N.name === v.type && (N.target === v.target || v.target === N.shadowParent) && cp(N.delta, y);
|
|
@@ -6128,37 +6131,37 @@ function up(e) {
|
|
|
6128
6131
|
k && v.cancelable && v.preventDefault();
|
|
6129
6132
|
}
|
|
6130
6133
|
}
|
|
6131
|
-
}, []), d =
|
|
6132
|
-
var x = { name:
|
|
6134
|
+
}, []), d = u.useCallback(function(g, v, y, w) {
|
|
6135
|
+
var x = { name: g, delta: v, target: y, should: w, shadowParent: fp(y) };
|
|
6133
6136
|
t.current.push(x), setTimeout(function() {
|
|
6134
6137
|
t.current = t.current.filter(function(k) {
|
|
6135
6138
|
return k !== x;
|
|
6136
6139
|
});
|
|
6137
6140
|
}, 1);
|
|
6138
|
-
}, []),
|
|
6139
|
-
n.current = sn(
|
|
6140
|
-
}, []), l =
|
|
6141
|
-
d(
|
|
6142
|
-
}, []), m =
|
|
6143
|
-
d(
|
|
6141
|
+
}, []), f = u.useCallback(function(g) {
|
|
6142
|
+
n.current = sn(g), o.current = void 0;
|
|
6143
|
+
}, []), l = u.useCallback(function(g) {
|
|
6144
|
+
d(g.type, Hr(g), g.target, i(g, e.lockRef.current));
|
|
6145
|
+
}, []), m = u.useCallback(function(g) {
|
|
6146
|
+
d(g.type, sn(g), g.target, i(g, e.lockRef.current));
|
|
6144
6147
|
}, []);
|
|
6145
|
-
|
|
6148
|
+
u.useEffect(function() {
|
|
6146
6149
|
return xt.push(s), e.setCallbacks({
|
|
6147
6150
|
onScrollCapture: l,
|
|
6148
6151
|
onWheelCapture: l,
|
|
6149
6152
|
onTouchMoveCapture: m
|
|
6150
|
-
}), document.addEventListener("wheel", c, wt), document.addEventListener("touchmove", c, wt), document.addEventListener("touchstart",
|
|
6151
|
-
xt = xt.filter(function(
|
|
6152
|
-
return
|
|
6153
|
-
}), document.removeEventListener("wheel", c, wt), document.removeEventListener("touchmove", c, wt), document.removeEventListener("touchstart",
|
|
6153
|
+
}), document.addEventListener("wheel", c, wt), document.addEventListener("touchmove", c, wt), document.addEventListener("touchstart", f, wt), function() {
|
|
6154
|
+
xt = xt.filter(function(g) {
|
|
6155
|
+
return g !== s;
|
|
6156
|
+
}), document.removeEventListener("wheel", c, wt), document.removeEventListener("touchmove", c, wt), document.removeEventListener("touchstart", f, wt);
|
|
6154
6157
|
};
|
|
6155
6158
|
}, []);
|
|
6156
|
-
var
|
|
6157
|
-
return
|
|
6158
|
-
|
|
6159
|
+
var h = e.removeScrollBar, b = e.inert;
|
|
6160
|
+
return u.createElement(
|
|
6161
|
+
u.Fragment,
|
|
6159
6162
|
null,
|
|
6160
|
-
b ?
|
|
6161
|
-
|
|
6163
|
+
b ? u.createElement(s, { styles: lp(r) }) : null,
|
|
6164
|
+
h ? u.createElement(ep, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
6162
6165
|
);
|
|
6163
6166
|
}
|
|
6164
6167
|
function fp(e) {
|
|
@@ -6167,8 +6170,8 @@ function fp(e) {
|
|
|
6167
6170
|
return t;
|
|
6168
6171
|
}
|
|
6169
6172
|
const pp = Hf(sa, up);
|
|
6170
|
-
var da =
|
|
6171
|
-
return
|
|
6173
|
+
var da = u.forwardRef(function(e, t) {
|
|
6174
|
+
return u.createElement(Nn, $e({}, e, { ref: t, sideCar: pp }));
|
|
6172
6175
|
});
|
|
6173
6176
|
da.classNames = Nn.classNames;
|
|
6174
6177
|
var mp = function(e) {
|
|
@@ -6194,23 +6197,23 @@ var mp = function(e) {
|
|
|
6194
6197
|
!l || i.has(l) || (i.add(l), d(l.parentNode));
|
|
6195
6198
|
};
|
|
6196
6199
|
r.forEach(d);
|
|
6197
|
-
var
|
|
6200
|
+
var f = function(l) {
|
|
6198
6201
|
!l || c.has(l) || Array.prototype.forEach.call(l.children, function(m) {
|
|
6199
6202
|
if (i.has(m))
|
|
6200
|
-
|
|
6203
|
+
f(m);
|
|
6201
6204
|
else
|
|
6202
6205
|
try {
|
|
6203
|
-
var
|
|
6204
|
-
St.set(m,
|
|
6206
|
+
var h = m.getAttribute(o), b = h !== null && h !== "false", g = (St.get(m) || 0) + 1, v = (s.get(m) || 0) + 1;
|
|
6207
|
+
St.set(m, g), s.set(m, v), a.push(m), g === 1 && b && an.set(m, !0), v === 1 && m.setAttribute(n, "true"), b || m.setAttribute(o, "true");
|
|
6205
6208
|
} catch (y) {
|
|
6206
6209
|
console.error("aria-hidden: cannot operate on ", m, y);
|
|
6207
6210
|
}
|
|
6208
6211
|
});
|
|
6209
6212
|
};
|
|
6210
|
-
return
|
|
6213
|
+
return f(t), i.clear(), no++, function() {
|
|
6211
6214
|
a.forEach(function(l) {
|
|
6212
|
-
var m = St.get(l) - 1,
|
|
6213
|
-
St.set(l, m), s.set(l,
|
|
6215
|
+
var m = St.get(l) - 1, h = s.get(l) - 1;
|
|
6216
|
+
St.set(l, m), s.set(l, h), m || (an.has(l) || l.removeAttribute(o), an.delete(l)), h || l.removeAttribute(n);
|
|
6214
6217
|
}), no--, no || (St = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), an = /* @__PURE__ */ new WeakMap(), cn = {});
|
|
6215
6218
|
};
|
|
6216
6219
|
}, vp = function(e, t, n) {
|
|
@@ -6239,27 +6242,27 @@ function bp() {
|
|
|
6239
6242
|
}
|
|
6240
6243
|
var n = typeof Object.is == "function" ? Object.is : t, o = e.useState, r = e.useEffect, s = e.useLayoutEffect, a = e.useDebugValue;
|
|
6241
6244
|
function i(l, m) {
|
|
6242
|
-
var
|
|
6245
|
+
var h = m(), b = o({ inst: { value: h, getSnapshot: m } }), g = b[0].inst, v = b[1];
|
|
6243
6246
|
return s(
|
|
6244
6247
|
function() {
|
|
6245
|
-
|
|
6248
|
+
g.value = h, g.getSnapshot = m, c(g) && v({ inst: g });
|
|
6246
6249
|
},
|
|
6247
|
-
[l,
|
|
6250
|
+
[l, h, m]
|
|
6248
6251
|
), r(
|
|
6249
6252
|
function() {
|
|
6250
|
-
return c(
|
|
6251
|
-
c(
|
|
6253
|
+
return c(g) && v({ inst: g }), l(function() {
|
|
6254
|
+
c(g) && v({ inst: g });
|
|
6252
6255
|
});
|
|
6253
6256
|
},
|
|
6254
6257
|
[l]
|
|
6255
|
-
), a(
|
|
6258
|
+
), a(h), h;
|
|
6256
6259
|
}
|
|
6257
6260
|
function c(l) {
|
|
6258
6261
|
var m = l.getSnapshot;
|
|
6259
6262
|
l = l.value;
|
|
6260
6263
|
try {
|
|
6261
|
-
var
|
|
6262
|
-
return !n(l,
|
|
6264
|
+
var h = m();
|
|
6265
|
+
return !n(l, h);
|
|
6263
6266
|
} catch {
|
|
6264
6267
|
return !0;
|
|
6265
6268
|
}
|
|
@@ -6267,8 +6270,8 @@ function bp() {
|
|
|
6267
6270
|
function d(l, m) {
|
|
6268
6271
|
return m();
|
|
6269
6272
|
}
|
|
6270
|
-
var
|
|
6271
|
-
return ro.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore :
|
|
6273
|
+
var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : i;
|
|
6274
|
+
return ro.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, ro;
|
|
6272
6275
|
}
|
|
6273
6276
|
var Ur;
|
|
6274
6277
|
function yp() {
|
|
@@ -6286,9 +6289,9 @@ function Sp() {
|
|
|
6286
6289
|
return () => {
|
|
6287
6290
|
};
|
|
6288
6291
|
}
|
|
6289
|
-
var Wo = "Avatar", [Cp] = we(Wo), [kp, fa] = Cp(Wo), pa =
|
|
6292
|
+
var Wo = "Avatar", [Cp] = we(Wo), [kp, fa] = Cp(Wo), pa = u.forwardRef(
|
|
6290
6293
|
(e, t) => {
|
|
6291
|
-
const { __scopeAvatar: n, ...o } = e, [r, s] =
|
|
6294
|
+
const { __scopeAvatar: n, ...o } = e, [r, s] = u.useState("idle");
|
|
6292
6295
|
return /* @__PURE__ */ p(
|
|
6293
6296
|
kp,
|
|
6294
6297
|
{
|
|
@@ -6301,7 +6304,7 @@ var Wo = "Avatar", [Cp] = we(Wo), [kp, fa] = Cp(Wo), pa = f.forwardRef(
|
|
|
6301
6304
|
}
|
|
6302
6305
|
);
|
|
6303
6306
|
pa.displayName = Wo;
|
|
6304
|
-
var ma = "AvatarImage", ha =
|
|
6307
|
+
var ma = "AvatarImage", ha = u.forwardRef(
|
|
6305
6308
|
(e, t) => {
|
|
6306
6309
|
const { __scopeAvatar: n, src: o, onLoadingStatusChange: r = () => {
|
|
6307
6310
|
}, ...s } = e, a = fa(ma, n), i = Ep(o, s), c = ve((d) => {
|
|
@@ -6313,10 +6316,10 @@ var ma = "AvatarImage", ha = f.forwardRef(
|
|
|
6313
6316
|
}
|
|
6314
6317
|
);
|
|
6315
6318
|
ha.displayName = ma;
|
|
6316
|
-
var ga = "AvatarFallback", va =
|
|
6319
|
+
var ga = "AvatarFallback", va = u.forwardRef(
|
|
6317
6320
|
(e, t) => {
|
|
6318
|
-
const { __scopeAvatar: n, delayMs: o, ...r } = e, s = fa(ga, n), [a, i] =
|
|
6319
|
-
return
|
|
6321
|
+
const { __scopeAvatar: n, delayMs: o, ...r } = e, s = fa(ga, n), [a, i] = u.useState(o === void 0);
|
|
6322
|
+
return u.useEffect(() => {
|
|
6320
6323
|
if (o !== void 0) {
|
|
6321
6324
|
const c = window.setTimeout(() => i(!0), o);
|
|
6322
6325
|
return () => window.clearTimeout(c);
|
|
@@ -6329,7 +6332,7 @@ function jr(e, t) {
|
|
|
6329
6332
|
return e ? t ? (e.src !== t && (e.src = t), e.complete && e.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
6330
6333
|
}
|
|
6331
6334
|
function Ep(e, { referrerPolicy: t, crossOrigin: n }) {
|
|
6332
|
-
const o = xp(), r =
|
|
6335
|
+
const o = xp(), r = u.useRef(null), s = o ? (r.current || (r.current = new window.Image()), r.current) : null, [a, i] = u.useState(
|
|
6333
6336
|
() => jr(s, e)
|
|
6334
6337
|
);
|
|
6335
6338
|
return de(() => {
|
|
@@ -6339,19 +6342,19 @@ function Ep(e, { referrerPolicy: t, crossOrigin: n }) {
|
|
|
6339
6342
|
i(l);
|
|
6340
6343
|
};
|
|
6341
6344
|
if (!s) return;
|
|
6342
|
-
const d = c("loaded"),
|
|
6343
|
-
return s.addEventListener("load", d), s.addEventListener("error",
|
|
6344
|
-
s.removeEventListener("load", d), s.removeEventListener("error",
|
|
6345
|
+
const d = c("loaded"), f = c("error");
|
|
6346
|
+
return s.addEventListener("load", d), s.addEventListener("error", f), t && (s.referrerPolicy = t), typeof n == "string" && (s.crossOrigin = n), () => {
|
|
6347
|
+
s.removeEventListener("load", d), s.removeEventListener("error", f);
|
|
6345
6348
|
};
|
|
6346
6349
|
}, [s, n, t]), a;
|
|
6347
6350
|
}
|
|
6348
6351
|
var Rp = pa, Np = ha, Tp = va;
|
|
6349
6352
|
function Tn(e) {
|
|
6350
|
-
const t =
|
|
6351
|
-
return
|
|
6353
|
+
const t = u.useRef({ value: e, previous: e });
|
|
6354
|
+
return u.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
6352
6355
|
}
|
|
6353
6356
|
function Pn(e) {
|
|
6354
|
-
const [t, n] =
|
|
6357
|
+
const [t, n] = u.useState(void 0);
|
|
6355
6358
|
return de(() => {
|
|
6356
6359
|
if (e) {
|
|
6357
6360
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
@@ -6384,26 +6387,26 @@ function Ip(e) {
|
|
|
6384
6387
|
name: i,
|
|
6385
6388
|
onCheckedChange: c,
|
|
6386
6389
|
required: d,
|
|
6387
|
-
value:
|
|
6390
|
+
value: f = "on",
|
|
6388
6391
|
// @ts-expect-error
|
|
6389
6392
|
internal_do_not_use_render: l
|
|
6390
|
-
} = e, [m,
|
|
6393
|
+
} = e, [m, h] = je({
|
|
6391
6394
|
prop: n,
|
|
6392
6395
|
defaultProp: r ?? !1,
|
|
6393
6396
|
onChange: c,
|
|
6394
6397
|
caller: An
|
|
6395
|
-
}), [b,
|
|
6398
|
+
}), [b, g] = u.useState(null), [v, y] = u.useState(null), w = u.useRef(!1), x = b ? !!a || !!b.closest("form") : (
|
|
6396
6399
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
6397
6400
|
!0
|
|
6398
6401
|
), k = {
|
|
6399
6402
|
checked: m,
|
|
6400
6403
|
disabled: s,
|
|
6401
|
-
setChecked:
|
|
6404
|
+
setChecked: h,
|
|
6402
6405
|
control: b,
|
|
6403
|
-
setControl:
|
|
6406
|
+
setControl: g,
|
|
6404
6407
|
name: i,
|
|
6405
6408
|
form: a,
|
|
6406
|
-
value:
|
|
6409
|
+
value: f,
|
|
6407
6410
|
hasConsumerStoppedPropagationRef: w,
|
|
6408
6411
|
required: d,
|
|
6409
6412
|
defaultChecked: et(r) ? !1 : r,
|
|
@@ -6420,7 +6423,7 @@ function Ip(e) {
|
|
|
6420
6423
|
}
|
|
6421
6424
|
);
|
|
6422
6425
|
}
|
|
6423
|
-
var ba = "CheckboxTrigger", ya =
|
|
6426
|
+
var ba = "CheckboxTrigger", ya = u.forwardRef(
|
|
6424
6427
|
({ __scopeCheckbox: e, onKeyDown: t, onClick: n, ...o }, r) => {
|
|
6425
6428
|
const {
|
|
6426
6429
|
control: s,
|
|
@@ -6428,13 +6431,13 @@ var ba = "CheckboxTrigger", ya = f.forwardRef(
|
|
|
6428
6431
|
disabled: i,
|
|
6429
6432
|
checked: c,
|
|
6430
6433
|
required: d,
|
|
6431
|
-
setControl:
|
|
6434
|
+
setControl: f,
|
|
6432
6435
|
setChecked: l,
|
|
6433
6436
|
hasConsumerStoppedPropagationRef: m,
|
|
6434
|
-
isFormControl:
|
|
6437
|
+
isFormControl: h,
|
|
6435
6438
|
bubbleInput: b
|
|
6436
|
-
} = Uo(ba, e),
|
|
6437
|
-
return
|
|
6439
|
+
} = Uo(ba, e), g = ae(r, f), v = u.useRef(c);
|
|
6440
|
+
return u.useEffect(() => {
|
|
6438
6441
|
const y = s == null ? void 0 : s.form;
|
|
6439
6442
|
if (y) {
|
|
6440
6443
|
const w = () => l(v.current);
|
|
@@ -6452,19 +6455,19 @@ var ba = "CheckboxTrigger", ya = f.forwardRef(
|
|
|
6452
6455
|
disabled: i,
|
|
6453
6456
|
value: a,
|
|
6454
6457
|
...o,
|
|
6455
|
-
ref:
|
|
6458
|
+
ref: g,
|
|
6456
6459
|
onKeyDown: J(t, (y) => {
|
|
6457
6460
|
y.key === "Enter" && y.preventDefault();
|
|
6458
6461
|
}),
|
|
6459
6462
|
onClick: J(n, (y) => {
|
|
6460
|
-
l((w) => et(w) ? !0 : !w), b &&
|
|
6463
|
+
l((w) => et(w) ? !0 : !w), b && h && (m.current = y.isPropagationStopped(), m.current || y.stopPropagation());
|
|
6461
6464
|
})
|
|
6462
6465
|
}
|
|
6463
6466
|
);
|
|
6464
6467
|
}
|
|
6465
6468
|
);
|
|
6466
6469
|
ya.displayName = ba;
|
|
6467
|
-
var wa =
|
|
6470
|
+
var wa = u.forwardRef(
|
|
6468
6471
|
(e, t) => {
|
|
6469
6472
|
const {
|
|
6470
6473
|
__scopeCheckbox: n,
|
|
@@ -6475,7 +6478,7 @@ var wa = f.forwardRef(
|
|
|
6475
6478
|
disabled: i,
|
|
6476
6479
|
value: c,
|
|
6477
6480
|
onCheckedChange: d,
|
|
6478
|
-
form:
|
|
6481
|
+
form: f,
|
|
6479
6482
|
...l
|
|
6480
6483
|
} = e;
|
|
6481
6484
|
return /* @__PURE__ */ p(
|
|
@@ -6488,7 +6491,7 @@ var wa = f.forwardRef(
|
|
|
6488
6491
|
required: a,
|
|
6489
6492
|
onCheckedChange: d,
|
|
6490
6493
|
name: o,
|
|
6491
|
-
form:
|
|
6494
|
+
form: f,
|
|
6492
6495
|
value: c,
|
|
6493
6496
|
internal_do_not_use_render: ({ isFormControl: m }) => /* @__PURE__ */ U(_e, { children: [
|
|
6494
6497
|
/* @__PURE__ */ p(
|
|
@@ -6511,11 +6514,11 @@ var wa = f.forwardRef(
|
|
|
6511
6514
|
}
|
|
6512
6515
|
);
|
|
6513
6516
|
wa.displayName = An;
|
|
6514
|
-
var xa = "CheckboxIndicator", Sa =
|
|
6517
|
+
var xa = "CheckboxIndicator", Sa = u.forwardRef(
|
|
6515
6518
|
(e, t) => {
|
|
6516
6519
|
const { __scopeCheckbox: n, forceMount: o, ...r } = e, s = Uo(xa, n);
|
|
6517
6520
|
return /* @__PURE__ */ p(
|
|
6518
|
-
|
|
6521
|
+
De,
|
|
6519
6522
|
{
|
|
6520
6523
|
present: o || et(s.checked) || s.checked === !0,
|
|
6521
6524
|
children: /* @__PURE__ */ p(
|
|
@@ -6533,7 +6536,7 @@ var xa = "CheckboxIndicator", Sa = f.forwardRef(
|
|
|
6533
6536
|
}
|
|
6534
6537
|
);
|
|
6535
6538
|
Sa.displayName = xa;
|
|
6536
|
-
var Ca = "CheckboxBubbleInput", ka =
|
|
6539
|
+
var Ca = "CheckboxBubbleInput", ka = u.forwardRef(
|
|
6537
6540
|
({ __scopeCheckbox: e, ...t }, n) => {
|
|
6538
6541
|
const {
|
|
6539
6542
|
control: o,
|
|
@@ -6543,24 +6546,24 @@ var Ca = "CheckboxBubbleInput", ka = f.forwardRef(
|
|
|
6543
6546
|
required: i,
|
|
6544
6547
|
disabled: c,
|
|
6545
6548
|
name: d,
|
|
6546
|
-
value:
|
|
6549
|
+
value: f,
|
|
6547
6550
|
form: l,
|
|
6548
6551
|
bubbleInput: m,
|
|
6549
|
-
setBubbleInput:
|
|
6550
|
-
} = Uo(Ca, e), b = ae(n,
|
|
6551
|
-
|
|
6552
|
+
setBubbleInput: h
|
|
6553
|
+
} = Uo(Ca, e), b = ae(n, h), g = Tn(s), v = Pn(o);
|
|
6554
|
+
u.useEffect(() => {
|
|
6552
6555
|
const w = m;
|
|
6553
6556
|
if (!w) return;
|
|
6554
6557
|
const x = window.HTMLInputElement.prototype, N = Object.getOwnPropertyDescriptor(
|
|
6555
6558
|
x,
|
|
6556
6559
|
"checked"
|
|
6557
6560
|
).set, T = !r.current;
|
|
6558
|
-
if (
|
|
6561
|
+
if (g !== s && N) {
|
|
6559
6562
|
const R = new Event("click", { bubbles: T });
|
|
6560
6563
|
w.indeterminate = et(s), N.call(w, et(s) ? !1 : s), w.dispatchEvent(R);
|
|
6561
6564
|
}
|
|
6562
|
-
}, [m,
|
|
6563
|
-
const y =
|
|
6565
|
+
}, [m, g, s, r]);
|
|
6566
|
+
const y = u.useRef(et(s) ? !1 : s);
|
|
6564
6567
|
return /* @__PURE__ */ p(
|
|
6565
6568
|
X.input,
|
|
6566
6569
|
{
|
|
@@ -6570,7 +6573,7 @@ var Ca = "CheckboxBubbleInput", ka = f.forwardRef(
|
|
|
6570
6573
|
required: i,
|
|
6571
6574
|
disabled: c,
|
|
6572
6575
|
name: d,
|
|
6573
|
-
value:
|
|
6576
|
+
value: f,
|
|
6574
6577
|
form: l,
|
|
6575
6578
|
...t,
|
|
6576
6579
|
tabIndex: -1,
|
|
@@ -6601,7 +6604,7 @@ function et(e) {
|
|
|
6601
6604
|
function Ea(e) {
|
|
6602
6605
|
return et(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
6603
6606
|
}
|
|
6604
|
-
const Mp = ["top", "right", "bottom", "left"], tt = Math.min, Ce = Math.max, hn = Math.round, ln = Math.floor,
|
|
6607
|
+
const Mp = ["top", "right", "bottom", "left"], tt = Math.min, Ce = Math.max, hn = Math.round, ln = Math.floor, Be = (e) => ({
|
|
6605
6608
|
x: e,
|
|
6606
6609
|
y: e
|
|
6607
6610
|
}), Op = {
|
|
@@ -6628,12 +6631,12 @@ function jo(e) {
|
|
|
6628
6631
|
function Go(e) {
|
|
6629
6632
|
return e === "y" ? "height" : "width";
|
|
6630
6633
|
}
|
|
6631
|
-
function
|
|
6634
|
+
function Fe(e) {
|
|
6632
6635
|
const t = e[0];
|
|
6633
6636
|
return t === "t" || t === "b" ? "y" : "x";
|
|
6634
6637
|
}
|
|
6635
6638
|
function Yo(e) {
|
|
6636
|
-
return jo(
|
|
6639
|
+
return jo(Fe(e));
|
|
6637
6640
|
}
|
|
6638
6641
|
function Lp(e, t, n) {
|
|
6639
6642
|
n === void 0 && (n = !1);
|
|
@@ -6710,48 +6713,48 @@ function qr(e, t, n) {
|
|
|
6710
6713
|
reference: o,
|
|
6711
6714
|
floating: r
|
|
6712
6715
|
} = e;
|
|
6713
|
-
const s =
|
|
6714
|
-
let
|
|
6716
|
+
const s = Fe(t), a = Yo(t), i = Go(a), c = Ye(t), d = s === "y", f = o.x + o.width / 2 - r.width / 2, l = o.y + o.height / 2 - r.height / 2, m = o[i] / 2 - r[i] / 2;
|
|
6717
|
+
let h;
|
|
6715
6718
|
switch (c) {
|
|
6716
6719
|
case "top":
|
|
6717
|
-
|
|
6718
|
-
x:
|
|
6720
|
+
h = {
|
|
6721
|
+
x: f,
|
|
6719
6722
|
y: o.y - r.height
|
|
6720
6723
|
};
|
|
6721
6724
|
break;
|
|
6722
6725
|
case "bottom":
|
|
6723
|
-
|
|
6724
|
-
x:
|
|
6726
|
+
h = {
|
|
6727
|
+
x: f,
|
|
6725
6728
|
y: o.y + o.height
|
|
6726
6729
|
};
|
|
6727
6730
|
break;
|
|
6728
6731
|
case "right":
|
|
6729
|
-
|
|
6732
|
+
h = {
|
|
6730
6733
|
x: o.x + o.width,
|
|
6731
6734
|
y: l
|
|
6732
6735
|
};
|
|
6733
6736
|
break;
|
|
6734
6737
|
case "left":
|
|
6735
|
-
|
|
6738
|
+
h = {
|
|
6736
6739
|
x: o.x - r.width,
|
|
6737
6740
|
y: l
|
|
6738
6741
|
};
|
|
6739
6742
|
break;
|
|
6740
6743
|
default:
|
|
6741
|
-
|
|
6744
|
+
h = {
|
|
6742
6745
|
x: o.x,
|
|
6743
6746
|
y: o.y
|
|
6744
6747
|
};
|
|
6745
6748
|
}
|
|
6746
6749
|
switch (At(t)) {
|
|
6747
6750
|
case "start":
|
|
6748
|
-
|
|
6751
|
+
h[a] -= m * (n && d ? -1 : 1);
|
|
6749
6752
|
break;
|
|
6750
6753
|
case "end":
|
|
6751
|
-
|
|
6754
|
+
h[a] += m * (n && d ? -1 : 1);
|
|
6752
6755
|
break;
|
|
6753
6756
|
}
|
|
6754
|
-
return
|
|
6757
|
+
return h;
|
|
6755
6758
|
}
|
|
6756
6759
|
async function Vp(e, t) {
|
|
6757
6760
|
var n;
|
|
@@ -6765,14 +6768,14 @@ async function Vp(e, t) {
|
|
|
6765
6768
|
strategy: c
|
|
6766
6769
|
} = e, {
|
|
6767
6770
|
boundary: d = "clippingAncestors",
|
|
6768
|
-
rootBoundary:
|
|
6771
|
+
rootBoundary: f = "viewport",
|
|
6769
6772
|
elementContext: l = "floating",
|
|
6770
6773
|
altBoundary: m = !1,
|
|
6771
|
-
padding:
|
|
6772
|
-
} = Ge(t, e), b = Ra(
|
|
6774
|
+
padding: h = 0
|
|
6775
|
+
} = Ge(t, e), b = Ra(h), v = i[m ? l === "floating" ? "reference" : "floating" : l], y = vn(await s.getClippingRect({
|
|
6773
6776
|
element: (n = await (s.isElement == null ? void 0 : s.isElement(v))) == null || n ? v : v.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(i.floating)),
|
|
6774
6777
|
boundary: d,
|
|
6775
|
-
rootBoundary:
|
|
6778
|
+
rootBoundary: f,
|
|
6776
6779
|
strategy: c
|
|
6777
6780
|
})), w = l === "floating" ? {
|
|
6778
6781
|
x: o,
|
|
@@ -6813,12 +6816,12 @@ const Wp = 50, Up = async (e, t, n) => {
|
|
|
6813
6816
|
floating: t,
|
|
6814
6817
|
strategy: r
|
|
6815
6818
|
}), {
|
|
6816
|
-
x:
|
|
6819
|
+
x: f,
|
|
6817
6820
|
y: l
|
|
6818
|
-
} = qr(d, o, c), m = o,
|
|
6821
|
+
} = qr(d, o, c), m = o, h = 0;
|
|
6819
6822
|
const b = {};
|
|
6820
|
-
for (let
|
|
6821
|
-
const v = s[
|
|
6823
|
+
for (let g = 0; g < s.length; g++) {
|
|
6824
|
+
const v = s[g];
|
|
6822
6825
|
if (!v)
|
|
6823
6826
|
continue;
|
|
6824
6827
|
const {
|
|
@@ -6830,7 +6833,7 @@ const Wp = 50, Up = async (e, t, n) => {
|
|
|
6830
6833
|
data: N,
|
|
6831
6834
|
reset: T
|
|
6832
6835
|
} = await w({
|
|
6833
|
-
x:
|
|
6836
|
+
x: f,
|
|
6834
6837
|
y: l,
|
|
6835
6838
|
initialPlacement: o,
|
|
6836
6839
|
placement: m,
|
|
@@ -6843,20 +6846,20 @@ const Wp = 50, Up = async (e, t, n) => {
|
|
|
6843
6846
|
floating: t
|
|
6844
6847
|
}
|
|
6845
6848
|
});
|
|
6846
|
-
|
|
6849
|
+
f = x ?? f, l = k ?? l, b[y] = {
|
|
6847
6850
|
...b[y],
|
|
6848
6851
|
...N
|
|
6849
|
-
}, T &&
|
|
6852
|
+
}, T && h < Wp && (h++, typeof T == "object" && (T.placement && (m = T.placement), T.rects && (d = T.rects === !0 ? await a.getElementRects({
|
|
6850
6853
|
reference: e,
|
|
6851
6854
|
floating: t,
|
|
6852
6855
|
strategy: r
|
|
6853
6856
|
}) : T.rects), {
|
|
6854
|
-
x:
|
|
6857
|
+
x: f,
|
|
6855
6858
|
y: l
|
|
6856
|
-
} = qr(d, m, c)),
|
|
6859
|
+
} = qr(d, m, c)), g = -1);
|
|
6857
6860
|
}
|
|
6858
6861
|
return {
|
|
6859
|
-
x:
|
|
6862
|
+
x: f,
|
|
6860
6863
|
y: l,
|
|
6861
6864
|
placement: m,
|
|
6862
6865
|
strategy: r,
|
|
@@ -6876,21 +6879,21 @@ const Wp = 50, Up = async (e, t, n) => {
|
|
|
6876
6879
|
middlewareData: c
|
|
6877
6880
|
} = t, {
|
|
6878
6881
|
element: d,
|
|
6879
|
-
padding:
|
|
6882
|
+
padding: f = 0
|
|
6880
6883
|
} = Ge(e, t) || {};
|
|
6881
6884
|
if (d == null)
|
|
6882
6885
|
return {};
|
|
6883
|
-
const l = Ra(
|
|
6886
|
+
const l = Ra(f), m = {
|
|
6884
6887
|
x: n,
|
|
6885
6888
|
y: o
|
|
6886
|
-
},
|
|
6889
|
+
}, h = Yo(r), b = Go(h), g = await a.getDimensions(d), v = h === "y", y = v ? "top" : "left", w = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", k = s.reference[b] + s.reference[h] - m[h] - s.floating[b], N = m[h] - s.reference[h], T = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(d));
|
|
6887
6890
|
let R = T ? T[x] : 0;
|
|
6888
6891
|
(!R || !await (a.isElement == null ? void 0 : a.isElement(T))) && (R = i.floating[x] || s.floating[b]);
|
|
6889
|
-
const S = k / 2 - N / 2, A = R / 2 -
|
|
6892
|
+
const S = k / 2 - N / 2, A = R / 2 - g[b] / 2 - 1, D = tt(l[y], A), O = tt(l[w], A), H = D, V = R - g[b] - O, W = R / 2 - g[b] / 2 + S, Q = bo(H, W, V), _ = !c.arrow && At(r) != null && W !== Q && s.reference[b] / 2 - (W < H ? D : O) - g[b] / 2 < 0, G = _ ? W < H ? W - H : W - V : 0;
|
|
6890
6893
|
return {
|
|
6891
|
-
[
|
|
6894
|
+
[h]: m[h] + G,
|
|
6892
6895
|
data: {
|
|
6893
|
-
[
|
|
6896
|
+
[h]: Q,
|
|
6894
6897
|
centerOffset: W - Q - G,
|
|
6895
6898
|
..._ && {
|
|
6896
6899
|
alignmentOffset: G
|
|
@@ -6913,21 +6916,21 @@ const Wp = 50, Up = async (e, t, n) => {
|
|
|
6913
6916
|
platform: c,
|
|
6914
6917
|
elements: d
|
|
6915
6918
|
} = t, {
|
|
6916
|
-
mainAxis:
|
|
6919
|
+
mainAxis: f = !0,
|
|
6917
6920
|
crossAxis: l = !0,
|
|
6918
6921
|
fallbackPlacements: m,
|
|
6919
|
-
fallbackStrategy:
|
|
6922
|
+
fallbackStrategy: h = "bestFit",
|
|
6920
6923
|
fallbackAxisSideDirection: b = "none",
|
|
6921
|
-
flipAlignment:
|
|
6924
|
+
flipAlignment: g = !0,
|
|
6922
6925
|
...v
|
|
6923
6926
|
} = Ge(e, t);
|
|
6924
6927
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
6925
6928
|
return {};
|
|
6926
|
-
const y = Ye(r), w =
|
|
6927
|
-
!m && T && N.push(...Bp(i,
|
|
6929
|
+
const y = Ye(r), w = Fe(i), x = Ye(i) === i, k = await (c.isRTL == null ? void 0 : c.isRTL(d.floating)), N = m || (x || !g ? [gn(i)] : Dp(i)), T = b !== "none";
|
|
6930
|
+
!m && T && N.push(...Bp(i, g, b, k));
|
|
6928
6931
|
const R = [i, ...N], S = await c.detectOverflow(t, v), A = [];
|
|
6929
6932
|
let D = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
6930
|
-
if (
|
|
6933
|
+
if (f && A.push(S[y]), l) {
|
|
6931
6934
|
const W = Lp(r, a, k);
|
|
6932
6935
|
A.push(S[W[0]], S[W[1]]);
|
|
6933
6936
|
}
|
|
@@ -6937,9 +6940,9 @@ const Wp = 50, Up = async (e, t, n) => {
|
|
|
6937
6940
|
}], !A.every((W) => W <= 0)) {
|
|
6938
6941
|
var O, H;
|
|
6939
6942
|
const W = (((O = s.flip) == null ? void 0 : O.index) || 0) + 1, Q = R[W];
|
|
6940
|
-
if (Q && (!(l === "alignment" ? w !==
|
|
6943
|
+
if (Q && (!(l === "alignment" ? w !== Fe(Q) : !1) || // We leave the current main axis only if every placement on that axis
|
|
6941
6944
|
// overflows the main axis.
|
|
6942
|
-
D.every((E) =>
|
|
6945
|
+
D.every((E) => Fe(E.placement) === w ? E.overflows[0] > 0 : !0)))
|
|
6943
6946
|
return {
|
|
6944
6947
|
data: {
|
|
6945
6948
|
index: W,
|
|
@@ -6951,12 +6954,12 @@ const Wp = 50, Up = async (e, t, n) => {
|
|
|
6951
6954
|
};
|
|
6952
6955
|
let _ = (H = D.filter((G) => G.overflows[0] <= 0).sort((G, E) => G.overflows[1] - E.overflows[1])[0]) == null ? void 0 : H.placement;
|
|
6953
6956
|
if (!_)
|
|
6954
|
-
switch (
|
|
6957
|
+
switch (h) {
|
|
6955
6958
|
case "bestFit": {
|
|
6956
6959
|
var V;
|
|
6957
6960
|
const G = (V = D.filter((E) => {
|
|
6958
6961
|
if (T) {
|
|
6959
|
-
const P =
|
|
6962
|
+
const P = Fe(E.placement);
|
|
6960
6963
|
return P === w || // Create a bias to the `y` side axis due to horizontal
|
|
6961
6964
|
// reading directions favoring greater width.
|
|
6962
6965
|
P === "y";
|
|
@@ -7040,10 +7043,10 @@ async function qp(e, t) {
|
|
|
7040
7043
|
placement: n,
|
|
7041
7044
|
platform: o,
|
|
7042
7045
|
elements: r
|
|
7043
|
-
} = e, s = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), a = Ye(n), i = At(n), c =
|
|
7046
|
+
} = e, s = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), a = Ye(n), i = At(n), c = Fe(n) === "y", d = Na.has(a) ? -1 : 1, f = s && c ? -1 : 1, l = Ge(t, e);
|
|
7044
7047
|
let {
|
|
7045
7048
|
mainAxis: m,
|
|
7046
|
-
crossAxis:
|
|
7049
|
+
crossAxis: h,
|
|
7047
7050
|
alignmentAxis: b
|
|
7048
7051
|
} = typeof l == "number" ? {
|
|
7049
7052
|
mainAxis: l,
|
|
@@ -7054,12 +7057,12 @@ async function qp(e, t) {
|
|
|
7054
7057
|
crossAxis: l.crossAxis || 0,
|
|
7055
7058
|
alignmentAxis: l.alignmentAxis
|
|
7056
7059
|
};
|
|
7057
|
-
return i && typeof b == "number" && (
|
|
7058
|
-
x:
|
|
7060
|
+
return i && typeof b == "number" && (h = i === "end" ? b * -1 : b), c ? {
|
|
7061
|
+
x: h * f,
|
|
7059
7062
|
y: m * d
|
|
7060
7063
|
} : {
|
|
7061
7064
|
x: m * d,
|
|
7062
|
-
y:
|
|
7065
|
+
y: h * f
|
|
7063
7066
|
};
|
|
7064
7067
|
}
|
|
7065
7068
|
const Kp = function(e) {
|
|
@@ -7110,23 +7113,23 @@ const Kp = function(e) {
|
|
|
7110
7113
|
}
|
|
7111
7114
|
},
|
|
7112
7115
|
...d
|
|
7113
|
-
} = Ge(e, t),
|
|
7116
|
+
} = Ge(e, t), f = {
|
|
7114
7117
|
x: n,
|
|
7115
7118
|
y: o
|
|
7116
|
-
}, l = await s.detectOverflow(t, d), m =
|
|
7117
|
-
let b =
|
|
7119
|
+
}, l = await s.detectOverflow(t, d), m = Fe(Ye(r)), h = jo(m);
|
|
7120
|
+
let b = f[h], g = f[m];
|
|
7118
7121
|
if (a) {
|
|
7119
|
-
const y =
|
|
7122
|
+
const y = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", x = b + l[y], k = b - l[w];
|
|
7120
7123
|
b = bo(x, b, k);
|
|
7121
7124
|
}
|
|
7122
7125
|
if (i) {
|
|
7123
|
-
const y = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", x =
|
|
7124
|
-
|
|
7126
|
+
const y = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", x = g + l[y], k = g - l[w];
|
|
7127
|
+
g = bo(x, g, k);
|
|
7125
7128
|
}
|
|
7126
7129
|
const v = c.fn({
|
|
7127
7130
|
...t,
|
|
7128
|
-
[
|
|
7129
|
-
[m]:
|
|
7131
|
+
[h]: b,
|
|
7132
|
+
[m]: g
|
|
7130
7133
|
});
|
|
7131
7134
|
return {
|
|
7132
7135
|
...v,
|
|
@@ -7134,7 +7137,7 @@ const Kp = function(e) {
|
|
|
7134
7137
|
x: v.x - n,
|
|
7135
7138
|
y: v.y - o,
|
|
7136
7139
|
enabled: {
|
|
7137
|
-
[
|
|
7140
|
+
[h]: a,
|
|
7138
7141
|
[m]: i
|
|
7139
7142
|
}
|
|
7140
7143
|
}
|
|
@@ -7155,22 +7158,22 @@ const Kp = function(e) {
|
|
|
7155
7158
|
offset: i = 0,
|
|
7156
7159
|
mainAxis: c = !0,
|
|
7157
7160
|
crossAxis: d = !0
|
|
7158
|
-
} = Ge(e, t),
|
|
7161
|
+
} = Ge(e, t), f = {
|
|
7159
7162
|
x: n,
|
|
7160
7163
|
y: o
|
|
7161
|
-
}, l =
|
|
7162
|
-
let
|
|
7163
|
-
const
|
|
7164
|
-
mainAxis:
|
|
7164
|
+
}, l = Fe(r), m = jo(l);
|
|
7165
|
+
let h = f[m], b = f[l];
|
|
7166
|
+
const g = Ge(i, t), v = typeof g == "number" ? {
|
|
7167
|
+
mainAxis: g,
|
|
7165
7168
|
crossAxis: 0
|
|
7166
7169
|
} : {
|
|
7167
7170
|
mainAxis: 0,
|
|
7168
7171
|
crossAxis: 0,
|
|
7169
|
-
...
|
|
7172
|
+
...g
|
|
7170
7173
|
};
|
|
7171
7174
|
if (c) {
|
|
7172
7175
|
const x = m === "y" ? "height" : "width", k = s.reference[m] - s.floating[x] + v.mainAxis, N = s.reference[m] + s.reference[x] - v.mainAxis;
|
|
7173
|
-
|
|
7176
|
+
h < k ? h = k : h > N && (h = N);
|
|
7174
7177
|
}
|
|
7175
7178
|
if (d) {
|
|
7176
7179
|
var y, w;
|
|
@@ -7178,7 +7181,7 @@ const Kp = function(e) {
|
|
|
7178
7181
|
b < N ? b = N : b > T && (b = T);
|
|
7179
7182
|
}
|
|
7180
7183
|
return {
|
|
7181
|
-
[m]:
|
|
7184
|
+
[m]: h,
|
|
7182
7185
|
[l]: b
|
|
7183
7186
|
};
|
|
7184
7187
|
}
|
|
@@ -7198,17 +7201,17 @@ const Kp = function(e) {
|
|
|
7198
7201
|
apply: c = () => {
|
|
7199
7202
|
},
|
|
7200
7203
|
...d
|
|
7201
|
-
} = Ge(e, t),
|
|
7204
|
+
} = Ge(e, t), f = await a.detectOverflow(t, d), l = Ye(r), m = At(r), h = Fe(r) === "y", {
|
|
7202
7205
|
width: b,
|
|
7203
|
-
height:
|
|
7206
|
+
height: g
|
|
7204
7207
|
} = s.floating;
|
|
7205
7208
|
let v, y;
|
|
7206
7209
|
l === "top" || l === "bottom" ? (v = l, y = m === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (y = l, v = m === "end" ? "top" : "bottom");
|
|
7207
|
-
const w =
|
|
7210
|
+
const w = g - f.top - f.bottom, x = b - f.left - f.right, k = tt(g - f[v], w), N = tt(b - f[y], x), T = !t.middlewareData.shift;
|
|
7208
7211
|
let R = k, S = N;
|
|
7209
7212
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (S = x), (o = t.middlewareData.shift) != null && o.enabled.y && (R = w), T && !m) {
|
|
7210
|
-
const D = Ce(
|
|
7211
|
-
|
|
7213
|
+
const D = Ce(f.left, 0), O = Ce(f.right, 0), H = Ce(f.top, 0), V = Ce(f.bottom, 0);
|
|
7214
|
+
h ? S = b - 2 * (D !== 0 || O !== 0 ? D + O : Ce(f.left, f.right)) : R = g - 2 * (H !== 0 || V !== 0 ? H + V : Ce(f.top, f.bottom));
|
|
7212
7215
|
}
|
|
7213
7216
|
await c({
|
|
7214
7217
|
...t,
|
|
@@ -7216,7 +7219,7 @@ const Kp = function(e) {
|
|
|
7216
7219
|
availableHeight: R
|
|
7217
7220
|
});
|
|
7218
7221
|
const A = await a.getDimensions(i.floating);
|
|
7219
|
-
return b !== A.width ||
|
|
7222
|
+
return b !== A.width || g !== A.height ? {
|
|
7220
7223
|
reset: {
|
|
7221
7224
|
rects: !0
|
|
7222
7225
|
}
|
|
@@ -7241,7 +7244,7 @@ function He(e) {
|
|
|
7241
7244
|
function Ta(e) {
|
|
7242
7245
|
return In() ? e instanceof Node || e instanceof ke(e).Node : !1;
|
|
7243
7246
|
}
|
|
7244
|
-
function
|
|
7247
|
+
function Oe(e) {
|
|
7245
7248
|
return In() ? e instanceof Element || e instanceof ke(e).Element : !1;
|
|
7246
7249
|
}
|
|
7247
7250
|
function qe(e) {
|
|
@@ -7256,7 +7259,7 @@ function Gt(e) {
|
|
|
7256
7259
|
overflowX: n,
|
|
7257
7260
|
overflowY: o,
|
|
7258
7261
|
display: r
|
|
7259
|
-
} =
|
|
7262
|
+
} = Le(e);
|
|
7260
7263
|
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && r !== "inline" && r !== "contents";
|
|
7261
7264
|
}
|
|
7262
7265
|
function Qp(e) {
|
|
@@ -7277,7 +7280,7 @@ function _n(e) {
|
|
|
7277
7280
|
const em = /transform|translate|scale|rotate|perspective|filter/, tm = /paint|layout|strict|content/, lt = (e) => !!e && e !== "none";
|
|
7278
7281
|
let so;
|
|
7279
7282
|
function qo(e) {
|
|
7280
|
-
const t =
|
|
7283
|
+
const t = Oe(e) ? Le(e) : e;
|
|
7281
7284
|
return lt(t.transform) || lt(t.translate) || lt(t.scale) || lt(t.rotate) || lt(t.perspective) || !Ko() && (lt(t.backdropFilter) || lt(t.filter)) || em.test(t.willChange || "") || tm.test(t.contain || "");
|
|
7282
7285
|
}
|
|
7283
7286
|
function nm(e) {
|
|
@@ -7297,11 +7300,11 @@ function Ko() {
|
|
|
7297
7300
|
function Nt(e) {
|
|
7298
7301
|
return /^(html|body|#document)$/.test(It(e));
|
|
7299
7302
|
}
|
|
7300
|
-
function
|
|
7303
|
+
function Le(e) {
|
|
7301
7304
|
return ke(e).getComputedStyle(e);
|
|
7302
7305
|
}
|
|
7303
7306
|
function Mn(e) {
|
|
7304
|
-
return
|
|
7307
|
+
return Oe(e) ? {
|
|
7305
7308
|
scrollLeft: e.scrollLeft,
|
|
7306
7309
|
scrollTop: e.scrollTop
|
|
7307
7310
|
} : {
|
|
@@ -7339,7 +7342,7 @@ function wo(e) {
|
|
|
7339
7342
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
7340
7343
|
}
|
|
7341
7344
|
function Aa(e) {
|
|
7342
|
-
const t =
|
|
7345
|
+
const t = Le(e);
|
|
7343
7346
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
7344
7347
|
const r = qe(e), s = r ? e.offsetWidth : n, a = r ? e.offsetHeight : o, i = hn(n) !== s || hn(o) !== a;
|
|
7345
7348
|
return i && (n = s, o = a), {
|
|
@@ -7349,12 +7352,12 @@ function Aa(e) {
|
|
|
7349
7352
|
};
|
|
7350
7353
|
}
|
|
7351
7354
|
function Xo(e) {
|
|
7352
|
-
return
|
|
7355
|
+
return Oe(e) ? e : e.contextElement;
|
|
7353
7356
|
}
|
|
7354
7357
|
function Et(e) {
|
|
7355
7358
|
const t = Xo(e);
|
|
7356
7359
|
if (!qe(t))
|
|
7357
|
-
return
|
|
7360
|
+
return Be(1);
|
|
7358
7361
|
const n = t.getBoundingClientRect(), {
|
|
7359
7362
|
width: o,
|
|
7360
7363
|
height: r,
|
|
@@ -7366,7 +7369,7 @@ function Et(e) {
|
|
|
7366
7369
|
y: i
|
|
7367
7370
|
};
|
|
7368
7371
|
}
|
|
7369
|
-
const om = /* @__PURE__ */
|
|
7372
|
+
const om = /* @__PURE__ */ Be(0);
|
|
7370
7373
|
function Ia(e) {
|
|
7371
7374
|
const t = ke(e);
|
|
7372
7375
|
return !Ko() || !t.visualViewport ? om : {
|
|
@@ -7380,20 +7383,20 @@ function rm(e, t, n) {
|
|
|
7380
7383
|
function ut(e, t, n, o) {
|
|
7381
7384
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
7382
7385
|
const r = e.getBoundingClientRect(), s = Xo(e);
|
|
7383
|
-
let a =
|
|
7384
|
-
t && (o ?
|
|
7385
|
-
const i = rm(s, n, o) ? Ia(s) :
|
|
7386
|
-
let c = (r.left + i.x) / a.x, d = (r.top + i.y) / a.y,
|
|
7386
|
+
let a = Be(1);
|
|
7387
|
+
t && (o ? Oe(o) && (a = Et(o)) : a = Et(e));
|
|
7388
|
+
const i = rm(s, n, o) ? Ia(s) : Be(0);
|
|
7389
|
+
let c = (r.left + i.x) / a.x, d = (r.top + i.y) / a.y, f = r.width / a.x, l = r.height / a.y;
|
|
7387
7390
|
if (s) {
|
|
7388
|
-
const m = ke(s),
|
|
7389
|
-
let b = m,
|
|
7390
|
-
for (;
|
|
7391
|
-
const v = Et(
|
|
7392
|
-
c *= v.x, d *= v.y,
|
|
7391
|
+
const m = ke(s), h = o && Oe(o) ? ke(o) : o;
|
|
7392
|
+
let b = m, g = wo(b);
|
|
7393
|
+
for (; g && o && h !== b; ) {
|
|
7394
|
+
const v = Et(g), y = g.getBoundingClientRect(), w = Le(g), x = y.left + (g.clientLeft + parseFloat(w.paddingLeft)) * v.x, k = y.top + (g.clientTop + parseFloat(w.paddingTop)) * v.y;
|
|
7395
|
+
c *= v.x, d *= v.y, f *= v.x, l *= v.y, c += x, d += k, b = ke(g), g = wo(b);
|
|
7393
7396
|
}
|
|
7394
7397
|
}
|
|
7395
7398
|
return vn({
|
|
7396
|
-
width:
|
|
7399
|
+
width: f,
|
|
7397
7400
|
height: l,
|
|
7398
7401
|
x: c,
|
|
7399
7402
|
y: d
|
|
@@ -7423,18 +7426,18 @@ function sm(e) {
|
|
|
7423
7426
|
let c = {
|
|
7424
7427
|
scrollLeft: 0,
|
|
7425
7428
|
scrollTop: 0
|
|
7426
|
-
}, d =
|
|
7427
|
-
const
|
|
7429
|
+
}, d = Be(1);
|
|
7430
|
+
const f = Be(0), l = qe(o);
|
|
7428
7431
|
if ((l || !l && !s) && ((It(o) !== "body" || Gt(a)) && (c = Mn(o)), l)) {
|
|
7429
|
-
const
|
|
7430
|
-
d = Et(o),
|
|
7432
|
+
const h = ut(o);
|
|
7433
|
+
d = Et(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
|
|
7431
7434
|
}
|
|
7432
|
-
const m = a && !l && !s ? _a(a, c) :
|
|
7435
|
+
const m = a && !l && !s ? _a(a, c) : Be(0);
|
|
7433
7436
|
return {
|
|
7434
7437
|
width: n.width * d.x,
|
|
7435
7438
|
height: n.height * d.y,
|
|
7436
|
-
x: n.x * d.x - c.scrollLeft * d.x +
|
|
7437
|
-
y: n.y * d.y - c.scrollTop * d.y +
|
|
7439
|
+
x: n.x * d.x - c.scrollLeft * d.x + f.x + m.x,
|
|
7440
|
+
y: n.y * d.y - c.scrollTop * d.y + f.y + m.y
|
|
7438
7441
|
};
|
|
7439
7442
|
}
|
|
7440
7443
|
function am(e) {
|
|
@@ -7444,7 +7447,7 @@ function im(e) {
|
|
|
7444
7447
|
const t = He(e), n = Mn(e), o = e.ownerDocument.body, r = Ce(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), s = Ce(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
7445
7448
|
let a = -n.scrollLeft + On(e);
|
|
7446
7449
|
const i = -n.scrollTop;
|
|
7447
|
-
return
|
|
7450
|
+
return Le(o).direction === "rtl" && (a += Ce(t.clientWidth, o.clientWidth) - r), {
|
|
7448
7451
|
width: r,
|
|
7449
7452
|
height: s,
|
|
7450
7453
|
x: a,
|
|
@@ -7457,12 +7460,12 @@ function cm(e, t) {
|
|
|
7457
7460
|
let s = o.clientWidth, a = o.clientHeight, i = 0, c = 0;
|
|
7458
7461
|
if (r) {
|
|
7459
7462
|
s = r.width, a = r.height;
|
|
7460
|
-
const
|
|
7461
|
-
(!
|
|
7463
|
+
const f = Ko();
|
|
7464
|
+
(!f || f && t === "fixed") && (i = r.offsetLeft, c = r.offsetTop);
|
|
7462
7465
|
}
|
|
7463
7466
|
const d = On(o);
|
|
7464
7467
|
if (d <= 0) {
|
|
7465
|
-
const
|
|
7468
|
+
const f = o.ownerDocument, l = f.body, m = getComputedStyle(l), h = f.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, b = Math.abs(o.clientWidth - l.clientWidth - h);
|
|
7466
7469
|
b <= Jr && (s -= b);
|
|
7467
7470
|
} else d <= Jr && (s += d);
|
|
7468
7471
|
return {
|
|
@@ -7473,7 +7476,7 @@ function cm(e, t) {
|
|
|
7473
7476
|
};
|
|
7474
7477
|
}
|
|
7475
7478
|
function lm(e, t) {
|
|
7476
|
-
const n = ut(e, !0, t === "fixed"), o = n.top + e.clientTop, r = n.left + e.clientLeft, s = qe(e) ? Et(e) :
|
|
7479
|
+
const n = ut(e, !0, t === "fixed"), o = n.top + e.clientTop, r = n.left + e.clientLeft, s = qe(e) ? Et(e) : Be(1), a = e.clientWidth * s.x, i = e.clientHeight * s.y, c = r * s.x, d = o * s.y;
|
|
7477
7480
|
return {
|
|
7478
7481
|
width: a,
|
|
7479
7482
|
height: i,
|
|
@@ -7487,7 +7490,7 @@ function Qr(e, t, n) {
|
|
|
7487
7490
|
o = cm(e, n);
|
|
7488
7491
|
else if (t === "document")
|
|
7489
7492
|
o = im(He(e));
|
|
7490
|
-
else if (
|
|
7493
|
+
else if (Oe(t))
|
|
7491
7494
|
o = lm(t, n);
|
|
7492
7495
|
else {
|
|
7493
7496
|
const r = Ia(e);
|
|
@@ -7502,18 +7505,18 @@ function Qr(e, t, n) {
|
|
|
7502
7505
|
}
|
|
7503
7506
|
function Ma(e, t) {
|
|
7504
7507
|
const n = nt(e);
|
|
7505
|
-
return n === t || !
|
|
7508
|
+
return n === t || !Oe(n) || Nt(n) ? !1 : Le(n).position === "fixed" || Ma(n, t);
|
|
7506
7509
|
}
|
|
7507
7510
|
function dm(e, t) {
|
|
7508
7511
|
const n = t.get(e);
|
|
7509
7512
|
if (n)
|
|
7510
7513
|
return n;
|
|
7511
|
-
let o = Vt(e, [], !1).filter((i) =>
|
|
7512
|
-
const s =
|
|
7514
|
+
let o = Vt(e, [], !1).filter((i) => Oe(i) && It(i) !== "body"), r = null;
|
|
7515
|
+
const s = Le(e).position === "fixed";
|
|
7513
7516
|
let a = s ? nt(e) : e;
|
|
7514
|
-
for (;
|
|
7515
|
-
const i =
|
|
7516
|
-
!c && i.position === "fixed" && (r = null), (s ? !c && !r : !c && i.position === "static" && !!r && (r.position === "absolute" || r.position === "fixed") || Gt(a) && !c && Ma(e, a)) ? o = o.filter((
|
|
7517
|
+
for (; Oe(a) && !Nt(a); ) {
|
|
7518
|
+
const i = Le(a), c = qo(a);
|
|
7519
|
+
!c && i.position === "fixed" && (r = null), (s ? !c && !r : !c && i.position === "static" && !!r && (r.position === "absolute" || r.position === "fixed") || Gt(a) && !c && Ma(e, a)) ? o = o.filter((f) => f !== a) : r = i, a = nt(a);
|
|
7517
7520
|
}
|
|
7518
7521
|
return t.set(e, o), o;
|
|
7519
7522
|
}
|
|
@@ -7525,14 +7528,14 @@ function um(e) {
|
|
|
7525
7528
|
strategy: r
|
|
7526
7529
|
} = e;
|
|
7527
7530
|
const a = [...n === "clippingAncestors" ? _n(t) ? [] : dm(t, this._c) : [].concat(n), o], i = Qr(t, a[0], r);
|
|
7528
|
-
let c = i.top, d = i.right,
|
|
7531
|
+
let c = i.top, d = i.right, f = i.bottom, l = i.left;
|
|
7529
7532
|
for (let m = 1; m < a.length; m++) {
|
|
7530
|
-
const
|
|
7531
|
-
c = Ce(
|
|
7533
|
+
const h = Qr(t, a[m], r);
|
|
7534
|
+
c = Ce(h.top, c), d = tt(h.right, d), f = tt(h.bottom, f), l = Ce(h.left, l);
|
|
7532
7535
|
}
|
|
7533
7536
|
return {
|
|
7534
7537
|
width: d - l,
|
|
7535
|
-
height:
|
|
7538
|
+
height: f - c,
|
|
7536
7539
|
x: l,
|
|
7537
7540
|
y: c
|
|
7538
7541
|
};
|
|
@@ -7553,17 +7556,17 @@ function pm(e, t, n) {
|
|
|
7553
7556
|
scrollLeft: 0,
|
|
7554
7557
|
scrollTop: 0
|
|
7555
7558
|
};
|
|
7556
|
-
const c =
|
|
7559
|
+
const c = Be(0);
|
|
7557
7560
|
function d() {
|
|
7558
7561
|
c.x = On(r);
|
|
7559
7562
|
}
|
|
7560
7563
|
if (o || !o && !s)
|
|
7561
7564
|
if ((It(t) !== "body" || Gt(r)) && (i = Mn(t)), o) {
|
|
7562
|
-
const
|
|
7563
|
-
c.x =
|
|
7565
|
+
const h = ut(t, !0, s, t);
|
|
7566
|
+
c.x = h.x + t.clientLeft, c.y = h.y + t.clientTop;
|
|
7564
7567
|
} else r && d();
|
|
7565
7568
|
s && !o && r && d();
|
|
7566
|
-
const
|
|
7569
|
+
const f = r && !o && !s ? _a(r, i) : Be(0), l = a.left + i.scrollLeft - c.x - f.x, m = a.top + i.scrollTop - c.y - f.y;
|
|
7567
7570
|
return {
|
|
7568
7571
|
x: l,
|
|
7569
7572
|
y: m,
|
|
@@ -7572,10 +7575,10 @@ function pm(e, t, n) {
|
|
|
7572
7575
|
};
|
|
7573
7576
|
}
|
|
7574
7577
|
function ao(e) {
|
|
7575
|
-
return
|
|
7578
|
+
return Le(e).position === "static";
|
|
7576
7579
|
}
|
|
7577
7580
|
function es(e, t) {
|
|
7578
|
-
if (!qe(e) ||
|
|
7581
|
+
if (!qe(e) || Le(e).position === "fixed")
|
|
7579
7582
|
return null;
|
|
7580
7583
|
if (t)
|
|
7581
7584
|
return t(e);
|
|
@@ -7589,7 +7592,7 @@ function Oa(e, t) {
|
|
|
7589
7592
|
if (!qe(e)) {
|
|
7590
7593
|
let r = nt(e);
|
|
7591
7594
|
for (; r && !Nt(r); ) {
|
|
7592
|
-
if (
|
|
7595
|
+
if (Oe(r) && !ao(r))
|
|
7593
7596
|
return r;
|
|
7594
7597
|
r = nt(r);
|
|
7595
7598
|
}
|
|
@@ -7613,7 +7616,7 @@ const mm = async function(e) {
|
|
|
7613
7616
|
};
|
|
7614
7617
|
};
|
|
7615
7618
|
function hm(e) {
|
|
7616
|
-
return
|
|
7619
|
+
return Le(e).direction === "rtl";
|
|
7617
7620
|
}
|
|
7618
7621
|
const gm = {
|
|
7619
7622
|
convertOffsetParentRelativeRectToViewportRelativeRect: sm,
|
|
@@ -7624,7 +7627,7 @@ const gm = {
|
|
|
7624
7627
|
getClientRects: am,
|
|
7625
7628
|
getDimensions: fm,
|
|
7626
7629
|
getScale: Et,
|
|
7627
|
-
isElement:
|
|
7630
|
+
isElement: Oe,
|
|
7628
7631
|
isRTL: hm
|
|
7629
7632
|
};
|
|
7630
7633
|
function La(e, t) {
|
|
@@ -7640,15 +7643,15 @@ function vm(e, t) {
|
|
|
7640
7643
|
function a(i, c) {
|
|
7641
7644
|
i === void 0 && (i = !1), c === void 0 && (c = 1), s();
|
|
7642
7645
|
const d = e.getBoundingClientRect(), {
|
|
7643
|
-
left:
|
|
7646
|
+
left: f,
|
|
7644
7647
|
top: l,
|
|
7645
7648
|
width: m,
|
|
7646
|
-
height:
|
|
7649
|
+
height: h
|
|
7647
7650
|
} = d;
|
|
7648
|
-
if (i || t(), !m || !
|
|
7651
|
+
if (i || t(), !m || !h)
|
|
7649
7652
|
return;
|
|
7650
|
-
const b = ln(l),
|
|
7651
|
-
rootMargin: -b + "px " + -
|
|
7653
|
+
const b = ln(l), g = ln(r.clientWidth - (f + m)), v = ln(r.clientHeight - (l + h)), y = ln(f), x = {
|
|
7654
|
+
rootMargin: -b + "px " + -g + "px " + -v + "px " + -y + "px",
|
|
7652
7655
|
threshold: Ce(0, tt(1, c)) || 1
|
|
7653
7656
|
};
|
|
7654
7657
|
let k = !0;
|
|
@@ -7684,32 +7687,32 @@ function bm(e, t, n, o) {
|
|
|
7684
7687
|
elementResize: a = typeof ResizeObserver == "function",
|
|
7685
7688
|
layoutShift: i = typeof IntersectionObserver == "function",
|
|
7686
7689
|
animationFrame: c = !1
|
|
7687
|
-
} = o, d = Xo(e),
|
|
7688
|
-
|
|
7690
|
+
} = o, d = Xo(e), f = r || s ? [...d ? Vt(d) : [], ...t ? Vt(t) : []] : [];
|
|
7691
|
+
f.forEach((y) => {
|
|
7689
7692
|
r && y.addEventListener("scroll", n, {
|
|
7690
7693
|
passive: !0
|
|
7691
7694
|
}), s && y.addEventListener("resize", n);
|
|
7692
7695
|
});
|
|
7693
7696
|
const l = d && i ? vm(d, n) : null;
|
|
7694
|
-
let m = -1,
|
|
7695
|
-
a && (
|
|
7697
|
+
let m = -1, h = null;
|
|
7698
|
+
a && (h = new ResizeObserver((y) => {
|
|
7696
7699
|
let [w] = y;
|
|
7697
|
-
w && w.target === d &&
|
|
7700
|
+
w && w.target === d && h && t && (h.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
7698
7701
|
var x;
|
|
7699
|
-
(x =
|
|
7702
|
+
(x = h) == null || x.observe(t);
|
|
7700
7703
|
})), n();
|
|
7701
|
-
}), d && !c &&
|
|
7702
|
-
let b,
|
|
7704
|
+
}), d && !c && h.observe(d), t && h.observe(t));
|
|
7705
|
+
let b, g = c ? ut(e) : null;
|
|
7703
7706
|
c && v();
|
|
7704
7707
|
function v() {
|
|
7705
7708
|
const y = ut(e);
|
|
7706
|
-
|
|
7709
|
+
g && !La(g, y) && n(), g = y, b = requestAnimationFrame(v);
|
|
7707
7710
|
}
|
|
7708
7711
|
return n(), () => {
|
|
7709
7712
|
var y;
|
|
7710
|
-
|
|
7713
|
+
f.forEach((w) => {
|
|
7711
7714
|
r && w.removeEventListener("scroll", n), s && w.removeEventListener("resize", n);
|
|
7712
|
-
}), l == null || l(), (y =
|
|
7715
|
+
}), l == null || l(), (y = h) == null || y.disconnect(), h = null, c && cancelAnimationFrame(b);
|
|
7713
7716
|
};
|
|
7714
7717
|
}
|
|
7715
7718
|
const ym = Kp, wm = Xp, xm = Gp, Sm = Jp, Cm = Yp, ts = jp, km = Zp, Em = (e, t, n) => {
|
|
@@ -7765,7 +7768,7 @@ function ns(e, t) {
|
|
|
7765
7768
|
return Math.round(t * n) / n;
|
|
7766
7769
|
}
|
|
7767
7770
|
function io(e) {
|
|
7768
|
-
const t =
|
|
7771
|
+
const t = u.useRef(e);
|
|
7769
7772
|
return fn(() => {
|
|
7770
7773
|
t.current = e;
|
|
7771
7774
|
}), t;
|
|
@@ -7784,20 +7787,20 @@ function Tm(e) {
|
|
|
7784
7787
|
transform: i = !0,
|
|
7785
7788
|
whileElementsMounted: c,
|
|
7786
7789
|
open: d
|
|
7787
|
-
} = e, [
|
|
7790
|
+
} = e, [f, l] = u.useState({
|
|
7788
7791
|
x: 0,
|
|
7789
7792
|
y: 0,
|
|
7790
7793
|
strategy: n,
|
|
7791
7794
|
placement: t,
|
|
7792
7795
|
middlewareData: {},
|
|
7793
7796
|
isPositioned: !1
|
|
7794
|
-
}), [m,
|
|
7795
|
-
bn(m, o) ||
|
|
7796
|
-
const [b,
|
|
7797
|
-
E !== T.current && (T.current = E,
|
|
7798
|
-
}, []), x =
|
|
7797
|
+
}), [m, h] = u.useState(o);
|
|
7798
|
+
bn(m, o) || h(o);
|
|
7799
|
+
const [b, g] = u.useState(null), [v, y] = u.useState(null), w = u.useCallback((E) => {
|
|
7800
|
+
E !== T.current && (T.current = E, g(E));
|
|
7801
|
+
}, []), x = u.useCallback((E) => {
|
|
7799
7802
|
E !== R.current && (R.current = E, y(E));
|
|
7800
|
-
}, []), k = s || b, N = a || v, T =
|
|
7803
|
+
}, []), k = s || b, N = a || v, T = u.useRef(null), R = u.useRef(null), S = u.useRef(f), A = c != null, D = io(c), O = io(r), H = io(d), V = u.useCallback(() => {
|
|
7801
7804
|
if (!T.current || !R.current)
|
|
7802
7805
|
return;
|
|
7803
7806
|
const E = {
|
|
@@ -7825,7 +7828,7 @@ function Tm(e) {
|
|
|
7825
7828
|
isPositioned: !1
|
|
7826
7829
|
})));
|
|
7827
7830
|
}, [d]);
|
|
7828
|
-
const W =
|
|
7831
|
+
const W = u.useRef(!1);
|
|
7829
7832
|
fn(() => (W.current = !0, () => {
|
|
7830
7833
|
W.current = !1;
|
|
7831
7834
|
}), []), fn(() => {
|
|
@@ -7835,15 +7838,15 @@ function Tm(e) {
|
|
|
7835
7838
|
V();
|
|
7836
7839
|
}
|
|
7837
7840
|
}, [k, N, V, D, A]);
|
|
7838
|
-
const Q =
|
|
7841
|
+
const Q = u.useMemo(() => ({
|
|
7839
7842
|
reference: T,
|
|
7840
7843
|
floating: R,
|
|
7841
7844
|
setReference: w,
|
|
7842
7845
|
setFloating: x
|
|
7843
|
-
}), [w, x]), _ =
|
|
7846
|
+
}), [w, x]), _ = u.useMemo(() => ({
|
|
7844
7847
|
reference: k,
|
|
7845
7848
|
floating: N
|
|
7846
|
-
}), [k, N]), G =
|
|
7849
|
+
}), [k, N]), G = u.useMemo(() => {
|
|
7847
7850
|
const E = {
|
|
7848
7851
|
position: n,
|
|
7849
7852
|
left: 0,
|
|
@@ -7851,7 +7854,7 @@ function Tm(e) {
|
|
|
7851
7854
|
};
|
|
7852
7855
|
if (!_.floating)
|
|
7853
7856
|
return E;
|
|
7854
|
-
const P = ns(_.floating,
|
|
7857
|
+
const P = ns(_.floating, f.x), C = ns(_.floating, f.y);
|
|
7855
7858
|
return i ? {
|
|
7856
7859
|
...E,
|
|
7857
7860
|
transform: "translate(" + P + "px, " + C + "px)",
|
|
@@ -7863,14 +7866,14 @@ function Tm(e) {
|
|
|
7863
7866
|
left: P,
|
|
7864
7867
|
top: C
|
|
7865
7868
|
};
|
|
7866
|
-
}, [n, i, _.floating,
|
|
7867
|
-
return
|
|
7868
|
-
...
|
|
7869
|
+
}, [n, i, _.floating, f.x, f.y]);
|
|
7870
|
+
return u.useMemo(() => ({
|
|
7871
|
+
...f,
|
|
7869
7872
|
update: V,
|
|
7870
7873
|
refs: Q,
|
|
7871
7874
|
elements: _,
|
|
7872
7875
|
floatingStyles: G
|
|
7873
|
-
}), [
|
|
7876
|
+
}), [f, V, Q, _, G]);
|
|
7874
7877
|
}
|
|
7875
7878
|
const Pm = (e) => {
|
|
7876
7879
|
function t(n) {
|
|
@@ -7939,7 +7942,7 @@ const Pm = (e) => {
|
|
|
7939
7942
|
options: [e, t]
|
|
7940
7943
|
};
|
|
7941
7944
|
};
|
|
7942
|
-
var zm = "Arrow", za =
|
|
7945
|
+
var zm = "Arrow", za = u.forwardRef((e, t) => {
|
|
7943
7946
|
const { children: n, width: o = 10, height: r = 5, ...s } = e;
|
|
7944
7947
|
return /* @__PURE__ */ p(
|
|
7945
7948
|
X.svg,
|
|
@@ -7956,21 +7959,21 @@ var zm = "Arrow", za = f.forwardRef((e, t) => {
|
|
|
7956
7959
|
});
|
|
7957
7960
|
za.displayName = zm;
|
|
7958
7961
|
var $m = za, Zo = "Popper", [$a, Ln] = we(Zo), [Fm, Fa] = $a(Zo), Ba = (e) => {
|
|
7959
|
-
const { __scopePopper: t, children: n } = e, [o, r] =
|
|
7962
|
+
const { __scopePopper: t, children: n } = e, [o, r] = u.useState(null);
|
|
7960
7963
|
return /* @__PURE__ */ p(Fm, { scope: t, anchor: o, onAnchorChange: r, children: n });
|
|
7961
7964
|
};
|
|
7962
7965
|
Ba.displayName = Zo;
|
|
7963
|
-
var Ha = "PopperAnchor", Va =
|
|
7966
|
+
var Ha = "PopperAnchor", Va = u.forwardRef(
|
|
7964
7967
|
(e, t) => {
|
|
7965
|
-
const { __scopePopper: n, virtualRef: o, ...r } = e, s = Fa(Ha, n), a =
|
|
7966
|
-
return
|
|
7968
|
+
const { __scopePopper: n, virtualRef: o, ...r } = e, s = Fa(Ha, n), a = u.useRef(null), i = ae(t, a), c = u.useRef(null);
|
|
7969
|
+
return u.useEffect(() => {
|
|
7967
7970
|
const d = c.current;
|
|
7968
7971
|
c.current = (o == null ? void 0 : o.current) || a.current, d !== c.current && s.onAnchorChange(c.current);
|
|
7969
7972
|
}), o ? null : /* @__PURE__ */ p(X.div, { ...r, ref: i });
|
|
7970
7973
|
}
|
|
7971
7974
|
);
|
|
7972
7975
|
Va.displayName = Ha;
|
|
7973
|
-
var Jo = "PopperContent", [Bm, Hm] = $a(Jo), Wa =
|
|
7976
|
+
var Jo = "PopperContent", [Bm, Hm] = $a(Jo), Wa = u.forwardRef(
|
|
7974
7977
|
(e, t) => {
|
|
7975
7978
|
var z, q, Z, ie, re, ne;
|
|
7976
7979
|
const {
|
|
@@ -7982,13 +7985,13 @@ var Jo = "PopperContent", [Bm, Hm] = $a(Jo), Wa = f.forwardRef(
|
|
|
7982
7985
|
arrowPadding: i = 0,
|
|
7983
7986
|
avoidCollisions: c = !0,
|
|
7984
7987
|
collisionBoundary: d = [],
|
|
7985
|
-
collisionPadding:
|
|
7988
|
+
collisionPadding: f = 0,
|
|
7986
7989
|
sticky: l = "partial",
|
|
7987
7990
|
hideWhenDetached: m = !1,
|
|
7988
|
-
updatePositionStrategy:
|
|
7991
|
+
updatePositionStrategy: h = "optimized",
|
|
7989
7992
|
onPlaced: b,
|
|
7990
|
-
...
|
|
7991
|
-
} = e, v = Fa(Jo, n), [y, w] =
|
|
7993
|
+
...g
|
|
7994
|
+
} = e, v = Fa(Jo, n), [y, w] = u.useState(null), x = ae(t, (ue) => w(ue)), [k, N] = u.useState(null), T = Pn(k), R = (T == null ? void 0 : T.width) ?? 0, S = (T == null ? void 0 : T.height) ?? 0, A = o + (s !== "center" ? "-" + s : ""), D = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, O = Array.isArray(d) ? d : [d], H = O.length > 0, V = {
|
|
7992
7995
|
padding: D,
|
|
7993
7996
|
boundary: O.filter(Wm),
|
|
7994
7997
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
@@ -7998,7 +8001,7 @@ var Jo = "PopperContent", [Bm, Hm] = $a(Jo), Wa = f.forwardRef(
|
|
|
7998
8001
|
strategy: "fixed",
|
|
7999
8002
|
placement: A,
|
|
8000
8003
|
whileElementsMounted: (...ue) => bm(...ue, {
|
|
8001
|
-
animationFrame:
|
|
8004
|
+
animationFrame: h === "always"
|
|
8002
8005
|
}),
|
|
8003
8006
|
elements: {
|
|
8004
8007
|
reference: v.anchor
|
|
@@ -8027,7 +8030,7 @@ var Jo = "PopperContent", [Bm, Hm] = $a(Jo), Wa = f.forwardRef(
|
|
|
8027
8030
|
de(() => {
|
|
8028
8031
|
G && (L == null || L());
|
|
8029
8032
|
}, [G, L]);
|
|
8030
|
-
const F = (z = E.arrow) == null ? void 0 : z.x, M = (q = E.arrow) == null ? void 0 : q.y, Y = ((Z = E.arrow) == null ? void 0 : Z.centerOffset) !== 0, [j, ee] =
|
|
8033
|
+
const F = (z = E.arrow) == null ? void 0 : z.x, M = (q = E.arrow) == null ? void 0 : q.y, Y = ((Z = E.arrow) == null ? void 0 : Z.centerOffset) !== 0, [j, ee] = u.useState();
|
|
8031
8034
|
return de(() => {
|
|
8032
8035
|
y && ee(window.getComputedStyle(y).zIndex);
|
|
8033
8036
|
}, [y]), /* @__PURE__ */ p(
|
|
@@ -8068,10 +8071,10 @@ var Jo = "PopperContent", [Bm, Hm] = $a(Jo), Wa = f.forwardRef(
|
|
|
8068
8071
|
{
|
|
8069
8072
|
"data-side": P,
|
|
8070
8073
|
"data-align": C,
|
|
8071
|
-
...
|
|
8074
|
+
...g,
|
|
8072
8075
|
ref: x,
|
|
8073
8076
|
style: {
|
|
8074
|
-
...
|
|
8077
|
+
...g.style,
|
|
8075
8078
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
8076
8079
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
8077
8080
|
animation: G ? void 0 : "none"
|
|
@@ -8090,7 +8093,7 @@ var Ua = "PopperArrow", Vm = {
|
|
|
8090
8093
|
right: "left",
|
|
8091
8094
|
bottom: "top",
|
|
8092
8095
|
left: "right"
|
|
8093
|
-
}, ja =
|
|
8096
|
+
}, ja = u.forwardRef(function(t, n) {
|
|
8094
8097
|
const { __scopePopper: o, ...r } = t, s = Hm(Ua, o), a = Vm[s.placedSide];
|
|
8095
8098
|
return (
|
|
8096
8099
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
@@ -8144,9 +8147,9 @@ var Um = (e) => ({
|
|
|
8144
8147
|
options: e,
|
|
8145
8148
|
fn(t) {
|
|
8146
8149
|
var v, y, w;
|
|
8147
|
-
const { placement: n, rects: o, middlewareData: r } = t, a = ((v = r.arrow) == null ? void 0 : v.centerOffset) !== 0, i = a ? 0 : e.arrowWidth, c = a ? 0 : e.arrowHeight, [d,
|
|
8148
|
-
let b = "",
|
|
8149
|
-
return d === "bottom" ? (b = a ? l : `${m}px`,
|
|
8150
|
+
const { placement: n, rects: o, middlewareData: r } = t, a = ((v = r.arrow) == null ? void 0 : v.centerOffset) !== 0, i = a ? 0 : e.arrowWidth, c = a ? 0 : e.arrowHeight, [d, f] = Ga(n), l = { start: "0%", center: "50%", end: "100%" }[f], m = (((y = r.arrow) == null ? void 0 : y.x) ?? 0) + i / 2, h = (((w = r.arrow) == null ? void 0 : w.y) ?? 0) + c / 2;
|
|
8151
|
+
let b = "", g = "";
|
|
8152
|
+
return d === "bottom" ? (b = a ? l : `${m}px`, g = `${-c}px`) : d === "top" ? (b = a ? l : `${m}px`, g = `${o.floating.height + c}px`) : d === "right" ? (b = `${-c}px`, g = a ? l : `${h}px`) : d === "left" && (b = `${o.floating.width + c}px`, g = a ? l : `${h}px`), { data: { x: b, y: g } };
|
|
8150
8153
|
}
|
|
8151
8154
|
});
|
|
8152
8155
|
function Ga(e) {
|
|
@@ -8156,11 +8159,11 @@ function Ga(e) {
|
|
|
8156
8159
|
var Ya = Ba, qa = Va, Ka = Wa, Xa = ja, co = "rovingFocusGroup.onEntryFocus", jm = { bubbles: !1, cancelable: !0 }, Yt = "RovingFocusGroup", [xo, Za, Gm] = qs(Yt), [Ym, Dn] = we(
|
|
8157
8160
|
Yt,
|
|
8158
8161
|
[Gm]
|
|
8159
|
-
), [qm, Km] = Ym(Yt), Ja =
|
|
8162
|
+
), [qm, Km] = Ym(Yt), Ja = u.forwardRef(
|
|
8160
8163
|
(e, t) => /* @__PURE__ */ p(xo.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ p(xo.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ p(Xm, { ...e, ref: t }) }) })
|
|
8161
8164
|
);
|
|
8162
8165
|
Ja.displayName = Yt;
|
|
8163
|
-
var Xm =
|
|
8166
|
+
var Xm = u.forwardRef((e, t) => {
|
|
8164
8167
|
const {
|
|
8165
8168
|
__scopeRovingFocusGroup: n,
|
|
8166
8169
|
orientation: o,
|
|
@@ -8170,15 +8173,15 @@ var Xm = f.forwardRef((e, t) => {
|
|
|
8170
8173
|
defaultCurrentTabStopId: i,
|
|
8171
8174
|
onCurrentTabStopIdChange: c,
|
|
8172
8175
|
onEntryFocus: d,
|
|
8173
|
-
preventScrollOnEntryFocus:
|
|
8176
|
+
preventScrollOnEntryFocus: f = !1,
|
|
8174
8177
|
...l
|
|
8175
|
-
} = e, m =
|
|
8178
|
+
} = e, m = u.useRef(null), h = ae(t, m), b = jt(s), [g, v] = je({
|
|
8176
8179
|
prop: a,
|
|
8177
8180
|
defaultProp: i ?? null,
|
|
8178
8181
|
onChange: c,
|
|
8179
8182
|
caller: Yt
|
|
8180
|
-
}), [y, w] =
|
|
8181
|
-
return
|
|
8183
|
+
}), [y, w] = u.useState(!1), x = ve(d), k = Za(n), N = u.useRef(!1), [T, R] = u.useState(0);
|
|
8184
|
+
return u.useEffect(() => {
|
|
8182
8185
|
const S = m.current;
|
|
8183
8186
|
if (S)
|
|
8184
8187
|
return S.addEventListener(co, x), () => S.removeEventListener(co, x);
|
|
@@ -8189,17 +8192,17 @@ var Xm = f.forwardRef((e, t) => {
|
|
|
8189
8192
|
orientation: o,
|
|
8190
8193
|
dir: b,
|
|
8191
8194
|
loop: r,
|
|
8192
|
-
currentTabStopId:
|
|
8193
|
-
onItemFocus:
|
|
8195
|
+
currentTabStopId: g,
|
|
8196
|
+
onItemFocus: u.useCallback(
|
|
8194
8197
|
(S) => v(S),
|
|
8195
8198
|
[v]
|
|
8196
8199
|
),
|
|
8197
|
-
onItemShiftTab:
|
|
8198
|
-
onFocusableItemAdd:
|
|
8200
|
+
onItemShiftTab: u.useCallback(() => w(!0), []),
|
|
8201
|
+
onFocusableItemAdd: u.useCallback(
|
|
8199
8202
|
() => R((S) => S + 1),
|
|
8200
8203
|
[]
|
|
8201
8204
|
),
|
|
8202
|
-
onFocusableItemRemove:
|
|
8205
|
+
onFocusableItemRemove: u.useCallback(
|
|
8203
8206
|
() => R((S) => S - 1),
|
|
8204
8207
|
[]
|
|
8205
8208
|
),
|
|
@@ -8209,7 +8212,7 @@ var Xm = f.forwardRef((e, t) => {
|
|
|
8209
8212
|
tabIndex: y || T === 0 ? -1 : 0,
|
|
8210
8213
|
"data-orientation": o,
|
|
8211
8214
|
...l,
|
|
8212
|
-
ref:
|
|
8215
|
+
ref: h,
|
|
8213
8216
|
style: { outline: "none", ...e.style },
|
|
8214
8217
|
onMouseDown: J(e.onMouseDown, () => {
|
|
8215
8218
|
N.current = !0;
|
|
@@ -8219,10 +8222,10 @@ var Xm = f.forwardRef((e, t) => {
|
|
|
8219
8222
|
if (S.target === S.currentTarget && A && !y) {
|
|
8220
8223
|
const D = new CustomEvent(co, jm);
|
|
8221
8224
|
if (S.currentTarget.dispatchEvent(D), !D.defaultPrevented) {
|
|
8222
|
-
const O = k().filter((_) => _.focusable), H = O.find((_) => _.active), V = O.find((_) => _.id ===
|
|
8225
|
+
const O = k().filter((_) => _.focusable), H = O.find((_) => _.active), V = O.find((_) => _.id === g), Q = [H, V, ...O].filter(
|
|
8223
8226
|
Boolean
|
|
8224
8227
|
).map((_) => _.ref.current);
|
|
8225
|
-
ti(Q,
|
|
8228
|
+
ti(Q, f);
|
|
8226
8229
|
}
|
|
8227
8230
|
}
|
|
8228
8231
|
N.current = !1;
|
|
@@ -8232,7 +8235,7 @@ var Xm = f.forwardRef((e, t) => {
|
|
|
8232
8235
|
)
|
|
8233
8236
|
}
|
|
8234
8237
|
);
|
|
8235
|
-
}), Qa = "RovingFocusGroupItem", ei =
|
|
8238
|
+
}), Qa = "RovingFocusGroupItem", ei = u.forwardRef(
|
|
8236
8239
|
(e, t) => {
|
|
8237
8240
|
const {
|
|
8238
8241
|
__scopeRovingFocusGroup: n,
|
|
@@ -8241,11 +8244,11 @@ var Xm = f.forwardRef((e, t) => {
|
|
|
8241
8244
|
tabStopId: s,
|
|
8242
8245
|
children: a,
|
|
8243
8246
|
...i
|
|
8244
|
-
} = e, c = ht(), d = s || c,
|
|
8245
|
-
return
|
|
8247
|
+
} = e, c = ht(), d = s || c, f = Km(Qa, n), l = f.currentTabStopId === d, m = Za(n), { onFocusableItemAdd: h, onFocusableItemRemove: b, currentTabStopId: g } = f;
|
|
8248
|
+
return u.useEffect(() => {
|
|
8246
8249
|
if (o)
|
|
8247
|
-
return
|
|
8248
|
-
}, [o,
|
|
8250
|
+
return h(), () => b();
|
|
8251
|
+
}, [o, h, b]), /* @__PURE__ */ p(
|
|
8249
8252
|
xo.ItemSlot,
|
|
8250
8253
|
{
|
|
8251
8254
|
scope: n,
|
|
@@ -8256,20 +8259,20 @@ var Xm = f.forwardRef((e, t) => {
|
|
|
8256
8259
|
X.span,
|
|
8257
8260
|
{
|
|
8258
8261
|
tabIndex: l ? 0 : -1,
|
|
8259
|
-
"data-orientation":
|
|
8262
|
+
"data-orientation": f.orientation,
|
|
8260
8263
|
...i,
|
|
8261
8264
|
ref: t,
|
|
8262
8265
|
onMouseDown: J(e.onMouseDown, (v) => {
|
|
8263
|
-
o ?
|
|
8266
|
+
o ? f.onItemFocus(d) : v.preventDefault();
|
|
8264
8267
|
}),
|
|
8265
|
-
onFocus: J(e.onFocus, () =>
|
|
8268
|
+
onFocus: J(e.onFocus, () => f.onItemFocus(d)),
|
|
8266
8269
|
onKeyDown: J(e.onKeyDown, (v) => {
|
|
8267
8270
|
if (v.key === "Tab" && v.shiftKey) {
|
|
8268
|
-
|
|
8271
|
+
f.onItemShiftTab();
|
|
8269
8272
|
return;
|
|
8270
8273
|
}
|
|
8271
8274
|
if (v.target !== v.currentTarget) return;
|
|
8272
|
-
const y = Qm(v,
|
|
8275
|
+
const y = Qm(v, f.orientation, f.dir);
|
|
8273
8276
|
if (y !== void 0) {
|
|
8274
8277
|
if (v.metaKey || v.ctrlKey || v.altKey || v.shiftKey) return;
|
|
8275
8278
|
v.preventDefault();
|
|
@@ -8278,12 +8281,12 @@ var Xm = f.forwardRef((e, t) => {
|
|
|
8278
8281
|
else if (y === "prev" || y === "next") {
|
|
8279
8282
|
y === "prev" && x.reverse();
|
|
8280
8283
|
const k = x.indexOf(v.currentTarget);
|
|
8281
|
-
x =
|
|
8284
|
+
x = f.loop ? eh(x, k + 1) : x.slice(k + 1);
|
|
8282
8285
|
}
|
|
8283
8286
|
setTimeout(() => ti(x));
|
|
8284
8287
|
}
|
|
8285
8288
|
}),
|
|
8286
|
-
children: typeof a == "function" ? a({ isCurrentTabStop: l, hasTabStop:
|
|
8289
|
+
children: typeof a == "function" ? a({ isCurrentTabStop: l, hasTabStop: g != null }) : a
|
|
8287
8290
|
}
|
|
8288
8291
|
)
|
|
8289
8292
|
}
|
|
@@ -8317,7 +8320,7 @@ function ti(e, t = !1) {
|
|
|
8317
8320
|
function eh(e, t) {
|
|
8318
8321
|
return e.map((n, o) => e[(t + o) % e.length]);
|
|
8319
8322
|
}
|
|
8320
|
-
var ni = Ja, oi = ei, th = "Label", ri =
|
|
8323
|
+
var ni = Ja, oi = ei, th = "Label", ri = u.forwardRef((e, t) => /* @__PURE__ */ p(
|
|
8321
8324
|
X.label,
|
|
8322
8325
|
{
|
|
8323
8326
|
...e,
|
|
@@ -8333,7 +8336,7 @@ var nh = ri;
|
|
|
8333
8336
|
function So(e, [t, n]) {
|
|
8334
8337
|
return Math.min(n, Math.max(t, e));
|
|
8335
8338
|
}
|
|
8336
|
-
var Qo = "Progress", er = 100, [oh] = we(Qo), [rh, sh] = oh(Qo), si =
|
|
8339
|
+
var Qo = "Progress", er = 100, [oh] = we(Qo), [rh, sh] = oh(Qo), si = u.forwardRef(
|
|
8337
8340
|
(e, t) => {
|
|
8338
8341
|
const {
|
|
8339
8342
|
__scopeProgress: n,
|
|
@@ -8364,7 +8367,7 @@ var Qo = "Progress", er = 100, [oh] = we(Qo), [rh, sh] = oh(Qo), si = f.forwardR
|
|
|
8364
8367
|
}
|
|
8365
8368
|
);
|
|
8366
8369
|
si.displayName = Qo;
|
|
8367
|
-
var ai = "ProgressIndicator", ii =
|
|
8370
|
+
var ai = "ProgressIndicator", ii = u.forwardRef(
|
|
8368
8371
|
(e, t) => {
|
|
8369
8372
|
const { __scopeProgress: n, ...o } = e, r = sh(ai, n);
|
|
8370
8373
|
return /* @__PURE__ */ p(
|
|
@@ -8406,7 +8409,7 @@ function ch(e, t) {
|
|
|
8406
8409
|
|
|
8407
8410
|
Defaulting to \`null\`.`;
|
|
8408
8411
|
}
|
|
8409
|
-
var lh = si, dh = ii, tr = "Radio", [uh, li] = we(tr), [fh, ph] = uh(tr), di =
|
|
8412
|
+
var lh = si, dh = ii, tr = "Radio", [uh, li] = we(tr), [fh, ph] = uh(tr), di = u.forwardRef(
|
|
8410
8413
|
(e, t) => {
|
|
8411
8414
|
const {
|
|
8412
8415
|
__scopeRadio: n,
|
|
@@ -8417,8 +8420,8 @@ var lh = si, dh = ii, tr = "Radio", [uh, li] = we(tr), [fh, ph] = uh(tr), di = f
|
|
|
8417
8420
|
value: i = "on",
|
|
8418
8421
|
onCheck: c,
|
|
8419
8422
|
form: d,
|
|
8420
|
-
...
|
|
8421
|
-
} = e, [l, m] =
|
|
8423
|
+
...f
|
|
8424
|
+
} = e, [l, m] = u.useState(null), h = ae(t, (v) => m(v)), b = u.useRef(!1), g = l ? d || !!l.closest("form") : !0;
|
|
8422
8425
|
return /* @__PURE__ */ U(fh, { scope: n, checked: r, disabled: a, children: [
|
|
8423
8426
|
/* @__PURE__ */ p(
|
|
8424
8427
|
X.button,
|
|
@@ -8430,14 +8433,14 @@ var lh = si, dh = ii, tr = "Radio", [uh, li] = we(tr), [fh, ph] = uh(tr), di = f
|
|
|
8430
8433
|
"data-disabled": a ? "" : void 0,
|
|
8431
8434
|
disabled: a,
|
|
8432
8435
|
value: i,
|
|
8433
|
-
...
|
|
8434
|
-
ref:
|
|
8436
|
+
...f,
|
|
8437
|
+
ref: h,
|
|
8435
8438
|
onClick: J(e.onClick, (v) => {
|
|
8436
|
-
r || c == null || c(),
|
|
8439
|
+
r || c == null || c(), g && (b.current = v.isPropagationStopped(), b.current || v.stopPropagation());
|
|
8437
8440
|
})
|
|
8438
8441
|
}
|
|
8439
8442
|
),
|
|
8440
|
-
|
|
8443
|
+
g && /* @__PURE__ */ p(
|
|
8441
8444
|
pi,
|
|
8442
8445
|
{
|
|
8443
8446
|
control: l,
|
|
@@ -8455,10 +8458,10 @@ var lh = si, dh = ii, tr = "Radio", [uh, li] = we(tr), [fh, ph] = uh(tr), di = f
|
|
|
8455
8458
|
}
|
|
8456
8459
|
);
|
|
8457
8460
|
di.displayName = tr;
|
|
8458
|
-
var ui = "RadioIndicator", fi =
|
|
8461
|
+
var ui = "RadioIndicator", fi = u.forwardRef(
|
|
8459
8462
|
(e, t) => {
|
|
8460
8463
|
const { __scopeRadio: n, forceMount: o, ...r } = e, s = ph(ui, n);
|
|
8461
|
-
return /* @__PURE__ */ p(
|
|
8464
|
+
return /* @__PURE__ */ p(De, { present: o || s.checked, children: /* @__PURE__ */ p(
|
|
8462
8465
|
X.span,
|
|
8463
8466
|
{
|
|
8464
8467
|
"data-state": mi(s.checked),
|
|
@@ -8470,7 +8473,7 @@ var ui = "RadioIndicator", fi = f.forwardRef(
|
|
|
8470
8473
|
}
|
|
8471
8474
|
);
|
|
8472
8475
|
fi.displayName = ui;
|
|
8473
|
-
var mh = "RadioBubbleInput", pi =
|
|
8476
|
+
var mh = "RadioBubbleInput", pi = u.forwardRef(
|
|
8474
8477
|
({
|
|
8475
8478
|
__scopeRadio: e,
|
|
8476
8479
|
control: t,
|
|
@@ -8478,17 +8481,17 @@ var mh = "RadioBubbleInput", pi = f.forwardRef(
|
|
|
8478
8481
|
bubbles: o = !0,
|
|
8479
8482
|
...r
|
|
8480
8483
|
}, s) => {
|
|
8481
|
-
const a =
|
|
8482
|
-
return
|
|
8483
|
-
const
|
|
8484
|
-
if (!
|
|
8485
|
-
const l = window.HTMLInputElement.prototype,
|
|
8484
|
+
const a = u.useRef(null), i = ae(a, s), c = Tn(n), d = Pn(t);
|
|
8485
|
+
return u.useEffect(() => {
|
|
8486
|
+
const f = a.current;
|
|
8487
|
+
if (!f) return;
|
|
8488
|
+
const l = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(
|
|
8486
8489
|
l,
|
|
8487
8490
|
"checked"
|
|
8488
8491
|
).set;
|
|
8489
|
-
if (c !== n &&
|
|
8492
|
+
if (c !== n && h) {
|
|
8490
8493
|
const b = new Event("click", { bubbles: o });
|
|
8491
|
-
|
|
8494
|
+
h.call(f, n), f.dispatchEvent(b);
|
|
8492
8495
|
}
|
|
8493
8496
|
}, [c, n, o]), /* @__PURE__ */ p(
|
|
8494
8497
|
X.input,
|
|
@@ -8518,7 +8521,7 @@ function mi(e) {
|
|
|
8518
8521
|
var hh = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup", [gh] = we(zn, [
|
|
8519
8522
|
Dn,
|
|
8520
8523
|
li
|
|
8521
|
-
]), hi = Dn(), gi = li(), [vh, bh] = gh(zn), vi =
|
|
8524
|
+
]), hi = Dn(), gi = li(), [vh, bh] = gh(zn), vi = u.forwardRef(
|
|
8522
8525
|
(e, t) => {
|
|
8523
8526
|
const {
|
|
8524
8527
|
__scopeRadioGroup: n,
|
|
@@ -8529,10 +8532,10 @@ var hh = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup",
|
|
|
8529
8532
|
disabled: i = !1,
|
|
8530
8533
|
orientation: c,
|
|
8531
8534
|
dir: d,
|
|
8532
|
-
loop:
|
|
8535
|
+
loop: f = !0,
|
|
8533
8536
|
onValueChange: l,
|
|
8534
8537
|
...m
|
|
8535
|
-
} = e,
|
|
8538
|
+
} = e, h = hi(n), b = jt(d), [g, v] = je({
|
|
8536
8539
|
prop: s,
|
|
8537
8540
|
defaultProp: r ?? null,
|
|
8538
8541
|
onChange: l,
|
|
@@ -8545,16 +8548,16 @@ var hh = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup",
|
|
|
8545
8548
|
name: o,
|
|
8546
8549
|
required: a,
|
|
8547
8550
|
disabled: i,
|
|
8548
|
-
value:
|
|
8551
|
+
value: g,
|
|
8549
8552
|
onValueChange: v,
|
|
8550
8553
|
children: /* @__PURE__ */ p(
|
|
8551
8554
|
ni,
|
|
8552
8555
|
{
|
|
8553
8556
|
asChild: !0,
|
|
8554
|
-
...
|
|
8557
|
+
...h,
|
|
8555
8558
|
orientation: c,
|
|
8556
8559
|
dir: b,
|
|
8557
|
-
loop:
|
|
8560
|
+
loop: f,
|
|
8558
8561
|
children: /* @__PURE__ */ p(
|
|
8559
8562
|
X.div,
|
|
8560
8563
|
{
|
|
@@ -8574,15 +8577,15 @@ var hh = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup",
|
|
|
8574
8577
|
}
|
|
8575
8578
|
);
|
|
8576
8579
|
vi.displayName = zn;
|
|
8577
|
-
var bi = "RadioGroupItem", yi =
|
|
8580
|
+
var bi = "RadioGroupItem", yi = u.forwardRef(
|
|
8578
8581
|
(e, t) => {
|
|
8579
|
-
const { __scopeRadioGroup: n, disabled: o, ...r } = e, s = bh(bi, n), a = s.disabled || o, i = hi(n), c = gi(n), d =
|
|
8580
|
-
return
|
|
8581
|
-
const
|
|
8582
|
-
hh.includes(
|
|
8582
|
+
const { __scopeRadioGroup: n, disabled: o, ...r } = e, s = bh(bi, n), a = s.disabled || o, i = hi(n), c = gi(n), d = u.useRef(null), f = ae(t, d), l = s.value === r.value, m = u.useRef(!1);
|
|
8583
|
+
return u.useEffect(() => {
|
|
8584
|
+
const h = (g) => {
|
|
8585
|
+
hh.includes(g.key) && (m.current = !0);
|
|
8583
8586
|
}, b = () => m.current = !1;
|
|
8584
|
-
return document.addEventListener("keydown",
|
|
8585
|
-
document.removeEventListener("keydown",
|
|
8587
|
+
return document.addEventListener("keydown", h), document.addEventListener("keyup", b), () => {
|
|
8588
|
+
document.removeEventListener("keydown", h), document.removeEventListener("keyup", b);
|
|
8586
8589
|
};
|
|
8587
8590
|
}, []), /* @__PURE__ */ p(
|
|
8588
8591
|
oi,
|
|
@@ -8600,14 +8603,14 @@ var bi = "RadioGroupItem", yi = f.forwardRef(
|
|
|
8600
8603
|
...c,
|
|
8601
8604
|
...r,
|
|
8602
8605
|
name: s.name,
|
|
8603
|
-
ref:
|
|
8606
|
+
ref: f,
|
|
8604
8607
|
onCheck: () => s.onValueChange(r.value),
|
|
8605
|
-
onKeyDown: J((
|
|
8606
|
-
|
|
8608
|
+
onKeyDown: J((h) => {
|
|
8609
|
+
h.key === "Enter" && h.preventDefault();
|
|
8607
8610
|
}),
|
|
8608
8611
|
onFocus: J(r.onFocus, () => {
|
|
8609
|
-
var
|
|
8610
|
-
m.current && ((
|
|
8612
|
+
var h;
|
|
8613
|
+
m.current && ((h = d.current) == null || h.click());
|
|
8611
8614
|
})
|
|
8612
8615
|
}
|
|
8613
8616
|
)
|
|
@@ -8616,7 +8619,7 @@ var bi = "RadioGroupItem", yi = f.forwardRef(
|
|
|
8616
8619
|
}
|
|
8617
8620
|
);
|
|
8618
8621
|
yi.displayName = bi;
|
|
8619
|
-
var yh = "RadioGroupIndicator", wi =
|
|
8622
|
+
var yh = "RadioGroupIndicator", wi = u.forwardRef(
|
|
8620
8623
|
(e, t) => {
|
|
8621
8624
|
const { __scopeRadioGroup: n, ...o } = e, r = gi(n);
|
|
8622
8625
|
return /* @__PURE__ */ p(fi, { ...r, ...o, ref: t });
|
|
@@ -8625,9 +8628,9 @@ var yh = "RadioGroupIndicator", wi = f.forwardRef(
|
|
|
8625
8628
|
wi.displayName = yh;
|
|
8626
8629
|
var wh = vi, xh = yi, Sh = wi;
|
|
8627
8630
|
function Ch(e, t) {
|
|
8628
|
-
return
|
|
8631
|
+
return u.useReducer((n, o) => t[n][o] ?? n, e);
|
|
8629
8632
|
}
|
|
8630
|
-
var nr = "ScrollArea", [xi] = we(nr), [kh, Ne] = xi(nr), Si =
|
|
8633
|
+
var nr = "ScrollArea", [xi] = we(nr), [kh, Ne] = xi(nr), Si = u.forwardRef(
|
|
8631
8634
|
(e, t) => {
|
|
8632
8635
|
const {
|
|
8633
8636
|
__scopeScrollArea: n,
|
|
@@ -8635,7 +8638,7 @@ var nr = "ScrollArea", [xi] = we(nr), [kh, Ne] = xi(nr), Si = f.forwardRef(
|
|
|
8635
8638
|
dir: r,
|
|
8636
8639
|
scrollHideDelay: s = 600,
|
|
8637
8640
|
...a
|
|
8638
|
-
} = e, [i, c] =
|
|
8641
|
+
} = e, [i, c] = u.useState(null), [d, f] = u.useState(null), [l, m] = u.useState(null), [h, b] = u.useState(null), [g, v] = u.useState(null), [y, w] = u.useState(0), [x, k] = u.useState(0), [N, T] = u.useState(!1), [R, S] = u.useState(!1), A = ae(t, (O) => c(O)), D = jt(r);
|
|
8639
8642
|
return /* @__PURE__ */ p(
|
|
8640
8643
|
kh,
|
|
8641
8644
|
{
|
|
@@ -8645,14 +8648,14 @@ var nr = "ScrollArea", [xi] = we(nr), [kh, Ne] = xi(nr), Si = f.forwardRef(
|
|
|
8645
8648
|
scrollHideDelay: s,
|
|
8646
8649
|
scrollArea: i,
|
|
8647
8650
|
viewport: d,
|
|
8648
|
-
onViewportChange:
|
|
8651
|
+
onViewportChange: f,
|
|
8649
8652
|
content: l,
|
|
8650
8653
|
onContentChange: m,
|
|
8651
|
-
scrollbarX:
|
|
8654
|
+
scrollbarX: h,
|
|
8652
8655
|
onScrollbarXChange: b,
|
|
8653
8656
|
scrollbarXEnabled: N,
|
|
8654
8657
|
onScrollbarXEnabledChange: T,
|
|
8655
|
-
scrollbarY:
|
|
8658
|
+
scrollbarY: g,
|
|
8656
8659
|
onScrollbarYChange: v,
|
|
8657
8660
|
scrollbarYEnabled: R,
|
|
8658
8661
|
onScrollbarYEnabledChange: S,
|
|
@@ -8678,9 +8681,9 @@ var nr = "ScrollArea", [xi] = we(nr), [kh, Ne] = xi(nr), Si = f.forwardRef(
|
|
|
8678
8681
|
}
|
|
8679
8682
|
);
|
|
8680
8683
|
Si.displayName = nr;
|
|
8681
|
-
var Ci = "ScrollAreaViewport", ki =
|
|
8684
|
+
var Ci = "ScrollAreaViewport", ki = u.forwardRef(
|
|
8682
8685
|
(e, t) => {
|
|
8683
|
-
const { __scopeScrollArea: n, children: o, nonce: r, ...s } = e, a = Ne(Ci, n), i =
|
|
8686
|
+
const { __scopeScrollArea: n, children: o, nonce: r, ...s } = e, a = Ne(Ci, n), i = u.useRef(null), c = ae(t, i, a.onViewportChange);
|
|
8684
8687
|
return /* @__PURE__ */ U(_e, { children: [
|
|
8685
8688
|
/* @__PURE__ */ p(
|
|
8686
8689
|
"style",
|
|
@@ -8720,31 +8723,31 @@ var Ci = "ScrollAreaViewport", ki = f.forwardRef(
|
|
|
8720
8723
|
}
|
|
8721
8724
|
);
|
|
8722
8725
|
ki.displayName = Ci;
|
|
8723
|
-
var Ve = "ScrollAreaScrollbar", Ei =
|
|
8726
|
+
var Ve = "ScrollAreaScrollbar", Ei = u.forwardRef(
|
|
8724
8727
|
(e, t) => {
|
|
8725
8728
|
const { forceMount: n, ...o } = e, r = Ne(Ve, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: a } = r, i = e.orientation === "horizontal";
|
|
8726
|
-
return
|
|
8729
|
+
return u.useEffect(() => (i ? s(!0) : a(!0), () => {
|
|
8727
8730
|
i ? s(!1) : a(!1);
|
|
8728
8731
|
}), [i, s, a]), r.type === "hover" ? /* @__PURE__ */ p(Eh, { ...o, ref: t, forceMount: n }) : r.type === "scroll" ? /* @__PURE__ */ p(Rh, { ...o, ref: t, forceMount: n }) : r.type === "auto" ? /* @__PURE__ */ p(Ri, { ...o, ref: t, forceMount: n }) : r.type === "always" ? /* @__PURE__ */ p(or, { ...o, ref: t }) : null;
|
|
8729
8732
|
}
|
|
8730
8733
|
);
|
|
8731
8734
|
Ei.displayName = Ve;
|
|
8732
|
-
var Eh =
|
|
8733
|
-
const { forceMount: n, ...o } = e, r = Ne(Ve, e.__scopeScrollArea), [s, a] =
|
|
8734
|
-
return
|
|
8735
|
+
var Eh = u.forwardRef((e, t) => {
|
|
8736
|
+
const { forceMount: n, ...o } = e, r = Ne(Ve, e.__scopeScrollArea), [s, a] = u.useState(!1);
|
|
8737
|
+
return u.useEffect(() => {
|
|
8735
8738
|
const i = r.scrollArea;
|
|
8736
8739
|
let c = 0;
|
|
8737
8740
|
if (i) {
|
|
8738
8741
|
const d = () => {
|
|
8739
8742
|
window.clearTimeout(c), a(!0);
|
|
8740
|
-
},
|
|
8743
|
+
}, f = () => {
|
|
8741
8744
|
c = window.setTimeout(() => a(!1), r.scrollHideDelay);
|
|
8742
8745
|
};
|
|
8743
|
-
return i.addEventListener("pointerenter", d), i.addEventListener("pointerleave",
|
|
8744
|
-
window.clearTimeout(c), i.removeEventListener("pointerenter", d), i.removeEventListener("pointerleave",
|
|
8746
|
+
return i.addEventListener("pointerenter", d), i.addEventListener("pointerleave", f), () => {
|
|
8747
|
+
window.clearTimeout(c), i.removeEventListener("pointerenter", d), i.removeEventListener("pointerleave", f);
|
|
8745
8748
|
};
|
|
8746
8749
|
}
|
|
8747
|
-
}, [r.scrollArea, r.scrollHideDelay]), /* @__PURE__ */ p(
|
|
8750
|
+
}, [r.scrollArea, r.scrollHideDelay]), /* @__PURE__ */ p(De, { present: n || s, children: /* @__PURE__ */ p(
|
|
8748
8751
|
Ri,
|
|
8749
8752
|
{
|
|
8750
8753
|
"data-state": s ? "visible" : "hidden",
|
|
@@ -8752,7 +8755,7 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8752
8755
|
ref: t
|
|
8753
8756
|
}
|
|
8754
8757
|
) });
|
|
8755
|
-
}), Rh =
|
|
8758
|
+
}), Rh = u.forwardRef((e, t) => {
|
|
8756
8759
|
const { forceMount: n, ...o } = e, r = Ne(Ve, e.__scopeScrollArea), s = e.orientation === "horizontal", a = Fn(() => c("SCROLL_END"), 100), [i, c] = Ch("hidden", {
|
|
8757
8760
|
hidden: {
|
|
8758
8761
|
SCROLL: "scrolling"
|
|
@@ -8771,22 +8774,22 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8771
8774
|
POINTER_ENTER: "interacting"
|
|
8772
8775
|
}
|
|
8773
8776
|
});
|
|
8774
|
-
return
|
|
8777
|
+
return u.useEffect(() => {
|
|
8775
8778
|
if (i === "idle") {
|
|
8776
8779
|
const d = window.setTimeout(() => c("HIDE"), r.scrollHideDelay);
|
|
8777
8780
|
return () => window.clearTimeout(d);
|
|
8778
8781
|
}
|
|
8779
|
-
}, [i, r.scrollHideDelay, c]),
|
|
8780
|
-
const d = r.viewport,
|
|
8782
|
+
}, [i, r.scrollHideDelay, c]), u.useEffect(() => {
|
|
8783
|
+
const d = r.viewport, f = s ? "scrollLeft" : "scrollTop";
|
|
8781
8784
|
if (d) {
|
|
8782
|
-
let l = d[
|
|
8785
|
+
let l = d[f];
|
|
8783
8786
|
const m = () => {
|
|
8784
|
-
const
|
|
8785
|
-
l !==
|
|
8787
|
+
const h = d[f];
|
|
8788
|
+
l !== h && (c("SCROLL"), a()), l = h;
|
|
8786
8789
|
};
|
|
8787
8790
|
return d.addEventListener("scroll", m), () => d.removeEventListener("scroll", m);
|
|
8788
8791
|
}
|
|
8789
|
-
}, [r.viewport, s, c, a]), /* @__PURE__ */ p(
|
|
8792
|
+
}, [r.viewport, s, c, a]), /* @__PURE__ */ p(De, { present: n || i !== "hidden", children: /* @__PURE__ */ p(
|
|
8790
8793
|
or,
|
|
8791
8794
|
{
|
|
8792
8795
|
"data-state": i === "hidden" ? "hidden" : "visible",
|
|
@@ -8796,14 +8799,14 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8796
8799
|
onPointerLeave: J(e.onPointerLeave, () => c("POINTER_LEAVE"))
|
|
8797
8800
|
}
|
|
8798
8801
|
) });
|
|
8799
|
-
}), Ri =
|
|
8800
|
-
const n = Ne(Ve, e.__scopeScrollArea), { forceMount: o, ...r } = e, [s, a] =
|
|
8802
|
+
}), Ri = u.forwardRef((e, t) => {
|
|
8803
|
+
const n = Ne(Ve, e.__scopeScrollArea), { forceMount: o, ...r } = e, [s, a] = u.useState(!1), i = e.orientation === "horizontal", c = Fn(() => {
|
|
8801
8804
|
if (n.viewport) {
|
|
8802
|
-
const d = n.viewport.offsetWidth < n.viewport.scrollWidth,
|
|
8803
|
-
a(i ? d :
|
|
8805
|
+
const d = n.viewport.offsetWidth < n.viewport.scrollWidth, f = n.viewport.offsetHeight < n.viewport.scrollHeight;
|
|
8806
|
+
a(i ? d : f);
|
|
8804
8807
|
}
|
|
8805
8808
|
}, 10);
|
|
8806
|
-
return Tt(n.viewport, c), Tt(n.content, c), /* @__PURE__ */ p(
|
|
8809
|
+
return Tt(n.viewport, c), Tt(n.content, c), /* @__PURE__ */ p(De, { present: o || s, children: /* @__PURE__ */ p(
|
|
8807
8810
|
or,
|
|
8808
8811
|
{
|
|
8809
8812
|
"data-state": s ? "visible" : "hidden",
|
|
@@ -8811,12 +8814,12 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8811
8814
|
ref: t
|
|
8812
8815
|
}
|
|
8813
8816
|
) });
|
|
8814
|
-
}), or =
|
|
8815
|
-
const { orientation: n = "vertical", ...o } = e, r = Ne(Ve, e.__scopeScrollArea), s =
|
|
8817
|
+
}), or = u.forwardRef((e, t) => {
|
|
8818
|
+
const { orientation: n = "vertical", ...o } = e, r = Ne(Ve, e.__scopeScrollArea), s = u.useRef(null), a = u.useRef(0), [i, c] = u.useState({
|
|
8816
8819
|
content: 0,
|
|
8817
8820
|
viewport: 0,
|
|
8818
8821
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
8819
|
-
}), d = Ii(i.viewport, i.content),
|
|
8822
|
+
}), d = Ii(i.viewport, i.content), f = {
|
|
8820
8823
|
...o,
|
|
8821
8824
|
sizes: i,
|
|
8822
8825
|
onSizesChange: c,
|
|
@@ -8825,18 +8828,18 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8825
8828
|
onThumbPointerUp: () => a.current = 0,
|
|
8826
8829
|
onThumbPointerDown: (m) => a.current = m
|
|
8827
8830
|
};
|
|
8828
|
-
function l(m,
|
|
8829
|
-
return _h(m, a.current, i,
|
|
8831
|
+
function l(m, h) {
|
|
8832
|
+
return _h(m, a.current, i, h);
|
|
8830
8833
|
}
|
|
8831
8834
|
return n === "horizontal" ? /* @__PURE__ */ p(
|
|
8832
8835
|
Nh,
|
|
8833
8836
|
{
|
|
8834
|
-
...
|
|
8837
|
+
...f,
|
|
8835
8838
|
ref: t,
|
|
8836
8839
|
onThumbPositionChange: () => {
|
|
8837
8840
|
if (r.viewport && s.current) {
|
|
8838
|
-
const m = r.viewport.scrollLeft,
|
|
8839
|
-
s.current.style.transform = `translate3d(${
|
|
8841
|
+
const m = r.viewport.scrollLeft, h = ss(m, i, r.dir);
|
|
8842
|
+
s.current.style.transform = `translate3d(${h}px, 0, 0)`;
|
|
8840
8843
|
}
|
|
8841
8844
|
},
|
|
8842
8845
|
onWheelScroll: (m) => {
|
|
@@ -8849,12 +8852,12 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8849
8852
|
) : n === "vertical" ? /* @__PURE__ */ p(
|
|
8850
8853
|
Th,
|
|
8851
8854
|
{
|
|
8852
|
-
...
|
|
8855
|
+
...f,
|
|
8853
8856
|
ref: t,
|
|
8854
8857
|
onThumbPositionChange: () => {
|
|
8855
8858
|
if (r.viewport && s.current) {
|
|
8856
|
-
const m = r.viewport.scrollTop,
|
|
8857
|
-
s.current.style.transform = `translate3d(0, ${
|
|
8859
|
+
const m = r.viewport.scrollTop, h = ss(m, i);
|
|
8860
|
+
s.current.style.transform = `translate3d(0, ${h}px, 0)`;
|
|
8858
8861
|
}
|
|
8859
8862
|
},
|
|
8860
8863
|
onWheelScroll: (m) => {
|
|
@@ -8865,9 +8868,9 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8865
8868
|
}
|
|
8866
8869
|
}
|
|
8867
8870
|
) : null;
|
|
8868
|
-
}), Nh =
|
|
8869
|
-
const { sizes: n, onSizesChange: o, ...r } = e, s = Ne(Ve, e.__scopeScrollArea), [a, i] =
|
|
8870
|
-
return
|
|
8871
|
+
}), Nh = u.forwardRef((e, t) => {
|
|
8872
|
+
const { sizes: n, onSizesChange: o, ...r } = e, s = Ne(Ve, e.__scopeScrollArea), [a, i] = u.useState(), c = u.useRef(null), d = ae(t, c, s.onScrollbarXChange);
|
|
8873
|
+
return u.useEffect(() => {
|
|
8871
8874
|
c.current && i(getComputedStyle(c.current));
|
|
8872
8875
|
}, [c]), /* @__PURE__ */ p(
|
|
8873
8876
|
Ti,
|
|
@@ -8883,12 +8886,12 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8883
8886
|
"--radix-scroll-area-thumb-width": $n(n) + "px",
|
|
8884
8887
|
...e.style
|
|
8885
8888
|
},
|
|
8886
|
-
onThumbPointerDown: (
|
|
8887
|
-
onDragScroll: (
|
|
8888
|
-
onWheelScroll: (
|
|
8889
|
+
onThumbPointerDown: (f) => e.onThumbPointerDown(f.x),
|
|
8890
|
+
onDragScroll: (f) => e.onDragScroll(f.x),
|
|
8891
|
+
onWheelScroll: (f, l) => {
|
|
8889
8892
|
if (s.viewport) {
|
|
8890
|
-
const m = s.viewport.scrollLeft +
|
|
8891
|
-
e.onWheelScroll(m), Mi(m, l) &&
|
|
8893
|
+
const m = s.viewport.scrollLeft + f.deltaX;
|
|
8894
|
+
e.onWheelScroll(m), Mi(m, l) && f.preventDefault();
|
|
8892
8895
|
}
|
|
8893
8896
|
},
|
|
8894
8897
|
onResize: () => {
|
|
@@ -8904,9 +8907,9 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8904
8907
|
}
|
|
8905
8908
|
}
|
|
8906
8909
|
);
|
|
8907
|
-
}), Th =
|
|
8908
|
-
const { sizes: n, onSizesChange: o, ...r } = e, s = Ne(Ve, e.__scopeScrollArea), [a, i] =
|
|
8909
|
-
return
|
|
8910
|
+
}), Th = u.forwardRef((e, t) => {
|
|
8911
|
+
const { sizes: n, onSizesChange: o, ...r } = e, s = Ne(Ve, e.__scopeScrollArea), [a, i] = u.useState(), c = u.useRef(null), d = ae(t, c, s.onScrollbarYChange);
|
|
8912
|
+
return u.useEffect(() => {
|
|
8910
8913
|
c.current && i(getComputedStyle(c.current));
|
|
8911
8914
|
}, [c]), /* @__PURE__ */ p(
|
|
8912
8915
|
Ti,
|
|
@@ -8923,12 +8926,12 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8923
8926
|
"--radix-scroll-area-thumb-height": $n(n) + "px",
|
|
8924
8927
|
...e.style
|
|
8925
8928
|
},
|
|
8926
|
-
onThumbPointerDown: (
|
|
8927
|
-
onDragScroll: (
|
|
8928
|
-
onWheelScroll: (
|
|
8929
|
+
onThumbPointerDown: (f) => e.onThumbPointerDown(f.y),
|
|
8930
|
+
onDragScroll: (f) => e.onDragScroll(f.y),
|
|
8931
|
+
onWheelScroll: (f, l) => {
|
|
8929
8932
|
if (s.viewport) {
|
|
8930
|
-
const m = s.viewport.scrollTop +
|
|
8931
|
-
e.onWheelScroll(m), Mi(m, l) &&
|
|
8933
|
+
const m = s.viewport.scrollTop + f.deltaY;
|
|
8934
|
+
e.onWheelScroll(m), Mi(m, l) && f.preventDefault();
|
|
8932
8935
|
}
|
|
8933
8936
|
},
|
|
8934
8937
|
onResize: () => {
|
|
@@ -8944,7 +8947,7 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8944
8947
|
}
|
|
8945
8948
|
}
|
|
8946
8949
|
);
|
|
8947
|
-
}), [Ph, Ni] = xi(Ve), Ti =
|
|
8950
|
+
}), [Ph, Ni] = xi(Ve), Ti = u.forwardRef((e, t) => {
|
|
8948
8951
|
const {
|
|
8949
8952
|
__scopeScrollArea: n,
|
|
8950
8953
|
sizes: o,
|
|
@@ -8954,23 +8957,23 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8954
8957
|
onThumbPointerDown: i,
|
|
8955
8958
|
onThumbPositionChange: c,
|
|
8956
8959
|
onDragScroll: d,
|
|
8957
|
-
onWheelScroll:
|
|
8960
|
+
onWheelScroll: f,
|
|
8958
8961
|
onResize: l,
|
|
8959
8962
|
...m
|
|
8960
|
-
} = e,
|
|
8963
|
+
} = e, h = Ne(Ve, n), [b, g] = u.useState(null), v = ae(t, (A) => g(A)), y = u.useRef(null), w = u.useRef(""), x = h.viewport, k = o.content - o.viewport, N = ve(f), T = ve(c), R = Fn(l, 10);
|
|
8961
8964
|
function S(A) {
|
|
8962
8965
|
if (y.current) {
|
|
8963
8966
|
const D = A.clientX - y.current.left, O = A.clientY - y.current.top;
|
|
8964
8967
|
d({ x: D, y: O });
|
|
8965
8968
|
}
|
|
8966
8969
|
}
|
|
8967
|
-
return
|
|
8970
|
+
return u.useEffect(() => {
|
|
8968
8971
|
const A = (D) => {
|
|
8969
8972
|
const O = D.target;
|
|
8970
8973
|
(b == null ? void 0 : b.contains(O)) && N(D, k);
|
|
8971
8974
|
};
|
|
8972
8975
|
return document.addEventListener("wheel", A, { passive: !1 }), () => document.removeEventListener("wheel", A, { passive: !1 });
|
|
8973
|
-
}, [x, b, k, N]),
|
|
8976
|
+
}, [x, b, k, N]), u.useEffect(T, [o, T]), Tt(b, R), Tt(h.content, R), /* @__PURE__ */ p(
|
|
8974
8977
|
Ph,
|
|
8975
8978
|
{
|
|
8976
8979
|
scope: n,
|
|
@@ -8987,42 +8990,42 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
8987
8990
|
ref: v,
|
|
8988
8991
|
style: { position: "absolute", ...m.style },
|
|
8989
8992
|
onPointerDown: J(e.onPointerDown, (A) => {
|
|
8990
|
-
A.button === 0 && (A.target.setPointerCapture(A.pointerId), y.current = b.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none",
|
|
8993
|
+
A.button === 0 && (A.target.setPointerCapture(A.pointerId), y.current = b.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", h.viewport && (h.viewport.style.scrollBehavior = "auto"), S(A));
|
|
8991
8994
|
}),
|
|
8992
8995
|
onPointerMove: J(e.onPointerMove, S),
|
|
8993
8996
|
onPointerUp: J(e.onPointerUp, (A) => {
|
|
8994
8997
|
const D = A.target;
|
|
8995
|
-
D.hasPointerCapture(A.pointerId) && D.releasePointerCapture(A.pointerId), document.body.style.webkitUserSelect = w.current,
|
|
8998
|
+
D.hasPointerCapture(A.pointerId) && D.releasePointerCapture(A.pointerId), document.body.style.webkitUserSelect = w.current, h.viewport && (h.viewport.style.scrollBehavior = ""), y.current = null;
|
|
8996
8999
|
})
|
|
8997
9000
|
}
|
|
8998
9001
|
)
|
|
8999
9002
|
}
|
|
9000
9003
|
);
|
|
9001
|
-
}), wn = "ScrollAreaThumb", Pi =
|
|
9004
|
+
}), wn = "ScrollAreaThumb", Pi = u.forwardRef(
|
|
9002
9005
|
(e, t) => {
|
|
9003
9006
|
const { forceMount: n, ...o } = e, r = Ni(wn, e.__scopeScrollArea);
|
|
9004
|
-
return /* @__PURE__ */ p(
|
|
9007
|
+
return /* @__PURE__ */ p(De, { present: n || r.hasThumb, children: /* @__PURE__ */ p(Ah, { ref: t, ...o }) });
|
|
9005
9008
|
}
|
|
9006
|
-
), Ah =
|
|
9009
|
+
), Ah = u.forwardRef(
|
|
9007
9010
|
(e, t) => {
|
|
9008
9011
|
const { __scopeScrollArea: n, style: o, ...r } = e, s = Ne(wn, n), a = Ni(wn, n), { onThumbPositionChange: i } = a, c = ae(
|
|
9009
9012
|
t,
|
|
9010
9013
|
(l) => a.onThumbChange(l)
|
|
9011
|
-
), d =
|
|
9014
|
+
), d = u.useRef(void 0), f = Fn(() => {
|
|
9012
9015
|
d.current && (d.current(), d.current = void 0);
|
|
9013
9016
|
}, 100);
|
|
9014
|
-
return
|
|
9017
|
+
return u.useEffect(() => {
|
|
9015
9018
|
const l = s.viewport;
|
|
9016
9019
|
if (l) {
|
|
9017
9020
|
const m = () => {
|
|
9018
|
-
if (
|
|
9019
|
-
const
|
|
9020
|
-
d.current =
|
|
9021
|
+
if (f(), !d.current) {
|
|
9022
|
+
const h = Mh(l, i);
|
|
9023
|
+
d.current = h, i();
|
|
9021
9024
|
}
|
|
9022
9025
|
};
|
|
9023
9026
|
return i(), l.addEventListener("scroll", m), () => l.removeEventListener("scroll", m);
|
|
9024
9027
|
}
|
|
9025
|
-
}, [s.viewport,
|
|
9028
|
+
}, [s.viewport, f, i]), /* @__PURE__ */ p(
|
|
9026
9029
|
X.div,
|
|
9027
9030
|
{
|
|
9028
9031
|
"data-state": a.hasThumb ? "visible" : "hidden",
|
|
@@ -9034,8 +9037,8 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
9034
9037
|
...o
|
|
9035
9038
|
},
|
|
9036
9039
|
onPointerDownCapture: J(e.onPointerDownCapture, (l) => {
|
|
9037
|
-
const
|
|
9038
|
-
a.onThumbPointerDown({ x: b, y:
|
|
9040
|
+
const h = l.target.getBoundingClientRect(), b = l.clientX - h.left, g = l.clientY - h.top;
|
|
9041
|
+
a.onThumbPointerDown({ x: b, y: g });
|
|
9039
9042
|
}),
|
|
9040
9043
|
onPointerUp: J(e.onPointerUp, a.onThumbPointerUp)
|
|
9041
9044
|
}
|
|
@@ -9043,23 +9046,23 @@ var Eh = f.forwardRef((e, t) => {
|
|
|
9043
9046
|
}
|
|
9044
9047
|
);
|
|
9045
9048
|
Pi.displayName = wn;
|
|
9046
|
-
var rr = "ScrollAreaCorner", Ai =
|
|
9049
|
+
var rr = "ScrollAreaCorner", Ai = u.forwardRef(
|
|
9047
9050
|
(e, t) => {
|
|
9048
9051
|
const n = Ne(rr, e.__scopeScrollArea), o = !!(n.scrollbarX && n.scrollbarY);
|
|
9049
9052
|
return n.type !== "scroll" && o ? /* @__PURE__ */ p(Ih, { ...e, ref: t }) : null;
|
|
9050
9053
|
}
|
|
9051
9054
|
);
|
|
9052
9055
|
Ai.displayName = rr;
|
|
9053
|
-
var Ih =
|
|
9054
|
-
const { __scopeScrollArea: n, ...o } = e, r = Ne(rr, n), [s, a] =
|
|
9056
|
+
var Ih = u.forwardRef((e, t) => {
|
|
9057
|
+
const { __scopeScrollArea: n, ...o } = e, r = Ne(rr, n), [s, a] = u.useState(0), [i, c] = u.useState(0), d = !!(s && i);
|
|
9055
9058
|
return Tt(r.scrollbarX, () => {
|
|
9056
9059
|
var l;
|
|
9057
|
-
const
|
|
9058
|
-
r.onCornerHeightChange(
|
|
9060
|
+
const f = ((l = r.scrollbarX) == null ? void 0 : l.offsetHeight) || 0;
|
|
9061
|
+
r.onCornerHeightChange(f), c(f);
|
|
9059
9062
|
}), Tt(r.scrollbarY, () => {
|
|
9060
9063
|
var l;
|
|
9061
|
-
const
|
|
9062
|
-
r.onCornerWidthChange(
|
|
9064
|
+
const f = ((l = r.scrollbarY) == null ? void 0 : l.offsetWidth) || 0;
|
|
9065
|
+
r.onCornerWidthChange(f), a(f);
|
|
9063
9066
|
}), d ? /* @__PURE__ */ p(
|
|
9064
9067
|
X.div,
|
|
9065
9068
|
{
|
|
@@ -9089,7 +9092,7 @@ function $n(e) {
|
|
|
9089
9092
|
return Math.max(o, 18);
|
|
9090
9093
|
}
|
|
9091
9094
|
function _h(e, t, n, o = "ltr") {
|
|
9092
|
-
const r = $n(n), s = r / 2, a = t || s, i = r - a, c = n.scrollbar.paddingStart + a, d = n.scrollbar.size - n.scrollbar.paddingEnd - i,
|
|
9095
|
+
const r = $n(n), s = r / 2, a = t || s, i = r - a, c = n.scrollbar.paddingStart + a, d = n.scrollbar.size - n.scrollbar.paddingEnd - i, f = n.content - n.viewport, l = o === "ltr" ? [0, f] : [f * -1, 0];
|
|
9093
9096
|
return _i([c, d], l)(e);
|
|
9094
9097
|
}
|
|
9095
9098
|
function ss(e, t, n = "ltr") {
|
|
@@ -9115,8 +9118,8 @@ var Mh = (e, t = () => {
|
|
|
9115
9118
|
})(), () => window.cancelAnimationFrame(o);
|
|
9116
9119
|
};
|
|
9117
9120
|
function Fn(e, t) {
|
|
9118
|
-
const n = ve(e), o =
|
|
9119
|
-
return
|
|
9121
|
+
const n = ve(e), o = u.useRef(0);
|
|
9122
|
+
return u.useEffect(() => () => window.clearTimeout(o.current), []), u.useCallback(() => {
|
|
9120
9123
|
window.clearTimeout(o.current), o.current = window.setTimeout(n, t);
|
|
9121
9124
|
}, [n, t]);
|
|
9122
9125
|
}
|
|
@@ -9148,12 +9151,12 @@ var Oh = Si, Lh = ki, Dh = Ai, zh = [" ", "Enter", "ArrowUp", "ArrowDown"], $h =
|
|
|
9148
9151
|
defaultValue: i,
|
|
9149
9152
|
onValueChange: c,
|
|
9150
9153
|
dir: d,
|
|
9151
|
-
name:
|
|
9154
|
+
name: f,
|
|
9152
9155
|
autoComplete: l,
|
|
9153
9156
|
disabled: m,
|
|
9154
|
-
required:
|
|
9157
|
+
required: h,
|
|
9155
9158
|
form: b
|
|
9156
|
-
} = e,
|
|
9159
|
+
} = e, g = Vn(t), [v, y] = u.useState(null), [w, x] = u.useState(null), [k, N] = u.useState(!1), T = jt(d), [R, S] = je({
|
|
9157
9160
|
prop: o,
|
|
9158
9161
|
defaultProp: r ?? !1,
|
|
9159
9162
|
onChange: s,
|
|
@@ -9163,11 +9166,11 @@ var Oh = Si, Lh = ki, Dh = Ai, zh = [" ", "Enter", "ArrowUp", "ArrowDown"], $h =
|
|
|
9163
9166
|
defaultProp: i,
|
|
9164
9167
|
onChange: c,
|
|
9165
9168
|
caller: ft
|
|
9166
|
-
}), O =
|
|
9167
|
-
return /* @__PURE__ */ p(Ya, { ...
|
|
9169
|
+
}), O = u.useRef(null), H = v ? b || !!v.closest("form") : !0, [V, W] = u.useState(/* @__PURE__ */ new Set()), Q = Array.from(V).map((_) => _.props.value).join(";");
|
|
9170
|
+
return /* @__PURE__ */ p(Ya, { ...g, children: /* @__PURE__ */ U(
|
|
9168
9171
|
Bh,
|
|
9169
9172
|
{
|
|
9170
|
-
required:
|
|
9173
|
+
required: h,
|
|
9171
9174
|
scope: t,
|
|
9172
9175
|
trigger: v,
|
|
9173
9176
|
onTriggerChange: y,
|
|
@@ -9188,10 +9191,10 @@ var Oh = Si, Lh = ki, Dh = Ai, zh = [" ", "Enter", "ArrowUp", "ArrowDown"], $h =
|
|
|
9188
9191
|
Hh,
|
|
9189
9192
|
{
|
|
9190
9193
|
scope: e.__scopeSelect,
|
|
9191
|
-
onNativeOptionAdd:
|
|
9194
|
+
onNativeOptionAdd: u.useCallback((_) => {
|
|
9192
9195
|
W((G) => new Set(G).add(_));
|
|
9193
9196
|
}, []),
|
|
9194
|
-
onNativeOptionRemove:
|
|
9197
|
+
onNativeOptionRemove: u.useCallback((_) => {
|
|
9195
9198
|
W((G) => {
|
|
9196
9199
|
const E = new Set(G);
|
|
9197
9200
|
return E.delete(_), E;
|
|
@@ -9204,9 +9207,9 @@ var Oh = Si, Lh = ki, Dh = Ai, zh = [" ", "Enter", "ArrowUp", "ArrowDown"], $h =
|
|
|
9204
9207
|
nc,
|
|
9205
9208
|
{
|
|
9206
9209
|
"aria-hidden": !0,
|
|
9207
|
-
required:
|
|
9210
|
+
required: h,
|
|
9208
9211
|
tabIndex: -1,
|
|
9209
|
-
name:
|
|
9212
|
+
name: f,
|
|
9210
9213
|
autoComplete: l,
|
|
9211
9214
|
value: A,
|
|
9212
9215
|
onChange: (_) => D(_.target.value),
|
|
@@ -9224,15 +9227,15 @@ var Oh = Si, Lh = ki, Dh = Ai, zh = [" ", "Enter", "ArrowUp", "ArrowDown"], $h =
|
|
|
9224
9227
|
) });
|
|
9225
9228
|
};
|
|
9226
9229
|
Oi.displayName = ft;
|
|
9227
|
-
var Li = "SelectTrigger", Di =
|
|
9230
|
+
var Li = "SelectTrigger", Di = u.forwardRef(
|
|
9228
9231
|
(e, t) => {
|
|
9229
|
-
const { __scopeSelect: n, disabled: o = !1, ...r } = e, s = Vn(n), a = rt(Li, n), i = a.disabled || o, c = ae(t, a.onTriggerChange), d = Hn(n),
|
|
9230
|
-
const v = d().filter((x) => !x.disabled), y = v.find((x) => x.value === a.value), w = sc(v,
|
|
9232
|
+
const { __scopeSelect: n, disabled: o = !1, ...r } = e, s = Vn(n), a = rt(Li, n), i = a.disabled || o, c = ae(t, a.onTriggerChange), d = Hn(n), f = u.useRef("touch"), [l, m, h] = rc((g) => {
|
|
9233
|
+
const v = d().filter((x) => !x.disabled), y = v.find((x) => x.value === a.value), w = sc(v, g, y);
|
|
9231
9234
|
w !== void 0 && a.onValueChange(w.value);
|
|
9232
|
-
}), b = (
|
|
9233
|
-
i || (a.onOpenChange(!0),
|
|
9234
|
-
x: Math.round(
|
|
9235
|
-
y: Math.round(
|
|
9235
|
+
}), b = (g) => {
|
|
9236
|
+
i || (a.onOpenChange(!0), h()), g && (a.triggerPointerDownPosRef.current = {
|
|
9237
|
+
x: Math.round(g.pageX),
|
|
9238
|
+
y: Math.round(g.pageY)
|
|
9236
9239
|
});
|
|
9237
9240
|
};
|
|
9238
9241
|
return /* @__PURE__ */ p(qa, { asChild: !0, ...s, children: /* @__PURE__ */ p(
|
|
@@ -9251,29 +9254,29 @@ var Li = "SelectTrigger", Di = f.forwardRef(
|
|
|
9251
9254
|
"data-placeholder": oc(a.value) ? "" : void 0,
|
|
9252
9255
|
...r,
|
|
9253
9256
|
ref: c,
|
|
9254
|
-
onClick: J(r.onClick, (
|
|
9255
|
-
|
|
9257
|
+
onClick: J(r.onClick, (g) => {
|
|
9258
|
+
g.currentTarget.focus(), f.current !== "mouse" && b(g);
|
|
9256
9259
|
}),
|
|
9257
|
-
onPointerDown: J(r.onPointerDown, (
|
|
9258
|
-
|
|
9259
|
-
const v =
|
|
9260
|
-
v.hasPointerCapture(
|
|
9260
|
+
onPointerDown: J(r.onPointerDown, (g) => {
|
|
9261
|
+
f.current = g.pointerType;
|
|
9262
|
+
const v = g.target;
|
|
9263
|
+
v.hasPointerCapture(g.pointerId) && v.releasePointerCapture(g.pointerId), g.button === 0 && g.ctrlKey === !1 && g.pointerType === "mouse" && (b(g), g.preventDefault());
|
|
9261
9264
|
}),
|
|
9262
|
-
onKeyDown: J(r.onKeyDown, (
|
|
9265
|
+
onKeyDown: J(r.onKeyDown, (g) => {
|
|
9263
9266
|
const v = l.current !== "";
|
|
9264
|
-
!(
|
|
9267
|
+
!(g.ctrlKey || g.altKey || g.metaKey) && g.key.length === 1 && m(g.key), !(v && g.key === " ") && zh.includes(g.key) && (b(), g.preventDefault());
|
|
9265
9268
|
})
|
|
9266
9269
|
}
|
|
9267
9270
|
) });
|
|
9268
9271
|
}
|
|
9269
9272
|
);
|
|
9270
9273
|
Di.displayName = Li;
|
|
9271
|
-
var zi = "SelectValue", $i =
|
|
9274
|
+
var zi = "SelectValue", $i = u.forwardRef(
|
|
9272
9275
|
(e, t) => {
|
|
9273
|
-
const { __scopeSelect: n, className: o, style: r, children: s, placeholder: a = "", ...i } = e, c = rt(zi, n), { onValueNodeHasChildrenChange: d } = c,
|
|
9276
|
+
const { __scopeSelect: n, className: o, style: r, children: s, placeholder: a = "", ...i } = e, c = rt(zi, n), { onValueNodeHasChildrenChange: d } = c, f = s !== void 0, l = ae(t, c.onValueNodeChange);
|
|
9274
9277
|
return de(() => {
|
|
9275
|
-
d(
|
|
9276
|
-
}, [d,
|
|
9278
|
+
d(f);
|
|
9279
|
+
}, [d, f]), /* @__PURE__ */ p(
|
|
9277
9280
|
X.span,
|
|
9278
9281
|
{
|
|
9279
9282
|
...i,
|
|
@@ -9285,7 +9288,7 @@ var zi = "SelectValue", $i = f.forwardRef(
|
|
|
9285
9288
|
}
|
|
9286
9289
|
);
|
|
9287
9290
|
$i.displayName = zi;
|
|
9288
|
-
var Wh = "SelectIcon", Fi =
|
|
9291
|
+
var Wh = "SelectIcon", Fi = u.forwardRef(
|
|
9289
9292
|
(e, t) => {
|
|
9290
9293
|
const { __scopeSelect: n, children: o, ...r } = e;
|
|
9291
9294
|
return /* @__PURE__ */ p(X.span, { "aria-hidden": !0, ...r, ref: t, children: o || "▼" });
|
|
@@ -9294,9 +9297,9 @@ var Wh = "SelectIcon", Fi = f.forwardRef(
|
|
|
9294
9297
|
Fi.displayName = Wh;
|
|
9295
9298
|
var Uh = "SelectPortal", Bi = (e) => /* @__PURE__ */ p(Vo, { asChild: !0, ...e });
|
|
9296
9299
|
Bi.displayName = Uh;
|
|
9297
|
-
var pt = "SelectContent", Hi =
|
|
9300
|
+
var pt = "SelectContent", Hi = u.forwardRef(
|
|
9298
9301
|
(e, t) => {
|
|
9299
|
-
const n = rt(pt, e.__scopeSelect), [o, r] =
|
|
9302
|
+
const n = rt(pt, e.__scopeSelect), [o, r] = u.useState();
|
|
9300
9303
|
if (de(() => {
|
|
9301
9304
|
r(new DocumentFragment());
|
|
9302
9305
|
}, []), !n.open) {
|
|
@@ -9310,7 +9313,7 @@ var pt = "SelectContent", Hi = f.forwardRef(
|
|
|
9310
9313
|
}
|
|
9311
9314
|
);
|
|
9312
9315
|
Hi.displayName = pt;
|
|
9313
|
-
var Ie = 10, [Vi, st] = _t(pt), jh = "SelectContentImpl", Gh = /* @__PURE__ */ Ht("SelectContent.RemoveScroll"), Wi =
|
|
9316
|
+
var Ie = 10, [Vi, st] = _t(pt), jh = "SelectContentImpl", Gh = /* @__PURE__ */ Ht("SelectContent.RemoveScroll"), Wi = u.forwardRef(
|
|
9314
9317
|
(e, t) => {
|
|
9315
9318
|
const {
|
|
9316
9319
|
__scopeSelect: n,
|
|
@@ -9323,37 +9326,37 @@ var Ie = 10, [Vi, st] = _t(pt), jh = "SelectContentImpl", Gh = /* @__PURE__ */ H
|
|
|
9323
9326
|
side: i,
|
|
9324
9327
|
sideOffset: c,
|
|
9325
9328
|
align: d,
|
|
9326
|
-
alignOffset:
|
|
9329
|
+
alignOffset: f,
|
|
9327
9330
|
arrowPadding: l,
|
|
9328
9331
|
collisionBoundary: m,
|
|
9329
|
-
collisionPadding:
|
|
9332
|
+
collisionPadding: h,
|
|
9330
9333
|
sticky: b,
|
|
9331
|
-
hideWhenDetached:
|
|
9334
|
+
hideWhenDetached: g,
|
|
9332
9335
|
avoidCollisions: v,
|
|
9333
9336
|
//
|
|
9334
9337
|
...y
|
|
9335
|
-
} = e, w = rt(pt, n), [x, k] =
|
|
9338
|
+
} = e, w = rt(pt, n), [x, k] = u.useState(null), [N, T] = u.useState(null), R = ae(t, (z) => k(z)), [S, A] = u.useState(null), [D, O] = u.useState(
|
|
9336
9339
|
null
|
|
9337
|
-
), H = Hn(n), [V, W] =
|
|
9338
|
-
|
|
9340
|
+
), H = Hn(n), [V, W] = u.useState(!1), Q = u.useRef(!1);
|
|
9341
|
+
u.useEffect(() => {
|
|
9339
9342
|
if (x) return vp(x);
|
|
9340
9343
|
}, [x]), If();
|
|
9341
|
-
const _ =
|
|
9344
|
+
const _ = u.useCallback(
|
|
9342
9345
|
(z) => {
|
|
9343
9346
|
const [q, ...Z] = H().map((ne) => ne.ref.current), [ie] = Z.slice(-1), re = document.activeElement;
|
|
9344
9347
|
for (const ne of z)
|
|
9345
9348
|
if (ne === re || (ne == null || ne.scrollIntoView({ block: "nearest" }), ne === q && N && (N.scrollTop = 0), ne === ie && N && (N.scrollTop = N.scrollHeight), ne == null || ne.focus(), document.activeElement !== re)) return;
|
|
9346
9349
|
},
|
|
9347
9350
|
[H, N]
|
|
9348
|
-
), G =
|
|
9351
|
+
), G = u.useCallback(
|
|
9349
9352
|
() => _([S, x]),
|
|
9350
9353
|
[_, S, x]
|
|
9351
9354
|
);
|
|
9352
|
-
|
|
9355
|
+
u.useEffect(() => {
|
|
9353
9356
|
V && G();
|
|
9354
9357
|
}, [V, G]);
|
|
9355
9358
|
const { onOpenChange: E, triggerPointerDownPosRef: P } = w;
|
|
9356
|
-
|
|
9359
|
+
u.useEffect(() => {
|
|
9357
9360
|
if (x) {
|
|
9358
9361
|
let z = { x: 0, y: 0 };
|
|
9359
9362
|
const q = (ie) => {
|
|
@@ -9369,7 +9372,7 @@ var Ie = 10, [Vi, st] = _t(pt), jh = "SelectContentImpl", Gh = /* @__PURE__ */ H
|
|
|
9369
9372
|
document.removeEventListener("pointermove", q), document.removeEventListener("pointerup", Z, { capture: !0 });
|
|
9370
9373
|
};
|
|
9371
9374
|
}
|
|
9372
|
-
}, [x, E, P]),
|
|
9375
|
+
}, [x, E, P]), u.useEffect(() => {
|
|
9373
9376
|
const z = () => E(!1);
|
|
9374
9377
|
return window.addEventListener("blur", z), window.addEventListener("resize", z), () => {
|
|
9375
9378
|
window.removeEventListener("blur", z), window.removeEventListener("resize", z);
|
|
@@ -9378,13 +9381,13 @@ var Ie = 10, [Vi, st] = _t(pt), jh = "SelectContentImpl", Gh = /* @__PURE__ */ H
|
|
|
9378
9381
|
const [C, L] = rc((z) => {
|
|
9379
9382
|
const q = H().filter((re) => !re.disabled), Z = q.find((re) => re.ref.current === document.activeElement), ie = sc(q, z, Z);
|
|
9380
9383
|
ie && setTimeout(() => ie.ref.current.focus());
|
|
9381
|
-
}), F =
|
|
9384
|
+
}), F = u.useCallback(
|
|
9382
9385
|
(z, q, Z) => {
|
|
9383
9386
|
const ie = !Q.current && !Z;
|
|
9384
9387
|
(w.value !== void 0 && w.value === q || ie) && (A(z), ie && (Q.current = !0));
|
|
9385
9388
|
},
|
|
9386
9389
|
[w.value]
|
|
9387
|
-
), M =
|
|
9390
|
+
), M = u.useCallback(() => x == null ? void 0 : x.focus(), [x]), Y = u.useCallback(
|
|
9388
9391
|
(z, q, Z) => {
|
|
9389
9392
|
const ie = !Q.current && !Z;
|
|
9390
9393
|
(w.value !== void 0 && w.value === q || ie) && O(z);
|
|
@@ -9394,12 +9397,12 @@ var Ie = 10, [Vi, st] = _t(pt), jh = "SelectContentImpl", Gh = /* @__PURE__ */ H
|
|
|
9394
9397
|
side: i,
|
|
9395
9398
|
sideOffset: c,
|
|
9396
9399
|
align: d,
|
|
9397
|
-
alignOffset:
|
|
9400
|
+
alignOffset: f,
|
|
9398
9401
|
arrowPadding: l,
|
|
9399
9402
|
collisionBoundary: m,
|
|
9400
|
-
collisionPadding:
|
|
9403
|
+
collisionPadding: h,
|
|
9401
9404
|
sticky: b,
|
|
9402
|
-
hideWhenDetached:
|
|
9405
|
+
hideWhenDetached: g,
|
|
9403
9406
|
avoidCollisions: v
|
|
9404
9407
|
} : {};
|
|
9405
9408
|
return /* @__PURE__ */ p(
|
|
@@ -9481,9 +9484,9 @@ var Ie = 10, [Vi, st] = _t(pt), jh = "SelectContentImpl", Gh = /* @__PURE__ */ H
|
|
|
9481
9484
|
}
|
|
9482
9485
|
);
|
|
9483
9486
|
Wi.displayName = jh;
|
|
9484
|
-
var Yh = "SelectItemAlignedPosition", Ui =
|
|
9485
|
-
const { __scopeSelect: n, onPlaced: o, ...r } = e, s = rt(pt, n), a = st(pt, n), [i, c] =
|
|
9486
|
-
if (s.trigger && s.valueNode && i && d &&
|
|
9487
|
+
var Yh = "SelectItemAlignedPosition", Ui = u.forwardRef((e, t) => {
|
|
9488
|
+
const { __scopeSelect: n, onPlaced: o, ...r } = e, s = rt(pt, n), a = st(pt, n), [i, c] = u.useState(null), [d, f] = u.useState(null), l = ae(t, (R) => f(R)), m = Hn(n), h = u.useRef(!1), b = u.useRef(!0), { viewport: g, selectedItem: v, selectedItemText: y, focusSelectedItem: w } = a, x = u.useCallback(() => {
|
|
9489
|
+
if (s.trigger && s.valueNode && i && d && g && v && y) {
|
|
9487
9490
|
const R = s.trigger.getBoundingClientRect(), S = d.getBoundingClientRect(), A = s.valueNode.getBoundingClientRect(), D = y.getBoundingClientRect();
|
|
9488
9491
|
if (s.dir !== "rtl") {
|
|
9489
9492
|
const re = D.left - S.left, ne = A.left - re, ue = R.left - ne, fe = R.width + ue, at = Math.max(fe, S.width), Ke = window.innerWidth - Ie, Te = So(ne, [
|
|
@@ -9503,11 +9506,11 @@ var Yh = "SelectItemAlignedPosition", Ui = f.forwardRef((e, t) => {
|
|
|
9503
9506
|
]);
|
|
9504
9507
|
i.style.minWidth = fe + "px", i.style.right = Te + "px";
|
|
9505
9508
|
}
|
|
9506
|
-
const O = m(), H = window.innerHeight - Ie * 2, V =
|
|
9509
|
+
const O = m(), H = window.innerHeight - Ie * 2, V = g.scrollHeight, W = window.getComputedStyle(d), Q = parseInt(W.borderTopWidth, 10), _ = parseInt(W.paddingTop, 10), G = parseInt(W.borderBottomWidth, 10), E = parseInt(W.paddingBottom, 10), P = Q + _ + V + E + G, C = Math.min(v.offsetHeight * 5, P), L = window.getComputedStyle(g), F = parseInt(L.paddingTop, 10), M = parseInt(L.paddingBottom, 10), Y = R.top + R.height / 2 - Ie, j = H - Y, ee = v.offsetHeight / 2, z = v.offsetTop + ee, q = Q + _ + z, Z = P - q;
|
|
9507
9510
|
if (q <= Y) {
|
|
9508
9511
|
const re = O.length > 0 && v === O[O.length - 1].ref.current;
|
|
9509
9512
|
i.style.bottom = "0px";
|
|
9510
|
-
const ne = d.clientHeight -
|
|
9513
|
+
const ne = d.clientHeight - g.offsetTop - g.offsetHeight, ue = Math.max(
|
|
9511
9514
|
j,
|
|
9512
9515
|
ee + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
9513
9516
|
(re ? M : 0) + ne + G
|
|
@@ -9518,12 +9521,12 @@ var Yh = "SelectItemAlignedPosition", Ui = f.forwardRef((e, t) => {
|
|
|
9518
9521
|
i.style.top = "0px";
|
|
9519
9522
|
const ue = Math.max(
|
|
9520
9523
|
Y,
|
|
9521
|
-
Q +
|
|
9524
|
+
Q + g.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
9522
9525
|
(re ? F : 0) + ee
|
|
9523
9526
|
) + Z;
|
|
9524
|
-
i.style.height = ue + "px",
|
|
9527
|
+
i.style.height = ue + "px", g.scrollTop = q - Y + g.offsetTop;
|
|
9525
9528
|
}
|
|
9526
|
-
i.style.margin = `${Ie}px 0`, i.style.minHeight = C + "px", i.style.maxHeight = H + "px", o == null || o(), requestAnimationFrame(() =>
|
|
9529
|
+
i.style.margin = `${Ie}px 0`, i.style.minHeight = C + "px", i.style.maxHeight = H + "px", o == null || o(), requestAnimationFrame(() => h.current = !0);
|
|
9527
9530
|
}
|
|
9528
9531
|
}, [
|
|
9529
9532
|
m,
|
|
@@ -9531,18 +9534,18 @@ var Yh = "SelectItemAlignedPosition", Ui = f.forwardRef((e, t) => {
|
|
|
9531
9534
|
s.valueNode,
|
|
9532
9535
|
i,
|
|
9533
9536
|
d,
|
|
9534
|
-
|
|
9537
|
+
g,
|
|
9535
9538
|
v,
|
|
9536
9539
|
y,
|
|
9537
9540
|
s.dir,
|
|
9538
9541
|
o
|
|
9539
9542
|
]);
|
|
9540
9543
|
de(() => x(), [x]);
|
|
9541
|
-
const [k, N] =
|
|
9544
|
+
const [k, N] = u.useState();
|
|
9542
9545
|
de(() => {
|
|
9543
9546
|
d && N(window.getComputedStyle(d).zIndex);
|
|
9544
9547
|
}, [d]);
|
|
9545
|
-
const T =
|
|
9548
|
+
const T = u.useCallback(
|
|
9546
9549
|
(R) => {
|
|
9547
9550
|
R && b.current === !0 && (x(), w == null || w(), b.current = !1);
|
|
9548
9551
|
},
|
|
@@ -9553,7 +9556,7 @@ var Yh = "SelectItemAlignedPosition", Ui = f.forwardRef((e, t) => {
|
|
|
9553
9556
|
{
|
|
9554
9557
|
scope: n,
|
|
9555
9558
|
contentWrapper: i,
|
|
9556
|
-
shouldExpandOnScrollRef:
|
|
9559
|
+
shouldExpandOnScrollRef: h,
|
|
9557
9560
|
onScrollButtonChange: T,
|
|
9558
9561
|
children: /* @__PURE__ */ p(
|
|
9559
9562
|
"div",
|
|
@@ -9586,7 +9589,7 @@ var Yh = "SelectItemAlignedPosition", Ui = f.forwardRef((e, t) => {
|
|
|
9586
9589
|
);
|
|
9587
9590
|
});
|
|
9588
9591
|
Ui.displayName = Yh;
|
|
9589
|
-
var qh = "SelectPopperPosition", Co =
|
|
9592
|
+
var qh = "SelectPopperPosition", Co = u.forwardRef((e, t) => {
|
|
9590
9593
|
const {
|
|
9591
9594
|
__scopeSelect: n,
|
|
9592
9595
|
align: o = "start",
|
|
@@ -9615,9 +9618,9 @@ var qh = "SelectPopperPosition", Co = f.forwardRef((e, t) => {
|
|
|
9615
9618
|
);
|
|
9616
9619
|
});
|
|
9617
9620
|
Co.displayName = qh;
|
|
9618
|
-
var [Kh, sr] = _t(pt, {}), ko = "SelectViewport", ji =
|
|
9621
|
+
var [Kh, sr] = _t(pt, {}), ko = "SelectViewport", ji = u.forwardRef(
|
|
9619
9622
|
(e, t) => {
|
|
9620
|
-
const { __scopeSelect: n, nonce: o, ...r } = e, s = st(ko, n), a = sr(ko, n), i = ae(t, s.onViewportChange), c =
|
|
9623
|
+
const { __scopeSelect: n, nonce: o, ...r } = e, s = st(ko, n), a = sr(ko, n), i = ae(t, s.onViewportChange), c = u.useRef(0);
|
|
9621
9624
|
return /* @__PURE__ */ U(_e, { children: [
|
|
9622
9625
|
/* @__PURE__ */ p(
|
|
9623
9626
|
"style",
|
|
@@ -9649,18 +9652,18 @@ var [Kh, sr] = _t(pt, {}), ko = "SelectViewport", ji = f.forwardRef(
|
|
|
9649
9652
|
...r.style
|
|
9650
9653
|
},
|
|
9651
9654
|
onScroll: J(r.onScroll, (d) => {
|
|
9652
|
-
const
|
|
9655
|
+
const f = d.currentTarget, { contentWrapper: l, shouldExpandOnScrollRef: m } = a;
|
|
9653
9656
|
if (m != null && m.current && l) {
|
|
9654
|
-
const
|
|
9655
|
-
if (
|
|
9656
|
-
const b = window.innerHeight - Ie * 2,
|
|
9657
|
+
const h = Math.abs(c.current - f.scrollTop);
|
|
9658
|
+
if (h > 0) {
|
|
9659
|
+
const b = window.innerHeight - Ie * 2, g = parseFloat(l.style.minHeight), v = parseFloat(l.style.height), y = Math.max(g, v);
|
|
9657
9660
|
if (y < b) {
|
|
9658
|
-
const w = y +
|
|
9659
|
-
l.style.height = x + "px", l.style.bottom === "0px" && (
|
|
9661
|
+
const w = y + h, x = Math.min(b, w), k = w - x;
|
|
9662
|
+
l.style.height = x + "px", l.style.bottom === "0px" && (f.scrollTop = k > 0 ? k : 0, l.style.justifyContent = "flex-end");
|
|
9660
9663
|
}
|
|
9661
9664
|
}
|
|
9662
9665
|
}
|
|
9663
|
-
c.current =
|
|
9666
|
+
c.current = f.scrollTop;
|
|
9664
9667
|
})
|
|
9665
9668
|
}
|
|
9666
9669
|
) })
|
|
@@ -9668,21 +9671,21 @@ var [Kh, sr] = _t(pt, {}), ko = "SelectViewport", ji = f.forwardRef(
|
|
|
9668
9671
|
}
|
|
9669
9672
|
);
|
|
9670
9673
|
ji.displayName = ko;
|
|
9671
|
-
var Gi = "SelectGroup", [Xh, Zh] = _t(Gi), Jh =
|
|
9674
|
+
var Gi = "SelectGroup", [Xh, Zh] = _t(Gi), Jh = u.forwardRef(
|
|
9672
9675
|
(e, t) => {
|
|
9673
9676
|
const { __scopeSelect: n, ...o } = e, r = ht();
|
|
9674
9677
|
return /* @__PURE__ */ p(Xh, { scope: n, id: r, children: /* @__PURE__ */ p(X.div, { role: "group", "aria-labelledby": r, ...o, ref: t }) });
|
|
9675
9678
|
}
|
|
9676
9679
|
);
|
|
9677
9680
|
Jh.displayName = Gi;
|
|
9678
|
-
var Yi = "SelectLabel", Qh =
|
|
9681
|
+
var Yi = "SelectLabel", Qh = u.forwardRef(
|
|
9679
9682
|
(e, t) => {
|
|
9680
9683
|
const { __scopeSelect: n, ...o } = e, r = Zh(Yi, n);
|
|
9681
9684
|
return /* @__PURE__ */ p(X.div, { id: r.id, ...o, ref: t });
|
|
9682
9685
|
}
|
|
9683
9686
|
);
|
|
9684
9687
|
Qh.displayName = Yi;
|
|
9685
|
-
var Sn = "SelectItem", [eg, qi] = _t(Sn), Ki =
|
|
9688
|
+
var Sn = "SelectItem", [eg, qi] = _t(Sn), Ki = u.forwardRef(
|
|
9686
9689
|
(e, t) => {
|
|
9687
9690
|
const {
|
|
9688
9691
|
__scopeSelect: n,
|
|
@@ -9690,13 +9693,13 @@ var Sn = "SelectItem", [eg, qi] = _t(Sn), Ki = f.forwardRef(
|
|
|
9690
9693
|
disabled: r = !1,
|
|
9691
9694
|
textValue: s,
|
|
9692
9695
|
...a
|
|
9693
|
-
} = e, i = rt(Sn, n), c = st(Sn, n), d = i.value === o, [
|
|
9696
|
+
} = e, i = rt(Sn, n), c = st(Sn, n), d = i.value === o, [f, l] = u.useState(s ?? ""), [m, h] = u.useState(!1), b = ae(
|
|
9694
9697
|
t,
|
|
9695
9698
|
(w) => {
|
|
9696
9699
|
var x;
|
|
9697
9700
|
return (x = c.itemRefCallback) == null ? void 0 : x.call(c, w, o, r);
|
|
9698
9701
|
}
|
|
9699
|
-
),
|
|
9702
|
+
), g = ht(), v = u.useRef("touch"), y = () => {
|
|
9700
9703
|
r || (i.onValueChange(o), i.onOpenChange(!1));
|
|
9701
9704
|
};
|
|
9702
9705
|
if (o === "")
|
|
@@ -9709,9 +9712,9 @@ var Sn = "SelectItem", [eg, qi] = _t(Sn), Ki = f.forwardRef(
|
|
|
9709
9712
|
scope: n,
|
|
9710
9713
|
value: o,
|
|
9711
9714
|
disabled: r,
|
|
9712
|
-
textId:
|
|
9715
|
+
textId: g,
|
|
9713
9716
|
isSelected: d,
|
|
9714
|
-
onItemTextChange:
|
|
9717
|
+
onItemTextChange: u.useCallback((w) => {
|
|
9715
9718
|
l((x) => x || ((w == null ? void 0 : w.textContent) ?? "").trim());
|
|
9716
9719
|
}, []),
|
|
9717
9720
|
children: /* @__PURE__ */ p(
|
|
@@ -9720,12 +9723,12 @@ var Sn = "SelectItem", [eg, qi] = _t(Sn), Ki = f.forwardRef(
|
|
|
9720
9723
|
scope: n,
|
|
9721
9724
|
value: o,
|
|
9722
9725
|
disabled: r,
|
|
9723
|
-
textValue:
|
|
9726
|
+
textValue: f,
|
|
9724
9727
|
children: /* @__PURE__ */ p(
|
|
9725
9728
|
X.div,
|
|
9726
9729
|
{
|
|
9727
9730
|
role: "option",
|
|
9728
|
-
"aria-labelledby":
|
|
9731
|
+
"aria-labelledby": g,
|
|
9729
9732
|
"data-highlighted": m ? "" : void 0,
|
|
9730
9733
|
"aria-selected": d && m,
|
|
9731
9734
|
"data-state": d ? "checked" : "unchecked",
|
|
@@ -9734,8 +9737,8 @@ var Sn = "SelectItem", [eg, qi] = _t(Sn), Ki = f.forwardRef(
|
|
|
9734
9737
|
tabIndex: r ? void 0 : -1,
|
|
9735
9738
|
...a,
|
|
9736
9739
|
ref: b,
|
|
9737
|
-
onFocus: J(a.onFocus, () =>
|
|
9738
|
-
onBlur: J(a.onBlur, () =>
|
|
9740
|
+
onFocus: J(a.onFocus, () => h(!0)),
|
|
9741
|
+
onBlur: J(a.onBlur, () => h(!1)),
|
|
9739
9742
|
onClick: J(a.onClick, () => {
|
|
9740
9743
|
v.current !== "mouse" && y();
|
|
9741
9744
|
}),
|
|
@@ -9766,9 +9769,9 @@ var Sn = "SelectItem", [eg, qi] = _t(Sn), Ki = f.forwardRef(
|
|
|
9766
9769
|
}
|
|
9767
9770
|
);
|
|
9768
9771
|
Ki.displayName = Sn;
|
|
9769
|
-
var Dt = "SelectItemText", Xi =
|
|
9772
|
+
var Dt = "SelectItemText", Xi = u.forwardRef(
|
|
9770
9773
|
(e, t) => {
|
|
9771
|
-
const { __scopeSelect: n, className: o, style: r, ...s } = e, a = rt(Dt, n), i = st(Dt, n), c = qi(Dt, n), d = Vh(Dt, n), [
|
|
9774
|
+
const { __scopeSelect: n, className: o, style: r, ...s } = e, a = rt(Dt, n), i = st(Dt, n), c = qi(Dt, n), d = Vh(Dt, n), [f, l] = u.useState(null), m = ae(
|
|
9772
9775
|
t,
|
|
9773
9776
|
(y) => l(y),
|
|
9774
9777
|
c.onItemTextChange,
|
|
@@ -9776,26 +9779,26 @@ var Dt = "SelectItemText", Xi = f.forwardRef(
|
|
|
9776
9779
|
var w;
|
|
9777
9780
|
return (w = i.itemTextRefCallback) == null ? void 0 : w.call(i, y, c.value, c.disabled);
|
|
9778
9781
|
}
|
|
9779
|
-
),
|
|
9780
|
-
() => /* @__PURE__ */ p("option", { value: c.value, disabled: c.disabled, children:
|
|
9781
|
-
[c.disabled, c.value,
|
|
9782
|
-
), { onNativeOptionAdd:
|
|
9783
|
-
return de(() => (
|
|
9782
|
+
), h = f == null ? void 0 : f.textContent, b = u.useMemo(
|
|
9783
|
+
() => /* @__PURE__ */ p("option", { value: c.value, disabled: c.disabled, children: h }, c.value),
|
|
9784
|
+
[c.disabled, c.value, h]
|
|
9785
|
+
), { onNativeOptionAdd: g, onNativeOptionRemove: v } = d;
|
|
9786
|
+
return de(() => (g(b), () => v(b)), [g, v, b]), /* @__PURE__ */ U(_e, { children: [
|
|
9784
9787
|
/* @__PURE__ */ p(X.span, { id: c.textId, ...s, ref: m }),
|
|
9785
9788
|
c.isSelected && a.valueNode && !a.valueNodeHasChildren ? Cn.createPortal(s.children, a.valueNode) : null
|
|
9786
9789
|
] });
|
|
9787
9790
|
}
|
|
9788
9791
|
);
|
|
9789
9792
|
Xi.displayName = Dt;
|
|
9790
|
-
var Zi = "SelectItemIndicator", Ji =
|
|
9793
|
+
var Zi = "SelectItemIndicator", Ji = u.forwardRef(
|
|
9791
9794
|
(e, t) => {
|
|
9792
9795
|
const { __scopeSelect: n, ...o } = e;
|
|
9793
9796
|
return qi(Zi, n).isSelected ? /* @__PURE__ */ p(X.span, { "aria-hidden": !0, ...o, ref: t }) : null;
|
|
9794
9797
|
}
|
|
9795
9798
|
);
|
|
9796
9799
|
Ji.displayName = Zi;
|
|
9797
|
-
var Eo = "SelectScrollUpButton", Qi =
|
|
9798
|
-
const n = st(Eo, e.__scopeSelect), o = sr(Eo, e.__scopeSelect), [r, s] =
|
|
9800
|
+
var Eo = "SelectScrollUpButton", Qi = u.forwardRef((e, t) => {
|
|
9801
|
+
const n = st(Eo, e.__scopeSelect), o = sr(Eo, e.__scopeSelect), [r, s] = u.useState(!1), a = ae(t, o.onScrollButtonChange);
|
|
9799
9802
|
return de(() => {
|
|
9800
9803
|
if (n.viewport && n.isPositioned) {
|
|
9801
9804
|
let i = function() {
|
|
@@ -9818,13 +9821,13 @@ var Eo = "SelectScrollUpButton", Qi = f.forwardRef((e, t) => {
|
|
|
9818
9821
|
) : null;
|
|
9819
9822
|
});
|
|
9820
9823
|
Qi.displayName = Eo;
|
|
9821
|
-
var Ro = "SelectScrollDownButton", ec =
|
|
9822
|
-
const n = st(Ro, e.__scopeSelect), o = sr(Ro, e.__scopeSelect), [r, s] =
|
|
9824
|
+
var Ro = "SelectScrollDownButton", ec = u.forwardRef((e, t) => {
|
|
9825
|
+
const n = st(Ro, e.__scopeSelect), o = sr(Ro, e.__scopeSelect), [r, s] = u.useState(!1), a = ae(t, o.onScrollButtonChange);
|
|
9823
9826
|
return de(() => {
|
|
9824
9827
|
if (n.viewport && n.isPositioned) {
|
|
9825
9828
|
let i = function() {
|
|
9826
|
-
const d = c.scrollHeight - c.clientHeight,
|
|
9827
|
-
s(
|
|
9829
|
+
const d = c.scrollHeight - c.clientHeight, f = Math.ceil(c.scrollTop) < d;
|
|
9830
|
+
s(f);
|
|
9828
9831
|
};
|
|
9829
9832
|
const c = n.viewport;
|
|
9830
9833
|
return i(), c.addEventListener("scroll", i), () => c.removeEventListener("scroll", i);
|
|
@@ -9842,14 +9845,14 @@ var Ro = "SelectScrollDownButton", ec = f.forwardRef((e, t) => {
|
|
|
9842
9845
|
) : null;
|
|
9843
9846
|
});
|
|
9844
9847
|
ec.displayName = Ro;
|
|
9845
|
-
var tc =
|
|
9846
|
-
const { __scopeSelect: n, onAutoScroll: o, ...r } = e, s = st("SelectScrollButton", n), a =
|
|
9848
|
+
var tc = u.forwardRef((e, t) => {
|
|
9849
|
+
const { __scopeSelect: n, onAutoScroll: o, ...r } = e, s = st("SelectScrollButton", n), a = u.useRef(null), i = Hn(n), c = u.useCallback(() => {
|
|
9847
9850
|
a.current !== null && (window.clearInterval(a.current), a.current = null);
|
|
9848
9851
|
}, []);
|
|
9849
|
-
return
|
|
9850
|
-
var
|
|
9852
|
+
return u.useEffect(() => () => c(), [c]), de(() => {
|
|
9853
|
+
var f;
|
|
9851
9854
|
const d = i().find((l) => l.ref.current === document.activeElement);
|
|
9852
|
-
(
|
|
9855
|
+
(f = d == null ? void 0 : d.ref.current) == null || f.scrollIntoView({ block: "nearest" });
|
|
9853
9856
|
}, [i]), /* @__PURE__ */ p(
|
|
9854
9857
|
X.div,
|
|
9855
9858
|
{
|
|
@@ -9869,33 +9872,33 @@ var tc = f.forwardRef((e, t) => {
|
|
|
9869
9872
|
})
|
|
9870
9873
|
}
|
|
9871
9874
|
);
|
|
9872
|
-
}), tg = "SelectSeparator", ng =
|
|
9875
|
+
}), tg = "SelectSeparator", ng = u.forwardRef(
|
|
9873
9876
|
(e, t) => {
|
|
9874
9877
|
const { __scopeSelect: n, ...o } = e;
|
|
9875
9878
|
return /* @__PURE__ */ p(X.div, { "aria-hidden": !0, ...o, ref: t });
|
|
9876
9879
|
}
|
|
9877
9880
|
);
|
|
9878
9881
|
ng.displayName = tg;
|
|
9879
|
-
var No = "SelectArrow", og =
|
|
9882
|
+
var No = "SelectArrow", og = u.forwardRef(
|
|
9880
9883
|
(e, t) => {
|
|
9881
9884
|
const { __scopeSelect: n, ...o } = e, r = Vn(n), s = rt(No, n), a = st(No, n);
|
|
9882
9885
|
return s.open && a.position === "popper" ? /* @__PURE__ */ p(Xa, { ...r, ...o, ref: t }) : null;
|
|
9883
9886
|
}
|
|
9884
9887
|
);
|
|
9885
9888
|
og.displayName = No;
|
|
9886
|
-
var rg = "SelectBubbleInput", nc =
|
|
9889
|
+
var rg = "SelectBubbleInput", nc = u.forwardRef(
|
|
9887
9890
|
({ __scopeSelect: e, value: t, ...n }, o) => {
|
|
9888
|
-
const r =
|
|
9889
|
-
return
|
|
9891
|
+
const r = u.useRef(null), s = ae(o, r), a = Tn(t);
|
|
9892
|
+
return u.useEffect(() => {
|
|
9890
9893
|
const i = r.current;
|
|
9891
9894
|
if (!i) return;
|
|
9892
|
-
const c = window.HTMLSelectElement.prototype,
|
|
9895
|
+
const c = window.HTMLSelectElement.prototype, f = Object.getOwnPropertyDescriptor(
|
|
9893
9896
|
c,
|
|
9894
9897
|
"value"
|
|
9895
9898
|
).set;
|
|
9896
|
-
if (a !== t &&
|
|
9899
|
+
if (a !== t && f) {
|
|
9897
9900
|
const l = new Event("change", { bubbles: !0 });
|
|
9898
|
-
|
|
9901
|
+
f.call(i, t), i.dispatchEvent(l);
|
|
9899
9902
|
}
|
|
9900
9903
|
}, [a, t]), /* @__PURE__ */ p(
|
|
9901
9904
|
X.select,
|
|
@@ -9913,7 +9916,7 @@ function oc(e) {
|
|
|
9913
9916
|
return e === "" || e === void 0;
|
|
9914
9917
|
}
|
|
9915
9918
|
function rc(e) {
|
|
9916
|
-
const t = ve(e), n =
|
|
9919
|
+
const t = ve(e), n = u.useRef(""), o = u.useRef(0), r = u.useCallback(
|
|
9917
9920
|
(a) => {
|
|
9918
9921
|
const i = n.current + a;
|
|
9919
9922
|
t(i), (function c(d) {
|
|
@@ -9921,10 +9924,10 @@ function rc(e) {
|
|
|
9921
9924
|
})(i);
|
|
9922
9925
|
},
|
|
9923
9926
|
[t]
|
|
9924
|
-
), s =
|
|
9927
|
+
), s = u.useCallback(() => {
|
|
9925
9928
|
n.current = "", window.clearTimeout(o.current);
|
|
9926
9929
|
}, []);
|
|
9927
|
-
return
|
|
9930
|
+
return u.useEffect(() => () => window.clearTimeout(o.current), []), [n, r, s];
|
|
9928
9931
|
}
|
|
9929
9932
|
function sc(e, t, n) {
|
|
9930
9933
|
const r = t.length > 1 && Array.from(t).every((d) => d === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
@@ -9938,7 +9941,7 @@ function sc(e, t, n) {
|
|
|
9938
9941
|
function sg(e, t) {
|
|
9939
9942
|
return e.map((n, o) => e[(t + o) % e.length]);
|
|
9940
9943
|
}
|
|
9941
|
-
var ag = Oi, ig = Di, cg = $i, lg = Fi, dg = Bi, ug = Hi, fg = ji, pg = Ki, mg = Xi, hg = Ji, gg = Qi, vg = ec, bg = "Separator", as = "horizontal", yg = ["horizontal", "vertical"], ac =
|
|
9944
|
+
var ag = Oi, ig = Di, cg = $i, lg = Fi, dg = Bi, ug = Hi, fg = ji, pg = Ki, mg = Xi, hg = Ji, gg = Qi, vg = ec, bg = "Separator", as = "horizontal", yg = ["horizontal", "vertical"], ac = u.forwardRef((e, t) => {
|
|
9942
9945
|
const { decorative: n, orientation: o = as, ...r } = e, s = wg(o) ? o : as, i = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
9943
9946
|
return /* @__PURE__ */ p(
|
|
9944
9947
|
X.div,
|
|
@@ -9954,7 +9957,7 @@ ac.displayName = bg;
|
|
|
9954
9957
|
function wg(e) {
|
|
9955
9958
|
return yg.includes(e);
|
|
9956
9959
|
}
|
|
9957
|
-
var xg = ac, Wn = "Switch", [Sg] = we(Wn), [Cg, kg] = Sg(Wn), ic =
|
|
9960
|
+
var xg = ac, Wn = "Switch", [Sg] = we(Wn), [Cg, kg] = Sg(Wn), ic = u.forwardRef(
|
|
9958
9961
|
(e, t) => {
|
|
9959
9962
|
const {
|
|
9960
9963
|
__scopeSwitch: n,
|
|
@@ -9965,9 +9968,9 @@ var xg = ac, Wn = "Switch", [Sg] = we(Wn), [Cg, kg] = Sg(Wn), ic = f.forwardRef(
|
|
|
9965
9968
|
disabled: i,
|
|
9966
9969
|
value: c = "on",
|
|
9967
9970
|
onCheckedChange: d,
|
|
9968
|
-
form:
|
|
9971
|
+
form: f,
|
|
9969
9972
|
...l
|
|
9970
|
-
} = e, [m,
|
|
9973
|
+
} = e, [m, h] = u.useState(null), b = ae(t, (x) => h(x)), g = u.useRef(!1), v = m ? f || !!m.closest("form") : !0, [y, w] = je({
|
|
9971
9974
|
prop: r,
|
|
9972
9975
|
defaultProp: s ?? !1,
|
|
9973
9976
|
onChange: d,
|
|
@@ -9988,7 +9991,7 @@ var xg = ac, Wn = "Switch", [Sg] = we(Wn), [Cg, kg] = Sg(Wn), ic = f.forwardRef(
|
|
|
9988
9991
|
...l,
|
|
9989
9992
|
ref: b,
|
|
9990
9993
|
onClick: J(e.onClick, (x) => {
|
|
9991
|
-
w((k) => !k), v && (
|
|
9994
|
+
w((k) => !k), v && (g.current = x.isPropagationStopped(), g.current || x.stopPropagation());
|
|
9992
9995
|
})
|
|
9993
9996
|
}
|
|
9994
9997
|
),
|
|
@@ -9996,13 +9999,13 @@ var xg = ac, Wn = "Switch", [Sg] = we(Wn), [Cg, kg] = Sg(Wn), ic = f.forwardRef(
|
|
|
9996
9999
|
dc,
|
|
9997
10000
|
{
|
|
9998
10001
|
control: m,
|
|
9999
|
-
bubbles: !
|
|
10002
|
+
bubbles: !g.current,
|
|
10000
10003
|
name: o,
|
|
10001
10004
|
value: c,
|
|
10002
10005
|
checked: y,
|
|
10003
10006
|
required: a,
|
|
10004
10007
|
disabled: i,
|
|
10005
|
-
form:
|
|
10008
|
+
form: f,
|
|
10006
10009
|
style: { transform: "translateX(-100%)" }
|
|
10007
10010
|
}
|
|
10008
10011
|
)
|
|
@@ -10010,7 +10013,7 @@ var xg = ac, Wn = "Switch", [Sg] = we(Wn), [Cg, kg] = Sg(Wn), ic = f.forwardRef(
|
|
|
10010
10013
|
}
|
|
10011
10014
|
);
|
|
10012
10015
|
ic.displayName = Wn;
|
|
10013
|
-
var cc = "SwitchThumb", lc =
|
|
10016
|
+
var cc = "SwitchThumb", lc = u.forwardRef(
|
|
10014
10017
|
(e, t) => {
|
|
10015
10018
|
const { __scopeSwitch: n, ...o } = e, r = kg(cc, n);
|
|
10016
10019
|
return /* @__PURE__ */ p(
|
|
@@ -10025,7 +10028,7 @@ var cc = "SwitchThumb", lc = f.forwardRef(
|
|
|
10025
10028
|
}
|
|
10026
10029
|
);
|
|
10027
10030
|
lc.displayName = cc;
|
|
10028
|
-
var Eg = "SwitchBubbleInput", dc =
|
|
10031
|
+
var Eg = "SwitchBubbleInput", dc = u.forwardRef(
|
|
10029
10032
|
({
|
|
10030
10033
|
__scopeSwitch: e,
|
|
10031
10034
|
control: t,
|
|
@@ -10033,17 +10036,17 @@ var Eg = "SwitchBubbleInput", dc = f.forwardRef(
|
|
|
10033
10036
|
bubbles: o = !0,
|
|
10034
10037
|
...r
|
|
10035
10038
|
}, s) => {
|
|
10036
|
-
const a =
|
|
10037
|
-
return
|
|
10038
|
-
const
|
|
10039
|
-
if (!
|
|
10040
|
-
const l = window.HTMLInputElement.prototype,
|
|
10039
|
+
const a = u.useRef(null), i = ae(a, s), c = Tn(n), d = Pn(t);
|
|
10040
|
+
return u.useEffect(() => {
|
|
10041
|
+
const f = a.current;
|
|
10042
|
+
if (!f) return;
|
|
10043
|
+
const l = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(
|
|
10041
10044
|
l,
|
|
10042
10045
|
"checked"
|
|
10043
10046
|
).set;
|
|
10044
|
-
if (c !== n &&
|
|
10047
|
+
if (c !== n && h) {
|
|
10045
10048
|
const b = new Event("click", { bubbles: o });
|
|
10046
|
-
|
|
10049
|
+
h.call(f, n), f.dispatchEvent(b);
|
|
10047
10050
|
}
|
|
10048
10051
|
}, [c, n, o]), /* @__PURE__ */ p(
|
|
10049
10052
|
"input",
|
|
@@ -10072,7 +10075,7 @@ function uc(e) {
|
|
|
10072
10075
|
}
|
|
10073
10076
|
var Rg = ic, Ng = lc, Un = "Tabs", [Tg] = we(Un, [
|
|
10074
10077
|
Dn
|
|
10075
|
-
]), fc = Dn(), [Pg, ar] = Tg(Un), pc =
|
|
10078
|
+
]), fc = Dn(), [Pg, ar] = Tg(Un), pc = u.forwardRef(
|
|
10076
10079
|
(e, t) => {
|
|
10077
10080
|
const {
|
|
10078
10081
|
__scopeTabs: n,
|
|
@@ -10083,7 +10086,7 @@ var Rg = ic, Ng = lc, Un = "Tabs", [Tg] = we(Un, [
|
|
|
10083
10086
|
dir: i,
|
|
10084
10087
|
activationMode: c = "automatic",
|
|
10085
10088
|
...d
|
|
10086
|
-
} = e,
|
|
10089
|
+
} = e, f = jt(i), [l, m] = je({
|
|
10087
10090
|
prop: o,
|
|
10088
10091
|
onChange: r,
|
|
10089
10092
|
defaultProp: s ?? "",
|
|
@@ -10097,12 +10100,12 @@ var Rg = ic, Ng = lc, Un = "Tabs", [Tg] = we(Un, [
|
|
|
10097
10100
|
value: l,
|
|
10098
10101
|
onValueChange: m,
|
|
10099
10102
|
orientation: a,
|
|
10100
|
-
dir:
|
|
10103
|
+
dir: f,
|
|
10101
10104
|
activationMode: c,
|
|
10102
10105
|
children: /* @__PURE__ */ p(
|
|
10103
10106
|
X.div,
|
|
10104
10107
|
{
|
|
10105
|
-
dir:
|
|
10108
|
+
dir: f,
|
|
10106
10109
|
"data-orientation": a,
|
|
10107
10110
|
...d,
|
|
10108
10111
|
ref: t
|
|
@@ -10113,7 +10116,7 @@ var Rg = ic, Ng = lc, Un = "Tabs", [Tg] = we(Un, [
|
|
|
10113
10116
|
}
|
|
10114
10117
|
);
|
|
10115
10118
|
pc.displayName = Un;
|
|
10116
|
-
var mc = "TabsList", hc =
|
|
10119
|
+
var mc = "TabsList", hc = u.forwardRef(
|
|
10117
10120
|
(e, t) => {
|
|
10118
10121
|
const { __scopeTabs: n, loop: o = !0, ...r } = e, s = ar(mc, n), a = fc(n);
|
|
10119
10122
|
return /* @__PURE__ */ p(
|
|
@@ -10138,24 +10141,24 @@ var mc = "TabsList", hc = f.forwardRef(
|
|
|
10138
10141
|
}
|
|
10139
10142
|
);
|
|
10140
10143
|
hc.displayName = mc;
|
|
10141
|
-
var gc = "TabsTrigger", vc =
|
|
10144
|
+
var gc = "TabsTrigger", vc = u.forwardRef(
|
|
10142
10145
|
(e, t) => {
|
|
10143
|
-
const { __scopeTabs: n, value: o, disabled: r = !1, ...s } = e, a = ar(gc, n), i = fc(n), c = wc(a.baseId, o), d = xc(a.baseId, o),
|
|
10146
|
+
const { __scopeTabs: n, value: o, disabled: r = !1, ...s } = e, a = ar(gc, n), i = fc(n), c = wc(a.baseId, o), d = xc(a.baseId, o), f = o === a.value;
|
|
10144
10147
|
return /* @__PURE__ */ p(
|
|
10145
10148
|
oi,
|
|
10146
10149
|
{
|
|
10147
10150
|
asChild: !0,
|
|
10148
10151
|
...i,
|
|
10149
10152
|
focusable: !r,
|
|
10150
|
-
active:
|
|
10153
|
+
active: f,
|
|
10151
10154
|
children: /* @__PURE__ */ p(
|
|
10152
10155
|
X.button,
|
|
10153
10156
|
{
|
|
10154
10157
|
type: "button",
|
|
10155
10158
|
role: "tab",
|
|
10156
|
-
"aria-selected":
|
|
10159
|
+
"aria-selected": f,
|
|
10157
10160
|
"aria-controls": d,
|
|
10158
|
-
"data-state":
|
|
10161
|
+
"data-state": f ? "active" : "inactive",
|
|
10159
10162
|
"data-disabled": r ? "" : void 0,
|
|
10160
10163
|
disabled: r,
|
|
10161
10164
|
id: c,
|
|
@@ -10169,7 +10172,7 @@ var gc = "TabsTrigger", vc = f.forwardRef(
|
|
|
10169
10172
|
}),
|
|
10170
10173
|
onFocus: J(e.onFocus, () => {
|
|
10171
10174
|
const l = a.activationMode !== "manual";
|
|
10172
|
-
!
|
|
10175
|
+
!f && !r && l && a.onValueChange(o);
|
|
10173
10176
|
})
|
|
10174
10177
|
}
|
|
10175
10178
|
)
|
|
@@ -10178,16 +10181,16 @@ var gc = "TabsTrigger", vc = f.forwardRef(
|
|
|
10178
10181
|
}
|
|
10179
10182
|
);
|
|
10180
10183
|
vc.displayName = gc;
|
|
10181
|
-
var bc = "TabsContent", yc =
|
|
10184
|
+
var bc = "TabsContent", yc = u.forwardRef(
|
|
10182
10185
|
(e, t) => {
|
|
10183
|
-
const { __scopeTabs: n, value: o, forceMount: r, children: s, ...a } = e, i = ar(bc, n), c = wc(i.baseId, o), d = xc(i.baseId, o),
|
|
10184
|
-
return
|
|
10186
|
+
const { __scopeTabs: n, value: o, forceMount: r, children: s, ...a } = e, i = ar(bc, n), c = wc(i.baseId, o), d = xc(i.baseId, o), f = o === i.value, l = u.useRef(f);
|
|
10187
|
+
return u.useEffect(() => {
|
|
10185
10188
|
const m = requestAnimationFrame(() => l.current = !1);
|
|
10186
10189
|
return () => cancelAnimationFrame(m);
|
|
10187
|
-
}, []), /* @__PURE__ */ p(
|
|
10190
|
+
}, []), /* @__PURE__ */ p(De, { present: r || f, children: ({ present: m }) => /* @__PURE__ */ p(
|
|
10188
10191
|
X.div,
|
|
10189
10192
|
{
|
|
10190
|
-
"data-state":
|
|
10193
|
+
"data-state": f ? "active" : "inactive",
|
|
10191
10194
|
"data-orientation": i.orientation,
|
|
10192
10195
|
role: "tabpanel",
|
|
10193
10196
|
"aria-labelledby": c,
|
|
@@ -10221,8 +10224,8 @@ var Ag = pc, Ig = hc, _g = vc, Mg = yc, [jn] = we("Tooltip", [
|
|
|
10221
10224
|
skipDelayDuration: o = 300,
|
|
10222
10225
|
disableHoverableContent: r = !1,
|
|
10223
10226
|
children: s
|
|
10224
|
-
} = e, a =
|
|
10225
|
-
return
|
|
10227
|
+
} = e, a = u.useRef(!0), i = u.useRef(!1), c = u.useRef(0);
|
|
10228
|
+
return u.useEffect(() => {
|
|
10226
10229
|
const d = c.current;
|
|
10227
10230
|
return () => window.clearTimeout(d);
|
|
10228
10231
|
}, []), /* @__PURE__ */ p(
|
|
@@ -10231,17 +10234,17 @@ var Ag = pc, Ig = hc, _g = vc, Mg = yc, [jn] = we("Tooltip", [
|
|
|
10231
10234
|
scope: t,
|
|
10232
10235
|
isOpenDelayedRef: a,
|
|
10233
10236
|
delayDuration: n,
|
|
10234
|
-
onOpen:
|
|
10237
|
+
onOpen: u.useCallback(() => {
|
|
10235
10238
|
window.clearTimeout(c.current), a.current = !1;
|
|
10236
10239
|
}, []),
|
|
10237
|
-
onClose:
|
|
10240
|
+
onClose: u.useCallback(() => {
|
|
10238
10241
|
window.clearTimeout(c.current), c.current = window.setTimeout(
|
|
10239
10242
|
() => a.current = !0,
|
|
10240
10243
|
o
|
|
10241
10244
|
);
|
|
10242
10245
|
}, [o]),
|
|
10243
10246
|
isPointerInTransitRef: i,
|
|
10244
|
-
onPointerInTransitChange:
|
|
10247
|
+
onPointerInTransitChange: u.useCallback((d) => {
|
|
10245
10248
|
i.current = d;
|
|
10246
10249
|
}, []),
|
|
10247
10250
|
disableHoverableContent: r,
|
|
@@ -10259,24 +10262,24 @@ var Wt = "Tooltip", [Dg, qt] = jn(Wt), kc = (e) => {
|
|
|
10259
10262
|
onOpenChange: s,
|
|
10260
10263
|
disableHoverableContent: a,
|
|
10261
10264
|
delayDuration: i
|
|
10262
|
-
} = e, c = ir(Wt, e.__scopeTooltip), d = Gn(t), [
|
|
10265
|
+
} = e, c = ir(Wt, e.__scopeTooltip), d = Gn(t), [f, l] = u.useState(null), m = ht(), h = u.useRef(0), b = a ?? c.disableHoverableContent, g = i ?? c.delayDuration, v = u.useRef(!1), [y, w] = je({
|
|
10263
10266
|
prop: o,
|
|
10264
10267
|
defaultProp: r ?? !1,
|
|
10265
10268
|
onChange: (R) => {
|
|
10266
10269
|
R ? (c.onOpen(), document.dispatchEvent(new CustomEvent(To))) : c.onClose(), s == null || s(R);
|
|
10267
10270
|
},
|
|
10268
10271
|
caller: Wt
|
|
10269
|
-
}), x =
|
|
10270
|
-
window.clearTimeout(
|
|
10271
|
-
}, [w]), N =
|
|
10272
|
-
window.clearTimeout(
|
|
10273
|
-
}, [w]), T =
|
|
10274
|
-
window.clearTimeout(
|
|
10275
|
-
v.current = !0, w(!0),
|
|
10276
|
-
},
|
|
10277
|
-
}, [
|
|
10278
|
-
return
|
|
10279
|
-
|
|
10272
|
+
}), x = u.useMemo(() => y ? v.current ? "delayed-open" : "instant-open" : "closed", [y]), k = u.useCallback(() => {
|
|
10273
|
+
window.clearTimeout(h.current), h.current = 0, v.current = !1, w(!0);
|
|
10274
|
+
}, [w]), N = u.useCallback(() => {
|
|
10275
|
+
window.clearTimeout(h.current), h.current = 0, w(!1);
|
|
10276
|
+
}, [w]), T = u.useCallback(() => {
|
|
10277
|
+
window.clearTimeout(h.current), h.current = window.setTimeout(() => {
|
|
10278
|
+
v.current = !0, w(!0), h.current = 0;
|
|
10279
|
+
}, g);
|
|
10280
|
+
}, [g, w]);
|
|
10281
|
+
return u.useEffect(() => () => {
|
|
10282
|
+
h.current && (window.clearTimeout(h.current), h.current = 0);
|
|
10280
10283
|
}, []), /* @__PURE__ */ p(Ya, { ...d, children: /* @__PURE__ */ p(
|
|
10281
10284
|
Dg,
|
|
10282
10285
|
{
|
|
@@ -10284,13 +10287,13 @@ var Wt = "Tooltip", [Dg, qt] = jn(Wt), kc = (e) => {
|
|
|
10284
10287
|
contentId: m,
|
|
10285
10288
|
open: y,
|
|
10286
10289
|
stateAttribute: x,
|
|
10287
|
-
trigger:
|
|
10290
|
+
trigger: f,
|
|
10288
10291
|
onTriggerChange: l,
|
|
10289
|
-
onTriggerEnter:
|
|
10292
|
+
onTriggerEnter: u.useCallback(() => {
|
|
10290
10293
|
c.isOpenDelayedRef.current ? T() : k();
|
|
10291
10294
|
}, [c.isOpenDelayedRef, T, k]),
|
|
10292
|
-
onTriggerLeave:
|
|
10293
|
-
b ? N() : (window.clearTimeout(
|
|
10295
|
+
onTriggerLeave: u.useCallback(() => {
|
|
10296
|
+
b ? N() : (window.clearTimeout(h.current), h.current = 0);
|
|
10294
10297
|
}, [N, b]),
|
|
10295
10298
|
onOpen: k,
|
|
10296
10299
|
onClose: N,
|
|
@@ -10300,10 +10303,10 @@ var Wt = "Tooltip", [Dg, qt] = jn(Wt), kc = (e) => {
|
|
|
10300
10303
|
) });
|
|
10301
10304
|
};
|
|
10302
10305
|
kc.displayName = Wt;
|
|
10303
|
-
var Po = "TooltipTrigger", Ec =
|
|
10306
|
+
var Po = "TooltipTrigger", Ec = u.forwardRef(
|
|
10304
10307
|
(e, t) => {
|
|
10305
|
-
const { __scopeTooltip: n, ...o } = e, r = qt(Po, n), s = ir(Po, n), a = Gn(n), i =
|
|
10306
|
-
return
|
|
10308
|
+
const { __scopeTooltip: n, ...o } = e, r = qt(Po, n), s = ir(Po, n), a = Gn(n), i = u.useRef(null), c = ae(t, i, r.onTriggerChange), d = u.useRef(!1), f = u.useRef(!1), l = u.useCallback(() => d.current = !1, []);
|
|
10309
|
+
return u.useEffect(() => () => document.removeEventListener("pointerup", l), [l]), /* @__PURE__ */ p(qa, { asChild: !0, ...a, children: /* @__PURE__ */ p(
|
|
10307
10310
|
X.button,
|
|
10308
10311
|
{
|
|
10309
10312
|
"aria-describedby": r.open ? r.contentId : void 0,
|
|
@@ -10311,10 +10314,10 @@ var Po = "TooltipTrigger", Ec = f.forwardRef(
|
|
|
10311
10314
|
...o,
|
|
10312
10315
|
ref: c,
|
|
10313
10316
|
onPointerMove: J(e.onPointerMove, (m) => {
|
|
10314
|
-
m.pointerType !== "touch" && !
|
|
10317
|
+
m.pointerType !== "touch" && !f.current && !s.isPointerInTransitRef.current && (r.onTriggerEnter(), f.current = !0);
|
|
10315
10318
|
}),
|
|
10316
10319
|
onPointerLeave: J(e.onPointerLeave, () => {
|
|
10317
|
-
r.onTriggerLeave(),
|
|
10320
|
+
r.onTriggerLeave(), f.current = !1;
|
|
10318
10321
|
}),
|
|
10319
10322
|
onPointerDown: J(e.onPointerDown, () => {
|
|
10320
10323
|
r.open && r.onClose(), d.current = !0, document.addEventListener("pointerup", l, { once: !0 });
|
|
@@ -10333,41 +10336,41 @@ var cr = "TooltipPortal", [zg, $g] = jn(cr, {
|
|
|
10333
10336
|
forceMount: void 0
|
|
10334
10337
|
}), Rc = (e) => {
|
|
10335
10338
|
const { __scopeTooltip: t, forceMount: n, children: o, container: r } = e, s = qt(cr, t);
|
|
10336
|
-
return /* @__PURE__ */ p(zg, { scope: t, forceMount: n, children: /* @__PURE__ */ p(
|
|
10339
|
+
return /* @__PURE__ */ p(zg, { scope: t, forceMount: n, children: /* @__PURE__ */ p(De, { present: n || s.open, children: /* @__PURE__ */ p(Vo, { asChild: !0, container: r, children: o }) }) });
|
|
10337
10340
|
};
|
|
10338
10341
|
Rc.displayName = cr;
|
|
10339
|
-
var Pt = "TooltipContent", Nc =
|
|
10342
|
+
var Pt = "TooltipContent", Nc = u.forwardRef(
|
|
10340
10343
|
(e, t) => {
|
|
10341
10344
|
const n = $g(Pt, e.__scopeTooltip), { forceMount: o = n.forceMount, side: r = "top", ...s } = e, a = qt(Pt, e.__scopeTooltip);
|
|
10342
|
-
return /* @__PURE__ */ p(
|
|
10345
|
+
return /* @__PURE__ */ p(De, { present: o || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ p(Tc, { side: r, ...s, ref: t }) : /* @__PURE__ */ p(Fg, { side: r, ...s, ref: t }) });
|
|
10343
10346
|
}
|
|
10344
|
-
), Fg =
|
|
10345
|
-
const n = qt(Pt, e.__scopeTooltip), o = ir(Pt, e.__scopeTooltip), r =
|
|
10347
|
+
), Fg = u.forwardRef((e, t) => {
|
|
10348
|
+
const n = qt(Pt, e.__scopeTooltip), o = ir(Pt, e.__scopeTooltip), r = u.useRef(null), s = ae(t, r), [a, i] = u.useState(null), { trigger: c, onClose: d } = n, f = r.current, { onPointerInTransitChange: l } = o, m = u.useCallback(() => {
|
|
10346
10349
|
i(null), l(!1);
|
|
10347
|
-
}, [l]),
|
|
10348
|
-
(b,
|
|
10349
|
-
const v = b.currentTarget, y = { x: b.clientX, y: b.clientY }, w = Wg(y, v.getBoundingClientRect()), x = Ug(y, w), k = jg(
|
|
10350
|
+
}, [l]), h = u.useCallback(
|
|
10351
|
+
(b, g) => {
|
|
10352
|
+
const v = b.currentTarget, y = { x: b.clientX, y: b.clientY }, w = Wg(y, v.getBoundingClientRect()), x = Ug(y, w), k = jg(g.getBoundingClientRect()), N = Yg([...x, ...k]);
|
|
10350
10353
|
i(N), l(!0);
|
|
10351
10354
|
},
|
|
10352
10355
|
[l]
|
|
10353
10356
|
);
|
|
10354
|
-
return
|
|
10355
|
-
if (c &&
|
|
10356
|
-
const b = (v) =>
|
|
10357
|
-
return c.addEventListener("pointerleave", b),
|
|
10358
|
-
c.removeEventListener("pointerleave", b),
|
|
10357
|
+
return u.useEffect(() => () => m(), [m]), u.useEffect(() => {
|
|
10358
|
+
if (c && f) {
|
|
10359
|
+
const b = (v) => h(v, f), g = (v) => h(v, c);
|
|
10360
|
+
return c.addEventListener("pointerleave", b), f.addEventListener("pointerleave", g), () => {
|
|
10361
|
+
c.removeEventListener("pointerleave", b), f.removeEventListener("pointerleave", g);
|
|
10359
10362
|
};
|
|
10360
10363
|
}
|
|
10361
|
-
}, [c,
|
|
10364
|
+
}, [c, f, h, m]), u.useEffect(() => {
|
|
10362
10365
|
if (a) {
|
|
10363
|
-
const b = (
|
|
10364
|
-
const v =
|
|
10366
|
+
const b = (g) => {
|
|
10367
|
+
const v = g.target, y = { x: g.clientX, y: g.clientY }, w = (c == null ? void 0 : c.contains(v)) || (f == null ? void 0 : f.contains(v)), x = !Gg(y, a);
|
|
10365
10368
|
w ? m() : x && (m(), d());
|
|
10366
10369
|
};
|
|
10367
10370
|
return document.addEventListener("pointermove", b), () => document.removeEventListener("pointermove", b);
|
|
10368
10371
|
}
|
|
10369
|
-
}, [c,
|
|
10370
|
-
}), [Bg, Hg] = jn(Wt, { isInside: !1 }), Vg = /* @__PURE__ */ Gu("TooltipContent"), Tc =
|
|
10372
|
+
}, [c, f, a, d, m]), /* @__PURE__ */ p(Tc, { ...e, ref: s });
|
|
10373
|
+
}), [Bg, Hg] = jn(Wt, { isInside: !1 }), Vg = /* @__PURE__ */ Gu("TooltipContent"), Tc = u.forwardRef(
|
|
10371
10374
|
(e, t) => {
|
|
10372
10375
|
const {
|
|
10373
10376
|
__scopeTooltip: n,
|
|
@@ -10376,16 +10379,16 @@ var Pt = "TooltipContent", Nc = f.forwardRef(
|
|
|
10376
10379
|
onEscapeKeyDown: s,
|
|
10377
10380
|
onPointerDownOutside: a,
|
|
10378
10381
|
...i
|
|
10379
|
-
} = e, c = qt(Pt, n), d = Gn(n), { onClose:
|
|
10380
|
-
return
|
|
10382
|
+
} = e, c = qt(Pt, n), d = Gn(n), { onClose: f } = c;
|
|
10383
|
+
return u.useEffect(() => (document.addEventListener(To, f), () => document.removeEventListener(To, f)), [f]), u.useEffect(() => {
|
|
10381
10384
|
if (c.trigger) {
|
|
10382
10385
|
const l = (m) => {
|
|
10383
|
-
const
|
|
10384
|
-
|
|
10386
|
+
const h = m.target;
|
|
10387
|
+
h != null && h.contains(c.trigger) && f();
|
|
10385
10388
|
};
|
|
10386
10389
|
return window.addEventListener("scroll", l, { capture: !0 }), () => window.removeEventListener("scroll", l, { capture: !0 });
|
|
10387
10390
|
}
|
|
10388
|
-
}, [c.trigger,
|
|
10391
|
+
}, [c.trigger, f]), /* @__PURE__ */ p(
|
|
10389
10392
|
Ho,
|
|
10390
10393
|
{
|
|
10391
10394
|
asChild: !0,
|
|
@@ -10393,7 +10396,7 @@ var Pt = "TooltipContent", Nc = f.forwardRef(
|
|
|
10393
10396
|
onEscapeKeyDown: s,
|
|
10394
10397
|
onPointerDownOutside: a,
|
|
10395
10398
|
onFocusOutside: (l) => l.preventDefault(),
|
|
10396
|
-
onDismiss:
|
|
10399
|
+
onDismiss: f,
|
|
10397
10400
|
children: /* @__PURE__ */ U(
|
|
10398
10401
|
Ka,
|
|
10399
10402
|
{
|
|
@@ -10420,7 +10423,7 @@ var Pt = "TooltipContent", Nc = f.forwardRef(
|
|
|
10420
10423
|
}
|
|
10421
10424
|
);
|
|
10422
10425
|
Nc.displayName = Pt;
|
|
10423
|
-
var Pc = "TooltipArrow", Ac =
|
|
10426
|
+
var Pc = "TooltipArrow", Ac = u.forwardRef(
|
|
10424
10427
|
(e, t) => {
|
|
10425
10428
|
const { __scopeTooltip: n, ...o } = e, r = Gn(n);
|
|
10426
10429
|
return Hg(
|
|
@@ -10488,8 +10491,8 @@ function Gg(e, t) {
|
|
|
10488
10491
|
const { x: n, y: o } = e;
|
|
10489
10492
|
let r = !1;
|
|
10490
10493
|
for (let s = 0, a = t.length - 1; s < t.length; a = s++) {
|
|
10491
|
-
const i = t[s], c = t[a], d = i.x,
|
|
10492
|
-
|
|
10494
|
+
const i = t[s], c = t[a], d = i.x, f = i.y, l = c.x, m = c.y;
|
|
10495
|
+
f > o != m > o && n < (l - d) * (o - f) / (m - f) + d && (r = !r);
|
|
10493
10496
|
}
|
|
10494
10497
|
return r;
|
|
10495
10498
|
}
|
|
@@ -11555,17 +11558,17 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
11555
11558
|
const t = e.some((o) => o.mode === "staging"), n = e.some((o) => o.mode === "dev");
|
|
11556
11559
|
return t && n ? "Dev + Staging" : t ? "Staging Mode" : "Dev Mode";
|
|
11557
11560
|
}, Nb = (e) => e.mode === "staging" ? "STAGING" : "DEV", Tb = ({ className: e = "", extensions: t = [], tokenErrors: n = /* @__PURE__ */ new Map() }) => {
|
|
11558
|
-
const [o, r] = le([]), [s, a] = le(!1), [i, c] = le(!1), [d,
|
|
11561
|
+
const [o, r] = le([]), [s, a] = le(!1), [i, c] = le(!1), [d, f] = le(!1), l = Me(null), m = n.size > 0;
|
|
11559
11562
|
if (ce(() => {
|
|
11560
11563
|
Eb();
|
|
11561
11564
|
}, []), ce(() => {
|
|
11562
11565
|
if (!m) return;
|
|
11563
11566
|
const b = () => {
|
|
11564
|
-
|
|
11567
|
+
f(!0), setTimeout(() => f(!1), 600);
|
|
11565
11568
|
};
|
|
11566
11569
|
b();
|
|
11567
|
-
const
|
|
11568
|
-
return () => clearInterval(
|
|
11570
|
+
const g = setInterval(b, 4e3);
|
|
11571
|
+
return () => clearInterval(g);
|
|
11569
11572
|
}, [m]), ce(() => {
|
|
11570
11573
|
if (typeof window > "u") return;
|
|
11571
11574
|
const b = () => {
|
|
@@ -11573,14 +11576,14 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
11573
11576
|
r(v);
|
|
11574
11577
|
};
|
|
11575
11578
|
b();
|
|
11576
|
-
const
|
|
11577
|
-
return window.addEventListener("popstate",
|
|
11579
|
+
const g = () => b();
|
|
11580
|
+
return window.addEventListener("popstate", g), () => window.removeEventListener("popstate", g);
|
|
11578
11581
|
}, []), o.length === 0)
|
|
11579
11582
|
return null;
|
|
11580
|
-
const
|
|
11583
|
+
const h = (b) => {
|
|
11581
11584
|
if (b.stopPropagation(), typeof window > "u") return;
|
|
11582
|
-
const
|
|
11583
|
-
|
|
11585
|
+
const g = new URL(window.location.href);
|
|
11586
|
+
g.searchParams.delete("_stackable_dev"), g.searchParams.delete("_stackable_staging"), window.location.href = g.toString();
|
|
11584
11587
|
};
|
|
11585
11588
|
return /* @__PURE__ */ U(
|
|
11586
11589
|
"div",
|
|
@@ -11614,14 +11617,14 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
11614
11617
|
width: "420px",
|
|
11615
11618
|
maxWidth: "90vw"
|
|
11616
11619
|
},
|
|
11617
|
-
children: o.map((b,
|
|
11620
|
+
children: o.map((b, g) => {
|
|
11618
11621
|
var v;
|
|
11619
11622
|
return /* @__PURE__ */ U(
|
|
11620
11623
|
"div",
|
|
11621
11624
|
{
|
|
11622
11625
|
style: {
|
|
11623
11626
|
padding: "8px 12px",
|
|
11624
|
-
borderBottom:
|
|
11627
|
+
borderBottom: g < o.length - 1 ? "1px solid #f3f4f6" : "none"
|
|
11625
11628
|
},
|
|
11626
11629
|
children: [
|
|
11627
11630
|
/* @__PURE__ */ U(
|
|
@@ -11750,7 +11753,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
11750
11753
|
/* @__PURE__ */ p(
|
|
11751
11754
|
"button",
|
|
11752
11755
|
{
|
|
11753
|
-
onClick:
|
|
11756
|
+
onClick: h,
|
|
11754
11757
|
style: {
|
|
11755
11758
|
marginLeft: "4px",
|
|
11756
11759
|
backgroundColor: "rgba(0, 0, 0, 0.15)",
|
|
@@ -11783,7 +11786,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
11783
11786
|
const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
11784
11787
|
return await Promise.all(
|
|
11785
11788
|
e.filter((a) => a.manifest.permissions.includes("data:fetch")).map(async (a) => {
|
|
11786
|
-
const i = o.find((m) => m.extensionId === a.id), c = i == null ? void 0 : i.token, d = i == null ? void 0 : i.mode,
|
|
11789
|
+
const i = o.find((m) => m.extensionId === a.id), c = i == null ? void 0 : i.token, d = i == null ? void 0 : i.mode, f = zt(t, "/proxy-token"), l = await fetch(f, {
|
|
11787
11790
|
method: "POST",
|
|
11788
11791
|
headers: { "Content-Type": "application/json" },
|
|
11789
11792
|
body: JSON.stringify({
|
|
@@ -11794,8 +11797,8 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
11794
11797
|
})
|
|
11795
11798
|
});
|
|
11796
11799
|
if (l.ok) {
|
|
11797
|
-
const { token: m, encryptionKey:
|
|
11798
|
-
r.set(a.id, { token: m, encryptionKey:
|
|
11800
|
+
const { token: m, encryptionKey: h } = await l.json();
|
|
11801
|
+
r.set(a.id, { token: m, encryptionKey: h });
|
|
11799
11802
|
} else {
|
|
11800
11803
|
let m = `Proxy token failed (${l.status})`;
|
|
11801
11804
|
d && !c ? m = "Session token missing — re-run CLI" : d && (m = "Session expired or invalid — re-run CLI"), s.set(a.id, m), console.warn(`[embeddables] Failed to obtain proxy token for extension ${a.id} (${l.status}) — ${m}`);
|
|
@@ -11816,7 +11819,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
11816
11819
|
customerEmail: a,
|
|
11817
11820
|
customerName: i
|
|
11818
11821
|
}) => {
|
|
11819
|
-
const [c, d] = le([]), [
|
|
11822
|
+
const [c, d] = le([]), [f, l] = le([]), [m, h] = le(/* @__PURE__ */ new Map()), [b, g] = le(/* @__PURE__ */ new Map()), [v, y] = le(!1), [w, x] = le({ authenticated: !1, user: null }), [k, N] = le(void 0), T = Me(null), R = Me(/* @__PURE__ */ new Set()), S = Bt(() => c.filter((E) => E.manifest.permissions.includes("extend:identity")).map((E) => E.id), [c]);
|
|
11820
11823
|
ce(() => {
|
|
11821
11824
|
(async () => {
|
|
11822
11825
|
const P = e;
|
|
@@ -11835,7 +11838,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
11835
11838
|
return;
|
|
11836
11839
|
}
|
|
11837
11840
|
const L = await C.json(), F = vs(typeof window < "u" ? window.location.search : ""), M = await Ul(L, F), { tokens: Y, errors: j } = await Ab(M, n, o, F);
|
|
11838
|
-
d(M), l(F),
|
|
11841
|
+
d(M), l(F), h(new Map(Y)), g(j);
|
|
11839
11842
|
} catch (C) {
|
|
11840
11843
|
console.error("Failed to load extensions:", C);
|
|
11841
11844
|
} finally {
|
|
@@ -11849,7 +11852,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
11849
11852
|
const C = [];
|
|
11850
11853
|
await Promise.all(
|
|
11851
11854
|
c.filter((L) => L.manifest.permissions.includes("data:fetch")).map(async (L) => {
|
|
11852
|
-
const F =
|
|
11855
|
+
const F = f.find((z) => z.extensionId === L.id), M = F == null ? void 0 : F.token, Y = F == null ? void 0 : F.mode, j = zt(n, "/proxy-token"), ee = await fetch(j, {
|
|
11853
11856
|
method: "POST",
|
|
11854
11857
|
headers: { "Content-Type": "application/json" },
|
|
11855
11858
|
body: JSON.stringify({
|
|
@@ -11865,7 +11868,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
11865
11868
|
} else
|
|
11866
11869
|
console.warn(`[embeddables] Proxy token refresh failed for extension ${L.id} (${ee.status}) — using stale token`);
|
|
11867
11870
|
})
|
|
11868
|
-
), C.length > 0 &&
|
|
11871
|
+
), C.length > 0 && h((L) => {
|
|
11869
11872
|
const F = new Map(L);
|
|
11870
11873
|
for (const [M, Y] of C)
|
|
11871
11874
|
F.set(M, Y);
|
|
@@ -11873,7 +11876,7 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
11873
11876
|
});
|
|
11874
11877
|
}, 3300 * 1e3);
|
|
11875
11878
|
return () => clearInterval(P);
|
|
11876
|
-
}, [c,
|
|
11879
|
+
}, [c, f, n, o]), ce(() => {
|
|
11877
11880
|
if (m.size === 0)
|
|
11878
11881
|
return;
|
|
11879
11882
|
const E = (P) => {
|
|
@@ -11883,14 +11886,14 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
11883
11886
|
const L = C.extensionId, F = c.find((j) => j.id === L);
|
|
11884
11887
|
if (!(F != null && F.bundleUrl))
|
|
11885
11888
|
return;
|
|
11886
|
-
const M =
|
|
11889
|
+
const M = f.find((j) => j.extensionId === L);
|
|
11887
11890
|
if (Hl(F.bundleUrl) && (M == null ? void 0 : M.mode) !== "staging")
|
|
11888
11891
|
return;
|
|
11889
11892
|
const Y = m.get(L);
|
|
11890
11893
|
Y && Ue(L, { type: "extension-encryption-key", encryptionKey: Y.encryptionKey });
|
|
11891
11894
|
};
|
|
11892
11895
|
return window.addEventListener("message", E), () => window.removeEventListener("message", E);
|
|
11893
|
-
}, [c,
|
|
11896
|
+
}, [c, f, m]);
|
|
11894
11897
|
const A = Re((E, P) => {
|
|
11895
11898
|
const C = Lt();
|
|
11896
11899
|
for (const [L, F] of C) {
|
|
@@ -12210,32 +12213,32 @@ const Mt = (e) => e == null ? void 0 : e === !0 || e === "true", _c = {
|
|
|
12210
12213
|
};
|
|
12211
12214
|
var _b = (e, t, n, o, r, s, a, i) => {
|
|
12212
12215
|
let c = document.documentElement, d = ["light", "dark"];
|
|
12213
|
-
function
|
|
12216
|
+
function f(h) {
|
|
12214
12217
|
(Array.isArray(e) ? e : [e]).forEach((b) => {
|
|
12215
|
-
let
|
|
12216
|
-
|
|
12217
|
-
}), l(
|
|
12218
|
+
let g = b === "class", v = g && s ? r.map((y) => s[y] || y) : r;
|
|
12219
|
+
g ? (c.classList.remove(...v), c.classList.add(s && s[h] ? s[h] : h)) : c.setAttribute(b, h);
|
|
12220
|
+
}), l(h);
|
|
12218
12221
|
}
|
|
12219
|
-
function l(
|
|
12220
|
-
i && d.includes(
|
|
12222
|
+
function l(h) {
|
|
12223
|
+
i && d.includes(h) && (c.style.colorScheme = h);
|
|
12221
12224
|
}
|
|
12222
12225
|
function m() {
|
|
12223
12226
|
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
12224
12227
|
}
|
|
12225
|
-
if (o)
|
|
12228
|
+
if (o) f(o);
|
|
12226
12229
|
else try {
|
|
12227
|
-
let
|
|
12228
|
-
|
|
12230
|
+
let h = localStorage.getItem(t) || n, b = a && h === "system" ? m() : h;
|
|
12231
|
+
f(b);
|
|
12229
12232
|
} catch {
|
|
12230
12233
|
}
|
|
12231
|
-
}, Mb =
|
|
12234
|
+
}, Mb = u.createContext(void 0), Ob = { setTheme: (e) => {
|
|
12232
12235
|
}, themes: [] }, Lb = () => {
|
|
12233
12236
|
var e;
|
|
12234
|
-
return (e =
|
|
12237
|
+
return (e = u.useContext(Mb)) != null ? e : Ob;
|
|
12235
12238
|
};
|
|
12236
|
-
|
|
12237
|
-
let
|
|
12238
|
-
return
|
|
12239
|
+
u.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: o, enableColorScheme: r, defaultTheme: s, value: a, themes: i, nonce: c, scriptProps: d }) => {
|
|
12240
|
+
let f = JSON.stringify([n, t, s, e, i, a, o, r]).slice(1, -1);
|
|
12241
|
+
return u.createElement("script", { ...d, suppressHydrationWarning: !0, nonce: typeof window > "u" ? c : "", dangerouslySetInnerHTML: { __html: `(${_b.toString()})(${f})` } });
|
|
12239
12242
|
});
|
|
12240
12243
|
const Db = ({ ...e }) => {
|
|
12241
12244
|
const { theme: t = "system" } = Lb();
|
|
@@ -12282,7 +12285,7 @@ const Db = ({ ...e }) => {
|
|
|
12282
12285
|
/* @__PURE__ */ p("g", { transform: "translate(-160.365,27.97)", children: /* @__PURE__ */ p("path", { d: "M210.68,67.03C210.68,79.37 220.68,89.37 233.03,89.37C245.38,89.37 255.37,79.37 255.37,67.03L210.68,67.03Z", opacity: "0.3" }) })
|
|
12283
12286
|
] })
|
|
12284
12287
|
] }), zc = 400, Vb = zc * 0.35, $c = ({ icon: e, isOpen: t, onClick: n }) => {
|
|
12285
|
-
const o = Fb[e] ?? Bb, [r, s] = le("idle"), a =
|
|
12288
|
+
const o = Fb[e] ?? Bb, [r, s] = le("idle"), a = Me(t);
|
|
12286
12289
|
ce(() => {
|
|
12287
12290
|
if (a.current === t) return;
|
|
12288
12291
|
a.current = t, s("interstitial");
|
|
@@ -12307,16 +12310,16 @@ const Db = ({ ...e }) => {
|
|
|
12307
12310
|
) });
|
|
12308
12311
|
}, t0 = ({ children: e, icon: t, theme: n }) => {
|
|
12309
12312
|
const [o, r] = le(!1), [s, a] = le(!0), [i, c] = le(!1), d = Re(() => {
|
|
12310
|
-
r((
|
|
12313
|
+
r((f) => !f);
|
|
12311
12314
|
}, []);
|
|
12312
12315
|
return ce(() => {
|
|
12313
12316
|
o && !i && c(!0);
|
|
12314
12317
|
}, [o, i]), ce(() => {
|
|
12315
|
-
const
|
|
12318
|
+
const f = () => r((g) => !g), l = () => r(!0), m = () => r(!1), h = () => a(!0), b = () => {
|
|
12316
12319
|
r(!1), a(!1);
|
|
12317
12320
|
};
|
|
12318
|
-
return window.addEventListener("stackable:action:toggle",
|
|
12319
|
-
window.removeEventListener("stackable:action:open", l), window.removeEventListener("stackable:action:close", m), window.removeEventListener("stackable:action:toggle",
|
|
12321
|
+
return window.addEventListener("stackable:action:toggle", f), window.addEventListener("stackable:action:open", l), window.addEventListener("stackable:action:close", m), window.addEventListener("stackable:action:show", h), window.addEventListener("stackable:action:hide", b), () => {
|
|
12322
|
+
window.removeEventListener("stackable:action:open", l), window.removeEventListener("stackable:action:close", m), window.removeEventListener("stackable:action:toggle", f), window.removeEventListener("stackable:action:show", h), window.removeEventListener("stackable:action:hide", b);
|
|
12320
12323
|
};
|
|
12321
12324
|
}, []), /* @__PURE__ */ U(_e, { children: [
|
|
12322
12325
|
s && /* @__PURE__ */ p(
|
|
@@ -12379,15 +12382,15 @@ const Db = ({ ...e }) => {
|
|
|
12379
12382
|
if (s)
|
|
12380
12383
|
return /* @__PURE__ */ p($t, { className: "border-none shadow-none bg-transparent", children: /* @__PURE__ */ p(Ft, { className: "flex items-center justify-center p-6", children: /* @__PURE__ */ p(Oo, { className: "h-6 w-6 animate-spin text-muted-foreground" }) }) });
|
|
12381
12384
|
if (a || !r) {
|
|
12382
|
-
const
|
|
12385
|
+
const f = t ? t.split("@")[0] : e ? `Customer ${e.slice(-4)}` : "Customer", l = f.split(/[\s._-]+/).map((m) => m[0]).join("").slice(0, 2).toUpperCase();
|
|
12383
12386
|
return /* @__PURE__ */ p($t, { className: "border-none px-0 py-0 mb-4 shadow-none bg-transparent", children: /* @__PURE__ */ U(Ft, { className: "p-4 pb-0 pt-2", children: [
|
|
12384
12387
|
/* @__PURE__ */ U("div", { className: "flex flex-col items-center", children: [
|
|
12385
12388
|
/* @__PURE__ */ U(Ao, { className: "h-16 w-16 mb-2 ring-2 ring-background shadow-sm", children: [
|
|
12386
12389
|
/* @__PURE__ */ p(
|
|
12387
12390
|
Io,
|
|
12388
12391
|
{
|
|
12389
|
-
src: `https://ui-avatars.com/api/?name=${encodeURIComponent(
|
|
12390
|
-
alt:
|
|
12392
|
+
src: `https://ui-avatars.com/api/?name=${encodeURIComponent(f)}&background=7c3aed&color=fff&size=128`,
|
|
12393
|
+
alt: f
|
|
12391
12394
|
}
|
|
12392
12395
|
),
|
|
12393
12396
|
/* @__PURE__ */ p(_o, { className: "text-lg", children: l })
|
|
@@ -12395,7 +12398,7 @@ const Db = ({ ...e }) => {
|
|
|
12395
12398
|
/* @__PURE__ */ U("div", { className: "text-center w-full space-y-1", children: [
|
|
12396
12399
|
/* @__PURE__ */ U("div", { children: [
|
|
12397
12400
|
/* @__PURE__ */ p("p", { className: "text-xs text-foreground/70 font-medium tracking-wide", children: "Welcome," }),
|
|
12398
|
-
/* @__PURE__ */ p("h2", { className: "text-lg font-bold text-foreground leading-tight", children:
|
|
12401
|
+
/* @__PURE__ */ p("h2", { className: "text-lg font-bold text-foreground leading-tight", children: f })
|
|
12399
12402
|
] }),
|
|
12400
12403
|
t && /* @__PURE__ */ p("div", { className: "pt-2 flex flex-col items-center gap-1", children: /* @__PURE__ */ U("div", { className: "flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75", children: [
|
|
12401
12404
|
/* @__PURE__ */ p(mo, { className: "h-3 w-3", "aria-hidden": "true" }),
|
|
@@ -12446,7 +12449,7 @@ const Db = ({ ...e }) => {
|
|
|
12446
12449
|
};
|
|
12447
12450
|
}, [e, t]);
|
|
12448
12451
|
}, Gb = ({ customization: e }) => {
|
|
12449
|
-
const t =
|
|
12452
|
+
const t = Me(null);
|
|
12450
12453
|
return Fc("widget_conversations", t), ce(() => {
|
|
12451
12454
|
!window.zE || !t.current || e && window.zE("messenger:set", "customization", {
|
|
12452
12455
|
conversationList: e
|
|
@@ -12459,7 +12462,7 @@ const Db = ({ ...e }) => {
|
|
|
12459
12462
|
}
|
|
12460
12463
|
);
|
|
12461
12464
|
}, Yb = ({ customization: e }) => {
|
|
12462
|
-
const t =
|
|
12465
|
+
const t = Me(null);
|
|
12463
12466
|
return Fc("widget_messages", t), ce(() => {
|
|
12464
12467
|
!window.zE || !t.current || e && window.zE("messenger:set", "customization", {
|
|
12465
12468
|
messageLog: e
|
|
@@ -12485,7 +12488,7 @@ const Db = ({ ...e }) => {
|
|
|
12485
12488
|
const a = Math.max(
|
|
12486
12489
|
uo,
|
|
12487
12490
|
Math.min(fo, s)
|
|
12488
|
-
), { extensions: i } = gs(), c = Bt(() => i.some((S) => S.enabled && (S.manifest.targets.includes("slot.header") || S.manifest.targets.includes("slot.content"))), [i]), [d,
|
|
12491
|
+
), { extensions: i } = gs(), c = Bt(() => i.some((S) => S.enabled && (S.manifest.targets.includes("slot.header") || S.manifest.targets.includes("slot.content"))), [i]), [d, f] = le(!1), [l, m] = le(!1), [h, b] = le("extensions"), [g, v] = le(a), [y, w] = le("loading"), x = Me(null), k = Re(() => !window.zE || !document.getElementById("widget_conversations") || !document.getElementById("widget_messages") ? !1 : (window.zE("messenger", "render", {
|
|
12489
12492
|
mode: "embedded",
|
|
12490
12493
|
messageLog: { targetElement: "#widget_messages" },
|
|
12491
12494
|
conversationList: { targetElement: "#widget_conversations" }
|
|
@@ -12496,22 +12499,23 @@ const Db = ({ ...e }) => {
|
|
|
12496
12499
|
}), !0), []);
|
|
12497
12500
|
ce(() => {
|
|
12498
12501
|
var H, V;
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
return;
|
|
12502
|
-
}
|
|
12503
|
-
const S = setInterval(() => {
|
|
12504
|
-
k() && (w("ready"), clearInterval(S));
|
|
12505
|
-
}, 100), A = setTimeout(() => {
|
|
12506
|
-
clearInterval(S), w((W) => W === "ready" ? W : (console.warn("Zendesk widget failed to load after 10 seconds"), "error"));
|
|
12507
|
-
}, 1e4), D = document.querySelector('script[src*="zdassets.com/ekr/snippet"]'), O = (V = (H = D == null ? void 0 : D.src) == null ? void 0 : H.match(/key=([a-f0-9-]+)/)) == null ? void 0 : V[1];
|
|
12508
|
-
return O && fetch(`https://ekr.zdassets.com/compose/${O}`).then((W) => W.text()).then((W) => {
|
|
12502
|
+
const S = document.querySelector('script[src*="zdassets.com/ekr/snippet"]'), A = (V = (H = S == null ? void 0 : S.src) == null ? void 0 : H.match(/key=([a-f0-9-]+)/)) == null ? void 0 : V[1];
|
|
12503
|
+
if (A && fetch(`https://ekr.zdassets.com/compose/${A}`).then((W) => W.text()).then((W) => {
|
|
12509
12504
|
var _;
|
|
12510
12505
|
const Q = (_ = W.match(/appId['"]?\s*:\s*['"]([a-f0-9]+)['"]/)) == null ? void 0 : _[1];
|
|
12511
12506
|
Q && lo({ appId: Q });
|
|
12512
12507
|
}).catch(() => {
|
|
12513
|
-
}), ()
|
|
12514
|
-
|
|
12508
|
+
}), k()) {
|
|
12509
|
+
w("ready");
|
|
12510
|
+
return;
|
|
12511
|
+
}
|
|
12512
|
+
const D = setInterval(() => {
|
|
12513
|
+
k() && (w("ready"), clearInterval(D));
|
|
12514
|
+
}, 100), O = setTimeout(() => {
|
|
12515
|
+
clearInterval(D), w((W) => W === "ready" ? W : (console.warn("Zendesk widget failed to load after 10 seconds"), "error"));
|
|
12516
|
+
}, 1e4);
|
|
12517
|
+
return () => {
|
|
12518
|
+
clearInterval(D), clearTimeout(O);
|
|
12515
12519
|
};
|
|
12516
12520
|
}, [k]);
|
|
12517
12521
|
const N = Re((S) => {
|
|
@@ -12558,7 +12562,7 @@ const Db = ({ ...e }) => {
|
|
|
12558
12562
|
);
|
|
12559
12563
|
v(W);
|
|
12560
12564
|
}, A = () => {
|
|
12561
|
-
|
|
12565
|
+
f(!1), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
12562
12566
|
};
|
|
12563
12567
|
return document.body.style.cursor = l ? "col-resize" : "row-resize", document.body.style.userSelect = "none", window.addEventListener("mousemove", S), window.addEventListener("mouseup", A), window.addEventListener("blur", A), () => {
|
|
12564
12568
|
window.removeEventListener("mousemove", S), window.removeEventListener("mouseup", A), window.removeEventListener("blur", A), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
@@ -12581,7 +12585,7 @@ const Db = ({ ...e }) => {
|
|
|
12581
12585
|
v(a);
|
|
12582
12586
|
return;
|
|
12583
12587
|
}
|
|
12584
|
-
S.preventDefault(),
|
|
12588
|
+
S.preventDefault(), f(!0);
|
|
12585
12589
|
}, [a]), R = { customerId: o, customerEmail: r };
|
|
12586
12590
|
return /* @__PURE__ */ U("div", { "data-component": "zendesk-wrapper", className: "flex-1 flex flex-col z-10 overflow-hidden", style: { containerType: "inline-size" }, children: [
|
|
12587
12591
|
/* @__PURE__ */ p("style", {
|
|
@@ -12594,10 +12598,10 @@ const Db = ({ ...e }) => {
|
|
|
12594
12598
|
{
|
|
12595
12599
|
"data-id": "primary-panel",
|
|
12596
12600
|
className: "min-h-0 min-w-0 flex-none overflow-hidden flex flex-col",
|
|
12597
|
-
style: { flexBasis: `${
|
|
12601
|
+
style: { flexBasis: `${g}%` },
|
|
12598
12602
|
children: [
|
|
12599
12603
|
/* @__PURE__ */ U("div", { className: "flex items-center justify-between px-4 py-3", children: [
|
|
12600
|
-
/* @__PURE__ */ p("h2", { className: "font-semibold text-sm text-foreground", children:
|
|
12604
|
+
/* @__PURE__ */ p("h2", { className: "font-semibold text-sm text-foreground", children: h === "extensions" ? "My Profile" : "My Conversations" }),
|
|
12601
12605
|
/* @__PURE__ */ U("div", { className: "flex items-center gap-1", children: [
|
|
12602
12606
|
e && /* @__PURE__ */ p("div", { className: "flex mr-1 gap-1", children: e }),
|
|
12603
12607
|
/* @__PURE__ */ U("div", { className: "flex rounded-lg bg-muted p-1", children: [
|
|
@@ -12609,7 +12613,7 @@ const Db = ({ ...e }) => {
|
|
|
12609
12613
|
className: K(
|
|
12610
12614
|
// eslint-disable-next-line @stylistic/max-len
|
|
12611
12615
|
"rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
12612
|
-
|
|
12616
|
+
h === "extensions" ? "border-border bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
12613
12617
|
),
|
|
12614
12618
|
title: "My Profile",
|
|
12615
12619
|
children: /* @__PURE__ */ p(Rs, { className: "h-4 w-4" })
|
|
@@ -12622,7 +12626,7 @@ const Db = ({ ...e }) => {
|
|
|
12622
12626
|
className: K(
|
|
12623
12627
|
// eslint-disable-next-line @stylistic/max-len
|
|
12624
12628
|
"rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
12625
|
-
|
|
12629
|
+
h === "conversations" ? "border-border bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
12626
12630
|
),
|
|
12627
12631
|
title: "Conversations",
|
|
12628
12632
|
children: /* @__PURE__ */ p(Lo, { className: "h-4 w-4" })
|
|
@@ -12632,7 +12636,7 @@ const Db = ({ ...e }) => {
|
|
|
12632
12636
|
] })
|
|
12633
12637
|
] }),
|
|
12634
12638
|
/* @__PURE__ */ U("div", { className: "flex-1 overflow-y-auto p-4 relative", children: [
|
|
12635
|
-
/* @__PURE__ */ U("div", { className: K("flex flex-col gap-2",
|
|
12639
|
+
/* @__PURE__ */ U("div", { className: K("flex flex-col gap-2", h === "conversations" && "hidden"), children: [
|
|
12636
12640
|
/* @__PURE__ */ p(jb, { customerId: o, customerEmail: r, queryApiBase: n, children: /* @__PURE__ */ p(
|
|
12637
12641
|
Qt,
|
|
12638
12642
|
{
|
|
@@ -12652,7 +12656,7 @@ const Db = ({ ...e }) => {
|
|
|
12652
12656
|
] }),
|
|
12653
12657
|
/* @__PURE__ */ p("div", { className: K(
|
|
12654
12658
|
"h-full rounded-xl border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-300",
|
|
12655
|
-
|
|
12659
|
+
h === "extensions" && "hidden"
|
|
12656
12660
|
), children: y === "error" ? /* @__PURE__ */ p("div", { className: "flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground", children: /* @__PURE__ */ p("p", { children: "Error loading conversations." }) }) : /* @__PURE__ */ p(Gb, {}) })
|
|
12657
12661
|
] })
|
|
12658
12662
|
]
|
|
@@ -12663,7 +12667,7 @@ const Db = ({ ...e }) => {
|
|
|
12663
12667
|
{
|
|
12664
12668
|
"data-id": "secondary-panel",
|
|
12665
12669
|
className: "min-h-0 min-w-0 flex-none flex flex-col bg-white",
|
|
12666
|
-
style: { flexBasis: c ? `${100 -
|
|
12670
|
+
style: { flexBasis: c ? `${100 - g}%` : "100%" },
|
|
12667
12671
|
children: [
|
|
12668
12672
|
/* @__PURE__ */ p("div", { className: "flex-1 overflow-hidden", children: y === "error" ? /* @__PURE__ */ p("div", { className: "flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground", children: /* @__PURE__ */ p("p", { children: "Zendesk Messenger could not be loaded. Check that a valid Snippet Key is configured." }) }) : /* @__PURE__ */ p(Yb, {}) }),
|
|
12669
12673
|
/* @__PURE__ */ U("div", { className: "flex flex-wrap items-center justify-end gap-1 py-1 mr-4 text-xs text-zinc-500", children: [
|
|
@@ -12704,14 +12708,14 @@ const Db = ({ ...e }) => {
|
|
|
12704
12708
|
"group/resize absolute z-20 flex items-center justify-center",
|
|
12705
12709
|
l ? "top-0 bottom-0 w-3 -ml-2.5 cursor-col-resize" : "w-full h-3 -mt-2.5 cursor-row-resize"
|
|
12706
12710
|
),
|
|
12707
|
-
style: l ? { left: `${
|
|
12711
|
+
style: l ? { left: `${g}%` } : { top: `${g}%` },
|
|
12708
12712
|
onMouseDown: T,
|
|
12709
12713
|
role: "separator",
|
|
12710
12714
|
"aria-label": "Resize panels",
|
|
12711
12715
|
"aria-orientation": l ? "vertical" : "horizontal",
|
|
12712
12716
|
"aria-valuemin": uo,
|
|
12713
12717
|
"aria-valuemax": fo,
|
|
12714
|
-
"aria-valuenow": Math.round(
|
|
12718
|
+
"aria-valuenow": Math.round(g),
|
|
12715
12719
|
children: /* @__PURE__ */ p(
|
|
12716
12720
|
"div",
|
|
12717
12721
|
{
|
|
@@ -12728,7 +12732,7 @@ const Db = ({ ...e }) => {
|
|
|
12728
12732
|
"div",
|
|
12729
12733
|
{
|
|
12730
12734
|
className: K("absolute inset-0 z-40", l ? "cursor-col-resize" : "cursor-row-resize"),
|
|
12731
|
-
onMouseUp: () =>
|
|
12735
|
+
onMouseUp: () => f(!1)
|
|
12732
12736
|
}
|
|
12733
12737
|
)
|
|
12734
12738
|
] })
|