@tempots/ui 1.2.1 → 2.0.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/browser-location-Td-R3jYM.cjs +1 -0
- package/browser-location-Wn6jT0ta.js +39 -0
- package/headless-location-24MkNdBT.cjs +1 -0
- package/{headless-location-Ba_ht5ZQ.js → headless-location-CR5zPUNK.js} +5 -5
- package/index.cjs +1 -1
- package/index.js +411 -421
- package/package.json +2 -2
- package/renderables/appearance.d.ts +1 -1
- package/renderables/resource.d.ts +13 -19
- package/renderables/router/browser-location.d.ts +1 -15
- package/renderables/router/headless-location.d.ts +2 -1
- package/renderables/router/location.d.ts +1 -1
- package/utils/make-relative-time.d.ts +5 -5
- package/utils/resource.d.ts +5 -19
- package/utils/ticker.d.ts +1 -1
- package/browser-location-12vUH3Kv.js +0 -41
- package/browser-location-D36kVbd7.cjs +0 -1
- package/headless-location-8Va85S-Q.cjs +0 -1
package/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { makeProviderMark as
|
|
5
|
-
import { delayed as Xt, AsyncResult as P, interval as
|
|
6
|
-
const
|
|
1
|
+
var de = Object.defineProperty;
|
|
2
|
+
var he = (t, e, n) => e in t ? de(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var kt = (t, e, n) => he(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { makeProviderMark as zt, Fragment as X, WithBrowserCtx as xt, Async as Ct, WithHeadlessCtx as me, UseProvider as Bt, prop as W, renderableOfTNode as ct, getWindow as vt, Signal as Ut, html as _t, on as It, Value as J, attr as jt, SetProvider as pe, OnDispose as T, Empty as pt, OneOfType as Yt, WithElement as G, Portal as qt, When as Kt, OneOfTuple as ge, computedOf as ye, Prop as we } from "@tempots/dom";
|
|
5
|
+
import { delayed as Xt, AsyncResult as P, interval as xe } from "@tempots/std";
|
|
6
|
+
const ve = (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
|
+
}, be = (t, e) => {
|
|
12
|
+
const n = ve(e);
|
|
13
13
|
return n != null && (t.length === 0 || !t.some((o) => n == o));
|
|
14
|
-
},
|
|
14
|
+
}, Ae = (t, e, n, o) => {
|
|
15
15
|
let r = t.target;
|
|
16
16
|
for (; r != null && !(r instanceof HTMLAnchorElement); )
|
|
17
17
|
r = r.parentElement;
|
|
@@ -20,14 +20,14 @@ const be = (t) => {
|
|
|
20
20
|
const i = r;
|
|
21
21
|
if (t.button !== 0 || t.ctrlKey || t.metaKey || i.target !== "_self" && i.target !== "" || i.getAttribute("download") != null)
|
|
22
22
|
return !0;
|
|
23
|
-
const { pathname: s, search: c, hash:
|
|
23
|
+
const { pathname: s, search: c, hash: l } = i;
|
|
24
24
|
if (o) {
|
|
25
|
-
const
|
|
26
|
-
if (!(f != null && f.startsWith("#")) && f !==
|
|
25
|
+
const a = s + c + l, f = i.getAttribute("href");
|
|
26
|
+
if (!(f != null && f.startsWith("#")) && f !== a)
|
|
27
27
|
return !0;
|
|
28
28
|
}
|
|
29
|
-
return e ? !1 :
|
|
30
|
-
},
|
|
29
|
+
return e ? !1 : be(n, s);
|
|
30
|
+
}, Re = (t, e = {
|
|
31
31
|
ignoreUrlWithExtension: !0,
|
|
32
32
|
allowedExtensions: [],
|
|
33
33
|
ignoreExternalUrl: !0
|
|
@@ -36,30 +36,30 @@ const be = (t) => {
|
|
|
36
36
|
(o) => o.startsWith(".") ? o : "." + o
|
|
37
37
|
) : [];
|
|
38
38
|
return (o) => {
|
|
39
|
-
|
|
39
|
+
Ae(
|
|
40
40
|
o,
|
|
41
41
|
e.ignoreUrlWithExtension ?? !0,
|
|
42
42
|
n,
|
|
43
43
|
e.ignoreExternalUrl ?? !0
|
|
44
44
|
) || t() && o.preventDefault();
|
|
45
45
|
};
|
|
46
|
-
},
|
|
47
|
-
xt(() =>
|
|
48
|
-
import("./browser-location-
|
|
46
|
+
}, Ee = zt("LocationProvider"), Tn = (t) => X(
|
|
47
|
+
xt(() => Ct(
|
|
48
|
+
import("./browser-location-Wn6jT0ta.js").then((e) => e.ProvideBrowserLocation),
|
|
49
49
|
(e) => e(t)
|
|
50
50
|
)),
|
|
51
|
-
|
|
52
|
-
import("./headless-location-
|
|
51
|
+
me((e) => Ct(
|
|
52
|
+
import("./headless-location-CR5zPUNK.js").then((n) => n.ProvideHeadlessLocation),
|
|
53
53
|
(n) => n(e.container.currentURL, t)
|
|
54
54
|
))
|
|
55
|
-
), Jt = (t) =>
|
|
55
|
+
), Jt = (t) => Bt(Ee, (e) => (n) => {
|
|
56
56
|
const o = W(e.value, e.equals);
|
|
57
57
|
e.feedProp(o), o.on(e.set);
|
|
58
|
-
const r =
|
|
58
|
+
const r = ct(t(o))(n);
|
|
59
59
|
return (i) => {
|
|
60
60
|
o.dispose(), r(i);
|
|
61
61
|
};
|
|
62
|
-
}),
|
|
62
|
+
}), kn = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Oe = (t, e) => {
|
|
63
63
|
var i;
|
|
64
64
|
const n = new URL(t, e ?? ((i = vt()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
|
|
65
65
|
let r = n.hash;
|
|
@@ -68,53 +68,50 @@ const be = (t) => {
|
|
|
68
68
|
search: o,
|
|
69
69
|
hash: r === "" ? void 0 : r
|
|
70
70
|
};
|
|
71
|
-
},
|
|
72
|
-
const n =
|
|
71
|
+
}, Le = (t, e) => {
|
|
72
|
+
const n = Oe(e);
|
|
73
73
|
return t.set(n), t;
|
|
74
|
-
},
|
|
74
|
+
}, Cn = (t) => {
|
|
75
75
|
const n = new URLSearchParams(t.search).toString(), o = t.hash;
|
|
76
76
|
return `${t.pathname}${n ? `?${n}` : ""}${o ? `#${o}` : ""}`;
|
|
77
77
|
}, Se = (t, ...e) => {
|
|
78
|
-
if (typeof t == "string" ||
|
|
78
|
+
if (typeof t == "string" || Ut.is(t))
|
|
79
79
|
return Se({ href: t }, ...e);
|
|
80
80
|
const { href: n, ...o } = t;
|
|
81
|
-
return Jt((r) =>
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
return Jt((r) => _t.a(
|
|
82
|
+
It.click(
|
|
83
|
+
Re(() => (Le(r, J.get(n)), !0), o)
|
|
84
84
|
),
|
|
85
|
-
|
|
85
|
+
jt.href(n),
|
|
86
86
|
...e
|
|
87
87
|
));
|
|
88
|
-
}, Gt =
|
|
89
|
-
const e = vt(), n = e != null && e.matchMedia != null
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
}, Gt = zt("Appearance"), Pn = (t) => {
|
|
89
|
+
const e = vt(), n = e != null && e.matchMedia != null ? e.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (n == null ? void 0 : n.matches) ?? !1, r = W(o ? "dark" : "light"), i = (s) => {
|
|
90
|
+
r.set(s.matches ? "dark" : "light");
|
|
91
|
+
};
|
|
92
|
+
return n == null || n.addEventListener("change", i), X(
|
|
93
|
+
pe(Gt, r, t),
|
|
94
|
+
T(() => n == null ? void 0 : n.removeEventListener("change", i))
|
|
95
95
|
);
|
|
96
|
-
},
|
|
96
|
+
}, Dn = (t) => Bt(Gt, t), Qt = (t, e) => {
|
|
97
97
|
if (typeof e == "function")
|
|
98
|
-
return
|
|
99
|
-
const n = e.failure ?? ((s) =>
|
|
100
|
-
|
|
101
|
-
s.map((c) => `Error: ${c}`)
|
|
102
|
-
)), o = e.success, r = e.loading ?? (() => nt), i = e.notAsked ?? (() => nt);
|
|
103
|
-
return bt(J.toSignal(t), {
|
|
98
|
+
return Qt(t, { success: e });
|
|
99
|
+
const n = e.failure ?? ((s) => s.map((c) => `Error: ${c}`)), o = e.success, r = e.loading ?? (() => pt), i = e.notAsked ?? (() => pt);
|
|
100
|
+
return Yt(J.toSignal(t), {
|
|
104
101
|
AsyncSuccess: (s) => o(s.$.value),
|
|
105
102
|
AsyncFailure: (s) => n(s.$.error),
|
|
106
|
-
Loading: (s) => r(s
|
|
103
|
+
Loading: (s) => r(s.map((c) => c.previousValue)),
|
|
107
104
|
NotAsked: i
|
|
108
105
|
});
|
|
109
|
-
},
|
|
106
|
+
}, Wn = (t = 10) => G((e) => T(Xt(() => e == null ? void 0 : e.focus(), t))), Fn = (t = 10) => G((e) => {
|
|
110
107
|
const n = Xt(() => e.select(), t);
|
|
111
|
-
return
|
|
112
|
-
}),
|
|
108
|
+
return T(n);
|
|
109
|
+
}), Mn = G((t) => {
|
|
113
110
|
const e = t.style.getPropertyValue(":empty");
|
|
114
|
-
return t.style.setProperty(":empty", "display:none"),
|
|
111
|
+
return t.style.setProperty(":empty", "display:none"), T((n) => {
|
|
115
112
|
n && t.style.setProperty(":empty", e);
|
|
116
113
|
});
|
|
117
|
-
}),
|
|
114
|
+
}), Nn = (t) => qt("head > title", jt.innerText(t)), Te = {
|
|
118
115
|
partial: {
|
|
119
116
|
root: null,
|
|
120
117
|
rootMargin: "0px",
|
|
@@ -128,80 +125,80 @@ const be = (t) => {
|
|
|
128
125
|
}, et = {
|
|
129
126
|
partial: /* @__PURE__ */ new Map(),
|
|
130
127
|
full: /* @__PURE__ */ new Map()
|
|
131
|
-
},
|
|
128
|
+
}, Y = {
|
|
132
129
|
partial: null,
|
|
133
130
|
full: null
|
|
134
131
|
};
|
|
135
|
-
function
|
|
136
|
-
return
|
|
132
|
+
function ke(t) {
|
|
133
|
+
return Y[t] == null && (Y[t] = new IntersectionObserver((e) => {
|
|
137
134
|
e.forEach((n) => {
|
|
138
135
|
const o = et[t].get(n.target);
|
|
139
136
|
o == null || o.set(n.isIntersecting);
|
|
140
137
|
});
|
|
141
|
-
},
|
|
138
|
+
}, Te[t])), Y[t];
|
|
142
139
|
}
|
|
143
|
-
const
|
|
140
|
+
const Ce = (t, e) => {
|
|
144
141
|
const n = W(!1);
|
|
145
|
-
return
|
|
142
|
+
return X(
|
|
146
143
|
G((o) => {
|
|
147
|
-
const r = typeof IntersectionObserver < "u" ?
|
|
148
|
-
return et[t].set(o, n), r == null || r.observe(o),
|
|
144
|
+
const r = typeof IntersectionObserver < "u" ? ke(t) : null;
|
|
145
|
+
return et[t].set(o, n), r == null || r.observe(o), T(() => {
|
|
149
146
|
var i;
|
|
150
|
-
n.dispose(), r == null || r.unobserve(o), et[t].delete(o), et[t].size === 0 && ((i =
|
|
147
|
+
n.dispose(), r == null || r.unobserve(o), et[t].delete(o), et[t].size === 0 && ((i = Y[t]) == null || i.disconnect(), Y[t] = null);
|
|
151
148
|
});
|
|
152
149
|
}),
|
|
153
|
-
|
|
150
|
+
ct(e(n))
|
|
154
151
|
);
|
|
155
|
-
},
|
|
152
|
+
}, Vn = (t, e, n) => Ce(t, (o) => Kt(o, e, n ?? (() => pt))), nt = Math.min, M = Math.max, ot = Math.round, tt = Math.floor, O = (t) => ({
|
|
156
153
|
x: t,
|
|
157
154
|
y: t
|
|
158
|
-
}),
|
|
155
|
+
}), Pe = {
|
|
159
156
|
left: "right",
|
|
160
157
|
right: "left",
|
|
161
158
|
bottom: "top",
|
|
162
159
|
top: "bottom"
|
|
163
|
-
},
|
|
160
|
+
}, De = {
|
|
164
161
|
start: "end",
|
|
165
162
|
end: "start"
|
|
166
163
|
};
|
|
167
|
-
function
|
|
168
|
-
return M(t,
|
|
164
|
+
function Pt(t, e, n) {
|
|
165
|
+
return M(t, nt(e, n));
|
|
169
166
|
}
|
|
170
|
-
function
|
|
167
|
+
function lt(t, e) {
|
|
171
168
|
return typeof t == "function" ? t(e) : t;
|
|
172
169
|
}
|
|
173
170
|
function N(t) {
|
|
174
171
|
return t.split("-")[0];
|
|
175
172
|
}
|
|
176
|
-
function
|
|
173
|
+
function at(t) {
|
|
177
174
|
return t.split("-")[1];
|
|
178
175
|
}
|
|
179
|
-
function
|
|
176
|
+
function Zt(t) {
|
|
180
177
|
return t === "x" ? "y" : "x";
|
|
181
178
|
}
|
|
182
|
-
function
|
|
179
|
+
function te(t) {
|
|
183
180
|
return t === "y" ? "height" : "width";
|
|
184
181
|
}
|
|
185
182
|
function B(t) {
|
|
186
183
|
return ["top", "bottom"].includes(N(t)) ? "y" : "x";
|
|
187
184
|
}
|
|
188
|
-
function
|
|
189
|
-
return
|
|
185
|
+
function ee(t) {
|
|
186
|
+
return Zt(B(t));
|
|
190
187
|
}
|
|
191
|
-
function
|
|
188
|
+
function We(t, e, n) {
|
|
192
189
|
n === void 0 && (n = !1);
|
|
193
|
-
const o =
|
|
190
|
+
const o = at(t), r = ee(t), i = te(r);
|
|
194
191
|
let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
195
|
-
return e.reference[i] > e.floating[i] && (s =
|
|
192
|
+
return e.reference[i] > e.floating[i] && (s = rt(s)), [s, rt(s)];
|
|
196
193
|
}
|
|
197
|
-
function
|
|
198
|
-
const e =
|
|
194
|
+
function Fe(t) {
|
|
195
|
+
const e = rt(t);
|
|
199
196
|
return [gt(t), e, gt(e)];
|
|
200
197
|
}
|
|
201
198
|
function gt(t) {
|
|
202
|
-
return t.replace(/start|end/g, (e) =>
|
|
199
|
+
return t.replace(/start|end/g, (e) => De[e]);
|
|
203
200
|
}
|
|
204
|
-
function
|
|
201
|
+
function Me(t, e, n) {
|
|
205
202
|
const o = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
206
203
|
switch (t) {
|
|
207
204
|
case "top":
|
|
@@ -214,15 +211,15 @@ function $e(t, e, n) {
|
|
|
214
211
|
return [];
|
|
215
212
|
}
|
|
216
213
|
}
|
|
217
|
-
function
|
|
218
|
-
const r =
|
|
219
|
-
let i =
|
|
214
|
+
function Ne(t, e, n, o) {
|
|
215
|
+
const r = at(t);
|
|
216
|
+
let i = Me(N(t), n === "start", o);
|
|
220
217
|
return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(gt)))), i;
|
|
221
218
|
}
|
|
222
|
-
function
|
|
223
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
219
|
+
function rt(t) {
|
|
220
|
+
return t.replace(/left|right|bottom|top/g, (e) => Pe[e]);
|
|
224
221
|
}
|
|
225
|
-
function
|
|
222
|
+
function Ve(t) {
|
|
226
223
|
return {
|
|
227
224
|
top: 0,
|
|
228
225
|
right: 0,
|
|
@@ -231,15 +228,15 @@ function He(t) {
|
|
|
231
228
|
...t
|
|
232
229
|
};
|
|
233
230
|
}
|
|
234
|
-
function
|
|
235
|
-
return typeof t != "number" ?
|
|
231
|
+
function $e(t) {
|
|
232
|
+
return typeof t != "number" ? Ve(t) : {
|
|
236
233
|
top: t,
|
|
237
234
|
right: t,
|
|
238
235
|
bottom: t,
|
|
239
236
|
left: t
|
|
240
237
|
};
|
|
241
238
|
}
|
|
242
|
-
function
|
|
239
|
+
function it(t) {
|
|
243
240
|
const {
|
|
244
241
|
x: e,
|
|
245
242
|
y: n,
|
|
@@ -257,14 +254,14 @@ function st(t) {
|
|
|
257
254
|
y: n
|
|
258
255
|
};
|
|
259
256
|
}
|
|
260
|
-
function
|
|
257
|
+
function Dt(t, e, n) {
|
|
261
258
|
let {
|
|
262
259
|
reference: o,
|
|
263
260
|
floating: r
|
|
264
261
|
} = t;
|
|
265
|
-
const i = B(e), s =
|
|
262
|
+
const i = B(e), s = ee(e), c = te(s), l = N(e), a = i === "y", f = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, h = o[c] / 2 - r[c] / 2;
|
|
266
263
|
let d;
|
|
267
|
-
switch (
|
|
264
|
+
switch (l) {
|
|
268
265
|
case "top":
|
|
269
266
|
d = {
|
|
270
267
|
x: f,
|
|
@@ -295,31 +292,31 @@ function Wt(t, e, n) {
|
|
|
295
292
|
y: o.y
|
|
296
293
|
};
|
|
297
294
|
}
|
|
298
|
-
switch (
|
|
295
|
+
switch (at(e)) {
|
|
299
296
|
case "start":
|
|
300
|
-
d[s] -= h * (n &&
|
|
297
|
+
d[s] -= h * (n && a ? -1 : 1);
|
|
301
298
|
break;
|
|
302
299
|
case "end":
|
|
303
|
-
d[s] += h * (n &&
|
|
300
|
+
d[s] += h * (n && a ? -1 : 1);
|
|
304
301
|
break;
|
|
305
302
|
}
|
|
306
303
|
return d;
|
|
307
304
|
}
|
|
308
|
-
const
|
|
305
|
+
const He = async (t, e, n) => {
|
|
309
306
|
const {
|
|
310
307
|
placement: o = "bottom",
|
|
311
308
|
strategy: r = "absolute",
|
|
312
309
|
middleware: i = [],
|
|
313
310
|
platform: s
|
|
314
|
-
} = n, c = i.filter(Boolean),
|
|
315
|
-
let
|
|
311
|
+
} = n, c = i.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
312
|
+
let a = await s.getElementRects({
|
|
316
313
|
reference: t,
|
|
317
314
|
floating: e,
|
|
318
315
|
strategy: r
|
|
319
316
|
}), {
|
|
320
317
|
x: f,
|
|
321
318
|
y: u
|
|
322
|
-
} =
|
|
319
|
+
} = Dt(a, o, l), h = o, d = {}, m = 0;
|
|
323
320
|
for (let g = 0; g < c.length; g++) {
|
|
324
321
|
const {
|
|
325
322
|
name: y,
|
|
@@ -336,7 +333,7 @@ const Be = async (t, e, n) => {
|
|
|
336
333
|
placement: h,
|
|
337
334
|
strategy: r,
|
|
338
335
|
middlewareData: d,
|
|
339
|
-
rects:
|
|
336
|
+
rects: a,
|
|
340
337
|
platform: s,
|
|
341
338
|
elements: {
|
|
342
339
|
reference: t,
|
|
@@ -349,14 +346,14 @@ const Be = async (t, e, n) => {
|
|
|
349
346
|
...d[y],
|
|
350
347
|
...b
|
|
351
348
|
}
|
|
352
|
-
}, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (h = v.placement), v.rects && (
|
|
349
|
+
}, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (h = v.placement), v.rects && (a = v.rects === !0 ? await s.getElementRects({
|
|
353
350
|
reference: t,
|
|
354
351
|
floating: e,
|
|
355
352
|
strategy: r
|
|
356
353
|
}) : v.rects), {
|
|
357
354
|
x: f,
|
|
358
355
|
y: u
|
|
359
|
-
} =
|
|
356
|
+
} = Dt(a, h, l)), g = -1);
|
|
360
357
|
}
|
|
361
358
|
return {
|
|
362
359
|
x: f,
|
|
@@ -366,7 +363,7 @@ const Be = async (t, e, n) => {
|
|
|
366
363
|
middlewareData: d
|
|
367
364
|
};
|
|
368
365
|
};
|
|
369
|
-
async function
|
|
366
|
+
async function ne(t, e) {
|
|
370
367
|
var n;
|
|
371
368
|
e === void 0 && (e = {});
|
|
372
369
|
const {
|
|
@@ -375,18 +372,18 @@ async function ee(t, e) {
|
|
|
375
372
|
platform: i,
|
|
376
373
|
rects: s,
|
|
377
374
|
elements: c,
|
|
378
|
-
strategy:
|
|
375
|
+
strategy: l
|
|
379
376
|
} = t, {
|
|
380
|
-
boundary:
|
|
377
|
+
boundary: a = "clippingAncestors",
|
|
381
378
|
rootBoundary: f = "viewport",
|
|
382
379
|
elementContext: u = "floating",
|
|
383
380
|
altBoundary: h = !1,
|
|
384
381
|
padding: d = 0
|
|
385
|
-
} =
|
|
382
|
+
} = lt(e, t), m = $e(d), y = c[h ? u === "floating" ? "reference" : "floating" : u], p = it(await i.getClippingRect({
|
|
386
383
|
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)),
|
|
387
|
-
boundary:
|
|
384
|
+
boundary: a,
|
|
388
385
|
rootBoundary: f,
|
|
389
|
-
strategy:
|
|
386
|
+
strategy: l
|
|
390
387
|
})), w = u === "floating" ? {
|
|
391
388
|
x: o,
|
|
392
389
|
y: r,
|
|
@@ -398,11 +395,11 @@ async function ee(t, e) {
|
|
|
398
395
|
} : {
|
|
399
396
|
x: 1,
|
|
400
397
|
y: 1
|
|
401
|
-
}, v =
|
|
398
|
+
}, v = it(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
402
399
|
elements: c,
|
|
403
400
|
rect: w,
|
|
404
401
|
offsetParent: x,
|
|
405
|
-
strategy:
|
|
402
|
+
strategy: l
|
|
406
403
|
}) : w);
|
|
407
404
|
return {
|
|
408
405
|
top: (p.top - v.top + m.top) / b.y,
|
|
@@ -411,7 +408,7 @@ async function ee(t, e) {
|
|
|
411
408
|
right: (v.right - p.right + m.right) / b.x
|
|
412
409
|
};
|
|
413
410
|
}
|
|
414
|
-
const
|
|
411
|
+
const ze = function(t) {
|
|
415
412
|
return t === void 0 && (t = {}), {
|
|
416
413
|
name: "flip",
|
|
417
414
|
options: t,
|
|
@@ -422,8 +419,8 @@ const Ue = function(t) {
|
|
|
422
419
|
middlewareData: i,
|
|
423
420
|
rects: s,
|
|
424
421
|
initialPlacement: c,
|
|
425
|
-
platform:
|
|
426
|
-
elements:
|
|
422
|
+
platform: l,
|
|
423
|
+
elements: a
|
|
427
424
|
} = e, {
|
|
428
425
|
mainAxis: f = !0,
|
|
429
426
|
crossAxis: u = !0,
|
|
@@ -432,58 +429,58 @@ const Ue = function(t) {
|
|
|
432
429
|
fallbackAxisSideDirection: m = "none",
|
|
433
430
|
flipAlignment: g = !0,
|
|
434
431
|
...y
|
|
435
|
-
} =
|
|
432
|
+
} = lt(t, e);
|
|
436
433
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
437
434
|
return {};
|
|
438
|
-
const p = N(r), w = B(c), x = N(c) === c, b = await (
|
|
439
|
-
!h &&
|
|
440
|
-
const
|
|
441
|
-
let
|
|
442
|
-
if (f && Z.push(
|
|
443
|
-
const F =
|
|
444
|
-
Z.push(
|
|
435
|
+
const p = N(r), w = B(c), x = N(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = h || (x || !g ? [rt(c)] : Fe(c)), $ = m !== "none";
|
|
436
|
+
!h && $ && v.push(...Ne(c, g, m, b));
|
|
437
|
+
const ue = [c, ...v], ht = await ne(e, y), Z = [];
|
|
438
|
+
let I = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
439
|
+
if (f && Z.push(ht[p]), u) {
|
|
440
|
+
const F = We(r, s, b);
|
|
441
|
+
Z.push(ht[F[0]], ht[F[1]]);
|
|
445
442
|
}
|
|
446
|
-
if (
|
|
443
|
+
if (I = [...I, {
|
|
447
444
|
placement: r,
|
|
448
445
|
overflows: Z
|
|
449
446
|
}], !Z.every((F) => F <= 0)) {
|
|
450
|
-
var
|
|
451
|
-
const F = (((
|
|
447
|
+
var Ot, Lt;
|
|
448
|
+
const F = (((Ot = i.flip) == null ? void 0 : Ot.index) || 0) + 1, Tt = ue[F];
|
|
452
449
|
if (Tt)
|
|
453
450
|
return {
|
|
454
451
|
data: {
|
|
455
452
|
index: F,
|
|
456
|
-
overflows:
|
|
453
|
+
overflows: I
|
|
457
454
|
},
|
|
458
455
|
reset: {
|
|
459
456
|
placement: Tt
|
|
460
457
|
}
|
|
461
458
|
};
|
|
462
|
-
let
|
|
463
|
-
if (!
|
|
459
|
+
let j = (Lt = I.filter((H) => H.overflows[0] <= 0).sort((H, k) => H.overflows[1] - k.overflows[1])[0]) == null ? void 0 : Lt.placement;
|
|
460
|
+
if (!j)
|
|
464
461
|
switch (d) {
|
|
465
462
|
case "bestFit": {
|
|
466
463
|
var St;
|
|
467
|
-
const H = (St =
|
|
468
|
-
if (
|
|
469
|
-
const C = B(
|
|
464
|
+
const H = (St = I.filter((k) => {
|
|
465
|
+
if ($) {
|
|
466
|
+
const C = B(k.placement);
|
|
470
467
|
return C === w || // Create a bias to the `y` side axis due to horizontal
|
|
471
468
|
// reading directions favoring greater width.
|
|
472
469
|
C === "y";
|
|
473
470
|
}
|
|
474
471
|
return !0;
|
|
475
|
-
}).map((
|
|
476
|
-
H && (
|
|
472
|
+
}).map((k) => [k.placement, k.overflows.filter((C) => C > 0).reduce((C, fe) => C + fe, 0)]).sort((k, C) => k[1] - C[1])[0]) == null ? void 0 : St[0];
|
|
473
|
+
H && (j = H);
|
|
477
474
|
break;
|
|
478
475
|
}
|
|
479
476
|
case "initialPlacement":
|
|
480
|
-
|
|
477
|
+
j = c;
|
|
481
478
|
break;
|
|
482
479
|
}
|
|
483
|
-
if (r !==
|
|
480
|
+
if (r !== j)
|
|
484
481
|
return {
|
|
485
482
|
reset: {
|
|
486
|
-
placement:
|
|
483
|
+
placement: j
|
|
487
484
|
}
|
|
488
485
|
};
|
|
489
486
|
}
|
|
@@ -491,12 +488,12 @@ const Ue = function(t) {
|
|
|
491
488
|
}
|
|
492
489
|
};
|
|
493
490
|
};
|
|
494
|
-
async function
|
|
491
|
+
async function Be(t, e) {
|
|
495
492
|
const {
|
|
496
493
|
placement: n,
|
|
497
494
|
platform: o,
|
|
498
495
|
elements: r
|
|
499
|
-
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = N(n), c =
|
|
496
|
+
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = N(n), c = at(n), l = B(n) === "y", a = ["left", "top"].includes(s) ? -1 : 1, f = i && l ? -1 : 1, u = lt(e, t);
|
|
500
497
|
let {
|
|
501
498
|
mainAxis: h,
|
|
502
499
|
crossAxis: d,
|
|
@@ -510,15 +507,15 @@ async function _e(t, e) {
|
|
|
510
507
|
crossAxis: u.crossAxis || 0,
|
|
511
508
|
alignmentAxis: u.alignmentAxis
|
|
512
509
|
};
|
|
513
|
-
return c && typeof m == "number" && (d = c === "end" ? m * -1 : m),
|
|
510
|
+
return c && typeof m == "number" && (d = c === "end" ? m * -1 : m), l ? {
|
|
514
511
|
x: d * f,
|
|
515
|
-
y: h *
|
|
512
|
+
y: h * a
|
|
516
513
|
} : {
|
|
517
|
-
x: h *
|
|
514
|
+
x: h * a,
|
|
518
515
|
y: d * f
|
|
519
516
|
};
|
|
520
517
|
}
|
|
521
|
-
const
|
|
518
|
+
const Ue = function(t) {
|
|
522
519
|
return t === void 0 && (t = 0), {
|
|
523
520
|
name: "offset",
|
|
524
521
|
options: t,
|
|
@@ -529,18 +526,18 @@ const Ie = function(t) {
|
|
|
529
526
|
y: i,
|
|
530
527
|
placement: s,
|
|
531
528
|
middlewareData: c
|
|
532
|
-
} = e,
|
|
529
|
+
} = e, l = await Be(e, t);
|
|
533
530
|
return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
534
|
-
x: r +
|
|
535
|
-
y: i +
|
|
531
|
+
x: r + l.x,
|
|
532
|
+
y: i + l.y,
|
|
536
533
|
data: {
|
|
537
|
-
...
|
|
534
|
+
...l,
|
|
538
535
|
placement: s
|
|
539
536
|
}
|
|
540
537
|
};
|
|
541
538
|
}
|
|
542
539
|
};
|
|
543
|
-
},
|
|
540
|
+
}, _e = function(t) {
|
|
544
541
|
return t === void 0 && (t = {}), {
|
|
545
542
|
name: "shift",
|
|
546
543
|
options: t,
|
|
@@ -564,19 +561,19 @@ const Ie = function(t) {
|
|
|
564
561
|
};
|
|
565
562
|
}
|
|
566
563
|
},
|
|
567
|
-
...
|
|
568
|
-
} =
|
|
564
|
+
...l
|
|
565
|
+
} = lt(t, e), a = {
|
|
569
566
|
x: n,
|
|
570
567
|
y: o
|
|
571
|
-
}, f = await
|
|
572
|
-
let d =
|
|
568
|
+
}, f = await ne(e, l), u = B(N(r)), h = Zt(u);
|
|
569
|
+
let d = a[h], m = a[u];
|
|
573
570
|
if (i) {
|
|
574
571
|
const y = h === "y" ? "top" : "left", p = h === "y" ? "bottom" : "right", w = d + f[y], x = d - f[p];
|
|
575
|
-
d =
|
|
572
|
+
d = Pt(w, d, x);
|
|
576
573
|
}
|
|
577
574
|
if (s) {
|
|
578
575
|
const y = u === "y" ? "top" : "left", p = u === "y" ? "bottom" : "right", w = m + f[y], x = m - f[p];
|
|
579
|
-
m =
|
|
576
|
+
m = Pt(w, m, x);
|
|
580
577
|
}
|
|
581
578
|
const g = c.fn({
|
|
582
579
|
...e,
|
|
@@ -597,11 +594,11 @@ const Ie = function(t) {
|
|
|
597
594
|
}
|
|
598
595
|
};
|
|
599
596
|
};
|
|
600
|
-
function
|
|
597
|
+
function ut() {
|
|
601
598
|
return typeof window < "u";
|
|
602
599
|
}
|
|
603
|
-
function
|
|
604
|
-
return
|
|
600
|
+
function _(t) {
|
|
601
|
+
return oe(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
605
602
|
}
|
|
606
603
|
function A(t) {
|
|
607
604
|
var e;
|
|
@@ -609,19 +606,19 @@ function A(t) {
|
|
|
609
606
|
}
|
|
610
607
|
function S(t) {
|
|
611
608
|
var e;
|
|
612
|
-
return (e = (
|
|
609
|
+
return (e = (oe(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
613
610
|
}
|
|
614
|
-
function
|
|
615
|
-
return
|
|
611
|
+
function oe(t) {
|
|
612
|
+
return ut() ? t instanceof Node || t instanceof A(t).Node : !1;
|
|
616
613
|
}
|
|
617
614
|
function R(t) {
|
|
618
|
-
return
|
|
615
|
+
return ut() ? t instanceof Element || t instanceof A(t).Element : !1;
|
|
619
616
|
}
|
|
620
617
|
function L(t) {
|
|
621
|
-
return
|
|
618
|
+
return ut() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
|
|
622
619
|
}
|
|
623
|
-
function
|
|
624
|
-
return !
|
|
620
|
+
function Wt(t) {
|
|
621
|
+
return !ut() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
|
|
625
622
|
}
|
|
626
623
|
function Q(t) {
|
|
627
624
|
const {
|
|
@@ -632,10 +629,10 @@ function Q(t) {
|
|
|
632
629
|
} = E(t);
|
|
633
630
|
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(r);
|
|
634
631
|
}
|
|
635
|
-
function
|
|
636
|
-
return ["table", "td", "th"].includes(
|
|
632
|
+
function Ie(t) {
|
|
633
|
+
return ["table", "td", "th"].includes(_(t));
|
|
637
634
|
}
|
|
638
|
-
function
|
|
635
|
+
function ft(t) {
|
|
639
636
|
return [":popover-open", ":modal"].some((e) => {
|
|
640
637
|
try {
|
|
641
638
|
return t.matches(e);
|
|
@@ -644,31 +641,31 @@ function dt(t) {
|
|
|
644
641
|
}
|
|
645
642
|
});
|
|
646
643
|
}
|
|
647
|
-
function
|
|
648
|
-
const e =
|
|
644
|
+
function bt(t) {
|
|
645
|
+
const e = At(), n = R(t) ? E(t) : t;
|
|
649
646
|
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));
|
|
650
647
|
}
|
|
651
|
-
function
|
|
648
|
+
function je(t) {
|
|
652
649
|
let e = D(t);
|
|
653
650
|
for (; L(e) && !U(e); ) {
|
|
654
|
-
if (
|
|
651
|
+
if (bt(e))
|
|
655
652
|
return e;
|
|
656
|
-
if (
|
|
653
|
+
if (ft(e))
|
|
657
654
|
return null;
|
|
658
655
|
e = D(e);
|
|
659
656
|
}
|
|
660
657
|
return null;
|
|
661
658
|
}
|
|
662
|
-
function
|
|
659
|
+
function At() {
|
|
663
660
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
664
661
|
}
|
|
665
662
|
function U(t) {
|
|
666
|
-
return ["html", "body", "#document"].includes(
|
|
663
|
+
return ["html", "body", "#document"].includes(_(t));
|
|
667
664
|
}
|
|
668
665
|
function E(t) {
|
|
669
666
|
return A(t).getComputedStyle(t);
|
|
670
667
|
}
|
|
671
|
-
function
|
|
668
|
+
function dt(t) {
|
|
672
669
|
return R(t) ? {
|
|
673
670
|
scrollLeft: t.scrollLeft,
|
|
674
671
|
scrollTop: t.scrollTop
|
|
@@ -678,143 +675,143 @@ function ht(t) {
|
|
|
678
675
|
};
|
|
679
676
|
}
|
|
680
677
|
function D(t) {
|
|
681
|
-
if (
|
|
678
|
+
if (_(t) === "html")
|
|
682
679
|
return t;
|
|
683
680
|
const e = (
|
|
684
681
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
685
682
|
t.assignedSlot || // DOM Element detected.
|
|
686
683
|
t.parentNode || // ShadowRoot detected.
|
|
687
|
-
|
|
684
|
+
Wt(t) && t.host || // Fallback.
|
|
688
685
|
S(t)
|
|
689
686
|
);
|
|
690
|
-
return
|
|
687
|
+
return Wt(e) ? e.host : e;
|
|
691
688
|
}
|
|
692
|
-
function
|
|
689
|
+
function re(t) {
|
|
693
690
|
const e = D(t);
|
|
694
|
-
return U(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : L(e) && Q(e) ? e :
|
|
691
|
+
return U(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : L(e) && Q(e) ? e : re(e);
|
|
695
692
|
}
|
|
696
|
-
function
|
|
693
|
+
function q(t, e, n) {
|
|
697
694
|
var o;
|
|
698
695
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
699
|
-
const r =
|
|
696
|
+
const r = re(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(r);
|
|
700
697
|
if (i) {
|
|
701
698
|
const c = yt(s);
|
|
702
|
-
return e.concat(s, s.visualViewport || [], Q(r) ? r : [], c && n ?
|
|
699
|
+
return e.concat(s, s.visualViewport || [], Q(r) ? r : [], c && n ? q(c) : []);
|
|
703
700
|
}
|
|
704
|
-
return e.concat(r,
|
|
701
|
+
return e.concat(r, q(r, [], n));
|
|
705
702
|
}
|
|
706
703
|
function yt(t) {
|
|
707
704
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
708
705
|
}
|
|
709
|
-
function
|
|
706
|
+
function ie(t) {
|
|
710
707
|
const e = E(t);
|
|
711
708
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
712
|
-
const r = L(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c =
|
|
709
|
+
const r = L(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = ot(n) !== i || ot(o) !== s;
|
|
713
710
|
return c && (n = i, o = s), {
|
|
714
711
|
width: n,
|
|
715
712
|
height: o,
|
|
716
713
|
$: c
|
|
717
714
|
};
|
|
718
715
|
}
|
|
719
|
-
function
|
|
716
|
+
function Rt(t) {
|
|
720
717
|
return R(t) ? t : t.contextElement;
|
|
721
718
|
}
|
|
722
719
|
function z(t) {
|
|
723
|
-
const e =
|
|
720
|
+
const e = Rt(t);
|
|
724
721
|
if (!L(e))
|
|
725
722
|
return O(1);
|
|
726
723
|
const n = e.getBoundingClientRect(), {
|
|
727
724
|
width: o,
|
|
728
725
|
height: r,
|
|
729
726
|
$: i
|
|
730
|
-
} =
|
|
731
|
-
let s = (i ?
|
|
727
|
+
} = ie(e);
|
|
728
|
+
let s = (i ? ot(n.width) : n.width) / o, c = (i ? ot(n.height) : n.height) / r;
|
|
732
729
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
733
730
|
x: s,
|
|
734
731
|
y: c
|
|
735
732
|
};
|
|
736
733
|
}
|
|
737
|
-
const
|
|
738
|
-
function
|
|
734
|
+
const Ye = /* @__PURE__ */ O(0);
|
|
735
|
+
function se(t) {
|
|
739
736
|
const e = A(t);
|
|
740
|
-
return !
|
|
737
|
+
return !At() || !e.visualViewport ? Ye : {
|
|
741
738
|
x: e.visualViewport.offsetLeft,
|
|
742
739
|
y: e.visualViewport.offsetTop
|
|
743
740
|
};
|
|
744
741
|
}
|
|
745
|
-
function
|
|
742
|
+
function qe(t, e, n) {
|
|
746
743
|
return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
|
|
747
744
|
}
|
|
748
|
-
function
|
|
745
|
+
function V(t, e, n, o) {
|
|
749
746
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
750
|
-
const r = t.getBoundingClientRect(), i =
|
|
747
|
+
const r = t.getBoundingClientRect(), i = Rt(t);
|
|
751
748
|
let s = O(1);
|
|
752
749
|
e && (o ? R(o) && (s = z(o)) : s = z(t));
|
|
753
|
-
const c =
|
|
754
|
-
let
|
|
750
|
+
const c = qe(i, n, o) ? se(i) : O(0);
|
|
751
|
+
let l = (r.left + c.x) / s.x, a = (r.top + c.y) / s.y, f = r.width / s.x, u = r.height / s.y;
|
|
755
752
|
if (i) {
|
|
756
753
|
const h = A(i), d = o && R(o) ? A(o) : o;
|
|
757
754
|
let m = h, g = yt(m);
|
|
758
755
|
for (; g && o && d !== m; ) {
|
|
759
756
|
const y = z(g), p = g.getBoundingClientRect(), w = E(g), x = p.left + (g.clientLeft + parseFloat(w.paddingLeft)) * y.x, b = p.top + (g.clientTop + parseFloat(w.paddingTop)) * y.y;
|
|
760
|
-
|
|
757
|
+
l *= y.x, a *= y.y, f *= y.x, u *= y.y, l += x, a += b, m = A(g), g = yt(m);
|
|
761
758
|
}
|
|
762
759
|
}
|
|
763
|
-
return
|
|
760
|
+
return it({
|
|
764
761
|
width: f,
|
|
765
762
|
height: u,
|
|
766
|
-
x:
|
|
767
|
-
y:
|
|
763
|
+
x: l,
|
|
764
|
+
y: a
|
|
768
765
|
});
|
|
769
766
|
}
|
|
770
|
-
function
|
|
771
|
-
const n =
|
|
772
|
-
return e ? e.left + n :
|
|
767
|
+
function Et(t, e) {
|
|
768
|
+
const n = dt(t).scrollLeft;
|
|
769
|
+
return e ? e.left + n : V(S(t)).left + n;
|
|
773
770
|
}
|
|
774
|
-
function
|
|
771
|
+
function ce(t, e, n) {
|
|
775
772
|
n === void 0 && (n = !1);
|
|
776
773
|
const o = t.getBoundingClientRect(), r = o.left + e.scrollLeft - (n ? 0 : (
|
|
777
774
|
// RTL <body> scrollbar.
|
|
778
|
-
|
|
775
|
+
Et(t, o)
|
|
779
776
|
)), i = o.top + e.scrollTop;
|
|
780
777
|
return {
|
|
781
778
|
x: r,
|
|
782
779
|
y: i
|
|
783
780
|
};
|
|
784
781
|
}
|
|
785
|
-
function
|
|
782
|
+
function Ke(t) {
|
|
786
783
|
let {
|
|
787
784
|
elements: e,
|
|
788
785
|
rect: n,
|
|
789
786
|
offsetParent: o,
|
|
790
787
|
strategy: r
|
|
791
788
|
} = t;
|
|
792
|
-
const i = r === "fixed", s = S(o), c = e ?
|
|
789
|
+
const i = r === "fixed", s = S(o), c = e ? ft(e.floating) : !1;
|
|
793
790
|
if (o === s || c && i)
|
|
794
791
|
return n;
|
|
795
|
-
let
|
|
792
|
+
let l = {
|
|
796
793
|
scrollLeft: 0,
|
|
797
794
|
scrollTop: 0
|
|
798
|
-
},
|
|
795
|
+
}, a = O(1);
|
|
799
796
|
const f = O(0), u = L(o);
|
|
800
|
-
if ((u || !u && !i) && ((
|
|
801
|
-
const d =
|
|
802
|
-
|
|
797
|
+
if ((u || !u && !i) && ((_(o) !== "body" || Q(s)) && (l = dt(o)), L(o))) {
|
|
798
|
+
const d = V(o);
|
|
799
|
+
a = z(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
|
|
803
800
|
}
|
|
804
|
-
const h = s && !u && !i ?
|
|
801
|
+
const h = s && !u && !i ? ce(s, l, !0) : O(0);
|
|
805
802
|
return {
|
|
806
|
-
width: n.width *
|
|
807
|
-
height: n.height *
|
|
808
|
-
x: n.x *
|
|
809
|
-
y: n.y *
|
|
803
|
+
width: n.width * a.x,
|
|
804
|
+
height: n.height * a.y,
|
|
805
|
+
x: n.x * a.x - l.scrollLeft * a.x + f.x + h.x,
|
|
806
|
+
y: n.y * a.y - l.scrollTop * a.y + f.y + h.y
|
|
810
807
|
};
|
|
811
808
|
}
|
|
812
|
-
function
|
|
809
|
+
function Xe(t) {
|
|
813
810
|
return Array.from(t.getClientRects());
|
|
814
811
|
}
|
|
815
|
-
function
|
|
816
|
-
const e = S(t), n =
|
|
817
|
-
let s = -n.scrollLeft +
|
|
812
|
+
function Je(t) {
|
|
813
|
+
const e = S(t), n = dt(t), o = t.ownerDocument.body, r = M(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = M(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
814
|
+
let s = -n.scrollLeft + Et(t);
|
|
818
815
|
const c = -n.scrollTop;
|
|
819
816
|
return E(o).direction === "rtl" && (s += M(e.clientWidth, o.clientWidth) - r), {
|
|
820
817
|
width: r,
|
|
@@ -823,40 +820,40 @@ function Qe(t) {
|
|
|
823
820
|
y: c
|
|
824
821
|
};
|
|
825
822
|
}
|
|
826
|
-
function
|
|
823
|
+
function Ge(t, e) {
|
|
827
824
|
const n = A(t), o = S(t), r = n.visualViewport;
|
|
828
|
-
let i = o.clientWidth, s = o.clientHeight, c = 0,
|
|
825
|
+
let i = o.clientWidth, s = o.clientHeight, c = 0, l = 0;
|
|
829
826
|
if (r) {
|
|
830
827
|
i = r.width, s = r.height;
|
|
831
|
-
const
|
|
832
|
-
(!
|
|
828
|
+
const a = At();
|
|
829
|
+
(!a || a && e === "fixed") && (c = r.offsetLeft, l = r.offsetTop);
|
|
833
830
|
}
|
|
834
831
|
return {
|
|
835
832
|
width: i,
|
|
836
833
|
height: s,
|
|
837
834
|
x: c,
|
|
838
|
-
y:
|
|
835
|
+
y: l
|
|
839
836
|
};
|
|
840
837
|
}
|
|
841
|
-
function
|
|
842
|
-
const n =
|
|
838
|
+
function Qe(t, e) {
|
|
839
|
+
const n = V(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = L(t) ? z(t) : O(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, l = r * i.x, a = o * i.y;
|
|
843
840
|
return {
|
|
844
841
|
width: s,
|
|
845
842
|
height: c,
|
|
846
|
-
x:
|
|
847
|
-
y:
|
|
843
|
+
x: l,
|
|
844
|
+
y: a
|
|
848
845
|
};
|
|
849
846
|
}
|
|
850
|
-
function
|
|
847
|
+
function Ft(t, e, n) {
|
|
851
848
|
let o;
|
|
852
849
|
if (e === "viewport")
|
|
853
|
-
o =
|
|
850
|
+
o = Ge(t, n);
|
|
854
851
|
else if (e === "document")
|
|
855
|
-
o =
|
|
852
|
+
o = Je(S(t));
|
|
856
853
|
else if (R(e))
|
|
857
|
-
o =
|
|
854
|
+
o = Qe(e, n);
|
|
858
855
|
else {
|
|
859
|
-
const r =
|
|
856
|
+
const r = se(t);
|
|
860
857
|
o = {
|
|
861
858
|
x: e.x - r.x,
|
|
862
859
|
y: e.y - r.y,
|
|
@@ -864,66 +861,66 @@ function Mt(t, e, n) {
|
|
|
864
861
|
height: e.height
|
|
865
862
|
};
|
|
866
863
|
}
|
|
867
|
-
return
|
|
864
|
+
return it(o);
|
|
868
865
|
}
|
|
869
|
-
function
|
|
866
|
+
function le(t, e) {
|
|
870
867
|
const n = D(t);
|
|
871
|
-
return n === e || !R(n) || U(n) ? !1 : E(n).position === "fixed" ||
|
|
868
|
+
return n === e || !R(n) || U(n) ? !1 : E(n).position === "fixed" || le(n, e);
|
|
872
869
|
}
|
|
873
|
-
function
|
|
870
|
+
function Ze(t, e) {
|
|
874
871
|
const n = e.get(t);
|
|
875
872
|
if (n)
|
|
876
873
|
return n;
|
|
877
|
-
let o =
|
|
874
|
+
let o = q(t, [], !1).filter((c) => R(c) && _(c) !== "body"), r = null;
|
|
878
875
|
const i = E(t).position === "fixed";
|
|
879
876
|
let s = i ? D(t) : t;
|
|
880
877
|
for (; R(s) && !U(s); ) {
|
|
881
|
-
const c = E(s),
|
|
882
|
-
!
|
|
878
|
+
const c = E(s), l = bt(s);
|
|
879
|
+
!l && c.position === "fixed" && (r = null), (i ? !l && !r : !l && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || Q(s) && !l && le(t, s)) ? o = o.filter((f) => f !== s) : r = c, s = D(s);
|
|
883
880
|
}
|
|
884
881
|
return e.set(t, o), o;
|
|
885
882
|
}
|
|
886
|
-
function
|
|
883
|
+
function tn(t) {
|
|
887
884
|
let {
|
|
888
885
|
element: e,
|
|
889
886
|
boundary: n,
|
|
890
887
|
rootBoundary: o,
|
|
891
888
|
strategy: r
|
|
892
889
|
} = t;
|
|
893
|
-
const s = [...n === "clippingAncestors" ?
|
|
894
|
-
const u =
|
|
895
|
-
return
|
|
896
|
-
},
|
|
890
|
+
const s = [...n === "clippingAncestors" ? ft(e) ? [] : Ze(e, this._c) : [].concat(n), o], c = s[0], l = s.reduce((a, f) => {
|
|
891
|
+
const u = Ft(e, f, r);
|
|
892
|
+
return a.top = M(u.top, a.top), a.right = nt(u.right, a.right), a.bottom = nt(u.bottom, a.bottom), a.left = M(u.left, a.left), a;
|
|
893
|
+
}, Ft(e, c, r));
|
|
897
894
|
return {
|
|
898
|
-
width:
|
|
899
|
-
height:
|
|
900
|
-
x:
|
|
901
|
-
y:
|
|
895
|
+
width: l.right - l.left,
|
|
896
|
+
height: l.bottom - l.top,
|
|
897
|
+
x: l.left,
|
|
898
|
+
y: l.top
|
|
902
899
|
};
|
|
903
900
|
}
|
|
904
|
-
function
|
|
901
|
+
function en(t) {
|
|
905
902
|
const {
|
|
906
903
|
width: e,
|
|
907
904
|
height: n
|
|
908
|
-
} =
|
|
905
|
+
} = ie(t);
|
|
909
906
|
return {
|
|
910
907
|
width: e,
|
|
911
908
|
height: n
|
|
912
909
|
};
|
|
913
910
|
}
|
|
914
|
-
function
|
|
915
|
-
const o = L(e), r = S(e), i = n === "fixed", s =
|
|
911
|
+
function nn(t, e, n) {
|
|
912
|
+
const o = L(e), r = S(e), i = n === "fixed", s = V(t, !0, i, e);
|
|
916
913
|
let c = {
|
|
917
914
|
scrollLeft: 0,
|
|
918
915
|
scrollTop: 0
|
|
919
916
|
};
|
|
920
|
-
const
|
|
917
|
+
const l = O(0);
|
|
921
918
|
if (o || !o && !i)
|
|
922
|
-
if ((
|
|
923
|
-
const h =
|
|
924
|
-
|
|
925
|
-
} else r && (
|
|
926
|
-
const
|
|
919
|
+
if ((_(e) !== "body" || Q(r)) && (c = dt(e)), o) {
|
|
920
|
+
const h = V(e, !0, i, e);
|
|
921
|
+
l.x = h.x + e.clientLeft, l.y = h.y + e.clientTop;
|
|
922
|
+
} else r && (l.x = Et(r));
|
|
923
|
+
const a = r && !o && !i ? ce(r, c) : O(0), f = s.left + c.scrollLeft - l.x - a.x, u = s.top + c.scrollTop - l.y - a.y;
|
|
927
924
|
return {
|
|
928
925
|
x: f,
|
|
929
926
|
y: u,
|
|
@@ -931,10 +928,10 @@ function rn(t, e, n) {
|
|
|
931
928
|
height: s.height
|
|
932
929
|
};
|
|
933
930
|
}
|
|
934
|
-
function
|
|
931
|
+
function mt(t) {
|
|
935
932
|
return E(t).position === "static";
|
|
936
933
|
}
|
|
937
|
-
function
|
|
934
|
+
function Mt(t, e) {
|
|
938
935
|
if (!L(t) || E(t).position === "fixed")
|
|
939
936
|
return null;
|
|
940
937
|
if (e)
|
|
@@ -942,28 +939,28 @@ function Nt(t, e) {
|
|
|
942
939
|
let n = t.offsetParent;
|
|
943
940
|
return S(t) === n && (n = n.ownerDocument.body), n;
|
|
944
941
|
}
|
|
945
|
-
function
|
|
942
|
+
function ae(t, e) {
|
|
946
943
|
const n = A(t);
|
|
947
|
-
if (
|
|
944
|
+
if (ft(t))
|
|
948
945
|
return n;
|
|
949
946
|
if (!L(t)) {
|
|
950
947
|
let r = D(t);
|
|
951
948
|
for (; r && !U(r); ) {
|
|
952
|
-
if (R(r) && !
|
|
949
|
+
if (R(r) && !mt(r))
|
|
953
950
|
return r;
|
|
954
951
|
r = D(r);
|
|
955
952
|
}
|
|
956
953
|
return n;
|
|
957
954
|
}
|
|
958
|
-
let o =
|
|
959
|
-
for (; o &&
|
|
960
|
-
o =
|
|
961
|
-
return o && U(o) &&
|
|
955
|
+
let o = Mt(t, e);
|
|
956
|
+
for (; o && Ie(o) && mt(o); )
|
|
957
|
+
o = Mt(o, e);
|
|
958
|
+
return o && U(o) && mt(o) && !bt(o) ? n : o || je(t) || n;
|
|
962
959
|
}
|
|
963
|
-
const
|
|
964
|
-
const e = this.getOffsetParent ||
|
|
960
|
+
const on = async function(t) {
|
|
961
|
+
const e = this.getOffsetParent || ae, n = this.getDimensions, o = await n(t.floating);
|
|
965
962
|
return {
|
|
966
|
-
reference:
|
|
963
|
+
reference: nn(t.reference, await e(t.floating), t.strategy),
|
|
967
964
|
floating: {
|
|
968
965
|
x: 0,
|
|
969
966
|
y: 0,
|
|
@@ -972,49 +969,49 @@ const sn = async function(t) {
|
|
|
972
969
|
}
|
|
973
970
|
};
|
|
974
971
|
};
|
|
975
|
-
function
|
|
972
|
+
function rn(t) {
|
|
976
973
|
return E(t).direction === "rtl";
|
|
977
974
|
}
|
|
978
|
-
const
|
|
979
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
975
|
+
const sn = {
|
|
976
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ke,
|
|
980
977
|
getDocumentElement: S,
|
|
981
|
-
getClippingRect:
|
|
982
|
-
getOffsetParent:
|
|
983
|
-
getElementRects:
|
|
984
|
-
getClientRects:
|
|
985
|
-
getDimensions:
|
|
978
|
+
getClippingRect: tn,
|
|
979
|
+
getOffsetParent: ae,
|
|
980
|
+
getElementRects: on,
|
|
981
|
+
getClientRects: Xe,
|
|
982
|
+
getDimensions: en,
|
|
986
983
|
getScale: z,
|
|
987
984
|
isElement: R,
|
|
988
|
-
isRTL:
|
|
985
|
+
isRTL: rn
|
|
989
986
|
};
|
|
990
|
-
function
|
|
987
|
+
function cn(t, e) {
|
|
991
988
|
let n = null, o;
|
|
992
989
|
const r = S(t);
|
|
993
990
|
function i() {
|
|
994
991
|
var c;
|
|
995
992
|
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
996
993
|
}
|
|
997
|
-
function s(c,
|
|
998
|
-
c === void 0 && (c = !1),
|
|
994
|
+
function s(c, l) {
|
|
995
|
+
c === void 0 && (c = !1), l === void 0 && (l = 1), i();
|
|
999
996
|
const {
|
|
1000
|
-
left:
|
|
997
|
+
left: a,
|
|
1001
998
|
top: f,
|
|
1002
999
|
width: u,
|
|
1003
1000
|
height: h
|
|
1004
1001
|
} = t.getBoundingClientRect();
|
|
1005
1002
|
if (c || e(), !u || !h)
|
|
1006
1003
|
return;
|
|
1007
|
-
const d = tt(f), m = tt(r.clientWidth - (
|
|
1004
|
+
const d = tt(f), m = tt(r.clientWidth - (a + u)), g = tt(r.clientHeight - (f + h)), y = tt(a), w = {
|
|
1008
1005
|
rootMargin: -d + "px " + -m + "px " + -g + "px " + -y + "px",
|
|
1009
|
-
threshold: M(0,
|
|
1006
|
+
threshold: M(0, nt(1, l)) || 1
|
|
1010
1007
|
};
|
|
1011
1008
|
let x = !0;
|
|
1012
1009
|
function b(v) {
|
|
1013
|
-
const
|
|
1014
|
-
if (
|
|
1010
|
+
const $ = v[0].intersectionRatio;
|
|
1011
|
+
if ($ !== l) {
|
|
1015
1012
|
if (!x)
|
|
1016
1013
|
return s();
|
|
1017
|
-
|
|
1014
|
+
$ ? s(!1, $) : o = setTimeout(() => {
|
|
1018
1015
|
s(!1, 1e-7);
|
|
1019
1016
|
}, 1e3);
|
|
1020
1017
|
}
|
|
@@ -1033,55 +1030,55 @@ function an(t, e) {
|
|
|
1033
1030
|
}
|
|
1034
1031
|
return s(!0), i;
|
|
1035
1032
|
}
|
|
1036
|
-
function
|
|
1033
|
+
function ln(t, e, n, o) {
|
|
1037
1034
|
o === void 0 && (o = {});
|
|
1038
1035
|
const {
|
|
1039
1036
|
ancestorScroll: r = !0,
|
|
1040
1037
|
ancestorResize: i = !0,
|
|
1041
1038
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1042
1039
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1043
|
-
animationFrame:
|
|
1044
|
-
} = o,
|
|
1040
|
+
animationFrame: l = !1
|
|
1041
|
+
} = o, a = Rt(t), f = r || i ? [...a ? q(a) : [], ...q(e)] : [];
|
|
1045
1042
|
f.forEach((p) => {
|
|
1046
1043
|
r && p.addEventListener("scroll", n, {
|
|
1047
1044
|
passive: !0
|
|
1048
1045
|
}), i && p.addEventListener("resize", n);
|
|
1049
1046
|
});
|
|
1050
|
-
const u =
|
|
1047
|
+
const u = a && c ? cn(a, n) : null;
|
|
1051
1048
|
let h = -1, d = null;
|
|
1052
1049
|
s && (d = new ResizeObserver((p) => {
|
|
1053
1050
|
let [w] = p;
|
|
1054
|
-
w && w.target ===
|
|
1051
|
+
w && w.target === a && d && (d.unobserve(e), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
1055
1052
|
var x;
|
|
1056
1053
|
(x = d) == null || x.observe(e);
|
|
1057
1054
|
})), n();
|
|
1058
|
-
}),
|
|
1059
|
-
let m, g =
|
|
1060
|
-
|
|
1055
|
+
}), a && !l && d.observe(a), d.observe(e));
|
|
1056
|
+
let m, g = l ? V(t) : null;
|
|
1057
|
+
l && y();
|
|
1061
1058
|
function y() {
|
|
1062
|
-
const p =
|
|
1059
|
+
const p = V(t);
|
|
1063
1060
|
g && (p.x !== g.x || p.y !== g.y || p.width !== g.width || p.height !== g.height) && n(), g = p, m = requestAnimationFrame(y);
|
|
1064
1061
|
}
|
|
1065
1062
|
return n(), () => {
|
|
1066
1063
|
var p;
|
|
1067
1064
|
f.forEach((w) => {
|
|
1068
1065
|
r && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
|
|
1069
|
-
}), u == null || u(), (p = d) == null || p.disconnect(), d = null,
|
|
1066
|
+
}), u == null || u(), (p = d) == null || p.disconnect(), d = null, l && cancelAnimationFrame(m);
|
|
1070
1067
|
};
|
|
1071
1068
|
}
|
|
1072
|
-
const
|
|
1069
|
+
const an = Ue, un = _e, Nt = ze, fn = (t, e, n) => {
|
|
1073
1070
|
const o = /* @__PURE__ */ new Map(), r = {
|
|
1074
|
-
platform:
|
|
1071
|
+
platform: sn,
|
|
1075
1072
|
...n
|
|
1076
1073
|
}, i = {
|
|
1077
1074
|
...r.platform,
|
|
1078
1075
|
_c: o
|
|
1079
1076
|
};
|
|
1080
|
-
return
|
|
1077
|
+
return He(t, e, {
|
|
1081
1078
|
...r,
|
|
1082
1079
|
platform: i
|
|
1083
1080
|
});
|
|
1084
|
-
},
|
|
1081
|
+
}, $n = ({
|
|
1085
1082
|
content: t,
|
|
1086
1083
|
open: e,
|
|
1087
1084
|
placement: n,
|
|
@@ -1092,22 +1089,22 @@ const fn = Ie, dn = je, $t = Ue, hn = (t, e, n) => {
|
|
|
1092
1089
|
s,
|
|
1093
1090
|
() => qt(
|
|
1094
1091
|
"body",
|
|
1095
|
-
|
|
1096
|
-
G((
|
|
1097
|
-
const
|
|
1098
|
-
return
|
|
1099
|
-
|
|
1100
|
-
const { x: f, y: u } = await
|
|
1092
|
+
_t.div(
|
|
1093
|
+
G((l) => {
|
|
1094
|
+
const a = l;
|
|
1095
|
+
return a.style.position = "absolute", T(
|
|
1096
|
+
ln(c, a, async () => {
|
|
1097
|
+
const { x: f, y: u } = await fn(c, a, {
|
|
1101
1098
|
placement: n,
|
|
1102
1099
|
strategy: "absolute",
|
|
1103
1100
|
middleware: [
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1101
|
+
Nt(),
|
|
1102
|
+
an({ mainAxis: o, crossAxis: r }),
|
|
1103
|
+
un(),
|
|
1104
|
+
Nt()
|
|
1108
1105
|
]
|
|
1109
1106
|
});
|
|
1110
|
-
|
|
1107
|
+
a.style.top = `${u}px`, a.style.left = `${f}px`;
|
|
1111
1108
|
})
|
|
1112
1109
|
);
|
|
1113
1110
|
}),
|
|
@@ -1115,88 +1112,81 @@ const fn = Ie, dn = je, $t = Ue, hn = (t, e, n) => {
|
|
|
1115
1112
|
)
|
|
1116
1113
|
)
|
|
1117
1114
|
);
|
|
1118
|
-
}),
|
|
1119
|
-
request: t,
|
|
1120
|
-
load: e,
|
|
1121
|
-
convertError: n
|
|
1122
|
-
}) => {
|
|
1115
|
+
}), dn = (t, e, n) => {
|
|
1123
1116
|
const o = W(P.notAsked), r = o.map(
|
|
1124
1117
|
(u) => P.isSuccess(u) ? u.value : void 0
|
|
1125
1118
|
), i = o.map(
|
|
1126
1119
|
(u) => P.isFailure(u) ? u.error : void 0
|
|
1127
1120
|
), s = o.map((u) => P.isLoading(u));
|
|
1128
1121
|
let c;
|
|
1129
|
-
const
|
|
1122
|
+
const l = async (u) => {
|
|
1130
1123
|
c == null || c.abort(), c = new AbortController();
|
|
1131
1124
|
const h = c.signal, d = o.get();
|
|
1132
1125
|
o.set(P.loading(P.getOrUndefined(d)));
|
|
1133
1126
|
try {
|
|
1134
1127
|
const m = await e({ request: u, abortSignal: h, previous: d });
|
|
1135
|
-
c = void 0, o.set(P.success(m));
|
|
1128
|
+
await Promise.resolve(), c = void 0, o.set(P.success(m));
|
|
1136
1129
|
} catch (m) {
|
|
1137
1130
|
c = void 0, o.set(P.failure(n(m)));
|
|
1138
1131
|
}
|
|
1139
|
-
},
|
|
1132
|
+
}, a = () => l(t.get()), f = () => {
|
|
1140
1133
|
c == null || c.abort(), c = void 0, o.dispose();
|
|
1141
1134
|
};
|
|
1142
|
-
return o.onDispose(t.on(
|
|
1135
|
+
return o.onDispose(t.on(l)), {
|
|
1143
1136
|
status: o,
|
|
1144
1137
|
value: r,
|
|
1145
1138
|
error: i,
|
|
1146
1139
|
loading: s,
|
|
1147
|
-
reload:
|
|
1140
|
+
reload: a,
|
|
1148
1141
|
dispose: f
|
|
1149
1142
|
};
|
|
1150
|
-
},
|
|
1151
|
-
const { status: n, dispose: o, reload: r } = t, {
|
|
1152
|
-
return
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1159
|
-
(f) => a(f, r),
|
|
1160
|
-
// TODO unsure why this is needed
|
|
1161
|
-
() => nt
|
|
1162
|
-
),
|
|
1163
|
-
AsyncFailure: (l) => c != null ? c(l.$.error, r) : void 0,
|
|
1164
|
-
AsyncSuccess: (l) => a(l.$.value, r)
|
|
1143
|
+
}, hn = (t, e) => {
|
|
1144
|
+
const { status: n, dispose: o, reload: r } = t, { loading: i, failure: s, success: c } = e;
|
|
1145
|
+
return X(
|
|
1146
|
+
T(o),
|
|
1147
|
+
Qt(n, {
|
|
1148
|
+
loading: i != null ? (l) => i(l, r) : void 0,
|
|
1149
|
+
failure: s != null ? (l) => s(l, r) : void 0,
|
|
1150
|
+
success: (l) => c(l, r)
|
|
1165
1151
|
})
|
|
1166
1152
|
);
|
|
1167
|
-
},
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1153
|
+
}, Hn = ({
|
|
1154
|
+
request: t,
|
|
1155
|
+
load: e,
|
|
1156
|
+
mapError: n = (o) => o
|
|
1157
|
+
}) => {
|
|
1158
|
+
const o = dn(t, e, n);
|
|
1159
|
+
return (r) => hn(o, r);
|
|
1160
|
+
}, mn = (t, e) => {
|
|
1171
1161
|
if (typeof e == "function")
|
|
1172
|
-
return
|
|
1173
|
-
const n = e.failure ?? ((r) =>
|
|
1174
|
-
|
|
1162
|
+
return mn(t, { success: e });
|
|
1163
|
+
const n = e.failure ?? ((r) => X(
|
|
1164
|
+
T(r.on(console.error)),
|
|
1175
1165
|
r.map((i) => `Error: ${i}`)
|
|
1176
1166
|
)), o = e.success;
|
|
1177
|
-
return
|
|
1167
|
+
return Yt(J.toSignal(t), {
|
|
1178
1168
|
Success: (r) => o(r.$.value),
|
|
1179
1169
|
Failure: (r) => n(r.$.error)
|
|
1180
1170
|
});
|
|
1181
|
-
},
|
|
1171
|
+
}, zn = () => It.focus((t) => {
|
|
1182
1172
|
var e;
|
|
1183
1173
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1184
|
-
}),
|
|
1174
|
+
}), Bn = (t) => xt((e) => {
|
|
1185
1175
|
const { element: n } = e, o = W({
|
|
1186
1176
|
width: n.clientWidth,
|
|
1187
1177
|
height: n.clientHeight
|
|
1188
|
-
}), r =
|
|
1178
|
+
}), r = ct(t(o))(e), i = () => {
|
|
1189
1179
|
o.set({ width: n.clientWidth, height: n.clientHeight });
|
|
1190
1180
|
};
|
|
1191
1181
|
let s;
|
|
1192
|
-
return typeof ResizeObserver == "function" && (s = new ResizeObserver(i), s.observe(n)),
|
|
1182
|
+
return typeof ResizeObserver == "function" && (s = new ResizeObserver(i), s.observe(n)), T((c) => {
|
|
1193
1183
|
s == null || s.disconnect(), r(c);
|
|
1194
1184
|
});
|
|
1195
|
-
}),
|
|
1185
|
+
}), Un = (t) => (e) => {
|
|
1196
1186
|
const n = vt(), o = W({
|
|
1197
1187
|
width: (n == null ? void 0 : n.innerWidth) ?? 0,
|
|
1198
1188
|
height: (n == null ? void 0 : n.innerHeight) ?? 0
|
|
1199
|
-
}), r =
|
|
1189
|
+
}), r = ct(t(o))(e), i = () => {
|
|
1200
1190
|
o.set({
|
|
1201
1191
|
width: (n == null ? void 0 : n.innerWidth) ?? 0,
|
|
1202
1192
|
height: (n == null ? void 0 : n.innerHeight) ?? 0
|
|
@@ -1205,7 +1195,7 @@ const fn = Ie, dn = je, $t = Ue, hn = (t, e, n) => {
|
|
|
1205
1195
|
return n == null || n.addEventListener("resize", i), (s) => {
|
|
1206
1196
|
n == null || n.removeEventListener("resize", i), r(s);
|
|
1207
1197
|
};
|
|
1208
|
-
},
|
|
1198
|
+
}, pn = (t, e) => {
|
|
1209
1199
|
const n = e.split("/").filter((r) => r !== ""), o = {};
|
|
1210
1200
|
for (let r = 0; r < t.length; r++) {
|
|
1211
1201
|
const i = t[r], s = n[r];
|
|
@@ -1220,21 +1210,21 @@ const fn = Ie, dn = je, $t = Ue, hn = (t, e, n) => {
|
|
|
1220
1210
|
return { params: o, path: e };
|
|
1221
1211
|
}
|
|
1222
1212
|
return n.length !== t.length ? null : { params: o, path: e };
|
|
1223
|
-
},
|
|
1213
|
+
}, gn = (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 !== ""), yn = (t) => {
|
|
1224
1214
|
const e = t.map((n) => {
|
|
1225
|
-
const o =
|
|
1215
|
+
const o = gn(n);
|
|
1226
1216
|
return { route: n, segments: o };
|
|
1227
1217
|
});
|
|
1228
1218
|
return function(o) {
|
|
1229
1219
|
for (const { segments: r, route: i } of e) {
|
|
1230
|
-
const s =
|
|
1220
|
+
const s = pn(r, o);
|
|
1231
1221
|
if (s)
|
|
1232
1222
|
return { ...s, route: i };
|
|
1233
1223
|
}
|
|
1234
1224
|
return null;
|
|
1235
1225
|
};
|
|
1236
|
-
},
|
|
1237
|
-
const e =
|
|
1226
|
+
}, _n = (t) => {
|
|
1227
|
+
const e = yn(Object.keys(t));
|
|
1238
1228
|
return Jt((n) => {
|
|
1239
1229
|
const o = n.map((r) => {
|
|
1240
1230
|
const i = e(r.pathname);
|
|
@@ -1248,16 +1238,16 @@ const fn = Ie, dn = je, $t = Ue, hn = (t, e, n) => {
|
|
|
1248
1238
|
hash: r.hash
|
|
1249
1239
|
};
|
|
1250
1240
|
});
|
|
1251
|
-
return
|
|
1241
|
+
return ge(
|
|
1252
1242
|
o.map((r) => [r.route, r]),
|
|
1253
1243
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1254
1244
|
t
|
|
1255
1245
|
);
|
|
1256
1246
|
});
|
|
1257
|
-
},
|
|
1247
|
+
}, st = 60 * 1e3, wt = 60 * st, K = 24 * wt, Vt = 7 * K, $t = 30 * K, wn = 365 * K, xn = [
|
|
1258
1248
|
{
|
|
1259
|
-
max:
|
|
1260
|
-
value:
|
|
1249
|
+
max: st * 90,
|
|
1250
|
+
value: st,
|
|
1261
1251
|
name: "minute",
|
|
1262
1252
|
past: { singular: "a minute ago", plural: "{} minutes ago" },
|
|
1263
1253
|
future: { singular: "in a minute", plural: "in {} minutes" }
|
|
@@ -1270,8 +1260,8 @@ const fn = Ie, dn = je, $t = Ue, hn = (t, e, n) => {
|
|
|
1270
1260
|
future: { singular: "in an hour", plural: "in {} hours" }
|
|
1271
1261
|
},
|
|
1272
1262
|
{
|
|
1273
|
-
max:
|
|
1274
|
-
value:
|
|
1263
|
+
max: K * 10,
|
|
1264
|
+
value: K,
|
|
1275
1265
|
name: "day",
|
|
1276
1266
|
past: { singular: "yesterday", plural: "{} days ago" },
|
|
1277
1267
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
@@ -1284,21 +1274,21 @@ const fn = Ie, dn = je, $t = Ue, hn = (t, e, n) => {
|
|
|
1284
1274
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
1285
1275
|
},
|
|
1286
1276
|
{
|
|
1287
|
-
max:
|
|
1288
|
-
value:
|
|
1277
|
+
max: $t * 18,
|
|
1278
|
+
value: $t,
|
|
1289
1279
|
name: "month",
|
|
1290
1280
|
past: { singular: "last month", plural: "{} months ago" },
|
|
1291
1281
|
future: { singular: "in a month", plural: "in {} months" }
|
|
1292
1282
|
},
|
|
1293
1283
|
{
|
|
1294
1284
|
max: 1 / 0,
|
|
1295
|
-
value:
|
|
1285
|
+
value: wn,
|
|
1296
1286
|
name: "year",
|
|
1297
1287
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1298
1288
|
future: { singular: "in a year", plural: "in {} years" }
|
|
1299
1289
|
}
|
|
1300
1290
|
];
|
|
1301
|
-
function
|
|
1291
|
+
function Ht(t, e, n, o) {
|
|
1302
1292
|
const r = Math.round(t / e);
|
|
1303
1293
|
return r <= 1 ? n : o.replace(
|
|
1304
1294
|
"{}",
|
|
@@ -1308,77 +1298,77 @@ function zt(t, e, n, o) {
|
|
|
1308
1298
|
})
|
|
1309
1299
|
);
|
|
1310
1300
|
}
|
|
1311
|
-
const
|
|
1312
|
-
const e = W(/* @__PURE__ */ new Date()), n =
|
|
1301
|
+
const vn = (t = 1e3) => {
|
|
1302
|
+
const e = W(/* @__PURE__ */ new Date()), n = xe(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
1313
1303
|
return e.onDispose(n), e;
|
|
1314
|
-
},
|
|
1304
|
+
}, bn = (t) => {
|
|
1315
1305
|
const e = Math.abs(t);
|
|
1316
|
-
if (e <
|
|
1306
|
+
if (e < st)
|
|
1317
1307
|
return t < 0 ? "just now" : "in a moment";
|
|
1318
|
-
for (const n of
|
|
1308
|
+
for (const n of xn)
|
|
1319
1309
|
if (e < n.max)
|
|
1320
|
-
return t < 0 ?
|
|
1310
|
+
return t < 0 ? Ht(e, n.value, n.past.singular, n.past.plural) : Ht(e, n.value, n.future.singular, n.future.plural);
|
|
1321
1311
|
throw new Error("unreachable");
|
|
1322
|
-
},
|
|
1323
|
-
const o = e != null ?
|
|
1312
|
+
}, An = (t, { now: e, frequency: n = 1e4 } = {}) => {
|
|
1313
|
+
const o = e != null ? Ut.is(e) ? e.derive() : W(e) : vn(n), r = ye(
|
|
1324
1314
|
t,
|
|
1325
1315
|
o
|
|
1326
1316
|
)((i, s) => i.getTime() - s.getTime());
|
|
1327
1317
|
return r.onDispose(() => J.dispose(o)), r;
|
|
1328
|
-
},
|
|
1329
|
-
const n =
|
|
1318
|
+
}, Rn = (t, e = {}) => {
|
|
1319
|
+
const n = An(t, e), o = n.map(bn);
|
|
1330
1320
|
return o.onDispose(n.dispose), o;
|
|
1331
|
-
},
|
|
1332
|
-
class
|
|
1321
|
+
}, In = (t, e = {}) => Rn(t, e);
|
|
1322
|
+
class En extends we {
|
|
1333
1323
|
constructor() {
|
|
1334
1324
|
super(...arguments);
|
|
1335
1325
|
/**
|
|
1336
1326
|
* Triggers an update of the Ticker by incrementing its internal value.
|
|
1337
1327
|
* @returns void
|
|
1338
1328
|
*/
|
|
1339
|
-
|
|
1329
|
+
kt(this, "tick", () => this.update((n) => n + 1));
|
|
1340
1330
|
}
|
|
1341
1331
|
}
|
|
1342
|
-
const
|
|
1332
|
+
const jn = (t = 0) => new En(t, (e, n) => e === n);
|
|
1343
1333
|
export {
|
|
1344
1334
|
Se as Anchor,
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1335
|
+
Qt as AsyncResultView,
|
|
1336
|
+
Wn as AutoFocus,
|
|
1337
|
+
Fn as AutoSelect,
|
|
1338
|
+
Bn as ElementSize,
|
|
1339
|
+
Nn as HTMLTitle,
|
|
1340
|
+
Mn as HiddenWhenEmpty,
|
|
1341
|
+
Ce as InViewport,
|
|
1342
|
+
Ee as LocationProviderMarker,
|
|
1343
|
+
$n as PopOver,
|
|
1344
|
+
Pn as ProvideAppearance,
|
|
1345
|
+
Hn as Resource,
|
|
1346
|
+
hn as ResourceDisplay,
|
|
1347
|
+
mn as ResultView,
|
|
1348
|
+
_n as Router,
|
|
1349
|
+
zn as SelectOnFocus,
|
|
1350
|
+
Tn as SetLocation,
|
|
1351
|
+
En as Ticker,
|
|
1352
|
+
Dn as UseAppearance,
|
|
1363
1353
|
Jt as UseLocation,
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1354
|
+
Vn as WhenInViewport,
|
|
1355
|
+
Un as WindowSize,
|
|
1356
|
+
be as _checkExtensionCondition,
|
|
1357
|
+
ve as _getExtension,
|
|
1358
|
+
yn as _makeRouteMatcher,
|
|
1359
|
+
gn as _parseRouteSegments,
|
|
1370
1360
|
Gt as appearanceMarker,
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1361
|
+
kn as areLocationsEqual,
|
|
1362
|
+
Re as handleAnchorClick,
|
|
1363
|
+
Oe as locationFromURL,
|
|
1364
|
+
dn as makeResource,
|
|
1365
|
+
pn as matchesRoute,
|
|
1366
|
+
vn as nowSignal,
|
|
1367
|
+
In as relativeTime,
|
|
1368
|
+
An as relativeTimeMillisSignal,
|
|
1369
|
+
Rn as relativeTimeSignal,
|
|
1370
|
+
Le as setLocationFromUrl,
|
|
1371
|
+
jn as ticker,
|
|
1372
|
+
bn as timeDiffToString,
|
|
1373
|
+
Cn as urlFromLocation
|
|
1384
1374
|
};
|