vrembem 4.0.0-next.2 → 4.0.0-next.3

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