@pdf-viewer/react 1.8.0-rc.2 → 1.9.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/{Popover-1faa77f6.js → Popover-48c8394c.js} +2 -2
  2. package/dist/RPLayout-3042ec91.js +3349 -0
  3. package/dist/assets/{RPDefaultLayout.css → RPLayout.css} +1 -1
  4. package/dist/{component-1da194e8.js → component-2aa6e53b.js} +1 -1
  5. package/dist/components/RPConfig.js +691 -673
  6. package/dist/components/RPController.js +9 -9
  7. package/dist/components/RPPages.js +14 -2
  8. package/dist/components/icons/ChevronDownIcon.js +23 -0
  9. package/dist/components/layout/LayoutContainer.js +14 -2
  10. package/dist/components/layout/RPDefaultLayout.js +3 -2
  11. package/dist/components/layout/RPLayout.js +50 -0
  12. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  13. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  14. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  15. package/dist/components/layout/toolbar/DarkModeTool.js +16 -19
  16. package/dist/components/layout/toolbar/DocumentDialog.js +14 -2
  17. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  18. package/dist/components/layout/toolbar/MenuItem.js +1 -1
  19. package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
  20. package/dist/components/layout/toolbar/MostPageTool.js +13 -5
  21. package/dist/components/layout/toolbar/OtherTool.js +3 -4
  22. package/dist/components/layout/toolbar/Paginate.js +1 -1
  23. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  24. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  25. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  26. package/dist/components/layout/toolbar/RotateTool.js +1 -1
  27. package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
  28. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  29. package/dist/components/layout/toolbar/SearchTool.js +6 -3
  30. package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
  31. package/dist/components/layout/toolbar/ToolbarCustom.js +47 -0
  32. package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
  33. package/dist/components/layout/toolbar/ZoomTool.js +2 -2
  34. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +17 -0
  35. package/dist/components/layout/toolbar/tools/FileUploadTool.js +17 -0
  36. package/dist/components/layout/toolbar/tools/FullScreenTool.js +25 -0
  37. package/dist/components/layout/toolbar/tools/InputPageTool.js +45 -0
  38. package/dist/components/layout/toolbar/tools/NextPageTool.js +61 -0
  39. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +21 -0
  40. package/dist/components/layout/toolbar/tools/PrintTool.js +17 -0
  41. package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +17 -0
  42. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +23 -0
  43. package/dist/components/layout/toolbar/tools/ZoomInTool.js +28 -0
  44. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +92 -0
  45. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +28 -0
  46. package/dist/components/page/AnnotationLayer.js +14 -2
  47. package/dist/components/page/CanvasLayer.js +14 -2
  48. package/dist/components/page/DualPage.js +1 -1
  49. package/dist/components/page/RPPage.js +13 -2
  50. package/dist/components/page/SinglePage.js +2 -2
  51. package/dist/components/page/TextHighlightLayer.js +14 -2
  52. package/dist/components/page/TextLayer.js +14 -2
  53. package/dist/components/ui/Checkbox.js +228 -116
  54. package/dist/components/ui/DropDown.js +1 -1
  55. package/dist/components/ui/LoadingIndicator.js +1 -1
  56. package/dist/components/ui/Popover.js +1 -1
  57. package/dist/components/ui/RPTooltip.js +207 -207
  58. package/dist/contexts/ElementPageContext.js +46 -57
  59. package/dist/contexts/PaginationContext.js +3 -3
  60. package/dist/contexts/PrintContext.js +2 -2
  61. package/dist/contexts/SearchContext.js +2 -2
  62. package/dist/contexts/ThumbnailsContext.js +2 -2
  63. package/dist/{floating-ui.react-dom-15b9b819.js → floating-ui.react-dom-4b1e2e46.js} +394 -380
  64. package/dist/index-6e0e48fa.js +332 -0
  65. package/dist/{index-7279fb4e.js → index-951f0f1f.js} +464 -456
  66. package/dist/index-e3a67935.js +150 -0
  67. package/dist/main.js +70 -44
  68. package/dist/types/components/icons/ChevronDownIcon.d.ts +2 -0
  69. package/dist/types/components/layout/RPDefaultLayout.d.ts +2 -2
  70. package/dist/types/components/layout/RPLayout.d.ts +2 -0
  71. package/dist/types/components/layout/toolbar/SearchTool.d.ts +2 -1
  72. package/dist/types/components/layout/toolbar/ToolbarCustom.d.ts +3 -0
  73. package/dist/types/components/layout/toolbar/tools/FileDownloadTool.d.ts +3 -0
  74. package/dist/types/components/layout/toolbar/tools/FileUploadTool.d.ts +3 -0
  75. package/dist/types/components/layout/toolbar/tools/FullScreenTool.d.ts +3 -0
  76. package/dist/types/components/layout/toolbar/tools/InputPageTool.d.ts +2 -0
  77. package/dist/types/components/layout/toolbar/tools/NextPageTool.d.ts +3 -0
  78. package/dist/types/components/layout/toolbar/tools/PreviousPageTool.d.ts +3 -0
  79. package/dist/types/components/layout/toolbar/tools/PrintTool.d.ts +3 -0
  80. package/dist/types/components/layout/toolbar/tools/ThemeSwitcherTool.d.ts +3 -0
  81. package/dist/types/components/layout/toolbar/tools/ThumbnailTool.d.ts +3 -0
  82. package/dist/types/components/layout/toolbar/tools/ZoomInTool.d.ts +3 -0
  83. package/dist/types/components/layout/toolbar/tools/ZoomLevelTool.d.ts +3 -0
  84. package/dist/types/components/layout/toolbar/tools/ZoomOutTool.d.ts +3 -0
  85. package/dist/types/main.d.ts +15 -1
  86. package/dist/types/utils/constants.d.ts +2 -0
  87. package/dist/types/utils/types.d.ts +28 -2
  88. package/dist/utils/constants.js +5 -3
  89. package/dist/utils/hooks/useFileDownload.js +14 -2
  90. package/dist/utils/hooks/useLicense.js +24 -26
  91. package/dist/utils/hooks/usePageRotateContext.js +14 -17
  92. package/dist/utils/hooks/usePaginate.js +14 -2
  93. package/dist/utils/hooks/usePresentPage.js +14 -2
  94. package/dist/utils/hooks/usePrint.js +14 -2
  95. package/dist/utils/hooks/useScrollToPage.js +14 -2
  96. package/dist/utils/hooks/useSearch.js +14 -2
  97. package/dist/utils/hooks/useThumbnail.js +14 -2
  98. package/dist/utils/hooks/useVirtualReactWindow.js +14 -2
  99. package/package.json +1 -1
  100. package/dist/RPDefaultLayout-2cca5d34.js +0 -3263
  101. package/dist/index-1cb41342.js +0 -307
  102. package/dist/index-aa2d3884.js +0 -140
@@ -1,71 +1,71 @@
1
1
  import * as o from "react";
2
2
  import V from "react";
3
- import { b as xe, P as D, e as de, a as K, i as Te, u as ne, h as gn, f as ot, c as S, g as Me, j as at, d as wn } from "./index-1cb41342.js";
3
+ import { g as Te, P as D, c as de, u as G, i as Ne, d as gn, e as ot, a as S, b as Ee, j as at, f as wn } from "./index-6e0e48fa.js";
4
4
  import { jsx as l } from "react/jsx-runtime";
5
- import { u as Ne, D as Cn } from "./index-aa2d3884.js";
6
- import { u as Mn, a as En, o as Rn, s as bn, l as Sn, f as yn, b as _n, c as Pn, h as In } from "./floating-ui.react-dom-15b9b819.js";
5
+ import { u as ne, a as De, D as Cn } from "./index-e3a67935.js";
6
+ import { u as Mn, a as En, o as Rn, s as bn, l as Sn, f as yn, b as _n, c as Pn, h as In } from "./floating-ui.react-dom-4b1e2e46.js";
7
7
  import An from "react-dom";
