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