@codeandfunction/callaloo 4.7.6 → 4.8.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.
@@ -1,13 +1,13 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLDropdownMenu.css';
3
- import { computed as V, ref as E, shallowRef as Qt, watch as ut, getCurrentScope as te, onScopeDispose as ee, shallowReadonly as _, unref as A, defineComponent as ne, onBeforeUnmount as oe, createElementBlock as St, openBlock as At, normalizeClass as dt, createVNode as Ot, createCommentVNode as ie, withCtx as Et, createTextVNode as re, toDisplayString as le, normalizeStyle as se, renderSlot as ce } from "vue";
3
+ import { computed as F, ref as D, shallowRef as _t, watch as dt, getCurrentScope as te, onScopeDispose as ee, shallowReadonly as q, unref as L, defineComponent as ne, onBeforeUnmount as oe, createElementBlock as St, openBlock as Ot, normalizeClass as mt, createVNode as At, createCommentVNode as ie, withCtx as Et, createTextVNode as re, toDisplayString as se, normalizeStyle as le, renderSlot as ce } from "vue";
4
4
  import { _ as ae } from "../../../chunks/CLButton.vue_vue_type_style_index_0_lang-MvhnNzVW.js";
5
5
  import { _ as fe } from "../../../chunks/CLCard.vue_vue_type_style_index_0_lang-Sre7UYZd.js";
6
- import { c as ue, i as mt } from "../../../chunks/helper-qUkciePY.js";
6
+ import { c as ue, i as ht } from "../../../chunks/helper-qUkciePY.js";
7
7
  import { useDropdown as de } from "../../../composables/useDropdown.js";
8
8
  import { useEsc as me } from "../../../composables/useEsc.js";
9
9
  import { CLPlacement as he, CLIconSizes as ge, CLIconNames as pe, CLColorVariants as Lt, CLSizes as we, CLColors as Dt } from "../../../index.js";
