@pdf-viewer/react 1.4.2 → 1.4.3
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/Popover-b7402893.js +1445 -0
- package/dist/{RPDefaultLayout-e27ef121.js → RPDefaultLayout-f9017f0e.js} +606 -601
- package/dist/component-1da194e8.js +337 -0
- package/dist/components/RPConfig.js +270 -259
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +2 -2
- package/dist/components/RPProvider.js +12 -11
- package/dist/components/layout/LayoutContainer.js +3 -2
- package/dist/components/layout/RPDefaultLayout.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 +3 -2
- 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 +4 -3
- 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/SearchTool.js +4 -3
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +4 -3
- package/dist/components/page/AnnotationLayer.js +3 -2
- package/dist/components/page/CanvasLayer.js +3 -2
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +3 -2
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +3 -2
- package/dist/components/page/TextLayer.js +3 -2
- package/dist/components/ui/Checkbox.js +111 -94
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/Popover.js +1 -1
- package/dist/components/ui/RPTooltip.js +206 -205
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/floating-ui.react-dom-15b9b819.js +1310 -0
- package/dist/index-0f08882b.js +1561 -0
- package/dist/index-10ac1200.js +150 -0
- package/dist/index-271658fe.js +331 -0
- package/dist/main.js +1 -1
- package/dist/types/utils/hooks/useWatermark.d.ts +1 -1
- package/dist/utils/hooks/useFileDownload.js +3 -2
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +3 -2
- package/dist/utils/hooks/usePrint.js +3 -2
- package/dist/utils/hooks/useScrollToPage.js +3 -2
- package/dist/utils/hooks/useSearch.js +3 -2
- package/dist/utils/hooks/useThumbnail.js +3 -2
- package/dist/utils/hooks/useVirtualReactWindow.js +3 -2
- package/dist/utils/hooks/useWatermark.js +59 -28
- package/package.json +2 -2
- package/dist/Popover-d11ec15c.js +0 -3061
- package/dist/floating-ui.react-dom-88a86594.js +0 -1447
- package/dist/index-48ca3f30.js +0 -307
- package/dist/index-4ba3ab9a.js +0 -1877
package/dist/Popover-d11ec15c.js
DELETED
|
@@ -1,3061 +0,0 @@
|
|
|
1
|
-
import { jsxs as qn, jsx as Ge } from "react/jsx-runtime";
|
|
2
|
-
import * as x from "react";
|
|
3
|
-
import { useCallback as oe, createContext as ye, useMemo as q, createElement as P, useContext as vt, forwardRef as k, Children as K, isValidElement as re, cloneElement as Ce, Fragment as qt, useEffect as N, useRef as M, useState as j, useLayoutEffect as ze, useReducer as Qn } from "react";
|
|
4
|
-
import * as Jn from "react-dom";
|
|
5
|
-
import eo, { flushSync as Qt } from "react-dom";
|
|
6
|
-
import { c as to } from "./clsx-0c6e471a.js";
|
|
7
|
-
import './assets/Popover.css';function F() {
|
|
8
|
-
return F = Object.assign ? Object.assign.bind() : function(e) {
|
|
9
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
10
|
-
var n = arguments[t];
|
|
11
|
-
for (var o in n)
|
|
12
|
-
({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
|
13
|
-
}
|
|
14
|
-
return e;
|
|
15
|
-
}, F.apply(null, arguments);
|
|
16
|
-
}
|
|
17
|
-
function ae(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
18
|
-
return function(r) {
|
|
19
|
-
if (e == null || e(r), n === !1 || !r.defaultPrevented)
|
|
20
|
-
return t == null ? void 0 : t(r);
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function no(e, t) {
|
|
24
|
-
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
25
|
-
}
|
|
26
|
-
function Jt(...e) {
|
|
27
|
-
return (t) => e.forEach(
|
|
28
|
-
(n) => no(n, t)
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
function Pe(...e) {
|
|
32
|
-
return oe(Jt(...e), e);
|
|
33
|
-
}
|
|
34
|
-
function oo(e, t = []) {
|
|
35
|
-
let n = [];
|
|
36
|
-
function o(i, c) {
|
|
37
|
-
const s = /* @__PURE__ */ ye(c), a = n.length;
|
|
38
|
-
n = [
|
|
39
|
-
...n,
|
|
40
|
-
c
|
|
41
|
-
];
|
|
42
|
-
function u(l) {
|
|
43
|
-
const { scope: v, children: d, ...m } = l, p = (v == null ? void 0 : v[e][a]) || s, h = q(
|
|
44
|
-
() => m,
|
|
45
|
-
Object.values(m)
|
|
46
|
-
);
|
|
47
|
-
return /* @__PURE__ */ P(p.Provider, {
|
|
48
|
-
value: h
|
|
49
|
-
}, d);
|
|
50
|
-
}
|
|
51
|
-
function f(l, v) {
|
|
52
|
-
const d = (v == null ? void 0 : v[e][a]) || s, m = vt(d);
|
|
53
|
-
if (m)
|
|
54
|
-
return m;
|
|
55
|
-
if (c !== void 0)
|
|
56
|
-
return c;
|
|
57
|
-
throw new Error(`\`${l}\` must be used within \`${i}\``);
|
|
58
|
-
}
|
|
59
|
-
return u.displayName = i + "Provider", [
|
|
60
|
-
u,
|
|
61
|
-
f
|
|
62
|
-
];
|
|
63
|
-
}
|
|
64
|
-
const r = () => {
|
|
65
|
-
const i = n.map((c) => /* @__PURE__ */ ye(c));
|
|
66
|
-
return function(s) {
|
|
67
|
-
const a = (s == null ? void 0 : s[e]) || i;
|
|
68
|
-
return q(
|
|
69
|
-
() => ({
|
|
70
|
-
[`__scope${e}`]: {
|
|
71
|
-
...s,
|
|
72
|
-
[e]: a
|
|
73
|
-
}
|
|
74
|
-
}),
|
|
75
|
-
[
|
|
76
|
-
s,
|
|
77
|
-
a
|
|
78
|
-
]
|
|
79
|
-
);
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
return r.scopeName = e, [
|
|
83
|
-
o,
|
|
84
|
-
ro(r, ...t)
|
|
85
|
-
];
|
|
86
|
-
}
|
|
87
|
-
function ro(...e) {
|
|
88
|
-
const t = e[0];
|
|
89
|
-
if (e.length === 1)
|
|
90
|
-
return t;
|
|
91
|
-
const n = () => {
|
|
92
|
-
const o = e.map(
|
|
93
|
-
(r) => ({
|
|
94
|
-
useScope: r(),
|
|
95
|
-
scopeName: r.scopeName
|
|
96
|
-
})
|
|
97
|
-
);
|
|
98
|
-
return function(i) {
|
|
99
|
-
const c = o.reduce((s, { useScope: a, scopeName: u }) => {
|
|
100
|
-
const l = a(i)[`__scope${u}`];
|
|
101
|
-
return {
|
|
102
|
-
...s,
|
|
103
|
-
...l
|
|
104
|
-
};
|
|
105
|
-
}, {});
|
|
106
|
-
return q(
|
|
107
|
-
() => ({
|
|
108
|
-
[`__scope${t.scopeName}`]: c
|
|
109
|
-
}),
|
|
110
|
-
[
|
|
111
|
-
c
|
|
112
|
-
]
|
|
113
|
-
);
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
return n.scopeName = t.scopeName, n;
|
|
117
|
-
}
|
|
118
|
-
const ht = /* @__PURE__ */ k((e, t) => {
|
|
119
|
-
const { children: n, ...o } = e, r = K.toArray(n), i = r.find(co);
|
|
120
|
-
if (i) {
|
|
121
|
-
const c = i.props.children, s = r.map((a) => a === i ? K.count(c) > 1 ? K.only(null) : /* @__PURE__ */ re(c) ? c.props.children : null : a);
|
|
122
|
-
return /* @__PURE__ */ P(ct, F({}, o, {
|
|
123
|
-
ref: t
|
|
124
|
-
}), /* @__PURE__ */ re(c) ? /* @__PURE__ */ Ce(c, void 0, s) : null);
|
|
125
|
-
}
|
|
126
|
-
return /* @__PURE__ */ P(ct, F({}, o, {
|
|
127
|
-
ref: t
|
|
128
|
-
}), n);
|
|
129
|
-
});
|
|
130
|
-
ht.displayName = "Slot";
|
|
131
|
-
const ct = /* @__PURE__ */ k((e, t) => {
|
|
132
|
-
const { children: n, ...o } = e;
|
|
133
|
-
return /* @__PURE__ */ re(n) ? /* @__PURE__ */ Ce(n, {
|
|
134
|
-
...so(o, n.props),
|
|
135
|
-
ref: t ? Jt(t, n.ref) : n.ref
|
|
136
|
-
}) : K.count(n) > 1 ? K.only(null) : null;
|
|
137
|
-
});
|
|
138
|
-
ct.displayName = "SlotClone";
|
|
139
|
-
const io = ({ children: e }) => /* @__PURE__ */ P(qt, null, e);
|
|
140
|
-
function co(e) {
|
|
141
|
-
return /* @__PURE__ */ re(e) && e.type === io;
|
|
142
|
-
}
|
|
143
|
-
function so(e, t) {
|
|
144
|
-
const n = {
|
|
145
|
-
...t
|
|
146
|
-
};
|
|
147
|
-
for (const o in t) {
|
|
148
|
-
const r = e[o], i = t[o];
|
|
149
|
-
/^on[A-Z]/.test(o) ? r && i ? n[o] = (...s) => {
|
|
150
|
-
i(...s), r(...s);
|
|
151
|
-
} : r && (n[o] = r) : o === "style" ? n[o] = {
|
|
152
|
-
...r,
|
|
153
|
-
...i
|
|
154
|
-
} : o === "className" && (n[o] = [
|
|
155
|
-
r,
|
|
156
|
-
i
|
|
157
|
-
].filter(Boolean).join(" "));
|
|
158
|
-
}
|
|
159
|
-
return {
|
|
160
|
-
...e,
|
|
161
|
-
...n
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
const ao = [
|
|
165
|
-
"a",
|
|
166
|
-
"button",
|
|
167
|
-
"div",
|
|
168
|
-
"form",
|
|
169
|
-
"h2",
|
|
170
|
-
"h3",
|
|
171
|
-
"img",
|
|
172
|
-
"input",
|
|
173
|
-
"label",
|
|
174
|
-
"li",
|
|
175
|
-
"nav",
|
|
176
|
-
"ol",
|
|
177
|
-
"p",
|
|
178
|
-
"span",
|
|
179
|
-
"svg",
|
|
180
|
-
"ul"
|
|
181
|
-
], Ve = ao.reduce((e, t) => {
|
|
182
|
-
const n = /* @__PURE__ */ k((o, r) => {
|
|
183
|
-
const { asChild: i, ...c } = o, s = i ? ht : t;
|
|
184
|
-
return N(() => {
|
|
185
|
-
window[Symbol.for("radix-ui")] = !0;
|
|
186
|
-
}, []), /* @__PURE__ */ P(s, F({}, c, {
|
|
187
|
-
ref: r
|
|
188
|
-
}));
|
|
189
|
-
});
|
|
190
|
-
return n.displayName = `Primitive.${t}`, {
|
|
191
|
-
...e,
|
|
192
|
-
[t]: n
|
|
193
|
-
};
|
|
194
|
-
}, {});
|
|
195
|
-
function lo(e, t) {
|
|
196
|
-
e && Qt(
|
|
197
|
-
() => e.dispatchEvent(t)
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
function mt(e) {
|
|
201
|
-
const t = M(e);
|
|
202
|
-
return N(() => {
|
|
203
|
-
t.current = e;
|
|
204
|
-
}), q(
|
|
205
|
-
() => (...n) => {
|
|
206
|
-
var o;
|
|
207
|
-
return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
|
|
208
|
-
},
|
|
209
|
-
[]
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
function uo(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
213
|
-
const n = mt(e);
|
|
214
|
-
N(() => {
|
|
215
|
-
const o = (r) => {
|
|
216
|
-
r.key === "Escape" && n(r);
|
|
217
|
-
};
|
|
218
|
-
return t.addEventListener("keydown", o), () => t.removeEventListener("keydown", o);
|
|
219
|
-
}, [
|
|
220
|
-
n,
|
|
221
|
-
t
|
|
222
|
-
]);
|
|
223
|
-
}
|
|
224
|
-
const st = "dismissableLayer.update", fo = "dismissableLayer.pointerDownOutside", po = "dismissableLayer.focusOutside";
|
|
225
|
-
let Ot;
|
|
226
|
-
const vo = /* @__PURE__ */ ye({
|
|
227
|
-
layers: /* @__PURE__ */ new Set(),
|
|
228
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
229
|
-
branches: /* @__PURE__ */ new Set()
|
|
230
|
-
}), ho = /* @__PURE__ */ k((e, t) => {
|
|
231
|
-
var n;
|
|
232
|
-
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: r, onPointerDownOutside: i, onFocusOutside: c, onInteractOutside: s, onDismiss: a, ...u } = e, f = vt(vo), [l, v] = j(null), d = (n = l == null ? void 0 : l.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document, [, m] = j({}), p = Pe(
|
|
233
|
-
t,
|
|
234
|
-
(E) => v(E)
|
|
235
|
-
), h = Array.from(f.layers), [g] = [
|
|
236
|
-
...f.layersWithOutsidePointerEventsDisabled
|
|
237
|
-
].slice(-1), w = h.indexOf(g), b = l ? h.indexOf(l) : -1, $ = f.layersWithOutsidePointerEventsDisabled.size > 0, y = b >= w, A = mo((E) => {
|
|
238
|
-
const O = E.target, D = [
|
|
239
|
-
...f.branches
|
|
240
|
-
].some(
|
|
241
|
-
(_) => _.contains(O)
|
|
242
|
-
);
|
|
243
|
-
!y || D || (i == null || i(E), s == null || s(E), E.defaultPrevented || a == null || a());
|
|
244
|
-
}, d), C = go((E) => {
|
|
245
|
-
const O = E.target;
|
|
246
|
-
[
|
|
247
|
-
...f.branches
|
|
248
|
-
].some(
|
|
249
|
-
(_) => _.contains(O)
|
|
250
|
-
) || (c == null || c(E), s == null || s(E), E.defaultPrevented || a == null || a());
|
|
251
|
-
}, d);
|
|
252
|
-
return uo((E) => {
|
|
253
|
-
b === f.layers.size - 1 && (r == null || r(E), !E.defaultPrevented && a && (E.preventDefault(), a()));
|
|
254
|
-
}, d), N(() => {
|
|
255
|
-
if (l)
|
|
256
|
-
return o && (f.layersWithOutsidePointerEventsDisabled.size === 0 && (Ot = d.body.style.pointerEvents, d.body.style.pointerEvents = "none"), f.layersWithOutsidePointerEventsDisabled.add(l)), f.layers.add(l), Rt(), () => {
|
|
257
|
-
o && f.layersWithOutsidePointerEventsDisabled.size === 1 && (d.body.style.pointerEvents = Ot);
|
|
258
|
-
};
|
|
259
|
-
}, [
|
|
260
|
-
l,
|
|
261
|
-
d,
|
|
262
|
-
o,
|
|
263
|
-
f
|
|
264
|
-
]), N(() => () => {
|
|
265
|
-
l && (f.layers.delete(l), f.layersWithOutsidePointerEventsDisabled.delete(l), Rt());
|
|
266
|
-
}, [
|
|
267
|
-
l,
|
|
268
|
-
f
|
|
269
|
-
]), N(() => {
|
|
270
|
-
const E = () => m({});
|
|
271
|
-
return document.addEventListener(st, E), () => document.removeEventListener(st, E);
|
|
272
|
-
}, []), /* @__PURE__ */ P(Ve.div, F({}, u, {
|
|
273
|
-
ref: p,
|
|
274
|
-
style: {
|
|
275
|
-
pointerEvents: $ ? y ? "auto" : "none" : void 0,
|
|
276
|
-
...e.style
|
|
277
|
-
},
|
|
278
|
-
onFocusCapture: ae(e.onFocusCapture, C.onFocusCapture),
|
|
279
|
-
onBlurCapture: ae(e.onBlurCapture, C.onBlurCapture),
|
|
280
|
-
onPointerDownCapture: ae(e.onPointerDownCapture, A.onPointerDownCapture)
|
|
281
|
-
}));
|
|
282
|
-
});
|
|
283
|
-
function mo(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
284
|
-
const n = mt(e), o = M(!1), r = M(() => {
|
|
285
|
-
});
|
|
286
|
-
return N(() => {
|
|
287
|
-
const i = (s) => {
|
|
288
|
-
if (s.target && !o.current) {
|
|
289
|
-
let u = function() {
|
|
290
|
-
en(fo, n, a, {
|
|
291
|
-
discrete: !0
|
|
292
|
-
});
|
|
293
|
-
};
|
|
294
|
-
const a = {
|
|
295
|
-
originalEvent: s
|
|
296
|
-
};
|
|
297
|
-
s.pointerType === "touch" ? (t.removeEventListener("click", r.current), r.current = u, t.addEventListener("click", r.current, {
|
|
298
|
-
once: !0
|
|
299
|
-
})) : u();
|
|
300
|
-
}
|
|
301
|
-
o.current = !1;
|
|
302
|
-
}, c = window.setTimeout(() => {
|
|
303
|
-
t.addEventListener("pointerdown", i);
|
|
304
|
-
}, 0);
|
|
305
|
-
return () => {
|
|
306
|
-
window.clearTimeout(c), t.removeEventListener("pointerdown", i), t.removeEventListener("click", r.current);
|
|
307
|
-
};
|
|
308
|
-
}, [
|
|
309
|
-
t,
|
|
310
|
-
n
|
|
311
|
-
]), {
|
|
312
|
-
// ensures we check React component tree (not just DOM tree)
|
|
313
|
-
onPointerDownCapture: () => o.current = !0
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
function go(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
317
|
-
const n = mt(e), o = M(!1);
|
|
318
|
-
return N(() => {
|
|
319
|
-
const r = (i) => {
|
|
320
|
-
i.target && !o.current && en(po, n, {
|
|
321
|
-
originalEvent: i
|
|
322
|
-
}, {
|
|
323
|
-
discrete: !1
|
|
324
|
-
});
|
|
325
|
-
};
|
|
326
|
-
return t.addEventListener("focusin", r), () => t.removeEventListener("focusin", r);
|
|
327
|
-
}, [
|
|
328
|
-
t,
|
|
329
|
-
n
|
|
330
|
-
]), {
|
|
331
|
-
onFocusCapture: () => o.current = !0,
|
|
332
|
-
onBlurCapture: () => o.current = !1
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
function Rt() {
|
|
336
|
-
const e = new CustomEvent(st);
|
|
337
|
-
document.dispatchEvent(e);
|
|
338
|
-
}
|
|
339
|
-
function en(e, t, n, { discrete: o }) {
|
|
340
|
-
const r = n.originalEvent.target, i = new CustomEvent(e, {
|
|
341
|
-
bubbles: !1,
|
|
342
|
-
cancelable: !0,
|
|
343
|
-
detail: n
|
|
344
|
-
});
|
|
345
|
-
t && r.addEventListener(e, t, {
|
|
346
|
-
once: !0
|
|
347
|
-
}), o ? lo(r, i) : r.dispatchEvent(i);
|
|
348
|
-
}
|
|
349
|
-
let qe = 0;
|
|
350
|
-
function bo() {
|
|
351
|
-
N(() => {
|
|
352
|
-
var e, t;
|
|
353
|
-
const n = document.querySelectorAll("[data-radix-focus-guard]");
|
|
354
|
-
return document.body.insertAdjacentElement("afterbegin", (e = n[0]) !== null && e !== void 0 ? e : Tt()), document.body.insertAdjacentElement("beforeend", (t = n[1]) !== null && t !== void 0 ? t : Tt()), qe++, () => {
|
|
355
|
-
qe === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
|
|
356
|
-
(o) => o.remove()
|
|
357
|
-
), qe--;
|
|
358
|
-
};
|
|
359
|
-
}, []);
|
|
360
|
-
}
|
|
361
|
-
function Tt() {
|
|
362
|
-
const e = document.createElement("span");
|
|
363
|
-
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
|
|
364
|
-
}
|
|
365
|
-
function Dt(e) {
|
|
366
|
-
const t = M(e);
|
|
367
|
-
return N(() => {
|
|
368
|
-
t.current = e;
|
|
369
|
-
}), q(
|
|
370
|
-
() => (...n) => {
|
|
371
|
-
var o;
|
|
372
|
-
return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
|
|
373
|
-
},
|
|
374
|
-
[]
|
|
375
|
-
);
|
|
376
|
-
}
|
|
377
|
-
const Qe = "focusScope.autoFocusOnMount", Je = "focusScope.autoFocusOnUnmount", _t = {
|
|
378
|
-
bubbles: !1,
|
|
379
|
-
cancelable: !0
|
|
380
|
-
}, $o = /* @__PURE__ */ k((e, t) => {
|
|
381
|
-
const { loop: n = !1, trapped: o = !1, onMountAutoFocus: r, onUnmountAutoFocus: i, ...c } = e, [s, a] = j(null), u = Dt(r), f = Dt(i), l = M(null), v = Pe(
|
|
382
|
-
t,
|
|
383
|
-
(p) => a(p)
|
|
384
|
-
), d = M({
|
|
385
|
-
paused: !1,
|
|
386
|
-
pause() {
|
|
387
|
-
this.paused = !0;
|
|
388
|
-
},
|
|
389
|
-
resume() {
|
|
390
|
-
this.paused = !1;
|
|
391
|
-
}
|
|
392
|
-
}).current;
|
|
393
|
-
N(() => {
|
|
394
|
-
if (o) {
|
|
395
|
-
let p = function(b) {
|
|
396
|
-
if (d.paused || !s)
|
|
397
|
-
return;
|
|
398
|
-
const $ = b.target;
|
|
399
|
-
s.contains($) ? l.current = $ : ne(l.current, {
|
|
400
|
-
select: !0
|
|
401
|
-
});
|
|
402
|
-
}, h = function(b) {
|
|
403
|
-
if (d.paused || !s)
|
|
404
|
-
return;
|
|
405
|
-
const $ = b.relatedTarget;
|
|
406
|
-
$ !== null && (s.contains($) || ne(l.current, {
|
|
407
|
-
select: !0
|
|
408
|
-
}));
|
|
409
|
-
}, g = function(b) {
|
|
410
|
-
const $ = document.activeElement;
|
|
411
|
-
for (const y of b)
|
|
412
|
-
y.removedNodes.length > 0 && (s != null && s.contains($) || ne(s));
|
|
413
|
-
};
|
|
414
|
-
document.addEventListener("focusin", p), document.addEventListener("focusout", h);
|
|
415
|
-
const w = new MutationObserver(g);
|
|
416
|
-
return s && w.observe(s, {
|
|
417
|
-
childList: !0,
|
|
418
|
-
subtree: !0
|
|
419
|
-
}), () => {
|
|
420
|
-
document.removeEventListener("focusin", p), document.removeEventListener("focusout", h), w.disconnect();
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
}, [
|
|
424
|
-
o,
|
|
425
|
-
s,
|
|
426
|
-
d.paused
|
|
427
|
-
]), N(() => {
|
|
428
|
-
if (s) {
|
|
429
|
-
Ft.add(d);
|
|
430
|
-
const p = document.activeElement;
|
|
431
|
-
if (!s.contains(p)) {
|
|
432
|
-
const g = new CustomEvent(Qe, _t);
|
|
433
|
-
s.addEventListener(Qe, u), s.dispatchEvent(g), g.defaultPrevented || (yo(Po(tn(s)), {
|
|
434
|
-
select: !0
|
|
435
|
-
}), document.activeElement === p && ne(s));
|
|
436
|
-
}
|
|
437
|
-
return () => {
|
|
438
|
-
s.removeEventListener(Qe, u), setTimeout(() => {
|
|
439
|
-
const g = new CustomEvent(Je, _t);
|
|
440
|
-
s.addEventListener(Je, f), s.dispatchEvent(g), g.defaultPrevented || ne(p ?? document.body, {
|
|
441
|
-
select: !0
|
|
442
|
-
}), s.removeEventListener(Je, f), Ft.remove(d);
|
|
443
|
-
}, 0);
|
|
444
|
-
};
|
|
445
|
-
}
|
|
446
|
-
}, [
|
|
447
|
-
s,
|
|
448
|
-
u,
|
|
449
|
-
f,
|
|
450
|
-
d
|
|
451
|
-
]);
|
|
452
|
-
const m = oe((p) => {
|
|
453
|
-
if (!n && !o || d.paused)
|
|
454
|
-
return;
|
|
455
|
-
const h = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, g = document.activeElement;
|
|
456
|
-
if (h && g) {
|
|
457
|
-
const w = p.currentTarget, [b, $] = wo(w);
|
|
458
|
-
b && $ ? !p.shiftKey && g === $ ? (p.preventDefault(), n && ne(b, {
|
|
459
|
-
select: !0
|
|
460
|
-
})) : p.shiftKey && g === b && (p.preventDefault(), n && ne($, {
|
|
461
|
-
select: !0
|
|
462
|
-
})) : g === w && p.preventDefault();
|
|
463
|
-
}
|
|
464
|
-
}, [
|
|
465
|
-
n,
|
|
466
|
-
o,
|
|
467
|
-
d.paused
|
|
468
|
-
]);
|
|
469
|
-
return /* @__PURE__ */ P(Ve.div, F({
|
|
470
|
-
tabIndex: -1
|
|
471
|
-
}, c, {
|
|
472
|
-
ref: v,
|
|
473
|
-
onKeyDown: m
|
|
474
|
-
}));
|
|
475
|
-
});
|
|
476
|
-
function yo(e, { select: t = !1 } = {}) {
|
|
477
|
-
const n = document.activeElement;
|
|
478
|
-
for (const o of e)
|
|
479
|
-
if (ne(o, {
|
|
480
|
-
select: t
|
|
481
|
-
}), document.activeElement !== n)
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
function wo(e) {
|
|
485
|
-
const t = tn(e), n = Nt(t, e), o = Nt(t.reverse(), e);
|
|
486
|
-
return [
|
|
487
|
-
n,
|
|
488
|
-
o
|
|
489
|
-
];
|
|
490
|
-
}
|
|
491
|
-
function tn(e) {
|
|
492
|
-
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
493
|
-
acceptNode: (o) => {
|
|
494
|
-
const r = o.tagName === "INPUT" && o.type === "hidden";
|
|
495
|
-
return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
496
|
-
}
|
|
497
|
-
});
|
|
498
|
-
for (; n.nextNode(); )
|
|
499
|
-
t.push(n.currentNode);
|
|
500
|
-
return t;
|
|
501
|
-
}
|
|
502
|
-
function Nt(e, t) {
|
|
503
|
-
for (const n of e)
|
|
504
|
-
if (!xo(n, {
|
|
505
|
-
upTo: t
|
|
506
|
-
}))
|
|
507
|
-
return n;
|
|
508
|
-
}
|
|
509
|
-
function xo(e, { upTo: t }) {
|
|
510
|
-
if (getComputedStyle(e).visibility === "hidden")
|
|
511
|
-
return !0;
|
|
512
|
-
for (; e; ) {
|
|
513
|
-
if (t !== void 0 && e === t)
|
|
514
|
-
return !1;
|
|
515
|
-
if (getComputedStyle(e).display === "none")
|
|
516
|
-
return !0;
|
|
517
|
-
e = e.parentElement;
|
|
518
|
-
}
|
|
519
|
-
return !1;
|
|
520
|
-
}
|
|
521
|
-
function Eo(e) {
|
|
522
|
-
return e instanceof HTMLInputElement && "select" in e;
|
|
523
|
-
}
|
|
524
|
-
function ne(e, { select: t = !1 } = {}) {
|
|
525
|
-
if (e && e.focus) {
|
|
526
|
-
const n = document.activeElement;
|
|
527
|
-
e.focus({
|
|
528
|
-
preventScroll: !0
|
|
529
|
-
}), e !== n && Eo(e) && t && e.select();
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
const Ft = Co();
|
|
533
|
-
function Co() {
|
|
534
|
-
let e = [];
|
|
535
|
-
return {
|
|
536
|
-
add(t) {
|
|
537
|
-
const n = e[0];
|
|
538
|
-
t !== n && (n == null || n.pause()), e = Lt(e, t), e.unshift(t);
|
|
539
|
-
},
|
|
540
|
-
remove(t) {
|
|
541
|
-
var n;
|
|
542
|
-
e = Lt(e, t), (n = e[0]) === null || n === void 0 || n.resume();
|
|
543
|
-
}
|
|
544
|
-
};
|
|
545
|
-
}
|
|
546
|
-
function Lt(e, t) {
|
|
547
|
-
const n = [
|
|
548
|
-
...e
|
|
549
|
-
], o = n.indexOf(t);
|
|
550
|
-
return o !== -1 && n.splice(o, 1), n;
|
|
551
|
-
}
|
|
552
|
-
function Po(e) {
|
|
553
|
-
return e.filter(
|
|
554
|
-
(t) => t.tagName !== "A"
|
|
555
|
-
);
|
|
556
|
-
}
|
|
557
|
-
const Ao = globalThis != null && globalThis.document ? ze : () => {
|
|
558
|
-
}, So = x["useId".toString()] || (() => {
|
|
559
|
-
});
|
|
560
|
-
let Oo = 0;
|
|
561
|
-
function Ro(e) {
|
|
562
|
-
const [t, n] = x.useState(So());
|
|
563
|
-
return Ao(() => {
|
|
564
|
-
e || n(
|
|
565
|
-
(o) => o ?? String(Oo++)
|
|
566
|
-
);
|
|
567
|
-
}, [
|
|
568
|
-
e
|
|
569
|
-
]), e || (t ? `radix-${t}` : "");
|
|
570
|
-
}
|
|
571
|
-
const To = ["top", "right", "bottom", "left"], ie = Math.min, H = Math.max, We = Math.round, Te = Math.floor, G = (e) => ({
|
|
572
|
-
x: e,
|
|
573
|
-
y: e
|
|
574
|
-
}), Do = {
|
|
575
|
-
left: "right",
|
|
576
|
-
right: "left",
|
|
577
|
-
bottom: "top",
|
|
578
|
-
top: "bottom"
|
|
579
|
-
}, _o = {
|
|
580
|
-
start: "end",
|
|
581
|
-
end: "start"
|
|
582
|
-
};
|
|
583
|
-
function at(e, t, n) {
|
|
584
|
-
return H(e, ie(t, n));
|
|
585
|
-
}
|
|
586
|
-
function ee(e, t) {
|
|
587
|
-
return typeof e == "function" ? e(t) : e;
|
|
588
|
-
}
|
|
589
|
-
function te(e) {
|
|
590
|
-
return e.split("-")[0];
|
|
591
|
-
}
|
|
592
|
-
function ge(e) {
|
|
593
|
-
return e.split("-")[1];
|
|
594
|
-
}
|
|
595
|
-
function gt(e) {
|
|
596
|
-
return e === "x" ? "y" : "x";
|
|
597
|
-
}
|
|
598
|
-
function bt(e) {
|
|
599
|
-
return e === "y" ? "height" : "width";
|
|
600
|
-
}
|
|
601
|
-
function ce(e) {
|
|
602
|
-
return ["top", "bottom"].includes(te(e)) ? "y" : "x";
|
|
603
|
-
}
|
|
604
|
-
function $t(e) {
|
|
605
|
-
return gt(ce(e));
|
|
606
|
-
}
|
|
607
|
-
function No(e, t, n) {
|
|
608
|
-
n === void 0 && (n = !1);
|
|
609
|
-
const o = ge(e), r = $t(e), i = bt(r);
|
|
610
|
-
let c = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
611
|
-
return t.reference[i] > t.floating[i] && (c = Be(c)), [c, Be(c)];
|
|
612
|
-
}
|
|
613
|
-
function Fo(e) {
|
|
614
|
-
const t = Be(e);
|
|
615
|
-
return [lt(e), t, lt(t)];
|
|
616
|
-
}
|
|
617
|
-
function lt(e) {
|
|
618
|
-
return e.replace(/start|end/g, (t) => _o[t]);
|
|
619
|
-
}
|
|
620
|
-
function Lo(e, t, n) {
|
|
621
|
-
const o = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], c = ["bottom", "top"];
|
|
622
|
-
switch (e) {
|
|
623
|
-
case "top":
|
|
624
|
-
case "bottom":
|
|
625
|
-
return n ? t ? r : o : t ? o : r;
|
|
626
|
-
case "left":
|
|
627
|
-
case "right":
|
|
628
|
-
return t ? i : c;
|
|
629
|
-
default:
|
|
630
|
-
return [];
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
function Mo(e, t, n, o) {
|
|
634
|
-
const r = ge(e);
|
|
635
|
-
let i = Lo(te(e), n === "start", o);
|
|
636
|
-
return r && (i = i.map((c) => c + "-" + r), t && (i = i.concat(i.map(lt)))), i;
|
|
637
|
-
}
|
|
638
|
-
function Be(e) {
|
|
639
|
-
return e.replace(/left|right|bottom|top/g, (t) => Do[t]);
|
|
640
|
-
}
|
|
641
|
-
function ko(e) {
|
|
642
|
-
return {
|
|
643
|
-
top: 0,
|
|
644
|
-
right: 0,
|
|
645
|
-
bottom: 0,
|
|
646
|
-
left: 0,
|
|
647
|
-
...e
|
|
648
|
-
};
|
|
649
|
-
}
|
|
650
|
-
function nn(e) {
|
|
651
|
-
return typeof e != "number" ? ko(e) : {
|
|
652
|
-
top: e,
|
|
653
|
-
right: e,
|
|
654
|
-
bottom: e,
|
|
655
|
-
left: e
|
|
656
|
-
};
|
|
657
|
-
}
|
|
658
|
-
function He(e) {
|
|
659
|
-
const {
|
|
660
|
-
x: t,
|
|
661
|
-
y: n,
|
|
662
|
-
width: o,
|
|
663
|
-
height: r
|
|
664
|
-
} = e;
|
|
665
|
-
return {
|
|
666
|
-
width: o,
|
|
667
|
-
height: r,
|
|
668
|
-
top: n,
|
|
669
|
-
left: t,
|
|
670
|
-
right: t + o,
|
|
671
|
-
bottom: n + r,
|
|
672
|
-
x: t,
|
|
673
|
-
y: n
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
function Mt(e, t, n) {
|
|
677
|
-
let {
|
|
678
|
-
reference: o,
|
|
679
|
-
floating: r
|
|
680
|
-
} = e;
|
|
681
|
-
const i = ce(t), c = $t(t), s = bt(c), a = te(t), u = i === "y", f = o.x + o.width / 2 - r.width / 2, l = o.y + o.height / 2 - r.height / 2, v = o[s] / 2 - r[s] / 2;
|
|
682
|
-
let d;
|
|
683
|
-
switch (a) {
|
|
684
|
-
case "top":
|
|
685
|
-
d = {
|
|
686
|
-
x: f,
|
|
687
|
-
y: o.y - r.height
|
|
688
|
-
};
|
|
689
|
-
break;
|
|
690
|
-
case "bottom":
|
|
691
|
-
d = {
|
|
692
|
-
x: f,
|
|
693
|
-
y: o.y + o.height
|
|
694
|
-
};
|
|
695
|
-
break;
|
|
696
|
-
case "right":
|
|
697
|
-
d = {
|
|
698
|
-
x: o.x + o.width,
|
|
699
|
-
y: l
|
|
700
|
-
};
|
|
701
|
-
break;
|
|
702
|
-
case "left":
|
|
703
|
-
d = {
|
|
704
|
-
x: o.x - r.width,
|
|
705
|
-
y: l
|
|
706
|
-
};
|
|
707
|
-
break;
|
|
708
|
-
default:
|
|
709
|
-
d = {
|
|
710
|
-
x: o.x,
|
|
711
|
-
y: o.y
|
|
712
|
-
};
|
|
713
|
-
}
|
|
714
|
-
switch (ge(t)) {
|
|
715
|
-
case "start":
|
|
716
|
-
d[c] -= v * (n && u ? -1 : 1);
|
|
717
|
-
break;
|
|
718
|
-
case "end":
|
|
719
|
-
d[c] += v * (n && u ? -1 : 1);
|
|
720
|
-
break;
|
|
721
|
-
}
|
|
722
|
-
return d;
|
|
723
|
-
}
|
|
724
|
-
const Io = async (e, t, n) => {
|
|
725
|
-
const {
|
|
726
|
-
placement: o = "bottom",
|
|
727
|
-
strategy: r = "absolute",
|
|
728
|
-
middleware: i = [],
|
|
729
|
-
platform: c
|
|
730
|
-
} = n, s = i.filter(Boolean), a = await (c.isRTL == null ? void 0 : c.isRTL(t));
|
|
731
|
-
let u = await c.getElementRects({
|
|
732
|
-
reference: e,
|
|
733
|
-
floating: t,
|
|
734
|
-
strategy: r
|
|
735
|
-
}), {
|
|
736
|
-
x: f,
|
|
737
|
-
y: l
|
|
738
|
-
} = Mt(u, o, a), v = o, d = {}, m = 0;
|
|
739
|
-
for (let p = 0; p < s.length; p++) {
|
|
740
|
-
const {
|
|
741
|
-
name: h,
|
|
742
|
-
fn: g
|
|
743
|
-
} = s[p], {
|
|
744
|
-
x: w,
|
|
745
|
-
y: b,
|
|
746
|
-
data: $,
|
|
747
|
-
reset: y
|
|
748
|
-
} = await g({
|
|
749
|
-
x: f,
|
|
750
|
-
y: l,
|
|
751
|
-
initialPlacement: o,
|
|
752
|
-
placement: v,
|
|
753
|
-
strategy: r,
|
|
754
|
-
middlewareData: d,
|
|
755
|
-
rects: u,
|
|
756
|
-
platform: c,
|
|
757
|
-
elements: {
|
|
758
|
-
reference: e,
|
|
759
|
-
floating: t
|
|
760
|
-
}
|
|
761
|
-
});
|
|
762
|
-
f = w ?? f, l = b ?? l, d = {
|
|
763
|
-
...d,
|
|
764
|
-
[h]: {
|
|
765
|
-
...d[h],
|
|
766
|
-
...$
|
|
767
|
-
}
|
|
768
|
-
}, y && m <= 50 && (m++, typeof y == "object" && (y.placement && (v = y.placement), y.rects && (u = y.rects === !0 ? await c.getElementRects({
|
|
769
|
-
reference: e,
|
|
770
|
-
floating: t,
|
|
771
|
-
strategy: r
|
|
772
|
-
}) : y.rects), {
|
|
773
|
-
x: f,
|
|
774
|
-
y: l
|
|
775
|
-
} = Mt(u, v, a)), p = -1);
|
|
776
|
-
}
|
|
777
|
-
return {
|
|
778
|
-
x: f,
|
|
779
|
-
y: l,
|
|
780
|
-
placement: v,
|
|
781
|
-
strategy: r,
|
|
782
|
-
middlewareData: d
|
|
783
|
-
};
|
|
784
|
-
};
|
|
785
|
-
async function we(e, t) {
|
|
786
|
-
var n;
|
|
787
|
-
t === void 0 && (t = {});
|
|
788
|
-
const {
|
|
789
|
-
x: o,
|
|
790
|
-
y: r,
|
|
791
|
-
platform: i,
|
|
792
|
-
rects: c,
|
|
793
|
-
elements: s,
|
|
794
|
-
strategy: a
|
|
795
|
-
} = e, {
|
|
796
|
-
boundary: u = "clippingAncestors",
|
|
797
|
-
rootBoundary: f = "viewport",
|
|
798
|
-
elementContext: l = "floating",
|
|
799
|
-
altBoundary: v = !1,
|
|
800
|
-
padding: d = 0
|
|
801
|
-
} = ee(t, e), m = nn(d), h = s[v ? l === "floating" ? "reference" : "floating" : l], g = He(await i.getClippingRect({
|
|
802
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(h))) == null || n ? h : h.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(s.floating)),
|
|
803
|
-
boundary: u,
|
|
804
|
-
rootBoundary: f,
|
|
805
|
-
strategy: a
|
|
806
|
-
})), w = l === "floating" ? {
|
|
807
|
-
x: o,
|
|
808
|
-
y: r,
|
|
809
|
-
width: c.floating.width,
|
|
810
|
-
height: c.floating.height
|
|
811
|
-
} : c.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(s.floating)), $ = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
|
|
812
|
-
x: 1,
|
|
813
|
-
y: 1
|
|
814
|
-
} : {
|
|
815
|
-
x: 1,
|
|
816
|
-
y: 1
|
|
817
|
-
}, y = He(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
818
|
-
elements: s,
|
|
819
|
-
rect: w,
|
|
820
|
-
offsetParent: b,
|
|
821
|
-
strategy: a
|
|
822
|
-
}) : w);
|
|
823
|
-
return {
|
|
824
|
-
top: (g.top - y.top + m.top) / $.y,
|
|
825
|
-
bottom: (y.bottom - g.bottom + m.bottom) / $.y,
|
|
826
|
-
left: (g.left - y.left + m.left) / $.x,
|
|
827
|
-
right: (y.right - g.right + m.right) / $.x
|
|
828
|
-
};
|
|
829
|
-
}
|
|
830
|
-
const Wo = (e) => ({
|
|
831
|
-
name: "arrow",
|
|
832
|
-
options: e,
|
|
833
|
-
async fn(t) {
|
|
834
|
-
const {
|
|
835
|
-
x: n,
|
|
836
|
-
y: o,
|
|
837
|
-
placement: r,
|
|
838
|
-
rects: i,
|
|
839
|
-
platform: c,
|
|
840
|
-
elements: s,
|
|
841
|
-
middlewareData: a
|
|
842
|
-
} = t, {
|
|
843
|
-
element: u,
|
|
844
|
-
padding: f = 0
|
|
845
|
-
} = ee(e, t) || {};
|
|
846
|
-
if (u == null)
|
|
847
|
-
return {};
|
|
848
|
-
const l = nn(f), v = {
|
|
849
|
-
x: n,
|
|
850
|
-
y: o
|
|
851
|
-
}, d = $t(r), m = bt(d), p = await c.getDimensions(u), h = d === "y", g = h ? "top" : "left", w = h ? "bottom" : "right", b = h ? "clientHeight" : "clientWidth", $ = i.reference[m] + i.reference[d] - v[d] - i.floating[m], y = v[d] - i.reference[d], A = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(u));
|
|
852
|
-
let C = A ? A[b] : 0;
|
|
853
|
-
(!C || !await (c.isElement == null ? void 0 : c.isElement(A))) && (C = s.floating[b] || i.floating[m]);
|
|
854
|
-
const E = $ / 2 - y / 2, O = C / 2 - p[m] / 2 - 1, D = ie(l[g], O), _ = ie(l[w], O), I = D, R = C - p[m] - _, T = C / 2 - p[m] / 2 + E, z = at(I, T, R), L = !a.arrow && ge(r) != null && T !== z && i.reference[m] / 2 - (T < I ? D : _) - p[m] / 2 < 0, W = L ? T < I ? T - I : T - R : 0;
|
|
855
|
-
return {
|
|
856
|
-
[d]: v[d] + W,
|
|
857
|
-
data: {
|
|
858
|
-
[d]: z,
|
|
859
|
-
centerOffset: T - z - W,
|
|
860
|
-
...L && {
|
|
861
|
-
alignmentOffset: W
|
|
862
|
-
}
|
|
863
|
-
},
|
|
864
|
-
reset: L
|
|
865
|
-
};
|
|
866
|
-
}
|
|
867
|
-
}), Bo = function(e) {
|
|
868
|
-
return e === void 0 && (e = {}), {
|
|
869
|
-
name: "flip",
|
|
870
|
-
options: e,
|
|
871
|
-
async fn(t) {
|
|
872
|
-
var n, o;
|
|
873
|
-
const {
|
|
874
|
-
placement: r,
|
|
875
|
-
middlewareData: i,
|
|
876
|
-
rects: c,
|
|
877
|
-
initialPlacement: s,
|
|
878
|
-
platform: a,
|
|
879
|
-
elements: u
|
|
880
|
-
} = t, {
|
|
881
|
-
mainAxis: f = !0,
|
|
882
|
-
crossAxis: l = !0,
|
|
883
|
-
fallbackPlacements: v,
|
|
884
|
-
fallbackStrategy: d = "bestFit",
|
|
885
|
-
fallbackAxisSideDirection: m = "none",
|
|
886
|
-
flipAlignment: p = !0,
|
|
887
|
-
...h
|
|
888
|
-
} = ee(e, t);
|
|
889
|
-
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
890
|
-
return {};
|
|
891
|
-
const g = te(r), w = ce(s), b = te(s) === s, $ = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), y = v || (b || !p ? [Be(s)] : Fo(s)), A = m !== "none";
|
|
892
|
-
!v && A && y.push(...Mo(s, p, m, $));
|
|
893
|
-
const C = [s, ...y], E = await we(t, h), O = [];
|
|
894
|
-
let D = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
895
|
-
if (f && O.push(E[g]), l) {
|
|
896
|
-
const T = No(r, c, $);
|
|
897
|
-
O.push(E[T[0]], E[T[1]]);
|
|
898
|
-
}
|
|
899
|
-
if (D = [...D, {
|
|
900
|
-
placement: r,
|
|
901
|
-
overflows: O
|
|
902
|
-
}], !O.every((T) => T <= 0)) {
|
|
903
|
-
var _, I;
|
|
904
|
-
const T = (((_ = i.flip) == null ? void 0 : _.index) || 0) + 1, z = C[T];
|
|
905
|
-
if (z)
|
|
906
|
-
return {
|
|
907
|
-
data: {
|
|
908
|
-
index: T,
|
|
909
|
-
overflows: D
|
|
910
|
-
},
|
|
911
|
-
reset: {
|
|
912
|
-
placement: z
|
|
913
|
-
}
|
|
914
|
-
};
|
|
915
|
-
let L = (I = D.filter((W) => W.overflows[0] <= 0).sort((W, S) => W.overflows[1] - S.overflows[1])[0]) == null ? void 0 : I.placement;
|
|
916
|
-
if (!L)
|
|
917
|
-
switch (d) {
|
|
918
|
-
case "bestFit": {
|
|
919
|
-
var R;
|
|
920
|
-
const W = (R = D.filter((S) => {
|
|
921
|
-
if (A) {
|
|
922
|
-
const B = ce(S.placement);
|
|
923
|
-
return B === w || // Create a bias to the `y` side axis due to horizontal
|
|
924
|
-
// reading directions favoring greater width.
|
|
925
|
-
B === "y";
|
|
926
|
-
}
|
|
927
|
-
return !0;
|
|
928
|
-
}).map((S) => [S.placement, S.overflows.filter((B) => B > 0).reduce((B, V) => B + V, 0)]).sort((S, B) => S[1] - B[1])[0]) == null ? void 0 : R[0];
|
|
929
|
-
W && (L = W);
|
|
930
|
-
break;
|
|
931
|
-
}
|
|
932
|
-
case "initialPlacement":
|
|
933
|
-
L = s;
|
|
934
|
-
break;
|
|
935
|
-
}
|
|
936
|
-
if (r !== L)
|
|
937
|
-
return {
|
|
938
|
-
reset: {
|
|
939
|
-
placement: L
|
|
940
|
-
}
|
|
941
|
-
};
|
|
942
|
-
}
|
|
943
|
-
return {};
|
|
944
|
-
}
|
|
945
|
-
};
|
|
946
|
-
};
|
|
947
|
-
function kt(e, t) {
|
|
948
|
-
return {
|
|
949
|
-
top: e.top - t.height,
|
|
950
|
-
right: e.right - t.width,
|
|
951
|
-
bottom: e.bottom - t.height,
|
|
952
|
-
left: e.left - t.width
|
|
953
|
-
};
|
|
954
|
-
}
|
|
955
|
-
function It(e) {
|
|
956
|
-
return To.some((t) => e[t] >= 0);
|
|
957
|
-
}
|
|
958
|
-
const Ho = function(e) {
|
|
959
|
-
return e === void 0 && (e = {}), {
|
|
960
|
-
name: "hide",
|
|
961
|
-
options: e,
|
|
962
|
-
async fn(t) {
|
|
963
|
-
const {
|
|
964
|
-
rects: n
|
|
965
|
-
} = t, {
|
|
966
|
-
strategy: o = "referenceHidden",
|
|
967
|
-
...r
|
|
968
|
-
} = ee(e, t);
|
|
969
|
-
switch (o) {
|
|
970
|
-
case "referenceHidden": {
|
|
971
|
-
const i = await we(t, {
|
|
972
|
-
...r,
|
|
973
|
-
elementContext: "reference"
|
|
974
|
-
}), c = kt(i, n.reference);
|
|
975
|
-
return {
|
|
976
|
-
data: {
|
|
977
|
-
referenceHiddenOffsets: c,
|
|
978
|
-
referenceHidden: It(c)
|
|
979
|
-
}
|
|
980
|
-
};
|
|
981
|
-
}
|
|
982
|
-
case "escaped": {
|
|
983
|
-
const i = await we(t, {
|
|
984
|
-
...r,
|
|
985
|
-
altBoundary: !0
|
|
986
|
-
}), c = kt(i, n.floating);
|
|
987
|
-
return {
|
|
988
|
-
data: {
|
|
989
|
-
escapedOffsets: c,
|
|
990
|
-
escaped: It(c)
|
|
991
|
-
}
|
|
992
|
-
};
|
|
993
|
-
}
|
|
994
|
-
default:
|
|
995
|
-
return {};
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
};
|
|
999
|
-
};
|
|
1000
|
-
async function Uo(e, t) {
|
|
1001
|
-
const {
|
|
1002
|
-
placement: n,
|
|
1003
|
-
platform: o,
|
|
1004
|
-
elements: r
|
|
1005
|
-
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), c = te(n), s = ge(n), a = ce(n) === "y", u = ["left", "top"].includes(c) ? -1 : 1, f = i && a ? -1 : 1, l = ee(t, e);
|
|
1006
|
-
let {
|
|
1007
|
-
mainAxis: v,
|
|
1008
|
-
crossAxis: d,
|
|
1009
|
-
alignmentAxis: m
|
|
1010
|
-
} = typeof l == "number" ? {
|
|
1011
|
-
mainAxis: l,
|
|
1012
|
-
crossAxis: 0,
|
|
1013
|
-
alignmentAxis: null
|
|
1014
|
-
} : {
|
|
1015
|
-
mainAxis: l.mainAxis || 0,
|
|
1016
|
-
crossAxis: l.crossAxis || 0,
|
|
1017
|
-
alignmentAxis: l.alignmentAxis
|
|
1018
|
-
};
|
|
1019
|
-
return s && typeof m == "number" && (d = s === "end" ? m * -1 : m), a ? {
|
|
1020
|
-
x: d * f,
|
|
1021
|
-
y: v * u
|
|
1022
|
-
} : {
|
|
1023
|
-
x: v * u,
|
|
1024
|
-
y: d * f
|
|
1025
|
-
};
|
|
1026
|
-
}
|
|
1027
|
-
const zo = function(e) {
|
|
1028
|
-
return e === void 0 && (e = 0), {
|
|
1029
|
-
name: "offset",
|
|
1030
|
-
options: e,
|
|
1031
|
-
async fn(t) {
|
|
1032
|
-
var n, o;
|
|
1033
|
-
const {
|
|
1034
|
-
x: r,
|
|
1035
|
-
y: i,
|
|
1036
|
-
placement: c,
|
|
1037
|
-
middlewareData: s
|
|
1038
|
-
} = t, a = await Uo(t, e);
|
|
1039
|
-
return c === ((n = s.offset) == null ? void 0 : n.placement) && (o = s.arrow) != null && o.alignmentOffset ? {} : {
|
|
1040
|
-
x: r + a.x,
|
|
1041
|
-
y: i + a.y,
|
|
1042
|
-
data: {
|
|
1043
|
-
...a,
|
|
1044
|
-
placement: c
|
|
1045
|
-
}
|
|
1046
|
-
};
|
|
1047
|
-
}
|
|
1048
|
-
};
|
|
1049
|
-
}, Vo = function(e) {
|
|
1050
|
-
return e === void 0 && (e = {}), {
|
|
1051
|
-
name: "shift",
|
|
1052
|
-
options: e,
|
|
1053
|
-
async fn(t) {
|
|
1054
|
-
const {
|
|
1055
|
-
x: n,
|
|
1056
|
-
y: o,
|
|
1057
|
-
placement: r
|
|
1058
|
-
} = t, {
|
|
1059
|
-
mainAxis: i = !0,
|
|
1060
|
-
crossAxis: c = !1,
|
|
1061
|
-
limiter: s = {
|
|
1062
|
-
fn: (h) => {
|
|
1063
|
-
let {
|
|
1064
|
-
x: g,
|
|
1065
|
-
y: w
|
|
1066
|
-
} = h;
|
|
1067
|
-
return {
|
|
1068
|
-
x: g,
|
|
1069
|
-
y: w
|
|
1070
|
-
};
|
|
1071
|
-
}
|
|
1072
|
-
},
|
|
1073
|
-
...a
|
|
1074
|
-
} = ee(e, t), u = {
|
|
1075
|
-
x: n,
|
|
1076
|
-
y: o
|
|
1077
|
-
}, f = await we(t, a), l = ce(te(r)), v = gt(l);
|
|
1078
|
-
let d = u[v], m = u[l];
|
|
1079
|
-
if (i) {
|
|
1080
|
-
const h = v === "y" ? "top" : "left", g = v === "y" ? "bottom" : "right", w = d + f[h], b = d - f[g];
|
|
1081
|
-
d = at(w, d, b);
|
|
1082
|
-
}
|
|
1083
|
-
if (c) {
|
|
1084
|
-
const h = l === "y" ? "top" : "left", g = l === "y" ? "bottom" : "right", w = m + f[h], b = m - f[g];
|
|
1085
|
-
m = at(w, m, b);
|
|
1086
|
-
}
|
|
1087
|
-
const p = s.fn({
|
|
1088
|
-
...t,
|
|
1089
|
-
[v]: d,
|
|
1090
|
-
[l]: m
|
|
1091
|
-
});
|
|
1092
|
-
return {
|
|
1093
|
-
...p,
|
|
1094
|
-
data: {
|
|
1095
|
-
x: p.x - n,
|
|
1096
|
-
y: p.y - o,
|
|
1097
|
-
enabled: {
|
|
1098
|
-
[v]: i,
|
|
1099
|
-
[l]: c
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
};
|
|
1103
|
-
}
|
|
1104
|
-
};
|
|
1105
|
-
}, jo = function(e) {
|
|
1106
|
-
return e === void 0 && (e = {}), {
|
|
1107
|
-
options: e,
|
|
1108
|
-
fn(t) {
|
|
1109
|
-
const {
|
|
1110
|
-
x: n,
|
|
1111
|
-
y: o,
|
|
1112
|
-
placement: r,
|
|
1113
|
-
rects: i,
|
|
1114
|
-
middlewareData: c
|
|
1115
|
-
} = t, {
|
|
1116
|
-
offset: s = 0,
|
|
1117
|
-
mainAxis: a = !0,
|
|
1118
|
-
crossAxis: u = !0
|
|
1119
|
-
} = ee(e, t), f = {
|
|
1120
|
-
x: n,
|
|
1121
|
-
y: o
|
|
1122
|
-
}, l = ce(r), v = gt(l);
|
|
1123
|
-
let d = f[v], m = f[l];
|
|
1124
|
-
const p = ee(s, t), h = typeof p == "number" ? {
|
|
1125
|
-
mainAxis: p,
|
|
1126
|
-
crossAxis: 0
|
|
1127
|
-
} : {
|
|
1128
|
-
mainAxis: 0,
|
|
1129
|
-
crossAxis: 0,
|
|
1130
|
-
...p
|
|
1131
|
-
};
|
|
1132
|
-
if (a) {
|
|
1133
|
-
const b = v === "y" ? "height" : "width", $ = i.reference[v] - i.floating[b] + h.mainAxis, y = i.reference[v] + i.reference[b] - h.mainAxis;
|
|
1134
|
-
d < $ ? d = $ : d > y && (d = y);
|
|
1135
|
-
}
|
|
1136
|
-
if (u) {
|
|
1137
|
-
var g, w;
|
|
1138
|
-
const b = v === "y" ? "width" : "height", $ = ["top", "left"].includes(te(r)), y = i.reference[l] - i.floating[b] + ($ && ((g = c.offset) == null ? void 0 : g[l]) || 0) + ($ ? 0 : h.crossAxis), A = i.reference[l] + i.reference[b] + ($ ? 0 : ((w = c.offset) == null ? void 0 : w[l]) || 0) - ($ ? h.crossAxis : 0);
|
|
1139
|
-
m < y ? m = y : m > A && (m = A);
|
|
1140
|
-
}
|
|
1141
|
-
return {
|
|
1142
|
-
[v]: d,
|
|
1143
|
-
[l]: m
|
|
1144
|
-
};
|
|
1145
|
-
}
|
|
1146
|
-
};
|
|
1147
|
-
}, Ko = function(e) {
|
|
1148
|
-
return e === void 0 && (e = {}), {
|
|
1149
|
-
name: "size",
|
|
1150
|
-
options: e,
|
|
1151
|
-
async fn(t) {
|
|
1152
|
-
var n, o;
|
|
1153
|
-
const {
|
|
1154
|
-
placement: r,
|
|
1155
|
-
rects: i,
|
|
1156
|
-
platform: c,
|
|
1157
|
-
elements: s
|
|
1158
|
-
} = t, {
|
|
1159
|
-
apply: a = () => {
|
|
1160
|
-
},
|
|
1161
|
-
...u
|
|
1162
|
-
} = ee(e, t), f = await we(t, u), l = te(r), v = ge(r), d = ce(r) === "y", {
|
|
1163
|
-
width: m,
|
|
1164
|
-
height: p
|
|
1165
|
-
} = i.floating;
|
|
1166
|
-
let h, g;
|
|
1167
|
-
l === "top" || l === "bottom" ? (h = l, g = v === (await (c.isRTL == null ? void 0 : c.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (g = l, h = v === "end" ? "top" : "bottom");
|
|
1168
|
-
const w = p - f.top - f.bottom, b = m - f.left - f.right, $ = ie(p - f[h], w), y = ie(m - f[g], b), A = !t.middlewareData.shift;
|
|
1169
|
-
let C = $, E = y;
|
|
1170
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (E = b), (o = t.middlewareData.shift) != null && o.enabled.y && (C = w), A && !v) {
|
|
1171
|
-
const D = H(f.left, 0), _ = H(f.right, 0), I = H(f.top, 0), R = H(f.bottom, 0);
|
|
1172
|
-
d ? E = m - 2 * (D !== 0 || _ !== 0 ? D + _ : H(f.left, f.right)) : C = p - 2 * (I !== 0 || R !== 0 ? I + R : H(f.top, f.bottom));
|
|
1173
|
-
}
|
|
1174
|
-
await a({
|
|
1175
|
-
...t,
|
|
1176
|
-
availableWidth: E,
|
|
1177
|
-
availableHeight: C
|
|
1178
|
-
});
|
|
1179
|
-
const O = await c.getDimensions(s.floating);
|
|
1180
|
-
return m !== O.width || p !== O.height ? {
|
|
1181
|
-
reset: {
|
|
1182
|
-
rects: !0
|
|
1183
|
-
}
|
|
1184
|
-
} : {};
|
|
1185
|
-
}
|
|
1186
|
-
};
|
|
1187
|
-
};
|
|
1188
|
-
function je() {
|
|
1189
|
-
return typeof window < "u";
|
|
1190
|
-
}
|
|
1191
|
-
function be(e) {
|
|
1192
|
-
return on(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1193
|
-
}
|
|
1194
|
-
function U(e) {
|
|
1195
|
-
var t;
|
|
1196
|
-
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1197
|
-
}
|
|
1198
|
-
function J(e) {
|
|
1199
|
-
var t;
|
|
1200
|
-
return (t = (on(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1201
|
-
}
|
|
1202
|
-
function on(e) {
|
|
1203
|
-
return je() ? e instanceof Node || e instanceof U(e).Node : !1;
|
|
1204
|
-
}
|
|
1205
|
-
function Y(e) {
|
|
1206
|
-
return je() ? e instanceof Element || e instanceof U(e).Element : !1;
|
|
1207
|
-
}
|
|
1208
|
-
function Q(e) {
|
|
1209
|
-
return je() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
|
|
1210
|
-
}
|
|
1211
|
-
function Wt(e) {
|
|
1212
|
-
return !je() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
|
|
1213
|
-
}
|
|
1214
|
-
function Ae(e) {
|
|
1215
|
-
const {
|
|
1216
|
-
overflow: t,
|
|
1217
|
-
overflowX: n,
|
|
1218
|
-
overflowY: o,
|
|
1219
|
-
display: r
|
|
1220
|
-
} = X(e);
|
|
1221
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !["inline", "contents"].includes(r);
|
|
1222
|
-
}
|
|
1223
|
-
function Yo(e) {
|
|
1224
|
-
return ["table", "td", "th"].includes(be(e));
|
|
1225
|
-
}
|
|
1226
|
-
function Ke(e) {
|
|
1227
|
-
return [":popover-open", ":modal"].some((t) => {
|
|
1228
|
-
try {
|
|
1229
|
-
return e.matches(t);
|
|
1230
|
-
} catch {
|
|
1231
|
-
return !1;
|
|
1232
|
-
}
|
|
1233
|
-
});
|
|
1234
|
-
}
|
|
1235
|
-
function yt(e) {
|
|
1236
|
-
const t = wt(), n = Y(e) ? X(e) : e;
|
|
1237
|
-
return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
1238
|
-
}
|
|
1239
|
-
function Xo(e) {
|
|
1240
|
-
let t = se(e);
|
|
1241
|
-
for (; Q(t) && !me(t); ) {
|
|
1242
|
-
if (yt(t))
|
|
1243
|
-
return t;
|
|
1244
|
-
if (Ke(t))
|
|
1245
|
-
return null;
|
|
1246
|
-
t = se(t);
|
|
1247
|
-
}
|
|
1248
|
-
return null;
|
|
1249
|
-
}
|
|
1250
|
-
function wt() {
|
|
1251
|
-
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1252
|
-
}
|
|
1253
|
-
function me(e) {
|
|
1254
|
-
return ["html", "body", "#document"].includes(be(e));
|
|
1255
|
-
}
|
|
1256
|
-
function X(e) {
|
|
1257
|
-
return U(e).getComputedStyle(e);
|
|
1258
|
-
}
|
|
1259
|
-
function Ye(e) {
|
|
1260
|
-
return Y(e) ? {
|
|
1261
|
-
scrollLeft: e.scrollLeft,
|
|
1262
|
-
scrollTop: e.scrollTop
|
|
1263
|
-
} : {
|
|
1264
|
-
scrollLeft: e.scrollX,
|
|
1265
|
-
scrollTop: e.scrollY
|
|
1266
|
-
};
|
|
1267
|
-
}
|
|
1268
|
-
function se(e) {
|
|
1269
|
-
if (be(e) === "html")
|
|
1270
|
-
return e;
|
|
1271
|
-
const t = (
|
|
1272
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
1273
|
-
e.assignedSlot || // DOM Element detected.
|
|
1274
|
-
e.parentNode || // ShadowRoot detected.
|
|
1275
|
-
Wt(e) && e.host || // Fallback.
|
|
1276
|
-
J(e)
|
|
1277
|
-
);
|
|
1278
|
-
return Wt(t) ? t.host : t;
|
|
1279
|
-
}
|
|
1280
|
-
function rn(e) {
|
|
1281
|
-
const t = se(e);
|
|
1282
|
-
return me(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Q(t) && Ae(t) ? t : rn(t);
|
|
1283
|
-
}
|
|
1284
|
-
function xe(e, t, n) {
|
|
1285
|
-
var o;
|
|
1286
|
-
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1287
|
-
const r = rn(e), i = r === ((o = e.ownerDocument) == null ? void 0 : o.body), c = U(r);
|
|
1288
|
-
if (i) {
|
|
1289
|
-
const s = ut(c);
|
|
1290
|
-
return t.concat(c, c.visualViewport || [], Ae(r) ? r : [], s && n ? xe(s) : []);
|
|
1291
|
-
}
|
|
1292
|
-
return t.concat(r, xe(r, [], n));
|
|
1293
|
-
}
|
|
1294
|
-
function ut(e) {
|
|
1295
|
-
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1296
|
-
}
|
|
1297
|
-
function cn(e) {
|
|
1298
|
-
const t = X(e);
|
|
1299
|
-
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
1300
|
-
const r = Q(e), i = r ? e.offsetWidth : n, c = r ? e.offsetHeight : o, s = We(n) !== i || We(o) !== c;
|
|
1301
|
-
return s && (n = i, o = c), {
|
|
1302
|
-
width: n,
|
|
1303
|
-
height: o,
|
|
1304
|
-
$: s
|
|
1305
|
-
};
|
|
1306
|
-
}
|
|
1307
|
-
function xt(e) {
|
|
1308
|
-
return Y(e) ? e : e.contextElement;
|
|
1309
|
-
}
|
|
1310
|
-
function ve(e) {
|
|
1311
|
-
const t = xt(e);
|
|
1312
|
-
if (!Q(t))
|
|
1313
|
-
return G(1);
|
|
1314
|
-
const n = t.getBoundingClientRect(), {
|
|
1315
|
-
width: o,
|
|
1316
|
-
height: r,
|
|
1317
|
-
$: i
|
|
1318
|
-
} = cn(t);
|
|
1319
|
-
let c = (i ? We(n.width) : n.width) / o, s = (i ? We(n.height) : n.height) / r;
|
|
1320
|
-
return (!c || !Number.isFinite(c)) && (c = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
1321
|
-
x: c,
|
|
1322
|
-
y: s
|
|
1323
|
-
};
|
|
1324
|
-
}
|
|
1325
|
-
const Zo = /* @__PURE__ */ G(0);
|
|
1326
|
-
function sn(e) {
|
|
1327
|
-
const t = U(e);
|
|
1328
|
-
return !wt() || !t.visualViewport ? Zo : {
|
|
1329
|
-
x: t.visualViewport.offsetLeft,
|
|
1330
|
-
y: t.visualViewport.offsetTop
|
|
1331
|
-
};
|
|
1332
|
-
}
|
|
1333
|
-
function Go(e, t, n) {
|
|
1334
|
-
return t === void 0 && (t = !1), !n || t && n !== U(e) ? !1 : t;
|
|
1335
|
-
}
|
|
1336
|
-
function le(e, t, n, o) {
|
|
1337
|
-
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1338
|
-
const r = e.getBoundingClientRect(), i = xt(e);
|
|
1339
|
-
let c = G(1);
|
|
1340
|
-
t && (o ? Y(o) && (c = ve(o)) : c = ve(e));
|
|
1341
|
-
const s = Go(i, n, o) ? sn(i) : G(0);
|
|
1342
|
-
let a = (r.left + s.x) / c.x, u = (r.top + s.y) / c.y, f = r.width / c.x, l = r.height / c.y;
|
|
1343
|
-
if (i) {
|
|
1344
|
-
const v = U(i), d = o && Y(o) ? U(o) : o;
|
|
1345
|
-
let m = v, p = ut(m);
|
|
1346
|
-
for (; p && o && d !== m; ) {
|
|
1347
|
-
const h = ve(p), g = p.getBoundingClientRect(), w = X(p), b = g.left + (p.clientLeft + parseFloat(w.paddingLeft)) * h.x, $ = g.top + (p.clientTop + parseFloat(w.paddingTop)) * h.y;
|
|
1348
|
-
a *= h.x, u *= h.y, f *= h.x, l *= h.y, a += b, u += $, m = U(p), p = ut(m);
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
|
-
return He({
|
|
1352
|
-
width: f,
|
|
1353
|
-
height: l,
|
|
1354
|
-
x: a,
|
|
1355
|
-
y: u
|
|
1356
|
-
});
|
|
1357
|
-
}
|
|
1358
|
-
function Et(e, t) {
|
|
1359
|
-
const n = Ye(e).scrollLeft;
|
|
1360
|
-
return t ? t.left + n : le(J(e)).left + n;
|
|
1361
|
-
}
|
|
1362
|
-
function an(e, t, n) {
|
|
1363
|
-
n === void 0 && (n = !1);
|
|
1364
|
-
const o = e.getBoundingClientRect(), r = o.left + t.scrollLeft - (n ? 0 : (
|
|
1365
|
-
// RTL <body> scrollbar.
|
|
1366
|
-
Et(e, o)
|
|
1367
|
-
)), i = o.top + t.scrollTop;
|
|
1368
|
-
return {
|
|
1369
|
-
x: r,
|
|
1370
|
-
y: i
|
|
1371
|
-
};
|
|
1372
|
-
}
|
|
1373
|
-
function qo(e) {
|
|
1374
|
-
let {
|
|
1375
|
-
elements: t,
|
|
1376
|
-
rect: n,
|
|
1377
|
-
offsetParent: o,
|
|
1378
|
-
strategy: r
|
|
1379
|
-
} = e;
|
|
1380
|
-
const i = r === "fixed", c = J(o), s = t ? Ke(t.floating) : !1;
|
|
1381
|
-
if (o === c || s && i)
|
|
1382
|
-
return n;
|
|
1383
|
-
let a = {
|
|
1384
|
-
scrollLeft: 0,
|
|
1385
|
-
scrollTop: 0
|
|
1386
|
-
}, u = G(1);
|
|
1387
|
-
const f = G(0), l = Q(o);
|
|
1388
|
-
if ((l || !l && !i) && ((be(o) !== "body" || Ae(c)) && (a = Ye(o)), Q(o))) {
|
|
1389
|
-
const d = le(o);
|
|
1390
|
-
u = ve(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
|
|
1391
|
-
}
|
|
1392
|
-
const v = c && !l && !i ? an(c, a, !0) : G(0);
|
|
1393
|
-
return {
|
|
1394
|
-
width: n.width * u.x,
|
|
1395
|
-
height: n.height * u.y,
|
|
1396
|
-
x: n.x * u.x - a.scrollLeft * u.x + f.x + v.x,
|
|
1397
|
-
y: n.y * u.y - a.scrollTop * u.y + f.y + v.y
|
|
1398
|
-
};
|
|
1399
|
-
}
|
|
1400
|
-
function Qo(e) {
|
|
1401
|
-
return Array.from(e.getClientRects());
|
|
1402
|
-
}
|
|
1403
|
-
function Jo(e) {
|
|
1404
|
-
const t = J(e), n = Ye(e), o = e.ownerDocument.body, r = H(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = H(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1405
|
-
let c = -n.scrollLeft + Et(e);
|
|
1406
|
-
const s = -n.scrollTop;
|
|
1407
|
-
return X(o).direction === "rtl" && (c += H(t.clientWidth, o.clientWidth) - r), {
|
|
1408
|
-
width: r,
|
|
1409
|
-
height: i,
|
|
1410
|
-
x: c,
|
|
1411
|
-
y: s
|
|
1412
|
-
};
|
|
1413
|
-
}
|
|
1414
|
-
function er(e, t) {
|
|
1415
|
-
const n = U(e), o = J(e), r = n.visualViewport;
|
|
1416
|
-
let i = o.clientWidth, c = o.clientHeight, s = 0, a = 0;
|
|
1417
|
-
if (r) {
|
|
1418
|
-
i = r.width, c = r.height;
|
|
1419
|
-
const u = wt();
|
|
1420
|
-
(!u || u && t === "fixed") && (s = r.offsetLeft, a = r.offsetTop);
|
|
1421
|
-
}
|
|
1422
|
-
return {
|
|
1423
|
-
width: i,
|
|
1424
|
-
height: c,
|
|
1425
|
-
x: s,
|
|
1426
|
-
y: a
|
|
1427
|
-
};
|
|
1428
|
-
}
|
|
1429
|
-
function tr(e, t) {
|
|
1430
|
-
const n = le(e, !0, t === "fixed"), o = n.top + e.clientTop, r = n.left + e.clientLeft, i = Q(e) ? ve(e) : G(1), c = e.clientWidth * i.x, s = e.clientHeight * i.y, a = r * i.x, u = o * i.y;
|
|
1431
|
-
return {
|
|
1432
|
-
width: c,
|
|
1433
|
-
height: s,
|
|
1434
|
-
x: a,
|
|
1435
|
-
y: u
|
|
1436
|
-
};
|
|
1437
|
-
}
|
|
1438
|
-
function Bt(e, t, n) {
|
|
1439
|
-
let o;
|
|
1440
|
-
if (t === "viewport")
|
|
1441
|
-
o = er(e, n);
|
|
1442
|
-
else if (t === "document")
|
|
1443
|
-
o = Jo(J(e));
|
|
1444
|
-
else if (Y(t))
|
|
1445
|
-
o = tr(t, n);
|
|
1446
|
-
else {
|
|
1447
|
-
const r = sn(e);
|
|
1448
|
-
o = {
|
|
1449
|
-
x: t.x - r.x,
|
|
1450
|
-
y: t.y - r.y,
|
|
1451
|
-
width: t.width,
|
|
1452
|
-
height: t.height
|
|
1453
|
-
};
|
|
1454
|
-
}
|
|
1455
|
-
return He(o);
|
|
1456
|
-
}
|
|
1457
|
-
function ln(e, t) {
|
|
1458
|
-
const n = se(e);
|
|
1459
|
-
return n === t || !Y(n) || me(n) ? !1 : X(n).position === "fixed" || ln(n, t);
|
|
1460
|
-
}
|
|
1461
|
-
function nr(e, t) {
|
|
1462
|
-
const n = t.get(e);
|
|
1463
|
-
if (n)
|
|
1464
|
-
return n;
|
|
1465
|
-
let o = xe(e, [], !1).filter((s) => Y(s) && be(s) !== "body"), r = null;
|
|
1466
|
-
const i = X(e).position === "fixed";
|
|
1467
|
-
let c = i ? se(e) : e;
|
|
1468
|
-
for (; Y(c) && !me(c); ) {
|
|
1469
|
-
const s = X(c), a = yt(c);
|
|
1470
|
-
!a && s.position === "fixed" && (r = null), (i ? !a && !r : !a && s.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || Ae(c) && !a && ln(e, c)) ? o = o.filter((f) => f !== c) : r = s, c = se(c);
|
|
1471
|
-
}
|
|
1472
|
-
return t.set(e, o), o;
|
|
1473
|
-
}
|
|
1474
|
-
function or(e) {
|
|
1475
|
-
let {
|
|
1476
|
-
element: t,
|
|
1477
|
-
boundary: n,
|
|
1478
|
-
rootBoundary: o,
|
|
1479
|
-
strategy: r
|
|
1480
|
-
} = e;
|
|
1481
|
-
const c = [...n === "clippingAncestors" ? Ke(t) ? [] : nr(t, this._c) : [].concat(n), o], s = c[0], a = c.reduce((u, f) => {
|
|
1482
|
-
const l = Bt(t, f, r);
|
|
1483
|
-
return u.top = H(l.top, u.top), u.right = ie(l.right, u.right), u.bottom = ie(l.bottom, u.bottom), u.left = H(l.left, u.left), u;
|
|
1484
|
-
}, Bt(t, s, r));
|
|
1485
|
-
return {
|
|
1486
|
-
width: a.right - a.left,
|
|
1487
|
-
height: a.bottom - a.top,
|
|
1488
|
-
x: a.left,
|
|
1489
|
-
y: a.top
|
|
1490
|
-
};
|
|
1491
|
-
}
|
|
1492
|
-
function rr(e) {
|
|
1493
|
-
const {
|
|
1494
|
-
width: t,
|
|
1495
|
-
height: n
|
|
1496
|
-
} = cn(e);
|
|
1497
|
-
return {
|
|
1498
|
-
width: t,
|
|
1499
|
-
height: n
|
|
1500
|
-
};
|
|
1501
|
-
}
|
|
1502
|
-
function ir(e, t, n) {
|
|
1503
|
-
const o = Q(t), r = J(t), i = n === "fixed", c = le(e, !0, i, t);
|
|
1504
|
-
let s = {
|
|
1505
|
-
scrollLeft: 0,
|
|
1506
|
-
scrollTop: 0
|
|
1507
|
-
};
|
|
1508
|
-
const a = G(0);
|
|
1509
|
-
if (o || !o && !i)
|
|
1510
|
-
if ((be(t) !== "body" || Ae(r)) && (s = Ye(t)), o) {
|
|
1511
|
-
const v = le(t, !0, i, t);
|
|
1512
|
-
a.x = v.x + t.clientLeft, a.y = v.y + t.clientTop;
|
|
1513
|
-
} else
|
|
1514
|
-
r && (a.x = Et(r));
|
|
1515
|
-
const u = r && !o && !i ? an(r, s) : G(0), f = c.left + s.scrollLeft - a.x - u.x, l = c.top + s.scrollTop - a.y - u.y;
|
|
1516
|
-
return {
|
|
1517
|
-
x: f,
|
|
1518
|
-
y: l,
|
|
1519
|
-
width: c.width,
|
|
1520
|
-
height: c.height
|
|
1521
|
-
};
|
|
1522
|
-
}
|
|
1523
|
-
function et(e) {
|
|
1524
|
-
return X(e).position === "static";
|
|
1525
|
-
}
|
|
1526
|
-
function Ht(e, t) {
|
|
1527
|
-
if (!Q(e) || X(e).position === "fixed")
|
|
1528
|
-
return null;
|
|
1529
|
-
if (t)
|
|
1530
|
-
return t(e);
|
|
1531
|
-
let n = e.offsetParent;
|
|
1532
|
-
return J(e) === n && (n = n.ownerDocument.body), n;
|
|
1533
|
-
}
|
|
1534
|
-
function un(e, t) {
|
|
1535
|
-
const n = U(e);
|
|
1536
|
-
if (Ke(e))
|
|
1537
|
-
return n;
|
|
1538
|
-
if (!Q(e)) {
|
|
1539
|
-
let r = se(e);
|
|
1540
|
-
for (; r && !me(r); ) {
|
|
1541
|
-
if (Y(r) && !et(r))
|
|
1542
|
-
return r;
|
|
1543
|
-
r = se(r);
|
|
1544
|
-
}
|
|
1545
|
-
return n;
|
|
1546
|
-
}
|
|
1547
|
-
let o = Ht(e, t);
|
|
1548
|
-
for (; o && Yo(o) && et(o); )
|
|
1549
|
-
o = Ht(o, t);
|
|
1550
|
-
return o && me(o) && et(o) && !yt(o) ? n : o || Xo(e) || n;
|
|
1551
|
-
}
|
|
1552
|
-
const cr = async function(e) {
|
|
1553
|
-
const t = this.getOffsetParent || un, n = this.getDimensions, o = await n(e.floating);
|
|
1554
|
-
return {
|
|
1555
|
-
reference: ir(e.reference, await t(e.floating), e.strategy),
|
|
1556
|
-
floating: {
|
|
1557
|
-
x: 0,
|
|
1558
|
-
y: 0,
|
|
1559
|
-
width: o.width,
|
|
1560
|
-
height: o.height
|
|
1561
|
-
}
|
|
1562
|
-
};
|
|
1563
|
-
};
|
|
1564
|
-
function sr(e) {
|
|
1565
|
-
return X(e).direction === "rtl";
|
|
1566
|
-
}
|
|
1567
|
-
const ar = {
|
|
1568
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: qo,
|
|
1569
|
-
getDocumentElement: J,
|
|
1570
|
-
getClippingRect: or,
|
|
1571
|
-
getOffsetParent: un,
|
|
1572
|
-
getElementRects: cr,
|
|
1573
|
-
getClientRects: Qo,
|
|
1574
|
-
getDimensions: rr,
|
|
1575
|
-
getScale: ve,
|
|
1576
|
-
isElement: Y,
|
|
1577
|
-
isRTL: sr
|
|
1578
|
-
};
|
|
1579
|
-
function fn(e, t) {
|
|
1580
|
-
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1581
|
-
}
|
|
1582
|
-
function lr(e, t) {
|
|
1583
|
-
let n = null, o;
|
|
1584
|
-
const r = J(e);
|
|
1585
|
-
function i() {
|
|
1586
|
-
var s;
|
|
1587
|
-
clearTimeout(o), (s = n) == null || s.disconnect(), n = null;
|
|
1588
|
-
}
|
|
1589
|
-
function c(s, a) {
|
|
1590
|
-
s === void 0 && (s = !1), a === void 0 && (a = 1), i();
|
|
1591
|
-
const u = e.getBoundingClientRect(), {
|
|
1592
|
-
left: f,
|
|
1593
|
-
top: l,
|
|
1594
|
-
width: v,
|
|
1595
|
-
height: d
|
|
1596
|
-
} = u;
|
|
1597
|
-
if (s || t(), !v || !d)
|
|
1598
|
-
return;
|
|
1599
|
-
const m = Te(l), p = Te(r.clientWidth - (f + v)), h = Te(r.clientHeight - (l + d)), g = Te(f), b = {
|
|
1600
|
-
rootMargin: -m + "px " + -p + "px " + -h + "px " + -g + "px",
|
|
1601
|
-
threshold: H(0, ie(1, a)) || 1
|
|
1602
|
-
};
|
|
1603
|
-
let $ = !0;
|
|
1604
|
-
function y(A) {
|
|
1605
|
-
const C = A[0].intersectionRatio;
|
|
1606
|
-
if (C !== a) {
|
|
1607
|
-
if (!$)
|
|
1608
|
-
return c();
|
|
1609
|
-
C ? c(!1, C) : o = setTimeout(() => {
|
|
1610
|
-
c(!1, 1e-7);
|
|
1611
|
-
}, 1e3);
|
|
1612
|
-
}
|
|
1613
|
-
C === 1 && !fn(u, e.getBoundingClientRect()) && c(), $ = !1;
|
|
1614
|
-
}
|
|
1615
|
-
try {
|
|
1616
|
-
n = new IntersectionObserver(y, {
|
|
1617
|
-
...b,
|
|
1618
|
-
// Handle <iframe>s
|
|
1619
|
-
root: r.ownerDocument
|
|
1620
|
-
});
|
|
1621
|
-
} catch {
|
|
1622
|
-
n = new IntersectionObserver(y, b);
|
|
1623
|
-
}
|
|
1624
|
-
n.observe(e);
|
|
1625
|
-
}
|
|
1626
|
-
return c(!0), i;
|
|
1627
|
-
}
|
|
1628
|
-
function ur(e, t, n, o) {
|
|
1629
|
-
o === void 0 && (o = {});
|
|
1630
|
-
const {
|
|
1631
|
-
ancestorScroll: r = !0,
|
|
1632
|
-
ancestorResize: i = !0,
|
|
1633
|
-
elementResize: c = typeof ResizeObserver == "function",
|
|
1634
|
-
layoutShift: s = typeof IntersectionObserver == "function",
|
|
1635
|
-
animationFrame: a = !1
|
|
1636
|
-
} = o, u = xt(e), f = r || i ? [...u ? xe(u) : [], ...xe(t)] : [];
|
|
1637
|
-
f.forEach((g) => {
|
|
1638
|
-
r && g.addEventListener("scroll", n, {
|
|
1639
|
-
passive: !0
|
|
1640
|
-
}), i && g.addEventListener("resize", n);
|
|
1641
|
-
});
|
|
1642
|
-
const l = u && s ? lr(u, n) : null;
|
|
1643
|
-
let v = -1, d = null;
|
|
1644
|
-
c && (d = new ResizeObserver((g) => {
|
|
1645
|
-
let [w] = g;
|
|
1646
|
-
w && w.target === u && d && (d.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
|
|
1647
|
-
var b;
|
|
1648
|
-
(b = d) == null || b.observe(t);
|
|
1649
|
-
})), n();
|
|
1650
|
-
}), u && !a && d.observe(u), d.observe(t));
|
|
1651
|
-
let m, p = a ? le(e) : null;
|
|
1652
|
-
a && h();
|
|
1653
|
-
function h() {
|
|
1654
|
-
const g = le(e);
|
|
1655
|
-
p && !fn(p, g) && n(), p = g, m = requestAnimationFrame(h);
|
|
1656
|
-
}
|
|
1657
|
-
return n(), () => {
|
|
1658
|
-
var g;
|
|
1659
|
-
f.forEach((w) => {
|
|
1660
|
-
r && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
|
|
1661
|
-
}), l == null || l(), (g = d) == null || g.disconnect(), d = null, a && cancelAnimationFrame(m);
|
|
1662
|
-
};
|
|
1663
|
-
}
|
|
1664
|
-
const fr = zo, dr = Vo, pr = Bo, vr = Ko, hr = Ho, Ut = Wo, mr = jo, gr = (e, t, n) => {
|
|
1665
|
-
const o = /* @__PURE__ */ new Map(), r = {
|
|
1666
|
-
platform: ar,
|
|
1667
|
-
...n
|
|
1668
|
-
}, i = {
|
|
1669
|
-
...r.platform,
|
|
1670
|
-
_c: o
|
|
1671
|
-
};
|
|
1672
|
-
return Io(e, t, {
|
|
1673
|
-
...r,
|
|
1674
|
-
platform: i
|
|
1675
|
-
});
|
|
1676
|
-
};
|
|
1677
|
-
var Me = typeof document < "u" ? ze : N;
|
|
1678
|
-
function Ue(e, t) {
|
|
1679
|
-
if (e === t)
|
|
1680
|
-
return !0;
|
|
1681
|
-
if (typeof e != typeof t)
|
|
1682
|
-
return !1;
|
|
1683
|
-
if (typeof e == "function" && e.toString() === t.toString())
|
|
1684
|
-
return !0;
|
|
1685
|
-
let n, o, r;
|
|
1686
|
-
if (e && t && typeof e == "object") {
|
|
1687
|
-
if (Array.isArray(e)) {
|
|
1688
|
-
if (n = e.length, n !== t.length)
|
|
1689
|
-
return !1;
|
|
1690
|
-
for (o = n; o-- !== 0; )
|
|
1691
|
-
if (!Ue(e[o], t[o]))
|
|
1692
|
-
return !1;
|
|
1693
|
-
return !0;
|
|
1694
|
-
}
|
|
1695
|
-
if (r = Object.keys(e), n = r.length, n !== Object.keys(t).length)
|
|
1696
|
-
return !1;
|
|
1697
|
-
for (o = n; o-- !== 0; )
|
|
1698
|
-
if (!{}.hasOwnProperty.call(t, r[o]))
|
|
1699
|
-
return !1;
|
|
1700
|
-
for (o = n; o-- !== 0; ) {
|
|
1701
|
-
const i = r[o];
|
|
1702
|
-
if (!(i === "_owner" && e.$$typeof) && !Ue(e[i], t[i]))
|
|
1703
|
-
return !1;
|
|
1704
|
-
}
|
|
1705
|
-
return !0;
|
|
1706
|
-
}
|
|
1707
|
-
return e !== e && t !== t;
|
|
1708
|
-
}
|
|
1709
|
-
function dn(e) {
|
|
1710
|
-
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1711
|
-
}
|
|
1712
|
-
function zt(e, t) {
|
|
1713
|
-
const n = dn(e);
|
|
1714
|
-
return Math.round(t * n) / n;
|
|
1715
|
-
}
|
|
1716
|
-
function tt(e) {
|
|
1717
|
-
const t = x.useRef(e);
|
|
1718
|
-
return Me(() => {
|
|
1719
|
-
t.current = e;
|
|
1720
|
-
}), t;
|
|
1721
|
-
}
|
|
1722
|
-
function br(e) {
|
|
1723
|
-
e === void 0 && (e = {});
|
|
1724
|
-
const {
|
|
1725
|
-
placement: t = "bottom",
|
|
1726
|
-
strategy: n = "absolute",
|
|
1727
|
-
middleware: o = [],
|
|
1728
|
-
platform: r,
|
|
1729
|
-
elements: {
|
|
1730
|
-
reference: i,
|
|
1731
|
-
floating: c
|
|
1732
|
-
} = {},
|
|
1733
|
-
transform: s = !0,
|
|
1734
|
-
whileElementsMounted: a,
|
|
1735
|
-
open: u
|
|
1736
|
-
} = e, [f, l] = x.useState({
|
|
1737
|
-
x: 0,
|
|
1738
|
-
y: 0,
|
|
1739
|
-
strategy: n,
|
|
1740
|
-
placement: t,
|
|
1741
|
-
middlewareData: {},
|
|
1742
|
-
isPositioned: !1
|
|
1743
|
-
}), [v, d] = x.useState(o);
|
|
1744
|
-
Ue(v, o) || d(o);
|
|
1745
|
-
const [m, p] = x.useState(null), [h, g] = x.useState(null), w = x.useCallback((S) => {
|
|
1746
|
-
S !== A.current && (A.current = S, p(S));
|
|
1747
|
-
}, []), b = x.useCallback((S) => {
|
|
1748
|
-
S !== C.current && (C.current = S, g(S));
|
|
1749
|
-
}, []), $ = i || m, y = c || h, A = x.useRef(null), C = x.useRef(null), E = x.useRef(f), O = a != null, D = tt(a), _ = tt(r), I = tt(u), R = x.useCallback(() => {
|
|
1750
|
-
if (!A.current || !C.current)
|
|
1751
|
-
return;
|
|
1752
|
-
const S = {
|
|
1753
|
-
placement: t,
|
|
1754
|
-
strategy: n,
|
|
1755
|
-
middleware: v
|
|
1756
|
-
};
|
|
1757
|
-
_.current && (S.platform = _.current), gr(A.current, C.current, S).then((B) => {
|
|
1758
|
-
const V = {
|
|
1759
|
-
...B,
|
|
1760
|
-
// The floating element's position may be recomputed while it's closed
|
|
1761
|
-
// but still mounted (such as when transitioning out). To ensure
|
|
1762
|
-
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1763
|
-
// setting it to `true` when `open === false` (must be specified).
|
|
1764
|
-
isPositioned: I.current !== !1
|
|
1765
|
-
};
|
|
1766
|
-
T.current && !Ue(E.current, V) && (E.current = V, Jn.flushSync(() => {
|
|
1767
|
-
l(V);
|
|
1768
|
-
}));
|
|
1769
|
-
});
|
|
1770
|
-
}, [v, t, n, _, I]);
|
|
1771
|
-
Me(() => {
|
|
1772
|
-
u === !1 && E.current.isPositioned && (E.current.isPositioned = !1, l((S) => ({
|
|
1773
|
-
...S,
|
|
1774
|
-
isPositioned: !1
|
|
1775
|
-
})));
|
|
1776
|
-
}, [u]);
|
|
1777
|
-
const T = x.useRef(!1);
|
|
1778
|
-
Me(() => (T.current = !0, () => {
|
|
1779
|
-
T.current = !1;
|
|
1780
|
-
}), []), Me(() => {
|
|
1781
|
-
if ($ && (A.current = $), y && (C.current = y), $ && y) {
|
|
1782
|
-
if (D.current)
|
|
1783
|
-
return D.current($, y, R);
|
|
1784
|
-
R();
|
|
1785
|
-
}
|
|
1786
|
-
}, [$, y, R, D, O]);
|
|
1787
|
-
const z = x.useMemo(() => ({
|
|
1788
|
-
reference: A,
|
|
1789
|
-
floating: C,
|
|
1790
|
-
setReference: w,
|
|
1791
|
-
setFloating: b
|
|
1792
|
-
}), [w, b]), L = x.useMemo(() => ({
|
|
1793
|
-
reference: $,
|
|
1794
|
-
floating: y
|
|
1795
|
-
}), [$, y]), W = x.useMemo(() => {
|
|
1796
|
-
const S = {
|
|
1797
|
-
position: n,
|
|
1798
|
-
left: 0,
|
|
1799
|
-
top: 0
|
|
1800
|
-
};
|
|
1801
|
-
if (!L.floating)
|
|
1802
|
-
return S;
|
|
1803
|
-
const B = zt(L.floating, f.x), V = zt(L.floating, f.y);
|
|
1804
|
-
return s ? {
|
|
1805
|
-
...S,
|
|
1806
|
-
transform: "translate(" + B + "px, " + V + "px)",
|
|
1807
|
-
...dn(L.floating) >= 1.5 && {
|
|
1808
|
-
willChange: "transform"
|
|
1809
|
-
}
|
|
1810
|
-
} : {
|
|
1811
|
-
position: n,
|
|
1812
|
-
left: B,
|
|
1813
|
-
top: V
|
|
1814
|
-
};
|
|
1815
|
-
}, [n, s, L.floating, f.x, f.y]);
|
|
1816
|
-
return x.useMemo(() => ({
|
|
1817
|
-
...f,
|
|
1818
|
-
update: R,
|
|
1819
|
-
refs: z,
|
|
1820
|
-
elements: L,
|
|
1821
|
-
floatingStyles: W
|
|
1822
|
-
}), [f, R, z, L, W]);
|
|
1823
|
-
}
|
|
1824
|
-
const $r = (e) => {
|
|
1825
|
-
function t(n) {
|
|
1826
|
-
return {}.hasOwnProperty.call(n, "current");
|
|
1827
|
-
}
|
|
1828
|
-
return {
|
|
1829
|
-
name: "arrow",
|
|
1830
|
-
options: e,
|
|
1831
|
-
fn(n) {
|
|
1832
|
-
const {
|
|
1833
|
-
element: o,
|
|
1834
|
-
padding: r
|
|
1835
|
-
} = typeof e == "function" ? e(n) : e;
|
|
1836
|
-
return o && t(o) ? o.current != null ? Ut({
|
|
1837
|
-
element: o.current,
|
|
1838
|
-
padding: r
|
|
1839
|
-
}).fn(n) : {} : o ? Ut({
|
|
1840
|
-
element: o,
|
|
1841
|
-
padding: r
|
|
1842
|
-
}).fn(n) : {};
|
|
1843
|
-
}
|
|
1844
|
-
};
|
|
1845
|
-
}, yr = (e, t) => ({
|
|
1846
|
-
...fr(e),
|
|
1847
|
-
options: [e, t]
|
|
1848
|
-
}), wr = (e, t) => ({
|
|
1849
|
-
...dr(e),
|
|
1850
|
-
options: [e, t]
|
|
1851
|
-
}), xr = (e, t) => ({
|
|
1852
|
-
...mr(e),
|
|
1853
|
-
options: [e, t]
|
|
1854
|
-
}), Er = (e, t) => ({
|
|
1855
|
-
...pr(e),
|
|
1856
|
-
options: [e, t]
|
|
1857
|
-
}), Cr = (e, t) => ({
|
|
1858
|
-
...vr(e),
|
|
1859
|
-
options: [e, t]
|
|
1860
|
-
}), Pr = (e, t) => ({
|
|
1861
|
-
...hr(e),
|
|
1862
|
-
options: [e, t]
|
|
1863
|
-
}), Ar = (e, t) => ({
|
|
1864
|
-
...$r(e),
|
|
1865
|
-
options: [e, t]
|
|
1866
|
-
});
|
|
1867
|
-
function Sr(e, t) {
|
|
1868
|
-
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1869
|
-
}
|
|
1870
|
-
function pn(...e) {
|
|
1871
|
-
return (t) => e.forEach(
|
|
1872
|
-
(n) => Sr(n, t)
|
|
1873
|
-
);
|
|
1874
|
-
}
|
|
1875
|
-
function vn(...e) {
|
|
1876
|
-
return oe(pn(...e), e);
|
|
1877
|
-
}
|
|
1878
|
-
const hn = /* @__PURE__ */ k((e, t) => {
|
|
1879
|
-
const { children: n, ...o } = e, r = K.toArray(n), i = r.find(Rr);
|
|
1880
|
-
if (i) {
|
|
1881
|
-
const c = i.props.children, s = r.map((a) => a === i ? K.count(c) > 1 ? K.only(null) : /* @__PURE__ */ re(c) ? c.props.children : null : a);
|
|
1882
|
-
return /* @__PURE__ */ P(ft, F({}, o, {
|
|
1883
|
-
ref: t
|
|
1884
|
-
}), /* @__PURE__ */ re(c) ? /* @__PURE__ */ Ce(c, void 0, s) : null);
|
|
1885
|
-
}
|
|
1886
|
-
return /* @__PURE__ */ P(ft, F({}, o, {
|
|
1887
|
-
ref: t
|
|
1888
|
-
}), n);
|
|
1889
|
-
});
|
|
1890
|
-
hn.displayName = "Slot";
|
|
1891
|
-
const ft = /* @__PURE__ */ k((e, t) => {
|
|
1892
|
-
const { children: n, ...o } = e;
|
|
1893
|
-
return /* @__PURE__ */ re(n) ? /* @__PURE__ */ Ce(n, {
|
|
1894
|
-
...Tr(o, n.props),
|
|
1895
|
-
ref: t ? pn(t, n.ref) : n.ref
|
|
1896
|
-
}) : K.count(n) > 1 ? K.only(null) : null;
|
|
1897
|
-
});
|
|
1898
|
-
ft.displayName = "SlotClone";
|
|
1899
|
-
const Or = ({ children: e }) => /* @__PURE__ */ P(qt, null, e);
|
|
1900
|
-
function Rr(e) {
|
|
1901
|
-
return /* @__PURE__ */ re(e) && e.type === Or;
|
|
1902
|
-
}
|
|
1903
|
-
function Tr(e, t) {
|
|
1904
|
-
const n = {
|
|
1905
|
-
...t
|
|
1906
|
-
};
|
|
1907
|
-
for (const o in t) {
|
|
1908
|
-
const r = e[o], i = t[o];
|
|
1909
|
-
/^on[A-Z]/.test(o) ? r && i ? n[o] = (...s) => {
|
|
1910
|
-
i(...s), r(...s);
|
|
1911
|
-
} : r && (n[o] = r) : o === "style" ? n[o] = {
|
|
1912
|
-
...r,
|
|
1913
|
-
...i
|
|
1914
|
-
} : o === "className" && (n[o] = [
|
|
1915
|
-
r,
|
|
1916
|
-
i
|
|
1917
|
-
].filter(Boolean).join(" "));
|
|
1918
|
-
}
|
|
1919
|
-
return {
|
|
1920
|
-
...e,
|
|
1921
|
-
...n
|
|
1922
|
-
};
|
|
1923
|
-
}
|
|
1924
|
-
const Dr = [
|
|
1925
|
-
"a",
|
|
1926
|
-
"button",
|
|
1927
|
-
"div",
|
|
1928
|
-
"form",
|
|
1929
|
-
"h2",
|
|
1930
|
-
"h3",
|
|
1931
|
-
"img",
|
|
1932
|
-
"input",
|
|
1933
|
-
"label",
|
|
1934
|
-
"li",
|
|
1935
|
-
"nav",
|
|
1936
|
-
"ol",
|
|
1937
|
-
"p",
|
|
1938
|
-
"span",
|
|
1939
|
-
"svg",
|
|
1940
|
-
"ul"
|
|
1941
|
-
], mn = Dr.reduce((e, t) => {
|
|
1942
|
-
const n = /* @__PURE__ */ k((o, r) => {
|
|
1943
|
-
const { asChild: i, ...c } = o, s = i ? hn : t;
|
|
1944
|
-
return N(() => {
|
|
1945
|
-
window[Symbol.for("radix-ui")] = !0;
|
|
1946
|
-
}, []), /* @__PURE__ */ P(s, F({}, c, {
|
|
1947
|
-
ref: r
|
|
1948
|
-
}));
|
|
1949
|
-
});
|
|
1950
|
-
return n.displayName = `Primitive.${t}`, {
|
|
1951
|
-
...e,
|
|
1952
|
-
[t]: n
|
|
1953
|
-
};
|
|
1954
|
-
}, {});
|
|
1955
|
-
function _r(e, t = []) {
|
|
1956
|
-
let n = [];
|
|
1957
|
-
function o(i, c) {
|
|
1958
|
-
const s = /* @__PURE__ */ ye(c), a = n.length;
|
|
1959
|
-
n = [
|
|
1960
|
-
...n,
|
|
1961
|
-
c
|
|
1962
|
-
];
|
|
1963
|
-
function u(l) {
|
|
1964
|
-
const { scope: v, children: d, ...m } = l, p = (v == null ? void 0 : v[e][a]) || s, h = q(
|
|
1965
|
-
() => m,
|
|
1966
|
-
Object.values(m)
|
|
1967
|
-
);
|
|
1968
|
-
return /* @__PURE__ */ P(p.Provider, {
|
|
1969
|
-
value: h
|
|
1970
|
-
}, d);
|
|
1971
|
-
}
|
|
1972
|
-
function f(l, v) {
|
|
1973
|
-
const d = (v == null ? void 0 : v[e][a]) || s, m = vt(d);
|
|
1974
|
-
if (m)
|
|
1975
|
-
return m;
|
|
1976
|
-
if (c !== void 0)
|
|
1977
|
-
return c;
|
|
1978
|
-
throw new Error(`\`${l}\` must be used within \`${i}\``);
|
|
1979
|
-
}
|
|
1980
|
-
return u.displayName = i + "Provider", [
|
|
1981
|
-
u,
|
|
1982
|
-
f
|
|
1983
|
-
];
|
|
1984
|
-
}
|
|
1985
|
-
const r = () => {
|
|
1986
|
-
const i = n.map((c) => /* @__PURE__ */ ye(c));
|
|
1987
|
-
return function(s) {
|
|
1988
|
-
const a = (s == null ? void 0 : s[e]) || i;
|
|
1989
|
-
return q(
|
|
1990
|
-
() => ({
|
|
1991
|
-
[`__scope${e}`]: {
|
|
1992
|
-
...s,
|
|
1993
|
-
[e]: a
|
|
1994
|
-
}
|
|
1995
|
-
}),
|
|
1996
|
-
[
|
|
1997
|
-
s,
|
|
1998
|
-
a
|
|
1999
|
-
]
|
|
2000
|
-
);
|
|
2001
|
-
};
|
|
2002
|
-
};
|
|
2003
|
-
return r.scopeName = e, [
|
|
2004
|
-
o,
|
|
2005
|
-
Nr(r, ...t)
|
|
2006
|
-
];
|
|
2007
|
-
}
|
|
2008
|
-
function Nr(...e) {
|
|
2009
|
-
const t = e[0];
|
|
2010
|
-
if (e.length === 1)
|
|
2011
|
-
return t;
|
|
2012
|
-
const n = () => {
|
|
2013
|
-
const o = e.map(
|
|
2014
|
-
(r) => ({
|
|
2015
|
-
useScope: r(),
|
|
2016
|
-
scopeName: r.scopeName
|
|
2017
|
-
})
|
|
2018
|
-
);
|
|
2019
|
-
return function(i) {
|
|
2020
|
-
const c = o.reduce((s, { useScope: a, scopeName: u }) => {
|
|
2021
|
-
const l = a(i)[`__scope${u}`];
|
|
2022
|
-
return {
|
|
2023
|
-
...s,
|
|
2024
|
-
...l
|
|
2025
|
-
};
|
|
2026
|
-
}, {});
|
|
2027
|
-
return q(
|
|
2028
|
-
() => ({
|
|
2029
|
-
[`__scope${t.scopeName}`]: c
|
|
2030
|
-
}),
|
|
2031
|
-
[
|
|
2032
|
-
c
|
|
2033
|
-
]
|
|
2034
|
-
);
|
|
2035
|
-
};
|
|
2036
|
-
};
|
|
2037
|
-
return n.scopeName = t.scopeName, n;
|
|
2038
|
-
}
|
|
2039
|
-
function Fr(e) {
|
|
2040
|
-
const t = M(e);
|
|
2041
|
-
return N(() => {
|
|
2042
|
-
t.current = e;
|
|
2043
|
-
}), q(
|
|
2044
|
-
() => (...n) => {
|
|
2045
|
-
var o;
|
|
2046
|
-
return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
|
|
2047
|
-
},
|
|
2048
|
-
[]
|
|
2049
|
-
);
|
|
2050
|
-
}
|
|
2051
|
-
const dt = globalThis != null && globalThis.document ? ze : () => {
|
|
2052
|
-
};
|
|
2053
|
-
function Lr(e) {
|
|
2054
|
-
const [t, n] = j(void 0);
|
|
2055
|
-
return dt(() => {
|
|
2056
|
-
if (e) {
|
|
2057
|
-
n({
|
|
2058
|
-
width: e.offsetWidth,
|
|
2059
|
-
height: e.offsetHeight
|
|
2060
|
-
});
|
|
2061
|
-
const o = new ResizeObserver((r) => {
|
|
2062
|
-
if (!Array.isArray(r) || !r.length)
|
|
2063
|
-
return;
|
|
2064
|
-
const i = r[0];
|
|
2065
|
-
let c, s;
|
|
2066
|
-
if ("borderBoxSize" in i) {
|
|
2067
|
-
const a = i.borderBoxSize, u = Array.isArray(a) ? a[0] : a;
|
|
2068
|
-
c = u.inlineSize, s = u.blockSize;
|
|
2069
|
-
} else
|
|
2070
|
-
c = e.offsetWidth, s = e.offsetHeight;
|
|
2071
|
-
n({
|
|
2072
|
-
width: c,
|
|
2073
|
-
height: s
|
|
2074
|
-
});
|
|
2075
|
-
});
|
|
2076
|
-
return o.observe(e, {
|
|
2077
|
-
box: "border-box"
|
|
2078
|
-
}), () => o.unobserve(e);
|
|
2079
|
-
} else
|
|
2080
|
-
n(void 0);
|
|
2081
|
-
}, [
|
|
2082
|
-
e
|
|
2083
|
-
]), t;
|
|
2084
|
-
}
|
|
2085
|
-
const gn = "Popper", [bn, $n] = _r(gn), [Mr, yn] = bn(gn), kr = (e) => {
|
|
2086
|
-
const { __scopePopper: t, children: n } = e, [o, r] = j(null);
|
|
2087
|
-
return /* @__PURE__ */ P(Mr, {
|
|
2088
|
-
scope: t,
|
|
2089
|
-
anchor: o,
|
|
2090
|
-
onAnchorChange: r
|
|
2091
|
-
}, n);
|
|
2092
|
-
}, Ir = "PopperAnchor", Wr = /* @__PURE__ */ k((e, t) => {
|
|
2093
|
-
const { __scopePopper: n, virtualRef: o, ...r } = e, i = yn(Ir, n), c = M(null), s = vn(t, c);
|
|
2094
|
-
return N(() => {
|
|
2095
|
-
i.onAnchorChange((o == null ? void 0 : o.current) || c.current);
|
|
2096
|
-
}), o ? null : /* @__PURE__ */ P(mn.div, F({}, r, {
|
|
2097
|
-
ref: s
|
|
2098
|
-
}));
|
|
2099
|
-
}), wn = "PopperContent", [Br, sc] = bn(wn), Hr = /* @__PURE__ */ k((e, t) => {
|
|
2100
|
-
var n, o, r, i, c, s, a, u;
|
|
2101
|
-
const { __scopePopper: f, side: l = "bottom", sideOffset: v = 0, align: d = "center", alignOffset: m = 0, arrowPadding: p = 0, collisionBoundary: h = [], collisionPadding: g = 0, sticky: w = "partial", hideWhenDetached: b = !1, avoidCollisions: $ = !0, onPlaced: y, ...A } = e, C = yn(wn, f), [E, O] = j(null), D = vn(
|
|
2102
|
-
t,
|
|
2103
|
-
(Ze) => O(Ze)
|
|
2104
|
-
), [_, I] = j(null), R = Lr(_), T = (n = R == null ? void 0 : R.width) !== null && n !== void 0 ? n : 0, z = (o = R == null ? void 0 : R.height) !== null && o !== void 0 ? o : 0, L = l + (d !== "center" ? "-" + d : ""), W = typeof g == "number" ? g : {
|
|
2105
|
-
top: 0,
|
|
2106
|
-
right: 0,
|
|
2107
|
-
bottom: 0,
|
|
2108
|
-
left: 0,
|
|
2109
|
-
...g
|
|
2110
|
-
}, S = Array.isArray(h) ? h : [
|
|
2111
|
-
h
|
|
2112
|
-
], B = S.length > 0, V = {
|
|
2113
|
-
padding: W,
|
|
2114
|
-
boundary: S.filter(Ur),
|
|
2115
|
-
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2116
|
-
altBoundary: B
|
|
2117
|
-
}, { refs: In, floatingStyles: At, placement: Wn, isPositioned: Se, middlewareData: ue } = br({
|
|
2118
|
-
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
2119
|
-
strategy: "fixed",
|
|
2120
|
-
placement: L,
|
|
2121
|
-
whileElementsMounted: ur,
|
|
2122
|
-
elements: {
|
|
2123
|
-
reference: C.anchor
|
|
2124
|
-
},
|
|
2125
|
-
middleware: [
|
|
2126
|
-
yr({
|
|
2127
|
-
mainAxis: v + z,
|
|
2128
|
-
alignmentAxis: m
|
|
2129
|
-
}),
|
|
2130
|
-
$ && wr({
|
|
2131
|
-
mainAxis: !0,
|
|
2132
|
-
crossAxis: !1,
|
|
2133
|
-
limiter: w === "partial" ? xr() : void 0,
|
|
2134
|
-
...V
|
|
2135
|
-
}),
|
|
2136
|
-
$ && Er({
|
|
2137
|
-
...V
|
|
2138
|
-
}),
|
|
2139
|
-
Cr({
|
|
2140
|
-
...V,
|
|
2141
|
-
apply: ({ elements: Ze, rects: Kn, availableWidth: Yn, availableHeight: Xn }) => {
|
|
2142
|
-
const { width: Zn, height: Gn } = Kn.reference, Re = Ze.floating.style;
|
|
2143
|
-
Re.setProperty("--radix-popper-available-width", `${Yn}px`), Re.setProperty("--radix-popper-available-height", `${Xn}px`), Re.setProperty("--radix-popper-anchor-width", `${Zn}px`), Re.setProperty("--radix-popper-anchor-height", `${Gn}px`);
|
|
2144
|
-
}
|
|
2145
|
-
}),
|
|
2146
|
-
_ && Ar({
|
|
2147
|
-
element: _,
|
|
2148
|
-
padding: p
|
|
2149
|
-
}),
|
|
2150
|
-
zr({
|
|
2151
|
-
arrowWidth: T,
|
|
2152
|
-
arrowHeight: z
|
|
2153
|
-
}),
|
|
2154
|
-
b && Pr({
|
|
2155
|
-
strategy: "referenceHidden"
|
|
2156
|
-
})
|
|
2157
|
-
]
|
|
2158
|
-
}), [St, Bn] = xn(Wn), Oe = Fr(y);
|
|
2159
|
-
dt(() => {
|
|
2160
|
-
Se && (Oe == null || Oe());
|
|
2161
|
-
}, [
|
|
2162
|
-
Se,
|
|
2163
|
-
Oe
|
|
2164
|
-
]);
|
|
2165
|
-
const Hn = (r = ue.arrow) === null || r === void 0 ? void 0 : r.x, Un = (i = ue.arrow) === null || i === void 0 ? void 0 : i.y, zn = ((c = ue.arrow) === null || c === void 0 ? void 0 : c.centerOffset) !== 0, [Vn, jn] = j();
|
|
2166
|
-
return dt(() => {
|
|
2167
|
-
E && jn(window.getComputedStyle(E).zIndex);
|
|
2168
|
-
}, [
|
|
2169
|
-
E
|
|
2170
|
-
]), /* @__PURE__ */ P("div", {
|
|
2171
|
-
ref: In.setFloating,
|
|
2172
|
-
"data-radix-popper-content-wrapper": "",
|
|
2173
|
-
style: {
|
|
2174
|
-
...At,
|
|
2175
|
-
transform: Se ? At.transform : "translate(0, -200%)",
|
|
2176
|
-
// keep off the page when measuring
|
|
2177
|
-
minWidth: "max-content",
|
|
2178
|
-
zIndex: Vn,
|
|
2179
|
-
"--radix-popper-transform-origin": [
|
|
2180
|
-
(s = ue.transformOrigin) === null || s === void 0 ? void 0 : s.x,
|
|
2181
|
-
(a = ue.transformOrigin) === null || a === void 0 ? void 0 : a.y
|
|
2182
|
-
].join(" ")
|
|
2183
|
-
},
|
|
2184
|
-
dir: e.dir
|
|
2185
|
-
}, /* @__PURE__ */ P(Br, {
|
|
2186
|
-
scope: f,
|
|
2187
|
-
placedSide: St,
|
|
2188
|
-
onArrowChange: I,
|
|
2189
|
-
arrowX: Hn,
|
|
2190
|
-
arrowY: Un,
|
|
2191
|
-
shouldHideArrow: zn
|
|
2192
|
-
}, /* @__PURE__ */ P(mn.div, F({
|
|
2193
|
-
"data-side": St,
|
|
2194
|
-
"data-align": Bn
|
|
2195
|
-
}, A, {
|
|
2196
|
-
ref: D,
|
|
2197
|
-
style: {
|
|
2198
|
-
...A.style,
|
|
2199
|
-
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
2200
|
-
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
2201
|
-
animation: Se ? void 0 : "none",
|
|
2202
|
-
// hide the content if using the hide middleware and should be hidden
|
|
2203
|
-
opacity: (u = ue.hide) !== null && u !== void 0 && u.referenceHidden ? 0 : void 0
|
|
2204
|
-
}
|
|
2205
|
-
}))));
|
|
2206
|
-
});
|
|
2207
|
-
function Ur(e) {
|
|
2208
|
-
return e !== null;
|
|
2209
|
-
}
|
|
2210
|
-
const zr = (e) => ({
|
|
2211
|
-
name: "transformOrigin",
|
|
2212
|
-
options: e,
|
|
2213
|
-
fn(t) {
|
|
2214
|
-
var n, o, r, i, c;
|
|
2215
|
-
const { placement: s, rects: a, middlewareData: u } = t, l = ((n = u.arrow) === null || n === void 0 ? void 0 : n.centerOffset) !== 0, v = l ? 0 : e.arrowWidth, d = l ? 0 : e.arrowHeight, [m, p] = xn(s), h = {
|
|
2216
|
-
start: "0%",
|
|
2217
|
-
center: "50%",
|
|
2218
|
-
end: "100%"
|
|
2219
|
-
}[p], g = ((o = (r = u.arrow) === null || r === void 0 ? void 0 : r.x) !== null && o !== void 0 ? o : 0) + v / 2, w = ((i = (c = u.arrow) === null || c === void 0 ? void 0 : c.y) !== null && i !== void 0 ? i : 0) + d / 2;
|
|
2220
|
-
let b = "", $ = "";
|
|
2221
|
-
return m === "bottom" ? (b = l ? h : `${g}px`, $ = `${-d}px`) : m === "top" ? (b = l ? h : `${g}px`, $ = `${a.floating.height + d}px`) : m === "right" ? (b = `${-d}px`, $ = l ? h : `${w}px`) : m === "left" && (b = `${a.floating.width + d}px`, $ = l ? h : `${w}px`), {
|
|
2222
|
-
data: {
|
|
2223
|
-
x: b,
|
|
2224
|
-
y: $
|
|
2225
|
-
}
|
|
2226
|
-
};
|
|
2227
|
-
}
|
|
2228
|
-
});
|
|
2229
|
-
function xn(e) {
|
|
2230
|
-
const [t, n = "center"] = e.split("-");
|
|
2231
|
-
return [
|
|
2232
|
-
t,
|
|
2233
|
-
n
|
|
2234
|
-
];
|
|
2235
|
-
}
|
|
2236
|
-
const Vr = kr, jr = Wr, Kr = Hr, Yr = /* @__PURE__ */ k((e, t) => {
|
|
2237
|
-
var n;
|
|
2238
|
-
const { container: o = globalThis == null || (n = globalThis.document) === null || n === void 0 ? void 0 : n.body, ...r } = e;
|
|
2239
|
-
return o ? /* @__PURE__ */ eo.createPortal(/* @__PURE__ */ P(Ve.div, F({}, r, {
|
|
2240
|
-
ref: t
|
|
2241
|
-
})), o) : null;
|
|
2242
|
-
}), Vt = globalThis != null && globalThis.document ? ze : () => {
|
|
2243
|
-
};
|
|
2244
|
-
function Xr(e, t) {
|
|
2245
|
-
return Qn((n, o) => {
|
|
2246
|
-
const r = t[n][o];
|
|
2247
|
-
return r ?? n;
|
|
2248
|
-
}, e);
|
|
2249
|
-
}
|
|
2250
|
-
const Ct = (e) => {
|
|
2251
|
-
const { present: t, children: n } = e, o = Zr(t), r = typeof n == "function" ? n({
|
|
2252
|
-
present: o.isPresent
|
|
2253
|
-
}) : K.only(n), i = Pe(o.ref, r.ref);
|
|
2254
|
-
return typeof n == "function" || o.isPresent ? /* @__PURE__ */ Ce(r, {
|
|
2255
|
-
ref: i
|
|
2256
|
-
}) : null;
|
|
2257
|
-
};
|
|
2258
|
-
Ct.displayName = "Presence";
|
|
2259
|
-
function Zr(e) {
|
|
2260
|
-
const [t, n] = j(), o = M({}), r = M(e), i = M("none"), c = e ? "mounted" : "unmounted", [s, a] = Xr(c, {
|
|
2261
|
-
mounted: {
|
|
2262
|
-
UNMOUNT: "unmounted",
|
|
2263
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
2264
|
-
},
|
|
2265
|
-
unmountSuspended: {
|
|
2266
|
-
MOUNT: "mounted",
|
|
2267
|
-
ANIMATION_END: "unmounted"
|
|
2268
|
-
},
|
|
2269
|
-
unmounted: {
|
|
2270
|
-
MOUNT: "mounted"
|
|
2271
|
-
}
|
|
2272
|
-
});
|
|
2273
|
-
return N(() => {
|
|
2274
|
-
const u = De(o.current);
|
|
2275
|
-
i.current = s === "mounted" ? u : "none";
|
|
2276
|
-
}, [
|
|
2277
|
-
s
|
|
2278
|
-
]), Vt(() => {
|
|
2279
|
-
const u = o.current, f = r.current;
|
|
2280
|
-
if (f !== e) {
|
|
2281
|
-
const v = i.current, d = De(u);
|
|
2282
|
-
e ? a("MOUNT") : d === "none" || (u == null ? void 0 : u.display) === "none" ? a("UNMOUNT") : a(f && v !== d ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
|
|
2283
|
-
}
|
|
2284
|
-
}, [
|
|
2285
|
-
e,
|
|
2286
|
-
a
|
|
2287
|
-
]), Vt(() => {
|
|
2288
|
-
if (t) {
|
|
2289
|
-
const u = (l) => {
|
|
2290
|
-
const d = De(o.current).includes(l.animationName);
|
|
2291
|
-
l.target === t && d && Qt(
|
|
2292
|
-
() => a("ANIMATION_END")
|
|
2293
|
-
);
|
|
2294
|
-
}, f = (l) => {
|
|
2295
|
-
l.target === t && (i.current = De(o.current));
|
|
2296
|
-
};
|
|
2297
|
-
return t.addEventListener("animationstart", f), t.addEventListener("animationcancel", u), t.addEventListener("animationend", u), () => {
|
|
2298
|
-
t.removeEventListener("animationstart", f), t.removeEventListener("animationcancel", u), t.removeEventListener("animationend", u);
|
|
2299
|
-
};
|
|
2300
|
-
} else
|
|
2301
|
-
a("ANIMATION_END");
|
|
2302
|
-
}, [
|
|
2303
|
-
t,
|
|
2304
|
-
a
|
|
2305
|
-
]), {
|
|
2306
|
-
isPresent: [
|
|
2307
|
-
"mounted",
|
|
2308
|
-
"unmountSuspended"
|
|
2309
|
-
].includes(s),
|
|
2310
|
-
ref: oe((u) => {
|
|
2311
|
-
u && (o.current = getComputedStyle(u)), n(u);
|
|
2312
|
-
}, [])
|
|
2313
|
-
};
|
|
2314
|
-
}
|
|
2315
|
-
function De(e) {
|
|
2316
|
-
return (e == null ? void 0 : e.animationName) || "none";
|
|
2317
|
-
}
|
|
2318
|
-
function En(e) {
|
|
2319
|
-
const t = M(e);
|
|
2320
|
-
return N(() => {
|
|
2321
|
-
t.current = e;
|
|
2322
|
-
}), q(
|
|
2323
|
-
() => (...n) => {
|
|
2324
|
-
var o;
|
|
2325
|
-
return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
|
|
2326
|
-
},
|
|
2327
|
-
[]
|
|
2328
|
-
);
|
|
2329
|
-
}
|
|
2330
|
-
function Gr({ prop: e, defaultProp: t, onChange: n = () => {
|
|
2331
|
-
} }) {
|
|
2332
|
-
const [o, r] = qr({
|
|
2333
|
-
defaultProp: t,
|
|
2334
|
-
onChange: n
|
|
2335
|
-
}), i = e !== void 0, c = i ? e : o, s = En(n), a = oe((u) => {
|
|
2336
|
-
if (i) {
|
|
2337
|
-
const l = typeof u == "function" ? u(e) : u;
|
|
2338
|
-
l !== e && s(l);
|
|
2339
|
-
} else
|
|
2340
|
-
r(u);
|
|
2341
|
-
}, [
|
|
2342
|
-
i,
|
|
2343
|
-
e,
|
|
2344
|
-
r,
|
|
2345
|
-
s
|
|
2346
|
-
]);
|
|
2347
|
-
return [
|
|
2348
|
-
c,
|
|
2349
|
-
a
|
|
2350
|
-
];
|
|
2351
|
-
}
|
|
2352
|
-
function qr({ defaultProp: e, onChange: t }) {
|
|
2353
|
-
const n = j(e), [o] = n, r = M(o), i = En(t);
|
|
2354
|
-
return N(() => {
|
|
2355
|
-
r.current !== o && (i(o), r.current = o);
|
|
2356
|
-
}, [
|
|
2357
|
-
o,
|
|
2358
|
-
r,
|
|
2359
|
-
i
|
|
2360
|
-
]), n;
|
|
2361
|
-
}
|
|
2362
|
-
var Qr = function(e) {
|
|
2363
|
-
if (typeof document > "u")
|
|
2364
|
-
return null;
|
|
2365
|
-
var t = Array.isArray(e) ? e[0] : e;
|
|
2366
|
-
return t.ownerDocument.body;
|
|
2367
|
-
}, fe = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), Ne = {}, nt = 0, Cn = function(e) {
|
|
2368
|
-
return e && (e.host || Cn(e.parentNode));
|
|
2369
|
-
}, Jr = function(e, t) {
|
|
2370
|
-
return t.map(function(n) {
|
|
2371
|
-
if (e.contains(n))
|
|
2372
|
-
return n;
|
|
2373
|
-
var o = Cn(n);
|
|
2374
|
-
return o && e.contains(o) ? o : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
2375
|
-
}).filter(function(n) {
|
|
2376
|
-
return !!n;
|
|
2377
|
-
});
|
|
2378
|
-
}, ei = function(e, t, n, o) {
|
|
2379
|
-
var r = Jr(t, Array.isArray(e) ? e : [e]);
|
|
2380
|
-
Ne[n] || (Ne[n] = /* @__PURE__ */ new WeakMap());
|
|
2381
|
-
var i = Ne[n], c = [], s = /* @__PURE__ */ new Set(), a = new Set(r), u = function(l) {
|
|
2382
|
-
!l || s.has(l) || (s.add(l), u(l.parentNode));
|
|
2383
|
-
};
|
|
2384
|
-
r.forEach(u);
|
|
2385
|
-
var f = function(l) {
|
|
2386
|
-
!l || a.has(l) || Array.prototype.forEach.call(l.children, function(v) {
|
|
2387
|
-
if (s.has(v))
|
|
2388
|
-
f(v);
|
|
2389
|
-
else
|
|
2390
|
-
try {
|
|
2391
|
-
var d = v.getAttribute(o), m = d !== null && d !== "false", p = (fe.get(v) || 0) + 1, h = (i.get(v) || 0) + 1;
|
|
2392
|
-
fe.set(v, p), i.set(v, h), c.push(v), p === 1 && m && _e.set(v, !0), h === 1 && v.setAttribute(n, "true"), m || v.setAttribute(o, "true");
|
|
2393
|
-
} catch (g) {
|
|
2394
|
-
console.error("aria-hidden: cannot operate on ", v, g);
|
|
2395
|
-
}
|
|
2396
|
-
});
|
|
2397
|
-
};
|
|
2398
|
-
return f(t), s.clear(), nt++, function() {
|
|
2399
|
-
c.forEach(function(l) {
|
|
2400
|
-
var v = fe.get(l) - 1, d = i.get(l) - 1;
|
|
2401
|
-
fe.set(l, v), i.set(l, d), v || (_e.has(l) || l.removeAttribute(o), _e.delete(l)), d || l.removeAttribute(n);
|
|
2402
|
-
}), nt--, nt || (fe = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), Ne = {});
|
|
2403
|
-
};
|
|
2404
|
-
}, ti = function(e, t, n) {
|
|
2405
|
-
n === void 0 && (n = "data-aria-hidden");
|
|
2406
|
-
var o = Array.from(Array.isArray(e) ? e : [e]), r = t || Qr(e);
|
|
2407
|
-
return r ? (o.push.apply(o, Array.from(r.querySelectorAll("[aria-live]"))), ei(o, r, n, "aria-hidden")) : function() {
|
|
2408
|
-
return null;
|
|
2409
|
-
};
|
|
2410
|
-
}, Z = function() {
|
|
2411
|
-
return Z = Object.assign || function(t) {
|
|
2412
|
-
for (var n, o = 1, r = arguments.length; o < r; o++) {
|
|
2413
|
-
n = arguments[o];
|
|
2414
|
-
for (var i in n)
|
|
2415
|
-
Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
2416
|
-
}
|
|
2417
|
-
return t;
|
|
2418
|
-
}, Z.apply(this, arguments);
|
|
2419
|
-
};
|
|
2420
|
-
function Pn(e, t) {
|
|
2421
|
-
var n = {};
|
|
2422
|
-
for (var o in e)
|
|
2423
|
-
Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
|
|
2424
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
2425
|
-
for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
|
|
2426
|
-
t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
|
|
2427
|
-
return n;
|
|
2428
|
-
}
|
|
2429
|
-
function ni(e, t, n) {
|
|
2430
|
-
if (n || arguments.length === 2)
|
|
2431
|
-
for (var o = 0, r = t.length, i; o < r; o++)
|
|
2432
|
-
(i || !(o in t)) && (i || (i = Array.prototype.slice.call(t, 0, o)), i[o] = t[o]);
|
|
2433
|
-
return e.concat(i || Array.prototype.slice.call(t));
|
|
2434
|
-
}
|
|
2435
|
-
var ke = "right-scroll-bar-position", Ie = "width-before-scroll-bar", oi = "with-scroll-bars-hidden", ri = "--removed-body-scroll-bar-size";
|
|
2436
|
-
function ot(e, t) {
|
|
2437
|
-
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
2438
|
-
}
|
|
2439
|
-
function ii(e, t) {
|
|
2440
|
-
var n = j(function() {
|
|
2441
|
-
return {
|
|
2442
|
-
// value
|
|
2443
|
-
value: e,
|
|
2444
|
-
// last callback
|
|
2445
|
-
callback: t,
|
|
2446
|
-
// "memoized" public interface
|
|
2447
|
-
facade: {
|
|
2448
|
-
get current() {
|
|
2449
|
-
return n.value;
|
|
2450
|
-
},
|
|
2451
|
-
set current(o) {
|
|
2452
|
-
var r = n.value;
|
|
2453
|
-
r !== o && (n.value = o, n.callback(o, r));
|
|
2454
|
-
}
|
|
2455
|
-
}
|
|
2456
|
-
};
|
|
2457
|
-
})[0];
|
|
2458
|
-
return n.callback = t, n.facade;
|
|
2459
|
-
}
|
|
2460
|
-
var ci = typeof window < "u" ? x.useLayoutEffect : x.useEffect, jt = /* @__PURE__ */ new WeakMap();
|
|
2461
|
-
function si(e, t) {
|
|
2462
|
-
var n = ii(t || null, function(o) {
|
|
2463
|
-
return e.forEach(function(r) {
|
|
2464
|
-
return ot(r, o);
|
|
2465
|
-
});
|
|
2466
|
-
});
|
|
2467
|
-
return ci(function() {
|
|
2468
|
-
var o = jt.get(n);
|
|
2469
|
-
if (o) {
|
|
2470
|
-
var r = new Set(o), i = new Set(e), c = n.current;
|
|
2471
|
-
r.forEach(function(s) {
|
|
2472
|
-
i.has(s) || ot(s, null);
|
|
2473
|
-
}), i.forEach(function(s) {
|
|
2474
|
-
r.has(s) || ot(s, c);
|
|
2475
|
-
});
|
|
2476
|
-
}
|
|
2477
|
-
jt.set(n, e);
|
|
2478
|
-
}, [e]), n;
|
|
2479
|
-
}
|
|
2480
|
-
function ai(e) {
|
|
2481
|
-
return e;
|
|
2482
|
-
}
|
|
2483
|
-
function li(e, t) {
|
|
2484
|
-
t === void 0 && (t = ai);
|
|
2485
|
-
var n = [], o = !1, r = {
|
|
2486
|
-
read: function() {
|
|
2487
|
-
if (o)
|
|
2488
|
-
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
2489
|
-
return n.length ? n[n.length - 1] : e;
|
|
2490
|
-
},
|
|
2491
|
-
useMedium: function(i) {
|
|
2492
|
-
var c = t(i, o);
|
|
2493
|
-
return n.push(c), function() {
|
|
2494
|
-
n = n.filter(function(s) {
|
|
2495
|
-
return s !== c;
|
|
2496
|
-
});
|
|
2497
|
-
};
|
|
2498
|
-
},
|
|
2499
|
-
assignSyncMedium: function(i) {
|
|
2500
|
-
for (o = !0; n.length; ) {
|
|
2501
|
-
var c = n;
|
|
2502
|
-
n = [], c.forEach(i);
|
|
2503
|
-
}
|
|
2504
|
-
n = {
|
|
2505
|
-
push: function(s) {
|
|
2506
|
-
return i(s);
|
|
2507
|
-
},
|
|
2508
|
-
filter: function() {
|
|
2509
|
-
return n;
|
|
2510
|
-
}
|
|
2511
|
-
};
|
|
2512
|
-
},
|
|
2513
|
-
assignMedium: function(i) {
|
|
2514
|
-
o = !0;
|
|
2515
|
-
var c = [];
|
|
2516
|
-
if (n.length) {
|
|
2517
|
-
var s = n;
|
|
2518
|
-
n = [], s.forEach(i), c = n;
|
|
2519
|
-
}
|
|
2520
|
-
var a = function() {
|
|
2521
|
-
var f = c;
|
|
2522
|
-
c = [], f.forEach(i);
|
|
2523
|
-
}, u = function() {
|
|
2524
|
-
return Promise.resolve().then(a);
|
|
2525
|
-
};
|
|
2526
|
-
u(), n = {
|
|
2527
|
-
push: function(f) {
|
|
2528
|
-
c.push(f), u();
|
|
2529
|
-
},
|
|
2530
|
-
filter: function(f) {
|
|
2531
|
-
return c = c.filter(f), n;
|
|
2532
|
-
}
|
|
2533
|
-
};
|
|
2534
|
-
}
|
|
2535
|
-
};
|
|
2536
|
-
return r;
|
|
2537
|
-
}
|
|
2538
|
-
function ui(e) {
|
|
2539
|
-
e === void 0 && (e = {});
|
|
2540
|
-
var t = li(null);
|
|
2541
|
-
return t.options = Z({ async: !0, ssr: !1 }, e), t;
|
|
2542
|
-
}
|
|
2543
|
-
var An = function(e) {
|
|
2544
|
-
var t = e.sideCar, n = Pn(e, ["sideCar"]);
|
|
2545
|
-
if (!t)
|
|
2546
|
-
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
2547
|
-
var o = t.read();
|
|
2548
|
-
if (!o)
|
|
2549
|
-
throw new Error("Sidecar medium not found");
|
|
2550
|
-
return x.createElement(o, Z({}, n));
|
|
2551
|
-
};
|
|
2552
|
-
An.isSideCarExport = !0;
|
|
2553
|
-
function fi(e, t) {
|
|
2554
|
-
return e.useMedium(t), An;
|
|
2555
|
-
}
|
|
2556
|
-
var Sn = ui(), rt = function() {
|
|
2557
|
-
}, Xe = x.forwardRef(function(e, t) {
|
|
2558
|
-
var n = x.useRef(null), o = x.useState({
|
|
2559
|
-
onScrollCapture: rt,
|
|
2560
|
-
onWheelCapture: rt,
|
|
2561
|
-
onTouchMoveCapture: rt
|
|
2562
|
-
}), r = o[0], i = o[1], c = e.forwardProps, s = e.children, a = e.className, u = e.removeScrollBar, f = e.enabled, l = e.shards, v = e.sideCar, d = e.noIsolation, m = e.inert, p = e.allowPinchZoom, h = e.as, g = h === void 0 ? "div" : h, w = Pn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), b = v, $ = si([n, t]), y = Z(Z({}, w), r);
|
|
2563
|
-
return x.createElement(
|
|
2564
|
-
x.Fragment,
|
|
2565
|
-
null,
|
|
2566
|
-
f && x.createElement(b, { sideCar: Sn, removeScrollBar: u, shards: l, noIsolation: d, inert: m, setCallbacks: i, allowPinchZoom: !!p, lockRef: n }),
|
|
2567
|
-
c ? x.cloneElement(x.Children.only(s), Z(Z({}, y), { ref: $ })) : x.createElement(g, Z({}, y, { className: a, ref: $ }), s)
|
|
2568
|
-
);
|
|
2569
|
-
});
|
|
2570
|
-
Xe.defaultProps = {
|
|
2571
|
-
enabled: !0,
|
|
2572
|
-
removeScrollBar: !0,
|
|
2573
|
-
inert: !1
|
|
2574
|
-
};
|
|
2575
|
-
Xe.classNames = {
|
|
2576
|
-
fullWidth: Ie,
|
|
2577
|
-
zeroRight: ke
|
|
2578
|
-
};
|
|
2579
|
-
var Kt, di = function() {
|
|
2580
|
-
if (Kt)
|
|
2581
|
-
return Kt;
|
|
2582
|
-
if (typeof __webpack_nonce__ < "u")
|
|
2583
|
-
return __webpack_nonce__;
|
|
2584
|
-
};
|
|
2585
|
-
function pi() {
|
|
2586
|
-
if (!document)
|
|
2587
|
-
return null;
|
|
2588
|
-
var e = document.createElement("style");
|
|
2589
|
-
e.type = "text/css";
|
|
2590
|
-
var t = di();
|
|
2591
|
-
return t && e.setAttribute("nonce", t), e;
|
|
2592
|
-
}
|
|
2593
|
-
function vi(e, t) {
|
|
2594
|
-
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
2595
|
-
}
|
|
2596
|
-
function hi(e) {
|
|
2597
|
-
var t = document.head || document.getElementsByTagName("head")[0];
|
|
2598
|
-
t.appendChild(e);
|
|
2599
|
-
}
|
|
2600
|
-
var mi = function() {
|
|
2601
|
-
var e = 0, t = null;
|
|
2602
|
-
return {
|
|
2603
|
-
add: function(n) {
|
|
2604
|
-
e == 0 && (t = pi()) && (vi(t, n), hi(t)), e++;
|
|
2605
|
-
},
|
|
2606
|
-
remove: function() {
|
|
2607
|
-
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
2608
|
-
}
|
|
2609
|
-
};
|
|
2610
|
-
}, gi = function() {
|
|
2611
|
-
var e = mi();
|
|
2612
|
-
return function(t, n) {
|
|
2613
|
-
x.useEffect(function() {
|
|
2614
|
-
return e.add(t), function() {
|
|
2615
|
-
e.remove();
|
|
2616
|
-
};
|
|
2617
|
-
}, [t && n]);
|
|
2618
|
-
};
|
|
2619
|
-
}, On = function() {
|
|
2620
|
-
var e = gi(), t = function(n) {
|
|
2621
|
-
var o = n.styles, r = n.dynamic;
|
|
2622
|
-
return e(o, r), null;
|
|
2623
|
-
};
|
|
2624
|
-
return t;
|
|
2625
|
-
}, bi = {
|
|
2626
|
-
left: 0,
|
|
2627
|
-
top: 0,
|
|
2628
|
-
right: 0,
|
|
2629
|
-
gap: 0
|
|
2630
|
-
}, it = function(e) {
|
|
2631
|
-
return parseInt(e || "", 10) || 0;
|
|
2632
|
-
}, $i = function(e) {
|
|
2633
|
-
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], r = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
2634
|
-
return [it(n), it(o), it(r)];
|
|
2635
|
-
}, yi = function(e) {
|
|
2636
|
-
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
2637
|
-
return bi;
|
|
2638
|
-
var t = $i(e), n = document.documentElement.clientWidth, o = window.innerWidth;
|
|
2639
|
-
return {
|
|
2640
|
-
left: t[0],
|
|
2641
|
-
top: t[1],
|
|
2642
|
-
right: t[2],
|
|
2643
|
-
gap: Math.max(0, o - n + t[2] - t[0])
|
|
2644
|
-
};
|
|
2645
|
-
}, wi = On(), he = "data-scroll-locked", xi = function(e, t, n, o) {
|
|
2646
|
-
var r = e.left, i = e.top, c = e.right, s = e.gap;
|
|
2647
|
-
return n === void 0 && (n = "margin"), `
|
|
2648
|
-
.`.concat(oi, ` {
|
|
2649
|
-
overflow: hidden `).concat(o, `;
|
|
2650
|
-
padding-right: `).concat(s, "px ").concat(o, `;
|
|
2651
|
-
}
|
|
2652
|
-
body[`).concat(he, `] {
|
|
2653
|
-
overflow: hidden `).concat(o, `;
|
|
2654
|
-
overscroll-behavior: contain;
|
|
2655
|
-
`).concat([
|
|
2656
|
-
t && "position: relative ".concat(o, ";"),
|
|
2657
|
-
n === "margin" && `
|
|
2658
|
-
padding-left: `.concat(r, `px;
|
|
2659
|
-
padding-top: `).concat(i, `px;
|
|
2660
|
-
padding-right: `).concat(c, `px;
|
|
2661
|
-
margin-left:0;
|
|
2662
|
-
margin-top:0;
|
|
2663
|
-
margin-right: `).concat(s, "px ").concat(o, `;
|
|
2664
|
-
`),
|
|
2665
|
-
n === "padding" && "padding-right: ".concat(s, "px ").concat(o, ";")
|
|
2666
|
-
].filter(Boolean).join(""), `
|
|
2667
|
-
}
|
|
2668
|
-
|
|
2669
|
-
.`).concat(ke, ` {
|
|
2670
|
-
right: `).concat(s, "px ").concat(o, `;
|
|
2671
|
-
}
|
|
2672
|
-
|
|
2673
|
-
.`).concat(Ie, ` {
|
|
2674
|
-
margin-right: `).concat(s, "px ").concat(o, `;
|
|
2675
|
-
}
|
|
2676
|
-
|
|
2677
|
-
.`).concat(ke, " .").concat(ke, ` {
|
|
2678
|
-
right: 0 `).concat(o, `;
|
|
2679
|
-
}
|
|
2680
|
-
|
|
2681
|
-
.`).concat(Ie, " .").concat(Ie, ` {
|
|
2682
|
-
margin-right: 0 `).concat(o, `;
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2685
|
-
body[`).concat(he, `] {
|
|
2686
|
-
`).concat(ri, ": ").concat(s, `px;
|
|
2687
|
-
}
|
|
2688
|
-
`);
|
|
2689
|
-
}, Yt = function() {
|
|
2690
|
-
var e = parseInt(document.body.getAttribute(he) || "0", 10);
|
|
2691
|
-
return isFinite(e) ? e : 0;
|
|
2692
|
-
}, Ei = function() {
|
|
2693
|
-
x.useEffect(function() {
|
|
2694
|
-
return document.body.setAttribute(he, (Yt() + 1).toString()), function() {
|
|
2695
|
-
var e = Yt() - 1;
|
|
2696
|
-
e <= 0 ? document.body.removeAttribute(he) : document.body.setAttribute(he, e.toString());
|
|
2697
|
-
};
|
|
2698
|
-
}, []);
|
|
2699
|
-
}, Ci = function(e) {
|
|
2700
|
-
var t = e.noRelative, n = e.noImportant, o = e.gapMode, r = o === void 0 ? "margin" : o;
|
|
2701
|
-
Ei();
|
|
2702
|
-
var i = x.useMemo(function() {
|
|
2703
|
-
return yi(r);
|
|
2704
|
-
}, [r]);
|
|
2705
|
-
return x.createElement(wi, { styles: xi(i, !t, r, n ? "" : "!important") });
|
|
2706
|
-
}, pt = !1;
|
|
2707
|
-
if (typeof window < "u")
|
|
2708
|
-
try {
|
|
2709
|
-
var Fe = Object.defineProperty({}, "passive", {
|
|
2710
|
-
get: function() {
|
|
2711
|
-
return pt = !0, !0;
|
|
2712
|
-
}
|
|
2713
|
-
});
|
|
2714
|
-
window.addEventListener("test", Fe, Fe), window.removeEventListener("test", Fe, Fe);
|
|
2715
|
-
} catch {
|
|
2716
|
-
pt = !1;
|
|
2717
|
-
}
|
|
2718
|
-
var de = pt ? { passive: !1 } : !1, Pi = function(e) {
|
|
2719
|
-
return e.tagName === "TEXTAREA";
|
|
2720
|
-
}, Rn = function(e, t) {
|
|
2721
|
-
var n = window.getComputedStyle(e);
|
|
2722
|
-
return (
|
|
2723
|
-
// not-not-scrollable
|
|
2724
|
-
n[t] !== "hidden" && // contains scroll inside self
|
|
2725
|
-
!(n.overflowY === n.overflowX && !Pi(e) && n[t] === "visible")
|
|
2726
|
-
);
|
|
2727
|
-
}, Ai = function(e) {
|
|
2728
|
-
return Rn(e, "overflowY");
|
|
2729
|
-
}, Si = function(e) {
|
|
2730
|
-
return Rn(e, "overflowX");
|
|
2731
|
-
}, Xt = function(e, t) {
|
|
2732
|
-
var n = t;
|
|
2733
|
-
do {
|
|
2734
|
-
typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host);
|
|
2735
|
-
var o = Tn(e, n);
|
|
2736
|
-
if (o) {
|
|
2737
|
-
var r = Dn(e, n), i = r[1], c = r[2];
|
|
2738
|
-
if (i > c)
|
|
2739
|
-
return !0;
|
|
2740
|
-
}
|
|
2741
|
-
n = n.parentNode;
|
|
2742
|
-
} while (n && n !== document.body);
|
|
2743
|
-
return !1;
|
|
2744
|
-
}, Oi = function(e) {
|
|
2745
|
-
var t = e.scrollTop, n = e.scrollHeight, o = e.clientHeight;
|
|
2746
|
-
return [
|
|
2747
|
-
t,
|
|
2748
|
-
n,
|
|
2749
|
-
o
|
|
2750
|
-
];
|
|
2751
|
-
}, Ri = function(e) {
|
|
2752
|
-
var t = e.scrollLeft, n = e.scrollWidth, o = e.clientWidth;
|
|
2753
|
-
return [
|
|
2754
|
-
t,
|
|
2755
|
-
n,
|
|
2756
|
-
o
|
|
2757
|
-
];
|
|
2758
|
-
}, Tn = function(e, t) {
|
|
2759
|
-
return e === "v" ? Ai(t) : Si(t);
|
|
2760
|
-
}, Dn = function(e, t) {
|
|
2761
|
-
return e === "v" ? Oi(t) : Ri(t);
|
|
2762
|
-
}, Ti = function(e, t) {
|
|
2763
|
-
return e === "h" && t === "rtl" ? -1 : 1;
|
|
2764
|
-
}, Di = function(e, t, n, o, r) {
|
|
2765
|
-
var i = Ti(e, window.getComputedStyle(t).direction), c = i * o, s = n.target, a = t.contains(s), u = !1, f = c > 0, l = 0, v = 0;
|
|
2766
|
-
do {
|
|
2767
|
-
var d = Dn(e, s), m = d[0], p = d[1], h = d[2], g = p - h - i * m;
|
|
2768
|
-
(m || g) && Tn(e, s) && (l += g, v += m), s = s.parentNode;
|
|
2769
|
-
} while (
|
|
2770
|
-
// portaled content
|
|
2771
|
-
!a && s !== document.body || // self content
|
|
2772
|
-
a && (t.contains(s) || t === s)
|
|
2773
|
-
);
|
|
2774
|
-
return (f && (r && l === 0 || !r && c > l) || !f && (r && v === 0 || !r && -c > v)) && (u = !0), u;
|
|
2775
|
-
}, Le = function(e) {
|
|
2776
|
-
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
2777
|
-
}, Zt = function(e) {
|
|
2778
|
-
return [e.deltaX, e.deltaY];
|
|
2779
|
-
}, Gt = function(e) {
|
|
2780
|
-
return e && "current" in e ? e.current : e;
|
|
2781
|
-
}, _i = function(e, t) {
|
|
2782
|
-
return e[0] === t[0] && e[1] === t[1];
|
|
2783
|
-
}, Ni = function(e) {
|
|
2784
|
-
return `
|
|
2785
|
-
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
2786
|
-
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
2787
|
-
`);
|
|
2788
|
-
}, Fi = 0, pe = [];
|
|
2789
|
-
function Li(e) {
|
|
2790
|
-
var t = x.useRef([]), n = x.useRef([0, 0]), o = x.useRef(), r = x.useState(Fi++)[0], i = x.useState(function() {
|
|
2791
|
-
return On();
|
|
2792
|
-
})[0], c = x.useRef(e);
|
|
2793
|
-
x.useEffect(function() {
|
|
2794
|
-
c.current = e;
|
|
2795
|
-
}, [e]), x.useEffect(function() {
|
|
2796
|
-
if (e.inert) {
|
|
2797
|
-
document.body.classList.add("block-interactivity-".concat(r));
|
|
2798
|
-
var p = ni([e.lockRef.current], (e.shards || []).map(Gt), !0).filter(Boolean);
|
|
2799
|
-
return p.forEach(function(h) {
|
|
2800
|
-
return h.classList.add("allow-interactivity-".concat(r));
|
|
2801
|
-
}), function() {
|
|
2802
|
-
document.body.classList.remove("block-interactivity-".concat(r)), p.forEach(function(h) {
|
|
2803
|
-
return h.classList.remove("allow-interactivity-".concat(r));
|
|
2804
|
-
});
|
|
2805
|
-
};
|
|
2806
|
-
}
|
|
2807
|
-
}, [e.inert, e.lockRef.current, e.shards]);
|
|
2808
|
-
var s = x.useCallback(function(p, h) {
|
|
2809
|
-
if ("touches" in p && p.touches.length === 2)
|
|
2810
|
-
return !c.current.allowPinchZoom;
|
|
2811
|
-
var g = Le(p), w = n.current, b = "deltaX" in p ? p.deltaX : w[0] - g[0], $ = "deltaY" in p ? p.deltaY : w[1] - g[1], y, A = p.target, C = Math.abs(b) > Math.abs($) ? "h" : "v";
|
|
2812
|
-
if ("touches" in p && C === "h" && A.type === "range")
|
|
2813
|
-
return !1;
|
|
2814
|
-
var E = Xt(C, A);
|
|
2815
|
-
if (!E)
|
|
2816
|
-
return !0;
|
|
2817
|
-
if (E ? y = C : (y = C === "v" ? "h" : "v", E = Xt(C, A)), !E)
|
|
2818
|
-
return !1;
|
|
2819
|
-
if (!o.current && "changedTouches" in p && (b || $) && (o.current = y), !y)
|
|
2820
|
-
return !0;
|
|
2821
|
-
var O = o.current || y;
|
|
2822
|
-
return Di(O, h, p, O === "h" ? b : $, !0);
|
|
2823
|
-
}, []), a = x.useCallback(function(p) {
|
|
2824
|
-
var h = p;
|
|
2825
|
-
if (!(!pe.length || pe[pe.length - 1] !== i)) {
|
|
2826
|
-
var g = "deltaY" in h ? Zt(h) : Le(h), w = t.current.filter(function(y) {
|
|
2827
|
-
return y.name === h.type && y.target === h.target && _i(y.delta, g);
|
|
2828
|
-
})[0];
|
|
2829
|
-
if (w && w.should) {
|
|
2830
|
-
h.cancelable && h.preventDefault();
|
|
2831
|
-
return;
|
|
2832
|
-
}
|
|
2833
|
-
if (!w) {
|
|
2834
|
-
var b = (c.current.shards || []).map(Gt).filter(Boolean).filter(function(y) {
|
|
2835
|
-
return y.contains(h.target);
|
|
2836
|
-
}), $ = b.length > 0 ? s(h, b[0]) : !c.current.noIsolation;
|
|
2837
|
-
$ && h.cancelable && h.preventDefault();
|
|
2838
|
-
}
|
|
2839
|
-
}
|
|
2840
|
-
}, []), u = x.useCallback(function(p, h, g, w) {
|
|
2841
|
-
var b = { name: p, delta: h, target: g, should: w };
|
|
2842
|
-
t.current.push(b), setTimeout(function() {
|
|
2843
|
-
t.current = t.current.filter(function($) {
|
|
2844
|
-
return $ !== b;
|
|
2845
|
-
});
|
|
2846
|
-
}, 1);
|
|
2847
|
-
}, []), f = x.useCallback(function(p) {
|
|
2848
|
-
n.current = Le(p), o.current = void 0;
|
|
2849
|
-
}, []), l = x.useCallback(function(p) {
|
|
2850
|
-
u(p.type, Zt(p), p.target, s(p, e.lockRef.current));
|
|
2851
|
-
}, []), v = x.useCallback(function(p) {
|
|
2852
|
-
u(p.type, Le(p), p.target, s(p, e.lockRef.current));
|
|
2853
|
-
}, []);
|
|
2854
|
-
x.useEffect(function() {
|
|
2855
|
-
return pe.push(i), e.setCallbacks({
|
|
2856
|
-
onScrollCapture: l,
|
|
2857
|
-
onWheelCapture: l,
|
|
2858
|
-
onTouchMoveCapture: v
|
|
2859
|
-
}), document.addEventListener("wheel", a, de), document.addEventListener("touchmove", a, de), document.addEventListener("touchstart", f, de), function() {
|
|
2860
|
-
pe = pe.filter(function(p) {
|
|
2861
|
-
return p !== i;
|
|
2862
|
-
}), document.removeEventListener("wheel", a, de), document.removeEventListener("touchmove", a, de), document.removeEventListener("touchstart", f, de);
|
|
2863
|
-
};
|
|
2864
|
-
}, []);
|
|
2865
|
-
var d = e.removeScrollBar, m = e.inert;
|
|
2866
|
-
return x.createElement(
|
|
2867
|
-
x.Fragment,
|
|
2868
|
-
null,
|
|
2869
|
-
m ? x.createElement(i, { styles: Ni(r) }) : null,
|
|
2870
|
-
d ? x.createElement(Ci, { gapMode: "margin" }) : null
|
|
2871
|
-
);
|
|
2872
|
-
}
|
|
2873
|
-
const Mi = fi(Sn, Li);
|
|
2874
|
-
var _n = x.forwardRef(function(e, t) {
|
|
2875
|
-
return x.createElement(Xe, Z({}, e, { ref: t, sideCar: Mi }));
|
|
2876
|
-
});
|
|
2877
|
-
_n.classNames = Xe.classNames;
|
|
2878
|
-
const ki = _n, Nn = "Popover", [Fn, ac] = oo(Nn, [
|
|
2879
|
-
$n
|
|
2880
|
-
]), Pt = $n(), [Ii, $e] = Fn(Nn), Wi = (e) => {
|
|
2881
|
-
const { __scopePopover: t, children: n, open: o, defaultOpen: r, onOpenChange: i, modal: c = !1 } = e, s = Pt(t), a = M(null), [u, f] = j(!1), [l = !1, v] = Gr({
|
|
2882
|
-
prop: o,
|
|
2883
|
-
defaultProp: r,
|
|
2884
|
-
onChange: i
|
|
2885
|
-
});
|
|
2886
|
-
return /* @__PURE__ */ P(Vr, s, /* @__PURE__ */ P(Ii, {
|
|
2887
|
-
scope: t,
|
|
2888
|
-
contentId: Ro(),
|
|
2889
|
-
triggerRef: a,
|
|
2890
|
-
open: l,
|
|
2891
|
-
onOpenChange: v,
|
|
2892
|
-
onOpenToggle: oe(
|
|
2893
|
-
() => v(
|
|
2894
|
-
(d) => !d
|
|
2895
|
-
),
|
|
2896
|
-
[
|
|
2897
|
-
v
|
|
2898
|
-
]
|
|
2899
|
-
),
|
|
2900
|
-
hasCustomAnchor: u,
|
|
2901
|
-
onCustomAnchorAdd: oe(
|
|
2902
|
-
() => f(!0),
|
|
2903
|
-
[]
|
|
2904
|
-
),
|
|
2905
|
-
onCustomAnchorRemove: oe(
|
|
2906
|
-
() => f(!1),
|
|
2907
|
-
[]
|
|
2908
|
-
),
|
|
2909
|
-
modal: c
|
|
2910
|
-
}, n));
|
|
2911
|
-
}, Bi = "PopoverTrigger", Hi = /* @__PURE__ */ k((e, t) => {
|
|
2912
|
-
const { __scopePopover: n, ...o } = e, r = $e(Bi, n), i = Pt(n), c = Pe(t, r.triggerRef), s = /* @__PURE__ */ P(Ve.button, F({
|
|
2913
|
-
type: "button",
|
|
2914
|
-
"aria-haspopup": "dialog",
|
|
2915
|
-
"aria-expanded": r.open,
|
|
2916
|
-
"aria-controls": r.contentId,
|
|
2917
|
-
"data-state": kn(r.open)
|
|
2918
|
-
}, o, {
|
|
2919
|
-
ref: c,
|
|
2920
|
-
onClick: ae(e.onClick, r.onOpenToggle)
|
|
2921
|
-
}));
|
|
2922
|
-
return r.hasCustomAnchor ? s : /* @__PURE__ */ P(jr, F({
|
|
2923
|
-
asChild: !0
|
|
2924
|
-
}, i), s);
|
|
2925
|
-
}), Ln = "PopoverPortal", [Ui, zi] = Fn(Ln, {
|
|
2926
|
-
forceMount: void 0
|
|
2927
|
-
}), Vi = (e) => {
|
|
2928
|
-
const { __scopePopover: t, forceMount: n, children: o, container: r } = e, i = $e(Ln, t);
|
|
2929
|
-
return /* @__PURE__ */ P(Ui, {
|
|
2930
|
-
scope: t,
|
|
2931
|
-
forceMount: n
|
|
2932
|
-
}, /* @__PURE__ */ P(Ct, {
|
|
2933
|
-
present: n || i.open
|
|
2934
|
-
}, /* @__PURE__ */ P(Yr, {
|
|
2935
|
-
asChild: !0,
|
|
2936
|
-
container: r
|
|
2937
|
-
}, o)));
|
|
2938
|
-
}, Ee = "PopoverContent", ji = /* @__PURE__ */ k((e, t) => {
|
|
2939
|
-
const n = zi(Ee, e.__scopePopover), { forceMount: o = n.forceMount, ...r } = e, i = $e(Ee, e.__scopePopover);
|
|
2940
|
-
return /* @__PURE__ */ P(Ct, {
|
|
2941
|
-
present: o || i.open
|
|
2942
|
-
}, i.modal ? /* @__PURE__ */ P(Ki, F({}, r, {
|
|
2943
|
-
ref: t
|
|
2944
|
-
})) : /* @__PURE__ */ P(Yi, F({}, r, {
|
|
2945
|
-
ref: t
|
|
2946
|
-
})));
|
|
2947
|
-
}), Ki = /* @__PURE__ */ k((e, t) => {
|
|
2948
|
-
const n = $e(Ee, e.__scopePopover), o = M(null), r = Pe(t, o), i = M(!1);
|
|
2949
|
-
return N(() => {
|
|
2950
|
-
const c = o.current;
|
|
2951
|
-
if (c)
|
|
2952
|
-
return ti(c);
|
|
2953
|
-
}, []), /* @__PURE__ */ P(ki, {
|
|
2954
|
-
as: ht,
|
|
2955
|
-
allowPinchZoom: !0
|
|
2956
|
-
}, /* @__PURE__ */ P(Mn, F({}, e, {
|
|
2957
|
-
ref: r,
|
|
2958
|
-
trapFocus: n.open,
|
|
2959
|
-
disableOutsidePointerEvents: !0,
|
|
2960
|
-
onCloseAutoFocus: ae(e.onCloseAutoFocus, (c) => {
|
|
2961
|
-
var s;
|
|
2962
|
-
c.preventDefault(), i.current || (s = n.triggerRef.current) === null || s === void 0 || s.focus();
|
|
2963
|
-
}),
|
|
2964
|
-
onPointerDownOutside: ae(e.onPointerDownOutside, (c) => {
|
|
2965
|
-
const s = c.detail.originalEvent, a = s.button === 0 && s.ctrlKey === !0, u = s.button === 2 || a;
|
|
2966
|
-
i.current = u;
|
|
2967
|
-
}, {
|
|
2968
|
-
checkForDefaultPrevented: !1
|
|
2969
|
-
}),
|
|
2970
|
-
onFocusOutside: ae(
|
|
2971
|
-
e.onFocusOutside,
|
|
2972
|
-
(c) => c.preventDefault(),
|
|
2973
|
-
{
|
|
2974
|
-
checkForDefaultPrevented: !1
|
|
2975
|
-
}
|
|
2976
|
-
)
|
|
2977
|
-
})));
|
|
2978
|
-
}), Yi = /* @__PURE__ */ k((e, t) => {
|
|
2979
|
-
const n = $e(Ee, e.__scopePopover), o = M(!1), r = M(!1);
|
|
2980
|
-
return /* @__PURE__ */ P(Mn, F({}, e, {
|
|
2981
|
-
ref: t,
|
|
2982
|
-
trapFocus: !1,
|
|
2983
|
-
disableOutsidePointerEvents: !1,
|
|
2984
|
-
onCloseAutoFocus: (i) => {
|
|
2985
|
-
var c;
|
|
2986
|
-
if ((c = e.onCloseAutoFocus) === null || c === void 0 || c.call(e, i), !i.defaultPrevented) {
|
|
2987
|
-
var s;
|
|
2988
|
-
o.current || (s = n.triggerRef.current) === null || s === void 0 || s.focus(), i.preventDefault();
|
|
2989
|
-
}
|
|
2990
|
-
o.current = !1, r.current = !1;
|
|
2991
|
-
},
|
|
2992
|
-
onInteractOutside: (i) => {
|
|
2993
|
-
var c, s;
|
|
2994
|
-
(c = e.onInteractOutside) === null || c === void 0 || c.call(e, i), i.defaultPrevented || (o.current = !0, i.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
2995
|
-
const a = i.target;
|
|
2996
|
-
((s = n.triggerRef.current) === null || s === void 0 ? void 0 : s.contains(a)) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && r.current && i.preventDefault();
|
|
2997
|
-
}
|
|
2998
|
-
}));
|
|
2999
|
-
}), Mn = /* @__PURE__ */ k((e, t) => {
|
|
3000
|
-
const { __scopePopover: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: i, disableOutsidePointerEvents: c, onEscapeKeyDown: s, onPointerDownOutside: a, onFocusOutside: u, onInteractOutside: f, ...l } = e, v = $e(Ee, n), d = Pt(n);
|
|
3001
|
-
return bo(), /* @__PURE__ */ P($o, {
|
|
3002
|
-
asChild: !0,
|
|
3003
|
-
loop: !0,
|
|
3004
|
-
trapped: o,
|
|
3005
|
-
onMountAutoFocus: r,
|
|
3006
|
-
onUnmountAutoFocus: i
|
|
3007
|
-
}, /* @__PURE__ */ P(ho, {
|
|
3008
|
-
asChild: !0,
|
|
3009
|
-
disableOutsidePointerEvents: c,
|
|
3010
|
-
onInteractOutside: f,
|
|
3011
|
-
onEscapeKeyDown: s,
|
|
3012
|
-
onPointerDownOutside: a,
|
|
3013
|
-
onFocusOutside: u,
|
|
3014
|
-
onDismiss: () => v.onOpenChange(!1)
|
|
3015
|
-
}, /* @__PURE__ */ P(Kr, F({
|
|
3016
|
-
"data-state": kn(v.open),
|
|
3017
|
-
role: "dialog",
|
|
3018
|
-
id: v.contentId
|
|
3019
|
-
}, d, l, {
|
|
3020
|
-
ref: t,
|
|
3021
|
-
style: {
|
|
3022
|
-
...l.style,
|
|
3023
|
-
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
3024
|
-
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
3025
|
-
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
3026
|
-
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
3027
|
-
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
3028
|
-
}
|
|
3029
|
-
}))));
|
|
3030
|
-
});
|
|
3031
|
-
function kn(e) {
|
|
3032
|
-
return e ? "open" : "closed";
|
|
3033
|
-
}
|
|
3034
|
-
const Xi = Wi, Zi = Hi, Gi = Vi, qi = ji, Qi = "_slideDownAndFade_18ma9_1", Ji = "_slideLeftAndFade_18ma9_1", ec = "_slideUpAndFade_18ma9_1", tc = "_slideRightAndFade_18ma9_1", nc = {
|
|
3035
|
-
"rp-popover-content": "_rp-popover-content_18ma9_1",
|
|
3036
|
-
slideDownAndFade: Qi,
|
|
3037
|
-
slideLeftAndFade: Ji,
|
|
3038
|
-
slideUpAndFade: ec,
|
|
3039
|
-
slideRightAndFade: tc,
|
|
3040
|
-
"rp-popover-arrow": "_rp-popover-arrow_18ma9_31"
|
|
3041
|
-
}, lc = (e) => {
|
|
3042
|
-
const { triggerComponent: t, children: n, container: o, className: r, open: i, ...c } = e;
|
|
3043
|
-
return /* @__PURE__ */ qn(Xi, { modal: !1, open: i, children: [
|
|
3044
|
-
/* @__PURE__ */ Ge(Zi, { asChild: !0, children: t }),
|
|
3045
|
-
/* @__PURE__ */ Ge(Gi, { container: o, children: /* @__PURE__ */ Ge(
|
|
3046
|
-
qi,
|
|
3047
|
-
{
|
|
3048
|
-
tabIndex: 0,
|
|
3049
|
-
sideOffset: 8,
|
|
3050
|
-
align: "start",
|
|
3051
|
-
...c,
|
|
3052
|
-
className: to(nc["rp-popover-content"], r),
|
|
3053
|
-
children: n
|
|
3054
|
-
}
|
|
3055
|
-
) })
|
|
3056
|
-
] });
|
|
3057
|
-
};
|
|
3058
|
-
export {
|
|
3059
|
-
lc as U,
|
|
3060
|
-
F as _
|
|
3061
|
-
};
|