vrembem 4.0.0-next.32 → 4.0.0-next.33
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/dev/base.css +0 -1
- package/dev/base.css.map +1 -1
- package/dev/index.css +72 -75
- package/dev/index.css.map +1 -1
- package/dev/index.js +662 -646
- package/dev/index.js.map +1 -1
- package/dev/index.umd.cjs +614 -598
- package/dev/index.umd.cjs.map +1 -1
- package/dev/root.css +72 -72
- package/dev/root.css.map +1 -1
- package/dist/base.css +1 -1
- package/dist/base.css.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +606 -591
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +3 -3
- package/dist/index.umd.cjs.map +1 -1
- package/dist/root.css +1 -1
- package/dist/root.css.map +1 -1
- package/package.json +23 -22
package/dev/index.umd.cjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.vrembem = {}));
|
|
3
|
-
})(this, function(exports2) {
|
|
3
|
+
})(this, (function(exports2) {
|
|
4
4
|
"use strict";
|
|
5
|
-
const u
|
|
6
|
-
`a[href]${u
|
|
7
|
-
`area[href]${u
|
|
8
|
-
`input:not([type="hidden"]):not([type="radio"])${u
|
|
9
|
-
`input[type="radio"]${u
|
|
10
|
-
`select${u
|
|
11
|
-
`textarea${u
|
|
12
|
-
`button${u
|
|
13
|
-
`details${u
|
|
14
|
-
`iframe${u
|
|
15
|
-
`audio[controls]${u
|
|
16
|
-
`video[controls]${u
|
|
17
|
-
`[contenteditable]${u
|
|
18
|
-
`[tabindex]${u
|
|
5
|
+
const u = ":not([inert])", f$2 = ':not([tabindex^="-"])', m$2 = ":not(:disabled)", C$2 = [
|
|
6
|
+
`a[href]${u}${f$2}`,
|
|
7
|
+
`area[href]${u}${f$2}`,
|
|
8
|
+
`input:not([type="hidden"]):not([type="radio"])${u}${f$2}${m$2}`,
|
|
9
|
+
`input[type="radio"]${u}${f$2}${m$2}`,
|
|
10
|
+
`select${u}${f$2}${m$2}`,
|
|
11
|
+
`textarea${u}${f$2}${m$2}`,
|
|
12
|
+
`button${u}${f$2}${m$2}`,
|
|
13
|
+
`details${u} > summary:first-of-type${f$2}`,
|
|
14
|
+
`iframe${u}${f$2}`,
|
|
15
|
+
`audio[controls]${u}${f$2}`,
|
|
16
|
+
`video[controls]${u}${f$2}`,
|
|
17
|
+
`[contenteditable]${u}${f$2}`,
|
|
18
|
+
`[tabindex]${u}${f$2}`
|
|
19
19
|
];
|
|
20
|
-
function
|
|
20
|
+
function k$3(n, t = "config") {
|
|
21
21
|
const s = (n.getAttribute(`data-${t}`) || "").replace(/'/g, '"');
|
|
22
22
|
return s ? JSON.parse(s) : {};
|
|
23
23
|
}
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
function M$2(n) {
|
|
105
105
|
const t = getComputedStyle(n.el), e = {}, s = n.getSetting("customProps");
|
|
106
106
|
for (let r2 = 0; r2 < s.length; r2++) {
|
|
107
|
-
const a2 = y$2(),
|
|
108
|
-
|
|
107
|
+
const a2 = y$2(), o = n.parent.module.toLowerCase(), i = $$2(s[r2]), c2 = t.getPropertyValue(`--${a2}${o}-${i}`).trim();
|
|
108
|
+
c2 && (e[i] = c2);
|
|
109
109
|
}
|
|
110
110
|
return e;
|
|
111
111
|
}
|
|
@@ -121,26 +121,26 @@
|
|
|
121
121
|
props: s = ["dataConfig", "customProps", "settings", "parent.settings"]
|
|
122
122
|
} = t;
|
|
123
123
|
for (const r2 of s) {
|
|
124
|
-
const a2 = r2 !== "customProps" ? "camel" : "kebab",
|
|
125
|
-
if (
|
|
126
|
-
return
|
|
124
|
+
const a2 = r2 !== "customProps" ? "camel" : "kebab", o = P$3.call(this, r2, n, a2);
|
|
125
|
+
if (o !== void 0)
|
|
126
|
+
return o;
|
|
127
127
|
}
|
|
128
128
|
if (e !== void 0)
|
|
129
129
|
return e;
|
|
130
130
|
throw new Error(`${this.parent.module} setting does not exist: ${n}`);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function T$3(n, t) {
|
|
133
133
|
t && document.querySelectorAll(t).forEach((s) => {
|
|
134
134
|
n ? s.style.overflow = "hidden" : s.style.removeProperty("overflow");
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function I$3(n, t) {
|
|
138
138
|
t && document.querySelectorAll(t).forEach((s) => {
|
|
139
|
-
|
|
139
|
+
s.inert = n;
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
function G(n, t, e) {
|
|
143
|
-
|
|
143
|
+
I$3(!!n, t), T$3(!!n, e);
|
|
144
144
|
}
|
|
145
145
|
const L$2 = {
|
|
146
146
|
events: {},
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
return this[this.length - 1];
|
|
172
172
|
}
|
|
173
173
|
set(t = this.el) {
|
|
174
|
-
this.length = 0, t && this.push(...t.querySelectorAll(
|
|
174
|
+
this.length = 0, t && this.push(...t.querySelectorAll(C$2.join(",")));
|
|
175
175
|
}
|
|
176
176
|
clear() {
|
|
177
177
|
this.length = 0;
|
|
@@ -193,8 +193,8 @@
|
|
|
193
193
|
}
|
|
194
194
|
function D$3(n) {
|
|
195
195
|
if (n.key !== "Tab" && n.keyCode !== 9) return;
|
|
196
|
-
const { activeElement: t } = document, { el: e, focusable: s } = this, r2 = n.shiftKey, a2 = t === s.first || t === e,
|
|
197
|
-
if (r2 && a2 || !r2 &&
|
|
196
|
+
const { activeElement: t } = document, { el: e, focusable: s } = this, r2 = n.shiftKey, a2 = t === s.first || t === e, o = t === s.last || t === e;
|
|
197
|
+
if (r2 && a2 || !r2 && o) {
|
|
198
198
|
n.preventDefault();
|
|
199
199
|
const i = r2 ? s.last : s.first;
|
|
200
200
|
i && typeof i.focus == "function" && i.focus();
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
~e && (this.splice(e, 1), this.add(t));
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
const N$
|
|
274
|
+
const N$1 = {
|
|
275
275
|
condition: true
|
|
276
276
|
}, Q = {
|
|
277
277
|
primary: "hsl(152deg 60% 50%)",
|
|
@@ -282,15 +282,15 @@
|
|
|
282
282
|
function Z(n = {}) {
|
|
283
283
|
const t = {
|
|
284
284
|
name: "debug",
|
|
285
|
-
defaults: N$
|
|
285
|
+
defaults: N$1,
|
|
286
286
|
options: n
|
|
287
287
|
};
|
|
288
|
-
function e(
|
|
289
|
-
const
|
|
290
|
-
console.log(`%c📡 DEBUG: %c${
|
|
288
|
+
function e(o, i = [], c2 = ["primary", "secondary"]) {
|
|
289
|
+
const l = c2.map((d2) => `color: ${Q[d2]}`);
|
|
290
|
+
console.log(`%c📡 DEBUG: %c${o}`, ...l, ...i);
|
|
291
291
|
}
|
|
292
|
-
function s(
|
|
293
|
-
return typeof
|
|
292
|
+
function s(o, ...i) {
|
|
293
|
+
return typeof o == "function" ? o(...i) : o;
|
|
294
294
|
}
|
|
295
295
|
const r2 = {
|
|
296
296
|
beforeMountRef: e.bind(null, "Event > beforeMount()"),
|
|
@@ -307,33 +307,33 @@
|
|
|
307
307
|
[],
|
|
308
308
|
["important", "neutral"]
|
|
309
309
|
),
|
|
310
|
-
createEntryRef: (
|
|
311
|
-
if (s(
|
|
312
|
-
const
|
|
313
|
-
e(`Event > createEntry() > [${
|
|
310
|
+
createEntryRef: (o, { parent: i, plugin: c2 }) => {
|
|
311
|
+
if (s(c2.settings.condition, o)) {
|
|
312
|
+
const l = i.collection.length;
|
|
313
|
+
e(`Event > createEntry() > [${l}] #${o.id}`);
|
|
314
314
|
}
|
|
315
315
|
},
|
|
316
|
-
registerEntryRef: (
|
|
317
|
-
if (s(
|
|
318
|
-
const
|
|
319
|
-
e(`Event > registerEntry() > [${
|
|
316
|
+
registerEntryRef: (o, { parent: i, plugin: c2 }) => {
|
|
317
|
+
if (s(c2.settings.condition, o)) {
|
|
318
|
+
const l = i.collection.length;
|
|
319
|
+
e(`Event > registerEntry() > [${l}] #${o.id}`);
|
|
320
320
|
}
|
|
321
321
|
},
|
|
322
|
-
destroyEntryRef: (
|
|
323
|
-
if (s(
|
|
324
|
-
const
|
|
322
|
+
destroyEntryRef: (o, { parent: i, plugin: c2 }) => {
|
|
323
|
+
if (s(c2.settings.condition, o)) {
|
|
324
|
+
const l = i.collection.length;
|
|
325
325
|
e(
|
|
326
|
-
`Event > destroyEntry() > [${
|
|
326
|
+
`Event > destroyEntry() > [${l}] #${o.id}`,
|
|
327
327
|
[],
|
|
328
328
|
["important", "neutral"]
|
|
329
329
|
);
|
|
330
330
|
}
|
|
331
331
|
},
|
|
332
|
-
deregisterEntryRef: (
|
|
333
|
-
if (s(
|
|
334
|
-
const
|
|
332
|
+
deregisterEntryRef: (o, { parent: i, plugin: c2 }) => {
|
|
333
|
+
if (s(c2.settings.condition, o)) {
|
|
334
|
+
const l = i.collection.length;
|
|
335
335
|
e(
|
|
336
|
-
`Event > deregisterEntry() > [${
|
|
336
|
+
`Event > deregisterEntry() > [${l}]`,
|
|
337
337
|
[],
|
|
338
338
|
["important", "neutral"]
|
|
339
339
|
);
|
|
@@ -342,39 +342,39 @@
|
|
|
342
342
|
};
|
|
343
343
|
return { ...t, ...{
|
|
344
344
|
// Plugin setup/teardown methods
|
|
345
|
-
setup({ parent:
|
|
346
|
-
e("Plugin > setup()", Array.from(arguments), ["secondary", "neutral"]),
|
|
347
|
-
parent:
|
|
345
|
+
setup({ parent: o }) {
|
|
346
|
+
e("Plugin > setup()", Array.from(arguments), ["secondary", "neutral"]), o.on("beforeMount", r2.beforeMountRef), o.on("createEntry", r2.createEntryRef, { parent: o, plugin: this }), o.on("registerEntry", r2.registerEntryRef, {
|
|
347
|
+
parent: o,
|
|
348
348
|
plugin: this
|
|
349
|
-
}),
|
|
350
|
-
parent:
|
|
349
|
+
}), o.on("afterMount", r2.afterMountRef), o.on("beforeUnmount", r2.beforeUnmountRef), o.on("destroyEntry", r2.destroyEntryRef, { parent: o, plugin: this }), o.on("deregisterEntry", r2.deregisterEntryRef, {
|
|
350
|
+
parent: o,
|
|
351
351
|
plugin: this
|
|
352
|
-
}),
|
|
352
|
+
}), o.on("afterUnmount", r2.afterUnmountRef);
|
|
353
353
|
},
|
|
354
|
-
teardown({ parent:
|
|
354
|
+
teardown({ parent: o }) {
|
|
355
355
|
e("Plugin > teardown()", Array.from(arguments), [
|
|
356
356
|
"secondary",
|
|
357
357
|
"neutral"
|
|
358
|
-
]),
|
|
358
|
+
]), o.off("beforeMount", r2.beforeMountRef), o.off("createEntry", r2.createEntryRef), o.off("registerEntry", r2.registerEntryRef), o.off("afterMount", r2.afterMountRef), o.off("beforeUnmount", r2.beforeUnmountRef), o.off("destroyEntry", r2.destroyEntryRef), o.off("deregisterEntry", r2.deregisterEntryRef), o.off("afterUnmount", r2.afterUnmountRef);
|
|
359
359
|
},
|
|
360
360
|
// Mount lifecycle hooks
|
|
361
361
|
beforeMount() {
|
|
362
362
|
e("Hook > beforeMount()", Array.from(arguments));
|
|
363
363
|
},
|
|
364
|
-
onCreateEntry({ parent:
|
|
364
|
+
onCreateEntry({ parent: o, entry: i }) {
|
|
365
365
|
if (s(this.settings.condition, i)) {
|
|
366
|
-
const
|
|
366
|
+
const c2 = o.collection.length;
|
|
367
367
|
e(
|
|
368
|
-
`Hook > onCreateEntry() > [${
|
|
368
|
+
`Hook > onCreateEntry() > [${c2}] #${i.id}`,
|
|
369
369
|
Array.from(arguments)
|
|
370
370
|
);
|
|
371
371
|
}
|
|
372
372
|
},
|
|
373
|
-
onRegisterEntry({ parent:
|
|
373
|
+
onRegisterEntry({ parent: o, entry: i }) {
|
|
374
374
|
if (s(this.settings.condition, i)) {
|
|
375
|
-
const
|
|
375
|
+
const c2 = o.collection.length - 1;
|
|
376
376
|
e(
|
|
377
|
-
`Hook > onRegisterEntry() > [${
|
|
377
|
+
`Hook > onRegisterEntry() > [${c2}] #${i.id}`,
|
|
378
378
|
Array.from(arguments)
|
|
379
379
|
);
|
|
380
380
|
}
|
|
@@ -389,20 +389,20 @@
|
|
|
389
389
|
"neutral"
|
|
390
390
|
]);
|
|
391
391
|
},
|
|
392
|
-
onDestroyEntry({ parent:
|
|
392
|
+
onDestroyEntry({ parent: o, entry: i }) {
|
|
393
393
|
if (s(this.settings.condition, i)) {
|
|
394
|
-
const
|
|
394
|
+
const c2 = o.collection.length - 1;
|
|
395
395
|
e(
|
|
396
|
-
`Hook > onDestroyEntry() > [${
|
|
396
|
+
`Hook > onDestroyEntry() > [${c2}] #${i.id}`,
|
|
397
397
|
Array.from(arguments),
|
|
398
398
|
["important", "neutral"]
|
|
399
399
|
);
|
|
400
400
|
}
|
|
401
401
|
},
|
|
402
|
-
onDeregisterEntry({ parent:
|
|
402
|
+
onDeregisterEntry({ parent: o, entry: i }) {
|
|
403
403
|
if (s(this.settings.condition, i)) {
|
|
404
|
-
const
|
|
405
|
-
e(`Hook > onDeregisterEntry() > [${
|
|
404
|
+
const c2 = o.collection.length;
|
|
405
|
+
e(`Hook > onDeregisterEntry() > [${c2}]`, Array.from(arguments), [
|
|
406
406
|
"important",
|
|
407
407
|
"neutral"
|
|
408
408
|
]);
|
|
@@ -425,30 +425,30 @@
|
|
|
425
425
|
defaults: q$3,
|
|
426
426
|
options: n
|
|
427
427
|
}, e = {
|
|
428
|
-
setup({ parent:
|
|
429
|
-
|
|
428
|
+
setup({ parent: o }) {
|
|
429
|
+
o.on("opened", r2, this), o.on("closed", a2, this);
|
|
430
430
|
},
|
|
431
|
-
teardown({ parent:
|
|
432
|
-
|
|
431
|
+
teardown({ parent: o }) {
|
|
432
|
+
o.off("opened", r2), o.off("closed", a2);
|
|
433
433
|
},
|
|
434
|
-
onCreateEntry({ entry:
|
|
435
|
-
|
|
434
|
+
onCreateEntry({ entry: o }) {
|
|
435
|
+
o.focusTrap = new U$2();
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
|
-
function s(
|
|
439
|
-
return typeof
|
|
438
|
+
function s(o, ...i) {
|
|
439
|
+
return typeof o == "function" ? o(...i) : o;
|
|
440
440
|
}
|
|
441
|
-
function r2(
|
|
442
|
-
const
|
|
443
|
-
s(i.settings.condition,
|
|
441
|
+
function r2(o, i) {
|
|
442
|
+
const c2 = { plugin: i, parent: o.parent, entry: o };
|
|
443
|
+
s(i.settings.condition, c2) && o.focusTrap?.on(o.dialog);
|
|
444
444
|
}
|
|
445
|
-
function a2(
|
|
446
|
-
const
|
|
447
|
-
s(i.settings.condition,
|
|
445
|
+
function a2(o, i) {
|
|
446
|
+
const c2 = { plugin: i, parent: o.parent, entry: o };
|
|
447
|
+
s(i.settings.condition, c2) && o.focusTrap?.off();
|
|
448
448
|
}
|
|
449
449
|
return { ...t, ...e };
|
|
450
450
|
}
|
|
451
|
-
const F$
|
|
451
|
+
const F$2 = {
|
|
452
452
|
// The data attributes to get the breakpoint values from
|
|
453
453
|
dataBreakpoint: "breakpoint",
|
|
454
454
|
// The data attributes to get the media query value from
|
|
@@ -476,7 +476,7 @@
|
|
|
476
476
|
function X$1(n = {}) {
|
|
477
477
|
const t = {
|
|
478
478
|
name: "mediaQuery",
|
|
479
|
-
defaults: F$
|
|
479
|
+
defaults: F$2,
|
|
480
480
|
options: n
|
|
481
481
|
}, e = {
|
|
482
482
|
// Run when an entry is created
|
|
@@ -487,28 +487,28 @@
|
|
|
487
487
|
// Run when an entry is destroyed
|
|
488
488
|
// Removes the MediaQueryList and event listener
|
|
489
489
|
onDestroyEntry({ entry: i }) {
|
|
490
|
-
|
|
490
|
+
o(i);
|
|
491
491
|
}
|
|
492
492
|
};
|
|
493
493
|
function s(i) {
|
|
494
|
-
const
|
|
495
|
-
return !
|
|
494
|
+
const c2 = i.el.getAttribute(`data-${this.settings.dataMediaQuery}`);
|
|
495
|
+
return !c2 && i.id in this.settings.mediaQueries ? this.settings.mediaQueries[i.id] : c2 || void 0;
|
|
496
496
|
}
|
|
497
497
|
function r2(i) {
|
|
498
|
-
let
|
|
499
|
-
return !
|
|
498
|
+
let c2 = i.el.getAttribute(`data-${this.settings.dataBreakpoint}`);
|
|
499
|
+
return !c2 && i.id in this.settings.breakpoints && (c2 = this.settings.breakpoints[i.id]), c2 && c2 in this.settings.breakpoints && (c2 = this.settings.breakpoints[c2]), c2 && (c2 = getComputedStyle(document.body).getPropertyValue(`--${y$2()}breakpoint-${c2}`).trim() || c2), c2 || this.settings.breakpoint;
|
|
500
500
|
}
|
|
501
501
|
function a2(i) {
|
|
502
|
-
let
|
|
503
|
-
const
|
|
504
|
-
if (!
|
|
505
|
-
|
|
506
|
-
const d2 =
|
|
502
|
+
let c2 = s.call(this, i);
|
|
503
|
+
const l = r2.call(this, i);
|
|
504
|
+
if (!l && !c2) return;
|
|
505
|
+
l && !c2 && (c2 = this.settings.mediaQuery);
|
|
506
|
+
const d2 = c2.replace(new RegExp(`${this.settings.token}`, "g"), l);
|
|
507
507
|
i.mql = window.matchMedia(d2), i.mql.onchange = (p2) => {
|
|
508
508
|
this.settings.onChange(p2, i);
|
|
509
509
|
}, this.settings.onChange(i.mql, i);
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function o(i) {
|
|
512
512
|
i.mql && (i.mql.onchange = null, i.mql = null);
|
|
513
513
|
}
|
|
514
514
|
return { ...t, ...e };
|
|
@@ -537,7 +537,7 @@
|
|
|
537
537
|
store: null
|
|
538
538
|
}, e = {
|
|
539
539
|
setup({ parent: i }) {
|
|
540
|
-
this.store = w$2(
|
|
540
|
+
this.store = w$2(o.call(this, i.module));
|
|
541
541
|
},
|
|
542
542
|
async onCreateEntry({ entry: i }) {
|
|
543
543
|
await s.call(this, i);
|
|
@@ -547,22 +547,22 @@
|
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
549
|
async function s(i) {
|
|
550
|
-
let
|
|
551
|
-
const
|
|
550
|
+
let c2 = i[this.settings.prop] || null;
|
|
551
|
+
const l = { plugin: this, parent: i.parent, entry: i };
|
|
552
552
|
Object.defineProperty(i, this.settings.prop, {
|
|
553
553
|
configurable: true,
|
|
554
554
|
get() {
|
|
555
|
-
return
|
|
555
|
+
return c2;
|
|
556
556
|
},
|
|
557
557
|
set: async (d2) => {
|
|
558
|
-
if (
|
|
559
|
-
const p2 =
|
|
560
|
-
|
|
558
|
+
if (c2 === d2) return;
|
|
559
|
+
const p2 = c2;
|
|
560
|
+
c2 = d2, r2(
|
|
561
561
|
this.settings.condition,
|
|
562
|
-
|
|
562
|
+
l,
|
|
563
563
|
d2,
|
|
564
564
|
p2
|
|
565
|
-
) && this.store.set(i.id, d2), await this.settings.onChange(
|
|
565
|
+
) && this.store.set(i.id, d2), await this.settings.onChange(l, d2, p2);
|
|
566
566
|
}
|
|
567
567
|
}), Object.defineProperty(i, "store", {
|
|
568
568
|
configurable: true,
|
|
@@ -570,18 +570,18 @@
|
|
|
570
570
|
set: (d2) => {
|
|
571
571
|
i[this.settings.prop] = d2;
|
|
572
572
|
}
|
|
573
|
-
}), i[this.settings.prop] = await r2(this.settings.value,
|
|
573
|
+
}), i[this.settings.prop] = await r2(this.settings.value, l) || i[this.settings.prop];
|
|
574
574
|
}
|
|
575
|
-
function r2(i, ...
|
|
576
|
-
return typeof i == "function" ? i(...
|
|
575
|
+
function r2(i, ...c2) {
|
|
576
|
+
return typeof i == "function" ? i(...c2) : i;
|
|
577
577
|
}
|
|
578
578
|
async function a2(i) {
|
|
579
|
-
const
|
|
580
|
-
delete i[this.settings.prop], i[this.settings.prop] =
|
|
579
|
+
const c2 = i[this.settings.prop];
|
|
580
|
+
delete i[this.settings.prop], i[this.settings.prop] = c2, this.store.set(i.id, null);
|
|
581
581
|
}
|
|
582
|
-
function
|
|
583
|
-
const
|
|
584
|
-
return this.settings.keyPrefix +
|
|
582
|
+
function o(i) {
|
|
583
|
+
const c2 = this.settings.prop.charAt(0).toUpperCase() + this.settings.prop.slice(1), l = this.settings.key || i + c2;
|
|
584
|
+
return this.settings.keyPrefix + l;
|
|
585
585
|
}
|
|
586
586
|
return { ...t, ...e };
|
|
587
587
|
}
|
|
@@ -595,27 +595,27 @@
|
|
|
595
595
|
defaults: B,
|
|
596
596
|
options: n
|
|
597
597
|
}, e = {
|
|
598
|
-
onCreateEntry({ plugin: a2, entry:
|
|
599
|
-
s(a2,
|
|
598
|
+
onCreateEntry({ plugin: a2, entry: o }) {
|
|
599
|
+
s(a2, o);
|
|
600
600
|
},
|
|
601
|
-
onDestroyEntry({ plugin: a2, entry:
|
|
602
|
-
r2(a2,
|
|
601
|
+
onDestroyEntry({ plugin: a2, entry: o }) {
|
|
602
|
+
r2(a2, o);
|
|
603
603
|
}
|
|
604
604
|
};
|
|
605
|
-
function s(a2,
|
|
606
|
-
|
|
607
|
-
typeof
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
605
|
+
function s(a2, o) {
|
|
606
|
+
o.teleport = () => {
|
|
607
|
+
typeof o.teleportReturn == "function" && o.teleportReturn(), o.teleportReturn = x$2(
|
|
608
|
+
o.el,
|
|
609
|
+
o.getSetting("teleport", { fallback: a2.settings.where }),
|
|
610
|
+
o.getSetting("teleportMethod", { fallback: a2.settings.how })
|
|
611
611
|
);
|
|
612
|
-
},
|
|
612
|
+
}, o.teleport(), o.parent.emit("teleport", { plugin: a2, parent: o.parent, entry: o });
|
|
613
613
|
}
|
|
614
|
-
function r2(a2,
|
|
615
|
-
typeof
|
|
614
|
+
function r2(a2, o) {
|
|
615
|
+
typeof o.teleportReturn == "function" && o.teleportReturn(), o.parent.emit("teleportReturn", {
|
|
616
616
|
plugin: a2,
|
|
617
|
-
parent:
|
|
618
|
-
entry:
|
|
617
|
+
parent: o.parent,
|
|
618
|
+
entry: o
|
|
619
619
|
});
|
|
620
620
|
}
|
|
621
621
|
return { ...t, ...e };
|
|
@@ -624,7 +624,7 @@
|
|
|
624
624
|
dataConfig: "config",
|
|
625
625
|
customProps: []
|
|
626
626
|
};
|
|
627
|
-
let z$
|
|
627
|
+
let z$2 = class z {
|
|
628
628
|
constructor(t, e, s = {}) {
|
|
629
629
|
this.parent = t, this.el = E$3(e), this.settings = { ...s }, this.dataConfig = {}, this.customProps = {};
|
|
630
630
|
}
|
|
@@ -640,7 +640,7 @@
|
|
|
640
640
|
buildDataConfig() {
|
|
641
641
|
return Object.assign(
|
|
642
642
|
this.dataConfig,
|
|
643
|
-
|
|
643
|
+
k$3(this.el, this.getSetting("dataConfig"))
|
|
644
644
|
);
|
|
645
645
|
}
|
|
646
646
|
buildCustomProps() {
|
|
@@ -657,11 +657,19 @@
|
|
|
657
657
|
};
|
|
658
658
|
let et$1 = class et {
|
|
659
659
|
constructor(t = {}) {
|
|
660
|
-
this.module = this.constructor.name, this.collection = [], this.entryClass = z$
|
|
660
|
+
this.module = this.constructor.name, this.collection = [], this.entryClass = z$2, this.settings = { ...j$3, ...t }, this.plugins = new H$3(this.settings.presets), this.events = {}, Object.assign(this, L$2);
|
|
661
661
|
}
|
|
662
662
|
get(t, e = "id") {
|
|
663
663
|
return this.collection.find((s) => s[e] === t);
|
|
664
664
|
}
|
|
665
|
+
getOrThrow(t, e = "id") {
|
|
666
|
+
const s = this.get(t, e);
|
|
667
|
+
if (s)
|
|
668
|
+
return s;
|
|
669
|
+
throw new Error(
|
|
670
|
+
`${this.module} entry not found in collection with ${e} of "${t}"`
|
|
671
|
+
);
|
|
672
|
+
}
|
|
665
673
|
applySettings(t) {
|
|
666
674
|
return Object.assign(this.settings, t);
|
|
667
675
|
}
|
|
@@ -741,8 +749,8 @@
|
|
|
741
749
|
t.themes.push(a2);
|
|
742
750
|
},
|
|
743
751
|
remove(a2) {
|
|
744
|
-
const
|
|
745
|
-
~
|
|
752
|
+
const o = t.themes.indexOf(a2);
|
|
753
|
+
~o && t.themes.splice(o, 1);
|
|
746
754
|
},
|
|
747
755
|
callback(a2) {
|
|
748
756
|
e[a2].call(this);
|
|
@@ -770,7 +778,7 @@
|
|
|
770
778
|
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
771
779
|
__proto__: null,
|
|
772
780
|
Collection: et$1,
|
|
773
|
-
CollectionEntry: z$
|
|
781
|
+
CollectionEntry: z$2,
|
|
774
782
|
FocusTrap: U$2,
|
|
775
783
|
FocusableArray: O$2,
|
|
776
784
|
PluginsArray: H$3,
|
|
@@ -780,9 +788,9 @@
|
|
|
780
788
|
dispatchLifecycleHook: h$1,
|
|
781
789
|
eventEmitter: L$2,
|
|
782
790
|
focusTrap: _$1,
|
|
783
|
-
focusableSelectors:
|
|
791
|
+
focusableSelectors: C$2,
|
|
784
792
|
getCustomProps: M$2,
|
|
785
|
-
getDataConfig:
|
|
793
|
+
getDataConfig: k$3,
|
|
786
794
|
getElement: E$3,
|
|
787
795
|
getPrefix: y$2,
|
|
788
796
|
getSetting: A$2,
|
|
@@ -799,11 +807,11 @@
|
|
|
799
807
|
toMilliseconds: S$2,
|
|
800
808
|
transition: J$1
|
|
801
809
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
802
|
-
function
|
|
810
|
+
function E$2(t, e = "config") {
|
|
803
811
|
const s = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
|
|
804
812
|
return s ? JSON.parse(s) : {};
|
|
805
813
|
}
|
|
806
|
-
function
|
|
814
|
+
function f$1(t) {
|
|
807
815
|
if (typeof t == "string") {
|
|
808
816
|
const e = document.getElementById(t);
|
|
809
817
|
if (e) return e;
|
|
@@ -818,15 +826,15 @@
|
|
|
818
826
|
async function r$1(t, e, ...s) {
|
|
819
827
|
e in t && typeof t[e] == "function" && await t[e](...s);
|
|
820
828
|
}
|
|
821
|
-
function
|
|
829
|
+
function b$1(t) {
|
|
822
830
|
return t.split("-").map(
|
|
823
831
|
(e, s) => s === 0 ? e : e.charAt(0).toUpperCase() + e.slice(1)
|
|
824
832
|
).join("");
|
|
825
833
|
}
|
|
826
|
-
function
|
|
834
|
+
function p$1(t) {
|
|
827
835
|
return t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
828
836
|
}
|
|
829
|
-
function
|
|
837
|
+
function C$1(t) {
|
|
830
838
|
if (typeof t == "number")
|
|
831
839
|
return t;
|
|
832
840
|
const e = parseFloat(t);
|
|
@@ -836,14 +844,14 @@
|
|
|
836
844
|
}
|
|
837
845
|
throw new Error(`Could not convert value to milliseconds: ${t}`);
|
|
838
846
|
}
|
|
839
|
-
function
|
|
840
|
-
return new Promise((
|
|
847
|
+
function m$1(t, e, s, i, n = 0) {
|
|
848
|
+
return new Promise((o) => {
|
|
841
849
|
t.classList.remove(e), t.classList.add(s), setTimeout(() => {
|
|
842
|
-
t.classList.add(i), t.classList.remove(s),
|
|
843
|
-
},
|
|
850
|
+
t.classList.add(i), t.classList.remove(s), o(t);
|
|
851
|
+
}, C$1(n));
|
|
844
852
|
});
|
|
845
853
|
}
|
|
846
|
-
async function
|
|
854
|
+
async function a$1(t, e, s) {
|
|
847
855
|
await r$1(e, t, s), s && await r$1(s, t);
|
|
848
856
|
for (const i of e.plugins)
|
|
849
857
|
await r$1(i, t, { plugin: i, parent: e, entry: s });
|
|
@@ -852,45 +860,45 @@
|
|
|
852
860
|
function O$1(t) {
|
|
853
861
|
const e = getComputedStyle(t.el), s = {}, i = t.getSetting("customProps");
|
|
854
862
|
for (let n = 0; n < i.length; n++) {
|
|
855
|
-
const
|
|
856
|
-
|
|
863
|
+
const o = L$1(), l = t.parent.module.toLowerCase(), h2 = p$1(i[n]), u2 = e.getPropertyValue(`--${o}${l}-${h2}`).trim();
|
|
864
|
+
u2 && (s[h2] = u2);
|
|
857
865
|
}
|
|
858
866
|
return s;
|
|
859
867
|
}
|
|
860
|
-
function
|
|
868
|
+
function L$1() {
|
|
861
869
|
return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
|
|
862
870
|
}
|
|
863
871
|
function $$1(t, e, s = "camel") {
|
|
864
|
-
return e = s === "camel" ?
|
|
872
|
+
return e = s === "camel" ? b$1(e) : p$1(e), t.split(".").concat(e).reduce((i, n) => i?.[n], this);
|
|
865
873
|
}
|
|
866
|
-
function
|
|
874
|
+
function M$1(t, e = {}) {
|
|
867
875
|
const {
|
|
868
876
|
fallback: s,
|
|
869
877
|
props: i = ["dataConfig", "customProps", "settings", "parent.settings"]
|
|
870
878
|
} = e;
|
|
871
879
|
for (const n of i) {
|
|
872
|
-
const
|
|
873
|
-
if (
|
|
874
|
-
return
|
|
880
|
+
const o = n !== "customProps" ? "camel" : "kebab", l = $$1.call(this, n, t, o);
|
|
881
|
+
if (l !== void 0)
|
|
882
|
+
return l;
|
|
875
883
|
}
|
|
876
884
|
if (s !== void 0)
|
|
877
885
|
return s;
|
|
878
886
|
throw new Error(`${this.parent.module} setting does not exist: ${t}`);
|
|
879
887
|
}
|
|
880
|
-
function
|
|
888
|
+
function P$2(t, e) {
|
|
881
889
|
e && document.querySelectorAll(e).forEach((s) => {
|
|
882
890
|
t ? s.style.overflow = "hidden" : s.style.removeProperty("overflow");
|
|
883
891
|
});
|
|
884
892
|
}
|
|
885
|
-
function
|
|
893
|
+
function T$2(t, e) {
|
|
886
894
|
e && document.querySelectorAll(e).forEach((s) => {
|
|
887
|
-
|
|
895
|
+
s.inert = t;
|
|
888
896
|
});
|
|
889
897
|
}
|
|
890
|
-
function
|
|
891
|
-
|
|
898
|
+
function c$1(t, e, s) {
|
|
899
|
+
T$2(!!t, e), P$2(!!t, s);
|
|
892
900
|
}
|
|
893
|
-
const
|
|
901
|
+
const x$1 = {
|
|
894
902
|
events: {},
|
|
895
903
|
on(t, e, ...s) {
|
|
896
904
|
this.events[t] || (this.events[t] = []), this.events[t].some(
|
|
@@ -935,13 +943,13 @@
|
|
|
935
943
|
~s && this.splice(s, 1);
|
|
936
944
|
}
|
|
937
945
|
};
|
|
938
|
-
const
|
|
946
|
+
const A$1 = {
|
|
939
947
|
dataConfig: "config",
|
|
940
948
|
customProps: []
|
|
941
949
|
};
|
|
942
|
-
let
|
|
950
|
+
let w$1 = class w {
|
|
943
951
|
constructor(e, s, i = {}) {
|
|
944
|
-
this.parent = e, this.el =
|
|
952
|
+
this.parent = e, this.el = f$1(s), this.settings = { ...i }, this.dataConfig = {}, this.customProps = {};
|
|
945
953
|
}
|
|
946
954
|
get id() {
|
|
947
955
|
return this.el.id;
|
|
@@ -950,12 +958,12 @@
|
|
|
950
958
|
return Object.assign(this.settings, e);
|
|
951
959
|
}
|
|
952
960
|
getSetting(e, s) {
|
|
953
|
-
return
|
|
961
|
+
return M$1.call(this, e, s);
|
|
954
962
|
}
|
|
955
963
|
buildDataConfig() {
|
|
956
964
|
return Object.assign(
|
|
957
965
|
this.dataConfig,
|
|
958
|
-
|
|
966
|
+
E$2(this.el, this.getSetting("dataConfig"))
|
|
959
967
|
);
|
|
960
968
|
}
|
|
961
969
|
buildCustomProps() {
|
|
@@ -970,38 +978,46 @@
|
|
|
970
978
|
});
|
|
971
979
|
}
|
|
972
980
|
};
|
|
973
|
-
let
|
|
981
|
+
let D$2 = class D {
|
|
974
982
|
constructor(e = {}) {
|
|
975
|
-
this.module = this.constructor.name, this.collection = [], this.entryClass =
|
|
983
|
+
this.module = this.constructor.name, this.collection = [], this.entryClass = w$1, this.settings = { ...A$1, ...e }, this.plugins = new y$1(this.settings.presets), this.events = {}, Object.assign(this, x$1);
|
|
976
984
|
}
|
|
977
985
|
get(e, s = "id") {
|
|
978
986
|
return this.collection.find((i) => i[s] === e);
|
|
979
987
|
}
|
|
988
|
+
getOrThrow(e, s = "id") {
|
|
989
|
+
const i = this.get(e, s);
|
|
990
|
+
if (i)
|
|
991
|
+
return i;
|
|
992
|
+
throw new Error(
|
|
993
|
+
`${this.module} entry not found in collection with ${s} of "${e}"`
|
|
994
|
+
);
|
|
995
|
+
}
|
|
980
996
|
applySettings(e) {
|
|
981
997
|
return Object.assign(this.settings, e);
|
|
982
998
|
}
|
|
983
999
|
async createEntry(e, s) {
|
|
984
1000
|
const i = new this.entryClass(this, e, s);
|
|
985
|
-
return await r$1(i, "init"), await
|
|
1001
|
+
return await r$1(i, "init"), await a$1("onCreateEntry", this, i), i;
|
|
986
1002
|
}
|
|
987
1003
|
async destroyEntry(e) {
|
|
988
|
-
return await
|
|
1004
|
+
return await a$1("onDestroyEntry", this, e), await r$1(e, "destroy"), e;
|
|
989
1005
|
}
|
|
990
1006
|
async register(e, s = {}) {
|
|
991
|
-
const i =
|
|
1007
|
+
const i = f$1(e), n = this.collection.findIndex((o) => o.id === i.id);
|
|
992
1008
|
if (~n) {
|
|
993
|
-
const
|
|
994
|
-
return
|
|
1009
|
+
const o = this.collection[n];
|
|
1010
|
+
return o.el = i, typeof o.init == "function" && await o.init(s), o;
|
|
995
1011
|
} else {
|
|
996
|
-
const
|
|
997
|
-
return this.collection.push(
|
|
1012
|
+
const o = await this.createEntry(i, s);
|
|
1013
|
+
return this.collection.push(o), await a$1("onRegisterEntry", this, o), o;
|
|
998
1014
|
}
|
|
999
1015
|
}
|
|
1000
1016
|
async deregister(e) {
|
|
1001
1017
|
const s = this.collection.findIndex((i) => i.id === e);
|
|
1002
1018
|
if (~s) {
|
|
1003
1019
|
const i = await this.destroyEntry(this.collection[s]);
|
|
1004
|
-
return await
|
|
1020
|
+
return await a$1(
|
|
1005
1021
|
"onDeregisterEntry",
|
|
1006
1022
|
this,
|
|
1007
1023
|
this.collection[s]
|
|
@@ -1015,16 +1031,16 @@
|
|
|
1015
1031
|
this.plugins.add(i);
|
|
1016
1032
|
for (const i of this.plugins)
|
|
1017
1033
|
await r$1(i, "setup", { plugin: i, parent: this });
|
|
1018
|
-
await
|
|
1034
|
+
await a$1("beforeMount", this);
|
|
1019
1035
|
const s = document.querySelectorAll(this.settings.selector);
|
|
1020
1036
|
for (const i of s)
|
|
1021
1037
|
await this.register(i);
|
|
1022
|
-
return await
|
|
1038
|
+
return await a$1("afterMount", this), this;
|
|
1023
1039
|
}
|
|
1024
1040
|
async unmount() {
|
|
1025
|
-
for (await
|
|
1041
|
+
for (await a$1("beforeUnmount", this); this.collection.length > 0; )
|
|
1026
1042
|
await this.deregister(this.collection[0].id);
|
|
1027
|
-
await
|
|
1043
|
+
await a$1("afterUnmount", this);
|
|
1028
1044
|
for (const e of this.plugins)
|
|
1029
1045
|
await r$1(e, "teardown", { plugin: e, parent: this });
|
|
1030
1046
|
for (const e of [...this.plugins])
|
|
@@ -1032,7 +1048,7 @@
|
|
|
1032
1048
|
return this;
|
|
1033
1049
|
}
|
|
1034
1050
|
};
|
|
1035
|
-
const
|
|
1051
|
+
const I$2 = {
|
|
1036
1052
|
focusTrap: {
|
|
1037
1053
|
condition: ({ entry: t }) => t.state === "closed" || t.state === "opened" && t.mode === "modal"
|
|
1038
1054
|
},
|
|
@@ -1047,8 +1063,8 @@
|
|
|
1047
1063
|
condition: ({ entry: t }) => ["opened", "closed", "indeterminate"].includes(t.state),
|
|
1048
1064
|
onChange: ({ entry: t }) => t.applyState()
|
|
1049
1065
|
}
|
|
1050
|
-
},
|
|
1051
|
-
presets:
|
|
1066
|
+
}, k$2 = {
|
|
1067
|
+
presets: I$2,
|
|
1052
1068
|
dataOpen: "drawer-open",
|
|
1053
1069
|
dataClose: "drawer-close",
|
|
1054
1070
|
dataToggle: "drawer-toggle",
|
|
@@ -1070,18 +1086,18 @@
|
|
|
1070
1086
|
transition: true,
|
|
1071
1087
|
transitionDuration: 300
|
|
1072
1088
|
};
|
|
1073
|
-
function
|
|
1089
|
+
function j$2(t) {
|
|
1074
1090
|
switch (t.mode) {
|
|
1075
1091
|
case "inline":
|
|
1076
|
-
return
|
|
1092
|
+
return q$2(t);
|
|
1077
1093
|
case "modal":
|
|
1078
|
-
return
|
|
1094
|
+
return H$2(t);
|
|
1079
1095
|
default:
|
|
1080
1096
|
throw new Error(`"${t.mode}" is not a valid drawer mode.`);
|
|
1081
1097
|
}
|
|
1082
1098
|
}
|
|
1083
|
-
async function
|
|
1084
|
-
return t.el.classList.remove(t.getSetting("classModal")), t.dialog.removeAttribute("aria-modal"),
|
|
1099
|
+
async function q$2(t) {
|
|
1100
|
+
return t.el.classList.remove(t.getSetting("classModal")), t.dialog.removeAttribute("aria-modal"), c$1(
|
|
1085
1101
|
false,
|
|
1086
1102
|
t.getSetting("selectorInert"),
|
|
1087
1103
|
t.getSetting("selectorOverflow")
|
|
@@ -1092,7 +1108,7 @@
|
|
|
1092
1108
|
})
|
|
1093
1109
|
), await t.parent.emit("switchMode", t), t;
|
|
1094
1110
|
}
|
|
1095
|
-
async function
|
|
1111
|
+
async function H$2(t) {
|
|
1096
1112
|
return t.el.classList.add(t.getSetting("classModal")), t.dialog.setAttribute("aria-modal", "true"), await t.close(false, false), t.el.dispatchEvent(
|
|
1097
1113
|
new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
|
|
1098
1114
|
detail: t.parent,
|
|
@@ -1100,21 +1116,21 @@
|
|
|
1100
1116
|
})
|
|
1101
1117
|
), await t.parent.emit("switchMode", t), t;
|
|
1102
1118
|
}
|
|
1103
|
-
function
|
|
1119
|
+
function S$1(t) {
|
|
1104
1120
|
t.dialog && t.state === "opened" ? (t.dialog.querySelector(t.parent.settings.selectorFocus) || t.dialog).focus() : t.trigger && (t.trigger.focus(), t.trigger = null);
|
|
1105
1121
|
}
|
|
1106
|
-
async function
|
|
1107
|
-
return (t.state === "closed" || t.state === "indeterminate" || t.state === null) && (t.setState("opening"), e ?? t.getSetting("transition") ? await
|
|
1122
|
+
async function d$1(t, e, s = true) {
|
|
1123
|
+
return (t.state === "closed" || t.state === "indeterminate" || t.state === null) && (t.setState("opening"), e ?? t.getSetting("transition") ? await m$1(
|
|
1108
1124
|
t.el,
|
|
1109
1125
|
t.getSetting("stateClosed"),
|
|
1110
1126
|
t.getSetting("stateOpening"),
|
|
1111
1127
|
t.getSetting("stateOpened"),
|
|
1112
1128
|
t.getSetting("transitionDuration")
|
|
1113
|
-
) : (t.el.classList.add(t.getSetting("stateOpened")), t.el.classList.remove(t.getSetting("stateClosed"))), t.setState("opened"), t.mode === "modal" &&
|
|
1129
|
+
) : (t.el.classList.add(t.getSetting("stateOpened")), t.el.classList.remove(t.getSetting("stateClosed"))), t.setState("opened"), t.mode === "modal" && c$1(
|
|
1114
1130
|
true,
|
|
1115
1131
|
t.getSetting("selectorInert"),
|
|
1116
1132
|
t.getSetting("selectorOverflow")
|
|
1117
|
-
), s &&
|
|
1133
|
+
), s && S$1(t), t.el.dispatchEvent(
|
|
1118
1134
|
new CustomEvent(t.getSetting("customEventPrefix") + "opened", {
|
|
1119
1135
|
detail: t.parent,
|
|
1120
1136
|
bubbles: true
|
|
@@ -1122,27 +1138,27 @@
|
|
|
1122
1138
|
), await t.parent.emit("opened", t)), t;
|
|
1123
1139
|
}
|
|
1124
1140
|
async function g(t, e, s = true) {
|
|
1125
|
-
return (t.state === "opened" || t.state === "indeterminate" || t.state === null) && (t.setState("closing"), document.activeElement && document.activeElement instanceof HTMLElement && document.activeElement.blur(), e ?? t.getSetting("transition") ? await
|
|
1141
|
+
return (t.state === "opened" || t.state === "indeterminate" || t.state === null) && (t.setState("closing"), document.activeElement && document.activeElement instanceof HTMLElement && document.activeElement.blur(), e ?? t.getSetting("transition") ? await m$1(
|
|
1126
1142
|
t.el,
|
|
1127
1143
|
t.getSetting("stateOpened"),
|
|
1128
1144
|
t.getSetting("stateClosing"),
|
|
1129
1145
|
t.getSetting("stateClosed"),
|
|
1130
1146
|
t.getSetting("transitionDuration")
|
|
1131
|
-
) : (t.el.classList.add(t.getSetting("stateClosed")), t.el.classList.remove(t.getSetting("stateOpened"))), t.setState("closed"), t.mode === "modal" &&
|
|
1147
|
+
) : (t.el.classList.add(t.getSetting("stateClosed")), t.el.classList.remove(t.getSetting("stateOpened"))), t.setState("closed"), t.mode === "modal" && c$1(
|
|
1132
1148
|
false,
|
|
1133
1149
|
t.getSetting("selectorInert"),
|
|
1134
1150
|
t.getSetting("selectorOverflow")
|
|
1135
|
-
), s &&
|
|
1151
|
+
), s && S$1(t), t.el.dispatchEvent(
|
|
1136
1152
|
new CustomEvent(t.getSetting("customEventPrefix") + "closed", {
|
|
1137
1153
|
detail: t.parent,
|
|
1138
1154
|
bubbles: true
|
|
1139
1155
|
})
|
|
1140
1156
|
), await t.parent.emit("closed", t)), t;
|
|
1141
1157
|
}
|
|
1142
|
-
async function
|
|
1143
|
-
return t.state === "closed" ?
|
|
1158
|
+
async function v$1(t, e, s) {
|
|
1159
|
+
return t.state === "closed" ? d$1(t, e, s) : g(t, e, s);
|
|
1144
1160
|
}
|
|
1145
|
-
class
|
|
1161
|
+
class N extends w$1 {
|
|
1146
1162
|
#t;
|
|
1147
1163
|
constructor(e, s, i = {}) {
|
|
1148
1164
|
super(e, s, i), this.#t = "indeterminate", this.dialog = this.el.querySelector(this.getSetting("selectorDialog")) || this.el, this.trigger = null, this.state = null, this.inlineState = null;
|
|
@@ -1151,7 +1167,7 @@
|
|
|
1151
1167
|
return this.#t;
|
|
1152
1168
|
}
|
|
1153
1169
|
set mode(e) {
|
|
1154
|
-
this.#t !== e && (this.#t = e,
|
|
1170
|
+
this.#t !== e && (this.#t = e, j$2(this));
|
|
1155
1171
|
}
|
|
1156
1172
|
setState(e) {
|
|
1157
1173
|
this.state = e;
|
|
@@ -1173,13 +1189,13 @@
|
|
|
1173
1189
|
return this.setState("indeterminate"), this;
|
|
1174
1190
|
}
|
|
1175
1191
|
async open(e, s) {
|
|
1176
|
-
return
|
|
1192
|
+
return d$1(this, e, s);
|
|
1177
1193
|
}
|
|
1178
1194
|
async close(e, s) {
|
|
1179
1195
|
return g(this, e, s);
|
|
1180
1196
|
}
|
|
1181
1197
|
async toggle(e, s) {
|
|
1182
|
-
return
|
|
1198
|
+
return v$1(this, e, s);
|
|
1183
1199
|
}
|
|
1184
1200
|
async deregister() {
|
|
1185
1201
|
return this.parent.deregister(this.id);
|
|
@@ -1191,13 +1207,7 @@
|
|
|
1191
1207
|
this.mode === "modal" && this.state === "opened" && await this.close(false);
|
|
1192
1208
|
}
|
|
1193
1209
|
}
|
|
1194
|
-
function
|
|
1195
|
-
const e = this.get(t);
|
|
1196
|
-
if (e)
|
|
1197
|
-
return e;
|
|
1198
|
-
throw new Error(`Drawer not found in collection with id of "${t}"`);
|
|
1199
|
-
}
|
|
1200
|
-
async function U$1(t) {
|
|
1210
|
+
async function F$1(t) {
|
|
1201
1211
|
const e = t.target;
|
|
1202
1212
|
if (e) {
|
|
1203
1213
|
const s = e.closest(`
|
|
@@ -1207,18 +1217,18 @@
|
|
|
1207
1217
|
`);
|
|
1208
1218
|
if (s) {
|
|
1209
1219
|
t.preventDefault(), s.matches(`[data-${this.settings.dataToggle}]`) && s.getAttribute(`data-${this.settings.dataToggle}`)?.trim().split(" ")?.forEach((n) => {
|
|
1210
|
-
const
|
|
1211
|
-
return
|
|
1220
|
+
const o = this.getOrThrow(n);
|
|
1221
|
+
return o.trigger = s, o.toggle();
|
|
1212
1222
|
}), s.matches(`[data-${this.settings.dataOpen}]`) && s.getAttribute(`data-${this.settings.dataOpen}`)?.trim().split(" ")?.forEach((n) => {
|
|
1213
|
-
const
|
|
1214
|
-
return
|
|
1223
|
+
const o = this.getOrThrow(n);
|
|
1224
|
+
return o.trigger = s, o.open();
|
|
1215
1225
|
}), s.matches(`[data-${this.settings.dataClose}]`) && s.getAttribute(`data-${this.settings.dataClose}`)?.trim().split(" ")?.forEach((n) => {
|
|
1216
1226
|
if (n) {
|
|
1217
|
-
const
|
|
1218
|
-
return
|
|
1227
|
+
const o = this.getOrThrow(n);
|
|
1228
|
+
return o.trigger = s, o.close();
|
|
1219
1229
|
} else {
|
|
1220
|
-
const
|
|
1221
|
-
if (
|
|
1230
|
+
const o = e.closest(this.settings.selector);
|
|
1231
|
+
if (o) return this.close(o.id);
|
|
1222
1232
|
}
|
|
1223
1233
|
});
|
|
1224
1234
|
return;
|
|
@@ -1227,30 +1237,30 @@
|
|
|
1227
1237
|
return this.close(this.activeModal.id);
|
|
1228
1238
|
}
|
|
1229
1239
|
}
|
|
1230
|
-
function
|
|
1240
|
+
function U$1(t) {
|
|
1231
1241
|
if (t.key === "Escape" && this.activeModal)
|
|
1232
1242
|
return this.close(this.activeModal.id);
|
|
1233
1243
|
}
|
|
1234
|
-
|
|
1244
|
+
class _ extends D$2 {
|
|
1235
1245
|
#t;
|
|
1236
1246
|
#e;
|
|
1237
1247
|
constructor(e) {
|
|
1238
|
-
super({ ...
|
|
1248
|
+
super({ ...k$2, ...e }), this.module = "Drawer", this.entryClass = N, this.#t = F$1.bind(this), this.#e = U$1.bind(this);
|
|
1239
1249
|
}
|
|
1240
1250
|
get activeModal() {
|
|
1241
1251
|
return this.collection.find((e) => e.state === "opened" && e.mode === "modal");
|
|
1242
1252
|
}
|
|
1243
1253
|
async open(e, s, i) {
|
|
1244
|
-
const n =
|
|
1245
|
-
return
|
|
1254
|
+
const n = this.getOrThrow(e);
|
|
1255
|
+
return d$1(n, s, i);
|
|
1246
1256
|
}
|
|
1247
1257
|
async close(e, s, i) {
|
|
1248
|
-
const n =
|
|
1258
|
+
const n = this.getOrThrow(e);
|
|
1249
1259
|
return g(n, s, i);
|
|
1250
1260
|
}
|
|
1251
1261
|
async toggle(e, s, i) {
|
|
1252
|
-
const n =
|
|
1253
|
-
return
|
|
1262
|
+
const n = this.getOrThrow(e);
|
|
1263
|
+
return v$1(n, s, i);
|
|
1254
1264
|
}
|
|
1255
1265
|
async afterMount() {
|
|
1256
1266
|
document.addEventListener("click", this.#t, false), document.addEventListener("keydown", this.#e, false);
|
|
@@ -1258,12 +1268,12 @@
|
|
|
1258
1268
|
async afterUnmount() {
|
|
1259
1269
|
document.removeEventListener("click", this.#t, false), document.removeEventListener("keydown", this.#e, false);
|
|
1260
1270
|
}
|
|
1261
|
-
}
|
|
1262
|
-
function
|
|
1271
|
+
}
|
|
1272
|
+
function y(e, t = "config") {
|
|
1263
1273
|
const s = (e.getAttribute(`data-${t}`) || "").replace(/'/g, '"');
|
|
1264
1274
|
return s ? JSON.parse(s) : {};
|
|
1265
1275
|
}
|
|
1266
|
-
function
|
|
1276
|
+
function f(e) {
|
|
1267
1277
|
if (typeof e == "string") {
|
|
1268
1278
|
const t = document.getElementById(e);
|
|
1269
1279
|
if (t) return t;
|
|
@@ -1278,15 +1288,15 @@
|
|
|
1278
1288
|
async function r(e, t, ...s) {
|
|
1279
1289
|
t in e && typeof e[t] == "function" && await e[t](...s);
|
|
1280
1290
|
}
|
|
1281
|
-
function
|
|
1291
|
+
function C(e) {
|
|
1282
1292
|
return e.split("-").map(
|
|
1283
1293
|
(t, s) => s === 0 ? t : t.charAt(0).toUpperCase() + t.slice(1)
|
|
1284
1294
|
).join("");
|
|
1285
1295
|
}
|
|
1286
|
-
function
|
|
1296
|
+
function p(e) {
|
|
1287
1297
|
return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1288
1298
|
}
|
|
1289
|
-
function
|
|
1299
|
+
function S(e) {
|
|
1290
1300
|
if (typeof e == "number")
|
|
1291
1301
|
return e;
|
|
1292
1302
|
const t = parseFloat(e);
|
|
@@ -1296,11 +1306,11 @@
|
|
|
1296
1306
|
}
|
|
1297
1307
|
throw new Error(`Could not convert value to milliseconds: ${e}`);
|
|
1298
1308
|
}
|
|
1299
|
-
function
|
|
1300
|
-
return new Promise((
|
|
1309
|
+
function m(e, t, s, i, n = 0) {
|
|
1310
|
+
return new Promise((o) => {
|
|
1301
1311
|
e.classList.remove(t), e.classList.add(s), setTimeout(() => {
|
|
1302
|
-
e.classList.add(i), e.classList.remove(s),
|
|
1303
|
-
},
|
|
1312
|
+
e.classList.add(i), e.classList.remove(s), o(e);
|
|
1313
|
+
}, S(n));
|
|
1304
1314
|
});
|
|
1305
1315
|
}
|
|
1306
1316
|
async function a(e, t, s) {
|
|
@@ -1309,48 +1319,48 @@
|
|
|
1309
1319
|
await r(i, e, { plugin: i, parent: t, entry: s });
|
|
1310
1320
|
await t.emit(e, s);
|
|
1311
1321
|
}
|
|
1312
|
-
function
|
|
1322
|
+
function E$1(e) {
|
|
1313
1323
|
const t = getComputedStyle(e.el), s = {}, i = e.getSetting("customProps");
|
|
1314
1324
|
for (let n = 0; n < i.length; n++) {
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1325
|
+
const o = b(), l = e.parent.module.toLowerCase(), u2 = p(i[n]), g2 = t.getPropertyValue(`--${o}${l}-${u2}`).trim();
|
|
1326
|
+
g2 && (s[u2] = g2);
|
|
1317
1327
|
}
|
|
1318
1328
|
return s;
|
|
1319
1329
|
}
|
|
1320
|
-
function
|
|
1330
|
+
function b() {
|
|
1321
1331
|
return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
|
|
1322
1332
|
}
|
|
1323
|
-
function
|
|
1324
|
-
return t = s === "camel" ?
|
|
1333
|
+
function O(e, t, s = "camel") {
|
|
1334
|
+
return t = s === "camel" ? C(t) : p(t), e.split(".").concat(t).reduce((i, n) => i?.[n], this);
|
|
1325
1335
|
}
|
|
1326
|
-
function
|
|
1336
|
+
function x(e, t = {}) {
|
|
1327
1337
|
const {
|
|
1328
1338
|
fallback: s,
|
|
1329
1339
|
props: i = ["dataConfig", "customProps", "settings", "parent.settings"]
|
|
1330
1340
|
} = t;
|
|
1331
1341
|
for (const n of i) {
|
|
1332
|
-
const
|
|
1333
|
-
if (
|
|
1334
|
-
return
|
|
1342
|
+
const o = n !== "customProps" ? "camel" : "kebab", l = O.call(this, n, e, o);
|
|
1343
|
+
if (l !== void 0)
|
|
1344
|
+
return l;
|
|
1335
1345
|
}
|
|
1336
1346
|
if (s !== void 0)
|
|
1337
1347
|
return s;
|
|
1338
1348
|
throw new Error(`${this.parent.module} setting does not exist: ${e}`);
|
|
1339
1349
|
}
|
|
1340
|
-
function
|
|
1350
|
+
function L(e, t) {
|
|
1341
1351
|
t && document.querySelectorAll(t).forEach((s) => {
|
|
1342
1352
|
e ? s.style.overflow = "hidden" : s.style.removeProperty("overflow");
|
|
1343
1353
|
});
|
|
1344
1354
|
}
|
|
1345
|
-
function
|
|
1355
|
+
function A(e, t) {
|
|
1346
1356
|
t && document.querySelectorAll(t).forEach((s) => {
|
|
1347
|
-
|
|
1357
|
+
s.inert = e;
|
|
1348
1358
|
});
|
|
1349
1359
|
}
|
|
1350
1360
|
function $(e, t, s) {
|
|
1351
|
-
|
|
1361
|
+
A(!!e, t), L(!!e, s);
|
|
1352
1362
|
}
|
|
1353
|
-
const
|
|
1363
|
+
const P$1 = {
|
|
1354
1364
|
events: {},
|
|
1355
1365
|
on(e, t, ...s) {
|
|
1356
1366
|
this.events[e] || (this.events[e] = []), this.events[e].some(
|
|
@@ -1368,7 +1378,7 @@
|
|
|
1368
1378
|
await s(t, ...i);
|
|
1369
1379
|
}
|
|
1370
1380
|
};
|
|
1371
|
-
class
|
|
1381
|
+
let I$1 = class I extends Array {
|
|
1372
1382
|
constructor(t = {}) {
|
|
1373
1383
|
super(), this.presets = t;
|
|
1374
1384
|
}
|
|
@@ -1394,8 +1404,8 @@
|
|
|
1394
1404
|
const s = this.findIndex((i) => i.name === t);
|
|
1395
1405
|
~s && this.splice(s, 1);
|
|
1396
1406
|
}
|
|
1397
|
-
}
|
|
1398
|
-
let
|
|
1407
|
+
};
|
|
1408
|
+
let T$1 = class T extends Array {
|
|
1399
1409
|
constructor(t = {}) {
|
|
1400
1410
|
super(), this.settings = t;
|
|
1401
1411
|
}
|
|
@@ -1427,13 +1437,13 @@
|
|
|
1427
1437
|
~s && (this.splice(s, 1), this.add(t));
|
|
1428
1438
|
}
|
|
1429
1439
|
};
|
|
1430
|
-
const
|
|
1440
|
+
const k$1 = {
|
|
1431
1441
|
dataConfig: "config",
|
|
1432
1442
|
customProps: []
|
|
1433
1443
|
};
|
|
1434
|
-
class
|
|
1444
|
+
class w {
|
|
1435
1445
|
constructor(t, s, i = {}) {
|
|
1436
|
-
this.parent = t, this.el =
|
|
1446
|
+
this.parent = t, this.el = f(s), this.settings = { ...i }, this.dataConfig = {}, this.customProps = {};
|
|
1437
1447
|
}
|
|
1438
1448
|
get id() {
|
|
1439
1449
|
return this.el.id;
|
|
@@ -1442,16 +1452,16 @@
|
|
|
1442
1452
|
return Object.assign(this.settings, t);
|
|
1443
1453
|
}
|
|
1444
1454
|
getSetting(t, s) {
|
|
1445
|
-
return
|
|
1455
|
+
return x.call(this, t, s);
|
|
1446
1456
|
}
|
|
1447
1457
|
buildDataConfig() {
|
|
1448
1458
|
return Object.assign(
|
|
1449
1459
|
this.dataConfig,
|
|
1450
|
-
|
|
1460
|
+
y(this.el, this.getSetting("dataConfig"))
|
|
1451
1461
|
);
|
|
1452
1462
|
}
|
|
1453
1463
|
buildCustomProps() {
|
|
1454
|
-
return Object.assign(this.customProps,
|
|
1464
|
+
return Object.assign(this.customProps, E$1(this));
|
|
1455
1465
|
}
|
|
1456
1466
|
async init(t = {}) {
|
|
1457
1467
|
this.applySettings(t), this.buildDataConfig(), this.buildCustomProps();
|
|
@@ -1462,13 +1472,21 @@
|
|
|
1462
1472
|
});
|
|
1463
1473
|
}
|
|
1464
1474
|
}
|
|
1465
|
-
|
|
1475
|
+
class M {
|
|
1466
1476
|
constructor(t = {}) {
|
|
1467
|
-
this.module = this.constructor.name, this.collection = [], this.entryClass =
|
|
1477
|
+
this.module = this.constructor.name, this.collection = [], this.entryClass = w, this.settings = { ...k$1, ...t }, this.plugins = new I$1(this.settings.presets), this.events = {}, Object.assign(this, P$1);
|
|
1468
1478
|
}
|
|
1469
1479
|
get(t, s = "id") {
|
|
1470
1480
|
return this.collection.find((i) => i[s] === t);
|
|
1471
1481
|
}
|
|
1482
|
+
getOrThrow(t, s = "id") {
|
|
1483
|
+
const i = this.get(t, s);
|
|
1484
|
+
if (i)
|
|
1485
|
+
return i;
|
|
1486
|
+
throw new Error(
|
|
1487
|
+
`${this.module} entry not found in collection with ${s} of "${t}"`
|
|
1488
|
+
);
|
|
1489
|
+
}
|
|
1472
1490
|
applySettings(t) {
|
|
1473
1491
|
return Object.assign(this.settings, t);
|
|
1474
1492
|
}
|
|
@@ -1480,13 +1498,13 @@
|
|
|
1480
1498
|
return await a("onDestroyEntry", this, t), await r(t, "destroy"), t;
|
|
1481
1499
|
}
|
|
1482
1500
|
async register(t, s = {}) {
|
|
1483
|
-
const i =
|
|
1501
|
+
const i = f(t), n = this.collection.findIndex((o) => o.id === i.id);
|
|
1484
1502
|
if (~n) {
|
|
1485
|
-
const
|
|
1486
|
-
return
|
|
1503
|
+
const o = this.collection[n];
|
|
1504
|
+
return o.el = i, typeof o.init == "function" && await o.init(s), o;
|
|
1487
1505
|
} else {
|
|
1488
|
-
const
|
|
1489
|
-
return this.collection.push(
|
|
1506
|
+
const o = await this.createEntry(i, s);
|
|
1507
|
+
return this.collection.push(o), await a("onRegisterEntry", this, o), o;
|
|
1490
1508
|
}
|
|
1491
1509
|
}
|
|
1492
1510
|
async deregister(t) {
|
|
@@ -1523,8 +1541,8 @@
|
|
|
1523
1541
|
this.plugins.remove(t.name);
|
|
1524
1542
|
return this;
|
|
1525
1543
|
}
|
|
1526
|
-
}
|
|
1527
|
-
const
|
|
1544
|
+
}
|
|
1545
|
+
const D$1 = {
|
|
1528
1546
|
// Data attributes
|
|
1529
1547
|
dataOpen: "modal-open",
|
|
1530
1548
|
dataClose: "modal-close",
|
|
@@ -1549,45 +1567,45 @@
|
|
|
1549
1567
|
transition: true,
|
|
1550
1568
|
transitionDuration: 300
|
|
1551
1569
|
};
|
|
1552
|
-
function
|
|
1570
|
+
function c(e) {
|
|
1553
1571
|
e.active ? (e.active.dialog.querySelector(e.settings.selectorFocus) || e.active.dialog).focus() : e.trigger && (e.trigger.focus(), e.trigger = null);
|
|
1554
1572
|
}
|
|
1555
|
-
async function
|
|
1556
|
-
return e.parent.stack.moveToTop(e), e.state === "closed" && (e.state = "opening", e.parent.stack.add(e), t ?? e.getSetting("transition") ? await
|
|
1573
|
+
async function h(e, t, s = true) {
|
|
1574
|
+
return e.parent.stack.moveToTop(e), e.state === "closed" && (e.state = "opening", e.parent.stack.add(e), t ?? e.getSetting("transition") ? await m(
|
|
1557
1575
|
e.el,
|
|
1558
1576
|
e.getSetting("stateClosed"),
|
|
1559
1577
|
e.getSetting("stateOpening"),
|
|
1560
1578
|
e.getSetting("stateOpened"),
|
|
1561
1579
|
e.getSetting("transitionDuration")
|
|
1562
|
-
) : (e.el.classList.add(e.getSetting("stateOpened")), e.el.classList.remove(e.getSetting("stateClosed"))), e.state = "opened"), s &&
|
|
1580
|
+
) : (e.el.classList.add(e.getSetting("stateOpened")), e.el.classList.remove(e.getSetting("stateClosed"))), e.state = "opened"), s && c(e.parent), e.el.dispatchEvent(
|
|
1563
1581
|
new CustomEvent(e.getSetting("customEventPrefix") + "opened", {
|
|
1564
1582
|
detail: e.parent,
|
|
1565
1583
|
bubbles: true
|
|
1566
1584
|
})
|
|
1567
1585
|
), await e.parent.emit("opened", e), e;
|
|
1568
1586
|
}
|
|
1569
|
-
async function
|
|
1570
|
-
return e && e.state === "opened" && (e.state = "closing", document.activeElement && document.activeElement instanceof HTMLElement && document.activeElement.blur(), t ?? e.getSetting("transition") ? await
|
|
1587
|
+
async function d(e, t, s = true) {
|
|
1588
|
+
return e && e.state === "opened" && (e.state = "closing", document.activeElement && document.activeElement instanceof HTMLElement && document.activeElement.blur(), t ?? e.getSetting("transition") ? await m(
|
|
1571
1589
|
e.el,
|
|
1572
1590
|
e.getSetting("stateOpened"),
|
|
1573
1591
|
e.getSetting("stateClosing"),
|
|
1574
1592
|
e.getSetting("stateClosed"),
|
|
1575
1593
|
e.getSetting("transitionDuration")
|
|
1576
|
-
) : (e.el.classList.add(e.getSetting("stateClosed")), e.el.classList.remove(e.getSetting("stateOpened"))), e.parent.stack.remove(e), e.state = "closed", s &&
|
|
1594
|
+
) : (e.el.classList.add(e.getSetting("stateClosed")), e.el.classList.remove(e.getSetting("stateOpened"))), e.parent.stack.remove(e), e.state = "closed", s && c(e.parent), e.el.dispatchEvent(
|
|
1577
1595
|
new CustomEvent(e.getSetting("customEventPrefix") + "closed", {
|
|
1578
1596
|
detail: e.parent,
|
|
1579
1597
|
bubbles: true
|
|
1580
1598
|
})
|
|
1581
1599
|
), await e.parent.emit("closed", e)), e;
|
|
1582
1600
|
}
|
|
1583
|
-
async function
|
|
1601
|
+
async function v(e, t, s = true) {
|
|
1584
1602
|
let i, n;
|
|
1585
1603
|
return e.state === "opened" ? (i = e, n = await e.parent.closeAll(e.id, t)) : [n, i] = await Promise.all([
|
|
1586
1604
|
e.parent.closeAll("", t),
|
|
1587
|
-
|
|
1588
|
-
]), s &&
|
|
1605
|
+
h(e, t, false)
|
|
1606
|
+
]), s && c(e.parent), { opened: i, closed: n };
|
|
1589
1607
|
}
|
|
1590
|
-
let
|
|
1608
|
+
let q$1 = class q extends w {
|
|
1591
1609
|
constructor(t, s, i = {}) {
|
|
1592
1610
|
super(t, s, i), this.state = "closed", this.dialog = this.el.querySelector(this.getSetting("selectorDialog")) || this.el;
|
|
1593
1611
|
}
|
|
@@ -1595,13 +1613,13 @@
|
|
|
1595
1613
|
return this.dialog.matches(this.getSetting("selectorRequired"));
|
|
1596
1614
|
}
|
|
1597
1615
|
async open(t, s) {
|
|
1598
|
-
return
|
|
1616
|
+
return h(this, t, s);
|
|
1599
1617
|
}
|
|
1600
1618
|
async close(t, s) {
|
|
1601
|
-
return
|
|
1619
|
+
return d(this, t, s);
|
|
1602
1620
|
}
|
|
1603
1621
|
async replace(t, s) {
|
|
1604
|
-
return
|
|
1622
|
+
return v(this, t, s);
|
|
1605
1623
|
}
|
|
1606
1624
|
async deregister() {
|
|
1607
1625
|
return this.parent.deregister(this.id);
|
|
@@ -1616,13 +1634,7 @@
|
|
|
1616
1634
|
this.state === "opened" && await this.close(false);
|
|
1617
1635
|
}
|
|
1618
1636
|
};
|
|
1619
|
-
function
|
|
1620
|
-
const t = this.get(e);
|
|
1621
|
-
if (t)
|
|
1622
|
-
return t;
|
|
1623
|
-
throw new Error(`Modal not found in collection with id of "${e}".`);
|
|
1624
|
-
}
|
|
1625
|
-
async function j$1(e) {
|
|
1637
|
+
async function R$1(e) {
|
|
1626
1638
|
const t = e.target;
|
|
1627
1639
|
if (t) {
|
|
1628
1640
|
const s = t.closest(`
|
|
@@ -1632,11 +1644,11 @@
|
|
|
1632
1644
|
`);
|
|
1633
1645
|
if (s) {
|
|
1634
1646
|
if (e.preventDefault(), s.matches(`[data-${this.settings.dataOpen}]`)) {
|
|
1635
|
-
const i = s.getAttribute(`data-${this.settings.dataOpen}`)?.trim(), n =
|
|
1647
|
+
const i = s.getAttribute(`data-${this.settings.dataOpen}`)?.trim(), n = this.getOrThrow(i);
|
|
1636
1648
|
return t.closest(this.settings.selector) || (this.trigger = s), n.open();
|
|
1637
1649
|
}
|
|
1638
1650
|
if (s.matches(`[data-${this.settings.dataReplace}]`)) {
|
|
1639
|
-
const i = s.getAttribute(`data-${this.settings.dataReplace}`)?.trim(), n =
|
|
1651
|
+
const i = s.getAttribute(`data-${this.settings.dataReplace}`)?.trim(), n = this.getOrThrow(i);
|
|
1640
1652
|
return t.closest(this.settings.selector) || (this.trigger = s), n.replace();
|
|
1641
1653
|
}
|
|
1642
1654
|
if (s.matches(`[data-${this.settings.dataClose}]`)) {
|
|
@@ -1648,23 +1660,23 @@
|
|
|
1648
1660
|
return this.close();
|
|
1649
1661
|
}
|
|
1650
1662
|
}
|
|
1651
|
-
function
|
|
1663
|
+
function j$1(e) {
|
|
1652
1664
|
if (e.key === "Escape" && this.active && !this.active.dialog.matches(this.settings.selectorRequired))
|
|
1653
1665
|
return this.close();
|
|
1654
1666
|
}
|
|
1655
|
-
async function
|
|
1667
|
+
async function z$1(e = "", t) {
|
|
1656
1668
|
const s = [];
|
|
1657
1669
|
return await Promise.all(
|
|
1658
1670
|
this.stack.copy.map(async (i) => {
|
|
1659
|
-
e && e === i.id || s.push(await
|
|
1671
|
+
e && e === i.id || s.push(await d(i, t, false));
|
|
1660
1672
|
})
|
|
1661
1673
|
), s;
|
|
1662
1674
|
}
|
|
1663
|
-
let
|
|
1675
|
+
let H$1 = class H extends M {
|
|
1664
1676
|
#t;
|
|
1665
1677
|
#e;
|
|
1666
1678
|
constructor(t) {
|
|
1667
|
-
super({ ...
|
|
1679
|
+
super({ ...D$1, ...t }), this.module = "Modal", this.entryClass = q$1, this.trigger = null, this.#t = R$1.bind(this), this.#e = j$1.bind(this), this.stack = new T$1({
|
|
1668
1680
|
onChange: () => {
|
|
1669
1681
|
$(
|
|
1670
1682
|
!!this.stack.top,
|
|
@@ -1678,20 +1690,20 @@
|
|
|
1678
1690
|
return this.stack.top;
|
|
1679
1691
|
}
|
|
1680
1692
|
async open(t, s, i) {
|
|
1681
|
-
const n =
|
|
1682
|
-
return
|
|
1693
|
+
const n = this.getOrThrow(t);
|
|
1694
|
+
return h(n, s, i);
|
|
1683
1695
|
}
|
|
1684
1696
|
async close(t, s, i) {
|
|
1685
|
-
const n = t ?
|
|
1686
|
-
return
|
|
1697
|
+
const n = t ? this.getOrThrow(t) : this.active;
|
|
1698
|
+
return d(n, s, i);
|
|
1687
1699
|
}
|
|
1688
1700
|
async replace(t, s, i) {
|
|
1689
|
-
const n =
|
|
1690
|
-
return
|
|
1701
|
+
const n = this.getOrThrow(t);
|
|
1702
|
+
return v(n, s, i);
|
|
1691
1703
|
}
|
|
1692
1704
|
async closeAll(t, s, i = true) {
|
|
1693
|
-
const n = await
|
|
1694
|
-
return i &&
|
|
1705
|
+
const n = await z$1.call(this, t, s);
|
|
1706
|
+
return i && c(this), n;
|
|
1695
1707
|
}
|
|
1696
1708
|
async afterMount() {
|
|
1697
1709
|
document.addEventListener("click", this.#t, false), document.addEventListener("keydown", this.#e, false);
|
|
@@ -1739,8 +1751,8 @@
|
|
|
1739
1751
|
function Gt(t) {
|
|
1740
1752
|
const e = getComputedStyle(t.el), n = {}, i = t.getSetting("customProps");
|
|
1741
1753
|
for (let s = 0; s < i.length; s++) {
|
|
1742
|
-
const
|
|
1743
|
-
|
|
1754
|
+
const o = Qt(), r2 = t.parent.module.toLowerCase(), c2 = kt(i[s]), l = e.getPropertyValue(`--${o}${r2}-${c2}`).trim();
|
|
1755
|
+
l && (n[c2] = l);
|
|
1744
1756
|
}
|
|
1745
1757
|
return n;
|
|
1746
1758
|
}
|
|
@@ -1756,7 +1768,7 @@
|
|
|
1756
1768
|
props: i = ["dataConfig", "customProps", "settings", "parent.settings"]
|
|
1757
1769
|
} = e;
|
|
1758
1770
|
for (const s of i) {
|
|
1759
|
-
const
|
|
1771
|
+
const o = s !== "customProps" ? "camel" : "kebab", r2 = te.call(this, s, t, o);
|
|
1760
1772
|
if (r2 !== void 0)
|
|
1761
1773
|
return r2;
|
|
1762
1774
|
}
|
|
@@ -1851,6 +1863,14 @@
|
|
|
1851
1863
|
get(e, n = "id") {
|
|
1852
1864
|
return this.collection.find((i) => i[n] === e);
|
|
1853
1865
|
}
|
|
1866
|
+
getOrThrow(e, n = "id") {
|
|
1867
|
+
const i = this.get(e, n);
|
|
1868
|
+
if (i)
|
|
1869
|
+
return i;
|
|
1870
|
+
throw new Error(
|
|
1871
|
+
`${this.module} entry not found in collection with ${n} of "${e}"`
|
|
1872
|
+
);
|
|
1873
|
+
}
|
|
1854
1874
|
applySettings(e) {
|
|
1855
1875
|
return Object.assign(this.settings, e);
|
|
1856
1876
|
}
|
|
@@ -1862,13 +1882,13 @@
|
|
|
1862
1882
|
return await H("onDestroyEntry", this, e), await z(e, "destroy"), e;
|
|
1863
1883
|
}
|
|
1864
1884
|
async register(e, n = {}) {
|
|
1865
|
-
const i = Rt(e), s = this.collection.findIndex((
|
|
1885
|
+
const i = Rt(e), s = this.collection.findIndex((o) => o.id === i.id);
|
|
1866
1886
|
if (~s) {
|
|
1867
|
-
const
|
|
1868
|
-
return
|
|
1887
|
+
const o = this.collection[s];
|
|
1888
|
+
return o.el = i, typeof o.init == "function" && await o.init(n), o;
|
|
1869
1889
|
} else {
|
|
1870
|
-
const
|
|
1871
|
-
return this.collection.push(
|
|
1890
|
+
const o = await this.createEntry(i, n);
|
|
1891
|
+
return this.collection.push(o), await H("onRegisterEntry", this, o), o;
|
|
1872
1892
|
}
|
|
1873
1893
|
}
|
|
1874
1894
|
async deregister(e) {
|
|
@@ -1931,7 +1951,7 @@
|
|
|
1931
1951
|
shiftPadding: 0,
|
|
1932
1952
|
arrowPadding: 0,
|
|
1933
1953
|
toggleDelay: 0
|
|
1934
|
-
},
|
|
1954
|
+
}, Y = Math.min, j = Math.max, st = Math.round, it = Math.floor, R = (t) => ({
|
|
1935
1955
|
x: t,
|
|
1936
1956
|
y: t
|
|
1937
1957
|
}), ce = {
|
|
@@ -1943,8 +1963,8 @@
|
|
|
1943
1963
|
start: "end",
|
|
1944
1964
|
end: "start"
|
|
1945
1965
|
};
|
|
1946
|
-
function
|
|
1947
|
-
return j(t,
|
|
1966
|
+
function gt(t, e, n) {
|
|
1967
|
+
return j(t, Y(e, n));
|
|
1948
1968
|
}
|
|
1949
1969
|
function q(t, e) {
|
|
1950
1970
|
return typeof t == "function" ? t(e) : t;
|
|
@@ -1955,30 +1975,30 @@
|
|
|
1955
1975
|
function et(t) {
|
|
1956
1976
|
return t.split("-")[1];
|
|
1957
1977
|
}
|
|
1958
|
-
function
|
|
1978
|
+
function pt(t) {
|
|
1959
1979
|
return t === "x" ? "y" : "x";
|
|
1960
1980
|
}
|
|
1961
|
-
function
|
|
1981
|
+
function wt(t) {
|
|
1962
1982
|
return t === "y" ? "height" : "width";
|
|
1963
1983
|
}
|
|
1964
1984
|
const ae = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
1965
|
-
function
|
|
1985
|
+
function F(t) {
|
|
1966
1986
|
return ae.has(I(t)) ? "y" : "x";
|
|
1967
1987
|
}
|
|
1968
|
-
function
|
|
1969
|
-
return
|
|
1988
|
+
function yt(t) {
|
|
1989
|
+
return pt(F(t));
|
|
1970
1990
|
}
|
|
1971
1991
|
function fe(t, e, n) {
|
|
1972
1992
|
n === void 0 && (n = false);
|
|
1973
|
-
const i = et(t), s =
|
|
1993
|
+
const i = et(t), s = yt(t), o = wt(s);
|
|
1974
1994
|
let r2 = s === "x" ? i === (n ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
1975
|
-
return e.reference[
|
|
1995
|
+
return e.reference[o] > e.floating[o] && (r2 = ot(r2)), [r2, ot(r2)];
|
|
1976
1996
|
}
|
|
1977
1997
|
function ue(t) {
|
|
1978
1998
|
const e = ot(t);
|
|
1979
|
-
return [
|
|
1999
|
+
return [ht(t), e, ht(e)];
|
|
1980
2000
|
}
|
|
1981
|
-
function
|
|
2001
|
+
function ht(t) {
|
|
1982
2002
|
return t.replace(/start|end/g, (e) => le[e]);
|
|
1983
2003
|
}
|
|
1984
2004
|
const At = ["left", "right"], Et = ["right", "left"], de = ["top", "bottom"], ge = ["bottom", "top"];
|
|
@@ -1996,8 +2016,8 @@
|
|
|
1996
2016
|
}
|
|
1997
2017
|
function me(t, e, n, i) {
|
|
1998
2018
|
const s = et(t);
|
|
1999
|
-
let
|
|
2000
|
-
return s && (
|
|
2019
|
+
let o = he(I(t), n === "start", i);
|
|
2020
|
+
return s && (o = o.map((r2) => r2 + "-" + s), e && (o = o.concat(o.map(ht)))), o;
|
|
2001
2021
|
}
|
|
2002
2022
|
function ot(t) {
|
|
2003
2023
|
return t.replace(/left|right|bottom|top/g, (e) => ce[e]);
|
|
@@ -2042,9 +2062,9 @@
|
|
|
2042
2062
|
reference: i,
|
|
2043
2063
|
floating: s
|
|
2044
2064
|
} = t;
|
|
2045
|
-
const
|
|
2065
|
+
const o = F(e), r2 = yt(e), c2 = wt(r2), l = I(e), a2 = o === "y", d2 = i.x + i.width / 2 - s.width / 2, u2 = i.y + i.height / 2 - s.height / 2, g2 = i[c2] / 2 - s[c2] / 2;
|
|
2046
2066
|
let f2;
|
|
2047
|
-
switch (
|
|
2067
|
+
switch (l) {
|
|
2048
2068
|
case "top":
|
|
2049
2069
|
f2 = {
|
|
2050
2070
|
x: d2,
|
|
@@ -2089,9 +2109,9 @@
|
|
|
2089
2109
|
const {
|
|
2090
2110
|
placement: i = "bottom",
|
|
2091
2111
|
strategy: s = "absolute",
|
|
2092
|
-
middleware:
|
|
2112
|
+
middleware: o = [],
|
|
2093
2113
|
platform: r2
|
|
2094
|
-
} = n,
|
|
2114
|
+
} = n, c2 = o.filter(Boolean), l = await (r2.isRTL == null ? void 0 : r2.isRTL(e));
|
|
2095
2115
|
let a2 = await r2.getElementRects({
|
|
2096
2116
|
reference: t,
|
|
2097
2117
|
floating: e,
|
|
@@ -2099,16 +2119,16 @@
|
|
|
2099
2119
|
}), {
|
|
2100
2120
|
x: d2,
|
|
2101
2121
|
y: u2
|
|
2102
|
-
} = Ct(a2, i,
|
|
2103
|
-
for (let m2 = 0; m2 <
|
|
2122
|
+
} = Ct(a2, i, l), g2 = i, f2 = {}, h2 = 0;
|
|
2123
|
+
for (let m2 = 0; m2 < c2.length; m2++) {
|
|
2104
2124
|
const {
|
|
2105
2125
|
name: p2,
|
|
2106
2126
|
fn: w2
|
|
2107
|
-
} =
|
|
2127
|
+
} = c2[m2], {
|
|
2108
2128
|
x: y2,
|
|
2109
2129
|
y: x2,
|
|
2110
|
-
data:
|
|
2111
|
-
reset:
|
|
2130
|
+
data: v2,
|
|
2131
|
+
reset: b2
|
|
2112
2132
|
} = await w2({
|
|
2113
2133
|
x: d2,
|
|
2114
2134
|
y: u2,
|
|
@@ -2127,16 +2147,16 @@
|
|
|
2127
2147
|
...f2,
|
|
2128
2148
|
[p2]: {
|
|
2129
2149
|
...f2[p2],
|
|
2130
|
-
...
|
|
2150
|
+
...v2
|
|
2131
2151
|
}
|
|
2132
|
-
},
|
|
2152
|
+
}, b2 && h2 <= 50 && (h2++, typeof b2 == "object" && (b2.placement && (g2 = b2.placement), b2.rects && (a2 = b2.rects === true ? await r2.getElementRects({
|
|
2133
2153
|
reference: t,
|
|
2134
2154
|
floating: e,
|
|
2135
2155
|
strategy: s
|
|
2136
|
-
}) :
|
|
2156
|
+
}) : b2.rects), {
|
|
2137
2157
|
x: d2,
|
|
2138
2158
|
y: u2
|
|
2139
|
-
} = Ct(a2, g2,
|
|
2159
|
+
} = Ct(a2, g2, l)), m2 = -1);
|
|
2140
2160
|
}
|
|
2141
2161
|
return {
|
|
2142
2162
|
x: d2,
|
|
@@ -2152,43 +2172,43 @@
|
|
|
2152
2172
|
const {
|
|
2153
2173
|
x: i,
|
|
2154
2174
|
y: s,
|
|
2155
|
-
platform:
|
|
2175
|
+
platform: o,
|
|
2156
2176
|
rects: r2,
|
|
2157
|
-
elements:
|
|
2158
|
-
strategy:
|
|
2177
|
+
elements: c2,
|
|
2178
|
+
strategy: l
|
|
2159
2179
|
} = t, {
|
|
2160
2180
|
boundary: a2 = "clippingAncestors",
|
|
2161
2181
|
rootBoundary: d2 = "viewport",
|
|
2162
2182
|
elementContext: u2 = "floating",
|
|
2163
2183
|
altBoundary: g2 = false,
|
|
2164
2184
|
padding: f2 = 0
|
|
2165
|
-
} = q(e, t), h2 = Mt(f2), p2 =
|
|
2166
|
-
element: (n = await (
|
|
2185
|
+
} = q(e, t), h2 = Mt(f2), p2 = c2[g2 ? u2 === "floating" ? "reference" : "floating" : u2], w2 = rt(await o.getClippingRect({
|
|
2186
|
+
element: (n = await (o.isElement == null ? void 0 : o.isElement(p2))) == null || n ? p2 : p2.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(c2.floating)),
|
|
2167
2187
|
boundary: a2,
|
|
2168
2188
|
rootBoundary: d2,
|
|
2169
|
-
strategy:
|
|
2189
|
+
strategy: l
|
|
2170
2190
|
})), y2 = u2 === "floating" ? {
|
|
2171
2191
|
x: i,
|
|
2172
2192
|
y: s,
|
|
2173
2193
|
width: r2.floating.width,
|
|
2174
2194
|
height: r2.floating.height
|
|
2175
|
-
} : r2.reference, x2 = await (
|
|
2195
|
+
} : r2.reference, x2 = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c2.floating)), v2 = await (o.isElement == null ? void 0 : o.isElement(x2)) ? await (o.getScale == null ? void 0 : o.getScale(x2)) || {
|
|
2176
2196
|
x: 1,
|
|
2177
2197
|
y: 1
|
|
2178
2198
|
} : {
|
|
2179
2199
|
x: 1,
|
|
2180
2200
|
y: 1
|
|
2181
|
-
},
|
|
2182
|
-
elements:
|
|
2201
|
+
}, b2 = rt(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
2202
|
+
elements: c2,
|
|
2183
2203
|
rect: y2,
|
|
2184
2204
|
offsetParent: x2,
|
|
2185
|
-
strategy:
|
|
2205
|
+
strategy: l
|
|
2186
2206
|
}) : y2);
|
|
2187
2207
|
return {
|
|
2188
|
-
top: (w2.top -
|
|
2189
|
-
bottom: (
|
|
2190
|
-
left: (w2.left -
|
|
2191
|
-
right: (
|
|
2208
|
+
top: (w2.top - b2.top + h2.top) / v2.y,
|
|
2209
|
+
bottom: (b2.bottom - w2.bottom + h2.bottom) / v2.y,
|
|
2210
|
+
left: (w2.left - b2.left + h2.left) / v2.x,
|
|
2211
|
+
right: (b2.right - w2.right + h2.right) / v2.x
|
|
2192
2212
|
};
|
|
2193
2213
|
}
|
|
2194
2214
|
const ye = (t) => ({
|
|
@@ -2199,10 +2219,10 @@
|
|
|
2199
2219
|
x: n,
|
|
2200
2220
|
y: i,
|
|
2201
2221
|
placement: s,
|
|
2202
|
-
rects:
|
|
2222
|
+
rects: o,
|
|
2203
2223
|
platform: r2,
|
|
2204
|
-
elements:
|
|
2205
|
-
middlewareData:
|
|
2224
|
+
elements: c2,
|
|
2225
|
+
middlewareData: l
|
|
2206
2226
|
} = e, {
|
|
2207
2227
|
element: a2,
|
|
2208
2228
|
padding: d2 = 0
|
|
@@ -2212,10 +2232,10 @@
|
|
|
2212
2232
|
const u2 = Mt(d2), g2 = {
|
|
2213
2233
|
x: n,
|
|
2214
2234
|
y: i
|
|
2215
|
-
}, f2 =
|
|
2235
|
+
}, f2 = yt(s), h2 = wt(f2), m2 = await r2.getDimensions(a2), p2 = f2 === "y", w2 = p2 ? "top" : "left", y2 = p2 ? "bottom" : "right", x2 = p2 ? "clientHeight" : "clientWidth", v2 = o.reference[h2] + o.reference[f2] - g2[f2] - o.floating[h2], b2 = g2[f2] - o.reference[f2], C2 = await (r2.getOffsetParent == null ? void 0 : r2.getOffsetParent(a2));
|
|
2216
2236
|
let S2 = C2 ? C2[x2] : 0;
|
|
2217
|
-
(!S2 || !await (r2.isElement == null ? void 0 : r2.isElement(C2))) && (S2 =
|
|
2218
|
-
const Z2 =
|
|
2237
|
+
(!S2 || !await (r2.isElement == null ? void 0 : r2.isElement(C2))) && (S2 = c2.floating[x2] || o.floating[h2]);
|
|
2238
|
+
const Z2 = v2 / 2 - b2 / 2, W2 = S2 / 2 - m2[h2] / 2 - 1, M2 = Y(u2[w2], W2), G2 = Y(u2[y2], W2), B2 = M2, Q2 = S2 - m2[h2] - G2, A2 = S2 / 2 - m2[h2] / 2 + Z2, _2 = gt(B2, A2, Q2), $2 = !l.arrow && et(s) != null && A2 !== _2 && o.reference[h2] / 2 - (A2 < B2 ? M2 : G2) - m2[h2] / 2 < 0, L2 = $2 ? A2 < B2 ? A2 - B2 : A2 - Q2 : 0;
|
|
2219
2239
|
return {
|
|
2220
2240
|
[f2]: g2[f2] + L2,
|
|
2221
2241
|
data: {
|
|
@@ -2236,10 +2256,10 @@
|
|
|
2236
2256
|
var n, i;
|
|
2237
2257
|
const {
|
|
2238
2258
|
placement: s,
|
|
2239
|
-
middlewareData:
|
|
2259
|
+
middlewareData: o,
|
|
2240
2260
|
rects: r2,
|
|
2241
|
-
initialPlacement:
|
|
2242
|
-
platform:
|
|
2261
|
+
initialPlacement: c2,
|
|
2262
|
+
platform: l,
|
|
2243
2263
|
elements: a2
|
|
2244
2264
|
} = e, {
|
|
2245
2265
|
mainAxis: d2 = true,
|
|
@@ -2250,25 +2270,25 @@
|
|
|
2250
2270
|
flipAlignment: m2 = true,
|
|
2251
2271
|
...p2
|
|
2252
2272
|
} = q(t, e);
|
|
2253
|
-
if ((n =
|
|
2273
|
+
if ((n = o.arrow) != null && n.alignmentOffset)
|
|
2254
2274
|
return {};
|
|
2255
|
-
const w2 = I(s), y2 =
|
|
2256
|
-
!g2 && C2 &&
|
|
2257
|
-
const S2 = [
|
|
2258
|
-
let M2 = ((i =
|
|
2259
|
-
if (d2 &&
|
|
2260
|
-
const A2 = fe(s, r2,
|
|
2261
|
-
|
|
2275
|
+
const w2 = I(s), y2 = F(c2), x2 = I(c2) === c2, v2 = await (l.isRTL == null ? void 0 : l.isRTL(a2.floating)), b2 = g2 || (x2 || !m2 ? [ot(c2)] : ue(c2)), C2 = h2 !== "none";
|
|
2276
|
+
!g2 && C2 && b2.push(...me(c2, m2, h2, v2));
|
|
2277
|
+
const S2 = [c2, ...b2], Z2 = await $t(e, p2), W2 = [];
|
|
2278
|
+
let M2 = ((i = o.flip) == null ? void 0 : i.overflows) || [];
|
|
2279
|
+
if (d2 && W2.push(Z2[w2]), u2) {
|
|
2280
|
+
const A2 = fe(s, r2, v2);
|
|
2281
|
+
W2.push(Z2[A2[0]], Z2[A2[1]]);
|
|
2262
2282
|
}
|
|
2263
2283
|
if (M2 = [...M2, {
|
|
2264
2284
|
placement: s,
|
|
2265
|
-
overflows:
|
|
2266
|
-
}], !
|
|
2267
|
-
var G2,
|
|
2268
|
-
const A2 = (((G2 =
|
|
2269
|
-
if (_2 && (!(u2 === "alignment" ? y2 !==
|
|
2285
|
+
overflows: W2
|
|
2286
|
+
}], !W2.every((A2) => A2 <= 0)) {
|
|
2287
|
+
var G2, B2;
|
|
2288
|
+
const A2 = (((G2 = o.flip) == null ? void 0 : G2.index) || 0) + 1, _2 = S2[A2];
|
|
2289
|
+
if (_2 && (!(u2 === "alignment" ? y2 !== F(_2) : false) || // We leave the current main axis only if every placement on that axis
|
|
2270
2290
|
// overflows the main axis.
|
|
2271
|
-
M2.every((O2) => O2.overflows[0] > 0
|
|
2291
|
+
M2.every((O2) => F(O2.placement) === y2 ? O2.overflows[0] > 0 : true)))
|
|
2272
2292
|
return {
|
|
2273
2293
|
data: {
|
|
2274
2294
|
index: A2,
|
|
@@ -2278,25 +2298,25 @@
|
|
|
2278
2298
|
placement: _2
|
|
2279
2299
|
}
|
|
2280
2300
|
};
|
|
2281
|
-
let $2 = (
|
|
2301
|
+
let $2 = (B2 = M2.filter((L2) => L2.overflows[0] <= 0).sort((L2, O2) => L2.overflows[1] - O2.overflows[1])[0]) == null ? void 0 : B2.placement;
|
|
2282
2302
|
if (!$2)
|
|
2283
2303
|
switch (f2) {
|
|
2284
2304
|
case "bestFit": {
|
|
2285
2305
|
var Q2;
|
|
2286
2306
|
const L2 = (Q2 = M2.filter((O2) => {
|
|
2287
2307
|
if (C2) {
|
|
2288
|
-
const
|
|
2289
|
-
return
|
|
2308
|
+
const N2 = F(O2.placement);
|
|
2309
|
+
return N2 === y2 || // Create a bias to the `y` side axis due to horizontal
|
|
2290
2310
|
// reading directions favoring greater width.
|
|
2291
|
-
|
|
2311
|
+
N2 === "y";
|
|
2292
2312
|
}
|
|
2293
2313
|
return true;
|
|
2294
|
-
}).map((O2) => [O2.placement, O2.overflows.filter((
|
|
2314
|
+
}).map((O2) => [O2.placement, O2.overflows.filter((N2) => N2 > 0).reduce((N2, Kt) => N2 + Kt, 0)]).sort((O2, N2) => O2[1] - N2[1])[0]) == null ? void 0 : Q2[0];
|
|
2295
2315
|
L2 && ($2 = L2);
|
|
2296
2316
|
break;
|
|
2297
2317
|
}
|
|
2298
2318
|
case "initialPlacement":
|
|
2299
|
-
$2 =
|
|
2319
|
+
$2 = c2;
|
|
2300
2320
|
break;
|
|
2301
2321
|
}
|
|
2302
2322
|
if (s !== $2)
|
|
@@ -2309,13 +2329,13 @@
|
|
|
2309
2329
|
return {};
|
|
2310
2330
|
}
|
|
2311
2331
|
};
|
|
2312
|
-
},
|
|
2313
|
-
async function
|
|
2332
|
+
}, Ft = /* @__PURE__ */ new Set(["left", "top"]);
|
|
2333
|
+
async function be(t, e) {
|
|
2314
2334
|
const {
|
|
2315
2335
|
placement: n,
|
|
2316
2336
|
platform: i,
|
|
2317
2337
|
elements: s
|
|
2318
|
-
} = t,
|
|
2338
|
+
} = t, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r2 = I(n), c2 = et(n), l = F(n) === "y", a2 = Ft.has(r2) ? -1 : 1, d2 = o && l ? -1 : 1, u2 = q(e, t);
|
|
2319
2339
|
let {
|
|
2320
2340
|
mainAxis: g2,
|
|
2321
2341
|
crossAxis: f2,
|
|
@@ -2329,7 +2349,7 @@
|
|
|
2329
2349
|
crossAxis: u2.crossAxis || 0,
|
|
2330
2350
|
alignmentAxis: u2.alignmentAxis
|
|
2331
2351
|
};
|
|
2332
|
-
return
|
|
2352
|
+
return c2 && typeof h2 == "number" && (f2 = c2 === "end" ? h2 * -1 : h2), l ? {
|
|
2333
2353
|
x: f2 * d2,
|
|
2334
2354
|
y: g2 * a2
|
|
2335
2355
|
} : {
|
|
@@ -2337,7 +2357,7 @@
|
|
|
2337
2357
|
y: f2 * d2
|
|
2338
2358
|
};
|
|
2339
2359
|
}
|
|
2340
|
-
const
|
|
2360
|
+
const ve = function(t) {
|
|
2341
2361
|
return t === void 0 && (t = 0), {
|
|
2342
2362
|
name: "offset",
|
|
2343
2363
|
options: t,
|
|
@@ -2345,15 +2365,15 @@
|
|
|
2345
2365
|
var n, i;
|
|
2346
2366
|
const {
|
|
2347
2367
|
x: s,
|
|
2348
|
-
y:
|
|
2368
|
+
y: o,
|
|
2349
2369
|
placement: r2,
|
|
2350
|
-
middlewareData:
|
|
2351
|
-
} = e,
|
|
2352
|
-
return r2 === ((n =
|
|
2353
|
-
x: s +
|
|
2354
|
-
y:
|
|
2370
|
+
middlewareData: c2
|
|
2371
|
+
} = e, l = await be(e, t);
|
|
2372
|
+
return r2 === ((n = c2.offset) == null ? void 0 : n.placement) && (i = c2.arrow) != null && i.alignmentOffset ? {} : {
|
|
2373
|
+
x: s + l.x,
|
|
2374
|
+
y: o + l.y,
|
|
2355
2375
|
data: {
|
|
2356
|
-
...
|
|
2376
|
+
...l,
|
|
2357
2377
|
placement: r2
|
|
2358
2378
|
}
|
|
2359
2379
|
};
|
|
@@ -2369,9 +2389,9 @@
|
|
|
2369
2389
|
y: i,
|
|
2370
2390
|
placement: s
|
|
2371
2391
|
} = e, {
|
|
2372
|
-
mainAxis:
|
|
2392
|
+
mainAxis: o = true,
|
|
2373
2393
|
crossAxis: r2 = false,
|
|
2374
|
-
limiter:
|
|
2394
|
+
limiter: c2 = {
|
|
2375
2395
|
fn: (p2) => {
|
|
2376
2396
|
let {
|
|
2377
2397
|
x: w2,
|
|
@@ -2383,21 +2403,21 @@
|
|
|
2383
2403
|
};
|
|
2384
2404
|
}
|
|
2385
2405
|
},
|
|
2386
|
-
...
|
|
2406
|
+
...l
|
|
2387
2407
|
} = q(t, e), a2 = {
|
|
2388
2408
|
x: n,
|
|
2389
2409
|
y: i
|
|
2390
|
-
}, d2 = await $t(e,
|
|
2410
|
+
}, d2 = await $t(e, l), u2 = F(I(s)), g2 = pt(u2);
|
|
2391
2411
|
let f2 = a2[g2], h2 = a2[u2];
|
|
2392
|
-
if (
|
|
2412
|
+
if (o) {
|
|
2393
2413
|
const p2 = g2 === "y" ? "top" : "left", w2 = g2 === "y" ? "bottom" : "right", y2 = f2 + d2[p2], x2 = f2 - d2[w2];
|
|
2394
|
-
f2 =
|
|
2414
|
+
f2 = gt(y2, f2, x2);
|
|
2395
2415
|
}
|
|
2396
2416
|
if (r2) {
|
|
2397
2417
|
const p2 = u2 === "y" ? "top" : "left", w2 = u2 === "y" ? "bottom" : "right", y2 = h2 + d2[p2], x2 = h2 - d2[w2];
|
|
2398
|
-
h2 =
|
|
2418
|
+
h2 = gt(y2, h2, x2);
|
|
2399
2419
|
}
|
|
2400
|
-
const m2 =
|
|
2420
|
+
const m2 = c2.fn({
|
|
2401
2421
|
...e,
|
|
2402
2422
|
[g2]: f2,
|
|
2403
2423
|
[u2]: h2
|
|
@@ -2408,7 +2428,7 @@
|
|
|
2408
2428
|
x: m2.x - n,
|
|
2409
2429
|
y: m2.y - i,
|
|
2410
2430
|
enabled: {
|
|
2411
|
-
[g2]:
|
|
2431
|
+
[g2]: o,
|
|
2412
2432
|
[u2]: r2
|
|
2413
2433
|
}
|
|
2414
2434
|
}
|
|
@@ -2423,18 +2443,18 @@
|
|
|
2423
2443
|
x: n,
|
|
2424
2444
|
y: i,
|
|
2425
2445
|
placement: s,
|
|
2426
|
-
rects:
|
|
2446
|
+
rects: o,
|
|
2427
2447
|
middlewareData: r2
|
|
2428
2448
|
} = e, {
|
|
2429
|
-
offset:
|
|
2430
|
-
mainAxis:
|
|
2449
|
+
offset: c2 = 0,
|
|
2450
|
+
mainAxis: l = true,
|
|
2431
2451
|
crossAxis: a2 = true
|
|
2432
2452
|
} = q(t, e), d2 = {
|
|
2433
2453
|
x: n,
|
|
2434
2454
|
y: i
|
|
2435
|
-
}, u2 =
|
|
2455
|
+
}, u2 = F(s), g2 = pt(u2);
|
|
2436
2456
|
let f2 = d2[g2], h2 = d2[u2];
|
|
2437
|
-
const m2 = q(
|
|
2457
|
+
const m2 = q(c2, e), p2 = typeof m2 == "number" ? {
|
|
2438
2458
|
mainAxis: m2,
|
|
2439
2459
|
crossAxis: 0
|
|
2440
2460
|
} : {
|
|
@@ -2442,14 +2462,14 @@
|
|
|
2442
2462
|
crossAxis: 0,
|
|
2443
2463
|
...m2
|
|
2444
2464
|
};
|
|
2445
|
-
if (
|
|
2446
|
-
const x2 = g2 === "y" ? "height" : "width",
|
|
2447
|
-
f2 <
|
|
2465
|
+
if (l) {
|
|
2466
|
+
const x2 = g2 === "y" ? "height" : "width", v2 = o.reference[g2] - o.floating[x2] + p2.mainAxis, b2 = o.reference[g2] + o.reference[x2] - p2.mainAxis;
|
|
2467
|
+
f2 < v2 ? f2 = v2 : f2 > b2 && (f2 = b2);
|
|
2448
2468
|
}
|
|
2449
2469
|
if (a2) {
|
|
2450
2470
|
var w2, y2;
|
|
2451
|
-
const x2 = g2 === "y" ? "width" : "height",
|
|
2452
|
-
h2 <
|
|
2471
|
+
const x2 = g2 === "y" ? "width" : "height", v2 = Ft.has(I(s)), b2 = o.reference[u2] - o.floating[x2] + (v2 && ((w2 = r2.offset) == null ? void 0 : w2[u2]) || 0) + (v2 ? 0 : p2.crossAxis), C2 = o.reference[u2] + o.reference[x2] + (v2 ? 0 : ((y2 = r2.offset) == null ? void 0 : y2[u2]) || 0) - (v2 ? p2.crossAxis : 0);
|
|
2472
|
+
h2 < b2 ? h2 = b2 : h2 > C2 && (h2 = C2);
|
|
2453
2473
|
}
|
|
2454
2474
|
return {
|
|
2455
2475
|
[g2]: f2,
|
|
@@ -2462,7 +2482,7 @@
|
|
|
2462
2482
|
return typeof window < "u";
|
|
2463
2483
|
}
|
|
2464
2484
|
function J(t) {
|
|
2465
|
-
return
|
|
2485
|
+
return Nt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
2466
2486
|
}
|
|
2467
2487
|
function E(t) {
|
|
2468
2488
|
var e;
|
|
@@ -2470,12 +2490,12 @@
|
|
|
2470
2490
|
}
|
|
2471
2491
|
function D(t) {
|
|
2472
2492
|
var e;
|
|
2473
|
-
return (e = (
|
|
2493
|
+
return (e = (Nt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
2474
2494
|
}
|
|
2475
|
-
function
|
|
2495
|
+
function Nt(t) {
|
|
2476
2496
|
return ct() ? t instanceof Node || t instanceof E(t).Node : false;
|
|
2477
2497
|
}
|
|
2478
|
-
function
|
|
2498
|
+
function T(t) {
|
|
2479
2499
|
return ct() ? t instanceof Element || t instanceof E(t).Element : false;
|
|
2480
2500
|
}
|
|
2481
2501
|
function k(t) {
|
|
@@ -2491,7 +2511,7 @@
|
|
|
2491
2511
|
overflowX: n,
|
|
2492
2512
|
overflowY: i,
|
|
2493
2513
|
display: s
|
|
2494
|
-
} =
|
|
2514
|
+
} = P(t);
|
|
2495
2515
|
return /auto|scroll|overlay|hidden|clip/.test(e + i + n) && !Ce.has(s);
|
|
2496
2516
|
}
|
|
2497
2517
|
const Se = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
@@ -2508,15 +2528,15 @@
|
|
|
2508
2528
|
}
|
|
2509
2529
|
});
|
|
2510
2530
|
}
|
|
2511
|
-
const
|
|
2512
|
-
function
|
|
2513
|
-
const e =
|
|
2514
|
-
return
|
|
2531
|
+
const Te = ["transform", "translate", "scale", "rotate", "perspective"], Pe = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Re = ["paint", "layout", "strict", "content"];
|
|
2532
|
+
function xt(t) {
|
|
2533
|
+
const e = bt(), n = T(t) ? P(t) : t;
|
|
2534
|
+
return Te.some((i) => n[i] ? n[i] !== "none" : false) || (n.containerType ? n.containerType !== "normal" : false) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : false) || !e && (n.filter ? n.filter !== "none" : false) || Pe.some((i) => (n.willChange || "").includes(i)) || Re.some((i) => (n.contain || "").includes(i));
|
|
2515
2535
|
}
|
|
2516
2536
|
function ke(t) {
|
|
2517
2537
|
let e = V(t);
|
|
2518
|
-
for (; k(e) && !
|
|
2519
|
-
if (
|
|
2538
|
+
for (; k(e) && !K(e); ) {
|
|
2539
|
+
if (xt(e))
|
|
2520
2540
|
return e;
|
|
2521
2541
|
if (lt(e))
|
|
2522
2542
|
return null;
|
|
@@ -2524,18 +2544,18 @@
|
|
|
2524
2544
|
}
|
|
2525
2545
|
return null;
|
|
2526
2546
|
}
|
|
2527
|
-
function
|
|
2547
|
+
function bt() {
|
|
2528
2548
|
return typeof CSS > "u" || !CSS.supports ? false : CSS.supports("-webkit-backdrop-filter", "none");
|
|
2529
2549
|
}
|
|
2530
2550
|
const De = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
2531
|
-
function
|
|
2551
|
+
function K(t) {
|
|
2532
2552
|
return De.has(J(t));
|
|
2533
2553
|
}
|
|
2534
|
-
function
|
|
2554
|
+
function P(t) {
|
|
2535
2555
|
return E(t).getComputedStyle(t);
|
|
2536
2556
|
}
|
|
2537
2557
|
function at(t) {
|
|
2538
|
-
return
|
|
2558
|
+
return T(t) ? {
|
|
2539
2559
|
scrollLeft: t.scrollLeft,
|
|
2540
2560
|
scrollTop: t.scrollTop
|
|
2541
2561
|
} : {
|
|
@@ -2557,53 +2577,53 @@
|
|
|
2557
2577
|
}
|
|
2558
2578
|
function Ht(t) {
|
|
2559
2579
|
const e = V(t);
|
|
2560
|
-
return
|
|
2580
|
+
return K(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : k(e) && nt(e) ? e : Ht(e);
|
|
2561
2581
|
}
|
|
2562
2582
|
function tt(t, e, n) {
|
|
2563
2583
|
var i;
|
|
2564
2584
|
e === void 0 && (e = []), n === void 0 && (n = true);
|
|
2565
|
-
const s = Ht(t),
|
|
2566
|
-
if (
|
|
2567
|
-
const
|
|
2568
|
-
return e.concat(r2, r2.visualViewport || [], nt(s) ? s : [],
|
|
2585
|
+
const s = Ht(t), o = s === ((i = t.ownerDocument) == null ? void 0 : i.body), r2 = E(s);
|
|
2586
|
+
if (o) {
|
|
2587
|
+
const c2 = mt(r2);
|
|
2588
|
+
return e.concat(r2, r2.visualViewport || [], nt(s) ? s : [], c2 && n ? tt(c2) : []);
|
|
2569
2589
|
}
|
|
2570
2590
|
return e.concat(s, tt(s, [], n));
|
|
2571
2591
|
}
|
|
2572
|
-
function
|
|
2592
|
+
function mt(t) {
|
|
2573
2593
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
2574
2594
|
}
|
|
2575
2595
|
function It(t) {
|
|
2576
|
-
const e =
|
|
2596
|
+
const e = P(t);
|
|
2577
2597
|
let n = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
|
|
2578
|
-
const s = k(t),
|
|
2579
|
-
return
|
|
2598
|
+
const s = k(t), o = s ? t.offsetWidth : n, r2 = s ? t.offsetHeight : i, c2 = st(n) !== o || st(i) !== r2;
|
|
2599
|
+
return c2 && (n = o, i = r2), {
|
|
2580
2600
|
width: n,
|
|
2581
2601
|
height: i,
|
|
2582
|
-
$:
|
|
2602
|
+
$: c2
|
|
2583
2603
|
};
|
|
2584
2604
|
}
|
|
2585
2605
|
function vt(t) {
|
|
2586
|
-
return
|
|
2606
|
+
return T(t) ? t : t.contextElement;
|
|
2587
2607
|
}
|
|
2588
|
-
function
|
|
2608
|
+
function X(t) {
|
|
2589
2609
|
const e = vt(t);
|
|
2590
2610
|
if (!k(e))
|
|
2591
2611
|
return R(1);
|
|
2592
2612
|
const n = e.getBoundingClientRect(), {
|
|
2593
2613
|
width: i,
|
|
2594
2614
|
height: s,
|
|
2595
|
-
$:
|
|
2615
|
+
$: o
|
|
2596
2616
|
} = It(e);
|
|
2597
|
-
let r2 = (
|
|
2598
|
-
return (!r2 || !Number.isFinite(r2)) && (r2 = 1), (!
|
|
2617
|
+
let r2 = (o ? st(n.width) : n.width) / i, c2 = (o ? st(n.height) : n.height) / s;
|
|
2618
|
+
return (!r2 || !Number.isFinite(r2)) && (r2 = 1), (!c2 || !Number.isFinite(c2)) && (c2 = 1), {
|
|
2599
2619
|
x: r2,
|
|
2600
|
-
y:
|
|
2620
|
+
y: c2
|
|
2601
2621
|
};
|
|
2602
2622
|
}
|
|
2603
2623
|
const Me = /* @__PURE__ */ R(0);
|
|
2604
2624
|
function Vt(t) {
|
|
2605
2625
|
const e = E(t);
|
|
2606
|
-
return !
|
|
2626
|
+
return !bt() || !e.visualViewport ? Me : {
|
|
2607
2627
|
x: e.visualViewport.offsetLeft,
|
|
2608
2628
|
y: e.visualViewport.offsetTop
|
|
2609
2629
|
};
|
|
@@ -2613,115 +2633,117 @@
|
|
|
2613
2633
|
}
|
|
2614
2634
|
function U(t, e, n, i) {
|
|
2615
2635
|
e === void 0 && (e = false), n === void 0 && (n = false);
|
|
2616
|
-
const s = t.getBoundingClientRect(),
|
|
2636
|
+
const s = t.getBoundingClientRect(), o = vt(t);
|
|
2617
2637
|
let r2 = R(1);
|
|
2618
|
-
e && (i ?
|
|
2619
|
-
const
|
|
2620
|
-
let
|
|
2621
|
-
if (
|
|
2622
|
-
const g2 = E(
|
|
2623
|
-
let h2 = g2, m2 =
|
|
2638
|
+
e && (i ? T(i) && (r2 = X(i)) : r2 = X(t));
|
|
2639
|
+
const c2 = $e(o, n, i) ? Vt(o) : R(0);
|
|
2640
|
+
let l = (s.left + c2.x) / r2.x, a2 = (s.top + c2.y) / r2.y, d2 = s.width / r2.x, u2 = s.height / r2.y;
|
|
2641
|
+
if (o) {
|
|
2642
|
+
const g2 = E(o), f2 = i && T(i) ? E(i) : i;
|
|
2643
|
+
let h2 = g2, m2 = mt(h2);
|
|
2624
2644
|
for (; m2 && i && f2 !== h2; ) {
|
|
2625
|
-
const p2 =
|
|
2626
|
-
|
|
2645
|
+
const p2 = X(m2), w2 = m2.getBoundingClientRect(), y2 = P(m2), x2 = w2.left + (m2.clientLeft + parseFloat(y2.paddingLeft)) * p2.x, v2 = w2.top + (m2.clientTop + parseFloat(y2.paddingTop)) * p2.y;
|
|
2646
|
+
l *= p2.x, a2 *= p2.y, d2 *= p2.x, u2 *= p2.y, l += x2, a2 += v2, h2 = E(m2), m2 = mt(h2);
|
|
2627
2647
|
}
|
|
2628
2648
|
}
|
|
2629
2649
|
return rt({
|
|
2630
2650
|
width: d2,
|
|
2631
2651
|
height: u2,
|
|
2632
|
-
x:
|
|
2652
|
+
x: l,
|
|
2633
2653
|
y: a2
|
|
2634
2654
|
});
|
|
2635
2655
|
}
|
|
2636
|
-
function
|
|
2656
|
+
function ft(t, e) {
|
|
2637
2657
|
const n = at(t).scrollLeft;
|
|
2638
2658
|
return e ? e.left + n : U(D(t)).left + n;
|
|
2639
2659
|
}
|
|
2640
|
-
function
|
|
2641
|
-
n
|
|
2642
|
-
const i = t.getBoundingClientRect(), s = i.left + e.scrollLeft - (n ? 0 : (
|
|
2643
|
-
// RTL <body> scrollbar.
|
|
2644
|
-
bt(t, i)
|
|
2645
|
-
)), o2 = i.top + e.scrollTop;
|
|
2660
|
+
function Wt(t, e) {
|
|
2661
|
+
const n = t.getBoundingClientRect(), i = n.left + e.scrollLeft - ft(t, n), s = n.top + e.scrollTop;
|
|
2646
2662
|
return {
|
|
2647
|
-
x:
|
|
2648
|
-
y:
|
|
2663
|
+
x: i,
|
|
2664
|
+
y: s
|
|
2649
2665
|
};
|
|
2650
2666
|
}
|
|
2651
|
-
function
|
|
2667
|
+
function Fe(t) {
|
|
2652
2668
|
let {
|
|
2653
2669
|
elements: e,
|
|
2654
2670
|
rect: n,
|
|
2655
2671
|
offsetParent: i,
|
|
2656
2672
|
strategy: s
|
|
2657
2673
|
} = t;
|
|
2658
|
-
const
|
|
2659
|
-
if (i === r2 ||
|
|
2674
|
+
const o = s === "fixed", r2 = D(i), c2 = e ? lt(e.floating) : false;
|
|
2675
|
+
if (i === r2 || c2 && o)
|
|
2660
2676
|
return n;
|
|
2661
|
-
let
|
|
2677
|
+
let l = {
|
|
2662
2678
|
scrollLeft: 0,
|
|
2663
2679
|
scrollTop: 0
|
|
2664
2680
|
}, a2 = R(1);
|
|
2665
2681
|
const d2 = R(0), u2 = k(i);
|
|
2666
|
-
if ((u2 || !u2 && !
|
|
2682
|
+
if ((u2 || !u2 && !o) && ((J(i) !== "body" || nt(r2)) && (l = at(i)), k(i))) {
|
|
2667
2683
|
const f2 = U(i);
|
|
2668
|
-
a2 =
|
|
2684
|
+
a2 = X(i), d2.x = f2.x + i.clientLeft, d2.y = f2.y + i.clientTop;
|
|
2669
2685
|
}
|
|
2670
|
-
const g2 = r2 && !u2 && !
|
|
2686
|
+
const g2 = r2 && !u2 && !o ? Wt(r2, l) : R(0);
|
|
2671
2687
|
return {
|
|
2672
2688
|
width: n.width * a2.x,
|
|
2673
2689
|
height: n.height * a2.y,
|
|
2674
|
-
x: n.x * a2.x -
|
|
2675
|
-
y: n.y * a2.y -
|
|
2690
|
+
x: n.x * a2.x - l.scrollLeft * a2.x + d2.x + g2.x,
|
|
2691
|
+
y: n.y * a2.y - l.scrollTop * a2.y + d2.y + g2.y
|
|
2676
2692
|
};
|
|
2677
2693
|
}
|
|
2678
|
-
function
|
|
2694
|
+
function Ne(t) {
|
|
2679
2695
|
return Array.from(t.getClientRects());
|
|
2680
2696
|
}
|
|
2681
2697
|
function He(t) {
|
|
2682
|
-
const e = D(t), n = at(t), i = t.ownerDocument.body, s = j(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth),
|
|
2683
|
-
let r2 = -n.scrollLeft +
|
|
2684
|
-
const
|
|
2685
|
-
return
|
|
2698
|
+
const e = D(t), n = at(t), i = t.ownerDocument.body, s = j(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), o = j(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
|
|
2699
|
+
let r2 = -n.scrollLeft + ft(t);
|
|
2700
|
+
const c2 = -n.scrollTop;
|
|
2701
|
+
return P(i).direction === "rtl" && (r2 += j(e.clientWidth, i.clientWidth) - s), {
|
|
2686
2702
|
width: s,
|
|
2687
|
-
height:
|
|
2703
|
+
height: o,
|
|
2688
2704
|
x: r2,
|
|
2689
|
-
y:
|
|
2705
|
+
y: c2
|
|
2690
2706
|
};
|
|
2691
2707
|
}
|
|
2708
|
+
const Lt = 25;
|
|
2692
2709
|
function Ie(t, e) {
|
|
2693
2710
|
const n = E(t), i = D(t), s = n.visualViewport;
|
|
2694
|
-
let
|
|
2711
|
+
let o = i.clientWidth, r2 = i.clientHeight, c2 = 0, l = 0;
|
|
2695
2712
|
if (s) {
|
|
2696
|
-
|
|
2697
|
-
const
|
|
2698
|
-
(!
|
|
2699
|
-
}
|
|
2713
|
+
o = s.width, r2 = s.height;
|
|
2714
|
+
const d2 = bt();
|
|
2715
|
+
(!d2 || d2 && e === "fixed") && (c2 = s.offsetLeft, l = s.offsetTop);
|
|
2716
|
+
}
|
|
2717
|
+
const a2 = ft(i);
|
|
2718
|
+
if (a2 <= 0) {
|
|
2719
|
+
const d2 = i.ownerDocument, u2 = d2.body, g2 = getComputedStyle(u2), f2 = d2.compatMode === "CSS1Compat" && parseFloat(g2.marginLeft) + parseFloat(g2.marginRight) || 0, h2 = Math.abs(i.clientWidth - u2.clientWidth - f2);
|
|
2720
|
+
h2 <= Lt && (o -= h2);
|
|
2721
|
+
} else a2 <= Lt && (o += a2);
|
|
2700
2722
|
return {
|
|
2701
|
-
width:
|
|
2723
|
+
width: o,
|
|
2702
2724
|
height: r2,
|
|
2703
|
-
x:
|
|
2704
|
-
y:
|
|
2725
|
+
x: c2,
|
|
2726
|
+
y: l
|
|
2705
2727
|
};
|
|
2706
2728
|
}
|
|
2707
2729
|
const Ve = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
2708
|
-
function
|
|
2709
|
-
const n = U(t, true, e === "fixed"), i = n.top + t.clientTop, s = n.left + t.clientLeft,
|
|
2730
|
+
function We(t, e) {
|
|
2731
|
+
const n = U(t, true, e === "fixed"), i = n.top + t.clientTop, s = n.left + t.clientLeft, o = k(t) ? X(t) : R(1), r2 = t.clientWidth * o.x, c2 = t.clientHeight * o.y, l = s * o.x, a2 = i * o.y;
|
|
2710
2732
|
return {
|
|
2711
2733
|
width: r2,
|
|
2712
|
-
height:
|
|
2713
|
-
x:
|
|
2734
|
+
height: c2,
|
|
2735
|
+
x: l,
|
|
2714
2736
|
y: a2
|
|
2715
2737
|
};
|
|
2716
2738
|
}
|
|
2717
|
-
function
|
|
2739
|
+
function Ot(t, e, n) {
|
|
2718
2740
|
let i;
|
|
2719
2741
|
if (e === "viewport")
|
|
2720
2742
|
i = Ie(t, n);
|
|
2721
2743
|
else if (e === "document")
|
|
2722
2744
|
i = He(D(t));
|
|
2723
|
-
else if (
|
|
2724
|
-
i =
|
|
2745
|
+
else if (T(e))
|
|
2746
|
+
i = We(e, n);
|
|
2725
2747
|
else {
|
|
2726
2748
|
const s = Vt(t);
|
|
2727
2749
|
i = {
|
|
@@ -2733,20 +2755,20 @@
|
|
|
2733
2755
|
}
|
|
2734
2756
|
return rt(i);
|
|
2735
2757
|
}
|
|
2736
|
-
function
|
|
2758
|
+
function Bt(t, e) {
|
|
2737
2759
|
const n = V(t);
|
|
2738
|
-
return n === e || !
|
|
2760
|
+
return n === e || !T(n) || K(n) ? false : P(n).position === "fixed" || Bt(n, e);
|
|
2739
2761
|
}
|
|
2740
|
-
function
|
|
2762
|
+
function Be(t, e) {
|
|
2741
2763
|
const n = e.get(t);
|
|
2742
2764
|
if (n)
|
|
2743
2765
|
return n;
|
|
2744
|
-
let i = tt(t, [], false).filter((
|
|
2745
|
-
const
|
|
2746
|
-
let r2 =
|
|
2747
|
-
for (;
|
|
2748
|
-
const
|
|
2749
|
-
!
|
|
2766
|
+
let i = tt(t, [], false).filter((c2) => T(c2) && J(c2) !== "body"), s = null;
|
|
2767
|
+
const o = P(t).position === "fixed";
|
|
2768
|
+
let r2 = o ? V(t) : t;
|
|
2769
|
+
for (; T(r2) && !K(r2); ) {
|
|
2770
|
+
const c2 = P(r2), l = xt(r2);
|
|
2771
|
+
!l && c2.position === "fixed" && (s = null), (o ? !l && !s : !l && c2.position === "static" && !!s && Ve.has(s.position) || nt(r2) && !l && Bt(t, r2)) ? i = i.filter((d2) => d2 !== r2) : s = c2, r2 = V(r2);
|
|
2750
2772
|
}
|
|
2751
2773
|
return e.set(t, i), i;
|
|
2752
2774
|
}
|
|
@@ -2757,15 +2779,15 @@
|
|
|
2757
2779
|
rootBoundary: i,
|
|
2758
2780
|
strategy: s
|
|
2759
2781
|
} = t;
|
|
2760
|
-
const r2 = [...n === "clippingAncestors" ? lt(e) ? [] :
|
|
2761
|
-
const u2 =
|
|
2762
|
-
return a2.top = j(u2.top, a2.top), a2.right =
|
|
2763
|
-
},
|
|
2782
|
+
const r2 = [...n === "clippingAncestors" ? lt(e) ? [] : Be(e, this._c) : [].concat(n), i], c2 = r2[0], l = r2.reduce((a2, d2) => {
|
|
2783
|
+
const u2 = Ot(e, d2, s);
|
|
2784
|
+
return a2.top = j(u2.top, a2.top), a2.right = Y(u2.right, a2.right), a2.bottom = Y(u2.bottom, a2.bottom), a2.left = j(u2.left, a2.left), a2;
|
|
2785
|
+
}, Ot(e, c2, s));
|
|
2764
2786
|
return {
|
|
2765
|
-
width:
|
|
2766
|
-
height:
|
|
2767
|
-
x:
|
|
2768
|
-
y:
|
|
2787
|
+
width: l.right - l.left,
|
|
2788
|
+
height: l.bottom - l.top,
|
|
2789
|
+
x: l.left,
|
|
2790
|
+
y: l.top
|
|
2769
2791
|
};
|
|
2770
2792
|
}
|
|
2771
2793
|
function ze(t) {
|
|
@@ -2779,22 +2801,22 @@
|
|
|
2779
2801
|
};
|
|
2780
2802
|
}
|
|
2781
2803
|
function je(t, e, n) {
|
|
2782
|
-
const i = k(e), s = D(e),
|
|
2783
|
-
let
|
|
2804
|
+
const i = k(e), s = D(e), o = n === "fixed", r2 = U(t, true, o, e);
|
|
2805
|
+
let c2 = {
|
|
2784
2806
|
scrollLeft: 0,
|
|
2785
2807
|
scrollTop: 0
|
|
2786
2808
|
};
|
|
2787
|
-
const
|
|
2809
|
+
const l = R(0);
|
|
2788
2810
|
function a2() {
|
|
2789
|
-
|
|
2811
|
+
l.x = ft(s);
|
|
2790
2812
|
}
|
|
2791
|
-
if (i || !i && !
|
|
2792
|
-
if ((J(e) !== "body" || nt(s)) && (
|
|
2793
|
-
const f2 = U(e, true,
|
|
2794
|
-
|
|
2813
|
+
if (i || !i && !o)
|
|
2814
|
+
if ((J(e) !== "body" || nt(s)) && (c2 = at(e)), i) {
|
|
2815
|
+
const f2 = U(e, true, o, e);
|
|
2816
|
+
l.x = f2.x + e.clientLeft, l.y = f2.y + e.clientTop;
|
|
2795
2817
|
} else s && a2();
|
|
2796
|
-
|
|
2797
|
-
const d2 = s && !i && !
|
|
2818
|
+
o && !i && s && a2();
|
|
2819
|
+
const d2 = s && !i && !o ? Wt(s, c2) : R(0), u2 = r2.left + c2.scrollLeft - l.x - d2.x, g2 = r2.top + c2.scrollTop - l.y - d2.y;
|
|
2798
2820
|
return {
|
|
2799
2821
|
x: u2,
|
|
2800
2822
|
y: g2,
|
|
@@ -2802,11 +2824,11 @@
|
|
|
2802
2824
|
height: r2.height
|
|
2803
2825
|
};
|
|
2804
2826
|
}
|
|
2805
|
-
function
|
|
2806
|
-
return
|
|
2827
|
+
function ut(t) {
|
|
2828
|
+
return P(t).position === "static";
|
|
2807
2829
|
}
|
|
2808
|
-
function
|
|
2809
|
-
if (!k(t) ||
|
|
2830
|
+
function Tt(t, e) {
|
|
2831
|
+
if (!k(t) || P(t).position === "fixed")
|
|
2810
2832
|
return null;
|
|
2811
2833
|
if (e)
|
|
2812
2834
|
return e(t);
|
|
@@ -2819,17 +2841,17 @@
|
|
|
2819
2841
|
return n;
|
|
2820
2842
|
if (!k(t)) {
|
|
2821
2843
|
let s = V(t);
|
|
2822
|
-
for (; s && !
|
|
2823
|
-
if (
|
|
2844
|
+
for (; s && !K(s); ) {
|
|
2845
|
+
if (T(s) && !ut(s))
|
|
2824
2846
|
return s;
|
|
2825
2847
|
s = V(s);
|
|
2826
2848
|
}
|
|
2827
2849
|
return n;
|
|
2828
2850
|
}
|
|
2829
|
-
let i =
|
|
2830
|
-
for (; i && Le(i) &&
|
|
2831
|
-
i =
|
|
2832
|
-
return i &&
|
|
2851
|
+
let i = Tt(t, e);
|
|
2852
|
+
for (; i && Le(i) && ut(i); )
|
|
2853
|
+
i = Tt(i, e);
|
|
2854
|
+
return i && K(i) && ut(i) && !xt(i) ? n : i || ke(t) || n;
|
|
2833
2855
|
}
|
|
2834
2856
|
const qe = async function(t) {
|
|
2835
2857
|
const e = this.getOffsetParent || _t, n = this.getDimensions, i = await n(t.floating);
|
|
@@ -2844,84 +2866,84 @@
|
|
|
2844
2866
|
};
|
|
2845
2867
|
};
|
|
2846
2868
|
function Ue(t) {
|
|
2847
|
-
return
|
|
2869
|
+
return P(t).direction === "rtl";
|
|
2848
2870
|
}
|
|
2849
|
-
const
|
|
2850
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
2871
|
+
const Xe = {
|
|
2872
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Fe,
|
|
2851
2873
|
getDocumentElement: D,
|
|
2852
2874
|
getClippingRect: _e,
|
|
2853
2875
|
getOffsetParent: _t,
|
|
2854
2876
|
getElementRects: qe,
|
|
2855
|
-
getClientRects:
|
|
2877
|
+
getClientRects: Ne,
|
|
2856
2878
|
getDimensions: ze,
|
|
2857
|
-
getScale:
|
|
2858
|
-
isElement:
|
|
2879
|
+
getScale: X,
|
|
2880
|
+
isElement: T,
|
|
2859
2881
|
isRTL: Ue
|
|
2860
2882
|
};
|
|
2861
2883
|
function zt(t, e) {
|
|
2862
2884
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
2863
2885
|
}
|
|
2864
|
-
function
|
|
2886
|
+
function Ye(t, e) {
|
|
2865
2887
|
let n = null, i;
|
|
2866
2888
|
const s = D(t);
|
|
2867
|
-
function
|
|
2868
|
-
var
|
|
2869
|
-
clearTimeout(i), (
|
|
2889
|
+
function o() {
|
|
2890
|
+
var c2;
|
|
2891
|
+
clearTimeout(i), (c2 = n) == null || c2.disconnect(), n = null;
|
|
2870
2892
|
}
|
|
2871
|
-
function r2(
|
|
2872
|
-
|
|
2893
|
+
function r2(c2, l) {
|
|
2894
|
+
c2 === void 0 && (c2 = false), l === void 0 && (l = 1), o();
|
|
2873
2895
|
const a2 = t.getBoundingClientRect(), {
|
|
2874
2896
|
left: d2,
|
|
2875
2897
|
top: u2,
|
|
2876
2898
|
width: g2,
|
|
2877
2899
|
height: f2
|
|
2878
2900
|
} = a2;
|
|
2879
|
-
if (
|
|
2901
|
+
if (c2 || e(), !g2 || !f2)
|
|
2880
2902
|
return;
|
|
2881
2903
|
const h2 = it(u2), m2 = it(s.clientWidth - (d2 + g2)), p2 = it(s.clientHeight - (u2 + f2)), w2 = it(d2), x2 = {
|
|
2882
2904
|
rootMargin: -h2 + "px " + -m2 + "px " + -p2 + "px " + -w2 + "px",
|
|
2883
|
-
threshold: j(0,
|
|
2905
|
+
threshold: j(0, Y(1, l)) || 1
|
|
2884
2906
|
};
|
|
2885
|
-
let
|
|
2886
|
-
function
|
|
2907
|
+
let v2 = true;
|
|
2908
|
+
function b2(C2) {
|
|
2887
2909
|
const S2 = C2[0].intersectionRatio;
|
|
2888
|
-
if (S2 !==
|
|
2889
|
-
if (!
|
|
2910
|
+
if (S2 !== l) {
|
|
2911
|
+
if (!v2)
|
|
2890
2912
|
return r2();
|
|
2891
2913
|
S2 ? r2(false, S2) : i = setTimeout(() => {
|
|
2892
2914
|
r2(false, 1e-7);
|
|
2893
2915
|
}, 1e3);
|
|
2894
2916
|
}
|
|
2895
|
-
S2 === 1 && !zt(a2, t.getBoundingClientRect()) && r2(),
|
|
2917
|
+
S2 === 1 && !zt(a2, t.getBoundingClientRect()) && r2(), v2 = false;
|
|
2896
2918
|
}
|
|
2897
2919
|
try {
|
|
2898
|
-
n = new IntersectionObserver(
|
|
2920
|
+
n = new IntersectionObserver(b2, {
|
|
2899
2921
|
...x2,
|
|
2900
2922
|
// Handle <iframe>s
|
|
2901
2923
|
root: s.ownerDocument
|
|
2902
2924
|
});
|
|
2903
2925
|
} catch {
|
|
2904
|
-
n = new IntersectionObserver(
|
|
2926
|
+
n = new IntersectionObserver(b2, x2);
|
|
2905
2927
|
}
|
|
2906
2928
|
n.observe(t);
|
|
2907
2929
|
}
|
|
2908
|
-
return r2(true),
|
|
2930
|
+
return r2(true), o;
|
|
2909
2931
|
}
|
|
2910
|
-
function
|
|
2932
|
+
function Ke(t, e, n, i) {
|
|
2911
2933
|
i === void 0 && (i = {});
|
|
2912
2934
|
const {
|
|
2913
2935
|
ancestorScroll: s = true,
|
|
2914
|
-
ancestorResize:
|
|
2936
|
+
ancestorResize: o = true,
|
|
2915
2937
|
elementResize: r2 = typeof ResizeObserver == "function",
|
|
2916
|
-
layoutShift:
|
|
2917
|
-
animationFrame:
|
|
2918
|
-
} = i, a2 = vt(t), d2 = s ||
|
|
2938
|
+
layoutShift: c2 = typeof IntersectionObserver == "function",
|
|
2939
|
+
animationFrame: l = false
|
|
2940
|
+
} = i, a2 = vt(t), d2 = s || o ? [...a2 ? tt(a2) : [], ...tt(e)] : [];
|
|
2919
2941
|
d2.forEach((w2) => {
|
|
2920
2942
|
s && w2.addEventListener("scroll", n, {
|
|
2921
2943
|
passive: true
|
|
2922
|
-
}),
|
|
2944
|
+
}), o && w2.addEventListener("resize", n);
|
|
2923
2945
|
});
|
|
2924
|
-
const u2 = a2 &&
|
|
2946
|
+
const u2 = a2 && c2 ? Ye(a2, n) : null;
|
|
2925
2947
|
let g2 = -1, f2 = null;
|
|
2926
2948
|
r2 && (f2 = new ResizeObserver((w2) => {
|
|
2927
2949
|
let [y2] = w2;
|
|
@@ -2929,9 +2951,9 @@
|
|
|
2929
2951
|
var x2;
|
|
2930
2952
|
(x2 = f2) == null || x2.observe(e);
|
|
2931
2953
|
})), n();
|
|
2932
|
-
}), a2 && !
|
|
2933
|
-
let h2, m2 =
|
|
2934
|
-
|
|
2954
|
+
}), a2 && !l && f2.observe(a2), f2.observe(e));
|
|
2955
|
+
let h2, m2 = l ? U(t) : null;
|
|
2956
|
+
l && p2();
|
|
2935
2957
|
function p2() {
|
|
2936
2958
|
const w2 = U(t);
|
|
2937
2959
|
m2 && !zt(m2, w2) && n(), m2 = w2, h2 = requestAnimationFrame(p2);
|
|
@@ -2939,21 +2961,21 @@
|
|
|
2939
2961
|
return n(), () => {
|
|
2940
2962
|
var w2;
|
|
2941
2963
|
d2.forEach((y2) => {
|
|
2942
|
-
s && y2.removeEventListener("scroll", n),
|
|
2943
|
-
}), u2?.(), (w2 = f2) == null || w2.disconnect(), f2 = null,
|
|
2964
|
+
s && y2.removeEventListener("scroll", n), o && y2.removeEventListener("resize", n);
|
|
2965
|
+
}), u2?.(), (w2 = f2) == null || w2.disconnect(), f2 = null, l && cancelAnimationFrame(h2);
|
|
2944
2966
|
};
|
|
2945
2967
|
}
|
|
2946
|
-
const Je =
|
|
2968
|
+
const Je = ve, Ze = Ae, Ge = xe, Qe = ye, tn = Ee, en = (t, e, n) => {
|
|
2947
2969
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
2948
|
-
platform:
|
|
2970
|
+
platform: Xe,
|
|
2949
2971
|
...n
|
|
2950
|
-
},
|
|
2972
|
+
}, o = {
|
|
2951
2973
|
...s.platform,
|
|
2952
2974
|
_c: i
|
|
2953
2975
|
};
|
|
2954
2976
|
return we(t, e, {
|
|
2955
2977
|
...s,
|
|
2956
|
-
platform:
|
|
2978
|
+
platform: o
|
|
2957
2979
|
});
|
|
2958
2980
|
};
|
|
2959
2981
|
function Pt(t, e, n) {
|
|
@@ -2970,7 +2992,7 @@
|
|
|
2970
2992
|
throw new Error(`Provided delay value is not a number: "${n}"`);
|
|
2971
2993
|
return i;
|
|
2972
2994
|
}
|
|
2973
|
-
function
|
|
2995
|
+
function dt(t) {
|
|
2974
2996
|
let e;
|
|
2975
2997
|
const n = typeof t == "string" ? t.trim().split(" ").map((i) => parseFloat(i)).filter((i) => !isNaN(i)) : [t];
|
|
2976
2998
|
for (let i = 0; i < n.length; i++)
|
|
@@ -3013,24 +3035,18 @@
|
|
|
3013
3035
|
return {
|
|
3014
3036
|
offset: Number(t.getSetting("offset")),
|
|
3015
3037
|
flip: {
|
|
3016
|
-
padding:
|
|
3038
|
+
padding: dt(t.getSetting("flip-padding"))
|
|
3017
3039
|
},
|
|
3018
3040
|
shift: {
|
|
3019
|
-
padding:
|
|
3041
|
+
padding: dt(t.getSetting("shift-padding"))
|
|
3020
3042
|
},
|
|
3021
3043
|
arrow: {
|
|
3022
3044
|
selector: t.getSetting("selectorArrow"),
|
|
3023
3045
|
element: null,
|
|
3024
|
-
padding:
|
|
3046
|
+
padding: dt(t.getSetting("arrow-padding"))
|
|
3025
3047
|
}
|
|
3026
3048
|
};
|
|
3027
3049
|
}
|
|
3028
|
-
function Tt(t) {
|
|
3029
|
-
const e = this.get(t);
|
|
3030
|
-
if (e)
|
|
3031
|
-
return e;
|
|
3032
|
-
throw new Error(`Popover not found in collection with id of "${t}".`);
|
|
3033
|
-
}
|
|
3034
3050
|
async function qt(t) {
|
|
3035
3051
|
return t && t.state === "opened" && (t.el.inert = true, t.el.classList.remove(t.parent.settings.stateActive), t.isTooltip || t.trigger?.setAttribute("aria-expanded", "false"), t.floatingCleanup(), t.state = "closed", t.trigger === t.parent.trigger && (t.parent.trigger = null), t.el.dispatchEvent(
|
|
3036
3052
|
new CustomEvent(t.getSetting("customEventPrefix") + "closed", {
|
|
@@ -3045,7 +3061,7 @@
|
|
|
3045
3061
|
n.state === "opened" && e.push(await n.close());
|
|
3046
3062
|
return e;
|
|
3047
3063
|
}
|
|
3048
|
-
function
|
|
3064
|
+
function Xt(t) {
|
|
3049
3065
|
t.state == "opened" && setTimeout(() => (document.activeElement?.closest(
|
|
3050
3066
|
`#${t.id}, [aria-controls="${t.id}"], [aria-describedby="${t.id}"]`
|
|
3051
3067
|
) || t.close(), t), 1);
|
|
@@ -3070,7 +3086,7 @@
|
|
|
3070
3086
|
function cn(t, e) {
|
|
3071
3087
|
setTimeout(() => {
|
|
3072
3088
|
t.isHovered = e, !t.isHovered && (t.toggleDelayId && clearTimeout(t.toggleDelayId), t.toggleDelayId = setTimeout(
|
|
3073
|
-
() =>
|
|
3089
|
+
() => Xt(t),
|
|
3074
3090
|
jt(t, 1)
|
|
3075
3091
|
));
|
|
3076
3092
|
}, 1);
|
|
@@ -3082,7 +3098,7 @@
|
|
|
3082
3098
|
return;
|
|
3083
3099
|
case "Tab":
|
|
3084
3100
|
this.collection.forEach((e) => {
|
|
3085
|
-
|
|
3101
|
+
Xt(e);
|
|
3086
3102
|
});
|
|
3087
3103
|
return;
|
|
3088
3104
|
default:
|
|
@@ -3098,12 +3114,12 @@
|
|
|
3098
3114
|
) ? 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)));
|
|
3099
3115
|
});
|
|
3100
3116
|
}
|
|
3101
|
-
async function
|
|
3117
|
+
async function Yt(t) {
|
|
3102
3118
|
t.el.inert = false, t.el.classList.add(t.parent.settings.stateActive), t.isTooltip || t.trigger?.setAttribute("aria-expanded", "true"), t.buildCustomProps();
|
|
3103
3119
|
const e = nn(t), n = t.el.querySelector(
|
|
3104
3120
|
e.arrow.selector
|
|
3105
3121
|
);
|
|
3106
|
-
return e.arrow.element = n || null, t.trigger instanceof HTMLElement && (t.floatingCleanup =
|
|
3122
|
+
return e.arrow.element = n || null, t.trigger instanceof HTMLElement && (t.floatingCleanup = Ke(t.trigger, t.el, () => {
|
|
3107
3123
|
const i = [
|
|
3108
3124
|
Ge(e.flip),
|
|
3109
3125
|
Ze({ ...e.shift, limiter: tn() }),
|
|
@@ -3117,11 +3133,11 @@
|
|
|
3117
3133
|
), en(t.trigger, t.el, {
|
|
3118
3134
|
placement: t.getSetting("placement"),
|
|
3119
3135
|
middleware: i
|
|
3120
|
-
}).then(({ x: s, y:
|
|
3136
|
+
}).then(({ x: s, y: o, placement: r2, middlewareData: c2 }) => {
|
|
3121
3137
|
if (t.el) {
|
|
3122
|
-
if (Pt(t.el, s,
|
|
3123
|
-
const { x:
|
|
3124
|
-
Pt(e.arrow.element,
|
|
3138
|
+
if (Pt(t.el, s, o), e.arrow.element && c2.arrow) {
|
|
3139
|
+
const { x: l, y: a2 } = c2.arrow;
|
|
3140
|
+
Pt(e.arrow.element, l, a2);
|
|
3125
3141
|
}
|
|
3126
3142
|
t.el.setAttribute("data-floating-placement", r2);
|
|
3127
3143
|
}
|
|
@@ -3162,7 +3178,7 @@
|
|
|
3162
3178
|
}
|
|
3163
3179
|
}
|
|
3164
3180
|
async open() {
|
|
3165
|
-
return
|
|
3181
|
+
return Yt(this);
|
|
3166
3182
|
}
|
|
3167
3183
|
async close() {
|
|
3168
3184
|
return qt(this);
|
|
@@ -3240,11 +3256,11 @@
|
|
|
3240
3256
|
return this.collection.find((e) => e.state == "opened" && e.getSetting("event") == "hover");
|
|
3241
3257
|
}
|
|
3242
3258
|
async open(e) {
|
|
3243
|
-
const n =
|
|
3244
|
-
return
|
|
3259
|
+
const n = this.getOrThrow(e);
|
|
3260
|
+
return Yt(n);
|
|
3245
3261
|
}
|
|
3246
3262
|
async close(e) {
|
|
3247
|
-
const n = e ?
|
|
3263
|
+
const n = e ? this.getOrThrow(e) : void 0;
|
|
3248
3264
|
return n ? qt(n) : Ut(this);
|
|
3249
3265
|
}
|
|
3250
3266
|
async afterMount() {
|
|
@@ -3257,10 +3273,10 @@
|
|
|
3257
3273
|
document.removeEventListener("keydown", this.#t, false);
|
|
3258
3274
|
}
|
|
3259
3275
|
}
|
|
3260
|
-
exports2.Drawer =
|
|
3261
|
-
exports2.Modal =
|
|
3276
|
+
exports2.Drawer = _;
|
|
3277
|
+
exports2.Modal = H$1;
|
|
3262
3278
|
exports2.Popover = un;
|
|
3263
3279
|
exports2.core = index;
|
|
3264
3280
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
3265
|
-
});
|
|
3281
|
+
}));
|
|
3266
3282
|
//# sourceMappingURL=index.umd.cjs.map
|