@orchidui/dashboard 1.8.1-95 → 1.8.1-96

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 (164) hide show
  1. package/dist/AccordionTrigger.vue_vue_type_script_setup_true_lang-BdmLII9i.js +295 -0
  2. package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-DpJRpFhK.js +891 -0
  3. package/dist/CardTitle.vue_vue_type_script_setup_true_lang-D2_Bj3jw.js +68 -0
  4. package/dist/Checkbox.vue_vue_type_script_setup_true_lang-C51LjITJ.js +172 -0
  5. package/dist/CollapsibleTrigger-fCarY5DJ.js +154 -0
  6. package/dist/Collection-COudIl-A.js +55 -0
  7. package/dist/ConfigProvider-7mV0D7Sp.js +6 -0
  8. package/dist/Dashboard/Card/OcCard.js +1 -1
  9. package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
  10. package/dist/DialogContent.vue_vue_type_script_setup_true_lang-CdrrrG29.js +68 -0
  11. package/dist/DialogOverlay-Cj3UTjZ8.js +309 -0
  12. package/dist/DialogPortal-zAvO8zt4.js +23 -0
  13. package/dist/DialogTrigger-BIF1A4hk.js +72 -0
  14. package/dist/DismissableLayer-C7IJliOb.js +151 -0
  15. package/dist/FocusScope--pJ6bboI.js +121 -0
  16. package/dist/FormMessage.vue_vue_type_script_setup_true_lang-DwlnFEn2.js +92 -0
  17. package/dist/Input.vue_vue_type_script_setup_true_lang-BrjsUUvL.js +27 -0
  18. package/dist/Label.vue_vue_type_script_setup_true_lang-D_LMIKBv.js +51 -0
  19. package/dist/ListboxItem-CjMk-mEX.js +417 -0
  20. package/dist/MenuSubTrigger-CUrxnPwO.js +845 -0
  21. package/dist/{OcCard-D3be6IMj.js → OcCard-B3SCzVwn.js} +54 -58
  22. package/dist/{OcLottieAnimation-0mdksHMn.js → OcLottieAnimation-DeMoIDaX.js} +1 -1
  23. package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-DtI_qIyx.js +394 -0
  24. package/dist/PopperContent-BT3Svcc3.js +1465 -0
  25. package/dist/Presence-CxfTrw6l.js +133 -0
  26. package/dist/Primitive-B3twiLO1.js +44 -0
  27. package/dist/{QuillEditor-DRwC0sgJ.js → QuillEditor-hFQ0MJZO.js} +556 -579
  28. package/dist/RadioGroupItem.vue_vue_type_script_setup_true_lang-BNfRYIhL.js +297 -0
  29. package/dist/RovingFocusGroup-0OHdFQl0.js +92 -0
  30. package/dist/RovingFocusItem-s7Ug6oxb.js +82 -0
  31. package/dist/SelectValue.vue_vue_type_script_setup_true_lang-CVsYrN1R.js +1255 -0
  32. package/dist/Separator-DRam5i7g.js +54 -0
  33. package/dist/Separator.vue_vue_type_script_setup_true_lang-DGPbh6Dt.js +27 -0
  34. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-k1A7l6Y-.js +17 -0
  35. package/dist/Switch.vue_vue_type_script_setup_true_lang-94ZKgnTz.js +135 -0
  36. package/dist/Teleport-DnUewq5H.js +25 -0
  37. package/dist/Textarea.vue_vue_type_script_setup_true_lang-DKazues9.js +27 -0
  38. package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-CZ3AuN38.js +426 -0
  39. package/dist/VisuallyHidden-DMAU4heD.js +41 -0
  40. package/dist/VisuallyHiddenInput-DvJnsVHt.js +59 -0
  41. package/dist/_commonjsHelpers-B4e78b8K.js +28 -0
  42. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  43. package/dist/array-CqVTtuYm.js +6 -0
  44. package/dist/arrays-4jDZqbdb.js +20 -0
  45. package/dist/check-C2tzJ0Gk.js +11 -0
  46. package/dist/chevron-down-CnpAlizg.js +13 -0
  47. package/dist/chevron-left-BOwFasou.js +13 -0
  48. package/dist/chevron-right-D308801z.js +13 -0
  49. package/dist/circle-A-6NpYiX.js +13 -0
  50. package/dist/clamp-BL1Rb24G.js +22 -0
  51. package/dist/constant-CuDQlTIy.js +3433 -0
  52. package/dist/createContext-CZEfaSVa.js +17 -0
  53. package/dist/createLucideIcon-eXqDwUWj.js +71 -0
  54. package/dist/ellipsis-CEG9G7eN.js +15 -0
  55. package/dist/getActiveElement-B-HWdUIb.js +11 -0
  56. package/dist/handleAndDispatchCustomEvent-Byh08EHr.js +11 -0
  57. package/dist/index-B3LW8uSH.js +133 -0
  58. package/dist/index-BIlpXuWX.js +3430 -0
  59. package/dist/index-BlGEiPHj.js +1246 -0
  60. package/dist/index-BwPb_idr.js +574 -0
  61. package/dist/index-C9julNQm.js +173 -0
  62. package/dist/index-C_aI-Wfj.js +34 -0
  63. package/dist/index-CumjCvqB.js +5703 -0
  64. package/dist/index-LqWMCtOd.js +809 -0
  65. package/dist/index-OpE2oGce.js +110 -0
  66. package/dist/index.js +3 -3
  67. package/dist/isValueEqualOrExist-BDSMUv8t.js +8 -0
  68. package/dist/lib/utils.js +5 -0
  69. package/dist/nullish-CjWwlQS3.js +6 -0
  70. package/dist/ohash.D__AXeF1-DX2n0b2C.js +106 -0
  71. package/dist/plus-CgluTYQY.js +14 -0
  72. package/dist/text-zwICaAnx.js +743 -0
  73. package/dist/ui/accordion/index.js +7 -0
  74. package/dist/ui/alert/index.js +64 -0
  75. package/dist/ui/alert-dialog/index.js +356 -0
  76. package/dist/ui/aspect-ratio/index.js +50 -0
  77. package/dist/ui/auto-form/constant.js +5 -0
  78. package/dist/ui/auto-form/dependencies.js +61 -0
  79. package/dist/ui/auto-form/index.js +227 -0
  80. package/dist/ui/auto-form/interface.js +4 -0
  81. package/dist/ui/auto-form/utils.js +89 -0
  82. package/dist/ui/avatar/index.js +189 -0
  83. package/dist/ui/badge/index.js +37 -0
  84. package/dist/ui/breadcrumb/index.js +126 -0
  85. package/dist/ui/button/index.js +55 -0
  86. package/dist/ui/calendar/index.js +15 -0
  87. package/dist/ui/card/index.js +38 -0
  88. package/dist/ui/carousel/index.js +174 -0
  89. package/dist/ui/carousel/interface.js +1 -0
  90. package/dist/ui/carousel/useCarousel.js +1288 -0
  91. package/dist/ui/chart/index.js +8 -0
  92. package/dist/ui/chart/interface.js +1 -0
  93. package/dist/ui/chart-area/index.js +331 -0
  94. package/dist/ui/chart-bar/index.js +490 -0
  95. package/dist/ui/chart-donut/index.js +509 -0
  96. package/dist/ui/chart-line/index.js +110 -0
  97. package/dist/ui/checkbox/index.js +4 -0
  98. package/dist/ui/collapsible/index.js +60 -0
  99. package/dist/ui/combobox/index.js +877 -0
  100. package/dist/ui/command/index.js +323 -0
  101. package/dist/ui/context-menu/index.js +734 -0
  102. package/dist/ui/dialog/index.js +169 -0
  103. package/dist/ui/drawer/index.js +971 -0
  104. package/dist/ui/dropdown-menu/index.js +723 -0
  105. package/dist/ui/form/index.js +13 -0
  106. package/dist/ui/form/injectionKeys.js +4 -0
  107. package/dist/ui/form/useFormField.js +25 -0
  108. package/dist/ui/hover-card/index.js +331 -0
  109. package/dist/ui/input/index.js +4 -0
  110. package/dist/ui/label/index.js +4 -0
  111. package/dist/ui/menubar/index.js +862 -0
  112. package/dist/ui/navigation-menu/index.js +873 -0
  113. package/dist/ui/number-field/index.js +682 -0
  114. package/dist/ui/pagination/index.js +444 -0
  115. package/dist/ui/pin-input/index.js +308 -0
  116. package/dist/ui/popover/index.js +6 -0
  117. package/dist/ui/progress/index.js +137 -0
  118. package/dist/ui/radio-group/index.js +5 -0
  119. package/dist/ui/range-calendar/index.js +986 -0
  120. package/dist/ui/resizable/index.js +1432 -0
  121. package/dist/ui/scroll-area/index.js +775 -0
  122. package/dist/ui/select/index.js +135 -0
  123. package/dist/ui/separator/index.js +4 -0
  124. package/dist/ui/sheet/index.js +188 -0
  125. package/dist/ui/sidebar/index.js +652 -0
  126. package/dist/ui/sidebar/utils.js +12 -0
  127. package/dist/ui/skeleton/index.js +4 -0
  128. package/dist/ui/slider/index.js +478 -0
  129. package/dist/ui/sonner/index.js +892 -0
  130. package/dist/ui/stepper/index.js +442 -0
  131. package/dist/ui/switch/index.js +4 -0
  132. package/dist/ui/table/index.js +153 -0
  133. package/dist/ui/tabs/index.js +280 -0
  134. package/dist/ui/tags-input/index.js +449 -0
  135. package/dist/ui/textarea/index.js +4 -0
  136. package/dist/ui/toast/index.js +738 -0
  137. package/dist/ui/toast/use-toast.js +85 -0
  138. package/dist/ui/toggle/index.js +6 -0
  139. package/dist/ui/toggle-group/index.js +112 -0
  140. package/dist/ui/tooltip/index.js +29 -0
  141. package/dist/useArrowNavigation-BRMPveaB.js +49 -0
  142. package/dist/useBodyScrollLock-CazCRZjZ.js +153 -0
  143. package/dist/useDirection-C3C_TLKm.js +14 -0
  144. package/dist/useFocusGuards-CyjC9cG9.js +26 -0
  145. package/dist/useFormControl-CFVC51Lp.js +11 -0
  146. package/dist/useForwardExpose-DZT6mL_U.js +37 -0
  147. package/dist/useForwardPropsEmits-0XKBv1pB.js +33 -0
  148. package/dist/useGraceArea-D7-GP1ii.js +137 -0
  149. package/dist/useId-reAg216X.js +13 -0
  150. package/dist/useKbd-BJNupnml.js +41 -0
  151. package/dist/useLocale-BfU0LC8Z.js +14 -0
  152. package/dist/useNonce-C1ZOgOp5.js +14 -0
  153. package/dist/usePrimitiveElement-BjwUvHih.js +15 -0
  154. package/dist/useSingleOrMultipleValue-BkTAaaJB.js +43 -0
  155. package/dist/useSize-BnyQ8FZF.js +37 -0
  156. package/dist/useTypeahead-oSidjyFF.js +40 -0
  157. package/dist/utils-DKNaYMZh.js +57 -0
  158. package/dist/utils-Dx9la83v.js +35 -0
  159. package/dist/utils-DxQ_ywGa.js +55 -0
  160. package/dist/utils-SFgRDk1R.js +2748 -0
  161. package/dist/utils-W-UiqiPE.js +1869 -0
  162. package/dist/vee-validate-Cf8JDJ_k.js +2232 -0
  163. package/dist/x-Cl6YllUK.js +14 -0
  164. package/package.json +264 -2
