vrembem 4.0.0-next.29 → 4.0.0-next.30

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.
package/dist/index.js CHANGED
@@ -2,11 +2,11 @@ var te = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
4
  var ee = (t, e, i) => e.has(t) || te("Cannot " + i);
5
- var w = (t, e, i) => (ee(t, e, "read from private field"), i ? i.call(t) : e.get(t)), k = (t, e, i) => e.has(t) ? te("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), E = (t, e, i, s) => (ee(t, e, "write to private field"), s ? s.call(t, i) : e.set(t, i), i);
5
+ var w = (t, e, i) => (ee(t, e, "read from private field"), i ? i.call(t) : e.get(t)), $ = (t, e, i) => e.has(t) ? te("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), E = (t, e, i, s) => (ee(t, e, "write to private field"), s ? s.call(t, i) : e.set(t, i), i);
6
6
  function le(t) {
7
7
  return t.split("-").map((e, i) => i === 0 ? e : e.charAt(0).toUpperCase() + e.slice(1)).join("");
8
8
  }
9
- function Ut(t) {
9
+ function Kt(t) {
10
10
  return t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
11
11
  }
12
12
  function ae(t) {
@@ -19,7 +19,7 @@ function ae(t) {
19
19
  }
20
20
  throw new Error(`Could not convert value to milliseconds: ${t}`);
21
21
  }
22
- function Rt() {
22
+ function Pt() {
23
23
  return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
24
24
  }
25
25
  function ce(t, e) {
@@ -29,7 +29,7 @@ function ce(t, e) {
29
29
  ...e
30
30
  };
31
31
  if (t.slice(0, 2) !== "--") {
32
- const n = Rt();
32
+ const n = Pt();
33
33
  n && (t = `${n}${t}`), t = `--${t}`;
34
34
  }
35
35
  const s = getComputedStyle(i.element).getPropertyValue(t).trim();
@@ -44,9 +44,9 @@ function fe(t, e = "config") {
44
44
  return s ? JSON.parse(s) : {};
45
45
  }
46
46
  function ue(t) {
47
- const e = getComputedStyle(t.el), i = {}, s = Object.keys(t.context.settings);
47
+ const e = getComputedStyle(t.el), i = {}, s = t.getSetting("customProps");
48
48
  for (let n = 0; n < s.length; n++) {
49
- const o = Rt(), r = t.context.module.toLowerCase(), l = Ut(s[n]), a = e.getPropertyValue(`--${o}${r}-${l}`).trim();
49
+ const o = Pt(), r = t.context.module.toLowerCase(), l = Kt(s[n]), a = e.getPropertyValue(`--${o}${r}-${l}`).trim();
50
50
  a && (i[l] = a);
51
51
  }
52
52
  return i;
@@ -54,6 +54,23 @@ function ue(t) {
54
54
  function de(t) {
55
55
  return typeof t == "string" ? document.getElementById(t) : t instanceof HTMLElement ? t : null;
56
56
  }
57
+ function Me(t, e, i = "camel") {
58
+ return e = i === "camel" ? le(e) : Kt(e), t.split(".").concat(e).reduce((s, n) => s == null ? void 0 : s[n], this);
59
+ }
60
+ function he(t, e = {}) {
61
+ const {
62
+ fallback: i,
63
+ props: s = ["dataConfig", "customProps", "settings", "context.settings"]
64
+ } = e;
65
+ for (const n of s) {
66
+ const o = n !== "customProps" ? "camel" : "kebab", r = Me.call(this, n, t, o);
67
+ if (r !== void 0)
68
+ return r;
69
+ }
70
+ if (i !== void 0)
71
+ return i;
72
+ throw new Error(`${this.context.module} setting does not exist: ${t}`);
73
+ }
57
74
  async function C(t, ...e) {
58
75
  t in this && typeof this[t] == "function" && await this[t](...e);
59
76
  }
@@ -64,44 +81,45 @@ function St(t, e, i, s, n = 0) {
64
81
  }, ae(n));
65
82
  });
66
83
  }
67
- function De(t, e) {
84
+ function Fe(t, e) {
68
85
  e && document.querySelectorAll(e).forEach((s) => {
69
86
  t ? s.style.overflow = "hidden" : s.style.removeProperty("overflow");
70
87
  });
71
88
  }
72
- function Me(t, e) {
89
+ function Ie(t, e) {
73
90
  e && document.querySelectorAll(e).forEach((s) => {
74
91
  t ? (s.inert = !0, s.setAttribute("aria-hidden", !0)) : (s.inert = null, s.removeAttribute("aria-hidden"));
75
92
  });
76
93
  }
77
94
  function Et(t, e, i) {
78
- Me(!!t, e), De(!!t, i);
95
+ Ie(!!t, e), Fe(!!t, i);
79
96
  }
80
- var R;
81
- class he {
97
+ var P;
98
+ class ge {
82
99
  constructor(e, i) {
83
- k(this, R);
84
- this.value = e, E(this, R, i), this.mql = null;
100
+ $(this, P);
101
+ this.value = e, E(this, P, i), this.mql = null;
85
102
  }
86
103
  get handler() {
87
- return w(this, R);
104
+ return w(this, P);
88
105
  }
89
106
  // Unmount existing handler before setting a new one.
90
107
  set handler(e) {
91
- this.mql && this.mql.removeEventListener("change", w(this, R)), E(this, R, e);
108
+ this.mql && this.mql.removeEventListener("change", w(this, P)), E(this, P, e);
92
109
  }
93
110
  mount(e, i) {
94
- return e && (this.value = e), i && E(this, R, i), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), this.mql.addEventListener("change", w(this, R)), w(this, R).call(this, this.mql), this) : this;
111
+ return e && (this.value = e), i && E(this, P, i), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), this.mql.addEventListener("change", w(this, P)), w(this, P).call(this, this.mql), this) : this;
95
112
  }
96
113
  unmount() {
97
- return this.mql ? (this.mql.removeEventListener("change", w(this, R)), this.value = null, E(this, R, null), this.mql = null, this) : this;
114
+ return this.mql ? (this.mql.removeEventListener("change", w(this, P)), this.value = null, E(this, P, null), this.mql = null, this) : this;
98
115
  }
99
116
  }
100
- R = new WeakMap();
101
- class Pt {
117
+ P = new WeakMap();
118
+ class Rt {
102
119
  constructor(e = {}) {
103
120
  this.module = this.constructor.name, this.collection = [], this.settings = Object.assign({
104
121
  dataConfig: "config",
122
+ customProps: [],
105
123
  teleport: null,
106
124
  teleportMethod: "append"
107
125
  }, e);
@@ -156,17 +174,8 @@ class Ct {
156
174
  getCustomProps() {
157
175
  return Object.assign(this.customProps, ue(this));
158
176
  }
159
- getSetting(e) {
160
- const i = le(e), s = Ut(e);
161
- if ("dataConfig" in this && i in this.dataConfig)
162
- return this.dataConfig[i];
163
- if ("customProps" in this && s in this.customProps)
164
- return this.customProps[s];
165
- if ("settings" in this && i in this.settings)
166
- return this.settings[i];
167
- if ("settings" in this.context && i in this.context.settings)
168
- return this.context.settings[i];
169
- throw new Error(`${this.context.module} setting does not exist: ${e}`);
177
+ getSetting(e, i = {}) {
178
+ return he.call(this, e, i);
170
179
  }
171
180
  async mount(e = {}) {
172
181
  if (this.el === null)
@@ -184,12 +193,12 @@ class Ct {
184
193
  }
185
194
  }
186
195
  var nt, G, J;
187
- class Kt {
196
+ class jt {
188
197
  constructor(e = null, i = "[data-focus]") {
189
- k(this, nt);
190
- k(this, G);
191
- k(this, J);
192
- this.el = e, this.selectorFocus = i, E(this, G, Ie.bind(this)), E(this, J, Ne.bind(this));
198
+ $(this, nt);
199
+ $(this, G);
200
+ $(this, J);
201
+ this.el = e, this.selectorFocus = i, E(this, G, Be.bind(this)), E(this, J, Ve.bind(this));
193
202
  }
194
203
  get focusable() {
195
204
  return w(this, nt);
@@ -213,14 +222,14 @@ class Kt {
213
222
  (e.querySelector(i) || e).focus();
214
223
  }
215
224
  getFocusable(e = this.el) {
216
- const i = [], s = document.activeElement, n = e.scrollTop, o = Fe.join(",");
225
+ const i = [], s = document.activeElement, n = e.scrollTop, o = Ne.join(",");
217
226
  return e.querySelectorAll(o).forEach((l) => {
218
227
  l.focus(), document.activeElement === l && i.push(l);
219
228
  }), e.scrollTop = n, s.focus(), i;
220
229
  }
221
230
  }
222
231
  nt = new WeakMap(), G = new WeakMap(), J = new WeakMap();
223
- const L = ":not([inert])", O = ':not([tabindex^="-"])', yt = ":not(:disabled)", Fe = [
232
+ const L = ":not([inert])", O = ':not([tabindex^="-"])', yt = ":not(:disabled)", Ne = [
224
233
  `a[href]${L}${O}`,
225
234
  `area[href]${L}${O}`,
226
235
  `input:not([type="hidden"]):not([type="radio"])${L}${O}${yt}`,
@@ -235,10 +244,10 @@ const L = ":not([inert])", O = ':not([tabindex^="-"])', yt = ":not(:disabled)",
235
244
  `[contenteditable]${L}${O}`,
236
245
  `[tabindex]${L}${O}`
237
246
  ];
238
- function Ie(t) {
247
+ function Be(t) {
239
248
  (t.key === "Tab" || t.keyCode === 9) && (t.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (t.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (t.preventDefault(), this.focusableFirst.focus()));
240
249
  }
241
- function Ne(t) {
250
+ function Ve(t) {
242
251
  (t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
243
252
  }
244
253
  function Xt(t, e = !0) {
@@ -259,7 +268,7 @@ function Vt(t, e, i) {
259
268
  let o = null;
260
269
  return s || (o = document.createComment("teleported #" + t.id), t.before(o)), e[i](t), s && e.remove(), o;
261
270
  }
262
- function Be(t) {
271
+ function He(t) {
263
272
  const e = {
264
273
  prefix: ce("prefix-themes", { fallback: "vb-theme-" }),
265
274
  themes: ["root", "light", "dark"],
@@ -309,27 +318,28 @@ function Be(t) {
309
318
  };
310
319
  return n.callback("onInit"), n;
311
320
  }
312
- const Zi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
321
+ const qi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
313
322
  __proto__: null,
314
- Breakpoint: he,
315
- Collection: Pt,
323
+ Breakpoint: ge,
324
+ Collection: Rt,
316
325
  CollectionEntry: Ct,
317
- FocusTrap: Kt,
326
+ FocusTrap: jt,
318
327
  cssVar: ce,
319
328
  getConfig: fe,
320
329
  getCustomProps: ue,
321
330
  getElement: de,
322
- getPrefix: Rt,
331
+ getPrefix: Pt,
332
+ getSetting: he,
323
333
  lifecycleHook: C,
324
334
  localStore: Xt,
325
335
  setGlobalState: Et,
326
336
  teleport: Vt,
327
- themeStore: Be,
337
+ themeStore: He,
328
338
  toCamel: le,
329
- toKebab: Ut,
339
+ toKebab: Kt,
330
340
  toMilliseconds: ae,
331
341
  transition: St
332
- }, Symbol.toStringTag, { value: "Module" })), Ve = {
342
+ }, Symbol.toStringTag, { value: "Module" })), _e = {
333
343
  // Data attributes
334
344
  dataOpen: "drawer-open",
335
345
  dataClose: "drawer-close",
@@ -350,6 +360,9 @@ const Zi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
350
360
  // Classes
351
361
  classModal: "drawer_modal",
352
362
  // Feature toggles
363
+ customProps: [
364
+ "transition-duration"
365
+ ],
353
366
  breakpoints: null,
354
367
  customEventPrefix: "drawer:",
355
368
  store: !0,
@@ -358,16 +371,16 @@ const Zi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
358
371
  teleport: null,
359
372
  teleportMethod: "prepend",
360
373
  transition: !0,
361
- transitionDuration: "drawer-transition-duration"
374
+ transitionDuration: 300
362
375
  };
363
- function He(t) {
376
+ function ze(t) {
364
377
  t.store === "opened" ? t.open(!1, !1) : t.store === "closed" ? t.close(!1, !1) : t.store === "indeterminate" ? t.state = "indeterminate" : t.el.classList.contains(t.getSetting("stateOpened")) ? t.open(!1, !1) : t.el.classList.contains(t.getSetting("stateClosed")) ? t.close(!1, !1) : t.state = "indeterminate";
365
378
  }
366
- async function _e(t) {
379
+ async function We(t) {
367
380
  t.store === "opened" ? await t.open(!1, !1) : t.store === "closed" ? await t.close(!1, !1) : t.store === "indeterminate" ? t.state != "indeterminate" && (t.state = "indeterminate") : (t.state != t.inlineState && (t.state = t.inlineState), t.inlineState === "opened" ? await t.open(!1, !1) : t.inlineState === "closed" && await t.close(!1, !1));
368
381
  }
369
- function ze(t) {
370
- const e = Rt(), i = t.getAttribute(`data-${this.settings.dataBreakpoint}`);
382
+ function Ue(t) {
383
+ const e = Pt(), i = t.getAttribute(`data-${this.settings.dataBreakpoint}`);
371
384
  return this.settings.breakpoints && this.settings.breakpoints[i] ? this.settings.breakpoints[i] : getComputedStyle(document.body).getPropertyValue(`--${e}breakpoint-${i}`).trim() ? getComputedStyle(document.body).getPropertyValue(`--${e}breakpoint-${i}`).trim() : i;
372
385
  }
373
386
  function it(t) {
@@ -376,42 +389,42 @@ function it(t) {
376
389
  return e;
377
390
  throw new Error(`Drawer not found in collection with id of "${t.id || t}".`);
378
391
  }
379
- function ge(t) {
392
+ function me(t) {
380
393
  t.state === "opened" ? t.mode === "modal" ? this.focusTrap.mount(t.dialog, this.settings.selectorFocus) : this.focusTrap.focus(t.dialog, this.settings.selectorFocus) : (t.trigger && (t.trigger.focus(), t.trigger = null), this.focusTrap.unmount());
381
394
  }
382
- function We(t) {
395
+ function Ke(t) {
383
396
  switch (t.mode) {
384
397
  case "inline":
385
398
  return je.call(this, t);
386
399
  case "modal":
387
- return Ue.call(this, t);
400
+ return Xe.call(this, t);
388
401
  default:
389
402
  throw new Error(`"${t.mode}" is not a valid drawer mode.`);
390
403
  }
391
404
  }
392
405
  async function je(t) {
393
- return t.el.classList.remove(t.getSetting("classModal")), t.dialog.removeAttribute("aria-modal"), Et(!1, t.getSetting("selectorInert"), t.getSetting("selectorOverflow")), this.focusTrap.unmount(), await _e(t), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
406
+ return t.el.classList.remove(t.getSetting("classModal")), t.dialog.removeAttribute("aria-modal"), Et(!1, t.getSetting("selectorInert"), t.getSetting("selectorOverflow")), this.focusTrap.unmount(), await We(t), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
394
407
  detail: this,
395
408
  bubbles: !0
396
409
  })), t;
397
410
  }
398
- async function Ue(t) {
411
+ async function Xe(t) {
399
412
  return t.el.classList.add(t.getSetting("classModal")), t.dialog.setAttribute("aria-modal", "true"), await t.close(!1, !1), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
400
413
  detail: this,
401
414
  bubbles: !0
402
415
  })), t;
403
416
  }
404
417
  var ot, rt, lt;
405
- class Ke extends Ct {
418
+ class Ye extends Ct {
406
419
  constructor(i, s, n = {}) {
407
420
  super(i, s, n);
408
- k(this, ot);
409
- k(this, rt);
410
- k(this, lt);
411
- this.dialog = null, this.trigger = null, E(this, lt, new he()), E(this, ot, "indeterminate"), E(this, rt, "indeterminate"), this.inlineState = "indeterminate";
421
+ $(this, ot);
422
+ $(this, rt);
423
+ $(this, lt);
424
+ this.dialog = null, this.trigger = null, E(this, lt, new ge()), E(this, ot, "indeterminate"), E(this, rt, "indeterminate"), this.inlineState = "indeterminate";
412
425
  }
413
426
  get breakpoint() {
414
- return ze.call(this.context, this.el);
427
+ return Ue.call(this.context, this.el);
415
428
  }
416
429
  get store() {
417
430
  return this.context.store.get(this.id);
@@ -420,7 +433,7 @@ class Ke extends Ct {
420
433
  return w(this, ot);
421
434
  }
422
435
  set mode(i) {
423
- E(this, ot, i), We.call(this.context, this);
436
+ E(this, ot, i), Ke.call(this.context, this);
424
437
  }
425
438
  get state() {
426
439
  return w(this, rt);
@@ -453,14 +466,14 @@ class Ke extends Ct {
453
466
  }
454
467
  async beforeMount() {
455
468
  const i = this.el.querySelector(this.getSetting("selectorDialog"));
456
- this.dialog = i || this.el, this.getSetting("setTabindex") && this.dialog.setAttribute("tabindex", "-1"), He(this), this.inlineState = this.state, this.mode = this.el.classList.contains(this.getSetting("classModal")) ? "modal" : "inline", this.breakpoint && this.mountBreakpoint();
469
+ this.dialog = i || this.el, this.getSetting("setTabindex") && this.dialog.setAttribute("tabindex", "-1"), ze(this), this.inlineState = this.state, this.mode = this.el.classList.contains(this.getSetting("classModal")) ? "modal" : "inline", this.breakpoint && this.mountBreakpoint();
457
470
  }
458
471
  async beforeUnmount(i = !0) {
459
472
  i && this.state === "opened" && await this.close(!1), this.context.store.set(this.id), this.unmountBreakpoint();
460
473
  }
461
474
  }
462
475
  ot = new WeakMap(), rt = new WeakMap(), lt = new WeakMap();
463
- async function Xe(t) {
476
+ async function Ge(t) {
464
477
  const e = t.target.closest(`
465
478
  [data-${this.settings.dataOpen}],
466
479
  [data-${this.settings.dataToggle}],
@@ -487,11 +500,11 @@ async function Xe(t) {
487
500
  if (this.activeModal && t.target.matches(this.settings.selectorScreen))
488
501
  return this.close(this.activeModal.id);
489
502
  }
490
- function Ye(t) {
503
+ function Je(t) {
491
504
  if (t.key === "Escape" && this.activeModal)
492
505
  return this.close(this.activeModal.id);
493
506
  }
494
- async function me(t, e, i = !0) {
507
+ async function pe(t, e, i = !0) {
495
508
  const s = it.call(this, t);
496
509
  return (s.state === "closed" || s.state === "indeterminate") && (s.state = "opening", e ?? s.getSetting("transition") ? await St(
497
510
  s.el,
@@ -499,12 +512,12 @@ async function me(t, e, i = !0) {
499
512
  s.getSetting("stateOpening"),
500
513
  s.getSetting("stateOpened"),
501
514
  s.getSetting("transitionDuration")
502
- ) : (s.el.classList.add(s.getSetting("stateOpened")), s.el.classList.remove(s.getSetting("stateClosed"))), s.state = "opened", s.mode === "modal" && Et(!0, s.getSetting("selectorInert"), s.getSetting("selectorOverflow")), i && ge.call(this, s), s.el.dispatchEvent(new CustomEvent(s.getSetting("customEventPrefix") + "opened", {
515
+ ) : (s.el.classList.add(s.getSetting("stateOpened")), s.el.classList.remove(s.getSetting("stateClosed"))), s.state = "opened", s.mode === "modal" && Et(!0, s.getSetting("selectorInert"), s.getSetting("selectorOverflow")), i && me.call(this, s), s.el.dispatchEvent(new CustomEvent(s.getSetting("customEventPrefix") + "opened", {
503
516
  detail: this,
504
517
  bubbles: !0
505
518
  }))), s;
506
519
  }
507
- async function pe(t, e, i = !0) {
520
+ async function we(t, e, i = !0) {
508
521
  const s = it.call(this, t);
509
522
  return (s.state === "opened" || s.state === "indeterminate") && (s.state = "closing", document.activeElement.blur(), e ?? s.getSetting("transition") ? await St(
510
523
  s.el,
@@ -512,37 +525,37 @@ async function pe(t, e, i = !0) {
512
525
  s.getSetting("stateClosing"),
513
526
  s.getSetting("stateClosed"),
514
527
  s.getSetting("transitionDuration")
515
- ) : (s.el.classList.add(s.getSetting("stateClosed")), s.el.classList.remove(s.getSetting("stateOpened"))), s.state = "closed", s.mode === "modal" && Et(!1, s.getSetting("selectorInert"), s.getSetting("selectorOverflow")), i && ge.call(this, s), s.el.dispatchEvent(new CustomEvent(s.getSetting("customEventPrefix") + "closed", {
528
+ ) : (s.el.classList.add(s.getSetting("stateClosed")), s.el.classList.remove(s.getSetting("stateOpened"))), s.state = "closed", s.mode === "modal" && Et(!1, s.getSetting("selectorInert"), s.getSetting("selectorOverflow")), i && me.call(this, s), s.el.dispatchEvent(new CustomEvent(s.getSetting("customEventPrefix") + "closed", {
516
529
  detail: this,
517
530
  bubbles: !0
518
531
  }))), s;
519
532
  }
520
- async function Ge(t, e, i) {
533
+ async function Ze(t, e, i) {
521
534
  const s = it.call(this, t);
522
- return s.state === "closed" ? me.call(this, s, e, i) : pe.call(this, s, e, i);
535
+ return s.state === "closed" ? pe.call(this, s, e, i) : we.call(this, s, e, i);
523
536
  }
524
537
  var at, ct;
525
- class Qi extends Pt {
538
+ class ts extends Rt {
526
539
  constructor(i) {
527
- super({ ...Ve, ...i });
528
- k(this, at);
529
- k(this, ct);
530
- this.focusTrap = new Kt(), E(this, at, Xe.bind(this)), E(this, ct, Ye.bind(this)), this.store = Xt(this.settings.storeKey, this.settings.store);
540
+ super({ ..._e, ...i });
541
+ $(this, at);
542
+ $(this, ct);
543
+ this.focusTrap = new jt(), E(this, at, Ge.bind(this)), E(this, ct, Je.bind(this)), this.store = Xt(this.settings.storeKey, this.settings.store);
531
544
  }
532
545
  get activeModal() {
533
546
  return this.collection.find((i) => i.state === "opened" && i.mode === "modal");
534
547
  }
535
548
  async createEntry(i, s) {
536
- return new Ke(this, i, s);
549
+ return new Ye(this, i, s);
537
550
  }
538
551
  async open(i, s, n) {
539
- return me.call(this, i, s, n);
552
+ return pe.call(this, i, s, n);
540
553
  }
541
554
  async close(i, s, n) {
542
- return pe.call(this, i, s, n);
555
+ return we.call(this, i, s, n);
543
556
  }
544
557
  async toggle(i, s, n) {
545
- return Ge.call(this, i, s, n);
558
+ return Ze.call(this, i, s, n);
546
559
  }
547
560
  async afterMount() {
548
561
  document.addEventListener("click", w(this, at), !1), document.addEventListener("keydown", w(this, ct), !1);
@@ -555,7 +568,7 @@ class Qi extends Pt {
555
568
  }
556
569
  }
557
570
  at = new WeakMap(), ct = new WeakMap();
558
- const Je = {
571
+ const Qe = {
559
572
  // Data attributes
560
573
  dataOpen: "modal-open",
561
574
  dataClose: "modal-close",
@@ -574,14 +587,17 @@ const Je = {
574
587
  stateClosing: "is-closing",
575
588
  stateClosed: "is-closed",
576
589
  // Feature settings
590
+ customProps: [
591
+ "transition-duration"
592
+ ],
577
593
  customEventPrefix: "modal:",
578
594
  setTabindex: !0,
579
595
  teleport: null,
580
596
  teleportMethod: "append",
581
597
  transition: !0,
582
- transitionDuration: "modal-transition-duration"
598
+ transitionDuration: 300
583
599
  };
584
- class Ze extends Ct {
600
+ class qe extends Ct {
585
601
  constructor(e, i, s = {}) {
586
602
  super(e, i, s), this.state = "closed", this.dialog = null;
587
603
  }
@@ -620,7 +636,7 @@ function xt(t) {
620
636
  function Dt() {
621
637
  this.active ? this.focusTrap.mount(this.active.dialog, this.settings.selectorFocus) : (this.trigger && (this.trigger.focus(), this.trigger = null), this.focusTrap.unmount());
622
638
  }
623
- async function Qe(t) {
639
+ async function ti(t) {
624
640
  const e = t.target.closest(`
625
641
  [data-${this.settings.dataOpen}],
626
642
  [data-${this.settings.dataReplace}],
@@ -643,11 +659,11 @@ async function Qe(t) {
643
659
  if (this.active && t.target.matches(this.settings.selectorScreen) && !this.active.isRequired)
644
660
  return this.close(this.active.id);
645
661
  }
646
- function qe(t) {
662
+ function ei(t) {
647
663
  if (t.key === "Escape" && this.active && !this.active.dialog.matches(this.settings.selectorRequired))
648
664
  return this.close();
649
665
  }
650
- async function we(t, e = void 0, i = !0) {
666
+ async function be(t, e = void 0, i = !0) {
651
667
  const s = xt.call(this, t);
652
668
  return this.stack.moveToTop(s), s.state === "closed" && (s.state = "opening", this.stack.add(s), e ?? s.getSetting("transition") ? await St(
653
669
  s.el,
@@ -660,7 +676,7 @@ async function we(t, e = void 0, i = !0) {
660
676
  bubbles: !0
661
677
  })), s;
662
678
  }
663
- async function be(t, e, i = !0) {
679
+ async function ye(t, e, i = !0) {
664
680
  const s = t ? xt.call(this, t) : this.active;
665
681
  return s && s.state === "opened" && (s.state = "closing", document.activeElement.blur(), e ?? s.getSetting("transition") ? await St(
666
682
  s.el,
@@ -676,15 +692,15 @@ async function be(t, e, i = !0) {
676
692
  async function Ht(t, e) {
677
693
  const i = [];
678
694
  return await Promise.all(this.stack.value.map(async (s) => {
679
- t && t === s.id ? Promise.resolve() : i.push(await be.call(this, s, e, !1)), s.trigger = null;
695
+ t && t === s.id ? Promise.resolve() : i.push(await ye.call(this, s, e, !1)), s.trigger = null;
680
696
  })), i;
681
697
  }
682
- async function ti(t, e, i = !0) {
698
+ async function ii(t, e, i = !0) {
683
699
  const s = xt.call(this, t);
684
700
  let n, o;
685
- return s.state === "opened" ? (n = s, o = await Ht.call(this, s.id, e)) : (o = Ht.call(this, !1, e), n = we.call(this, s, e, !1), await Promise.all([n, o])), i && Dt.call(this), { opened: n, closed: o };
701
+ return s.state === "opened" ? (n = s, o = await Ht.call(this, s.id, e)) : (o = Ht.call(this, !1, e), n = be.call(this, s, e, !1), await Promise.all([n, o])), i && Dt.call(this), { opened: n, closed: o };
686
702
  }
687
- function ei(t) {
703
+ function si(t) {
688
704
  const e = [];
689
705
  return {
690
706
  get value() {
@@ -720,27 +736,27 @@ function ei(t) {
720
736
  };
721
737
  }
722
738
  var ft, ut;
723
- class qi extends Pt {
739
+ class es extends Rt {
724
740
  constructor(i) {
725
- super({ ...Je, ...i });
726
- k(this, ft);
727
- k(this, ut);
728
- this.trigger = null, this.focusTrap = new Kt(), E(this, ft, Qe.bind(this)), E(this, ut, qe.bind(this)), this.stack = ei(this.settings);
741
+ super({ ...Qe, ...i });
742
+ $(this, ft);
743
+ $(this, ut);
744
+ this.trigger = null, this.focusTrap = new jt(), E(this, ft, ti.bind(this)), E(this, ut, ei.bind(this)), this.stack = si(this.settings);
729
745
  }
730
746
  get active() {
731
747
  return this.stack.top;
732
748
  }
733
749
  async createEntry(i, s) {
734
- return new Ze(this, i, s);
750
+ return new qe(this, i, s);
735
751
  }
736
752
  async open(i, s, n) {
737
- return we.call(this, i, s, n);
753
+ return be.call(this, i, s, n);
738
754
  }
739
755
  async close(i, s, n) {
740
- return be.call(this, i, s, n);
756
+ return ye.call(this, i, s, n);
741
757
  }
742
758
  async replace(i, s, n) {
743
- return ti.call(this, i, s, n);
759
+ return ii.call(this, i, s, n);
744
760
  }
745
761
  async closeAll(i = !1, s, n = !0) {
746
762
  const o = await Ht.call(this, i, s);
@@ -757,7 +773,7 @@ class qi extends Pt {
757
773
  }
758
774
  }
759
775
  ft = new WeakMap(), ut = new WeakMap();
760
- const ii = {
776
+ const ni = {
761
777
  // Selectors
762
778
  selector: ".popover",
763
779
  selectorTooltip: ".popover_tooltip",
@@ -765,6 +781,15 @@ const ii = {
765
781
  // State classes
766
782
  stateActive: "is-active",
767
783
  // Custom properties and their defaults
784
+ customProps: [
785
+ "placement",
786
+ "event",
787
+ "offset",
788
+ "flip-padding",
789
+ "shift-padding",
790
+ "arrow-padding",
791
+ "toggle-delay"
792
+ ],
768
793
  placement: "bottom",
769
794
  event: "click",
770
795
  offset: 0,
@@ -782,7 +807,7 @@ function ie(t, e, i) {
782
807
  top: i != null ? `${i}px` : ""
783
808
  });
784
809
  }
785
- function ye(t, e) {
810
+ function xe(t, e) {
786
811
  let i = t.getSetting("toggle-delay");
787
812
  typeof i == "string" && (i.indexOf(",") > -1 && (i = i.split(",")), i.indexOf(" ") > -1 && (i = i.split(" "))), Array.isArray(i) && (i = i[e]);
788
813
  const s = Number(i);
@@ -829,7 +854,7 @@ function Nt(t) {
829
854
  }
830
855
  return e;
831
856
  }
832
- function si(t) {
857
+ function oi(t) {
833
858
  return {
834
859
  offset: Number(t.getSetting("offset")),
835
860
  flip: {
@@ -844,23 +869,23 @@ function si(t) {
844
869
  }
845
870
  };
846
871
  }
847
- function xe(t) {
872
+ function ve(t) {
848
873
  const e = typeof t == "string" ? this.get(t) : this.get(t.id);
849
874
  if (e)
850
875
  return e;
851
876
  throw new Error(`Popover not found in collection with id of "${t}".`);
852
877
  }
853
- async function ve(t) {
854
- const e = t ? xe.call(this, t) : await Se.call(this);
878
+ async function Se(t) {
879
+ const e = t ? ve.call(this, t) : await Ee.call(this);
855
880
  return e && e.state === "opened" && (e.el.inert = !0, e.el.classList.remove(this.settings.stateActive), e.isTooltip || e.trigger.setAttribute("aria-expanded", "false"), e.floatingCleanup(), e.state = "closed", e.trigger === this.trigger && (this.trigger = null)), e;
856
881
  }
857
- async function Se() {
882
+ async function Ee() {
858
883
  const t = [];
859
884
  return await Promise.all(this.collection.map(async (e) => {
860
- e.state === "opened" && t.push(await ve.call(this, e));
885
+ e.state === "opened" && t.push(await Se.call(this, e));
861
886
  })), t;
862
887
  }
863
- function Ee(t) {
888
+ function Ce(t) {
864
889
  t.state == "opened" && setTimeout(() => {
865
890
  const e = t.el.matches(":hover") === t.el || t.trigger.matches(":hover") === t.trigger;
866
891
  let i = document.activeElement.closest(
@@ -869,45 +894,45 @@ function Ee(t) {
869
894
  return i = i ? i.matches(":focus-visible") : !1, !e && !i && t.close(), t;
870
895
  }, 1);
871
896
  }
872
- function ni(t) {
897
+ function ri(t) {
873
898
  t.state === "opened" ? t.close() : (this.trigger = t.trigger, t.open());
874
899
  }
875
- function oi(t) {
900
+ function li(t) {
876
901
  t.isTooltip && (t.toggleDelayId && clearTimeout(t.toggleDelayId), t.close());
877
902
  }
878
- function ri(t, e) {
903
+ function ai(t, e) {
879
904
  if (t.isHovered = e, e.type == "focus" && !t.trigger.matches(":focus-visible"))
880
905
  return;
881
906
  t.toggleDelayId && clearTimeout(t.toggleDelayId);
882
907
  const i = t.trigger.getAttribute("aria-expanded");
883
908
  if (i && i == "true") return;
884
- const s = this.activeHover ? 0 : ye(t, 0);
909
+ const s = this.activeHover ? 0 : xe(t, 0);
885
910
  this.activeHover && this.activeHover.close(), t.toggleDelayId = setTimeout(() => {
886
911
  t.id && t.open();
887
912
  }, s);
888
913
  }
889
- function li(t, e) {
914
+ function ci(t, e) {
890
915
  setTimeout(() => {
891
916
  t.isHovered = e, !t.isHovered && (t.toggleDelayId && clearTimeout(t.toggleDelayId), t.toggleDelayId = setTimeout(() => {
892
- Ee.call(this, t);
893
- }, ye(t, 1)));
917
+ Ce.call(this, t);
918
+ }, xe(t, 1)));
894
919
  }, 1);
895
920
  }
896
- function ai(t) {
921
+ function fi(t) {
897
922
  switch (t.key) {
898
923
  case "Escape":
899
- this.trigger && this.trigger.focus(), Se.call(this);
924
+ this.trigger && this.trigger.focus(), Ee.call(this);
900
925
  return;
901
926
  case "Tab":
902
927
  this.collection.forEach((e) => {
903
- Ee.call(this, e);
928
+ Ce.call(this, e);
904
929
  });
905
930
  return;
906
931
  default:
907
932
  return;
908
933
  }
909
934
  }
910
- function ci(t) {
935
+ function ui(t) {
911
936
  const e = this;
912
937
  document.addEventListener("click", function i(s) {
913
938
  s.target.closest(
@@ -915,13 +940,13 @@ function ci(t) {
915
940
  ) ? t.el && !t.el.classList.contains(e.settings.stateActive) && this.removeEventListener("click", i) : (t.el && t.el.classList.contains(e.settings.stateActive) && t.close(), this.removeEventListener("click", i));
916
941
  });
917
942
  }
918
- var P, z;
919
- class fi extends Ct {
943
+ var R, z;
944
+ class di extends Ct {
920
945
  constructor(i, s, n = {}) {
921
946
  super(i, s, n);
922
- k(this, P);
923
- k(this, z);
924
- this.state = "closed", this.toggleDelayId = null, this.trigger = null, E(this, P, null), E(this, z, {
947
+ $(this, R);
948
+ $(this, z);
949
+ this.state = "closed", this.toggleDelayId = null, this.trigger = null, E(this, R, null), E(this, z, {
925
950
  el: !1,
926
951
  trigger: !1
927
952
  }), this.floatingCleanup = () => {
@@ -955,29 +980,29 @@ class fi extends Ct {
955
980
  return this.context.deregister(this.id);
956
981
  }
957
982
  registerEventListeners() {
958
- w(this, P) || (this.getSetting("event") === "hover" ? (E(this, P, [{
983
+ w(this, R) || (this.getSetting("event") === "hover" ? (E(this, R, [{
959
984
  el: ["el", "trigger"],
960
985
  type: ["mouseenter", "focus"],
961
- listener: ri.bind(this.context, this)
986
+ listener: ai.bind(this.context, this)
962
987
  }, {
963
988
  el: ["el", "trigger"],
964
989
  type: ["mouseleave", "focusout"],
965
- listener: li.bind(this.context, this)
990
+ listener: ci.bind(this.context, this)
966
991
  }, {
967
992
  el: ["trigger"],
968
993
  type: ["click"],
969
- listener: oi.bind(this.context, this)
970
- }]), w(this, P).forEach((s) => {
994
+ listener: li.bind(this.context, this)
995
+ }]), w(this, R).forEach((s) => {
971
996
  s.el.forEach((n) => {
972
997
  s.type.forEach((o) => {
973
998
  this[n].addEventListener(o, s.listener, !1);
974
999
  });
975
1000
  });
976
- })) : (E(this, P, [{
1001
+ })) : (E(this, R, [{
977
1002
  el: ["trigger"],
978
1003
  type: ["click"],
979
- listener: ni.bind(this.context, this)
980
- }]), w(this, P).forEach((s) => {
1004
+ listener: ri.bind(this.context, this)
1005
+ }]), w(this, R).forEach((s) => {
981
1006
  s.el.forEach((n) => {
982
1007
  s.type.forEach((o) => {
983
1008
  this[n].addEventListener(o, s.listener, !1);
@@ -986,13 +1011,13 @@ class fi extends Ct {
986
1011
  })));
987
1012
  }
988
1013
  deregisterEventListeners() {
989
- w(this, P) && (w(this, P).forEach((i) => {
1014
+ w(this, R) && (w(this, R).forEach((i) => {
990
1015
  i.el.forEach((s) => {
991
1016
  i.type.forEach((n) => {
992
1017
  this[s].removeEventListener(n, i.listener, !1);
993
1018
  });
994
1019
  });
995
- }), E(this, P, null));
1020
+ }), E(this, R, null));
996
1021
  }
997
1022
  async beforeMount() {
998
1023
  this.trigger = document.querySelector(
@@ -1006,16 +1031,16 @@ class fi extends Ct {
1006
1031
  this.state === "opened" && await this.close(), this.floatingCleanup(), this.deregisterEventListeners();
1007
1032
  }
1008
1033
  }
1009
- P = new WeakMap(), z = new WeakMap();
1010
- const ht = Math.min, Z = Math.max, Lt = Math.round, $t = Math.floor, W = (t) => ({
1034
+ R = new WeakMap(), z = new WeakMap();
1035
+ const ht = Math.min, Z = Math.max, Lt = Math.round, kt = Math.floor, W = (t) => ({
1011
1036
  x: t,
1012
1037
  y: t
1013
- }), ui = {
1038
+ }), hi = {
1014
1039
  left: "right",
1015
1040
  right: "left",
1016
1041
  bottom: "top",
1017
1042
  top: "bottom"
1018
- }, di = {
1043
+ }, gi = {
1019
1044
  start: "end",
1020
1045
  end: "start"
1021
1046
  };
@@ -1025,7 +1050,7 @@ function _t(t, e, i) {
1025
1050
  function Q(t, e) {
1026
1051
  return typeof t == "function" ? t(e) : t;
1027
1052
  }
1028
- function j(t) {
1053
+ function U(t) {
1029
1054
  return t.split("-")[0];
1030
1055
  }
1031
1056
  function At(t) {
@@ -1038,25 +1063,25 @@ function Gt(t) {
1038
1063
  return t === "y" ? "height" : "width";
1039
1064
  }
1040
1065
  function q(t) {
1041
- return ["top", "bottom"].includes(j(t)) ? "y" : "x";
1066
+ return ["top", "bottom"].includes(U(t)) ? "y" : "x";
1042
1067
  }
1043
1068
  function Jt(t) {
1044
1069
  return Yt(q(t));
1045
1070
  }
1046
- function hi(t, e, i) {
1071
+ function mi(t, e, i) {
1047
1072
  i === void 0 && (i = !1);
1048
1073
  const s = At(t), n = Jt(t), o = Gt(n);
1049
1074
  let r = n === "x" ? s === (i ? "end" : "start") ? "right" : "left" : s === "start" ? "bottom" : "top";
1050
1075
  return e.reference[o] > e.floating[o] && (r = Ot(r)), [r, Ot(r)];
1051
1076
  }
1052
- function gi(t) {
1077
+ function pi(t) {
1053
1078
  const e = Ot(t);
1054
1079
  return [zt(t), e, zt(e)];
1055
1080
  }
1056
1081
  function zt(t) {
1057
- return t.replace(/start|end/g, (e) => di[e]);
1082
+ return t.replace(/start|end/g, (e) => gi[e]);
1058
1083
  }
1059
- function mi(t, e, i) {
1084
+ function wi(t, e, i) {
1060
1085
  const s = ["left", "right"], n = ["right", "left"], o = ["top", "bottom"], r = ["bottom", "top"];
1061
1086
  switch (t) {
1062
1087
  case "top":
@@ -1069,15 +1094,15 @@ function mi(t, e, i) {
1069
1094
  return [];
1070
1095
  }
1071
1096
  }
1072
- function pi(t, e, i, s) {
1097
+ function bi(t, e, i, s) {
1073
1098
  const n = At(t);
1074
- let o = mi(j(t), i === "start", s);
1099
+ let o = wi(U(t), i === "start", s);
1075
1100
  return n && (o = o.map((r) => r + "-" + n), e && (o = o.concat(o.map(zt)))), o;
1076
1101
  }
1077
1102
  function Ot(t) {
1078
- return t.replace(/left|right|bottom|top/g, (e) => ui[e]);
1103
+ return t.replace(/left|right|bottom|top/g, (e) => hi[e]);
1079
1104
  }
1080
- function wi(t) {
1105
+ function yi(t) {
1081
1106
  return {
1082
1107
  top: 0,
1083
1108
  right: 0,
@@ -1086,8 +1111,8 @@ function wi(t) {
1086
1111
  ...t
1087
1112
  };
1088
1113
  }
1089
- function Ce(t) {
1090
- return typeof t != "number" ? wi(t) : {
1114
+ function Ae(t) {
1115
+ return typeof t != "number" ? yi(t) : {
1091
1116
  top: t,
1092
1117
  right: t,
1093
1118
  bottom: t,
@@ -1117,7 +1142,7 @@ function se(t, e, i) {
1117
1142
  reference: s,
1118
1143
  floating: n
1119
1144
  } = t;
1120
- const o = q(e), r = Jt(e), l = Gt(r), a = j(e), c = o === "y", d = s.x + s.width / 2 - n.width / 2, u = s.y + s.height / 2 - n.height / 2, h = s[l] / 2 - n[l] / 2;
1145
+ const o = q(e), r = Jt(e), l = Gt(r), a = U(e), c = o === "y", d = s.x + s.width / 2 - n.width / 2, u = s.y + s.height / 2 - n.height / 2, h = s[l] / 2 - n[l] / 2;
1121
1146
  let f;
1122
1147
  switch (a) {
1123
1148
  case "top":
@@ -1160,7 +1185,7 @@ function se(t, e, i) {
1160
1185
  }
1161
1186
  return f;
1162
1187
  }
1163
- const bi = async (t, e, i) => {
1188
+ const xi = async (t, e, i) => {
1164
1189
  const {
1165
1190
  placement: s = "bottom",
1166
1191
  strategy: n = "absolute",
@@ -1221,7 +1246,7 @@ const bi = async (t, e, i) => {
1221
1246
  middlewareData: f
1222
1247
  };
1223
1248
  };
1224
- async function Ae(t, e) {
1249
+ async function $e(t, e) {
1225
1250
  var i;
1226
1251
  e === void 0 && (e = {});
1227
1252
  const {
@@ -1237,7 +1262,7 @@ async function Ae(t, e) {
1237
1262
  elementContext: u = "floating",
1238
1263
  altBoundary: h = !1,
1239
1264
  padding: f = 0
1240
- } = Q(e, t), g = Ce(f), b = l[h ? u === "floating" ? "reference" : "floating" : u], p = Tt(await o.getClippingRect({
1265
+ } = Q(e, t), g = Ae(f), b = l[h ? u === "floating" ? "reference" : "floating" : u], p = Tt(await o.getClippingRect({
1241
1266
  element: (i = await (o.isElement == null ? void 0 : o.isElement(b))) == null || i ? b : b.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(l.floating)),
1242
1267
  boundary: c,
1243
1268
  rootBoundary: d,
@@ -1266,7 +1291,7 @@ async function Ae(t, e) {
1266
1291
  right: (v.right - p.right + g.right) / S.x
1267
1292
  };
1268
1293
  }
1269
- const yi = (t) => ({
1294
+ const vi = (t) => ({
1270
1295
  name: "arrow",
1271
1296
  options: t,
1272
1297
  async fn(e) {
@@ -1284,13 +1309,13 @@ const yi = (t) => ({
1284
1309
  } = Q(t, e) || {};
1285
1310
  if (c == null)
1286
1311
  return {};
1287
- const u = Ce(d), h = {
1312
+ const u = Ae(d), h = {
1288
1313
  x: i,
1289
1314
  y: s
1290
- }, f = Jt(n), g = Gt(f), m = await r.getDimensions(c), b = f === "y", p = b ? "top" : "left", y = b ? "bottom" : "right", x = b ? "clientHeight" : "clientWidth", S = o.reference[g] + o.reference[f] - h[f] - o.floating[g], v = h[f] - o.reference[f], $ = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
1291
- let K = $ ? $[x] : 0;
1292
- (!K || !await (r.isElement == null ? void 0 : r.isElement($))) && (K = l.floating[x] || o.floating[g]);
1293
- const pt = S / 2 - v / 2, X = K / 2 - m[g] / 2 - 1, V = ht(u[p], X), wt = ht(u[y], X), Y = V, bt = K - m[g] - wt, A = K / 2 - m[g] / 2 + pt, et = _t(Y, A, bt), B = !a.arrow && At(n) != null && A !== et && o.reference[g] / 2 - (A < Y ? V : wt) - m[g] / 2 < 0, F = B ? A < Y ? A - Y : A - bt : 0;
1315
+ }, f = Jt(n), g = Gt(f), m = await r.getDimensions(c), b = f === "y", p = b ? "top" : "left", y = b ? "bottom" : "right", x = b ? "clientHeight" : "clientWidth", S = o.reference[g] + o.reference[f] - h[f] - o.floating[g], v = h[f] - o.reference[f], k = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
1316
+ let j = k ? k[x] : 0;
1317
+ (!j || !await (r.isElement == null ? void 0 : r.isElement(k))) && (j = l.floating[x] || o.floating[g]);
1318
+ const pt = S / 2 - v / 2, X = j / 2 - m[g] / 2 - 1, V = ht(u[p], X), wt = ht(u[y], X), Y = V, bt = j - m[g] - wt, A = j / 2 - m[g] / 2 + pt, et = _t(Y, A, bt), B = !a.arrow && At(n) != null && A !== et && o.reference[g] / 2 - (A < Y ? V : wt) - m[g] / 2 < 0, F = B ? A < Y ? A - Y : A - bt : 0;
1294
1319
  return {
1295
1320
  [f]: h[f] + F,
1296
1321
  data: {
@@ -1303,7 +1328,7 @@ const yi = (t) => ({
1303
1328
  reset: B
1304
1329
  };
1305
1330
  }
1306
- }), xi = function(t) {
1331
+ }), Si = function(t) {
1307
1332
  return t === void 0 && (t = {}), {
1308
1333
  name: "flip",
1309
1334
  options: t,
@@ -1327,12 +1352,12 @@ const yi = (t) => ({
1327
1352
  } = Q(t, e);
1328
1353
  if ((i = o.arrow) != null && i.alignmentOffset)
1329
1354
  return {};
1330
- const p = j(n), y = q(l), x = j(l) === l, S = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), v = h || (x || !m ? [Ot(l)] : gi(l)), $ = g !== "none";
1331
- !h && $ && v.push(...pi(l, m, g, S));
1332
- const K = [l, ...v], pt = await Ae(e, b), X = [];
1355
+ const p = U(n), y = q(l), x = U(l) === l, S = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), v = h || (x || !m ? [Ot(l)] : pi(l)), k = g !== "none";
1356
+ !h && k && v.push(...bi(l, m, g, S));
1357
+ const j = [l, ...v], pt = await $e(e, b), X = [];
1333
1358
  let V = ((s = o.flip) == null ? void 0 : s.overflows) || [];
1334
1359
  if (d && X.push(pt[p]), u) {
1335
- const A = hi(n, r, S);
1360
+ const A = mi(n, r, S);
1336
1361
  X.push(pt[A[0]], pt[A[1]]);
1337
1362
  }
1338
1363
  if (V = [...V, {
@@ -1340,7 +1365,7 @@ const yi = (t) => ({
1340
1365
  overflows: X
1341
1366
  }], !X.every((A) => A <= 0)) {
1342
1367
  var wt, Y;
1343
- const A = (((wt = o.flip) == null ? void 0 : wt.index) || 0) + 1, et = K[A];
1368
+ const A = (((wt = o.flip) == null ? void 0 : wt.index) || 0) + 1, et = j[A];
1344
1369
  if (et)
1345
1370
  return {
1346
1371
  data: {
@@ -1357,14 +1382,14 @@ const yi = (t) => ({
1357
1382
  case "bestFit": {
1358
1383
  var bt;
1359
1384
  const F = (bt = V.filter((H) => {
1360
- if ($) {
1385
+ if (k) {
1361
1386
  const _ = q(H.placement);
1362
1387
  return _ === y || // Create a bias to the `y` side axis due to horizontal
1363
1388
  // reading directions favoring greater width.
1364
1389
  _ === "y";
1365
1390
  }
1366
1391
  return !0;
1367
- }).map((H) => [H.placement, H.overflows.filter((_) => _ > 0).reduce((_, Pe) => _ + Pe, 0)]).sort((H, _) => H[1] - _[1])[0]) == null ? void 0 : bt[0];
1392
+ }).map((H) => [H.placement, H.overflows.filter((_) => _ > 0).reduce((_, De) => _ + De, 0)]).sort((H, _) => H[1] - _[1])[0]) == null ? void 0 : bt[0];
1368
1393
  F && (B = F);
1369
1394
  break;
1370
1395
  }
@@ -1383,12 +1408,12 @@ const yi = (t) => ({
1383
1408
  }
1384
1409
  };
1385
1410
  };
1386
- async function vi(t, e) {
1411
+ async function Ei(t, e) {
1387
1412
  const {
1388
1413
  placement: i,
1389
1414
  platform: s,
1390
1415
  elements: n
1391
- } = t, o = await (s.isRTL == null ? void 0 : s.isRTL(n.floating)), r = j(i), l = At(i), a = q(i) === "y", c = ["left", "top"].includes(r) ? -1 : 1, d = o && a ? -1 : 1, u = Q(e, t);
1416
+ } = t, o = await (s.isRTL == null ? void 0 : s.isRTL(n.floating)), r = U(i), l = At(i), a = q(i) === "y", c = ["left", "top"].includes(r) ? -1 : 1, d = o && a ? -1 : 1, u = Q(e, t);
1392
1417
  let {
1393
1418
  mainAxis: h,
1394
1419
  crossAxis: f,
@@ -1410,7 +1435,7 @@ async function vi(t, e) {
1410
1435
  y: f * d
1411
1436
  };
1412
1437
  }
1413
- const Si = function(t) {
1438
+ const Ci = function(t) {
1414
1439
  return t === void 0 && (t = 0), {
1415
1440
  name: "offset",
1416
1441
  options: t,
@@ -1421,7 +1446,7 @@ const Si = function(t) {
1421
1446
  y: o,
1422
1447
  placement: r,
1423
1448
  middlewareData: l
1424
- } = e, a = await vi(e, t);
1449
+ } = e, a = await Ei(e, t);
1425
1450
  return r === ((i = l.offset) == null ? void 0 : i.placement) && (s = l.arrow) != null && s.alignmentOffset ? {} : {
1426
1451
  x: n + a.x,
1427
1452
  y: o + a.y,
@@ -1432,7 +1457,7 @@ const Si = function(t) {
1432
1457
  };
1433
1458
  }
1434
1459
  };
1435
- }, Ei = function(t) {
1460
+ }, Ai = function(t) {
1436
1461
  return t === void 0 && (t = {}), {
1437
1462
  name: "shift",
1438
1463
  options: t,
@@ -1460,7 +1485,7 @@ const Si = function(t) {
1460
1485
  } = Q(t, e), c = {
1461
1486
  x: i,
1462
1487
  y: s
1463
- }, d = await Ae(e, a), u = q(j(n)), h = Yt(u);
1488
+ }, d = await $e(e, a), u = q(U(n)), h = Yt(u);
1464
1489
  let f = c[h], g = c[u];
1465
1490
  if (o) {
1466
1491
  const b = h === "y" ? "top" : "left", p = h === "y" ? "bottom" : "right", y = f + d[b], x = f - d[p];
@@ -1488,7 +1513,7 @@ const Si = function(t) {
1488
1513
  };
1489
1514
  }
1490
1515
  };
1491
- }, Ci = function(t) {
1516
+ }, $i = function(t) {
1492
1517
  return t === void 0 && (t = {}), {
1493
1518
  options: t,
1494
1519
  fn(e) {
@@ -1521,8 +1546,8 @@ const Si = function(t) {
1521
1546
  }
1522
1547
  if (c) {
1523
1548
  var p, y;
1524
- const x = h === "y" ? "width" : "height", S = ["top", "left"].includes(j(n)), v = o.reference[u] - o.floating[x] + (S && ((p = r.offset) == null ? void 0 : p[u]) || 0) + (S ? 0 : b.crossAxis), $ = o.reference[u] + o.reference[x] + (S ? 0 : ((y = r.offset) == null ? void 0 : y[u]) || 0) - (S ? b.crossAxis : 0);
1525
- g < v ? g = v : g > $ && (g = $);
1549
+ const x = h === "y" ? "width" : "height", S = ["top", "left"].includes(U(n)), v = o.reference[u] - o.floating[x] + (S && ((p = r.offset) == null ? void 0 : p[u]) || 0) + (S ? 0 : b.crossAxis), k = o.reference[u] + o.reference[x] + (S ? 0 : ((y = r.offset) == null ? void 0 : y[u]) || 0) - (S ? b.crossAxis : 0);
1550
+ g < v ? g = v : g > k && (g = k);
1526
1551
  }
1527
1552
  return {
1528
1553
  [h]: f,
@@ -1557,7 +1582,7 @@ function I(t) {
1557
1582
  function ne(t) {
1558
1583
  return !Mt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof T(t).ShadowRoot;
1559
1584
  }
1560
- function kt(t) {
1585
+ function $t(t) {
1561
1586
  const {
1562
1587
  overflow: e,
1563
1588
  overflowX: i,
@@ -1566,7 +1591,7 @@ function kt(t) {
1566
1591
  } = M(t);
1567
1592
  return /auto|scroll|overlay|hidden|clip/.test(e + s + i) && !["inline", "contents"].includes(n);
1568
1593
  }
1569
- function Ai(t) {
1594
+ function ki(t) {
1570
1595
  return ["table", "td", "th"].includes(mt(t));
1571
1596
  }
1572
1597
  function Ft(t) {
@@ -1582,14 +1607,14 @@ function Zt(t) {
1582
1607
  const e = Qt(), i = D(t) ? M(t) : t;
1583
1608
  return i.transform !== "none" || i.perspective !== "none" || (i.containerType ? i.containerType !== "normal" : !1) || !e && (i.backdropFilter ? i.backdropFilter !== "none" : !1) || !e && (i.filter ? i.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((s) => (i.willChange || "").includes(s)) || ["paint", "layout", "strict", "content"].some((s) => (i.contain || "").includes(s));
1584
1609
  }
1585
- function ki(t) {
1586
- let e = U(t);
1610
+ function Li(t) {
1611
+ let e = K(t);
1587
1612
  for (; I(e) && !gt(e); ) {
1588
1613
  if (Zt(e))
1589
1614
  return e;
1590
1615
  if (Ft(e))
1591
1616
  return null;
1592
- e = U(e);
1617
+ e = K(e);
1593
1618
  }
1594
1619
  return null;
1595
1620
  }
@@ -1611,7 +1636,7 @@ function It(t) {
1611
1636
  scrollTop: t.scrollY
1612
1637
  };
1613
1638
  }
1614
- function U(t) {
1639
+ function K(t) {
1615
1640
  if (mt(t) === "html")
1616
1641
  return t;
1617
1642
  const e = (
@@ -1623,24 +1648,24 @@ function U(t) {
1623
1648
  );
1624
1649
  return ne(e) ? e.host : e;
1625
1650
  }
1626
- function $e(t) {
1627
- const e = U(t);
1628
- return gt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : I(e) && kt(e) ? e : $e(e);
1651
+ function Le(t) {
1652
+ const e = K(t);
1653
+ return gt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : I(e) && $t(e) ? e : Le(e);
1629
1654
  }
1630
1655
  function vt(t, e, i) {
1631
1656
  var s;
1632
1657
  e === void 0 && (e = []), i === void 0 && (i = !0);
1633
- const n = $e(t), o = n === ((s = t.ownerDocument) == null ? void 0 : s.body), r = T(n);
1658
+ const n = Le(t), o = n === ((s = t.ownerDocument) == null ? void 0 : s.body), r = T(n);
1634
1659
  if (o) {
1635
1660
  const l = Wt(r);
1636
- return e.concat(r, r.visualViewport || [], kt(n) ? n : [], l && i ? vt(l) : []);
1661
+ return e.concat(r, r.visualViewport || [], $t(n) ? n : [], l && i ? vt(l) : []);
1637
1662
  }
1638
1663
  return e.concat(n, vt(n, [], i));
1639
1664
  }
1640
1665
  function Wt(t) {
1641
1666
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
1642
1667
  }
1643
- function Le(t) {
1668
+ function Oe(t) {
1644
1669
  const e = M(t);
1645
1670
  let i = parseFloat(e.width) || 0, s = parseFloat(e.height) || 0;
1646
1671
  const n = I(t), o = n ? t.offsetWidth : i, r = n ? t.offsetHeight : s, l = Lt(i) !== o || Lt(s) !== r;
@@ -1661,22 +1686,22 @@ function st(t) {
1661
1686
  width: s,
1662
1687
  height: n,
1663
1688
  $: o
1664
- } = Le(e);
1689
+ } = Oe(e);
1665
1690
  let r = (o ? Lt(i.width) : i.width) / s, l = (o ? Lt(i.height) : i.height) / n;
1666
1691
  return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
1667
1692
  x: r,
1668
1693
  y: l
1669
1694
  };
1670
1695
  }
1671
- const $i = /* @__PURE__ */ W(0);
1672
- function Oe(t) {
1696
+ const Oi = /* @__PURE__ */ W(0);
1697
+ function Te(t) {
1673
1698
  const e = T(t);
1674
- return !Qt() || !e.visualViewport ? $i : {
1699
+ return !Qt() || !e.visualViewport ? Oi : {
1675
1700
  x: e.visualViewport.offsetLeft,
1676
1701
  y: e.visualViewport.offsetTop
1677
1702
  };
1678
1703
  }
1679
- function Li(t, e, i) {
1704
+ function Ti(t, e, i) {
1680
1705
  return e === void 0 && (e = !1), !i || e && i !== T(t) ? !1 : e;
1681
1706
  }
1682
1707
  function tt(t, e, i, s) {
@@ -1684,7 +1709,7 @@ function tt(t, e, i, s) {
1684
1709
  const n = t.getBoundingClientRect(), o = qt(t);
1685
1710
  let r = W(1);
1686
1711
  e && (s ? D(s) && (r = st(s)) : r = st(t));
1687
- const l = Li(o, i, s) ? Oe(o) : W(0);
1712
+ const l = Ti(o, i, s) ? Te(o) : W(0);
1688
1713
  let a = (n.left + l.x) / r.x, c = (n.top + l.y) / r.y, d = n.width / r.x, u = n.height / r.y;
1689
1714
  if (o) {
1690
1715
  const h = T(o), f = s && D(s) ? T(s) : s;
@@ -1701,7 +1726,7 @@ function tt(t, e, i, s) {
1701
1726
  y: c
1702
1727
  });
1703
1728
  }
1704
- function Oi(t) {
1729
+ function Pi(t) {
1705
1730
  let {
1706
1731
  elements: e,
1707
1732
  rect: i,
@@ -1716,7 +1741,7 @@ function Oi(t) {
1716
1741
  scrollTop: 0
1717
1742
  }, c = W(1);
1718
1743
  const d = W(0), u = I(s);
1719
- if ((u || !u && !o) && ((mt(s) !== "body" || kt(r)) && (a = It(s)), I(s))) {
1744
+ if ((u || !u && !o) && ((mt(s) !== "body" || $t(r)) && (a = It(s)), I(s))) {
1720
1745
  const h = tt(s);
1721
1746
  c = st(s), d.x = h.x + s.clientLeft, d.y = h.y + s.clientTop;
1722
1747
  }
@@ -1727,16 +1752,16 @@ function Oi(t) {
1727
1752
  y: i.y * c.y - a.scrollTop * c.y + d.y
1728
1753
  };
1729
1754
  }
1730
- function Ti(t) {
1755
+ function Ri(t) {
1731
1756
  return Array.from(t.getClientRects());
1732
1757
  }
1733
- function jt(t, e) {
1758
+ function Ut(t, e) {
1734
1759
  const i = It(t).scrollLeft;
1735
1760
  return e ? e.left + i : tt(N(t)).left + i;
1736
1761
  }
1737
- function Ri(t) {
1762
+ function Di(t) {
1738
1763
  const e = N(t), i = It(t), s = t.ownerDocument.body, n = Z(e.scrollWidth, e.clientWidth, s.scrollWidth, s.clientWidth), o = Z(e.scrollHeight, e.clientHeight, s.scrollHeight, s.clientHeight);
1739
- let r = -i.scrollLeft + jt(t);
1764
+ let r = -i.scrollLeft + Ut(t);
1740
1765
  const l = -i.scrollTop;
1741
1766
  return M(s).direction === "rtl" && (r += Z(e.clientWidth, s.clientWidth) - n), {
1742
1767
  width: n,
@@ -1745,7 +1770,7 @@ function Ri(t) {
1745
1770
  y: l
1746
1771
  };
1747
1772
  }
1748
- function Pi(t, e) {
1773
+ function Mi(t, e) {
1749
1774
  const i = T(t), s = N(t), n = i.visualViewport;
1750
1775
  let o = s.clientWidth, r = s.clientHeight, l = 0, a = 0;
1751
1776
  if (n) {
@@ -1760,7 +1785,7 @@ function Pi(t, e) {
1760
1785
  y: a
1761
1786
  };
1762
1787
  }
1763
- function Di(t, e) {
1788
+ function Fi(t, e) {
1764
1789
  const i = tt(t, !0, e === "fixed"), s = i.top + t.clientTop, n = i.left + t.clientLeft, o = I(t) ? st(t) : W(1), r = t.clientWidth * o.x, l = t.clientHeight * o.y, a = n * o.x, c = s * o.y;
1765
1790
  return {
1766
1791
  width: r,
@@ -1772,13 +1797,13 @@ function Di(t, e) {
1772
1797
  function oe(t, e, i) {
1773
1798
  let s;
1774
1799
  if (e === "viewport")
1775
- s = Pi(t, i);
1800
+ s = Mi(t, i);
1776
1801
  else if (e === "document")
1777
- s = Ri(N(t));
1802
+ s = Di(N(t));
1778
1803
  else if (D(e))
1779
- s = Di(e, i);
1804
+ s = Fi(e, i);
1780
1805
  else {
1781
- const n = Oe(t);
1806
+ const n = Te(t);
1782
1807
  s = {
1783
1808
  ...e,
1784
1809
  x: e.x - n.x,
@@ -1787,31 +1812,31 @@ function oe(t, e, i) {
1787
1812
  }
1788
1813
  return Tt(s);
1789
1814
  }
1790
- function Te(t, e) {
1791
- const i = U(t);
1792
- return i === e || !D(i) || gt(i) ? !1 : M(i).position === "fixed" || Te(i, e);
1815
+ function Pe(t, e) {
1816
+ const i = K(t);
1817
+ return i === e || !D(i) || gt(i) ? !1 : M(i).position === "fixed" || Pe(i, e);
1793
1818
  }
1794
- function Mi(t, e) {
1819
+ function Ii(t, e) {
1795
1820
  const i = e.get(t);
1796
1821
  if (i)
1797
1822
  return i;
1798
1823
  let s = vt(t, [], !1).filter((l) => D(l) && mt(l) !== "body"), n = null;
1799
1824
  const o = M(t).position === "fixed";
1800
- let r = o ? U(t) : t;
1825
+ let r = o ? K(t) : t;
1801
1826
  for (; D(r) && !gt(r); ) {
1802
1827
  const l = M(r), a = Zt(r);
1803
- !a && l.position === "fixed" && (n = null), (o ? !a && !n : !a && l.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || kt(r) && !a && Te(t, r)) ? s = s.filter((d) => d !== r) : n = l, r = U(r);
1828
+ !a && l.position === "fixed" && (n = null), (o ? !a && !n : !a && l.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || $t(r) && !a && Pe(t, r)) ? s = s.filter((d) => d !== r) : n = l, r = K(r);
1804
1829
  }
1805
1830
  return e.set(t, s), s;
1806
1831
  }
1807
- function Fi(t) {
1832
+ function Ni(t) {
1808
1833
  let {
1809
1834
  element: e,
1810
1835
  boundary: i,
1811
1836
  rootBoundary: s,
1812
1837
  strategy: n
1813
1838
  } = t;
1814
- const r = [...i === "clippingAncestors" ? Ft(e) ? [] : Mi(e, this._c) : [].concat(i), s], l = r[0], a = r.reduce((c, d) => {
1839
+ const r = [...i === "clippingAncestors" ? Ft(e) ? [] : Ii(e, this._c) : [].concat(i), s], l = r[0], a = r.reduce((c, d) => {
1815
1840
  const u = oe(e, d, n);
1816
1841
  return c.top = Z(u.top, c.top), c.right = ht(u.right, c.right), c.bottom = ht(u.bottom, c.bottom), c.left = Z(u.left, c.left), c;
1817
1842
  }, oe(e, l, n));
@@ -1822,17 +1847,17 @@ function Fi(t) {
1822
1847
  y: a.top
1823
1848
  };
1824
1849
  }
1825
- function Ii(t) {
1850
+ function Bi(t) {
1826
1851
  const {
1827
1852
  width: e,
1828
1853
  height: i
1829
- } = Le(t);
1854
+ } = Oe(t);
1830
1855
  return {
1831
1856
  width: e,
1832
1857
  height: i
1833
1858
  };
1834
1859
  }
1835
- function Ni(t, e, i) {
1860
+ function Vi(t, e, i) {
1836
1861
  const s = I(e), n = N(e), o = i === "fixed", r = tt(t, !0, o, e);
1837
1862
  let l = {
1838
1863
  scrollLeft: 0,
@@ -1840,15 +1865,15 @@ function Ni(t, e, i) {
1840
1865
  };
1841
1866
  const a = W(0);
1842
1867
  if (s || !s && !o)
1843
- if ((mt(e) !== "body" || kt(n)) && (l = It(e)), s) {
1868
+ if ((mt(e) !== "body" || $t(n)) && (l = It(e)), s) {
1844
1869
  const f = tt(e, !0, o, e);
1845
1870
  a.x = f.x + e.clientLeft, a.y = f.y + e.clientTop;
1846
- } else n && (a.x = jt(n));
1871
+ } else n && (a.x = Ut(n));
1847
1872
  let c = 0, d = 0;
1848
1873
  if (n && !s && !o) {
1849
1874
  const f = n.getBoundingClientRect();
1850
1875
  d = f.top + l.scrollTop, c = f.left + l.scrollLeft - // RTL <body> scrollbar.
1851
- jt(n, f);
1876
+ Ut(n, f);
1852
1877
  }
1853
1878
  const u = r.left + l.scrollLeft - a.x - c, h = r.top + l.scrollTop - a.y - d;
1854
1879
  return {
@@ -1874,23 +1899,23 @@ function Re(t, e) {
1874
1899
  if (Ft(t))
1875
1900
  return i;
1876
1901
  if (!I(t)) {
1877
- let n = U(t);
1902
+ let n = K(t);
1878
1903
  for (; n && !gt(n); ) {
1879
1904
  if (D(n) && !Bt(n))
1880
1905
  return n;
1881
- n = U(n);
1906
+ n = K(n);
1882
1907
  }
1883
1908
  return i;
1884
1909
  }
1885
1910
  let s = re(t, e);
1886
- for (; s && Ai(s) && Bt(s); )
1911
+ for (; s && ki(s) && Bt(s); )
1887
1912
  s = re(s, e);
1888
- return s && gt(s) && Bt(s) && !Zt(s) ? i : s || ki(t) || i;
1913
+ return s && gt(s) && Bt(s) && !Zt(s) ? i : s || Li(t) || i;
1889
1914
  }
1890
- const Bi = async function(t) {
1915
+ const Hi = async function(t) {
1891
1916
  const e = this.getOffsetParent || Re, i = this.getDimensions, s = await i(t.floating);
1892
1917
  return {
1893
- reference: Ni(t.reference, await e(t.floating), t.strategy),
1918
+ reference: Vi(t.reference, await e(t.floating), t.strategy),
1894
1919
  floating: {
1895
1920
  x: 0,
1896
1921
  y: 0,
@@ -1899,22 +1924,22 @@ const Bi = async function(t) {
1899
1924
  }
1900
1925
  };
1901
1926
  };
1902
- function Vi(t) {
1927
+ function _i(t) {
1903
1928
  return M(t).direction === "rtl";
1904
1929
  }
1905
- const Hi = {
1906
- convertOffsetParentRelativeRectToViewportRelativeRect: Oi,
1930
+ const zi = {
1931
+ convertOffsetParentRelativeRectToViewportRelativeRect: Pi,
1907
1932
  getDocumentElement: N,
1908
- getClippingRect: Fi,
1933
+ getClippingRect: Ni,
1909
1934
  getOffsetParent: Re,
1910
- getElementRects: Bi,
1911
- getClientRects: Ti,
1912
- getDimensions: Ii,
1935
+ getElementRects: Hi,
1936
+ getClientRects: Ri,
1937
+ getDimensions: Bi,
1913
1938
  getScale: st,
1914
1939
  isElement: D,
1915
- isRTL: Vi
1940
+ isRTL: _i
1916
1941
  };
1917
- function _i(t, e) {
1942
+ function Wi(t, e) {
1918
1943
  let i = null, s;
1919
1944
  const n = N(t);
1920
1945
  function o() {
@@ -1931,17 +1956,17 @@ function _i(t, e) {
1931
1956
  } = t.getBoundingClientRect();
1932
1957
  if (l || e(), !u || !h)
1933
1958
  return;
1934
- const f = $t(d), g = $t(n.clientWidth - (c + u)), m = $t(n.clientHeight - (d + h)), b = $t(c), y = {
1959
+ const f = kt(d), g = kt(n.clientWidth - (c + u)), m = kt(n.clientHeight - (d + h)), b = kt(c), y = {
1935
1960
  rootMargin: -f + "px " + -g + "px " + -m + "px " + -b + "px",
1936
1961
  threshold: Z(0, ht(1, a)) || 1
1937
1962
  };
1938
1963
  let x = !0;
1939
1964
  function S(v) {
1940
- const $ = v[0].intersectionRatio;
1941
- if ($ !== a) {
1965
+ const k = v[0].intersectionRatio;
1966
+ if (k !== a) {
1942
1967
  if (!x)
1943
1968
  return r();
1944
- $ ? r(!1, $) : s = setTimeout(() => {
1969
+ k ? r(!1, k) : s = setTimeout(() => {
1945
1970
  r(!1, 1e-7);
1946
1971
  }, 1e3);
1947
1972
  }
@@ -1960,7 +1985,7 @@ function _i(t, e) {
1960
1985
  }
1961
1986
  return r(!0), o;
1962
1987
  }
1963
- function zi(t, e, i, s) {
1988
+ function Ui(t, e, i, s) {
1964
1989
  s === void 0 && (s = {});
1965
1990
  const {
1966
1991
  ancestorScroll: n = !0,
@@ -1974,7 +1999,7 @@ function zi(t, e, i, s) {
1974
1999
  passive: !0
1975
2000
  }), o && p.addEventListener("resize", i);
1976
2001
  });
1977
- const u = c && l ? _i(c, i) : null;
2002
+ const u = c && l ? Wi(c, i) : null;
1978
2003
  let h = -1, f = null;
1979
2004
  r && (f = new ResizeObserver((p) => {
1980
2005
  let [y] = p;
@@ -1996,31 +2021,31 @@ function zi(t, e, i, s) {
1996
2021
  }), u == null || u(), (p = f) == null || p.disconnect(), f = null, a && cancelAnimationFrame(g);
1997
2022
  };
1998
2023
  }
1999
- const Wi = Si, ji = Ei, Ui = xi, Ki = yi, Xi = Ci, Yi = (t, e, i) => {
2024
+ const Ki = Ci, ji = Ai, Xi = Si, Yi = vi, Gi = $i, Ji = (t, e, i) => {
2000
2025
  const s = /* @__PURE__ */ new Map(), n = {
2001
- platform: Hi,
2026
+ platform: zi,
2002
2027
  ...i
2003
2028
  }, o = {
2004
2029
  ...n.platform,
2005
2030
  _c: s
2006
2031
  };
2007
- return bi(t, e, {
2032
+ return xi(t, e, {
2008
2033
  ...n,
2009
2034
  platform: o
2010
2035
  });
2011
2036
  };
2012
- async function Gi(t) {
2013
- const e = xe.call(this, t);
2037
+ async function Zi(t) {
2038
+ const e = ve.call(this, t);
2014
2039
  e.el.inert = !1, e.el.classList.add(this.settings.stateActive), e.isTooltip || e.trigger.setAttribute("aria-expanded", "true"), e.getCustomProps();
2015
- const i = si(e), s = e.el.querySelector(i.arrow.element);
2016
- return i.arrow.element = s || void 0, e.floatingCleanup = zi(e.trigger, e.el, () => {
2017
- Yi(e.trigger, e.el, {
2040
+ const i = oi(e), s = e.el.querySelector(i.arrow.element);
2041
+ return i.arrow.element = s || void 0, e.floatingCleanup = Ui(e.trigger, e.el, () => {
2042
+ Ji(e.trigger, e.el, {
2018
2043
  placement: e.getSetting("placement"),
2019
2044
  middleware: [
2020
- Ui(i.flip),
2021
- ji({ ...i.shift, limiter: Xi() }),
2022
- Wi(i.offset),
2023
- Ki(i.arrow)
2045
+ Xi(i.flip),
2046
+ ji({ ...i.shift, limiter: Gi() }),
2047
+ Ki(i.offset),
2048
+ Yi(i.arrow)
2024
2049
  ]
2025
2050
  }).then(({ x: n, y: o, placement: r, middlewareData: l }) => {
2026
2051
  if (e.el) {
@@ -2031,14 +2056,14 @@ async function Gi(t) {
2031
2056
  e.el.setAttribute("data-floating-placement", r);
2032
2057
  }
2033
2058
  });
2034
- }), e.state = "opened", e.getSetting("event") === "click" && ci.call(this, e), e;
2059
+ }), e.state = "opened", e.getSetting("event") === "click" && ui.call(this, e), e;
2035
2060
  }
2036
2061
  var dt;
2037
- class ts extends Pt {
2062
+ class is extends Rt {
2038
2063
  constructor(i = {}) {
2039
- super({ ...ii, ...i });
2040
- k(this, dt);
2041
- this.trigger = null, E(this, dt, ai.bind(this));
2064
+ super({ ...ni, ...i });
2065
+ $(this, dt);
2066
+ this.trigger = null, E(this, dt, fi.bind(this));
2042
2067
  }
2043
2068
  get active() {
2044
2069
  return this.get("opened", "state");
@@ -2047,13 +2072,13 @@ class ts extends Pt {
2047
2072
  return this.collection.find((i) => i.state == "opened" && i.getSetting("event") == "hover");
2048
2073
  }
2049
2074
  async createEntry(i, s) {
2050
- return new fi(this, i, s);
2075
+ return new di(this, i, s);
2051
2076
  }
2052
2077
  async open(i) {
2053
- return Gi.call(this, i);
2078
+ return Zi.call(this, i);
2054
2079
  }
2055
2080
  async close(i) {
2056
- return ve.call(this, i);
2081
+ return Se.call(this, i);
2057
2082
  }
2058
2083
  async afterMount() {
2059
2084
  document.addEventListener("keydown", w(this, dt), !1);
@@ -2067,9 +2092,9 @@ class ts extends Pt {
2067
2092
  }
2068
2093
  dt = new WeakMap();
2069
2094
  export {
2070
- Qi as Drawer,
2071
- qi as Modal,
2072
- ts as Popover,
2073
- Zi as core
2095
+ ts as Drawer,
2096
+ es as Modal,
2097
+ is as Popover,
2098
+ qi as core
2074
2099
  };
2075
2100
  //# sourceMappingURL=index.js.map