vrembem 4.0.0-next.8 → 4.0.0-next.9

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