@cfx-dev/ui-components 4.0.0 → 4.0.2

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