@stihl-design-system/components 1.0.0-RC.46 → 1.0.0-RC.48

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