@tempots/ui 0.10.0 → 0.12.0
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/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Te = Object.defineProperty, ke = (t, e, n) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, d = (t, e, n) => ke(t, typeof e != "symbol" ? e + "" : e, n);
|
|
2
|
-
const
|
|
2
|
+
const jt = "$__signal__", Tt = "$__prop__", kt = "$__computed__";
|
|
3
3
|
var qt;
|
|
4
|
-
qt =
|
|
4
|
+
qt = jt;
|
|
5
5
|
const Me = class F {
|
|
6
6
|
constructor(e, n) {
|
|
7
7
|
d(this, qt, !0), d(this, "_value"), d(this, "_derivatives", []), d(this, "_onValueListeners", []), d(this, "_onDisposeListeners", []), d(this, "get", () => this._value), d(this, "hasListeners", () => this._onValueListeners.length > 0), d(this, "on", (i) => (i(this.get()), this._onValueListeners.push(i), () => {
|
|
@@ -100,7 +100,7 @@ const Me = class F {
|
|
|
100
100
|
}), s;
|
|
101
101
|
}
|
|
102
102
|
static is(e) {
|
|
103
|
-
return e != null && e[
|
|
103
|
+
return e != null && e[jt] === !0;
|
|
104
104
|
}
|
|
105
105
|
static wrap(e, n = (i, o) => i === o) {
|
|
106
106
|
return F.is(e) ? e : new F(e, n);
|
|
@@ -135,6 +135,7 @@ class ct extends (Nt = S, Mt = kt, Nt) {
|
|
|
135
135
|
static is(e) {
|
|
136
136
|
return e != null && e[kt] === !0;
|
|
137
137
|
}
|
|
138
|
+
/** {@inheritDoc Signal.value} */
|
|
138
139
|
get value() {
|
|
139
140
|
return this.get();
|
|
140
141
|
}
|
|
@@ -170,6 +171,7 @@ class St extends ($t = S, Ft = Tt, $t) {
|
|
|
170
171
|
static is(e) {
|
|
171
172
|
return e != null && e[Tt] === !0;
|
|
172
173
|
}
|
|
174
|
+
/** {@inheritDoc Signal.get} */
|
|
173
175
|
get value() {
|
|
174
176
|
return this.get();
|
|
175
177
|
}
|
|
@@ -183,12 +185,12 @@ function P(t, e = (n, i) => n === i) {
|
|
|
183
185
|
function Fe(t, e = (n, i) => n === i) {
|
|
184
186
|
return new S(t, e);
|
|
185
187
|
}
|
|
186
|
-
const
|
|
188
|
+
const Jt = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), Xt = /* @__PURE__ */ new Set([
|
|
187
189
|
"rowSpan",
|
|
188
190
|
"colSpan",
|
|
189
191
|
"tabIndex",
|
|
190
192
|
"valueAsNumber"
|
|
191
|
-
]),
|
|
193
|
+
]), Yt = /* @__PURE__ */ new Set(["valueAsDate"]), Kt = /* @__PURE__ */ new Set([
|
|
192
194
|
"value",
|
|
193
195
|
"textContent",
|
|
194
196
|
"innerText",
|
|
@@ -197,7 +199,7 @@ const Xt = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]
|
|
|
197
199
|
"className",
|
|
198
200
|
"classList"
|
|
199
201
|
]), xt = /* @__PURE__ */ new Map();
|
|
200
|
-
function
|
|
202
|
+
function Z(t, e) {
|
|
201
203
|
if (xt.has(t))
|
|
202
204
|
return xt.get(t);
|
|
203
205
|
{
|
|
@@ -230,11 +232,11 @@ function ze(t) {
|
|
|
230
232
|
n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
231
233
|
};
|
|
232
234
|
}
|
|
233
|
-
function Gt(t) {
|
|
234
|
-
return Xt.has(t) ? Q(t, $e) : Yt.has(t) ? Q(t, Ve) : Jt.has(t) ? Q(t, We) : Kt.has(t) ? Q(t, He) : Q(t, ze);
|
|
235
|
-
}
|
|
236
235
|
function Qt(t) {
|
|
237
|
-
return
|
|
236
|
+
return Jt.has(t) ? Z(t, $e) : Xt.has(t) ? Z(t, Ve) : Yt.has(t) ? Z(t, We) : Kt.has(t) ? Z(t, He) : Z(t, ze);
|
|
237
|
+
}
|
|
238
|
+
function Zt(t) {
|
|
239
|
+
return (e) => Jt.has(t) ? !!e[t] : Xt.has(t) ? Number(e[t]) : Yt.has(t) ? e[t] : Kt.has(t) ? String(e[t]) : e.getAttribute(t);
|
|
238
240
|
}
|
|
239
241
|
function q(t) {
|
|
240
242
|
const e = t;
|
|
@@ -265,13 +267,13 @@ const Ie = (t, e = {
|
|
|
265
267
|
i === !0,
|
|
266
268
|
o === !0
|
|
267
269
|
) || t() && n.preventDefault();
|
|
268
|
-
},
|
|
270
|
+
}, Ue = (t) => (e) => {
|
|
269
271
|
se(e);
|
|
270
272
|
const n = e.createText(t);
|
|
271
273
|
return e.appendOrInsert(n), (i) => {
|
|
272
274
|
i && q(n);
|
|
273
275
|
};
|
|
274
|
-
},
|
|
276
|
+
}, je = (t) => (e) => {
|
|
275
277
|
se(e);
|
|
276
278
|
const n = e.createText(t.value);
|
|
277
279
|
e.appendOrInsert(n);
|
|
@@ -279,7 +281,7 @@ const Ie = (t, e = {
|
|
|
279
281
|
return (o) => {
|
|
280
282
|
i(), o && q(n);
|
|
281
283
|
};
|
|
282
|
-
},
|
|
284
|
+
}, J = (...t) => (e) => {
|
|
283
285
|
const n = t.map((i) => b(i)(e));
|
|
284
286
|
return (i) => {
|
|
285
287
|
n.forEach((o) => o(i));
|
|
@@ -287,7 +289,7 @@ const Ie = (t, e = {
|
|
|
287
289
|
}, tt = () => () => {
|
|
288
290
|
}, qe = (t) => (e) => (ie(e), e.element.classList.add(...t), (n) => {
|
|
289
291
|
n && e.element.classList.remove(...t);
|
|
290
|
-
}),
|
|
292
|
+
}), Je = (t) => (e) => {
|
|
291
293
|
ie(e);
|
|
292
294
|
const n = e.element;
|
|
293
295
|
let i = [];
|
|
@@ -298,7 +300,7 @@ const Ie = (t, e = {
|
|
|
298
300
|
o(), s && i.forEach((r) => n.classList.remove(r)), i.length = 0;
|
|
299
301
|
};
|
|
300
302
|
}, nt = (t, e) => {
|
|
301
|
-
const n =
|
|
303
|
+
const n = Qt(t), i = Zt(t);
|
|
302
304
|
return (o) => {
|
|
303
305
|
ne(o, t);
|
|
304
306
|
const s = i(o.element);
|
|
@@ -307,7 +309,7 @@ const Ie = (t, e = {
|
|
|
307
309
|
};
|
|
308
310
|
};
|
|
309
311
|
}, it = (t, e) => {
|
|
310
|
-
const n =
|
|
312
|
+
const n = Qt(t), i = Zt(t);
|
|
311
313
|
return (o) => {
|
|
312
314
|
ne(o, t);
|
|
313
315
|
const s = i(o.element);
|
|
@@ -315,10 +317,10 @@ const Ie = (t, e = {
|
|
|
315
317
|
r && n(o.element, s);
|
|
316
318
|
};
|
|
317
319
|
};
|
|
318
|
-
},
|
|
320
|
+
}, Lt = new Proxy(
|
|
319
321
|
{},
|
|
320
322
|
{
|
|
321
|
-
get: (t, e) => e === "class" ? (n) => S.is(n) ?
|
|
323
|
+
get: (t, e) => e === "class" ? (n) => S.is(n) ? Je(n) : qe(
|
|
322
324
|
(n ?? "").split(" ").filter((i) => i.length > 0)
|
|
323
325
|
) : (n) => S.is(n) ? it(
|
|
324
326
|
e,
|
|
@@ -375,12 +377,12 @@ new Proxy(
|
|
|
375
377
|
}
|
|
376
378
|
);
|
|
377
379
|
function b(t) {
|
|
378
|
-
return t == null ? tt : Array.isArray(t) ?
|
|
380
|
+
return t == null ? tt : Array.isArray(t) ? J(...t.map(b)) : typeof t == "string" ? Ue(t) : S.is(t) ? je(t) : t;
|
|
379
381
|
}
|
|
380
|
-
function
|
|
382
|
+
function Gt(t, ...e) {
|
|
381
383
|
return (n) => {
|
|
382
384
|
const i = n.createElement(t, void 0);
|
|
383
|
-
n.isFirstLevel &&
|
|
385
|
+
n.isFirstLevel && X.isSSR() && oe(i), n.appendOrInsert(i), n = n.withElement(i);
|
|
384
386
|
const o = e.map((s) => b(s)(n));
|
|
385
387
|
return (s) => {
|
|
386
388
|
o.forEach((r) => r(!1)), s && q(i);
|
|
@@ -390,7 +392,7 @@ function Zt(t, ...e) {
|
|
|
390
392
|
function te(t, e, ...n) {
|
|
391
393
|
return (i) => {
|
|
392
394
|
const o = i.createElement(t, e);
|
|
393
|
-
i.isFirstLevel &&
|
|
395
|
+
i.isFirstLevel && X.isSSR() && oe(o), i.appendOrInsert(o), i = i.withElement(o);
|
|
394
396
|
const s = n.map((r) => b(r)(i));
|
|
395
397
|
return (r) => {
|
|
396
398
|
s.forEach((c) => c(!1)), r && q(o);
|
|
@@ -400,31 +402,31 @@ function te(t, e, ...n) {
|
|
|
400
402
|
const ee = new Proxy(
|
|
401
403
|
{},
|
|
402
404
|
{
|
|
403
|
-
get: (t, e) => (...n) =>
|
|
405
|
+
get: (t, e) => (...n) => Gt(e, n.flatMap(b))
|
|
404
406
|
}
|
|
405
407
|
);
|
|
406
408
|
new Proxy(
|
|
407
409
|
{},
|
|
408
410
|
{
|
|
409
|
-
get: (t, e) => (...n) =>
|
|
411
|
+
get: (t, e) => (...n) => Gt("input", Lt.type(e), ...n)
|
|
410
412
|
}
|
|
411
413
|
);
|
|
412
|
-
const
|
|
414
|
+
const Xe = "http://www.w3.org/2000/svg";
|
|
413
415
|
new Proxy(
|
|
414
416
|
{},
|
|
415
417
|
{
|
|
416
|
-
get: (t, e) => (...n) => te(e,
|
|
418
|
+
get: (t, e) => (...n) => te(e, Xe, n.flatMap(b))
|
|
417
419
|
}
|
|
418
420
|
);
|
|
419
|
-
const
|
|
421
|
+
const Ye = "http://www.w3.org/1998/Math/MathML";
|
|
420
422
|
new Proxy(
|
|
421
423
|
{},
|
|
422
424
|
{
|
|
423
|
-
get: (t, e) => (...n) => te(e,
|
|
425
|
+
get: (t, e) => (...n) => te(e, Ye, n.flatMap(b))
|
|
424
426
|
}
|
|
425
427
|
);
|
|
426
|
-
const Vt = "data-tempo-attr", Ke = "data-tempo-class",
|
|
427
|
-
function
|
|
428
|
+
const Vt = "data-tempo-attr", Ke = "data-tempo-class", Qe = "data-tempo-node", Ze = "data-tempo-text";
|
|
429
|
+
function Ge(t, e) {
|
|
428
430
|
const n = t.getAttribute(e);
|
|
429
431
|
if (n != null) {
|
|
430
432
|
const i = t.getAttribute(Vt) ?? "{}", o = { ...JSON.parse(i), name: n };
|
|
@@ -432,22 +434,22 @@ function Ze(t, e) {
|
|
|
432
434
|
}
|
|
433
435
|
}
|
|
434
436
|
function ne(t, e) {
|
|
435
|
-
|
|
437
|
+
X.isSSR() && t.isFirstLevel && Ge(t.element, e);
|
|
436
438
|
}
|
|
437
439
|
function tn(t) {
|
|
438
440
|
t.setAttribute(Ke, t.className);
|
|
439
441
|
}
|
|
440
442
|
function ie(t) {
|
|
441
|
-
|
|
443
|
+
X.isSSR() && t.isFirstLevel && tn(t.element);
|
|
442
444
|
}
|
|
443
445
|
function oe(t) {
|
|
444
|
-
t.setAttribute(
|
|
446
|
+
t.setAttribute(Qe, "");
|
|
445
447
|
}
|
|
446
448
|
function en(t) {
|
|
447
|
-
t.setAttribute(
|
|
449
|
+
t.setAttribute(Ze, t.textContent ?? "");
|
|
448
450
|
}
|
|
449
451
|
function se(t) {
|
|
450
|
-
|
|
452
|
+
X.isSSR() && t.isFirstLevel && en(t.element);
|
|
451
453
|
}
|
|
452
454
|
function re() {
|
|
453
455
|
const t = globalThis;
|
|
@@ -475,7 +477,7 @@ function on() {
|
|
|
475
477
|
function sn() {
|
|
476
478
|
ce("counter", (ae() ?? 0) - 1);
|
|
477
479
|
}
|
|
478
|
-
const
|
|
480
|
+
const X = {
|
|
479
481
|
useDone: (t) => (on(), b(t(sn))),
|
|
480
482
|
isSSR: nn
|
|
481
483
|
}, rn = (t, e) => (n) => (n.element.addEventListener(t, e), (i) => {
|
|
@@ -483,6 +485,11 @@ const Y = {
|
|
|
483
485
|
}), ue = new Proxy(
|
|
484
486
|
{},
|
|
485
487
|
{
|
|
488
|
+
/**
|
|
489
|
+
* @param name - The name of the event handler.
|
|
490
|
+
* @param fn - The function to call when the event is triggered.
|
|
491
|
+
* @returns A `Renderable` function that adds the event listener to the element.
|
|
492
|
+
*/
|
|
486
493
|
get: (t, e) => (n) => rn(e, n)
|
|
487
494
|
}
|
|
488
495
|
), lt = (t, e) => (n) => {
|
|
@@ -592,34 +599,43 @@ function mn(t, e) {
|
|
|
592
599
|
}
|
|
593
600
|
function gn(t) {
|
|
594
601
|
const e = new URL(t, (window == null ? void 0 : window.location.toString()) ?? ""), n = Object.fromEntries(e.searchParams.entries());
|
|
595
|
-
|
|
602
|
+
let i = e.hash;
|
|
603
|
+
return i.startsWith("#") && (i = i.substring(1)), {
|
|
596
604
|
pathname: e.pathname,
|
|
597
605
|
search: n,
|
|
598
|
-
hash:
|
|
606
|
+
hash: i === "" ? void 0 : i
|
|
599
607
|
};
|
|
600
608
|
}
|
|
601
609
|
function wn(t, e) {
|
|
602
610
|
const n = gn(e);
|
|
603
611
|
return t.set(n), t;
|
|
604
612
|
}
|
|
605
|
-
function yn() {
|
|
613
|
+
function yn(t) {
|
|
614
|
+
const n = new URLSearchParams(t.search).toString(), i = t.hash;
|
|
615
|
+
return `${t.pathname}${n ? `?${n}` : ""}${i ? `#${i}` : ""}`;
|
|
616
|
+
}
|
|
617
|
+
function vn() {
|
|
606
618
|
const t = P(pn(), mn), e = () => {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
619
|
+
let n = (window == null ? void 0 : window.location.hash) ?? "";
|
|
620
|
+
n.startsWith("#") && (n = n.substring(1));
|
|
621
|
+
const i = {
|
|
622
|
+
pathname: (window == null ? void 0 : window.location.pathname) ?? "",
|
|
623
|
+
search: Object.fromEntries(
|
|
624
|
+
new URLSearchParams((window == null ? void 0 : window.location.search) ?? "").entries()
|
|
625
|
+
),
|
|
626
|
+
hash: n === "" ? void 0 : n
|
|
610
627
|
};
|
|
611
|
-
t.set(
|
|
628
|
+
t.set(i);
|
|
612
629
|
};
|
|
613
630
|
return window == null || window.addEventListener("popstate", e), t.onDispose(() => {
|
|
614
631
|
window == null || window.removeEventListener("popstate", e);
|
|
615
632
|
}), t.on((n) => {
|
|
616
|
-
|
|
617
|
-
window == null || window.history.pushState({}, "", r);
|
|
633
|
+
window == null || window.history.pushState({}, "", yn(n));
|
|
618
634
|
}), t;
|
|
619
635
|
}
|
|
620
|
-
function
|
|
621
|
-
const e =
|
|
622
|
-
return
|
|
636
|
+
function ui(t) {
|
|
637
|
+
const e = vn();
|
|
638
|
+
return J(
|
|
623
639
|
ot(e.dispose),
|
|
624
640
|
me(ge, e, t)
|
|
625
641
|
);
|
|
@@ -634,45 +650,45 @@ function we(t) {
|
|
|
634
650
|
};
|
|
635
651
|
});
|
|
636
652
|
}
|
|
637
|
-
function
|
|
653
|
+
function fi(t, ...e) {
|
|
638
654
|
return we((n) => ee.a(
|
|
639
655
|
ue.click(
|
|
640
656
|
Ie(() => (wn(n, S.unwrap(t)), !0))
|
|
641
657
|
),
|
|
642
|
-
|
|
658
|
+
Lt.href(t),
|
|
643
659
|
...e
|
|
644
660
|
));
|
|
645
661
|
}
|
|
646
|
-
const ye = pe("Appearance"),
|
|
662
|
+
const ye = pe("Appearance"), hi = (t) => {
|
|
647
663
|
const e = window.matchMedia != null && window.matchMedia("(prefers-color-scheme: dark)").matches, n = P(e ? "dark" : "light"), i = (s) => {
|
|
648
664
|
n.set(s.matches ? "dark" : "light");
|
|
649
665
|
}, o = window.matchMedia != null ? window.matchMedia("(prefers-color-scheme: dark)") : void 0;
|
|
650
|
-
return o == null || o.addEventListener("change", i),
|
|
666
|
+
return o == null || o.addEventListener("change", i), J(
|
|
651
667
|
me(ye, n, t),
|
|
652
668
|
ot(() => o == null ? void 0 : o.removeEventListener("change", i))
|
|
653
669
|
);
|
|
654
|
-
},
|
|
655
|
-
function
|
|
670
|
+
}, di = (t) => fe(ye, t);
|
|
671
|
+
function xn(t, e) {
|
|
656
672
|
if (typeof e == "function")
|
|
657
|
-
return
|
|
658
|
-
const n = e.failure ?? ((r) =>
|
|
673
|
+
return xn(t, { success: e });
|
|
674
|
+
const n = e.failure ?? ((r) => J(
|
|
659
675
|
ot(r.on(console.error)),
|
|
660
676
|
r.map((c) => `Error: ${c}`)
|
|
661
677
|
)), i = e.success, o = e.loading ?? (() => tt), s = e.notAsked ?? (() => tt);
|
|
662
678
|
return I.type(S.wrap(t), {
|
|
663
|
-
|
|
664
|
-
|
|
679
|
+
AsyncSuccess: (r) => i(r.$.value),
|
|
680
|
+
AsyncFailure: (r) => n(r.$.error),
|
|
665
681
|
Loading: (r) => o(r.$.previousValue ?? Fe(void 0)),
|
|
666
682
|
NotAsked: s
|
|
667
683
|
});
|
|
668
684
|
}
|
|
669
|
-
const
|
|
685
|
+
const pi = (t = 10) => (e) => {
|
|
670
686
|
const n = setTimeout(() => {
|
|
671
687
|
var i;
|
|
672
688
|
(i = e.element) == null || i.focus();
|
|
673
689
|
}, t);
|
|
674
690
|
return (i) => clearTimeout(n);
|
|
675
|
-
},
|
|
691
|
+
}, mi = (t = 10) => (e) => {
|
|
676
692
|
const n = setTimeout(() => {
|
|
677
693
|
var i;
|
|
678
694
|
(i = e.element) == null || i.select();
|
|
@@ -680,12 +696,12 @@ const di = (t = 10) => (e) => {
|
|
|
680
696
|
return (i) => {
|
|
681
697
|
clearTimeout(n);
|
|
682
698
|
};
|
|
683
|
-
},
|
|
699
|
+
}, gi = (t) => {
|
|
684
700
|
const e = t.element, n = e.style.getPropertyValue(":empty");
|
|
685
701
|
return e.style.setProperty(":empty", "display:none"), (i) => {
|
|
686
702
|
i && e.style.setProperty(":empty", n);
|
|
687
703
|
};
|
|
688
|
-
},
|
|
704
|
+
}, wi = (t) => de("head title", Lt.innerText(t)), bn = {
|
|
689
705
|
partial: {
|
|
690
706
|
root: null,
|
|
691
707
|
rootMargin: "0px",
|
|
@@ -699,36 +715,36 @@ const di = (t = 10) => (e) => {
|
|
|
699
715
|
}, ut = {
|
|
700
716
|
partial: /* @__PURE__ */ new Map(),
|
|
701
717
|
full: /* @__PURE__ */ new Map()
|
|
702
|
-
},
|
|
718
|
+
}, G = {
|
|
703
719
|
partial: null,
|
|
704
720
|
full: null
|
|
705
721
|
};
|
|
706
|
-
function
|
|
707
|
-
return
|
|
722
|
+
function An(t) {
|
|
723
|
+
return G[t] == null && (G[t] = new IntersectionObserver((e) => {
|
|
708
724
|
e.forEach((n) => {
|
|
709
725
|
const i = ut[t].get(n.target);
|
|
710
726
|
i == null || i.set(n.isIntersecting);
|
|
711
727
|
});
|
|
712
|
-
},
|
|
728
|
+
}, bn[t])), G[t];
|
|
713
729
|
}
|
|
714
|
-
function
|
|
715
|
-
const n = P(
|
|
716
|
-
return
|
|
730
|
+
function Sn(t, e) {
|
|
731
|
+
const n = P(X.isSSR());
|
|
732
|
+
return J(
|
|
717
733
|
he((i) => {
|
|
718
|
-
const o = typeof IntersectionObserver < "u" ?
|
|
734
|
+
const o = typeof IntersectionObserver < "u" ? An(t) : null;
|
|
719
735
|
return ut[t].set(i, n), o == null || o.observe(i), () => {
|
|
720
736
|
var s;
|
|
721
|
-
o == null || o.unobserve(i), ut[t].delete(i), ut[t].size === 0 && ((s =
|
|
737
|
+
o == null || o.unobserve(i), ut[t].delete(i), ut[t].size === 0 && ((s = G[t]) == null || s.disconnect(), G[t] = null);
|
|
722
738
|
};
|
|
723
739
|
}),
|
|
724
740
|
ot(n.dispose),
|
|
725
741
|
b(e(n))
|
|
726
742
|
);
|
|
727
743
|
}
|
|
728
|
-
const
|
|
744
|
+
const yi = (t, e, n) => Sn(t, (i) => an(i, e, n ?? tt)), ft = Math.min, $ = Math.max, ht = Math.round, at = Math.floor, k = (t) => ({
|
|
729
745
|
x: t,
|
|
730
746
|
y: t
|
|
731
|
-
}),
|
|
747
|
+
}), Ln = {
|
|
732
748
|
left: "right",
|
|
733
749
|
right: "left",
|
|
734
750
|
bottom: "top",
|
|
@@ -755,13 +771,13 @@ function ve(t) {
|
|
|
755
771
|
function xe(t) {
|
|
756
772
|
return t === "y" ? "height" : "width";
|
|
757
773
|
}
|
|
758
|
-
function
|
|
774
|
+
function U(t) {
|
|
759
775
|
return ["top", "bottom"].includes(V(t)) ? "y" : "x";
|
|
760
776
|
}
|
|
761
777
|
function be(t) {
|
|
762
|
-
return ve(
|
|
778
|
+
return ve(U(t));
|
|
763
779
|
}
|
|
764
|
-
function
|
|
780
|
+
function Rn(t, e, n) {
|
|
765
781
|
n === void 0 && (n = !1);
|
|
766
782
|
const i = gt(t), o = be(t), s = xe(o);
|
|
767
783
|
let r = o === "x" ? i === (n ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
@@ -774,7 +790,7 @@ function _n(t) {
|
|
|
774
790
|
function At(t) {
|
|
775
791
|
return t.replace(/start|end/g, (e) => En[e]);
|
|
776
792
|
}
|
|
777
|
-
function
|
|
793
|
+
function On(t, e, n) {
|
|
778
794
|
const i = ["left", "right"], o = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
|
|
779
795
|
switch (t) {
|
|
780
796
|
case "top":
|
|
@@ -787,15 +803,15 @@ function Rn(t, e, n) {
|
|
|
787
803
|
return [];
|
|
788
804
|
}
|
|
789
805
|
}
|
|
790
|
-
function
|
|
806
|
+
function Pn(t, e, n, i) {
|
|
791
807
|
const o = gt(t);
|
|
792
|
-
let s =
|
|
808
|
+
let s = On(V(t), n === "start", i);
|
|
793
809
|
return o && (s = s.map((r) => r + "-" + o), e && (s = s.concat(s.map(At)))), s;
|
|
794
810
|
}
|
|
795
811
|
function dt(t) {
|
|
796
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
812
|
+
return t.replace(/left|right|bottom|top/g, (e) => Ln[e]);
|
|
797
813
|
}
|
|
798
|
-
function
|
|
814
|
+
function Dn(t) {
|
|
799
815
|
return {
|
|
800
816
|
top: 0,
|
|
801
817
|
right: 0,
|
|
@@ -804,8 +820,8 @@ function Pn(t) {
|
|
|
804
820
|
...t
|
|
805
821
|
};
|
|
806
822
|
}
|
|
807
|
-
function
|
|
808
|
-
return typeof t != "number" ?
|
|
823
|
+
function Cn(t) {
|
|
824
|
+
return typeof t != "number" ? Dn(t) : {
|
|
809
825
|
top: t,
|
|
810
826
|
right: t,
|
|
811
827
|
bottom: t,
|
|
@@ -835,7 +851,7 @@ function Ht(t, e, n) {
|
|
|
835
851
|
reference: i,
|
|
836
852
|
floating: o
|
|
837
853
|
} = t;
|
|
838
|
-
const s =
|
|
854
|
+
const s = U(e), r = be(e), c = xe(r), l = V(e), a = s === "y", f = i.x + i.width / 2 - o.width / 2, u = i.y + i.height / 2 - o.height / 2, m = i[c] / 2 - o[c] / 2;
|
|
839
855
|
let h;
|
|
840
856
|
switch (l) {
|
|
841
857
|
case "top":
|
|
@@ -878,7 +894,7 @@ function Ht(t, e, n) {
|
|
|
878
894
|
}
|
|
879
895
|
return h;
|
|
880
896
|
}
|
|
881
|
-
const
|
|
897
|
+
const Tn = async (t, e, n) => {
|
|
882
898
|
const {
|
|
883
899
|
placement: i = "bottom",
|
|
884
900
|
strategy: o = "absolute",
|
|
@@ -900,7 +916,7 @@ const Cn = async (t, e, n) => {
|
|
|
900
916
|
} = c[w], {
|
|
901
917
|
x: v,
|
|
902
918
|
y: x,
|
|
903
|
-
data:
|
|
919
|
+
data: L,
|
|
904
920
|
reset: A
|
|
905
921
|
} = await p({
|
|
906
922
|
x: f,
|
|
@@ -920,7 +936,7 @@ const Cn = async (t, e, n) => {
|
|
|
920
936
|
...h,
|
|
921
937
|
[y]: {
|
|
922
938
|
...h[y],
|
|
923
|
-
...
|
|
939
|
+
...L
|
|
924
940
|
}
|
|
925
941
|
}, A && g <= 50 && (g++, typeof A == "object" && (A.placement && (m = A.placement), A.rects && (a = A.rects === !0 ? await r.getElementRects({
|
|
926
942
|
reference: t,
|
|
@@ -955,7 +971,7 @@ async function Ae(t, e) {
|
|
|
955
971
|
elementContext: u = "floating",
|
|
956
972
|
altBoundary: m = !1,
|
|
957
973
|
padding: h = 0
|
|
958
|
-
} = mt(e, t), g =
|
|
974
|
+
} = mt(e, t), g = Cn(h), y = c[m ? u === "floating" ? "reference" : "floating" : u], p = pt(await s.getClippingRect({
|
|
959
975
|
element: (n = await (s.isElement == null ? void 0 : s.isElement(y))) == null || n ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
960
976
|
boundary: a,
|
|
961
977
|
rootBoundary: f,
|
|
@@ -965,7 +981,7 @@ async function Ae(t, e) {
|
|
|
965
981
|
y: o,
|
|
966
982
|
width: r.floating.width,
|
|
967
983
|
height: r.floating.height
|
|
968
|
-
} : r.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)),
|
|
984
|
+
} : r.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), L = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
|
|
969
985
|
x: 1,
|
|
970
986
|
y: 1
|
|
971
987
|
} : {
|
|
@@ -978,13 +994,13 @@ async function Ae(t, e) {
|
|
|
978
994
|
strategy: l
|
|
979
995
|
}) : v);
|
|
980
996
|
return {
|
|
981
|
-
top: (p.top - A.top + g.top) /
|
|
982
|
-
bottom: (A.bottom - p.bottom + g.bottom) /
|
|
983
|
-
left: (p.left - A.left + g.left) /
|
|
984
|
-
right: (A.right - p.right + g.right) /
|
|
997
|
+
top: (p.top - A.top + g.top) / L.y,
|
|
998
|
+
bottom: (A.bottom - p.bottom + g.bottom) / L.y,
|
|
999
|
+
left: (p.left - A.left + g.left) / L.x,
|
|
1000
|
+
right: (A.right - p.right + g.right) / L.x
|
|
985
1001
|
};
|
|
986
1002
|
}
|
|
987
|
-
const
|
|
1003
|
+
const kn = function(t) {
|
|
988
1004
|
return t === void 0 && (t = {}), {
|
|
989
1005
|
name: "flip",
|
|
990
1006
|
options: t,
|
|
@@ -1008,12 +1024,12 @@ const Tn = function(t) {
|
|
|
1008
1024
|
} = mt(t, e);
|
|
1009
1025
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
1010
1026
|
return {};
|
|
1011
|
-
const p = V(o), v =
|
|
1012
|
-
!m && H && A.push(...
|
|
1027
|
+
const p = V(o), v = U(c), x = V(c) === c, L = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), A = m || (x || !w ? [dt(c)] : _n(c)), H = g !== "none";
|
|
1028
|
+
!m && H && A.push(...Pn(c, w, g, L));
|
|
1013
1029
|
const De = [c, ...A], vt = await Ae(e, y), rt = [];
|
|
1014
1030
|
let K = ((i = s.flip) == null ? void 0 : i.overflows) || [];
|
|
1015
1031
|
if (f && rt.push(vt[p]), u) {
|
|
1016
|
-
const N =
|
|
1032
|
+
const N = Rn(o, r, L);
|
|
1017
1033
|
rt.push(vt[N[0]], vt[N[1]]);
|
|
1018
1034
|
}
|
|
1019
1035
|
if (K = [...K, {
|
|
@@ -1032,31 +1048,31 @@ const Tn = function(t) {
|
|
|
1032
1048
|
placement: Ct
|
|
1033
1049
|
}
|
|
1034
1050
|
};
|
|
1035
|
-
let
|
|
1036
|
-
if (!
|
|
1051
|
+
let Q = (Pt = K.filter((z) => z.overflows[0] <= 0).sort((z, C) => z.overflows[1] - C.overflows[1])[0]) == null ? void 0 : Pt.placement;
|
|
1052
|
+
if (!Q)
|
|
1037
1053
|
switch (h) {
|
|
1038
1054
|
case "bestFit": {
|
|
1039
1055
|
var Dt;
|
|
1040
1056
|
const z = (Dt = K.filter((C) => {
|
|
1041
1057
|
if (H) {
|
|
1042
|
-
const T =
|
|
1058
|
+
const T = U(C.placement);
|
|
1043
1059
|
return T === v || // Create a bias to the `y` side axis due to horizontal
|
|
1044
1060
|
// reading directions favoring greater width.
|
|
1045
1061
|
T === "y";
|
|
1046
1062
|
}
|
|
1047
1063
|
return !0;
|
|
1048
1064
|
}).map((C) => [C.placement, C.overflows.filter((T) => T > 0).reduce((T, Ce) => T + Ce, 0)]).sort((C, T) => C[1] - T[1])[0]) == null ? void 0 : Dt[0];
|
|
1049
|
-
z && (
|
|
1065
|
+
z && (Q = z);
|
|
1050
1066
|
break;
|
|
1051
1067
|
}
|
|
1052
1068
|
case "initialPlacement":
|
|
1053
|
-
|
|
1069
|
+
Q = c;
|
|
1054
1070
|
break;
|
|
1055
1071
|
}
|
|
1056
|
-
if (o !==
|
|
1072
|
+
if (o !== Q)
|
|
1057
1073
|
return {
|
|
1058
1074
|
reset: {
|
|
1059
|
-
placement:
|
|
1075
|
+
placement: Q
|
|
1060
1076
|
}
|
|
1061
1077
|
};
|
|
1062
1078
|
}
|
|
@@ -1064,12 +1080,12 @@ const Tn = function(t) {
|
|
|
1064
1080
|
}
|
|
1065
1081
|
};
|
|
1066
1082
|
};
|
|
1067
|
-
async function
|
|
1083
|
+
async function Mn(t, e) {
|
|
1068
1084
|
const {
|
|
1069
1085
|
placement: n,
|
|
1070
1086
|
platform: i,
|
|
1071
1087
|
elements: o
|
|
1072
|
-
} = t, s = await (i.isRTL == null ? void 0 : i.isRTL(o.floating)), r = V(n), c = gt(n), l =
|
|
1088
|
+
} = t, s = await (i.isRTL == null ? void 0 : i.isRTL(o.floating)), r = V(n), c = gt(n), l = U(n) === "y", a = ["left", "top"].includes(r) ? -1 : 1, f = s && l ? -1 : 1, u = mt(e, t);
|
|
1073
1089
|
let {
|
|
1074
1090
|
mainAxis: m,
|
|
1075
1091
|
crossAxis: h,
|
|
@@ -1092,7 +1108,7 @@ async function kn(t, e) {
|
|
|
1092
1108
|
y: h * f
|
|
1093
1109
|
};
|
|
1094
1110
|
}
|
|
1095
|
-
const
|
|
1111
|
+
const Nn = function(t) {
|
|
1096
1112
|
return t === void 0 && (t = 0), {
|
|
1097
1113
|
name: "offset",
|
|
1098
1114
|
options: t,
|
|
@@ -1103,7 +1119,7 @@ const Mn = function(t) {
|
|
|
1103
1119
|
y: s,
|
|
1104
1120
|
placement: r,
|
|
1105
1121
|
middlewareData: c
|
|
1106
|
-
} = e, l = await
|
|
1122
|
+
} = e, l = await Mn(e, t);
|
|
1107
1123
|
return r === ((n = c.offset) == null ? void 0 : n.placement) && (i = c.arrow) != null && i.alignmentOffset ? {} : {
|
|
1108
1124
|
x: o + l.x,
|
|
1109
1125
|
y: s + l.y,
|
|
@@ -1114,7 +1130,7 @@ const Mn = function(t) {
|
|
|
1114
1130
|
};
|
|
1115
1131
|
}
|
|
1116
1132
|
};
|
|
1117
|
-
},
|
|
1133
|
+
}, Fn = function(t) {
|
|
1118
1134
|
return t === void 0 && (t = {}), {
|
|
1119
1135
|
name: "shift",
|
|
1120
1136
|
options: t,
|
|
@@ -1142,7 +1158,7 @@ const Mn = function(t) {
|
|
|
1142
1158
|
} = mt(t, e), a = {
|
|
1143
1159
|
x: n,
|
|
1144
1160
|
y: i
|
|
1145
|
-
}, f = await Ae(e, l), u =
|
|
1161
|
+
}, f = await Ae(e, l), u = U(V(o)), m = ve(u);
|
|
1146
1162
|
let h = a[m], g = a[u];
|
|
1147
1163
|
if (s) {
|
|
1148
1164
|
const y = m === "y" ? "top" : "left", p = m === "y" ? "bottom" : "right", v = h + f[y], x = h - f[p];
|
|
@@ -1167,10 +1183,10 @@ const Mn = function(t) {
|
|
|
1167
1183
|
}
|
|
1168
1184
|
};
|
|
1169
1185
|
};
|
|
1170
|
-
function
|
|
1186
|
+
function Y(t) {
|
|
1171
1187
|
return Se(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
1172
1188
|
}
|
|
1173
|
-
function
|
|
1189
|
+
function E(t) {
|
|
1174
1190
|
var e;
|
|
1175
1191
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
1176
1192
|
}
|
|
@@ -1179,16 +1195,16 @@ function D(t) {
|
|
|
1179
1195
|
return (e = (Se(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
1180
1196
|
}
|
|
1181
1197
|
function Se(t) {
|
|
1182
|
-
return t instanceof Node || t instanceof
|
|
1198
|
+
return t instanceof Node || t instanceof E(t).Node;
|
|
1183
1199
|
}
|
|
1184
|
-
function
|
|
1185
|
-
return t instanceof Element || t instanceof
|
|
1200
|
+
function _(t) {
|
|
1201
|
+
return t instanceof Element || t instanceof E(t).Element;
|
|
1186
1202
|
}
|
|
1187
1203
|
function O(t) {
|
|
1188
|
-
return t instanceof HTMLElement || t instanceof
|
|
1204
|
+
return t instanceof HTMLElement || t instanceof E(t).HTMLElement;
|
|
1189
1205
|
}
|
|
1190
1206
|
function zt(t) {
|
|
1191
|
-
return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof
|
|
1207
|
+
return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof E(t).ShadowRoot;
|
|
1192
1208
|
}
|
|
1193
1209
|
function st(t) {
|
|
1194
1210
|
const {
|
|
@@ -1196,11 +1212,11 @@ function st(t) {
|
|
|
1196
1212
|
overflowX: n,
|
|
1197
1213
|
overflowY: i,
|
|
1198
1214
|
display: o
|
|
1199
|
-
} =
|
|
1215
|
+
} = R(t);
|
|
1200
1216
|
return /auto|scroll|overlay|hidden|clip/.test(e + i + n) && !["inline", "contents"].includes(o);
|
|
1201
1217
|
}
|
|
1202
|
-
function
|
|
1203
|
-
return ["table", "td", "th"].includes(
|
|
1218
|
+
function $n(t) {
|
|
1219
|
+
return ["table", "td", "th"].includes(Y(t));
|
|
1204
1220
|
}
|
|
1205
1221
|
function wt(t) {
|
|
1206
1222
|
return [":popover-open", ":modal"].some((e) => {
|
|
@@ -1211,32 +1227,32 @@ function wt(t) {
|
|
|
1211
1227
|
}
|
|
1212
1228
|
});
|
|
1213
1229
|
}
|
|
1214
|
-
function
|
|
1215
|
-
const e =
|
|
1230
|
+
function Et(t) {
|
|
1231
|
+
const e = Rt(), n = R(t);
|
|
1216
1232
|
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (n.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (n.contain || "").includes(i));
|
|
1217
1233
|
}
|
|
1218
|
-
function
|
|
1234
|
+
function Vn(t) {
|
|
1219
1235
|
let e = M(t);
|
|
1220
|
-
for (; O(e) && !
|
|
1236
|
+
for (; O(e) && !j(e); ) {
|
|
1221
1237
|
if (wt(e))
|
|
1222
1238
|
return null;
|
|
1223
|
-
if (
|
|
1239
|
+
if (Et(e))
|
|
1224
1240
|
return e;
|
|
1225
1241
|
e = M(e);
|
|
1226
1242
|
}
|
|
1227
1243
|
return null;
|
|
1228
1244
|
}
|
|
1229
|
-
function
|
|
1245
|
+
function Rt() {
|
|
1230
1246
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1231
1247
|
}
|
|
1232
|
-
function
|
|
1233
|
-
return ["html", "body", "#document"].includes(
|
|
1248
|
+
function j(t) {
|
|
1249
|
+
return ["html", "body", "#document"].includes(Y(t));
|
|
1234
1250
|
}
|
|
1235
|
-
function
|
|
1236
|
-
return
|
|
1251
|
+
function R(t) {
|
|
1252
|
+
return E(t).getComputedStyle(t);
|
|
1237
1253
|
}
|
|
1238
1254
|
function yt(t) {
|
|
1239
|
-
return
|
|
1255
|
+
return _(t) ? {
|
|
1240
1256
|
scrollLeft: t.scrollLeft,
|
|
1241
1257
|
scrollTop: t.scrollTop
|
|
1242
1258
|
} : {
|
|
@@ -1245,7 +1261,7 @@ function yt(t) {
|
|
|
1245
1261
|
};
|
|
1246
1262
|
}
|
|
1247
1263
|
function M(t) {
|
|
1248
|
-
if (
|
|
1264
|
+
if (Y(t) === "html")
|
|
1249
1265
|
return t;
|
|
1250
1266
|
const e = (
|
|
1251
1267
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
@@ -1256,18 +1272,18 @@ function M(t) {
|
|
|
1256
1272
|
);
|
|
1257
1273
|
return zt(e) ? e.host : e;
|
|
1258
1274
|
}
|
|
1259
|
-
function
|
|
1275
|
+
function Le(t) {
|
|
1260
1276
|
const e = M(t);
|
|
1261
|
-
return
|
|
1277
|
+
return j(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : O(e) && st(e) ? e : Le(e);
|
|
1262
1278
|
}
|
|
1263
1279
|
function et(t, e, n) {
|
|
1264
1280
|
var i;
|
|
1265
1281
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
1266
|
-
const o =
|
|
1282
|
+
const o = Le(t), s = o === ((i = t.ownerDocument) == null ? void 0 : i.body), r = E(o);
|
|
1267
1283
|
return s ? e.concat(r, r.visualViewport || [], st(o) ? o : [], r.frameElement && n ? et(r.frameElement) : []) : e.concat(o, et(o, [], n));
|
|
1268
1284
|
}
|
|
1269
|
-
function
|
|
1270
|
-
const e =
|
|
1285
|
+
function Ee(t) {
|
|
1286
|
+
const e = R(t);
|
|
1271
1287
|
let n = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
|
|
1272
1288
|
const o = O(t), s = o ? t.offsetWidth : n, r = o ? t.offsetHeight : i, c = ht(n) !== s || ht(i) !== r;
|
|
1273
1289
|
return c && (n = s, i = r), {
|
|
@@ -1276,48 +1292,48 @@ function Le(t) {
|
|
|
1276
1292
|
$: c
|
|
1277
1293
|
};
|
|
1278
1294
|
}
|
|
1279
|
-
function
|
|
1280
|
-
return
|
|
1295
|
+
function _t(t) {
|
|
1296
|
+
return _(t) ? t : t.contextElement;
|
|
1281
1297
|
}
|
|
1282
1298
|
function B(t) {
|
|
1283
|
-
const e =
|
|
1299
|
+
const e = _t(t);
|
|
1284
1300
|
if (!O(e))
|
|
1285
1301
|
return k(1);
|
|
1286
1302
|
const n = e.getBoundingClientRect(), {
|
|
1287
1303
|
width: i,
|
|
1288
1304
|
height: o,
|
|
1289
1305
|
$: s
|
|
1290
|
-
} =
|
|
1306
|
+
} = Ee(e);
|
|
1291
1307
|
let r = (s ? ht(n.width) : n.width) / i, c = (s ? ht(n.height) : n.height) / o;
|
|
1292
1308
|
return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
1293
1309
|
x: r,
|
|
1294
1310
|
y: c
|
|
1295
1311
|
};
|
|
1296
1312
|
}
|
|
1297
|
-
const
|
|
1298
|
-
function
|
|
1299
|
-
const e =
|
|
1300
|
-
return !
|
|
1313
|
+
const Wn = /* @__PURE__ */ k(0);
|
|
1314
|
+
function Re(t) {
|
|
1315
|
+
const e = E(t);
|
|
1316
|
+
return !Rt() || !e.visualViewport ? Wn : {
|
|
1301
1317
|
x: e.visualViewport.offsetLeft,
|
|
1302
1318
|
y: e.visualViewport.offsetTop
|
|
1303
1319
|
};
|
|
1304
1320
|
}
|
|
1305
|
-
function
|
|
1306
|
-
return e === void 0 && (e = !1), !n || e && n !==
|
|
1321
|
+
function Hn(t, e, n) {
|
|
1322
|
+
return e === void 0 && (e = !1), !n || e && n !== E(t) ? !1 : e;
|
|
1307
1323
|
}
|
|
1308
1324
|
function W(t, e, n, i) {
|
|
1309
1325
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
1310
|
-
const o = t.getBoundingClientRect(), s =
|
|
1326
|
+
const o = t.getBoundingClientRect(), s = _t(t);
|
|
1311
1327
|
let r = k(1);
|
|
1312
|
-
e && (i ?
|
|
1313
|
-
const c =
|
|
1328
|
+
e && (i ? _(i) && (r = B(i)) : r = B(t));
|
|
1329
|
+
const c = Hn(s, n, i) ? Re(s) : k(0);
|
|
1314
1330
|
let l = (o.left + c.x) / r.x, a = (o.top + c.y) / r.y, f = o.width / r.x, u = o.height / r.y;
|
|
1315
1331
|
if (s) {
|
|
1316
|
-
const m =
|
|
1332
|
+
const m = E(s), h = i && _(i) ? E(i) : i;
|
|
1317
1333
|
let g = m, w = g.frameElement;
|
|
1318
1334
|
for (; w && i && h !== g; ) {
|
|
1319
|
-
const y = B(w), p = w.getBoundingClientRect(), v =
|
|
1320
|
-
l *= y.x, a *= y.y, f *= y.x, u *= y.y, l += x, a +=
|
|
1335
|
+
const y = B(w), p = w.getBoundingClientRect(), v = R(w), x = p.left + (w.clientLeft + parseFloat(v.paddingLeft)) * y.x, L = p.top + (w.clientTop + parseFloat(v.paddingTop)) * y.y;
|
|
1336
|
+
l *= y.x, a *= y.y, f *= y.x, u *= y.y, l += x, a += L, g = E(w), w = g.frameElement;
|
|
1321
1337
|
}
|
|
1322
1338
|
}
|
|
1323
1339
|
return pt({
|
|
@@ -1327,7 +1343,7 @@ function W(t, e, n, i) {
|
|
|
1327
1343
|
y: a
|
|
1328
1344
|
});
|
|
1329
1345
|
}
|
|
1330
|
-
function
|
|
1346
|
+
function zn(t) {
|
|
1331
1347
|
let {
|
|
1332
1348
|
elements: e,
|
|
1333
1349
|
rect: n,
|
|
@@ -1342,7 +1358,7 @@ function Hn(t) {
|
|
|
1342
1358
|
scrollTop: 0
|
|
1343
1359
|
}, a = k(1);
|
|
1344
1360
|
const f = k(0), u = O(i);
|
|
1345
|
-
if ((u || !u && !s) && ((
|
|
1361
|
+
if ((u || !u && !s) && ((Y(i) !== "body" || st(r)) && (l = yt(i)), O(i))) {
|
|
1346
1362
|
const m = W(i);
|
|
1347
1363
|
a = B(i), f.x = m.x + i.clientLeft, f.y = m.y + i.clientTop;
|
|
1348
1364
|
}
|
|
@@ -1353,29 +1369,29 @@ function Hn(t) {
|
|
|
1353
1369
|
y: n.y * a.y - l.scrollTop * a.y + f.y
|
|
1354
1370
|
};
|
|
1355
1371
|
}
|
|
1356
|
-
function
|
|
1372
|
+
function Bn(t) {
|
|
1357
1373
|
return Array.from(t.getClientRects());
|
|
1358
1374
|
}
|
|
1359
|
-
function
|
|
1375
|
+
function _e(t) {
|
|
1360
1376
|
return W(D(t)).left + yt(t).scrollLeft;
|
|
1361
1377
|
}
|
|
1362
|
-
function
|
|
1378
|
+
function In(t) {
|
|
1363
1379
|
const e = D(t), n = yt(t), i = t.ownerDocument.body, o = $(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), s = $(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
|
|
1364
|
-
let r = -n.scrollLeft +
|
|
1380
|
+
let r = -n.scrollLeft + _e(t);
|
|
1365
1381
|
const c = -n.scrollTop;
|
|
1366
|
-
return
|
|
1382
|
+
return R(i).direction === "rtl" && (r += $(e.clientWidth, i.clientWidth) - o), {
|
|
1367
1383
|
width: o,
|
|
1368
1384
|
height: s,
|
|
1369
1385
|
x: r,
|
|
1370
1386
|
y: c
|
|
1371
1387
|
};
|
|
1372
1388
|
}
|
|
1373
|
-
function
|
|
1374
|
-
const n =
|
|
1389
|
+
function Un(t, e) {
|
|
1390
|
+
const n = E(t), i = D(t), o = n.visualViewport;
|
|
1375
1391
|
let s = i.clientWidth, r = i.clientHeight, c = 0, l = 0;
|
|
1376
1392
|
if (o) {
|
|
1377
1393
|
s = o.width, r = o.height;
|
|
1378
|
-
const a =
|
|
1394
|
+
const a = Rt();
|
|
1379
1395
|
(!a || a && e === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
|
|
1380
1396
|
}
|
|
1381
1397
|
return {
|
|
@@ -1397,13 +1413,13 @@ function jn(t, e) {
|
|
|
1397
1413
|
function Bt(t, e, n) {
|
|
1398
1414
|
let i;
|
|
1399
1415
|
if (e === "viewport")
|
|
1400
|
-
i =
|
|
1416
|
+
i = Un(t, n);
|
|
1401
1417
|
else if (e === "document")
|
|
1402
|
-
i =
|
|
1403
|
-
else if (
|
|
1418
|
+
i = In(D(t));
|
|
1419
|
+
else if (_(e))
|
|
1404
1420
|
i = jn(e, n);
|
|
1405
1421
|
else {
|
|
1406
|
-
const o =
|
|
1422
|
+
const o = Re(t);
|
|
1407
1423
|
i = {
|
|
1408
1424
|
...e,
|
|
1409
1425
|
x: e.x - o.x,
|
|
@@ -1414,29 +1430,29 @@ function Bt(t, e, n) {
|
|
|
1414
1430
|
}
|
|
1415
1431
|
function Oe(t, e) {
|
|
1416
1432
|
const n = M(t);
|
|
1417
|
-
return n === e || !
|
|
1433
|
+
return n === e || !_(n) || j(n) ? !1 : R(n).position === "fixed" || Oe(n, e);
|
|
1418
1434
|
}
|
|
1419
|
-
function
|
|
1435
|
+
function qn(t, e) {
|
|
1420
1436
|
const n = e.get(t);
|
|
1421
1437
|
if (n)
|
|
1422
1438
|
return n;
|
|
1423
|
-
let i = et(t, [], !1).filter((c) =>
|
|
1424
|
-
const s =
|
|
1439
|
+
let i = et(t, [], !1).filter((c) => _(c) && Y(c) !== "body"), o = null;
|
|
1440
|
+
const s = R(t).position === "fixed";
|
|
1425
1441
|
let r = s ? M(t) : t;
|
|
1426
|
-
for (;
|
|
1427
|
-
const c =
|
|
1442
|
+
for (; _(r) && !j(r); ) {
|
|
1443
|
+
const c = R(r), l = Et(r);
|
|
1428
1444
|
!l && c.position === "fixed" && (o = null), (s ? !l && !o : !l && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || st(r) && !l && Oe(t, r)) ? i = i.filter((f) => f !== r) : o = c, r = M(r);
|
|
1429
1445
|
}
|
|
1430
1446
|
return e.set(t, i), i;
|
|
1431
1447
|
}
|
|
1432
|
-
function
|
|
1448
|
+
function Jn(t) {
|
|
1433
1449
|
let {
|
|
1434
1450
|
element: e,
|
|
1435
1451
|
boundary: n,
|
|
1436
1452
|
rootBoundary: i,
|
|
1437
1453
|
strategy: o
|
|
1438
1454
|
} = t;
|
|
1439
|
-
const r = [...n === "clippingAncestors" ? wt(e) ? [] :
|
|
1455
|
+
const r = [...n === "clippingAncestors" ? wt(e) ? [] : qn(e, this._c) : [].concat(n), i], c = r[0], l = r.reduce((a, f) => {
|
|
1440
1456
|
const u = Bt(e, f, o);
|
|
1441
1457
|
return a.top = $(u.top, a.top), a.right = ft(u.right, a.right), a.bottom = ft(u.bottom, a.bottom), a.left = $(u.left, a.left), a;
|
|
1442
1458
|
}, Bt(e, c, o));
|
|
@@ -1451,7 +1467,7 @@ function Xn(t) {
|
|
|
1451
1467
|
const {
|
|
1452
1468
|
width: e,
|
|
1453
1469
|
height: n
|
|
1454
|
-
} =
|
|
1470
|
+
} = Ee(t);
|
|
1455
1471
|
return {
|
|
1456
1472
|
width: e,
|
|
1457
1473
|
height: n
|
|
@@ -1465,10 +1481,10 @@ function Yn(t, e, n) {
|
|
|
1465
1481
|
};
|
|
1466
1482
|
const l = k(0);
|
|
1467
1483
|
if (i || !i && !s)
|
|
1468
|
-
if ((
|
|
1484
|
+
if ((Y(e) !== "body" || st(o)) && (c = yt(e)), i) {
|
|
1469
1485
|
const u = W(e, !0, s, e);
|
|
1470
1486
|
l.x = u.x + e.clientLeft, l.y = u.y + e.clientTop;
|
|
1471
|
-
} else o && (l.x =
|
|
1487
|
+
} else o && (l.x = _e(o));
|
|
1472
1488
|
const a = r.left + c.scrollLeft - l.x, f = r.top + c.scrollTop - l.y;
|
|
1473
1489
|
return {
|
|
1474
1490
|
x: a,
|
|
@@ -1478,30 +1494,30 @@ function Yn(t, e, n) {
|
|
|
1478
1494
|
};
|
|
1479
1495
|
}
|
|
1480
1496
|
function bt(t) {
|
|
1481
|
-
return
|
|
1497
|
+
return R(t).position === "static";
|
|
1482
1498
|
}
|
|
1483
1499
|
function It(t, e) {
|
|
1484
|
-
return !O(t) ||
|
|
1500
|
+
return !O(t) || R(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
|
|
1485
1501
|
}
|
|
1486
1502
|
function Pe(t, e) {
|
|
1487
|
-
const n =
|
|
1503
|
+
const n = E(t);
|
|
1488
1504
|
if (wt(t))
|
|
1489
1505
|
return n;
|
|
1490
1506
|
if (!O(t)) {
|
|
1491
1507
|
let o = M(t);
|
|
1492
|
-
for (; o && !
|
|
1493
|
-
if (
|
|
1508
|
+
for (; o && !j(o); ) {
|
|
1509
|
+
if (_(o) && !bt(o))
|
|
1494
1510
|
return o;
|
|
1495
1511
|
o = M(o);
|
|
1496
1512
|
}
|
|
1497
1513
|
return n;
|
|
1498
1514
|
}
|
|
1499
1515
|
let i = It(t, e);
|
|
1500
|
-
for (; i &&
|
|
1516
|
+
for (; i && $n(i) && bt(i); )
|
|
1501
1517
|
i = It(i, e);
|
|
1502
|
-
return i &&
|
|
1518
|
+
return i && j(i) && bt(i) && !Et(i) ? n : i || Vn(t) || n;
|
|
1503
1519
|
}
|
|
1504
|
-
const
|
|
1520
|
+
const Kn = async function(t) {
|
|
1505
1521
|
const e = this.getOffsetParent || Pe, n = this.getDimensions, i = await n(t.floating);
|
|
1506
1522
|
return {
|
|
1507
1523
|
reference: Yn(t.reference, await e(t.floating), t.strategy),
|
|
@@ -1513,22 +1529,22 @@ const Jn = async function(t) {
|
|
|
1513
1529
|
}
|
|
1514
1530
|
};
|
|
1515
1531
|
};
|
|
1516
|
-
function
|
|
1517
|
-
return
|
|
1532
|
+
function Qn(t) {
|
|
1533
|
+
return R(t).direction === "rtl";
|
|
1518
1534
|
}
|
|
1519
|
-
const
|
|
1520
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1535
|
+
const Zn = {
|
|
1536
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: zn,
|
|
1521
1537
|
getDocumentElement: D,
|
|
1522
|
-
getClippingRect:
|
|
1538
|
+
getClippingRect: Jn,
|
|
1523
1539
|
getOffsetParent: Pe,
|
|
1524
|
-
getElementRects:
|
|
1525
|
-
getClientRects:
|
|
1540
|
+
getElementRects: Kn,
|
|
1541
|
+
getClientRects: Bn,
|
|
1526
1542
|
getDimensions: Xn,
|
|
1527
1543
|
getScale: B,
|
|
1528
|
-
isElement:
|
|
1529
|
-
isRTL:
|
|
1544
|
+
isElement: _,
|
|
1545
|
+
isRTL: Qn
|
|
1530
1546
|
};
|
|
1531
|
-
function
|
|
1547
|
+
function Gn(t, e) {
|
|
1532
1548
|
let n = null, i;
|
|
1533
1549
|
const o = D(t);
|
|
1534
1550
|
function s() {
|
|
@@ -1550,7 +1566,7 @@ function Qn(t, e) {
|
|
|
1550
1566
|
threshold: $(0, ft(1, l)) || 1
|
|
1551
1567
|
};
|
|
1552
1568
|
let x = !0;
|
|
1553
|
-
function
|
|
1569
|
+
function L(A) {
|
|
1554
1570
|
const H = A[0].intersectionRatio;
|
|
1555
1571
|
if (H !== l) {
|
|
1556
1572
|
if (!x)
|
|
@@ -1562,19 +1578,19 @@ function Qn(t, e) {
|
|
|
1562
1578
|
x = !1;
|
|
1563
1579
|
}
|
|
1564
1580
|
try {
|
|
1565
|
-
n = new IntersectionObserver(
|
|
1581
|
+
n = new IntersectionObserver(L, {
|
|
1566
1582
|
...v,
|
|
1567
1583
|
// Handle <iframe>s
|
|
1568
1584
|
root: o.ownerDocument
|
|
1569
1585
|
});
|
|
1570
1586
|
} catch {
|
|
1571
|
-
n = new IntersectionObserver(
|
|
1587
|
+
n = new IntersectionObserver(L, v);
|
|
1572
1588
|
}
|
|
1573
1589
|
n.observe(t);
|
|
1574
1590
|
}
|
|
1575
1591
|
return r(!0), s;
|
|
1576
1592
|
}
|
|
1577
|
-
function
|
|
1593
|
+
function ti(t, e, n, i) {
|
|
1578
1594
|
i === void 0 && (i = {});
|
|
1579
1595
|
const {
|
|
1580
1596
|
ancestorScroll: o = !0,
|
|
@@ -1582,13 +1598,13 @@ function Zn(t, e, n, i) {
|
|
|
1582
1598
|
elementResize: r = typeof ResizeObserver == "function",
|
|
1583
1599
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1584
1600
|
animationFrame: l = !1
|
|
1585
|
-
} = i, a =
|
|
1601
|
+
} = i, a = _t(t), f = o || s ? [...a ? et(a) : [], ...et(e)] : [];
|
|
1586
1602
|
f.forEach((p) => {
|
|
1587
1603
|
o && p.addEventListener("scroll", n, {
|
|
1588
1604
|
passive: !0
|
|
1589
1605
|
}), s && p.addEventListener("resize", n);
|
|
1590
1606
|
});
|
|
1591
|
-
const u = a && c ?
|
|
1607
|
+
const u = a && c ? Gn(a, n) : null;
|
|
1592
1608
|
let m = -1, h = null;
|
|
1593
1609
|
r && (h = new ResizeObserver((p) => {
|
|
1594
1610
|
let [v] = p;
|
|
@@ -1610,20 +1626,20 @@ function Zn(t, e, n, i) {
|
|
|
1610
1626
|
}), u == null || u(), (p = h) == null || p.disconnect(), h = null, l && cancelAnimationFrame(g);
|
|
1611
1627
|
};
|
|
1612
1628
|
}
|
|
1613
|
-
const
|
|
1629
|
+
const ei = Nn, ni = Fn, Ut = kn, ii = (t, e, n) => {
|
|
1614
1630
|
const i = /* @__PURE__ */ new Map(), o = {
|
|
1615
|
-
platform:
|
|
1631
|
+
platform: Zn,
|
|
1616
1632
|
...n
|
|
1617
1633
|
}, s = {
|
|
1618
1634
|
...o.platform,
|
|
1619
1635
|
_c: i
|
|
1620
1636
|
};
|
|
1621
|
-
return
|
|
1637
|
+
return Tn(t, e, {
|
|
1622
1638
|
...o,
|
|
1623
1639
|
platform: s
|
|
1624
1640
|
});
|
|
1625
1641
|
};
|
|
1626
|
-
function
|
|
1642
|
+
function vi({
|
|
1627
1643
|
content: t,
|
|
1628
1644
|
open: e,
|
|
1629
1645
|
placement: n,
|
|
@@ -1637,15 +1653,15 @@ function yi({
|
|
|
1637
1653
|
ee.div(
|
|
1638
1654
|
he((l) => {
|
|
1639
1655
|
const a = l;
|
|
1640
|
-
return a.style.position = "absolute",
|
|
1641
|
-
|
|
1656
|
+
return a.style.position = "absolute", ti(r, a, () => {
|
|
1657
|
+
ii(r, a, {
|
|
1642
1658
|
placement: n,
|
|
1643
1659
|
strategy: "absolute",
|
|
1644
1660
|
middleware: [
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1661
|
+
Ut(),
|
|
1662
|
+
ei({ mainAxis: i, crossAxis: o }),
|
|
1663
|
+
ni(),
|
|
1664
|
+
Ut()
|
|
1649
1665
|
]
|
|
1650
1666
|
}).then(({ x: f, y: u }) => {
|
|
1651
1667
|
a.style.top = `${u}px`, a.style.left = `${f}px`;
|
|
@@ -1659,10 +1675,10 @@ function yi({
|
|
|
1659
1675
|
})(s);
|
|
1660
1676
|
};
|
|
1661
1677
|
}
|
|
1662
|
-
function
|
|
1678
|
+
function oi(t, e) {
|
|
1663
1679
|
if (typeof e == "function")
|
|
1664
|
-
return
|
|
1665
|
-
const n = e.failure ?? ((o) =>
|
|
1680
|
+
return oi(t, { success: e });
|
|
1681
|
+
const n = e.failure ?? ((o) => J(
|
|
1666
1682
|
ot(o.on(console.error)),
|
|
1667
1683
|
o.map((s) => `Error: ${s}`)
|
|
1668
1684
|
)), i = e.success;
|
|
@@ -1671,13 +1687,13 @@ function ii(t, e) {
|
|
|
1671
1687
|
Failure: (o) => n(o.$.error)
|
|
1672
1688
|
});
|
|
1673
1689
|
}
|
|
1674
|
-
function
|
|
1690
|
+
function xi() {
|
|
1675
1691
|
return ue.focus((t) => {
|
|
1676
1692
|
var e;
|
|
1677
1693
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1678
1694
|
});
|
|
1679
1695
|
}
|
|
1680
|
-
const
|
|
1696
|
+
const si = (t) => (e) => {
|
|
1681
1697
|
const n = e.element, i = P({ width: n.clientWidth, height: n.clientHeight }), o = b(t(i))(e), s = () => {
|
|
1682
1698
|
i.set({ width: n.clientWidth, height: n.clientHeight });
|
|
1683
1699
|
};
|
|
@@ -1685,7 +1701,7 @@ const oi = (t) => (e) => {
|
|
|
1685
1701
|
return typeof ResizeObserver == "function" && (r = new ResizeObserver(s), r.observe(n)), (c) => {
|
|
1686
1702
|
r == null || r.disconnect(), o(c);
|
|
1687
1703
|
};
|
|
1688
|
-
},
|
|
1704
|
+
}, ri = (t) => (e) => {
|
|
1689
1705
|
const n = P({
|
|
1690
1706
|
width: (window == null ? void 0 : window.innerWidth) ?? 0,
|
|
1691
1707
|
height: (window == null ? void 0 : window.innerHeight) ?? 0
|
|
@@ -1698,11 +1714,11 @@ const oi = (t) => (e) => {
|
|
|
1698
1714
|
return window == null || window.addEventListener("resize", o), (s) => {
|
|
1699
1715
|
window == null || window.removeEventListener("resize", o), i(s);
|
|
1700
1716
|
};
|
|
1701
|
-
},
|
|
1702
|
-
element:
|
|
1703
|
-
window:
|
|
1717
|
+
}, bi = {
|
|
1718
|
+
element: si,
|
|
1719
|
+
window: ri
|
|
1704
1720
|
};
|
|
1705
|
-
function
|
|
1721
|
+
function ci(t, e) {
|
|
1706
1722
|
const n = e.split("/").filter((o) => o !== ""), i = {};
|
|
1707
1723
|
for (let o = 0; o < t.length; o++) {
|
|
1708
1724
|
const s = t[o], r = n[o];
|
|
@@ -1718,25 +1734,25 @@ function ri(t, e) {
|
|
|
1718
1734
|
}
|
|
1719
1735
|
return n.length !== t.length ? null : { params: i, path: e };
|
|
1720
1736
|
}
|
|
1721
|
-
function
|
|
1737
|
+
function li(t) {
|
|
1722
1738
|
return t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== "");
|
|
1723
1739
|
}
|
|
1724
|
-
function
|
|
1740
|
+
function ai(t) {
|
|
1725
1741
|
const e = t.map((n) => {
|
|
1726
|
-
const i =
|
|
1742
|
+
const i = li(n);
|
|
1727
1743
|
return { route: n, segments: i };
|
|
1728
1744
|
});
|
|
1729
1745
|
return function(i) {
|
|
1730
1746
|
for (const { segments: o, route: s } of e) {
|
|
1731
|
-
const r =
|
|
1747
|
+
const r = ci(o, i);
|
|
1732
1748
|
if (r)
|
|
1733
1749
|
return { ...r, route: s };
|
|
1734
1750
|
}
|
|
1735
1751
|
return null;
|
|
1736
1752
|
};
|
|
1737
1753
|
}
|
|
1738
|
-
function
|
|
1739
|
-
const e =
|
|
1754
|
+
function Ai(t) {
|
|
1755
|
+
const e = ai(Object.keys(t));
|
|
1740
1756
|
return we((n) => {
|
|
1741
1757
|
const i = n.map((o) => {
|
|
1742
1758
|
const s = e(o.pathname);
|
|
@@ -1758,31 +1774,32 @@ function bi(t) {
|
|
|
1758
1774
|
});
|
|
1759
1775
|
}
|
|
1760
1776
|
export {
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1777
|
+
fi as Anchor,
|
|
1778
|
+
xn as AsyncResultView,
|
|
1779
|
+
pi as AutoFocus,
|
|
1780
|
+
mi as AutoSelect,
|
|
1781
|
+
wi as HTMLTitle,
|
|
1782
|
+
gi as HiddenWhenEmpty,
|
|
1783
|
+
Sn as InViewport,
|
|
1768
1784
|
ge as LocationProviderMarker,
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1785
|
+
vi as PopOver,
|
|
1786
|
+
hi as ProvideAppearance,
|
|
1787
|
+
ui as ProvideLocation,
|
|
1788
|
+
oi as ResultView,
|
|
1789
|
+
Ai as Router,
|
|
1790
|
+
xi as SelectOnFocus,
|
|
1791
|
+
di as UseAppearance,
|
|
1776
1792
|
we as UseLocation,
|
|
1777
|
-
|
|
1793
|
+
yi as WhenInViewport,
|
|
1778
1794
|
ye as appearanceMarker,
|
|
1779
1795
|
mn as equalsLocation,
|
|
1796
|
+
yn as getFullURL,
|
|
1780
1797
|
gn as locationFromURL,
|
|
1781
1798
|
pn as makeLocation,
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1799
|
+
vn as makeLocationProp,
|
|
1800
|
+
ai as makeRouteMatcher,
|
|
1801
|
+
ci as matchesRoute,
|
|
1802
|
+
li as parseRouteSegments,
|
|
1786
1803
|
wn as setLocationFromUrl,
|
|
1787
|
-
|
|
1804
|
+
bi as size
|
|
1788
1805
|
};
|