@cfx-dev/ui-components 4.2.18 → 4.2.19

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.
@@ -1,44 +1,121 @@
1
- import { jsx as d, Fragment as He, jsxs as it } from "react/jsx-runtime";
1
+ import { jsx as v, Fragment as Ye, jsxs as ct } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
- import $n, { useState as Ct, useRef as Bn, useEffect as Kn } from "react";
4
- import { c as fe, u as k, d as S, b as Re, a as bt } from "../../index-AweK2ufS.js";
5
- import { c as Y, a as Gn, b as Ce, u as St } from "../../index-Cf5Yu9oD.js";
6
- import { r as zn } from "../../index-2hJuj4UN.js";
7
- import { u as Rt } from "../../index-ByaXH_ih.js";
8
- import { u as Vn, a as Hn, b as Yn, o as Xn, s as jn, l as Zn, f as Qn, c as qn, d as Jn, h as er, e as We, g as tr, i as nr } from "../../index-Bz27DCHt.js";
9
- import { _ as H, f as Mt, c as rr } from "../../tslib.es6-CBKHJX9H.js";
10
- import { Icon as or } from "../Icon/Icon.js";
11
- import { Flex as ar } from "../Layout/Flex/Flex.js";
12
- import { ui as ct } from "../ui.js";
13
- import { clsx as st } from "../../utils/clsx.js";
14
- import { mergeRefs as ir } from "../../utils/mergeRefs.js";
15
- var Pt = a.forwardRef((e, t) => {
16
- const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(sr);
3
+ import jn, { useState as Pt, useRef as Xn, useEffect as Hn } from "react";
4
+ import { c as j, a as Zn, b as be, u as Mt } from "../../index-Cf5Yu9oD.js";
5
+ import { r as Qn } from "../../index-2hJuj4UN.js";
6
+ import { c as xt } from "../../index-CjTSD6zB.js";
7
+ import { u as Nt } from "../../index-ByaXH_ih.js";
8
+ import { u as qn, a as Jn, b as er, o as tr, s as nr, l as rr, f as or, c as ar, d as ir, h as cr, i as $e, g as sr, e as ur } from "../../index-DBus3GoO.js";
9
+ import { _ as Y, f as It, c as lr } from "../../tslib.es6-CBKHJX9H.js";
10
+ import { Icon as dr } from "../Icon/Icon.js";
11
+ import { Flex as fr } from "../Layout/Flex/Flex.js";
12
+ import { ui as st } from "../ui.js";
13
+ import { clsx as ut } from "../../utils/clsx.js";
14
+ import { mergeRefs as pr } from "../../utils/mergeRefs.js";
15
+ function Se(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
16
+ return function(o) {
17
+ if (e == null || e(o), n === !1 || !o.defaultPrevented)
18
+ return t == null ? void 0 : t(o);
19
+ };
20
+ }
21
+ function lt(e, t) {
22
+ if (typeof e == "function")
23
+ return e(t);
24
+ e != null && (e.current = t);
25
+ }
26
+ function At(...e) {
27
+ return (t) => {
28
+ let n = !1;
29
+ const r = e.map((o) => {
30
+ const i = lt(o, t);
31
+ return !n && typeof i == "function" && (n = !0), i;
32
+ });
33
+ if (n)
34
+ return () => {
35
+ for (let o = 0; o < r.length; o++) {
36
+ const i = r[o];
37
+ typeof i == "function" ? i() : lt(e[o], null);
38
+ }
39
+ };
40
+ };
41
+ }
42
+ function mr(e, t = []) {
43
+ let n = [];
44
+ function r(i, s) {
45
+ const c = a.createContext(s), l = n.length;
46
+ n = [...n, s];
47
+ const u = (f) => {
48
+ var w;
49
+ const { scope: m, children: g, ...h } = f, d = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[l]) || c, C = a.useMemo(() => h, Object.values(h));
50
+ return /* @__PURE__ */ v(d.Provider, { value: C, children: g });
51
+ };
52
+ u.displayName = i + "Provider";
53
+ function p(f, m) {
54
+ var d;
55
+ const g = ((d = m == null ? void 0 : m[e]) == null ? void 0 : d[l]) || c, h = a.useContext(g);
56
+ if (h) return h;
57
+ if (s !== void 0) return s;
58
+ throw new Error(`\`${f}\` must be used within \`${i}\``);
59
+ }
60
+ return [u, p];
61
+ }
62
+ const o = () => {
63
+ const i = n.map((s) => a.createContext(s));
64
+ return function(c) {
65
+ const l = (c == null ? void 0 : c[e]) || i;
66
+ return a.useMemo(
67
+ () => ({ [`__scope${e}`]: { ...c, [e]: l } }),
68
+ [c, l]
69
+ );
70
+ };
71
+ };
72
+ return o.scopeName = e, [r, vr(o, ...t)];
73
+ }
74
+ function vr(...e) {
75
+ const t = e[0];
76
+ if (e.length === 1) return t;
77
+ const n = () => {
78
+ const r = e.map((o) => ({
79
+ useScope: o(),
80
+ scopeName: o.scopeName
81
+ }));
82
+ return function(i) {
83
+ const s = r.reduce((c, { useScope: l, scopeName: u }) => {
84
+ const f = l(i)[`__scope${u}`];
85
+ return { ...c, ...f };
86
+ }, {});
87
+ return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
88
+ };
89
+ };
90
+ return n.scopeName = t.scopeName, n;
91
+ }
92
+ var Dt = a.forwardRef((e, t) => {
93
+ const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(gr);
17
94
  if (i) {
18
- const s = i.props.children, c = o.map((f) => f === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : f);
19
- return /* @__PURE__ */ d(Ue, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
95
+ const s = i.props.children, c = o.map((l) => l === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : l);
96
+ return /* @__PURE__ */ v(We, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
20
97
  }
21
- return /* @__PURE__ */ d(Ue, { ...r, ref: t, children: n });
98
+ return /* @__PURE__ */ v(We, { ...r, ref: t, children: n });
22
99
  });
23
- Pt.displayName = "Slot";
24
- var Ue = a.forwardRef((e, t) => {
100
+ Dt.displayName = "Slot";
101
+ var We = a.forwardRef((e, t) => {
25
102
  const { children: n, ...r } = e;
26
103
  if (a.isValidElement(n)) {
27
- const o = lr(n);
104
+ const o = Cr(n);
28
105
  return a.cloneElement(n, {
29
- ...ur(r, n.props),
106
+ ...wr(r, n.props),
30
107
  // @ts-ignore
31
- ref: t ? fe(t, o) : o
108
+ ref: t ? At(t, o) : o
32
109
  });
33
110
  }
34
111
  return a.Children.count(n) > 1 ? a.Children.only(null) : null;
35
112
  });
36
- Ue.displayName = "SlotClone";
37
- var cr = ({ children: e }) => /* @__PURE__ */ d(He, { children: e });
38
- function sr(e) {
39
- return a.isValidElement(e) && e.type === cr;
113
+ We.displayName = "SlotClone";
114
+ var hr = ({ children: e }) => /* @__PURE__ */ v(Ye, { children: e });
115
+ function gr(e) {
116
+ return a.isValidElement(e) && e.type === hr;
40
117
  }
41
- function ur(e, t) {
118
+ function wr(e, t) {
42
119
  const n = { ...t };
43
120
  for (const r in t) {
44
121
  const o = e[r], i = t[r];
@@ -48,12 +125,12 @@ function ur(e, t) {
48
125
  }
49
126
  return { ...e, ...n };
50
127
  }
51
- function lr(e) {
128
+ function Cr(e) {
52
129
  var r, o;
53
130
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
54
131
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
55
132
  }
56
- var dr = [
133
+ var yr = [
57
134
  "a",
58
135
  "button",
59
136
  "div",
@@ -70,39 +147,120 @@ var dr = [
70
147
  "span",
71
148
  "svg",
72
149
  "ul"
73
- ], fr = dr.reduce((e, t) => {
150
+ ], _r = yr.reduce((e, t) => {
74
151
  const n = a.forwardRef((r, o) => {
75
- const { asChild: i, ...s } = r, c = i ? Pt : t;
76
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...s, ref: o });
152
+ const { asChild: i, ...s } = r, c = i ? Dt : t;
153
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(c, { ...s, ref: o });
77
154
  });
78
155
  return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
79
- }, {}), Ye = a.forwardRef((e, t) => {
80
- const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(mr);
156
+ }, {});
157
+ function M(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
158
+ return function(o) {
159
+ if (e == null || e(o), n === !1 || !o.defaultPrevented)
160
+ return t == null ? void 0 : t(o);
161
+ };
162
+ }
163
+ function dt(e, t) {
164
+ if (typeof e == "function")
165
+ return e(t);
166
+ e != null && (e.current = t);
167
+ }
168
+ function je(...e) {
169
+ return (t) => {
170
+ let n = !1;
171
+ const r = e.map((o) => {
172
+ const i = dt(o, t);
173
+ return !n && typeof i == "function" && (n = !0), i;
174
+ });
175
+ if (n)
176
+ return () => {
177
+ for (let o = 0; o < r.length; o++) {
178
+ const i = r[o];
179
+ typeof i == "function" ? i() : dt(e[o], null);
180
+ }
181
+ };
182
+ };
183
+ }
184
+ function $(...e) {
185
+ return a.useCallback(je(...e), e);
186
+ }
187
+ function Tt(e, t = []) {
188
+ let n = [];
189
+ function r(i, s) {
190
+ const c = a.createContext(s), l = n.length;
191
+ n = [...n, s];
192
+ const u = (f) => {
193
+ var w;
194
+ const { scope: m, children: g, ...h } = f, d = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[l]) || c, C = a.useMemo(() => h, Object.values(h));
195
+ return /* @__PURE__ */ v(d.Provider, { value: C, children: g });
196
+ };
197
+ u.displayName = i + "Provider";
198
+ function p(f, m) {
199
+ var d;
200
+ const g = ((d = m == null ? void 0 : m[e]) == null ? void 0 : d[l]) || c, h = a.useContext(g);
201
+ if (h) return h;
202
+ if (s !== void 0) return s;
203
+ throw new Error(`\`${f}\` must be used within \`${i}\``);
204
+ }
205
+ return [u, p];
206
+ }
207
+ const o = () => {
208
+ const i = n.map((s) => a.createContext(s));
209
+ return function(c) {
210
+ const l = (c == null ? void 0 : c[e]) || i;
211
+ return a.useMemo(
212
+ () => ({ [`__scope${e}`]: { ...c, [e]: l } }),
213
+ [c, l]
214
+ );
215
+ };
216
+ };
217
+ return o.scopeName = e, [r, br(o, ...t)];
218
+ }
219
+ function br(...e) {
220
+ const t = e[0];
221
+ if (e.length === 1) return t;
222
+ const n = () => {
223
+ const r = e.map((o) => ({
224
+ useScope: o(),
225
+ scopeName: o.scopeName
226
+ }));
227
+ return function(i) {
228
+ const s = r.reduce((c, { useScope: l, scopeName: u }) => {
229
+ const f = l(i)[`__scope${u}`];
230
+ return { ...c, ...f };
231
+ }, {});
232
+ return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
233
+ };
234
+ };
235
+ return n.scopeName = t.scopeName, n;
236
+ }
237
+ var Xe = a.forwardRef((e, t) => {
238
+ const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(Er);
81
239
  if (i) {
82
- const s = i.props.children, c = o.map((f) => f === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : f);
83
- return /* @__PURE__ */ d($e, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
240
+ const s = i.props.children, c = o.map((l) => l === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : l);
241
+ return /* @__PURE__ */ v(Be, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
84
242
  }
85
- return /* @__PURE__ */ d($e, { ...r, ref: t, children: n });
243
+ return /* @__PURE__ */ v(Be, { ...r, ref: t, children: n });
86
244
  });
87
- Ye.displayName = "Slot";
88
- var $e = a.forwardRef((e, t) => {
245
+ Xe.displayName = "Slot";
246
+ var Be = a.forwardRef((e, t) => {
89
247
  const { children: n, ...r } = e;
90
248
  if (a.isValidElement(n)) {
91
- const o = hr(n);
249
+ const o = Pr(n);
92
250
  return a.cloneElement(n, {
93
- ...vr(r, n.props),
251
+ ...Rr(r, n.props),
94
252
  // @ts-ignore
95
- ref: t ? fe(t, o) : o
253
+ ref: t ? je(t, o) : o
96
254
  });
97
255
  }
98
256
  return a.Children.count(n) > 1 ? a.Children.only(null) : null;
99
257
  });
100
- $e.displayName = "SlotClone";
101
- var pr = ({ children: e }) => /* @__PURE__ */ d(He, { children: e });
102
- function mr(e) {
103
- return a.isValidElement(e) && e.type === pr;
258
+ Be.displayName = "SlotClone";
259
+ var Sr = ({ children: e }) => /* @__PURE__ */ v(Ye, { children: e });
260
+ function Er(e) {
261
+ return a.isValidElement(e) && e.type === Sr;
104
262
  }
105
- function vr(e, t) {
263
+ function Rr(e, t) {
106
264
  const n = { ...t };
107
265
  for (const r in t) {
108
266
  const o = e[r], i = t[r];
@@ -112,12 +270,12 @@ function vr(e, t) {
112
270
  }
113
271
  return { ...e, ...n };
114
272
  }
115
- function hr(e) {
273
+ function Pr(e) {
116
274
  var r, o;
117
275
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
118
276
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
119
277
  }
120
- var gr = [
278
+ var Mr = [
121
279
  "a",
122
280
  "button",
123
281
  "div",
@@ -134,21 +292,21 @@ var gr = [
134
292
  "span",
135
293
  "svg",
136
294
  "ul"
137
- ], U = gr.reduce((e, t) => {
295
+ ], W = Mr.reduce((e, t) => {
138
296
  const n = a.forwardRef((r, o) => {
139
- const { asChild: i, ...s } = r, c = i ? Ye : t;
140
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...s, ref: o });
297
+ const { asChild: i, ...s } = r, c = i ? Xe : t;
298
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(c, { ...s, ref: o });
141
299
  });
142
300
  return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
143
301
  }, {});
144
- function xt(e, t) {
145
- e && zn.flushSync(() => e.dispatchEvent(t));
302
+ function Ot(e, t) {
303
+ e && Qn.flushSync(() => e.dispatchEvent(t));
146
304
  }
147
- var wr = "DismissableLayer", Be = "dismissableLayer.update", Er = "dismissableLayer.pointerDownOutside", yr = "dismissableLayer.focusOutside", ut, Nt = a.createContext({
305
+ var xr = "DismissableLayer", Ue = "dismissableLayer.update", Nr = "dismissableLayer.pointerDownOutside", Ir = "dismissableLayer.focusOutside", ft, Ft = a.createContext({
148
306
  layers: /* @__PURE__ */ new Set(),
149
307
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
150
308
  branches: /* @__PURE__ */ new Set()
151
- }), It = a.forwardRef(
309
+ }), Lt = a.forwardRef(
152
310
  (e, t) => {
153
311
  const {
154
312
  disableOutsidePointerEvents: n = !1,
@@ -157,73 +315,73 @@ var wr = "DismissableLayer", Be = "dismissableLayer.update", Er = "dismissableLa
157
315
  onFocusOutside: i,
158
316
  onInteractOutside: s,
159
317
  onDismiss: c,
160
- ...f
161
- } = e, u = a.useContext(Nt), [p, m] = a.useState(null), v = (p == null ? void 0 : p.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, w] = a.useState({}), h = k(t, (b) => m(b)), l = Array.from(u.layers), [E] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), g = l.indexOf(E), _ = p ? l.indexOf(p) : -1, C = u.layersWithOutsidePointerEventsDisabled.size > 0, R = _ >= g, M = br((b) => {
162
- const P = b.target, I = [...u.branches].some((T) => T.contains(P));
163
- !R || I || (o == null || o(b), s == null || s(b), b.defaultPrevented || c == null || c());
164
- }, v), x = Sr((b) => {
165
- const P = b.target;
166
- [...u.branches].some((T) => T.contains(P)) || (i == null || i(b), s == null || s(b), b.defaultPrevented || c == null || c());
167
- }, v);
168
- return Vn((b) => {
169
- _ === u.layers.size - 1 && (r == null || r(b), !b.defaultPrevented && c && (b.preventDefault(), c()));
170
- }, v), a.useEffect(() => {
318
+ ...l
319
+ } = e, u = a.useContext(Ft), [p, f] = a.useState(null), m = (p == null ? void 0 : p.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = a.useState({}), h = $(t, (S) => f(S)), d = Array.from(u.layers), [C] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), w = d.indexOf(C), _ = p ? d.indexOf(p) : -1, b = u.layersWithOutsidePointerEventsDisabled.size > 0, E = _ >= w, R = Tr((S) => {
320
+ const P = S.target, I = [...u.branches].some((T) => T.contains(P));
321
+ !E || I || (o == null || o(S), s == null || s(S), S.defaultPrevented || c == null || c());
322
+ }, m), x = Or((S) => {
323
+ const P = S.target;
324
+ [...u.branches].some((T) => T.contains(P)) || (i == null || i(S), s == null || s(S), S.defaultPrevented || c == null || c());
325
+ }, m);
326
+ return qn((S) => {
327
+ _ === u.layers.size - 1 && (r == null || r(S), !S.defaultPrevented && c && (S.preventDefault(), c()));
328
+ }, m), a.useEffect(() => {
171
329
  if (p)
172
- return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (ut = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(p)), u.layers.add(p), lt(), () => {
173
- n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = ut);
330
+ return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (ft = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(p)), u.layers.add(p), pt(), () => {
331
+ n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = ft);
174
332
  };
175
- }, [p, v, n, u]), a.useEffect(() => () => {
176
- p && (u.layers.delete(p), u.layersWithOutsidePointerEventsDisabled.delete(p), lt());
333
+ }, [p, m, n, u]), a.useEffect(() => () => {
334
+ p && (u.layers.delete(p), u.layersWithOutsidePointerEventsDisabled.delete(p), pt());
177
335
  }, [p, u]), a.useEffect(() => {
178
- const b = () => w({});
179
- return document.addEventListener(Be, b), () => document.removeEventListener(Be, b);
180
- }, []), /* @__PURE__ */ d(
181
- U.div,
336
+ const S = () => g({});
337
+ return document.addEventListener(Ue, S), () => document.removeEventListener(Ue, S);
338
+ }, []), /* @__PURE__ */ v(
339
+ W.div,
182
340
  {
183
- ...f,
341
+ ...l,
184
342
  ref: h,
185
343
  style: {
186
- pointerEvents: C ? R ? "auto" : "none" : void 0,
344
+ pointerEvents: b ? E ? "auto" : "none" : void 0,
187
345
  ...e.style
188
346
  },
189
- onFocusCapture: S(e.onFocusCapture, x.onFocusCapture),
190
- onBlurCapture: S(e.onBlurCapture, x.onBlurCapture),
191
- onPointerDownCapture: S(
347
+ onFocusCapture: M(e.onFocusCapture, x.onFocusCapture),
348
+ onBlurCapture: M(e.onBlurCapture, x.onBlurCapture),
349
+ onPointerDownCapture: M(
192
350
  e.onPointerDownCapture,
193
- M.onPointerDownCapture
351
+ R.onPointerDownCapture
194
352
  )
195
353
  }
196
354
  );
197
355
  }
198
356
  );
199
- It.displayName = wr;
200
- var _r = "DismissableLayerBranch", Cr = a.forwardRef((e, t) => {
201
- const n = a.useContext(Nt), r = a.useRef(null), o = k(t, r);
357
+ Lt.displayName = xr;
358
+ var Ar = "DismissableLayerBranch", Dr = a.forwardRef((e, t) => {
359
+ const n = a.useContext(Ft), r = a.useRef(null), o = $(t, r);
202
360
  return a.useEffect(() => {
203
361
  const i = r.current;
204
362
  if (i)
205
363
  return n.branches.add(i), () => {
206
364
  n.branches.delete(i);
207
365
  };
208
- }, [n.branches]), /* @__PURE__ */ d(U.div, { ...e, ref: o });
366
+ }, [n.branches]), /* @__PURE__ */ v(W.div, { ...e, ref: o });
209
367
  });
210
- Cr.displayName = _r;
211
- function br(e, t = globalThis == null ? void 0 : globalThis.document) {
212
- const n = Y(e), r = a.useRef(!1), o = a.useRef(() => {
368
+ Dr.displayName = Ar;
369
+ function Tr(e, t = globalThis == null ? void 0 : globalThis.document) {
370
+ const n = j(e), r = a.useRef(!1), o = a.useRef(() => {
213
371
  });
214
372
  return a.useEffect(() => {
215
373
  const i = (c) => {
216
374
  if (c.target && !r.current) {
217
- let f = function() {
218
- At(
219
- Er,
375
+ let l = function() {
376
+ kt(
377
+ Nr,
220
378
  n,
221
379
  u,
222
380
  { discrete: !0 }
223
381
  );
224
382
  };
225
383
  const u = { originalEvent: c };
226
- c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = f, t.addEventListener("click", o.current, { once: !0 })) : f();
384
+ c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = l, t.addEventListener("click", o.current, { once: !0 })) : l();
227
385
  } else
228
386
  t.removeEventListener("click", o.current);
229
387
  r.current = !1;
@@ -238,11 +396,11 @@ function br(e, t = globalThis == null ? void 0 : globalThis.document) {
238
396
  onPointerDownCapture: () => r.current = !0
239
397
  };
240
398
  }
241
- function Sr(e, t = globalThis == null ? void 0 : globalThis.document) {
242
- const n = Y(e), r = a.useRef(!1);
399
+ function Or(e, t = globalThis == null ? void 0 : globalThis.document) {
400
+ const n = j(e), r = a.useRef(!1);
243
401
  return a.useEffect(() => {
244
402
  const o = (i) => {
245
- i.target && !r.current && At(yr, n, { originalEvent: i }, {
403
+ i.target && !r.current && kt(Ir, n, { originalEvent: i }, {
246
404
  discrete: !1
247
405
  });
248
406
  };
@@ -252,35 +410,35 @@ function Sr(e, t = globalThis == null ? void 0 : globalThis.document) {
252
410
  onBlurCapture: () => r.current = !1
253
411
  };
254
412
  }
255
- function lt() {
256
- const e = new CustomEvent(Be);
413
+ function pt() {
414
+ const e = new CustomEvent(Ue);
257
415
  document.dispatchEvent(e);
258
416
  }
259
- function At(e, t, n, { discrete: r }) {
417
+ function kt(e, t, n, { discrete: r }) {
260
418
  const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
261
- t && o.addEventListener(e, t, { once: !0 }), r ? xt(o, i) : o.dispatchEvent(i);
419
+ t && o.addEventListener(e, t, { once: !0 }), r ? Ot(o, i) : o.dispatchEvent(i);
262
420
  }
263
421
  var Ae = 0;
264
- function Rr() {
422
+ function Fr() {
265
423
  a.useEffect(() => {
266
424
  const e = document.querySelectorAll("[data-radix-focus-guard]");
267
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? dt()), document.body.insertAdjacentElement("beforeend", e[1] ?? dt()), Ae++, () => {
425
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? mt()), document.body.insertAdjacentElement("beforeend", e[1] ?? mt()), Ae++, () => {
268
426
  Ae === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Ae--;
269
427
  };
270
428
  }, []);
271
429
  }
272
- function dt() {
430
+ function mt() {
273
431
  const e = document.createElement("span");
274
432
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
275
433
  }
276
- var De = "focusScope.autoFocusOnMount", Te = "focusScope.autoFocusOnUnmount", ft = { bubbles: !1, cancelable: !0 }, Mr = "FocusScope", Dt = a.forwardRef((e, t) => {
434
+ var De = "focusScope.autoFocusOnMount", Te = "focusScope.autoFocusOnUnmount", vt = { bubbles: !1, cancelable: !0 }, Lr = "FocusScope", $t = a.forwardRef((e, t) => {
277
435
  const {
278
436
  loop: n = !1,
279
437
  trapped: r = !1,
280
438
  onMountAutoFocus: o,
281
439
  onUnmountAutoFocus: i,
282
440
  ...s
283
- } = e, [c, f] = a.useState(null), u = Y(o), p = Y(i), m = a.useRef(null), v = k(t, (l) => f(l)), w = a.useRef({
441
+ } = e, [c, l] = a.useState(null), u = j(o), p = j(i), f = a.useRef(null), m = $(t, (d) => l(d)), g = a.useRef({
284
442
  paused: !1,
285
443
  pause() {
286
444
  this.paused = !0;
@@ -291,65 +449,65 @@ var De = "focusScope.autoFocusOnMount", Te = "focusScope.autoFocusOnUnmount", ft
291
449
  }).current;
292
450
  a.useEffect(() => {
293
451
  if (r) {
294
- let l = function(C) {
295
- if (w.paused || !c) return;
296
- const R = C.target;
297
- c.contains(R) ? m.current = R : V(m.current, { select: !0 });
298
- }, E = function(C) {
299
- if (w.paused || !c) return;
300
- const R = C.relatedTarget;
301
- R !== null && (c.contains(R) || V(m.current, { select: !0 }));
302
- }, g = function(C) {
452
+ let d = function(b) {
453
+ if (g.paused || !c) return;
454
+ const E = b.target;
455
+ c.contains(E) ? f.current = E : V(f.current, { select: !0 });
456
+ }, C = function(b) {
457
+ if (g.paused || !c) return;
458
+ const E = b.relatedTarget;
459
+ E !== null && (c.contains(E) || V(f.current, { select: !0 }));
460
+ }, w = function(b) {
303
461
  if (document.activeElement === document.body)
304
- for (const M of C)
305
- M.removedNodes.length > 0 && V(c);
462
+ for (const R of b)
463
+ R.removedNodes.length > 0 && V(c);
306
464
  };
307
- document.addEventListener("focusin", l), document.addEventListener("focusout", E);
308
- const _ = new MutationObserver(g);
465
+ document.addEventListener("focusin", d), document.addEventListener("focusout", C);
466
+ const _ = new MutationObserver(w);
309
467
  return c && _.observe(c, { childList: !0, subtree: !0 }), () => {
310
- document.removeEventListener("focusin", l), document.removeEventListener("focusout", E), _.disconnect();
468
+ document.removeEventListener("focusin", d), document.removeEventListener("focusout", C), _.disconnect();
311
469
  };
312
470
  }
313
- }, [r, c, w.paused]), a.useEffect(() => {
471
+ }, [r, c, g.paused]), a.useEffect(() => {
314
472
  if (c) {
315
- mt.add(w);
316
- const l = document.activeElement;
317
- if (!c.contains(l)) {
318
- const g = new CustomEvent(De, ft);
319
- c.addEventListener(De, u), c.dispatchEvent(g), g.defaultPrevented || (Pr(Dr(Tt(c)), { select: !0 }), document.activeElement === l && V(c));
473
+ gt.add(g);
474
+ const d = document.activeElement;
475
+ if (!c.contains(d)) {
476
+ const w = new CustomEvent(De, vt);
477
+ c.addEventListener(De, u), c.dispatchEvent(w), w.defaultPrevented || (kr(Kr(Wt(c)), { select: !0 }), document.activeElement === d && V(c));
320
478
  }
321
479
  return () => {
322
480
  c.removeEventListener(De, u), setTimeout(() => {
323
- const g = new CustomEvent(Te, ft);
324
- c.addEventListener(Te, p), c.dispatchEvent(g), g.defaultPrevented || V(l ?? document.body, { select: !0 }), c.removeEventListener(Te, p), mt.remove(w);
481
+ const w = new CustomEvent(Te, vt);
482
+ c.addEventListener(Te, p), c.dispatchEvent(w), w.defaultPrevented || V(d ?? document.body, { select: !0 }), c.removeEventListener(Te, p), gt.remove(g);
325
483
  }, 0);
326
484
  };
327
485
  }
328
- }, [c, u, p, w]);
486
+ }, [c, u, p, g]);
329
487
  const h = a.useCallback(
330
- (l) => {
331
- if (!n && !r || w.paused) return;
332
- const E = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, g = document.activeElement;
333
- if (E && g) {
334
- const _ = l.currentTarget, [C, R] = xr(_);
335
- C && R ? !l.shiftKey && g === R ? (l.preventDefault(), n && V(C, { select: !0 })) : l.shiftKey && g === C && (l.preventDefault(), n && V(R, { select: !0 })) : g === _ && l.preventDefault();
488
+ (d) => {
489
+ if (!n && !r || g.paused) return;
490
+ const C = d.key === "Tab" && !d.altKey && !d.ctrlKey && !d.metaKey, w = document.activeElement;
491
+ if (C && w) {
492
+ const _ = d.currentTarget, [b, E] = $r(_);
493
+ b && E ? !d.shiftKey && w === E ? (d.preventDefault(), n && V(b, { select: !0 })) : d.shiftKey && w === b && (d.preventDefault(), n && V(E, { select: !0 })) : w === _ && d.preventDefault();
336
494
  }
337
495
  },
338
- [n, r, w.paused]
496
+ [n, r, g.paused]
339
497
  );
340
- return /* @__PURE__ */ d(U.div, { tabIndex: -1, ...s, ref: v, onKeyDown: h });
498
+ return /* @__PURE__ */ v(W.div, { tabIndex: -1, ...s, ref: m, onKeyDown: h });
341
499
  });
342
- Dt.displayName = Mr;
343
- function Pr(e, { select: t = !1 } = {}) {
500
+ $t.displayName = Lr;
501
+ function kr(e, { select: t = !1 } = {}) {
344
502
  const n = document.activeElement;
345
503
  for (const r of e)
346
504
  if (V(r, { select: t }), document.activeElement !== n) return;
347
505
  }
348
- function xr(e) {
349
- const t = Tt(e), n = pt(t, e), r = pt(t.reverse(), e);
506
+ function $r(e) {
507
+ const t = Wt(e), n = ht(t, e), r = ht(t.reverse(), e);
350
508
  return [n, r];
351
509
  }
352
- function Tt(e) {
510
+ function Wt(e) {
353
511
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
354
512
  acceptNode: (r) => {
355
513
  const o = r.tagName === "INPUT" && r.type === "hidden";
@@ -359,11 +517,11 @@ function Tt(e) {
359
517
  for (; n.nextNode(); ) t.push(n.currentNode);
360
518
  return t;
361
519
  }
362
- function pt(e, t) {
520
+ function ht(e, t) {
363
521
  for (const n of e)
364
- if (!Nr(n, { upTo: t })) return n;
522
+ if (!Wr(n, { upTo: t })) return n;
365
523
  }
366
- function Nr(e, { upTo: t }) {
524
+ function Wr(e, { upTo: t }) {
367
525
  if (getComputedStyle(e).visibility === "hidden") return !0;
368
526
  for (; e; ) {
369
527
  if (t !== void 0 && e === t) return !1;
@@ -372,40 +530,40 @@ function Nr(e, { upTo: t }) {
372
530
  }
373
531
  return !1;
374
532
  }
375
- function Ir(e) {
533
+ function Br(e) {
376
534
  return e instanceof HTMLInputElement && "select" in e;
377
535
  }
378
536
  function V(e, { select: t = !1 } = {}) {
379
537
  if (e && e.focus) {
380
538
  const n = document.activeElement;
381
- e.focus({ preventScroll: !0 }), e !== n && Ir(e) && t && e.select();
539
+ e.focus({ preventScroll: !0 }), e !== n && Br(e) && t && e.select();
382
540
  }
383
541
  }
384
- var mt = Ar();
385
- function Ar() {
542
+ var gt = Ur();
543
+ function Ur() {
386
544
  let e = [];
387
545
  return {
388
546
  add(t) {
389
547
  const n = e[0];
390
- t !== n && (n == null || n.pause()), e = vt(e, t), e.unshift(t);
548
+ t !== n && (n == null || n.pause()), e = wt(e, t), e.unshift(t);
391
549
  },
392
550
  remove(t) {
393
551
  var n;
394
- e = vt(e, t), (n = e[0]) == null || n.resume();
552
+ e = wt(e, t), (n = e[0]) == null || n.resume();
395
553
  }
396
554
  };
397
555
  }
398
- function vt(e, t) {
556
+ function wt(e, t) {
399
557
  const n = [...e], r = n.indexOf(t);
400
558
  return r !== -1 && n.splice(r, 1), n;
401
559
  }
402
- function Dr(e) {
560
+ function Kr(e) {
403
561
  return e.filter((t) => t.tagName !== "A");
404
562
  }
405
- var Tr = "Arrow", Ot = a.forwardRef((e, t) => {
563
+ var Gr = "Arrow", Bt = a.forwardRef((e, t) => {
406
564
  const { children: n, width: r = 10, height: o = 5, ...i } = e;
407
- return /* @__PURE__ */ d(
408
- U.svg,
565
+ return /* @__PURE__ */ v(
566
+ W.svg,
409
567
  {
410
568
  ...i,
411
569
  ref: t,
@@ -413,28 +571,28 @@ var Tr = "Arrow", Ot = a.forwardRef((e, t) => {
413
571
  height: o,
414
572
  viewBox: "0 0 30 10",
415
573
  preserveAspectRatio: "none",
416
- children: e.asChild ? n : /* @__PURE__ */ d("polygon", { points: "0,0 30,0 15,10" })
574
+ children: e.asChild ? n : /* @__PURE__ */ v("polygon", { points: "0,0 30,0 15,10" })
417
575
  }
418
576
  );
419
577
  });
420
- Ot.displayName = Tr;
421
- var Or = Ot, Xe = "Popper", [Ft, Lt] = Re(Xe), [Fr, kt] = Ft(Xe), Wt = (e) => {
578
+ Bt.displayName = Gr;
579
+ var zr = Bt, He = "Popper", [Ut, Kt] = Tt(He), [Vr, Gt] = Ut(He), zt = (e) => {
422
580
  const { __scopePopper: t, children: n } = e, [r, o] = a.useState(null);
423
- return /* @__PURE__ */ d(Fr, { scope: t, anchor: r, onAnchorChange: o, children: n });
581
+ return /* @__PURE__ */ v(Vr, { scope: t, anchor: r, onAnchorChange: o, children: n });
424
582
  };
425
- Wt.displayName = Xe;
426
- var Ut = "PopperAnchor", $t = a.forwardRef(
583
+ zt.displayName = He;
584
+ var Vt = "PopperAnchor", Yt = a.forwardRef(
427
585
  (e, t) => {
428
- const { __scopePopper: n, virtualRef: r, ...o } = e, i = kt(Ut, n), s = a.useRef(null), c = k(t, s);
586
+ const { __scopePopper: n, virtualRef: r, ...o } = e, i = Gt(Vt, n), s = a.useRef(null), c = $(t, s);
429
587
  return a.useEffect(() => {
430
588
  i.onAnchorChange((r == null ? void 0 : r.current) || s.current);
431
- }), r ? null : /* @__PURE__ */ d(U.div, { ...o, ref: c });
589
+ }), r ? null : /* @__PURE__ */ v(W.div, { ...o, ref: c });
432
590
  }
433
591
  );
434
- $t.displayName = Ut;
435
- var je = "PopperContent", [Lr, kr] = Ft(je), Bt = a.forwardRef(
592
+ Yt.displayName = Vt;
593
+ var Ze = "PopperContent", [Yr, jr] = Ut(Ze), jt = a.forwardRef(
436
594
  (e, t) => {
437
- var K, ie, F, ce, rt, ot;
595
+ var K, ce, F, se, ot, at;
438
596
  const {
439
597
  __scopePopper: n,
440
598
  side: r = "bottom",
@@ -442,57 +600,57 @@ var je = "PopperContent", [Lr, kr] = Ft(je), Bt = a.forwardRef(
442
600
  align: i = "center",
443
601
  alignOffset: s = 0,
444
602
  arrowPadding: c = 0,
445
- avoidCollisions: f = !0,
603
+ avoidCollisions: l = !0,
446
604
  collisionBoundary: u = [],
447
605
  collisionPadding: p = 0,
448
- sticky: m = "partial",
449
- hideWhenDetached: v = !1,
450
- updatePositionStrategy: w = "optimized",
606
+ sticky: f = "partial",
607
+ hideWhenDetached: m = !1,
608
+ updatePositionStrategy: g = "optimized",
451
609
  onPlaced: h,
452
- ...l
453
- } = e, E = kt(je, n), [g, _] = a.useState(null), C = k(t, (se) => _(se)), [R, M] = a.useState(null), x = Gn(R), b = (x == null ? void 0 : x.width) ?? 0, P = (x == null ? void 0 : x.height) ?? 0, I = r + (i !== "center" ? "-" + i : ""), T = typeof p == "number" ? p : { top: 0, right: 0, bottom: 0, left: 0, ...p }, z = Array.isArray(u) ? u : [u], X = z.length > 0, B = {
610
+ ...d
611
+ } = e, C = Gt(Ze, n), [w, _] = a.useState(null), b = $(t, (ue) => _(ue)), [E, R] = a.useState(null), x = Zn(E), S = (x == null ? void 0 : x.width) ?? 0, P = (x == null ? void 0 : x.height) ?? 0, I = r + (i !== "center" ? "-" + i : ""), T = typeof p == "number" ? p : { top: 0, right: 0, bottom: 0, left: 0, ...p }, z = Array.isArray(u) ? u : [u], X = z.length > 0, U = {
454
612
  padding: T,
455
- boundary: z.filter(Ur),
613
+ boundary: z.filter(Hr),
456
614
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
457
615
  altBoundary: X
458
- }, { refs: Q, floatingStyles: q, placement: W, isPositioned: J, middlewareData: O } = Hn({
616
+ }, { refs: Q, floatingStyles: q, placement: k, isPositioned: J, middlewareData: O } = Jn({
459
617
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
460
618
  strategy: "fixed",
461
619
  placement: I,
462
- whileElementsMounted: (...se) => Yn(...se, {
463
- animationFrame: w === "always"
620
+ whileElementsMounted: (...ue) => er(...ue, {
621
+ animationFrame: g === "always"
464
622
  }),
465
623
  elements: {
466
- reference: E.anchor
624
+ reference: C.anchor
467
625
  },
468
626
  middleware: [
469
- Xn({ mainAxis: o + P, alignmentAxis: s }),
470
- f && jn({
627
+ tr({ mainAxis: o + P, alignmentAxis: s }),
628
+ l && nr({
471
629
  mainAxis: !0,
472
630
  crossAxis: !1,
473
- limiter: m === "partial" ? Zn() : void 0,
474
- ...B
631
+ limiter: f === "partial" ? rr() : void 0,
632
+ ...U
475
633
  }),
476
- f && Qn({ ...B }),
477
- qn({
478
- ...B,
479
- apply: ({ elements: se, rects: at, availableWidth: Ln, availableHeight: kn }) => {
480
- const { width: Wn, height: Un } = at.reference, he = se.floating.style;
481
- he.setProperty("--radix-popper-available-width", `${Ln}px`), he.setProperty("--radix-popper-available-height", `${kn}px`), he.setProperty("--radix-popper-anchor-width", `${Wn}px`), he.setProperty("--radix-popper-anchor-height", `${Un}px`);
634
+ l && or({ ...U }),
635
+ ar({
636
+ ...U,
637
+ apply: ({ elements: ue, rects: it, availableWidth: Gn, availableHeight: zn }) => {
638
+ const { width: Vn, height: Yn } = it.reference, he = ue.floating.style;
639
+ he.setProperty("--radix-popper-available-width", `${Gn}px`), he.setProperty("--radix-popper-available-height", `${zn}px`), he.setProperty("--radix-popper-anchor-width", `${Vn}px`), he.setProperty("--radix-popper-anchor-height", `${Yn}px`);
482
640
  }
483
641
  }),
484
- R && Jn({ element: R, padding: c }),
485
- $r({ arrowWidth: b, arrowHeight: P }),
486
- v && er({ strategy: "referenceHidden", ...B })
642
+ E && ir({ element: E, padding: c }),
643
+ Zr({ arrowWidth: S, arrowHeight: P }),
644
+ m && cr({ strategy: "referenceHidden", ...U })
487
645
  ]
488
- }), [y, A] = zt(W), N = Y(h);
489
- Ce(() => {
646
+ }), [y, A] = Zt(k), N = j(h);
647
+ be(() => {
490
648
  J && (N == null || N());
491
649
  }, [J, N]);
492
- const $ = (K = O.arrow) == null ? void 0 : K.x, oe = (ie = O.arrow) == null ? void 0 : ie.y, ae = ((F = O.arrow) == null ? void 0 : F.centerOffset) !== 0, [ve, j] = a.useState();
493
- return Ce(() => {
494
- g && j(window.getComputedStyle(g).zIndex);
495
- }, [g]), /* @__PURE__ */ d(
650
+ const B = (K = O.arrow) == null ? void 0 : K.x, ae = (ce = O.arrow) == null ? void 0 : ce.y, ie = ((F = O.arrow) == null ? void 0 : F.centerOffset) !== 0, [ve, H] = a.useState();
651
+ return be(() => {
652
+ w && H(window.getComputedStyle(w).zIndex);
653
+ }, [w]), /* @__PURE__ */ v(
496
654
  "div",
497
655
  {
498
656
  ref: Q.setFloating,
@@ -504,36 +662,36 @@ var je = "PopperContent", [Lr, kr] = Ft(je), Bt = a.forwardRef(
504
662
  minWidth: "max-content",
505
663
  zIndex: ve,
506
664
  "--radix-popper-transform-origin": [
507
- (ce = O.transformOrigin) == null ? void 0 : ce.x,
508
- (rt = O.transformOrigin) == null ? void 0 : rt.y
665
+ (se = O.transformOrigin) == null ? void 0 : se.x,
666
+ (ot = O.transformOrigin) == null ? void 0 : ot.y
509
667
  ].join(" "),
510
668
  // hide the content if using the hide middleware and should be hidden
511
669
  // set visibility to hidden and disable pointer events so the UI behaves
512
670
  // as if the PopperContent isn't there at all
513
- ...((ot = O.hide) == null ? void 0 : ot.referenceHidden) && {
671
+ ...((at = O.hide) == null ? void 0 : at.referenceHidden) && {
514
672
  visibility: "hidden",
515
673
  pointerEvents: "none"
516
674
  }
517
675
  },
518
676
  dir: e.dir,
519
- children: /* @__PURE__ */ d(
520
- Lr,
677
+ children: /* @__PURE__ */ v(
678
+ Yr,
521
679
  {
522
680
  scope: n,
523
681
  placedSide: y,
524
- onArrowChange: M,
525
- arrowX: $,
526
- arrowY: oe,
527
- shouldHideArrow: ae,
528
- children: /* @__PURE__ */ d(
529
- U.div,
682
+ onArrowChange: R,
683
+ arrowX: B,
684
+ arrowY: ae,
685
+ shouldHideArrow: ie,
686
+ children: /* @__PURE__ */ v(
687
+ W.div,
530
688
  {
531
689
  "data-side": y,
532
690
  "data-align": A,
533
- ...l,
534
- ref: C,
691
+ ...d,
692
+ ref: b,
535
693
  style: {
536
- ...l.style,
694
+ ...d.style,
537
695
  // if the PopperContent hasn't been placed yet (not all measurements done)
538
696
  // we prevent animations so that users's animation don't kick in too early referring wrong sides
539
697
  animation: J ? void 0 : "none"
@@ -546,19 +704,19 @@ var je = "PopperContent", [Lr, kr] = Ft(je), Bt = a.forwardRef(
546
704
  );
547
705
  }
548
706
  );
549
- Bt.displayName = je;
550
- var Kt = "PopperArrow", Wr = {
707
+ jt.displayName = Ze;
708
+ var Xt = "PopperArrow", Xr = {
551
709
  top: "bottom",
552
710
  right: "left",
553
711
  bottom: "top",
554
712
  left: "right"
555
- }, Gt = a.forwardRef(function(t, n) {
556
- const { __scopePopper: r, ...o } = t, i = kr(Kt, r), s = Wr[i.placedSide];
713
+ }, Ht = a.forwardRef(function(t, n) {
714
+ const { __scopePopper: r, ...o } = t, i = jr(Xt, r), s = Xr[i.placedSide];
557
715
  return (
558
716
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
559
717
  // doesn't report size as we'd expect on SVG elements.
560
718
  // it reports their bounding box which is effectively the largest path inside the SVG.
561
- /* @__PURE__ */ d(
719
+ /* @__PURE__ */ v(
562
720
  "span",
563
721
  {
564
722
  ref: i.onArrowChange,
@@ -581,8 +739,8 @@ var Kt = "PopperArrow", Wr = {
581
739
  }[i.placedSide],
582
740
  visibility: i.shouldHideArrow ? "hidden" : void 0
583
741
  },
584
- children: /* @__PURE__ */ d(
585
- Or,
742
+ children: /* @__PURE__ */ v(
743
+ zr,
586
744
  {
587
745
  ...o,
588
746
  ref: n,
@@ -597,35 +755,35 @@ var Kt = "PopperArrow", Wr = {
597
755
  )
598
756
  );
599
757
  });
600
- Gt.displayName = Kt;
601
- function Ur(e) {
758
+ Ht.displayName = Xt;
759
+ function Hr(e) {
602
760
  return e !== null;
603
761
  }
604
- var $r = (e) => ({
762
+ var Zr = (e) => ({
605
763
  name: "transformOrigin",
606
764
  options: e,
607
765
  fn(t) {
608
- var E, g, _;
609
- const { placement: n, rects: r, middlewareData: o } = t, s = ((E = o.arrow) == null ? void 0 : E.centerOffset) !== 0, c = s ? 0 : e.arrowWidth, f = s ? 0 : e.arrowHeight, [u, p] = zt(n), m = { start: "0%", center: "50%", end: "100%" }[p], v = (((g = o.arrow) == null ? void 0 : g.x) ?? 0) + c / 2, w = (((_ = o.arrow) == null ? void 0 : _.y) ?? 0) + f / 2;
610
- let h = "", l = "";
611
- return u === "bottom" ? (h = s ? m : `${v}px`, l = `${-f}px`) : u === "top" ? (h = s ? m : `${v}px`, l = `${r.floating.height + f}px`) : u === "right" ? (h = `${-f}px`, l = s ? m : `${w}px`) : u === "left" && (h = `${r.floating.width + f}px`, l = s ? m : `${w}px`), { data: { x: h, y: l } };
766
+ var C, w, _;
767
+ const { placement: n, rects: r, middlewareData: o } = t, s = ((C = o.arrow) == null ? void 0 : C.centerOffset) !== 0, c = s ? 0 : e.arrowWidth, l = s ? 0 : e.arrowHeight, [u, p] = Zt(n), f = { start: "0%", center: "50%", end: "100%" }[p], m = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + c / 2, g = (((_ = o.arrow) == null ? void 0 : _.y) ?? 0) + l / 2;
768
+ let h = "", d = "";
769
+ return u === "bottom" ? (h = s ? f : `${m}px`, d = `${-l}px`) : u === "top" ? (h = s ? f : `${m}px`, d = `${r.floating.height + l}px`) : u === "right" ? (h = `${-l}px`, d = s ? f : `${g}px`) : u === "left" && (h = `${r.floating.width + l}px`, d = s ? f : `${g}px`), { data: { x: h, y: d } };
612
770
  }
613
771
  });
614
- function zt(e) {
772
+ function Zt(e) {
615
773
  const [t, n = "center"] = e.split("-");
616
774
  return [t, n];
617
775
  }
618
- var Br = Wt, Kr = $t, Gr = Bt, zr = Gt;
619
- function Vr(e, t) {
776
+ var Qr = zt, qr = Yt, Jr = jt, eo = Ht;
777
+ function to(e, t) {
620
778
  return a.useReducer((n, r) => t[n][r] ?? n, e);
621
779
  }
622
- var Me = (e) => {
623
- const { present: t, children: n } = e, r = Hr(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), i = k(r.ref, Yr(o));
780
+ var Pe = (e) => {
781
+ const { present: t, children: n } = e, r = no(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), i = $(r.ref, ro(o));
624
782
  return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: i }) : null;
625
783
  };
626
- Me.displayName = "Presence";
627
- function Hr(e) {
628
- const [t, n] = a.useState(), r = a.useRef({}), o = a.useRef(e), i = a.useRef("none"), s = e ? "mounted" : "unmounted", [c, f] = Vr(s, {
784
+ Pe.displayName = "Presence";
785
+ function no(e) {
786
+ const [t, n] = a.useState(), r = a.useRef({}), o = a.useRef(e), i = a.useRef("none"), s = e ? "mounted" : "unmounted", [c, l] = to(s, {
629
787
  mounted: {
630
788
  UNMOUNT: "unmounted",
631
789
  ANIMATION_OUT: "unmountSuspended"
@@ -641,32 +799,32 @@ function Hr(e) {
641
799
  return a.useEffect(() => {
642
800
  const u = ge(r.current);
643
801
  i.current = c === "mounted" ? u : "none";
644
- }, [c]), Ce(() => {
802
+ }, [c]), be(() => {
645
803
  const u = r.current, p = o.current;
646
804
  if (p !== e) {
647
- const v = i.current, w = ge(u);
648
- e ? f("MOUNT") : w === "none" || (u == null ? void 0 : u.display) === "none" ? f("UNMOUNT") : f(p && v !== w ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
805
+ const m = i.current, g = ge(u);
806
+ e ? l("MOUNT") : g === "none" || (u == null ? void 0 : u.display) === "none" ? l("UNMOUNT") : l(p && m !== g ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
649
807
  }
650
- }, [e, f]), Ce(() => {
808
+ }, [e, l]), be(() => {
651
809
  if (t) {
652
810
  let u;
653
- const p = t.ownerDocument.defaultView ?? window, m = (w) => {
654
- const l = ge(r.current).includes(w.animationName);
655
- if (w.target === t && l && (f("ANIMATION_END"), !o.current)) {
656
- const E = t.style.animationFillMode;
811
+ const p = t.ownerDocument.defaultView ?? window, f = (g) => {
812
+ const d = ge(r.current).includes(g.animationName);
813
+ if (g.target === t && d && (l("ANIMATION_END"), !o.current)) {
814
+ const C = t.style.animationFillMode;
657
815
  t.style.animationFillMode = "forwards", u = p.setTimeout(() => {
658
- t.style.animationFillMode === "forwards" && (t.style.animationFillMode = E);
816
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = C);
659
817
  });
660
818
  }
661
- }, v = (w) => {
662
- w.target === t && (i.current = ge(r.current));
819
+ }, m = (g) => {
820
+ g.target === t && (i.current = ge(r.current));
663
821
  };
664
- return t.addEventListener("animationstart", v), t.addEventListener("animationcancel", m), t.addEventListener("animationend", m), () => {
665
- p.clearTimeout(u), t.removeEventListener("animationstart", v), t.removeEventListener("animationcancel", m), t.removeEventListener("animationend", m);
822
+ return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
823
+ p.clearTimeout(u), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
666
824
  };
667
825
  } else
668
- f("ANIMATION_END");
669
- }, [t, f]), {
826
+ l("ANIMATION_END");
827
+ }, [t, l]), {
670
828
  isPresent: ["mounted", "unmountSuspended"].includes(c),
671
829
  ref: a.useCallback((u) => {
672
830
  u && (r.current = getComputedStyle(u)), n(u);
@@ -676,38 +834,118 @@ function Hr(e) {
676
834
  function ge(e) {
677
835
  return (e == null ? void 0 : e.animationName) || "none";
678
836
  }
679
- function Yr(e) {
837
+ function ro(e) {
680
838
  var r, o;
681
839
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
682
840
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
683
841
  }
684
- var Vt = a.forwardRef((e, t) => {
685
- const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(jr);
842
+ function ne(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
843
+ return function(o) {
844
+ if (e == null || e(o), n === !1 || !o.defaultPrevented)
845
+ return t == null ? void 0 : t(o);
846
+ };
847
+ }
848
+ function Ct(e, t) {
849
+ if (typeof e == "function")
850
+ return e(t);
851
+ e != null && (e.current = t);
852
+ }
853
+ function Qt(...e) {
854
+ return (t) => {
855
+ let n = !1;
856
+ const r = e.map((o) => {
857
+ const i = Ct(o, t);
858
+ return !n && typeof i == "function" && (n = !0), i;
859
+ });
860
+ if (n)
861
+ return () => {
862
+ for (let o = 0; o < r.length; o++) {
863
+ const i = r[o];
864
+ typeof i == "function" ? i() : Ct(e[o], null);
865
+ }
866
+ };
867
+ };
868
+ }
869
+ function oo(...e) {
870
+ return a.useCallback(Qt(...e), e);
871
+ }
872
+ function ao(e, t = []) {
873
+ let n = [];
874
+ function r(i, s) {
875
+ const c = a.createContext(s), l = n.length;
876
+ n = [...n, s];
877
+ const u = (f) => {
878
+ var w;
879
+ const { scope: m, children: g, ...h } = f, d = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[l]) || c, C = a.useMemo(() => h, Object.values(h));
880
+ return /* @__PURE__ */ v(d.Provider, { value: C, children: g });
881
+ };
882
+ u.displayName = i + "Provider";
883
+ function p(f, m) {
884
+ var d;
885
+ const g = ((d = m == null ? void 0 : m[e]) == null ? void 0 : d[l]) || c, h = a.useContext(g);
886
+ if (h) return h;
887
+ if (s !== void 0) return s;
888
+ throw new Error(`\`${f}\` must be used within \`${i}\``);
889
+ }
890
+ return [u, p];
891
+ }
892
+ const o = () => {
893
+ const i = n.map((s) => a.createContext(s));
894
+ return function(c) {
895
+ const l = (c == null ? void 0 : c[e]) || i;
896
+ return a.useMemo(
897
+ () => ({ [`__scope${e}`]: { ...c, [e]: l } }),
898
+ [c, l]
899
+ );
900
+ };
901
+ };
902
+ return o.scopeName = e, [r, io(o, ...t)];
903
+ }
904
+ function io(...e) {
905
+ const t = e[0];
906
+ if (e.length === 1) return t;
907
+ const n = () => {
908
+ const r = e.map((o) => ({
909
+ useScope: o(),
910
+ scopeName: o.scopeName
911
+ }));
912
+ return function(i) {
913
+ const s = r.reduce((c, { useScope: l, scopeName: u }) => {
914
+ const f = l(i)[`__scope${u}`];
915
+ return { ...c, ...f };
916
+ }, {});
917
+ return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
918
+ };
919
+ };
920
+ return n.scopeName = t.scopeName, n;
921
+ }
922
+ var qt = a.forwardRef((e, t) => {
923
+ const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(so);
686
924
  if (i) {
687
- const s = i.props.children, c = o.map((f) => f === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : f);
688
- return /* @__PURE__ */ d(Ke, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
925
+ const s = i.props.children, c = o.map((l) => l === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : l);
926
+ return /* @__PURE__ */ v(Ke, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
689
927
  }
690
- return /* @__PURE__ */ d(Ke, { ...r, ref: t, children: n });
928
+ return /* @__PURE__ */ v(Ke, { ...r, ref: t, children: n });
691
929
  });
692
- Vt.displayName = "Slot";
930
+ qt.displayName = "Slot";
693
931
  var Ke = a.forwardRef((e, t) => {
694
932
  const { children: n, ...r } = e;
695
933
  if (a.isValidElement(n)) {
696
- const o = Qr(n);
934
+ const o = lo(n);
697
935
  return a.cloneElement(n, {
698
- ...Zr(r, n.props),
936
+ ...uo(r, n.props),
699
937
  // @ts-ignore
700
- ref: t ? fe(t, o) : o
938
+ ref: t ? Qt(t, o) : o
701
939
  });
702
940
  }
703
941
  return a.Children.count(n) > 1 ? a.Children.only(null) : null;
704
942
  });
705
943
  Ke.displayName = "SlotClone";
706
- var Xr = ({ children: e }) => /* @__PURE__ */ d(He, { children: e });
707
- function jr(e) {
708
- return a.isValidElement(e) && e.type === Xr;
944
+ var co = ({ children: e }) => /* @__PURE__ */ v(Ye, { children: e });
945
+ function so(e) {
946
+ return a.isValidElement(e) && e.type === co;
709
947
  }
710
- function Zr(e, t) {
948
+ function uo(e, t) {
711
949
  const n = { ...t };
712
950
  for (const r in t) {
713
951
  const o = e[r], i = t[r];
@@ -717,12 +955,12 @@ function Zr(e, t) {
717
955
  }
718
956
  return { ...e, ...n };
719
957
  }
720
- function Qr(e) {
958
+ function lo(e) {
721
959
  var r, o;
722
960
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
723
961
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
724
962
  }
725
- var qr = [
963
+ var fo = [
726
964
  "a",
727
965
  "button",
728
966
  "div",
@@ -739,20 +977,20 @@ var qr = [
739
977
  "span",
740
978
  "svg",
741
979
  "ul"
742
- ], Ht = qr.reduce((e, t) => {
980
+ ], Jt = fo.reduce((e, t) => {
743
981
  const n = a.forwardRef((r, o) => {
744
- const { asChild: i, ...s } = r, c = i ? Vt : t;
745
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...s, ref: o });
982
+ const { asChild: i, ...s } = r, c = i ? qt : t;
983
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(c, { ...s, ref: o });
746
984
  });
747
985
  return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
748
- }, {}), Oe = "rovingFocusGroup.onEntryFocus", Jr = { bubbles: !1, cancelable: !0 }, Pe = "RovingFocusGroup", [Ge, Yt, eo] = bt(Pe), [to, Xt] = Re(
749
- Pe,
750
- [eo]
751
- ), [no, ro] = to(Pe), jt = a.forwardRef(
752
- (e, t) => /* @__PURE__ */ d(Ge.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(Ge.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(oo, { ...e, ref: t }) }) })
986
+ }, {}), Oe = "rovingFocusGroup.onEntryFocus", po = { bubbles: !1, cancelable: !0 }, Me = "RovingFocusGroup", [Ge, en, mo] = xt(Me), [vo, tn] = ao(
987
+ Me,
988
+ [mo]
989
+ ), [ho, go] = vo(Me), nn = a.forwardRef(
990
+ (e, t) => /* @__PURE__ */ v(Ge.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ v(Ge.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ v(wo, { ...e, ref: t }) }) })
753
991
  );
754
- jt.displayName = Pe;
755
- var oo = a.forwardRef((e, t) => {
992
+ nn.displayName = Me;
993
+ var wo = a.forwardRef((e, t) => {
756
994
  const {
757
995
  __scopeRovingFocusGroup: n,
758
996
  orientation: r,
@@ -760,70 +998,70 @@ var oo = a.forwardRef((e, t) => {
760
998
  dir: i,
761
999
  currentTabStopId: s,
762
1000
  defaultCurrentTabStopId: c,
763
- onCurrentTabStopIdChange: f,
1001
+ onCurrentTabStopIdChange: l,
764
1002
  onEntryFocus: u,
765
1003
  preventScrollOnEntryFocus: p = !1,
766
- ...m
767
- } = e, v = a.useRef(null), w = k(t, v), h = Rt(i), [l = null, E] = St({
1004
+ ...f
1005
+ } = e, m = a.useRef(null), g = oo(t, m), h = Nt(i), [d = null, C] = Mt({
768
1006
  prop: s,
769
1007
  defaultProp: c,
770
- onChange: f
771
- }), [g, _] = a.useState(!1), C = Y(u), R = Yt(n), M = a.useRef(!1), [x, b] = a.useState(0);
1008
+ onChange: l
1009
+ }), [w, _] = a.useState(!1), b = j(u), E = en(n), R = a.useRef(!1), [x, S] = a.useState(0);
772
1010
  return a.useEffect(() => {
773
- const P = v.current;
1011
+ const P = m.current;
774
1012
  if (P)
775
- return P.addEventListener(Oe, C), () => P.removeEventListener(Oe, C);
776
- }, [C]), /* @__PURE__ */ d(
777
- no,
1013
+ return P.addEventListener(Oe, b), () => P.removeEventListener(Oe, b);
1014
+ }, [b]), /* @__PURE__ */ v(
1015
+ ho,
778
1016
  {
779
1017
  scope: n,
780
1018
  orientation: r,
781
1019
  dir: h,
782
1020
  loop: o,
783
- currentTabStopId: l,
1021
+ currentTabStopId: d,
784
1022
  onItemFocus: a.useCallback(
785
- (P) => E(P),
786
- [E]
1023
+ (P) => C(P),
1024
+ [C]
787
1025
  ),
788
1026
  onItemShiftTab: a.useCallback(() => _(!0), []),
789
1027
  onFocusableItemAdd: a.useCallback(
790
- () => b((P) => P + 1),
1028
+ () => S((P) => P + 1),
791
1029
  []
792
1030
  ),
793
1031
  onFocusableItemRemove: a.useCallback(
794
- () => b((P) => P - 1),
1032
+ () => S((P) => P - 1),
795
1033
  []
796
1034
  ),
797
- children: /* @__PURE__ */ d(
798
- Ht.div,
1035
+ children: /* @__PURE__ */ v(
1036
+ Jt.div,
799
1037
  {
800
- tabIndex: g || x === 0 ? -1 : 0,
1038
+ tabIndex: w || x === 0 ? -1 : 0,
801
1039
  "data-orientation": r,
802
- ...m,
803
- ref: w,
1040
+ ...f,
1041
+ ref: g,
804
1042
  style: { outline: "none", ...e.style },
805
- onMouseDown: S(e.onMouseDown, () => {
806
- M.current = !0;
1043
+ onMouseDown: ne(e.onMouseDown, () => {
1044
+ R.current = !0;
807
1045
  }),
808
- onFocus: S(e.onFocus, (P) => {
809
- const I = !M.current;
810
- if (P.target === P.currentTarget && I && !g) {
811
- const T = new CustomEvent(Oe, Jr);
1046
+ onFocus: ne(e.onFocus, (P) => {
1047
+ const I = !R.current;
1048
+ if (P.target === P.currentTarget && I && !w) {
1049
+ const T = new CustomEvent(Oe, po);
812
1050
  if (P.currentTarget.dispatchEvent(T), !T.defaultPrevented) {
813
- const z = R().filter((W) => W.focusable), X = z.find((W) => W.active), B = z.find((W) => W.id === l), q = [X, B, ...z].filter(
1051
+ const z = E().filter((k) => k.focusable), X = z.find((k) => k.active), U = z.find((k) => k.id === d), q = [X, U, ...z].filter(
814
1052
  Boolean
815
- ).map((W) => W.ref.current);
816
- qt(q, p);
1053
+ ).map((k) => k.ref.current);
1054
+ an(q, p);
817
1055
  }
818
1056
  }
819
- M.current = !1;
1057
+ R.current = !1;
820
1058
  }),
821
- onBlur: S(e.onBlur, () => _(!1))
1059
+ onBlur: ne(e.onBlur, () => _(!1))
822
1060
  }
823
1061
  )
824
1062
  }
825
1063
  );
826
- }), Zt = "RovingFocusGroupItem", Qt = a.forwardRef(
1064
+ }), rn = "RovingFocusGroupItem", on = a.forwardRef(
827
1065
  (e, t) => {
828
1066
  const {
829
1067
  __scopeRovingFocusGroup: n,
@@ -831,46 +1069,46 @@ var oo = a.forwardRef((e, t) => {
831
1069
  active: o = !1,
832
1070
  tabStopId: i,
833
1071
  ...s
834
- } = e, c = We(), f = i || c, u = ro(Zt, n), p = u.currentTabStopId === f, m = Yt(n), { onFocusableItemAdd: v, onFocusableItemRemove: w } = u;
1072
+ } = e, c = $e(), l = i || c, u = go(rn, n), p = u.currentTabStopId === l, f = en(n), { onFocusableItemAdd: m, onFocusableItemRemove: g } = u;
835
1073
  return a.useEffect(() => {
836
1074
  if (r)
837
- return v(), () => w();
838
- }, [r, v, w]), /* @__PURE__ */ d(
1075
+ return m(), () => g();
1076
+ }, [r, m, g]), /* @__PURE__ */ v(
839
1077
  Ge.ItemSlot,
840
1078
  {
841
1079
  scope: n,
842
- id: f,
1080
+ id: l,
843
1081
  focusable: r,
844
1082
  active: o,
845
- children: /* @__PURE__ */ d(
846
- Ht.span,
1083
+ children: /* @__PURE__ */ v(
1084
+ Jt.span,
847
1085
  {
848
1086
  tabIndex: p ? 0 : -1,
849
1087
  "data-orientation": u.orientation,
850
1088
  ...s,
851
1089
  ref: t,
852
- onMouseDown: S(e.onMouseDown, (h) => {
853
- r ? u.onItemFocus(f) : h.preventDefault();
1090
+ onMouseDown: ne(e.onMouseDown, (h) => {
1091
+ r ? u.onItemFocus(l) : h.preventDefault();
854
1092
  }),
855
- onFocus: S(e.onFocus, () => u.onItemFocus(f)),
856
- onKeyDown: S(e.onKeyDown, (h) => {
1093
+ onFocus: ne(e.onFocus, () => u.onItemFocus(l)),
1094
+ onKeyDown: ne(e.onKeyDown, (h) => {
857
1095
  if (h.key === "Tab" && h.shiftKey) {
858
1096
  u.onItemShiftTab();
859
1097
  return;
860
1098
  }
861
1099
  if (h.target !== h.currentTarget) return;
862
- const l = co(h, u.orientation, u.dir);
863
- if (l !== void 0) {
1100
+ const d = _o(h, u.orientation, u.dir);
1101
+ if (d !== void 0) {
864
1102
  if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
865
1103
  h.preventDefault();
866
- let g = m().filter((_) => _.focusable).map((_) => _.ref.current);
867
- if (l === "last") g.reverse();
868
- else if (l === "prev" || l === "next") {
869
- l === "prev" && g.reverse();
870
- const _ = g.indexOf(h.currentTarget);
871
- g = u.loop ? so(g, _ + 1) : g.slice(_ + 1);
1104
+ let w = f().filter((_) => _.focusable).map((_) => _.ref.current);
1105
+ if (d === "last") w.reverse();
1106
+ else if (d === "prev" || d === "next") {
1107
+ d === "prev" && w.reverse();
1108
+ const _ = w.indexOf(h.currentTarget);
1109
+ w = u.loop ? bo(w, _ + 1) : w.slice(_ + 1);
872
1110
  }
873
- setTimeout(() => qt(g));
1111
+ setTimeout(() => an(w));
874
1112
  }
875
1113
  })
876
1114
  }
@@ -879,8 +1117,8 @@ var oo = a.forwardRef((e, t) => {
879
1117
  );
880
1118
  }
881
1119
  );
882
- Qt.displayName = Zt;
883
- var ao = {
1120
+ on.displayName = rn;
1121
+ var Co = {
884
1122
  ArrowLeft: "prev",
885
1123
  ArrowUp: "prev",
886
1124
  ArrowRight: "next",
@@ -890,28 +1128,28 @@ var ao = {
890
1128
  PageDown: "last",
891
1129
  End: "last"
892
1130
  };
893
- function io(e, t) {
1131
+ function yo(e, t) {
894
1132
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
895
1133
  }
896
- function co(e, t, n) {
897
- const r = io(e.key, n);
1134
+ function _o(e, t, n) {
1135
+ const r = yo(e.key, n);
898
1136
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
899
- return ao[r];
1137
+ return Co[r];
900
1138
  }
901
- function qt(e, t = !1) {
1139
+ function an(e, t = !1) {
902
1140
  const n = document.activeElement;
903
1141
  for (const r of e)
904
1142
  if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
905
1143
  }
906
- function so(e, t) {
1144
+ function bo(e, t) {
907
1145
  return e.map((n, r) => e[(t + r) % e.length]);
908
1146
  }
909
- var uo = jt, lo = Qt, ye = "right-scroll-bar-position", _e = "width-before-scroll-bar", fo = "with-scroll-bars-hidden", po = "--removed-body-scroll-bar-size";
1147
+ var So = nn, Eo = on, ye = "right-scroll-bar-position", _e = "width-before-scroll-bar", Ro = "with-scroll-bars-hidden", Po = "--removed-body-scroll-bar-size";
910
1148
  function Fe(e, t) {
911
1149
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
912
1150
  }
913
- function mo(e, t) {
914
- var n = Ct(function() {
1151
+ function Mo(e, t) {
1152
+ var n = Pt(function() {
915
1153
  return {
916
1154
  // value
917
1155
  value: e,
@@ -931,15 +1169,15 @@ function mo(e, t) {
931
1169
  })[0];
932
1170
  return n.callback = t, n.facade;
933
1171
  }
934
- var vo = typeof window < "u" ? a.useLayoutEffect : a.useEffect, ht = /* @__PURE__ */ new WeakMap();
935
- function ho(e, t) {
936
- var n = mo(null, function(r) {
1172
+ var xo = typeof window < "u" ? a.useLayoutEffect : a.useEffect, yt = /* @__PURE__ */ new WeakMap();
1173
+ function No(e, t) {
1174
+ var n = Mo(null, function(r) {
937
1175
  return e.forEach(function(o) {
938
1176
  return Fe(o, r);
939
1177
  });
940
1178
  });
941
- return vo(function() {
942
- var r = ht.get(n);
1179
+ return xo(function() {
1180
+ var r = yt.get(n);
943
1181
  if (r) {
944
1182
  var o = new Set(r), i = new Set(e), s = n.current;
945
1183
  o.forEach(function(c) {
@@ -948,14 +1186,14 @@ function ho(e, t) {
948
1186
  o.has(c) || Fe(c, s);
949
1187
  });
950
1188
  }
951
- ht.set(n, e);
1189
+ yt.set(n, e);
952
1190
  }, [e]), n;
953
1191
  }
954
- function go(e) {
1192
+ function Io(e) {
955
1193
  return e;
956
1194
  }
957
- function wo(e, t) {
958
- t === void 0 && (t = go);
1195
+ function Ao(e, t) {
1196
+ t === void 0 && (t = Io);
959
1197
  var n = [], r = !1, o = {
960
1198
  read: function() {
961
1199
  if (r)
@@ -991,11 +1229,11 @@ function wo(e, t) {
991
1229
  var c = n;
992
1230
  n = [], c.forEach(i), s = n;
993
1231
  }
994
- var f = function() {
1232
+ var l = function() {
995
1233
  var p = s;
996
1234
  s = [], p.forEach(i);
997
1235
  }, u = function() {
998
- return Promise.resolve().then(f);
1236
+ return Promise.resolve().then(l);
999
1237
  };
1000
1238
  u(), n = {
1001
1239
  push: function(p) {
@@ -1009,36 +1247,36 @@ function wo(e, t) {
1009
1247
  };
1010
1248
  return o;
1011
1249
  }
1012
- function Eo(e) {
1250
+ function Do(e) {
1013
1251
  e === void 0 && (e = {});
1014
- var t = wo(null);
1015
- return t.options = H({ async: !0, ssr: !1 }, e), t;
1252
+ var t = Ao(null);
1253
+ return t.options = Y({ async: !0, ssr: !1 }, e), t;
1016
1254
  }
1017
- var Jt = function(e) {
1018
- var t = e.sideCar, n = Mt(e, ["sideCar"]);
1255
+ var cn = function(e) {
1256
+ var t = e.sideCar, n = It(e, ["sideCar"]);
1019
1257
  if (!t)
1020
1258
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1021
1259
  var r = t.read();
1022
1260
  if (!r)
1023
1261
  throw new Error("Sidecar medium not found");
1024
- return a.createElement(r, H({}, n));
1262
+ return a.createElement(r, Y({}, n));
1025
1263
  };
1026
- Jt.isSideCarExport = !0;
1027
- function yo(e, t) {
1028
- return e.useMedium(t), Jt;
1264
+ cn.isSideCarExport = !0;
1265
+ function To(e, t) {
1266
+ return e.useMedium(t), cn;
1029
1267
  }
1030
- var en = Eo(), Le = function() {
1268
+ var sn = Do(), Le = function() {
1031
1269
  }, xe = a.forwardRef(function(e, t) {
1032
1270
  var n = a.useRef(null), r = a.useState({
1033
1271
  onScrollCapture: Le,
1034
1272
  onWheelCapture: Le,
1035
1273
  onTouchMoveCapture: Le
1036
- }), o = r[0], i = r[1], s = e.forwardProps, c = e.children, f = e.className, u = e.removeScrollBar, p = e.enabled, m = e.shards, v = e.sideCar, w = e.noIsolation, h = e.inert, l = e.allowPinchZoom, E = e.as, g = E === void 0 ? "div" : E, _ = e.gapMode, C = Mt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = v, M = ho([n, t]), x = H(H({}, C), o);
1274
+ }), o = r[0], i = r[1], s = e.forwardProps, c = e.children, l = e.className, u = e.removeScrollBar, p = e.enabled, f = e.shards, m = e.sideCar, g = e.noIsolation, h = e.inert, d = e.allowPinchZoom, C = e.as, w = C === void 0 ? "div" : C, _ = e.gapMode, b = It(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = m, R = No([n, t]), x = Y(Y({}, b), o);
1037
1275
  return a.createElement(
1038
1276
  a.Fragment,
1039
1277
  null,
1040
- p && a.createElement(R, { sideCar: en, removeScrollBar: u, shards: m, noIsolation: w, inert: h, setCallbacks: i, allowPinchZoom: !!l, lockRef: n, gapMode: _ }),
1041
- s ? a.cloneElement(a.Children.only(c), H(H({}, x), { ref: M })) : a.createElement(g, H({}, x, { className: f, ref: M }), c)
1278
+ p && a.createElement(E, { sideCar: sn, removeScrollBar: u, shards: f, noIsolation: g, inert: h, setCallbacks: i, allowPinchZoom: !!d, lockRef: n, gapMode: _ }),
1279
+ s ? a.cloneElement(a.Children.only(c), Y(Y({}, x), { ref: R })) : a.createElement(w, Y({}, x, { className: l, ref: R }), c)
1042
1280
  );
1043
1281
  });
1044
1282
  xe.defaultProps = {
@@ -1050,33 +1288,33 @@ xe.classNames = {
1050
1288
  fullWidth: _e,
1051
1289
  zeroRight: ye
1052
1290
  };
1053
- function _o() {
1291
+ function Oo() {
1054
1292
  if (!document)
1055
1293
  return null;
1056
1294
  var e = document.createElement("style");
1057
1295
  e.type = "text/css";
1058
- var t = tr();
1296
+ var t = sr();
1059
1297
  return t && e.setAttribute("nonce", t), e;
1060
1298
  }
1061
- function Co(e, t) {
1299
+ function Fo(e, t) {
1062
1300
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
1063
1301
  }
1064
- function bo(e) {
1302
+ function Lo(e) {
1065
1303
  var t = document.head || document.getElementsByTagName("head")[0];
1066
1304
  t.appendChild(e);
1067
1305
  }
1068
- var So = function() {
1306
+ var ko = function() {
1069
1307
  var e = 0, t = null;
1070
1308
  return {
1071
1309
  add: function(n) {
1072
- e == 0 && (t = _o()) && (Co(t, n), bo(t)), e++;
1310
+ e == 0 && (t = Oo()) && (Fo(t, n), Lo(t)), e++;
1073
1311
  },
1074
1312
  remove: function() {
1075
1313
  e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
1076
1314
  }
1077
1315
  };
1078
- }, Ro = function() {
1079
- var e = So();
1316
+ }, $o = function() {
1317
+ var e = ko();
1080
1318
  return function(t, n) {
1081
1319
  a.useEffect(function() {
1082
1320
  return e.add(t), function() {
@@ -1084,40 +1322,40 @@ var So = function() {
1084
1322
  };
1085
1323
  }, [t && n]);
1086
1324
  };
1087
- }, tn = function() {
1088
- var e = Ro(), t = function(n) {
1325
+ }, un = function() {
1326
+ var e = $o(), t = function(n) {
1089
1327
  var r = n.styles, o = n.dynamic;
1090
1328
  return e(r, o), null;
1091
1329
  };
1092
1330
  return t;
1093
- }, Mo = {
1331
+ }, Wo = {
1094
1332
  left: 0,
1095
1333
  top: 0,
1096
1334
  right: 0,
1097
1335
  gap: 0
1098
1336
  }, ke = function(e) {
1099
1337
  return parseInt(e || "", 10) || 0;
1100
- }, Po = function(e) {
1338
+ }, Bo = function(e) {
1101
1339
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
1102
1340
  return [ke(n), ke(r), ke(o)];
1103
- }, xo = function(e) {
1341
+ }, Uo = function(e) {
1104
1342
  if (e === void 0 && (e = "margin"), typeof window > "u")
1105
- return Mo;
1106
- var t = Po(e), n = document.documentElement.clientWidth, r = window.innerWidth;
1343
+ return Wo;
1344
+ var t = Bo(e), n = document.documentElement.clientWidth, r = window.innerWidth;
1107
1345
  return {
1108
1346
  left: t[0],
1109
1347
  top: t[1],
1110
1348
  right: t[2],
1111
1349
  gap: Math.max(0, r - n + t[2] - t[0])
1112
1350
  };
1113
- }, No = tn(), ne = "data-scroll-locked", Io = function(e, t, n, r) {
1351
+ }, Ko = un(), re = "data-scroll-locked", Go = function(e, t, n, r) {
1114
1352
  var o = e.left, i = e.top, s = e.right, c = e.gap;
1115
1353
  return n === void 0 && (n = "margin"), `
1116
- .`.concat(fo, ` {
1354
+ .`.concat(Ro, ` {
1117
1355
  overflow: hidden `).concat(r, `;
1118
1356
  padding-right: `).concat(c, "px ").concat(r, `;
1119
1357
  }
1120
- body[`).concat(ne, `] {
1358
+ body[`).concat(re, `] {
1121
1359
  overflow: hidden `).concat(r, `;
1122
1360
  overscroll-behavior: contain;
1123
1361
  `).concat([
@@ -1150,27 +1388,27 @@ var So = function() {
1150
1388
  margin-right: 0 `).concat(r, `;
1151
1389
  }
1152
1390
 
1153
- body[`).concat(ne, `] {
1154
- `).concat(po, ": ").concat(c, `px;
1391
+ body[`).concat(re, `] {
1392
+ `).concat(Po, ": ").concat(c, `px;
1155
1393
  }
1156
1394
  `);
1157
- }, gt = function() {
1158
- var e = parseInt(document.body.getAttribute(ne) || "0", 10);
1395
+ }, _t = function() {
1396
+ var e = parseInt(document.body.getAttribute(re) || "0", 10);
1159
1397
  return isFinite(e) ? e : 0;
1160
- }, Ao = function() {
1398
+ }, zo = function() {
1161
1399
  a.useEffect(function() {
1162
- return document.body.setAttribute(ne, (gt() + 1).toString()), function() {
1163
- var e = gt() - 1;
1164
- e <= 0 ? document.body.removeAttribute(ne) : document.body.setAttribute(ne, e.toString());
1400
+ return document.body.setAttribute(re, (_t() + 1).toString()), function() {
1401
+ var e = _t() - 1;
1402
+ e <= 0 ? document.body.removeAttribute(re) : document.body.setAttribute(re, e.toString());
1165
1403
  };
1166
1404
  }, []);
1167
- }, Do = function(e) {
1405
+ }, Vo = function(e) {
1168
1406
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
1169
- Ao();
1407
+ zo();
1170
1408
  var i = a.useMemo(function() {
1171
- return xo(o);
1409
+ return Uo(o);
1172
1410
  }, [o]);
1173
- return a.createElement(No, { styles: Io(i, !t, o, n ? "" : "!important") });
1411
+ return a.createElement(Ko, { styles: Go(i, !t, o, n ? "" : "!important") });
1174
1412
  }, ze = !1;
1175
1413
  if (typeof window < "u")
1176
1414
  try {
@@ -1183,205 +1421,205 @@ if (typeof window < "u")
1183
1421
  } catch {
1184
1422
  ze = !1;
1185
1423
  }
1186
- var ee = ze ? { passive: !1 } : !1, To = function(e) {
1424
+ var ee = ze ? { passive: !1 } : !1, Yo = function(e) {
1187
1425
  return e.tagName === "TEXTAREA";
1188
- }, nn = function(e, t) {
1426
+ }, ln = function(e, t) {
1189
1427
  if (!(e instanceof Element))
1190
1428
  return !1;
1191
1429
  var n = window.getComputedStyle(e);
1192
1430
  return (
1193
1431
  // not-not-scrollable
1194
1432
  n[t] !== "hidden" && // contains scroll inside self
1195
- !(n.overflowY === n.overflowX && !To(e) && n[t] === "visible")
1433
+ !(n.overflowY === n.overflowX && !Yo(e) && n[t] === "visible")
1196
1434
  );
1197
- }, Oo = function(e) {
1198
- return nn(e, "overflowY");
1199
- }, Fo = function(e) {
1200
- return nn(e, "overflowX");
1201
- }, wt = function(e, t) {
1435
+ }, jo = function(e) {
1436
+ return ln(e, "overflowY");
1437
+ }, Xo = function(e) {
1438
+ return ln(e, "overflowX");
1439
+ }, bt = function(e, t) {
1202
1440
  var n = t.ownerDocument, r = t;
1203
1441
  do {
1204
1442
  typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
1205
- var o = rn(e, r);
1443
+ var o = dn(e, r);
1206
1444
  if (o) {
1207
- var i = on(e, r), s = i[1], c = i[2];
1445
+ var i = fn(e, r), s = i[1], c = i[2];
1208
1446
  if (s > c)
1209
1447
  return !0;
1210
1448
  }
1211
1449
  r = r.parentNode;
1212
1450
  } while (r && r !== n.body);
1213
1451
  return !1;
1214
- }, Lo = function(e) {
1452
+ }, Ho = function(e) {
1215
1453
  var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
1216
1454
  return [
1217
1455
  t,
1218
1456
  n,
1219
1457
  r
1220
1458
  ];
1221
- }, ko = function(e) {
1459
+ }, Zo = function(e) {
1222
1460
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
1223
1461
  return [
1224
1462
  t,
1225
1463
  n,
1226
1464
  r
1227
1465
  ];
1228
- }, rn = function(e, t) {
1229
- return e === "v" ? Oo(t) : Fo(t);
1230
- }, on = function(e, t) {
1231
- return e === "v" ? Lo(t) : ko(t);
1232
- }, Wo = function(e, t) {
1466
+ }, dn = function(e, t) {
1467
+ return e === "v" ? jo(t) : Xo(t);
1468
+ }, fn = function(e, t) {
1469
+ return e === "v" ? Ho(t) : Zo(t);
1470
+ }, Qo = function(e, t) {
1233
1471
  return e === "h" && t === "rtl" ? -1 : 1;
1234
- }, Uo = function(e, t, n, r, o) {
1235
- var i = Wo(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, f = t.contains(c), u = !1, p = s > 0, m = 0, v = 0;
1472
+ }, qo = function(e, t, n, r, o) {
1473
+ var i = Qo(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, l = t.contains(c), u = !1, p = s > 0, f = 0, m = 0;
1236
1474
  do {
1237
- var w = on(e, c), h = w[0], l = w[1], E = w[2], g = l - E - i * h;
1238
- (h || g) && rn(e, c) && (m += g, v += h), c instanceof ShadowRoot ? c = c.host : c = c.parentNode;
1475
+ var g = fn(e, c), h = g[0], d = g[1], C = g[2], w = d - C - i * h;
1476
+ (h || w) && dn(e, c) && (f += w, m += h), c instanceof ShadowRoot ? c = c.host : c = c.parentNode;
1239
1477
  } while (
1240
1478
  // portaled content
1241
- !f && c !== document.body || // self content
1242
- f && (t.contains(c) || t === c)
1479
+ !l && c !== document.body || // self content
1480
+ l && (t.contains(c) || t === c)
1243
1481
  );
1244
- return (p && (Math.abs(m) < 1 || !o) || !p && (Math.abs(v) < 1 || !o)) && (u = !0), u;
1245
- }, Ee = function(e) {
1482
+ return (p && (Math.abs(f) < 1 || !o) || !p && (Math.abs(m) < 1 || !o)) && (u = !0), u;
1483
+ }, Ce = function(e) {
1246
1484
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1247
- }, Et = function(e) {
1485
+ }, St = function(e) {
1248
1486
  return [e.deltaX, e.deltaY];
1249
- }, yt = function(e) {
1487
+ }, Et = function(e) {
1250
1488
  return e && "current" in e ? e.current : e;
1251
- }, $o = function(e, t) {
1489
+ }, Jo = function(e, t) {
1252
1490
  return e[0] === t[0] && e[1] === t[1];
1253
- }, Bo = function(e) {
1491
+ }, ea = function(e) {
1254
1492
  return `
1255
1493
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
1256
1494
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1257
1495
  `);
1258
- }, Ko = 0, te = [];
1259
- function Go(e) {
1260
- var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(Ko++)[0], i = a.useState(tn)[0], s = a.useRef(e);
1496
+ }, ta = 0, te = [];
1497
+ function na(e) {
1498
+ var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(ta++)[0], i = a.useState(un)[0], s = a.useRef(e);
1261
1499
  a.useEffect(function() {
1262
1500
  s.current = e;
1263
1501
  }, [e]), a.useEffect(function() {
1264
1502
  if (e.inert) {
1265
1503
  document.body.classList.add("block-interactivity-".concat(o));
1266
- var l = rr([e.lockRef.current], (e.shards || []).map(yt), !0).filter(Boolean);
1267
- return l.forEach(function(E) {
1268
- return E.classList.add("allow-interactivity-".concat(o));
1504
+ var d = lr([e.lockRef.current], (e.shards || []).map(Et), !0).filter(Boolean);
1505
+ return d.forEach(function(C) {
1506
+ return C.classList.add("allow-interactivity-".concat(o));
1269
1507
  }), function() {
1270
- document.body.classList.remove("block-interactivity-".concat(o)), l.forEach(function(E) {
1271
- return E.classList.remove("allow-interactivity-".concat(o));
1508
+ document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(C) {
1509
+ return C.classList.remove("allow-interactivity-".concat(o));
1272
1510
  });
1273
1511
  };
1274
1512
  }
1275
1513
  }, [e.inert, e.lockRef.current, e.shards]);
1276
- var c = a.useCallback(function(l, E) {
1277
- if ("touches" in l && l.touches.length === 2 || l.type === "wheel" && l.ctrlKey)
1514
+ var c = a.useCallback(function(d, C) {
1515
+ if ("touches" in d && d.touches.length === 2 || d.type === "wheel" && d.ctrlKey)
1278
1516
  return !s.current.allowPinchZoom;
1279
- var g = Ee(l), _ = n.current, C = "deltaX" in l ? l.deltaX : _[0] - g[0], R = "deltaY" in l ? l.deltaY : _[1] - g[1], M, x = l.target, b = Math.abs(C) > Math.abs(R) ? "h" : "v";
1280
- if ("touches" in l && b === "h" && x.type === "range")
1517
+ var w = Ce(d), _ = n.current, b = "deltaX" in d ? d.deltaX : _[0] - w[0], E = "deltaY" in d ? d.deltaY : _[1] - w[1], R, x = d.target, S = Math.abs(b) > Math.abs(E) ? "h" : "v";
1518
+ if ("touches" in d && S === "h" && x.type === "range")
1281
1519
  return !1;
1282
- var P = wt(b, x);
1520
+ var P = bt(S, x);
1283
1521
  if (!P)
1284
1522
  return !0;
1285
- if (P ? M = b : (M = b === "v" ? "h" : "v", P = wt(b, x)), !P)
1523
+ if (P ? R = S : (R = S === "v" ? "h" : "v", P = bt(S, x)), !P)
1286
1524
  return !1;
1287
- if (!r.current && "changedTouches" in l && (C || R) && (r.current = M), !M)
1525
+ if (!r.current && "changedTouches" in d && (b || E) && (r.current = R), !R)
1288
1526
  return !0;
1289
- var I = r.current || M;
1290
- return Uo(I, E, l, I === "h" ? C : R, !0);
1291
- }, []), f = a.useCallback(function(l) {
1292
- var E = l;
1527
+ var I = r.current || R;
1528
+ return qo(I, C, d, I === "h" ? b : E, !0);
1529
+ }, []), l = a.useCallback(function(d) {
1530
+ var C = d;
1293
1531
  if (!(!te.length || te[te.length - 1] !== i)) {
1294
- var g = "deltaY" in E ? Et(E) : Ee(E), _ = t.current.filter(function(M) {
1295
- return M.name === E.type && (M.target === E.target || E.target === M.shadowParent) && $o(M.delta, g);
1532
+ var w = "deltaY" in C ? St(C) : Ce(C), _ = t.current.filter(function(R) {
1533
+ return R.name === C.type && (R.target === C.target || C.target === R.shadowParent) && Jo(R.delta, w);
1296
1534
  })[0];
1297
1535
  if (_ && _.should) {
1298
- E.cancelable && E.preventDefault();
1536
+ C.cancelable && C.preventDefault();
1299
1537
  return;
1300
1538
  }
1301
1539
  if (!_) {
1302
- var C = (s.current.shards || []).map(yt).filter(Boolean).filter(function(M) {
1303
- return M.contains(E.target);
1304
- }), R = C.length > 0 ? c(E, C[0]) : !s.current.noIsolation;
1305
- R && E.cancelable && E.preventDefault();
1540
+ var b = (s.current.shards || []).map(Et).filter(Boolean).filter(function(R) {
1541
+ return R.contains(C.target);
1542
+ }), E = b.length > 0 ? c(C, b[0]) : !s.current.noIsolation;
1543
+ E && C.cancelable && C.preventDefault();
1306
1544
  }
1307
1545
  }
1308
- }, []), u = a.useCallback(function(l, E, g, _) {
1309
- var C = { name: l, delta: E, target: g, should: _, shadowParent: zo(g) };
1310
- t.current.push(C), setTimeout(function() {
1311
- t.current = t.current.filter(function(R) {
1312
- return R !== C;
1546
+ }, []), u = a.useCallback(function(d, C, w, _) {
1547
+ var b = { name: d, delta: C, target: w, should: _, shadowParent: ra(w) };
1548
+ t.current.push(b), setTimeout(function() {
1549
+ t.current = t.current.filter(function(E) {
1550
+ return E !== b;
1313
1551
  });
1314
1552
  }, 1);
1315
- }, []), p = a.useCallback(function(l) {
1316
- n.current = Ee(l), r.current = void 0;
1317
- }, []), m = a.useCallback(function(l) {
1318
- u(l.type, Et(l), l.target, c(l, e.lockRef.current));
1319
- }, []), v = a.useCallback(function(l) {
1320
- u(l.type, Ee(l), l.target, c(l, e.lockRef.current));
1553
+ }, []), p = a.useCallback(function(d) {
1554
+ n.current = Ce(d), r.current = void 0;
1555
+ }, []), f = a.useCallback(function(d) {
1556
+ u(d.type, St(d), d.target, c(d, e.lockRef.current));
1557
+ }, []), m = a.useCallback(function(d) {
1558
+ u(d.type, Ce(d), d.target, c(d, e.lockRef.current));
1321
1559
  }, []);
1322
1560
  a.useEffect(function() {
1323
1561
  return te.push(i), e.setCallbacks({
1324
- onScrollCapture: m,
1325
- onWheelCapture: m,
1326
- onTouchMoveCapture: v
1327
- }), document.addEventListener("wheel", f, ee), document.addEventListener("touchmove", f, ee), document.addEventListener("touchstart", p, ee), function() {
1328
- te = te.filter(function(l) {
1329
- return l !== i;
1330
- }), document.removeEventListener("wheel", f, ee), document.removeEventListener("touchmove", f, ee), document.removeEventListener("touchstart", p, ee);
1562
+ onScrollCapture: f,
1563
+ onWheelCapture: f,
1564
+ onTouchMoveCapture: m
1565
+ }), document.addEventListener("wheel", l, ee), document.addEventListener("touchmove", l, ee), document.addEventListener("touchstart", p, ee), function() {
1566
+ te = te.filter(function(d) {
1567
+ return d !== i;
1568
+ }), document.removeEventListener("wheel", l, ee), document.removeEventListener("touchmove", l, ee), document.removeEventListener("touchstart", p, ee);
1331
1569
  };
1332
1570
  }, []);
1333
- var w = e.removeScrollBar, h = e.inert;
1571
+ var g = e.removeScrollBar, h = e.inert;
1334
1572
  return a.createElement(
1335
1573
  a.Fragment,
1336
1574
  null,
1337
- h ? a.createElement(i, { styles: Bo(o) }) : null,
1338
- w ? a.createElement(Do, { gapMode: e.gapMode }) : null
1575
+ h ? a.createElement(i, { styles: ea(o) }) : null,
1576
+ g ? a.createElement(Vo, { gapMode: e.gapMode }) : null
1339
1577
  );
1340
1578
  }
1341
- function zo(e) {
1579
+ function ra(e) {
1342
1580
  for (var t = null; e !== null; )
1343
1581
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1344
1582
  return t;
1345
1583
  }
1346
- const Vo = yo(en, Go);
1347
- var an = a.forwardRef(function(e, t) {
1348
- return a.createElement(xe, H({}, e, { ref: t, sideCar: Vo }));
1584
+ const oa = To(sn, na);
1585
+ var pn = a.forwardRef(function(e, t) {
1586
+ return a.createElement(xe, Y({}, e, { ref: t, sideCar: oa }));
1349
1587
  });
1350
- an.classNames = xe.classNames;
1351
- var Ve = ["Enter", " "], Ho = ["ArrowDown", "PageUp", "Home"], cn = ["ArrowUp", "PageDown", "End"], Yo = [...Ho, ...cn], Xo = {
1588
+ pn.classNames = xe.classNames;
1589
+ var Ve = ["Enter", " "], aa = ["ArrowDown", "PageUp", "Home"], mn = ["ArrowUp", "PageDown", "End"], ia = [...aa, ...mn], ca = {
1352
1590
  ltr: [...Ve, "ArrowRight"],
1353
1591
  rtl: [...Ve, "ArrowLeft"]
1354
- }, jo = {
1592
+ }, sa = {
1355
1593
  ltr: ["ArrowLeft"],
1356
1594
  rtl: ["ArrowRight"]
1357
- }, pe = "Menu", [le, Zo, Qo] = bt(pe), [Z, sn] = Re(pe, [
1358
- Qo,
1359
- Lt,
1360
- Xt
1361
- ]), Ne = Lt(), un = Xt(), [qo, re] = Z(pe), [Jo, me] = Z(pe), ln = (e) => {
1362
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: i, modal: s = !0 } = e, c = Ne(t), [f, u] = a.useState(null), p = a.useRef(!1), m = Y(i), v = Rt(o);
1595
+ }, pe = "Menu", [de, ua, la] = xt(pe), [Z, vn] = Tt(pe, [
1596
+ la,
1597
+ Kt,
1598
+ tn
1599
+ ]), Ne = Kt(), hn = tn(), [da, oe] = Z(pe), [fa, me] = Z(pe), gn = (e) => {
1600
+ const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: i, modal: s = !0 } = e, c = Ne(t), [l, u] = a.useState(null), p = a.useRef(!1), f = j(i), m = Nt(o);
1363
1601
  return a.useEffect(() => {
1364
- const w = () => {
1602
+ const g = () => {
1365
1603
  p.current = !0, document.addEventListener("pointerdown", h, { capture: !0, once: !0 }), document.addEventListener("pointermove", h, { capture: !0, once: !0 });
1366
1604
  }, h = () => p.current = !1;
1367
- return document.addEventListener("keydown", w, { capture: !0 }), () => {
1368
- document.removeEventListener("keydown", w, { capture: !0 }), document.removeEventListener("pointerdown", h, { capture: !0 }), document.removeEventListener("pointermove", h, { capture: !0 });
1605
+ return document.addEventListener("keydown", g, { capture: !0 }), () => {
1606
+ document.removeEventListener("keydown", g, { capture: !0 }), document.removeEventListener("pointerdown", h, { capture: !0 }), document.removeEventListener("pointermove", h, { capture: !0 });
1369
1607
  };
1370
- }, []), /* @__PURE__ */ d(Br, { ...c, children: /* @__PURE__ */ d(
1371
- qo,
1608
+ }, []), /* @__PURE__ */ v(Qr, { ...c, children: /* @__PURE__ */ v(
1609
+ da,
1372
1610
  {
1373
1611
  scope: t,
1374
1612
  open: n,
1375
- onOpenChange: m,
1376
- content: f,
1613
+ onOpenChange: f,
1614
+ content: l,
1377
1615
  onContentChange: u,
1378
- children: /* @__PURE__ */ d(
1379
- Jo,
1616
+ children: /* @__PURE__ */ v(
1617
+ fa,
1380
1618
  {
1381
1619
  scope: t,
1382
- onClose: a.useCallback(() => m(!1), [m]),
1620
+ onClose: a.useCallback(() => f(!1), [f]),
1383
1621
  isUsingKeyboardRef: p,
1384
- dir: v,
1622
+ dir: m,
1385
1623
  modal: s,
1386
1624
  children: r
1387
1625
  }
@@ -1389,36 +1627,36 @@ var Ve = ["Enter", " "], Ho = ["ArrowDown", "PageUp", "Home"], cn = ["ArrowUp",
1389
1627
  }
1390
1628
  ) });
1391
1629
  };
1392
- ln.displayName = pe;
1393
- var ea = "MenuAnchor", Ze = a.forwardRef(
1630
+ gn.displayName = pe;
1631
+ var pa = "MenuAnchor", Qe = a.forwardRef(
1394
1632
  (e, t) => {
1395
1633
  const { __scopeMenu: n, ...r } = e, o = Ne(n);
1396
- return /* @__PURE__ */ d(Kr, { ...o, ...r, ref: t });
1634
+ return /* @__PURE__ */ v(qr, { ...o, ...r, ref: t });
1397
1635
  }
1398
1636
  );
1399
- Ze.displayName = ea;
1400
- var ta = "MenuPortal", [Mi, dn] = Z(ta, {
1637
+ Qe.displayName = pa;
1638
+ var ma = "MenuPortal", [Wi, wn] = Z(ma, {
1401
1639
  forceMount: void 0
1402
- }), L = "MenuContent", [na, Qe] = Z(L), fn = a.forwardRef(
1640
+ }), L = "MenuContent", [va, qe] = Z(L), Cn = a.forwardRef(
1403
1641
  (e, t) => {
1404
- const n = dn(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = re(L, e.__scopeMenu), s = me(L, e.__scopeMenu);
1405
- return /* @__PURE__ */ d(le.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(Me, { present: r || i.open, children: /* @__PURE__ */ d(le.Slot, { scope: e.__scopeMenu, children: s.modal ? /* @__PURE__ */ d(ra, { ...o, ref: t }) : /* @__PURE__ */ d(oa, { ...o, ref: t }) }) }) });
1642
+ const n = wn(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = oe(L, e.__scopeMenu), s = me(L, e.__scopeMenu);
1643
+ return /* @__PURE__ */ v(de.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ v(Pe, { present: r || i.open, children: /* @__PURE__ */ v(de.Slot, { scope: e.__scopeMenu, children: s.modal ? /* @__PURE__ */ v(ha, { ...o, ref: t }) : /* @__PURE__ */ v(ga, { ...o, ref: t }) }) }) });
1406
1644
  }
1407
- ), ra = a.forwardRef(
1645
+ ), ha = a.forwardRef(
1408
1646
  (e, t) => {
1409
- const n = re(L, e.__scopeMenu), r = a.useRef(null), o = k(t, r);
1647
+ const n = oe(L, e.__scopeMenu), r = a.useRef(null), o = $(t, r);
1410
1648
  return a.useEffect(() => {
1411
1649
  const i = r.current;
1412
- if (i) return nr(i);
1413
- }, []), /* @__PURE__ */ d(
1414
- qe,
1650
+ if (i) return ur(i);
1651
+ }, []), /* @__PURE__ */ v(
1652
+ Je,
1415
1653
  {
1416
1654
  ...e,
1417
1655
  ref: o,
1418
1656
  trapFocus: n.open,
1419
1657
  disableOutsidePointerEvents: n.open,
1420
1658
  disableOutsideScroll: !0,
1421
- onFocusOutside: S(
1659
+ onFocusOutside: M(
1422
1660
  e.onFocusOutside,
1423
1661
  (i) => i.preventDefault(),
1424
1662
  { checkForDefaultPrevented: !1 }
@@ -1427,10 +1665,10 @@ var ta = "MenuPortal", [Mi, dn] = Z(ta, {
1427
1665
  }
1428
1666
  );
1429
1667
  }
1430
- ), oa = a.forwardRef((e, t) => {
1431
- const n = re(L, e.__scopeMenu);
1432
- return /* @__PURE__ */ d(
1433
- qe,
1668
+ ), ga = a.forwardRef((e, t) => {
1669
+ const n = oe(L, e.__scopeMenu);
1670
+ return /* @__PURE__ */ v(
1671
+ Je,
1434
1672
  {
1435
1673
  ...e,
1436
1674
  ref: t,
@@ -1440,7 +1678,7 @@ var ta = "MenuPortal", [Mi, dn] = Z(ta, {
1440
1678
  onDismiss: () => n.onOpenChange(!1)
1441
1679
  }
1442
1680
  );
1443
- }), qe = a.forwardRef(
1681
+ }), Je = a.forwardRef(
1444
1682
  (e, t) => {
1445
1683
  const {
1446
1684
  __scopeMenu: n,
@@ -1449,28 +1687,28 @@ var ta = "MenuPortal", [Mi, dn] = Z(ta, {
1449
1687
  onOpenAutoFocus: i,
1450
1688
  onCloseAutoFocus: s,
1451
1689
  disableOutsidePointerEvents: c,
1452
- onEntryFocus: f,
1690
+ onEntryFocus: l,
1453
1691
  onEscapeKeyDown: u,
1454
1692
  onPointerDownOutside: p,
1455
- onFocusOutside: m,
1456
- onInteractOutside: v,
1457
- onDismiss: w,
1693
+ onFocusOutside: f,
1694
+ onInteractOutside: m,
1695
+ onDismiss: g,
1458
1696
  disableOutsideScroll: h,
1459
- ...l
1460
- } = e, E = re(L, n), g = me(L, n), _ = Ne(n), C = un(n), R = Zo(n), [M, x] = a.useState(null), b = a.useRef(null), P = k(t, b, E.onContentChange), I = a.useRef(0), T = a.useRef(""), z = a.useRef(0), X = a.useRef(null), B = a.useRef("right"), Q = a.useRef(0), q = h ? an : a.Fragment, W = h ? { as: Ye, allowPinchZoom: !0 } : void 0, J = (y) => {
1461
- var K, ie;
1462
- const A = T.current + y, N = R().filter((F) => !F.disabled), $ = document.activeElement, oe = (K = N.find((F) => F.ref.current === $)) == null ? void 0 : K.textValue, ae = N.map((F) => F.textValue), ve = ha(ae, A, oe), j = (ie = N.find((F) => F.textValue === ve)) == null ? void 0 : ie.ref.current;
1463
- (function F(ce) {
1464
- T.current = ce, window.clearTimeout(I.current), ce !== "" && (I.current = window.setTimeout(() => F(""), 1e3));
1465
- })(A), j && setTimeout(() => j.focus());
1697
+ ...d
1698
+ } = e, C = oe(L, n), w = me(L, n), _ = Ne(n), b = hn(n), E = ua(n), [R, x] = a.useState(null), S = a.useRef(null), P = $(t, S, C.onContentChange), I = a.useRef(0), T = a.useRef(""), z = a.useRef(0), X = a.useRef(null), U = a.useRef("right"), Q = a.useRef(0), q = h ? pn : a.Fragment, k = h ? { as: Xe, allowPinchZoom: !0 } : void 0, J = (y) => {
1699
+ var K, ce;
1700
+ const A = T.current + y, N = E().filter((F) => !F.disabled), B = document.activeElement, ae = (K = N.find((F) => F.ref.current === B)) == null ? void 0 : K.textValue, ie = N.map((F) => F.textValue), ve = Na(ie, A, ae), H = (ce = N.find((F) => F.textValue === ve)) == null ? void 0 : ce.ref.current;
1701
+ (function F(se) {
1702
+ T.current = se, window.clearTimeout(I.current), se !== "" && (I.current = window.setTimeout(() => F(""), 1e3));
1703
+ })(A), H && setTimeout(() => H.focus());
1466
1704
  };
1467
- a.useEffect(() => () => window.clearTimeout(I.current), []), Rr();
1705
+ a.useEffect(() => () => window.clearTimeout(I.current), []), Fr();
1468
1706
  const O = a.useCallback((y) => {
1469
- var N, $;
1470
- return B.current === ((N = X.current) == null ? void 0 : N.side) && wa(y, ($ = X.current) == null ? void 0 : $.area);
1707
+ var N, B;
1708
+ return U.current === ((N = X.current) == null ? void 0 : N.side) && Aa(y, (B = X.current) == null ? void 0 : B.area);
1471
1709
  }, []);
1472
- return /* @__PURE__ */ d(
1473
- na,
1710
+ return /* @__PURE__ */ v(
1711
+ va,
1474
1712
  {
1475
1713
  scope: n,
1476
1714
  searchRef: T,
@@ -1483,7 +1721,7 @@ var ta = "MenuPortal", [Mi, dn] = Z(ta, {
1483
1721
  onItemLeave: a.useCallback(
1484
1722
  (y) => {
1485
1723
  var A;
1486
- O(y) || ((A = b.current) == null || A.focus(), x(null));
1724
+ O(y) || ((A = S.current) == null || A.focus(), x(null));
1487
1725
  },
1488
1726
  [O]
1489
1727
  ),
@@ -1497,71 +1735,71 @@ var ta = "MenuPortal", [Mi, dn] = Z(ta, {
1497
1735
  onPointerGraceIntentChange: a.useCallback((y) => {
1498
1736
  X.current = y;
1499
1737
  }, []),
1500
- children: /* @__PURE__ */ d(q, { ...W, children: /* @__PURE__ */ d(
1501
- Dt,
1738
+ children: /* @__PURE__ */ v(q, { ...k, children: /* @__PURE__ */ v(
1739
+ $t,
1502
1740
  {
1503
1741
  asChild: !0,
1504
1742
  trapped: o,
1505
- onMountAutoFocus: S(i, (y) => {
1743
+ onMountAutoFocus: M(i, (y) => {
1506
1744
  var A;
1507
- y.preventDefault(), (A = b.current) == null || A.focus({ preventScroll: !0 });
1745
+ y.preventDefault(), (A = S.current) == null || A.focus({ preventScroll: !0 });
1508
1746
  }),
1509
1747
  onUnmountAutoFocus: s,
1510
- children: /* @__PURE__ */ d(
1511
- It,
1748
+ children: /* @__PURE__ */ v(
1749
+ Lt,
1512
1750
  {
1513
1751
  asChild: !0,
1514
1752
  disableOutsidePointerEvents: c,
1515
1753
  onEscapeKeyDown: u,
1516
1754
  onPointerDownOutside: p,
1517
- onFocusOutside: m,
1518
- onInteractOutside: v,
1519
- onDismiss: w,
1520
- children: /* @__PURE__ */ d(
1521
- uo,
1755
+ onFocusOutside: f,
1756
+ onInteractOutside: m,
1757
+ onDismiss: g,
1758
+ children: /* @__PURE__ */ v(
1759
+ So,
1522
1760
  {
1523
1761
  asChild: !0,
1524
- ...C,
1525
- dir: g.dir,
1762
+ ...b,
1763
+ dir: w.dir,
1526
1764
  orientation: "vertical",
1527
1765
  loop: r,
1528
- currentTabStopId: M,
1766
+ currentTabStopId: R,
1529
1767
  onCurrentTabStopIdChange: x,
1530
- onEntryFocus: S(f, (y) => {
1531
- g.isUsingKeyboardRef.current || y.preventDefault();
1768
+ onEntryFocus: M(l, (y) => {
1769
+ w.isUsingKeyboardRef.current || y.preventDefault();
1532
1770
  }),
1533
1771
  preventScrollOnEntryFocus: !0,
1534
- children: /* @__PURE__ */ d(
1535
- Gr,
1772
+ children: /* @__PURE__ */ v(
1773
+ Jr,
1536
1774
  {
1537
1775
  role: "menu",
1538
1776
  "aria-orientation": "vertical",
1539
- "data-state": xn(E.open),
1777
+ "data-state": Fn(C.open),
1540
1778
  "data-radix-menu-content": "",
1541
- dir: g.dir,
1779
+ dir: w.dir,
1542
1780
  ..._,
1543
- ...l,
1781
+ ...d,
1544
1782
  ref: P,
1545
- style: { outline: "none", ...l.style },
1546
- onKeyDown: S(l.onKeyDown, (y) => {
1547
- const N = y.target.closest("[data-radix-menu-content]") === y.currentTarget, $ = y.ctrlKey || y.altKey || y.metaKey, oe = y.key.length === 1;
1548
- N && (y.key === "Tab" && y.preventDefault(), !$ && oe && J(y.key));
1549
- const ae = b.current;
1550
- if (y.target !== ae || !Yo.includes(y.key)) return;
1783
+ style: { outline: "none", ...d.style },
1784
+ onKeyDown: M(d.onKeyDown, (y) => {
1785
+ const N = y.target.closest("[data-radix-menu-content]") === y.currentTarget, B = y.ctrlKey || y.altKey || y.metaKey, ae = y.key.length === 1;
1786
+ N && (y.key === "Tab" && y.preventDefault(), !B && ae && J(y.key));
1787
+ const ie = S.current;
1788
+ if (y.target !== ie || !ia.includes(y.key)) return;
1551
1789
  y.preventDefault();
1552
- const j = R().filter((K) => !K.disabled).map((K) => K.ref.current);
1553
- cn.includes(y.key) && j.reverse(), ma(j);
1790
+ const H = E().filter((K) => !K.disabled).map((K) => K.ref.current);
1791
+ mn.includes(y.key) && H.reverse(), Ma(H);
1554
1792
  }),
1555
- onBlur: S(e.onBlur, (y) => {
1793
+ onBlur: M(e.onBlur, (y) => {
1556
1794
  y.currentTarget.contains(y.target) || (window.clearTimeout(I.current), T.current = "");
1557
1795
  }),
1558
- onPointerMove: S(
1796
+ onPointerMove: M(
1559
1797
  e.onPointerMove,
1560
- de((y) => {
1798
+ fe((y) => {
1561
1799
  const A = y.target, N = Q.current !== y.clientX;
1562
1800
  if (y.currentTarget.contains(A) && N) {
1563
- const $ = y.clientX > Q.current ? "right" : "left";
1564
- B.current = $, Q.current = y.clientX;
1801
+ const B = y.clientX > Q.current ? "right" : "left";
1802
+ U.current = B, Q.current = y.clientX;
1565
1803
  }
1566
1804
  })
1567
1805
  )
@@ -1577,68 +1815,68 @@ var ta = "MenuPortal", [Mi, dn] = Z(ta, {
1577
1815
  );
1578
1816
  }
1579
1817
  );
1580
- fn.displayName = L;
1581
- var aa = "MenuGroup", Je = a.forwardRef(
1818
+ Cn.displayName = L;
1819
+ var wa = "MenuGroup", et = a.forwardRef(
1582
1820
  (e, t) => {
1583
1821
  const { __scopeMenu: n, ...r } = e;
1584
- return /* @__PURE__ */ d(U.div, { role: "group", ...r, ref: t });
1822
+ return /* @__PURE__ */ v(W.div, { role: "group", ...r, ref: t });
1585
1823
  }
1586
1824
  );
1587
- Je.displayName = aa;
1588
- var ia = "MenuLabel", pn = a.forwardRef(
1825
+ et.displayName = wa;
1826
+ var Ca = "MenuLabel", yn = a.forwardRef(
1589
1827
  (e, t) => {
1590
1828
  const { __scopeMenu: n, ...r } = e;
1591
- return /* @__PURE__ */ d(U.div, { ...r, ref: t });
1829
+ return /* @__PURE__ */ v(W.div, { ...r, ref: t });
1592
1830
  }
1593
1831
  );
1594
- pn.displayName = ia;
1595
- var be = "MenuItem", _t = "menu.itemSelect", Ie = a.forwardRef(
1832
+ yn.displayName = Ca;
1833
+ var Ee = "MenuItem", Rt = "menu.itemSelect", Ie = a.forwardRef(
1596
1834
  (e, t) => {
1597
- const { disabled: n = !1, onSelect: r, ...o } = e, i = a.useRef(null), s = me(be, e.__scopeMenu), c = Qe(be, e.__scopeMenu), f = k(t, i), u = a.useRef(!1), p = () => {
1598
- const m = i.current;
1599
- if (!n && m) {
1600
- const v = new CustomEvent(_t, { bubbles: !0, cancelable: !0 });
1601
- m.addEventListener(_t, (w) => r == null ? void 0 : r(w), { once: !0 }), xt(m, v), v.defaultPrevented ? u.current = !1 : s.onClose();
1835
+ const { disabled: n = !1, onSelect: r, ...o } = e, i = a.useRef(null), s = me(Ee, e.__scopeMenu), c = qe(Ee, e.__scopeMenu), l = $(t, i), u = a.useRef(!1), p = () => {
1836
+ const f = i.current;
1837
+ if (!n && f) {
1838
+ const m = new CustomEvent(Rt, { bubbles: !0, cancelable: !0 });
1839
+ f.addEventListener(Rt, (g) => r == null ? void 0 : r(g), { once: !0 }), Ot(f, m), m.defaultPrevented ? u.current = !1 : s.onClose();
1602
1840
  }
1603
1841
  };
1604
- return /* @__PURE__ */ d(
1605
- mn,
1842
+ return /* @__PURE__ */ v(
1843
+ _n,
1606
1844
  {
1607
1845
  ...o,
1608
- ref: f,
1846
+ ref: l,
1609
1847
  disabled: n,
1610
- onClick: S(e.onClick, p),
1611
- onPointerDown: (m) => {
1612
- var v;
1613
- (v = e.onPointerDown) == null || v.call(e, m), u.current = !0;
1848
+ onClick: M(e.onClick, p),
1849
+ onPointerDown: (f) => {
1850
+ var m;
1851
+ (m = e.onPointerDown) == null || m.call(e, f), u.current = !0;
1614
1852
  },
1615
- onPointerUp: S(e.onPointerUp, (m) => {
1616
- var v;
1617
- u.current || (v = m.currentTarget) == null || v.click();
1853
+ onPointerUp: M(e.onPointerUp, (f) => {
1854
+ var m;
1855
+ u.current || (m = f.currentTarget) == null || m.click();
1618
1856
  }),
1619
- onKeyDown: S(e.onKeyDown, (m) => {
1620
- const v = c.searchRef.current !== "";
1621
- n || v && m.key === " " || Ve.includes(m.key) && (m.currentTarget.click(), m.preventDefault());
1857
+ onKeyDown: M(e.onKeyDown, (f) => {
1858
+ const m = c.searchRef.current !== "";
1859
+ n || m && f.key === " " || Ve.includes(f.key) && (f.currentTarget.click(), f.preventDefault());
1622
1860
  })
1623
1861
  }
1624
1862
  );
1625
1863
  }
1626
1864
  );
1627
- Ie.displayName = be;
1628
- var mn = a.forwardRef(
1865
+ Ie.displayName = Ee;
1866
+ var _n = a.forwardRef(
1629
1867
  (e, t) => {
1630
- const { __scopeMenu: n, disabled: r = !1, textValue: o, ...i } = e, s = Qe(be, n), c = un(n), f = a.useRef(null), u = k(t, f), [p, m] = a.useState(!1), [v, w] = a.useState("");
1868
+ const { __scopeMenu: n, disabled: r = !1, textValue: o, ...i } = e, s = qe(Ee, n), c = hn(n), l = a.useRef(null), u = $(t, l), [p, f] = a.useState(!1), [m, g] = a.useState("");
1631
1869
  return a.useEffect(() => {
1632
- const h = f.current;
1633
- h && w((h.textContent ?? "").trim());
1634
- }, [i.children]), /* @__PURE__ */ d(
1635
- le.ItemSlot,
1870
+ const h = l.current;
1871
+ h && g((h.textContent ?? "").trim());
1872
+ }, [i.children]), /* @__PURE__ */ v(
1873
+ de.ItemSlot,
1636
1874
  {
1637
1875
  scope: n,
1638
1876
  disabled: r,
1639
- textValue: o ?? v,
1640
- children: /* @__PURE__ */ d(lo, { asChild: !0, ...c, focusable: !r, children: /* @__PURE__ */ d(
1641
- U.div,
1877
+ textValue: o ?? m,
1878
+ children: /* @__PURE__ */ v(Eo, { asChild: !0, ...c, focusable: !r, children: /* @__PURE__ */ v(
1879
+ W.div,
1642
1880
  {
1643
1881
  role: "menuitem",
1644
1882
  "data-highlighted": p ? "" : void 0,
@@ -1646,67 +1884,67 @@ var mn = a.forwardRef(
1646
1884
  "data-disabled": r ? "" : void 0,
1647
1885
  ...i,
1648
1886
  ref: u,
1649
- onPointerMove: S(
1887
+ onPointerMove: M(
1650
1888
  e.onPointerMove,
1651
- de((h) => {
1889
+ fe((h) => {
1652
1890
  r ? s.onItemLeave(h) : (s.onItemEnter(h), h.defaultPrevented || h.currentTarget.focus({ preventScroll: !0 }));
1653
1891
  })
1654
1892
  ),
1655
- onPointerLeave: S(
1893
+ onPointerLeave: M(
1656
1894
  e.onPointerLeave,
1657
- de((h) => s.onItemLeave(h))
1895
+ fe((h) => s.onItemLeave(h))
1658
1896
  ),
1659
- onFocus: S(e.onFocus, () => m(!0)),
1660
- onBlur: S(e.onBlur, () => m(!1))
1897
+ onFocus: M(e.onFocus, () => f(!0)),
1898
+ onBlur: M(e.onBlur, () => f(!1))
1661
1899
  }
1662
1900
  ) })
1663
1901
  }
1664
1902
  );
1665
1903
  }
1666
- ), ca = "MenuCheckboxItem", vn = a.forwardRef(
1904
+ ), ya = "MenuCheckboxItem", bn = a.forwardRef(
1667
1905
  (e, t) => {
1668
1906
  const { checked: n = !1, onCheckedChange: r, ...o } = e;
1669
- return /* @__PURE__ */ d(yn, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ d(
1907
+ return /* @__PURE__ */ v(Mn, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ v(
1670
1908
  Ie,
1671
1909
  {
1672
1910
  role: "menuitemcheckbox",
1673
- "aria-checked": Se(n) ? "mixed" : n,
1911
+ "aria-checked": Re(n) ? "mixed" : n,
1674
1912
  ...o,
1675
1913
  ref: t,
1676
- "data-state": tt(n),
1677
- onSelect: S(
1914
+ "data-state": nt(n),
1915
+ onSelect: M(
1678
1916
  o.onSelect,
1679
- () => r == null ? void 0 : r(Se(n) ? !0 : !n),
1917
+ () => r == null ? void 0 : r(Re(n) ? !0 : !n),
1680
1918
  { checkForDefaultPrevented: !1 }
1681
1919
  )
1682
1920
  }
1683
1921
  ) });
1684
1922
  }
1685
1923
  );
1686
- vn.displayName = ca;
1687
- var hn = "MenuRadioGroup", [sa, ua] = Z(
1688
- hn,
1924
+ bn.displayName = ya;
1925
+ var Sn = "MenuRadioGroup", [_a, ba] = Z(
1926
+ Sn,
1689
1927
  { value: void 0, onValueChange: () => {
1690
1928
  } }
1691
- ), gn = a.forwardRef(
1929
+ ), En = a.forwardRef(
1692
1930
  (e, t) => {
1693
- const { value: n, onValueChange: r, ...o } = e, i = Y(r);
1694
- return /* @__PURE__ */ d(sa, { scope: e.__scopeMenu, value: n, onValueChange: i, children: /* @__PURE__ */ d(Je, { ...o, ref: t }) });
1931
+ const { value: n, onValueChange: r, ...o } = e, i = j(r);
1932
+ return /* @__PURE__ */ v(_a, { scope: e.__scopeMenu, value: n, onValueChange: i, children: /* @__PURE__ */ v(et, { ...o, ref: t }) });
1695
1933
  }
1696
1934
  );
1697
- gn.displayName = hn;
1698
- var wn = "MenuRadioItem", En = a.forwardRef(
1935
+ En.displayName = Sn;
1936
+ var Rn = "MenuRadioItem", Pn = a.forwardRef(
1699
1937
  (e, t) => {
1700
- const { value: n, ...r } = e, o = ua(wn, e.__scopeMenu), i = n === o.value;
1701
- return /* @__PURE__ */ d(yn, { scope: e.__scopeMenu, checked: i, children: /* @__PURE__ */ d(
1938
+ const { value: n, ...r } = e, o = ba(Rn, e.__scopeMenu), i = n === o.value;
1939
+ return /* @__PURE__ */ v(Mn, { scope: e.__scopeMenu, checked: i, children: /* @__PURE__ */ v(
1702
1940
  Ie,
1703
1941
  {
1704
1942
  role: "menuitemradio",
1705
1943
  "aria-checked": i,
1706
1944
  ...r,
1707
1945
  ref: t,
1708
- "data-state": tt(i),
1709
- onSelect: S(
1946
+ "data-state": nt(i),
1947
+ onSelect: M(
1710
1948
  r.onSelect,
1711
1949
  () => {
1712
1950
  var s;
@@ -1718,35 +1956,35 @@ var wn = "MenuRadioItem", En = a.forwardRef(
1718
1956
  ) });
1719
1957
  }
1720
1958
  );
1721
- En.displayName = wn;
1722
- var et = "MenuItemIndicator", [yn, la] = Z(
1723
- et,
1959
+ Pn.displayName = Rn;
1960
+ var tt = "MenuItemIndicator", [Mn, Sa] = Z(
1961
+ tt,
1724
1962
  { checked: !1 }
1725
- ), _n = a.forwardRef(
1963
+ ), xn = a.forwardRef(
1726
1964
  (e, t) => {
1727
- const { __scopeMenu: n, forceMount: r, ...o } = e, i = la(et, n);
1728
- return /* @__PURE__ */ d(
1729
- Me,
1965
+ const { __scopeMenu: n, forceMount: r, ...o } = e, i = Sa(tt, n);
1966
+ return /* @__PURE__ */ v(
1967
+ Pe,
1730
1968
  {
1731
- present: r || Se(i.checked) || i.checked === !0,
1732
- children: /* @__PURE__ */ d(
1733
- U.span,
1969
+ present: r || Re(i.checked) || i.checked === !0,
1970
+ children: /* @__PURE__ */ v(
1971
+ W.span,
1734
1972
  {
1735
1973
  ...o,
1736
1974
  ref: t,
1737
- "data-state": tt(i.checked)
1975
+ "data-state": nt(i.checked)
1738
1976
  }
1739
1977
  )
1740
1978
  }
1741
1979
  );
1742
1980
  }
1743
1981
  );
1744
- _n.displayName = et;
1745
- var da = "MenuSeparator", Cn = a.forwardRef(
1982
+ xn.displayName = tt;
1983
+ var Ea = "MenuSeparator", Nn = a.forwardRef(
1746
1984
  (e, t) => {
1747
1985
  const { __scopeMenu: n, ...r } = e;
1748
- return /* @__PURE__ */ d(
1749
- U.div,
1986
+ return /* @__PURE__ */ v(
1987
+ W.div,
1750
1988
  {
1751
1989
  role: "separator",
1752
1990
  "aria-orientation": "horizontal",
@@ -1756,90 +1994,90 @@ var da = "MenuSeparator", Cn = a.forwardRef(
1756
1994
  );
1757
1995
  }
1758
1996
  );
1759
- Cn.displayName = da;
1760
- var fa = "MenuArrow", bn = a.forwardRef(
1997
+ Nn.displayName = Ea;
1998
+ var Ra = "MenuArrow", In = a.forwardRef(
1761
1999
  (e, t) => {
1762
2000
  const { __scopeMenu: n, ...r } = e, o = Ne(n);
1763
- return /* @__PURE__ */ d(zr, { ...o, ...r, ref: t });
2001
+ return /* @__PURE__ */ v(eo, { ...o, ...r, ref: t });
1764
2002
  }
1765
2003
  );
1766
- bn.displayName = fa;
1767
- var pa = "MenuSub", [Pi, Sn] = Z(pa), ue = "MenuSubTrigger", Rn = a.forwardRef(
2004
+ In.displayName = Ra;
2005
+ var Pa = "MenuSub", [Bi, An] = Z(Pa), le = "MenuSubTrigger", Dn = a.forwardRef(
1768
2006
  (e, t) => {
1769
- const n = re(ue, e.__scopeMenu), r = me(ue, e.__scopeMenu), o = Sn(ue, e.__scopeMenu), i = Qe(ue, e.__scopeMenu), s = a.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: f } = i, u = { __scopeMenu: e.__scopeMenu }, p = a.useCallback(() => {
2007
+ const n = oe(le, e.__scopeMenu), r = me(le, e.__scopeMenu), o = An(le, e.__scopeMenu), i = qe(le, e.__scopeMenu), s = a.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: l } = i, u = { __scopeMenu: e.__scopeMenu }, p = a.useCallback(() => {
1770
2008
  s.current && window.clearTimeout(s.current), s.current = null;
1771
2009
  }, []);
1772
2010
  return a.useEffect(() => p, [p]), a.useEffect(() => {
1773
- const m = c.current;
2011
+ const f = c.current;
1774
2012
  return () => {
1775
- window.clearTimeout(m), f(null);
2013
+ window.clearTimeout(f), l(null);
1776
2014
  };
1777
- }, [c, f]), /* @__PURE__ */ d(Ze, { asChild: !0, ...u, children: /* @__PURE__ */ d(
1778
- mn,
2015
+ }, [c, l]), /* @__PURE__ */ v(Qe, { asChild: !0, ...u, children: /* @__PURE__ */ v(
2016
+ _n,
1779
2017
  {
1780
2018
  id: o.triggerId,
1781
2019
  "aria-haspopup": "menu",
1782
2020
  "aria-expanded": n.open,
1783
2021
  "aria-controls": o.contentId,
1784
- "data-state": xn(n.open),
2022
+ "data-state": Fn(n.open),
1785
2023
  ...e,
1786
- ref: fe(t, o.onTriggerChange),
1787
- onClick: (m) => {
1788
- var v;
1789
- (v = e.onClick) == null || v.call(e, m), !(e.disabled || m.defaultPrevented) && (m.currentTarget.focus(), n.open || n.onOpenChange(!0));
2024
+ ref: je(t, o.onTriggerChange),
2025
+ onClick: (f) => {
2026
+ var m;
2027
+ (m = e.onClick) == null || m.call(e, f), !(e.disabled || f.defaultPrevented) && (f.currentTarget.focus(), n.open || n.onOpenChange(!0));
1790
2028
  },
1791
- onPointerMove: S(
2029
+ onPointerMove: M(
1792
2030
  e.onPointerMove,
1793
- de((m) => {
1794
- i.onItemEnter(m), !m.defaultPrevented && !e.disabled && !n.open && !s.current && (i.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
2031
+ fe((f) => {
2032
+ i.onItemEnter(f), !f.defaultPrevented && !e.disabled && !n.open && !s.current && (i.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
1795
2033
  n.onOpenChange(!0), p();
1796
2034
  }, 100));
1797
2035
  })
1798
2036
  ),
1799
- onPointerLeave: S(
2037
+ onPointerLeave: M(
1800
2038
  e.onPointerLeave,
1801
- de((m) => {
1802
- var w, h;
2039
+ fe((f) => {
2040
+ var g, h;
1803
2041
  p();
1804
- const v = (w = n.content) == null ? void 0 : w.getBoundingClientRect();
1805
- if (v) {
1806
- const l = (h = n.content) == null ? void 0 : h.dataset.side, E = l === "right", g = E ? -5 : 5, _ = v[E ? "left" : "right"], C = v[E ? "right" : "left"];
2042
+ const m = (g = n.content) == null ? void 0 : g.getBoundingClientRect();
2043
+ if (m) {
2044
+ const d = (h = n.content) == null ? void 0 : h.dataset.side, C = d === "right", w = C ? -5 : 5, _ = m[C ? "left" : "right"], b = m[C ? "right" : "left"];
1807
2045
  i.onPointerGraceIntentChange({
1808
2046
  area: [
1809
2047
  // Apply a bleed on clientX to ensure that our exit point is
1810
2048
  // consistently within polygon bounds
1811
- { x: m.clientX + g, y: m.clientY },
1812
- { x: _, y: v.top },
1813
- { x: C, y: v.top },
1814
- { x: C, y: v.bottom },
1815
- { x: _, y: v.bottom }
2049
+ { x: f.clientX + w, y: f.clientY },
2050
+ { x: _, y: m.top },
2051
+ { x: b, y: m.top },
2052
+ { x: b, y: m.bottom },
2053
+ { x: _, y: m.bottom }
1816
2054
  ],
1817
- side: l
2055
+ side: d
1818
2056
  }), window.clearTimeout(c.current), c.current = window.setTimeout(
1819
2057
  () => i.onPointerGraceIntentChange(null),
1820
2058
  300
1821
2059
  );
1822
2060
  } else {
1823
- if (i.onTriggerLeave(m), m.defaultPrevented) return;
2061
+ if (i.onTriggerLeave(f), f.defaultPrevented) return;
1824
2062
  i.onPointerGraceIntentChange(null);
1825
2063
  }
1826
2064
  })
1827
2065
  ),
1828
- onKeyDown: S(e.onKeyDown, (m) => {
1829
- var w;
1830
- const v = i.searchRef.current !== "";
1831
- e.disabled || v && m.key === " " || Xo[r.dir].includes(m.key) && (n.onOpenChange(!0), (w = n.content) == null || w.focus(), m.preventDefault());
2066
+ onKeyDown: M(e.onKeyDown, (f) => {
2067
+ var g;
2068
+ const m = i.searchRef.current !== "";
2069
+ e.disabled || m && f.key === " " || ca[r.dir].includes(f.key) && (n.onOpenChange(!0), (g = n.content) == null || g.focus(), f.preventDefault());
1832
2070
  })
1833
2071
  }
1834
2072
  ) });
1835
2073
  }
1836
2074
  );
1837
- Rn.displayName = ue;
1838
- var Mn = "MenuSubContent", Pn = a.forwardRef(
2075
+ Dn.displayName = le;
2076
+ var Tn = "MenuSubContent", On = a.forwardRef(
1839
2077
  (e, t) => {
1840
- const n = dn(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = re(L, e.__scopeMenu), s = me(L, e.__scopeMenu), c = Sn(Mn, e.__scopeMenu), f = a.useRef(null), u = k(t, f);
1841
- return /* @__PURE__ */ d(le.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(Me, { present: r || i.open, children: /* @__PURE__ */ d(le.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(
1842
- qe,
2078
+ const n = wn(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = oe(L, e.__scopeMenu), s = me(L, e.__scopeMenu), c = An(Tn, e.__scopeMenu), l = a.useRef(null), u = $(t, l);
2079
+ return /* @__PURE__ */ v(de.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ v(Pe, { present: r || i.open, children: /* @__PURE__ */ v(de.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ v(
2080
+ Je,
1843
2081
  {
1844
2082
  id: c.contentId,
1845
2083
  "aria-labelledby": c.triggerId,
@@ -1851,73 +2089,73 @@ var Mn = "MenuSubContent", Pn = a.forwardRef(
1851
2089
  disableOutsideScroll: !1,
1852
2090
  trapFocus: !1,
1853
2091
  onOpenAutoFocus: (p) => {
1854
- var m;
1855
- s.isUsingKeyboardRef.current && ((m = f.current) == null || m.focus()), p.preventDefault();
2092
+ var f;
2093
+ s.isUsingKeyboardRef.current && ((f = l.current) == null || f.focus()), p.preventDefault();
1856
2094
  },
1857
2095
  onCloseAutoFocus: (p) => p.preventDefault(),
1858
- onFocusOutside: S(e.onFocusOutside, (p) => {
2096
+ onFocusOutside: M(e.onFocusOutside, (p) => {
1859
2097
  p.target !== c.trigger && i.onOpenChange(!1);
1860
2098
  }),
1861
- onEscapeKeyDown: S(e.onEscapeKeyDown, (p) => {
2099
+ onEscapeKeyDown: M(e.onEscapeKeyDown, (p) => {
1862
2100
  s.onClose(), p.preventDefault();
1863
2101
  }),
1864
- onKeyDown: S(e.onKeyDown, (p) => {
1865
- var w;
1866
- const m = p.currentTarget.contains(p.target), v = jo[s.dir].includes(p.key);
1867
- m && v && (i.onOpenChange(!1), (w = c.trigger) == null || w.focus(), p.preventDefault());
2102
+ onKeyDown: M(e.onKeyDown, (p) => {
2103
+ var g;
2104
+ const f = p.currentTarget.contains(p.target), m = sa[s.dir].includes(p.key);
2105
+ f && m && (i.onOpenChange(!1), (g = c.trigger) == null || g.focus(), p.preventDefault());
1868
2106
  })
1869
2107
  }
1870
2108
  ) }) }) });
1871
2109
  }
1872
2110
  );
1873
- Pn.displayName = Mn;
1874
- function xn(e) {
2111
+ On.displayName = Tn;
2112
+ function Fn(e) {
1875
2113
  return e ? "open" : "closed";
1876
2114
  }
1877
- function Se(e) {
2115
+ function Re(e) {
1878
2116
  return e === "indeterminate";
1879
2117
  }
1880
- function tt(e) {
1881
- return Se(e) ? "indeterminate" : e ? "checked" : "unchecked";
2118
+ function nt(e) {
2119
+ return Re(e) ? "indeterminate" : e ? "checked" : "unchecked";
1882
2120
  }
1883
- function ma(e) {
2121
+ function Ma(e) {
1884
2122
  const t = document.activeElement;
1885
2123
  for (const n of e)
1886
2124
  if (n === t || (n.focus(), document.activeElement !== t)) return;
1887
2125
  }
1888
- function va(e, t) {
2126
+ function xa(e, t) {
1889
2127
  return e.map((n, r) => e[(t + r) % e.length]);
1890
2128
  }
1891
- function ha(e, t, n) {
2129
+ function Na(e, t, n) {
1892
2130
  const o = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1;
1893
- let s = va(e, Math.max(i, 0));
2131
+ let s = xa(e, Math.max(i, 0));
1894
2132
  o.length === 1 && (s = s.filter((u) => u !== n));
1895
- const f = s.find(
2133
+ const l = s.find(
1896
2134
  (u) => u.toLowerCase().startsWith(o.toLowerCase())
1897
2135
  );
1898
- return f !== n ? f : void 0;
2136
+ return l !== n ? l : void 0;
1899
2137
  }
1900
- function ga(e, t) {
2138
+ function Ia(e, t) {
1901
2139
  const { x: n, y: r } = e;
1902
2140
  let o = !1;
1903
2141
  for (let i = 0, s = t.length - 1; i < t.length; s = i++) {
1904
- const c = t[i].x, f = t[i].y, u = t[s].x, p = t[s].y;
1905
- f > r != p > r && n < (u - c) * (r - f) / (p - f) + c && (o = !o);
2142
+ const c = t[i].x, l = t[i].y, u = t[s].x, p = t[s].y;
2143
+ l > r != p > r && n < (u - c) * (r - l) / (p - l) + c && (o = !o);
1906
2144
  }
1907
2145
  return o;
1908
2146
  }
1909
- function wa(e, t) {
2147
+ function Aa(e, t) {
1910
2148
  if (!t) return !1;
1911
2149
  const n = { x: e.clientX, y: e.clientY };
1912
- return ga(n, t);
2150
+ return Ia(n, t);
1913
2151
  }
1914
- function de(e) {
2152
+ function fe(e) {
1915
2153
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
1916
2154
  }
1917
- var Ea = ln, ya = Ze, _a = fn, Ca = Je, ba = pn, Sa = Ie, Ra = vn, Ma = gn, Pa = En, xa = _n, Na = Cn, Ia = bn, Aa = Rn, Da = Pn, nt = "DropdownMenu", [Ta, xi] = Re(
1918
- nt,
1919
- [sn]
1920
- ), D = sn(), [Oa, Nn] = Ta(nt), In = (e) => {
2155
+ var Da = gn, Ta = Qe, Oa = Cn, Fa = et, La = yn, ka = Ie, $a = bn, Wa = En, Ba = Pn, Ua = xn, Ka = Nn, Ga = In, za = Dn, Va = On, rt = "DropdownMenu", [Ya, Ui] = mr(
2156
+ rt,
2157
+ [vn]
2158
+ ), D = vn(), [ja, Ln] = Ya(rt), kn = (e) => {
1921
2159
  const {
1922
2160
  __scopeDropdownMenu: t,
1923
2161
  children: n,
@@ -1926,32 +2164,32 @@ var Ea = ln, ya = Ze, _a = fn, Ca = Je, ba = pn, Sa = Ie, Ra = vn, Ma = gn, Pa =
1926
2164
  defaultOpen: i,
1927
2165
  onOpenChange: s,
1928
2166
  modal: c = !0
1929
- } = e, f = D(t), u = a.useRef(null), [p = !1, m] = St({
2167
+ } = e, l = D(t), u = a.useRef(null), [p = !1, f] = Mt({
1930
2168
  prop: o,
1931
2169
  defaultProp: i,
1932
2170
  onChange: s
1933
2171
  });
1934
- return /* @__PURE__ */ d(
1935
- Oa,
2172
+ return /* @__PURE__ */ v(
2173
+ ja,
1936
2174
  {
1937
2175
  scope: t,
1938
- triggerId: We(),
2176
+ triggerId: $e(),
1939
2177
  triggerRef: u,
1940
- contentId: We(),
2178
+ contentId: $e(),
1941
2179
  open: p,
1942
- onOpenChange: m,
1943
- onOpenToggle: a.useCallback(() => m((v) => !v), [m]),
2180
+ onOpenChange: f,
2181
+ onOpenToggle: a.useCallback(() => f((m) => !m), [f]),
1944
2182
  modal: c,
1945
- children: /* @__PURE__ */ d(Ea, { ...f, open: p, onOpenChange: m, dir: r, modal: c, children: n })
2183
+ children: /* @__PURE__ */ v(Da, { ...l, open: p, onOpenChange: f, dir: r, modal: c, children: n })
1946
2184
  }
1947
2185
  );
1948
2186
  };
1949
- In.displayName = nt;
1950
- var An = "DropdownMenuTrigger", Dn = a.forwardRef(
2187
+ kn.displayName = rt;
2188
+ var $n = "DropdownMenuTrigger", Wn = a.forwardRef(
1951
2189
  (e, t) => {
1952
- const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, i = Nn(An, n), s = D(n);
1953
- return /* @__PURE__ */ d(ya, { asChild: !0, ...s, children: /* @__PURE__ */ d(
1954
- fr.button,
2190
+ const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, i = Ln($n, n), s = D(n);
2191
+ return /* @__PURE__ */ v(Ta, { asChild: !0, ...s, children: /* @__PURE__ */ v(
2192
+ _r.button,
1955
2193
  {
1956
2194
  type: "button",
1957
2195
  id: i.triggerId,
@@ -1962,35 +2200,35 @@ var An = "DropdownMenuTrigger", Dn = a.forwardRef(
1962
2200
  "data-disabled": r ? "" : void 0,
1963
2201
  disabled: r,
1964
2202
  ...o,
1965
- ref: fe(t, i.triggerRef),
1966
- onPointerDown: S(e.onPointerDown, (c) => {
2203
+ ref: At(t, i.triggerRef),
2204
+ onPointerDown: Se(e.onPointerDown, (c) => {
1967
2205
  !r && c.button === 0 && c.ctrlKey === !1 && (i.onOpenToggle(), i.open || c.preventDefault());
1968
2206
  }),
1969
- onKeyDown: S(e.onKeyDown, (c) => {
2207
+ onKeyDown: Se(e.onKeyDown, (c) => {
1970
2208
  r || (["Enter", " "].includes(c.key) && i.onOpenToggle(), c.key === "ArrowDown" && i.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(c.key) && c.preventDefault());
1971
2209
  })
1972
2210
  }
1973
2211
  ) });
1974
2212
  }
1975
2213
  );
1976
- Dn.displayName = An;
1977
- var Tn = "DropdownMenuContent", On = a.forwardRef(
2214
+ Wn.displayName = $n;
2215
+ var Bn = "DropdownMenuContent", Un = a.forwardRef(
1978
2216
  (e, t) => {
1979
- const { __scopeDropdownMenu: n, ...r } = e, o = Nn(Tn, n), i = D(n), s = a.useRef(!1);
1980
- return /* @__PURE__ */ d(
1981
- _a,
2217
+ const { __scopeDropdownMenu: n, ...r } = e, o = Ln(Bn, n), i = D(n), s = a.useRef(!1);
2218
+ return /* @__PURE__ */ v(
2219
+ Oa,
1982
2220
  {
1983
2221
  id: o.contentId,
1984
2222
  "aria-labelledby": o.triggerId,
1985
2223
  ...i,
1986
2224
  ...r,
1987
2225
  ref: t,
1988
- onCloseAutoFocus: S(e.onCloseAutoFocus, (c) => {
1989
- var f;
1990
- s.current || (f = o.triggerRef.current) == null || f.focus(), s.current = !1, c.preventDefault();
2226
+ onCloseAutoFocus: Se(e.onCloseAutoFocus, (c) => {
2227
+ var l;
2228
+ s.current || (l = o.triggerRef.current) == null || l.focus(), s.current = !1, c.preventDefault();
1991
2229
  }),
1992
- onInteractOutside: S(e.onInteractOutside, (c) => {
1993
- const f = c.detail.originalEvent, u = f.button === 0 && f.ctrlKey === !0, p = f.button === 2 || u;
2230
+ onInteractOutside: Se(e.onInteractOutside, (c) => {
2231
+ const l = c.detail.originalEvent, u = l.button === 0 && l.ctrlKey === !0, p = l.button === 2 || u;
1994
2232
  (!o.modal || p) && (s.current = !0);
1995
2233
  }),
1996
2234
  style: {
@@ -2005,69 +2243,69 @@ var Tn = "DropdownMenuContent", On = a.forwardRef(
2005
2243
  );
2006
2244
  }
2007
2245
  );
2008
- On.displayName = Tn;
2009
- var Fa = "DropdownMenuGroup", La = a.forwardRef(
2246
+ Un.displayName = Bn;
2247
+ var Xa = "DropdownMenuGroup", Ha = a.forwardRef(
2010
2248
  (e, t) => {
2011
2249
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2012
- return /* @__PURE__ */ d(Ca, { ...o, ...r, ref: t });
2250
+ return /* @__PURE__ */ v(Fa, { ...o, ...r, ref: t });
2013
2251
  }
2014
2252
  );
2015
- La.displayName = Fa;
2016
- var ka = "DropdownMenuLabel", Wa = a.forwardRef(
2253
+ Ha.displayName = Xa;
2254
+ var Za = "DropdownMenuLabel", Qa = a.forwardRef(
2017
2255
  (e, t) => {
2018
2256
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2019
- return /* @__PURE__ */ d(ba, { ...o, ...r, ref: t });
2257
+ return /* @__PURE__ */ v(La, { ...o, ...r, ref: t });
2020
2258
  }
2021
2259
  );
2022
- Wa.displayName = ka;
2023
- var Ua = "DropdownMenuItem", Fn = a.forwardRef(
2260
+ Qa.displayName = Za;
2261
+ var qa = "DropdownMenuItem", Kn = a.forwardRef(
2024
2262
  (e, t) => {
2025
2263
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2026
- return /* @__PURE__ */ d(Sa, { ...o, ...r, ref: t });
2264
+ return /* @__PURE__ */ v(ka, { ...o, ...r, ref: t });
2027
2265
  }
2028
2266
  );
2029
- Fn.displayName = Ua;
2030
- var $a = "DropdownMenuCheckboxItem", Ba = a.forwardRef((e, t) => {
2267
+ Kn.displayName = qa;
2268
+ var Ja = "DropdownMenuCheckboxItem", ei = a.forwardRef((e, t) => {
2031
2269
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2032
- return /* @__PURE__ */ d(Ra, { ...o, ...r, ref: t });
2270
+ return /* @__PURE__ */ v($a, { ...o, ...r, ref: t });
2033
2271
  });
2034
- Ba.displayName = $a;
2035
- var Ka = "DropdownMenuRadioGroup", Ga = a.forwardRef((e, t) => {
2272
+ ei.displayName = Ja;
2273
+ var ti = "DropdownMenuRadioGroup", ni = a.forwardRef((e, t) => {
2036
2274
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2037
- return /* @__PURE__ */ d(Ma, { ...o, ...r, ref: t });
2275
+ return /* @__PURE__ */ v(Wa, { ...o, ...r, ref: t });
2038
2276
  });
2039
- Ga.displayName = Ka;
2040
- var za = "DropdownMenuRadioItem", Va = a.forwardRef((e, t) => {
2277
+ ni.displayName = ti;
2278
+ var ri = "DropdownMenuRadioItem", oi = a.forwardRef((e, t) => {
2041
2279
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2042
- return /* @__PURE__ */ d(Pa, { ...o, ...r, ref: t });
2280
+ return /* @__PURE__ */ v(Ba, { ...o, ...r, ref: t });
2043
2281
  });
2044
- Va.displayName = za;
2045
- var Ha = "DropdownMenuItemIndicator", Ya = a.forwardRef((e, t) => {
2282
+ oi.displayName = ri;
2283
+ var ai = "DropdownMenuItemIndicator", ii = a.forwardRef((e, t) => {
2046
2284
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2047
- return /* @__PURE__ */ d(xa, { ...o, ...r, ref: t });
2285
+ return /* @__PURE__ */ v(Ua, { ...o, ...r, ref: t });
2048
2286
  });
2049
- Ya.displayName = Ha;
2050
- var Xa = "DropdownMenuSeparator", ja = a.forwardRef((e, t) => {
2287
+ ii.displayName = ai;
2288
+ var ci = "DropdownMenuSeparator", si = a.forwardRef((e, t) => {
2051
2289
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2052
- return /* @__PURE__ */ d(Na, { ...o, ...r, ref: t });
2290
+ return /* @__PURE__ */ v(Ka, { ...o, ...r, ref: t });
2053
2291
  });
2054
- ja.displayName = Xa;
2055
- var Za = "DropdownMenuArrow", Qa = a.forwardRef(
2292
+ si.displayName = ci;
2293
+ var ui = "DropdownMenuArrow", li = a.forwardRef(
2056
2294
  (e, t) => {
2057
2295
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2058
- return /* @__PURE__ */ d(Ia, { ...o, ...r, ref: t });
2296
+ return /* @__PURE__ */ v(Ga, { ...o, ...r, ref: t });
2059
2297
  }
2060
2298
  );
2061
- Qa.displayName = Za;
2062
- var qa = "DropdownMenuSubTrigger", Ja = a.forwardRef((e, t) => {
2299
+ li.displayName = ui;
2300
+ var di = "DropdownMenuSubTrigger", fi = a.forwardRef((e, t) => {
2063
2301
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2064
- return /* @__PURE__ */ d(Aa, { ...o, ...r, ref: t });
2302
+ return /* @__PURE__ */ v(za, { ...o, ...r, ref: t });
2065
2303
  });
2066
- Ja.displayName = qa;
2067
- var ei = "DropdownMenuSubContent", ti = a.forwardRef((e, t) => {
2304
+ fi.displayName = di;
2305
+ var pi = "DropdownMenuSubContent", mi = a.forwardRef((e, t) => {
2068
2306
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2069
- return /* @__PURE__ */ d(
2070
- Da,
2307
+ return /* @__PURE__ */ v(
2308
+ Va,
2071
2309
  {
2072
2310
  ...o,
2073
2311
  ...r,
@@ -2083,16 +2321,16 @@ var ei = "DropdownMenuSubContent", ti = a.forwardRef((e, t) => {
2083
2321
  }
2084
2322
  );
2085
2323
  });
2086
- ti.displayName = ei;
2087
- var ni = In, ri = Dn, oi = On, ai = Fn;
2088
- const ii = "cfxui__DropdownSelect__trigger__c03df", ci = "cfxui__DropdownSelect__onlight__f0191", si = "cfxui__DropdownSelect__fullWidth__dce56", ui = "cfxui__DropdownSelect__icon__d05b8", li = "cfxui__DropdownSelect__placeholder__e0d89", di = "cfxui__DropdownSelect__content__05ed8", fi = "cfxui__DropdownSelect__item__0e45f", G = {
2089
- trigger: ii,
2090
- onlight: ci,
2091
- fullWidth: si,
2092
- icon: ui,
2093
- placeholder: li,
2094
- content: di,
2095
- item: fi,
2324
+ mi.displayName = pi;
2325
+ var vi = kn, hi = Wn, gi = Un, wi = Kn;
2326
+ const Ci = "cfxui__DropdownSelect__trigger__c03df", yi = "cfxui__DropdownSelect__onlight__f0191", _i = "cfxui__DropdownSelect__fullWidth__dce56", bi = "cfxui__DropdownSelect__icon__d05b8", Si = "cfxui__DropdownSelect__placeholder__e0d89", Ei = "cfxui__DropdownSelect__content__05ed8", Ri = "cfxui__DropdownSelect__item__0e45f", G = {
2327
+ trigger: Ci,
2328
+ onlight: yi,
2329
+ fullWidth: _i,
2330
+ icon: bi,
2331
+ placeholder: Si,
2332
+ content: Ei,
2333
+ item: Ri,
2096
2334
  "dropdownselect-size-initial-large": "cfxui__DropdownSelect__dropdownselect-size-initial-large__d6bf3",
2097
2335
  "dropdownselect-size-initial-small": "cfxui__DropdownSelect__dropdownselect-size-initial-small__56570",
2098
2336
  "dropdownselect-size-small-large": "cfxui__DropdownSelect__dropdownselect-size-small-large__7f027",
@@ -2107,78 +2345,78 @@ const ii = "cfxui__DropdownSelect__trigger__c03df", ci = "cfxui__DropdownSelect_
2107
2345
  "dropdownselect-size-large-small": "cfxui__DropdownSelect__dropdownselect-size-large-small__5bca7",
2108
2346
  "dropdownselect-size-xlarge-large": "cfxui__DropdownSelect__dropdownselect-size-xlarge-large__23eae",
2109
2347
  "dropdownselect-size-xlarge-small": "cfxui__DropdownSelect__dropdownselect-size-xlarge-small__d232d"
2110
- }, Ni = {
2348
+ }, Ki = {
2111
2349
  small: "xxsmall",
2112
2350
  normal: "xsmall",
2113
2351
  large: "normal"
2114
- }, Ii = $n.forwardRef(function(t, n) {
2352
+ }, Gi = jn.forwardRef(function(t, n) {
2115
2353
  const {
2116
2354
  options: r,
2117
2355
  value: o,
2118
2356
  onChange: i,
2119
2357
  size: s = "normal",
2120
2358
  fullWidth: c = !1,
2121
- onlight: f = !1,
2359
+ onlight: l = !1,
2122
2360
  disabled: u,
2123
2361
  placeholder: p = "Select..."
2124
- } = t, m = Bn(null), [v, w] = Ct(void 0);
2125
- Kn(() => {
2126
- c && m.current && w(m.current.offsetWidth);
2362
+ } = t, f = Xn(null), [m, g] = Pt(void 0);
2363
+ Hn(() => {
2364
+ c && f.current && g(f.current.offsetWidth);
2127
2365
  }, [c]);
2128
- const h = ct.getResponsiveFlatClassnames("dropdownselect-size", s).map((g) => G[g]), l = st(
2366
+ const h = st.getResponsiveFlatClassnames("dropdownselect-size", s).map((w) => G[w]), d = ut(
2129
2367
  G.trigger,
2130
2368
  h,
2131
2369
  {
2132
2370
  [G.placeholder]: !o,
2133
2371
  [G.fullWidth]: c,
2134
- [G.onlight]: f
2372
+ [G.onlight]: l
2135
2373
  }
2136
- ), E = st(
2374
+ ), C = ut(
2137
2375
  G.content,
2138
2376
  h,
2139
2377
  {
2140
2378
  [G.fullWidth]: c
2141
2379
  }
2142
2380
  );
2143
- return /* @__PURE__ */ it(ni, { children: [
2144
- /* @__PURE__ */ d(
2145
- ri,
2381
+ return /* @__PURE__ */ ct(vi, { children: [
2382
+ /* @__PURE__ */ v(
2383
+ hi,
2146
2384
  {
2147
- ref: ir(n, m),
2148
- className: l,
2385
+ ref: pr(n, f),
2386
+ className: d,
2149
2387
  disabled: u,
2150
- children: /* @__PURE__ */ it(ar, { gap: "small", centered: !0, spaceBetween: !0, children: [
2388
+ children: /* @__PURE__ */ ct(fr, { gap: "small", centered: !0, spaceBetween: !0, children: [
2151
2389
  o || p,
2152
- /* @__PURE__ */ d(or, { className: G.icon, name: "DownChevron" })
2390
+ /* @__PURE__ */ v(dr, { className: G.icon, name: "DownChevron" })
2153
2391
  ] })
2154
2392
  }
2155
2393
  ),
2156
- /* @__PURE__ */ d(
2157
- oi,
2394
+ /* @__PURE__ */ v(
2395
+ gi,
2158
2396
  {
2159
2397
  align: "end",
2160
2398
  side: "bottom",
2161
- className: E,
2399
+ className: C,
2162
2400
  style: {
2163
- width: v,
2164
- zIndex: ct.zindex("max")
2401
+ width: m,
2402
+ zIndex: st.zindex("max")
2165
2403
  },
2166
- children: r.map((g) => /* @__PURE__ */ d(
2167
- ai,
2404
+ children: r.map((w) => /* @__PURE__ */ v(
2405
+ wi,
2168
2406
  {
2169
2407
  className: G.item,
2170
- onSelect: () => i(g.value),
2171
- style: { width: v },
2172
- children: g.label
2408
+ onSelect: () => i(w.value),
2409
+ style: { width: m },
2410
+ children: w.label
2173
2411
  },
2174
- g.value
2412
+ w.value
2175
2413
  ))
2176
2414
  }
2177
2415
  )
2178
2416
  ] });
2179
2417
  });
2180
2418
  export {
2181
- Ii as DropdownSelect,
2182
- Ni as ICON_SIZE_MAP,
2183
- Ii as default
2419
+ Gi as DropdownSelect,
2420
+ Ki as ICON_SIZE_MAP,
2421
+ Gi as default
2184
2422
  };