@cfx-dev/ui-components 4.0.1 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/{Combination-BRUj3CHE.js → Combination-Cbiw1XRb.js} +1 -1
  2. package/dist/assets/css/DropdownSelect.css +1 -1
  3. package/dist/assets/css/Flex.css +1 -1
  4. package/dist/assets/css/Input.css +1 -1
  5. package/dist/assets/css/RichInput.css +1 -1
  6. package/dist/assets/css/Select.css +1 -1
  7. package/dist/assets/general/global.css +1 -1
  8. package/dist/components/Accordion/Accordion.js +18 -17
  9. package/dist/components/Accordion/AccordionShowcase.js +3 -2
  10. package/dist/components/Avatar/AvatarShowcase.js +3 -2
  11. package/dist/components/Badge/BadgeShowcase.js +5 -4
  12. package/dist/components/Button/ButtonShowcase.js +3 -2
  13. package/dist/components/Checkbox/Checkbox.js +6 -5
  14. package/dist/components/DropdownSelect/DropdownSelect.d.ts +4 -1
  15. package/dist/components/DropdownSelect/DropdownSelect.js +783 -755
  16. package/dist/components/DropdownSelect/DropdownSelectShowcase.js +11 -10
  17. package/dist/components/Flyout/Flyout.js +1 -1
  18. package/dist/components/Icon/Icon.d.ts +4 -3
  19. package/dist/components/Icon/Icon.js +27 -25
  20. package/dist/components/IconBig/IconBig.js +3 -2
  21. package/dist/components/InfoPanel/InfoPanelShowcase.js +11 -10
  22. package/dist/components/Input/Input.d.ts +2 -1
  23. package/dist/components/Input/Input.js +96 -75
  24. package/dist/components/Input/InputShowcase.js +6 -5
  25. package/dist/components/Input/RichInput.d.ts +2 -1
  26. package/dist/components/Input/RichInput.js +60 -43
  27. package/dist/components/Layout/Box/Box.d.ts +4 -11
  28. package/dist/components/Layout/Box/Box.js +58 -96
  29. package/dist/components/Layout/Flex/Flex.d.ts +7 -3
  30. package/dist/components/Layout/Flex/Flex.js +70 -62
  31. package/dist/components/Layout/Flex/Flex.types.d.ts +42 -0
  32. package/dist/components/Layout/Flex/Flex.types.js +7 -0
  33. package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -0
  34. package/dist/components/Link/LinkShowcase.js +1 -0
  35. package/dist/components/Logos/LogosShowcase.js +3 -2
  36. package/dist/components/Modal/Modal.js +1 -0
  37. package/dist/components/Overlay/Overlay.js +1 -1
  38. package/dist/components/Select/Select.d.ts +2 -3
  39. package/dist/components/Select/Select.js +1922 -7
  40. package/dist/components/Select/SelectShowcase.js +4 -3
  41. package/dist/components/Select/index.d.ts +1 -1
  42. package/dist/components/Select/index.js +2 -3
  43. package/dist/components/Separator/Separator.d.ts +2 -2
  44. package/dist/components/Separator/Separator.js +35 -25
  45. package/dist/components/Skeleton/Skeleton.d.ts +7 -6
  46. package/dist/components/Skeleton/Skeleton.js +35 -22
  47. package/dist/components/Skeleton/SkeletonShowcase.js +14 -13
  48. package/dist/components/Slider/Slider.js +11 -9
  49. package/dist/components/Slider/SliderShowcase.js +10 -9
  50. package/dist/components/Spacer/Spacer.d.ts +1 -1
  51. package/dist/components/Switch/Switch.js +6 -5
  52. package/dist/components/Table/Table.js +3 -2
  53. package/dist/components/Table/TableShowcase.js +7 -6
  54. package/dist/components/Tabular/TabularShowcase.js +3 -2
  55. package/dist/components/Text/Text.d.ts +3 -1
  56. package/dist/components/Text/Text.js +61 -52
  57. package/dist/components/Text/Text.types.d.ts +4 -13
  58. package/dist/components/Text/Text.types.js +1 -4
  59. package/dist/components/Text/index.d.ts +3 -2
  60. package/dist/components/Text/index.js +9 -6
  61. package/dist/components/Title/TitleShowcase.js +4 -3
  62. package/dist/components/ui.d.ts +45 -12
  63. package/dist/components/ui.js +64 -55
  64. package/dist/index-BZPx6jYI.js +8 -0
  65. package/dist/index-ByaXH_ih.js +10 -0
  66. package/dist/index-Cf5Yu9oD.js +67 -0
  67. package/dist/index-DBus3GoO.js +1342 -0
  68. package/dist/index-rKs9bXHr.js +6 -0
  69. package/dist/main.d.ts +1 -1
  70. package/dist/main.js +14 -14
  71. package/dist/{medium-JVtzoF2c.js → medium-BA3EQDZW.js} +2 -2
  72. package/dist/styles-scss/_ui.scss +10 -1
  73. package/dist/styles-scss/global.scss +39 -25
  74. package/dist/styles-scss/themes/theme_cfx.scss +2 -0
  75. package/dist/styles-scss/themes/theme_fivem.scss +2 -0
  76. package/dist/styles-scss/themes/theme_redm.scss +2 -0
  77. package/dist/styles-scss/themes/theme_wireframe.scss +2 -0
  78. package/dist/styles-scss/themes.scss +4 -4
  79. package/dist/styles-scss/tokens.scss +28 -15
  80. package/package.json +1 -1
  81. package/dist/Select-Ds-fm4CN.js +0 -3245
  82. package/dist/index-BCnz73Lm.js +0 -72
  83. package/dist/index-BW3WdIgK.js +0 -14
  84. package/dist/types/Offset.d.ts +0 -1
  85. package/dist/types/Offset.js +0 -1
@@ -1,69 +1,70 @@
1
- import { jsx as v, Fragment as Xe, jsxs as st } from "react/jsx-runtime";
1
+ import { jsx as v, Fragment as Ye, jsxs as ct } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
- import { useState as Rt, useRef as jn, useEffect as Xn } from "react";
4
- import { d as X, b as Hn, c as be, u as Pt } from "../../index-BCnz73Lm.js";
5
- import { r as zn } from "../../index-2hJuj4UN.js";
6
- import { c as Mt } from "../../index-CjTSD6zB.js";
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";
9
- import { _ as j, f as Nt, c as ur } from "../../tslib.es6-CBKHJX9H.js";
3
+ import { useState as Pt, useRef as jn, useEffect as Xn } from "react";
4
+ import { c as j, a as Hn, b as be, u as Mt } from "../../index-Cf5Yu9oD.js";
5
+ import { r as Zn } from "../../index-2hJuj4UN.js";
6
+ import { c as xt } from "../../index-CjTSD6zB.js";
7
+ import { u as Nt } from "../../index-ByaXH_ih.js";
8
+ import { u as Qn, a as qn, b as Jn, o as er, s as tr, l as nr, f as rr, c as or, d as ar, h as ir, i as $e, g as cr, e as sr } from "../../index-DBus3GoO.js";
9
+ import { _ as Y, f as It, 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 { clsx as Ae } from "../../utils/clsx.js";
12
+ import { ui as st } from "../ui.js";
13
+ import { clsx as ut } from "../../utils/clsx.js";
13
14
  function Se(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
14
15
  return function(o) {
15
16
  if (e == null || e(o), n === !1 || !o.defaultPrevented)
16
17
  return t == null ? void 0 : t(o);
17
18
  };
18
19
  }
19
- function ut(e, t) {
20
+ function lt(e, t) {
20
21
  if (typeof e == "function")
21
22
  return e(t);
22
23
  e != null && (e.current = t);
23
24
  }
24
- function It(...e) {
25
+ function At(...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 = lt(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() : lt(e[o], null);
36
37
  }
37
38
  };
38
39
  };
39
40
  }
40
41
  function fr(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), d = 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
- return /* @__PURE__ */ v(d.Provider, { value: y, children: g });
48
+ const { scope: m, children: g, ...h } = f, l = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[d]) || c, C = a.useMemo(() => h, Object.values(h));
49
+ return /* @__PURE__ */ v(l.Provider, { value: C, children: g });
49
50
  };
50
- u.displayName = c + "Provider";
51
+ u.displayName = i + "Provider";
51
52
  function p(f, m) {
52
- var d;
53
- const g = ((d = m == null ? void 0 : m[e]) == null ? void 0 : d[l]) || i, h = a.useContext(g);
53
+ var l;
54
+ const g = ((l = m == null ? void 0 : m[e]) == null ? void 0 : l[d]) || 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 d = (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]: d } }),
67
+ [c, d]
67
68
  );
68
69
  };
69
70
  };
@@ -77,49 +78,49 @@ 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: d, scopeName: u }) => {
83
+ const f = d(i)[`__scope${u}`];
84
+ return { ...c, ...f };
84
85
  }, {});
85
86
  return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
86
87
  };
87
88
  };
88
89
  return n.scopeName = t.scopeName, n;
89
90
  }
90
- 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 });
91
+ var Dt = a.forwardRef((e, t) => {
92
+ const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(vr);
93
+ if (i) {
94
+ const s = i.props.children, c = o.map((d) => d === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : d);
95
+ return /* @__PURE__ */ v(We, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
95
96
  }
96
- return /* @__PURE__ */ v(Be, { ...r, ref: t, children: n });
97
+ return /* @__PURE__ */ v(We, { ...r, ref: t, children: n });
97
98
  });
98
- At.displayName = "Slot";
99
- var Be = a.forwardRef((e, t) => {
99
+ Dt.displayName = "Slot";
100
+ var We = a.forwardRef((e, t) => {
100
101
  const { children: n, ...r } = e;
101
102
  if (a.isValidElement(n)) {
102
103
  const o = gr(n);
103
104
  return a.cloneElement(n, {
104
105
  ...hr(r, n.props),
105
106
  // @ts-ignore
106
- ref: t ? It(t, o) : o
107
+ ref: t ? At(t, o) : o
107
108
  });
108
109
  }
109
110
  return a.Children.count(n) > 1 ? a.Children.only(null) : null;
110
111
  });
111
- Be.displayName = "SlotClone";
112
- var mr = ({ children: e }) => /* @__PURE__ */ v(Xe, { children: e });
112
+ We.displayName = "SlotClone";
113
+ var mr = ({ children: e }) => /* @__PURE__ */ v(Ye, { children: e });
113
114
  function vr(e) {
114
115
  return a.isValidElement(e) && e.type === mr;
115
116
  }
116
117
  function hr(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
  }
@@ -145,10 +146,10 @@ var wr = [
145
146
  "span",
146
147
  "svg",
147
148
  "ul"
148
- ], yr = wr.reduce((e, t) => {
149
+ ], Cr = wr.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 ? Dt : 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
  }, {});
@@ -158,63 +159,63 @@ function M(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
158
159
  return t == null ? void 0 : t(o);
159
160
  };
160
161
  }
161
- function lt(e, t) {
162
+ function dt(e, t) {
162
163
  if (typeof e == "function")
163
164
  return e(t);
164
165
  e != null && (e.current = t);
165
166
  }
166
- function He(...e) {
167
+ function je(...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 = dt(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() : dt(e[o], null);
178
179
  }
179
180
  };
180
181
  };
181
182
  }
182
- function W(...e) {
183
- return a.useCallback(He(...e), e);
183
+ function $(...e) {
184
+ return a.useCallback(je(...e), e);
184
185
  }
185
- function Dt(e, t = []) {
186
+ function Tt(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), d = 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
- return /* @__PURE__ */ v(d.Provider, { value: y, children: g });
193
+ const { scope: m, children: g, ...h } = f, l = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[d]) || c, C = a.useMemo(() => h, Object.values(h));
194
+ return /* @__PURE__ */ v(l.Provider, { value: C, children: g });
194
195
  };
195
- u.displayName = c + "Provider";
196
+ u.displayName = i + "Provider";
196
197
  function p(f, m) {
197
- var d;
198
- const g = ((d = m == null ? void 0 : m[e]) == null ? void 0 : d[l]) || i, h = a.useContext(g);
198
+ var l;
199
+ const g = ((l = m == null ? void 0 : m[e]) == null ? void 0 : l[d]) || 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 d = (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]: d } }),
212
+ [c, d]
212
213
  );
213
214
  };
214
215
  };
215
- return o.scopeName = e, [r, Cr(o, ...t)];
216
+ return o.scopeName = e, [r, yr(o, ...t)];
216
217
  }
217
- function Cr(...e) {
218
+ function yr(...e) {
218
219
  const t = e[0];
219
220
  if (e.length === 1) return t;
220
221
  const n = () => {
@@ -222,53 +223,53 @@ 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: d, scopeName: u }) => {
228
+ const f = d(i)[`__scope${u}`];
229
+ return { ...c, ...f };
229
230
  }, {});
230
231
  return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
231
232
  };
232
233
  };
233
234
  return n.scopeName = t.scopeName, n;
234
235
  }
235
- 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 });
236
+ var Xe = a.forwardRef((e, t) => {
237
+ const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(br);
238
+ if (i) {
239
+ const s = i.props.children, c = o.map((d) => d === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : d);
240
+ return /* @__PURE__ */ v(Be, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
240
241
  }
241
- return /* @__PURE__ */ v(Ue, { ...r, ref: t, children: n });
242
+ return /* @__PURE__ */ v(Be, { ...r, ref: t, children: n });
242
243
  });
243
- ze.displayName = "Slot";
244
- var Ue = a.forwardRef((e, t) => {
244
+ Xe.displayName = "Slot";
245
+ var Be = 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 = Er(n);
248
249
  return a.cloneElement(n, {
249
250
  ...Sr(r, n.props),
250
251
  // @ts-ignore
251
- ref: t ? He(t, o) : o
252
+ ref: t ? je(t, o) : o
252
253
  });
253
254
  }
254
255
  return a.Children.count(n) > 1 ? a.Children.only(null) : null;
255
256
  });
