@luzmo/lucero 0.0.38 → 0.0.39
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/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +1 -1
- package/components/button/index.cjs +1 -1
- package/components/button/index.js +17 -17
- package/components/color-menu/color-menu.d.ts +5 -3
- package/components/color-menu/index.cjs +6 -6
- package/components/color-menu/index.js +10 -6
- package/components/color-picker/index.cjs +2 -3
- package/components/color-picker/index.js +22 -22
- package/components/index.cjs +1 -1
- package/components/index.js +58 -56
- package/components/menu/index.cjs +1 -1
- package/components/menu/index.js +1 -1
- package/components/overlay/hover-controller.d.ts +2 -0
- package/components/overlay/index.cjs +7 -7
- package/components/overlay/index.js +114 -110
- package/components/overlay/interaction-controller.d.ts +11 -5
- package/components/overlay/overlay-stack.d.ts +1 -0
- package/components/overlay/overlay-trigger.d.ts +25 -2
- package/components/{overlay-BBNyvs8F.js → overlay-DaOKAKMl.js} +423 -387
- package/components/overlay-lzq2PziH.cjs +47 -0
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -2
- package/components/{picker-daUT4cUN.js → picker-BmoXv1jt.js} +1 -1
- package/components/{picker-0tQg3Aob.cjs → picker-DWsBWdPN.cjs} +1 -1
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +1 -1
- package/components/strategies-BACP6MhR.cjs +18 -0
- package/custom-elements.json +1 -1
- package/package.json +1 -1
- package/utils/button-interaction-controllers/interaction-controller.d.ts +1 -0
- package/utils/button-interaction-controllers/mobile-controller.d.ts +0 -1
- package/components/overlay-o0tLxsk-.cjs +0 -47
- package/components/strategies-DGwsR7Xf.cjs +0 -18
- package/components/{strategies-Bc3hG-HA.js → strategies-9indNIEb.js} +1 -1
|
@@ -15,26 +15,26 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { a as
|
|
19
|
-
import { r as
|
|
20
|
-
import { e as
|
|
21
|
-
import { o as
|
|
22
|
-
import { o as
|
|
23
|
-
import { o as
|
|
24
|
-
import { r as
|
|
25
|
-
import { E as
|
|
26
|
-
import { u as
|
|
27
|
-
import { S as
|
|
28
|
-
import { c as
|
|
29
|
-
import { c as
|
|
30
|
-
function
|
|
18
|
+
import { a as me, r as ge, x as dt, n as z } from "./base-WsynuqaS.js";
|
|
19
|
+
import { r as ve } from "./state-Deh-vKYE.js";
|
|
20
|
+
import { e as ne } from "./query-D_KR_GUc.js";
|
|
21
|
+
import { o as ye } from "./query-assigned-elements-DjfhL1cl.js";
|
|
22
|
+
import { o as Pt } from "./if-defined-DOaE2coe.js";
|
|
23
|
+
import { o as Kt } from "./style-map-IgqIKvlE.js";
|
|
24
|
+
import { r as Ft } from "./random-id-ByCz1xaq.js";
|
|
25
|
+
import { E as we, e as be } from "./element-resolution-FCUT-wql.js";
|
|
26
|
+
import { u as ct } from "./focusable-selectors-B4YgbghQ.js";
|
|
27
|
+
import { S as Ee, r as xe } from "./slottable-request-event-DggLA4Rx.js";
|
|
28
|
+
import { c as At } from "./condition-attribute-with-id-Dv4lSRbe.js";
|
|
29
|
+
import { f as Yt, c as Ce, j as Pe } from "./platform-BM-uMWpX.js";
|
|
30
|
+
function Oe(e, t, i = []) {
|
|
31
31
|
for (const [n, o] of t.entries()) {
|
|
32
32
|
const s = e[n], r = s.parentElement || s.getRootNode();
|
|
33
33
|
i[n] && i[n](o), r && r !== s && s.replaceWith(o), delete e[n];
|
|
34
34
|
}
|
|
35
35
|
return t;
|
|
36
36
|
}
|
|
37
|
-
const
|
|
37
|
+
const Te = (e, t, {
|
|
38
38
|
position: i,
|
|
39
39
|
prepareCallback: n
|
|
40
40
|
} = { position: "beforeend" }) => {
|
|
@@ -53,12 +53,12 @@ const Pe = (e, t, {
|
|
|
53
53
|
d && d !== c && d.replaceChild(a[r], c), t.insertAdjacentElement(i, c), r += s;
|
|
54
54
|
} while (--o > 0);
|
|
55
55
|
return function() {
|
|
56
|
-
return
|
|
56
|
+
return Oe(a, e, l);
|
|
57
57
|
};
|
|
58
|
-
},
|
|
59
|
-
class
|
|
58
|
+
}, Ae = 1e3, Re = 1e3;
|
|
59
|
+
class De {
|
|
60
60
|
constructor(t = {}) {
|
|
61
|
-
this.warmUpDelay =
|
|
61
|
+
this.warmUpDelay = Ae, this.coolDownDelay = Re, this.isWarm = !1, this.timeout = 0, Object.assign(this, t);
|
|
62
62
|
}
|
|
63
63
|
openTimer(t) {
|
|
64
64
|
if (this.cancelCooldownTimer(), !this.component || t !== this.component)
|
|
@@ -83,8 +83,8 @@ class Te {
|
|
|
83
83
|
this.cooldownTimeout && window.clearTimeout(this.cooldownTimeout), delete this.cooldownTimeout;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
const
|
|
87
|
-
},
|
|
86
|
+
const gt = new De(), J = () => {
|
|
87
|
+
}, zt = (e, t, i) => {
|
|
88
88
|
const n = new AbortController(), o = /* @__PURE__ */ new Map(), s = () => {
|
|
89
89
|
n.abort(), i();
|
|
90
90
|
};
|
|
@@ -117,7 +117,7 @@ const mt = new Te(), J = () => {
|
|
|
117
117
|
function R() {
|
|
118
118
|
return new Promise((e) => requestAnimationFrame(() => e()));
|
|
119
119
|
}
|
|
120
|
-
class rt extends
|
|
120
|
+
class rt extends me {
|
|
121
121
|
constructor() {
|
|
122
122
|
super(...arguments), this.dispose = J, this.offset = 0, this.willPreventClose = !1;
|
|
123
123
|
}
|
|
@@ -193,10 +193,10 @@ class rt extends ue {
|
|
|
193
193
|
document.dispatchEvent(t);
|
|
194
194
|
}
|
|
195
195
|
static async open(t, i, n, o) {
|
|
196
|
-
await Promise.resolve().then(() =>
|
|
196
|
+
await Promise.resolve().then(() => kt);
|
|
197
197
|
const s = arguments.length === 2, r = n || t, a = new this();
|
|
198
198
|
let l = !1;
|
|
199
|
-
const h =
|
|
199
|
+
const h = Te([r], a, {
|
|
200
200
|
position: "beforeend",
|
|
201
201
|
prepareCallback: (f) => {
|
|
202
202
|
const u = f.slot;
|
|
@@ -232,10 +232,10 @@ class rt extends ue {
|
|
|
232
232
|
t.delayed = !!i.delayed, t.receivesFocus = i.receivesFocus ?? "auto", t.triggerElement = i.trigger || null, t.type = i.type || "modal", t.offset = i.offset ?? 0, t.placement = i.placement, t.willPreventClose = !!i.notImmediatelyClosable;
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
),
|
|
238
|
-
class
|
|
235
|
+
const Nt = (e) => e.querySelector(
|
|
236
|
+
ct
|
|
237
|
+
), _t = (e) => e.assignedElements().find((i) => i.matches(ct));
|
|
238
|
+
class $t extends Event {
|
|
239
239
|
constructor() {
|
|
240
240
|
super("beforetoggle", {
|
|
241
241
|
bubbles: !1,
|
|
@@ -243,7 +243,7 @@ class Nt extends Event {
|
|
|
243
243
|
}), this.currentState = "open", this.newState = "closed";
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
class
|
|
246
|
+
class Mt extends Event {
|
|
247
247
|
constructor() {
|
|
248
248
|
super("beforetoggle", {
|
|
249
249
|
bubbles: !1,
|
|
@@ -266,7 +266,7 @@ class S extends Event {
|
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
class
|
|
269
|
+
class bt {
|
|
270
270
|
constructor(t, i) {
|
|
271
271
|
this.x = 0, this.y = 0, this.x = t, this.y = i;
|
|
272
272
|
}
|
|
@@ -289,7 +289,7 @@ class wt {
|
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function Le(e) {
|
|
293
293
|
class t extends e {
|
|
294
294
|
async manageDialogOpen() {
|
|
295
295
|
const n = this.open;
|
|
@@ -309,9 +309,9 @@ function Ae(e) {
|
|
|
309
309
|
}
|
|
310
310
|
if (l > 0)
|
|
311
311
|
return;
|
|
312
|
-
const h = n ?
|
|
313
|
-
this.dispatchEvent(new h()), n && (a.matches(
|
|
314
|
-
o || (o =
|
|
312
|
+
const h = n ? Mt : $t;
|
|
313
|
+
this.dispatchEvent(new h()), n && (a.matches(ct) && (o = a), o = o || Nt(a), o || a.querySelectorAll("slot").forEach((d) => {
|
|
314
|
+
o || (o = _t(d));
|
|
315
315
|
}), !(!this.isConnected || this.dialogEl.open) && this.dialogEl.showModal());
|
|
316
316
|
}, r = (a, l) => () => {
|
|
317
317
|
if (this.open !== n)
|
|
@@ -329,7 +329,7 @@ function Ae(e) {
|
|
|
329
329
|
if (!this.isConnected || n !== this.open)
|
|
330
330
|
return;
|
|
331
331
|
const c = async () => {
|
|
332
|
-
const d = this.triggerElement instanceof
|
|
332
|
+
const d = this.triggerElement instanceof bt;
|
|
333
333
|
this.dispatchEvent(
|
|
334
334
|
new S(h, this, {
|
|
335
335
|
interaction: this.type,
|
|
@@ -356,7 +356,7 @@ function Ae(e) {
|
|
|
356
356
|
), this.dialogEl.close()) : c();
|
|
357
357
|
};
|
|
358
358
|
return this.elements.forEach((a, l) => {
|
|
359
|
-
|
|
359
|
+
zt(a, s(a, l), r(a, l));
|
|
360
360
|
}), o;
|
|
361
361
|
}
|
|
362
362
|
dialogApplyFocus(n, o) {
|
|
@@ -365,17 +365,17 @@ function Ae(e) {
|
|
|
365
365
|
}
|
|
366
366
|
return t;
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function Se(e) {
|
|
369
369
|
class t extends e {
|
|
370
370
|
async managePopoverOpen() {
|
|
371
371
|
await this.managePosition();
|
|
372
372
|
}
|
|
373
373
|
async manageDelay(n) {
|
|
374
374
|
if (n === !1 || n !== this.open) {
|
|
375
|
-
|
|
375
|
+
gt.close(this);
|
|
376
376
|
return;
|
|
377
377
|
}
|
|
378
|
-
this.delayed && await
|
|
378
|
+
this.delayed && await gt.openTimer(this) && (this.open = !n);
|
|
379
379
|
}
|
|
380
380
|
ensureOnDOM(n) {
|
|
381
381
|
document.body.offsetHeight;
|
|
@@ -388,13 +388,13 @@ function Re(e) {
|
|
|
388
388
|
if (n !== this.open)
|
|
389
389
|
return;
|
|
390
390
|
if (a.open = n, l === 0) {
|
|
391
|
-
const c = n ?
|
|
391
|
+
const c = n ? Mt : $t;
|
|
392
392
|
this.dispatchEvent(new c());
|
|
393
393
|
}
|
|
394
|
-
if (n !== !0 || (a.matches(
|
|
394
|
+
if (n !== !0 || (a.matches(ct) && (o = a), o = o || Nt(a), o))
|
|
395
395
|
return;
|
|
396
396
|
a.querySelectorAll("slot").forEach((c) => {
|
|
397
|
-
o || (o =
|
|
397
|
+
o || (o = _t(c));
|
|
398
398
|
});
|
|
399
399
|
}, r = (a, l) => async () => {
|
|
400
400
|
if (this.open !== n)
|
|
@@ -406,7 +406,7 @@ function Re(e) {
|
|
|
406
406
|
})
|
|
407
407
|
), l > 0)
|
|
408
408
|
return;
|
|
409
|
-
const c = this.triggerElement instanceof
|
|
409
|
+
const c = this.triggerElement instanceof bt;
|
|
410
410
|
this.dispatchEvent(
|
|
411
411
|
new S(h, this, {
|
|
412
412
|
interaction: this.type,
|
|
@@ -420,14 +420,14 @@ function Re(e) {
|
|
|
420
420
|
), this.state = n ? "opened" : "closed", this.returnFocus(), await R(), await R(), n === this.open && n === !1 && this.requestSlottable();
|
|
421
421
|
};
|
|
422
422
|
return this.elements.forEach((a, l) => {
|
|
423
|
-
|
|
423
|
+
zt(a, s(a, l), r(a, l));
|
|
424
424
|
}), o;
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
return t;
|
|
428
428
|
}
|
|
429
|
-
const
|
|
430
|
-
function
|
|
429
|
+
const ke = CSS.supports("(overlay: auto)");
|
|
430
|
+
function Gt(e) {
|
|
431
431
|
let t = !1;
|
|
432
432
|
try {
|
|
433
433
|
t = e.matches(":popover-open");
|
|
@@ -440,14 +440,14 @@ function jt(e) {
|
|
|
440
440
|
}
|
|
441
441
|
return t || i;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function Fe(e) {
|
|
444
444
|
class t extends e {
|
|
445
445
|
async manageDelay(n) {
|
|
446
446
|
if (n === !1 || n !== this.open) {
|
|
447
|
-
|
|
447
|
+
gt.close(this);
|
|
448
448
|
return;
|
|
449
449
|
}
|
|
450
|
-
this.delayed && await
|
|
450
|
+
this.delayed && await gt.openTimer(this) && (this.open = !n);
|
|
451
451
|
}
|
|
452
452
|
/**
|
|
453
453
|
* A popover should be hidden _after_ it is no longer on top-layer because
|
|
@@ -461,7 +461,7 @@ function Le(e) {
|
|
|
461
461
|
} = {}) => {
|
|
462
462
|
s !== "open" && await this.placementController.resetOverlayPosition();
|
|
463
463
|
};
|
|
464
|
-
if (!
|
|
464
|
+
if (!Gt(this.dialogEl)) {
|
|
465
465
|
o();
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
@@ -483,7 +483,7 @@ function Le(e) {
|
|
|
483
483
|
n && this.open === n && !o && !s && this.isConnected && (this.dialogEl.showPopover(), this.managePosition());
|
|
484
484
|
}
|
|
485
485
|
async ensureOnDOM(n) {
|
|
486
|
-
|
|
486
|
+
ke || await this.shouldHidePopover(n), this.shouldShowPopover(n), await R();
|
|
487
487
|
}
|
|
488
488
|
makeTransition(n) {
|
|
489
489
|
if (this.open !== n)
|
|
@@ -491,13 +491,13 @@ function Le(e) {
|
|
|
491
491
|
let o = null;
|
|
492
492
|
const s = (a, l) => () => {
|
|
493
493
|
if (a.open = n, l === 0) {
|
|
494
|
-
const c = n ?
|
|
494
|
+
const c = n ? Mt : $t;
|
|
495
495
|
this.dispatchEvent(new c());
|
|
496
496
|
}
|
|
497
|
-
if (!n || (a.matches(
|
|
497
|
+
if (!n || (a.matches(ct) && (o = a), o = o || Nt(a), o))
|
|
498
498
|
return;
|
|
499
499
|
a.querySelectorAll("slot").forEach((c) => {
|
|
500
|
-
o || (o =
|
|
500
|
+
o || (o = _t(c));
|
|
501
501
|
});
|
|
502
502
|
}, r = (a, l) => () => {
|
|
503
503
|
if (this.open !== n)
|
|
@@ -516,7 +516,7 @@ function Le(e) {
|
|
|
516
516
|
if (this.open !== n)
|
|
517
517
|
return;
|
|
518
518
|
await R();
|
|
519
|
-
const f = this.triggerElement instanceof
|
|
519
|
+
const f = this.triggerElement instanceof bt;
|
|
520
520
|
this.dispatchEvent(
|
|
521
521
|
new S(h, this, {
|
|
522
522
|
interaction: this.type,
|
|
@@ -536,7 +536,7 @@ function Le(e) {
|
|
|
536
536
|
};
|
|
537
537
|
if (this.open !== n)
|
|
538
538
|
return;
|
|
539
|
-
const d =
|
|
539
|
+
const d = Gt(this.dialogEl);
|
|
540
540
|
n !== !0 && d && this.isConnected ? (this.dialogEl.addEventListener(
|
|
541
541
|
"beforetoggle",
|
|
542
542
|
() => {
|
|
@@ -546,16 +546,28 @@ function Le(e) {
|
|
|
546
546
|
), this.dialogEl.hidePopover()) : c();
|
|
547
547
|
};
|
|
548
548
|
return this.elements.forEach((a, l) => {
|
|
549
|
-
|
|
549
|
+
zt(a, s(a, l), r(a, l));
|
|
550
550
|
}), o;
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
return t;
|
|
554
554
|
}
|
|
555
|
-
const
|
|
556
|
-
class
|
|
555
|
+
const ze = "showPopover" in document.createElement("div");
|
|
556
|
+
class Ne {
|
|
557
557
|
constructor() {
|
|
558
|
-
this.root = document.body, this.stack = [], this.
|
|
558
|
+
this.root = document.body, this.stack = [], this.handleScroll = (t) => {
|
|
559
|
+
this.stack.forEach((i) => {
|
|
560
|
+
i.open && (i.type === "auto" && i.triggerElement instanceof HTMLElement && i.triggerElement.closest(
|
|
561
|
+
"luzmo-picker, luzmo-select, luzmo-action-menu"
|
|
562
|
+
) && t.stopPropagation(), document.dispatchEvent(
|
|
563
|
+
new CustomEvent("luzmo-update-overlays", {
|
|
564
|
+
bubbles: !0,
|
|
565
|
+
composed: !0,
|
|
566
|
+
cancelable: !0
|
|
567
|
+
})
|
|
568
|
+
));
|
|
569
|
+
});
|
|
570
|
+
}, this.handlePointerdown = (t) => {
|
|
559
571
|
this.pointerdownPath = t.composedPath(), this.lastOverlay = this.stack.at(-1);
|
|
560
572
|
}, this.handlePointerup = () => {
|
|
561
573
|
const t = this.pointerdownPath;
|
|
@@ -590,14 +602,20 @@ class ke {
|
|
|
590
602
|
t.preventDefault();
|
|
591
603
|
return;
|
|
592
604
|
}
|
|
593
|
-
|
|
605
|
+
if ((i == null ? void 0 : i.type) === "manual") {
|
|
606
|
+
this.closeOverlay(i);
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
609
|
+
ze || i && this.closeOverlay(i);
|
|
594
610
|
}, this.bindEvents();
|
|
595
611
|
}
|
|
596
612
|
get document() {
|
|
597
613
|
return this.root.ownerDocument || document;
|
|
598
614
|
}
|
|
599
615
|
bindEvents() {
|
|
600
|
-
this.document.addEventListener("pointerdown", this.handlePointerdown), this.document.addEventListener("pointerup", this.handlePointerup), this.document.addEventListener("keydown", this.handleKeydown)
|
|
616
|
+
this.document.addEventListener("pointerdown", this.handlePointerdown), this.document.addEventListener("pointerup", this.handlePointerup), this.document.addEventListener("keydown", this.handleKeydown), this.document.addEventListener("scroll", this.handleScroll, {
|
|
617
|
+
capture: !0
|
|
618
|
+
});
|
|
601
619
|
}
|
|
602
620
|
closeOverlay(t) {
|
|
603
621
|
const i = this.stack.indexOf(t);
|
|
@@ -664,56 +682,56 @@ class ke {
|
|
|
664
682
|
this.closeOverlay(t);
|
|
665
683
|
}
|
|
666
684
|
}
|
|
667
|
-
const
|
|
685
|
+
const Xt = new Ne(), _e = ':host{display:contents;pointer-events:none;--luzmo-overlay-animation-distance: .5rem}:host(:has(> luzmo-tooltip)){--luzmo-overlay-animation-distance: var( --luzmo-tooltip-animation-distance, 4px )}.dialog{margin:0;border:0;background:none;padding:0;position:fixed;overflow:visible;opacity:1!important;box-sizing:border-box;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px);height:auto;inset:auto;top:0;left:0;display:flex;--luzmo-overlay-open: true}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}:host(:not([open])) .dialog{--luzmo-overlay-open: false}.dialog::backdrop{display:none}.dialog:before{position:absolute;top:-999em;right:-999em;bottom:-999em;left:-999em;content:"";pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(luzmo-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports (overlay: auto){.dialog{display:none;transition:all var(--luzmo-overlay-animation-duration, .13s),translate 0s,display var(--luzmo-overlay-animation-duration, .13s);transition-behavior:allow-discrete}.dialog:popover-open,.dialog:modal{display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--luzmo-overlay-z-index-base, 1000) + var(--luzmo-overlay-open-count))}}', Y = Math.min, T = Math.max, vt = Math.round, ut = Math.floor, M = (e) => ({
|
|
668
686
|
x: e,
|
|
669
687
|
y: e
|
|
670
|
-
}),
|
|
688
|
+
}), $e = {
|
|
671
689
|
left: "right",
|
|
672
690
|
right: "left",
|
|
673
691
|
bottom: "top",
|
|
674
692
|
top: "bottom"
|
|
675
|
-
},
|
|
693
|
+
}, Me = {
|
|
676
694
|
start: "end",
|
|
677
695
|
end: "start"
|
|
678
696
|
};
|
|
679
|
-
function
|
|
697
|
+
function Rt(e, t, i) {
|
|
680
698
|
return T(e, Y(t, i));
|
|
681
699
|
}
|
|
682
700
|
function nt(e, t) {
|
|
683
701
|
return typeof e == "function" ? e(t) : e;
|
|
684
702
|
}
|
|
685
|
-
function
|
|
703
|
+
function G(e) {
|
|
686
704
|
return e.split("-")[0];
|
|
687
705
|
}
|
|
688
706
|
function ot(e) {
|
|
689
707
|
return e.split("-")[1];
|
|
690
708
|
}
|
|
691
|
-
function
|
|
709
|
+
function oe(e) {
|
|
692
710
|
return e === "x" ? "y" : "x";
|
|
693
711
|
}
|
|
694
|
-
function
|
|
712
|
+
function Ht(e) {
|
|
695
713
|
return e === "y" ? "height" : "width";
|
|
696
714
|
}
|
|
697
715
|
function Q(e) {
|
|
698
|
-
return ["top", "bottom"].includes(
|
|
716
|
+
return ["top", "bottom"].includes(G(e)) ? "y" : "x";
|
|
699
717
|
}
|
|
700
|
-
function
|
|
701
|
-
return
|
|
718
|
+
function Wt(e) {
|
|
719
|
+
return oe(Q(e));
|
|
702
720
|
}
|
|
703
|
-
function
|
|
721
|
+
function He(e, t, i) {
|
|
704
722
|
i === void 0 && (i = !1);
|
|
705
|
-
const n = ot(e), o =
|
|
723
|
+
const n = ot(e), o = Wt(e), s = Ht(o);
|
|
706
724
|
let r = o === "x" ? n === (i ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
707
|
-
return t.reference[s] > t.floating[s] && (r =
|
|
725
|
+
return t.reference[s] > t.floating[s] && (r = yt(r)), [r, yt(r)];
|
|
708
726
|
}
|
|
709
|
-
function
|
|
710
|
-
const t =
|
|
711
|
-
return [
|
|
727
|
+
function We(e) {
|
|
728
|
+
const t = yt(e);
|
|
729
|
+
return [Dt(e), t, Dt(t)];
|
|
712
730
|
}
|
|
713
|
-
function
|
|
714
|
-
return e.replace(/start|end/g, (t) =>
|
|
731
|
+
function Dt(e) {
|
|
732
|
+
return e.replace(/start|end/g, (t) => Me[t]);
|
|
715
733
|
}
|
|
716
|
-
function
|
|
734
|
+
function Ie(e, t, i) {
|
|
717
735
|
const n = ["left", "right"], o = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
|
|
718
736
|
switch (e) {
|
|
719
737
|
case "top":
|
|
@@ -726,15 +744,15 @@ function Me(e, t, i) {
|
|
|
726
744
|
return [];
|
|
727
745
|
}
|
|
728
746
|
}
|
|
729
|
-
function
|
|
747
|
+
function Be(e, t, i, n) {
|
|
730
748
|
const o = ot(e);
|
|
731
|
-
let s =
|
|
732
|
-
return o && (s = s.map((r) => r + "-" + o), t && (s = s.concat(s.map(
|
|
749
|
+
let s = Ie(G(e), i === "start", n);
|
|
750
|
+
return o && (s = s.map((r) => r + "-" + o), t && (s = s.concat(s.map(Dt)))), s;
|
|
733
751
|
}
|
|
734
|
-
function
|
|
735
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
752
|
+
function yt(e) {
|
|
753
|
+
return e.replace(/left|right|bottom|top/g, (t) => $e[t]);
|
|
736
754
|
}
|
|
737
|
-
function
|
|
755
|
+
function qe(e) {
|
|
738
756
|
return {
|
|
739
757
|
top: 0,
|
|
740
758
|
right: 0,
|
|
@@ -743,15 +761,15 @@ function Be(e) {
|
|
|
743
761
|
...e
|
|
744
762
|
};
|
|
745
763
|
}
|
|
746
|
-
function
|
|
747
|
-
return typeof e != "number" ?
|
|
764
|
+
function se(e) {
|
|
765
|
+
return typeof e != "number" ? qe(e) : {
|
|
748
766
|
top: e,
|
|
749
767
|
right: e,
|
|
750
768
|
bottom: e,
|
|
751
769
|
left: e
|
|
752
770
|
};
|
|
753
771
|
}
|
|
754
|
-
function
|
|
772
|
+
function wt(e) {
|
|
755
773
|
const {
|
|
756
774
|
x: t,
|
|
757
775
|
y: i,
|
|
@@ -769,12 +787,12 @@ function yt(e) {
|
|
|
769
787
|
y: i
|
|
770
788
|
};
|
|
771
789
|
}
|
|
772
|
-
function
|
|
790
|
+
function Jt(e, t, i) {
|
|
773
791
|
let {
|
|
774
792
|
reference: n,
|
|
775
793
|
floating: o
|
|
776
794
|
} = e;
|
|
777
|
-
const s = Q(t), r =
|
|
795
|
+
const s = Q(t), r = Wt(t), a = Ht(r), l = G(t), h = s === "y", c = n.x + n.width / 2 - o.width / 2, d = n.y + n.height / 2 - o.height / 2, f = n[a] / 2 - o[a] / 2;
|
|
778
796
|
let u;
|
|
779
797
|
switch (l) {
|
|
780
798
|
case "top":
|
|
@@ -817,7 +835,7 @@ function Yt(e, t, i) {
|
|
|
817
835
|
}
|
|
818
836
|
return u;
|
|
819
837
|
}
|
|
820
|
-
const
|
|
838
|
+
const Ve = async (e, t, i) => {
|
|
821
839
|
const {
|
|
822
840
|
placement: n = "bottom",
|
|
823
841
|
strategy: o = "absolute",
|
|
@@ -831,7 +849,7 @@ const We = async (e, t, i) => {
|
|
|
831
849
|
}), {
|
|
832
850
|
x: c,
|
|
833
851
|
y: d
|
|
834
|
-
} =
|
|
852
|
+
} = Jt(h, n, l), f = n, u = {}, p = 0;
|
|
835
853
|
for (let m = 0; m < a.length; m++) {
|
|
836
854
|
const {
|
|
837
855
|
name: v,
|
|
@@ -839,7 +857,7 @@ const We = async (e, t, i) => {
|
|
|
839
857
|
} = a[m], {
|
|
840
858
|
x: y,
|
|
841
859
|
y: w,
|
|
842
|
-
data:
|
|
860
|
+
data: E,
|
|
843
861
|
reset: b
|
|
844
862
|
} = await g({
|
|
845
863
|
x: c,
|
|
@@ -859,7 +877,7 @@ const We = async (e, t, i) => {
|
|
|
859
877
|
...u,
|
|
860
878
|
[v]: {
|
|
861
879
|
...u[v],
|
|
862
|
-
...
|
|
880
|
+
...E
|
|
863
881
|
}
|
|
864
882
|
}, b && p <= 50 && (p++, typeof b == "object" && (b.placement && (f = b.placement), b.rects && (h = b.rects === !0 ? await r.getElementRects({
|
|
865
883
|
reference: e,
|
|
@@ -868,7 +886,7 @@ const We = async (e, t, i) => {
|
|
|
868
886
|
}) : b.rects), {
|
|
869
887
|
x: c,
|
|
870
888
|
y: d
|
|
871
|
-
} =
|
|
889
|
+
} = Jt(h, f, l)), m = -1);
|
|
872
890
|
}
|
|
873
891
|
return {
|
|
874
892
|
x: c,
|
|
@@ -878,7 +896,7 @@ const We = async (e, t, i) => {
|
|
|
878
896
|
middlewareData: u
|
|
879
897
|
};
|
|
880
898
|
};
|
|
881
|
-
async function
|
|
899
|
+
async function It(e, t) {
|
|
882
900
|
var i;
|
|
883
901
|
t === void 0 && (t = {});
|
|
884
902
|
const {
|
|
@@ -894,7 +912,7 @@ async function Ht(e, t) {
|
|
|
894
912
|
elementContext: d = "floating",
|
|
895
913
|
altBoundary: f = !1,
|
|
896
914
|
padding: u = 0
|
|
897
|
-
} = nt(t, e), p =
|
|
915
|
+
} = nt(t, e), p = se(u), v = a[f ? d === "floating" ? "reference" : "floating" : d], g = wt(await s.getClippingRect({
|
|
898
916
|
element: (i = await (s.isElement == null ? void 0 : s.isElement(v))) == null || i ? v : v.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
|
|
899
917
|
boundary: h,
|
|
900
918
|
rootBoundary: c,
|
|
@@ -904,26 +922,26 @@ async function Ht(e, t) {
|
|
|
904
922
|
y: o,
|
|
905
923
|
width: r.floating.width,
|
|
906
924
|
height: r.floating.height
|
|
907
|
-
} : r.reference, w = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)),
|
|
925
|
+
} : r.reference, w = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), E = await (s.isElement == null ? void 0 : s.isElement(w)) ? await (s.getScale == null ? void 0 : s.getScale(w)) || {
|
|
908
926
|
x: 1,
|
|
909
927
|
y: 1
|
|
910
928
|
} : {
|
|
911
929
|
x: 1,
|
|
912
930
|
y: 1
|
|
913
|
-
}, b =
|
|
931
|
+
}, b = wt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
914
932
|
elements: a,
|
|
915
933
|
rect: y,
|
|
916
934
|
offsetParent: w,
|
|
917
935
|
strategy: l
|
|
918
936
|
}) : y);
|
|
919
937
|
return {
|
|
920
|
-
top: (g.top - b.top + p.top) /
|
|
921
|
-
bottom: (b.bottom - g.bottom + p.bottom) /
|
|
922
|
-
left: (g.left - b.left + p.left) /
|
|
923
|
-
right: (b.right - g.right + p.right) /
|
|
938
|
+
top: (g.top - b.top + p.top) / E.y,
|
|
939
|
+
bottom: (b.bottom - g.bottom + p.bottom) / E.y,
|
|
940
|
+
left: (g.left - b.left + p.left) / E.x,
|
|
941
|
+
right: (b.right - g.right + p.right) / E.x
|
|
924
942
|
};
|
|
925
943
|
}
|
|
926
|
-
const
|
|
944
|
+
const Ue = (e) => ({
|
|
927
945
|
name: "arrow",
|
|
928
946
|
options: e,
|
|
929
947
|
async fn(t) {
|
|
@@ -941,26 +959,26 @@ const qe = (e) => ({
|
|
|
941
959
|
} = nt(e, t) || {};
|
|
942
960
|
if (h == null)
|
|
943
961
|
return {};
|
|
944
|
-
const d =
|
|
962
|
+
const d = se(c), f = {
|
|
945
963
|
x: i,
|
|
946
964
|
y: n
|
|
947
|
-
}, u =
|
|
948
|
-
let
|
|
949
|
-
(!
|
|
950
|
-
const
|
|
965
|
+
}, u = Wt(o), p = Ht(u), m = await r.getDimensions(h), v = u === "y", g = v ? "top" : "left", y = v ? "bottom" : "right", w = v ? "clientHeight" : "clientWidth", E = s.reference[p] + s.reference[u] - f[u] - s.floating[p], b = f[u] - s.reference[u], D = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
|
|
966
|
+
let x = D ? D[w] : 0;
|
|
967
|
+
(!x || !await (r.isElement == null ? void 0 : r.isElement(D))) && (x = a.floating[w] || s.floating[p]);
|
|
968
|
+
const I = E / 2 - b / 2, N = x / 2 - m[p] / 2 - 1, L = Y(d[g], N), V = Y(d[y], N), _ = L, U = x - m[p] - V, P = x / 2 - m[p] / 2 + I, tt = Rt(_, P, U), B = !l.arrow && ot(o) != null && P !== tt && s.reference[p] / 2 - (P < _ ? L : V) - m[p] / 2 < 0, $ = B ? P < _ ? P - _ : P - U : 0;
|
|
951
969
|
return {
|
|
952
970
|
[u]: f[u] + $,
|
|
953
971
|
data: {
|
|
954
972
|
[u]: tt,
|
|
955
|
-
centerOffset:
|
|
956
|
-
...
|
|
973
|
+
centerOffset: P - tt - $,
|
|
974
|
+
...B && {
|
|
957
975
|
alignmentOffset: $
|
|
958
976
|
}
|
|
959
977
|
},
|
|
960
|
-
reset:
|
|
978
|
+
reset: B
|
|
961
979
|
};
|
|
962
980
|
}
|
|
963
|
-
}),
|
|
981
|
+
}), je = function(e) {
|
|
964
982
|
return e === void 0 && (e = {}), {
|
|
965
983
|
name: "flip",
|
|
966
984
|
options: e,
|
|
@@ -984,32 +1002,32 @@ const qe = (e) => ({
|
|
|
984
1002
|
} = nt(e, t);
|
|
985
1003
|
if ((i = s.arrow) != null && i.alignmentOffset)
|
|
986
1004
|
return {};
|
|
987
|
-
const g =
|
|
988
|
-
!f && D && b.push(...
|
|
989
|
-
const
|
|
1005
|
+
const g = G(o), y = Q(a), w = G(a) === a, E = await (l.isRTL == null ? void 0 : l.isRTL(h.floating)), b = f || (w || !m ? [yt(a)] : We(a)), D = p !== "none";
|
|
1006
|
+
!f && D && b.push(...Be(a, m, p, E));
|
|
1007
|
+
const x = [a, ...b], I = await It(t, v), N = [];
|
|
990
1008
|
let L = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
991
|
-
if (c && N.push(
|
|
992
|
-
const
|
|
993
|
-
N.push(
|
|
1009
|
+
if (c && N.push(I[g]), d) {
|
|
1010
|
+
const P = He(o, r, E);
|
|
1011
|
+
N.push(I[P[0]], I[P[1]]);
|
|
994
1012
|
}
|
|
995
1013
|
if (L = [...L, {
|
|
996
1014
|
placement: o,
|
|
997
1015
|
overflows: N
|
|
998
|
-
}], !N.every((
|
|
1016
|
+
}], !N.every((P) => P <= 0)) {
|
|
999
1017
|
var V, _;
|
|
1000
|
-
const
|
|
1018
|
+
const P = (((V = s.flip) == null ? void 0 : V.index) || 0) + 1, tt = x[P];
|
|
1001
1019
|
if (tt)
|
|
1002
1020
|
return {
|
|
1003
1021
|
data: {
|
|
1004
|
-
index:
|
|
1022
|
+
index: P,
|
|
1005
1023
|
overflows: L
|
|
1006
1024
|
},
|
|
1007
1025
|
reset: {
|
|
1008
1026
|
placement: tt
|
|
1009
1027
|
}
|
|
1010
1028
|
};
|
|
1011
|
-
let
|
|
1012
|
-
if (!
|
|
1029
|
+
let B = (_ = L.filter(($) => $.overflows[0] <= 0).sort(($, j) => $.overflows[1] - j.overflows[1])[0]) == null ? void 0 : _.placement;
|
|
1030
|
+
if (!B)
|
|
1013
1031
|
switch (u) {
|
|
1014
1032
|
case "bestFit": {
|
|
1015
1033
|
var U;
|
|
@@ -1021,18 +1039,18 @@ const qe = (e) => ({
|
|
|
1021
1039
|
K === "y";
|
|
1022
1040
|
}
|
|
1023
1041
|
return !0;
|
|
1024
|
-
}).map((j) => [j.placement, j.overflows.filter((K) => K > 0).reduce((K,
|
|
1025
|
-
$ && (
|
|
1042
|
+
}).map((j) => [j.placement, j.overflows.filter((K) => K > 0).reduce((K, fe) => K + fe, 0)]).sort((j, K) => j[1] - K[1])[0]) == null ? void 0 : U[0];
|
|
1043
|
+
$ && (B = $);
|
|
1026
1044
|
break;
|
|
1027
1045
|
}
|
|
1028
1046
|
case "initialPlacement":
|
|
1029
|
-
|
|
1047
|
+
B = a;
|
|
1030
1048
|
break;
|
|
1031
1049
|
}
|
|
1032
|
-
if (o !==
|
|
1050
|
+
if (o !== B)
|
|
1033
1051
|
return {
|
|
1034
1052
|
reset: {
|
|
1035
|
-
placement:
|
|
1053
|
+
placement: B
|
|
1036
1054
|
}
|
|
1037
1055
|
};
|
|
1038
1056
|
}
|
|
@@ -1040,12 +1058,12 @@ const qe = (e) => ({
|
|
|
1040
1058
|
}
|
|
1041
1059
|
};
|
|
1042
1060
|
};
|
|
1043
|
-
async function
|
|
1061
|
+
async function Ke(e, t) {
|
|
1044
1062
|
const {
|
|
1045
1063
|
placement: i,
|
|
1046
1064
|
platform: n,
|
|
1047
1065
|
elements: o
|
|
1048
|
-
} = e, s = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), r =
|
|
1066
|
+
} = e, s = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), r = G(i), a = ot(i), l = Q(i) === "y", h = ["left", "top"].includes(r) ? -1 : 1, c = s && l ? -1 : 1, d = nt(t, e);
|
|
1049
1067
|
let {
|
|
1050
1068
|
mainAxis: f,
|
|
1051
1069
|
crossAxis: u,
|
|
@@ -1067,7 +1085,7 @@ async function Ve(e, t) {
|
|
|
1067
1085
|
y: u * c
|
|
1068
1086
|
};
|
|
1069
1087
|
}
|
|
1070
|
-
const
|
|
1088
|
+
const Ye = function(e) {
|
|
1071
1089
|
return e === void 0 && (e = 0), {
|
|
1072
1090
|
name: "offset",
|
|
1073
1091
|
options: e,
|
|
@@ -1078,7 +1096,7 @@ const Ue = function(e) {
|
|
|
1078
1096
|
y: s,
|
|
1079
1097
|
placement: r,
|
|
1080
1098
|
middlewareData: a
|
|
1081
|
-
} = t, l = await
|
|
1099
|
+
} = t, l = await Ke(t, e);
|
|
1082
1100
|
return r === ((i = a.offset) == null ? void 0 : i.placement) && (n = a.arrow) != null && n.alignmentOffset ? {} : {
|
|
1083
1101
|
x: o + l.x,
|
|
1084
1102
|
y: s + l.y,
|
|
@@ -1089,7 +1107,7 @@ const Ue = function(e) {
|
|
|
1089
1107
|
};
|
|
1090
1108
|
}
|
|
1091
1109
|
};
|
|
1092
|
-
},
|
|
1110
|
+
}, Ge = function(e) {
|
|
1093
1111
|
return e === void 0 && (e = {}), {
|
|
1094
1112
|
name: "shift",
|
|
1095
1113
|
options: e,
|
|
@@ -1117,15 +1135,15 @@ const Ue = function(e) {
|
|
|
1117
1135
|
} = nt(e, t), h = {
|
|
1118
1136
|
x: i,
|
|
1119
1137
|
y: n
|
|
1120
|
-
}, c = await
|
|
1138
|
+
}, c = await It(t, l), d = Q(G(o)), f = oe(d);
|
|
1121
1139
|
let u = h[f], p = h[d];
|
|
1122
1140
|
if (s) {
|
|
1123
1141
|
const v = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", y = u + c[v], w = u - c[g];
|
|
1124
|
-
u =
|
|
1142
|
+
u = Rt(y, u, w);
|
|
1125
1143
|
}
|
|
1126
1144
|
if (r) {
|
|
1127
1145
|
const v = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", y = p + c[v], w = p - c[g];
|
|
1128
|
-
p =
|
|
1146
|
+
p = Rt(y, p, w);
|
|
1129
1147
|
}
|
|
1130
1148
|
const m = a.fn({
|
|
1131
1149
|
...t,
|
|
@@ -1145,7 +1163,7 @@ const Ue = function(e) {
|
|
|
1145
1163
|
};
|
|
1146
1164
|
}
|
|
1147
1165
|
};
|
|
1148
|
-
},
|
|
1166
|
+
}, Xe = function(e) {
|
|
1149
1167
|
return e === void 0 && (e = {}), {
|
|
1150
1168
|
name: "size",
|
|
1151
1169
|
options: e,
|
|
@@ -1160,22 +1178,22 @@ const Ue = function(e) {
|
|
|
1160
1178
|
apply: l = () => {
|
|
1161
1179
|
},
|
|
1162
1180
|
...h
|
|
1163
|
-
} = nt(e, t), c = await
|
|
1181
|
+
} = nt(e, t), c = await It(t, h), d = G(o), f = ot(o), u = Q(o) === "y", {
|
|
1164
1182
|
width: p,
|
|
1165
1183
|
height: m
|
|
1166
1184
|
} = s.floating;
|
|
1167
1185
|
let v, g;
|
|
1168
1186
|
d === "top" || d === "bottom" ? (v = d, g = f === (await (r.isRTL == null ? void 0 : r.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = d, v = f === "end" ? "top" : "bottom");
|
|
1169
|
-
const y = m - c.top - c.bottom, w = p - c.left - c.right,
|
|
1170
|
-
let
|
|
1171
|
-
if ((i = t.middlewareData.shift) != null && i.enabled.x && (
|
|
1187
|
+
const y = m - c.top - c.bottom, w = p - c.left - c.right, E = Y(m - c[v], y), b = Y(p - c[g], w), D = !t.middlewareData.shift;
|
|
1188
|
+
let x = E, I = b;
|
|
1189
|
+
if ((i = t.middlewareData.shift) != null && i.enabled.x && (I = w), (n = t.middlewareData.shift) != null && n.enabled.y && (x = y), D && !f) {
|
|
1172
1190
|
const L = T(c.left, 0), V = T(c.right, 0), _ = T(c.top, 0), U = T(c.bottom, 0);
|
|
1173
|
-
u ?
|
|
1191
|
+
u ? I = p - 2 * (L !== 0 || V !== 0 ? L + V : T(c.left, c.right)) : x = m - 2 * (_ !== 0 || U !== 0 ? _ + U : T(c.top, c.bottom));
|
|
1174
1192
|
}
|
|
1175
1193
|
await l({
|
|
1176
1194
|
...t,
|
|
1177
|
-
availableWidth:
|
|
1178
|
-
availableHeight:
|
|
1195
|
+
availableWidth: I,
|
|
1196
|
+
availableHeight: x
|
|
1179
1197
|
});
|
|
1180
1198
|
const N = await r.getDimensions(a.floating);
|
|
1181
1199
|
return p !== N.width || m !== N.height ? {
|
|
@@ -1186,33 +1204,33 @@ const Ue = function(e) {
|
|
|
1186
1204
|
}
|
|
1187
1205
|
};
|
|
1188
1206
|
};
|
|
1189
|
-
function
|
|
1207
|
+
function Et() {
|
|
1190
1208
|
return typeof window < "u";
|
|
1191
1209
|
}
|
|
1192
1210
|
function st(e) {
|
|
1193
|
-
return
|
|
1211
|
+
return re(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1194
1212
|
}
|
|
1195
1213
|
function A(e) {
|
|
1196
1214
|
var t;
|
|
1197
1215
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1198
1216
|
}
|
|
1199
|
-
function
|
|
1217
|
+
function W(e) {
|
|
1200
1218
|
var t;
|
|
1201
|
-
return (t = (
|
|
1219
|
+
return (t = (re(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1202
1220
|
}
|
|
1203
|
-
function
|
|
1204
|
-
return
|
|
1221
|
+
function re(e) {
|
|
1222
|
+
return Et() ? e instanceof Node || e instanceof A(e).Node : !1;
|
|
1205
1223
|
}
|
|
1206
1224
|
function k(e) {
|
|
1207
|
-
return
|
|
1225
|
+
return Et() ? e instanceof Element || e instanceof A(e).Element : !1;
|
|
1208
1226
|
}
|
|
1209
1227
|
function H(e) {
|
|
1210
|
-
return
|
|
1228
|
+
return Et() ? e instanceof HTMLElement || e instanceof A(e).HTMLElement : !1;
|
|
1211
1229
|
}
|
|
1212
|
-
function
|
|
1213
|
-
return !
|
|
1230
|
+
function Qt(e) {
|
|
1231
|
+
return !Et() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof A(e).ShadowRoot;
|
|
1214
1232
|
}
|
|
1215
|
-
function
|
|
1233
|
+
function ht(e) {
|
|
1216
1234
|
const {
|
|
1217
1235
|
overflow: t,
|
|
1218
1236
|
overflowX: i,
|
|
@@ -1221,7 +1239,7 @@ function ct(e) {
|
|
|
1221
1239
|
} = F(e);
|
|
1222
1240
|
return /auto|scroll|overlay|hidden|clip/.test(t + n + i) && !["inline", "contents"].includes(o);
|
|
1223
1241
|
}
|
|
1224
|
-
function
|
|
1242
|
+
function Je(e) {
|
|
1225
1243
|
return ["table", "td", "th"].includes(st(e));
|
|
1226
1244
|
}
|
|
1227
1245
|
function xt(e) {
|
|
@@ -1234,21 +1252,21 @@ function xt(e) {
|
|
|
1234
1252
|
});
|
|
1235
1253
|
}
|
|
1236
1254
|
function Bt(e) {
|
|
1237
|
-
const t =
|
|
1255
|
+
const t = qt(), i = k(e) ? F(e) : e;
|
|
1238
1256
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => i[n] ? i[n] !== "none" : !1) || (i.containerType ? i.containerType !== "normal" : !1) || !t && (i.backdropFilter ? i.backdropFilter !== "none" : !1) || !t && (i.filter ? i.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (i.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (i.contain || "").includes(n));
|
|
1239
1257
|
}
|
|
1240
|
-
function
|
|
1241
|
-
let t =
|
|
1258
|
+
function Qe(e) {
|
|
1259
|
+
let t = X(e);
|
|
1242
1260
|
for (; H(t) && !it(t); ) {
|
|
1243
1261
|
if (Bt(t))
|
|
1244
1262
|
return t;
|
|
1245
1263
|
if (xt(t))
|
|
1246
1264
|
return null;
|
|
1247
|
-
t =
|
|
1265
|
+
t = X(t);
|
|
1248
1266
|
}
|
|
1249
1267
|
return null;
|
|
1250
1268
|
}
|
|
1251
|
-
function
|
|
1269
|
+
function qt() {
|
|
1252
1270
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1253
1271
|
}
|
|
1254
1272
|
function it(e) {
|
|
@@ -1257,7 +1275,7 @@ function it(e) {
|
|
|
1257
1275
|
function F(e) {
|
|
1258
1276
|
return A(e).getComputedStyle(e);
|
|
1259
1277
|
}
|
|
1260
|
-
function
|
|
1278
|
+
function Ct(e) {
|
|
1261
1279
|
return k(e) ? {
|
|
1262
1280
|
scrollLeft: e.scrollLeft,
|
|
1263
1281
|
scrollTop: e.scrollTop
|
|
@@ -1266,119 +1284,119 @@ function Et(e) {
|
|
|
1266
1284
|
scrollTop: e.scrollY
|
|
1267
1285
|
};
|
|
1268
1286
|
}
|
|
1269
|
-
function
|
|
1287
|
+
function X(e) {
|
|
1270
1288
|
if (st(e) === "html")
|
|
1271
1289
|
return e;
|
|
1272
1290
|
const t = (
|
|
1273
1291
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1274
1292
|
e.assignedSlot || // DOM Element detected.
|
|
1275
1293
|
e.parentNode || // ShadowRoot detected.
|
|
1276
|
-
|
|
1277
|
-
|
|
1294
|
+
Qt(e) && e.host || // Fallback.
|
|
1295
|
+
W(e)
|
|
1278
1296
|
);
|
|
1279
|
-
return
|
|
1297
|
+
return Qt(t) ? t.host : t;
|
|
1280
1298
|
}
|
|
1281
|
-
function
|
|
1282
|
-
const t =
|
|
1283
|
-
return it(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : H(t) &&
|
|
1299
|
+
function ae(e) {
|
|
1300
|
+
const t = X(e);
|
|
1301
|
+
return it(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : H(t) && ht(t) ? t : ae(t);
|
|
1284
1302
|
}
|
|
1285
1303
|
function at(e, t, i) {
|
|
1286
1304
|
var n;
|
|
1287
1305
|
t === void 0 && (t = []), i === void 0 && (i = !0);
|
|
1288
|
-
const o =
|
|
1306
|
+
const o = ae(e), s = o === ((n = e.ownerDocument) == null ? void 0 : n.body), r = A(o);
|
|
1289
1307
|
if (s) {
|
|
1290
|
-
const a =
|
|
1291
|
-
return t.concat(r, r.visualViewport || [],
|
|
1308
|
+
const a = Lt(r);
|
|
1309
|
+
return t.concat(r, r.visualViewport || [], ht(o) ? o : [], a && i ? at(a) : []);
|
|
1292
1310
|
}
|
|
1293
1311
|
return t.concat(o, at(o, [], i));
|
|
1294
1312
|
}
|
|
1295
|
-
function
|
|
1313
|
+
function Lt(e) {
|
|
1296
1314
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1297
1315
|
}
|
|
1298
|
-
function
|
|
1316
|
+
function le(e) {
|
|
1299
1317
|
const t = F(e);
|
|
1300
1318
|
let i = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
|
|
1301
|
-
const o = H(e), s = o ? e.offsetWidth : i, r = o ? e.offsetHeight : n, a =
|
|
1319
|
+
const o = H(e), s = o ? e.offsetWidth : i, r = o ? e.offsetHeight : n, a = vt(i) !== s || vt(n) !== r;
|
|
1302
1320
|
return a && (i = s, n = r), {
|
|
1303
1321
|
width: i,
|
|
1304
1322
|
height: n,
|
|
1305
1323
|
$: a
|
|
1306
1324
|
};
|
|
1307
1325
|
}
|
|
1308
|
-
function
|
|
1326
|
+
function Vt(e) {
|
|
1309
1327
|
return k(e) ? e : e.contextElement;
|
|
1310
1328
|
}
|
|
1311
1329
|
function et(e) {
|
|
1312
|
-
const t =
|
|
1330
|
+
const t = Vt(e);
|
|
1313
1331
|
if (!H(t))
|
|
1314
1332
|
return M(1);
|
|
1315
1333
|
const i = t.getBoundingClientRect(), {
|
|
1316
1334
|
width: n,
|
|
1317
1335
|
height: o,
|
|
1318
1336
|
$: s
|
|
1319
|
-
} =
|
|
1320
|
-
let r = (s ?
|
|
1337
|
+
} = le(t);
|
|
1338
|
+
let r = (s ? vt(i.width) : i.width) / n, a = (s ? vt(i.height) : i.height) / o;
|
|
1321
1339
|
return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
1322
1340
|
x: r,
|
|
1323
1341
|
y: a
|
|
1324
1342
|
};
|
|
1325
1343
|
}
|
|
1326
|
-
const
|
|
1327
|
-
function
|
|
1344
|
+
const Ze = /* @__PURE__ */ M(0);
|
|
1345
|
+
function ce(e) {
|
|
1328
1346
|
const t = A(e);
|
|
1329
|
-
return !
|
|
1347
|
+
return !qt() || !t.visualViewport ? Ze : {
|
|
1330
1348
|
x: t.visualViewport.offsetLeft,
|
|
1331
1349
|
y: t.visualViewport.offsetTop
|
|
1332
1350
|
};
|
|
1333
1351
|
}
|
|
1334
|
-
function
|
|
1352
|
+
function ti(e, t, i) {
|
|
1335
1353
|
return t === void 0 && (t = !1), !i || t && i !== A(e) ? !1 : t;
|
|
1336
1354
|
}
|
|
1337
1355
|
function Z(e, t, i, n) {
|
|
1338
1356
|
t === void 0 && (t = !1), i === void 0 && (i = !1);
|
|
1339
|
-
const o = e.getBoundingClientRect(), s =
|
|
1357
|
+
const o = e.getBoundingClientRect(), s = Vt(e);
|
|
1340
1358
|
let r = M(1);
|
|
1341
1359
|
t && (n ? k(n) && (r = et(n)) : r = et(e));
|
|
1342
|
-
const a =
|
|
1360
|
+
const a = ti(s, i, n) ? ce(s) : M(0);
|
|
1343
1361
|
let l = (o.left + a.x) / r.x, h = (o.top + a.y) / r.y, c = o.width / r.x, d = o.height / r.y;
|
|
1344
1362
|
if (s) {
|
|
1345
1363
|
const f = A(s), u = n && k(n) ? A(n) : n;
|
|
1346
|
-
let p = f, m =
|
|
1364
|
+
let p = f, m = Lt(p);
|
|
1347
1365
|
for (; m && n && u !== p; ) {
|
|
1348
|
-
const v = et(m), g = m.getBoundingClientRect(), y = F(m), w = g.left + (m.clientLeft + parseFloat(y.paddingLeft)) * v.x,
|
|
1349
|
-
l *= v.x, h *= v.y, c *= v.x, d *= v.y, l += w, h +=
|
|
1366
|
+
const v = et(m), g = m.getBoundingClientRect(), y = F(m), w = g.left + (m.clientLeft + parseFloat(y.paddingLeft)) * v.x, E = g.top + (m.clientTop + parseFloat(y.paddingTop)) * v.y;
|
|
1367
|
+
l *= v.x, h *= v.y, c *= v.x, d *= v.y, l += w, h += E, p = A(m), m = Lt(p);
|
|
1350
1368
|
}
|
|
1351
1369
|
}
|
|
1352
|
-
return
|
|
1370
|
+
return wt({
|
|
1353
1371
|
width: c,
|
|
1354
1372
|
height: d,
|
|
1355
1373
|
x: l,
|
|
1356
1374
|
y: h
|
|
1357
1375
|
});
|
|
1358
1376
|
}
|
|
1359
|
-
function
|
|
1360
|
-
const i =
|
|
1361
|
-
return t ? t.left + i : Z(
|
|
1377
|
+
function Ut(e, t) {
|
|
1378
|
+
const i = Ct(e).scrollLeft;
|
|
1379
|
+
return t ? t.left + i : Z(W(e)).left + i;
|
|
1362
1380
|
}
|
|
1363
|
-
function
|
|
1381
|
+
function he(e, t, i) {
|
|
1364
1382
|
i === void 0 && (i = !1);
|
|
1365
1383
|
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - (i ? 0 : (
|
|
1366
1384
|
// RTL <body> scrollbar.
|
|
1367
|
-
|
|
1385
|
+
Ut(e, n)
|
|
1368
1386
|
)), s = n.top + t.scrollTop;
|
|
1369
1387
|
return {
|
|
1370
1388
|
x: o,
|
|
1371
1389
|
y: s
|
|
1372
1390
|
};
|
|
1373
1391
|
}
|
|
1374
|
-
function
|
|
1392
|
+
function ei(e) {
|
|
1375
1393
|
let {
|
|
1376
1394
|
elements: t,
|
|
1377
1395
|
rect: i,
|
|
1378
1396
|
offsetParent: n,
|
|
1379
1397
|
strategy: o
|
|
1380
1398
|
} = e;
|
|
1381
|
-
const s = o === "fixed", r =
|
|
1399
|
+
const s = o === "fixed", r = W(n), a = t ? xt(t.floating) : !1;
|
|
1382
1400
|
if (n === r || a && s)
|
|
1383
1401
|
return i;
|
|
1384
1402
|
let l = {
|
|
@@ -1386,11 +1404,11 @@ function Qe(e) {
|
|
|
1386
1404
|
scrollTop: 0
|
|
1387
1405
|
}, h = M(1);
|
|
1388
1406
|
const c = M(0), d = H(n);
|
|
1389
|
-
if ((d || !d && !s) && ((st(n) !== "body" ||
|
|
1407
|
+
if ((d || !d && !s) && ((st(n) !== "body" || ht(r)) && (l = Ct(n)), H(n))) {
|
|
1390
1408
|
const u = Z(n);
|
|
1391
1409
|
h = et(n), c.x = u.x + n.clientLeft, c.y = u.y + n.clientTop;
|
|
1392
1410
|
}
|
|
1393
|
-
const f = r && !d && !s ?
|
|
1411
|
+
const f = r && !d && !s ? he(r, l, !0) : M(0);
|
|
1394
1412
|
return {
|
|
1395
1413
|
width: i.width * h.x,
|
|
1396
1414
|
height: i.height * h.y,
|
|
@@ -1398,12 +1416,12 @@ function Qe(e) {
|
|
|
1398
1416
|
y: i.y * h.y - l.scrollTop * h.y + c.y + f.y
|
|
1399
1417
|
};
|
|
1400
1418
|
}
|
|
1401
|
-
function
|
|
1419
|
+
function ii(e) {
|
|
1402
1420
|
return Array.from(e.getClientRects());
|
|
1403
1421
|
}
|
|
1404
|
-
function
|
|
1405
|
-
const t =
|
|
1406
|
-
let r = -i.scrollLeft +
|
|
1422
|
+
function ni(e) {
|
|
1423
|
+
const t = W(e), i = Ct(e), n = e.ownerDocument.body, o = T(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), s = T(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
|
|
1424
|
+
let r = -i.scrollLeft + Ut(e);
|
|
1407
1425
|
const a = -i.scrollTop;
|
|
1408
1426
|
return F(n).direction === "rtl" && (r += T(t.clientWidth, n.clientWidth) - o), {
|
|
1409
1427
|
width: o,
|
|
@@ -1412,12 +1430,12 @@ function ti(e) {
|
|
|
1412
1430
|
y: a
|
|
1413
1431
|
};
|
|
1414
1432
|
}
|
|
1415
|
-
function
|
|
1416
|
-
const i = A(e), n =
|
|
1433
|
+
function oi(e, t) {
|
|
1434
|
+
const i = A(e), n = W(e), o = i.visualViewport;
|
|
1417
1435
|
let s = n.clientWidth, r = n.clientHeight, a = 0, l = 0;
|
|
1418
1436
|
if (o) {
|
|
1419
1437
|
s = o.width, r = o.height;
|
|
1420
|
-
const h =
|
|
1438
|
+
const h = qt();
|
|
1421
1439
|
(!h || h && t === "fixed") && (a = o.offsetLeft, l = o.offsetTop);
|
|
1422
1440
|
}
|
|
1423
1441
|
return {
|
|
@@ -1427,7 +1445,7 @@ function ei(e, t) {
|
|
|
1427
1445
|
y: l
|
|
1428
1446
|
};
|
|
1429
1447
|
}
|
|
1430
|
-
function
|
|
1448
|
+
function si(e, t) {
|
|
1431
1449
|
const i = Z(e, !0, t === "fixed"), n = i.top + e.clientTop, o = i.left + e.clientLeft, s = H(e) ? et(e) : M(1), r = e.clientWidth * s.x, a = e.clientHeight * s.y, l = o * s.x, h = n * s.y;
|
|
1432
1450
|
return {
|
|
1433
1451
|
width: r,
|
|
@@ -1436,16 +1454,16 @@ function ii(e, t) {
|
|
|
1436
1454
|
y: h
|
|
1437
1455
|
};
|
|
1438
1456
|
}
|
|
1439
|
-
function
|
|
1457
|
+
function Zt(e, t, i) {
|
|
1440
1458
|
let n;
|
|
1441
1459
|
if (t === "viewport")
|
|
1442
|
-
n =
|
|
1460
|
+
n = oi(e, i);
|
|
1443
1461
|
else if (t === "document")
|
|
1444
|
-
n =
|
|
1462
|
+
n = ni(W(e));
|
|
1445
1463
|
else if (k(t))
|
|
1446
|
-
n =
|
|
1464
|
+
n = si(t, i);
|
|
1447
1465
|
else {
|
|
1448
|
-
const o =
|
|
1466
|
+
const o = ce(e);
|
|
1449
1467
|
n = {
|
|
1450
1468
|
x: t.x - o.x,
|
|
1451
1469
|
y: t.y - o.y,
|
|
@@ -1453,36 +1471,36 @@ function Gt(e, t, i) {
|
|
|
1453
1471
|
height: t.height
|
|
1454
1472
|
};
|
|
1455
1473
|
}
|
|
1456
|
-
return
|
|
1474
|
+
return wt(n);
|
|
1457
1475
|
}
|
|
1458
|
-
function
|
|
1459
|
-
const i =
|
|
1460
|
-
return i === t || !k(i) || it(i) ? !1 : F(i).position === "fixed" ||
|
|
1476
|
+
function de(e, t) {
|
|
1477
|
+
const i = X(e);
|
|
1478
|
+
return i === t || !k(i) || it(i) ? !1 : F(i).position === "fixed" || de(i, t);
|
|
1461
1479
|
}
|
|
1462
|
-
function
|
|
1480
|
+
function ri(e, t) {
|
|
1463
1481
|
const i = t.get(e);
|
|
1464
1482
|
if (i)
|
|
1465
1483
|
return i;
|
|
1466
1484
|
let n = at(e, [], !1).filter((a) => k(a) && st(a) !== "body"), o = null;
|
|
1467
1485
|
const s = F(e).position === "fixed";
|
|
1468
|
-
let r = s ?
|
|
1486
|
+
let r = s ? X(e) : e;
|
|
1469
1487
|
for (; k(r) && !it(r); ) {
|
|
1470
1488
|
const a = F(r), l = Bt(r);
|
|
1471
|
-
!l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) ||
|
|
1489
|
+
!l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ht(r) && !l && de(e, r)) ? n = n.filter((c) => c !== r) : o = a, r = X(r);
|
|
1472
1490
|
}
|
|
1473
1491
|
return t.set(e, n), n;
|
|
1474
1492
|
}
|
|
1475
|
-
function
|
|
1493
|
+
function ai(e) {
|
|
1476
1494
|
let {
|
|
1477
1495
|
element: t,
|
|
1478
1496
|
boundary: i,
|
|
1479
1497
|
rootBoundary: n,
|
|
1480
1498
|
strategy: o
|
|
1481
1499
|
} = e;
|
|
1482
|
-
const r = [...i === "clippingAncestors" ? xt(t) ? [] :
|
|
1483
|
-
const d =
|
|
1500
|
+
const r = [...i === "clippingAncestors" ? xt(t) ? [] : ri(t, this._c) : [].concat(i), n], a = r[0], l = r.reduce((h, c) => {
|
|
1501
|
+
const d = Zt(t, c, o);
|
|
1484
1502
|
return h.top = T(d.top, h.top), h.right = Y(d.right, h.right), h.bottom = Y(d.bottom, h.bottom), h.left = T(d.left, h.left), h;
|
|
1485
|
-
},
|
|
1503
|
+
}, Zt(t, a, o));
|
|
1486
1504
|
return {
|
|
1487
1505
|
width: l.right - l.left,
|
|
1488
1506
|
height: l.bottom - l.top,
|
|
@@ -1490,29 +1508,29 @@ function oi(e) {
|
|
|
1490
1508
|
y: l.top
|
|
1491
1509
|
};
|
|
1492
1510
|
}
|
|
1493
|
-
function
|
|
1511
|
+
function li(e) {
|
|
1494
1512
|
const {
|
|
1495
1513
|
width: t,
|
|
1496
1514
|
height: i
|
|
1497
|
-
} =
|
|
1515
|
+
} = le(e);
|
|
1498
1516
|
return {
|
|
1499
1517
|
width: t,
|
|
1500
1518
|
height: i
|
|
1501
1519
|
};
|
|
1502
1520
|
}
|
|
1503
|
-
function
|
|
1504
|
-
const n = H(t), o =
|
|
1521
|
+
function ci(e, t, i) {
|
|
1522
|
+
const n = H(t), o = W(t), s = i === "fixed", r = Z(e, !0, s, t);
|
|
1505
1523
|
let a = {
|
|
1506
1524
|
scrollLeft: 0,
|
|
1507
1525
|
scrollTop: 0
|
|
1508
1526
|
};
|
|
1509
1527
|
const l = M(0);
|
|
1510
1528
|
if (n || !n && !s)
|
|
1511
|
-
if ((st(t) !== "body" ||
|
|
1529
|
+
if ((st(t) !== "body" || ht(o)) && (a = Ct(t)), n) {
|
|
1512
1530
|
const f = Z(t, !0, s, t);
|
|
1513
1531
|
l.x = f.x + t.clientLeft, l.y = f.y + t.clientTop;
|
|
1514
|
-
} else o && (l.x =
|
|
1515
|
-
const h = o && !n && !s ?
|
|
1532
|
+
} else o && (l.x = Ut(o));
|
|
1533
|
+
const h = o && !n && !s ? he(o, a) : M(0), c = r.left + a.scrollLeft - l.x - h.x, d = r.top + a.scrollTop - l.y - h.y;
|
|
1516
1534
|
return {
|
|
1517
1535
|
x: c,
|
|
1518
1536
|
y: d,
|
|
@@ -1523,36 +1541,36 @@ function ri(e, t, i) {
|
|
|
1523
1541
|
function Ot(e) {
|
|
1524
1542
|
return F(e).position === "static";
|
|
1525
1543
|
}
|
|
1526
|
-
function
|
|
1544
|
+
function te(e, t) {
|
|
1527
1545
|
if (!H(e) || F(e).position === "fixed")
|
|
1528
1546
|
return null;
|
|
1529
1547
|
if (t)
|
|
1530
1548
|
return t(e);
|
|
1531
1549
|
let i = e.offsetParent;
|
|
1532
|
-
return
|
|
1550
|
+
return W(e) === i && (i = i.ownerDocument.body), i;
|
|
1533
1551
|
}
|
|
1534
|
-
function
|
|
1552
|
+
function ue(e, t) {
|
|
1535
1553
|
const i = A(e);
|
|
1536
1554
|
if (xt(e))
|
|
1537
1555
|
return i;
|
|
1538
1556
|
if (!H(e)) {
|
|
1539
|
-
let o =
|
|
1557
|
+
let o = X(e);
|
|
1540
1558
|
for (; o && !it(o); ) {
|
|
1541
1559
|
if (k(o) && !Ot(o))
|
|
1542
1560
|
return o;
|
|
1543
|
-
o =
|
|
1561
|
+
o = X(o);
|
|
1544
1562
|
}
|
|
1545
1563
|
return i;
|
|
1546
1564
|
}
|
|
1547
|
-
let n =
|
|
1548
|
-
for (; n &&
|
|
1549
|
-
n =
|
|
1550
|
-
return n && it(n) && Ot(n) && !Bt(n) ? i : n ||
|
|
1565
|
+
let n = te(e, t);
|
|
1566
|
+
for (; n && Je(n) && Ot(n); )
|
|
1567
|
+
n = te(n, t);
|
|
1568
|
+
return n && it(n) && Ot(n) && !Bt(n) ? i : n || Qe(e) || i;
|
|
1551
1569
|
}
|
|
1552
|
-
const
|
|
1553
|
-
const t = this.getOffsetParent ||
|
|
1570
|
+
const hi = async function(e) {
|
|
1571
|
+
const t = this.getOffsetParent || ue, i = this.getDimensions, n = await i(e.floating);
|
|
1554
1572
|
return {
|
|
1555
|
-
reference:
|
|
1573
|
+
reference: ci(e.reference, await t(e.floating), e.strategy),
|
|
1556
1574
|
floating: {
|
|
1557
1575
|
x: 0,
|
|
1558
1576
|
y: 0,
|
|
@@ -1561,27 +1579,27 @@ const ai = async function(e) {
|
|
|
1561
1579
|
}
|
|
1562
1580
|
};
|
|
1563
1581
|
};
|
|
1564
|
-
function
|
|
1582
|
+
function di(e) {
|
|
1565
1583
|
return F(e).direction === "rtl";
|
|
1566
1584
|
}
|
|
1567
|
-
const
|
|
1568
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1569
|
-
getDocumentElement:
|
|
1570
|
-
getClippingRect:
|
|
1571
|
-
getOffsetParent:
|
|
1572
|
-
getElementRects:
|
|
1573
|
-
getClientRects:
|
|
1574
|
-
getDimensions:
|
|
1585
|
+
const ui = {
|
|
1586
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ei,
|
|
1587
|
+
getDocumentElement: W,
|
|
1588
|
+
getClippingRect: ai,
|
|
1589
|
+
getOffsetParent: ue,
|
|
1590
|
+
getElementRects: hi,
|
|
1591
|
+
getClientRects: ii,
|
|
1592
|
+
getDimensions: li,
|
|
1575
1593
|
getScale: et,
|
|
1576
1594
|
isElement: k,
|
|
1577
|
-
isRTL:
|
|
1595
|
+
isRTL: di
|
|
1578
1596
|
};
|
|
1579
|
-
function
|
|
1597
|
+
function pe(e, t) {
|
|
1580
1598
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1581
1599
|
}
|
|
1582
|
-
function
|
|
1600
|
+
function pi(e, t) {
|
|
1583
1601
|
let i = null, n;
|
|
1584
|
-
const o =
|
|
1602
|
+
const o = W(e);
|
|
1585
1603
|
function s() {
|
|
1586
1604
|
var a;
|
|
1587
1605
|
clearTimeout(n), (a = i) == null || a.disconnect(), i = null;
|
|
@@ -1596,21 +1614,21 @@ function hi(e, t) {
|
|
|
1596
1614
|
} = h;
|
|
1597
1615
|
if (a || t(), !f || !u)
|
|
1598
1616
|
return;
|
|
1599
|
-
const p =
|
|
1617
|
+
const p = ut(d), m = ut(o.clientWidth - (c + f)), v = ut(o.clientHeight - (d + u)), g = ut(c), w = {
|
|
1600
1618
|
rootMargin: -p + "px " + -m + "px " + -v + "px " + -g + "px",
|
|
1601
1619
|
threshold: T(0, Y(1, l)) || 1
|
|
1602
1620
|
};
|
|
1603
|
-
let
|
|
1621
|
+
let E = !0;
|
|
1604
1622
|
function b(D) {
|
|
1605
|
-
const
|
|
1606
|
-
if (
|
|
1607
|
-
if (!
|
|
1623
|
+
const x = D[0].intersectionRatio;
|
|
1624
|
+
if (x !== l) {
|
|
1625
|
+
if (!E)
|
|
1608
1626
|
return r();
|
|
1609
|
-
|
|
1627
|
+
x ? r(!1, x) : n = setTimeout(() => {
|
|
1610
1628
|
r(!1, 1e-7);
|
|
1611
1629
|
}, 1e3);
|
|
1612
1630
|
}
|
|
1613
|
-
|
|
1631
|
+
x === 1 && !pe(h, e.getBoundingClientRect()) && r(), E = !1;
|
|
1614
1632
|
}
|
|
1615
1633
|
try {
|
|
1616
1634
|
i = new IntersectionObserver(b, {
|
|
@@ -1625,7 +1643,7 @@ function hi(e, t) {
|
|
|
1625
1643
|
}
|
|
1626
1644
|
return r(!0), s;
|
|
1627
1645
|
}
|
|
1628
|
-
function
|
|
1646
|
+
function ee(e, t, i, n) {
|
|
1629
1647
|
n === void 0 && (n = {});
|
|
1630
1648
|
const {
|
|
1631
1649
|
ancestorScroll: o = !0,
|
|
@@ -1633,13 +1651,13 @@ function Qt(e, t, i, n) {
|
|
|
1633
1651
|
elementResize: r = typeof ResizeObserver == "function",
|
|
1634
1652
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1635
1653
|
animationFrame: l = !1
|
|
1636
|
-
} = n, h =
|
|
1654
|
+
} = n, h = Vt(e), c = o || s ? [...h ? at(h) : [], ...at(t)] : [];
|
|
1637
1655
|
c.forEach((g) => {
|
|
1638
1656
|
o && g.addEventListener("scroll", i, {
|
|
1639
1657
|
passive: !0
|
|
1640
1658
|
}), s && g.addEventListener("resize", i);
|
|
1641
1659
|
});
|
|
1642
|
-
const d = h && a ?
|
|
1660
|
+
const d = h && a ? pi(h, i) : null;
|
|
1643
1661
|
let f = -1, u = null;
|
|
1644
1662
|
r && (u = new ResizeObserver((g) => {
|
|
1645
1663
|
let [y] = g;
|
|
@@ -1652,7 +1670,7 @@ function Qt(e, t, i, n) {
|
|
|
1652
1670
|
l && v();
|
|
1653
1671
|
function v() {
|
|
1654
1672
|
const g = Z(e);
|
|
1655
|
-
m && !
|
|
1673
|
+
m && !pe(m, g) && i(), m = g, p = requestAnimationFrame(v);
|
|
1656
1674
|
}
|
|
1657
1675
|
return i(), () => {
|
|
1658
1676
|
var g;
|
|
@@ -1661,26 +1679,26 @@ function Qt(e, t, i, n) {
|
|
|
1661
1679
|
}), d == null || d(), (g = u) == null || g.disconnect(), u = null, l && cancelAnimationFrame(p);
|
|
1662
1680
|
};
|
|
1663
1681
|
}
|
|
1664
|
-
const
|
|
1682
|
+
const fi = Ye, mi = Ge, ie = je, gi = Xe, vi = Ue, yi = (e, t, i) => {
|
|
1665
1683
|
const n = /* @__PURE__ */ new Map(), o = {
|
|
1666
|
-
platform:
|
|
1684
|
+
platform: ui,
|
|
1667
1685
|
...i
|
|
1668
1686
|
}, s = {
|
|
1669
1687
|
...o.platform,
|
|
1670
1688
|
_c: n
|
|
1671
1689
|
};
|
|
1672
|
-
return
|
|
1690
|
+
return Ve(e, t, {
|
|
1673
1691
|
...o,
|
|
1674
1692
|
platform: s
|
|
1675
1693
|
});
|
|
1676
1694
|
};
|
|
1677
|
-
function
|
|
1695
|
+
function pt(e) {
|
|
1678
1696
|
if (e === void 0)
|
|
1679
1697
|
return 0;
|
|
1680
1698
|
const t = window.devicePixelRatio || 1;
|
|
1681
1699
|
return Math.round(e * t) / t;
|
|
1682
1700
|
}
|
|
1683
|
-
const
|
|
1701
|
+
const ft = 8, wi = 100, bi = (e) => ({
|
|
1684
1702
|
left: ["right", "bottom", "top"],
|
|
1685
1703
|
"left-start": ["right-start", "bottom", "top"],
|
|
1686
1704
|
"left-end": ["right-end", "bottom", "top"],
|
|
@@ -1693,8 +1711,8 @@ const pt = 8, gi = 100, vi = (e) => ({
|
|
|
1693
1711
|
bottom: ["top", "left", "right"],
|
|
1694
1712
|
"bottom-start": ["top-start", "left", "right"],
|
|
1695
1713
|
"bottom-end": ["top-end", "left", "right"]
|
|
1696
|
-
})[e] ?? [e],
|
|
1697
|
-
class
|
|
1714
|
+
})[e] ?? [e], Ui = Symbol("placement updated");
|
|
1715
|
+
class Ei {
|
|
1698
1716
|
/**
|
|
1699
1717
|
* Creates an instance of the PlacementController.
|
|
1700
1718
|
*
|
|
@@ -1722,7 +1740,7 @@ class yi {
|
|
|
1722
1740
|
placeOverlay(t = this.target, i = this.options) {
|
|
1723
1741
|
if (this.target = t, this.options = i, !t || !i)
|
|
1724
1742
|
return;
|
|
1725
|
-
const n =
|
|
1743
|
+
const n = ee(
|
|
1726
1744
|
i.trigger,
|
|
1727
1745
|
t,
|
|
1728
1746
|
this.closeForAncestorUpdate,
|
|
@@ -1731,7 +1749,7 @@ class yi {
|
|
|
1731
1749
|
elementResize: !1,
|
|
1732
1750
|
layoutShift: !1
|
|
1733
1751
|
}
|
|
1734
|
-
), o =
|
|
1752
|
+
), o = ee(
|
|
1735
1753
|
i.trigger,
|
|
1736
1754
|
t,
|
|
1737
1755
|
this.updatePlacement,
|
|
@@ -1766,23 +1784,23 @@ class yi {
|
|
|
1766
1784
|
var f, u;
|
|
1767
1785
|
const { options: t, target: i } = this;
|
|
1768
1786
|
await (document.fonts ? document.fonts.ready : Promise.resolve());
|
|
1769
|
-
const n = t.trigger instanceof HTMLElement ?
|
|
1770
|
-
padding:
|
|
1771
|
-
fallbackPlacements:
|
|
1787
|
+
const n = t.trigger instanceof HTMLElement ? ie() : ie({
|
|
1788
|
+
padding: ft,
|
|
1789
|
+
fallbackPlacements: bi(t.placement)
|
|
1772
1790
|
}), [o = 0, s = 0] = Array.isArray(t == null ? void 0 : t.offset) ? t.offset : [t.offset, 0], r = (f = this.host.elements.find(
|
|
1773
1791
|
(p) => p.tipElement
|
|
1774
1792
|
)) == null ? void 0 : f.tipElement, a = [
|
|
1775
|
-
|
|
1793
|
+
fi({
|
|
1776
1794
|
mainAxis: o,
|
|
1777
1795
|
crossAxis: s
|
|
1778
1796
|
}),
|
|
1779
|
-
|
|
1797
|
+
mi({ padding: ft }),
|
|
1780
1798
|
n,
|
|
1781
|
-
|
|
1782
|
-
padding:
|
|
1799
|
+
gi({
|
|
1800
|
+
padding: ft,
|
|
1783
1801
|
apply: ({ availableWidth: p, availableHeight: m, rects: { floating: v } }) => {
|
|
1784
1802
|
const g = Math.max(
|
|
1785
|
-
|
|
1803
|
+
wi,
|
|
1786
1804
|
Math.floor(m)
|
|
1787
1805
|
), y = v.height;
|
|
1788
1806
|
this.initialHeight = this.isConstrained && this.initialHeight || y, this.isConstrained = y < this.initialHeight || g <= y;
|
|
@@ -1794,12 +1812,12 @@ class yi {
|
|
|
1794
1812
|
}
|
|
1795
1813
|
}),
|
|
1796
1814
|
...r ? [
|
|
1797
|
-
|
|
1815
|
+
vi({
|
|
1798
1816
|
element: r,
|
|
1799
|
-
padding: t.tipPadding ||
|
|
1817
|
+
padding: t.tipPadding || ft
|
|
1800
1818
|
})
|
|
1801
1819
|
] : []
|
|
1802
|
-
], { x: l, y: h, placement: c, middlewareData: d } = await
|
|
1820
|
+
], { x: l, y: h, placement: c, middlewareData: d } = await yi(
|
|
1803
1821
|
t.trigger,
|
|
1804
1822
|
i,
|
|
1805
1823
|
{
|
|
@@ -1811,7 +1829,7 @@ class yi {
|
|
|
1811
1829
|
if (Object.assign(i.style, {
|
|
1812
1830
|
top: "0px",
|
|
1813
1831
|
left: "0px",
|
|
1814
|
-
translate: `${
|
|
1832
|
+
translate: `${pt(l)}px ${pt(h)}px`
|
|
1815
1833
|
}), i.setAttribute("actual-placement", c), (u = this.host.elements) == null || u.forEach((p) => {
|
|
1816
1834
|
this.originalPlacements.has(p) || this.originalPlacements.set(
|
|
1817
1835
|
p,
|
|
@@ -1822,7 +1840,7 @@ class yi {
|
|
|
1822
1840
|
Object.assign(r.style, {
|
|
1823
1841
|
top: c.startsWith("right") || c.startsWith("left") ? "0px" : "",
|
|
1824
1842
|
left: c.startsWith("bottom") || c.startsWith("top") ? "0px" : "",
|
|
1825
|
-
translate: `${
|
|
1843
|
+
translate: `${pt(p)}px ${pt(m)}px`
|
|
1826
1844
|
});
|
|
1827
1845
|
}
|
|
1828
1846
|
}
|
|
@@ -1868,8 +1886,9 @@ class yi {
|
|
|
1868
1886
|
);
|
|
1869
1887
|
}
|
|
1870
1888
|
}
|
|
1871
|
-
var
|
|
1872
|
-
|
|
1889
|
+
var lt = /* @__PURE__ */ ((e) => (e.click = "click", e.hover = "hover", e.longpress = "longpress", e))(lt || {});
|
|
1890
|
+
const St = Symbol("lastInteractionType"), Tt = "remove-focus-ring-safari-hack";
|
|
1891
|
+
class jt {
|
|
1873
1892
|
constructor(t, { overlay: i, isPersistent: n, handleOverlayReady: o }) {
|
|
1874
1893
|
this.target = t, this.isLazilyOpen = !1, this.isPersistent = !1, this.isPersistent = !!n, this.handleOverlayReady = o, this.isPersistent && this.init(), this.overlay = i;
|
|
1875
1894
|
}
|
|
@@ -1886,13 +1905,13 @@ class Vt {
|
|
|
1886
1905
|
set open(t) {
|
|
1887
1906
|
if (t !== this.open) {
|
|
1888
1907
|
if (this.isLazilyOpen = t, this.overlay) {
|
|
1889
|
-
this.overlay.open = t;
|
|
1908
|
+
this.overlay.open = t, this.target[St] = this.type;
|
|
1890
1909
|
return;
|
|
1891
1910
|
}
|
|
1892
1911
|
t && (customElements.whenDefined("luzmo-overlay").then(async () => {
|
|
1893
|
-
const { LuzmoOverlay: i } = await Promise.resolve().then(() =>
|
|
1894
|
-
this.overlay = new i(), this.overlay.open = !0;
|
|
1895
|
-
}), Promise.resolve().then(() =>
|
|
1912
|
+
const { LuzmoOverlay: i } = await Promise.resolve().then(() => kt);
|
|
1913
|
+
this.overlay = new i(), this.overlay.open = !0, this.target[St] = this.type;
|
|
1914
|
+
}), Promise.resolve().then(() => kt));
|
|
1896
1915
|
}
|
|
1897
1916
|
}
|
|
1898
1917
|
get overlay() {
|
|
@@ -1925,9 +1944,9 @@ class Vt {
|
|
|
1925
1944
|
this.isPersistent || this.abort();
|
|
1926
1945
|
}
|
|
1927
1946
|
}
|
|
1928
|
-
class
|
|
1947
|
+
class xi extends jt {
|
|
1929
1948
|
constructor() {
|
|
1930
|
-
super(...arguments), this.type =
|
|
1949
|
+
super(...arguments), this.type = lt.click, this.preventNextToggle = !1;
|
|
1931
1950
|
}
|
|
1932
1951
|
handleClick() {
|
|
1933
1952
|
this.preventNextToggle || (this.open = !this.open), this.preventNextToggle = !1;
|
|
@@ -1948,16 +1967,25 @@ class wi extends Vt {
|
|
|
1948
1967
|
);
|
|
1949
1968
|
}
|
|
1950
1969
|
}
|
|
1951
|
-
const
|
|
1952
|
-
class
|
|
1970
|
+
const Ci = 300;
|
|
1971
|
+
class Pi extends jt {
|
|
1953
1972
|
constructor() {
|
|
1954
|
-
super(...arguments), this.type =
|
|
1973
|
+
super(...arguments), this.type = lt.hover, this.elementIds = [], this.focusedin = !1, this.pointerentered = !1;
|
|
1974
|
+
}
|
|
1975
|
+
handleKeyup(t) {
|
|
1976
|
+
(t.code === "Tab" || t.code === "Escape") && (this.open = !0, this.removeSafariFocusRingClass());
|
|
1955
1977
|
}
|
|
1956
1978
|
handleTargetFocusin() {
|
|
1957
|
-
this.target.matches(":focus-visible")
|
|
1979
|
+
if (this.target.matches(":focus-visible")) {
|
|
1980
|
+
if (Yt() && this.target[St] === lt.click) {
|
|
1981
|
+
this.target.classList.add(Tt);
|
|
1982
|
+
return;
|
|
1983
|
+
}
|
|
1984
|
+
this.open = !0, this.focusedin = !0, this.removeSafariFocusRingClass();
|
|
1985
|
+
}
|
|
1958
1986
|
}
|
|
1959
1987
|
handleTargetFocusout() {
|
|
1960
|
-
this.focusedin = !1, !this.pointerentered && (this.open = !1);
|
|
1988
|
+
this.removeSafariFocusRingClass(), this.focusedin = !1, !this.pointerentered && (this.open = !1);
|
|
1961
1989
|
}
|
|
1962
1990
|
handleTargetPointerenter() {
|
|
1963
1991
|
var t;
|
|
@@ -1981,7 +2009,7 @@ class xi extends Vt {
|
|
|
1981
2009
|
t === n ? this.prepareOverlayRelativeDescription() : t === i && this.prepareContentRelativeDescription();
|
|
1982
2010
|
}
|
|
1983
2011
|
prepareOverlayRelativeDescription() {
|
|
1984
|
-
const t =
|
|
2012
|
+
const t = At(
|
|
1985
2013
|
this.target,
|
|
1986
2014
|
"aria-describedby",
|
|
1987
2015
|
[this.overlay.id]
|
|
@@ -1991,9 +2019,9 @@ class xi extends Vt {
|
|
|
1991
2019
|
};
|
|
1992
2020
|
}
|
|
1993
2021
|
prepareContentRelativeDescription() {
|
|
1994
|
-
const t = [], i = this.overlay.elements.map((o) => (t.push(o.id), o.id || (o.id = `${this.overlay.tagName.toLowerCase()}-helper-${
|
|
2022
|
+
const t = [], i = this.overlay.elements.map((o) => (t.push(o.id), o.id || (o.id = `${this.overlay.tagName.toLowerCase()}-helper-${Ft()}`), o.id));
|
|
1995
2023
|
this.elementIds = t;
|
|
1996
|
-
const n =
|
|
2024
|
+
const n = At(
|
|
1997
2025
|
this.target,
|
|
1998
2026
|
"aria-describedby",
|
|
1999
2027
|
i
|
|
@@ -2009,13 +2037,15 @@ class xi extends Vt {
|
|
|
2009
2037
|
const t = this.target;
|
|
2010
2038
|
this.focusedin && t.matches(":focus-visible") || (this.hoverTimeout = setTimeout(() => {
|
|
2011
2039
|
this.open = !1;
|
|
2012
|
-
},
|
|
2040
|
+
}, Ci));
|
|
2013
2041
|
}
|
|
2014
2042
|
init() {
|
|
2015
2043
|
var i;
|
|
2016
2044
|
(i = this.abortController) == null || i.abort(), this.abortController = new AbortController();
|
|
2017
2045
|
const { signal: t } = this.abortController;
|
|
2018
|
-
this.target.addEventListener("
|
|
2046
|
+
this.target.addEventListener("keyup", (n) => this.handleKeyup(n), {
|
|
2047
|
+
signal: t
|
|
2048
|
+
}), this.target.addEventListener("focusin", () => this.handleTargetFocusin(), {
|
|
2019
2049
|
signal: t
|
|
2020
2050
|
}), this.target.addEventListener(
|
|
2021
2051
|
"focusout",
|
|
@@ -2045,15 +2075,18 @@ class xi extends Vt {
|
|
|
2045
2075
|
{ signal: t }
|
|
2046
2076
|
);
|
|
2047
2077
|
}
|
|
2078
|
+
removeSafariFocusRingClass() {
|
|
2079
|
+
Yt() && this.target.classList.contains(Tt) && this.target.classList.remove(Tt);
|
|
2080
|
+
}
|
|
2048
2081
|
}
|
|
2049
|
-
const
|
|
2082
|
+
const Oi = 300, Ti = {
|
|
2050
2083
|
touch: "Double tap and long press for additional options",
|
|
2051
2084
|
keyboard: "Press Space or Alt+Down Arrow for additional options",
|
|
2052
2085
|
mouse: "Click and hold for additional options"
|
|
2053
2086
|
};
|
|
2054
|
-
class
|
|
2087
|
+
class Ai extends jt {
|
|
2055
2088
|
constructor() {
|
|
2056
|
-
super(...arguments), this.type =
|
|
2089
|
+
super(...arguments), this.type = lt.longpress, this.longpressState = null, this.releaseDescription = J, this.handlePointerup = () => {
|
|
2057
2090
|
var t;
|
|
2058
2091
|
clearTimeout(this.timeout), this.target && (this.longpressState = ((t = this.overlay) == null ? void 0 : t.state) === "opening" ? "pressed" : null, document.removeEventListener("pointerup", this.handlePointerup), document.removeEventListener("pointercancel", this.handlePointerup));
|
|
2059
2092
|
};
|
|
@@ -2075,7 +2108,7 @@ class Ci extends Vt {
|
|
|
2075
2108
|
}
|
|
2076
2109
|
})
|
|
2077
2110
|
);
|
|
2078
|
-
},
|
|
2111
|
+
}, Oi));
|
|
2079
2112
|
}
|
|
2080
2113
|
handleKeydown(t) {
|
|
2081
2114
|
const { code: i, altKey: n } = t;
|
|
@@ -2107,12 +2140,12 @@ class Ci extends Vt {
|
|
|
2107
2140
|
)
|
|
2108
2141
|
return;
|
|
2109
2142
|
const i = document.createElement("div");
|
|
2110
|
-
i.id = `longpress-describedby-descriptor-${
|
|
2111
|
-
const n =
|
|
2112
|
-
i.textContent =
|
|
2143
|
+
i.id = `longpress-describedby-descriptor-${Ft()}`;
|
|
2144
|
+
const n = Ce() || Pe() ? "touch" : "keyboard";
|
|
2145
|
+
i.textContent = Ti[n], i.slot = "longpress-describedby-descriptor";
|
|
2113
2146
|
const o = t.getRootNode(), s = this.overlay.getRootNode();
|
|
2114
2147
|
o === s ? this.overlay.append(i) : (i.hidden = !("host" in o), t.after(i));
|
|
2115
|
-
const r =
|
|
2148
|
+
const r = At(
|
|
2116
2149
|
t,
|
|
2117
2150
|
"aria-describedby",
|
|
2118
2151
|
[i.id]
|
|
@@ -2145,21 +2178,21 @@ class Ci extends Vt {
|
|
|
2145
2178
|
));
|
|
2146
2179
|
}
|
|
2147
2180
|
}
|
|
2148
|
-
const
|
|
2149
|
-
click:
|
|
2150
|
-
longpress:
|
|
2151
|
-
hover:
|
|
2181
|
+
const Ri = {
|
|
2182
|
+
click: xi,
|
|
2183
|
+
longpress: Ai,
|
|
2184
|
+
hover: Pi
|
|
2152
2185
|
};
|
|
2153
|
-
var
|
|
2154
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
2186
|
+
var Di = Object.defineProperty, Li = Object.getOwnPropertyDescriptor, O = (e, t, i, n) => {
|
|
2187
|
+
for (var o = n > 1 ? void 0 : n ? Li(t, i) : t, s = e.length - 1, r; s >= 0; s--)
|
|
2155
2188
|
(r = e[s]) && (o = (n ? r(t, i, o) : r(o)) || o);
|
|
2156
|
-
return n && o &&
|
|
2189
|
+
return n && o && Di(t, i, o), o;
|
|
2157
2190
|
};
|
|
2158
|
-
const
|
|
2159
|
-
let
|
|
2160
|
-
|
|
2161
|
-
var
|
|
2162
|
-
const
|
|
2191
|
+
const Si = "showPopover" in document.createElement("div");
|
|
2192
|
+
let mt = Le(rt);
|
|
2193
|
+
mt = Si ? Fe(mt) : Se(mt);
|
|
2194
|
+
var q;
|
|
2195
|
+
const C = (q = class extends mt {
|
|
2163
2196
|
constructor() {
|
|
2164
2197
|
super(...arguments), this._delayed = !1, this._disabled = !1, this.offset = 0, this._open = !1, this.lastRequestSlottableState = !1, this.receivesFocus = "auto", this._state = "closed", this.triggerElement = null, this.type = "auto", this.wasOpen = !1, this.closeOnFocusOut = (t) => {
|
|
2165
2198
|
if (!t.relatedTarget)
|
|
@@ -2169,7 +2202,8 @@ const P = (I = class extends ft {
|
|
|
2169
2202
|
composed: !0
|
|
2170
2203
|
});
|
|
2171
2204
|
t.relatedTarget.addEventListener(i.type, (n) => {
|
|
2172
|
-
n.composedPath().includes(this)
|
|
2205
|
+
const o = n.composedPath(), s = o.includes(this);
|
|
2206
|
+
console.log("isWithinOverlay", t, n, s, o, this), s || (this.open = !1);
|
|
2173
2207
|
}), t.relatedTarget.dispatchEvent(i);
|
|
2174
2208
|
};
|
|
2175
2209
|
}
|
|
@@ -2193,7 +2227,7 @@ const P = (I = class extends ft {
|
|
|
2193
2227
|
* @returns `true` if the trigger element is not a virtual trigger, otherwise `false`.
|
|
2194
2228
|
*/
|
|
2195
2229
|
get hasNonVirtualTrigger() {
|
|
2196
|
-
return !!this.triggerElement && !(this.triggerElement instanceof
|
|
2230
|
+
return !!this.triggerElement && !(this.triggerElement instanceof bt);
|
|
2197
2231
|
}
|
|
2198
2232
|
/**
|
|
2199
2233
|
* Provides an instance of the `PlacementController` for managing the positioning
|
|
@@ -2206,14 +2240,14 @@ const P = (I = class extends ft {
|
|
|
2206
2240
|
* @returns The `PlacementController` instance.
|
|
2207
2241
|
*/
|
|
2208
2242
|
get placementController() {
|
|
2209
|
-
return this._placementController || (this._placementController = new
|
|
2243
|
+
return this._placementController || (this._placementController = new Ei(this)), this._placementController;
|
|
2210
2244
|
}
|
|
2211
2245
|
get open() {
|
|
2212
2246
|
return this._open;
|
|
2213
2247
|
}
|
|
2214
2248
|
set open(t) {
|
|
2215
2249
|
var i;
|
|
2216
|
-
t && this.disabled || t !== this.open && ((i = this.strategy) != null && i.activelyOpening && !t || (this._open = t, this.open && (
|
|
2250
|
+
t && this.disabled || t !== this.open && ((i = this.strategy) != null && i.activelyOpening && !t || (this._open = t, this.open && (q.openCount += 1), this.requestUpdate("open", !this.open), this.open && this.requestSlottable()));
|
|
2217
2251
|
}
|
|
2218
2252
|
get state() {
|
|
2219
2253
|
return this._state;
|
|
@@ -2234,7 +2268,7 @@ const P = (I = class extends ft {
|
|
|
2234
2268
|
* @returns The `ElementResolutionController` instance.
|
|
2235
2269
|
*/
|
|
2236
2270
|
get elementResolver() {
|
|
2237
|
-
return this._elementResolver || (this._elementResolver = new
|
|
2271
|
+
return this._elementResolver || (this._elementResolver = new we(this)), this._elementResolver;
|
|
2238
2272
|
}
|
|
2239
2273
|
/**
|
|
2240
2274
|
* Determines if the overlay uses a dialog.
|
|
@@ -2308,7 +2342,7 @@ const P = (I = class extends ft {
|
|
|
2308
2342
|
async managePopoverOpen() {
|
|
2309
2343
|
super.managePopoverOpen();
|
|
2310
2344
|
const t = this.open;
|
|
2311
|
-
if (this.open !== t || (await this.manageDelay(t), this.open !== t) || (await this.ensureOnDOM(t), this.open !== t))
|
|
2345
|
+
if (this.open !== t || (await this.manageDelay(t), this.open !== t) || (this.triggerInteraction === "longpress" && await R(), await this.ensureOnDOM(t), this.open !== t))
|
|
2312
2346
|
return;
|
|
2313
2347
|
const i = await this.makeTransition(t);
|
|
2314
2348
|
this.open === t && await this.applyFocus(t, i);
|
|
@@ -2372,13 +2406,13 @@ const P = (I = class extends ft {
|
|
|
2372
2406
|
* @returns A promise that resolves when the overlay has been fully managed.
|
|
2373
2407
|
*/
|
|
2374
2408
|
async manageOpen(t) {
|
|
2375
|
-
if (!(!this.isConnected && this.open) && (this.hasUpdated || await this.updateComplete, this.open ? (
|
|
2409
|
+
if (!(!this.isConnected && this.open) && (this.hasUpdated || await this.updateComplete, this.open ? (Xt.add(this), this.willPreventClose && (document.addEventListener(
|
|
2376
2410
|
"pointerup",
|
|
2377
2411
|
() => {
|
|
2378
2412
|
this.dialogEl.classList.toggle("not-immediately-closable", !1), this.willPreventClose = !1;
|
|
2379
2413
|
},
|
|
2380
2414
|
{ once: !0 }
|
|
2381
|
-
), this.dialogEl.classList.toggle("not-immediately-closable", !0))) : (t && this.dispose(),
|
|
2415
|
+
), this.dialogEl.classList.toggle("not-immediately-closable", !0))) : (t && this.dispose(), Xt.remove(this)), this.open && this.state !== "opened" ? this.state = "opening" : !this.open && this.state !== "closed" && (this.state = "closing"), this.usesDialog ? this.manageDialogOpen() : this.managePopoverOpen(), this.type === "auto")) {
|
|
2382
2416
|
const i = this.getRootNode();
|
|
2383
2417
|
this.open ? i.addEventListener("focusout", this.closeOnFocusOut, {
|
|
2384
2418
|
capture: !0
|
|
@@ -2397,7 +2431,7 @@ const P = (I = class extends ft {
|
|
|
2397
2431
|
*/
|
|
2398
2432
|
bindEvents() {
|
|
2399
2433
|
var t;
|
|
2400
|
-
(t = this.strategy) == null || t.abort(), this.strategy = void 0, this.hasNonVirtualTrigger && this.triggerInteraction && (this.strategy = new
|
|
2434
|
+
(t = this.strategy) == null || t.abort(), this.strategy = void 0, this.hasNonVirtualTrigger && this.triggerInteraction && (this.strategy = new Ri[this.triggerInteraction](
|
|
2401
2435
|
this.triggerElement,
|
|
2402
2436
|
{
|
|
2403
2437
|
overlay: this
|
|
@@ -2482,9 +2516,9 @@ const P = (I = class extends ft {
|
|
|
2482
2516
|
*/
|
|
2483
2517
|
requestSlottable() {
|
|
2484
2518
|
this.lastRequestSlottableState !== this.open && (this.open || document.body.offsetHeight, this.dispatchEvent(
|
|
2485
|
-
new
|
|
2519
|
+
new Ee(
|
|
2486
2520
|
"overlay-content",
|
|
2487
|
-
this.open ? {} :
|
|
2521
|
+
this.open ? {} : xe
|
|
2488
2522
|
)
|
|
2489
2523
|
), this.lastRequestSlottableState = this.open);
|
|
2490
2524
|
}
|
|
@@ -2499,12 +2533,12 @@ const P = (I = class extends ft {
|
|
|
2499
2533
|
*/
|
|
2500
2534
|
willUpdate(t) {
|
|
2501
2535
|
var n;
|
|
2502
|
-
if (this.hasAttribute("id") || this.setAttribute("id", `${this.tagName.toLowerCase()}-${
|
|
2536
|
+
if (this.hasAttribute("id") || this.setAttribute("id", `${this.tagName.toLowerCase()}-${Ft()}`), t.has("open") && (this.hasUpdated || this.open) && this.manageOpen(t.get("open")), t.has("trigger")) {
|
|
2503
2537
|
const [o, s] = ((n = this.trigger) == null ? void 0 : n.split("@")) || [];
|
|
2504
2538
|
this.elementResolver.selector = o ? `#${o}` : "", this.triggerInteraction = s;
|
|
2505
2539
|
}
|
|
2506
2540
|
let i = !1;
|
|
2507
|
-
t.has(
|
|
2541
|
+
t.has(be) && (i = this.triggerElement, this.triggerElement = this.elementResolver.element), t.has("triggerElement") && (i = t.get("triggerElement")), i !== !1 && this.bindEvents();
|
|
2508
2542
|
}
|
|
2509
2543
|
/**
|
|
2510
2544
|
* Lifecycle method called after the component updates.
|
|
@@ -2528,7 +2562,7 @@ const P = (I = class extends ft {
|
|
|
2528
2562
|
* @returns The template result containing the slot element.
|
|
2529
2563
|
*/
|
|
2530
2564
|
renderContent() {
|
|
2531
|
-
return
|
|
2565
|
+
return dt` <slot @slotchange=${this.handleSlotchange}></slot> `;
|
|
2532
2566
|
}
|
|
2533
2567
|
/**
|
|
2534
2568
|
* Generates a style map for the dialog element.
|
|
@@ -2541,7 +2575,7 @@ const P = (I = class extends ft {
|
|
|
2541
2575
|
*/
|
|
2542
2576
|
get dialogStyleMap() {
|
|
2543
2577
|
return {
|
|
2544
|
-
"--luzmo-overlay-open-count":
|
|
2578
|
+
"--luzmo-overlay-open-count": q.openCount.toString()
|
|
2545
2579
|
};
|
|
2546
2580
|
}
|
|
2547
2581
|
/**
|
|
@@ -2554,14 +2588,14 @@ const P = (I = class extends ft {
|
|
|
2554
2588
|
* @returns The template result containing the dialog element.
|
|
2555
2589
|
*/
|
|
2556
2590
|
renderDialog() {
|
|
2557
|
-
return
|
|
2591
|
+
return dt`
|
|
2558
2592
|
<dialog
|
|
2559
2593
|
class="dialog"
|
|
2560
2594
|
part="dialog"
|
|
2561
|
-
placement=${
|
|
2595
|
+
placement=${Pt(
|
|
2562
2596
|
this.requiresPositioning ? this.placement || "right" : void 0
|
|
2563
2597
|
)}
|
|
2564
|
-
style=${
|
|
2598
|
+
style=${Kt(this.dialogStyleMap)}
|
|
2565
2599
|
@close=${this.handleBrowserClose}
|
|
2566
2600
|
@cancel=${this.handleBrowserClose}
|
|
2567
2601
|
@beforetoggle=${this.handleBeforetoggle}
|
|
@@ -2581,15 +2615,15 @@ const P = (I = class extends ft {
|
|
|
2581
2615
|
* @returns The template result containing the popover element.
|
|
2582
2616
|
*/
|
|
2583
2617
|
renderPopover() {
|
|
2584
|
-
return
|
|
2618
|
+
return dt`
|
|
2585
2619
|
<div
|
|
2586
2620
|
class="dialog"
|
|
2587
2621
|
part="dialog"
|
|
2588
|
-
placement=${
|
|
2622
|
+
placement=${Pt(
|
|
2589
2623
|
this.requiresPositioning ? this.placement || "right" : void 0
|
|
2590
2624
|
)}
|
|
2591
|
-
popover=${
|
|
2592
|
-
style=${
|
|
2625
|
+
popover=${Pt(this.popoverValue)}
|
|
2626
|
+
style=${Kt(this.dialogStyleMap)}
|
|
2593
2627
|
@beforetoggle=${this.handleBeforetoggle}
|
|
2594
2628
|
@close=${this.handleBrowserClose}
|
|
2595
2629
|
?is-visible=${this.state !== "closed"}
|
|
@@ -2609,7 +2643,7 @@ const P = (I = class extends ft {
|
|
|
2609
2643
|
*/
|
|
2610
2644
|
render() {
|
|
2611
2645
|
const t = this.type === "modal" || this.type === "page";
|
|
2612
|
-
return
|
|
2646
|
+
return dt`
|
|
2613
2647
|
${t ? this.renderDialog() : this.renderPopover()}
|
|
2614
2648
|
<slot name="longpress-describedby-descriptor"></slot>
|
|
2615
2649
|
`;
|
|
@@ -2637,76 +2671,78 @@ const P = (I = class extends ft {
|
|
|
2637
2671
|
var t;
|
|
2638
2672
|
(t = this.strategy) == null || t.releaseDescription(), this.open = !1, super.disconnectedCallback();
|
|
2639
2673
|
}
|
|
2640
|
-
},
|
|
2674
|
+
}, q.styles = [ge(_e)], q.openCount = 1, q);
|
|
2641
2675
|
O([
|
|
2642
2676
|
z({ type: Boolean })
|
|
2643
|
-
],
|
|
2677
|
+
], C.prototype, "delayed", 1);
|
|
2644
2678
|
O([
|
|
2645
|
-
|
|
2646
|
-
],
|
|
2679
|
+
ne(".dialog")
|
|
2680
|
+
], C.prototype, "dialogEl", 2);
|
|
2647
2681
|
O([
|
|
2648
2682
|
z({ type: Boolean })
|
|
2649
|
-
],
|
|
2683
|
+
], C.prototype, "disabled", 1);
|
|
2650
2684
|
O([
|
|
2651
|
-
|
|
2685
|
+
ye({
|
|
2652
2686
|
flatten: !0,
|
|
2653
2687
|
selector: ':not([slot="longpress-describedby-descriptor"], slot)'
|
|
2654
2688
|
})
|
|
2655
|
-
],
|
|
2689
|
+
], C.prototype, "elements", 2);
|
|
2656
2690
|
O([
|
|
2657
2691
|
z({ type: Number })
|
|
2658
|
-
],
|
|
2692
|
+
], C.prototype, "offset", 2);
|
|
2659
2693
|
O([
|
|
2660
2694
|
z({ type: Boolean, reflect: !0 })
|
|
2661
|
-
],
|
|
2695
|
+
], C.prototype, "open", 1);
|
|
2662
2696
|
O([
|
|
2663
2697
|
z()
|
|
2664
|
-
],
|
|
2698
|
+
], C.prototype, "placement", 2);
|
|
2665
2699
|
O([
|
|
2666
2700
|
z({ attribute: "receives-focus" })
|
|
2667
|
-
],
|
|
2701
|
+
], C.prototype, "receivesFocus", 2);
|
|
2668
2702
|
O([
|
|
2669
|
-
|
|
2670
|
-
],
|
|
2703
|
+
ne("slot")
|
|
2704
|
+
], C.prototype, "slotEl", 2);
|
|
2671
2705
|
O([
|
|
2672
|
-
|
|
2673
|
-
],
|
|
2706
|
+
ve()
|
|
2707
|
+
], C.prototype, "state", 1);
|
|
2674
2708
|
O([
|
|
2675
2709
|
z({ type: Number, attribute: "tip-padding" })
|
|
2676
|
-
],
|
|
2710
|
+
], C.prototype, "tipPadding", 2);
|
|
2677
2711
|
O([
|
|
2678
2712
|
z()
|
|
2679
|
-
],
|
|
2713
|
+
], C.prototype, "trigger", 2);
|
|
2680
2714
|
O([
|
|
2681
2715
|
z({ attribute: !1 })
|
|
2682
|
-
],
|
|
2716
|
+
], C.prototype, "triggerElement", 2);
|
|
2683
2717
|
O([
|
|
2684
2718
|
z({ attribute: !1 })
|
|
2685
|
-
],
|
|
2719
|
+
], C.prototype, "triggerInteraction", 2);
|
|
2686
2720
|
O([
|
|
2687
2721
|
z()
|
|
2688
|
-
],
|
|
2689
|
-
let
|
|
2690
|
-
const
|
|
2722
|
+
], C.prototype, "type", 2);
|
|
2723
|
+
let ki = C;
|
|
2724
|
+
const kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2691
2725
|
__proto__: null,
|
|
2692
|
-
LuzmoOverlay:
|
|
2726
|
+
LuzmoOverlay: ki
|
|
2693
2727
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2694
2728
|
export {
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2729
|
+
xi as C,
|
|
2730
|
+
Pi as H,
|
|
2731
|
+
lt as I,
|
|
2698
2732
|
rt as L,
|
|
2699
|
-
|
|
2700
|
-
|
|
2733
|
+
Ei as P,
|
|
2734
|
+
Tt as S,
|
|
2735
|
+
bt as V,
|
|
2701
2736
|
R as a,
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2737
|
+
jt as b,
|
|
2738
|
+
Ti as c,
|
|
2739
|
+
Ai as d,
|
|
2740
|
+
ki as e,
|
|
2741
|
+
kt as f,
|
|
2742
|
+
zt as g,
|
|
2743
|
+
St as l,
|
|
2708
2744
|
J as n,
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2745
|
+
gt as o,
|
|
2746
|
+
Ui as p,
|
|
2747
|
+
Ri as s
|
|
2712
2748
|
};
|