@codeandfunction/callaloo 4.7.6 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/callaloo.global.js +1 -1
  2. package/dist/chunks/CLCalendar-XcUGsiWk.js +159 -0
  3. package/dist/chunks/CLModal.vue_vue_type_style_index_0_lang-BDyONfaQ.js +176 -0
  4. package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  5. package/dist/chunks/floating-ui.vue-Fx4CxKut.js +1057 -0
  6. package/dist/components/Containers/CLCarousel/CLCarousel.js +144 -148
  7. package/dist/components/Form/CLCalendar/CLCalendar.css +1 -0
  8. package/dist/components/Form/CLCalendar/CLCalendar.js +7 -0
  9. package/dist/components/Form/CLCalendar/CLCalendar.vue.d.ts +54 -0
  10. package/dist/components/Form/CLCalendar/index.d.ts +4 -0
  11. package/dist/components/Form/CLInput/CLInput.js +0 -1
  12. package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.css +1 -0
  13. package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.js +181 -0
  14. package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.vue.d.ts +265 -0
  15. package/dist/components/Form/CLInputDatePicker/index.d.ts +4 -0
  16. package/dist/components/Form/index.d.ts +2 -0
  17. package/dist/components/Modals/CLModal/CLModal.css +1 -1
  18. package/dist/components/Modals/CLModal/CLModal.js +3 -174
  19. package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.css +1 -0
  20. package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.js +185 -0
  21. package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.vue.d.ts +144 -0
  22. package/dist/components/Modals/CLModalDatePicker/index.d.ts +4 -0
  23. package/dist/components/Modals/index.d.ts +2 -1
  24. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +109 -1144
  25. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.vue.d.ts +10 -3
  26. package/dist/composables/useDateInputMask.d.ts +8 -0
  27. package/dist/composables/useDateInputMask.js +39 -0
  28. package/dist/composables/useDatePicker.d.ts +40 -0
  29. package/dist/composables/useDatePicker.js +141 -0
  30. package/dist/composables/useDatePicker.spec.js +232 -0
  31. package/dist/composables/useDropdown.d.ts +1 -1
  32. package/dist/composables/useDropdown.js +16 -16
  33. package/dist/index.cdn.d.ts +4 -1
  34. package/dist/styles.css +1 -1
  35. package/package.json +13 -1
  36. /package/dist/components/Form/{CLInput → CLInputDatePicker}/CLInput.css +0 -0
