@boxcc/maildeno-editor 0.0.0-stage → 0.4.13

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 (57) hide show
  1. package/CHANGELOG.md +479 -0
  2. package/README.md +441 -2
  3. package/dist/DatePicker-AdfGW0Tw.js +5347 -0
  4. package/dist/DatePicker-aNFlsoOb.js +5347 -0
  5. package/dist/Dialog-By0JLN8s.js +6294 -0
  6. package/dist/HealthIndicator-4Iw6N-g_.js +1216 -0
  7. package/dist/HealthIndicator-ZohgzF2_.js +1217 -0
  8. package/dist/PopperContent-N2nAEFeH.js +2538 -0
  9. package/dist/PopperContent-eLmz1Gjd.js +2578 -0
  10. package/dist/PreviewCanvas-DzpLghCo.js +534 -0
  11. package/dist/PreviewCanvas-QN4C68KA.js +534 -0
  12. package/dist/RichTextEditor-CmM4XRFC.js +12218 -0
  13. package/dist/RichTextEditor-Cz1-_ZtA.js +12217 -0
  14. package/dist/RowPreviewChildren-BYaMZID3.js +4 -0
  15. package/dist/RowPreviewChildren-_A9gPQCs.js +4 -0
  16. package/dist/RowPreviewLegacyComponent-Df_1HTly.js +403 -0
  17. package/dist/RowPreviewLegacyComponent-NECG3wpn.js +403 -0
  18. package/dist/RowPreviewRow-DPaSbxmB.js +81 -0
  19. package/dist/RowPreviewRow-Dx4ExtSN.js +81 -0
  20. package/dist/SavedRowsPanel-DqSHB6Jk.js +492 -0
  21. package/dist/SavedRowsPanel-DyXjSOEt.js +493 -0
  22. package/dist/_plugin-vue_export-helper-Dj7HTbfw.js +8 -0
  23. package/dist/adapters/errors.d.ts +59 -0
  24. package/dist/adapters/localStorageAdapter.d.ts +6 -0
  25. package/dist/adapters/types.d.ts +151 -0
  26. package/dist/babel-DV7WPQI0.js +10043 -0
  27. package/dist/blocks/registry.d.ts +23 -0
  28. package/dist/blocks/types.d.ts +73 -0
  29. package/dist/borderRadius-CkSa1lQ9.js +75 -0
  30. package/dist/components/features/emailBuilder/EmailEditor.vue.d.ts +182 -0
  31. package/dist/composables/emailBuilder/export/logic/espLogicWrapper.d.ts +76 -0
  32. package/dist/composables/emailBuilder/persistence/useEmailBuilderPersistence.d.ts +38 -0
  33. package/dist/composables/emailBuilder/transform/pipeline/optimize.d.ts +100 -0
  34. package/dist/composables/system/useColorScheme.d.ts +16 -0
  35. package/dist/element-B3gq8Xvd.js +21500 -0
  36. package/dist/element.d.ts +6 -0
  37. package/dist/element.js +5 -0
  38. package/dist/esp/registry.d.ts +33 -0
  39. package/dist/estree-DY9POgc0.js +8195 -0
  40. package/dist/html-wb0gSX1o.js +7273 -0
  41. package/dist/index.d.ts +17 -0
  42. package/dist/index.js +14992 -0
  43. package/dist/init.d.ts +178 -0
  44. package/dist/init.js +137 -0
  45. package/dist/maildeno-editor.css +2 -0
  46. package/dist/merge-tags/registry.d.ts +33 -0
  47. package/dist/mergeTagDefinitions-Cler19nv.js +27 -0
  48. package/dist/standalone-DHvJ30Td.js +3554 -0
  49. package/dist/theme.d.ts +206 -0
  50. package/dist/types/assistant.d.ts +56 -0
  51. package/dist/useEmailBuilder-B19p-2yp.js +4924 -0
  52. package/dist/useEmailBuilder-BR4wfai1.js +4924 -0
  53. package/dist/useToast-DD11IxqP.js +194 -0
  54. package/dist/utils/border.d.ts +15 -0
  55. package/dist/utils/borderRadius.d.ts +10 -0
  56. package/dist/vue.runtime.esm-bundler-D2AjRP90.js +6117 -0
  57. package/package.json +100 -4
