@iress-oss/ids-components 5.15.0 → 5.16.0

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 (198) hide show
  1. package/README.md +1 -1
  2. package/dist/{AutocompleteNoResults-CvhIxKQI.js → AutocompleteNoResults-D7YVtBHi.js} +1 -1
  3. package/dist/{ComboboxHiddenInput-B7ztqo0l.js → ComboboxHiddenInput-CzqAhHnZ.js} +5 -5
  4. package/dist/{FieldAppendToLabel-DgXoSKDG.js → FieldAppendToLabel-CMgTenh1.js} +4 -4
  5. package/dist/{InputBase-nWIFJcGj.js → InputBase-Bjj3LDLa.js} +1 -1
  6. package/dist/Loading.module-BU91nTNp.js +13 -0
  7. package/dist/LoadingSuspense-D0TO0TDT.js +5666 -0
  8. package/dist/LogoFromSrc-_ACFUgYc.js +59 -0
  9. package/dist/MenuItem.module-aggbBK2E.js +24 -0
  10. package/dist/Popover.module-B2pz2c2y.js +11 -0
  11. package/dist/PopoverProvider-Cw5-iAgZ.js +137 -0
  12. package/dist/{SelectControl-CYKkf3rM.js → SelectControl-CN6caR5z.js} +1 -1
  13. package/dist/SlideoutProvider-CQh140HM.js +200 -0
  14. package/dist/{SliderTicks-Dqz-k-xS.js → SliderTicks-Dfw5LJ8X.js} +1 -1
  15. package/dist/TabSet.module-yK1UoG-L.js +13 -0
  16. package/dist/Table.module-BgIez5R-.js +32 -0
  17. package/dist/components/Alert/Alert.js +1 -1
  18. package/dist/components/Alert/index.js +1 -1
  19. package/dist/components/Autocomplete/Autocomplete.js +4 -4
  20. package/dist/components/Autocomplete/components/AutocompleteNoResults.js +1 -1
  21. package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +100 -85
  22. package/dist/components/Autocomplete/index.js +1 -1
  23. package/dist/components/Badge/Badge.js +4 -4
  24. package/dist/components/Button/Button.js +2 -2
  25. package/dist/components/Button/CloseButton/CloseButton.js +1 -1
  26. package/dist/components/Button/index.js +1 -1
  27. package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
  28. package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +1 -1
  29. package/dist/components/ButtonGroup/index.js +1 -1
  30. package/dist/components/Checkbox/Checkbox.js +1 -1
  31. package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +1 -1
  32. package/dist/components/Checkbox/index.js +1 -1
  33. package/dist/components/CheckboxGroup/CheckboxGroup.js +6 -6
  34. package/dist/components/CheckboxMark/CheckboxMark.types.js +2 -2
  35. package/dist/components/Combobox/Combobox.js +4 -4
  36. package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +4 -4
  37. package/dist/components/Combobox/components/ComboboxHiddenInput.js +1 -1
  38. package/dist/components/Combobox/components/ComboboxResults.js +5 -5
  39. package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +3 -3
  40. package/dist/components/Combobox/index.js +1 -1
  41. package/dist/components/Expander/Expander.js +1 -1
  42. package/dist/components/Field/Field.js +1 -1
  43. package/dist/components/Field/FieldGroup/FieldGroup.js +2 -2
  44. package/dist/components/Field/components/FieldAppendToLabel.js +4 -4
  45. package/dist/components/Filter/Filter.js +4 -4
  46. package/dist/components/Filter/components/FilterResetButton.js +3 -3
  47. package/dist/components/Filter/components/FilterSearch.js +3 -3
  48. package/dist/components/Filter/index.js +1 -1
  49. package/dist/components/Form/Form.js +1 -1
  50. package/dist/components/Form/FormField/FormField.js +3 -3
  51. package/dist/components/Form/FormField/FormFieldset.js +3 -3
  52. package/dist/components/Form/HookForm/HookForm.js +1 -1
  53. package/dist/components/Form/index.js +1 -1
  54. package/dist/components/Hide/Hide.js +1 -1
  55. package/dist/components/Hide/helpers/composeHideClasses.js +3 -3
  56. package/dist/components/Hide/index.js +1 -1
  57. package/dist/components/Icon/Icon.js +3 -3
  58. package/dist/components/Icon/index.js +1 -1
  59. package/dist/components/Inline/Inline.js +3 -3
  60. package/dist/components/Inline/index.js +1 -1
  61. package/dist/components/Input/ClearButton/ClearButton.js +1 -1
  62. package/dist/components/Input/Input.js +2 -2
  63. package/dist/components/Input/InputBase/InputBase.js +1 -1
  64. package/dist/components/Input/index.js +1 -1
  65. package/dist/components/InputCurrency/InputCurrency.js +1 -1
  66. package/dist/components/InputCurrency/index.js +1 -1
  67. package/dist/components/Label/LabelBase/LabelBase.js +1 -1
  68. package/dist/components/Menu/Menu.js +1 -1
  69. package/dist/components/Menu/MenuDivider/MenuDivider.js +3 -3
  70. package/dist/components/Menu/MenuHeading/MenuHeading.js +2 -2
  71. package/dist/components/Menu/MenuItem/MenuItem.js +1 -1
  72. package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +1 -1
  73. package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +2 -2
  74. package/dist/components/Menu/MenuText/MenuText.js +4 -4
  75. package/dist/components/Menu/helpers/mapMenuItems.js +1 -1
  76. package/dist/components/Menu/hooks/useMenuStyles.js +3 -3
  77. package/dist/components/Menu/index.js +1 -1
  78. package/dist/components/Modal/Modal.js +2 -2
  79. package/dist/components/Modal/index.js +1 -1
  80. package/dist/components/Navbar/Navbar.js +2 -2
  81. package/dist/components/Navbar/components/HomeLinkContent.js +2 -2
  82. package/dist/components/Navbar/components/LogoFromSrc.js +1 -1
  83. package/dist/components/Navbar/components/NavbarLogo.js +2 -2
  84. package/dist/components/Navbar/index.js +1 -1
  85. package/dist/components/Placeholder/Placeholder.js +1 -1
  86. package/dist/components/Popover/InputPopover/InputPopover.js +1 -1
  87. package/dist/components/Popover/InputPopover/InputPopoverActivator.js +1 -1
  88. package/dist/components/Popover/InputPopover/InputPopoverProvider.js +23 -23
  89. package/dist/components/Popover/Popover.js +12 -12
  90. package/dist/components/Popover/PopoverProvider.js +12 -113
  91. package/dist/components/Popover/components/NestedPopoverActivator.js +3 -3
  92. package/dist/components/Popover/components/PopoverActivator.js +40 -41
  93. package/dist/components/Popover/components/PopoverContent.js +15 -15
  94. package/dist/components/Popover/helpers/handlePopoverTabKey.js +1 -1
  95. package/dist/components/Popover/hooks/usePopover.js +1 -1
  96. package/dist/components/Popover/hooks/usePopoverItem.js +1 -1
  97. package/dist/components/Popover/hooks/usePopoverNavigation.js +1 -1
  98. package/dist/components/Progress/Progress.js +1 -1
  99. package/dist/components/Provider/Provider.js +2 -2
  100. package/dist/components/Radio/Radio.js +1 -1
  101. package/dist/components/Radio/helpers/mapRadioGroupOptions.js +1 -1
  102. package/dist/components/Radio/index.js +1 -1
  103. package/dist/components/RadioGroup/RadioGroup.js +3 -3
  104. package/dist/components/Readonly/Readonly.js +4 -4
  105. package/dist/components/Readonly/index.js +1 -1
  106. package/dist/components/RichSelect/RichSelect.js +3 -3
  107. package/dist/components/RichSelect/SelectBody/SelectBody.js +3 -3
  108. package/dist/components/RichSelect/SelectCreate/SelectCreate.js +3 -3
  109. package/dist/components/RichSelect/SelectHeading/SelectHeading.js +3 -3
  110. package/dist/components/RichSelect/SelectLabel/SelectLabel.js +1 -1
  111. package/dist/components/RichSelect/SelectMenu/SelectMenu.js +3 -3
  112. package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +3 -3
  113. package/dist/components/RichSelect/SelectSearch/SelectSearch.js +2 -2
  114. package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +1 -1
  115. package/dist/components/RichSelect/SelectTags/SelectTags.js +2 -2
  116. package/dist/components/RichSelect/components/SelectActivator.js +1 -1
  117. package/dist/components/RichSelect/components/SelectOptions.js +3 -3
  118. package/dist/components/RichSelect/index.js +1 -1
  119. package/dist/components/Row/Row.js +3 -3
  120. package/dist/components/Row/index.js +1 -1
  121. package/dist/components/Select/Select.js +2 -2
  122. package/dist/components/Select/components/SelectControl.js +1 -1
  123. package/dist/components/Select/components/SelectReadonly.js +3 -3
  124. package/dist/components/Select/helpers/mapSelectOptions.js +1 -1
  125. package/dist/components/Select/helpers/nodesToSelectOptions.js +1 -1
  126. package/dist/components/Select/index.js +1 -1
  127. package/dist/components/Skeleton/Skeleton.js +2 -2
  128. package/dist/components/SkipLink/SkipLink.js +1 -1
  129. package/dist/components/Slideout/Slideout.js +5 -3
  130. package/dist/components/Slideout/SlideoutProvider.js +6 -89
  131. package/dist/components/Slideout/components/SlideoutInner.js +3 -2
  132. package/dist/components/Slideout/hooks/useIDSProvidedSlideout.js +1 -1
  133. package/dist/components/Slideout/hooks/useSlideout.js +1 -1
  134. package/dist/components/Slideout/index.js +7 -7
  135. package/dist/components/Slider/Slider.js +2 -2
  136. package/dist/components/Slider/components/SliderTicks.js +1 -1
  137. package/dist/components/Slider/index.js +1 -1
  138. package/dist/components/Spinner/Spinner.js +1 -1
  139. package/dist/components/Spinner/index.js +1 -1
  140. package/dist/components/TabSet/Tab/Tab.js +1 -1
  141. package/dist/components/TabSet/TabSet.js +2 -2
  142. package/dist/components/TabSet/components/TabSetItem.js +2 -2
  143. package/dist/components/Table/Table.js +2 -2
  144. package/dist/components/Table/TableBody/TableBody.js +2 -2
  145. package/dist/components/Table/components/TableEmpty.js +1 -1
  146. package/dist/components/Table/components/TableHeader.js +1 -1
  147. package/dist/components/Table/components/TableHeaderCell.js +1 -1
  148. package/dist/components/Table/components/TableSortButton.js +2 -2
  149. package/dist/components/Table/hooks/useIDSTableColumnStyles.js +1 -1
  150. package/dist/components/Table/index.js +1 -1
  151. package/dist/components/Tag/Tag.js +1 -1
  152. package/dist/components/Tag/TagInput/TagInput.js +1 -1
  153. package/dist/components/Tag/components/TagListInput/TagListInput.js +1 -1
  154. package/dist/components/Tag/index.js +1 -1
  155. package/dist/components/Toaster/Toast/Toast.js +1 -1
  156. package/dist/components/Toaster/Toast/ToastAnimated.js +2 -2
  157. package/dist/components/Toaster/Toast/ToastIcon.js +1 -1
  158. package/dist/components/Toaster/Toaster.js +2 -2
  159. package/dist/components/Toaster/ToasterProvider.js +1 -1
  160. package/dist/components/Toaster/hooks/useToaster.js +1 -1
  161. package/dist/components/Toaster/index.js +1 -1
  162. package/dist/components/Toggle/Toggle.js +3 -3
  163. package/dist/components/Tooltip/Tooltip.js +18 -18
  164. package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +1 -1
  165. package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +1 -1
  166. package/dist/constants.js +1 -1
  167. package/dist/{floating-ui.react-SmaXvp4L.js → floating-ui.react-nmA48tb2.js} +201 -207
  168. package/dist/helpers/dom/domUtils.js +12 -0
  169. package/dist/helpers/formatting/formatDateTime.js +21 -16
  170. package/dist/main.js +3 -3
  171. package/dist/patterns/Loading/Loading.js +1 -1
  172. package/dist/patterns/Loading/LoadingSuspense.js +1 -1
  173. package/dist/patterns/Loading/components/ComponentLoading.js +2 -2
  174. package/dist/patterns/Loading/components/DefaultLoading.js +2 -2
  175. package/dist/patterns/Loading/components/LongLoading.js +2 -2
  176. package/dist/patterns/Loading/components/PageLoading.js +2 -2
  177. package/dist/patterns/Loading/components/StartUpLoading.js +2 -2
  178. package/dist/patterns/Loading/components/ValidateLoading.js +2 -2
  179. package/dist/patterns/Loading/index.js +1 -1
  180. package/dist/src/components/Autocomplete/Autocomplete.types.d.ts +6 -0
  181. package/dist/src/components/Autocomplete/hooks/useAutocompleteSearch.d.ts +1 -1
  182. package/dist/src/components/RichSelect/SelectMenu/SelectMenuItem.d.ts +1 -1
  183. package/dist/src/components/RichSelect/components/SelectOptions.d.ts +2 -2
  184. package/dist/src/components/Slideout/Slideout.types.d.ts +1 -1
  185. package/dist/src/helpers/dom/domUtils.d.ts +5 -0
  186. package/dist/style.css +1 -1
  187. package/dist/{useIDSButtonGroupItem-CniAJ9N5.js → useIDSButtonGroupItem-aiqu-PIW.js} +1 -1
  188. package/dist/vite.config.d.ts +1 -1
  189. package/dist/vitest.config.d.ts +2 -0
  190. package/package.json +1 -26
  191. package/dist/Loading.module-Bs6DSfb4.js +0 -13
  192. package/dist/LoadingSuspense-BdXYIsHy.js +0 -5723
  193. package/dist/LogoFromSrc-CtJE0Fsr.js +0 -59
  194. package/dist/MenuItem.module-Bj20OWCC.js +0 -24
  195. package/dist/Popover.module-DJ-RK5B3.js +0 -11
  196. package/dist/TabSet.module-Cu1itlcf.js +0 -13
  197. package/dist/Table.module-Bb7fJIr8.js +0 -32
  198. /package/dist/{setupTests.d.ts → vitest.setup.d.ts} +0 -0
