vrembem 4.0.0-next.22 → 4.0.0-next.24

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
@@ -1,30 +1,30 @@
1
- var Ee = (t) => {
1
+ var $e = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var Oe = (t, e, i) => e.has(t) || Ee("Cannot " + i);
5
- var E = (t, e, i) => (Oe(t, e, "read from private field"), i ? i.call(t) : e.get(t)), H = (t, e, i) => e.has(t) ? Ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), M = (t, e, i, s) => (Oe(t, e, "write to private field"), s ? s.call(t, i) : e.set(t, i), i);
6
- var B;
7
- class Ie {
4
+ var Le = (t, e, i) => e.has(t) || $e("Cannot " + i);
5
+ var x = (t, e, i) => (Le(t, e, "read from private field"), i ? i.call(t) : e.get(t)), _ = (t, e, i) => e.has(t) ? $e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), M = (t, e, i, s) => (Le(t, e, "write to private field"), s ? s.call(t, i) : e.set(t, i), i);
6
+ var j;
7
+ class Re {
8
8
  constructor(e, i) {
9
- H(this, B);
10
- this.value = e, M(this, B, i), this.mql = null;
9
+ _(this, j);
10
+ this.value = e, M(this, j, i), this.mql = null;
11
11
  }
12
12
  get handler() {
13
- return E(this, B);
13
+ return x(this, j);
14
14
  }
15
15
  // Unmount existing handler before setting a new one.
16
16
  set handler(e) {
17
- this.mql && this.mql.removeEventListener("change", E(this, B)), M(this, B, e);
17
+ this.mql && this.mql.removeEventListener("change", x(this, j)), M(this, j, e);
18
18
  }
19
19
  mount(e, i) {
20
- return e && (this.value = e), i && M(this, B, i), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), this.mql.addEventListener("change", E(this, B)), E(this, B).call(this, this.mql), this) : this;
20
+ return e && (this.value = e), i && M(this, j, i), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), this.mql.addEventListener("change", x(this, j)), x(this, j).call(this, this.mql), this) : this;
21
21
  }
22
22
  unmount() {
23
- return this.mql ? (this.mql.removeEventListener("change", E(this, B)), this.value = null, M(this, B, null), this.mql = null, this) : this;
23
+ return this.mql ? (this.mql.removeEventListener("change", x(this, j)), this.value = null, M(this, j, null), this.mql = null, this) : this;
24
24
  }
25
25
  }
