@pfct/purple 1.5.0-rc.4 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/chunks/clsx.C11secjj.js +1 -0
  3. package/dist/chunks/clsx.OuTLNxxd.js +16 -0
  4. package/dist/chunks/index.55uP5Llv.js +23 -0
  5. package/dist/chunks/index.BB3W3jfD.js +58 -0
  6. package/dist/chunks/index.BQMPhSId.js +1 -0
  7. package/dist/chunks/{index.SS1p-Ys5.js → index.B_Gl-ceI.js} +1 -1
  8. package/dist/chunks/index.CSxTWj2O.js +1 -0
  9. package/dist/chunks/{index.LN3KW-I4.js → index.Cc-miKAT.js} +1 -1
  10. package/dist/chunks/index.Cw8-3kaP.js +1 -0
  11. package/dist/chunks/index.DMhXgOEz.js +1 -0
  12. package/dist/chunks/index.DQlEIj0D.js +1 -0
  13. package/dist/chunks/index.DZc07ocK.js +5 -0
  14. package/dist/chunks/index.DoZ51x4G.js +41 -0
  15. package/dist/chunks/index.FP3Zwkau.js +636 -0
  16. package/dist/chunks/index.SBDRGz2_.js +60 -0
  17. package/dist/chunks/index.VbysHsHD.js +13 -0
  18. package/dist/chunks/index.XcUjaasf.js +1 -0
  19. package/dist/chunks/index.Y9emhYVA.js +1656 -0
  20. package/dist/chunks/{index.styled.DZTRSD4q.js → index.styled.B6sT-Ewu.js} +1 -1
  21. package/dist/chunks/{index.styled.k71QzB1b.js → index.styled.VNEk1u7W.js} +91 -93
  22. package/dist/chunks/index.wFBaTsPC.js +537 -0
  23. package/dist/chunks/{index.B0KRXeX3.js → index.wsLqX57E.js} +65 -74
  24. package/dist/components/Accordion/index.cjs.js +1 -1
  25. package/dist/components/Accordion/index.es.js +25 -24
  26. package/dist/components/Badge/BaseBadge/index.cjs.js +1 -1
  27. package/dist/components/Badge/BaseBadge/index.es.js +1 -1
  28. package/dist/components/Badge/BaseBadge/index.styled.cjs.js +1 -1
  29. package/dist/components/Badge/BaseBadge/index.styled.es.js +1 -1
  30. package/dist/components/BottomSheet/BaseBottomSheet/index.cjs.js +1 -1
  31. package/dist/components/BottomSheet/BaseBottomSheet/index.es.js +23 -25
  32. package/dist/components/BottomSheet/NavBottomSheet/index.cjs.js +1 -1
  33. package/dist/components/BottomSheet/NavBottomSheet/index.es.js +1 -1
  34. package/dist/components/BottomSheet/TitleBottomSheet/index.cjs.js +1 -1
  35. package/dist/components/BottomSheet/TitleBottomSheet/index.es.js +1 -1
  36. package/dist/components/BottomSheet/index.cjs.js +1 -1
  37. package/dist/components/BottomSheet/index.es.js +1 -1
  38. package/dist/components/Button/BaseButton/index.cjs.js +1 -1
  39. package/dist/components/Button/BaseButton/index.es.js +1 -1
  40. package/dist/components/Button/DoubleButton/index.cjs.js +1 -1
  41. package/dist/components/Button/DoubleButton/index.es.js +1 -1
  42. package/dist/components/Button/FloatBaseButton/index.cjs.js +1 -1
  43. package/dist/components/Button/FloatBaseButton/index.es.js +1 -1
  44. package/dist/components/Button/FloatDoubleButton/index.cjs.js +1 -1
  45. package/dist/components/Button/FloatDoubleButton/index.es.js +1 -1
  46. package/dist/components/Button/FloatSingleButton/index.cjs.js +1 -1
  47. package/dist/components/Button/FloatSingleButton/index.es.js +1 -1
  48. package/dist/components/Button/SingleButton/index.cjs.js +1 -1
  49. package/dist/components/Button/SingleButton/index.es.js +1 -1
  50. package/dist/components/Button/index.cjs.js +1 -1
  51. package/dist/components/Button/index.es.js +1 -1
  52. package/dist/components/Chips/BasicChips/index.styled.cjs.js +1 -1
  53. package/dist/components/Chips/BasicChips/index.styled.es.js +1 -1
  54. package/dist/components/Chips/ChipItem/index.cjs.js +1 -1
  55. package/dist/components/Chips/ChipItem/index.es.js +18 -20
  56. package/dist/components/Chips/ChipItem/index.styled.cjs.js +1 -1
  57. package/dist/components/Chips/ChipItem/index.styled.es.js +20 -22
  58. package/dist/components/Chips/ChipsFrame/index.cjs.js +1 -1
  59. package/dist/components/Chips/ChipsFrame/index.es.js +12 -12
  60. package/dist/components/Chips/ChipsFrame/index.styled.cjs.js +1 -1
  61. package/dist/components/Chips/ChipsFrame/index.styled.es.js +1 -1
  62. package/dist/components/Control/CheckMark/index.cjs.js +1 -1
  63. package/dist/components/Control/CheckMark/index.es.js +17 -19
  64. package/dist/components/Control/RadioButton/index.cjs.js +1 -1
  65. package/dist/components/Control/RadioButton/index.es.js +1 -1
  66. package/dist/components/Control/RadioButton/index.styled.cjs.js +1 -1
  67. package/dist/components/Control/RadioButton/index.styled.es.js +17 -19
  68. package/dist/components/Control/Switch/index.cjs.js +1 -1
  69. package/dist/components/Control/Switch/index.es.js +17 -19
  70. package/dist/components/Control/index.cjs.js +1 -1
  71. package/dist/components/Control/index.d.ts +2 -1
  72. package/dist/components/Control/index.es.js +4 -4
  73. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/ActiveDateOfMonth.cjs.js +1 -1
  74. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/ActiveDateOfMonth.es.js +18 -20
  75. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/DisabledDateOfMonth.cjs.js +1 -1
  76. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/DisabledDateOfMonth.es.js +18 -20
  77. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/NoneDateOfMonth.cjs.js +1 -1
  78. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/NoneDateOfMonth.es.js +1 -1
  79. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeEndFocusDateOfMonth.cjs.js +1 -1
  80. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeEndFocusDateOfMonth.es.js +18 -20
  81. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeStartFocusDateOfMonth.cjs.js +1 -1
  82. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeStartFocusDateOfMonth.es.js +18 -20
  83. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/SingleFocusDateOfMonth.cjs.js +1 -1
  84. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/SingleFocusDateOfMonth.es.js +18 -20
  85. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/index.styled.cjs.js +1 -1
  86. package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/index.styled.es.js +28 -30
  87. package/dist/components/DatePicker/BaseDatePicker/DayOfWeek/index.cjs.js +1 -1
  88. package/dist/components/DatePicker/BaseDatePicker/DayOfWeek/index.es.js +1 -1
  89. package/dist/components/DatePicker/BaseDatePicker/DayOfWeek/index.styled.cjs.js +1 -1
  90. package/dist/components/DatePicker/BaseDatePicker/DayOfWeek/index.styled.es.js +1 -1
  91. package/dist/components/DatePicker/BaseDatePicker/YearMonthController/index.cjs.js +1 -1
  92. package/dist/components/DatePicker/BaseDatePicker/YearMonthController/index.es.js +15 -15
  93. package/dist/components/DatePicker/BaseDatePicker/index.cjs.js +1 -1
  94. package/dist/components/DatePicker/BaseDatePicker/index.es.js +27 -29
  95. package/dist/components/DatePicker/RangeDatePickerModal/index.cjs.js +1 -1
  96. package/dist/components/DatePicker/RangeDatePickerModal/index.es.js +1 -1
  97. package/dist/components/DatePicker/SingleDatePickerModal/index.cjs.js +1 -1
  98. package/dist/components/DatePicker/SingleDatePickerModal/index.es.js +16 -18
  99. package/dist/components/Input/NumberInput/index.cjs.js +1 -1
  100. package/dist/components/Input/NumberInput/index.es.js +49 -51
  101. package/dist/components/Input/PostfixInput/index.util.cjs.js +1 -1
  102. package/dist/components/Input/PostfixInput/index.util.es.js +20 -22
  103. package/dist/components/Input/TextField/index.cjs.js +1 -1
  104. package/dist/components/Input/TextField/index.es.js +12 -12
  105. package/dist/components/Input/index.cjs.js +1 -1
  106. package/dist/components/Input/index.es.js +28 -30
  107. package/dist/components/List/index.cjs.js +1 -1
  108. package/dist/components/List/index.es.js +8 -8
  109. package/dist/components/Loading/ProgressBar/index.cjs.js +1 -1
  110. package/dist/components/Loading/ProgressBar/index.es.js +1 -1
  111. package/dist/components/Loading/ProgressBar/index.styled.cjs.js +1 -1
  112. package/dist/components/Loading/ProgressBar/index.styled.es.js +18 -20
  113. package/dist/components/Loading/Spinner/index.cjs.js +1 -1
  114. package/dist/components/Loading/Spinner/index.es.js +1 -1
  115. package/dist/components/Loading/index.cjs.js +1 -1
  116. package/dist/components/Loading/index.es.js +1 -1
  117. package/dist/components/MiniButton/BoxMiniButton/index.cjs.js +1 -1
  118. package/dist/components/MiniButton/BoxMiniButton/index.es.js +4 -4
  119. package/dist/components/MiniButton/IconMiniButton/index.cjs.js +1 -1
  120. package/dist/components/MiniButton/IconMiniButton/index.es.js +3 -3
  121. package/dist/components/MiniButton/UnderLineMiniButton/index.cjs.js +1 -1
  122. package/dist/components/MiniButton/UnderLineMiniButton/index.es.js +13 -13
  123. package/dist/components/MiniButton/common/index.styled.cjs.js +1 -1
  124. package/dist/components/MiniButton/common/index.styled.es.js +19 -21
  125. package/dist/components/Modal/BaseModal/index.cjs.js +1 -1
  126. package/dist/components/Modal/BaseModal/index.es.js +1 -1
  127. package/dist/components/Modal/index.cjs.js +1 -1
  128. package/dist/components/Modal/index.es.js +1 -1
  129. package/dist/components/Navigation/BaseNavigation/index.cjs.js +1 -1
  130. package/dist/components/Navigation/BaseNavigation/index.es.js +9 -9
  131. package/dist/components/Navigation/BottomNavigationBar/index.cjs.js +1 -1
  132. package/dist/components/Navigation/BottomNavigationBar/index.es.js +5 -5
  133. package/dist/components/Navigation/PageNavigationBar/index.cjs.js +1 -1
  134. package/dist/components/Navigation/PageNavigationBar/index.es.js +12 -12
  135. package/dist/components/Navigation/TitleNavigationBar/index.cjs.js +1 -1
  136. package/dist/components/Navigation/TitleNavigationBar/index.es.js +10 -10
  137. package/dist/components/Navigation/index.cjs.js +1 -1
  138. package/dist/components/Navigation/index.es.js +12 -12
  139. package/dist/components/OverlayRoot/index.cjs.js +1 -1
  140. package/dist/components/OverlayRoot/index.es.js +17 -19
  141. package/dist/components/Segment/BaseSegment/index.styled.cjs.js +1 -1
  142. package/dist/components/Segment/BaseSegment/index.styled.es.js +1 -1
  143. package/dist/components/Segment/ExtendSegment/index.styled.cjs.js +1 -1
  144. package/dist/components/Segment/ExtendSegment/index.styled.es.js +1 -1
  145. package/dist/components/SelectBox/index.cjs.js +1 -1
  146. package/dist/components/SelectBox/index.es.js +13 -13
  147. package/dist/components/SelectBox/index.styled.cjs.js +1 -1
  148. package/dist/components/SelectBox/index.styled.es.js +24 -26
  149. package/dist/components/Tabs/FillTabs/index.cjs.js +1 -1
  150. package/dist/components/Tabs/FillTabs/index.es.js +19 -21
  151. package/dist/components/Tabs/TextTabs/index.cjs.js +1 -1
  152. package/dist/components/Tabs/TextTabs/index.d.ts +15 -11
  153. package/dist/components/Tabs/TextTabs/index.es.js +52 -65
  154. package/dist/components/Tabs/index.cjs.js +1 -1
  155. package/dist/components/Tabs/index.es.js +5 -4
  156. package/dist/components/Tag/index.cjs.js +1 -1
  157. package/dist/components/Tag/index.es.js +1 -1
  158. package/dist/components/Tag/index.styled.cjs.js +1 -1
  159. package/dist/components/Tag/index.styled.es.js +17 -19
  160. package/dist/components/Terms/index.cjs.js +1 -1
  161. package/dist/components/Terms/index.es.js +14 -15
  162. package/dist/components/TextArea/index.cjs.js +1 -0
  163. package/dist/components/TextArea/index.d.ts +80 -0
  164. package/dist/components/TextArea/index.es.js +30 -0
  165. package/dist/components/Title/index.cjs.js +1 -1
  166. package/dist/components/Title/index.es.js +1 -1
  167. package/dist/components/Title/index.styled.cjs.js +1 -1
  168. package/dist/components/Title/index.styled.es.js +20 -22
  169. package/dist/components/ToastMessage/BaseToastMessage/index.cjs.js +1 -1
  170. package/dist/components/ToastMessage/BaseToastMessage/index.es.js +1 -1
  171. package/dist/components/ToastMessage/BaseToastMessage/index.styled.cjs.js +1 -1
  172. package/dist/components/ToastMessage/BaseToastMessage/index.styled.es.js +18 -20
  173. package/dist/components/index.cjs.js +1 -1
  174. package/dist/components/index.d.ts +3 -1
  175. package/dist/components/index.es.js +101 -91
  176. package/dist/components/ui/bottomSheet.cjs.js +13 -13
  177. package/dist/components/ui/bottomSheet.es.js +76 -71
  178. package/dist/components/ui/button.cjs.js +1 -1
  179. package/dist/components/ui/button.es.js +4 -4
  180. package/dist/components/ui/checkbox.cjs.js +1 -0
  181. package/dist/components/ui/checkbox.d.ts +9 -0
  182. package/dist/components/ui/checkbox.es.js +447 -0
  183. package/dist/components/ui/dialog.cjs.js +1 -1
  184. package/dist/components/ui/dialog.es.js +30 -30
  185. package/dist/components/ui/drawer.cjs.js +1 -1
  186. package/dist/components/ui/drawer.es.js +2 -2
  187. package/dist/components/ui/impact-tooltip.cjs.js +1 -0
  188. package/dist/components/ui/impact-tooltip.d.ts +16 -0
  189. package/dist/components/ui/impact-tooltip.es.js +460 -0
  190. package/dist/components/ui/share-ui.cjs.js +1 -1
  191. package/dist/components/ui/share-ui.es.js +2 -2
  192. package/dist/components/ui/tooltip.cjs.js +1 -0
  193. package/dist/components/ui/tooltip.d.ts +9 -0
  194. package/dist/components/ui/tooltip.es.js +386 -0
  195. package/dist/components/ui/typography.cjs.js +1 -1
  196. package/dist/components/ui/typography.es.js +3 -3
  197. package/dist/core/Display/Mobile.cjs.js +1 -1
  198. package/dist/core/Display/Mobile.es.js +1 -1
  199. package/dist/core/Display/Pc.cjs.js +1 -1
  200. package/dist/core/Display/Pc.es.js +1 -1
  201. package/dist/core/Display/index.styled.cjs.js +1 -1
  202. package/dist/core/Display/index.styled.es.js +18 -20
  203. package/dist/core/Typography/BaseTypography/index.cjs.js +1 -1
  204. package/dist/core/Typography/BaseTypography/index.es.js +2 -2
  205. package/dist/hooks/useLayoutIsMobile.cjs.js +1 -1
  206. package/dist/hooks/useLayoutIsMobile.es.js +18 -20
  207. package/dist/icons/src/aliases/aliases.cjs.js +1 -1
  208. package/dist/icons/src/aliases/aliases.d.ts +11 -11
  209. package/dist/icons/src/aliases/aliases.es.js +44 -44
  210. package/dist/icons/src/aliases/index.cjs.js +1 -1
  211. package/dist/icons/src/aliases/index.es.js +88 -88
  212. package/dist/icons/src/aliases/prefixed.cjs.js +1 -1
  213. package/dist/icons/src/aliases/prefixed.d.ts +16 -16
  214. package/dist/icons/src/aliases/prefixed.es.js +46 -46
  215. package/dist/icons/src/aliases/suffixed.cjs.js +1 -1
  216. package/dist/icons/src/aliases/suffixed.d.ts +17 -17
  217. package/dist/icons/src/aliases/suffixed.es.js +48 -48
  218. package/dist/icons/src/icons/index.cjs.js +1 -1
  219. package/dist/icons/src/icons/index.d.ts +10 -10
  220. package/dist/icons/src/icons/index.es.js +48 -48
  221. package/dist/index.cjs.js +1 -1
  222. package/dist/index.es.js +289 -279
  223. package/dist/lib/utils.cjs.js +1 -1
  224. package/dist/lib/utils.es.js +2729 -2
  225. package/dist/library/BasicLayout/Footer.cjs.js +1 -1
  226. package/dist/library/BasicLayout/Footer.d.ts +2 -2
  227. package/dist/library/BasicLayout/Footer.es.js +36 -35
  228. package/dist/library/BasicLayout/index.cjs.js +1 -1
  229. package/dist/library/BasicLayout/index.d.ts +1 -1
  230. package/dist/library/BasicLayout/index.es.js +21 -23
  231. package/dist/library/BasicLayout/index.styled.cjs.js +1 -1
  232. package/dist/library/BasicLayout/index.styled.es.js +46 -48
  233. package/dist/utils/GenerateColorStyle/chip.cjs.js +1 -1
  234. package/dist/utils/GenerateColorStyle/chip.es.js +1 -1
  235. package/dist/utils/GenerateColorStyle/index.cjs.js +1 -1
  236. package/dist/utils/GenerateColorStyle/index.es.js +1 -1
  237. package/dist/utils/GenerateColorStyle/tab/fill-tabs.cjs.js +1 -1
  238. package/dist/utils/GenerateColorStyle/tab/fill-tabs.es.js +18 -20
  239. package/dist/utils/GenerateColorStyle/tab/text-tabs.cjs.js +1 -1
  240. package/dist/utils/GenerateColorStyle/tab/text-tabs.es.js +18 -20
  241. package/dist/utils/index.cjs.js +1 -1
  242. package/dist/utils/index.es.js +1 -1
  243. package/package.json +6 -3
  244. package/dist/Icon/utils/svgr-cli.template.d.ts +0 -7
  245. package/dist/chunks/index.BiFBNKMb.js +0 -51
  246. package/dist/chunks/index.C4mr2-78.js +0 -1
  247. package/dist/chunks/index.CAOufkQO.js +0 -1072
  248. package/dist/chunks/index.Dazlhpef.js +0 -45
  249. package/dist/chunks/index.DnJQUgiG.js +0 -1
  250. package/dist/chunks/utils.B9KdtH6G.js +0 -2493
  251. package/dist/chunks/utils.Gb5_Gcy7.js +0 -1
  252. package/dist/components/Control/CheckBox/CheckIcon.cjs.js +0 -1
  253. package/dist/components/Control/CheckBox/CheckIcon.d.ts +0 -6
  254. package/dist/components/Control/CheckBox/CheckIcon.es.js +0 -26
  255. package/dist/components/Control/CheckBox/index.cjs.js +0 -1
  256. package/dist/components/Control/CheckBox/index.d.ts +0 -12
  257. package/dist/components/Control/CheckBox/index.es.js +0 -96
  258. package/dist/components/Control/CheckBox/index.styled.cjs.js +0 -24
  259. package/dist/components/Control/CheckBox/index.styled.d.ts +0 -18
  260. package/dist/components/Control/CheckBox/index.styled.es.js +0 -30
  261. package/dist/components/Stepper/Step.cjs.js +0 -1
  262. package/dist/components/Stepper/Step.d.ts +0 -13
  263. package/dist/components/Stepper/Step.es.js +0 -46
  264. package/dist/components/Stepper/index.cjs.js +0 -1
  265. package/dist/components/Stepper/index.d.ts +0 -10
  266. package/dist/components/Stepper/index.es.js +0 -35
  267. package/dist/components/Tooltip/BasicTooltip/index.cjs.js +0 -1
  268. package/dist/components/Tooltip/BasicTooltip/index.d.ts +0 -5
  269. package/dist/components/Tooltip/BasicTooltip/index.es.js +0 -6
  270. package/dist/components/Tooltip/ImpactTooltip/index.cjs.js +0 -1
  271. package/dist/components/Tooltip/ImpactTooltip/index.d.ts +0 -7
  272. package/dist/components/Tooltip/ImpactTooltip/index.es.js +0 -23
  273. package/dist/components/Tooltip/TooltipBase/index.cjs.js +0 -8
  274. package/dist/components/Tooltip/TooltipBase/index.d.ts +0 -18
  275. package/dist/components/Tooltip/TooltipBase/index.es.js +0 -146
  276. package/dist/components/Tooltip/TooltipBase/index.styled.cjs.js +0 -107
  277. package/dist/components/Tooltip/TooltipBase/index.styled.d.ts +0 -22
  278. package/dist/components/Tooltip/TooltipBase/index.styled.es.js +0 -2006
  279. package/dist/components/Tooltip/index.cjs.js +0 -1
  280. package/dist/components/Tooltip/index.d.ts +0 -6
  281. package/dist/components/Tooltip/index.es.js +0 -6
