@cfx-dev/ui-components 4.2.23 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Combination-CSgOhzm-.js +2198 -0
- package/dist/Combination-N-vN9BB-.js +823 -0
- package/dist/Table.module-DHI1mXN2.js +17 -0
- package/dist/assets/all_css.css +1 -0
- package/dist/assets/css/Checkbox.css +1 -1
- package/dist/assets/css/DataTable.css +1 -0
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/cfxIcons-B9nzO6TW.js +98 -0
- package/dist/components/Accordion/Accordion.js +25 -26
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/Avatar/Avatar.js +21 -20
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/Badge/Badge.d.ts +2 -1
- package/dist/components/Badge/Badge.js +29 -29
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenu.js +2 -2
- package/dist/components/BurgerMenu/BurgerMenuButton.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/Button.d.ts +5 -2
- package/dist/components/Button/Button.js +83 -81
- package/dist/components/Button/ButtonShowcase.js +2 -2
- package/dist/components/Button/LinkButton.d.ts +1 -1
- package/dist/components/Button/LinkButton.js +18 -17
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +7 -7
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.js +154 -242
- package/dist/components/ClipboardButton/ClipboardButton.js +7 -7
- package/dist/components/ControlBox/ControlBox.d.ts +3 -2
- package/dist/components/ControlBox/ControlBox.js +13 -10
- package/dist/components/CountryFlag/CountryFlag.d.ts +3 -2
- package/dist/components/CountryFlag/CountryFlag.js +14 -11
- package/dist/components/DataTable/DataTable.d.ts +40 -0
- package/dist/components/DataTable/DataTable.js +163 -0
- package/dist/components/DataTable/DataTableShowcase.d.ts +5 -0
- package/dist/components/DataTable/DataTableShowcase.js +60 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +6 -0
- package/dist/components/Decorate/Decorate.d.ts +3 -2
- package/dist/components/Decorate/Decorate.js +19 -15
- package/dist/components/Dot/Dot.d.ts +2 -1
- package/dist/components/Dot/Dot.js +15 -13
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +665 -1836
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/Flyout/Flyout.d.ts +2 -1
- package/dist/components/Flyout/Flyout.js +22 -20
- package/dist/components/Icon/Icon.d.ts +2 -1
- package/dist/components/Icon/Icon.js +19 -17
- package/dist/components/IconBig/IconBig.d.ts +2 -1
- package/dist/components/IconBig/IconBig.js +16 -14
- package/dist/components/Icons/IconsShowcase.js +1 -1
- package/dist/components/Icons/cfx-icons/Radio.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Radio.js +36 -0
- package/dist/components/Icons/cfx-icons/Square.js +15 -9
- package/dist/components/Icons/cfxIcons.d.ts +1 -0
- package/dist/components/Icons/cfxIcons.js +62 -60
- package/dist/components/Icons/index.js +1 -1
- package/dist/components/Indicator/Indicator.js +9 -10
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.d.ts +4 -1
- package/dist/components/Input/Input.js +101 -88
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.d.ts +2 -1
- package/dist/components/Input/RichInput.js +37 -34
- package/dist/components/InputDropzone/InputDropzone.d.ts +1 -1
- package/dist/components/InputDropzone/InputDropzone.js +1723 -625
- package/dist/components/Interactive/Interactive.d.ts +2 -1
- package/dist/components/Interactive/Interactive.js +14 -12
- package/dist/components/Island/Island.d.ts +2 -1
- package/dist/components/Island/Island.js +24 -24
- package/dist/components/Layout/Box/Box.d.ts +8 -2
- package/dist/components/Layout/Box/Box.js +53 -51
- package/dist/components/Layout/Box/Box.types.d.ts +22 -0
- package/dist/components/Layout/Box/Box.types.js +4 -0
- package/dist/components/Layout/Box/index.d.ts +1 -1
- package/dist/components/Layout/Box/index.js +3 -3
- package/dist/components/Layout/Center/Center.d.ts +2 -1
- package/dist/components/Layout/Center/Center.js +19 -18
- package/dist/components/Layout/Flex/Flex.d.ts +6 -10
- package/dist/components/Layout/Flex/Flex.js +53 -64
- package/dist/components/Layout/Flex/FlexRestricter.d.ts +2 -1
- package/dist/components/Layout/Flex/FlexRestricter.js +13 -12
- package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
- package/dist/components/Layout/Flex/index.d.ts +2 -2
- package/dist/components/Layout/Flex/index.js +8 -8
- package/dist/components/Layout/Page/Page.js +11 -12
- package/dist/components/Layout/Scrollable/Rail.d.ts +1 -1
- package/dist/components/Layout/Scrollable/Scrollable.d.ts +2 -1
- package/dist/components/Layout/Scrollable/Scrollable.js +40 -38
- package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +98 -98
- package/dist/components/Link/LinkShowcase.js +1 -1
- package/dist/components/Loaf/Loaf.d.ts +2 -1
- package/dist/components/Loaf/Loaf.js +17 -16
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/Modal.js +16 -17
- package/dist/components/Modal/ModalShowcase.js +14 -11
- package/dist/components/NavList/NavList.d.ts +2 -1
- package/dist/components/NavList/NavList.js +19 -18
- package/dist/components/OnScreenSensor.js +1 -1
- package/dist/components/Overlay/Overlay.d.ts +4 -2
- package/dist/components/Overlay/Overlay.js +31 -23
- package/dist/components/Popover/Popover.d.ts +3 -2
- package/dist/components/Popover/Popover.js +31 -30
- package/dist/components/Popover/PopoverShowcase.js +4 -4
- package/dist/components/PremiumBadge/PremiumBadge.d.ts +2 -1
- package/dist/components/PremiumBadge/PremiumBadge.js +12 -11
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +666 -1617
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Shroud/Shroud.d.ts +2 -1
- package/dist/components/Shroud/Shroud.js +16 -14
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +26 -27
- package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
- package/dist/components/Slider/Slider.d.ts +2 -1
- package/dist/components/Slider/Slider.js +326 -377
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Switch/Switch.js +109 -155
- package/dist/components/Table/TableBody.d.ts +8 -0
- package/dist/components/Table/TableBody.js +14 -0
- package/dist/components/Table/TableCell.d.ts +11 -0
- package/dist/components/Table/TableCell.js +54 -0
- package/dist/components/Table/TableCellCheckbox.d.ts +11 -0
- package/dist/components/Table/TableCellCheckbox.js +20 -0
- package/dist/components/Table/TableHeader.d.ts +9 -0
- package/dist/components/Table/TableHeader.js +24 -0
- package/dist/components/Table/TableIconButton.d.ts +6 -0
- package/dist/components/Table/TableIconButton.js +16 -0
- package/dist/components/Table/TableRoot.d.ts +8 -0
- package/dist/components/Table/TableRoot.js +23 -0
- package/dist/components/Table/TableRow.d.ts +13 -0
- package/dist/components/Table/TableRow.js +46 -0
- package/dist/components/Table/TableShowcase.js +56 -57
- package/dist/components/Table/index.d.ts +20 -2
- package/dist/components/Table/index.js +17 -5
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/Text.d.ts +6 -3
- package/dist/components/Text/Text.js +67 -63
- package/dist/components/Text/TextShowcase.js +40 -33
- package/dist/components/Title/Title.d.ts +3 -1
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-BHuChyf5.js +238 -0
- package/dist/index-Cl_RnsqN.js +386 -0
- package/dist/index-DZEAOJqB.js +53 -0
- package/dist/index-HDl8nGsm.js +70 -0
- package/dist/main.d.ts +7 -5
- package/dist/main.js +181 -179
- package/dist/{medium-BA3EQDZW.js → medium-Bq5NvyU7.js} +1 -1
- package/dist/styles-scss/global.scss +1 -0
- package/dist/tslib.es6-CtHwNPxX.js +72 -0
- package/dist/utils/hooks/useClipboardComponent.d.ts +1 -1
- package/dist/utils/hooks/useOutlet.js +1 -1
- package/dist/utils/hooks/usePopoverController.d.ts +1 -1
- package/dist/utils/links.js +1 -1
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/mergeRefs.js +1 -1
- package/dist/utils/ui/ui.d.ts +1 -0
- package/dist/utils/ui/ui.js +45 -36
- package/dist/utils/ui/ui.types.d.ts +4 -0
- package/package.json +6 -5
- package/dist/Combination-Cbiw1XRb.js +0 -792
- package/dist/cfxIcons-BNd1WgpX.js +0 -96
- package/dist/components/Table/Table.d.ts +0 -42
- package/dist/components/Table/Table.js +0 -170
- package/dist/index-2hJuj4UN.js +0 -19069
- package/dist/index-AweK2ufS.js +0 -171
- package/dist/index-BlbvKsmN.js +0 -82
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-Bz27DCHt.js +0 -1342
- package/dist/index-Cf5Yu9oD.js +0 -67
- package/dist/tslib.es6-CBKHJX9H.js +0 -151
|
@@ -0,0 +1,2198 @@
|
|
|
1
|
+
import * as p from "react";
|
|
2
|
+
import { useLayoutEffect as vn, useEffect as gn } from "react";
|
|
3
|
+
import { u as he, P as ce, e as Me, g as yn, a as Ve, c as wn, f as xn } from "./index-BHuChyf5.js";
|
|
4
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
5
|
+
import { r as bn } from "./index-Cl_RnsqN.js";
|
|
6
|
+
import { c as Lt, _ as Q, d as En } from "./tslib.es6-CtHwNPxX.js";
|
|
7
|
+
import { c as Cn, u as An } from "./medium-Bq5NvyU7.js";
|
|
8
|
+
var Tt = function(e) {
|
|
9
|
+
var t = e.sideCar, n = Lt(e, ["sideCar"]);
|
|
10
|
+
if (!t)
|
|
11
|
+
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
12
|
+
var r = t.read();
|
|
13
|
+
if (!r)
|
|
14
|
+
throw new Error("Sidecar medium not found");
|
|
15
|
+
return p.createElement(r, Q({}, n));
|
|
16
|
+
};
|
|
17
|
+
Tt.isSideCarExport = !0;
|
|
18
|
+
function Sn(e, t) {
|
|
19
|
+
return e.useMedium(t), Tt;
|
|
20
|
+
}
|
|
21
|
+
function ie(e) {
|
|
22
|
+
const t = p.useRef(e);
|
|
23
|
+
return p.useEffect(() => {
|
|
24
|
+
t.current = e;
|
|
25
|
+
}), p.useMemo(() => (...n) => {
|
|
26
|
+
var r;
|
|
27
|
+
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
28
|
+
}, []);
|
|
29
|
+
}
|
|
30
|
+
function Rn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
31
|
+
const n = ie(e);
|
|
32
|
+
p.useEffect(() => {
|
|
33
|
+
const r = (o) => {
|
|
34
|
+
o.key === "Escape" && n(o);
|
|
35
|
+
};
|
|
36
|
+
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
37
|
+
}, [n, t]);
|
|
38
|
+
}
|
|
39
|
+
var Pn = "DismissableLayer", ze = "dismissableLayer.update", On = "dismissableLayer.pointerDownOutside", Ln = "dismissableLayer.focusOutside", ut, Dt = p.createContext({
|
|
40
|
+
layers: /* @__PURE__ */ new Set(),
|
|
41
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
42
|
+
branches: /* @__PURE__ */ new Set()
|
|
43
|
+
}), Tn = p.forwardRef(
|
|
44
|
+
(e, t) => {
|
|
45
|
+
const {
|
|
46
|
+
disableOutsidePointerEvents: n = !1,
|
|
47
|
+
onEscapeKeyDown: r,
|
|
48
|
+
onPointerDownOutside: o,
|
|
49
|
+
onFocusOutside: i,
|
|
50
|
+
onInteractOutside: c,
|
|
51
|
+
onDismiss: s,
|
|
52
|
+
...d
|
|
53
|
+
} = e, l = p.useContext(Dt), [f, u] = p.useState(null), m = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = p.useState({}), y = he(t, (C) => u(C)), a = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), g = a.indexOf(v), b = f ? a.indexOf(f) : -1, x = l.layersWithOutsidePointerEventsDisabled.size > 0, w = b >= g, E = Mn((C) => {
|
|
54
|
+
const R = C.target, L = [...l.branches].some((P) => P.contains(R));
|
|
55
|
+
!w || L || (o == null || o(C), c == null || c(C), C.defaultPrevented || s == null || s());
|
|
56
|
+
}, m), A = Fn((C) => {
|
|
57
|
+
const R = C.target;
|
|
58
|
+
[...l.branches].some((P) => P.contains(R)) || (i == null || i(C), c == null || c(C), C.defaultPrevented || s == null || s());
|
|
59
|
+
}, m);
|
|
60
|
+
return Rn((C) => {
|
|
61
|
+
b === l.layers.size - 1 && (r == null || r(C), !C.defaultPrevented && s && (C.preventDefault(), s()));
|
|
62
|
+
}, m), p.useEffect(() => {
|
|
63
|
+
if (f)
|
|
64
|
+
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (ut = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), ft(), () => {
|
|
65
|
+
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = ut);
|
|
66
|
+
};
|
|
67
|
+
}, [f, m, n, l]), p.useEffect(() => () => {
|
|
68
|
+
f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), ft());
|
|
69
|
+
}, [f, l]), p.useEffect(() => {
|
|
70
|
+
const C = () => h({});
|
|
71
|
+
return document.addEventListener(ze, C), () => document.removeEventListener(ze, C);
|
|
72
|
+
}, []), /* @__PURE__ */ _(
|
|
73
|
+
ce.div,
|
|
74
|
+
{
|
|
75
|
+
...d,
|
|
76
|
+
ref: y,
|
|
77
|
+
style: {
|
|
78
|
+
pointerEvents: x ? w ? "auto" : "none" : void 0,
|
|
79
|
+
...e.style
|
|
80
|
+
},
|
|
81
|
+
onFocusCapture: Me(e.onFocusCapture, A.onFocusCapture),
|
|
82
|
+
onBlurCapture: Me(e.onBlurCapture, A.onBlurCapture),
|
|
83
|
+
onPointerDownCapture: Me(
|
|
84
|
+
e.onPointerDownCapture,
|
|
85
|
+
E.onPointerDownCapture
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
Tn.displayName = Pn;
|
|
92
|
+
var Dn = "DismissableLayerBranch", kn = p.forwardRef((e, t) => {
|
|
93
|
+
const n = p.useContext(Dt), r = p.useRef(null), o = he(t, r);
|
|
94
|
+
return p.useEffect(() => {
|
|
95
|
+
const i = r.current;
|
|
96
|
+
if (i)
|
|
97
|
+
return n.branches.add(i), () => {
|
|
98
|
+
n.branches.delete(i);
|
|
99
|
+
};
|
|
100
|
+
}, [n.branches]), /* @__PURE__ */ _(ce.div, { ...e, ref: o });
|
|
101
|
+
});
|
|
102
|
+
kn.displayName = Dn;
|
|
103
|
+
function Mn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
104
|
+
const n = ie(e), r = p.useRef(!1), o = p.useRef(() => {
|
|
105
|
+
});
|
|
106
|
+
return p.useEffect(() => {
|
|
107
|
+
const i = (s) => {
|
|
108
|
+
if (s.target && !r.current) {
|
|
109
|
+
let d = function() {
|
|
110
|
+
kt(
|
|
111
|
+
On,
|
|
112
|
+
n,
|
|
113
|
+
l,
|
|
114
|
+
{ discrete: !0 }
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
const l = { originalEvent: s };
|
|
118
|
+
s.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = d, t.addEventListener("click", o.current, { once: !0 })) : d();
|
|
119
|
+
} else
|
|
120
|
+
t.removeEventListener("click", o.current);
|
|
121
|
+
r.current = !1;
|
|
122
|
+
}, c = window.setTimeout(() => {
|
|
123
|
+
t.addEventListener("pointerdown", i);
|
|
124
|
+
}, 0);
|
|
125
|
+
return () => {
|
|
126
|
+
window.clearTimeout(c), t.removeEventListener("pointerdown", i), t.removeEventListener("click", o.current);
|
|
127
|
+
};
|
|
128
|
+
}, [t, n]), {
|
|
129
|
+
// ensures we check React component tree (not just DOM tree)
|
|
130
|
+
onPointerDownCapture: () => r.current = !0
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function Fn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
134
|
+
const n = ie(e), r = p.useRef(!1);
|
|
135
|
+
return p.useEffect(() => {
|
|
136
|
+
const o = (i) => {
|
|
137
|
+
i.target && !r.current && kt(Ln, n, { originalEvent: i }, {
|
|
138
|
+
discrete: !1
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
|
|
142
|
+
}, [t, n]), {
|
|
143
|
+
onFocusCapture: () => r.current = !0,
|
|
144
|
+
onBlurCapture: () => r.current = !1
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function ft() {
|
|
148
|
+
const e = new CustomEvent(ze);
|
|
149
|
+
document.dispatchEvent(e);
|
|
150
|
+
}
|
|
151
|
+
function kt(e, t, n, { discrete: r }) {
|
|
152
|
+
const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
153
|
+
t && o.addEventListener(e, t, { once: !0 }), r ? yn(o, i) : o.dispatchEvent(i);
|
|
154
|
+
}
|
|
155
|
+
var Fe = 0;
|
|
156
|
+
function No() {
|
|
157
|
+
p.useEffect(() => {
|
|
158
|
+
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
159
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? dt()), document.body.insertAdjacentElement("beforeend", e[1] ?? dt()), Fe++, () => {
|
|
160
|
+
Fe === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Fe--;
|
|
161
|
+
};
|
|
162
|
+
}, []);
|
|
163
|
+
}
|
|
164
|
+
function dt() {
|
|
165
|
+
const e = document.createElement("span");
|
|
166
|
+
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;
|
|
167
|
+
}
|
|
168
|
+
var Ne = "focusScope.autoFocusOnMount", We = "focusScope.autoFocusOnUnmount", ht = { bubbles: !1, cancelable: !0 }, Nn = "FocusScope", Wn = p.forwardRef((e, t) => {
|
|
169
|
+
const {
|
|
170
|
+
loop: n = !1,
|
|
171
|
+
trapped: r = !1,
|
|
172
|
+
onMountAutoFocus: o,
|
|
173
|
+
onUnmountAutoFocus: i,
|
|
174
|
+
...c
|
|
175
|
+
} = e, [s, d] = p.useState(null), l = ie(o), f = ie(i), u = p.useRef(null), m = he(t, (a) => d(a)), h = p.useRef({
|
|
176
|
+
paused: !1,
|
|
177
|
+
pause() {
|
|
178
|
+
this.paused = !0;
|
|
179
|
+
},
|
|
180
|
+
resume() {
|
|
181
|
+
this.paused = !1;
|
|
182
|
+
}
|
|
183
|
+
}).current;
|
|
184
|
+
p.useEffect(() => {
|
|
185
|
+
if (r) {
|
|
186
|
+
let a = function(x) {
|
|
187
|
+
if (h.paused || !s) return;
|
|
188
|
+
const w = x.target;
|
|
189
|
+
s.contains(w) ? u.current = w : K(u.current, { select: !0 });
|
|
190
|
+
}, v = function(x) {
|
|
191
|
+
if (h.paused || !s) return;
|
|
192
|
+
const w = x.relatedTarget;
|
|
193
|
+
w !== null && (s.contains(w) || K(u.current, { select: !0 }));
|
|
194
|
+
}, g = function(x) {
|
|
195
|
+
if (document.activeElement === document.body)
|
|
196
|
+
for (const E of x)
|
|
197
|
+
E.removedNodes.length > 0 && K(s);
|
|
198
|
+
};
|
|
199
|
+
document.addEventListener("focusin", a), document.addEventListener("focusout", v);
|
|
200
|
+
const b = new MutationObserver(g);
|
|
201
|
+
return s && b.observe(s, { childList: !0, subtree: !0 }), () => {
|
|
202
|
+
document.removeEventListener("focusin", a), document.removeEventListener("focusout", v), b.disconnect();
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
}, [r, s, h.paused]), p.useEffect(() => {
|
|
206
|
+
if (s) {
|
|
207
|
+
pt.add(h);
|
|
208
|
+
const a = document.activeElement;
|
|
209
|
+
if (!s.contains(a)) {
|
|
210
|
+
const g = new CustomEvent(Ne, ht);
|
|
211
|
+
s.addEventListener(Ne, l), s.dispatchEvent(g), g.defaultPrevented || (Bn(Vn(Mt(s)), { select: !0 }), document.activeElement === a && K(s));
|
|
212
|
+
}
|
|
213
|
+
return () => {
|
|
214
|
+
s.removeEventListener(Ne, l), setTimeout(() => {
|
|
215
|
+
const g = new CustomEvent(We, ht);
|
|
216
|
+
s.addEventListener(We, f), s.dispatchEvent(g), g.defaultPrevented || K(a ?? document.body, { select: !0 }), s.removeEventListener(We, f), pt.remove(h);
|
|
217
|
+
}, 0);
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
}, [s, l, f, h]);
|
|
221
|
+
const y = p.useCallback(
|
|
222
|
+
(a) => {
|
|
223
|
+
if (!n && !r || h.paused) return;
|
|
224
|
+
const v = a.key === "Tab" && !a.altKey && !a.ctrlKey && !a.metaKey, g = document.activeElement;
|
|
225
|
+
if (v && g) {
|
|
226
|
+
const b = a.currentTarget, [x, w] = In(b);
|
|
227
|
+
x && w ? !a.shiftKey && g === w ? (a.preventDefault(), n && K(x, { select: !0 })) : a.shiftKey && g === x && (a.preventDefault(), n && K(w, { select: !0 })) : g === b && a.preventDefault();
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
[n, r, h.paused]
|
|
231
|
+
);
|
|
232
|
+
return /* @__PURE__ */ _(ce.div, { tabIndex: -1, ...c, ref: m, onKeyDown: y });
|
|
233
|
+
});
|
|
234
|
+
Wn.displayName = Nn;
|
|
235
|
+
function Bn(e, { select: t = !1 } = {}) {
|
|
236
|
+
const n = document.activeElement;
|
|
237
|
+
for (const r of e)
|
|
238
|
+
if (K(r, { select: t }), document.activeElement !== n) return;
|
|
239
|
+
}
|
|
240
|
+
function In(e) {
|
|
241
|
+
const t = Mt(e), n = mt(t, e), r = mt(t.reverse(), e);
|
|
242
|
+
return [n, r];
|
|
243
|
+
}
|
|
244
|
+
function Mt(e) {
|
|
245
|
+
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
246
|
+
acceptNode: (r) => {
|
|
247
|
+
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
248
|
+
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
252
|
+
return t;
|
|
253
|
+
}
|
|
254
|
+
function mt(e, t) {
|
|
255
|
+
for (const n of e)
|
|
256
|
+
if (!_n(n, { upTo: t })) return n;
|
|
257
|
+
}
|
|
258
|
+
function _n(e, { upTo: t }) {
|
|
259
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
260
|
+
for (; e; ) {
|
|
261
|
+
if (t !== void 0 && e === t) return !1;
|
|
262
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
263
|
+
e = e.parentElement;
|
|
264
|
+
}
|
|
265
|
+
return !1;
|
|
266
|
+
}
|
|
267
|
+
function Hn(e) {
|
|
268
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
269
|
+
}
|
|
270
|
+
function K(e, { select: t = !1 } = {}) {
|
|
271
|
+
if (e && e.focus) {
|
|
272
|
+
const n = document.activeElement;
|
|
273
|
+
e.focus({ preventScroll: !0 }), e !== n && Hn(e) && t && e.select();
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
var pt = $n();
|
|
277
|
+
function $n() {
|
|
278
|
+
let e = [];
|
|
279
|
+
return {
|
|
280
|
+
add(t) {
|
|
281
|
+
const n = e[0];
|
|
282
|
+
t !== n && (n == null || n.pause()), e = vt(e, t), e.unshift(t);
|
|
283
|
+
},
|
|
284
|
+
remove(t) {
|
|
285
|
+
var n;
|
|
286
|
+
e = vt(e, t), (n = e[0]) == null || n.resume();
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
function vt(e, t) {
|
|
291
|
+
const n = [...e], r = n.indexOf(t);
|
|
292
|
+
return r !== -1 && n.splice(r, 1), n;
|
|
293
|
+
}
|
|
294
|
+
function Vn(e) {
|
|
295
|
+
return e.filter((t) => t.tagName !== "A");
|
|
296
|
+
}
|
|
297
|
+
var zn = p[" useId ".trim().toString()] || (() => {
|
|
298
|
+
}), Yn = 0;
|
|
299
|
+
function Wo(e) {
|
|
300
|
+
const [t, n] = p.useState(zn());
|
|
301
|
+
return Ve(() => {
|
|
302
|
+
n((r) => r ?? String(Yn++));
|
|
303
|
+
}, [e]), e || (t ? `radix-${t}` : "");
|
|
304
|
+
}
|
|
305
|
+
const Un = ["top", "right", "bottom", "left"], q = Math.min, W = Math.max, Se = Math.round, ge = Math.floor, z = (e) => ({
|
|
306
|
+
x: e,
|
|
307
|
+
y: e
|
|
308
|
+
}), Xn = {
|
|
309
|
+
left: "right",
|
|
310
|
+
right: "left",
|
|
311
|
+
bottom: "top",
|
|
312
|
+
top: "bottom"
|
|
313
|
+
}, jn = {
|
|
314
|
+
start: "end",
|
|
315
|
+
end: "start"
|
|
316
|
+
};
|
|
317
|
+
function Ye(e, t, n) {
|
|
318
|
+
return W(e, q(t, n));
|
|
319
|
+
}
|
|
320
|
+
function X(e, t) {
|
|
321
|
+
return typeof e == "function" ? e(t) : e;
|
|
322
|
+
}
|
|
323
|
+
function j(e) {
|
|
324
|
+
return e.split("-")[0];
|
|
325
|
+
}
|
|
326
|
+
function ae(e) {
|
|
327
|
+
return e.split("-")[1];
|
|
328
|
+
}
|
|
329
|
+
function Ke(e) {
|
|
330
|
+
return e === "x" ? "y" : "x";
|
|
331
|
+
}
|
|
332
|
+
function qe(e) {
|
|
333
|
+
return e === "y" ? "height" : "width";
|
|
334
|
+
}
|
|
335
|
+
function Z(e) {
|
|
336
|
+
return ["top", "bottom"].includes(j(e)) ? "y" : "x";
|
|
337
|
+
}
|
|
338
|
+
function Ze(e) {
|
|
339
|
+
return Ke(Z(e));
|
|
340
|
+
}
|
|
341
|
+
function Kn(e, t, n) {
|
|
342
|
+
n === void 0 && (n = !1);
|
|
343
|
+
const r = ae(e), o = Ze(e), i = qe(o);
|
|
344
|
+
let c = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
345
|
+
return t.reference[i] > t.floating[i] && (c = Re(c)), [c, Re(c)];
|
|
346
|
+
}
|
|
347
|
+
function qn(e) {
|
|
348
|
+
const t = Re(e);
|
|
349
|
+
return [Ue(e), t, Ue(t)];
|
|
350
|
+
}
|
|
351
|
+
function Ue(e) {
|
|
352
|
+
return e.replace(/start|end/g, (t) => jn[t]);
|
|
353
|
+
}
|
|
354
|
+
function Zn(e, t, n) {
|
|
355
|
+
const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], c = ["bottom", "top"];
|
|
356
|
+
switch (e) {
|
|
357
|
+
case "top":
|
|
358
|
+
case "bottom":
|
|
359
|
+
return n ? t ? o : r : t ? r : o;
|
|
360
|
+
case "left":
|
|
361
|
+
case "right":
|
|
362
|
+
return t ? i : c;
|
|
363
|
+
default:
|
|
364
|
+
return [];
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
function Gn(e, t, n, r) {
|
|
368
|
+
const o = ae(e);
|
|
369
|
+
let i = Zn(j(e), n === "start", r);
|
|
370
|
+
return o && (i = i.map((c) => c + "-" + o), t && (i = i.concat(i.map(Ue)))), i;
|
|
371
|
+
}
|
|
372
|
+
function Re(e) {
|
|
373
|
+
return e.replace(/left|right|bottom|top/g, (t) => Xn[t]);
|
|
374
|
+
}
|
|
375
|
+
function Qn(e) {
|
|
376
|
+
return {
|
|
377
|
+
top: 0,
|
|
378
|
+
right: 0,
|
|
379
|
+
bottom: 0,
|
|
380
|
+
left: 0,
|
|
381
|
+
...e
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
function Ft(e) {
|
|
385
|
+
return typeof e != "number" ? Qn(e) : {
|
|
386
|
+
top: e,
|
|
387
|
+
right: e,
|
|
388
|
+
bottom: e,
|
|
389
|
+
left: e
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
function Pe(e) {
|
|
393
|
+
const {
|
|
394
|
+
x: t,
|
|
395
|
+
y: n,
|
|
396
|
+
width: r,
|
|
397
|
+
height: o
|
|
398
|
+
} = e;
|
|
399
|
+
return {
|
|
400
|
+
width: r,
|
|
401
|
+
height: o,
|
|
402
|
+
top: n,
|
|
403
|
+
left: t,
|
|
404
|
+
right: t + r,
|
|
405
|
+
bottom: n + o,
|
|
406
|
+
x: t,
|
|
407
|
+
y: n
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
function gt(e, t, n) {
|
|
411
|
+
let {
|
|
412
|
+
reference: r,
|
|
413
|
+
floating: o
|
|
414
|
+
} = e;
|
|
415
|
+
const i = Z(t), c = Ze(t), s = qe(c), d = j(t), l = i === "y", f = r.x + r.width / 2 - o.width / 2, u = r.y + r.height / 2 - o.height / 2, m = r[s] / 2 - o[s] / 2;
|
|
416
|
+
let h;
|
|
417
|
+
switch (d) {
|
|
418
|
+
case "top":
|
|
419
|
+
h = {
|
|
420
|
+
x: f,
|
|
421
|
+
y: r.y - o.height
|
|
422
|
+
};
|
|
423
|
+
break;
|
|
424
|
+
case "bottom":
|
|
425
|
+
h = {
|
|
426
|
+
x: f,
|
|
427
|
+
y: r.y + r.height
|
|
428
|
+
};
|
|
429
|
+
break;
|
|
430
|
+
case "right":
|
|
431
|
+
h = {
|
|
432
|
+
x: r.x + r.width,
|
|
433
|
+
y: u
|
|
434
|
+
};
|
|
435
|
+
break;
|
|
436
|
+
case "left":
|
|
437
|
+
h = {
|
|
438
|
+
x: r.x - o.width,
|
|
439
|
+
y: u
|
|
440
|
+
};
|
|
441
|
+
break;
|
|
442
|
+
default:
|
|
443
|
+
h = {
|
|
444
|
+
x: r.x,
|
|
445
|
+
y: r.y
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
switch (ae(t)) {
|
|
449
|
+
case "start":
|
|
450
|
+
h[c] -= m * (n && l ? -1 : 1);
|
|
451
|
+
break;
|
|
452
|
+
case "end":
|
|
453
|
+
h[c] += m * (n && l ? -1 : 1);
|
|
454
|
+
break;
|
|
455
|
+
}
|
|
456
|
+
return h;
|
|
457
|
+
}
|
|
458
|
+
const Jn = async (e, t, n) => {
|
|
459
|
+
const {
|
|
460
|
+
placement: r = "bottom",
|
|
461
|
+
strategy: o = "absolute",
|
|
462
|
+
middleware: i = [],
|
|
463
|
+
platform: c
|
|
464
|
+
} = n, s = i.filter(Boolean), d = await (c.isRTL == null ? void 0 : c.isRTL(t));
|
|
465
|
+
let l = await c.getElementRects({
|
|
466
|
+
reference: e,
|
|
467
|
+
floating: t,
|
|
468
|
+
strategy: o
|
|
469
|
+
}), {
|
|
470
|
+
x: f,
|
|
471
|
+
y: u
|
|
472
|
+
} = gt(l, r, d), m = r, h = {}, y = 0;
|
|
473
|
+
for (let a = 0; a < s.length; a++) {
|
|
474
|
+
const {
|
|
475
|
+
name: v,
|
|
476
|
+
fn: g
|
|
477
|
+
} = s[a], {
|
|
478
|
+
x: b,
|
|
479
|
+
y: x,
|
|
480
|
+
data: w,
|
|
481
|
+
reset: E
|
|
482
|
+
} = await g({
|
|
483
|
+
x: f,
|
|
484
|
+
y: u,
|
|
485
|
+
initialPlacement: r,
|
|
486
|
+
placement: m,
|
|
487
|
+
strategy: o,
|
|
488
|
+
middlewareData: h,
|
|
489
|
+
rects: l,
|
|
490
|
+
platform: c,
|
|
491
|
+
elements: {
|
|
492
|
+
reference: e,
|
|
493
|
+
floating: t
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
f = b ?? f, u = x ?? u, h = {
|
|
497
|
+
...h,
|
|
498
|
+
[v]: {
|
|
499
|
+
...h[v],
|
|
500
|
+
...w
|
|
501
|
+
}
|
|
502
|
+
}, E && y <= 50 && (y++, typeof E == "object" && (E.placement && (m = E.placement), E.rects && (l = E.rects === !0 ? await c.getElementRects({
|
|
503
|
+
reference: e,
|
|
504
|
+
floating: t,
|
|
505
|
+
strategy: o
|
|
506
|
+
}) : E.rects), {
|
|
507
|
+
x: f,
|
|
508
|
+
y: u
|
|
509
|
+
} = gt(l, m, d)), a = -1);
|
|
510
|
+
}
|
|
511
|
+
return {
|
|
512
|
+
x: f,
|
|
513
|
+
y: u,
|
|
514
|
+
placement: m,
|
|
515
|
+
strategy: o,
|
|
516
|
+
middlewareData: h
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
async function fe(e, t) {
|
|
520
|
+
var n;
|
|
521
|
+
t === void 0 && (t = {});
|
|
522
|
+
const {
|
|
523
|
+
x: r,
|
|
524
|
+
y: o,
|
|
525
|
+
platform: i,
|
|
526
|
+
rects: c,
|
|
527
|
+
elements: s,
|
|
528
|
+
strategy: d
|
|
529
|
+
} = e, {
|
|
530
|
+
boundary: l = "clippingAncestors",
|
|
531
|
+
rootBoundary: f = "viewport",
|
|
532
|
+
elementContext: u = "floating",
|
|
533
|
+
altBoundary: m = !1,
|
|
534
|
+
padding: h = 0
|
|
535
|
+
} = X(t, e), y = Ft(h), v = s[m ? u === "floating" ? "reference" : "floating" : u], g = Pe(await i.getClippingRect({
|
|
536
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(v))) == null || n ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(s.floating)),
|
|
537
|
+
boundary: l,
|
|
538
|
+
rootBoundary: f,
|
|
539
|
+
strategy: d
|
|
540
|
+
})), b = u === "floating" ? {
|
|
541
|
+
x: r,
|
|
542
|
+
y: o,
|
|
543
|
+
width: c.floating.width,
|
|
544
|
+
height: c.floating.height
|
|
545
|
+
} : c.reference, x = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(s.floating)), w = await (i.isElement == null ? void 0 : i.isElement(x)) ? await (i.getScale == null ? void 0 : i.getScale(x)) || {
|
|
546
|
+
x: 1,
|
|
547
|
+
y: 1
|
|
548
|
+
} : {
|
|
549
|
+
x: 1,
|
|
550
|
+
y: 1
|
|
551
|
+
}, E = Pe(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
552
|
+
elements: s,
|
|
553
|
+
rect: b,
|
|
554
|
+
offsetParent: x,
|
|
555
|
+
strategy: d
|
|
556
|
+
}) : b);
|
|
557
|
+
return {
|
|
558
|
+
top: (g.top - E.top + y.top) / w.y,
|
|
559
|
+
bottom: (E.bottom - g.bottom + y.bottom) / w.y,
|
|
560
|
+
left: (g.left - E.left + y.left) / w.x,
|
|
561
|
+
right: (E.right - g.right + y.right) / w.x
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
const er = (e) => ({
|
|
565
|
+
name: "arrow",
|
|
566
|
+
options: e,
|
|
567
|
+
async fn(t) {
|
|
568
|
+
const {
|
|
569
|
+
x: n,
|
|
570
|
+
y: r,
|
|
571
|
+
placement: o,
|
|
572
|
+
rects: i,
|
|
573
|
+
platform: c,
|
|
574
|
+
elements: s,
|
|
575
|
+
middlewareData: d
|
|
576
|
+
} = t, {
|
|
577
|
+
element: l,
|
|
578
|
+
padding: f = 0
|
|
579
|
+
} = X(e, t) || {};
|
|
580
|
+
if (l == null)
|
|
581
|
+
return {};
|
|
582
|
+
const u = Ft(f), m = {
|
|
583
|
+
x: n,
|
|
584
|
+
y: r
|
|
585
|
+
}, h = Ze(o), y = qe(h), a = await c.getDimensions(l), v = h === "y", g = v ? "top" : "left", b = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", w = i.reference[y] + i.reference[h] - m[h] - i.floating[y], E = m[h] - i.reference[h], A = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(l));
|
|
586
|
+
let C = A ? A[x] : 0;
|
|
587
|
+
(!C || !await (c.isElement == null ? void 0 : c.isElement(A))) && (C = s.floating[x] || i.floating[y]);
|
|
588
|
+
const R = w / 2 - E / 2, L = C / 2 - a[y] / 2 - 1, P = q(u[g], L), F = q(u[b], L), N = P, T = C - a[y] - F, O = C / 2 - a[y] / 2 + R, I = Ye(N, O, T), D = !d.arrow && ae(o) != null && O !== I && i.reference[y] / 2 - (O < N ? P : F) - a[y] / 2 < 0, k = D ? O < N ? O - N : O - T : 0;
|
|
589
|
+
return {
|
|
590
|
+
[h]: m[h] + k,
|
|
591
|
+
data: {
|
|
592
|
+
[h]: I,
|
|
593
|
+
centerOffset: O - I - k,
|
|
594
|
+
...D && {
|
|
595
|
+
alignmentOffset: k
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
reset: D
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
}), tr = function(e) {
|
|
602
|
+
return e === void 0 && (e = {}), {
|
|
603
|
+
name: "flip",
|
|
604
|
+
options: e,
|
|
605
|
+
async fn(t) {
|
|
606
|
+
var n, r;
|
|
607
|
+
const {
|
|
608
|
+
placement: o,
|
|
609
|
+
middlewareData: i,
|
|
610
|
+
rects: c,
|
|
611
|
+
initialPlacement: s,
|
|
612
|
+
platform: d,
|
|
613
|
+
elements: l
|
|
614
|
+
} = t, {
|
|
615
|
+
mainAxis: f = !0,
|
|
616
|
+
crossAxis: u = !0,
|
|
617
|
+
fallbackPlacements: m,
|
|
618
|
+
fallbackStrategy: h = "bestFit",
|
|
619
|
+
fallbackAxisSideDirection: y = "none",
|
|
620
|
+
flipAlignment: a = !0,
|
|
621
|
+
...v
|
|
622
|
+
} = X(e, t);
|
|
623
|
+
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
624
|
+
return {};
|
|
625
|
+
const g = j(o), b = Z(s), x = j(s) === s, w = await (d.isRTL == null ? void 0 : d.isRTL(l.floating)), E = m || (x || !a ? [Re(s)] : qn(s)), A = y !== "none";
|
|
626
|
+
!m && A && E.push(...Gn(s, a, y, w));
|
|
627
|
+
const C = [s, ...E], R = await fe(t, v), L = [];
|
|
628
|
+
let P = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
629
|
+
if (f && L.push(R[g]), u) {
|
|
630
|
+
const O = Kn(o, c, w);
|
|
631
|
+
L.push(R[O[0]], R[O[1]]);
|
|
632
|
+
}
|
|
633
|
+
if (P = [...P, {
|
|
634
|
+
placement: o,
|
|
635
|
+
overflows: L
|
|
636
|
+
}], !L.every((O) => O <= 0)) {
|
|
637
|
+
var F, N;
|
|
638
|
+
const O = (((F = i.flip) == null ? void 0 : F.index) || 0) + 1, I = C[O];
|
|
639
|
+
if (I)
|
|
640
|
+
return {
|
|
641
|
+
data: {
|
|
642
|
+
index: O,
|
|
643
|
+
overflows: P
|
|
644
|
+
},
|
|
645
|
+
reset: {
|
|
646
|
+
placement: I
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
let D = (N = P.filter((k) => k.overflows[0] <= 0).sort((k, S) => k.overflows[1] - S.overflows[1])[0]) == null ? void 0 : N.placement;
|
|
650
|
+
if (!D)
|
|
651
|
+
switch (h) {
|
|
652
|
+
case "bestFit": {
|
|
653
|
+
var T;
|
|
654
|
+
const k = (T = P.filter((S) => {
|
|
655
|
+
if (A) {
|
|
656
|
+
const M = Z(S.placement);
|
|
657
|
+
return M === b || // Create a bias to the `y` side axis due to horizontal
|
|
658
|
+
// reading directions favoring greater width.
|
|
659
|
+
M === "y";
|
|
660
|
+
}
|
|
661
|
+
return !0;
|
|
662
|
+
}).map((S) => [S.placement, S.overflows.filter((M) => M > 0).reduce((M, V) => M + V, 0)]).sort((S, M) => S[1] - M[1])[0]) == null ? void 0 : T[0];
|
|
663
|
+
k && (D = k);
|
|
664
|
+
break;
|
|
665
|
+
}
|
|
666
|
+
case "initialPlacement":
|
|
667
|
+
D = s;
|
|
668
|
+
break;
|
|
669
|
+
}
|
|
670
|
+
if (o !== D)
|
|
671
|
+
return {
|
|
672
|
+
reset: {
|
|
673
|
+
placement: D
|
|
674
|
+
}
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
return {};
|
|
678
|
+
}
|
|
679
|
+
};
|
|
680
|
+
};
|
|
681
|
+
function yt(e, t) {
|
|
682
|
+
return {
|
|
683
|
+
top: e.top - t.height,
|
|
684
|
+
right: e.right - t.width,
|
|
685
|
+
bottom: e.bottom - t.height,
|
|
686
|
+
left: e.left - t.width
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
function wt(e) {
|
|
690
|
+
return Un.some((t) => e[t] >= 0);
|
|
691
|
+
}
|
|
692
|
+
const nr = function(e) {
|
|
693
|
+
return e === void 0 && (e = {}), {
|
|
694
|
+
name: "hide",
|
|
695
|
+
options: e,
|
|
696
|
+
async fn(t) {
|
|
697
|
+
const {
|
|
698
|
+
rects: n
|
|
699
|
+
} = t, {
|
|
700
|
+
strategy: r = "referenceHidden",
|
|
701
|
+
...o
|
|
702
|
+
} = X(e, t);
|
|
703
|
+
switch (r) {
|
|
704
|
+
case "referenceHidden": {
|
|
705
|
+
const i = await fe(t, {
|
|
706
|
+
...o,
|
|
707
|
+
elementContext: "reference"
|
|
708
|
+
}), c = yt(i, n.reference);
|
|
709
|
+
return {
|
|
710
|
+
data: {
|
|
711
|
+
referenceHiddenOffsets: c,
|
|
712
|
+
referenceHidden: wt(c)
|
|
713
|
+
}
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
case "escaped": {
|
|
717
|
+
const i = await fe(t, {
|
|
718
|
+
...o,
|
|
719
|
+
altBoundary: !0
|
|
720
|
+
}), c = yt(i, n.floating);
|
|
721
|
+
return {
|
|
722
|
+
data: {
|
|
723
|
+
escapedOffsets: c,
|
|
724
|
+
escaped: wt(c)
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
default:
|
|
729
|
+
return {};
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
};
|
|
734
|
+
async function rr(e, t) {
|
|
735
|
+
const {
|
|
736
|
+
placement: n,
|
|
737
|
+
platform: r,
|
|
738
|
+
elements: o
|
|
739
|
+
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), c = j(n), s = ae(n), d = Z(n) === "y", l = ["left", "top"].includes(c) ? -1 : 1, f = i && d ? -1 : 1, u = X(t, e);
|
|
740
|
+
let {
|
|
741
|
+
mainAxis: m,
|
|
742
|
+
crossAxis: h,
|
|
743
|
+
alignmentAxis: y
|
|
744
|
+
} = typeof u == "number" ? {
|
|
745
|
+
mainAxis: u,
|
|
746
|
+
crossAxis: 0,
|
|
747
|
+
alignmentAxis: null
|
|
748
|
+
} : {
|
|
749
|
+
mainAxis: u.mainAxis || 0,
|
|
750
|
+
crossAxis: u.crossAxis || 0,
|
|
751
|
+
alignmentAxis: u.alignmentAxis
|
|
752
|
+
};
|
|
753
|
+
return s && typeof y == "number" && (h = s === "end" ? y * -1 : y), d ? {
|
|
754
|
+
x: h * f,
|
|
755
|
+
y: m * l
|
|
756
|
+
} : {
|
|
757
|
+
x: m * l,
|
|
758
|
+
y: h * f
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
const or = function(e) {
|
|
762
|
+
return e === void 0 && (e = 0), {
|
|
763
|
+
name: "offset",
|
|
764
|
+
options: e,
|
|
765
|
+
async fn(t) {
|
|
766
|
+
var n, r;
|
|
767
|
+
const {
|
|
768
|
+
x: o,
|
|
769
|
+
y: i,
|
|
770
|
+
placement: c,
|
|
771
|
+
middlewareData: s
|
|
772
|
+
} = t, d = await rr(t, e);
|
|
773
|
+
return c === ((n = s.offset) == null ? void 0 : n.placement) && (r = s.arrow) != null && r.alignmentOffset ? {} : {
|
|
774
|
+
x: o + d.x,
|
|
775
|
+
y: i + d.y,
|
|
776
|
+
data: {
|
|
777
|
+
...d,
|
|
778
|
+
placement: c
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
}, ir = function(e) {
|
|
784
|
+
return e === void 0 && (e = {}), {
|
|
785
|
+
name: "shift",
|
|
786
|
+
options: e,
|
|
787
|
+
async fn(t) {
|
|
788
|
+
const {
|
|
789
|
+
x: n,
|
|
790
|
+
y: r,
|
|
791
|
+
placement: o
|
|
792
|
+
} = t, {
|
|
793
|
+
mainAxis: i = !0,
|
|
794
|
+
crossAxis: c = !1,
|
|
795
|
+
limiter: s = {
|
|
796
|
+
fn: (v) => {
|
|
797
|
+
let {
|
|
798
|
+
x: g,
|
|
799
|
+
y: b
|
|
800
|
+
} = v;
|
|
801
|
+
return {
|
|
802
|
+
x: g,
|
|
803
|
+
y: b
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
...d
|
|
808
|
+
} = X(e, t), l = {
|
|
809
|
+
x: n,
|
|
810
|
+
y: r
|
|
811
|
+
}, f = await fe(t, d), u = Z(j(o)), m = Ke(u);
|
|
812
|
+
let h = l[m], y = l[u];
|
|
813
|
+
if (i) {
|
|
814
|
+
const v = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", b = h + f[v], x = h - f[g];
|
|
815
|
+
h = Ye(b, h, x);
|
|
816
|
+
}
|
|
817
|
+
if (c) {
|
|
818
|
+
const v = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", b = y + f[v], x = y - f[g];
|
|
819
|
+
y = Ye(b, y, x);
|
|
820
|
+
}
|
|
821
|
+
const a = s.fn({
|
|
822
|
+
...t,
|
|
823
|
+
[m]: h,
|
|
824
|
+
[u]: y
|
|
825
|
+
});
|
|
826
|
+
return {
|
|
827
|
+
...a,
|
|
828
|
+
data: {
|
|
829
|
+
x: a.x - n,
|
|
830
|
+
y: a.y - r,
|
|
831
|
+
enabled: {
|
|
832
|
+
[m]: i,
|
|
833
|
+
[u]: c
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
};
|
|
839
|
+
}, sr = function(e) {
|
|
840
|
+
return e === void 0 && (e = {}), {
|
|
841
|
+
options: e,
|
|
842
|
+
fn(t) {
|
|
843
|
+
const {
|
|
844
|
+
x: n,
|
|
845
|
+
y: r,
|
|
846
|
+
placement: o,
|
|
847
|
+
rects: i,
|
|
848
|
+
middlewareData: c
|
|
849
|
+
} = t, {
|
|
850
|
+
offset: s = 0,
|
|
851
|
+
mainAxis: d = !0,
|
|
852
|
+
crossAxis: l = !0
|
|
853
|
+
} = X(e, t), f = {
|
|
854
|
+
x: n,
|
|
855
|
+
y: r
|
|
856
|
+
}, u = Z(o), m = Ke(u);
|
|
857
|
+
let h = f[m], y = f[u];
|
|
858
|
+
const a = X(s, t), v = typeof a == "number" ? {
|
|
859
|
+
mainAxis: a,
|
|
860
|
+
crossAxis: 0
|
|
861
|
+
} : {
|
|
862
|
+
mainAxis: 0,
|
|
863
|
+
crossAxis: 0,
|
|
864
|
+
...a
|
|
865
|
+
};
|
|
866
|
+
if (d) {
|
|
867
|
+
const x = m === "y" ? "height" : "width", w = i.reference[m] - i.floating[x] + v.mainAxis, E = i.reference[m] + i.reference[x] - v.mainAxis;
|
|
868
|
+
h < w ? h = w : h > E && (h = E);
|
|
869
|
+
}
|
|
870
|
+
if (l) {
|
|
871
|
+
var g, b;
|
|
872
|
+
const x = m === "y" ? "width" : "height", w = ["top", "left"].includes(j(o)), E = i.reference[u] - i.floating[x] + (w && ((g = c.offset) == null ? void 0 : g[u]) || 0) + (w ? 0 : v.crossAxis), A = i.reference[u] + i.reference[x] + (w ? 0 : ((b = c.offset) == null ? void 0 : b[u]) || 0) - (w ? v.crossAxis : 0);
|
|
873
|
+
y < E ? y = E : y > A && (y = A);
|
|
874
|
+
}
|
|
875
|
+
return {
|
|
876
|
+
[m]: h,
|
|
877
|
+
[u]: y
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
}, cr = function(e) {
|
|
882
|
+
return e === void 0 && (e = {}), {
|
|
883
|
+
name: "size",
|
|
884
|
+
options: e,
|
|
885
|
+
async fn(t) {
|
|
886
|
+
var n, r;
|
|
887
|
+
const {
|
|
888
|
+
placement: o,
|
|
889
|
+
rects: i,
|
|
890
|
+
platform: c,
|
|
891
|
+
elements: s
|
|
892
|
+
} = t, {
|
|
893
|
+
apply: d = () => {
|
|
894
|
+
},
|
|
895
|
+
...l
|
|
896
|
+
} = X(e, t), f = await fe(t, l), u = j(o), m = ae(o), h = Z(o) === "y", {
|
|
897
|
+
width: y,
|
|
898
|
+
height: a
|
|
899
|
+
} = i.floating;
|
|
900
|
+
let v, g;
|
|
901
|
+
u === "top" || u === "bottom" ? (v = u, g = m === (await (c.isRTL == null ? void 0 : c.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (g = u, v = m === "end" ? "top" : "bottom");
|
|
902
|
+
const b = a - f.top - f.bottom, x = y - f.left - f.right, w = q(a - f[v], b), E = q(y - f[g], x), A = !t.middlewareData.shift;
|
|
903
|
+
let C = w, R = E;
|
|
904
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = x), (r = t.middlewareData.shift) != null && r.enabled.y && (C = b), A && !m) {
|
|
905
|
+
const P = W(f.left, 0), F = W(f.right, 0), N = W(f.top, 0), T = W(f.bottom, 0);
|
|
906
|
+
h ? R = y - 2 * (P !== 0 || F !== 0 ? P + F : W(f.left, f.right)) : C = a - 2 * (N !== 0 || T !== 0 ? N + T : W(f.top, f.bottom));
|
|
907
|
+
}
|
|
908
|
+
await d({
|
|
909
|
+
...t,
|
|
910
|
+
availableWidth: R,
|
|
911
|
+
availableHeight: C
|
|
912
|
+
});
|
|
913
|
+
const L = await c.getDimensions(s.floating);
|
|
914
|
+
return y !== L.width || a !== L.height ? {
|
|
915
|
+
reset: {
|
|
916
|
+
rects: !0
|
|
917
|
+
}
|
|
918
|
+
} : {};
|
|
919
|
+
}
|
|
920
|
+
};
|
|
921
|
+
};
|
|
922
|
+
function Le() {
|
|
923
|
+
return typeof window < "u";
|
|
924
|
+
}
|
|
925
|
+
function le(e) {
|
|
926
|
+
return Nt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
927
|
+
}
|
|
928
|
+
function B(e) {
|
|
929
|
+
var t;
|
|
930
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
931
|
+
}
|
|
932
|
+
function U(e) {
|
|
933
|
+
var t;
|
|
934
|
+
return (t = (Nt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
935
|
+
}
|
|
936
|
+
function Nt(e) {
|
|
937
|
+
return Le() ? e instanceof Node || e instanceof B(e).Node : !1;
|
|
938
|
+
}
|
|
939
|
+
function H(e) {
|
|
940
|
+
return Le() ? e instanceof Element || e instanceof B(e).Element : !1;
|
|
941
|
+
}
|
|
942
|
+
function Y(e) {
|
|
943
|
+
return Le() ? e instanceof HTMLElement || e instanceof B(e).HTMLElement : !1;
|
|
944
|
+
}
|
|
945
|
+
function xt(e) {
|
|
946
|
+
return !Le() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof B(e).ShadowRoot;
|
|
947
|
+
}
|
|
948
|
+
function me(e) {
|
|
949
|
+
const {
|
|
950
|
+
overflow: t,
|
|
951
|
+
overflowX: n,
|
|
952
|
+
overflowY: r,
|
|
953
|
+
display: o
|
|
954
|
+
} = $(e);
|
|
955
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
|
|
956
|
+
}
|
|
957
|
+
function ar(e) {
|
|
958
|
+
return ["table", "td", "th"].includes(le(e));
|
|
959
|
+
}
|
|
960
|
+
function Te(e) {
|
|
961
|
+
return [":popover-open", ":modal"].some((t) => {
|
|
962
|
+
try {
|
|
963
|
+
return e.matches(t);
|
|
964
|
+
} catch {
|
|
965
|
+
return !1;
|
|
966
|
+
}
|
|
967
|
+
});
|
|
968
|
+
}
|
|
969
|
+
function Ge(e) {
|
|
970
|
+
const t = Qe(), n = H(e) ? $(e) : e;
|
|
971
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
|
|
972
|
+
}
|
|
973
|
+
function lr(e) {
|
|
974
|
+
let t = G(e);
|
|
975
|
+
for (; Y(t) && !se(t); ) {
|
|
976
|
+
if (Ge(t))
|
|
977
|
+
return t;
|
|
978
|
+
if (Te(t))
|
|
979
|
+
return null;
|
|
980
|
+
t = G(t);
|
|
981
|
+
}
|
|
982
|
+
return null;
|
|
983
|
+
}
|
|
984
|
+
function Qe() {
|
|
985
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
986
|
+
}
|
|
987
|
+
function se(e) {
|
|
988
|
+
return ["html", "body", "#document"].includes(le(e));
|
|
989
|
+
}
|
|
990
|
+
function $(e) {
|
|
991
|
+
return B(e).getComputedStyle(e);
|
|
992
|
+
}
|
|
993
|
+
function De(e) {
|
|
994
|
+
return H(e) ? {
|
|
995
|
+
scrollLeft: e.scrollLeft,
|
|
996
|
+
scrollTop: e.scrollTop
|
|
997
|
+
} : {
|
|
998
|
+
scrollLeft: e.scrollX,
|
|
999
|
+
scrollTop: e.scrollY
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
1002
|
+
function G(e) {
|
|
1003
|
+
if (le(e) === "html")
|
|
1004
|
+
return e;
|
|
1005
|
+
const t = (
|
|
1006
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
1007
|
+
e.assignedSlot || // DOM Element detected.
|
|
1008
|
+
e.parentNode || // ShadowRoot detected.
|
|
1009
|
+
xt(e) && e.host || // Fallback.
|
|
1010
|
+
U(e)
|
|
1011
|
+
);
|
|
1012
|
+
return xt(t) ? t.host : t;
|
|
1013
|
+
}
|
|
1014
|
+
function Wt(e) {
|
|
1015
|
+
const t = G(e);
|
|
1016
|
+
return se(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Y(t) && me(t) ? t : Wt(t);
|
|
1017
|
+
}
|
|
1018
|
+
function de(e, t, n) {
|
|
1019
|
+
var r;
|
|
1020
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1021
|
+
const o = Wt(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), c = B(o);
|
|
1022
|
+
if (i) {
|
|
1023
|
+
const s = Xe(c);
|
|
1024
|
+
return t.concat(c, c.visualViewport || [], me(o) ? o : [], s && n ? de(s) : []);
|
|
1025
|
+
}
|
|
1026
|
+
return t.concat(o, de(o, [], n));
|
|
1027
|
+
}
|
|
1028
|
+
function Xe(e) {
|
|
1029
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1030
|
+
}
|
|
1031
|
+
function Bt(e) {
|
|
1032
|
+
const t = $(e);
|
|
1033
|
+
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1034
|
+
const o = Y(e), i = o ? e.offsetWidth : n, c = o ? e.offsetHeight : r, s = Se(n) !== i || Se(r) !== c;
|
|
1035
|
+
return s && (n = i, r = c), {
|
|
1036
|
+
width: n,
|
|
1037
|
+
height: r,
|
|
1038
|
+
$: s
|
|
1039
|
+
};
|
|
1040
|
+
}
|
|
1041
|
+
function Je(e) {
|
|
1042
|
+
return H(e) ? e : e.contextElement;
|
|
1043
|
+
}
|
|
1044
|
+
function re(e) {
|
|
1045
|
+
const t = Je(e);
|
|
1046
|
+
if (!Y(t))
|
|
1047
|
+
return z(1);
|
|
1048
|
+
const n = t.getBoundingClientRect(), {
|
|
1049
|
+
width: r,
|
|
1050
|
+
height: o,
|
|
1051
|
+
$: i
|
|
1052
|
+
} = Bt(t);
|
|
1053
|
+
let c = (i ? Se(n.width) : n.width) / r, s = (i ? Se(n.height) : n.height) / o;
|
|
1054
|
+
return (!c || !Number.isFinite(c)) && (c = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
1055
|
+
x: c,
|
|
1056
|
+
y: s
|
|
1057
|
+
};
|
|
1058
|
+
}
|
|
1059
|
+
const ur = /* @__PURE__ */ z(0);
|
|
1060
|
+
function It(e) {
|
|
1061
|
+
const t = B(e);
|
|
1062
|
+
return !Qe() || !t.visualViewport ? ur : {
|
|
1063
|
+
x: t.visualViewport.offsetLeft,
|
|
1064
|
+
y: t.visualViewport.offsetTop
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
function fr(e, t, n) {
|
|
1068
|
+
return t === void 0 && (t = !1), !n || t && n !== B(e) ? !1 : t;
|
|
1069
|
+
}
|
|
1070
|
+
function J(e, t, n, r) {
|
|
1071
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1072
|
+
const o = e.getBoundingClientRect(), i = Je(e);
|
|
1073
|
+
let c = z(1);
|
|
1074
|
+
t && (r ? H(r) && (c = re(r)) : c = re(e));
|
|
1075
|
+
const s = fr(i, n, r) ? It(i) : z(0);
|
|
1076
|
+
let d = (o.left + s.x) / c.x, l = (o.top + s.y) / c.y, f = o.width / c.x, u = o.height / c.y;
|
|
1077
|
+
if (i) {
|
|
1078
|
+
const m = B(i), h = r && H(r) ? B(r) : r;
|
|
1079
|
+
let y = m, a = Xe(y);
|
|
1080
|
+
for (; a && r && h !== y; ) {
|
|
1081
|
+
const v = re(a), g = a.getBoundingClientRect(), b = $(a), x = g.left + (a.clientLeft + parseFloat(b.paddingLeft)) * v.x, w = g.top + (a.clientTop + parseFloat(b.paddingTop)) * v.y;
|
|
1082
|
+
d *= v.x, l *= v.y, f *= v.x, u *= v.y, d += x, l += w, y = B(a), a = Xe(y);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
return Pe({
|
|
1086
|
+
width: f,
|
|
1087
|
+
height: u,
|
|
1088
|
+
x: d,
|
|
1089
|
+
y: l
|
|
1090
|
+
});
|
|
1091
|
+
}
|
|
1092
|
+
function et(e, t) {
|
|
1093
|
+
const n = De(e).scrollLeft;
|
|
1094
|
+
return t ? t.left + n : J(U(e)).left + n;
|
|
1095
|
+
}
|
|
1096
|
+
function _t(e, t, n) {
|
|
1097
|
+
n === void 0 && (n = !1);
|
|
1098
|
+
const r = e.getBoundingClientRect(), o = r.left + t.scrollLeft - (n ? 0 : (
|
|
1099
|
+
// RTL <body> scrollbar.
|
|
1100
|
+
et(e, r)
|
|
1101
|
+
)), i = r.top + t.scrollTop;
|
|
1102
|
+
return {
|
|
1103
|
+
x: o,
|
|
1104
|
+
y: i
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
function dr(e) {
|
|
1108
|
+
let {
|
|
1109
|
+
elements: t,
|
|
1110
|
+
rect: n,
|
|
1111
|
+
offsetParent: r,
|
|
1112
|
+
strategy: o
|
|
1113
|
+
} = e;
|
|
1114
|
+
const i = o === "fixed", c = U(r), s = t ? Te(t.floating) : !1;
|
|
1115
|
+
if (r === c || s && i)
|
|
1116
|
+
return n;
|
|
1117
|
+
let d = {
|
|
1118
|
+
scrollLeft: 0,
|
|
1119
|
+
scrollTop: 0
|
|
1120
|
+
}, l = z(1);
|
|
1121
|
+
const f = z(0), u = Y(r);
|
|
1122
|
+
if ((u || !u && !i) && ((le(r) !== "body" || me(c)) && (d = De(r)), Y(r))) {
|
|
1123
|
+
const h = J(r);
|
|
1124
|
+
l = re(r), f.x = h.x + r.clientLeft, f.y = h.y + r.clientTop;
|
|
1125
|
+
}
|
|
1126
|
+
const m = c && !u && !i ? _t(c, d, !0) : z(0);
|
|
1127
|
+
return {
|
|
1128
|
+
width: n.width * l.x,
|
|
1129
|
+
height: n.height * l.y,
|
|
1130
|
+
x: n.x * l.x - d.scrollLeft * l.x + f.x + m.x,
|
|
1131
|
+
y: n.y * l.y - d.scrollTop * l.y + f.y + m.y
|
|
1132
|
+
};
|
|
1133
|
+
}
|
|
1134
|
+
function hr(e) {
|
|
1135
|
+
return Array.from(e.getClientRects());
|
|
1136
|
+
}
|
|
1137
|
+
function mr(e) {
|
|
1138
|
+
const t = U(e), n = De(e), r = e.ownerDocument.body, o = W(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = W(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1139
|
+
let c = -n.scrollLeft + et(e);
|
|
1140
|
+
const s = -n.scrollTop;
|
|
1141
|
+
return $(r).direction === "rtl" && (c += W(t.clientWidth, r.clientWidth) - o), {
|
|
1142
|
+
width: o,
|
|
1143
|
+
height: i,
|
|
1144
|
+
x: c,
|
|
1145
|
+
y: s
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1148
|
+
function pr(e, t) {
|
|
1149
|
+
const n = B(e), r = U(e), o = n.visualViewport;
|
|
1150
|
+
let i = r.clientWidth, c = r.clientHeight, s = 0, d = 0;
|
|
1151
|
+
if (o) {
|
|
1152
|
+
i = o.width, c = o.height;
|
|
1153
|
+
const l = Qe();
|
|
1154
|
+
(!l || l && t === "fixed") && (s = o.offsetLeft, d = o.offsetTop);
|
|
1155
|
+
}
|
|
1156
|
+
return {
|
|
1157
|
+
width: i,
|
|
1158
|
+
height: c,
|
|
1159
|
+
x: s,
|
|
1160
|
+
y: d
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
function vr(e, t) {
|
|
1164
|
+
const n = J(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = Y(e) ? re(e) : z(1), c = e.clientWidth * i.x, s = e.clientHeight * i.y, d = o * i.x, l = r * i.y;
|
|
1165
|
+
return {
|
|
1166
|
+
width: c,
|
|
1167
|
+
height: s,
|
|
1168
|
+
x: d,
|
|
1169
|
+
y: l
|
|
1170
|
+
};
|
|
1171
|
+
}
|
|
1172
|
+
function bt(e, t, n) {
|
|
1173
|
+
let r;
|
|
1174
|
+
if (t === "viewport")
|
|
1175
|
+
r = pr(e, n);
|
|
1176
|
+
else if (t === "document")
|
|
1177
|
+
r = mr(U(e));
|
|
1178
|
+
else if (H(t))
|
|
1179
|
+
r = vr(t, n);
|
|
1180
|
+
else {
|
|
1181
|
+
const o = It(e);
|
|
1182
|
+
r = {
|
|
1183
|
+
x: t.x - o.x,
|
|
1184
|
+
y: t.y - o.y,
|
|
1185
|
+
width: t.width,
|
|
1186
|
+
height: t.height
|
|
1187
|
+
};
|
|
1188
|
+
}
|
|
1189
|
+
return Pe(r);
|
|
1190
|
+
}
|
|
1191
|
+
function Ht(e, t) {
|
|
1192
|
+
const n = G(e);
|
|
1193
|
+
return n === t || !H(n) || se(n) ? !1 : $(n).position === "fixed" || Ht(n, t);
|
|
1194
|
+
}
|
|
1195
|
+
function gr(e, t) {
|
|
1196
|
+
const n = t.get(e);
|
|
1197
|
+
if (n)
|
|
1198
|
+
return n;
|
|
1199
|
+
let r = de(e, [], !1).filter((s) => H(s) && le(s) !== "body"), o = null;
|
|
1200
|
+
const i = $(e).position === "fixed";
|
|
1201
|
+
let c = i ? G(e) : e;
|
|
1202
|
+
for (; H(c) && !se(c); ) {
|
|
1203
|
+
const s = $(c), d = Ge(c);
|
|
1204
|
+
!d && s.position === "fixed" && (o = null), (i ? !d && !o : !d && s.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || me(c) && !d && Ht(e, c)) ? r = r.filter((f) => f !== c) : o = s, c = G(c);
|
|
1205
|
+
}
|
|
1206
|
+
return t.set(e, r), r;
|
|
1207
|
+
}
|
|
1208
|
+
function yr(e) {
|
|
1209
|
+
let {
|
|
1210
|
+
element: t,
|
|
1211
|
+
boundary: n,
|
|
1212
|
+
rootBoundary: r,
|
|
1213
|
+
strategy: o
|
|
1214
|
+
} = e;
|
|
1215
|
+
const c = [...n === "clippingAncestors" ? Te(t) ? [] : gr(t, this._c) : [].concat(n), r], s = c[0], d = c.reduce((l, f) => {
|
|
1216
|
+
const u = bt(t, f, o);
|
|
1217
|
+
return l.top = W(u.top, l.top), l.right = q(u.right, l.right), l.bottom = q(u.bottom, l.bottom), l.left = W(u.left, l.left), l;
|
|
1218
|
+
}, bt(t, s, o));
|
|
1219
|
+
return {
|
|
1220
|
+
width: d.right - d.left,
|
|
1221
|
+
height: d.bottom - d.top,
|
|
1222
|
+
x: d.left,
|
|
1223
|
+
y: d.top
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
function wr(e) {
|
|
1227
|
+
const {
|
|
1228
|
+
width: t,
|
|
1229
|
+
height: n
|
|
1230
|
+
} = Bt(e);
|
|
1231
|
+
return {
|
|
1232
|
+
width: t,
|
|
1233
|
+
height: n
|
|
1234
|
+
};
|
|
1235
|
+
}
|
|
1236
|
+
function xr(e, t, n) {
|
|
1237
|
+
const r = Y(t), o = U(t), i = n === "fixed", c = J(e, !0, i, t);
|
|
1238
|
+
let s = {
|
|
1239
|
+
scrollLeft: 0,
|
|
1240
|
+
scrollTop: 0
|
|
1241
|
+
};
|
|
1242
|
+
const d = z(0);
|
|
1243
|
+
if (r || !r && !i)
|
|
1244
|
+
if ((le(t) !== "body" || me(o)) && (s = De(t)), r) {
|
|
1245
|
+
const m = J(t, !0, i, t);
|
|
1246
|
+
d.x = m.x + t.clientLeft, d.y = m.y + t.clientTop;
|
|
1247
|
+
} else o && (d.x = et(o));
|
|
1248
|
+
const l = o && !r && !i ? _t(o, s) : z(0), f = c.left + s.scrollLeft - d.x - l.x, u = c.top + s.scrollTop - d.y - l.y;
|
|
1249
|
+
return {
|
|
1250
|
+
x: f,
|
|
1251
|
+
y: u,
|
|
1252
|
+
width: c.width,
|
|
1253
|
+
height: c.height
|
|
1254
|
+
};
|
|
1255
|
+
}
|
|
1256
|
+
function Be(e) {
|
|
1257
|
+
return $(e).position === "static";
|
|
1258
|
+
}
|
|
1259
|
+
function Et(e, t) {
|
|
1260
|
+
if (!Y(e) || $(e).position === "fixed")
|
|
1261
|
+
return null;
|
|
1262
|
+
if (t)
|
|
1263
|
+
return t(e);
|
|
1264
|
+
let n = e.offsetParent;
|
|
1265
|
+
return U(e) === n && (n = n.ownerDocument.body), n;
|
|
1266
|
+
}
|
|
1267
|
+
function $t(e, t) {
|
|
1268
|
+
const n = B(e);
|
|
1269
|
+
if (Te(e))
|
|
1270
|
+
return n;
|
|
1271
|
+
if (!Y(e)) {
|
|
1272
|
+
let o = G(e);
|
|
1273
|
+
for (; o && !se(o); ) {
|
|
1274
|
+
if (H(o) && !Be(o))
|
|
1275
|
+
return o;
|
|
1276
|
+
o = G(o);
|
|
1277
|
+
}
|
|
1278
|
+
return n;
|
|
1279
|
+
}
|
|
1280
|
+
let r = Et(e, t);
|
|
1281
|
+
for (; r && ar(r) && Be(r); )
|
|
1282
|
+
r = Et(r, t);
|
|
1283
|
+
return r && se(r) && Be(r) && !Ge(r) ? n : r || lr(e) || n;
|
|
1284
|
+
}
|
|
1285
|
+
const br = async function(e) {
|
|
1286
|
+
const t = this.getOffsetParent || $t, n = this.getDimensions, r = await n(e.floating);
|
|
1287
|
+
return {
|
|
1288
|
+
reference: xr(e.reference, await t(e.floating), e.strategy),
|
|
1289
|
+
floating: {
|
|
1290
|
+
x: 0,
|
|
1291
|
+
y: 0,
|
|
1292
|
+
width: r.width,
|
|
1293
|
+
height: r.height
|
|
1294
|
+
}
|
|
1295
|
+
};
|
|
1296
|
+
};
|
|
1297
|
+
function Er(e) {
|
|
1298
|
+
return $(e).direction === "rtl";
|
|
1299
|
+
}
|
|
1300
|
+
const Cr = {
|
|
1301
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: dr,
|
|
1302
|
+
getDocumentElement: U,
|
|
1303
|
+
getClippingRect: yr,
|
|
1304
|
+
getOffsetParent: $t,
|
|
1305
|
+
getElementRects: br,
|
|
1306
|
+
getClientRects: hr,
|
|
1307
|
+
getDimensions: wr,
|
|
1308
|
+
getScale: re,
|
|
1309
|
+
isElement: H,
|
|
1310
|
+
isRTL: Er
|
|
1311
|
+
};
|
|
1312
|
+
function Vt(e, t) {
|
|
1313
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1314
|
+
}
|
|
1315
|
+
function Ar(e, t) {
|
|
1316
|
+
let n = null, r;
|
|
1317
|
+
const o = U(e);
|
|
1318
|
+
function i() {
|
|
1319
|
+
var s;
|
|
1320
|
+
clearTimeout(r), (s = n) == null || s.disconnect(), n = null;
|
|
1321
|
+
}
|
|
1322
|
+
function c(s, d) {
|
|
1323
|
+
s === void 0 && (s = !1), d === void 0 && (d = 1), i();
|
|
1324
|
+
const l = e.getBoundingClientRect(), {
|
|
1325
|
+
left: f,
|
|
1326
|
+
top: u,
|
|
1327
|
+
width: m,
|
|
1328
|
+
height: h
|
|
1329
|
+
} = l;
|
|
1330
|
+
if (s || t(), !m || !h)
|
|
1331
|
+
return;
|
|
1332
|
+
const y = ge(u), a = ge(o.clientWidth - (f + m)), v = ge(o.clientHeight - (u + h)), g = ge(f), x = {
|
|
1333
|
+
rootMargin: -y + "px " + -a + "px " + -v + "px " + -g + "px",
|
|
1334
|
+
threshold: W(0, q(1, d)) || 1
|
|
1335
|
+
};
|
|
1336
|
+
let w = !0;
|
|
1337
|
+
function E(A) {
|
|
1338
|
+
const C = A[0].intersectionRatio;
|
|
1339
|
+
if (C !== d) {
|
|
1340
|
+
if (!w)
|
|
1341
|
+
return c();
|
|
1342
|
+
C ? c(!1, C) : r = setTimeout(() => {
|
|
1343
|
+
c(!1, 1e-7);
|
|
1344
|
+
}, 1e3);
|
|
1345
|
+
}
|
|
1346
|
+
C === 1 && !Vt(l, e.getBoundingClientRect()) && c(), w = !1;
|
|
1347
|
+
}
|
|
1348
|
+
try {
|
|
1349
|
+
n = new IntersectionObserver(E, {
|
|
1350
|
+
...x,
|
|
1351
|
+
// Handle <iframe>s
|
|
1352
|
+
root: o.ownerDocument
|
|
1353
|
+
});
|
|
1354
|
+
} catch {
|
|
1355
|
+
n = new IntersectionObserver(E, x);
|
|
1356
|
+
}
|
|
1357
|
+
n.observe(e);
|
|
1358
|
+
}
|
|
1359
|
+
return c(!0), i;
|
|
1360
|
+
}
|
|
1361
|
+
function Sr(e, t, n, r) {
|
|
1362
|
+
r === void 0 && (r = {});
|
|
1363
|
+
const {
|
|
1364
|
+
ancestorScroll: o = !0,
|
|
1365
|
+
ancestorResize: i = !0,
|
|
1366
|
+
elementResize: c = typeof ResizeObserver == "function",
|
|
1367
|
+
layoutShift: s = typeof IntersectionObserver == "function",
|
|
1368
|
+
animationFrame: d = !1
|
|
1369
|
+
} = r, l = Je(e), f = o || i ? [...l ? de(l) : [], ...de(t)] : [];
|
|
1370
|
+
f.forEach((g) => {
|
|
1371
|
+
o && g.addEventListener("scroll", n, {
|
|
1372
|
+
passive: !0
|
|
1373
|
+
}), i && g.addEventListener("resize", n);
|
|
1374
|
+
});
|
|
1375
|
+
const u = l && s ? Ar(l, n) : null;
|
|
1376
|
+
let m = -1, h = null;
|
|
1377
|
+
c && (h = new ResizeObserver((g) => {
|
|
1378
|
+
let [b] = g;
|
|
1379
|
+
b && b.target === l && h && (h.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1380
|
+
var x;
|
|
1381
|
+
(x = h) == null || x.observe(t);
|
|
1382
|
+
})), n();
|
|
1383
|
+
}), l && !d && h.observe(l), h.observe(t));
|
|
1384
|
+
let y, a = d ? J(e) : null;
|
|
1385
|
+
d && v();
|
|
1386
|
+
function v() {
|
|
1387
|
+
const g = J(e);
|
|
1388
|
+
a && !Vt(a, g) && n(), a = g, y = requestAnimationFrame(v);
|
|
1389
|
+
}
|
|
1390
|
+
return n(), () => {
|
|
1391
|
+
var g;
|
|
1392
|
+
f.forEach((b) => {
|
|
1393
|
+
o && b.removeEventListener("scroll", n), i && b.removeEventListener("resize", n);
|
|
1394
|
+
}), u == null || u(), (g = h) == null || g.disconnect(), h = null, d && cancelAnimationFrame(y);
|
|
1395
|
+
};
|
|
1396
|
+
}
|
|
1397
|
+
const Rr = or, Pr = ir, Or = tr, Lr = cr, Tr = nr, Ct = er, Dr = sr, kr = (e, t, n) => {
|
|
1398
|
+
const r = /* @__PURE__ */ new Map(), o = {
|
|
1399
|
+
platform: Cr,
|
|
1400
|
+
...n
|
|
1401
|
+
}, i = {
|
|
1402
|
+
...o.platform,
|
|
1403
|
+
_c: r
|
|
1404
|
+
};
|
|
1405
|
+
return Jn(e, t, {
|
|
1406
|
+
...o,
|
|
1407
|
+
platform: i
|
|
1408
|
+
});
|
|
1409
|
+
};
|
|
1410
|
+
var Ee = typeof document < "u" ? vn : gn;
|
|
1411
|
+
function Oe(e, t) {
|
|
1412
|
+
if (e === t)
|
|
1413
|
+
return !0;
|
|
1414
|
+
if (typeof e != typeof t)
|
|
1415
|
+
return !1;
|
|
1416
|
+
if (typeof e == "function" && e.toString() === t.toString())
|
|
1417
|
+
return !0;
|
|
1418
|
+
let n, r, o;
|
|
1419
|
+
if (e && t && typeof e == "object") {
|
|
1420
|
+
if (Array.isArray(e)) {
|
|
1421
|
+
if (n = e.length, n !== t.length) return !1;
|
|
1422
|
+
for (r = n; r-- !== 0; )
|
|
1423
|
+
if (!Oe(e[r], t[r]))
|
|
1424
|
+
return !1;
|
|
1425
|
+
return !0;
|
|
1426
|
+
}
|
|
1427
|
+
if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
|
|
1428
|
+
return !1;
|
|
1429
|
+
for (r = n; r-- !== 0; )
|
|
1430
|
+
if (!{}.hasOwnProperty.call(t, o[r]))
|
|
1431
|
+
return !1;
|
|
1432
|
+
for (r = n; r-- !== 0; ) {
|
|
1433
|
+
const i = o[r];
|
|
1434
|
+
if (!(i === "_owner" && e.$$typeof) && !Oe(e[i], t[i]))
|
|
1435
|
+
return !1;
|
|
1436
|
+
}
|
|
1437
|
+
return !0;
|
|
1438
|
+
}
|
|
1439
|
+
return e !== e && t !== t;
|
|
1440
|
+
}
|
|
1441
|
+
function zt(e) {
|
|
1442
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1443
|
+
}
|
|
1444
|
+
function At(e, t) {
|
|
1445
|
+
const n = zt(e);
|
|
1446
|
+
return Math.round(t * n) / n;
|
|
1447
|
+
}
|
|
1448
|
+
function Ie(e) {
|
|
1449
|
+
const t = p.useRef(e);
|
|
1450
|
+
return Ee(() => {
|
|
1451
|
+
t.current = e;
|
|
1452
|
+
}), t;
|
|
1453
|
+
}
|
|
1454
|
+
function Mr(e) {
|
|
1455
|
+
e === void 0 && (e = {});
|
|
1456
|
+
const {
|
|
1457
|
+
placement: t = "bottom",
|
|
1458
|
+
strategy: n = "absolute",
|
|
1459
|
+
middleware: r = [],
|
|
1460
|
+
platform: o,
|
|
1461
|
+
elements: {
|
|
1462
|
+
reference: i,
|
|
1463
|
+
floating: c
|
|
1464
|
+
} = {},
|
|
1465
|
+
transform: s = !0,
|
|
1466
|
+
whileElementsMounted: d,
|
|
1467
|
+
open: l
|
|
1468
|
+
} = e, [f, u] = p.useState({
|
|
1469
|
+
x: 0,
|
|
1470
|
+
y: 0,
|
|
1471
|
+
strategy: n,
|
|
1472
|
+
placement: t,
|
|
1473
|
+
middlewareData: {},
|
|
1474
|
+
isPositioned: !1
|
|
1475
|
+
}), [m, h] = p.useState(r);
|
|
1476
|
+
Oe(m, r) || h(r);
|
|
1477
|
+
const [y, a] = p.useState(null), [v, g] = p.useState(null), b = p.useCallback((S) => {
|
|
1478
|
+
S !== A.current && (A.current = S, a(S));
|
|
1479
|
+
}, []), x = p.useCallback((S) => {
|
|
1480
|
+
S !== C.current && (C.current = S, g(S));
|
|
1481
|
+
}, []), w = i || y, E = c || v, A = p.useRef(null), C = p.useRef(null), R = p.useRef(f), L = d != null, P = Ie(d), F = Ie(o), N = Ie(l), T = p.useCallback(() => {
|
|
1482
|
+
if (!A.current || !C.current)
|
|
1483
|
+
return;
|
|
1484
|
+
const S = {
|
|
1485
|
+
placement: t,
|
|
1486
|
+
strategy: n,
|
|
1487
|
+
middleware: m
|
|
1488
|
+
};
|
|
1489
|
+
F.current && (S.platform = F.current), kr(A.current, C.current, S).then((M) => {
|
|
1490
|
+
const V = {
|
|
1491
|
+
...M,
|
|
1492
|
+
// The floating element's position may be recomputed while it's closed
|
|
1493
|
+
// but still mounted (such as when transitioning out). To ensure
|
|
1494
|
+
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1495
|
+
// setting it to `true` when `open === false` (must be specified).
|
|
1496
|
+
isPositioned: N.current !== !1
|
|
1497
|
+
};
|
|
1498
|
+
O.current && !Oe(R.current, V) && (R.current = V, bn.flushSync(() => {
|
|
1499
|
+
u(V);
|
|
1500
|
+
}));
|
|
1501
|
+
});
|
|
1502
|
+
}, [m, t, n, F, N]);
|
|
1503
|
+
Ee(() => {
|
|
1504
|
+
l === !1 && R.current.isPositioned && (R.current.isPositioned = !1, u((S) => ({
|
|
1505
|
+
...S,
|
|
1506
|
+
isPositioned: !1
|
|
1507
|
+
})));
|
|
1508
|
+
}, [l]);
|
|
1509
|
+
const O = p.useRef(!1);
|
|
1510
|
+
Ee(() => (O.current = !0, () => {
|
|
1511
|
+
O.current = !1;
|
|
1512
|
+
}), []), Ee(() => {
|
|
1513
|
+
if (w && (A.current = w), E && (C.current = E), w && E) {
|
|
1514
|
+
if (P.current)
|
|
1515
|
+
return P.current(w, E, T);
|
|
1516
|
+
T();
|
|
1517
|
+
}
|
|
1518
|
+
}, [w, E, T, P, L]);
|
|
1519
|
+
const I = p.useMemo(() => ({
|
|
1520
|
+
reference: A,
|
|
1521
|
+
floating: C,
|
|
1522
|
+
setReference: b,
|
|
1523
|
+
setFloating: x
|
|
1524
|
+
}), [b, x]), D = p.useMemo(() => ({
|
|
1525
|
+
reference: w,
|
|
1526
|
+
floating: E
|
|
1527
|
+
}), [w, E]), k = p.useMemo(() => {
|
|
1528
|
+
const S = {
|
|
1529
|
+
position: n,
|
|
1530
|
+
left: 0,
|
|
1531
|
+
top: 0
|
|
1532
|
+
};
|
|
1533
|
+
if (!D.floating)
|
|
1534
|
+
return S;
|
|
1535
|
+
const M = At(D.floating, f.x), V = At(D.floating, f.y);
|
|
1536
|
+
return s ? {
|
|
1537
|
+
...S,
|
|
1538
|
+
transform: "translate(" + M + "px, " + V + "px)",
|
|
1539
|
+
...zt(D.floating) >= 1.5 && {
|
|
1540
|
+
willChange: "transform"
|
|
1541
|
+
}
|
|
1542
|
+
} : {
|
|
1543
|
+
position: n,
|
|
1544
|
+
left: M,
|
|
1545
|
+
top: V
|
|
1546
|
+
};
|
|
1547
|
+
}, [n, s, D.floating, f.x, f.y]);
|
|
1548
|
+
return p.useMemo(() => ({
|
|
1549
|
+
...f,
|
|
1550
|
+
update: T,
|
|
1551
|
+
refs: I,
|
|
1552
|
+
elements: D,
|
|
1553
|
+
floatingStyles: k
|
|
1554
|
+
}), [f, T, I, D, k]);
|
|
1555
|
+
}
|
|
1556
|
+
const Fr = (e) => {
|
|
1557
|
+
function t(n) {
|
|
1558
|
+
return {}.hasOwnProperty.call(n, "current");
|
|
1559
|
+
}
|
|
1560
|
+
return {
|
|
1561
|
+
name: "arrow",
|
|
1562
|
+
options: e,
|
|
1563
|
+
fn(n) {
|
|
1564
|
+
const {
|
|
1565
|
+
element: r,
|
|
1566
|
+
padding: o
|
|
1567
|
+
} = typeof e == "function" ? e(n) : e;
|
|
1568
|
+
return r && t(r) ? r.current != null ? Ct({
|
|
1569
|
+
element: r.current,
|
|
1570
|
+
padding: o
|
|
1571
|
+
}).fn(n) : {} : r ? Ct({
|
|
1572
|
+
element: r,
|
|
1573
|
+
padding: o
|
|
1574
|
+
}).fn(n) : {};
|
|
1575
|
+
}
|
|
1576
|
+
};
|
|
1577
|
+
}, Nr = (e, t) => ({
|
|
1578
|
+
...Rr(e),
|
|
1579
|
+
options: [e, t]
|
|
1580
|
+
}), Wr = (e, t) => ({
|
|
1581
|
+
...Pr(e),
|
|
1582
|
+
options: [e, t]
|
|
1583
|
+
}), Br = (e, t) => ({
|
|
1584
|
+
...Dr(e),
|
|
1585
|
+
options: [e, t]
|
|
1586
|
+
}), Ir = (e, t) => ({
|
|
1587
|
+
...Or(e),
|
|
1588
|
+
options: [e, t]
|
|
1589
|
+
}), _r = (e, t) => ({
|
|
1590
|
+
...Lr(e),
|
|
1591
|
+
options: [e, t]
|
|
1592
|
+
}), Hr = (e, t) => ({
|
|
1593
|
+
...Tr(e),
|
|
1594
|
+
options: [e, t]
|
|
1595
|
+
}), $r = (e, t) => ({
|
|
1596
|
+
...Fr(e),
|
|
1597
|
+
options: [e, t]
|
|
1598
|
+
});
|
|
1599
|
+
var Vr = "Arrow", Yt = p.forwardRef((e, t) => {
|
|
1600
|
+
const { children: n, width: r = 10, height: o = 5, ...i } = e;
|
|
1601
|
+
return /* @__PURE__ */ _(
|
|
1602
|
+
ce.svg,
|
|
1603
|
+
{
|
|
1604
|
+
...i,
|
|
1605
|
+
ref: t,
|
|
1606
|
+
width: r,
|
|
1607
|
+
height: o,
|
|
1608
|
+
viewBox: "0 0 30 10",
|
|
1609
|
+
preserveAspectRatio: "none",
|
|
1610
|
+
children: e.asChild ? n : /* @__PURE__ */ _("polygon", { points: "0,0 30,0 15,10" })
|
|
1611
|
+
}
|
|
1612
|
+
);
|
|
1613
|
+
});
|
|
1614
|
+
Yt.displayName = Vr;
|
|
1615
|
+
var zr = Yt, tt = "Popper", [Ut, Bo] = wn(tt), [Yr, Xt] = Ut(tt), jt = (e) => {
|
|
1616
|
+
const { __scopePopper: t, children: n } = e, [r, o] = p.useState(null);
|
|
1617
|
+
return /* @__PURE__ */ _(Yr, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
1618
|
+
};
|
|
1619
|
+
jt.displayName = tt;
|
|
1620
|
+
var Kt = "PopperAnchor", qt = p.forwardRef(
|
|
1621
|
+
(e, t) => {
|
|
1622
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, i = Xt(Kt, n), c = p.useRef(null), s = he(t, c);
|
|
1623
|
+
return p.useEffect(() => {
|
|
1624
|
+
i.onAnchorChange((r == null ? void 0 : r.current) || c.current);
|
|
1625
|
+
}), r ? null : /* @__PURE__ */ _(ce.div, { ...o, ref: s });
|
|
1626
|
+
}
|
|
1627
|
+
);
|
|
1628
|
+
qt.displayName = Kt;
|
|
1629
|
+
var nt = "PopperContent", [Ur, Xr] = Ut(nt), Zt = p.forwardRef(
|
|
1630
|
+
(e, t) => {
|
|
1631
|
+
var rt, ot, it, st, ct, at;
|
|
1632
|
+
const {
|
|
1633
|
+
__scopePopper: n,
|
|
1634
|
+
side: r = "bottom",
|
|
1635
|
+
sideOffset: o = 0,
|
|
1636
|
+
align: i = "center",
|
|
1637
|
+
alignOffset: c = 0,
|
|
1638
|
+
arrowPadding: s = 0,
|
|
1639
|
+
avoidCollisions: d = !0,
|
|
1640
|
+
collisionBoundary: l = [],
|
|
1641
|
+
collisionPadding: f = 0,
|
|
1642
|
+
sticky: u = "partial",
|
|
1643
|
+
hideWhenDetached: m = !1,
|
|
1644
|
+
updatePositionStrategy: h = "optimized",
|
|
1645
|
+
onPlaced: y,
|
|
1646
|
+
...a
|
|
1647
|
+
} = e, v = Xt(nt, n), [g, b] = p.useState(null), x = he(t, (ue) => b(ue)), [w, E] = p.useState(null), A = xn(w), C = (A == null ? void 0 : A.width) ?? 0, R = (A == null ? void 0 : A.height) ?? 0, L = r + (i !== "center" ? "-" + i : ""), P = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, F = Array.isArray(l) ? l : [l], N = F.length > 0, T = {
|
|
1648
|
+
padding: P,
|
|
1649
|
+
boundary: F.filter(Kr),
|
|
1650
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
1651
|
+
altBoundary: N
|
|
1652
|
+
}, { refs: O, floatingStyles: I, placement: D, isPositioned: k, middlewareData: S } = Mr({
|
|
1653
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
1654
|
+
strategy: "fixed",
|
|
1655
|
+
placement: L,
|
|
1656
|
+
whileElementsMounted: (...ue) => Sr(...ue, {
|
|
1657
|
+
animationFrame: h === "always"
|
|
1658
|
+
}),
|
|
1659
|
+
elements: {
|
|
1660
|
+
reference: v.anchor
|
|
1661
|
+
},
|
|
1662
|
+
middleware: [
|
|
1663
|
+
Nr({ mainAxis: o + R, alignmentAxis: c }),
|
|
1664
|
+
d && Wr({
|
|
1665
|
+
mainAxis: !0,
|
|
1666
|
+
crossAxis: !1,
|
|
1667
|
+
limiter: u === "partial" ? Br() : void 0,
|
|
1668
|
+
...T
|
|
1669
|
+
}),
|
|
1670
|
+
d && Ir({ ...T }),
|
|
1671
|
+
_r({
|
|
1672
|
+
...T,
|
|
1673
|
+
apply: ({ elements: ue, rects: lt, availableWidth: dn, availableHeight: hn }) => {
|
|
1674
|
+
const { width: mn, height: pn } = lt.reference, ve = ue.floating.style;
|
|
1675
|
+
ve.setProperty("--radix-popper-available-width", `${dn}px`), ve.setProperty("--radix-popper-available-height", `${hn}px`), ve.setProperty("--radix-popper-anchor-width", `${mn}px`), ve.setProperty("--radix-popper-anchor-height", `${pn}px`);
|
|
1676
|
+
}
|
|
1677
|
+
}),
|
|
1678
|
+
w && $r({ element: w, padding: s }),
|
|
1679
|
+
qr({ arrowWidth: C, arrowHeight: R }),
|
|
1680
|
+
m && Hr({ strategy: "referenceHidden", ...T })
|
|
1681
|
+
]
|
|
1682
|
+
}), [M, V] = Jt(D), pe = ie(y);
|
|
1683
|
+
Ve(() => {
|
|
1684
|
+
k && (pe == null || pe());
|
|
1685
|
+
}, [k, pe]);
|
|
1686
|
+
const cn = (rt = S.arrow) == null ? void 0 : rt.x, an = (ot = S.arrow) == null ? void 0 : ot.y, ln = ((it = S.arrow) == null ? void 0 : it.centerOffset) !== 0, [un, fn] = p.useState();
|
|
1687
|
+
return Ve(() => {
|
|
1688
|
+
g && fn(window.getComputedStyle(g).zIndex);
|
|
1689
|
+
}, [g]), /* @__PURE__ */ _(
|
|
1690
|
+
"div",
|
|
1691
|
+
{
|
|
1692
|
+
ref: O.setFloating,
|
|
1693
|
+
"data-radix-popper-content-wrapper": "",
|
|
1694
|
+
style: {
|
|
1695
|
+
...I,
|
|
1696
|
+
transform: k ? I.transform : "translate(0, -200%)",
|
|
1697
|
+
// keep off the page when measuring
|
|
1698
|
+
minWidth: "max-content",
|
|
1699
|
+
zIndex: un,
|
|
1700
|
+
"--radix-popper-transform-origin": [
|
|
1701
|
+
(st = S.transformOrigin) == null ? void 0 : st.x,
|
|
1702
|
+
(ct = S.transformOrigin) == null ? void 0 : ct.y
|
|
1703
|
+
].join(" "),
|
|
1704
|
+
// hide the content if using the hide middleware and should be hidden
|
|
1705
|
+
// set visibility to hidden and disable pointer events so the UI behaves
|
|
1706
|
+
// as if the PopperContent isn't there at all
|
|
1707
|
+
...((at = S.hide) == null ? void 0 : at.referenceHidden) && {
|
|
1708
|
+
visibility: "hidden",
|
|
1709
|
+
pointerEvents: "none"
|
|
1710
|
+
}
|
|
1711
|
+
},
|
|
1712
|
+
dir: e.dir,
|
|
1713
|
+
children: /* @__PURE__ */ _(
|
|
1714
|
+
Ur,
|
|
1715
|
+
{
|
|
1716
|
+
scope: n,
|
|
1717
|
+
placedSide: M,
|
|
1718
|
+
onArrowChange: E,
|
|
1719
|
+
arrowX: cn,
|
|
1720
|
+
arrowY: an,
|
|
1721
|
+
shouldHideArrow: ln,
|
|
1722
|
+
children: /* @__PURE__ */ _(
|
|
1723
|
+
ce.div,
|
|
1724
|
+
{
|
|
1725
|
+
"data-side": M,
|
|
1726
|
+
"data-align": V,
|
|
1727
|
+
...a,
|
|
1728
|
+
ref: x,
|
|
1729
|
+
style: {
|
|
1730
|
+
...a.style,
|
|
1731
|
+
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
1732
|
+
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
1733
|
+
animation: k ? void 0 : "none"
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
)
|
|
1737
|
+
}
|
|
1738
|
+
)
|
|
1739
|
+
}
|
|
1740
|
+
);
|
|
1741
|
+
}
|
|
1742
|
+
);
|
|
1743
|
+
Zt.displayName = nt;
|
|
1744
|
+
var Gt = "PopperArrow", jr = {
|
|
1745
|
+
top: "bottom",
|
|
1746
|
+
right: "left",
|
|
1747
|
+
bottom: "top",
|
|
1748
|
+
left: "right"
|
|
1749
|
+
}, Qt = p.forwardRef(function(t, n) {
|
|
1750
|
+
const { __scopePopper: r, ...o } = t, i = Xr(Gt, r), c = jr[i.placedSide];
|
|
1751
|
+
return (
|
|
1752
|
+
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
1753
|
+
// doesn't report size as we'd expect on SVG elements.
|
|
1754
|
+
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
1755
|
+
/* @__PURE__ */ _(
|
|
1756
|
+
"span",
|
|
1757
|
+
{
|
|
1758
|
+
ref: i.onArrowChange,
|
|
1759
|
+
style: {
|
|
1760
|
+
position: "absolute",
|
|
1761
|
+
left: i.arrowX,
|
|
1762
|
+
top: i.arrowY,
|
|
1763
|
+
[c]: 0,
|
|
1764
|
+
transformOrigin: {
|
|
1765
|
+
top: "",
|
|
1766
|
+
right: "0 0",
|
|
1767
|
+
bottom: "center 0",
|
|
1768
|
+
left: "100% 0"
|
|
1769
|
+
}[i.placedSide],
|
|
1770
|
+
transform: {
|
|
1771
|
+
top: "translateY(100%)",
|
|
1772
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
1773
|
+
bottom: "rotate(180deg)",
|
|
1774
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
1775
|
+
}[i.placedSide],
|
|
1776
|
+
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
1777
|
+
},
|
|
1778
|
+
children: /* @__PURE__ */ _(
|
|
1779
|
+
zr,
|
|
1780
|
+
{
|
|
1781
|
+
...o,
|
|
1782
|
+
ref: n,
|
|
1783
|
+
style: {
|
|
1784
|
+
...o.style,
|
|
1785
|
+
// ensures the element can be measured correctly (mostly for if SVG)
|
|
1786
|
+
display: "block"
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
)
|
|
1790
|
+
}
|
|
1791
|
+
)
|
|
1792
|
+
);
|
|
1793
|
+
});
|
|
1794
|
+
Qt.displayName = Gt;
|
|
1795
|
+
function Kr(e) {
|
|
1796
|
+
return e !== null;
|
|
1797
|
+
}
|
|
1798
|
+
var qr = (e) => ({
|
|
1799
|
+
name: "transformOrigin",
|
|
1800
|
+
options: e,
|
|
1801
|
+
fn(t) {
|
|
1802
|
+
var v, g, b;
|
|
1803
|
+
const { placement: n, rects: r, middlewareData: o } = t, c = ((v = o.arrow) == null ? void 0 : v.centerOffset) !== 0, s = c ? 0 : e.arrowWidth, d = c ? 0 : e.arrowHeight, [l, f] = Jt(n), u = { start: "0%", center: "50%", end: "100%" }[f], m = (((g = o.arrow) == null ? void 0 : g.x) ?? 0) + s / 2, h = (((b = o.arrow) == null ? void 0 : b.y) ?? 0) + d / 2;
|
|
1804
|
+
let y = "", a = "";
|
|
1805
|
+
return l === "bottom" ? (y = c ? u : `${m}px`, a = `${-d}px`) : l === "top" ? (y = c ? u : `${m}px`, a = `${r.floating.height + d}px`) : l === "right" ? (y = `${-d}px`, a = c ? u : `${h}px`) : l === "left" && (y = `${r.floating.width + d}px`, a = c ? u : `${h}px`), { data: { x: y, y: a } };
|
|
1806
|
+
}
|
|
1807
|
+
});
|
|
1808
|
+
function Jt(e) {
|
|
1809
|
+
const [t, n = "center"] = e.split("-");
|
|
1810
|
+
return [t, n];
|
|
1811
|
+
}
|
|
1812
|
+
var Io = jt, _o = qt, Ho = Zt, $o = Qt, Zr = function(e) {
|
|
1813
|
+
if (typeof document > "u")
|
|
1814
|
+
return null;
|
|
1815
|
+
var t = Array.isArray(e) ? e[0] : e;
|
|
1816
|
+
return t.ownerDocument.body;
|
|
1817
|
+
}, ee = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), we = {}, _e = 0, en = function(e) {
|
|
1818
|
+
return e && (e.host || en(e.parentNode));
|
|
1819
|
+
}, Gr = function(e, t) {
|
|
1820
|
+
return t.map(function(n) {
|
|
1821
|
+
if (e.contains(n))
|
|
1822
|
+
return n;
|
|
1823
|
+
var r = en(n);
|
|
1824
|
+
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
1825
|
+
}).filter(function(n) {
|
|
1826
|
+
return !!n;
|
|
1827
|
+
});
|
|
1828
|
+
}, Qr = function(e, t, n, r) {
|
|
1829
|
+
var o = Gr(t, Array.isArray(e) ? e : [e]);
|
|
1830
|
+
we[n] || (we[n] = /* @__PURE__ */ new WeakMap());
|
|
1831
|
+
var i = we[n], c = [], s = /* @__PURE__ */ new Set(), d = new Set(o), l = function(u) {
|
|
1832
|
+
!u || s.has(u) || (s.add(u), l(u.parentNode));
|
|
1833
|
+
};
|
|
1834
|
+
o.forEach(l);
|
|
1835
|
+
var f = function(u) {
|
|
1836
|
+
!u || d.has(u) || Array.prototype.forEach.call(u.children, function(m) {
|
|
1837
|
+
if (s.has(m))
|
|
1838
|
+
f(m);
|
|
1839
|
+
else
|
|
1840
|
+
try {
|
|
1841
|
+
var h = m.getAttribute(r), y = h !== null && h !== "false", a = (ee.get(m) || 0) + 1, v = (i.get(m) || 0) + 1;
|
|
1842
|
+
ee.set(m, a), i.set(m, v), c.push(m), a === 1 && y && ye.set(m, !0), v === 1 && m.setAttribute(n, "true"), y || m.setAttribute(r, "true");
|
|
1843
|
+
} catch (g) {
|
|
1844
|
+
console.error("aria-hidden: cannot operate on ", m, g);
|
|
1845
|
+
}
|
|
1846
|
+
});
|
|
1847
|
+
};
|
|
1848
|
+
return f(t), s.clear(), _e++, function() {
|
|
1849
|
+
c.forEach(function(u) {
|
|
1850
|
+
var m = ee.get(u) - 1, h = i.get(u) - 1;
|
|
1851
|
+
ee.set(u, m), i.set(u, h), m || (ye.has(u) || u.removeAttribute(r), ye.delete(u)), h || u.removeAttribute(n);
|
|
1852
|
+
}), _e--, _e || (ee = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), we = {});
|
|
1853
|
+
};
|
|
1854
|
+
}, Vo = function(e, t, n) {
|
|
1855
|
+
n === void 0 && (n = "data-aria-hidden");
|
|
1856
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), o = Zr(e);
|
|
1857
|
+
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live]"))), Qr(r, o, n, "aria-hidden")) : function() {
|
|
1858
|
+
return null;
|
|
1859
|
+
};
|
|
1860
|
+
}, Ce = "right-scroll-bar-position", Ae = "width-before-scroll-bar", Jr = "with-scroll-bars-hidden", eo = "--removed-body-scroll-bar-size", tn = Cn(), He = function() {
|
|
1861
|
+
}, ke = p.forwardRef(function(e, t) {
|
|
1862
|
+
var n = p.useRef(null), r = p.useState({
|
|
1863
|
+
onScrollCapture: He,
|
|
1864
|
+
onWheelCapture: He,
|
|
1865
|
+
onTouchMoveCapture: He
|
|
1866
|
+
}), o = r[0], i = r[1], c = e.forwardProps, s = e.children, d = e.className, l = e.removeScrollBar, f = e.enabled, u = e.shards, m = e.sideCar, h = e.noIsolation, y = e.inert, a = e.allowPinchZoom, v = e.as, g = v === void 0 ? "div" : v, b = e.gapMode, x = Lt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), w = m, E = An([n, t]), A = Q(Q({}, x), o);
|
|
1867
|
+
return p.createElement(
|
|
1868
|
+
p.Fragment,
|
|
1869
|
+
null,
|
|
1870
|
+
f && p.createElement(w, { sideCar: tn, removeScrollBar: l, shards: u, noIsolation: h, inert: y, setCallbacks: i, allowPinchZoom: !!a, lockRef: n, gapMode: b }),
|
|
1871
|
+
c ? p.cloneElement(p.Children.only(s), Q(Q({}, A), { ref: E })) : p.createElement(g, Q({}, A, { className: d, ref: E }), s)
|
|
1872
|
+
);
|
|
1873
|
+
});
|
|
1874
|
+
ke.defaultProps = {
|
|
1875
|
+
enabled: !0,
|
|
1876
|
+
removeScrollBar: !0,
|
|
1877
|
+
inert: !1
|
|
1878
|
+
};
|
|
1879
|
+
ke.classNames = {
|
|
1880
|
+
fullWidth: Ae,
|
|
1881
|
+
zeroRight: Ce
|
|
1882
|
+
};
|
|
1883
|
+
var to = function() {
|
|
1884
|
+
if (typeof __webpack_nonce__ < "u")
|
|
1885
|
+
return __webpack_nonce__;
|
|
1886
|
+
};
|
|
1887
|
+
function no() {
|
|
1888
|
+
if (!document)
|
|
1889
|
+
return null;
|
|
1890
|
+
var e = document.createElement("style");
|
|
1891
|
+
e.type = "text/css";
|
|
1892
|
+
var t = to();
|
|
1893
|
+
return t && e.setAttribute("nonce", t), e;
|
|
1894
|
+
}
|
|
1895
|
+
function ro(e, t) {
|
|
1896
|
+
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
1897
|
+
}
|
|
1898
|
+
function oo(e) {
|
|
1899
|
+
var t = document.head || document.getElementsByTagName("head")[0];
|
|
1900
|
+
t.appendChild(e);
|
|
1901
|
+
}
|
|
1902
|
+
var io = function() {
|
|
1903
|
+
var e = 0, t = null;
|
|
1904
|
+
return {
|
|
1905
|
+
add: function(n) {
|
|
1906
|
+
e == 0 && (t = no()) && (ro(t, n), oo(t)), e++;
|
|
1907
|
+
},
|
|
1908
|
+
remove: function() {
|
|
1909
|
+
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
1910
|
+
}
|
|
1911
|
+
};
|
|
1912
|
+
}, so = function() {
|
|
1913
|
+
var e = io();
|
|
1914
|
+
return function(t, n) {
|
|
1915
|
+
p.useEffect(function() {
|
|
1916
|
+
return e.add(t), function() {
|
|
1917
|
+
e.remove();
|
|
1918
|
+
};
|
|
1919
|
+
}, [t && n]);
|
|
1920
|
+
};
|
|
1921
|
+
}, nn = function() {
|
|
1922
|
+
var e = so(), t = function(n) {
|
|
1923
|
+
var r = n.styles, o = n.dynamic;
|
|
1924
|
+
return e(r, o), null;
|
|
1925
|
+
};
|
|
1926
|
+
return t;
|
|
1927
|
+
}, co = {
|
|
1928
|
+
left: 0,
|
|
1929
|
+
top: 0,
|
|
1930
|
+
right: 0,
|
|
1931
|
+
gap: 0
|
|
1932
|
+
}, $e = function(e) {
|
|
1933
|
+
return parseInt(e || "", 10) || 0;
|
|
1934
|
+
}, ao = function(e) {
|
|
1935
|
+
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
1936
|
+
return [$e(n), $e(r), $e(o)];
|
|
1937
|
+
}, lo = function(e) {
|
|
1938
|
+
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
1939
|
+
return co;
|
|
1940
|
+
var t = ao(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
1941
|
+
return {
|
|
1942
|
+
left: t[0],
|
|
1943
|
+
top: t[1],
|
|
1944
|
+
right: t[2],
|
|
1945
|
+
gap: Math.max(0, r - n + t[2] - t[0])
|
|
1946
|
+
};
|
|
1947
|
+
}, uo = nn(), oe = "data-scroll-locked", fo = function(e, t, n, r) {
|
|
1948
|
+
var o = e.left, i = e.top, c = e.right, s = e.gap;
|
|
1949
|
+
return n === void 0 && (n = "margin"), `
|
|
1950
|
+
.`.concat(Jr, ` {
|
|
1951
|
+
overflow: hidden `).concat(r, `;
|
|
1952
|
+
padding-right: `).concat(s, "px ").concat(r, `;
|
|
1953
|
+
}
|
|
1954
|
+
body[`).concat(oe, `] {
|
|
1955
|
+
overflow: hidden `).concat(r, `;
|
|
1956
|
+
overscroll-behavior: contain;
|
|
1957
|
+
`).concat([
|
|
1958
|
+
t && "position: relative ".concat(r, ";"),
|
|
1959
|
+
n === "margin" && `
|
|
1960
|
+
padding-left: `.concat(o, `px;
|
|
1961
|
+
padding-top: `).concat(i, `px;
|
|
1962
|
+
padding-right: `).concat(c, `px;
|
|
1963
|
+
margin-left:0;
|
|
1964
|
+
margin-top:0;
|
|
1965
|
+
margin-right: `).concat(s, "px ").concat(r, `;
|
|
1966
|
+
`),
|
|
1967
|
+
n === "padding" && "padding-right: ".concat(s, "px ").concat(r, ";")
|
|
1968
|
+
].filter(Boolean).join(""), `
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
.`).concat(Ce, ` {
|
|
1972
|
+
right: `).concat(s, "px ").concat(r, `;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
.`).concat(Ae, ` {
|
|
1976
|
+
margin-right: `).concat(s, "px ").concat(r, `;
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
.`).concat(Ce, " .").concat(Ce, ` {
|
|
1980
|
+
right: 0 `).concat(r, `;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
.`).concat(Ae, " .").concat(Ae, ` {
|
|
1984
|
+
margin-right: 0 `).concat(r, `;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
body[`).concat(oe, `] {
|
|
1988
|
+
`).concat(eo, ": ").concat(s, `px;
|
|
1989
|
+
}
|
|
1990
|
+
`);
|
|
1991
|
+
}, St = function() {
|
|
1992
|
+
var e = parseInt(document.body.getAttribute(oe) || "0", 10);
|
|
1993
|
+
return isFinite(e) ? e : 0;
|
|
1994
|
+
}, ho = function() {
|
|
1995
|
+
p.useEffect(function() {
|
|
1996
|
+
return document.body.setAttribute(oe, (St() + 1).toString()), function() {
|
|
1997
|
+
var e = St() - 1;
|
|
1998
|
+
e <= 0 ? document.body.removeAttribute(oe) : document.body.setAttribute(oe, e.toString());
|
|
1999
|
+
};
|
|
2000
|
+
}, []);
|
|
2001
|
+
}, mo = function(e) {
|
|
2002
|
+
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
2003
|
+
ho();
|
|
2004
|
+
var i = p.useMemo(function() {
|
|
2005
|
+
return lo(o);
|
|
2006
|
+
}, [o]);
|
|
2007
|
+
return p.createElement(uo, { styles: fo(i, !t, o, n ? "" : "!important") });
|
|
2008
|
+
}, je = !1;
|
|
2009
|
+
if (typeof window < "u")
|
|
2010
|
+
try {
|
|
2011
|
+
var xe = Object.defineProperty({}, "passive", {
|
|
2012
|
+
get: function() {
|
|
2013
|
+
return je = !0, !0;
|
|
2014
|
+
}
|
|
2015
|
+
});
|
|
2016
|
+
window.addEventListener("test", xe, xe), window.removeEventListener("test", xe, xe);
|
|
2017
|
+
} catch {
|
|
2018
|
+
je = !1;
|
|
2019
|
+
}
|
|
2020
|
+
var te = je ? { passive: !1 } : !1, po = function(e) {
|
|
2021
|
+
return e.tagName === "TEXTAREA";
|
|
2022
|
+
}, rn = function(e, t) {
|
|
2023
|
+
if (!(e instanceof Element))
|
|
2024
|
+
return !1;
|
|
2025
|
+
var n = window.getComputedStyle(e);
|
|
2026
|
+
return (
|
|
2027
|
+
// not-not-scrollable
|
|
2028
|
+
n[t] !== "hidden" && // contains scroll inside self
|
|
2029
|
+
!(n.overflowY === n.overflowX && !po(e) && n[t] === "visible")
|
|
2030
|
+
);
|
|
2031
|
+
}, vo = function(e) {
|
|
2032
|
+
return rn(e, "overflowY");
|
|
2033
|
+
}, go = function(e) {
|
|
2034
|
+
return rn(e, "overflowX");
|
|
2035
|
+
}, Rt = function(e, t) {
|
|
2036
|
+
var n = t.ownerDocument, r = t;
|
|
2037
|
+
do {
|
|
2038
|
+
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
2039
|
+
var o = on(e, r);
|
|
2040
|
+
if (o) {
|
|
2041
|
+
var i = sn(e, r), c = i[1], s = i[2];
|
|
2042
|
+
if (c > s)
|
|
2043
|
+
return !0;
|
|
2044
|
+
}
|
|
2045
|
+
r = r.parentNode;
|
|
2046
|
+
} while (r && r !== n.body);
|
|
2047
|
+
return !1;
|
|
2048
|
+
}, yo = function(e) {
|
|
2049
|
+
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
2050
|
+
return [
|
|
2051
|
+
t,
|
|
2052
|
+
n,
|
|
2053
|
+
r
|
|
2054
|
+
];
|
|
2055
|
+
}, wo = function(e) {
|
|
2056
|
+
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
2057
|
+
return [
|
|
2058
|
+
t,
|
|
2059
|
+
n,
|
|
2060
|
+
r
|
|
2061
|
+
];
|
|
2062
|
+
}, on = function(e, t) {
|
|
2063
|
+
return e === "v" ? vo(t) : go(t);
|
|
2064
|
+
}, sn = function(e, t) {
|
|
2065
|
+
return e === "v" ? yo(t) : wo(t);
|
|
2066
|
+
}, xo = function(e, t) {
|
|
2067
|
+
return e === "h" && t === "rtl" ? -1 : 1;
|
|
2068
|
+
}, bo = function(e, t, n, r, o) {
|
|
2069
|
+
var i = xo(e, window.getComputedStyle(t).direction), c = i * r, s = n.target, d = t.contains(s), l = !1, f = c > 0, u = 0, m = 0;
|
|
2070
|
+
do {
|
|
2071
|
+
var h = sn(e, s), y = h[0], a = h[1], v = h[2], g = a - v - i * y;
|
|
2072
|
+
(y || g) && on(e, s) && (u += g, m += y), s instanceof ShadowRoot ? s = s.host : s = s.parentNode;
|
|
2073
|
+
} while (
|
|
2074
|
+
// portaled content
|
|
2075
|
+
!d && s !== document.body || // self content
|
|
2076
|
+
d && (t.contains(s) || t === s)
|
|
2077
|
+
);
|
|
2078
|
+
return (f && Math.abs(u) < 1 || !f && Math.abs(m) < 1) && (l = !0), l;
|
|
2079
|
+
}, be = function(e) {
|
|
2080
|
+
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
2081
|
+
}, Pt = function(e) {
|
|
2082
|
+
return [e.deltaX, e.deltaY];
|
|
2083
|
+
}, Ot = function(e) {
|
|
2084
|
+
return e && "current" in e ? e.current : e;
|
|
2085
|
+
}, Eo = function(e, t) {
|
|
2086
|
+
return e[0] === t[0] && e[1] === t[1];
|
|
2087
|
+
}, Co = function(e) {
|
|
2088
|
+
return `
|
|
2089
|
+
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
2090
|
+
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
2091
|
+
`);
|
|
2092
|
+
}, Ao = 0, ne = [];
|
|
2093
|
+
function So(e) {
|
|
2094
|
+
var t = p.useRef([]), n = p.useRef([0, 0]), r = p.useRef(), o = p.useState(Ao++)[0], i = p.useState(nn)[0], c = p.useRef(e);
|
|
2095
|
+
p.useEffect(function() {
|
|
2096
|
+
c.current = e;
|
|
2097
|
+
}, [e]), p.useEffect(function() {
|
|
2098
|
+
if (e.inert) {
|
|
2099
|
+
document.body.classList.add("block-interactivity-".concat(o));
|
|
2100
|
+
var a = En([e.lockRef.current], (e.shards || []).map(Ot), !0).filter(Boolean);
|
|
2101
|
+
return a.forEach(function(v) {
|
|
2102
|
+
return v.classList.add("allow-interactivity-".concat(o));
|
|
2103
|
+
}), function() {
|
|
2104
|
+
document.body.classList.remove("block-interactivity-".concat(o)), a.forEach(function(v) {
|
|
2105
|
+
return v.classList.remove("allow-interactivity-".concat(o));
|
|
2106
|
+
});
|
|
2107
|
+
};
|
|
2108
|
+
}
|
|
2109
|
+
}, [e.inert, e.lockRef.current, e.shards]);
|
|
2110
|
+
var s = p.useCallback(function(a, v) {
|
|
2111
|
+
if ("touches" in a && a.touches.length === 2 || a.type === "wheel" && a.ctrlKey)
|
|
2112
|
+
return !c.current.allowPinchZoom;
|
|
2113
|
+
var g = be(a), b = n.current, x = "deltaX" in a ? a.deltaX : b[0] - g[0], w = "deltaY" in a ? a.deltaY : b[1] - g[1], E, A = a.target, C = Math.abs(x) > Math.abs(w) ? "h" : "v";
|
|
2114
|
+
if ("touches" in a && C === "h" && A.type === "range")
|
|
2115
|
+
return !1;
|
|
2116
|
+
var R = Rt(C, A);
|
|
2117
|
+
if (!R)
|
|
2118
|
+
return !0;
|
|
2119
|
+
if (R ? E = C : (E = C === "v" ? "h" : "v", R = Rt(C, A)), !R)
|
|
2120
|
+
return !1;
|
|
2121
|
+
if (!r.current && "changedTouches" in a && (x || w) && (r.current = E), !E)
|
|
2122
|
+
return !0;
|
|
2123
|
+
var L = r.current || E;
|
|
2124
|
+
return bo(L, v, a, L === "h" ? x : w);
|
|
2125
|
+
}, []), d = p.useCallback(function(a) {
|
|
2126
|
+
var v = a;
|
|
2127
|
+
if (!(!ne.length || ne[ne.length - 1] !== i)) {
|
|
2128
|
+
var g = "deltaY" in v ? Pt(v) : be(v), b = t.current.filter(function(E) {
|
|
2129
|
+
return E.name === v.type && (E.target === v.target || v.target === E.shadowParent) && Eo(E.delta, g);
|
|
2130
|
+
})[0];
|
|
2131
|
+
if (b && b.should) {
|
|
2132
|
+
v.cancelable && v.preventDefault();
|
|
2133
|
+
return;
|
|
2134
|
+
}
|
|
2135
|
+
if (!b) {
|
|
2136
|
+
var x = (c.current.shards || []).map(Ot).filter(Boolean).filter(function(E) {
|
|
2137
|
+
return E.contains(v.target);
|
|
2138
|
+
}), w = x.length > 0 ? s(v, x[0]) : !c.current.noIsolation;
|
|
2139
|
+
w && v.cancelable && v.preventDefault();
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
}, []), l = p.useCallback(function(a, v, g, b) {
|
|
2143
|
+
var x = { name: a, delta: v, target: g, should: b, shadowParent: Ro(g) };
|
|
2144
|
+
t.current.push(x), setTimeout(function() {
|
|
2145
|
+
t.current = t.current.filter(function(w) {
|
|
2146
|
+
return w !== x;
|
|
2147
|
+
});
|
|
2148
|
+
}, 1);
|
|
2149
|
+
}, []), f = p.useCallback(function(a) {
|
|
2150
|
+
n.current = be(a), r.current = void 0;
|
|
2151
|
+
}, []), u = p.useCallback(function(a) {
|
|
2152
|
+
l(a.type, Pt(a), a.target, s(a, e.lockRef.current));
|
|
2153
|
+
}, []), m = p.useCallback(function(a) {
|
|
2154
|
+
l(a.type, be(a), a.target, s(a, e.lockRef.current));
|
|
2155
|
+
}, []);
|
|
2156
|
+
p.useEffect(function() {
|
|
2157
|
+
return ne.push(i), e.setCallbacks({
|
|
2158
|
+
onScrollCapture: u,
|
|
2159
|
+
onWheelCapture: u,
|
|
2160
|
+
onTouchMoveCapture: m
|
|
2161
|
+
}), document.addEventListener("wheel", d, te), document.addEventListener("touchmove", d, te), document.addEventListener("touchstart", f, te), function() {
|
|
2162
|
+
ne = ne.filter(function(a) {
|
|
2163
|
+
return a !== i;
|
|
2164
|
+
}), document.removeEventListener("wheel", d, te), document.removeEventListener("touchmove", d, te), document.removeEventListener("touchstart", f, te);
|
|
2165
|
+
};
|
|
2166
|
+
}, []);
|
|
2167
|
+
var h = e.removeScrollBar, y = e.inert;
|
|
2168
|
+
return p.createElement(
|
|
2169
|
+
p.Fragment,
|
|
2170
|
+
null,
|
|
2171
|
+
y ? p.createElement(i, { styles: Co(o) }) : null,
|
|
2172
|
+
h ? p.createElement(mo, { gapMode: e.gapMode }) : null
|
|
2173
|
+
);
|
|
2174
|
+
}
|
|
2175
|
+
function Ro(e) {
|
|
2176
|
+
for (var t = null; e !== null; )
|
|
2177
|
+
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
2178
|
+
return t;
|
|
2179
|
+
}
|
|
2180
|
+
const Po = Sn(tn, So);
|
|
2181
|
+
var Oo = p.forwardRef(function(e, t) {
|
|
2182
|
+
return p.createElement(ke, Q({}, e, { ref: t, sideCar: Po }));
|
|
2183
|
+
});
|
|
2184
|
+
Oo.classNames = ke.classNames;
|
|
2185
|
+
export {
|
|
2186
|
+
_o as A,
|
|
2187
|
+
Ho as C,
|
|
2188
|
+
Tn as D,
|
|
2189
|
+
Wn as F,
|
|
2190
|
+
Io as R,
|
|
2191
|
+
ie as a,
|
|
2192
|
+
No as b,
|
|
2193
|
+
Bo as c,
|
|
2194
|
+
Oo as d,
|
|
2195
|
+
$o as e,
|
|
2196
|
+
Vo as h,
|
|
2197
|
+
Wo as u
|
|
2198
|
+
};
|