8
- import { c as xn, _ as Tn, u as Nn, a as te, f as Dn, z as On, s as Fn, b as kn, R as Ln, e as Kn, h as Gn } from "./component-1da194e8.js";
9
- var $n = "Portal", ct = o.forwardRef((e, t) => {
8
+ import { c as xn, _ as Tn, u as Nn, a as te, f as Dn, z as On, s as Fn, b as kn, R as Ln, e as Gn, h as Kn } from "./component-2aa6e53b.js";
9
+ var Un = "Portal", ct = o.forwardRef((e, t) => {
10
10
  var s;
11
11
  const { container: n, ...r } = e, [a, c] = o.useState(!1);
12
- xe(() => c(!0), []);
12
+ Te(() => c(!0), []);
13
13
  const u = n || a && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
14
14
  return u ? An.createPortal(/* @__PURE__ */ l(D.div, { ...r, ref: t }), u) : null;
15
15
  });
16
- ct.displayName = $n;
16
+ ct.displayName = Un;
17
17
  function st(e) {
18
18
  const t = e + "CollectionProvider", [n, r] = de(t), [a, c] = n(
19
19
  t,
20
20
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
21
- ), u = (C) => {
22
- const { scope: f, children: i } = C, w = V.useRef(null), h = V.useRef(/* @__PURE__ */ new Map()).current;
23
- return /* @__PURE__ */ l(a, { scope: f, itemMap: h, collectionRef: w, children: i });
21
+ ), u = (i) => {
22
+ const { scope: p, children: g } = i, E = V.useRef(null), w = V.useRef(/* @__PURE__ */ new Map()).current;
23
+ return /* @__PURE__ */ l(a, { scope: p, itemMap: w, collectionRef: E, children: g });
24
24
  };
25
25
  u.displayName = t;
26
- const s = e + "CollectionSlot", m = V.forwardRef(
27
- (C, f) => {
28
- const { scope: i, children: w } = C, h = c(s, i), M = K(f, h.collectionRef);
29
- return /* @__PURE__ */ l(Te, { ref: M, children: w });
26
+ const s = e + "CollectionSlot", h = Ne(s), m = V.forwardRef(
27
+ (i, p) => {
28
+ const { scope: g, children: E } = i, w = c(s, g), R = G(p, w.collectionRef);
29
+ return /* @__PURE__ */ l(h, { ref: R, children: E });
30
30
  }
31
31
  );
32
32
  m.displayName = s;
33
- const p = e + "CollectionItemSlot", v = "data-radix-collection-item", d = V.forwardRef(
34
- (C, f) => {
35
- const { scope: i, children: w, ...h } = C, M = V.useRef(null), R = K(f, M), b = c(p, i);
36
- return V.useEffect(() => (b.itemMap.set(M, { ref: M, ...h }), () => void b.itemMap.delete(M))), /* @__PURE__ */ l(Te, { [v]: "", ref: R, children: w });
33
+ const f = e + "CollectionItemSlot", d = "data-radix-collection-item", v = Ne(f), C = V.forwardRef(
34
+ (i, p) => {
35
+ const { scope: g, children: E, ...w } = i, R = V.useRef(null), y = G(p, R), _ = c(f, g);
36
+ return V.useEffect(() => (_.itemMap.set(R, { ref: R, ...w }), () => void _.itemMap.delete(R))), /* @__PURE__ */ l(v, { [d]: "", ref: y, children: E });
37
37
  }
38
38
  );
39
- d.displayName = p;
40
- function g(C) {
41
- const f = c(e + "CollectionConsumer", C);
39
+ C.displayName = f;
40
+ function M(i) {
41
+ const p = c(e + "CollectionConsumer", i);
42
42
  return V.useCallback(() => {
43
- const w = f.collectionRef.current;
44
- if (!w)
43
+ const E = p.collectionRef.current;
44
+ if (!E)
45
45
  return [];
46
- const h = Array.from(w.querySelectorAll(`[${v}]`));
47
- return Array.from(f.itemMap.values()).sort(
48
- (b, y) => h.indexOf(b.ref.current) - h.indexOf(y.ref.current)
46
+ const w = Array.from(E.querySelectorAll(`[${d}]`));
47
+ return Array.from(p.itemMap.values()).sort(
48
+ (_, I) => w.indexOf(_.ref.current) - w.indexOf(I.ref.current)
49
49
  );
50
- }, [f.collectionRef, f.itemMap]);
50
+ }, [p.collectionRef, p.itemMap]);
51
51
  }
52
52
  return [
53
- { Provider: u, Slot: m, ItemSlot: d },
54
- g,
53
+ { Provider: u, Slot: m, ItemSlot: C },
54
+ M,
55
55
  r
56
56
  ];
57
57
  }
58
- var Un = o.createContext(void 0);
58
+ var $n = o.createContext(void 0);
59
59
  function it(e) {
60
- const t = o.useContext(Un);
60
+ const t = o.useContext($n);
61
61
  return e || t || "ltr";
62
62
  }
63
- var ye = 0;
63
+ var _e = 0;
64
64
  function Bn() {
65
65
  o.useEffect(() => {
66
66
  const e = document.querySelectorAll("[data-radix-focus-guard]");
67
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? ze()), document.body.insertAdjacentElement("beforeend", e[1] ?? ze()), ye++, () => {
68
- ye === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ye--;
67
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? ze()), document.body.insertAdjacentElement("beforeend", e[1] ?? ze()), _e++, () => {
68
+ _e === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), _e--;
69
69
  };
70
70
  }, []);
71
71
  }
@@ -73,14 +73,14 @@ function ze() {
73
73
  const e = document.createElement("span");
74
74
  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;
75
75
  }
76
- var _e = "focusScope.autoFocusOnMount", Pe = "focusScope.autoFocusOnUnmount", Ze = { bubbles: !1, cancelable: !0 }, Yn = "FocusScope", ut = o.forwardRef((e, t) => {
76
+ var Pe = "focusScope.autoFocusOnMount", Ie = "focusScope.autoFocusOnUnmount", Ze = { bubbles: !1, cancelable: !0 }, Yn = "FocusScope", ut = o.forwardRef((e, t) => {
77
77
  const {
78
78
  loop: n = !1,
79
79
  trapped: r = !1,
80
80
  onMountAutoFocus: a,
81
81
  onUnmountAutoFocus: c,
82
82
  ...u
83
- } = e, [s, m] = o.useState(null), p = ne(a), v = ne(c), d = o.useRef(null), g = K(t, (i) => m(i)), C = o.useRef({
83
+ } = e, [s, h] = o.useState(null), m = ne(a), f = ne(c), d = o.useRef(null), v = G(t, (i) => h(i)), C = o.useRef({
84
84
  paused: !1,
85
85
  pause() {
86
86
  this.paused = !0;
@@ -91,25 +91,25 @@ var _e = "focusScope.autoFocusOnMount", Pe = "focusScope.autoFocusOnUnmount", Ze
91
91
  }).current;
92
92
  o.useEffect(() => {
93
93
  if (r) {
94
- let i = function(R) {
94
+ let i = function(w) {
95
95
  if (C.paused || !s)
96
96
  return;
97
- const b = R.target;
98
- s.contains(b) ? d.current = b : H(d.current, { select: !0 });
99
- }, w = function(R) {
97
+ const R = w.target;
98
+ s.contains(R) ? d.current = R : H(d.current, { select: !0 });
99
+ }, p = function(w) {
100
100
  if (C.paused || !s)
101
101
  return;
102
- const b = R.relatedTarget;
103
- b !== null && (s.contains(b) || H(d.current, { select: !0 }));
104
- }, h = function(R) {
102
+ const R = w.relatedTarget;
103
+ R !== null && (s.contains(R) || H(d.current, { select: !0 }));
104
+ }, g = function(w) {
105
105
  if (document.activeElement === document.body)
106
- for (const y of R)
106
+ for (const y of w)
107
107
  y.removedNodes.length > 0 && H(s);
108
108
  };
109
- document.addEventListener("focusin", i), document.addEventListener("focusout", w);
110
- const M = new MutationObserver(h);
111
- return s && M.observe(s, { childList: !0, subtree: !0 }), () => {
112
- document.removeEventListener("focusin", i), document.removeEventListener("focusout", w), M.disconnect();
109
+ document.addEventListener("focusin", i), document.addEventListener("focusout", p);
110
+ const E = new MutationObserver(g);
111
+ return s && E.observe(s, { childList: !0, subtree: !0 }), () => {
112
+ document.removeEventListener("focusin", i), document.removeEventListener("focusout", p), E.disconnect();
113
113
  };
114
114
  }
115
115
  }, [r, s, C.paused]), o.useEffect(() => {
@@ -117,30 +117,30 @@ var _e = "focusScope.autoFocusOnMount", Pe = "focusScope.autoFocusOnUnmount", Ze
117
117
  Qe.add(C);
118
118
  const i = document.activeElement;
119
119
  if (!s.contains(i)) {
120
- const h = new CustomEvent(_e, Ze);
121
- s.addEventListener(_e, p), s.dispatchEvent(h), h.defaultPrevented || (Hn(zn(lt(s)), { select: !0 }), document.activeElement === i && H(s));
120
+ const g = new CustomEvent(Pe, Ze);
121
+ s.addEventListener(Pe, m), s.dispatchEvent(g), g.defaultPrevented || (Hn(zn(lt(s)), { select: !0 }), document.activeElement === i && H(s));
122
122
  }
123
123
  return () => {
124
- s.removeEventListener(_e, p), setTimeout(() => {
125
- const h = new CustomEvent(Pe, Ze);
126
- s.addEventListener(Pe, v), s.dispatchEvent(h), h.defaultPrevented || H(i ?? document.body, { select: !0 }), s.removeEventListener(Pe, v), Qe.remove(C);
124
+ s.removeEventListener(Pe, m), setTimeout(() => {
125
+ const g = new CustomEvent(Ie, Ze);
126
+ s.addEventListener(Ie, f), s.dispatchEvent(g), g.defaultPrevented || H(i ?? document.body, { select: !0 }), s.removeEventListener(Ie, f), Qe.remove(C);
127
127
  }, 0);
128
128
  };
129
129
  }
130
- }, [s, p, v, C]);
131
- const f = o.useCallback(
130
+ }, [s, m, f, C]);
131
+ const M = o.useCallback(
132
132
  (i) => {
133
133
  if (!n && !r || C.paused)
134
134
  return;
135
- const w = i.key === "Tab" && !i.altKey && !i.ctrlKey && !i.metaKey, h = document.activeElement;
136
- if (w && h) {
137
- const M = i.currentTarget, [R, b] = Wn(M);
138
- R && b ? !i.shiftKey && h === b ? (i.preventDefault(), n && H(R, { select: !0 })) : i.shiftKey && h === R && (i.preventDefault(), n && H(b, { select: !0 })) : h === M && i.preventDefault();
135
+ const p = i.key === "Tab" && !i.altKey && !i.ctrlKey && !i.metaKey, g = document.activeElement;
136
+ if (p && g) {
137
+ const E = i.currentTarget, [w, R] = Wn(E);
138
+ w && R ? !i.shiftKey && g === R ? (i.preventDefault(), n && H(w, { select: !0 })) : i.shiftKey && g === w && (i.preventDefault(), n && H(R, { select: !0 })) : g === E && i.preventDefault();
139
139
  }
140
140
  },
141
141
  [n, r, C.paused]
142
142
  );
143
- return /* @__PURE__ */ l(D.div, { tabIndex: -1, ...u, ref: g, onKeyDown: f });
143
+ return /* @__PURE__ */ l(D.div, { tabIndex: -1, ...u, ref: v, onKeyDown: M });
144
144
  });
145
145
  ut.displayName = Yn;
146
146
  function Hn(e, { select: t = !1 } = {}) {
@@ -227,21 +227,21 @@ var Zn = "Arrow", dt = o.forwardRef((e, t) => {
227
227
  );
228
228
  });
229
229
  dt.displayName = Zn;
230
- var qn = dt, ke = "Popper", [ft, pt] = de(ke), [Qn, mt] = ft(ke), vt = (e) => {
230
+ var qn = dt, Le = "Popper", [ft, pt] = de(Le), [Qn, mt] = ft(Le), vt = (e) => {
231
231
  const { __scopePopper: t, children: n } = e, [r, a] = o.useState(null);
232
232
  return /* @__PURE__ */ l(Qn, { scope: t, anchor: r, onAnchorChange: a, children: n });
233
233
  };
234
- vt.displayName = ke;
234
+ vt.displayName = Le;
235
235
  var ht = "PopperAnchor", gt = o.forwardRef(
236
236
  (e, t) => {
237
- const { __scopePopper: n, virtualRef: r, ...a } = e, c = mt(ht, n), u = o.useRef(null), s = K(t, u);
237
+ const { __scopePopper: n, virtualRef: r, ...a } = e, c = mt(ht, n), u = o.useRef(null), s = G(t, u);
238
238
  return o.useEffect(() => {
239
239
  c.onAnchorChange((r == null ? void 0 : r.current) || u.current);
240
240
  }), r ? null : /* @__PURE__ */ l(D.div, { ...a, ref: s });
241
241
  }
242
242
  );
243
243
  gt.displayName = ht;
244
- var Le = "PopperContent", [Jn, er] = ft(Le), wt = o.forwardRef(
244
+ var Ge = "PopperContent", [Jn, er] = ft(Ge), wt = o.forwardRef(
245
245
  (e, t) => {
246
246
  var B, ae, O, ce, Xe, Ve;
247
247
  const {
@@ -251,16 +251,16 @@ var Le = "PopperContent", [Jn, er] = ft(Le), wt = o.forwardRef(
251
251
  align: c = "center",
252
252
  alignOffset: u = 0,
253
253
  arrowPadding: s = 0,
254
- avoidCollisions: m = !0,
255
- collisionBoundary: p = [],
256
- collisionPadding: v = 0,
254
+ avoidCollisions: h = !0,
255
+ collisionBoundary: m = [],
256
+ collisionPadding: f = 0,
257
257
  sticky: d = "partial",
258
- hideWhenDetached: g = !1,
258
+ hideWhenDetached: v = !1,
259
259
  updatePositionStrategy: C = "optimized",
260
- onPlaced: f,
260
+ onPlaced: M,
261
261
  ...i
262
- } = e, w = mt(Le, n), [h, M] = o.useState(null), R = K(t, (se) => M(se)), [b, y] = o.useState(null), P = gn(b), I = (P == null ? void 0 : P.width) ?? 0, _ = (P == null ? void 0 : P.height) ?? 0, k = r + (c !== "center" ? "-" + c : ""), $ = typeof v == "number" ? v : { top: 0, right: 0, bottom: 0, left: 0, ...v }, Y = Array.isArray(p) ? p : [p], W = Y.length > 0, U = {
263
- padding: $,
262
+ } = e, p = mt(Ge, n), [g, E] = o.useState(null), w = G(t, (se) => E(se)), [R, y] = o.useState(null), _ = gn(R), I = (_ == null ? void 0 : _.width) ?? 0, P = (_ == null ? void 0 : _.height) ?? 0, k = r + (c !== "center" ? "-" + c : ""), U = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, Y = Array.isArray(m) ? m : [m], W = Y.length > 0, $ = {
263
+ padding: U,
264
264
  boundary: Y.filter(nr),
265
265
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
266
266
  altBoundary: W
@@ -272,36 +272,36 @@ var Le = "PopperContent", [Jn, er] = ft(Le), wt = o.forwardRef(
272
272
  animationFrame: C === "always"
273
273
  }),
274
274
  elements: {
275
- reference: w.anchor
275
+ reference: p.anchor
276
276
  },
277
277
  middleware: [
278
- Rn({ mainAxis: a + _, alignmentAxis: u }),
279
- m && bn({
278
+ Rn({ mainAxis: a + P, alignmentAxis: u }),
279
+ h && bn({
280
280
  mainAxis: !0,
281
281
  crossAxis: !1,
282
282
  limiter: d === "partial" ? Sn() : void 0,
283
- ...U
283
+ ...$
284
284
  }),
285
- m && yn({ ...U }),
285
+ h && yn({ ...$ }),
286
286
  _n({
287
- ...U,
287
+ ...$,
288
288
  apply: ({ elements: se, rects: je, availableWidth: pn, availableHeight: mn }) => {
289
- const { width: vn, height: hn } = je.reference, ve = se.floating.style;
290
- ve.setProperty("--radix-popper-available-width", `${pn}px`), ve.setProperty("--radix-popper-available-height", `${mn}px`), ve.setProperty("--radix-popper-anchor-width", `${vn}px`), ve.setProperty("--radix-popper-anchor-height", `${hn}px`);
289
+ const { width: vn, height: hn } = je.reference, he = se.floating.style;
290
+ he.setProperty("--radix-popper-available-width", `${pn}px`), he.setProperty("--radix-popper-available-height", `${mn}px`), he.setProperty("--radix-popper-anchor-width", `${vn}px`), he.setProperty("--radix-popper-anchor-height", `${hn}px`);
291
291
  }
292
292
  }),
293
- b && Pn({ element: b, padding: s }),
294
- rr({ arrowWidth: I, arrowHeight: _ }),
295
- g && In({ strategy: "referenceHidden", ...U })
293
+ R && Pn({ element: R, padding: s }),
294
+ rr({ arrowWidth: I, arrowHeight: P }),
295
+ v && In({ strategy: "referenceHidden", ...$ })
296
296
  ]
297
- }), [E, T] = Et(L), A = ne(f);
298
- xe(() => {
297
+ }), [b, T] = Et(L), A = ne(M);
298
+ Te(() => {
299
299
  Q && (A == null || A());
300
300
  }, [Q, A]);
301
- const G = (B = N.arrow) == null ? void 0 : B.x, re = (ae = N.arrow) == null ? void 0 : ae.y, oe = ((O = N.arrow) == null ? void 0 : O.centerOffset) !== 0, [me, X] = o.useState();
302
- return xe(() => {
303
- h && X(window.getComputedStyle(h).zIndex);
304
- }, [h]), /* @__PURE__ */ l(
301
+ const K = (B = N.arrow) == null ? void 0 : B.x, re = (ae = N.arrow) == null ? void 0 : ae.y, oe = ((O = N.arrow) == null ? void 0 : O.centerOffset) !== 0, [ve, X] = o.useState();
302
+ return Te(() => {
303
+ g && X(window.getComputedStyle(g).zIndex);
304
+ }, [g]), /* @__PURE__ */ l(
305
305
  "div",
306
306
  {
307
307
  ref: Z.setFloating,
@@ -311,7 +311,7 @@ var Le = "PopperContent", [Jn, er] = ft(Le), wt = o.forwardRef(
311
311
  transform: Q ? q.transform : "translate(0, -200%)",
312
312
  // keep off the page when measuring
313
313
  minWidth: "max-content",
314
- zIndex: me,
314
+ zIndex: ve,
315
315
  "--radix-popper-transform-origin": [
316
316
  (ce = N.transformOrigin) == null ? void 0 : ce.x,
317
317
  (Xe = N.transformOrigin) == null ? void 0 : Xe.y
@@ -329,18 +329,18 @@ var Le = "PopperContent", [Jn, er] = ft(Le), wt = o.forwardRef(
329
329
  Jn,
330
330
  {
331
331
  scope: n,
332
- placedSide: E,
332
+ placedSide: b,
333
333
  onArrowChange: y,
334
- arrowX: G,
334
+ arrowX: K,
335
335
  arrowY: re,
336
336
  shouldHideArrow: oe,
337
337
  children: /* @__PURE__ */ l(
338
338
  D.div,
339
339
  {
340
- "data-side": E,
340
+ "data-side": b,
341
341
  "data-align": T,
342
342
  ...i,
343
- ref: R,
343
+ ref: w,
344
344
  style: {
345
345
  ...i.style,
346
346
  // if the PopperContent hasn't been placed yet (not all measurements done)
@@ -355,7 +355,7 @@ var Le = "PopperContent", [Jn, er] = ft(Le), wt = o.forwardRef(
355
355
  );
356
356
  }
357
357
  );
358
- wt.displayName = Le;
358
+ wt.displayName = Ge;
359
359
  var Ct = "PopperArrow", tr = {
360
360
  top: "bottom",
361
361
  right: "left",
@@ -414,23 +414,23 @@ var rr = (e) => ({
414
414
  name: "transformOrigin",
415
415
  options: e,
416
416
  fn(t) {
417
- var w, h, M;
418
- const { placement: n, rects: r, middlewareData: a } = t, u = ((w = a.arrow) == null ? void 0 : w.centerOffset) !== 0, s = u ? 0 : e.arrowWidth, m = u ? 0 : e.arrowHeight, [p, v] = Et(n), d = { start: "0%", center: "50%", end: "100%" }[v], g = (((h = a.arrow) == null ? void 0 : h.x) ?? 0) + s / 2, C = (((M = a.arrow) == null ? void 0 : M.y) ?? 0) + m / 2;
419
- let f = "", i = "";
420
- return p === "bottom" ? (f = u ? d : `${g}px`, i = `${-m}px`) : p === "top" ? (f = u ? d : `${g}px`, i = `${r.floating.height + m}px`) : p === "right" ? (f = `${-m}px`, i = u ? d : `${C}px`) : p === "left" && (f = `${r.floating.width + m}px`, i = u ? d : `${C}px`), { data: { x: f, y: i } };
417
+ var p, g, E;
418
+ const { placement: n, rects: r, middlewareData: a } = t, u = ((p = a.arrow) == null ? void 0 : p.centerOffset) !== 0, s = u ? 0 : e.arrowWidth, h = u ? 0 : e.arrowHeight, [m, f] = Et(n), d = { start: "0%", center: "50%", end: "100%" }[f], v = (((g = a.arrow) == null ? void 0 : g.x) ?? 0) + s / 2, C = (((E = a.arrow) == null ? void 0 : E.y) ?? 0) + h / 2;
419
+ let M = "", i = "";
420
+ return m === "bottom" ? (M = u ? d : `${v}px`, i = `${-h}px`) : m === "top" ? (M = u ? d : `${v}px`, i = `${r.floating.height + h}px`) : m === "right" ? (M = `${-h}px`, i = u ? d : `${C}px`) : m === "left" && (M = `${r.floating.width + h}px`, i = u ? d : `${C}px`), { data: { x: M, y: i } };
421
421
  }
422
422
  });
423
423
  function Et(e) {
424
424
  const [t, n = "center"] = e.split("-");
425
425
  return [t, n];
426
426
  }
427
- var or = vt, ar = gt, cr = wt, sr = Mt, Ie = "rovingFocusGroup.onEntryFocus", ir = { bubbles: !1, cancelable: !0 }, Ee = "RovingFocusGroup", [De, Rt, ur] = st(Ee), [lr, bt] = de(
428
- Ee,
427
+ var or = vt, ar = gt, cr = wt, sr = Mt, Ae = "rovingFocusGroup.onEntryFocus", ir = { bubbles: !1, cancelable: !0 }, fe = "RovingFocusGroup", [Oe, Rt, ur] = st(fe), [lr, bt] = de(
428
+ fe,
429
429
  [ur]
430
- ), [dr, fr] = lr(Ee), St = o.forwardRef(
431
- (e, t) => /* @__PURE__ */ l(De.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(De.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(pr, { ...e, ref: t }) }) })
430
+ ), [dr, fr] = lr(fe), St = o.forwardRef(
431
+ (e, t) => /* @__PURE__ */ l(Oe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(Oe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(pr, { ...e, ref: t }) }) })
432
432
  );
433
- St.displayName = Ee;
433
+ St.displayName = fe;
434
434
  var pr = o.forwardRef((e, t) => {
435
435
  const {
436
436
  __scopeRovingFocusGroup: n,
@@ -439,44 +439,45 @@ var pr = o.forwardRef((e, t) => {
439
439
  dir: c,
440
440
  currentTabStopId: u,
441
441
  defaultCurrentTabStopId: s,
442
- onCurrentTabStopIdChange: m,
443
- onEntryFocus: p,
444
- preventScrollOnEntryFocus: v = !1,
442
+ onCurrentTabStopIdChange: h,
443
+ onEntryFocus: m,
444
+ preventScrollOnEntryFocus: f = !1,
445
445
  ...d
446
- } = e, g = o.useRef(null), C = K(t, g), f = it(c), [i = null, w] = ot({
446
+ } = e, v = o.useRef(null), C = G(t, v), M = it(c), [i, p] = ot({
447
447
  prop: u,
448
- defaultProp: s,
449
- onChange: m
450
- }), [h, M] = o.useState(!1), R = ne(p), b = Rt(n), y = o.useRef(!1), [P, I] = o.useState(0);
448
+ defaultProp: s ?? null,
449
+ onChange: h,
450
+ caller: fe
451
+ }), [g, E] = o.useState(!1), w = ne(m), R = Rt(n), y = o.useRef(!1), [_, I] = o.useState(0);
451
452
  return o.useEffect(() => {
452
- const _ = g.current;
453
- if (_)
454
- return _.addEventListener(Ie, R), () => _.removeEventListener(Ie, R);
455
- }, [R]), /* @__PURE__ */ l(
453
+ const P = v.current;
454
+ if (P)
455
+ return P.addEventListener(Ae, w), () => P.removeEventListener(Ae, w);
456
+ }, [w]), /* @__PURE__ */ l(
456
457
  dr,
457
458
  {
458
459
  scope: n,
459
460
  orientation: r,
460
- dir: f,
461
+ dir: M,
461
462
  loop: a,
462
463
  currentTabStopId: i,
463
464
  onItemFocus: o.useCallback(
464
- (_) => w(_),
465
- [w]
465
+ (P) => p(P),
466
+ [p]
466
467
  ),
467
- onItemShiftTab: o.useCallback(() => M(!0), []),
468
+ onItemShiftTab: o.useCallback(() => E(!0), []),
468
469
  onFocusableItemAdd: o.useCallback(
469
- () => I((_) => _ + 1),
470
+ () => I((P) => P + 1),
470
471
  []
471
472
  ),
472
473
  onFocusableItemRemove: o.useCallback(
473
- () => I((_) => _ - 1),
474
+ () => I((P) => P - 1),
474
475
  []
475
476
  ),
476
477
  children: /* @__PURE__ */ l(
477
478
  D.div,
478
479
  {
479
- tabIndex: h || P === 0 ? -1 : 0,
480
+ tabIndex: g || _ === 0 ? -1 : 0,
480
481
  "data-orientation": r,
481
482
  ...d,
482
483
  ref: C,
@@ -484,20 +485,20 @@ var pr = o.forwardRef((e, t) => {
484
485
  onMouseDown: S(e.onMouseDown, () => {
485
486
  y.current = !0;
486
487
  }),
487
- onFocus: S(e.onFocus, (_) => {
488
+ onFocus: S(e.onFocus, (P) => {
488
489
  const k = !y.current;
489
- if (_.target === _.currentTarget && k && !h) {
490
- const $ = new CustomEvent(Ie, ir);
491
- if (_.currentTarget.dispatchEvent($), !$.defaultPrevented) {
492
- const Y = b().filter((L) => L.focusable), W = Y.find((L) => L.active), U = Y.find((L) => L.id === i), q = [W, U, ...Y].filter(
490
+ if (P.target === P.currentTarget && k && !g) {
491
+ const U = new CustomEvent(Ae, ir);
492
+ if (P.currentTarget.dispatchEvent(U), !U.defaultPrevented) {
493
+ const Y = R().filter((L) => L.focusable), W = Y.find((L) => L.active), $ = Y.find((L) => L.id === i), q = [W, $, ...Y].filter(
493
494
  Boolean
494
495
  ).map((L) => L.ref.current);
495
- Pt(q, v);
496
+ Pt(q, f);
496
497
  }
497
498
  }
498
499
  y.current = !1;
499
500
  }),
500
- onBlur: S(e.onBlur, () => M(!1))
501
+ onBlur: S(e.onBlur, () => E(!1))
501
502
  }
502
503
  )
503
504
  }
@@ -509,13 +510,14 @@ var pr = o.forwardRef((e, t) => {
509
510
  focusable: r = !0,
510
511
  active: a = !1,
511
512
  tabStopId: c,
512
- ...u
513
- } = e, s = Ne(), m = c || s, p = fr(yt, n), v = p.currentTabStopId === m, d = Rt(n), { onFocusableItemAdd: g, onFocusableItemRemove: C } = p;
513
+ children: u,
514
+ ...s
515
+ } = e, h = De(), m = c || h, f = fr(yt, n), d = f.currentTabStopId === m, v = Rt(n), { onFocusableItemAdd: C, onFocusableItemRemove: M, currentTabStopId: i } = f;
514
516
  return o.useEffect(() => {
515
517
  if (r)
516
- return g(), () => C();
517
- }, [r, g, C]), /* @__PURE__ */ l(
518
- De.ItemSlot,
518
+ return C(), () => M();
519
+ }, [r, C, M]), /* @__PURE__ */ l(
520
+ Oe.ItemSlot,
519
521
  {
520
522
  scope: n,
521
523
  id: m,
@@ -524,37 +526,38 @@ var pr = o.forwardRef((e, t) => {
524
526
  children: /* @__PURE__ */ l(
525
527
  D.span,
526
528
  {
527
- tabIndex: v ? 0 : -1,
528
- "data-orientation": p.orientation,
529
- ...u,
529
+ tabIndex: d ? 0 : -1,
530
+ "data-orientation": f.orientation,
531
+ ...s,
530
532
  ref: t,
531
- onMouseDown: S(e.onMouseDown, (f) => {
532
- r ? p.onItemFocus(m) : f.preventDefault();
533
+ onMouseDown: S(e.onMouseDown, (p) => {
534
+ r ? f.onItemFocus(m) : p.preventDefault();
533
535
  }),
534
- onFocus: S(e.onFocus, () => p.onItemFocus(m)),
535
- onKeyDown: S(e.onKeyDown, (f) => {
536
- if (f.key === "Tab" && f.shiftKey) {
537
- p.onItemShiftTab();
536
+ onFocus: S(e.onFocus, () => f.onItemFocus(m)),
537
+ onKeyDown: S(e.onKeyDown, (p) => {
538
+ if (p.key === "Tab" && p.shiftKey) {
539
+ f.onItemShiftTab();
538
540
  return;
539
541
  }
540
- if (f.target !== f.currentTarget)
542
+ if (p.target !== p.currentTarget)
541
543
  return;
542
- const i = hr(f, p.orientation, p.dir);
543
- if (i !== void 0) {
544
- if (f.metaKey || f.ctrlKey || f.altKey || f.shiftKey)
544
+ const g = hr(p, f.orientation, f.dir);
545
+ if (g !== void 0) {
546
+ if (p.metaKey || p.ctrlKey || p.altKey || p.shiftKey)
545
547
  return;
546
- f.preventDefault();
547
- let h = d().filter((M) => M.focusable).map((M) => M.ref.current);
548
- if (i === "last")
549
- h.reverse();
550
- else if (i === "prev" || i === "next") {
551
- i === "prev" && h.reverse();
552
- const M = h.indexOf(f.currentTarget);
553
- h = p.loop ? gr(h, M + 1) : h.slice(M + 1);
548
+ p.preventDefault();
549
+ let w = v().filter((R) => R.focusable).map((R) => R.ref.current);
550
+ if (g === "last")
551
+ w.reverse();
552
+ else if (g === "prev" || g === "next") {
553
+ g === "prev" && w.reverse();
554
+ const R = w.indexOf(p.currentTarget);
555
+ w = f.loop ? gr(w, R + 1) : w.slice(R + 1);
554
556
  }
555
- setTimeout(() => Pt(h));
557
+ setTimeout(() => Pt(w));
556
558
  }
557
- })
559
+ }),
560
+ children: typeof u == "function" ? u({ isCurrentTabStop: d, hasTabStop: i != null }) : u
558
561
  }
559
562
  )
560
563
  }
@@ -589,18 +592,18 @@ function Pt(e, t = !1) {
589
592
  function gr(e, t) {
590
593
  return e.map((n, r) => e[(t + r) % e.length]);
591
594
  }
592
- var wr = St, Cr = _t, It = xn(), Ae = function() {
595
+ var wr = St, Cr = _t, It = xn(), xe = function() {
593
596
  }, Re = o.forwardRef(function(e, t) {
594
597
  var n = o.useRef(null), r = o.useState({
595
- onScrollCapture: Ae,
596
- onWheelCapture: Ae,
597
- onTouchMoveCapture: Ae
598
- }), a = r[0], c = r[1], u = e.forwardProps, s = e.children, m = e.className, p = e.removeScrollBar, v = e.enabled, d = e.shards, g = e.sideCar, C = e.noIsolation, f = e.inert, i = e.allowPinchZoom, w = e.as, h = w === void 0 ? "div" : w, M = e.gapMode, R = Tn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), b = g, y = Nn([n, t]), P = te(te({}, R), a);
598
+ onScrollCapture: xe,
599
+ onWheelCapture: xe,
600
+ onTouchMoveCapture: xe
601
+ }), a = r[0], c = r[1], u = e.forwardProps, s = e.children, h = e.className, m = e.removeScrollBar, f = e.enabled, d = e.shards, v = e.sideCar, C = e.noRelative, M = e.noIsolation, i = e.inert, p = e.allowPinchZoom, g = e.as, E = g === void 0 ? "div" : g, w = e.gapMode, R = Tn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), y = v, _ = Nn([n, t]), I = te(te({}, R), a);
599
602
  return o.createElement(
600
603
  o.Fragment,
601
604
  null,
602
- v && o.createElement(b, { sideCar: It, removeScrollBar: p, shards: d, noIsolation: C, inert: f, setCallbacks: c, allowPinchZoom: !!i, lockRef: n, gapMode: M }),
603
- u ? o.cloneElement(o.Children.only(s), te(te({}, P), { ref: y })) : o.createElement(h, te({}, P, { className: m, ref: y }), s)
605
+ f && o.createElement(y, { sideCar: It, removeScrollBar: m, shards: d, noRelative: C, noIsolation: M, inert: i, setCallbacks: c, allowPinchZoom: !!p, lockRef: n, gapMode: w }),
606
+ u ? o.cloneElement(o.Children.only(s), te(te({}, I), { ref: _ })) : o.createElement(E, te({}, I, { className: h, ref: _ }), s)
604
607
  );
605
608
  });
606
609
  Re.defaultProps = {
@@ -612,19 +615,19 @@ Re.classNames = {
612
615
  fullWidth: Dn,
613
616
  zeroRight: On
614
617
  };
615
- var Oe = !1;
618
+ var Fe = !1;
616
619
  if (typeof window < "u")
617
620
  try {
618
- var he = Object.defineProperty({}, "passive", {
621
+ var ge = Object.defineProperty({}, "passive", {
619
622
  get: function() {
620
- return Oe = !0, !0;
623
+ return Fe = !0, !0;
621
624
  }
622
625
  });
623
- window.addEventListener("test", he, he), window.removeEventListener("test", he, he);
626
+ window.addEventListener("test", ge, ge), window.removeEventListener("test", ge, ge);
624
627
  } catch {
625
- Oe = !1;
628
+ Fe = !1;
626
629
  }
627
- var J = Oe ? { passive: !1 } : !1, Mr = function(e) {
630
+ var J = Fe ? { passive: !1 } : !1, Mr = function(e) {
628
631
  return e.tagName === "TEXTAREA";
629
632
  }, At = function(e, t) {
630
633
  if (!(e instanceof Element))
@@ -673,17 +676,21 @@ var J = Oe ? { passive: !1 } : !1, Mr = function(e) {
673
676
  }, yr = function(e, t) {
674
677
  return e === "h" && t === "rtl" ? -1 : 1;
675
678
  }, _r = function(e, t, n, r, a) {
676
- var c = yr(e, window.getComputedStyle(t).direction), u = c * r, s = n.target, m = t.contains(s), p = !1, v = u > 0, d = 0, g = 0;
679
+ var c = yr(e, window.getComputedStyle(t).direction), u = c * r, s = n.target, h = t.contains(s), m = !1, f = u > 0, d = 0, v = 0;
677
680
  do {
678
- var C = Tt(e, s), f = C[0], i = C[1], w = C[2], h = i - w - c * f;
679
- (f || h) && xt(e, s) && (d += h, g += f), s instanceof ShadowRoot ? s = s.host : s = s.parentNode;
681
+ if (!s)
682
+ break;
683
+ var C = Tt(e, s), M = C[0], i = C[1], p = C[2], g = i - p - c * M;
684
+ (M || g) && xt(e, s) && (d += g, v += M);
685
+ var E = s.parentNode;
686
+ s = E && E.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? E.host : E;
680
687
  } while (
681
688
  // portaled content
682
- !m && s !== document.body || // self content
683
- m && (t.contains(s) || t === s)
689
+ !h && s !== document.body || // self content
690
+ h && (t.contains(s) || t === s)
684
691
  );
685
- return (v && (a && Math.abs(d) < 1 || !a && u > d) || !v && (a && Math.abs(g) < 1 || !a && -u > g)) && (p = !0), p;
686
- }, ge = function(e) {
692
+ return (f && (a && Math.abs(d) < 1 || !a && u > d) || !f && (a && Math.abs(v) < 1 || !a && -u > v)) && (m = !0), m;
693
+ }, we = function(e) {
687
694
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
688
695
  }, tt = function(e) {
689
696
  return [e.deltaX, e.deltaY];
@@ -705,78 +712,78 @@ function xr(e) {
705
712
  if (e.inert) {
706
713
  document.body.classList.add("block-interactivity-".concat(a));
707
714
  var i = kn([e.lockRef.current], (e.shards || []).map(nt), !0).filter(Boolean);
708
- return i.forEach(function(w) {
709
- return w.classList.add("allow-interactivity-".concat(a));
715
+ return i.forEach(function(p) {
716
+ return p.classList.add("allow-interactivity-".concat(a));
710
717
  }), function() {
711
- document.body.classList.remove("block-interactivity-".concat(a)), i.forEach(function(w) {
712
- return w.classList.remove("allow-interactivity-".concat(a));
718
+ document.body.classList.remove("block-interactivity-".concat(a)), i.forEach(function(p) {
719
+ return p.classList.remove("allow-interactivity-".concat(a));
713
720
  });
714
721
  };
715
722
  }
716
723
  }, [e.inert, e.lockRef.current, e.shards]);
717
- var s = o.useCallback(function(i, w) {
724
+ var s = o.useCallback(function(i, p) {
718
725
  if ("touches" in i && i.touches.length === 2 || i.type === "wheel" && i.ctrlKey)
719
726
  return !u.current.allowPinchZoom;
720
- var h = ge(i), M = n.current, R = "deltaX" in i ? i.deltaX : M[0] - h[0], b = "deltaY" in i ? i.deltaY : M[1] - h[1], y, P = i.target, I = Math.abs(R) > Math.abs(b) ? "h" : "v";
721
- if ("touches" in i && I === "h" && P.type === "range")
727
+ var g = we(i), E = n.current, w = "deltaX" in i ? i.deltaX : E[0] - g[0], R = "deltaY" in i ? i.deltaY : E[1] - g[1], y, _ = i.target, I = Math.abs(w) > Math.abs(R) ? "h" : "v";
728
+ if ("touches" in i && I === "h" && _.type === "range")
722
729
  return !1;
723
- var _ = et(I, P);
724
- if (!_)
730
+ var P = et(I, _);
731
+ if (!P)
725
732
  return !0;
726
- if (_ ? y = I : (y = I === "v" ? "h" : "v", _ = et(I, P)), !_)
733
+ if (P ? y = I : (y = I === "v" ? "h" : "v", P = et(I, _)), !P)
727
734
  return !1;
728
- if (!r.current && "changedTouches" in i && (R || b) && (r.current = y), !y)
735
+ if (!r.current && "changedTouches" in i && (w || R) && (r.current = y), !y)
729
736
  return !0;
730
737
  var k = r.current || y;
731
- return _r(k, w, i, k === "h" ? R : b, !0);
732
- }, []), m = o.useCallback(function(i) {
733
- var w = i;
738
+ return _r(k, p, i, k === "h" ? w : R, !0);
739
+ }, []), h = o.useCallback(function(i) {
740
+ var p = i;
734
741
  if (!(!ee.length || ee[ee.length - 1] !== c)) {
735
- var h = "deltaY" in w ? tt(w) : ge(w), M = t.current.filter(function(y) {
736
- return y.name === w.type && (y.target === w.target || w.target === y.shadowParent) && Pr(y.delta, h);
742
+ var g = "deltaY" in p ? tt(p) : we(p), E = t.current.filter(function(y) {
743
+ return y.name === p.type && (y.target === p.target || p.target === y.shadowParent) && Pr(y.delta, g);
737
744
  })[0];
738
- if (M && M.should) {
739
- w.cancelable && w.preventDefault();
745
+ if (E && E.should) {
746
+ p.cancelable && p.preventDefault();
740
747
  return;
741
748
  }
742
- if (!M) {
743
- var R = (u.current.shards || []).map(nt).filter(Boolean).filter(function(y) {
744
- return y.contains(w.target);
745
- }), b = R.length > 0 ? s(w, R[0]) : !u.current.noIsolation;
746
- b && w.cancelable && w.preventDefault();
749
+ if (!E) {
750
+ var w = (u.current.shards || []).map(nt).filter(Boolean).filter(function(y) {
751
+ return y.contains(p.target);
752
+ }), R = w.length > 0 ? s(p, w[0]) : !u.current.noIsolation;
753
+ R && p.cancelable && p.preventDefault();
747
754
  }
748
755
  }
749
- }, []), p = o.useCallback(function(i, w, h, M) {
750
- var R = { name: i, delta: w, target: h, should: M, shadowParent: Tr(h) };
751
- t.current.push(R), setTimeout(function() {
752
- t.current = t.current.filter(function(b) {
753
- return b !== R;
756
+ }, []), m = o.useCallback(function(i, p, g, E) {
757
+ var w = { name: i, delta: p, target: g, should: E, shadowParent: Tr(g) };
758
+ t.current.push(w), setTimeout(function() {
759
+ t.current = t.current.filter(function(R) {
760
+ return R !== w;
754
761
  });
755
762
  }, 1);
756
- }, []), v = o.useCallback(function(i) {
757
- n.current = ge(i), r.current = void 0;
763
+ }, []), f = o.useCallback(function(i) {
764
+ n.current = we(i), r.current = void 0;
758
765
  }, []), d = o.useCallback(function(i) {
759
- p(i.type, tt(i), i.target, s(i, e.lockRef.current));
760
- }, []), g = o.useCallback(function(i) {
761
- p(i.type, ge(i), i.target, s(i, e.lockRef.current));
766
+ m(i.type, tt(i), i.target, s(i, e.lockRef.current));
767
+ }, []), v = o.useCallback(function(i) {
768
+ m(i.type, we(i), i.target, s(i, e.lockRef.current));
762
769
  }, []);
763
770
  o.useEffect(function() {
764
771
  return ee.push(c), e.setCallbacks({
765
772
  onScrollCapture: d,
766
773
  onWheelCapture: d,
767
- onTouchMoveCapture: g
768
- }), document.addEventListener("wheel", m, J), document.addEventListener("touchmove", m, J), document.addEventListener("touchstart", v, J), function() {
774
+ onTouchMoveCapture: v
775
+ }), document.addEventListener("wheel", h, J), document.addEventListener("touchmove", h, J), document.addEventListener("touchstart", f, J), function() {
769
776
  ee = ee.filter(function(i) {
770
777
  return i !== c;
771
- }), document.removeEventListener("wheel", m, J), document.removeEventListener("touchmove", m, J), document.removeEventListener("touchstart", v, J);
778
+ }), document.removeEventListener("wheel", h, J), document.removeEventListener("touchmove", h, J), document.removeEventListener("touchstart", f, J);
772
779
  };
773
780
  }, []);
774
- var C = e.removeScrollBar, f = e.inert;
781
+ var C = e.removeScrollBar, M = e.inert;
775
782
  return o.createElement(
776
783
  o.Fragment,
777
784
  null,
778
- f ? o.createElement(c, { styles: Ir(a) }) : null,
779
- C ? o.createElement(Ln, { gapMode: e.gapMode }) : null
785
+ M ? o.createElement(c, { styles: Ir(a) }) : null,
786
+ C ? o.createElement(Ln, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
780
787
  );
781
788
  }
782
789
  function Tr(e) {
@@ -784,46 +791,46 @@ function Tr(e) {
784
791
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
785
792
  return t;
786
793
  }
787
- const Nr = Kn(It, xr);
794
+ const Nr = Gn(It, xr);
788
795
  var Nt = o.forwardRef(function(e, t) {
789
796
  return o.createElement(Re, te({}, e, { ref: t, sideCar: Nr }));
790
797
  });
791
798
  Nt.classNames = Re.classNames;
792
799
  const Dr = Nt;
793
- var Fe = ["Enter", " "], Or = ["ArrowDown", "PageUp", "Home"], Dt = ["ArrowUp", "PageDown", "End"], Fr = [...Or, ...Dt], kr = {
794
- ltr: [...Fe, "ArrowRight"],
795
- rtl: [...Fe, "ArrowLeft"]
800
+ var ke = ["Enter", " "], Or = ["ArrowDown", "PageUp", "Home"], Dt = ["ArrowUp", "PageDown", "End"], Fr = [...Or, ...Dt], kr = {
801
+ ltr: [...ke, "ArrowRight"],
802
+ rtl: [...ke, "ArrowLeft"]
796
803
  }, Lr = {
797
804
  ltr: ["ArrowLeft"],
798
805
  rtl: ["ArrowRight"]
799
- }, fe = "Menu", [ue, Kr, Gr] = st(fe), [j, Ot] = de(fe, [
800
- Gr,
806
+ }, pe = "Menu", [ue, Gr, Kr] = st(pe), [j, Ot] = de(pe, [
807
+ Kr,
801
808
  pt,
802
809
  bt
803
- ]), be = pt(), Ft = bt(), [$r, z] = j(fe), [Ur, pe] = j(fe), kt = (e) => {
804
- const { __scopeMenu: t, open: n = !1, children: r, dir: a, onOpenChange: c, modal: u = !0 } = e, s = be(t), [m, p] = o.useState(null), v = o.useRef(!1), d = ne(c), g = it(a);
810
+ ]), be = pt(), Ft = bt(), [Ur, z] = j(pe), [$r, me] = j(pe), kt = (e) => {
811
+ const { __scopeMenu: t, open: n = !1, children: r, dir: a, onOpenChange: c, modal: u = !0 } = e, s = be(t), [h, m] = o.useState(null), f = o.useRef(!1), d = ne(c), v = it(a);
805
812
  return o.useEffect(() => {
806
813
  const C = () => {
807
- v.current = !0, document.addEventListener("pointerdown", f, { capture: !0, once: !0 }), document.addEventListener("pointermove", f, { capture: !0, once: !0 });
808
- }, f = () => v.current = !1;
814
+ f.current = !0, document.addEventListener("pointerdown", M, { capture: !0, once: !0 }), document.addEventListener("pointermove", M, { capture: !0, once: !0 });
815
+ }, M = () => f.current = !1;
809
816
  return document.addEventListener("keydown", C, { capture: !0 }), () => {
810
- document.removeEventListener("keydown", C, { capture: !0 }), document.removeEventListener("pointerdown", f, { capture: !0 }), document.removeEventListener("pointermove", f, { capture: !0 });
817
+ document.removeEventListener("keydown", C, { capture: !0 }), document.removeEventListener("pointerdown", M, { capture: !0 }), document.removeEventListener("pointermove", M, { capture: !0 });
811
818
  };
812
819
  }, []), /* @__PURE__ */ l(or, { ...s, children: /* @__PURE__ */ l(
813
- $r,
820
+ Ur,
814
821
  {
815
822
  scope: t,
816
823
  open: n,
817
824
  onOpenChange: d,
818
- content: m,
819
- onContentChange: p,
825
+ content: h,
826
+ onContentChange: m,
820
827
  children: /* @__PURE__ */ l(
821
- Ur,
828
+ $r,
822
829
  {
823
830
  scope: t,
824
831
  onClose: o.useCallback(() => d(!1), [d]),
825
- isUsingKeyboardRef: v,
826
- dir: g,
832
+ isUsingKeyboardRef: f,
833
+ dir: v,
827
834
  modal: u,
828
835
  children: r
829
836
  }
@@ -831,7 +838,7 @@ var Fe = ["Enter", " "], Or = ["ArrowDown", "PageUp", "Home"], Dt = ["ArrowUp",
831
838
  }
832
839
  ) });
833
840
  };
834
- kt.displayName = fe;
841
+ kt.displayName = pe;
835
842
  var Br = "MenuAnchor", Ke = o.forwardRef(
836
843
  (e, t) => {
837
844
  const { __scopeMenu: n, ...r } = e, a = be(n);
@@ -839,27 +846,27 @@ var Br = "MenuAnchor", Ke = o.forwardRef(
839
846
  }
840
847
  );
841
848
  Ke.displayName = Br;
842
- var Ge = "MenuPortal", [Yr, Lt] = j(Ge, {
849
+ var Ue = "MenuPortal", [Yr, Lt] = j(Ue, {
843
850
  forceMount: void 0
844
- }), Kt = (e) => {
845
- const { __scopeMenu: t, forceMount: n, children: r, container: a } = e, c = z(Ge, t);
846
- return /* @__PURE__ */ l(Yr, { scope: t, forceMount: n, children: /* @__PURE__ */ l(Me, { present: n || c.open, children: /* @__PURE__ */ l(ct, { asChild: !0, container: a, children: r }) }) });
851
+ }), Gt = (e) => {
852
+ const { __scopeMenu: t, forceMount: n, children: r, container: a } = e, c = z(Ue, t);
853
+ return /* @__PURE__ */ l(Yr, { scope: t, forceMount: n, children: /* @__PURE__ */ l(Ee, { present: n || c.open, children: /* @__PURE__ */ l(ct, { asChild: !0, container: a, children: r }) }) });
847
854
  };
848
- Kt.displayName = Ge;
849
- var F = "MenuContent", [Hr, $e] = j(F), Gt = o.forwardRef(
855
+ Gt.displayName = Ue;
856
+ var F = "MenuContent", [Hr, $e] = j(F), Kt = o.forwardRef(
850
857
  (e, t) => {
851
- const n = Lt(F, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, c = z(F, e.__scopeMenu), u = pe(F, e.__scopeMenu);
852
- return /* @__PURE__ */ l(ue.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l(Me, { present: r || c.open, children: /* @__PURE__ */ l(ue.Slot, { scope: e.__scopeMenu, children: u.modal ? /* @__PURE__ */ l(Wr, { ...a, ref: t }) : /* @__PURE__ */ l(Xr, { ...a, ref: t }) }) }) });
858
+ const n = Lt(F, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, c = z(F, e.__scopeMenu), u = me(F, e.__scopeMenu);
859
+ return /* @__PURE__ */ l(ue.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l(Ee, { present: r || c.open, children: /* @__PURE__ */ l(ue.Slot, { scope: e.__scopeMenu, children: u.modal ? /* @__PURE__ */ l(Wr, { ...a, ref: t }) : /* @__PURE__ */ l(Xr, { ...a, ref: t }) }) }) });
853
860
  }
854
861
  ), Wr = o.forwardRef(
855
862
  (e, t) => {
856
- const n = z(F, e.__scopeMenu), r = o.useRef(null), a = K(t, r);
863
+ const n = z(F, e.__scopeMenu), r = o.useRef(null), a = G(t, r);
857
864
  return o.useEffect(() => {
858
865
  const c = r.current;
859
866
  if (c)
860
- return Gn(c);
867
+ return Kn(c);
861
868
  }, []), /* @__PURE__ */ l(
862
- Ue,
869
+ Be,
863
870
  {
864
871
  ...e,
865
872
  ref: a,
@@ -878,7 +885,7 @@ var F = "MenuContent", [Hr, $e] = j(F), Gt = o.forwardRef(
878
885
  ), Xr = o.forwardRef((e, t) => {
879
886
  const n = z(F, e.__scopeMenu);
880
887
  return /* @__PURE__ */ l(
881
- Ue,
888
+ Be,
882
889
  {
883
890
  ...e,
884
891
  ref: t,
@@ -888,7 +895,7 @@ var F = "MenuContent", [Hr, $e] = j(F), Gt = o.forwardRef(
888
895
  onDismiss: () => n.onOpenChange(!1)
889
896
  }
890
897
  );
891
- }), Ue = o.forwardRef(
898
+ }), Vr = Ne("MenuContent.ScrollLock"), Be = o.forwardRef(
892
899
  (e, t) => {
893
900
  const {
894
901
  __scopeMenu: n,
@@ -897,62 +904,62 @@ var F = "MenuContent", [Hr, $e] = j(F), Gt = o.forwardRef(
897
904
  onOpenAutoFocus: c,
898
905
  onCloseAutoFocus: u,
899
906
  disableOutsidePointerEvents: s,
900
- onEntryFocus: m,
901
- onEscapeKeyDown: p,
902
- onPointerDownOutside: v,
907
+ onEntryFocus: h,
908
+ onEscapeKeyDown: m,
909
+ onPointerDownOutside: f,
903
910
  onFocusOutside: d,
904
- onInteractOutside: g,
911
+ onInteractOutside: v,
905
912
  onDismiss: C,
906
- disableOutsideScroll: f,
913
+ disableOutsideScroll: M,
907
914
  ...i
908
- } = e, w = z(F, n), h = pe(F, n), M = be(n), R = Ft(n), b = Kr(n), [y, P] = o.useState(null), I = o.useRef(null), _ = K(t, I, w.onContentChange), k = o.useRef(0), $ = o.useRef(""), Y = o.useRef(0), W = o.useRef(null), U = o.useRef("right"), Z = o.useRef(0), q = f ? Dr : o.Fragment, L = f ? { as: Te, allowPinchZoom: !0 } : void 0, Q = (E) => {
915
+ } = e, p = z(F, n), g = me(F, n), E = be(n), w = Ft(n), R = Gr(n), [y, _] = o.useState(null), I = o.useRef(null), P = G(t, I, p.onContentChange), k = o.useRef(0), U = o.useRef(""), Y = o.useRef(0), W = o.useRef(null), $ = o.useRef("right"), Z = o.useRef(0), q = M ? Dr : o.Fragment, L = M ? { as: Vr, allowPinchZoom: !0 } : void 0, Q = (b) => {
909
916
  var B, ae;
910
- const T = $.current + E, A = b().filter((O) => !O.disabled), G = document.activeElement, re = (B = A.find((O) => O.ref.current === G)) == null ? void 0 : B.textValue, oe = A.map((O) => O.textValue), me = oo(oe, T, re), X = (ae = A.find((O) => O.textValue === me)) == null ? void 0 : ae.ref.current;
917
+ const T = U.current + b, A = R().filter((O) => !O.disabled), K = document.activeElement, re = (B = A.find((O) => O.ref.current === K)) == null ? void 0 : B.textValue, oe = A.map((O) => O.textValue), ve = ao(oe, T, re), X = (ae = A.find((O) => O.textValue === ve)) == null ? void 0 : ae.ref.current;
911
918
  (function O(ce) {
912
- $.current = ce, window.clearTimeout(k.current), ce !== "" && (k.current = window.setTimeout(() => O(""), 1e3));
919
+ U.current = ce, window.clearTimeout(k.current), ce !== "" && (k.current = window.setTimeout(() => O(""), 1e3));
913
920
  })(T), X && setTimeout(() => X.focus());
914
921
  };
915
922
  o.useEffect(() => () => window.clearTimeout(k.current), []), Bn();
916
- const N = o.useCallback((E) => {
917
- var A, G;
918
- return U.current === ((A = W.current) == null ? void 0 : A.side) && co(E, (G = W.current) == null ? void 0 : G.area);
923
+ const N = o.useCallback((b) => {
924
+ var A, K;
925
+ return $.current === ((A = W.current) == null ? void 0 : A.side) && so(b, (K = W.current) == null ? void 0 : K.area);
919
926
  }, []);
920
927
  return /* @__PURE__ */ l(
921
928
  Hr,
922
929
  {
923
930
  scope: n,
924
- searchRef: $,
931
+ searchRef: U,
925
932
  onItemEnter: o.useCallback(
926
- (E) => {
927
- N(E) && E.preventDefault();
933
+ (b) => {
934
+ N(b) && b.preventDefault();
928
935
  },
929
936
  [N]
930
937
  ),
931
938
  onItemLeave: o.useCallback(
932
- (E) => {
939
+ (b) => {
933
940
  var T;
934
- N(E) || ((T = I.current) == null || T.focus(), P(null));
941
+ N(b) || ((T = I.current) == null || T.focus(), _(null));
935
942
  },
936
943
  [N]
937
944
  ),
938
945
  onTriggerLeave: o.useCallback(
939
- (E) => {
940
- N(E) && E.preventDefault();
946
+ (b) => {
947
+ N(b) && b.preventDefault();
941
948
  },
942
949
  [N]
943
950
  ),
944
951
  pointerGraceTimerRef: Y,
945
- onPointerGraceIntentChange: o.useCallback((E) => {
946
- W.current = E;
952
+ onPointerGraceIntentChange: o.useCallback((b) => {
953
+ W.current = b;
947
954
  }, []),
948
955
  children: /* @__PURE__ */ l(q, { ...L, children: /* @__PURE__ */ l(
949
956
  ut,
950
957
  {
951
958
  asChild: !0,
952
959
  trapped: a,
953
- onMountAutoFocus: S(c, (E) => {
960
+ onMountAutoFocus: S(c, (b) => {
954
961
  var T;
955
- E.preventDefault(), (T = I.current) == null || T.focus({ preventScroll: !0 });
962
+ b.preventDefault(), (T = I.current) == null || T.focus({ preventScroll: !0 });
956
963
  }),
957
964
  onUnmountAutoFocus: u,
958
965
  children: /* @__PURE__ */ l(
@@ -960,23 +967,23 @@ var F = "MenuContent", [Hr, $e] = j(F), Gt = o.forwardRef(
960
967
  {
961
968
  asChild: !0,
962
969
  disableOutsidePointerEvents: s,
963
- onEscapeKeyDown: p,
964
- onPointerDownOutside: v,
970
+ onEscapeKeyDown: m,
971
+ onPointerDownOutside: f,
965
972
  onFocusOutside: d,
966
- onInteractOutside: g,
973
+ onInteractOutside: v,
967
974
  onDismiss: C,
968
975
  children: /* @__PURE__ */ l(
969
976
  wr,
970
977
  {
971
978
  asChild: !0,
972
- ...R,
973
- dir: h.dir,
979
+ ...w,
980
+ dir: g.dir,
974
981
  orientation: "vertical",
975
982
  loop: r,
976
983
  currentTabStopId: y,
977
- onCurrentTabStopIdChange: P,
978
- onEntryFocus: S(m, (E) => {
979
- h.isUsingKeyboardRef.current || E.preventDefault();
984
+ onCurrentTabStopIdChange: _,
985
+ onEntryFocus: S(h, (b) => {
986
+ g.isUsingKeyboardRef.current || b.preventDefault();
980
987
  }),
981
988
  preventScrollOnEntryFocus: !0,
982
989
  children: /* @__PURE__ */ l(
@@ -984,33 +991,33 @@ var F = "MenuContent", [Hr, $e] = j(F), Gt = o.forwardRef(
984
991
  {
985
992
  role: "menu",
986
993
  "aria-orientation": "vertical",
987
- "data-state": tn(w.open),
994
+ "data-state": tn(p.open),
988
995
  "data-radix-menu-content": "",
989
- dir: h.dir,
990
- ...M,
996
+ dir: g.dir,
997
+ ...E,
991
998
  ...i,
992
- ref: _,
999
+ ref: P,
993
1000
  style: { outline: "none", ...i.style },
994
- onKeyDown: S(i.onKeyDown, (E) => {
995
- const A = E.target.closest("[data-radix-menu-content]") === E.currentTarget, G = E.ctrlKey || E.altKey || E.metaKey, re = E.key.length === 1;
996
- A && (E.key === "Tab" && E.preventDefault(), !G && re && Q(E.key));
1001
+ onKeyDown: S(i.onKeyDown, (b) => {
1002
+ const A = b.target.closest("[data-radix-menu-content]") === b.currentTarget, K = b.ctrlKey || b.altKey || b.metaKey, re = b.key.length === 1;
1003
+ A && (b.key === "Tab" && b.preventDefault(), !K && re && Q(b.key));
997
1004
  const oe = I.current;
998
- if (E.target !== oe || !Fr.includes(E.key))
1005
+ if (b.target !== oe || !Fr.includes(b.key))
999
1006
  return;
1000
- E.preventDefault();
1001
- const X = b().filter((B) => !B.disabled).map((B) => B.ref.current);
1002
- Dt.includes(E.key) && X.reverse(), no(X);
1007
+ b.preventDefault();
1008
+ const X = R().filter((B) => !B.disabled).map((B) => B.ref.current);
1009
+ Dt.includes(b.key) && X.reverse(), ro(X);
1003
1010
  }),
1004
- onBlur: S(e.onBlur, (E) => {
1005
- E.currentTarget.contains(E.target) || (window.clearTimeout(k.current), $.current = "");
1011
+ onBlur: S(e.onBlur, (b) => {
1012
+ b.currentTarget.contains(b.target) || (window.clearTimeout(k.current), U.current = "");
1006
1013
  }),
1007
1014
  onPointerMove: S(
1008
1015
  e.onPointerMove,
1009
- le((E) => {
1010
- const T = E.target, A = Z.current !== E.clientX;
1011
- if (E.currentTarget.contains(T) && A) {
1012
- const G = E.clientX > Z.current ? "right" : "left";
1013
- U.current = G, Z.current = E.clientX;
1016
+ le((b) => {
1017
+ const T = b.target, A = Z.current !== b.clientX;
1018
+ if (b.currentTarget.contains(T) && A) {
1019
+ const K = b.clientX > Z.current ? "right" : "left";
1020
+ $.current = K, Z.current = b.clientX;
1014
1021
  }
1015
1022
  })
1016
1023
  )
@@ -1026,84 +1033,84 @@ var F = "MenuContent", [Hr, $e] = j(F), Gt = o.forwardRef(
1026
1033
  );
1027
1034
  }
1028
1035
  );
1029
- Gt.displayName = F;
1030
- var Vr = "MenuGroup", Be = o.forwardRef(
1036
+ Kt.displayName = F;
1037
+ var jr = "MenuGroup", Ye = o.forwardRef(
1031
1038
  (e, t) => {
1032
1039
  const { __scopeMenu: n, ...r } = e;
1033
1040
  return /* @__PURE__ */ l(D.div, { role: "group", ...r, ref: t });
1034
1041
  }
1035
1042
  );
1036
- Be.displayName = Vr;
1037
- var jr = "MenuLabel", $t = o.forwardRef(
1043
+ Ye.displayName = jr;
1044
+ var zr = "MenuLabel", Ut = o.forwardRef(
1038
1045
  (e, t) => {
1039
1046
  const { __scopeMenu: n, ...r } = e;
1040
1047
  return /* @__PURE__ */ l(D.div, { ...r, ref: t });
1041
1048
  }
1042
1049
  );
1043
- $t.displayName = jr;
1044
- var we = "MenuItem", rt = "menu.itemSelect", Se = o.forwardRef(
1050
+ Ut.displayName = zr;
1051
+ var Ce = "MenuItem", rt = "menu.itemSelect", Se = o.forwardRef(
1045
1052
  (e, t) => {
1046
- const { disabled: n = !1, onSelect: r, ...a } = e, c = o.useRef(null), u = pe(we, e.__scopeMenu), s = $e(we, e.__scopeMenu), m = K(t, c), p = o.useRef(!1), v = () => {
1053
+ const { disabled: n = !1, onSelect: r, ...a } = e, c = o.useRef(null), u = me(Ce, e.__scopeMenu), s = $e(Ce, e.__scopeMenu), h = G(t, c), m = o.useRef(!1), f = () => {
1047
1054
  const d = c.current;
1048
1055
  if (!n && d) {
1049
- const g = new CustomEvent(rt, { bubbles: !0, cancelable: !0 });
1050
- d.addEventListener(rt, (C) => r == null ? void 0 : r(C), { once: !0 }), wn(d, g), g.defaultPrevented ? p.current = !1 : u.onClose();
1056
+ const v = new CustomEvent(rt, { bubbles: !0, cancelable: !0 });
1057
+ d.addEventListener(rt, (C) => r == null ? void 0 : r(C), { once: !0 }), wn(d, v), v.defaultPrevented ? m.current = !1 : u.onClose();
1051
1058
  }
1052
1059
  };
1053
1060
  return /* @__PURE__ */ l(
1054
- Ut,
1061
+ $t,
1055
1062
  {
1056
1063
  ...a,
1057
- ref: m,
1064
+ ref: h,
1058
1065
  disabled: n,
1059
- onClick: S(e.onClick, v),
1066
+ onClick: S(e.onClick, f),
1060
1067
  onPointerDown: (d) => {
1061
- var g;
1062
- (g = e.onPointerDown) == null || g.call(e, d), p.current = !0;
1068
+ var v;
1069
+ (v = e.onPointerDown) == null || v.call(e, d), m.current = !0;
1063
1070
  },
1064
1071
  onPointerUp: S(e.onPointerUp, (d) => {
1065
- var g;
1066
- p.current || (g = d.currentTarget) == null || g.click();
1072
+ var v;
1073
+ m.current || (v = d.currentTarget) == null || v.click();
1067
1074
  }),
1068
1075
  onKeyDown: S(e.onKeyDown, (d) => {
1069
- const g = s.searchRef.current !== "";
1070
- n || g && d.key === " " || Fe.includes(d.key) && (d.currentTarget.click(), d.preventDefault());
1076
+ const v = s.searchRef.current !== "";
1077
+ n || v && d.key === " " || ke.includes(d.key) && (d.currentTarget.click(), d.preventDefault());
1071
1078
  })
1072
1079
  }
1073
1080
  );
1074
1081
  }
1075
1082
  );
1076
- Se.displayName = we;
1077
- var Ut = o.forwardRef(
1083
+ Se.displayName = Ce;
1084
+ var $t = o.forwardRef(
1078
1085
  (e, t) => {
1079
- const { __scopeMenu: n, disabled: r = !1, textValue: a, ...c } = e, u = $e(we, n), s = Ft(n), m = o.useRef(null), p = K(t, m), [v, d] = o.useState(!1), [g, C] = o.useState("");
1086
+ const { __scopeMenu: n, disabled: r = !1, textValue: a, ...c } = e, u = $e(Ce, n), s = Ft(n), h = o.useRef(null), m = G(t, h), [f, d] = o.useState(!1), [v, C] = o.useState("");
1080
1087
  return o.useEffect(() => {
1081
- const f = m.current;
1082
- f && C((f.textContent ?? "").trim());
1088
+ const M = h.current;
1089
+ M && C((M.textContent ?? "").trim());
1083
1090
  }, [c.children]), /* @__PURE__ */ l(
1084
1091
  ue.ItemSlot,
1085
1092
  {
1086
1093
  scope: n,
1087
1094
  disabled: r,
1088
- textValue: a ?? g,
1095
+ textValue: a ?? v,
1089
1096
  children: /* @__PURE__ */ l(Cr, { asChild: !0, ...s, focusable: !r, children: /* @__PURE__ */ l(
1090
1097
  D.div,
1091
1098
  {
1092
1099
  role: "menuitem",
1093
- "data-highlighted": v ? "" : void 0,
1100
+ "data-highlighted": f ? "" : void 0,
1094
1101
  "aria-disabled": r || void 0,
1095
1102
  "data-disabled": r ? "" : void 0,
1096
1103
  ...c,
1097
- ref: p,
1104
+ ref: m,
1098
1105
  onPointerMove: S(
1099
1106
  e.onPointerMove,
1100
- le((f) => {
1101
- r ? u.onItemLeave(f) : (u.onItemEnter(f), f.defaultPrevented || f.currentTarget.focus({ preventScroll: !0 }));
1107
+ le((M) => {
1108
+ r ? u.onItemLeave(M) : (u.onItemEnter(M), M.defaultPrevented || M.currentTarget.focus({ preventScroll: !0 }));
1102
1109
  })
1103
1110
  ),
1104
1111
  onPointerLeave: S(
1105
1112
  e.onPointerLeave,
1106
- le((f) => u.onItemLeave(f))
1113
+ le((M) => u.onItemLeave(M))
1107
1114
  ),
1108
1115
  onFocus: S(e.onFocus, () => d(!0)),
1109
1116
  onBlur: S(e.onBlur, () => d(!1))
@@ -1112,41 +1119,41 @@ var Ut = o.forwardRef(
1112
1119
  }
1113
1120
  );
1114
1121
  }
1115
- ), zr = "MenuCheckboxItem", Bt = o.forwardRef(
1122
+ ), Zr = "MenuCheckboxItem", Bt = o.forwardRef(
1116
1123
  (e, t) => {
1117
1124
  const { checked: n = !1, onCheckedChange: r, ...a } = e;
1118
1125
  return /* @__PURE__ */ l(Vt, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ l(
1119
1126
  Se,
1120
1127
  {
1121
1128
  role: "menuitemcheckbox",
1122
- "aria-checked": Ce(n) ? "mixed" : n,
1129
+ "aria-checked": Me(n) ? "mixed" : n,
1123
1130
  ...a,
1124
1131
  ref: t,
1125
- "data-state": He(n),
1132
+ "data-state": We(n),
1126
1133
  onSelect: S(
1127
1134
  a.onSelect,
1128
- () => r == null ? void 0 : r(Ce(n) ? !0 : !n),
1135
+ () => r == null ? void 0 : r(Me(n) ? !0 : !n),
1129
1136
  { checkForDefaultPrevented: !1 }
1130
1137
  )
1131
1138
  }
1132
1139
  ) });
1133
1140
  }
1134
1141
  );
1135
- Bt.displayName = zr;
1136
- var Yt = "MenuRadioGroup", [Zr, qr] = j(
1142
+ Bt.displayName = Zr;
1143
+ var Yt = "MenuRadioGroup", [qr, Qr] = j(
1137
1144
  Yt,
1138
1145
  { value: void 0, onValueChange: () => {
1139
1146
  } }
1140
1147
  ), Ht = o.forwardRef(
1141
1148
  (e, t) => {
1142
1149
  const { value: n, onValueChange: r, ...a } = e, c = ne(r);
1143
- return /* @__PURE__ */ l(Zr, { scope: e.__scopeMenu, value: n, onValueChange: c, children: /* @__PURE__ */ l(Be, { ...a, ref: t }) });
1150
+ return /* @__PURE__ */ l(qr, { scope: e.__scopeMenu, value: n, onValueChange: c, children: /* @__PURE__ */ l(Ye, { ...a, ref: t }) });
1144
1151
  }
1145
1152
  );
1146
1153
  Ht.displayName = Yt;
1147
1154
  var Wt = "MenuRadioItem", Xt = o.forwardRef(
1148
1155
  (e, t) => {
1149
- const { value: n, ...r } = e, a = qr(Wt, e.__scopeMenu), c = n === a.value;
1156
+ const { value: n, ...r } = e, a = Qr(Wt, e.__scopeMenu), c = n === a.value;
1150
1157
  return /* @__PURE__ */ l(Vt, { scope: e.__scopeMenu, checked: c, children: /* @__PURE__ */ l(
1151
1158
  Se,
1152
1159
  {
@@ -1154,7 +1161,7 @@ var Wt = "MenuRadioItem", Xt = o.forwardRef(
1154
1161
  "aria-checked": c,
1155
1162
  ...r,
1156
1163
  ref: t,
1157
- "data-state": He(c),
1164
+ "data-state": We(c),
1158
1165
  onSelect: S(
1159
1166
  r.onSelect,
1160
1167
  () => {
@@ -1168,30 +1175,30 @@ var Wt = "MenuRadioItem", Xt = o.forwardRef(
1168
1175
  }
1169
1176
  );
1170
1177
  Xt.displayName = Wt;
1171
- var Ye = "MenuItemIndicator", [Vt, Qr] = j(
1172
- Ye,
1178
+ var He = "MenuItemIndicator", [Vt, Jr] = j(
1179
+ He,
1173
1180
  { checked: !1 }
1174
1181
  ), jt = o.forwardRef(
1175
1182
  (e, t) => {
1176
- const { __scopeMenu: n, forceMount: r, ...a } = e, c = Qr(Ye, n);
1183
+ const { __scopeMenu: n, forceMount: r, ...a } = e, c = Jr(He, n);
1177
1184
  return /* @__PURE__ */ l(
1178
- Me,
1185
+ Ee,
1179
1186
  {
1180
- present: r || Ce(c.checked) || c.checked === !0,
1187
+ present: r || Me(c.checked) || c.checked === !0,
1181
1188
  children: /* @__PURE__ */ l(
1182
1189
  D.span,
1183
1190
  {
1184
1191
  ...a,
1185
1192
  ref: t,
1186
- "data-state": He(c.checked)
1193
+ "data-state": We(c.checked)
1187
1194
  }
1188
1195
  )
1189
1196
  }
1190
1197
  );
1191
1198
  }
1192
1199
  );
1193
- jt.displayName = Ye;
1194
- var Jr = "MenuSeparator", zt = o.forwardRef(
1200
+ jt.displayName = He;
1201
+ var eo = "MenuSeparator", zt = o.forwardRef(
1195
1202
  (e, t) => {
1196
1203
  const { __scopeMenu: n, ...r } = e;
1197
1204
  return /* @__PURE__ */ l(
@@ -1205,26 +1212,26 @@ var Jr = "MenuSeparator", zt = o.forwardRef(
1205
1212
  );
1206
1213
  }
1207
1214
  );
1208
- zt.displayName = Jr;
1209
- var eo = "MenuArrow", Zt = o.forwardRef(
1215
+ zt.displayName = eo;
1216
+ var to = "MenuArrow", Zt = o.forwardRef(
1210
1217
  (e, t) => {
1211
1218
  const { __scopeMenu: n, ...r } = e, a = be(n);
1212
1219
  return /* @__PURE__ */ l(sr, { ...a, ...r, ref: t });
1213
1220
  }
1214
1221
  );
1215
- Zt.displayName = eo;
1216
- var to = "MenuSub", [Qo, qt] = j(to), ie = "MenuSubTrigger", Qt = o.forwardRef(
1222
+ Zt.displayName = to;
1223
+ var no = "MenuSub", [Jo, qt] = j(no), ie = "MenuSubTrigger", Qt = o.forwardRef(
1217
1224
  (e, t) => {
1218
- const n = z(ie, e.__scopeMenu), r = pe(ie, e.__scopeMenu), a = qt(ie, e.__scopeMenu), c = $e(ie, e.__scopeMenu), u = o.useRef(null), { pointerGraceTimerRef: s, onPointerGraceIntentChange: m } = c, p = { __scopeMenu: e.__scopeMenu }, v = o.useCallback(() => {
1225
+ const n = z(ie, e.__scopeMenu), r = me(ie, e.__scopeMenu), a = qt(ie, e.__scopeMenu), c = $e(ie, e.__scopeMenu), u = o.useRef(null), { pointerGraceTimerRef: s, onPointerGraceIntentChange: h } = c, m = { __scopeMenu: e.__scopeMenu }, f = o.useCallback(() => {
1219
1226
  u.current && window.clearTimeout(u.current), u.current = null;
1220
1227
  }, []);
1221
- return o.useEffect(() => v, [v]), o.useEffect(() => {
1228
+ return o.useEffect(() => f, [f]), o.useEffect(() => {
1222
1229
  const d = s.current;
1223
1230
  return () => {
1224
- window.clearTimeout(d), m(null);
1231
+ window.clearTimeout(d), h(null);
1225
1232
  };
1226
- }, [s, m]), /* @__PURE__ */ l(Ke, { asChild: !0, ...p, children: /* @__PURE__ */ l(
1227
- Ut,
1233
+ }, [s, h]), /* @__PURE__ */ l(Ke, { asChild: !0, ...m, children: /* @__PURE__ */ l(
1234
+ $t,
1228
1235
  {
1229
1236
  id: a.triggerId,
1230
1237
  "aria-haspopup": "menu",
@@ -1234,34 +1241,34 @@ var to = "MenuSub", [Qo, qt] = j(to), ie = "MenuSubTrigger", Qt = o.forwardRef(
1234
1241
  ...e,
1235
1242
  ref: at(t, a.onTriggerChange),
1236
1243
  onClick: (d) => {
1237
- var g;
1238
- (g = e.onClick) == null || g.call(e, d), !(e.disabled || d.defaultPrevented) && (d.currentTarget.focus(), n.open || n.onOpenChange(!0));
1244
+ var v;
1245
+ (v = e.onClick) == null || v.call(e, d), !(e.disabled || d.defaultPrevented) && (d.currentTarget.focus(), n.open || n.onOpenChange(!0));
1239
1246
  },
1240
1247
  onPointerMove: S(
1241
1248
  e.onPointerMove,
1242
1249
  le((d) => {
1243
1250
  c.onItemEnter(d), !d.defaultPrevented && !e.disabled && !n.open && !u.current && (c.onPointerGraceIntentChange(null), u.current = window.setTimeout(() => {
1244
- n.onOpenChange(!0), v();
1251
+ n.onOpenChange(!0), f();
1245
1252
  }, 100));
1246
1253
  })
1247
1254
  ),
1248
1255
  onPointerLeave: S(
1249
1256
  e.onPointerLeave,
1250
1257
  le((d) => {
1251
- var C, f;
1252
- v();
1253
- const g = (C = n.content) == null ? void 0 : C.getBoundingClientRect();
1254
- if (g) {
1255
- const i = (f = n.content) == null ? void 0 : f.dataset.side, w = i === "right", h = w ? -5 : 5, M = g[w ? "left" : "right"], R = g[w ? "right" : "left"];
1258
+ var C, M;
1259
+ f();
1260
+ const v = (C = n.content) == null ? void 0 : C.getBoundingClientRect();
1261
+ if (v) {
1262
+ const i = (M = n.content) == null ? void 0 : M.dataset.side, p = i === "right", g = p ? -5 : 5, E = v[p ? "left" : "right"], w = v[p ? "right" : "left"];
1256
1263
  c.onPointerGraceIntentChange({
1257
1264
  area: [
1258
1265
  // Apply a bleed on clientX to ensure that our exit point is
1259
1266
  // consistently within polygon bounds
1260
- { x: d.clientX + h, y: d.clientY },
1261
- { x: M, y: g.top },
1262
- { x: R, y: g.top },
1263
- { x: R, y: g.bottom },
1264
- { x: M, y: g.bottom }
1267
+ { x: d.clientX + g, y: d.clientY },
1268
+ { x: E, y: v.top },
1269
+ { x: w, y: v.top },
1270
+ { x: w, y: v.bottom },
1271
+ { x: E, y: v.bottom }
1265
1272
  ],
1266
1273
  side: i
1267
1274
  }), window.clearTimeout(s.current), s.current = window.setTimeout(
@@ -1277,8 +1284,8 @@ var to = "MenuSub", [Qo, qt] = j(to), ie = "MenuSubTrigger", Qt = o.forwardRef(
1277
1284
  ),
1278
1285
  onKeyDown: S(e.onKeyDown, (d) => {
1279
1286
  var C;
1280
- const g = c.searchRef.current !== "";
1281
- e.disabled || g && d.key === " " || kr[r.dir].includes(d.key) && (n.onOpenChange(!0), (C = n.content) == null || C.focus(), d.preventDefault());
1287
+ const v = c.searchRef.current !== "";
1288
+ e.disabled || v && d.key === " " || kr[r.dir].includes(d.key) && (n.onOpenChange(!0), (C = n.content) == null || C.focus(), d.preventDefault());
1282
1289
  })
1283
1290
  }
1284
1291
  ) });
@@ -1287,34 +1294,34 @@ var to = "MenuSub", [Qo, qt] = j(to), ie = "MenuSubTrigger", Qt = o.forwardRef(
1287
1294
  Qt.displayName = ie;
1288
1295
  var Jt = "MenuSubContent", en = o.forwardRef(
1289
1296
  (e, t) => {
1290
- const n = Lt(F, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, c = z(F, e.__scopeMenu), u = pe(F, e.__scopeMenu), s = qt(Jt, e.__scopeMenu), m = o.useRef(null), p = K(t, m);
1291
- return /* @__PURE__ */ l(ue.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l(Me, { present: r || c.open, children: /* @__PURE__ */ l(ue.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ l(
1292
- Ue,
1297
+ const n = Lt(F, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, c = z(F, e.__scopeMenu), u = me(F, e.__scopeMenu), s = qt(Jt, e.__scopeMenu), h = o.useRef(null), m = G(t, h);
1298
+ return /* @__PURE__ */ l(ue.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l(Ee, { present: r || c.open, children: /* @__PURE__ */ l(ue.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ l(
1299
+ Be,
1293
1300
  {
1294
1301
  id: s.contentId,
1295
1302
  "aria-labelledby": s.triggerId,
1296
1303
  ...a,
1297
- ref: p,
1304
+ ref: m,
1298
1305
  align: "start",
1299
1306
  side: u.dir === "rtl" ? "left" : "right",
1300
1307
  disableOutsidePointerEvents: !1,
1301
1308
  disableOutsideScroll: !1,
1302
1309
  trapFocus: !1,
1303
- onOpenAutoFocus: (v) => {
1310
+ onOpenAutoFocus: (f) => {
1304
1311
  var d;
1305
- u.isUsingKeyboardRef.current && ((d = m.current) == null || d.focus()), v.preventDefault();
1312
+ u.isUsingKeyboardRef.current && ((d = h.current) == null || d.focus()), f.preventDefault();
1306
1313
  },
1307
- onCloseAutoFocus: (v) => v.preventDefault(),
1308
- onFocusOutside: S(e.onFocusOutside, (v) => {
1309
- v.target !== s.trigger && c.onOpenChange(!1);
1314
+ onCloseAutoFocus: (f) => f.preventDefault(),
1315
+ onFocusOutside: S(e.onFocusOutside, (f) => {
1316
+ f.target !== s.trigger && c.onOpenChange(!1);
1310
1317
  }),
1311
- onEscapeKeyDown: S(e.onEscapeKeyDown, (v) => {
1312
- u.onClose(), v.preventDefault();
1318
+ onEscapeKeyDown: S(e.onEscapeKeyDown, (f) => {
1319
+ u.onClose(), f.preventDefault();
1313
1320
  }),
1314
- onKeyDown: S(e.onKeyDown, (v) => {
1321
+ onKeyDown: S(e.onKeyDown, (f) => {
1315
1322
  var C;
1316
- const d = v.currentTarget.contains(v.target), g = Lr[u.dir].includes(v.key);
1317
- d && g && (c.onOpenChange(!1), (C = s.trigger) == null || C.focus(), v.preventDefault());
1323
+ const d = f.currentTarget.contains(f.target), v = Lr[u.dir].includes(f.key);
1324
+ d && v && (c.onOpenChange(!1), (C = s.trigger) == null || C.focus(), f.preventDefault());
1318
1325
  })
1319
1326
  }
1320
1327
  ) }) }) });
@@ -1324,52 +1331,52 @@ en.displayName = Jt;
1324
1331
  function tn(e) {
1325
1332
  return e ? "open" : "closed";
1326
1333
  }
1327
- function Ce(e) {
1334
+ function Me(e) {
1328
1335
  return e === "indeterminate";
1329
1336
  }
1330
- function He(e) {
1331
- return Ce(e) ? "indeterminate" : e ? "checked" : "unchecked";
1337
+ function We(e) {
1338
+ return Me(e) ? "indeterminate" : e ? "checked" : "unchecked";
1332
1339
  }
1333
- function no(e) {
1340
+ function ro(e) {
1334
1341
  const t = document.activeElement;
1335
1342
  for (const n of e)
1336
1343
  if (n === t || (n.focus(), document.activeElement !== t))
1337
1344
  return;
1338
1345
  }
1339
- function ro(e, t) {
1346
+ function oo(e, t) {
1340
1347
  return e.map((n, r) => e[(t + r) % e.length]);
1341
1348
  }
1342
- function oo(e, t, n) {
1343
- const a = t.length > 1 && Array.from(t).every((p) => p === t[0]) ? t[0] : t, c = n ? e.indexOf(n) : -1;
1344
- let u = ro(e, Math.max(c, 0));
1345
- a.length === 1 && (u = u.filter((p) => p !== n));
1346
- const m = u.find(
1347
- (p) => p.toLowerCase().startsWith(a.toLowerCase())
1349
+ function ao(e, t, n) {
1350
+ const a = t.length > 1 && Array.from(t).every((m) => m === t[0]) ? t[0] : t, c = n ? e.indexOf(n) : -1;
1351
+ let u = oo(e, Math.max(c, 0));
1352
+ a.length === 1 && (u = u.filter((m) => m !== n));
1353
+ const h = u.find(
1354
+ (m) => m.toLowerCase().startsWith(a.toLowerCase())
1348
1355
  );
1349
- return m !== n ? m : void 0;
1356
+ return h !== n ? h : void 0;
1350
1357
  }
1351
- function ao(e, t) {
1358
+ function co(e, t) {
1352
1359
  const { x: n, y: r } = e;
1353
1360
  let a = !1;
1354
1361
  for (let c = 0, u = t.length - 1; c < t.length; u = c++) {
1355
- const s = t[c].x, m = t[c].y, p = t[u].x, v = t[u].y;
1356
- m > r != v > r && n < (p - s) * (r - m) / (v - m) + s && (a = !a);
1362
+ const s = t[c], h = t[u], m = s.x, f = s.y, d = h.x, v = h.y;
1363
+ f > r != v > r && n < (d - m) * (r - f) / (v - f) + m && (a = !a);
1357
1364
  }
1358
1365
  return a;
1359
1366
  }
1360
- function co(e, t) {
1367
+ function so(e, t) {
1361
1368
  if (!t)
1362
1369
  return !1;
1363
1370
  const n = { x: e.clientX, y: e.clientY };
1364
- return ao(n, t);
1371
+ return co(n, t);
1365
1372
  }
1366
1373
  function le(e) {
1367
1374
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
1368
1375
  }
1369
- var so = kt, io = Ke, uo = Kt, lo = Gt, fo = Be, po = $t, mo = Se, vo = Bt, ho = Ht, go = Xt, wo = jt, Co = zt, Mo = Zt, Eo = Qt, Ro = en, We = "DropdownMenu", [bo, Jo] = de(
1370
- We,
1376
+ var io = kt, uo = Ke, lo = Gt, fo = Kt, po = Ye, mo = Ut, vo = Se, ho = Bt, go = Ht, wo = Xt, Co = jt, Mo = zt, Eo = Zt, Ro = Qt, bo = en, ye = "DropdownMenu", [So, ea] = de(
1377
+ ye,
1371
1378
  [Ot]
1372
- ), x = Ot(), [So, nn] = bo(We), rn = (e) => {
1379
+ ), x = Ot(), [yo, nn] = So(ye), rn = (e) => {
1373
1380
  const {
1374
1381
  __scopeDropdownMenu: t,
1375
1382
  children: n,
@@ -1378,31 +1385,32 @@ var so = kt, io = Ke, uo = Kt, lo = Gt, fo = Be, po = $t, mo = Se, vo = Bt, ho =
1378
1385
  defaultOpen: c,
1379
1386
  onOpenChange: u,
1380
1387
  modal: s = !0
1381
- } = e, m = x(t), p = o.useRef(null), [v = !1, d] = ot({
1388
+ } = e, h = x(t), m = o.useRef(null), [f, d] = ot({
1382
1389
  prop: a,
1383
- defaultProp: c,
1384
- onChange: u
1390
+ defaultProp: c ?? !1,
1391
+ onChange: u,
1392
+ caller: ye
1385
1393
  });
1386
1394
  return /* @__PURE__ */ l(
1387
- So,
1395
+ yo,
1388
1396
  {
1389
1397
  scope: t,
1390
- triggerId: Ne(),
1391
- triggerRef: p,
1392
- contentId: Ne(),
1393
- open: v,
1398
+ triggerId: De(),
1399
+ triggerRef: m,
1400
+ contentId: De(),
1401
+ open: f,
1394
1402
  onOpenChange: d,
1395
- onOpenToggle: o.useCallback(() => d((g) => !g), [d]),
1403
+ onOpenToggle: o.useCallback(() => d((v) => !v), [d]),
1396
1404
  modal: s,
1397
- children: /* @__PURE__ */ l(so, { ...m, open: v, onOpenChange: d, dir: r, modal: s, children: n })
1405
+ children: /* @__PURE__ */ l(io, { ...h, open: f, onOpenChange: d, dir: r, modal: s, children: n })
1398
1406
  }
1399
1407
  );
1400
1408
  };
1401
- rn.displayName = We;
1409
+ rn.displayName = ye;
1402
1410
  var on = "DropdownMenuTrigger", an = o.forwardRef(
1403
1411
  (e, t) => {
1404
1412
  const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = e, c = nn(on, n), u = x(n);
1405
- return /* @__PURE__ */ l(io, { asChild: !0, ...u, children: /* @__PURE__ */ l(
1413
+ return /* @__PURE__ */ l(uo, { asChild: !0, ...u, children: /* @__PURE__ */ l(
1406
1414
  D.button,
1407
1415
  {
1408
1416
  type: "button",
@@ -1426,16 +1434,16 @@ var on = "DropdownMenuTrigger", an = o.forwardRef(
1426
1434
  }
1427
1435
  );
1428
1436
  an.displayName = on;
1429
- var yo = "DropdownMenuPortal", cn = (e) => {
1437
+ var _o = "DropdownMenuPortal", cn = (e) => {
1430
1438
  const { __scopeDropdownMenu: t, ...n } = e, r = x(t);
1431
- return /* @__PURE__ */ l(uo, { ...r, ...n });
1439
+ return /* @__PURE__ */ l(lo, { ...r, ...n });
1432
1440
  };
1433
- cn.displayName = yo;
1441
+ cn.displayName = _o;
1434
1442
  var sn = "DropdownMenuContent", un = o.forwardRef(
1435
1443
  (e, t) => {
1436
1444
  const { __scopeDropdownMenu: n, ...r } = e, a = nn(sn, n), c = x(n), u = o.useRef(!1);
1437
1445
  return /* @__PURE__ */ l(
1438
- lo,
1446
+ fo,
1439
1447
  {
1440
1448
  id: a.contentId,
1441
1449
  "aria-labelledby": a.triggerId,
@@ -1443,12 +1451,12 @@ var sn = "DropdownMenuContent", un = o.forwardRef(
1443
1451
  ...r,
1444
1452
  ref: t,
1445
1453
  onCloseAutoFocus: S(e.onCloseAutoFocus, (s) => {
1446
- var m;
1447
- u.current || (m = a.triggerRef.current) == null || m.focus(), u.current = !1, s.preventDefault();
1454
+ var h;
1455
+ u.current || (h = a.triggerRef.current) == null || h.focus(), u.current = !1, s.preventDefault();
1448
1456
  }),
1449
1457
  onInteractOutside: S(e.onInteractOutside, (s) => {
1450
- const m = s.detail.originalEvent, p = m.button === 0 && m.ctrlKey === !0, v = m.button === 2 || p;
1451
- (!a.modal || v) && (u.current = !0);
1458
+ const h = s.detail.originalEvent, m = h.button === 0 && h.ctrlKey === !0, f = h.button === 2 || m;
1459
+ (!a.modal || f) && (u.current = !0);
1452
1460
  }),
1453
1461
  style: {
1454
1462
  ...e.style,
@@ -1463,68 +1471,68 @@ var sn = "DropdownMenuContent", un = o.forwardRef(
1463
1471
  }
1464
1472
  );
1465
1473
  un.displayName = sn;
1466
- var _o = "DropdownMenuGroup", ln = o.forwardRef(
1474
+ var Po = "DropdownMenuGroup", ln = o.forwardRef(
1467
1475
  (e, t) => {
1468
1476
  const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1469
- return /* @__PURE__ */ l(fo, { ...a, ...r, ref: t });
1477
+ return /* @__PURE__ */ l(po, { ...a, ...r, ref: t });
1470
1478
  }
1471
1479
  );
1472
- ln.displayName = _o;
1473
- var Po = "DropdownMenuLabel", Io = o.forwardRef(
1480
+ ln.displayName = Po;
1481
+ var Io = "DropdownMenuLabel", Ao = o.forwardRef(
1474
1482
  (e, t) => {
1475
1483
  const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1476
- return /* @__PURE__ */ l(po, { ...a, ...r, ref: t });
1484
+ return /* @__PURE__ */ l(mo, { ...a, ...r, ref: t });
1477
1485
  }
1478
1486
  );
1479
- Io.displayName = Po;
1480
- var Ao = "DropdownMenuItem", dn = o.forwardRef(
1487
+ Ao.displayName = Io;
1488
+ var xo = "DropdownMenuItem", dn = o.forwardRef(
1481
1489
  (e, t) => {
1482
1490
  const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1483
- return /* @__PURE__ */ l(mo, { ...a, ...r, ref: t });
1491
+ return /* @__PURE__ */ l(vo, { ...a, ...r, ref: t });
1484
1492
  }
1485
1493
  );
1486
- dn.displayName = Ao;
1487
- var xo = "DropdownMenuCheckboxItem", To = o.forwardRef((e, t) => {
1488
- const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1489
- return /* @__PURE__ */ l(vo, { ...a, ...r, ref: t });
1490
- });
1491
- To.displayName = xo;
1492
- var No = "DropdownMenuRadioGroup", Do = o.forwardRef((e, t) => {
1494
+ dn.displayName = xo;
1495
+ var To = "DropdownMenuCheckboxItem", No = o.forwardRef((e, t) => {
1493
1496
  const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1494
1497
  return /* @__PURE__ */ l(ho, { ...a, ...r, ref: t });
1495
1498
  });
1496
- Do.displayName = No;
1497
- var Oo = "DropdownMenuRadioItem", Fo = o.forwardRef((e, t) => {
1499
+ No.displayName = To;
1500
+ var Do = "DropdownMenuRadioGroup", Oo = o.forwardRef((e, t) => {
1498
1501
  const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1499
1502
  return /* @__PURE__ */ l(go, { ...a, ...r, ref: t });
1500
1503
  });
1501
- Fo.displayName = Oo;
1502
- var ko = "DropdownMenuItemIndicator", Lo = o.forwardRef((e, t) => {
1504
+ Oo.displayName = Do;
1505
+ var Fo = "DropdownMenuRadioItem", ko = o.forwardRef((e, t) => {
1503
1506
  const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1504
1507
  return /* @__PURE__ */ l(wo, { ...a, ...r, ref: t });
1505
1508
  });
1506
- Lo.displayName = ko;
1507
- var Ko = "DropdownMenuSeparator", fn = o.forwardRef((e, t) => {
1509
+ ko.displayName = Fo;
1510
+ var Lo = "DropdownMenuItemIndicator", Go = o.forwardRef((e, t) => {
1508
1511
  const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1509
1512
  return /* @__PURE__ */ l(Co, { ...a, ...r, ref: t });
1510
1513
  });
1514
+ Go.displayName = Lo;
1515
+ var Ko = "DropdownMenuSeparator", fn = o.forwardRef((e, t) => {
1516
+ const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1517
+ return /* @__PURE__ */ l(Mo, { ...a, ...r, ref: t });
1518
+ });
1511
1519
  fn.displayName = Ko;
1512
- var Go = "DropdownMenuArrow", $o = o.forwardRef(
1520
+ var Uo = "DropdownMenuArrow", $o = o.forwardRef(
1513
1521
  (e, t) => {
1514
1522
  const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1515
- return /* @__PURE__ */ l(Mo, { ...a, ...r, ref: t });
1523
+ return /* @__PURE__ */ l(Eo, { ...a, ...r, ref: t });
1516
1524
  }
1517
1525
  );
1518
- $o.displayName = Go;
1519
- var Uo = "DropdownMenuSubTrigger", Bo = o.forwardRef((e, t) => {
1526
+ $o.displayName = Uo;
1527
+ var Bo = "DropdownMenuSubTrigger", Yo = o.forwardRef((e, t) => {
1520
1528
  const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1521
- return /* @__PURE__ */ l(Eo, { ...a, ...r, ref: t });
1529
+ return /* @__PURE__ */ l(Ro, { ...a, ...r, ref: t });
1522
1530
  });
1523
- Bo.displayName = Uo;
1524
- var Yo = "DropdownMenuSubContent", Ho = o.forwardRef((e, t) => {
1531
+ Yo.displayName = Bo;
1532
+ var Ho = "DropdownMenuSubContent", Wo = o.forwardRef((e, t) => {
1525
1533
  const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1526
1534
  return /* @__PURE__ */ l(
1527
- Ro,
1535
+ bo,
1528
1536
  {
1529
1537
  ...a,
1530
1538
  ...r,
@@ -1540,17 +1548,17 @@ var Yo = "DropdownMenuSubContent", Ho = o.forwardRef((e, t) => {
1540
1548
  }
1541
1549
  );
1542
1550
  });
1543
- Ho.displayName = Yo;
1544
- var ea = rn, ta = an, na = cn, ra = un, oa = ln, aa = dn, ca = fn;
1551
+ Wo.displayName = Ho;
1552
+ var ta = rn, na = an, ra = cn, oa = un, aa = ln, ca = dn, sa = fn;
1545
1553
  export {
1546
- ra as C,
1554
+ oa as C,
1547
1555
  ut as F,
1548
- oa as G,
1549
- aa as I,
1550
- na as P,
1551
- ea as R,
1552
- ca as S,
1553
- ta as T,
1556
+ aa as G,
1557
+ ca as I,
1558
+ ra as P,
1559
+ ta as R,
1560
+ sa as S,
1561
+ na as T,
1554
1562
  Dr as a,
1555
1563
  ct as b,
1556
1564
  Bn as u