@iress-oss/ids-components 0.0.1-dev.9 → 5.13.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 (747) hide show
  1. package/dist/AutocompleteNoResults-Bk7q5K89.js +12 -0
  2. package/dist/ComboboxHiddenInput-BRgHrfvH.js +32 -0
  3. package/dist/FieldAppendToLabel-B7A85TG1.js +75 -0
  4. package/dist/InputBase-K0leqZnv.js +56 -0
  5. package/dist/Loading-CZ64hUvP.js +5638 -0
  6. package/dist/LogoFromSrc-tAhdMB9Y.js +59 -0
  7. package/dist/MenuItem.module-Br0lJU3k.js +24 -0
  8. package/dist/Popover.module-COHnD5HM.js +11 -0
  9. package/dist/SelectControl-415DMBPp.js +47 -0
  10. package/dist/SliderTicks-B6vu-MUH.js +78 -0
  11. package/dist/StartUpLoading-DpO7RfDY.js +145 -0
  12. package/dist/TabSet.module-Bje9oAao.js +13 -0
  13. package/dist/Table.module-CSNtX5ab.js +32 -0
  14. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  15. package/dist/components/Alert/Alert.js +11 -0
  16. package/dist/components/Alert/Alert.types.js +9 -0
  17. package/dist/components/Alert/index.js +6 -0
  18. package/dist/components/Autocomplete/Autocomplete.js +43 -0
  19. package/dist/components/Autocomplete/Autocomplete.types.js +1 -0
  20. package/dist/components/Autocomplete/components/AutocompleteNoResults.js +5 -0
  21. package/dist/components/Autocomplete/hooks/useAutocompleteFlags.js +16 -0
  22. package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +112 -0
  23. package/dist/components/Autocomplete/index.js +6 -0
  24. package/dist/components/Badge/Badge.js +49 -0
  25. package/dist/components/Badge/Badge.types.js +15 -0
  26. package/dist/components/Badge/index.js +7 -0
  27. package/dist/components/Button/Button.js +10 -0
  28. package/dist/components/Button/Button.types.js +20 -0
  29. package/dist/components/Button/CloseButton/CloseButton.js +7 -0
  30. package/dist/components/Button/CloseButton/CloseButton.types.js +1 -0
  31. package/dist/components/Button/index.js +11 -0
  32. package/dist/components/ButtonGroup/ButtonGroup.js +72 -0
  33. package/dist/components/ButtonGroup/ButtonGroup.types.js +1 -0
  34. package/dist/components/ButtonGroup/ButtonGroupProvider.js +34 -0
  35. package/dist/components/ButtonGroup/hooks/useButtonGroup.js +6 -0
  36. package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +6 -0
  37. package/dist/components/ButtonGroup/index.js +6 -0
  38. package/dist/components/Card/Card.js +50 -0
  39. package/dist/components/Card/Card.types.js +5 -0
  40. package/dist/components/Card/components/ButtonCard.js +38 -0
  41. package/dist/components/Card/components/LinkCard.js +37 -0
  42. package/dist/components/Card/helpers/composeIDSCard.js +27 -0
  43. package/dist/components/Card/helpers/composeIDSCardSlots.js +33 -0
  44. package/dist/components/Card/index.js +15 -0
  45. package/dist/components/Checkbox/Checkbox.js +15 -0
  46. package/dist/components/Checkbox/Checkbox.types.js +1 -0
  47. package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +19 -0
  48. package/dist/components/Checkbox/index.js +4 -0
  49. package/dist/components/CheckboxGroup/CheckboxGroup.js +100 -0
  50. package/dist/components/CheckboxGroup/CheckboxGroup.types.js +11 -0
  51. package/dist/components/CheckboxGroup/CheckboxGroupContext.js +5 -0
  52. package/dist/components/CheckboxGroup/index.js +7 -0
  53. package/dist/components/CheckboxMark/CheckboxMark.js +40 -0
  54. package/dist/components/CheckboxMark/CheckboxMark.types.js +16 -0
  55. package/dist/components/CheckboxMark/index.js +6 -0
  56. package/dist/components/Col/Col.js +33 -0
  57. package/dist/components/Col/Col.types.js +66 -0
  58. package/dist/components/Col/index.js +12 -0
  59. package/dist/components/Combobox/Combobox.js +46 -0
  60. package/dist/components/Combobox/Combobox.types.js +1 -0
  61. package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +44 -0
  62. package/dist/components/Combobox/MultiCombobox/MultiCombobox.types.js +1 -0
  63. package/dist/components/Combobox/components/ComboboxHiddenInput.js +8 -0
  64. package/dist/components/Combobox/components/ComboboxResults.js +39 -0
  65. package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +38 -0
  66. package/dist/components/Combobox/hooks/useComboboxFlags.js +15 -0
  67. package/dist/components/Combobox/hooks/useComboboxInlineCompletion.js +63 -0
  68. package/dist/components/Combobox/index.js +5 -0
  69. package/dist/components/Container/Container.js +21 -0
  70. package/dist/components/Container/Container.types.js +4 -0
  71. package/dist/components/Container/index.js +6 -0
  72. package/dist/components/Divider/Divider.js +21 -0
  73. package/dist/components/Divider/Divider.types.js +4 -0
  74. package/dist/components/Divider/index.js +6 -0
  75. package/dist/components/Expander/Expander.js +80 -0
  76. package/dist/components/Expander/Expander.types.js +6 -0
  77. package/dist/components/Expander/index.js +7 -0
  78. package/dist/components/Field/Field.js +71 -0
  79. package/dist/components/Field/Field.types.js +1 -0
  80. package/dist/components/Field/FieldGroup/FieldGroup.js +77 -0
  81. package/dist/components/Field/FieldGroup/FieldGroup.types.js +1 -0
  82. package/dist/components/Field/components/FieldAppendToLabel.js +41 -0
  83. package/dist/components/Field/components/FieldLegend.js +6 -0
  84. package/dist/components/Field/helpers/getUniqueItemsByKey.js +8 -0
  85. package/dist/components/Field/index.js +6 -0
  86. package/dist/components/Filter/Filter.js +43 -0
  87. package/dist/components/Filter/Filter.types.js +1 -0
  88. package/dist/components/Filter/components/FilterLabel.js +10 -0
  89. package/dist/components/Filter/components/FilterResetButton.js +37 -0
  90. package/dist/components/Filter/components/FilterSearch.js +37 -0
  91. package/dist/components/Filter/hooks/useFilterFlags.js +25 -0
  92. package/dist/components/Filter/index.js +4 -0
  93. package/dist/components/Form/Form.js +6 -0
  94. package/dist/components/Form/Form.types.js +4 -0
  95. package/dist/components/Form/FormContext.js +7 -0
  96. package/dist/components/Form/FormField/FormField.js +88 -0
  97. package/dist/components/Form/FormField/FormField.types.js +4 -0
  98. package/dist/components/Form/FormField/FormFieldset.js +82 -0
  99. package/dist/components/Form/FormField/helpers/getErrorTypeMessage.js +19 -0
  100. package/dist/components/Form/FormField/helpers/transformCustomRulesToValidateRule.js +34 -0
  101. package/dist/components/Form/HookForm/HookForm.js +12 -0
  102. package/dist/components/Form/components/FormValidationSummary.js +24 -0
  103. package/dist/components/Form/hooks/useNoDefaultValueInForms.js +15 -0
  104. package/dist/components/Form/index.js +13 -0
  105. package/dist/components/HeadingWithDeprecatedFallback/HeadingWithDeprecatedFallback.js +14 -0
  106. package/dist/components/Hide/Hide.js +7 -0
  107. package/dist/components/Hide/Hide.types.js +5 -0
  108. package/dist/components/Hide/helpers/composeHideClasses.js +38 -0
  109. package/dist/components/Hide/index.js +7 -0
  110. package/dist/components/Icon/Icon.js +38 -0
  111. package/dist/components/Icon/Icon.types.js +31 -0
  112. package/dist/components/Icon/index.js +15 -0
  113. package/dist/components/Inline/Inline.js +39 -0
  114. package/dist/components/Inline/Inline.types.js +4 -0
  115. package/dist/components/Inline/index.js +6 -0
  116. package/dist/components/Input/ClearButton/ClearButton.js +20 -0
  117. package/dist/components/Input/Input.js +14 -0
  118. package/dist/components/Input/Input.types.js +16 -0
  119. package/dist/components/Input/InputBase/InputBase.js +9 -0
  120. package/dist/components/Input/InputBase/InputBase.types.js +1 -0
  121. package/dist/components/Input/index.js +7 -0
  122. package/dist/components/InputCurrency/InputCurrency.js +8 -0
  123. package/dist/components/InputCurrency/InputCurrency.types.js +1 -0
  124. package/dist/components/InputCurrency/index.js +4 -0
  125. package/dist/components/Label/Label.js +6 -0
  126. package/dist/components/Label/Label.types.js +1 -0
  127. package/dist/components/Label/LabelBase/LabelBase.js +70 -0
  128. package/dist/components/Label/LabelBase/LabelBase.types.js +1 -0
  129. package/dist/components/Label/index.js +4 -0
  130. package/dist/components/Menu/Menu.js +64 -0
  131. package/dist/components/Menu/Menu.types.js +10 -0
  132. package/dist/components/Menu/MenuDivider/MenuDivider.js +37 -0
  133. package/dist/components/Menu/MenuHeading/MenuHeading.js +8 -0
  134. package/dist/components/Menu/MenuItem/MenuItem.js +11 -0
  135. package/dist/components/Menu/MenuItem/MenuItem.types.js +6 -0
  136. package/dist/components/Menu/MenuItem/hooks/useMenuItemAria.js +17 -0
  137. package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +47 -0
  138. package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +15 -0
  139. package/dist/components/Menu/MenuItem/hooks/useMenuItemInteractions.js +67 -0
  140. package/dist/components/Menu/MenuItem/hooks/useMenuItemRole.js +9 -0
  141. package/dist/components/Menu/MenuProvider.js +67 -0
  142. package/dist/components/Menu/MenuText/MenuText.js +38 -0
  143. package/dist/components/Menu/helpers/mapMenuItems.js +47 -0
  144. package/dist/components/Menu/hooks/useMenu.js +6 -0
  145. package/dist/components/Menu/hooks/useMenuAria.js +19 -0
  146. package/dist/components/Menu/hooks/useMenuComposite.js +9 -0
  147. package/dist/components/Menu/hooks/useMenuRole.js +13 -0
  148. package/dist/components/Menu/hooks/useMenuStyles.js +26 -0
  149. package/dist/components/Menu/index.js +29 -0
  150. package/dist/components/Modal/Modal.js +16 -0
  151. package/dist/components/Modal/Modal.types.js +4 -0
  152. package/dist/components/Modal/ModalProvider.js +32 -0
  153. package/dist/components/Modal/hooks/useIDSProvidedModal.js +13 -0
  154. package/dist/components/Modal/hooks/useModal.js +17 -0
  155. package/dist/components/Modal/index.js +11 -0
  156. package/dist/components/Navbar/Navbar.js +13 -0
  157. package/dist/components/Navbar/Navbar.types.js +4 -0
  158. package/dist/components/Navbar/components/HomeLinkContent.js +6 -0
  159. package/dist/components/Navbar/components/LogoFromSrc.js +6 -0
  160. package/dist/components/Navbar/components/NavbarLogo.js +8 -0
  161. package/dist/components/Navbar/index.js +6 -0
  162. package/dist/components/Panel/Panel.js +36 -0
  163. package/dist/components/Panel/Panel.types.js +12 -0
  164. package/dist/components/Panel/index.js +8 -0
  165. package/dist/components/Placeholder/Placeholder.js +42 -0
  166. package/dist/components/Placeholder/Placeholder.types.js +1 -0
  167. package/dist/components/Placeholder/index.js +4 -0
  168. package/dist/components/Popover/InputPopover/InputPopover.js +85 -0
  169. package/dist/components/Popover/InputPopover/InputPopover.types.js +1 -0
  170. package/dist/components/Popover/InputPopover/InputPopoverActivator.js +62 -0
  171. package/dist/components/Popover/InputPopover/InputPopoverProvider.js +101 -0
  172. package/dist/components/Popover/Popover.js +95 -0
  173. package/dist/components/Popover/Popover.types.js +15 -0
  174. package/dist/components/Popover/PopoverProvider.js +113 -0
  175. package/dist/components/Popover/components/PopoverActivator.js +88 -0
  176. package/dist/components/Popover/components/PopoverContent.js +59 -0
  177. package/dist/components/Popover/helpers/composeFloatingProps.js +33 -0
  178. package/dist/components/Popover/helpers/composePopoverWidth.js +4 -0
  179. package/dist/components/Popover/helpers/handlePopoverTabKey.js +27 -0
  180. package/dist/components/Popover/helpers/hasFocus.js +8 -0
  181. package/dist/components/Popover/hooks/usePopover.js +6 -0
  182. package/dist/components/Popover/hooks/usePopoverActivatorInteractions.js +28 -0
  183. package/dist/components/Popover/hooks/usePopoverAria.js +18 -0
  184. package/dist/components/Popover/hooks/usePopoverImperativeHandle.js +25 -0
  185. package/dist/components/Popover/hooks/usePopoverItem.js +18 -0
  186. package/dist/components/Popover/hooks/usePopoverNavigation.js +32 -0
  187. package/dist/components/Popover/hooks/usePopoverState.js +29 -0
  188. package/dist/components/Popover/index.js +13 -0
  189. package/dist/components/Progress/Progress.js +52 -0
  190. package/dist/components/Progress/Progress.types.js +1 -0
  191. package/dist/components/Progress/index.js +4 -0
  192. package/dist/components/Radio/Radio.js +11 -0
  193. package/dist/components/Radio/Radio.types.js +1 -0
  194. package/dist/components/Radio/helpers/mapRadioGroupOptions.js +19 -0
  195. package/dist/components/Radio/index.js +4 -0
  196. package/dist/components/RadioGroup/RadioGroup.js +86 -0
  197. package/dist/components/RadioGroup/RadioGroup.types.js +12 -0
  198. package/dist/components/RadioGroup/RadioGroupContext.js +5 -0
  199. package/dist/components/RadioGroup/index.js +7 -0
  200. package/dist/components/Readonly/Readonly.js +41 -0
  201. package/dist/components/Readonly/Readonly.types.js +1 -0
  202. package/dist/components/Readonly/index.js +4 -0
  203. package/dist/components/RichSelect/RichSelect.js +40 -0
  204. package/dist/components/RichSelect/RichSelect.types.js +1 -0
  205. package/dist/components/RichSelect/SelectBody/SelectBody.js +54 -0
  206. package/dist/components/RichSelect/SelectBody/SelectBody.types.js +1 -0
  207. package/dist/components/RichSelect/SelectCreate/SelectCreate.js +61 -0
  208. package/dist/components/RichSelect/SelectCreate/SelectCreate.types.js +1 -0
  209. package/dist/components/RichSelect/SelectHeading/SelectHeading.js +38 -0
  210. package/dist/components/RichSelect/SelectHeading/SelectHeading.types.js +1 -0
  211. package/dist/components/RichSelect/SelectLabel/SelectLabel.js +12 -0
  212. package/dist/components/RichSelect/SelectLabel/SelectLabel.types.js +1 -0
  213. package/dist/components/RichSelect/SelectMenu/SelectMenu.js +42 -0
  214. package/dist/components/RichSelect/SelectMenu/SelectMenu.types.js +1 -0
  215. package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +37 -0
  216. package/dist/components/RichSelect/SelectSearch/SelectSearch.js +37 -0
  217. package/dist/components/RichSelect/SelectSearch/SelectSearch.types.js +1 -0
  218. package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +8 -0
  219. package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.types.js +1 -0
  220. package/dist/components/RichSelect/SelectTags/SelectTags.js +43 -0
  221. package/dist/components/RichSelect/SelectTags/SelectTags.types.js +1 -0
  222. package/dist/components/RichSelect/components/SelectActivator.js +7 -0
  223. package/dist/components/RichSelect/components/SelectHiddenInput.js +29 -0
  224. package/dist/components/RichSelect/components/SelectOptions.js +38 -0
  225. package/dist/components/RichSelect/hooks/useRichSelectState.js +18 -0
  226. package/dist/components/RichSelect/index.js +16 -0
  227. package/dist/components/Row/Row.js +39 -0
  228. package/dist/components/Row/Row.types.js +4 -0
  229. package/dist/components/Row/index.js +6 -0
  230. package/dist/components/Select/Select.js +14 -0
  231. package/dist/components/Select/Select.types.js +1 -0
  232. package/dist/components/Select/SelectOption/SelectOption.js +9 -0
  233. package/dist/components/Select/components/SelectControl.js +9 -0
  234. package/dist/components/Select/components/SelectReadonly.js +38 -0
  235. package/dist/components/Select/helpers/mapSelectOptions.js +21 -0
  236. package/dist/components/Select/helpers/nodesToSelectOptions.js +9 -0
  237. package/dist/components/Select/index.js +9 -0
  238. package/dist/components/Skeleton/Skeleton.js +44 -0
  239. package/dist/components/Skeleton/Skeleton.types.js +6 -0
  240. package/dist/components/Skeleton/index.js +7 -0
  241. package/dist/components/SkipLink/SkipLink.js +30 -0
  242. package/dist/components/SkipLink/SkipLink.types.js +1 -0
  243. package/dist/components/SkipLink/index.js +4 -0
  244. package/dist/components/Slideout/Slideout.js +16 -0
  245. package/dist/components/Slideout/Slideout.types.js +14 -0
  246. package/dist/components/Slideout/SlideoutProvider.js +91 -0
  247. package/dist/components/Slideout/components/SlideoutInner.js +7 -0
  248. package/dist/components/Slideout/hooks/useIDSProvidedSlideout.js +13 -0
  249. package/dist/components/Slideout/hooks/useSlideout.js +17 -0
  250. package/dist/components/Slideout/index.js +16 -0
  251. package/dist/components/Slider/Slider.js +12 -0
  252. package/dist/components/Slider/Slider.types.js +1 -0
  253. package/dist/components/Slider/components/SliderTicks.js +10 -0
  254. package/dist/components/Slider/index.js +4 -0
  255. package/dist/components/Spinner/Spinner.js +6 -0
  256. package/dist/components/Spinner/Spinner.types.js +1 -0
  257. package/dist/components/Spinner/index.js +4 -0
  258. package/dist/components/Stack/Stack.js +26 -0
  259. package/dist/components/Stack/Stack.types.js +4 -0
  260. package/dist/components/Stack/index.js +6 -0
  261. package/dist/components/TabSet/Tab/Tab.js +88 -0
  262. package/dist/components/TabSet/Tab/Tab.types.js +1 -0
  263. package/dist/components/TabSet/TabSet.js +59 -0
  264. package/dist/components/TabSet/TabSet.types.js +6 -0
  265. package/dist/components/TabSet/TabSetProvider.js +50 -0
  266. package/dist/components/TabSet/components/TabSetItem.js +45 -0
  267. package/dist/components/TabSet/helpers/mapTabs.js +33 -0
  268. package/dist/components/TabSet/hooks/useTabSetItems.js +6 -0
  269. package/dist/components/TabSet/index.js +11 -0
  270. package/dist/components/Table/Table.js +17 -0
  271. package/dist/components/Table/Table.types.js +23 -0
  272. package/dist/components/Table/TableBody/TableBody.js +125 -0
  273. package/dist/components/Table/TableBody/TableBody.types.js +1 -0
  274. package/dist/components/Table/TableContext.js +11 -0
  275. package/dist/components/Table/TableFormattedValue/TableFormattedValue.js +17 -0
  276. package/dist/components/Table/TableFormattedValue/TableFormattedValue.types.js +1 -0
  277. package/dist/components/Table/TableProvider.js +34 -0
  278. package/dist/components/Table/components/TableBodyCell.js +31 -0
  279. package/dist/components/Table/components/TableEmpty.js +12 -0
  280. package/dist/components/Table/components/TableHeader.js +8 -0
  281. package/dist/components/Table/components/TableHeaderCell.js +8 -0
  282. package/dist/components/Table/components/TableRows.js +49 -0
  283. package/dist/components/Table/components/TableSortButton.js +7 -0
  284. package/dist/components/Table/helpers/composeIDSTableColumnDefs.js +42 -0
  285. package/dist/components/Table/helpers/composeIDSTableInitialSorting.js +10 -0
  286. package/dist/components/Table/helpers/findColumnByKey.js +4 -0
  287. package/dist/components/Table/helpers/getFormatFromValue.js +11 -0
  288. package/dist/components/Table/helpers/hasColumns.js +4 -0
  289. package/dist/components/Table/hooks/useIDSTableColumnSort.js +24 -0
  290. package/dist/components/Table/hooks/useIDSTableColumnStyles.js +25 -0
  291. package/dist/components/Table/hooks/useTable.js +6 -0
  292. package/dist/components/Table/index.js +15 -0
  293. package/dist/components/Tag/Tag.js +8 -0
  294. package/dist/components/Tag/Tag.types.js +1 -0
  295. package/dist/components/Tag/TagInput/TagInput.js +8 -0
  296. package/dist/components/Tag/TagInput/TagInput.types.js +1 -0
  297. package/dist/components/Tag/components/TagListInput/TagListInput.js +8 -0
  298. package/dist/components/Tag/components/TagListInput/TagListInput.types.js +1 -0
  299. package/dist/components/Tag/index.js +5 -0
  300. package/dist/components/Text/Text.js +34 -0
  301. package/dist/components/Text/Text.types.js +19 -0
  302. package/dist/components/Text/index.js +6 -0
  303. package/dist/components/Toaster/Toast/Toast.js +13 -0
  304. package/dist/components/Toaster/Toast/Toast.types.js +10 -0
  305. package/dist/components/Toaster/Toast/ToastAnimated.js +9 -0
  306. package/dist/components/Toaster/Toast/ToastIcon.js +6 -0
  307. package/dist/components/Toaster/Toaster.js +11 -0
  308. package/dist/components/Toaster/Toaster.types.js +26 -0
  309. package/dist/components/Toaster/ToasterProvider.js +7 -0
  310. package/dist/components/Toaster/hooks/useToaster.js +5 -0
  311. package/dist/components/Toaster/index.js +16 -0
  312. package/dist/components/Toggle/Toggle.js +101 -0
  313. package/dist/components/Toggle/Toggle.types.js +11 -0
  314. package/dist/components/Toggle/index.js +7 -0
  315. package/dist/components/Tooltip/Tooltip.js +77 -0
  316. package/dist/components/Tooltip/Tooltip.types.js +1 -0
  317. package/dist/components/Tooltip/index.js +4 -0
  318. package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +51 -0
  319. package/dist/components/ValidationMessage/ValidationBase/ValidationBase.types.js +1 -0
  320. package/dist/components/ValidationMessage/ValidationLink/ValidationLink.js +21 -0
  321. package/dist/components/ValidationMessage/ValidationLink/ValidationLink.types.js +1 -0
  322. package/dist/components/ValidationMessage/ValidationMessage.js +8 -0
  323. package/dist/components/ValidationMessage/ValidationMessage.types.js +1 -0
  324. package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +69 -0
  325. package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.types.js +1 -0
  326. package/dist/components/ValidationMessage/index.js +8 -0
  327. package/dist/constants/index.css +1 -0
  328. package/dist/constants/index.scss +2 -0
  329. package/dist/constants.js +193 -0
  330. package/dist/enums.js +22 -0
  331. package/dist/floating-ui.react-D_ysmiM3.js +3442 -0
  332. package/dist/fuzzysort-CuIReeYY.js +393 -0
  333. package/dist/helpers/dom/focusableElements.js +10 -0
  334. package/dist/helpers/dom/getActiveElement.js +9 -0
  335. package/dist/helpers/dom/hasShadowDom.js +4 -0
  336. package/dist/helpers/form/getFormControlValueAsString.js +4 -0
  337. package/dist/helpers/form/getFormControlValueAsStringIfDefined.js +8 -0
  338. package/dist/helpers/form/getValueAsEvent.js +7 -0
  339. package/dist/helpers/form/isValidFormInputElement.js +4 -0
  340. package/dist/helpers/formatting/capitalizeFirstLetter.js +4 -0
  341. package/dist/helpers/formatting/formatCurrency.js +22 -0
  342. package/dist/helpers/formatting/formatDate.js +23 -0
  343. package/dist/helpers/formatting/formatDateTime.js +49 -0
  344. package/dist/helpers/formatting/formatObjectKey.js +4 -0
  345. package/dist/helpers/formatting/formatPercentage.js +7 -0
  346. package/dist/helpers/formatting/stringReplacer.js +9 -0
  347. package/dist/helpers/formatting/toArray.js +4 -0
  348. package/dist/helpers/formatting/toCSSLengthValue.js +7 -0
  349. package/dist/helpers/label-value/composeLabelValueDescriptor.js +13 -0
  350. package/dist/helpers/label-value/getQueryRangeExclusive.js +14 -0
  351. package/dist/helpers/label-value/getValueFromLabelValues.js +9 -0
  352. package/dist/helpers/label-value/highlightQueryInLabel.js +9 -0
  353. package/dist/helpers/label-value/highlightQueryInLabelValue.js +8 -0
  354. package/dist/helpers/label-value/searchLabelValues.js +10 -0
  355. package/dist/helpers/responsive/getResponsiveLayoutModifiers.js +11 -0
  356. package/dist/helpers/responsive/getResponsivePaddingClasses.js +11 -0
  357. package/dist/helpers/transition/getTransitionDuration.js +10 -0
  358. package/dist/helpers/transition/timeStringToNumber.js +4 -0
  359. package/dist/helpers/utility/generateScopedName.js +9 -0
  360. package/dist/helpers/utility/idsLogger.js +10 -0
  361. package/dist/helpers/utility/propagateTestid.js +4 -0
  362. package/dist/hooks/index.js +11 -0
  363. package/dist/hooks/useAriaRelationship.js +38 -0
  364. package/dist/hooks/useBreakpoint.js +20 -0
  365. package/dist/hooks/useControlledState.js +54 -0
  366. package/dist/hooks/useIdIfNeeded.js +8 -0
  367. package/dist/hooks/useResponsiveProps.js +25 -0
  368. package/dist/index-CmsyHM_3.js +1703 -0
  369. package/dist/index-CtOScEKX.js +57 -0
  370. package/dist/index-Cu0xwYjD.js +42 -0
  371. package/dist/index.esm-BnSuefUA.js +196 -0
  372. package/dist/interfaces.js +1 -0
  373. package/dist/main.js +331 -0
  374. package/dist/patterns/Loading/Loading.js +7 -0
  375. package/dist/patterns/Loading/components/ComponentLoading.js +10 -0
  376. package/dist/patterns/Loading/components/DefaultLoading.js +9 -0
  377. package/dist/patterns/Loading/components/PageLoading.js +14 -0
  378. package/dist/patterns/Loading/components/StartUpLoading.js +11 -0
  379. package/dist/patterns/Loading/components/ValidateLoading.js +9 -0
  380. package/dist/patterns/Loading/hooks/useShouldRenderLoading.js +20 -0
  381. package/dist/patterns/Loading/index.js +4 -0
  382. package/dist/setupTests.d.ts +0 -0
  383. package/dist/src/components/Alert/Alert.d.ts +9 -0
  384. package/dist/src/components/Alert/Alert.types.d.ts +41 -0
  385. package/dist/src/components/Alert/index.d.ts +2 -0
  386. package/dist/src/components/Autocomplete/Autocomplete.d.ts +3 -0
  387. package/dist/src/components/Autocomplete/Autocomplete.types.d.ts +106 -0
  388. package/dist/src/components/Autocomplete/components/AutocompleteNoResults.d.ts +2 -0
  389. package/dist/src/components/Autocomplete/hooks/useAutocompleteFlags.d.ts +5 -0
  390. package/dist/src/components/Autocomplete/hooks/useAutocompleteSearch.d.ts +2 -0
  391. package/dist/src/components/Autocomplete/index.d.ts +3 -0
  392. package/dist/src/components/Badge/Badge.d.ts +2 -0
  393. package/dist/src/components/Badge/Badge.types.d.ts +37 -0
  394. package/dist/src/components/Badge/index.d.ts +2 -0
  395. package/dist/src/components/Button/Button.d.ts +2 -0
  396. package/dist/src/components/Button/Button.types.d.ts +106 -0
  397. package/dist/src/components/Button/CloseButton/CloseButton.d.ts +3 -0
  398. package/dist/src/components/Button/CloseButton/CloseButton.types.d.ts +8 -0
  399. package/dist/src/components/Button/index.d.ts +4 -0
  400. package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +2 -0
  401. package/dist/src/components/ButtonGroup/ButtonGroup.types.d.ts +63 -0
  402. package/dist/src/components/ButtonGroup/ButtonGroupProvider.d.ts +3 -0
  403. package/dist/src/components/ButtonGroup/hooks/useButtonGroup.d.ts +1 -0
  404. package/dist/src/components/ButtonGroup/hooks/useIDSButtonGroupItem.d.ts +2 -0
  405. package/dist/src/components/ButtonGroup/index.d.ts +3 -0
  406. package/dist/src/components/Card/Card.d.ts +2 -0
  407. package/dist/src/components/Card/Card.types.d.ts +91 -0
  408. package/dist/src/components/Card/components/ButtonCard.d.ts +2 -0
  409. package/dist/src/components/Card/components/LinkCard.d.ts +2 -0
  410. package/dist/src/components/Card/helpers/composeIDSCard.d.ts +3 -0
  411. package/dist/src/components/Card/helpers/composeIDSCardSlots.d.ts +2 -0
  412. package/dist/src/components/Card/index.d.ts +6 -0
  413. package/dist/src/components/Checkbox/Checkbox.d.ts +2 -0
  414. package/dist/src/components/Checkbox/Checkbox.types.d.ts +65 -0
  415. package/dist/src/components/Checkbox/helpers/mapCheckboxGroupOptions.d.ts +5 -0
  416. package/dist/src/components/Checkbox/index.d.ts +2 -0
  417. package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +2 -0
  418. package/dist/src/components/CheckboxGroup/CheckboxGroup.types.d.ts +70 -0
  419. package/dist/src/components/CheckboxGroup/CheckboxGroupContext.d.ts +2 -0
  420. package/dist/src/components/CheckboxGroup/index.d.ts +2 -0
  421. package/dist/src/components/CheckboxMark/CheckboxMark.d.ts +2 -0
  422. package/dist/src/components/CheckboxMark/CheckboxMark.types.d.ts +11 -0
  423. package/dist/src/components/CheckboxMark/index.d.ts +2 -0
  424. package/dist/src/components/Col/Col.d.ts +2 -0
  425. package/dist/src/components/Col/Col.types.d.ts +78 -0
  426. package/dist/src/components/Col/index.d.ts +2 -0
  427. package/dist/src/components/Combobox/Combobox.d.ts +6 -0
  428. package/dist/src/components/Combobox/Combobox.types.d.ts +55 -0
  429. package/dist/src/components/Combobox/MultiCombobox/MultiCombobox.d.ts +6 -0
  430. package/dist/src/components/Combobox/MultiCombobox/MultiCombobox.types.d.ts +27 -0
  431. package/dist/src/components/Combobox/components/ComboboxHiddenInput.d.ts +2 -0
  432. package/dist/src/components/Combobox/components/ComboboxResults.d.ts +2 -0
  433. package/dist/src/components/Combobox/components/ComboboxResultsDescriptor.d.ts +2 -0
  434. package/dist/src/components/Combobox/hooks/useComboboxFlags.d.ts +5 -0
  435. package/dist/src/components/Combobox/hooks/useComboboxInlineCompletion.d.ts +2 -0
  436. package/dist/src/components/Combobox/index.d.ts +4 -0
  437. package/dist/src/components/Container/Container.d.ts +2 -0
  438. package/dist/src/components/Container/Container.types.d.ts +15 -0
  439. package/dist/src/components/Container/index.d.ts +2 -0
  440. package/dist/src/components/Divider/Divider.d.ts +2 -0
  441. package/dist/src/components/Divider/Divider.types.d.ts +17 -0
  442. package/dist/src/components/Divider/index.d.ts +2 -0
  443. package/dist/src/components/Expander/Expander.d.ts +2 -0
  444. package/dist/src/components/Expander/Expander.types.d.ts +39 -0
  445. package/dist/src/components/Expander/index.d.ts +2 -0
  446. package/dist/src/components/Field/Field.d.ts +2 -0
  447. package/dist/src/components/Field/Field.types.d.ts +34 -0
  448. package/dist/src/components/Field/FieldGroup/FieldGroup.d.ts +2 -0
  449. package/dist/src/components/Field/FieldGroup/FieldGroup.types.d.ts +15 -0
  450. package/dist/src/components/Field/components/FieldAppendToLabel.d.ts +2 -0
  451. package/dist/src/components/Field/components/FieldLegend.d.ts +2 -0
  452. package/dist/src/components/Field/helpers/getUniqueItemsByKey.d.ts +1 -0
  453. package/dist/src/components/Field/index.d.ts +4 -0
  454. package/dist/src/components/Filter/Filter.d.ts +2 -0
  455. package/dist/src/components/Filter/Filter.types.d.ts +71 -0
  456. package/dist/src/components/Filter/components/FilterLabel.d.ts +2 -0
  457. package/dist/src/components/Filter/components/FilterResetButton.d.ts +2 -0
  458. package/dist/src/components/Filter/components/FilterSearch.d.ts +3 -0
  459. package/dist/src/components/Filter/hooks/useFilterFlags.d.ts +7 -0
  460. package/dist/src/components/Filter/index.d.ts +2 -0
  461. package/dist/src/components/Form/Form.d.ts +11 -0
  462. package/dist/src/components/Form/Form.types.d.ts +179 -0
  463. package/dist/src/components/Form/FormContext.d.ts +8 -0
  464. package/dist/src/components/Form/FormField/FormField.d.ts +7 -0
  465. package/dist/src/components/Form/FormField/FormField.types.d.ts +105 -0
  466. package/dist/src/components/Form/FormField/FormFieldset.d.ts +7 -0
  467. package/dist/src/components/Form/FormField/helpers/getErrorTypeMessage.d.ts +2 -0
  468. package/dist/src/components/Form/FormField/helpers/transformCustomRulesToValidateRule.d.ts +3 -0
  469. package/dist/src/components/Form/HookForm/HookForm.d.ts +5 -0
  470. package/dist/src/components/Form/components/FormValidationSummary.d.ts +5 -0
  471. package/dist/src/components/Form/hooks/useNoDefaultValueInForms.d.ts +8 -0
  472. package/dist/src/components/Form/index.d.ts +6 -0
  473. package/dist/src/components/HeadingWithDeprecatedFallback/HeadingWithDeprecatedFallback.d.ts +10 -0
  474. package/dist/src/components/Hide/Hide.d.ts +2 -0
  475. package/dist/src/components/Hide/Hide.types.d.ts +24 -0
  476. package/dist/src/components/Hide/helpers/composeHideClasses.d.ts +4 -0
  477. package/dist/src/components/Hide/index.d.ts +2 -0
  478. package/dist/src/components/Icon/Icon.d.ts +2 -0
  479. package/dist/src/components/Icon/Icon.types.d.ts +99 -0
  480. package/dist/src/components/Icon/index.d.ts +2 -0
  481. package/dist/src/components/Inline/Inline.d.ts +2 -0
  482. package/dist/src/components/Inline/Inline.types.d.ts +41 -0
  483. package/dist/src/components/Inline/index.d.ts +2 -0
  484. package/dist/src/components/Input/ClearButton/ClearButton.d.ts +4 -0
  485. package/dist/src/components/Input/Input.d.ts +14 -0
  486. package/dist/src/components/Input/Input.types.d.ts +73 -0
  487. package/dist/src/components/Input/InputBase/InputBase.d.ts +9 -0
  488. package/dist/src/components/Input/InputBase/InputBase.types.d.ts +15 -0
  489. package/dist/src/components/Input/index.d.ts +3 -0
  490. package/dist/src/components/InputCurrency/InputCurrency.d.ts +4 -0
  491. package/dist/src/components/InputCurrency/InputCurrency.types.d.ts +23 -0
  492. package/dist/src/components/InputCurrency/index.d.ts +2 -0
  493. package/dist/src/components/Label/Label.d.ts +2 -0
  494. package/dist/src/components/Label/Label.types.d.ts +15 -0
  495. package/dist/src/components/Label/LabelBase/LabelBase.d.ts +2 -0
  496. package/dist/src/components/Label/LabelBase/LabelBase.types.d.ts +35 -0
  497. package/dist/src/components/Label/index.d.ts +2 -0
  498. package/dist/src/components/Menu/Menu.d.ts +2 -0
  499. package/dist/src/components/Menu/Menu.types.d.ts +130 -0
  500. package/dist/src/components/Menu/MenuDivider/MenuDivider.d.ts +2 -0
  501. package/dist/src/components/Menu/MenuHeading/MenuHeading.d.ts +2 -0
  502. package/dist/src/components/Menu/MenuItem/MenuItem.d.ts +2 -0
  503. package/dist/src/components/Menu/MenuItem/MenuItem.types.d.ts +122 -0
  504. package/dist/src/components/Menu/MenuItem/hooks/useMenuItemAria.d.ts +11 -0
  505. package/dist/src/components/Menu/MenuItem/hooks/useMenuItemButtonProps.d.ts +14 -0
  506. package/dist/src/components/Menu/MenuItem/hooks/useMenuItemComposite.d.ts +20 -0
  507. package/dist/src/components/Menu/MenuItem/hooks/useMenuItemInteractions.d.ts +11 -0
  508. package/dist/src/components/Menu/MenuItem/hooks/useMenuItemRole.d.ts +9 -0
  509. package/dist/src/components/Menu/MenuProvider.d.ts +3 -0
  510. package/dist/src/components/Menu/MenuText/MenuText.d.ts +2 -0
  511. package/dist/src/components/Menu/helpers/mapMenuItems.d.ts +6 -0
  512. package/dist/src/components/Menu/hooks/useMenu.d.ts +1 -0
  513. package/dist/src/components/Menu/hooks/useMenuAria.d.ts +11 -0
  514. package/dist/src/components/Menu/hooks/useMenuComposite.d.ts +18 -0
  515. package/dist/src/components/Menu/hooks/useMenuRole.d.ts +12 -0
  516. package/dist/src/components/Menu/hooks/useMenuStyles.d.ts +11 -0
  517. package/dist/src/components/Menu/index.d.ts +13 -0
  518. package/dist/src/components/Modal/Modal.d.ts +2 -0
  519. package/dist/src/components/Modal/Modal.types.d.ts +101 -0
  520. package/dist/src/components/Modal/ModalProvider.d.ts +3 -0
  521. package/dist/src/components/Modal/hooks/useIDSProvidedModal.d.ts +5 -0
  522. package/dist/src/components/Modal/hooks/useModal.d.ts +3 -0
  523. package/dist/src/components/Modal/index.d.ts +4 -0
  524. package/dist/src/components/Navbar/Navbar.d.ts +2 -0
  525. package/dist/src/components/Navbar/Navbar.types.d.ts +65 -0
  526. package/dist/src/components/Navbar/components/HomeLinkContent.d.ts +7 -0
  527. package/dist/src/components/Navbar/components/LogoFromSrc.d.ts +6 -0
  528. package/dist/src/components/Navbar/components/NavbarLogo.d.ts +8 -0
  529. package/dist/src/components/Navbar/index.d.ts +2 -0
  530. package/dist/src/components/Panel/Panel.d.ts +2 -0
  531. package/dist/src/components/Panel/Panel.types.d.ts +59 -0
  532. package/dist/src/components/Panel/index.d.ts +2 -0
  533. package/dist/src/components/Placeholder/Placeholder.d.ts +2 -0
  534. package/dist/src/components/Placeholder/Placeholder.types.d.ts +24 -0
  535. package/dist/src/components/Placeholder/index.d.ts +2 -0
  536. package/dist/src/components/Popover/InputPopover/InputPopover.d.ts +3 -0
  537. package/dist/src/components/Popover/InputPopover/InputPopover.types.d.ts +26 -0
  538. package/dist/src/components/Popover/InputPopover/InputPopoverActivator.d.ts +2 -0
  539. package/dist/src/components/Popover/InputPopover/InputPopoverProvider.d.ts +2 -0
  540. package/dist/src/components/Popover/Popover.d.ts +2 -0
  541. package/dist/src/components/Popover/Popover.types.d.ts +176 -0
  542. package/dist/src/components/Popover/PopoverProvider.d.ts +3 -0
  543. package/dist/src/components/Popover/components/PopoverActivator.d.ts +2 -0
  544. package/dist/src/components/Popover/components/PopoverContent.d.ts +2 -0
  545. package/dist/src/components/Popover/helpers/composeFloatingProps.d.ts +15 -0
  546. package/dist/src/components/Popover/helpers/composePopoverWidth.d.ts +2 -0
  547. package/dist/src/components/Popover/helpers/handlePopoverTabKey.d.ts +8 -0
  548. package/dist/src/components/Popover/helpers/hasFocus.d.ts +1 -0
  549. package/dist/src/components/Popover/hooks/usePopover.d.ts +1 -0
  550. package/dist/src/components/Popover/hooks/usePopoverActivatorInteractions.d.ts +15 -0
  551. package/dist/src/components/Popover/hooks/usePopoverAria.d.ts +6 -0
  552. package/dist/src/components/Popover/hooks/usePopoverImperativeHandle.d.ts +4 -0
  553. package/dist/src/components/Popover/hooks/usePopoverItem.d.ts +12 -0
  554. package/dist/src/components/Popover/hooks/usePopoverNavigation.d.ts +16 -0
  555. package/dist/src/components/Popover/hooks/usePopoverState.d.ts +10 -0
  556. package/dist/src/components/Popover/index.d.ts +5 -0
  557. package/dist/src/components/Progress/Progress.d.ts +2 -0
  558. package/dist/src/components/Progress/Progress.types.d.ts +23 -0
  559. package/dist/src/components/Progress/index.d.ts +1 -0
  560. package/dist/src/components/Radio/Radio.d.ts +2 -0
  561. package/dist/src/components/Radio/Radio.types.d.ts +45 -0
  562. package/dist/src/components/Radio/helpers/mapRadioGroupOptions.d.ts +5 -0
  563. package/dist/src/components/Radio/index.d.ts +2 -0
  564. package/dist/src/components/RadioGroup/RadioGroup.d.ts +2 -0
  565. package/dist/src/components/RadioGroup/RadioGroup.types.d.ts +70 -0
  566. package/dist/src/components/RadioGroup/RadioGroupContext.d.ts +2 -0
  567. package/dist/src/components/RadioGroup/index.d.ts +2 -0
  568. package/dist/src/components/Readonly/Readonly.d.ts +3 -0
  569. package/dist/src/components/Readonly/Readonly.types.d.ts +10 -0
  570. package/dist/src/components/Readonly/index.d.ts +2 -0
  571. package/dist/src/components/RichSelect/RichSelect.d.ts +2 -0
  572. package/dist/src/components/RichSelect/RichSelect.types.d.ts +167 -0
  573. package/dist/src/components/RichSelect/SelectBody/SelectBody.d.ts +2 -0
  574. package/dist/src/components/RichSelect/SelectBody/SelectBody.types.d.ts +12 -0
  575. package/dist/src/components/RichSelect/SelectCreate/SelectCreate.d.ts +2 -0
  576. package/dist/src/components/RichSelect/SelectCreate/SelectCreate.types.d.ts +29 -0
  577. package/dist/src/components/RichSelect/SelectHeading/SelectHeading.d.ts +2 -0
  578. package/dist/src/components/RichSelect/SelectHeading/SelectHeading.types.d.ts +17 -0
  579. package/dist/src/components/RichSelect/SelectLabel/SelectLabel.d.ts +2 -0
  580. package/dist/src/components/RichSelect/SelectLabel/SelectLabel.types.d.ts +3 -0
  581. package/dist/src/components/RichSelect/SelectMenu/SelectMenu.d.ts +2 -0
  582. package/dist/src/components/RichSelect/SelectMenu/SelectMenu.types.d.ts +49 -0
  583. package/dist/src/components/RichSelect/SelectMenu/SelectMenuItem.d.ts +2 -0
  584. package/dist/src/components/RichSelect/SelectSearch/SelectSearch.d.ts +2 -0
  585. package/dist/src/components/RichSelect/SelectSearch/SelectSearch.types.d.ts +2 -0
  586. package/dist/src/components/RichSelect/SelectSearchInput/SelectSearchInput.d.ts +3 -0
  587. package/dist/src/components/RichSelect/SelectSearchInput/SelectSearchInput.types.d.ts +18 -0
  588. package/dist/src/components/RichSelect/SelectTags/SelectTags.d.ts +2 -0
  589. package/dist/src/components/RichSelect/SelectTags/SelectTags.types.d.ts +27 -0
  590. package/dist/src/components/RichSelect/components/SelectActivator.d.ts +7 -0
  591. package/dist/src/components/RichSelect/components/SelectHiddenInput.d.ts +4 -0
  592. package/dist/src/components/RichSelect/components/SelectOptions.d.ts +6 -0
  593. package/dist/src/components/RichSelect/hooks/useRichSelectState.d.ts +17 -0
  594. package/dist/src/components/RichSelect/index.d.ts +19 -0
  595. package/dist/src/components/Row/Row.d.ts +2 -0
  596. package/dist/src/components/Row/Row.types.d.ts +42 -0
  597. package/dist/src/components/Row/index.d.ts +2 -0
  598. package/dist/src/components/Select/Select.d.ts +2 -0
  599. package/dist/src/components/Select/Select.types.d.ts +89 -0
  600. package/dist/src/components/Select/SelectOption/SelectOption.d.ts +2 -0
  601. package/dist/src/components/Select/components/SelectControl.d.ts +2 -0
  602. package/dist/src/components/Select/components/SelectReadonly.d.ts +2 -0
  603. package/dist/src/components/Select/helpers/mapSelectOptions.d.ts +3 -0
  604. package/dist/src/components/Select/helpers/nodesToSelectOptions.d.ts +11 -0
  605. package/dist/src/components/Select/index.d.ts +4 -0
  606. package/dist/src/components/Skeleton/Skeleton.d.ts +2 -0
  607. package/dist/src/components/Skeleton/Skeleton.types.d.ts +36 -0
  608. package/dist/src/components/Skeleton/index.d.ts +2 -0
  609. package/dist/src/components/SkipLink/SkipLink.d.ts +2 -0
  610. package/dist/src/components/SkipLink/SkipLink.types.d.ts +22 -0
  611. package/dist/src/components/SkipLink/index.d.ts +2 -0
  612. package/dist/src/components/Slideout/Slideout.d.ts +2 -0
  613. package/dist/src/components/Slideout/Slideout.types.d.ts +146 -0
  614. package/dist/src/components/Slideout/SlideoutProvider.d.ts +3 -0
  615. package/dist/src/components/Slideout/components/SlideoutInner.d.ts +2 -0
  616. package/dist/src/components/Slideout/hooks/useIDSProvidedSlideout.d.ts +5 -0
  617. package/dist/src/components/Slideout/hooks/useSlideout.d.ts +3 -0
  618. package/dist/src/components/Slideout/index.d.ts +4 -0
  619. package/dist/src/components/Slider/Slider.d.ts +2 -0
  620. package/dist/src/components/Slider/Slider.types.d.ts +94 -0
  621. package/dist/src/components/Slider/components/SliderTicks.d.ts +2 -0
  622. package/dist/src/components/Slider/index.d.ts +2 -0
  623. package/dist/src/components/Spinner/Spinner.d.ts +2 -0
  624. package/dist/src/components/Spinner/Spinner.types.d.ts +13 -0
  625. package/dist/src/components/Spinner/index.d.ts +2 -0
  626. package/dist/src/components/Stack/Stack.d.ts +2 -0
  627. package/dist/src/components/Stack/Stack.types.d.ts +22 -0
  628. package/dist/src/components/Stack/index.d.ts +2 -0
  629. package/dist/src/components/TabSet/Tab/Tab.d.ts +2 -0
  630. package/dist/src/components/TabSet/Tab/Tab.types.d.ts +21 -0
  631. package/dist/src/components/TabSet/TabSet.d.ts +2 -0
  632. package/dist/src/components/TabSet/TabSet.types.d.ts +84 -0
  633. package/dist/src/components/TabSet/TabSetProvider.d.ts +3 -0
  634. package/dist/src/components/TabSet/components/TabSetItem.d.ts +2 -0
  635. package/dist/src/components/TabSet/helpers/mapTabs.d.ts +3 -0
  636. package/dist/src/components/TabSet/hooks/useTabSetItems.d.ts +1 -0
  637. package/dist/src/components/TabSet/index.d.ts +5 -0
  638. package/dist/src/components/Table/Table.d.ts +6 -0
  639. package/dist/src/components/Table/Table.types.d.ts +199 -0
  640. package/dist/src/components/Table/TableBody/TableBody.d.ts +2 -0
  641. package/dist/src/components/Table/TableBody/TableBody.types.d.ts +29 -0
  642. package/dist/src/components/Table/TableContext.d.ts +2 -0
  643. package/dist/src/components/Table/TableFormattedValue/TableFormattedValue.d.ts +2 -0
  644. package/dist/src/components/Table/TableFormattedValue/TableFormattedValue.types.d.ts +30 -0
  645. package/dist/src/components/Table/TableProvider.d.ts +2 -0
  646. package/dist/src/components/Table/components/TableBodyCell.d.ts +2 -0
  647. package/dist/src/components/Table/components/TableEmpty.d.ts +2 -0
  648. package/dist/src/components/Table/components/TableHeader.d.ts +2 -0
  649. package/dist/src/components/Table/components/TableHeaderCell.d.ts +2 -0
  650. package/dist/src/components/Table/components/TableRows.d.ts +2 -0
  651. package/dist/src/components/Table/components/TableSortButton.d.ts +2 -0
  652. package/dist/src/components/Table/helpers/composeIDSTableColumnDefs.d.ts +2 -0
  653. package/dist/src/components/Table/helpers/composeIDSTableInitialSorting.d.ts +3 -0
  654. package/dist/src/components/Table/helpers/findColumnByKey.d.ts +2 -0
  655. package/dist/src/components/Table/helpers/getFormatFromValue.d.ts +2 -0
  656. package/dist/src/components/Table/helpers/hasColumns.d.ts +2 -0
  657. package/dist/src/components/Table/hooks/useIDSTableColumnSort.d.ts +2 -0
  658. package/dist/src/components/Table/hooks/useIDSTableColumnStyles.d.ts +2 -0
  659. package/dist/src/components/Table/hooks/useTable.d.ts +1 -0
  660. package/dist/src/components/Table/index.d.ts +6 -0
  661. package/dist/src/components/Tag/Tag.d.ts +2 -0
  662. package/dist/src/components/Tag/Tag.types.d.ts +25 -0
  663. package/dist/src/components/Tag/TagInput/TagInput.d.ts +3 -0
  664. package/dist/src/components/Tag/TagInput/TagInput.types.d.ts +21 -0
  665. package/dist/src/components/Tag/components/TagListInput/TagListInput.d.ts +3 -0
  666. package/dist/src/components/Tag/components/TagListInput/TagListInput.types.d.ts +45 -0
  667. package/dist/src/components/Tag/index.d.ts +4 -0
  668. package/dist/src/components/Text/Text.d.ts +2 -0
  669. package/dist/src/components/Text/Text.types.d.ts +45 -0
  670. package/dist/src/components/Text/index.d.ts +2 -0
  671. package/dist/src/components/Toaster/Toast/Toast.d.ts +3 -0
  672. package/dist/src/components/Toaster/Toast/Toast.types.d.ts +94 -0
  673. package/dist/src/components/Toaster/Toast/ToastAnimated.d.ts +2 -0
  674. package/dist/src/components/Toaster/Toast/ToastIcon.d.ts +6 -0
  675. package/dist/src/components/Toaster/Toaster.d.ts +2 -0
  676. package/dist/src/components/Toaster/Toaster.types.d.ts +37 -0
  677. package/dist/src/components/Toaster/ToasterProvider.d.ts +11 -0
  678. package/dist/src/components/Toaster/hooks/useToaster.d.ts +9 -0
  679. package/dist/src/components/Toaster/index.d.ts +5 -0
  680. package/dist/src/components/Toggle/Toggle.d.ts +2 -0
  681. package/dist/src/components/Toggle/Toggle.types.d.ts +45 -0
  682. package/dist/src/components/Toggle/index.d.ts +2 -0
  683. package/dist/src/components/Tooltip/Tooltip.d.ts +2 -0
  684. package/dist/src/components/Tooltip/Tooltip.types.d.ts +33 -0
  685. package/dist/src/components/Tooltip/index.d.ts +2 -0
  686. package/dist/src/components/ValidationMessage/ValidationBase/ValidationBase.d.ts +2 -0
  687. package/dist/src/components/ValidationMessage/ValidationBase/ValidationBase.types.d.ts +27 -0
  688. package/dist/src/components/ValidationMessage/ValidationLink/ValidationLink.d.ts +2 -0
  689. package/dist/src/components/ValidationMessage/ValidationLink/ValidationLink.types.d.ts +12 -0
  690. package/dist/src/components/ValidationMessage/ValidationMessage.d.ts +2 -0
  691. package/dist/src/components/ValidationMessage/ValidationMessage.types.d.ts +13 -0
  692. package/dist/src/components/ValidationMessage/ValidationSummary/ValidationSummary.d.ts +2 -0
  693. package/dist/src/components/ValidationMessage/ValidationSummary/ValidationSummary.types.d.ts +27 -0
  694. package/dist/src/components/ValidationMessage/index.d.ts +6 -0
  695. package/dist/src/constants.d.ts +123 -0
  696. package/dist/src/enums.d.ts +215 -0
  697. package/dist/src/helpers/dom/focusableElements.d.ts +1 -0
  698. package/dist/src/helpers/dom/getActiveElement.d.ts +1 -0
  699. package/dist/src/helpers/dom/hasShadowDom.d.ts +1 -0
  700. package/dist/src/helpers/form/getFormControlValueAsString.d.ts +2 -0
  701. package/dist/src/helpers/form/getFormControlValueAsStringIfDefined.d.ts +2 -0
  702. package/dist/src/helpers/form/getValueAsEvent.d.ts +15 -0
  703. package/dist/src/helpers/form/isValidFormInputElement.d.ts +1 -0
  704. package/dist/src/helpers/formatting/capitalizeFirstLetter.d.ts +1 -0
  705. package/dist/src/helpers/formatting/formatCurrency.d.ts +25 -0
  706. package/dist/src/helpers/formatting/formatDate.d.ts +5 -0
  707. package/dist/src/helpers/formatting/formatDateTime.d.ts +3 -0
  708. package/dist/src/helpers/formatting/formatObjectKey.d.ts +1 -0
  709. package/dist/src/helpers/formatting/formatPercentage.d.ts +1 -0
  710. package/dist/src/helpers/formatting/stringReplacer.d.ts +2 -0
  711. package/dist/src/helpers/formatting/toArray.d.ts +1 -0
  712. package/dist/src/helpers/formatting/toCSSLengthValue.d.ts +1 -0
  713. package/dist/src/helpers/label-value/composeLabelValueDescriptor.d.ts +9 -0
  714. package/dist/src/helpers/label-value/getQueryRangeExclusive.d.ts +8 -0
  715. package/dist/src/helpers/label-value/getValueFromLabelValues.d.ts +2 -0
  716. package/dist/src/helpers/label-value/highlightQueryInLabel.d.ts +2 -0
  717. package/dist/src/helpers/label-value/highlightQueryInLabelValue.d.ts +3 -0
  718. package/dist/src/helpers/label-value/searchLabelValues.d.ts +2 -0
  719. package/dist/src/helpers/responsive/getResponsiveLayoutModifiers.d.ts +2 -0
  720. package/dist/src/helpers/responsive/getResponsivePaddingClasses.d.ts +2 -0
  721. package/dist/src/helpers/transition/getTransitionDuration.d.ts +1 -0
  722. package/dist/src/helpers/transition/timeStringToNumber.d.ts +1 -0
  723. package/dist/src/helpers/utility/generateScopedName.d.ts +8 -0
  724. package/dist/src/helpers/utility/idsLogger.d.ts +3 -0
  725. package/dist/src/helpers/utility/propagateTestid.d.ts +1 -0
  726. package/dist/src/hooks/index.d.ts +4 -0
  727. package/dist/src/hooks/useAriaRelationship.d.ts +11 -0
  728. package/dist/src/hooks/useBreakpoint.d.ts +11 -0
  729. package/dist/src/hooks/useControlledState.d.ts +22 -0
  730. package/dist/src/hooks/useIdIfNeeded.d.ts +2 -0
  731. package/dist/src/hooks/useResponsiveProps.d.ts +19 -0
  732. package/dist/src/interfaces.d.ts +67 -0
  733. package/dist/src/main.d.ts +57 -0
  734. package/dist/src/patterns/Loading/Loading.d.ts +42 -0
  735. package/dist/src/patterns/Loading/components/ComponentLoading.d.ts +53 -0
  736. package/dist/src/patterns/Loading/components/DefaultLoading.d.ts +27 -0
  737. package/dist/src/patterns/Loading/components/PageLoading.d.ts +41 -0
  738. package/dist/src/patterns/Loading/components/StartUpLoading.d.ts +67 -0
  739. package/dist/src/patterns/Loading/components/ValidateLoading.d.ts +38 -0
  740. package/dist/src/patterns/Loading/hooks/useShouldRenderLoading.d.ts +9 -0
  741. package/dist/src/patterns/Loading/index.d.ts +1 -0
  742. package/dist/src/types.d.ts +21 -0
  743. package/dist/style.css +1 -0
  744. package/dist/types.js +1 -0
  745. package/dist/useIDSButtonGroupItem-Dzgv35ni.js +30 -0
  746. package/dist/vite.config.d.ts +2 -0
  747. package/package.json +34 -12
