@orangelogic/design-system 4.9.0 → 4.11.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 (26) hide show
  1. package/library/chunks/{color-swatch-group.NkrEGUbN.js → color-swatch-group.DrtI1ZzP.js} +1 -1
  2. package/library/chunks/{document-viewer.iu_c5JvE.js → document-viewer.4cyGVPa9.js} +1 -1
  3. package/library/chunks/{header.BHwN2xMS.js → header.aJgy-4Iw.js} +1 -1
  4. package/library/chunks/{index.BiyfXTj7.js → index.ComzsS1W.js} +3 -3
  5. package/library/chunks/{menu-item.Js1qz9h2.js → menu-item.BS4PnQK8.js} +1 -1
  6. package/library/chunks/{tab-group.BAZBrIdM.js → tab-group.HkalH7hh.js} +1 -1
  7. package/library/chunks/{types.CNqFN3XH.js → types.CED5gcC0.js} +12714 -12668
  8. package/library/components/atoms.js +4 -4
  9. package/library/components/color-picker.js +1 -1
  10. package/library/components/color-swatch-group.js +1 -1
  11. package/library/components/document-viewer.js +1 -1
  12. package/library/components/file-on-demand.js +1 -1
  13. package/library/components/header.js +1 -1
  14. package/library/components/menu-item.js +1 -1
  15. package/library/components/menu.js +1 -1
  16. package/library/components/organisms.js +1 -1
  17. package/library/components/popup.js +864 -887
  18. package/library/components/tab-group.js +2 -2
  19. package/library/components/types.js +6 -6
  20. package/library/components/video.js +1 -0
  21. package/library/package.json +1 -1
  22. package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +13 -0
  23. package/library/packages/organisms/src/downloader/data/core/worker/app/DownloadManager.d.ts +1 -0
  24. package/library/packages/services/src/api/asset/asset.d.ts +1 -0
  25. package/library/packages/types/src/content-builder.d.ts +2 -0
  26. package/package.json +1 -1
@@ -1,32 +1,32 @@
1
- import { a as ze, i as Vt, r as Be, x as U } from "../chunks/lit-element.jLBm65_O.js";
2
- import { n as g, C as Me } from "../chunks/lib-cortex-element.CVMmyPMC.js";
3
- import { r as Ie } from "../chunks/state.CSDxrqLd.js";
4
- import { e as Ct } from "../chunks/query.BBf1UFkC.js";
5
- import { e as He } from "../chunks/base.D76d76ww.js";
1
+ import { a as ze, i as jt, r as Be, x as W } from "../chunks/lit-element.jLBm65_O.js";
2
+ import { n as m, C as Ie } from "../chunks/lib-cortex-element.CVMmyPMC.js";
3
+ import { r as Me } from "../chunks/state.CSDxrqLd.js";
4
+ import { e as Pt } from "../chunks/query.BBf1UFkC.js";
5
+ import { e as We } from "../chunks/base.D76d76ww.js";
6
6
  import { e as ht } from "../chunks/class-map.BiVq-cVR.js";
7
- import { o as Lt } from "../chunks/if-defined.BRoBj_Rp.js";
7
+ import { o as $t } from "../chunks/if-defined.BRoBj_Rp.js";
8
8
  import { o as se } from "../chunks/style-map.llVFPd__.js";
9
- import { i as gt, p as ne, f as We, a as qe } from "../chunks/browser.BHOCIF_A.js";
9
+ import { i as gt, p as ne, f as He, a as qe } from "../chunks/browser.BHOCIF_A.js";
10
10
  import { c as ye } from "../chunks/component.styles.CAS3c9pM.js";
11
11
  import { c as Ve } from "../chunks/custom-element.L4WJXn1j.js";
12
12
  import { d as je } from "../chunks/debounce.DaHuiSGU.js";
13
13
  import { L as Ue } from "../chunks/i18n.D5L6xAYT.js";
14
- import { n as Ye } from "../chunks/when.Dr1es41R.js";
14
+ import { n as Xe } from "../chunks/when.Dr1es41R.js";
15
15
  /**
16
16
  * @license
17
17
  * Copyright 2021 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
19
  */
