@krosoft/react 0.0.89 → 0.0.91

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 (117) hide show
  1. package/dist/{AppSubTitle-RKbtrPJr.js → AppSubTitle-CvJlatS9.js} +1 -1
  2. package/dist/{AppTitle-DCQpP2qE.js → AppTitle-LIQCjpo5.js} +26 -25
  3. package/dist/{AppVerticalTabs-pK3i9ZTD.js → AppVerticalTabs-BHrad7wu.js} +23 -23
  4. package/dist/ConfirmationDialog-BlRXnFH5.js +321 -0
  5. package/dist/ErrorAlert-BITMD2I5.js +33 -0
  6. package/dist/{LoadingState-DQjGcT2l.js → LoadingState-COf3KhOP.js} +6 -6
  7. package/dist/{MetricCard-DB1ME6tD.js → MetricCard-BGT2QRn0.js} +14 -13
  8. package/dist/{SearchInput-D_SLIZ2y.js → SearchInput-DpOuKSIf.js} +115 -126
  9. package/dist/{TableFilter-DXTOY-oa.js → TableFilter-DFtN_-Bg.js} +51 -51
  10. package/dist/{TableSettings-CBtuAPgM.js → TableSettings-m2q3s0wU.js} +68 -80
  11. package/dist/{ThemeSelector-CU8JmN2b.js → ThemeSelector-D9KTJAWz.js} +3 -3
  12. package/dist/{Topbar-BzZxu1Zi.js → Topbar-QKCJiWdO.js} +2 -2
  13. package/dist/{badge-DyRSpnOb.js → badge-C09fRxvd.js} +1 -1
  14. package/dist/card-Bn3Y7DHQ.js +48 -0
  15. package/dist/components/core/cards/index.js +1 -1
  16. package/dist/components/core/dialogs/ConfirmDeleteDialog.d.ts +10 -0
  17. package/dist/components/core/dialogs/ConfirmDeleteDialog.d.ts.map +1 -0
  18. package/dist/components/core/dialogs/ConfirmationDialog.d.ts +13 -0
  19. package/dist/components/core/dialogs/ConfirmationDialog.d.ts.map +1 -0
  20. package/dist/components/core/dialogs/index.d.ts +3 -0
  21. package/dist/components/core/dialogs/index.d.ts.map +1 -1
  22. package/dist/components/core/dialogs/index.js +15 -13
  23. package/dist/components/core/filters/index.js +1 -1
  24. package/dist/components/core/index.js +60 -56
  25. package/dist/components/core/inputs/index.js +1 -1
  26. package/dist/components/core/layouts/index.js +2 -2
  27. package/dist/components/core/navbar/index.js +1 -1
  28. package/dist/components/core/states/ErrorAlert.d.ts +7 -0
  29. package/dist/components/core/states/ErrorAlert.d.ts.map +1 -0
  30. package/dist/components/core/states/index.d.ts +1 -0
  31. package/dist/components/core/states/index.d.ts.map +1 -1
  32. package/dist/components/core/states/index.js +6 -4
  33. package/dist/components/core/table/index.js +1 -1
  34. package/dist/components/core/tabs/index.js +1 -1
  35. package/dist/components/core/theme/index.js +1 -1
  36. package/dist/components/index.js +280 -136
  37. package/dist/components/ui/accordion.d.ts +8 -0
  38. package/dist/components/ui/accordion.d.ts.map +1 -0
  39. package/dist/components/ui/alert-dialog.d.ts +21 -0
  40. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  41. package/dist/components/ui/aspect-ratio.d.ts +4 -0
  42. package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
  43. package/dist/components/ui/avatar.d.ts +7 -0
  44. package/dist/components/ui/avatar.d.ts.map +1 -0
  45. package/dist/components/ui/breadcrumb.d.ts +20 -0
  46. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  47. package/dist/components/ui/button.d.ts +1 -1
  48. package/dist/components/ui/carousel.d.ts +19 -0
  49. package/dist/components/ui/carousel.d.ts.map +1 -0
  50. package/dist/components/ui/chart.d.ts +50 -0
  51. package/dist/components/ui/chart.d.ts.map +1 -0
  52. package/dist/components/ui/collapsible.d.ts +6 -0
  53. package/dist/components/ui/collapsible.d.ts.map +1 -0
  54. package/dist/components/ui/command.d.ts +83 -0
  55. package/dist/components/ui/command.d.ts.map +1 -0
  56. package/dist/components/ui/context-menu.d.ts +28 -0
  57. package/dist/components/ui/context-menu.d.ts.map +1 -0
  58. package/dist/components/ui/drawer.d.ts +23 -0
  59. package/dist/components/ui/drawer.d.ts.map +1 -0
  60. package/dist/components/ui/form.d.ts +24 -0
  61. package/dist/components/ui/form.d.ts.map +1 -0
  62. package/dist/components/ui/hover-card.d.ts +7 -0
  63. package/dist/components/ui/hover-card.d.ts.map +1 -0
  64. package/dist/components/ui/index.d.ts +42 -16
  65. package/dist/components/ui/index.d.ts.map +1 -1
  66. package/dist/components/ui/index.js +231 -91
  67. package/dist/components/ui/input-otp.d.ts +35 -0
  68. package/dist/components/ui/input-otp.d.ts.map +1 -0
  69. package/dist/components/ui/menubar.d.ts +34 -0
  70. package/dist/components/ui/menubar.d.ts.map +1 -0
  71. package/dist/components/ui/navigation-menu.d.ts +13 -0
  72. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  73. package/dist/components/ui/pagination.d.ts +33 -0
  74. package/dist/components/ui/pagination.d.ts.map +1 -0
  75. package/dist/components/ui/radio-group.d.ts +6 -0
  76. package/dist/components/ui/radio-group.d.ts.map +1 -0
  77. package/dist/components/ui/resizable.d.ts +8 -0
  78. package/dist/components/ui/resizable.d.ts.map +1 -0
  79. package/dist/components/ui/sheet.d.ts +1 -1
  80. package/dist/components/ui/sidebar.d.ts +67 -0
  81. package/dist/components/ui/sidebar.d.ts.map +1 -0
  82. package/dist/components/ui/simple-table.d.ts +11 -0
  83. package/dist/components/ui/simple-table.d.ts.map +1 -0
  84. package/dist/components/ui/slider.d.ts +5 -0
  85. package/dist/components/ui/slider.d.ts.map +1 -0
  86. package/dist/components/ui/sonner.d.ts +5 -0
  87. package/dist/components/ui/sonner.d.ts.map +1 -0
  88. package/dist/components/ui/switch.d.ts +5 -0
  89. package/dist/components/ui/switch.d.ts.map +1 -0
  90. package/dist/components/ui/textarea.d.ts +6 -0
  91. package/dist/components/ui/textarea.d.ts.map +1 -0
  92. package/dist/components/ui/toaster.d.ts +2 -0
  93. package/dist/components/ui/toaster.d.ts.map +1 -0
  94. package/dist/components/ui/toggle-group.d.ts +13 -0
  95. package/dist/components/ui/toggle-group.d.ts.map +1 -0
  96. package/dist/components/ui/toggle.d.ts +13 -0
  97. package/dist/components/ui/toggle.d.ts.map +1 -0
  98. package/dist/{ellipsis-vertical-CqrunffH.js → ellipsis-vertical-BVxSFNOa.js} +1 -1
  99. package/dist/grip-vertical-CJ07_87Y.js +18 -0
  100. package/dist/hooks/index.js +6 -5
  101. package/dist/index-DSyPHOLE.js +147 -0
  102. package/dist/{loader-circle-BhJXKs31.js → loader-circle-GAYBtm3z.js} +1 -1
  103. package/dist/{select-B5wF6jxC.js → select-D6_XPD6x.js} +309 -308
  104. package/dist/toaster-D6ND7OTk.js +113 -0
  105. package/dist/toggle-group-VJoGbVQm.js +19987 -0
  106. package/dist/{tooltip-BzTGwm2E.js → tooltip-CAu4DEhc.js} +767 -796
  107. package/dist/types/ConfirmDialogConfig.d.ts +11 -0
  108. package/dist/types/ConfirmDialogConfig.d.ts.map +1 -0
  109. package/dist/useTheme-Bn8z_uxy.js +31 -0
  110. package/dist/useToast-BFTk4lWz.js +100 -0
  111. package/package.json +29 -7
  112. package/dist/FormDialog-CXLQG83d.js +0 -250
  113. package/dist/card-7XPLAra3.js +0 -23
  114. package/dist/createLucideIcon-CRdjzt2A.js +0 -116
  115. package/dist/skeleton-CJ1F2tD3.js +0 -8
  116. package/dist/tabs-BYqvMsA6.js +0 -6628
  117. package/dist/useTheme-CvNYmhjo.js +0 -128
