@odynn/awayz-core 0.6.45 → 0.6.46

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