@pfct/purple 1.7.0-next.4 → 1.7.0-next.6

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