@@ -4,30 +4,12 @@ import * as a from "react";
4
4
  import ne, { useState as fn } from "react";
5
5
  import * as st from "react-dom";
6
6
  import pn from "react-dom";
7
- import { f as ut, g as dt, u as B, h as G, P as M, i as We, A as mn, j as A, k as Ye, l as ft, D as vn, m as hn, n as Ze, R as gn, V as Sn, o as yn, C as pt } from "./tooltip-BzTGwm2E.js";
8
- import { c as mt } from "./createLucideIcon-CRdjzt2A.js";
9
- function wn(e) {
10
- const t = a.useRef({ value: e, previous: e });
11
- return a.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
12
- }
13
- /**
14
- * @license lucide-react v1.16.0 - ISC
15
- *
16
- * This source code is licensed under the ISC license.
17
- * See the LICENSE file in the root directory of this source tree.
18
- */
19
- const Cn = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], bn = mt("check", Cn);
20
- /**
21
- * @license lucide-react v1.16.0 - ISC
22
- *
23
- * This source code is licensed under the ISC license.
24
- * See the LICENSE file in the root directory of this source tree.
25
- */
26
- const En = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], xn = mt("chevron-up", En);
7
+ import { f as ut, g as dt, u as B, h as We, P as M, i as G, A as mn, j as A, k as Ye, l as ft, D as vn, m as hn, n as Ze, R as gn, V as Sn, o as yn, C as pt } from "./tooltip-CAu4DEhc.js";
8
+ import { c as mt } from "./index-DSyPHOLE.js";
27
9
  // @__NO_SIDE_EFFECTS__
