@stihl-design-system/components 1.0.0-RC.4 → 1.0.0-RC.40

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 (669) hide show
  1. package/Klarna.svg +1 -0
  2. package/Mastercard.svg +2 -0
  3. package/Notification-additional-information.jpeg +0 -0
  4. package/Notification-confirm-error.jpg +0 -0
  5. package/Notification-confirm-warn.jpeg +0 -0
  6. package/Notification-overview.jpeg +0 -0
  7. package/Notification-success.jpeg +0 -0
  8. package/PayPal.svg +2 -0
  9. package/Placeholder.svg +1 -0
  10. package/README.md +2 -11
  11. package/Visa.svg +2 -0
  12. package/accordion.d.ts +2 -0
  13. package/accordion.nt0Foequ.js +12 -0
  14. package/actionbutton.Ctea6drN.js +12 -0
  15. package/actionbutton.d.ts +2 -0
  16. package/actionlink.VX1OMtm-.js +12 -0
  17. package/actionlink.d.ts +2 -0
  18. package/arialiveregions.B0AV2JcV.js +18 -0
  19. package/arialiveregions.d.ts +1 -0
  20. package/assets/Accordion.Cr1dbVTH.css +1 -0
  21. package/assets/ActionButton.BLOWs6IZ.css +1 -0
  22. package/assets/ActionLink.BJDUVdT7.css +1 -0
  23. package/assets/Breadcrumb.BavNNzAA.css +1 -0
  24. package/assets/Button.C-UYIggc.css +1 -0
  25. package/assets/Checkbox.ZAPIO2N8.css +1 -0
  26. package/assets/CheckboxGroup.Dd-Huo7x.css +1 -0
  27. package/assets/Chip.D3vV0wyV.css +1 -0
  28. package/assets/CustomReactSelect.Ctze4SRN.css +1 -0
  29. package/assets/Dialog.DyiHUgTp.css +1 -0
  30. package/assets/Drawer.UugEajR2.css +1 -0
  31. package/assets/Fieldset.DmxbjOm1.css +1 -0
  32. package/assets/Header.BNYL2Y78.css +1 -0
  33. package/assets/Icon.i2P_Jf3Q.css +1 -0
  34. package/assets/InputFile.BUMCNCrj.css +1 -0
  35. package/assets/InputNumber.Bmz8cNKg.css +1 -0
  36. package/assets/InputPassword.CutbykTm.css +1 -0
  37. package/assets/InputSearch.Sr9jVpKt.css +1 -0
  38. package/assets/LinkButton.BEbmxP7h.css +1 -0
  39. package/assets/LinkCard.C6HtgbjH.css +1 -0
  40. package/assets/MegaMenu.Dw-oLSCX.css +1 -0
  41. package/assets/NavigationTabList.CzAiHz7G.css +1 -0
  42. package/assets/Notification.DBGpHzov.css +1 -0
  43. package/assets/Popover.mL5g23EK.css +1 -0
  44. package/assets/RadioGroup.q1lQ-HIZ.css +1 -0
  45. package/assets/Select.BZYb_HAG.css +1 -0
  46. package/assets/Slider.vnSU0ya0.css +1 -0
  47. package/assets/Stepper.tXJl15yL.css +1 -0
  48. package/assets/SystemFeedback.PKzqnXUe.css +1 -0
  49. package/assets/TextUtility.CEBJaKBG.css +1 -0
  50. package/assets/Textarea.BIgA9_fl.css +1 -0
  51. package/assets/Toast.DgRXxA0s.css +1 -0
  52. package/assets/arialiveregions.e0Q16ZWi.css +1 -0
  53. package/assets/asterisk.B41DaZDe.css +1 -0
  54. package/assets/banner.DFvdtgMp.css +1 -0
  55. package/assets/buttonround.BTC-HthI.css +1 -0
  56. package/assets/chipgroup.BGxjdSDX.css +1 -0
  57. package/assets/filelist.H_wKcSPX.css +1 -0
  58. package/assets/flag.CyCIPu_J.css +1 -0
  59. package/assets/floatingactionbutton.CTbMRM9Q.css +1 -0
  60. package/assets/heading.mGwg9pVU.css +1 -0
  61. package/assets/input.BEOus9jX.css +1 -0
  62. package/assets/link.BemYqm4d.css +1 -0
  63. package/assets/logo.SVrBe1T8.css +1 -0
  64. package/assets/logo100years.CQrEg-Vo.css +1 -0
  65. package/assets/numberindicator.BYIPwkAK.css +1 -0
  66. package/assets/optioncheckbox.6zYgifUk.css +1 -0
  67. package/assets/radio.l9OTraQU.css +1 -0
  68. package/assets/scroller.BGlPnnPD.css +1 -0
  69. package/assets/skiptocontent.CTSDC_kG.css +1 -0
  70. package/assets/spinner.C7QSv7jc.css +1 -0
  71. package/assets/step.Ch508u7I.css +1 -0
  72. package/assets/switch.DYamtd9O.css +1 -0
  73. package/assets/tabpane.o34hshTz.css +1 -0
  74. package/assets/text.BA1eUihR.css +1 -0
  75. package/assets/title.N-QcA7Re.css +1 -0
  76. package/assets/tooltip.BPcysHGE.css +1 -0
  77. package/asterisk.Dwtdwpkq.js +13 -0
  78. package/asterisk.d.ts +1 -0
  79. package/banner.S_c1UQJe.js +55 -0
  80. package/banner.d.ts +2 -0
  81. package/breadcrumb.DiuuVblR.js +11 -0
  82. package/breadcrumb.d.ts +2 -0
  83. package/button.Z7Mmvwhv.js +12 -0
  84. package/button.d.ts +1 -0
  85. package/buttonround.Bqi8Ej-y.js +96 -0
  86. package/buttonround.d.ts +1 -0
  87. package/card-example-image-1.webp +0 -0
  88. package/card-example-image-2.webp +0 -0
  89. package/card-example-image-3.webp +0 -0
  90. package/card-example-image-4.webp +0 -0
  91. package/card-example-image-5.webp +0 -0
  92. package/card-example-image-6.webp +0 -0
  93. package/card-example-image-7.webp +0 -0
  94. package/card-example-image-8.webp +0 -0
  95. package/card-example-image-square.webp +0 -0
  96. package/card-example-image.webp +0 -0
  97. package/checkbox.DtSSduSH.js +12 -0
  98. package/checkbox.d.ts +1 -0
  99. package/checkboxgroup.CSP1DOCW.js +9 -0
  100. package/checkboxgroup.d.ts +1 -0
  101. package/chip.CyypeY5M.js +12 -0
  102. package/chip.d.ts +2 -0
  103. package/chipgroup.d.ts +2 -0
  104. package/chipgroup.i5SOv6LA.js +199 -0
  105. package/chunks/Accordion.B-0pf8Fq.js +168 -0
  106. package/chunks/ActionButton.wdWh7E2b.js +182 -0
  107. package/chunks/ActionLink.DwUP-Kgm.js +155 -0
  108. package/chunks/AriaLiveRegions.utils.CLpOaVD9.js +27 -0
  109. package/chunks/Breadcrumb.nflDJoKs.js +103 -0
  110. package/chunks/Button.DpGeheky.js +139 -0
  111. package/chunks/Checkbox.B3NeB54s.js +88 -0
  112. package/chunks/CheckboxGroup.BYZSvqF7.js +74 -0
  113. package/chunks/Chip.SiGIIHR-.js +133 -0
  114. package/chunks/CustomReactSelect.DBsnmMPl.js +3379 -0
  115. package/chunks/Dialog.C-rcs_Up.js +102 -0
  116. package/chunks/Drawer.D0d557c5.js +107 -0
  117. package/chunks/Fieldset.7WM7w62l.js +81 -0
  118. package/chunks/Header.DyqOlV8L.js +402 -0
  119. package/chunks/Icon.m6sMB6vl.js +232 -0
  120. package/chunks/Input.utils.D78E4MGO.js +59 -0
  121. package/chunks/InputFile.DRGNdtY0.js +236 -0
  122. package/chunks/InputNumber.a44HnJ9B.js +240 -0
  123. package/chunks/InputPassword.B1E0Maub.js +121 -0
  124. package/chunks/InputSearch.C7AvD7Eu.js +149 -0
  125. package/chunks/LinkButton.CMjq2FKc.js +140 -0
  126. package/chunks/LinkCard.CJ5P0ews.js +199 -0
  127. package/chunks/MegaMenu.CiSiMlE3.js +188 -0
  128. package/chunks/NavigationTabList.C2f-lWex.js +67 -0
  129. package/chunks/NavigationTabs.D2QrnlL2.js +62 -0
  130. package/chunks/Notification.COwLndR0.js +91 -0
  131. package/chunks/Popover.C5wtha5l.js +214 -0
  132. package/chunks/RadioGroup.B-qTH31u.js +125 -0
  133. package/chunks/Select.DrDVi9lg.js +147 -0
  134. package/chunks/Slider.DGMrDfWv.js +306 -0
  135. package/chunks/Stepper.DptsFh5n.js +152 -0
  136. package/chunks/SystemFeedback.DFN6Y2cw.js +38 -0
  137. package/chunks/TabPane.utils.DG16Y2uD.js +10 -0
  138. package/chunks/Tabs.2JTenRcr.js +83 -0
  139. package/chunks/Text.utils.D_iOyOSH.js +11 -0
  140. package/chunks/TextUtility.Wbd4oQXI.js +82 -0
  141. package/chunks/Textarea.ymNCbcvH.js +181 -0
  142. package/chunks/Toast.RUzRjojQ.js +76 -0
  143. package/chunks/accessibility.B57oX4yV.js +10 -0
  144. package/chunks/{arrow-clockwise.BefOjGPg.js → arrow-clockwise.C4iOgjOc.js} +1 -1
  145. package/chunks/{arrow-counterclockwise.C7Ov32BZ.js → arrow-counterclockwise.CgQAuBUe.js} +1 -1
  146. package/chunks/battery-charge-0.DxlgEAto.js +10 -0
  147. package/chunks/battery-charge-100.D0Cax7dU.js +10 -0
  148. package/chunks/{battery.YCg9lYqC.js → battery.6Idoickg.js} +3 -3
  149. package/chunks/bluetooth-off.BzZCh4Q8.js +10 -0
  150. package/chunks/caret-down.CupuwAF6.js +10 -0
  151. package/chunks/caret-right.DKtu4PQe.js +10 -0
  152. package/chunks/{circle-check-colored.Bye_GwLy.js → circle-check-colored.qP2s3vjI.js} +1 -1
  153. package/chunks/collapse.Dvv3mgkv.js +10 -0
  154. package/chunks/connected-icon.BEijTRDG.js +10 -0
  155. package/chunks/default-icon.D_-oBHyT.js +10 -0
  156. package/chunks/{diamond-exclamationmark-colored.WNKYwZ8q.js → diamond-exclamationmark-colored.CzYiaTZ0.js} +1 -1
  157. package/chunks/document-magnifying-glass.DkvpNz-D.js +10 -0
  158. package/chunks/document-s.CoOp0kBK.js +10 -0
  159. package/chunks/feather.l1E4nFBx.js +10 -0
  160. package/chunks/file-type-doc.B_RSSYbu.js +10 -0
  161. package/chunks/file-type-image.Cg2NRd7y.js +10 -0
  162. package/chunks/file-type-pdf.Dm94xL2i.js +10 -0
  163. package/chunks/{map.CXgG1iGz.js → file-type-video.CFwfiP-D.js} +1 -1
  164. package/chunks/file-type-zip.SNixmKhQ.js +10 -0
  165. package/chunks/file.DLgRXiem.js +10 -0
  166. package/chunks/floating-ui.react.CP5A99-c.js +2980 -0
  167. package/chunks/has-window.ut_-aShB.js +5 -0
  168. package/chunks/helpers.CexwVao7.js +38 -0
  169. package/chunks/imow-icon.CyH72ySI.js +10 -0
  170. package/chunks/index.DQOqod3i.js +43 -0
  171. package/chunks/index.cKLI89Eg.js +281 -0
  172. package/chunks/is-animation-disabled.B-V_68K-.js +20 -0
  173. package/chunks/map.DNl7PF61.js +10 -0
  174. package/chunks/moon.5yILPYXs.js +10 -0
  175. package/chunks/muscle.DbNjWasV.js +10 -0
  176. package/chunks/mystihl-icon.xHpCyYJf.js +10 -0
  177. package/chunks/petrol.BGWwCsTw.js +10 -0
  178. package/chunks/sun.CY6ttzTL.js +10 -0
  179. package/chunks/tiktok.BWJTDGYm.js +10 -0
  180. package/chunks/translate.nuU7uChI.js +8 -0
  181. package/chunks/{triangle-exclamationmark-colored.CbVC3Gzi.js → triangle-exclamationmark-colored.e93zvQ6Q.js} +1 -1
  182. package/chunks/twitch.C893cAK8.js +10 -0
  183. package/chunks/upload.BogDfonx.js +10 -0
  184. package/chunks/useBreakpoint.1txsny17.js +45 -0
  185. package/chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js +7 -0
  186. package/chunks/variants.-R3_RCW8.js +10 -0
  187. package/chunks/weight.DUPu2UT0.js +10 -0
  188. package/combobox.DzSEFo_5.js +69 -0
  189. package/combobox.d.ts +1 -0
  190. package/components/Accordion/Accordion.d.ts +43 -0
  191. package/components/Accordion/Accordion.utils.d.ts +16 -0
  192. package/components/ActionButton/ActionButton.d.ts +63 -0
  193. package/components/ActionButton/ActionButton.utils.d.ts +22 -0
  194. package/components/ActionLink/ActionLink.d.ts +38 -0
  195. package/components/ActionLink/ActionLink.test.d.ts +1 -0
  196. package/components/ActionLink/ActionLink.utils.d.ts +19 -0
  197. package/components/ActionLink/ActionLink.utils.test.d.ts +1 -0
  198. package/components/AriaLiveRegions/AriaLiveRegions.d.ts +1 -0
  199. package/components/AriaLiveRegions/AriaLiveRegions.utils.d.ts +2 -2
  200. package/components/Asterisk/Asterisk.d.ts +1 -0
  201. package/components/Banner/Banner.d.ts +32 -0
  202. package/components/Banner/Banner.test.d.ts +1 -0
  203. package/components/Banner/Banner.utils.d.ts +2 -0
  204. package/components/Breadcrumb/Breadcrumb.d.ts +45 -0
  205. package/components/Breadcrumb/Breadcrumb.test.d.ts +1 -0
  206. package/components/Breadcrumb/Breadcrumb.utils.d.ts +4 -0
  207. package/components/Button/Button.d.ts +41 -16
  208. package/components/Button/Button.utils.d.ts +17 -1
  209. package/components/Button/Button.utils.test.d.ts +1 -0
  210. package/components/ButtonRound/ButtonRound.d.ts +12 -3
  211. package/components/Checkbox/Checkbox.d.ts +25 -9
  212. package/components/Checkbox/Checkbox.utils.d.ts +11 -0
  213. package/components/Checkbox/Checkbox.utils.test.d.ts +1 -0
  214. package/components/CheckboxGroup/CheckboxGroup.d.ts +34 -14
  215. package/components/CheckboxGroup/CheckboxGroup.utils.d.ts +0 -1
  216. package/components/ChipGroup/Chip.d.ts +13 -0
  217. package/components/ChipGroup/ChipGroup.d.ts +48 -0
  218. package/components/ChipGroup/ChipGroup.test.d.ts +1 -0
  219. package/components/ChipGroup/ChipGroup.utils.d.ts +58 -0
  220. package/components/ChipGroup/ChipGroup.utils.test.d.ts +1 -0
  221. package/components/Combobox/Combobox.d.ts +27 -6
  222. package/components/Combobox/Combobox.utils.d.ts +14 -7
  223. package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +88 -0
  224. package/components/Combobox/CustomReactSelect/CustomReactSelect.utils.d.ts +3 -0
  225. package/components/Combobox/CustomReactSelect/CustomReactSelect.utils.test.d.ts +1 -0
  226. package/components/{CustomReactSelect → Combobox/CustomReactSelect}/OptionCheckbox.d.ts +1 -2
  227. package/components/Dialog/Dialog.d.ts +40 -6
  228. package/components/Dialog/Dialog.test.d.ts +1 -0
  229. package/components/Dialog/Dialog.utils.d.ts +11 -0
  230. package/components/Dialog/Dialog.utils.test.d.ts +1 -0
  231. package/components/Drawer/Drawer.d.ts +49 -0
  232. package/components/Drawer/Drawer.test.d.ts +1 -0
  233. package/components/Drawer/Drawer.utils.d.ts +13 -0
  234. package/components/Drawer/Drawer.utils.test.d.ts +1 -0
  235. package/components/Fieldset/Fieldset.d.ts +29 -10
  236. package/components/Fieldset/Fieldset.utils.d.ts +7 -1
  237. package/components/FileList/FileList.d.ts +13 -0
  238. package/components/FileList/FileList.test.d.ts +1 -0
  239. package/components/FileList/FileList.utils.d.ts +18 -0
  240. package/components/FileList/FileList.utils.test.d.ts +1 -0
  241. package/components/Flag/Flag.d.ts +26 -0
  242. package/components/Flag/Flag.test.d.ts +1 -0
  243. package/components/Flag/Flag.utils.d.ts +2 -0
  244. package/components/FloatingActionButton/FloatingActionButton.d.ts +8 -2
  245. package/components/Header/Header.d.ts +67 -0
  246. package/components/Header/Header.utils.d.ts +17 -0
  247. package/components/Header/Header.utils.test.d.ts +1 -0
  248. package/components/Heading/Heading.d.ts +13 -6
  249. package/components/Icon/Icon.d.ts +14 -7
  250. package/components/Icon/Icon.utils.d.ts +1 -2
  251. package/components/Input/Input.d.ts +69 -25
  252. package/components/Input/Input.utils.d.ts +5 -6
  253. package/components/InputFile/InputFile.d.ts +104 -0
  254. package/components/InputFile/InputFile.test.d.ts +1 -0
  255. package/components/InputFile/InputFile.utils.d.ts +48 -0
  256. package/components/InputFile/InputFile.utils.test.d.ts +1 -0
  257. package/components/InputNumber/InputNumber.d.ts +110 -0
  258. package/components/InputNumber/InputNumber.test.d.ts +1 -0
  259. package/components/InputNumber/InputNumber.utils.d.ts +13 -0
  260. package/components/InputNumber/InputNumber.utils.test.d.ts +1 -0
  261. package/components/InputPassword/InputPassword.d.ts +56 -18
  262. package/components/InputPassword/InputPassword.utils.d.ts +2 -3
  263. package/components/InputSearch/InputSearch.d.ts +55 -18
  264. package/components/InputSearch/InputSearch.utils.d.ts +2 -3
  265. package/components/Link/Link.d.ts +11 -43
  266. package/components/Link/Link.utils.d.ts +2 -8
  267. package/components/LinkButton/LinkButton.d.ts +71 -0
  268. package/components/LinkButton/LinkButton.test.d.ts +1 -0
  269. package/components/LinkButton/LinkButton.utils.d.ts +24 -0
  270. package/components/LinkButton/LinkButton.utils.test.d.ts +1 -0
  271. package/components/LinkCard/LinkCard.d.ts +96 -0
  272. package/components/LinkCard/LinkCard.test.d.ts +1 -0
  273. package/components/LinkCard/LinkCard.utils.d.ts +10 -0
  274. package/components/LinkCard/LinkCard.utils.test.d.ts +1 -0
  275. package/components/Logo/Logo.d.ts +18 -10
  276. package/components/Logo/Logo.test.d.ts +1 -0
  277. package/components/Logo/Logo.utils.d.ts +2 -2
  278. package/components/Logo100Years/Logo100Years.d.ts +1 -0
  279. package/components/MegaMenu/MegaMenu.d.ts +32 -0
  280. package/components/MegaMenu/MegaMenu.test.d.ts +1 -0
  281. package/components/MegaMenu/MegaMenu.utils.d.ts +52 -0
  282. package/components/MegaMenu/MegaMenu.utils.test.d.ts +1 -0
  283. package/components/NavigationTabs/NavigationTabs.d.ts +43 -0
  284. package/components/NavigationTabs/NavigationTabs.test.d.ts +1 -0
  285. package/components/NavigationTabs/NavigationTabs.utils.d.ts +6 -0
  286. package/components/Notification/Notification.d.ts +25 -11
  287. package/components/Notification/Notification.utils.d.ts +0 -1
  288. package/components/NumberIndicator/NumberIndicator.d.ts +13 -0
  289. package/components/NumberIndicator/NumberIndicator.test.d.ts +1 -0
  290. package/components/NumberIndicator/NumberIndicator.utils.d.ts +2 -0
  291. package/components/Popover/Popover.d.ts +62 -0
  292. package/components/Popover/Popover.test.d.ts +1 -0
  293. package/components/Popover/Popover.utils.d.ts +84 -0
  294. package/components/Popover/Popover.utils.test.d.ts +1 -0
  295. package/components/Radio/Radio.d.ts +32 -14
  296. package/components/RadioGroup/RadioGroup.d.ts +43 -20
  297. package/components/RadioGroup/RadioGroup.utils.d.ts +6 -4
  298. package/components/RadioGroup/RadioGroup.utils.test.d.ts +1 -0
  299. package/components/Scroller/Scroller.d.ts +24 -0
  300. package/components/Scroller/Scroller.test.d.ts +1 -0
  301. package/components/Scroller/Scroller.utils.d.ts +3 -0
  302. package/components/Select/Select.d.ts +37 -13
  303. package/components/Select/Select.utils.d.ts +2 -3
  304. package/components/SkipToContent/SkipToContent.d.ts +19 -0
  305. package/components/SkipToContent/SkipToContent.test.d.ts +1 -0
  306. package/components/Slider/Slider.d.ts +76 -0
  307. package/components/Slider/Slider.test.d.ts +1 -0
  308. package/components/Slider/Slider.utils.d.ts +65 -0
  309. package/components/Slider/Slider.utils.test.d.ts +1 -0
  310. package/components/Spinner/Spinner.d.ts +14 -5
  311. package/components/Stepper/Step.d.ts +33 -0
  312. package/components/Stepper/Step.utils.d.ts +5 -0
  313. package/components/Stepper/Stepper.d.ts +56 -0
  314. package/components/Stepper/Stepper.test.d.ts +1 -0
  315. package/components/Stepper/Stepper.utils.d.ts +30 -0
  316. package/components/Stepper/Stepper.utils.test.d.ts +1 -0
  317. package/components/Switch/Switch.d.ts +23 -12
  318. package/components/SystemFeedback/SystemFeedback.d.ts +16 -7
  319. package/components/SystemFeedback/SystemFeedback.utils.d.ts +4 -7
  320. package/components/Tabs/TabList/NavigationTabList/NavigationTabList.d.ts +22 -0
  321. package/components/Tabs/TabList/TabList.d.ts +38 -0
  322. package/components/Tabs/TabList/TabList.utils.d.ts +2 -0
  323. package/components/Tabs/TabPane/TabPane.d.ts +10 -0
  324. package/components/Tabs/TabPane/TabPane.utils.d.ts +3 -0
  325. package/components/Tabs/TabPane/TabPane.utils.test.d.ts +1 -0
  326. package/components/Tabs/Tabs.d.ts +51 -0
  327. package/components/Tabs/Tabs.test.d.ts +1 -0
  328. package/components/Tabs/Tabs.utils.d.ts +6 -0
  329. package/components/Text/Text.d.ts +19 -10
  330. package/components/Text/Text.utils.d.ts +14 -1
  331. package/components/TextUtility/TextUtility.d.ts +30 -0
  332. package/components/TextUtility/TextUtility.test.d.ts +1 -0
  333. package/components/TextUtility/TextUtility.utils.d.ts +10 -0
  334. package/components/TextUtility/TextUtility.utils.test.d.ts +1 -0
  335. package/components/Textarea/Textarea.d.ts +47 -16
  336. package/components/Textarea/Textarea.utils.d.ts +2 -3
  337. package/components/Title/Title.d.ts +13 -6
  338. package/components/Toast/Toast.d.ts +28 -7
  339. package/components/Toast/Toast.utils.d.ts +19 -1
  340. package/components/Toast/ToastManager.d.ts +7 -4
  341. package/components/Tooltip/Tooltip.d.ts +40 -0
  342. package/components/Tooltip/Tooltip.test.d.ts +1 -0
  343. package/components/Tooltip/Tooltip.utils.d.ts +70 -0
  344. package/components/Tooltip/Tooltip.utils.test.d.ts +1 -0
  345. package/components/TopBar/TopBar.d.ts +54 -0
  346. package/components/TopBar/TopBar.utils.d.ts +14 -0
  347. package/components/TopBar/TopBar.utils.test.d.ts +1 -0
  348. package/connected-icon.svg +1 -0
  349. package/customreactselect.D7YraWJ7.js +15 -0
  350. package/customreactselect.d.ts +2 -1
  351. package/dialog.CBovd8em.js +9 -0
  352. package/dialog.d.ts +1 -0
  353. package/drawer.D5F0KXI2.js +9 -0
  354. package/drawer.d.ts +2 -0
  355. package/fieldset.DgbZ_K_l.js +12 -0
  356. package/fieldset.d.ts +1 -0
  357. package/filelist.CDEBo3Pi.js +160 -0
  358. package/filelist.d.ts +2 -0
  359. package/flag.D-wrUioF.js +50 -0
  360. package/flag.d.ts +2 -0
  361. package/floatingactionbutton.CE-Rz0dx.js +87 -0
  362. package/floatingactionbutton.d.ts +1 -0
  363. package/github-mark-white.svg +1 -0
  364. package/github-mark.svg +1 -0
  365. package/header.BtGgmM59.js +12 -0
  366. package/header.d.ts +2 -0
  367. package/heading.BHSklXho.js +46 -0
  368. package/heading.d.ts +1 -0
  369. package/icon.ByLYRkPZ.js +9 -0
  370. package/icon.d.ts +1 -0
  371. package/icon.svg +1 -1
  372. package/imow-icon.svg +1 -0
  373. package/index.d.ts +51 -4
  374. package/index.es.js +235 -138
  375. package/input.MZXe6rlg.js +188 -0
  376. package/input.d.ts +1 -0
  377. package/inputfile.BO4wDnzQ.js +18 -0
  378. package/inputfile.d.ts +2 -0
  379. package/inputnumber.DevQudIX.js +17 -0
  380. package/inputnumber.d.ts +2 -0
  381. package/inputpassword.C-XYK-JP.js +13 -0
  382. package/inputpassword.d.ts +1 -0
  383. package/inputsearch.CmJdxnzX.js +15 -0
  384. package/inputsearch.d.ts +1 -0
  385. package/intro-design-spacings01.webp +0 -0
  386. package/intro-design-spacings02.webp +0 -0
  387. package/intro-design-spacings03.webp +0 -0
  388. package/link.R1lfD5aN.js +81 -0
  389. package/link.d.ts +1 -0
  390. package/linkbutton.Y-ET1tc9.js +12 -0
  391. package/linkbutton.d.ts +2 -0
  392. package/linkcard.CayqoQNo.js +12 -0
  393. package/linkcard.d.ts +2 -0
  394. package/logo.D7LnRA1E.js +80 -0
  395. package/logo.d.ts +1 -0
  396. package/logo100years.C0IojOp9.js +24 -0
  397. package/logo100years.d.ts +2 -0
  398. package/megamenu.CUjk3_h2.js +12 -0
  399. package/megamenu.d.ts +2 -0
  400. package/mystihl-icon.svg +1 -0
  401. package/navigationtablist.CKPpQrme.js +10 -0
  402. package/navigationtablist.d.ts +2 -0
  403. package/navigationtabs.VUAOwesQ.js +9 -0
  404. package/navigationtabs.d.ts +2 -0
  405. package/notification.d.ts +1 -0
  406. package/notification.u_LLz-O0.js +10 -0
  407. package/numberindicator.ZGVRSmqf.js +36 -0
  408. package/numberindicator.d.ts +2 -0
  409. package/optioncheckbox.d.ts +2 -1
  410. package/optioncheckbox.v8Plcgeg.js +48 -0
  411. package/package.json +77 -59
  412. package/partials/assets.const.js +2 -0
  413. package/partials/connected-apple-icon.png +0 -0
  414. package/partials/connected-favicon.ico +0 -0
  415. package/partials/connected-icon-192.png +0 -0
  416. package/partials/connected-icon-512.png +0 -0
  417. package/partials/connected-icon.svg +1 -0
  418. package/partials/copyAssets.js +27 -13
  419. package/partials/default-icon.svg +1 -0
  420. package/partials/imow-apple-icon.png +0 -0
  421. package/partials/imow-favicon.ico +0 -0
  422. package/partials/imow-icon-192.png +0 -0
  423. package/partials/imow-icon-512.png +0 -0
  424. package/partials/imow-icon.svg +1 -0
  425. package/partials/index.js +342 -2159
  426. package/partials/lib/partials.d.ts +77 -5
  427. package/partials/mystihl-apple-icon.png +0 -0
  428. package/partials/mystihl-favicon.ico +0 -0
  429. package/partials/mystihl-icon-192.png +0 -0
  430. package/partials/mystihl-icon-512.png +0 -0
  431. package/partials/mystihl-icon.svg +1 -0
  432. package/popover.T7-imfkx.js +12 -0
  433. package/popover.d.ts +2 -0
  434. package/radio.DxdVKoxe.js +137 -0
  435. package/radio.d.ts +1 -0
  436. package/radiogroup.CAh4wto1.js +11 -0
  437. package/radiogroup.d.ts +1 -0
  438. package/scroller.DfhhZelk.js +98 -0
  439. package/scroller.d.ts +2 -0
  440. package/select-decision-tree-small.webp +0 -0
  441. package/select-decision-tree.webp +0 -0
  442. package/select.CSCc_-6d.js +14 -0
  443. package/select.d.ts +1 -0
  444. package/skiptocontent.C2HpZt5q.js +35 -0
  445. package/skiptocontent.d.ts +2 -0
  446. package/slider.B2aQwfc2.js +12 -0
  447. package/slider.d.ts +2 -0
  448. package/spinner.CRVyui04.js +46 -0
  449. package/spinner.d.ts +1 -0
  450. package/step.C-LC5sKQ.js +82 -0
  451. package/step.d.ts +6 -0
  452. package/stepper.CRljfUF8.js +16 -0
  453. package/stepper.d.ts +2 -0
  454. package/styles/fonts/STIHLContrafaceDigitalTextDemi.woff +0 -0
  455. package/styles/fonts/STIHLContrafaceDigitalTextDemi.woff2 +0 -0
  456. package/styles/fonts/font-face.min.css +1 -1
  457. package/styles/js/index.d.ts +4 -0
  458. package/styles/js/index.es.js +249 -0
  459. package/styles/js/lib/animation.d.ts +13 -0
  460. package/styles/js/lib/breakpoint.d.ts +9 -0
  461. package/styles/js/lib/spacing.d.ts +22 -0
  462. package/styles/js/lib/theme.d.ts +202 -0
  463. package/styles/scss/ds/index.scss +20 -0
  464. package/styles/scss/ds/lib/animation.scss +21 -0
  465. package/styles/scss/ds/lib/breakpoints.scss +17 -0
  466. package/styles/scss/ds/lib/container-query.scss +54 -0
  467. package/styles/scss/ds/lib/ds-internal/_a11y.scss +15 -0
  468. package/styles/scss/ds/lib/ds-internal/_focus.scss +60 -0
  469. package/styles/scss/ds/lib/ds-internal/_heading.scss +37 -0
  470. package/styles/scss/ds/lib/ds-internal/_helpers.scss +32 -0
  471. package/styles/scss/ds/lib/ds-internal/_high-contrast.scss +6 -0
  472. package/styles/scss/ds/lib/ds-internal/_hover.scss +6 -0
  473. package/styles/scss/ds/lib/ds-internal/_index.scss +11 -0
  474. package/styles/scss/ds/lib/ds-internal/_input.scss +196 -0
  475. package/styles/scss/ds/lib/ds-internal/_link-button.scss +226 -0
  476. package/styles/scss/ds/lib/ds-internal/_link.scss +62 -0
  477. package/styles/scss/ds/lib/ds-internal/_spacing-dynamic.scss +53 -0
  478. package/styles/scss/ds/lib/ds-internal/_text.scss +30 -0
  479. package/styles/scss/ds/lib/grid-extended.scss +14 -0
  480. package/styles/scss/ds/lib/grid-full.scss +6 -0
  481. package/styles/scss/ds/lib/grid-main.scss +122 -0
  482. package/styles/scss/ds/lib/grid-narrow.scss +14 -0
  483. package/styles/scss/ds/lib/grid-sidebar.scss +57 -0
  484. package/styles/scss/ds/lib/grid.scss +92 -0
  485. package/styles/scss/ds/lib/heading.scss +75 -0
  486. package/styles/scss/ds/lib/input.scss +26 -0
  487. package/styles/scss/ds/lib/link-button.scss +29 -0
  488. package/styles/scss/ds/lib/link.scss +74 -0
  489. package/styles/scss/ds/lib/media-query.scss +32 -0
  490. package/styles/scss/{lib/_shadow.scss → ds/lib/shadow.scss} +7 -2
  491. package/styles/scss/ds/lib/spacing-dynamic.scss +7 -0
  492. package/styles/scss/ds/lib/spacing.scss +20 -0
  493. package/styles/scss/ds/lib/text.scss +107 -0
  494. package/styles/scss/ds/lib/theme.scss +171 -0
  495. package/styles/scss/ds/lib/transition.scss +36 -0
  496. package/switch.DgKgzm-j.js +66 -0
  497. package/switch.d.ts +1 -0
  498. package/systemfeedback.BKLsE5sY.js +10 -0
  499. package/systemfeedback.d.ts +1 -0
  500. package/tablist.d.ts +2 -0
  501. package/tablist.hMHdX1V8.js +210 -0
  502. package/tabpane.7vMXUKFX.js +37 -0
  503. package/tabpane.d.ts +2 -0
  504. package/tabs.d.ts +2 -0
  505. package/tabs.t-gR7dGc.js +11 -0
  506. package/text.D_e3JBvf.js +72 -0
  507. package/text.d.ts +1 -0
  508. package/textarea.CDXY-OVz.js +14 -0
  509. package/textarea.d.ts +1 -0
  510. package/textutility.CNWCGYOy.js +11 -0
  511. package/textutility.d.ts +2 -0
  512. package/title.d.ts +1 -0
  513. package/title.kJ48FkPU.js +40 -0
  514. package/toast.Bev-Rfuw.js +11 -0
  515. package/toast.d.ts +1 -0
  516. package/toastmanager.DII20_9k.js +89 -0
  517. package/toastmanager.d.ts +1 -0
  518. package/tooltip._lP4aMV2.js +177 -0
  519. package/tooltip.d.ts +2 -0
  520. package/topbar.Z9NNkxKU.js +12 -0
  521. package/topbar.d.ts +2 -0
  522. package/types/icon-types.d.ts +1 -1
  523. package/types/prettier-plugin-organize-imports.d.ts +1 -0
  524. package/utils/get-rect.d.ts +4 -0
  525. package/utils/get-rect.test.d.ts +1 -0
  526. package/utils/helpers.d.ts +17 -0
  527. package/utils/index.d.ts +8 -0
  528. package/utils/is-animation-disabled.d.ts +14 -0
  529. package/utils/is-animation-disabled.test.d.ts +1 -0
  530. package/utils/mergeRefs.d.ts +5 -0
  531. package/utils/mergeRefs.test.d.ts +1 -0
  532. package/utils/remove-spaces.d.ts +6 -0
  533. package/utils/remove-spaces.test.d.ts +1 -0
  534. package/utils/render-documentation.d.ts +1 -0
  535. package/utils/translate.d.ts +11 -0
  536. package/utils/translate.test.d.ts +1 -0
  537. package/utils/useBreakpoint.d.ts +0 -1
  538. package/utils/useElementSize.d.ts +14 -0
  539. package/utils/useElementSize.test.d.ts +1 -0
  540. package/utils/useIsomorphicLayoutEffect.d.ts +25 -0
  541. package/utils/useScrollDirection.d.ts +9 -0
  542. package/utils/useScrollDirection.test.d.ts +1 -0
  543. package/utils/vitest.setup.d.ts +2 -1
  544. package/arialiveregions.49Zyf6mj.js +0 -27
  545. package/assets/CustomReactSelect.B0rJLjN0.css +0 -1
  546. package/assets/Fieldset.xazpUXJX.css +0 -1
  547. package/assets/Icon.CB-KQmw4.css +0 -1
  548. package/assets/InputPassword.C3Uyj7oA.css +0 -1
  549. package/assets/InputSearch.tL3e9-Ob.css +0 -1
  550. package/assets/InputStepper.paPJix5A.css +0 -1
  551. package/assets/Notification.CCCbfXEz.css +0 -1
  552. package/assets/RadioGroup.Ur8Ro-XL.css +0 -1
  553. package/assets/Select.D2qBxaHP.css +0 -1
  554. package/assets/Textarea.BKbocznb.css +0 -1
  555. package/assets/Toast.CAP_EwDX.css +0 -1
  556. package/assets/arialiveregions.VnhjP8Gr.css +0 -1
  557. package/assets/asterisk.C-o6rbGQ.css +0 -1
  558. package/assets/button.BuIpnG-S.css +0 -1
  559. package/assets/buttonround.C3ph5Yyu.css +0 -1
  560. package/assets/checkbox.BsFEWfQe.css +0 -1
  561. package/assets/dialog.BGK3mgk7.css +0 -1
  562. package/assets/floatingactionbutton.D7ywURL3.css +0 -1
  563. package/assets/heading.CGFucb-C.css +0 -1
  564. package/assets/input.BcP5kkZ2.css +0 -1
  565. package/assets/link.DQy_OhwC.css +0 -1
  566. package/assets/linkstandalone.Dh6bE5Fb.css +0 -1
  567. package/assets/logo.BbHYgnWo.css +0 -1
  568. package/assets/optioncheckbox.C-K1FLhc.css +0 -1
  569. package/assets/radio.CSHQGdpr.css +0 -1
  570. package/assets/spinner.C5rBmKiF.css +0 -1
  571. package/assets/switch.sqve8ApJ.css +0 -1
  572. package/assets/systemfeedback.WE3wClZ3.css +0 -1
  573. package/assets/text.DDAveG7E.css +0 -1
  574. package/assets/title.CE0Dm7PI.css +0 -1
  575. package/asterisk.DU8THnoC.js +0 -8
  576. package/button.DX_nxoJC.js +0 -135
  577. package/buttonround.CXsBk9nL.js +0 -118
  578. package/checkbox.B43oeMeC.js +0 -112
  579. package/checkboxgroup.C7aCjYds.js +0 -9
  580. package/chunks/AriaLiveRegions.utils.DzWI5KCU.js +0 -31
  581. package/chunks/CheckboxGroup.CS6Q_TeZ.js +0 -87
  582. package/chunks/CustomReactSelect.DtmbYZUf.js +0 -5033
  583. package/chunks/Fieldset.BokeZzG5.js +0 -99
  584. package/chunks/Icon.9gDIp6p4.js +0 -217
  585. package/chunks/Input.utils.AKWCNkpA.js +0 -110
  586. package/chunks/InputPassword.jpUCijp7.js +0 -140
  587. package/chunks/InputSearch.BmOtAZcR.js +0 -190
  588. package/chunks/InputStepper.DTKjUL4U.js +0 -291
  589. package/chunks/Notification.CUPOlHAX.js +0 -93
  590. package/chunks/RadioGroup.DpwnVv7u.js +0 -110
  591. package/chunks/RadioGroup.module.bi3leRes.js +0 -11
  592. package/chunks/Select.DkDZo0ky.js +0 -193
  593. package/chunks/Textarea.C938p79X.js +0 -195
  594. package/chunks/Toast.CLYrwQVO.js +0 -89
  595. package/chunks/helpers.B1JT5ShS.js +0 -7
  596. package/chunks/index.CvOaL64Y.js +0 -45
  597. package/chunks/jsx-runtime.C-kxDJ4g.js +0 -639
  598. package/chunks/pdf.9kZbElrZ.js +0 -10
  599. package/chunks/petrol.Du6qAgp0.js +0 -10
  600. package/chunks/upload.ZImTAIgx.js +0 -10
  601. package/chunks/useBreakpoint.5xBNDiCf.js +0 -48
  602. package/combobox.BaSkiD6f.js +0 -47
  603. package/components/CustomReactSelect/CustomReactSelect.d.ts +0 -60
  604. package/components/CustomReactSelect/CustomReactSelect.utils.d.ts +0 -16
  605. package/components/InputStepper/InputStepper.d.ts +0 -53
  606. package/components/InputStepper/InputStepper.utils.d.ts +0 -13
  607. package/components/LinkStandalone/LinkStandalone.d.ts +0 -15
  608. package/components/LinkStandalone/LinkStandalone.utils.d.ts +0 -2
  609. package/customreactselect.LTbjaBN2.js +0 -13
  610. package/dialog.BkXwcbUh.js +0 -45
  611. package/fieldset.BXOWK-B-.js +0 -11
  612. package/floatingactionbutton.-nDRRiXY.js +0 -87
  613. package/heading.DqGbFfj2.js +0 -50
  614. package/icon.Cpp_9L1I.js +0 -8
  615. package/input.BM6tyRUm.js +0 -236
  616. package/inputpassword.DUxH1K_k.js +0 -12
  617. package/inputsearch.B-vePHle.js +0 -13
  618. package/inputstepper.C2ypADPI.js +0 -13
  619. package/inputstepper.d.ts +0 -1
  620. package/link.B4XZoLDj.js +0 -115
  621. package/linkstandalone.BSfd95Pd.js +0 -79
  622. package/linkstandalone.d.ts +0 -1
  623. package/logo.C_oJ8isW.js +0 -69
  624. package/notification.CxxAOdNV.js +0 -9
  625. package/optioncheckbox.CUV1MQhh.js +0 -43
  626. package/partials/icon.svg +0 -1
  627. package/radio.Bhu9OUY-.js +0 -79
  628. package/radiogroup.CMJ1b38q.js +0 -11
  629. package/select.DFJK2mHF.js +0 -12
  630. package/spinner.BskX4ovu.js +0 -58
  631. package/styles/scss/_index.scss +0 -23
  632. package/styles/scss/lib/_a11y.scss +0 -15
  633. package/styles/scss/lib/_animation.scss +0 -20
  634. package/styles/scss/lib/_breakpoints.scss +0 -16
  635. package/styles/scss/lib/_container-query.scss +0 -58
  636. package/styles/scss/lib/_focus.scss +0 -62
  637. package/styles/scss/lib/_grid-extended.scss +0 -11
  638. package/styles/scss/lib/_grid-full.scss +0 -6
  639. package/styles/scss/lib/_grid-main.scss +0 -117
  640. package/styles/scss/lib/_grid-narrow.scss +0 -14
  641. package/styles/scss/lib/_grid-sidebar-sidebar.scss +0 -50
  642. package/styles/scss/lib/_grid-sidebar.scss +0 -157
  643. package/styles/scss/lib/_grid.scss +0 -88
  644. package/styles/scss/lib/_heading.scss +0 -66
  645. package/styles/scss/lib/_helpers.scss +0 -3
  646. package/styles/scss/lib/_high-contrast.scss +0 -24
  647. package/styles/scss/lib/_hover.scss +0 -10
  648. package/styles/scss/lib/_link.scss +0 -156
  649. package/styles/scss/lib/_media-query.scss +0 -32
  650. package/styles/scss/lib/_spacing.scss +0 -30
  651. package/styles/scss/lib/_text.scss +0 -67
  652. package/styles/scss/lib/_theme.scss +0 -162
  653. package/styles/scss/lib/_transition.scss +0 -26
  654. package/switch.Bx2tDKx0.js +0 -65
  655. package/systemfeedback.4Hkfigi-.js +0 -25
  656. package/text.CPU8IUqY.js +0 -57
  657. package/textarea.DPy3TJJf.js +0 -12
  658. package/title.icX0VDiO.js +0 -36
  659. package/toast.C-Yg5EoE.js +0 -10
  660. package/toastmanager.DQ_-eTrx.js +0 -96
  661. package/utils/has-document.d.ts +0 -1
  662. /package/components/{CustomReactSelect/CustomReactSelect.utils.test.d.ts → Accordion/Accordion.test.d.ts} +0 -0
  663. /package/components/{InputStepper/InputStepper.test.d.ts → Accordion/Acordion.utils.test.d.ts} +0 -0
  664. /package/components/{InputStepper/InputStepper.utils.test.d.ts → ActionButton/ActionButton.test.d.ts} +0 -0
  665. /package/components/{LinkStandalone/LinkStandalone.test.d.ts → ActionButton/ActionButton.utils.test.d.ts} +0 -0
  666. /package/partials/{apple-icon.png → default-apple-icon.png} +0 -0
  667. /package/partials/{favicon.ico → default-favicon.ico} +0 -0
  668. /package/partials/{icon-192.png → default-icon-192.png} +0 -0
  669. /package/partials/{icon-512.png → default-icon-512.png} +0 -0
