@pdf-viewer/react 1.9.0-beta.4 → 1.9.0-beta.6
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/Checkbox.module-3edaacbb.js +7 -0
- package/dist/Combination-9a0a3e65.js +693 -0
- package/dist/Container.module-f8b5c306.js +6 -0
- package/dist/DropDown.module-a78567cb.js +11 -0
- package/dist/MenuItem.module-bc11d0d3.js +6 -0
- package/dist/MenuSeparator.module-89b2ff7f.js +6 -0
- package/dist/PropertyItem.module-db0150cc.js +8 -0
- package/dist/RPSplitter.module-13d612c4.js +7 -0
- package/dist/RPTheme.module-bd9038da.js +8 -0
- package/dist/RotateTool.module-03987eba.js +6 -0
- package/dist/SearchTool.module-016f3a8d.js +16 -0
- package/dist/ToolbarLayout.module-88476995.js +2464 -0
- package/dist/WrapperLayout.module-147bc943.js +6 -0
- package/dist/assets/ToolbarLayout.css +1 -0
- package/dist/components/RPConfig.js +673 -691
- package/dist/components/RPController.js +34 -34
- package/dist/components/RPDropFileZone.js +21 -23
- package/dist/components/RPPages.js +21 -18
- package/dist/components/RPProvider.js +19 -15
- package/dist/components/layout/Container.js +10 -11
- package/dist/components/layout/LayoutContainer.js +19 -16
- package/dist/components/layout/RPDefaultLayout.js +76 -14
- package/dist/components/layout/RPLayout.js +74 -24
- package/dist/components/layout/WrapperLayout.js +7 -8
- package/dist/components/layout/sidebar/RPSidebar.js +51 -12
- package/dist/components/layout/sidebar/RPSplitter.js +7 -9
- package/dist/components/layout/sidebar/Thumbnail.js +49 -2
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +307 -24
- package/dist/components/layout/toolbar/FileDownloadTool.js +23 -13
- package/dist/components/layout/toolbar/MenuItem.js +6 -7
- package/dist/components/layout/toolbar/MenuSeparator.js +4 -5
- package/dist/components/layout/toolbar/MostPageTool.js +50 -23
- package/dist/components/layout/toolbar/OtherTool.js +115 -22
- package/dist/components/layout/toolbar/Paginate.js +99 -17
- package/dist/components/layout/toolbar/PrintTool.js +43 -13
- package/dist/components/layout/toolbar/PropertyItem.js +5 -8
- package/dist/components/layout/toolbar/RPToolbar.js +28 -7
- package/dist/components/layout/toolbar/RPToolbarEnd.js +22 -7
- package/dist/components/layout/toolbar/RotateTool.js +20 -21
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchCloseButton.js +19 -7
- package/dist/components/layout/toolbar/SearchResultNavigator.js +42 -8
- package/dist/components/layout/toolbar/SearchTool.js +198 -29
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ThumbnailTool.js +3 -3
- package/dist/components/layout/toolbar/ToolbarCustom.js +48 -20
- package/dist/components/layout/toolbar/ToolbarDefault.js +82 -0
- package/dist/components/layout/toolbar/ToolbarLayout.js +10 -0
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +140 -28
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +3 -3
- package/dist/components/layout/toolbar/tools/InputPageTool.js +11 -11
- package/dist/components/layout/toolbar/tools/NextPageTool.js +21 -18
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PrintTool.js +3 -3
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +10 -10
- package/dist/components/layout/toolbar/tools/defaults/{TopbarDefaultTools.js → RPHorizontalBar.js} +29 -20
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +16 -0
- package/dist/components/page/AnnotationLayer.js +20 -17
- package/dist/components/page/CanvasLayer.js +20 -18
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +20 -17
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +20 -17
- package/dist/components/page/TextLayer.js +20 -17
- package/dist/components/ui/Checkbox.js +125 -239
- package/dist/components/ui/DropDown.js +13 -19
- package/dist/components/ui/LoadingIndicator.js +22 -5
- package/dist/components/ui/RPTooltip.js +133 -133
- package/dist/contexts/ElementPageContext.js +37 -37
- package/dist/contexts/FileInputContext.js +18 -20
- package/dist/contexts/PaginationContext.js +4 -4
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +10 -0
- package/dist/contexts/SearchContext.js +3 -3
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/contexts/ViewportContext.js +42 -35
- package/dist/index-2160dd99.js +307 -0
- package/dist/{index-5f66a29f.js → index-492f99d0.js} +491 -515
- package/dist/index-49b9a615.js +978 -0
- package/dist/main.js +76 -73
- package/dist/types/components/layout/RPDefaultLayout.d.ts +2 -1
- package/dist/types/components/layout/RPLayout.d.ts +2 -1
- package/dist/types/components/layout/sidebar/Thumbnail.d.ts +0 -1
- package/dist/types/components/layout/toolbar/RPToolbar.d.ts +2 -3
- package/dist/types/components/layout/toolbar/ToolbarCustom.d.ts +2 -2
- package/dist/types/components/layout/toolbar/ToolbarDefault.d.ts +4 -0
- package/dist/types/components/layout/toolbar/ToolbarLayout.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/defaults/RPHorizontalBar.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/defaults/RPVerticalBar.d.ts +3 -0
- package/dist/types/contexts/RenderQueueProvider.d.ts +16 -0
- package/dist/types/main.d.ts +3 -3
- package/dist/types/utils/Queue.d.ts +18 -0
- package/dist/types/utils/renderPage.d.ts +1 -6
- package/dist/types/utils/types.d.ts +22 -17
- package/dist/utils/Queue.js +47 -0
- package/dist/utils/hooks/useFileDownload.js +20 -17
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePageRotateContext.js +14 -14
- package/dist/utils/hooks/usePaginate.js +20 -17
- package/dist/utils/hooks/usePresentPage.js +20 -17
- package/dist/utils/hooks/usePrint.js +20 -17
- package/dist/utils/hooks/useScrollToPage.js +20 -17
- package/dist/utils/hooks/useSearch.js +20 -17
- package/dist/utils/hooks/useThumbnail.js +20 -18
- package/dist/utils/hooks/useVirtualReactWindow.js +20 -17
- package/package.json +1 -1
- package/dist/RPLayout-5892502c.js +0 -3494
- package/dist/SearchCloseButton-cbf182aa.js +0 -33
- package/dist/assets/RPLayout.css +0 -1
- package/dist/components/layout/toolbar/tools/defaults/LeftSidebarDefaultTools.js +0 -16
- package/dist/index-00f8683a.js +0 -1672
- package/dist/index-6b37f504.js +0 -332
- package/dist/types/components/layout/toolbar/tools/defaults/LeftSidebarDefaultTools.d.ts +0 -3
- package/dist/types/components/layout/toolbar/tools/defaults/TopbarDefaultTools.d.ts +0 -3
- /package/dist/assets/{RPDropFileZone.css → RPTheme.css} +0 -0
- /package/dist/assets/{SearchCloseButton.css → SearchTool.css} +0 -0
|
@@ -1,31 +1,22 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { useLayoutEffect as
|
|
3
|
-
import {
|
|
4
|
-
import { jsx as
|
|
5
|
-
import * as
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
e.current = t;
|
|
10
|
-
}), w.useMemo(() => (...n) => {
|
|
11
|
-
var o;
|
|
12
|
-
return (o = e.current) == null ? void 0 : o.call(e, ...n);
|
|
13
|
-
}, []);
|
|
14
|
-
}
|
|
15
|
-
function _e(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
16
|
-
const n = gt(t);
|
|
17
|
-
w.useEffect(() => {
|
|
1
|
+
import * as y from "react";
|
|
2
|
+
import { useLayoutEffect as Te, useEffect as Me } from "react";
|
|
3
|
+
import { h as mt, u as gt, P as it, a as vt, j as ke, k as Et, c as Fe, f as Ne } from "./index-2160dd99.js";
|
|
4
|
+
import { jsx as H } from "react/jsx-runtime";
|
|
5
|
+
import * as $e from "react-dom";
|
|
6
|
+
function We(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
7
|
+
const n = mt(t);
|
|
8
|
+
y.useEffect(() => {
|
|
18
9
|
const o = (r) => {
|
|
19
10
|
r.key === "Escape" && n(r);
|
|
20
11
|
};
|
|
21
12
|
return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
|
|
22
13
|
}, [n, e]);
|
|
23
14
|
}
|
|
24
|
-
var
|
|
15
|
+
var Be = "DismissableLayer", Pt = "dismissableLayer.update", He = "dismissableLayer.pointerDownOutside", _e = "dismissableLayer.focusOutside", Yt, te = y.createContext({
|
|
25
16
|
layers: /* @__PURE__ */ new Set(),
|
|
26
17
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
27
18
|
branches: /* @__PURE__ */ new Set()
|
|
28
|
-
}),
|
|
19
|
+
}), Ie = y.forwardRef(
|
|
29
20
|
(t, e) => {
|
|
30
21
|
const {
|
|
31
22
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -35,26 +26,26 @@ var He = "DismissableLayer", Pt = "dismissableLayer.update", Ie = "dismissableLa
|
|
|
35
26
|
onInteractOutside: s,
|
|
36
27
|
onDismiss: c,
|
|
37
28
|
...f
|
|
38
|
-
} = t,
|
|
39
|
-
const C =
|
|
40
|
-
!b || M || (r == null || r(
|
|
41
|
-
}, p),
|
|
42
|
-
const C =
|
|
43
|
-
[...
|
|
29
|
+
} = t, l = y.useContext(te), [a, u] = y.useState(null), p = (a == null ? void 0 : a.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, d] = y.useState({}), h = gt(e, (x) => u(x)), m = Array.from(l.layers), [w] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), g = m.indexOf(w), v = a ? m.indexOf(a) : -1, E = l.layersWithOutsidePointerEventsDisabled.size > 0, b = v >= g, A = Ye((x) => {
|
|
30
|
+
const C = x.target, M = [...l.branches].some((O) => O.contains(C));
|
|
31
|
+
!b || M || (r == null || r(x), s == null || s(x), x.defaultPrevented || c == null || c());
|
|
32
|
+
}, p), P = je((x) => {
|
|
33
|
+
const C = x.target;
|
|
34
|
+
[...l.branches].some((O) => O.contains(C)) || (i == null || i(x), s == null || s(x), x.defaultPrevented || c == null || c());
|
|
44
35
|
}, p);
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
}, p),
|
|
48
|
-
if (
|
|
49
|
-
return n && (
|
|
50
|
-
n &&
|
|
36
|
+
return We((x) => {
|
|
37
|
+
v === l.layers.size - 1 && (o == null || o(x), !x.defaultPrevented && c && (x.preventDefault(), c()));
|
|
38
|
+
}, p), y.useEffect(() => {
|
|
39
|
+
if (a)
|
|
40
|
+
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Yt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(a)), l.layers.add(a), jt(), () => {
|
|
41
|
+
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = Yt);
|
|
51
42
|
};
|
|
52
|
-
}, [
|
|
53
|
-
|
|
54
|
-
}, [
|
|
55
|
-
const
|
|
56
|
-
return document.addEventListener(Pt,
|
|
57
|
-
}, []), /* @__PURE__ */
|
|
43
|
+
}, [a, p, n, l]), y.useEffect(() => () => {
|
|
44
|
+
a && (l.layers.delete(a), l.layersWithOutsidePointerEventsDisabled.delete(a), jt());
|
|
45
|
+
}, [a, l]), y.useEffect(() => {
|
|
46
|
+
const x = () => d({});
|
|
47
|
+
return document.addEventListener(Pt, x), () => document.removeEventListener(Pt, x);
|
|
48
|
+
}, []), /* @__PURE__ */ H(
|
|
58
49
|
it.div,
|
|
59
50
|
{
|
|
60
51
|
...f,
|
|
@@ -63,8 +54,8 @@ var He = "DismissableLayer", Pt = "dismissableLayer.update", Ie = "dismissableLa
|
|
|
63
54
|
pointerEvents: E ? b ? "auto" : "none" : void 0,
|
|
64
55
|
...t.style
|
|
65
56
|
},
|
|
66
|
-
onFocusCapture: vt(t.onFocusCapture,
|
|
67
|
-
onBlurCapture: vt(t.onBlurCapture,
|
|
57
|
+
onFocusCapture: vt(t.onFocusCapture, P.onFocusCapture),
|
|
58
|
+
onBlurCapture: vt(t.onBlurCapture, P.onBlurCapture),
|
|
68
59
|
onPointerDownCapture: vt(
|
|
69
60
|
t.onPointerDownCapture,
|
|
70
61
|
A.onPointerDownCapture
|
|
@@ -73,33 +64,33 @@ var He = "DismissableLayer", Pt = "dismissableLayer.update", Ie = "dismissableLa
|
|
|
73
64
|
);
|
|
74
65
|
}
|
|
75
66
|
);
|
|
76
|
-
|
|
77
|
-
var
|
|
78
|
-
const n =
|
|
79
|
-
return
|
|
67
|
+
Ie.displayName = Be;
|
|
68
|
+
var ze = "DismissableLayerBranch", Ve = y.forwardRef((t, e) => {
|
|
69
|
+
const n = y.useContext(te), o = y.useRef(null), r = gt(e, o);
|
|
70
|
+
return y.useEffect(() => {
|
|
80
71
|
const i = o.current;
|
|
81
72
|
if (i)
|
|
82
73
|
return n.branches.add(i), () => {
|
|
83
74
|
n.branches.delete(i);
|
|
84
75
|
};
|
|
85
|
-
}, [n.branches]), /* @__PURE__ */
|
|
76
|
+
}, [n.branches]), /* @__PURE__ */ H(it.div, { ...t, ref: r });
|
|
86
77
|
});
|
|
87
|
-
|
|
88
|
-
function
|
|
89
|
-
const n =
|
|
78
|
+
Ve.displayName = ze;
|
|
79
|
+
function Ye(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
80
|
+
const n = mt(t), o = y.useRef(!1), r = y.useRef(() => {
|
|
90
81
|
});
|
|
91
|
-
return
|
|
82
|
+
return y.useEffect(() => {
|
|
92
83
|
const i = (c) => {
|
|
93
84
|
if (c.target && !o.current) {
|
|
94
85
|
let f = function() {
|
|
95
|
-
|
|
96
|
-
|
|
86
|
+
ee(
|
|
87
|
+
He,
|
|
97
88
|
n,
|
|
98
|
-
|
|
89
|
+
l,
|
|
99
90
|
{ discrete: !0 }
|
|
100
91
|
);
|
|
101
92
|
};
|
|
102
|
-
const
|
|
93
|
+
const l = { originalEvent: c };
|
|
103
94
|
c.pointerType === "touch" ? (e.removeEventListener("click", r.current), r.current = f, e.addEventListener("click", r.current, { once: !0 })) : f();
|
|
104
95
|
} else
|
|
105
96
|
e.removeEventListener("click", r.current);
|
|
@@ -115,11 +106,11 @@ function Xe(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
|
115
106
|
onPointerDownCapture: () => o.current = !0
|
|
116
107
|
};
|
|
117
108
|
}
|
|
118
|
-
function
|
|
119
|
-
const n =
|
|
120
|
-
return
|
|
109
|
+
function je(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
110
|
+
const n = mt(t), o = y.useRef(!1);
|
|
111
|
+
return y.useEffect(() => {
|
|
121
112
|
const r = (i) => {
|
|
122
|
-
i.target && !o.current &&
|
|
113
|
+
i.target && !o.current && ee(_e, n, { originalEvent: i }, {
|
|
123
114
|
discrete: !1
|
|
124
115
|
});
|
|
125
116
|
};
|
|
@@ -133,37 +124,37 @@ function jt() {
|
|
|
133
124
|
const t = new CustomEvent(Pt);
|
|
134
125
|
document.dispatchEvent(t);
|
|
135
126
|
}
|
|
136
|
-
function
|
|
127
|
+
function ee(t, e, n, { discrete: o }) {
|
|
137
128
|
const r = n.originalEvent.target, i = new CustomEvent(t, { bubbles: !1, cancelable: !0, detail: n });
|
|
138
129
|
e && r.addEventListener(t, e, { once: !0 }), o ? ke(r, i) : r.dispatchEvent(i);
|
|
139
130
|
}
|
|
140
|
-
var
|
|
141
|
-
}),
|
|
142
|
-
function
|
|
143
|
-
const [e, n] =
|
|
131
|
+
var Xe = y["useId".toString()] || (() => {
|
|
132
|
+
}), Ue = 0;
|
|
133
|
+
function oo(t) {
|
|
134
|
+
const [e, n] = y.useState(Xe());
|
|
144
135
|
return Et(() => {
|
|
145
|
-
t || n((o) => o ?? String(
|
|
136
|
+
t || n((o) => o ?? String(Ue++));
|
|
146
137
|
}, [t]), t || (e ? `radix-${e}` : "");
|
|
147
138
|
}
|
|
148
|
-
const
|
|
139
|
+
const qe = ["top", "right", "bottom", "left"], q = Math.min, $ = Math.max, ut = Math.round, at = Math.floor, V = (t) => ({
|
|
149
140
|
x: t,
|
|
150
141
|
y: t
|
|
151
|
-
}),
|
|
142
|
+
}), Ke = {
|
|
152
143
|
left: "right",
|
|
153
144
|
right: "left",
|
|
154
145
|
bottom: "top",
|
|
155
146
|
top: "bottom"
|
|
156
|
-
},
|
|
147
|
+
}, Ze = {
|
|
157
148
|
start: "end",
|
|
158
149
|
end: "start"
|
|
159
150
|
};
|
|
160
151
|
function Rt(t, e, n) {
|
|
161
|
-
return
|
|
152
|
+
return $(t, q(e, n));
|
|
162
153
|
}
|
|
163
|
-
function
|
|
154
|
+
function X(t, e) {
|
|
164
155
|
return typeof t == "function" ? t(e) : t;
|
|
165
156
|
}
|
|
166
|
-
function
|
|
157
|
+
function U(t) {
|
|
167
158
|
return t.split("-")[0];
|
|
168
159
|
}
|
|
169
160
|
function tt(t) {
|
|
@@ -175,48 +166,47 @@ function St(t) {
|
|
|
175
166
|
function Dt(t) {
|
|
176
167
|
return t === "y" ? "height" : "width";
|
|
177
168
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
return Qe.has(q(t)) ? "y" : "x";
|
|
169
|
+
function K(t) {
|
|
170
|
+
return ["top", "bottom"].includes(U(t)) ? "y" : "x";
|
|
181
171
|
}
|
|
182
172
|
function Lt(t) {
|
|
183
|
-
return St(
|
|
173
|
+
return St(K(t));
|
|
184
174
|
}
|
|
185
|
-
function
|
|
175
|
+
function Ge(t, e, n) {
|
|
186
176
|
n === void 0 && (n = !1);
|
|
187
177
|
const o = tt(t), r = Lt(t), i = Dt(r);
|
|
188
178
|
let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
189
179
|
return e.reference[i] > e.floating[i] && (s = dt(s)), [s, dt(s)];
|
|
190
180
|
}
|
|
191
|
-
function
|
|
181
|
+
function Je(t) {
|
|
192
182
|
const e = dt(t);
|
|
193
183
|
return [Ct(t), e, Ct(e)];
|
|
194
184
|
}
|
|
195
185
|
function Ct(t) {
|
|
196
|
-
return t.replace(/start|end/g, (e) =>
|
|
186
|
+
return t.replace(/start|end/g, (e) => Ze[e]);
|
|
197
187
|
}
|
|
198
|
-
|
|
199
|
-
|
|
188
|
+
function Qe(t, e, n) {
|
|
189
|
+
const o = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
200
190
|
switch (t) {
|
|
201
191
|
case "top":
|
|
202
192
|
case "bottom":
|
|
203
|
-
return n ? e ?
|
|
193
|
+
return n ? e ? r : o : e ? o : r;
|
|
204
194
|
case "left":
|
|
205
195
|
case "right":
|
|
206
|
-
return e ?
|
|
196
|
+
return e ? i : s;
|
|
207
197
|
default:
|
|
208
198
|
return [];
|
|
209
199
|
}
|
|
210
200
|
}
|
|
211
|
-
function
|
|
201
|
+
function tn(t, e, n, o) {
|
|
212
202
|
const r = tt(t);
|
|
213
|
-
let i =
|
|
203
|
+
let i = Qe(U(t), n === "start", o);
|
|
214
204
|
return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Ct)))), i;
|
|
215
205
|
}
|
|
216
206
|
function dt(t) {
|
|
217
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
207
|
+
return t.replace(/left|right|bottom|top/g, (e) => Ke[e]);
|
|
218
208
|
}
|
|
219
|
-
function
|
|
209
|
+
function en(t) {
|
|
220
210
|
return {
|
|
221
211
|
top: 0,
|
|
222
212
|
right: 0,
|
|
@@ -225,8 +215,8 @@ function cn(t) {
|
|
|
225
215
|
...t
|
|
226
216
|
};
|
|
227
217
|
}
|
|
228
|
-
function
|
|
229
|
-
return typeof t != "number" ?
|
|
218
|
+
function ne(t) {
|
|
219
|
+
return typeof t != "number" ? en(t) : {
|
|
230
220
|
top: t,
|
|
231
221
|
right: t,
|
|
232
222
|
bottom: t,
|
|
@@ -251,23 +241,23 @@ function pt(t) {
|
|
|
251
241
|
y: n
|
|
252
242
|
};
|
|
253
243
|
}
|
|
254
|
-
function
|
|
244
|
+
function Xt(t, e, n) {
|
|
255
245
|
let {
|
|
256
246
|
reference: o,
|
|
257
247
|
floating: r
|
|
258
248
|
} = t;
|
|
259
|
-
const i =
|
|
249
|
+
const i = K(e), s = Lt(e), c = Dt(s), f = U(e), l = i === "y", a = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, p = o[c] / 2 - r[c] / 2;
|
|
260
250
|
let d;
|
|
261
251
|
switch (f) {
|
|
262
252
|
case "top":
|
|
263
253
|
d = {
|
|
264
|
-
x:
|
|
254
|
+
x: a,
|
|
265
255
|
y: o.y - r.height
|
|
266
256
|
};
|
|
267
257
|
break;
|
|
268
258
|
case "bottom":
|
|
269
259
|
d = {
|
|
270
|
-
x:
|
|
260
|
+
x: a,
|
|
271
261
|
y: o.y + o.height
|
|
272
262
|
};
|
|
273
263
|
break;
|
|
@@ -291,69 +281,69 @@ function qt(t, e, n) {
|
|
|
291
281
|
}
|
|
292
282
|
switch (tt(e)) {
|
|
293
283
|
case "start":
|
|
294
|
-
d[s] -= p * (n &&
|
|
284
|
+
d[s] -= p * (n && l ? -1 : 1);
|
|
295
285
|
break;
|
|
296
286
|
case "end":
|
|
297
|
-
d[s] += p * (n &&
|
|
287
|
+
d[s] += p * (n && l ? -1 : 1);
|
|
298
288
|
break;
|
|
299
289
|
}
|
|
300
290
|
return d;
|
|
301
291
|
}
|
|
302
|
-
const
|
|
292
|
+
const nn = async (t, e, n) => {
|
|
303
293
|
const {
|
|
304
294
|
placement: o = "bottom",
|
|
305
295
|
strategy: r = "absolute",
|
|
306
296
|
middleware: i = [],
|
|
307
297
|
platform: s
|
|
308
298
|
} = n, c = i.filter(Boolean), f = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
309
|
-
let
|
|
299
|
+
let l = await s.getElementRects({
|
|
310
300
|
reference: t,
|
|
311
301
|
floating: e,
|
|
312
302
|
strategy: r
|
|
313
303
|
}), {
|
|
314
|
-
x:
|
|
304
|
+
x: a,
|
|
315
305
|
y: u
|
|
316
|
-
} =
|
|
306
|
+
} = Xt(l, o, f), p = o, d = {}, h = 0;
|
|
317
307
|
for (let m = 0; m < c.length; m++) {
|
|
318
308
|
const {
|
|
319
|
-
name:
|
|
309
|
+
name: w,
|
|
320
310
|
fn: g
|
|
321
311
|
} = c[m], {
|
|
322
|
-
x,
|
|
312
|
+
x: v,
|
|
323
313
|
y: E,
|
|
324
314
|
data: b,
|
|
325
315
|
reset: A
|
|
326
316
|
} = await g({
|
|
327
|
-
x:
|
|
317
|
+
x: a,
|
|
328
318
|
y: u,
|
|
329
319
|
initialPlacement: o,
|
|
330
320
|
placement: p,
|
|
331
321
|
strategy: r,
|
|
332
322
|
middlewareData: d,
|
|
333
|
-
rects:
|
|
323
|
+
rects: l,
|
|
334
324
|
platform: s,
|
|
335
325
|
elements: {
|
|
336
326
|
reference: t,
|
|
337
327
|
floating: e
|
|
338
328
|
}
|
|
339
329
|
});
|
|
340
|
-
|
|
330
|
+
a = v ?? a, u = E ?? u, d = {
|
|
341
331
|
...d,
|
|
342
|
-
[
|
|
343
|
-
...d[
|
|
332
|
+
[w]: {
|
|
333
|
+
...d[w],
|
|
344
334
|
...b
|
|
345
335
|
}
|
|
346
|
-
}, A && h <= 50 && (h++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (
|
|
336
|
+
}, A && h <= 50 && (h++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (l = A.rects === !0 ? await s.getElementRects({
|
|
347
337
|
reference: t,
|
|
348
338
|
floating: e,
|
|
349
339
|
strategy: r
|
|
350
340
|
}) : A.rects), {
|
|
351
|
-
x:
|
|
341
|
+
x: a,
|
|
352
342
|
y: u
|
|
353
|
-
} =
|
|
343
|
+
} = Xt(l, p, f)), m = -1);
|
|
354
344
|
}
|
|
355
345
|
return {
|
|
356
|
-
x:
|
|
346
|
+
x: a,
|
|
357
347
|
y: u,
|
|
358
348
|
placement: p,
|
|
359
349
|
strategy: r,
|
|
@@ -371,17 +361,17 @@ async function ot(t, e) {
|
|
|
371
361
|
elements: c,
|
|
372
362
|
strategy: f
|
|
373
363
|
} = t, {
|
|
374
|
-
boundary:
|
|
375
|
-
rootBoundary:
|
|
364
|
+
boundary: l = "clippingAncestors",
|
|
365
|
+
rootBoundary: a = "viewport",
|
|
376
366
|
elementContext: u = "floating",
|
|
377
367
|
altBoundary: p = !1,
|
|
378
368
|
padding: d = 0
|
|
379
|
-
} =
|
|
380
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(
|
|
381
|
-
boundary:
|
|
382
|
-
rootBoundary:
|
|
369
|
+
} = X(e, t), h = ne(d), w = c[p ? u === "floating" ? "reference" : "floating" : u], g = pt(await i.getClippingRect({
|
|
370
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
371
|
+
boundary: l,
|
|
372
|
+
rootBoundary: a,
|
|
383
373
|
strategy: f
|
|
384
|
-
})),
|
|
374
|
+
})), v = u === "floating" ? {
|
|
385
375
|
x: o,
|
|
386
376
|
y: r,
|
|
387
377
|
width: s.floating.width,
|
|
@@ -394,10 +384,10 @@ async function ot(t, e) {
|
|
|
394
384
|
y: 1
|
|
395
385
|
}, A = pt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
396
386
|
elements: c,
|
|
397
|
-
rect:
|
|
387
|
+
rect: v,
|
|
398
388
|
offsetParent: E,
|
|
399
389
|
strategy: f
|
|
400
|
-
}) :
|
|
390
|
+
}) : v);
|
|
401
391
|
return {
|
|
402
392
|
top: (g.top - A.top + h.top) / b.y,
|
|
403
393
|
bottom: (A.bottom - g.bottom + h.bottom) / b.y,
|
|
@@ -405,7 +395,7 @@ async function ot(t, e) {
|
|
|
405
395
|
right: (A.right - g.right + h.right) / b.x
|
|
406
396
|
};
|
|
407
397
|
}
|
|
408
|
-
const
|
|
398
|
+
const on = (t) => ({
|
|
409
399
|
name: "arrow",
|
|
410
400
|
options: t,
|
|
411
401
|
async fn(e) {
|
|
@@ -418,23 +408,23 @@ const ln = (t) => ({
|
|
|
418
408
|
elements: c,
|
|
419
409
|
middlewareData: f
|
|
420
410
|
} = e, {
|
|
421
|
-
element:
|
|
422
|
-
padding:
|
|
423
|
-
} =
|
|
424
|
-
if (
|
|
411
|
+
element: l,
|
|
412
|
+
padding: a = 0
|
|
413
|
+
} = X(t, e) || {};
|
|
414
|
+
if (l == null)
|
|
425
415
|
return {};
|
|
426
|
-
const u =
|
|
416
|
+
const u = ne(a), p = {
|
|
427
417
|
x: n,
|
|
428
418
|
y: o
|
|
429
|
-
}, d = Lt(r), h = Dt(d), m = await s.getDimensions(
|
|
430
|
-
let
|
|
431
|
-
(!
|
|
432
|
-
const C = b / 2 - A / 2, M =
|
|
419
|
+
}, d = Lt(r), h = Dt(d), m = await s.getDimensions(l), w = d === "y", g = w ? "top" : "left", v = w ? "bottom" : "right", E = w ? "clientHeight" : "clientWidth", b = i.reference[h] + i.reference[d] - p[d] - i.floating[h], A = p[d] - i.reference[d], P = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
420
|
+
let x = P ? P[E] : 0;
|
|
421
|
+
(!x || !await (s.isElement == null ? void 0 : s.isElement(P))) && (x = c.floating[E] || i.floating[h]);
|
|
422
|
+
const C = b / 2 - A / 2, M = x / 2 - m[h] / 2 - 1, O = q(u[g], M), F = q(u[v], M), N = O, D = x - m[h] - F, S = x / 2 - m[h] / 2 + C, B = Rt(N, S, D), L = !f.arrow && tt(r) != null && S !== B && i.reference[h] / 2 - (S < N ? O : F) - m[h] / 2 < 0, T = L ? S < N ? S - N : S - D : 0;
|
|
433
423
|
return {
|
|
434
424
|
[d]: p[d] + T,
|
|
435
425
|
data: {
|
|
436
|
-
[d]:
|
|
437
|
-
centerOffset: S -
|
|
426
|
+
[d]: B,
|
|
427
|
+
centerOffset: S - B - T,
|
|
438
428
|
...L && {
|
|
439
429
|
alignmentOffset: T
|
|
440
430
|
}
|
|
@@ -442,7 +432,7 @@ const ln = (t) => ({
|
|
|
442
432
|
reset: L
|
|
443
433
|
};
|
|
444
434
|
}
|
|
445
|
-
}),
|
|
435
|
+
}), rn = function(t) {
|
|
446
436
|
return t === void 0 && (t = {}), {
|
|
447
437
|
name: "flip",
|
|
448
438
|
options: t,
|
|
@@ -454,58 +444,56 @@ const ln = (t) => ({
|
|
|
454
444
|
rects: s,
|
|
455
445
|
initialPlacement: c,
|
|
456
446
|
platform: f,
|
|
457
|
-
elements:
|
|
447
|
+
elements: l
|
|
458
448
|
} = e, {
|
|
459
|
-
mainAxis:
|
|
449
|
+
mainAxis: a = !0,
|
|
460
450
|
crossAxis: u = !0,
|
|
461
451
|
fallbackPlacements: p,
|
|
462
452
|
fallbackStrategy: d = "bestFit",
|
|
463
453
|
fallbackAxisSideDirection: h = "none",
|
|
464
454
|
flipAlignment: m = !0,
|
|
465
|
-
...
|
|
466
|
-
} =
|
|
455
|
+
...w
|
|
456
|
+
} = X(t, e);
|
|
467
457
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
468
458
|
return {};
|
|
469
|
-
const g =
|
|
470
|
-
!p &&
|
|
471
|
-
const
|
|
459
|
+
const g = U(r), v = K(c), E = U(c) === c, b = await (f.isRTL == null ? void 0 : f.isRTL(l.floating)), A = p || (E || !m ? [dt(c)] : Je(c)), P = h !== "none";
|
|
460
|
+
!p && P && A.push(...tn(c, m, h, b));
|
|
461
|
+
const x = [c, ...A], C = await ot(e, w), M = [];
|
|
472
462
|
let O = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
473
|
-
if (
|
|
474
|
-
const S =
|
|
463
|
+
if (a && M.push(C[g]), u) {
|
|
464
|
+
const S = Ge(r, s, b);
|
|
475
465
|
M.push(C[S[0]], C[S[1]]);
|
|
476
466
|
}
|
|
477
467
|
if (O = [...O, {
|
|
478
468
|
placement: r,
|
|
479
469
|
overflows: M
|
|
480
470
|
}], !M.every((S) => S <= 0)) {
|
|
481
|
-
var
|
|
482
|
-
const S = (((
|
|
483
|
-
if (
|
|
484
|
-
// overflows the main axis.
|
|
485
|
-
O.every((P) => z(P.placement) === x ? P.overflows[0] > 0 : !0)))
|
|
471
|
+
var F, N;
|
|
472
|
+
const S = (((F = i.flip) == null ? void 0 : F.index) || 0) + 1, B = x[S];
|
|
473
|
+
if (B)
|
|
486
474
|
return {
|
|
487
475
|
data: {
|
|
488
476
|
index: S,
|
|
489
477
|
overflows: O
|
|
490
478
|
},
|
|
491
479
|
reset: {
|
|
492
|
-
placement:
|
|
480
|
+
placement: B
|
|
493
481
|
}
|
|
494
482
|
};
|
|
495
|
-
let L = (
|
|
483
|
+
let L = (N = O.filter((T) => T.overflows[0] <= 0).sort((T, R) => T.overflows[1] - R.overflows[1])[0]) == null ? void 0 : N.placement;
|
|
496
484
|
if (!L)
|
|
497
485
|
switch (d) {
|
|
498
486
|
case "bestFit": {
|
|
499
487
|
var D;
|
|
500
|
-
const T = (D = O.filter((
|
|
501
|
-
if (
|
|
502
|
-
const
|
|
503
|
-
return
|
|
488
|
+
const T = (D = O.filter((R) => {
|
|
489
|
+
if (P) {
|
|
490
|
+
const k = K(R.placement);
|
|
491
|
+
return k === v || // Create a bias to the `y` side axis due to horizontal
|
|
504
492
|
// reading directions favoring greater width.
|
|
505
|
-
|
|
493
|
+
k === "y";
|
|
506
494
|
}
|
|
507
495
|
return !0;
|
|
508
|
-
}).map((
|
|
496
|
+
}).map((R) => [R.placement, R.overflows.filter((k) => k > 0).reduce((k, z) => k + z, 0)]).sort((R, k) => R[1] - k[1])[0]) == null ? void 0 : D[0];
|
|
509
497
|
T && (L = T);
|
|
510
498
|
break;
|
|
511
499
|
}
|
|
@@ -524,7 +512,7 @@ const ln = (t) => ({
|
|
|
524
512
|
}
|
|
525
513
|
};
|
|
526
514
|
};
|
|
527
|
-
function
|
|
515
|
+
function Ut(t, e) {
|
|
528
516
|
return {
|
|
529
517
|
top: t.top - e.height,
|
|
530
518
|
right: t.right - e.width,
|
|
@@ -532,10 +520,10 @@ function Kt(t, e) {
|
|
|
532
520
|
left: t.left - e.width
|
|
533
521
|
};
|
|
534
522
|
}
|
|
535
|
-
function
|
|
536
|
-
return
|
|
523
|
+
function qt(t) {
|
|
524
|
+
return qe.some((e) => t[e] >= 0);
|
|
537
525
|
}
|
|
538
|
-
const
|
|
526
|
+
const sn = function(t) {
|
|
539
527
|
return t === void 0 && (t = {}), {
|
|
540
528
|
name: "hide",
|
|
541
529
|
options: t,
|
|
@@ -545,17 +533,17 @@ const un = function(t) {
|
|
|
545
533
|
} = e, {
|
|
546
534
|
strategy: o = "referenceHidden",
|
|
547
535
|
...r
|
|
548
|
-
} =
|
|
536
|
+
} = X(t, e);
|
|
549
537
|
switch (o) {
|
|
550
538
|
case "referenceHidden": {
|
|
551
539
|
const i = await ot(e, {
|
|
552
540
|
...r,
|
|
553
541
|
elementContext: "reference"
|
|
554
|
-
}), s =
|
|
542
|
+
}), s = Ut(i, n.reference);
|
|
555
543
|
return {
|
|
556
544
|
data: {
|
|
557
545
|
referenceHiddenOffsets: s,
|
|
558
|
-
referenceHidden:
|
|
546
|
+
referenceHidden: qt(s)
|
|
559
547
|
}
|
|
560
548
|
};
|
|
561
549
|
}
|
|
@@ -563,11 +551,11 @@ const un = function(t) {
|
|
|
563
551
|
const i = await ot(e, {
|
|
564
552
|
...r,
|
|
565
553
|
altBoundary: !0
|
|
566
|
-
}), s =
|
|
554
|
+
}), s = Ut(i, n.floating);
|
|
567
555
|
return {
|
|
568
556
|
data: {
|
|
569
557
|
escapedOffsets: s,
|
|
570
|
-
escaped:
|
|
558
|
+
escaped: qt(s)
|
|
571
559
|
}
|
|
572
560
|
};
|
|
573
561
|
}
|
|
@@ -576,13 +564,13 @@ const un = function(t) {
|
|
|
576
564
|
}
|
|
577
565
|
}
|
|
578
566
|
};
|
|
579
|
-
}
|
|
580
|
-
async function
|
|
567
|
+
};
|
|
568
|
+
async function cn(t, e) {
|
|
581
569
|
const {
|
|
582
570
|
placement: n,
|
|
583
571
|
platform: o,
|
|
584
572
|
elements: r
|
|
585
|
-
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s =
|
|
573
|
+
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = U(n), c = tt(n), f = K(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, a = i && f ? -1 : 1, u = X(e, t);
|
|
586
574
|
let {
|
|
587
575
|
mainAxis: p,
|
|
588
576
|
crossAxis: d,
|
|
@@ -597,14 +585,14 @@ async function dn(t, e) {
|
|
|
597
585
|
alignmentAxis: u.alignmentAxis
|
|
598
586
|
};
|
|
599
587
|
return c && typeof h == "number" && (d = c === "end" ? h * -1 : h), f ? {
|
|
600
|
-
x: d *
|
|
601
|
-
y: p *
|
|
588
|
+
x: d * a,
|
|
589
|
+
y: p * l
|
|
602
590
|
} : {
|
|
603
|
-
x: p *
|
|
604
|
-
y: d *
|
|
591
|
+
x: p * l,
|
|
592
|
+
y: d * a
|
|
605
593
|
};
|
|
606
594
|
}
|
|
607
|
-
const
|
|
595
|
+
const ln = function(t) {
|
|
608
596
|
return t === void 0 && (t = 0), {
|
|
609
597
|
name: "offset",
|
|
610
598
|
options: t,
|
|
@@ -615,7 +603,7 @@ const pn = function(t) {
|
|
|
615
603
|
y: i,
|
|
616
604
|
placement: s,
|
|
617
605
|
middlewareData: c
|
|
618
|
-
} = e, f = await
|
|
606
|
+
} = e, f = await cn(e, t);
|
|
619
607
|
return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
620
608
|
x: r + f.x,
|
|
621
609
|
y: i + f.y,
|
|
@@ -626,7 +614,7 @@ const pn = function(t) {
|
|
|
626
614
|
};
|
|
627
615
|
}
|
|
628
616
|
};
|
|
629
|
-
},
|
|
617
|
+
}, an = function(t) {
|
|
630
618
|
return t === void 0 && (t = {}), {
|
|
631
619
|
name: "shift",
|
|
632
620
|
options: t,
|
|
@@ -639,30 +627,30 @@ const pn = function(t) {
|
|
|
639
627
|
mainAxis: i = !0,
|
|
640
628
|
crossAxis: s = !1,
|
|
641
629
|
limiter: c = {
|
|
642
|
-
fn: (
|
|
630
|
+
fn: (w) => {
|
|
643
631
|
let {
|
|
644
632
|
x: g,
|
|
645
|
-
y:
|
|
646
|
-
} =
|
|
633
|
+
y: v
|
|
634
|
+
} = w;
|
|
647
635
|
return {
|
|
648
636
|
x: g,
|
|
649
|
-
y:
|
|
637
|
+
y: v
|
|
650
638
|
};
|
|
651
639
|
}
|
|
652
640
|
},
|
|
653
641
|
...f
|
|
654
|
-
} =
|
|
642
|
+
} = X(t, e), l = {
|
|
655
643
|
x: n,
|
|
656
644
|
y: o
|
|
657
|
-
},
|
|
658
|
-
let d =
|
|
645
|
+
}, a = await ot(e, f), u = K(U(r)), p = St(u);
|
|
646
|
+
let d = l[p], h = l[u];
|
|
659
647
|
if (i) {
|
|
660
|
-
const
|
|
661
|
-
d = Rt(
|
|
648
|
+
const w = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", v = d + a[w], E = d - a[g];
|
|
649
|
+
d = Rt(v, d, E);
|
|
662
650
|
}
|
|
663
651
|
if (s) {
|
|
664
|
-
const
|
|
665
|
-
h = Rt(
|
|
652
|
+
const w = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", v = h + a[w], E = h - a[g];
|
|
653
|
+
h = Rt(v, h, E);
|
|
666
654
|
}
|
|
667
655
|
const m = c.fn({
|
|
668
656
|
...e,
|
|
@@ -682,7 +670,7 @@ const pn = function(t) {
|
|
|
682
670
|
};
|
|
683
671
|
}
|
|
684
672
|
};
|
|
685
|
-
},
|
|
673
|
+
}, fn = function(t) {
|
|
686
674
|
return t === void 0 && (t = {}), {
|
|
687
675
|
options: t,
|
|
688
676
|
fn(e) {
|
|
@@ -695,13 +683,13 @@ const pn = function(t) {
|
|
|
695
683
|
} = e, {
|
|
696
684
|
offset: c = 0,
|
|
697
685
|
mainAxis: f = !0,
|
|
698
|
-
crossAxis:
|
|
699
|
-
} =
|
|
686
|
+
crossAxis: l = !0
|
|
687
|
+
} = X(t, e), a = {
|
|
700
688
|
x: n,
|
|
701
689
|
y: o
|
|
702
|
-
}, u =
|
|
703
|
-
let d =
|
|
704
|
-
const m =
|
|
690
|
+
}, u = K(r), p = St(u);
|
|
691
|
+
let d = a[p], h = a[u];
|
|
692
|
+
const m = X(c, e), w = typeof m == "number" ? {
|
|
705
693
|
mainAxis: m,
|
|
706
694
|
crossAxis: 0
|
|
707
695
|
} : {
|
|
@@ -710,13 +698,13 @@ const pn = function(t) {
|
|
|
710
698
|
...m
|
|
711
699
|
};
|
|
712
700
|
if (f) {
|
|
713
|
-
const E = p === "y" ? "height" : "width", b = i.reference[p] - i.floating[E] +
|
|
701
|
+
const E = p === "y" ? "height" : "width", b = i.reference[p] - i.floating[E] + w.mainAxis, A = i.reference[p] + i.reference[E] - w.mainAxis;
|
|
714
702
|
d < b ? d = b : d > A && (d = A);
|
|
715
703
|
}
|
|
716
|
-
if (
|
|
717
|
-
var g,
|
|
718
|
-
const E = p === "y" ? "width" : "height", b =
|
|
719
|
-
h < A ? h = A : h >
|
|
704
|
+
if (l) {
|
|
705
|
+
var g, v;
|
|
706
|
+
const E = p === "y" ? "width" : "height", b = ["top", "left"].includes(U(r)), A = i.reference[u] - i.floating[E] + (b && ((g = s.offset) == null ? void 0 : g[u]) || 0) + (b ? 0 : w.crossAxis), P = i.reference[u] + i.reference[E] + (b ? 0 : ((v = s.offset) == null ? void 0 : v[u]) || 0) - (b ? w.crossAxis : 0);
|
|
707
|
+
h < A ? h = A : h > P && (h = P);
|
|
720
708
|
}
|
|
721
709
|
return {
|
|
722
710
|
[p]: d,
|
|
@@ -724,7 +712,7 @@ const pn = function(t) {
|
|
|
724
712
|
};
|
|
725
713
|
}
|
|
726
714
|
};
|
|
727
|
-
},
|
|
715
|
+
}, un = function(t) {
|
|
728
716
|
return t === void 0 && (t = {}), {
|
|
729
717
|
name: "size",
|
|
730
718
|
options: t,
|
|
@@ -738,23 +726,23 @@ const pn = function(t) {
|
|
|
738
726
|
} = e, {
|
|
739
727
|
apply: f = () => {
|
|
740
728
|
},
|
|
741
|
-
...
|
|
742
|
-
} =
|
|
729
|
+
...l
|
|
730
|
+
} = X(t, e), a = await ot(e, l), u = U(r), p = tt(r), d = K(r) === "y", {
|
|
743
731
|
width: h,
|
|
744
732
|
height: m
|
|
745
733
|
} = i.floating;
|
|
746
|
-
let
|
|
747
|
-
u === "top" || u === "bottom" ? (
|
|
748
|
-
const
|
|
749
|
-
let
|
|
750
|
-
if ((n = e.middlewareData.shift) != null && n.enabled.x && (C = E), (o = e.middlewareData.shift) != null && o.enabled.y && (
|
|
751
|
-
const O =
|
|
752
|
-
d ? C = h - 2 * (O !== 0 ||
|
|
734
|
+
let w, g;
|
|
735
|
+
u === "top" || u === "bottom" ? (w = u, g = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (g = u, w = p === "end" ? "top" : "bottom");
|
|
736
|
+
const v = m - a.top - a.bottom, E = h - a.left - a.right, b = q(m - a[w], v), A = q(h - a[g], E), P = !e.middlewareData.shift;
|
|
737
|
+
let x = b, C = A;
|
|
738
|
+
if ((n = e.middlewareData.shift) != null && n.enabled.x && (C = E), (o = e.middlewareData.shift) != null && o.enabled.y && (x = v), P && !p) {
|
|
739
|
+
const O = $(a.left, 0), F = $(a.right, 0), N = $(a.top, 0), D = $(a.bottom, 0);
|
|
740
|
+
d ? C = h - 2 * (O !== 0 || F !== 0 ? O + F : $(a.left, a.right)) : x = m - 2 * (N !== 0 || D !== 0 ? N + D : $(a.top, a.bottom));
|
|
753
741
|
}
|
|
754
742
|
await f({
|
|
755
743
|
...e,
|
|
756
744
|
availableWidth: C,
|
|
757
|
-
availableHeight:
|
|
745
|
+
availableHeight: x
|
|
758
746
|
});
|
|
759
747
|
const M = await s.getDimensions(c.floating);
|
|
760
748
|
return h !== M.width || m !== M.height ? {
|
|
@@ -769,29 +757,28 @@ function wt() {
|
|
|
769
757
|
return typeof window < "u";
|
|
770
758
|
}
|
|
771
759
|
function et(t) {
|
|
772
|
-
return
|
|
760
|
+
return oe(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
773
761
|
}
|
|
774
|
-
function
|
|
762
|
+
function W(t) {
|
|
775
763
|
var e;
|
|
776
764
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
777
765
|
}
|
|
778
|
-
function
|
|
766
|
+
function j(t) {
|
|
779
767
|
var e;
|
|
780
|
-
return (e = (
|
|
768
|
+
return (e = (oe(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
781
769
|
}
|
|
782
|
-
function
|
|
783
|
-
return wt() ? t instanceof Node || t instanceof
|
|
770
|
+
function oe(t) {
|
|
771
|
+
return wt() ? t instanceof Node || t instanceof W(t).Node : !1;
|
|
784
772
|
}
|
|
785
|
-
function
|
|
786
|
-
return wt() ? t instanceof Element || t instanceof
|
|
773
|
+
function _(t) {
|
|
774
|
+
return wt() ? t instanceof Element || t instanceof W(t).Element : !1;
|
|
787
775
|
}
|
|
788
|
-
function
|
|
789
|
-
return wt() ? t instanceof HTMLElement || t instanceof
|
|
776
|
+
function Y(t) {
|
|
777
|
+
return wt() ? t instanceof HTMLElement || t instanceof W(t).HTMLElement : !1;
|
|
790
778
|
}
|
|
791
|
-
function
|
|
792
|
-
return !wt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof
|
|
779
|
+
function Kt(t) {
|
|
780
|
+
return !wt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof W(t).ShadowRoot;
|
|
793
781
|
}
|
|
794
|
-
const wn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
795
782
|
function st(t) {
|
|
796
783
|
const {
|
|
797
784
|
overflow: e,
|
|
@@ -799,15 +786,13 @@ function st(t) {
|
|
|
799
786
|
overflowY: o,
|
|
800
787
|
display: r
|
|
801
788
|
} = I(t);
|
|
802
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !
|
|
789
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(r);
|
|
803
790
|
}
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
return yn.has(et(t));
|
|
791
|
+
function dn(t) {
|
|
792
|
+
return ["table", "td", "th"].includes(et(t));
|
|
807
793
|
}
|
|
808
|
-
const vn = [":popover-open", ":modal"];
|
|
809
794
|
function yt(t) {
|
|
810
|
-
return
|
|
795
|
+
return [":popover-open", ":modal"].some((e) => {
|
|
811
796
|
try {
|
|
812
797
|
return t.matches(e);
|
|
813
798
|
} catch {
|
|
@@ -815,14 +800,13 @@ function yt(t) {
|
|
|
815
800
|
}
|
|
816
801
|
});
|
|
817
802
|
}
|
|
818
|
-
const bn = ["transform", "translate", "scale", "rotate", "perspective"], An = ["transform", "translate", "scale", "rotate", "perspective", "filter"], En = ["paint", "layout", "strict", "content"];
|
|
819
803
|
function Tt(t) {
|
|
820
|
-
const e = Mt(), n =
|
|
821
|
-
return
|
|
804
|
+
const e = Mt(), n = _(t) ? I(t) : t;
|
|
805
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
822
806
|
}
|
|
823
|
-
function
|
|
807
|
+
function pn(t) {
|
|
824
808
|
let e = Z(t);
|
|
825
|
-
for (;
|
|
809
|
+
for (; Y(e) && !Q(e); ) {
|
|
826
810
|
if (Tt(e))
|
|
827
811
|
return e;
|
|
828
812
|
if (yt(e))
|
|
@@ -834,15 +818,14 @@ function Pn(t) {
|
|
|
834
818
|
function Mt() {
|
|
835
819
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
836
820
|
}
|
|
837
|
-
const Rn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
838
821
|
function Q(t) {
|
|
839
|
-
return
|
|
822
|
+
return ["html", "body", "#document"].includes(et(t));
|
|
840
823
|
}
|
|
841
824
|
function I(t) {
|
|
842
|
-
return
|
|
825
|
+
return W(t).getComputedStyle(t);
|
|
843
826
|
}
|
|
844
827
|
function xt(t) {
|
|
845
|
-
return
|
|
828
|
+
return _(t) ? {
|
|
846
829
|
scrollLeft: t.scrollLeft,
|
|
847
830
|
scrollTop: t.scrollTop
|
|
848
831
|
} : {
|
|
@@ -857,19 +840,19 @@ function Z(t) {
|
|
|
857
840
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
858
841
|
t.assignedSlot || // DOM Element detected.
|
|
859
842
|
t.parentNode || // ShadowRoot detected.
|
|
860
|
-
|
|
861
|
-
|
|
843
|
+
Kt(t) && t.host || // Fallback.
|
|
844
|
+
j(t)
|
|
862
845
|
);
|
|
863
|
-
return
|
|
846
|
+
return Kt(e) ? e.host : e;
|
|
864
847
|
}
|
|
865
|
-
function
|
|
848
|
+
function re(t) {
|
|
866
849
|
const e = Z(t);
|
|
867
|
-
return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body :
|
|
850
|
+
return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : Y(e) && st(e) ? e : re(e);
|
|
868
851
|
}
|
|
869
852
|
function rt(t, e, n) {
|
|
870
853
|
var o;
|
|
871
854
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
872
|
-
const r =
|
|
855
|
+
const r = re(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = W(r);
|
|
873
856
|
if (i) {
|
|
874
857
|
const c = Ot(s);
|
|
875
858
|
return e.concat(s, s.visualViewport || [], st(r) ? r : [], c && n ? rt(c) : []);
|
|
@@ -879,130 +862,130 @@ function rt(t, e, n) {
|
|
|
879
862
|
function Ot(t) {
|
|
880
863
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
881
864
|
}
|
|
882
|
-
function
|
|
865
|
+
function ie(t) {
|
|
883
866
|
const e = I(t);
|
|
884
867
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
885
|
-
const r =
|
|
868
|
+
const r = Y(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = ut(n) !== i || ut(o) !== s;
|
|
886
869
|
return c && (n = i, o = s), {
|
|
887
870
|
width: n,
|
|
888
871
|
height: o,
|
|
889
872
|
$: c
|
|
890
873
|
};
|
|
891
874
|
}
|
|
892
|
-
function
|
|
893
|
-
return
|
|
875
|
+
function kt(t) {
|
|
876
|
+
return _(t) ? t : t.contextElement;
|
|
894
877
|
}
|
|
895
878
|
function J(t) {
|
|
896
|
-
const e =
|
|
897
|
-
if (!
|
|
898
|
-
return
|
|
879
|
+
const e = kt(t);
|
|
880
|
+
if (!Y(e))
|
|
881
|
+
return V(1);
|
|
899
882
|
const n = e.getBoundingClientRect(), {
|
|
900
883
|
width: o,
|
|
901
884
|
height: r,
|
|
902
885
|
$: i
|
|
903
|
-
} =
|
|
886
|
+
} = ie(e);
|
|
904
887
|
let s = (i ? ut(n.width) : n.width) / o, c = (i ? ut(n.height) : n.height) / r;
|
|
905
888
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
906
889
|
x: s,
|
|
907
890
|
y: c
|
|
908
891
|
};
|
|
909
892
|
}
|
|
910
|
-
const
|
|
911
|
-
function
|
|
912
|
-
const e =
|
|
913
|
-
return !Mt() || !e.visualViewport ?
|
|
893
|
+
const hn = /* @__PURE__ */ V(0);
|
|
894
|
+
function se(t) {
|
|
895
|
+
const e = W(t);
|
|
896
|
+
return !Mt() || !e.visualViewport ? hn : {
|
|
914
897
|
x: e.visualViewport.offsetLeft,
|
|
915
898
|
y: e.visualViewport.offsetTop
|
|
916
899
|
};
|
|
917
900
|
}
|
|
918
|
-
function
|
|
919
|
-
return e === void 0 && (e = !1), !n || e && n !==
|
|
901
|
+
function mn(t, e, n) {
|
|
902
|
+
return e === void 0 && (e = !1), !n || e && n !== W(t) ? !1 : e;
|
|
920
903
|
}
|
|
921
904
|
function G(t, e, n, o) {
|
|
922
905
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
923
|
-
const r = t.getBoundingClientRect(), i =
|
|
924
|
-
let s =
|
|
925
|
-
e && (o ?
|
|
926
|
-
const c =
|
|
927
|
-
let f = (r.left + c.x) / s.x,
|
|
906
|
+
const r = t.getBoundingClientRect(), i = kt(t);
|
|
907
|
+
let s = V(1);
|
|
908
|
+
e && (o ? _(o) && (s = J(o)) : s = J(t));
|
|
909
|
+
const c = mn(i, n, o) ? se(i) : V(0);
|
|
910
|
+
let f = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, a = r.width / s.x, u = r.height / s.y;
|
|
928
911
|
if (i) {
|
|
929
|
-
const p =
|
|
912
|
+
const p = W(i), d = o && _(o) ? W(o) : o;
|
|
930
913
|
let h = p, m = Ot(h);
|
|
931
914
|
for (; m && o && d !== h; ) {
|
|
932
|
-
const
|
|
933
|
-
f *=
|
|
915
|
+
const w = J(m), g = m.getBoundingClientRect(), v = I(m), E = g.left + (m.clientLeft + parseFloat(v.paddingLeft)) * w.x, b = g.top + (m.clientTop + parseFloat(v.paddingTop)) * w.y;
|
|
916
|
+
f *= w.x, l *= w.y, a *= w.x, u *= w.y, f += E, l += b, h = W(m), m = Ot(h);
|
|
934
917
|
}
|
|
935
918
|
}
|
|
936
919
|
return pt({
|
|
937
|
-
width:
|
|
920
|
+
width: a,
|
|
938
921
|
height: u,
|
|
939
922
|
x: f,
|
|
940
|
-
y:
|
|
923
|
+
y: l
|
|
941
924
|
});
|
|
942
925
|
}
|
|
943
|
-
function
|
|
926
|
+
function Ft(t, e) {
|
|
944
927
|
const n = xt(t).scrollLeft;
|
|
945
|
-
return e ? e.left + n : G(
|
|
928
|
+
return e ? e.left + n : G(j(t)).left + n;
|
|
946
929
|
}
|
|
947
|
-
function
|
|
930
|
+
function ce(t, e, n) {
|
|
948
931
|
n === void 0 && (n = !1);
|
|
949
932
|
const o = t.getBoundingClientRect(), r = o.left + e.scrollLeft - (n ? 0 : (
|
|
950
933
|
// RTL <body> scrollbar.
|
|
951
|
-
|
|
934
|
+
Ft(t, o)
|
|
952
935
|
)), i = o.top + e.scrollTop;
|
|
953
936
|
return {
|
|
954
937
|
x: r,
|
|
955
938
|
y: i
|
|
956
939
|
};
|
|
957
940
|
}
|
|
958
|
-
function
|
|
941
|
+
function gn(t) {
|
|
959
942
|
let {
|
|
960
943
|
elements: e,
|
|
961
944
|
rect: n,
|
|
962
945
|
offsetParent: o,
|
|
963
946
|
strategy: r
|
|
964
947
|
} = t;
|
|
965
|
-
const i = r === "fixed", s =
|
|
948
|
+
const i = r === "fixed", s = j(o), c = e ? yt(e.floating) : !1;
|
|
966
949
|
if (o === s || c && i)
|
|
967
950
|
return n;
|
|
968
951
|
let f = {
|
|
969
952
|
scrollLeft: 0,
|
|
970
953
|
scrollTop: 0
|
|
971
|
-
},
|
|
972
|
-
const
|
|
973
|
-
if ((u || !u && !i) && ((et(o) !== "body" || st(s)) && (f = xt(o)),
|
|
954
|
+
}, l = V(1);
|
|
955
|
+
const a = V(0), u = Y(o);
|
|
956
|
+
if ((u || !u && !i) && ((et(o) !== "body" || st(s)) && (f = xt(o)), Y(o))) {
|
|
974
957
|
const d = G(o);
|
|
975
|
-
|
|
958
|
+
l = J(o), a.x = d.x + o.clientLeft, a.y = d.y + o.clientTop;
|
|
976
959
|
}
|
|
977
|
-
const p = s && !u && !i ?
|
|
960
|
+
const p = s && !u && !i ? ce(s, f, !0) : V(0);
|
|
978
961
|
return {
|
|
979
|
-
width: n.width *
|
|
980
|
-
height: n.height *
|
|
981
|
-
x: n.x *
|
|
982
|
-
y: n.y *
|
|
962
|
+
width: n.width * l.x,
|
|
963
|
+
height: n.height * l.y,
|
|
964
|
+
x: n.x * l.x - f.scrollLeft * l.x + a.x + p.x,
|
|
965
|
+
y: n.y * l.y - f.scrollTop * l.y + a.y + p.y
|
|
983
966
|
};
|
|
984
967
|
}
|
|
985
|
-
function
|
|
968
|
+
function wn(t) {
|
|
986
969
|
return Array.from(t.getClientRects());
|
|
987
970
|
}
|
|
988
|
-
function
|
|
989
|
-
const e =
|
|
990
|
-
let s = -n.scrollLeft +
|
|
971
|
+
function yn(t) {
|
|
972
|
+
const e = j(t), n = xt(t), o = t.ownerDocument.body, r = $(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = $(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
973
|
+
let s = -n.scrollLeft + Ft(t);
|
|
991
974
|
const c = -n.scrollTop;
|
|
992
|
-
return I(o).direction === "rtl" && (s +=
|
|
975
|
+
return I(o).direction === "rtl" && (s += $(e.clientWidth, o.clientWidth) - r), {
|
|
993
976
|
width: r,
|
|
994
977
|
height: i,
|
|
995
978
|
x: s,
|
|
996
979
|
y: c
|
|
997
980
|
};
|
|
998
981
|
}
|
|
999
|
-
function
|
|
1000
|
-
const n =
|
|
982
|
+
function xn(t, e) {
|
|
983
|
+
const n = W(t), o = j(t), r = n.visualViewport;
|
|
1001
984
|
let i = o.clientWidth, s = o.clientHeight, c = 0, f = 0;
|
|
1002
985
|
if (r) {
|
|
1003
986
|
i = r.width, s = r.height;
|
|
1004
|
-
const
|
|
1005
|
-
(!
|
|
987
|
+
const l = Mt();
|
|
988
|
+
(!l || l && e === "fixed") && (c = r.offsetLeft, f = r.offsetTop);
|
|
1006
989
|
}
|
|
1007
990
|
return {
|
|
1008
991
|
width: i,
|
|
@@ -1011,26 +994,25 @@ function Tn(t, e) {
|
|
|
1011
994
|
y: f
|
|
1012
995
|
};
|
|
1013
996
|
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = j(t) ? J(t) : Y(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, f = r * i.x, a = o * i.y;
|
|
997
|
+
function vn(t, e) {
|
|
998
|
+
const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = Y(t) ? J(t) : V(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, f = r * i.x, l = o * i.y;
|
|
1017
999
|
return {
|
|
1018
1000
|
width: s,
|
|
1019
1001
|
height: c,
|
|
1020
1002
|
x: f,
|
|
1021
|
-
y:
|
|
1003
|
+
y: l
|
|
1022
1004
|
};
|
|
1023
1005
|
}
|
|
1024
|
-
function
|
|
1006
|
+
function Zt(t, e, n) {
|
|
1025
1007
|
let o;
|
|
1026
1008
|
if (e === "viewport")
|
|
1027
|
-
o =
|
|
1009
|
+
o = xn(t, n);
|
|
1028
1010
|
else if (e === "document")
|
|
1029
|
-
o =
|
|
1030
|
-
else if (
|
|
1031
|
-
o =
|
|
1011
|
+
o = yn(j(t));
|
|
1012
|
+
else if (_(e))
|
|
1013
|
+
o = vn(e, n);
|
|
1032
1014
|
else {
|
|
1033
|
-
const r =
|
|
1015
|
+
const r = se(t);
|
|
1034
1016
|
o = {
|
|
1035
1017
|
x: e.x - r.x,
|
|
1036
1018
|
y: e.y - r.y,
|
|
@@ -1040,34 +1022,34 @@ function Jt(t, e, n) {
|
|
|
1040
1022
|
}
|
|
1041
1023
|
return pt(o);
|
|
1042
1024
|
}
|
|
1043
|
-
function
|
|
1025
|
+
function le(t, e) {
|
|
1044
1026
|
const n = Z(t);
|
|
1045
|
-
return n === e || !
|
|
1027
|
+
return n === e || !_(n) || Q(n) ? !1 : I(n).position === "fixed" || le(n, e);
|
|
1046
1028
|
}
|
|
1047
|
-
function
|
|
1029
|
+
function bn(t, e) {
|
|
1048
1030
|
const n = e.get(t);
|
|
1049
1031
|
if (n)
|
|
1050
1032
|
return n;
|
|
1051
|
-
let o = rt(t, [], !1).filter((c) =>
|
|
1033
|
+
let o = rt(t, [], !1).filter((c) => _(c) && et(c) !== "body"), r = null;
|
|
1052
1034
|
const i = I(t).position === "fixed";
|
|
1053
1035
|
let s = i ? Z(t) : t;
|
|
1054
|
-
for (;
|
|
1036
|
+
for (; _(s) && !Q(s); ) {
|
|
1055
1037
|
const c = I(s), f = Tt(s);
|
|
1056
|
-
!f && c.position === "fixed" && (r = null), (i ? !f && !r : !f && c.position === "static" && !!r &&
|
|
1038
|
+
!f && c.position === "fixed" && (r = null), (i ? !f && !r : !f && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || st(s) && !f && le(t, s)) ? o = o.filter((a) => a !== s) : r = c, s = Z(s);
|
|
1057
1039
|
}
|
|
1058
1040
|
return e.set(t, o), o;
|
|
1059
1041
|
}
|
|
1060
|
-
function
|
|
1042
|
+
function An(t) {
|
|
1061
1043
|
let {
|
|
1062
1044
|
element: e,
|
|
1063
1045
|
boundary: n,
|
|
1064
1046
|
rootBoundary: o,
|
|
1065
1047
|
strategy: r
|
|
1066
1048
|
} = t;
|
|
1067
|
-
const s = [...n === "clippingAncestors" ? yt(e) ? [] :
|
|
1068
|
-
const u =
|
|
1069
|
-
return
|
|
1070
|
-
},
|
|
1049
|
+
const s = [...n === "clippingAncestors" ? yt(e) ? [] : bn(e, this._c) : [].concat(n), o], c = s[0], f = s.reduce((l, a) => {
|
|
1050
|
+
const u = Zt(e, a, r);
|
|
1051
|
+
return l.top = $(u.top, l.top), l.right = q(u.right, l.right), l.bottom = q(u.bottom, l.bottom), l.left = $(u.left, l.left), l;
|
|
1052
|
+
}, Zt(e, c, r));
|
|
1071
1053
|
return {
|
|
1072
1054
|
width: f.right - f.left,
|
|
1073
1055
|
height: f.bottom - f.top,
|
|
@@ -1075,37 +1057,33 @@ function kn(t) {
|
|
|
1075
1057
|
y: f.top
|
|
1076
1058
|
};
|
|
1077
1059
|
}
|
|
1078
|
-
function
|
|
1060
|
+
function En(t) {
|
|
1079
1061
|
const {
|
|
1080
1062
|
width: e,
|
|
1081
1063
|
height: n
|
|
1082
|
-
} =
|
|
1064
|
+
} = ie(t);
|
|
1083
1065
|
return {
|
|
1084
1066
|
width: e,
|
|
1085
1067
|
height: n
|
|
1086
1068
|
};
|
|
1087
1069
|
}
|
|
1088
|
-
function
|
|
1089
|
-
const o =
|
|
1070
|
+
function Pn(t, e, n) {
|
|
1071
|
+
const o = Y(e), r = j(e), i = n === "fixed", s = G(t, !0, i, e);
|
|
1090
1072
|
let c = {
|
|
1091
1073
|
scrollLeft: 0,
|
|
1092
1074
|
scrollTop: 0
|
|
1093
1075
|
};
|
|
1094
|
-
const f =
|
|
1095
|
-
function a() {
|
|
1096
|
-
f.x = Nt(r);
|
|
1097
|
-
}
|
|
1076
|
+
const f = V(0);
|
|
1098
1077
|
if (o || !o && !i)
|
|
1099
1078
|
if ((et(e) !== "body" || st(r)) && (c = xt(e)), o) {
|
|
1100
|
-
const
|
|
1101
|
-
f.x =
|
|
1079
|
+
const p = G(e, !0, i, e);
|
|
1080
|
+
f.x = p.x + e.clientLeft, f.y = p.y + e.clientTop;
|
|
1102
1081
|
} else
|
|
1103
|
-
r &&
|
|
1104
|
-
|
|
1105
|
-
const l = r && !o && !i ? fe(r, c) : Y(0), u = s.left + c.scrollLeft - f.x - l.x, p = s.top + c.scrollTop - f.y - l.y;
|
|
1082
|
+
r && (f.x = Ft(r));
|
|
1083
|
+
const l = r && !o && !i ? ce(r, c) : V(0), a = s.left + c.scrollLeft - f.x - l.x, u = s.top + c.scrollTop - f.y - l.y;
|
|
1106
1084
|
return {
|
|
1107
|
-
x:
|
|
1108
|
-
y:
|
|
1085
|
+
x: a,
|
|
1086
|
+
y: u,
|
|
1109
1087
|
width: s.width,
|
|
1110
1088
|
height: s.height
|
|
1111
1089
|
};
|
|
@@ -1113,36 +1091,36 @@ function Wn(t, e, n) {
|
|
|
1113
1091
|
function bt(t) {
|
|
1114
1092
|
return I(t).position === "static";
|
|
1115
1093
|
}
|
|
1116
|
-
function
|
|
1117
|
-
if (!
|
|
1094
|
+
function Gt(t, e) {
|
|
1095
|
+
if (!Y(t) || I(t).position === "fixed")
|
|
1118
1096
|
return null;
|
|
1119
1097
|
if (e)
|
|
1120
1098
|
return e(t);
|
|
1121
1099
|
let n = t.offsetParent;
|
|
1122
|
-
return
|
|
1100
|
+
return j(t) === n && (n = n.ownerDocument.body), n;
|
|
1123
1101
|
}
|
|
1124
|
-
function
|
|
1125
|
-
const n =
|
|
1102
|
+
function ae(t, e) {
|
|
1103
|
+
const n = W(t);
|
|
1126
1104
|
if (yt(t))
|
|
1127
1105
|
return n;
|
|
1128
|
-
if (!
|
|
1106
|
+
if (!Y(t)) {
|
|
1129
1107
|
let r = Z(t);
|
|
1130
1108
|
for (; r && !Q(r); ) {
|
|
1131
|
-
if (
|
|
1109
|
+
if (_(r) && !bt(r))
|
|
1132
1110
|
return r;
|
|
1133
1111
|
r = Z(r);
|
|
1134
1112
|
}
|
|
1135
1113
|
return n;
|
|
1136
1114
|
}
|
|
1137
|
-
let o =
|
|
1138
|
-
for (; o &&
|
|
1139
|
-
o =
|
|
1140
|
-
return o && Q(o) && bt(o) && !Tt(o) ? n : o ||
|
|
1115
|
+
let o = Gt(t, e);
|
|
1116
|
+
for (; o && dn(o) && bt(o); )
|
|
1117
|
+
o = Gt(o, e);
|
|
1118
|
+
return o && Q(o) && bt(o) && !Tt(o) ? n : o || pn(t) || n;
|
|
1141
1119
|
}
|
|
1142
|
-
const
|
|
1143
|
-
const e = this.getOffsetParent ||
|
|
1120
|
+
const Rn = async function(t) {
|
|
1121
|
+
const e = this.getOffsetParent || ae, n = this.getDimensions, o = await n(t.floating);
|
|
1144
1122
|
return {
|
|
1145
|
-
reference:
|
|
1123
|
+
reference: Pn(t.reference, await e(t.floating), t.strategy),
|
|
1146
1124
|
floating: {
|
|
1147
1125
|
x: 0,
|
|
1148
1126
|
y: 0,
|
|
@@ -1151,56 +1129,56 @@ const Bn = async function(t) {
|
|
|
1151
1129
|
}
|
|
1152
1130
|
};
|
|
1153
1131
|
};
|
|
1154
|
-
function
|
|
1132
|
+
function Cn(t) {
|
|
1155
1133
|
return I(t).direction === "rtl";
|
|
1156
1134
|
}
|
|
1157
|
-
const
|
|
1158
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1159
|
-
getDocumentElement:
|
|
1160
|
-
getClippingRect:
|
|
1161
|
-
getOffsetParent:
|
|
1162
|
-
getElementRects:
|
|
1163
|
-
getClientRects:
|
|
1164
|
-
getDimensions:
|
|
1135
|
+
const On = {
|
|
1136
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: gn,
|
|
1137
|
+
getDocumentElement: j,
|
|
1138
|
+
getClippingRect: An,
|
|
1139
|
+
getOffsetParent: ae,
|
|
1140
|
+
getElementRects: Rn,
|
|
1141
|
+
getClientRects: wn,
|
|
1142
|
+
getDimensions: En,
|
|
1165
1143
|
getScale: J,
|
|
1166
|
-
isElement:
|
|
1167
|
-
isRTL:
|
|
1144
|
+
isElement: _,
|
|
1145
|
+
isRTL: Cn
|
|
1168
1146
|
};
|
|
1169
|
-
function
|
|
1147
|
+
function fe(t, e) {
|
|
1170
1148
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1171
1149
|
}
|
|
1172
|
-
function
|
|
1150
|
+
function Sn(t, e) {
|
|
1173
1151
|
let n = null, o;
|
|
1174
|
-
const r =
|
|
1152
|
+
const r = j(t);
|
|
1175
1153
|
function i() {
|
|
1176
1154
|
var c;
|
|
1177
1155
|
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
1178
1156
|
}
|
|
1179
1157
|
function s(c, f) {
|
|
1180
1158
|
c === void 0 && (c = !1), f === void 0 && (f = 1), i();
|
|
1181
|
-
const
|
|
1182
|
-
left:
|
|
1159
|
+
const l = t.getBoundingClientRect(), {
|
|
1160
|
+
left: a,
|
|
1183
1161
|
top: u,
|
|
1184
1162
|
width: p,
|
|
1185
1163
|
height: d
|
|
1186
|
-
} =
|
|
1164
|
+
} = l;
|
|
1187
1165
|
if (c || e(), !p || !d)
|
|
1188
1166
|
return;
|
|
1189
|
-
const h =
|
|
1190
|
-
rootMargin: -h + "px " + -m + "px " + -
|
|
1191
|
-
threshold:
|
|
1167
|
+
const h = at(u), m = at(r.clientWidth - (a + p)), w = at(r.clientHeight - (u + d)), g = at(a), E = {
|
|
1168
|
+
rootMargin: -h + "px " + -m + "px " + -w + "px " + -g + "px",
|
|
1169
|
+
threshold: $(0, q(1, f)) || 1
|
|
1192
1170
|
};
|
|
1193
1171
|
let b = !0;
|
|
1194
|
-
function A(
|
|
1195
|
-
const
|
|
1196
|
-
if (
|
|
1172
|
+
function A(P) {
|
|
1173
|
+
const x = P[0].intersectionRatio;
|
|
1174
|
+
if (x !== f) {
|
|
1197
1175
|
if (!b)
|
|
1198
1176
|
return s();
|
|
1199
|
-
|
|
1177
|
+
x ? s(!1, x) : o = setTimeout(() => {
|
|
1200
1178
|
s(!1, 1e-7);
|
|
1201
1179
|
}, 1e3);
|
|
1202
1180
|
}
|
|
1203
|
-
|
|
1181
|
+
x === 1 && !fe(l, t.getBoundingClientRect()) && s(), b = !1;
|
|
1204
1182
|
}
|
|
1205
1183
|
try {
|
|
1206
1184
|
n = new IntersectionObserver(A, {
|
|
@@ -1215,7 +1193,7 @@ function In(t, e) {
|
|
|
1215
1193
|
}
|
|
1216
1194
|
return s(!0), i;
|
|
1217
1195
|
}
|
|
1218
|
-
function
|
|
1196
|
+
function Dn(t, e, n, o) {
|
|
1219
1197
|
o === void 0 && (o = {});
|
|
1220
1198
|
const {
|
|
1221
1199
|
ancestorScroll: r = !0,
|
|
@@ -1223,49 +1201,48 @@ function Vn(t, e, n, o) {
|
|
|
1223
1201
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1224
1202
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1225
1203
|
animationFrame: f = !1
|
|
1226
|
-
} = o,
|
|
1227
|
-
|
|
1204
|
+
} = o, l = kt(t), a = r || i ? [...l ? rt(l) : [], ...rt(e)] : [];
|
|
1205
|
+
a.forEach((g) => {
|
|
1228
1206
|
r && g.addEventListener("scroll", n, {
|
|
1229
1207
|
passive: !0
|
|
1230
1208
|
}), i && g.addEventListener("resize", n);
|
|
1231
1209
|
});
|
|
1232
|
-
const u =
|
|
1210
|
+
const u = l && c ? Sn(l, n) : null;
|
|
1233
1211
|
let p = -1, d = null;
|
|
1234
1212
|
s && (d = new ResizeObserver((g) => {
|
|
1235
|
-
let [
|
|
1236
|
-
|
|
1213
|
+
let [v] = g;
|
|
1214
|
+
v && v.target === l && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1237
1215
|
var E;
|
|
1238
1216
|
(E = d) == null || E.observe(e);
|
|
1239
1217
|
})), n();
|
|
1240
|
-
}),
|
|
1218
|
+
}), l && !f && d.observe(l), d.observe(e));
|
|
1241
1219
|
let h, m = f ? G(t) : null;
|
|
1242
|
-
f &&
|
|
1243
|
-
function
|
|
1220
|
+
f && w();
|
|
1221
|
+
function w() {
|
|
1244
1222
|
const g = G(t);
|
|
1245
|
-
m && !
|
|
1223
|
+
m && !fe(m, g) && n(), m = g, h = requestAnimationFrame(w);
|
|
1246
1224
|
}
|
|
1247
1225
|
return n(), () => {
|
|
1248
1226
|
var g;
|
|
1249
|
-
|
|
1250
|
-
r &&
|
|
1227
|
+
a.forEach((v) => {
|
|
1228
|
+
r && v.removeEventListener("scroll", n), i && v.removeEventListener("resize", n);
|
|
1251
1229
|
}), u == null || u(), (g = d) == null || g.disconnect(), d = null, f && cancelAnimationFrame(h);
|
|
1252
1230
|
};
|
|
1253
1231
|
}
|
|
1254
|
-
const
|
|
1232
|
+
const Ln = ln, Tn = an, Mn = rn, kn = un, Fn = sn, Jt = on, Nn = fn, $n = (t, e, n) => {
|
|
1255
1233
|
const o = /* @__PURE__ */ new Map(), r = {
|
|
1256
|
-
platform:
|
|
1234
|
+
platform: On,
|
|
1257
1235
|
...n
|
|
1258
1236
|
}, i = {
|
|
1259
1237
|
...r.platform,
|
|
1260
1238
|
_c: o
|
|
1261
1239
|
};
|
|
1262
|
-
return
|
|
1240
|
+
return nn(t, e, {
|
|
1263
1241
|
...r,
|
|
1264
1242
|
platform: i
|
|
1265
1243
|
});
|
|
1266
1244
|
};
|
|
1267
|
-
var
|
|
1268
|
-
}, ft = Zn ? Ne : Gn;
|
|
1245
|
+
var ft = typeof document < "u" ? Te : Me;
|
|
1269
1246
|
function ht(t, e) {
|
|
1270
1247
|
if (t === e)
|
|
1271
1248
|
return !0;
|
|
@@ -1297,20 +1274,20 @@ function ht(t, e) {
|
|
|
1297
1274
|
}
|
|
1298
1275
|
return t !== t && e !== e;
|
|
1299
1276
|
}
|
|
1300
|
-
function
|
|
1277
|
+
function ue(t) {
|
|
1301
1278
|
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1302
1279
|
}
|
|
1303
|
-
function
|
|
1304
|
-
const n =
|
|
1280
|
+
function Qt(t, e) {
|
|
1281
|
+
const n = ue(t);
|
|
1305
1282
|
return Math.round(e * n) / n;
|
|
1306
1283
|
}
|
|
1307
1284
|
function At(t) {
|
|
1308
|
-
const e =
|
|
1285
|
+
const e = y.useRef(t);
|
|
1309
1286
|
return ft(() => {
|
|
1310
1287
|
e.current = t;
|
|
1311
1288
|
}), e;
|
|
1312
1289
|
}
|
|
1313
|
-
function
|
|
1290
|
+
function Wn(t) {
|
|
1314
1291
|
t === void 0 && (t = {});
|
|
1315
1292
|
const {
|
|
1316
1293
|
placement: e = "bottom",
|
|
@@ -1323,96 +1300,96 @@ function Jn(t) {
|
|
|
1323
1300
|
} = {},
|
|
1324
1301
|
transform: c = !0,
|
|
1325
1302
|
whileElementsMounted: f,
|
|
1326
|
-
open:
|
|
1327
|
-
} = t, [
|
|
1303
|
+
open: l
|
|
1304
|
+
} = t, [a, u] = y.useState({
|
|
1328
1305
|
x: 0,
|
|
1329
1306
|
y: 0,
|
|
1330
1307
|
strategy: n,
|
|
1331
1308
|
placement: e,
|
|
1332
1309
|
middlewareData: {},
|
|
1333
1310
|
isPositioned: !1
|
|
1334
|
-
}), [p, d] =
|
|
1311
|
+
}), [p, d] = y.useState(o);
|
|
1335
1312
|
ht(p, o) || d(o);
|
|
1336
|
-
const [h, m] =
|
|
1337
|
-
|
|
1338
|
-
}, []), E =
|
|
1339
|
-
|
|
1340
|
-
}, []), b = i || h, A = s ||
|
|
1341
|
-
if (!
|
|
1313
|
+
const [h, m] = y.useState(null), [w, g] = y.useState(null), v = y.useCallback((R) => {
|
|
1314
|
+
R !== P.current && (P.current = R, m(R));
|
|
1315
|
+
}, []), E = y.useCallback((R) => {
|
|
1316
|
+
R !== x.current && (x.current = R, g(R));
|
|
1317
|
+
}, []), b = i || h, A = s || w, P = y.useRef(null), x = y.useRef(null), C = y.useRef(a), M = f != null, O = At(f), F = At(r), N = At(l), D = y.useCallback(() => {
|
|
1318
|
+
if (!P.current || !x.current)
|
|
1342
1319
|
return;
|
|
1343
|
-
const
|
|
1320
|
+
const R = {
|
|
1344
1321
|
placement: e,
|
|
1345
1322
|
strategy: n,
|
|
1346
1323
|
middleware: p
|
|
1347
1324
|
};
|
|
1348
|
-
|
|
1349
|
-
const
|
|
1350
|
-
...
|
|
1325
|
+
F.current && (R.platform = F.current), $n(P.current, x.current, R).then((k) => {
|
|
1326
|
+
const z = {
|
|
1327
|
+
...k,
|
|
1351
1328
|
// The floating element's position may be recomputed while it's closed
|
|
1352
1329
|
// but still mounted (such as when transitioning out). To ensure
|
|
1353
1330
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1354
1331
|
// setting it to `true` when `open === false` (must be specified).
|
|
1355
|
-
isPositioned:
|
|
1332
|
+
isPositioned: N.current !== !1
|
|
1356
1333
|
};
|
|
1357
|
-
S.current && !ht(C.current,
|
|
1358
|
-
u(
|
|
1334
|
+
S.current && !ht(C.current, z) && (C.current = z, $e.flushSync(() => {
|
|
1335
|
+
u(z);
|
|
1359
1336
|
}));
|
|
1360
1337
|
});
|
|
1361
|
-
}, [p, e, n,
|
|
1338
|
+
}, [p, e, n, F, N]);
|
|
1362
1339
|
ft(() => {
|
|
1363
|
-
|
|
1364
|
-
...
|
|
1340
|
+
l === !1 && C.current.isPositioned && (C.current.isPositioned = !1, u((R) => ({
|
|
1341
|
+
...R,
|
|
1365
1342
|
isPositioned: !1
|
|
1366
1343
|
})));
|
|
1367
|
-
}, [
|
|
1368
|
-
const S =
|
|
1344
|
+
}, [l]);
|
|
1345
|
+
const S = y.useRef(!1);
|
|
1369
1346
|
ft(() => (S.current = !0, () => {
|
|
1370
1347
|
S.current = !1;
|
|
1371
1348
|
}), []), ft(() => {
|
|
1372
|
-
if (b && (
|
|
1349
|
+
if (b && (P.current = b), A && (x.current = A), b && A) {
|
|
1373
1350
|
if (O.current)
|
|
1374
1351
|
return O.current(b, A, D);
|
|
1375
1352
|
D();
|
|
1376
1353
|
}
|
|
1377
1354
|
}, [b, A, D, O, M]);
|
|
1378
|
-
const
|
|
1379
|
-
reference:
|
|
1380
|
-
floating:
|
|
1381
|
-
setReference:
|
|
1355
|
+
const B = y.useMemo(() => ({
|
|
1356
|
+
reference: P,
|
|
1357
|
+
floating: x,
|
|
1358
|
+
setReference: v,
|
|
1382
1359
|
setFloating: E
|
|
1383
|
-
}), [
|
|
1360
|
+
}), [v, E]), L = y.useMemo(() => ({
|
|
1384
1361
|
reference: b,
|
|
1385
1362
|
floating: A
|
|
1386
|
-
}), [b, A]), T =
|
|
1387
|
-
const
|
|
1363
|
+
}), [b, A]), T = y.useMemo(() => {
|
|
1364
|
+
const R = {
|
|
1388
1365
|
position: n,
|
|
1389
1366
|
left: 0,
|
|
1390
1367
|
top: 0
|
|
1391
1368
|
};
|
|
1392
1369
|
if (!L.floating)
|
|
1393
|
-
return
|
|
1394
|
-
const
|
|
1370
|
+
return R;
|
|
1371
|
+
const k = Qt(L.floating, a.x), z = Qt(L.floating, a.y);
|
|
1395
1372
|
return c ? {
|
|
1396
|
-
...
|
|
1397
|
-
transform: "translate(" +
|
|
1398
|
-
...
|
|
1373
|
+
...R,
|
|
1374
|
+
transform: "translate(" + k + "px, " + z + "px)",
|
|
1375
|
+
...ue(L.floating) >= 1.5 && {
|
|
1399
1376
|
willChange: "transform"
|
|
1400
1377
|
}
|
|
1401
1378
|
} : {
|
|
1402
1379
|
position: n,
|
|
1403
|
-
left:
|
|
1404
|
-
top:
|
|
1380
|
+
left: k,
|
|
1381
|
+
top: z
|
|
1405
1382
|
};
|
|
1406
|
-
}, [n, c, L.floating,
|
|
1407
|
-
return
|
|
1408
|
-
...
|
|
1383
|
+
}, [n, c, L.floating, a.x, a.y]);
|
|
1384
|
+
return y.useMemo(() => ({
|
|
1385
|
+
...a,
|
|
1409
1386
|
update: D,
|
|
1410
|
-
refs:
|
|
1387
|
+
refs: B,
|
|
1411
1388
|
elements: L,
|
|
1412
1389
|
floatingStyles: T
|
|
1413
|
-
}), [
|
|
1390
|
+
}), [a, D, B, L, T]);
|
|
1414
1391
|
}
|
|
1415
|
-
const
|
|
1392
|
+
const Bn = (t) => {
|
|
1416
1393
|
function e(n) {
|
|
1417
1394
|
return {}.hasOwnProperty.call(n, "current");
|
|
1418
1395
|
}
|
|
@@ -1424,40 +1401,40 @@ const Qn = (t) => {
|
|
|
1424
1401
|
element: o,
|
|
1425
1402
|
padding: r
|
|
1426
1403
|
} = typeof t == "function" ? t(n) : t;
|
|
1427
|
-
return o && e(o) ? o.current != null ?
|
|
1404
|
+
return o && e(o) ? o.current != null ? Jt({
|
|
1428
1405
|
element: o.current,
|
|
1429
1406
|
padding: r
|
|
1430
|
-
}).fn(n) : {} : o ?
|
|
1407
|
+
}).fn(n) : {} : o ? Jt({
|
|
1431
1408
|
element: o,
|
|
1432
1409
|
padding: r
|
|
1433
1410
|
}).fn(n) : {};
|
|
1434
1411
|
}
|
|
1435
1412
|
};
|
|
1436
|
-
},
|
|
1437
|
-
...
|
|
1413
|
+
}, Hn = (t, e) => ({
|
|
1414
|
+
...Ln(t),
|
|
1438
1415
|
options: [t, e]
|
|
1439
|
-
}),
|
|
1440
|
-
...
|
|
1416
|
+
}), _n = (t, e) => ({
|
|
1417
|
+
...Tn(t),
|
|
1441
1418
|
options: [t, e]
|
|
1442
|
-
}),
|
|
1443
|
-
...
|
|
1419
|
+
}), In = (t, e) => ({
|
|
1420
|
+
...Nn(t),
|
|
1444
1421
|
options: [t, e]
|
|
1445
|
-
}),
|
|
1446
|
-
...
|
|
1422
|
+
}), zn = (t, e) => ({
|
|
1423
|
+
...Mn(t),
|
|
1447
1424
|
options: [t, e]
|
|
1448
|
-
}),
|
|
1449
|
-
...
|
|
1425
|
+
}), Vn = (t, e) => ({
|
|
1426
|
+
...kn(t),
|
|
1450
1427
|
options: [t, e]
|
|
1451
|
-
}),
|
|
1452
|
-
...
|
|
1428
|
+
}), Yn = (t, e) => ({
|
|
1429
|
+
...Fn(t),
|
|
1453
1430
|
options: [t, e]
|
|
1454
|
-
}),
|
|
1455
|
-
...
|
|
1431
|
+
}), jn = (t, e) => ({
|
|
1432
|
+
...Bn(t),
|
|
1456
1433
|
options: [t, e]
|
|
1457
1434
|
});
|
|
1458
|
-
var
|
|
1435
|
+
var Xn = "Arrow", de = y.forwardRef((t, e) => {
|
|
1459
1436
|
const { children: n, width: o = 10, height: r = 5, ...i } = t;
|
|
1460
|
-
return /* @__PURE__ */
|
|
1437
|
+
return /* @__PURE__ */ H(
|
|
1461
1438
|
it.svg,
|
|
1462
1439
|
{
|
|
1463
1440
|
...i,
|
|
@@ -1466,28 +1443,28 @@ var co = "Arrow", me = w.forwardRef((t, e) => {
|
|
|
1466
1443
|
height: r,
|
|
1467
1444
|
viewBox: "0 0 30 10",
|
|
1468
1445
|
preserveAspectRatio: "none",
|
|
1469
|
-
children: t.asChild ? n : /* @__PURE__ */
|
|
1446
|
+
children: t.asChild ? n : /* @__PURE__ */ H("polygon", { points: "0,0 30,0 15,10" })
|
|
1470
1447
|
}
|
|
1471
1448
|
);
|
|
1472
1449
|
});
|
|
1473
|
-
|
|
1474
|
-
var
|
|
1475
|
-
const { __scopePopper: e, children: n } = t, [o, r] =
|
|
1476
|
-
return /* @__PURE__ */
|
|
1450
|
+
de.displayName = Xn;
|
|
1451
|
+
var Un = de, Nt = "Popper", [pe, ro] = Fe(Nt), [qn, he] = pe(Nt), me = (t) => {
|
|
1452
|
+
const { __scopePopper: e, children: n } = t, [o, r] = y.useState(null);
|
|
1453
|
+
return /* @__PURE__ */ H(qn, { scope: e, anchor: o, onAnchorChange: r, children: n });
|
|
1477
1454
|
};
|
|
1478
|
-
|
|
1479
|
-
var
|
|
1455
|
+
me.displayName = Nt;
|
|
1456
|
+
var ge = "PopperAnchor", we = y.forwardRef(
|
|
1480
1457
|
(t, e) => {
|
|
1481
|
-
const { __scopePopper: n, virtualRef: o, ...r } = t, i =
|
|
1482
|
-
return
|
|
1458
|
+
const { __scopePopper: n, virtualRef: o, ...r } = t, i = he(ge, n), s = y.useRef(null), c = gt(e, s);
|
|
1459
|
+
return y.useEffect(() => {
|
|
1483
1460
|
i.onAnchorChange((o == null ? void 0 : o.current) || s.current);
|
|
1484
|
-
}), o ? null : /* @__PURE__ */
|
|
1461
|
+
}), o ? null : /* @__PURE__ */ H(it.div, { ...r, ref: c });
|
|
1485
1462
|
}
|
|
1486
1463
|
);
|
|
1487
|
-
|
|
1488
|
-
var $t = "PopperContent", [
|
|
1464
|
+
we.displayName = ge;
|
|
1465
|
+
var $t = "PopperContent", [Kn, Zn] = pe($t), ye = y.forwardRef(
|
|
1489
1466
|
(t, e) => {
|
|
1490
|
-
var Wt, Bt,
|
|
1467
|
+
var Wt, Bt, Ht, _t, It, zt;
|
|
1491
1468
|
const {
|
|
1492
1469
|
__scopePopper: n,
|
|
1493
1470
|
side: o = "bottom",
|
|
@@ -1496,93 +1473,93 @@ var $t = "PopperContent", [fo, uo] = ge($t), be = w.forwardRef(
|
|
|
1496
1473
|
alignOffset: s = 0,
|
|
1497
1474
|
arrowPadding: c = 0,
|
|
1498
1475
|
avoidCollisions: f = !0,
|
|
1499
|
-
collisionBoundary:
|
|
1500
|
-
collisionPadding:
|
|
1476
|
+
collisionBoundary: l = [],
|
|
1477
|
+
collisionPadding: a = 0,
|
|
1501
1478
|
sticky: u = "partial",
|
|
1502
1479
|
hideWhenDetached: p = !1,
|
|
1503
1480
|
updatePositionStrategy: d = "optimized",
|
|
1504
1481
|
onPlaced: h,
|
|
1505
1482
|
...m
|
|
1506
|
-
} = t,
|
|
1483
|
+
} = t, w = he($t, n), [g, v] = y.useState(null), E = gt(e, (nt) => v(nt)), [b, A] = y.useState(null), P = Ne(b), x = (P == null ? void 0 : P.width) ?? 0, C = (P == null ? void 0 : P.height) ?? 0, M = o + (i !== "center" ? "-" + i : ""), O = typeof a == "number" ? a : { top: 0, right: 0, bottom: 0, left: 0, ...a }, F = Array.isArray(l) ? l : [l], N = F.length > 0, D = {
|
|
1507
1484
|
padding: O,
|
|
1508
|
-
boundary:
|
|
1485
|
+
boundary: F.filter(Jn),
|
|
1509
1486
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
1510
|
-
altBoundary:
|
|
1511
|
-
}, { refs: S, floatingStyles:
|
|
1487
|
+
altBoundary: N
|
|
1488
|
+
}, { refs: S, floatingStyles: B, placement: L, isPositioned: T, middlewareData: R } = Wn({
|
|
1512
1489
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
1513
1490
|
strategy: "fixed",
|
|
1514
1491
|
placement: M,
|
|
1515
|
-
whileElementsMounted: (...nt) =>
|
|
1492
|
+
whileElementsMounted: (...nt) => Dn(...nt, {
|
|
1516
1493
|
animationFrame: d === "always"
|
|
1517
1494
|
}),
|
|
1518
1495
|
elements: {
|
|
1519
|
-
reference:
|
|
1496
|
+
reference: w.anchor
|
|
1520
1497
|
},
|
|
1521
1498
|
middleware: [
|
|
1522
|
-
|
|
1523
|
-
f &&
|
|
1499
|
+
Hn({ mainAxis: r + C, alignmentAxis: s }),
|
|
1500
|
+
f && _n({
|
|
1524
1501
|
mainAxis: !0,
|
|
1525
1502
|
crossAxis: !1,
|
|
1526
|
-
limiter: u === "partial" ?
|
|
1503
|
+
limiter: u === "partial" ? In() : void 0,
|
|
1527
1504
|
...D
|
|
1528
1505
|
}),
|
|
1529
|
-
f &&
|
|
1530
|
-
|
|
1506
|
+
f && zn({ ...D }),
|
|
1507
|
+
Vn({
|
|
1531
1508
|
...D,
|
|
1532
|
-
apply: ({ elements: nt, rects:
|
|
1533
|
-
const { width:
|
|
1534
|
-
|
|
1509
|
+
apply: ({ elements: nt, rects: Vt, availableWidth: Oe, availableHeight: Se }) => {
|
|
1510
|
+
const { width: De, height: Le } = Vt.reference, lt = nt.floating.style;
|
|
1511
|
+
lt.setProperty("--radix-popper-available-width", `${Oe}px`), lt.setProperty("--radix-popper-available-height", `${Se}px`), lt.setProperty("--radix-popper-anchor-width", `${De}px`), lt.setProperty("--radix-popper-anchor-height", `${Le}px`);
|
|
1535
1512
|
}
|
|
1536
1513
|
}),
|
|
1537
|
-
b &&
|
|
1538
|
-
|
|
1539
|
-
p &&
|
|
1514
|
+
b && jn({ element: b, padding: c }),
|
|
1515
|
+
Qn({ arrowWidth: x, arrowHeight: C }),
|
|
1516
|
+
p && Yn({ strategy: "referenceHidden", ...D })
|
|
1540
1517
|
]
|
|
1541
|
-
}), [
|
|
1518
|
+
}), [k, z] = be(L), ct = mt(h);
|
|
1542
1519
|
Et(() => {
|
|
1543
1520
|
T && (ct == null || ct());
|
|
1544
1521
|
}, [T, ct]);
|
|
1545
|
-
const
|
|
1522
|
+
const Ae = (Wt = R.arrow) == null ? void 0 : Wt.x, Ee = (Bt = R.arrow) == null ? void 0 : Bt.y, Pe = ((Ht = R.arrow) == null ? void 0 : Ht.centerOffset) !== 0, [Re, Ce] = y.useState();
|
|
1546
1523
|
return Et(() => {
|
|
1547
|
-
g &&
|
|
1548
|
-
}, [g]), /* @__PURE__ */
|
|
1524
|
+
g && Ce(window.getComputedStyle(g).zIndex);
|
|
1525
|
+
}, [g]), /* @__PURE__ */ H(
|
|
1549
1526
|
"div",
|
|
1550
1527
|
{
|
|
1551
1528
|
ref: S.setFloating,
|
|
1552
1529
|
"data-radix-popper-content-wrapper": "",
|
|
1553
1530
|
style: {
|
|
1554
|
-
|
|
1555
|
-
transform: T ?
|
|
1531
|
+
...B,
|
|
1532
|
+
transform: T ? B.transform : "translate(0, -200%)",
|
|
1556
1533
|
// keep off the page when measuring
|
|
1557
1534
|
minWidth: "max-content",
|
|
1558
|
-
zIndex:
|
|
1535
|
+
zIndex: Re,
|
|
1559
1536
|
"--radix-popper-transform-origin": [
|
|
1560
|
-
(
|
|
1561
|
-
(It =
|
|
1537
|
+
(_t = R.transformOrigin) == null ? void 0 : _t.x,
|
|
1538
|
+
(It = R.transformOrigin) == null ? void 0 : It.y
|
|
1562
1539
|
].join(" "),
|
|
1563
1540
|
// hide the content if using the hide middleware and should be hidden
|
|
1564
1541
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
1565
1542
|
// as if the PopperContent isn't there at all
|
|
1566
|
-
...((
|
|
1543
|
+
...((zt = R.hide) == null ? void 0 : zt.referenceHidden) && {
|
|
1567
1544
|
visibility: "hidden",
|
|
1568
1545
|
pointerEvents: "none"
|
|
1569
1546
|
}
|
|
1570
1547
|
},
|
|
1571
1548
|
dir: t.dir,
|
|
1572
|
-
children: /* @__PURE__ */
|
|
1573
|
-
|
|
1549
|
+
children: /* @__PURE__ */ H(
|
|
1550
|
+
Kn,
|
|
1574
1551
|
{
|
|
1575
1552
|
scope: n,
|
|
1576
|
-
placedSide:
|
|
1553
|
+
placedSide: k,
|
|
1577
1554
|
onArrowChange: A,
|
|
1578
|
-
arrowX:
|
|
1579
|
-
arrowY:
|
|
1580
|
-
shouldHideArrow:
|
|
1581
|
-
children: /* @__PURE__ */
|
|
1555
|
+
arrowX: Ae,
|
|
1556
|
+
arrowY: Ee,
|
|
1557
|
+
shouldHideArrow: Pe,
|
|
1558
|
+
children: /* @__PURE__ */ H(
|
|
1582
1559
|
it.div,
|
|
1583
1560
|
{
|
|
1584
|
-
"data-side":
|
|
1585
|
-
"data-align":
|
|
1561
|
+
"data-side": k,
|
|
1562
|
+
"data-align": z,
|
|
1586
1563
|
...m,
|
|
1587
1564
|
ref: E,
|
|
1588
1565
|
style: {
|
|
@@ -1599,19 +1576,19 @@ var $t = "PopperContent", [fo, uo] = ge($t), be = w.forwardRef(
|
|
|
1599
1576
|
);
|
|
1600
1577
|
}
|
|
1601
1578
|
);
|
|
1602
|
-
|
|
1603
|
-
var
|
|
1579
|
+
ye.displayName = $t;
|
|
1580
|
+
var xe = "PopperArrow", Gn = {
|
|
1604
1581
|
top: "bottom",
|
|
1605
1582
|
right: "left",
|
|
1606
1583
|
bottom: "top",
|
|
1607
1584
|
left: "right"
|
|
1608
|
-
},
|
|
1609
|
-
const { __scopePopper: o, ...r } = e, i =
|
|
1585
|
+
}, ve = y.forwardRef(function(e, n) {
|
|
1586
|
+
const { __scopePopper: o, ...r } = e, i = Zn(xe, o), s = Gn[i.placedSide];
|
|
1610
1587
|
return (
|
|
1611
1588
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
1612
1589
|
// doesn't report size as we'd expect on SVG elements.
|
|
1613
1590
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
1614
|
-
/* @__PURE__ */
|
|
1591
|
+
/* @__PURE__ */ H(
|
|
1615
1592
|
"span",
|
|
1616
1593
|
{
|
|
1617
1594
|
ref: i.onArrowChange,
|
|
@@ -1634,8 +1611,8 @@ var Ae = "PopperArrow", po = {
|
|
|
1634
1611
|
}[i.placedSide],
|
|
1635
1612
|
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
1636
1613
|
},
|
|
1637
|
-
children: /* @__PURE__ */
|
|
1638
|
-
|
|
1614
|
+
children: /* @__PURE__ */ H(
|
|
1615
|
+
Un,
|
|
1639
1616
|
{
|
|
1640
1617
|
...r,
|
|
1641
1618
|
ref: n,
|
|
@@ -1650,32 +1627,31 @@ var Ae = "PopperArrow", po = {
|
|
|
1650
1627
|
)
|
|
1651
1628
|
);
|
|
1652
1629
|
});
|
|
1653
|
-
|
|
1654
|
-
function
|
|
1630
|
+
ve.displayName = xe;
|
|
1631
|
+
function Jn(t) {
|
|
1655
1632
|
return t !== null;
|
|
1656
1633
|
}
|
|
1657
|
-
var
|
|
1634
|
+
var Qn = (t) => ({
|
|
1658
1635
|
name: "transformOrigin",
|
|
1659
1636
|
options: t,
|
|
1660
1637
|
fn(e) {
|
|
1661
|
-
var
|
|
1662
|
-
const { placement: n, rects: o, middlewareData: r } = e, s = ((
|
|
1638
|
+
var w, g, v;
|
|
1639
|
+
const { placement: n, rects: o, middlewareData: r } = e, s = ((w = r.arrow) == null ? void 0 : w.centerOffset) !== 0, c = s ? 0 : t.arrowWidth, f = s ? 0 : t.arrowHeight, [l, a] = be(n), u = { start: "0%", center: "50%", end: "100%" }[a], p = (((g = r.arrow) == null ? void 0 : g.x) ?? 0) + c / 2, d = (((v = r.arrow) == null ? void 0 : v.y) ?? 0) + f / 2;
|
|
1663
1640
|
let h = "", m = "";
|
|
1664
|
-
return
|
|
1641
|
+
return l === "bottom" ? (h = s ? u : `${p}px`, m = `${-f}px`) : l === "top" ? (h = s ? u : `${p}px`, m = `${o.floating.height + f}px`) : l === "right" ? (h = `${-f}px`, m = s ? u : `${d}px`) : l === "left" && (h = `${o.floating.width + f}px`, m = s ? u : `${d}px`), { data: { x: h, y: m } };
|
|
1665
1642
|
}
|
|
1666
1643
|
});
|
|
1667
|
-
function
|
|
1644
|
+
function be(t) {
|
|
1668
1645
|
const [e, n = "center"] = t.split("-");
|
|
1669
1646
|
return [e, n];
|
|
1670
1647
|
}
|
|
1671
|
-
var
|
|
1648
|
+
var io = me, so = we, co = ye, lo = ve;
|
|
1672
1649
|
export {
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
xo as u
|
|
1650
|
+
so as A,
|
|
1651
|
+
co as C,
|
|
1652
|
+
Ie as D,
|
|
1653
|
+
io as R,
|
|
1654
|
+
lo as a,
|
|
1655
|
+
ro as c,
|
|
1656
|
+
oo as u
|
|
1681
1657
|
};
|