28
10
  function qe(e) {
29
- const t = /* @__PURE__ */ Rn(e), n = a.forwardRef((r, o) => {
30
- const { children: l, ...s } = r, c = a.Children.toArray(l), u = c.find(In);
11
+ const t = /* @__PURE__ */ wn(e), n = a.forwardRef((r, o) => {
12
+ const { children: l, ...s } = r, c = a.Children.toArray(l), u = c.find(bn);
31
13
  if (u) {
32
14
  const d = u.props.children, S = c.map((h) => h === u ? a.Children.count(d) > 1 ? a.Children.only(null) : a.isValidElement(d) ? d.props.children : null : h);
33
15
  return /* @__PURE__ */ v(t, { ...s, ref: o, children: a.isValidElement(d) ? a.cloneElement(d, void 0, S) : null });
@@ -37,22 +19,22 @@ function qe(e) {
37
19
  return n.displayName = `${e}.Slot`, n;
38
20
  }
39
21
  // @__NO_SIDE_EFFECTS__
40
- function Rn(e) {
22
+ function wn(e) {
41
23
  const t = a.forwardRef((n, r) => {
42
24
  const { children: o, ...l } = n;
43
25
  if (a.isValidElement(o)) {
44
- const s = Pn(o), c = Nn(l, o.props);
26
+ const s = xn(o), c = En(l, o.props);
45
27
  return o.type !== a.Fragment && (c.ref = r ? ut(r, s) : s), a.cloneElement(o, c);
46
28
  }
47
29
  return a.Children.count(o) > 1 ? a.Children.only(null) : null;
48
30
  });
49
31
  return t.displayName = `${e}.SlotClone`, t;
50
32
  }
51
- var Tn = Symbol("radix.slottable");
52
- function In(e) {
53
- return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Tn;
33
+ var Cn = Symbol("radix.slottable");
34
+ function bn(e) {
35
+ return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Cn;
54
36
  }
55
- function Nn(e, t) {
37
+ function En(e, t) {
56
38
  const n = { ...t };
57
39
  for (const r in t) {
58
40
  const o = e[r], l = t[r];
@@ -63,12 +45,12 @@ function Nn(e, t) {
63
45
  }
64
46
  return { ...e, ...n };
65
47
  }
66
- function Pn(e) {
48
+ function xn(e) {
67
49
  var r, o;
68
50
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
69
51
  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);
70
52
  }
71
- function _n(e) {
53
+ function Rn(e) {
72
54
  const t = e + "CollectionProvider", [n, r] = dt(t), [o, l] = n(
73
55
  t,
74
56
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
@@ -108,36 +90,26 @@ function _n(e) {
108
90
  r
109
91
  ];
110
92
  }
111
- var An = "Portal", vt = a.forwardRef((e, t) => {
112
- var c;
113
- const { container: n, ...r } = e, [o, l] = a.useState(!1);
114
- G(() => l(!0), []);
115
- const s = n || o && ((c = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : c.body);
116
- return s ? pn.createPortal(/* @__PURE__ */ v(M.div, { ...r, ref: t }), s) : null;
117
- });
118
- vt.displayName = An;
119
- function Qe(e, [t, n]) {
120
- return Math.min(n, Math.max(t, e));
121
- }
122
- var Mn = a.createContext(void 0);
123
- function On(e) {
124
- const t = a.useContext(Mn);
93
+ var Tn = a.createContext(void 0);
94
+ function In(e) {
95
+ const t = a.useContext(Tn);
125
96
  return e || t || "ltr";
126
97
  }
127
- var Oe = 0;
128
- function kn() {
129
- a.useEffect(() => {
130
- const e = document.querySelectorAll("[data-radix-focus-guard]");
131
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? Je()), document.body.insertAdjacentElement("beforeend", e[1] ?? Je()), Oe++, () => {
132
- Oe === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Oe--;
133
- };
134
- }, []);
135
- }
136
- function Je() {
137
- const e = document.createElement("span");
138
- 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;
139
- }
140
- var ke = "focusScope.autoFocusOnMount", Le = "focusScope.autoFocusOnUnmount", et = { bubbles: !1, cancelable: !0 }, Ln = "FocusScope", ht = a.forwardRef((e, t) => {
98
+ /**
99
+ * @license lucide-react v1.16.0 - ISC
100
+ *
101
+ * This source code is licensed under the ISC license.
102
+ * See the LICENSE file in the root directory of this source tree.
103
+ */
104
+ const Nn = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], Pn = mt("check", Nn);
105
+ /**
106
+ * @license lucide-react v1.16.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */
111
+ const _n = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], An = mt("chevron-up", _n);
112
+ var Oe = "focusScope.autoFocusOnMount", ke = "focusScope.autoFocusOnUnmount", Qe = { bubbles: !1, cancelable: !0 }, Mn = "FocusScope", vt = a.forwardRef((e, t) => {
141
113
  const {
142
114
  loop: n = !1,
143
115
  trapped: r = !1,
@@ -176,16 +148,16 @@ var ke = "focusScope.autoFocusOnMount", Le = "focusScope.autoFocusOnUnmount", et
176
148
  }
177
149
  }, [r, c, w.paused]), a.useEffect(() => {
178
150
  if (c) {
179
- nt.add(w);
151
+ et.add(w);
180
152
  const i = document.activeElement;
181
153
  if (!c.contains(i)) {
182
- const g = new CustomEvent(ke, et);
183
- c.addEventListener(ke, d), c.dispatchEvent(g), g.defaultPrevented || (Dn(Hn(gt(c)), { select: !0 }), document.activeElement === i && Z(c));
154
+ const g = new CustomEvent(Oe, Qe);
155
+ c.addEventListener(Oe, d), c.dispatchEvent(g), g.defaultPrevented || (On(Vn(ht(c)), { select: !0 }), document.activeElement === i && Z(c));
184
156
  }
185
157
  return () => {
186
- c.removeEventListener(ke, d), setTimeout(() => {
187
- const g = new CustomEvent(Le, et);
188
- c.addEventListener(Le, S), c.dispatchEvent(g), g.defaultPrevented || Z(i ?? document.body, { select: !0 }), c.removeEventListener(Le, S), nt.remove(w);
158
+ c.removeEventListener(Oe, d), setTimeout(() => {
159
+ const g = new CustomEvent(ke, Qe);
160
+ c.addEventListener(ke, S), c.dispatchEvent(g), g.defaultPrevented || Z(i ?? document.body, { select: !0 }), c.removeEventListener(ke, S), et.remove(w);
189
161
  }, 0);
190
162
  };
191
163
  }
@@ -195,7 +167,7 @@ var ke = "focusScope.autoFocusOnMount", Le = "focusScope.autoFocusOnUnmount", et
195
167
  if (!n && !r || w.paused) return;
196
168
  const p = i.key === "Tab" && !i.altKey && !i.ctrlKey && !i.metaKey, g = document.activeElement;
197
169
  if (p && g) {
198
- const f = i.currentTarget, [m, b] = Bn(f);
170
+ const f = i.currentTarget, [m, b] = kn(f);
199
171
  m && b ? !i.shiftKey && g === b ? (i.preventDefault(), n && Z(m, { select: !0 })) : i.shiftKey && g === m && (i.preventDefault(), n && Z(b, { select: !0 })) : g === f && i.preventDefault();
200
172
  }
201
173
  },
@@ -203,17 +175,17 @@ var ke = "focusScope.autoFocusOnMount", Le = "focusScope.autoFocusOnUnmount", et
203
175
  );
204
176
  return /* @__PURE__ */ v(M.div, { tabIndex: -1, ...s, ref: y, onKeyDown: E });
205
177
  });
206
- ht.displayName = Ln;
207
- function Dn(e, { select: t = !1 } = {}) {
178
+ vt.displayName = Mn;
179
+ function On(e, { select: t = !1 } = {}) {
208
180
  const n = document.activeElement;
209
181
  for (const r of e)
210
182
  if (Z(r, { select: t }), document.activeElement !== n) return;
211
183
  }
212
- function Bn(e) {
213
- const t = gt(e), n = tt(t, e), r = tt(t.reverse(), e);
184
+ function kn(e) {
185
+ const t = ht(e), n = Je(t, e), r = Je(t.reverse(), e);
214
186
  return [n, r];
215
187
  }
216
- function gt(e) {
188
+ function ht(e) {
217
189
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
218
190
  acceptNode: (r) => {
219
191
  const o = r.tagName === "INPUT" && r.type === "hidden";
@@ -223,11 +195,11 @@ function gt(e) {
223
195
  for (; n.nextNode(); ) t.push(n.currentNode);
224
196
  return t;
225
197
  }
226
- function tt(e, t) {
198
+ function Je(e, t) {
227
199
  for (const n of e)
228
- if (!Vn(n, { upTo: t })) return n;
200
+ if (!Ln(n, { upTo: t })) return n;
229
201
  }
230
- function Vn(e, { upTo: t }) {
202
+ function Ln(e, { upTo: t }) {
231
203
  if (getComputedStyle(e).visibility === "hidden") return !0;
232
204
  for (; e; ) {
233
205
  if (t !== void 0 && e === t) return !1;
@@ -236,129 +208,58 @@ function Vn(e, { upTo: t }) {
236
208
  }
237
209
  return !1;
238
210
  }
239
- function Fn(e) {
211
+ function Dn(e) {
240
212
  return e instanceof HTMLInputElement && "select" in e;
241
213
  }
242
214
  function Z(e, { select: t = !1 } = {}) {
243
215
  if (e && e.focus) {
244
216
  const n = document.activeElement;
245
- e.focus({ preventScroll: !0 }), e !== n && Fn(e) && t && e.select();
217
+ e.focus({ preventScroll: !0 }), e !== n && Dn(e) && t && e.select();
246
218
  }
247
219
  }
248
- var nt = Wn();
249
- function Wn() {
220
+ var et = Bn();
221
+ function Bn() {
250
222
  let e = [];
251
223
  return {
252
224
  add(t) {
253
225
  const n = e[0];
254
- t !== n && (n == null || n.pause()), e = rt(e, t), e.unshift(t);
226
+ t !== n && (n == null || n.pause()), e = tt(e, t), e.unshift(t);
255
227
  },
256
228
  remove(t) {
257
229
  var n;
258
- e = rt(e, t), (n = e[0]) == null || n.resume();
230
+ e = tt(e, t), (n = e[0]) == null || n.resume();
259
231
  }
260
232
  };
261
233
  }
262
- function rt(e, t) {
234
+ function tt(e, t) {
263
235
  const n = [...e], r = n.indexOf(t);
264
236
  return r !== -1 && n.splice(r, 1), n;
265
237
  }
266
- function Hn(e) {
238
+ function Vn(e) {
267
239
  return e.filter((t) => t.tagName !== "A");
268
240
  }
269
- // @__NO_SIDE_EFFECTS__
270
- function Un(e) {
271
- const t = /* @__PURE__ */ Kn(e), n = a.forwardRef((r, o) => {
272
- const { children: l, ...s } = r, c = a.Children.toArray(l), u = c.find($n);
273
- if (u) {
274
- const d = u.props.children, S = c.map((h) => h === u ? a.Children.count(d) > 1 ? a.Children.only(null) : a.isValidElement(d) ? d.props.children : null : h);
275
- return /* @__PURE__ */ v(t, { ...s, ref: o, children: a.isValidElement(d) ? a.cloneElement(d, void 0, S) : null });
276
- }
277
- return /* @__PURE__ */ v(t, { ...s, ref: o, children: l });
278
- });
279
- return n.displayName = `${e}.Slot`, n;
280
- }
281
- // @__NO_SIDE_EFFECTS__
282
- function Kn(e) {
283
- const t = a.forwardRef((n, r) => {
284
- const { children: o, ...l } = n;
285
- if (a.isValidElement(o)) {
286
- const s = Gn(o), c = zn(l, o.props);
287
- return o.type !== a.Fragment && (c.ref = r ? ut(r, s) : s), a.cloneElement(o, c);
288
- }
289
- return a.Children.count(o) > 1 ? a.Children.only(null) : null;
290
- });
291
- return t.displayName = `${e}.SlotClone`, t;
292
- }
293
- var jn = Symbol("radix.slottable");
294
- function $n(e) {
295
- return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === jn;
296
- }
297
- function zn(e, t) {
298
- const n = { ...t };
299
- for (const r in t) {
300
- const o = e[r], l = t[r];
301
- /^on[A-Z]/.test(r) ? o && l ? n[r] = (...c) => {
302
- const u = l(...c);
303
- return o(...c), u;
304
- } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...l } : r === "className" && (n[r] = [o, l].filter(Boolean).join(" "));
305
- }
306
- return { ...e, ...n };
241
+ var Fn = "Portal", gt = a.forwardRef((e, t) => {
242
+ var c;
243
+ const { container: n, ...r } = e, [o, l] = a.useState(!1);
244
+ G(() => l(!0), []);
245
+ const s = n || o && ((c = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : c.body);
246
+ return s ? pn.createPortal(/* @__PURE__ */ v(M.div, { ...r, ref: t }), s) : null;
247
+ });
248
+ gt.displayName = Fn;
249
+ var Le = 0;
250
+ function Wn() {
251
+ a.useEffect(() => {
252
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
253
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? nt()), document.body.insertAdjacentElement("beforeend", e[1] ?? nt()), Le++, () => {
254
+ Le === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Le--;
255
+ };
256
+ }, []);
307
257
  }
308
- function Gn(e) {
309
- var r, o;
310
- let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
311
- 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);
258
+ function nt() {
259
+ const e = document.createElement("span");
260
+ 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;
312
261
  }
313
- var Yn = function(e) {
314
- if (typeof document > "u")
315
- return null;
316
- var t = Array.isArray(e) ? e[0] : e;
317
- return t.ownerDocument.body;
318
- }, ie = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ge = {}, De = 0, St = function(e) {
319
- return e && (e.host || St(e.parentNode));
320
- }, Xn = function(e, t) {
321
- return t.map(function(n) {
322
- if (e.contains(n))
323
- return n;
324
- var r = St(n);
325
- return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
326
- }).filter(function(n) {
327
- return !!n;
328
- });
329
- }, Zn = function(e, t, n, r) {
330
- var o = Xn(t, Array.isArray(e) ? e : [e]);
331
- ge[n] || (ge[n] = /* @__PURE__ */ new WeakMap());
332
- var l = ge[n], s = [], c = /* @__PURE__ */ new Set(), u = new Set(o), d = function(h) {
333
- !h || c.has(h) || (c.add(h), d(h.parentNode));
334
- };
335
- o.forEach(d);
336
- var S = function(h) {
337
- !h || u.has(h) || Array.prototype.forEach.call(h.children, function(y) {
338
- if (c.has(y))
339
- S(y);
340
- else
341
- try {
342
- var w = y.getAttribute(r), E = w !== null && w !== "false", i = (ie.get(y) || 0) + 1, p = (l.get(y) || 0) + 1;
343
- ie.set(y, i), l.set(y, p), s.push(y), i === 1 && E && he.set(y, !0), p === 1 && y.setAttribute(n, "true"), E || y.setAttribute(r, "true");
344
- } catch (g) {
345
- console.error("aria-hidden: cannot operate on ", y, g);
346
- }
347
- });
348
- };
349
- return S(t), c.clear(), De++, function() {
350
- s.forEach(function(h) {
351
- var y = ie.get(h) - 1, w = l.get(h) - 1;
352
- ie.set(h, y), l.set(h, w), y || (he.has(h) || h.removeAttribute(r), he.delete(h)), w || h.removeAttribute(n);
353
- }), De--, De || (ie = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ge = {});
354
- };
355
- }, qn = function(e, t, n) {
356
- n === void 0 && (n = "data-aria-hidden");
357
- var r = Array.from(Array.isArray(e) ? e : [e]), o = Yn(e);
358
- return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Zn(r, o, n, "aria-hidden")) : function() {
359
- return null;
360
- };
361
- }, U = function() {
262
+ var U = function() {
362
263
  return U = Object.assign || function(t) {
363
264
  for (var n, r = 1, o = arguments.length; r < o; r++) {
364
265
  n = arguments[r];
@@ -367,7 +268,7 @@ var Yn = function(e) {
367
268
  return t;
368
269
  }, U.apply(this, arguments);
369
270
  };
370
- function yt(e, t) {
271
+ function St(e, t) {
371
272
  var n = {};
372
273
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
373
274
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -375,16 +276,16 @@ function yt(e, t) {
375
276
  t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
376
277
  return n;
377
278
  }
378
- function Qn(e, t, n) {
279
+ function Hn(e, t, n) {
379
280
  if (n || arguments.length === 2) for (var r = 0, o = t.length, l; r < o; r++)
380
281
  (l || !(r in t)) && (l || (l = Array.prototype.slice.call(t, 0, r)), l[r] = t[r]);
381
282
  return e.concat(l || Array.prototype.slice.call(t));
382
283
  }
383
- var we = "right-scroll-bar-position", Ce = "width-before-scroll-bar", Jn = "with-scroll-bars-hidden", er = "--removed-body-scroll-bar-size";
384
- function Be(e, t) {
284
+ var we = "right-scroll-bar-position", Ce = "width-before-scroll-bar", Un = "with-scroll-bars-hidden", Kn = "--removed-body-scroll-bar-size";
285
+ function De(e, t) {
385
286
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
386
287
  }
387
- function tr(e, t) {
288
+ function jn(e, t) {
388
289
  var n = fn(function() {
389
290
  return {
390
291
  // value
@@ -405,31 +306,31 @@ function tr(e, t) {
405
306
  })[0];
406
307
  return n.callback = t, n.facade;
407
308
  }
408
- var nr = typeof window < "u" ? a.useLayoutEffect : a.useEffect, ot = /* @__PURE__ */ new WeakMap();
409
- function rr(e, t) {
410
- var n = tr(null, function(r) {
309
+ var $n = typeof window < "u" ? a.useLayoutEffect : a.useEffect, rt = /* @__PURE__ */ new WeakMap();
310
+ function zn(e, t) {
311
+ var n = jn(null, function(r) {
411
312
  return e.forEach(function(o) {
412
- return Be(o, r);
313
+ return De(o, r);
413
314
  });
414
315
  });
415
- return nr(function() {
416
- var r = ot.get(n);
316
+ return $n(function() {
317
+ var r = rt.get(n);
417
318
  if (r) {
418
319
  var o = new Set(r), l = new Set(e), s = n.current;
419
320
  o.forEach(function(c) {
420
- l.has(c) || Be(c, null);
321
+ l.has(c) || De(c, null);
421
322
  }), l.forEach(function(c) {
422
- o.has(c) || Be(c, s);
323
+ o.has(c) || De(c, s);
423
324
  });
424
325
  }
425
- ot.set(n, e);
326
+ rt.set(n, e);
426
327
  }, [e]), n;
427
328
  }
428
- function or(e) {
329
+ function Gn(e) {
429
330
  return e;
430
331
  }
431
- function ar(e, t) {
432
- t === void 0 && (t = or);
332
+ function Yn(e, t) {
333
+ t === void 0 && (t = Gn);
433
334
  var n = [], r = !1, o = {
434
335
  read: function() {
435
336
  if (r)
@@ -483,13 +384,13 @@ function ar(e, t) {
483
384
  };
484
385
  return o;
485
386
  }
486
- function cr(e) {
387
+ function Xn(e) {
487
388
  e === void 0 && (e = {});
488
- var t = ar(null);
389
+ var t = Yn(null);
489
390
  return t.options = U({ async: !0, ssr: !1 }, e), t;
490
391
  }
491
- var wt = function(e) {
492
- var t = e.sideCar, n = yt(e, ["sideCar"]);
392
+ var yt = function(e) {
393
+ var t = e.sideCar, n = St(e, ["sideCar"]);
493
394
  if (!t)
494
395
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
495
396
  var r = t.read();
@@ -497,21 +398,21 @@ var wt = function(e) {
497
398
  throw new Error("Sidecar medium not found");
498
399
  return a.createElement(r, U({}, n));
499
400
  };
500
- wt.isSideCarExport = !0;
501
- function ir(e, t) {
502
- return e.useMedium(t), wt;
401
+ yt.isSideCarExport = !0;
402
+ function Zn(e, t) {
403
+ return e.useMedium(t), yt;
503
404
  }
504
- var Ct = cr(), Ve = function() {
405
+ var wt = Xn(), Be = function() {
505
406
  }, Ee = a.forwardRef(function(e, t) {
506
407
  var n = a.useRef(null), r = a.useState({
507
- onScrollCapture: Ve,
508
- onWheelCapture: Ve,
509
- onTouchMoveCapture: Ve
510
- }), o = r[0], l = r[1], s = e.forwardProps, c = e.children, u = e.className, d = e.removeScrollBar, S = e.enabled, h = e.shards, y = e.sideCar, w = e.noRelative, E = e.noIsolation, i = e.inert, p = e.allowPinchZoom, g = e.as, f = g === void 0 ? "div" : g, m = e.gapMode, b = yt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = y, _ = rr([n, t]), R = U(U({}, b), o);
408
+ onScrollCapture: Be,
409
+ onWheelCapture: Be,
410
+ onTouchMoveCapture: Be
411
+ }), o = r[0], l = r[1], s = e.forwardProps, c = e.children, u = e.className, d = e.removeScrollBar, S = e.enabled, h = e.shards, y = e.sideCar, w = e.noRelative, E = e.noIsolation, i = e.inert, p = e.allowPinchZoom, g = e.as, f = g === void 0 ? "div" : g, m = e.gapMode, b = St(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = y, _ = zn([n, t]), R = U(U({}, b), o);
511
412
  return a.createElement(
512
413
  a.Fragment,
513
414
  null,
514
- S && a.createElement(x, { sideCar: Ct, removeScrollBar: d, shards: h, noRelative: w, noIsolation: E, inert: i, setCallbacks: l, allowPinchZoom: !!p, lockRef: n, gapMode: m }),
415
+ S && a.createElement(x, { sideCar: wt, removeScrollBar: d, shards: h, noRelative: w, noIsolation: E, inert: i, setCallbacks: l, allowPinchZoom: !!p, lockRef: n, gapMode: m }),
515
416
  s ? a.cloneElement(a.Children.only(c), U(U({}, R), { ref: _ })) : a.createElement(f, U({}, R, { className: u, ref: _ }), c)
516
417
  );
517
418
  });
@@ -524,37 +425,37 @@ Ee.classNames = {
524
425
  fullWidth: Ce,
525
426
  zeroRight: we
526
427
  };
527
- var lr = function() {
428
+ var qn = function() {
528
429
  if (typeof __webpack_nonce__ < "u")
529
430
  return __webpack_nonce__;
530
431
  };
531
- function sr() {
432
+ function Qn() {
532
433
  if (!document)
533
434
  return null;
534
435
  var e = document.createElement("style");
535
436
  e.type = "text/css";
536
- var t = lr();
437
+ var t = qn();
537
438
  return t && e.setAttribute("nonce", t), e;
538
439
  }
539
- function ur(e, t) {
440
+ function Jn(e, t) {
540
441
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
541
442
  }
542
- function dr(e) {
443
+ function er(e) {
543
444
  var t = document.head || document.getElementsByTagName("head")[0];
544
445
  t.appendChild(e);
545
446
  }
546
- var fr = function() {
447
+ var tr = function() {
547
448
  var e = 0, t = null;
548
449
  return {
549
450
  add: function(n) {
550
- e == 0 && (t = sr()) && (ur(t, n), dr(t)), e++;
451
+ e == 0 && (t = Qn()) && (Jn(t, n), er(t)), e++;
551
452
  },
552
453
  remove: function() {
553
454
  e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
554
455
  }
555
456
  };
556
- }, pr = function() {
557
- var e = fr();
457
+ }, nr = function() {
458
+ var e = tr();
558
459
  return function(t, n) {
559
460
  a.useEffect(function() {
560
461
  return e.add(t), function() {
@@ -562,36 +463,36 @@ var fr = function() {
562
463
  };
563
464
  }, [t && n]);
564
465
  };
565
- }, bt = function() {
566
- var e = pr(), t = function(n) {
466
+ }, Ct = function() {
467
+ var e = nr(), t = function(n) {
567
468
  var r = n.styles, o = n.dynamic;
568
469
  return e(r, o), null;
569
470
  };
570
471
  return t;
571
- }, mr = {
472
+ }, rr = {
572
473
  left: 0,
573
474
  top: 0,
574
475
  right: 0,
575
476
  gap: 0
576
- }, Fe = function(e) {
477
+ }, Ve = function(e) {
577
478
  return parseInt(e || "", 10) || 0;
578
- }, vr = function(e) {
479
+ }, or = function(e) {
579
480
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
580
- return [Fe(n), Fe(r), Fe(o)];
581
- }, hr = function(e) {
481
+ return [Ve(n), Ve(r), Ve(o)];
482
+ }, ar = function(e) {
582
483
  if (e === void 0 && (e = "margin"), typeof window > "u")
583
- return mr;
584
- var t = vr(e), n = document.documentElement.clientWidth, r = window.innerWidth;
484
+ return rr;
485
+ var t = or(e), n = document.documentElement.clientWidth, r = window.innerWidth;
585
486
  return {
586
487
  left: t[0],
587
488
  top: t[1],
588
489
  right: t[2],
589
490
  gap: Math.max(0, r - n + t[2] - t[0])
590
491
  };
591
- }, gr = bt(), ue = "data-scroll-locked", Sr = function(e, t, n, r) {
492
+ }, cr = Ct(), ue = "data-scroll-locked", ir = function(e, t, n, r) {
592
493
  var o = e.left, l = e.top, s = e.right, c = e.gap;
593
494
  return n === void 0 && (n = "margin"), `
594
- .`.concat(Jn, ` {
495
+ .`.concat(Un, ` {
595
496
  overflow: hidden `).concat(r, `;
596
497
  padding-right: `).concat(c, "px ").concat(r, `;
597
498
  }
@@ -629,93 +530,93 @@ var fr = function() {
629
530
  }
630
531
 
631
532
  body[`).concat(ue, `] {
632
- `).concat(er, ": ").concat(c, `px;
533
+ `).concat(Kn, ": ").concat(c, `px;
633
534
  }
634
535
  `);
635
- }, at = function() {
536
+ }, ot = function() {
636
537
  var e = parseInt(document.body.getAttribute(ue) || "0", 10);
637
538
  return isFinite(e) ? e : 0;
638
- }, yr = function() {
539
+ }, lr = function() {
639
540
  a.useEffect(function() {
640
- return document.body.setAttribute(ue, (at() + 1).toString()), function() {
641
- var e = at() - 1;
541
+ return document.body.setAttribute(ue, (ot() + 1).toString()), function() {
542
+ var e = ot() - 1;
642
543
  e <= 0 ? document.body.removeAttribute(ue) : document.body.setAttribute(ue, e.toString());
643
544
  };
644
545
  }, []);
645
- }, wr = function(e) {
546
+ }, sr = function(e) {
646
547
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
647
- yr();
548
+ lr();
648
549
  var l = a.useMemo(function() {
649
- return hr(o);
550
+ return ar(o);
650
551
  }, [o]);
651
- return a.createElement(gr, { styles: Sr(l, !t, o, n ? "" : "!important") });
552
+ return a.createElement(cr, { styles: ir(l, !t, o, n ? "" : "!important") });
652
553
  }, He = !1;
653
554
  if (typeof window < "u")
654
555
  try {
655
- var Se = Object.defineProperty({}, "passive", {
556
+ var he = Object.defineProperty({}, "passive", {
656
557
  get: function() {
657
558
  return He = !0, !0;
658
559
  }
659
560
  });
660
- window.addEventListener("test", Se, Se), window.removeEventListener("test", Se, Se);
561
+ window.addEventListener("test", he, he), window.removeEventListener("test", he, he);
661
562
  } catch {
662
563
  He = !1;
663
564
  }
664
- var le = He ? { passive: !1 } : !1, Cr = function(e) {
565
+ var ie = He ? { passive: !1 } : !1, ur = function(e) {
665
566
  return e.tagName === "TEXTAREA";
666
- }, Et = function(e, t) {
567
+ }, bt = function(e, t) {
667
568
  if (!(e instanceof Element))
668
569
  return !1;
669
570
  var n = window.getComputedStyle(e);
670
571
  return (
671
572
  // not-not-scrollable
672
573
  n[t] !== "hidden" && // contains scroll inside self
673
- !(n.overflowY === n.overflowX && !Cr(e) && n[t] === "visible")
574
+ !(n.overflowY === n.overflowX && !ur(e) && n[t] === "visible")
674
575
  );
675
- }, br = function(e) {
676
- return Et(e, "overflowY");
677
- }, Er = function(e) {
678
- return Et(e, "overflowX");
679
- }, ct = function(e, t) {
576
+ }, dr = function(e) {
577
+ return bt(e, "overflowY");
578
+ }, fr = function(e) {
579
+ return bt(e, "overflowX");
580
+ }, at = function(e, t) {
680
581
  var n = t.ownerDocument, r = t;
681
582
  do {
682
583
  typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
683
- var o = xt(e, r);
584
+ var o = Et(e, r);
684
585
  if (o) {
685
- var l = Rt(e, r), s = l[1], c = l[2];
586
+ var l = xt(e, r), s = l[1], c = l[2];
686
587
  if (s > c)
687
588
  return !0;
688
589
  }
689
590
  r = r.parentNode;
690
591
  } while (r && r !== n.body);
691
592
  return !1;
692
- }, xr = function(e) {
593
+ }, pr = function(e) {
693
594
  var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
694
595
  return [
695
596
  t,
696
597
  n,
697
598
  r
698
599
  ];
699
- }, Rr = function(e) {
600
+ }, mr = function(e) {
700
601
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
701
602
  return [
702
603
  t,
703
604
  n,
704
605
  r
705
606
  ];
607
+ }, Et = function(e, t) {
608
+ return e === "v" ? dr(t) : fr(t);
706
609
  }, xt = function(e, t) {
707
- return e === "v" ? br(t) : Er(t);
708
- }, Rt = function(e, t) {
709
- return e === "v" ? xr(t) : Rr(t);
710
- }, Tr = function(e, t) {
610
+ return e === "v" ? pr(t) : mr(t);
611
+ }, vr = function(e, t) {
711
612
  return e === "h" && t === "rtl" ? -1 : 1;
712
- }, Ir = function(e, t, n, r, o) {
713
- var l = Tr(e, window.getComputedStyle(t).direction), s = l * r, c = n.target, u = t.contains(c), d = !1, S = s > 0, h = 0, y = 0;
613
+ }, hr = function(e, t, n, r, o) {
614
+ var l = vr(e, window.getComputedStyle(t).direction), s = l * r, c = n.target, u = t.contains(c), d = !1, S = s > 0, h = 0, y = 0;
714
615
  do {
715
616
  if (!c)
716
617
  break;
717
- var w = Rt(e, c), E = w[0], i = w[1], p = w[2], g = i - p - l * E;
718
- (E || g) && xt(e, c) && (h += g, y += E);
618
+ var w = xt(e, c), E = w[0], i = w[1], p = w[2], g = i - p - l * E;
619
+ (E || g) && Et(e, c) && (h += g, y += E);
719
620
  var f = c.parentNode;
720
621
  c = f && f.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? f.host : f;
721
622
  } while (
@@ -724,28 +625,28 @@ var le = He ? { passive: !1 } : !1, Cr = function(e) {
724
625
  u && (t.contains(c) || t === c)
725
626
  );
726
627
  return (S && Math.abs(h) < 1 || !S && Math.abs(y) < 1) && (d = !0), d;
727
- }, ye = function(e) {
628
+ }, ge = function(e) {
728
629
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
729
- }, it = function(e) {
630
+ }, ct = function(e) {
730
631
  return [e.deltaX, e.deltaY];
731
- }, lt = function(e) {
632
+ }, it = function(e) {
732
633
  return e && "current" in e ? e.current : e;
733
- }, Nr = function(e, t) {
634
+ }, gr = function(e, t) {
734
635
  return e[0] === t[0] && e[1] === t[1];
735
- }, Pr = function(e) {
636
+ }, Sr = function(e) {
736
637
  return `
737
638
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
738
639
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
739
640
  `);
740
- }, _r = 0, se = [];
741
- function Ar(e) {
742
- var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(_r++)[0], l = a.useState(bt)[0], s = a.useRef(e);
641
+ }, yr = 0, le = [];
642
+ function wr(e) {
643
+ var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(yr++)[0], l = a.useState(Ct)[0], s = a.useRef(e);
743
644
  a.useEffect(function() {
744
645
  s.current = e;
745
646
  }, [e]), a.useEffect(function() {
746
647
  if (e.inert) {
747
648
  document.body.classList.add("block-interactivity-".concat(o));
748
- var i = Qn([e.lockRef.current], (e.shards || []).map(lt), !0).filter(Boolean);
649
+ var i = Hn([e.lockRef.current], (e.shards || []).map(it), !0).filter(Boolean);
749
650
  return i.forEach(function(p) {
750
651
  return p.classList.add("allow-interactivity-".concat(o));
751
652
  }), function() {
@@ -758,82 +659,182 @@ function Ar(e) {
758
659
  var c = a.useCallback(function(i, p) {
759
660
  if ("touches" in i && i.touches.length === 2 || i.type === "wheel" && i.ctrlKey)
760
661
  return !s.current.allowPinchZoom;
761
- var g = ye(i), f = n.current, m = "deltaX" in i ? i.deltaX : f[0] - g[0], b = "deltaY" in i ? i.deltaY : f[1] - g[1], x, _ = i.target, R = Math.abs(m) > Math.abs(b) ? "h" : "v";
662
+ var g = ge(i), f = n.current, m = "deltaX" in i ? i.deltaX : f[0] - g[0], b = "deltaY" in i ? i.deltaY : f[1] - g[1], x, _ = i.target, R = Math.abs(m) > Math.abs(b) ? "h" : "v";
762
663
  if ("touches" in i && R === "h" && _.type === "range")
763
664
  return !1;
764
665
  var L = window.getSelection(), V = L && L.anchorNode, K = V ? V === _ || V.contains(_) : !1;
765
666
  if (K)
766
667
  return !1;
767
- var O = ct(R, _);
668
+ var O = at(R, _);
768
669
  if (!O)
769
670
  return !0;
770
- if (O ? x = R : (x = R === "v" ? "h" : "v", O = ct(R, _)), !O)
671
+ if (O ? x = R : (x = R === "v" ? "h" : "v", O = at(R, _)), !O)
771
672
  return !1;
772
673
  if (!r.current && "changedTouches" in i && (m || b) && (r.current = x), !x)
773
674
  return !0;
774
675
  var F = r.current || x;
775
- return Ir(F, p, i, F === "h" ? m : b);
676
+ return hr(F, p, i, F === "h" ? m : b);
776
677
  }, []), u = a.useCallback(function(i) {
777
678
  var p = i;
778
- if (!(!se.length || se[se.length - 1] !== l)) {
779
- var g = "deltaY" in p ? it(p) : ye(p), f = t.current.filter(function(x) {
780
- return x.name === p.type && (x.target === p.target || p.target === x.shadowParent) && Nr(x.delta, g);
679
+ if (!(!le.length || le[le.length - 1] !== l)) {
680
+ var g = "deltaY" in p ? ct(p) : ge(p), f = t.current.filter(function(x) {
681
+ return x.name === p.type && (x.target === p.target || p.target === x.shadowParent) && gr(x.delta, g);
781
682
  })[0];
782
683
  if (f && f.should) {
783
684
  p.cancelable && p.preventDefault();
784
685
  return;
785
686
  }
786
687
  if (!f) {
787
- var m = (s.current.shards || []).map(lt).filter(Boolean).filter(function(x) {
688
+ var m = (s.current.shards || []).map(it).filter(Boolean).filter(function(x) {
788
689
  return x.contains(p.target);
789
690
  }), b = m.length > 0 ? c(p, m[0]) : !s.current.noIsolation;
790
691
  b && p.cancelable && p.preventDefault();
791
692
  }
792
693
  }
793
694
  }, []), d = a.useCallback(function(i, p, g, f) {
794
- var m = { name: i, delta: p, target: g, should: f, shadowParent: Mr(g) };
695
+ var m = { name: i, delta: p, target: g, should: f, shadowParent: Cr(g) };
795
696
  t.current.push(m), setTimeout(function() {
796
697
  t.current = t.current.filter(function(b) {
797
698
  return b !== m;
798
699
  });
799
700
  }, 1);
800
701
  }, []), S = a.useCallback(function(i) {
801
- n.current = ye(i), r.current = void 0;
702
+ n.current = ge(i), r.current = void 0;
802
703
  }, []), h = a.useCallback(function(i) {
803
- d(i.type, it(i), i.target, c(i, e.lockRef.current));
704
+ d(i.type, ct(i), i.target, c(i, e.lockRef.current));
804
705
  }, []), y = a.useCallback(function(i) {
805
- d(i.type, ye(i), i.target, c(i, e.lockRef.current));
706
+ d(i.type, ge(i), i.target, c(i, e.lockRef.current));
806
707
  }, []);
807
708
  a.useEffect(function() {
808
- return se.push(l), e.setCallbacks({
709
+ return le.push(l), e.setCallbacks({
809
710
  onScrollCapture: h,
810
711
  onWheelCapture: h,
811
712
  onTouchMoveCapture: y
812
- }), document.addEventListener("wheel", u, le), document.addEventListener("touchmove", u, le), document.addEventListener("touchstart", S, le), function() {
813
- se = se.filter(function(i) {
713
+ }), document.addEventListener("wheel", u, ie), document.addEventListener("touchmove", u, ie), document.addEventListener("touchstart", S, ie), function() {
714
+ le = le.filter(function(i) {
814
715
  return i !== l;
815
- }), document.removeEventListener("wheel", u, le), document.removeEventListener("touchmove", u, le), document.removeEventListener("touchstart", S, le);
716
+ }), document.removeEventListener("wheel", u, ie), document.removeEventListener("touchmove", u, ie), document.removeEventListener("touchstart", S, ie);
816
717
  };
817
718
  }, []);
818
719
  var w = e.removeScrollBar, E = e.inert;
819
720
  return a.createElement(
820
721
  a.Fragment,
821
722
  null,
822
- E ? a.createElement(l, { styles: Pr(o) }) : null,
823
- w ? a.createElement(wr, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
723
+ E ? a.createElement(l, { styles: Sr(o) }) : null,
724
+ w ? a.createElement(sr, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
824
725
  );
825
726
  }
826
- function Mr(e) {
727
+ function Cr(e) {
827
728
  for (var t = null; e !== null; )
828
729
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
829
730
  return t;
830
731
  }
831
- const Or = ir(Ct, Ar);
832
- var Tt = a.forwardRef(function(e, t) {
833
- return a.createElement(Ee, U({}, e, { ref: t, sideCar: Or }));
732
+ const br = Zn(wt, wr);
733
+ var Rt = a.forwardRef(function(e, t) {
734
+ return a.createElement(Ee, U({}, e, { ref: t, sideCar: br }));
834
735
  });
835
- Tt.classNames = Ee.classNames;
836
- var kr = [" ", "Enter", "ArrowUp", "ArrowDown"], Lr = [" ", "Enter"], oe = "Select", [xe, Re, Dr] = _n(oe), [de] = dt(oe, [
736
+ Rt.classNames = Ee.classNames;
737
+ var Er = function(e) {
738
+ if (typeof document > "u")
739
+ return null;
740
+ var t = Array.isArray(e) ? e[0] : e;
741
+ return t.ownerDocument.body;
742
+ }, se = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), ye = {}, Fe = 0, Tt = function(e) {
743
+ return e && (e.host || Tt(e.parentNode));
744
+ }, xr = function(e, t) {
745
+ return t.map(function(n) {
746
+ if (e.contains(n))
747
+ return n;
748
+ var r = Tt(n);
749
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
750
+ }).filter(function(n) {
751
+ return !!n;
752
+ });
753
+ }, Rr = function(e, t, n, r) {
754
+ var o = xr(t, Array.isArray(e) ? e : [e]);
755
+ ye[n] || (ye[n] = /* @__PURE__ */ new WeakMap());
756
+ var l = ye[n], s = [], c = /* @__PURE__ */ new Set(), u = new Set(o), d = function(h) {
757
+ !h || c.has(h) || (c.add(h), d(h.parentNode));
758
+ };
759
+ o.forEach(d);
760
+ var S = function(h) {
761
+ !h || u.has(h) || Array.prototype.forEach.call(h.children, function(y) {
762
+ if (c.has(y))
763
+ S(y);
764
+ else
765
+ try {
766
+ var w = y.getAttribute(r), E = w !== null && w !== "false", i = (se.get(y) || 0) + 1, p = (l.get(y) || 0) + 1;
767
+ se.set(y, i), l.set(y, p), s.push(y), i === 1 && E && Se.set(y, !0), p === 1 && y.setAttribute(n, "true"), E || y.setAttribute(r, "true");
768
+ } catch (g) {
769
+ console.error("aria-hidden: cannot operate on ", y, g);
770
+ }
771
+ });
772
+ };
773
+ return S(t), c.clear(), Fe++, function() {
774
+ s.forEach(function(h) {
775
+ var y = se.get(h) - 1, w = l.get(h) - 1;
776
+ se.set(h, y), l.set(h, w), y || (Se.has(h) || h.removeAttribute(r), Se.delete(h)), w || h.removeAttribute(n);
777
+ }), Fe--, Fe || (se = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), ye = {});
778
+ };
779
+ }, Tr = function(e, t, n) {
780
+ n === void 0 && (n = "data-aria-hidden");
781
+ var r = Array.from(Array.isArray(e) ? e : [e]), o = Er(e);
782
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Rr(r, o, n, "aria-hidden")) : function() {
783
+ return null;
784
+ };
785
+ };
786
+ function Ir(e) {
787
+ const t = a.useRef({ value: e, previous: e });
788
+ return a.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
789
+ }
790
+ function lt(e, [t, n]) {
791
+ return Math.min(n, Math.max(t, e));
792
+ }
793
+ // @__NO_SIDE_EFFECTS__
794
+ function Nr(e) {
795
+ const t = /* @__PURE__ */ Pr(e), n = a.forwardRef((r, o) => {
796
+ const { children: l, ...s } = r, c = a.Children.toArray(l), u = c.find(Ar);
797
+ if (u) {
798
+ const d = u.props.children, S = c.map((h) => h === u ? a.Children.count(d) > 1 ? a.Children.only(null) : a.isValidElement(d) ? d.props.children : null : h);
799
+ return /* @__PURE__ */ v(t, { ...s, ref: o, children: a.isValidElement(d) ? a.cloneElement(d, void 0, S) : null });
800
+ }
801
+ return /* @__PURE__ */ v(t, { ...s, ref: o, children: l });
802
+ });
803
+ return n.displayName = `${e}.Slot`, n;
804
+ }
805
+ // @__NO_SIDE_EFFECTS__
806
+ function Pr(e) {
807
+ const t = a.forwardRef((n, r) => {
808
+ const { children: o, ...l } = n;
809
+ if (a.isValidElement(o)) {
810
+ const s = Or(o), c = Mr(l, o.props);
811
+ return o.type !== a.Fragment && (c.ref = r ? ut(r, s) : s), a.cloneElement(o, c);
812
+ }
813
+ return a.Children.count(o) > 1 ? a.Children.only(null) : null;
814
+ });
815
+ return t.displayName = `${e}.SlotClone`, t;
816
+ }
817
+ var _r = Symbol("radix.slottable");
818
+ function Ar(e) {
819
+ return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === _r;
820
+ }
821
+ function Mr(e, t) {
822
+ const n = { ...t };
823
+ for (const r in t) {
824
+ const o = e[r], l = t[r];
825
+ /^on[A-Z]/.test(r) ? o && l ? n[r] = (...c) => {
826
+ const u = l(...c);
827
+ return o(...c), u;
828
+ } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...l } : r === "className" && (n[r] = [o, l].filter(Boolean).join(" "));
829
+ }
830
+ return { ...e, ...n };
831
+ }
832
+ function Or(e) {
833
+ var r, o;
834
+ let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
835
+ 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);
836
+ }
837
+ var kr = [" ", "Enter", "ArrowUp", "ArrowDown"], Lr = [" ", "Enter"], oe = "Select", [xe, Re, Dr] = Rn(oe), [de] = dt(oe, [
837
838
  Dr,
838
839
  ft
839
840
  ]), Te = ft(), [Br, Q] = de(oe), [Vr, Fr] = de(oe), It = (e) => {
@@ -852,7 +853,7 @@ var kr = [" ", "Enter", "ArrowUp", "ArrowDown"], Lr = [" ", "Enter"], oe = "Sele
852
853
  disabled: y,
853
854
  required: w,
854
855
  form: E
855
- } = e, i = Te(t), [p, g] = a.useState(null), [f, m] = a.useState(null), [b, x] = a.useState(!1), _ = On(d), [R, L] = Ze({
856
+ } = e, i = Te(t), [p, g] = a.useState(null), [f, m] = a.useState(null), [b, x] = a.useState(!1), _ = In(d), [R, L] = Ze({
856
857
  prop: r,
857
858
  defaultProp: o ?? !1,
858
859
  onChange: l,
@@ -991,7 +992,7 @@ var Wr = "SelectIcon", Mt = a.forwardRef(
991
992
  }
992
993
  );
993
994
  Mt.displayName = Wr;
994
- var Hr = "SelectPortal", Ot = (e) => /* @__PURE__ */ v(vt, { asChild: !0, ...e });
995
+ var Hr = "SelectPortal", Ot = (e) => /* @__PURE__ */ v(gt, { asChild: !0, ...e });
995
996
  Ot.displayName = Hr;
996
997
  var ae = "SelectContent", kt = a.forwardRef(
997
998
  (e, t) => {
@@ -1009,7 +1010,7 @@ var ae = "SelectContent", kt = a.forwardRef(
1009
1010
  }
1010
1011
  );
1011
1012
  kt.displayName = ae;
1012
- var W = 10, [Lt, J] = de(ae), Ur = "SelectContentImpl", Kr = /* @__PURE__ */ Un("SelectContent.RemoveScroll"), Dt = a.forwardRef(
1013
+ var W = 10, [Lt, J] = de(ae), Ur = "SelectContentImpl", Kr = /* @__PURE__ */ Nr("SelectContent.RemoveScroll"), Dt = a.forwardRef(
1013
1014
  (e, t) => {
1014
1015
  const {
1015
1016
  __scopeSelect: n,
@@ -1035,8 +1036,8 @@ var W = 10, [Lt, J] = de(ae), Ur = "SelectContentImpl", Kr = /* @__PURE__ */ Un(
1035
1036
  null
1036
1037
  ), F = Re(n), [Y, j] = a.useState(!1), $ = a.useRef(!1);
1037
1038
  a.useEffect(() => {
1038
- if (m) return qn(m);
1039
- }, [m]), kn();
1039
+ if (m) return Tr(m);
1040
+ }, [m]), Wn();
1040
1041
  const k = a.useCallback(
1041
1042
  (C) => {
1042
1043
  const [P, ...D] = F().map((I) => I.ref.current), [N] = D.slice(-1), T = document.activeElement;
@@ -1117,8 +1118,8 @@ var W = 10, [Lt, J] = de(ae), Ur = "SelectContentImpl", Kr = /* @__PURE__ */ Un(
1117
1118
  position: r,
1118
1119
  isPositioned: Y,
1119
1120
  searchRef: Ie,
1120
- children: /* @__PURE__ */ v(Tt, { as: Kr, allowPinchZoom: !0, children: /* @__PURE__ */ v(
1121
- ht,
1121
+ children: /* @__PURE__ */ v(Rt, { as: Kr, allowPinchZoom: !0, children: /* @__PURE__ */ v(
1122
+ vt,
1122
1123
  {
1123
1124
  asChild: !0,
1124
1125
  trapped: f.open,
@@ -1185,7 +1186,7 @@ var jr = "SelectItemAlignedPosition", Bt = a.forwardRef((e, t) => {
1185
1186
  if (l.trigger && l.valueNode && c && d && i && p && g) {
1186
1187
  const R = l.trigger.getBoundingClientRect(), L = d.getBoundingClientRect(), V = l.valueNode.getBoundingClientRect(), K = g.getBoundingClientRect();
1187
1188
  if (l.dir !== "rtl") {
1188
- const T = K.left - L.left, I = V.left - T, ee = R.left - I, te = R.width + ee, _e = Math.max(te, L.width), Ae = window.innerWidth - W, Me = Qe(I, [
1189
+ const T = K.left - L.left, I = V.left - T, ee = R.left - I, te = R.width + ee, _e = Math.max(te, L.width), Ae = window.innerWidth - W, Me = lt(I, [
1189
1190
  W,
1190
1191
  // Prevents the content from going off the starting edge of the
1191
1192
  // viewport. It may still go off the ending edge, but this can be
@@ -1196,7 +1197,7 @@ var jr = "SelectItemAlignedPosition", Bt = a.forwardRef((e, t) => {
1196
1197
  ]);
1197
1198
  c.style.minWidth = te + "px", c.style.left = Me + "px";
1198
1199
  } else {
1199
- const T = L.right - K.right, I = window.innerWidth - V.right - T, ee = window.innerWidth - R.right - I, te = R.width + ee, _e = Math.max(te, L.width), Ae = window.innerWidth - W, Me = Qe(I, [
1200
+ const T = L.right - K.right, I = window.innerWidth - V.right - T, ee = window.innerWidth - R.right - I, te = R.width + ee, _e = Math.max(te, L.width), Ae = window.innerWidth - W, Me = lt(I, [
1200
1201
  W,
1201
1202
  Math.max(W, Ae - _e)
1202
1203
  ]);
@@ -1584,7 +1585,7 @@ var ze = "SelectArrow", qr = a.forwardRef(
1584
1585
  qr.displayName = ze;
1585
1586
  var Qr = "SelectBubbleInput", Qt = a.forwardRef(
1586
1587
  ({ __scopeSelect: e, value: t, ...n }, r) => {
1587
- const o = a.useRef(null), l = B(r, o), s = wn(t);
1588
+ const o = a.useRef(null), l = B(r, o), s = Ir(t);
1588
1589
  return a.useEffect(() => {
1589
1590
  const c = o.current;
1590
1591
  if (!c) return;
@@ -1656,7 +1657,7 @@ const wo = eo, Co = ao, bo = to, lo = a.forwardRef(
1656
1657
  )
1657
1658
  );
1658
1659
  lo.displayName = nn.displayName;
1659
- const un = a.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ v(cn, { ref: n, className: q("flex cursor-default items-center justify-center py-1", e), ...t, children: /* @__PURE__ */ v(xn, { className: "size-4" }) }));
1660
+ const un = a.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ v(cn, { ref: n, className: q("flex cursor-default items-center justify-center py-1", e), ...t, children: /* @__PURE__ */ v(An, { className: "size-4" }) }));
1660
1661
  un.displayName = cn.displayName;
1661
1662
  const dn = a.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ v(ln, { ref: n, className: q("flex cursor-default items-center justify-center py-1", e), ...t, children: /* @__PURE__ */ v(pt, { className: "size-4" }) }));
1662
1663
  dn.displayName = ln.displayName;
@@ -1702,7 +1703,7 @@ const fo = a.forwardRef(
1702
1703
  ),
1703
1704
  ...n,
1704
1705
  children: [
1705
- /* @__PURE__ */ v("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ v(io, { children: /* @__PURE__ */ v(bn, { className: "size-4" }) }) }),
1706
+ /* @__PURE__ */ v("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ v(io, { children: /* @__PURE__ */ v(Pn, { className: "size-4" }) }) }),
1706
1707
  /* @__PURE__ */ v(co, { children: t })
1707
1708
  ]
1708
1709
  }
@@ -1714,10 +1715,10 @@ const po = a.forwardRef(
1714
1715
  );
1715
1716
  po.displayName = sn.displayName;
1716
1717
  export {
1717
- bn as C,
1718
- ht as F,
1719
- vt as P,
1720
- Tt as R,
1718
+ Pn as C,
1719
+ vt as F,
1720
+ gt as P,
1721
+ Rt as R,
1721
1722
  wo as S,
1722
1723
  so as a,
1723
1724
  Co as b,
@@ -1728,10 +1729,10 @@ export {
1728
1729
  po as g,
1729
1730
  lo as h,
1730
1731
  bo as i,
1731
- _n as j,
1732
- qn as k,
1733
- kn as l,
1734
- On as m,
1735
- Qe as n,
1736
- wn as u
1732
+ Rn as j,
1733
+ Tr as k,
1734
+ Wn as l,
1735
+ Ir as m,
1736
+ lt as n,
1737
+ In as u
1737
1738
  };