@tempots/ui 4.1.2 → 4.2.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.cjs +1 -1
- package/index.js +276 -265
- package/package.json +1 -1
- package/renderables/pop-over.d.ts +4 -4
package/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var ge = Object.defineProperty;
|
|
2
2
|
var ye = (t, e, n) => e in t ? ge(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
-
var
|
|
4
|
-
import { getWindow as J, prop as W, makeProviderMark as _t, Signal as It, Use as jt, html as Yt, on as qt, Value as
|
|
5
|
-
import { delayed as Zt, AsyncResult as
|
|
6
|
-
const
|
|
3
|
+
var pt = (t, e, n) => ye(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { getWindow as J, prop as W, makeProviderMark as _t, Signal as It, Use as jt, html as Yt, on as qt, Value as L, attr as Kt, Empty as yt, OneOfType as Xt, WithElement as G, OnDispose as F, Portal as Jt, Fragment as At, renderableOfTNode as Rt, When as Gt, WithBrowserCtx as Qt, effectOf as we, OneOfTuple as xe, computedOf as ve, Prop as be } from "@tempots/dom";
|
|
5
|
+
import { delayed as Zt, AsyncResult as D, nearEqual as tt, interval as Ae } from "@tempots/std";
|
|
6
|
+
const Re = (t) => {
|
|
7
7
|
const e = t.split("/").pop();
|
|
8
8
|
if (e == null || e.startsWith(".")) return;
|
|
9
9
|
const n = e.split(".") || [];
|
|
10
10
|
return n.length > 1 ? "." + n.pop() : void 0;
|
|
11
|
-
},
|
|
12
|
-
const n =
|
|
11
|
+
}, Ee = (t, e) => {
|
|
12
|
+
const n = Re(e);
|
|
13
13
|
return n != null && (t.length === 0 || !t.some((o) => n == o));
|
|
14
|
-
},
|
|
14
|
+
}, Le = (t, e, n, o) => {
|
|
15
15
|
let s = t.target;
|
|
16
16
|
for (; s != null && !(s instanceof HTMLAnchorElement); )
|
|
17
17
|
s = s.parentElement;
|
|
@@ -26,8 +26,8 @@ const Ae = (t) => {
|
|
|
26
26
|
if (!(f != null && f.startsWith("#")) && f !== a)
|
|
27
27
|
return !0;
|
|
28
28
|
}
|
|
29
|
-
return e ? !1 :
|
|
30
|
-
},
|
|
29
|
+
return e ? !1 : Ee(n, r);
|
|
30
|
+
}, Oe = (t, e = {
|
|
31
31
|
ignoreUrlWithExtension: !0,
|
|
32
32
|
allowedExtensions: [],
|
|
33
33
|
ignoreExternalUrl: !0
|
|
@@ -36,14 +36,14 @@ const Ae = (t) => {
|
|
|
36
36
|
(o) => o.startsWith(".") ? o : "." + o
|
|
37
37
|
) : [];
|
|
38
38
|
return (o) => {
|
|
39
|
-
|
|
39
|
+
Le(
|
|
40
40
|
o,
|
|
41
41
|
e.ignoreUrlWithExtension ?? !0,
|
|
42
42
|
n,
|
|
43
43
|
e.ignoreExternalUrl ?? !0
|
|
44
44
|
) || t() && o.preventDefault();
|
|
45
45
|
};
|
|
46
|
-
},
|
|
46
|
+
}, Se = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, te = (t, e) => {
|
|
47
47
|
var i;
|
|
48
48
|
const n = new URL(t, e ?? ((i = J()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
|
|
49
49
|
let s = n.hash;
|
|
@@ -58,7 +58,7 @@ const Ae = (t) => {
|
|
|
58
58
|
}, wt = (t) => {
|
|
59
59
|
const n = new URLSearchParams(t.search).toString(), o = t.hash;
|
|
60
60
|
return `${t.pathname}${n ? `?${n}` : ""}${o ? `#${o}` : ""}`;
|
|
61
|
-
}, Te = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"),
|
|
61
|
+
}, Te = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), ke = (t) => {
|
|
62
62
|
const e = t.container.currentURL, n = e.iso(
|
|
63
63
|
(o) => te(o),
|
|
64
64
|
(o) => {
|
|
@@ -69,7 +69,7 @@ const Ae = (t) => {
|
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
return { value: n, dispose: n.dispose };
|
|
72
|
-
},
|
|
72
|
+
}, Ce = () => {
|
|
73
73
|
const t = J(), e = (t == null ? void 0 : t.location.hash) === "" ? void 0 : (t == null ? void 0 : t.location.hash.substring(1)) ?? void 0;
|
|
74
74
|
return {
|
|
75
75
|
pathname: (t == null ? void 0 : t.location.pathname) ?? "",
|
|
@@ -78,8 +78,8 @@ const Ae = (t) => {
|
|
|
78
78
|
),
|
|
79
79
|
hash: e
|
|
80
80
|
};
|
|
81
|
-
},
|
|
82
|
-
const t = W(
|
|
81
|
+
}, De = () => {
|
|
82
|
+
const t = W(Ce(), Se), e = J(), n = () => {
|
|
83
83
|
let o = (e == null ? void 0 : e.location.hash) ?? "";
|
|
84
84
|
o.startsWith("#") && (o = o.substring(1));
|
|
85
85
|
const s = {
|
|
@@ -103,16 +103,16 @@ const Ae = (t) => {
|
|
|
103
103
|
mark: _t("LocationProvider"),
|
|
104
104
|
create: (t, e) => {
|
|
105
105
|
if (e.isBrowser())
|
|
106
|
-
return
|
|
106
|
+
return De();
|
|
107
107
|
if (e.isHeadless())
|
|
108
|
-
return
|
|
108
|
+
return ke(e);
|
|
109
109
|
throw new Error("Unknown context");
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, Pe = (t) => {
|
|
112
112
|
document.startViewTransition ? document.startViewTransition(t) : t();
|
|
113
|
-
},
|
|
113
|
+
}, We = (t, ...e) => {
|
|
114
114
|
if (typeof t == "string" || It.is(t))
|
|
115
|
-
return
|
|
115
|
+
return We({ href: t }, ...e);
|
|
116
116
|
const {
|
|
117
117
|
href: n,
|
|
118
118
|
withViewTransition: o,
|
|
@@ -120,24 +120,24 @@ const Ae = (t) => {
|
|
|
120
120
|
} = t;
|
|
121
121
|
return jt(ee, (i) => Yt.a(
|
|
122
122
|
qt.click(
|
|
123
|
-
|
|
124
|
-
Pt(i,
|
|
125
|
-
}) : Pt(i,
|
|
123
|
+
Oe(() => (o == !0 ? Pe(() => {
|
|
124
|
+
Pt(i, L.get(n));
|
|
125
|
+
}) : Pt(i, L.get(n)), !0), s)
|
|
126
126
|
),
|
|
127
127
|
Kt.href(n),
|
|
128
128
|
...e
|
|
129
129
|
));
|
|
130
|
-
},
|
|
130
|
+
}, Vn = {
|
|
131
131
|
mark: _t("Appearance"),
|
|
132
132
|
create: () => {
|
|
133
|
-
const t =
|
|
133
|
+
const t = Fe();
|
|
134
134
|
return {
|
|
135
135
|
value: t,
|
|
136
136
|
dispose: t.dispose
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
|
-
function
|
|
140
|
+
function Fe() {
|
|
141
141
|
const t = J(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, n = (e == null ? void 0 : e.matches) ?? !1, o = W(n ? "dark" : "light"), s = (i) => o.set(i.matches ? "dark" : "light");
|
|
142
142
|
return e == null || e.addEventListener("change", s), o.onDispose(() => e == null ? void 0 : e.removeEventListener("change", s)), o;
|
|
143
143
|
}
|
|
@@ -145,21 +145,21 @@ const ne = (t, e) => {
|
|
|
145
145
|
if (typeof e == "function")
|
|
146
146
|
return ne(t, { success: e });
|
|
147
147
|
const n = e.failure ?? ((r) => r.map((c) => `Error: ${c}`)), o = e.success, s = e.loading ?? (() => yt), i = e.notAsked ?? (() => yt);
|
|
148
|
-
return Xt(
|
|
148
|
+
return Xt(L.toSignal(t), {
|
|
149
149
|
AsyncSuccess: (r) => o(r.$.value),
|
|
150
150
|
AsyncFailure: (r) => n(r.$.error),
|
|
151
151
|
Loading: (r) => s(r.map((c) => c.previousValue)),
|
|
152
152
|
NotAsked: i
|
|
153
153
|
});
|
|
154
|
-
},
|
|
154
|
+
}, Nn = (t = 10) => G((e) => F(Zt(() => e == null ? void 0 : e.focus(), t))), $n = (t = 10) => G((e) => {
|
|
155
155
|
const n = Zt(() => e.select(), t);
|
|
156
156
|
return F(n);
|
|
157
|
-
}),
|
|
157
|
+
}), Bn = G((t) => {
|
|
158
158
|
const e = t.style.getPropertyValue(":empty");
|
|
159
159
|
return t.style.setProperty(":empty", "display:none"), F((n) => {
|
|
160
160
|
n && t.style.setProperty(":empty", e);
|
|
161
161
|
});
|
|
162
|
-
}),
|
|
162
|
+
}), Un = (t) => Jt("head > title", Kt.innerText(t)), Me = {
|
|
163
163
|
partial: {
|
|
164
164
|
root: null,
|
|
165
165
|
rootMargin: "0px",
|
|
@@ -177,19 +177,19 @@ const ne = (t, e) => {
|
|
|
177
177
|
partial: null,
|
|
178
178
|
full: null
|
|
179
179
|
};
|
|
180
|
-
function
|
|
180
|
+
function Ve(t) {
|
|
181
181
|
return q[t] == null && (q[t] = new IntersectionObserver((e) => {
|
|
182
182
|
e.forEach((n) => {
|
|
183
183
|
const o = nt[t].get(n.target);
|
|
184
184
|
o == null || o.set(n.isIntersecting);
|
|
185
185
|
});
|
|
186
|
-
},
|
|
186
|
+
}, Me[t])), q[t];
|
|
187
187
|
}
|
|
188
|
-
const
|
|
188
|
+
const Ne = ({ mode: t = "partial", once: e = !1 }, n) => {
|
|
189
189
|
const o = W(!1);
|
|
190
190
|
return At(
|
|
191
191
|
G((s) => {
|
|
192
|
-
const i = typeof IntersectionObserver < "u" ?
|
|
192
|
+
const i = typeof IntersectionObserver < "u" ? Ve(t) : null;
|
|
193
193
|
nt[t].set(s, o), i == null || i.observe(s);
|
|
194
194
|
function r() {
|
|
195
195
|
var l;
|
|
@@ -204,15 +204,15 @@ const Ve = ({ mode: t = "partial", once: e = !1 }, n) => {
|
|
|
204
204
|
}),
|
|
205
205
|
Rt(n(o))
|
|
206
206
|
);
|
|
207
|
-
},
|
|
207
|
+
}, Hn = (t, e, n) => Ne(t, (o) => Gt(o, e, n ?? (() => yt))), ot = Math.min, V = Math.max, st = Math.round, et = Math.floor, O = (t) => ({
|
|
208
208
|
x: t,
|
|
209
209
|
y: t
|
|
210
|
-
}),
|
|
210
|
+
}), $e = {
|
|
211
211
|
left: "right",
|
|
212
212
|
right: "left",
|
|
213
213
|
bottom: "top",
|
|
214
214
|
top: "bottom"
|
|
215
|
-
},
|
|
215
|
+
}, Be = {
|
|
216
216
|
start: "end",
|
|
217
217
|
end: "start"
|
|
218
218
|
};
|
|
@@ -240,20 +240,20 @@ function z(t) {
|
|
|
240
240
|
function ie(t) {
|
|
241
241
|
return oe(z(t));
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Ue(t, e, n) {
|
|
244
244
|
n === void 0 && (n = !1);
|
|
245
245
|
const o = at(t), s = ie(t), i = se(s);
|
|
246
246
|
let r = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
247
247
|
return e.reference[i] > e.floating[i] && (r = it(r)), [r, it(r)];
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function He(t) {
|
|
250
250
|
const e = it(t);
|
|
251
251
|
return [xt(t), e, xt(e)];
|
|
252
252
|
}
|
|
253
253
|
function xt(t) {
|
|
254
|
-
return t.replace(/start|end/g, (e) =>
|
|
254
|
+
return t.replace(/start|end/g, (e) => Be[e]);
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function ze(t, e, n) {
|
|
257
257
|
const o = ["left", "right"], s = ["right", "left"], i = ["top", "bottom"], r = ["bottom", "top"];
|
|
258
258
|
switch (t) {
|
|
259
259
|
case "top":
|
|
@@ -266,15 +266,15 @@ function He(t, e, n) {
|
|
|
266
266
|
return [];
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function _e(t, e, n, o) {
|
|
270
270
|
const s = at(t);
|
|
271
|
-
let i =
|
|
271
|
+
let i = ze(N(t), n === "start", o);
|
|
272
272
|
return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(xt)))), i;
|
|
273
273
|
}
|
|
274
274
|
function it(t) {
|
|
275
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
275
|
+
return t.replace(/left|right|bottom|top/g, (e) => $e[e]);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function Ie(t) {
|
|
278
278
|
return {
|
|
279
279
|
top: 0,
|
|
280
280
|
right: 0,
|
|
@@ -283,8 +283,8 @@ function _e(t) {
|
|
|
283
283
|
...t
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
return typeof t != "number" ?
|
|
286
|
+
function je(t) {
|
|
287
|
+
return typeof t != "number" ? Ie(t) : {
|
|
288
288
|
top: t,
|
|
289
289
|
right: t,
|
|
290
290
|
bottom: t,
|
|
@@ -357,7 +357,7 @@ function Ft(t, e, n) {
|
|
|
357
357
|
}
|
|
358
358
|
return h;
|
|
359
359
|
}
|
|
360
|
-
const
|
|
360
|
+
const Ye = async (t, e, n) => {
|
|
361
361
|
const {
|
|
362
362
|
placement: o = "bottom",
|
|
363
363
|
strategy: s = "absolute",
|
|
@@ -371,17 +371,17 @@ const je = async (t, e, n) => {
|
|
|
371
371
|
}), {
|
|
372
372
|
x: f,
|
|
373
373
|
y: u
|
|
374
|
-
} = Ft(a, o, l), d = o, h = {},
|
|
375
|
-
for (let
|
|
374
|
+
} = Ft(a, o, l), d = o, h = {}, m = 0;
|
|
375
|
+
for (let p = 0; p < c.length; p++) {
|
|
376
376
|
const {
|
|
377
377
|
name: y,
|
|
378
|
-
fn:
|
|
379
|
-
} = c[
|
|
378
|
+
fn: g
|
|
379
|
+
} = c[p], {
|
|
380
380
|
x: w,
|
|
381
381
|
y: x,
|
|
382
382
|
data: b,
|
|
383
383
|
reset: v
|
|
384
|
-
} = await
|
|
384
|
+
} = await g({
|
|
385
385
|
x: f,
|
|
386
386
|
y: u,
|
|
387
387
|
initialPlacement: o,
|
|
@@ -401,14 +401,14 @@ const je = async (t, e, n) => {
|
|
|
401
401
|
...h[y],
|
|
402
402
|
...b
|
|
403
403
|
}
|
|
404
|
-
}, v &&
|
|
404
|
+
}, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (d = v.placement), v.rects && (a = v.rects === !0 ? await r.getElementRects({
|
|
405
405
|
reference: t,
|
|
406
406
|
floating: e,
|
|
407
407
|
strategy: s
|
|
408
408
|
}) : v.rects), {
|
|
409
409
|
x: f,
|
|
410
410
|
y: u
|
|
411
|
-
} = Ft(a, d, l)),
|
|
411
|
+
} = Ft(a, d, l)), p = -1);
|
|
412
412
|
}
|
|
413
413
|
return {
|
|
414
414
|
x: f,
|
|
@@ -434,7 +434,7 @@ async function re(t, e) {
|
|
|
434
434
|
elementContext: u = "floating",
|
|
435
435
|
altBoundary: d = !1,
|
|
436
436
|
padding: h = 0
|
|
437
|
-
} = lt(e, t),
|
|
437
|
+
} = lt(e, t), m = je(h), y = c[d ? u === "floating" ? "reference" : "floating" : u], g = rt(await i.getClippingRect({
|
|
438
438
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
439
439
|
boundary: a,
|
|
440
440
|
rootBoundary: f,
|
|
@@ -457,13 +457,13 @@ async function re(t, e) {
|
|
|
457
457
|
strategy: l
|
|
458
458
|
}) : w);
|
|
459
459
|
return {
|
|
460
|
-
top: (
|
|
461
|
-
bottom: (v.bottom -
|
|
462
|
-
left: (
|
|
463
|
-
right: (v.right -
|
|
460
|
+
top: (g.top - v.top + m.top) / b.y,
|
|
461
|
+
bottom: (v.bottom - g.bottom + m.bottom) / b.y,
|
|
462
|
+
left: (g.left - v.left + m.left) / b.x,
|
|
463
|
+
right: (v.right - g.right + m.right) / b.x
|
|
464
464
|
};
|
|
465
465
|
}
|
|
466
|
-
const
|
|
466
|
+
const qe = function(t) {
|
|
467
467
|
return t === void 0 && (t = {}), {
|
|
468
468
|
name: "flip",
|
|
469
469
|
options: t,
|
|
@@ -481,26 +481,26 @@ const Ye = function(t) {
|
|
|
481
481
|
crossAxis: u = !0,
|
|
482
482
|
fallbackPlacements: d,
|
|
483
483
|
fallbackStrategy: h = "bestFit",
|
|
484
|
-
fallbackAxisSideDirection:
|
|
485
|
-
flipAlignment:
|
|
484
|
+
fallbackAxisSideDirection: m = "none",
|
|
485
|
+
flipAlignment: p = !0,
|
|
486
486
|
...y
|
|
487
487
|
} = lt(t, e);
|
|
488
488
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
489
489
|
return {};
|
|
490
|
-
const
|
|
491
|
-
!d && B && v.push(...
|
|
492
|
-
const
|
|
490
|
+
const g = N(s), w = z(c), x = N(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = d || (x || !p ? [it(c)] : He(c)), B = m !== "none";
|
|
491
|
+
!d && B && v.push(..._e(c, p, m, b));
|
|
492
|
+
const me = [c, ...v], mt = await re(e, y), Z = [];
|
|
493
493
|
let j = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
494
|
-
if (f && Z.push(
|
|
495
|
-
const M =
|
|
496
|
-
Z.push(
|
|
494
|
+
if (f && Z.push(mt[g]), u) {
|
|
495
|
+
const M = Ue(s, r, b);
|
|
496
|
+
Z.push(mt[M[0]], mt[M[1]]);
|
|
497
497
|
}
|
|
498
498
|
if (j = [...j, {
|
|
499
499
|
placement: s,
|
|
500
500
|
overflows: Z
|
|
501
501
|
}], !Z.every((M) => M <= 0)) {
|
|
502
|
-
var
|
|
503
|
-
const M = (((
|
|
502
|
+
var Tt, kt;
|
|
503
|
+
const M = (((Tt = i.flip) == null ? void 0 : Tt.index) || 0) + 1, Dt = me[M];
|
|
504
504
|
if (Dt)
|
|
505
505
|
return {
|
|
506
506
|
data: {
|
|
@@ -511,20 +511,20 @@ const Ye = function(t) {
|
|
|
511
511
|
placement: Dt
|
|
512
512
|
}
|
|
513
513
|
};
|
|
514
|
-
let Y = (kt = j.filter((U) => U.overflows[0] <= 0).sort((U,
|
|
514
|
+
let Y = (kt = j.filter((U) => U.overflows[0] <= 0).sort((U, k) => U.overflows[1] - k.overflows[1])[0]) == null ? void 0 : kt.placement;
|
|
515
515
|
if (!Y)
|
|
516
516
|
switch (h) {
|
|
517
517
|
case "bestFit": {
|
|
518
518
|
var Ct;
|
|
519
|
-
const U = (Ct = j.filter((
|
|
519
|
+
const U = (Ct = j.filter((k) => {
|
|
520
520
|
if (B) {
|
|
521
|
-
const
|
|
522
|
-
return
|
|
521
|
+
const C = z(k.placement);
|
|
522
|
+
return C === w || // Create a bias to the `y` side axis due to horizontal
|
|
523
523
|
// reading directions favoring greater width.
|
|
524
|
-
|
|
524
|
+
C === "y";
|
|
525
525
|
}
|
|
526
526
|
return !0;
|
|
527
|
-
}).map((
|
|
527
|
+
}).map((k) => [k.placement, k.overflows.filter((C) => C > 0).reduce((C, pe) => C + pe, 0)]).sort((k, C) => k[1] - C[1])[0]) == null ? void 0 : Ct[0];
|
|
528
528
|
U && (Y = U);
|
|
529
529
|
break;
|
|
530
530
|
}
|
|
@@ -543,7 +543,7 @@ const Ye = function(t) {
|
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
545
|
};
|
|
546
|
-
async function
|
|
546
|
+
async function Ke(t, e) {
|
|
547
547
|
const {
|
|
548
548
|
placement: n,
|
|
549
549
|
platform: o,
|
|
@@ -552,7 +552,7 @@ async function qe(t, e) {
|
|
|
552
552
|
let {
|
|
553
553
|
mainAxis: d,
|
|
554
554
|
crossAxis: h,
|
|
555
|
-
alignmentAxis:
|
|
555
|
+
alignmentAxis: m
|
|
556
556
|
} = typeof u == "number" ? {
|
|
557
557
|
mainAxis: u,
|
|
558
558
|
crossAxis: 0,
|
|
@@ -562,7 +562,7 @@ async function qe(t, e) {
|
|
|
562
562
|
crossAxis: u.crossAxis || 0,
|
|
563
563
|
alignmentAxis: u.alignmentAxis
|
|
564
564
|
};
|
|
565
|
-
return c && typeof
|
|
565
|
+
return c && typeof m == "number" && (h = c === "end" ? m * -1 : m), l ? {
|
|
566
566
|
x: h * f,
|
|
567
567
|
y: d * a
|
|
568
568
|
} : {
|
|
@@ -570,7 +570,7 @@ async function qe(t, e) {
|
|
|
570
570
|
y: h * f
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
|
-
const
|
|
573
|
+
const Xe = function(t) {
|
|
574
574
|
return t === void 0 && (t = 0), {
|
|
575
575
|
name: "offset",
|
|
576
576
|
options: t,
|
|
@@ -581,7 +581,7 @@ const Ke = function(t) {
|
|
|
581
581
|
y: i,
|
|
582
582
|
placement: r,
|
|
583
583
|
middlewareData: c
|
|
584
|
-
} = e, l = await
|
|
584
|
+
} = e, l = await Ke(e, t);
|
|
585
585
|
return r === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
586
586
|
x: s + l.x,
|
|
587
587
|
y: i + l.y,
|
|
@@ -592,7 +592,7 @@ const Ke = function(t) {
|
|
|
592
592
|
};
|
|
593
593
|
}
|
|
594
594
|
};
|
|
595
|
-
},
|
|
595
|
+
}, Je = function(t) {
|
|
596
596
|
return t === void 0 && (t = {}), {
|
|
597
597
|
name: "shift",
|
|
598
598
|
options: t,
|
|
@@ -607,11 +607,11 @@ const Ke = function(t) {
|
|
|
607
607
|
limiter: c = {
|
|
608
608
|
fn: (y) => {
|
|
609
609
|
let {
|
|
610
|
-
x:
|
|
610
|
+
x: g,
|
|
611
611
|
y: w
|
|
612
612
|
} = y;
|
|
613
613
|
return {
|
|
614
|
-
x:
|
|
614
|
+
x: g,
|
|
615
615
|
y: w
|
|
616
616
|
};
|
|
617
617
|
}
|
|
@@ -621,25 +621,25 @@ const Ke = function(t) {
|
|
|
621
621
|
x: n,
|
|
622
622
|
y: o
|
|
623
623
|
}, f = await re(e, l), u = z(N(s)), d = oe(u);
|
|
624
|
-
let h = a[d],
|
|
624
|
+
let h = a[d], m = a[u];
|
|
625
625
|
if (i) {
|
|
626
|
-
const y = d === "y" ? "top" : "left",
|
|
626
|
+
const y = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", w = h + f[y], x = h - f[g];
|
|
627
627
|
h = Wt(w, h, x);
|
|
628
628
|
}
|
|
629
629
|
if (r) {
|
|
630
|
-
const y = u === "y" ? "top" : "left",
|
|
631
|
-
|
|
630
|
+
const y = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", w = m + f[y], x = m - f[g];
|
|
631
|
+
m = Wt(w, m, x);
|
|
632
632
|
}
|
|
633
|
-
const
|
|
633
|
+
const p = c.fn({
|
|
634
634
|
...e,
|
|
635
635
|
[d]: h,
|
|
636
|
-
[u]:
|
|
636
|
+
[u]: m
|
|
637
637
|
});
|
|
638
638
|
return {
|
|
639
|
-
...
|
|
639
|
+
...p,
|
|
640
640
|
data: {
|
|
641
|
-
x:
|
|
642
|
-
y:
|
|
641
|
+
x: p.x - n,
|
|
642
|
+
y: p.y - o,
|
|
643
643
|
enabled: {
|
|
644
644
|
[d]: i,
|
|
645
645
|
[u]: r
|
|
@@ -669,7 +669,7 @@ function ce(t) {
|
|
|
669
669
|
function R(t) {
|
|
670
670
|
return ut() ? t instanceof Element || t instanceof A(t).Element : !1;
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function S(t) {
|
|
673
673
|
return ut() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
|
|
674
674
|
}
|
|
675
675
|
function Mt(t) {
|
|
@@ -684,7 +684,7 @@ function Q(t) {
|
|
|
684
684
|
} = E(t);
|
|
685
685
|
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(s);
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function Ge(t) {
|
|
688
688
|
return ["table", "td", "th"].includes(I(t));
|
|
689
689
|
}
|
|
690
690
|
function ft(t) {
|
|
@@ -700,9 +700,9 @@ function Et(t) {
|
|
|
700
700
|
const e = Lt(), n = R(t) ? E(t) : t;
|
|
701
701
|
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((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Qe(t) {
|
|
704
704
|
let e = P(t);
|
|
705
|
-
for (;
|
|
705
|
+
for (; S(e) && !_(e); ) {
|
|
706
706
|
if (Et(e))
|
|
707
707
|
return e;
|
|
708
708
|
if (ft(e))
|
|
@@ -743,7 +743,7 @@ function P(t) {
|
|
|
743
743
|
}
|
|
744
744
|
function le(t) {
|
|
745
745
|
const e = P(t);
|
|
746
|
-
return _(e) ? t.ownerDocument ? t.ownerDocument.body : t.body :
|
|
746
|
+
return _(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : S(e) && Q(e) ? e : le(e);
|
|
747
747
|
}
|
|
748
748
|
function K(t, e, n) {
|
|
749
749
|
var o;
|
|
@@ -761,7 +761,7 @@ function vt(t) {
|
|
|
761
761
|
function ae(t) {
|
|
762
762
|
const e = E(t);
|
|
763
763
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
764
|
-
const s =
|
|
764
|
+
const s = S(t), i = s ? t.offsetWidth : n, r = s ? t.offsetHeight : o, c = st(n) !== i || st(o) !== r;
|
|
765
765
|
return c && (n = i, o = r), {
|
|
766
766
|
width: n,
|
|
767
767
|
height: o,
|
|
@@ -773,8 +773,8 @@ function Ot(t) {
|
|
|
773
773
|
}
|
|
774
774
|
function H(t) {
|
|
775
775
|
const e = Ot(t);
|
|
776
|
-
if (!
|
|
777
|
-
return
|
|
776
|
+
if (!S(e))
|
|
777
|
+
return O(1);
|
|
778
778
|
const n = e.getBoundingClientRect(), {
|
|
779
779
|
width: o,
|
|
780
780
|
height: s,
|
|
@@ -786,30 +786,30 @@ function H(t) {
|
|
|
786
786
|
y: c
|
|
787
787
|
};
|
|
788
788
|
}
|
|
789
|
-
const
|
|
789
|
+
const Ze = /* @__PURE__ */ O(0);
|
|
790
790
|
function ue(t) {
|
|
791
791
|
const e = A(t);
|
|
792
|
-
return !Lt() || !e.visualViewport ?
|
|
792
|
+
return !Lt() || !e.visualViewport ? Ze : {
|
|
793
793
|
x: e.visualViewport.offsetLeft,
|
|
794
794
|
y: e.visualViewport.offsetTop
|
|
795
795
|
};
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function tn(t, e, n) {
|
|
798
798
|
return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
|
|
799
799
|
}
|
|
800
800
|
function $(t, e, n, o) {
|
|
801
801
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
802
802
|
const s = t.getBoundingClientRect(), i = Ot(t);
|
|
803
|
-
let r =
|
|
803
|
+
let r = O(1);
|
|
804
804
|
e && (o ? R(o) && (r = H(o)) : r = H(t));
|
|
805
|
-
const c =
|
|
805
|
+
const c = tn(i, n, o) ? ue(i) : O(0);
|
|
806
806
|
let l = (s.left + c.x) / r.x, a = (s.top + c.y) / r.y, f = s.width / r.x, u = s.height / r.y;
|
|
807
807
|
if (i) {
|
|
808
808
|
const d = A(i), h = o && R(o) ? A(o) : o;
|
|
809
|
-
let
|
|
810
|
-
for (;
|
|
811
|
-
const y = H(
|
|
812
|
-
l *= y.x, a *= y.y, f *= y.x, u *= y.y, l += x, a += b,
|
|
809
|
+
let m = d, p = vt(m);
|
|
810
|
+
for (; p && o && h !== m; ) {
|
|
811
|
+
const y = H(p), g = p.getBoundingClientRect(), w = E(p), x = g.left + (p.clientLeft + parseFloat(w.paddingLeft)) * y.x, b = g.top + (p.clientTop + parseFloat(w.paddingTop)) * y.y;
|
|
812
|
+
l *= y.x, a *= y.y, f *= y.x, u *= y.y, l += x, a += b, m = A(p), p = vt(m);
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
815
|
return rt({
|
|
@@ -819,7 +819,7 @@ function $(t, e, n, o) {
|
|
|
819
819
|
y: a
|
|
820
820
|
});
|
|
821
821
|
}
|
|
822
|
-
function
|
|
822
|
+
function St(t, e) {
|
|
823
823
|
const n = ht(t).scrollLeft;
|
|
824
824
|
return e ? e.left + n : $(T(t)).left + n;
|
|
825
825
|
}
|
|
@@ -827,14 +827,14 @@ function fe(t, e, n) {
|
|
|
827
827
|
n === void 0 && (n = !1);
|
|
828
828
|
const o = t.getBoundingClientRect(), s = o.left + e.scrollLeft - (n ? 0 : (
|
|
829
829
|
// RTL <body> scrollbar.
|
|
830
|
-
|
|
830
|
+
St(t, o)
|
|
831
831
|
)), i = o.top + e.scrollTop;
|
|
832
832
|
return {
|
|
833
833
|
x: s,
|
|
834
834
|
y: i
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function en(t) {
|
|
838
838
|
let {
|
|
839
839
|
elements: e,
|
|
840
840
|
rect: n,
|
|
@@ -847,13 +847,13 @@ function tn(t) {
|
|
|
847
847
|
let l = {
|
|
848
848
|
scrollLeft: 0,
|
|
849
849
|
scrollTop: 0
|
|
850
|
-
}, a =
|
|
851
|
-
const f =
|
|
852
|
-
if ((u || !u && !i) && ((I(o) !== "body" || Q(r)) && (l = ht(o)),
|
|
850
|
+
}, a = O(1);
|
|
851
|
+
const f = O(0), u = S(o);
|
|
852
|
+
if ((u || !u && !i) && ((I(o) !== "body" || Q(r)) && (l = ht(o)), S(o))) {
|
|
853
853
|
const h = $(o);
|
|
854
854
|
a = H(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
|
|
855
855
|
}
|
|
856
|
-
const d = r && !u && !i ? fe(r, l, !0) :
|
|
856
|
+
const d = r && !u && !i ? fe(r, l, !0) : O(0);
|
|
857
857
|
return {
|
|
858
858
|
width: n.width * a.x,
|
|
859
859
|
height: n.height * a.y,
|
|
@@ -861,12 +861,12 @@ function tn(t) {
|
|
|
861
861
|
y: n.y * a.y - l.scrollTop * a.y + f.y + d.y
|
|
862
862
|
};
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function nn(t) {
|
|
865
865
|
return Array.from(t.getClientRects());
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function on(t) {
|
|
868
868
|
const e = T(t), n = ht(t), o = t.ownerDocument.body, s = V(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = V(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
869
|
-
let r = -n.scrollLeft +
|
|
869
|
+
let r = -n.scrollLeft + St(t);
|
|
870
870
|
const c = -n.scrollTop;
|
|
871
871
|
return E(o).direction === "rtl" && (r += V(e.clientWidth, o.clientWidth) - s), {
|
|
872
872
|
width: s,
|
|
@@ -875,7 +875,7 @@ function nn(t) {
|
|
|
875
875
|
y: c
|
|
876
876
|
};
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function sn(t, e) {
|
|
879
879
|
const n = A(t), o = T(t), s = n.visualViewport;
|
|
880
880
|
let i = o.clientWidth, r = o.clientHeight, c = 0, l = 0;
|
|
881
881
|
if (s) {
|
|
@@ -890,8 +890,8 @@ function on(t, e) {
|
|
|
890
890
|
y: l
|
|
891
891
|
};
|
|
892
892
|
}
|
|
893
|
-
function
|
|
894
|
-
const n = $(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, i =
|
|
893
|
+
function rn(t, e) {
|
|
894
|
+
const n = $(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, i = S(t) ? H(t) : O(1), r = t.clientWidth * i.x, c = t.clientHeight * i.y, l = s * i.x, a = o * i.y;
|
|
895
895
|
return {
|
|
896
896
|
width: r,
|
|
897
897
|
height: c,
|
|
@@ -902,11 +902,11 @@ function sn(t, e) {
|
|
|
902
902
|
function Vt(t, e, n) {
|
|
903
903
|
let o;
|
|
904
904
|
if (e === "viewport")
|
|
905
|
-
o =
|
|
905
|
+
o = sn(t, n);
|
|
906
906
|
else if (e === "document")
|
|
907
|
-
o =
|
|
907
|
+
o = on(T(t));
|
|
908
908
|
else if (R(e))
|
|
909
|
-
o =
|
|
909
|
+
o = rn(e, n);
|
|
910
910
|
else {
|
|
911
911
|
const s = ue(t);
|
|
912
912
|
o = {
|
|
@@ -922,7 +922,7 @@ function he(t, e) {
|
|
|
922
922
|
const n = P(t);
|
|
923
923
|
return n === e || !R(n) || _(n) ? !1 : E(n).position === "fixed" || he(n, e);
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function cn(t, e) {
|
|
926
926
|
const n = e.get(t);
|
|
927
927
|
if (n)
|
|
928
928
|
return n;
|
|
@@ -935,14 +935,14 @@ function rn(t, e) {
|
|
|
935
935
|
}
|
|
936
936
|
return e.set(t, o), o;
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function ln(t) {
|
|
939
939
|
let {
|
|
940
940
|
element: e,
|
|
941
941
|
boundary: n,
|
|
942
942
|
rootBoundary: o,
|
|
943
943
|
strategy: s
|
|
944
944
|
} = t;
|
|
945
|
-
const r = [...n === "clippingAncestors" ? ft(e) ? [] :
|
|
945
|
+
const r = [...n === "clippingAncestors" ? ft(e) ? [] : cn(e, this._c) : [].concat(n), o], c = r[0], l = r.reduce((a, f) => {
|
|
946
946
|
const u = Vt(e, f, s);
|
|
947
947
|
return a.top = V(u.top, a.top), a.right = ot(u.right, a.right), a.bottom = ot(u.bottom, a.bottom), a.left = V(u.left, a.left), a;
|
|
948
948
|
}, Vt(e, c, s));
|
|
@@ -953,7 +953,7 @@ function cn(t) {
|
|
|
953
953
|
y: l.top
|
|
954
954
|
};
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function an(t) {
|
|
957
957
|
const {
|
|
958
958
|
width: e,
|
|
959
959
|
height: n
|
|
@@ -963,19 +963,19 @@ function ln(t) {
|
|
|
963
963
|
height: n
|
|
964
964
|
};
|
|
965
965
|
}
|
|
966
|
-
function
|
|
967
|
-
const o =
|
|
966
|
+
function un(t, e, n) {
|
|
967
|
+
const o = S(e), s = T(e), i = n === "fixed", r = $(t, !0, i, e);
|
|
968
968
|
let c = {
|
|
969
969
|
scrollLeft: 0,
|
|
970
970
|
scrollTop: 0
|
|
971
971
|
};
|
|
972
|
-
const l =
|
|
972
|
+
const l = O(0);
|
|
973
973
|
if (o || !o && !i)
|
|
974
974
|
if ((I(e) !== "body" || Q(s)) && (c = ht(e)), o) {
|
|
975
975
|
const d = $(e, !0, i, e);
|
|
976
976
|
l.x = d.x + e.clientLeft, l.y = d.y + e.clientTop;
|
|
977
|
-
} else s && (l.x =
|
|
978
|
-
const a = s && !o && !i ? fe(s, c) :
|
|
977
|
+
} else s && (l.x = St(s));
|
|
978
|
+
const a = s && !o && !i ? fe(s, c) : O(0), f = r.left + c.scrollLeft - l.x - a.x, u = r.top + c.scrollTop - l.y - a.y;
|
|
979
979
|
return {
|
|
980
980
|
x: f,
|
|
981
981
|
y: u,
|
|
@@ -987,7 +987,7 @@ function gt(t) {
|
|
|
987
987
|
return E(t).position === "static";
|
|
988
988
|
}
|
|
989
989
|
function Nt(t, e) {
|
|
990
|
-
if (!
|
|
990
|
+
if (!S(t) || E(t).position === "fixed")
|
|
991
991
|
return null;
|
|
992
992
|
if (e)
|
|
993
993
|
return e(t);
|
|
@@ -998,7 +998,7 @@ function de(t, e) {
|
|
|
998
998
|
const n = A(t);
|
|
999
999
|
if (ft(t))
|
|
1000
1000
|
return n;
|
|
1001
|
-
if (!
|
|
1001
|
+
if (!S(t)) {
|
|
1002
1002
|
let s = P(t);
|
|
1003
1003
|
for (; s && !_(s); ) {
|
|
1004
1004
|
if (R(s) && !gt(s))
|
|
@@ -1008,14 +1008,14 @@ function de(t, e) {
|
|
|
1008
1008
|
return n;
|
|
1009
1009
|
}
|
|
1010
1010
|
let o = Nt(t, e);
|
|
1011
|
-
for (; o &&
|
|
1011
|
+
for (; o && Ge(o) && gt(o); )
|
|
1012
1012
|
o = Nt(o, e);
|
|
1013
|
-
return o && _(o) && gt(o) && !Et(o) ? n : o ||
|
|
1013
|
+
return o && _(o) && gt(o) && !Et(o) ? n : o || Qe(t) || n;
|
|
1014
1014
|
}
|
|
1015
|
-
const
|
|
1015
|
+
const fn = async function(t) {
|
|
1016
1016
|
const e = this.getOffsetParent || de, n = this.getDimensions, o = await n(t.floating);
|
|
1017
1017
|
return {
|
|
1018
|
-
reference:
|
|
1018
|
+
reference: un(t.reference, await e(t.floating), t.strategy),
|
|
1019
1019
|
floating: {
|
|
1020
1020
|
x: 0,
|
|
1021
1021
|
y: 0,
|
|
@@ -1024,22 +1024,22 @@ const un = async function(t) {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
};
|
|
1026
1026
|
};
|
|
1027
|
-
function
|
|
1027
|
+
function hn(t) {
|
|
1028
1028
|
return E(t).direction === "rtl";
|
|
1029
1029
|
}
|
|
1030
|
-
const
|
|
1031
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1030
|
+
const dn = {
|
|
1031
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: en,
|
|
1032
1032
|
getDocumentElement: T,
|
|
1033
|
-
getClippingRect:
|
|
1033
|
+
getClippingRect: ln,
|
|
1034
1034
|
getOffsetParent: de,
|
|
1035
|
-
getElementRects:
|
|
1036
|
-
getClientRects:
|
|
1037
|
-
getDimensions:
|
|
1035
|
+
getElementRects: fn,
|
|
1036
|
+
getClientRects: nn,
|
|
1037
|
+
getDimensions: an,
|
|
1038
1038
|
getScale: H,
|
|
1039
1039
|
isElement: R,
|
|
1040
|
-
isRTL:
|
|
1040
|
+
isRTL: hn
|
|
1041
1041
|
};
|
|
1042
|
-
function
|
|
1042
|
+
function mn(t, e) {
|
|
1043
1043
|
let n = null, o;
|
|
1044
1044
|
const s = T(t);
|
|
1045
1045
|
function i() {
|
|
@@ -1056,8 +1056,8 @@ function dn(t, e) {
|
|
|
1056
1056
|
} = t.getBoundingClientRect();
|
|
1057
1057
|
if (c || e(), !u || !d)
|
|
1058
1058
|
return;
|
|
1059
|
-
const h = et(f),
|
|
1060
|
-
rootMargin: -h + "px " + -
|
|
1059
|
+
const h = et(f), m = et(s.clientWidth - (a + u)), p = et(s.clientHeight - (f + d)), y = et(a), w = {
|
|
1060
|
+
rootMargin: -h + "px " + -m + "px " + -p + "px " + -y + "px",
|
|
1061
1061
|
threshold: V(0, ot(1, l)) || 1
|
|
1062
1062
|
};
|
|
1063
1063
|
let x = !0;
|
|
@@ -1094,100 +1094,111 @@ function pn(t, e, n, o) {
|
|
|
1094
1094
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1095
1095
|
animationFrame: l = !1
|
|
1096
1096
|
} = o, a = Ot(t), f = s || i ? [...a ? K(a) : [], ...K(e)] : [];
|
|
1097
|
-
f.forEach((
|
|
1098
|
-
s &&
|
|
1097
|
+
f.forEach((g) => {
|
|
1098
|
+
s && g.addEventListener("scroll", n, {
|
|
1099
1099
|
passive: !0
|
|
1100
|
-
}), i &&
|
|
1100
|
+
}), i && g.addEventListener("resize", n);
|
|
1101
1101
|
});
|
|
1102
|
-
const u = a && c ?
|
|
1102
|
+
const u = a && c ? mn(a, n) : null;
|
|
1103
1103
|
let d = -1, h = null;
|
|
1104
|
-
r && (h = new ResizeObserver((
|
|
1105
|
-
let [w] =
|
|
1104
|
+
r && (h = new ResizeObserver((g) => {
|
|
1105
|
+
let [w] = g;
|
|
1106
1106
|
w && w.target === a && h && (h.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
1107
1107
|
var x;
|
|
1108
1108
|
(x = h) == null || x.observe(e);
|
|
1109
1109
|
})), n();
|
|
1110
1110
|
}), a && !l && h.observe(a), h.observe(e));
|
|
1111
|
-
let
|
|
1111
|
+
let m, p = l ? $(t) : null;
|
|
1112
1112
|
l && y();
|
|
1113
1113
|
function y() {
|
|
1114
|
-
const
|
|
1115
|
-
|
|
1114
|
+
const g = $(t);
|
|
1115
|
+
p && (g.x !== p.x || g.y !== p.y || g.width !== p.width || g.height !== p.height) && n(), p = g, m = requestAnimationFrame(y);
|
|
1116
1116
|
}
|
|
1117
1117
|
return n(), () => {
|
|
1118
|
-
var
|
|
1118
|
+
var g;
|
|
1119
1119
|
f.forEach((w) => {
|
|
1120
1120
|
s && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
|
|
1121
|
-
}), u == null || u(), (
|
|
1121
|
+
}), u == null || u(), (g = h) == null || g.disconnect(), h = null, l && cancelAnimationFrame(m);
|
|
1122
1122
|
};
|
|
1123
1123
|
}
|
|
1124
|
-
const
|
|
1124
|
+
const gn = Xe, yn = Je, $t = qe, wn = (t, e, n) => {
|
|
1125
1125
|
const o = /* @__PURE__ */ new Map(), s = {
|
|
1126
|
-
platform:
|
|
1126
|
+
platform: dn,
|
|
1127
1127
|
...n
|
|
1128
1128
|
}, i = {
|
|
1129
1129
|
...s.platform,
|
|
1130
1130
|
_c: o
|
|
1131
1131
|
};
|
|
1132
|
-
return
|
|
1132
|
+
return Ye(t, e, {
|
|
1133
1133
|
...s,
|
|
1134
1134
|
platform: i
|
|
1135
1135
|
});
|
|
1136
|
-
},
|
|
1136
|
+
}, zn = ({
|
|
1137
1137
|
content: t,
|
|
1138
1138
|
open: e,
|
|
1139
|
-
placement: n,
|
|
1140
|
-
offset:
|
|
1141
|
-
}) => Qt((
|
|
1142
|
-
const
|
|
1139
|
+
placement: n = "top",
|
|
1140
|
+
offset: o = { mainAxis: 0, crossAxis: 0 }
|
|
1141
|
+
}) => Qt((s) => {
|
|
1142
|
+
const i = L.toSignal(e), r = s.element, c = L.toSignal(o), l = c.$.mainAxis.map((f) => f ?? 0), a = c.$.crossAxis.map((f) => f ?? 0);
|
|
1143
1143
|
return Gt(
|
|
1144
|
-
|
|
1144
|
+
i,
|
|
1145
1145
|
() => Jt(
|
|
1146
1146
|
"body",
|
|
1147
1147
|
Yt.div(
|
|
1148
|
-
G((
|
|
1149
|
-
const
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1148
|
+
G((f) => {
|
|
1149
|
+
const u = f;
|
|
1150
|
+
u.style.position = "absolute";
|
|
1151
|
+
async function d() {
|
|
1152
|
+
const { x: m, y: p } = await wn(r, u, {
|
|
1153
|
+
placement: L.get(n),
|
|
1154
|
+
strategy: "absolute",
|
|
1155
|
+
middleware: [
|
|
1156
|
+
$t(),
|
|
1157
|
+
gn({
|
|
1158
|
+
mainAxis: l.value,
|
|
1159
|
+
crossAxis: a.value
|
|
1160
|
+
}),
|
|
1161
|
+
yn(),
|
|
1162
|
+
$t()
|
|
1163
|
+
]
|
|
1164
|
+
});
|
|
1165
|
+
u.style.top = `${p}px`, u.style.left = `${m}px`;
|
|
1166
|
+
}
|
|
1167
|
+
const h = we(
|
|
1168
|
+
l,
|
|
1169
|
+
a,
|
|
1170
|
+
n
|
|
1171
|
+
)(d);
|
|
1172
|
+
return F(
|
|
1173
|
+
pn(r, u, d),
|
|
1174
|
+
h
|
|
1164
1175
|
);
|
|
1165
1176
|
}),
|
|
1166
1177
|
t()
|
|
1167
1178
|
)
|
|
1168
1179
|
)
|
|
1169
1180
|
);
|
|
1170
|
-
}),
|
|
1171
|
-
const o = W(
|
|
1172
|
-
(u) =>
|
|
1181
|
+
}), xn = (t, e, n) => {
|
|
1182
|
+
const o = W(D.notAsked), s = o.map(
|
|
1183
|
+
(u) => D.isSuccess(u) ? u.value : void 0
|
|
1173
1184
|
), i = o.map(
|
|
1174
|
-
(u) =>
|
|
1175
|
-
), r = o.map((u) =>
|
|
1185
|
+
(u) => D.isFailure(u) ? u.error : void 0
|
|
1186
|
+
), r = o.map((u) => D.isLoading(u));
|
|
1176
1187
|
let c;
|
|
1177
1188
|
const l = async (u) => {
|
|
1178
1189
|
c == null || c.abort(), c = new AbortController();
|
|
1179
1190
|
const d = c.signal, h = o.get();
|
|
1180
|
-
o.set(
|
|
1191
|
+
o.set(D.loading(D.getOrUndefined(h)));
|
|
1181
1192
|
try {
|
|
1182
|
-
const
|
|
1183
|
-
await Promise.resolve(), c = void 0, o.set(
|
|
1184
|
-
} catch (
|
|
1185
|
-
c = void 0, o.set(
|
|
1193
|
+
const m = await e({ request: u, abortSignal: d, previous: h });
|
|
1194
|
+
await Promise.resolve(), c = void 0, o.set(D.success(m));
|
|
1195
|
+
} catch (m) {
|
|
1196
|
+
c = void 0, o.set(D.failure(n(m)));
|
|
1186
1197
|
}
|
|
1187
|
-
}, a = () => l(
|
|
1198
|
+
}, a = () => l(L.get(t)), f = () => {
|
|
1188
1199
|
c == null || c.abort(), c = void 0, o.dispose();
|
|
1189
1200
|
};
|
|
1190
|
-
return o.onDispose(
|
|
1201
|
+
return o.onDispose(L.on(t, l)), {
|
|
1191
1202
|
status: o,
|
|
1192
1203
|
value: s,
|
|
1193
1204
|
error: i,
|
|
@@ -1195,7 +1206,7 @@ const mn = Ke, gn = Xe, $t = Ye, yn = (t, e, n) => {
|
|
|
1195
1206
|
reload: a,
|
|
1196
1207
|
dispose: f
|
|
1197
1208
|
};
|
|
1198
|
-
},
|
|
1209
|
+
}, vn = (t, e) => {
|
|
1199
1210
|
const { status: n, dispose: o, reload: s } = t, { loading: i, failure: r, success: c } = e;
|
|
1200
1211
|
return At(
|
|
1201
1212
|
F(o),
|
|
@@ -1205,25 +1216,25 @@ const mn = Ke, gn = Xe, $t = Ye, yn = (t, e, n) => {
|
|
|
1205
1216
|
success: (l) => c(l, s)
|
|
1206
1217
|
})
|
|
1207
1218
|
);
|
|
1208
|
-
},
|
|
1219
|
+
}, _n = ({
|
|
1209
1220
|
request: t,
|
|
1210
1221
|
load: e,
|
|
1211
1222
|
mapError: n = (o) => o
|
|
1212
1223
|
}) => {
|
|
1213
|
-
const o =
|
|
1214
|
-
return (s) =>
|
|
1215
|
-
},
|
|
1224
|
+
const o = xn(t, e, n);
|
|
1225
|
+
return (s) => vn(o, s);
|
|
1226
|
+
}, bn = (t, e) => {
|
|
1216
1227
|
if (typeof e == "function")
|
|
1217
|
-
return
|
|
1228
|
+
return bn(t, { success: e });
|
|
1218
1229
|
const n = e.failure ?? ((s) => At(
|
|
1219
1230
|
F(s.on(console.error)),
|
|
1220
1231
|
s.map((i) => `Error: ${i}`)
|
|
1221
1232
|
)), o = e.success;
|
|
1222
|
-
return Xt(
|
|
1233
|
+
return Xt(L.toSignal(t), {
|
|
1223
1234
|
Success: (s) => o(s.$.value),
|
|
1224
1235
|
Failure: (s) => n(s.$.error)
|
|
1225
1236
|
});
|
|
1226
|
-
},
|
|
1237
|
+
}, In = () => qt.focus((t) => {
|
|
1227
1238
|
var e;
|
|
1228
1239
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1229
1240
|
});
|
|
@@ -1266,7 +1277,7 @@ class dt {
|
|
|
1266
1277
|
* console.log(rect1.equals(rect3)); // true (within tolerance)
|
|
1267
1278
|
* ```
|
|
1268
1279
|
*/
|
|
1269
|
-
|
|
1280
|
+
pt(this, "equals", (e) => tt(this.left, e.left) && tt(this.top, e.top) && tt(this.width, e.width) && tt(this.height, e.height));
|
|
1270
1281
|
this.left = e, this.top = n, this.width = o, this.height = s;
|
|
1271
1282
|
}
|
|
1272
1283
|
/**
|
|
@@ -1375,7 +1386,7 @@ function Bt(t) {
|
|
|
1375
1386
|
height: e.height
|
|
1376
1387
|
});
|
|
1377
1388
|
}
|
|
1378
|
-
const
|
|
1389
|
+
const An = (t) => Qt((e) => {
|
|
1379
1390
|
const { element: n } = e, o = W(Bt(n)), s = Rt(t(o))(e), i = () => {
|
|
1380
1391
|
o.set(dt.of(Bt(n)));
|
|
1381
1392
|
};
|
|
@@ -1383,7 +1394,7 @@ const bn = (t) => Qt((e) => {
|
|
|
1383
1394
|
return typeof ResizeObserver == "function" && (r = new ResizeObserver(i), r.observe(n)), F((c) => {
|
|
1384
1395
|
r == null || r.disconnect(), s(c);
|
|
1385
1396
|
});
|
|
1386
|
-
}),
|
|
1397
|
+
}), jn = (t) => An(t), Yn = (t) => (e) => {
|
|
1387
1398
|
const n = J(), o = W({
|
|
1388
1399
|
width: (n == null ? void 0 : n.innerWidth) ?? 0,
|
|
1389
1400
|
height: (n == null ? void 0 : n.innerHeight) ?? 0
|
|
@@ -1396,7 +1407,7 @@ const bn = (t) => Qt((e) => {
|
|
|
1396
1407
|
return n == null || n.addEventListener("resize", i), (r) => {
|
|
1397
1408
|
n == null || n.removeEventListener("resize", i), s(r);
|
|
1398
1409
|
};
|
|
1399
|
-
},
|
|
1410
|
+
}, Rn = (t, e) => {
|
|
1400
1411
|
const n = e.split("/").filter((s) => s !== ""), o = {};
|
|
1401
1412
|
for (let s = 0; s < t.length; s++) {
|
|
1402
1413
|
const i = t[s], r = n[s];
|
|
@@ -1411,21 +1422,21 @@ const bn = (t) => Qt((e) => {
|
|
|
1411
1422
|
return { params: o, path: e };
|
|
1412
1423
|
}
|
|
1413
1424
|
return n.length !== t.length ? null : { params: o, path: e };
|
|
1414
|
-
},
|
|
1425
|
+
}, En = (t) => 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 !== ""), Ln = (t) => {
|
|
1415
1426
|
const e = t.map((n) => {
|
|
1416
|
-
const o =
|
|
1427
|
+
const o = En(n);
|
|
1417
1428
|
return { route: n, segments: o };
|
|
1418
1429
|
});
|
|
1419
1430
|
return function(o) {
|
|
1420
1431
|
for (const { segments: s, route: i } of e) {
|
|
1421
|
-
const r =
|
|
1432
|
+
const r = Rn(s, o);
|
|
1422
1433
|
if (r)
|
|
1423
1434
|
return { ...r, route: i };
|
|
1424
1435
|
}
|
|
1425
1436
|
return null;
|
|
1426
1437
|
};
|
|
1427
|
-
},
|
|
1428
|
-
const e =
|
|
1438
|
+
}, qn = (t) => {
|
|
1439
|
+
const e = Ln(Object.keys(t));
|
|
1429
1440
|
return jt(ee, (n) => {
|
|
1430
1441
|
const o = n.map((s) => {
|
|
1431
1442
|
const i = e(s.pathname);
|
|
@@ -1439,13 +1450,13 @@ const bn = (t) => Qt((e) => {
|
|
|
1439
1450
|
hash: s.hash
|
|
1440
1451
|
};
|
|
1441
1452
|
});
|
|
1442
|
-
return
|
|
1453
|
+
return xe(
|
|
1443
1454
|
o.map((s) => [s.route, s]),
|
|
1444
1455
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1445
1456
|
t
|
|
1446
1457
|
);
|
|
1447
1458
|
});
|
|
1448
|
-
}, ct = 60 * 1e3, bt = 60 * ct, X = 24 * bt, Ut = 7 * X, Ht = 30 * X,
|
|
1459
|
+
}, ct = 60 * 1e3, bt = 60 * ct, X = 24 * bt, Ut = 7 * X, Ht = 30 * X, On = 365 * X, Sn = [
|
|
1449
1460
|
{
|
|
1450
1461
|
max: ct * 90,
|
|
1451
1462
|
value: ct,
|
|
@@ -1483,7 +1494,7 @@ const bn = (t) => Qt((e) => {
|
|
|
1483
1494
|
},
|
|
1484
1495
|
{
|
|
1485
1496
|
max: 1 / 0,
|
|
1486
|
-
value:
|
|
1497
|
+
value: On,
|
|
1487
1498
|
name: "year",
|
|
1488
1499
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1489
1500
|
future: { singular: "in a year", plural: "in {} years" }
|
|
@@ -1500,76 +1511,76 @@ function zt(t, e, n, o) {
|
|
|
1500
1511
|
);
|
|
1501
1512
|
}
|
|
1502
1513
|
const Tn = (t = 1e3) => {
|
|
1503
|
-
const e = W(/* @__PURE__ */ new Date()), n =
|
|
1514
|
+
const e = W(/* @__PURE__ */ new Date()), n = Ae(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
1504
1515
|
return e.onDispose(n), e;
|
|
1505
|
-
},
|
|
1516
|
+
}, kn = (t) => {
|
|
1506
1517
|
const e = Math.abs(t);
|
|
1507
1518
|
if (e < ct)
|
|
1508
1519
|
return t < 0 ? "just now" : "in a moment";
|
|
1509
|
-
for (const n of
|
|
1520
|
+
for (const n of Sn)
|
|
1510
1521
|
if (e < n.max)
|
|
1511
1522
|
return t < 0 ? zt(e, n.value, n.past.singular, n.past.plural) : zt(e, n.value, n.future.singular, n.future.plural);
|
|
1512
1523
|
throw new Error("unreachable");
|
|
1513
|
-
},
|
|
1514
|
-
const o = e != null ? It.is(e) ? e.derive() : W(e) : Tn(n), s =
|
|
1524
|
+
}, Cn = (t, { now: e, frequency: n = 1e4 } = {}) => {
|
|
1525
|
+
const o = e != null ? It.is(e) ? e.derive() : W(e) : Tn(n), s = ve(
|
|
1515
1526
|
t,
|
|
1516
1527
|
o
|
|
1517
1528
|
)((i, r) => i.getTime() - r.getTime());
|
|
1518
|
-
return s.onDispose(() =>
|
|
1519
|
-
},
|
|
1520
|
-
const n =
|
|
1529
|
+
return s.onDispose(() => L.dispose(o)), s;
|
|
1530
|
+
}, Dn = (t, e = {}) => {
|
|
1531
|
+
const n = Cn(t, e), o = n.map(kn);
|
|
1521
1532
|
return o.onDispose(n.dispose), o;
|
|
1522
|
-
},
|
|
1523
|
-
class
|
|
1533
|
+
}, Kn = (t, e = {}) => Dn(t, e);
|
|
1534
|
+
class Pn extends be {
|
|
1524
1535
|
constructor() {
|
|
1525
1536
|
super(...arguments);
|
|
1526
1537
|
/**
|
|
1527
1538
|
* Triggers an update of the Ticker by incrementing its internal value.
|
|
1528
1539
|
* @returns void
|
|
1529
1540
|
*/
|
|
1530
|
-
|
|
1541
|
+
pt(this, "tick", () => this.update((n) => n + 1));
|
|
1531
1542
|
}
|
|
1532
1543
|
}
|
|
1533
|
-
const
|
|
1544
|
+
const Xn = (t = 0) => new Pn(t, (e, n) => e === n);
|
|
1534
1545
|
export {
|
|
1535
|
-
|
|
1536
|
-
|
|
1546
|
+
We as Anchor,
|
|
1547
|
+
Vn as Appearance,
|
|
1537
1548
|
ne as AsyncResultView,
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1549
|
+
Nn as AutoFocus,
|
|
1550
|
+
$n as AutoSelect,
|
|
1551
|
+
An as ElementRect,
|
|
1552
|
+
jn as ElementSize,
|
|
1553
|
+
Un as HTMLTitle,
|
|
1554
|
+
Bn as HiddenWhenEmpty,
|
|
1555
|
+
Ne as InViewport,
|
|
1545
1556
|
ee as Location,
|
|
1546
|
-
|
|
1557
|
+
zn as PopOver,
|
|
1547
1558
|
dt as Rect,
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1559
|
+
_n as Resource,
|
|
1560
|
+
vn as ResourceDisplay,
|
|
1561
|
+
bn as ResultView,
|
|
1562
|
+
qn as Router,
|
|
1563
|
+
In as SelectOnFocus,
|
|
1564
|
+
Pn as Ticker,
|
|
1565
|
+
Hn as WhenInViewport,
|
|
1566
|
+
Yn as WindowSize,
|
|
1567
|
+
Ee as _checkExtensionCondition,
|
|
1568
|
+
Re as _getExtension,
|
|
1569
|
+
Ln as _makeRouteMatcher,
|
|
1570
|
+
En as _parseRouteSegments,
|
|
1571
|
+
Se as areLocationsEqual,
|
|
1561
1572
|
Bt as getAbsoluteRect,
|
|
1562
|
-
|
|
1573
|
+
Oe as handleAnchorClick,
|
|
1563
1574
|
te as locationFromURL,
|
|
1564
|
-
|
|
1565
|
-
|
|
1575
|
+
xn as makeResource,
|
|
1576
|
+
Rn as matchesRoute,
|
|
1566
1577
|
Tn as nowSignal,
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1578
|
+
Kn as relativeTime,
|
|
1579
|
+
Cn as relativeTimeMillisSignal,
|
|
1580
|
+
Dn as relativeTimeSignal,
|
|
1570
1581
|
Pt as setLocationFromUrl,
|
|
1571
|
-
|
|
1572
|
-
|
|
1582
|
+
Xn as ticker,
|
|
1583
|
+
kn as timeDiffToString,
|
|
1573
1584
|
wt as urlFromLocation,
|
|
1574
|
-
|
|
1585
|
+
Fe as useAppearance
|
|
1575
1586
|
};
|