10
- const tt = Math.min, W = Math.max, et = Math.round, Q = Math.floor, B = (t) => ({
10
+ const tt = Math.min, N = Math.max, et = Math.round, _ = Math.floor, P = (t) => ({
11
11
  x: t,
12
12
  y: t
13
13
  }), ye = {
@@ -20,12 +20,12 @@ const tt = Math.min, W = Math.max, et = Math.round, Q = Math.floor, B = (t) => (
20
20
  end: "start"
21
21
  };
22
22
  function Tt(t, e, n) {
23
- return W(t, tt(e, n));
23
+ return N(t, tt(e, n));
24
24
  }
25
25
  function it(t, e) {
26
26
  return typeof t == "function" ? t(e) : t;
27
27
  }
28
- function N(t) {
28
+ function X(t) {
29
29
  return t.split("-")[0];
30
30
  }
31
31
  function rt(t) {
@@ -38,27 +38,27 @@ function Wt(t) {
38
38
  return t === "y" ? "height" : "width";
39
39
  }
40
40
  const xe = /* @__PURE__ */ new Set(["top", "bottom"]);
41
- function F(t) {
42
- return xe.has(N(t)) ? "y" : "x";
41
+ function z(t) {
42
+ return xe.has(X(t)) ? "y" : "x";
43
43
  }
44
44
  function Nt(t) {
45
- return It(F(t));
45
+ return It(z(t));
46
46
  }
47
47
  function be(t, e, n) {
48
48
  n === void 0 && (n = !1);
49
- const o = rt(t), i = Nt(t), l = Wt(i);
49
+ const o = rt(t), i = Nt(t), s = Wt(i);
50
50
  let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
51
- return e.reference[l] > e.floating[l] && (r = nt(r)), [r, nt(r)];
51
+ return e.reference[s] > e.floating[s] && (r = nt(r)), [r, nt(r)];
52
52
  }
53
53
  function Ce(t) {
54
54
  const e = nt(t);
55
- return [gt(t), e, gt(e)];
55
+ return [pt(t), e, pt(e)];
56
56
  }
57
- function gt(t) {
57
+ function pt(t) {
58
58
  return t.replace(/start|end/g, (e) => ve[e]);
59
59
  }
60
60
  const Bt = ["left", "right"], Pt = ["right", "left"], Re = ["top", "bottom"], Se = ["bottom", "top"];
61
- function Ae(t, e, n) {
61
+ function Oe(t, e, n) {
62
62
  switch (t) {
63
63
  case "top":
64
64
  case "bottom":
@@ -70,10 +70,10 @@ function Ae(t, e, n) {
70
70
  return [];
71
71
  }
72
72
  }
73
- function Oe(t, e, n, o) {
73
+ function Ae(t, e, n, o) {
74
74
  const i = rt(t);
75
- let l = Ae(N(t), n === "start", o);
76
- return i && (l = l.map((r) => r + "-" + i), e && (l = l.concat(l.map(gt)))), l;
75
+ let s = Oe(X(t), n === "start", o);
76
+ return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(pt)))), s;
77
77
  }
78
78
  function nt(t) {
79
79
  return t.replace(/left|right|bottom|top/g, (e) => ye[e]);
@@ -118,9 +118,9 @@ function kt(t, e, n) {
118
118
  reference: o,
119
119
  floating: i
120
120
  } = t;
121
- const l = F(e), r = Nt(e), s = Wt(r), c = N(e), a = l === "y", f = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, m = o[s] / 2 - i[s] / 2;
121
+ const s = z(e), r = Nt(e), l = Wt(r), a = X(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;
122
122
  let d;
123
- switch (c) {
123
+ switch (a) {
124
124
  case "top":
125
125
  d = {
126
126
  x: f,
@@ -153,10 +153,10 @@ function kt(t, e, n) {
153
153
  }
154
154
  switch (rt(e)) {
155
155
  case "start":
156
- d[r] -= m * (n && a ? -1 : 1);
156
+ d[r] -= m * (n && c ? -1 : 1);
157
157
  break;
158
158
  case "end":
159
- d[r] += m * (n && a ? -1 : 1);
159
+ d[r] += m * (n && c ? -1 : 1);
160
160
  break;
161
161
  }
162
162
  return d;
@@ -165,24 +165,24 @@ const De = async (t, e, n) => {
165
165
  const {
166
166
  placement: o = "bottom",
167
167
  strategy: i = "absolute",
168
- middleware: l = [],
168
+ middleware: s = [],
169
169
  platform: r
170
- } = n, s = l.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(e));
171
- let a = await r.getElementRects({
170
+ } = n, l = s.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(e));
171
+ let c = await r.getElementRects({
172
172
  reference: t,
173
173
  floating: e,
174
174
  strategy: i
175
175
  }), {
176
176
  x: f,
177
177
  y: u
178
- } = kt(a, o, c), m = o, d = {}, h = 0;
179
- for (let y = 0; y < s.length; y++) {
178
+ } = kt(c, o, a), m = o, d = {}, h = 0;
179
+ for (let w = 0; w < l.length; w++) {
180
180
  const {
181
- name: v,
181
+ name: y,
182
182
  fn: g
183
- } = s[y], {
183
+ } = l[w], {
184
184
  x: p,
185
- y: x,
185
+ y: v,
186
186
  data: C,
187
187
  reset: b
188
188
  } = await g({
@@ -192,27 +192,27 @@ const De = async (t, e, n) => {
192
192
  placement: m,
193
193
  strategy: i,
194
194
  middlewareData: d,
195
- rects: a,
195
+ rects: c,
196
196
  platform: r,
197
197
  elements: {
198
198
  reference: t,
199
199
  floating: e
200
200
  }
201
201
  });
202
- f = p ?? f, u = x ?? u, d = {
202
+ f = p ?? f, u = v ?? u, d = {
203
203
  ...d,
204
- [v]: {
205
- ...d[v],
204
+ [y]: {
205
+ ...d[y],
206
206
  ...C
207
207
  }
208
- }, b && h <= 50 && (h++, typeof b == "object" && (b.placement && (m = b.placement), b.rects && (a = b.rects === !0 ? await r.getElementRects({
208
+ }, b && h <= 50 && (h++, typeof b == "object" && (b.placement && (m = b.placement), b.rects && (c = b.rects === !0 ? await r.getElementRects({
209
209
  reference: t,
210
210
  floating: e,
211
211
  strategy: i
212
212
  }) : b.rects), {
213
213
  x: f,
214
214
  y: u
215
- } = kt(a, m, c)), y = -1);
215
+ } = kt(c, m, a)), w = -1);
216
216
  }
217
217
  return {
218
218
  x: f,
@@ -228,37 +228,37 @@ async function Xt(t, e) {
228
228
  const {
229
229
  x: o,
230
230
  y: i,
231
- platform: l,
231
+ platform: s,
232
232
  rects: r,
233
- elements: s,
234
- strategy: c
233
+ elements: l,
234
+ strategy: a
235
235
  } = t, {
236
- boundary: a = "clippingAncestors",
236
+ boundary: c = "clippingAncestors",
237
237
  rootBoundary: f = "viewport",
238
238
  elementContext: u = "floating",
239
239
  altBoundary: m = !1,
240
240
  padding: d = 0
241
- } = it(e, t), h = Le(d), v = s[m ? u === "floating" ? "reference" : "floating" : u], g = ot(await l.getClippingRect({
242
- element: (n = await (l.isElement == null ? void 0 : l.isElement(v))) == null || n ? v : v.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(s.floating)),
243
- boundary: a,
241
+ } = it(e, t), h = Le(d), y = l[m ? u === "floating" ? "reference" : "floating" : u], g = ot(await s.getClippingRect({
242
+ element: (n = await (s.isElement == null ? void 0 : s.isElement(y))) == null || n ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
243
+ boundary: c,
244
244
  rootBoundary: f,
245
- strategy: c
245
+ strategy: a
246
246
  })), p = u === "floating" ? {
247
247
  x: o,
248
248
  y: i,
249
249
  width: r.floating.width,
250
250
  height: r.floating.height
251
- } : r.reference, x = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(s.floating)), C = await (l.isElement == null ? void 0 : l.isElement(x)) ? await (l.getScale == null ? void 0 : l.getScale(x)) || {
251
+ } : r.reference, v = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), C = await (s.isElement == null ? void 0 : s.isElement(v)) ? await (s.getScale == null ? void 0 : s.getScale(v)) || {
252
252
  x: 1,
253
253
  y: 1
254
254
  } : {
255
255
  x: 1,
256
256
  y: 1
257
- }, b = ot(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
258
- elements: s,
257
+ }, b = ot(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
258
+ elements: l,
259
259
  rect: p,
260
- offsetParent: x,
261
- strategy: c
260
+ offsetParent: v,
261
+ strategy: a
262
262
  }) : p);
263
263
  return {
264
264
  top: (g.top - b.top + h.top) / C.y,
@@ -275,73 +275,73 @@ const Te = function(t) {
275
275
  var n, o;
276
276
  const {
277
277
  placement: i,
278
- middlewareData: l,
278
+ middlewareData: s,
279
279
  rects: r,
280
- initialPlacement: s,
281
- platform: c,
282
- elements: a
280
+ initialPlacement: l,
281
+ platform: a,
282
+ elements: c
283
283
  } = e, {
284
284
  mainAxis: f = !0,
285
285
  crossAxis: u = !0,
286
286
  fallbackPlacements: m,
287
287
  fallbackStrategy: d = "bestFit",
288
288
  fallbackAxisSideDirection: h = "none",
289
- flipAlignment: y = !0,
290
- ...v
289
+ flipAlignment: w = !0,
290
+ ...y
291
291
  } = it(t, e);
292
- if ((n = l.arrow) != null && n.alignmentOffset)
292
+ if ((n = s.arrow) != null && n.alignmentOffset)
293
293
  return {};
294
- const g = N(i), p = F(s), x = N(s) === s, C = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), b = m || (x || !y ? [nt(s)] : Ce(s)), T = h !== "none";
295
- !m && T && b.push(...Oe(s, y, h, C));
296
- const w = [s, ...b], R = await Xt(e, v), z = [];
297
- let Y = ((o = l.flip) == null ? void 0 : o.overflows) || [];
298
- if (f && z.push(R[g]), u) {
299
- const H = be(i, r, C);
300
- z.push(R[H[0]], R[H[1]]);
294
+ const g = X(i), p = z(l), v = X(l) === l, C = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), b = m || (v || !w ? [nt(l)] : Ce(l)), $ = h !== "none";
295
+ !m && $ && b.push(...Ae(l, w, h, C));
296
+ const x = [l, ...b], R = await Xt(e, y), A = [];
297
+ let S = ((o = s.flip) == null ? void 0 : o.overflows) || [];
298
+ if (f && A.push(R[g]), u) {
299
+ const I = be(i, r, C);
300
+ A.push(R[I[0]], R[I[1]]);
301
301
  }
302
- if (Y = [...Y, {
302
+ if (S = [...S, {
303
303
  placement: i,
304
- overflows: z
305
- }], !z.every((H) => H <= 0)) {
306
- var bt, Ct;
307
- const H = (((bt = l.flip) == null ? void 0 : bt.index) || 0) + 1, ft = w[H];
308
- if (ft && (!(u === "alignment" ? p !== F(ft) : !1) || // We leave the current main axis only if every placement on that axis
304
+ overflows: A
305
+ }], !A.every((I) => I <= 0)) {
306
+ var ft, Ct;
307
+ const I = (((ft = s.flip) == null ? void 0 : ft.index) || 0) + 1, ut = x[I];
308
+ if (ut && (!(u === "alignment" ? p !== z(ut) : !1) || // We leave the current main axis only if every placement on that axis
309
309
  // overflows the main axis.
310
- Y.every((O) => F(O.placement) === p ? O.overflows[0] > 0 : !0)))
310
+ S.every((E) => z(E.placement) === p ? E.overflows[0] > 0 : !0)))
311
311
  return {
312
312
  data: {
313
- index: H,
314
- overflows: Y
313
+ index: I,
314
+ overflows: S
315
315
  },
316
316
  reset: {
317
- placement: ft
317
+ placement: ut
318
318
  }
319
319
  };
320
- let G = (Ct = Y.filter((I) => I.overflows[0] <= 0).sort((I, O) => I.overflows[1] - O.overflows[1])[0]) == null ? void 0 : Ct.placement;
321
- if (!G)
320
+ let K = (Ct = S.filter((W) => W.overflows[0] <= 0).sort((W, E) => W.overflows[1] - E.overflows[1])[0]) == null ? void 0 : Ct.placement;
321
+ if (!K)
322
322
  switch (d) {
323
323
  case "bestFit": {
324
324
  var Rt;
325
- const I = (Rt = Y.filter((O) => {
326
- if (T) {
327
- const $ = F(O.placement);
328
- return $ === p || // Create a bias to the `y` side axis due to horizontal
325
+ const W = (Rt = S.filter((E) => {
326
+ if ($) {
327
+ const M = z(E.placement);
328
+ return M === p || // Create a bias to the `y` side axis due to horizontal
329
329
  // reading directions favoring greater width.
330
- $ === "y";
330
+ M === "y";
331
331
  }
332
332
  return !0;
333
- }).map((O) => [O.placement, O.overflows.filter(($) => $ > 0).reduce(($, Jt) => $ + Jt, 0)]).sort((O, $) => O[1] - $[1])[0]) == null ? void 0 : Rt[0];
334
- I && (G = I);
333
+ }).map((E) => [E.placement, E.overflows.filter((M) => M > 0).reduce((M, Qt) => M + Qt, 0)]).sort((E, M) => E[1] - M[1])[0]) == null ? void 0 : Rt[0];
334
+ W && (K = W);
335
335
  break;
336
336
  }
337
337
  case "initialPlacement":
338
- G = s;
338
+ K = l;
339
339
  break;
340
340
  }
341
- if (i !== G)
341
+ if (i !== K)
342
342
  return {
343
343
  reset: {
344
- placement: G
344
+ placement: K
345
345
  }
346
346
  };
347
347
  }
@@ -354,7 +354,7 @@ async function Pe(t, e) {
354
354
  placement: n,
355
355
  platform: o,
356
356
  elements: i
357
- } = t, l = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = N(n), s = rt(n), c = F(n) === "y", a = Be.has(r) ? -1 : 1, f = l && c ? -1 : 1, u = it(e, t);
357
+ } = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = X(n), l = rt(n), a = z(n) === "y", c = Be.has(r) ? -1 : 1, f = s && a ? -1 : 1, u = it(e, t);
358
358
  let {
359
359
  mainAxis: m,
360
360
  crossAxis: d,
@@ -368,11 +368,11 @@ async function Pe(t, e) {
368
368
  crossAxis: u.crossAxis || 0,
369
369
  alignmentAxis: u.alignmentAxis
370
370
  };
371
- return s && typeof h == "number" && (d = s === "end" ? h * -1 : h), c ? {
371
+ return l && typeof h == "number" && (d = l === "end" ? h * -1 : h), a ? {
372
372
  x: d * f,
373
- y: m * a
373
+ y: m * c
374
374
  } : {
375
- x: m * a,
375
+ x: m * c,
376
376
  y: d * f
377
377
  };
378
378
  }
@@ -384,15 +384,15 @@ const ke = function(t) {
384
384
  var n, o;
385
385
  const {
386
386
  x: i,
387
- y: l,
387
+ y: s,
388
388
  placement: r,
389
- middlewareData: s
390
- } = e, c = await Pe(e, t);
391
- return r === ((n = s.offset) == null ? void 0 : n.placement) && (o = s.arrow) != null && o.alignmentOffset ? {} : {
392
- x: i + c.x,
393
- y: l + c.y,
389
+ middlewareData: l
390
+ } = e, a = await Pe(e, t);
391
+ return r === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
392
+ x: i + a.x,
393
+ y: s + a.y,
394
394
  data: {
395
- ...c,
395
+ ...a,
396
396
  placement: r
397
397
  }
398
398
  };
@@ -408,46 +408,46 @@ const ke = function(t) {
408
408
  y: o,
409
409
  placement: i
410
410
  } = e, {
411
- mainAxis: l = !0,
411
+ mainAxis: s = !0,
412
412
  crossAxis: r = !1,
413
- limiter: s = {
414
- fn: (v) => {
413
+ limiter: l = {
414
+ fn: (y) => {
415
415
  let {
416
416
  x: g,
417
417
  y: p
418
- } = v;
418
+ } = y;
419
419
  return {
420
420
  x: g,
421
421
  y: p
422
422
  };
423
423
  }
424
424
  },
425
- ...c
426
- } = it(t, e), a = {
425
+ ...a
426
+ } = it(t, e), c = {
427
427
  x: n,
428
428
  y: o
429
- }, f = await Xt(e, c), u = F(N(i)), m = It(u);
430
- let d = a[m], h = a[u];
431
- if (l) {
432
- const v = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", p = d + f[v], x = d - f[g];
433
- d = Tt(p, d, x);
429
+ }, f = await Xt(e, a), u = z(X(i)), m = It(u);
430
+ let d = c[m], h = c[u];
431
+ if (s) {
432
+ const y = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", p = d + f[y], v = d - f[g];
433
+ d = Tt(p, d, v);
434
434
  }
435
435
  if (r) {
436
- const v = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", p = h + f[v], x = h - f[g];
437
- h = Tt(p, h, x);
436
+ const y = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", p = h + f[y], v = h - f[g];
437
+ h = Tt(p, h, v);
438
438
  }
439
- const y = s.fn({
439
+ const w = l.fn({
440
440
  ...e,
441
441
  [m]: d,
442
442
  [u]: h
443
443
  });
444
444
  return {
445
- ...y,
445
+ ...w,
446
446
  data: {
447
- x: y.x - n,
448
- y: y.y - o,
447
+ x: w.x - n,
448
+ y: w.y - o,
449
449
  enabled: {
450
- [m]: l,
450
+ [m]: s,
451
451
  [u]: r
452
452
  }
453
453
  }
@@ -455,48 +455,48 @@ const ke = function(t) {
455
455
  }
456
456
  };
457
457
  };
458
- function lt() {
458
+ function st() {
459
459
  return typeof window < "u";
460
460
  }
461
- function j(t) {
462
- return wt(t) ? (t.nodeName || "").toLowerCase() : "#document";
461
+ function Y(t) {
462
+ return yt(t) ? (t.nodeName || "").toLowerCase() : "#document";
463
463
  }
464
- function S(t) {
464
+ function O(t) {
465
465
  var e;
466
466
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
467
467
  }
468
- function k(t) {
468
+ function V(t) {
469
469
  var e;
470
- return (e = (wt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
470
+ return (e = (yt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
471
471
  }
472
- function wt(t) {
473
- return lt() ? t instanceof Node || t instanceof S(t).Node : !1;
472
+ function yt(t) {
473
+ return st() ? t instanceof Node || t instanceof O(t).Node : !1;
474
474
  }
475
- function L(t) {
476
- return lt() ? t instanceof Element || t instanceof S(t).Element : !1;
475
+ function T(t) {
476
+ return st() ? t instanceof Element || t instanceof O(t).Element : !1;
477
477
  }
478
- function P(t) {
479
- return lt() ? t instanceof HTMLElement || t instanceof S(t).HTMLElement : !1;
478
+ function k(t) {
479
+ return st() ? t instanceof HTMLElement || t instanceof O(t).HTMLElement : !1;
480
480
  }
481
481
  function Vt(t) {
482
- return !lt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof S(t).ShadowRoot;
482
+ return !st() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof O(t).ShadowRoot;
483
483
  }
484
484
  const $e = /* @__PURE__ */ new Set(["inline", "contents"]);
485
- function J(t) {
485
+ function Q(t) {
486
486
  const {
487
487
  overflow: e,
488
488
  overflowX: n,
489
489
  overflowY: o,
490
490
  display: i
491
- } = D(t);
491
+ } = B(t);
492
492
  return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !$e.has(i);
493
493
  }
494
494
  const Fe = /* @__PURE__ */ new Set(["table", "td", "th"]);
495
495
  function Me(t) {
496
- return Fe.has(j(t));
496
+ return Fe.has(Y(t));
497
497
  }
498
498
  const ze = [":popover-open", ":modal"];
499
- function st(t) {
499
+ function lt(t) {
500
500
  return ze.some((e) => {
501
501
  try {
502
502
  return t.matches(e);
@@ -506,33 +506,33 @@ function st(t) {
506
506
  });
507
507
  }
508
508
  const He = ["transform", "translate", "scale", "rotate", "perspective"], Ie = ["transform", "translate", "scale", "rotate", "perspective", "filter"], We = ["paint", "layout", "strict", "content"];
509
- function yt(t) {
510
- const e = vt(), n = L(t) ? D(t) : t;
509
+ function vt(t) {
510
+ const e = xt(), n = T(t) ? B(t) : t;
511
511
  return He.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) || Ie.some((o) => (n.willChange || "").includes(o)) || We.some((o) => (n.contain || "").includes(o));
512
512
  }
513
513
  function Ne(t) {
514
- let e = M(t);
515
- for (; P(e) && !U(e); ) {
516
- if (yt(e))
514
+ let e = H(t);
515
+ for (; k(e) && !G(e); ) {
516
+ if (vt(e))
517
517
  return e;
518
- if (st(e))
518
+ if (lt(e))
519
519
  return null;
520
- e = M(e);
520
+ e = H(e);
521
521
  }
522
522
  return null;
523
523
  }
524
- function vt() {
524
+ function xt() {
525
525
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
526
526
  }
527
527
  const Xe = /* @__PURE__ */ new Set(["html", "body", "#document"]);
528
- function U(t) {
529
- return Xe.has(j(t));
528
+ function G(t) {
529
+ return Xe.has(Y(t));
530
530
  }
531
- function D(t) {
532
- return S(t).getComputedStyle(t);
531
+ function B(t) {
532
+ return O(t).getComputedStyle(t);
533
533
  }
534
534
  function ct(t) {
535
- return L(t) ? {
535
+ return T(t) ? {
536
536
  scrollLeft: t.scrollLeft,
537
537
  scrollTop: t.scrollTop
538
538
  } : {
@@ -540,189 +540,189 @@ function ct(t) {
540
540
  scrollTop: t.scrollY
541
541
  };
542
542
  }
543
- function M(t) {
544
- if (j(t) === "html")
543
+ function H(t) {
544
+ if (Y(t) === "html")
545
545
  return t;
546
546
  const e = (
547
547
  // Step into the shadow DOM of the parent of a slotted node.
548
548
  t.assignedSlot || // DOM Element detected.
549
549
  t.parentNode || // ShadowRoot detected.
550
550
  Vt(t) && t.host || // Fallback.
551
- k(t)
551
+ V(t)
552
552
  );
553
553
  return Vt(e) ? e.host : e;
554
554
  }
555
555
  function jt(t) {
556
- const e = M(t);
557
- return U(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : P(e) && J(e) ? e : jt(e);
556
+ const e = H(t);
557
+ return G(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : k(e) && Q(e) ? e : jt(e);
558
558
  }
559
- function Z(t, e, n) {
559
+ function J(t, e, n) {
560
560
  var o;
561
561
  e === void 0 && (e = []), n === void 0 && (n = !0);
562
- const i = jt(t), l = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = S(i);
563
- if (l) {
564
- const s = pt(r);
565
- return e.concat(r, r.visualViewport || [], J(i) ? i : [], s && n ? Z(s) : []);
562
+ const i = jt(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = O(i);
563
+ if (s) {
564
+ const l = wt(r);
565
+ return e.concat(r, r.visualViewport || [], Q(i) ? i : [], l && n ? J(l) : []);
566
566
  }
567
- return e.concat(i, Z(i, [], n));
567
+ return e.concat(i, J(i, [], n));
568
568
  }
569
- function pt(t) {
569
+ function wt(t) {
570
570
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
571
571
  }
572
572
  function Yt(t) {
573
- const e = D(t);
573
+ const e = B(t);
574
574
  let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
575
- const i = P(t), l = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, s = et(n) !== l || et(o) !== r;
576
- return s && (n = l, o = r), {
575
+ const i = k(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, l = et(n) !== s || et(o) !== r;
576
+ return l && (n = s, o = r), {
577
577
  width: n,
578
578
  height: o,
579
- $: s
579
+ $: l
580
580
  };
581
581
  }
582
- function xt(t) {
583
- return L(t) ? t : t.contextElement;
582
+ function bt(t) {
583
+ return T(t) ? t : t.contextElement;
584
584
  }
585
- function q(t) {
586
- const e = xt(t);
587
- if (!P(e))
588
- return B(1);
585
+ function U(t) {
586
+ const e = bt(t);
587
+ if (!k(e))
588
+ return P(1);
589
589
  const n = e.getBoundingClientRect(), {
590
590
  width: o,
591
591
  height: i,
592
- $: l
592
+ $: s
593
593
  } = Yt(e);
594
- let r = (l ? et(n.width) : n.width) / o, s = (l ? et(n.height) : n.height) / i;
595
- return (!r || !Number.isFinite(r)) && (r = 1), (!s || !Number.isFinite(s)) && (s = 1), {
594
+ let r = (s ? et(n.width) : n.width) / o, l = (s ? et(n.height) : n.height) / i;
595
+ return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
596
596
  x: r,
597
- y: s
597
+ y: l
598
598
  };
599
599
  }
600
- const je = /* @__PURE__ */ B(0);
601
- function _t(t) {
602
- const e = S(t);
603
- return !vt() || !e.visualViewport ? je : {
600
+ const je = /* @__PURE__ */ P(0);
601
+ function qt(t) {
602
+ const e = O(t);
603
+ return !xt() || !e.visualViewport ? je : {
604
604
  x: e.visualViewport.offsetLeft,
605
605
  y: e.visualViewport.offsetTop
606
606
  };
607
607
  }
608
608
  function Ye(t, e, n) {
609
- return e === void 0 && (e = !1), !n || e && n !== S(t) ? !1 : e;
609
+ return e === void 0 && (e = !1), !n || e && n !== O(t) ? !1 : e;
610
610
  }
611
- function X(t, e, n, o) {
611
+ function j(t, e, n, o) {
612
612
  e === void 0 && (e = !1), n === void 0 && (n = !1);
613
- const i = t.getBoundingClientRect(), l = xt(t);
614
- let r = B(1);
615
- e && (o ? L(o) && (r = q(o)) : r = q(t));
616
- const s = Ye(l, n, o) ? _t(l) : B(0);
617
- let c = (i.left + s.x) / r.x, a = (i.top + s.y) / r.y, f = i.width / r.x, u = i.height / r.y;
618
- if (l) {
619
- const m = S(l), d = o && L(o) ? S(o) : o;
620
- let h = m, y = pt(h);
621
- for (; y && o && d !== h; ) {
622
- const v = q(y), g = y.getBoundingClientRect(), p = D(y), x = g.left + (y.clientLeft + parseFloat(p.paddingLeft)) * v.x, C = g.top + (y.clientTop + parseFloat(p.paddingTop)) * v.y;
623
- c *= v.x, a *= v.y, f *= v.x, u *= v.y, c += x, a += C, h = S(y), y = pt(h);
613
+ const i = t.getBoundingClientRect(), s = bt(t);
614
+ let r = P(1);
615
+ e && (o ? T(o) && (r = U(o)) : r = U(t));
616
+ const l = Ye(s, n, o) ? qt(s) : P(0);
617
+ 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;
618
+ if (s) {
619
+ const m = O(s), d = o && T(o) ? O(o) : o;
620
+ let h = m, w = wt(h);
621
+ for (; w && o && d !== h; ) {
622
+ const y = U(w), g = w.getBoundingClientRect(), p = B(w), v = g.left + (w.clientLeft + parseFloat(p.paddingLeft)) * y.x, C = g.top + (w.clientTop + parseFloat(p.paddingTop)) * y.y;
623
+ a *= y.x, c *= y.y, f *= y.x, u *= y.y, a += v, c += C, h = O(w), w = wt(h);
624
624
  }
625
625
  }
626
626
  return ot({
627
627
  width: f,
628
628
  height: u,
629
- x: c,
630
- y: a
629
+ x: a,
630
+ y: c
631
631
  });
632
632
  }
633
633
  function at(t, e) {
634
634
  const n = ct(t).scrollLeft;
635
- return e ? e.left + n : X(k(t)).left + n;
635
+ return e ? e.left + n : j(V(t)).left + n;
636
636
  }
637
- function qt(t, e) {
637
+ function Ut(t, e) {
638
638
  const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - at(t, n), i = n.top + e.scrollTop;
639
639
  return {
640
640
  x: o,
641
641
  y: i
642
642
  };
643
643
  }
644
- function _e(t) {
644
+ function qe(t) {
645
645
  let {
646
646
  elements: e,
647
647
  rect: n,
648
648
  offsetParent: o,
649
649
  strategy: i
650
650
  } = t;
651
- const l = i === "fixed", r = k(o), s = e ? st(e.floating) : !1;
652
- if (o === r || s && l)
651
+ const s = i === "fixed", r = V(o), l = e ? lt(e.floating) : !1;
652
+ if (o === r || l && s)
653
653
  return n;
654
- let c = {
654
+ let a = {
655
655
  scrollLeft: 0,
656
656
  scrollTop: 0
657
- }, a = B(1);
658
- const f = B(0), u = P(o);
659
- if ((u || !u && !l) && ((j(o) !== "body" || J(r)) && (c = ct(o)), P(o))) {
660
- const d = X(o);
661
- a = q(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
657
+ }, c = P(1);
658
+ const f = P(0), u = k(o);
659
+ if ((u || !u && !s) && ((Y(o) !== "body" || Q(r)) && (a = ct(o)), k(o))) {
660
+ const d = j(o);
661
+ c = U(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
662
662
  }
663
- const m = r && !u && !l ? qt(r, c) : B(0);
663
+ const m = r && !u && !s ? Ut(r, a) : P(0);
664
664
  return {
665
- width: n.width * a.x,
666
- height: n.height * a.y,
667
- x: n.x * a.x - c.scrollLeft * a.x + f.x + m.x,
668
- y: n.y * a.y - c.scrollTop * a.y + f.y + m.y
665
+ width: n.width * c.x,
666
+ height: n.height * c.y,
667
+ x: n.x * c.x - a.scrollLeft * c.x + f.x + m.x,
668
+ y: n.y * c.y - a.scrollTop * c.y + f.y + m.y
669
669
  };
670
670
  }
671
- function qe(t) {
671
+ function Ue(t) {
672
672
  return Array.from(t.getClientRects());
673
673
  }
674
- function Ue(t) {
675
- const e = k(t), n = ct(t), o = t.ownerDocument.body, i = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), l = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
674
+ function Ge(t) {
675
+ const e = V(t), n = ct(t), o = t.ownerDocument.body, i = N(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = N(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
676
676
  let r = -n.scrollLeft + at(t);
677
- const s = -n.scrollTop;
678
- return D(o).direction === "rtl" && (r += W(e.clientWidth, o.clientWidth) - i), {
677
+ const l = -n.scrollTop;
678
+ return B(o).direction === "rtl" && (r += N(e.clientWidth, o.clientWidth) - i), {
679
679
  width: i,
680
- height: l,
680
+ height: s,
681
681
  x: r,
682
- y: s
682
+ y: l
683
683
  };
684
684
  }
685
685
  const $t = 25;
686
- function Ge(t, e) {
687
- const n = S(t), o = k(t), i = n.visualViewport;
688
- let l = o.clientWidth, r = o.clientHeight, s = 0, c = 0;
686
+ function Ke(t, e) {
687
+ const n = O(t), o = V(t), i = n.visualViewport;
688
+ let s = o.clientWidth, r = o.clientHeight, l = 0, a = 0;
689
689
  if (i) {
690
- l = i.width, r = i.height;
691
- const f = vt();
692
- (!f || f && e === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
690
+ s = i.width, r = i.height;
691
+ const f = xt();
692
+ (!f || f && e === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
693
693
  }
694
- const a = at(o);
695
- if (a <= 0) {
694
+ const c = at(o);
695
+ if (c <= 0) {
696
696
  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);
697
- h <= $t && (l -= h);
698
- } else a <= $t && (l += a);
697
+ h <= $t && (s -= h);
698
+ } else c <= $t && (s += c);
699
699
  return {
700
- width: l,
700
+ width: s,
701
701
  height: r,
702
- x: s,
703
- y: c
702
+ x: l,
703
+ y: a
704
704
  };
705
705
  }
706
- const Ke = /* @__PURE__ */ new Set(["absolute", "fixed"]);
707
- function Ze(t, e) {
708
- const n = X(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, l = P(t) ? q(t) : B(1), r = t.clientWidth * l.x, s = t.clientHeight * l.y, c = i * l.x, a = o * l.y;
706
+ const Ze = /* @__PURE__ */ new Set(["absolute", "fixed"]);
707
+ function Je(t, e) {
708
+ const n = j(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = k(t) ? U(t) : P(1), r = t.clientWidth * s.x, l = t.clientHeight * s.y, a = i * s.x, c = o * s.y;
709
709
  return {
710
710
  width: r,
711
- height: s,
712
- x: c,
713
- y: a
711
+ height: l,
712
+ x: a,
713
+ y: c
714
714
  };
715
715
  }
716
716
  function Ft(t, e, n) {
717
717
  let o;
718
718
  if (e === "viewport")
719
- o = Ge(t, n);
719
+ o = Ke(t, n);
720
720
  else if (e === "document")
721
- o = Ue(k(t));
722
- else if (L(e))
723
- o = Ze(e, n);
721
+ o = Ge(V(t));
722
+ else if (T(e))
723
+ o = Je(e, n);
724
724
  else {
725
- const i = _t(t);
725
+ const i = qt(t);
726
726
  o = {
727
727
  x: e.x - i.x,
728
728
  y: e.y - i.y,
@@ -732,39 +732,39 @@ function Ft(t, e, n) {
732
732
  }
733
733
  return ot(o);
734
734
  }
735
- function Ut(t, e) {
736
- const n = M(t);
737
- return n === e || !L(n) || U(n) ? !1 : D(n).position === "fixed" || Ut(n, e);
735
+ function Gt(t, e) {
736
+ const n = H(t);
737
+ return n === e || !T(n) || G(n) ? !1 : B(n).position === "fixed" || Gt(n, e);
738
738
  }
739
- function Je(t, e) {
739
+ function Qe(t, e) {
740
740
  const n = e.get(t);
741
741
  if (n)
742
742
  return n;
743
- let o = Z(t, [], !1).filter((s) => L(s) && j(s) !== "body"), i = null;
744
- const l = D(t).position === "fixed";
745
- let r = l ? M(t) : t;
746
- for (; L(r) && !U(r); ) {
747
- const s = D(r), c = yt(r);
748
- !c && s.position === "fixed" && (i = null), (l ? !c && !i : !c && s.position === "static" && !!i && Ke.has(i.position) || J(r) && !c && Ut(t, r)) ? o = o.filter((f) => f !== r) : i = s, r = M(r);
743
+ let o = J(t, [], !1).filter((l) => T(l) && Y(l) !== "body"), i = null;
744
+ const s = B(t).position === "fixed";
745
+ let r = s ? H(t) : t;
746
+ for (; T(r) && !G(r); ) {
747
+ const l = B(r), a = vt(r);
748
+ !a && l.position === "fixed" && (i = null), (s ? !a && !i : !a && l.position === "static" && !!i && Ze.has(i.position) || Q(r) && !a && Gt(t, r)) ? o = o.filter((f) => f !== r) : i = l, r = H(r);
749
749
  }
750
750
  return e.set(t, o), o;
751
751
  }
752
- function Qe(t) {
752
+ function _e(t) {
753
753
  let {
754
754
  element: e,
755
755
  boundary: n,
756
756
  rootBoundary: o,
757
757
  strategy: i
758
758
  } = t;
759
- const r = [...n === "clippingAncestors" ? st(e) ? [] : Je(e, this._c) : [].concat(n), o], s = r[0], c = r.reduce((a, f) => {
759
+ const r = [...n === "clippingAncestors" ? lt(e) ? [] : Qe(e, this._c) : [].concat(n), o], l = r[0], a = r.reduce((c, f) => {
760
760
  const u = Ft(e, f, i);
761
- return a.top = W(u.top, a.top), a.right = tt(u.right, a.right), a.bottom = tt(u.bottom, a.bottom), a.left = W(u.left, a.left), a;
762
- }, Ft(e, s, i));
761
+ return c.top = N(u.top, c.top), c.right = tt(u.right, c.right), c.bottom = tt(u.bottom, c.bottom), c.left = N(u.left, c.left), c;
762
+ }, Ft(e, l, i));
763
763
  return {
764
- width: c.right - c.left,
765
- height: c.bottom - c.top,
766
- x: c.left,
767
- y: c.top
764
+ width: a.right - a.left,
765
+ height: a.bottom - a.top,
766
+ x: a.left,
767
+ y: a.top
768
768
  };
769
769
  }
770
770
  function tn(t) {
@@ -778,22 +778,22 @@ function tn(t) {
778
778
  };
779
779
  }
780
780
  function en(t, e, n) {
781
- const o = P(e), i = k(e), l = n === "fixed", r = X(t, !0, l, e);
782
- let s = {
781
+ const o = k(e), i = V(e), s = n === "fixed", r = j(t, !0, s, e);
782
+ let l = {
783
783
  scrollLeft: 0,
784
784
  scrollTop: 0
785
785
  };
786
- const c = B(0);
787
- function a() {
788
- c.x = at(i);
786
+ const a = P(0);
787
+ function c() {
788
+ a.x = at(i);
789
789
  }
790
- if (o || !o && !l)
791
- if ((j(e) !== "body" || J(i)) && (s = ct(e)), o) {
792
- const d = X(e, !0, l, e);
793
- c.x = d.x + e.clientLeft, c.y = d.y + e.clientTop;
794
- } else i && a();
795
- l && !o && i && a();
796
- const f = i && !o && !l ? qt(i, s) : B(0), u = r.left + s.scrollLeft - c.x - f.x, m = r.top + s.scrollTop - c.y - f.y;
790
+ if (o || !o && !s)
791
+ if ((Y(e) !== "body" || Q(i)) && (l = ct(e)), o) {
792
+ const d = j(e, !0, s, e);
793
+ a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
794
+ } else i && c();
795
+ s && !o && i && c();
796
+ const f = i && !o && !s ? Ut(i, l) : P(0), u = r.left + l.scrollLeft - a.x - f.x, m = r.top + l.scrollTop - a.y - f.y;
797
797
  return {
798
798
  x: u,
799
799
  y: m,
@@ -801,37 +801,37 @@ function en(t, e, n) {
801
801
  height: r.height
802
802
  };
803
803
  }
804
- function ht(t) {
805
- return D(t).position === "static";
804
+ function gt(t) {
805
+ return B(t).position === "static";
806
806
  }
807
807
  function Mt(t, e) {
808
- if (!P(t) || D(t).position === "fixed")
808
+ if (!k(t) || B(t).position === "fixed")
809
809
  return null;
810
810
  if (e)
811
811
  return e(t);
812
812
  let n = t.offsetParent;
813
- return k(t) === n && (n = n.ownerDocument.body), n;
813
+ return V(t) === n && (n = n.ownerDocument.body), n;
814
814
  }
815
- function Gt(t, e) {
816
- const n = S(t);
817
- if (st(t))
815
+ function Kt(t, e) {
816
+ const n = O(t);
817
+ if (lt(t))
818
818
  return n;
819
- if (!P(t)) {
820
- let i = M(t);
821
- for (; i && !U(i); ) {
822
- if (L(i) && !ht(i))
819
+ if (!k(t)) {
820
+ let i = H(t);
821
+ for (; i && !G(i); ) {
822
+ if (T(i) && !gt(i))
823
823
  return i;
824
- i = M(i);
824
+ i = H(i);
825
825
  }
826
826
  return n;
827
827
  }
828
828
  let o = Mt(t, e);
829
- for (; o && Me(o) && ht(o); )
829
+ for (; o && Me(o) && gt(o); )
830
830
  o = Mt(o, e);
831
- return o && U(o) && ht(o) && !yt(o) ? n : o || Ne(t) || n;
831
+ return o && G(o) && gt(o) && !vt(o) ? n : o || Ne(t) || n;
832
832
  }
833
833
  const nn = async function(t) {
834
- const e = this.getOffsetParent || Gt, n = this.getDimensions, o = await n(t.floating);
834
+ const e = this.getOffsetParent || Kt, n = this.getDimensions, o = await n(t.floating);
835
835
  return {
836
836
  reference: en(t.reference, await e(t.floating), t.strategy),
837
837
  floating: {
@@ -843,116 +843,116 @@ const nn = async function(t) {
843
843
  };
844
844
  };
845
845
  function on(t) {
846
- return D(t).direction === "rtl";
846
+ return B(t).direction === "rtl";
847
847
  }
848
848
  const rn = {
849
- convertOffsetParentRelativeRectToViewportRelativeRect: _e,
850
- getDocumentElement: k,
851
- getClippingRect: Qe,
852
- getOffsetParent: Gt,
849
+ convertOffsetParentRelativeRectToViewportRelativeRect: qe,
850
+ getDocumentElement: V,
851
+ getClippingRect: _e,
852
+ getOffsetParent: Kt,
853
853
  getElementRects: nn,
854
- getClientRects: qe,
854
+ getClientRects: Ue,
855
855
  getDimensions: tn,
856
- getScale: q,
857
- isElement: L,
856
+ getScale: U,
857
+ isElement: T,
858
858
  isRTL: on
859
859
  };
860
- function Kt(t, e) {
860
+ function Zt(t, e) {
861
861
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
862
862
  }
863
- function ln(t, e) {
863
+ function sn(t, e) {
864
864
  let n = null, o;
865
- const i = k(t);
866
- function l() {
867
- var s;
868
- clearTimeout(o), (s = n) == null || s.disconnect(), n = null;
865
+ const i = V(t);
866
+ function s() {
867
+ var l;
868
+ clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
869
869
  }
870
- function r(s, c) {
871
- s === void 0 && (s = !1), c === void 0 && (c = 1), l();
872
- const a = t.getBoundingClientRect(), {
870
+ function r(l, a) {
871
+ l === void 0 && (l = !1), a === void 0 && (a = 1), s();
872
+ const c = t.getBoundingClientRect(), {
873
873
  left: f,
874
874
  top: u,
875
875
  width: m,
876
876
  height: d
877
- } = a;
878
- if (s || e(), !m || !d)
877
+ } = c;
878
+ if (l || e(), !m || !d)
879
879
  return;
880
- const h = Q(u), y = Q(i.clientWidth - (f + m)), v = Q(i.clientHeight - (u + d)), g = Q(f), x = {
881
- rootMargin: -h + "px " + -y + "px " + -v + "px " + -g + "px",
882
- threshold: W(0, tt(1, c)) || 1
880
+ const h = _(u), w = _(i.clientWidth - (f + m)), y = _(i.clientHeight - (u + d)), g = _(f), v = {
881
+ rootMargin: -h + "px " + -w + "px " + -y + "px " + -g + "px",
882
+ threshold: N(0, tt(1, a)) || 1
883
883
  };
884
884
  let C = !0;
885
- function b(T) {
886
- const w = T[0].intersectionRatio;
887
- if (w !== c) {
885
+ function b($) {
886
+ const x = $[0].intersectionRatio;
887
+ if (x !== a) {
888
888
  if (!C)
889
889
  return r();
890
- w ? r(!1, w) : o = setTimeout(() => {
890
+ x ? r(!1, x) : o = setTimeout(() => {
891
891
  r(!1, 1e-7);
892
892
  }, 1e3);
893
893
  }
894
- w === 1 && !Kt(a, t.getBoundingClientRect()) && r(), C = !1;
894
+ x === 1 && !Zt(c, t.getBoundingClientRect()) && r(), C = !1;
895
895
  }
896
896
  try {
897
897
  n = new IntersectionObserver(b, {
898
- ...x,
898
+ ...v,
899
899
  // Handle <iframe>s
900
900
  root: i.ownerDocument
901
901
  });
902
902
  } catch {
903
- n = new IntersectionObserver(b, x);
903
+ n = new IntersectionObserver(b, v);
904
904
  }
905
905
  n.observe(t);
906
906
  }
907
- return r(!0), l;
907
+ return r(!0), s;
908
908
  }
909
- function sn(t, e, n, o) {
909
+ function ln(t, e, n, o) {
910
910
  o === void 0 && (o = {});
911
911
  const {
912
912
  ancestorScroll: i = !0,
913
- ancestorResize: l = !0,
913
+ ancestorResize: s = !0,
914
914
  elementResize: r = typeof ResizeObserver == "function",
915
- layoutShift: s = typeof IntersectionObserver == "function",
916
- animationFrame: c = !1
917
- } = o, a = xt(t), f = i || l ? [...a ? Z(a) : [], ...Z(e)] : [];
915
+ layoutShift: l = typeof IntersectionObserver == "function",
916
+ animationFrame: a = !1
917
+ } = o, c = bt(t), f = i || s ? [...c ? J(c) : [], ...J(e)] : [];
918
918
  f.forEach((g) => {
919
919
  i && g.addEventListener("scroll", n, {
920
920
  passive: !0
921
- }), l && g.addEventListener("resize", n);
921
+ }), s && g.addEventListener("resize", n);
922
922
  });
923
- const u = a && s ? ln(a, n) : null;
923
+ const u = c && l ? sn(c, n) : null;
924
924
  let m = -1, d = null;
925
925
  r && (d = new ResizeObserver((g) => {
926
926
  let [p] = g;
927
- p && p.target === a && d && (d.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
928
- var x;
929
- (x = d) == null || x.observe(e);
927
+ p && p.target === c && d && (d.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
928
+ var v;
929
+ (v = d) == null || v.observe(e);
930
930
  })), n();
931
- }), a && !c && d.observe(a), d.observe(e));
932
- let h, y = c ? X(t) : null;
933
- c && v();
934
- function v() {
935
- const g = X(t);
936
- y && !Kt(y, g) && n(), y = g, h = requestAnimationFrame(v);
931
+ }), c && !a && d.observe(c), d.observe(e));
932
+ let h, w = a ? j(t) : null;
933
+ a && y();
934
+ function y() {
935
+ const g = j(t);
936
+ w && !Zt(w, g) && n(), w = g, h = requestAnimationFrame(y);
937
937
  }
938
938
  return n(), () => {
939
939
  var g;
940
940
  f.forEach((p) => {
941
- i && p.removeEventListener("scroll", n), l && p.removeEventListener("resize", n);
942
- }), u?.(), (g = d) == null || g.disconnect(), d = null, c && cancelAnimationFrame(h);
941
+ i && p.removeEventListener("scroll", n), s && p.removeEventListener("resize", n);
942
+ }), u?.(), (g = d) == null || g.disconnect(), d = null, a && cancelAnimationFrame(h);
943
943
  };
944
944
  }
945
945
  const cn = ke, an = Ve, fn = Te, un = (t, e, n) => {
946
946
  const o = /* @__PURE__ */ new Map(), i = {
947
947
  platform: rn,
948
948
  ...n
949
- }, l = {
949
+ }, s = {
950
950
  ...i.platform,
951
951
  _c: o
952
952
  };
953
953
  return De(t, e, {
954
954
  ...i,
955
- platform: l
955
+ platform: s
956
956
  });
957
957
  };
958
958
  function dn(t) {
@@ -961,66 +961,66 @@ function dn(t) {
961
961
  function zt(t) {
962
962
  if (dn(t)) {
963
963
  const e = t.$el;
964
- return wt(e) && j(e) === "#comment" ? null : e;
964
+ return yt(e) && Y(e) === "#comment" ? null : e;
965
965
  }
966
966
  return t;
967
967
  }
968
- function K(t) {
969
- return typeof t == "function" ? t() : A(t);
968
+ function Z(t) {
969
+ return typeof t == "function" ? t() : L(t);
970
970
  }
971
- function Zt(t) {
971
+ function Jt(t) {
972
972
  return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
973
973
  }
974
974
  function Ht(t, e) {
975
- const n = Zt(t);
975
+ const n = Jt(t);
976
976
  return Math.round(e * n) / n;
977
977
  }
978
978
  function mn(t, e, n) {
979
979
  n === void 0 && (n = {});
980
- const o = n.whileElementsMounted, i = V(() => {
981
- var w;
982
- return (w = K(n.open)) != null ? w : !0;
983
- }), l = V(() => K(n.middleware)), r = V(() => {
984
- var w;
985
- return (w = K(n.placement)) != null ? w : "bottom";
986
- }), s = V(() => {
987
- var w;
988
- return (w = K(n.strategy)) != null ? w : "absolute";
989
- }), c = V(() => {
990
- var w;
991
- return (w = K(n.transform)) != null ? w : !0;
992
- }), a = V(() => zt(t.value)), f = V(() => zt(e.value)), u = E(0), m = E(0), d = E(s.value), h = E(r.value), y = Qt({}), v = E(!1), g = V(() => {
993
- const w = {
980
+ const o = n.whileElementsMounted, i = F(() => {
981
+ var x;
982
+ return (x = Z(n.open)) != null ? x : !0;
983
+ }), s = F(() => Z(n.middleware)), r = F(() => {
984
+ var x;
985
+ return (x = Z(n.placement)) != null ? x : "bottom";
986
+ }), l = F(() => {
987
+ var x;
988
+ return (x = Z(n.strategy)) != null ? x : "absolute";
989
+ }), a = F(() => {
990
+ var x;
991
+ return (x = Z(n.transform)) != null ? x : !0;
992
+ }), c = F(() => zt(t.value)), f = F(() => zt(e.value)), u = D(0), m = D(0), d = D(l.value), h = D(r.value), w = _t({}), y = D(!1), g = F(() => {
993
+ const x = {
994
994
  position: d.value,
995
995
  left: "0",
996
996
  top: "0"
997
997
  };
998
998
  if (!f.value)
999
- return w;
1000
- const R = Ht(f.value, u.value), z = Ht(f.value, m.value);
1001
- return c.value ? {
1002
- ...w,
1003
- transform: "translate(" + R + "px, " + z + "px)",
1004
- ...Zt(f.value) >= 1.5 && {
999
+ return x;
1000
+ const R = Ht(f.value, u.value), A = Ht(f.value, m.value);
1001
+ return a.value ? {
1002
+ ...x,
1003
+ transform: "translate(" + R + "px, " + A + "px)",
1004
+ ...Jt(f.value) >= 1.5 && {
1005
1005
  willChange: "transform"
1006
1006
  }
1007
1007
  } : {
1008
1008
  position: d.value,
1009
1009
  left: R + "px",
1010
- top: z + "px"
1010
+ top: A + "px"
1011
1011
  };
1012
1012
  });
1013
1013
  let p;
1014
- function x() {
1015
- if (a.value == null || f.value == null)
1014
+ function v() {
1015
+ if (c.value == null || f.value == null)
1016
1016
  return;
1017
- const w = i.value;
1018
- un(a.value, f.value, {
1019
- middleware: l.value,
1017
+ const x = i.value;
1018
+ un(c.value, f.value, {
1019
+ middleware: s.value,
1020
1020
  placement: r.value,
1021
- strategy: s.value
1021
+ strategy: l.value
1022
1022
  }).then((R) => {
1023
- u.value = R.x, m.value = R.y, d.value = R.strategy, h.value = R.placement, y.value = R.middlewareData, v.value = w !== !1;
1023
+ u.value = R.x, m.value = R.y, d.value = R.strategy, h.value = R.placement, w.value = R.middlewareData, y.value = x !== !1;
1024
1024
  });
1025
1025
  }
1026
1026
  function C() {
@@ -1028,32 +1028,32 @@ function mn(t, e, n) {
1028
1028
  }
1029
1029
  function b() {
1030
1030
  if (C(), o === void 0) {
1031
- x();
1031
+ v();
1032
1032
  return;
1033
1033
  }
1034
- if (a.value != null && f.value != null) {
1035
- p = o(a.value, f.value, x);
1034
+ if (c.value != null && f.value != null) {
1035
+ p = o(c.value, f.value, v);
1036
1036
  return;
1037
1037
  }
1038
1038
  }
1039
- function T() {
1040
- i.value || (v.value = !1);
1039
+ function $() {
1040
+ i.value || (y.value = !1);
1041
1041
  }
1042
- return ut([l, r, s, i], x, {
1042
+ return dt([s, r, l, i], v, {
1043
1043
  flush: "sync"
1044
- }), ut([a, f], b, {
1044
+ }), dt([c, f], b, {
1045
1045
  flush: "sync"
1046
- }), ut(i, T, {
1046
+ }), dt(i, $, {
1047
1047
  flush: "sync"
1048
1048
  }), te() && ee(C), {
1049
- x: _(u),
1050
- y: _(m),
1051
- strategy: _(d),
1052
- placement: _(h),
1053
- middlewareData: _(y),
1054
- isPositioned: _(v),
1049
+ x: q(u),
1050
+ y: q(m),
1051
+ strategy: q(d),
1052
+ placement: q(h),
1053
+ middlewareData: q(w),
1054
+ isPositioned: q(y),
1055
1055
  floatingStyles: g,
1056
- update: x
1056
+ update: v
1057
1057
  };
1058
1058
  }
1059
1059
  const hn = ["data-testid"], gn = ["id", "aria-labelledby", "aria-hidden"], Rn = /* @__PURE__ */ ne({
@@ -1062,7 +1062,9 @@ const hn = ["data-testid"], gn = ["id", "aria-labelledby", "aria-hidden"], Rn =
1062
1062
  props: {
1063
1063
  buttonAriaLabel: {},
1064
1064
  buttonBorderRadius: {},
1065
+ buttonBusy: { type: Boolean },
1065
1066
  buttonColor: { default: Dt.Secondary },
1067
+ buttonDisabled: { type: Boolean },
1066
1068
  buttonHeight: { default: "auto" },
1067
1069
  buttonSize: { default: we.Small },
1068
1070
  buttonVariant: { default: Lt.Soft },
@@ -1084,54 +1086,65 @@ const hn = ["data-testid"], gn = ["id", "aria-labelledby", "aria-hidden"], Rn =
1084
1086
  testId: { default: "clll-dropdown-menu" },
1085
1087
  zIndex: { default: 30 }
1086
1088
  },
1087
- setup(t) {
1088
- const e = t;
1089
- let n = E(), o = E();
1090
- const i = E(), l = E(), r = E(e.isOpen), s = E(e.placement), c = "clll-dropdown-menu", a = V(() => e.zIndex === "auto" || ue(e.zIndex) ? e.zIndex : e.zIndex.toString()), f = () => {
1091
- y.value ? u() : m();
1092
- }, u = () => {
1093
- r.value = !0, e?.onOpenHandler?.(), C(), mt && document.addEventListener("click", b);
1089
+ setup(t, { expose: e }) {
1090
+ const n = t;
1091
+ let o = D(), i = D();
1092
+ const s = D(), r = D(), l = D(n.isOpen), a = D(n.placement), c = "clll-dropdown-menu", f = F(() => n.zIndex === "auto" || ue(n.zIndex) ? n.zIndex : n.zIndex.toString()), u = (S) => {
1093
+ S && (o.value = S);
1094
1094
  }, m = () => {
1095
- r.value = !1, e?.onCloseHandler?.(), mt && document.removeEventListener("click", b), T(), p();
1096
- }, d = (w) => {
1097
- w && (n.value = w);
1098
- }, h = (w) => {
1099
- w && (o.value = w);
1095
+ l.value = !0, n?.onOpenHandler?.(), x(), ht && document.addEventListener("click", R);
1096
+ }, d = (S) => {
1097
+ S && (i.value = S);
1098
+ }, h = () => {
1099
+ l.value = !1, n?.onCloseHandler?.(), ht && document.removeEventListener("click", R), A(), v();
1100
+ }, w = () => {
1101
+ y.value ? p() : g();
1100
1102
  }, {
1101
1103
  open: y,
1102
- toggleDropdown: v,
1103
- closeDropdown: g,
1104
- clearEventListeners: p
1104
+ openDropdown: g,
1105
+ closeDropdown: p,
1106
+ clearEventListeners: v
1105
1107
  } = de({
1106
- triggerElem: n,
1107
- dropdownRef: l,
1108
- openDropdownHandler: f,
1109
- closeDropdownHandler: m
1110
- }), { floatingStyles: x, update: C } = mn(i, l, {
1108
+ triggerElem: o,
1109
+ dropdownRef: r,
1110
+ openDropdownHandler: m,
1111
+ closeDropdownHandler: h
1112
+ });
1113
+ e({
1114
+ close: () => {
1115
+ p(), v(), A();
1116
+ },
1117
+ open: () => {
1118
+ g();
1119
+ }
1120
+ });
1121
+ const { floatingStyles: $, update: x } = mn(s, r, {
1111
1122
  middleware: [fn(), cn(10), an()],
1112
- placement: s,
1113
- open: r,
1114
- whileElementsMounted: sn
1115
- }), b = (w) => {
1116
- r.value && l.value?.contains(w?.target) && g();
1117
- }, { clearEventListeners: T } = me({ escHandler: g, triggerElem: n });
1123
+ placement: a,
1124
+ open: l,
1125
+ whileElementsMounted: ln
1126
+ }), R = (S) => {
1127
+ l.value && r.value?.contains(S?.target) && p();
1128
+ }, { clearEventListeners: A } = me({ escHandler: p, triggerElem: o });
1118
1129
  return oe(() => {
1119
- mt && document.removeEventListener("click", b), T(), p();
1120
- }), (w, R) => (At(), St("div", {
1121
- class: dt([`${c}__menu`]),
1130
+ ht && document.removeEventListener("click", R), A(), v();
1131
+ }), (S, ft) => (Ot(), St("div", {
1132
+ class: mt([`${c}__menu`]),
1122
1133
  "data-testid": t.testId
1123
1134
  }, [
1124
- Ot(A(ae), {
1135
+ At(L(ae), {
1125
1136
  id: `${c}__toggle--${t.dropdownId}`,
1126
1137
  ref_key: "anchor",
1127
- ref: i,
1138
+ ref: s,
1128
1139
  "aria-controls": `${c}--${t.dropdownId}`,
1129
- "aria-expanded": A(r) || t.isOpen,
1140
+ "aria-expanded": L(l) || t.isOpen,
1130
1141
  "aria-label": t.buttonAriaLabel,
1131
- class: dt(`${c}__toggle`),
1142
+ busy: t.buttonBusy,
1143
+ disabled: t.buttonDisabled || t.buttonBusy,
1144
+ class: mt(`${c}__toggle`),
1132
1145
  color: t.buttonColor,
1133
1146
  "border-radius": t.buttonBorderRadius,
1134
- "forward-ref": d,
1147
+ "forward-ref": u,
1135
1148
  height: t.buttonHeight,
1136
1149
  "icon-after": t.iconAfter,
1137
1150
  "icon-before": t.iconBefore,
@@ -1141,39 +1154,39 @@ const hn = ["data-testid"], gn = ["id", "aria-labelledby", "aria-hidden"], Rn =
1141
1154
  variant: t.buttonVariant,
1142
1155
  width: t.buttonWidth,
1143
1156
  wrap: t.buttonWrapped,
1144
- onClick: A(v)
1157
+ "on-click": w
1145
1158
  }, {
1146
1159
  default: Et(() => [
1147
- re(le(t.label), 1)
1160
+ re(se(t.label), 1)
1148
1161
  ]),
1149
1162
  _: 1
1150
- }, 8, ["id", "aria-controls", "aria-expanded", "aria-label", "class", "color", "border-radius", "height", "icon-after", "icon-before", "icon-size", "size", "test-id", "variant", "width", "wrap", "onClick"]),
1151
- A(r) || t.isOpen ? (At(), St("div", {
1163
+ }, 8, ["id", "aria-controls", "aria-expanded", "aria-label", "busy", "disabled", "class", "color", "border-radius", "height", "icon-after", "icon-before", "icon-size", "size", "test-id", "variant", "width", "wrap"]),
1164
+ L(l) || t.isOpen ? (Ot(), St("div", {
1152
1165
  key: 0,
1153
1166
  id: `${c}--${t.dropdownId}`,
1154
1167
  ref_key: "dropdownElem",
1155
- ref: l,
1168
+ ref: r,
1156
1169
  "aria-labelledby": `${c}__toggle--${t.dropdownId}`,
1157
- "aria-hidden": !(A(r) || t.isOpen),
1158
- class: dt([
1170
+ "aria-hidden": !(L(l) || t.isOpen),
1171
+ class: mt([
1159
1172
  `${c}__dropdown`,
1160
- `${c}__dropdown--${A(s)}`
1173
+ `${c}__dropdown--${L(a)}`
1161
1174
  ]),
1162
- style: se({ ...A(x), zIndex: A(a) })
1175
+ style: le({ ...L($), zIndex: L(f) })
1163
1176
  }, [
1164
- Ot(A(fe), {
1177
+ At(L(fe), {
1165
1178
  bordered: t.containerBordered,
1166
1179
  "border-radius": t.containerBorderRadius,
1167
- color: A(Dt).Neutral,
1180
+ color: L(Dt).Neutral,
1168
1181
  elevated: t.containerElevated,
1169
- "forward-ref": h,
1182
+ "forward-ref": d,
1170
1183
  padded: !1,
1171
1184
  "test-id": `${c}__content`,
1172
- variant: A(Lt).Ghost,
1185
+ variant: L(Lt).Ghost,
1173
1186
  width: t.contentWidth
1174
1187
  }, {
1175
1188
  default: Et(() => [
1176
- ce(w.$slots, "content")
1189
+ ce(S.$slots, "content")
1177
1190
  ]),
1178
1191
  _: 3
1179
1192
  }, 8, ["bordered", "border-radius", "color", "elevated", "test-id", "variant", "width"])