20
- function Ke(e) {
20
+ function Ye(e) {
21
21
  return (t, o) => {
22
- const { slot: i, selector: s } = e ?? {}, r = "slot" + (i ? `[name=${i}]` : ":not([name])");
23
- return He(t, o, { get() {
24
- const n = this.renderRoot?.querySelector(r), a = n?.assignedElements(e) ?? [];
22
+ const { slot: i, selector: s } = e ?? {}, n = "slot" + (i ? `[name=${i}]` : ":not([name])");
23
+ return We(t, o, { get() {
24
+ const r = this.renderRoot?.querySelector(n), a = r?.assignedElements(e) ?? [];
25
25
  return s === void 0 ? a : a.filter((l) => l.matches(s));
26
26
  } });
27
27
  };
28
28
  }
29
- const re = /* @__PURE__ */ new Set(), Xe = (e) => e?.startManagingContentDirection !== void 0 || e?.tagName === "SP-THEME";
29
+ const re = /* @__PURE__ */ new Set(), Ke = (e) => e?.startManagingContentDirection !== void 0 || e?.tagName === "SP-THEME";
30
30
  function Ge(e) {
31
31
  class t extends e {
32
32
  /**
@@ -36,14 +36,14 @@ function Ge(e) {
36
36
  return this.dir === "ltr";
37
37
  }
38
38
  hasVisibleFocusInTree() {
39
- const s = ((r = document) => {
40
- let n = r.activeElement;
41
- for (; n?.shadowRoot && n.shadowRoot.activeElement; )
42
- n = n.shadowRoot.activeElement;
43
- const a = n ? [n] : [];
44
- for (; n; ) {
45
- const l = n.assignedSlot || n.parentElement || n.getRootNode()?.host;
46
- l && a.push(l), n = l;
39
+ const s = ((n = document) => {
40
+ let r = n.activeElement;
41
+ for (; r?.shadowRoot && r.shadowRoot.activeElement; )
42
+ r = r.shadowRoot.activeElement;
43
+ const a = r ? [r] : [];
44
+ for (; r; ) {
45
+ const l = r.assignedSlot || r.parentElement || r.getRootNode()?.host;
46
+ l && a.push(l), r = l;
47
47
  }
48
48
  return a;
49
49
  })(this.getRootNode())[0];
@@ -58,7 +58,7 @@ function Ge(e) {
58
58
  connectedCallback() {
59
59
  if (!this.hasAttribute("dir")) {
60
60
  let i = this.assignedSlot || this.parentNode;
61
- for (; i && i !== document.documentElement && !Xe(i); )
61
+ for (; i && i !== document.documentElement && !Ke(i); )
62
62
  i = i.assignedSlot || // step into the shadow DOM of the parent of a slotted node
63
63
  i.parentNode || // DOM Element detected
64
64
  i.host;
@@ -86,21 +86,21 @@ function Qe(e, t, o) {
86
86
  const i = e.getAttribute(t);
87
87
  let s = i ? i.split(/\s+/) : [];
88
88
  s = s.filter(
89
- (r) => !o.find((n) => r === n)
89
+ (n) => !o.find((r) => n === r)
90
90
  ), s.length ? e.setAttribute(t, s.join(" ")) : e.removeAttribute(t);
91
91
  }
92
- function Nt(e, t, o) {
93
- const i = Array.isArray(o) ? o : [o], s = e.getAttribute(t), r = s ? s.split(/\s+/) : [];
94
- return i.every((a) => r.indexOf(a) > -1) ? () => {
95
- } : (r.push(...i), e.setAttribute(t, r.join(" ")), () => Qe(e, t, i));
92
+ function zt(e, t, o) {
93
+ const i = Array.isArray(o) ? o : [o], s = e.getAttribute(t), n = s ? s.split(/\s+/) : [];
94
+ return i.every((a) => n.indexOf(a) > -1) ? () => {
95
+ } : (n.push(...i), e.setAttribute(t, n.join(" ")), () => Qe(e, t, i));
96
96
  }
97
97
  function Ze(e, t) {
98
98
  customElements.get(e) || customElements.define(e, t);
99
99
  }
100
100
  function ti(e, t, o = []) {
101
101
  for (let i = 0; i < t.length; ++i) {
102
- const s = t[i], r = e[i], n = r.parentElement || r.getRootNode();
103
- o[i] && o[i](s), n && n !== r && n.replaceChild(s, r), delete e[i];
102
+ const s = t[i], n = e[i], r = n.parentElement || n.getRootNode();
103
+ o[i] && o[i](s), r && r !== n && r.replaceChild(s, n), delete e[i];
104
104
  }
105
105
  return t;
106
106
  }
@@ -111,22 +111,22 @@ const ei = (e, t, {
111
111
  let { length: s } = e;
112
112
  if (s === 0)
113
113
  return () => e;
114
- let r = 1, n = 0;
115
- (o === "afterbegin" || o === "afterend") && (r = -1, n = s - 1);
114
+ let n = 1, r = 0;
115
+ (o === "afterbegin" || o === "afterend") && (n = -1, r = s - 1);
116
116
  const a = new Array(s), l = new Array(s), c = document.createComment(
117
117
  "placeholder for reparented element"
118
118
  );
119
119
  do {
120
- const h = e[n];
121
- i && (l[n] = i(h)), a[n] = c.cloneNode();
120
+ const h = e[r];
121
+ i && (l[r] = i(h)), a[r] = c.cloneNode();
122
122
  const d = h.parentElement || h.getRootNode();
123
- d && d !== h && d.replaceChild(a[n], h), t.insertAdjacentElement(o, h), n += r;
123
+ d && d !== h && d.replaceChild(a[r], h), t.insertAdjacentElement(o, h), r += n;
124
124
  } while (--s > 0);
125
125
  return function() {
126
126
  return ti(a, e, l);
127
127
  };
128
128
  };
129
- function jt() {
129
+ function Ut() {
130
130
  return Array.from(
131
131
  crypto.getRandomValues(new Uint8Array(4)),
132
132
  (e) => `0${(e & 255).toString(16)}`.slice(-2)
@@ -141,7 +141,7 @@ const ii = [
141
141
  "select",
142
142
  "textarea",
143
143
  "[tabindex]"
144
- ], ae = ':not([tabindex="-1"])', ft = ii.join(`${ae}, `) + ae, Ut = (e) => e.querySelector(
144
+ ], ae = ':not([tabindex="-1"])', ft = ii.join(`${ae}, `) + ae, Xt = (e) => e.querySelector(
145
145
  ft
146
146
  ), Yt = (e) => e.assignedElements().find(
147
147
  (o) => o.matches(ft)
@@ -196,28 +196,28 @@ class di {
196
196
  this.cooldownTimeout && window.clearTimeout(this.cooldownTimeout), delete this.cooldownTimeout;
197
197
  }
198
198
  }
199
- const wt = new di(), it = () => {
200
- }, Xt = (e, t, o) => {
201
- const i = new AbortController(), s = /* @__PURE__ */ new Map(), r = () => {
199
+ const bt = new di(), Z = () => {
200
+ }, Gt = (e, t, o) => {
201
+ const i = new AbortController(), s = /* @__PURE__ */ new Map(), n = () => {
202
202
  i.abort(), o();
203
203
  };
204
- let n, a;
204
+ let r, a;
205
205
  const l = requestAnimationFrame(() => {
206
- n = requestAnimationFrame(() => {
206
+ r = requestAnimationFrame(() => {
207
207
  a = requestAnimationFrame(() => {
208
- r();
208
+ n();
209
209
  });
210
210
  });
211
211
  }), c = (d) => {
212
212
  d.target === e && (s.set(
213
213
  d.propertyName,
214
214
  s.get(d.propertyName) - 1
215
- ), s.get(d.propertyName) || s.delete(d.propertyName), s.size === 0 && r());
215
+ ), s.get(d.propertyName) || s.delete(d.propertyName), s.size === 0 && n());
216
216
  }, h = (d) => {
217
217
  d.target === e && (s.has(d.propertyName) || s.set(d.propertyName, 0), s.set(
218
218
  d.propertyName,
219
219
  s.get(d.propertyName) + 1
220
- ), cancelAnimationFrame(l), cancelAnimationFrame(n), cancelAnimationFrame(a));
220
+ ), cancelAnimationFrame(l), cancelAnimationFrame(r), cancelAnimationFrame(a));
221
221
  };
222
222
  e.addEventListener("transitionrun", h, {
223
223
  signal: i.signal
@@ -227,12 +227,12 @@ const wt = new di(), it = () => {
227
227
  signal: i.signal
228
228
  }), t();
229
229
  };
230
- function k() {
230
+ function L() {
231
231
  return new Promise((e) => requestAnimationFrame(() => e()));
232
232
  }
233
233
  class dt extends Je {
234
234
  constructor() {
235
- super(...arguments), this.dispose = it, this.offset = 0, this.willPreventClose = !1;
235
+ super(...arguments), this.dispose = Z, this.offset = 0, this.willPreventClose = !1;
236
236
  }
237
237
  async applyFocus(t, o) {
238
238
  }
@@ -308,38 +308,38 @@ class dt extends Je {
308
308
  document.dispatchEvent(t);
309
309
  }
310
310
  static async open(t, o, i, s) {
311
- await Promise.resolve().then(() => Fe);
312
- const r = arguments.length === 2, n = i || t, a = new this();
311
+ await Promise.resolve().then(() => _e);
312
+ const n = arguments.length === 2, r = i || t, a = new this();
313
313
  let l = !1;
314
314
  a.dispose = () => {
315
315
  a.addEventListener("cx-closed", () => {
316
316
  l || (c(), l = !0), requestAnimationFrame(() => {
317
317
  a.remove();
318
318
  });
319
- }), a.open = !1, a.dispose = it;
319
+ }), a.open = !1, a.dispose = Z;
320
320
  };
321
- const c = ei([n], a, {
321
+ const c = ei([r], a, {
322
322
  position: "beforeend",
323
- prepareCallback: (u) => {
324
- const p = u.slot;
325
- return u.removeAttribute("slot"), () => {
326
- u.slot = p;
323
+ prepareCallback: (p) => {
324
+ const u = p.slot;
325
+ return p.removeAttribute("slot"), () => {
326
+ p.slot = u;
327
327
  };
328
328
  }
329
329
  });
330
- if (!r && n && s) {
331
- const u = t, p = o, f = s;
330
+ if (!n && r && s) {
331
+ const p = t, u = o, f = s;
332
332
  return dt.applyOptions(a, {
333
333
  ...f,
334
- delayed: f.delayed || n.hasAttribute("delayed"),
335
- trigger: f.virtualTrigger || u,
336
- type: p === "modal" ? "modal" : p === "hover" ? "hint" : "auto"
337
- }), u.insertAdjacentElement("afterend", a), await a.updateComplete, a.open = !0, a.dispose;
334
+ delayed: f.delayed || r.hasAttribute("delayed"),
335
+ trigger: f.virtualTrigger || p,
336
+ type: u === "modal" ? "modal" : u === "hover" ? "hint" : "auto"
337
+ }), p.insertAdjacentElement("afterend", a), await a.updateComplete, a.open = !0, a.dispose;
338
338
  }
339
339
  const d = o;
340
- return a.append(n), dt.applyOptions(a, {
340
+ return a.append(r), dt.applyOptions(a, {
341
341
  ...d,
342
- delayed: d.delayed || n.hasAttribute("delayed")
342
+ delayed: d.delayed || r.hasAttribute("delayed")
343
343
  }), a.updateComplete.then(() => {
344
344
  a.open = !0;
345
345
  }), a;
@@ -353,17 +353,17 @@ class pi {
353
353
  constructor(t, { selector: o } = { selector: "" }) {
354
354
  this._element = null, this._selector = "", this.mutationCallback = (i) => {
355
355
  let s = !1;
356
- i.forEach((r) => {
356
+ i.forEach((n) => {
357
357
  if (!s) {
358
- if (r.type === "childList") {
359
- const n = this.element && [...r.removedNodes].includes(this.element), a = !!this.selector && [...r.addedNodes].some(
358
+ if (n.type === "childList") {
359
+ const r = this.element && [...n.removedNodes].includes(this.element), a = !!this.selector && [...n.addedNodes].some(
360
360
  this.elementIsSelected
361
361
  );
362
- s = s || n || a;
362
+ s = s || r || a;
363
363
  }
364
- if (r.type === "attributes") {
365
- const n = r.target === this.element, a = !!this.selector && this.elementIsSelected(r.target);
366
- s = s || n || a;
364
+ if (n.type === "attributes") {
365
+ const r = n.target === this.element, a = !!this.selector && this.elementIsSelected(n.target);
366
+ s = s || r || a;
367
367
  }
368
368
  }
369
369
  }), s && this.resolveElement();
@@ -412,7 +412,7 @@ class pi {
412
412
  this.element = null;
413
413
  }
414
414
  }
415
- class Gt extends Event {
415
+ class Jt extends Event {
416
416
  constructor() {
417
417
  super("beforetoggle", {
418
418
  bubbles: !1,
@@ -420,7 +420,7 @@ class Gt extends Event {
420
420
  }), this.currentState = "open", this.newState = "closed";
421
421
  }
422
422
  }
423
- class Jt extends Event {
423
+ class Qt extends Event {
424
424
  constructor() {
425
425
  super("beforetoggle", {
426
426
  bubbles: !1,
@@ -428,22 +428,22 @@ class Jt extends Event {
428
428
  }), this.currentState = "closed", this.newState = "open";
429
429
  }
430
430
  }
431
- class _ extends Event {
431
+ class F extends Event {
432
432
  constructor(t, o, {
433
433
  interaction: i,
434
434
  publish: s,
435
- reason: r
435
+ reason: n
436
436
  }) {
437
437
  super(t, {
438
438
  bubbles: s,
439
439
  composed: s
440
440
  }), this.overlay = o, this.detail = {
441
441
  interaction: i,
442
- reason: r
442
+ reason: n
443
443
  };
444
444
  }
445
445
  }
446
- class Ot {
446
+ class Ct {
447
447
  constructor(t, o) {
448
448
  this.x = 0, this.y = 0, this.x = t, this.y = o;
449
449
  }
@@ -477,7 +477,7 @@ function ui(e) {
477
477
  }
478
478
  async dialogMakeTransition(i) {
479
479
  let s = null;
480
- const r = (a, l) => async () => {
480
+ const n = (a, l) => async () => {
481
481
  if (a.open = i, !i) {
482
482
  const h = () => {
483
483
  a.removeEventListener("close", h);
@@ -486,17 +486,17 @@ function ui(e) {
486
486
  }
487
487
  if (l > 0)
488
488
  return;
489
- const c = i ? Jt : Gt;
490
- this.dispatchEvent(new c()), i && (a.matches(ft) && (s = a), s = s || Ut(a), s || a.querySelectorAll("slot").forEach((d) => {
489
+ const c = i ? Qt : Jt;
490
+ this.dispatchEvent(new c()), i && (a.matches(ft) && (s = a), s = s || Xt(a), s || a.querySelectorAll("slot").forEach((d) => {
491
491
  s || (s = Yt(d));
492
492
  }), !(!this.isConnected || this.dialogEl.open) && this.dialogEl.showModal());
493
- }, n = (a, l) => () => {
493
+ }, r = (a, l) => () => {
494
494
  if (this.open !== i)
495
495
  return;
496
496
  const c = i ? "cx-opened" : "cx-closed";
497
497
  if (l > 0) {
498
498
  a.dispatchEvent(
499
- new _(c, this, {
499
+ new F(c, this, {
500
500
  interaction: this.type,
501
501
  publish: !1
502
502
  })
@@ -506,23 +506,23 @@ function ui(e) {
506
506
  if (!this.isConnected || i !== this.open)
507
507
  return;
508
508
  const h = async () => {
509
- const d = this.triggerElement instanceof Ot;
509
+ const d = this.triggerElement instanceof Ct;
510
510
  this.dispatchEvent(
511
- new _(c, this, {
511
+ new F(c, this, {
512
512
  interaction: this.type,
513
513
  publish: d
514
514
  })
515
515
  ), a.dispatchEvent(
516
- new _(c, this, {
516
+ new F(c, this, {
517
517
  interaction: this.type,
518
518
  publish: !1
519
519
  })
520
520
  ), this.triggerElement && !d && this.triggerElement.dispatchEvent(
521
- new _(c, this, {
521
+ new F(c, this, {
522
522
  interaction: this.type,
523
523
  publish: !0
524
524
  })
525
- ), this.state = i ? "opened" : "closed", this.returnFocus(), await k(), await k(), i === this.open && i === !1 && this.requestSlottable();
525
+ ), this.state = i ? "opened" : "closed", this.returnFocus(), await L(), await L(), i === this.open && i === !1 && this.requestSlottable();
526
526
  };
527
527
  !i && this.dialogEl.open ? (this.dialogEl.addEventListener(
528
528
  "close",
@@ -533,7 +533,7 @@ function ui(e) {
533
533
  ), this.dialogEl.close()) : h();
534
534
  };
535
535
  return this.elements.forEach((a, l) => {
536
- Xt(a, r(a, l), n(a, l));
536
+ Gt(a, n(a, l), r(a, l));
537
537
  }), s;
538
538
  }
539
539
  async dialogApplyFocus(i, s) {
@@ -549,10 +549,10 @@ function fi(e) {
549
549
  }
550
550
  async manageDelay(i) {
551
551
  if (i === !1 || i !== this.open) {
552
- wt.close(this);
552
+ bt.close(this);
553
553
  return;
554
554
  }
555
- this.delayed && await wt.openTimer(this) && (this.open = !i);
555
+ this.delayed && await bt.openTimer(this) && (this.open = !i);
556
556
  }
557
557
  async ensureOnDOM(i) {
558
558
  document.body.offsetHeight;
@@ -561,49 +561,49 @@ function fi(e) {
561
561
  if (this.open !== i)
562
562
  return null;
563
563
  let s = null;
564
- const r = (a, l) => () => {
564
+ const n = (a, l) => () => {
565
565
  if (i !== this.open)
566
566
  return;
567
567
  if (a.open = i, l === 0) {
568
- const h = i ? Jt : Gt;
568
+ const h = i ? Qt : Jt;
569
569
  this.dispatchEvent(new h());
570
570
  }
571
- if (i !== !0 || (a.matches(ft) && (s = a), s = s || Ut(a), s))
571
+ if (i !== !0 || (a.matches(ft) && (s = a), s = s || Xt(a), s))
572
572
  return;
573
573
  a.querySelectorAll("slot").forEach((h) => {
574
574
  s || (s = Yt(h));
575
575
  });
576
- }, n = (a, l) => async () => {
576
+ }, r = (a, l) => async () => {
577
577
  if (this.open !== i)
578
578
  return;
579
579
  const c = i ? "cx-opened" : "cx-closed";
580
580
  if (a.dispatchEvent(
581
- new _(c, this, {
581
+ new F(c, this, {
582
582
  interaction: this.type
583
583
  })
584
584
  ), l > 0)
585
585
  return;
586
- const h = this.triggerElement instanceof Ot;
586
+ const h = this.triggerElement instanceof Ct;
587
587
  this.dispatchEvent(
588
- new _(c, this, {
588
+ new F(c, this, {
589
589
  interaction: this.type,
590
590
  publish: h
591
591
  })
592
592
  ), this.triggerElement && !h && this.triggerElement.dispatchEvent(
593
- new _(c, this, {
593
+ new F(c, this, {
594
594
  interaction: this.type,
595
595
  publish: !0
596
596
  })
597
- ), this.state = i ? "opened" : "closed", this.returnFocus(), await k(), await k(), i === this.open && i === !1 && this.requestSlottable();
597
+ ), this.state = i ? "opened" : "closed", this.returnFocus(), await L(), await L(), i === this.open && i === !1 && this.requestSlottable();
598
598
  };
599
599
  return this.elements.forEach((a, l) => {
600
- Xt(a, r(a, l), n(a, l));
600
+ Gt(a, n(a, l), r(a, l));
601
601
  }), s;
602
602
  }
603
603
  }
604
604
  return t;
605
605
  }
606
- const mi = CSS.supports("(overlay: auto)");
606
+ const gi = CSS.supports("(overlay: auto)");
607
607
  function kt(e) {
608
608
  let t = !1;
609
609
  try {
@@ -617,17 +617,17 @@ function kt(e) {
617
617
  }
618
618
  return t || o;
619
619
  }
620
- function gi(e) {
620
+ function mi(e) {
621
621
  class t extends e {
622
622
  constructor(...i) {
623
623
  super(...i), this.handleFullscreenChange = this.handleFullscreenChange.bind(this);
624
624
  }
625
625
  async manageDelay(i) {
626
626
  if (i === !1 || i !== this.open) {
627
- wt.close(this);
627
+ bt.close(this);
628
628
  return;
629
629
  }
630
- this.delayed && await wt.openTimer(this) && (this.open = !i);
630
+ this.delayed && await bt.openTimer(this) && (this.open = !i);
631
631
  }
632
632
  /**
633
633
  * A popover should be hidden _after_ it is no longer on top-layer because
@@ -637,9 +637,9 @@ function gi(e) {
637
637
  if (i && this.open !== i)
638
638
  return;
639
639
  const s = async ({
640
- newState: r
640
+ newState: n
641
641
  } = {}) => {
642
- r !== "open" && await this.placementController.resetOverlayPosition();
642
+ n !== "open" && await this.placementController.resetOverlayPosition();
643
643
  };
644
644
  if (!kt(this.dialogEl)) {
645
645
  s();
@@ -655,18 +655,18 @@ function gi(e) {
655
655
  s = this.dialogEl.matches(":popover-open");
656
656
  } catch {
657
657
  }
658
- let r = !1;
658
+ let n = !1;
659
659
  try {
660
- r = this.dialogEl.matches(":open");
660
+ n = this.dialogEl.matches(":open");
661
661
  } catch {
662
662
  }
663
- i && this.open === i && !s && !r && this.isConnected && (this.dialogEl.showPopover(), await this.managePosition());
663
+ i && this.open === i && !s && !n && this.isConnected && (this.dialogEl.showPopover(), await this.managePosition());
664
664
  }
665
665
  handleFullscreenChange() {
666
666
  kt(this.dialogEl) && (this.dialogEl.hidePopover(), this.dialogEl.showPopover());
667
667
  }
668
668
  firstUpdated(i) {
669
- super.firstUpdated(i), gt() && k().then(() => {
669
+ super.firstUpdated(i), gt() && L().then(() => {
670
670
  this.dialogEl.showPopover();
671
671
  });
672
672
  }
@@ -680,29 +680,29 @@ function gi(e) {
680
680
  );
681
681
  }
682
682
  async ensureOnDOM(i) {
683
- await k(), mi || await this.shouldHidePopover(i), await this.shouldShowPopover(i), await k();
683
+ await L(), gi || await this.shouldHidePopover(i), await this.shouldShowPopover(i), await L();
684
684
  }
685
685
  async makeTransition(i) {
686
686
  if (this.open !== i)
687
687
  return null;
688
688
  let s = null;
689
- const r = (a, l) => () => {
689
+ const n = (a, l) => () => {
690
690
  if (a.open = i, l === 0) {
691
- const h = i ? Jt : Gt;
691
+ const h = i ? Qt : Jt;
692
692
  this.dispatchEvent(new h());
693
693
  }
694
- if (!i || (a.matches(ft) && (s = a), s = s || Ut(a), s))
694
+ if (!i || (a.matches(ft) && (s = a), s = s || Xt(a), s))
695
695
  return;
696
696
  a.querySelectorAll("slot").forEach((h) => {
697
697
  s || (s = Yt(h));
698
698
  });
699
- }, n = (a, l) => async () => {
699
+ }, r = (a, l) => async () => {
700
700
  if (this.open !== i)
701
701
  return;
702
702
  const c = i ? "cx-opened" : "cx-closed";
703
703
  if (l > 0) {
704
704
  a.dispatchEvent(
705
- new _(c, this, {
705
+ new F(c, this, {
706
706
  interaction: this.type,
707
707
  publish: !1
708
708
  })
@@ -712,24 +712,24 @@ function gi(e) {
712
712
  const h = async () => {
713
713
  if (this.open !== i)
714
714
  return;
715
- await k();
716
- const u = this.triggerElement instanceof Ot;
715
+ await L();
716
+ const p = this.triggerElement instanceof Ct;
717
717
  this.dispatchEvent(
718
- new _(c, this, {
718
+ new F(c, this, {
719
719
  interaction: this.type,
720
- publish: u
720
+ publish: p
721
721
  })
722
722
  ), a.dispatchEvent(
723
- new _(c, this, {
723
+ new F(c, this, {
724
724
  interaction: this.type,
725
725
  publish: !1
726
726
  })
727
- ), this.triggerElement && !u && this.triggerElement.dispatchEvent(
728
- new _(c, this, {
727
+ ), this.triggerElement && !p && this.triggerElement.dispatchEvent(
728
+ new F(c, this, {
729
729
  interaction: this.type,
730
730
  publish: !0
731
731
  })
732
- ), this.state = i ? "opened" : "closed", this.returnFocus(), await k(), await k(), i === this.open && i === !1 && this.requestSlottable();
732
+ ), this.state = i ? "opened" : "closed", this.returnFocus(), await L(), await L(), i === this.open && i === !1 && this.requestSlottable();
733
733
  };
734
734
  if (this.open !== i)
735
735
  return;
@@ -743,7 +743,7 @@ function gi(e) {
743
743
  ), gt() || this.dialogEl.hidePopover()) : h();
744
744
  };
745
745
  return this.elements.forEach((a, l) => {
746
- Xt(a, r(a, l), n(a, l));
746
+ Gt(a, n(a, l), r(a, l));
747
747
  }), s;
748
748
  }
749
749
  }
@@ -758,20 +758,20 @@ class vi {
758
758
  const t = this.pointerdownPath;
759
759
  if (this.pointerdownPath = void 0, !this.stack.length || !t?.length)
760
760
  return;
761
- const o = this.stack.length - 1, i = this.stack.filter((s, r) => !t.find(
761
+ const o = this.stack.length - 1, i = this.stack.filter((s, n) => !t.find(
762
762
  (a) => (
763
763
  // The Overlay is in the stack
764
764
  a === s || // The Overlay trigger is in the stack and the Overlay is a "hint"
765
765
  a === s?.triggerElement && s?.type === "hint" || // The last Overlay in the stack is not the last Overlay at `pointerdown` time and has a
766
766
  // `triggerInteraction` of "longpress", meaning it was opened by this poitner interaction
767
- r === o && s !== this.lastOverlay && s.triggerInteraction === "longpress"
767
+ n === o && s !== this.lastOverlay && s.triggerInteraction === "longpress"
768
768
  )
769
769
  ) && !s.shouldPreventClose() && s.type !== "manual");
770
770
  i.reverse(), i.forEach((s) => {
771
771
  this.closeOverlay(s);
772
- let r = s.parentOverlayToForceClose;
773
- for (; r; )
774
- this.closeOverlay(r), r = r.parentOverlayToForceClose;
772
+ let n = s.parentOverlayToForceClose;
773
+ for (; n; )
774
+ this.closeOverlay(n), n = n.parentOverlayToForceClose;
775
775
  });
776
776
  }, this.handleBeforetoggle = (t) => {
777
777
  const { newState: o, target: i } = t;
@@ -830,9 +830,9 @@ class vi {
830
830
  t.addEventListener(
831
831
  o,
832
832
  (s) => {
833
- const r = s.composedPath();
834
- this.stack.forEach((n) => {
835
- !r.find((l) => l === n) && n.type !== "manual" && this.closeOverlay(n);
833
+ const n = s.composedPath();
834
+ this.stack.forEach((r) => {
835
+ !n.find((l) => l === r) && r.type !== "manual" && this.closeOverlay(r);
836
836
  });
837
837
  },
838
838
  { once: !0 }
@@ -856,7 +856,7 @@ class vi {
856
856
  this.closeOverlay(t);
857
857
  }
858
858
  }
859
- const le = new vi(), bi = ["top", "right", "bottom", "left"], Q = Math.min, T = Math.max, xt = Math.round, yt = Math.floor, H = (e) => ({
859
+ const le = new vi(), bi = ["top", "right", "bottom", "left"], Y = Math.min, V = Math.max, wt = Math.round, mt = Math.floor, j = (e) => ({
860
860
  x: e,
861
861
  y: e
862
862
  }), wi = {
@@ -864,87 +864,85 @@ const le = new vi(), bi = ["top", "right", "bottom", "left"], Q = Math.min, T =
864
864
  right: "left",
865
865
  bottom: "top",
866
866
  top: "bottom"
867
- }, xi = {
868
- start: "end",
869
- end: "start"
870
867
  };
871
- function _t(e, t, o) {
872
- return T(e, Q(t, o));
868
+ function be(e, t, o) {
869
+ return V(e, Y(t, o));
873
870
  }
874
- function st(e, t) {
871
+ function ot(e, t) {
875
872
  return typeof e == "function" ? e(t) : e;
876
873
  }
877
- function Z(e) {
874
+ function tt(e) {
878
875
  return e.split("-")[0];
879
876
  }
880
- function at(e) {
877
+ function nt(e) {
881
878
  return e.split("-")[1];
882
879
  }
883
- function be(e) {
880
+ function we(e) {
884
881
  return e === "x" ? "y" : "x";
885
882
  }
886
- function Qt(e) {
883
+ function Zt(e) {
887
884
  return e === "y" ? "height" : "width";
888
885
  }
889
- const Ei = /* @__PURE__ */ new Set(["top", "bottom"]);
890
- function Y(e) {
891
- return Ei.has(Z(e)) ? "y" : "x";
886
+ function H(e) {
887
+ const t = e[0];
888
+ return t === "t" || t === "b" ? "y" : "x";
892
889
  }
893
- function Zt(e) {
894
- return be(Y(e));
890
+ function te(e) {
891
+ return we(H(e));
895
892
  }
896
- function Pi(e, t, o) {
893
+ function Ei(e, t, o) {
897
894
  o === void 0 && (o = !1);
898
- const i = at(e), s = Zt(e), r = Qt(s);
899
- let n = s === "x" ? i === (o ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
900
- return t.reference[r] > t.floating[r] && (n = Et(n)), [n, Et(n)];
895
+ const i = nt(e), s = te(e), n = Zt(s);
896
+ let r = s === "x" ? i === (o ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
897
+ return t.reference[n] > t.floating[n] && (r = Et(r)), [r, Et(r)];
901
898
  }
902
- function Ci(e) {
899
+ function xi(e) {
903
900
  const t = Et(e);
904
- return [zt(e), t, zt(t)];
901
+ return [Bt(e), t, Bt(t)];
905
902
  }
906
- function zt(e) {
907
- return e.replace(/start|end/g, (t) => xi[t]);
903
+ function Bt(e) {
904
+ return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
908
905
  }
909
- const ce = ["left", "right"], he = ["right", "left"], Oi = ["top", "bottom"], Ai = ["bottom", "top"];
910
- function Si(e, t, o) {
906
+ const ce = ["left", "right"], he = ["right", "left"], Pi = ["top", "bottom"], Ci = ["bottom", "top"];
907
+ function Oi(e, t, o) {
911
908
  switch (e) {
912
909
  case "top":
913
910
  case "bottom":
914
911
  return o ? t ? he : ce : t ? ce : he;
915
912
  case "left":
916
913
  case "right":
917
- return t ? Oi : Ai;
914
+ return t ? Pi : Ci;
918
915
  default:
919
916
  return [];
920
917
  }
921
918
  }
922
- function Ri(e, t, o, i) {
923
- const s = at(e);
924
- let r = Si(Z(e), o === "start", i);
925
- return s && (r = r.map((n) => n + "-" + s), t && (r = r.concat(r.map(zt)))), r;
919
+ function Ai(e, t, o, i) {
920
+ const s = nt(e);
921
+ let n = Oi(tt(e), o === "start", i);
922
+ return s && (n = n.map((r) => r + "-" + s), t && (n = n.concat(n.map(Bt)))), n;
926
923
  }
927
924
  function Et(e) {
928
- return e.replace(/left|right|bottom|top/g, (t) => wi[t]);
925
+ const t = tt(e);
926
+ return wi[t] + e.slice(t.length);
929
927
  }
930
- function Ti(e) {
928
+ function Ri(e) {
929
+ var t, o, i, s;
931
930
  return {
932
- top: 0,
933
- right: 0,
934
- bottom: 0,
935
- left: 0,
936
- ...e
931
+ top: (t = e.top) != null ? t : 0,
932
+ right: (o = e.right) != null ? o : 0,
933
+ bottom: (i = e.bottom) != null ? i : 0,
934
+ left: (s = e.left) != null ? s : 0
937
935
  };
938
936
  }
939
- function we(e) {
940
- return typeof e != "number" ? Ti(e) : {
937
+ function Ee(e) {
938
+ return typeof e != "number" ? Ri(e) : {
941
939
  top: e,
942
940
  right: e,
943
941
  bottom: e,
944
942
  left: e
945
943
  };
946
944
  }
947
- function Pt(e) {
945
+ function xt(e) {
948
946
  const {
949
947
  x: t,
950
948
  y: o,
@@ -967,156 +965,149 @@ function de(e, t, o) {
967
965
  reference: i,
968
966
  floating: s
969
967
  } = e;
970
- const r = Y(t), n = Zt(t), a = Qt(n), l = Z(t), c = r === "y", h = i.x + i.width / 2 - s.width / 2, d = i.y + i.height / 2 - s.height / 2, u = i[a] / 2 - s[a] / 2;
971
- let p;
968
+ const n = H(t), r = te(t), a = Zt(r), l = tt(t), c = n === "y", h = i.x + i.width / 2 - s.width / 2, d = i.y + i.height / 2 - s.height / 2, p = i[a] / 2 - s[a] / 2;
969
+ let u;
972
970
  switch (l) {
973
971
  case "top":
974
- p = {
972
+ u = {
975
973
  x: h,
976
974
  y: i.y - s.height
977
975
  };
978
976
  break;
979
977
  case "bottom":
980
- p = {
978
+ u = {
981
979
  x: h,
982
980
  y: i.y + i.height
983
981
  };
984
982
  break;
985
983
  case "right":
986
- p = {
984
+ u = {
987
985
  x: i.x + i.width,
988
986
  y: d
989
987
  };
990
988
  break;
991
989
  case "left":
992
- p = {
990
+ u = {
993
991
  x: i.x - s.width,
994
992
  y: d
995
993
  };
996
994
  break;
997
995
  default:
998
- p = {
996
+ u = {
999
997
  x: i.x,
1000
998
  y: i.y
1001
999
  };
1002
1000
  }
1003
- switch (at(t)) {
1004
- case "start":
1005
- p[n] -= u * (o && c ? -1 : 1);
1006
- break;
1007
- case "end":
1008
- p[n] += u * (o && c ? -1 : 1);
1009
- break;
1010
- }
1011
- return p;
1001
+ const f = nt(t);
1002
+ return f && (u[r] += p * (f === "end" ? 1 : -1) * (o && c ? -1 : 1)), u;
1003
+ }
1004
+ async function Si(e, t) {
1005
+ var o;
1006
+ t === void 0 && (t = {});
1007
+ const {
1008
+ x: i,
1009
+ y: s,
1010
+ platform: n,
1011
+ rects: r,
1012
+ elements: a,
1013
+ strategy: l
1014
+ } = e, {
1015
+ boundary: c = "clippingAncestors",
1016
+ rootBoundary: h = "viewport",
1017
+ elementContext: d = "floating",
1018
+ altBoundary: p = !1,
1019
+ padding: u = 0
1020
+ } = ot(t, e), f = Ee(u), y = a[p ? d === "floating" ? "reference" : "floating" : d], v = xt(await n.getClippingRect({
1021
+ element: (o = await (n.isElement == null ? void 0 : n.isElement(y))) == null || o ? y : y.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(a.floating)),
1022
+ boundary: c,
1023
+ rootBoundary: h,
1024
+ strategy: l
1025
+ })), E = d === "floating" ? {
1026
+ x: i,
1027
+ y: s,
1028
+ width: r.floating.width,
1029
+ height: r.floating.height
1030
+ } : r.reference, x = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(a.floating)), P = await (n.isElement == null ? void 0 : n.isElement(x)) && await (n.getScale == null ? void 0 : n.getScale(x)) || {
1031
+ x: 1,
1032
+ y: 1
1033
+ }, S = xt(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
1034
+ elements: a,
1035
+ rect: E,
1036
+ offsetParent: x,
1037
+ strategy: l
1038
+ }) : E);
1039
+ return {
1040
+ top: (v.top - S.top + f.top) / P.y,
1041
+ bottom: (S.bottom - v.bottom + f.bottom) / P.y,
1042
+ left: (v.left - S.left + f.left) / P.x,
1043
+ right: (S.right - v.right + f.right) / P.x
1044
+ };
1012
1045
  }
1013
- const Di = async (e, t, o) => {
1046
+ const Ti = 50, Di = async (e, t, o) => {
1014
1047
  const {
1015
1048
  placement: i = "bottom",
1016
1049
  strategy: s = "absolute",
1017
- middleware: r = [],
1018
- platform: n
1019
- } = o, a = r.filter(Boolean), l = await (n.isRTL == null ? void 0 : n.isRTL(t));
1020
- let c = await n.getElementRects({
1050
+ middleware: n = [],
1051
+ platform: r
1052
+ } = o, a = r.detectOverflow ? r : {
1053
+ ...r,
1054
+ detectOverflow: Si
1055
+ }, l = await (r.isRTL == null ? void 0 : r.isRTL(t));
1056
+ let c = await r.getElementRects({
1021
1057
  reference: e,
1022
1058
  floating: t,
1023
1059
  strategy: s
1024
1060
  }), {
1025
1061
  x: h,
1026
1062
  y: d
1027
- } = de(c, i, l), u = i, p = {}, f = 0;
1028
- for (let m = 0; m < a.length; m++) {
1063
+ } = de(c, i, l), p = i, u = 0;
1064
+ const f = {};
1065
+ for (let g = 0; g < n.length; g++) {
1066
+ const y = n[g];
1067
+ if (!y)
1068
+ continue;
1029
1069
  const {
1030
- name: y,
1031
- fn: v
1032
- } = a[m], {
1070
+ name: v,
1071
+ fn: E
1072
+ } = y, {
1033
1073
  x,
1034
- y: E,
1035
- data: C,
1036
- reset: P
1037
- } = await v({
1074
+ y: P,
1075
+ data: S,
1076
+ reset: C
1077
+ } = await E({
1038
1078
  x: h,
1039
1079
  y: d,
1040
1080
  initialPlacement: i,
1041
- placement: u,
1081
+ placement: p,
1042
1082
  strategy: s,
1043
- middlewareData: p,
1083
+ middlewareData: f,
1044
1084
  rects: c,
1045
- platform: n,
1085
+ platform: a,
1046
1086
  elements: {
1047
1087
  reference: e,
1048
1088
  floating: t
1049
1089
  }
1050
1090
  });
1051
- h = x ?? h, d = E ?? d, p = {
1052
- ...p,
1053
- [y]: {
1054
- ...p[y],
1055
- ...C
1056
- }
1057
- }, P && f <= 50 && (f++, typeof P == "object" && (P.placement && (u = P.placement), P.rects && (c = P.rects === !0 ? await n.getElementRects({
1091
+ h = x ?? h, d = P ?? d, f[v] = {
1092
+ ...f[v],
1093
+ ...S
1094
+ }, C && u < Ti && (u++, typeof C == "object" && (C.placement && (p = C.placement), C.rects && (c = C.rects === !0 ? await r.getElementRects({
1058
1095
  reference: e,
1059
1096
  floating: t,
1060
1097
  strategy: s
1061
- }) : P.rects), {
1098
+ }) : C.rects), {
1062
1099
  x: h,
1063
1100
  y: d
1064
- } = de(c, u, l)), m = -1);
1101
+ } = de(c, p, l)), g = -1);
1065
1102
  }
1066
1103
  return {
1067
1104
  x: h,
1068
1105
  y: d,
1069
- placement: u,
1106
+ placement: p,
1070
1107
  strategy: s,
1071
- middlewareData: p
1108
+ middlewareData: f
1072
1109
  };
1073
- };
1074
- async function pt(e, t) {
1075
- var o;
1076
- t === void 0 && (t = {});
1077
- const {
1078
- x: i,
1079
- y: s,
1080
- platform: r,
1081
- rects: n,
1082
- elements: a,
1083
- strategy: l
1084
- } = e, {
1085
- boundary: c = "clippingAncestors",
1086
- rootBoundary: h = "viewport",
1087
- elementContext: d = "floating",
1088
- altBoundary: u = !1,
1089
- padding: p = 0
1090
- } = st(t, e), f = we(p), y = a[u ? d === "floating" ? "reference" : "floating" : d], v = Pt(await r.getClippingRect({
1091
- element: (o = await (r.isElement == null ? void 0 : r.isElement(y))) == null || o ? y : y.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
1092
- boundary: c,
1093
- rootBoundary: h,
1094
- strategy: l
1095
- })), x = d === "floating" ? {
1096
- x: i,
1097
- y: s,
1098
- width: n.floating.width,
1099
- height: n.floating.height
1100
- } : n.reference, E = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), C = await (r.isElement == null ? void 0 : r.isElement(E)) ? await (r.getScale == null ? void 0 : r.getScale(E)) || {
1101
- x: 1,
1102
- y: 1
1103
- } : {
1104
- x: 1,
1105
- y: 1
1106
- }, P = Pt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
1107
- elements: a,
1108
- rect: x,
1109
- offsetParent: E,
1110
- strategy: l
1111
- }) : x);
1112
- return {
1113
- top: (v.top - P.top + f.top) / C.y,
1114
- bottom: (P.bottom - v.bottom + f.bottom) / C.y,
1115
- left: (v.left - P.left + f.left) / C.x,
1116
- right: (P.right - v.right + f.right) / C.x
1117
- };
1118
- }
1119
- const Li = (e) => ({
1110
+ }, Li = (e) => ({
1120
1111
  name: "arrow",
1121
1112
  options: e,
1122
1113
  async fn(t) {
@@ -1124,36 +1115,36 @@ const Li = (e) => ({
1124
1115
  x: o,
1125
1116
  y: i,
1126
1117
  placement: s,
1127
- rects: r,
1128
- platform: n,
1118
+ rects: n,
1119
+ platform: r,
1129
1120
  elements: a,
1130
1121
  middlewareData: l
1131
1122
  } = t, {
1132
1123
  element: c,
1133
1124
  padding: h = 0
1134
- } = st(e, t) || {};
1125
+ } = ot(e, t) || {};
1135
1126
  if (c == null)
1136
1127
  return {};
1137
- const d = we(h), u = {
1128
+ const d = Ee(h), p = {
1138
1129
  x: o,
1139
1130
  y: i
1140
- }, p = Zt(s), f = Qt(p), m = await n.getDimensions(c), y = p === "y", v = y ? "top" : "left", x = y ? "bottom" : "right", E = y ? "clientHeight" : "clientWidth", C = r.reference[f] + r.reference[p] - u[p] - r.floating[f], P = u[p] - r.reference[p], $ = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(c));
1141
- let A = $ ? $[E] : 0;
1142
- (!A || !await (n.isElement == null ? void 0 : n.isElement($))) && (A = a.floating[E] || r.floating[f]);
1143
- const V = C / 2 - P / 2, M = A / 2 - m[f] / 2 - 1, L = Q(d[v], M), X = Q(d[x], M), I = L, G = A - m[f] - X, R = A / 2 - m[f] / 2 + V, et = _t(I, R, G), j = !l.arrow && at(s) != null && R !== et && r.reference[f] / 2 - (R < I ? L : X) - m[f] / 2 < 0, F = j ? R < I ? R - I : R - G : 0;
1131
+ }, u = te(s), f = Zt(u), g = await r.getDimensions(c), y = u === "y", v = y ? "top" : "left", E = y ? "bottom" : "right", x = y ? "clientHeight" : "clientWidth", P = n.reference[f] + n.reference[u] - p[u] - n.floating[f], S = p[u] - n.reference[u], C = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
1132
+ let T = C ? C[x] : 0;
1133
+ (!T || !await (r.isElement == null ? void 0 : r.isElement(C))) && (T = a.floating[x] || n.floating[f]);
1134
+ const $ = P / 2 - S / 2, N = T / 2 - g[f] / 2 - 1, A = Y(d[v], N), at = Y(d[E], N), lt = T - g[f] - at, z = T / 2 - g[f] / 2 + $, k = be(A, z, lt), G = !l.arrow && nt(s) != null && z !== k && n.reference[f] / 2 - (z < A ? A : at) - g[f] / 2 < 0, M = G ? z < A ? z - A : z - lt : 0;
1144
1135
  return {
1145
- [p]: u[p] + F,
1136
+ [u]: p[u] + M,
1146
1137
  data: {
1147
- [p]: et,
1148
- centerOffset: R - et - F,
1149
- ...j && {
1150
- alignmentOffset: F
1138
+ [u]: k,
1139
+ centerOffset: z - k - M,
1140
+ ...G && {
1141
+ alignmentOffset: M
1151
1142
  }
1152
1143
  },
1153
- reset: j
1144
+ reset: G
1154
1145
  };
1155
1146
  }
1156
- }), ki = function(e) {
1147
+ }), $i = function(e) {
1157
1148
  return e === void 0 && (e = {}), {
1158
1149
  name: "flip",
1159
1150
  options: e,
@@ -1161,73 +1152,73 @@ const Li = (e) => ({
1161
1152
  var o, i;
1162
1153
  const {
1163
1154
  placement: s,
1164
- middlewareData: r,
1165
- rects: n,
1155
+ middlewareData: n,
1156
+ rects: r,
1166
1157
  initialPlacement: a,
1167
1158
  platform: l,
1168
1159
  elements: c
1169
1160
  } = t, {
1170
1161
  mainAxis: h = !0,
1171
1162
  crossAxis: d = !0,
1172
- fallbackPlacements: u,
1173
- fallbackStrategy: p = "bestFit",
1163
+ fallbackPlacements: p,
1164
+ fallbackStrategy: u = "bestFit",
1174
1165
  fallbackAxisSideDirection: f = "none",
1175
- flipAlignment: m = !0,
1166
+ flipAlignment: g = !0,
1176
1167
  ...y
1177
- } = st(e, t);
1178
- if ((o = r.arrow) != null && o.alignmentOffset)
1168
+ } = ot(e, t);
1169
+ if ((o = n.arrow) != null && o.alignmentOffset)
1179
1170
  return {};
1180
- const v = Z(s), x = Y(a), E = Z(a) === a, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), P = u || (E || !m ? [Et(a)] : Ci(a)), $ = f !== "none";
1181
- !u && $ && P.push(...Ri(a, m, f, C));
1182
- const A = [a, ...P], V = await pt(t, y), M = [];
1183
- let L = ((i = r.flip) == null ? void 0 : i.overflows) || [];
1184
- if (h && M.push(V[v]), d) {
1185
- const R = Pi(s, n, C);
1186
- M.push(V[R[0]], V[R[1]]);
1171
+ const v = tt(s), E = H(a), x = tt(a) === a, P = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), S = p || (x || !g ? [Et(a)] : xi(a)), C = f !== "none";
1172
+ !p && C && S.push(...Ai(a, g, f, P));
1173
+ const T = [a, ...S], $ = await l.detectOverflow(t, y), N = [];
1174
+ let A = ((i = n.flip) == null ? void 0 : i.overflows) || [];
1175
+ if (h && N.push($[v]), d) {
1176
+ const k = Ei(s, r, P);
1177
+ N.push($[k[0]], $[k[1]]);
1187
1178
  }
1188
- if (L = [...L, {
1179
+ if (A = [...A, {
1189
1180
  placement: s,
1190
- overflows: M
1191
- }], !M.every((R) => R <= 0)) {
1192
- var X, I;
1193
- const R = (((X = r.flip) == null ? void 0 : X.index) || 0) + 1, et = A[R];
1194
- if (et && (!(d === "alignment" ? x !== Y(et) : !1) || // We leave the current main axis only if every placement on that axis
1181
+ overflows: N
1182
+ }], !N.every((k) => k <= 0)) {
1183
+ var at, lt;
1184
+ const k = (((at = n.flip) == null ? void 0 : at.index) || 0) + 1, G = T[k];
1185
+ if (G && (!(d === "alignment" ? E !== H(G) : !1) || // We leave the current main axis only if every placement on that axis
1195
1186
  // overflows the main axis.
1196
- L.every((N) => Y(N.placement) === x ? N.overflows[0] > 0 : !0)))
1187
+ A.every((_) => H(_.placement) === E ? _.overflows[0] > 0 : !0)))
1197
1188
  return {
1198
1189
  data: {
1199
- index: R,
1200
- overflows: L
1190
+ index: k,
1191
+ overflows: A
1201
1192
  },
1202
1193
  reset: {
1203
- placement: et
1194
+ placement: G
1204
1195
  }
1205
1196
  };
1206
- let j = (I = L.filter((F) => F.overflows[0] <= 0).sort((F, N) => F.overflows[1] - N.overflows[1])[0]) == null ? void 0 : I.placement;
1207
- if (!j)
1208
- switch (p) {
1197
+ let M = (lt = A.filter((J) => J.overflows[0] <= 0).sort((J, _) => J.overflows[1] - _.overflows[1])[0]) == null ? void 0 : lt.placement;
1198
+ if (!M)
1199
+ switch (u) {
1209
1200
  case "bestFit": {
1210
- var G;
1211
- const F = (G = L.filter((N) => {
1212
- if ($) {
1213
- const J = Y(N.placement);
1214
- return J === x || // Create a bias to the `y` side axis due to horizontal
1201
+ var z;
1202
+ const J = (z = A.filter((_) => {
1203
+ if (C) {
1204
+ const X = H(_.placement);
1205
+ return X === E || // Create a bias to the `y` side axis due to horizontal
1215
1206
  // reading directions favoring greater width.
1216
- J === "y";
1207
+ X === "y";
1217
1208
  }
1218
1209
  return !0;
1219
- }).map((N) => [N.placement, N.overflows.filter((J) => J > 0).reduce((J, _e) => J + _e, 0)]).sort((N, J) => N[1] - J[1])[0]) == null ? void 0 : G[0];
1220
- F && (j = F);
1210
+ }).map((_) => [_.placement, _.overflows.filter((X) => X > 0).reduce((X, Ne) => X + Ne, 0)]).sort((_, X) => _[1] - X[1])[0]) == null ? void 0 : z[0];
1211
+ J && (M = J);
1221
1212
  break;
1222
1213
  }
1223
1214
  case "initialPlacement":
1224
- j = a;
1215
+ M = a;
1225
1216
  break;
1226
1217
  }
1227
- if (s !== j)
1218
+ if (s !== M)
1228
1219
  return {
1229
1220
  reset: {
1230
- placement: j
1221
+ placement: M
1231
1222
  }
1232
1223
  };
1233
1224
  }
@@ -1246,39 +1237,40 @@ function pe(e, t) {
1246
1237
  function ue(e) {
1247
1238
  return bi.some((t) => e[t] >= 0);
1248
1239
  }
1249
- const $i = function(e) {
1240
+ const ki = function(e) {
1250
1241
  return e === void 0 && (e = {}), {
1251
1242
  name: "hide",
1252
1243
  options: e,
1253
1244
  async fn(t) {
1254
1245
  const {
1255
- rects: o
1246
+ rects: o,
1247
+ platform: i
1256
1248
  } = t, {
1257
- strategy: i = "referenceHidden",
1258
- ...s
1259
- } = st(e, t);
1260
- switch (i) {
1249
+ strategy: s = "referenceHidden",
1250
+ ...n
1251
+ } = ot(e, t);
1252
+ switch (s) {
1261
1253
  case "referenceHidden": {
1262
- const r = await pt(t, {
1263
- ...s,
1254
+ const r = await i.detectOverflow(t, {
1255
+ ...n,
1264
1256
  elementContext: "reference"
1265
- }), n = pe(r, o.reference);
1257
+ }), a = pe(r, o.reference);
1266
1258
  return {
1267
1259
  data: {
1268
- referenceHiddenOffsets: n,
1269
- referenceHidden: ue(n)
1260
+ referenceHiddenOffsets: a,
1261
+ referenceHidden: ue(a)
1270
1262
  }
1271
1263
  };
1272
1264
  }
1273
1265
  case "escaped": {
1274
- const r = await pt(t, {
1275
- ...s,
1266
+ const r = await i.detectOverflow(t, {
1267
+ ...n,
1276
1268
  altBoundary: !0
1277
- }), n = pe(r, o.floating);
1269
+ }), a = pe(r, o.floating);
1278
1270
  return {
1279
1271
  data: {
1280
- escapedOffsets: n,
1281
- escaped: ue(n)
1272
+ escapedOffsets: a,
1273
+ escaped: ue(a)
1282
1274
  }
1283
1275
  };
1284
1276
  }
@@ -1287,16 +1279,16 @@ const $i = function(e) {
1287
1279
  }
1288
1280
  }
1289
1281
  };
1290
- }, Fi = /* @__PURE__ */ new Set(["left", "top"]);
1291
- async function Ni(e, t) {
1282
+ }, _i = /* @__PURE__ */ new Set(["left", "top"]);
1283
+ async function Fi(e, t) {
1292
1284
  const {
1293
1285
  placement: o,
1294
1286
  platform: i,
1295
1287
  elements: s
1296
- } = e, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), n = Z(o), a = at(o), l = Y(o) === "y", c = Fi.has(n) ? -1 : 1, h = r && l ? -1 : 1, d = st(t, e);
1288
+ } = e, n = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = tt(o), a = nt(o), l = H(o) === "y", c = _i.has(r) ? -1 : 1, h = n && l ? -1 : 1, d = ot(t, e);
1297
1289
  let {
1298
- mainAxis: u,
1299
- crossAxis: p,
1290
+ mainAxis: p,
1291
+ crossAxis: u,
1300
1292
  alignmentAxis: f
1301
1293
  } = typeof d == "number" ? {
1302
1294
  mainAxis: d,
@@ -1307,15 +1299,15 @@ async function Ni(e, t) {
1307
1299
  crossAxis: d.crossAxis || 0,
1308
1300
  alignmentAxis: d.alignmentAxis
1309
1301
  };
1310
- return a && typeof f == "number" && (p = a === "end" ? f * -1 : f), l ? {
1311
- x: p * h,
1312
- y: u * c
1302
+ return a && typeof f == "number" && (u = a === "end" ? f * -1 : f), l ? {
1303
+ x: u * h,
1304
+ y: p * c
1313
1305
  } : {
1314
- x: u * c,
1315
- y: p * h
1306
+ x: p * c,
1307
+ y: u * h
1316
1308
  };
1317
1309
  }
1318
- const _i = function(e) {
1310
+ const Ni = function(e) {
1319
1311
  return e === void 0 && (e = 0), {
1320
1312
  name: "offset",
1321
1313
  options: e,
@@ -1323,16 +1315,16 @@ const _i = function(e) {
1323
1315
  var o, i;
1324
1316
  const {
1325
1317
  x: s,
1326
- y: r,
1327
- placement: n,
1318
+ y: n,
1319
+ placement: r,
1328
1320
  middlewareData: a
1329
- } = t, l = await Ni(t, e);
1330
- return n === ((o = a.offset) == null ? void 0 : o.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
1321
+ } = t, l = await Fi(t, e);
1322
+ return r === ((o = a.offset) == null ? void 0 : o.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
1331
1323
  x: s + l.x,
1332
- y: r + l.y,
1324
+ y: n + l.y,
1333
1325
  data: {
1334
1326
  ...l,
1335
- placement: n
1327
+ placement: r
1336
1328
  }
1337
1329
  };
1338
1330
  }
@@ -1345,49 +1337,44 @@ const _i = function(e) {
1345
1337
  const {
1346
1338
  x: o,
1347
1339
  y: i,
1348
- placement: s
1340
+ placement: s,
1341
+ platform: n
1349
1342
  } = t, {
1350
1343
  mainAxis: r = !0,
1351
- crossAxis: n = !1,
1352
- limiter: a = {
1353
- fn: (y) => {
1344
+ crossAxis: a = !1,
1345
+ limiter: l = {
1346
+ fn: (E) => {
1354
1347
  let {
1355
- x: v,
1356
- y: x
1357
- } = y;
1348
+ x,
1349
+ y: P
1350
+ } = E;
1358
1351
  return {
1359
- x: v,
1360
- y: x
1352
+ x,
1353
+ y: P
1361
1354
  };
1362
1355
  }
1363
1356
  },
1364
- ...l
1365
- } = st(e, t), c = {
1357
+ ...c
1358
+ } = ot(e, t), h = {
1366
1359
  x: o,
1367
1360
  y: i
1368
- }, h = await pt(t, l), d = Y(Z(s)), u = be(d);
1369
- let p = c[u], f = c[d];
1370
- if (r) {
1371
- const y = u === "y" ? "top" : "left", v = u === "y" ? "bottom" : "right", x = p + h[y], E = p - h[v];
1372
- p = _t(x, p, E);
1373
- }
1374
- if (n) {
1375
- const y = d === "y" ? "top" : "left", v = d === "y" ? "bottom" : "right", x = f + h[y], E = f - h[v];
1376
- f = _t(x, f, E);
1377
- }
1378
- const m = a.fn({
1361
+ }, d = await n.detectOverflow(t, c), p = H(s), u = we(p);
1362
+ let f = h[u], g = h[p];
1363
+ const y = (E, x) => be(x + d[E === "y" ? "top" : "left"], x, x - d[E === "y" ? "bottom" : "right"]);
1364
+ r && (f = y(u, f)), a && (g = y(p, g));
1365
+ const v = l.fn({
1379
1366
  ...t,
1380
- [u]: p,
1381
- [d]: f
1367
+ [u]: f,
1368
+ [p]: g
1382
1369
  });
1383
1370
  return {
1384
- ...m,
1371
+ ...v,
1385
1372
  data: {
1386
- x: m.x - o,
1387
- y: m.y - i,
1373
+ x: v.x - o,
1374
+ y: v.y - i,
1388
1375
  enabled: {
1389
1376
  [u]: r,
1390
- [d]: n
1377
+ [p]: a
1391
1378
  }
1392
1379
  }
1393
1380
  };
@@ -1398,35 +1385,30 @@ const _i = function(e) {
1398
1385
  name: "size",
1399
1386
  options: e,
1400
1387
  async fn(t) {
1401
- var o, i;
1402
1388
  const {
1403
- placement: s,
1404
- rects: r,
1405
- platform: n,
1406
- elements: a
1389
+ placement: o,
1390
+ rects: i,
1391
+ platform: s,
1392
+ elements: n
1407
1393
  } = t, {
1408
- apply: l = () => {
1394
+ apply: r = () => {
1409
1395
  },
1410
- ...c
1411
- } = st(e, t), h = await pt(t, c), d = Z(s), u = at(s), p = Y(s) === "y", {
1412
- width: f,
1413
- height: m
1414
- } = r.floating;
1415
- let y, v;
1416
- d === "top" || d === "bottom" ? (y = d, v = u === (await (n.isRTL == null ? void 0 : n.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (v = d, y = u === "end" ? "top" : "bottom");
1417
- const x = m - h.top - h.bottom, E = f - h.left - h.right, C = Q(m - h[y], x), P = Q(f - h[v], E), $ = !t.middlewareData.shift;
1418
- let A = C, V = P;
1419
- if ((o = t.middlewareData.shift) != null && o.enabled.x && (V = E), (i = t.middlewareData.shift) != null && i.enabled.y && (A = x), $ && !u) {
1420
- const L = T(h.left, 0), X = T(h.right, 0), I = T(h.top, 0), G = T(h.bottom, 0);
1421
- p ? V = f - 2 * (L !== 0 || X !== 0 ? L + X : T(h.left, h.right)) : A = m - 2 * (I !== 0 || G !== 0 ? I + G : T(h.top, h.bottom));
1422
- }
1423
- await l({
1396
+ ...a
1397
+ } = ot(e, t), l = await s.detectOverflow(t, a), c = tt(o), h = nt(o), d = H(o) === "y", {
1398
+ width: p,
1399
+ height: u
1400
+ } = i.floating;
1401
+ let f, g;
1402
+ c === "top" || c === "bottom" ? (f = c, g = h === (await (s.isRTL == null ? void 0 : s.isRTL(n.floating)) ? "start" : "end") ? "left" : "right") : (g = c, f = h === "end" ? "top" : "bottom");
1403
+ const y = u - l.top - l.bottom, v = p - l.left - l.right, E = Y(u - l[f], y), x = Y(p - l[g], v), P = t.middlewareData.shift, S = !P;
1404
+ let C = E, T = x;
1405
+ P != null && P.enabled.x && (T = v), P != null && P.enabled.y && (C = y), S && !h && (d ? T = p - 2 * V(l.left, l.right) : C = u - 2 * V(l.top, l.bottom)), await r({
1424
1406
  ...t,
1425
- availableWidth: V,
1426
- availableHeight: A
1407
+ availableWidth: T,
1408
+ availableHeight: C
1427
1409
  });
1428
- const M = await n.getDimensions(a.floating);
1429
- return f !== M.width || m !== M.height ? {
1410
+ const $ = await s.getDimensions(n.floating);
1411
+ return p !== $.width || u !== $.height ? {
1430
1412
  reset: {
1431
1413
  rects: !0
1432
1414
  }
@@ -1434,84 +1416,84 @@ const _i = function(e) {
1434
1416
  }
1435
1417
  };
1436
1418
  };
1437
- function At() {
1419
+ function Ot() {
1438
1420
  return typeof window < "u";
1439
1421
  }
1440
- function lt(e) {
1422
+ function rt(e) {
1441
1423
  return xe(e) ? (e.nodeName || "").toLowerCase() : "#document";
1442
1424
  }
1443
1425
  function D(e) {
1444
1426
  var t;
1445
1427
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
1446
1428
  }
1447
- function q(e) {
1429
+ function U(e) {
1448
1430
  var t;
1449
1431
  return (t = (xe(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
1450
1432
  }
1451
1433
  function xe(e) {
1452
- return At() ? e instanceof Node || e instanceof D(e).Node : !1;
1434
+ return Ot() ? e instanceof Node || e instanceof D(e).Node : !1;
1453
1435
  }
1454
- function z(e) {
1455
- return At() ? e instanceof Element || e instanceof D(e).Element : !1;
1436
+ function B(e) {
1437
+ return Ot() ? e instanceof Element || e instanceof D(e).Element : !1;
1456
1438
  }
1457
- function W(e) {
1458
- return At() ? e instanceof HTMLElement || e instanceof D(e).HTMLElement : !1;
1439
+ function K(e) {
1440
+ return Ot() ? e instanceof HTMLElement || e instanceof D(e).HTMLElement : !1;
1459
1441
  }
1460
1442
  function fe(e) {
1461
- return !At() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof D(e).ShadowRoot;
1443
+ return !Ot() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof D(e).ShadowRoot;
1462
1444
  }
1463
- const Mi = /* @__PURE__ */ new Set(["inline", "contents"]);
1464
- function mt(e) {
1445
+ function At(e) {
1465
1446
  const {
1466
1447
  overflow: t,
1467
1448
  overflowX: o,
1468
1449
  overflowY: i,
1469
1450
  display: s
1470
- } = B(e);
1471
- return /auto|scroll|overlay|hidden|clip/.test(t + i + o) && !Mi.has(s);
1451
+ } = I(e);
1452
+ return /auto|scroll|overlay|hidden|clip/.test(t + i + o) && s !== "inline" && s !== "contents";
1472
1453
  }
1473
- const Ii = /* @__PURE__ */ new Set(["table", "td", "th"]);
1474
- function Hi(e) {
1475
- return Ii.has(lt(e));
1454
+ function Ii(e) {
1455
+ return /^(table|td|th)$/.test(rt(e));
1476
1456
  }
1477
- const Wi = [":popover-open", ":modal"];
1478
- function St(e) {
1479
- return Wi.some((t) => {
1480
- try {
1481
- return e.matches(t);
1482
- } catch {
1483
- return !1;
1484
- }
1485
- });
1486
- }
1487
- const qi = ["transform", "translate", "scale", "rotate", "perspective"], Vi = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ji = ["paint", "layout", "strict", "content"];
1488
1457
  function Rt(e) {
1489
- const t = te(), o = z(e) ? B(e) : e;
1490
- return qi.some((i) => o[i] ? o[i] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !t && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !t && (o.filter ? o.filter !== "none" : !1) || Vi.some((i) => (o.willChange || "").includes(i)) || ji.some((i) => (o.contain || "").includes(i));
1458
+ try {
1459
+ if (e.matches(":popover-open"))
1460
+ return !0;
1461
+ } catch {
1462
+ }
1463
+ try {
1464
+ return e.matches(":modal");
1465
+ } catch {
1466
+ return !1;
1467
+ }
1491
1468
  }
1492
- function Ui(e) {
1493
- let t = tt(e);
1494
- for (; W(t) && !rt(t); ) {
1495
- if (Rt(t))
1496
- return t;
1469
+ const Mi = /transform|translate|scale|rotate|perspective|filter/, Wi = /paint|layout|strict|content/, Q = (e) => !!e && e !== "none";
1470
+ let _t;
1471
+ function St(e) {
1472
+ const t = B(e) ? I(e) : e;
1473
+ return Q(t.transform) || Q(t.translate) || Q(t.scale) || Q(t.rotate) || Q(t.perspective) || !ee() && (Q(t.backdropFilter) || Q(t.filter)) || Mi.test(t.willChange || "") || Wi.test(t.contain || "");
1474
+ }
1475
+ function Hi(e) {
1476
+ let t = et(e);
1477
+ for (; K(t) && !pt(t); ) {
1497
1478
  if (St(t))
1479
+ return t;
1480
+ if (Rt(t))
1498
1481
  return null;
1499
- t = tt(t);
1482
+ t = et(t);
1500
1483
  }
1501
1484
  return null;
1502
1485
  }
1503
- function te() {
1504
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1486
+ function ee() {
1487
+ return _t == null && (_t = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), _t;
1505
1488
  }
1506
- const Yi = /* @__PURE__ */ new Set(["html", "body", "#document"]);
1507
- function rt(e) {
1508
- return Yi.has(lt(e));
1489
+ function pt(e) {
1490
+ return /^(html|body|#document)$/.test(rt(e));
1509
1491
  }
1510
- function B(e) {
1492
+ function I(e) {
1511
1493
  return D(e).getComputedStyle(e);
1512
1494
  }
1513
1495
  function Tt(e) {
1514
- return z(e) ? {
1496
+ return B(e) ? {
1515
1497
  scrollLeft: e.scrollLeft,
1516
1498
  scrollTop: e.scrollTop
1517
1499
  } : {
@@ -1519,187 +1501,187 @@ function Tt(e) {
1519
1501
  scrollTop: e.scrollY
1520
1502
  };
1521
1503
  }
1522
- function tt(e) {
1523
- if (lt(e) === "html")
1504
+ function et(e) {
1505
+ if (rt(e) === "html")
1524
1506
  return e;
1525
1507
  const t = (
1526
1508
  // Step into the shadow DOM of the parent of a slotted node.
1527
1509
  e.assignedSlot || // DOM Element detected.
1528
1510
  e.parentNode || // ShadowRoot detected.
1529
1511
  fe(e) && e.host || // Fallback.
1530
- q(e)
1512
+ U(e)
1531
1513
  );
1532
1514
  return fe(t) ? t.host : t;
1533
1515
  }
1534
- function Ee(e) {
1535
- const t = tt(e);
1536
- return rt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : W(t) && mt(t) ? t : Ee(t);
1516
+ function Pe(e) {
1517
+ const t = et(e);
1518
+ return pt(t) ? (e.ownerDocument || e).body : K(t) && At(t) ? t : Pe(t);
1537
1519
  }
1538
1520
  function ut(e, t, o) {
1539
1521
  var i;
1540
1522
  t === void 0 && (t = []), o === void 0 && (o = !0);
1541
- const s = Ee(e), r = s === ((i = e.ownerDocument) == null ? void 0 : i.body), n = D(s);
1542
- if (r) {
1543
- const a = Bt(n);
1544
- return t.concat(n, n.visualViewport || [], mt(s) ? s : [], a && o ? ut(a) : []);
1545
- }
1546
- return t.concat(s, ut(s, [], o));
1547
- }
1548
- function Bt(e) {
1523
+ const s = Pe(e), n = s === ((i = e.ownerDocument) == null ? void 0 : i.body), r = D(s);
1524
+ if (n) {
1525
+ const a = It(r);
1526
+ return t.concat(r, r.visualViewport || [], At(s) ? s : [], a && o ? ut(a) : []);
1527
+ } else
1528
+ return t.concat(s, ut(s, [], o));
1529
+ }
1530
+ function It(e) {
1549
1531
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
1550
1532
  }
1551
- function Pe(e) {
1552
- const t = B(e);
1533
+ function Ce(e) {
1534
+ const t = I(e);
1553
1535
  let o = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
1554
- const s = W(e), r = s ? e.offsetWidth : o, n = s ? e.offsetHeight : i, a = xt(o) !== r || xt(i) !== n;
1555
- return a && (o = r, i = n), {
1536
+ const s = K(e), n = s ? e.offsetWidth : o, r = s ? e.offsetHeight : i, a = wt(o) !== n || wt(i) !== r;
1537
+ return a && (o = n, i = r), {
1556
1538
  width: o,
1557
1539
  height: i,
1558
1540
  $: a
1559
1541
  };
1560
1542
  }
1561
- function ee(e) {
1562
- return z(e) ? e : e.contextElement;
1543
+ function ie(e) {
1544
+ return B(e) ? e : e.contextElement;
1563
1545
  }
1564
- function nt(e) {
1565
- const t = ee(e);
1566
- if (!W(t))
1567
- return H(1);
1546
+ function st(e) {
1547
+ const t = ie(e);
1548
+ if (!K(t))
1549
+ return j(1);
1568
1550
  const o = t.getBoundingClientRect(), {
1569
1551
  width: i,
1570
1552
  height: s,
1571
- $: r
1572
- } = Pe(t);
1573
- let n = (r ? xt(o.width) : o.width) / i, a = (r ? xt(o.height) : o.height) / s;
1574
- return (!n || !Number.isFinite(n)) && (n = 1), (!a || !Number.isFinite(a)) && (a = 1), {
1575
- x: n,
1553
+ $: n
1554
+ } = Ce(t);
1555
+ let r = (n ? wt(o.width) : o.width) / i, a = (n ? wt(o.height) : o.height) / s;
1556
+ return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
1557
+ x: r,
1576
1558
  y: a
1577
1559
  };
1578
1560
  }
1579
- const Ki = /* @__PURE__ */ H(0);
1580
- function Ce(e) {
1561
+ const qi = /* @__PURE__ */ j(0);
1562
+ function Oe(e) {
1581
1563
  const t = D(e);
1582
- return !te() || !t.visualViewport ? Ki : {
1564
+ return !ee() || !t.visualViewport ? qi : {
1583
1565
  x: t.visualViewport.offsetLeft,
1584
1566
  y: t.visualViewport.offsetTop
1585
1567
  };
1586
1568
  }
1587
- function Xi(e, t, o) {
1588
- return t === void 0 && (t = !1), !o || t && o !== D(e) ? !1 : t;
1569
+ function Vi(e, t, o) {
1570
+ return t === void 0 && (t = !1), !!o && t && o === D(e);
1589
1571
  }
1590
- function ot(e, t, o, i) {
1572
+ function it(e, t, o, i) {
1591
1573
  t === void 0 && (t = !1), o === void 0 && (o = !1);
1592
- const s = e.getBoundingClientRect(), r = ee(e);
1593
- let n = H(1);
1594
- t && (i ? z(i) && (n = nt(i)) : n = nt(e));
1595
- const a = Xi(r, o, i) ? Ce(r) : H(0);
1596
- let l = (s.left + a.x) / n.x, c = (s.top + a.y) / n.y, h = s.width / n.x, d = s.height / n.y;
1597
- if (r) {
1598
- const u = D(r), p = i && z(i) ? D(i) : i;
1599
- let f = u, m = Bt(f);
1600
- for (; m && i && p !== f; ) {
1601
- const y = nt(m), v = m.getBoundingClientRect(), x = B(m), E = v.left + (m.clientLeft + parseFloat(x.paddingLeft)) * y.x, C = v.top + (m.clientTop + parseFloat(x.paddingTop)) * y.y;
1602
- l *= y.x, c *= y.y, h *= y.x, d *= y.y, l += E, c += C, f = D(m), m = Bt(f);
1574
+ const s = e.getBoundingClientRect(), n = ie(e);
1575
+ let r = j(1);
1576
+ t && (i ? B(i) && (r = st(i)) : r = st(e));
1577
+ const a = Vi(n, o, i) ? Oe(n) : j(0);
1578
+ let l = (s.left + a.x) / r.x, c = (s.top + a.y) / r.y, h = s.width / r.x, d = s.height / r.y;
1579
+ if (n && i) {
1580
+ const p = D(n), u = B(i) ? D(i) : i;
1581
+ let f = p, g = It(f);
1582
+ for (; g && u !== f; ) {
1583
+ const y = st(g), v = g.getBoundingClientRect(), E = I(g), x = v.left + (g.clientLeft + parseFloat(E.paddingLeft)) * y.x, P = v.top + (g.clientTop + parseFloat(E.paddingTop)) * y.y;
1584
+ l *= y.x, c *= y.y, h *= y.x, d *= y.y, l += x, c += P, f = D(g), g = It(f);
1603
1585
  }
1604
1586
  }
1605
- return Pt({
1587
+ return xt({
1606
1588
  width: h,
1607
1589
  height: d,
1608
1590
  x: l,
1609
1591
  y: c
1610
1592
  });
1611
1593
  }
1612
- function ie(e, t) {
1594
+ function Dt(e, t) {
1613
1595
  const o = Tt(e).scrollLeft;
1614
- return t ? t.left + o : ot(q(e)).left + o;
1596
+ return t ? t.left + o : it(U(e)).left + o;
1615
1597
  }
1616
- function Oe(e, t, o) {
1617
- o === void 0 && (o = !1);
1618
- const i = e.getBoundingClientRect(), s = i.left + t.scrollLeft - (o ? 0 : (
1619
- // RTL <body> scrollbar.
1620
- ie(e, i)
1621
- )), r = i.top + t.scrollTop;
1598
+ function Ae(e, t) {
1599
+ const o = e.getBoundingClientRect(), i = o.left + t.scrollLeft - Dt(e, o), s = o.top + t.scrollTop;
1622
1600
  return {
1623
- x: s,
1624
- y: r
1601
+ x: i,
1602
+ y: s
1625
1603
  };
1626
1604
  }
1627
- function Gi(e) {
1605
+ function ji(e) {
1628
1606
  let {
1629
1607
  elements: t,
1630
1608
  rect: o,
1631
1609
  offsetParent: i,
1632
1610
  strategy: s
1633
1611
  } = e;
1634
- const r = s === "fixed", n = q(i), a = t ? St(t.floating) : !1;
1635
- if (i === n || a && r)
1612
+ const n = s === "fixed", r = U(i), a = t ? Rt(t.floating) : !1;
1613
+ if (i === r || a && n)
1636
1614
  return o;
1637
1615
  let l = {
1638
1616
  scrollLeft: 0,
1639
1617
  scrollTop: 0
1640
- }, c = H(1);
1641
- const h = H(0), d = W(i);
1642
- if ((d || !d && !r) && ((lt(i) !== "body" || mt(n)) && (l = Tt(i)), W(i))) {
1643
- const p = ot(i);
1644
- c = nt(i), h.x = p.x + i.clientLeft, h.y = p.y + i.clientTop;
1618
+ }, c = j(1);
1619
+ const h = j(0), d = K(i);
1620
+ if ((d || !n) && ((rt(i) !== "body" || At(r)) && (l = Tt(i)), d)) {
1621
+ const u = it(i);
1622
+ c = st(i), h.x = u.x + i.clientLeft, h.y = u.y + i.clientTop;
1645
1623
  }
1646
- const u = n && !d && !r ? Oe(n, l, !0) : H(0);
1624
+ const p = r && !d && !n ? Ae(r, l) : j(0);
1647
1625
  return {
1648
1626
  width: o.width * c.x,
1649
1627
  height: o.height * c.y,
1650
- x: o.x * c.x - l.scrollLeft * c.x + h.x + u.x,
1651
- y: o.y * c.y - l.scrollTop * c.y + h.y + u.y
1628
+ x: o.x * c.x - l.scrollLeft * c.x + h.x + p.x,
1629
+ y: o.y * c.y - l.scrollTop * c.y + h.y + p.y
1652
1630
  };
1653
1631
  }
1654
- function Ji(e) {
1655
- return Array.from(e.getClientRects());
1632
+ function Ui(e) {
1633
+ return e.getClientRects ? Array.from(e.getClientRects()) : [];
1656
1634
  }
1657
- function Qi(e) {
1658
- const t = q(e), o = Tt(e), i = e.ownerDocument.body, s = T(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = T(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
1659
- let n = -o.scrollLeft + ie(e);
1660
- const a = -o.scrollTop;
1661
- return B(i).direction === "rtl" && (n += T(t.clientWidth, i.clientWidth) - s), {
1662
- width: s,
1663
- height: r,
1635
+ function Xi(e) {
1636
+ const t = Tt(e), o = e.ownerDocument.body, i = V(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = V(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
1637
+ let n = -t.scrollLeft + Dt(e);
1638
+ const r = -t.scrollTop;
1639
+ return I(o).direction === "rtl" && (n += V(e.clientWidth, o.clientWidth) - i), {
1640
+ width: i,
1641
+ height: s,
1664
1642
  x: n,
1665
- y: a
1643
+ y: r
1666
1644
  };
1667
1645
  }
1668
- function Zi(e, t) {
1669
- const o = D(e), i = q(e), s = o.visualViewport;
1670
- let r = i.clientWidth, n = i.clientHeight, a = 0, l = 0;
1671
- if (s) {
1672
- r = s.width, n = s.height;
1673
- const c = te();
1674
- (!c || c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
1646
+ const Yi = 25;
1647
+ function Ki(e, t, o) {
1648
+ o === void 0 && (o = "viewport");
1649
+ const i = o === "layoutViewport", s = D(e), n = U(e), r = s.visualViewport;
1650
+ let a = n.clientWidth, l = n.clientHeight, c = 0, h = 0;
1651
+ if (r) {
1652
+ const p = !ee() || t === "fixed";
1653
+ i ? p || (c = -r.offsetLeft, h = -r.offsetTop) : (a = r.width, l = r.height, p && (c = r.offsetLeft, h = r.offsetTop));
1654
+ }
1655
+ if (Dt(n) <= 0) {
1656
+ const p = n.ownerDocument, u = p.body, f = getComputedStyle(u), g = p.compatMode === "CSS1Compat" && parseFloat(f.marginLeft) + parseFloat(f.marginRight) || 0, y = Math.abs(n.clientWidth - u.clientWidth - g), v = getComputedStyle(n).scrollbarGutter === "stable both-edges" ? y / 2 : y;
1657
+ v <= Yi && (a -= v);
1675
1658
  }
1676
1659
  return {
1677
- width: r,
1678
- height: n,
1679
- x: a,
1680
- y: l
1660
+ width: a,
1661
+ height: l,
1662
+ x: c,
1663
+ y: h
1681
1664
  };
1682
1665
  }
1683
- const to = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1684
- function eo(e, t) {
1685
- const o = ot(e, !0, t === "fixed"), i = o.top + e.clientTop, s = o.left + e.clientLeft, r = W(e) ? nt(e) : H(1), n = e.clientWidth * r.x, a = e.clientHeight * r.y, l = s * r.x, c = i * r.y;
1666
+ function Gi(e, t) {
1667
+ const o = it(e, !0, t === "fixed"), i = o.top + e.clientTop, s = o.left + e.clientLeft, n = st(e), r = e.clientWidth * n.x, a = e.clientHeight * n.y, l = s * n.x, c = i * n.y;
1686
1668
  return {
1687
- width: n,
1669
+ width: r,
1688
1670
  height: a,
1689
1671
  x: l,
1690
1672
  y: c
1691
1673
  };
1692
1674
  }
1693
- function me(e, t, o) {
1675
+ function ge(e, t, o) {
1694
1676
  let i;
1695
- if (t === "viewport")
1696
- i = Zi(e, o);
1677
+ if (t === "viewport" || t === "layoutViewport")
1678
+ i = Ki(e, o, t);
1697
1679
  else if (t === "document")
1698
- i = Qi(q(e));
1699
- else if (z(t))
1700
- i = eo(t, o);
1680
+ i = Xi(U(e));
1681
+ else if (B(t))
1682
+ i = Gi(t, o);
1701
1683
  else {
1702
- const s = Ce(e);
1684
+ const s = Oe(e);
1703
1685
  i = {
1704
1686
  x: t.x - s.x,
1705
1687
  y: t.y - s.y,
@@ -1707,110 +1689,104 @@ function me(e, t, o) {
1707
1689
  height: t.height
1708
1690
  };
1709
1691
  }
1710
- return Pt(i);
1692
+ return xt(i);
1711
1693
  }
1712
- function Ae(e, t) {
1713
- const o = tt(e);
1714
- return o === t || !z(o) || rt(o) ? !1 : B(o).position === "fixed" || Ae(o, t);
1715
- }
1716
- function io(e, t) {
1694
+ function Ji(e, t) {
1717
1695
  const o = t.get(e);
1718
1696
  if (o)
1719
1697
  return o;
1720
- let i = ut(e, [], !1).filter((a) => z(a) && lt(a) !== "body"), s = null;
1721
- const r = B(e).position === "fixed";
1722
- let n = r ? tt(e) : e;
1723
- for (; z(n) && !rt(n); ) {
1724
- const a = B(n), l = Rt(n);
1725
- !l && a.position === "fixed" && (s = null), (r ? !l && !s : !l && a.position === "static" && !!s && to.has(s.position) || mt(n) && !l && Ae(e, n)) ? i = i.filter((h) => h !== n) : s = a, n = tt(n);
1698
+ let i = ut(e, [], !1).filter((a) => B(a) && rt(a) !== "body"), s = null;
1699
+ const n = I(e).position === "fixed";
1700
+ let r = n ? et(e) : e;
1701
+ for (; B(r) && !pt(r); ) {
1702
+ const a = I(r), l = St(r), c = s ? s.position : n ? "fixed" : "";
1703
+ !l && (c === "fixed" || c === "absolute" && a.position === "static") ? i = i.filter((d) => d !== r) : s = a, r = et(r);
1726
1704
  }
1727
1705
  return t.set(e, i), i;
1728
1706
  }
1729
- function oo(e) {
1707
+ function Qi(e) {
1730
1708
  let {
1731
1709
  element: t,
1732
1710
  boundary: o,
1733
1711
  rootBoundary: i,
1734
1712
  strategy: s
1735
1713
  } = e;
1736
- const n = [...o === "clippingAncestors" ? St(t) ? [] : io(t, this._c) : [].concat(o), i], a = n[0], l = n.reduce((c, h) => {
1737
- const d = me(t, h, s);
1738
- return c.top = T(d.top, c.top), c.right = Q(d.right, c.right), c.bottom = Q(d.bottom, c.bottom), c.left = T(d.left, c.left), c;
1739
- }, me(t, a, s));
1714
+ const r = [...o === "clippingAncestors" ? Rt(t) ? [] : Ji(t, this._c) : [].concat(o), i], a = ge(t, r[0], s);
1715
+ let l = a.top, c = a.right, h = a.bottom, d = a.left;
1716
+ for (let p = 1; p < r.length; p++) {
1717
+ const u = ge(t, r[p], s);
1718
+ l = V(u.top, l), c = Y(u.right, c), h = Y(u.bottom, h), d = V(u.left, d);
1719
+ }
1740
1720
  return {
1741
- width: l.right - l.left,
1742
- height: l.bottom - l.top,
1743
- x: l.left,
1744
- y: l.top
1721
+ width: c - d,
1722
+ height: h - l,
1723
+ x: d,
1724
+ y: l
1745
1725
  };
1746
1726
  }
1747
- function so(e) {
1727
+ function Zi(e) {
1748
1728
  const {
1749
1729
  width: t,
1750
1730
  height: o
1751
- } = Pe(e);
1731
+ } = Ce(e);
1752
1732
  return {
1753
1733
  width: t,
1754
1734
  height: o
1755
1735
  };
1756
1736
  }
1757
- function no(e, t, o) {
1758
- const i = W(t), s = q(t), r = o === "fixed", n = ot(e, !0, r, t);
1737
+ function to(e, t, o) {
1738
+ const i = K(t), s = U(t), n = o === "fixed", r = it(e, !0, n, t);
1759
1739
  let a = {
1760
1740
  scrollLeft: 0,
1761
1741
  scrollTop: 0
1762
1742
  };
1763
- const l = H(0);
1764
- function c() {
1765
- l.x = ie(s);
1766
- }
1767
- if (i || !i && !r)
1768
- if ((lt(t) !== "body" || mt(s)) && (a = Tt(t)), i) {
1769
- const p = ot(t, !0, r, t);
1770
- l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop;
1771
- } else s && c();
1772
- r && !i && s && c();
1773
- const h = s && !i && !r ? Oe(s, a) : H(0), d = n.left + a.scrollLeft - l.x - h.x, u = n.top + a.scrollTop - l.y - h.y;
1743
+ const l = j(0);
1744
+ if ((i || !n) && ((rt(t) !== "body" || At(s)) && (a = Tt(t)), i)) {
1745
+ const p = it(t, !0, n, t);
1746
+ l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop;
1747
+ }
1748
+ !i && s && (l.x = Dt(s));
1749
+ const c = s && !i && !n ? Ae(s, a) : j(0), h = r.left + a.scrollLeft - l.x - c.x, d = r.top + a.scrollTop - l.y - c.y;
1774
1750
  return {
1775
- x: d,
1776
- y: u,
1777
- width: n.width,
1778
- height: n.height
1751
+ x: h,
1752
+ y: d,
1753
+ width: r.width,
1754
+ height: r.height
1779
1755
  };
1780
1756
  }
1781
- function $t(e) {
1782
- return B(e).position === "static";
1757
+ function Ft(e) {
1758
+ return I(e).position === "static";
1783
1759
  }
1784
- function ge(e, t) {
1785
- if (!W(e) || B(e).position === "fixed")
1760
+ function me(e, t) {
1761
+ if (!K(e) || I(e).position === "fixed")
1786
1762
  return null;
1787
1763
  if (t)
1788
1764
  return t(e);
1789
1765
  let o = e.offsetParent;
1790
- return q(e) === o && (o = o.ownerDocument.body), o;
1766
+ return U(e) === o && (o = o.ownerDocument.body), o;
1791
1767
  }
1792
- function Se(e, t) {
1768
+ function Re(e, t) {
1793
1769
  const o = D(e);
1794
- if (St(e))
1770
+ if (Rt(e))
1795
1771
  return o;
1796
- if (!W(e)) {
1797
- let s = tt(e);
1798
- for (; s && !rt(s); ) {
1799
- if (z(s) && !$t(s))
1772
+ if (!K(e)) {
1773
+ let s = et(e);
1774
+ for (; s && !pt(s); ) {
1775
+ if (B(s) && !Ft(s))
1800
1776
  return s;
1801
- s = tt(s);
1777
+ s = et(s);
1802
1778
  }
1803
1779
  return o;
1804
1780
  }
1805
- let i = ge(e, t);
1806
- for (; i && Hi(i) && $t(i); )
1807
- i = ge(i, t);
1808
- return i && rt(i) && $t(i) && !Rt(i) ? o : i || Ui(e) || o;
1781
+ let i = me(e, t);
1782
+ for (; i && Ii(i) && Ft(i); )
1783
+ i = me(i, t);
1784
+ return i && pt(i) && Ft(i) && !St(i) ? o : i || Hi(e) || o;
1809
1785
  }
1810
- const ro = async function(e) {
1811
- const t = this.getOffsetParent || Se, o = this.getDimensions, i = await o(e.floating);
1786
+ const eo = async function(e) {
1787
+ const t = this.getOffsetParent || Re, o = this.getDimensions, i = await o(e.floating);
1812
1788
  return {
1813
- reference: no(e.reference, await t(e.floating), e.strategy),
1789
+ reference: to(e.reference, await t(e.floating), e.strategy),
1814
1790
  floating: {
1815
1791
  x: 0,
1816
1792
  y: 0,
@@ -1819,126 +1795,127 @@ const ro = async function(e) {
1819
1795
  }
1820
1796
  };
1821
1797
  };
1822
- function ao(e) {
1823
- return B(e).direction === "rtl";
1798
+ function io(e) {
1799
+ return I(e).direction === "rtl";
1824
1800
  }
1825
1801
  const Mt = {
1826
- convertOffsetParentRelativeRectToViewportRelativeRect: Gi,
1827
- getDocumentElement: q,
1828
- getClippingRect: oo,
1829
- getOffsetParent: Se,
1830
- getElementRects: ro,
1831
- getClientRects: Ji,
1832
- getDimensions: so,
1833
- getScale: nt,
1834
- isElement: z,
1835
- isRTL: ao
1802
+ convertOffsetParentRelativeRectToViewportRelativeRect: ji,
1803
+ getDocumentElement: U,
1804
+ getClippingRect: Qi,
1805
+ getOffsetParent: Re,
1806
+ getElementRects: eo,
1807
+ getClientRects: Ui,
1808
+ getDimensions: Zi,
1809
+ getScale: st,
1810
+ isElement: B,
1811
+ isRTL: io
1836
1812
  };
1837
- function Re(e, t) {
1813
+ function Se(e, t) {
1838
1814
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1839
1815
  }
1840
- function lo(e, t) {
1841
- let o = null, i;
1842
- const s = q(e);
1816
+ function oo(e, t, o) {
1817
+ let i = null, s;
1818
+ const n = U(e);
1843
1819
  function r() {
1844
- var a;
1845
- clearTimeout(i), (a = o) == null || a.disconnect(), o = null;
1846
- }
1847
- function n(a, l) {
1848
- a === void 0 && (a = !1), l === void 0 && (l = 1), r();
1849
- const c = e.getBoundingClientRect(), {
1850
- left: h,
1851
- top: d,
1852
- width: u,
1853
- height: p
1854
- } = c;
1855
- if (a || t(), !u || !p)
1820
+ var h;
1821
+ clearTimeout(s), (h = i) == null || h.disconnect(), i = null;
1822
+ }
1823
+ function a(h, d) {
1824
+ h === void 0 && (h = !1), d === void 0 && (d = 1), r();
1825
+ const p = e.getBoundingClientRect(), {
1826
+ left: u,
1827
+ top: f,
1828
+ width: g,
1829
+ height: y
1830
+ } = p;
1831
+ if (h || t(), !g || !y)
1856
1832
  return;
1857
- const f = yt(d), m = yt(s.clientWidth - (h + u)), y = yt(s.clientHeight - (d + p)), v = yt(h), E = {
1858
- rootMargin: -f + "px " + -m + "px " + -y + "px " + -v + "px",
1859
- threshold: T(0, Q(1, l)) || 1
1833
+ const v = mt(f), E = mt(n.clientWidth - (u + g)), x = mt(n.clientHeight - (f + y)), P = mt(u), C = {
1834
+ rootMargin: -v + "px " + -E + "px " + -x + "px " + -P + "px",
1835
+ threshold: V(0, Y(1, d)) || 1
1860
1836
  };
1861
- let C = !0;
1862
- function P($) {
1863
- const A = $[0].intersectionRatio;
1864
- if (A !== l) {
1865
- if (!C)
1866
- return n();
1867
- A ? n(!1, A) : i = setTimeout(() => {
1868
- n(!1, 1e-7);
1837
+ let T = !0;
1838
+ function $(N) {
1839
+ const A = N[0].intersectionRatio;
1840
+ if (!Se(p, e.getBoundingClientRect()))
1841
+ return a();
1842
+ if (A !== d) {
1843
+ if (!T)
1844
+ return a();
1845
+ A ? a(!1, A) : s = setTimeout(() => {
1846
+ a(!1, 1e-7);
1869
1847
  }, 1e3);
1870
1848
  }
1871
- A === 1 && !Re(c, e.getBoundingClientRect()) && n(), C = !1;
1849
+ T = !1;
1872
1850
  }
1873
1851
  try {
1874
- o = new IntersectionObserver(P, {
1875
- ...E,
1852
+ i = new IntersectionObserver($, {
1853
+ ...C,
1876
1854
  // Handle <iframe>s
1877
- root: s.ownerDocument
1855
+ root: n.ownerDocument
1878
1856
  });
1879
1857
  } catch {
1880
- o = new IntersectionObserver(P, E);
1858
+ i = new IntersectionObserver($, C);
1881
1859
  }
1882
- o.observe(e);
1860
+ i.observe(e);
1883
1861
  }
1884
- return n(!0), r;
1862
+ const l = D(e), c = () => a(o);
1863
+ return l.addEventListener("resize", c), a(!0), () => {
1864
+ l.removeEventListener("resize", c), r();
1865
+ };
1885
1866
  }
1886
- function It(e, t, o, i) {
1867
+ function Wt(e, t, o, i) {
1887
1868
  i === void 0 && (i = {});
1888
1869
  const {
1889
1870
  ancestorScroll: s = !0,
1890
- ancestorResize: r = !0,
1891
- elementResize: n = typeof ResizeObserver == "function",
1871
+ ancestorResize: n = !0,
1872
+ elementResize: r = typeof ResizeObserver == "function",
1892
1873
  layoutShift: a = typeof IntersectionObserver == "function",
1893
1874
  animationFrame: l = !1
1894
- } = i, c = ee(e), h = s || r ? [...c ? ut(c) : [], ...ut(t)] : [];
1875
+ } = i, c = ie(e), h = s || n ? [...c ? ut(c) : [], ...t ? ut(t) : []] : [];
1895
1876
  h.forEach((v) => {
1896
- s && v.addEventListener("scroll", o, {
1897
- passive: !0
1898
- }), r && v.addEventListener("resize", o);
1877
+ s && v.addEventListener("scroll", o), n && v.addEventListener("resize", o);
1899
1878
  });
1900
- const d = c && a ? lo(c, o) : null;
1901
- let u = -1, p = null;
1902
- n && (p = new ResizeObserver((v) => {
1903
- let [x] = v;
1904
- x && x.target === c && p && (p.unobserve(t), cancelAnimationFrame(u), u = requestAnimationFrame(() => {
1905
- var E;
1906
- (E = p) == null || E.observe(t);
1879
+ const d = c && a ? oo(c, o, n) : null;
1880
+ let p = -1, u = null;
1881
+ r && (u = new ResizeObserver((v) => {
1882
+ let [E] = v;
1883
+ E && E.target === c && u && t && (u.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1884
+ var x;
1885
+ (x = u) == null || x.observe(t);
1907
1886
  })), o();
1908
- }), c && !l && p.observe(c), p.observe(t));
1909
- let f, m = l ? ot(e) : null;
1887
+ }), c && !l && u.observe(c), t && u.observe(t));
1888
+ let f, g = l ? it(e) : null;
1910
1889
  l && y();
1911
1890
  function y() {
1912
- const v = ot(e);
1913
- m && !Re(m, v) && o(), m = v, f = requestAnimationFrame(y);
1891
+ const v = it(e);
1892
+ g && !Se(g, v) && o(), g = v, f = requestAnimationFrame(y);
1914
1893
  }
1915
1894
  return o(), () => {
1916
1895
  var v;
1917
- h.forEach((x) => {
1918
- s && x.removeEventListener("scroll", o), r && x.removeEventListener("resize", o);
1919
- }), d?.(), (v = p) == null || v.disconnect(), p = null, l && cancelAnimationFrame(f);
1896
+ h.forEach((E) => {
1897
+ s && E.removeEventListener("scroll", o), n && E.removeEventListener("resize", o);
1898
+ }), d?.(), (v = u) == null || v.disconnect(), u = null, l && cancelAnimationFrame(f);
1920
1899
  };
1921
1900
  }
1922
- const Ht = _i, Te = zi, Wt = ki, qt = Bi, co = $i, De = Li, Le = (e, t, o) => {
1923
- const i = /* @__PURE__ */ new Map(), s = {
1924
- platform: Mt,
1925
- ...o
1926
- }, r = {
1901
+ const Ht = Ni, Te = zi, qt = $i, Vt = Bi, so = ki, De = Li, Le = (e, t, o) => {
1902
+ const i = /* @__PURE__ */ new Map(), s = o ?? {}, n = {
1903
+ ...Mt,
1927
1904
  ...s.platform,
1928
1905
  _c: i
1929
1906
  };
1930
1907
  return Di(e, t, {
1931
1908
  ...s,
1932
- platform: r
1909
+ platform: n
1933
1910
  });
1934
1911
  };
1935
- function vt(e) {
1912
+ function yt(e) {
1936
1913
  if (typeof e > "u")
1937
1914
  return 0;
1938
1915
  const t = window.devicePixelRatio || 1;
1939
1916
  return Math.round(e * t) / t || -1e4;
1940
1917
  }
1941
- const bt = 8, ho = 100, po = (e) => ({
1918
+ const vt = 8, no = 100, ro = (e) => ({
1942
1919
  bottom: ["top", "left", "right"],
1943
1920
  "bottom-end": ["top-end", "left", "right"],
1944
1921
  "bottom-start": ["top-start", "left", "right"],
@@ -1952,7 +1929,7 @@ const bt = 8, ho = 100, po = (e) => ({
1952
1929
  "top-end": ["bottom-end", "left", "right"],
1953
1930
  "top-start": ["bottom-start", "left", "right"]
1954
1931
  })[e] ?? [e];
1955
- class uo {
1932
+ class ao {
1956
1933
  constructor(t) {
1957
1934
  this.originalPlacements = /* @__PURE__ */ new WeakMap(), this.allowPlacementUpdate = !1, this.closeForAncestorUpdate = () => {
1958
1935
  !this.allowPlacementUpdate && this.options.type !== "modal" && this.cleanup && this.target.dispatchEvent(new Event("close", { bubbles: !0 })), this.allowPlacementUpdate = !1;
@@ -1965,7 +1942,7 @@ class uo {
1965
1942
  async placeOverlay(t = this.target, o = this.options) {
1966
1943
  if (this.target = t, this.options = o, !t || !o)
1967
1944
  return;
1968
- const i = It(
1945
+ const i = Wt(
1969
1946
  o.trigger,
1970
1947
  t,
1971
1948
  this.closeForAncestorUpdate,
@@ -1974,7 +1951,7 @@ class uo {
1974
1951
  elementResize: !1,
1975
1952
  layoutShift: !1
1976
1953
  }
1977
- ), s = It(
1954
+ ), s = Wt(
1978
1955
  o.trigger,
1979
1956
  t,
1980
1957
  this.updatePlacement,
@@ -1983,12 +1960,12 @@ class uo {
1983
1960
  }
1984
1961
  );
1985
1962
  this.cleanup = () => {
1986
- this.host.elements?.forEach((r) => {
1987
- r.addEventListener(
1963
+ this.host.elements?.forEach((n) => {
1964
+ n.addEventListener(
1988
1965
  "cx-closed",
1989
1966
  () => {
1990
- const n = this.originalPlacements.get(r);
1991
- n && r.setAttribute("placement", n), this.originalPlacements.delete(r);
1967
+ const r = this.originalPlacements.get(n);
1968
+ r && n.setAttribute("placement", r), this.originalPlacements.delete(n);
1992
1969
  },
1993
1970
  { once: !0 }
1994
1971
  );
@@ -1998,37 +1975,37 @@ class uo {
1998
1975
  async computePlacement() {
1999
1976
  const { options: t, target: o } = this;
2000
1977
  await (document.fonts ? document.fonts.ready : Promise.resolve());
2001
- const i = t.trigger instanceof HTMLElement ? Wt() : Wt({
2002
- fallbackPlacements: po(t.placement),
2003
- padding: bt
2004
- }), [s = 0, r = 0] = Array.isArray(t?.offset) ? t.offset : [t.offset, 0], n = this.host.elements.find(
2005
- (u) => u.tipElement
1978
+ const i = t.trigger instanceof HTMLElement ? qt() : qt({
1979
+ fallbackPlacements: ro(t.placement),
1980
+ padding: vt
1981
+ }), [s = 0, n = 0] = Array.isArray(t?.offset) ? t.offset : [t.offset, 0], r = this.host.elements.find(
1982
+ (p) => p.tipElement
2006
1983
  )?.tipElement, a = [
2007
1984
  Ht({
2008
- crossAxis: r,
1985
+ crossAxis: n,
2009
1986
  mainAxis: s
2010
1987
  }),
2011
- Te({ padding: bt }),
1988
+ Te({ padding: vt }),
2012
1989
  i,
2013
- qt({
2014
- apply: ({ availableHeight: u, availableWidth: p, rects: { floating: f } }) => {
2015
- const m = Math.max(
2016
- ho,
2017
- Math.floor(u)
1990
+ Vt({
1991
+ apply: ({ availableHeight: p, availableWidth: u, rects: { floating: f } }) => {
1992
+ const g = Math.max(
1993
+ no,
1994
+ Math.floor(p)
2018
1995
  ), y = f.height;
2019
- this.initialHeight = this.isConstrained && this.initialHeight || y, this.isConstrained = y < this.initialHeight || m <= y;
2020
- const v = this.isConstrained ? `${m}px` : "";
1996
+ this.initialHeight = this.isConstrained && this.initialHeight || y, this.isConstrained = y < this.initialHeight || g <= y;
1997
+ const v = this.isConstrained ? `${g}px` : "";
2021
1998
  Object.assign(o.style, {
2022
1999
  maxHeight: v,
2023
- maxWidth: `${Math.floor(p)}px`
2000
+ maxWidth: `${Math.floor(u)}px`
2024
2001
  });
2025
2002
  },
2026
- padding: bt
2003
+ padding: vt
2027
2004
  }),
2028
- ...n ? [
2005
+ ...r ? [
2029
2006
  De({
2030
- element: n,
2031
- padding: t.tipPadding || bt
2007
+ element: r,
2008
+ padding: t.tipPadding || vt
2032
2009
  })
2033
2010
  ] : []
2034
2011
  ], { middlewareData: l, placement: c, x: h, y: d } = await Le(
@@ -2043,18 +2020,18 @@ class uo {
2043
2020
  if (Object.assign(o.style, {
2044
2021
  left: "0px",
2045
2022
  top: "0px",
2046
- translate: `${vt(h)}px ${vt(d)}px`
2047
- }), o.setAttribute("actual-placement", c), this.host.elements?.forEach((u) => {
2048
- this.originalPlacements.has(u) || this.originalPlacements.set(
2049
- u,
2050
- u.getAttribute("placement")
2051
- ), u.setAttribute("placement", c);
2052
- }), n && l.arrow) {
2053
- const { x: u, y: p } = l.arrow;
2054
- Object.assign(n.style, {
2023
+ translate: `${yt(h)}px ${yt(d)}px`
2024
+ }), o.setAttribute("actual-placement", c), this.host.elements?.forEach((p) => {
2025
+ this.originalPlacements.has(p) || this.originalPlacements.set(
2026
+ p,
2027
+ p.getAttribute("placement")
2028
+ ), p.setAttribute("placement", c);
2029
+ }), r && l.arrow) {
2030
+ const { x: p, y: u } = l.arrow;
2031
+ Object.assign(r.style, {
2055
2032
  left: c.startsWith("bottom") || c.startsWith("top") ? "0px" : "",
2056
2033
  top: c.startsWith("right") || c.startsWith("left") ? "0px" : "",
2057
- translate: `${vt(u)}px ${vt(p)}px`
2034
+ translate: `${yt(p)}px ${yt(u)}px`
2058
2035
  });
2059
2036
  }
2060
2037
  }
@@ -2074,7 +2051,7 @@ class uo {
2074
2051
  );
2075
2052
  }
2076
2053
  }
2077
- var Dt = /* @__PURE__ */ ((e) => (e.Click = "click", e.Hover = "hover", e.LongPress = "longpress", e))(Dt || {});
2054
+ var Lt = /* @__PURE__ */ ((e) => (e.Click = "click", e.Hover = "hover", e.LongPress = "longpress", e))(Lt || {});
2078
2055
  class oe {
2079
2056
  constructor(t, { handleOverlayReady: o, isPersistent: i, overlay: s }) {
2080
2057
  this.target = t, this.isLazilyOpen = !1, this.isPersistent = !1, this.isPersistent = !!i, this.handleOverlayReady = o, this.isPersistent && this.init(), this.overlay = s;
@@ -2095,9 +2072,9 @@ class oe {
2095
2072
  return;
2096
2073
  }
2097
2074
  t && (customElements.whenDefined("cx-overlay").then(async () => {
2098
- const { Overlay: o } = await Promise.resolve().then(() => Ao);
2075
+ const { Overlay: o } = await Promise.resolve().then(() => Eo);
2099
2076
  this.overlay = new o(), this.overlay.open = !0;
2100
- }), Promise.resolve().then(() => Fe));
2077
+ }), Promise.resolve().then(() => _e));
2101
2078
  }
2102
2079
  }
2103
2080
  get overlay() {
@@ -2129,14 +2106,14 @@ class oe {
2129
2106
  this.isPersistent || this.abort();
2130
2107
  }
2131
2108
  }
2132
- const fo = 300, ke = {
2109
+ const lo = 300, $e = {
2133
2110
  keyboard: "Press Space or Alt+Down Arrow for additional options",
2134
2111
  mouse: "Click and hold for additional options",
2135
2112
  touch: "Double tap and long press for additional options"
2136
2113
  };
2137
- class mo extends oe {
2114
+ class co extends oe {
2138
2115
  constructor() {
2139
- super(...arguments), this.type = Dt.LongPress, this.longpressState = null, this.releaseDescription = it, this.handlePointerup = () => {
2116
+ super(...arguments), this.type = Lt.LongPress, this.longpressState = null, this.releaseDescription = Z, this.handlePointerup = () => {
2140
2117
  clearTimeout(this.timeout), this.target && (this.longpressState = this.overlay?.state === "opening" ? "pressed" : null, document.removeEventListener("pointerup", this.handlePointerup), document.removeEventListener("pointercancel", this.handlePointerup));
2141
2118
  };
2142
2119
  }
@@ -2157,7 +2134,7 @@ class mo extends oe {
2157
2134
  }
2158
2135
  })
2159
2136
  );
2160
- }, fo));
2137
+ }, lo));
2161
2138
  }
2162
2139
  handleKeydown(t) {
2163
2140
  const { altKey: o, code: i } = t;
@@ -2184,23 +2161,23 @@ class mo extends oe {
2184
2161
  prepareDescription(t) {
2185
2162
  if (
2186
2163
  // do not reapply until target is recycled
2187
- this.releaseDescription !== it || // require "longpress content" to apply relationship
2164
+ this.releaseDescription !== Z || // require "longpress content" to apply relationship
2188
2165
  !this.overlay.elements.length
2189
2166
  )
2190
2167
  return;
2191
2168
  const o = document.createElement("div");
2192
- o.id = `longpress-describedby-descriptor-${jt()}`;
2169
+ o.id = `longpress-describedby-descriptor-${Ut()}`;
2193
2170
  const i = ai() || li() ? "touch" : "keyboard";
2194
- o.textContent = ke[i], o.slot = "longpress-describedby-descriptor";
2195
- const s = t.getRootNode(), r = this.overlay.getRootNode();
2196
- s === r ? this.overlay.append(o) : (o.hidden = !("host" in s), t.insertAdjacentElement("afterend", o));
2197
- const n = Nt(
2171
+ o.textContent = $e[i], o.slot = "longpress-describedby-descriptor";
2172
+ const s = t.getRootNode(), n = this.overlay.getRootNode();
2173
+ s === n ? this.overlay.append(o) : (o.hidden = !("host" in s), t.insertAdjacentElement("afterend", o));
2174
+ const r = zt(
2198
2175
  t,
2199
2176
  "aria-describedby",
2200
2177
  [o.id]
2201
2178
  );
2202
2179
  this.releaseDescription = () => {
2203
- n(), o.remove(), this.releaseDescription = it;
2180
+ r(), o.remove(), this.releaseDescription = Z;
2204
2181
  };
2205
2182
  }
2206
2183
  shouldCompleteOpen() {
@@ -2226,8 +2203,8 @@ class mo extends oe {
2226
2203
  ));
2227
2204
  }
2228
2205
  }
2229
- const go = Vt`:host{pointer-events:none;--swc-overlay-animation-distance:var(--cx-spacing-medium);display:contents}.dialog{box-sizing:border-box;--cx-overlay-open:true;background:0 0;border:0;max-width:calc(100vw - 16px);height:auto;max-height:calc(100dvh - 16px);margin:0;padding:0;display:flex;position:fixed;inset:0 auto auto 0;overflow:visible;opacity:1!important}.dialog:focus{outline:none}:host(:not([open])) .dialog{--cx-overlay-open:false}.dialog::backdrop{display:none}.dialog:before{content:"";position:absolute;inset:-999em;pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}.dialog.defer-slotted-visibility>slot::slotted(*){filter:opacity(0);pointer-events:none;translate:-200vw -200vh;visibility:hidden!important}.dialog.defer-slotted-visibility.defer-slotted-opened>slot::slotted(*){filter:none;pointer-events:auto;translate:none;visibility:visible!important}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--swc-overlay-animation-distance);margin-top:var(--swc-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--swc-overlay-animation-distance);margin-left:calc(-1 * var(--swc-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--swc-overlay-animation-distance);margin-top:calc(-1 * var(--swc-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--swc-overlay-animation-distance);margin-left:var(--swc-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--swc-overlay-animation-distance);margin-top:var(--swc-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--swc-overlay-animation-distance);margin-left:calc(-1 * var(--swc-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--swc-overlay-animation-distance);margin-top:calc(-1 * var(--swc-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--swc-overlay-animation-distance);margin-left:var(--swc-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1}}@supports (overlay:auto){.dialog{transition:all var(--cx-transition-fast,.13s), translate 0s, display var(--cx-transition-fast,.13s);transition-behavior:allow-discrete}.dialog:popover-open,.dialog:modal{display:flex}}.dialog[actual-placement]{z-index:calc(var(--swc-overlay-z-index-base,1000) + var(--swc-overlay-open-count))}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}}`;
2230
- class yo extends Event {
2206
+ const ho = jt`:host{pointer-events:none;--swc-overlay-animation-distance:var(--cx-spacing-medium);display:contents}.dialog{box-sizing:border-box;--cx-overlay-open:true;background:0 0;border:0;max-width:calc(100vw - 16px);height:auto;max-height:calc(100dvh - 16px);margin:0;padding:0;display:flex;position:fixed;inset:0 auto auto 0;overflow:visible;opacity:1!important}.dialog:focus{outline:none}:host(:not([open])) .dialog{--cx-overlay-open:false}.dialog::backdrop{display:none}.dialog:before{content:"";position:absolute;inset:-999em;pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}.dialog.defer-slotted-visibility>slot::slotted(*){filter:opacity(0);pointer-events:none;translate:-200vw -200vh;visibility:hidden!important}.dialog.defer-slotted-visibility.defer-slotted-opened>slot::slotted(*){filter:none;pointer-events:auto;translate:none;visibility:visible!important}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--swc-overlay-animation-distance);margin-top:var(--swc-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--swc-overlay-animation-distance);margin-left:calc(-1 * var(--swc-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--swc-overlay-animation-distance);margin-top:calc(-1 * var(--swc-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--swc-overlay-animation-distance);margin-left:var(--swc-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--swc-overlay-animation-distance);margin-top:var(--swc-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--swc-overlay-animation-distance);margin-left:calc(-1 * var(--swc-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--swc-overlay-animation-distance);margin-top:calc(-1 * var(--swc-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--swc-overlay-animation-distance);margin-left:var(--swc-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1}}@supports (overlay:auto){.dialog{transition:all var(--cx-transition-fast,.13s), translate 0s, display var(--cx-transition-fast,.13s);transition-behavior:allow-discrete}.dialog:popover-open,.dialog:modal{display:flex}}.dialog[actual-placement]{z-index:calc(var(--swc-overlay-z-index-base,1000) + var(--swc-overlay-open-count))}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}}`;
2207
+ class po extends Event {
2231
2208
  constructor(t, o, i) {
2232
2209
  super("slottable-request", {
2233
2210
  bubbles: !1,
@@ -2236,10 +2213,10 @@ class yo extends Event {
2236
2213
  }), this.name = t, this.data = o, this.slotName = i !== void 0 ? `${t}.${i}` : t;
2237
2214
  }
2238
2215
  }
2239
- const vo = Symbol("remove-slottable-request");
2240
- class bo extends oe {
2216
+ const uo = Symbol("remove-slottable-request");
2217
+ class fo extends oe {
2241
2218
  constructor() {
2242
- super(...arguments), this.type = Dt.Click, this.preventNextToggle = !1;
2219
+ super(...arguments), this.type = Lt.Click, this.preventNextToggle = !1;
2243
2220
  }
2244
2221
  handleClick() {
2245
2222
  this.preventNextToggle || (this.open = !this.open), this.preventNextToggle = !1;
@@ -2259,10 +2236,10 @@ class bo extends oe {
2259
2236
  );
2260
2237
  }
2261
2238
  }
2262
- const wo = 300;
2263
- class xo extends oe {
2239
+ const go = 300;
2240
+ class mo extends oe {
2264
2241
  constructor() {
2265
- super(...arguments), this.type = Dt.Hover, this.elementIds = [], this.focusedin = !1, this.pointerentered = !1;
2242
+ super(...arguments), this.type = Lt.Hover, this.elementIds = [], this.focusedin = !1, this.pointerentered = !1;
2266
2243
  }
2267
2244
  handleTargetFocusin() {
2268
2245
  this.target.matches(":focus-visible") && (this.open = !0, this.focusedin = !0);
@@ -2291,27 +2268,27 @@ class xo extends oe {
2291
2268
  t === i ? this.prepareOverlayRelativeDescription() : t === o && this.prepareContentRelativeDescription();
2292
2269
  }
2293
2270
  prepareOverlayRelativeDescription() {
2294
- const t = Nt(
2271
+ const t = zt(
2295
2272
  this.target,
2296
2273
  "aria-describedby",
2297
2274
  [this.overlay.id]
2298
2275
  );
2299
2276
  this.releaseDescription = () => {
2300
- t(), this.releaseDescription = it;
2277
+ t(), this.releaseDescription = Z;
2301
2278
  };
2302
2279
  }
2303
2280
  prepareContentRelativeDescription() {
2304
- const t = [], o = this.overlay.elements.map((s) => (t.push(s.id), s.id || (s.id = `${this.overlay.tagName.toLowerCase()}-helper-${jt()}`), s.id));
2281
+ const t = [], o = this.overlay.elements.map((s) => (t.push(s.id), s.id || (s.id = `${this.overlay.tagName.toLowerCase()}-helper-${Ut()}`), s.id));
2305
2282
  this.elementIds = t;
2306
- const i = Nt(
2283
+ const i = zt(
2307
2284
  this.target,
2308
2285
  "aria-describedby",
2309
2286
  o
2310
2287
  );
2311
2288
  this.releaseDescription = () => {
2312
- i(), this.overlay.elements.map((s, r) => {
2313
- s.id = this.elementIds[r];
2314
- }), this.releaseDescription = it;
2289
+ i(), this.overlay.elements.map((s, n) => {
2290
+ s.id = this.elementIds[n];
2291
+ }), this.releaseDescription = Z;
2315
2292
  };
2316
2293
  }
2317
2294
  doPointerleave() {
@@ -2319,7 +2296,7 @@ class xo extends oe {
2319
2296
  const t = this.target;
2320
2297
  this.focusedin && t.matches(":focus-visible") || (this.hoverTimeout = setTimeout(() => {
2321
2298
  this.open = !1;
2322
- }, wo));
2299
+ }, go));
2323
2300
  }
2324
2301
  init() {
2325
2302
  this.abortController?.abort(), this.abortController = new AbortController();
@@ -2355,21 +2332,21 @@ class xo extends oe {
2355
2332
  );
2356
2333
  }
2357
2334
  }
2358
- const Eo = {
2359
- click: bo,
2360
- hover: xo,
2361
- longpress: mo
2335
+ const yo = {
2336
+ click: fo,
2337
+ hover: mo,
2338
+ longpress: co
2362
2339
  };
2363
- var Po = Object.defineProperty, Co = Object.getOwnPropertyDescriptor, S = (e, t, o, i) => {
2364
- for (var s = i > 1 ? void 0 : i ? Co(t, o) : t, r = e.length - 1, n; r >= 0; r--)
2365
- (n = e[r]) && (s = (i ? n(t, o, s) : n(s)) || s);
2366
- return i && s && Po(t, o, s), s;
2340
+ var vo = Object.defineProperty, bo = Object.getOwnPropertyDescriptor, R = (e, t, o, i) => {
2341
+ for (var s = i > 1 ? void 0 : i ? bo(t, o) : t, n = e.length - 1, r; n >= 0; n--)
2342
+ (r = e[n]) && (s = (i ? r(t, o, s) : r(s)) || s);
2343
+ return i && s && vo(t, o, s), s;
2367
2344
  };
2368
- const Oo = "showPopover" in document.createElement("div");
2345
+ const wo = "showPopover" in document.createElement("div");
2369
2346
  let ct = ui(dt);
2370
- Oo ? ct = gi(ct) : ct = fi(ct);
2371
- var K;
2372
- const O = (K = class extends ct {
2347
+ wo ? ct = mi(ct) : ct = fi(ct);
2348
+ var q;
2349
+ const O = (q = class extends ct {
2373
2350
  constructor() {
2374
2351
  super(), this._delayed = !1, this.deferSlottedVisibility = !1, this._disabled = !1, this.offset = 0, this._open = !1, this.lastRequestSlottableState = !1, this.receivesFocus = "auto", this._state = "closed", this.triggerElement = null, this.type = "auto", this.wasOpen = !1, this.closeOnFocusOut = (t) => {
2375
2352
  if (!t.relatedTarget)
@@ -2396,16 +2373,16 @@ const O = (K = class extends ct {
2396
2373
  this._disabled = t, t ? (this.strategy?.abort(), this.wasOpen = this.open, this.open = !1) : (this.bindEvents(), this.open = this.open || this.wasOpen, this.wasOpen = !1);
2397
2374
  }
2398
2375
  get hasNonVirtualTrigger() {
2399
- return !!this.triggerElement && !(this.triggerElement instanceof Ot);
2376
+ return !!this.triggerElement && !(this.triggerElement instanceof Ct);
2400
2377
  }
2401
2378
  get placementController() {
2402
- return this._placementController || (this._placementController = new uo(this)), this._placementController;
2379
+ return this._placementController || (this._placementController = new ao(this)), this._placementController;
2403
2380
  }
2404
2381
  get open() {
2405
2382
  return this._open;
2406
2383
  }
2407
2384
  set open(t) {
2408
- t && this.disabled || t !== this.open && (this.strategy?.activelyOpening && !t || (this._open = t, this.open && (K.openCount += 1), this.requestUpdate("open", !this.open), this.open && this.requestSlottable()));
2385
+ t && this.disabled || t !== this.open && (this.strategy?.activelyOpening && !t || (this._open = t, this.open && (q.openCount += 1), this.requestUpdate("open", !this.open), this.open && this.requestSlottable()));
2409
2386
  }
2410
2387
  get state() {
2411
2388
  return this._state;
@@ -2459,7 +2436,7 @@ const O = (K = class extends ct {
2459
2436
  }
2460
2437
  async applyFocus(t, o) {
2461
2438
  if (!(this.receivesFocus === "false" || this.type === "hint")) {
2462
- if (await k(), await k(), t === this.open && !this.open) {
2439
+ if (await L(), await L(), t === this.open && !this.open) {
2463
2440
  this.hasNonVirtualTrigger && this.contains(this.getRootNode().activeElement) && this.triggerElement.focus();
2464
2441
  return;
2465
2442
  }
@@ -2499,7 +2476,7 @@ const O = (K = class extends ct {
2499
2476
  }
2500
2477
  }
2501
2478
  bindEvents() {
2502
- this.strategy?.abort(), this.strategy = void 0, this.hasNonVirtualTrigger && this.triggerInteraction && (this.strategy = new Eo[this.triggerInteraction](
2479
+ this.strategy?.abort(), this.strategy = void 0, this.hasNonVirtualTrigger && this.triggerInteraction && (this.strategy = new yo[this.triggerInteraction](
2503
2480
  this.triggerElement,
2504
2481
  {
2505
2482
  overlay: this
@@ -2528,14 +2505,14 @@ const O = (K = class extends ct {
2528
2505
  }
2529
2506
  requestSlottable() {
2530
2507
  this.lastRequestSlottableState !== this.open && (this.open || document.body.offsetHeight, this.dispatchEvent(
2531
- new yo(
2508
+ new po(
2532
2509
  "overlay-content",
2533
- this.open ? {} : vo
2510
+ this.open ? {} : uo
2534
2511
  )
2535
2512
  ), this.lastRequestSlottableState = this.open);
2536
2513
  }
2537
2514
  willUpdate(t) {
2538
- if (this.hasAttribute("id") || this.setAttribute("id", `${this.tagName.toLowerCase()}-${jt()}`), t.has("open") && (this.hasUpdated || this.open) && this.manageOpen(t.get("open")), t.has("trigger")) {
2515
+ if (this.hasAttribute("id") || this.setAttribute("id", `${this.tagName.toLowerCase()}-${Ut()}`), t.has("open") && (this.hasUpdated || this.open) && this.manageOpen(t.get("open")), t.has("trigger")) {
2539
2516
  const [i, s] = this.trigger?.split("@") || [];
2540
2517
  this.elementResolver.selector = i ? `#${i}` : "", this.triggerInteraction = s;
2541
2518
  }
@@ -2546,11 +2523,11 @@ const O = (K = class extends ct {
2546
2523
  super.updated(t), t.has("placement") && (this.placement ? this.dialogEl.setAttribute("actual-placement", this.placement) : this.dialogEl.removeAttribute("actual-placement"), this.open && typeof t.get("placement") < "u" && this.placementController.resetOverlayPosition()), t.has("state") && this.state === "closed" && typeof t.get("state") < "u" && this.placementController.clearOverlayPosition();
2547
2524
  }
2548
2525
  renderContent() {
2549
- return U`<slot @slotchange=${this.handleSlotchange}></slot>`;
2526
+ return W`<slot @slotchange=${this.handleSlotchange}></slot>`;
2550
2527
  }
2551
2528
  get dialogStyleMap() {
2552
2529
  return {
2553
- "--swc-overlay-open-count": K.openCount.toString()
2530
+ "--swc-overlay-open-count": q.openCount.toString()
2554
2531
  };
2555
2532
  }
2556
2533
  /** Reveal deferred slotted content only after the overlay reaches the opened state. */
@@ -2561,26 +2538,26 @@ const O = (K = class extends ct {
2561
2538
  this.open = !1;
2562
2539
  }
2563
2540
  renderDialog() {
2564
- return U`<dialog class=${ht({
2541
+ return W`<dialog class=${ht({
2565
2542
  "defer-slotted-opened": this.deferSlottedOpened,
2566
2543
  "defer-slotted-visibility": this.deferSlottedVisibility,
2567
2544
  dialog: !0
2568
- })} part="dialog" placement=${Lt(
2545
+ })} part="dialog" placement=${$t(
2569
2546
  this.requiresPosition ? this.placement || "right" : void 0
2570
2547
  )} style=${se(this.dialogStyleMap)} @close=${this.handleBrowserClose} @cancel=${this.handleBrowserClose} @beforetoggle=${this.handleBeforetoggle} ?is-visible=${this.state !== "closed"}>${this.renderContent()}</dialog>`;
2571
2548
  }
2572
2549
  renderPopover() {
2573
- return U`<div class=${ht({
2550
+ return W`<div class=${ht({
2574
2551
  "defer-slotted-opened": this.deferSlottedOpened,
2575
2552
  "defer-slotted-visibility": this.deferSlottedVisibility,
2576
2553
  dialog: !0
2577
- })} part="dialog" placement=${Lt(
2554
+ })} part="dialog" placement=${$t(
2578
2555
  this.requiresPosition ? this.placement || "right" : void 0
2579
- )} popover=${Lt(this.popoverValue)} style=${se(this.dialogStyleMap)} @beforetoggle=${this.handleBeforetoggle} @close=${this.handleBrowserClose} ?is-visible=${this.state !== "closed"}>${this.renderContent()}</div>`;
2556
+ )} popover=${$t(this.popoverValue)} style=${se(this.dialogStyleMap)} @beforetoggle=${this.handleBeforetoggle} @close=${this.handleBrowserClose} ?is-visible=${this.state !== "closed"}>${this.renderContent()}</div>`;
2580
2557
  }
2581
2558
  render() {
2582
2559
  const t = this.type === "modal" || this.type === "page";
2583
- return U`
2560
+ return W`
2584
2561
  ${t ? this.renderDialog() : this.renderPopover()}<slot name="longpress-describedby-descriptor"></slot>`;
2585
2562
  }
2586
2563
  connectedCallback() {
@@ -2589,110 +2566,110 @@ const O = (K = class extends ct {
2589
2566
  disconnectedCallback() {
2590
2567
  super.disconnectedCallback(), this.removeEventListener("close", this.handleClose), this.strategy?.releaseDescription(), this.open = !1;
2591
2568
  }
2592
- }, K.styles = [
2569
+ }, q.styles = [
2593
2570
  ye,
2594
- Vt`
2595
- ${Be(go)}
2571
+ jt`
2572
+ ${Be(ho)}
2596
2573
  `
2597
- ], K.openCount = 1, K);
2598
- S([
2599
- g({ type: Boolean })
2574
+ ], q.openCount = 1, q);
2575
+ R([
2576
+ m({ type: Boolean })
2600
2577
  ], O.prototype, "delayed", 1);
2601
- S([
2602
- g({ attribute: "defer-slotted-visibility", type: Boolean })
2578
+ R([
2579
+ m({ attribute: "defer-slotted-visibility", type: Boolean })
2603
2580
  ], O.prototype, "deferSlottedVisibility", 2);
2604
- S([
2605
- Ct(".dialog")
2581
+ R([
2582
+ Pt(".dialog")
2606
2583
  ], O.prototype, "dialogEl", 2);
2607
- S([
2608
- g({ type: Boolean })
2584
+ R([
2585
+ m({ type: Boolean })
2609
2586
  ], O.prototype, "disabled", 1);
2610
- S([
2611
- Ke({
2587
+ R([
2588
+ Ye({
2612
2589
  flatten: !0,
2613
2590
  selector: ':not([slot="longpress-describedby-descriptor"], slot)'
2614
2591
  // gather only elements slotted into the default slot
2615
2592
  })
2616
2593
  ], O.prototype, "elements", 2);
2617
- S([
2618
- g({ type: Number })
2594
+ R([
2595
+ m({ type: Number })
2619
2596
  ], O.prototype, "offset", 2);
2620
- S([
2621
- g({ reflect: !0, type: Boolean })
2597
+ R([
2598
+ m({ reflect: !0, type: Boolean })
2622
2599
  ], O.prototype, "open", 1);
2623
- S([
2624
- g()
2600
+ R([
2601
+ m()
2625
2602
  ], O.prototype, "placement", 2);
2626
- S([
2627
- g({ attribute: "receives-focus" })
2603
+ R([
2604
+ m({ attribute: "receives-focus" })
2628
2605
  ], O.prototype, "receivesFocus", 2);
2629
- S([
2630
- Ct("slot")
2606
+ R([
2607
+ Pt("slot")
2631
2608
  ], O.prototype, "slotEl", 2);
2632
- S([
2633
- Ie()
2609
+ R([
2610
+ Me()
2634
2611
  ], O.prototype, "state", 1);
2635
- S([
2636
- g({ attribute: "tip-padding", type: Number })
2612
+ R([
2613
+ m({ attribute: "tip-padding", type: Number })
2637
2614
  ], O.prototype, "tipPadding", 2);
2638
- S([
2639
- g()
2615
+ R([
2616
+ m()
2640
2617
  ], O.prototype, "trigger", 2);
2641
- S([
2642
- g({ attribute: "trigger-element" })
2618
+ R([
2619
+ m({ attribute: "trigger-element" })
2643
2620
  ], O.prototype, "triggerElement", 2);
2644
- S([
2645
- g({ attribute: "trigger-interaction" })
2621
+ R([
2622
+ m({ attribute: "trigger-interaction" })
2646
2623
  ], O.prototype, "triggerInteraction", 2);
2647
- S([
2648
- g()
2624
+ R([
2625
+ m()
2649
2626
  ], O.prototype, "type", 2);
2650
- let $e = O;
2651
- const Ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2627
+ let ke = O;
2628
+ const Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2652
2629
  __proto__: null,
2653
- LONGPRESS_INSTRUCTIONS: ke,
2654
- Overlay: $e
2630
+ LONGPRESS_INSTRUCTIONS: $e,
2631
+ Overlay: ke
2655
2632
  }, Symbol.toStringTag, { value: "Module" }));
2656
- Ze("cx-overlay", $e);
2657
- const Fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2633
+ Ze("cx-overlay", ke);
2634
+ const _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2658
2635
  __proto__: null
2659
2636
  }, Symbol.toStringTag, { value: "Module" }));
2660
- var Ne = /* @__PURE__ */ ((e) => (e.Display = "display", e.Visibility = "visibility", e))(Ne || {});
2661
- function So(e) {
2662
- return Ro(e);
2637
+ var Fe = /* @__PURE__ */ ((e) => (e.Display = "display", e.Visibility = "visibility", e))(Fe || {});
2638
+ function xo(e) {
2639
+ return Po(e);
2663
2640
  }
2664
- function Ft(e) {
2641
+ function Nt(e) {
2665
2642
  return e.assignedSlot ? e.assignedSlot : e.parentNode instanceof ShadowRoot ? e.parentNode.host : e.parentNode;
2666
2643
  }
2667
- function Ro(e) {
2668
- for (let t = e; t; t = Ft(t)) if (t instanceof Element && getComputedStyle(t).display === "none") return null;
2669
- for (let t = Ft(e); t; t = Ft(t)) {
2644
+ function Po(e) {
2645
+ for (let t = e; t; t = Nt(t)) if (t instanceof Element && getComputedStyle(t).display === "none") return null;
2646
+ for (let t = Nt(e); t; t = Nt(t)) {
2670
2647
  if (!(t instanceof Element)) continue;
2671
2648
  const o = getComputedStyle(t);
2672
- if (o.display !== "contents" && (o.position !== "static" || Rt(o) || t.tagName === "BODY"))
2649
+ if (o.display !== "contents" && (o.position !== "static" || St(o) || t.tagName === "BODY"))
2673
2650
  return t;
2674
2651
  }
2675
2652
  return null;
2676
2653
  }
2677
- const To = Vt`:host{--arrow-color:var(--cx-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * .7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));-webkit-overflow-scrolling:auto;display:contents}.popup{isolation:isolate;max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none);position:absolute}.popup--use-size-middleware{width:max-content}.popup--fixed,.popup--overlay{z-index:var(--cx-z-index-dialog);position:fixed}:host(:not([toggle=visibility])) .popup:not(.popup--active){display:none}:host([toggle=visibility]) .popup:not(.popup--active){visibility:hidden}.popup__arrow{width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);background:var(--arrow-color);z-index:-1;position:absolute;rotate:45deg}.popup-hover-bridge:not(.popup-hover-bridge--visible){visibility:hidden}.popup-hover-bridge{z-index:calc(var(--cx-z-index-dropdown) - 1);clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0), var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0), var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0), var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0));position:fixed;inset:0}`;
2678
- var Do = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, w = (e, t, o, i) => {
2679
- for (var s = i > 1 ? void 0 : i ? Lo(t, o) : t, r = e.length - 1, n; r >= 0; r--)
2680
- (n = e[r]) && (s = (i ? n(t, o, s) : n(s)) || s);
2681
- return i && s && Do(t, o, s), s;
2654
+ const Co = jt`:host{--arrow-color:var(--cx-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * .7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));-webkit-overflow-scrolling:auto;display:contents}.popup{isolation:isolate;max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none);position:absolute}.popup--use-size-middleware{width:max-content}.popup--fixed,.popup--overlay{z-index:var(--cx-z-index-dialog);position:fixed}:host(:not([toggle=visibility])) .popup:not(.popup--active){display:none}:host([toggle=visibility]) .popup:not(.popup--active){visibility:hidden}.popup__arrow{width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);background:var(--arrow-color);z-index:-1;position:absolute;rotate:45deg}.popup-hover-bridge:not(.popup-hover-bridge--visible){visibility:hidden}.popup-hover-bridge{z-index:calc(var(--cx-z-index-dropdown) - 1);clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0), var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0), var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0), var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0));position:fixed;inset:0}`;
2655
+ var Oo = Object.defineProperty, Ao = Object.getOwnPropertyDescriptor, w = (e, t, o, i) => {
2656
+ for (var s = i > 1 ? void 0 : i ? Ao(t, o) : t, n = e.length - 1, r; n >= 0; n--)
2657
+ (r = e[n]) && (s = (i ? r(t, o, s) : r(s)) || s);
2658
+ return i && s && Oo(t, o, s), s;
2682
2659
  };
2683
- function ko(e) {
2660
+ function Ro(e) {
2684
2661
  if (e == null || typeof e != "object")
2685
2662
  return !1;
2686
2663
  const t = "contextElement" in e ? e.contextElement.ownerDocument.defaultView : null;
2687
2664
  return "getBoundingClientRect" in e && ("contextElement" in e ? e.contextElement instanceof (t?.Element ?? Element) : !0);
2688
2665
  }
2689
- let b = class extends Me {
2666
+ let b = class extends Ie {
2690
2667
  constructor() {
2691
- super(...arguments), this.isTornDown = !1, this.localize = new Ue(this), this.active = !1, this.placement = "top", this.strategy = "absolute", this.toggle = Ne.Display, this.distance = 0, this.skidding = 0, this.arrow = !1, this.arrowPlacement = "anchor", this.arrowPadding = 10, this.flip = !1, this.hide = !1, this.hideBoundaryStrategy = "escaped", this.flipFallbackPlacements = "", this.flipFallbackStrategy = "best-fit", this.flipPadding = 0, this.shift = !1, this.shiftPadding = 0, this.autoSizePadding = 0, this.hoverBridge = !1, this.autoWidthFactor = 1, this.updateHoverBridge = () => {
2668
+ super(...arguments), this.isTornDown = !1, this.localize = new Ue(this), this.active = !1, this.placement = "top", this.strategy = "absolute", this.toggle = Fe.Display, this.distance = 0, this.skidding = 0, this.arrow = !1, this.arrowPlacement = "anchor", this.arrowPadding = 10, this.flip = !1, this.hide = !1, this.hideBoundaryStrategy = "escaped", this.flipFallbackPlacements = "", this.flipFallbackStrategy = "best-fit", this.flipPadding = 0, this.shift = !1, this.shiftPadding = 0, this.autoSizePadding = 0, this.hoverBridge = !1, this.autoWidthFactor = 1, this.updateHoverBridge = () => {
2692
2669
  if (this.hoverBridge && this.anchorEl) {
2693
2670
  const e = this.anchorEl.getBoundingClientRect(), t = this.popup.getBoundingClientRect(), o = this.placement.includes("top") || this.placement.includes("bottom") || this.placement === "center";
2694
- let i = 0, s = 0, r = 0, n = 0, a = 0, l = 0, c = 0, h = 0;
2695
- o ? e.top < t.top ? (i = e.left, s = e.bottom, r = e.right, n = e.bottom, a = t.left, l = t.top, c = t.right, h = t.top) : (i = t.left, s = t.bottom, r = t.right, n = t.bottom, a = e.left, l = e.top, c = e.right, h = e.top) : e.left < t.left ? (i = e.right, s = e.top, r = t.left, n = t.top, a = e.right, l = e.bottom, c = t.left, h = t.bottom) : (i = t.right, s = t.top, r = e.left, n = e.top, a = t.right, l = t.bottom, c = e.left, h = e.bottom), this.style.setProperty("--hover-bridge-top-left-x", `${i}px`), this.style.setProperty("--hover-bridge-top-left-y", `${s}px`), this.style.setProperty("--hover-bridge-top-right-x", `${r}px`), this.style.setProperty("--hover-bridge-top-right-y", `${n}px`), this.style.setProperty(
2671
+ let i = 0, s = 0, n = 0, r = 0, a = 0, l = 0, c = 0, h = 0;
2672
+ o ? e.top < t.top ? (i = e.left, s = e.bottom, n = e.right, r = e.bottom, a = t.left, l = t.top, c = t.right, h = t.top) : (i = t.left, s = t.bottom, n = t.right, r = t.bottom, a = e.left, l = e.top, c = e.right, h = e.top) : e.left < t.left ? (i = e.right, s = e.top, n = t.left, r = t.top, a = e.right, l = e.bottom, c = t.left, h = t.bottom) : (i = t.right, s = t.top, n = e.left, r = e.top, a = t.right, l = t.bottom, c = e.left, h = e.bottom), this.style.setProperty("--hover-bridge-top-left-x", `${i}px`), this.style.setProperty("--hover-bridge-top-left-y", `${s}px`), this.style.setProperty("--hover-bridge-top-right-x", `${n}px`), this.style.setProperty("--hover-bridge-top-right-y", `${r}px`), this.style.setProperty(
2696
2673
  "--hover-bridge-bottom-left-x",
2697
2674
  `${a}px`
2698
2675
  ), this.style.setProperty(
@@ -2723,7 +2700,7 @@ let b = class extends Me {
2723
2700
  }
2724
2701
  connectedUpdatedCallback() {
2725
2702
  if (this.strategy === "overlay" && (this.start(), !ne)) {
2726
- const e = We(this);
2703
+ const e = He(this);
2727
2704
  e && (this.autoSizeBoundary = e, this.flipBoundary = e, this.shiftBoundary = e);
2728
2705
  }
2729
2706
  }
@@ -2739,7 +2716,7 @@ let b = class extends Me {
2739
2716
  if (await this.stop(), this.anchor && typeof this.anchor == "string") {
2740
2717
  const e = this.getRootNode();
2741
2718
  this.anchorEl = e.getElementById(this.anchor);
2742
- } else this.anchor instanceof Element || ko(this.anchor) ? this.anchorEl = this.anchor : this.anchorEl = this.querySelector('[slot="anchor"]');
2719
+ } else this.anchor instanceof Element || Ro(this.anchor) ? this.anchorEl = this.anchor : this.anchorEl = this.querySelector('[slot="anchor"]');
2743
2720
  this.anchorEl instanceof HTMLSlotElement && (this.anchorEl = this.anchorEl.assignedElements({
2744
2721
  flatten: !0
2745
2722
  })[0]), this.anchorEl instanceof Element && this.anchorEl.tagName.toLowerCase() === "cx-dialog" && (this.anchorEl = this.anchorEl?.shadowRoot?.querySelector(
@@ -2747,7 +2724,7 @@ let b = class extends Me {
2747
2724
  )), this.anchorEl && this.start();
2748
2725
  }
2749
2726
  start() {
2750
- !this.anchorEl || !this.isConnected || this.isTornDown || (this.stopImmediate(), this.cleanup = It(this.anchorEl, this.popup, () => {
2727
+ !this.anchorEl || !this.isConnected || this.isTornDown || (this.stopImmediate(), this.cleanup = Wt(this.anchorEl, this.popup, () => {
2751
2728
  this.reposition();
2752
2729
  }), (this.isTornDown || !this.isConnected) && this.stopImmediate());
2753
2730
  }
@@ -2770,14 +2747,14 @@ let b = class extends Me {
2770
2747
  ) : Ht({ crossAxis: this.skidding, mainAxis: this.distance })
2771
2748
  ];
2772
2749
  this.sync ? e.push(
2773
- qt({
2750
+ Vt({
2774
2751
  apply: ({ rects: t }) => {
2775
2752
  const o = this.sync === "width" || this.sync === "both", i = this.sync === "height" || this.sync === "both", s = this.syncElement ? this.syncElement.getBoundingClientRect() : t.reference;
2776
2753
  this.popup.style.width = o ? `${s.width}px` : "", this.popup.style.height = i ? `${s.height}px` : "";
2777
2754
  }
2778
2755
  })
2779
2756
  ) : (this.popup.style.width = "", this.popup.style.height = ""), this.flip && e.push(
2780
- Wt({
2757
+ qt({
2781
2758
  boundary: this.flipBoundary,
2782
2759
  // @ts-expect-error - We're converting a string attribute to an array here
2783
2760
  fallbackPlacements: this.flipFallbackPlacements,
@@ -2790,7 +2767,7 @@ let b = class extends Me {
2790
2767
  padding: this.shiftPadding
2791
2768
  })
2792
2769
  ), this.autoSize ? e.push(
2793
- qt({
2770
+ Vt({
2794
2771
  apply: ({ availableHeight: t, availableWidth: o }) => {
2795
2772
  this.autoSize === "vertical" || this.autoSize === "both" ? this.style.setProperty(
2796
2773
  "--auto-size-available-height",
@@ -2809,7 +2786,7 @@ let b = class extends Me {
2809
2786
  padding: this.arrowPadding
2810
2787
  })
2811
2788
  ), this.hide && e.push(
2812
- co({
2789
+ so({
2813
2790
  boundary: this.hideBoundary,
2814
2791
  strategy: this.hideBoundaryStrategy
2815
2792
  })
@@ -2818,19 +2795,19 @@ let b = class extends Me {
2818
2795
  placement: this.placement === "center" ? "bottom" : this.placement,
2819
2796
  platform: {
2820
2797
  ...Mt,
2821
- getOffsetParent: (t) => this.strategy === "absolute" ? Mt.getOffsetParent(t, So) : this.strategy === "overlay" && ne ? window : qe(t) || window
2798
+ getOffsetParent: (t) => this.strategy === "absolute" ? Mt.getOffsetParent(t, xo) : this.strategy === "overlay" && ne ? window : qe(t) || window
2822
2799
  },
2823
2800
  strategy: ["overlay", "fixed"].includes(this.strategy) ? "fixed" : "absolute"
2824
2801
  }).then(({ middlewareData: t, placement: o, x: i, y: s }) => {
2825
- const r = this.localize.dir() === "rtl", n = {
2802
+ const n = this.localize.dir() === "rtl", r = {
2826
2803
  bottom: "top",
2827
2804
  left: "right",
2828
2805
  right: "left",
2829
2806
  top: "bottom"
2830
2807
  }[o.split("-")[0]];
2831
2808
  if (this.setAttribute("data-current-placement", o), this.anchorEl === document.body && this.placement === "center") {
2832
- const a = window.innerWidth, l = window.innerHeight, c = this.popup.offsetWidth, h = this.popup.offsetHeight, d = (a - c) / 2, u = (l - h) / 2;
2833
- Object.assign(this.popup.style, { left: `${d}px`, top: `${u}px` });
2809
+ const a = window.innerWidth, l = window.innerHeight, c = this.popup.offsetWidth, h = this.popup.offsetHeight, d = (a - c) / 2, p = (l - h) / 2;
2810
+ Object.assign(this.popup.style, { left: `${d}px`, top: `${p}px` });
2834
2811
  } else
2835
2812
  Object.assign(this.popup.style, {
2836
2813
  left: `${i}px`,
@@ -2838,21 +2815,21 @@ let b = class extends Me {
2838
2815
  });
2839
2816
  if (this.arrow) {
2840
2817
  const a = t.arrow.x, l = t.arrow.y;
2841
- let c = "", h = "", d = "", u = "";
2818
+ let c = "", h = "", d = "", p = "";
2842
2819
  if (this.arrowPlacement === "start") {
2843
- const p = typeof a == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
2844
- c = typeof l == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "", h = r ? p : "", u = r ? "" : p;
2820
+ const u = typeof a == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
2821
+ c = typeof l == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "", h = n ? u : "", p = n ? "" : u;
2845
2822
  } else if (this.arrowPlacement === "end") {
2846
- const p = typeof a == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
2847
- h = r ? "" : p, u = r ? p : "", d = typeof l == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
2848
- } else this.arrowPlacement === "center" ? (u = typeof a == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "", c = typeof l == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "") : (u = typeof a == "number" ? `${a}px` : "", c = typeof l == "number" ? `${l}px` : "");
2823
+ const u = typeof a == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
2824
+ h = n ? "" : u, p = n ? u : "", d = typeof l == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
2825
+ } else this.arrowPlacement === "center" ? (p = typeof a == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "", c = typeof l == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "") : (p = typeof a == "number" ? `${a}px` : "", c = typeof l == "number" ? `${l}px` : "");
2849
2826
  Object.assign(this.arrowEl.style, {
2850
2827
  bottom: d,
2851
- left: u,
2828
+ left: p,
2852
2829
  right: h,
2853
2830
  top: c
2854
2831
  }), this.arrowEl.style.setProperty(
2855
- n,
2832
+ r,
2856
2833
  "calc(var(--arrow-size-diagonal) * -1)"
2857
2834
  );
2858
2835
  }
@@ -2866,81 +2843,81 @@ let b = class extends Me {
2866
2843
  });
2867
2844
  }
2868
2845
  render() {
2869
- const e = U`<cx-overlay ?open=${this.active} defer-slotted-visibility placement="bottom" type="manual" @cx-opened=${this.handleOverlayOpened}><div part="popup" class=${ht({
2846
+ const e = W`<cx-overlay ?open=${this.active} defer-slotted-visibility placement="bottom" type="manual" @cx-opened=${this.handleOverlayOpened}><div part="popup" class=${ht({
2870
2847
  popup: !0,
2871
2848
  "popup--active": this.active,
2872
2849
  "popup--has-arrow": this.arrow,
2873
2850
  "popup--overlay": !0,
2874
2851
  "popup--use-size-middleware": this.isSizeMiddleWareUsed
2875
- })}><slot></slot>${this.arrow ? U`<div part="arrow" class="popup__arrow" role="presentation"></div>` : ""}</div></cx-overlay>`;
2876
- return U`<slot name="anchor" @slotchange=${this.handleAnchorChange}></slot><span part="hover-bridge" class=${ht({
2852
+ })}><slot></slot>${this.arrow ? W`<div part="arrow" class="popup__arrow" role="presentation"></div>` : ""}</div></cx-overlay>`;
2853
+ return W`<slot name="anchor" @slotchange=${this.handleAnchorChange}></slot><span part="hover-bridge" class=${ht({
2877
2854
  "popup-hover-bridge": !0,
2878
2855
  "popup-hover-bridge--visible": this.hoverBridge && this.active
2879
- })}></span>${Ye(
2856
+ })}></span>${Xe(
2880
2857
  this.strategy === "overlay",
2881
2858
  () => e,
2882
- () => U`<div part="popup" class=${ht({
2859
+ () => W`<div part="popup" class=${ht({
2883
2860
  popup: !0,
2884
2861
  "popup--active": this.active,
2885
2862
  "popup--fixed": this.strategy === "fixed",
2886
2863
  "popup--has-arrow": this.arrow,
2887
2864
  "popup--use-size-middleware": this.isSizeMiddleWareUsed
2888
- })}><slot></slot>${this.arrow ? U`<div part="arrow" class="popup__arrow" role="presentation"></div>` : ""}</div>`
2865
+ })}><slot></slot>${this.arrow ? W`<div part="arrow" class="popup__arrow" role="presentation"></div>` : ""}</div>`
2889
2866
  )}
2890
2867
  `;
2891
2868
  }
2892
2869
  };
2893
- b.styles = [ye, To];
2870
+ b.styles = [ye, Co];
2894
2871
  w([
2895
- Ct(".popup")
2872
+ Pt(".popup")
2896
2873
  ], b.prototype, "popup", 2);
2897
2874
  w([
2898
- Ct(".popup__arrow")
2875
+ Pt(".popup__arrow")
2899
2876
  ], b.prototype, "arrowEl", 2);
2900
2877
  w([
2901
- g()
2878
+ m()
2902
2879
  ], b.prototype, "anchor", 2);
2903
2880
  w([
2904
- g({ reflect: !0, type: Boolean })
2881
+ m({ reflect: !0, type: Boolean })
2905
2882
  ], b.prototype, "active", 2);
2906
2883
  w([
2907
- g({ reflect: !0 })
2884
+ m({ reflect: !0 })
2908
2885
  ], b.prototype, "placement", 2);
2909
2886
  w([
2910
- g({ reflect: !0 })
2887
+ m({ reflect: !0 })
2911
2888
  ], b.prototype, "strategy", 2);
2912
2889
  w([
2913
- g({ reflect: !0, type: String })
2890
+ m({ reflect: !0, type: String })
2914
2891
  ], b.prototype, "toggle", 2);
2915
2892
  w([
2916
- g({ type: Number })
2893
+ m({ type: Number })
2917
2894
  ], b.prototype, "distance", 2);
2918
2895
  w([
2919
- g({ type: Number })
2896
+ m({ type: Number })
2920
2897
  ], b.prototype, "skidding", 2);
2921
2898
  w([
2922
- g({ type: Boolean })
2899
+ m({ type: Boolean })
2923
2900
  ], b.prototype, "arrow", 2);
2924
2901
  w([
2925
- g({ attribute: "arrow-placement" })
2902
+ m({ attribute: "arrow-placement" })
2926
2903
  ], b.prototype, "arrowPlacement", 2);
2927
2904
  w([
2928
- g({ attribute: "arrow-padding", type: Number })
2905
+ m({ attribute: "arrow-padding", type: Number })
2929
2906
  ], b.prototype, "arrowPadding", 2);
2930
2907
  w([
2931
- g({ type: Boolean })
2908
+ m({ type: Boolean })
2932
2909
  ], b.prototype, "flip", 2);
2933
2910
  w([
2934
- g({ type: Boolean })
2911
+ m({ type: Boolean })
2935
2912
  ], b.prototype, "hide", 2);
2936
2913
  w([
2937
- g({ attribute: "hide-boundary", type: Object })
2914
+ m({ attribute: "hide-boundary", type: Object })
2938
2915
  ], b.prototype, "hideBoundary", 2);
2939
2916
  w([
2940
- g({ attribute: "hide-boundary-strategy" })
2917
+ m({ attribute: "hide-boundary-strategy" })
2941
2918
  ], b.prototype, "hideBoundaryStrategy", 2);
2942
2919
  w([
2943
- g({
2920
+ m({
2944
2921
  attribute: "flip-fallback-placements",
2945
2922
  converter: {
2946
2923
  fromAttribute: (e) => e.split(" ").map((t) => t.trim()).filter((t) => t !== ""),
@@ -2949,43 +2926,43 @@ w([
2949
2926
  })
2950
2927
  ], b.prototype, "flipFallbackPlacements", 2);
2951
2928
  w([
2952
- g({ attribute: "flip-fallback-strategy" })
2929
+ m({ attribute: "flip-fallback-strategy" })
2953
2930
  ], b.prototype, "flipFallbackStrategy", 2);
2954
2931
  w([
2955
- g({ attribute: "flip-boundary", type: Object })
2932
+ m({ attribute: "flip-boundary", type: Object })
2956
2933
  ], b.prototype, "flipBoundary", 2);
2957
2934
  w([
2958
- g({ attribute: "flip-padding", type: Number })
2935
+ m({ attribute: "flip-padding", type: Number })
2959
2936
  ], b.prototype, "flipPadding", 2);
2960
2937
  w([
2961
- g({ type: Boolean })
2938
+ m({ type: Boolean })
2962
2939
  ], b.prototype, "shift", 2);
2963
2940
  w([
2964
- g({ attribute: "shift-boundary", type: Object })
2941
+ m({ attribute: "shift-boundary", type: Object })
2965
2942
  ], b.prototype, "shiftBoundary", 2);
2966
2943
  w([
2967
- g({ attribute: "shift-padding", type: Number })
2944
+ m({ attribute: "shift-padding", type: Number })
2968
2945
  ], b.prototype, "shiftPadding", 2);
2969
2946
  w([
2970
- g({ attribute: "auto-size" })
2947
+ m({ attribute: "auto-size" })
2971
2948
  ], b.prototype, "autoSize", 2);
2972
2949
  w([
2973
- g()
2950
+ m()
2974
2951
  ], b.prototype, "sync", 2);
2975
2952
  w([
2976
- g({ attribute: "sync-element" })
2953
+ m({ attribute: "sync-element" })
2977
2954
  ], b.prototype, "syncElement", 2);
2978
2955
  w([
2979
- g({ attribute: "auto-size-boundary", type: Object })
2956
+ m({ attribute: "auto-size-boundary", type: Object })
2980
2957
  ], b.prototype, "autoSizeBoundary", 2);
2981
2958
  w([
2982
- g({ attribute: "auto-size-padding", type: Number })
2959
+ m({ attribute: "auto-size-padding", type: Number })
2983
2960
  ], b.prototype, "autoSizePadding", 2);
2984
2961
  w([
2985
- g({ attribute: "hover-bridge", type: Boolean })
2962
+ m({ attribute: "hover-bridge", type: Boolean })
2986
2963
  ], b.prototype, "hoverBridge", 2);
2987
2964
  w([
2988
- g({ attribute: "auto-width-factor" })
2965
+ m({ attribute: "auto-width-factor" })
2989
2966
  ], b.prototype, "autoWidthFactor", 2);
2990
2967
  w([
2991
2968
  je(200)