26
- B = new WeakMap();
27
- class Rt {
26
+ j = new WeakMap();
27
+ class jt {
28
28
  constructor() {
29
29
  this.collection = [];
30
30
  }
@@ -55,41 +55,19 @@ class Rt {
55
55
  return this.collection.find((s) => s[i] === e);
56
56
  }
57
57
  }
58
- const g = {
59
- inert: ":not([inert]):not([inert] *)",
60
- negTabIndex: ':not([tabindex^="-"])',
61
- disabled: ":not(:disabled)"
62
- }, ai = [
63
- `a[href]${g.inert}${g.negTabIndex}`,
64
- `area[href]${g.inert}${g.negTabIndex}`,
65
- `input:not([type="hidden"]):not([type="radio"])${g.inert}${g.negTabIndex}${g.disabled}`,
66
- `input[type="radio"]${g.inert}${g.negTabIndex}${g.disabled}`,
67
- `select${g.inert}${g.negTabIndex}${g.disabled}`,
68
- `textarea${g.inert}${g.negTabIndex}${g.disabled}`,
69
- `button${g.inert}${g.negTabIndex}${g.disabled}`,
70
- `details${g.inert} > summary:first-of-type${g.negTabIndex}`,
71
- // Discard until Firefox supports `:has()`
72
- // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
73
- // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
74
- `iframe${g.inert}${g.negTabIndex}`,
75
- `audio[controls]${g.inert}${g.negTabIndex}`,
76
- `video[controls]${g.inert}${g.negTabIndex}`,
77
- `[contenteditable]${g.inert}${g.negTabIndex}`,
78
- `[tabindex]${g.inert}${g.negTabIndex}`
79
- ];
80
- var rt, Z, tt;
81
- class Qt {
58
+ var ot, tt, et;
59
+ class te {
82
60
  constructor(e = null, i = "[data-focus]") {
83
- H(this, rt);
84
- H(this, Z);
85
- H(this, tt);
86
- this.el = e, this.selectorFocus = i, M(this, Z, li.bind(this)), M(this, tt, ci.bind(this));
61
+ _(this, ot);
62
+ _(this, tt);
63
+ _(this, et);
64
+ this.el = e, this.selectorFocus = i, M(this, tt, ui.bind(this)), M(this, et, fi.bind(this));
87
65
  }
88
66
  get focusable() {
89
- return E(this, rt);
67
+ return x(this, ot);
90
68
  }
91
69
  set focusable(e) {
92
- M(this, rt, e), E(this, rt).length ? (document.removeEventListener("keydown", E(this, tt)), document.addEventListener("keydown", E(this, Z))) : (document.removeEventListener("keydown", E(this, Z)), document.addEventListener("keydown", E(this, tt)));
70
+ M(this, ot, e), x(this, ot).length ? (document.removeEventListener("keydown", x(this, et)), document.addEventListener("keydown", x(this, tt))) : (document.removeEventListener("keydown", x(this, tt)), document.addEventListener("keydown", x(this, et)));
93
71
  }
94
72
  get focusableFirst() {
95
73
  return this.focusable[0];
@@ -101,36 +79,51 @@ class Qt {
101
79
  e && (this.el = e), i && (this.selectorFocus = i), this.focusable = this.getFocusable(), this.focus();
102
80
  }
103
81
  unmount() {
104
- this.el = null, this.focusable = [], document.removeEventListener("keydown", E(this, Z)), document.removeEventListener("keydown", E(this, tt));
82
+ this.el = null, this.focusable = [], document.removeEventListener("keydown", x(this, tt)), document.removeEventListener("keydown", x(this, et));
105
83
  }
106
84
  focus(e = this.el, i = this.selectorFocus) {
107
85
  (e.querySelector(i) || e).focus();
108
86
  }
109
87
  getFocusable(e = this.el) {
110
- const i = [], s = document.activeElement, n = e.scrollTop;
111
- return e.querySelectorAll(ai.join(",")).forEach((a) => {
112
- a.focus(), document.activeElement === a && i.push(a);
88
+ const i = [], s = document.activeElement, n = e.scrollTop, r = ci.join(",");
89
+ return e.querySelectorAll(r).forEach((l) => {
90
+ l.focus(), document.activeElement === l && i.push(l);
113
91
  }), e.scrollTop = n, s.focus(), i;
114
92
  }
115
93
  }
116
- rt = new WeakMap(), Z = new WeakMap(), tt = new WeakMap();
117
- function li(t) {
94
+ ot = new WeakMap(), tt = new WeakMap(), et = new WeakMap();
95
+ const I = ":not([inert])", R = ':not([tabindex^="-"])', bt = ":not(:disabled)", ci = [
96
+ `a[href]${I}${R}`,
97
+ `area[href]${I}${R}`,
98
+ `input:not([type="hidden"]):not([type="radio"])${I}${R}${bt}`,
99
+ `input[type="radio"]${I}${R}${bt}`,
100
+ `select${I}${R}${bt}`,
101
+ `textarea${I}${R}${bt}`,
102
+ `button${I}${R}${bt}`,
103
+ `details${I} > summary:first-of-type${R}`,
104
+ `iframe${I}${R}`,
105
+ `audio[controls]${I}${R}`,
106
+ `video[controls]${I}${R}`,
107
+ `[contenteditable]${I}${R}`,
108
+ `[tabindex]${I}${R}`
109
+ ];
110
+ function ui(t) {
118
111
  (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()));
119
112
  }
120
- function ci(t) {
113
+ function fi(t) {
121
114
  (t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
122
115
  }
123
- function Bt() {
116
+ function Ft() {
124
117
  return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
125
118
  }
126
- function Zt(t, e) {
119
+ function ee(t, e) {
127
120
  const i = {
128
121
  fallback: null,
129
122
  element: document.body,
130
123
  ...e
131
124
  };
132
125
  if (t.slice(0, 2) !== "--") {
133
- const n = Bt();
126
+ const n = Ft();
134
127
  n && (t = `${n}${t}`), t = `--${t}`;
135
128
  }
136
129
  const s = getComputedStyle(i.element).getPropertyValue(t).trim();
@@ -140,11 +133,11 @@ function Zt(t, e) {
140
133
  return i.fallback;
141
134
  throw new Error(`CSS variable "${t}" was not found!`);
142
135
  }
143
- function te(t, e) {
136
+ function ie(t, e) {
144
137
  const s = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
145
138
  return s ? JSON.parse(s) : {};
146
139
  }
147
- function ee(t, e = !0) {
140
+ function se(t, e = !0) {
148
141
  const i = localStorage.getItem(t), s = i ? JSON.parse(i) : {};
149
142
  return {
150
143
  get(n) {
@@ -155,7 +148,7 @@ function ee(t, e = !0) {
155
148
  }
156
149
  };
157
150
  }
158
- function Kt(t, e, i) {
151
+ function Yt(t, e, i) {
159
152
  const s = e.nodeType === Node.COMMENT_NODE, n = e.nodeType === Node.ELEMENT_NODE;
160
153
  if (e = s || n ? e : document.querySelector(e), s && (i = "after"), !e) throw new Error(`Not a valid teleport reference: '${e}'`);
161
154
  if (typeof e[i] != "function") throw new Error(`Not a valid teleport method: '${i}'`);
@@ -164,7 +157,7 @@ function Kt(t, e, i) {
164
157
  }
165
158
  function di(t) {
166
159
  const e = {
167
- prefix: Zt("prefix-themes", { fallback: "vb-theme-" }),
160
+ prefix: ee("prefix-themes", { fallback: "vb-theme-" }),
168
161
  themes: ["root", "light", "dark"],
169
162
  storeKey: "VB:Profile"
170
163
  };
@@ -178,7 +171,7 @@ function di(t) {
178
171
  };
179
172
  for (const [r] of Object.entries(i))
180
173
  t && t[r] && (i[r] = t[r]);
181
- const s = ee(e.storeKey), n = {
174
+ const s = se(e.storeKey), n = {
182
175
  // Store our settings in the API.
183
176
  settings: e,
184
177
  // Actions.
@@ -212,10 +205,10 @@ function di(t) {
212
205
  };
213
206
  return n.callback("onInit"), n;
214
207
  }
215
- function Ot(t, e, i, s = "transition-duration") {
208
+ function Lt(t, e, i, s = "transition-duration") {
216
209
  return new Promise((n) => {
217
210
  if (typeof s == "string") {
218
- const r = Zt(s, { element: t }), a = !!r.includes("ms");
211
+ const r = ee(s, { element: t }), a = !!r.includes("ms");
219
212
  s = parseFloat(r) * (a ? 1 : 1e3);
220
213
  }
221
214
  t.classList.remove(e.finish), t.classList.add(i.start), setTimeout(() => {
@@ -223,33 +216,33 @@ function Ot(t, e, i, s = "transition-duration") {
223
216
  }, s);
224
217
  });
225
218
  }
226
- function ui(t, e) {
219
+ function hi(t, e) {
227
220
  e && document.querySelectorAll(e).forEach((s) => {
228
221
  t ? s.style.overflow = "hidden" : s.style.removeProperty("overflow");
229
222
  });
230
223
  }
231
- function fi(t, e) {
224
+ function pi(t, e) {
232
225
  e && document.querySelectorAll(e).forEach((s) => {
233
226
  t ? (s.inert = !0, s.setAttribute("aria-hidden", !0)) : (s.inert = null, s.removeAttribute("aria-hidden"));
234
227
  });
235
228
  }
236
- function $t(t, e) {
237
- fi(!!t, e.selectorInert), ui(!!t, e.selectorOverflow);
229
+ function Ct(t, e) {
230
+ pi(!!t, e.selectorInert), hi(!!t, e.selectorOverflow);
238
231
  }
239
- const _s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
232
+ const Ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
240
233
  __proto__: null,
241
- Breakpoint: Ie,
242
- Collection: Rt,
243
- FocusTrap: Qt,
244
- cssVar: Zt,
245
- getConfig: te,
246
- getPrefix: Bt,
247
- localStore: ee,
248
- teleport: Kt,
234
+ Breakpoint: Re,
235
+ Collection: jt,
236
+ FocusTrap: te,
237
+ cssVar: ee,
238
+ getConfig: ie,
239
+ getPrefix: Ft,
240
+ localStore: se,
241
+ teleport: Yt,
249
242
  themeStore: di,
250
- transition: Ot,
251
- updateGlobalState: $t
252
- }, Symbol.toStringTag, { value: "Module" })), hi = {
243
+ transition: Lt,
244
+ updateGlobalState: Ct
245
+ }, Symbol.toStringTag, { value: "Module" })), gi = {
253
246
  autoMount: !1,
254
247
  // Data attributes
255
248
  dataOpen: "drawer-open",
@@ -281,26 +274,26 @@ const _s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
281
274
  transition: !0,
282
275
  transitionDuration: "drawer-transition-duration"
283
276
  };
284
- function pi(t) {
277
+ function vi(t) {
285
278
  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";
286
279
  }
287
- async function gi(t) {
280
+ async function mi(t) {
288
281
  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));
289
282
  }
290
- function vi(t) {
291
- const e = Bt(), i = t.getAttribute(`data-${this.settings.dataBreakpoint}`);
283
+ function bi(t) {
284
+ const e = Ft(), i = t.getAttribute(`data-${this.settings.dataBreakpoint}`);
292
285
  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;
293
286
  }
294
- function nt(t) {
287
+ function rt(t) {
295
288
  const e = typeof t == "string" ? this.get(t) : this.get(t.id);
296
289
  if (e)
297
290
  return e;
298
291
  throw new Error(`Drawer not found in collection with id of "${t.id || t}".`);
299
292
  }
300
- function Me(t) {
293
+ function Be(t) {
301
294
  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());
302
295
  }
303
- async function mi(t) {
296
+ async function wi(t) {
304
297
  const e = t.target.closest(`
305
298
  [data-${this.settings.dataOpen}],
306
299
  [data-${this.settings.dataToggle}],
@@ -308,14 +301,14 @@ async function mi(t) {
308
301
  `);
309
302
  if (e) {
310
303
  t.preventDefault(), e.matches(`[data-${this.settings.dataToggle}]`) && e.getAttribute(`data-${this.settings.dataToggle}`).trim().split(" ").forEach((s) => {
311
- const n = nt.call(this, s);
304
+ const n = rt.call(this, s);
312
305
  return n.trigger = e, n.toggle();
313
306
  }), e.matches(`[data-${this.settings.dataOpen}]`) && e.getAttribute(`data-${this.settings.dataOpen}`).trim().split(" ").forEach((s) => {
314
- const n = nt.call(this, s);
307
+ const n = rt.call(this, s);
315
308
  return n.trigger = e, n.open();
316
309
  }), e.matches(`[data-${this.settings.dataClose}]`) && e.getAttribute(`data-${this.settings.dataClose}`).trim().split(" ").forEach((s) => {
317
310
  if (s) {
318
- const n = nt.call(this, s);
311
+ const n = rt.call(this, s);
319
312
  return n.trigger = e, n.close();
320
313
  } else {
321
314
  const n = t.target.closest(this.settings.selectorDrawer);
@@ -327,11 +320,11 @@ async function mi(t) {
327
320
  if (this.activeModal && t.target.matches(this.settings.selectorScreen))
328
321
  return this.close(this.activeModal.id);
329
322
  }
330
- function bi(t) {
323
+ function yi(t) {
331
324
  if (t.key === "Escape" && this.activeModal)
332
325
  return this.close(this.activeModal);
333
326
  }
334
- async function Xt(t, e = !0) {
327
+ async function qt(t, e = !0) {
335
328
  const i = this.collection.findIndex((s) => s.id === t.id);
336
329
  if (i >= 0) {
337
330
  const s = this.collection[i];
@@ -341,71 +334,71 @@ async function Xt(t, e = !0) {
341
334
  }
342
335
  return this.collection;
343
336
  }
344
- async function ie(t, e, i = !0) {
345
- const s = nt.call(this, t), n = { ...this.settings, ...s.settings };
346
- return e !== void 0 && (n.transition = e), (s.state === "closed" || s.state === "indeterminate") && (s.state = "opening", n.transition ? await Ot(s.el, {
337
+ async function ne(t, e, i = !0) {
338
+ const s = rt.call(this, t), n = { ...this.settings, ...s.settings };
339
+ return e !== void 0 && (n.transition = e), (s.state === "closed" || s.state === "indeterminate") && (s.state = "opening", n.transition ? await Lt(s.el, {
347
340
  start: n.stateClosing,
348
341
  finish: n.stateClosed
349
342
  }, {
350
343
  start: n.stateOpening,
351
344
  finish: n.stateOpened
352
- }, n.transitionDuration) : (s.el.classList.add(n.stateOpened), s.el.classList.remove(n.stateClosed)), s.state = "opened", s.mode === "modal" && $t(!0, n), i && Me.call(this, s), s.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
345
+ }, n.transitionDuration) : (s.el.classList.add(n.stateOpened), s.el.classList.remove(n.stateClosed)), s.state = "opened", s.mode === "modal" && Ct(!0, n), i && Be.call(this, s), s.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
353
346
  detail: this,
354
347
  bubbles: !0
355
348
  }))), s;
356
349
  }
357
- async function jt(t, e, i = !0) {
358
- const s = nt.call(this, t), n = { ...this.settings, ...s.settings };
359
- return e !== void 0 && (n.transition = e), (s.state === "opened" || s.state === "indeterminate") && (s.state = "closing", document.activeElement.blur(), n.transition ? await Ot(s.el, {
350
+ async function Nt(t, e, i = !0) {
351
+ const s = rt.call(this, t), n = { ...this.settings, ...s.settings };
352
+ return e !== void 0 && (n.transition = e), (s.state === "opened" || s.state === "indeterminate") && (s.state = "closing", document.activeElement.blur(), n.transition ? await Lt(s.el, {
360
353
  start: n.stateOpening,
361
354
  finish: n.stateOpened
362
355
  }, {
363
356
  start: n.stateClosing,
364
357
  finish: n.stateClosed
365
- }, n.transitionDuration) : (s.el.classList.add(n.stateClosed), s.el.classList.remove(n.stateOpened)), s.state = "closed", s.mode === "modal" && $t(!1, n), i && Me.call(this, s), s.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
358
+ }, n.transitionDuration) : (s.el.classList.add(n.stateClosed), s.el.classList.remove(n.stateOpened)), s.state = "closed", s.mode === "modal" && Ct(!1, n), i && Be.call(this, s), s.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
366
359
  detail: this,
367
360
  bubbles: !0
368
361
  }))), s;
369
362
  }
370
- async function Re(t, e, i) {
371
- const s = nt.call(this, t);
372
- return s.state === "closed" ? ie.call(this, s, e, i) : jt.call(this, s, e, i);
363
+ async function je(t, e, i) {
364
+ const s = rt.call(this, t);
365
+ return s.state === "closed" ? ne.call(this, s, e, i) : Nt.call(this, s, e, i);
373
366
  }
374
- function wi(t) {
367
+ function xi(t) {
375
368
  switch (t.mode) {
376
369
  case "inline":
377
- return yi.call(this, t);
370
+ return Ei.call(this, t);
378
371
  case "modal":
379
- return xi.call(this, t);
372
+ return Oi.call(this, t);
380
373
  default:
381
374
  throw new Error(`"${t.mode}" is not a valid drawer mode.`);
382
375
  }
383
376
  }
384
- async function yi(t) {
385
- return t.el.classList.remove(t.getSetting("classModal")), t.dialog.removeAttribute("aria-modal"), $t(!1, { ...this.settings, ...t.settings }), this.focusTrap.unmount(), await gi(t), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
377
+ async function Ei(t) {
378
+ return t.el.classList.remove(t.getSetting("classModal")), t.dialog.removeAttribute("aria-modal"), Ct(!1, { ...this.settings, ...t.settings }), this.focusTrap.unmount(), await mi(t), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
386
379
  detail: this,
387
380
  bubbles: !0
388
381
  })), t;
389
382
  }
390
- async function xi(t) {
391
- return t.el.classList.add(t.getSetting("classModal")), t.dialog.setAttribute("aria-modal", "true"), await jt.call(this, t, !1, !1), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
383
+ async function Oi(t) {
384
+ return t.el.classList.add(t.getSetting("classModal")), t.dialog.setAttribute("aria-modal", "true"), await Nt.call(this, t, !1, !1), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
392
385
  detail: this,
393
386
  bubbles: !0
394
387
  })), t;
395
388
  }
396
- async function Ei(t, e = {}) {
397
- await Xt.call(this, t, !1);
398
- const i = this, s = new Ie();
389
+ async function $i(t, e = {}) {
390
+ await qt.call(this, t, !1);
391
+ const i = this, s = new Re();
399
392
  let n, r = "indeterminate";
400
393
  const a = {
401
394
  id: t.id,
402
395
  el: t,
403
396
  dialog: null,
404
397
  trigger: null,
405
- settings: { ...te(t, this.settings.dataConfig), ...e },
398
+ settings: { ...ie(t, this.settings.dataConfig), ...e },
406
399
  inlineState: "indeterminate",
407
400
  get breakpoint() {
408
- return vi.call(i, t);
401
+ return bi.call(i, t);
409
402
  },
410
403
  get store() {
411
404
  return i.store.get(this.id);
@@ -414,7 +407,7 @@ async function Ei(t, e = {}) {
414
407
  return n;
415
408
  },
416
409
  set mode(o) {
417
- n = o, wi.call(i, this);
410
+ n = o, xi.call(i, this);
418
411
  },
419
412
  get state() {
420
413
  return r;
@@ -422,28 +415,28 @@ async function Ei(t, e = {}) {
422
415
  set state(o) {
423
416
  r = o, this.mode === "inline" && o != "opening" && o != "closing" && (this.inlineState = o, this.getSetting("store") && i.store.set(this.id, o)), o === "indeterminate" && (this.el.classList.remove(this.getSetting("stateOpened")), this.el.classList.remove(this.getSetting("stateOpening")), this.el.classList.remove(this.getSetting("stateClosed")), this.el.classList.remove(this.getSetting("stateClosing")));
424
417
  },
425
- open(o, d) {
426
- return ie.call(i, this, o, d);
418
+ open(o, u) {
419
+ return ne.call(i, this, o, u);
427
420
  },
428
- close(o, d) {
429
- return jt.call(i, this, o, d);
421
+ close(o, u) {
422
+ return Nt.call(i, this, o, u);
430
423
  },
431
- toggle(o, d) {
432
- return Re.call(i, this, o, d);
424
+ toggle(o, u) {
425
+ return je.call(i, this, o, u);
433
426
  },
434
427
  deregister() {
435
- return Xt.call(i, this);
428
+ return qt.call(i, this);
436
429
  },
437
430
  mountBreakpoint() {
438
- const o = this.breakpoint, d = this.handleBreakpoint.bind(this);
439
- return s.mount(o, d), this;
431
+ const o = this.breakpoint, u = this.handleBreakpoint.bind(this);
432
+ return s.mount(o, u), this;
440
433
  },
441
434
  unmountBreakpoint() {
442
435
  return s.unmount(), this;
443
436
  },
444
437
  handleBreakpoint(o) {
445
- const d = o.matches ? "inline" : "modal";
446
- return this.mode != d && (this.mode = d), this;
438
+ const u = o.matches ? "inline" : "modal";
439
+ return this.mode != u && (this.mode = u), this;
447
440
  },
448
441
  getSetting(o) {
449
442
  return o in this.settings ? this.settings[o] : i.settings[o];
@@ -451,15 +444,15 @@ async function Ei(t, e = {}) {
451
444
  };
452
445
  this.collection.push(a);
453
446
  const l = t.querySelector(a.getSetting("selectorDialog"));
454
- return a.dialog = l || t, a.getSetting("setTabindex") && a.dialog.setAttribute("tabindex", "-1"), await pi(a), a.inlineState = a.state, a.mode = t.classList.contains(a.getSetting("classModal")) ? "modal" : "inline", a.breakpoint && a.mountBreakpoint(), a;
447
+ return a.dialog = l || t, a.getSetting("setTabindex") && a.dialog.setAttribute("tabindex", "-1"), await vi(a), a.inlineState = a.state, a.mode = t.classList.contains(a.getSetting("classModal")) ? "modal" : "inline", a.breakpoint && a.mountBreakpoint(), a;
455
448
  }
456
- var ot, at;
457
- class zs extends Rt {
449
+ var at, lt;
450
+ class Xs extends jt {
458
451
  constructor(i) {
459
452
  super();
460
- H(this, ot);
461
- H(this, at);
462
- this.defaults = hi, this.settings = { ...this.defaults, ...i }, this.focusTrap = new Qt(), this.store = ee(this.settings.storeKey, this.settings.store), M(this, ot, mi.bind(this)), M(this, at, bi.bind(this)), this.settings.autoMount && this.mount();
453
+ _(this, at);
454
+ _(this, lt);
455
+ this.defaults = gi, this.settings = { ...this.defaults, ...i }, this.focusTrap = new te(), this.store = se(this.settings.storeKey, this.settings.store), M(this, at, wi.bind(this)), M(this, lt, yi.bind(this)), this.settings.autoMount && this.mount();
463
456
  }
464
457
  get activeModal() {
465
458
  return this.collection.find((i) => i.state === "opened" && i.mode === "modal");
@@ -473,31 +466,31 @@ class zs extends Rt {
473
466
  return await this.deregisterCollection(), this.settings.eventListeners && this.unmountEventListeners(), this;
474
467
  }
475
468
  mountEventListeners() {
476
- document.addEventListener("click", E(this, ot), !1), document.addEventListener("keydown", E(this, at), !1);
469
+ document.addEventListener("click", x(this, at), !1), document.addEventListener("keydown", x(this, lt), !1);
477
470
  }
478
471
  unmountEventListeners() {
479
- document.removeEventListener("click", E(this, ot), !1), document.removeEventListener("keydown", E(this, at), !1);
472
+ document.removeEventListener("click", x(this, at), !1), document.removeEventListener("keydown", x(this, lt), !1);
480
473
  }
481
474
  register(i, s = {}) {
482
475
  let n = typeof i == "string" ? document.getElementById(i) : i;
483
- return n ? Ei.call(this, n, s) : Promise.reject(new Error(`Failed to register; drawer not found with ID of: "${i.id || i}".`));
476
+ return n ? $i.call(this, n, s) : Promise.reject(new Error(`Failed to register; drawer not found with ID of: "${i.id || i}".`));
484
477
  }
485
478
  deregister(i) {
486
479
  let s = this.get(i.id || i);
487
- return s ? Xt.call(this, s) : Promise.reject(new Error(`Failed to deregister; drawer does not exist in collection with ID of: "${i.id || i}".`));
480
+ return s ? qt.call(this, s) : Promise.reject(new Error(`Failed to deregister; drawer does not exist in collection with ID of: "${i.id || i}".`));
488
481
  }
489
482
  open(i, s, n) {
490
- return ie.call(this, i, s, n);
483
+ return ne.call(this, i, s, n);
491
484
  }
492
485
  close(i, s, n) {
493
- return jt.call(this, i, s, n);
486
+ return Nt.call(this, i, s, n);
494
487
  }
495
488
  toggle(i, s, n) {
496
- return Re.call(this, i, s, n);
489
+ return je.call(this, i, s, n);
497
490
  }
498
491
  }
499
- ot = new WeakMap(), at = new WeakMap();
500
- const Oi = {
492
+ at = new WeakMap(), lt = new WeakMap();
493
+ const Li = {
501
494
  autoMount: !1,
502
495
  // Data attributes
503
496
  dataOpen: "modal-open",
@@ -526,16 +519,16 @@ const Oi = {
526
519
  transition: !0,
527
520
  transitionDuration: "modal-transition-duration"
528
521
  };
529
- function yt(t) {
522
+ function Et(t) {
530
523
  const e = typeof t == "string" ? this.get(t) : this.get(t.id);
531
524
  if (e)
532
525
  return e;
533
526
  throw new Error(`Modal not found in collection with id of "${t.id || t}".`);
534
527
  }
535
- function Ft() {
528
+ function Vt() {
536
529
  this.active ? this.focusTrap.mount(this.active.dialog, this.settings.selectorFocus) : (this.trigger && (this.trigger.focus(), this.trigger = null), this.focusTrap.unmount());
537
530
  }
538
- async function $i(t) {
531
+ async function Ci(t) {
539
532
  const e = t.target.closest(`
540
533
  [data-${this.settings.dataOpen}],
541
534
  [data-${this.settings.dataReplace}],
@@ -543,11 +536,11 @@ async function $i(t) {
543
536
  `);
544
537
  if (e) {
545
538
  if (t.preventDefault(), e.matches(`[data-${this.settings.dataOpen}]`)) {
546
- const i = e.getAttribute(`data-${this.settings.dataOpen}`).trim(), s = yt.call(this, i);
539
+ const i = e.getAttribute(`data-${this.settings.dataOpen}`).trim(), s = Et.call(this, i);
547
540
  return t.target.closest(this.settings.selectorModal) || (this.trigger = e), s.open();
548
541
  }
549
542
  if (e.matches(`[data-${this.settings.dataReplace}]`)) {
550
- const i = e.getAttribute(`data-${this.settings.dataReplace}`).trim(), s = yt.call(this, i);
543
+ const i = e.getAttribute(`data-${this.settings.dataReplace}`).trim(), s = Et.call(this, i);
551
544
  return t.target.closest(this.settings.selectorModal) || (this.trigger = e), s.replace();
552
545
  }
553
546
  if (e.matches(`[data-${this.settings.dataClose}]`)) {
@@ -558,11 +551,11 @@ async function $i(t) {
558
551
  if (this.active && t.target.matches(this.settings.selectorScreen) && !this.active.required)
559
552
  return this.close(this.active.id);
560
553
  }
561
- function Li(t) {
554
+ function ki(t) {
562
555
  if (t.key === "Escape" && this.active && !this.active.dialog.matches(this.settings.selectorRequired))
563
556
  return this.close();
564
557
  }
565
- async function Yt(t, e = !0) {
558
+ async function Ut(t, e = !0) {
566
559
  const i = this.collection.findIndex((s) => s.id === t.id);
567
560
  if (i >= 0) {
568
561
  const s = this.collection[i];
@@ -572,50 +565,50 @@ async function Yt(t, e = !0) {
572
565
  }
573
566
  return this.collection;
574
567
  }
575
- async function se(t, e, i = !0) {
576
- const s = yt.call(this, t), n = { ...this.settings, ...s.settings };
577
- return e !== void 0 && (n.transition = e), this.stack.moveToTop(s), s.state === "closed" && (s.state = "opening", this.stack.add(s), n.transition ? await Ot(s.el, {
568
+ async function re(t, e, i = !0) {
569
+ const s = Et.call(this, t), n = { ...this.settings, ...s.settings };
570
+ return e !== void 0 && (n.transition = e), this.stack.moveToTop(s), s.state === "closed" && (s.state = "opening", this.stack.add(s), n.transition ? await Lt(s.el, {
578
571
  start: n.stateClosing,
579
572
  finish: n.stateClosed
580
573
  }, {
581
574
  start: n.stateOpening,
582
575
  finish: n.stateOpened
583
- }, n.transitionDuration) : (s.el.classList.add(n.stateOpened), s.el.classList.remove(n.stateClosed)), s.state = "opened"), i && Ft.call(this), s.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
576
+ }, n.transitionDuration) : (s.el.classList.add(n.stateOpened), s.el.classList.remove(n.stateClosed)), s.state = "opened"), i && Vt.call(this), s.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
584
577
  detail: this,
585
578
  bubbles: !0
586
579
  })), s;
587
580
  }
588
- async function ne(t, e, i = !0) {
589
- const s = t ? yt.call(this, t) : this.active;
581
+ async function oe(t, e, i = !0) {
582
+ const s = t ? Et.call(this, t) : this.active;
590
583
  if (s && s.state === "opened") {
591
584
  s.state = "closing";
592
585
  const n = { ...this.settings, ...s.settings };
593
- e !== void 0 && (n.transition = e), document.activeElement.blur(), n.transition ? await Ot(s.el, {
586
+ e !== void 0 && (n.transition = e), document.activeElement.blur(), n.transition ? await Lt(s.el, {
594
587
  start: n.stateOpening,
595
588
  finish: n.stateOpened
596
589
  }, {
597
590
  start: n.stateClosing,
598
591
  finish: n.stateClosed
599
- }, n.transitionDuration) : (s.el.classList.add(n.stateClosed), s.el.classList.remove(n.stateOpened)), this.stack.remove(s), s.state = "closed", i && Ft.call(this), s.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
592
+ }, n.transitionDuration) : (s.el.classList.add(n.stateClosed), s.el.classList.remove(n.stateOpened)), this.stack.remove(s), s.state = "closed", i && Vt.call(this), s.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
600
593
  detail: this,
601
594
  bubbles: !0
602
595
  }));
603
596
  }
604
597
  return s;
605
598
  }
606
- async function qt(t, e) {
599
+ async function Gt(t, e) {
607
600
  const i = [];
608
601
  return await Promise.all(this.stack.value.map(async (s) => {
609
- t && t === s.id ? Promise.resolve() : i.push(await ne.call(this, s, e, !1)), s.trigger = null;
602
+ t && t === s.id ? Promise.resolve() : i.push(await oe.call(this, s, e, !1)), s.trigger = null;
610
603
  })), i;
611
604
  }
612
- async function Be(t, e, i = !0) {
613
- const s = yt.call(this, t);
605
+ async function Fe(t, e, i = !0) {
606
+ const s = Et.call(this, t);
614
607
  let n, r;
615
- return s.state === "opened" ? (n = s, r = await qt.call(this, s.id, e)) : (r = qt.call(this, !1, e), n = se.call(this, s, e, !1), await Promise.all([n, r])), i && Ft.call(this), { opened: n, closed: r };
608
+ return s.state === "opened" ? (n = s, r = await Gt.call(this, s.id, e)) : (r = Gt.call(this, !1, e), n = re.call(this, s, e, !1), await Promise.all([n, r])), i && Vt.call(this), { opened: n, closed: r };
616
609
  }
617
- async function Ci(t, e = {}) {
618
- await Yt.call(this, t, !1);
610
+ async function Ai(t, e = {}) {
611
+ await Ut.call(this, t, !1);
619
612
  const i = this, s = {
620
613
  id: t.id,
621
614
  state: "closed",
@@ -625,24 +618,24 @@ async function Ci(t, e = {}) {
625
618
  return this.dialog.matches(this.getSetting("selectorRequired"));
626
619
  },
627
620
  returnRef: null,
628
- settings: { ...te(t, this.settings.dataConfig), ...e },
621
+ settings: { ...ie(t, this.settings.dataConfig), ...e },
629
622
  open(r, a) {
630
- return se.call(i, this, r, a);
623
+ return re.call(i, this, r, a);
631
624
  },
632
625
  close(r, a) {
633
- return ne.call(i, this, r, a);
626
+ return oe.call(i, this, r, a);
634
627
  },
635
628
  replace(r, a) {
636
- return Be.call(i, this, r, a);
629
+ return Fe.call(i, this, r, a);
637
630
  },
638
631
  deregister() {
639
- return Yt.call(i, this);
632
+ return Ut.call(i, this);
640
633
  },
641
634
  teleport(r = this.getSetting("teleport"), a = this.getSetting("teleportMethod")) {
642
- return this.returnRef ? (console.error("Element has already been teleported:", this.el), !1) : (this.returnRef = Kt(this.el, r, a), this.el);
635
+ return this.returnRef ? (console.error("Element has already been teleported:", this.el), !1) : (this.returnRef = Yt(this.el, r, a), this.el);
643
636
  },
644
637
  teleportReturn() {
645
- return this.returnRef ? (this.returnRef = Kt(this.el, this.returnRef), this.el) : (console.error("No return reference found:", this.el), !1);
638
+ return this.returnRef ? (this.returnRef = Yt(this.el, this.returnRef), this.el) : (console.error("No return reference found:", this.el), !1);
646
639
  },
647
640
  getSetting(r) {
648
641
  return r in this.settings ? this.settings[r] : i.settings[r];
@@ -650,7 +643,7 @@ async function Ci(t, e = {}) {
650
643
  }, n = t.querySelector(s.getSetting("selectorDialog"));
651
644
  return s.dialog = n || t, s.dialog.setAttribute("aria-modal", "true"), s.dialog.hasAttribute("role") || s.dialog.setAttribute("role", "dialog"), s.getSetting("setTabindex") && s.dialog.setAttribute("tabindex", "-1"), s.getSetting("teleport") && s.teleport(), this.collection.push(s), s.el.classList.contains(this.settings.stateOpened) ? await s.open(!1) : (s.el.classList.remove(this.settings.stateOpening), s.el.classList.remove(this.settings.stateClosing), s.el.classList.add(this.settings.stateClosed)), s;
652
645
  }
653
- function ki(t) {
646
+ function Si(t) {
654
647
  const e = [];
655
648
  return {
656
649
  get value() {
@@ -667,7 +660,7 @@ function ki(t) {
667
660
  });
668
661
  },
669
662
  updateGlobalState() {
670
- $t(this.top, t), this.updateIndex();
663
+ Ct(this.top, t), this.updateIndex();
671
664
  },
672
665
  add(i) {
673
666
  i.el.style.zIndex = null;
@@ -684,13 +677,13 @@ function ki(t) {
684
677
  }
685
678
  };
686
679
  }
687
- var lt, ct;
688
- class Ks extends Rt {
680
+ var ct, ut;
681
+ class Ys extends jt {
689
682
  constructor(i) {
690
683
  super();
691
- H(this, lt);
692
- H(this, ct);
693
- this.defaults = Oi, this.settings = { ...this.defaults, ...i }, this.trigger = null, this.focusTrap = new Qt(), this.stack = ki(this.settings), M(this, lt, $i.bind(this)), M(this, ct, Li.bind(this)), this.settings.autoMount && this.mount();
684
+ _(this, ct);
685
+ _(this, ut);
686
+ this.defaults = Li, this.settings = { ...this.defaults, ...i }, this.trigger = null, this.focusTrap = new te(), this.stack = Si(this.settings), M(this, ct, Ci.bind(this)), M(this, ut, ki.bind(this)), this.settings.autoMount && this.mount();
694
687
  }
695
688
  get active() {
696
689
  return this.stack.top;
@@ -704,38 +697,39 @@ class Ks extends Rt {
704
697
  return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.unmountEventListeners(), this;
705
698
  }
706
699
  mountEventListeners() {
707
- document.addEventListener("click", E(this, lt), !1), document.addEventListener("keydown", E(this, ct), !1);
700
+ document.addEventListener("click", x(this, ct), !1), document.addEventListener("keydown", x(this, ut), !1);
708
701
  }
709
702
  unmountEventListeners() {
710
- document.removeEventListener("click", E(this, lt), !1), document.removeEventListener("keydown", E(this, ct), !1);
703
+ document.removeEventListener("click", x(this, ct), !1), document.removeEventListener("keydown", x(this, ut), !1);
711
704
  }
712
705
  register(i, s = {}) {
713
706
  let n = typeof i == "string" ? document.getElementById(i) : i;
714
- return n ? Ci.call(this, n, s) : Promise.reject(new Error(`Failed to register; modal not found with ID of: "${i.id || i}".`));
707
+ return n ? Ai.call(this, n, s) : Promise.reject(new Error(`Failed to register; modal not found with ID of: "${i.id || i}".`));
715
708
  }
716
709
  deregister(i) {
717
710
  let s = this.get(i.id || i);
718
- return s ? Yt.call(this, s) : Promise.reject(new Error(`Failed to deregister; modal does not exist in collection with ID of: "${i.id || i}".`));
711
+ return s ? Ut.call(this, s) : Promise.reject(new Error(`Failed to deregister; modal does not exist in collection with ID of: "${i.id || i}".`));
719
712
  }
720
713
  open(i, s, n) {
721
- return se.call(this, i, s, n);
714
+ return re.call(this, i, s, n);
722
715
  }
723
716
  close(i, s, n) {
724
- return ne.call(this, i, s, n);
717
+ return oe.call(this, i, s, n);
725
718
  }
726
719
  replace(i, s, n) {
727
- return Be.call(this, i, s, n);
720
+ return Fe.call(this, i, s, n);
728
721
  }
729
722
  async closeAll(i = !1, s, n = !0) {
730
- const r = await qt.call(this, i, s);
731
- return n && Ft.call(this), r;
723
+ const r = await Gt.call(this, i, s);
724
+ return n && Vt.call(this), r;
732
725
  }
733
726
  }
734
- lt = new WeakMap(), ct = new WeakMap();
735
- const Ai = {
727
+ ct = new WeakMap(), ut = new WeakMap();
728
+ const Ti = {
736
729
  autoMount: !1,
737
730
  // Selectors
738
731
  selectorPopover: ".popover",
732
+ selectorTooltip: ".popover_tooltip",
739
733
  selectorArrow: ".popover__arrow",
740
734
  // State classes
741
735
  stateActive: "is-active",
@@ -745,7 +739,7 @@ const Ai = {
745
739
  placement: "bottom",
746
740
  hoverToggleDelay: 0
747
741
  };
748
- function je(t, e) {
742
+ function Ne(t, e) {
749
743
  const i = getComputedStyle(t), s = {
750
744
  placement: e.placement,
751
745
  event: e.eventType,
@@ -757,12 +751,12 @@ function je(t, e) {
757
751
  "toggle-delay": e.hoverToggleDelay
758
752
  };
759
753
  for (const n in s) {
760
- const r = Bt(), a = i.getPropertyValue(`--${r}popover-${n}`).trim();
754
+ const r = Ft(), a = i.getPropertyValue(`--${r}popover-${n}`).trim();
761
755
  a && (s[n] = a);
762
756
  }
763
757
  return s;
764
758
  }
765
- function zt(t) {
759
+ function Xt(t) {
766
760
  let e;
767
761
  const i = typeof t == "string" ? t.trim().split(" ") : [t];
768
762
  switch (i.forEach(function(s, n) {
@@ -801,7 +795,7 @@ function zt(t) {
801
795
  }
802
796
  return e;
803
797
  }
804
- function Fe(t) {
798
+ function Ve(t) {
805
799
  return [{
806
800
  name: "offset",
807
801
  options: {
@@ -810,92 +804,103 @@ function Fe(t) {
810
804
  }, {
811
805
  name: "preventOverflow",
812
806
  options: {
813
- padding: zt(t["overflow-padding"])
807
+ padding: Xt(t["overflow-padding"])
814
808
  }
815
809
  }, {
816
810
  name: "flip",
817
811
  options: {
818
- padding: zt(t["flip-padding"])
812
+ padding: Xt(t["flip-padding"])
819
813
  }
820
814
  }, {
821
815
  name: "arrow",
822
816
  options: {
823
817
  element: t["arrow-element"],
824
- padding: zt(t["arrow-padding"])
818
+ padding: Xt(t["arrow-padding"])
825
819
  }
826
820
  }];
827
821
  }
828
- function Ne(t) {
822
+ function We(t) {
829
823
  const e = typeof t == "string" ? this.get(t) : this.get(t.id);
830
824
  if (e)
831
825
  return e;
832
826
  throw new Error(`Popover not found in collection with id of "${t}".`);
833
827
  }
834
- function Si(t) {
828
+ function Pi(t) {
835
829
  return typeof t == "string" ? t : typeof t.hasAttribute == "function" ? t.closest(this.settings.selectorPopover) ? (t = t.closest(this.settings.selectorPopover), t.id) : t.hasAttribute("aria-controls") ? t.getAttribute("aria-controls") : t.hasAttribute("aria-describedby") ? t.getAttribute("aria-describedby") : !1 : !1;
836
830
  }
837
- function Ti(t) {
838
- const e = Si.call(this, t);
831
+ function Di(t) {
832
+ const e = Pi.call(this, t);
839
833
  if (e) {
840
834
  const i = document.querySelector(`#${e}`), s = document.querySelector(`[aria-controls="${e}"]`) || document.querySelector(`[aria-describedby="${e}"]`);
841
- return !s && !i ? { error: new Error(`No popover elements found using the ID: "${e}".`) } : s ? i ? { popover: i, trigger: s } : { error: new Error("No popover associated with the provided popover trigger.") } : { error: new Error("No popover trigger associated with the provided popover.") };
835
+ return !s && !i ? { error: new Error(`No popover elements found using the ID: "${e}".`) } : s ? i ? { popover: i, trigger: s } : { error: new Error(`No popover associated with the provided popover trigger: "${e}".`) } : { error: new Error(`No popover trigger associated with the provided popover: "${e}".`) };
842
836
  } else
843
837
  return { error: new Error("Could not resolve the popover ID.") };
844
838
  }
845
- async function re(t) {
846
- const e = t ? Ne.call(this, t) : await Ve.call(this);
847
- return e && e.state === "opened" && (e.el.classList.remove(this.settings.stateActive), e.trigger.hasAttribute("aria-controls") && e.trigger.setAttribute("aria-expanded", "false"), e.popper.setOptions({
839
+ async function ae(t) {
840
+ const e = t ? We.call(this, t) : await He.call(this);
841
+ 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.popper.setOptions({
848
842
  placement: e.config.placement,
849
843
  modifiers: [
850
844
  { name: "eventListeners", enabled: !1 },
851
- ...Fe(e.config)
845
+ ...Ve(e.config)
852
846
  ]
853
847
  }), e.state = "closed", e.trigger === this.trigger && (this.trigger = null)), e;
854
848
  }
855
- async function Ve() {
849
+ async function He() {
856
850
  const t = [];
857
851
  return await Promise.all(this.collection.map(async (e) => {
858
- e.state === "opened" && t.push(await re.call(this, e));
852
+ e.state === "opened" && t.push(await ae.call(this, e));
859
853
  })), t;
860
854
  }
861
- function We(t) {
855
+ function _e(t) {
862
856
  t.state == "opened" && setTimeout(() => {
863
- const e = t.el.closest(":hover") === t.el || t.trigger.closest(":hover") === t.trigger, i = document.activeElement.closest(
857
+ const e = t.el.matches(":hover") === t.el || t.trigger.matches(":hover") === t.trigger;
858
+ let i = document.activeElement.closest(
864
859
  `#${t.id}, [aria-controls="${t.id}"], [aria-describedby="${t.id}"]`
865
860
  );
866
- return !e && !i && t.close(), t;
861
+ return i = i ? i.matches(":focus-visible") : !1, !e && !i && t.close(), t;
867
862
  }, 1);
868
863
  }
869
- function Pi(t) {
870
- t.state === "opened" ? t.close() : (this.trigger = t.trigger, t.open(), He.call(this, t));
864
+ function Mi(t) {
865
+ const e = t.trigger.getAttribute("aria-describedby");
866
+ if (e) {
867
+ const i = this.get(e);
868
+ i.isTooltip && (i.toggleDelayId && clearTimeout(i.toggleDelayId), i.close());
869
+ }
870
+ t.state === "opened" ? t.close() : (this.trigger = t.trigger, t.open(), ze.call(this, t));
871
871
  }
872
- function Di(t) {
872
+ function Ii(t, e) {
873
+ if (e.type == "focus" && !t.trigger.matches(":focus-visible"))
874
+ return;
875
+ const i = t.trigger.getAttribute("aria-expanded");
876
+ if (i && i == "true")
877
+ return;
873
878
  t.toggleDelayId && clearTimeout(t.toggleDelayId);
874
- const e = this.activeTooltip ? 0 : t.config["toggle-delay"];
879
+ const s = this.activeTooltip ? 0 : t.config["toggle-delay"];
875
880
  this.activeTooltip && this.activeTooltip.close(), t.toggleDelayId = setTimeout(() => {
876
881
  t.id && t.open();
877
- }, e);
882
+ }, s);
878
883
  }
879
- function Ii(t) {
884
+ function Ri(t) {
880
885
  t.toggleDelayId && clearTimeout(t.toggleDelayId), t.toggleDelayId = setTimeout(() => {
881
- We.call(this, t);
886
+ _e.call(this, t);
882
887
  }, t.config["toggle-delay"]);
883
888
  }
884
- function Mi(t) {
889
+ function Bi(t) {
885
890
  switch (t.key) {
886
891
  case "Escape":
887
- this.trigger && this.trigger.focus(), Ve.call(this);
892
+ this.trigger && this.trigger.focus(), He.call(this);
888
893
  return;
889
894
  case "Tab":
890
895
  this.collection.forEach((e) => {
891
- We.call(this, e);
896
+ _e.call(this, e);
892
897
  });
893
898
  return;
894
899
  default:
895
900
  return;
896
901
  }
897
902
  }
898
- function He(t) {
903
+ function ze(t) {
899
904
  const e = this;
900
905
  document.addEventListener("click", function i(s) {
901
906
  s.target.closest(
@@ -903,15 +908,15 @@ function He(t) {
903
908
  ) ? 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));
904
909
  });
905
910
  }
906
- var P = "top", F = "bottom", N = "right", D = "left", oe = "auto", Lt = [P, F, N, D], ut = "start", xt = "end", Ri = "clippingParents", _e = "viewport", mt = "popper", Bi = "reference", $e = /* @__PURE__ */ Lt.reduce(function(t, e) {
907
- return t.concat([e + "-" + ut, e + "-" + xt]);
908
- }, []), ze = /* @__PURE__ */ [].concat(Lt, [oe]).reduce(function(t, e) {
909
- return t.concat([e, e + "-" + ut, e + "-" + xt]);
910
- }, []), ji = "beforeRead", Fi = "read", Ni = "afterRead", Vi = "beforeMain", Wi = "main", Hi = "afterMain", _i = "beforeWrite", zi = "write", Ki = "afterWrite", Xi = [ji, Fi, Ni, Vi, Wi, Hi, _i, zi, Ki];
911
- function z(t) {
911
+ var T = "top", N = "bottom", V = "right", P = "left", le = "auto", kt = [T, N, V, P], dt = "start", Ot = "end", ji = "clippingParents", Ke = "viewport", wt = "popper", Fi = "reference", Ce = /* @__PURE__ */ kt.reduce(function(t, e) {
912
+ return t.concat([e + "-" + dt, e + "-" + Ot]);
913
+ }, []), Xe = /* @__PURE__ */ [].concat(kt, [le]).reduce(function(t, e) {
914
+ return t.concat([e, e + "-" + dt, e + "-" + Ot]);
915
+ }, []), Ni = "beforeRead", Vi = "read", Wi = "afterRead", Hi = "beforeMain", _i = "main", zi = "afterMain", Ki = "beforeWrite", Xi = "write", Yi = "afterWrite", qi = [Ni, Vi, Wi, Hi, _i, zi, Ki, Xi, Yi];
916
+ function K(t) {
912
917
  return t ? (t.nodeName || "").toLowerCase() : null;
913
918
  }
914
- function R(t) {
919
+ function B(t) {
915
920
  if (t == null)
916
921
  return window;
917
922
  if (t.toString() !== "[object Window]") {
@@ -920,31 +925,31 @@ function R(t) {
920
925
  }
921
926
  return t;
922
927
  }
923
- function it(t) {
924
- var e = R(t).Element;
928
+ function st(t) {
929
+ var e = B(t).Element;
925
930
  return t instanceof e || t instanceof Element;
926
931
  }
927
- function j(t) {
928
- var e = R(t).HTMLElement;
932
+ function F(t) {
933
+ var e = B(t).HTMLElement;
929
934
  return t instanceof e || t instanceof HTMLElement;
930
935
  }
931
- function ae(t) {
936
+ function ce(t) {
932
937
  if (typeof ShadowRoot > "u")
933
938
  return !1;
934
- var e = R(t).ShadowRoot;
939
+ var e = B(t).ShadowRoot;
935
940
  return t instanceof e || t instanceof ShadowRoot;
936
941
  }
937
- function Yi(t) {
942
+ function Ui(t) {
938
943
  var e = t.state;
939
944
  Object.keys(e.elements).forEach(function(i) {
940
945
  var s = e.styles[i] || {}, n = e.attributes[i] || {}, r = e.elements[i];
941
- !j(r) || !z(r) || (Object.assign(r.style, s), Object.keys(n).forEach(function(a) {
946
+ !F(r) || !K(r) || (Object.assign(r.style, s), Object.keys(n).forEach(function(a) {
942
947
  var l = n[a];
943
948
  l === !1 ? r.removeAttribute(a) : r.setAttribute(a, l === !0 ? "" : l);
944
949
  }));
945
950
  });
946
951
  }
947
- function qi(t) {
952
+ function Gi(t) {
948
953
  var e = t.state, i = {
949
954
  popper: {
950
955
  position: e.options.strategy,
@@ -959,54 +964,54 @@ function qi(t) {
959
964
  };
960
965
  return Object.assign(e.elements.popper.style, i.popper), e.styles = i, e.elements.arrow && Object.assign(e.elements.arrow.style, i.arrow), function() {
961
966
  Object.keys(e.elements).forEach(function(s) {
962
- var n = e.elements[s], r = e.attributes[s] || {}, a = Object.keys(e.styles.hasOwnProperty(s) ? e.styles[s] : i[s]), l = a.reduce(function(o, d) {
963
- return o[d] = "", o;
967
+ var n = e.elements[s], r = e.attributes[s] || {}, a = Object.keys(e.styles.hasOwnProperty(s) ? e.styles[s] : i[s]), l = a.reduce(function(o, u) {
968
+ return o[u] = "", o;
964
969
  }, {});
965
- !j(n) || !z(n) || (Object.assign(n.style, l), Object.keys(r).forEach(function(o) {
970
+ !F(n) || !K(n) || (Object.assign(n.style, l), Object.keys(r).forEach(function(o) {
966
971
  n.removeAttribute(o);
967
972
  }));
968
973
  });
969
974
  };
970
975
  }
971
- const Ui = {
976
+ const Ji = {
972
977
  name: "applyStyles",
973
978
  enabled: !0,
974
979
  phase: "write",
975
- fn: Yi,
976
- effect: qi,
980
+ fn: Ui,
981
+ effect: Gi,
977
982
  requires: ["computeStyles"]
978
983
  };
979
- function _(t) {
984
+ function z(t) {
980
985
  return t.split("-")[0];
981
986
  }
982
- var et = Math.max, Mt = Math.min, ft = Math.round;
983
- function Ut() {
987
+ var it = Math.max, Bt = Math.min, ht = Math.round;
988
+ function Jt() {
984
989
  var t = navigator.userAgentData;
985
990
  return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
986
991
  return e.brand + "/" + e.version;
987
992
  }).join(" ") : navigator.userAgent;
988
993
  }
989
- function Ke() {
990
- return !/^((?!chrome|android).)*safari/i.test(Ut());
994
+ function Ye() {
995
+ return !/^((?!chrome|android).)*safari/i.test(Jt());
991
996
  }
992
- function ht(t, e, i) {
997
+ function pt(t, e, i) {
993
998
  e === void 0 && (e = !1), i === void 0 && (i = !1);
994
999
  var s = t.getBoundingClientRect(), n = 1, r = 1;
995
- e && j(t) && (n = t.offsetWidth > 0 && ft(s.width) / t.offsetWidth || 1, r = t.offsetHeight > 0 && ft(s.height) / t.offsetHeight || 1);
996
- var a = it(t) ? R(t) : window, l = a.visualViewport, o = !Ke() && i, d = (s.left + (o && l ? l.offsetLeft : 0)) / n, c = (s.top + (o && l ? l.offsetTop : 0)) / r, v = s.width / n, w = s.height / r;
1000
+ e && F(t) && (n = t.offsetWidth > 0 && ht(s.width) / t.offsetWidth || 1, r = t.offsetHeight > 0 && ht(s.height) / t.offsetHeight || 1);
1001
+ var a = st(t) ? B(t) : window, l = a.visualViewport, o = !Ye() && i, u = (s.left + (o && l ? l.offsetLeft : 0)) / n, c = (s.top + (o && l ? l.offsetTop : 0)) / r, g = s.width / n, b = s.height / r;
997
1002
  return {
998
- width: v,
999
- height: w,
1003
+ width: g,
1004
+ height: b,
1000
1005
  top: c,
1001
- right: d + v,
1002
- bottom: c + w,
1003
- left: d,
1004
- x: d,
1006
+ right: u + g,
1007
+ bottom: c + b,
1008
+ left: u,
1009
+ x: u,
1005
1010
  y: c
1006
1011
  };
1007
1012
  }
1008
- function le(t) {
1009
- var e = ht(t), i = t.offsetWidth, s = t.offsetHeight;
1013
+ function ue(t) {
1014
+ var e = pt(t), i = t.offsetWidth, s = t.offsetHeight;
1010
1015
  return Math.abs(e.width - i) <= 1 && (i = e.width), Math.abs(e.height - s) <= 1 && (s = e.height), {
1011
1016
  x: t.offsetLeft,
1012
1017
  y: t.offsetTop,
@@ -1014,11 +1019,11 @@ function le(t) {
1014
1019
  height: s
1015
1020
  };
1016
1021
  }
1017
- function Xe(t, e) {
1022
+ function qe(t, e) {
1018
1023
  var i = e.getRootNode && e.getRootNode();
1019
1024
  if (t.contains(e))
1020
1025
  return !0;
1021
- if (i && ae(i)) {
1026
+ if (i && ce(i)) {
1022
1027
  var s = e;
1023
1028
  do {
1024
1029
  if (s && t.isSameNode(s))
@@ -1028,66 +1033,66 @@ function Xe(t, e) {
1028
1033
  }
1029
1034
  return !1;
1030
1035
  }
1031
- function K(t) {
1032
- return R(t).getComputedStyle(t);
1036
+ function X(t) {
1037
+ return B(t).getComputedStyle(t);
1033
1038
  }
1034
- function Gi(t) {
1035
- return ["table", "td", "th"].indexOf(z(t)) >= 0;
1039
+ function Qi(t) {
1040
+ return ["table", "td", "th"].indexOf(K(t)) >= 0;
1036
1041
  }
1037
- function Y(t) {
1038
- return ((it(t) ? t.ownerDocument : (
1042
+ function q(t) {
1043
+ return ((st(t) ? t.ownerDocument : (
1039
1044
  // $FlowFixMe[prop-missing]
1040
1045
  t.document
1041
1046
  )) || window.document).documentElement;
1042
1047
  }
1043
- function Nt(t) {
1044
- return z(t) === "html" ? t : (
1048
+ function Wt(t) {
1049
+ return K(t) === "html" ? t : (
1045
1050
  // this is a quicker (but less type safe) way to save quite some bytes from the bundle
1046
1051
  // $FlowFixMe[incompatible-return]
1047
1052
  // $FlowFixMe[prop-missing]
1048
1053
  t.assignedSlot || // step into the shadow DOM of the parent of a slotted node
1049
1054
  t.parentNode || // DOM Element detected
1050
- (ae(t) ? t.host : null) || // ShadowRoot detected
1055
+ (ce(t) ? t.host : null) || // ShadowRoot detected
1051
1056
  // $FlowFixMe[incompatible-call]: HTMLElement is a Node
1052
- Y(t)
1057
+ q(t)
1053
1058
  );
1054
1059
  }
1055
- function Le(t) {
1056
- return !j(t) || // https://github.com/popperjs/popper-core/issues/837
1057
- K(t).position === "fixed" ? null : t.offsetParent;
1060
+ function ke(t) {
1061
+ return !F(t) || // https://github.com/popperjs/popper-core/issues/837
1062
+ X(t).position === "fixed" ? null : t.offsetParent;
1058
1063
  }
1059
- function Ji(t) {
1060
- var e = /firefox/i.test(Ut()), i = /Trident/i.test(Ut());
1061
- if (i && j(t)) {
1062
- var s = K(t);
1064
+ function Zi(t) {
1065
+ var e = /firefox/i.test(Jt()), i = /Trident/i.test(Jt());
1066
+ if (i && F(t)) {
1067
+ var s = X(t);
1063
1068
  if (s.position === "fixed")
1064
1069
  return null;
1065
1070
  }
1066
- var n = Nt(t);
1067
- for (ae(n) && (n = n.host); j(n) && ["html", "body"].indexOf(z(n)) < 0; ) {
1068
- var r = K(n);
1071
+ var n = Wt(t);
1072
+ for (ce(n) && (n = n.host); F(n) && ["html", "body"].indexOf(K(n)) < 0; ) {
1073
+ var r = X(n);
1069
1074
  if (r.transform !== "none" || r.perspective !== "none" || r.contain === "paint" || ["transform", "perspective"].indexOf(r.willChange) !== -1 || e && r.willChange === "filter" || e && r.filter && r.filter !== "none")
1070
1075
  return n;
1071
1076
  n = n.parentNode;
1072
1077
  }
1073
1078
  return null;
1074
1079
  }
1075
- function Ct(t) {
1076
- for (var e = R(t), i = Le(t); i && Gi(i) && K(i).position === "static"; )
1077
- i = Le(i);
1078
- return i && (z(i) === "html" || z(i) === "body" && K(i).position === "static") ? e : i || Ji(t) || e;
1080
+ function At(t) {
1081
+ for (var e = B(t), i = ke(t); i && Qi(i) && X(i).position === "static"; )
1082
+ i = ke(i);
1083
+ return i && (K(i) === "html" || K(i) === "body" && X(i).position === "static") ? e : i || Zi(t) || e;
1079
1084
  }
1080
- function ce(t) {
1085
+ function fe(t) {
1081
1086
  return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
1082
1087
  }
1083
- function bt(t, e, i) {
1084
- return et(t, Mt(e, i));
1088
+ function yt(t, e, i) {
1089
+ return it(t, Bt(e, i));
1085
1090
  }
1086
- function Qi(t, e, i) {
1087
- var s = bt(t, e, i);
1091
+ function ts(t, e, i) {
1092
+ var s = yt(t, e, i);
1088
1093
  return s > i ? i : s;
1089
1094
  }
1090
- function Ye() {
1095
+ function Ue() {
1091
1096
  return {
1092
1097
  top: 0,
1093
1098
  right: 0,
@@ -1095,114 +1100,114 @@ function Ye() {
1095
1100
  left: 0
1096
1101
  };
1097
1102
  }
1098
- function qe(t) {
1099
- return Object.assign({}, Ye(), t);
1103
+ function Ge(t) {
1104
+ return Object.assign({}, Ue(), t);
1100
1105
  }
1101
- function Ue(t, e) {
1106
+ function Je(t, e) {
1102
1107
  return e.reduce(function(i, s) {
1103
1108
  return i[s] = t, i;
1104
1109
  }, {});
1105
1110
  }
1106
- var Zi = function(e, i) {
1111
+ var es = function(e, i) {
1107
1112
  return e = typeof e == "function" ? e(Object.assign({}, i.rects, {
1108
1113
  placement: i.placement
1109
- })) : e, qe(typeof e != "number" ? e : Ue(e, Lt));
1114
+ })) : e, Ge(typeof e != "number" ? e : Je(e, kt));
1110
1115
  };
1111
- function ts(t) {
1112
- var e, i = t.state, s = t.name, n = t.options, r = i.elements.arrow, a = i.modifiersData.popperOffsets, l = _(i.placement), o = ce(l), d = [D, N].indexOf(l) >= 0, c = d ? "height" : "width";
1116
+ function is(t) {
1117
+ var e, i = t.state, s = t.name, n = t.options, r = i.elements.arrow, a = i.modifiersData.popperOffsets, l = z(i.placement), o = fe(l), u = [P, V].indexOf(l) >= 0, c = u ? "height" : "width";
1113
1118
  if (!(!r || !a)) {
1114
- var v = Zi(n.padding, i), w = le(r), u = o === "y" ? P : D, x = o === "y" ? F : N, p = i.rects.reference[c] + i.rects.reference[o] - a[o] - i.rects.popper[c], h = a[o] - i.rects.reference[o], y = Ct(r), $ = y ? o === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, L = p / 2 - h / 2, f = v[u], m = $ - w[c] - v[x], b = $ / 2 - w[c] / 2 + L, O = bt(f, b, m), A = o;
1115
- i.modifiersData[s] = (e = {}, e[A] = O, e.centerOffset = O - b, e);
1119
+ var g = es(n.padding, i), b = ue(r), f = o === "y" ? T : P, y = o === "y" ? N : V, p = i.rects.reference[c] + i.rects.reference[o] - a[o] - i.rects.popper[c], h = a[o] - i.rects.reference[o], w = At(r), O = w ? o === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, $ = p / 2 - h / 2, d = g[f], v = O - b[c] - g[y], m = O / 2 - b[c] / 2 + $, E = yt(d, m, v), k = o;
1120
+ i.modifiersData[s] = (e = {}, e[k] = E, e.centerOffset = E - m, e);
1116
1121
  }
1117
1122
  }
1118
- function es(t) {
1123
+ function ss(t) {
1119
1124
  var e = t.state, i = t.options, s = i.element, n = s === void 0 ? "[data-popper-arrow]" : s;
1120
- n != null && (typeof n == "string" && (n = e.elements.popper.querySelector(n), !n) || Xe(e.elements.popper, n) && (e.elements.arrow = n));
1125
+ n != null && (typeof n == "string" && (n = e.elements.popper.querySelector(n), !n) || qe(e.elements.popper, n) && (e.elements.arrow = n));
1121
1126
  }
1122
- const is = {
1127
+ const ns = {
1123
1128
  name: "arrow",
1124
1129
  enabled: !0,
1125
1130
  phase: "main",
1126
- fn: ts,
1127
- effect: es,
1131
+ fn: is,
1132
+ effect: ss,
1128
1133
  requires: ["popperOffsets"],
1129
1134
  requiresIfExists: ["preventOverflow"]
1130
1135
  };
1131
- function pt(t) {
1136
+ function gt(t) {
1132
1137
  return t.split("-")[1];
1133
1138
  }
1134
- var ss = {
1139
+ var rs = {
1135
1140
  top: "auto",
1136
1141
  right: "auto",
1137
1142
  bottom: "auto",
1138
1143
  left: "auto"
1139
1144
  };
1140
- function ns(t, e) {
1145
+ function os(t, e) {
1141
1146
  var i = t.x, s = t.y, n = e.devicePixelRatio || 1;
1142
1147
  return {
1143
- x: ft(i * n) / n || 0,
1144
- y: ft(s * n) / n || 0
1148
+ x: ht(i * n) / n || 0,
1149
+ y: ht(s * n) / n || 0
1145
1150
  };
1146
1151
  }
1147
- function Ce(t) {
1148
- var e, i = t.popper, s = t.popperRect, n = t.placement, r = t.variation, a = t.offsets, l = t.position, o = t.gpuAcceleration, d = t.adaptive, c = t.roundOffsets, v = t.isFixed, w = a.x, u = w === void 0 ? 0 : w, x = a.y, p = x === void 0 ? 0 : x, h = typeof c == "function" ? c({
1149
- x: u,
1152
+ function Ae(t) {
1153
+ var e, i = t.popper, s = t.popperRect, n = t.placement, r = t.variation, a = t.offsets, l = t.position, o = t.gpuAcceleration, u = t.adaptive, c = t.roundOffsets, g = t.isFixed, b = a.x, f = b === void 0 ? 0 : b, y = a.y, p = y === void 0 ? 0 : y, h = typeof c == "function" ? c({
1154
+ x: f,
1150
1155
  y: p
1151
1156
  }) : {
1152
- x: u,
1157
+ x: f,
1153
1158
  y: p
1154
1159
  };
1155
- u = h.x, p = h.y;
1156
- var y = a.hasOwnProperty("x"), $ = a.hasOwnProperty("y"), L = D, f = P, m = window;
1157
- if (d) {
1158
- var b = Ct(i), O = "clientHeight", A = "clientWidth";
1159
- if (b === R(i) && (b = Y(i), K(b).position !== "static" && l === "absolute" && (O = "scrollHeight", A = "scrollWidth")), b = b, n === P || (n === D || n === N) && r === xt) {
1160
- f = F;
1161
- var k = v && b === m && m.visualViewport ? m.visualViewport.height : (
1160
+ f = h.x, p = h.y;
1161
+ var w = a.hasOwnProperty("x"), O = a.hasOwnProperty("y"), $ = P, d = T, v = window;
1162
+ if (u) {
1163
+ var m = At(i), E = "clientHeight", k = "clientWidth";
1164
+ if (m === B(i) && (m = q(i), X(m).position !== "static" && l === "absolute" && (E = "scrollHeight", k = "scrollWidth")), m = m, n === T || (n === P || n === V) && r === Ot) {
1165
+ d = N;
1166
+ var C = g && m === v && v.visualViewport ? v.visualViewport.height : (
1162
1167
  // $FlowFixMe[prop-missing]
1163
- b[O]
1168
+ m[E]
1164
1169
  );
1165
- p -= k - s.height, p *= o ? 1 : -1;
1170
+ p -= C - s.height, p *= o ? 1 : -1;
1166
1171
  }
1167
- if (n === D || (n === P || n === F) && r === xt) {
1168
- L = N;
1169
- var C = v && b === m && m.visualViewport ? m.visualViewport.width : (
1172
+ if (n === P || (n === T || n === N) && r === Ot) {
1173
+ $ = V;
1174
+ var L = g && m === v && v.visualViewport ? v.visualViewport.width : (
1170
1175
  // $FlowFixMe[prop-missing]
1171
- b[A]
1176
+ m[k]
1172
1177
  );
1173
- u -= C - s.width, u *= o ? 1 : -1;
1178
+ f -= L - s.width, f *= o ? 1 : -1;
1174
1179
  }
1175
1180
  }
1176
- var S = Object.assign({
1181
+ var A = Object.assign({
1177
1182
  position: l
1178
- }, d && ss), V = c === !0 ? ns({
1179
- x: u,
1183
+ }, u && rs), W = c === !0 ? os({
1184
+ x: f,
1180
1185
  y: p
1181
- }, R(i)) : {
1182
- x: u,
1186
+ }, B(i)) : {
1187
+ x: f,
1183
1188
  y: p
1184
1189
  };
1185
- if (u = V.x, p = V.y, o) {
1186
- var T;
1187
- return Object.assign({}, S, (T = {}, T[f] = $ ? "0" : "", T[L] = y ? "0" : "", T.transform = (m.devicePixelRatio || 1) <= 1 ? "translate(" + u + "px, " + p + "px)" : "translate3d(" + u + "px, " + p + "px, 0)", T));
1190
+ if (f = W.x, p = W.y, o) {
1191
+ var S;
1192
+ return Object.assign({}, A, (S = {}, S[d] = O ? "0" : "", S[$] = w ? "0" : "", S.transform = (v.devicePixelRatio || 1) <= 1 ? "translate(" + f + "px, " + p + "px)" : "translate3d(" + f + "px, " + p + "px, 0)", S));
1188
1193
  }
1189
- return Object.assign({}, S, (e = {}, e[f] = $ ? p + "px" : "", e[L] = y ? u + "px" : "", e.transform = "", e));
1194
+ return Object.assign({}, A, (e = {}, e[d] = O ? p + "px" : "", e[$] = w ? f + "px" : "", e.transform = "", e));
1190
1195
  }
1191
- function rs(t) {
1192
- var e = t.state, i = t.options, s = i.gpuAcceleration, n = s === void 0 ? !0 : s, r = i.adaptive, a = r === void 0 ? !0 : r, l = i.roundOffsets, o = l === void 0 ? !0 : l, d = {
1193
- placement: _(e.placement),
1194
- variation: pt(e.placement),
1196
+ function as(t) {
1197
+ var e = t.state, i = t.options, s = i.gpuAcceleration, n = s === void 0 ? !0 : s, r = i.adaptive, a = r === void 0 ? !0 : r, l = i.roundOffsets, o = l === void 0 ? !0 : l, u = {
1198
+ placement: z(e.placement),
1199
+ variation: gt(e.placement),
1195
1200
  popper: e.elements.popper,
1196
1201
  popperRect: e.rects.popper,
1197
1202
  gpuAcceleration: n,
1198
1203
  isFixed: e.options.strategy === "fixed"
1199
1204
  };
1200
- e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, Ce(Object.assign({}, d, {
1205
+ e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, Ae(Object.assign({}, u, {
1201
1206
  offsets: e.modifiersData.popperOffsets,
1202
1207
  position: e.options.strategy,
1203
1208
  adaptive: a,
1204
1209
  roundOffsets: o
1205
- })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, Ce(Object.assign({}, d, {
1210
+ })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, Ae(Object.assign({}, u, {
1206
1211
  offsets: e.modifiersData.arrow,
1207
1212
  position: "absolute",
1208
1213
  adaptive: !1,
@@ -1211,105 +1216,105 @@ function rs(t) {
1211
1216
  "data-popper-placement": e.placement
1212
1217
  });
1213
1218
  }
1214
- const os = {
1219
+ const ls = {
1215
1220
  name: "computeStyles",
1216
1221
  enabled: !0,
1217
1222
  phase: "beforeWrite",
1218
- fn: rs,
1223
+ fn: as,
1219
1224
  data: {}
1220
1225
  };
1221
- var Dt = {
1226
+ var It = {
1222
1227
  passive: !0
1223
1228
  };
1224
- function as(t) {
1225
- var e = t.state, i = t.instance, s = t.options, n = s.scroll, r = n === void 0 ? !0 : n, a = s.resize, l = a === void 0 ? !0 : a, o = R(e.elements.popper), d = [].concat(e.scrollParents.reference, e.scrollParents.popper);
1226
- return r && d.forEach(function(c) {
1227
- c.addEventListener("scroll", i.update, Dt);
1228
- }), l && o.addEventListener("resize", i.update, Dt), function() {
1229
- r && d.forEach(function(c) {
1230
- c.removeEventListener("scroll", i.update, Dt);
1231
- }), l && o.removeEventListener("resize", i.update, Dt);
1229
+ function cs(t) {
1230
+ var e = t.state, i = t.instance, s = t.options, n = s.scroll, r = n === void 0 ? !0 : n, a = s.resize, l = a === void 0 ? !0 : a, o = B(e.elements.popper), u = [].concat(e.scrollParents.reference, e.scrollParents.popper);
1231
+ return r && u.forEach(function(c) {
1232
+ c.addEventListener("scroll", i.update, It);
1233
+ }), l && o.addEventListener("resize", i.update, It), function() {
1234
+ r && u.forEach(function(c) {
1235
+ c.removeEventListener("scroll", i.update, It);
1236
+ }), l && o.removeEventListener("resize", i.update, It);
1232
1237
  };
1233
1238
  }
1234
- const ls = {
1239
+ const us = {
1235
1240
  name: "eventListeners",
1236
1241
  enabled: !0,
1237
1242
  phase: "write",
1238
1243
  fn: function() {
1239
1244
  },
1240
- effect: as,
1245
+ effect: cs,
1241
1246
  data: {}
1242
1247
  };
1243
- var cs = {
1248
+ var fs = {
1244
1249
  left: "right",
1245
1250
  right: "left",
1246
1251
  bottom: "top",
1247
1252
  top: "bottom"
1248
1253
  };
1249
- function It(t) {
1254
+ function Rt(t) {
1250
1255
  return t.replace(/left|right|bottom|top/g, function(e) {
1251
- return cs[e];
1256
+ return fs[e];
1252
1257
  });
1253
1258
  }
1254
1259
  var ds = {
1255
1260
  start: "end",
1256
1261
  end: "start"
1257
1262
  };
1258
- function ke(t) {
1263
+ function Se(t) {
1259
1264
  return t.replace(/start|end/g, function(e) {
1260
1265
  return ds[e];
1261
1266
  });
1262
1267
  }
1263
1268
  function de(t) {
1264
- var e = R(t), i = e.pageXOffset, s = e.pageYOffset;
1269
+ var e = B(t), i = e.pageXOffset, s = e.pageYOffset;
1265
1270
  return {
1266
1271
  scrollLeft: i,
1267
1272
  scrollTop: s
1268
1273
  };
1269
1274
  }
1270
- function ue(t) {
1271
- return ht(Y(t)).left + de(t).scrollLeft;
1275
+ function he(t) {
1276
+ return pt(q(t)).left + de(t).scrollLeft;
1272
1277
  }
1273
- function us(t, e) {
1274
- var i = R(t), s = Y(t), n = i.visualViewport, r = s.clientWidth, a = s.clientHeight, l = 0, o = 0;
1278
+ function hs(t, e) {
1279
+ var i = B(t), s = q(t), n = i.visualViewport, r = s.clientWidth, a = s.clientHeight, l = 0, o = 0;
1275
1280
  if (n) {
1276
1281
  r = n.width, a = n.height;
1277
- var d = Ke();
1278
- (d || !d && e === "fixed") && (l = n.offsetLeft, o = n.offsetTop);
1282
+ var u = Ye();
1283
+ (u || !u && e === "fixed") && (l = n.offsetLeft, o = n.offsetTop);
1279
1284
  }
1280
1285
  return {
1281
1286
  width: r,
1282
1287
  height: a,
1283
- x: l + ue(t),
1288
+ x: l + he(t),
1284
1289
  y: o
1285
1290
  };
1286
1291
  }
1287
- function fs(t) {
1288
- var e, i = Y(t), s = de(t), n = (e = t.ownerDocument) == null ? void 0 : e.body, r = et(i.scrollWidth, i.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), a = et(i.scrollHeight, i.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), l = -s.scrollLeft + ue(t), o = -s.scrollTop;
1289
- return K(n || i).direction === "rtl" && (l += et(i.clientWidth, n ? n.clientWidth : 0) - r), {
1292
+ function ps(t) {
1293
+ var e, i = q(t), s = de(t), n = (e = t.ownerDocument) == null ? void 0 : e.body, r = it(i.scrollWidth, i.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), a = it(i.scrollHeight, i.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), l = -s.scrollLeft + he(t), o = -s.scrollTop;
1294
+ return X(n || i).direction === "rtl" && (l += it(i.clientWidth, n ? n.clientWidth : 0) - r), {
1290
1295
  width: r,
1291
1296
  height: a,
1292
1297
  x: l,
1293
1298
  y: o
1294
1299
  };
1295
1300
  }
1296
- function fe(t) {
1297
- var e = K(t), i = e.overflow, s = e.overflowX, n = e.overflowY;
1301
+ function pe(t) {
1302
+ var e = X(t), i = e.overflow, s = e.overflowX, n = e.overflowY;
1298
1303
  return /auto|scroll|overlay|hidden/.test(i + n + s);
1299
1304
  }
1300
- function Ge(t) {
1301
- return ["html", "body", "#document"].indexOf(z(t)) >= 0 ? t.ownerDocument.body : j(t) && fe(t) ? t : Ge(Nt(t));
1305
+ function Qe(t) {
1306
+ return ["html", "body", "#document"].indexOf(K(t)) >= 0 ? t.ownerDocument.body : F(t) && pe(t) ? t : Qe(Wt(t));
1302
1307
  }
1303
- function wt(t, e) {
1308
+ function xt(t, e) {
1304
1309
  var i;
1305
1310
  e === void 0 && (e = []);
1306
- var s = Ge(t), n = s === ((i = t.ownerDocument) == null ? void 0 : i.body), r = R(s), a = n ? [r].concat(r.visualViewport || [], fe(s) ? s : []) : s, l = e.concat(a);
1311
+ var s = Qe(t), n = s === ((i = t.ownerDocument) == null ? void 0 : i.body), r = B(s), a = n ? [r].concat(r.visualViewport || [], pe(s) ? s : []) : s, l = e.concat(a);
1307
1312
  return n ? l : (
1308
1313
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
1309
- l.concat(wt(Nt(a)))
1314
+ l.concat(xt(Wt(a)))
1310
1315
  );
1311
1316
  }
1312
- function Gt(t) {
1317
+ function Qt(t) {
1313
1318
  return Object.assign({}, t, {
1314
1319
  left: t.x,
1315
1320
  top: t.y,
@@ -1317,48 +1322,48 @@ function Gt(t) {
1317
1322
  bottom: t.y + t.height
1318
1323
  });
1319
1324
  }
1320
- function hs(t, e) {
1321
- var i = ht(t, !1, e === "fixed");
1325
+ function gs(t, e) {
1326
+ var i = pt(t, !1, e === "fixed");
1322
1327
  return i.top = i.top + t.clientTop, i.left = i.left + t.clientLeft, i.bottom = i.top + t.clientHeight, i.right = i.left + t.clientWidth, i.width = t.clientWidth, i.height = t.clientHeight, i.x = i.left, i.y = i.top, i;
1323
1328
  }
1324
- function Ae(t, e, i) {
1325
- return e === _e ? Gt(us(t, i)) : it(e) ? hs(e, i) : Gt(fs(Y(t)));
1329
+ function Te(t, e, i) {
1330
+ return e === Ke ? Qt(hs(t, i)) : st(e) ? gs(e, i) : Qt(ps(q(t)));
1326
1331
  }
1327
- function ps(t) {
1328
- var e = wt(Nt(t)), i = ["absolute", "fixed"].indexOf(K(t).position) >= 0, s = i && j(t) ? Ct(t) : t;
1329
- return it(s) ? e.filter(function(n) {
1330
- return it(n) && Xe(n, s) && z(n) !== "body";
1332
+ function vs(t) {
1333
+ var e = xt(Wt(t)), i = ["absolute", "fixed"].indexOf(X(t).position) >= 0, s = i && F(t) ? At(t) : t;
1334
+ return st(s) ? e.filter(function(n) {
1335
+ return st(n) && qe(n, s) && K(n) !== "body";
1331
1336
  }) : [];
1332
1337
  }
1333
- function gs(t, e, i, s) {
1334
- var n = e === "clippingParents" ? ps(t) : [].concat(e), r = [].concat(n, [i]), a = r[0], l = r.reduce(function(o, d) {
1335
- var c = Ae(t, d, s);
1336
- return o.top = et(c.top, o.top), o.right = Mt(c.right, o.right), o.bottom = Mt(c.bottom, o.bottom), o.left = et(c.left, o.left), o;
1337
- }, Ae(t, a, s));
1338
+ function ms(t, e, i, s) {
1339
+ var n = e === "clippingParents" ? vs(t) : [].concat(e), r = [].concat(n, [i]), a = r[0], l = r.reduce(function(o, u) {
1340
+ var c = Te(t, u, s);
1341
+ return o.top = it(c.top, o.top), o.right = Bt(c.right, o.right), o.bottom = Bt(c.bottom, o.bottom), o.left = it(c.left, o.left), o;
1342
+ }, Te(t, a, s));
1338
1343
  return l.width = l.right - l.left, l.height = l.bottom - l.top, l.x = l.left, l.y = l.top, l;
1339
1344
  }
1340
- function Je(t) {
1341
- var e = t.reference, i = t.element, s = t.placement, n = s ? _(s) : null, r = s ? pt(s) : null, a = e.x + e.width / 2 - i.width / 2, l = e.y + e.height / 2 - i.height / 2, o;
1345
+ function Ze(t) {
1346
+ var e = t.reference, i = t.element, s = t.placement, n = s ? z(s) : null, r = s ? gt(s) : null, a = e.x + e.width / 2 - i.width / 2, l = e.y + e.height / 2 - i.height / 2, o;
1342
1347
  switch (n) {
1343
- case P:
1348
+ case T:
1344
1349
  o = {
1345
1350
  x: a,
1346
1351
  y: e.y - i.height
1347
1352
  };
1348
1353
  break;
1349
- case F:
1354
+ case N:
1350
1355
  o = {
1351
1356
  x: a,
1352
1357
  y: e.y + e.height
1353
1358
  };
1354
1359
  break;
1355
- case N:
1360
+ case V:
1356
1361
  o = {
1357
1362
  x: e.x + e.width,
1358
1363
  y: l
1359
1364
  };
1360
1365
  break;
1361
- case D:
1366
+ case P:
1362
1367
  o = {
1363
1368
  x: e.x - i.width,
1364
1369
  y: l
@@ -1370,127 +1375,127 @@ function Je(t) {
1370
1375
  y: e.y
1371
1376
  };
1372
1377
  }
1373
- var d = n ? ce(n) : null;
1374
- if (d != null) {
1375
- var c = d === "y" ? "height" : "width";
1378
+ var u = n ? fe(n) : null;
1379
+ if (u != null) {
1380
+ var c = u === "y" ? "height" : "width";
1376
1381
  switch (r) {
1377
- case ut:
1378
- o[d] = o[d] - (e[c] / 2 - i[c] / 2);
1382
+ case dt:
1383
+ o[u] = o[u] - (e[c] / 2 - i[c] / 2);
1379
1384
  break;
1380
- case xt:
1381
- o[d] = o[d] + (e[c] / 2 - i[c] / 2);
1385
+ case Ot:
1386
+ o[u] = o[u] + (e[c] / 2 - i[c] / 2);
1382
1387
  break;
1383
1388
  }
1384
1389
  }
1385
1390
  return o;
1386
1391
  }
1387
- function Et(t, e) {
1392
+ function $t(t, e) {
1388
1393
  e === void 0 && (e = {});
1389
- var i = e, s = i.placement, n = s === void 0 ? t.placement : s, r = i.strategy, a = r === void 0 ? t.strategy : r, l = i.boundary, o = l === void 0 ? Ri : l, d = i.rootBoundary, c = d === void 0 ? _e : d, v = i.elementContext, w = v === void 0 ? mt : v, u = i.altBoundary, x = u === void 0 ? !1 : u, p = i.padding, h = p === void 0 ? 0 : p, y = qe(typeof h != "number" ? h : Ue(h, Lt)), $ = w === mt ? Bi : mt, L = t.rects.popper, f = t.elements[x ? $ : w], m = gs(it(f) ? f : f.contextElement || Y(t.elements.popper), o, c, a), b = ht(t.elements.reference), O = Je({
1390
- reference: b,
1391
- element: L,
1394
+ var i = e, s = i.placement, n = s === void 0 ? t.placement : s, r = i.strategy, a = r === void 0 ? t.strategy : r, l = i.boundary, o = l === void 0 ? ji : l, u = i.rootBoundary, c = u === void 0 ? Ke : u, g = i.elementContext, b = g === void 0 ? wt : g, f = i.altBoundary, y = f === void 0 ? !1 : f, p = i.padding, h = p === void 0 ? 0 : p, w = Ge(typeof h != "number" ? h : Je(h, kt)), O = b === wt ? Fi : wt, $ = t.rects.popper, d = t.elements[y ? O : b], v = ms(st(d) ? d : d.contextElement || q(t.elements.popper), o, c, a), m = pt(t.elements.reference), E = Ze({
1395
+ reference: m,
1396
+ element: $,
1392
1397
  strategy: "absolute",
1393
1398
  placement: n
1394
- }), A = Gt(Object.assign({}, L, O)), k = w === mt ? A : b, C = {
1395
- top: m.top - k.top + y.top,
1396
- bottom: k.bottom - m.bottom + y.bottom,
1397
- left: m.left - k.left + y.left,
1398
- right: k.right - m.right + y.right
1399
- }, S = t.modifiersData.offset;
1400
- if (w === mt && S) {
1401
- var V = S[n];
1402
- Object.keys(C).forEach(function(T) {
1403
- var q = [N, F].indexOf(T) >= 0 ? 1 : -1, U = [P, F].indexOf(T) >= 0 ? "y" : "x";
1404
- C[T] += V[U] * q;
1399
+ }), k = Qt(Object.assign({}, $, E)), C = b === wt ? k : m, L = {
1400
+ top: v.top - C.top + w.top,
1401
+ bottom: C.bottom - v.bottom + w.bottom,
1402
+ left: v.left - C.left + w.left,
1403
+ right: C.right - v.right + w.right
1404
+ }, A = t.modifiersData.offset;
1405
+ if (b === wt && A) {
1406
+ var W = A[n];
1407
+ Object.keys(L).forEach(function(S) {
1408
+ var U = [V, N].indexOf(S) >= 0 ? 1 : -1, G = [T, N].indexOf(S) >= 0 ? "y" : "x";
1409
+ L[S] += W[G] * U;
1405
1410
  });
1406
1411
  }
1407
- return C;
1412
+ return L;
1408
1413
  }
1409
- function vs(t, e) {
1414
+ function bs(t, e) {
1410
1415
  e === void 0 && (e = {});
1411
- var i = e, s = i.placement, n = i.boundary, r = i.rootBoundary, a = i.padding, l = i.flipVariations, o = i.allowedAutoPlacements, d = o === void 0 ? ze : o, c = pt(s), v = c ? l ? $e : $e.filter(function(x) {
1412
- return pt(x) === c;
1413
- }) : Lt, w = v.filter(function(x) {
1414
- return d.indexOf(x) >= 0;
1416
+ var i = e, s = i.placement, n = i.boundary, r = i.rootBoundary, a = i.padding, l = i.flipVariations, o = i.allowedAutoPlacements, u = o === void 0 ? Xe : o, c = gt(s), g = c ? l ? Ce : Ce.filter(function(y) {
1417
+ return gt(y) === c;
1418
+ }) : kt, b = g.filter(function(y) {
1419
+ return u.indexOf(y) >= 0;
1415
1420
  });
1416
- w.length === 0 && (w = v);
1417
- var u = w.reduce(function(x, p) {
1418
- return x[p] = Et(t, {
1421
+ b.length === 0 && (b = g);
1422
+ var f = b.reduce(function(y, p) {
1423
+ return y[p] = $t(t, {
1419
1424
  placement: p,
1420
1425
  boundary: n,
1421
1426
  rootBoundary: r,
1422
1427
  padding: a
1423
- })[_(p)], x;
1428
+ })[z(p)], y;
1424
1429
  }, {});
1425
- return Object.keys(u).sort(function(x, p) {
1426
- return u[x] - u[p];
1430
+ return Object.keys(f).sort(function(y, p) {
1431
+ return f[y] - f[p];
1427
1432
  });
1428
1433
  }
1429
- function ms(t) {
1430
- if (_(t) === oe)
1434
+ function ws(t) {
1435
+ if (z(t) === le)
1431
1436
  return [];
1432
- var e = It(t);
1433
- return [ke(t), e, ke(e)];
1437
+ var e = Rt(t);
1438
+ return [Se(t), e, Se(e)];
1434
1439
  }
1435
- function bs(t) {
1440
+ function ys(t) {
1436
1441
  var e = t.state, i = t.options, s = t.name;
1437
1442
  if (!e.modifiersData[s]._skip) {
1438
- for (var n = i.mainAxis, r = n === void 0 ? !0 : n, a = i.altAxis, l = a === void 0 ? !0 : a, o = i.fallbackPlacements, d = i.padding, c = i.boundary, v = i.rootBoundary, w = i.altBoundary, u = i.flipVariations, x = u === void 0 ? !0 : u, p = i.allowedAutoPlacements, h = e.options.placement, y = _(h), $ = y === h, L = o || ($ || !x ? [It(h)] : ms(h)), f = [h].concat(L).reduce(function(st, X) {
1439
- return st.concat(_(X) === oe ? vs(e, {
1440
- placement: X,
1443
+ for (var n = i.mainAxis, r = n === void 0 ? !0 : n, a = i.altAxis, l = a === void 0 ? !0 : a, o = i.fallbackPlacements, u = i.padding, c = i.boundary, g = i.rootBoundary, b = i.altBoundary, f = i.flipVariations, y = f === void 0 ? !0 : f, p = i.allowedAutoPlacements, h = e.options.placement, w = z(h), O = w === h, $ = o || (O || !y ? [Rt(h)] : ws(h)), d = [h].concat($).reduce(function(nt, Y) {
1444
+ return nt.concat(z(Y) === le ? bs(e, {
1445
+ placement: Y,
1441
1446
  boundary: c,
1442
- rootBoundary: v,
1443
- padding: d,
1444
- flipVariations: x,
1447
+ rootBoundary: g,
1448
+ padding: u,
1449
+ flipVariations: y,
1445
1450
  allowedAutoPlacements: p
1446
- }) : X);
1447
- }, []), m = e.rects.reference, b = e.rects.popper, O = /* @__PURE__ */ new Map(), A = !0, k = f[0], C = 0; C < f.length; C++) {
1448
- var S = f[C], V = _(S), T = pt(S) === ut, q = [P, F].indexOf(V) >= 0, U = q ? "width" : "height", I = Et(e, {
1449
- placement: S,
1451
+ }) : Y);
1452
+ }, []), v = e.rects.reference, m = e.rects.popper, E = /* @__PURE__ */ new Map(), k = !0, C = d[0], L = 0; L < d.length; L++) {
1453
+ var A = d[L], W = z(A), S = gt(A) === dt, U = [T, N].indexOf(W) >= 0, G = U ? "width" : "height", D = $t(e, {
1454
+ placement: A,
1450
1455
  boundary: c,
1451
- rootBoundary: v,
1452
- altBoundary: w,
1453
- padding: d
1454
- }), W = q ? T ? N : D : T ? F : P;
1455
- m[U] > b[U] && (W = It(W));
1456
- var kt = It(W), G = [];
1457
- if (r && G.push(I[V] <= 0), l && G.push(I[W] <= 0, I[kt] <= 0), G.every(function(st) {
1458
- return st;
1456
+ rootBoundary: g,
1457
+ altBoundary: b,
1458
+ padding: u
1459
+ }), H = U ? S ? V : P : S ? N : T;
1460
+ v[G] > m[G] && (H = Rt(H));
1461
+ var St = Rt(H), J = [];
1462
+ if (r && J.push(D[W] <= 0), l && J.push(D[H] <= 0, D[St] <= 0), J.every(function(nt) {
1463
+ return nt;
1459
1464
  })) {
1460
- k = S, A = !1;
1465
+ C = A, k = !1;
1461
1466
  break;
1462
1467
  }
1463
- O.set(S, G);
1468
+ E.set(A, J);
1464
1469
  }
1465
- if (A)
1466
- for (var At = x ? 3 : 1, Vt = function(X) {
1467
- var vt = f.find(function(Tt) {
1468
- var J = O.get(Tt);
1469
- if (J)
1470
- return J.slice(0, X).every(function(Wt) {
1471
- return Wt;
1470
+ if (k)
1471
+ for (var Tt = y ? 3 : 1, Ht = function(Y) {
1472
+ var mt = d.find(function(Dt) {
1473
+ var Q = E.get(Dt);
1474
+ if (Q)
1475
+ return Q.slice(0, Y).every(function(_t) {
1476
+ return _t;
1472
1477
  });
1473
1478
  });
1474
- if (vt)
1475
- return k = vt, "break";
1476
- }, gt = At; gt > 0; gt--) {
1477
- var St = Vt(gt);
1478
- if (St === "break") break;
1479
+ if (mt)
1480
+ return C = mt, "break";
1481
+ }, vt = Tt; vt > 0; vt--) {
1482
+ var Pt = Ht(vt);
1483
+ if (Pt === "break") break;
1479
1484
  }
1480
- e.placement !== k && (e.modifiersData[s]._skip = !0, e.placement = k, e.reset = !0);
1485
+ e.placement !== C && (e.modifiersData[s]._skip = !0, e.placement = C, e.reset = !0);
1481
1486
  }
1482
1487
  }
1483
- const ws = {
1488
+ const xs = {
1484
1489
  name: "flip",
1485
1490
  enabled: !0,
1486
1491
  phase: "main",
1487
- fn: bs,
1492
+ fn: ys,
1488
1493
  requiresIfExists: ["offset"],
1489
1494
  data: {
1490
1495
  _skip: !1
1491
1496
  }
1492
1497
  };
1493
- function Se(t, e, i) {
1498
+ function Pe(t, e, i) {
1494
1499
  return i === void 0 && (i = {
1495
1500
  x: 0,
1496
1501
  y: 0
@@ -1501,39 +1506,39 @@ function Se(t, e, i) {
1501
1506
  left: t.left - e.width - i.x
1502
1507
  };
1503
1508
  }
1504
- function Te(t) {
1505
- return [P, N, F, D].some(function(e) {
1509
+ function De(t) {
1510
+ return [T, V, N, P].some(function(e) {
1506
1511
  return t[e] >= 0;
1507
1512
  });
1508
1513
  }
1509
- function ys(t) {
1510
- var e = t.state, i = t.name, s = e.rects.reference, n = e.rects.popper, r = e.modifiersData.preventOverflow, a = Et(e, {
1514
+ function Es(t) {
1515
+ var e = t.state, i = t.name, s = e.rects.reference, n = e.rects.popper, r = e.modifiersData.preventOverflow, a = $t(e, {
1511
1516
  elementContext: "reference"
1512
- }), l = Et(e, {
1517
+ }), l = $t(e, {
1513
1518
  altBoundary: !0
1514
- }), o = Se(a, s), d = Se(l, n, r), c = Te(o), v = Te(d);
1519
+ }), o = Pe(a, s), u = Pe(l, n, r), c = De(o), g = De(u);
1515
1520
  e.modifiersData[i] = {
1516
1521
  referenceClippingOffsets: o,
1517
- popperEscapeOffsets: d,
1522
+ popperEscapeOffsets: u,
1518
1523
  isReferenceHidden: c,
1519
- hasPopperEscaped: v
1524
+ hasPopperEscaped: g
1520
1525
  }, e.attributes.popper = Object.assign({}, e.attributes.popper, {
1521
1526
  "data-popper-reference-hidden": c,
1522
- "data-popper-escaped": v
1527
+ "data-popper-escaped": g
1523
1528
  });
1524
1529
  }
1525
- const xs = {
1530
+ const Os = {
1526
1531
  name: "hide",
1527
1532
  enabled: !0,
1528
1533
  phase: "main",
1529
1534
  requiresIfExists: ["preventOverflow"],
1530
- fn: ys
1535
+ fn: Es
1531
1536
  };
1532
- function Es(t, e, i) {
1533
- var s = _(t), n = [D, P].indexOf(s) >= 0 ? -1 : 1, r = typeof i == "function" ? i(Object.assign({}, e, {
1537
+ function $s(t, e, i) {
1538
+ var s = z(t), n = [P, T].indexOf(s) >= 0 ? -1 : 1, r = typeof i == "function" ? i(Object.assign({}, e, {
1534
1539
  placement: t
1535
1540
  })) : i, a = r[0], l = r[1];
1536
- return a = a || 0, l = (l || 0) * n, [D, N].indexOf(s) >= 0 ? {
1541
+ return a = a || 0, l = (l || 0) * n, [P, V].indexOf(s) >= 0 ? {
1537
1542
  x: l,
1538
1543
  y: a
1539
1544
  } : {
@@ -1541,109 +1546,109 @@ function Es(t, e, i) {
1541
1546
  y: l
1542
1547
  };
1543
1548
  }
1544
- function Os(t) {
1545
- var e = t.state, i = t.options, s = t.name, n = i.offset, r = n === void 0 ? [0, 0] : n, a = ze.reduce(function(c, v) {
1546
- return c[v] = Es(v, e.rects, r), c;
1547
- }, {}), l = a[e.placement], o = l.x, d = l.y;
1548
- e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += o, e.modifiersData.popperOffsets.y += d), e.modifiersData[s] = a;
1549
+ function Ls(t) {
1550
+ var e = t.state, i = t.options, s = t.name, n = i.offset, r = n === void 0 ? [0, 0] : n, a = Xe.reduce(function(c, g) {
1551
+ return c[g] = $s(g, e.rects, r), c;
1552
+ }, {}), l = a[e.placement], o = l.x, u = l.y;
1553
+ e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += o, e.modifiersData.popperOffsets.y += u), e.modifiersData[s] = a;
1549
1554
  }
1550
- const $s = {
1555
+ const Cs = {
1551
1556
  name: "offset",
1552
1557
  enabled: !0,
1553
1558
  phase: "main",
1554
1559
  requires: ["popperOffsets"],
1555
- fn: Os
1560
+ fn: Ls
1556
1561
  };
1557
- function Ls(t) {
1562
+ function ks(t) {
1558
1563
  var e = t.state, i = t.name;
1559
- e.modifiersData[i] = Je({
1564
+ e.modifiersData[i] = Ze({
1560
1565
  reference: e.rects.reference,
1561
1566
  element: e.rects.popper,
1562
1567
  strategy: "absolute",
1563
1568
  placement: e.placement
1564
1569
  });
1565
1570
  }
1566
- const Cs = {
1571
+ const As = {
1567
1572
  name: "popperOffsets",
1568
1573
  enabled: !0,
1569
1574
  phase: "read",
1570
- fn: Ls,
1575
+ fn: ks,
1571
1576
  data: {}
1572
1577
  };
1573
- function ks(t) {
1578
+ function Ss(t) {
1574
1579
  return t === "x" ? "y" : "x";
1575
1580
  }
1576
- function As(t) {
1577
- var e = t.state, i = t.options, s = t.name, n = i.mainAxis, r = n === void 0 ? !0 : n, a = i.altAxis, l = a === void 0 ? !1 : a, o = i.boundary, d = i.rootBoundary, c = i.altBoundary, v = i.padding, w = i.tether, u = w === void 0 ? !0 : w, x = i.tetherOffset, p = x === void 0 ? 0 : x, h = Et(e, {
1581
+ function Ts(t) {
1582
+ var e = t.state, i = t.options, s = t.name, n = i.mainAxis, r = n === void 0 ? !0 : n, a = i.altAxis, l = a === void 0 ? !1 : a, o = i.boundary, u = i.rootBoundary, c = i.altBoundary, g = i.padding, b = i.tether, f = b === void 0 ? !0 : b, y = i.tetherOffset, p = y === void 0 ? 0 : y, h = $t(e, {
1578
1583
  boundary: o,
1579
- rootBoundary: d,
1580
- padding: v,
1584
+ rootBoundary: u,
1585
+ padding: g,
1581
1586
  altBoundary: c
1582
- }), y = _(e.placement), $ = pt(e.placement), L = !$, f = ce(y), m = ks(f), b = e.modifiersData.popperOffsets, O = e.rects.reference, A = e.rects.popper, k = typeof p == "function" ? p(Object.assign({}, e.rects, {
1587
+ }), w = z(e.placement), O = gt(e.placement), $ = !O, d = fe(w), v = Ss(d), m = e.modifiersData.popperOffsets, E = e.rects.reference, k = e.rects.popper, C = typeof p == "function" ? p(Object.assign({}, e.rects, {
1583
1588
  placement: e.placement
1584
- })) : p, C = typeof k == "number" ? {
1585
- mainAxis: k,
1586
- altAxis: k
1589
+ })) : p, L = typeof C == "number" ? {
1590
+ mainAxis: C,
1591
+ altAxis: C
1587
1592
  } : Object.assign({
1588
1593
  mainAxis: 0,
1589
1594
  altAxis: 0
1590
- }, k), S = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, V = {
1595
+ }, C), A = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, W = {
1591
1596
  x: 0,
1592
1597
  y: 0
1593
1598
  };
1594
- if (b) {
1599
+ if (m) {
1595
1600
  if (r) {
1596
- var T, q = f === "y" ? P : D, U = f === "y" ? F : N, I = f === "y" ? "height" : "width", W = b[f], kt = W + h[q], G = W - h[U], At = u ? -A[I] / 2 : 0, Vt = $ === ut ? O[I] : A[I], gt = $ === ut ? -A[I] : -O[I], St = e.elements.arrow, st = u && St ? le(St) : {
1601
+ var S, U = d === "y" ? T : P, G = d === "y" ? N : V, D = d === "y" ? "height" : "width", H = m[d], St = H + h[U], J = H - h[G], Tt = f ? -k[D] / 2 : 0, Ht = O === dt ? E[D] : k[D], vt = O === dt ? -k[D] : -E[D], Pt = e.elements.arrow, nt = f && Pt ? ue(Pt) : {
1597
1602
  width: 0,
1598
1603
  height: 0
1599
- }, X = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ye(), vt = X[q], Tt = X[U], J = bt(0, O[I], st[I]), Wt = L ? O[I] / 2 - At - J - vt - C.mainAxis : Vt - J - vt - C.mainAxis, ei = L ? -O[I] / 2 + At + J + Tt + C.mainAxis : gt + J + Tt + C.mainAxis, Ht = e.elements.arrow && Ct(e.elements.arrow), ii = Ht ? f === "y" ? Ht.clientTop || 0 : Ht.clientLeft || 0 : 0, he = (T = S == null ? void 0 : S[f]) != null ? T : 0, si = W + Wt - he - ii, ni = W + ei - he, pe = bt(u ? Mt(kt, si) : kt, W, u ? et(G, ni) : G);
1600
- b[f] = pe, V[f] = pe - W;
1604
+ }, Y = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ue(), mt = Y[U], Dt = Y[G], Q = yt(0, E[D], nt[D]), _t = $ ? E[D] / 2 - Tt - Q - mt - L.mainAxis : Ht - Q - mt - L.mainAxis, si = $ ? -E[D] / 2 + Tt + Q + Dt + L.mainAxis : vt + Q + Dt + L.mainAxis, zt = e.elements.arrow && At(e.elements.arrow), ni = zt ? d === "y" ? zt.clientTop || 0 : zt.clientLeft || 0 : 0, ge = (S = A == null ? void 0 : A[d]) != null ? S : 0, ri = H + _t - ge - ni, oi = H + si - ge, ve = yt(f ? Bt(St, ri) : St, H, f ? it(J, oi) : J);
1605
+ m[d] = ve, W[d] = ve - H;
1601
1606
  }
1602
1607
  if (l) {
1603
- var ge, ri = f === "x" ? P : D, oi = f === "x" ? F : N, Q = b[m], Pt = m === "y" ? "height" : "width", ve = Q + h[ri], me = Q - h[oi], _t = [P, D].indexOf(y) !== -1, be = (ge = S == null ? void 0 : S[m]) != null ? ge : 0, we = _t ? ve : Q - O[Pt] - A[Pt] - be + C.altAxis, ye = _t ? Q + O[Pt] + A[Pt] - be - C.altAxis : me, xe = u && _t ? Qi(we, Q, ye) : bt(u ? we : ve, Q, u ? ye : me);
1604
- b[m] = xe, V[m] = xe - Q;
1608
+ var me, ai = d === "x" ? T : P, li = d === "x" ? N : V, Z = m[v], Mt = v === "y" ? "height" : "width", be = Z + h[ai], we = Z - h[li], Kt = [T, P].indexOf(w) !== -1, ye = (me = A == null ? void 0 : A[v]) != null ? me : 0, xe = Kt ? be : Z - E[Mt] - k[Mt] - ye + L.altAxis, Ee = Kt ? Z + E[Mt] + k[Mt] - ye - L.altAxis : we, Oe = f && Kt ? ts(xe, Z, Ee) : yt(f ? xe : be, Z, f ? Ee : we);
1609
+ m[v] = Oe, W[v] = Oe - Z;
1605
1610
  }
1606
- e.modifiersData[s] = V;
1611
+ e.modifiersData[s] = W;
1607
1612
  }
1608
1613
  }
1609
- const Ss = {
1614
+ const Ps = {
1610
1615
  name: "preventOverflow",
1611
1616
  enabled: !0,
1612
1617
  phase: "main",
1613
- fn: As,
1618
+ fn: Ts,
1614
1619
  requiresIfExists: ["offset"]
1615
1620
  };
1616
- function Ts(t) {
1621
+ function Ds(t) {
1617
1622
  return {
1618
1623
  scrollLeft: t.scrollLeft,
1619
1624
  scrollTop: t.scrollTop
1620
1625
  };
1621
1626
  }
1622
- function Ps(t) {
1623
- return t === R(t) || !j(t) ? de(t) : Ts(t);
1627
+ function Ms(t) {
1628
+ return t === B(t) || !F(t) ? de(t) : Ds(t);
1624
1629
  }
1625
- function Ds(t) {
1626
- var e = t.getBoundingClientRect(), i = ft(e.width) / t.offsetWidth || 1, s = ft(e.height) / t.offsetHeight || 1;
1630
+ function Is(t) {
1631
+ var e = t.getBoundingClientRect(), i = ht(e.width) / t.offsetWidth || 1, s = ht(e.height) / t.offsetHeight || 1;
1627
1632
  return i !== 1 || s !== 1;
1628
1633
  }
1629
- function Is(t, e, i) {
1634
+ function Rs(t, e, i) {
1630
1635
  i === void 0 && (i = !1);
1631
- var s = j(e), n = j(e) && Ds(e), r = Y(e), a = ht(t, n, i), l = {
1636
+ var s = F(e), n = F(e) && Is(e), r = q(e), a = pt(t, n, i), l = {
1632
1637
  scrollLeft: 0,
1633
1638
  scrollTop: 0
1634
1639
  }, o = {
1635
1640
  x: 0,
1636
1641
  y: 0
1637
1642
  };
1638
- return (s || !s && !i) && ((z(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1639
- fe(r)) && (l = Ps(e)), j(e) ? (o = ht(e, !0), o.x += e.clientLeft, o.y += e.clientTop) : r && (o.x = ue(r))), {
1643
+ return (s || !s && !i) && ((K(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1644
+ pe(r)) && (l = Ms(e)), F(e) ? (o = pt(e, !0), o.x += e.clientLeft, o.y += e.clientTop) : r && (o.x = he(r))), {
1640
1645
  x: a.left + l.scrollLeft - o.x,
1641
1646
  y: a.top + l.scrollTop - o.y,
1642
1647
  width: a.width,
1643
1648
  height: a.height
1644
1649
  };
1645
1650
  }
1646
- function Ms(t) {
1651
+ function Bs(t) {
1647
1652
  var e = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), s = [];
1648
1653
  t.forEach(function(r) {
1649
1654
  e.set(r.name, r);
@@ -1662,15 +1667,15 @@ function Ms(t) {
1662
1667
  i.has(r.name) || n(r);
1663
1668
  }), s;
1664
1669
  }
1665
- function Rs(t) {
1666
- var e = Ms(t);
1667
- return Xi.reduce(function(i, s) {
1670
+ function js(t) {
1671
+ var e = Bs(t);
1672
+ return qi.reduce(function(i, s) {
1668
1673
  return i.concat(e.filter(function(n) {
1669
1674
  return n.phase === s;
1670
1675
  }));
1671
1676
  }, []);
1672
1677
  }
1673
- function Bs(t) {
1678
+ function Fs(t) {
1674
1679
  var e;
1675
1680
  return function() {
1676
1681
  return e || (e = new Promise(function(i) {
@@ -1680,7 +1685,7 @@ function Bs(t) {
1680
1685
  })), e;
1681
1686
  };
1682
1687
  }
1683
- function js(t) {
1688
+ function Ns(t) {
1684
1689
  var e = t.reduce(function(i, s) {
1685
1690
  var n = i[s.name];
1686
1691
  return i[s.name] = n ? Object.assign({}, n, s, {
@@ -1692,27 +1697,27 @@ function js(t) {
1692
1697
  return e[i];
1693
1698
  });
1694
1699
  }
1695
- var Pe = {
1700
+ var Me = {
1696
1701
  placement: "bottom",
1697
1702
  modifiers: [],
1698
1703
  strategy: "absolute"
1699
1704
  };
1700
- function De() {
1705
+ function Ie() {
1701
1706
  for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)
1702
1707
  e[i] = arguments[i];
1703
1708
  return !e.some(function(s) {
1704
1709
  return !(s && typeof s.getBoundingClientRect == "function");
1705
1710
  });
1706
1711
  }
1707
- function Fs(t) {
1712
+ function Vs(t) {
1708
1713
  t === void 0 && (t = {});
1709
- var e = t, i = e.defaultModifiers, s = i === void 0 ? [] : i, n = e.defaultOptions, r = n === void 0 ? Pe : n;
1710
- return function(l, o, d) {
1711
- d === void 0 && (d = r);
1714
+ var e = t, i = e.defaultModifiers, s = i === void 0 ? [] : i, n = e.defaultOptions, r = n === void 0 ? Me : n;
1715
+ return function(l, o, u) {
1716
+ u === void 0 && (u = r);
1712
1717
  var c = {
1713
1718
  placement: "bottom",
1714
1719
  orderedModifiers: [],
1715
- options: Object.assign({}, Pe, r),
1720
+ options: Object.assign({}, Me, r),
1716
1721
  modifiersData: {},
1717
1722
  elements: {
1718
1723
  reference: l,
@@ -1720,18 +1725,18 @@ function Fs(t) {
1720
1725
  },
1721
1726
  attributes: {},
1722
1727
  styles: {}
1723
- }, v = [], w = !1, u = {
1728
+ }, g = [], b = !1, f = {
1724
1729
  state: c,
1725
- setOptions: function(y) {
1726
- var $ = typeof y == "function" ? y(c.options) : y;
1727
- p(), c.options = Object.assign({}, r, c.options, $), c.scrollParents = {
1728
- reference: it(l) ? wt(l) : l.contextElement ? wt(l.contextElement) : [],
1729
- popper: wt(o)
1730
+ setOptions: function(w) {
1731
+ var O = typeof w == "function" ? w(c.options) : w;
1732
+ p(), c.options = Object.assign({}, r, c.options, O), c.scrollParents = {
1733
+ reference: st(l) ? xt(l) : l.contextElement ? xt(l.contextElement) : [],
1734
+ popper: xt(o)
1730
1735
  };
1731
- var L = Rs(js([].concat(s, c.options.modifiers)));
1732
- return c.orderedModifiers = L.filter(function(f) {
1733
- return f.enabled;
1734
- }), x(), u.update();
1736
+ var $ = js(Ns([].concat(s, c.options.modifiers)));
1737
+ return c.orderedModifiers = $.filter(function(d) {
1738
+ return d.enabled;
1739
+ }), y(), f.update();
1735
1740
  },
1736
1741
  // Sync update – it will always be executed, even if not necessary. This
1737
1742
  // is useful for low frequency updates where sync behavior simplifies the
@@ -1739,26 +1744,26 @@ function Fs(t) {
1739
1744
  // For high frequency updates (e.g. `resize` and `scroll` events), always
1740
1745
  // prefer the async Popper#update method
1741
1746
  forceUpdate: function() {
1742
- if (!w) {
1743
- var y = c.elements, $ = y.reference, L = y.popper;
1744
- if (De($, L)) {
1747
+ if (!b) {
1748
+ var w = c.elements, O = w.reference, $ = w.popper;
1749
+ if (Ie(O, $)) {
1745
1750
  c.rects = {
1746
- reference: Is($, Ct(L), c.options.strategy === "fixed"),
1747
- popper: le(L)
1748
- }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(C) {
1749
- return c.modifiersData[C.name] = Object.assign({}, C.data);
1751
+ reference: Rs(O, At($), c.options.strategy === "fixed"),
1752
+ popper: ue($)
1753
+ }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(L) {
1754
+ return c.modifiersData[L.name] = Object.assign({}, L.data);
1750
1755
  });
1751
- for (var f = 0; f < c.orderedModifiers.length; f++) {
1756
+ for (var d = 0; d < c.orderedModifiers.length; d++) {
1752
1757
  if (c.reset === !0) {
1753
- c.reset = !1, f = -1;
1758
+ c.reset = !1, d = -1;
1754
1759
  continue;
1755
1760
  }
1756
- var m = c.orderedModifiers[f], b = m.fn, O = m.options, A = O === void 0 ? {} : O, k = m.name;
1757
- typeof b == "function" && (c = b({
1761
+ var v = c.orderedModifiers[d], m = v.fn, E = v.options, k = E === void 0 ? {} : E, C = v.name;
1762
+ typeof m == "function" && (c = m({
1758
1763
  state: c,
1759
- options: A,
1760
- name: k,
1761
- instance: u
1764
+ options: k,
1765
+ name: C,
1766
+ instance: f
1762
1767
  }) || c);
1763
1768
  }
1764
1769
  }
@@ -1766,57 +1771,57 @@ function Fs(t) {
1766
1771
  },
1767
1772
  // Async and optimistically optimized update – it will not be executed if
1768
1773
  // not necessary (debounced to run at most once-per-tick)
1769
- update: Bs(function() {
1774
+ update: Fs(function() {
1770
1775
  return new Promise(function(h) {
1771
- u.forceUpdate(), h(c);
1776
+ f.forceUpdate(), h(c);
1772
1777
  });
1773
1778
  }),
1774
1779
  destroy: function() {
1775
- p(), w = !0;
1780
+ p(), b = !0;
1776
1781
  }
1777
1782
  };
1778
- if (!De(l, o))
1779
- return u;
1780
- u.setOptions(d).then(function(h) {
1781
- !w && d.onFirstUpdate && d.onFirstUpdate(h);
1783
+ if (!Ie(l, o))
1784
+ return f;
1785
+ f.setOptions(u).then(function(h) {
1786
+ !b && u.onFirstUpdate && u.onFirstUpdate(h);
1782
1787
  });
1783
- function x() {
1788
+ function y() {
1784
1789
  c.orderedModifiers.forEach(function(h) {
1785
- var y = h.name, $ = h.options, L = $ === void 0 ? {} : $, f = h.effect;
1786
- if (typeof f == "function") {
1787
- var m = f({
1790
+ var w = h.name, O = h.options, $ = O === void 0 ? {} : O, d = h.effect;
1791
+ if (typeof d == "function") {
1792
+ var v = d({
1788
1793
  state: c,
1789
- name: y,
1790
- instance: u,
1791
- options: L
1792
- }), b = function() {
1794
+ name: w,
1795
+ instance: f,
1796
+ options: $
1797
+ }), m = function() {
1793
1798
  };
1794
- v.push(m || b);
1799
+ g.push(v || m);
1795
1800
  }
1796
1801
  });
1797
1802
  }
1798
1803
  function p() {
1799
- v.forEach(function(h) {
1804
+ g.forEach(function(h) {
1800
1805
  return h();
1801
- }), v = [];
1806
+ }), g = [];
1802
1807
  }
1803
- return u;
1808
+ return f;
1804
1809
  };
1805
1810
  }
1806
- var Ns = [ls, Cs, os, Ui, $s, ws, Ss, is, xs], Vs = /* @__PURE__ */ Fs({
1807
- defaultModifiers: Ns
1811
+ var Ws = [us, As, ls, Ji, Cs, xs, Ps, ns, Os], Hs = /* @__PURE__ */ Vs({
1812
+ defaultModifiers: Ws
1808
1813
  });
1809
- async function Jt(t) {
1814
+ async function Zt(t) {
1810
1815
  const e = this.collection.findIndex((i) => i.id === t.id);
1811
1816
  if (e >= 0) {
1812
1817
  const i = this.collection[e];
1813
- i.state === "opened" && i.close(), i.popper.destroy(), Qe(i), Object.getOwnPropertyNames(i).forEach((s) => {
1818
+ i.state === "opened" && i.close(), i.popper.destroy(), ti(i), Object.getOwnPropertyNames(i).forEach((s) => {
1814
1819
  delete i[s];
1815
1820
  }), this.collection.splice(e, 1);
1816
1821
  }
1817
1822
  return this.collection;
1818
1823
  }
1819
- function Qe(t) {
1824
+ function ti(t) {
1820
1825
  return t.__eventListeners && (t.__eventListeners.forEach((e) => {
1821
1826
  e.el.forEach((i) => {
1822
1827
  e.type.forEach((s) => {
@@ -1825,52 +1830,52 @@ function Qe(t) {
1825
1830
  });
1826
1831
  }), delete t.__eventListeners), t;
1827
1832
  }
1828
- async function Ze(t) {
1829
- const e = Ne.call(this, t);
1830
- return e.el.classList.add(this.settings.stateActive), e.trigger.hasAttribute("aria-controls") && e.trigger.setAttribute("aria-expanded", "true"), e.config = je(e.el, this.settings), e.popper.setOptions({
1833
+ async function ei(t) {
1834
+ const e = We.call(this, t);
1835
+ return e.el.inert = !1, e.el.classList.add(this.settings.stateActive), e.isTooltip || e.trigger.setAttribute("aria-expanded", "true"), e.config = Ne(e.el, this.settings), e.popper.setOptions({
1831
1836
  placement: e.config.placement,
1832
1837
  modifiers: [
1833
1838
  { name: "eventListeners", enabled: !0 },
1834
- ...Fe(e.config)
1839
+ ...Ve(e.config)
1835
1840
  ]
1836
1841
  }), e.popper.update(), e.state = "opened", e;
1837
1842
  }
1838
- async function Ws(t, e) {
1839
- Jt.call(this, t);
1843
+ async function _s(t, e) {
1844
+ Zt.call(this, t);
1840
1845
  const i = this, s = {
1841
1846
  id: t.id,
1842
1847
  state: "closed",
1843
1848
  el: t,
1844
1849
  trigger: e,
1845
1850
  toggleDelayId: null,
1846
- popper: Vs(e, t),
1847
- config: je(t, this.settings),
1851
+ popper: Hs(e, t),
1852
+ config: Ne(t, this.settings),
1848
1853
  get isTooltip() {
1849
- return e.hasAttribute("aria-describedby");
1854
+ return !!t.closest(i.settings.selectorTooltip) || t.getAttribute("role") == "tooltip";
1850
1855
  },
1851
1856
  open() {
1852
- return Ze.call(i, this);
1857
+ return ei.call(i, this);
1853
1858
  },
1854
1859
  close() {
1855
- return re.call(i, this);
1860
+ return ae.call(i, this);
1856
1861
  },
1857
1862
  deregister() {
1858
- return Jt.call(i, this);
1863
+ return Zt.call(i, this);
1859
1864
  }
1860
1865
  };
1861
- return s.trigger.hasAttribute("aria-controls") && s.trigger.setAttribute("aria-expanded", "false"), ti.call(this, s), this.collection.push(s), s.el.classList.contains(this.settings.stateActive) && (await s.open(), He.call(this, s)), s.popper.setOptions({
1866
+ return s.isTooltip && s.el.setAttribute("role", "tooltip"), s.isTooltip || s.trigger.setAttribute("aria-expanded", "false"), ii.call(this, s), this.collection.push(s), s.el.classList.contains(this.settings.stateActive) ? (await s.open(), ze.call(this, s)) : s.el.inert = !0, s.popper.setOptions({
1862
1867
  placement: s.config.placement
1863
1868
  }), s;
1864
1869
  }
1865
- function ti(t) {
1866
- return t.__eventListeners || (t.config.event === "hover" ? (t.__eventListeners = [{
1870
+ function ii(t) {
1871
+ return t.__eventListeners || ((t.isTooltip ? "hover" : t.config.event) === "hover" ? (t.__eventListeners = [{
1867
1872
  el: ["trigger"],
1868
1873
  type: ["mouseenter", "focus"],
1869
- listener: Di.bind(this, t)
1874
+ listener: Ii.bind(this, t)
1870
1875
  }, {
1871
1876
  el: ["el", "trigger"],
1872
1877
  type: ["mouseleave", "focusout"],
1873
- listener: Ii.bind(this, t)
1878
+ listener: Ri.bind(this, t)
1874
1879
  }], t.__eventListeners.forEach((i) => {
1875
1880
  i.el.forEach((s) => {
1876
1881
  i.type.forEach((n) => {
@@ -1880,7 +1885,7 @@ function ti(t) {
1880
1885
  })) : (t.__eventListeners = [{
1881
1886
  el: ["trigger"],
1882
1887
  type: ["click"],
1883
- listener: Pi.bind(this, t)
1888
+ listener: Mi.bind(this, t)
1884
1889
  }], t.__eventListeners.forEach((i) => {
1885
1890
  i.el.forEach((s) => {
1886
1891
  i.type.forEach((n) => {
@@ -1889,12 +1894,12 @@ function ti(t) {
1889
1894
  });
1890
1895
  }))), t;
1891
1896
  }
1892
- var dt;
1893
- class Xs extends Rt {
1897
+ var ft;
1898
+ class qs extends jt {
1894
1899
  constructor(i) {
1895
1900
  super();
1896
- H(this, dt);
1897
- this.defaults = Ai, this.settings = { ...this.defaults, ...i }, this.trigger = null, M(this, dt, Mi.bind(this)), this.settings.autoMount && this.mount();
1901
+ _(this, ft);
1902
+ this.defaults = Ti, this.settings = { ...this.defaults, ...i }, this.trigger = null, M(this, ft, Bi.bind(this)), this.settings.autoMount && this.mount();
1898
1903
  }
1899
1904
  get active() {
1900
1905
  return this.collection.find((i) => i.state == "opened");
@@ -1912,34 +1917,34 @@ class Xs extends Rt {
1912
1917
  }
1913
1918
  mountEventListeners(i = !0) {
1914
1919
  i && this.collection.forEach((s) => {
1915
- ti.call(this, s);
1916
- }), document.addEventListener("keydown", E(this, dt), !1);
1920
+ ii.call(this, s);
1921
+ }), document.addEventListener("keydown", x(this, ft), !1);
1917
1922
  }
1918
1923
  unmountEventListeners(i = !0) {
1919
1924
  i && this.collection.forEach((s) => {
1920
- Qe(s);
1921
- }), document.removeEventListener("keydown", E(this, dt), !1);
1925
+ ti(s);
1926
+ }), document.removeEventListener("keydown", x(this, ft), !1);
1922
1927
  }
1923
1928
  register(i) {
1924
- const s = Ti.call(this, i);
1925
- return s.error ? Promise.reject(s.error) : Ws.call(this, s.popover, s.trigger);
1929
+ const s = Di.call(this, i);
1930
+ return s.error ? Promise.reject(s.error) : _s.call(this, s.popover, s.trigger);
1926
1931
  }
1927
1932
  deregister(i) {
1928
1933
  let s = this.get(i.id || i);
1929
- return s ? Jt.call(this, s) : Promise.reject(new Error(`Failed to deregister; popover does not exist in collection with ID of: "${i.id || i}".`));
1934
+ return s ? Zt.call(this, s) : Promise.reject(new Error(`Failed to deregister; popover does not exist in collection with ID of: "${i.id || i}".`));
1930
1935
  }
1931
1936
  open(i) {
1932
- return Ze.call(this, i);
1937
+ return ei.call(this, i);
1933
1938
  }
1934
1939
  close(i) {
1935
- return re.call(this, i);
1940
+ return ae.call(this, i);
1936
1941
  }
1937
1942
  }
1938
- dt = new WeakMap();
1943
+ ft = new WeakMap();
1939
1944
  export {
1940
- zs as Drawer,
1941
- Ks as Modal,
1942
- Xs as Popover,
1943
- _s as core
1945
+ Xs as Drawer,
1946
+ Ys as Modal,
1947
+ qs as Popover,
1948
+ Ks as core
1944
1949
  };
1945
1950
  //# sourceMappingURL=index.js.map