@@ -0,0 +1,1656 @@
1
+ import * as y from "react";
2
+ import { useLayoutEffect as Te } from "react";
3
+ import { b as xt, c as Me, u as At } from "./index.wsLqX57E.js";
4
+ import { P as tt, d as Ne, u as Fe } from "./index.SBDRGz2_.js";
5
+ import { u as ht } from "./index.DLcqcWxM.js";
6
+ import { a as ke, u as Ct } from "./index.55uP5Llv.js";
7
+ import { j as _ } from "./jsx-runtime.Drh4NO5G.js";
8
+ import * as We from "react-dom";
9
+ import $e from "react-dom";
10
+ var Be = "DismissableLayer", Pt = "dismissableLayer.update", _e = "dismissableLayer.pointerDownOutside", He = "dismissableLayer.focusOutside", Vt, te = y.createContext({
11
+ layers: /* @__PURE__ */ new Set(),
12
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
13
+ branches: /* @__PURE__ */ new Set()
14
+ }), je = y.forwardRef(
15
+ (t, e) => {
16
+ const {
17
+ disableOutsidePointerEvents: n = !1,
18
+ onEscapeKeyDown: o,
19
+ onPointerDownOutside: r,
20
+ onFocusOutside: i,
21
+ onInteractOutside: s,
22
+ onDismiss: c,
23
+ ...f
24
+ } = t, l = y.useContext(te), [a, u] = y.useState(null), p = (a == null ? void 0 : a.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, d] = y.useState({}), m = ht(e, (v) => u(v)), h = Array.from(l.layers), [w] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), g = h.indexOf(w), x = a ? h.indexOf(a) : -1, P = l.layersWithOutsidePointerEventsDisabled.size > 0, b = x >= g, A = Ve((v) => {
25
+ const O = v.target, M = [...l.branches].some((C) => C.contains(O));
26
+ !b || M || (r == null || r(v), s == null || s(v), v.defaultPrevented || c == null || c());
27
+ }, p), R = Ye((v) => {
28
+ const O = v.target;
29
+ [...l.branches].some((C) => C.contains(O)) || (i == null || i(v), s == null || s(v), v.defaultPrevented || c == null || c());
30
+ }, p);
31
+ return ke((v) => {
32
+ x === l.layers.size - 1 && (o == null || o(v), !v.defaultPrevented && c && (v.preventDefault(), c()));
33
+ }, p), y.useEffect(() => {
34
+ if (a)
35
+ return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Vt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(a)), l.layers.add(a), Yt(), () => {
36
+ n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = Vt);
37
+ };
38
+ }, [a, p, n, l]), y.useEffect(() => () => {
39
+ a && (l.layers.delete(a), l.layersWithOutsidePointerEventsDisabled.delete(a), Yt());
40
+ }, [a, l]), y.useEffect(() => {
41
+ const v = () => d({});
42
+ return document.addEventListener(Pt, v), () => document.removeEventListener(Pt, v);
43
+ }, []), /* @__PURE__ */ _.jsx(
44
+ tt.div,
45
+ {
46
+ ...f,
47
+ ref: m,
48
+ style: {
49
+ pointerEvents: P ? b ? "auto" : "none" : void 0,
50
+ ...t.style
51
+ },
52
+ onFocusCapture: xt(t.onFocusCapture, R.onFocusCapture),
53
+ onBlurCapture: xt(t.onBlurCapture, R.onBlurCapture),
54
+ onPointerDownCapture: xt(
55
+ t.onPointerDownCapture,
56
+ A.onPointerDownCapture
57
+ )
58
+ }
59
+ );
60
+ }
61
+ );
62
+ je.displayName = Be;
63
+ var Ie = "DismissableLayerBranch", ze = y.forwardRef((t, e) => {
64
+ const n = y.useContext(te), o = y.useRef(null), r = ht(e, o);
65
+ return y.useEffect(() => {
66
+ const i = o.current;
67
+ if (i)
68
+ return n.branches.add(i), () => {
69
+ n.branches.delete(i);
70
+ };
71
+ }, [n.branches]), /* @__PURE__ */ _.jsx(tt.div, { ...t, ref: r });
72
+ });
73
+ ze.displayName = Ie;
74
+ function Ve(t, e = globalThis == null ? void 0 : globalThis.document) {
75
+ const n = Ct(t), o = y.useRef(!1), r = y.useRef(() => {
76
+ });
77
+ return y.useEffect(() => {
78
+ const i = (c) => {
79
+ if (c.target && !o.current) {
80
+ let f = function() {
81
+ ee(
82
+ _e,
83
+ n,
84
+ l,
85
+ { discrete: !0 }
86
+ );
87
+ };
88
+ const l = { originalEvent: c };
89
+ c.pointerType === "touch" ? (e.removeEventListener("click", r.current), r.current = f, e.addEventListener("click", r.current, { once: !0 })) : f();
90
+ } else
91
+ e.removeEventListener("click", r.current);
92
+ o.current = !1;
93
+ }, s = window.setTimeout(() => {
94
+ e.addEventListener("pointerdown", i);
95
+ }, 0);
96
+ return () => {
97
+ window.clearTimeout(s), e.removeEventListener("pointerdown", i), e.removeEventListener("click", r.current);
98
+ };
99
+ }, [e, n]), {
100
+ // ensures we check React component tree (not just DOM tree)
101
+ onPointerDownCapture: () => o.current = !0
102
+ };
103
+ }
104
+ function Ye(t, e = globalThis == null ? void 0 : globalThis.document) {
105
+ const n = Ct(t), o = y.useRef(!1);
106
+ return y.useEffect(() => {
107
+ const r = (i) => {
108
+ i.target && !o.current && ee(He, n, { originalEvent: i }, {
109
+ discrete: !1
110
+ });
111
+ };
112
+ return e.addEventListener("focusin", r), () => e.removeEventListener("focusin", r);
113
+ }, [e, n]), {
114
+ onFocusCapture: () => o.current = !0,
115
+ onBlurCapture: () => o.current = !1
116
+ };
117
+ }
118
+ function Yt() {
119
+ const t = new CustomEvent(Pt);
120
+ document.dispatchEvent(t);
121
+ }
122
+ function ee(t, e, n, { discrete: o }) {
123
+ const r = n.originalEvent.target, i = new CustomEvent(t, { bubbles: !1, cancelable: !0, detail: n });
124
+ e && r.addEventListener(t, e, { once: !0 }), o ? Ne(r, i) : r.dispatchEvent(i);
125
+ }
126
+ const Xe = ["top", "right", "bottom", "left"], Z = Math.min, $ = Math.max, ut = Math.round, at = Math.floor, V = (t) => ({
127
+ x: t,
128
+ y: t
129
+ }), Ue = {
130
+ left: "right",
131
+ right: "left",
132
+ bottom: "top",
133
+ top: "bottom"
134
+ }, qe = {
135
+ start: "end",
136
+ end: "start"
137
+ };
138
+ function Et(t, e, n) {
139
+ return $(t, Z(e, n));
140
+ }
141
+ function U(t, e) {
142
+ return typeof t == "function" ? t(e) : t;
143
+ }
144
+ function q(t) {
145
+ return t.split("-")[0];
146
+ }
147
+ function et(t) {
148
+ return t.split("-")[1];
149
+ }
150
+ function St(t) {
151
+ return t === "x" ? "y" : "x";
152
+ }
153
+ function Dt(t) {
154
+ return t === "y" ? "height" : "width";
155
+ }
156
+ function z(t) {
157
+ return ["top", "bottom"].includes(q(t)) ? "y" : "x";
158
+ }
159
+ function Lt(t) {
160
+ return St(z(t));
161
+ }
162
+ function Ze(t, e, n) {
163
+ n === void 0 && (n = !1);
164
+ const o = et(t), r = Lt(t), i = Dt(r);
165
+ let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
166
+ return e.reference[i] > e.floating[i] && (s = dt(s)), [s, dt(s)];
167
+ }
168
+ function Ke(t) {
169
+ const e = dt(t);
170
+ return [Rt(t), e, Rt(e)];
171
+ }
172
+ function Rt(t) {
173
+ return t.replace(/start|end/g, (e) => qe[e]);
174
+ }
175
+ function Ge(t, e, n) {
176
+ const o = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
177
+ switch (t) {
178
+ case "top":
179
+ case "bottom":
180
+ return n ? e ? r : o : e ? o : r;
181
+ case "left":
182
+ case "right":
183
+ return e ? i : s;
184
+ default:
185
+ return [];
186
+ }
187
+ }
188
+ function Je(t, e, n, o) {
189
+ const r = et(t);
190
+ let i = Ge(q(t), n === "start", o);
191
+ return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Rt)))), i;
192
+ }
193
+ function dt(t) {
194
+ return t.replace(/left|right|bottom|top/g, (e) => Ue[e]);
195
+ }
196
+ function Qe(t) {
197
+ return {
198
+ top: 0,
199
+ right: 0,
200
+ bottom: 0,
201
+ left: 0,
202
+ ...t
203
+ };
204
+ }
205
+ function ne(t) {
206
+ return typeof t != "number" ? Qe(t) : {
207
+ top: t,
208
+ right: t,
209
+ bottom: t,
210
+ left: t
211
+ };
212
+ }
213
+ function pt(t) {
214
+ const {
215
+ x: e,
216
+ y: n,
217
+ width: o,
218
+ height: r
219
+ } = t;
220
+ return {
221
+ width: o,
222
+ height: r,
223
+ top: n,
224
+ left: e,
225
+ right: e + o,
226
+ bottom: n + r,
227
+ x: e,
228
+ y: n
229
+ };
230
+ }
231
+ function Xt(t, e, n) {
232
+ let {
233
+ reference: o,
234
+ floating: r
235
+ } = t;
236
+ const i = z(e), s = Lt(e), c = Dt(s), f = q(e), l = i === "y", a = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, p = o[c] / 2 - r[c] / 2;
237
+ let d;
238
+ switch (f) {
239
+ case "top":
240
+ d = {
241
+ x: a,
242
+ y: o.y - r.height
243
+ };
244
+ break;
245
+ case "bottom":
246
+ d = {
247
+ x: a,
248
+ y: o.y + o.height
249
+ };
250
+ break;
251
+ case "right":
252
+ d = {
253
+ x: o.x + o.width,
254
+ y: u
255
+ };
256
+ break;
257
+ case "left":
258
+ d = {
259
+ x: o.x - r.width,
260
+ y: u
261
+ };
262
+ break;
263
+ default:
264
+ d = {
265
+ x: o.x,
266
+ y: o.y
267
+ };
268
+ }
269
+ switch (et(e)) {
270
+ case "start":
271
+ d[s] -= p * (n && l ? -1 : 1);
272
+ break;
273
+ case "end":
274
+ d[s] += p * (n && l ? -1 : 1);
275
+ break;
276
+ }
277
+ return d;
278
+ }
279
+ const tn = async (t, e, n) => {
280
+ const {
281
+ placement: o = "bottom",
282
+ strategy: r = "absolute",
283
+ middleware: i = [],
284
+ platform: s
285
+ } = n, c = i.filter(Boolean), f = await (s.isRTL == null ? void 0 : s.isRTL(e));
286
+ let l = await s.getElementRects({
287
+ reference: t,
288
+ floating: e,
289
+ strategy: r
290
+ }), {
291
+ x: a,
292
+ y: u
293
+ } = Xt(l, o, f), p = o, d = {}, m = 0;
294
+ for (let h = 0; h < c.length; h++) {
295
+ const {
296
+ name: w,
297
+ fn: g
298
+ } = c[h], {
299
+ x,
300
+ y: P,
301
+ data: b,
302
+ reset: A
303
+ } = await g({
304
+ x: a,
305
+ y: u,
306
+ initialPlacement: o,
307
+ placement: p,
308
+ strategy: r,
309
+ middlewareData: d,
310
+ rects: l,
311
+ platform: s,
312
+ elements: {
313
+ reference: t,
314
+ floating: e
315
+ }
316
+ });
317
+ a = x ?? a, u = P ?? u, d = {
318
+ ...d,
319
+ [w]: {
320
+ ...d[w],
321
+ ...b
322
+ }
323
+ }, A && m <= 50 && (m++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (l = A.rects === !0 ? await s.getElementRects({
324
+ reference: t,
325
+ floating: e,
326
+ strategy: r
327
+ }) : A.rects), {
328
+ x: a,
329
+ y: u
330
+ } = Xt(l, p, f)), h = -1);
331
+ }
332
+ return {
333
+ x: a,
334
+ y: u,
335
+ placement: p,
336
+ strategy: r,
337
+ middlewareData: d
338
+ };
339
+ };
340
+ async function rt(t, e) {
341
+ var n;
342
+ e === void 0 && (e = {});
343
+ const {
344
+ x: o,
345
+ y: r,
346
+ platform: i,
347
+ rects: s,
348
+ elements: c,
349
+ strategy: f
350
+ } = t, {
351
+ boundary: l = "clippingAncestors",
352
+ rootBoundary: a = "viewport",
353
+ elementContext: u = "floating",
354
+ altBoundary: p = !1,
355
+ padding: d = 0
356
+ } = U(e, t), m = ne(d), w = c[p ? u === "floating" ? "reference" : "floating" : u], g = pt(await i.getClippingRect({
357
+ 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)),
358
+ boundary: l,
359
+ rootBoundary: a,
360
+ strategy: f
361
+ })), x = u === "floating" ? {
362
+ x: o,
363
+ y: r,
364
+ width: s.floating.width,
365
+ height: s.floating.height
366
+ } : s.reference, P = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), b = await (i.isElement == null ? void 0 : i.isElement(P)) ? await (i.getScale == null ? void 0 : i.getScale(P)) || {
367
+ x: 1,
368
+ y: 1
369
+ } : {
370
+ x: 1,
371
+ y: 1
372
+ }, A = pt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
373
+ elements: c,
374
+ rect: x,
375
+ offsetParent: P,
376
+ strategy: f
377
+ }) : x);
378
+ return {
379
+ top: (g.top - A.top + m.top) / b.y,
380
+ bottom: (A.bottom - g.bottom + m.bottom) / b.y,
381
+ left: (g.left - A.left + m.left) / b.x,
382
+ right: (A.right - g.right + m.right) / b.x
383
+ };
384
+ }
385
+ const en = (t) => ({
386
+ name: "arrow",
387
+ options: t,
388
+ async fn(e) {
389
+ const {
390
+ x: n,
391
+ y: o,
392
+ placement: r,
393
+ rects: i,
394
+ platform: s,
395
+ elements: c,
396
+ middlewareData: f
397
+ } = e, {
398
+ element: l,
399
+ padding: a = 0
400
+ } = U(t, e) || {};
401
+ if (l == null)
402
+ return {};
403
+ const u = ne(a), p = {
404
+ x: n,
405
+ y: o
406
+ }, d = Lt(r), m = Dt(d), h = await s.getDimensions(l), w = d === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", P = w ? "clientHeight" : "clientWidth", b = i.reference[m] + i.reference[d] - p[d] - i.floating[m], A = p[d] - i.reference[d], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
407
+ let v = R ? R[P] : 0;
408
+ (!v || !await (s.isElement == null ? void 0 : s.isElement(R))) && (v = c.floating[P] || i.floating[m]);
409
+ const O = b / 2 - A / 2, M = v / 2 - h[m] / 2 - 1, C = Z(u[g], M), F = Z(u[x], M), k = C, D = v - h[m] - F, S = v / 2 - h[m] / 2 + O, W = Et(k, S, D), L = !f.arrow && et(r) != null && S !== W && i.reference[m] / 2 - (S < k ? C : F) - h[m] / 2 < 0, T = L ? S < k ? S - k : S - D : 0;
410
+ return {
411
+ [d]: p[d] + T,
412
+ data: {
413
+ [d]: W,
414
+ centerOffset: S - W - T,
415
+ ...L && {
416
+ alignmentOffset: T
417
+ }
418
+ },
419
+ reset: L
420
+ };
421
+ }
422
+ }), nn = function(t) {
423
+ return t === void 0 && (t = {}), {
424
+ name: "flip",
425
+ options: t,
426
+ async fn(e) {
427
+ var n, o;
428
+ const {
429
+ placement: r,
430
+ middlewareData: i,
431
+ rects: s,
432
+ initialPlacement: c,
433
+ platform: f,
434
+ elements: l
435
+ } = e, {
436
+ mainAxis: a = !0,
437
+ crossAxis: u = !0,
438
+ fallbackPlacements: p,
439
+ fallbackStrategy: d = "bestFit",
440
+ fallbackAxisSideDirection: m = "none",
441
+ flipAlignment: h = !0,
442
+ ...w
443
+ } = U(t, e);
444
+ if ((n = i.arrow) != null && n.alignmentOffset)
445
+ return {};
446
+ const g = q(r), x = z(c), P = q(c) === c, b = await (f.isRTL == null ? void 0 : f.isRTL(l.floating)), A = p || (P || !h ? [dt(c)] : Ke(c)), R = m !== "none";
447
+ !p && R && A.push(...Je(c, h, m, b));
448
+ const v = [c, ...A], O = await rt(e, w), M = [];
449
+ let C = ((o = i.flip) == null ? void 0 : o.overflows) || [];
450
+ if (a && M.push(O[g]), u) {
451
+ const S = Ze(r, s, b);
452
+ M.push(O[S[0]], O[S[1]]);
453
+ }
454
+ if (C = [...C, {
455
+ placement: r,
456
+ overflows: M
457
+ }], !M.every((S) => S <= 0)) {
458
+ var F, k;
459
+ const S = (((F = i.flip) == null ? void 0 : F.index) || 0) + 1, W = v[S];
460
+ if (W && (!(u === "alignment" ? x !== z(W) : !1) || // We leave the current main axis only if every placement on that axis
461
+ // overflows the main axis.
462
+ C.every((E) => E.overflows[0] > 0 && z(E.placement) === x)))
463
+ return {
464
+ data: {
465
+ index: S,
466
+ overflows: C
467
+ },
468
+ reset: {
469
+ placement: W
470
+ }
471
+ };
472
+ let L = (k = C.filter((T) => T.overflows[0] <= 0).sort((T, E) => T.overflows[1] - E.overflows[1])[0]) == null ? void 0 : k.placement;
473
+ if (!L)
474
+ switch (d) {
475
+ case "bestFit": {
476
+ var D;
477
+ const T = (D = C.filter((E) => {
478
+ if (R) {
479
+ const N = z(E.placement);
480
+ return N === x || // Create a bias to the `y` side axis due to horizontal
481
+ // reading directions favoring greater width.
482
+ N === "y";
483
+ }
484
+ return !0;
485
+ }).map((E) => [E.placement, E.overflows.filter((N) => N > 0).reduce((N, I) => N + I, 0)]).sort((E, N) => E[1] - N[1])[0]) == null ? void 0 : D[0];
486
+ T && (L = T);
487
+ break;
488
+ }
489
+ case "initialPlacement":
490
+ L = c;
491
+ break;
492
+ }
493
+ if (r !== L)
494
+ return {
495
+ reset: {
496
+ placement: L
497
+ }
498
+ };
499
+ }
500
+ return {};
501
+ }
502
+ };
503
+ };
504
+ function Ut(t, e) {
505
+ return {
506
+ top: t.top - e.height,
507
+ right: t.right - e.width,
508
+ bottom: t.bottom - e.height,
509
+ left: t.left - e.width
510
+ };
511
+ }
512
+ function qt(t) {
513
+ return Xe.some((e) => t[e] >= 0);
514
+ }
515
+ const on = function(t) {
516
+ return t === void 0 && (t = {}), {
517
+ name: "hide",
518
+ options: t,
519
+ async fn(e) {
520
+ const {
521
+ rects: n
522
+ } = e, {
523
+ strategy: o = "referenceHidden",
524
+ ...r
525
+ } = U(t, e);
526
+ switch (o) {
527
+ case "referenceHidden": {
528
+ const i = await rt(e, {
529
+ ...r,
530
+ elementContext: "reference"
531
+ }), s = Ut(i, n.reference);
532
+ return {
533
+ data: {
534
+ referenceHiddenOffsets: s,
535
+ referenceHidden: qt(s)
536
+ }
537
+ };
538
+ }
539
+ case "escaped": {
540
+ const i = await rt(e, {
541
+ ...r,
542
+ altBoundary: !0
543
+ }), s = Ut(i, n.floating);
544
+ return {
545
+ data: {
546
+ escapedOffsets: s,
547
+ escaped: qt(s)
548
+ }
549
+ };
550
+ }
551
+ default:
552
+ return {};
553
+ }
554
+ }
555
+ };
556
+ };
557
+ async function rn(t, e) {
558
+ const {
559
+ placement: n,
560
+ platform: o,
561
+ elements: r
562
+ } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = q(n), c = et(n), f = z(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, a = i && f ? -1 : 1, u = U(e, t);
563
+ let {
564
+ mainAxis: p,
565
+ crossAxis: d,
566
+ alignmentAxis: m
567
+ } = typeof u == "number" ? {
568
+ mainAxis: u,
569
+ crossAxis: 0,
570
+ alignmentAxis: null
571
+ } : {
572
+ mainAxis: u.mainAxis || 0,
573
+ crossAxis: u.crossAxis || 0,
574
+ alignmentAxis: u.alignmentAxis
575
+ };
576
+ return c && typeof m == "number" && (d = c === "end" ? m * -1 : m), f ? {
577
+ x: d * a,
578
+ y: p * l
579
+ } : {
580
+ x: p * l,
581
+ y: d * a
582
+ };
583
+ }
584
+ const sn = function(t) {
585
+ return t === void 0 && (t = 0), {
586
+ name: "offset",
587
+ options: t,
588
+ async fn(e) {
589
+ var n, o;
590
+ const {
591
+ x: r,
592
+ y: i,
593
+ placement: s,
594
+ middlewareData: c
595
+ } = e, f = await rn(e, t);
596
+ return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
597
+ x: r + f.x,
598
+ y: i + f.y,
599
+ data: {
600
+ ...f,
601
+ placement: s
602
+ }
603
+ };
604
+ }
605
+ };
606
+ }, cn = function(t) {
607
+ return t === void 0 && (t = {}), {
608
+ name: "shift",
609
+ options: t,
610
+ async fn(e) {
611
+ const {
612
+ x: n,
613
+ y: o,
614
+ placement: r
615
+ } = e, {
616
+ mainAxis: i = !0,
617
+ crossAxis: s = !1,
618
+ limiter: c = {
619
+ fn: (w) => {
620
+ let {
621
+ x: g,
622
+ y: x
623
+ } = w;
624
+ return {
625
+ x: g,
626
+ y: x
627
+ };
628
+ }
629
+ },
630
+ ...f
631
+ } = U(t, e), l = {
632
+ x: n,
633
+ y: o
634
+ }, a = await rt(e, f), u = z(q(r)), p = St(u);
635
+ let d = l[p], m = l[u];
636
+ if (i) {
637
+ const w = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", x = d + a[w], P = d - a[g];
638
+ d = Et(x, d, P);
639
+ }
640
+ if (s) {
641
+ const w = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", x = m + a[w], P = m - a[g];
642
+ m = Et(x, m, P);
643
+ }
644
+ const h = c.fn({
645
+ ...e,
646
+ [p]: d,
647
+ [u]: m
648
+ });
649
+ return {
650
+ ...h,
651
+ data: {
652
+ x: h.x - n,
653
+ y: h.y - o,
654
+ enabled: {
655
+ [p]: i,
656
+ [u]: s
657
+ }
658
+ }
659
+ };
660
+ }
661
+ };
662
+ }, ln = function(t) {
663
+ return t === void 0 && (t = {}), {
664
+ options: t,
665
+ fn(e) {
666
+ const {
667
+ x: n,
668
+ y: o,
669
+ placement: r,
670
+ rects: i,
671
+ middlewareData: s
672
+ } = e, {
673
+ offset: c = 0,
674
+ mainAxis: f = !0,
675
+ crossAxis: l = !0
676
+ } = U(t, e), a = {
677
+ x: n,
678
+ y: o
679
+ }, u = z(r), p = St(u);
680
+ let d = a[p], m = a[u];
681
+ const h = U(c, e), w = typeof h == "number" ? {
682
+ mainAxis: h,
683
+ crossAxis: 0
684
+ } : {
685
+ mainAxis: 0,
686
+ crossAxis: 0,
687
+ ...h
688
+ };
689
+ if (f) {
690
+ const P = p === "y" ? "height" : "width", b = i.reference[p] - i.floating[P] + w.mainAxis, A = i.reference[p] + i.reference[P] - w.mainAxis;
691
+ d < b ? d = b : d > A && (d = A);
692
+ }
693
+ if (l) {
694
+ var g, x;
695
+ const P = p === "y" ? "width" : "height", b = ["top", "left"].includes(q(r)), A = i.reference[u] - i.floating[P] + (b && ((g = s.offset) == null ? void 0 : g[u]) || 0) + (b ? 0 : w.crossAxis), R = i.reference[u] + i.reference[P] + (b ? 0 : ((x = s.offset) == null ? void 0 : x[u]) || 0) - (b ? w.crossAxis : 0);
696
+ m < A ? m = A : m > R && (m = R);
697
+ }
698
+ return {
699
+ [p]: d,
700
+ [u]: m
701
+ };
702
+ }
703
+ };
704
+ }, an = function(t) {
705
+ return t === void 0 && (t = {}), {
706
+ name: "size",
707
+ options: t,
708
+ async fn(e) {
709
+ var n, o;
710
+ const {
711
+ placement: r,
712
+ rects: i,
713
+ platform: s,
714
+ elements: c
715
+ } = e, {
716
+ apply: f = () => {
717
+ },
718
+ ...l
719
+ } = U(t, e), a = await rt(e, l), u = q(r), p = et(r), d = z(r) === "y", {
720
+ width: m,
721
+ height: h
722
+ } = i.floating;
723
+ let w, g;
724
+ u === "top" || u === "bottom" ? (w = u, g = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (g = u, w = p === "end" ? "top" : "bottom");
725
+ const x = h - a.top - a.bottom, P = m - a.left - a.right, b = Z(h - a[w], x), A = Z(m - a[g], P), R = !e.middlewareData.shift;
726
+ let v = b, O = A;
727
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (O = P), (o = e.middlewareData.shift) != null && o.enabled.y && (v = x), R && !p) {
728
+ const C = $(a.left, 0), F = $(a.right, 0), k = $(a.top, 0), D = $(a.bottom, 0);
729
+ d ? O = m - 2 * (C !== 0 || F !== 0 ? C + F : $(a.left, a.right)) : v = h - 2 * (k !== 0 || D !== 0 ? k + D : $(a.top, a.bottom));
730
+ }
731
+ await f({
732
+ ...e,
733
+ availableWidth: O,
734
+ availableHeight: v
735
+ });
736
+ const M = await s.getDimensions(c.floating);
737
+ return m !== M.width || h !== M.height ? {
738
+ reset: {
739
+ rects: !0
740
+ }
741
+ } : {};
742
+ }
743
+ };
744
+ };
745
+ function gt() {
746
+ return typeof window < "u";
747
+ }
748
+ function nt(t) {
749
+ return oe(t) ? (t.nodeName || "").toLowerCase() : "#document";
750
+ }
751
+ function B(t) {
752
+ var e;
753
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
754
+ }
755
+ function X(t) {
756
+ var e;
757
+ return (e = (oe(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
758
+ }
759
+ function oe(t) {
760
+ return gt() ? t instanceof Node || t instanceof B(t).Node : !1;
761
+ }
762
+ function H(t) {
763
+ return gt() ? t instanceof Element || t instanceof B(t).Element : !1;
764
+ }
765
+ function Y(t) {
766
+ return gt() ? t instanceof HTMLElement || t instanceof B(t).HTMLElement : !1;
767
+ }
768
+ function Zt(t) {
769
+ return !gt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof B(t).ShadowRoot;
770
+ }
771
+ function st(t) {
772
+ const {
773
+ overflow: e,
774
+ overflowX: n,
775
+ overflowY: o,
776
+ display: r
777
+ } = j(t);
778
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(r);
779
+ }
780
+ function fn(t) {
781
+ return ["table", "td", "th"].includes(nt(t));
782
+ }
783
+ function wt(t) {
784
+ return [":popover-open", ":modal"].some((e) => {
785
+ try {
786
+ return t.matches(e);
787
+ } catch {
788
+ return !1;
789
+ }
790
+ });
791
+ }
792
+ function Tt(t) {
793
+ const e = Mt(), n = H(t) ? j(t) : t;
794
+ return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
795
+ }
796
+ function un(t) {
797
+ let e = K(t);
798
+ for (; Y(e) && !Q(e); ) {
799
+ if (Tt(e))
800
+ return e;
801
+ if (wt(e))
802
+ return null;
803
+ e = K(e);
804
+ }
805
+ return null;
806
+ }
807
+ function Mt() {
808
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
809
+ }
810
+ function Q(t) {
811
+ return ["html", "body", "#document"].includes(nt(t));
812
+ }
813
+ function j(t) {
814
+ return B(t).getComputedStyle(t);
815
+ }
816
+ function yt(t) {
817
+ return H(t) ? {
818
+ scrollLeft: t.scrollLeft,
819
+ scrollTop: t.scrollTop
820
+ } : {
821
+ scrollLeft: t.scrollX,
822
+ scrollTop: t.scrollY
823
+ };
824
+ }
825
+ function K(t) {
826
+ if (nt(t) === "html")
827
+ return t;
828
+ const e = (
829
+ // Step into the shadow DOM of the parent of a slotted node.
830
+ t.assignedSlot || // DOM Element detected.
831
+ t.parentNode || // ShadowRoot detected.
832
+ Zt(t) && t.host || // Fallback.
833
+ X(t)
834
+ );
835
+ return Zt(e) ? e.host : e;
836
+ }
837
+ function re(t) {
838
+ const e = K(t);
839
+ return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : Y(e) && st(e) ? e : re(e);
840
+ }
841
+ function it(t, e, n) {
842
+ var o;
843
+ e === void 0 && (e = []), n === void 0 && (n = !0);
844
+ const r = re(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = B(r);
845
+ if (i) {
846
+ const c = Ot(s);
847
+ return e.concat(s, s.visualViewport || [], st(r) ? r : [], c && n ? it(c) : []);
848
+ }
849
+ return e.concat(r, it(r, [], n));
850
+ }
851
+ function Ot(t) {
852
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
853
+ }
854
+ function ie(t) {
855
+ const e = j(t);
856
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
857
+ const r = Y(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = ut(n) !== i || ut(o) !== s;
858
+ return c && (n = i, o = s), {
859
+ width: n,
860
+ height: o,
861
+ $: c
862
+ };
863
+ }
864
+ function Nt(t) {
865
+ return H(t) ? t : t.contextElement;
866
+ }
867
+ function J(t) {
868
+ const e = Nt(t);
869
+ if (!Y(e))
870
+ return V(1);
871
+ const n = e.getBoundingClientRect(), {
872
+ width: o,
873
+ height: r,
874
+ $: i
875
+ } = ie(e);
876
+ let s = (i ? ut(n.width) : n.width) / o, c = (i ? ut(n.height) : n.height) / r;
877
+ return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
878
+ x: s,
879
+ y: c
880
+ };
881
+ }
882
+ const dn = /* @__PURE__ */ V(0);
883
+ function se(t) {
884
+ const e = B(t);
885
+ return !Mt() || !e.visualViewport ? dn : {
886
+ x: e.visualViewport.offsetLeft,
887
+ y: e.visualViewport.offsetTop
888
+ };
889
+ }
890
+ function pn(t, e, n) {
891
+ return e === void 0 && (e = !1), !n || e && n !== B(t) ? !1 : e;
892
+ }
893
+ function G(t, e, n, o) {
894
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
895
+ const r = t.getBoundingClientRect(), i = Nt(t);
896
+ let s = V(1);
897
+ e && (o ? H(o) && (s = J(o)) : s = J(t));
898
+ const c = pn(i, n, o) ? se(i) : V(0);
899
+ let f = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, a = r.width / s.x, u = r.height / s.y;
900
+ if (i) {
901
+ const p = B(i), d = o && H(o) ? B(o) : o;
902
+ let m = p, h = Ot(m);
903
+ for (; h && o && d !== m; ) {
904
+ const w = J(h), g = h.getBoundingClientRect(), x = j(h), P = g.left + (h.clientLeft + parseFloat(x.paddingLeft)) * w.x, b = g.top + (h.clientTop + parseFloat(x.paddingTop)) * w.y;
905
+ f *= w.x, l *= w.y, a *= w.x, u *= w.y, f += P, l += b, m = B(h), h = Ot(m);
906
+ }
907
+ }
908
+ return pt({
909
+ width: a,
910
+ height: u,
911
+ x: f,
912
+ y: l
913
+ });
914
+ }
915
+ function Ft(t, e) {
916
+ const n = yt(t).scrollLeft;
917
+ return e ? e.left + n : G(X(t)).left + n;
918
+ }
919
+ function ce(t, e, n) {
920
+ n === void 0 && (n = !1);
921
+ const o = t.getBoundingClientRect(), r = o.left + e.scrollLeft - (n ? 0 : (
922
+ // RTL <body> scrollbar.
923
+ Ft(t, o)
924
+ )), i = o.top + e.scrollTop;
925
+ return {
926
+ x: r,
927
+ y: i
928
+ };
929
+ }
930
+ function mn(t) {
931
+ let {
932
+ elements: e,
933
+ rect: n,
934
+ offsetParent: o,
935
+ strategy: r
936
+ } = t;
937
+ const i = r === "fixed", s = X(o), c = e ? wt(e.floating) : !1;
938
+ if (o === s || c && i)
939
+ return n;
940
+ let f = {
941
+ scrollLeft: 0,
942
+ scrollTop: 0
943
+ }, l = V(1);
944
+ const a = V(0), u = Y(o);
945
+ if ((u || !u && !i) && ((nt(o) !== "body" || st(s)) && (f = yt(o)), Y(o))) {
946
+ const d = G(o);
947
+ l = J(o), a.x = d.x + o.clientLeft, a.y = d.y + o.clientTop;
948
+ }
949
+ const p = s && !u && !i ? ce(s, f, !0) : V(0);
950
+ return {
951
+ width: n.width * l.x,
952
+ height: n.height * l.y,
953
+ x: n.x * l.x - f.scrollLeft * l.x + a.x + p.x,
954
+ y: n.y * l.y - f.scrollTop * l.y + a.y + p.y
955
+ };
956
+ }
957
+ function hn(t) {
958
+ return Array.from(t.getClientRects());
959
+ }
960
+ function gn(t) {
961
+ const e = X(t), n = yt(t), o = t.ownerDocument.body, r = $(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = $(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
962
+ let s = -n.scrollLeft + Ft(t);
963
+ const c = -n.scrollTop;
964
+ return j(o).direction === "rtl" && (s += $(e.clientWidth, o.clientWidth) - r), {
965
+ width: r,
966
+ height: i,
967
+ x: s,
968
+ y: c
969
+ };
970
+ }
971
+ function wn(t, e) {
972
+ const n = B(t), o = X(t), r = n.visualViewport;
973
+ let i = o.clientWidth, s = o.clientHeight, c = 0, f = 0;
974
+ if (r) {
975
+ i = r.width, s = r.height;
976
+ const l = Mt();
977
+ (!l || l && e === "fixed") && (c = r.offsetLeft, f = r.offsetTop);
978
+ }
979
+ return {
980
+ width: i,
981
+ height: s,
982
+ x: c,
983
+ y: f
984
+ };
985
+ }
986
+ function yn(t, e) {
987
+ const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = Y(t) ? J(t) : V(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, f = r * i.x, l = o * i.y;
988
+ return {
989
+ width: s,
990
+ height: c,
991
+ x: f,
992
+ y: l
993
+ };
994
+ }
995
+ function Kt(t, e, n) {
996
+ let o;
997
+ if (e === "viewport")
998
+ o = wn(t, n);
999
+ else if (e === "document")
1000
+ o = gn(X(t));
1001
+ else if (H(e))
1002
+ o = yn(e, n);
1003
+ else {
1004
+ const r = se(t);
1005
+ o = {
1006
+ x: e.x - r.x,
1007
+ y: e.y - r.y,
1008
+ width: e.width,
1009
+ height: e.height
1010
+ };
1011
+ }
1012
+ return pt(o);
1013
+ }
1014
+ function le(t, e) {
1015
+ const n = K(t);
1016
+ return n === e || !H(n) || Q(n) ? !1 : j(n).position === "fixed" || le(n, e);
1017
+ }
1018
+ function xn(t, e) {
1019
+ const n = e.get(t);
1020
+ if (n)
1021
+ return n;
1022
+ let o = it(t, [], !1).filter((c) => H(c) && nt(c) !== "body"), r = null;
1023
+ const i = j(t).position === "fixed";
1024
+ let s = i ? K(t) : t;
1025
+ for (; H(s) && !Q(s); ) {
1026
+ const c = j(s), f = Tt(s);
1027
+ !f && c.position === "fixed" && (r = null), (i ? !f && !r : !f && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || st(s) && !f && le(t, s)) ? o = o.filter((a) => a !== s) : r = c, s = K(s);
1028
+ }
1029
+ return e.set(t, o), o;
1030
+ }
1031
+ function vn(t) {
1032
+ let {
1033
+ element: e,
1034
+ boundary: n,
1035
+ rootBoundary: o,
1036
+ strategy: r
1037
+ } = t;
1038
+ const s = [...n === "clippingAncestors" ? wt(e) ? [] : xn(e, this._c) : [].concat(n), o], c = s[0], f = s.reduce((l, a) => {
1039
+ const u = Kt(e, a, r);
1040
+ return l.top = $(u.top, l.top), l.right = Z(u.right, l.right), l.bottom = Z(u.bottom, l.bottom), l.left = $(u.left, l.left), l;
1041
+ }, Kt(e, c, r));
1042
+ return {
1043
+ width: f.right - f.left,
1044
+ height: f.bottom - f.top,
1045
+ x: f.left,
1046
+ y: f.top
1047
+ };
1048
+ }
1049
+ function bn(t) {
1050
+ const {
1051
+ width: e,
1052
+ height: n
1053
+ } = ie(t);
1054
+ return {
1055
+ width: e,
1056
+ height: n
1057
+ };
1058
+ }
1059
+ function An(t, e, n) {
1060
+ const o = Y(e), r = X(e), i = n === "fixed", s = G(t, !0, i, e);
1061
+ let c = {
1062
+ scrollLeft: 0,
1063
+ scrollTop: 0
1064
+ };
1065
+ const f = V(0);
1066
+ function l() {
1067
+ f.x = Ft(r);
1068
+ }
1069
+ if (o || !o && !i)
1070
+ if ((nt(e) !== "body" || st(r)) && (c = yt(e)), o) {
1071
+ const d = G(e, !0, i, e);
1072
+ f.x = d.x + e.clientLeft, f.y = d.y + e.clientTop;
1073
+ } else r && l();
1074
+ i && !o && r && l();
1075
+ const a = r && !o && !i ? ce(r, c) : V(0), u = s.left + c.scrollLeft - f.x - a.x, p = s.top + c.scrollTop - f.y - a.y;
1076
+ return {
1077
+ x: u,
1078
+ y: p,
1079
+ width: s.width,
1080
+ height: s.height
1081
+ };
1082
+ }
1083
+ function vt(t) {
1084
+ return j(t).position === "static";
1085
+ }
1086
+ function Gt(t, e) {
1087
+ if (!Y(t) || j(t).position === "fixed")
1088
+ return null;
1089
+ if (e)
1090
+ return e(t);
1091
+ let n = t.offsetParent;
1092
+ return X(t) === n && (n = n.ownerDocument.body), n;
1093
+ }
1094
+ function ae(t, e) {
1095
+ const n = B(t);
1096
+ if (wt(t))
1097
+ return n;
1098
+ if (!Y(t)) {
1099
+ let r = K(t);
1100
+ for (; r && !Q(r); ) {
1101
+ if (H(r) && !vt(r))
1102
+ return r;
1103
+ r = K(r);
1104
+ }
1105
+ return n;
1106
+ }
1107
+ let o = Gt(t, e);
1108
+ for (; o && fn(o) && vt(o); )
1109
+ o = Gt(o, e);
1110
+ return o && Q(o) && vt(o) && !Tt(o) ? n : o || un(t) || n;
1111
+ }
1112
+ const Pn = async function(t) {
1113
+ const e = this.getOffsetParent || ae, n = this.getDimensions, o = await n(t.floating);
1114
+ return {
1115
+ reference: An(t.reference, await e(t.floating), t.strategy),
1116
+ floating: {
1117
+ x: 0,
1118
+ y: 0,
1119
+ width: o.width,
1120
+ height: o.height
1121
+ }
1122
+ };
1123
+ };
1124
+ function En(t) {
1125
+ return j(t).direction === "rtl";
1126
+ }
1127
+ const Rn = {
1128
+ convertOffsetParentRelativeRectToViewportRelativeRect: mn,
1129
+ getDocumentElement: X,
1130
+ getClippingRect: vn,
1131
+ getOffsetParent: ae,
1132
+ getElementRects: Pn,
1133
+ getClientRects: hn,
1134
+ getDimensions: bn,
1135
+ getScale: J,
1136
+ isElement: H,
1137
+ isRTL: En
1138
+ };
1139
+ function fe(t, e) {
1140
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1141
+ }
1142
+ function On(t, e) {
1143
+ let n = null, o;
1144
+ const r = X(t);
1145
+ function i() {
1146
+ var c;
1147
+ clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
1148
+ }
1149
+ function s(c, f) {
1150
+ c === void 0 && (c = !1), f === void 0 && (f = 1), i();
1151
+ const l = t.getBoundingClientRect(), {
1152
+ left: a,
1153
+ top: u,
1154
+ width: p,
1155
+ height: d
1156
+ } = l;
1157
+ if (c || e(), !p || !d)
1158
+ return;
1159
+ const m = at(u), h = at(r.clientWidth - (a + p)), w = at(r.clientHeight - (u + d)), g = at(a), P = {
1160
+ rootMargin: -m + "px " + -h + "px " + -w + "px " + -g + "px",
1161
+ threshold: $(0, Z(1, f)) || 1
1162
+ };
1163
+ let b = !0;
1164
+ function A(R) {
1165
+ const v = R[0].intersectionRatio;
1166
+ if (v !== f) {
1167
+ if (!b)
1168
+ return s();
1169
+ v ? s(!1, v) : o = setTimeout(() => {
1170
+ s(!1, 1e-7);
1171
+ }, 1e3);
1172
+ }
1173
+ v === 1 && !fe(l, t.getBoundingClientRect()) && s(), b = !1;
1174
+ }
1175
+ try {
1176
+ n = new IntersectionObserver(A, {
1177
+ ...P,
1178
+ // Handle <iframe>s
1179
+ root: r.ownerDocument
1180
+ });
1181
+ } catch {
1182
+ n = new IntersectionObserver(A, P);
1183
+ }
1184
+ n.observe(t);
1185
+ }
1186
+ return s(!0), i;
1187
+ }
1188
+ function Cn(t, e, n, o) {
1189
+ o === void 0 && (o = {});
1190
+ const {
1191
+ ancestorScroll: r = !0,
1192
+ ancestorResize: i = !0,
1193
+ elementResize: s = typeof ResizeObserver == "function",
1194
+ layoutShift: c = typeof IntersectionObserver == "function",
1195
+ animationFrame: f = !1
1196
+ } = o, l = Nt(t), a = r || i ? [...l ? it(l) : [], ...it(e)] : [];
1197
+ a.forEach((g) => {
1198
+ r && g.addEventListener("scroll", n, {
1199
+ passive: !0
1200
+ }), i && g.addEventListener("resize", n);
1201
+ });
1202
+ const u = l && c ? On(l, n) : null;
1203
+ let p = -1, d = null;
1204
+ s && (d = new ResizeObserver((g) => {
1205
+ let [x] = g;
1206
+ x && x.target === l && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1207
+ var P;
1208
+ (P = d) == null || P.observe(e);
1209
+ })), n();
1210
+ }), l && !f && d.observe(l), d.observe(e));
1211
+ let m, h = f ? G(t) : null;
1212
+ f && w();
1213
+ function w() {
1214
+ const g = G(t);
1215
+ h && !fe(h, g) && n(), h = g, m = requestAnimationFrame(w);
1216
+ }
1217
+ return n(), () => {
1218
+ var g;
1219
+ a.forEach((x) => {
1220
+ r && x.removeEventListener("scroll", n), i && x.removeEventListener("resize", n);
1221
+ }), u == null || u(), (g = d) == null || g.disconnect(), d = null, f && cancelAnimationFrame(m);
1222
+ };
1223
+ }
1224
+ const Sn = sn, Dn = cn, Ln = nn, Tn = an, Mn = on, Jt = en, Nn = ln, Fn = (t, e, n) => {
1225
+ const o = /* @__PURE__ */ new Map(), r = {
1226
+ platform: Rn,
1227
+ ...n
1228
+ }, i = {
1229
+ ...r.platform,
1230
+ _c: o
1231
+ };
1232
+ return tn(t, e, {
1233
+ ...r,
1234
+ platform: i
1235
+ });
1236
+ };
1237
+ var kn = typeof document < "u", Wn = function() {
1238
+ }, ft = kn ? Te : Wn;
1239
+ function mt(t, e) {
1240
+ if (t === e)
1241
+ return !0;
1242
+ if (typeof t != typeof e)
1243
+ return !1;
1244
+ if (typeof t == "function" && t.toString() === e.toString())
1245
+ return !0;
1246
+ let n, o, r;
1247
+ if (t && e && typeof t == "object") {
1248
+ if (Array.isArray(t)) {
1249
+ if (n = t.length, n !== e.length) return !1;
1250
+ for (o = n; o-- !== 0; )
1251
+ if (!mt(t[o], e[o]))
1252
+ return !1;
1253
+ return !0;
1254
+ }
1255
+ if (r = Object.keys(t), n = r.length, n !== Object.keys(e).length)
1256
+ return !1;
1257
+ for (o = n; o-- !== 0; )
1258
+ if (!{}.hasOwnProperty.call(e, r[o]))
1259
+ return !1;
1260
+ for (o = n; o-- !== 0; ) {
1261
+ const i = r[o];
1262
+ if (!(i === "_owner" && t.$$typeof) && !mt(t[i], e[i]))
1263
+ return !1;
1264
+ }
1265
+ return !0;
1266
+ }
1267
+ return t !== t && e !== e;
1268
+ }
1269
+ function ue(t) {
1270
+ return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1271
+ }
1272
+ function Qt(t, e) {
1273
+ const n = ue(t);
1274
+ return Math.round(e * n) / n;
1275
+ }
1276
+ function bt(t) {
1277
+ const e = y.useRef(t);
1278
+ return ft(() => {
1279
+ e.current = t;
1280
+ }), e;
1281
+ }
1282
+ function $n(t) {
1283
+ t === void 0 && (t = {});
1284
+ const {
1285
+ placement: e = "bottom",
1286
+ strategy: n = "absolute",
1287
+ middleware: o = [],
1288
+ platform: r,
1289
+ elements: {
1290
+ reference: i,
1291
+ floating: s
1292
+ } = {},
1293
+ transform: c = !0,
1294
+ whileElementsMounted: f,
1295
+ open: l
1296
+ } = t, [a, u] = y.useState({
1297
+ x: 0,
1298
+ y: 0,
1299
+ strategy: n,
1300
+ placement: e,
1301
+ middlewareData: {},
1302
+ isPositioned: !1
1303
+ }), [p, d] = y.useState(o);
1304
+ mt(p, o) || d(o);
1305
+ const [m, h] = y.useState(null), [w, g] = y.useState(null), x = y.useCallback((E) => {
1306
+ E !== R.current && (R.current = E, h(E));
1307
+ }, []), P = y.useCallback((E) => {
1308
+ E !== v.current && (v.current = E, g(E));
1309
+ }, []), b = i || m, A = s || w, R = y.useRef(null), v = y.useRef(null), O = y.useRef(a), M = f != null, C = bt(f), F = bt(r), k = bt(l), D = y.useCallback(() => {
1310
+ if (!R.current || !v.current)
1311
+ return;
1312
+ const E = {
1313
+ placement: e,
1314
+ strategy: n,
1315
+ middleware: p
1316
+ };
1317
+ F.current && (E.platform = F.current), Fn(R.current, v.current, E).then((N) => {
1318
+ const I = {
1319
+ ...N,
1320
+ // The floating element's position may be recomputed while it's closed
1321
+ // but still mounted (such as when transitioning out). To ensure
1322
+ // `isPositioned` will be `false` initially on the next open, avoid
1323
+ // setting it to `true` when `open === false` (must be specified).
1324
+ isPositioned: k.current !== !1
1325
+ };
1326
+ S.current && !mt(O.current, I) && (O.current = I, We.flushSync(() => {
1327
+ u(I);
1328
+ }));
1329
+ });
1330
+ }, [p, e, n, F, k]);
1331
+ ft(() => {
1332
+ l === !1 && O.current.isPositioned && (O.current.isPositioned = !1, u((E) => ({
1333
+ ...E,
1334
+ isPositioned: !1
1335
+ })));
1336
+ }, [l]);
1337
+ const S = y.useRef(!1);
1338
+ ft(() => (S.current = !0, () => {
1339
+ S.current = !1;
1340
+ }), []), ft(() => {
1341
+ if (b && (R.current = b), A && (v.current = A), b && A) {
1342
+ if (C.current)
1343
+ return C.current(b, A, D);
1344
+ D();
1345
+ }
1346
+ }, [b, A, D, C, M]);
1347
+ const W = y.useMemo(() => ({
1348
+ reference: R,
1349
+ floating: v,
1350
+ setReference: x,
1351
+ setFloating: P
1352
+ }), [x, P]), L = y.useMemo(() => ({
1353
+ reference: b,
1354
+ floating: A
1355
+ }), [b, A]), T = y.useMemo(() => {
1356
+ const E = {
1357
+ position: n,
1358
+ left: 0,
1359
+ top: 0
1360
+ };
1361
+ if (!L.floating)
1362
+ return E;
1363
+ const N = Qt(L.floating, a.x), I = Qt(L.floating, a.y);
1364
+ return c ? {
1365
+ ...E,
1366
+ transform: "translate(" + N + "px, " + I + "px)",
1367
+ ...ue(L.floating) >= 1.5 && {
1368
+ willChange: "transform"
1369
+ }
1370
+ } : {
1371
+ position: n,
1372
+ left: N,
1373
+ top: I
1374
+ };
1375
+ }, [n, c, L.floating, a.x, a.y]);
1376
+ return y.useMemo(() => ({
1377
+ ...a,
1378
+ update: D,
1379
+ refs: W,
1380
+ elements: L,
1381
+ floatingStyles: T
1382
+ }), [a, D, W, L, T]);
1383
+ }
1384
+ const Bn = (t) => {
1385
+ function e(n) {
1386
+ return {}.hasOwnProperty.call(n, "current");
1387
+ }
1388
+ return {
1389
+ name: "arrow",
1390
+ options: t,
1391
+ fn(n) {
1392
+ const {
1393
+ element: o,
1394
+ padding: r
1395
+ } = typeof t == "function" ? t(n) : t;
1396
+ return o && e(o) ? o.current != null ? Jt({
1397
+ element: o.current,
1398
+ padding: r
1399
+ }).fn(n) : {} : o ? Jt({
1400
+ element: o,
1401
+ padding: r
1402
+ }).fn(n) : {};
1403
+ }
1404
+ };
1405
+ }, _n = (t, e) => ({
1406
+ ...Sn(t),
1407
+ options: [t, e]
1408
+ }), Hn = (t, e) => ({
1409
+ ...Dn(t),
1410
+ options: [t, e]
1411
+ }), jn = (t, e) => ({
1412
+ ...Nn(t),
1413
+ options: [t, e]
1414
+ }), In = (t, e) => ({
1415
+ ...Ln(t),
1416
+ options: [t, e]
1417
+ }), zn = (t, e) => ({
1418
+ ...Tn(t),
1419
+ options: [t, e]
1420
+ }), Vn = (t, e) => ({
1421
+ ...Mn(t),
1422
+ options: [t, e]
1423
+ }), Yn = (t, e) => ({
1424
+ ...Bn(t),
1425
+ options: [t, e]
1426
+ });
1427
+ var Xn = "Arrow", de = y.forwardRef((t, e) => {
1428
+ const { children: n, width: o = 10, height: r = 5, ...i } = t;
1429
+ return /* @__PURE__ */ _.jsx(
1430
+ tt.svg,
1431
+ {
1432
+ ...i,
1433
+ ref: e,
1434
+ width: o,
1435
+ height: r,
1436
+ viewBox: "0 0 30 10",
1437
+ preserveAspectRatio: "none",
1438
+ children: t.asChild ? n : /* @__PURE__ */ _.jsx("polygon", { points: "0,0 30,0 15,10" })
1439
+ }
1440
+ );
1441
+ });
1442
+ de.displayName = Xn;
1443
+ var Un = de, kt = "Popper", [pe, ao] = Me(kt), [qn, me] = pe(kt), he = (t) => {
1444
+ const { __scopePopper: e, children: n } = t, [o, r] = y.useState(null);
1445
+ return /* @__PURE__ */ _.jsx(qn, { scope: e, anchor: o, onAnchorChange: r, children: n });
1446
+ };
1447
+ he.displayName = kt;
1448
+ var ge = "PopperAnchor", we = y.forwardRef(
1449
+ (t, e) => {
1450
+ const { __scopePopper: n, virtualRef: o, ...r } = t, i = me(ge, n), s = y.useRef(null), c = ht(e, s);
1451
+ return y.useEffect(() => {
1452
+ i.onAnchorChange((o == null ? void 0 : o.current) || s.current);
1453
+ }), o ? null : /* @__PURE__ */ _.jsx(tt.div, { ...r, ref: c });
1454
+ }
1455
+ );
1456
+ we.displayName = ge;
1457
+ var Wt = "PopperContent", [Zn, Kn] = pe(Wt), ye = y.forwardRef(
1458
+ (t, e) => {
1459
+ var $t, Bt, _t, Ht, jt, It;
1460
+ const {
1461
+ __scopePopper: n,
1462
+ side: o = "bottom",
1463
+ sideOffset: r = 0,
1464
+ align: i = "center",
1465
+ alignOffset: s = 0,
1466
+ arrowPadding: c = 0,
1467
+ avoidCollisions: f = !0,
1468
+ collisionBoundary: l = [],
1469
+ collisionPadding: a = 0,
1470
+ sticky: u = "partial",
1471
+ hideWhenDetached: p = !1,
1472
+ updatePositionStrategy: d = "optimized",
1473
+ onPlaced: m,
1474
+ ...h
1475
+ } = t, w = me(Wt, n), [g, x] = y.useState(null), P = ht(e, (ot) => x(ot)), [b, A] = y.useState(null), R = Fe(b), v = (R == null ? void 0 : R.width) ?? 0, O = (R == null ? void 0 : R.height) ?? 0, M = o + (i !== "center" ? "-" + i : ""), C = typeof a == "number" ? a : { top: 0, right: 0, bottom: 0, left: 0, ...a }, F = Array.isArray(l) ? l : [l], k = F.length > 0, D = {
1476
+ padding: C,
1477
+ boundary: F.filter(Jn),
1478
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
1479
+ altBoundary: k
1480
+ }, { refs: S, floatingStyles: W, placement: L, isPositioned: T, middlewareData: E } = $n({
1481
+ // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
1482
+ strategy: "fixed",
1483
+ placement: M,
1484
+ whileElementsMounted: (...ot) => Cn(...ot, {
1485
+ animationFrame: d === "always"
1486
+ }),
1487
+ elements: {
1488
+ reference: w.anchor
1489
+ },
1490
+ middleware: [
1491
+ _n({ mainAxis: r + O, alignmentAxis: s }),
1492
+ f && Hn({
1493
+ mainAxis: !0,
1494
+ crossAxis: !1,
1495
+ limiter: u === "partial" ? jn() : void 0,
1496
+ ...D
1497
+ }),
1498
+ f && In({ ...D }),
1499
+ zn({
1500
+ ...D,
1501
+ apply: ({ elements: ot, rects: zt, availableWidth: Ce, availableHeight: Se }) => {
1502
+ const { width: De, height: Le } = zt.reference, lt = ot.floating.style;
1503
+ lt.setProperty("--radix-popper-available-width", `${Ce}px`), lt.setProperty("--radix-popper-available-height", `${Se}px`), lt.setProperty("--radix-popper-anchor-width", `${De}px`), lt.setProperty("--radix-popper-anchor-height", `${Le}px`);
1504
+ }
1505
+ }),
1506
+ b && Yn({ element: b, padding: c }),
1507
+ Qn({ arrowWidth: v, arrowHeight: O }),
1508
+ p && Vn({ strategy: "referenceHidden", ...D })
1509
+ ]
1510
+ }), [N, I] = be(L), ct = Ct(m);
1511
+ At(() => {
1512
+ T && (ct == null || ct());
1513
+ }, [T, ct]);
1514
+ const Ae = ($t = E.arrow) == null ? void 0 : $t.x, Pe = (Bt = E.arrow) == null ? void 0 : Bt.y, Ee = ((_t = E.arrow) == null ? void 0 : _t.centerOffset) !== 0, [Re, Oe] = y.useState();
1515
+ return At(() => {
1516
+ g && Oe(window.getComputedStyle(g).zIndex);
1517
+ }, [g]), /* @__PURE__ */ _.jsx(
1518
+ "div",
1519
+ {
1520
+ ref: S.setFloating,
1521
+ "data-radix-popper-content-wrapper": "",
1522
+ style: {
1523
+ ...W,
1524
+ transform: T ? W.transform : "translate(0, -200%)",
1525
+ // keep off the page when measuring
1526
+ minWidth: "max-content",
1527
+ zIndex: Re,
1528
+ "--radix-popper-transform-origin": [
1529
+ (Ht = E.transformOrigin) == null ? void 0 : Ht.x,
1530
+ (jt = E.transformOrigin) == null ? void 0 : jt.y
1531
+ ].join(" "),
1532
+ // hide the content if using the hide middleware and should be hidden
1533
+ // set visibility to hidden and disable pointer events so the UI behaves
1534
+ // as if the PopperContent isn't there at all
1535
+ ...((It = E.hide) == null ? void 0 : It.referenceHidden) && {
1536
+ visibility: "hidden",
1537
+ pointerEvents: "none"
1538
+ }
1539
+ },
1540
+ dir: t.dir,
1541
+ children: /* @__PURE__ */ _.jsx(
1542
+ Zn,
1543
+ {
1544
+ scope: n,
1545
+ placedSide: N,
1546
+ onArrowChange: A,
1547
+ arrowX: Ae,
1548
+ arrowY: Pe,
1549
+ shouldHideArrow: Ee,
1550
+ children: /* @__PURE__ */ _.jsx(
1551
+ tt.div,
1552
+ {
1553
+ "data-side": N,
1554
+ "data-align": I,
1555
+ ...h,
1556
+ ref: P,
1557
+ style: {
1558
+ ...h.style,
1559
+ // if the PopperContent hasn't been placed yet (not all measurements done)
1560
+ // we prevent animations so that users's animation don't kick in too early referring wrong sides
1561
+ animation: T ? void 0 : "none"
1562
+ }
1563
+ }
1564
+ )
1565
+ }
1566
+ )
1567
+ }
1568
+ );
1569
+ }
1570
+ );
1571
+ ye.displayName = Wt;
1572
+ var xe = "PopperArrow", Gn = {
1573
+ top: "bottom",
1574
+ right: "left",
1575
+ bottom: "top",
1576
+ left: "right"
1577
+ }, ve = y.forwardRef(function(e, n) {
1578
+ const { __scopePopper: o, ...r } = e, i = Kn(xe, o), s = Gn[i.placedSide];
1579
+ return (
1580
+ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
1581
+ // doesn't report size as we'd expect on SVG elements.
1582
+ // it reports their bounding box which is effectively the largest path inside the SVG.
1583
+ /* @__PURE__ */ _.jsx(
1584
+ "span",
1585
+ {
1586
+ ref: i.onArrowChange,
1587
+ style: {
1588
+ position: "absolute",
1589
+ left: i.arrowX,
1590
+ top: i.arrowY,
1591
+ [s]: 0,
1592
+ transformOrigin: {
1593
+ top: "",
1594
+ right: "0 0",
1595
+ bottom: "center 0",
1596
+ left: "100% 0"
1597
+ }[i.placedSide],
1598
+ transform: {
1599
+ top: "translateY(100%)",
1600
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
1601
+ bottom: "rotate(180deg)",
1602
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
1603
+ }[i.placedSide],
1604
+ visibility: i.shouldHideArrow ? "hidden" : void 0
1605
+ },
1606
+ children: /* @__PURE__ */ _.jsx(
1607
+ Un,
1608
+ {
1609
+ ...r,
1610
+ ref: n,
1611
+ style: {
1612
+ ...r.style,
1613
+ // ensures the element can be measured correctly (mostly for if SVG)
1614
+ display: "block"
1615
+ }
1616
+ }
1617
+ )
1618
+ }
1619
+ )
1620
+ );
1621
+ });
1622
+ ve.displayName = xe;
1623
+ function Jn(t) {
1624
+ return t !== null;
1625
+ }
1626
+ var Qn = (t) => ({
1627
+ name: "transformOrigin",
1628
+ options: t,
1629
+ fn(e) {
1630
+ var w, g, x;
1631
+ const { placement: n, rects: o, middlewareData: r } = e, s = ((w = r.arrow) == null ? void 0 : w.centerOffset) !== 0, c = s ? 0 : t.arrowWidth, f = s ? 0 : t.arrowHeight, [l, a] = be(n), u = { start: "0%", center: "50%", end: "100%" }[a], p = (((g = r.arrow) == null ? void 0 : g.x) ?? 0) + c / 2, d = (((x = r.arrow) == null ? void 0 : x.y) ?? 0) + f / 2;
1632
+ let m = "", h = "";
1633
+ return l === "bottom" ? (m = s ? u : `${p}px`, h = `${-f}px`) : l === "top" ? (m = s ? u : `${p}px`, h = `${o.floating.height + f}px`) : l === "right" ? (m = `${-f}px`, h = s ? u : `${d}px`) : l === "left" && (m = `${o.floating.width + f}px`, h = s ? u : `${d}px`), { data: { x: m, y: h } };
1634
+ }
1635
+ });
1636
+ function be(t) {
1637
+ const [e, n = "center"] = t.split("-");
1638
+ return [e, n];
1639
+ }
1640
+ var fo = he, uo = we, po = ye, mo = ve, to = "Portal", eo = y.forwardRef((t, e) => {
1641
+ var c;
1642
+ const { container: n, ...o } = t, [r, i] = y.useState(!1);
1643
+ At(() => i(!0), []);
1644
+ const s = n || r && ((c = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : c.body);
1645
+ return s ? $e.createPortal(/* @__PURE__ */ _.jsx(tt.div, { ...o, ref: e }), s) : null;
1646
+ });
1647
+ eo.displayName = to;
1648
+ export {
1649
+ uo as A,
1650
+ po as C,
1651
+ je as D,
1652
+ eo as P,
1653
+ fo as R,
1654
+ mo as a,
1655
+ ao as c
1656
+ };