@@ -0,0 +1,3442 @@
1
+ import * as f from "react";
2
+ import { useLayoutEffect as Vn, useEffect as Wn } from "react";
3
+ import { t as At, i as $n, f as Or } from "./index.esm-BnSuefUA.js";
4
+ import { jsx as me, jsxs as Bn, Fragment as Tr } from "react/jsx-runtime";
5
+ import * as tn from "react-dom";
6
+ function Mt() {
7
+ return typeof window < "u";
8
+ }
9
+ function Ke(e) {
10
+ return Hn(e) ? (e.nodeName || "").toLowerCase() : "#document";
11
+ }
12
+ function ge(e) {
13
+ var t;
14
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
15
+ }
16
+ function Te(e) {
17
+ var t;
18
+ return (t = (Hn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
19
+ }
20
+ function Hn(e) {
21
+ return Mt() ? e instanceof Node || e instanceof ge(e).Node : !1;
22
+ }
23
+ function q(e) {
24
+ return Mt() ? e instanceof Element || e instanceof ge(e).Element : !1;
25
+ }
26
+ function ie(e) {
27
+ return Mt() ? e instanceof HTMLElement || e instanceof ge(e).HTMLElement : !1;
28
+ }
29
+ function Xt(e) {
30
+ return !Mt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ge(e).ShadowRoot;
31
+ }
32
+ function ut(e) {
33
+ const {
34
+ overflow: t,
35
+ overflowX: n,
36
+ overflowY: r,
37
+ display: o
38
+ } = we(e);
39
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
40
+ }
41
+ function Ar(e) {
42
+ return ["table", "td", "th"].includes(Ke(e));
43
+ }
44
+ function St(e) {
45
+ return [":popover-open", ":modal"].some((t) => {
46
+ try {
47
+ return e.matches(t);
48
+ } catch {
49
+ return !1;
50
+ }
51
+ });
52
+ }
53
+ function nn(e) {
54
+ const t = Pt(), n = q(e) ? we(e) : e;
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
+ }
57
+ function Mr(e) {
58
+ let t = Pe(e);
59
+ for (; ie(t) && !Se(t); ) {
60
+ if (nn(t))
61
+ return t;
62
+ if (St(t))
63
+ return null;
64
+ t = Pe(t);
65
+ }
66
+ return null;
67
+ }
68
+ function Pt() {
69
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
70
+ }
71
+ function Se(e) {
72
+ return ["html", "body", "#document"].includes(Ke(e));
73
+ }
74
+ function we(e) {
75
+ return ge(e).getComputedStyle(e);
76
+ }
77
+ function Dt(e) {
78
+ return q(e) ? {
79
+ scrollLeft: e.scrollLeft,
80
+ scrollTop: e.scrollTop
81
+ } : {
82
+ scrollLeft: e.scrollX,
83
+ scrollTop: e.scrollY
84
+ };
85
+ }
86
+ function Pe(e) {
87
+ if (Ke(e) === "html")
88
+ return e;
89
+ const t = (
90
+ // Step into the shadow DOM of the parent of a slotted node.
91
+ e.assignedSlot || // DOM Element detected.
92
+ e.parentNode || // ShadowRoot detected.
93
+ Xt(e) && e.host || // Fallback.
94
+ Te(e)
95
+ );
96
+ return Xt(t) ? t.host : t;
97
+ }
98
+ function zn(e) {
99
+ const t = Pe(e);
100
+ return Se(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ie(t) && ut(t) ? t : zn(t);
101
+ }
102
+ function Le(e, t, n) {
103
+ var r;
104
+ t === void 0 && (t = []), n === void 0 && (n = !0);
105
+ const o = zn(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = ge(o);
106
+ if (s) {
107
+ const c = Jt(i);
108
+ return t.concat(i, i.visualViewport || [], ut(o) ? o : [], c && n ? Le(c) : []);
109
+ }
110
+ return t.concat(o, Le(o, [], n));
111
+ }
112
+ function Jt(e) {
113
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
114
+ }
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, he = Math.max, wt = Math.round, qe = Math.floor, Ie = (e) => ({
116
+ x: e,
117
+ y: e
118
+ }), Pr = {
119
+ left: "right",
120
+ right: "left",
121
+ bottom: "top",
122
+ top: "bottom"
123
+ }, Dr = {
124
+ start: "end",
125
+ end: "start"
126
+ };
127
+ function gn(e, t, n) {
128
+ return he(e, Qe(t, n));
129
+ }
130
+ function Ze(e, t) {
131
+ return typeof e == "function" ? e(t) : e;
132
+ }
133
+ function Oe(e) {
134
+ return e.split("-")[0];
135
+ }
136
+ function Ce(e) {
137
+ return e.split("-")[1];
138
+ }
139
+ function Un(e) {
140
+ return e === "x" ? "y" : "x";
141
+ }
142
+ function Gn(e) {
143
+ return e === "y" ? "height" : "width";
144
+ }
145
+ function ze(e) {
146
+ return ["top", "bottom"].includes(Oe(e)) ? "y" : "x";
147
+ }
148
+ function jn(e) {
149
+ return Un(ze(e));
150
+ }
151
+ function qn(e, t, n) {
152
+ n === void 0 && (n = !1);
153
+ const r = Ce(e), o = jn(e), s = Gn(o);
154
+ let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
155
+ return t.reference[s] > t.floating[s] && (i = Et(i)), [i, Et(i)];
156
+ }
157
+ function kr(e) {
158
+ const t = Et(e);
159
+ return [Rt(e), t, Rt(t)];
160
+ }
161
+ function Rt(e) {
162
+ return e.replace(/start|end/g, (t) => Dr[t]);
163
+ }
164
+ function Lr(e, t, n) {
165
+ const r = ["left", "right"], o = ["right", "left"], s = ["top", "bottom"], i = ["bottom", "top"];
166
+ switch (e) {
167
+ case "top":
168
+ case "bottom":
169
+ return n ? t ? o : r : t ? r : o;
170
+ case "left":
171
+ case "right":
172
+ return t ? s : i;
173
+ default:
174
+ return [];
175
+ }
176
+ }
177
+ function Fr(e, t, n, r) {
178
+ const o = Ce(e);
179
+ let s = Lr(Oe(e), n === "start", r);
180
+ return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(Rt)))), s;
181
+ }
182
+ function Et(e) {
183
+ return e.replace(/left|right|bottom|top/g, (t) => Pr[t]);
184
+ }
185
+ function Nr(e) {
186
+ return {
187
+ top: 0,
188
+ right: 0,
189
+ bottom: 0,
190
+ left: 0,
191
+ ...e
192
+ };
193
+ }
194
+ function _r(e) {
195
+ return typeof e != "number" ? Nr(e) : {
196
+ top: e,
197
+ right: e,
198
+ bottom: e,
199
+ left: e
200
+ };
201
+ }
202
+ function It(e) {
203
+ const {
204
+ x: t,
205
+ y: n,
206
+ width: r,
207
+ height: o
208
+ } = e;
209
+ return {
210
+ width: r,
211
+ height: o,
212
+ top: n,
213
+ left: t,
214
+ right: t + r,
215
+ bottom: n + o,
216
+ x: t,
217
+ y: n
218
+ };
219
+ }
220
+ function rn() {
221
+ const e = navigator.userAgentData;
222
+ return e != null && e.platform ? e.platform : navigator.platform;
223
+ }
224
+ function Yn() {
225
+ const e = navigator.userAgentData;
226
+ return e && Array.isArray(e.brands) ? e.brands.map((t) => {
227
+ let {
228
+ brand: n,
229
+ version: r
230
+ } = t;
231
+ return n + "/" + r;
232
+ }).join(" ") : navigator.userAgent;
233
+ }
234
+ function Xn() {
235
+ return /apple/i.test(navigator.vendor);
236
+ }
237
+ function Qt() {
238
+ const e = /android/i;
239
+ return e.test(rn()) || e.test(Yn());
240
+ }
241
+ function Kr() {
242
+ return rn().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
243
+ }
244
+ function Jn() {
245
+ return Yn().includes("jsdom/");
246
+ }
247
+ const pn = "data-floating-ui-focusable", Vr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", _t = "ArrowLeft", Kt = "ArrowRight", Wr = "ArrowUp", $r = "ArrowDown";
248
+ function Ee(e) {
249
+ let t = e.activeElement;
250
+ for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
251
+ var n;
252
+ t = t.shadowRoot.activeElement;
253
+ }
254
+ return t;
255
+ }
256
+ function ce(e, t) {
257
+ if (!e || !t)
258
+ return !1;
259
+ const n = t.getRootNode == null ? void 0 : t.getRootNode();
260
+ if (e.contains(t))
261
+ return !0;
262
+ if (n && Xt(n)) {
263
+ let r = t;
264
+ for (; r; ) {
265
+ if (e === r)
266
+ return !0;
267
+ r = r.parentNode || r.host;
268
+ }
269
+ }
270
+ return !1;
271
+ }
272
+ function ke(e) {
273
+ return "composedPath" in e ? e.composedPath()[0] : e.target;
274
+ }
275
+ function Vt(e, t) {
276
+ if (t == null)
277
+ return !1;
278
+ if ("composedPath" in e)
279
+ return e.composedPath().includes(t);
280
+ const n = e;
281
+ return n.target != null && t.contains(n.target);
282
+ }
283
+ function Br(e) {
284
+ return e.matches("html,body");
285
+ }
286
+ function le(e) {
287
+ return (e == null ? void 0 : e.ownerDocument) || document;
288
+ }
289
+ function on(e) {
290
+ return ie(e) && e.matches(Vr);
291
+ }
292
+ function Zt(e) {
293
+ return e ? e.getAttribute("role") === "combobox" && on(e) : !1;
294
+ }
295
+ function Hr(e) {
296
+ if (!e || Jn()) return !0;
297
+ try {
298
+ return e.matches(":focus-visible");
299
+ } catch {
300
+ return !0;
301
+ }
302
+ }
303
+ function Ct(e) {
304
+ return e ? e.hasAttribute(pn) ? e : e.querySelector("[" + pn + "]") || e : null;
305
+ }
306
+ function Ye(e, t, n) {
307
+ n === void 0 && (n = !0);
308
+ let r = e.filter((s) => {
309
+ var i;
310
+ return s.parentId === t && ((i = s.context) == null ? void 0 : i.open);
311
+ }), o = r;
312
+ for (; o.length; )
313
+ o = n ? e.filter((s) => {
314
+ var i;
315
+ return (i = o) == null ? void 0 : i.some((c) => {
316
+ var a;
317
+ return s.parentId === c.id && ((a = s.context) == null ? void 0 : a.open);
318
+ });
319
+ }) : e, r = r.concat(o);
320
+ return r;
321
+ }
322
+ function zr(e, t) {
323
+ let n, r = -1;
324
+ function o(s, i) {
325
+ i > r && (n = s, r = i), Ye(e, s).forEach((a) => {
326
+ o(a.id, i + 1);
327
+ });
328
+ }
329
+ return o(t, 0), e.find((s) => s.id === n);
330
+ }
331
+ function hn(e, t) {
332
+ var n;
333
+ let r = [], o = (n = e.find((s) => s.id === t)) == null ? void 0 : n.parentId;
334
+ for (; o; ) {
335
+ const s = e.find((i) => i.id === o);
336
+ o = s == null ? void 0 : s.parentId, s && (r = r.concat(s));
337
+ }
338
+ return r;
339
+ }
340
+ function de(e) {
341
+ e.preventDefault(), e.stopPropagation();
342
+ }
343
+ function Ur(e) {
344
+ return "nativeEvent" in e;
345
+ }
346
+ function Qn(e) {
347
+ return e.mozInputSource === 0 && e.isTrusted ? !0 : Qt() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
348
+ }
349
+ function Zn(e) {
350
+ return Jn() ? !1 : !Qt() && e.width === 0 && e.height === 0 || Qt() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
351
+ e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
352
+ }
353
+ function it(e, t) {
354
+ const n = ["mouse", "pen"];
355
+ return t || n.push("", void 0), n.includes(e);
356
+ }
357
+ var X = typeof document < "u" ? Vn : Wn;
358
+ const Gr = {
359
+ ...f
360
+ };
361
+ function xe(e) {
362
+ const t = f.useRef(e);
363
+ return X(() => {
364
+ t.current = e;
365
+ }), t;
366
+ }
367
+ const jr = Gr.useInsertionEffect, qr = jr || ((e) => e());
368
+ function ae(e) {
369
+ const t = f.useRef(() => {
370
+ if (process.env.NODE_ENV !== "production")
371
+ throw new Error("Cannot call an event handler while rendering.");
372
+ });
373
+ return qr(() => {
374
+ t.current = e;
375
+ }), f.useCallback(function() {
376
+ for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
377
+ r[o] = arguments[o];
378
+ return t.current == null ? void 0 : t.current(...r);
379
+ }, []);
380
+ }
381
+ function gt(e, t, n) {
382
+ return Math.floor(e / t) !== n;
383
+ }
384
+ function Xe(e, t) {
385
+ return t < 0 || t >= e.current.length;
386
+ }
387
+ function yt(e, t) {
388
+ return ue(e, {
389
+ disabledIndices: t
390
+ });
391
+ }
392
+ function en(e, t) {
393
+ return ue(e, {
394
+ decrement: !0,
395
+ startingIndex: e.current.length,
396
+ disabledIndices: t
397
+ });
398
+ }
399
+ function ue(e, t) {
400
+ let {
401
+ startingIndex: n = -1,
402
+ decrement: r = !1,
403
+ disabledIndices: o,
404
+ amount: s = 1
405
+ } = t === void 0 ? {} : t, i = n;
406
+ do
407
+ i += r ? -s : s;
408
+ while (i >= 0 && i <= e.current.length - 1 && He(e, i, o));
409
+ return i;
410
+ }
411
+ function er(e, t) {
412
+ let {
413
+ event: n,
414
+ orientation: r,
415
+ loop: o,
416
+ rtl: s,
417
+ cols: i,
418
+ disabledIndices: c,
419
+ minIndex: a,
420
+ maxIndex: u,
421
+ prevIndex: l,
422
+ stopEvent: p = !1
423
+ } = t, g = l;
424
+ if (n.key === Wr) {
425
+ if (p && de(n), l === -1)
426
+ g = u;
427
+ else if (g = ue(e, {
428
+ startingIndex: g,
429
+ amount: i,
430
+ decrement: !0,
431
+ disabledIndices: c
432
+ }), o && (l - i < a || g < 0)) {
433
+ const d = l % i, h = u % i, m = u - (h - d);
434
+ h === d ? g = u : g = h > d ? m : m - i;
435
+ }
436
+ Xe(e, g) && (g = l);
437
+ }
438
+ if (n.key === $r && (p && de(n), l === -1 ? g = a : (g = ue(e, {
439
+ startingIndex: l,
440
+ amount: i,
441
+ disabledIndices: c
442
+ }), o && l + i > u && (g = ue(e, {
443
+ startingIndex: l % i - i,
444
+ amount: i,
445
+ disabledIndices: c
446
+ }))), Xe(e, g) && (g = l)), r === "both") {
447
+ const d = qe(l / i);
448
+ n.key === (s ? _t : Kt) && (p && de(n), l % i !== i - 1 ? (g = ue(e, {
449
+ startingIndex: l,
450
+ disabledIndices: c
451
+ }), o && gt(g, i, d) && (g = ue(e, {
452
+ startingIndex: l - l % i - 1,
453
+ disabledIndices: c
454
+ }))) : o && (g = ue(e, {
455
+ startingIndex: l - l % i - 1,
456
+ disabledIndices: c
457
+ })), gt(g, i, d) && (g = l)), n.key === (s ? Kt : _t) && (p && de(n), l % i !== 0 ? (g = ue(e, {
458
+ startingIndex: l,
459
+ decrement: !0,
460
+ disabledIndices: c
461
+ }), o && gt(g, i, d) && (g = ue(e, {
462
+ startingIndex: l + (i - l % i),
463
+ decrement: !0,
464
+ disabledIndices: c
465
+ }))) : o && (g = ue(e, {
466
+ startingIndex: l + (i - l % i),
467
+ decrement: !0,
468
+ disabledIndices: c
469
+ })), gt(g, i, d) && (g = l));
470
+ const h = qe(u / i) === d;
471
+ Xe(e, g) && (o && h ? g = n.key === (s ? Kt : _t) ? u : ue(e, {
472
+ startingIndex: l - l % i - 1,
473
+ disabledIndices: c
474
+ }) : g = l);
475
+ }
476
+ return g;
477
+ }
478
+ function tr(e, t, n) {
479
+ const r = [];
480
+ let o = 0;
481
+ return e.forEach((s, i) => {
482
+ let {
483
+ width: c,
484
+ height: a
485
+ } = s;
486
+ if (c > t && process.env.NODE_ENV !== "production")
487
+ throw new Error("[Floating UI]: Invalid grid - item width at index " + i + " is greater than grid columns");
488
+ let u = !1;
489
+ for (n && (o = 0); !u; ) {
490
+ const l = [];
491
+ for (let p = 0; p < c; p++)
492
+ for (let g = 0; g < a; g++)
493
+ l.push(o + p + g * t);
494
+ o % t + c <= t && l.every((p) => r[p] == null) ? (l.forEach((p) => {
495
+ r[p] = i;
496
+ }), u = !0) : o++;
497
+ }
498
+ }), [...r];
499
+ }
500
+ function nr(e, t, n, r, o) {
501
+ if (e === -1) return -1;
502
+ const s = n.indexOf(e), i = t[e];
503
+ switch (o) {
504
+ case "tl":
505
+ return s;
506
+ case "tr":
507
+ return i ? s + i.width - 1 : s;
508
+ case "bl":
509
+ return i ? s + (i.height - 1) * r : s;
510
+ case "br":
511
+ return n.lastIndexOf(e);
512
+ }
513
+ }
514
+ function rr(e, t) {
515
+ return t.flatMap((n, r) => e.includes(n) ? [r] : []);
516
+ }
517
+ function He(e, t, n) {
518
+ if (n)
519
+ return n.includes(t);
520
+ const r = e.current[t];
521
+ return r == null || r.hasAttribute("disabled") || r.getAttribute("aria-disabled") === "true";
522
+ }
523
+ const lt = () => ({
524
+ getShadowRoot: !0,
525
+ displayCheck: (
526
+ // JSDOM does not support the `tabbable` library. To solve this we can
527
+ // check if `ResizeObserver` is a real function (not polyfilled), which
528
+ // determines if the current environment is JSDOM-like.
529
+ typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
530
+ )
531
+ });
532
+ function or(e, t) {
533
+ const n = At(e, lt()), r = n.length;
534
+ if (r === 0) return;
535
+ const o = Ee(le(e)), s = n.indexOf(o), i = s === -1 ? t === 1 ? 0 : r - 1 : s + t;
536
+ return n[i];
537
+ }
538
+ function ir(e) {
539
+ return or(le(e).body, 1) || e;
540
+ }
541
+ function sr(e) {
542
+ return or(le(e).body, -1) || e;
543
+ }
544
+ function ot(e, t) {
545
+ const n = t || e.currentTarget, r = e.relatedTarget;
546
+ return !r || !ce(n, r);
547
+ }
548
+ function Yr(e) {
549
+ At(e, lt()).forEach((n) => {
550
+ n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
551
+ });
552
+ }
553
+ function vn(e) {
554
+ e.querySelectorAll("[data-tabindex]").forEach((n) => {
555
+ const r = n.dataset.tabindex;
556
+ delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
557
+ });
558
+ }
559
+ function bn(e, t, n) {
560
+ let {
561
+ reference: r,
562
+ floating: o
563
+ } = e;
564
+ const s = ze(t), i = jn(t), c = Gn(i), a = Oe(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;
565
+ let d;
566
+ switch (a) {
567
+ case "top":
568
+ d = {
569
+ x: l,
570
+ y: r.y - o.height
571
+ };
572
+ break;
573
+ case "bottom":
574
+ d = {
575
+ x: l,
576
+ y: r.y + r.height
577
+ };
578
+ break;
579
+ case "right":
580
+ d = {
581
+ x: r.x + r.width,
582
+ y: p
583
+ };
584
+ break;
585
+ case "left":
586
+ d = {
587
+ x: r.x - o.width,
588
+ y: p
589
+ };
590
+ break;
591
+ default:
592
+ d = {
593
+ x: r.x,
594
+ y: r.y
595
+ };
596
+ }
597
+ switch (Ce(t)) {
598
+ case "start":
599
+ d[i] -= g * (n && u ? -1 : 1);
600
+ break;
601
+ case "end":
602
+ d[i] += g * (n && u ? -1 : 1);
603
+ break;
604
+ }
605
+ return d;
606
+ }
607
+ const Xr = async (e, t, n) => {
608
+ const {
609
+ placement: r = "bottom",
610
+ strategy: o = "absolute",
611
+ middleware: s = [],
612
+ platform: i
613
+ } = n, c = s.filter(Boolean), a = await (i.isRTL == null ? void 0 : i.isRTL(t));
614
+ let u = await i.getElementRects({
615
+ reference: e,
616
+ floating: t,
617
+ strategy: o
618
+ }), {
619
+ x: l,
620
+ y: p
621
+ } = bn(u, r, a), g = r, d = {}, h = 0;
622
+ for (let m = 0; m < c.length; m++) {
623
+ const {
624
+ name: y,
625
+ fn: E
626
+ } = c[m], {
627
+ x: v,
628
+ y: x,
629
+ data: I,
630
+ reset: A
631
+ } = await E({
632
+ x: l,
633
+ y: p,
634
+ initialPlacement: r,
635
+ placement: g,
636
+ strategy: o,
637
+ middlewareData: d,
638
+ rects: u,
639
+ platform: i,
640
+ elements: {
641
+ reference: e,
642
+ floating: t
643
+ }
644
+ });
645
+ l = v ?? l, p = x ?? p, d = {
646
+ ...d,
647
+ [y]: {
648
+ ...d[y],
649
+ ...I
650
+ }
651
+ }, A && h <= 50 && (h++, typeof A == "object" && (A.placement && (g = A.placement), A.rects && (u = A.rects === !0 ? await i.getElementRects({
652
+ reference: e,
653
+ floating: t,
654
+ strategy: o
655
+ }) : A.rects), {
656
+ x: l,
657
+ y: p
658
+ } = bn(u, g, a)), m = -1);
659
+ }
660
+ return {
661
+ x: l,
662
+ y: p,
663
+ placement: g,
664
+ strategy: o,
665
+ middlewareData: d
666
+ };
667
+ };
668
+ async function kt(e, t) {
669
+ var n;
670
+ t === void 0 && (t = {});
671
+ const {
672
+ x: r,
673
+ y: o,
674
+ platform: s,
675
+ rects: i,
676
+ elements: c,
677
+ strategy: a
678
+ } = e, {
679
+ boundary: u = "clippingAncestors",
680
+ rootBoundary: l = "viewport",
681
+ elementContext: p = "floating",
682
+ altBoundary: g = !1,
683
+ padding: d = 0
684
+ } = Ze(t, e), h = _r(d), y = c[g ? p === "floating" ? "reference" : "floating" : p], E = It(await s.getClippingRect({
685
+ element: (n = await (s.isElement == null ? void 0 : s.isElement(y))) == null || n ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
686
+ boundary: u,
687
+ rootBoundary: l,
688
+ strategy: a
689
+ })), v = p === "floating" ? {
690
+ x: r,
691
+ y: o,
692
+ width: i.floating.width,
693
+ height: i.floating.height
694
+ } : i.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), I = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
695
+ x: 1,
696
+ y: 1
697
+ } : {
698
+ x: 1,
699
+ y: 1
700
+ }, A = It(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
701
+ elements: c,
702
+ rect: v,
703
+ offsetParent: x,
704
+ strategy: a
705
+ }) : v);
706
+ return {
707
+ top: (E.top - A.top + h.top) / I.y,
708
+ bottom: (A.bottom - E.bottom + h.bottom) / I.y,
709
+ left: (E.left - A.left + h.left) / I.x,
710
+ right: (A.right - E.right + h.right) / I.x
711
+ };
712
+ }
713
+ function Jr(e, t, n) {
714
+ return (e ? [...n.filter((o) => Ce(o) === e), ...n.filter((o) => Ce(o) !== e)] : n.filter((o) => Oe(o) === o)).filter((o) => e ? Ce(o) === e || (t ? Rt(o) !== o : !1) : !0);
715
+ }
716
+ const Qr = function(e) {
717
+ return e === void 0 && (e = {}), {
718
+ name: "autoPlacement",
719
+ options: e,
720
+ async fn(t) {
721
+ var n, r, o;
722
+ const {
723
+ rects: s,
724
+ middlewareData: i,
725
+ placement: c,
726
+ platform: a,
727
+ elements: u
728
+ } = t, {
729
+ crossAxis: l = !1,
730
+ alignment: p,
731
+ allowedPlacements: g = mn,
732
+ autoAlignment: d = !0,
733
+ ...h
734
+ } = Ze(e, t), m = p !== void 0 || g === mn ? Jr(p || null, d, g) : g, y = await kt(t, h), E = ((n = i.autoPlacement) == null ? void 0 : n.index) || 0, v = m[E];
735
+ if (v == null)
736
+ return {};
737
+ const x = qn(v, s, await (a.isRTL == null ? void 0 : a.isRTL(u.floating)));
738
+ if (c !== v)
739
+ return {
740
+ reset: {
741
+ placement: m[0]
742
+ }
743
+ };
744
+ const I = [y[Oe(v)], y[x[0]], y[x[1]]], A = [...((r = i.autoPlacement) == null ? void 0 : r.overflows) || [], {
745
+ placement: v,
746
+ overflows: I
747
+ }], k = m[E + 1];
748
+ if (k)
749
+ return {
750
+ data: {
751
+ index: E + 1,
752
+ overflows: A
753
+ },
754
+ reset: {
755
+ placement: k
756
+ }
757
+ };
758
+ const L = A.map((N) => {
759
+ const _ = Ce(N.placement);
760
+ return [N.placement, _ && l ? (
761
+ // Check along the mainAxis and main crossAxis side.
762
+ N.overflows.slice(0, 2).reduce((U, V) => U + V, 0)
763
+ ) : (
764
+ // Check only the mainAxis.
765
+ N.overflows[0]
766
+ ), N.overflows];
767
+ }).sort((N, _) => N[1] - _[1]), F = ((o = L.filter((N) => N[2].slice(
768
+ 0,
769
+ // Aligned placements should not check their opposite crossAxis
770
+ // side.
771
+ Ce(N[0]) ? 2 : 3
772
+ ).every((_) => _ <= 0))[0]) == null ? void 0 : o[0]) || L[0][0];
773
+ return F !== c ? {
774
+ data: {
775
+ index: E + 1,
776
+ overflows: A
777
+ },
778
+ reset: {
779
+ placement: F
780
+ }
781
+ } : {};
782
+ }
783
+ };
784
+ }, Zr = function(e) {
785
+ return e === void 0 && (e = {}), {
786
+ name: "flip",
787
+ options: e,
788
+ async fn(t) {
789
+ var n, r;
790
+ const {
791
+ placement: o,
792
+ middlewareData: s,
793
+ rects: i,
794
+ initialPlacement: c,
795
+ platform: a,
796
+ elements: u
797
+ } = t, {
798
+ mainAxis: l = !0,
799
+ crossAxis: p = !0,
800
+ fallbackPlacements: g,
801
+ fallbackStrategy: d = "bestFit",
802
+ fallbackAxisSideDirection: h = "none",
803
+ flipAlignment: m = !0,
804
+ ...y
805
+ } = Ze(e, t);
806
+ if ((n = s.arrow) != null && n.alignmentOffset)
807
+ return {};
808
+ const E = Oe(o), v = ze(c), x = Oe(c) === c, I = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), A = g || (x || !m ? [Et(c)] : kr(c)), k = h !== "none";
809
+ !g && k && A.push(...Fr(c, m, h, I));
810
+ const L = [c, ...A], M = await kt(t, y), F = [];
811
+ let N = ((r = s.flip) == null ? void 0 : r.overflows) || [];
812
+ if (l && F.push(M[E]), p) {
813
+ const T = qn(o, i, I);
814
+ F.push(M[T[0]], M[T[1]]);
815
+ }
816
+ if (N = [...N, {
817
+ placement: o,
818
+ overflows: F
819
+ }], !F.every((T) => T <= 0)) {
820
+ var _, U;
821
+ const T = (((_ = s.flip) == null ? void 0 : _.index) || 0) + 1, w = L[T];
822
+ if (w)
823
+ return {
824
+ data: {
825
+ index: T,
826
+ overflows: N
827
+ },
828
+ reset: {
829
+ placement: w
830
+ }
831
+ };
832
+ let K = (U = N.filter((O) => O.overflows[0] <= 0).sort((O, b) => O.overflows[1] - b.overflows[1])[0]) == null ? void 0 : U.placement;
833
+ if (!K)
834
+ switch (d) {
835
+ case "bestFit": {
836
+ var V;
837
+ const O = (V = N.filter((b) => {
838
+ if (k) {
839
+ const R = ze(b.placement);
840
+ return R === v || // Create a bias to the `y` side axis due to horizontal
841
+ // reading directions favoring greater width.
842
+ R === "y";
843
+ }
844
+ return !0;
845
+ }).map((b) => [b.placement, b.overflows.filter((R) => R > 0).reduce((R, S) => R + S, 0)]).sort((b, R) => b[1] - R[1])[0]) == null ? void 0 : V[0];
846
+ O && (K = O);
847
+ break;
848
+ }
849
+ case "initialPlacement":
850
+ K = c;
851
+ break;
852
+ }
853
+ if (o !== K)
854
+ return {
855
+ reset: {
856
+ placement: K
857
+ }
858
+ };
859
+ }
860
+ return {};
861
+ }
862
+ };
863
+ };
864
+ async function eo(e, t) {
865
+ const {
866
+ placement: n,
867
+ platform: r,
868
+ elements: o
869
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Oe(n), c = Ce(n), a = ze(n) === "y", u = ["left", "top"].includes(i) ? -1 : 1, l = s && a ? -1 : 1, p = Ze(t, e);
870
+ let {
871
+ mainAxis: g,
872
+ crossAxis: d,
873
+ alignmentAxis: h
874
+ } = typeof p == "number" ? {
875
+ mainAxis: p,
876
+ crossAxis: 0,
877
+ alignmentAxis: null
878
+ } : {
879
+ mainAxis: p.mainAxis || 0,
880
+ crossAxis: p.crossAxis || 0,
881
+ alignmentAxis: p.alignmentAxis
882
+ };
883
+ return c && typeof h == "number" && (d = c === "end" ? h * -1 : h), a ? {
884
+ x: d * l,
885
+ y: g * u
886
+ } : {
887
+ x: g * u,
888
+ y: d * l
889
+ };
890
+ }
891
+ const to = function(e) {
892
+ return e === void 0 && (e = 0), {
893
+ name: "offset",
894
+ options: e,
895
+ async fn(t) {
896
+ var n, r;
897
+ const {
898
+ x: o,
899
+ y: s,
900
+ placement: i,
901
+ middlewareData: c
902
+ } = t, a = await eo(t, e);
903
+ return i === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
904
+ x: o + a.x,
905
+ y: s + a.y,
906
+ data: {
907
+ ...a,
908
+ placement: i
909
+ }
910
+ };
911
+ }
912
+ };
913
+ }, no = function(e) {
914
+ return e === void 0 && (e = {}), {
915
+ name: "shift",
916
+ options: e,
917
+ async fn(t) {
918
+ const {
919
+ x: n,
920
+ y: r,
921
+ placement: o
922
+ } = t, {
923
+ mainAxis: s = !0,
924
+ crossAxis: i = !1,
925
+ limiter: c = {
926
+ fn: (y) => {
927
+ let {
928
+ x: E,
929
+ y: v
930
+ } = y;
931
+ return {
932
+ x: E,
933
+ y: v
934
+ };
935
+ }
936
+ },
937
+ ...a
938
+ } = Ze(e, t), u = {
939
+ x: n,
940
+ y: r
941
+ }, l = await kt(t, a), p = ze(Oe(o)), g = Un(p);
942
+ let d = u[g], h = u[p];
943
+ if (s) {
944
+ const y = g === "y" ? "top" : "left", E = g === "y" ? "bottom" : "right", v = d + l[y], x = d - l[E];
945
+ d = gn(v, d, x);
946
+ }
947
+ if (i) {
948
+ const y = p === "y" ? "top" : "left", E = p === "y" ? "bottom" : "right", v = h + l[y], x = h - l[E];
949
+ h = gn(v, h, x);
950
+ }
951
+ const m = c.fn({
952
+ ...t,
953
+ [g]: d,
954
+ [p]: h
955
+ });
956
+ return {
957
+ ...m,
958
+ data: {
959
+ x: m.x - n,
960
+ y: m.y - r,
961
+ enabled: {
962
+ [g]: s,
963
+ [p]: i
964
+ }
965
+ }
966
+ };
967
+ }
968
+ };
969
+ }, ro = function(e) {
970
+ return e === void 0 && (e = {}), {
971
+ name: "size",
972
+ options: e,
973
+ async fn(t) {
974
+ var n, r;
975
+ const {
976
+ placement: o,
977
+ rects: s,
978
+ platform: i,
979
+ elements: c
980
+ } = t, {
981
+ apply: a = () => {
982
+ },
983
+ ...u
984
+ } = Ze(e, t), l = await kt(t, u), p = Oe(o), g = Ce(o), d = ze(o) === "y", {
985
+ width: h,
986
+ height: m
987
+ } = s.floating;
988
+ let y, E;
989
+ p === "top" || p === "bottom" ? (y = p, E = g === (await (i.isRTL == null ? void 0 : i.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (E = p, y = g === "end" ? "top" : "bottom");
990
+ const v = m - l.top - l.bottom, x = h - l.left - l.right, I = Qe(m - l[y], v), A = Qe(h - l[E], x), k = !t.middlewareData.shift;
991
+ let L = I, M = A;
992
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (M = x), (r = t.middlewareData.shift) != null && r.enabled.y && (L = v), k && !g) {
993
+ const N = he(l.left, 0), _ = he(l.right, 0), U = he(l.top, 0), V = he(l.bottom, 0);
994
+ d ? M = h - 2 * (N !== 0 || _ !== 0 ? N + _ : he(l.left, l.right)) : L = m - 2 * (U !== 0 || V !== 0 ? U + V : he(l.top, l.bottom));
995
+ }
996
+ await a({
997
+ ...t,
998
+ availableWidth: M,
999
+ availableHeight: L
1000
+ });
1001
+ const F = await i.getDimensions(c.floating);
1002
+ return h !== F.width || m !== F.height ? {
1003
+ reset: {
1004
+ rects: !0
1005
+ }
1006
+ } : {};
1007
+ }
1008
+ };
1009
+ };
1010
+ function cr(e) {
1011
+ const t = we(e);
1012
+ let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
1013
+ const o = ie(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, c = wt(n) !== s || wt(r) !== i;
1014
+ return c && (n = s, r = i), {
1015
+ width: n,
1016
+ height: r,
1017
+ $: c
1018
+ };
1019
+ }
1020
+ function sn(e) {
1021
+ return q(e) ? e : e.contextElement;
1022
+ }
1023
+ function Je(e) {
1024
+ const t = sn(e);
1025
+ if (!ie(t))
1026
+ return Ie(1);
1027
+ const n = t.getBoundingClientRect(), {
1028
+ width: r,
1029
+ height: o,
1030
+ $: s
1031
+ } = cr(t);
1032
+ let i = (s ? wt(n.width) : n.width) / r, c = (s ? wt(n.height) : n.height) / o;
1033
+ return (!i || !Number.isFinite(i)) && (i = 1), (!c || !Number.isFinite(c)) && (c = 1), {
1034
+ x: i,
1035
+ y: c
1036
+ };
1037
+ }
1038
+ const oo = /* @__PURE__ */ Ie(0);
1039
+ function ur(e) {
1040
+ const t = ge(e);
1041
+ return !Pt() || !t.visualViewport ? oo : {
1042
+ x: t.visualViewport.offsetLeft,
1043
+ y: t.visualViewport.offsetTop
1044
+ };
1045
+ }
1046
+ function io(e, t, n) {
1047
+ return t === void 0 && (t = !1), !n || t && n !== ge(e) ? !1 : t;
1048
+ }
1049
+ function Ue(e, t, n, r) {
1050
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
1051
+ const o = e.getBoundingClientRect(), s = sn(e);
1052
+ let i = Ie(1);
1053
+ t && (r ? q(r) && (i = Je(r)) : i = Je(e));
1054
+ const c = io(s, n, r) ? ur(s) : Ie(0);
1055
+ let a = (o.left + c.x) / i.x, u = (o.top + c.y) / i.y, l = o.width / i.x, p = o.height / i.y;
1056
+ if (s) {
1057
+ const g = ge(s), d = r && q(r) ? ge(r) : r;
1058
+ let h = g, m = Jt(h);
1059
+ for (; m && r && d !== h; ) {
1060
+ const y = Je(m), E = m.getBoundingClientRect(), v = we(m), x = E.left + (m.clientLeft + parseFloat(v.paddingLeft)) * y.x, I = E.top + (m.clientTop + parseFloat(v.paddingTop)) * y.y;
1061
+ a *= y.x, u *= y.y, l *= y.x, p *= y.y, a += x, u += I, h = ge(m), m = Jt(h);
1062
+ }
1063
+ }
1064
+ return It({
1065
+ width: l,
1066
+ height: p,
1067
+ x: a,
1068
+ y: u
1069
+ });
1070
+ }
1071
+ function cn(e, t) {
1072
+ const n = Dt(e).scrollLeft;
1073
+ return t ? t.left + n : Ue(Te(e)).left + n;
1074
+ }
1075
+ function lr(e, t, n) {
1076
+ n === void 0 && (n = !1);
1077
+ const r = e.getBoundingClientRect(), o = r.left + t.scrollLeft - (n ? 0 : (
1078
+ // RTL <body> scrollbar.
1079
+ cn(e, r)
1080
+ )), s = r.top + t.scrollTop;
1081
+ return {
1082
+ x: o,
1083
+ y: s
1084
+ };
1085
+ }
1086
+ function so(e) {
1087
+ let {
1088
+ elements: t,
1089
+ rect: n,
1090
+ offsetParent: r,
1091
+ strategy: o
1092
+ } = e;
1093
+ const s = o === "fixed", i = Te(r), c = t ? St(t.floating) : !1;
1094
+ if (r === i || c && s)
1095
+ return n;
1096
+ let a = {
1097
+ scrollLeft: 0,
1098
+ scrollTop: 0
1099
+ }, u = Ie(1);
1100
+ const l = Ie(0), p = ie(r);
1101
+ if ((p || !p && !s) && ((Ke(r) !== "body" || ut(i)) && (a = Dt(r)), ie(r))) {
1102
+ const d = Ue(r);
1103
+ u = Je(r), l.x = d.x + r.clientLeft, l.y = d.y + r.clientTop;
1104
+ }
1105
+ const g = i && !p && !s ? lr(i, a, !0) : Ie(0);
1106
+ return {
1107
+ width: n.width * u.x,
1108
+ height: n.height * u.y,
1109
+ x: n.x * u.x - a.scrollLeft * u.x + l.x + g.x,
1110
+ y: n.y * u.y - a.scrollTop * u.y + l.y + g.y
1111
+ };
1112
+ }
1113
+ function co(e) {
1114
+ return Array.from(e.getClientRects());
1115
+ }
1116
+ function uo(e) {
1117
+ const t = Te(e), n = Dt(e), r = e.ownerDocument.body, o = he(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = he(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1118
+ let i = -n.scrollLeft + cn(e);
1119
+ const c = -n.scrollTop;
1120
+ return we(r).direction === "rtl" && (i += he(t.clientWidth, r.clientWidth) - o), {
1121
+ width: o,
1122
+ height: s,
1123
+ x: i,
1124
+ y: c
1125
+ };
1126
+ }
1127
+ function lo(e, t) {
1128
+ const n = ge(e), r = Te(e), o = n.visualViewport;
1129
+ let s = r.clientWidth, i = r.clientHeight, c = 0, a = 0;
1130
+ if (o) {
1131
+ s = o.width, i = o.height;
1132
+ const u = Pt();
1133
+ (!u || u && t === "fixed") && (c = o.offsetLeft, a = o.offsetTop);
1134
+ }
1135
+ return {
1136
+ width: s,
1137
+ height: i,
1138
+ x: c,
1139
+ y: a
1140
+ };
1141
+ }
1142
+ function ao(e, t) {
1143
+ const n = Ue(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = ie(e) ? Je(e) : Ie(1), i = e.clientWidth * s.x, c = e.clientHeight * s.y, a = o * s.x, u = r * s.y;
1144
+ return {
1145
+ width: i,
1146
+ height: c,
1147
+ x: a,
1148
+ y: u
1149
+ };
1150
+ }
1151
+ function yn(e, t, n) {
1152
+ let r;
1153
+ if (t === "viewport")
1154
+ r = lo(e, n);
1155
+ else if (t === "document")
1156
+ r = uo(Te(e));
1157
+ else if (q(t))
1158
+ r = ao(t, n);
1159
+ else {
1160
+ const o = ur(e);
1161
+ r = {
1162
+ x: t.x - o.x,
1163
+ y: t.y - o.y,
1164
+ width: t.width,
1165
+ height: t.height
1166
+ };
1167
+ }
1168
+ return It(r);
1169
+ }
1170
+ function ar(e, t) {
1171
+ const n = Pe(e);
1172
+ return n === t || !q(n) || Se(n) ? !1 : we(n).position === "fixed" || ar(n, t);
1173
+ }
1174
+ function fo(e, t) {
1175
+ const n = t.get(e);
1176
+ if (n)
1177
+ return n;
1178
+ let r = Le(e, [], !1).filter((c) => q(c) && Ke(c) !== "body"), o = null;
1179
+ const s = we(e).position === "fixed";
1180
+ let i = s ? Pe(e) : e;
1181
+ for (; q(i) && !Se(i); ) {
1182
+ const c = we(i), a = nn(i);
1183
+ !a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ut(i) && !a && ar(e, i)) ? r = r.filter((l) => l !== i) : o = c, i = Pe(i);
1184
+ }
1185
+ return t.set(e, r), r;
1186
+ }
1187
+ function mo(e) {
1188
+ let {
1189
+ element: t,
1190
+ boundary: n,
1191
+ rootBoundary: r,
1192
+ strategy: o
1193
+ } = e;
1194
+ const i = [...n === "clippingAncestors" ? St(t) ? [] : fo(t, this._c) : [].concat(n), r], c = i[0], a = i.reduce((u, l) => {
1195
+ const p = yn(t, l, o);
1196
+ return u.top = he(p.top, u.top), u.right = Qe(p.right, u.right), u.bottom = Qe(p.bottom, u.bottom), u.left = he(p.left, u.left), u;
1197
+ }, yn(t, c, o));
1198
+ return {
1199
+ width: a.right - a.left,
1200
+ height: a.bottom - a.top,
1201
+ x: a.left,
1202
+ y: a.top
1203
+ };
1204
+ }
1205
+ function go(e) {
1206
+ const {
1207
+ width: t,
1208
+ height: n
1209
+ } = cr(e);
1210
+ return {
1211
+ width: t,
1212
+ height: n
1213
+ };
1214
+ }
1215
+ function po(e, t, n) {
1216
+ const r = ie(t), o = Te(t), s = n === "fixed", i = Ue(e, !0, s, t);
1217
+ let c = {
1218
+ scrollLeft: 0,
1219
+ scrollTop: 0
1220
+ };
1221
+ const a = Ie(0);
1222
+ if (r || !r && !s)
1223
+ if ((Ke(t) !== "body" || ut(o)) && (c = Dt(t)), r) {
1224
+ const g = Ue(t, !0, s, t);
1225
+ a.x = g.x + t.clientLeft, a.y = g.y + t.clientTop;
1226
+ } else o && (a.x = cn(o));
1227
+ const u = o && !r && !s ? lr(o, c) : Ie(0), l = i.left + c.scrollLeft - a.x - u.x, p = i.top + c.scrollTop - a.y - u.y;
1228
+ return {
1229
+ x: l,
1230
+ y: p,
1231
+ width: i.width,
1232
+ height: i.height
1233
+ };
1234
+ }
1235
+ function Wt(e) {
1236
+ return we(e).position === "static";
1237
+ }
1238
+ function xn(e, t) {
1239
+ if (!ie(e) || we(e).position === "fixed")
1240
+ return null;
1241
+ if (t)
1242
+ return t(e);
1243
+ let n = e.offsetParent;
1244
+ return Te(e) === n && (n = n.ownerDocument.body), n;
1245
+ }
1246
+ function fr(e, t) {
1247
+ const n = ge(e);
1248
+ if (St(e))
1249
+ return n;
1250
+ if (!ie(e)) {
1251
+ let o = Pe(e);
1252
+ for (; o && !Se(o); ) {
1253
+ if (q(o) && !Wt(o))
1254
+ return o;
1255
+ o = Pe(o);
1256
+ }
1257
+ return n;
1258
+ }
1259
+ let r = xn(e, t);
1260
+ for (; r && Ar(r) && Wt(r); )
1261
+ r = xn(r, t);
1262
+ return r && Se(r) && Wt(r) && !nn(r) ? n : r || Mr(e) || n;
1263
+ }
1264
+ const ho = async function(e) {
1265
+ const t = this.getOffsetParent || fr, n = this.getDimensions, r = await n(e.floating);
1266
+ return {
1267
+ reference: po(e.reference, await t(e.floating), e.strategy),
1268
+ floating: {
1269
+ x: 0,
1270
+ y: 0,
1271
+ width: r.width,
1272
+ height: r.height
1273
+ }
1274
+ };
1275
+ };
1276
+ function vo(e) {
1277
+ return we(e).direction === "rtl";
1278
+ }
1279
+ const bo = {
1280
+ convertOffsetParentRelativeRectToViewportRelativeRect: so,
1281
+ getDocumentElement: Te,
1282
+ getClippingRect: mo,
1283
+ getOffsetParent: fr,
1284
+ getElementRects: ho,
1285
+ getClientRects: co,
1286
+ getDimensions: go,
1287
+ getScale: Je,
1288
+ isElement: q,
1289
+ isRTL: vo
1290
+ };
1291
+ function dr(e, t) {
1292
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1293
+ }
1294
+ function yo(e, t) {
1295
+ let n = null, r;
1296
+ const o = Te(e);
1297
+ function s() {
1298
+ var c;
1299
+ clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
1300
+ }
1301
+ function i(c, a) {
1302
+ c === void 0 && (c = !1), a === void 0 && (a = 1), s();
1303
+ const u = e.getBoundingClientRect(), {
1304
+ left: l,
1305
+ top: p,
1306
+ width: g,
1307
+ height: d
1308
+ } = u;
1309
+ if (c || t(), !g || !d)
1310
+ return;
1311
+ const h = qe(p), m = qe(o.clientWidth - (l + g)), y = qe(o.clientHeight - (p + d)), E = qe(l), x = {
1312
+ rootMargin: -h + "px " + -m + "px " + -y + "px " + -E + "px",
1313
+ threshold: he(0, Qe(1, a)) || 1
1314
+ };
1315
+ let I = !0;
1316
+ function A(k) {
1317
+ const L = k[0].intersectionRatio;
1318
+ if (L !== a) {
1319
+ if (!I)
1320
+ return i();
1321
+ L ? i(!1, L) : r = setTimeout(() => {
1322
+ i(!1, 1e-7);
1323
+ }, 1e3);
1324
+ }
1325
+ L === 1 && !dr(u, e.getBoundingClientRect()) && i(), I = !1;
1326
+ }
1327
+ try {
1328
+ n = new IntersectionObserver(A, {
1329
+ ...x,
1330
+ // Handle <iframe>s
1331
+ root: o.ownerDocument
1332
+ });
1333
+ } catch {
1334
+ n = new IntersectionObserver(A, x);
1335
+ }
1336
+ n.observe(e);
1337
+ }
1338
+ return i(!0), s;
1339
+ }
1340
+ function ri(e, t, n, r) {
1341
+ r === void 0 && (r = {});
1342
+ const {
1343
+ ancestorScroll: o = !0,
1344
+ ancestorResize: s = !0,
1345
+ elementResize: i = typeof ResizeObserver == "function",
1346
+ layoutShift: c = typeof IntersectionObserver == "function",
1347
+ animationFrame: a = !1
1348
+ } = r, u = sn(e), l = o || s ? [...u ? Le(u) : [], ...Le(t)] : [];
1349
+ l.forEach((E) => {
1350
+ o && E.addEventListener("scroll", n, {
1351
+ passive: !0
1352
+ }), s && E.addEventListener("resize", n);
1353
+ });
1354
+ const p = u && c ? yo(u, n) : null;
1355
+ let g = -1, d = null;
1356
+ i && (d = new ResizeObserver((E) => {
1357
+ let [v] = E;
1358
+ v && v.target === u && d && (d.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
1359
+ var x;
1360
+ (x = d) == null || x.observe(t);
1361
+ })), n();
1362
+ }), u && !a && d.observe(u), d.observe(t));
1363
+ let h, m = a ? Ue(e) : null;
1364
+ a && y();
1365
+ function y() {
1366
+ const E = Ue(e);
1367
+ m && !dr(m, E) && n(), m = E, h = requestAnimationFrame(y);
1368
+ }
1369
+ return n(), () => {
1370
+ var E;
1371
+ l.forEach((v) => {
1372
+ o && v.removeEventListener("scroll", n), s && v.removeEventListener("resize", n);
1373
+ }), p == null || p(), (E = d) == null || E.disconnect(), d = null, a && cancelAnimationFrame(h);
1374
+ };
1375
+ }
1376
+ const xo = to, wo = Qr, Ro = no, Eo = Zr, Io = ro, Co = (e, t, n) => {
1377
+ const r = /* @__PURE__ */ new Map(), o = {
1378
+ platform: bo,
1379
+ ...n
1380
+ }, s = {
1381
+ ...o.platform,
1382
+ _c: r
1383
+ };
1384
+ return Xr(e, t, {
1385
+ ...o,
1386
+ platform: s
1387
+ });
1388
+ };
1389
+ var xt = typeof document < "u" ? Vn : Wn;
1390
+ function Ot(e, t) {
1391
+ if (e === t)
1392
+ return !0;
1393
+ if (typeof e != typeof t)
1394
+ return !1;
1395
+ if (typeof e == "function" && e.toString() === t.toString())
1396
+ return !0;
1397
+ let n, r, o;
1398
+ if (e && t && typeof e == "object") {
1399
+ if (Array.isArray(e)) {
1400
+ if (n = e.length, n !== t.length) return !1;
1401
+ for (r = n; r-- !== 0; )
1402
+ if (!Ot(e[r], t[r]))
1403
+ return !1;
1404
+ return !0;
1405
+ }
1406
+ if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
1407
+ return !1;
1408
+ for (r = n; r-- !== 0; )
1409
+ if (!{}.hasOwnProperty.call(t, o[r]))
1410
+ return !1;
1411
+ for (r = n; r-- !== 0; ) {
1412
+ const s = o[r];
1413
+ if (!(s === "_owner" && e.$$typeof) && !Ot(e[s], t[s]))
1414
+ return !1;
1415
+ }
1416
+ return !0;
1417
+ }
1418
+ return e !== e && t !== t;
1419
+ }
1420
+ function mr(e) {
1421
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1422
+ }
1423
+ function wn(e, t) {
1424
+ const n = mr(e);
1425
+ return Math.round(t * n) / n;
1426
+ }
1427
+ function $t(e) {
1428
+ const t = f.useRef(e);
1429
+ return xt(() => {
1430
+ t.current = e;
1431
+ }), t;
1432
+ }
1433
+ function Oo(e) {
1434
+ e === void 0 && (e = {});
1435
+ const {
1436
+ placement: t = "bottom",
1437
+ strategy: n = "absolute",
1438
+ middleware: r = [],
1439
+ platform: o,
1440
+ elements: {
1441
+ reference: s,
1442
+ floating: i
1443
+ } = {},
1444
+ transform: c = !0,
1445
+ whileElementsMounted: a,
1446
+ open: u
1447
+ } = e, [l, p] = f.useState({
1448
+ x: 0,
1449
+ y: 0,
1450
+ strategy: n,
1451
+ placement: t,
1452
+ middlewareData: {},
1453
+ isPositioned: !1
1454
+ }), [g, d] = f.useState(r);
1455
+ Ot(g, r) || d(r);
1456
+ const [h, m] = f.useState(null), [y, E] = f.useState(null), v = f.useCallback((b) => {
1457
+ b !== k.current && (k.current = b, m(b));
1458
+ }, []), x = f.useCallback((b) => {
1459
+ b !== L.current && (L.current = b, E(b));
1460
+ }, []), I = s || h, A = i || y, k = f.useRef(null), L = f.useRef(null), M = f.useRef(l), F = a != null, N = $t(a), _ = $t(o), U = $t(u), V = f.useCallback(() => {
1461
+ if (!k.current || !L.current)
1462
+ return;
1463
+ const b = {
1464
+ placement: t,
1465
+ strategy: n,
1466
+ middleware: g
1467
+ };
1468
+ _.current && (b.platform = _.current), Co(k.current, L.current, b).then((R) => {
1469
+ const S = {
1470
+ ...R,
1471
+ // The floating element's position may be recomputed while it's closed
1472
+ // but still mounted (such as when transitioning out). To ensure
1473
+ // `isPositioned` will be `false` initially on the next open, avoid
1474
+ // setting it to `true` when `open === false` (must be specified).
1475
+ isPositioned: U.current !== !1
1476
+ };
1477
+ T.current && !Ot(M.current, S) && (M.current = S, tn.flushSync(() => {
1478
+ p(S);
1479
+ }));
1480
+ });
1481
+ }, [g, t, n, _, U]);
1482
+ xt(() => {
1483
+ u === !1 && M.current.isPositioned && (M.current.isPositioned = !1, p((b) => ({
1484
+ ...b,
1485
+ isPositioned: !1
1486
+ })));
1487
+ }, [u]);
1488
+ const T = f.useRef(!1);
1489
+ xt(() => (T.current = !0, () => {
1490
+ T.current = !1;
1491
+ }), []), xt(() => {
1492
+ if (I && (k.current = I), A && (L.current = A), I && A) {
1493
+ if (N.current)
1494
+ return N.current(I, A, V);
1495
+ V();
1496
+ }
1497
+ }, [I, A, V, N, F]);
1498
+ const w = f.useMemo(() => ({
1499
+ reference: k,
1500
+ floating: L,
1501
+ setReference: v,
1502
+ setFloating: x
1503
+ }), [v, x]), K = f.useMemo(() => ({
1504
+ reference: I,
1505
+ floating: A
1506
+ }), [I, A]), O = f.useMemo(() => {
1507
+ const b = {
1508
+ position: n,
1509
+ left: 0,
1510
+ top: 0
1511
+ };
1512
+ if (!K.floating)
1513
+ return b;
1514
+ const R = wn(K.floating, l.x), S = wn(K.floating, l.y);
1515
+ return c ? {
1516
+ ...b,
1517
+ transform: "translate(" + R + "px, " + S + "px)",
1518
+ ...mr(K.floating) >= 1.5 && {
1519
+ willChange: "transform"
1520
+ }
1521
+ } : {
1522
+ position: n,
1523
+ left: R,
1524
+ top: S
1525
+ };
1526
+ }, [n, c, K.floating, l.x, l.y]);
1527
+ return f.useMemo(() => ({
1528
+ ...l,
1529
+ update: V,
1530
+ refs: w,
1531
+ elements: K,
1532
+ floatingStyles: O
1533
+ }), [l, V, w, K, O]);
1534
+ }
1535
+ const oi = (e, t) => ({
1536
+ ...xo(e),
1537
+ options: [e, t]
1538
+ }), ii = (e, t) => ({
1539
+ ...Ro(e),
1540
+ options: [e, t]
1541
+ }), si = (e, t) => ({
1542
+ ...Eo(e),
1543
+ options: [e, t]
1544
+ }), ci = (e, t) => ({
1545
+ ...Io(e),
1546
+ options: [e, t]
1547
+ }), ui = (e, t) => ({
1548
+ ...wo(e),
1549
+ options: [e, t]
1550
+ });
1551
+ function To(e) {
1552
+ const t = f.useRef(void 0), n = f.useCallback((r) => {
1553
+ const o = e.map((s) => {
1554
+ if (s != null) {
1555
+ if (typeof s == "function") {
1556
+ const i = s, c = i(r);
1557
+ return typeof c == "function" ? c : () => {
1558
+ i(null);
1559
+ };
1560
+ }
1561
+ return s.current = r, () => {
1562
+ s.current = null;
1563
+ };
1564
+ }
1565
+ });
1566
+ return () => {
1567
+ o.forEach((s) => s == null ? void 0 : s());
1568
+ };
1569
+ }, e);
1570
+ return f.useMemo(() => e.every((r) => r == null) ? null : (r) => {
1571
+ t.current && (t.current(), t.current = void 0), r != null && (t.current = n(r));
1572
+ }, e);
1573
+ }
1574
+ function Ao(e, t) {
1575
+ const n = e.compareDocumentPosition(t);
1576
+ return n & Node.DOCUMENT_POSITION_FOLLOWING || n & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING || n & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
1577
+ }
1578
+ const gr = /* @__PURE__ */ f.createContext({
1579
+ register: () => {
1580
+ },
1581
+ unregister: () => {
1582
+ },
1583
+ map: /* @__PURE__ */ new Map(),
1584
+ elementsRef: {
1585
+ current: []
1586
+ }
1587
+ });
1588
+ function Mo(e) {
1589
+ const {
1590
+ children: t,
1591
+ elementsRef: n,
1592
+ labelsRef: r
1593
+ } = e, [o, s] = f.useState(() => /* @__PURE__ */ new Set()), i = f.useCallback((u) => {
1594
+ s((l) => new Set(l).add(u));
1595
+ }, []), c = f.useCallback((u) => {
1596
+ s((l) => {
1597
+ const p = new Set(l);
1598
+ return p.delete(u), p;
1599
+ });
1600
+ }, []), a = f.useMemo(() => {
1601
+ const u = /* @__PURE__ */ new Map();
1602
+ return Array.from(o.keys()).sort(Ao).forEach((p, g) => {
1603
+ u.set(p, g);
1604
+ }), u;
1605
+ }, [o]);
1606
+ return /* @__PURE__ */ me(gr.Provider, {
1607
+ value: f.useMemo(() => ({
1608
+ register: i,
1609
+ unregister: c,
1610
+ map: a,
1611
+ elementsRef: n,
1612
+ labelsRef: r
1613
+ }), [i, c, a, n, r]),
1614
+ children: t
1615
+ });
1616
+ }
1617
+ function So(e) {
1618
+ e === void 0 && (e = {});
1619
+ const {
1620
+ label: t
1621
+ } = e, {
1622
+ register: n,
1623
+ unregister: r,
1624
+ map: o,
1625
+ elementsRef: s,
1626
+ labelsRef: i
1627
+ } = f.useContext(gr), [c, a] = f.useState(null), u = f.useRef(null), l = f.useCallback((p) => {
1628
+ if (u.current = p, c !== null && (s.current[c] = p, i)) {
1629
+ var g;
1630
+ const d = t !== void 0;
1631
+ i.current[c] = d ? t : (g = p == null ? void 0 : p.textContent) != null ? g : null;
1632
+ }
1633
+ }, [c, s, i, t]);
1634
+ return X(() => {
1635
+ const p = u.current;
1636
+ if (p)
1637
+ return n(p), () => {
1638
+ r(p);
1639
+ };
1640
+ }, [n, r]), X(() => {
1641
+ const p = u.current ? o.get(u.current) : null;
1642
+ p != null && a(p);
1643
+ }, [o]), f.useMemo(() => ({
1644
+ ref: l,
1645
+ index: c ?? -1
1646
+ }), [c, l]);
1647
+ }
1648
+ const Po = "data-floating-ui-focusable", Rn = "active", En = "selected", Ne = "ArrowLeft", _e = "ArrowRight", st = "ArrowUp", Fe = "ArrowDown";
1649
+ function pr(e, t) {
1650
+ return typeof e == "function" ? e(t) : e ? /* @__PURE__ */ f.cloneElement(e, t) : /* @__PURE__ */ me("div", {
1651
+ ...t
1652
+ });
1653
+ }
1654
+ const hr = /* @__PURE__ */ f.createContext({
1655
+ activeIndex: 0,
1656
+ onNavigate: () => {
1657
+ }
1658
+ }), vr = [Ne, _e], br = [st, Fe], Bt = [...vr, ...br], li = /* @__PURE__ */ f.forwardRef(function(t, n) {
1659
+ const {
1660
+ render: r,
1661
+ orientation: o = "both",
1662
+ loop: s = !0,
1663
+ rtl: i = !1,
1664
+ cols: c = 1,
1665
+ disabledIndices: a,
1666
+ activeIndex: u,
1667
+ onNavigate: l,
1668
+ itemSizes: p,
1669
+ dense: g = !1,
1670
+ ...d
1671
+ } = t, [h, m] = f.useState(0), y = u ?? h, E = ae(l ?? m), v = f.useRef([]), x = r && typeof r != "function" ? r.props : {}, I = f.useMemo(() => ({
1672
+ activeIndex: y,
1673
+ onNavigate: E
1674
+ }), [y, E]), A = c > 1;
1675
+ function k(M) {
1676
+ if (!Bt.includes(M.key)) return;
1677
+ let F = y;
1678
+ const N = yt(v, a), _ = en(v, a), U = i ? Ne : _e, V = i ? _e : Ne;
1679
+ if (A) {
1680
+ const b = p || Array.from({
1681
+ length: v.current.length
1682
+ }, () => ({
1683
+ width: 1,
1684
+ height: 1
1685
+ })), R = tr(b, c, g), S = R.findIndex((W) => W != null && !He(v, W, a)), G = R.reduce((W, te, fe) => te != null && !He(v, te, a) ? fe : W, -1), C = R[er({
1686
+ current: R.map((W) => W ? v.current[W] : null)
1687
+ }, {
1688
+ event: M,
1689
+ orientation: o,
1690
+ loop: s,
1691
+ rtl: i,
1692
+ cols: c,
1693
+ // treat undefined (empty grid spaces) as disabled indices so we
1694
+ // don't end up in them
1695
+ disabledIndices: rr([...a || v.current.map((W, te) => He(v, te) ? te : void 0), void 0], R),
1696
+ minIndex: S,
1697
+ maxIndex: G,
1698
+ prevIndex: nr(
1699
+ y > _ ? N : y,
1700
+ b,
1701
+ R,
1702
+ c,
1703
+ // use a corner matching the edge closest to the direction we're
1704
+ // moving in so we don't end up in the same item. Prefer
1705
+ // top/left over bottom/right.
1706
+ M.key === Fe ? "bl" : M.key === U ? "tr" : "tl"
1707
+ )
1708
+ })];
1709
+ C != null && (F = C);
1710
+ }
1711
+ const T = {
1712
+ horizontal: [U],
1713
+ vertical: [Fe],
1714
+ both: [U, Fe]
1715
+ }[o], w = {
1716
+ horizontal: [V],
1717
+ vertical: [st],
1718
+ both: [V, st]
1719
+ }[o], K = A ? Bt : {
1720
+ horizontal: vr,
1721
+ vertical: br,
1722
+ both: Bt
1723
+ }[o];
1724
+ if (F === y && [...T, ...w].includes(M.key) && (s && F === _ && T.includes(M.key) ? F = N : s && F === N && w.includes(M.key) ? F = _ : F = ue(v, {
1725
+ startingIndex: F,
1726
+ decrement: w.includes(M.key),
1727
+ disabledIndices: a
1728
+ })), F !== y && !Xe(v, F)) {
1729
+ var O;
1730
+ M.stopPropagation(), K.includes(M.key) && M.preventDefault(), E(F), (O = v.current[F]) == null || O.focus();
1731
+ }
1732
+ }
1733
+ const L = {
1734
+ ...d,
1735
+ ...x,
1736
+ ref: n,
1737
+ "aria-orientation": o === "both" ? void 0 : o,
1738
+ onKeyDown(M) {
1739
+ d.onKeyDown == null || d.onKeyDown(M), x.onKeyDown == null || x.onKeyDown(M), k(M);
1740
+ }
1741
+ };
1742
+ return /* @__PURE__ */ me(hr.Provider, {
1743
+ value: I,
1744
+ children: /* @__PURE__ */ me(Mo, {
1745
+ elementsRef: v,
1746
+ children: pr(r, L)
1747
+ })
1748
+ });
1749
+ }), ai = /* @__PURE__ */ f.forwardRef(function(t, n) {
1750
+ const {
1751
+ render: r,
1752
+ ...o
1753
+ } = t, s = r && typeof r != "function" ? r.props : {}, {
1754
+ activeIndex: i,
1755
+ onNavigate: c
1756
+ } = f.useContext(hr), {
1757
+ ref: a,
1758
+ index: u
1759
+ } = So(), l = To([a, n, s.ref]), p = i === u, g = {
1760
+ ...o,
1761
+ ...s,
1762
+ ref: l,
1763
+ tabIndex: p ? 0 : -1,
1764
+ "data-active": p ? "" : void 0,
1765
+ onFocus(d) {
1766
+ o.onFocus == null || o.onFocus(d), s.onFocus == null || s.onFocus(d), c(u);
1767
+ }
1768
+ };
1769
+ return pr(r, g);
1770
+ }), Do = {
1771
+ ...f
1772
+ };
1773
+ let In = !1, ko = 0;
1774
+ const Cn = () => (
1775
+ // Ensure the id is unique with multiple independent versions of Floating UI
1776
+ // on <React 18
1777
+ "floating-ui-" + Math.random().toString(36).slice(2, 6) + ko++
1778
+ );
1779
+ function Lo() {
1780
+ const [e, t] = f.useState(() => In ? Cn() : void 0);
1781
+ return X(() => {
1782
+ e == null && t(Cn());
1783
+ }, []), f.useEffect(() => {
1784
+ In = !0;
1785
+ }, []), e;
1786
+ }
1787
+ const Fo = Do.useId, Lt = Fo || Lo;
1788
+ let ct;
1789
+ process.env.NODE_ENV !== "production" && (ct = /* @__PURE__ */ new Set());
1790
+ function Ht() {
1791
+ for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1792
+ n[r] = arguments[r];
1793
+ const o = "Floating UI: " + n.join(" ");
1794
+ if (!((e = ct) != null && e.has(o))) {
1795
+ var s;
1796
+ (s = ct) == null || s.add(o), console.warn(o);
1797
+ }
1798
+ }
1799
+ function No() {
1800
+ for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1801
+ n[r] = arguments[r];
1802
+ const o = "Floating UI: " + n.join(" ");
1803
+ if (!((e = ct) != null && e.has(o))) {
1804
+ var s;
1805
+ (s = ct) == null || s.add(o), console.error(o);
1806
+ }
1807
+ }
1808
+ function yr() {
1809
+ const e = /* @__PURE__ */ new Map();
1810
+ return {
1811
+ emit(t, n) {
1812
+ var r;
1813
+ (r = e.get(t)) == null || r.forEach((o) => o(n));
1814
+ },
1815
+ on(t, n) {
1816
+ e.has(t) || e.set(t, /* @__PURE__ */ new Set()), e.get(t).add(n);
1817
+ },
1818
+ off(t, n) {
1819
+ var r;
1820
+ (r = e.get(t)) == null || r.delete(n);
1821
+ }
1822
+ };
1823
+ }
1824
+ const xr = /* @__PURE__ */ f.createContext(null), wr = /* @__PURE__ */ f.createContext(null), et = () => {
1825
+ var e;
1826
+ return ((e = f.useContext(xr)) == null ? void 0 : e.id) || null;
1827
+ }, tt = () => f.useContext(wr);
1828
+ function fi(e) {
1829
+ const t = Lt(), n = tt(), o = et();
1830
+ return X(() => {
1831
+ if (!t) return;
1832
+ const s = {
1833
+ id: t,
1834
+ parentId: o
1835
+ };
1836
+ return n == null || n.addNode(s), () => {
1837
+ n == null || n.removeNode(s);
1838
+ };
1839
+ }, [n, t, o]), t;
1840
+ }
1841
+ function di(e) {
1842
+ const {
1843
+ children: t,
1844
+ id: n
1845
+ } = e, r = et();
1846
+ return /* @__PURE__ */ me(xr.Provider, {
1847
+ value: f.useMemo(() => ({
1848
+ id: n,
1849
+ parentId: r
1850
+ }), [n, r]),
1851
+ children: t
1852
+ });
1853
+ }
1854
+ function mi(e) {
1855
+ const {
1856
+ children: t
1857
+ } = e, n = f.useRef([]), r = f.useCallback((i) => {
1858
+ n.current = [...n.current, i];
1859
+ }, []), o = f.useCallback((i) => {
1860
+ n.current = n.current.filter((c) => c !== i);
1861
+ }, []), [s] = f.useState(() => yr());
1862
+ return /* @__PURE__ */ me(wr.Provider, {
1863
+ value: f.useMemo(() => ({
1864
+ nodesRef: n,
1865
+ addNode: r,
1866
+ removeNode: o,
1867
+ events: s
1868
+ }), [r, o, s]),
1869
+ children: t
1870
+ });
1871
+ }
1872
+ function Ge(e) {
1873
+ return "data-floating-ui-" + e;
1874
+ }
1875
+ function ye(e) {
1876
+ e.current !== -1 && (clearTimeout(e.current), e.current = -1);
1877
+ }
1878
+ const On = /* @__PURE__ */ Ge("safe-polygon");
1879
+ function zt(e, t, n) {
1880
+ if (n && !it(n))
1881
+ return 0;
1882
+ if (typeof e == "number")
1883
+ return e;
1884
+ if (typeof e == "function") {
1885
+ const r = e();
1886
+ return typeof r == "number" ? r : r == null ? void 0 : r[t];
1887
+ }
1888
+ return e == null ? void 0 : e[t];
1889
+ }
1890
+ function Ut(e) {
1891
+ return typeof e == "function" ? e() : e;
1892
+ }
1893
+ function gi(e, t) {
1894
+ t === void 0 && (t = {});
1895
+ const {
1896
+ open: n,
1897
+ onOpenChange: r,
1898
+ dataRef: o,
1899
+ events: s,
1900
+ elements: i
1901
+ } = e, {
1902
+ enabled: c = !0,
1903
+ delay: a = 0,
1904
+ handleClose: u = null,
1905
+ mouseOnly: l = !1,
1906
+ restMs: p = 0,
1907
+ move: g = !0
1908
+ } = t, d = tt(), h = et(), m = xe(u), y = xe(a), E = xe(n), v = xe(p), x = f.useRef(), I = f.useRef(-1), A = f.useRef(), k = f.useRef(-1), L = f.useRef(!0), M = f.useRef(!1), F = f.useRef(() => {
1909
+ }), N = f.useRef(!1), _ = f.useCallback(() => {
1910
+ var O;
1911
+ const b = (O = o.current.openEvent) == null ? void 0 : O.type;
1912
+ return (b == null ? void 0 : b.includes("mouse")) && b !== "mousedown";
1913
+ }, [o]);
1914
+ f.useEffect(() => {
1915
+ if (!c) return;
1916
+ function O(b) {
1917
+ let {
1918
+ open: R
1919
+ } = b;
1920
+ R || (ye(I), ye(k), L.current = !0, N.current = !1);
1921
+ }
1922
+ return s.on("openchange", O), () => {
1923
+ s.off("openchange", O);
1924
+ };
1925
+ }, [c, s]), f.useEffect(() => {
1926
+ if (!c || !m.current || !n) return;
1927
+ function O(R) {
1928
+ _() && r(!1, R, "hover");
1929
+ }
1930
+ const b = le(i.floating).documentElement;
1931
+ return b.addEventListener("mouseleave", O), () => {
1932
+ b.removeEventListener("mouseleave", O);
1933
+ };
1934
+ }, [i.floating, n, r, c, m, _]);
1935
+ const U = f.useCallback(function(O, b, R) {
1936
+ b === void 0 && (b = !0), R === void 0 && (R = "hover");
1937
+ const S = zt(y.current, "close", x.current);
1938
+ S && !A.current ? (ye(I), I.current = window.setTimeout(() => r(!1, O, R), S)) : b && (ye(I), r(!1, O, R));
1939
+ }, [y, r]), V = ae(() => {
1940
+ F.current(), A.current = void 0;
1941
+ }), T = ae(() => {
1942
+ if (M.current) {
1943
+ const O = le(i.floating).body;
1944
+ O.style.pointerEvents = "", O.removeAttribute(On), M.current = !1;
1945
+ }
1946
+ }), w = ae(() => o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1);
1947
+ f.useEffect(() => {
1948
+ if (!c) return;
1949
+ function O(C) {
1950
+ if (ye(I), L.current = !1, l && !it(x.current) || Ut(v.current) > 0 && !zt(y.current, "open"))
1951
+ return;
1952
+ const W = zt(y.current, "open", x.current);
1953
+ W ? I.current = window.setTimeout(() => {
1954
+ E.current || r(!0, C, "hover");
1955
+ }, W) : n || r(!0, C, "hover");
1956
+ }
1957
+ function b(C) {
1958
+ if (w()) {
1959
+ T();
1960
+ return;
1961
+ }
1962
+ F.current();
1963
+ const W = le(i.floating);
1964
+ if (ye(k), N.current = !1, m.current && o.current.floatingContext) {
1965
+ n || ye(I), A.current = m.current({
1966
+ ...o.current.floatingContext,
1967
+ tree: d,
1968
+ x: C.clientX,
1969
+ y: C.clientY,
1970
+ onClose() {
1971
+ T(), V(), w() || U(C, !0, "safe-polygon");
1972
+ }
1973
+ });
1974
+ const fe = A.current;
1975
+ W.addEventListener("mousemove", fe), F.current = () => {
1976
+ W.removeEventListener("mousemove", fe);
1977
+ };
1978
+ return;
1979
+ }
1980
+ (x.current === "touch" ? !ce(i.floating, C.relatedTarget) : !0) && U(C);
1981
+ }
1982
+ function R(C) {
1983
+ w() || o.current.floatingContext && (m.current == null || m.current({
1984
+ ...o.current.floatingContext,
1985
+ tree: d,
1986
+ x: C.clientX,
1987
+ y: C.clientY,
1988
+ onClose() {
1989
+ T(), V(), w() || U(C);
1990
+ }
1991
+ })(C));
1992
+ }
1993
+ function S() {
1994
+ ye(I);
1995
+ }
1996
+ function G(C) {
1997
+ w() || U(C, !1);
1998
+ }
1999
+ if (q(i.domReference)) {
2000
+ const C = i.domReference, W = i.floating;
2001
+ return n && C.addEventListener("mouseleave", R), g && C.addEventListener("mousemove", O, {
2002
+ once: !0
2003
+ }), C.addEventListener("mouseenter", O), C.addEventListener("mouseleave", b), W && (W.addEventListener("mouseleave", R), W.addEventListener("mouseenter", S), W.addEventListener("mouseleave", G)), () => {
2004
+ n && C.removeEventListener("mouseleave", R), g && C.removeEventListener("mousemove", O), C.removeEventListener("mouseenter", O), C.removeEventListener("mouseleave", b), W && (W.removeEventListener("mouseleave", R), W.removeEventListener("mouseenter", S), W.removeEventListener("mouseleave", G));
2005
+ };
2006
+ }
2007
+ }, [i, c, e, l, g, U, V, T, r, n, E, d, y, m, o, w, v]), X(() => {
2008
+ var O;
2009
+ if (c && n && (O = m.current) != null && O.__options.blockPointerEvents && _()) {
2010
+ M.current = !0;
2011
+ const R = i.floating;
2012
+ if (q(i.domReference) && R) {
2013
+ var b;
2014
+ const S = le(i.floating).body;
2015
+ S.setAttribute(On, "");
2016
+ const G = i.domReference, C = d == null || (b = d.nodesRef.current.find((W) => W.id === h)) == null || (b = b.context) == null ? void 0 : b.elements.floating;
2017
+ return C && (C.style.pointerEvents = ""), S.style.pointerEvents = "none", G.style.pointerEvents = "auto", R.style.pointerEvents = "auto", () => {
2018
+ S.style.pointerEvents = "", G.style.pointerEvents = "", R.style.pointerEvents = "";
2019
+ };
2020
+ }
2021
+ }
2022
+ }, [c, n, h, i, d, m, _]), X(() => {
2023
+ n || (x.current = void 0, N.current = !1, V(), T());
2024
+ }, [n, V, T]), f.useEffect(() => () => {
2025
+ V(), ye(I), ye(k), T();
2026
+ }, [c, i.domReference, V, T]);
2027
+ const K = f.useMemo(() => {
2028
+ function O(b) {
2029
+ x.current = b.pointerType;
2030
+ }
2031
+ return {
2032
+ onPointerDown: O,
2033
+ onPointerEnter: O,
2034
+ onMouseMove(b) {
2035
+ const {
2036
+ nativeEvent: R
2037
+ } = b;
2038
+ function S() {
2039
+ !L.current && !E.current && r(!0, R, "hover");
2040
+ }
2041
+ l && !it(x.current) || n || Ut(v.current) === 0 || N.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (ye(k), x.current === "touch" ? S() : (N.current = !0, k.current = window.setTimeout(S, Ut(v.current))));
2042
+ }
2043
+ };
2044
+ }, [l, r, n, E, v]);
2045
+ return f.useMemo(() => c ? {
2046
+ reference: K
2047
+ } : {}, [c, K]);
2048
+ }
2049
+ let Tn = 0;
2050
+ function $e(e, t) {
2051
+ t === void 0 && (t = {});
2052
+ const {
2053
+ preventScroll: n = !1,
2054
+ cancelPrevious: r = !0,
2055
+ sync: o = !1
2056
+ } = t;
2057
+ r && cancelAnimationFrame(Tn);
2058
+ const s = () => e == null ? void 0 : e.focus({
2059
+ preventScroll: n
2060
+ });
2061
+ o ? s() : Tn = requestAnimationFrame(s);
2062
+ }
2063
+ function _o(e) {
2064
+ return (e == null ? void 0 : e.ownerDocument) || document;
2065
+ }
2066
+ let je = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakSet(), ht = {}, Gt = 0;
2067
+ const Ko = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, Rr = (e) => e && (e.host || Rr(e.parentNode)), Vo = (e, t) => t.map((n) => {
2068
+ if (e.contains(n))
2069
+ return n;
2070
+ const r = Rr(n);
2071
+ return e.contains(r) ? r : null;
2072
+ }).filter((n) => n != null);
2073
+ function Wo(e, t, n, r) {
2074
+ const o = "data-floating-ui-inert", s = r ? "inert" : n ? "aria-hidden" : null, i = Vo(t, e), c = /* @__PURE__ */ new Set(), a = new Set(i), u = [];
2075
+ ht[o] || (ht[o] = /* @__PURE__ */ new WeakMap());
2076
+ const l = ht[o];
2077
+ i.forEach(p), g(t), c.clear();
2078
+ function p(d) {
2079
+ !d || c.has(d) || (c.add(d), d.parentNode && p(d.parentNode));
2080
+ }
2081
+ function g(d) {
2082
+ !d || a.has(d) || [].forEach.call(d.children, (h) => {
2083
+ if (Ke(h) !== "script")
2084
+ if (c.has(h))
2085
+ g(h);
2086
+ else {
2087
+ const m = s ? h.getAttribute(s) : null, y = m !== null && m !== "false", E = je.get(h) || 0, v = s ? E + 1 : E, x = (l.get(h) || 0) + 1;
2088
+ je.set(h, v), l.set(h, x), u.push(h), v === 1 && y && pt.add(h), x === 1 && h.setAttribute(o, ""), !y && s && h.setAttribute(s, s === "inert" ? "" : "true");
2089
+ }
2090
+ });
2091
+ }
2092
+ return Gt++, () => {
2093
+ u.forEach((d) => {
2094
+ const h = je.get(d) || 0, m = s ? h - 1 : h, y = (l.get(d) || 0) - 1;
2095
+ je.set(d, m), l.set(d, y), m || (!pt.has(d) && s && d.removeAttribute(s), pt.delete(d)), y || d.removeAttribute(o);
2096
+ }), Gt--, Gt || (je = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakSet(), ht = {});
2097
+ };
2098
+ }
2099
+ function An(e, t, n) {
2100
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
2101
+ const r = _o(e[0]).body;
2102
+ return Wo(e.concat(Array.from(r.querySelectorAll("[aria-live]"))), r, t, n);
2103
+ }
2104
+ const Ft = {
2105
+ border: 0,
2106
+ clip: "rect(0 0 0 0)",
2107
+ height: "1px",
2108
+ margin: "-1px",
2109
+ overflow: "hidden",
2110
+ padding: 0,
2111
+ position: "fixed",
2112
+ whiteSpace: "nowrap",
2113
+ width: "1px",
2114
+ top: 0,
2115
+ left: 0
2116
+ }, Tt = /* @__PURE__ */ f.forwardRef(function(t, n) {
2117
+ const [r, o] = f.useState();
2118
+ X(() => {
2119
+ Xn() && o("button");
2120
+ }, []);
2121
+ const s = {
2122
+ ref: n,
2123
+ tabIndex: 0,
2124
+ // Role is only for VoiceOver
2125
+ role: r,
2126
+ "aria-hidden": r ? void 0 : !0,
2127
+ [Ge("focus-guard")]: "",
2128
+ style: Ft
2129
+ };
2130
+ return /* @__PURE__ */ me("span", {
2131
+ ...t,
2132
+ ...s
2133
+ });
2134
+ }), Er = /* @__PURE__ */ f.createContext(null), Mn = /* @__PURE__ */ Ge("portal");
2135
+ function $o(e) {
2136
+ e === void 0 && (e = {});
2137
+ const {
2138
+ id: t,
2139
+ root: n
2140
+ } = e, r = Lt(), o = Ir(), [s, i] = f.useState(null), c = f.useRef(null);
2141
+ return X(() => () => {
2142
+ s == null || s.remove(), queueMicrotask(() => {
2143
+ c.current = null;
2144
+ });
2145
+ }, [s]), X(() => {
2146
+ if (!r || c.current) return;
2147
+ const a = t ? document.getElementById(t) : null;
2148
+ if (!a) return;
2149
+ const u = document.createElement("div");
2150
+ u.id = r, u.setAttribute(Mn, ""), a.appendChild(u), c.current = u, i(u);
2151
+ }, [t, r]), X(() => {
2152
+ if (n === null || !r || c.current) return;
2153
+ let a = n || (o == null ? void 0 : o.portalNode);
2154
+ a && !q(a) && (a = a.current), a = a || document.body;
2155
+ let u = null;
2156
+ t && (u = document.createElement("div"), u.id = t, a.appendChild(u));
2157
+ const l = document.createElement("div");
2158
+ l.id = r, l.setAttribute(Mn, ""), a = u || a, a.appendChild(l), c.current = l, i(l);
2159
+ }, [t, n, r, o]), s;
2160
+ }
2161
+ function pi(e) {
2162
+ const {
2163
+ children: t,
2164
+ id: n,
2165
+ root: r,
2166
+ preserveTabOrder: o = !0
2167
+ } = e, s = $o({
2168
+ id: n,
2169
+ root: r
2170
+ }), [i, c] = f.useState(null), a = f.useRef(null), u = f.useRef(null), l = f.useRef(null), p = f.useRef(null), g = i == null ? void 0 : i.modal, d = i == null ? void 0 : i.open, h = (
2171
+ // The FocusManager and therefore floating element are currently open/
2172
+ // rendered.
2173
+ !!i && // Guards are only for non-modal focus management.
2174
+ !i.modal && // Don't render if unmount is transitioning.
2175
+ i.open && o && !!(r || s)
2176
+ );
2177
+ return f.useEffect(() => {
2178
+ if (!s || !o || g)
2179
+ return;
2180
+ function m(y) {
2181
+ s && ot(y) && (y.type === "focusin" ? vn : Yr)(s);
2182
+ }
2183
+ return s.addEventListener("focusin", m, !0), s.addEventListener("focusout", m, !0), () => {
2184
+ s.removeEventListener("focusin", m, !0), s.removeEventListener("focusout", m, !0);
2185
+ };
2186
+ }, [s, o, g]), f.useEffect(() => {
2187
+ s && (d || vn(s));
2188
+ }, [d, s]), /* @__PURE__ */ Bn(Er.Provider, {
2189
+ value: f.useMemo(() => ({
2190
+ preserveTabOrder: o,
2191
+ beforeOutsideRef: a,
2192
+ afterOutsideRef: u,
2193
+ beforeInsideRef: l,
2194
+ afterInsideRef: p,
2195
+ portalNode: s,
2196
+ setFocusManagerState: c
2197
+ }), [o, s]),
2198
+ children: [h && s && /* @__PURE__ */ me(Tt, {
2199
+ "data-type": "outside",
2200
+ ref: a,
2201
+ onFocus: (m) => {
2202
+ if (ot(m, s)) {
2203
+ var y;
2204
+ (y = l.current) == null || y.focus();
2205
+ } else {
2206
+ const E = i ? i.domReference : null, v = sr(E);
2207
+ v == null || v.focus();
2208
+ }
2209
+ }
2210
+ }), h && s && /* @__PURE__ */ me("span", {
2211
+ "aria-owns": s.id,
2212
+ style: Ft
2213
+ }), s && /* @__PURE__ */ tn.createPortal(t, s), h && s && /* @__PURE__ */ me(Tt, {
2214
+ "data-type": "outside",
2215
+ ref: u,
2216
+ onFocus: (m) => {
2217
+ if (ot(m, s)) {
2218
+ var y;
2219
+ (y = p.current) == null || y.focus();
2220
+ } else {
2221
+ const E = i ? i.domReference : null, v = ir(E);
2222
+ v == null || v.focus(), i != null && i.closeOnFocusOut && (i == null || i.onOpenChange(!1, m.nativeEvent, "focus-out"));
2223
+ }
2224
+ }
2225
+ })]
2226
+ });
2227
+ }
2228
+ const Ir = () => f.useContext(Er);
2229
+ function Sn(e) {
2230
+ return f.useMemo(() => (t) => {
2231
+ e.forEach((n) => {
2232
+ n && (n.current = t);
2233
+ });
2234
+ }, e);
2235
+ }
2236
+ const Bo = 20;
2237
+ let Be = [];
2238
+ function Ho(e) {
2239
+ Be = Be.filter((t) => t.isConnected), e && Ke(e) !== "body" && (Be.push(e), Be.length > Bo && (Be = Be.slice(-20)));
2240
+ }
2241
+ function Pn() {
2242
+ return Be.slice().reverse().find((e) => e.isConnected);
2243
+ }
2244
+ function zo(e) {
2245
+ const t = lt();
2246
+ return $n(e, t) ? e : At(e, t)[0] || e;
2247
+ }
2248
+ function Dn(e, t) {
2249
+ var n;
2250
+ if (!t.current.includes("floating") && !((n = e.getAttribute("role")) != null && n.includes("dialog")))
2251
+ return;
2252
+ const r = lt(), s = Or(e, r).filter((c) => {
2253
+ const a = c.getAttribute("data-tabindex") || "";
2254
+ return $n(c, r) || c.hasAttribute("data-tabindex") && !a.startsWith("-");
2255
+ }), i = e.getAttribute("tabindex");
2256
+ t.current.includes("floating") || s.length === 0 ? i !== "0" && e.setAttribute("tabindex", "0") : (i !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
2257
+ }
2258
+ const Uo = /* @__PURE__ */ f.forwardRef(function(t, n) {
2259
+ return /* @__PURE__ */ me("button", {
2260
+ ...t,
2261
+ type: "button",
2262
+ ref: n,
2263
+ tabIndex: -1,
2264
+ style: Ft
2265
+ });
2266
+ });
2267
+ function hi(e) {
2268
+ const {
2269
+ context: t,
2270
+ children: n,
2271
+ disabled: r = !1,
2272
+ order: o = ["content"],
2273
+ guards: s = !0,
2274
+ initialFocus: i = 0,
2275
+ returnFocus: c = !0,
2276
+ restoreFocus: a = !1,
2277
+ modal: u = !0,
2278
+ visuallyHiddenDismiss: l = !1,
2279
+ closeOnFocusOut: p = !0,
2280
+ outsideElementsInert: g = !1,
2281
+ getInsideElements: d = () => []
2282
+ } = e, {
2283
+ open: h,
2284
+ onOpenChange: m,
2285
+ events: y,
2286
+ dataRef: E,
2287
+ elements: {
2288
+ domReference: v,
2289
+ floating: x
2290
+ }
2291
+ } = t, I = ae(() => {
2292
+ var $;
2293
+ return ($ = E.current.floatingContext) == null ? void 0 : $.nodeId;
2294
+ }), A = ae(d), k = typeof i == "number" && i < 0, L = Zt(v) && k, M = Ko(), F = M ? s : !0, N = !F || M && g, _ = xe(o), U = xe(i), V = xe(c), T = tt(), w = Ir(), K = f.useRef(null), O = f.useRef(null), b = f.useRef(!1), R = f.useRef(!1), S = f.useRef(-1), G = w != null, C = Ct(x), W = ae(function($) {
2295
+ return $ === void 0 && ($ = C), $ ? At($, lt()) : [];
2296
+ }), te = ae(($) => {
2297
+ const H = W($);
2298
+ return _.current.map((B) => v && B === "reference" ? v : C && B === "floating" ? C : H).filter(Boolean).flat();
2299
+ });
2300
+ f.useEffect(() => {
2301
+ if (r || !u) return;
2302
+ function $(B) {
2303
+ if (B.key === "Tab") {
2304
+ ce(C, Ee(le(C))) && W().length === 0 && !L && de(B);
2305
+ const z = te(), J = ke(B);
2306
+ _.current[0] === "reference" && J === v && (de(B), B.shiftKey ? $e(z[z.length - 1]) : $e(z[1])), _.current[1] === "floating" && J === C && B.shiftKey && (de(B), $e(z[0]));
2307
+ }
2308
+ }
2309
+ const H = le(C);
2310
+ return H.addEventListener("keydown", $), () => {
2311
+ H.removeEventListener("keydown", $);
2312
+ };
2313
+ }, [r, v, C, u, _, L, W, te]), f.useEffect(() => {
2314
+ if (r || !x) return;
2315
+ function $(H) {
2316
+ const B = ke(H), J = W().indexOf(B);
2317
+ J !== -1 && (S.current = J);
2318
+ }
2319
+ return x.addEventListener("focusin", $), () => {
2320
+ x.removeEventListener("focusin", $);
2321
+ };
2322
+ }, [r, x, W]), f.useEffect(() => {
2323
+ if (r || !p) return;
2324
+ function $() {
2325
+ R.current = !0, setTimeout(() => {
2326
+ R.current = !1;
2327
+ });
2328
+ }
2329
+ function H(B) {
2330
+ const z = B.relatedTarget, J = B.currentTarget;
2331
+ queueMicrotask(() => {
2332
+ const ve = I(), re = !(ce(v, z) || ce(x, z) || ce(z, x) || ce(w == null ? void 0 : w.portalNode, z) || z != null && z.hasAttribute(Ge("focus-guard")) || T && (Ye(T.nodesRef.current, ve).find((oe) => {
2333
+ var Y, Q;
2334
+ return ce((Y = oe.context) == null ? void 0 : Y.elements.floating, z) || ce((Q = oe.context) == null ? void 0 : Q.elements.domReference, z);
2335
+ }) || hn(T.nodesRef.current, ve).find((oe) => {
2336
+ var Y, Q, Re;
2337
+ return [(Y = oe.context) == null ? void 0 : Y.elements.floating, Ct((Q = oe.context) == null ? void 0 : Q.elements.floating)].includes(z) || ((Re = oe.context) == null ? void 0 : Re.elements.domReference) === z;
2338
+ })));
2339
+ if (J === v && C && Dn(C, _), a && re && Ee(le(C)) === le(C).body) {
2340
+ ie(C) && C.focus();
2341
+ const oe = S.current, Y = W(), Q = Y[oe] || Y[Y.length - 1] || C;
2342
+ ie(Q) && Q.focus();
2343
+ }
2344
+ (L || !u) && z && re && !R.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
2345
+ z !== Pn() && (b.current = !0, m(!1, B, "focus-out"));
2346
+ });
2347
+ }
2348
+ if (x && ie(v))
2349
+ return v.addEventListener("focusout", H), v.addEventListener("pointerdown", $), x.addEventListener("focusout", H), () => {
2350
+ v.removeEventListener("focusout", H), v.removeEventListener("pointerdown", $), x.removeEventListener("focusout", H);
2351
+ };
2352
+ }, [r, v, x, C, u, T, w, m, p, a, W, L, I, _]);
2353
+ const fe = f.useRef(null), ne = f.useRef(null), pe = Sn([fe, w == null ? void 0 : w.beforeInsideRef]), Ae = Sn([ne, w == null ? void 0 : w.afterInsideRef]);
2354
+ f.useEffect(() => {
2355
+ var $, H;
2356
+ if (r || !x) return;
2357
+ const B = Array.from((w == null || ($ = w.portalNode) == null ? void 0 : $.querySelectorAll("[" + Ge("portal") + "]")) || []), z = T ? hn(T.nodesRef.current, I()) : [], J = T && !u ? z.map((Y) => {
2358
+ var Q;
2359
+ return (Q = Y.context) == null ? void 0 : Q.elements.floating;
2360
+ }) : [], ve = (H = z.find((Y) => {
2361
+ var Q;
2362
+ return Zt(((Q = Y.context) == null ? void 0 : Q.elements.domReference) || null);
2363
+ })) == null || (H = H.context) == null ? void 0 : H.elements.domReference, re = [x, ve, ...B, ...J, ...A(), K.current, O.current, fe.current, ne.current, w == null ? void 0 : w.beforeOutsideRef.current, w == null ? void 0 : w.afterOutsideRef.current, _.current.includes("reference") || L ? v : null].filter((Y) => Y != null), oe = u || L ? An(re, !N, N) : An(re);
2364
+ return () => {
2365
+ oe();
2366
+ };
2367
+ }, [r, v, x, u, _, w, L, F, N, T, I, A]), X(() => {
2368
+ if (r || !ie(C)) return;
2369
+ const $ = le(C), H = Ee($);
2370
+ queueMicrotask(() => {
2371
+ const B = te(C), z = U.current, J = (typeof z == "number" ? B[z] : z.current) || C, ve = ce(C, H);
2372
+ !k && !ve && h && $e(J, {
2373
+ preventScroll: J === C
2374
+ });
2375
+ });
2376
+ }, [r, h, C, k, te, U]), X(() => {
2377
+ if (r || !C) return;
2378
+ let $ = !1;
2379
+ const H = le(C), B = Ee(H);
2380
+ Ho(B);
2381
+ function z(re) {
2382
+ let {
2383
+ reason: oe,
2384
+ event: Y,
2385
+ nested: Q
2386
+ } = re;
2387
+ if (["hover", "safe-polygon"].includes(oe) && Y.type === "mouseleave" && (b.current = !0), oe === "outside-press")
2388
+ if (Q)
2389
+ b.current = !1, $ = !0;
2390
+ else if (Qn(Y) || Zn(Y))
2391
+ b.current = !1;
2392
+ else {
2393
+ let Re = !1;
2394
+ document.createElement("div").focus({
2395
+ get preventScroll() {
2396
+ return Re = !0, !1;
2397
+ }
2398
+ }), Re ? (b.current = !1, $ = !0) : b.current = !0;
2399
+ }
2400
+ }
2401
+ y.on("openchange", z);
2402
+ const J = H.createElement("span");
2403
+ J.setAttribute("tabindex", "-1"), J.setAttribute("aria-hidden", "true"), Object.assign(J.style, Ft), G && v && v.insertAdjacentElement("afterend", J);
2404
+ function ve() {
2405
+ if (typeof V.current == "boolean") {
2406
+ const re = v || Pn();
2407
+ return re && re.isConnected ? re : J;
2408
+ }
2409
+ return V.current.current || J;
2410
+ }
2411
+ return () => {
2412
+ y.off("openchange", z);
2413
+ const re = Ee(H), oe = ce(x, re) || T && Ye(T.nodesRef.current, I()).some((Q) => {
2414
+ var Re;
2415
+ return ce((Re = Q.context) == null ? void 0 : Re.elements.floating, re);
2416
+ }), Y = ve();
2417
+ queueMicrotask(() => {
2418
+ const Q = zo(Y);
2419
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2420
+ V.current && !b.current && ie(Q) && // If the focus moved somewhere else after mount, avoid returning focus
2421
+ // since it likely entered a different element which should be
2422
+ // respected: https://github.com/floating-ui/floating-ui/issues/2607
2423
+ (!(Q !== re && re !== H.body) || oe) && Q.focus({
2424
+ preventScroll: $
2425
+ }), J.remove();
2426
+ });
2427
+ };
2428
+ }, [r, x, C, V, E, y, T, G, v, I]), f.useEffect(() => {
2429
+ queueMicrotask(() => {
2430
+ b.current = !1;
2431
+ });
2432
+ }, [r]), X(() => {
2433
+ if (!r && w)
2434
+ return w.setFocusManagerState({
2435
+ modal: u,
2436
+ closeOnFocusOut: p,
2437
+ open: h,
2438
+ onOpenChange: m,
2439
+ domReference: v
2440
+ }), () => {
2441
+ w.setFocusManagerState(null);
2442
+ };
2443
+ }, [r, w, u, h, m, p, v]), X(() => {
2444
+ r || C && Dn(C, _);
2445
+ }, [r, C, _]);
2446
+ function Ve($) {
2447
+ return r || !l || !u ? null : /* @__PURE__ */ me(Uo, {
2448
+ ref: $ === "start" ? K : O,
2449
+ onClick: (H) => m(!1, H.nativeEvent),
2450
+ children: typeof l == "string" ? l : "Dismiss"
2451
+ });
2452
+ }
2453
+ const Me = !r && F && (u ? !L : !0) && (G || u);
2454
+ return /* @__PURE__ */ Bn(Tr, {
2455
+ children: [Me && /* @__PURE__ */ me(Tt, {
2456
+ "data-type": "inside",
2457
+ ref: pe,
2458
+ onFocus: ($) => {
2459
+ if (u) {
2460
+ const B = te();
2461
+ $e(o[0] === "reference" ? B[0] : B[B.length - 1]);
2462
+ } else if (w != null && w.preserveTabOrder && w.portalNode)
2463
+ if (b.current = !1, ot($, w.portalNode)) {
2464
+ const B = ir(v);
2465
+ B == null || B.focus();
2466
+ } else {
2467
+ var H;
2468
+ (H = w.beforeOutsideRef.current) == null || H.focus();
2469
+ }
2470
+ }
2471
+ }), !L && Ve("start"), n, Ve("end"), Me && /* @__PURE__ */ me(Tt, {
2472
+ "data-type": "inside",
2473
+ ref: Ae,
2474
+ onFocus: ($) => {
2475
+ if (u)
2476
+ $e(te()[0]);
2477
+ else if (w != null && w.preserveTabOrder && w.portalNode)
2478
+ if (p && (b.current = !0), ot($, w.portalNode)) {
2479
+ const B = sr(v);
2480
+ B == null || B.focus();
2481
+ } else {
2482
+ var H;
2483
+ (H = w.afterOutsideRef.current) == null || H.focus();
2484
+ }
2485
+ }
2486
+ })]
2487
+ });
2488
+ }
2489
+ let vt = 0;
2490
+ function Go() {
2491
+ const e = /iP(hone|ad|od)|iOS/.test(rn()), t = document.body.style, r = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft ? "paddingLeft" : "paddingRight", o = window.innerWidth - document.documentElement.clientWidth, s = t.left ? parseFloat(t.left) : window.scrollX, i = t.top ? parseFloat(t.top) : window.scrollY;
2492
+ if (t.overflow = "hidden", o && (t[r] = o + "px"), e) {
2493
+ var c, a;
2494
+ const u = ((c = window.visualViewport) == null ? void 0 : c.offsetLeft) || 0, l = ((a = window.visualViewport) == null ? void 0 : a.offsetTop) || 0;
2495
+ Object.assign(t, {
2496
+ position: "fixed",
2497
+ top: -(i - Math.floor(l)) + "px",
2498
+ left: -(s - Math.floor(u)) + "px",
2499
+ right: "0"
2500
+ });
2501
+ }
2502
+ return () => {
2503
+ Object.assign(t, {
2504
+ overflow: "",
2505
+ [r]: ""
2506
+ }), e && (Object.assign(t, {
2507
+ position: "",
2508
+ top: "",
2509
+ left: "",
2510
+ right: ""
2511
+ }), window.scrollTo(s, i));
2512
+ };
2513
+ }
2514
+ let kn = () => {
2515
+ };
2516
+ const vi = /* @__PURE__ */ f.forwardRef(function(t, n) {
2517
+ const {
2518
+ lockScroll: r = !1,
2519
+ ...o
2520
+ } = t;
2521
+ return X(() => {
2522
+ if (r)
2523
+ return vt++, vt === 1 && (kn = Go()), () => {
2524
+ vt--, vt === 0 && kn();
2525
+ };
2526
+ }, [r]), /* @__PURE__ */ me("div", {
2527
+ ref: n,
2528
+ ...o,
2529
+ style: {
2530
+ position: "fixed",
2531
+ overflow: "auto",
2532
+ top: 0,
2533
+ right: 0,
2534
+ bottom: 0,
2535
+ left: 0,
2536
+ ...o.style
2537
+ }
2538
+ });
2539
+ });
2540
+ function Ln(e) {
2541
+ return ie(e.target) && e.target.tagName === "BUTTON";
2542
+ }
2543
+ function jo(e) {
2544
+ return ie(e.target) && e.target.tagName === "A";
2545
+ }
2546
+ function Fn(e) {
2547
+ return on(e);
2548
+ }
2549
+ function bi(e, t) {
2550
+ t === void 0 && (t = {});
2551
+ const {
2552
+ open: n,
2553
+ onOpenChange: r,
2554
+ dataRef: o,
2555
+ elements: {
2556
+ domReference: s
2557
+ }
2558
+ } = e, {
2559
+ enabled: i = !0,
2560
+ event: c = "click",
2561
+ toggle: a = !0,
2562
+ ignoreMouse: u = !1,
2563
+ keyboardHandlers: l = !0,
2564
+ stickIfOpen: p = !0
2565
+ } = t, g = f.useRef(), d = f.useRef(!1), h = f.useMemo(() => ({
2566
+ onPointerDown(m) {
2567
+ g.current = m.pointerType;
2568
+ },
2569
+ onMouseDown(m) {
2570
+ const y = g.current;
2571
+ m.button === 0 && c !== "click" && (it(y, !0) && u || (n && a && (!(o.current.openEvent && p) || o.current.openEvent.type === "mousedown") ? r(!1, m.nativeEvent, "click") : (m.preventDefault(), r(!0, m.nativeEvent, "click"))));
2572
+ },
2573
+ onClick(m) {
2574
+ const y = g.current;
2575
+ if (c === "mousedown" && g.current) {
2576
+ g.current = void 0;
2577
+ return;
2578
+ }
2579
+ it(y, !0) && u || (n && a && (!(o.current.openEvent && p) || o.current.openEvent.type === "click") ? r(!1, m.nativeEvent, "click") : r(!0, m.nativeEvent, "click"));
2580
+ },
2581
+ onKeyDown(m) {
2582
+ g.current = void 0, !(m.defaultPrevented || !l || Ln(m)) && (m.key === " " && !Fn(s) && (m.preventDefault(), d.current = !0), !jo(m) && m.key === "Enter" && r(!(n && a), m.nativeEvent, "click"));
2583
+ },
2584
+ onKeyUp(m) {
2585
+ m.defaultPrevented || !l || Ln(m) || Fn(s) || m.key === " " && d.current && (d.current = !1, r(!(n && a), m.nativeEvent, "click"));
2586
+ }
2587
+ }), [o, s, c, u, l, r, n, p, a]);
2588
+ return f.useMemo(() => i ? {
2589
+ reference: h
2590
+ } : {}, [i, h]);
2591
+ }
2592
+ const qo = {
2593
+ pointerdown: "onPointerDown",
2594
+ mousedown: "onMouseDown",
2595
+ click: "onClick"
2596
+ }, Yo = {
2597
+ pointerdown: "onPointerDownCapture",
2598
+ mousedown: "onMouseDownCapture",
2599
+ click: "onClickCapture"
2600
+ }, Nn = (e) => {
2601
+ var t, n;
2602
+ return {
2603
+ escapeKey: typeof e == "boolean" ? e : (t = e == null ? void 0 : e.escapeKey) != null ? t : !1,
2604
+ outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
2605
+ };
2606
+ };
2607
+ function yi(e, t) {
2608
+ t === void 0 && (t = {});
2609
+ const {
2610
+ open: n,
2611
+ onOpenChange: r,
2612
+ elements: o,
2613
+ dataRef: s
2614
+ } = e, {
2615
+ enabled: i = !0,
2616
+ escapeKey: c = !0,
2617
+ outsidePress: a = !0,
2618
+ outsidePressEvent: u = "pointerdown",
2619
+ referencePress: l = !1,
2620
+ referencePressEvent: p = "pointerdown",
2621
+ ancestorScroll: g = !1,
2622
+ bubbles: d,
2623
+ capture: h
2624
+ } = t, m = tt(), y = ae(typeof a == "function" ? a : () => !1), E = typeof a == "function" ? y : a, v = f.useRef(!1), x = f.useRef(!1), {
2625
+ escapeKey: I,
2626
+ outsidePress: A
2627
+ } = Nn(d), {
2628
+ escapeKey: k,
2629
+ outsidePress: L
2630
+ } = Nn(h), M = f.useRef(!1), F = ae((w) => {
2631
+ var K;
2632
+ if (!n || !i || !c || w.key !== "Escape" || M.current)
2633
+ return;
2634
+ const O = (K = s.current.floatingContext) == null ? void 0 : K.nodeId, b = m ? Ye(m.nodesRef.current, O) : [];
2635
+ if (!I && (w.stopPropagation(), b.length > 0)) {
2636
+ let R = !0;
2637
+ if (b.forEach((S) => {
2638
+ var G;
2639
+ if ((G = S.context) != null && G.open && !S.context.dataRef.current.__escapeKeyBubbles) {
2640
+ R = !1;
2641
+ return;
2642
+ }
2643
+ }), !R)
2644
+ return;
2645
+ }
2646
+ r(!1, Ur(w) ? w.nativeEvent : w, "escape-key");
2647
+ }), N = ae((w) => {
2648
+ var K;
2649
+ const O = () => {
2650
+ var b;
2651
+ F(w), (b = ke(w)) == null || b.removeEventListener("keydown", O);
2652
+ };
2653
+ (K = ke(w)) == null || K.addEventListener("keydown", O);
2654
+ }), _ = ae((w) => {
2655
+ var K;
2656
+ const O = v.current;
2657
+ v.current = !1;
2658
+ const b = x.current;
2659
+ if (x.current = !1, u === "click" && b || O || typeof E == "function" && !E(w))
2660
+ return;
2661
+ const R = ke(w), S = "[" + Ge("inert") + "]", G = le(o.floating).querySelectorAll(S);
2662
+ let C = q(R) ? R : null;
2663
+ for (; C && !Se(C); ) {
2664
+ const ne = Pe(C);
2665
+ if (Se(ne) || !q(ne))
2666
+ break;
2667
+ C = ne;
2668
+ }
2669
+ if (G.length && q(R) && !Br(R) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2670
+ !ce(R, o.floating) && // If the target root element contains none of the markers, then the
2671
+ // element was injected after the floating element rendered.
2672
+ Array.from(G).every((ne) => !ce(C, ne)))
2673
+ return;
2674
+ if (ie(R) && T) {
2675
+ const ne = Se(R), pe = we(R), Ae = /auto|scroll/, Ve = ne || Ae.test(pe.overflowX), Me = ne || Ae.test(pe.overflowY), $ = Ve && R.clientWidth > 0 && R.scrollWidth > R.clientWidth, H = Me && R.clientHeight > 0 && R.scrollHeight > R.clientHeight, B = pe.direction === "rtl", z = H && (B ? w.offsetX <= R.offsetWidth - R.clientWidth : w.offsetX > R.clientWidth), J = $ && w.offsetY > R.clientHeight;
2676
+ if (z || J)
2677
+ return;
2678
+ }
2679
+ const W = (K = s.current.floatingContext) == null ? void 0 : K.nodeId, te = m && Ye(m.nodesRef.current, W).some((ne) => {
2680
+ var pe;
2681
+ return Vt(w, (pe = ne.context) == null ? void 0 : pe.elements.floating);
2682
+ });
2683
+ if (Vt(w, o.floating) || Vt(w, o.domReference) || te)
2684
+ return;
2685
+ const fe = m ? Ye(m.nodesRef.current, W) : [];
2686
+ if (fe.length > 0) {
2687
+ let ne = !0;
2688
+ if (fe.forEach((pe) => {
2689
+ var Ae;
2690
+ if ((Ae = pe.context) != null && Ae.open && !pe.context.dataRef.current.__outsidePressBubbles) {
2691
+ ne = !1;
2692
+ return;
2693
+ }
2694
+ }), !ne)
2695
+ return;
2696
+ }
2697
+ r(!1, w, "outside-press");
2698
+ }), U = ae((w) => {
2699
+ var K;
2700
+ const O = () => {
2701
+ var b;
2702
+ _(w), (b = ke(w)) == null || b.removeEventListener(u, O);
2703
+ };
2704
+ (K = ke(w)) == null || K.addEventListener(u, O);
2705
+ });
2706
+ f.useEffect(() => {
2707
+ if (!n || !i)
2708
+ return;
2709
+ s.current.__escapeKeyBubbles = I, s.current.__outsidePressBubbles = A;
2710
+ let w = -1;
2711
+ function K(G) {
2712
+ r(!1, G, "ancestor-scroll");
2713
+ }
2714
+ function O() {
2715
+ window.clearTimeout(w), M.current = !0;
2716
+ }
2717
+ function b() {
2718
+ w = window.setTimeout(
2719
+ () => {
2720
+ M.current = !1;
2721
+ },
2722
+ // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2723
+ // Only apply to WebKit for the test to remain 0ms.
2724
+ Pt() ? 5 : 0
2725
+ );
2726
+ }
2727
+ const R = le(o.floating);
2728
+ c && (R.addEventListener("keydown", k ? N : F, k), R.addEventListener("compositionstart", O), R.addEventListener("compositionend", b)), E && R.addEventListener(u, L ? U : _, L);
2729
+ let S = [];
2730
+ return g && (q(o.domReference) && (S = Le(o.domReference)), q(o.floating) && (S = S.concat(Le(o.floating))), !q(o.reference) && o.reference && o.reference.contextElement && (S = S.concat(Le(o.reference.contextElement)))), S = S.filter((G) => {
2731
+ var C;
2732
+ return G !== ((C = R.defaultView) == null ? void 0 : C.visualViewport);
2733
+ }), S.forEach((G) => {
2734
+ G.addEventListener("scroll", K, {
2735
+ passive: !0
2736
+ });
2737
+ }), () => {
2738
+ c && (R.removeEventListener("keydown", k ? N : F, k), R.removeEventListener("compositionstart", O), R.removeEventListener("compositionend", b)), E && R.removeEventListener(u, L ? U : _, L), S.forEach((G) => {
2739
+ G.removeEventListener("scroll", K);
2740
+ }), window.clearTimeout(w);
2741
+ };
2742
+ }, [s, o, c, E, u, n, r, g, i, I, A, F, k, N, _, L, U]), f.useEffect(() => {
2743
+ v.current = !1;
2744
+ }, [E, u]);
2745
+ const V = f.useMemo(() => ({
2746
+ onKeyDown: F,
2747
+ ...l && {
2748
+ [qo[p]]: (w) => {
2749
+ r(!1, w.nativeEvent, "reference-press");
2750
+ },
2751
+ ...p !== "click" && {
2752
+ onClick(w) {
2753
+ r(!1, w.nativeEvent, "reference-press");
2754
+ }
2755
+ }
2756
+ }
2757
+ }), [F, r, l, p]), T = f.useMemo(() => ({
2758
+ onKeyDown: F,
2759
+ onMouseDown() {
2760
+ x.current = !0;
2761
+ },
2762
+ onMouseUp() {
2763
+ x.current = !0;
2764
+ },
2765
+ [Yo[u]]: () => {
2766
+ v.current = !0;
2767
+ }
2768
+ }), [F, u]);
2769
+ return f.useMemo(() => i ? {
2770
+ reference: V,
2771
+ floating: T
2772
+ } : {}, [i, V, T]);
2773
+ }
2774
+ function Xo(e) {
2775
+ const {
2776
+ open: t = !1,
2777
+ onOpenChange: n,
2778
+ elements: r
2779
+ } = e, o = Lt(), s = f.useRef({}), [i] = f.useState(() => yr()), c = et() != null;
2780
+ if (process.env.NODE_ENV !== "production") {
2781
+ const d = r.reference;
2782
+ d && !q(d) && No("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2783
+ }
2784
+ const [a, u] = f.useState(r.reference), l = ae((d, h, m) => {
2785
+ s.current.openEvent = d ? h : void 0, i.emit("openchange", {
2786
+ open: d,
2787
+ event: h,
2788
+ reason: m,
2789
+ nested: c
2790
+ }), n == null || n(d, h, m);
2791
+ }), p = f.useMemo(() => ({
2792
+ setPositionReference: u
2793
+ }), []), g = f.useMemo(() => ({
2794
+ reference: a || r.reference || null,
2795
+ floating: r.floating || null,
2796
+ domReference: r.reference
2797
+ }), [a, r.reference, r.floating]);
2798
+ return f.useMemo(() => ({
2799
+ dataRef: s,
2800
+ open: t,
2801
+ onOpenChange: l,
2802
+ elements: g,
2803
+ events: i,
2804
+ floatingId: o,
2805
+ refs: p
2806
+ }), [t, l, g, i, o, p]);
2807
+ }
2808
+ function xi(e) {
2809
+ e === void 0 && (e = {});
2810
+ const {
2811
+ nodeId: t
2812
+ } = e, n = Xo({
2813
+ ...e,
2814
+ elements: {
2815
+ reference: null,
2816
+ floating: null,
2817
+ ...e.elements
2818
+ }
2819
+ }), r = e.rootContext || n, o = r.elements, [s, i] = f.useState(null), [c, a] = f.useState(null), l = (o == null ? void 0 : o.domReference) || s, p = f.useRef(null), g = tt();
2820
+ X(() => {
2821
+ l && (p.current = l);
2822
+ }, [l]);
2823
+ const d = Oo({
2824
+ ...e,
2825
+ elements: {
2826
+ ...o,
2827
+ ...c && {
2828
+ reference: c
2829
+ }
2830
+ }
2831
+ }), h = f.useCallback((x) => {
2832
+ const I = q(x) ? {
2833
+ getBoundingClientRect: () => x.getBoundingClientRect(),
2834
+ getClientRects: () => x.getClientRects(),
2835
+ contextElement: x
2836
+ } : x;
2837
+ a(I), d.refs.setReference(I);
2838
+ }, [d.refs]), m = f.useCallback((x) => {
2839
+ (q(x) || x === null) && (p.current = x, i(x)), (q(d.refs.reference.current) || d.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2840
+ // `null` to support `positionReference` + an unstable `reference`
2841
+ // callback ref.
2842
+ x !== null && !q(x)) && d.refs.setReference(x);
2843
+ }, [d.refs]), y = f.useMemo(() => ({
2844
+ ...d.refs,
2845
+ setReference: m,
2846
+ setPositionReference: h,
2847
+ domReference: p
2848
+ }), [d.refs, m, h]), E = f.useMemo(() => ({
2849
+ ...d.elements,
2850
+ domReference: l
2851
+ }), [d.elements, l]), v = f.useMemo(() => ({
2852
+ ...d,
2853
+ ...r,
2854
+ refs: y,
2855
+ elements: E,
2856
+ nodeId: t
2857
+ }), [d, y, E, t, r]);
2858
+ return X(() => {
2859
+ r.dataRef.current.floatingContext = v;
2860
+ const x = g == null ? void 0 : g.nodesRef.current.find((I) => I.id === t);
2861
+ x && (x.context = v);
2862
+ }), f.useMemo(() => ({
2863
+ ...d,
2864
+ context: v,
2865
+ refs: y,
2866
+ elements: E
2867
+ }), [d, y, E, v]);
2868
+ }
2869
+ function jt() {
2870
+ return Kr() && Xn();
2871
+ }
2872
+ function wi(e, t) {
2873
+ t === void 0 && (t = {});
2874
+ const {
2875
+ open: n,
2876
+ onOpenChange: r,
2877
+ events: o,
2878
+ dataRef: s,
2879
+ elements: i
2880
+ } = e, {
2881
+ enabled: c = !0,
2882
+ visibleOnly: a = !0
2883
+ } = t, u = f.useRef(!1), l = f.useRef(-1), p = f.useRef(!0);
2884
+ f.useEffect(() => {
2885
+ if (!c) return;
2886
+ const d = ge(i.domReference);
2887
+ function h() {
2888
+ !n && ie(i.domReference) && i.domReference === Ee(le(i.domReference)) && (u.current = !0);
2889
+ }
2890
+ function m() {
2891
+ p.current = !0;
2892
+ }
2893
+ function y() {
2894
+ p.current = !1;
2895
+ }
2896
+ return d.addEventListener("blur", h), jt() && (d.addEventListener("keydown", m, !0), d.addEventListener("pointerdown", y, !0)), () => {
2897
+ d.removeEventListener("blur", h), jt() && (d.removeEventListener("keydown", m, !0), d.removeEventListener("pointerdown", y, !0));
2898
+ };
2899
+ }, [i.domReference, n, c]), f.useEffect(() => {
2900
+ if (!c) return;
2901
+ function d(h) {
2902
+ let {
2903
+ reason: m
2904
+ } = h;
2905
+ (m === "reference-press" || m === "escape-key") && (u.current = !0);
2906
+ }
2907
+ return o.on("openchange", d), () => {
2908
+ o.off("openchange", d);
2909
+ };
2910
+ }, [o, c]), f.useEffect(() => () => {
2911
+ ye(l);
2912
+ }, []);
2913
+ const g = f.useMemo(() => ({
2914
+ onMouseLeave() {
2915
+ u.current = !1;
2916
+ },
2917
+ onFocus(d) {
2918
+ if (u.current) return;
2919
+ const h = ke(d.nativeEvent);
2920
+ if (a && q(h)) {
2921
+ if (jt() && !d.relatedTarget) {
2922
+ if (!p.current && !on(h))
2923
+ return;
2924
+ } else if (!Hr(h))
2925
+ return;
2926
+ }
2927
+ r(!0, d.nativeEvent, "focus");
2928
+ },
2929
+ onBlur(d) {
2930
+ u.current = !1;
2931
+ const h = d.relatedTarget, m = d.nativeEvent, y = q(h) && h.hasAttribute(Ge("focus-guard")) && h.getAttribute("data-type") === "outside";
2932
+ l.current = window.setTimeout(() => {
2933
+ var E;
2934
+ const v = Ee(i.domReference ? i.domReference.ownerDocument : document);
2935
+ !h && v === i.domReference || ce((E = s.current.floatingContext) == null ? void 0 : E.refs.floating.current, v) || ce(i.domReference, v) || y || r(!1, m, "focus");
2936
+ });
2937
+ }
2938
+ }), [s, i.domReference, r, a]);
2939
+ return f.useMemo(() => c ? {
2940
+ reference: g
2941
+ } : {}, [c, g]);
2942
+ }
2943
+ function qt(e, t, n) {
2944
+ const r = /* @__PURE__ */ new Map(), o = n === "item";
2945
+ let s = e;
2946
+ if (o && e) {
2947
+ const {
2948
+ [Rn]: i,
2949
+ [En]: c,
2950
+ ...a
2951
+ } = e;
2952
+ s = a;
2953
+ }
2954
+ return {
2955
+ ...n === "floating" && {
2956
+ tabIndex: -1,
2957
+ [Po]: ""
2958
+ },
2959
+ ...s,
2960
+ ...t.map((i) => {
2961
+ const c = i ? i[n] : null;
2962
+ return typeof c == "function" ? e ? c(e) : null : c;
2963
+ }).concat(e).reduce((i, c) => (c && Object.entries(c).forEach((a) => {
2964
+ let [u, l] = a;
2965
+ if (!(o && [Rn, En].includes(u)))
2966
+ if (u.indexOf("on") === 0) {
2967
+ if (r.has(u) || r.set(u, []), typeof l == "function") {
2968
+ var p;
2969
+ (p = r.get(u)) == null || p.push(l), i[u] = function() {
2970
+ for (var g, d = arguments.length, h = new Array(d), m = 0; m < d; m++)
2971
+ h[m] = arguments[m];
2972
+ return (g = r.get(u)) == null ? void 0 : g.map((y) => y(...h)).find((y) => y !== void 0);
2973
+ };
2974
+ }
2975
+ } else
2976
+ i[u] = l;
2977
+ }), i), {})
2978
+ };
2979
+ }
2980
+ function Ri(e) {
2981
+ e === void 0 && (e = []);
2982
+ const t = e.map((c) => c == null ? void 0 : c.reference), n = e.map((c) => c == null ? void 0 : c.floating), r = e.map((c) => c == null ? void 0 : c.item), o = f.useCallback(
2983
+ (c) => qt(c, e, "reference"),
2984
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2985
+ t
2986
+ ), s = f.useCallback(
2987
+ (c) => qt(c, e, "floating"),
2988
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2989
+ n
2990
+ ), i = f.useCallback(
2991
+ (c) => qt(c, e, "item"),
2992
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2993
+ r
2994
+ );
2995
+ return f.useMemo(() => ({
2996
+ getReferenceProps: o,
2997
+ getFloatingProps: s,
2998
+ getItemProps: i
2999
+ }), [o, s, i]);
3000
+ }
3001
+ const Jo = "Escape";
3002
+ function Nt(e, t, n) {
3003
+ switch (e) {
3004
+ case "vertical":
3005
+ return t;
3006
+ case "horizontal":
3007
+ return n;
3008
+ default:
3009
+ return t || n;
3010
+ }
3011
+ }
3012
+ function bt(e, t) {
3013
+ return Nt(t, e === st || e === Fe, e === Ne || e === _e);
3014
+ }
3015
+ function Yt(e, t, n) {
3016
+ return Nt(t, e === Fe, n ? e === Ne : e === _e) || e === "Enter" || e === " " || e === "";
3017
+ }
3018
+ function _n(e, t, n) {
3019
+ return Nt(t, n ? e === Ne : e === _e, e === Fe);
3020
+ }
3021
+ function Kn(e, t, n, r) {
3022
+ const o = n ? e === _e : e === Ne, s = e === st;
3023
+ return t === "both" || t === "horizontal" && r && r > 1 ? e === Jo : Nt(t, o, s);
3024
+ }
3025
+ function Ei(e, t) {
3026
+ const {
3027
+ open: n,
3028
+ onOpenChange: r,
3029
+ elements: o,
3030
+ floatingId: s
3031
+ } = e, {
3032
+ listRef: i,
3033
+ activeIndex: c,
3034
+ onNavigate: a = () => {
3035
+ },
3036
+ enabled: u = !0,
3037
+ selectedIndex: l = null,
3038
+ allowEscape: p = !1,
3039
+ loop: g = !1,
3040
+ nested: d = !1,
3041
+ rtl: h = !1,
3042
+ virtual: m = !1,
3043
+ focusItemOnOpen: y = "auto",
3044
+ focusItemOnHover: E = !0,
3045
+ openOnArrowKeyDown: v = !0,
3046
+ disabledIndices: x = void 0,
3047
+ orientation: I = "vertical",
3048
+ parentOrientation: A,
3049
+ cols: k = 1,
3050
+ scrollItemIntoView: L = !0,
3051
+ virtualItemRef: M,
3052
+ itemSizes: F,
3053
+ dense: N = !1
3054
+ } = t;
3055
+ process.env.NODE_ENV !== "production" && (p && (g || Ht("`useListNavigation` looping must be enabled to allow escaping."), m || Ht("`useListNavigation` must be virtual to allow escaping.")), I === "vertical" && k > 1 && Ht("In grid list navigation mode (`cols` > 1), the `orientation` should", 'be either "horizontal" or "both".'));
3056
+ const _ = Ct(o.floating), U = xe(_), V = et(), T = tt();
3057
+ X(() => {
3058
+ e.dataRef.current.orientation = I;
3059
+ }, [e, I]);
3060
+ const w = ae(() => {
3061
+ a(b.current === -1 ? null : b.current);
3062
+ }), K = Zt(o.domReference), O = f.useRef(y), b = f.useRef(l ?? -1), R = f.useRef(null), S = f.useRef(!0), G = f.useRef(w), C = f.useRef(!!o.floating), W = f.useRef(n), te = f.useRef(!1), fe = f.useRef(!1), ne = xe(x), pe = xe(n), Ae = xe(L), Ve = xe(l), [Me, $] = f.useState(), [H, B] = f.useState(), z = ae(() => {
3063
+ function D(ee) {
3064
+ if (m) {
3065
+ var se;
3066
+ (se = ee.id) != null && se.endsWith("-fui-option") && (ee.id = s + "-" + Math.random().toString(16).slice(2, 10)), $(ee.id), T == null || T.events.emit("virtualfocus", ee), M && (M.current = ee);
3067
+ } else
3068
+ $e(ee, {
3069
+ sync: te.current,
3070
+ preventScroll: !0
3071
+ });
3072
+ }
3073
+ const j = i.current[b.current], P = fe.current;
3074
+ j && D(j), (te.current ? (ee) => ee() : requestAnimationFrame)(() => {
3075
+ const ee = i.current[b.current] || j;
3076
+ if (!ee) return;
3077
+ j || D(ee);
3078
+ const se = Ae.current;
3079
+ se && ve && (P || !S.current) && (ee.scrollIntoView == null || ee.scrollIntoView(typeof se == "boolean" ? {
3080
+ block: "nearest",
3081
+ inline: "nearest"
3082
+ } : se));
3083
+ });
3084
+ });
3085
+ X(() => {
3086
+ u && (n && o.floating ? O.current && l != null && (fe.current = !0, b.current = l, w()) : C.current && (b.current = -1, G.current()));
3087
+ }, [u, n, o.floating, l, w]), X(() => {
3088
+ if (u && n && o.floating)
3089
+ if (c == null) {
3090
+ if (te.current = !1, Ve.current != null)
3091
+ return;
3092
+ if (C.current && (b.current = -1, z()), (!W.current || !C.current) && O.current && (R.current != null || O.current === !0 && R.current == null)) {
3093
+ let D = 0;
3094
+ const j = () => {
3095
+ i.current[0] == null ? (D < 2 && (D ? requestAnimationFrame : queueMicrotask)(j), D++) : (b.current = R.current == null || Yt(R.current, I, h) || d ? yt(i, ne.current) : en(i, ne.current), R.current = null, w());
3096
+ };
3097
+ j();
3098
+ }
3099
+ } else Xe(i, c) || (b.current = c, z(), fe.current = !1);
3100
+ }, [u, n, o.floating, c, Ve, d, i, I, h, w, z, ne]), X(() => {
3101
+ var D;
3102
+ if (!u || o.floating || !T || m || !C.current)
3103
+ return;
3104
+ const j = T.nodesRef.current, P = (D = j.find((se) => se.id === V)) == null || (D = D.context) == null ? void 0 : D.elements.floating, Z = Ee(le(o.floating)), ee = j.some((se) => se.context && ce(se.context.elements.floating, Z));
3105
+ P && !ee && S.current && P.focus({
3106
+ preventScroll: !0
3107
+ });
3108
+ }, [u, o.floating, T, V, m]), X(() => {
3109
+ if (!u || !T || !m || V) return;
3110
+ function D(j) {
3111
+ B(j.id), M && (M.current = j);
3112
+ }
3113
+ return T.events.on("virtualfocus", D), () => {
3114
+ T.events.off("virtualfocus", D);
3115
+ };
3116
+ }, [u, T, m, V, M]), X(() => {
3117
+ G.current = w, W.current = n, C.current = !!o.floating;
3118
+ }), X(() => {
3119
+ n || (R.current = null);
3120
+ }, [n]);
3121
+ const J = c != null, ve = f.useMemo(() => {
3122
+ function D(P) {
3123
+ if (!n) return;
3124
+ const Z = i.current.indexOf(P);
3125
+ Z !== -1 && b.current !== Z && (b.current = Z, w());
3126
+ }
3127
+ return {
3128
+ onFocus(P) {
3129
+ let {
3130
+ currentTarget: Z
3131
+ } = P;
3132
+ te.current = !0, D(Z);
3133
+ },
3134
+ onClick: (P) => {
3135
+ let {
3136
+ currentTarget: Z
3137
+ } = P;
3138
+ return Z.focus({
3139
+ preventScroll: !0
3140
+ });
3141
+ },
3142
+ // Safari
3143
+ ...E && {
3144
+ onMouseMove(P) {
3145
+ let {
3146
+ currentTarget: Z
3147
+ } = P;
3148
+ te.current = !0, fe.current = !1, D(Z);
3149
+ },
3150
+ onPointerLeave(P) {
3151
+ let {
3152
+ pointerType: Z
3153
+ } = P;
3154
+ if (!(!S.current || Z === "touch") && (te.current = !0, b.current = -1, w(), !m)) {
3155
+ var ee;
3156
+ (ee = U.current) == null || ee.focus({
3157
+ preventScroll: !0
3158
+ });
3159
+ }
3160
+ }
3161
+ }
3162
+ };
3163
+ }, [n, U, E, i, w, m]), re = f.useCallback(() => {
3164
+ var D;
3165
+ return A ?? (T == null || (D = T.nodesRef.current.find((j) => j.id === V)) == null || (D = D.context) == null || (D = D.dataRef) == null ? void 0 : D.current.orientation);
3166
+ }, [V, T, A]), oe = ae((D) => {
3167
+ if (S.current = !1, te.current = !0, D.which === 229 || !pe.current && D.currentTarget === U.current)
3168
+ return;
3169
+ if (d && Kn(D.key, I, h, k)) {
3170
+ bt(D.key, re()) || de(D), r(!1, D.nativeEvent, "list-navigation"), ie(o.domReference) && (m ? T == null || T.events.emit("virtualfocus", o.domReference) : o.domReference.focus());
3171
+ return;
3172
+ }
3173
+ const j = b.current, P = yt(i, x), Z = en(i, x);
3174
+ if (K || (D.key === "Home" && (de(D), b.current = P, w()), D.key === "End" && (de(D), b.current = Z, w())), k > 1) {
3175
+ const ee = F || Array.from({
3176
+ length: i.current.length
3177
+ }, () => ({
3178
+ width: 1,
3179
+ height: 1
3180
+ })), se = tr(ee, k, N), nt = se.findIndex((be) => be != null && !He(i, be, x)), at = se.reduce((be, We, ft) => We != null && !He(i, We, x) ? ft : be, -1), rt = se[er({
3181
+ current: se.map((be) => be != null ? i.current[be] : null)
3182
+ }, {
3183
+ event: D,
3184
+ orientation: I,
3185
+ loop: g,
3186
+ rtl: h,
3187
+ cols: k,
3188
+ // treat undefined (empty grid spaces) as disabled indices so we
3189
+ // don't end up in them
3190
+ disabledIndices: rr([...x || i.current.map((be, We) => He(i, We) ? We : void 0), void 0], se),
3191
+ minIndex: nt,
3192
+ maxIndex: at,
3193
+ prevIndex: nr(
3194
+ b.current > Z ? P : b.current,
3195
+ ee,
3196
+ se,
3197
+ k,
3198
+ // use a corner matching the edge closest to the direction
3199
+ // we're moving in so we don't end up in the same item. Prefer
3200
+ // top/left over bottom/right.
3201
+ D.key === Fe ? "bl" : D.key === (h ? Ne : _e) ? "tr" : "tl"
3202
+ ),
3203
+ stopEvent: !0
3204
+ })];
3205
+ if (rt != null && (b.current = rt, w()), I === "both")
3206
+ return;
3207
+ }
3208
+ if (bt(D.key, I)) {
3209
+ if (de(D), n && !m && Ee(D.currentTarget.ownerDocument) === D.currentTarget) {
3210
+ b.current = Yt(D.key, I, h) ? P : Z, w();
3211
+ return;
3212
+ }
3213
+ Yt(D.key, I, h) ? g ? b.current = j >= Z ? p && j !== i.current.length ? -1 : P : ue(i, {
3214
+ startingIndex: j,
3215
+ disabledIndices: x
3216
+ }) : b.current = Math.min(Z, ue(i, {
3217
+ startingIndex: j,
3218
+ disabledIndices: x
3219
+ })) : g ? b.current = j <= P ? p && j !== -1 ? i.current.length : Z : ue(i, {
3220
+ startingIndex: j,
3221
+ decrement: !0,
3222
+ disabledIndices: x
3223
+ }) : b.current = Math.max(P, ue(i, {
3224
+ startingIndex: j,
3225
+ decrement: !0,
3226
+ disabledIndices: x
3227
+ })), Xe(i, b.current) && (b.current = -1), w();
3228
+ }
3229
+ }), Y = f.useMemo(() => m && n && J && {
3230
+ "aria-activedescendant": H || Me
3231
+ }, [m, n, J, H, Me]), Q = f.useMemo(() => ({
3232
+ "aria-orientation": I === "both" ? void 0 : I,
3233
+ ...K ? {} : Y,
3234
+ onKeyDown: oe,
3235
+ onPointerMove() {
3236
+ S.current = !0;
3237
+ }
3238
+ }), [Y, oe, I, K]), Re = f.useMemo(() => {
3239
+ function D(P) {
3240
+ y === "auto" && Qn(P.nativeEvent) && (O.current = !0);
3241
+ }
3242
+ function j(P) {
3243
+ O.current = y, y === "auto" && Zn(P.nativeEvent) && (O.current = !0);
3244
+ }
3245
+ return {
3246
+ ...Y,
3247
+ onKeyDown(P) {
3248
+ S.current = !1;
3249
+ const Z = P.key.startsWith("Arrow"), ee = ["Home", "End"].includes(P.key), se = Z || ee, nt = _n(P.key, I, h), at = Kn(P.key, I, h, k), rt = _n(P.key, re(), h), be = bt(P.key, I), We = (d ? rt : be) || P.key === "Enter" || P.key.trim() === "";
3250
+ if (m && n) {
3251
+ const dt = T == null ? void 0 : T.nodesRef.current.find((mt) => mt.parentId == null), De = T && dt ? zr(T.nodesRef.current, dt.id) : null;
3252
+ if (se && De && M) {
3253
+ const mt = new KeyboardEvent("keydown", {
3254
+ key: P.key,
3255
+ bubbles: !0
3256
+ });
3257
+ if (nt || at) {
3258
+ var ft, un;
3259
+ const Cr = ((ft = De.context) == null ? void 0 : ft.elements.domReference) === P.currentTarget, an = at && !Cr ? (un = De.context) == null ? void 0 : un.elements.domReference : nt ? i.current.find((fn) => (fn == null ? void 0 : fn.id) === Me) : null;
3260
+ an && (de(P), an.dispatchEvent(mt), B(void 0));
3261
+ }
3262
+ if ((be || ee) && De.context && De.context.open && De.parentId && P.currentTarget !== De.context.elements.domReference) {
3263
+ var ln;
3264
+ de(P), (ln = De.context.elements.domReference) == null || ln.dispatchEvent(mt);
3265
+ return;
3266
+ }
3267
+ }
3268
+ return oe(P);
3269
+ }
3270
+ if (!(!n && !v && Z)) {
3271
+ if (We) {
3272
+ const dt = bt(P.key, re());
3273
+ R.current = d && dt ? null : P.key;
3274
+ }
3275
+ if (d) {
3276
+ rt && (de(P), n ? (b.current = yt(i, ne.current), w()) : r(!0, P.nativeEvent, "list-navigation"));
3277
+ return;
3278
+ }
3279
+ be && (l != null && (b.current = l), de(P), !n && v ? r(!0, P.nativeEvent, "list-navigation") : oe(P), n && w());
3280
+ }
3281
+ },
3282
+ onFocus() {
3283
+ n && !m && (b.current = -1, w());
3284
+ },
3285
+ onPointerDown: j,
3286
+ onPointerEnter: j,
3287
+ onMouseDown: D,
3288
+ onClick: D
3289
+ };
3290
+ }, [Me, Y, k, oe, ne, y, i, d, w, r, n, v, I, re, h, l, T, m, M]);
3291
+ return f.useMemo(() => u ? {
3292
+ reference: Re,
3293
+ floating: Q,
3294
+ item: ve
3295
+ } : {}, [u, Re, Q, ve]);
3296
+ }
3297
+ const Qo = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
3298
+ function Ii(e, t) {
3299
+ var n, r;
3300
+ t === void 0 && (t = {});
3301
+ const {
3302
+ open: o,
3303
+ elements: s,
3304
+ floatingId: i
3305
+ } = e, {
3306
+ enabled: c = !0,
3307
+ role: a = "dialog"
3308
+ } = t, u = Lt(), l = ((n = s.domReference) == null ? void 0 : n.id) || u, p = f.useMemo(() => {
3309
+ var v;
3310
+ return ((v = Ct(s.floating)) == null ? void 0 : v.id) || i;
3311
+ }, [s.floating, i]), g = (r = Qo.get(a)) != null ? r : a, h = et() != null, m = f.useMemo(() => g === "tooltip" || a === "label" ? {
3312
+ ["aria-" + (a === "label" ? "labelledby" : "describedby")]: o ? p : void 0
3313
+ } : {
3314
+ "aria-expanded": o ? "true" : "false",
3315
+ "aria-haspopup": g === "alertdialog" ? "dialog" : g,
3316
+ "aria-controls": o ? p : void 0,
3317
+ ...g === "listbox" && {
3318
+ role: "combobox"
3319
+ },
3320
+ ...g === "menu" && {
3321
+ id: l
3322
+ },
3323
+ ...g === "menu" && h && {
3324
+ role: "menuitem"
3325
+ },
3326
+ ...a === "select" && {
3327
+ "aria-autocomplete": "none"
3328
+ },
3329
+ ...a === "combobox" && {
3330
+ "aria-autocomplete": "list"
3331
+ }
3332
+ }, [g, p, h, o, l, a]), y = f.useMemo(() => {
3333
+ const v = {
3334
+ id: p,
3335
+ ...g && {
3336
+ role: g
3337
+ }
3338
+ };
3339
+ return g === "tooltip" || a === "label" ? v : {
3340
+ ...v,
3341
+ ...g === "menu" && {
3342
+ "aria-labelledby": l
3343
+ }
3344
+ };
3345
+ }, [g, p, l, a]), E = f.useCallback((v) => {
3346
+ let {
3347
+ active: x,
3348
+ selected: I
3349
+ } = v;
3350
+ const A = {
3351
+ role: "option",
3352
+ ...x && {
3353
+ id: p + "-fui-option"
3354
+ }
3355
+ };
3356
+ switch (a) {
3357
+ case "select":
3358
+ return {
3359
+ ...A,
3360
+ "aria-selected": x && I
3361
+ };
3362
+ case "combobox":
3363
+ return {
3364
+ ...A,
3365
+ "aria-selected": I
3366
+ };
3367
+ }
3368
+ return {};
3369
+ }, [p, a]);
3370
+ return f.useMemo(() => c ? {
3371
+ reference: m,
3372
+ floating: y,
3373
+ item: E
3374
+ } : {}, [c, m, y, E]);
3375
+ }
3376
+ function Zo(e, t) {
3377
+ const [n, r] = f.useState(e);
3378
+ return e && !n && r(!0), f.useEffect(() => {
3379
+ if (!e && n) {
3380
+ const o = setTimeout(() => r(!1), t);
3381
+ return () => clearTimeout(o);
3382
+ }
3383
+ }, [e, n, t]), n;
3384
+ }
3385
+ function Ci(e, t) {
3386
+ t === void 0 && (t = {});
3387
+ const {
3388
+ open: n,
3389
+ elements: {
3390
+ floating: r
3391
+ }
3392
+ } = e, {
3393
+ duration: o = 250
3394
+ } = t, i = (typeof o == "number" ? o : o.close) || 0, [c, a] = f.useState("unmounted"), u = Zo(n, i);
3395
+ return !u && c === "close" && a("unmounted"), X(() => {
3396
+ if (r) {
3397
+ if (n) {
3398
+ a("initial");
3399
+ const l = requestAnimationFrame(() => {
3400
+ tn.flushSync(() => {
3401
+ a("open");
3402
+ });
3403
+ });
3404
+ return () => {
3405
+ cancelAnimationFrame(l);
3406
+ };
3407
+ }
3408
+ a("close");
3409
+ }
3410
+ }, [n, r]), {
3411
+ isMounted: u,
3412
+ status: c
3413
+ };
3414
+ }
3415
+ export {
3416
+ li as C,
3417
+ mi as F,
3418
+ ai as a,
3419
+ ui as b,
3420
+ ci as c,
3421
+ xi as d,
3422
+ bi as e,
3423
+ si as f,
3424
+ yi as g,
3425
+ Ii as h,
3426
+ Ri as i,
3427
+ ri as j,
3428
+ et as k,
3429
+ fi as l,
3430
+ di as m,
3431
+ pi as n,
3432
+ oi as o,
3433
+ Mo as p,
3434
+ hi as q,
3435
+ Ei as r,
3436
+ ii as s,
3437
+ gi as t,
3438
+ So as u,
3439
+ wi as v,
3440
+ Ci as w,
3441
+ vi as x
3442
+ };