@krosoft/react 0.0.85 → 0.0.87

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