@@ -0,0 +1,1465 @@
1
+ import { computed as S, ref as Y, shallowRef as ne, watch as pt, getCurrentScope as oe, onScopeDispose as ie, shallowReadonly as Q, unref as _, defineComponent as bt, renderSlot as At, watchPostEffect as Ht, createBlock as re, openBlock as Vt, withCtx as zt, mergeDefaults as se, watchEffect as le, createElementBlock as ce, normalizeStyle as ae, createVNode as fe, mergeProps as ue } from "vue";
2
+ import { u as Nt } from "./useForwardExpose-DZT6mL_U.js";
3
+ import { P as It } from "./Primitive-B3twiLO1.js";
4
+ import { c as jt } from "./createContext-CZEfaSVa.js";
5
+ import { u as de } from "./useSize-BnyQ8FZF.js";
6
+ import { k as me } from "./index-BwPb_idr.js";
7
+ const pe = ["top", "right", "bottom", "left"], K = Math.min, $ = Math.max, ct = Math.round, lt = Math.floor, N = (t) => ({
8
+ x: t,
9
+ y: t
10
+ }), he = {
11
+ left: "right",
12
+ right: "left",
13
+ bottom: "top",
14
+ top: "bottom"
15
+ }, ge = {
16
+ start: "end",
17
+ end: "start"
18
+ };
19
+ function gt(t, e, n) {
20
+ return $(t, K(e, n));
21
+ }
22
+ function X(t, e) {
23
+ return typeof t == "function" ? t(e) : t;
24
+ }
25
+ function U(t) {
26
+ return t.split("-")[0];
27
+ }
28
+ function ot(t) {
29
+ return t.split("-")[1];
30
+ }
31
+ function Ct(t) {
32
+ return t === "x" ? "y" : "x";
33
+ }
34
+ function Ot(t) {
35
+ return t === "y" ? "height" : "width";
36
+ }
37
+ function z(t) {
38
+ return ["top", "bottom"].includes(U(t)) ? "y" : "x";
39
+ }
40
+ function Pt(t) {
41
+ return Ct(z(t));
42
+ }
43
+ function we(t, e, n) {
44
+ n === void 0 && (n = !1);
45
+ const o = ot(t), i = Pt(t), s = Ot(i);
46
+ let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
47
+ return e.reference[s] > e.floating[s] && (r = at(r)), [r, at(r)];
48
+ }
49
+ function xe(t) {
50
+ const e = at(t);
51
+ return [wt(t), e, wt(e)];
52
+ }
53
+ function wt(t) {
54
+ return t.replace(/start|end/g, (e) => ge[e]);
55
+ }
56
+ function ye(t, e, n) {
57
+ const o = ["left", "right"], i = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
58
+ switch (t) {
59
+ case "top":
60
+ case "bottom":
61
+ return n ? e ? i : o : e ? o : i;
62
+ case "left":
63
+ case "right":
64
+ return e ? s : r;
65
+ default:
66
+ return [];
67
+ }
68
+ }
69
+ function ve(t, e, n, o) {
70
+ const i = ot(t);
71
+ let s = ye(U(t), n === "start", o);
72
+ return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(wt)))), s;
73
+ }
74
+ function at(t) {
75
+ return t.replace(/left|right|bottom|top/g, (e) => he[e]);
76
+ }
77
+ function be(t) {
78
+ return {
79
+ top: 0,
80
+ right: 0,
81
+ bottom: 0,
82
+ left: 0,
83
+ ...t
84
+ };
85
+ }
86
+ function Yt(t) {
87
+ return typeof t != "number" ? be(t) : {
88
+ top: t,
89
+ right: t,
90
+ bottom: t,
91
+ left: t
92
+ };
93
+ }
94
+ function ft(t) {
95
+ const {
96
+ x: e,
97
+ y: n,
98
+ width: o,
99
+ height: i
100
+ } = t;
101
+ return {
102
+ width: o,
103
+ height: i,
104
+ top: n,
105
+ left: e,
106
+ right: e + o,
107
+ bottom: n + i,
108
+ x: e,
109
+ y: n
110
+ };
111
+ }
112
+ function Tt(t, e, n) {
113
+ let {
114
+ reference: o,
115
+ floating: i
116
+ } = t;
117
+ const s = z(e), r = Pt(e), l = Ot(r), c = U(e), a = s === "y", u = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, p = o[l] / 2 - i[l] / 2;
118
+ let f;
119
+ switch (c) {
120
+ case "top":
121
+ f = {
122
+ x: u,
123
+ y: o.y - i.height
124
+ };
125
+ break;
126
+ case "bottom":
127
+ f = {
128
+ x: u,
129
+ y: o.y + o.height
130
+ };
131
+ break;
132
+ case "right":
133
+ f = {
134
+ x: o.x + o.width,
135
+ y: d
136
+ };
137
+ break;
138
+ case "left":
139
+ f = {
140
+ x: o.x - i.width,
141
+ y: d
142
+ };
143
+ break;
144
+ default:
145
+ f = {
146
+ x: o.x,
147
+ y: o.y
148
+ };
149
+ }
150
+ switch (ot(e)) {
151
+ case "start":
152
+ f[r] -= p * (n && a ? -1 : 1);
153
+ break;
154
+ case "end":
155
+ f[r] += p * (n && a ? -1 : 1);
156
+ break;
157
+ }
158
+ return f;
159
+ }
160
+ const Ae = async (t, e, n) => {
161
+ const {
162
+ placement: o = "bottom",
163
+ strategy: i = "absolute",
164
+ middleware: s = [],
165
+ platform: r
166
+ } = n, l = s.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(e));
167
+ let a = await r.getElementRects({
168
+ reference: t,
169
+ floating: e,
170
+ strategy: i
171
+ }), {
172
+ x: u,
173
+ y: d
174
+ } = Tt(a, o, c), p = o, f = {}, m = 0;
175
+ for (let h = 0; h < l.length; h++) {
176
+ const {
177
+ name: g,
178
+ fn: w
179
+ } = l[h], {
180
+ x,
181
+ y,
182
+ data: v,
183
+ reset: A
184
+ } = await w({
185
+ x: u,
186
+ y: d,
187
+ initialPlacement: o,
188
+ placement: p,
189
+ strategy: i,
190
+ middlewareData: f,
191
+ rects: a,
192
+ platform: r,
193
+ elements: {
194
+ reference: t,
195
+ floating: e
196
+ }
197
+ });
198
+ u = x ?? u, d = y ?? d, f = {
199
+ ...f,
200
+ [g]: {
201
+ ...f[g],
202
+ ...v
203
+ }
204
+ }, A && m <= 50 && (m++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (a = A.rects === !0 ? await r.getElementRects({
205
+ reference: t,
206
+ floating: e,
207
+ strategy: i
208
+ }) : A.rects), {
209
+ x: u,
210
+ y: d
211
+ } = Tt(a, p, c)), h = -1);
212
+ }
213
+ return {
214
+ x: u,
215
+ y: d,
216
+ placement: p,
217
+ strategy: i,
218
+ middlewareData: f
219
+ };
220
+ };
221
+ async function it(t, e) {
222
+ var n;
223
+ e === void 0 && (e = {});
224
+ const {
225
+ x: o,
226
+ y: i,
227
+ platform: s,
228
+ rects: r,
229
+ elements: l,
230
+ strategy: c
231
+ } = t, {
232
+ boundary: a = "clippingAncestors",
233
+ rootBoundary: u = "viewport",
234
+ elementContext: d = "floating",
235
+ altBoundary: p = !1,
236
+ padding: f = 0
237
+ } = X(e, t), m = Yt(f), g = l[p ? d === "floating" ? "reference" : "floating" : d], w = ft(await s.getClippingRect({
238
+ element: (n = await (s.isElement == null ? void 0 : s.isElement(g))) == null || n ? g : g.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
239
+ boundary: a,
240
+ rootBoundary: u,
241
+ strategy: c
242
+ })), x = d === "floating" ? {
243
+ x: o,
244
+ y: i,
245
+ width: r.floating.width,
246
+ height: r.floating.height
247
+ } : r.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), v = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
248
+ x: 1,
249
+ y: 1
250
+ } : {
251
+ x: 1,
252
+ y: 1
253
+ }, A = ft(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
254
+ elements: l,
255
+ rect: x,
256
+ offsetParent: y,
257
+ strategy: c
258
+ }) : x);
259
+ return {
260
+ top: (w.top - A.top + m.top) / v.y,
261
+ bottom: (A.bottom - w.bottom + m.bottom) / v.y,
262
+ left: (w.left - A.left + m.left) / v.x,
263
+ right: (A.right - w.right + m.right) / v.x
264
+ };
265
+ }
266
+ const Ce = (t) => ({
267
+ name: "arrow",
268
+ options: t,
269
+ async fn(e) {
270
+ const {
271
+ x: n,
272
+ y: o,
273
+ placement: i,
274
+ rects: s,
275
+ platform: r,
276
+ elements: l,
277
+ middlewareData: c
278
+ } = e, {
279
+ element: a,
280
+ padding: u = 0
281
+ } = X(t, e) || {};
282
+ if (a == null)
283
+ return {};
284
+ const d = Yt(u), p = {
285
+ x: n,
286
+ y: o
287
+ }, f = Pt(i), m = Ot(f), h = await r.getDimensions(a), g = f === "y", w = g ? "top" : "left", x = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", v = s.reference[m] + s.reference[f] - p[f] - s.floating[m], A = p[f] - s.reference[f], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a));
288
+ let b = R ? R[y] : 0;
289
+ (!b || !await (r.isElement == null ? void 0 : r.isElement(R))) && (b = l.floating[y] || s.floating[m]);
290
+ const O = v / 2 - A / 2, D = b / 2 - h[m] / 2 - 1, L = K(d[w], D), C = K(d[x], D), T = L, k = b - h[m] - C, P = b / 2 - h[m] / 2 + O, M = gt(T, P, k), F = !c.arrow && ot(i) != null && P !== M && s.reference[m] / 2 - (P < T ? L : C) - h[m] / 2 < 0, E = F ? P < T ? P - T : P - k : 0;
291
+ return {
292
+ [f]: p[f] + E,
293
+ data: {
294
+ [f]: M,
295
+ centerOffset: P - M - E,
296
+ ...F && {
297
+ alignmentOffset: E
298
+ }
299
+ },
300
+ reset: F
301
+ };
302
+ }
303
+ }), Oe = function(t) {
304
+ return t === void 0 && (t = {}), {
305
+ name: "flip",
306
+ options: t,
307
+ async fn(e) {
308
+ var n, o;
309
+ const {
310
+ placement: i,
311
+ middlewareData: s,
312
+ rects: r,
313
+ initialPlacement: l,
314
+ platform: c,
315
+ elements: a
316
+ } = e, {
317
+ mainAxis: u = !0,
318
+ crossAxis: d = !0,
319
+ fallbackPlacements: p,
320
+ fallbackStrategy: f = "bestFit",
321
+ fallbackAxisSideDirection: m = "none",
322
+ flipAlignment: h = !0,
323
+ ...g
324
+ } = X(t, e);
325
+ if ((n = s.arrow) != null && n.alignmentOffset)
326
+ return {};
327
+ const w = U(i), x = z(l), y = U(l) === l, v = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), A = p || (y || !h ? [at(l)] : xe(l)), R = m !== "none";
328
+ !p && R && A.push(...ve(l, h, m, v));
329
+ const b = [l, ...A], O = await it(e, g), D = [];
330
+ let L = ((o = s.flip) == null ? void 0 : o.overflows) || [];
331
+ if (u && D.push(O[w]), d) {
332
+ const P = we(i, r, v);
333
+ D.push(O[P[0]], O[P[1]]);
334
+ }
335
+ if (L = [...L, {
336
+ placement: i,
337
+ overflows: D
338
+ }], !D.every((P) => P <= 0)) {
339
+ var C, T;
340
+ const P = (((C = s.flip) == null ? void 0 : C.index) || 0) + 1, M = b[P];
341
+ if (M && (!(d === "alignment" ? x !== z(M) : !1) || // We leave the current main axis only if every placement on that axis
342
+ // overflows the main axis.
343
+ L.every((W) => W.overflows[0] > 0 && z(W.placement) === x)))
344
+ return {
345
+ data: {
346
+ index: P,
347
+ overflows: L
348
+ },
349
+ reset: {
350
+ placement: M
351
+ }
352
+ };
353
+ let F = (T = L.filter((E) => E.overflows[0] <= 0).sort((E, W) => E.overflows[1] - W.overflows[1])[0]) == null ? void 0 : T.placement;
354
+ if (!F)
355
+ switch (f) {
356
+ case "bestFit": {
357
+ var k;
358
+ const E = (k = L.filter((W) => {
359
+ if (R) {
360
+ const q = z(W.placement);
361
+ return q === x || // Create a bias to the `y` side axis due to horizontal
362
+ // reading directions favoring greater width.
363
+ q === "y";
364
+ }
365
+ return !0;
366
+ }).map((W) => [W.placement, W.overflows.filter((q) => q > 0).reduce((q, ee) => q + ee, 0)]).sort((W, q) => W[1] - q[1])[0]) == null ? void 0 : k[0];
367
+ E && (F = E);
368
+ break;
369
+ }
370
+ case "initialPlacement":
371
+ F = l;
372
+ break;
373
+ }
374
+ if (i !== F)
375
+ return {
376
+ reset: {
377
+ placement: F
378
+ }
379
+ };
380
+ }
381
+ return {};
382
+ }
383
+ };
384
+ };
385
+ function kt(t, e) {
386
+ return {
387
+ top: t.top - e.height,
388
+ right: t.right - e.width,
389
+ bottom: t.bottom - e.height,
390
+ left: t.left - e.width
391
+ };
392
+ }
393
+ function $t(t) {
394
+ return pe.some((e) => t[e] >= 0);
395
+ }
396
+ const Pe = function(t) {
397
+ return t === void 0 && (t = {}), {
398
+ name: "hide",
399
+ options: t,
400
+ async fn(e) {
401
+ const {
402
+ rects: n
403
+ } = e, {
404
+ strategy: o = "referenceHidden",
405
+ ...i
406
+ } = X(t, e);
407
+ switch (o) {
408
+ case "referenceHidden": {
409
+ const s = await it(e, {
410
+ ...i,
411
+ elementContext: "reference"
412
+ }), r = kt(s, n.reference);
413
+ return {
414
+ data: {
415
+ referenceHiddenOffsets: r,
416
+ referenceHidden: $t(r)
417
+ }
418
+ };
419
+ }
420
+ case "escaped": {
421
+ const s = await it(e, {
422
+ ...i,
423
+ altBoundary: !0
424
+ }), r = kt(s, n.floating);
425
+ return {
426
+ data: {
427
+ escapedOffsets: r,
428
+ escaped: $t(r)
429
+ }
430
+ };
431
+ }
432
+ default:
433
+ return {};
434
+ }
435
+ }
436
+ };
437
+ };
438
+ async function Re(t, e) {
439
+ const {
440
+ placement: n,
441
+ platform: o,
442
+ elements: i
443
+ } = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = U(n), l = ot(n), c = z(n) === "y", a = ["left", "top"].includes(r) ? -1 : 1, u = s && c ? -1 : 1, d = X(e, t);
444
+ let {
445
+ mainAxis: p,
446
+ crossAxis: f,
447
+ alignmentAxis: m
448
+ } = typeof d == "number" ? {
449
+ mainAxis: d,
450
+ crossAxis: 0,
451
+ alignmentAxis: null
452
+ } : {
453
+ mainAxis: d.mainAxis || 0,
454
+ crossAxis: d.crossAxis || 0,
455
+ alignmentAxis: d.alignmentAxis
456
+ };
457
+ return l && typeof m == "number" && (f = l === "end" ? m * -1 : m), c ? {
458
+ x: f * u,
459
+ y: p * a
460
+ } : {
461
+ x: p * a,
462
+ y: f * u
463
+ };
464
+ }
465
+ const Se = function(t) {
466
+ return t === void 0 && (t = 0), {
467
+ name: "offset",
468
+ options: t,
469
+ async fn(e) {
470
+ var n, o;
471
+ const {
472
+ x: i,
473
+ y: s,
474
+ placement: r,
475
+ middlewareData: l
476
+ } = e, c = await Re(e, t);
477
+ return r === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
478
+ x: i + c.x,
479
+ y: s + c.y,
480
+ data: {
481
+ ...c,
482
+ placement: r
483
+ }
484
+ };
485
+ }
486
+ };
487
+ }, Ee = function(t) {
488
+ return t === void 0 && (t = {}), {
489
+ name: "shift",
490
+ options: t,
491
+ async fn(e) {
492
+ const {
493
+ x: n,
494
+ y: o,
495
+ placement: i
496
+ } = e, {
497
+ mainAxis: s = !0,
498
+ crossAxis: r = !1,
499
+ limiter: l = {
500
+ fn: (g) => {
501
+ let {
502
+ x: w,
503
+ y: x
504
+ } = g;
505
+ return {
506
+ x: w,
507
+ y: x
508
+ };
509
+ }
510
+ },
511
+ ...c
512
+ } = X(t, e), a = {
513
+ x: n,
514
+ y: o
515
+ }, u = await it(e, c), d = z(U(i)), p = Ct(d);
516
+ let f = a[p], m = a[d];
517
+ if (s) {
518
+ const g = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", x = f + u[g], y = f - u[w];
519
+ f = gt(x, f, y);
520
+ }
521
+ if (r) {
522
+ const g = d === "y" ? "top" : "left", w = d === "y" ? "bottom" : "right", x = m + u[g], y = m - u[w];
523
+ m = gt(x, m, y);
524
+ }
525
+ const h = l.fn({
526
+ ...e,
527
+ [p]: f,
528
+ [d]: m
529
+ });
530
+ return {
531
+ ...h,
532
+ data: {
533
+ x: h.x - n,
534
+ y: h.y - o,
535
+ enabled: {
536
+ [p]: s,
537
+ [d]: r
538
+ }
539
+ }
540
+ };
541
+ }
542
+ };
543
+ }, De = function(t) {
544
+ return t === void 0 && (t = {}), {
545
+ options: t,
546
+ fn(e) {
547
+ const {
548
+ x: n,
549
+ y: o,
550
+ placement: i,
551
+ rects: s,
552
+ middlewareData: r
553
+ } = e, {
554
+ offset: l = 0,
555
+ mainAxis: c = !0,
556
+ crossAxis: a = !0
557
+ } = X(t, e), u = {
558
+ x: n,
559
+ y: o
560
+ }, d = z(i), p = Ct(d);
561
+ let f = u[p], m = u[d];
562
+ const h = X(l, e), g = typeof h == "number" ? {
563
+ mainAxis: h,
564
+ crossAxis: 0
565
+ } : {
566
+ mainAxis: 0,
567
+ crossAxis: 0,
568
+ ...h
569
+ };
570
+ if (c) {
571
+ const y = p === "y" ? "height" : "width", v = s.reference[p] - s.floating[y] + g.mainAxis, A = s.reference[p] + s.reference[y] - g.mainAxis;
572
+ f < v ? f = v : f > A && (f = A);
573
+ }
574
+ if (a) {
575
+ var w, x;
576
+ const y = p === "y" ? "width" : "height", v = ["top", "left"].includes(U(i)), A = s.reference[d] - s.floating[y] + (v && ((w = r.offset) == null ? void 0 : w[d]) || 0) + (v ? 0 : g.crossAxis), R = s.reference[d] + s.reference[y] + (v ? 0 : ((x = r.offset) == null ? void 0 : x[d]) || 0) - (v ? g.crossAxis : 0);
577
+ m < A ? m = A : m > R && (m = R);
578
+ }
579
+ return {
580
+ [p]: f,
581
+ [d]: m
582
+ };
583
+ }
584
+ };
585
+ }, Le = function(t) {
586
+ return t === void 0 && (t = {}), {
587
+ name: "size",
588
+ options: t,
589
+ async fn(e) {
590
+ var n, o;
591
+ const {
592
+ placement: i,
593
+ rects: s,
594
+ platform: r,
595
+ elements: l
596
+ } = e, {
597
+ apply: c = () => {
598
+ },
599
+ ...a
600
+ } = X(t, e), u = await it(e, a), d = U(i), p = ot(i), f = z(i) === "y", {
601
+ width: m,
602
+ height: h
603
+ } = s.floating;
604
+ let g, w;
605
+ d === "top" || d === "bottom" ? (g = d, w = p === (await (r.isRTL == null ? void 0 : r.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (w = d, g = p === "end" ? "top" : "bottom");
606
+ const x = h - u.top - u.bottom, y = m - u.left - u.right, v = K(h - u[g], x), A = K(m - u[w], y), R = !e.middlewareData.shift;
607
+ let b = v, O = A;
608
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (O = y), (o = e.middlewareData.shift) != null && o.enabled.y && (b = x), R && !p) {
609
+ const L = $(u.left, 0), C = $(u.right, 0), T = $(u.top, 0), k = $(u.bottom, 0);
610
+ f ? O = m - 2 * (L !== 0 || C !== 0 ? L + C : $(u.left, u.right)) : b = h - 2 * (T !== 0 || k !== 0 ? T + k : $(u.top, u.bottom));
611
+ }
612
+ await c({
613
+ ...e,
614
+ availableWidth: O,
615
+ availableHeight: b
616
+ });
617
+ const D = await r.getDimensions(l.floating);
618
+ return m !== D.width || h !== D.height ? {
619
+ reset: {
620
+ rects: !0
621
+ }
622
+ } : {};
623
+ }
624
+ };
625
+ };
626
+ function ut() {
627
+ return typeof window < "u";
628
+ }
629
+ function J(t) {
630
+ return Rt(t) ? (t.nodeName || "").toLowerCase() : "#document";
631
+ }
632
+ function B(t) {
633
+ var e;
634
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
635
+ }
636
+ function j(t) {
637
+ var e;
638
+ return (e = (Rt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
639
+ }
640
+ function Rt(t) {
641
+ return ut() ? t instanceof Node || t instanceof B(t).Node : !1;
642
+ }
643
+ function H(t) {
644
+ return ut() ? t instanceof Element || t instanceof B(t).Element : !1;
645
+ }
646
+ function I(t) {
647
+ return ut() ? t instanceof HTMLElement || t instanceof B(t).HTMLElement : !1;
648
+ }
649
+ function Bt(t) {
650
+ return !ut() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof B(t).ShadowRoot;
651
+ }
652
+ function st(t) {
653
+ const {
654
+ overflow: e,
655
+ overflowX: n,
656
+ overflowY: o,
657
+ display: i
658
+ } = V(t);
659
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(i);
660
+ }
661
+ function Te(t) {
662
+ return ["table", "td", "th"].includes(J(t));
663
+ }
664
+ function dt(t) {
665
+ return [":popover-open", ":modal"].some((e) => {
666
+ try {
667
+ return t.matches(e);
668
+ } catch {
669
+ return !1;
670
+ }
671
+ });
672
+ }
673
+ function St(t) {
674
+ const e = Et(), n = H(t) ? V(t) : t;
675
+ 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));
676
+ }
677
+ function ke(t) {
678
+ let e = Z(t);
679
+ for (; I(e) && !nt(e); ) {
680
+ if (St(e))
681
+ return e;
682
+ if (dt(e))
683
+ return null;
684
+ e = Z(e);
685
+ }
686
+ return null;
687
+ }
688
+ function Et() {
689
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
690
+ }
691
+ function nt(t) {
692
+ return ["html", "body", "#document"].includes(J(t));
693
+ }
694
+ function V(t) {
695
+ return B(t).getComputedStyle(t);
696
+ }
697
+ function mt(t) {
698
+ return H(t) ? {
699
+ scrollLeft: t.scrollLeft,
700
+ scrollTop: t.scrollTop
701
+ } : {
702
+ scrollLeft: t.scrollX,
703
+ scrollTop: t.scrollY
704
+ };
705
+ }
706
+ function Z(t) {
707
+ if (J(t) === "html")
708
+ return t;
709
+ const e = (
710
+ // Step into the shadow DOM of the parent of a slotted node.
711
+ t.assignedSlot || // DOM Element detected.
712
+ t.parentNode || // ShadowRoot detected.
713
+ Bt(t) && t.host || // Fallback.
714
+ j(t)
715
+ );
716
+ return Bt(e) ? e.host : e;
717
+ }
718
+ function Xt(t) {
719
+ const e = Z(t);
720
+ return nt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : I(e) && st(e) ? e : Xt(e);
721
+ }
722
+ function rt(t, e, n) {
723
+ var o;
724
+ e === void 0 && (e = []), n === void 0 && (n = !0);
725
+ const i = Xt(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = B(i);
726
+ if (s) {
727
+ const l = xt(r);
728
+ return e.concat(r, r.visualViewport || [], st(i) ? i : [], l && n ? rt(l) : []);
729
+ }
730
+ return e.concat(i, rt(i, [], n));
731
+ }
732
+ function xt(t) {
733
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
734
+ }
735
+ function Ut(t) {
736
+ const e = V(t);
737
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
738
+ const i = I(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, l = ct(n) !== s || ct(o) !== r;
739
+ return l && (n = s, o = r), {
740
+ width: n,
741
+ height: o,
742
+ $: l
743
+ };
744
+ }
745
+ function Dt(t) {
746
+ return H(t) ? t : t.contextElement;
747
+ }
748
+ function et(t) {
749
+ const e = Dt(t);
750
+ if (!I(e))
751
+ return N(1);
752
+ const n = e.getBoundingClientRect(), {
753
+ width: o,
754
+ height: i,
755
+ $: s
756
+ } = Ut(e);
757
+ let r = (s ? ct(n.width) : n.width) / o, l = (s ? ct(n.height) : n.height) / i;
758
+ return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
759
+ x: r,
760
+ y: l
761
+ };
762
+ }
763
+ const $e = /* @__PURE__ */ N(0);
764
+ function qt(t) {
765
+ const e = B(t);
766
+ return !Et() || !e.visualViewport ? $e : {
767
+ x: e.visualViewport.offsetLeft,
768
+ y: e.visualViewport.offsetTop
769
+ };
770
+ }
771
+ function Be(t, e, n) {
772
+ return e === void 0 && (e = !1), !n || e && n !== B(t) ? !1 : e;
773
+ }
774
+ function G(t, e, n, o) {
775
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
776
+ const i = t.getBoundingClientRect(), s = Dt(t);
777
+ let r = N(1);
778
+ e && (o ? H(o) && (r = et(o)) : r = et(t));
779
+ const l = Be(s, n, o) ? qt(s) : N(0);
780
+ let c = (i.left + l.x) / r.x, a = (i.top + l.y) / r.y, u = i.width / r.x, d = i.height / r.y;
781
+ if (s) {
782
+ const p = B(s), f = o && H(o) ? B(o) : o;
783
+ let m = p, h = xt(m);
784
+ for (; h && o && f !== m; ) {
785
+ const g = et(h), w = h.getBoundingClientRect(), x = V(h), y = w.left + (h.clientLeft + parseFloat(x.paddingLeft)) * g.x, v = w.top + (h.clientTop + parseFloat(x.paddingTop)) * g.y;
786
+ c *= g.x, a *= g.y, u *= g.x, d *= g.y, c += y, a += v, m = B(h), h = xt(m);
787
+ }
788
+ }
789
+ return ft({
790
+ width: u,
791
+ height: d,
792
+ x: c,
793
+ y: a
794
+ });
795
+ }
796
+ function Lt(t, e) {
797
+ const n = mt(t).scrollLeft;
798
+ return e ? e.left + n : G(j(t)).left + n;
799
+ }
800
+ function Kt(t, e, n) {
801
+ n === void 0 && (n = !1);
802
+ const o = t.getBoundingClientRect(), i = o.left + e.scrollLeft - (n ? 0 : (
803
+ // RTL <body> scrollbar.
804
+ Lt(t, o)
805
+ )), s = o.top + e.scrollTop;
806
+ return {
807
+ x: i,
808
+ y: s
809
+ };
810
+ }
811
+ function Me(t) {
812
+ let {
813
+ elements: e,
814
+ rect: n,
815
+ offsetParent: o,
816
+ strategy: i
817
+ } = t;
818
+ const s = i === "fixed", r = j(o), l = e ? dt(e.floating) : !1;
819
+ if (o === r || l && s)
820
+ return n;
821
+ let c = {
822
+ scrollLeft: 0,
823
+ scrollTop: 0
824
+ }, a = N(1);
825
+ const u = N(0), d = I(o);
826
+ if ((d || !d && !s) && ((J(o) !== "body" || st(r)) && (c = mt(o)), I(o))) {
827
+ const f = G(o);
828
+ a = et(o), u.x = f.x + o.clientLeft, u.y = f.y + o.clientTop;
829
+ }
830
+ const p = r && !d && !s ? Kt(r, c, !0) : N(0);
831
+ return {
832
+ width: n.width * a.x,
833
+ height: n.height * a.y,
834
+ x: n.x * a.x - c.scrollLeft * a.x + u.x + p.x,
835
+ y: n.y * a.y - c.scrollTop * a.y + u.y + p.y
836
+ };
837
+ }
838
+ function _e(t) {
839
+ return Array.from(t.getClientRects());
840
+ }
841
+ function Fe(t) {
842
+ const e = j(t), n = mt(t), o = t.ownerDocument.body, i = $(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = $(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
843
+ let r = -n.scrollLeft + Lt(t);
844
+ const l = -n.scrollTop;
845
+ return V(o).direction === "rtl" && (r += $(e.clientWidth, o.clientWidth) - i), {
846
+ width: i,
847
+ height: s,
848
+ x: r,
849
+ y: l
850
+ };
851
+ }
852
+ function We(t, e) {
853
+ const n = B(t), o = j(t), i = n.visualViewport;
854
+ let s = o.clientWidth, r = o.clientHeight, l = 0, c = 0;
855
+ if (i) {
856
+ s = i.width, r = i.height;
857
+ const a = Et();
858
+ (!a || a && e === "fixed") && (l = i.offsetLeft, c = i.offsetTop);
859
+ }
860
+ return {
861
+ width: s,
862
+ height: r,
863
+ x: l,
864
+ y: c
865
+ };
866
+ }
867
+ function He(t, e) {
868
+ const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = I(t) ? et(t) : N(1), r = t.clientWidth * s.x, l = t.clientHeight * s.y, c = i * s.x, a = o * s.y;
869
+ return {
870
+ width: r,
871
+ height: l,
872
+ x: c,
873
+ y: a
874
+ };
875
+ }
876
+ function Mt(t, e, n) {
877
+ let o;
878
+ if (e === "viewport")
879
+ o = We(t, n);
880
+ else if (e === "document")
881
+ o = Fe(j(t));
882
+ else if (H(e))
883
+ o = He(e, n);
884
+ else {
885
+ const i = qt(t);
886
+ o = {
887
+ x: e.x - i.x,
888
+ y: e.y - i.y,
889
+ width: e.width,
890
+ height: e.height
891
+ };
892
+ }
893
+ return ft(o);
894
+ }
895
+ function Zt(t, e) {
896
+ const n = Z(t);
897
+ return n === e || !H(n) || nt(n) ? !1 : V(n).position === "fixed" || Zt(n, e);
898
+ }
899
+ function Ve(t, e) {
900
+ const n = e.get(t);
901
+ if (n)
902
+ return n;
903
+ let o = rt(t, [], !1).filter((l) => H(l) && J(l) !== "body"), i = null;
904
+ const s = V(t).position === "fixed";
905
+ let r = s ? Z(t) : t;
906
+ for (; H(r) && !nt(r); ) {
907
+ const l = V(r), c = St(r);
908
+ !c && l.position === "fixed" && (i = null), (s ? !c && !i : !c && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || st(r) && !c && Zt(t, r)) ? o = o.filter((u) => u !== r) : i = l, r = Z(r);
909
+ }
910
+ return e.set(t, o), o;
911
+ }
912
+ function ze(t) {
913
+ let {
914
+ element: e,
915
+ boundary: n,
916
+ rootBoundary: o,
917
+ strategy: i
918
+ } = t;
919
+ const r = [...n === "clippingAncestors" ? dt(e) ? [] : Ve(e, this._c) : [].concat(n), o], l = r[0], c = r.reduce((a, u) => {
920
+ const d = Mt(e, u, i);
921
+ return a.top = $(d.top, a.top), a.right = K(d.right, a.right), a.bottom = K(d.bottom, a.bottom), a.left = $(d.left, a.left), a;
922
+ }, Mt(e, l, i));
923
+ return {
924
+ width: c.right - c.left,
925
+ height: c.bottom - c.top,
926
+ x: c.left,
927
+ y: c.top
928
+ };
929
+ }
930
+ function Ne(t) {
931
+ const {
932
+ width: e,
933
+ height: n
934
+ } = Ut(t);
935
+ return {
936
+ width: e,
937
+ height: n
938
+ };
939
+ }
940
+ function Ie(t, e, n) {
941
+ const o = I(e), i = j(e), s = n === "fixed", r = G(t, !0, s, e);
942
+ let l = {
943
+ scrollLeft: 0,
944
+ scrollTop: 0
945
+ };
946
+ const c = N(0);
947
+ function a() {
948
+ c.x = Lt(i);
949
+ }
950
+ if (o || !o && !s)
951
+ if ((J(e) !== "body" || st(i)) && (l = mt(e)), o) {
952
+ const f = G(e, !0, s, e);
953
+ c.x = f.x + e.clientLeft, c.y = f.y + e.clientTop;
954
+ } else i && a();
955
+ s && !o && i && a();
956
+ const u = i && !o && !s ? Kt(i, l) : N(0), d = r.left + l.scrollLeft - c.x - u.x, p = r.top + l.scrollTop - c.y - u.y;
957
+ return {
958
+ x: d,
959
+ y: p,
960
+ width: r.width,
961
+ height: r.height
962
+ };
963
+ }
964
+ function ht(t) {
965
+ return V(t).position === "static";
966
+ }
967
+ function _t(t, e) {
968
+ if (!I(t) || V(t).position === "fixed")
969
+ return null;
970
+ if (e)
971
+ return e(t);
972
+ let n = t.offsetParent;
973
+ return j(t) === n && (n = n.ownerDocument.body), n;
974
+ }
975
+ function Gt(t, e) {
976
+ const n = B(t);
977
+ if (dt(t))
978
+ return n;
979
+ if (!I(t)) {
980
+ let i = Z(t);
981
+ for (; i && !nt(i); ) {
982
+ if (H(i) && !ht(i))
983
+ return i;
984
+ i = Z(i);
985
+ }
986
+ return n;
987
+ }
988
+ let o = _t(t, e);
989
+ for (; o && Te(o) && ht(o); )
990
+ o = _t(o, e);
991
+ return o && nt(o) && ht(o) && !St(o) ? n : o || ke(t) || n;
992
+ }
993
+ const je = async function(t) {
994
+ const e = this.getOffsetParent || Gt, n = this.getDimensions, o = await n(t.floating);
995
+ return {
996
+ reference: Ie(t.reference, await e(t.floating), t.strategy),
997
+ floating: {
998
+ x: 0,
999
+ y: 0,
1000
+ width: o.width,
1001
+ height: o.height
1002
+ }
1003
+ };
1004
+ };
1005
+ function Ye(t) {
1006
+ return V(t).direction === "rtl";
1007
+ }
1008
+ const Xe = {
1009
+ convertOffsetParentRelativeRectToViewportRelativeRect: Me,
1010
+ getDocumentElement: j,
1011
+ getClippingRect: ze,
1012
+ getOffsetParent: Gt,
1013
+ getElementRects: je,
1014
+ getClientRects: _e,
1015
+ getDimensions: Ne,
1016
+ getScale: et,
1017
+ isElement: H,
1018
+ isRTL: Ye
1019
+ };
1020
+ function Jt(t, e) {
1021
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1022
+ }
1023
+ function Ue(t, e) {
1024
+ let n = null, o;
1025
+ const i = j(t);
1026
+ function s() {
1027
+ var l;
1028
+ clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
1029
+ }
1030
+ function r(l, c) {
1031
+ l === void 0 && (l = !1), c === void 0 && (c = 1), s();
1032
+ const a = t.getBoundingClientRect(), {
1033
+ left: u,
1034
+ top: d,
1035
+ width: p,
1036
+ height: f
1037
+ } = a;
1038
+ if (l || e(), !p || !f)
1039
+ return;
1040
+ const m = lt(d), h = lt(i.clientWidth - (u + p)), g = lt(i.clientHeight - (d + f)), w = lt(u), y = {
1041
+ rootMargin: -m + "px " + -h + "px " + -g + "px " + -w + "px",
1042
+ threshold: $(0, K(1, c)) || 1
1043
+ };
1044
+ let v = !0;
1045
+ function A(R) {
1046
+ const b = R[0].intersectionRatio;
1047
+ if (b !== c) {
1048
+ if (!v)
1049
+ return r();
1050
+ b ? r(!1, b) : o = setTimeout(() => {
1051
+ r(!1, 1e-7);
1052
+ }, 1e3);
1053
+ }
1054
+ b === 1 && !Jt(a, t.getBoundingClientRect()) && r(), v = !1;
1055
+ }
1056
+ try {
1057
+ n = new IntersectionObserver(A, {
1058
+ ...y,
1059
+ // Handle <iframe>s
1060
+ root: i.ownerDocument
1061
+ });
1062
+ } catch {
1063
+ n = new IntersectionObserver(A, y);
1064
+ }
1065
+ n.observe(t);
1066
+ }
1067
+ return r(!0), s;
1068
+ }
1069
+ function qe(t, e, n, o) {
1070
+ o === void 0 && (o = {});
1071
+ const {
1072
+ ancestorScroll: i = !0,
1073
+ ancestorResize: s = !0,
1074
+ elementResize: r = typeof ResizeObserver == "function",
1075
+ layoutShift: l = typeof IntersectionObserver == "function",
1076
+ animationFrame: c = !1
1077
+ } = o, a = Dt(t), u = i || s ? [...a ? rt(a) : [], ...rt(e)] : [];
1078
+ u.forEach((w) => {
1079
+ i && w.addEventListener("scroll", n, {
1080
+ passive: !0
1081
+ }), s && w.addEventListener("resize", n);
1082
+ });
1083
+ const d = a && l ? Ue(a, n) : null;
1084
+ let p = -1, f = null;
1085
+ r && (f = new ResizeObserver((w) => {
1086
+ let [x] = w;
1087
+ x && x.target === a && f && (f.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1088
+ var y;
1089
+ (y = f) == null || y.observe(e);
1090
+ })), n();
1091
+ }), a && !c && f.observe(a), f.observe(e));
1092
+ let m, h = c ? G(t) : null;
1093
+ c && g();
1094
+ function g() {
1095
+ const w = G(t);
1096
+ h && !Jt(h, w) && n(), h = w, m = requestAnimationFrame(g);
1097
+ }
1098
+ return n(), () => {
1099
+ var w;
1100
+ u.forEach((x) => {
1101
+ i && x.removeEventListener("scroll", n), s && x.removeEventListener("resize", n);
1102
+ }), d == null || d(), (w = f) == null || w.disconnect(), f = null, c && cancelAnimationFrame(m);
1103
+ };
1104
+ }
1105
+ const Ke = Se, Ze = Ee, Ft = Oe, Ge = Le, Je = Pe, Qe = Ce, tn = De, en = (t, e, n) => {
1106
+ const o = /* @__PURE__ */ new Map(), i = {
1107
+ platform: Xe,
1108
+ ...n
1109
+ }, s = {
1110
+ ...i.platform,
1111
+ _c: o
1112
+ };
1113
+ return Ae(t, e, {
1114
+ ...i,
1115
+ platform: s
1116
+ });
1117
+ };
1118
+ function nn(t) {
1119
+ return t != null && typeof t == "object" && "$el" in t;
1120
+ }
1121
+ function yt(t) {
1122
+ if (nn(t)) {
1123
+ const e = t.$el;
1124
+ return Rt(e) && J(e) === "#comment" ? null : e;
1125
+ }
1126
+ return t;
1127
+ }
1128
+ function tt(t) {
1129
+ return typeof t == "function" ? t() : _(t);
1130
+ }
1131
+ function on(t) {
1132
+ return {
1133
+ name: "arrow",
1134
+ options: t,
1135
+ fn(e) {
1136
+ const n = yt(tt(t.element));
1137
+ return n == null ? {} : Qe({
1138
+ element: n,
1139
+ padding: t.padding
1140
+ }).fn(e);
1141
+ }
1142
+ };
1143
+ }
1144
+ function Qt(t) {
1145
+ return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1146
+ }
1147
+ function Wt(t, e) {
1148
+ const n = Qt(t);
1149
+ return Math.round(e * n) / n;
1150
+ }
1151
+ function rn(t, e, n) {
1152
+ n === void 0 && (n = {});
1153
+ const o = n.whileElementsMounted, i = S(() => {
1154
+ var b;
1155
+ return (b = tt(n.open)) != null ? b : !0;
1156
+ }), s = S(() => tt(n.middleware)), r = S(() => {
1157
+ var b;
1158
+ return (b = tt(n.placement)) != null ? b : "bottom";
1159
+ }), l = S(() => {
1160
+ var b;
1161
+ return (b = tt(n.strategy)) != null ? b : "absolute";
1162
+ }), c = S(() => {
1163
+ var b;
1164
+ return (b = tt(n.transform)) != null ? b : !0;
1165
+ }), a = S(() => yt(t.value)), u = S(() => yt(e.value)), d = Y(0), p = Y(0), f = Y(l.value), m = Y(r.value), h = ne({}), g = Y(!1), w = S(() => {
1166
+ const b = {
1167
+ position: f.value,
1168
+ left: "0",
1169
+ top: "0"
1170
+ };
1171
+ if (!u.value)
1172
+ return b;
1173
+ const O = Wt(u.value, d.value), D = Wt(u.value, p.value);
1174
+ return c.value ? {
1175
+ ...b,
1176
+ transform: "translate(" + O + "px, " + D + "px)",
1177
+ ...Qt(u.value) >= 1.5 && {
1178
+ willChange: "transform"
1179
+ }
1180
+ } : {
1181
+ position: f.value,
1182
+ left: O + "px",
1183
+ top: D + "px"
1184
+ };
1185
+ });
1186
+ let x;
1187
+ function y() {
1188
+ if (a.value == null || u.value == null)
1189
+ return;
1190
+ const b = i.value;
1191
+ en(a.value, u.value, {
1192
+ middleware: s.value,
1193
+ placement: r.value,
1194
+ strategy: l.value
1195
+ }).then((O) => {
1196
+ d.value = O.x, p.value = O.y, f.value = O.strategy, m.value = O.placement, h.value = O.middlewareData, g.value = b !== !1;
1197
+ });
1198
+ }
1199
+ function v() {
1200
+ typeof x == "function" && (x(), x = void 0);
1201
+ }
1202
+ function A() {
1203
+ if (v(), o === void 0) {
1204
+ y();
1205
+ return;
1206
+ }
1207
+ if (a.value != null && u.value != null) {
1208
+ x = o(a.value, u.value, y);
1209
+ return;
1210
+ }
1211
+ }
1212
+ function R() {
1213
+ i.value || (g.value = !1);
1214
+ }
1215
+ return pt([s, r, l, i], y, {
1216
+ flush: "sync"
1217
+ }), pt([a, u], A, {
1218
+ flush: "sync"
1219
+ }), pt(i, R, {
1220
+ flush: "sync"
1221
+ }), oe() && ie(v), {
1222
+ x: Q(d),
1223
+ y: Q(p),
1224
+ strategy: Q(f),
1225
+ placement: Q(m),
1226
+ middlewareData: Q(h),
1227
+ isPositioned: Q(g),
1228
+ floatingStyles: w,
1229
+ update: y
1230
+ };
1231
+ }
1232
+ const [te, sn] = jt("PopperRoot"), wn = /* @__PURE__ */ bt({
1233
+ inheritAttrs: !1,
1234
+ __name: "PopperRoot",
1235
+ setup(t) {
1236
+ const e = Y();
1237
+ return sn({
1238
+ anchor: e,
1239
+ onAnchorChange: (n) => e.value = n
1240
+ }), (n, o) => At(n.$slots, "default");
1241
+ }
1242
+ }), xn = /* @__PURE__ */ bt({
1243
+ __name: "PopperAnchor",
1244
+ props: {
1245
+ reference: {},
1246
+ asChild: { type: Boolean },
1247
+ as: {}
1248
+ },
1249
+ setup(t) {
1250
+ const e = t, { forwardRef: n, currentElement: o } = Nt(), i = te();
1251
+ return Ht(() => {
1252
+ i.onAnchorChange(e.reference ?? o.value);
1253
+ }), (s, r) => (Vt(), re(_(It), {
1254
+ ref: _(n),
1255
+ as: s.as,
1256
+ "as-child": s.asChild
1257
+ }, {
1258
+ default: zt(() => [
1259
+ At(s.$slots, "default")
1260
+ ]),
1261
+ _: 3
1262
+ }, 8, ["as", "as-child"]));
1263
+ }
1264
+ });
1265
+ function ln(t) {
1266
+ return t !== null;
1267
+ }
1268
+ function cn(t) {
1269
+ return {
1270
+ name: "transformOrigin",
1271
+ options: t,
1272
+ fn(e) {
1273
+ var g, w, x;
1274
+ const { placement: n, rects: o, middlewareData: i } = e, r = ((g = i.arrow) == null ? void 0 : g.centerOffset) !== 0, l = r ? 0 : t.arrowWidth, c = r ? 0 : t.arrowHeight, [a, u] = vt(n), d = { start: "0%", center: "50%", end: "100%" }[u], p = (((w = i.arrow) == null ? void 0 : w.x) ?? 0) + l / 2, f = (((x = i.arrow) == null ? void 0 : x.y) ?? 0) + c / 2;
1275
+ let m = "", h = "";
1276
+ return a === "bottom" ? (m = r ? d : `${p}px`, h = `${-c}px`) : a === "top" ? (m = r ? d : `${p}px`, h = `${o.floating.height + c}px`) : a === "right" ? (m = `${-c}px`, h = r ? d : `${f}px`) : a === "left" && (m = `${o.floating.width + c}px`, h = r ? d : `${f}px`), { data: { x: m, y: h } };
1277
+ }
1278
+ };
1279
+ }
1280
+ function vt(t) {
1281
+ const [e, n = "center"] = t.split("-");
1282
+ return [e, n];
1283
+ }
1284
+ const an = {
1285
+ side: "bottom",
1286
+ sideOffset: 0,
1287
+ align: "center",
1288
+ alignOffset: 0,
1289
+ arrowPadding: 0,
1290
+ avoidCollisions: !0,
1291
+ collisionBoundary: () => [],
1292
+ collisionPadding: 0,
1293
+ sticky: "partial",
1294
+ hideWhenDetached: !1,
1295
+ positionStrategy: "fixed",
1296
+ updatePositionStrategy: "optimized",
1297
+ prioritizePosition: !1
1298
+ }, [yn, fn] = jt("PopperContent"), vn = /* @__PURE__ */ bt({
1299
+ inheritAttrs: !1,
1300
+ __name: "PopperContent",
1301
+ props: /* @__PURE__ */ se({
1302
+ side: {},
1303
+ sideOffset: {},
1304
+ align: {},
1305
+ alignOffset: {},
1306
+ avoidCollisions: { type: Boolean },
1307
+ collisionBoundary: {},
1308
+ collisionPadding: {},
1309
+ arrowPadding: {},
1310
+ sticky: {},
1311
+ hideWhenDetached: { type: Boolean },
1312
+ positionStrategy: {},
1313
+ updatePositionStrategy: {},
1314
+ disableUpdateOnLayoutShift: { type: Boolean },
1315
+ prioritizePosition: { type: Boolean },
1316
+ reference: {},
1317
+ asChild: { type: Boolean },
1318
+ as: {}
1319
+ }, {
1320
+ ...an
1321
+ }),
1322
+ emits: ["placed"],
1323
+ setup(t, { emit: e }) {
1324
+ const n = t, o = e, i = te(), { forwardRef: s, currentElement: r } = Nt(), l = Y(), c = Y(), { width: a, height: u } = de(c), d = S(
1325
+ () => n.side + (n.align !== "center" ? `-${n.align}` : "")
1326
+ ), p = S(() => typeof n.collisionPadding == "number" ? n.collisionPadding : { top: 0, right: 0, bottom: 0, left: 0, ...n.collisionPadding }), f = S(() => Array.isArray(n.collisionBoundary) ? n.collisionBoundary : [n.collisionBoundary]), m = S(() => ({
1327
+ padding: p.value,
1328
+ boundary: f.value.filter(ln),
1329
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
1330
+ altBoundary: f.value.length > 0
1331
+ })), h = me(() => [
1332
+ Ke({
1333
+ mainAxis: n.sideOffset + u.value,
1334
+ alignmentAxis: n.alignOffset
1335
+ }),
1336
+ n.prioritizePosition && n.avoidCollisions && Ft({
1337
+ ...m.value
1338
+ }),
1339
+ n.avoidCollisions && Ze({
1340
+ mainAxis: !0,
1341
+ crossAxis: !!n.prioritizePosition,
1342
+ limiter: n.sticky === "partial" ? tn() : void 0,
1343
+ ...m.value
1344
+ }),
1345
+ !n.prioritizePosition && n.avoidCollisions && Ft({
1346
+ ...m.value
1347
+ }),
1348
+ Ge({
1349
+ ...m.value,
1350
+ apply: ({ elements: C, rects: T, availableWidth: k, availableHeight: P }) => {
1351
+ const { width: M, height: F } = T.reference, E = C.floating.style;
1352
+ E.setProperty(
1353
+ "--reka-popper-available-width",
1354
+ `${k}px`
1355
+ ), E.setProperty(
1356
+ "--reka-popper-available-height",
1357
+ `${P}px`
1358
+ ), E.setProperty(
1359
+ "--reka-popper-anchor-width",
1360
+ `${M}px`
1361
+ ), E.setProperty(
1362
+ "--reka-popper-anchor-height",
1363
+ `${F}px`
1364
+ );
1365
+ }
1366
+ }),
1367
+ c.value && on({ element: c.value, padding: n.arrowPadding }),
1368
+ cn({
1369
+ arrowWidth: a.value,
1370
+ arrowHeight: u.value
1371
+ }),
1372
+ n.hideWhenDetached && Je({ strategy: "referenceHidden", ...m.value })
1373
+ ]), g = S(() => n.reference ?? i.anchor.value), { floatingStyles: w, placement: x, isPositioned: y, middlewareData: v } = rn(
1374
+ g,
1375
+ l,
1376
+ {
1377
+ strategy: n.positionStrategy,
1378
+ placement: d,
1379
+ whileElementsMounted: (...C) => qe(...C, {
1380
+ layoutShift: !n.disableUpdateOnLayoutShift,
1381
+ animationFrame: n.updatePositionStrategy === "always"
1382
+ }),
1383
+ middleware: h
1384
+ }
1385
+ ), A = S(
1386
+ () => vt(x.value)[0]
1387
+ ), R = S(
1388
+ () => vt(x.value)[1]
1389
+ );
1390
+ Ht(() => {
1391
+ y.value && o("placed");
1392
+ });
1393
+ const b = S(
1394
+ () => {
1395
+ var C;
1396
+ return ((C = v.value.arrow) == null ? void 0 : C.centerOffset) !== 0;
1397
+ }
1398
+ ), O = Y("");
1399
+ le(() => {
1400
+ r.value && (O.value = window.getComputedStyle(r.value).zIndex);
1401
+ });
1402
+ const D = S(() => {
1403
+ var C;
1404
+ return ((C = v.value.arrow) == null ? void 0 : C.x) ?? 0;
1405
+ }), L = S(() => {
1406
+ var C;
1407
+ return ((C = v.value.arrow) == null ? void 0 : C.y) ?? 0;
1408
+ });
1409
+ return fn({
1410
+ placedSide: A,
1411
+ onArrowChange: (C) => c.value = C,
1412
+ arrowX: D,
1413
+ arrowY: L,
1414
+ shouldHideArrow: b
1415
+ }), (C, T) => {
1416
+ var k, P, M;
1417
+ return Vt(), ce("div", {
1418
+ ref_key: "floatingRef",
1419
+ ref: l,
1420
+ "data-reka-popper-content-wrapper": "",
1421
+ style: ae({
1422
+ ..._(w),
1423
+ transform: _(y) ? _(w).transform : "translate(0, -200%)",
1424
+ // keep off the page when measuring
1425
+ minWidth: "max-content",
1426
+ zIndex: O.value,
1427
+ "--reka-popper-transform-origin": [
1428
+ (k = _(v).transformOrigin) == null ? void 0 : k.x,
1429
+ (P = _(v).transformOrigin) == null ? void 0 : P.y
1430
+ ].join(" "),
1431
+ // hide the content if using the hide middleware and should be hidden
1432
+ // set visibility to hidden and disable pointer events so the UI behaves
1433
+ // as if the PopperContent isn't there at all
1434
+ ...((M = _(v).hide) == null ? void 0 : M.referenceHidden) && {
1435
+ visibility: "hidden",
1436
+ pointerEvents: "none"
1437
+ }
1438
+ })
1439
+ }, [
1440
+ fe(_(It), ue({ ref: _(s) }, C.$attrs, {
1441
+ "as-child": n.asChild,
1442
+ as: C.as,
1443
+ "data-side": A.value,
1444
+ "data-align": R.value,
1445
+ style: {
1446
+ // if the PopperContent hasn't been placed yet (not all measurements done)
1447
+ // we prevent animations so that users's animation don't kick in too early referring wrong sides
1448
+ animation: _(y) ? void 0 : "none"
1449
+ }
1450
+ }), {
1451
+ default: zt(() => [
1452
+ At(C.$slots, "default")
1453
+ ]),
1454
+ _: 3
1455
+ }, 16, ["as-child", "as", "data-side", "data-align", "style"])
1456
+ ], 4);
1457
+ };
1458
+ }
1459
+ });
1460
+ export {
1461
+ an as P,
1462
+ wn as _,
1463
+ vn as a,
1464
+ xn as b
1465
+ };