256
- Ue.displayName = "SlotClone";
257
- var Er = ({ children: e }) => /* @__PURE__ */ v(Xe, { children: e });
257
+ Be.displayName = "SlotClone";
258
+ var _r = ({ children: e }) => /* @__PURE__ */ v(Ye, { children: e });
258
259
  function br(e) {
259
- return a.isValidElement(e) && e.type === Er;
260
+ return a.isValidElement(e) && e.type === _r;
260
261
  }
261
262
  function Sr(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 Er(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);
@@ -290,56 +291,56 @@ var Rr = [
290
291
  "span",
291
292
  "svg",
292
293
  "ul"
293
- ], B = Rr.reduce((e, t) => {
294
+ ], W = Rr.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 ? Xe : 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
- function Tt(e, t) {
301
- e && zn.flushSync(() => e.dispatchEvent(t));
301
+ function Ot(e, t) {
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 Pr = "DismissableLayer", Ue = "dismissableLayer.update", Mr = "dismissableLayer.pointerDownOutside", xr = "dismissableLayer.focusOutside", ft, Ft = a.createContext({
304
305
  layers: /* @__PURE__ */ new Set(),
305
306
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
306
307
  branches: /* @__PURE__ */ new Set()
307
- }), Ft = a.forwardRef(
308
+ }), Lt = a.forwardRef(
308
309
  (e, t) => {
309
310
  const {
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
- ...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) => {
316
+ onDismiss: c,
317
+ ...d
318
+ } = e, u = a.useContext(Ft), [p, f] = a.useState(null), m = (p == null ? void 0 : p.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = a.useState({}), h = $(t, (S) => f(S)), l = Array.from(u.layers), [C] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), w = l.indexOf(C), _ = p ? l.indexOf(p) : -1, b = u.layersWithOutsidePointerEventsDisabled.size > 0, E = _ >= w, R = Ar((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
+ !E || I || (o == null || o(S), s == null || s(S), S.defaultPrevented || c == null || c());
320
321
  }, m), x = Dr((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
- return Zn((S) => {
325
- E === u.layers.size - 1 && (r == null || r(S), !S.defaultPrevented && i && (S.preventDefault(), i()));
325
+ return Qn((S) => {
326
+ _ === u.layers.size - 1 && (r == null || r(S), !S.defaultPrevented && c && (S.preventDefault(), c()));
326
327
  }, m), a.useEffect(() => {
327
328
  if (p)
328
- 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(), () => {
329
- n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = dt);
329
+ return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (ft = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(p)), u.layers.add(p), pt(), () => {
330
+ n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = ft);
330
331
  };
331
332
  }, [p, m, n, u]), a.useEffect(() => () => {
332
- p && (u.layers.delete(p), u.layersWithOutsidePointerEventsDisabled.delete(p), ft());
333
+ p && (u.layers.delete(p), u.layersWithOutsidePointerEventsDisabled.delete(p), pt());
333
334
  }, [p, u]), a.useEffect(() => {
334
335
  const S = () => g({});
335
- return document.addEventListener(Ke, S), () => document.removeEventListener(Ke, S);
336
+ return document.addEventListener(Ue, S), () => document.removeEventListener(Ue, S);
336
337
  }, []), /* @__PURE__ */ v(
337
- B.div,
338
+ W.div,
338
339
  {
339
- ...l,
340
+ ...d,
340
341
  ref: h,
341
342
  style: {
342
- pointerEvents: b ? _ ? "auto" : "none" : void 0,
343
+ pointerEvents: b ? E ? "auto" : "none" : void 0,
343
344
  ...e.style
344
345
  },
345
346
  onFocusCapture: M(e.onFocusCapture, x.onFocusCapture),
@@ -352,42 +353,42 @@ var Pr = "DismissableLayer", Ke = "dismissableLayer.update", Mr = "dismissableLa
352
353
  );
353
354
  }
354
355
  );
355
- Ft.displayName = Pr;
356
+ Lt.displayName = Pr;
356
357
  var Nr = "DismissableLayerBranch", Ir = a.forwardRef((e, t) => {
357
- const n = a.useContext(Ot), r = a.useRef(null), o = W(t, r);
358
+ const n = a.useContext(Ft), r = a.useRef(null), o = $(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
- }, [n.branches]), /* @__PURE__ */ v(B.div, { ...e, ref: o });
365
+ }, [n.branches]), /* @__PURE__ */ v(W.div, { ...e, ref: o });
365
366
  });
366
367
  Ir.displayName = Nr;
367
368
  function Ar(e, t = globalThis == null ? void 0 : globalThis.document) {
368
- const n = X(e), r = a.useRef(!1), o = a.useRef(() => {
369
+ const n = j(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) {
373
- let l = function() {
374
- Lt(
372
+ const i = (c) => {
373
+ if (c.target && !r.current) {
374
+ let d = function() {
375
+ kt(
375
376
  Mr,
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 = d, t.addEventListener("click", o.current, { once: !0 })) : d();
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)
@@ -395,10 +396,10 @@ function Ar(e, t = globalThis == null ? void 0 : globalThis.document) {
395
396
  };
396
397
  }
397
398
  function Dr(e, t = globalThis == null ? void 0 : globalThis.document) {
398
- const n = X(e), r = a.useRef(!1);
399
+ const n = j(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 && kt(xr, n, { originalEvent: i }, {
402
403
  discrete: !1
403
404
  });
404
405
  };
@@ -408,35 +409,35 @@ function Dr(e, t = globalThis == null ? void 0 : globalThis.document) {
408
409
  onBlurCapture: () => r.current = !1
409
410
  };
410
411
  }
411
- function ft() {
412
- const e = new CustomEvent(Ke);
412
+ function pt() {
413
+ const e = new CustomEvent(Ue);
413
414
  document.dispatchEvent(e);
414
415
  }
415
- 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);
416
+ function kt(e, t, n, { discrete: r }) {
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 ? Ot(o, i) : o.dispatchEvent(i);
418
419
  }
419
- var De = 0;
420
+ var Ae = 0;
420
421
  function Tr() {
421
422
  a.useEffect(() => {
422
423
  const e = document.querySelectorAll("[data-radix-focus-guard]");
423
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? pt()), document.body.insertAdjacentElement("beforeend", e[1] ?? pt()), De++, () => {
424
- De === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), De--;
424
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? mt()), document.body.insertAdjacentElement("beforeend", e[1] ?? mt()), Ae++, () => {
425
+ Ae === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Ae--;
425
426
  };
426
427
  }, []);
427
428
  }
428
- function pt() {
429
+ function mt() {
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 De = "focusScope.autoFocusOnMount", Te = "focusScope.autoFocusOnUnmount", vt = { bubbles: !1, cancelable: !0 }, Or = "FocusScope", $t = 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, d] = a.useState(null), u = j(o), p = j(i), f = a.useRef(null), m = $(t, (l) => d(l)), g = a.useRef({
440
441
  paused: !1,
441
442
  pause() {
442
443
  this.paused = !0;
@@ -447,65 +448,65 @@ var Te = "focusScope.autoFocusOnMount", Oe = "focusScope.autoFocusOnUnmount", mt
447
448
  }).current;
448
449
  a.useEffect(() => {
449
450
  if (r) {
450
- let d = function(b) {
451
- if (g.paused || !i) return;
452
- const _ = b.target;
453
- i.contains(_) ? f.current = _ : Y(f.current, { select: !0 });
454
- }, y = function(b) {
455
- if (g.paused || !i) return;
456
- const _ = b.relatedTarget;
457
- _ !== null && (i.contains(_) || Y(f.current, { select: !0 }));
451
+ let l = function(b) {
452
+ if (g.paused || !c) return;
453
+ const E = b.target;
454
+ c.contains(E) ? f.current = E : V(f.current, { select: !0 });
455
+ }, C = function(b) {
456
+ if (g.paused || !c) return;
457
+ const E = b.relatedTarget;
458
+ E !== null && (c.contains(E) || V(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 && V(c);
462
463
  };
463
- document.addEventListener("focusin", d), document.addEventListener("focusout", y);
464
- const E = new MutationObserver(w);
465
- return i && E.observe(i, { childList: !0, subtree: !0 }), () => {
466
- document.removeEventListener("focusin", d), document.removeEventListener("focusout", y), E.disconnect();
464
+ document.addEventListener("focusin", l), document.addEventListener("focusout", C);
465
+ const _ = new MutationObserver(w);
466
+ return c && _.observe(c, { childList: !0, subtree: !0 }), () => {
467
+ document.removeEventListener("focusin", l), document.removeEventListener("focusout", C), _.disconnect();
467
468
  };
468
469
  }
469
- }, [r, i, g.paused]), a.useEffect(() => {
470
- if (i) {
471
- ht.add(g);
472
- const d = document.activeElement;
473
- if (!i.contains(d)) {
474
- 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));
470
+ }, [r, c, g.paused]), a.useEffect(() => {
471
+ if (c) {
472
+ gt.add(g);
473
+ const l = document.activeElement;
474
+ if (!c.contains(l)) {
475
+ const w = new CustomEvent(De, vt);
476
+ c.addEventListener(De, u), c.dispatchEvent(w), w.defaultPrevented || (Fr(Br(Wt(c)), { select: !0 }), document.activeElement === l && V(c));
476
477
  }
477
478
  return () => {
478
- i.removeEventListener(Te, u), setTimeout(() => {
479
- 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);
479
+ c.removeEventListener(De, u), setTimeout(() => {
480
+ const w = new CustomEvent(Te, vt);
481
+ c.addEventListener(Te, p), c.dispatchEvent(w), w.defaultPrevented || V(l ?? document.body, { select: !0 }), c.removeEventListener(Te, p), gt.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
- (d) => {
487
+ (l) => {
487
488
  if (!n && !r || g.paused) return;
488
- const y = d.key === "Tab" && !d.altKey && !d.ctrlKey && !d.metaKey, w = document.activeElement;
489
- if (y && w) {
490
- const E = d.currentTarget, [b, _] = Lr(E);
491
- 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();
489
+ const C = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, w = document.activeElement;
490
+ if (C && w) {
491
+ const _ = l.currentTarget, [b, E] = Lr(_);
492
+ b && E ? !l.shiftKey && w === E ? (l.preventDefault(), n && V(b, { select: !0 })) : l.shiftKey && w === b && (l.preventDefault(), n && V(E, { select: !0 })) : w === _ && l.preventDefault();
492
493
  }
493
494
  },
494
495
  [n, r, g.paused]
495
496
  );
496
- return /* @__PURE__ */ v(B.div, { tabIndex: -1, ...s, ref: m, onKeyDown: h });
497
+ return /* @__PURE__ */ v(W.div, { tabIndex: -1, ...s, ref: m, onKeyDown: h });
497
498
  });
498
- kt.displayName = Or;
499
+ $t.displayName = Or;
499
500
  function Fr(e, { select: t = !1 } = {}) {
500
501
  const n = document.activeElement;
501
502
  for (const r of e)
502
- if (Y(r, { select: t }), document.activeElement !== n) return;
503
+ if (V(r, { select: t }), document.activeElement !== n) return;
503
504
  }
504
505
  function Lr(e) {
505
- const t = $t(e), n = vt(t, e), r = vt(t.reverse(), e);
506
+ const t = Wt(e), n = ht(t, e), r = ht(t.reverse(), e);
506
507
  return [n, r];
507
508
  }
508
- function $t(e) {
509
+ function Wt(e) {
509
510
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
510
511
  acceptNode: (r) => {
511
512
  const o = r.tagName === "INPUT" && r.type === "hidden";
@@ -515,7 +516,7 @@ function $t(e) {
515
516
  for (; n.nextNode(); ) t.push(n.currentNode);
516
517
  return t;
517
518
  }
518
- function vt(e, t) {
519
+ function ht(e, t) {
519
520
  for (const n of e)
520
521
  if (!kr(n, { upTo: t })) return n;
521
522
  }
@@ -531,39 +532,39 @@ function kr(e, { upTo: t }) {
531
532
  function $r(e) {
532
533
  return e instanceof HTMLInputElement && "select" in e;
533
534
  }
534
- function Y(e, { select: t = !1 } = {}) {
535
+ function V(e, { select: t = !1 } = {}) {
535
536
  if (e && e.focus) {
536
537
  const n = document.activeElement;
537
538
  e.focus({ preventScroll: !0 }), e !== n && $r(e) && t && e.select();
538
539
  }
539
540
  }
540
- var ht = Wr();
541
+ var gt = Wr();
541
542
  function Wr() {
542
543
  let e = [];
543
544
  return {
544
545
  add(t) {
545
546
  const n = e[0];
546
- t !== n && (n == null || n.pause()), e = gt(e, t), e.unshift(t);
547
+ t !== n && (n == null || n.pause()), e = wt(e, t), e.unshift(t);
547
548
  },
548
549
  remove(t) {
549
550
  var n;
550
- e = gt(e, t), (n = e[0]) == null || n.resume();
551
+ e = wt(e, t), (n = e[0]) == null || n.resume();
551
552
  }
552
553
  };
553
554
  }
554
- function gt(e, t) {
555
+ function wt(e, t) {
555
556
  const n = [...e], r = n.indexOf(t);
556
557
  return r !== -1 && n.splice(r, 1), n;
557
558
  }
558
559
  function Br(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 Ur = "Arrow", Bt = a.forwardRef((e, t) => {
563
+ const { children: n, width: r = 10, height: o = 5, ...i } = e;
563
564
  return /* @__PURE__ */ v(
564
- B.svg,
565
+ W.svg,
565
566
  {
566
- ...c,
567
+ ...i,
567
568
  ref: t,
568
569
  width: r,
569
570
  height: o,
@@ -573,81 +574,81 @@ 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
+ Bt.displayName = Ur;
578
+ var Kr = Bt, He = "Popper", [Ut, Kt] = Tt(He), [Gr, Gt] = Ut(He), zt = (e) => {
578
579
  const { __scopePopper: t, children: n } = e, [r, o] = a.useState(null);
579
580
  return /* @__PURE__ */ v(Gr, { scope: t, anchor: r, onAnchorChange: o, children: n });
580
581
  };
581
- Gt.displayName = Ze;
582
+ zt.displayName = He;
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 = Gt(Vt, n), s = a.useRef(null), c = $(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(W.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 Ze = "PopperContent", [zr, Vr] = Ut(Ze), jt = a.forwardRef(
592
593
  (e, t) => {
593
- var G, ie, F, se, at, ct;
594
+ var K, ce, F, se, ot, at;
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
- avoidCollisions: l = !0,
601
+ arrowPadding: c = 0,
602
+ avoidCollisions: d = !0,
602
603
  collisionBoundary: u = [],
603
604
  collisionPadding: p = 0,
604
605
  sticky: f = "partial",
605
606
  hideWhenDetached: m = !1,
606
607
  updatePositionStrategy: g = "optimized",
607
608
  onPlaced: h,
608
- ...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 = {
609
+ ...l
610
+ } = e, C = Gt(Ze, n), [w, _] = a.useState(null), b = $(t, (ue) => _(ue)), [E, R] = a.useState(null), x = Hn(E), S = (x == null ? void 0 : x.width) ?? 0, P = (x == null ? void 0 : x.height) ?? 0, I = r + (i !== "center" ? "-" + i : ""), T = typeof p == "number" ? p : { top: 0, right: 0, bottom: 0, left: 0, ...p }, z = Array.isArray(u) ? u : [u], X = z.length > 0, U = {
610
611
  padding: T,
611
- boundary: V.filter(Xr),
612
+ boundary: z.filter(jr),
612
613
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
613
- altBoundary: H
614
- }, { refs: Q, floatingStyles: q, placement: $, isPositioned: J, middlewareData: O } = Qn({
614
+ altBoundary: X
615
+ }, { refs: Q, floatingStyles: q, placement: k, isPositioned: J, middlewareData: O } = qn({
615
616
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
616
617
  strategy: "fixed",
617
618
  placement: I,
618
- whileElementsMounted: (...ue) => qn(...ue, {
619
+ whileElementsMounted: (...ue) => Jn(...ue, {
619
620
  animationFrame: g === "always"
620
621
  }),
621
622
  elements: {
622
- reference: y.anchor
623
+ reference: C.anchor
623
624
  },
624
625
  middleware: [
625
- Jn({ mainAxis: o + P, alignmentAxis: s }),
626
- l && er({
626
+ er({ mainAxis: o + P, alignmentAxis: s }),
627
+ d && tr({
627
628
  mainAxis: !0,
628
629
  crossAxis: !1,
629
- limiter: f === "partial" ? tr() : void 0,
630
- ...K
630
+ limiter: f === "partial" ? nr() : void 0,
631
+ ...U
631
632
  }),
632
- l && nr({ ...K }),
633
- rr({
634
- ...K,
635
- apply: ({ elements: ue, rects: it, availableWidth: Kn, availableHeight: Gn }) => {
633
+ d && rr({ ...U }),
634
+ or({
635
+ ...U,
636
+ apply: ({ elements: ue, rects: it, availableWidth: Gn, availableHeight: zn }) => {
636
637
  const { width: Vn, height: Yn } = it.reference, he = ue.floating.style;
637
- 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
+ he.setProperty("--radix-popper-available-width", `${Gn}px`), he.setProperty("--radix-popper-available-height", `${zn}px`), he.setProperty("--radix-popper-anchor-width", `${Vn}px`), he.setProperty("--radix-popper-anchor-height", `${Yn}px`);
638
639
  }
639
640
  }),
640
- _ && or({ element: _, padding: i }),
641
- Hr({ arrowWidth: S, arrowHeight: P }),
642
- m && ar({ strategy: "referenceHidden", ...K })
641
+ E && ar({ element: E, padding: c }),
642
+ Xr({ arrowWidth: S, arrowHeight: P }),
643
+ m && ir({ strategy: "referenceHidden", ...U })
643
644
  ]
644
- }), [C, A] = zt($), N = X(h);
645
+ }), [y, A] = Zt(k), N = j(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 B = (K = O.arrow) == null ? void 0 : K.x, ae = (ce = O.arrow) == null ? void 0 : ce.y, ie = ((F = O.arrow) == null ? void 0 : F.centerOffset) !== 0, [ve, H] = a.useState();
649
650
  return be(() => {
650
- w && z(window.getComputedStyle(w).zIndex);
651
+ w && H(window.getComputedStyle(w).zIndex);
651
652
  }, [w]), /* @__PURE__ */ v(
652
653
  "div",
653
654
  {
@@ -661,35 +662,35 @@ var Qe = "PopperContent", [Vr, Yr] = Bt(Qe), jt = a.forwardRef(
661
662
  zIndex: ve,
662
663
  "--radix-popper-transform-origin": [
663
664
  (se = O.transformOrigin) == null ? void 0 : se.x,
664
- (at = O.transformOrigin) == null ? void 0 : at.y
665
+ (ot = O.transformOrigin) == null ? void 0 : ot.y
665
666
  ].join(" "),
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
+ ...((at = O.hide) == null ? void 0 : at.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
+ zr,
677
678
  {
678
679
  scope: n,
679
- placedSide: C,
680
+ placedSide: y,
680
681
  onArrowChange: R,
681
- arrowX: U,
682
+ arrowX: B,
682
683
  arrowY: ae,
683
- shouldHideArrow: ce,
684
+ shouldHideArrow: ie,
684
685
  children: /* @__PURE__ */ v(
685
- B.div,
686
+ W.div,
686
687
  {
687
- "data-side": C,
688
+ "data-side": y,
688
689
  "data-align": A,
689
- ...d,
690
+ ...l,
690
691
  ref: b,
691
692
  style: {
692
- ...d.style,
693
+ ...l.style,
693
694
  // if the PopperContent hasn't been placed yet (not all measurements done)
694
695
  // we prevent animations so that users's animation don't kick in too early referring wrong sides
695
696
  animation: J ? void 0 : "none"
@@ -702,14 +703,14 @@ var Qe = "PopperContent", [Vr, Yr] = Bt(Qe), jt = a.forwardRef(
702
703
  );
703
704
  }
704
705
  );
705
- jt.displayName = Qe;
706
- var Xt = "PopperArrow", jr = {
706
+ jt.displayName = Ze;
707
+ var Xt = "PopperArrow", Yr = {
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 = Vr(Xt, r), s = Yr[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,25 +718,25 @@ 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
742
  Kr,
@@ -754,34 +755,34 @@ var Xt = "PopperArrow", jr = {
754
755
  );
755
756
  });
756
757
  Ht.displayName = Xt;
757
- function Xr(e) {
758
+ function jr(e) {
758
759
  return e !== null;
759
760
  }
760
- var Hr = (e) => ({
761
+ var Xr = (e) => ({
761
762
  name: "transformOrigin",
762
763
  options: e,
763
764
  fn(t) {
764
- 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
- let h = "", d = "";
767
- 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 } };
765
+ var C, w, _;
766
+ const { placement: n, rects: r, middlewareData: o } = t, s = ((C = o.arrow) == null ? void 0 : C.centerOffset) !== 0, c = s ? 0 : e.arrowWidth, d = s ? 0 : e.arrowHeight, [u, p] = Zt(n), f = { start: "0%", center: "50%", end: "100%" }[p], m = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + c / 2, g = (((_ = o.arrow) == null ? void 0 : _.y) ?? 0) + d / 2;
767
+ let h = "", l = "";
768
+ return u === "bottom" ? (h = s ? f : `${m}px`, l = `${-d}px`) : u === "top" ? (h = s ? f : `${m}px`, l = `${r.floating.height + d}px`) : u === "right" ? (h = `${-d}px`, l = s ? f : `${g}px`) : u === "left" && (h = `${r.floating.width + d}px`, l = s ? f : `${g}px`), { data: { x: h, y: l } };
768
769
  }
769
770
  });
770
- function zt(e) {
771
+ 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
+ var Hr = zt, Zr = Yt, Qr = jt, qr = Ht;
775
776
  function Jr(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 = eo(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), i = $(r.ref, to(o));
781
+ return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: i }) : null;
781
782
  };
782
783
  Pe.displayName = "Presence";
783
784
  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, {
785
+ const [t, n] = a.useState(), r = a.useRef({}), o = a.useRef(e), i = a.useRef("none"), s = e ? "mounted" : "unmounted", [c, d] = Jr(s, {
785
786
  mounted: {
786
787
  UNMOUNT: "unmounted",
787
788
  ANIMATION_OUT: "unmountSuspended"
@@ -796,34 +797,34 @@ 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
- e ? l("MOUNT") : g === "none" || (u == null ? void 0 : u.display) === "none" ? l("UNMOUNT") : l(p && m !== g ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
804
+ const m = i.current, g = ge(u);
805
+ e ? d("MOUNT") : g === "none" || (u == null ? void 0 : u.display) === "none" ? d("UNMOUNT") : d(p && m !== g ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
805
806
  }
806
- }, [e, l]), be(() => {
807
+ }, [e, d]), be(() => {
807
808
  if (t) {
808
809
  let u;
809
810
  const p = t.ownerDocument.defaultView ?? window, f = (g) => {
810
- const d = ge(r.current).includes(g.animationName);
811
- if (g.target === t && d && (l("ANIMATION_END"), !o.current)) {
812
- const y = t.style.animationFillMode;
811
+ const l = ge(r.current).includes(g.animationName);
812
+ if (g.target === t && l && (d("ANIMATION_END"), !o.current)) {
813
+ const C = t.style.animationFillMode;
813
814
  t.style.animationFillMode = "forwards", u = p.setTimeout(() => {
814
- t.style.animationFillMode === "forwards" && (t.style.animationFillMode = y);
815
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = C);
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);
822
823
  };
823
824
  } else
824
- l("ANIMATION_END");
825
- }, [t, l]), {
826
- isPresent: ["mounted", "unmountSuspended"].includes(i),
825
+ d("ANIMATION_END");
826
+ }, [t, d]), {
827
+ isPresent: ["mounted", "unmountSuspended"].includes(c),
827
828
  ref: a.useCallback((u) => {
828
829
  u && (r.current = getComputedStyle(u)), n(u);
829
830
  }, [])
@@ -843,57 +844,57 @@ function ne(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
843
844
  return t == null ? void 0 : t(o);
844
845
  };
845
846
  }
846
- function wt(e, t) {
847
+ function Ct(e, t) {
847
848
  if (typeof e == "function")
848
849
  return e(t);
849
850
  e != null && (e.current = t);
850
851
  }
851
- function Zt(...e) {
852
+ function Qt(...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 = Ct(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() : Ct(e[o], null);
863
864
  }
864
865
  };
865
866
  };
866
867
  }
867
868
  function no(...e) {
868
- return a.useCallback(Zt(...e), e);
869
+ return a.useCallback(Qt(...e), e);
869
870
  }
870
871
  function ro(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), d = 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
- return /* @__PURE__ */ v(d.Provider, { value: y, children: g });
878
+ const { scope: m, children: g, ...h } = f, l = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[d]) || c, C = a.useMemo(() => h, Object.values(h));
879
+ return /* @__PURE__ */ v(l.Provider, { value: C, children: g });
879
880
  };
880
- u.displayName = c + "Provider";
881
+ u.displayName = i + "Provider";
881
882
  function p(f, m) {
882
- var d;
883
- const g = ((d = m == null ? void 0 : m[e]) == null ? void 0 : d[l]) || i, h = a.useContext(g);
883
+ var l;
884
+ const g = ((l = m == null ? void 0 : m[e]) == null ? void 0 : l[d]) || 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 d = (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]: d } }),
897
+ [c, d]
897
898
  );
898
899
  };
899
900
  };
@@ -907,49 +908,49 @@ 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: d, scopeName: u }) => {
913
+ const f = d(i)[`__scope${u}`];
914
+ return { ...c, ...f };
914
915
  }, {});
915
916
  return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
916
917
  };
917
918
  };
918
919
  return n.scopeName = t.scopeName, n;
919
920
  }
920
- 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 });
921
+ var qt = a.forwardRef((e, t) => {
922
+ const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(io);
923
+ if (i) {
924
+ const s = i.props.children, c = o.map((d) => d === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : d);
925
+ return /* @__PURE__ */ v(Ke, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
925
926
  }
926
- return /* @__PURE__ */ v(Ge, { ...r, ref: t, children: n });
927
+ return /* @__PURE__ */ v(Ke, { ...r, ref: t, children: n });
927
928
  });
928
- Qt.displayName = "Slot";
929
- var Ge = a.forwardRef((e, t) => {
929
+ qt.displayName = "Slot";
930
+ var Ke = a.forwardRef((e, t) => {
930
931
  const { children: n, ...r } = e;
931
932
  if (a.isValidElement(n)) {
932
933
  const o = so(n);
933
934
  return a.cloneElement(n, {
934
- ...io(r, n.props),
935
+ ...co(r, n.props),
935
936
  // @ts-ignore
936
- ref: t ? Zt(t, o) : o
937
+ ref: t ? Qt(t, o) : o
937
938
  });
938
939
  }
939
940
  return a.Children.count(n) > 1 ? a.Children.only(null) : null;
940
941
  });
941
- Ge.displayName = "SlotClone";
942
- var ao = ({ children: e }) => /* @__PURE__ */ v(Xe, { children: e });
943
- function co(e) {
942
+ Ke.displayName = "SlotClone";
943
+ var ao = ({ children: e }) => /* @__PURE__ */ v(Ye, { children: e });
944
+ function io(e) {
944
945
  return a.isValidElement(e) && e.type === ao;
945
946
  }
946
- function io(e, t) {
947
+ function co(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
  }
@@ -975,40 +976,40 @@ var uo = [
975
976
  "span",
976
977
  "svg",
977
978
  "ul"
978
- ], qt = uo.reduce((e, t) => {
979
+ ], Jt = uo.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
+ }, {}), Oe = "rovingFocusGroup.onEntryFocus", lo = { bubbles: !1, cancelable: !0 }, Me = "RovingFocusGroup", [Ge, en, fo] = xt(Me), [po, tn] = ro(
985
986
  Me,
986
987
  [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 }) }) })
988
+ ), [mo, vo] = po(Me), nn = a.forwardRef(
989
+ (e, t) => /* @__PURE__ */ v(Ge.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ v(Ge.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ v(ho, { ...e, ref: t }) }) })
989
990
  );
990
- tn.displayName = Me;
991
+ nn.displayName = Me;
991
992
  var ho = 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
- onCurrentTabStopIdChange: l,
999
+ defaultCurrentTabStopId: c,
1000
+ onCurrentTabStopIdChange: d,
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 = no(t, m), h = Nt(i), [l = null, C] = Mt({
1004
1005
  prop: s,
1005
- defaultProp: i,
1006
- onChange: l
1007
- }), [w, E] = a.useState(!1), b = X(u), _ = Jt(n), R = a.useRef(!1), [x, S] = a.useState(0);
1006
+ defaultProp: c,
1007
+ onChange: d
1008
+ }), [w, _] = a.useState(!1), b = j(u), E = en(n), R = a.useRef(!1), [x, S] = a.useState(0);
1008
1009
  return a.useEffect(() => {
1009
1010
  const P = m.current;
1010
1011
  if (P)
1011
- return P.addEventListener(Fe, b), () => P.removeEventListener(Fe, b);
1012
+ return P.addEventListener(Oe, b), () => P.removeEventListener(Oe, b);
1012
1013
  }, [b]), /* @__PURE__ */ v(
1013
1014
  mo,
1014
1015
  {
@@ -1016,12 +1017,12 @@ var ho = a.forwardRef((e, t) => {
1016
1017
  orientation: r,
1017
1018
  dir: h,
1018
1019
  loop: o,
1019
- currentTabStopId: d,
1020
+ currentTabStopId: l,
1020
1021
  onItemFocus: a.useCallback(
1021
- (P) => y(P),
1022
- [y]
1022
+ (P) => C(P),
1023
+ [C]
1023
1024
  ),
1024
- onItemShiftTab: a.useCallback(() => E(!0), []),
1025
+ onItemShiftTab: a.useCallback(() => _(!0), []),
1025
1026
  onFocusableItemAdd: a.useCallback(
1026
1027
  () => S((P) => P + 1),
1027
1028
  []
@@ -1031,7 +1032,7 @@ var ho = a.forwardRef((e, t) => {
1031
1032
  []
1032
1033
  ),
1033
1034
  children: /* @__PURE__ */ v(
1034
- qt.div,
1035
+ Jt.div,
1035
1036
  {
1036
1037
  tabIndex: w || x === 0 ? -1 : 0,
1037
1038
  "data-orientation": r,
@@ -1044,69 +1045,69 @@ 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(Oe, lo);
1048
1049
  if (P.currentTarget.dispatchEvent(T), !T.defaultPrevented) {
1049
- const V = _().filter(($) => $.focusable), H = V.find(($) => $.active), K = V.find(($) => $.id === d), q = [H, K, ...V].filter(
1050
+ const z = E().filter((k) => k.focusable), X = z.find((k) => k.active), U = z.find((k) => k.id === l), q = [X, U, ...z].filter(
1050
1051
  Boolean
1051
- ).map(($) => $.ref.current);
1052
- on(q, p);
1052
+ ).map((k) => k.ref.current);
1053
+ an(q, p);
1053
1054
  }
1054
1055
  }
1055
1056
  R.current = !1;
1056
1057
  }),
1057
- onBlur: ne(e.onBlur, () => E(!1))
1058
+ onBlur: ne(e.onBlur, () => _(!1))
1058
1059
  }
1059
1060
  )
1060
1061
  }
1061
1062
  );
1062
- }), nn = "RovingFocusGroupItem", rn = a.forwardRef(
1063
+ }), rn = "RovingFocusGroupItem", on = a.forwardRef(
1063
1064
  (e, t) => {
1064
1065
  const {
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 = $e(), d = i || c, u = vo(rn, n), p = u.currentTabStopId === d, f = en(n), { onFocusableItemAdd: m, onFocusableItemRemove: g } = u;
1071
1072
  return a.useEffect(() => {
1072
1073
  if (r)
1073
1074
  return m(), () => g();
1074
1075
  }, [r, m, g]), /* @__PURE__ */ v(
1075
- Ve.ItemSlot,
1076
+ Ge.ItemSlot,
1076
1077
  {
1077
1078
  scope: n,
1078
- id: l,
1079
+ id: d,
1079
1080
  focusable: r,
1080
1081
  active: o,
1081
1082
  children: /* @__PURE__ */ v(
1082
- qt.span,
1083
+ Jt.span,
1083
1084
  {
1084
1085
  tabIndex: p ? 0 : -1,
1085
1086
  "data-orientation": u.orientation,
1086
1087
  ...s,
1087
1088
  ref: t,
1088
1089
  onMouseDown: ne(e.onMouseDown, (h) => {
1089
- r ? u.onItemFocus(l) : h.preventDefault();
1090
+ r ? u.onItemFocus(d) : h.preventDefault();
1090
1091
  }),
1091
- onFocus: ne(e.onFocus, () => u.onItemFocus(l)),
1092
+ onFocus: ne(e.onFocus, () => u.onItemFocus(d)),
1092
1093
  onKeyDown: ne(e.onKeyDown, (h) => {
1093
1094
  if (h.key === "Tab" && h.shiftKey) {
1094
1095
  u.onItemShiftTab();
1095
1096
  return;
1096
1097
  }
1097
1098
  if (h.target !== h.currentTarget) return;
1098
- const d = yo(h, u.orientation, u.dir);
1099
- if (d !== void 0) {
1099
+ const l = Co(h, u.orientation, u.dir);
1100
+ if (l !== void 0) {
1100
1101
  if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
1101
1102
  h.preventDefault();
1102
- let w = f().filter((E) => E.focusable).map((E) => E.ref.current);
1103
- if (d === "last") w.reverse();
1104
- else if (d === "prev" || d === "next") {
1105
- d === "prev" && w.reverse();
1106
- const E = w.indexOf(h.currentTarget);
1107
- w = u.loop ? Co(w, E + 1) : w.slice(E + 1);
1103
+ let w = f().filter((_) => _.focusable).map((_) => _.ref.current);
1104
+ if (l === "last") w.reverse();
1105
+ else if (l === "prev" || l === "next") {
1106
+ l === "prev" && w.reverse();
1107
+ const _ = w.indexOf(h.currentTarget);
1108
+ w = u.loop ? yo(w, _ + 1) : w.slice(_ + 1);
1108
1109
  }
1109
- setTimeout(() => on(w));
1110
+ setTimeout(() => an(w));
1110
1111
  }
1111
1112
  })
1112
1113
  }
@@ -1115,7 +1116,7 @@ var ho = a.forwardRef((e, t) => {
1115
1116
  );
1116
1117
  }
1117
1118
  );
1118
- rn.displayName = nn;
1119
+ on.displayName = rn;
1119
1120
  var go = {
1120
1121
  ArrowLeft: "prev",
1121
1122
  ArrowUp: "prev",
@@ -1129,25 +1130,25 @@ var go = {
1129
1130
  function wo(e, t) {
1130
1131
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
1131
1132
  }
1132
- function yo(e, t, n) {
1133
+ function Co(e, t, n) {
1133
1134
  const r = wo(e.key, n);
1134
1135
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
1135
1136
  return go[r];
1136
1137
  }
1137
- function on(e, t = !1) {
1138
+ function an(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 yo(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
- function Le(e, t) {
1146
+ var _o = nn, bo = on, ye = "right-scroll-bar-position", _e = "width-before-scroll-bar", So = "with-scroll-bars-hidden", Eo = "--removed-body-scroll-bar-size";
1147
+ function Fe(e, t) {
1147
1148
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
1148
1149
  }
1149
1150
  function Ro(e, t) {
1150
- var n = Rt(function() {
1151
+ var n = Pt(function() {
1151
1152
  return {
1152
1153
  // value
1153
1154
  value: e,
@@ -1171,17 +1172,17 @@ var Po = typeof window < "u" ? a.useLayoutEffect : a.useEffect, yt = /* @__PURE_
1171
1172
  function Mo(e, t) {
1172
1173
  var n = Ro(null, function(r) {
1173
1174
  return e.forEach(function(o) {
1174
- return Le(o, r);
1175
+ return Fe(o, r);
1175
1176
  });
1176
1177
  });
1177
1178
  return Po(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) || Fe(c, null);
1184
+ }), i.forEach(function(c) {
1185
+ o.has(c) || Fe(c, s);
1185
1186
  });
1186
1187
  }
1187
1188
  yt.set(n, e);
@@ -1198,40 +1199,40 @@ function No(e, t) {
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
- var l = function() {
1231
+ var d = function() {
1231
1232
  var p = s;
1232
- s = [], p.forEach(c);
1233
+ s = [], p.forEach(i);
1233
1234
  }, u = function() {
1234
- return Promise.resolve().then(l);
1235
+ return Promise.resolve().then(d);
1235
1236
  };
1236
1237
  u(), n = {
1237
1238
  push: function(p) {
@@ -1248,33 +1249,33 @@ function No(e, t) {
1248
1249
  function Io(e) {
1249
1250
  e === void 0 && (e = {});
1250
1251
  var t = No(null);
1251
- return t.options = j({ async: !0, ssr: !1 }, e), t;
1252
+ return t.options = Y({ async: !0, ssr: !1 }, e), t;
1252
1253
  }
1253
- var an = function(e) {
1254
- var t = e.sideCar, n = Nt(e, ["sideCar"]);
1254
+ var cn = function(e) {
1255
+ var t = e.sideCar, n = It(e, ["sideCar"]);
1255
1256
  if (!t)
1256
1257
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1257
1258
  var r = t.read();
1258
1259
  if (!r)
1259
1260
  throw new Error("Sidecar medium not found");
1260
- return a.createElement(r, j({}, n));
1261
+ return a.createElement(r, Y({}, n));
1261
1262
  };
1262
- an.isSideCarExport = !0;
1263
+ cn.isSideCarExport = !0;
1263
1264
  function Ao(e, t) {
1264
- return e.useMedium(t), an;
1265
+ return e.useMedium(t), cn;
1265
1266
  }
1266
- var cn = Io(), ke = function() {
1267
+ var sn = Io(), Le = function() {
1267
1268
  }, xe = a.forwardRef(function(e, t) {
1268
1269
  var n = a.useRef(null), r = a.useState({
1269
- onScrollCapture: ke,
1270
- onWheelCapture: ke,
1271
- 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);
1270
+ onScrollCapture: Le,
1271
+ onWheelCapture: Le,
1272
+ onTouchMoveCapture: Le
1273
+ }), o = r[0], i = r[1], s = e.forwardProps, c = e.children, d = e.className, u = e.removeScrollBar, p = e.enabled, f = e.shards, m = e.sideCar, g = e.noIsolation, h = e.inert, l = e.allowPinchZoom, C = e.as, w = C === void 0 ? "div" : C, _ = e.gapMode, b = It(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = m, R = Mo([n, t]), x = Y(Y({}, 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(E, { sideCar: sn, removeScrollBar: u, shards: f, noIsolation: g, inert: h, setCallbacks: i, allowPinchZoom: !!l, lockRef: n, gapMode: _ }),
1278
+ s ? a.cloneElement(a.Children.only(c), Y(Y({}, x), { ref: R })) : a.createElement(w, Y({}, x, { className: d, ref: R }), c)
1278
1279
  );
1279
1280
  });
1280
1281
  xe.defaultProps = {
@@ -1283,8 +1284,8 @@ xe.defaultProps = {
1283
1284
  inert: !1
1284
1285
  };
1285
1286
  xe.classNames = {
1286
- fullWidth: Ee,
1287
- zeroRight: Ce
1287
+ fullWidth: _e,
1288
+ zeroRight: ye
1288
1289
  };
1289
1290
  function Do() {
1290
1291
  if (!document)
@@ -1320,7 +1321,7 @@ var Fo = function() {
1320
1321
  };
1321
1322
  }, [t && n]);
1322
1323
  };
1323
- }, sn = function() {
1324
+ }, un = function() {
1324
1325
  var e = Lo(), t = function(n) {
1325
1326
  var r = n.styles, o = n.dynamic;
1326
1327
  return e(r, o), null;
@@ -1331,11 +1332,11 @@ var Fo = function() {
1331
1332
  top: 0,
1332
1333
  right: 0,
1333
1334
  gap: 0
1334
- }, $e = function(e) {
1335
+ }, ke = function(e) {
1335
1336
  return parseInt(e || "", 10) || 0;
1336
1337
  }, $o = 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
- return [$e(n), $e(r), $e(o)];
1339
+ return [ke(n), ke(r), ke(o)];
1339
1340
  }, Wo = function(e) {
1340
1341
  if (e === void 0 && (e = "margin"), typeof window > "u")
1341
1342
  return ko;
@@ -1346,12 +1347,12 @@ var Fo = function() {
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
+ }, Bo = un(), re = "data-scroll-locked", Uo = 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
1353
  .`.concat(So, ` {
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,129 +1361,129 @@ 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
- .`).concat(Ce, ` {
1374
- right: `).concat(i, "px ").concat(r, `;
1374
+ .`).concat(ye, ` {
1375
+ right: `).concat(c, "px ").concat(r, `;
1375
1376
  }
1376
1377
 
1377
- .`).concat(Ee, ` {
1378
- margin-right: `).concat(i, "px ").concat(r, `;
1378
+ .`).concat(_e, ` {
1379
+ margin-right: `).concat(c, "px ").concat(r, `;
1379
1380
  }
1380
1381
 
1381
- .`).concat(Ce, " .").concat(Ce, ` {
1382
+ .`).concat(ye, " .").concat(ye, ` {
1382
1383
  right: 0 `).concat(r, `;
1383
1384
  }
1384
1385
 
1385
- .`).concat(Ee, " .").concat(Ee, ` {
1386
+ .`).concat(_e, " .").concat(_e, ` {
1386
1387
  margin-right: 0 `).concat(r, `;
1387
1388
  }
1388
1389
 
1389
1390
  body[`).concat(re, `] {
1390
- `).concat(_o, ": ").concat(i, `px;
1391
+ `).concat(Eo, ": ").concat(c, `px;
1391
1392
  }
1392
1393
  `);
1393
- }, Ct = function() {
1394
+ }, _t = function() {
1394
1395
  var e = parseInt(document.body.getAttribute(re) || "0", 10);
1395
1396
  return isFinite(e) ? e : 0;
1396
1397
  }, Ko = function() {
1397
1398
  a.useEffect(function() {
1398
- return document.body.setAttribute(re, (Ct() + 1).toString()), function() {
1399
- var e = Ct() - 1;
1399
+ return document.body.setAttribute(re, (_t() + 1).toString()), function() {
1400
+ var e = _t() - 1;
1400
1401
  e <= 0 ? document.body.removeAttribute(re) : document.body.setAttribute(re, e.toString());
1401
1402
  };
1402
1403
  }, []);
1403
1404
  }, Go = function(e) {
1404
1405
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
1405
1406
  Ko();
1406
- var c = a.useMemo(function() {
1407
+ var i = a.useMemo(function() {
1407
1408
  return Wo(o);
1408
1409
  }, [o]);
1409
- return a.createElement(Bo, { styles: Uo(c, !t, o, n ? "" : "!important") });
1410
- }, Ye = !1;
1410
+ return a.createElement(Bo, { styles: Uo(i, !t, o, n ? "" : "!important") });
1411
+ }, ze = !1;
1411
1412
  if (typeof window < "u")
1412
1413
  try {
1413
1414
  var we = Object.defineProperty({}, "passive", {
1414
1415
  get: function() {
1415
- return Ye = !0, !0;
1416
+ return ze = !0, !0;
1416
1417
  }
1417
1418
  });
1418
1419
  window.addEventListener("test", we, we), window.removeEventListener("test", we, we);
1419
1420
  } catch {
1420
- Ye = !1;
1421
+ ze = !1;
1421
1422
  }
1422
- var ee = Ye ? { passive: !1 } : !1, Vo = function(e) {
1423
+ var ee = ze ? { passive: !1 } : !1, zo = function(e) {
1423
1424
  return e.tagName === "TEXTAREA";
1424
- }, un = function(e, t) {
1425
+ }, ln = function(e, t) {
1425
1426
  if (!(e instanceof Element))
1426
1427
  return !1;
1427
1428
  var n = window.getComputedStyle(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 && !zo(e) && n[t] === "visible")
1432
1433
  );
1434
+ }, Vo = function(e) {
1435
+ return ln(e, "overflowY");
1433
1436
  }, Yo = function(e) {
1434
- return un(e, "overflowY");
1435
- }, jo = function(e) {
1436
- return un(e, "overflowX");
1437
- }, Et = function(e, t) {
1437
+ return ln(e, "overflowX");
1438
+ }, bt = function(e, t) {
1438
1439
  var n = t.ownerDocument, r = t;
1439
1440
  do {
1440
1441
  typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
1441
- var o = ln(e, r);
1442
+ var o = dn(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 = fn(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
+ }, jo = 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
+ }, Xo = function(e) {
1458
1459
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
1459
1460
  return [
1460
1461
  t,
1461
1462
  n,
1462
1463
  r
1463
1464
  ];
1464
- }, ln = function(e, t) {
1465
- return e === "v" ? Yo(t) : jo(t);
1466
1465
  }, dn = function(e, t) {
1467
- return e === "v" ? Xo(t) : Ho(t);
1468
- }, zo = function(e, t) {
1466
+ return e === "v" ? Vo(t) : Yo(t);
1467
+ }, fn = function(e, t) {
1468
+ return e === "v" ? jo(t) : Xo(t);
1469
+ }, Ho = function(e, t) {
1469
1470
  return e === "h" && t === "rtl" ? -1 : 1;
1470
1471
  }, 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;
1472
+ var i = Ho(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, d = 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 = fn(e, c), h = g[0], l = g[1], C = g[2], w = l - C - i * h;
1475
+ (h || w) && dn(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
+ !d && c !== document.body || // self content
1479
+ d && (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
- }, ye = function(e) {
1482
+ }, Ce = function(e) {
1482
1483
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1483
- }, bt = function(e) {
1484
- return [e.deltaX, e.deltaY];
1485
1484
  }, St = function(e) {
1485
+ return [e.deltaX, e.deltaY];
1486
+ }, Et = function(e) {
1486
1487
  return e && "current" in e ? e.current : e;
1487
1488
  }, Qo = function(e, t) {
1488
1489
  return e[0] === t[0] && e[1] === t[1];
@@ -1493,84 +1494,84 @@ var ee = Ye ? { passive: !1 } : !1, Vo = function(e) {
1493
1494
  `);
1494
1495
  }, Jo = 0, te = [];
1495
1496
  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);
1497
+ var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(Jo++)[0], i = a.useState(un)[0], s = a.useRef(e);
1497
1498
  a.useEffect(function() {
1498
1499
  s.current = e;
1499
1500
  }, [e]), a.useEffect(function() {
1500
1501
  if (e.inert) {
1501
1502
  document.body.classList.add("block-interactivity-".concat(o));
1502
- var d = ur([e.lockRef.current], (e.shards || []).map(St), !0).filter(Boolean);
1503
- return d.forEach(function(y) {
1504
- return y.classList.add("allow-interactivity-".concat(o));
1503
+ var l = ur([e.lockRef.current], (e.shards || []).map(Et), !0).filter(Boolean);
1504
+ return l.forEach(function(C) {
1505
+ return C.classList.add("allow-interactivity-".concat(o));
1505
1506
  }), function() {
1506
- document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(y) {
1507
- return y.classList.remove("allow-interactivity-".concat(o));
1507
+ document.body.classList.remove("block-interactivity-".concat(o)), l.forEach(function(C) {
1508
+ return C.classList.remove("allow-interactivity-".concat(o));
1508
1509
  });
1509
1510
  };
1510
1511
  }
1511
1512
  }, [e.inert, e.lockRef.current, e.shards]);
1512
- var i = a.useCallback(function(d, y) {
1513
- if ("touches" in d && d.touches.length === 2 || d.type === "wheel" && d.ctrlKey)
1513
+ var c = a.useCallback(function(l, C) {
1514
+ if ("touches" in l && l.touches.length === 2 || l.type === "wheel" && l.ctrlKey)
1514
1515
  return !s.current.allowPinchZoom;
1515
- 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";
1516
- if ("touches" in d && S === "h" && x.type === "range")
1516
+ var w = Ce(l), _ = n.current, b = "deltaX" in l ? l.deltaX : _[0] - w[0], E = "deltaY" in l ? l.deltaY : _[1] - w[1], R, x = l.target, S = Math.abs(b) > Math.abs(E) ? "h" : "v";
1517
+ if ("touches" in l && S === "h" && x.type === "range")
1517
1518
  return !1;
1518
- var P = Et(S, x);
1519
+ var P = bt(S, x);
1519
1520
  if (!P)
1520
1521
  return !0;
1521
- if (P ? R = S : (R = S === "v" ? "h" : "v", P = Et(S, x)), !P)
1522
+ if (P ? R = S : (R = S === "v" ? "h" : "v", P = bt(S, x)), !P)
1522
1523
  return !1;
1523
- if (!r.current && "changedTouches" in d && (b || _) && (r.current = R), !R)
1524
+ if (!r.current && "changedTouches" in l && (b || E) && (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
- }, []), l = a.useCallback(function(d) {
1528
- var y = d;
1529
- if (!(!te.length || te[te.length - 1] !== c)) {
1530
- 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);
1527
+ return Zo(I, C, l, I === "h" ? b : E, !0);
1528
+ }, []), d = a.useCallback(function(l) {
1529
+ var C = l;
1530
+ if (!(!te.length || te[te.length - 1] !== i)) {
1531
+ var w = "deltaY" in C ? St(C) : Ce(C), _ = t.current.filter(function(R) {
1532
+ return R.name === C.type && (R.target === C.target || C.target === R.shadowParent) && Qo(R.delta, w);
1532
1533
  })[0];
1533
- if (E && E.should) {
1534
- y.cancelable && y.preventDefault();
1534
+ if (_ && _.should) {
1535
+ C.cancelable && C.preventDefault();
1535
1536
  return;
1536
1537
  }
1537
- if (!E) {
1538
- var b = (s.current.shards || []).map(St).filter(Boolean).filter(function(R) {
1539
- return R.contains(y.target);
1540
- }), _ = b.length > 0 ? i(y, b[0]) : !s.current.noIsolation;
1541
- _ && y.cancelable && y.preventDefault();
1538
+ if (!_) {
1539
+ var b = (s.current.shards || []).map(Et).filter(Boolean).filter(function(R) {
1540
+ return R.contains(C.target);
1541
+ }), E = b.length > 0 ? c(C, b[0]) : !s.current.noIsolation;
1542
+ E && C.cancelable && C.preventDefault();
1542
1543
  }
1543
1544
  }
1544
- }, []), u = a.useCallback(function(d, y, w, E) {
1545
- var b = { name: d, delta: y, target: w, should: E, shadowParent: ta(w) };
1545
+ }, []), u = a.useCallback(function(l, C, w, _) {
1546
+ var b = { name: l, delta: C, target: w, should: _, shadowParent: ta(w) };
1546
1547
  t.current.push(b), setTimeout(function() {
1547
- t.current = t.current.filter(function(_) {
1548
- return _ !== b;
1548
+ t.current = t.current.filter(function(E) {
1549
+ return E !== b;
1549
1550
  });
1550
1551
  }, 1);
1551
- }, []), p = a.useCallback(function(d) {
1552
- n.current = ye(d), r.current = void 0;
1553
- }, []), f = a.useCallback(function(d) {
1554
- u(d.type, bt(d), d.target, i(d, e.lockRef.current));
1555
- }, []), m = a.useCallback(function(d) {
1556
- u(d.type, ye(d), d.target, i(d, e.lockRef.current));
1552
+ }, []), p = a.useCallback(function(l) {
1553
+ n.current = Ce(l), r.current = void 0;
1554
+ }, []), f = a.useCallback(function(l) {
1555
+ u(l.type, St(l), l.target, c(l, e.lockRef.current));
1556
+ }, []), m = a.useCallback(function(l) {
1557
+ u(l.type, Ce(l), l.target, c(l, 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
- }), document.addEventListener("wheel", l, ee), document.addEventListener("touchmove", l, ee), document.addEventListener("touchstart", p, ee), function() {
1564
- te = te.filter(function(d) {
1565
- return d !== c;
1566
- }), document.removeEventListener("wheel", l, ee), document.removeEventListener("touchmove", l, ee), document.removeEventListener("touchstart", p, ee);
1564
+ }), document.addEventListener("wheel", d, ee), document.addEventListener("touchmove", d, ee), document.addEventListener("touchstart", p, ee), function() {
1565
+ te = te.filter(function(l) {
1566
+ return l !== i;
1567
+ }), document.removeEventListener("wheel", d, ee), document.removeEventListener("touchmove", d, ee), document.removeEventListener("touchstart", p, ee);
1567
1568
  };
1568
1569
  }, []);
1569
1570
  var g = e.removeScrollBar, h = e.inert;
1570
1571
  return a.createElement(
1571
1572
  a.Fragment,
1572
1573
  null,
1573
- h ? a.createElement(c, { styles: qo(o) }) : null,
1574
+ h ? a.createElement(i, { styles: qo(o) }) : null,
1574
1575
  g ? a.createElement(Go, { gapMode: e.gapMode }) : null
1575
1576
  );
1576
1577
  }
@@ -1579,23 +1580,23 @@ function ta(e) {
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
- var fn = a.forwardRef(function(e, t) {
1584
- return a.createElement(xe, j({}, e, { ref: t, sideCar: na }));
1583
+ const na = Ao(sn, ea);
1584
+ var pn = a.forwardRef(function(e, t) {
1585
+ return a.createElement(xe, Y({}, e, { ref: t, sideCar: na }));
1585
1586
  });
1586
- fn.classNames = xe.classNames;
1587
- var je = ["Enter", " "], ra = ["ArrowDown", "PageUp", "Home"], pn = ["ArrowUp", "PageDown", "End"], oa = [...ra, ...pn], aa = {
1588
- ltr: [...je, "ArrowRight"],
1589
- rtl: [...je, "ArrowLeft"]
1590
- }, ca = {
1587
+ pn.classNames = xe.classNames;
1588
+ var Ve = ["Enter", " "], ra = ["ArrowDown", "PageUp", "Home"], mn = ["ArrowUp", "PageDown", "End"], oa = [...ra, ...mn], aa = {
1589
+ ltr: [...Ve, "ArrowRight"],
1590
+ rtl: [...Ve, "ArrowLeft"]
1591
+ }, ia = {
1591
1592
  ltr: ["ArrowLeft"],
1592
1593
  rtl: ["ArrowRight"]
1593
- }, pe = "Menu", [de, ia, sa] = Mt(pe), [Z, mn] = Dt(pe, [
1594
+ }, pe = "Menu", [de, ca, sa] = xt(pe), [Z, vn] = Tt(pe, [
1594
1595
  sa,
1595
- Ut,
1596
- 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);
1596
+ Kt,
1597
+ tn
1598
+ ]), Ne = Kt(), hn = tn(), [ua, oe] = Z(pe), [la, me] = Z(pe), gn = (e) => {
1599
+ const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: i, modal: s = !0 } = e, c = Ne(t), [d, u] = a.useState(null), p = a.useRef(!1), f = j(i), m = Nt(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,13 +1604,13 @@ 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
+ }, []), /* @__PURE__ */ v(Hr, { ...c, children: /* @__PURE__ */ v(
1607
1608
  ua,
1608
1609
  {
1609
1610
  scope: t,
1610
1611
  open: n,
1611
1612
  onOpenChange: f,
1612
- content: l,
1613
+ content: d,
1613
1614
  onContentChange: u,
1614
1615
  children: /* @__PURE__ */ v(
1615
1616
  la,
@@ -1625,29 +1626,29 @@ var je = ["Enter", " "], ra = ["ArrowDown", "PageUp", "Home"], pn = ["ArrowUp",
1625
1626
  }
1626
1627
  ) });
1627
1628
  };
1628
- hn.displayName = pe;
1629
- var da = "MenuAnchor", qe = a.forwardRef(
1629
+ gn.displayName = pe;
1630
+ var da = "MenuAnchor", Qe = a.forwardRef(
1630
1631
  (e, t) => {
1631
1632
  const { __scopeMenu: n, ...r } = e, o = Ne(n);
1632
1633
  return /* @__PURE__ */ v(Zr, { ...o, ...r, ref: t });
1633
1634
  }
1634
1635
  );
1635
- qe.displayName = da;
1636
- var fa = "MenuPortal", [kc, gn] = Z(fa, {
1636
+ Qe.displayName = da;
1637
+ var fa = "MenuPortal", [Li, wn] = Z(fa, {
1637
1638
  forceMount: void 0
1638
- }), k = "MenuContent", [pa, Je] = Z(k), wn = a.forwardRef(
1639
+ }), L = "MenuContent", [pa, qe] = Z(L), Cn = 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 = wn(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = oe(L, e.__scopeMenu), s = me(L, 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(ma, { ...o, ref: t }) : /* @__PURE__ */ v(va, { ...o, ref: t }) }) }) });
1642
1643
  }
1643
1644
  ), ma = a.forwardRef(
1644
1645
  (e, t) => {
1645
- const n = oe(k, e.__scopeMenu), r = a.useRef(null), o = W(t, r);
1646
+ const n = oe(L, e.__scopeMenu), r = a.useRef(null), o = $(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 sr(i);
1649
1650
  }, []), /* @__PURE__ */ v(
1650
- et,
1651
+ Je,
1651
1652
  {
1652
1653
  ...e,
1653
1654
  ref: o,
@@ -1656,7 +1657,7 @@ 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)
@@ -1664,9 +1665,9 @@ var fa = "MenuPortal", [kc, gn] = Z(fa, {
1664
1665
  );
1665
1666
  }
1666
1667
  ), va = a.forwardRef((e, t) => {
1667
- const n = oe(k, e.__scopeMenu);
1668
+ const n = oe(L, e.__scopeMenu);
1668
1669
  return /* @__PURE__ */ v(
1669
- et,
1670
+ Je,
1670
1671
  {
1671
1672
  ...e,
1672
1673
  ref: t,
@@ -1676,34 +1677,34 @@ var fa = "MenuPortal", [kc, gn] = Z(fa, {
1676
1677
  onDismiss: () => n.onOpenChange(!1)
1677
1678
  }
1678
1679
  );
1679
- }), et = a.forwardRef(
1680
+ }), Je = a.forwardRef(
1680
1681
  (e, t) => {
1681
1682
  const {
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
- onEntryFocus: l,
1688
+ disableOutsidePointerEvents: c,
1689
+ onEntryFocus: d,
1689
1690
  onEscapeKeyDown: u,
1690
1691
  onPointerDownOutside: p,
1691
1692
  onFocusOutside: f,
1692
1693
  onInteractOutside: m,
1693
1694
  onDismiss: g,
1694
1695
  disableOutsideScroll: h,
1695
- ...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;
1696
+ ...l
1697
+ } = e, C = oe(L, n), w = me(L, n), _ = Ne(n), b = hn(n), E = ca(n), [R, x] = a.useState(null), S = a.useRef(null), P = $(t, S, C.onContentChange), I = a.useRef(0), T = a.useRef(""), z = a.useRef(0), X = a.useRef(null), U = a.useRef("right"), Q = a.useRef(0), q = h ? pn : a.Fragment, k = h ? { as: Xe, allowPinchZoom: !0 } : void 0, J = (y) => {
1698
+ var K, ce;
1699
+ const A = T.current + y, N = E().filter((F) => !F.disabled), B = document.activeElement, ae = (K = N.find((F) => F.ref.current === B)) == null ? void 0 : K.textValue, ie = N.map((F) => F.textValue), ve = Ma(ie, A, ae), H = (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
- })(A), z && setTimeout(() => z.focus());
1702
+ })(A), H && setTimeout(() => H.focus());
1702
1703
  };
1703
1704
  a.useEffect(() => () => window.clearTimeout(I.current), []), Tr();
1704
- const O = a.useCallback((C) => {
1705
- 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);
1705
+ const O = a.useCallback((y) => {
1706
+ var N, B;
1707
+ return U.current === ((N = X.current) == null ? void 0 : N.side) && Na(y, (B = X.current) == null ? void 0 : B.area);
1707
1708
  }, []);
1708
1709
  return /* @__PURE__ */ v(
1709
1710
  pa,
@@ -1711,50 +1712,50 @@ var fa = "MenuPortal", [kc, gn] = Z(fa, {
1711
1712
  scope: n,
1712
1713
  searchRef: T,
1713
1714
  onItemEnter: a.useCallback(
1714
- (C) => {
1715
- O(C) && C.preventDefault();
1715
+ (y) => {
1716
+ O(y) && y.preventDefault();
1716
1717
  },
1717
1718
  [O]
1718
1719
  ),
1719
1720
  onItemLeave: a.useCallback(
1720
- (C) => {
1721
+ (y) => {
1721
1722
  var A;
1722
- O(C) || ((A = S.current) == null || A.focus(), x(null));
1723
+ O(y) || ((A = S.current) == null || A.focus(), x(null));
1723
1724
  },
1724
1725
  [O]
1725
1726
  ),
1726
1727
  onTriggerLeave: a.useCallback(
1727
- (C) => {
1728
- O(C) && C.preventDefault();
1728
+ (y) => {
1729
+ O(y) && y.preventDefault();
1729
1730
  },
1730
1731
  [O]
1731
1732
  ),
1732
- pointerGraceTimerRef: V,
1733
- onPointerGraceIntentChange: a.useCallback((C) => {
1734
- H.current = C;
1733
+ pointerGraceTimerRef: z,
1734
+ onPointerGraceIntentChange: a.useCallback((y) => {
1735
+ X.current = y;
1735
1736
  }, []),
1736
- children: /* @__PURE__ */ v(q, { ...$, children: /* @__PURE__ */ v(
1737
- kt,
1737
+ children: /* @__PURE__ */ v(q, { ...k, children: /* @__PURE__ */ v(
1738
+ $t,
1738
1739
  {
1739
1740
  asChild: !0,
1740
1741
  trapped: o,
1741
- onMountAutoFocus: M(c, (C) => {
1742
+ onMountAutoFocus: M(i, (y) => {
1742
1743
  var A;
1743
- C.preventDefault(), (A = S.current) == null || A.focus({ preventScroll: !0 });
1744
+ y.preventDefault(), (A = S.current) == null || A.focus({ preventScroll: !0 });
1744
1745
  }),
1745
1746
  onUnmountAutoFocus: s,
1746
1747
  children: /* @__PURE__ */ v(
1747
- Ft,
1748
+ Lt,
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
+ _o,
1758
1759
  {
1759
1760
  asChild: !0,
1760
1761
  ...b,
@@ -1763,8 +1764,8 @@ var fa = "MenuPortal", [kc, gn] = Z(fa, {
1763
1764
  loop: r,
1764
1765
  currentTabStopId: R,
1765
1766
  onCurrentTabStopIdChange: x,
1766
- onEntryFocus: M(l, (C) => {
1767
- w.isUsingKeyboardRef.current || C.preventDefault();
1767
+ onEntryFocus: M(d, (y) => {
1768
+ w.isUsingKeyboardRef.current || y.preventDefault();
1768
1769
  }),
1769
1770
  preventScrollOnEntryFocus: !0,
1770
1771
  children: /* @__PURE__ */ v(
@@ -1772,32 +1773,32 @@ var fa = "MenuPortal", [kc, gn] = Z(fa, {
1772
1773
  {
1773
1774
  role: "menu",
1774
1775
  "aria-orientation": "vertical",
1775
- "data-state": On(y.open),
1776
+ "data-state": Fn(C.open),
1776
1777
  "data-radix-menu-content": "",
1777
1778
  dir: w.dir,
1778
- ...E,
1779
- ...d,
1779
+ ..._,
1780
+ ...l,
1780
1781
  ref: P,
1781
- style: { outline: "none", ...d.style },
1782
- onKeyDown: M(d.onKeyDown, (C) => {
1783
- const N = C.target.closest("[data-radix-menu-content]") === C.currentTarget, U = C.ctrlKey || C.altKey || C.metaKey, ae = C.key.length === 1;
1784
- 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;
1787
- C.preventDefault();
1788
- const z = _().filter((G) => !G.disabled).map((G) => G.ref.current);
1789
- pn.includes(C.key) && z.reverse(), Ra(z);
1782
+ style: { outline: "none", ...l.style },
1783
+ onKeyDown: M(l.onKeyDown, (y) => {
1784
+ const N = y.target.closest("[data-radix-menu-content]") === y.currentTarget, B = y.ctrlKey || y.altKey || y.metaKey, ae = y.key.length === 1;
1785
+ N && (y.key === "Tab" && y.preventDefault(), !B && ae && J(y.key));
1786
+ const ie = S.current;
1787
+ if (y.target !== ie || !oa.includes(y.key)) return;
1788
+ y.preventDefault();
1789
+ const H = E().filter((K) => !K.disabled).map((K) => K.ref.current);
1790
+ mn.includes(y.key) && H.reverse(), Ra(H);
1790
1791
  }),
1791
- onBlur: M(e.onBlur, (C) => {
1792
- C.currentTarget.contains(C.target) || (window.clearTimeout(I.current), T.current = "");
1792
+ onBlur: M(e.onBlur, (y) => {
1793
+ y.currentTarget.contains(y.target) || (window.clearTimeout(I.current), T.current = "");
1793
1794
  }),
1794
1795
  onPointerMove: M(
1795
1796
  e.onPointerMove,
1796
- fe((C) => {
1797
- const A = C.target, N = Q.current !== C.clientX;
1798
- if (C.currentTarget.contains(A) && N) {
1799
- const U = C.clientX > Q.current ? "right" : "left";
1800
- K.current = U, Q.current = C.clientX;
1797
+ fe((y) => {
1798
+ const A = y.target, N = Q.current !== y.clientX;
1799
+ if (y.currentTarget.contains(A) && N) {
1800
+ const B = y.clientX > Q.current ? "right" : "left";
1801
+ U.current = B, Q.current = y.clientX;
1801
1802
  }
1802
1803
  })
1803
1804
  )
@@ -1813,35 +1814,35 @@ var fa = "MenuPortal", [kc, gn] = Z(fa, {
1813
1814
  );
1814
1815
  }
1815
1816
  );
1816
- wn.displayName = k;
1817
- var ha = "MenuGroup", tt = a.forwardRef(
1817
+ Cn.displayName = L;
1818
+ var ha = "MenuGroup", et = a.forwardRef(
1818
1819
  (e, t) => {
1819
1820
  const { __scopeMenu: n, ...r } = e;
1820
- return /* @__PURE__ */ v(B.div, { role: "group", ...r, ref: t });
1821
+ return /* @__PURE__ */ v(W.div, { role: "group", ...r, ref: t });
1821
1822
  }
1822
1823
  );
1823
- tt.displayName = ha;
1824
+ et.displayName = ha;
1824
1825
  var ga = "MenuLabel", yn = a.forwardRef(
1825
1826
  (e, t) => {
1826
1827
  const { __scopeMenu: n, ...r } = e;
1827
- return /* @__PURE__ */ v(B.div, { ...r, ref: t });
1828
+ return /* @__PURE__ */ v(W.div, { ...r, ref: t });
1828
1829
  }
1829
1830
  );
1830
1831
  yn.displayName = ga;
1831
- var _e = "MenuItem", _t = "menu.itemSelect", Ie = a.forwardRef(
1832
+ var Ee = "MenuItem", Rt = "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(Ee, e.__scopeMenu), c = qe(Ee, e.__scopeMenu), d = $(t, i), u = a.useRef(!1), p = () => {
1835
+ const f = i.current;
1835
1836
  if (!n && f) {
1836
- const m = new CustomEvent(_t, { bubbles: !0, cancelable: !0 });
1837
- f.addEventListener(_t, (g) => r == null ? void 0 : r(g), { once: !0 }), Tt(f, m), m.defaultPrevented ? u.current = !1 : s.onClose();
1837
+ const m = new CustomEvent(Rt, { bubbles: !0, cancelable: !0 });
1838
+ f.addEventListener(Rt, (g) => r == null ? void 0 : r(g), { once: !0 }), Ot(f, m), m.defaultPrevented ? u.current = !1 : s.onClose();
1838
1839
  }
1839
1840
  };
1840
1841
  return /* @__PURE__ */ v(
1841
- Cn,
1842
+ _n,
1842
1843
  {
1843
1844
  ...o,
1844
- ref: l,
1845
+ ref: d,
1845
1846
  disabled: n,
1846
1847
  onClick: M(e.onClick, p),
1847
1848
  onPointerDown: (f) => {
@@ -1853,34 +1854,34 @@ 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
- n || m && f.key === " " || je.includes(f.key) && (f.currentTarget.click(), f.preventDefault());
1857
+ const m = c.searchRef.current !== "";
1858
+ n || m && f.key === " " || Ve.includes(f.key) && (f.currentTarget.click(), f.preventDefault());
1858
1859
  })
1859
1860
  }
1860
1861
  );
1861
1862
  }
1862
1863
  );
1863
- Ie.displayName = _e;
1864
- var Cn = a.forwardRef(
1864
+ Ie.displayName = Ee;
1865
+ var _n = 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 = qe(Ee, n), c = hn(n), d = a.useRef(null), u = $(t, d), [p, f] = a.useState(!1), [m, g] = a.useState("");
1867
1868
  return a.useEffect(() => {
1868
- const h = l.current;
1869
+ const h = d.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
- B.div,
1877
+ children: /* @__PURE__ */ v(bo, { asChild: !0, ...c, focusable: !r, children: /* @__PURE__ */ v(
1878
+ W.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,17 +1900,17 @@ var Cn = a.forwardRef(
1899
1900
  }
1900
1901
  );
1901
1902
  }
1902
- ), wa = "MenuCheckboxItem", En = a.forwardRef(
1903
+ ), wa = "MenuCheckboxItem", bn = a.forwardRef(
1903
1904
  (e, t) => {
1904
1905
  const { checked: n = !1, onCheckedChange: r, ...o } = e;
1905
- return /* @__PURE__ */ v(Pn, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ v(
1906
+ return /* @__PURE__ */ v(Mn, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ v(
1906
1907
  Ie,
1907
1908
  {
1908
1909
  role: "menuitemcheckbox",
1909
1910
  "aria-checked": Re(n) ? "mixed" : n,
1910
1911
  ...o,
1911
1912
  ref: t,
1912
- "data-state": rt(n),
1913
+ "data-state": nt(n),
1913
1914
  onSelect: M(
1914
1915
  o.onSelect,
1915
1916
  () => r == null ? void 0 : r(Re(n) ? !0 : !n),
@@ -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(
1924
- bn,
1923
+ bn.displayName = wa;
1924
+ var Sn = "MenuRadioGroup", [Ca, ya] = Z(
1925
+ Sn,
1925
1926
  { value: void 0, onValueChange: () => {
1926
1927
  } }
1927
- ), Sn = a.forwardRef(
1928
+ ), En = 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 = j(r);
1931
+ return /* @__PURE__ */ v(Ca, { scope: e.__scopeMenu, value: n, onValueChange: i, children: /* @__PURE__ */ v(et, { ...o, ref: t }) });
1931
1932
  }
1932
1933
  );
1933
- Sn.displayName = bn;
1934
- var _n = "MenuRadioItem", Rn = a.forwardRef(
1934
+ En.displayName = Sn;
1935
+ var Rn = "MenuRadioItem", Pn = 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 = ya(Rn, e.__scopeMenu), i = n === o.value;
1938
+ return /* @__PURE__ */ v(Mn, { 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": nt(i),
1945
1946
  onSelect: M(
1946
1947
  r.onSelect,
1947
1948
  () => {
@@ -1954,35 +1955,35 @@ var _n = "MenuRadioItem", Rn = a.forwardRef(
1954
1955
  ) });
1955
1956
  }
1956
1957
  );
1957
- Rn.displayName = _n;
1958
- var nt = "MenuItemIndicator", [Pn, Ea] = Z(
1959
- nt,
1958
+ Pn.displayName = Rn;
1959
+ var tt = "MenuItemIndicator", [Mn, _a] = Z(
1960
+ tt,
1960
1961
  { checked: !1 }
1961
- ), Mn = a.forwardRef(
1962
+ ), xn = 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 = _a(tt, 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
- B.span,
1970
+ W.span,
1970
1971
  {
1971
1972
  ...o,
1972
1973
  ref: t,
1973
- "data-state": rt(c.checked)
1974
+ "data-state": nt(i.checked)
1974
1975
  }
1975
1976
  )
1976
1977
  }
1977
1978
  );
1978
1979
  }
1979
1980
  );
1980
- Mn.displayName = nt;
1981
- var ba = "MenuSeparator", xn = a.forwardRef(
1981
+ xn.displayName = tt;
1982
+ var ba = "MenuSeparator", Nn = a.forwardRef(
1982
1983
  (e, t) => {
1983
1984
  const { __scopeMenu: n, ...r } = e;
1984
1985
  return /* @__PURE__ */ v(
1985
- B.div,
1986
+ W.div,
1986
1987
  {
1987
1988
  role: "separator",
1988
1989
  "aria-orientation": "horizontal",
@@ -1992,34 +1993,34 @@ var ba = "MenuSeparator", xn = a.forwardRef(
1992
1993
  );
1993
1994
  }
1994
1995
  );
1995
- xn.displayName = ba;
1996
- var Sa = "MenuArrow", Nn = a.forwardRef(
1996
+ Nn.displayName = ba;
1997
+ var Sa = "MenuArrow", In = a.forwardRef(
1997
1998
  (e, t) => {
1998
1999
  const { __scopeMenu: n, ...r } = e, o = Ne(n);
1999
2000
  return /* @__PURE__ */ v(qr, { ...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
+ In.displayName = Sa;
2004
+ var Ea = "MenuSub", [ki, An] = Z(Ea), le = "MenuSubTrigger", Dn = 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 = An(le, e.__scopeMenu), i = qe(le, e.__scopeMenu), s = a.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: d } = 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
- window.clearTimeout(f), l(null);
2012
+ window.clearTimeout(f), d(null);
2012
2013
  };
2013
- }, [i, l]), /* @__PURE__ */ v(qe, { asChild: !0, ...u, children: /* @__PURE__ */ v(
2014
- Cn,
2014
+ }, [c, d]), /* @__PURE__ */ v(Qe, { asChild: !0, ...u, children: /* @__PURE__ */ v(
2015
+ _n,
2015
2016
  {
2016
2017
  id: o.triggerId,
2017
2018
  "aria-haspopup": "menu",
2018
2019
  "aria-expanded": n.open,
2019
2020
  "aria-controls": o.contentId,
2020
- "data-state": On(n.open),
2021
+ "data-state": Fn(n.open),
2021
2022
  ...e,
2022
- ref: He(t, o.onTriggerChange),
2023
+ ref: je(t, o.onTriggerChange),
2023
2024
  onClick: (f) => {
2024
2025
  var m;
2025
2026
  (m = e.onClick) == null || m.call(e, f), !(e.disabled || f.defaultPrevented) && (f.currentTarget.focus(), n.open || n.onOpenChange(!0));
@@ -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
  })
@@ -2039,46 +2040,46 @@ var _a = "MenuSub", [$c, In] = Z(_a), le = "MenuSubTrigger", An = a.forwardRef(
2039
2040
  p();
2040
2041
  const m = (g = n.content) == null ? void 0 : g.getBoundingClientRect();
2041
2042
  if (m) {
2042
- 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({
2043
+ const l = (h = n.content) == null ? void 0 : h.dataset.side, C = l === "right", w = C ? -5 : 5, _ = m[C ? "left" : "right"], b = m[C ? "right" : "left"];
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
2047
2048
  { x: f.clientX + w, y: f.clientY },
2048
- { x: E, y: m.top },
2049
+ { x: _, y: m.top },
2049
2050
  { x: b, y: m.top },
2050
2051
  { x: b, y: m.bottom },
2051
- { x: E, y: m.bottom }
2052
+ { x: _, y: m.bottom }
2052
2053
  ],
2053
- side: d
2054
- }), window.clearTimeout(i.current), i.current = window.setTimeout(
2055
- () => c.onPointerGraceIntentChange(null),
2054
+ side: l
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
+ const m = i.searchRef.current !== "";
2067
2068
  e.disabled || m && f.key === " " || aa[r.dir].includes(f.key) && (n.onOpenChange(!0), (g = n.content) == null || g.focus(), f.preventDefault());
2068
2069
  })
2069
2070
  }
2070
2071
  ) });
2071
2072
  }
2072
2073
  );
2073
- An.displayName = le;
2074
- var Dn = "MenuSubContent", Tn = a.forwardRef(
2074
+ Dn.displayName = le;
2075
+ var Tn = "MenuSubContent", On = 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(
2078
- et,
2077
+ const n = wn(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = oe(L, e.__scopeMenu), s = me(L, e.__scopeMenu), c = An(Tn, e.__scopeMenu), d = a.useRef(null), u = $(t, d);
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(
2079
+ Je,
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",
@@ -2088,32 +2089,32 @@ var Dn = "MenuSubContent", Tn = a.forwardRef(
2088
2089
  trapFocus: !1,
2089
2090
  onOpenAutoFocus: (p) => {
2090
2091
  var f;
2091
- s.isUsingKeyboardRef.current && ((f = l.current) == null || f.focus()), p.preventDefault();
2092
+ s.isUsingKeyboardRef.current && ((f = d.current) == null || f.focus()), p.preventDefault();
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();
2099
2100
  }),
2100
2101
  onKeyDown: M(e.onKeyDown, (p) => {
2101
2102
  var g;
2102
- 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());
2103
+ const f = p.currentTarget.contains(p.target), m = ia[s.dir].includes(p.key);
2104
+ f && m && (i.onOpenChange(!1), (g = c.trigger) == null || g.focus(), p.preventDefault());
2104
2105
  })
2105
2106
  }
2106
2107
  ) }) }) });
2107
2108
  }
2108
2109
  );
2109
- Tn.displayName = Dn;
2110
- function On(e) {
2110
+ On.displayName = Tn;
2111
+ function Fn(e) {
2111
2112
  return e ? "open" : "closed";
2112
2113
  }
2113
2114
  function Re(e) {
2114
2115
  return e === "indeterminate";
2115
2116
  }
2116
- function rt(e) {
2117
+ function nt(e) {
2117
2118
  return Re(e) ? "indeterminate" : e ? "checked" : "unchecked";
2118
2119
  }
2119
2120
  function Ra(e) {
@@ -2125,20 +2126,20 @@ function Pa(e, t) {
2125
2126
  return e.map((n, r) => e[(t + r) % e.length]);
2126
2127
  }
2127
2128
  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));
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 = Pa(e, Math.max(i, 0));
2130
2131
  o.length === 1 && (s = s.filter((u) => u !== n));
2131
- const l = s.find(
2132
+ const d = s.find(
2132
2133
  (u) => u.toLowerCase().startsWith(o.toLowerCase())
2133
2134
  );
2134
- return l !== n ? l : void 0;
2135
+ return d !== n ? d : void 0;
2135
2136
  }
2136
2137
  function xa(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, d = t[i].y, u = t[s].x, p = t[s].y;
2142
+ d > r != p > r && n < (u - c) * (r - d) / (p - d) + c && (o = !o);
2142
2143
  }
2143
2144
  return o;
2144
2145
  }
@@ -2150,83 +2151,83 @@ function Na(e, t) {
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
- ot,
2155
- [mn]
2156
- ), D = mn(), [Ya, Fn] = Va(ot), Ln = (e) => {
2154
+ var Ia = gn, Aa = Qe, Da = Cn, Ta = et, Oa = yn, Fa = Ie, La = bn, ka = En, $a = Pn, Wa = xn, Ba = Nn, Ua = In, Ka = Dn, Ga = On, rt = "DropdownMenu", [za, $i] = fr(
2155
+ rt,
2156
+ [vn]
2157
+ ), D = vn(), [Va, Ln] = za(rt), kn = (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
- } = e, l = D(t), u = a.useRef(null), [p = !1, f] = Pt({
2165
+ modal: c = !0
2166
+ } = e, d = D(t), u = a.useRef(null), [p = !1, f] = Mt({
2166
2167
  prop: o,
2167
- defaultProp: c,
2168
+ defaultProp: i,
2168
2169
  onChange: s
2169
2170
  });
2170
2171
  return /* @__PURE__ */ v(
2171
- Ya,
2172
+ Va,
2172
2173
  {
2173
2174
  scope: t,
2174
- triggerId: We(),
2175
+ triggerId: $e(),
2175
2176
  triggerRef: u,
2176
- contentId: We(),
2177
+ contentId: $e(),
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(Ia, { ...d, open: p, onOpenChange: f, dir: r, modal: c, children: n })
2182
2183
  }
2183
2184
  );
2184
2185
  };
2185
- Ln.displayName = ot;
2186
- var kn = "DropdownMenuTrigger", $n = a.forwardRef(
2186
+ kn.displayName = rt;
2187
+ var $n = "DropdownMenuTrigger", Wn = a.forwardRef(
2187
2188
  (e, t) => {
2188
- const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, c = Fn(kn, n), s = D(n);
2189
+ const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, i = Ln($n, n), s = D(n);
2189
2190
  return /* @__PURE__ */ v(Aa, { asChild: !0, ...s, children: /* @__PURE__ */ v(
2190
- yr.button,
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: At(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
  ) });
2210
2211
  }
2211
2212
  );
2212
- $n.displayName = kn;
2213
- var Wn = "DropdownMenuContent", Bn = a.forwardRef(
2213
+ Wn.displayName = $n;
2214
+ var Bn = "DropdownMenuContent", Un = 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 = Ln(Bn, n), i = D(n), s = a.useRef(!1);
2216
2217
  return /* @__PURE__ */ v(
2217
2218
  Da,
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
- var l;
2226
- s.current || (l = o.triggerRef.current) == null || l.focus(), s.current = !1, i.preventDefault();
2225
+ onCloseAutoFocus: Se(e.onCloseAutoFocus, (c) => {
2226
+ var d;
2227
+ s.current || (d = o.triggerRef.current) == null || d.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 d = c.detail.originalEvent, u = d.button === 0 && d.ctrlKey === !0, p = d.button === 2 || u;
2230
2231
  (!o.modal || p) && (s.current = !0);
2231
2232
  }),
2232
2233
  style: {
@@ -2241,66 +2242,66 @@ var Wn = "DropdownMenuContent", Bn = a.forwardRef(
2241
2242
  );
2242
2243
  }
2243
2244
  );
2244
- Bn.displayName = Wn;
2245
- var ja = "DropdownMenuGroup", Xa = a.forwardRef(
2245
+ Un.displayName = Bn;
2246
+ var Ya = "DropdownMenuGroup", ja = a.forwardRef(
2246
2247
  (e, t) => {
2247
2248
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2248
2249
  return /* @__PURE__ */ v(Ta, { ...o, ...r, ref: t });
2249
2250
  }
2250
2251
  );
2251
- Xa.displayName = ja;
2252
- var Ha = "DropdownMenuLabel", za = a.forwardRef(
2252
+ ja.displayName = Ya;
2253
+ var Xa = "DropdownMenuLabel", Ha = a.forwardRef(
2253
2254
  (e, t) => {
2254
2255
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2255
2256
  return /* @__PURE__ */ v(Oa, { ...o, ...r, ref: t });
2256
2257
  }
2257
2258
  );
2258
- za.displayName = Ha;
2259
- var Za = "DropdownMenuItem", Un = a.forwardRef(
2259
+ Ha.displayName = Xa;
2260
+ var Za = "DropdownMenuItem", Kn = a.forwardRef(
2260
2261
  (e, t) => {
2261
2262
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2262
2263
  return /* @__PURE__ */ v(Fa, { ...o, ...r, ref: t });
2263
2264
  }
2264
2265
  );
2265
- Un.displayName = Za;
2266
+ Kn.displayName = Za;
2266
2267
  var Qa = "DropdownMenuCheckboxItem", qa = a.forwardRef((e, t) => {
2267
2268
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2268
2269
  return /* @__PURE__ */ v(La, { ...o, ...r, ref: t });
2269
2270
  });
2270
2271
  qa.displayName = Qa;
2271
- var Ja = "DropdownMenuRadioGroup", ec = a.forwardRef((e, t) => {
2272
+ var Ja = "DropdownMenuRadioGroup", ei = a.forwardRef((e, t) => {
2272
2273
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2273
2274
  return /* @__PURE__ */ v(ka, { ...o, ...r, ref: t });
2274
2275
  });
2275
- ec.displayName = Ja;
2276
- var tc = "DropdownMenuRadioItem", nc = a.forwardRef((e, t) => {
2276
+ ei.displayName = Ja;
2277
+ var ti = "DropdownMenuRadioItem", ni = a.forwardRef((e, t) => {
2277
2278
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2278
2279
  return /* @__PURE__ */ v($a, { ...o, ...r, ref: t });
2279
2280
  });
2280
- nc.displayName = tc;
2281
- var rc = "DropdownMenuItemIndicator", oc = a.forwardRef((e, t) => {
2281
+ ni.displayName = ti;
2282
+ var ri = "DropdownMenuItemIndicator", oi = a.forwardRef((e, t) => {
2282
2283
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2283
2284
  return /* @__PURE__ */ v(Wa, { ...o, ...r, ref: t });
2284
2285
  });
2285
- oc.displayName = rc;
2286
- var ac = "DropdownMenuSeparator", cc = a.forwardRef((e, t) => {
2286
+ oi.displayName = ri;
2287
+ var ai = "DropdownMenuSeparator", ii = a.forwardRef((e, t) => {
2287
2288
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2288
2289
  return /* @__PURE__ */ v(Ba, { ...o, ...r, ref: t });
2289
2290
  });
2290
- cc.displayName = ac;
2291
- var ic = "DropdownMenuArrow", sc = a.forwardRef(
2291
+ ii.displayName = ai;
2292
+ var ci = "DropdownMenuArrow", si = a.forwardRef(
2292
2293
  (e, t) => {
2293
2294
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2294
2295
  return /* @__PURE__ */ v(Ua, { ...o, ...r, ref: t });
2295
2296
  }
2296
2297
  );
2297
- sc.displayName = ic;
2298
- var uc = "DropdownMenuSubTrigger", lc = a.forwardRef((e, t) => {
2298
+ si.displayName = ci;
2299
+ var ui = "DropdownMenuSubTrigger", li = a.forwardRef((e, t) => {
2299
2300
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2300
2301
  return /* @__PURE__ */ v(Ka, { ...o, ...r, ref: t });
2301
2302
  });
2302
- lc.displayName = uc;
2303
- var dc = "DropdownMenuSubContent", fc = a.forwardRef((e, t) => {
2303
+ li.displayName = ui;
2304
+ var di = "DropdownMenuSubContent", fi = a.forwardRef((e, t) => {
2304
2305
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2305
2306
  return /* @__PURE__ */ v(
2306
2307
  Ga,
@@ -2319,75 +2320,102 @@ 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
+ fi.displayName = di;
2324
+ var pi = kn, mi = Wn, vi = Un, hi = Kn;
2325
+ const gi = "cfxui__DropdownSelect__trigger__c03df", wi = "cfxui__DropdownSelect__onlight__f0191", Ci = "cfxui__DropdownSelect__fullWidth__dce56", yi = "cfxui__DropdownSelect__icon__d05b8", _i = "cfxui__DropdownSelect__placeholder__e0d89", bi = "cfxui__DropdownSelect__content__05ed8", Si = "cfxui__DropdownSelect__item__0e45f", G = {
2326
+ trigger: gi,
2327
+ onlight: wi,
2328
+ fullWidth: Ci,
2329
+ icon: yi,
2330
+ placeholder: _i,
2331
+ content: bi,
2332
+ item: Si,
2333
+ "dropdownselect-size-initial-large": "cfxui__DropdownSelect__dropdownselect-size-initial-large__d6bf3",
2334
+ "dropdownselect-size-initial-small": "cfxui__DropdownSelect__dropdownselect-size-initial-small__56570",
2335
+ "dropdownselect-size-small-large": "cfxui__DropdownSelect__dropdownselect-size-small-large__7f027",
2336
+ "dropdownselect-size-small-small": "cfxui__DropdownSelect__dropdownselect-size-small-small__bea7a",
2337
+ "dropdownselect-size-small-medium-large": "cfxui__DropdownSelect__dropdownselect-size-small-medium-large__c82c6",
2338
+ "dropdownselect-size-small-medium-small": "cfxui__DropdownSelect__dropdownselect-size-small-medium-small__f719a",
2339
+ "dropdownselect-size-medium-large": "cfxui__DropdownSelect__dropdownselect-size-medium-large__eb839",
2340
+ "dropdownselect-size-medium-small": "cfxui__DropdownSelect__dropdownselect-size-medium-small__698db",
2341
+ "dropdownselect-size-medium-large-large": "cfxui__DropdownSelect__dropdownselect-size-medium-large-large__dd545",
2342
+ "dropdownselect-size-medium-large-small": "cfxui__DropdownSelect__dropdownselect-size-medium-large-small__8cd70",
2343
+ "dropdownselect-size-large-large": "cfxui__DropdownSelect__dropdownselect-size-large-large__3b065",
2344
+ "dropdownselect-size-large-small": "cfxui__DropdownSelect__dropdownselect-size-large-small__5bca7",
2345
+ "dropdownselect-size-xlarge-large": "cfxui__DropdownSelect__dropdownselect-size-xlarge-large__23eae",
2346
+ "dropdownselect-size-xlarge-small": "cfxui__DropdownSelect__dropdownselect-size-xlarge-small__d232d"
2347
+ }, Wi = {
2348
+ small: "xxsmall",
2349
+ normal: "xsmall",
2350
+ large: "normal"
2351
+ }, Bi = function({
2335
2352
  options: t,
2336
2353
  value: n,
2337
2354
  onChange: r,
2338
2355
  size: o = "normal",
2339
- fullWidth: c = !1,
2356
+ fullWidth: i = !1,
2340
2357
  onlight: s = !1,
2341
- disabled: i,
2342
- placeholder: l = "Select..."
2358
+ disabled: c,
2359
+ placeholder: d = "Select..."
2343
2360
  }) {
2344
- const u = jn(null), [p, f] = Rt(void 0);
2345
- return Xn(() => {
2346
- c && u.current && f(u.current.offsetWidth);
2347
- }, [c]), /* @__PURE__ */ st(pc, { children: [
2361
+ const u = jn(null), [p, f] = Pt(void 0);
2362
+ Xn(() => {
2363
+ i && u.current && f(u.current.offsetWidth);
2364
+ }, [i]);
2365
+ const m = st.getResponsiveFlatClassnames("dropdownselect-size", o).map((l) => G[l]), g = ut(
2366
+ G.trigger,
2367
+ m,
2368
+ {
2369
+ [G.placeholder]: !n,
2370
+ [G.fullWidth]: i,
2371
+ [G.onlight]: s
2372
+ }
2373
+ ), h = ut(
2374
+ G.content,
2375
+ m,
2376
+ {
2377
+ [G.fullWidth]: i
2378
+ }
2379
+ );
2380
+ return /* @__PURE__ */ ct(pi, { children: [
2348
2381
  /* @__PURE__ */ v(
2349
- mc,
2382
+ mi,
2350
2383
  {
2351
2384
  ref: u,
2352
- className: Ae(L.trigger, L[o], {
2353
- [L.placeholder]: !n,
2354
- [L.fullWidth]: c,
2355
- [L.onlight]: s
2356
- }),
2357
- disabled: i,
2358
- children: /* @__PURE__ */ st(dr, { gap: "small", centered: !0, spaceBetween: !0, children: [
2359
- n || l,
2360
- /* @__PURE__ */ v(lr, { size: sr[o], className: L.icon, name: "DownChevron" })
2385
+ className: g,
2386
+ disabled: c,
2387
+ children: /* @__PURE__ */ ct(dr, { gap: "small", centered: !0, spaceBetween: !0, children: [
2388
+ n || d,
2389
+ /* @__PURE__ */ v(lr, { className: G.icon, name: "DownChevron" })
2361
2390
  ] })
2362
2391
  }
2363
2392
  ),
2364
2393
  /* @__PURE__ */ v(
2365
- vc,
2394
+ vi,
2366
2395
  {
2367
2396
  align: "end",
2368
2397
  side: "bottom",
2369
- className: Ae(L.content, {
2370
- [L.fullWidth]: c,
2371
- [L.onlight]: s
2372
- }),
2373
- style: { width: p },
2374
- children: t.map((m) => /* @__PURE__ */ v(
2375
- hc,
2398
+ className: h,
2399
+ style: {
2400
+ width: p,
2401
+ zIndex: st.zindex("max")
2402
+ },
2403
+ children: t.map((l) => /* @__PURE__ */ v(
2404
+ hi,
2376
2405
  {
2377
- className: Ae(L.item, L[o], {
2378
- [L.fullWidth]: c
2379
- }),
2380
- onSelect: () => r(m.value),
2406
+ className: G.item,
2407
+ onSelect: () => r(l.value),
2381
2408
  style: { width: p },
2382
- children: m.label
2409
+ children: l.label
2383
2410
  },
2384
- m.value
2411
+ l.value
2385
2412
  ))
2386
2413
  }
2387
2414
  )
2388
2415
  ] });
2389
2416
  };
2390
2417
  export {
2391
- Bc as DropdownSelect,
2392
- Bc as default
2418
+ Bi as DropdownSelect,
2419
+ Wi as ICON_SIZE_MAP,
2420
+ Bi as default
2393
2421
  };