@@ -0,0 +1,2538 @@
1
+ import { $ as sn, A as ln, B as ee, E as fe, F as nt, I as un, J as Rt, K as L, L as U, M as te, N as cn, O as Te, P as Dt, Q as fn, R as Lt, T as I, W as dn, X as ge, _ as se, at as Me, bt as pn, ct as ve, d as vn, dt as Xe, et as Ft, f as mn, ft as F, h as b, ht as _t, it as Nt, j as Ge, k as kt, lt as $t, m as hn, mt as P, nt as Ie, p as yn, pt as gn, q as le, st as S, t as wn, tt as Bt, ut as bn, v as xn, vt as Wt, y as It } from "./vue.runtime.esm-bundler-D2AjRP90.js";
2
+ var Ht = /* @__PURE__ */ Symbol("maildeno-editor:teleport-target");
3
+ function bo(e) {
4
+ Lt(Ht, e);
5
+ }
6
+ function En() {
7
+ const e = kt(Ht, void 0);
8
+ return e === void 0 ? (console.warn(`[maildeno-editor] useTeleportTarget() couldn't find a provided target — falling back to "body". If this is running inside the custom-element (Shadow DOM) path, teleported content will render unstyled.`), "body") : e;
9
+ }
10
+ function xo() {
11
+ const e = En();
12
+ return b(() => typeof e == "string" ? e : e.value ?? void 0);
13
+ }
14
+ var On = ["stroke-width", "innerHTML"], An = /* @__PURE__ */ I({
15
+ __name: "Icon",
16
+ props: {
17
+ name: {},
18
+ strokeWidth: { default: 2 }
19
+ },
20
+ setup(e) {
21
+ const t = e, n = {
22
+ "arrow-down": '<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',
23
+ "arrow-left": '<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',
24
+ "arrow-right": '<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',
25
+ "arrows-alt": '<path d="M12 2v20"/><path d="M2 12h20"/><path d="m15 5-3-3-3 3"/><path d="m15 19-3 3-3-3"/><path d="m5 9-3 3 3 3"/><path d="m19 9 3 3-3 3"/>',
26
+ bookmark: '<path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"/>',
27
+ "bookmark-filled": '<path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" fill="currentColor"/>',
28
+ check: '<path d="M20 6 9 17l-5-5"/>',
29
+ "check-circle": '<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>',
30
+ "chevron-down": '<path d="m6 9 6 6 6-6"/>',
31
+ "chevron-right": '<path d="m9 18 6-6-6-6"/>',
32
+ "chevron-up": '<path d="m18 15-6-6-6 6"/>',
33
+ circle: '<circle cx="12" cy="12" r="10"/>',
34
+ code: '<path d="m16 18 6-6-6-6"/><path d="m8 6-6 6 6 6"/>',
35
+ download: '<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10 5 5 5-5"/><path d="M12 15V3"/>',
36
+ "exclamation-triangle": '<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',
37
+ "external-link": '<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',
38
+ eye: '<path d="M2.06 12.35a1 1 0 0 1 0-.7 10.75 10.75 0 0 1 19.88 0 1 1 0 0 1 0 .7 10.75 10.75 0 0 1-19.88 0"/><circle cx="12" cy="12" r="3"/>',
39
+ "eye-slash": '<path d="m15 18-.72-3.25"/><path d="M2 8a10.65 10.65 0 0 0 20 0"/><path d="m20 15-1.73-2.05"/><path d="m4 15 1.73-2.05"/><path d="m9 18 .72-3.25"/>',
40
+ history: '<path d="M3 3v5h5"/><path d="M3.05 13A9 9 0 1 0 6 5.3L3 8"/><path d="M12 7v5l4 2"/>',
41
+ image: '<rect width="18" height="18" x="3" y="3" rx="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.09-3.09a2 2 0 0 0-2.82 0L6 21"/>',
42
+ "info-circle": '<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',
43
+ link: '<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>',
44
+ lock: '<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',
45
+ "lock-open": '<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/>',
46
+ minus: '<path d="M5 12h14"/>',
47
+ plus: '<path d="M5 12h14"/><path d="M12 5v14"/>',
48
+ send: '<path d="M14.54 21.69a.5.5 0 0 0 .93-.03l6.5-19a.5.5 0 0 0-.63-.63l-19 6.5a.5.5 0 0 0-.03.93l7.93 3.18a2 2 0 0 1 1.11 1.11z"/><path d="m21.85 2.15-10.94 10.94"/>',
49
+ sparkles: '<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/><path d="M20 3v4"/><path d="M22 5h-4"/>',
50
+ spinner: '<path d="M21 12a9 9 0 1 1-6.22-8.56"/>',
51
+ tag: '<path d="M12.59 2.59A2 2 0 0 0 11.17 2H4a2 2 0 0 0-2 2v7.17a2 2 0 0 0 .59 1.42l8.7 8.7a2.43 2.43 0 0 0 3.42 0l6.58-6.58a2.43 2.43 0 0 0 0-3.42z"/><circle cx="7.5" cy="7.5" r=".5" fill="currentColor"/>',
52
+ "th-large": '<rect width="7" height="7" x="3" y="3" rx="1"/><rect width="7" height="7" x="14" y="3" rx="1"/><rect width="7" height="7" x="14" y="14" rx="1"/><rect width="7" height="7" x="3" y="14" rx="1"/>',
53
+ times: '<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',
54
+ trash: '<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><path d="M10 11v6"/><path d="M14 11v6"/>'
55
+ };
56
+ return (r, i) => (U(), It("svg", {
57
+ xmlns: "http://www.w3.org/2000/svg",
58
+ width: "1em",
59
+ height: "1em",
60
+ viewBox: "0 0 24 24",
61
+ fill: "none",
62
+ stroke: "currentColor",
63
+ "stroke-width": t.strokeWidth,
64
+ "stroke-linecap": "round",
65
+ "stroke-linejoin": "round",
66
+ "aria-hidden": "true",
67
+ focusable: "false",
68
+ style: {
69
+ display: "inline-block",
70
+ "vertical-align": "-0.125em",
71
+ "flex-shrink": "0"
72
+ },
73
+ innerHTML: n[t.name] ?? ""
74
+ }, null, 8, On));
75
+ }
76
+ }), Eo = An;
77
+ function rt(e, t) {
78
+ const n = typeof e == "string" && !t ? `${e}Context` : t, r = Symbol(n);
79
+ return [(a) => {
80
+ const s = kt(r, a);
81
+ if (s || s === null) return s;
82
+ throw new Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e) ? `one of the following components: ${e.join(", ")}` : `\`${e}\``}`);
83
+ }, (a) => (Lt(r, a), a)];
84
+ }
85
+ function Q() {
86
+ let e = document.activeElement;
87
+ if (e == null) return null;
88
+ for (; e != null && e.shadowRoot != null && e.shadowRoot.activeElement != null; ) e = e.shadowRoot.activeElement;
89
+ return e;
90
+ }
91
+ function qt(e, t, n) {
92
+ const r = n.originalEvent.target, i = new CustomEvent(e, {
93
+ bubbles: !1,
94
+ cancelable: !0,
95
+ detail: n
96
+ });
97
+ t && r.addEventListener(e, t, { once: !0 }), r.dispatchEvent(i);
98
+ }
99
+ function Pn(e) {
100
+ return e == null;
101
+ }
102
+ function ot(e, t) {
103
+ return Bt() ? (Nt(e, t), !0) : !1;
104
+ }
105
+ function Oo() {
106
+ const e = /* @__PURE__ */ new Set(), t = (o) => {
107
+ e.delete(o);
108
+ };
109
+ return {
110
+ on: (o) => {
111
+ e.add(o);
112
+ const a = () => t(o);
113
+ return ot(a), { off: a };
114
+ },
115
+ off: t,
116
+ trigger: (...o) => Promise.all(Array.from(e).map((a) => a(...o))),
117
+ clear: () => {
118
+ e.clear();
119
+ }
120
+ };
121
+ }
122
+ function Sn(e) {
123
+ let t = !1, n;
124
+ const r = Ft(!0);
125
+ return ((...i) => (t || (n = r.run(() => e(...i)), t = !0), n));
126
+ }
127
+ var N = typeof window < "u" && typeof document < "u", Ao = typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope, Cn = (e) => typeof e < "u", Tn = Object.prototype.toString, Mn = (e) => Tn.call(e) === "[object Object]", mt = /* @__PURE__ */ Rn();
128
+ function Rn() {
129
+ var e, t, n;
130
+ return N && !!(!((e = window) === null || e === void 0 || (e = e.navigator) === null || e === void 0) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) === null || t === void 0 || (t = t.navigator) === null || t === void 0 ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test((n = window) === null || n === void 0 ? void 0 : n.navigator.userAgent));
131
+ }
132
+ function He(e) {
133
+ return Array.isArray(e) ? e : [e];
134
+ }
135
+ function zt(e) {
136
+ const t = /* @__PURE__ */ Object.create(null);
137
+ return ((n) => t[n] || (t[n] = e(n)));
138
+ }
139
+ var Dn = /\B([A-Z])/g, Po = zt((e) => e.replace(Dn, "-$1").toLowerCase()), Ln = /-(\w)/g, So = zt((e) => e.replace(Ln, (t, n) => n ? n.toUpperCase() : ""));
140
+ function Fn(e) {
141
+ return e || fe();
142
+ }
143
+ function _n(e) {
144
+ if (!N) return e;
145
+ let t = 0, n, r;
146
+ const i = () => {
147
+ t -= 1, r && t <= 0 && (r.stop(), n = void 0, r = void 0);
148
+ };
149
+ return ((...o) => (t += 1, r || (r = Ft(!0), n = r.run(() => e(...o))), ot(i), n));
150
+ }
151
+ function Nn(e) {
152
+ return Ie(e) ? Me(new Proxy({}, {
153
+ get(t, n, r) {
154
+ return P(Reflect.get(e.value, n, r));
155
+ },
156
+ set(t, n, r) {
157
+ return Ie(e.value[n]) && !Ie(r) ? e.value[n].value = r : e.value[n] = r, !0;
158
+ },
159
+ deleteProperty(t, n) {
160
+ return Reflect.deleteProperty(e.value, n);
161
+ },
162
+ has(t, n) {
163
+ return Reflect.has(e.value, n);
164
+ },
165
+ ownKeys() {
166
+ return Object.keys(e.value);
167
+ },
168
+ getOwnPropertyDescriptor() {
169
+ return {
170
+ enumerable: !0,
171
+ configurable: !0
172
+ };
173
+ }
174
+ })) : Me(e);
175
+ }
176
+ function kn(e) {
177
+ return Nn(b(e));
178
+ }
179
+ function Co(e, ...t) {
180
+ const n = t.flat(), r = n[0];
181
+ return kn(() => Object.fromEntries(typeof r == "function" ? Object.entries(Xe(e)).filter(([i, o]) => !r(F(o), i)) : Object.entries(Xe(e)).filter((i) => !n.includes(i[0]))));
182
+ }
183
+ function To(e, t = 1e4) {
184
+ return sn((n, r) => {
185
+ let i = F(e), o;
186
+ const a = () => setTimeout(() => {
187
+ i = F(e), r();
188
+ }, F(t));
189
+ return ot(() => {
190
+ clearTimeout(o);
191
+ }), {
192
+ get() {
193
+ return n(), i;
194
+ },
195
+ set(s) {
196
+ i = s, r(), clearTimeout(o), o = a();
197
+ }
198
+ };
199
+ });
200
+ }
201
+ function $n(e, t) {
202
+ Fn(t) && cn(e, t);
203
+ }
204
+ function Bn(e, t, n) {
205
+ return L(e, t, {
206
+ ...n,
207
+ immediate: !0
208
+ });
209
+ }
210
+ var it = N ? window : void 0, Mo = N ? window.document : void 0, Ro = N ? window.navigator : void 0, Do = N ? window.location : void 0;
211
+ function be(e) {
212
+ var t;
213
+ const n = F(e);
214
+ return (t = n?.$el) !== null && t !== void 0 ? t : n;
215
+ }
216
+ function Vt(...e) {
217
+ const t = (r, i, o, a) => (r.addEventListener(i, o, a), () => r.removeEventListener(i, o, a)), n = b(() => {
218
+ const r = He(F(e[0])).filter((i) => i != null);
219
+ return r.every((i) => typeof i != "string") ? r : void 0;
220
+ });
221
+ return Bn(() => {
222
+ var r, i;
223
+ return [
224
+ (r = (i = n.value) === null || i === void 0 ? void 0 : i.map((o) => be(o))) !== null && r !== void 0 ? r : [it].filter((o) => o != null),
225
+ He(F(n.value ? e[1] : e[0])),
226
+ He(P(n.value ? e[2] : e[1])),
227
+ F(n.value ? e[3] : e[2])
228
+ ];
229
+ }, ([r, i, o, a], s, f) => {
230
+ if (!r?.length || !i?.length || !o?.length) return;
231
+ const p = Mn(a) ? { ...a } : a, d = r.flatMap((u) => i.flatMap((c) => o.map((l) => t(u, c, l, p))));
232
+ f(() => {
233
+ d.forEach((u) => u());
234
+ });
235
+ }, { flush: "post" });
236
+ }
237
+ function Wn() {
238
+ const e = $t(!1), t = fe();
239
+ return t && Dt(() => {
240
+ e.value = !0;
241
+ }, t), e;
242
+ }
243
+ function In(e) {
244
+ return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
245
+ }
246
+ function Hn(...e) {
247
+ let t, n, r = {};
248
+ e.length === 3 ? (t = e[0], n = e[1], r = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], r = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
249
+ const { target: i = it, eventName: o = "keydown", passive: a = !1, dedupe: s = !1 } = r, f = In(t);
250
+ return Vt(i, o, (d) => {
251
+ d.repeat && F(s) || f(d) && n(d);
252
+ }, a);
253
+ }
254
+ function qn(e) {
255
+ return JSON.parse(JSON.stringify(e));
256
+ }
257
+ var Lo = [
258
+ {
259
+ max: 6e4,
260
+ value: 1e3,
261
+ name: "second"
262
+ },
263
+ {
264
+ max: 276e4,
265
+ value: 6e4,
266
+ name: "minute"
267
+ },
268
+ {
269
+ max: 72e6,
270
+ value: 36e5,
271
+ name: "hour"
272
+ },
273
+ {
274
+ max: 5184e5,
275
+ value: 864e5,
276
+ name: "day"
277
+ },
278
+ {
279
+ max: 24192e5,
280
+ value: 6048e5,
281
+ name: "week"
282
+ },
283
+ {
284
+ max: 28512e6,
285
+ value: 2592e6,
286
+ name: "month"
287
+ },
288
+ {
289
+ max: Number.POSITIVE_INFINITY,
290
+ value: 31536e6,
291
+ name: "year"
292
+ }
293
+ ];
294
+ function Fo(e, t, n, r = {}) {
295
+ var i, o;
296
+ const { clone: a = !1, passive: s = !1, eventName: f, deep: p = !1, defaultValue: d, shouldEmit: u } = r, c = fe(), l = n || c?.emit || (c == null || (i = c.$emit) === null || i === void 0 ? void 0 : i.bind(c)) || (c == null || (o = c.proxy) === null || o === void 0 || (o = o.$emit) === null || o === void 0 ? void 0 : o.bind(c?.proxy));
297
+ let m = f;
298
+ t || (t = "modelValue"), m = m || `update:${t.toString()}`;
299
+ const v = (y) => a ? typeof a == "function" ? a(y) : qn(y) : y, h = () => Cn(e[t]) ? v(e[t]) : d, g = (y) => {
300
+ u ? u(y) && l(m, y) : l(m, y);
301
+ };
302
+ if (s) {
303
+ const y = S(h());
304
+ let w = !1;
305
+ return L(() => e[t], (x) => {
306
+ w || (w = !0, y.value = v(x), te(() => w = !1));
307
+ }), L(y, (x) => {
308
+ !w && (x !== e[t] || p) && g(x);
309
+ }, { deep: p }), y;
310
+ } else return b({
311
+ get() {
312
+ return h();
313
+ },
314
+ set(y) {
315
+ g(y);
316
+ }
317
+ });
318
+ }
319
+ function at(e) {
320
+ return e ? e.flatMap((t) => t.type === mn ? at(t.children) : [t]) : [];
321
+ }
322
+ var [Fe, _o] = /* @__PURE__ */ rt("ConfigProvider"), D = /* @__PURE__ */ Me({
323
+ layersRoot: /* @__PURE__ */ new Set(),
324
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
325
+ originalBodyPointerEvents: void 0,
326
+ branches: /* @__PURE__ */ new Set()
327
+ });
328
+ function qe(e) {
329
+ if (e === null || typeof e != "object") return !1;
330
+ const t = Object.getPrototypeOf(e);
331
+ return t !== null && t !== Object.prototype && Object.getPrototypeOf(t) !== null || Symbol.iterator in e ? !1 : Symbol.toStringTag in e ? Object.prototype.toString.call(e) === "[object Module]" : !0;
332
+ }
333
+ function Je(e, t, n = ".", r) {
334
+ if (!qe(t)) return Je(e, {}, n, r);
335
+ const i = { ...t };
336
+ for (const o of Object.keys(e)) {
337
+ if (o === "__proto__" || o === "constructor") continue;
338
+ const a = e[o];
339
+ a != null && (r && r(i, o, a, n) || (Array.isArray(a) && Array.isArray(i[o]) ? i[o] = [...a, ...i[o]] : qe(a) && qe(i[o]) ? i[o] = Je(a, i[o], (n ? `${n}.` : "") + o.toString(), r) : i[o] = a));
340
+ }
341
+ return i;
342
+ }
343
+ function st(e) {
344
+ return (...t) => t.reduce((n, r) => Je(n, r, "", e), {});
345
+ }
346
+ var zn = st(), No = st((e, t, n) => {
347
+ if (e[t] !== void 0 && typeof n == "function")
348
+ return e[t] = n(e[t]), !0;
349
+ }), ko = st((e, t, n) => {
350
+ if (Array.isArray(e[t]) && typeof n == "function")
351
+ return e[t] = n(e[t]), !0;
352
+ }), Vn = _n(() => {
353
+ const e = S(/* @__PURE__ */ new Map()), t = S(), n = b(() => {
354
+ for (const a of e.value.values()) if (a) return !0;
355
+ return !1;
356
+ }), r = Fe({ scrollBody: S(!0) });
357
+ let i = null;
358
+ const o = () => {
359
+ document.body.style.paddingRight = "", document.body.style.marginRight = "", D.layersWithOutsidePointerEventsDisabled.size === 0 && (document.body.style.pointerEvents = ""), document.documentElement.style.removeProperty("--scrollbar-width"), document.body.style.overflow = t.value ?? "", mt && i?.(), t.value = void 0;
360
+ };
361
+ return L(n, (a, s) => {
362
+ if (!N) return;
363
+ if (!a) {
364
+ s && o();
365
+ return;
366
+ }
367
+ t.value === void 0 && (t.value = document.body.style.overflow);
368
+ const f = window.innerWidth - document.documentElement.clientWidth, p = {
369
+ padding: f,
370
+ margin: 0
371
+ }, d = r.scrollBody?.value ? typeof r.scrollBody.value == "object" ? zn({
372
+ padding: r.scrollBody.value.padding === !0 ? f : r.scrollBody.value.padding,
373
+ margin: r.scrollBody.value.margin === !0 ? f : r.scrollBody.value.margin
374
+ }, p) : p : {
375
+ padding: 0,
376
+ margin: 0
377
+ };
378
+ f > 0 && (document.body.style.paddingRight = typeof d.padding == "number" ? `${d.padding}px` : String(d.padding), document.body.style.marginRight = typeof d.margin == "number" ? `${d.margin}px` : String(d.margin), document.documentElement.style.setProperty("--scrollbar-width", `${f}px`), document.body.style.overflow = "hidden"), mt && (i = Vt(document, "touchmove", (u) => jn(u), { passive: !1 })), te(() => {
379
+ n.value && (document.body.style.pointerEvents = "none", document.body.style.overflow = "hidden");
380
+ });
381
+ }, {
382
+ immediate: !0,
383
+ flush: "sync"
384
+ }), e;
385
+ });
386
+ function $o(e) {
387
+ const t = Math.random().toString(36).substring(2, 7), n = Vn();
388
+ n.value.set(t, e ?? !1);
389
+ const r = b({
390
+ get: () => n.value.get(t) ?? !1,
391
+ set: (i) => n.value.set(t, i)
392
+ });
393
+ return $n(() => {
394
+ n.value.delete(t);
395
+ }), r;
396
+ }
397
+ function jt(e) {
398
+ const t = window.getComputedStyle(e);
399
+ if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight) return !0;
400
+ {
401
+ const n = e.parentNode;
402
+ return !(n instanceof Element) || n.tagName === "BODY" ? !1 : jt(n);
403
+ }
404
+ }
405
+ function jn(e) {
406
+ const t = e || window.event, n = t.target;
407
+ return n instanceof Element && jt(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.cancelable && t.preventDefault(), !1);
408
+ }
409
+ function Un(e) {
410
+ const t = Fe({ dir: S("ltr") });
411
+ return b(() => e?.value || t.dir?.value || "ltr");
412
+ }
413
+ function Kn(e) {
414
+ const t = fe(), n = t?.type.emits, r = {};
415
+ return n?.length || console.warn(`No emitted event found. Please check component: ${t?.type.__name}`), n?.forEach((i) => {
416
+ r[pn(_t(i))] = (...o) => e(i, ...o);
417
+ }), r;
418
+ }
419
+ var ze = 0;
420
+ function Bo() {
421
+ le((e) => {
422
+ if (!N) return;
423
+ const t = document.querySelectorAll("[data-reka-focus-guard]");
424
+ document.body.insertAdjacentElement("afterbegin", t[0] ?? ht()), document.body.insertAdjacentElement("beforeend", t[1] ?? ht()), ze++, e(() => {
425
+ ze === 1 && document.querySelectorAll("[data-reka-focus-guard]").forEach((n) => n.remove()), ze--;
426
+ });
427
+ });
428
+ }
429
+ function ht() {
430
+ const e = document.createElement("span");
431
+ return e.setAttribute("data-reka-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
432
+ }
433
+ function _e() {
434
+ const e = fe(), t = S(), n = b(() => r());
435
+ un(() => {
436
+ n.value !== r() && gn(t);
437
+ });
438
+ function r() {
439
+ return t.value && "$el" in t.value && ["#text", "#comment"].includes(t.value.$el.nodeName) ? t.value.$el.nextElementSibling : be(t);
440
+ }
441
+ const i = Object.assign({}, e.exposed), o = {};
442
+ for (const s in e.props) Object.defineProperty(o, s, {
443
+ enumerable: !0,
444
+ configurable: !0,
445
+ get: () => e.props[s]
446
+ });
447
+ if (Object.keys(i).length > 0) for (const s in i) Object.defineProperty(o, s, {
448
+ enumerable: !0,
449
+ configurable: !0,
450
+ get: () => i[s]
451
+ });
452
+ Object.defineProperty(o, "$el", {
453
+ enumerable: !0,
454
+ configurable: !0,
455
+ get: () => e.vnode.el
456
+ }), e.exposed = o;
457
+ function a(s) {
458
+ if (t.value = s, !!s && (Object.defineProperty(o, "$el", {
459
+ enumerable: !0,
460
+ configurable: !0,
461
+ get: () => s instanceof Element ? s : s.$el
462
+ }), !(s instanceof Element) && !Object.hasOwn(s, "$el"))) {
463
+ const f = s.$.exposed, p = Object.assign({}, o);
464
+ for (const d in f) Object.defineProperty(p, d, {
465
+ enumerable: !0,
466
+ configurable: !0,
467
+ get: () => f[d]
468
+ });
469
+ e.exposed = p;
470
+ }
471
+ }
472
+ return {
473
+ forwardRef: a,
474
+ currentRef: t,
475
+ currentElement: n
476
+ };
477
+ }
478
+ function Yn(e) {
479
+ const t = fe(), n = Object.keys(t?.type.props ?? {}).reduce((i, o) => {
480
+ const a = (t?.type.props[o]).default;
481
+ return a !== void 0 && (i[o] = a), i;
482
+ }, {}), r = bn(e);
483
+ return b(() => {
484
+ const i = {}, o = t?.vnode.props ?? {};
485
+ return Object.keys(o).forEach((a) => {
486
+ i[_t(a)] = o[a];
487
+ }), Object.keys({
488
+ ...n,
489
+ ...i
490
+ }).reduce((a, s) => (r.value[s] !== void 0 && (a[s] = r.value[s]), a), {});
491
+ });
492
+ }
493
+ function Wo(e, t) {
494
+ const n = Yn(e), r = t ? Kn(t) : {};
495
+ return b(() => ({
496
+ ...n.value,
497
+ ...r
498
+ }));
499
+ }
500
+ var Xn = function(e) {
501
+ return typeof document > "u" ? null : (Array.isArray(e) ? e[0] : e).ownerDocument.body;
502
+ }, me = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Pe = {}, Ve = 0, Ut = function(e) {
503
+ return e && (e.host || Ut(e.parentNode));
504
+ }, Gn = function(e, t) {
505
+ return t.map(function(n) {
506
+ if (e.contains(n)) return n;
507
+ var r = Ut(n);
508
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
509
+ }).filter(function(n) {
510
+ return !!n;
511
+ });
512
+ }, Jn = function(e, t, n, r) {
513
+ var i = Gn(t, Array.isArray(e) ? e : [e]);
514
+ Pe[n] || (Pe[n] = /* @__PURE__ */ new WeakMap());
515
+ var o = Pe[n], a = [], s = /* @__PURE__ */ new Set(), f = new Set(i), p = function(u) {
516
+ !u || s.has(u) || (s.add(u), p(u.parentNode));
517
+ };
518
+ i.forEach(p);
519
+ var d = function(u) {
520
+ !u || f.has(u) || Array.prototype.forEach.call(u.children, function(c) {
521
+ if (s.has(c)) d(c);
522
+ else try {
523
+ var l = c.getAttribute(r), m = l !== null && l !== "false", v = (me.get(c) || 0) + 1, h = (o.get(c) || 0) + 1;
524
+ me.set(c, v), o.set(c, h), a.push(c), v === 1 && m && Ae.set(c, !0), h === 1 && c.setAttribute(n, "true"), m || c.setAttribute(r, "true");
525
+ } catch (g) {
526
+ console.error("aria-hidden: cannot operate on ", c, g);
527
+ }
528
+ });
529
+ };
530
+ return d(t), s.clear(), Ve++, function() {
531
+ a.forEach(function(u) {
532
+ var c = me.get(u) - 1, l = o.get(u) - 1;
533
+ me.set(u, c), o.set(u, l), c || (Ae.has(u) || u.removeAttribute(r), Ae.delete(u)), l || u.removeAttribute(n);
534
+ }), Ve--, Ve || (me = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Pe = {});
535
+ };
536
+ }, Zn = function(e, t, n) {
537
+ n === void 0 && (n = "data-aria-hidden");
538
+ var r = Array.from(Array.isArray(e) ? e : [e]), i = t || Xn(e);
539
+ return i ? (r.push.apply(r, Array.from(i.querySelectorAll("[aria-live], script"))), Jn(r, i, n, "aria-hidden")) : function() {
540
+ return null;
541
+ };
542
+ };
543
+ function Io(e) {
544
+ let t;
545
+ L(() => be(e), (n) => {
546
+ let r = !1;
547
+ try {
548
+ r = !!n?.closest("[popover]:not(:popover-open)");
549
+ } catch {
550
+ }
551
+ n && !r ? t = Zn(n) : t && t();
552
+ }), nt(() => {
553
+ t && t();
554
+ });
555
+ }
556
+ var Qn = 0;
557
+ function Ho(e, t = "reka") {
558
+ if (e) return e;
559
+ let n;
560
+ const r = Fe({ useId: void 0 });
561
+ return r.useId ? n = r.useId() : "useId" in wn ? n = dn?.() : n = `${++Qn}`, t ? `${t}-${n}` : n;
562
+ }
563
+ function qo() {
564
+ return {
565
+ ALT: "Alt",
566
+ ARROW_DOWN: "ArrowDown",
567
+ ARROW_LEFT: "ArrowLeft",
568
+ ARROW_RIGHT: "ArrowRight",
569
+ ARROW_UP: "ArrowUp",
570
+ BACKSPACE: "Backspace",
571
+ CAPS_LOCK: "CapsLock",
572
+ CONTROL: "Control",
573
+ DELETE: "Delete",
574
+ END: "End",
575
+ ENTER: "Enter",
576
+ ESCAPE: "Escape",
577
+ F1: "F1",
578
+ F10: "F10",
579
+ F11: "F11",
580
+ F12: "F12",
581
+ F2: "F2",
582
+ F3: "F3",
583
+ F4: "F4",
584
+ F5: "F5",
585
+ F6: "F6",
586
+ F7: "F7",
587
+ F8: "F8",
588
+ F9: "F9",
589
+ HOME: "Home",
590
+ META: "Meta",
591
+ PAGE_DOWN: "PageDown",
592
+ PAGE_UP: "PageUp",
593
+ SHIFT: "Shift",
594
+ SPACE: " ",
595
+ TAB: "Tab",
596
+ CTRL: "Control",
597
+ ASTERISK: "*",
598
+ SPACE_CODE: "Space"
599
+ };
600
+ }
601
+ function er(e) {
602
+ const t = S(), n = b(() => t.value?.width ?? 0), r = b(() => t.value?.height ?? 0);
603
+ let i;
604
+ return Dt(() => {
605
+ const o = be(e);
606
+ o ? (t.value = {
607
+ width: o.offsetWidth,
608
+ height: o.offsetHeight
609
+ }, i = new ResizeObserver((a) => {
610
+ if (!Array.isArray(a) || !a.length) return;
611
+ const s = a[0];
612
+ let f, p;
613
+ if ("borderBoxSize" in s) {
614
+ const d = s.borderBoxSize, u = Array.isArray(d) ? d[0] : d;
615
+ f = u.inlineSize, p = u.blockSize;
616
+ } else
617
+ f = o.offsetWidth, p = o.offsetHeight;
618
+ t.value = {
619
+ width: f,
620
+ height: p
621
+ };
622
+ }), i.observe(o, { box: "border-box" })) : t.value = void 0;
623
+ }), nt(() => {
624
+ i?.disconnect(), i = void 0;
625
+ }), {
626
+ width: n,
627
+ height: r
628
+ };
629
+ }
630
+ function tr(e, t) {
631
+ const n = S(e);
632
+ function r(o) {
633
+ return t[n.value][o] ?? n.value;
634
+ }
635
+ return {
636
+ state: n,
637
+ dispatch: (o) => {
638
+ n.value = r(o);
639
+ }
640
+ };
641
+ }
642
+ function nr(e, t) {
643
+ const n = S({}), r = S("none"), i = S(e), o = e.value ? "mounted" : "unmounted";
644
+ let a;
645
+ const s = t.value?.ownerDocument.defaultView ?? it, { state: f, dispatch: p } = tr(o, {
646
+ mounted: {
647
+ UNMOUNT: "unmounted",
648
+ ANIMATION_OUT: "unmountSuspended"
649
+ },
650
+ unmountSuspended: {
651
+ MOUNT: "mounted",
652
+ ANIMATION_END: "unmounted"
653
+ },
654
+ unmounted: { MOUNT: "mounted" }
655
+ }), d = (v) => {
656
+ if (N) {
657
+ const h = new CustomEvent(v, {
658
+ bubbles: !1,
659
+ cancelable: !1
660
+ });
661
+ t.value?.dispatchEvent(h);
662
+ }
663
+ };
664
+ L(e, async (v, h) => {
665
+ const g = h !== v;
666
+ if (await te(), g) {
667
+ const y = r.value, w = Se(t.value);
668
+ v ? (p("MOUNT"), d("enter"), w === "none" && d("after-enter")) : w === "none" || w === "undefined" || n.value?.display === "none" ? (p("UNMOUNT"), d("leave"), d("after-leave")) : h && y !== w ? (p("ANIMATION_OUT"), d("leave")) : (p("UNMOUNT"), d("after-leave"));
669
+ }
670
+ }, { immediate: !0 });
671
+ const u = (v) => {
672
+ if (v.target !== t.value) return;
673
+ const h = Se(t.value), g = h.includes(CSS.escape(v.animationName)), y = f.value === "mounted" ? "enter" : "leave";
674
+ if (g && (d(`after-${y}`), p("ANIMATION_END"), !i.value)) {
675
+ const w = t.value.style.animationFillMode;
676
+ t.value.style.animationFillMode = "forwards", a = s?.setTimeout(() => {
677
+ t.value?.style.animationFillMode === "forwards" && (t.value.style.animationFillMode = w);
678
+ });
679
+ }
680
+ h === "none" && p("ANIMATION_END");
681
+ }, c = (v) => {
682
+ v.target === t.value && (r.value = Se(t.value));
683
+ }, l = L(t, (v, h) => {
684
+ v ? (n.value = getComputedStyle(v), v.addEventListener("animationstart", c), v.addEventListener("animationcancel", u), v.addEventListener("animationend", u)) : (p("ANIMATION_END"), a !== void 0 && s?.clearTimeout(a), h?.removeEventListener("animationstart", c), h?.removeEventListener("animationcancel", u), h?.removeEventListener("animationend", u));
685
+ }, { immediate: !0 }), m = L(f, () => {
686
+ const v = Se(t.value);
687
+ r.value = f.value === "mounted" ? v : "none";
688
+ });
689
+ return nt(() => {
690
+ l(), m(), t.value && (t.value.removeEventListener("animationstart", c), t.value.removeEventListener("animationcancel", u), t.value.removeEventListener("animationend", u)), a !== void 0 && s?.clearTimeout(a);
691
+ }), { isPresent: b(() => ["mounted", "unmountSuspended"].includes(f.value)) };
692
+ }
693
+ function Se(e) {
694
+ return e && getComputedStyle(e).animationName || "none";
695
+ }
696
+ var zo = /* @__PURE__ */ I({
697
+ name: "Presence",
698
+ props: {
699
+ present: {
700
+ type: Boolean,
701
+ required: !0
702
+ },
703
+ forceMount: { type: Boolean }
704
+ },
705
+ slots: {},
706
+ setup(e, { slots: t, expose: n }) {
707
+ const { present: r, forceMount: i } = Xe(e), o = S(), { isPresent: a } = nr(r, o);
708
+ n({ present: a });
709
+ let s = t.default({ present: a.value });
710
+ s = at(s || []);
711
+ const f = fe();
712
+ if (s && s?.length > 1) {
713
+ const p = f?.parent?.type.name ? `<${f.parent.type.name} />` : "component";
714
+ throw new Error([
715
+ `Detected an invalid children for \`${p}\` for \`Presence\` component.`,
716
+ "",
717
+ "Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",
718
+ "You can apply a few solutions:",
719
+ ["Provide a single child element so that `presence` directive attach correctly.", "Ensure the first child is an actual element instead of a raw text node or comment node."].map((d) => ` - ${d}`).join(`
720
+ `)
721
+ ].join(`
722
+ `));
723
+ }
724
+ return () => i.value || r.value || a.value ? Te(t.default({ present: a.value })[0], { ref: (p) => {
725
+ const d = be(p);
726
+ return typeof d?.hasAttribute > "u" || (d?.hasAttribute("data-reka-popper-content-wrapper") ? o.value = d.firstElementChild : o.value = d), d;
727
+ } }) : null;
728
+ }
729
+ }), rr = /* @__PURE__ */ I({
730
+ name: "PrimitiveSlot",
731
+ inheritAttrs: !1,
732
+ setup(e, { attrs: t, slots: n }) {
733
+ return () => {
734
+ if (!n.default) return null;
735
+ const r = at(n.default()), i = r.findIndex((f) => f.type !== vn);
736
+ if (i === -1) return r;
737
+ const o = r[i];
738
+ delete o.props?.ref;
739
+ const a = o.props ? Ge(t, o.props) : t, s = hn({
740
+ ...o,
741
+ props: {}
742
+ }, a);
743
+ return r.length === 1 ? s : (r[i] = s, r);
744
+ };
745
+ }
746
+ }), or = [
747
+ "area",
748
+ "img",
749
+ "input"
750
+ ], we = /* @__PURE__ */ I({
751
+ name: "Primitive",
752
+ inheritAttrs: !1,
753
+ props: {
754
+ asChild: {
755
+ type: Boolean,
756
+ default: !1
757
+ },
758
+ as: {
759
+ type: [String, Object],
760
+ default: "div"
761
+ }
762
+ },
763
+ setup(e, { attrs: t, slots: n }) {
764
+ const r = e.asChild ? "template" : e.as;
765
+ return typeof r == "string" && or.includes(r) ? () => Te(r, t) : r !== "template" ? () => Te(e.as, t, { default: n.default }) : () => Te(rr, t, { default: n.default });
766
+ }
767
+ });
768
+ function Vo() {
769
+ const e = S();
770
+ return {
771
+ primitiveElement: e,
772
+ currentElement: b(() => ["#text", "#comment"].includes(e.value?.$el.nodeName) ? e.value?.$el.nextElementSibling : be(e))
773
+ };
774
+ }
775
+ var ir = "dismissableLayer.pointerDownOutside", ar = "dismissableLayer.focusOutside";
776
+ function Kt(e, t) {
777
+ if (!(t instanceof Element)) return !1;
778
+ const n = t.closest("[data-dismissable-layer]"), r = e.dataset.dismissableLayer === "" ? e : e.querySelector("[data-dismissable-layer]"), i = Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));
779
+ return !!(n && (r === n || i.indexOf(r) < i.indexOf(n)));
780
+ }
781
+ function sr(e, t, n = !0) {
782
+ const r = t?.value?.ownerDocument ?? globalThis?.document, i = S(!1), o = S(() => {
783
+ });
784
+ return le((a) => {
785
+ if (!N || !F(n)) return;
786
+ const s = async (p) => {
787
+ const d = p.target;
788
+ if (!(!t?.value || !d)) {
789
+ if (Kt(t.value, d)) {
790
+ i.value = !1;
791
+ return;
792
+ }
793
+ if (p.target && !i.value) {
794
+ let c = function() {
795
+ qt(ir, e, u);
796
+ };
797
+ const u = { originalEvent: p };
798
+ p.pointerType === "touch" ? (r.removeEventListener("click", o.value), o.value = c, r.addEventListener("click", o.value, { once: !0 })) : c();
799
+ } else r.removeEventListener("click", o.value);
800
+ i.value = !1;
801
+ }
802
+ }, f = window.setTimeout(() => {
803
+ r.addEventListener("pointerdown", s);
804
+ }, 0);
805
+ a(() => {
806
+ window.clearTimeout(f), r.removeEventListener("pointerdown", s), r.removeEventListener("click", o.value);
807
+ });
808
+ }), { onPointerDownCapture: () => {
809
+ F(n) && (i.value = !0);
810
+ } };
811
+ }
812
+ function lr(e, t, n = !0) {
813
+ const r = t?.value?.ownerDocument ?? globalThis?.document, i = S(!1);
814
+ return le((o) => {
815
+ if (!N || !F(n)) return;
816
+ const a = async (s) => {
817
+ if (!t?.value) return;
818
+ await te(), await te();
819
+ const f = s.target;
820
+ !t.value || !f || Kt(t.value, f) || s.target && !i.value && qt(ar, e, { originalEvent: s });
821
+ };
822
+ r.addEventListener("focusin", a), o(() => r.removeEventListener("focusin", a));
823
+ }), {
824
+ onFocusCapture: () => {
825
+ F(n) && (i.value = !0);
826
+ },
827
+ onBlurCapture: () => {
828
+ F(n) && (i.value = !1);
829
+ }
830
+ };
831
+ }
832
+ var jo = /* @__PURE__ */ I({
833
+ __name: "DismissableLayer",
834
+ props: {
835
+ disableOutsidePointerEvents: {
836
+ type: Boolean,
837
+ required: !1,
838
+ default: !1
839
+ },
840
+ asChild: {
841
+ type: Boolean,
842
+ required: !1
843
+ },
844
+ as: {
845
+ type: null,
846
+ required: !1
847
+ },
848
+ present: {
849
+ type: Boolean,
850
+ required: !1,
851
+ default: !0
852
+ }
853
+ },
854
+ emits: [
855
+ "escapeKeyDown",
856
+ "pointerDownOutside",
857
+ "focusOutside",
858
+ "interactOutside",
859
+ "dismiss"
860
+ ],
861
+ setup(e, { emit: t }) {
862
+ const n = e, r = t, { forwardRef: i, currentElement: o } = _e(), a = b(() => o.value?.ownerDocument ?? globalThis.document), s = b(() => D.layersRoot), f = b(() => o.value ? Array.from(s.value).indexOf(o.value) : -1), p = b(() => D.layersWithOutsidePointerEventsDisabled.size > 0), d = b(() => {
863
+ const l = Array.from(s.value), [m] = [...D.layersWithOutsidePointerEventsDisabled].slice(-1), v = l.indexOf(m);
864
+ return f.value >= v;
865
+ }), u = sr(async (l) => {
866
+ const m = [...D.branches].some((v) => v?.contains(l.target));
867
+ !n.present || !d.value || m || (r("pointerDownOutside", l), r("interactOutside", l), await te(), l.defaultPrevented || r("dismiss"));
868
+ }, o, () => n.present), c = lr((l) => {
869
+ const m = [...D.branches].some((v) => v?.contains(l.target));
870
+ !n.present || m || (r("focusOutside", l), r("interactOutside", l), l.defaultPrevented || r("dismiss"));
871
+ }, o);
872
+ return Hn("Escape", (l) => {
873
+ n.present && f.value === s.value.size - 1 && (r("escapeKeyDown", l), l.defaultPrevented || r("dismiss"));
874
+ }), L([
875
+ o,
876
+ () => n.disableOutsidePointerEvents,
877
+ () => n.present
878
+ ], ([l, m, v], h, g) => {
879
+ !l || !v || m && (D.layersWithOutsidePointerEventsDisabled.size === 0 && (D.originalBodyPointerEvents = a.value.body.style.pointerEvents, a.value.body.style.pointerEvents = "none"), D.layersWithOutsidePointerEventsDisabled.add(l), g(() => {
880
+ D.layersWithOutsidePointerEventsDisabled.delete(l), D.layersWithOutsidePointerEventsDisabled.size === 0 && !Pn(D.originalBodyPointerEvents) && (a.value.body.style.pointerEvents = D.originalBodyPointerEvents);
881
+ }));
882
+ }, { immediate: !0 }), L([o, () => n.present], ([l, m], v, h) => {
883
+ !l || !m || (s.value.add(l), h(() => {
884
+ s.value.delete(l);
885
+ }));
886
+ }, { immediate: !0 }), le((l) => {
887
+ l(() => {
888
+ o.value && (s.value.delete(o.value), D.layersWithOutsidePointerEventsDisabled.delete(o.value));
889
+ });
890
+ }), (l, m) => (U(), se(P(we), {
891
+ ref: P(i),
892
+ "as-child": l.asChild,
893
+ as: l.as,
894
+ "data-dismissable-layer": "",
895
+ style: Wt({ pointerEvents: p.value ? d.value ? "auto" : "none" : void 0 }),
896
+ onFocusCapture: P(c).onFocusCapture,
897
+ onBlurCapture: P(c).onBlurCapture,
898
+ onPointerdownCapture: P(u).onPointerDownCapture
899
+ }, {
900
+ default: ge(() => [ee(l.$slots, "default")]),
901
+ _: 3
902
+ }, 8, [
903
+ "as-child",
904
+ "as",
905
+ "style",
906
+ "onFocusCapture",
907
+ "onBlurCapture",
908
+ "onPointerdownCapture"
909
+ ]));
910
+ }
911
+ }), ur = Sn(() => S([]));
912
+ function cr() {
913
+ const e = ur();
914
+ return {
915
+ add(t) {
916
+ const n = e.value[0];
917
+ t !== n && n?.pause(), e.value = yt(e.value, t), e.value.unshift(t);
918
+ },
919
+ remove(t) {
920
+ e.value = yt(e.value, t), e.value[0]?.resume();
921
+ }
922
+ };
923
+ }
924
+ function yt(e, t) {
925
+ const n = [...e], r = n.indexOf(t);
926
+ return r !== -1 && n.splice(r, 1), n;
927
+ }
928
+ var je = "focusScope.autoFocusOnMount", Ue = "focusScope.autoFocusOnUnmount", gt = {
929
+ bubbles: !1,
930
+ cancelable: !0
931
+ };
932
+ function fr(e, { select: t = !1 } = {}) {
933
+ const n = Q();
934
+ for (const r of e)
935
+ if (Z(r, { select: t }), Q() !== n) return !0;
936
+ }
937
+ function dr(e) {
938
+ const t = Yt(e);
939
+ return [wt(t, e), wt(t.reverse(), e)];
940
+ }
941
+ function Yt(e) {
942
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => {
943
+ const i = r.tagName === "INPUT" && r.type === "hidden";
944
+ return r.disabled || r.hidden || i ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
945
+ } });
946
+ for (; n.nextNode(); ) t.push(n.currentNode);
947
+ return t;
948
+ }
949
+ function wt(e, t) {
950
+ for (const n of e) if (!pr(n, { upTo: t })) return n;
951
+ }
952
+ function pr(e, { upTo: t }) {
953
+ if (getComputedStyle(e).visibility === "hidden") return !0;
954
+ for (; e; ) {
955
+ if (t !== void 0 && e === t) return !1;
956
+ if (getComputedStyle(e).display === "none") return !0;
957
+ e = e.parentElement;
958
+ }
959
+ return !1;
960
+ }
961
+ function vr(e) {
962
+ return e instanceof HTMLInputElement && "select" in e;
963
+ }
964
+ function Z(e, { select: t = !1 } = {}) {
965
+ if (e && e.focus) {
966
+ const n = Q();
967
+ e.focus({ preventScroll: !0 }), e !== n && vr(e) && t && e.select();
968
+ }
969
+ }
970
+ var Uo = /* @__PURE__ */ I({
971
+ __name: "FocusScope",
972
+ props: {
973
+ loop: {
974
+ type: Boolean,
975
+ required: !1,
976
+ default: !1
977
+ },
978
+ trapped: {
979
+ type: Boolean,
980
+ required: !1,
981
+ default: !1
982
+ },
983
+ present: {
984
+ type: Boolean,
985
+ required: !1,
986
+ default: !0
987
+ },
988
+ asChild: {
989
+ type: Boolean,
990
+ required: !1
991
+ },
992
+ as: {
993
+ type: null,
994
+ required: !1
995
+ }
996
+ },
997
+ emits: ["mountAutoFocus", "unmountAutoFocus"],
998
+ setup(e, { emit: t }) {
999
+ const n = e, r = t, { currentRef: i, currentElement: o } = _e(), a = S(null), s = cr(), f = /* @__PURE__ */ Me({
1000
+ paused: !1,
1001
+ pause() {
1002
+ this.paused = !0;
1003
+ },
1004
+ resume() {
1005
+ this.paused = !1;
1006
+ }
1007
+ });
1008
+ le((u) => {
1009
+ if (!N) return;
1010
+ const c = o.value;
1011
+ if (!n.trapped) return;
1012
+ function l(g) {
1013
+ if (f.paused || !c) return;
1014
+ const y = g.target;
1015
+ c.contains(y) ? a.value = y : Z(a.value, { select: !0 });
1016
+ }
1017
+ function m(g) {
1018
+ if (f.paused || !c) return;
1019
+ const y = g.relatedTarget;
1020
+ y !== null && (c.contains(y) || Z(a.value, { select: !0 }));
1021
+ }
1022
+ function v(g) {
1023
+ const y = a.value;
1024
+ if (y === null || !g.some((x) => x.removedNodes.length > 0)) return;
1025
+ const w = Q();
1026
+ w && c.contains(w) || c.contains(y) || Z(c);
1027
+ }
1028
+ document.addEventListener("focusin", l), document.addEventListener("focusout", m);
1029
+ const h = new MutationObserver(v);
1030
+ c && h.observe(c, {
1031
+ childList: !0,
1032
+ subtree: !0
1033
+ }), u(() => {
1034
+ document.removeEventListener("focusin", l), document.removeEventListener("focusout", m), h.disconnect();
1035
+ });
1036
+ });
1037
+ function p(u, c) {
1038
+ const l = new CustomEvent(je, gt), m = (v) => r("mountAutoFocus", v);
1039
+ u.addEventListener(je, m), u.dispatchEvent(l), u.removeEventListener(je, m), l.defaultPrevented || (fr(Yt(u), { select: !0 }), Q() === c && Z(u));
1040
+ }
1041
+ le(async (u) => {
1042
+ const c = o.value;
1043
+ if (await te(), !c) return;
1044
+ n.present !== !1 && s.add(f);
1045
+ const l = Q();
1046
+ !c.contains(l) && n.present !== !1 && p(c, l), u(() => {
1047
+ const m = new CustomEvent(Ue, gt), v = (h) => {
1048
+ r("unmountAutoFocus", h);
1049
+ };
1050
+ c.addEventListener(Ue, v), c.dispatchEvent(m), c.setAttribute("data-focus-scope-unmounting", ""), setTimeout(() => {
1051
+ m.defaultPrevented || Z(l ?? document.body, { select: !0 }), c.removeEventListener(Ue, v), s.remove(f), c.removeAttribute("data-focus-scope-unmounting");
1052
+ }, 0);
1053
+ });
1054
+ }), L(() => n.present, async (u, c) => {
1055
+ if (!N) return;
1056
+ if (u === !1 && c === !0) {
1057
+ s.remove(f);
1058
+ return;
1059
+ }
1060
+ if (u !== !0 || c !== !1) return;
1061
+ s.add(f), await te();
1062
+ const l = o.value;
1063
+ if (!l) return;
1064
+ const m = Q();
1065
+ l.contains(m) || p(l, m);
1066
+ });
1067
+ function d(u) {
1068
+ if (!n.loop && !n.trapped || f.paused) return;
1069
+ const c = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey, l = Q();
1070
+ if (c && l) {
1071
+ const m = u.currentTarget, [v, h] = dr(m);
1072
+ v && h ? !u.shiftKey && l === h ? (u.preventDefault(), n.loop && Z(v, { select: !0 })) : u.shiftKey && l === v && (u.preventDefault(), n.loop && Z(h, { select: !0 })) : l === m && u.preventDefault();
1073
+ }
1074
+ }
1075
+ return (u, c) => (U(), se(P(we), {
1076
+ ref_key: "currentRef",
1077
+ ref: i,
1078
+ tabindex: "-1",
1079
+ "as-child": u.asChild,
1080
+ as: u.as,
1081
+ onKeydown: d
1082
+ }, {
1083
+ default: ge(() => [ee(u.$slots, "default")]),
1084
+ _: 3
1085
+ }, 8, ["as-child", "as"]));
1086
+ }
1087
+ }), Ko = /* @__PURE__ */ I({
1088
+ __name: "Teleport",
1089
+ props: {
1090
+ to: {
1091
+ type: null,
1092
+ required: !1
1093
+ },
1094
+ disabled: {
1095
+ type: Boolean,
1096
+ required: !1
1097
+ },
1098
+ defer: {
1099
+ type: Boolean,
1100
+ required: !1
1101
+ },
1102
+ forceMount: {
1103
+ type: Boolean,
1104
+ required: !1
1105
+ }
1106
+ },
1107
+ setup(e) {
1108
+ const t = e, n = Fe({}), r = b(() => t.to ?? n.teleportTo?.value ?? "body"), i = Wn();
1109
+ return (o, a) => P(i) || o.forceMount ? (U(), se(yn, {
1110
+ key: 0,
1111
+ to: r.value,
1112
+ disabled: o.disabled,
1113
+ defer: o.defer
1114
+ }, [ee(o.$slots, "default")], 8, [
1115
+ "to",
1116
+ "disabled",
1117
+ "defer"
1118
+ ])) : xn("v-if", !0);
1119
+ }
1120
+ }), Yo = /* @__PURE__ */ I({
1121
+ __name: "VisuallyHidden",
1122
+ props: {
1123
+ feature: {
1124
+ type: String,
1125
+ required: !1,
1126
+ default: "focusable"
1127
+ },
1128
+ asChild: {
1129
+ type: Boolean,
1130
+ required: !1
1131
+ },
1132
+ as: {
1133
+ type: null,
1134
+ required: !1,
1135
+ default: "span"
1136
+ }
1137
+ },
1138
+ setup(e) {
1139
+ return (t, n) => (U(), se(P(we), {
1140
+ as: t.as,
1141
+ "as-child": t.asChild,
1142
+ "aria-hidden": t.feature === "focusable" || t.feature === "fully-hidden" ? "true" : void 0,
1143
+ "data-hidden": t.feature === "fully-hidden" ? "" : void 0,
1144
+ tabindex: t.feature === "fully-hidden" ? "-1" : void 0,
1145
+ style: {
1146
+ position: "absolute",
1147
+ border: 0,
1148
+ width: "1px",
1149
+ height: "1px",
1150
+ padding: 0,
1151
+ margin: "-1px",
1152
+ overflow: "hidden",
1153
+ clip: "rect(0, 0, 0, 0)",
1154
+ clipPath: "inset(50%)",
1155
+ whiteSpace: "nowrap",
1156
+ wordWrap: "normal",
1157
+ top: "-1px",
1158
+ left: "-1px"
1159
+ }
1160
+ }, {
1161
+ default: ge(() => [ee(t.$slots, "default")]),
1162
+ _: 3
1163
+ }, 8, [
1164
+ "as",
1165
+ "as-child",
1166
+ "aria-hidden",
1167
+ "data-hidden",
1168
+ "tabindex"
1169
+ ]));
1170
+ }
1171
+ }), [Xt, mr] = /* @__PURE__ */ rt("PopperRoot"), Xo = /* @__PURE__ */ I({
1172
+ inheritAttrs: !1,
1173
+ __name: "PopperRoot",
1174
+ setup(e) {
1175
+ const t = S();
1176
+ return mr({
1177
+ anchor: t,
1178
+ onAnchorChange: (n) => t.value = n
1179
+ }), (n, r) => ee(n.$slots, "default");
1180
+ }
1181
+ }), Go = /* @__PURE__ */ I({
1182
+ __name: "PopperAnchor",
1183
+ props: {
1184
+ reference: {
1185
+ type: null,
1186
+ required: !1
1187
+ },
1188
+ asChild: {
1189
+ type: Boolean,
1190
+ required: !1
1191
+ },
1192
+ as: {
1193
+ type: null,
1194
+ required: !1
1195
+ }
1196
+ },
1197
+ setup(e) {
1198
+ const t = e, { forwardRef: n, currentElement: r } = _e(), i = Xt();
1199
+ return Rt(() => {
1200
+ i.onAnchorChange(t.reference ?? r.value);
1201
+ }), (o, a) => (U(), se(P(we), {
1202
+ ref: P(n),
1203
+ as: o.as,
1204
+ "as-child": o.asChild
1205
+ }, {
1206
+ default: ge(() => [ee(o.$slots, "default")]),
1207
+ _: 3
1208
+ }, 8, ["as", "as-child"]));
1209
+ }
1210
+ });
1211
+ function hr(e) {
1212
+ return e !== null;
1213
+ }
1214
+ function yr(e) {
1215
+ return {
1216
+ name: "transformOrigin",
1217
+ options: e,
1218
+ fn(t) {
1219
+ const { placement: n, rects: r, middlewareData: i } = t, o = i.arrow?.centerOffset !== 0, a = o ? 0 : e.arrowWidth, s = o ? 0 : e.arrowHeight, [f, p] = Ze(n), d = {
1220
+ start: e.dir === "rtl" ? "100%" : "0%",
1221
+ center: "50%",
1222
+ end: e.dir === "rtl" ? "0%" : "100%"
1223
+ }[p], u = {
1224
+ start: "0%",
1225
+ center: "50%",
1226
+ end: "100%"
1227
+ }[p], c = (i.arrow?.x ?? 0) + a / 2, l = (i.arrow?.y ?? 0) + s / 2;
1228
+ let m = "", v = "";
1229
+ return f === "bottom" ? (m = o ? d : `${c}px`, v = `${-s}px`) : f === "top" ? (m = o ? d : `${c}px`, v = `${r.floating.height + s}px`) : f === "right" ? (m = `${-s}px`, v = o ? u : `${l}px`) : f === "left" && (m = `${r.floating.width + s}px`, v = o ? u : `${l}px`), { data: {
1230
+ x: m,
1231
+ y: v
1232
+ } };
1233
+ }
1234
+ };
1235
+ }
1236
+ function Ze(e) {
1237
+ const [t, n = "center"] = e.split("-");
1238
+ return [t, n];
1239
+ }
1240
+ var gr = [
1241
+ "top",
1242
+ "right",
1243
+ "bottom",
1244
+ "left"
1245
+ ], ne = Math.min, K = Math.max, Re = Math.round, Ce = Math.floor, Y = (e) => ({
1246
+ x: e,
1247
+ y: e
1248
+ }), wr = {
1249
+ left: "right",
1250
+ right: "left",
1251
+ bottom: "top",
1252
+ top: "bottom"
1253
+ };
1254
+ function Gt(e, t, n) {
1255
+ return K(e, ne(t, n));
1256
+ }
1257
+ function X(e, t) {
1258
+ return typeof e == "function" ? e(t) : e;
1259
+ }
1260
+ function re(e) {
1261
+ return e.split("-")[0];
1262
+ }
1263
+ function xe(e) {
1264
+ return e.split("-")[1];
1265
+ }
1266
+ function lt(e) {
1267
+ return e === "x" ? "y" : "x";
1268
+ }
1269
+ function ut(e) {
1270
+ return e === "y" ? "height" : "width";
1271
+ }
1272
+ function z(e) {
1273
+ const t = e[0];
1274
+ return t === "t" || t === "b" ? "y" : "x";
1275
+ }
1276
+ function ct(e) {
1277
+ return lt(z(e));
1278
+ }
1279
+ function br(e, t, n) {
1280
+ n === void 0 && (n = !1);
1281
+ const r = xe(e), i = ct(e), o = ut(i);
1282
+ let a = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
1283
+ return t.reference[o] > t.floating[o] && (a = De(a)), [a, De(a)];
1284
+ }
1285
+ function xr(e) {
1286
+ const t = De(e);
1287
+ return [
1288
+ Qe(e),
1289
+ t,
1290
+ Qe(t)
1291
+ ];
1292
+ }
1293
+ function Qe(e) {
1294
+ return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
1295
+ }
1296
+ var bt = ["left", "right"], xt = ["right", "left"], Er = ["top", "bottom"], Or = ["bottom", "top"];
1297
+ function Ar(e, t, n) {
1298
+ switch (e) {
1299
+ case "top":
1300
+ case "bottom":
1301
+ return n ? t ? xt : bt : t ? bt : xt;
1302
+ case "left":
1303
+ case "right":
1304
+ return t ? Er : Or;
1305
+ default:
1306
+ return [];
1307
+ }
1308
+ }
1309
+ function Pr(e, t, n, r) {
1310
+ const i = xe(e);
1311
+ let o = Ar(re(e), n === "start", r);
1312
+ return i && (o = o.map((a) => a + "-" + i), t && (o = o.concat(o.map(Qe)))), o;
1313
+ }
1314
+ function De(e) {
1315
+ const t = re(e);
1316
+ return wr[t] + e.slice(t.length);
1317
+ }
1318
+ function Sr(e) {
1319
+ var t, n, r, i;
1320
+ return {
1321
+ top: (t = e.top) != null ? t : 0,
1322
+ right: (n = e.right) != null ? n : 0,
1323
+ bottom: (r = e.bottom) != null ? r : 0,
1324
+ left: (i = e.left) != null ? i : 0
1325
+ };
1326
+ }
1327
+ function Jt(e) {
1328
+ return typeof e != "number" ? Sr(e) : {
1329
+ top: e,
1330
+ right: e,
1331
+ bottom: e,
1332
+ left: e
1333
+ };
1334
+ }
1335
+ function Le(e) {
1336
+ const { x: t, y: n, width: r, height: i } = e;
1337
+ return {
1338
+ width: r,
1339
+ height: i,
1340
+ top: n,
1341
+ left: t,
1342
+ right: t + r,
1343
+ bottom: n + i,
1344
+ x: t,
1345
+ y: n
1346
+ };
1347
+ }
1348
+ function Et(e, t, n) {
1349
+ let { reference: r, floating: i } = e;
1350
+ const o = z(t), a = ct(t), s = ut(a), f = re(t), p = o === "y", d = r.x + r.width / 2 - i.width / 2, u = r.y + r.height / 2 - i.height / 2, c = r[s] / 2 - i[s] / 2;
1351
+ let l;
1352
+ switch (f) {
1353
+ case "top":
1354
+ l = {
1355
+ x: d,
1356
+ y: r.y - i.height
1357
+ };
1358
+ break;
1359
+ case "bottom":
1360
+ l = {
1361
+ x: d,
1362
+ y: r.y + r.height
1363
+ };
1364
+ break;
1365
+ case "right":
1366
+ l = {
1367
+ x: r.x + r.width,
1368
+ y: u
1369
+ };
1370
+ break;
1371
+ case "left":
1372
+ l = {
1373
+ x: r.x - i.width,
1374
+ y: u
1375
+ };
1376
+ break;
1377
+ default:
1378
+ l = {
1379
+ x: r.x,
1380
+ y: r.y
1381
+ };
1382
+ }
1383
+ const m = xe(t);
1384
+ return m && (l[a] += c * (m === "end" ? 1 : -1) * (n && p ? -1 : 1)), l;
1385
+ }
1386
+ async function Cr(e, t) {
1387
+ var n;
1388
+ t === void 0 && (t = {});
1389
+ const { x: r, y: i, platform: o, rects: a, elements: s, strategy: f } = e, { boundary: p = "clippingAncestors", rootBoundary: d = "viewport", elementContext: u = "floating", altBoundary: c = !1, padding: l = 0 } = X(t, e), m = Jt(l), v = s[c ? u === "floating" ? "reference" : "floating" : u], h = Le(await o.getClippingRect({
1390
+ element: (n = await (o.isElement == null ? void 0 : o.isElement(v))) == null || n ? v : v.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(s.floating)),
1391
+ boundary: p,
1392
+ rootBoundary: d,
1393
+ strategy: f
1394
+ })), g = u === "floating" ? {
1395
+ x: r,
1396
+ y: i,
1397
+ width: a.floating.width,
1398
+ height: a.floating.height
1399
+ } : a.reference, y = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(s.floating)), w = await (o.isElement == null ? void 0 : o.isElement(y)) && await (o.getScale == null ? void 0 : o.getScale(y)) || {
1400
+ x: 1,
1401
+ y: 1
1402
+ }, x = Le(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
1403
+ elements: s,
1404
+ rect: g,
1405
+ offsetParent: y,
1406
+ strategy: f
1407
+ }) : g);
1408
+ return {
1409
+ top: (h.top - x.top + m.top) / w.y,
1410
+ bottom: (x.bottom - h.bottom + m.bottom) / w.y,
1411
+ left: (h.left - x.left + m.left) / w.x,
1412
+ right: (x.right - h.right + m.right) / w.x
1413
+ };
1414
+ }
1415
+ var Tr = 50, Mr = async (e, t, n) => {
1416
+ const { placement: r = "bottom", strategy: i = "absolute", middleware: o = [], platform: a } = n, s = a.detectOverflow ? a : {
1417
+ ...a,
1418
+ detectOverflow: Cr
1419
+ }, f = await (a.isRTL == null ? void 0 : a.isRTL(t));
1420
+ let p = await a.getElementRects({
1421
+ reference: e,
1422
+ floating: t,
1423
+ strategy: i
1424
+ }), { x: d, y: u } = Et(p, r, f), c = r, l = 0;
1425
+ const m = {};
1426
+ for (let v = 0; v < o.length; v++) {
1427
+ const h = o[v];
1428
+ if (!h) continue;
1429
+ const { name: g, fn: y } = h, { x: w, y: x, data: C, reset: E } = await y({
1430
+ x: d,
1431
+ y: u,
1432
+ initialPlacement: r,
1433
+ placement: c,
1434
+ strategy: i,
1435
+ middlewareData: m,
1436
+ rects: p,
1437
+ platform: s,
1438
+ elements: {
1439
+ reference: e,
1440
+ floating: t
1441
+ }
1442
+ });
1443
+ d = w ?? d, u = x ?? u, m[g] = {
1444
+ ...m[g],
1445
+ ...C
1446
+ }, E && l < Tr && (l++, typeof E == "object" && (E.placement && (c = E.placement), E.rects && (p = E.rects === !0 ? await a.getElementRects({
1447
+ reference: e,
1448
+ floating: t,
1449
+ strategy: i
1450
+ }) : E.rects), { x: d, y: u } = Et(p, c, f)), v = -1);
1451
+ }
1452
+ return {
1453
+ x: d,
1454
+ y: u,
1455
+ placement: c,
1456
+ strategy: i,
1457
+ middlewareData: m
1458
+ };
1459
+ }, Rr = (e) => ({
1460
+ name: "arrow",
1461
+ options: e,
1462
+ async fn(t) {
1463
+ const { x: n, y: r, placement: i, rects: o, platform: a, elements: s, middlewareData: f } = t, { element: p, padding: d = 0 } = X(e, t) || {};
1464
+ if (p == null) return {};
1465
+ const u = Jt(d), c = {
1466
+ x: n,
1467
+ y: r
1468
+ }, l = ct(i), m = ut(l), v = await a.getDimensions(p), h = l === "y", g = h ? "top" : "left", y = h ? "bottom" : "right", w = h ? "clientHeight" : "clientWidth", x = o.reference[m] + o.reference[l] - c[l] - o.floating[m], C = c[l] - o.reference[l], E = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(p));
1469
+ let O = E ? E[w] : 0;
1470
+ (!O || !await (a.isElement == null ? void 0 : a.isElement(E))) && (O = s.floating[w] || o.floating[m]);
1471
+ const A = x / 2 - C / 2, M = O / 2 - v[m] / 2 - 1, R = ne(u[g], M), J = ne(u[y], M), ie = O - v[m] - J, k = O / 2 - v[m] / 2 + A, T = Gt(R, k, ie), $ = !f.arrow && xe(i) != null && k !== T && o.reference[m] / 2 - (k < R ? R : J) - v[m] / 2 < 0, B = $ ? k < R ? k - R : k - ie : 0;
1472
+ return {
1473
+ [l]: c[l] + B,
1474
+ data: {
1475
+ [l]: T,
1476
+ centerOffset: k - T - B,
1477
+ ...$ && { alignmentOffset: B }
1478
+ },
1479
+ reset: $
1480
+ };
1481
+ }
1482
+ }), Dr = function(e) {
1483
+ return e === void 0 && (e = {}), {
1484
+ name: "flip",
1485
+ options: e,
1486
+ async fn(t) {
1487
+ var n, r;
1488
+ const { placement: i, middlewareData: o, rects: a, initialPlacement: s, platform: f, elements: p } = t, { mainAxis: d = !0, crossAxis: u = !0, fallbackPlacements: c, fallbackStrategy: l = "bestFit", fallbackAxisSideDirection: m = "none", flipAlignment: v = !0, ...h } = X(e, t);
1489
+ if ((n = o.arrow) != null && n.alignmentOffset) return {};
1490
+ const g = re(i), y = z(s), w = re(s) === s, x = await (f.isRTL == null ? void 0 : f.isRTL(p.floating)), C = c || (w || !v ? [De(s)] : xr(s)), E = m !== "none";
1491
+ !c && E && C.push(...Pr(s, v, m, x));
1492
+ const O = [s, ...C], A = await f.detectOverflow(t, h), M = [];
1493
+ let R = ((r = o.flip) == null ? void 0 : r.overflows) || [];
1494
+ if (d && M.push(A[g]), u) {
1495
+ const T = br(i, a, x);
1496
+ M.push(A[T[0]], A[T[1]]);
1497
+ }
1498
+ if (R = [...R, {
1499
+ placement: i,
1500
+ overflows: M
1501
+ }], !M.every((T) => T <= 0)) {
1502
+ var J, ie;
1503
+ const T = (((J = o.flip) == null ? void 0 : J.index) || 0) + 1, $ = O[T];
1504
+ if ($ && (!(u === "alignment" && y !== z($)) || R.every((W) => z(W.placement) === y ? W.overflows[0] > 0 : !0)))
1505
+ return {
1506
+ data: {
1507
+ index: T,
1508
+ overflows: R
1509
+ },
1510
+ reset: { placement: $ }
1511
+ };
1512
+ let B = (ie = R.filter((W) => W.overflows[0] <= 0).sort((W, H) => W.overflows[1] - H.overflows[1])[0]) == null ? void 0 : ie.placement;
1513
+ if (!B) switch (l) {
1514
+ case "bestFit": {
1515
+ var k;
1516
+ const W = (k = R.filter((H) => {
1517
+ if (E) {
1518
+ const q = z(H.placement);
1519
+ return q === y || q === "y";
1520
+ }
1521
+ return !0;
1522
+ }).map((H) => [H.placement, H.overflows.filter((q) => q > 0).reduce((q, pe) => q + pe, 0)]).sort((H, q) => H[1] - q[1])[0]) == null ? void 0 : k[0];
1523
+ W && (B = W);
1524
+ break;
1525
+ }
1526
+ case "initialPlacement":
1527
+ B = s;
1528
+ }
1529
+ if (i !== B) return { reset: { placement: B } };
1530
+ }
1531
+ return {};
1532
+ }
1533
+ };
1534
+ };
1535
+ function Ot(e, t) {
1536
+ return {
1537
+ top: e.top - t.height,
1538
+ right: e.right - t.width,
1539
+ bottom: e.bottom - t.height,
1540
+ left: e.left - t.width
1541
+ };
1542
+ }
1543
+ function At(e) {
1544
+ return gr.some((t) => e[t] >= 0);
1545
+ }
1546
+ var Lr = function(e) {
1547
+ return e === void 0 && (e = {}), {
1548
+ name: "hide",
1549
+ options: e,
1550
+ async fn(t) {
1551
+ const { rects: n, platform: r } = t, { strategy: i = "referenceHidden", ...o } = X(e, t);
1552
+ switch (i) {
1553
+ case "referenceHidden": {
1554
+ const a = Ot(await r.detectOverflow(t, {
1555
+ ...o,
1556
+ elementContext: "reference"
1557
+ }), n.reference);
1558
+ return { data: {
1559
+ referenceHiddenOffsets: a,
1560
+ referenceHidden: At(a)
1561
+ } };
1562
+ }
1563
+ case "escaped": {
1564
+ const a = Ot(await r.detectOverflow(t, {
1565
+ ...o,
1566
+ altBoundary: !0
1567
+ }), n.floating);
1568
+ return { data: {
1569
+ escapedOffsets: a,
1570
+ escaped: At(a)
1571
+ } };
1572
+ }
1573
+ default:
1574
+ return {};
1575
+ }
1576
+ }
1577
+ };
1578
+ }, Zt = /* @__PURE__ */ new Set(["left", "top"]);
1579
+ async function Fr(e, t) {
1580
+ const { placement: n, platform: r, elements: i } = e, o = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), a = re(n), s = xe(n), f = z(n) === "y", p = Zt.has(a) ? -1 : 1, d = o && f ? -1 : 1, u = X(t, e);
1581
+ let { mainAxis: c, crossAxis: l, alignmentAxis: m } = typeof u == "number" ? {
1582
+ mainAxis: u,
1583
+ crossAxis: 0,
1584
+ alignmentAxis: null
1585
+ } : {
1586
+ mainAxis: u.mainAxis || 0,
1587
+ crossAxis: u.crossAxis || 0,
1588
+ alignmentAxis: u.alignmentAxis
1589
+ };
1590
+ return s && typeof m == "number" && (l = s === "end" ? m * -1 : m), f ? {
1591
+ x: l * d,
1592
+ y: c * p
1593
+ } : {
1594
+ x: c * p,
1595
+ y: l * d
1596
+ };
1597
+ }
1598
+ var _r = function(e) {
1599
+ return e === void 0 && (e = 0), {
1600
+ name: "offset",
1601
+ options: e,
1602
+ async fn(t) {
1603
+ var n, r;
1604
+ const { x: i, y: o, placement: a, middlewareData: s } = t, f = await Fr(t, e);
1605
+ return a === ((n = s.offset) == null ? void 0 : n.placement) && (r = s.arrow) != null && r.alignmentOffset ? {} : {
1606
+ x: i + f.x,
1607
+ y: o + f.y,
1608
+ data: {
1609
+ ...f,
1610
+ placement: a
1611
+ }
1612
+ };
1613
+ }
1614
+ };
1615
+ }, Nr = function(e) {
1616
+ return e === void 0 && (e = {}), {
1617
+ name: "shift",
1618
+ options: e,
1619
+ async fn(t) {
1620
+ const { x: n, y: r, placement: i, platform: o } = t, { mainAxis: a = !0, crossAxis: s = !1, limiter: f = { fn: (y) => {
1621
+ let { x: w, y: x } = y;
1622
+ return {
1623
+ x: w,
1624
+ y: x
1625
+ };
1626
+ } }, ...p } = X(e, t), d = {
1627
+ x: n,
1628
+ y: r
1629
+ }, u = await o.detectOverflow(t, p), c = z(i), l = lt(c);
1630
+ let m = d[l], v = d[c];
1631
+ const h = (y, w) => Gt(w + u[y === "y" ? "top" : "left"], w, w - u[y === "y" ? "bottom" : "right"]);
1632
+ a && (m = h(l, m)), s && (v = h(c, v));
1633
+ const g = f.fn({
1634
+ ...t,
1635
+ [l]: m,
1636
+ [c]: v
1637
+ });
1638
+ return {
1639
+ ...g,
1640
+ data: {
1641
+ x: g.x - n,
1642
+ y: g.y - r,
1643
+ enabled: {
1644
+ [l]: a,
1645
+ [c]: s
1646
+ }
1647
+ }
1648
+ };
1649
+ }
1650
+ };
1651
+ }, kr = function(e) {
1652
+ return e === void 0 && (e = {}), {
1653
+ options: e,
1654
+ fn(t) {
1655
+ var n, r;
1656
+ const { x: i, y: o, placement: a, rects: s, middlewareData: f } = t, { offset: p = 0, mainAxis: d = !0, crossAxis: u = !0 } = X(e, t), c = {
1657
+ x: i,
1658
+ y: o
1659
+ }, l = z(a), m = lt(l);
1660
+ let v = c[m], h = c[l];
1661
+ const g = X(p, t), y = typeof g == "number" ? {
1662
+ mainAxis: g,
1663
+ crossAxis: 0
1664
+ } : {
1665
+ mainAxis: (n = g.mainAxis) != null ? n : 0,
1666
+ crossAxis: (r = g.crossAxis) != null ? r : 0
1667
+ };
1668
+ if (d) {
1669
+ const C = m === "y" ? "height" : "width", E = s.reference[m] - s.floating[C] + y.mainAxis, O = s.reference[m] + s.reference[C] - y.mainAxis;
1670
+ v < E ? v = E : v > O && (v = O);
1671
+ }
1672
+ if (u) {
1673
+ var w, x;
1674
+ const C = m === "y" ? "width" : "height", E = Zt.has(re(a)), O = s.reference[l] - s.floating[C] + (E && ((w = f.offset) == null ? void 0 : w[l]) || 0) + (E ? 0 : y.crossAxis), A = s.reference[l] + s.reference[C] + (E ? 0 : ((x = f.offset) == null ? void 0 : x[l]) || 0) - (E ? y.crossAxis : 0);
1675
+ h < O ? h = O : h > A && (h = A);
1676
+ }
1677
+ return {
1678
+ [m]: v,
1679
+ [l]: h
1680
+ };
1681
+ }
1682
+ };
1683
+ }, $r = function(e) {
1684
+ return e === void 0 && (e = {}), {
1685
+ name: "size",
1686
+ options: e,
1687
+ async fn(t) {
1688
+ const { placement: n, rects: r, platform: i, elements: o } = t, { apply: a = () => {
1689
+ }, ...s } = X(e, t), f = await i.detectOverflow(t, s), p = re(n), d = xe(n), u = z(n) === "y", { width: c, height: l } = r.floating;
1690
+ let m, v;
1691
+ p === "top" || p === "bottom" ? (m = p, v = d === (await (i.isRTL == null ? void 0 : i.isRTL(o.floating)) ? "start" : "end") ? "left" : "right") : (v = p, m = d === "end" ? "top" : "bottom");
1692
+ const h = l - f.top - f.bottom, g = c - f.left - f.right, y = ne(l - f[m], h), w = ne(c - f[v], g), x = t.middlewareData.shift, C = !x;
1693
+ let E = y, O = w;
1694
+ x != null && x.enabled.x && (O = g), x != null && x.enabled.y && (E = h), C && !d && (u ? O = c - 2 * K(f.left, f.right) : E = l - 2 * K(f.top, f.bottom)), await a({
1695
+ ...t,
1696
+ availableWidth: O,
1697
+ availableHeight: E
1698
+ });
1699
+ const A = await i.getDimensions(o.floating);
1700
+ return c !== A.width || l !== A.height ? { reset: { rects: !0 } } : {};
1701
+ }
1702
+ };
1703
+ };
1704
+ function Ne() {
1705
+ return typeof window < "u";
1706
+ }
1707
+ function de(e) {
1708
+ return ft(e) ? (e.nodeName || "").toLowerCase() : "#document";
1709
+ }
1710
+ function _(e) {
1711
+ var t;
1712
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
1713
+ }
1714
+ function G(e) {
1715
+ var t;
1716
+ return (t = (ft(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
1717
+ }
1718
+ function ft(e) {
1719
+ return Ne() ? e instanceof Node || e instanceof _(e).Node : !1;
1720
+ }
1721
+ function V(e) {
1722
+ return Ne() ? e instanceof Element || e instanceof _(e).Element : !1;
1723
+ }
1724
+ function oe(e) {
1725
+ return Ne() ? e instanceof HTMLElement || e instanceof _(e).HTMLElement : !1;
1726
+ }
1727
+ function Pt(e) {
1728
+ return !Ne() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof _(e).ShadowRoot;
1729
+ }
1730
+ function ke(e) {
1731
+ const { overflow: t, overflowX: n, overflowY: r, display: i } = j(e);
1732
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
1733
+ }
1734
+ function Br(e) {
1735
+ return /^(table|td|th)$/.test(de(e));
1736
+ }
1737
+ function $e(e) {
1738
+ try {
1739
+ if (e.matches(":popover-open")) return !0;
1740
+ } catch {
1741
+ }
1742
+ try {
1743
+ return e.matches(":modal");
1744
+ } catch {
1745
+ return !1;
1746
+ }
1747
+ }
1748
+ var Wr = /transform|translate|scale|rotate|perspective|filter/, Ir = /paint|layout|strict|content/, ae = (e) => !!e && e !== "none", Ke;
1749
+ function dt(e) {
1750
+ const t = V(e) ? j(e) : e;
1751
+ return ae(t.transform) || ae(t.translate) || ae(t.scale) || ae(t.rotate) || ae(t.perspective) || !pt() && (ae(t.backdropFilter) || ae(t.filter)) || Wr.test(t.willChange || "") || Ir.test(t.contain || "");
1752
+ }
1753
+ function Hr(e) {
1754
+ let t = ue(e);
1755
+ for (; oe(t) && !Ee(t); ) {
1756
+ if (dt(t)) return t;
1757
+ if ($e(t)) return null;
1758
+ t = ue(t);
1759
+ }
1760
+ return null;
1761
+ }
1762
+ function pt() {
1763
+ return Ke == null && (Ke = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), Ke;
1764
+ }
1765
+ function Ee(e) {
1766
+ return /^(html|body|#document)$/.test(de(e));
1767
+ }
1768
+ function j(e) {
1769
+ return _(e).getComputedStyle(e);
1770
+ }
1771
+ function Be(e) {
1772
+ return V(e) ? {
1773
+ scrollLeft: e.scrollLeft,
1774
+ scrollTop: e.scrollTop
1775
+ } : {
1776
+ scrollLeft: e.scrollX,
1777
+ scrollTop: e.scrollY
1778
+ };
1779
+ }
1780
+ function ue(e) {
1781
+ if (de(e) === "html") return e;
1782
+ const t = e.assignedSlot || e.parentNode || Pt(e) && e.host || G(e);
1783
+ return Pt(t) ? t.host : t;
1784
+ }
1785
+ function Qt(e) {
1786
+ const t = ue(e);
1787
+ return Ee(t) ? (e.ownerDocument || e).body : oe(t) && ke(t) ? t : Qt(t);
1788
+ }
1789
+ function Oe(e, t, n) {
1790
+ var r;
1791
+ t === void 0 && (t = []), n === void 0 && (n = !0);
1792
+ const i = Qt(e), o = i === ((r = e.ownerDocument) == null ? void 0 : r.body), a = _(i);
1793
+ if (o) {
1794
+ const s = et(a);
1795
+ return t.concat(a, a.visualViewport || [], ke(i) ? i : [], s && n ? Oe(s) : []);
1796
+ } else return t.concat(i, Oe(i, [], n));
1797
+ }
1798
+ function et(e) {
1799
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
1800
+ }
1801
+ function en(e) {
1802
+ const t = j(e);
1803
+ let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
1804
+ const i = oe(e), o = i ? e.offsetWidth : n, a = i ? e.offsetHeight : r, s = Re(n) !== o || Re(r) !== a;
1805
+ return s && (n = o, r = a), {
1806
+ width: n,
1807
+ height: r,
1808
+ $: s
1809
+ };
1810
+ }
1811
+ function vt(e) {
1812
+ return V(e) ? e : e.contextElement;
1813
+ }
1814
+ function ye(e) {
1815
+ const t = vt(e);
1816
+ if (!oe(t)) return Y(1);
1817
+ const n = t.getBoundingClientRect(), { width: r, height: i, $: o } = en(t);
1818
+ let a = (o ? Re(n.width) : n.width) / r, s = (o ? Re(n.height) : n.height) / i;
1819
+ return (!a || !Number.isFinite(a)) && (a = 1), (!s || !Number.isFinite(s)) && (s = 1), {
1820
+ x: a,
1821
+ y: s
1822
+ };
1823
+ }
1824
+ var qr = /* @__PURE__ */ Y(0);
1825
+ function tn(e) {
1826
+ const t = _(e);
1827
+ return !pt() || !t.visualViewport ? qr : {
1828
+ x: t.visualViewport.offsetLeft,
1829
+ y: t.visualViewport.offsetTop
1830
+ };
1831
+ }
1832
+ function zr(e, t, n) {
1833
+ return t === void 0 && (t = !1), !!n && t && n === _(e);
1834
+ }
1835
+ function ce(e, t, n, r) {
1836
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
1837
+ const i = e.getBoundingClientRect(), o = vt(e);
1838
+ let a = Y(1);
1839
+ t && (r ? V(r) && (a = ye(r)) : a = ye(e));
1840
+ const s = zr(o, n, r) ? tn(o) : Y(0);
1841
+ let f = (i.left + s.x) / a.x, p = (i.top + s.y) / a.y, d = i.width / a.x, u = i.height / a.y;
1842
+ if (o && r) {
1843
+ const c = _(o), l = V(r) ? _(r) : r;
1844
+ let m = c, v = et(m);
1845
+ for (; v && l !== m; ) {
1846
+ const h = ye(v), g = v.getBoundingClientRect(), y = j(v), w = g.left + (v.clientLeft + parseFloat(y.paddingLeft)) * h.x, x = g.top + (v.clientTop + parseFloat(y.paddingTop)) * h.y;
1847
+ f *= h.x, p *= h.y, d *= h.x, u *= h.y, f += w, p += x, m = _(v), v = et(m);
1848
+ }
1849
+ }
1850
+ return Le({
1851
+ width: d,
1852
+ height: u,
1853
+ x: f,
1854
+ y: p
1855
+ });
1856
+ }
1857
+ function We(e, t) {
1858
+ const n = Be(e).scrollLeft;
1859
+ return t ? t.left + n : ce(G(e)).left + n;
1860
+ }
1861
+ function nn(e, t) {
1862
+ const n = e.getBoundingClientRect();
1863
+ return {
1864
+ x: n.left + t.scrollLeft - We(e, n),
1865
+ y: n.top + t.scrollTop
1866
+ };
1867
+ }
1868
+ function Vr(e) {
1869
+ let { elements: t, rect: n, offsetParent: r, strategy: i } = e;
1870
+ const o = i === "fixed", a = G(r), s = t ? $e(t.floating) : !1;
1871
+ if (r === a || s && o) return n;
1872
+ let f = {
1873
+ scrollLeft: 0,
1874
+ scrollTop: 0
1875
+ }, p = Y(1);
1876
+ const d = Y(0), u = oe(r);
1877
+ if ((u || !o) && ((de(r) !== "body" || ke(a)) && (f = Be(r)), u)) {
1878
+ const l = ce(r);
1879
+ p = ye(r), d.x = l.x + r.clientLeft, d.y = l.y + r.clientTop;
1880
+ }
1881
+ const c = a && !u && !o ? nn(a, f) : Y(0);
1882
+ return {
1883
+ width: n.width * p.x,
1884
+ height: n.height * p.y,
1885
+ x: n.x * p.x - f.scrollLeft * p.x + d.x + c.x,
1886
+ y: n.y * p.y - f.scrollTop * p.y + d.y + c.y
1887
+ };
1888
+ }
1889
+ function jr(e) {
1890
+ return e.getClientRects ? Array.from(e.getClientRects()) : [];
1891
+ }
1892
+ function Ur(e) {
1893
+ const t = Be(e), n = e.ownerDocument.body, r = K(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = K(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
1894
+ let o = -t.scrollLeft + We(e);
1895
+ const a = -t.scrollTop;
1896
+ return j(n).direction === "rtl" && (o += K(e.clientWidth, n.clientWidth) - r), {
1897
+ width: r,
1898
+ height: i,
1899
+ x: o,
1900
+ y: a
1901
+ };
1902
+ }
1903
+ var Kr = 25;
1904
+ function Yr(e, t, n) {
1905
+ n === void 0 && (n = "viewport");
1906
+ const r = n === "layoutViewport", i = _(e), o = G(e), a = i.visualViewport;
1907
+ let s = o.clientWidth, f = o.clientHeight, p = 0, d = 0;
1908
+ if (a) {
1909
+ const u = !pt() || t === "fixed";
1910
+ r ? u || (p = -a.offsetLeft, d = -a.offsetTop) : (s = a.width, f = a.height, u && (p = a.offsetLeft, d = a.offsetTop));
1911
+ }
1912
+ if (We(o) <= 0) {
1913
+ const u = o.ownerDocument, c = u.body, l = getComputedStyle(c), m = u.compatMode === "CSS1Compat" && parseFloat(l.marginLeft) + parseFloat(l.marginRight) || 0, v = Math.abs(o.clientWidth - c.clientWidth - m), h = getComputedStyle(o).scrollbarGutter === "stable both-edges" ? v / 2 : v;
1914
+ h <= Kr && (s -= h);
1915
+ }
1916
+ return {
1917
+ width: s,
1918
+ height: f,
1919
+ x: p,
1920
+ y: d
1921
+ };
1922
+ }
1923
+ function Xr(e, t) {
1924
+ const n = ce(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, o = ye(e);
1925
+ return {
1926
+ width: e.clientWidth * o.x,
1927
+ height: e.clientHeight * o.y,
1928
+ x: i * o.x,
1929
+ y: r * o.y
1930
+ };
1931
+ }
1932
+ function St(e, t, n) {
1933
+ let r;
1934
+ if (t === "viewport" || t === "layoutViewport") r = Yr(e, n, t);
1935
+ else if (t === "document") r = Ur(G(e));
1936
+ else if (V(t)) r = Xr(t, n);
1937
+ else {
1938
+ const i = tn(e);
1939
+ r = {
1940
+ x: t.x - i.x,
1941
+ y: t.y - i.y,
1942
+ width: t.width,
1943
+ height: t.height
1944
+ };
1945
+ }
1946
+ return Le(r);
1947
+ }
1948
+ function Gr(e, t) {
1949
+ const n = t.get(e);
1950
+ if (n) return n;
1951
+ let r = Oe(e, [], !1).filter((s) => V(s) && de(s) !== "body"), i = null;
1952
+ const o = j(e).position === "fixed";
1953
+ let a = o ? ue(e) : e;
1954
+ for (; V(a) && !Ee(a); ) {
1955
+ const s = j(a), f = dt(a), p = i ? i.position : o ? "fixed" : "";
1956
+ !f && (p === "fixed" || p === "absolute" && s.position === "static") ? r = r.filter((d) => d !== a) : i = s, a = ue(a);
1957
+ }
1958
+ return t.set(e, r), r;
1959
+ }
1960
+ function Jr(e) {
1961
+ let { element: t, boundary: n, rootBoundary: r, strategy: i } = e;
1962
+ const o = [...n === "clippingAncestors" ? $e(t) ? [] : Gr(t, this._c) : [].concat(n), r], a = St(t, o[0], i);
1963
+ let s = a.top, f = a.right, p = a.bottom, d = a.left;
1964
+ for (let u = 1; u < o.length; u++) {
1965
+ const c = St(t, o[u], i);
1966
+ s = K(c.top, s), f = ne(c.right, f), p = ne(c.bottom, p), d = K(c.left, d);
1967
+ }
1968
+ return {
1969
+ width: f - d,
1970
+ height: p - s,
1971
+ x: d,
1972
+ y: s
1973
+ };
1974
+ }
1975
+ function Zr(e) {
1976
+ const { width: t, height: n } = en(e);
1977
+ return {
1978
+ width: t,
1979
+ height: n
1980
+ };
1981
+ }
1982
+ function Qr(e, t, n) {
1983
+ const r = oe(t), i = G(t), o = n === "fixed", a = ce(e, !0, o, t);
1984
+ let s = {
1985
+ scrollLeft: 0,
1986
+ scrollTop: 0
1987
+ };
1988
+ const f = Y(0);
1989
+ if ((r || !o) && ((de(t) !== "body" || ke(i)) && (s = Be(t)), r)) {
1990
+ const d = ce(t, !0, o, t);
1991
+ f.x = d.x + t.clientLeft, f.y = d.y + t.clientTop;
1992
+ }
1993
+ !r && i && (f.x = We(i));
1994
+ const p = i && !r && !o ? nn(i, s) : Y(0);
1995
+ return {
1996
+ x: a.left + s.scrollLeft - f.x - p.x,
1997
+ y: a.top + s.scrollTop - f.y - p.y,
1998
+ width: a.width,
1999
+ height: a.height
2000
+ };
2001
+ }
2002
+ function Ye(e) {
2003
+ return j(e).position === "static";
2004
+ }
2005
+ function Ct(e, t) {
2006
+ if (!oe(e) || j(e).position === "fixed") return null;
2007
+ if (t) return t(e);
2008
+ let n = e.offsetParent;
2009
+ return G(e) === n && (n = n.ownerDocument.body), n;
2010
+ }
2011
+ function rn(e, t) {
2012
+ const n = _(e);
2013
+ if ($e(e)) return n;
2014
+ if (!oe(e)) {
2015
+ let i = ue(e);
2016
+ for (; i && !Ee(i); ) {
2017
+ if (V(i) && !Ye(i)) return i;
2018
+ i = ue(i);
2019
+ }
2020
+ return n;
2021
+ }
2022
+ let r = Ct(e, t);
2023
+ for (; r && Br(r) && Ye(r); ) r = Ct(r, t);
2024
+ return r && Ee(r) && Ye(r) && !dt(r) ? n : r || Hr(e) || n;
2025
+ }
2026
+ var eo = async function(e) {
2027
+ const t = this.getOffsetParent || rn, n = this.getDimensions, r = await n(e.floating);
2028
+ return {
2029
+ reference: Qr(e.reference, await t(e.floating), e.strategy),
2030
+ floating: {
2031
+ x: 0,
2032
+ y: 0,
2033
+ width: r.width,
2034
+ height: r.height
2035
+ }
2036
+ };
2037
+ };
2038
+ function to(e) {
2039
+ return j(e).direction === "rtl";
2040
+ }
2041
+ var no = {
2042
+ convertOffsetParentRelativeRectToViewportRelativeRect: Vr,
2043
+ getDocumentElement: G,
2044
+ getClippingRect: Jr,
2045
+ getOffsetParent: rn,
2046
+ getElementRects: eo,
2047
+ getClientRects: jr,
2048
+ getDimensions: Zr,
2049
+ getScale: ye,
2050
+ isElement: V,
2051
+ isRTL: to
2052
+ };
2053
+ function on(e, t) {
2054
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
2055
+ }
2056
+ function ro(e, t, n) {
2057
+ let r = null, i;
2058
+ const o = G(e);
2059
+ function a() {
2060
+ var d;
2061
+ clearTimeout(i), (d = r) == null || d.disconnect(), r = null;
2062
+ }
2063
+ function s(d, u) {
2064
+ d === void 0 && (d = !1), u === void 0 && (u = 1), a();
2065
+ const c = e.getBoundingClientRect(), { left: l, top: m, width: v, height: h } = c;
2066
+ if (d || t(), !v || !h) return;
2067
+ const g = Ce(m), y = Ce(o.clientWidth - (l + v)), w = Ce(o.clientHeight - (m + h)), x = Ce(l), C = {
2068
+ rootMargin: -g + "px " + -y + "px " + -w + "px " + -x + "px",
2069
+ threshold: K(0, ne(1, u)) || 1
2070
+ };
2071
+ let E = !0;
2072
+ function O(A) {
2073
+ const M = A[0].intersectionRatio;
2074
+ if (!on(c, e.getBoundingClientRect())) return s();
2075
+ if (M !== u) {
2076
+ if (!E) return s();
2077
+ M ? s(!1, M) : i = setTimeout(() => {
2078
+ s(!1, 1e-7);
2079
+ }, 1e3);
2080
+ }
2081
+ E = !1;
2082
+ }
2083
+ try {
2084
+ r = new IntersectionObserver(O, {
2085
+ ...C,
2086
+ root: o.ownerDocument
2087
+ });
2088
+ } catch {
2089
+ r = new IntersectionObserver(O, C);
2090
+ }
2091
+ r.observe(e);
2092
+ }
2093
+ const f = _(e), p = () => s(n);
2094
+ return f.addEventListener("resize", p), s(!0), () => {
2095
+ f.removeEventListener("resize", p), a();
2096
+ };
2097
+ }
2098
+ function oo(e, t, n, r) {
2099
+ r === void 0 && (r = {});
2100
+ const { ancestorScroll: i = !0, ancestorResize: o = !0, elementResize: a = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: f = !1 } = r, p = vt(e), d = i || o ? [...p ? Oe(p) : [], ...t ? Oe(t) : []] : [];
2101
+ d.forEach((g) => {
2102
+ i && g.addEventListener("scroll", n), o && g.addEventListener("resize", n);
2103
+ });
2104
+ const u = p && s ? ro(p, n, o) : null;
2105
+ let c = -1, l = null;
2106
+ a && (l = new ResizeObserver((g) => {
2107
+ let [y] = g;
2108
+ y && y.target === p && l && t && (l.unobserve(t), cancelAnimationFrame(c), c = requestAnimationFrame(() => {
2109
+ var w;
2110
+ (w = l) == null || w.observe(t);
2111
+ })), n();
2112
+ }), p && !f && l.observe(p), t && l.observe(t));
2113
+ let m, v = f ? ce(e) : null;
2114
+ f && h();
2115
+ function h() {
2116
+ const g = ce(e);
2117
+ v && !on(v, g) && n(), v = g, m = requestAnimationFrame(h);
2118
+ }
2119
+ return n(), () => {
2120
+ var g;
2121
+ d.forEach((y) => {
2122
+ i && y.removeEventListener("scroll", n), o && y.removeEventListener("resize", n);
2123
+ }), u?.(), (g = l) == null || g.disconnect(), l = null, f && cancelAnimationFrame(m);
2124
+ };
2125
+ }
2126
+ var io = _r, ao = Nr, Tt = Dr, so = $r, lo = Lr, uo = Rr, co = kr, fo = (e, t, n) => {
2127
+ const r = /* @__PURE__ */ new Map(), i = n ?? {}, o = {
2128
+ ...no,
2129
+ ...i.platform,
2130
+ _c: r
2131
+ };
2132
+ return Mr(e, t, {
2133
+ ...i,
2134
+ platform: o
2135
+ });
2136
+ };
2137
+ function po(e) {
2138
+ return e != null && typeof e == "object" && "$el" in e;
2139
+ }
2140
+ function tt(e) {
2141
+ if (po(e)) {
2142
+ const t = e.$el;
2143
+ return ft(t) && de(t) === "#comment" ? null : t;
2144
+ }
2145
+ return e;
2146
+ }
2147
+ function he(e) {
2148
+ return typeof e == "function" ? e() : P(e);
2149
+ }
2150
+ function vo(e) {
2151
+ return {
2152
+ name: "arrow",
2153
+ options: e,
2154
+ fn(t) {
2155
+ const n = tt(he(e.element));
2156
+ return n == null ? {} : uo({
2157
+ element: n,
2158
+ padding: e.padding
2159
+ }).fn(t);
2160
+ }
2161
+ };
2162
+ }
2163
+ function an(e) {
2164
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
2165
+ }
2166
+ function Mt(e, t) {
2167
+ const n = an(e);
2168
+ return Math.round(t * n) / n;
2169
+ }
2170
+ function mo(e, t, n) {
2171
+ n === void 0 && (n = {});
2172
+ const r = n.whileElementsMounted, i = b(() => {
2173
+ var O;
2174
+ return (O = he(n.open)) != null ? O : !0;
2175
+ }), o = b(() => he(n.middleware)), a = b(() => {
2176
+ var O;
2177
+ return (O = he(n.placement)) != null ? O : "bottom";
2178
+ }), s = b(() => {
2179
+ var O;
2180
+ return (O = he(n.strategy)) != null ? O : "absolute";
2181
+ }), f = b(() => {
2182
+ var O;
2183
+ return (O = he(n.transform)) != null ? O : !0;
2184
+ }), p = b(() => tt(e.value)), d = b(() => tt(t.value)), u = S(0), c = S(0), l = S(s.value), m = S(a.value), v = $t({}), h = S(!1), g = b(() => {
2185
+ const O = {
2186
+ position: l.value,
2187
+ left: "0",
2188
+ top: "0"
2189
+ };
2190
+ if (!d.value) return O;
2191
+ const A = Mt(d.value, u.value), M = Mt(d.value, c.value);
2192
+ return f.value ? {
2193
+ ...O,
2194
+ transform: "translate(" + A + "px, " + M + "px)",
2195
+ ...an(d.value) >= 1.5 && { willChange: "transform" }
2196
+ } : {
2197
+ position: l.value,
2198
+ left: A + "px",
2199
+ top: M + "px"
2200
+ };
2201
+ });
2202
+ let y;
2203
+ function w() {
2204
+ if (p.value == null || d.value == null) return;
2205
+ const O = i.value;
2206
+ fo(p.value, d.value, {
2207
+ middleware: o.value,
2208
+ placement: a.value,
2209
+ strategy: s.value
2210
+ }).then((A) => {
2211
+ u.value = A.x, c.value = A.y, l.value = A.strategy, m.value = A.placement, v.value = A.middlewareData, h.value = O !== !1;
2212
+ });
2213
+ }
2214
+ function x() {
2215
+ typeof y == "function" && (y(), y = void 0);
2216
+ }
2217
+ function C() {
2218
+ if (x(), r === void 0) {
2219
+ w();
2220
+ return;
2221
+ }
2222
+ if (p.value != null && d.value != null) {
2223
+ y = r(p.value, d.value, w);
2224
+ return;
2225
+ }
2226
+ }
2227
+ function E() {
2228
+ i.value || (h.value = !1);
2229
+ }
2230
+ return L([
2231
+ o,
2232
+ a,
2233
+ s,
2234
+ i
2235
+ ], w, { flush: "sync" }), L([p, d], C, { flush: "sync" }), L(i, E, { flush: "sync" }), Bt() && Nt(x), {
2236
+ x: ve(u),
2237
+ y: ve(c),
2238
+ strategy: ve(l),
2239
+ placement: ve(m),
2240
+ middlewareData: ve(v),
2241
+ isPositioned: ve(h),
2242
+ floatingStyles: g,
2243
+ update: w
2244
+ };
2245
+ }
2246
+ var ho = ["dir"], yo = {
2247
+ side: "bottom",
2248
+ sideOffset: 0,
2249
+ sideFlip: !0,
2250
+ align: "center",
2251
+ alignOffset: 0,
2252
+ alignFlip: !0,
2253
+ arrowPadding: 0,
2254
+ hideShiftedArrow: !0,
2255
+ avoidCollisions: !0,
2256
+ collisionBoundary: () => [],
2257
+ collisionPadding: 0,
2258
+ sticky: "partial",
2259
+ hideWhenDetached: !1,
2260
+ positionStrategy: "fixed",
2261
+ updatePositionStrategy: "optimized",
2262
+ prioritizePosition: !1
2263
+ }, [Jo, go] = /* @__PURE__ */ rt("PopperContent"), Zo = /* @__PURE__ */ I({
2264
+ inheritAttrs: !1,
2265
+ __name: "PopperContent",
2266
+ props: /* @__PURE__ */ ln({
2267
+ memoDependencies: {
2268
+ type: Array,
2269
+ required: !1
2270
+ },
2271
+ side: {
2272
+ type: null,
2273
+ required: !1
2274
+ },
2275
+ sideOffset: {
2276
+ type: Number,
2277
+ required: !1
2278
+ },
2279
+ sideFlip: {
2280
+ type: Boolean,
2281
+ required: !1
2282
+ },
2283
+ align: {
2284
+ type: null,
2285
+ required: !1
2286
+ },
2287
+ alignOffset: {
2288
+ type: Number,
2289
+ required: !1
2290
+ },
2291
+ alignFlip: {
2292
+ type: Boolean,
2293
+ required: !1
2294
+ },
2295
+ avoidCollisions: {
2296
+ type: Boolean,
2297
+ required: !1
2298
+ },
2299
+ collisionBoundary: {
2300
+ type: null,
2301
+ required: !1
2302
+ },
2303
+ collisionPadding: {
2304
+ type: [Number, Object],
2305
+ required: !1
2306
+ },
2307
+ arrowPadding: {
2308
+ type: Number,
2309
+ required: !1
2310
+ },
2311
+ hideShiftedArrow: {
2312
+ type: Boolean,
2313
+ required: !1
2314
+ },
2315
+ sticky: {
2316
+ type: String,
2317
+ required: !1
2318
+ },
2319
+ hideWhenDetached: {
2320
+ type: Boolean,
2321
+ required: !1
2322
+ },
2323
+ positionStrategy: {
2324
+ type: String,
2325
+ required: !1
2326
+ },
2327
+ updatePositionStrategy: {
2328
+ type: String,
2329
+ required: !1
2330
+ },
2331
+ disableUpdateOnLayoutShift: {
2332
+ type: Boolean,
2333
+ required: !1
2334
+ },
2335
+ prioritizePosition: {
2336
+ type: Boolean,
2337
+ required: !1
2338
+ },
2339
+ reference: {
2340
+ type: null,
2341
+ required: !1
2342
+ },
2343
+ dir: {
2344
+ type: String,
2345
+ required: !1
2346
+ },
2347
+ asChild: {
2348
+ type: Boolean,
2349
+ required: !1
2350
+ },
2351
+ as: {
2352
+ type: null,
2353
+ required: !1
2354
+ }
2355
+ }, { ...yo }),
2356
+ emits: ["placed"],
2357
+ setup(e, { emit: t }) {
2358
+ const n = e, r = t, i = Xt(), { forwardRef: o, currentElement: a } = _e(), s = Un(b(() => n.dir)), f = S(), p = S(), { width: d, height: u } = er(p), c = b(() => n.side + (n.align !== "center" ? `-${n.align}` : "")), l = b(() => typeof n.collisionPadding == "number" ? n.collisionPadding : {
2359
+ top: 0,
2360
+ right: 0,
2361
+ bottom: 0,
2362
+ left: 0,
2363
+ ...n.collisionPadding
2364
+ }), m = b(() => Array.isArray(n.collisionBoundary) ? n.collisionBoundary : [n.collisionBoundary]), v = b(() => ({
2365
+ padding: l.value,
2366
+ boundary: m.value.filter(hr),
2367
+ altBoundary: m.value.length > 0
2368
+ })), h = b(() => ({
2369
+ mainAxis: n.sideFlip,
2370
+ crossAxis: n.alignFlip
2371
+ })), g = b(() => [
2372
+ io({
2373
+ mainAxis: n.sideOffset + u.value,
2374
+ alignmentAxis: n.alignOffset
2375
+ }),
2376
+ n.prioritizePosition && n.avoidCollisions && Tt({
2377
+ ...v.value,
2378
+ ...h.value
2379
+ }),
2380
+ n.avoidCollisions && ao({
2381
+ mainAxis: !0,
2382
+ crossAxis: !!n.prioritizePosition,
2383
+ limiter: n.sticky === "partial" ? co() : void 0,
2384
+ ...v.value
2385
+ }),
2386
+ !n.prioritizePosition && n.avoidCollisions && Tt({
2387
+ ...v.value,
2388
+ ...h.value
2389
+ }),
2390
+ so({
2391
+ ...v.value,
2392
+ apply: ({ elements: T, rects: $, availableWidth: B, availableHeight: W }) => {
2393
+ const { width: H, height: q } = $.reference, pe = T.floating.style;
2394
+ pe.setProperty("--reka-popper-available-width", `${B}px`), pe.setProperty("--reka-popper-available-height", `${W}px`), pe.setProperty("--reka-popper-anchor-width", `${H}px`), pe.setProperty("--reka-popper-anchor-height", `${q}px`);
2395
+ }
2396
+ }),
2397
+ p.value && vo({
2398
+ element: p.value,
2399
+ padding: n.arrowPadding
2400
+ }),
2401
+ yr({
2402
+ arrowWidth: d.value,
2403
+ arrowHeight: u.value,
2404
+ dir: s.value
2405
+ }),
2406
+ n.hideWhenDetached && lo({
2407
+ strategy: "referenceHidden",
2408
+ ...v.value
2409
+ })
2410
+ ]), y = b(() => n.reference ?? i.anchor.value), { floatingStyles: w, placement: x, isPositioned: C, middlewareData: E, update: O } = mo(y, f, {
2411
+ strategy: n.positionStrategy,
2412
+ placement: c,
2413
+ whileElementsMounted: (...T) => oo(...T, {
2414
+ layoutShift: !n.disableUpdateOnLayoutShift,
2415
+ animationFrame: n.updatePositionStrategy === "always"
2416
+ }),
2417
+ middleware: g
2418
+ }), A = b(() => Ze(x.value)[0]), M = b(() => Ze(x.value)[1]);
2419
+ Rt(() => {
2420
+ C.value && r("placed");
2421
+ });
2422
+ const R = b(() => {
2423
+ const T = E.value.arrow?.centerOffset !== 0;
2424
+ return n.hideShiftedArrow && T;
2425
+ }), J = S("");
2426
+ le(() => {
2427
+ a.value && (J.value = window.getComputedStyle(a.value).zIndex);
2428
+ });
2429
+ const ie = b(() => E.value.arrow?.x ?? 0), k = b(() => E.value.arrow?.y ?? 0);
2430
+ return go({
2431
+ placedSide: A,
2432
+ onArrowChange: (T) => p.value = T,
2433
+ arrowX: ie,
2434
+ arrowY: k,
2435
+ shouldHideArrow: R
2436
+ }), (T, $) => (U(), It("div", {
2437
+ ref_key: "floatingRef",
2438
+ ref: f,
2439
+ "data-reka-popper-content-wrapper": "",
2440
+ dir: P(s),
2441
+ style: Wt({
2442
+ ...P(w),
2443
+ transform: P(C) ? P(w).transform : "translate(0, -200%)",
2444
+ minWidth: "max-content",
2445
+ zIndex: J.value,
2446
+ "--reka-popper-transform-origin": [P(E).transformOrigin?.x, P(E).transformOrigin?.y].join(" "),
2447
+ ...P(E).hide?.referenceHidden && {
2448
+ visibility: "hidden",
2449
+ pointerEvents: "none"
2450
+ }
2451
+ })
2452
+ }, [n.memoDependencies ? fn([
2453
+ n.asChild,
2454
+ n.as,
2455
+ A.value,
2456
+ M.value,
2457
+ P(C),
2458
+ ...Object.values(T.$attrs),
2459
+ ...n.memoDependencies
2460
+ ], () => (U(), se(P(we), Ge({
2461
+ key: 0,
2462
+ ref: P(o)
2463
+ }, T.$attrs, {
2464
+ "as-child": n.asChild,
2465
+ as: n.as,
2466
+ "data-side": A.value,
2467
+ "data-align": M.value,
2468
+ style: { animation: P(C) ? void 0 : "none" }
2469
+ }), {
2470
+ default: ge(() => [ee(T.$slots, "default")]),
2471
+ _: 3
2472
+ }, 16, [
2473
+ "as-child",
2474
+ "as",
2475
+ "data-side",
2476
+ "data-align",
2477
+ "style"
2478
+ ])), $, 0) : (U(), se(P(we), Ge({
2479
+ key: 1,
2480
+ ref: P(o)
2481
+ }, T.$attrs, {
2482
+ "as-child": n.asChild,
2483
+ as: n.as,
2484
+ "data-side": A.value,
2485
+ "data-align": M.value,
2486
+ dir: P(s),
2487
+ style: { animation: P(C) ? void 0 : "none" }
2488
+ }), {
2489
+ default: ge(() => [ee(T.$slots, "default")]),
2490
+ _: 3
2491
+ }, 16, [
2492
+ "as-child",
2493
+ "as",
2494
+ "data-side",
2495
+ "data-align",
2496
+ "dir",
2497
+ "style"
2498
+ ]))], 12, ho));
2499
+ }
2500
+ });
2501
+ export {
2502
+ qt as A,
2503
+ be as C,
2504
+ Co as D,
2505
+ N as E,
2506
+ xo as F,
2507
+ En as I,
2508
+ rt as M,
2509
+ Eo as N,
2510
+ To as O,
2511
+ bo as P,
2512
+ Fe as S,
2513
+ Oo as T,
2514
+ _e as _,
2515
+ Ko as a,
2516
+ $o as b,
2517
+ Vo as c,
2518
+ zo as d,
2519
+ qo as f,
2520
+ Yn as g,
2521
+ Wo as h,
2522
+ Yo as i,
2523
+ Q as j,
2524
+ Pn as k,
2525
+ we as l,
2526
+ Io as m,
2527
+ Go as n,
2528
+ Uo as o,
2529
+ Ho as p,
2530
+ Xo as r,
2531
+ jo as s,
2532
+ Zo as t,
2533
+ rr as u,
2534
+ Bo as v,
2535
+ Fo as w,
2536
+ zn as x,
2537
+ Un as y
2538
+ };