@@ -0,0 +1,1057 @@
1
+ import { computed as F, ref as U, shallowRef as Xt, watch as ft, getCurrentScope as jt, onScopeDispose as Yt, shallowReadonly as X, unref as qt } from "vue";
2
+ const Z = Math.min, _ = Math.max, tt = Math.round, Q = Math.floor, L = (t) => ({
3
+ x: t,
4
+ y: t
5
+ }), Ut = {
6
+ left: "right",
7
+ right: "left",
8
+ bottom: "top",
9
+ top: "bottom"
10
+ }, Kt = {
11
+ start: "end",
12
+ end: "start"
13
+ };
14
+ function bt(t, e, n) {
15
+ return _(t, Z(e, n));
16
+ }
17
+ function ot(t, e) {
18
+ return typeof t == "function" ? t(e) : t;
19
+ }
20
+ function $(t) {
21
+ return t.split("-")[0];
22
+ }
23
+ function it(t) {
24
+ return t.split("-")[1];
25
+ }
26
+ function Pt(t) {
27
+ return t === "x" ? "y" : "x";
28
+ }
29
+ function Ft(t) {
30
+ return t === "y" ? "height" : "width";
31
+ }
32
+ const Gt = /* @__PURE__ */ new Set(["top", "bottom"]);
33
+ function V(t) {
34
+ return Gt.has($(t)) ? "y" : "x";
35
+ }
36
+ function Vt(t) {
37
+ return Pt(V(t));
38
+ }
39
+ function Jt(t, e, n) {
40
+ n === void 0 && (n = !1);
41
+ const o = it(t), i = Vt(t), s = Ft(i);
42
+ let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
43
+ return e.reference[s] > e.floating[s] && (r = et(r)), [r, et(r)];
44
+ }
45
+ function Qt(t) {
46
+ const e = et(t);
47
+ return [dt(t), e, dt(e)];
48
+ }
49
+ function dt(t) {
50
+ return t.replace(/start|end/g, (e) => Kt[e]);
51
+ }
52
+ const Rt = ["left", "right"], At = ["right", "left"], Zt = ["top", "bottom"], te = ["bottom", "top"];
53
+ function ee(t, e, n) {
54
+ switch (t) {
55
+ case "top":
56
+ case "bottom":
57
+ return n ? e ? At : Rt : e ? Rt : At;
58
+ case "left":
59
+ case "right":
60
+ return e ? Zt : te;
61
+ default:
62
+ return [];
63
+ }
64
+ }
65
+ function ne(t, e, n, o) {
66
+ const i = it(t);
67
+ let s = ee($(t), n === "start", o);
68
+ return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(dt)))), s;
69
+ }
70
+ function et(t) {
71
+ return t.replace(/left|right|bottom|top/g, (e) => Ut[e]);
72
+ }
73
+ function oe(t) {
74
+ return {
75
+ top: 0,
76
+ right: 0,
77
+ bottom: 0,
78
+ left: 0,
79
+ ...t
80
+ };
81
+ }
82
+ function ie(t) {
83
+ return typeof t != "number" ? oe(t) : {
84
+ top: t,
85
+ right: t,
86
+ bottom: t,
87
+ left: t
88
+ };
89
+ }
90
+ function nt(t) {
91
+ const {
92
+ x: e,
93
+ y: n,
94
+ width: o,
95
+ height: i
96
+ } = t;
97
+ return {
98
+ width: o,
99
+ height: i,
100
+ top: n,
101
+ left: e,
102
+ right: e + o,
103
+ bottom: n + i,
104
+ x: e,
105
+ y: n
106
+ };
107
+ }
108
+ function Ot(t, e, n) {
109
+ let {
110
+ reference: o,
111
+ floating: i
112
+ } = t;
113
+ const s = V(e), r = Vt(e), l = Ft(r), a = $(e), c = s === "y", f = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, m = o[l] / 2 - i[l] / 2;
114
+ let d;
115
+ switch (a) {
116
+ case "top":
117
+ d = {
118
+ x: f,
119
+ y: o.y - i.height
120
+ };
121
+ break;
122
+ case "bottom":
123
+ d = {
124
+ x: f,
125
+ y: o.y + o.height
126
+ };
127
+ break;
128
+ case "right":
129
+ d = {
130
+ x: o.x + o.width,
131
+ y: u
132
+ };
133
+ break;
134
+ case "left":
135
+ d = {
136
+ x: o.x - i.width,
137
+ y: u
138
+ };
139
+ break;
140
+ default:
141
+ d = {
142
+ x: o.x,
143
+ y: o.y
144
+ };
145
+ }
146
+ switch (it(e)) {
147
+ case "start":
148
+ d[r] -= m * (n && c ? -1 : 1);
149
+ break;
150
+ case "end":
151
+ d[r] += m * (n && c ? -1 : 1);
152
+ break;
153
+ }
154
+ return d;
155
+ }
156
+ const re = async (t, e, n) => {
157
+ const {
158
+ placement: o = "bottom",
159
+ strategy: i = "absolute",
160
+ middleware: s = [],
161
+ platform: r
162
+ } = n, l = s.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(e));
163
+ let c = await r.getElementRects({
164
+ reference: t,
165
+ floating: e,
166
+ strategy: i
167
+ }), {
168
+ x: f,
169
+ y: u
170
+ } = Ot(c, o, a), m = o, d = {}, h = 0;
171
+ for (let g = 0; g < l.length; g++) {
172
+ const {
173
+ name: w,
174
+ fn: p
175
+ } = l[g], {
176
+ x: y,
177
+ y: x,
178
+ data: R,
179
+ reset: b
180
+ } = await p({
181
+ x: f,
182
+ y: u,
183
+ initialPlacement: o,
184
+ placement: m,
185
+ strategy: i,
186
+ middlewareData: d,
187
+ rects: c,
188
+ platform: r,
189
+ elements: {
190
+ reference: t,
191
+ floating: e
192
+ }
193
+ });
194
+ f = y ?? f, u = x ?? u, d = {
195
+ ...d,
196
+ [w]: {
197
+ ...d[w],
198
+ ...R
199
+ }
200
+ }, b && h <= 50 && (h++, typeof b == "object" && (b.placement && (m = b.placement), b.rects && (c = b.rects === !0 ? await r.getElementRects({
201
+ reference: t,
202
+ floating: e,
203
+ strategy: i
204
+ }) : b.rects), {
205
+ x: f,
206
+ y: u
207
+ } = Ot(c, m, a)), g = -1);
208
+ }
209
+ return {
210
+ x: f,
211
+ y: u,
212
+ placement: m,
213
+ strategy: i,
214
+ middlewareData: d
215
+ };
216
+ };
217
+ async function Mt(t, e) {
218
+ var n;
219
+ e === void 0 && (e = {});
220
+ const {
221
+ x: o,
222
+ y: i,
223
+ platform: s,
224
+ rects: r,
225
+ elements: l,
226
+ strategy: a
227
+ } = t, {
228
+ boundary: c = "clippingAncestors",
229
+ rootBoundary: f = "viewport",
230
+ elementContext: u = "floating",
231
+ altBoundary: m = !1,
232
+ padding: d = 0
233
+ } = ot(e, t), h = ie(d), w = l[m ? u === "floating" ? "reference" : "floating" : u], p = nt(await s.getClippingRect({
234
+ element: (n = await (s.isElement == null ? void 0 : s.isElement(w))) == null || n ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
235
+ boundary: c,
236
+ rootBoundary: f,
237
+ strategy: a
238
+ })), y = u === "floating" ? {
239
+ x: o,
240
+ y: i,
241
+ width: r.floating.width,
242
+ height: r.floating.height
243
+ } : r.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), R = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
244
+ x: 1,
245
+ y: 1
246
+ } : {
247
+ x: 1,
248
+ y: 1
249
+ }, b = nt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
250
+ elements: l,
251
+ rect: y,
252
+ offsetParent: x,
253
+ strategy: a
254
+ }) : y);
255
+ return {
256
+ top: (p.top - b.top + h.top) / R.y,
257
+ bottom: (b.bottom - p.bottom + h.bottom) / R.y,
258
+ left: (p.left - b.left + h.left) / R.x,
259
+ right: (b.right - p.right + h.right) / R.x
260
+ };
261
+ }
262
+ const se = function(t) {
263
+ return t === void 0 && (t = {}), {
264
+ name: "flip",
265
+ options: t,
266
+ async fn(e) {
267
+ var n, o;
268
+ const {
269
+ placement: i,
270
+ middlewareData: s,
271
+ rects: r,
272
+ initialPlacement: l,
273
+ platform: a,
274
+ elements: c
275
+ } = e, {
276
+ mainAxis: f = !0,
277
+ crossAxis: u = !0,
278
+ fallbackPlacements: m,
279
+ fallbackStrategy: d = "bestFit",
280
+ fallbackAxisSideDirection: h = "none",
281
+ flipAlignment: g = !0,
282
+ ...w
283
+ } = ot(t, e);
284
+ if ((n = s.arrow) != null && n.alignmentOffset)
285
+ return {};
286
+ const p = $(i), y = V(l), x = $(l) === l, R = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), b = m || (x || !g ? [et(l)] : Qt(l)), k = h !== "none";
287
+ !m && k && b.push(...ne(l, g, h, R));
288
+ const v = [l, ...b], O = await Mt(e, w), B = [];
289
+ let z = ((o = s.flip) == null ? void 0 : o.overflows) || [];
290
+ if (f && B.push(O[p]), u) {
291
+ const N = Jt(i, r, R);
292
+ B.push(O[N[0]], O[N[1]]);
293
+ }
294
+ if (z = [...z, {
295
+ placement: i,
296
+ overflows: B
297
+ }], !B.every((N) => N <= 0)) {
298
+ var yt, xt;
299
+ const N = (((yt = s.flip) == null ? void 0 : yt.index) || 0) + 1, at = v[N];
300
+ if (at && (!(u === "alignment" ? y !== V(at) : !1) || // We leave the current main axis only if every placement on that axis
301
+ // overflows the main axis.
302
+ z.every((C) => V(C.placement) === y ? C.overflows[0] > 0 : !0)))
303
+ return {
304
+ data: {
305
+ index: N,
306
+ overflows: z
307
+ },
308
+ reset: {
309
+ placement: at
310
+ }
311
+ };
312
+ let q = (xt = z.filter((W) => W.overflows[0] <= 0).sort((W, C) => W.overflows[1] - C.overflows[1])[0]) == null ? void 0 : xt.placement;
313
+ if (!q)
314
+ switch (d) {
315
+ case "bestFit": {
316
+ var vt;
317
+ const W = (vt = z.filter((C) => {
318
+ if (k) {
319
+ const P = V(C.placement);
320
+ return P === y || // Create a bias to the `y` side axis due to horizontal
321
+ // reading directions favoring greater width.
322
+ P === "y";
323
+ }
324
+ return !0;
325
+ }).map((C) => [C.placement, C.overflows.filter((P) => P > 0).reduce((P, zt) => P + zt, 0)]).sort((C, P) => C[1] - P[1])[0]) == null ? void 0 : vt[0];
326
+ W && (q = W);
327
+ break;
328
+ }
329
+ case "initialPlacement":
330
+ q = l;
331
+ break;
332
+ }
333
+ if (i !== q)
334
+ return {
335
+ reset: {
336
+ placement: q
337
+ }
338
+ };
339
+ }
340
+ return {};
341
+ }
342
+ };
343
+ }, le = /* @__PURE__ */ new Set(["left", "top"]);
344
+ async function ce(t, e) {
345
+ const {
346
+ placement: n,
347
+ platform: o,
348
+ elements: i
349
+ } = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = $(n), l = it(n), a = V(n) === "y", c = le.has(r) ? -1 : 1, f = s && a ? -1 : 1, u = ot(e, t);
350
+ let {
351
+ mainAxis: m,
352
+ crossAxis: d,
353
+ alignmentAxis: h
354
+ } = typeof u == "number" ? {
355
+ mainAxis: u,
356
+ crossAxis: 0,
357
+ alignmentAxis: null
358
+ } : {
359
+ mainAxis: u.mainAxis || 0,
360
+ crossAxis: u.crossAxis || 0,
361
+ alignmentAxis: u.alignmentAxis
362
+ };
363
+ return l && typeof h == "number" && (d = l === "end" ? h * -1 : h), a ? {
364
+ x: d * f,
365
+ y: m * c
366
+ } : {
367
+ x: m * c,
368
+ y: d * f
369
+ };
370
+ }
371
+ const ae = function(t) {
372
+ return t === void 0 && (t = 0), {
373
+ name: "offset",
374
+ options: t,
375
+ async fn(e) {
376
+ var n, o;
377
+ const {
378
+ x: i,
379
+ y: s,
380
+ placement: r,
381
+ middlewareData: l
382
+ } = e, a = await ce(e, t);
383
+ return r === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
384
+ x: i + a.x,
385
+ y: s + a.y,
386
+ data: {
387
+ ...a,
388
+ placement: r
389
+ }
390
+ };
391
+ }
392
+ };
393
+ }, fe = function(t) {
394
+ return t === void 0 && (t = {}), {
395
+ name: "shift",
396
+ options: t,
397
+ async fn(e) {
398
+ const {
399
+ x: n,
400
+ y: o,
401
+ placement: i
402
+ } = e, {
403
+ mainAxis: s = !0,
404
+ crossAxis: r = !1,
405
+ limiter: l = {
406
+ fn: (w) => {
407
+ let {
408
+ x: p,
409
+ y
410
+ } = w;
411
+ return {
412
+ x: p,
413
+ y
414
+ };
415
+ }
416
+ },
417
+ ...a
418
+ } = ot(t, e), c = {
419
+ x: n,
420
+ y: o
421
+ }, f = await Mt(e, a), u = V($(i)), m = Pt(u);
422
+ let d = c[m], h = c[u];
423
+ if (s) {
424
+ const w = m === "y" ? "top" : "left", p = m === "y" ? "bottom" : "right", y = d + f[w], x = d - f[p];
425
+ d = bt(y, d, x);
426
+ }
427
+ if (r) {
428
+ const w = u === "y" ? "top" : "left", p = u === "y" ? "bottom" : "right", y = h + f[w], x = h - f[p];
429
+ h = bt(y, h, x);
430
+ }
431
+ const g = l.fn({
432
+ ...e,
433
+ [m]: d,
434
+ [u]: h
435
+ });
436
+ return {
437
+ ...g,
438
+ data: {
439
+ x: g.x - n,
440
+ y: g.y - o,
441
+ enabled: {
442
+ [m]: s,
443
+ [u]: r
444
+ }
445
+ }
446
+ };
447
+ }
448
+ };
449
+ };
450
+ function rt() {
451
+ return typeof window < "u";
452
+ }
453
+ function I(t) {
454
+ return ht(t) ? (t.nodeName || "").toLowerCase() : "#document";
455
+ }
456
+ function A(t) {
457
+ var e;
458
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
459
+ }
460
+ function D(t) {
461
+ var e;
462
+ return (e = (ht(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
463
+ }
464
+ function ht(t) {
465
+ return rt() ? t instanceof Node || t instanceof A(t).Node : !1;
466
+ }
467
+ function S(t) {
468
+ return rt() ? t instanceof Element || t instanceof A(t).Element : !1;
469
+ }
470
+ function T(t) {
471
+ return rt() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
472
+ }
473
+ function Ct(t) {
474
+ return !rt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
475
+ }
476
+ const ue = /* @__PURE__ */ new Set(["inline", "contents"]);
477
+ function J(t) {
478
+ const {
479
+ overflow: e,
480
+ overflowX: n,
481
+ overflowY: o,
482
+ display: i
483
+ } = E(t);
484
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !ue.has(i);
485
+ }
486
+ const de = /* @__PURE__ */ new Set(["table", "td", "th"]);
487
+ function me(t) {
488
+ return de.has(I(t));
489
+ }
490
+ const he = [":popover-open", ":modal"];
491
+ function st(t) {
492
+ return he.some((e) => {
493
+ try {
494
+ return t.matches(e);
495
+ } catch {
496
+ return !1;
497
+ }
498
+ });
499
+ }
500
+ const pe = ["transform", "translate", "scale", "rotate", "perspective"], ge = ["transform", "translate", "scale", "rotate", "perspective", "filter"], we = ["paint", "layout", "strict", "content"];
501
+ function pt(t) {
502
+ const e = gt(), n = S(t) ? E(t) : t;
503
+ return pe.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) || ge.some((o) => (n.willChange || "").includes(o)) || we.some((o) => (n.contain || "").includes(o));
504
+ }
505
+ function ye(t) {
506
+ let e = M(t);
507
+ for (; T(e) && !Y(e); ) {
508
+ if (pt(e))
509
+ return e;
510
+ if (st(e))
511
+ return null;
512
+ e = M(e);
513
+ }
514
+ return null;
515
+ }
516
+ function gt() {
517
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
518
+ }
519
+ const xe = /* @__PURE__ */ new Set(["html", "body", "#document"]);
520
+ function Y(t) {
521
+ return xe.has(I(t));
522
+ }
523
+ function E(t) {
524
+ return A(t).getComputedStyle(t);
525
+ }
526
+ function lt(t) {
527
+ return S(t) ? {
528
+ scrollLeft: t.scrollLeft,
529
+ scrollTop: t.scrollTop
530
+ } : {
531
+ scrollLeft: t.scrollX,
532
+ scrollTop: t.scrollY
533
+ };
534
+ }
535
+ function M(t) {
536
+ if (I(t) === "html")
537
+ return t;
538
+ const e = (
539
+ // Step into the shadow DOM of the parent of a slotted node.
540
+ t.assignedSlot || // DOM Element detected.
541
+ t.parentNode || // ShadowRoot detected.
542
+ Ct(t) && t.host || // Fallback.
543
+ D(t)
544
+ );
545
+ return Ct(e) ? e.host : e;
546
+ }
547
+ function kt(t) {
548
+ const e = M(t);
549
+ return Y(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : T(e) && J(e) ? e : kt(e);
550
+ }
551
+ function G(t, e, n) {
552
+ var o;
553
+ e === void 0 && (e = []), n === void 0 && (n = !0);
554
+ const i = kt(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = A(i);
555
+ if (s) {
556
+ const l = mt(r);
557
+ return e.concat(r, r.visualViewport || [], J(i) ? i : [], l && n ? G(l) : []);
558
+ }
559
+ return e.concat(i, G(i, [], n));
560
+ }
561
+ function mt(t) {
562
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
563
+ }
564
+ function Bt(t) {
565
+ const e = E(t);
566
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
567
+ const i = T(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, l = tt(n) !== s || tt(o) !== r;
568
+ return l && (n = s, o = r), {
569
+ width: n,
570
+ height: o,
571
+ $: l
572
+ };
573
+ }
574
+ function wt(t) {
575
+ return S(t) ? t : t.contextElement;
576
+ }
577
+ function j(t) {
578
+ const e = wt(t);
579
+ if (!T(e))
580
+ return L(1);
581
+ const n = e.getBoundingClientRect(), {
582
+ width: o,
583
+ height: i,
584
+ $: s
585
+ } = Bt(e);
586
+ let r = (s ? tt(n.width) : n.width) / o, l = (s ? tt(n.height) : n.height) / i;
587
+ return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
588
+ x: r,
589
+ y: l
590
+ };
591
+ }
592
+ const ve = /* @__PURE__ */ L(0);
593
+ function Nt(t) {
594
+ const e = A(t);
595
+ return !gt() || !e.visualViewport ? ve : {
596
+ x: e.visualViewport.offsetLeft,
597
+ y: e.visualViewport.offsetTop
598
+ };
599
+ }
600
+ function be(t, e, n) {
601
+ return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
602
+ }
603
+ function H(t, e, n, o) {
604
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
605
+ const i = t.getBoundingClientRect(), s = wt(t);
606
+ let r = L(1);
607
+ e && (o ? S(o) && (r = j(o)) : r = j(t));
608
+ const l = be(s, n, o) ? Nt(s) : L(0);
609
+ let a = (i.left + l.x) / r.x, c = (i.top + l.y) / r.y, f = i.width / r.x, u = i.height / r.y;
610
+ if (s) {
611
+ const m = A(s), d = o && S(o) ? A(o) : o;
612
+ let h = m, g = mt(h);
613
+ for (; g && o && d !== h; ) {
614
+ const w = j(g), p = g.getBoundingClientRect(), y = E(g), x = p.left + (g.clientLeft + parseFloat(y.paddingLeft)) * w.x, R = p.top + (g.clientTop + parseFloat(y.paddingTop)) * w.y;
615
+ a *= w.x, c *= w.y, f *= w.x, u *= w.y, a += x, c += R, h = A(g), g = mt(h);
616
+ }
617
+ }
618
+ return nt({
619
+ width: f,
620
+ height: u,
621
+ x: a,
622
+ y: c
623
+ });
624
+ }
625
+ function ct(t, e) {
626
+ const n = lt(t).scrollLeft;
627
+ return e ? e.left + n : H(D(t)).left + n;
628
+ }
629
+ function Wt(t, e) {
630
+ const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - ct(t, n), i = n.top + e.scrollTop;
631
+ return {
632
+ x: o,
633
+ y: i
634
+ };
635
+ }
636
+ function Re(t) {
637
+ let {
638
+ elements: e,
639
+ rect: n,
640
+ offsetParent: o,
641
+ strategy: i
642
+ } = t;
643
+ const s = i === "fixed", r = D(o), l = e ? st(e.floating) : !1;
644
+ if (o === r || l && s)
645
+ return n;
646
+ let a = {
647
+ scrollLeft: 0,
648
+ scrollTop: 0
649
+ }, c = L(1);
650
+ const f = L(0), u = T(o);
651
+ if ((u || !u && !s) && ((I(o) !== "body" || J(r)) && (a = lt(o)), T(o))) {
652
+ const d = H(o);
653
+ c = j(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
654
+ }
655
+ const m = r && !u && !s ? Wt(r, a) : L(0);
656
+ return {
657
+ width: n.width * c.x,
658
+ height: n.height * c.y,
659
+ x: n.x * c.x - a.scrollLeft * c.x + f.x + m.x,
660
+ y: n.y * c.y - a.scrollTop * c.y + f.y + m.y
661
+ };
662
+ }
663
+ function Ae(t) {
664
+ return Array.from(t.getClientRects());
665
+ }
666
+ function Oe(t) {
667
+ const e = D(t), n = lt(t), o = t.ownerDocument.body, i = _(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = _(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
668
+ let r = -n.scrollLeft + ct(t);
669
+ const l = -n.scrollTop;
670
+ return E(o).direction === "rtl" && (r += _(e.clientWidth, o.clientWidth) - i), {
671
+ width: i,
672
+ height: s,
673
+ x: r,
674
+ y: l
675
+ };
676
+ }
677
+ const St = 25;
678
+ function Ce(t, e) {
679
+ const n = A(t), o = D(t), i = n.visualViewport;
680
+ let s = o.clientWidth, r = o.clientHeight, l = 0, a = 0;
681
+ if (i) {
682
+ s = i.width, r = i.height;
683
+ const f = gt();
684
+ (!f || f && e === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
685
+ }
686
+ const c = ct(o);
687
+ if (c <= 0) {
688
+ const f = o.ownerDocument, u = f.body, m = getComputedStyle(u), d = f.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - u.clientWidth - d);
689
+ h <= St && (s -= h);
690
+ } else c <= St && (s += c);
691
+ return {
692
+ width: s,
693
+ height: r,
694
+ x: l,
695
+ y: a
696
+ };
697
+ }
698
+ const Se = /* @__PURE__ */ new Set(["absolute", "fixed"]);
699
+ function Ee(t, e) {
700
+ const n = H(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = T(t) ? j(t) : L(1), r = t.clientWidth * s.x, l = t.clientHeight * s.y, a = i * s.x, c = o * s.y;
701
+ return {
702
+ width: r,
703
+ height: l,
704
+ x: a,
705
+ y: c
706
+ };
707
+ }
708
+ function Et(t, e, n) {
709
+ let o;
710
+ if (e === "viewport")
711
+ o = Ce(t, n);
712
+ else if (e === "document")
713
+ o = Oe(D(t));
714
+ else if (S(e))
715
+ o = Ee(e, n);
716
+ else {
717
+ const i = Nt(t);
718
+ o = {
719
+ x: e.x - i.x,
720
+ y: e.y - i.y,
721
+ width: e.width,
722
+ height: e.height
723
+ };
724
+ }
725
+ return nt(o);
726
+ }
727
+ function _t(t, e) {
728
+ const n = M(t);
729
+ return n === e || !S(n) || Y(n) ? !1 : E(n).position === "fixed" || _t(n, e);
730
+ }
731
+ function Le(t, e) {
732
+ const n = e.get(t);
733
+ if (n)
734
+ return n;
735
+ let o = G(t, [], !1).filter((l) => S(l) && I(l) !== "body"), i = null;
736
+ const s = E(t).position === "fixed";
737
+ let r = s ? M(t) : t;
738
+ for (; S(r) && !Y(r); ) {
739
+ const l = E(r), a = pt(r);
740
+ !a && l.position === "fixed" && (i = null), (s ? !a && !i : !a && l.position === "static" && !!i && Se.has(i.position) || J(r) && !a && _t(t, r)) ? o = o.filter((f) => f !== r) : i = l, r = M(r);
741
+ }
742
+ return e.set(t, o), o;
743
+ }
744
+ function Te(t) {
745
+ let {
746
+ element: e,
747
+ boundary: n,
748
+ rootBoundary: o,
749
+ strategy: i
750
+ } = t;
751
+ const r = [...n === "clippingAncestors" ? st(e) ? [] : Le(e, this._c) : [].concat(n), o], l = r[0], a = r.reduce((c, f) => {
752
+ const u = Et(e, f, i);
753
+ return c.top = _(u.top, c.top), c.right = Z(u.right, c.right), c.bottom = Z(u.bottom, c.bottom), c.left = _(u.left, c.left), c;
754
+ }, Et(e, l, i));
755
+ return {
756
+ width: a.right - a.left,
757
+ height: a.bottom - a.top,
758
+ x: a.left,
759
+ y: a.top
760
+ };
761
+ }
762
+ function De(t) {
763
+ const {
764
+ width: e,
765
+ height: n
766
+ } = Bt(t);
767
+ return {
768
+ width: e,
769
+ height: n
770
+ };
771
+ }
772
+ function Pe(t, e, n) {
773
+ const o = T(e), i = D(e), s = n === "fixed", r = H(t, !0, s, e);
774
+ let l = {
775
+ scrollLeft: 0,
776
+ scrollTop: 0
777
+ };
778
+ const a = L(0);
779
+ function c() {
780
+ a.x = ct(i);
781
+ }
782
+ if (o || !o && !s)
783
+ if ((I(e) !== "body" || J(i)) && (l = lt(e)), o) {
784
+ const d = H(e, !0, s, e);
785
+ a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
786
+ } else i && c();
787
+ s && !o && i && c();
788
+ const f = i && !o && !s ? Wt(i, l) : L(0), u = r.left + l.scrollLeft - a.x - f.x, m = r.top + l.scrollTop - a.y - f.y;
789
+ return {
790
+ x: u,
791
+ y: m,
792
+ width: r.width,
793
+ height: r.height
794
+ };
795
+ }
796
+ function ut(t) {
797
+ return E(t).position === "static";
798
+ }
799
+ function Lt(t, e) {
800
+ if (!T(t) || E(t).position === "fixed")
801
+ return null;
802
+ if (e)
803
+ return e(t);
804
+ let n = t.offsetParent;
805
+ return D(t) === n && (n = n.ownerDocument.body), n;
806
+ }
807
+ function $t(t, e) {
808
+ const n = A(t);
809
+ if (st(t))
810
+ return n;
811
+ if (!T(t)) {
812
+ let i = M(t);
813
+ for (; i && !Y(i); ) {
814
+ if (S(i) && !ut(i))
815
+ return i;
816
+ i = M(i);
817
+ }
818
+ return n;
819
+ }
820
+ let o = Lt(t, e);
821
+ for (; o && me(o) && ut(o); )
822
+ o = Lt(o, e);
823
+ return o && Y(o) && ut(o) && !pt(o) ? n : o || ye(t) || n;
824
+ }
825
+ const Fe = async function(t) {
826
+ const e = this.getOffsetParent || $t, n = this.getDimensions, o = await n(t.floating);
827
+ return {
828
+ reference: Pe(t.reference, await e(t.floating), t.strategy),
829
+ floating: {
830
+ x: 0,
831
+ y: 0,
832
+ width: o.width,
833
+ height: o.height
834
+ }
835
+ };
836
+ };
837
+ function Ve(t) {
838
+ return E(t).direction === "rtl";
839
+ }
840
+ const Me = {
841
+ convertOffsetParentRelativeRectToViewportRelativeRect: Re,
842
+ getDocumentElement: D,
843
+ getClippingRect: Te,
844
+ getOffsetParent: $t,
845
+ getElementRects: Fe,
846
+ getClientRects: Ae,
847
+ getDimensions: De,
848
+ getScale: j,
849
+ isElement: S,
850
+ isRTL: Ve
851
+ };
852
+ function Ht(t, e) {
853
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
854
+ }
855
+ function ke(t, e) {
856
+ let n = null, o;
857
+ const i = D(t);
858
+ function s() {
859
+ var l;
860
+ clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
861
+ }
862
+ function r(l, a) {
863
+ l === void 0 && (l = !1), a === void 0 && (a = 1), s();
864
+ const c = t.getBoundingClientRect(), {
865
+ left: f,
866
+ top: u,
867
+ width: m,
868
+ height: d
869
+ } = c;
870
+ if (l || e(), !m || !d)
871
+ return;
872
+ const h = Q(u), g = Q(i.clientWidth - (f + m)), w = Q(i.clientHeight - (u + d)), p = Q(f), x = {
873
+ rootMargin: -h + "px " + -g + "px " + -w + "px " + -p + "px",
874
+ threshold: _(0, Z(1, a)) || 1
875
+ };
876
+ let R = !0;
877
+ function b(k) {
878
+ const v = k[0].intersectionRatio;
879
+ if (v !== a) {
880
+ if (!R)
881
+ return r();
882
+ v ? r(!1, v) : o = setTimeout(() => {
883
+ r(!1, 1e-7);
884
+ }, 1e3);
885
+ }
886
+ v === 1 && !Ht(c, t.getBoundingClientRect()) && r(), R = !1;
887
+ }
888
+ try {
889
+ n = new IntersectionObserver(b, {
890
+ ...x,
891
+ // Handle <iframe>s
892
+ root: i.ownerDocument
893
+ });
894
+ } catch {
895
+ n = new IntersectionObserver(b, x);
896
+ }
897
+ n.observe(t);
898
+ }
899
+ return r(!0), s;
900
+ }
901
+ function _e(t, e, n, o) {
902
+ o === void 0 && (o = {});
903
+ const {
904
+ ancestorScroll: i = !0,
905
+ ancestorResize: s = !0,
906
+ elementResize: r = typeof ResizeObserver == "function",
907
+ layoutShift: l = typeof IntersectionObserver == "function",
908
+ animationFrame: a = !1
909
+ } = o, c = wt(t), f = i || s ? [...c ? G(c) : [], ...G(e)] : [];
910
+ f.forEach((p) => {
911
+ i && p.addEventListener("scroll", n, {
912
+ passive: !0
913
+ }), s && p.addEventListener("resize", n);
914
+ });
915
+ const u = c && l ? ke(c, n) : null;
916
+ let m = -1, d = null;
917
+ r && (d = new ResizeObserver((p) => {
918
+ let [y] = p;
919
+ y && y.target === c && d && (d.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
920
+ var x;
921
+ (x = d) == null || x.observe(e);
922
+ })), n();
923
+ }), c && !a && d.observe(c), d.observe(e));
924
+ let h, g = a ? H(t) : null;
925
+ a && w();
926
+ function w() {
927
+ const p = H(t);
928
+ g && !Ht(g, p) && n(), g = p, h = requestAnimationFrame(w);
929
+ }
930
+ return n(), () => {
931
+ var p;
932
+ f.forEach((y) => {
933
+ i && y.removeEventListener("scroll", n), s && y.removeEventListener("resize", n);
934
+ }), u?.(), (p = d) == null || p.disconnect(), d = null, a && cancelAnimationFrame(h);
935
+ };
936
+ }
937
+ const $e = ae, He = fe, Ie = se, Be = (t, e, n) => {
938
+ const o = /* @__PURE__ */ new Map(), i = {
939
+ platform: Me,
940
+ ...n
941
+ }, s = {
942
+ ...i.platform,
943
+ _c: o
944
+ };
945
+ return re(t, e, {
946
+ ...i,
947
+ platform: s
948
+ });
949
+ };
950
+ function Ne(t) {
951
+ return t != null && typeof t == "object" && "$el" in t;
952
+ }
953
+ function Tt(t) {
954
+ if (Ne(t)) {
955
+ const e = t.$el;
956
+ return ht(e) && I(e) === "#comment" ? null : e;
957
+ }
958
+ return t;
959
+ }
960
+ function K(t) {
961
+ return typeof t == "function" ? t() : qt(t);
962
+ }
963
+ function It(t) {
964
+ return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
965
+ }
966
+ function Dt(t, e) {
967
+ const n = It(t);
968
+ return Math.round(e * n) / n;
969
+ }
970
+ function ze(t, e, n) {
971
+ n === void 0 && (n = {});
972
+ const o = n.whileElementsMounted, i = F(() => {
973
+ var v;
974
+ return (v = K(n.open)) != null ? v : !0;
975
+ }), s = F(() => K(n.middleware)), r = F(() => {
976
+ var v;
977
+ return (v = K(n.placement)) != null ? v : "bottom";
978
+ }), l = F(() => {
979
+ var v;
980
+ return (v = K(n.strategy)) != null ? v : "absolute";
981
+ }), a = F(() => {
982
+ var v;
983
+ return (v = K(n.transform)) != null ? v : !0;
984
+ }), c = F(() => Tt(t.value)), f = F(() => Tt(e.value)), u = U(0), m = U(0), d = U(l.value), h = U(r.value), g = Xt({}), w = U(!1), p = F(() => {
985
+ const v = {
986
+ position: d.value,
987
+ left: "0",
988
+ top: "0"
989
+ };
990
+ if (!f.value)
991
+ return v;
992
+ const O = Dt(f.value, u.value), B = Dt(f.value, m.value);
993
+ return a.value ? {
994
+ ...v,
995
+ transform: "translate(" + O + "px, " + B + "px)",
996
+ ...It(f.value) >= 1.5 && {
997
+ willChange: "transform"
998
+ }
999
+ } : {
1000
+ position: d.value,
1001
+ left: O + "px",
1002
+ top: B + "px"
1003
+ };
1004
+ });
1005
+ let y;
1006
+ function x() {
1007
+ if (c.value == null || f.value == null)
1008
+ return;
1009
+ const v = i.value;
1010
+ Be(c.value, f.value, {
1011
+ middleware: s.value,
1012
+ placement: r.value,
1013
+ strategy: l.value
1014
+ }).then((O) => {
1015
+ u.value = O.x, m.value = O.y, d.value = O.strategy, h.value = O.placement, g.value = O.middlewareData, w.value = v !== !1;
1016
+ });
1017
+ }
1018
+ function R() {
1019
+ typeof y == "function" && (y(), y = void 0);
1020
+ }
1021
+ function b() {
1022
+ if (R(), o === void 0) {
1023
+ x();
1024
+ return;
1025
+ }
1026
+ if (c.value != null && f.value != null) {
1027
+ y = o(c.value, f.value, x);
1028
+ return;
1029
+ }
1030
+ }
1031
+ function k() {
1032
+ i.value || (w.value = !1);
1033
+ }
1034
+ return ft([s, r, l, i], x, {
1035
+ flush: "sync"
1036
+ }), ft([c, f], b, {
1037
+ flush: "sync"
1038
+ }), ft(i, k, {
1039
+ flush: "sync"
1040
+ }), jt() && Yt(R), {
1041
+ x: X(u),
1042
+ y: X(m),
1043
+ strategy: X(d),
1044
+ placement: X(h),
1045
+ middlewareData: X(g),
1046
+ isPositioned: X(w),
1047
+ floatingStyles: p,
1048
+ update: x
1049
+ };
1050
+ }
1051
+ export {
1052
+ _e as a,
1053
+ Ie as f,
1054
+ $e as o,
1055
+ He as s,
1056
+ ze as u
1057
+ };