@@ -0,0 +1,2980 @@
1
+ "use client";
2
+ import * as f from "react";
3
+ import { useLayoutEffect as wn } from "react";
4
+ import { jsxs as Lt, jsx as re, Fragment as Yn } from "react/jsx-runtime";
5
+ import * as It from "react-dom";
6
+ function rt() {
7
+ return typeof window < "u";
8
+ }
9
+ function xe(e) {
10
+ return kt(e) ? (e.nodeName || "").toLowerCase() : "#document";
11
+ }
12
+ function ee(e) {
13
+ var t;
14
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
15
+ }
16
+ function ue(e) {
17
+ var t;
18
+ return (t = (kt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
19
+ }
20
+ function kt(e) {
21
+ return rt() ? e instanceof Node || e instanceof ee(e).Node : !1;
22
+ }
23
+ function K(e) {
24
+ return rt() ? e instanceof Element || e instanceof ee(e).Element : !1;
25
+ }
26
+ function U(e) {
27
+ return rt() ? e instanceof HTMLElement || e instanceof ee(e).HTMLElement : !1;
28
+ }
29
+ function Et(e) {
30
+ return !rt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ee(e).ShadowRoot;
31
+ }
32
+ const zn = /* @__PURE__ */ new Set(["inline", "contents"]);
33
+ function We(e) {
34
+ const {
35
+ overflow: t,
36
+ overflowX: n,
37
+ overflowY: r,
38
+ display: o
39
+ } = oe(e);
40
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !zn.has(o);
41
+ }
42
+ const Gn = /* @__PURE__ */ new Set(["table", "td", "th"]);
43
+ function Zn(e) {
44
+ return Gn.has(xe(e));
45
+ }
46
+ const Jn = [":popover-open", ":modal"];
47
+ function ot(e) {
48
+ return Jn.some((t) => {
49
+ try {
50
+ return e.matches(t);
51
+ } catch {
52
+ return !1;
53
+ }
54
+ });
55
+ }
56
+ const Qn = ["transform", "translate", "scale", "rotate", "perspective"], er = ["transform", "translate", "scale", "rotate", "perspective", "filter"], tr = ["paint", "layout", "strict", "content"];
57
+ function Dt(e) {
58
+ const t = it(), n = K(e) ? oe(e) : e;
59
+ return Qn.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) || er.some((r) => (n.willChange || "").includes(r)) || tr.some((r) => (n.contain || "").includes(r));
60
+ }
61
+ function nr(e) {
62
+ let t = ge(e);
63
+ for (; U(t) && !me(t); ) {
64
+ if (Dt(t))
65
+ return t;
66
+ if (ot(t))
67
+ return null;
68
+ t = ge(t);
69
+ }
70
+ return null;
71
+ }
72
+ function it() {
73
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
74
+ }
75
+ const rr = /* @__PURE__ */ new Set(["html", "body", "#document"]);
76
+ function me(e) {
77
+ return rr.has(xe(e));
78
+ }
79
+ function oe(e) {
80
+ return ee(e).getComputedStyle(e);
81
+ }
82
+ function st(e) {
83
+ return K(e) ? {
84
+ scrollLeft: e.scrollLeft,
85
+ scrollTop: e.scrollTop
86
+ } : {
87
+ scrollLeft: e.scrollX,
88
+ scrollTop: e.scrollY
89
+ };
90
+ }
91
+ function ge(e) {
92
+ if (xe(e) === "html")
93
+ return e;
94
+ const t = (
95
+ // Step into the shadow DOM of the parent of a slotted node.
96
+ e.assignedSlot || // DOM Element detected.
97
+ e.parentNode || // ShadowRoot detected.
98
+ Et(e) && e.host || // Fallback.
99
+ ue(e)
100
+ );
101
+ return Et(t) ? t.host : t;
102
+ }
103
+ function Rn(e) {
104
+ const t = ge(e);
105
+ return me(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && We(t) ? t : Rn(t);
106
+ }
107
+ function Re(e, t, n) {
108
+ var r;
109
+ t === void 0 && (t = []), n === void 0 && (n = !0);
110
+ const o = Rn(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = ee(o);
111
+ if (i) {
112
+ const c = Tt(s);
113
+ return t.concat(s, s.visualViewport || [], We(o) ? o : [], c && n ? Re(c) : []);
114
+ }
115
+ return t.concat(o, Re(o, [], n));
116
+ }
117
+ function Tt(e) {
118
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
119
+ }
120
+ const ke = Math.min, Se = Math.max, ze = Math.round, je = Math.floor, le = (e) => ({
121
+ x: e,
122
+ y: e
123
+ }), or = {
124
+ left: "right",
125
+ right: "left",
126
+ bottom: "top",
127
+ top: "bottom"
128
+ }, ir = {
129
+ start: "end",
130
+ end: "start"
131
+ };
132
+ function St(e, t, n) {
133
+ return Se(e, ke(t, n));
134
+ }
135
+ function $e(e, t) {
136
+ return typeof e == "function" ? e(t) : e;
137
+ }
138
+ function Ce(e) {
139
+ return e.split("-")[0];
140
+ }
141
+ function Ve(e) {
142
+ return e.split("-")[1];
143
+ }
144
+ function xn(e) {
145
+ return e === "x" ? "y" : "x";
146
+ }
147
+ function Ft(e) {
148
+ return e === "y" ? "height" : "width";
149
+ }
150
+ const sr = /* @__PURE__ */ new Set(["top", "bottom"]);
151
+ function ye(e) {
152
+ return sr.has(Ce(e)) ? "y" : "x";
153
+ }
154
+ function Nt(e) {
155
+ return xn(ye(e));
156
+ }
157
+ function cr(e, t, n) {
158
+ n === void 0 && (n = !1);
159
+ const r = Ve(e), o = Nt(e), i = Ft(o);
160
+ let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
161
+ return t.reference[i] > t.floating[i] && (s = Ge(s)), [s, Ge(s)];
162
+ }
163
+ function lr(e) {
164
+ const t = Ge(e);
165
+ return [Ct(e), t, Ct(t)];
166
+ }
167
+ function Ct(e) {
168
+ return e.replace(/start|end/g, (t) => ir[t]);
169
+ }
170
+ const Kt = ["left", "right"], jt = ["right", "left"], ur = ["top", "bottom"], ar = ["bottom", "top"];
171
+ function fr(e, t, n) {
172
+ switch (e) {
173
+ case "top":
174
+ case "bottom":
175
+ return n ? t ? jt : Kt : t ? Kt : jt;
176
+ case "left":
177
+ case "right":
178
+ return t ? ur : ar;
179
+ default:
180
+ return [];
181
+ }
182
+ }
183
+ function dr(e, t, n, r) {
184
+ const o = Ve(e);
185
+ let i = fr(Ce(e), n === "start", r);
186
+ return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(Ct)))), i;
187
+ }
188
+ function Ge(e) {
189
+ return e.replace(/left|right|bottom|top/g, (t) => or[t]);
190
+ }
191
+ function mr(e) {
192
+ return {
193
+ top: 0,
194
+ right: 0,
195
+ bottom: 0,
196
+ left: 0,
197
+ ...e
198
+ };
199
+ }
200
+ function En(e) {
201
+ return typeof e != "number" ? mr(e) : {
202
+ top: e,
203
+ right: e,
204
+ bottom: e,
205
+ left: e
206
+ };
207
+ }
208
+ function Ze(e) {
209
+ const {
210
+ x: t,
211
+ y: n,
212
+ width: r,
213
+ height: o
214
+ } = e;
215
+ return {
216
+ width: r,
217
+ height: o,
218
+ top: n,
219
+ left: t,
220
+ right: t + r,
221
+ bottom: n + o,
222
+ x: t,
223
+ y: n
224
+ };
225
+ }
226
+ var gr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], Je = /* @__PURE__ */ gr.join(","), Tn = typeof Element > "u", De = Tn ? function() {
227
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Qe = !Tn && Element.prototype.getRootNode ? function(e) {
228
+ var t;
229
+ return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e);
230
+ } : function(e) {
231
+ return e?.ownerDocument;
232
+ }, et = function e(t, n) {
233
+ var r;
234
+ n === void 0 && (n = !0);
235
+ var o = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), i = o === "" || o === "true", s = i || n && t && e(t.parentNode);
236
+ return s;
237
+ }, pr = function(t) {
238
+ var n, r = t == null || (n = t.getAttribute) === null || n === void 0 ? void 0 : n.call(t, "contenteditable");
239
+ return r === "" || r === "true";
240
+ }, Sn = function(t, n, r) {
241
+ if (et(t))
242
+ return [];
243
+ var o = Array.prototype.slice.apply(t.querySelectorAll(Je));
244
+ return n && De.call(t, Je) && o.unshift(t), o = o.filter(r), o;
245
+ }, Cn = function e(t, n, r) {
246
+ for (var o = [], i = Array.from(t); i.length; ) {
247
+ var s = i.shift();
248
+ if (!et(s, !1))
249
+ if (s.tagName === "SLOT") {
250
+ var c = s.assignedElements(), l = c.length ? c : s.children, u = e(l, !0, r);
251
+ r.flatten ? o.push.apply(o, u) : o.push({
252
+ scopeParent: s,
253
+ candidates: u
254
+ });
255
+ } else {
256
+ var d = De.call(s, Je);
257
+ d && r.filter(s) && (n || !t.includes(s)) && o.push(s);
258
+ var g = s.shadowRoot || // check for an undisclosed shadow
259
+ typeof r.getShadowRoot == "function" && r.getShadowRoot(s), h = !et(g, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
260
+ if (g && h) {
261
+ var a = e(g === !0 ? s.children : g.children, !0, r);
262
+ r.flatten ? o.push.apply(o, a) : o.push({
263
+ scopeParent: s,
264
+ candidates: a
265
+ });
266
+ } else
267
+ i.unshift.apply(i, s.children);
268
+ }
269
+ }
270
+ return o;
271
+ }, An = function(t) {
272
+ return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
273
+ }, On = function(t) {
274
+ if (!t)
275
+ throw new Error("No node provided");
276
+ return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || pr(t)) && !An(t) ? 0 : t.tabIndex;
277
+ }, vr = function(t, n) {
278
+ var r = On(t);
279
+ return r < 0 && n && !An(t) ? 0 : r;
280
+ }, hr = function(t, n) {
281
+ return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex;
282
+ }, Mn = function(t) {
283
+ return t.tagName === "INPUT";
284
+ }, br = function(t) {
285
+ return Mn(t) && t.type === "hidden";
286
+ }, yr = function(t) {
287
+ var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
288
+ return r.tagName === "SUMMARY";
289
+ });
290
+ return n;
291
+ }, wr = function(t, n) {
292
+ for (var r = 0; r < t.length; r++)
293
+ if (t[r].checked && t[r].form === n)
294
+ return t[r];
295
+ }, Rr = function(t) {
296
+ if (!t.name)
297
+ return !0;
298
+ var n = t.form || Qe(t), r = function(c) {
299
+ return n.querySelectorAll('input[type="radio"][name="' + c + '"]');
300
+ }, o;
301
+ if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
302
+ o = r(window.CSS.escape(t.name));
303
+ else
304
+ try {
305
+ o = r(t.name);
306
+ } catch (s) {
307
+ return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", s.message), !1;
308
+ }
309
+ var i = wr(o, t.form);
310
+ return !i || i === t;
311
+ }, xr = function(t) {
312
+ return Mn(t) && t.type === "radio";
313
+ }, Er = function(t) {
314
+ return xr(t) && !Rr(t);
315
+ }, Tr = function(t) {
316
+ var n, r = t && Qe(t), o = (n = r) === null || n === void 0 ? void 0 : n.host, i = !1;
317
+ if (r && r !== t) {
318
+ var s, c, l;
319
+ for (i = !!((s = o) !== null && s !== void 0 && (c = s.ownerDocument) !== null && c !== void 0 && c.contains(o) || t != null && (l = t.ownerDocument) !== null && l !== void 0 && l.contains(t)); !i && o; ) {
320
+ var u, d, g;
321
+ r = Qe(o), o = (u = r) === null || u === void 0 ? void 0 : u.host, i = !!((d = o) !== null && d !== void 0 && (g = d.ownerDocument) !== null && g !== void 0 && g.contains(o));
322
+ }
323
+ }
324
+ return i;
325
+ }, qt = function(t) {
326
+ var n = t.getBoundingClientRect(), r = n.width, o = n.height;
327
+ return r === 0 && o === 0;
328
+ }, Sr = function(t, n) {
329
+ var r = n.displayCheck, o = n.getShadowRoot;
330
+ if (getComputedStyle(t).visibility === "hidden")
331
+ return !0;
332
+ var i = De.call(t, "details>summary:first-of-type"), s = i ? t.parentElement : t;
333
+ if (De.call(s, "details:not([open]) *"))
334
+ return !0;
335
+ if (!r || r === "full" || r === "legacy-full") {
336
+ if (typeof o == "function") {
337
+ for (var c = t; t; ) {
338
+ var l = t.parentElement, u = Qe(t);
339
+ if (l && !l.shadowRoot && o(l) === !0)
340
+ return qt(t);
341
+ t.assignedSlot ? t = t.assignedSlot : !l && u !== t.ownerDocument ? t = u.host : t = l;
342
+ }
343
+ t = c;
344
+ }
345
+ if (Tr(t))
346
+ return !t.getClientRects().length;
347
+ if (r !== "legacy-full")
348
+ return !0;
349
+ } else if (r === "non-zero-area")
350
+ return qt(t);
351
+ return !1;
352
+ }, Cr = function(t) {
353
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
354
+ for (var n = t.parentElement; n; ) {
355
+ if (n.tagName === "FIELDSET" && n.disabled) {
356
+ for (var r = 0; r < n.children.length; r++) {
357
+ var o = n.children.item(r);
358
+ if (o.tagName === "LEGEND")
359
+ return De.call(n, "fieldset[disabled] *") ? !0 : !o.contains(t);
360
+ }
361
+ return !0;
362
+ }
363
+ n = n.parentElement;
364
+ }
365
+ return !1;
366
+ }, At = function(t, n) {
367
+ return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
368
+ // because we're limited in the type of selectors we can use in JSDom (see related
369
+ // note related to `candidateSelectors`)
370
+ et(n) || br(n) || Sr(n, t) || // For a details element with a summary, the summary element gets the focus
371
+ yr(n) || Cr(n));
372
+ }, Ot = function(t, n) {
373
+ return !(Er(n) || On(n) < 0 || !At(t, n));
374
+ }, Ar = function(t) {
375
+ var n = parseInt(t.getAttribute("tabindex"), 10);
376
+ return !!(isNaN(n) || n >= 0);
377
+ }, Or = function e(t) {
378
+ var n = [], r = [];
379
+ return t.forEach(function(o, i) {
380
+ var s = !!o.scopeParent, c = s ? o.scopeParent : o, l = vr(c, s), u = s ? e(o.candidates) : c;
381
+ l === 0 ? s ? n.push.apply(n, u) : n.push(c) : r.push({
382
+ documentOrder: i,
383
+ tabIndex: l,
384
+ item: o,
385
+ isScope: s,
386
+ content: u
387
+ });
388
+ }), r.sort(hr).reduce(function(o, i) {
389
+ return i.isScope ? o.push.apply(o, i.content) : o.push(i.content), o;
390
+ }, []).concat(n);
391
+ }, ct = function(t, n) {
392
+ n = n || {};
393
+ var r;
394
+ return n.getShadowRoot ? r = Cn([t], n.includeContainer, {
395
+ filter: Ot.bind(null, n),
396
+ flatten: !1,
397
+ getShadowRoot: n.getShadowRoot,
398
+ shadowRootFilter: Ar
399
+ }) : r = Sn(t, n.includeContainer, Ot.bind(null, n)), Or(r);
400
+ }, Mr = function(t, n) {
401
+ n = n || {};
402
+ var r;
403
+ return n.getShadowRoot ? r = Cn([t], n.includeContainer, {
404
+ filter: At.bind(null, n),
405
+ flatten: !0,
406
+ getShadowRoot: n.getShadowRoot
407
+ }) : r = Sn(t, n.includeContainer, At.bind(null, n)), r;
408
+ }, Pn = function(t, n) {
409
+ if (n = n || {}, !t)
410
+ throw new Error("No node provided");
411
+ return De.call(t, Je) === !1 ? !1 : Ot(n, t);
412
+ };
413
+ function Bt() {
414
+ const e = navigator.userAgentData;
415
+ return e != null && e.platform ? e.platform : navigator.platform;
416
+ }
417
+ function Ln() {
418
+ const e = navigator.userAgentData;
419
+ return e && Array.isArray(e.brands) ? e.brands.map((t) => {
420
+ let {
421
+ brand: n,
422
+ version: r
423
+ } = t;
424
+ return n + "/" + r;
425
+ }).join(" ") : navigator.userAgent;
426
+ }
427
+ function In() {
428
+ return /apple/i.test(navigator.vendor);
429
+ }
430
+ function Mt() {
431
+ const e = /android/i;
432
+ return e.test(Bt()) || e.test(Ln());
433
+ }
434
+ function Pr() {
435
+ return Bt().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
436
+ }
437
+ function kn() {
438
+ return Ln().includes("jsdom/");
439
+ }
440
+ const Xt = "data-floating-ui-focusable", Lr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
441
+ function be(e) {
442
+ let t = e.activeElement;
443
+ for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
444
+ var n;
445
+ t = t.shadowRoot.activeElement;
446
+ }
447
+ return t;
448
+ }
449
+ function Z(e, t) {
450
+ if (!e || !t)
451
+ return !1;
452
+ const n = t.getRootNode == null ? void 0 : t.getRootNode();
453
+ if (e.contains(t))
454
+ return !0;
455
+ if (n && Et(n)) {
456
+ let r = t;
457
+ for (; r; ) {
458
+ if (e === r)
459
+ return !0;
460
+ r = r.parentNode || r.host;
461
+ }
462
+ }
463
+ return !1;
464
+ }
465
+ function de(e) {
466
+ return "composedPath" in e ? e.composedPath()[0] : e.target;
467
+ }
468
+ function gt(e, t) {
469
+ if (t == null)
470
+ return !1;
471
+ if ("composedPath" in e)
472
+ return e.composedPath().includes(t);
473
+ const n = e;
474
+ return n.target != null && t.contains(n.target);
475
+ }
476
+ function Ir(e) {
477
+ return e.matches("html,body");
478
+ }
479
+ function J(e) {
480
+ return e?.ownerDocument || document;
481
+ }
482
+ function Wt(e) {
483
+ return U(e) && e.matches(Lr);
484
+ }
485
+ function Ut(e) {
486
+ return e ? e.getAttribute("role") === "combobox" && Wt(e) : !1;
487
+ }
488
+ function kr(e) {
489
+ if (!e || kn()) return !0;
490
+ try {
491
+ return e.matches(":focus-visible");
492
+ } catch {
493
+ return !0;
494
+ }
495
+ }
496
+ function Pt(e) {
497
+ return e ? e.hasAttribute(Xt) ? e : e.querySelector("[" + Xt + "]") || e : null;
498
+ }
499
+ function Pe(e, t, n) {
500
+ return n === void 0 && (n = !0), e.filter((o) => {
501
+ var i;
502
+ return o.parentId === t && (!n || ((i = o.context) == null ? void 0 : i.open));
503
+ }).flatMap((o) => [o, ...Pe(e, o.id, n)]);
504
+ }
505
+ function Yt(e, t) {
506
+ var n;
507
+ let r = [], o = (n = e.find((i) => i.id === t)) == null ? void 0 : n.parentId;
508
+ for (; o; ) {
509
+ const i = e.find((s) => s.id === o);
510
+ o = i?.parentId, i && (r = r.concat(i));
511
+ }
512
+ return r;
513
+ }
514
+ function pt(e) {
515
+ e.preventDefault(), e.stopPropagation();
516
+ }
517
+ function Dr(e) {
518
+ return "nativeEvent" in e;
519
+ }
520
+ function Fr(e) {
521
+ return e.mozInputSource === 0 && e.isTrusted ? !0 : Mt() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
522
+ }
523
+ function Nr(e) {
524
+ return kn() ? !1 : !Mt() && e.width === 0 && e.height === 0 || Mt() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
525
+ e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
526
+ }
527
+ function Ne(e, t) {
528
+ const n = ["mouse", "pen"];
529
+ return t || n.push("", void 0), n.includes(e);
530
+ }
531
+ var Br = typeof document < "u", Wr = function() {
532
+ }, G = Br ? wn : Wr;
533
+ const $r = {
534
+ ...f
535
+ };
536
+ function Te(e) {
537
+ const t = f.useRef(e);
538
+ return G(() => {
539
+ t.current = e;
540
+ }), t;
541
+ }
542
+ const Vr = $r.useInsertionEffect, _r = Vr || ((e) => e());
543
+ function Q(e) {
544
+ const t = f.useRef(() => {
545
+ if (process.env.NODE_ENV !== "production")
546
+ throw new Error("Cannot call an event handler while rendering.");
547
+ });
548
+ return _r(() => {
549
+ t.current = e;
550
+ }), f.useCallback(function() {
551
+ for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
552
+ r[o] = arguments[o];
553
+ return t.current == null ? void 0 : t.current(...r);
554
+ }, []);
555
+ }
556
+ const _e = () => ({
557
+ getShadowRoot: !0,
558
+ displayCheck: (
559
+ // JSDOM does not support the `tabbable` library. To solve this we can
560
+ // check if `ResizeObserver` is a real function (not polyfilled), which
561
+ // determines if the current environment is JSDOM-like.
562
+ typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
563
+ )
564
+ });
565
+ function Dn(e, t) {
566
+ const n = ct(e, _e()), r = n.length;
567
+ if (r === 0) return;
568
+ const o = be(J(e)), i = n.indexOf(o), s = i === -1 ? t === 1 ? 0 : r - 1 : i + t;
569
+ return n[s];
570
+ }
571
+ function Fn(e) {
572
+ return Dn(J(e).body, 1) || e;
573
+ }
574
+ function Nn(e) {
575
+ return Dn(J(e).body, -1) || e;
576
+ }
577
+ function Fe(e, t) {
578
+ const n = t || e.currentTarget, r = e.relatedTarget;
579
+ return !r || !Z(n, r);
580
+ }
581
+ function Hr(e) {
582
+ ct(e, _e()).forEach((n) => {
583
+ n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
584
+ });
585
+ }
586
+ function zt(e) {
587
+ e.querySelectorAll("[data-tabindex]").forEach((n) => {
588
+ const r = n.dataset.tabindex;
589
+ delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
590
+ });
591
+ }
592
+ function Gt(e, t, n) {
593
+ let {
594
+ reference: r,
595
+ floating: o
596
+ } = e;
597
+ const i = ye(t), s = Nt(t), c = Ft(s), l = Ce(t), u = i === "y", d = r.x + r.width / 2 - o.width / 2, g = r.y + r.height / 2 - o.height / 2, h = r[c] / 2 - o[c] / 2;
598
+ let a;
599
+ switch (l) {
600
+ case "top":
601
+ a = {
602
+ x: d,
603
+ y: r.y - o.height
604
+ };
605
+ break;
606
+ case "bottom":
607
+ a = {
608
+ x: d,
609
+ y: r.y + r.height
610
+ };
611
+ break;
612
+ case "right":
613
+ a = {
614
+ x: r.x + r.width,
615
+ y: g
616
+ };
617
+ break;
618
+ case "left":
619
+ a = {
620
+ x: r.x - o.width,
621
+ y: g
622
+ };
623
+ break;
624
+ default:
625
+ a = {
626
+ x: r.x,
627
+ y: r.y
628
+ };
629
+ }
630
+ switch (Ve(t)) {
631
+ case "start":
632
+ a[s] -= h * (n && u ? -1 : 1);
633
+ break;
634
+ case "end":
635
+ a[s] += h * (n && u ? -1 : 1);
636
+ break;
637
+ }
638
+ return a;
639
+ }
640
+ const Kr = async (e, t, n) => {
641
+ const {
642
+ placement: r = "bottom",
643
+ strategy: o = "absolute",
644
+ middleware: i = [],
645
+ platform: s
646
+ } = n, c = i.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(t));
647
+ let u = await s.getElementRects({
648
+ reference: e,
649
+ floating: t,
650
+ strategy: o
651
+ }), {
652
+ x: d,
653
+ y: g
654
+ } = Gt(u, r, l), h = r, a = {}, p = 0;
655
+ for (let m = 0; m < c.length; m++) {
656
+ const {
657
+ name: y,
658
+ fn: R
659
+ } = c[m], {
660
+ x: b,
661
+ y: w,
662
+ data: S,
663
+ reset: A
664
+ } = await R({
665
+ x: d,
666
+ y: g,
667
+ initialPlacement: r,
668
+ placement: h,
669
+ strategy: o,
670
+ middlewareData: a,
671
+ rects: u,
672
+ platform: s,
673
+ elements: {
674
+ reference: e,
675
+ floating: t
676
+ }
677
+ });
678
+ d = b ?? d, g = w ?? g, a = {
679
+ ...a,
680
+ [y]: {
681
+ ...a[y],
682
+ ...S
683
+ }
684
+ }, A && p <= 50 && (p++, typeof A == "object" && (A.placement && (h = A.placement), A.rects && (u = A.rects === !0 ? await s.getElementRects({
685
+ reference: e,
686
+ floating: t,
687
+ strategy: o
688
+ }) : A.rects), {
689
+ x: d,
690
+ y: g
691
+ } = Gt(u, h, l)), m = -1);
692
+ }
693
+ return {
694
+ x: d,
695
+ y: g,
696
+ placement: h,
697
+ strategy: o,
698
+ middlewareData: a
699
+ };
700
+ };
701
+ async function Bn(e, t) {
702
+ var n;
703
+ t === void 0 && (t = {});
704
+ const {
705
+ x: r,
706
+ y: o,
707
+ platform: i,
708
+ rects: s,
709
+ elements: c,
710
+ strategy: l
711
+ } = e, {
712
+ boundary: u = "clippingAncestors",
713
+ rootBoundary: d = "viewport",
714
+ elementContext: g = "floating",
715
+ altBoundary: h = !1,
716
+ padding: a = 0
717
+ } = $e(t, e), p = En(a), y = c[h ? g === "floating" ? "reference" : "floating" : g], R = Ze(await i.getClippingRect({
718
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
719
+ boundary: u,
720
+ rootBoundary: d,
721
+ strategy: l
722
+ })), b = g === "floating" ? {
723
+ x: r,
724
+ y: o,
725
+ width: s.floating.width,
726
+ height: s.floating.height
727
+ } : s.reference, w = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), S = await (i.isElement == null ? void 0 : i.isElement(w)) ? await (i.getScale == null ? void 0 : i.getScale(w)) || {
728
+ x: 1,
729
+ y: 1
730
+ } : {
731
+ x: 1,
732
+ y: 1
733
+ }, A = Ze(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
734
+ elements: c,
735
+ rect: b,
736
+ offsetParent: w,
737
+ strategy: l
738
+ }) : b);
739
+ return {
740
+ top: (R.top - A.top + p.top) / S.y,
741
+ bottom: (A.bottom - R.bottom + p.bottom) / S.y,
742
+ left: (R.left - A.left + p.left) / S.x,
743
+ right: (A.right - R.right + p.right) / S.x
744
+ };
745
+ }
746
+ const jr = (e) => ({
747
+ name: "arrow",
748
+ options: e,
749
+ async fn(t) {
750
+ const {
751
+ x: n,
752
+ y: r,
753
+ placement: o,
754
+ rects: i,
755
+ platform: s,
756
+ elements: c,
757
+ middlewareData: l
758
+ } = t, {
759
+ element: u,
760
+ padding: d = 0
761
+ } = $e(e, t) || {};
762
+ if (u == null)
763
+ return {};
764
+ const g = En(d), h = {
765
+ x: n,
766
+ y: r
767
+ }, a = Nt(o), p = Ft(a), m = await s.getDimensions(u), y = a === "y", R = y ? "top" : "left", b = y ? "bottom" : "right", w = y ? "clientHeight" : "clientWidth", S = i.reference[p] + i.reference[a] - h[a] - i.floating[p], A = h[a] - i.reference[a], I = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
768
+ let M = I ? I[w] : 0;
769
+ (!M || !await (s.isElement == null ? void 0 : s.isElement(I))) && (M = c.floating[w] || i.floating[p]);
770
+ const D = S / 2 - A / 2, j = M / 2 - m[p] / 2 - 1, W = ke(g[R], j), B = ke(g[b], j), $ = W, V = M - m[p] - B, x = M / 2 - m[p] / 2 + D, E = St($, x, V), P = !l.arrow && Ve(o) != null && x !== E && i.reference[p] / 2 - (x < $ ? W : B) - m[p] / 2 < 0, T = P ? x < $ ? x - $ : x - V : 0;
771
+ return {
772
+ [a]: h[a] + T,
773
+ data: {
774
+ [a]: E,
775
+ centerOffset: x - E - T,
776
+ ...P && {
777
+ alignmentOffset: T
778
+ }
779
+ },
780
+ reset: P
781
+ };
782
+ }
783
+ }), qr = function(e) {
784
+ return e === void 0 && (e = {}), {
785
+ name: "flip",
786
+ options: e,
787
+ async fn(t) {
788
+ var n, r;
789
+ const {
790
+ placement: o,
791
+ middlewareData: i,
792
+ rects: s,
793
+ initialPlacement: c,
794
+ platform: l,
795
+ elements: u
796
+ } = t, {
797
+ mainAxis: d = !0,
798
+ crossAxis: g = !0,
799
+ fallbackPlacements: h,
800
+ fallbackStrategy: a = "bestFit",
801
+ fallbackAxisSideDirection: p = "none",
802
+ flipAlignment: m = !0,
803
+ ...y
804
+ } = $e(e, t);
805
+ if ((n = i.arrow) != null && n.alignmentOffset)
806
+ return {};
807
+ const R = Ce(o), b = ye(c), w = Ce(c) === c, S = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), A = h || (w || !m ? [Ge(c)] : lr(c)), I = p !== "none";
808
+ !h && I && A.push(...dr(c, m, p, S));
809
+ const M = [c, ...A], D = await Bn(t, y), j = [];
810
+ let W = ((r = i.flip) == null ? void 0 : r.overflows) || [];
811
+ if (d && j.push(D[R]), g) {
812
+ const x = cr(o, s, S);
813
+ j.push(D[x[0]], D[x[1]]);
814
+ }
815
+ if (W = [...W, {
816
+ placement: o,
817
+ overflows: j
818
+ }], !j.every((x) => x <= 0)) {
819
+ var B, $;
820
+ const x = (((B = i.flip) == null ? void 0 : B.index) || 0) + 1, E = M[x];
821
+ if (E && (!(g === "alignment" ? b !== ye(E) : !1) || // We leave the current main axis only if every placement on that axis
822
+ // overflows the main axis.
823
+ W.every((v) => ye(v.placement) === b ? v.overflows[0] > 0 : !0)))
824
+ return {
825
+ data: {
826
+ index: x,
827
+ overflows: W
828
+ },
829
+ reset: {
830
+ placement: E
831
+ }
832
+ };
833
+ let P = ($ = W.filter((T) => T.overflows[0] <= 0).sort((T, v) => T.overflows[1] - v.overflows[1])[0]) == null ? void 0 : $.placement;
834
+ if (!P)
835
+ switch (a) {
836
+ case "bestFit": {
837
+ var V;
838
+ const T = (V = W.filter((v) => {
839
+ if (I) {
840
+ const C = ye(v.placement);
841
+ return C === b || // Create a bias to the `y` side axis due to horizontal
842
+ // reading directions favoring greater width.
843
+ C === "y";
844
+ }
845
+ return !0;
846
+ }).map((v) => [v.placement, v.overflows.filter((C) => C > 0).reduce((C, L) => C + L, 0)]).sort((v, C) => v[1] - C[1])[0]) == null ? void 0 : V[0];
847
+ T && (P = T);
848
+ break;
849
+ }
850
+ case "initialPlacement":
851
+ P = c;
852
+ break;
853
+ }
854
+ if (o !== P)
855
+ return {
856
+ reset: {
857
+ placement: P
858
+ }
859
+ };
860
+ }
861
+ return {};
862
+ }
863
+ };
864
+ }, Xr = /* @__PURE__ */ new Set(["left", "top"]);
865
+ async function Ur(e, t) {
866
+ const {
867
+ placement: n,
868
+ platform: r,
869
+ elements: o
870
+ } = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = Ce(n), c = Ve(n), l = ye(n) === "y", u = Xr.has(s) ? -1 : 1, d = i && l ? -1 : 1, g = $e(t, e);
871
+ let {
872
+ mainAxis: h,
873
+ crossAxis: a,
874
+ alignmentAxis: p
875
+ } = typeof g == "number" ? {
876
+ mainAxis: g,
877
+ crossAxis: 0,
878
+ alignmentAxis: null
879
+ } : {
880
+ mainAxis: g.mainAxis || 0,
881
+ crossAxis: g.crossAxis || 0,
882
+ alignmentAxis: g.alignmentAxis
883
+ };
884
+ return c && typeof p == "number" && (a = c === "end" ? p * -1 : p), l ? {
885
+ x: a * d,
886
+ y: h * u
887
+ } : {
888
+ x: h * u,
889
+ y: a * d
890
+ };
891
+ }
892
+ const Yr = function(e) {
893
+ return e === void 0 && (e = 0), {
894
+ name: "offset",
895
+ options: e,
896
+ async fn(t) {
897
+ var n, r;
898
+ const {
899
+ x: o,
900
+ y: i,
901
+ placement: s,
902
+ middlewareData: c
903
+ } = t, l = await Ur(t, e);
904
+ return s === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
905
+ x: o + l.x,
906
+ y: i + l.y,
907
+ data: {
908
+ ...l,
909
+ placement: s
910
+ }
911
+ };
912
+ }
913
+ };
914
+ }, zr = function(e) {
915
+ return e === void 0 && (e = {}), {
916
+ name: "shift",
917
+ options: e,
918
+ async fn(t) {
919
+ const {
920
+ x: n,
921
+ y: r,
922
+ placement: o
923
+ } = t, {
924
+ mainAxis: i = !0,
925
+ crossAxis: s = !1,
926
+ limiter: c = {
927
+ fn: (y) => {
928
+ let {
929
+ x: R,
930
+ y: b
931
+ } = y;
932
+ return {
933
+ x: R,
934
+ y: b
935
+ };
936
+ }
937
+ },
938
+ ...l
939
+ } = $e(e, t), u = {
940
+ x: n,
941
+ y: r
942
+ }, d = await Bn(t, l), g = ye(Ce(o)), h = xn(g);
943
+ let a = u[h], p = u[g];
944
+ if (i) {
945
+ const y = h === "y" ? "top" : "left", R = h === "y" ? "bottom" : "right", b = a + d[y], w = a - d[R];
946
+ a = St(b, a, w);
947
+ }
948
+ if (s) {
949
+ const y = g === "y" ? "top" : "left", R = g === "y" ? "bottom" : "right", b = p + d[y], w = p - d[R];
950
+ p = St(b, p, w);
951
+ }
952
+ const m = c.fn({
953
+ ...t,
954
+ [h]: a,
955
+ [g]: p
956
+ });
957
+ return {
958
+ ...m,
959
+ data: {
960
+ x: m.x - n,
961
+ y: m.y - r,
962
+ enabled: {
963
+ [h]: i,
964
+ [g]: s
965
+ }
966
+ }
967
+ };
968
+ }
969
+ };
970
+ };
971
+ function Wn(e) {
972
+ const t = oe(e);
973
+ let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
974
+ const o = U(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = ze(n) !== i || ze(r) !== s;
975
+ return c && (n = i, r = s), {
976
+ width: n,
977
+ height: r,
978
+ $: c
979
+ };
980
+ }
981
+ function $t(e) {
982
+ return K(e) ? e : e.contextElement;
983
+ }
984
+ function Le(e) {
985
+ const t = $t(e);
986
+ if (!U(t))
987
+ return le(1);
988
+ const n = t.getBoundingClientRect(), {
989
+ width: r,
990
+ height: o,
991
+ $: i
992
+ } = Wn(t);
993
+ let s = (i ? ze(n.width) : n.width) / r, c = (i ? ze(n.height) : n.height) / o;
994
+ return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
995
+ x: s,
996
+ y: c
997
+ };
998
+ }
999
+ const Gr = /* @__PURE__ */ le(0);
1000
+ function $n(e) {
1001
+ const t = ee(e);
1002
+ return !it() || !t.visualViewport ? Gr : {
1003
+ x: t.visualViewport.offsetLeft,
1004
+ y: t.visualViewport.offsetTop
1005
+ };
1006
+ }
1007
+ function Zr(e, t, n) {
1008
+ return t === void 0 && (t = !1), !n || t && n !== ee(e) ? !1 : t;
1009
+ }
1010
+ function Ae(e, t, n, r) {
1011
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
1012
+ const o = e.getBoundingClientRect(), i = $t(e);
1013
+ let s = le(1);
1014
+ t && (r ? K(r) && (s = Le(r)) : s = Le(e));
1015
+ const c = Zr(i, n, r) ? $n(i) : le(0);
1016
+ let l = (o.left + c.x) / s.x, u = (o.top + c.y) / s.y, d = o.width / s.x, g = o.height / s.y;
1017
+ if (i) {
1018
+ const h = ee(i), a = r && K(r) ? ee(r) : r;
1019
+ let p = h, m = Tt(p);
1020
+ for (; m && r && a !== p; ) {
1021
+ const y = Le(m), R = m.getBoundingClientRect(), b = oe(m), w = R.left + (m.clientLeft + parseFloat(b.paddingLeft)) * y.x, S = R.top + (m.clientTop + parseFloat(b.paddingTop)) * y.y;
1022
+ l *= y.x, u *= y.y, d *= y.x, g *= y.y, l += w, u += S, p = ee(m), m = Tt(p);
1023
+ }
1024
+ }
1025
+ return Ze({
1026
+ width: d,
1027
+ height: g,
1028
+ x: l,
1029
+ y: u
1030
+ });
1031
+ }
1032
+ function lt(e, t) {
1033
+ const n = st(e).scrollLeft;
1034
+ return t ? t.left + n : Ae(ue(e)).left + n;
1035
+ }
1036
+ function Vn(e, t) {
1037
+ const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - lt(e, n), o = n.top + t.scrollTop;
1038
+ return {
1039
+ x: r,
1040
+ y: o
1041
+ };
1042
+ }
1043
+ function Jr(e) {
1044
+ let {
1045
+ elements: t,
1046
+ rect: n,
1047
+ offsetParent: r,
1048
+ strategy: o
1049
+ } = e;
1050
+ const i = o === "fixed", s = ue(r), c = t ? ot(t.floating) : !1;
1051
+ if (r === s || c && i)
1052
+ return n;
1053
+ let l = {
1054
+ scrollLeft: 0,
1055
+ scrollTop: 0
1056
+ }, u = le(1);
1057
+ const d = le(0), g = U(r);
1058
+ if ((g || !g && !i) && ((xe(r) !== "body" || We(s)) && (l = st(r)), U(r))) {
1059
+ const a = Ae(r);
1060
+ u = Le(r), d.x = a.x + r.clientLeft, d.y = a.y + r.clientTop;
1061
+ }
1062
+ const h = s && !g && !i ? Vn(s, l) : le(0);
1063
+ return {
1064
+ width: n.width * u.x,
1065
+ height: n.height * u.y,
1066
+ x: n.x * u.x - l.scrollLeft * u.x + d.x + h.x,
1067
+ y: n.y * u.y - l.scrollTop * u.y + d.y + h.y
1068
+ };
1069
+ }
1070
+ function Qr(e) {
1071
+ return Array.from(e.getClientRects());
1072
+ }
1073
+ function eo(e) {
1074
+ const t = ue(e), n = st(e), r = e.ownerDocument.body, o = Se(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = Se(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1075
+ let s = -n.scrollLeft + lt(e);
1076
+ const c = -n.scrollTop;
1077
+ return oe(r).direction === "rtl" && (s += Se(t.clientWidth, r.clientWidth) - o), {
1078
+ width: o,
1079
+ height: i,
1080
+ x: s,
1081
+ y: c
1082
+ };
1083
+ }
1084
+ const Zt = 25;
1085
+ function to(e, t) {
1086
+ const n = ee(e), r = ue(e), o = n.visualViewport;
1087
+ let i = r.clientWidth, s = r.clientHeight, c = 0, l = 0;
1088
+ if (o) {
1089
+ i = o.width, s = o.height;
1090
+ const d = it();
1091
+ (!d || d && t === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
1092
+ }
1093
+ const u = lt(r);
1094
+ if (u <= 0) {
1095
+ const d = r.ownerDocument, g = d.body, h = getComputedStyle(g), a = d.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, p = Math.abs(r.clientWidth - g.clientWidth - a);
1096
+ p <= Zt && (i -= p);
1097
+ } else u <= Zt && (i += u);
1098
+ return {
1099
+ width: i,
1100
+ height: s,
1101
+ x: c,
1102
+ y: l
1103
+ };
1104
+ }
1105
+ const no = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1106
+ function ro(e, t) {
1107
+ const n = Ae(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = U(e) ? Le(e) : le(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, l = o * i.x, u = r * i.y;
1108
+ return {
1109
+ width: s,
1110
+ height: c,
1111
+ x: l,
1112
+ y: u
1113
+ };
1114
+ }
1115
+ function Jt(e, t, n) {
1116
+ let r;
1117
+ if (t === "viewport")
1118
+ r = to(e, n);
1119
+ else if (t === "document")
1120
+ r = eo(ue(e));
1121
+ else if (K(t))
1122
+ r = ro(t, n);
1123
+ else {
1124
+ const o = $n(e);
1125
+ r = {
1126
+ x: t.x - o.x,
1127
+ y: t.y - o.y,
1128
+ width: t.width,
1129
+ height: t.height
1130
+ };
1131
+ }
1132
+ return Ze(r);
1133
+ }
1134
+ function _n(e, t) {
1135
+ const n = ge(e);
1136
+ return n === t || !K(n) || me(n) ? !1 : oe(n).position === "fixed" || _n(n, t);
1137
+ }
1138
+ function oo(e, t) {
1139
+ const n = t.get(e);
1140
+ if (n)
1141
+ return n;
1142
+ let r = Re(e, [], !1).filter((c) => K(c) && xe(c) !== "body"), o = null;
1143
+ const i = oe(e).position === "fixed";
1144
+ let s = i ? ge(e) : e;
1145
+ for (; K(s) && !me(s); ) {
1146
+ const c = oe(s), l = Dt(s);
1147
+ !l && c.position === "fixed" && (o = null), (i ? !l && !o : !l && c.position === "static" && !!o && no.has(o.position) || We(s) && !l && _n(e, s)) ? r = r.filter((d) => d !== s) : o = c, s = ge(s);
1148
+ }
1149
+ return t.set(e, r), r;
1150
+ }
1151
+ function io(e) {
1152
+ let {
1153
+ element: t,
1154
+ boundary: n,
1155
+ rootBoundary: r,
1156
+ strategy: o
1157
+ } = e;
1158
+ const s = [...n === "clippingAncestors" ? ot(t) ? [] : oo(t, this._c) : [].concat(n), r], c = s[0], l = s.reduce((u, d) => {
1159
+ const g = Jt(t, d, o);
1160
+ return u.top = Se(g.top, u.top), u.right = ke(g.right, u.right), u.bottom = ke(g.bottom, u.bottom), u.left = Se(g.left, u.left), u;
1161
+ }, Jt(t, c, o));
1162
+ return {
1163
+ width: l.right - l.left,
1164
+ height: l.bottom - l.top,
1165
+ x: l.left,
1166
+ y: l.top
1167
+ };
1168
+ }
1169
+ function so(e) {
1170
+ const {
1171
+ width: t,
1172
+ height: n
1173
+ } = Wn(e);
1174
+ return {
1175
+ width: t,
1176
+ height: n
1177
+ };
1178
+ }
1179
+ function co(e, t, n) {
1180
+ const r = U(t), o = ue(t), i = n === "fixed", s = Ae(e, !0, i, t);
1181
+ let c = {
1182
+ scrollLeft: 0,
1183
+ scrollTop: 0
1184
+ };
1185
+ const l = le(0);
1186
+ function u() {
1187
+ l.x = lt(o);
1188
+ }
1189
+ if (r || !r && !i)
1190
+ if ((xe(t) !== "body" || We(o)) && (c = st(t)), r) {
1191
+ const a = Ae(t, !0, i, t);
1192
+ l.x = a.x + t.clientLeft, l.y = a.y + t.clientTop;
1193
+ } else o && u();
1194
+ i && !r && o && u();
1195
+ const d = o && !r && !i ? Vn(o, c) : le(0), g = s.left + c.scrollLeft - l.x - d.x, h = s.top + c.scrollTop - l.y - d.y;
1196
+ return {
1197
+ x: g,
1198
+ y: h,
1199
+ width: s.width,
1200
+ height: s.height
1201
+ };
1202
+ }
1203
+ function vt(e) {
1204
+ return oe(e).position === "static";
1205
+ }
1206
+ function Qt(e, t) {
1207
+ if (!U(e) || oe(e).position === "fixed")
1208
+ return null;
1209
+ if (t)
1210
+ return t(e);
1211
+ let n = e.offsetParent;
1212
+ return ue(e) === n && (n = n.ownerDocument.body), n;
1213
+ }
1214
+ function Hn(e, t) {
1215
+ const n = ee(e);
1216
+ if (ot(e))
1217
+ return n;
1218
+ if (!U(e)) {
1219
+ let o = ge(e);
1220
+ for (; o && !me(o); ) {
1221
+ if (K(o) && !vt(o))
1222
+ return o;
1223
+ o = ge(o);
1224
+ }
1225
+ return n;
1226
+ }
1227
+ let r = Qt(e, t);
1228
+ for (; r && Zn(r) && vt(r); )
1229
+ r = Qt(r, t);
1230
+ return r && me(r) && vt(r) && !Dt(r) ? n : r || nr(e) || n;
1231
+ }
1232
+ const lo = async function(e) {
1233
+ const t = this.getOffsetParent || Hn, n = this.getDimensions, r = await n(e.floating);
1234
+ return {
1235
+ reference: co(e.reference, await t(e.floating), e.strategy),
1236
+ floating: {
1237
+ x: 0,
1238
+ y: 0,
1239
+ width: r.width,
1240
+ height: r.height
1241
+ }
1242
+ };
1243
+ };
1244
+ function uo(e) {
1245
+ return oe(e).direction === "rtl";
1246
+ }
1247
+ const ao = {
1248
+ convertOffsetParentRelativeRectToViewportRelativeRect: Jr,
1249
+ getDocumentElement: ue,
1250
+ getClippingRect: io,
1251
+ getOffsetParent: Hn,
1252
+ getElementRects: lo,
1253
+ getClientRects: Qr,
1254
+ getDimensions: so,
1255
+ getScale: Le,
1256
+ isElement: K,
1257
+ isRTL: uo
1258
+ };
1259
+ function Kn(e, t) {
1260
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1261
+ }
1262
+ function fo(e, t) {
1263
+ let n = null, r;
1264
+ const o = ue(e);
1265
+ function i() {
1266
+ var c;
1267
+ clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
1268
+ }
1269
+ function s(c, l) {
1270
+ c === void 0 && (c = !1), l === void 0 && (l = 1), i();
1271
+ const u = e.getBoundingClientRect(), {
1272
+ left: d,
1273
+ top: g,
1274
+ width: h,
1275
+ height: a
1276
+ } = u;
1277
+ if (c || t(), !h || !a)
1278
+ return;
1279
+ const p = je(g), m = je(o.clientWidth - (d + h)), y = je(o.clientHeight - (g + a)), R = je(d), w = {
1280
+ rootMargin: -p + "px " + -m + "px " + -y + "px " + -R + "px",
1281
+ threshold: Se(0, ke(1, l)) || 1
1282
+ };
1283
+ let S = !0;
1284
+ function A(I) {
1285
+ const M = I[0].intersectionRatio;
1286
+ if (M !== l) {
1287
+ if (!S)
1288
+ return s();
1289
+ M ? s(!1, M) : r = setTimeout(() => {
1290
+ s(!1, 1e-7);
1291
+ }, 1e3);
1292
+ }
1293
+ M === 1 && !Kn(u, e.getBoundingClientRect()) && s(), S = !1;
1294
+ }
1295
+ try {
1296
+ n = new IntersectionObserver(A, {
1297
+ ...w,
1298
+ // Handle <iframe>s
1299
+ root: o.ownerDocument
1300
+ });
1301
+ } catch {
1302
+ n = new IntersectionObserver(A, w);
1303
+ }
1304
+ n.observe(e);
1305
+ }
1306
+ return s(!0), i;
1307
+ }
1308
+ function zo(e, t, n, r) {
1309
+ r === void 0 && (r = {});
1310
+ const {
1311
+ ancestorScroll: o = !0,
1312
+ ancestorResize: i = !0,
1313
+ elementResize: s = typeof ResizeObserver == "function",
1314
+ layoutShift: c = typeof IntersectionObserver == "function",
1315
+ animationFrame: l = !1
1316
+ } = r, u = $t(e), d = o || i ? [...u ? Re(u) : [], ...Re(t)] : [];
1317
+ d.forEach((R) => {
1318
+ o && R.addEventListener("scroll", n, {
1319
+ passive: !0
1320
+ }), i && R.addEventListener("resize", n);
1321
+ });
1322
+ const g = u && c ? fo(u, n) : null;
1323
+ let h = -1, a = null;
1324
+ s && (a = new ResizeObserver((R) => {
1325
+ let [b] = R;
1326
+ b && b.target === u && a && (a.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
1327
+ var w;
1328
+ (w = a) == null || w.observe(t);
1329
+ })), n();
1330
+ }), u && !l && a.observe(u), a.observe(t));
1331
+ let p, m = l ? Ae(e) : null;
1332
+ l && y();
1333
+ function y() {
1334
+ const R = Ae(e);
1335
+ m && !Kn(m, R) && n(), m = R, p = requestAnimationFrame(y);
1336
+ }
1337
+ return n(), () => {
1338
+ var R;
1339
+ d.forEach((b) => {
1340
+ o && b.removeEventListener("scroll", n), i && b.removeEventListener("resize", n);
1341
+ }), g?.(), (R = a) == null || R.disconnect(), a = null, l && cancelAnimationFrame(p);
1342
+ };
1343
+ }
1344
+ const mo = Yr, go = zr, po = qr, en = jr, vo = (e, t, n) => {
1345
+ const r = /* @__PURE__ */ new Map(), o = {
1346
+ platform: ao,
1347
+ ...n
1348
+ }, i = {
1349
+ ...o.platform,
1350
+ _c: r
1351
+ };
1352
+ return Kr(e, t, {
1353
+ ...o,
1354
+ platform: i
1355
+ });
1356
+ };
1357
+ var ho = typeof document < "u", bo = function() {
1358
+ }, Ye = ho ? wn : bo;
1359
+ function tt(e, t) {
1360
+ if (e === t)
1361
+ return !0;
1362
+ if (typeof e != typeof t)
1363
+ return !1;
1364
+ if (typeof e == "function" && e.toString() === t.toString())
1365
+ return !0;
1366
+ let n, r, o;
1367
+ if (e && t && typeof e == "object") {
1368
+ if (Array.isArray(e)) {
1369
+ if (n = e.length, n !== t.length) return !1;
1370
+ for (r = n; r-- !== 0; )
1371
+ if (!tt(e[r], t[r]))
1372
+ return !1;
1373
+ return !0;
1374
+ }
1375
+ if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
1376
+ return !1;
1377
+ for (r = n; r-- !== 0; )
1378
+ if (!{}.hasOwnProperty.call(t, o[r]))
1379
+ return !1;
1380
+ for (r = n; r-- !== 0; ) {
1381
+ const i = o[r];
1382
+ if (!(i === "_owner" && e.$$typeof) && !tt(e[i], t[i]))
1383
+ return !1;
1384
+ }
1385
+ return !0;
1386
+ }
1387
+ return e !== e && t !== t;
1388
+ }
1389
+ function jn(e) {
1390
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1391
+ }
1392
+ function tn(e, t) {
1393
+ const n = jn(e);
1394
+ return Math.round(t * n) / n;
1395
+ }
1396
+ function ht(e) {
1397
+ const t = f.useRef(e);
1398
+ return Ye(() => {
1399
+ t.current = e;
1400
+ }), t;
1401
+ }
1402
+ function yo(e) {
1403
+ e === void 0 && (e = {});
1404
+ const {
1405
+ placement: t = "bottom",
1406
+ strategy: n = "absolute",
1407
+ middleware: r = [],
1408
+ platform: o,
1409
+ elements: {
1410
+ reference: i,
1411
+ floating: s
1412
+ } = {},
1413
+ transform: c = !0,
1414
+ whileElementsMounted: l,
1415
+ open: u
1416
+ } = e, [d, g] = f.useState({
1417
+ x: 0,
1418
+ y: 0,
1419
+ strategy: n,
1420
+ placement: t,
1421
+ middlewareData: {},
1422
+ isPositioned: !1
1423
+ }), [h, a] = f.useState(r);
1424
+ tt(h, r) || a(r);
1425
+ const [p, m] = f.useState(null), [y, R] = f.useState(null), b = f.useCallback((v) => {
1426
+ v !== I.current && (I.current = v, m(v));
1427
+ }, []), w = f.useCallback((v) => {
1428
+ v !== M.current && (M.current = v, R(v));
1429
+ }, []), S = i || p, A = s || y, I = f.useRef(null), M = f.useRef(null), D = f.useRef(d), j = l != null, W = ht(l), B = ht(o), $ = ht(u), V = f.useCallback(() => {
1430
+ if (!I.current || !M.current)
1431
+ return;
1432
+ const v = {
1433
+ placement: t,
1434
+ strategy: n,
1435
+ middleware: h
1436
+ };
1437
+ B.current && (v.platform = B.current), vo(I.current, M.current, v).then((C) => {
1438
+ const L = {
1439
+ ...C,
1440
+ // The floating element's position may be recomputed while it's closed
1441
+ // but still mounted (such as when transitioning out). To ensure
1442
+ // `isPositioned` will be `false` initially on the next open, avoid
1443
+ // setting it to `true` when `open === false` (must be specified).
1444
+ isPositioned: $.current !== !1
1445
+ };
1446
+ x.current && !tt(D.current, L) && (D.current = L, It.flushSync(() => {
1447
+ g(L);
1448
+ }));
1449
+ });
1450
+ }, [h, t, n, B, $]);
1451
+ Ye(() => {
1452
+ u === !1 && D.current.isPositioned && (D.current.isPositioned = !1, g((v) => ({
1453
+ ...v,
1454
+ isPositioned: !1
1455
+ })));
1456
+ }, [u]);
1457
+ const x = f.useRef(!1);
1458
+ Ye(() => (x.current = !0, () => {
1459
+ x.current = !1;
1460
+ }), []), Ye(() => {
1461
+ if (S && (I.current = S), A && (M.current = A), S && A) {
1462
+ if (W.current)
1463
+ return W.current(S, A, V);
1464
+ V();
1465
+ }
1466
+ }, [S, A, V, W, j]);
1467
+ const E = f.useMemo(() => ({
1468
+ reference: I,
1469
+ floating: M,
1470
+ setReference: b,
1471
+ setFloating: w
1472
+ }), [b, w]), P = f.useMemo(() => ({
1473
+ reference: S,
1474
+ floating: A
1475
+ }), [S, A]), T = f.useMemo(() => {
1476
+ const v = {
1477
+ position: n,
1478
+ left: 0,
1479
+ top: 0
1480
+ };
1481
+ if (!P.floating)
1482
+ return v;
1483
+ const C = tn(P.floating, d.x), L = tn(P.floating, d.y);
1484
+ return c ? {
1485
+ ...v,
1486
+ transform: "translate(" + C + "px, " + L + "px)",
1487
+ ...jn(P.floating) >= 1.5 && {
1488
+ willChange: "transform"
1489
+ }
1490
+ } : {
1491
+ position: n,
1492
+ left: C,
1493
+ top: L
1494
+ };
1495
+ }, [n, c, P.floating, d.x, d.y]);
1496
+ return f.useMemo(() => ({
1497
+ ...d,
1498
+ update: V,
1499
+ refs: E,
1500
+ elements: P,
1501
+ floatingStyles: T
1502
+ }), [d, V, E, P, T]);
1503
+ }
1504
+ const wo = (e) => {
1505
+ function t(n) {
1506
+ return {}.hasOwnProperty.call(n, "current");
1507
+ }
1508
+ return {
1509
+ name: "arrow",
1510
+ options: e,
1511
+ fn(n) {
1512
+ const {
1513
+ element: r,
1514
+ padding: o
1515
+ } = typeof e == "function" ? e(n) : e;
1516
+ return r && t(r) ? r.current != null ? en({
1517
+ element: r.current,
1518
+ padding: o
1519
+ }).fn(n) : {} : r ? en({
1520
+ element: r,
1521
+ padding: o
1522
+ }).fn(n) : {};
1523
+ }
1524
+ };
1525
+ }, Go = (e, t) => ({
1526
+ ...mo(e),
1527
+ options: [e, t]
1528
+ }), Zo = (e, t) => ({
1529
+ ...go(e),
1530
+ options: [e, t]
1531
+ }), Jo = (e, t) => ({
1532
+ ...po(e),
1533
+ options: [e, t]
1534
+ }), Qo = (e, t) => ({
1535
+ ...wo(e),
1536
+ options: [e, t]
1537
+ });
1538
+ function ei(e) {
1539
+ const t = f.useRef(void 0), n = f.useCallback((r) => {
1540
+ const o = e.map((i) => {
1541
+ if (i != null) {
1542
+ if (typeof i == "function") {
1543
+ const s = i, c = s(r);
1544
+ return typeof c == "function" ? c : () => {
1545
+ s(null);
1546
+ };
1547
+ }
1548
+ return i.current = r, () => {
1549
+ i.current = null;
1550
+ };
1551
+ }
1552
+ });
1553
+ return () => {
1554
+ o.forEach((i) => i?.());
1555
+ };
1556
+ }, e);
1557
+ return f.useMemo(() => e.every((r) => r == null) ? null : (r) => {
1558
+ t.current && (t.current(), t.current = void 0), r != null && (t.current = n(r));
1559
+ }, e);
1560
+ }
1561
+ const Ro = "data-floating-ui-focusable", nn = "active", rn = "selected", xo = {
1562
+ ...f
1563
+ };
1564
+ let on = !1, Eo = 0;
1565
+ const sn = () => (
1566
+ // Ensure the id is unique with multiple independent versions of Floating UI
1567
+ // on <React 18
1568
+ "floating-ui-" + Math.random().toString(36).slice(2, 6) + Eo++
1569
+ );
1570
+ function To() {
1571
+ const [e, t] = f.useState(() => on ? sn() : void 0);
1572
+ return G(() => {
1573
+ e == null && t(sn());
1574
+ }, []), f.useEffect(() => {
1575
+ on = !0;
1576
+ }, []), e;
1577
+ }
1578
+ const So = xo.useId, ut = So || To;
1579
+ let Be;
1580
+ process.env.NODE_ENV !== "production" && (Be = /* @__PURE__ */ new Set());
1581
+ function Co() {
1582
+ for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1583
+ n[r] = arguments[r];
1584
+ const o = "Floating UI: " + n.join(" ");
1585
+ if (!((e = Be) != null && e.has(o))) {
1586
+ var i;
1587
+ (i = Be) == null || i.add(o), console.warn(o);
1588
+ }
1589
+ }
1590
+ function Ao() {
1591
+ for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1592
+ n[r] = arguments[r];
1593
+ const o = "Floating UI: " + n.join(" ");
1594
+ if (!((e = Be) != null && e.has(o))) {
1595
+ var i;
1596
+ (i = Be) == null || i.add(o), console.error(o);
1597
+ }
1598
+ }
1599
+ const ti = /* @__PURE__ */ f.forwardRef(function(t, n) {
1600
+ const {
1601
+ context: {
1602
+ placement: r,
1603
+ elements: {
1604
+ floating: o
1605
+ },
1606
+ middlewareData: {
1607
+ arrow: i,
1608
+ shift: s
1609
+ }
1610
+ },
1611
+ width: c = 14,
1612
+ height: l = 7,
1613
+ tipRadius: u = 0,
1614
+ strokeWidth: d = 0,
1615
+ staticOffset: g,
1616
+ stroke: h,
1617
+ d: a,
1618
+ style: {
1619
+ transform: p,
1620
+ ...m
1621
+ } = {},
1622
+ ...y
1623
+ } = t;
1624
+ process.env.NODE_ENV !== "production" && (n || Co("The `ref` prop is required for `FloatingArrow`."));
1625
+ const R = ut(), [b, w] = f.useState(!1);
1626
+ if (G(() => {
1627
+ if (!o) return;
1628
+ oe(o).direction === "rtl" && w(!0);
1629
+ }, [o]), !o)
1630
+ return null;
1631
+ const [S, A] = r.split("-"), I = S === "top" || S === "bottom";
1632
+ let M = g;
1633
+ (I && s != null && s.x || !I && s != null && s.y) && (M = null);
1634
+ const D = d * 2, j = D / 2, W = c / 2 * (u / -8 + 1), B = l / 2 * u / 4, $ = !!a, V = M && A === "end" ? "bottom" : "top";
1635
+ let x = M && A === "end" ? "right" : "left";
1636
+ M && b && (x = A === "end" ? "left" : "right");
1637
+ const E = i?.x != null ? M || i.x : "", P = i?.y != null ? M || i.y : "", T = a || "M0,0" + (" H" + c) + (" L" + (c - W) + "," + (l - B)) + (" Q" + c / 2 + "," + l + " " + W + "," + (l - B)) + " Z", v = {
1638
+ top: $ ? "rotate(180deg)" : "",
1639
+ left: $ ? "rotate(90deg)" : "rotate(-90deg)",
1640
+ bottom: $ ? "" : "rotate(180deg)",
1641
+ right: $ ? "rotate(-90deg)" : "rotate(90deg)"
1642
+ }[S];
1643
+ return /* @__PURE__ */ Lt("svg", {
1644
+ ...y,
1645
+ "aria-hidden": !0,
1646
+ ref: n,
1647
+ width: $ ? c : c + D,
1648
+ height: c,
1649
+ viewBox: "0 0 " + c + " " + (l > c ? l : c),
1650
+ style: {
1651
+ position: "absolute",
1652
+ pointerEvents: "none",
1653
+ [x]: E,
1654
+ [V]: P,
1655
+ [S]: I || $ ? "100%" : "calc(100% - " + D / 2 + "px)",
1656
+ transform: [v, p].filter((C) => !!C).join(" "),
1657
+ ...m
1658
+ },
1659
+ children: [D > 0 && /* @__PURE__ */ re("path", {
1660
+ clipPath: "url(#" + R + ")",
1661
+ fill: "none",
1662
+ stroke: h,
1663
+ strokeWidth: D + (a ? 0 : 1),
1664
+ d: T
1665
+ }), /* @__PURE__ */ re("path", {
1666
+ stroke: D && !a ? y.fill : "none",
1667
+ d: T
1668
+ }), /* @__PURE__ */ re("clipPath", {
1669
+ id: R,
1670
+ children: /* @__PURE__ */ re("rect", {
1671
+ x: -j,
1672
+ y: j * ($ ? -1 : 1),
1673
+ width: c + D,
1674
+ height: c
1675
+ })
1676
+ })]
1677
+ });
1678
+ });
1679
+ function Oo() {
1680
+ const e = /* @__PURE__ */ new Map();
1681
+ return {
1682
+ emit(t, n) {
1683
+ var r;
1684
+ (r = e.get(t)) == null || r.forEach((o) => o(n));
1685
+ },
1686
+ on(t, n) {
1687
+ e.has(t) || e.set(t, /* @__PURE__ */ new Set()), e.get(t).add(n);
1688
+ },
1689
+ off(t, n) {
1690
+ var r;
1691
+ (r = e.get(t)) == null || r.delete(n);
1692
+ }
1693
+ };
1694
+ }
1695
+ const Mo = /* @__PURE__ */ f.createContext(null), Po = /* @__PURE__ */ f.createContext(null), Vt = () => {
1696
+ var e;
1697
+ return ((e = f.useContext(Mo)) == null ? void 0 : e.id) || null;
1698
+ }, at = () => f.useContext(Po);
1699
+ function Oe(e) {
1700
+ return "data-floating-ui-" + e;
1701
+ }
1702
+ function ne(e) {
1703
+ e.current !== -1 && (clearTimeout(e.current), e.current = -1);
1704
+ }
1705
+ const cn = /* @__PURE__ */ Oe("safe-polygon");
1706
+ function bt(e, t, n) {
1707
+ if (n && !Ne(n))
1708
+ return 0;
1709
+ if (typeof e == "number")
1710
+ return e;
1711
+ if (typeof e == "function") {
1712
+ const r = e();
1713
+ return typeof r == "number" ? r : r?.[t];
1714
+ }
1715
+ return e?.[t];
1716
+ }
1717
+ function yt(e) {
1718
+ return typeof e == "function" ? e() : e;
1719
+ }
1720
+ function ni(e, t) {
1721
+ t === void 0 && (t = {});
1722
+ const {
1723
+ open: n,
1724
+ onOpenChange: r,
1725
+ dataRef: o,
1726
+ events: i,
1727
+ elements: s
1728
+ } = e, {
1729
+ enabled: c = !0,
1730
+ delay: l = 0,
1731
+ handleClose: u = null,
1732
+ mouseOnly: d = !1,
1733
+ restMs: g = 0,
1734
+ move: h = !0
1735
+ } = t, a = at(), p = Vt(), m = Te(u), y = Te(l), R = Te(n), b = Te(g), w = f.useRef(), S = f.useRef(-1), A = f.useRef(), I = f.useRef(-1), M = f.useRef(!0), D = f.useRef(!1), j = f.useRef(() => {
1736
+ }), W = f.useRef(!1), B = Q(() => {
1737
+ var T;
1738
+ const v = (T = o.current.openEvent) == null ? void 0 : T.type;
1739
+ return v?.includes("mouse") && v !== "mousedown";
1740
+ });
1741
+ f.useEffect(() => {
1742
+ if (!c) return;
1743
+ function T(v) {
1744
+ let {
1745
+ open: C
1746
+ } = v;
1747
+ C || (ne(S), ne(I), M.current = !0, W.current = !1);
1748
+ }
1749
+ return i.on("openchange", T), () => {
1750
+ i.off("openchange", T);
1751
+ };
1752
+ }, [c, i]), f.useEffect(() => {
1753
+ if (!c || !m.current || !n) return;
1754
+ function T(C) {
1755
+ B() && r(!1, C, "hover");
1756
+ }
1757
+ const v = J(s.floating).documentElement;
1758
+ return v.addEventListener("mouseleave", T), () => {
1759
+ v.removeEventListener("mouseleave", T);
1760
+ };
1761
+ }, [s.floating, n, r, c, m, B]);
1762
+ const $ = f.useCallback(function(T, v, C) {
1763
+ v === void 0 && (v = !0), C === void 0 && (C = "hover");
1764
+ const L = bt(y.current, "close", w.current);
1765
+ L && !A.current ? (ne(S), S.current = window.setTimeout(() => r(!1, T, C), L)) : v && (ne(S), r(!1, T, C));
1766
+ }, [y, r]), V = Q(() => {
1767
+ j.current(), A.current = void 0;
1768
+ }), x = Q(() => {
1769
+ if (D.current) {
1770
+ const T = J(s.floating).body;
1771
+ T.style.pointerEvents = "", T.removeAttribute(cn), D.current = !1;
1772
+ }
1773
+ }), E = Q(() => o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1);
1774
+ f.useEffect(() => {
1775
+ if (!c) return;
1776
+ function T(F) {
1777
+ if (ne(S), M.current = !1, d && !Ne(w.current) || yt(b.current) > 0 && !bt(y.current, "open"))
1778
+ return;
1779
+ const O = bt(y.current, "open", w.current);
1780
+ O ? S.current = window.setTimeout(() => {
1781
+ R.current || r(!0, F, "hover");
1782
+ }, O) : n || r(!0, F, "hover");
1783
+ }
1784
+ function v(F) {
1785
+ if (E()) {
1786
+ x();
1787
+ return;
1788
+ }
1789
+ j.current();
1790
+ const O = J(s.floating);
1791
+ if (ne(I), W.current = !1, m.current && o.current.floatingContext) {
1792
+ n || ne(S), A.current = m.current({
1793
+ ...o.current.floatingContext,
1794
+ tree: a,
1795
+ x: F.clientX,
1796
+ y: F.clientY,
1797
+ onClose() {
1798
+ x(), V(), E() || $(F, !0, "safe-polygon");
1799
+ }
1800
+ });
1801
+ const q = A.current;
1802
+ O.addEventListener("mousemove", q), j.current = () => {
1803
+ O.removeEventListener("mousemove", q);
1804
+ };
1805
+ return;
1806
+ }
1807
+ (w.current !== "touch" || !Z(s.floating, F.relatedTarget)) && $(F);
1808
+ }
1809
+ function C(F) {
1810
+ E() || o.current.floatingContext && (m.current == null || m.current({
1811
+ ...o.current.floatingContext,
1812
+ tree: a,
1813
+ x: F.clientX,
1814
+ y: F.clientY,
1815
+ onClose() {
1816
+ x(), V(), E() || $(F);
1817
+ }
1818
+ })(F));
1819
+ }
1820
+ function L() {
1821
+ ne(S);
1822
+ }
1823
+ function Y(F) {
1824
+ E() || $(F, !1);
1825
+ }
1826
+ if (K(s.domReference)) {
1827
+ const F = s.domReference, O = s.floating;
1828
+ return n && F.addEventListener("mouseleave", C), h && F.addEventListener("mousemove", T, {
1829
+ once: !0
1830
+ }), F.addEventListener("mouseenter", T), F.addEventListener("mouseleave", v), O && (O.addEventListener("mouseleave", C), O.addEventListener("mouseenter", L), O.addEventListener("mouseleave", Y)), () => {
1831
+ n && F.removeEventListener("mouseleave", C), h && F.removeEventListener("mousemove", T), F.removeEventListener("mouseenter", T), F.removeEventListener("mouseleave", v), O && (O.removeEventListener("mouseleave", C), O.removeEventListener("mouseenter", L), O.removeEventListener("mouseleave", Y));
1832
+ };
1833
+ }
1834
+ }, [s, c, e, d, h, $, V, x, r, n, R, a, y, m, o, E, b]), G(() => {
1835
+ var T;
1836
+ if (c && n && (T = m.current) != null && (T = T.__options) != null && T.blockPointerEvents && B()) {
1837
+ D.current = !0;
1838
+ const C = s.floating;
1839
+ if (K(s.domReference) && C) {
1840
+ var v;
1841
+ const L = J(s.floating).body;
1842
+ L.setAttribute(cn, "");
1843
+ const Y = s.domReference, F = a == null || (v = a.nodesRef.current.find((O) => O.id === p)) == null || (v = v.context) == null ? void 0 : v.elements.floating;
1844
+ return F && (F.style.pointerEvents = ""), L.style.pointerEvents = "none", Y.style.pointerEvents = "auto", C.style.pointerEvents = "auto", () => {
1845
+ L.style.pointerEvents = "", Y.style.pointerEvents = "", C.style.pointerEvents = "";
1846
+ };
1847
+ }
1848
+ }
1849
+ }, [c, n, p, s, a, m, B]), G(() => {
1850
+ n || (w.current = void 0, W.current = !1, V(), x());
1851
+ }, [n, V, x]), f.useEffect(() => () => {
1852
+ V(), ne(S), ne(I), x();
1853
+ }, [c, s.domReference, V, x]);
1854
+ const P = f.useMemo(() => {
1855
+ function T(v) {
1856
+ w.current = v.pointerType;
1857
+ }
1858
+ return {
1859
+ onPointerDown: T,
1860
+ onPointerEnter: T,
1861
+ onMouseMove(v) {
1862
+ const {
1863
+ nativeEvent: C
1864
+ } = v;
1865
+ function L() {
1866
+ !M.current && !R.current && r(!0, C, "hover");
1867
+ }
1868
+ d && !Ne(w.current) || n || yt(b.current) === 0 || W.current && v.movementX ** 2 + v.movementY ** 2 < 2 || (ne(I), w.current === "touch" ? L() : (W.current = !0, I.current = window.setTimeout(L, yt(b.current))));
1869
+ }
1870
+ };
1871
+ }, [d, r, n, R, b]);
1872
+ return f.useMemo(() => c ? {
1873
+ reference: P
1874
+ } : {}, [c, P]);
1875
+ }
1876
+ let ln = 0;
1877
+ function Me(e, t) {
1878
+ t === void 0 && (t = {});
1879
+ const {
1880
+ preventScroll: n = !1,
1881
+ cancelPrevious: r = !0,
1882
+ sync: o = !1
1883
+ } = t;
1884
+ r && cancelAnimationFrame(ln);
1885
+ const i = () => e?.focus({
1886
+ preventScroll: n
1887
+ });
1888
+ o ? i() : ln = requestAnimationFrame(i);
1889
+ }
1890
+ function Lo(e) {
1891
+ return e?.ownerDocument || document;
1892
+ }
1893
+ const Ie = {
1894
+ inert: /* @__PURE__ */ new WeakMap(),
1895
+ "aria-hidden": /* @__PURE__ */ new WeakMap(),
1896
+ none: /* @__PURE__ */ new WeakMap()
1897
+ };
1898
+ function un(e) {
1899
+ return e === "inert" ? Ie.inert : e === "aria-hidden" ? Ie["aria-hidden"] : Ie.none;
1900
+ }
1901
+ let qe = /* @__PURE__ */ new WeakSet(), Xe = {}, wt = 0;
1902
+ const Io = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, qn = (e) => e && (e.host || qn(e.parentNode)), ko = (e, t) => t.map((n) => {
1903
+ if (e.contains(n))
1904
+ return n;
1905
+ const r = qn(n);
1906
+ return e.contains(r) ? r : null;
1907
+ }).filter((n) => n != null);
1908
+ function Do(e, t, n, r) {
1909
+ const o = "data-floating-ui-inert", i = r ? "inert" : n ? "aria-hidden" : null, s = ko(t, e), c = /* @__PURE__ */ new Set(), l = new Set(s), u = [];
1910
+ Xe[o] || (Xe[o] = /* @__PURE__ */ new WeakMap());
1911
+ const d = Xe[o];
1912
+ s.forEach(g), h(t), c.clear();
1913
+ function g(a) {
1914
+ !a || c.has(a) || (c.add(a), a.parentNode && g(a.parentNode));
1915
+ }
1916
+ function h(a) {
1917
+ !a || l.has(a) || [].forEach.call(a.children, (p) => {
1918
+ if (xe(p) !== "script")
1919
+ if (c.has(p))
1920
+ h(p);
1921
+ else {
1922
+ const m = i ? p.getAttribute(i) : null, y = m !== null && m !== "false", R = un(i), b = (R.get(p) || 0) + 1, w = (d.get(p) || 0) + 1;
1923
+ R.set(p, b), d.set(p, w), u.push(p), b === 1 && y && qe.add(p), w === 1 && p.setAttribute(o, ""), !y && i && p.setAttribute(i, i === "inert" ? "" : "true");
1924
+ }
1925
+ });
1926
+ }
1927
+ return wt++, () => {
1928
+ u.forEach((a) => {
1929
+ const p = un(i), y = (p.get(a) || 0) - 1, R = (d.get(a) || 0) - 1;
1930
+ p.set(a, y), d.set(a, R), y || (!qe.has(a) && i && a.removeAttribute(i), qe.delete(a)), R || a.removeAttribute(o);
1931
+ }), wt--, wt || (Ie.inert = /* @__PURE__ */ new WeakMap(), Ie["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Ie.none = /* @__PURE__ */ new WeakMap(), qe = /* @__PURE__ */ new WeakSet(), Xe = {});
1932
+ };
1933
+ }
1934
+ function an(e, t, n) {
1935
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
1936
+ const r = Lo(e[0]).body;
1937
+ return Do(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))), r, t, n);
1938
+ }
1939
+ const ft = {
1940
+ border: 0,
1941
+ clip: "rect(0 0 0 0)",
1942
+ height: "1px",
1943
+ margin: "-1px",
1944
+ overflow: "hidden",
1945
+ padding: 0,
1946
+ position: "fixed",
1947
+ whiteSpace: "nowrap",
1948
+ width: "1px",
1949
+ top: 0,
1950
+ left: 0
1951
+ }, nt = /* @__PURE__ */ f.forwardRef(function(t, n) {
1952
+ const [r, o] = f.useState();
1953
+ G(() => {
1954
+ In() && o("button");
1955
+ }, []);
1956
+ const i = {
1957
+ ref: n,
1958
+ tabIndex: 0,
1959
+ // Role is only for VoiceOver
1960
+ role: r,
1961
+ "aria-hidden": r ? void 0 : !0,
1962
+ [Oe("focus-guard")]: "",
1963
+ style: ft
1964
+ };
1965
+ return /* @__PURE__ */ re("span", {
1966
+ ...t,
1967
+ ...i
1968
+ });
1969
+ }), Xn = /* @__PURE__ */ f.createContext(null), fn = /* @__PURE__ */ Oe("portal");
1970
+ function Fo(e) {
1971
+ e === void 0 && (e = {});
1972
+ const {
1973
+ id: t,
1974
+ root: n
1975
+ } = e, r = ut(), o = Un(), [i, s] = f.useState(null), c = f.useRef(null);
1976
+ return G(() => () => {
1977
+ i?.remove(), queueMicrotask(() => {
1978
+ c.current = null;
1979
+ });
1980
+ }, [i]), G(() => {
1981
+ if (!r || c.current) return;
1982
+ const l = t ? document.getElementById(t) : null;
1983
+ if (!l) return;
1984
+ const u = document.createElement("div");
1985
+ u.id = r, u.setAttribute(fn, ""), l.appendChild(u), c.current = u, s(u);
1986
+ }, [t, r]), G(() => {
1987
+ if (n === null || !r || c.current) return;
1988
+ let l = n || o?.portalNode;
1989
+ l && !kt(l) && (l = l.current), l = l || document.body;
1990
+ let u = null;
1991
+ t && (u = document.createElement("div"), u.id = t, l.appendChild(u));
1992
+ const d = document.createElement("div");
1993
+ d.id = r, d.setAttribute(fn, ""), l = u || l, l.appendChild(d), c.current = d, s(d);
1994
+ }, [t, n, r, o]), i;
1995
+ }
1996
+ function ri(e) {
1997
+ const {
1998
+ children: t,
1999
+ id: n,
2000
+ root: r,
2001
+ preserveTabOrder: o = !0
2002
+ } = e, i = Fo({
2003
+ id: n,
2004
+ root: r
2005
+ }), [s, c] = f.useState(null), l = f.useRef(null), u = f.useRef(null), d = f.useRef(null), g = f.useRef(null), h = s?.modal, a = s?.open, p = (
2006
+ // The FocusManager and therefore floating element are currently open/
2007
+ // rendered.
2008
+ !!s && // Guards are only for non-modal focus management.
2009
+ !s.modal && // Don't render if unmount is transitioning.
2010
+ s.open && o && !!(r || i)
2011
+ );
2012
+ return f.useEffect(() => {
2013
+ if (!i || !o || h)
2014
+ return;
2015
+ function m(y) {
2016
+ i && Fe(y) && (y.type === "focusin" ? zt : Hr)(i);
2017
+ }
2018
+ return i.addEventListener("focusin", m, !0), i.addEventListener("focusout", m, !0), () => {
2019
+ i.removeEventListener("focusin", m, !0), i.removeEventListener("focusout", m, !0);
2020
+ };
2021
+ }, [i, o, h]), f.useEffect(() => {
2022
+ i && (a || zt(i));
2023
+ }, [a, i]), /* @__PURE__ */ Lt(Xn.Provider, {
2024
+ value: f.useMemo(() => ({
2025
+ preserveTabOrder: o,
2026
+ beforeOutsideRef: l,
2027
+ afterOutsideRef: u,
2028
+ beforeInsideRef: d,
2029
+ afterInsideRef: g,
2030
+ portalNode: i,
2031
+ setFocusManagerState: c
2032
+ }), [o, i]),
2033
+ children: [p && i && /* @__PURE__ */ re(nt, {
2034
+ "data-type": "outside",
2035
+ ref: l,
2036
+ onFocus: (m) => {
2037
+ if (Fe(m, i)) {
2038
+ var y;
2039
+ (y = d.current) == null || y.focus();
2040
+ } else {
2041
+ const R = s ? s.domReference : null, b = Nn(R);
2042
+ b?.focus();
2043
+ }
2044
+ }
2045
+ }), p && i && /* @__PURE__ */ re("span", {
2046
+ "aria-owns": i.id,
2047
+ style: ft
2048
+ }), i && /* @__PURE__ */ It.createPortal(t, i), p && i && /* @__PURE__ */ re(nt, {
2049
+ "data-type": "outside",
2050
+ ref: u,
2051
+ onFocus: (m) => {
2052
+ if (Fe(m, i)) {
2053
+ var y;
2054
+ (y = g.current) == null || y.focus();
2055
+ } else {
2056
+ const R = s ? s.domReference : null, b = Fn(R);
2057
+ b?.focus(), s?.closeOnFocusOut && s?.onOpenChange(!1, m.nativeEvent, "focus-out");
2058
+ }
2059
+ }
2060
+ })]
2061
+ });
2062
+ }
2063
+ const Un = () => f.useContext(Xn);
2064
+ function dn(e) {
2065
+ return f.useMemo(() => (t) => {
2066
+ e.forEach((n) => {
2067
+ n && (n.current = t);
2068
+ });
2069
+ }, e);
2070
+ }
2071
+ const No = 20;
2072
+ let we = [];
2073
+ function _t() {
2074
+ we = we.filter((e) => e.isConnected);
2075
+ }
2076
+ function Bo(e) {
2077
+ _t(), e && xe(e) !== "body" && (we.push(e), we.length > No && (we = we.slice(-20)));
2078
+ }
2079
+ function mn() {
2080
+ return _t(), we[we.length - 1];
2081
+ }
2082
+ function Wo(e) {
2083
+ const t = _e();
2084
+ return Pn(e, t) ? e : ct(e, t)[0] || e;
2085
+ }
2086
+ function gn(e, t) {
2087
+ var n;
2088
+ if (!t.current.includes("floating") && !((n = e.getAttribute("role")) != null && n.includes("dialog")))
2089
+ return;
2090
+ const r = _e(), i = Mr(e, r).filter((c) => {
2091
+ const l = c.getAttribute("data-tabindex") || "";
2092
+ return Pn(c, r) || c.hasAttribute("data-tabindex") && !l.startsWith("-");
2093
+ }), s = e.getAttribute("tabindex");
2094
+ t.current.includes("floating") || i.length === 0 ? s !== "0" && e.setAttribute("tabindex", "0") : (s !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
2095
+ }
2096
+ const $o = /* @__PURE__ */ f.forwardRef(function(t, n) {
2097
+ return /* @__PURE__ */ re("button", {
2098
+ ...t,
2099
+ type: "button",
2100
+ ref: n,
2101
+ tabIndex: -1,
2102
+ style: ft
2103
+ });
2104
+ });
2105
+ function oi(e) {
2106
+ const {
2107
+ context: t,
2108
+ children: n,
2109
+ disabled: r = !1,
2110
+ order: o = ["content"],
2111
+ guards: i = !0,
2112
+ initialFocus: s = 0,
2113
+ returnFocus: c = !0,
2114
+ restoreFocus: l = !1,
2115
+ modal: u = !0,
2116
+ visuallyHiddenDismiss: d = !1,
2117
+ closeOnFocusOut: g = !0,
2118
+ outsideElementsInert: h = !1,
2119
+ getInsideElements: a = () => []
2120
+ } = e, {
2121
+ open: p,
2122
+ onOpenChange: m,
2123
+ events: y,
2124
+ dataRef: R,
2125
+ elements: {
2126
+ domReference: b,
2127
+ floating: w
2128
+ }
2129
+ } = t, S = Q(() => {
2130
+ var k;
2131
+ return (k = R.current.floatingContext) == null ? void 0 : k.nodeId;
2132
+ }), A = Q(a), I = typeof s == "number" && s < 0, M = Ut(b) && I, D = Io(), j = D ? i : !0, W = !j || D && h, B = Te(o), $ = Te(s), V = Te(c), x = at(), E = Un(), P = f.useRef(null), T = f.useRef(null), v = f.useRef(!1), C = f.useRef(!1), L = f.useRef(-1), Y = f.useRef(-1), F = E != null, O = Pt(w), ce = Q(function(k) {
2133
+ return k === void 0 && (k = O), k ? ct(k, _e()) : [];
2134
+ }), q = Q((k) => {
2135
+ const _ = ce(k);
2136
+ return B.current.map((N) => b && N === "reference" ? b : O && N === "floating" ? O : _).filter(Boolean).flat();
2137
+ });
2138
+ f.useEffect(() => {
2139
+ if (r || !u) return;
2140
+ function k(N) {
2141
+ if (N.key === "Tab") {
2142
+ Z(O, be(J(O))) && ce().length === 0 && !M && pt(N);
2143
+ const X = q(), z = de(N);
2144
+ B.current[0] === "reference" && z === b && (pt(N), N.shiftKey ? Me(X[X.length - 1]) : Me(X[1])), B.current[1] === "floating" && z === O && N.shiftKey && (pt(N), Me(X[0]));
2145
+ }
2146
+ }
2147
+ const _ = J(O);
2148
+ return _.addEventListener("keydown", k), () => {
2149
+ _.removeEventListener("keydown", k);
2150
+ };
2151
+ }, [r, b, O, u, B, M, ce, q]), f.useEffect(() => {
2152
+ if (r || !w) return;
2153
+ function k(_) {
2154
+ const N = de(_), z = ce().indexOf(N);
2155
+ z !== -1 && (L.current = z);
2156
+ }
2157
+ return w.addEventListener("focusin", k), () => {
2158
+ w.removeEventListener("focusin", k);
2159
+ };
2160
+ }, [r, w, ce]), f.useEffect(() => {
2161
+ if (r || !g) return;
2162
+ function k() {
2163
+ C.current = !0, setTimeout(() => {
2164
+ C.current = !1;
2165
+ });
2166
+ }
2167
+ function _(z) {
2168
+ const H = z.relatedTarget, ae = z.currentTarget, se = de(z);
2169
+ queueMicrotask(() => {
2170
+ const te = S(), Ee = !(Z(b, H) || Z(w, H) || Z(H, w) || Z(E?.portalNode, H) || H != null && H.hasAttribute(Oe("focus-guard")) || x && (Pe(x.nodesRef.current, te).find((ve) => {
2171
+ var fe, he;
2172
+ return Z((fe = ve.context) == null ? void 0 : fe.elements.floating, H) || Z((he = ve.context) == null ? void 0 : he.elements.domReference, H);
2173
+ }) || Yt(x.nodesRef.current, te).find((ve) => {
2174
+ var fe, he, Ht;
2175
+ return [(fe = ve.context) == null ? void 0 : fe.elements.floating, Pt((he = ve.context) == null ? void 0 : he.elements.floating)].includes(H) || ((Ht = ve.context) == null ? void 0 : Ht.elements.domReference) === H;
2176
+ })));
2177
+ if (ae === b && O && gn(O, B), l && ae !== b && !(se != null && se.isConnected) && be(J(O)) === J(O).body) {
2178
+ U(O) && O.focus();
2179
+ const ve = L.current, fe = ce(), he = fe[ve] || fe[fe.length - 1] || O;
2180
+ U(he) && he.focus();
2181
+ }
2182
+ if (R.current.insideReactTree) {
2183
+ R.current.insideReactTree = !1;
2184
+ return;
2185
+ }
2186
+ (M || !u) && H && Ee && !C.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
2187
+ H !== mn() && (v.current = !0, m(!1, z, "focus-out"));
2188
+ });
2189
+ }
2190
+ const N = !!(!x && E);
2191
+ function X() {
2192
+ ne(Y), R.current.insideReactTree = !0, Y.current = window.setTimeout(() => {
2193
+ R.current.insideReactTree = !1;
2194
+ });
2195
+ }
2196
+ if (w && U(b))
2197
+ return b.addEventListener("focusout", _), b.addEventListener("pointerdown", k), w.addEventListener("focusout", _), N && w.addEventListener("focusout", X, !0), () => {
2198
+ b.removeEventListener("focusout", _), b.removeEventListener("pointerdown", k), w.removeEventListener("focusout", _), N && w.removeEventListener("focusout", X, !0);
2199
+ };
2200
+ }, [r, b, w, O, u, x, E, m, g, l, ce, M, S, B, R]);
2201
+ const ie = f.useRef(null), pe = f.useRef(null), dt = dn([ie, E?.beforeInsideRef]), mt = dn([pe, E?.afterInsideRef]);
2202
+ f.useEffect(() => {
2203
+ var k, _;
2204
+ if (r || !w) return;
2205
+ const N = Array.from((E == null || (k = E.portalNode) == null ? void 0 : k.querySelectorAll("[" + Oe("portal") + "]")) || []), z = (_ = (x ? Yt(x.nodesRef.current, S()) : []).find((se) => {
2206
+ var te;
2207
+ return Ut(((te = se.context) == null ? void 0 : te.elements.domReference) || null);
2208
+ })) == null || (_ = _.context) == null ? void 0 : _.elements.domReference, H = [w, z, ...N, ...A(), P.current, T.current, ie.current, pe.current, E?.beforeOutsideRef.current, E?.afterOutsideRef.current, B.current.includes("reference") || M ? b : null].filter((se) => se != null), ae = u || M ? an(H, !W, W) : an(H);
2209
+ return () => {
2210
+ ae();
2211
+ };
2212
+ }, [r, b, w, u, B, E, M, j, W, x, S, A]), G(() => {
2213
+ if (r || !U(O)) return;
2214
+ const k = J(O), _ = be(k);
2215
+ queueMicrotask(() => {
2216
+ const N = q(O), X = $.current, z = (typeof X == "number" ? N[X] : X.current) || O, H = Z(O, _);
2217
+ !I && !H && p && Me(z, {
2218
+ preventScroll: z === O
2219
+ });
2220
+ });
2221
+ }, [r, p, O, I, q, $]), G(() => {
2222
+ if (r || !O) return;
2223
+ const k = J(O), _ = be(k);
2224
+ Bo(_);
2225
+ function N(H) {
2226
+ let {
2227
+ reason: ae,
2228
+ event: se,
2229
+ nested: te
2230
+ } = H;
2231
+ if (["hover", "safe-polygon"].includes(ae) && se.type === "mouseleave" && (v.current = !0), ae === "outside-press")
2232
+ if (te)
2233
+ v.current = !1;
2234
+ else if (Fr(se) || Nr(se))
2235
+ v.current = !1;
2236
+ else {
2237
+ let Ee = !1;
2238
+ document.createElement("div").focus({
2239
+ get preventScroll() {
2240
+ return Ee = !0, !1;
2241
+ }
2242
+ }), Ee ? v.current = !1 : v.current = !0;
2243
+ }
2244
+ }
2245
+ y.on("openchange", N);
2246
+ const X = k.createElement("span");
2247
+ X.setAttribute("tabindex", "-1"), X.setAttribute("aria-hidden", "true"), Object.assign(X.style, ft), F && b && b.insertAdjacentElement("afterend", X);
2248
+ function z() {
2249
+ if (typeof V.current == "boolean") {
2250
+ const H = b || mn();
2251
+ return H && H.isConnected ? H : X;
2252
+ }
2253
+ return V.current.current || X;
2254
+ }
2255
+ return () => {
2256
+ y.off("openchange", N);
2257
+ const H = be(k), ae = Z(w, H) || x && Pe(x.nodesRef.current, S(), !1).some((te) => {
2258
+ var Ee;
2259
+ return Z((Ee = te.context) == null ? void 0 : Ee.elements.floating, H);
2260
+ }), se = z();
2261
+ queueMicrotask(() => {
2262
+ const te = Wo(se);
2263
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2264
+ V.current && !v.current && U(te) && // If the focus moved somewhere else after mount, avoid returning focus
2265
+ // since it likely entered a different element which should be
2266
+ // respected: https://github.com/floating-ui/floating-ui/issues/2607
2267
+ (!(te !== H && H !== k.body) || ae) && te.focus({
2268
+ preventScroll: !0
2269
+ }), X.remove();
2270
+ });
2271
+ };
2272
+ }, [r, w, O, V, R, y, x, F, b, S]), f.useEffect(() => (queueMicrotask(() => {
2273
+ v.current = !1;
2274
+ }), () => {
2275
+ queueMicrotask(_t);
2276
+ }), [r]), G(() => {
2277
+ if (!r && E)
2278
+ return E.setFocusManagerState({
2279
+ modal: u,
2280
+ closeOnFocusOut: g,
2281
+ open: p,
2282
+ onOpenChange: m,
2283
+ domReference: b
2284
+ }), () => {
2285
+ E.setFocusManagerState(null);
2286
+ };
2287
+ }, [r, E, u, p, m, g, b]), G(() => {
2288
+ r || O && gn(O, B);
2289
+ }, [r, O, B]);
2290
+ function He(k) {
2291
+ return r || !d || !u ? null : /* @__PURE__ */ re($o, {
2292
+ ref: k === "start" ? P : T,
2293
+ onClick: (_) => m(!1, _.nativeEvent),
2294
+ children: typeof d == "string" ? d : "Dismiss"
2295
+ });
2296
+ }
2297
+ const Ke = !r && j && (u ? !M : !0) && (F || u);
2298
+ return /* @__PURE__ */ Lt(Yn, {
2299
+ children: [Ke && /* @__PURE__ */ re(nt, {
2300
+ "data-type": "inside",
2301
+ ref: dt,
2302
+ onFocus: (k) => {
2303
+ if (u) {
2304
+ const N = q();
2305
+ Me(o[0] === "reference" ? N[0] : N[N.length - 1]);
2306
+ } else if (E != null && E.preserveTabOrder && E.portalNode)
2307
+ if (v.current = !1, Fe(k, E.portalNode)) {
2308
+ const N = Fn(b);
2309
+ N?.focus();
2310
+ } else {
2311
+ var _;
2312
+ (_ = E.beforeOutsideRef.current) == null || _.focus();
2313
+ }
2314
+ }
2315
+ }), !M && He("start"), n, He("end"), Ke && /* @__PURE__ */ re(nt, {
2316
+ "data-type": "inside",
2317
+ ref: mt,
2318
+ onFocus: (k) => {
2319
+ if (u)
2320
+ Me(q()[0]);
2321
+ else if (E != null && E.preserveTabOrder && E.portalNode)
2322
+ if (g && (v.current = !0), Fe(k, E.portalNode)) {
2323
+ const N = Nn(b);
2324
+ N?.focus();
2325
+ } else {
2326
+ var _;
2327
+ (_ = E.afterOutsideRef.current) == null || _.focus();
2328
+ }
2329
+ }
2330
+ })]
2331
+ });
2332
+ }
2333
+ let Ue = 0;
2334
+ const pn = "--floating-ui-scrollbar-width";
2335
+ function Vo() {
2336
+ const e = Bt(), t = /iP(hone|ad|od)|iOS/.test(e) || // iPads can claim to be MacIntel
2337
+ e === "MacIntel" && navigator.maxTouchPoints > 1, n = document.body.style, o = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft ? "paddingLeft" : "paddingRight", i = window.innerWidth - document.documentElement.clientWidth, s = n.left ? parseFloat(n.left) : window.scrollX, c = n.top ? parseFloat(n.top) : window.scrollY;
2338
+ if (n.overflow = "hidden", n.setProperty(pn, i + "px"), i && (n[o] = i + "px"), t) {
2339
+ var l, u;
2340
+ const d = ((l = window.visualViewport) == null ? void 0 : l.offsetLeft) || 0, g = ((u = window.visualViewport) == null ? void 0 : u.offsetTop) || 0;
2341
+ Object.assign(n, {
2342
+ position: "fixed",
2343
+ top: -(c - Math.floor(g)) + "px",
2344
+ left: -(s - Math.floor(d)) + "px",
2345
+ right: "0"
2346
+ });
2347
+ }
2348
+ return () => {
2349
+ Object.assign(n, {
2350
+ overflow: "",
2351
+ [o]: ""
2352
+ }), n.removeProperty(pn), t && (Object.assign(n, {
2353
+ position: "",
2354
+ top: "",
2355
+ left: "",
2356
+ right: ""
2357
+ }), window.scrollTo(s, c));
2358
+ };
2359
+ }
2360
+ let vn = () => {
2361
+ };
2362
+ const ii = /* @__PURE__ */ f.forwardRef(function(t, n) {
2363
+ const {
2364
+ lockScroll: r = !1,
2365
+ ...o
2366
+ } = t;
2367
+ return G(() => {
2368
+ if (r)
2369
+ return Ue++, Ue === 1 && (vn = Vo()), () => {
2370
+ Ue--, Ue === 0 && vn();
2371
+ };
2372
+ }, [r]), /* @__PURE__ */ re("div", {
2373
+ ref: n,
2374
+ ...o,
2375
+ style: {
2376
+ position: "fixed",
2377
+ overflow: "auto",
2378
+ top: 0,
2379
+ right: 0,
2380
+ bottom: 0,
2381
+ left: 0,
2382
+ ...o.style
2383
+ }
2384
+ });
2385
+ });
2386
+ function hn(e) {
2387
+ return U(e.target) && e.target.tagName === "BUTTON";
2388
+ }
2389
+ function _o(e) {
2390
+ return U(e.target) && e.target.tagName === "A";
2391
+ }
2392
+ function bn(e) {
2393
+ return Wt(e);
2394
+ }
2395
+ function si(e, t) {
2396
+ t === void 0 && (t = {});
2397
+ const {
2398
+ open: n,
2399
+ onOpenChange: r,
2400
+ dataRef: o,
2401
+ elements: {
2402
+ domReference: i
2403
+ }
2404
+ } = e, {
2405
+ enabled: s = !0,
2406
+ event: c = "click",
2407
+ toggle: l = !0,
2408
+ ignoreMouse: u = !1,
2409
+ keyboardHandlers: d = !0,
2410
+ stickIfOpen: g = !0
2411
+ } = t, h = f.useRef(), a = f.useRef(!1), p = f.useMemo(() => ({
2412
+ onPointerDown(m) {
2413
+ h.current = m.pointerType;
2414
+ },
2415
+ onMouseDown(m) {
2416
+ const y = h.current;
2417
+ m.button === 0 && c !== "click" && (Ne(y, !0) && u || (n && l && (!(o.current.openEvent && g) || o.current.openEvent.type === "mousedown") ? r(!1, m.nativeEvent, "click") : (m.preventDefault(), r(!0, m.nativeEvent, "click"))));
2418
+ },
2419
+ onClick(m) {
2420
+ const y = h.current;
2421
+ if (c === "mousedown" && h.current) {
2422
+ h.current = void 0;
2423
+ return;
2424
+ }
2425
+ Ne(y, !0) && u || (n && l && (!(o.current.openEvent && g) || o.current.openEvent.type === "click") ? r(!1, m.nativeEvent, "click") : r(!0, m.nativeEvent, "click"));
2426
+ },
2427
+ onKeyDown(m) {
2428
+ h.current = void 0, !(m.defaultPrevented || !d || hn(m)) && (m.key === " " && !bn(i) && (m.preventDefault(), a.current = !0), !_o(m) && m.key === "Enter" && r(!(n && l), m.nativeEvent, "click"));
2429
+ },
2430
+ onKeyUp(m) {
2431
+ m.defaultPrevented || !d || hn(m) || bn(i) || m.key === " " && a.current && (a.current = !1, r(!(n && l), m.nativeEvent, "click"));
2432
+ }
2433
+ }), [o, i, c, u, d, r, n, g, l]);
2434
+ return f.useMemo(() => s ? {
2435
+ reference: p
2436
+ } : {}, [s, p]);
2437
+ }
2438
+ const Ho = {
2439
+ pointerdown: "onPointerDown",
2440
+ mousedown: "onMouseDown",
2441
+ click: "onClick"
2442
+ }, Ko = {
2443
+ pointerdown: "onPointerDownCapture",
2444
+ mousedown: "onMouseDownCapture",
2445
+ click: "onClickCapture"
2446
+ }, yn = (e) => {
2447
+ var t, n;
2448
+ return {
2449
+ escapeKey: typeof e == "boolean" ? e : (t = e?.escapeKey) != null ? t : !1,
2450
+ outsidePress: typeof e == "boolean" ? e : (n = e?.outsidePress) != null ? n : !0
2451
+ };
2452
+ };
2453
+ function ci(e, t) {
2454
+ t === void 0 && (t = {});
2455
+ const {
2456
+ open: n,
2457
+ onOpenChange: r,
2458
+ elements: o,
2459
+ dataRef: i
2460
+ } = e, {
2461
+ enabled: s = !0,
2462
+ escapeKey: c = !0,
2463
+ outsidePress: l = !0,
2464
+ outsidePressEvent: u = "pointerdown",
2465
+ referencePress: d = !1,
2466
+ referencePressEvent: g = "pointerdown",
2467
+ ancestorScroll: h = !1,
2468
+ bubbles: a,
2469
+ capture: p
2470
+ } = t, m = at(), y = Q(typeof l == "function" ? l : () => !1), R = typeof l == "function" ? y : l, b = f.useRef(!1), {
2471
+ escapeKey: w,
2472
+ outsidePress: S
2473
+ } = yn(a), {
2474
+ escapeKey: A,
2475
+ outsidePress: I
2476
+ } = yn(p), M = f.useRef(!1), D = Q((x) => {
2477
+ var E;
2478
+ if (!n || !s || !c || x.key !== "Escape" || M.current)
2479
+ return;
2480
+ const P = (E = i.current.floatingContext) == null ? void 0 : E.nodeId, T = m ? Pe(m.nodesRef.current, P) : [];
2481
+ if (!w && (x.stopPropagation(), T.length > 0)) {
2482
+ let v = !0;
2483
+ if (T.forEach((C) => {
2484
+ var L;
2485
+ if ((L = C.context) != null && L.open && !C.context.dataRef.current.__escapeKeyBubbles) {
2486
+ v = !1;
2487
+ return;
2488
+ }
2489
+ }), !v)
2490
+ return;
2491
+ }
2492
+ r(!1, Dr(x) ? x.nativeEvent : x, "escape-key");
2493
+ }), j = Q((x) => {
2494
+ var E;
2495
+ const P = () => {
2496
+ var T;
2497
+ D(x), (T = de(x)) == null || T.removeEventListener("keydown", P);
2498
+ };
2499
+ (E = de(x)) == null || E.addEventListener("keydown", P);
2500
+ }), W = Q((x) => {
2501
+ var E;
2502
+ const P = i.current.insideReactTree;
2503
+ i.current.insideReactTree = !1;
2504
+ const T = b.current;
2505
+ if (b.current = !1, u === "click" && T || P || typeof R == "function" && !R(x))
2506
+ return;
2507
+ const v = de(x), C = "[" + Oe("inert") + "]", L = J(o.floating).querySelectorAll(C);
2508
+ let Y = K(v) ? v : null;
2509
+ for (; Y && !me(Y); ) {
2510
+ const q = ge(Y);
2511
+ if (me(q) || !K(q))
2512
+ break;
2513
+ Y = q;
2514
+ }
2515
+ if (L.length && K(v) && !Ir(v) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2516
+ !Z(v, o.floating) && // If the target root element contains none of the markers, then the
2517
+ // element was injected after the floating element rendered.
2518
+ Array.from(L).every((q) => !Z(Y, q)))
2519
+ return;
2520
+ if (U(v) && V) {
2521
+ const q = me(v), ie = oe(v), pe = /auto|scroll/, dt = q || pe.test(ie.overflowX), mt = q || pe.test(ie.overflowY), He = dt && v.clientWidth > 0 && v.scrollWidth > v.clientWidth, Ke = mt && v.clientHeight > 0 && v.scrollHeight > v.clientHeight, k = ie.direction === "rtl", _ = Ke && (k ? x.offsetX <= v.offsetWidth - v.clientWidth : x.offsetX > v.clientWidth), N = He && x.offsetY > v.clientHeight;
2522
+ if (_ || N)
2523
+ return;
2524
+ }
2525
+ const F = (E = i.current.floatingContext) == null ? void 0 : E.nodeId, O = m && Pe(m.nodesRef.current, F).some((q) => {
2526
+ var ie;
2527
+ return gt(x, (ie = q.context) == null ? void 0 : ie.elements.floating);
2528
+ });
2529
+ if (gt(x, o.floating) || gt(x, o.domReference) || O)
2530
+ return;
2531
+ const ce = m ? Pe(m.nodesRef.current, F) : [];
2532
+ if (ce.length > 0) {
2533
+ let q = !0;
2534
+ if (ce.forEach((ie) => {
2535
+ var pe;
2536
+ if ((pe = ie.context) != null && pe.open && !ie.context.dataRef.current.__outsidePressBubbles) {
2537
+ q = !1;
2538
+ return;
2539
+ }
2540
+ }), !q)
2541
+ return;
2542
+ }
2543
+ r(!1, x, "outside-press");
2544
+ }), B = Q((x) => {
2545
+ var E;
2546
+ const P = () => {
2547
+ var T;
2548
+ W(x), (T = de(x)) == null || T.removeEventListener(u, P);
2549
+ };
2550
+ (E = de(x)) == null || E.addEventListener(u, P);
2551
+ });
2552
+ f.useEffect(() => {
2553
+ if (!n || !s)
2554
+ return;
2555
+ i.current.__escapeKeyBubbles = w, i.current.__outsidePressBubbles = S;
2556
+ let x = -1;
2557
+ function E(L) {
2558
+ r(!1, L, "ancestor-scroll");
2559
+ }
2560
+ function P() {
2561
+ window.clearTimeout(x), M.current = !0;
2562
+ }
2563
+ function T() {
2564
+ x = window.setTimeout(
2565
+ () => {
2566
+ M.current = !1;
2567
+ },
2568
+ // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2569
+ // Only apply to WebKit for the test to remain 0ms.
2570
+ it() ? 5 : 0
2571
+ );
2572
+ }
2573
+ const v = J(o.floating);
2574
+ c && (v.addEventListener("keydown", A ? j : D, A), v.addEventListener("compositionstart", P), v.addEventListener("compositionend", T)), R && v.addEventListener(u, I ? B : W, I);
2575
+ let C = [];
2576
+ return h && (K(o.domReference) && (C = Re(o.domReference)), K(o.floating) && (C = C.concat(Re(o.floating))), !K(o.reference) && o.reference && o.reference.contextElement && (C = C.concat(Re(o.reference.contextElement)))), C = C.filter((L) => {
2577
+ var Y;
2578
+ return L !== ((Y = v.defaultView) == null ? void 0 : Y.visualViewport);
2579
+ }), C.forEach((L) => {
2580
+ L.addEventListener("scroll", E, {
2581
+ passive: !0
2582
+ });
2583
+ }), () => {
2584
+ c && (v.removeEventListener("keydown", A ? j : D, A), v.removeEventListener("compositionstart", P), v.removeEventListener("compositionend", T)), R && v.removeEventListener(u, I ? B : W, I), C.forEach((L) => {
2585
+ L.removeEventListener("scroll", E);
2586
+ }), window.clearTimeout(x);
2587
+ };
2588
+ }, [i, o, c, R, u, n, r, h, s, w, S, D, A, j, W, I, B]), f.useEffect(() => {
2589
+ i.current.insideReactTree = !1;
2590
+ }, [i, R, u]);
2591
+ const $ = f.useMemo(() => ({
2592
+ onKeyDown: D,
2593
+ ...d && {
2594
+ [Ho[g]]: (x) => {
2595
+ r(!1, x.nativeEvent, "reference-press");
2596
+ },
2597
+ ...g !== "click" && {
2598
+ onClick(x) {
2599
+ r(!1, x.nativeEvent, "reference-press");
2600
+ }
2601
+ }
2602
+ }
2603
+ }), [D, r, d, g]), V = f.useMemo(() => ({
2604
+ onKeyDown: D,
2605
+ onMouseDown() {
2606
+ b.current = !0;
2607
+ },
2608
+ onMouseUp() {
2609
+ b.current = !0;
2610
+ },
2611
+ [Ko[u]]: () => {
2612
+ i.current.insideReactTree = !0;
2613
+ }
2614
+ }), [D, u, i]);
2615
+ return f.useMemo(() => s ? {
2616
+ reference: $,
2617
+ floating: V
2618
+ } : {}, [s, $, V]);
2619
+ }
2620
+ function jo(e) {
2621
+ const {
2622
+ open: t = !1,
2623
+ onOpenChange: n,
2624
+ elements: r
2625
+ } = e, o = ut(), i = f.useRef({}), [s] = f.useState(() => Oo()), c = Vt() != null;
2626
+ if (process.env.NODE_ENV !== "production") {
2627
+ const a = r.reference;
2628
+ a && !K(a) && Ao("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2629
+ }
2630
+ const [l, u] = f.useState(r.reference), d = Q((a, p, m) => {
2631
+ i.current.openEvent = a ? p : void 0, s.emit("openchange", {
2632
+ open: a,
2633
+ event: p,
2634
+ reason: m,
2635
+ nested: c
2636
+ }), n?.(a, p, m);
2637
+ }), g = f.useMemo(() => ({
2638
+ setPositionReference: u
2639
+ }), []), h = f.useMemo(() => ({
2640
+ reference: l || r.reference || null,
2641
+ floating: r.floating || null,
2642
+ domReference: r.reference
2643
+ }), [l, r.reference, r.floating]);
2644
+ return f.useMemo(() => ({
2645
+ dataRef: i,
2646
+ open: t,
2647
+ onOpenChange: d,
2648
+ elements: h,
2649
+ events: s,
2650
+ floatingId: o,
2651
+ refs: g
2652
+ }), [t, d, h, s, o, g]);
2653
+ }
2654
+ function li(e) {
2655
+ e === void 0 && (e = {});
2656
+ const {
2657
+ nodeId: t
2658
+ } = e, n = jo({
2659
+ ...e,
2660
+ elements: {
2661
+ reference: null,
2662
+ floating: null,
2663
+ ...e.elements
2664
+ }
2665
+ }), r = e.rootContext || n, o = r.elements, [i, s] = f.useState(null), [c, l] = f.useState(null), d = o?.domReference || i, g = f.useRef(null), h = at();
2666
+ G(() => {
2667
+ d && (g.current = d);
2668
+ }, [d]);
2669
+ const a = yo({
2670
+ ...e,
2671
+ elements: {
2672
+ ...o,
2673
+ ...c && {
2674
+ reference: c
2675
+ }
2676
+ }
2677
+ }), p = f.useCallback((w) => {
2678
+ const S = K(w) ? {
2679
+ getBoundingClientRect: () => w.getBoundingClientRect(),
2680
+ getClientRects: () => w.getClientRects(),
2681
+ contextElement: w
2682
+ } : w;
2683
+ l(S), a.refs.setReference(S);
2684
+ }, [a.refs]), m = f.useCallback((w) => {
2685
+ (K(w) || w === null) && (g.current = w, s(w)), (K(a.refs.reference.current) || a.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2686
+ // `null` to support `positionReference` + an unstable `reference`
2687
+ // callback ref.
2688
+ w !== null && !K(w)) && a.refs.setReference(w);
2689
+ }, [a.refs]), y = f.useMemo(() => ({
2690
+ ...a.refs,
2691
+ setReference: m,
2692
+ setPositionReference: p,
2693
+ domReference: g
2694
+ }), [a.refs, m, p]), R = f.useMemo(() => ({
2695
+ ...a.elements,
2696
+ domReference: d
2697
+ }), [a.elements, d]), b = f.useMemo(() => ({
2698
+ ...a,
2699
+ ...r,
2700
+ refs: y,
2701
+ elements: R,
2702
+ nodeId: t
2703
+ }), [a, y, R, t, r]);
2704
+ return G(() => {
2705
+ r.dataRef.current.floatingContext = b;
2706
+ const w = h?.nodesRef.current.find((S) => S.id === t);
2707
+ w && (w.context = b);
2708
+ }), f.useMemo(() => ({
2709
+ ...a,
2710
+ context: b,
2711
+ refs: y,
2712
+ elements: R
2713
+ }), [a, y, R, b]);
2714
+ }
2715
+ function Rt() {
2716
+ return Pr() && In();
2717
+ }
2718
+ function ui(e, t) {
2719
+ t === void 0 && (t = {});
2720
+ const {
2721
+ open: n,
2722
+ onOpenChange: r,
2723
+ events: o,
2724
+ dataRef: i,
2725
+ elements: s
2726
+ } = e, {
2727
+ enabled: c = !0,
2728
+ visibleOnly: l = !0
2729
+ } = t, u = f.useRef(!1), d = f.useRef(-1), g = f.useRef(!0);
2730
+ f.useEffect(() => {
2731
+ if (!c) return;
2732
+ const a = ee(s.domReference);
2733
+ function p() {
2734
+ !n && U(s.domReference) && s.domReference === be(J(s.domReference)) && (u.current = !0);
2735
+ }
2736
+ function m() {
2737
+ g.current = !0;
2738
+ }
2739
+ function y() {
2740
+ g.current = !1;
2741
+ }
2742
+ return a.addEventListener("blur", p), Rt() && (a.addEventListener("keydown", m, !0), a.addEventListener("pointerdown", y, !0)), () => {
2743
+ a.removeEventListener("blur", p), Rt() && (a.removeEventListener("keydown", m, !0), a.removeEventListener("pointerdown", y, !0));
2744
+ };
2745
+ }, [s.domReference, n, c]), f.useEffect(() => {
2746
+ if (!c) return;
2747
+ function a(p) {
2748
+ let {
2749
+ reason: m
2750
+ } = p;
2751
+ (m === "reference-press" || m === "escape-key") && (u.current = !0);
2752
+ }
2753
+ return o.on("openchange", a), () => {
2754
+ o.off("openchange", a);
2755
+ };
2756
+ }, [o, c]), f.useEffect(() => () => {
2757
+ ne(d);
2758
+ }, []);
2759
+ const h = f.useMemo(() => ({
2760
+ onMouseLeave() {
2761
+ u.current = !1;
2762
+ },
2763
+ onFocus(a) {
2764
+ if (u.current) return;
2765
+ const p = de(a.nativeEvent);
2766
+ if (l && K(p)) {
2767
+ if (Rt() && !a.relatedTarget) {
2768
+ if (!g.current && !Wt(p))
2769
+ return;
2770
+ } else if (!kr(p))
2771
+ return;
2772
+ }
2773
+ r(!0, a.nativeEvent, "focus");
2774
+ },
2775
+ onBlur(a) {
2776
+ u.current = !1;
2777
+ const p = a.relatedTarget, m = a.nativeEvent, y = K(p) && p.hasAttribute(Oe("focus-guard")) && p.getAttribute("data-type") === "outside";
2778
+ d.current = window.setTimeout(() => {
2779
+ var R;
2780
+ const b = be(s.domReference ? s.domReference.ownerDocument : document);
2781
+ !p && b === s.domReference || Z((R = i.current.floatingContext) == null ? void 0 : R.refs.floating.current, b) || Z(s.domReference, b) || y || r(!1, m, "focus");
2782
+ });
2783
+ }
2784
+ }), [i, s.domReference, r, l]);
2785
+ return f.useMemo(() => c ? {
2786
+ reference: h
2787
+ } : {}, [c, h]);
2788
+ }
2789
+ function xt(e, t, n) {
2790
+ const r = /* @__PURE__ */ new Map(), o = n === "item";
2791
+ let i = e;
2792
+ if (o && e) {
2793
+ const {
2794
+ [nn]: s,
2795
+ [rn]: c,
2796
+ ...l
2797
+ } = e;
2798
+ i = l;
2799
+ }
2800
+ return {
2801
+ ...n === "floating" && {
2802
+ tabIndex: -1,
2803
+ [Ro]: ""
2804
+ },
2805
+ ...i,
2806
+ ...t.map((s) => {
2807
+ const c = s ? s[n] : null;
2808
+ return typeof c == "function" ? e ? c(e) : null : c;
2809
+ }).concat(e).reduce((s, c) => (c && Object.entries(c).forEach((l) => {
2810
+ let [u, d] = l;
2811
+ if (!(o && [nn, rn].includes(u)))
2812
+ if (u.indexOf("on") === 0) {
2813
+ if (r.has(u) || r.set(u, []), typeof d == "function") {
2814
+ var g;
2815
+ (g = r.get(u)) == null || g.push(d), s[u] = function() {
2816
+ for (var h, a = arguments.length, p = new Array(a), m = 0; m < a; m++)
2817
+ p[m] = arguments[m];
2818
+ return (h = r.get(u)) == null ? void 0 : h.map((y) => y(...p)).find((y) => y !== void 0);
2819
+ };
2820
+ }
2821
+ } else
2822
+ s[u] = d;
2823
+ }), s), {})
2824
+ };
2825
+ }
2826
+ function ai(e) {
2827
+ e === void 0 && (e = []);
2828
+ const t = e.map((c) => c?.reference), n = e.map((c) => c?.floating), r = e.map((c) => c?.item), o = f.useCallback(
2829
+ (c) => xt(c, e, "reference"),
2830
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2831
+ t
2832
+ ), i = f.useCallback(
2833
+ (c) => xt(c, e, "floating"),
2834
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2835
+ n
2836
+ ), s = f.useCallback(
2837
+ (c) => xt(c, e, "item"),
2838
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2839
+ r
2840
+ );
2841
+ return f.useMemo(() => ({
2842
+ getReferenceProps: o,
2843
+ getFloatingProps: i,
2844
+ getItemProps: s
2845
+ }), [o, i, s]);
2846
+ }
2847
+ const qo = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
2848
+ function fi(e, t) {
2849
+ var n, r;
2850
+ t === void 0 && (t = {});
2851
+ const {
2852
+ open: o,
2853
+ elements: i,
2854
+ floatingId: s
2855
+ } = e, {
2856
+ enabled: c = !0,
2857
+ role: l = "dialog"
2858
+ } = t, u = ut(), d = ((n = i.domReference) == null ? void 0 : n.id) || u, g = f.useMemo(() => {
2859
+ var b;
2860
+ return ((b = Pt(i.floating)) == null ? void 0 : b.id) || s;
2861
+ }, [i.floating, s]), h = (r = qo.get(l)) != null ? r : l, p = Vt() != null, m = f.useMemo(() => h === "tooltip" || l === "label" ? {
2862
+ ["aria-" + (l === "label" ? "labelledby" : "describedby")]: o ? g : void 0
2863
+ } : {
2864
+ "aria-expanded": o ? "true" : "false",
2865
+ "aria-haspopup": h === "alertdialog" ? "dialog" : h,
2866
+ "aria-controls": o ? g : void 0,
2867
+ ...h === "listbox" && {
2868
+ role: "combobox"
2869
+ },
2870
+ ...h === "menu" && {
2871
+ id: d
2872
+ },
2873
+ ...h === "menu" && p && {
2874
+ role: "menuitem"
2875
+ },
2876
+ ...l === "select" && {
2877
+ "aria-autocomplete": "none"
2878
+ },
2879
+ ...l === "combobox" && {
2880
+ "aria-autocomplete": "list"
2881
+ }
2882
+ }, [h, g, p, o, d, l]), y = f.useMemo(() => {
2883
+ const b = {
2884
+ id: g,
2885
+ ...h && {
2886
+ role: h
2887
+ }
2888
+ };
2889
+ return h === "tooltip" || l === "label" ? b : {
2890
+ ...b,
2891
+ ...h === "menu" && {
2892
+ "aria-labelledby": d
2893
+ }
2894
+ };
2895
+ }, [h, g, d, l]), R = f.useCallback((b) => {
2896
+ let {
2897
+ active: w,
2898
+ selected: S
2899
+ } = b;
2900
+ const A = {
2901
+ role: "option",
2902
+ ...w && {
2903
+ id: g + "-fui-option"
2904
+ }
2905
+ };
2906
+ switch (l) {
2907
+ case "select":
2908
+ case "combobox":
2909
+ return {
2910
+ ...A,
2911
+ "aria-selected": S
2912
+ };
2913
+ }
2914
+ return {};
2915
+ }, [g, l]);
2916
+ return f.useMemo(() => c ? {
2917
+ reference: m,
2918
+ floating: y,
2919
+ item: R
2920
+ } : {}, [c, m, y, R]);
2921
+ }
2922
+ function Xo(e, t) {
2923
+ const [n, r] = f.useState(e);
2924
+ return e && !n && r(!0), f.useEffect(() => {
2925
+ if (!e && n) {
2926
+ const o = setTimeout(() => r(!1), t);
2927
+ return () => clearTimeout(o);
2928
+ }
2929
+ }, [e, n, t]), n;
2930
+ }
2931
+ function di(e, t) {
2932
+ t === void 0 && (t = {});
2933
+ const {
2934
+ open: n,
2935
+ elements: {
2936
+ floating: r
2937
+ }
2938
+ } = e, {
2939
+ duration: o = 250
2940
+ } = t, s = (typeof o == "number" ? o : o.close) || 0, [c, l] = f.useState("unmounted"), u = Xo(n, s);
2941
+ return !u && c === "close" && l("unmounted"), G(() => {
2942
+ if (r) {
2943
+ if (n) {
2944
+ l("initial");
2945
+ const d = requestAnimationFrame(() => {
2946
+ It.flushSync(() => {
2947
+ l("open");
2948
+ });
2949
+ });
2950
+ return () => {
2951
+ cancelAnimationFrame(d);
2952
+ };
2953
+ }
2954
+ l("close");
2955
+ }
2956
+ }, [n, r]), {
2957
+ isMounted: u,
2958
+ status: c
2959
+ };
2960
+ }
2961
+ export {
2962
+ oi as F,
2963
+ zo as a,
2964
+ si as b,
2965
+ ci as c,
2966
+ fi as d,
2967
+ ai as e,
2968
+ ei as f,
2969
+ di as g,
2970
+ ii as h,
2971
+ ri as i,
2972
+ Jo as j,
2973
+ Qo as k,
2974
+ ti as l,
2975
+ ni as m,
2976
+ ui as n,
2977
+ Go as o,
2978
+ Zo as s,
2979
+ li as u
2980
+ };