@@ -6,7 +6,7 @@ import * as tn from "react-dom";
6
6
  function Mt() {
7
7
  return typeof window < "u";
8
8
  }
9
- function Ke(e) {
9
+ function We(e) {
10
10
  return zn(e) ? (e.nodeName || "").toLowerCase() : "#document";
11
11
  }
12
12
  function he(e) {
@@ -39,9 +39,9 @@ function ut(e) {
39
39
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
40
40
  }
41
41
  function Mr(e) {
42
- return ["table", "td", "th"].includes(Ke(e));
42
+ return ["table", "td", "th"].includes(We(e));
43
43
  }
44
- function St(e) {
44
+ function Pt(e) {
45
45
  return [":popover-open", ":modal"].some((t) => {
46
46
  try {
47
47
  return e.matches(t);
@@ -51,25 +51,25 @@ function St(e) {
51
51
  });
52
52
  }
53
53
  function nn(e) {
54
- const t = Pt(), n = Y(e) ? we(e) : e;
54
+ const t = St(), n = Y(e) ? we(e) : e;
55
55
  return ["transform", "translate", "scale", "rotate", "perspective"].some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
56
56
  }
57
- function Sr(e) {
58
- let t = ke(e);
59
- for (; re(t) && !De(t); ) {
57
+ function Pr(e) {
58
+ let t = De(e);
59
+ for (; re(t) && !Se(t); ) {
60
60
  if (nn(t))
61
61
  return t;
62
- if (St(t))
62
+ if (Pt(t))
63
63
  return null;
64
- t = ke(t);
64
+ t = De(t);
65
65
  }
66
66
  return null;
67
67
  }
68
- function Pt() {
68
+ function St() {
69
69
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
70
70
  }
71
- function De(e) {
72
- return ["html", "body", "#document"].includes(Ke(e));
71
+ function Se(e) {
72
+ return ["html", "body", "#document"].includes(We(e));
73
73
  }
74
74
  function we(e) {
75
75
  return he(e).getComputedStyle(e);
@@ -83,8 +83,8 @@ function Dt(e) {
83
83
  scrollTop: e.scrollY
84
84
  };
85
85
  }
86
- function ke(e) {
87
- if (Ke(e) === "html")
86
+ function De(e) {
87
+ if (We(e) === "html")
88
88
  return e;
89
89
  const t = (
90
90
  // Step into the shadow DOM of the parent of a slotted node.
@@ -96,23 +96,23 @@ function ke(e) {
96
96
  return Xt(t) ? t.host : t;
97
97
  }
98
98
  function Un(e) {
99
- const t = ke(e);
100
- return De(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : re(t) && ut(t) ? t : Un(t);
99
+ const t = De(e);
100
+ return Se(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : re(t) && ut(t) ? t : Un(t);
101
101
  }
102
- function Fe(e, t, n) {
102
+ function Le(e, t, n) {
103
103
  var r;
104
104
  t === void 0 && (t = []), n === void 0 && (n = !0);
105
105
  const o = Un(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = he(o);
106
106
  if (s) {
107
107
  const c = Jt(i);
108
- return t.concat(i, i.visualViewport || [], ut(o) ? o : [], c && n ? Fe(c) : []);
108
+ return t.concat(i, i.visualViewport || [], ut(o) ? o : [], c && n ? Le(c) : []);
109
109
  }
110
- return t.concat(o, Fe(o, [], n));
110
+ return t.concat(o, Le(o, [], n));
111
111
  }
112
112
  function Jt(e) {
113
113
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
114
114
  }
115
- const Pr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @__PURE__ */ Pr.reduce((e, t) => e.concat(t, t + "-" + dn[0], t + "-" + dn[1]), []), Qe = Math.min, be = Math.max, wt = Math.round, je = Math.floor, Ce = (e) => ({
115
+ const Sr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @__PURE__ */ Sr.reduce((e, t) => e.concat(t, t + "-" + dn[0], t + "-" + dn[1]), []), Qe = Math.min, be = Math.max, wt = Math.round, je = Math.floor, Ce = (e) => ({
116
116
  x: e,
117
117
  y: e
118
118
  }), Dr = {
@@ -142,11 +142,11 @@ function Gn(e) {
142
142
  function jn(e) {
143
143
  return e === "y" ? "height" : "width";
144
144
  }
145
- function Pe(e) {
145
+ function ze(e) {
146
146
  return ["top", "bottom"].includes(Te(e)) ? "y" : "x";
147
147
  }
148
148
  function qn(e) {
149
- return Gn(Pe(e));
149
+ return Gn(ze(e));
150
150
  }
151
151
  function Yn(e, t, n) {
152
152
  n === void 0 && (n = !1);
@@ -269,7 +269,7 @@ function ce(e, t) {
269
269
  }
270
270
  return !1;
271
271
  }
272
- function Se(e) {
272
+ function Pe(e) {
273
273
  return "composedPath" in e ? e.composedPath()[0] : e.target;
274
274
  }
275
275
  function Kt(e, t) {
@@ -405,7 +405,7 @@ function ue(e, t) {
405
405
  } = t === void 0 ? {} : t, i = n;
406
406
  do
407
407
  i += r ? -s : s;
408
- while (i >= 0 && i <= e.current.length - 1 && ze(e, i, o));
408
+ while (i >= 0 && i <= e.current.length - 1 && He(e, i, o));
409
409
  return i;
410
410
  }
411
411
  function tr(e, t) {
@@ -514,7 +514,7 @@ function rr(e, t, n, r, o) {
514
514
  function or(e, t) {
515
515
  return t.flatMap((n, r) => e.includes(n) ? [r] : []);
516
516
  }
517
- function ze(e, t, n) {
517
+ function He(e, t, n) {
518
518
  if (typeof n == "function")
519
519
  return n(t);
520
520
  if (n)
@@ -563,7 +563,7 @@ function bn(e, t, n) {
563
563
  reference: r,
564
564
  floating: o
565
565
  } = e;
566
- const s = Pe(t), i = qn(t), c = jn(i), a = Te(t), u = s === "y", l = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, g = r[c] / 2 - o[c] / 2;
566
+ const s = ze(t), i = qn(t), c = jn(i), a = Te(t), u = s === "y", l = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, g = r[c] / 2 - o[c] / 2;
567
567
  let d;
568
568
  switch (a) {
569
569
  case "top":
@@ -807,7 +807,7 @@ const to = function(e) {
807
807
  } = Ze(e, t);
808
808
  if ((n = s.arrow) != null && n.alignmentOffset)
809
809
  return {};
810
- const R = Te(o), v = Pe(c), x = Te(c) === c, C = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), A = g || (x || !m ? [Et(c)] : Lr(c)), k = h !== "none";
810
+ const R = Te(o), v = ze(c), x = Te(c) === c, C = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), A = g || (x || !m ? [Et(c)] : Lr(c)), k = h !== "none";
811
811
  !g && k && A.push(...Nr(c, m, h, C));
812
812
  const N = [c, ...A], D = await kt(t, y), L = [];
813
813
  let F = ((r = s.flip) == null ? void 0 : r.overflows) || [];
@@ -821,9 +821,7 @@ const to = function(e) {
821
821
  }], !L.every((O) => O <= 0)) {
822
822
  var _, U;
823
823
  const O = (((_ = s.flip) == null ? void 0 : _.index) || 0) + 1, w = N[O];
824
- if (w && (!(p === "alignment" ? v !== Pe(w) : !1) || // We leave the current main axis only if every placement on that axis
825
- // overflows the main axis.
826
- F.every((b) => b.overflows[0] > 0 && Pe(b.placement) === v)))
824
+ if (w)
827
825
  return {
828
826
  data: {
829
827
  index: O,
@@ -840,13 +838,13 @@ const to = function(e) {
840
838
  var K;
841
839
  const T = (K = F.filter((b) => {
842
840
  if (k) {
843
- const E = Pe(b.placement);
841
+ const E = ze(b.placement);
844
842
  return E === v || // Create a bias to the `y` side axis due to horizontal
845
843
  // reading directions favoring greater width.
846
844
  E === "y";
847
845
  }
848
846
  return !0;
849
- }).map((b) => [b.placement, b.overflows.filter((E) => E > 0).reduce((E, S) => E + S, 0)]).sort((b, E) => b[1] - E[1])[0]) == null ? void 0 : K[0];
847
+ }).map((b) => [b.placement, b.overflows.filter((E) => E > 0).reduce((E, P) => E + P, 0)]).sort((b, E) => b[1] - E[1])[0]) == null ? void 0 : K[0];
850
848
  T && (W = T);
851
849
  break;
852
850
  }
@@ -870,7 +868,7 @@ async function ro(e, t) {
870
868
  placement: n,
871
869
  platform: r,
872
870
  elements: o
873
- } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Te(n), c = Ie(n), a = Pe(n) === "y", u = ["left", "top"].includes(i) ? -1 : 1, l = s && a ? -1 : 1, p = Ze(t, e);
871
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Te(n), c = Ie(n), a = ze(n) === "y", u = ["left", "top"].includes(i) ? -1 : 1, l = s && a ? -1 : 1, p = Ze(t, e);
874
872
  let {
875
873
  mainAxis: g,
876
874
  crossAxis: d,
@@ -942,7 +940,7 @@ const oo = function(e) {
942
940
  } = Ze(e, t), u = {
943
941
  x: n,
944
942
  y: r
945
- }, l = await kt(t, a), p = Pe(Te(o)), g = Gn(p);
943
+ }, l = await kt(t, a), p = ze(Te(o)), g = Gn(p);
946
944
  let d = u[g], h = u[p];
947
945
  if (s) {
948
946
  const y = g === "y" ? "top" : "left", R = g === "y" ? "bottom" : "right", v = d + l[y], x = d - l[R];
@@ -985,7 +983,7 @@ const oo = function(e) {
985
983
  apply: a = () => {
986
984
  },
987
985
  ...u
988
- } = Ze(e, t), l = await kt(t, u), p = Te(o), g = Ie(o), d = Pe(o) === "y", {
986
+ } = Ze(e, t), l = await kt(t, u), p = Te(o), g = Ie(o), d = ze(o) === "y", {
989
987
  width: h,
990
988
  height: m
991
989
  } = s.floating;
@@ -1042,7 +1040,7 @@ function Xe(e) {
1042
1040
  const co = /* @__PURE__ */ Ce(0);
1043
1041
  function lr(e) {
1044
1042
  const t = he(e);
1045
- return !Pt() || !t.visualViewport ? co : {
1043
+ return !St() || !t.visualViewport ? co : {
1046
1044
  x: t.visualViewport.offsetLeft,
1047
1045
  y: t.visualViewport.offsetTop
1048
1046
  };
@@ -1094,7 +1092,7 @@ function lo(e) {
1094
1092
  offsetParent: r,
1095
1093
  strategy: o
1096
1094
  } = e;
1097
- const s = o === "fixed", i = Oe(r), c = t ? St(t.floating) : !1;
1095
+ const s = o === "fixed", i = Oe(r), c = t ? Pt(t.floating) : !1;
1098
1096
  if (r === i || c && s)
1099
1097
  return n;
1100
1098
  let a = {
@@ -1102,7 +1100,7 @@ function lo(e) {
1102
1100
  scrollTop: 0
1103
1101
  }, u = Ce(1);
1104
1102
  const l = Ce(0), p = re(r);
1105
- if ((p || !p && !s) && ((Ke(r) !== "body" || ut(i)) && (a = Dt(r)), re(r))) {
1103
+ if ((p || !p && !s) && ((We(r) !== "body" || ut(i)) && (a = Dt(r)), re(r))) {
1106
1104
  const d = Ue(r);
1107
1105
  u = Xe(r), l.x = d.x + r.clientLeft, l.y = d.y + r.clientTop;
1108
1106
  }
@@ -1133,7 +1131,7 @@ function mo(e, t) {
1133
1131
  let s = r.clientWidth, i = r.clientHeight, c = 0, a = 0;
1134
1132
  if (o) {
1135
1133
  s = o.width, i = o.height;
1136
- const u = Pt();
1134
+ const u = St();
1137
1135
  (!u || u && t === "fixed") && (c = o.offsetLeft, a = o.offsetTop);
1138
1136
  }
1139
1137
  return {
@@ -1172,19 +1170,19 @@ function yn(e, t, n) {
1172
1170
  return Ct(r);
1173
1171
  }
1174
1172
  function fr(e, t) {
1175
- const n = ke(e);
1176
- return n === t || !Y(n) || De(n) ? !1 : we(n).position === "fixed" || fr(n, t);
1173
+ const n = De(e);
1174
+ return n === t || !Y(n) || Se(n) ? !1 : we(n).position === "fixed" || fr(n, t);
1177
1175
  }
1178
1176
  function go(e, t) {
1179
1177
  const n = t.get(e);
1180
1178
  if (n)
1181
1179
  return n;
1182
- let r = Fe(e, [], !1).filter((c) => Y(c) && Ke(c) !== "body"), o = null;
1180
+ let r = Le(e, [], !1).filter((c) => Y(c) && We(c) !== "body"), o = null;
1183
1181
  const s = we(e).position === "fixed";
1184
- let i = s ? ke(e) : e;
1185
- for (; Y(i) && !De(i); ) {
1182
+ let i = s ? De(e) : e;
1183
+ for (; Y(i) && !Se(i); ) {
1186
1184
  const c = we(i), a = nn(i);
1187
- !a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ut(i) && !a && fr(e, i)) ? r = r.filter((l) => l !== i) : o = c, i = ke(i);
1185
+ !a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ut(i) && !a && fr(e, i)) ? r = r.filter((l) => l !== i) : o = c, i = De(i);
1188
1186
  }
1189
1187
  return t.set(e, r), r;
1190
1188
  }
@@ -1195,7 +1193,7 @@ function ho(e) {
1195
1193
  rootBoundary: r,
1196
1194
  strategy: o
1197
1195
  } = e;
1198
- const i = [...n === "clippingAncestors" ? St(t) ? [] : go(t, this._c) : [].concat(n), r], c = i[0], a = i.reduce((u, l) => {
1196
+ const i = [...n === "clippingAncestors" ? Pt(t) ? [] : go(t, this._c) : [].concat(n), r], c = i[0], a = i.reduce((u, l) => {
1199
1197
  const p = yn(t, l, o);
1200
1198
  return u.top = be(p.top, u.top), u.right = Qe(p.right, u.right), u.bottom = Qe(p.bottom, u.bottom), u.left = be(p.left, u.left), u;
1201
1199
  }, yn(t, c, o));
@@ -1223,19 +1221,15 @@ function bo(e, t, n) {
1223
1221
  scrollTop: 0
1224
1222
  };
1225
1223
  const a = Ce(0);
1226
- function u() {
1227
- a.x = cn(o);
1228
- }
1229
1224
  if (r || !r && !s)
1230
- if ((Ke(t) !== "body" || ut(o)) && (c = Dt(t)), r) {
1231
- const d = Ue(t, !0, s, t);
1232
- a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
1233
- } else o && u();
1234
- s && !r && o && u();
1235
- const l = o && !r && !s ? ar(o, c) : Ce(0), p = i.left + c.scrollLeft - a.x - l.x, g = i.top + c.scrollTop - a.y - l.y;
1225
+ if ((We(t) !== "body" || ut(o)) && (c = Dt(t)), r) {
1226
+ const g = Ue(t, !0, s, t);
1227
+ a.x = g.x + t.clientLeft, a.y = g.y + t.clientTop;
1228
+ } else o && (a.x = cn(o));
1229
+ const u = o && !r && !s ? ar(o, c) : Ce(0), l = i.left + c.scrollLeft - a.x - u.x, p = i.top + c.scrollTop - a.y - u.y;
1236
1230
  return {
1237
- x: p,
1238
- y: g,
1231
+ x: l,
1232
+ y: p,
1239
1233
  width: i.width,
1240
1234
  height: i.height
1241
1235
  };
@@ -1253,21 +1247,21 @@ function xn(e, t) {
1253
1247
  }
1254
1248
  function dr(e, t) {
1255
1249
  const n = he(e);
1256
- if (St(e))
1250
+ if (Pt(e))
1257
1251
  return n;
1258
1252
  if (!re(e)) {
1259
- let o = ke(e);
1260
- for (; o && !De(o); ) {
1253
+ let o = De(e);
1254
+ for (; o && !Se(o); ) {
1261
1255
  if (Y(o) && !Vt(o))
1262
1256
  return o;
1263
- o = ke(o);
1257
+ o = De(o);
1264
1258
  }
1265
1259
  return n;
1266
1260
  }
1267
1261
  let r = xn(e, t);
1268
1262
  for (; r && Mr(r) && Vt(r); )
1269
1263
  r = xn(r, t);
1270
- return r && De(r) && Vt(r) && !nn(r) ? n : r || Sr(e) || n;
1264
+ return r && Se(r) && Vt(r) && !nn(r) ? n : r || Pr(e) || n;
1271
1265
  }
1272
1266
  const yo = async function(e) {
1273
1267
  const t = this.getOffsetParent || dr, n = this.getDimensions, r = await n(e.floating);
@@ -1353,7 +1347,7 @@ function ui(e, t, n, r) {
1353
1347
  elementResize: i = typeof ResizeObserver == "function",
1354
1348
  layoutShift: c = typeof IntersectionObserver == "function",
1355
1349
  animationFrame: a = !1
1356
- } = r, u = sn(e), l = o || s ? [...u ? Fe(u) : [], ...Fe(t)] : [];
1350
+ } = r, u = sn(e), l = o || s ? [...u ? Le(u) : [], ...Le(t)] : [];
1357
1351
  l.forEach((R) => {
1358
1352
  o && R.addEventListener("scroll", n, {
1359
1353
  passive: !0
@@ -1394,8 +1388,8 @@ const Eo = oo, Co = to, Io = io, To = no, Oo = so, Ao = (e, t, n) => {
1394
1388
  platform: s
1395
1389
  });
1396
1390
  };
1397
- var Mo = typeof document < "u", So = function() {
1398
- }, xt = Mo ? $n : So;
1391
+ var Mo = typeof document < "u", Po = function() {
1392
+ }, xt = Mo ? $n : Po;
1399
1393
  function Tt(e, t) {
1400
1394
  if (e === t)
1401
1395
  return !0;
@@ -1439,7 +1433,7 @@ function $t(e) {
1439
1433
  t.current = e;
1440
1434
  }), t;
1441
1435
  }
1442
- function Po(e) {
1436
+ function So(e) {
1443
1437
  e === void 0 && (e = {});
1444
1438
  const {
1445
1439
  placement: t = "bottom",
@@ -1475,7 +1469,7 @@ function Po(e) {
1475
1469
  middleware: g
1476
1470
  };
1477
1471
  _.current && (b.platform = _.current), Ao(k.current, N.current, b).then((E) => {
1478
- const S = {
1472
+ const P = {
1479
1473
  ...E,
1480
1474
  // The floating element's position may be recomputed while it's closed
1481
1475
  // but still mounted (such as when transitioning out). To ensure
@@ -1483,8 +1477,8 @@ function Po(e) {
1483
1477
  // setting it to `true` when `open === false` (must be specified).
1484
1478
  isPositioned: U.current !== !1
1485
1479
  };
1486
- O.current && !Tt(D.current, S) && (D.current = S, tn.flushSync(() => {
1487
- p(S);
1480
+ O.current && !Tt(D.current, P) && (D.current = P, tn.flushSync(() => {
1481
+ p(P);
1488
1482
  }));
1489
1483
  });
1490
1484
  }, [g, t, n, _, U]);
@@ -1520,17 +1514,17 @@ function Po(e) {
1520
1514
  };
1521
1515
  if (!W.floating)
1522
1516
  return b;
1523
- const E = wn(W.floating, l.x), S = wn(W.floating, l.y);
1517
+ const E = wn(W.floating, l.x), P = wn(W.floating, l.y);
1524
1518
  return c ? {
1525
1519
  ...b,
1526
- transform: "translate(" + E + "px, " + S + "px)",
1520
+ transform: "translate(" + E + "px, " + P + "px)",
1527
1521
  ...pr(W.floating) >= 1.5 && {
1528
1522
  willChange: "transform"
1529
1523
  }
1530
1524
  } : {
1531
1525
  position: n,
1532
1526
  left: E,
1533
- top: S
1527
+ top: P
1534
1528
  };
1535
1529
  }, [n, c, W.floating, l.x, l.y]);
1536
1530
  return f.useMemo(() => ({
@@ -1654,7 +1648,7 @@ function Fo(e) {
1654
1648
  index: c ?? -1
1655
1649
  }), [c, l]);
1656
1650
  }
1657
- const No = "data-floating-ui-focusable", Rn = "active", En = "selected", _e = "ArrowLeft", We = "ArrowRight", st = "ArrowUp", Ne = "ArrowDown";
1651
+ const No = "data-floating-ui-focusable", Rn = "active", En = "selected", Ne = "ArrowLeft", _e = "ArrowRight", st = "ArrowUp", Fe = "ArrowDown";
1658
1652
  function hr(e, t) {
1659
1653
  return typeof e == "function" ? e(t) : e ? /* @__PURE__ */ f.cloneElement(e, t) : /* @__PURE__ */ ge("div", {
1660
1654
  ...t
@@ -1664,7 +1658,7 @@ const vr = /* @__PURE__ */ f.createContext({
1664
1658
  activeIndex: 0,
1665
1659
  onNavigate: () => {
1666
1660
  }
1667
- }), br = [_e, We], yr = [st, Ne], Bt = [...br, ...yr], pi = /* @__PURE__ */ f.forwardRef(function(t, n) {
1661
+ }), br = [Ne, _e], yr = [st, Fe], Bt = [...br, ...yr], pi = /* @__PURE__ */ f.forwardRef(function(t, n) {
1668
1662
  const {
1669
1663
  render: r,
1670
1664
  orientation: o = "both",
@@ -1684,14 +1678,14 @@ const vr = /* @__PURE__ */ f.createContext({
1684
1678
  function k(D) {
1685
1679
  if (!Bt.includes(D.key)) return;
1686
1680
  let L = y;
1687
- const F = yt(v, a), _ = en(v, a), U = i ? _e : We, K = i ? We : _e;
1681
+ const F = yt(v, a), _ = en(v, a), U = i ? Ne : _e, K = i ? _e : Ne;
1688
1682
  if (A) {
1689
1683
  const b = p || Array.from({
1690
1684
  length: v.current.length
1691
1685
  }, () => ({
1692
1686
  width: 1,
1693
1687
  height: 1
1694
- })), E = nr(b, c, g), S = E.findIndex((V) => V != null && !ze(v, V, a)), G = E.reduce((V, ee, ae) => ee != null && !ze(v, ee, a) ? ae : V, -1), I = E[tr({
1688
+ })), E = nr(b, c, g), P = E.findIndex((V) => V != null && !He(v, V, a)), G = E.reduce((V, ee, ae) => ee != null && !He(v, ee, a) ? ae : V, -1), I = E[tr({
1695
1689
  current: E.map((V) => V ? v.current[V] : null)
1696
1690
  }, {
1697
1691
  event: D,
@@ -1701,8 +1695,8 @@ const vr = /* @__PURE__ */ f.createContext({
1701
1695
  cols: c,
1702
1696
  // treat undefined (empty grid spaces) as disabled indices so we
1703
1697
  // don't end up in them
1704
- disabledIndices: or([...(typeof a != "function" ? a : null) || v.current.map((V, ee) => ze(v, ee, a) ? ee : void 0), void 0], E),
1705
- minIndex: S,
1698
+ disabledIndices: or([...(typeof a != "function" ? a : null) || v.current.map((V, ee) => He(v, ee, a) ? ee : void 0), void 0], E),
1699
+ minIndex: P,
1706
1700
  maxIndex: G,
1707
1701
  prevIndex: rr(
1708
1702
  y > _ ? F : y,
@@ -1712,15 +1706,15 @@ const vr = /* @__PURE__ */ f.createContext({
1712
1706
  // use a corner matching the edge closest to the direction we're
1713
1707
  // moving in so we don't end up in the same item. Prefer
1714
1708
  // top/left over bottom/right.
1715
- D.key === Ne ? "bl" : D.key === U ? "tr" : "tl"
1709
+ D.key === Fe ? "bl" : D.key === U ? "tr" : "tl"
1716
1710
  )
1717
1711
  })];
1718
1712
  I != null && (L = I);
1719
1713
  }
1720
1714
  const O = {
1721
1715
  horizontal: [U],
1722
- vertical: [Ne],
1723
- both: [U, Ne]
1716
+ vertical: [Fe],
1717
+ both: [U, Fe]
1724
1718
  }[o], w = {
1725
1719
  horizontal: [K],
1726
1720
  vertical: [st],
@@ -1943,8 +1937,8 @@ function yi(e, t) {
1943
1937
  }, [i.floating, n, r, c, m, _]);
1944
1938
  const U = f.useCallback(function(T, b, E) {
1945
1939
  b === void 0 && (b = !0), E === void 0 && (E = "hover");
1946
- const S = zt(y.current, "close", x.current);
1947
- S && !A.current ? (ve(C), C.current = window.setTimeout(() => r(!1, T, E), S)) : b && (ve(C), r(!1, T, E));
1940
+ const P = zt(y.current, "close", x.current);
1941
+ P && !A.current ? (ve(C), C.current = window.setTimeout(() => r(!1, T, E), P)) : b && (ve(C), r(!1, T, E));
1948
1942
  }, [y, r]), K = se(() => {
1949
1943
  L.current(), A.current = void 0;
1950
1944
  }), O = se(() => {
@@ -1999,7 +1993,7 @@ function yi(e, t) {
1999
1993
  }
2000
1994
  })(I));
2001
1995
  }
2002
- function S() {
1996
+ function P() {
2003
1997
  ve(C);
2004
1998
  }
2005
1999
  function G(I) {
@@ -2009,8 +2003,8 @@ function yi(e, t) {
2009
2003
  const I = i.domReference, V = i.floating;
2010
2004
  return n && I.addEventListener("mouseleave", E), g && I.addEventListener("mousemove", T, {
2011
2005
  once: !0
2012
- }), I.addEventListener("mouseenter", T), I.addEventListener("mouseleave", b), V && (V.addEventListener("mouseleave", E), V.addEventListener("mouseenter", S), V.addEventListener("mouseleave", G)), () => {
2013
- n && I.removeEventListener("mouseleave", E), g && I.removeEventListener("mousemove", T), I.removeEventListener("mouseenter", T), I.removeEventListener("mouseleave", b), V && (V.removeEventListener("mouseleave", E), V.removeEventListener("mouseenter", S), V.removeEventListener("mouseleave", G));
2006
+ }), I.addEventListener("mouseenter", T), I.addEventListener("mouseleave", b), V && (V.addEventListener("mouseleave", E), V.addEventListener("mouseenter", P), V.addEventListener("mouseleave", G)), () => {
2007
+ n && I.removeEventListener("mouseleave", E), g && I.removeEventListener("mousemove", T), I.removeEventListener("mouseenter", T), I.removeEventListener("mouseleave", b), V && (V.removeEventListener("mouseleave", E), V.removeEventListener("mouseenter", P), V.removeEventListener("mouseleave", G));
2014
2008
  };
2015
2009
  }
2016
2010
  }, [i, c, e, l, g, U, K, O, r, n, R, d, y, m, o, w, v]), X(() => {
@@ -2020,11 +2014,11 @@ function yi(e, t) {
2020
2014
  const E = i.floating;
2021
2015
  if (Y(i.domReference) && E) {
2022
2016
  var b;
2023
- const S = le(i.floating).body;
2024
- S.setAttribute(Tn, "");
2017
+ const P = le(i.floating).body;
2018
+ P.setAttribute(Tn, "");
2025
2019
  const G = i.domReference, I = d == null || (b = d.nodesRef.current.find((V) => V.id === h)) == null || (b = b.context) == null ? void 0 : b.elements.floating;
2026
- return I && (I.style.pointerEvents = ""), S.style.pointerEvents = "none", G.style.pointerEvents = "auto", E.style.pointerEvents = "auto", () => {
2027
- S.style.pointerEvents = "", G.style.pointerEvents = "", E.style.pointerEvents = "";
2020
+ return I && (I.style.pointerEvents = ""), P.style.pointerEvents = "none", G.style.pointerEvents = "auto", E.style.pointerEvents = "auto", () => {
2021
+ P.style.pointerEvents = "", G.style.pointerEvents = "", E.style.pointerEvents = "";
2028
2022
  };
2029
2023
  }
2030
2024
  }
@@ -2044,10 +2038,10 @@ function yi(e, t) {
2044
2038
  const {
2045
2039
  nativeEvent: E
2046
2040
  } = b;
2047
- function S() {
2041
+ function P() {
2048
2042
  !N.current && !R.current && r(!0, E, "hover");
2049
2043
  }
2050
- l && !it(x.current) || n || Ut(v.current) === 0 || F.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (ve(k), x.current === "touch" ? S() : (F.current = !0, k.current = window.setTimeout(S, Ut(v.current))));
2044
+ l && !it(x.current) || n || Ut(v.current) === 0 || F.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (ve(k), x.current === "touch" ? P() : (F.current = !0, k.current = window.setTimeout(P, Ut(v.current))));
2051
2045
  }
2052
2046
  };
2053
2047
  }, [l, r, n, R, v]);
@@ -2056,7 +2050,7 @@ function yi(e, t) {
2056
2050
  } : {}, [c, W]);
2057
2051
  }
2058
2052
  let On = 0;
2059
- function Be(e, t) {
2053
+ function $e(e, t) {
2060
2054
  t === void 0 && (t = {});
2061
2055
  const {
2062
2056
  preventScroll: n = !1,
@@ -2097,7 +2091,7 @@ function Uo(e, t, n, r) {
2097
2091
  }
2098
2092
  function g(d) {
2099
2093
  !d || a.has(d) || [].forEach.call(d.children, (h) => {
2100
- if (Ke(h) !== "script")
2094
+ if (We(h) !== "script")
2101
2095
  if (c.has(h))
2102
2096
  g(h);
2103
2097
  else {
@@ -2148,7 +2142,7 @@ const Ft = {
2148
2142
  ...t,
2149
2143
  ...s
2150
2144
  });
2151
- }), Cr = /* @__PURE__ */ f.createContext(null), Sn = /* @__PURE__ */ Ge("portal");
2145
+ }), Cr = /* @__PURE__ */ f.createContext(null), Pn = /* @__PURE__ */ Ge("portal");
2152
2146
  function Go(e) {
2153
2147
  e === void 0 && (e = {});
2154
2148
  const {
@@ -2164,7 +2158,7 @@ function Go(e) {
2164
2158
  const a = t ? document.getElementById(t) : null;
2165
2159
  if (!a) return;
2166
2160
  const u = document.createElement("div");
2167
- u.id = r, u.setAttribute(Sn, ""), a.appendChild(u), c.current = u, i(u);
2161
+ u.id = r, u.setAttribute(Pn, ""), a.appendChild(u), c.current = u, i(u);
2168
2162
  }, [t, r]), X(() => {
2169
2163
  if (n === null || !r || c.current) return;
2170
2164
  let a = n || (o == null ? void 0 : o.portalNode);
@@ -2172,7 +2166,7 @@ function Go(e) {
2172
2166
  let u = null;
2173
2167
  t && (u = document.createElement("div"), u.id = t, a.appendChild(u));
2174
2168
  const l = document.createElement("div");
2175
- l.id = r, l.setAttribute(Sn, ""), a = u || a, a.appendChild(l), c.current = l, i(l);
2169
+ l.id = r, l.setAttribute(Pn, ""), a = u || a, a.appendChild(l), c.current = l, i(l);
2176
2170
  }, [t, n, r, o]), s;
2177
2171
  }
2178
2172
  function xi(e) {
@@ -2243,7 +2237,7 @@ function xi(e) {
2243
2237
  });
2244
2238
  }
2245
2239
  const Ir = () => f.useContext(Cr);
2246
- function Pn(e) {
2240
+ function Sn(e) {
2247
2241
  return f.useMemo(() => (t) => {
2248
2242
  e.forEach((n) => {
2249
2243
  n && (n.current = t);
@@ -2251,12 +2245,12 @@ function Pn(e) {
2251
2245
  }, e);
2252
2246
  }
2253
2247
  const jo = 20;
2254
- let He = [];
2248
+ let Be = [];
2255
2249
  function qo(e) {
2256
- He = He.filter((t) => t.isConnected), e && Ke(e) !== "body" && (He.push(e), He.length > jo && (He = He.slice(-20)));
2250
+ Be = Be.filter((t) => t.isConnected), e && We(e) !== "body" && (Be.push(e), Be.length > jo && (Be = Be.slice(-20)));
2257
2251
  }
2258
2252
  function Dn() {
2259
- return He.slice().reverse().find((e) => e.isConnected);
2253
+ return Be.slice().reverse().find((e) => e.isConnected);
2260
2254
  }
2261
2255
  function Yo(e) {
2262
2256
  const t = lt();
@@ -2308,7 +2302,7 @@ function wi(e) {
2308
2302
  } = t, C = se(() => {
2309
2303
  var H;
2310
2304
  return (H = R.current.floatingContext) == null ? void 0 : H.nodeId;
2311
- }), A = se(d), k = typeof i == "number" && i < 0, N = Zt(v) && k, D = Ho(), L = D ? s : !0, F = !L || D && g, _ = xe(o), U = xe(i), K = xe(c), O = tt(), w = Ir(), W = f.useRef(null), T = f.useRef(null), b = f.useRef(!1), E = f.useRef(!1), S = f.useRef(-1), G = w != null, I = It(x), V = se(function(H) {
2305
+ }), A = se(d), k = typeof i == "number" && i < 0, N = Zt(v) && k, D = Ho(), L = D ? s : !0, F = !L || D && g, _ = xe(o), U = xe(i), K = xe(c), O = tt(), w = Ir(), W = f.useRef(null), T = f.useRef(null), b = f.useRef(!1), E = f.useRef(!1), P = f.useRef(-1), G = w != null, I = It(x), V = se(function(H) {
2312
2306
  return H === void 0 && (H = I), H ? At(H, lt()) : [];
2313
2307
  }), ee = se((H) => {
2314
2308
  const z = V(H);
@@ -2319,8 +2313,8 @@ function wi(e) {
2319
2313
  function H($) {
2320
2314
  if ($.key === "Tab") {
2321
2315
  ce(I, Ee(le(I))) && V().length === 0 && !N && pe($);
2322
- const B = ee(), oe = Se($);
2323
- _.current[0] === "reference" && oe === v && (pe($), $.shiftKey ? Be(B[B.length - 1]) : Be(B[1])), _.current[1] === "floating" && oe === I && $.shiftKey && (pe($), Be(B[0]));
2316
+ const B = ee(), oe = Pe($);
2317
+ _.current[0] === "reference" && oe === v && (pe($), $.shiftKey ? $e(B[B.length - 1]) : $e(B[1])), _.current[1] === "floating" && oe === I && $.shiftKey && (pe($), $e(B[0]));
2324
2318
  }
2325
2319
  }
2326
2320
  const z = le(I);
@@ -2330,8 +2324,8 @@ function wi(e) {
2330
2324
  }, [r, v, I, u, _, N, V, ee]), f.useEffect(() => {
2331
2325
  if (r || !x) return;
2332
2326
  function H(z) {
2333
- const $ = Se(z), oe = V().indexOf($);
2334
- oe !== -1 && (S.current = oe);
2327
+ const $ = Pe(z), oe = V().indexOf($);
2328
+ oe !== -1 && (P.current = oe);
2335
2329
  }
2336
2330
  return x.addEventListener("focusin", H), () => {
2337
2331
  x.removeEventListener("focusin", H);
@@ -2344,7 +2338,7 @@ function wi(e) {
2344
2338
  });
2345
2339
  }
2346
2340
  function z($) {
2347
- const B = $.relatedTarget, oe = $.currentTarget, ne = Se($);
2341
+ const B = $.relatedTarget, oe = $.currentTarget, ne = Pe($);
2348
2342
  queueMicrotask(() => {
2349
2343
  const de = C(), me = !(ce(v, B) || ce(x, B) || ce(B, x) || ce(w == null ? void 0 : w.portalNode, B) || B != null && B.hasAttribute(Ge("focus-guard")) || O && (qe(O.nodesRef.current, de).find((q) => {
2350
2344
  var J, Re;
@@ -2355,7 +2349,7 @@ function wi(e) {
2355
2349
  })));
2356
2350
  if (oe === v && I && kn(I, _), a && oe !== v && !(ne != null && ne.isConnected) && Ee(le(I)) === le(I).body) {
2357
2351
  re(I) && I.focus();
2358
- const q = S.current, J = V(), Re = J[q] || J[J.length - 1] || I;
2352
+ const q = P.current, J = V(), Re = J[q] || J[J.length - 1] || I;
2359
2353
  re(Re) && Re.focus();
2360
2354
  }
2361
2355
  if (R.current.insideReactTree) {
@@ -2371,7 +2365,7 @@ function wi(e) {
2371
2365
  v.removeEventListener("focusout", z), v.removeEventListener("pointerdown", H), x.removeEventListener("focusout", z);
2372
2366
  };
2373
2367
  }, [r, v, x, I, u, O, w, m, p, a, V, N, C, _, R]);
2374
- const ae = f.useRef(null), te = f.useRef(null), fe = Pn([ae, w == null ? void 0 : w.beforeInsideRef]), Ae = Pn([te, w == null ? void 0 : w.afterInsideRef]);
2368
+ const ae = f.useRef(null), te = f.useRef(null), fe = Sn([ae, w == null ? void 0 : w.beforeInsideRef]), Ae = Sn([te, w == null ? void 0 : w.afterInsideRef]);
2375
2369
  f.useEffect(() => {
2376
2370
  var H, z;
2377
2371
  if (r || !x) return;
@@ -2390,7 +2384,7 @@ function wi(e) {
2390
2384
  const H = le(I), z = Ee(H);
2391
2385
  queueMicrotask(() => {
2392
2386
  const $ = ee(I), B = U.current, oe = (typeof B == "number" ? $[B] : B.current) || I, ne = ce(I, z);
2393
- !k && !ne && h && Be(oe, {
2387
+ !k && !ne && h && $e(oe, {
2394
2388
  preventScroll: oe === I
2395
2389
  });
2396
2390
  });
@@ -2463,7 +2457,7 @@ function wi(e) {
2463
2457
  }, [r, w, u, h, m, p, v]), X(() => {
2464
2458
  r || I && kn(I, _);
2465
2459
  }, [r, I, _]);
2466
- function Ve(H) {
2460
+ function Ke(H) {
2467
2461
  return r || !l || !u ? null : /* @__PURE__ */ ge(Xo, {
2468
2462
  ref: H === "start" ? W : T,
2469
2463
  onClick: (z) => m(!1, z.nativeEvent),
@@ -2478,7 +2472,7 @@ function wi(e) {
2478
2472
  onFocus: (H) => {
2479
2473
  if (u) {
2480
2474
  const $ = ee();
2481
- Be(o[0] === "reference" ? $[0] : $[$.length - 1]);
2475
+ $e(o[0] === "reference" ? $[0] : $[$.length - 1]);
2482
2476
  } else if (w != null && w.preserveTabOrder && w.portalNode)
2483
2477
  if (b.current = !1, ot(H, w.portalNode)) {
2484
2478
  const $ = sr(v);
@@ -2488,12 +2482,12 @@ function wi(e) {
2488
2482
  (z = w.beforeOutsideRef.current) == null || z.focus();
2489
2483
  }
2490
2484
  }
2491
- }), !N && Ve("start"), n, Ve("end"), Me && /* @__PURE__ */ ge(Ot, {
2485
+ }), !N && Ke("start"), n, Ke("end"), Me && /* @__PURE__ */ ge(Ot, {
2492
2486
  "data-type": "inside",
2493
2487
  ref: Ae,
2494
2488
  onFocus: (H) => {
2495
2489
  if (u)
2496
- Be(ee()[0]);
2490
+ $e(ee()[0]);
2497
2491
  else if (w != null && w.preserveTabOrder && w.portalNode)
2498
2492
  if (p && (b.current = !0), ot(H, w.portalNode)) {
2499
2493
  const $ = cr(v);
@@ -2656,9 +2650,9 @@ function Ci(e, t) {
2656
2650
  const T = (W = s.current.floatingContext) == null ? void 0 : W.nodeId, b = m ? qe(m.nodesRef.current, T) : [];
2657
2651
  if (!x && (w.stopPropagation(), b.length > 0)) {
2658
2652
  let E = !0;
2659
- if (b.forEach((S) => {
2653
+ if (b.forEach((P) => {
2660
2654
  var G;
2661
- if ((G = S.context) != null && G.open && !S.context.dataRef.current.__escapeKeyBubbles) {
2655
+ if ((G = P.context) != null && G.open && !P.context.dataRef.current.__escapeKeyBubbles) {
2662
2656
  E = !1;
2663
2657
  return;
2664
2658
  }
@@ -2670,9 +2664,9 @@ function Ci(e, t) {
2670
2664
  var W;
2671
2665
  const T = () => {
2672
2666
  var b;
2673
- L(w), (b = Se(w)) == null || b.removeEventListener("keydown", T);
2667
+ L(w), (b = Pe(w)) == null || b.removeEventListener("keydown", T);
2674
2668
  };
2675
- (W = Se(w)) == null || W.addEventListener("keydown", T);
2669
+ (W = Pe(w)) == null || W.addEventListener("keydown", T);
2676
2670
  }), _ = se((w) => {
2677
2671
  var W;
2678
2672
  const T = s.current.insideReactTree;
@@ -2680,11 +2674,11 @@ function Ci(e, t) {
2680
2674
  const b = v.current;
2681
2675
  if (v.current = !1, u === "click" && b || T || typeof R == "function" && !R(w))
2682
2676
  return;
2683
- const E = Se(w), S = "[" + Ge("inert") + "]", G = le(o.floating).querySelectorAll(S);
2677
+ const E = Pe(w), P = "[" + Ge("inert") + "]", G = le(o.floating).querySelectorAll(P);
2684
2678
  let I = Y(E) ? E : null;
2685
- for (; I && !De(I); ) {
2686
- const te = ke(I);
2687
- if (De(te) || !Y(te))
2679
+ for (; I && !Se(I); ) {
2680
+ const te = De(I);
2681
+ if (Se(te) || !Y(te))
2688
2682
  break;
2689
2683
  I = te;
2690
2684
  }
@@ -2694,7 +2688,7 @@ function Ci(e, t) {
2694
2688
  Array.from(G).every((te) => !ce(I, te)))
2695
2689
  return;
2696
2690
  if (re(E) && O) {
2697
- const te = De(E), fe = we(E), Ae = /auto|scroll/, Ve = te || Ae.test(fe.overflowX), Me = te || Ae.test(fe.overflowY), H = Ve && E.clientWidth > 0 && E.scrollWidth > E.clientWidth, z = Me && E.clientHeight > 0 && E.scrollHeight > E.clientHeight, $ = fe.direction === "rtl", B = z && ($ ? w.offsetX <= E.offsetWidth - E.clientWidth : w.offsetX > E.clientWidth), oe = H && w.offsetY > E.clientHeight;
2691
+ const te = Se(E), fe = we(E), Ae = /auto|scroll/, Ke = te || Ae.test(fe.overflowX), Me = te || Ae.test(fe.overflowY), H = Ke && E.clientWidth > 0 && E.scrollWidth > E.clientWidth, z = Me && E.clientHeight > 0 && E.scrollHeight > E.clientHeight, $ = fe.direction === "rtl", B = z && ($ ? w.offsetX <= E.offsetWidth - E.clientWidth : w.offsetX > E.clientWidth), oe = H && w.offsetY > E.clientHeight;
2698
2692
  if (B || oe)
2699
2693
  return;
2700
2694
  }
@@ -2721,9 +2715,9 @@ function Ci(e, t) {
2721
2715
  var W;
2722
2716
  const T = () => {
2723
2717
  var b;
2724
- _(w), (b = Se(w)) == null || b.removeEventListener(u, T);
2718
+ _(w), (b = Pe(w)) == null || b.removeEventListener(u, T);
2725
2719
  };
2726
- (W = Se(w)) == null || W.addEventListener(u, T);
2720
+ (W = Pe(w)) == null || W.addEventListener(u, T);
2727
2721
  });
2728
2722
  f.useEffect(() => {
2729
2723
  if (!n || !i)
@@ -2743,21 +2737,21 @@ function Ci(e, t) {
2743
2737
  },
2744
2738
  // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2745
2739
  // Only apply to WebKit for the test to remain 0ms.
2746
- Pt() ? 5 : 0
2740
+ St() ? 5 : 0
2747
2741
  );
2748
2742
  }
2749
2743
  const E = le(o.floating);
2750
2744
  c && (E.addEventListener("keydown", A ? F : L, A), E.addEventListener("compositionstart", T), E.addEventListener("compositionend", b)), R && E.addEventListener(u, k ? U : _, k);
2751
- let S = [];
2752
- return g && (Y(o.domReference) && (S = Fe(o.domReference)), Y(o.floating) && (S = S.concat(Fe(o.floating))), !Y(o.reference) && o.reference && o.reference.contextElement && (S = S.concat(Fe(o.reference.contextElement)))), S = S.filter((G) => {
2745
+ let P = [];
2746
+ return g && (Y(o.domReference) && (P = Le(o.domReference)), Y(o.floating) && (P = P.concat(Le(o.floating))), !Y(o.reference) && o.reference && o.reference.contextElement && (P = P.concat(Le(o.reference.contextElement)))), P = P.filter((G) => {
2753
2747
  var I;
2754
2748
  return G !== ((I = E.defaultView) == null ? void 0 : I.visualViewport);
2755
- }), S.forEach((G) => {
2749
+ }), P.forEach((G) => {
2756
2750
  G.addEventListener("scroll", W, {
2757
2751
  passive: !0
2758
2752
  });
2759
2753
  }), () => {
2760
- c && (E.removeEventListener("keydown", A ? F : L, A), E.removeEventListener("compositionstart", T), E.removeEventListener("compositionend", b)), R && E.removeEventListener(u, k ? U : _, k), S.forEach((G) => {
2754
+ c && (E.removeEventListener("keydown", A ? F : L, A), E.removeEventListener("compositionstart", T), E.removeEventListener("compositionend", b)), R && E.removeEventListener(u, k ? U : _, k), P.forEach((G) => {
2761
2755
  G.removeEventListener("scroll", W);
2762
2756
  }), window.clearTimeout(w);
2763
2757
  };
@@ -2847,7 +2841,7 @@ function Ii(e) {
2847
2841
  X(() => {
2848
2842
  l && (p.current = l);
2849
2843
  }, [l]);
2850
- const d = Po({
2844
+ const d = So({
2851
2845
  ...e,
2852
2846
  elements: {
2853
2847
  ...o,
@@ -2943,7 +2937,7 @@ function Ti(e, t) {
2943
2937
  },
2944
2938
  onFocus(d) {
2945
2939
  if (u.current) return;
2946
- const h = Se(d.nativeEvent);
2940
+ const h = Pe(d.nativeEvent);
2947
2941
  if (a && Y(h)) {
2948
2942
  if (jt() && !d.relatedTarget) {
2949
2943
  if (!p.current && !on(h))
@@ -3037,16 +3031,16 @@ function Nt(e, t, n) {
3037
3031
  }
3038
3032
  }
3039
3033
  function bt(e, t) {
3040
- return Nt(t, e === st || e === Ne, e === _e || e === We);
3034
+ return Nt(t, e === st || e === Fe, e === Ne || e === _e);
3041
3035
  }
3042
3036
  function Yt(e, t, n) {
3043
- return Nt(t, e === Ne, n ? e === _e : e === We) || e === "Enter" || e === " " || e === "";
3037
+ return Nt(t, e === Fe, n ? e === Ne : e === _e) || e === "Enter" || e === " " || e === "";
3044
3038
  }
3045
3039
  function Kn(e, t, n) {
3046
- return Nt(t, n ? e === _e : e === We, e === Ne);
3040
+ return Nt(t, n ? e === Ne : e === _e, e === Fe);
3047
3041
  }
3048
3042
  function Vn(e, t, n, r) {
3049
- const o = n ? e === We : e === _e, s = e === st;
3043
+ const o = n ? e === _e : e === Ne, s = e === st;
3050
3044
  return t === "both" || t === "horizontal" && r && r > 1 ? e === ni : Nt(t, o, s);
3051
3045
  }
3052
3046
  function Ai(e, t) {
@@ -3086,24 +3080,24 @@ function Ai(e, t) {
3086
3080
  }, [e, C]);
3087
3081
  const w = se(() => {
3088
3082
  a(b.current === -1 ? null : b.current);
3089
- }), W = Zt(o.domReference), T = f.useRef(y), b = f.useRef(l ?? -1), E = f.useRef(null), S = f.useRef(!0), G = f.useRef(w), I = f.useRef(!!o.floating), V = f.useRef(n), ee = f.useRef(!1), ae = f.useRef(!1), te = xe(x), fe = xe(n), Ae = xe(N), Ve = xe(l), [Me, H] = f.useState(), [z, $] = f.useState(), B = se(() => {
3083
+ }), W = Zt(o.domReference), T = f.useRef(y), b = f.useRef(l ?? -1), E = f.useRef(null), P = f.useRef(!0), G = f.useRef(w), I = f.useRef(!!o.floating), V = f.useRef(n), ee = f.useRef(!1), ae = f.useRef(!1), te = xe(x), fe = xe(n), Ae = xe(N), Ke = xe(l), [Me, H] = f.useState(), [z, $] = f.useState(), B = se(() => {
3090
3084
  function M(Z) {
3091
3085
  if (m) {
3092
3086
  var ie;
3093
3087
  (ie = Z.id) != null && ie.endsWith("-fui-option") && (Z.id = s + "-" + Math.random().toString(16).slice(2, 10)), H(Z.id), O == null || O.events.emit("virtualfocus", Z), D && (D.current = Z);
3094
3088
  } else
3095
- Be(Z, {
3089
+ $e(Z, {
3096
3090
  sync: ee.current,
3097
3091
  preventScroll: !0
3098
3092
  });
3099
3093
  }
3100
- const j = i.current[b.current], P = ae.current;
3094
+ const j = i.current[b.current], S = ae.current;
3101
3095
  j && M(j), (ee.current ? (Z) => Z() : requestAnimationFrame)(() => {
3102
3096
  const Z = i.current[b.current] || j;
3103
3097
  if (!Z) return;
3104
3098
  j || M(Z);
3105
3099
  const ie = Ae.current;
3106
- ie && ne && (P || !S.current) && (Z.scrollIntoView == null || Z.scrollIntoView(typeof ie == "boolean" ? {
3100
+ ie && ne && (S || !P.current) && (Z.scrollIntoView == null || Z.scrollIntoView(typeof ie == "boolean" ? {
3107
3101
  block: "nearest",
3108
3102
  inline: "nearest"
3109
3103
  } : ie));
@@ -3114,7 +3108,7 @@ function Ai(e, t) {
3114
3108
  }, [u, n, o.floating, l, w]), X(() => {
3115
3109
  if (u && n && o.floating)
3116
3110
  if (c == null) {
3117
- if (ee.current = !1, Ve.current != null)
3111
+ if (ee.current = !1, Ke.current != null)
3118
3112
  return;
3119
3113
  if (I.current && (b.current = -1, B()), (!V.current || !I.current) && T.current && (E.current != null || T.current === !0 && E.current == null)) {
3120
3114
  let M = 0;
@@ -3124,12 +3118,12 @@ function Ai(e, t) {
3124
3118
  j();
3125
3119
  }
3126
3120
  } else Ye(i, c) || (b.current = c, B(), ae.current = !1);
3127
- }, [u, n, o.floating, c, Ve, d, i, C, h, w, B, te]), X(() => {
3121
+ }, [u, n, o.floating, c, Ke, d, i, C, h, w, B, te]), X(() => {
3128
3122
  var M;
3129
3123
  if (!u || o.floating || !O || m || !I.current)
3130
3124
  return;
3131
- const j = O.nodesRef.current, P = (M = j.find((ie) => ie.id === K)) == null || (M = M.context) == null ? void 0 : M.elements.floating, Q = Ee(le(o.floating)), Z = j.some((ie) => ie.context && ce(ie.context.elements.floating, Q));
3132
- P && !Z && S.current && P.focus({
3125
+ const j = O.nodesRef.current, S = (M = j.find((ie) => ie.id === K)) == null || (M = M.context) == null ? void 0 : M.elements.floating, Q = Ee(le(o.floating)), Z = j.some((ie) => ie.context && ce(ie.context.elements.floating, Q));
3126
+ S && !Z && P.current && S.focus({
3133
3127
  preventScroll: !0
3134
3128
  });
3135
3129
  }, [u, o.floating, O, K, m]), X(() => {
@@ -3146,39 +3140,39 @@ function Ai(e, t) {
3146
3140
  n || (E.current = null, T.current = y);
3147
3141
  }, [n, y]);
3148
3142
  const oe = c != null, ne = f.useMemo(() => {
3149
- function M(P) {
3143
+ function M(S) {
3150
3144
  if (!fe.current) return;
3151
- const Q = i.current.indexOf(P);
3145
+ const Q = i.current.indexOf(S);
3152
3146
  Q !== -1 && b.current !== Q && (b.current = Q, w());
3153
3147
  }
3154
3148
  return {
3155
- onFocus(P) {
3149
+ onFocus(S) {
3156
3150
  let {
3157
3151
  currentTarget: Q
3158
- } = P;
3152
+ } = S;
3159
3153
  ee.current = !0, M(Q);
3160
3154
  },
3161
- onClick: (P) => {
3155
+ onClick: (S) => {
3162
3156
  let {
3163
3157
  currentTarget: Q
3164
- } = P;
3158
+ } = S;
3165
3159
  return Q.focus({
3166
3160
  preventScroll: !0
3167
3161
  });
3168
3162
  },
3169
3163
  // Safari
3170
3164
  ...R && {
3171
- onMouseMove(P) {
3165
+ onMouseMove(S) {
3172
3166
  let {
3173
3167
  currentTarget: Q
3174
- } = P;
3168
+ } = S;
3175
3169
  ee.current = !0, ae.current = !1, M(Q);
3176
3170
  },
3177
- onPointerLeave(P) {
3171
+ onPointerLeave(S) {
3178
3172
  let {
3179
3173
  pointerType: Q
3180
- } = P;
3181
- if (!(!S.current || Q === "touch") && (ee.current = !0, b.current = -1, w(), !m)) {
3174
+ } = S;
3175
+ if (!(!P.current || Q === "touch") && (ee.current = !0, b.current = -1, w(), !m)) {
3182
3176
  var Z;
3183
3177
  (Z = U.current) == null || Z.focus({
3184
3178
  preventScroll: !0
@@ -3191,20 +3185,20 @@ function Ai(e, t) {
3191
3185
  var M;
3192
3186
  return A ?? (O == null || (M = O.nodesRef.current.find((j) => j.id === K)) == null || (M = M.context) == null || (M = M.dataRef) == null ? void 0 : M.current.orientation);
3193
3187
  }, [K, O, A]), me = se((M) => {
3194
- if (S.current = !1, ee.current = !0, M.which === 229 || !fe.current && M.currentTarget === U.current)
3188
+ if (P.current = !1, ee.current = !0, M.which === 229 || !fe.current && M.currentTarget === U.current)
3195
3189
  return;
3196
3190
  if (d && Vn(M.key, C, h, k)) {
3197
3191
  bt(M.key, de()) || pe(M), r(!1, M.nativeEvent, "list-navigation"), re(o.domReference) && (m ? O == null || O.events.emit("virtualfocus", o.domReference) : o.domReference.focus());
3198
3192
  return;
3199
3193
  }
3200
- const j = b.current, P = yt(i, x), Q = en(i, x);
3201
- if (W || (M.key === "Home" && (pe(M), b.current = P, w()), M.key === "End" && (pe(M), b.current = Q, w())), k > 1) {
3194
+ const j = b.current, S = yt(i, x), Q = en(i, x);
3195
+ if (W || (M.key === "Home" && (pe(M), b.current = S, w()), M.key === "End" && (pe(M), b.current = Q, w())), k > 1) {
3202
3196
  const Z = L || Array.from({
3203
3197
  length: i.current.length
3204
3198
  }, () => ({
3205
3199
  width: 1,
3206
3200
  height: 1
3207
- })), ie = nr(Z, k, F), nt = ie.findIndex((ye) => ye != null && !ze(i, ye, x)), at = ie.reduce((ye, $e, ft) => $e != null && !ze(i, $e, x) ? ft : ye, -1), rt = ie[tr({
3201
+ })), ie = nr(Z, k, F), nt = ie.findIndex((ye) => ye != null && !He(i, ye, x)), at = ie.reduce((ye, Ve, ft) => Ve != null && !He(i, Ve, x) ? ft : ye, -1), rt = ie[tr({
3208
3202
  current: ie.map((ye) => ye != null ? i.current[ye] : null)
3209
3203
  }, {
3210
3204
  event: M,
@@ -3214,18 +3208,18 @@ function Ai(e, t) {
3214
3208
  cols: k,
3215
3209
  // treat undefined (empty grid spaces) as disabled indices so we
3216
3210
  // don't end up in them
3217
- disabledIndices: or([...(typeof x != "function" ? x : null) || i.current.map((ye, $e) => ze(i, $e, x) ? $e : void 0), void 0], ie),
3211
+ disabledIndices: or([...(typeof x != "function" ? x : null) || i.current.map((ye, Ve) => He(i, Ve, x) ? Ve : void 0), void 0], ie),
3218
3212
  minIndex: nt,
3219
3213
  maxIndex: at,
3220
3214
  prevIndex: rr(
3221
- b.current > Q ? P : b.current,
3215
+ b.current > Q ? S : b.current,
3222
3216
  Z,
3223
3217
  ie,
3224
3218
  k,
3225
3219
  // use a corner matching the edge closest to the direction
3226
3220
  // we're moving in so we don't end up in the same item. Prefer
3227
3221
  // top/left over bottom/right.
3228
- M.key === Ne ? "bl" : M.key === (h ? _e : We) ? "tr" : "tl"
3222
+ M.key === Fe ? "bl" : M.key === (h ? Ne : _e) ? "tr" : "tl"
3229
3223
  ),
3230
3224
  stopEvent: !0
3231
3225
  })];
@@ -3234,20 +3228,20 @@ function Ai(e, t) {
3234
3228
  }
3235
3229
  if (bt(M.key, C)) {
3236
3230
  if (pe(M), n && !m && Ee(M.currentTarget.ownerDocument) === M.currentTarget) {
3237
- b.current = Yt(M.key, C, h) ? P : Q, w();
3231
+ b.current = Yt(M.key, C, h) ? S : Q, w();
3238
3232
  return;
3239
3233
  }
3240
- Yt(M.key, C, h) ? g ? b.current = j >= Q ? p && j !== i.current.length ? -1 : P : ue(i, {
3234
+ Yt(M.key, C, h) ? g ? b.current = j >= Q ? p && j !== i.current.length ? -1 : S : ue(i, {
3241
3235
  startingIndex: j,
3242
3236
  disabledIndices: x
3243
3237
  }) : b.current = Math.min(Q, ue(i, {
3244
3238
  startingIndex: j,
3245
3239
  disabledIndices: x
3246
- })) : g ? b.current = j <= P ? p && j !== -1 ? i.current.length : Q : ue(i, {
3240
+ })) : g ? b.current = j <= S ? p && j !== -1 ? i.current.length : Q : ue(i, {
3247
3241
  startingIndex: j,
3248
3242
  decrement: !0,
3249
3243
  disabledIndices: x
3250
- }) : b.current = Math.max(P, ue(i, {
3244
+ }) : b.current = Math.max(S, ue(i, {
3251
3245
  startingIndex: j,
3252
3246
  decrement: !0,
3253
3247
  disabledIndices: x
@@ -3260,50 +3254,50 @@ function Ai(e, t) {
3260
3254
  ...W ? {} : q,
3261
3255
  onKeyDown: me,
3262
3256
  onPointerMove() {
3263
- S.current = !0;
3257
+ P.current = !0;
3264
3258
  }
3265
3259
  }), [q, me, C, W]), Re = f.useMemo(() => {
3266
- function M(P) {
3267
- y === "auto" && Zn(P.nativeEvent) && (T.current = !0);
3260
+ function M(S) {
3261
+ y === "auto" && Zn(S.nativeEvent) && (T.current = !0);
3268
3262
  }
3269
- function j(P) {
3270
- T.current = y, y === "auto" && er(P.nativeEvent) && (T.current = !0);
3263
+ function j(S) {
3264
+ T.current = y, y === "auto" && er(S.nativeEvent) && (T.current = !0);
3271
3265
  }
3272
3266
  return {
3273
3267
  ...q,
3274
- onKeyDown(P) {
3275
- S.current = !1;
3276
- const Q = P.key.startsWith("Arrow"), Z = ["Home", "End"].includes(P.key), ie = Q || Z, nt = Kn(P.key, C, h), at = Vn(P.key, C, h, k), rt = Kn(P.key, de(), h), ye = bt(P.key, C), $e = (d ? rt : ye) || P.key === "Enter" || P.key.trim() === "";
3268
+ onKeyDown(S) {
3269
+ P.current = !1;
3270
+ const Q = S.key.startsWith("Arrow"), Z = ["Home", "End"].includes(S.key), ie = Q || Z, nt = Kn(S.key, C, h), at = Vn(S.key, C, h, k), rt = Kn(S.key, de(), h), ye = bt(S.key, C), Ve = (d ? rt : ye) || S.key === "Enter" || S.key.trim() === "";
3277
3271
  if (m && n) {
3278
- const dt = O == null ? void 0 : O.nodesRef.current.find((mt) => mt.parentId == null), Le = O && dt ? Ur(O.nodesRef.current, dt.id) : null;
3279
- if (ie && Le && D) {
3272
+ const dt = O == null ? void 0 : O.nodesRef.current.find((mt) => mt.parentId == null), ke = O && dt ? Ur(O.nodesRef.current, dt.id) : null;
3273
+ if (ie && ke && D) {
3280
3274
  const mt = new KeyboardEvent("keydown", {
3281
- key: P.key,
3275
+ key: S.key,
3282
3276
  bubbles: !0
3283
3277
  });
3284
3278
  if (nt || at) {
3285
3279
  var ft, un;
3286
- const Tr = ((ft = Le.context) == null ? void 0 : ft.elements.domReference) === P.currentTarget, an = at && !Tr ? (un = Le.context) == null ? void 0 : un.elements.domReference : nt ? i.current.find((fn) => (fn == null ? void 0 : fn.id) === Me) : null;
3287
- an && (pe(P), an.dispatchEvent(mt), $(void 0));
3280
+ const Tr = ((ft = ke.context) == null ? void 0 : ft.elements.domReference) === S.currentTarget, an = at && !Tr ? (un = ke.context) == null ? void 0 : un.elements.domReference : nt ? i.current.find((fn) => (fn == null ? void 0 : fn.id) === Me) : null;
3281
+ an && (pe(S), an.dispatchEvent(mt), $(void 0));
3288
3282
  }
3289
- if ((ye || Z) && Le.context && Le.context.open && Le.parentId && P.currentTarget !== Le.context.elements.domReference) {
3283
+ if ((ye || Z) && ke.context && ke.context.open && ke.parentId && S.currentTarget !== ke.context.elements.domReference) {
3290
3284
  var ln;
3291
- pe(P), (ln = Le.context.elements.domReference) == null || ln.dispatchEvent(mt);
3285
+ pe(S), (ln = ke.context.elements.domReference) == null || ln.dispatchEvent(mt);
3292
3286
  return;
3293
3287
  }
3294
3288
  }
3295
- return me(P);
3289
+ return me(S);
3296
3290
  }
3297
3291
  if (!(!n && !v && Q)) {
3298
- if ($e) {
3299
- const dt = bt(P.key, de());
3300
- E.current = d && dt ? null : P.key;
3292
+ if (Ve) {
3293
+ const dt = bt(S.key, de());
3294
+ E.current = d && dt ? null : S.key;
3301
3295
  }
3302
3296
  if (d) {
3303
- rt && (pe(P), n ? (b.current = yt(i, te.current), w()) : r(!0, P.nativeEvent, "list-navigation"));
3297
+ rt && (pe(S), n ? (b.current = yt(i, te.current), w()) : r(!0, S.nativeEvent, "list-navigation"));
3304
3298
  return;
3305
3299
  }
3306
- ye && (l != null && (b.current = l), pe(P), !n && v ? r(!0, P.nativeEvent, "list-navigation") : me(P), n && w());
3300
+ ye && (l != null && (b.current = l), pe(S), !n && v ? r(!0, S.nativeEvent, "list-navigation") : me(S), n && w());
3307
3301
  }
3308
3302
  },
3309
3303
  onFocus() {
@@ -3409,7 +3403,7 @@ function oi(e, t) {
3409
3403
  }
3410
3404
  }, [e, n, t]), n;
3411
3405
  }
3412
- function Si(e, t) {
3406
+ function Pi(e, t) {
3413
3407
  t === void 0 && (t = {});
3414
3408
  const {
3415
3409
  open: n,
@@ -3443,27 +3437,27 @@ export {
3443
3437
  pi as C,
3444
3438
  bi as F,
3445
3439
  gi as a,
3446
- mi as b,
3447
- di as c,
3448
- Ii as d,
3449
- Ei as e,
3450
- fi as f,
3451
- Ci as g,
3452
- Mi as h,
3453
- Oi as i,
3440
+ et as b,
3441
+ hi as c,
3442
+ vi as d,
3443
+ xi as e,
3444
+ Lo as f,
3445
+ wi as g,
3446
+ fi as h,
3447
+ Ii as i,
3454
3448
  ui as j,
3455
- et as k,
3456
- hi as l,
3457
- vi as m,
3458
- xi as n,
3449
+ Ci as k,
3450
+ Mi as l,
3451
+ Oi as m,
3452
+ Ai as n,
3459
3453
  li as o,
3460
- Lo as p,
3461
- wi as q,
3462
- Ai as r,
3463
- ai as s,
3464
- yi as t,
3454
+ mi as p,
3455
+ ai as q,
3456
+ yi as r,
3457
+ di as s,
3458
+ Ti as t,
3465
3459
  Fo as u,
3466
- Ti as v,
3467
- Si as w,
3460
+ Ei as v,
3461
+ Pi as w,
3468
3462
  Ri as x
3469
3463
  };