@tempots/ui 4.3.7 → 5.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/index.cjs +1 -1
- package/index.js +601 -579
- package/package.json +1 -1
- package/renderables/pop-over.d.ts +46 -44
package/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var bt = (t, e,
|
|
4
|
-
import { getWindow as
|
|
5
|
-
import { delayed as
|
|
6
|
-
const
|
|
1
|
+
var ye = Object.defineProperty;
|
|
2
|
+
var xe = (t, e, o) => e in t ? ye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
+
var bt = (t, e, o) => xe(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { getWindow as rt, prop as N, makeProviderMark as qt, Signal as Xt, Use as Kt, html as Rt, on as Jt, Value as E, attr as Gt, Empty as Ot, OneOfType as Qt, WithElement as q, OnDispose as z, Portal as Zt, Fragment as ot, renderableOfTNode as kt, When as te, effectOf as ve, computedOf as ee, WithBrowserCtx as be, OneOfTuple as Ae, Prop as Re } from "@tempots/dom";
|
|
5
|
+
import { delayed as ne, AsyncResult as H, nearEqual as ut, interval as Oe } from "@tempots/std";
|
|
6
|
+
const Ee = (t) => {
|
|
7
7
|
const e = t.split("/").pop();
|
|
8
8
|
if (e == null || e.startsWith(".")) return;
|
|
9
|
-
const
|
|
10
|
-
return
|
|
11
|
-
},
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
}, Se = (t, e,
|
|
9
|
+
const o = e.split(".") || [];
|
|
10
|
+
return o.length > 1 ? "." + o.pop() : void 0;
|
|
11
|
+
}, Le = (t, e) => {
|
|
12
|
+
const o = Ee(e);
|
|
13
|
+
return o != null && (t.length === 0 || !t.some((n) => o == n));
|
|
14
|
+
}, Se = (t, e, o, n) => {
|
|
15
15
|
let s = t.target;
|
|
16
16
|
for (; s != null && !(s instanceof HTMLAnchorElement); )
|
|
17
17
|
s = s.parentElement;
|
|
@@ -21,56 +21,56 @@ const Le = (t) => {
|
|
|
21
21
|
if (t.button !== 0 || t.ctrlKey || t.metaKey || i.target !== "_self" && i.target !== "" || i.getAttribute("download") != null)
|
|
22
22
|
return !0;
|
|
23
23
|
const { pathname: r, search: c, hash: l } = i;
|
|
24
|
-
if (
|
|
24
|
+
if (n) {
|
|
25
25
|
const a = r + c + l, h = i.getAttribute("href");
|
|
26
26
|
if (!(h != null && h.startsWith("#")) && h !== a)
|
|
27
27
|
return !0;
|
|
28
28
|
}
|
|
29
|
-
return e ? !1 :
|
|
29
|
+
return e ? !1 : Le(o, r);
|
|
30
30
|
}, Te = (t, e = {
|
|
31
31
|
ignoreUrlWithExtension: !0,
|
|
32
32
|
allowedExtensions: [],
|
|
33
33
|
ignoreExternalUrl: !0
|
|
34
34
|
}) => {
|
|
35
|
-
const
|
|
36
|
-
(
|
|
35
|
+
const o = e.ignoreUrlWithExtension === !0 && Array.isArray(e.allowedExtensions) ? e.allowedExtensions.map(
|
|
36
|
+
(n) => n.startsWith(".") ? n : "." + n
|
|
37
37
|
) : [];
|
|
38
|
-
return (
|
|
38
|
+
return (n) => {
|
|
39
39
|
Se(
|
|
40
|
-
o,
|
|
41
|
-
e.ignoreUrlWithExtension ?? !0,
|
|
42
40
|
n,
|
|
41
|
+
e.ignoreUrlWithExtension ?? !0,
|
|
42
|
+
o,
|
|
43
43
|
e.ignoreExternalUrl ?? !0
|
|
44
|
-
) || t() &&
|
|
44
|
+
) || t() && n.preventDefault();
|
|
45
45
|
};
|
|
46
|
-
},
|
|
46
|
+
}, Pe = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, oe = (t, e) => {
|
|
47
47
|
var i;
|
|
48
|
-
const
|
|
49
|
-
let s =
|
|
48
|
+
const o = new URL(t, e ?? ((i = rt()) == null ? void 0 : i.location.toString())), n = Object.fromEntries(o.searchParams.entries());
|
|
49
|
+
let s = o.hash;
|
|
50
50
|
return s.startsWith("#") && (s = s.substring(1)), {
|
|
51
|
-
pathname:
|
|
52
|
-
search:
|
|
51
|
+
pathname: o.pathname,
|
|
52
|
+
search: n,
|
|
53
53
|
hash: s === "" ? void 0 : s
|
|
54
54
|
};
|
|
55
55
|
}, Nt = (t, e) => {
|
|
56
|
-
const
|
|
57
|
-
return t.set(
|
|
58
|
-
},
|
|
59
|
-
const
|
|
60
|
-
return `${t.pathname}${
|
|
61
|
-
},
|
|
62
|
-
const e = t.container.currentURL,
|
|
63
|
-
(
|
|
64
|
-
(
|
|
65
|
-
if (
|
|
66
|
-
return
|
|
67
|
-
const s = new URL(
|
|
68
|
-
return
|
|
56
|
+
const o = oe(e);
|
|
57
|
+
return t.set(o), t;
|
|
58
|
+
}, Et = (t) => {
|
|
59
|
+
const o = new URLSearchParams(t.search).toString(), n = t.hash;
|
|
60
|
+
return `${t.pathname}${o ? `?${o}` : ""}${n ? `#${n}` : ""}`;
|
|
61
|
+
}, ke = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Ce = (t) => {
|
|
62
|
+
const e = t.container.currentURL, o = e.iso(
|
|
63
|
+
(n) => oe(n),
|
|
64
|
+
(n) => {
|
|
65
|
+
if (ke(n.pathname))
|
|
66
|
+
return Et(n);
|
|
67
|
+
const s = new URL(n.pathname, e.value), i = s.origin + s.pathname;
|
|
68
|
+
return Et({ ...n, pathname: i });
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
|
-
return { value:
|
|
71
|
+
return { value: o, dispose: o.dispose };
|
|
72
72
|
}, De = () => {
|
|
73
|
-
const t =
|
|
73
|
+
const t = rt(), 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) ?? "",
|
|
76
76
|
search: Object.fromEntries(
|
|
@@ -79,33 +79,33 @@ const Le = (t) => {
|
|
|
79
79
|
hash: e
|
|
80
80
|
};
|
|
81
81
|
}, We = () => {
|
|
82
|
-
const t = N(De(),
|
|
83
|
-
let
|
|
84
|
-
|
|
82
|
+
const t = N(De(), Pe), e = rt(), o = () => {
|
|
83
|
+
let n = (e == null ? void 0 : e.location.hash) ?? "";
|
|
84
|
+
n.startsWith("#") && (n = n.substring(1));
|
|
85
85
|
const s = {
|
|
86
86
|
pathname: (e == null ? void 0 : e.location.pathname) ?? "",
|
|
87
87
|
search: Object.fromEntries(
|
|
88
88
|
new URLSearchParams((e == null ? void 0 : e.location.search) ?? "").entries()
|
|
89
89
|
),
|
|
90
|
-
hash:
|
|
90
|
+
hash: n === "" ? void 0 : n
|
|
91
91
|
};
|
|
92
92
|
t.set(s);
|
|
93
93
|
};
|
|
94
|
-
return e == null || e.addEventListener("popstate",
|
|
95
|
-
e == null || e.removeEventListener("popstate",
|
|
96
|
-
}), t.on((
|
|
97
|
-
e == null || e.history.pushState({}, "",
|
|
94
|
+
return e == null || e.addEventListener("popstate", o), t.onDispose(() => {
|
|
95
|
+
e == null || e.removeEventListener("popstate", o);
|
|
96
|
+
}), t.on((n) => {
|
|
97
|
+
e == null || e.history.pushState({}, "", Et(n));
|
|
98
98
|
}), {
|
|
99
99
|
value: t,
|
|
100
100
|
dispose: t.dispose
|
|
101
101
|
};
|
|
102
|
-
},
|
|
102
|
+
}, se = {
|
|
103
103
|
mark: qt("LocationProvider"),
|
|
104
104
|
create: (t, e) => {
|
|
105
105
|
if (e.isBrowser())
|
|
106
106
|
return We();
|
|
107
107
|
if (e.isHeadless())
|
|
108
|
-
return
|
|
108
|
+
return Ce(e);
|
|
109
109
|
throw new Error("Unknown context");
|
|
110
110
|
}
|
|
111
111
|
}, Fe = (t) => {
|
|
@@ -114,17 +114,17 @@ const Le = (t) => {
|
|
|
114
114
|
if (typeof t == "string" || Xt.is(t))
|
|
115
115
|
return Me({ href: t }, ...e);
|
|
116
116
|
const {
|
|
117
|
-
href:
|
|
118
|
-
withViewTransition:
|
|
117
|
+
href: o,
|
|
118
|
+
withViewTransition: n,
|
|
119
119
|
...s
|
|
120
120
|
} = t;
|
|
121
|
-
return Kt(
|
|
121
|
+
return Kt(se, (i) => Rt.a(
|
|
122
122
|
Jt.click(
|
|
123
|
-
Te(() => (
|
|
124
|
-
Nt(i,
|
|
125
|
-
}) : Nt(i,
|
|
123
|
+
Te(() => (n == !0 ? Fe(() => {
|
|
124
|
+
Nt(i, E.get(o));
|
|
125
|
+
}) : Nt(i, E.get(o)), !0), s)
|
|
126
126
|
),
|
|
127
|
-
Gt.href(
|
|
127
|
+
Gt.href(o),
|
|
128
128
|
...e
|
|
129
129
|
));
|
|
130
130
|
}, Hn = {
|
|
@@ -138,26 +138,26 @@ const Le = (t) => {
|
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
function Ve() {
|
|
141
|
-
const t =
|
|
142
|
-
return e == null || e.addEventListener("change", s),
|
|
141
|
+
const t = rt(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = N(o ? "dark" : "light"), s = (i) => n.set(i.matches ? "dark" : "light");
|
|
142
|
+
return e == null || e.addEventListener("change", s), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", s)), n;
|
|
143
143
|
}
|
|
144
|
-
const
|
|
144
|
+
const ie = (t, e) => {
|
|
145
145
|
if (typeof e == "function")
|
|
146
|
-
return
|
|
147
|
-
const
|
|
148
|
-
return Qt(
|
|
149
|
-
AsyncSuccess: (r) =>
|
|
150
|
-
AsyncFailure: (r) =>
|
|
146
|
+
return ie(t, { success: e });
|
|
147
|
+
const o = e.failure ?? ((r) => r.map((c) => `Error: ${c}`)), n = e.success, s = e.loading ?? (() => Ot), i = e.notAsked ?? (() => Ot);
|
|
148
|
+
return Qt(E.toSignal(t), {
|
|
149
|
+
AsyncSuccess: (r) => n(r.$.value),
|
|
150
|
+
AsyncFailure: (r) => o(r.$.error),
|
|
151
151
|
Loading: (r) => s(r.map((c) => c.previousValue)),
|
|
152
152
|
NotAsked: i
|
|
153
153
|
});
|
|
154
|
-
}, Bn = (t = 10) =>
|
|
155
|
-
const
|
|
156
|
-
return z(
|
|
157
|
-
}), zn =
|
|
154
|
+
}, Bn = (t = 10) => q((e) => z(ne(() => e == null ? void 0 : e.focus(), t))), Un = (t = 10) => q((e) => {
|
|
155
|
+
const o = ne(() => e.select(), t);
|
|
156
|
+
return z(o);
|
|
157
|
+
}), zn = q((t) => {
|
|
158
158
|
const e = t.style.getPropertyValue(":empty");
|
|
159
|
-
return t.style.setProperty(":empty", "display:none"), z((
|
|
160
|
-
|
|
159
|
+
return t.style.setProperty(":empty", "display:none"), z((o) => {
|
|
160
|
+
o && t.style.setProperty(":empty", e);
|
|
161
161
|
});
|
|
162
162
|
}), _n = (t) => Zt("head > title", Gt.innerText(t)), Ne = {
|
|
163
163
|
partial: {
|
|
@@ -170,7 +170,7 @@ const re = (t, e) => {
|
|
|
170
170
|
rootMargin: "0px",
|
|
171
171
|
threshold: 1
|
|
172
172
|
}
|
|
173
|
-
},
|
|
173
|
+
}, ht = {
|
|
174
174
|
partial: /* @__PURE__ */ new Map(),
|
|
175
175
|
full: /* @__PURE__ */ new Map()
|
|
176
176
|
}, nt = {
|
|
@@ -179,32 +179,32 @@ const re = (t, e) => {
|
|
|
179
179
|
};
|
|
180
180
|
function $e(t) {
|
|
181
181
|
return nt[t] == null && (nt[t] = new IntersectionObserver((e) => {
|
|
182
|
-
e.forEach((
|
|
183
|
-
const
|
|
184
|
-
|
|
182
|
+
e.forEach((o) => {
|
|
183
|
+
const n = ht[t].get(o.target);
|
|
184
|
+
n == null || n.set(o.isIntersecting);
|
|
185
185
|
});
|
|
186
186
|
}, Ne[t])), nt[t];
|
|
187
187
|
}
|
|
188
|
-
const He = ({ mode: t = "partial", once: e = !1 },
|
|
189
|
-
const
|
|
190
|
-
return
|
|
191
|
-
|
|
188
|
+
const He = ({ mode: t = "partial", once: e = !1 }, o) => {
|
|
189
|
+
const n = N(!1);
|
|
190
|
+
return ot(
|
|
191
|
+
q((s) => {
|
|
192
192
|
const i = typeof IntersectionObserver < "u" ? $e(t) : null;
|
|
193
|
-
|
|
193
|
+
ht[t].set(s, n), i == null || i.observe(s);
|
|
194
194
|
function r() {
|
|
195
195
|
var l;
|
|
196
|
-
i == null || i.unobserve(s),
|
|
196
|
+
i == null || i.unobserve(s), ht[t].delete(s), ht[t].size === 0 && ((l = nt[t]) == null || l.disconnect(), nt[t] = null);
|
|
197
197
|
}
|
|
198
198
|
let c = null;
|
|
199
|
-
return e && (c =
|
|
199
|
+
return e && (c = n.on((l) => {
|
|
200
200
|
l && r();
|
|
201
201
|
})), z(() => {
|
|
202
|
-
|
|
202
|
+
n.dispose(), r(), c == null || c();
|
|
203
203
|
});
|
|
204
204
|
}),
|
|
205
|
-
|
|
205
|
+
kt(o(n))
|
|
206
206
|
);
|
|
207
|
-
}, In = (t, e,
|
|
207
|
+
}, In = (t, e, o) => He(t, (n) => te(n, e, o ?? (() => Ot))), Q = Math.min, X = Math.max, dt = Math.round, ft = Math.floor, D = (t) => ({
|
|
208
208
|
x: t,
|
|
209
209
|
y: t
|
|
210
210
|
}), Be = {
|
|
@@ -216,49 +216,49 @@ const He = ({ mode: t = "partial", once: e = !1 }, n) => {
|
|
|
216
216
|
start: "end",
|
|
217
217
|
end: "start"
|
|
218
218
|
};
|
|
219
|
-
function
|
|
220
|
-
return
|
|
219
|
+
function Lt(t, e, o) {
|
|
220
|
+
return X(t, Q(e, o));
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function ct(t, e) {
|
|
223
223
|
return typeof t == "function" ? t(e) : t;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function K(t) {
|
|
226
226
|
return t.split("-")[0];
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function lt(t) {
|
|
229
229
|
return t.split("-")[1];
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function re(t) {
|
|
232
232
|
return t === "x" ? "y" : "x";
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Ct(t) {
|
|
235
235
|
return t === "y" ? "height" : "width";
|
|
236
236
|
}
|
|
237
237
|
function B(t) {
|
|
238
|
-
return ["top", "bottom"].includes(
|
|
238
|
+
return ["top", "bottom"].includes(K(t)) ? "y" : "x";
|
|
239
239
|
}
|
|
240
240
|
function Dt(t) {
|
|
241
|
-
return
|
|
241
|
+
return re(B(t));
|
|
242
242
|
}
|
|
243
|
-
function ze(t, e,
|
|
244
|
-
|
|
245
|
-
const
|
|
246
|
-
let r = s === "x" ?
|
|
247
|
-
return e.reference[i] > e.floating[i] && (r =
|
|
243
|
+
function ze(t, e, o) {
|
|
244
|
+
o === void 0 && (o = !1);
|
|
245
|
+
const n = lt(t), s = Dt(t), i = Ct(s);
|
|
246
|
+
let r = s === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
247
|
+
return e.reference[i] > e.floating[i] && (r = mt(r)), [r, mt(r)];
|
|
248
248
|
}
|
|
249
249
|
function _e(t) {
|
|
250
|
-
const e =
|
|
250
|
+
const e = mt(t);
|
|
251
251
|
return [St(t), e, St(e)];
|
|
252
252
|
}
|
|
253
253
|
function St(t) {
|
|
254
254
|
return t.replace(/start|end/g, (e) => Ue[e]);
|
|
255
255
|
}
|
|
256
|
-
function Ie(t, e,
|
|
257
|
-
const
|
|
256
|
+
function Ie(t, e, o) {
|
|
257
|
+
const n = ["left", "right"], s = ["right", "left"], i = ["top", "bottom"], r = ["bottom", "top"];
|
|
258
258
|
switch (t) {
|
|
259
259
|
case "top":
|
|
260
260
|
case "bottom":
|
|
261
|
-
return
|
|
261
|
+
return o ? e ? s : n : e ? n : s;
|
|
262
262
|
case "left":
|
|
263
263
|
case "right":
|
|
264
264
|
return e ? i : r;
|
|
@@ -266,12 +266,12 @@ function Ie(t, e, n) {
|
|
|
266
266
|
return [];
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
function je(t, e,
|
|
270
|
-
const s =
|
|
271
|
-
let i = Ie(
|
|
269
|
+
function je(t, e, o, n) {
|
|
270
|
+
const s = lt(t);
|
|
271
|
+
let i = Ie(K(t), o === "start", n);
|
|
272
272
|
return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(St)))), i;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function mt(t) {
|
|
275
275
|
return t.replace(/left|right|bottom|top/g, (e) => Be[e]);
|
|
276
276
|
}
|
|
277
277
|
function Ye(t) {
|
|
@@ -283,7 +283,7 @@ function Ye(t) {
|
|
|
283
283
|
...t
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function ce(t) {
|
|
287
287
|
return typeof t != "number" ? Ye(t) : {
|
|
288
288
|
top: t,
|
|
289
289
|
right: t,
|
|
@@ -291,79 +291,79 @@ function le(t) {
|
|
|
291
291
|
left: t
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function gt(t) {
|
|
295
295
|
const {
|
|
296
296
|
x: e,
|
|
297
|
-
y:
|
|
298
|
-
width:
|
|
297
|
+
y: o,
|
|
298
|
+
width: n,
|
|
299
299
|
height: s
|
|
300
300
|
} = t;
|
|
301
301
|
return {
|
|
302
|
-
width:
|
|
302
|
+
width: n,
|
|
303
303
|
height: s,
|
|
304
|
-
top:
|
|
304
|
+
top: o,
|
|
305
305
|
left: e,
|
|
306
|
-
right: e +
|
|
307
|
-
bottom:
|
|
306
|
+
right: e + n,
|
|
307
|
+
bottom: o + s,
|
|
308
308
|
x: e,
|
|
309
|
-
y:
|
|
309
|
+
y: o
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
function $t(t, e,
|
|
312
|
+
function $t(t, e, o) {
|
|
313
313
|
let {
|
|
314
|
-
reference:
|
|
314
|
+
reference: n,
|
|
315
315
|
floating: s
|
|
316
316
|
} = t;
|
|
317
|
-
const i = B(e), r = Dt(e), c =
|
|
317
|
+
const i = B(e), r = Dt(e), c = Ct(r), l = K(e), a = i === "y", h = n.x + n.width / 2 - s.width / 2, f = n.y + n.height / 2 - s.height / 2, m = n[c] / 2 - s[c] / 2;
|
|
318
318
|
let u;
|
|
319
319
|
switch (l) {
|
|
320
320
|
case "top":
|
|
321
321
|
u = {
|
|
322
322
|
x: h,
|
|
323
|
-
y:
|
|
323
|
+
y: n.y - s.height
|
|
324
324
|
};
|
|
325
325
|
break;
|
|
326
326
|
case "bottom":
|
|
327
327
|
u = {
|
|
328
328
|
x: h,
|
|
329
|
-
y:
|
|
329
|
+
y: n.y + n.height
|
|
330
330
|
};
|
|
331
331
|
break;
|
|
332
332
|
case "right":
|
|
333
333
|
u = {
|
|
334
|
-
x:
|
|
334
|
+
x: n.x + n.width,
|
|
335
335
|
y: f
|
|
336
336
|
};
|
|
337
337
|
break;
|
|
338
338
|
case "left":
|
|
339
339
|
u = {
|
|
340
|
-
x:
|
|
340
|
+
x: n.x - s.width,
|
|
341
341
|
y: f
|
|
342
342
|
};
|
|
343
343
|
break;
|
|
344
344
|
default:
|
|
345
345
|
u = {
|
|
346
|
-
x:
|
|
347
|
-
y:
|
|
346
|
+
x: n.x,
|
|
347
|
+
y: n.y
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
switch (
|
|
350
|
+
switch (lt(e)) {
|
|
351
351
|
case "start":
|
|
352
|
-
u[r] -= m * (
|
|
352
|
+
u[r] -= m * (o && a ? -1 : 1);
|
|
353
353
|
break;
|
|
354
354
|
case "end":
|
|
355
|
-
u[r] += m * (
|
|
355
|
+
u[r] += m * (o && a ? -1 : 1);
|
|
356
356
|
break;
|
|
357
357
|
}
|
|
358
358
|
return u;
|
|
359
359
|
}
|
|
360
|
-
const qe = async (t, e,
|
|
360
|
+
const qe = async (t, e, o) => {
|
|
361
361
|
const {
|
|
362
|
-
placement:
|
|
362
|
+
placement: n = "bottom",
|
|
363
363
|
strategy: s = "absolute",
|
|
364
364
|
middleware: i = [],
|
|
365
365
|
platform: r
|
|
366
|
-
} =
|
|
366
|
+
} = o, c = i.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(e));
|
|
367
367
|
let a = await r.getElementRects({
|
|
368
368
|
reference: t,
|
|
369
369
|
floating: e,
|
|
@@ -371,20 +371,20 @@ const qe = async (t, e, n) => {
|
|
|
371
371
|
}), {
|
|
372
372
|
x: h,
|
|
373
373
|
y: f
|
|
374
|
-
} = $t(a,
|
|
375
|
-
for (let
|
|
374
|
+
} = $t(a, n, l), m = n, u = {}, d = 0;
|
|
375
|
+
for (let p = 0; p < c.length; p++) {
|
|
376
376
|
const {
|
|
377
|
-
name:
|
|
378
|
-
fn:
|
|
379
|
-
} = c[
|
|
380
|
-
x
|
|
381
|
-
y
|
|
377
|
+
name: w,
|
|
378
|
+
fn: g
|
|
379
|
+
} = c[p], {
|
|
380
|
+
x,
|
|
381
|
+
y,
|
|
382
382
|
data: b,
|
|
383
383
|
reset: v
|
|
384
|
-
} = await
|
|
384
|
+
} = await g({
|
|
385
385
|
x: h,
|
|
386
386
|
y: f,
|
|
387
|
-
initialPlacement:
|
|
387
|
+
initialPlacement: n,
|
|
388
388
|
placement: m,
|
|
389
389
|
strategy: s,
|
|
390
390
|
middlewareData: u,
|
|
@@ -395,10 +395,10 @@ const qe = async (t, e, n) => {
|
|
|
395
395
|
floating: e
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
|
-
h =
|
|
398
|
+
h = x ?? h, f = y ?? f, u = {
|
|
399
399
|
...u,
|
|
400
|
-
[
|
|
401
|
-
...u[
|
|
400
|
+
[w]: {
|
|
401
|
+
...u[w],
|
|
402
402
|
...b
|
|
403
403
|
}
|
|
404
404
|
}, v && d <= 50 && (d++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (a = v.rects === !0 ? await r.getElementRects({
|
|
@@ -408,7 +408,7 @@ const qe = async (t, e, n) => {
|
|
|
408
408
|
}) : v.rects), {
|
|
409
409
|
x: h,
|
|
410
410
|
y: f
|
|
411
|
-
} = $t(a, m, l)),
|
|
411
|
+
} = $t(a, m, l)), p = -1);
|
|
412
412
|
}
|
|
413
413
|
return {
|
|
414
414
|
x: h,
|
|
@@ -418,11 +418,11 @@ const qe = async (t, e, n) => {
|
|
|
418
418
|
middlewareData: u
|
|
419
419
|
};
|
|
420
420
|
};
|
|
421
|
-
async function
|
|
422
|
-
var
|
|
421
|
+
async function le(t, e) {
|
|
422
|
+
var o;
|
|
423
423
|
e === void 0 && (e = {});
|
|
424
424
|
const {
|
|
425
|
-
x:
|
|
425
|
+
x: n,
|
|
426
426
|
y: s,
|
|
427
427
|
platform: i,
|
|
428
428
|
rects: r,
|
|
@@ -434,33 +434,33 @@ async function ae(t, e) {
|
|
|
434
434
|
elementContext: f = "floating",
|
|
435
435
|
altBoundary: m = !1,
|
|
436
436
|
padding: u = 0
|
|
437
|
-
} =
|
|
438
|
-
element: (
|
|
437
|
+
} = ct(e, t), d = ce(u), w = c[m ? f === "floating" ? "reference" : "floating" : f], g = gt(await i.getClippingRect({
|
|
438
|
+
element: (o = await (i.isElement == null ? void 0 : i.isElement(w))) == null || o ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
439
439
|
boundary: a,
|
|
440
440
|
rootBoundary: h,
|
|
441
441
|
strategy: l
|
|
442
|
-
})),
|
|
443
|
-
x:
|
|
442
|
+
})), x = f === "floating" ? {
|
|
443
|
+
x: n,
|
|
444
444
|
y: s,
|
|
445
445
|
width: r.floating.width,
|
|
446
446
|
height: r.floating.height
|
|
447
|
-
} : r.reference,
|
|
447
|
+
} : r.reference, y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), b = await (i.isElement == null ? void 0 : i.isElement(y)) ? await (i.getScale == null ? void 0 : i.getScale(y)) || {
|
|
448
448
|
x: 1,
|
|
449
449
|
y: 1
|
|
450
450
|
} : {
|
|
451
451
|
x: 1,
|
|
452
452
|
y: 1
|
|
453
|
-
}, v =
|
|
453
|
+
}, v = gt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
454
454
|
elements: c,
|
|
455
|
-
rect:
|
|
456
|
-
offsetParent:
|
|
455
|
+
rect: x,
|
|
456
|
+
offsetParent: y,
|
|
457
457
|
strategy: l
|
|
458
|
-
}) :
|
|
458
|
+
}) : x);
|
|
459
459
|
return {
|
|
460
|
-
top: (
|
|
461
|
-
bottom: (v.bottom -
|
|
462
|
-
left: (
|
|
463
|
-
right: (v.right -
|
|
460
|
+
top: (g.top - v.top + d.top) / b.y,
|
|
461
|
+
bottom: (v.bottom - g.bottom + d.bottom) / b.y,
|
|
462
|
+
left: (g.left - v.left + d.left) / b.x,
|
|
463
|
+
right: (v.right - g.right + d.right) / b.x
|
|
464
464
|
};
|
|
465
465
|
}
|
|
466
466
|
const Xe = (t) => ({
|
|
@@ -468,8 +468,8 @@ const Xe = (t) => ({
|
|
|
468
468
|
options: t,
|
|
469
469
|
async fn(e) {
|
|
470
470
|
const {
|
|
471
|
-
x:
|
|
472
|
-
y:
|
|
471
|
+
x: o,
|
|
472
|
+
y: n,
|
|
473
473
|
placement: s,
|
|
474
474
|
rects: i,
|
|
475
475
|
platform: r,
|
|
@@ -478,23 +478,23 @@ const Xe = (t) => ({
|
|
|
478
478
|
} = e, {
|
|
479
479
|
element: a,
|
|
480
480
|
padding: h = 0
|
|
481
|
-
} =
|
|
481
|
+
} = ct(t, e) || {};
|
|
482
482
|
if (a == null)
|
|
483
483
|
return {};
|
|
484
|
-
const f =
|
|
485
|
-
x:
|
|
486
|
-
y:
|
|
487
|
-
}, u = Dt(s), d =
|
|
488
|
-
let A = L ? L[
|
|
489
|
-
(!A || !await (r.isElement == null ? void 0 : r.isElement(L))) && (A = c.floating[
|
|
490
|
-
const _ = b / 2 - v / 2, M = A / 2 -
|
|
484
|
+
const f = ce(h), m = {
|
|
485
|
+
x: o,
|
|
486
|
+
y: n
|
|
487
|
+
}, u = Dt(s), d = Ct(u), p = await r.getDimensions(a), w = u === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = i.reference[d] + i.reference[u] - m[u] - i.floating[d], v = m[u] - i.reference[u], L = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a));
|
|
488
|
+
let A = L ? L[y] : 0;
|
|
489
|
+
(!A || !await (r.isElement == null ? void 0 : r.isElement(L))) && (A = c.floating[y] || i.floating[d]);
|
|
490
|
+
const _ = b / 2 - v / 2, M = A / 2 - p[d] / 2 - 1, S = Q(f[g], M), I = Q(f[x], M), j = S, et = A - p[d] - I, R = A / 2 - p[d] / 2 + _, Y = Lt(j, R, et), V = !l.arrow && lt(s) != null && R !== Y && i.reference[d] / 2 - (R < j ? S : I) - p[d] / 2 < 0, T = V ? R < j ? R - j : R - et : 0;
|
|
491
491
|
return {
|
|
492
|
-
[u]: m[u] +
|
|
492
|
+
[u]: m[u] + T,
|
|
493
493
|
data: {
|
|
494
494
|
[u]: Y,
|
|
495
|
-
centerOffset: R - Y -
|
|
495
|
+
centerOffset: R - Y - T,
|
|
496
496
|
...V && {
|
|
497
|
-
alignmentOffset:
|
|
497
|
+
alignmentOffset: T
|
|
498
498
|
}
|
|
499
499
|
},
|
|
500
500
|
reset: V
|
|
@@ -505,7 +505,7 @@ const Xe = (t) => ({
|
|
|
505
505
|
name: "flip",
|
|
506
506
|
options: t,
|
|
507
507
|
async fn(e) {
|
|
508
|
-
var
|
|
508
|
+
var o, n;
|
|
509
509
|
const {
|
|
510
510
|
placement: s,
|
|
511
511
|
middlewareData: i,
|
|
@@ -519,52 +519,52 @@ const Xe = (t) => ({
|
|
|
519
519
|
fallbackPlacements: m,
|
|
520
520
|
fallbackStrategy: u = "bestFit",
|
|
521
521
|
fallbackAxisSideDirection: d = "none",
|
|
522
|
-
flipAlignment:
|
|
523
|
-
...
|
|
524
|
-
} =
|
|
525
|
-
if ((
|
|
522
|
+
flipAlignment: p = !0,
|
|
523
|
+
...w
|
|
524
|
+
} = ct(t, e);
|
|
525
|
+
if ((o = i.arrow) != null && o.alignmentOffset)
|
|
526
526
|
return {};
|
|
527
|
-
const
|
|
528
|
-
!m && L && v.push(...je(c,
|
|
529
|
-
const A = [c, ...v], _ = await
|
|
530
|
-
let
|
|
531
|
-
if (h && M.push(_[
|
|
527
|
+
const g = K(s), x = B(c), y = K(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = m || (y || !p ? [mt(c)] : _e(c)), L = d !== "none";
|
|
528
|
+
!m && L && v.push(...je(c, p, d, b));
|
|
529
|
+
const A = [c, ...v], _ = await le(e, w), M = [];
|
|
530
|
+
let S = ((n = i.flip) == null ? void 0 : n.overflows) || [];
|
|
531
|
+
if (h && M.push(_[g]), f) {
|
|
532
532
|
const R = ze(s, r, b);
|
|
533
533
|
M.push(_[R[0]], _[R[1]]);
|
|
534
534
|
}
|
|
535
|
-
if (
|
|
535
|
+
if (S = [...S, {
|
|
536
536
|
placement: s,
|
|
537
537
|
overflows: M
|
|
538
538
|
}], !M.every((R) => R <= 0)) {
|
|
539
539
|
var I, j;
|
|
540
540
|
const R = (((I = i.flip) == null ? void 0 : I.index) || 0) + 1, Y = A[R];
|
|
541
|
-
if (Y && (!(f === "alignment" ?
|
|
541
|
+
if (Y && (!(f === "alignment" ? x !== B(Y) : !1) || // We leave the current main axis only if every placement on that axis
|
|
542
542
|
// overflows the main axis.
|
|
543
|
-
|
|
543
|
+
S.every((P) => P.overflows[0] > 0 && B(P.placement) === x)))
|
|
544
544
|
return {
|
|
545
545
|
data: {
|
|
546
546
|
index: R,
|
|
547
|
-
overflows:
|
|
547
|
+
overflows: S
|
|
548
548
|
},
|
|
549
549
|
reset: {
|
|
550
550
|
placement: Y
|
|
551
551
|
}
|
|
552
552
|
};
|
|
553
|
-
let V = (j =
|
|
553
|
+
let V = (j = S.filter((T) => T.overflows[0] <= 0).sort((T, P) => T.overflows[1] - P.overflows[1])[0]) == null ? void 0 : j.placement;
|
|
554
554
|
if (!V)
|
|
555
555
|
switch (u) {
|
|
556
556
|
case "bestFit": {
|
|
557
557
|
var et;
|
|
558
|
-
const
|
|
558
|
+
const T = (et = S.filter((P) => {
|
|
559
559
|
if (L) {
|
|
560
|
-
const $ = B(
|
|
561
|
-
return $ ===
|
|
560
|
+
const $ = B(P.placement);
|
|
561
|
+
return $ === x || // Create a bias to the `y` side axis due to horizontal
|
|
562
562
|
// reading directions favoring greater width.
|
|
563
563
|
$ === "y";
|
|
564
564
|
}
|
|
565
565
|
return !0;
|
|
566
|
-
}).map((
|
|
567
|
-
|
|
566
|
+
}).map((P) => [P.placement, P.overflows.filter(($) => $ > 0).reduce(($, we) => $ + we, 0)]).sort((P, $) => P[1] - $[1])[0]) == null ? void 0 : et[0];
|
|
567
|
+
T && (V = T);
|
|
568
568
|
break;
|
|
569
569
|
}
|
|
570
570
|
case "initialPlacement":
|
|
@@ -584,10 +584,10 @@ const Xe = (t) => ({
|
|
|
584
584
|
};
|
|
585
585
|
async function Je(t, e) {
|
|
586
586
|
const {
|
|
587
|
-
placement:
|
|
588
|
-
platform:
|
|
587
|
+
placement: o,
|
|
588
|
+
platform: n,
|
|
589
589
|
elements: s
|
|
590
|
-
} = t, i = await (
|
|
590
|
+
} = t, i = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), r = K(o), c = lt(o), l = B(o) === "y", a = ["left", "top"].includes(r) ? -1 : 1, h = i && l ? -1 : 1, f = ct(e, t);
|
|
591
591
|
let {
|
|
592
592
|
mainAxis: m,
|
|
593
593
|
crossAxis: u,
|
|
@@ -614,14 +614,14 @@ const Ge = function(t) {
|
|
|
614
614
|
name: "offset",
|
|
615
615
|
options: t,
|
|
616
616
|
async fn(e) {
|
|
617
|
-
var
|
|
617
|
+
var o, n;
|
|
618
618
|
const {
|
|
619
619
|
x: s,
|
|
620
620
|
y: i,
|
|
621
621
|
placement: r,
|
|
622
622
|
middlewareData: c
|
|
623
623
|
} = e, l = await Je(e, t);
|
|
624
|
-
return r === ((
|
|
624
|
+
return r === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
|
|
625
625
|
x: s + l.x,
|
|
626
626
|
y: i + l.y,
|
|
627
627
|
data: {
|
|
@@ -637,48 +637,48 @@ const Ge = function(t) {
|
|
|
637
637
|
options: t,
|
|
638
638
|
async fn(e) {
|
|
639
639
|
const {
|
|
640
|
-
x:
|
|
641
|
-
y:
|
|
640
|
+
x: o,
|
|
641
|
+
y: n,
|
|
642
642
|
placement: s
|
|
643
643
|
} = e, {
|
|
644
644
|
mainAxis: i = !0,
|
|
645
645
|
crossAxis: r = !1,
|
|
646
646
|
limiter: c = {
|
|
647
|
-
fn: (
|
|
647
|
+
fn: (w) => {
|
|
648
648
|
let {
|
|
649
|
-
x:
|
|
650
|
-
y
|
|
651
|
-
} =
|
|
649
|
+
x: g,
|
|
650
|
+
y: x
|
|
651
|
+
} = w;
|
|
652
652
|
return {
|
|
653
|
-
x:
|
|
654
|
-
y
|
|
653
|
+
x: g,
|
|
654
|
+
y: x
|
|
655
655
|
};
|
|
656
656
|
}
|
|
657
657
|
},
|
|
658
658
|
...l
|
|
659
|
-
} =
|
|
660
|
-
x:
|
|
661
|
-
y:
|
|
662
|
-
}, h = await
|
|
659
|
+
} = ct(t, e), a = {
|
|
660
|
+
x: o,
|
|
661
|
+
y: n
|
|
662
|
+
}, h = await le(e, l), f = B(K(s)), m = re(f);
|
|
663
663
|
let u = a[m], d = a[f];
|
|
664
664
|
if (i) {
|
|
665
|
-
const
|
|
666
|
-
u =
|
|
665
|
+
const w = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", x = u + h[w], y = u - h[g];
|
|
666
|
+
u = Lt(x, u, y);
|
|
667
667
|
}
|
|
668
668
|
if (r) {
|
|
669
|
-
const
|
|
670
|
-
d =
|
|
669
|
+
const w = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", x = d + h[w], y = d - h[g];
|
|
670
|
+
d = Lt(x, d, y);
|
|
671
671
|
}
|
|
672
|
-
const
|
|
672
|
+
const p = c.fn({
|
|
673
673
|
...e,
|
|
674
674
|
[m]: u,
|
|
675
675
|
[f]: d
|
|
676
676
|
});
|
|
677
677
|
return {
|
|
678
|
-
...
|
|
678
|
+
...p,
|
|
679
679
|
data: {
|
|
680
|
-
x:
|
|
681
|
-
y:
|
|
680
|
+
x: p.x - o,
|
|
681
|
+
y: p.y - n,
|
|
682
682
|
enabled: {
|
|
683
683
|
[m]: i,
|
|
684
684
|
[f]: r
|
|
@@ -692,36 +692,36 @@ function wt() {
|
|
|
692
692
|
return typeof window < "u";
|
|
693
693
|
}
|
|
694
694
|
function tt(t) {
|
|
695
|
-
return
|
|
695
|
+
return ae(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function O(t) {
|
|
698
698
|
var e;
|
|
699
699
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
700
700
|
}
|
|
701
701
|
function F(t) {
|
|
702
702
|
var e;
|
|
703
|
-
return (e = (
|
|
703
|
+
return (e = (ae(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
return wt() ? t instanceof Node || t instanceof
|
|
705
|
+
function ae(t) {
|
|
706
|
+
return wt() ? t instanceof Node || t instanceof O(t).Node : !1;
|
|
707
707
|
}
|
|
708
708
|
function k(t) {
|
|
709
|
-
return wt() ? t instanceof Element || t instanceof
|
|
709
|
+
return wt() ? t instanceof Element || t instanceof O(t).Element : !1;
|
|
710
710
|
}
|
|
711
711
|
function W(t) {
|
|
712
|
-
return wt() ? t instanceof HTMLElement || t instanceof
|
|
712
|
+
return wt() ? t instanceof HTMLElement || t instanceof O(t).HTMLElement : !1;
|
|
713
713
|
}
|
|
714
714
|
function Ht(t) {
|
|
715
|
-
return !wt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof
|
|
715
|
+
return !wt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof O(t).ShadowRoot;
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function at(t) {
|
|
718
718
|
const {
|
|
719
719
|
overflow: e,
|
|
720
|
-
overflowX:
|
|
721
|
-
overflowY:
|
|
720
|
+
overflowX: o,
|
|
721
|
+
overflowY: n,
|
|
722
722
|
display: s
|
|
723
723
|
} = C(t);
|
|
724
|
-
return /auto|scroll|overlay|hidden|clip/.test(e +
|
|
724
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(s);
|
|
725
725
|
}
|
|
726
726
|
function Ze(t) {
|
|
727
727
|
return ["table", "td", "th"].includes(tt(t));
|
|
@@ -736,8 +736,8 @@ function yt(t) {
|
|
|
736
736
|
});
|
|
737
737
|
}
|
|
738
738
|
function Wt(t) {
|
|
739
|
-
const e = Ft(),
|
|
740
|
-
return ["transform", "translate", "scale", "rotate", "perspective"].some((
|
|
739
|
+
const e = Ft(), o = k(t) ? C(t) : t;
|
|
740
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => o[n] ? o[n] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
|
|
741
741
|
}
|
|
742
742
|
function tn(t) {
|
|
743
743
|
let e = U(t);
|
|
@@ -757,7 +757,7 @@ function Z(t) {
|
|
|
757
757
|
return ["html", "body", "#document"].includes(tt(t));
|
|
758
758
|
}
|
|
759
759
|
function C(t) {
|
|
760
|
-
return
|
|
760
|
+
return O(t).getComputedStyle(t);
|
|
761
761
|
}
|
|
762
762
|
function xt(t) {
|
|
763
763
|
return k(t) ? {
|
|
@@ -780,78 +780,78 @@ function U(t) {
|
|
|
780
780
|
);
|
|
781
781
|
return Ht(e) ? e.host : e;
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function ue(t) {
|
|
784
784
|
const e = U(t);
|
|
785
|
-
return Z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) &&
|
|
785
|
+
return Z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && at(e) ? e : ue(e);
|
|
786
786
|
}
|
|
787
|
-
function
|
|
788
|
-
var
|
|
789
|
-
e === void 0 && (e = []),
|
|
790
|
-
const s =
|
|
787
|
+
function st(t, e, o) {
|
|
788
|
+
var n;
|
|
789
|
+
e === void 0 && (e = []), o === void 0 && (o = !0);
|
|
790
|
+
const s = ue(t), i = s === ((n = t.ownerDocument) == null ? void 0 : n.body), r = O(s);
|
|
791
791
|
if (i) {
|
|
792
792
|
const c = Tt(r);
|
|
793
|
-
return e.concat(r, r.visualViewport || [],
|
|
793
|
+
return e.concat(r, r.visualViewport || [], at(s) ? s : [], c && o ? st(c) : []);
|
|
794
794
|
}
|
|
795
|
-
return e.concat(s,
|
|
795
|
+
return e.concat(s, st(s, [], o));
|
|
796
796
|
}
|
|
797
797
|
function Tt(t) {
|
|
798
798
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
799
799
|
}
|
|
800
|
-
function
|
|
800
|
+
function fe(t) {
|
|
801
801
|
const e = C(t);
|
|
802
|
-
let
|
|
803
|
-
const s = W(t), i = s ? t.offsetWidth :
|
|
804
|
-
return c && (
|
|
805
|
-
width:
|
|
806
|
-
height:
|
|
802
|
+
let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
803
|
+
const s = W(t), i = s ? t.offsetWidth : o, r = s ? t.offsetHeight : n, c = dt(o) !== i || dt(n) !== r;
|
|
804
|
+
return c && (o = i, n = r), {
|
|
805
|
+
width: o,
|
|
806
|
+
height: n,
|
|
807
807
|
$: c
|
|
808
808
|
};
|
|
809
809
|
}
|
|
810
810
|
function Mt(t) {
|
|
811
811
|
return k(t) ? t : t.contextElement;
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function G(t) {
|
|
814
814
|
const e = Mt(t);
|
|
815
815
|
if (!W(e))
|
|
816
816
|
return D(1);
|
|
817
|
-
const
|
|
818
|
-
width:
|
|
817
|
+
const o = e.getBoundingClientRect(), {
|
|
818
|
+
width: n,
|
|
819
819
|
height: s,
|
|
820
820
|
$: i
|
|
821
|
-
} =
|
|
822
|
-
let r = (i ?
|
|
821
|
+
} = fe(e);
|
|
822
|
+
let r = (i ? dt(o.width) : o.width) / n, c = (i ? dt(o.height) : o.height) / s;
|
|
823
823
|
return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
824
824
|
x: r,
|
|
825
825
|
y: c
|
|
826
826
|
};
|
|
827
827
|
}
|
|
828
828
|
const en = /* @__PURE__ */ D(0);
|
|
829
|
-
function
|
|
830
|
-
const e =
|
|
829
|
+
function he(t) {
|
|
830
|
+
const e = O(t);
|
|
831
831
|
return !Ft() || !e.visualViewport ? en : {
|
|
832
832
|
x: e.visualViewport.offsetLeft,
|
|
833
833
|
y: e.visualViewport.offsetTop
|
|
834
834
|
};
|
|
835
835
|
}
|
|
836
|
-
function nn(t, e,
|
|
837
|
-
return e === void 0 && (e = !1), !
|
|
836
|
+
function nn(t, e, o) {
|
|
837
|
+
return e === void 0 && (e = !1), !o || e && o !== O(t) ? !1 : e;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
840
|
-
e === void 0 && (e = !1),
|
|
839
|
+
function J(t, e, o, n) {
|
|
840
|
+
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
841
841
|
const s = t.getBoundingClientRect(), i = Mt(t);
|
|
842
842
|
let r = D(1);
|
|
843
|
-
e && (
|
|
844
|
-
const c = nn(i,
|
|
843
|
+
e && (n ? k(n) && (r = G(n)) : r = G(t));
|
|
844
|
+
const c = nn(i, o, n) ? he(i) : D(0);
|
|
845
845
|
let l = (s.left + c.x) / r.x, a = (s.top + c.y) / r.y, h = s.width / r.x, f = s.height / r.y;
|
|
846
846
|
if (i) {
|
|
847
|
-
const m =
|
|
848
|
-
let d = m,
|
|
849
|
-
for (;
|
|
850
|
-
const
|
|
851
|
-
l *=
|
|
847
|
+
const m = O(i), u = n && k(n) ? O(n) : n;
|
|
848
|
+
let d = m, p = Tt(d);
|
|
849
|
+
for (; p && n && u !== d; ) {
|
|
850
|
+
const w = G(p), g = p.getBoundingClientRect(), x = C(p), y = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, b = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
|
|
851
|
+
l *= w.x, a *= w.y, h *= w.x, f *= w.y, l += y, a += b, d = O(p), p = Tt(d);
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
|
-
return
|
|
854
|
+
return gt({
|
|
855
855
|
width: h,
|
|
856
856
|
height: f,
|
|
857
857
|
x: l,
|
|
@@ -859,15 +859,15 @@ function K(t, e, n, o) {
|
|
|
859
859
|
});
|
|
860
860
|
}
|
|
861
861
|
function Vt(t, e) {
|
|
862
|
-
const
|
|
863
|
-
return e ? e.left +
|
|
862
|
+
const o = xt(t).scrollLeft;
|
|
863
|
+
return e ? e.left + o : J(F(t)).left + o;
|
|
864
864
|
}
|
|
865
|
-
function
|
|
866
|
-
|
|
867
|
-
const
|
|
865
|
+
function de(t, e, o) {
|
|
866
|
+
o === void 0 && (o = !1);
|
|
867
|
+
const n = t.getBoundingClientRect(), s = n.left + e.scrollLeft - (o ? 0 : (
|
|
868
868
|
// RTL <body> scrollbar.
|
|
869
|
-
Vt(t,
|
|
870
|
-
)), i =
|
|
869
|
+
Vt(t, n)
|
|
870
|
+
)), i = n.top + e.scrollTop;
|
|
871
871
|
return {
|
|
872
872
|
x: s,
|
|
873
873
|
y: i
|
|
@@ -876,38 +876,38 @@ function me(t, e, n) {
|
|
|
876
876
|
function on(t) {
|
|
877
877
|
let {
|
|
878
878
|
elements: e,
|
|
879
|
-
rect:
|
|
880
|
-
offsetParent:
|
|
879
|
+
rect: o,
|
|
880
|
+
offsetParent: n,
|
|
881
881
|
strategy: s
|
|
882
882
|
} = t;
|
|
883
|
-
const i = s === "fixed", r = F(
|
|
884
|
-
if (
|
|
885
|
-
return
|
|
883
|
+
const i = s === "fixed", r = F(n), c = e ? yt(e.floating) : !1;
|
|
884
|
+
if (n === r || c && i)
|
|
885
|
+
return o;
|
|
886
886
|
let l = {
|
|
887
887
|
scrollLeft: 0,
|
|
888
888
|
scrollTop: 0
|
|
889
889
|
}, a = D(1);
|
|
890
|
-
const h = D(0), f = W(
|
|
891
|
-
if ((f || !f && !i) && ((tt(
|
|
892
|
-
const u =
|
|
893
|
-
a =
|
|
890
|
+
const h = D(0), f = W(n);
|
|
891
|
+
if ((f || !f && !i) && ((tt(n) !== "body" || at(r)) && (l = xt(n)), W(n))) {
|
|
892
|
+
const u = J(n);
|
|
893
|
+
a = G(n), h.x = u.x + n.clientLeft, h.y = u.y + n.clientTop;
|
|
894
894
|
}
|
|
895
|
-
const m = r && !f && !i ?
|
|
895
|
+
const m = r && !f && !i ? de(r, l, !0) : D(0);
|
|
896
896
|
return {
|
|
897
|
-
width:
|
|
898
|
-
height:
|
|
899
|
-
x:
|
|
900
|
-
y:
|
|
897
|
+
width: o.width * a.x,
|
|
898
|
+
height: o.height * a.y,
|
|
899
|
+
x: o.x * a.x - l.scrollLeft * a.x + h.x + m.x,
|
|
900
|
+
y: o.y * a.y - l.scrollTop * a.y + h.y + m.y
|
|
901
901
|
};
|
|
902
902
|
}
|
|
903
903
|
function sn(t) {
|
|
904
904
|
return Array.from(t.getClientRects());
|
|
905
905
|
}
|
|
906
906
|
function rn(t) {
|
|
907
|
-
const e = F(t),
|
|
908
|
-
let r = -
|
|
909
|
-
const c = -
|
|
910
|
-
return C(
|
|
907
|
+
const e = F(t), o = xt(t), n = t.ownerDocument.body, s = X(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = X(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
908
|
+
let r = -o.scrollLeft + Vt(t);
|
|
909
|
+
const c = -o.scrollTop;
|
|
910
|
+
return C(n).direction === "rtl" && (r += X(e.clientWidth, n.clientWidth) - s), {
|
|
911
911
|
width: s,
|
|
912
912
|
height: i,
|
|
913
913
|
x: r,
|
|
@@ -915,8 +915,8 @@ function rn(t) {
|
|
|
915
915
|
};
|
|
916
916
|
}
|
|
917
917
|
function cn(t, e) {
|
|
918
|
-
const
|
|
919
|
-
let i =
|
|
918
|
+
const o = O(t), n = F(t), s = o.visualViewport;
|
|
919
|
+
let i = n.clientWidth, r = n.clientHeight, c = 0, l = 0;
|
|
920
920
|
if (s) {
|
|
921
921
|
i = s.width, r = s.height;
|
|
922
922
|
const a = Ft();
|
|
@@ -930,7 +930,7 @@ function cn(t, e) {
|
|
|
930
930
|
};
|
|
931
931
|
}
|
|
932
932
|
function ln(t, e) {
|
|
933
|
-
const
|
|
933
|
+
const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, s = o.left + t.clientLeft, i = W(t) ? G(t) : D(1), r = t.clientWidth * i.x, c = t.clientHeight * i.y, l = s * i.x, a = n * i.y;
|
|
934
934
|
return {
|
|
935
935
|
width: r,
|
|
936
936
|
height: c,
|
|
@@ -938,52 +938,52 @@ function ln(t, e) {
|
|
|
938
938
|
y: a
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
|
-
function Bt(t, e,
|
|
942
|
-
let
|
|
941
|
+
function Bt(t, e, o) {
|
|
942
|
+
let n;
|
|
943
943
|
if (e === "viewport")
|
|
944
|
-
|
|
944
|
+
n = cn(t, o);
|
|
945
945
|
else if (e === "document")
|
|
946
|
-
|
|
946
|
+
n = rn(F(t));
|
|
947
947
|
else if (k(e))
|
|
948
|
-
|
|
948
|
+
n = ln(e, o);
|
|
949
949
|
else {
|
|
950
|
-
const s =
|
|
951
|
-
|
|
950
|
+
const s = he(t);
|
|
951
|
+
n = {
|
|
952
952
|
x: e.x - s.x,
|
|
953
953
|
y: e.y - s.y,
|
|
954
954
|
width: e.width,
|
|
955
955
|
height: e.height
|
|
956
956
|
};
|
|
957
957
|
}
|
|
958
|
-
return
|
|
958
|
+
return gt(n);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
961
|
-
const
|
|
962
|
-
return
|
|
960
|
+
function me(t, e) {
|
|
961
|
+
const o = U(t);
|
|
962
|
+
return o === e || !k(o) || Z(o) ? !1 : C(o).position === "fixed" || me(o, e);
|
|
963
963
|
}
|
|
964
964
|
function an(t, e) {
|
|
965
|
-
const
|
|
966
|
-
if (
|
|
967
|
-
return
|
|
968
|
-
let
|
|
965
|
+
const o = e.get(t);
|
|
966
|
+
if (o)
|
|
967
|
+
return o;
|
|
968
|
+
let n = st(t, [], !1).filter((c) => k(c) && tt(c) !== "body"), s = null;
|
|
969
969
|
const i = C(t).position === "fixed";
|
|
970
970
|
let r = i ? U(t) : t;
|
|
971
971
|
for (; k(r) && !Z(r); ) {
|
|
972
972
|
const c = C(r), l = Wt(r);
|
|
973
|
-
!l && c.position === "fixed" && (s = null), (i ? !l && !s : !l && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) ||
|
|
973
|
+
!l && c.position === "fixed" && (s = null), (i ? !l && !s : !l && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || at(r) && !l && me(t, r)) ? n = n.filter((h) => h !== r) : s = c, r = U(r);
|
|
974
974
|
}
|
|
975
|
-
return e.set(t,
|
|
975
|
+
return e.set(t, n), n;
|
|
976
976
|
}
|
|
977
977
|
function un(t) {
|
|
978
978
|
let {
|
|
979
979
|
element: e,
|
|
980
|
-
boundary:
|
|
981
|
-
rootBoundary:
|
|
980
|
+
boundary: o,
|
|
981
|
+
rootBoundary: n,
|
|
982
982
|
strategy: s
|
|
983
983
|
} = t;
|
|
984
|
-
const r = [...
|
|
984
|
+
const r = [...o === "clippingAncestors" ? yt(e) ? [] : an(e, this._c) : [].concat(o), n], c = r[0], l = r.reduce((a, h) => {
|
|
985
985
|
const f = Bt(e, h, s);
|
|
986
|
-
return a.top =
|
|
986
|
+
return a.top = X(f.top, a.top), a.right = Q(f.right, a.right), a.bottom = Q(f.bottom, a.bottom), a.left = X(f.left, a.left), a;
|
|
987
987
|
}, Bt(e, c, s));
|
|
988
988
|
return {
|
|
989
989
|
width: l.right - l.left,
|
|
@@ -995,15 +995,15 @@ function un(t) {
|
|
|
995
995
|
function fn(t) {
|
|
996
996
|
const {
|
|
997
997
|
width: e,
|
|
998
|
-
height:
|
|
999
|
-
} =
|
|
998
|
+
height: o
|
|
999
|
+
} = fe(t);
|
|
1000
1000
|
return {
|
|
1001
1001
|
width: e,
|
|
1002
|
-
height:
|
|
1002
|
+
height: o
|
|
1003
1003
|
};
|
|
1004
1004
|
}
|
|
1005
|
-
function hn(t, e,
|
|
1006
|
-
const
|
|
1005
|
+
function hn(t, e, o) {
|
|
1006
|
+
const n = W(e), s = F(e), i = o === "fixed", r = J(t, !0, i, e);
|
|
1007
1007
|
let c = {
|
|
1008
1008
|
scrollLeft: 0,
|
|
1009
1009
|
scrollTop: 0
|
|
@@ -1012,13 +1012,13 @@ function hn(t, e, n) {
|
|
|
1012
1012
|
function a() {
|
|
1013
1013
|
l.x = Vt(s);
|
|
1014
1014
|
}
|
|
1015
|
-
if (
|
|
1016
|
-
if ((tt(e) !== "body" ||
|
|
1017
|
-
const u =
|
|
1015
|
+
if (n || !n && !i)
|
|
1016
|
+
if ((tt(e) !== "body" || at(s)) && (c = xt(e)), n) {
|
|
1017
|
+
const u = J(e, !0, i, e);
|
|
1018
1018
|
l.x = u.x + e.clientLeft, l.y = u.y + e.clientTop;
|
|
1019
1019
|
} else s && a();
|
|
1020
|
-
i && !
|
|
1021
|
-
const h = s && !
|
|
1020
|
+
i && !n && s && a();
|
|
1021
|
+
const h = s && !n && !i ? de(s, c) : D(0), f = r.left + c.scrollLeft - l.x - h.x, m = r.top + c.scrollTop - l.y - h.y;
|
|
1022
1022
|
return {
|
|
1023
1023
|
x: f,
|
|
1024
1024
|
y: m,
|
|
@@ -1034,13 +1034,13 @@ function Ut(t, e) {
|
|
|
1034
1034
|
return null;
|
|
1035
1035
|
if (e)
|
|
1036
1036
|
return e(t);
|
|
1037
|
-
let
|
|
1038
|
-
return F(t) ===
|
|
1037
|
+
let o = t.offsetParent;
|
|
1038
|
+
return F(t) === o && (o = o.ownerDocument.body), o;
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1041
|
-
const
|
|
1040
|
+
function ge(t, e) {
|
|
1041
|
+
const o = O(t);
|
|
1042
1042
|
if (yt(t))
|
|
1043
|
-
return
|
|
1043
|
+
return o;
|
|
1044
1044
|
if (!W(t)) {
|
|
1045
1045
|
let s = U(t);
|
|
1046
1046
|
for (; s && !Z(s); ) {
|
|
@@ -1048,22 +1048,22 @@ function pe(t, e) {
|
|
|
1048
1048
|
return s;
|
|
1049
1049
|
s = U(s);
|
|
1050
1050
|
}
|
|
1051
|
-
return
|
|
1051
|
+
return o;
|
|
1052
1052
|
}
|
|
1053
|
-
let
|
|
1054
|
-
for (;
|
|
1055
|
-
|
|
1056
|
-
return
|
|
1053
|
+
let n = Ut(t, e);
|
|
1054
|
+
for (; n && Ze(n) && At(n); )
|
|
1055
|
+
n = Ut(n, e);
|
|
1056
|
+
return n && Z(n) && At(n) && !Wt(n) ? o : n || tn(t) || o;
|
|
1057
1057
|
}
|
|
1058
1058
|
const dn = async function(t) {
|
|
1059
|
-
const e = this.getOffsetParent ||
|
|
1059
|
+
const e = this.getOffsetParent || ge, o = this.getDimensions, n = await o(t.floating);
|
|
1060
1060
|
return {
|
|
1061
1061
|
reference: hn(t.reference, await e(t.floating), t.strategy),
|
|
1062
1062
|
floating: {
|
|
1063
1063
|
x: 0,
|
|
1064
1064
|
y: 0,
|
|
1065
|
-
width:
|
|
1066
|
-
height:
|
|
1065
|
+
width: n.width,
|
|
1066
|
+
height: n.height
|
|
1067
1067
|
}
|
|
1068
1068
|
};
|
|
1069
1069
|
};
|
|
@@ -1074,23 +1074,23 @@ const gn = {
|
|
|
1074
1074
|
convertOffsetParentRelativeRectToViewportRelativeRect: on,
|
|
1075
1075
|
getDocumentElement: F,
|
|
1076
1076
|
getClippingRect: un,
|
|
1077
|
-
getOffsetParent:
|
|
1077
|
+
getOffsetParent: ge,
|
|
1078
1078
|
getElementRects: dn,
|
|
1079
1079
|
getClientRects: sn,
|
|
1080
1080
|
getDimensions: fn,
|
|
1081
|
-
getScale:
|
|
1081
|
+
getScale: G,
|
|
1082
1082
|
isElement: k,
|
|
1083
1083
|
isRTL: mn
|
|
1084
1084
|
};
|
|
1085
|
-
function
|
|
1085
|
+
function pe(t, e) {
|
|
1086
1086
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1087
1087
|
}
|
|
1088
1088
|
function pn(t, e) {
|
|
1089
|
-
let
|
|
1089
|
+
let o = null, n;
|
|
1090
1090
|
const s = F(t);
|
|
1091
1091
|
function i() {
|
|
1092
1092
|
var c;
|
|
1093
|
-
clearTimeout(
|
|
1093
|
+
clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
|
|
1094
1094
|
}
|
|
1095
1095
|
function r(c, l) {
|
|
1096
1096
|
c === void 0 && (c = !1), l === void 0 && (l = 1), i();
|
|
@@ -1102,9 +1102,9 @@ function pn(t, e) {
|
|
|
1102
1102
|
} = a;
|
|
1103
1103
|
if (c || e(), !m || !u)
|
|
1104
1104
|
return;
|
|
1105
|
-
const d =
|
|
1106
|
-
rootMargin: -d + "px " + -
|
|
1107
|
-
threshold:
|
|
1105
|
+
const d = ft(f), p = ft(s.clientWidth - (h + m)), w = ft(s.clientHeight - (f + u)), g = ft(h), y = {
|
|
1106
|
+
rootMargin: -d + "px " + -p + "px " + -w + "px " + -g + "px",
|
|
1107
|
+
threshold: X(0, Q(1, l)) || 1
|
|
1108
1108
|
};
|
|
1109
1109
|
let b = !0;
|
|
1110
1110
|
function v(L) {
|
|
@@ -1112,190 +1112,211 @@ function pn(t, e) {
|
|
|
1112
1112
|
if (A !== l) {
|
|
1113
1113
|
if (!b)
|
|
1114
1114
|
return r();
|
|
1115
|
-
A ? r(!1, A) :
|
|
1115
|
+
A ? r(!1, A) : n = setTimeout(() => {
|
|
1116
1116
|
r(!1, 1e-7);
|
|
1117
1117
|
}, 1e3);
|
|
1118
1118
|
}
|
|
1119
|
-
A === 1 && !
|
|
1119
|
+
A === 1 && !pe(a, t.getBoundingClientRect()) && r(), b = !1;
|
|
1120
1120
|
}
|
|
1121
1121
|
try {
|
|
1122
|
-
|
|
1123
|
-
...
|
|
1122
|
+
o = new IntersectionObserver(v, {
|
|
1123
|
+
...y,
|
|
1124
1124
|
// Handle <iframe>s
|
|
1125
1125
|
root: s.ownerDocument
|
|
1126
1126
|
});
|
|
1127
1127
|
} catch {
|
|
1128
|
-
|
|
1128
|
+
o = new IntersectionObserver(v, y);
|
|
1129
1129
|
}
|
|
1130
|
-
|
|
1130
|
+
o.observe(t);
|
|
1131
1131
|
}
|
|
1132
1132
|
return r(!0), i;
|
|
1133
1133
|
}
|
|
1134
|
-
function wn(t, e,
|
|
1135
|
-
|
|
1134
|
+
function wn(t, e, o, n) {
|
|
1135
|
+
n === void 0 && (n = {});
|
|
1136
1136
|
const {
|
|
1137
1137
|
ancestorScroll: s = !0,
|
|
1138
1138
|
ancestorResize: i = !0,
|
|
1139
1139
|
elementResize: r = typeof ResizeObserver == "function",
|
|
1140
1140
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1141
1141
|
animationFrame: l = !1
|
|
1142
|
-
} =
|
|
1143
|
-
h.forEach((
|
|
1144
|
-
s &&
|
|
1142
|
+
} = n, a = Mt(t), h = s || i ? [...a ? st(a) : [], ...st(e)] : [];
|
|
1143
|
+
h.forEach((g) => {
|
|
1144
|
+
s && g.addEventListener("scroll", o, {
|
|
1145
1145
|
passive: !0
|
|
1146
|
-
}), i &&
|
|
1146
|
+
}), i && g.addEventListener("resize", o);
|
|
1147
1147
|
});
|
|
1148
|
-
const f = a && c ? pn(a,
|
|
1148
|
+
const f = a && c ? pn(a, o) : null;
|
|
1149
1149
|
let m = -1, u = null;
|
|
1150
|
-
r && (u = new ResizeObserver((
|
|
1151
|
-
let [
|
|
1152
|
-
|
|
1153
|
-
var
|
|
1154
|
-
(
|
|
1155
|
-
})),
|
|
1150
|
+
r && (u = new ResizeObserver((g) => {
|
|
1151
|
+
let [x] = g;
|
|
1152
|
+
x && x.target === a && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1153
|
+
var y;
|
|
1154
|
+
(y = u) == null || y.observe(e);
|
|
1155
|
+
})), o();
|
|
1156
1156
|
}), a && !l && u.observe(a), u.observe(e));
|
|
1157
|
-
let d,
|
|
1158
|
-
l &&
|
|
1159
|
-
function
|
|
1160
|
-
const
|
|
1161
|
-
|
|
1157
|
+
let d, p = l ? J(t) : null;
|
|
1158
|
+
l && w();
|
|
1159
|
+
function w() {
|
|
1160
|
+
const g = J(t);
|
|
1161
|
+
p && !pe(p, g) && o(), p = g, d = requestAnimationFrame(w);
|
|
1162
1162
|
}
|
|
1163
|
-
return
|
|
1164
|
-
var
|
|
1165
|
-
h.forEach((
|
|
1166
|
-
s &&
|
|
1167
|
-
}), f == null || f(), (
|
|
1163
|
+
return o(), () => {
|
|
1164
|
+
var g;
|
|
1165
|
+
h.forEach((x) => {
|
|
1166
|
+
s && x.removeEventListener("scroll", o), i && x.removeEventListener("resize", o);
|
|
1167
|
+
}), f == null || f(), (g = u) == null || g.disconnect(), u = null, l && cancelAnimationFrame(d);
|
|
1168
1168
|
};
|
|
1169
1169
|
}
|
|
1170
|
-
const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e,
|
|
1171
|
-
const
|
|
1170
|
+
const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
|
|
1171
|
+
const n = /* @__PURE__ */ new Map(), s = {
|
|
1172
1172
|
platform: gn,
|
|
1173
|
-
...
|
|
1173
|
+
...o
|
|
1174
1174
|
}, i = {
|
|
1175
1175
|
...s.platform,
|
|
1176
|
-
_c:
|
|
1176
|
+
_c: n
|
|
1177
1177
|
};
|
|
1178
1178
|
return qe(t, e, {
|
|
1179
1179
|
...s,
|
|
1180
1180
|
platform: i
|
|
1181
1181
|
});
|
|
1182
|
-
}, jn =
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
strategy: "absolute",
|
|
1226
|
-
middleware: x
|
|
1227
|
-
}), { x: v, y: L, middlewareData: A } = b;
|
|
1228
|
-
if (d.style.top = `${L}px`, d.style.left = `${v}px`, g != null && A.arrow != null) {
|
|
1229
|
-
const {
|
|
1230
|
-
x: _,
|
|
1231
|
-
y: M,
|
|
1232
|
-
centerOffset: O,
|
|
1233
|
-
alignmentOffset: I
|
|
1234
|
-
} = A.arrow;
|
|
1235
|
-
m.set({
|
|
1236
|
-
x: _,
|
|
1237
|
-
y: M,
|
|
1238
|
-
centerOffset: O,
|
|
1239
|
-
alignmentOffset: I,
|
|
1240
|
-
containerWidth: d.offsetWidth,
|
|
1241
|
-
containerHeight: d.offsetHeight
|
|
1182
|
+
}, jn = [
|
|
1183
|
+
"top",
|
|
1184
|
+
"top-start",
|
|
1185
|
+
"top-end",
|
|
1186
|
+
"right",
|
|
1187
|
+
"right-start",
|
|
1188
|
+
"right-end",
|
|
1189
|
+
"bottom",
|
|
1190
|
+
"bottom-start",
|
|
1191
|
+
"bottom-end",
|
|
1192
|
+
"left",
|
|
1193
|
+
"left-start",
|
|
1194
|
+
"left-end"
|
|
1195
|
+
], Yn = (t, e = { isOpen: !1 }) => {
|
|
1196
|
+
const o = [];
|
|
1197
|
+
let n = null;
|
|
1198
|
+
const s = E.deriveProp(e.isOpen), i = (c) => {
|
|
1199
|
+
n = c, s.set(!0);
|
|
1200
|
+
}, r = () => {
|
|
1201
|
+
s.set(!1), o.forEach((c) => c()), o.length = 0;
|
|
1202
|
+
};
|
|
1203
|
+
return ot(
|
|
1204
|
+
te(
|
|
1205
|
+
s,
|
|
1206
|
+
() => q(
|
|
1207
|
+
(c) => Zt(
|
|
1208
|
+
"body",
|
|
1209
|
+
Rt.div(
|
|
1210
|
+
q((l) => {
|
|
1211
|
+
l.style.position = "absolute";
|
|
1212
|
+
const a = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
|
|
1213
|
+
n.target
|
|
1214
|
+
) : (n == null ? void 0 : n.target) ?? c;
|
|
1215
|
+
if (a == null)
|
|
1216
|
+
throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
|
|
1217
|
+
let h = null;
|
|
1218
|
+
const f = E.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), m = E.toSignal((n == null ? void 0 : n.crossAxisOffset) ?? 0), u = E.toSignal((n == null ? void 0 : n.placement) ?? "top"), d = E.toSignal((n == null ? void 0 : n.arrowPadding) ?? 0), p = n == null ? void 0 : n.arrow, w = N({
|
|
1219
|
+
centerOffset: 0,
|
|
1220
|
+
alignmentOffset: 0,
|
|
1221
|
+
containerWidth: 0,
|
|
1222
|
+
containerHeight: 0,
|
|
1223
|
+
x: void 0,
|
|
1224
|
+
y: void 0
|
|
1242
1225
|
});
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1226
|
+
async function g() {
|
|
1227
|
+
const y = [
|
|
1228
|
+
zt(),
|
|
1229
|
+
yn({
|
|
1230
|
+
mainAxis: f.get(),
|
|
1231
|
+
crossAxis: m.get()
|
|
1232
|
+
}),
|
|
1233
|
+
xn(),
|
|
1234
|
+
zt()
|
|
1235
|
+
];
|
|
1236
|
+
p != null && h != null && y.push(
|
|
1237
|
+
vn({
|
|
1238
|
+
element: h,
|
|
1239
|
+
padding: d.get()
|
|
1240
|
+
})
|
|
1241
|
+
);
|
|
1242
|
+
const b = await bn(a, l, {
|
|
1243
|
+
placement: u.get(),
|
|
1244
|
+
strategy: "absolute",
|
|
1245
|
+
middleware: y
|
|
1246
|
+
}), { x: v, y: L, middlewareData: A } = b;
|
|
1247
|
+
if (l.style.top = `${L}px`, l.style.left = `${v}px`, h != null && A.arrow != null) {
|
|
1248
|
+
const {
|
|
1249
|
+
x: _,
|
|
1250
|
+
y: M,
|
|
1251
|
+
centerOffset: S,
|
|
1252
|
+
alignmentOffset: I
|
|
1253
|
+
} = A.arrow;
|
|
1254
|
+
w.set({
|
|
1255
|
+
x: _,
|
|
1256
|
+
y: M,
|
|
1257
|
+
centerOffset: S,
|
|
1258
|
+
alignmentOffset: I,
|
|
1259
|
+
containerWidth: l.offsetWidth,
|
|
1260
|
+
containerHeight: l.offsetHeight
|
|
1261
|
+
});
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
const x = ve(
|
|
1265
|
+
f,
|
|
1266
|
+
m,
|
|
1267
|
+
u
|
|
1268
|
+
)(g);
|
|
1269
|
+
return ot(
|
|
1270
|
+
n == null ? void 0 : n.content,
|
|
1271
|
+
(n == null ? void 0 : n.arrow) != null ? Rt.div(
|
|
1272
|
+
n == null ? void 0 : n.arrow(
|
|
1273
|
+
ee(
|
|
1274
|
+
w,
|
|
1275
|
+
u
|
|
1276
|
+
)((y, b) => ({
|
|
1277
|
+
...y,
|
|
1278
|
+
placement: b
|
|
1279
|
+
}))
|
|
1280
|
+
),
|
|
1281
|
+
q((y) => {
|
|
1282
|
+
h = y, g();
|
|
1283
|
+
})
|
|
1284
|
+
) : null,
|
|
1285
|
+
z(
|
|
1286
|
+
w.dispose,
|
|
1287
|
+
wn(a, l, g),
|
|
1288
|
+
x
|
|
1289
|
+
)
|
|
1290
|
+
);
|
|
1291
|
+
})
|
|
1292
|
+
)
|
|
1293
|
+
)
|
|
1274
1294
|
)
|
|
1275
|
-
)
|
|
1295
|
+
),
|
|
1296
|
+
t(i, r)
|
|
1276
1297
|
);
|
|
1277
|
-
}
|
|
1278
|
-
const
|
|
1298
|
+
}, An = (t, e, o) => {
|
|
1299
|
+
const n = N(H.notAsked), s = n.map(
|
|
1279
1300
|
(f) => H.isSuccess(f) ? f.value : void 0
|
|
1280
|
-
), i =
|
|
1301
|
+
), i = n.map(
|
|
1281
1302
|
(f) => H.isFailure(f) ? f.error : void 0
|
|
1282
|
-
), r =
|
|
1303
|
+
), r = n.map((f) => H.isLoading(f));
|
|
1283
1304
|
let c;
|
|
1284
1305
|
const l = async (f) => {
|
|
1285
1306
|
c == null || c.abort(), c = new AbortController();
|
|
1286
|
-
const m = c.signal, u =
|
|
1287
|
-
|
|
1307
|
+
const m = c.signal, u = n.get();
|
|
1308
|
+
n.set(H.loading(H.getOrUndefined(u)));
|
|
1288
1309
|
try {
|
|
1289
1310
|
const d = await e({ request: f, abortSignal: m, previous: u });
|
|
1290
|
-
await Promise.resolve(), c = void 0,
|
|
1311
|
+
await Promise.resolve(), c = void 0, n.set(H.success(d));
|
|
1291
1312
|
} catch (d) {
|
|
1292
|
-
c = void 0,
|
|
1313
|
+
c = void 0, n.set(H.failure(o(d)));
|
|
1293
1314
|
}
|
|
1294
|
-
}, a = () => l(
|
|
1295
|
-
c == null || c.abort(), c = void 0,
|
|
1315
|
+
}, a = () => l(E.get(t)), h = () => {
|
|
1316
|
+
c == null || c.abort(), c = void 0, n.dispose();
|
|
1296
1317
|
};
|
|
1297
|
-
return
|
|
1298
|
-
status:
|
|
1318
|
+
return n.onDispose(E.on(t, l)), {
|
|
1319
|
+
status: n,
|
|
1299
1320
|
value: s,
|
|
1300
1321
|
error: i,
|
|
1301
1322
|
loading: r,
|
|
@@ -1303,34 +1324,34 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, n) => {
|
|
|
1303
1324
|
dispose: h
|
|
1304
1325
|
};
|
|
1305
1326
|
}, Rn = (t, e) => {
|
|
1306
|
-
const { status:
|
|
1307
|
-
return
|
|
1308
|
-
z(
|
|
1309
|
-
|
|
1327
|
+
const { status: o, dispose: n, reload: s } = t, { loading: i, failure: r, success: c } = e;
|
|
1328
|
+
return ot(
|
|
1329
|
+
z(n),
|
|
1330
|
+
ie(o, {
|
|
1310
1331
|
loading: i != null ? (l) => i(l, s) : void 0,
|
|
1311
1332
|
failure: r != null ? (l) => r(l, s) : void 0,
|
|
1312
1333
|
success: (l) => c(l, s)
|
|
1313
1334
|
})
|
|
1314
1335
|
);
|
|
1315
|
-
},
|
|
1336
|
+
}, qn = ({
|
|
1316
1337
|
request: t,
|
|
1317
1338
|
load: e,
|
|
1318
|
-
mapError:
|
|
1339
|
+
mapError: o = (n) => n
|
|
1319
1340
|
}) => {
|
|
1320
|
-
const
|
|
1321
|
-
return (s) => Rn(
|
|
1322
|
-
},
|
|
1341
|
+
const n = An(t, e, o);
|
|
1342
|
+
return (s) => Rn(n, s);
|
|
1343
|
+
}, On = (t, e) => {
|
|
1323
1344
|
if (typeof e == "function")
|
|
1324
|
-
return
|
|
1325
|
-
const
|
|
1345
|
+
return On(t, { success: e });
|
|
1346
|
+
const o = e.failure ?? ((s) => ot(
|
|
1326
1347
|
z(s.on(console.error)),
|
|
1327
1348
|
s.map((i) => `Error: ${i}`)
|
|
1328
|
-
)),
|
|
1329
|
-
return Qt(
|
|
1330
|
-
Success: (s) =>
|
|
1331
|
-
Failure: (s) =>
|
|
1349
|
+
)), n = e.success;
|
|
1350
|
+
return Qt(E.toSignal(t), {
|
|
1351
|
+
Success: (s) => n(s.$.value),
|
|
1352
|
+
Failure: (s) => o(s.$.error)
|
|
1332
1353
|
});
|
|
1333
|
-
},
|
|
1354
|
+
}, Xn = () => Jt.focus((t) => {
|
|
1334
1355
|
var e;
|
|
1335
1356
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1336
1357
|
});
|
|
@@ -1352,7 +1373,7 @@ class vt {
|
|
|
1352
1373
|
* console.log(rect.height); // 50
|
|
1353
1374
|
* ```
|
|
1354
1375
|
*/
|
|
1355
|
-
constructor(e,
|
|
1376
|
+
constructor(e, o, n, s) {
|
|
1356
1377
|
/**
|
|
1357
1378
|
* Compares this rectangle with another rectangle for equality.
|
|
1358
1379
|
*
|
|
@@ -1373,8 +1394,8 @@ class vt {
|
|
|
1373
1394
|
* console.log(rect1.equals(rect3)); // true (within tolerance)
|
|
1374
1395
|
* ```
|
|
1375
1396
|
*/
|
|
1376
|
-
bt(this, "equals", (e) =>
|
|
1377
|
-
this.left = e, this.top =
|
|
1397
|
+
bt(this, "equals", (e) => ut(this.left, e.left) && ut(this.top, e.top) && ut(this.width, e.width) && ut(this.height, e.height));
|
|
1398
|
+
this.left = e, this.top = o, this.width = n, this.height = s;
|
|
1378
1399
|
}
|
|
1379
1400
|
/**
|
|
1380
1401
|
* Creates a new Rect instance using an object with optional properties.
|
|
@@ -1403,11 +1424,11 @@ class vt {
|
|
|
1403
1424
|
*/
|
|
1404
1425
|
static of({
|
|
1405
1426
|
left: e = 0,
|
|
1406
|
-
top:
|
|
1407
|
-
width:
|
|
1427
|
+
top: o = 0,
|
|
1428
|
+
width: n = 0,
|
|
1408
1429
|
height: s = 0
|
|
1409
1430
|
}) {
|
|
1410
|
-
return new vt(e,
|
|
1431
|
+
return new vt(e, o, n, s);
|
|
1411
1432
|
}
|
|
1412
1433
|
/**
|
|
1413
1434
|
* Gets the x-coordinate of the right edge of the rectangle.
|
|
@@ -1482,59 +1503,59 @@ function _t(t) {
|
|
|
1482
1503
|
height: e.height
|
|
1483
1504
|
});
|
|
1484
1505
|
}
|
|
1485
|
-
const
|
|
1486
|
-
const { element:
|
|
1487
|
-
|
|
1506
|
+
const En = (t) => be((e) => {
|
|
1507
|
+
const { element: o } = e, n = N(_t(o)), s = kt(t(n))(e), i = () => {
|
|
1508
|
+
n.set(vt.of(_t(o)));
|
|
1488
1509
|
};
|
|
1489
1510
|
let r;
|
|
1490
|
-
return typeof ResizeObserver == "function" && (r = new ResizeObserver(i), r.observe(
|
|
1511
|
+
return typeof ResizeObserver == "function" && (r = new ResizeObserver(i), r.observe(o)), z((c) => {
|
|
1491
1512
|
r == null || r.disconnect(), s(c);
|
|
1492
1513
|
});
|
|
1493
|
-
}),
|
|
1494
|
-
const
|
|
1495
|
-
width: (
|
|
1496
|
-
height: (
|
|
1497
|
-
}), s =
|
|
1498
|
-
|
|
1499
|
-
width: (
|
|
1500
|
-
height: (
|
|
1514
|
+
}), Kn = (t) => En(t), Jn = (t) => (e) => {
|
|
1515
|
+
const o = rt(), n = N({
|
|
1516
|
+
width: (o == null ? void 0 : o.innerWidth) ?? 0,
|
|
1517
|
+
height: (o == null ? void 0 : o.innerHeight) ?? 0
|
|
1518
|
+
}), s = kt(t(n))(e), i = () => {
|
|
1519
|
+
n.set({
|
|
1520
|
+
width: (o == null ? void 0 : o.innerWidth) ?? 0,
|
|
1521
|
+
height: (o == null ? void 0 : o.innerHeight) ?? 0
|
|
1501
1522
|
});
|
|
1502
1523
|
};
|
|
1503
|
-
return
|
|
1504
|
-
|
|
1524
|
+
return o == null || o.addEventListener("resize", i), (r) => {
|
|
1525
|
+
o == null || o.removeEventListener("resize", i), s(r);
|
|
1505
1526
|
};
|
|
1506
|
-
},
|
|
1507
|
-
const
|
|
1527
|
+
}, Ln = (t, e) => {
|
|
1528
|
+
const o = e.split("/").filter((s) => s !== ""), n = {};
|
|
1508
1529
|
for (let s = 0; s < t.length; s++) {
|
|
1509
|
-
const i = t[s], r =
|
|
1530
|
+
const i = t[s], r = o[s];
|
|
1510
1531
|
if (!r && i.type !== "catch-all")
|
|
1511
1532
|
return null;
|
|
1512
1533
|
if (i.type === "literal") {
|
|
1513
1534
|
if (i.value !== r)
|
|
1514
1535
|
return null;
|
|
1515
1536
|
} else if (i.type === "param")
|
|
1516
|
-
|
|
1537
|
+
n[i.name] = r;
|
|
1517
1538
|
else if (i.type === "catch-all")
|
|
1518
|
-
return { params:
|
|
1539
|
+
return { params: n, path: e };
|
|
1519
1540
|
}
|
|
1520
|
-
return
|
|
1541
|
+
return o.length !== t.length ? null : { params: n, path: e };
|
|
1521
1542
|
}, Sn = (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 !== ""), Tn = (t) => {
|
|
1522
|
-
const e = t.map((
|
|
1523
|
-
const
|
|
1524
|
-
return { route:
|
|
1543
|
+
const e = t.map((o) => {
|
|
1544
|
+
const n = Sn(o);
|
|
1545
|
+
return { route: o, segments: n };
|
|
1525
1546
|
});
|
|
1526
|
-
return function(
|
|
1547
|
+
return function(n) {
|
|
1527
1548
|
for (const { segments: s, route: i } of e) {
|
|
1528
|
-
const r =
|
|
1549
|
+
const r = Ln(s, n);
|
|
1529
1550
|
if (r)
|
|
1530
1551
|
return { ...r, route: i };
|
|
1531
1552
|
}
|
|
1532
1553
|
return null;
|
|
1533
1554
|
};
|
|
1534
|
-
},
|
|
1555
|
+
}, Gn = (t) => {
|
|
1535
1556
|
const e = Tn(Object.keys(t));
|
|
1536
|
-
return Kt(
|
|
1537
|
-
const
|
|
1557
|
+
return Kt(se, (o) => {
|
|
1558
|
+
const n = o.map((s) => {
|
|
1538
1559
|
const i = e(s.pathname);
|
|
1539
1560
|
if (i == null)
|
|
1540
1561
|
throw console.error("No route found for", s), new Error("No route found");
|
|
@@ -1547,29 +1568,29 @@ const Ln = (t) => ee((e) => {
|
|
|
1547
1568
|
};
|
|
1548
1569
|
});
|
|
1549
1570
|
return Ae(
|
|
1550
|
-
|
|
1571
|
+
n.map((s) => [s.route, s]),
|
|
1551
1572
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1552
1573
|
t
|
|
1553
1574
|
);
|
|
1554
1575
|
});
|
|
1555
|
-
},
|
|
1576
|
+
}, pt = 60 * 1e3, Pt = 60 * pt, it = 24 * Pt, It = 7 * it, jt = 30 * it, Pn = 365 * it, kn = [
|
|
1556
1577
|
{
|
|
1557
|
-
max:
|
|
1558
|
-
value:
|
|
1578
|
+
max: pt * 90,
|
|
1579
|
+
value: pt,
|
|
1559
1580
|
name: "minute",
|
|
1560
1581
|
past: { singular: "a minute ago", plural: "{} minutes ago" },
|
|
1561
1582
|
future: { singular: "in a minute", plural: "in {} minutes" }
|
|
1562
1583
|
},
|
|
1563
1584
|
{
|
|
1564
|
-
max:
|
|
1565
|
-
value:
|
|
1585
|
+
max: Pt * 36,
|
|
1586
|
+
value: Pt,
|
|
1566
1587
|
name: "hour",
|
|
1567
1588
|
past: { singular: "an hour ago", plural: "{} hours ago" },
|
|
1568
1589
|
future: { singular: "in an hour", plural: "in {} hours" }
|
|
1569
1590
|
},
|
|
1570
1591
|
{
|
|
1571
|
-
max:
|
|
1572
|
-
value:
|
|
1592
|
+
max: it * 10,
|
|
1593
|
+
value: it,
|
|
1573
1594
|
name: "day",
|
|
1574
1595
|
past: { singular: "yesterday", plural: "{} days ago" },
|
|
1575
1596
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
@@ -1590,15 +1611,15 @@ const Ln = (t) => ee((e) => {
|
|
|
1590
1611
|
},
|
|
1591
1612
|
{
|
|
1592
1613
|
max: 1 / 0,
|
|
1593
|
-
value:
|
|
1614
|
+
value: Pn,
|
|
1594
1615
|
name: "year",
|
|
1595
1616
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1596
1617
|
future: { singular: "in a year", plural: "in {} years" }
|
|
1597
1618
|
}
|
|
1598
1619
|
];
|
|
1599
|
-
function Yt(t, e,
|
|
1620
|
+
function Yt(t, e, o, n) {
|
|
1600
1621
|
const s = Math.round(t / e);
|
|
1601
|
-
return s <= 1 ?
|
|
1622
|
+
return s <= 1 ? o : n.replace(
|
|
1602
1623
|
"{}",
|
|
1603
1624
|
s.toLocaleString(void 0, {
|
|
1604
1625
|
maximumFractionDigits: 0,
|
|
@@ -1606,27 +1627,27 @@ function Yt(t, e, n, o) {
|
|
|
1606
1627
|
})
|
|
1607
1628
|
);
|
|
1608
1629
|
}
|
|
1609
|
-
const
|
|
1610
|
-
const e = N(/* @__PURE__ */ new Date()),
|
|
1611
|
-
return e.onDispose(
|
|
1630
|
+
const Cn = (t = 1e3) => {
|
|
1631
|
+
const e = N(/* @__PURE__ */ new Date()), o = Oe(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
1632
|
+
return e.onDispose(o), e;
|
|
1612
1633
|
}, Dn = (t) => {
|
|
1613
1634
|
const e = Math.abs(t);
|
|
1614
|
-
if (e <
|
|
1635
|
+
if (e < pt)
|
|
1615
1636
|
return t < 0 ? "just now" : "in a moment";
|
|
1616
|
-
for (const
|
|
1617
|
-
if (e <
|
|
1618
|
-
return t < 0 ? Yt(e,
|
|
1637
|
+
for (const o of kn)
|
|
1638
|
+
if (e < o.max)
|
|
1639
|
+
return t < 0 ? Yt(e, o.value, o.past.singular, o.past.plural) : Yt(e, o.value, o.future.singular, o.future.plural);
|
|
1619
1640
|
throw new Error("unreachable");
|
|
1620
|
-
}, Wn = (t, { now: e, frequency:
|
|
1621
|
-
const
|
|
1641
|
+
}, Wn = (t, { now: e, frequency: o = 1e4 } = {}) => {
|
|
1642
|
+
const n = e != null ? Xt.is(e) ? e.derive() : N(e) : Cn(o), s = ee(
|
|
1622
1643
|
t,
|
|
1623
|
-
|
|
1644
|
+
n
|
|
1624
1645
|
)((i, r) => i.getTime() - r.getTime());
|
|
1625
|
-
return s.onDispose(() =>
|
|
1646
|
+
return s.onDispose(() => E.dispose(n)), s;
|
|
1626
1647
|
}, Fn = (t, e = {}) => {
|
|
1627
|
-
const
|
|
1628
|
-
return
|
|
1629
|
-
},
|
|
1648
|
+
const o = Wn(t, e), n = o.map(Dn);
|
|
1649
|
+
return n.onDispose(o.dispose), n;
|
|
1650
|
+
}, Qn = (t, e = {}) => Fn(t, e);
|
|
1630
1651
|
class Mn extends Re {
|
|
1631
1652
|
constructor() {
|
|
1632
1653
|
super(...arguments);
|
|
@@ -1634,49 +1655,50 @@ class Mn extends Re {
|
|
|
1634
1655
|
* Triggers an update of the Ticker by incrementing its internal value.
|
|
1635
1656
|
* @returns void
|
|
1636
1657
|
*/
|
|
1637
|
-
bt(this, "tick", () => this.update((
|
|
1658
|
+
bt(this, "tick", () => this.update((o) => o + 1));
|
|
1638
1659
|
}
|
|
1639
1660
|
}
|
|
1640
|
-
const
|
|
1661
|
+
const Zn = (t = 0) => new Mn(t, (e, o) => e === o);
|
|
1641
1662
|
export {
|
|
1642
1663
|
Me as Anchor,
|
|
1643
1664
|
Hn as Appearance,
|
|
1644
|
-
|
|
1665
|
+
ie as AsyncResultView,
|
|
1645
1666
|
Bn as AutoFocus,
|
|
1646
1667
|
Un as AutoSelect,
|
|
1647
|
-
|
|
1648
|
-
|
|
1668
|
+
En as ElementRect,
|
|
1669
|
+
Kn as ElementSize,
|
|
1649
1670
|
_n as HTMLTitle,
|
|
1650
1671
|
zn as HiddenWhenEmpty,
|
|
1651
1672
|
He as InViewport,
|
|
1652
|
-
|
|
1653
|
-
|
|
1673
|
+
se as Location,
|
|
1674
|
+
Yn as PopOver,
|
|
1654
1675
|
vt as Rect,
|
|
1655
|
-
|
|
1676
|
+
qn as Resource,
|
|
1656
1677
|
Rn as ResourceDisplay,
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1678
|
+
On as ResultView,
|
|
1679
|
+
Gn as Router,
|
|
1680
|
+
Xn as SelectOnFocus,
|
|
1660
1681
|
Mn as Ticker,
|
|
1661
1682
|
In as WhenInViewport,
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1683
|
+
Jn as WindowSize,
|
|
1684
|
+
Le as _checkExtensionCondition,
|
|
1685
|
+
Ee as _getExtension,
|
|
1665
1686
|
Tn as _makeRouteMatcher,
|
|
1666
1687
|
Sn as _parseRouteSegments,
|
|
1667
|
-
|
|
1688
|
+
jn as allPlacements,
|
|
1689
|
+
Pe as areLocationsEqual,
|
|
1668
1690
|
_t as getAbsoluteRect,
|
|
1669
1691
|
Te as handleAnchorClick,
|
|
1670
|
-
|
|
1692
|
+
oe as locationFromURL,
|
|
1671
1693
|
An as makeResource,
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1694
|
+
Ln as matchesRoute,
|
|
1695
|
+
Cn as nowSignal,
|
|
1696
|
+
Qn as relativeTime,
|
|
1675
1697
|
Wn as relativeTimeMillisSignal,
|
|
1676
1698
|
Fn as relativeTimeSignal,
|
|
1677
1699
|
Nt as setLocationFromUrl,
|
|
1678
|
-
|
|
1700
|
+
Zn as ticker,
|
|
1679
1701
|
Dn as timeDiffToString,
|
|
1680
|
-
|
|
1702
|
+
Et as urlFromLocation,
|
|
1681
1703
|
Ve as useAppearance
|
|
1682
1704
|
};
|