react-virtuoso 4.18.8 → 4.18.10
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/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +433 -420
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as G, jsxs as $t } from "react/jsx-runtime";
|
|
2
2
|
import E, { createElement as Dt } from "react";
|
|
3
|
-
import
|
|
4
|
-
const we = 0, Pt = 1, Xt = 2,
|
|
5
|
-
function
|
|
3
|
+
import xo from "react-dom";
|
|
4
|
+
const we = 0, Pt = 1, Xt = 2, Pn = 4;
|
|
5
|
+
function mn(t) {
|
|
6
6
|
return () => t;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function vo(t) {
|
|
9
9
|
t();
|
|
10
10
|
}
|
|
11
11
|
function re(t, e) {
|
|
12
12
|
return (n) => t(e(n));
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function pn(t, e) {
|
|
15
15
|
return () => t(e);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function To(t, e) {
|
|
18
18
|
return (n) => t(e, n);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function Ne(t) {
|
|
21
21
|
return t !== void 0;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Co(...t) {
|
|
24
24
|
return () => {
|
|
25
|
-
t.map(
|
|
25
|
+
t.map(vo);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
function Jt() {
|
|
@@ -30,7 +30,7 @@ function Jt() {
|
|
|
30
30
|
function ye(t, e) {
|
|
31
31
|
return e(t), t;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function wo(t, e) {
|
|
34
34
|
return e(t);
|
|
35
35
|
}
|
|
36
36
|
function rt(...t) {
|
|
@@ -39,17 +39,17 @@ function rt(...t) {
|
|
|
39
39
|
function Y(t, e) {
|
|
40
40
|
return t(Pt, e);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function M(t, e) {
|
|
43
43
|
t(we, e);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function De(t) {
|
|
46
46
|
t(Xt);
|
|
47
47
|
}
|
|
48
48
|
function it(t) {
|
|
49
|
-
return t(
|
|
49
|
+
return t(Pn);
|
|
50
50
|
}
|
|
51
51
|
function z(t, e) {
|
|
52
|
-
return Y(t,
|
|
52
|
+
return Y(t, To(e, we));
|
|
53
53
|
}
|
|
54
54
|
function yt(t, e) {
|
|
55
55
|
const n = t(Pt, (o) => {
|
|
@@ -57,7 +57,7 @@ function yt(t, e) {
|
|
|
57
57
|
});
|
|
58
58
|
return n;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function hn(t) {
|
|
61
61
|
let e, n;
|
|
62
62
|
return (o) => (r) => {
|
|
63
63
|
e = r, n && clearTimeout(n), n = setTimeout(() => {
|
|
@@ -65,10 +65,10 @@ function pn(t) {
|
|
|
65
65
|
}, t);
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Gn(t, e) {
|
|
69
69
|
return t === e;
|
|
70
70
|
}
|
|
71
|
-
function nt(t =
|
|
71
|
+
function nt(t = Gn) {
|
|
72
72
|
let e;
|
|
73
73
|
return (n) => (o) => {
|
|
74
74
|
t(e, o) || (e = o, n(o));
|
|
@@ -88,11 +88,11 @@ function Bt(t) {
|
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
function x(t, ...e) {
|
|
91
|
-
const n =
|
|
91
|
+
const n = yo(...e);
|
|
92
92
|
return ((o, r) => {
|
|
93
93
|
switch (o) {
|
|
94
94
|
case Xt:
|
|
95
|
-
|
|
95
|
+
De(t);
|
|
96
96
|
return;
|
|
97
97
|
case Pt:
|
|
98
98
|
return Y(t, n(r));
|
|
@@ -134,10 +134,10 @@ function $(...t) {
|
|
|
134
134
|
n === r ? l() : o = l;
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
return (e) => t.reduceRight(
|
|
137
|
+
function yo(...t) {
|
|
138
|
+
return (e) => t.reduceRight(wo, e);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function bo(t) {
|
|
141
141
|
let e, n;
|
|
142
142
|
const o = () => e?.();
|
|
143
143
|
return function(r, s) {
|
|
@@ -162,7 +162,7 @@ function T(t) {
|
|
|
162
162
|
r(e);
|
|
163
163
|
break;
|
|
164
164
|
}
|
|
165
|
-
case
|
|
165
|
+
case Pn:
|
|
166
166
|
return e;
|
|
167
167
|
}
|
|
168
168
|
return n(o, r);
|
|
@@ -194,18 +194,18 @@ function U() {
|
|
|
194
194
|
function Tt(t) {
|
|
195
195
|
return ye(U(), (e) => z(t, e));
|
|
196
196
|
}
|
|
197
|
-
const
|
|
198
|
-
function j(t, e = [], n =
|
|
197
|
+
const Ro = { singleton: !0 };
|
|
198
|
+
function j(t, e = [], n = Ro) {
|
|
199
199
|
const { singleton: o } = n;
|
|
200
200
|
return {
|
|
201
201
|
constructor: t,
|
|
202
202
|
dependencies: e,
|
|
203
|
-
id:
|
|
203
|
+
id: Ho(),
|
|
204
204
|
singleton: o
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
const
|
|
208
|
-
function
|
|
207
|
+
const Ho = () => /* @__PURE__ */ Symbol("id");
|
|
208
|
+
function Eo(t) {
|
|
209
209
|
const e = /* @__PURE__ */ new Map(), n = ({ constructor: o, dependencies: r, id: s, singleton: i }) => {
|
|
210
210
|
if (i && e.has(s))
|
|
211
211
|
return e.get(s);
|
|
@@ -221,12 +221,12 @@ function at(...t) {
|
|
|
221
221
|
return t.forEach((s, i) => {
|
|
222
222
|
const l = 2 ** i;
|
|
223
223
|
Y(s, (c) => {
|
|
224
|
-
n[i] = c, o |= l, o === r &&
|
|
224
|
+
n[i] = c, o |= l, o === r && M(e, n);
|
|
225
225
|
});
|
|
226
226
|
}), function(s, i) {
|
|
227
227
|
switch (s) {
|
|
228
228
|
case Xt: {
|
|
229
|
-
|
|
229
|
+
De(e);
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
232
|
case Pt:
|
|
@@ -234,7 +234,7 @@ function at(...t) {
|
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
function W(t, e =
|
|
237
|
+
function W(t, e = Gn) {
|
|
238
238
|
return x(t, nt(e));
|
|
239
239
|
}
|
|
240
240
|
function Fe(...t) {
|
|
@@ -243,7 +243,7 @@ function Fe(...t) {
|
|
|
243
243
|
case Xt:
|
|
244
244
|
return;
|
|
245
245
|
case Pt:
|
|
246
|
-
return
|
|
246
|
+
return Co(...t.map((o) => Y(o, n)));
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
249
|
}
|
|
@@ -256,18 +256,18 @@ const ft = {
|
|
|
256
256
|
WARN: 2,
|
|
257
257
|
/** Error messages for failures (default level) */
|
|
258
258
|
ERROR: 3
|
|
259
|
-
},
|
|
259
|
+
}, Bo = {
|
|
260
260
|
[ft.DEBUG]: "debug",
|
|
261
261
|
[ft.ERROR]: "error",
|
|
262
262
|
[ft.INFO]: "log",
|
|
263
263
|
[ft.WARN]: "warn"
|
|
264
|
-
},
|
|
264
|
+
}, Oo = () => typeof globalThis > "u" ? window : globalThis, Gt = j(
|
|
265
265
|
() => {
|
|
266
266
|
const t = T(ft.ERROR);
|
|
267
267
|
return {
|
|
268
268
|
log: T((n, o, r = ft.INFO) => {
|
|
269
|
-
const s =
|
|
270
|
-
r >= s && console[
|
|
269
|
+
const s = Oo().VIRTUOSO_LOG_LEVEL ?? it(t);
|
|
270
|
+
r >= s && console[Bo[r]](
|
|
271
271
|
"%creact-virtuoso: %c%s %o",
|
|
272
272
|
"color: #0253b3; font-weight: bold",
|
|
273
273
|
"color: initial",
|
|
@@ -281,30 +281,30 @@ const ft = {
|
|
|
281
281
|
[],
|
|
282
282
|
{ singleton: !0 }
|
|
283
283
|
), Ve = /* @__PURE__ */ new WeakMap();
|
|
284
|
-
function
|
|
284
|
+
function An(t) {
|
|
285
285
|
return "self" in t ? t.document.documentElement : t;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
const e =
|
|
287
|
+
function Lo(t) {
|
|
288
|
+
const e = An(t), n = Ve.get(e);
|
|
289
289
|
if (n !== void 0)
|
|
290
290
|
return n;
|
|
291
291
|
const o = e.ownerDocument.defaultView.getComputedStyle(e).direction === "rtl";
|
|
292
292
|
return Ve.set(e, o), o;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
Ve.delete(
|
|
294
|
+
function gn(t) {
|
|
295
|
+
Ve.delete(An(t));
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
return
|
|
297
|
+
function Mn(t, e) {
|
|
298
|
+
return Lo(t) ? -e : e;
|
|
299
299
|
}
|
|
300
|
-
const _t =
|
|
301
|
-
function
|
|
302
|
-
return
|
|
300
|
+
const _t = Mn;
|
|
301
|
+
function In(t, e) {
|
|
302
|
+
return Mn(t, e);
|
|
303
303
|
}
|
|
304
304
|
function Lt(t, e, n) {
|
|
305
|
-
return
|
|
305
|
+
return $e(t, e, n).callbackRef;
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function $e(t, e, n) {
|
|
308
308
|
const o = E.useRef(null);
|
|
309
309
|
let r = (i) => {
|
|
310
310
|
};
|
|
@@ -319,10 +319,10 @@ function De(t, e, n) {
|
|
|
319
319
|
i && e ? (s?.observe(i), o.current = i) : (o.current && s?.unobserve(o.current), o.current = null);
|
|
320
320
|
}, { callbackRef: r, ref: o };
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function _n(t, e, n, o, r, s, i, l, c) {
|
|
323
323
|
const d = E.useCallback(
|
|
324
324
|
(m) => {
|
|
325
|
-
const v =
|
|
325
|
+
const v = ko(m.children, e, l ? "offsetWidth" : "offsetHeight", r);
|
|
326
326
|
let p = m.parentElement;
|
|
327
327
|
for (; p.dataset.virtuosoScroller === void 0; )
|
|
328
328
|
p = p.parentElement;
|
|
@@ -335,14 +335,14 @@ function Mn(t, e, n, o, r, s, i, l, c) {
|
|
|
335
335
|
scrollTop: Math.max(f, 0),
|
|
336
336
|
viewportHeight: h
|
|
337
337
|
}), s?.(
|
|
338
|
-
l ?
|
|
338
|
+
l ? Sn("column-gap", getComputedStyle(m).columnGap, r) : Sn("row-gap", getComputedStyle(m).rowGap, r)
|
|
339
339
|
), v !== null && t(v);
|
|
340
340
|
},
|
|
341
341
|
[t, e, r, s, i, o, l]
|
|
342
342
|
);
|
|
343
|
-
return
|
|
343
|
+
return $e(d, n, c);
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function ko(t, e, n, o) {
|
|
346
346
|
const r = t.length;
|
|
347
347
|
if (r === 0)
|
|
348
348
|
return null;
|
|
@@ -359,10 +359,10 @@ function Lo(t, e, n, o) {
|
|
|
359
359
|
}
|
|
360
360
|
return s;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Sn(t, e, n) {
|
|
363
363
|
return e !== "normal" && e?.endsWith("px") !== !0 && n(`${t} was not resolved to pixel value correctly`, e, ft.WARN), e === "normal" ? 0 : parseInt(e ?? "0", 10);
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function Ue(t, e, n) {
|
|
366
366
|
const o = E.useRef(null), r = E.useCallback(
|
|
367
367
|
(c) => {
|
|
368
368
|
if (!c?.offsetParent)
|
|
@@ -385,7 +385,7 @@ function $e(t, e, n) {
|
|
|
385
385
|
},
|
|
386
386
|
// oxlint-disable-next-line exhaustive-deps
|
|
387
387
|
[t, e]
|
|
388
|
-
), { callbackRef: s, ref: i } =
|
|
388
|
+
), { callbackRef: s, ref: i } = $e(r, !0, n), l = E.useCallback(() => {
|
|
389
389
|
r(i.current);
|
|
390
390
|
}, [r, i]);
|
|
391
391
|
return E.useEffect(() => {
|
|
@@ -444,7 +444,7 @@ const It = j(
|
|
|
444
444
|
[],
|
|
445
445
|
{ singleton: !0 }
|
|
446
446
|
), se = { lvl: 0 };
|
|
447
|
-
function
|
|
447
|
+
function Nn(t, e) {
|
|
448
448
|
const n = t.length;
|
|
449
449
|
if (n === 0)
|
|
450
450
|
return [];
|
|
@@ -475,7 +475,7 @@ function Rt(t, e, n = "k") {
|
|
|
475
475
|
return Rt(t.l, e, n);
|
|
476
476
|
}
|
|
477
477
|
function vt(t, e, n) {
|
|
478
|
-
return J(t) ?
|
|
478
|
+
return J(t) ? Un(e, n, 1) : e === t.k ? dt(t, { k: e, v: n }) : e < t.k ? xn(dt(t, { l: vt(t.l, e, n) })) : xn(dt(t, { r: vt(t.r, e, n) }));
|
|
479
479
|
}
|
|
480
480
|
function Yt() {
|
|
481
481
|
return se;
|
|
@@ -484,7 +484,7 @@ function Zt(t, e, n) {
|
|
|
484
484
|
if (J(t))
|
|
485
485
|
return [];
|
|
486
486
|
const o = Rt(t, e)[0];
|
|
487
|
-
return
|
|
487
|
+
return zo(Pe(t, o, n));
|
|
488
488
|
}
|
|
489
489
|
function We(t, e) {
|
|
490
490
|
if (J(t))
|
|
@@ -495,8 +495,8 @@ function We(t, e) {
|
|
|
495
495
|
return r;
|
|
496
496
|
if (J(r))
|
|
497
497
|
return o;
|
|
498
|
-
const [s, i] =
|
|
499
|
-
return xe(dt(t, { k: s, l:
|
|
498
|
+
const [s, i] = $n(o);
|
|
499
|
+
return xe(dt(t, { k: s, l: Dn(o), v: i }));
|
|
500
500
|
}
|
|
501
501
|
return e < n ? xe(dt(t, { l: We(o, e) })) : xe(dt(t, { r: We(r, e) }));
|
|
502
502
|
}
|
|
@@ -516,7 +516,7 @@ function xe(t) {
|
|
|
516
516
|
return t;
|
|
517
517
|
if (n > o.lvl + 1) {
|
|
518
518
|
if (Be(e))
|
|
519
|
-
return
|
|
519
|
+
return Kn(dt(t, { lvl: n - 1 }));
|
|
520
520
|
if (!J(e) && !J(e.r))
|
|
521
521
|
return dt(e.r, {
|
|
522
522
|
l: dt(e, { r: e.r.l }),
|
|
@@ -544,7 +544,7 @@ function xe(t) {
|
|
|
544
544
|
throw new Error("Unexpected empty nodes");
|
|
545
545
|
}
|
|
546
546
|
function dt(t, e) {
|
|
547
|
-
return
|
|
547
|
+
return Un(
|
|
548
548
|
e.k === void 0 ? t.k : e.k,
|
|
549
549
|
e.v === void 0 ? t.v : e.v,
|
|
550
550
|
e.lvl === void 0 ? t.lvl : e.lvl,
|
|
@@ -552,22 +552,22 @@ function dt(t, e) {
|
|
|
552
552
|
e.r === void 0 ? t.r : e.r
|
|
553
553
|
);
|
|
554
554
|
}
|
|
555
|
-
function
|
|
556
|
-
return J(t.r) ? t.l : xe(dt(t, { r:
|
|
555
|
+
function Dn(t) {
|
|
556
|
+
return J(t.r) ? t.l : xe(dt(t, { r: Dn(t.r) }));
|
|
557
557
|
}
|
|
558
558
|
function Be(t) {
|
|
559
559
|
return J(t) || t.lvl > t.r.lvl;
|
|
560
560
|
}
|
|
561
|
-
function
|
|
562
|
-
return J(t.r) ? [t.k, t.v] :
|
|
561
|
+
function $n(t) {
|
|
562
|
+
return J(t.r) ? [t.k, t.v] : $n(t.r);
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function Un(t, e, n, o = se, r = se) {
|
|
565
565
|
return { k: t, l: o, lvl: n, r, v: e };
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
return Ge(
|
|
567
|
+
function xn(t) {
|
|
568
|
+
return Ge(Kn(t));
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function Kn(t) {
|
|
571
571
|
const { l: e } = t;
|
|
572
572
|
return !J(e) && e.lvl === t.lvl ? dt(e, { r: dt(t, { l: e.r }) }) : t;
|
|
573
573
|
}
|
|
@@ -575,21 +575,21 @@ function Ge(t) {
|
|
|
575
575
|
const { lvl: e, r: n } = t;
|
|
576
576
|
return !J(n) && !J(n.r) && n.lvl === e && n.r.lvl === e ? dt(n, { l: dt(t, { r: n.l }), lvl: e + 1 }) : t;
|
|
577
577
|
}
|
|
578
|
-
function
|
|
579
|
-
return
|
|
578
|
+
function zo(t) {
|
|
579
|
+
return Nn(t, ({ k: e, v: n }) => ({ index: e, value: n }));
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function jn(t, e) {
|
|
582
582
|
return !!(t && t.startIndex === e.startIndex && t.endIndex === e.endIndex);
|
|
583
583
|
}
|
|
584
584
|
function le(t, e) {
|
|
585
585
|
return !!(t && t[0] === e[0] && t[1] === e[1]);
|
|
586
586
|
}
|
|
587
|
-
const
|
|
587
|
+
const Ke = j(
|
|
588
588
|
() => ({ recalcInProgress: T(!1) }),
|
|
589
589
|
[],
|
|
590
590
|
{ singleton: !0 }
|
|
591
591
|
);
|
|
592
|
-
function
|
|
592
|
+
function qn(t, e, n) {
|
|
593
593
|
return t[Te(t, e, n)];
|
|
594
594
|
}
|
|
595
595
|
function Te(t, e, n, o = 0) {
|
|
@@ -610,7 +610,7 @@ function Te(t, e, n, o = 0) {
|
|
|
610
610
|
}
|
|
611
611
|
throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`);
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Fo(t, e, n, o) {
|
|
614
614
|
const r = Te(t, e, o), s = Te(t, n, o, r);
|
|
615
615
|
return t.slice(r, s + 1);
|
|
616
616
|
}
|
|
@@ -620,10 +620,10 @@ function Ht(t, e) {
|
|
|
620
620
|
function be(t) {
|
|
621
621
|
return !J(t.groupOffsetTree);
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function je({ index: t }, e) {
|
|
624
624
|
return e === t ? 0 : e < t ? -1 : 1;
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function Vo() {
|
|
627
627
|
return {
|
|
628
628
|
groupIndices: [],
|
|
629
629
|
groupOffsetTree: Yt(),
|
|
@@ -634,7 +634,7 @@ function Fo() {
|
|
|
634
634
|
sizeTree: Yt()
|
|
635
635
|
};
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function Wo(t, e) {
|
|
638
638
|
let n = J(t) ? 0 : 1 / 0;
|
|
639
639
|
for (const o of e) {
|
|
640
640
|
const { endIndex: r, size: s, startIndex: i } = o;
|
|
@@ -643,7 +643,7 @@ function Vo(t, e) {
|
|
|
643
643
|
continue;
|
|
644
644
|
}
|
|
645
645
|
const l = Zt(t, i - 1, r + 1);
|
|
646
|
-
if (l.some(
|
|
646
|
+
if (l.some(Do(o)))
|
|
647
647
|
continue;
|
|
648
648
|
let c = !1, d = !1;
|
|
649
649
|
for (const { end: m, start: v, value: p } of l)
|
|
@@ -652,19 +652,19 @@ function Vo(t, e) {
|
|
|
652
652
|
}
|
|
653
653
|
return [t, n];
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function Po(t) {
|
|
656
656
|
return t.groupIndex !== void 0;
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function Go({ offset: t }, e) {
|
|
659
659
|
return e === t ? 0 : e < t ? -1 : 1;
|
|
660
660
|
}
|
|
661
661
|
function ce(t, e, n) {
|
|
662
662
|
if (e.length === 0)
|
|
663
663
|
return 0;
|
|
664
|
-
const { index: o, offset: r, size: s } =
|
|
664
|
+
const { index: o, offset: r, size: s } = qn(e, t, je), i = t - o, l = s * i + (i - 1) * n + r;
|
|
665
665
|
return l > 0 ? l + n : l;
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function Yn(t, e) {
|
|
668
668
|
if (!be(e))
|
|
669
669
|
return t;
|
|
670
670
|
let n = 0;
|
|
@@ -672,17 +672,17 @@ function qn(t, e) {
|
|
|
672
672
|
n++;
|
|
673
673
|
return t + n;
|
|
674
674
|
}
|
|
675
|
-
function
|
|
676
|
-
if (
|
|
675
|
+
function Zn(t, e, n) {
|
|
676
|
+
if (Po(t))
|
|
677
677
|
return e.groupIndices[t.groupIndex] + 1;
|
|
678
678
|
const o = t.index === "LAST" ? n : t.index;
|
|
679
|
-
let r =
|
|
679
|
+
let r = Yn(o, e);
|
|
680
680
|
return r = Math.max(0, Math.min(n, r)), r;
|
|
681
681
|
}
|
|
682
|
-
function
|
|
683
|
-
return o > 0 && (e = Math.max(e,
|
|
682
|
+
function Ao(t, e, n, o = 0) {
|
|
683
|
+
return o > 0 && (e = Math.max(e, qn(t, o, je).offset)), Nn(Fo(t, e, n, Go), No);
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function Mo(t, [e, n, o, r]) {
|
|
686
686
|
e.length > 0 && o("received item sizes", e, ft.DEBUG);
|
|
687
687
|
const s = t.sizeTree;
|
|
688
688
|
let i = s, l = 0;
|
|
@@ -690,7 +690,7 @@ function Ao(t, [e, n, o, r]) {
|
|
|
690
690
|
const p = e[0].size, I = e[1].size;
|
|
691
691
|
i = n.reduce((w, R) => vt(vt(w, R, p), R + 1, I), i);
|
|
692
692
|
} else
|
|
693
|
-
[i, l] =
|
|
693
|
+
[i, l] = Wo(i, e);
|
|
694
694
|
if (i === s)
|
|
695
695
|
return t;
|
|
696
696
|
const { lastIndex: c, lastOffset: d, lastSize: m, offsetTree: v } = Ae(t.offsetTree, l, i, r);
|
|
@@ -704,13 +704,13 @@ function Ao(t, [e, n, o, r]) {
|
|
|
704
704
|
sizeTree: i
|
|
705
705
|
};
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function _o(t) {
|
|
708
708
|
return Nt(t).map(({ k: e, v: n }, o, r) => {
|
|
709
709
|
const s = r[o + 1];
|
|
710
710
|
return { endIndex: s === void 0 ? 1 / 0 : s.k - 1, size: n, startIndex: e };
|
|
711
711
|
});
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function vn(t, e) {
|
|
714
714
|
let n = 0, o = 0;
|
|
715
715
|
for (; n < t; )
|
|
716
716
|
n += e[o + 1] - e[o] - 1, o++;
|
|
@@ -721,7 +721,7 @@ function Ae(t, e, n, o) {
|
|
|
721
721
|
if (e === 0)
|
|
722
722
|
r = [];
|
|
723
723
|
else {
|
|
724
|
-
c = Te(r, e - 1,
|
|
724
|
+
c = Te(r, e - 1, je), l = r[c].offset;
|
|
725
725
|
const m = Rt(n, e - 1);
|
|
726
726
|
s = m[0], i = m[1], r.length && r[c].size === Rt(n, e)[1] && (c -= 1), r = r.slice(0, c + 1);
|
|
727
727
|
}
|
|
@@ -740,20 +740,20 @@ function Ae(t, e, n, o) {
|
|
|
740
740
|
offsetTree: r
|
|
741
741
|
};
|
|
742
742
|
}
|
|
743
|
-
function
|
|
743
|
+
function No(t) {
|
|
744
744
|
return { index: t.index, value: t };
|
|
745
745
|
}
|
|
746
|
-
function
|
|
746
|
+
function Do(t) {
|
|
747
747
|
const { endIndex: e, size: n, startIndex: o } = t;
|
|
748
748
|
return (r) => r.start === o && (r.end === e || r.end === 1 / 0) && r.value === n;
|
|
749
749
|
}
|
|
750
|
-
const
|
|
750
|
+
const $o = {
|
|
751
751
|
offsetHeight: "height",
|
|
752
752
|
offsetWidth: "width"
|
|
753
753
|
}, kt = j(
|
|
754
754
|
([{ log: t }, { recalcInProgress: e }]) => {
|
|
755
|
-
const n = U(), o = U(), r = ht(o, 0), s = U(), i = U(), l = T(0), c = T([]), d = T(void 0), m = T(void 0), v = T(void 0), p = T(void 0), I = T((u, g) => Ht(u,
|
|
756
|
-
x(n, $(c, t, R), Ot(
|
|
755
|
+
const n = U(), o = U(), r = ht(o, 0), s = U(), i = U(), l = T(0), c = T([]), d = T(void 0), m = T(void 0), v = T(void 0), p = T(void 0), I = T((u, g) => Ht(u, $o[g])), w = T(void 0), R = T(0), h = Vo(), f = ht(
|
|
756
|
+
x(n, $(c, t, R), Ot(Mo, h), nt()),
|
|
757
757
|
h
|
|
758
758
|
), a = ht(
|
|
759
759
|
x(
|
|
@@ -890,10 +890,10 @@ const Do = {
|
|
|
890
890
|
(u) => {
|
|
891
891
|
const { groupIndices: g } = it(f);
|
|
892
892
|
if (u > 0)
|
|
893
|
-
|
|
893
|
+
M(e, !0), M(s, u + vn(u, g));
|
|
894
894
|
else if (u < 0) {
|
|
895
895
|
const C = it(a);
|
|
896
|
-
C.length > 0 && (u -=
|
|
896
|
+
C.length > 0 && (u -= vn(-u, C)), M(i, u);
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
899
|
), Y(x(l, $(t)), ([u, g]) => {
|
|
@@ -928,8 +928,8 @@ const Do = {
|
|
|
928
928
|
const F = Nt(g.sizeTree);
|
|
929
929
|
return N !== u && F.shift(), F.reduce(
|
|
930
930
|
(q, { k: Q, v: gt }) => {
|
|
931
|
-
let
|
|
932
|
-
return q.prevSize !== 0 && (
|
|
931
|
+
let lt = q.ranges;
|
|
932
|
+
return q.prevSize !== 0 && (lt = [
|
|
933
933
|
...q.ranges,
|
|
934
934
|
{
|
|
935
935
|
endIndex: Q + u - 1,
|
|
@@ -939,7 +939,7 @@ const Do = {
|
|
|
939
939
|
]), {
|
|
940
940
|
prevIndex: Q + u,
|
|
941
941
|
prevSize: gt,
|
|
942
|
-
ranges:
|
|
942
|
+
ranges: lt
|
|
943
943
|
};
|
|
944
944
|
},
|
|
945
945
|
{
|
|
@@ -991,7 +991,7 @@ const Do = {
|
|
|
991
991
|
const Q = N[F + 1] - mt - 1;
|
|
992
992
|
F++, Z += Q + 1;
|
|
993
993
|
}
|
|
994
|
-
if (V = Nt(g.sizeTree).reduce((Q, { k: gt, v:
|
|
994
|
+
if (V = Nt(g.sizeTree).reduce((Q, { k: gt, v: lt }) => vt(Q, Math.max(0, gt + u), lt), V), Z !== -u) {
|
|
995
995
|
const Q = ie(g.sizeTree, mt);
|
|
996
996
|
V = vt(V, 0, Q);
|
|
997
997
|
const gt = Rt(g.sizeTree, -u + 1)[1];
|
|
@@ -1036,10 +1036,10 @@ const Do = {
|
|
|
1036
1036
|
unshiftWith: s
|
|
1037
1037
|
};
|
|
1038
1038
|
},
|
|
1039
|
-
rt(Gt,
|
|
1039
|
+
rt(Gt, Ke),
|
|
1040
1040
|
{ singleton: !0 }
|
|
1041
1041
|
);
|
|
1042
|
-
function
|
|
1042
|
+
function Uo(t) {
|
|
1043
1043
|
return t.reduce(
|
|
1044
1044
|
(e, n) => (e.groupIndices.push(e.totalCount), e.totalCount += n + 1, e),
|
|
1045
1045
|
{
|
|
@@ -1048,9 +1048,9 @@ function $o(t) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
);
|
|
1050
1050
|
}
|
|
1051
|
-
const
|
|
1051
|
+
const Xn = j(
|
|
1052
1052
|
([{ groupIndices: t, sizes: e, totalCount: n }, { headerHeight: o, scrollTop: r }]) => {
|
|
1053
|
-
const s = U(), i = U(), l = Tt(x(s, B(
|
|
1053
|
+
const s = U(), i = U(), l = Tt(x(s, B(Uo)));
|
|
1054
1054
|
return z(
|
|
1055
1055
|
x(
|
|
1056
1056
|
l,
|
|
@@ -1090,10 +1090,10 @@ const Zn = j(
|
|
|
1090
1090
|
},
|
|
1091
1091
|
rt(Gt),
|
|
1092
1092
|
{ singleton: !0 }
|
|
1093
|
-
),
|
|
1094
|
-
function
|
|
1095
|
-
const e = typeof t == "number" ? { index: t } : t;
|
|
1096
|
-
return e.align || (e.align = "start"), (!e.behavior || !
|
|
1093
|
+
), Ko = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
1094
|
+
function Jn(t) {
|
|
1095
|
+
const e = typeof t == "number" ? { index: t } : { ...t };
|
|
1096
|
+
return e.align || (e.align = "start"), (!e.behavior || !Ko) && (e.behavior = "auto"), e.offset === void 0 && (e.offset = 0), e;
|
|
1097
1097
|
}
|
|
1098
1098
|
const fe = j(
|
|
1099
1099
|
([
|
|
@@ -1113,7 +1113,7 @@ const fe = j(
|
|
|
1113
1113
|
const I = U(), w = U(), R = T(0);
|
|
1114
1114
|
let h = null, f = null, a = null;
|
|
1115
1115
|
function S() {
|
|
1116
|
-
h !== null && (h(), h = null), a !== null && (a(), a = null), f && (clearTimeout(f), f = null),
|
|
1116
|
+
h !== null && (h(), h = null), a !== null && (a(), a = null), f && (clearTimeout(f), f = null), M(c, !1);
|
|
1117
1117
|
}
|
|
1118
1118
|
return z(
|
|
1119
1119
|
x(
|
|
@@ -1127,11 +1127,11 @@ const fe = j(
|
|
|
1127
1127
|
N,
|
|
1128
1128
|
Z
|
|
1129
1129
|
]) => {
|
|
1130
|
-
const F =
|
|
1131
|
-
let St = ce(
|
|
1132
|
-
mt === "end" ? (St += N + Rt(y.sizeTree,
|
|
1130
|
+
const F = Jn(H), { align: mt, behavior: q, offset: Q } = F, gt = u - 1, lt = Zn(F, y, gt);
|
|
1131
|
+
let St = ce(lt, y.offsetTree, V) + C;
|
|
1132
|
+
mt === "end" ? (St += N + Rt(y.sizeTree, lt)[1] - L + Z, lt === gt && (St += k)) : mt === "center" ? St += (N + Rt(y.sizeTree, lt)[1] - L + Z) / 2 : St -= g, Q !== void 0 && Q !== 0 && (St += Q);
|
|
1133
1133
|
const Ft = (pt) => {
|
|
1134
|
-
S(), pt ? (O("retrying to scroll to", { location: H }, ft.DEBUG),
|
|
1134
|
+
S(), pt ? (O("retrying to scroll to", { location: H }, ft.DEBUG), M(I, H)) : (M(w, !0), O("list did not change, scroll successful", {}, ft.DEBUG));
|
|
1135
1135
|
};
|
|
1136
1136
|
if (S(), q === "smooth") {
|
|
1137
1137
|
let pt = !1;
|
|
@@ -1141,10 +1141,10 @@ const fe = j(
|
|
|
1141
1141
|
Ft(pt);
|
|
1142
1142
|
});
|
|
1143
1143
|
} else
|
|
1144
|
-
h = yt(x(e,
|
|
1144
|
+
h = yt(x(e, jo(150)), Ft);
|
|
1145
1145
|
return f = setTimeout(() => {
|
|
1146
1146
|
S();
|
|
1147
|
-
}, 1200),
|
|
1147
|
+
}, 1200), M(c, !0), O("scrolling from index to", { behavior: q, index: lt, top: St }, ft.DEBUG), { behavior: q, top: St };
|
|
1148
1148
|
}
|
|
1149
1149
|
)
|
|
1150
1150
|
),
|
|
@@ -1158,7 +1158,7 @@ const fe = j(
|
|
|
1158
1158
|
rt(kt, It, Gt),
|
|
1159
1159
|
{ singleton: !0 }
|
|
1160
1160
|
);
|
|
1161
|
-
function
|
|
1161
|
+
function jo(t) {
|
|
1162
1162
|
return (e) => {
|
|
1163
1163
|
const n = setTimeout(() => {
|
|
1164
1164
|
e(!1);
|
|
@@ -1168,14 +1168,19 @@ function Ko(t) {
|
|
|
1168
1168
|
};
|
|
1169
1169
|
};
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function qe(t, e) {
|
|
1172
1172
|
t === 0 ? e() : requestAnimationFrame(() => {
|
|
1173
|
-
|
|
1173
|
+
qe(t - 1, e);
|
|
1174
1174
|
});
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1177
|
-
|
|
1178
|
-
|
|
1176
|
+
function Ye(t, e) {
|
|
1177
|
+
if (t === void 0)
|
|
1178
|
+
return 0;
|
|
1179
|
+
const n = e - 1, o = typeof t == "number" ? t : t.index === "LAST" ? n : t.index;
|
|
1180
|
+
return Math.max(0, Math.min(o, n));
|
|
1181
|
+
}
|
|
1182
|
+
function Me(t) {
|
|
1183
|
+
return t === void 0 ? !0 : typeof t == "number" ? t === 0 : t.index === 0 && (t.align === void 0 || t.align === "start") && (t.offset === void 0 || t.offset === 0);
|
|
1179
1184
|
}
|
|
1180
1185
|
const me = j(
|
|
1181
1186
|
([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
|
|
@@ -1184,7 +1189,7 @@ const me = j(
|
|
|
1184
1189
|
x(
|
|
1185
1190
|
i,
|
|
1186
1191
|
$(c),
|
|
1187
|
-
P(([m, v]) => v
|
|
1192
|
+
P(([m, v]) => !Me(v)),
|
|
1188
1193
|
Bt(!1)
|
|
1189
1194
|
),
|
|
1190
1195
|
l
|
|
@@ -1192,7 +1197,7 @@ const me = j(
|
|
|
1192
1197
|
x(
|
|
1193
1198
|
i,
|
|
1194
1199
|
$(c),
|
|
1195
|
-
P(([m, v]) => v
|
|
1200
|
+
P(([m, v]) => !Me(v)),
|
|
1196
1201
|
Bt(!1)
|
|
1197
1202
|
),
|
|
1198
1203
|
d
|
|
@@ -1200,16 +1205,20 @@ const me = j(
|
|
|
1200
1205
|
x(
|
|
1201
1206
|
at(e, i),
|
|
1202
1207
|
$(l, n, t, d),
|
|
1203
|
-
P(([[, m], v, { sizeTree: p }, I, w]) => m && (!J(p) ||
|
|
1208
|
+
P(([[, m], v, { sizeTree: p }, I, w]) => m && (!J(p) || Ne(I)) && !v && !w),
|
|
1204
1209
|
$(c)
|
|
1205
1210
|
),
|
|
1206
1211
|
([, m]) => {
|
|
1212
|
+
if (m === void 0) {
|
|
1213
|
+
M(l, !0), M(d, !0);
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1207
1216
|
yt(r, () => {
|
|
1208
|
-
|
|
1209
|
-
}),
|
|
1217
|
+
M(d, !0);
|
|
1218
|
+
}), qe(4, () => {
|
|
1210
1219
|
yt(o, () => {
|
|
1211
|
-
|
|
1212
|
-
}),
|
|
1220
|
+
M(l, !0);
|
|
1221
|
+
}), M(s, m);
|
|
1213
1222
|
});
|
|
1214
1223
|
}
|
|
1215
1224
|
), {
|
|
@@ -1221,10 +1230,10 @@ const me = j(
|
|
|
1221
1230
|
rt(kt, It, fe, At),
|
|
1222
1231
|
{ singleton: !0 }
|
|
1223
1232
|
);
|
|
1224
|
-
function
|
|
1233
|
+
function Qn(t, e) {
|
|
1225
1234
|
return Math.abs(t - e) < 1.01;
|
|
1226
1235
|
}
|
|
1227
|
-
const ue = "up", ne = "down",
|
|
1236
|
+
const ue = "up", ne = "down", qo = "none", Yo = {
|
|
1228
1237
|
atBottom: !1,
|
|
1229
1238
|
notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
|
|
1230
1239
|
state: {
|
|
@@ -1233,15 +1242,15 @@ const ue = "up", ne = "down", jo = "none", qo = {
|
|
|
1233
1242
|
scrollTop: 0,
|
|
1234
1243
|
viewportHeight: 0
|
|
1235
1244
|
}
|
|
1236
|
-
},
|
|
1237
|
-
const i = T(!1), l = T(!0), c = U(), d = U(), m = T(4), v = T(
|
|
1245
|
+
}, Zo = 0, pe = j(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
|
|
1246
|
+
const i = T(!1), l = T(!0), c = U(), d = U(), m = T(4), v = T(Zo), p = ht(
|
|
1238
1247
|
x(
|
|
1239
|
-
Fe(x(W(r), Ut(1), Bt(!0)), x(W(r), Ut(1), Bt(!1),
|
|
1248
|
+
Fe(x(W(r), Ut(1), Bt(!0)), x(W(r), Ut(1), Bt(!1), hn(100))),
|
|
1240
1249
|
nt()
|
|
1241
1250
|
),
|
|
1242
1251
|
!1
|
|
1243
1252
|
), I = ht(
|
|
1244
|
-
x(Fe(x(n, Bt(!0)), x(n, Bt(!1),
|
|
1253
|
+
x(Fe(x(n, Bt(!0)), x(n, Bt(!1), hn(200))), nt()),
|
|
1245
1254
|
!1
|
|
1246
1255
|
);
|
|
1247
1256
|
z(
|
|
@@ -1276,7 +1285,7 @@ const ue = "up", ne = "down", jo = "none", qo = {
|
|
|
1276
1285
|
notAtBottomBecause: O,
|
|
1277
1286
|
state: k
|
|
1278
1287
|
};
|
|
1279
|
-
},
|
|
1288
|
+
}, Yo),
|
|
1280
1289
|
nt((a, S) => a !== void 0 && a.atBottom === S.atBottom)
|
|
1281
1290
|
)
|
|
1282
1291
|
), R = ht(
|
|
@@ -1284,7 +1293,7 @@ const ue = "up", ne = "down", jo = "none", qo = {
|
|
|
1284
1293
|
o,
|
|
1285
1294
|
Ot(
|
|
1286
1295
|
(a, { scrollHeight: S, scrollTop: H, viewportHeight: y }) => {
|
|
1287
|
-
if (!
|
|
1296
|
+
if (!Qn(a.scrollHeight, S)) {
|
|
1288
1297
|
const L = S - (H + y) < 1;
|
|
1289
1298
|
return a.scrollTop !== H && L ? {
|
|
1290
1299
|
changed: !0,
|
|
@@ -1332,7 +1341,7 @@ const ue = "up", ne = "down", jo = "none", qo = {
|
|
|
1332
1341
|
B((a) => a.direction)
|
|
1333
1342
|
),
|
|
1334
1343
|
h
|
|
1335
|
-
), z(x(o, zt(50), Bt(
|
|
1344
|
+
), z(x(o, zt(50), Bt(qo)), h);
|
|
1336
1345
|
const f = T(0);
|
|
1337
1346
|
return z(
|
|
1338
1347
|
x(
|
|
@@ -1364,14 +1373,14 @@ const ue = "up", ne = "down", jo = "none", qo = {
|
|
|
1364
1373
|
scrollDirection: h,
|
|
1365
1374
|
scrollVelocity: f
|
|
1366
1375
|
};
|
|
1367
|
-
}, rt(It)), ae = "top", de = "bottom",
|
|
1368
|
-
function
|
|
1376
|
+
}, rt(It)), ae = "top", de = "bottom", Tn = "none";
|
|
1377
|
+
function Cn(t, e, n) {
|
|
1369
1378
|
return typeof t == "number" ? n === ue && e === ae || n === ne && e === de ? t : 0 : n === ue ? e === ae ? t.main : t.reverse : e === de ? t.main : t.reverse;
|
|
1370
1379
|
}
|
|
1371
|
-
function
|
|
1380
|
+
function wn(t, e) {
|
|
1372
1381
|
return typeof t == "number" ? t : t[e] ?? 0;
|
|
1373
1382
|
}
|
|
1374
|
-
const
|
|
1383
|
+
const Ze = j(
|
|
1375
1384
|
([{ deviation: t, fixedHeaderHeight: e, headerHeight: n, scrollTop: o, viewportHeight: r }]) => {
|
|
1376
1385
|
const s = U(), i = T(0), l = T(0), c = T(0), d = ht(
|
|
1377
1386
|
x(
|
|
@@ -1399,11 +1408,11 @@ const Ye = j(
|
|
|
1399
1408
|
S
|
|
1400
1409
|
]) => {
|
|
1401
1410
|
const H = m - a, y = h + f, L = Math.max(p - H, 0);
|
|
1402
|
-
let u =
|
|
1403
|
-
const g =
|
|
1404
|
-
return I -= a, I += p + f, w += p + f, w -= a, I > m + y - g && (u = ue), w < m - L + v + C && (u = ne), u !==
|
|
1405
|
-
Math.max(H - p -
|
|
1406
|
-
H - L - f + v +
|
|
1411
|
+
let u = Tn;
|
|
1412
|
+
const g = wn(S, ae), C = wn(S, de);
|
|
1413
|
+
return I -= a, I += p + f, w += p + f, w -= a, I > m + y - g && (u = ue), w < m - L + v + C && (u = ne), u !== Tn ? [
|
|
1414
|
+
Math.max(H - p - Cn(R, ae, u) - g, 0),
|
|
1415
|
+
H - L - f + v + Cn(R, de, u) + C
|
|
1407
1416
|
] : null;
|
|
1408
1417
|
}
|
|
1409
1418
|
),
|
|
@@ -1425,9 +1434,9 @@ const Ye = j(
|
|
|
1425
1434
|
rt(It),
|
|
1426
1435
|
{ singleton: !0 }
|
|
1427
1436
|
);
|
|
1428
|
-
function
|
|
1437
|
+
function Xo(t, e, n) {
|
|
1429
1438
|
if (be(e)) {
|
|
1430
|
-
const o =
|
|
1439
|
+
const o = Yn(t, e);
|
|
1431
1440
|
return [
|
|
1432
1441
|
{ index: Rt(e.groupOffsetTree, o)[0], offset: 0, size: 0 },
|
|
1433
1442
|
{ data: n?.[0], index: o, offset: 0, size: 0 }
|
|
@@ -1458,16 +1467,16 @@ function ve(t, e, n, o, r, s) {
|
|
|
1458
1467
|
return {
|
|
1459
1468
|
bottom: m,
|
|
1460
1469
|
firstItemIndex: s,
|
|
1461
|
-
items:
|
|
1470
|
+
items: yn(t, r, s),
|
|
1462
1471
|
offsetBottom: w,
|
|
1463
1472
|
offsetTop: d,
|
|
1464
1473
|
top: I,
|
|
1465
|
-
topItems:
|
|
1474
|
+
topItems: yn(e, r, s),
|
|
1466
1475
|
topListHeight: e.reduce((R, h) => h.size + R, 0),
|
|
1467
1476
|
totalCount: n
|
|
1468
1477
|
};
|
|
1469
1478
|
}
|
|
1470
|
-
function
|
|
1479
|
+
function to(t, e, n, o, r, s) {
|
|
1471
1480
|
let i = 0;
|
|
1472
1481
|
if (n.groupIndices.length > 0)
|
|
1473
1482
|
for (const m of n.groupIndices) {
|
|
@@ -1475,7 +1484,7 @@ function Qn(t, e, n, o, r, s) {
|
|
|
1475
1484
|
break;
|
|
1476
1485
|
i++;
|
|
1477
1486
|
}
|
|
1478
|
-
const l = t + i, c =
|
|
1487
|
+
const l = t + i, c = Ye(e, l), d = Array.from({ length: l }).map((m, v) => ({
|
|
1479
1488
|
data: s[v + c],
|
|
1480
1489
|
index: v + c,
|
|
1481
1490
|
offset: 0,
|
|
@@ -1483,7 +1492,7 @@ function Qn(t, e, n, o, r, s) {
|
|
|
1483
1492
|
}));
|
|
1484
1493
|
return ve(d, [], l, r, n, o);
|
|
1485
1494
|
}
|
|
1486
|
-
function
|
|
1495
|
+
function yn(t, e, n) {
|
|
1487
1496
|
if (t.length === 0)
|
|
1488
1497
|
return [];
|
|
1489
1498
|
if (!be(e))
|
|
@@ -1509,7 +1518,7 @@ function wn(t, e, n) {
|
|
|
1509
1518
|
}
|
|
1510
1519
|
return s;
|
|
1511
1520
|
}
|
|
1512
|
-
function
|
|
1521
|
+
function bn(t, e) {
|
|
1513
1522
|
return t === void 0 ? 0 : typeof t == "number" ? t : t[e] ?? 0;
|
|
1514
1523
|
}
|
|
1515
1524
|
const Kt = j(
|
|
@@ -1560,14 +1569,14 @@ const Kt = j(
|
|
|
1560
1569
|
mt,
|
|
1561
1570
|
q
|
|
1562
1571
|
]) => {
|
|
1563
|
-
const Q = k, { offsetTree: gt, sizeTree:
|
|
1572
|
+
const Q = k, { offsetTree: gt, sizeTree: lt } = Q, St = it(h);
|
|
1564
1573
|
if (C === 0)
|
|
1565
1574
|
return { ...Oe, totalCount: C };
|
|
1566
1575
|
if (u === 0 && g === 0)
|
|
1567
|
-
return St === 0 ? { ...Oe, totalCount: C } :
|
|
1568
|
-
if (J(
|
|
1576
|
+
return St === 0 ? { ...Oe, totalCount: C } : to(St, O, k, Z, F, q || []);
|
|
1577
|
+
if (J(lt))
|
|
1569
1578
|
return St > 0 ? null : ve(
|
|
1570
|
-
|
|
1579
|
+
Xo(Ye(O, C), Q, q),
|
|
1571
1580
|
[],
|
|
1572
1581
|
C,
|
|
1573
1582
|
F,
|
|
@@ -1578,41 +1587,41 @@ const Kt = j(
|
|
|
1578
1587
|
if (N.length > 0) {
|
|
1579
1588
|
const D = N[0], K = N[N.length - 1];
|
|
1580
1589
|
let st = 0;
|
|
1581
|
-
for (const tt of Zt(
|
|
1582
|
-
const X = tt.value,
|
|
1583
|
-
for (let
|
|
1584
|
-
Ft.push({ data: q?.[
|
|
1590
|
+
for (const tt of Zt(lt, D, K)) {
|
|
1591
|
+
const X = tt.value, ct = Math.max(tt.start, D), xt = Math.min(tt.end, K);
|
|
1592
|
+
for (let ut = ct; ut <= xt; ut++)
|
|
1593
|
+
Ft.push({ data: q?.[ut], index: ut, offset: st, size: X }), st += X;
|
|
1585
1594
|
}
|
|
1586
1595
|
}
|
|
1587
1596
|
if (!V)
|
|
1588
1597
|
return ve([], Ft, C, F, Q, Z);
|
|
1589
|
-
const pt = N.length > 0 ? N[N.length - 1] + 1 : 0, jt =
|
|
1598
|
+
const pt = N.length > 0 ? N[N.length - 1] + 1 : 0, jt = Ao(gt, u, g, pt);
|
|
1590
1599
|
if (jt.length === 0)
|
|
1591
1600
|
return null;
|
|
1592
1601
|
const Qt = C - 1, Et = ye([], (D) => {
|
|
1593
1602
|
for (const K of jt) {
|
|
1594
1603
|
const st = K.value;
|
|
1595
1604
|
let tt = st.offset, X = K.start;
|
|
1596
|
-
const
|
|
1605
|
+
const ct = st.size;
|
|
1597
1606
|
if (st.offset < u) {
|
|
1598
|
-
X += Math.floor((u - st.offset + F) / (
|
|
1599
|
-
const
|
|
1600
|
-
tt +=
|
|
1607
|
+
X += Math.floor((u - st.offset + F) / (ct + F));
|
|
1608
|
+
const ut = X - K.start;
|
|
1609
|
+
tt += ut * ct + ut * F;
|
|
1601
1610
|
}
|
|
1602
|
-
X < pt && (tt += (pt - X) *
|
|
1611
|
+
X < pt && (tt += (pt - X) * ct, X = pt);
|
|
1603
1612
|
const xt = Math.min(K.end, Qt);
|
|
1604
|
-
for (let
|
|
1605
|
-
D.push({ data: q?.[
|
|
1613
|
+
for (let ut = X; ut <= xt && !(tt >= g); ut++)
|
|
1614
|
+
D.push({ data: q?.[ut], index: ut, offset: tt, size: ct }), tt += ct + F;
|
|
1606
1615
|
}
|
|
1607
|
-
}), te =
|
|
1616
|
+
}), te = bn(mt, ae), b = bn(mt, de);
|
|
1608
1617
|
if (Et.length > 0 && (te > 0 || b > 0)) {
|
|
1609
1618
|
const D = Et[0], K = Et[Et.length - 1];
|
|
1610
1619
|
if (te > 0 && D.index > pt) {
|
|
1611
1620
|
const st = Math.min(te, D.index - pt), tt = [];
|
|
1612
1621
|
let X = D.offset;
|
|
1613
|
-
for (let
|
|
1614
|
-
const
|
|
1615
|
-
X -=
|
|
1622
|
+
for (let ct = D.index - 1; ct >= D.index - st; ct--) {
|
|
1623
|
+
const ut = Zt(lt, ct, ct)[0]?.value ?? D.size;
|
|
1624
|
+
X -= ut + F, tt.unshift({ data: q?.[ct], index: ct, offset: X, size: ut });
|
|
1616
1625
|
}
|
|
1617
1626
|
Et.unshift(...tt);
|
|
1618
1627
|
}
|
|
@@ -1620,7 +1629,7 @@ const Kt = j(
|
|
|
1620
1629
|
const st = Math.min(b, Qt - K.index);
|
|
1621
1630
|
let tt = K.offset + K.size + F;
|
|
1622
1631
|
for (let X = K.index + 1; X <= K.index + st; X++) {
|
|
1623
|
-
const xt = Zt(
|
|
1632
|
+
const xt = Zt(lt, X, X)[0]?.value ?? K.size;
|
|
1624
1633
|
Et.push({ data: q?.[X], index: X, offset: tt, size: xt }), tt += xt + F;
|
|
1625
1634
|
}
|
|
1626
1635
|
}
|
|
@@ -1637,7 +1646,7 @@ const Kt = j(
|
|
|
1637
1646
|
z(
|
|
1638
1647
|
x(
|
|
1639
1648
|
t,
|
|
1640
|
-
P(
|
|
1649
|
+
P(Ne),
|
|
1641
1650
|
B((u) => u?.length)
|
|
1642
1651
|
),
|
|
1643
1652
|
r
|
|
@@ -1694,7 +1703,7 @@ const Kt = j(
|
|
|
1694
1703
|
startIndex: u[g].index
|
|
1695
1704
|
};
|
|
1696
1705
|
}),
|
|
1697
|
-
nt(
|
|
1706
|
+
nt(jn)
|
|
1698
1707
|
)
|
|
1699
1708
|
);
|
|
1700
1709
|
return {
|
|
@@ -1711,16 +1720,16 @@ const Kt = j(
|
|
|
1711
1720
|
},
|
|
1712
1721
|
rt(
|
|
1713
1722
|
kt,
|
|
1714
|
-
|
|
1715
|
-
|
|
1723
|
+
Xn,
|
|
1724
|
+
Ze,
|
|
1716
1725
|
me,
|
|
1717
1726
|
fe,
|
|
1718
1727
|
pe,
|
|
1719
1728
|
At,
|
|
1720
|
-
|
|
1729
|
+
Ke
|
|
1721
1730
|
),
|
|
1722
1731
|
{ singleton: !0 }
|
|
1723
|
-
),
|
|
1732
|
+
), eo = j(
|
|
1724
1733
|
([{ fixedFooterHeight: t, fixedHeaderHeight: e, footerHeight: n, headerHeight: o }, { listState: r }]) => {
|
|
1725
1734
|
const s = U(), i = ht(
|
|
1726
1735
|
x(
|
|
@@ -1733,7 +1742,7 @@ const Kt = j(
|
|
|
1733
1742
|
},
|
|
1734
1743
|
rt(It, Kt),
|
|
1735
1744
|
{ singleton: !0 }
|
|
1736
|
-
),
|
|
1745
|
+
), Jo = j(
|
|
1737
1746
|
([{ viewportHeight: t }, { totalListHeight: e }]) => {
|
|
1738
1747
|
const n = T(!1), o = ht(
|
|
1739
1748
|
x(
|
|
@@ -1747,17 +1756,17 @@ const Kt = j(
|
|
|
1747
1756
|
);
|
|
1748
1757
|
return { alignToBottom: n, paddingTopAddition: o };
|
|
1749
1758
|
},
|
|
1750
|
-
rt(It,
|
|
1759
|
+
rt(It, eo),
|
|
1751
1760
|
{ singleton: !0 }
|
|
1752
|
-
),
|
|
1761
|
+
), no = j(() => ({
|
|
1753
1762
|
context: T(null)
|
|
1754
|
-
})),
|
|
1763
|
+
})), Qo = ({
|
|
1755
1764
|
itemBottom: t,
|
|
1756
1765
|
itemTop: e,
|
|
1757
1766
|
locationParams: { align: n, behavior: o, ...r },
|
|
1758
1767
|
viewportBottom: s,
|
|
1759
1768
|
viewportTop: i
|
|
1760
|
-
}) => e < i ? { ...r, align: n ?? "start", ...o === void 0 ? {} : { behavior: o } } : t > s ? { ...r, align: n ?? "end", ...o === void 0 ? {} : { behavior: o } } : null,
|
|
1769
|
+
}) => e < i ? { ...r, align: n ?? "start", ...o === void 0 ? {} : { behavior: o } } : t > s ? { ...r, align: n ?? "end", ...o === void 0 ? {} : { behavior: o } } : null, oo = j(
|
|
1761
1770
|
([
|
|
1762
1771
|
{ gap: t, sizes: e, totalCount: n },
|
|
1763
1772
|
{ fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: c },
|
|
@@ -1770,7 +1779,7 @@ const Kt = j(
|
|
|
1770
1779
|
$(e, c, n, s, r, o, l),
|
|
1771
1780
|
$(t),
|
|
1772
1781
|
B(([[v, p, I, w, R, h, f, a], S]) => {
|
|
1773
|
-
const { calculateViewLocation: H =
|
|
1782
|
+
const { calculateViewLocation: H = Qo, done: y, ...L } = v, u = Zn(v, p, w - 1), g = ce(u, p.offsetTree, S) + R + h, C = g + Rt(p.sizeTree, u)[1], k = a + h, O = a + I - f, V = H({
|
|
1774
1783
|
itemBottom: C,
|
|
1775
1784
|
itemTop: g,
|
|
1776
1785
|
locationParams: L,
|
|
@@ -1798,10 +1807,10 @@ const Kt = j(
|
|
|
1798
1807
|
rt(kt, It, fe, Kt, Gt),
|
|
1799
1808
|
{ singleton: !0 }
|
|
1800
1809
|
);
|
|
1801
|
-
function
|
|
1810
|
+
function Rn(t) {
|
|
1802
1811
|
return t === !1 ? !1 : t === "smooth" ? "smooth" : "auto";
|
|
1803
1812
|
}
|
|
1804
|
-
const
|
|
1813
|
+
const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
|
|
1805
1814
|
([
|
|
1806
1815
|
{ listRefresh: t, totalCount: e, fixedItemSize: n, data: o },
|
|
1807
1816
|
{ atBottomState: r, isAtBottom: s },
|
|
@@ -1816,7 +1825,7 @@ const Qo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), tr = j(
|
|
|
1816
1825
|
const w = T(!1), R = U();
|
|
1817
1826
|
let h = null;
|
|
1818
1827
|
function f(y) {
|
|
1819
|
-
|
|
1828
|
+
M(i, {
|
|
1820
1829
|
align: "end",
|
|
1821
1830
|
behavior: y,
|
|
1822
1831
|
index: "LAST"
|
|
@@ -1828,7 +1837,7 @@ const Qo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), tr = j(
|
|
|
1828
1837
|
$(W(w), s, l, v),
|
|
1829
1838
|
B(([[y, L], u, g, C, k]) => {
|
|
1830
1839
|
let O = L && C, V = "auto";
|
|
1831
|
-
return O && (V =
|
|
1840
|
+
return O && (V = tr(u, g || k), O = O && V !== !1), { followOutputBehavior: V, shouldFollow: O, totalCount: y };
|
|
1832
1841
|
}),
|
|
1833
1842
|
P(({ shouldFollow: y }) => y)
|
|
1834
1843
|
),
|
|
@@ -1885,9 +1894,9 @@ const Qo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), tr = j(
|
|
|
1885
1894
|
),
|
|
1886
1895
|
(y) => {
|
|
1887
1896
|
h !== null && (h(), h = null), it(n) === void 0 ? h = yt(t, () => {
|
|
1888
|
-
it(m)("scrolling into view", {}),
|
|
1897
|
+
it(m)("scrolling into view", {}), M(I, y), h = null;
|
|
1889
1898
|
}) : requestAnimationFrame(() => {
|
|
1890
|
-
it(m)("scrolling into view", {}),
|
|
1899
|
+
it(m)("scrolling into view", {}), M(I, y);
|
|
1891
1900
|
});
|
|
1892
1901
|
}
|
|
1893
1902
|
), { autoscrollToBottom: R, followOutput: w, scrollIntoViewOnChange: S };
|
|
@@ -1900,23 +1909,23 @@ const Qo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), tr = j(
|
|
|
1900
1909
|
At,
|
|
1901
1910
|
Gt,
|
|
1902
1911
|
It,
|
|
1903
|
-
|
|
1904
|
-
|
|
1912
|
+
no,
|
|
1913
|
+
oo
|
|
1905
1914
|
)
|
|
1906
|
-
),
|
|
1915
|
+
), nr = j(
|
|
1907
1916
|
([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (z(
|
|
1908
1917
|
x(
|
|
1909
1918
|
l,
|
|
1910
1919
|
$(s),
|
|
1911
1920
|
P(([, c]) => c !== 0),
|
|
1912
1921
|
$(r, o, e, n, t),
|
|
1913
|
-
B(([[, c], d, m, v, p, I = []]) =>
|
|
1922
|
+
B(([[, c], d, m, v, p, I = []]) => to(c, d, m, v, p, I))
|
|
1914
1923
|
),
|
|
1915
1924
|
i
|
|
1916
1925
|
), {}),
|
|
1917
1926
|
rt(kt, me, Kt, At),
|
|
1918
1927
|
{ singleton: !0 }
|
|
1919
|
-
),
|
|
1928
|
+
), or = j(
|
|
1920
1929
|
([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
|
|
1921
1930
|
const o = T(0);
|
|
1922
1931
|
return Y(
|
|
@@ -1935,7 +1944,7 @@ const Qo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), tr = j(
|
|
|
1935
1944
|
),
|
|
1936
1945
|
() => {
|
|
1937
1946
|
requestAnimationFrame(() => {
|
|
1938
|
-
|
|
1947
|
+
M(e, r);
|
|
1939
1948
|
});
|
|
1940
1949
|
}
|
|
1941
1950
|
);
|
|
@@ -1946,7 +1955,7 @@ const Qo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), tr = j(
|
|
|
1946
1955
|
},
|
|
1947
1956
|
rt(At, It, Kt),
|
|
1948
1957
|
{ singleton: !0 }
|
|
1949
|
-
),
|
|
1958
|
+
), ro = j(
|
|
1950
1959
|
([{ scrollVelocity: t }]) => {
|
|
1951
1960
|
const e = T(!1), n = U(), o = T(!1);
|
|
1952
1961
|
return z(
|
|
@@ -1975,7 +1984,7 @@ const Qo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), tr = j(
|
|
|
1975
1984
|
},
|
|
1976
1985
|
rt(pe),
|
|
1977
1986
|
{ singleton: !0 }
|
|
1978
|
-
),
|
|
1987
|
+
), Xe = j(([{ scrollContainerState: t, scrollTo: e }]) => {
|
|
1979
1988
|
const n = U(), o = U(), r = U(), s = T(!1), i = T(void 0);
|
|
1980
1989
|
return z(
|
|
1981
1990
|
x(
|
|
@@ -2007,7 +2016,7 @@ const Qo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), tr = j(
|
|
|
2007
2016
|
windowScrollTo: r,
|
|
2008
2017
|
windowViewportRect: o
|
|
2009
2018
|
};
|
|
2010
|
-
}, rt(It)),
|
|
2019
|
+
}, rt(It)), rr = j(
|
|
2011
2020
|
([
|
|
2012
2021
|
{ sizeRanges: t, sizes: e },
|
|
2013
2022
|
{ headerHeight: n, scrollTop: o },
|
|
@@ -2022,10 +2031,10 @@ const Qo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), tr = j(
|
|
|
2022
2031
|
$(e, o, i, v, p, n)
|
|
2023
2032
|
),
|
|
2024
2033
|
([I, w, R, h, f, a, S]) => {
|
|
2025
|
-
const H =
|
|
2034
|
+
const H = _o(w.sizeTree);
|
|
2026
2035
|
h && f !== null && a !== null && (R = f.scrollTop - a.offsetTop), R -= S, I({ ranges: H, scrollTop: R });
|
|
2027
2036
|
}
|
|
2028
|
-
), z(x(m, P(
|
|
2037
|
+
), z(x(m, P(Ne), B(sr)), r), z(
|
|
2029
2038
|
x(
|
|
2030
2039
|
s,
|
|
2031
2040
|
$(m),
|
|
@@ -2039,12 +2048,12 @@ const Qo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), tr = j(
|
|
|
2039
2048
|
restoreStateFrom: m
|
|
2040
2049
|
};
|
|
2041
2050
|
},
|
|
2042
|
-
rt(kt, It, me, At,
|
|
2051
|
+
rt(kt, It, me, At, Xe)
|
|
2043
2052
|
);
|
|
2044
|
-
function
|
|
2053
|
+
function sr(t) {
|
|
2045
2054
|
return { align: "start", index: 0, offset: t.scrollTop };
|
|
2046
2055
|
}
|
|
2047
|
-
const
|
|
2056
|
+
const ir = j(([{ topItemsIndexes: t }]) => {
|
|
2048
2057
|
const e = T(0);
|
|
2049
2058
|
return z(
|
|
2050
2059
|
x(
|
|
@@ -2055,11 +2064,11 @@ const sr = j(([{ topItemsIndexes: t }]) => {
|
|
|
2055
2064
|
t
|
|
2056
2065
|
), { topItemCount: e };
|
|
2057
2066
|
}, rt(Kt));
|
|
2058
|
-
function
|
|
2067
|
+
function so(t) {
|
|
2059
2068
|
let e = !1, n;
|
|
2060
2069
|
return (() => (e || (e = !0, n = t()), n));
|
|
2061
2070
|
}
|
|
2062
|
-
const
|
|
2071
|
+
const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), cr = j(
|
|
2063
2072
|
([
|
|
2064
2073
|
{ deviation: t, scrollBy: e, scrollingInProgress: n, scrollTop: o },
|
|
2065
2074
|
{ isAtBottom: r, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: l },
|
|
@@ -2087,10 +2096,10 @@ const ir = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2087
2096
|
)
|
|
2088
2097
|
);
|
|
2089
2098
|
function h(f) {
|
|
2090
|
-
f > 0 ? (
|
|
2099
|
+
f > 0 ? (M(e, { behavior: "auto", top: -f }), M(t, 0)) : (M(t, 0), M(e, { behavior: "auto", top: -f }));
|
|
2091
2100
|
}
|
|
2092
2101
|
return Y(x(R, $(t, s)), ([f, a, S]) => {
|
|
2093
|
-
S &&
|
|
2102
|
+
S && lr() ? M(t, a - f) : h(-f);
|
|
2094
2103
|
}), Y(
|
|
2095
2104
|
x(
|
|
2096
2105
|
at(ht(s, !1), t, w),
|
|
@@ -2127,16 +2136,16 @@ const ir = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2127
2136
|
})
|
|
2128
2137
|
),
|
|
2129
2138
|
(f) => {
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2139
|
+
M(t, f), requestAnimationFrame(() => {
|
|
2140
|
+
M(e, { top: f }), requestAnimationFrame(() => {
|
|
2141
|
+
M(t, 0), M(w, !1);
|
|
2133
2142
|
});
|
|
2134
2143
|
});
|
|
2135
2144
|
}
|
|
2136
2145
|
), { deviation: t };
|
|
2137
2146
|
},
|
|
2138
|
-
rt(It, pe, Kt, kt, Gt,
|
|
2139
|
-
),
|
|
2147
|
+
rt(It, pe, Kt, kt, Gt, Ke)
|
|
2148
|
+
), ur = j(
|
|
2140
2149
|
([
|
|
2141
2150
|
t,
|
|
2142
2151
|
e,
|
|
@@ -2163,19 +2172,19 @@ const ir = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2163
2172
|
...m
|
|
2164
2173
|
}),
|
|
2165
2174
|
rt(
|
|
2166
|
-
|
|
2167
|
-
|
|
2175
|
+
Ze,
|
|
2176
|
+
nr,
|
|
2168
2177
|
At,
|
|
2178
|
+
ro,
|
|
2179
|
+
eo,
|
|
2180
|
+
or,
|
|
2181
|
+
Jo,
|
|
2182
|
+
Xe,
|
|
2169
2183
|
oo,
|
|
2170
|
-
to,
|
|
2171
|
-
nr,
|
|
2172
|
-
Xo,
|
|
2173
|
-
Ze,
|
|
2174
|
-
no,
|
|
2175
2184
|
Gt,
|
|
2176
|
-
|
|
2185
|
+
no
|
|
2177
2186
|
)
|
|
2178
|
-
),
|
|
2187
|
+
), io = j(
|
|
2179
2188
|
([
|
|
2180
2189
|
{
|
|
2181
2190
|
data: t,
|
|
@@ -2251,17 +2260,17 @@ const ir = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2251
2260
|
kt,
|
|
2252
2261
|
me,
|
|
2253
2262
|
It,
|
|
2254
|
-
|
|
2255
|
-
|
|
2263
|
+
rr,
|
|
2264
|
+
er,
|
|
2256
2265
|
Kt,
|
|
2257
2266
|
fe,
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2267
|
+
cr,
|
|
2268
|
+
ir,
|
|
2269
|
+
Xn,
|
|
2270
|
+
ur
|
|
2262
2271
|
)
|
|
2263
2272
|
);
|
|
2264
|
-
function
|
|
2273
|
+
function ar(t, e) {
|
|
2265
2274
|
const n = {}, o = {};
|
|
2266
2275
|
let r = 0;
|
|
2267
2276
|
const s = t.length;
|
|
@@ -2272,50 +2281,50 @@ function ur(t, e) {
|
|
|
2272
2281
|
return n;
|
|
2273
2282
|
}
|
|
2274
2283
|
const Ie = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
|
|
2275
|
-
function
|
|
2284
|
+
function Je(t, e, n) {
|
|
2276
2285
|
const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = E.createContext({});
|
|
2277
2286
|
function c(f, a) {
|
|
2278
|
-
f.propsReady !== void 0 &&
|
|
2287
|
+
f.propsReady !== void 0 && M(f.propsReady, !1);
|
|
2279
2288
|
for (const S of o) {
|
|
2280
2289
|
const H = f[e.required[S]];
|
|
2281
|
-
|
|
2290
|
+
M(H, a[S]);
|
|
2282
2291
|
}
|
|
2283
2292
|
for (const S of r)
|
|
2284
2293
|
if (S in a) {
|
|
2285
2294
|
const H = f[e.optional[S]];
|
|
2286
|
-
|
|
2295
|
+
M(H, a[S]);
|
|
2287
2296
|
}
|
|
2288
|
-
f.propsReady !== void 0 &&
|
|
2297
|
+
f.propsReady !== void 0 && M(f.propsReady, !0);
|
|
2289
2298
|
}
|
|
2290
2299
|
function d(f) {
|
|
2291
2300
|
return s.reduce((a, S) => (a[S] = (H) => {
|
|
2292
2301
|
const y = f[e.methods[S]];
|
|
2293
|
-
|
|
2302
|
+
M(y, H);
|
|
2294
2303
|
}, a), {});
|
|
2295
2304
|
}
|
|
2296
2305
|
function m(f) {
|
|
2297
|
-
return i.reduce((a, S) => (a[S] =
|
|
2306
|
+
return i.reduce((a, S) => (a[S] = bo(f[e.events[S]]), a), {});
|
|
2298
2307
|
}
|
|
2299
2308
|
const v = E.forwardRef(function(a, S) {
|
|
2300
|
-
const { children: H, ...y } = a, [L] = E.useState(() => ye(
|
|
2309
|
+
const { children: H, ...y } = a, [L] = E.useState(() => ye(Eo(t), (C) => {
|
|
2301
2310
|
c(C, y);
|
|
2302
|
-
})), [u] = E.useState(
|
|
2311
|
+
})), [u] = E.useState(pn(m, L));
|
|
2303
2312
|
Ie(() => {
|
|
2304
2313
|
for (const C of i)
|
|
2305
2314
|
C in y && Y(u[C], y[C]);
|
|
2306
2315
|
return () => {
|
|
2307
|
-
Object.values(u).map(
|
|
2316
|
+
Object.values(u).map(De);
|
|
2308
2317
|
};
|
|
2309
2318
|
}, [y, u, L]), Ie(() => {
|
|
2310
2319
|
c(L, y);
|
|
2311
|
-
}), E.useImperativeHandle(S,
|
|
2320
|
+
}), E.useImperativeHandle(S, mn(d(L)));
|
|
2312
2321
|
const g = n;
|
|
2313
|
-
return /* @__PURE__ */ G(l.Provider, { value: L, children: n === void 0 ? H : /* @__PURE__ */ G(g, { ...
|
|
2322
|
+
return /* @__PURE__ */ G(l.Provider, { value: L, children: n === void 0 ? H : /* @__PURE__ */ G(g, { ...ar([...o, ...r, ...i], y), children: H }) });
|
|
2314
2323
|
}), p = (f) => {
|
|
2315
2324
|
const a = E.useContext(l);
|
|
2316
2325
|
return E.useCallback(
|
|
2317
2326
|
(S) => {
|
|
2318
|
-
|
|
2327
|
+
M(a[f], S);
|
|
2319
2328
|
},
|
|
2320
2329
|
[a, f]
|
|
2321
2330
|
);
|
|
@@ -2330,10 +2339,10 @@ function Xe(t, e, n) {
|
|
|
2330
2339
|
() => it(S)
|
|
2331
2340
|
);
|
|
2332
2341
|
}, w = (f) => {
|
|
2333
|
-
const S = E.useContext(l)[f], [H, y] = E.useState(
|
|
2342
|
+
const S = E.useContext(l)[f], [H, y] = E.useState(pn(it, S));
|
|
2334
2343
|
return Ie(
|
|
2335
2344
|
() => Y(S, (L) => {
|
|
2336
|
-
L !== H && y(
|
|
2345
|
+
L !== H && y(mn(L));
|
|
2337
2346
|
}),
|
|
2338
2347
|
[S, H]
|
|
2339
2348
|
), H;
|
|
@@ -2348,24 +2357,24 @@ function Xe(t, e, n) {
|
|
|
2348
2357
|
usePublisher: p
|
|
2349
2358
|
};
|
|
2350
2359
|
}
|
|
2351
|
-
const Re = E.createContext(void 0),
|
|
2360
|
+
const Re = E.createContext(void 0), lo = E.createContext(void 0), Le = "-webkit-sticky", Hn = "sticky", Qe = so(() => {
|
|
2352
2361
|
if (typeof document > "u")
|
|
2353
|
-
return
|
|
2362
|
+
return Hn;
|
|
2354
2363
|
const t = document.createElement("div");
|
|
2355
|
-
return t.style.position = Le, t.style.position === Le ? Le :
|
|
2356
|
-
}),
|
|
2364
|
+
return t.style.position = Le, t.style.position === Le ? Le : Hn;
|
|
2365
|
+
}), co = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
|
|
2357
2366
|
function ke(t) {
|
|
2358
2367
|
return "self" in t;
|
|
2359
2368
|
}
|
|
2360
|
-
function
|
|
2369
|
+
function dr(t) {
|
|
2361
2370
|
return "body" in t;
|
|
2362
2371
|
}
|
|
2363
|
-
function
|
|
2372
|
+
function uo(t, e, n, o = Jt, r, s) {
|
|
2364
2373
|
const i = E.useRef(null), l = E.useRef(null), c = E.useRef(null), d = E.useCallback(
|
|
2365
2374
|
(p) => {
|
|
2366
2375
|
let I, w, R;
|
|
2367
2376
|
const h = p.target;
|
|
2368
|
-
if (
|
|
2377
|
+
if (dr(h) || ke(h)) {
|
|
2369
2378
|
const a = ke(h) ? h : h.defaultView;
|
|
2370
2379
|
R = s === !0 ? _t(a, a.scrollX) : a.scrollY, I = s === !0 ? a.document.documentElement.scrollWidth : a.document.documentElement.scrollHeight, w = s === !0 ? a.innerWidth : a.innerHeight;
|
|
2371
2380
|
} else
|
|
@@ -2377,14 +2386,14 @@ function co(t, e, n, o = Jt, r, s) {
|
|
|
2377
2386
|
viewportHeight: w
|
|
2378
2387
|
});
|
|
2379
2388
|
};
|
|
2380
|
-
p.suppressFlushSync === !0 ? f() :
|
|
2389
|
+
p.suppressFlushSync === !0 ? f() : xo.flushSync(f), l.current !== null && (R === l.current || R <= 0 || R === I - w) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
|
|
2381
2390
|
},
|
|
2382
2391
|
[t, e, s]
|
|
2383
2392
|
);
|
|
2384
2393
|
E.useEffect(() => {
|
|
2385
2394
|
const p = r ?? i.current;
|
|
2386
|
-
return
|
|
2387
|
-
|
|
2395
|
+
return gn(p), o(r ?? i.current), d({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", d, { passive: !0 }), () => {
|
|
2396
|
+
gn(p), o(null), p.removeEventListener("scroll", d);
|
|
2388
2397
|
};
|
|
2389
2398
|
}, [i, d, n, o, r]);
|
|
2390
2399
|
function m(p) {
|
|
@@ -2403,7 +2412,7 @@ function co(t, e, n, o = Jt, r, s) {
|
|
|
2403
2412
|
return;
|
|
2404
2413
|
}
|
|
2405
2414
|
const S = Math.ceil(Math.max(Math.min(a, p.top), 0));
|
|
2406
|
-
if (p.top = S,
|
|
2415
|
+
if (p.top = S, Qn(R, h) || S === f) {
|
|
2407
2416
|
t({ scrollHeight: h, scrollTop: f, viewportHeight: R }), w && e(!0);
|
|
2408
2417
|
return;
|
|
2409
2418
|
}
|
|
@@ -2411,22 +2420,22 @@ function co(t, e, n, o = Jt, r, s) {
|
|
|
2411
2420
|
c.current = null, l.current = null, e(!0);
|
|
2412
2421
|
}, 1e3)) : l.current = null, s === !0 && (p = {
|
|
2413
2422
|
...p.behavior === void 0 ? {} : { behavior: p.behavior },
|
|
2414
|
-
left:
|
|
2423
|
+
left: In(I, S)
|
|
2415
2424
|
}), I.scrollTo(p);
|
|
2416
2425
|
}
|
|
2417
2426
|
function v(p) {
|
|
2418
2427
|
s === !0 && (p = {
|
|
2419
2428
|
...p.behavior === void 0 ? {} : { behavior: p.behavior },
|
|
2420
|
-
...p.top === void 0 ? {} : { left:
|
|
2429
|
+
...p.top === void 0 ? {} : { left: In(i.current, p.top) }
|
|
2421
2430
|
}), i.current.scrollBy(p);
|
|
2422
2431
|
}
|
|
2423
2432
|
return { scrollByCallback: v, scrollerRef: i, scrollToCallback: m };
|
|
2424
2433
|
}
|
|
2425
|
-
function
|
|
2434
|
+
function tn(t) {
|
|
2426
2435
|
return t;
|
|
2427
2436
|
}
|
|
2428
|
-
const
|
|
2429
|
-
const t = T((l) => `Item ${l}`), e = T((l) => `Group ${l}`), n = T({}), o = T(
|
|
2437
|
+
const fr = /* @__PURE__ */ j(() => {
|
|
2438
|
+
const t = T((l) => `Item ${l}`), e = T((l) => `Group ${l}`), n = T({}), o = T(tn), r = T("div"), s = T(Jt), i = (l, c = null) => ht(
|
|
2430
2439
|
x(
|
|
2431
2440
|
n,
|
|
2432
2441
|
B((d) => d[l]),
|
|
@@ -2451,11 +2460,11 @@ const dr = /* @__PURE__ */ j(() => {
|
|
|
2451
2460
|
ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
|
|
2452
2461
|
TopItemListComponent: i("TopItemList")
|
|
2453
2462
|
};
|
|
2454
|
-
}),
|
|
2463
|
+
}), mr = /* @__PURE__ */ j(
|
|
2455
2464
|
([t, e]) => ({ ...t, ...e }),
|
|
2456
|
-
rt(
|
|
2457
|
-
),
|
|
2458
|
-
const n = A("listState"), o = Ct("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Ct("windowScrollContainerState"), l = Ct("scrollContainerState"), c = s || r ? i : l, d = A("itemContent"), m = A("context"), v = A("groupContent"), p = A("trackItemSizes"), I = A("itemSize"), w = A("log"), R = Ct("gap"), h = A("horizontalDirection"), { callbackRef: f } =
|
|
2465
|
+
rt(io, fr)
|
|
2466
|
+
), pr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), hr = { overflowAnchor: "none", position: Qe(), zIndex: 1 }, ao = { overflowAnchor: "none" }, gr = { ...ao, display: "inline-block", height: "100%" }, En = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
|
|
2467
|
+
const n = A("listState"), o = Ct("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Ct("windowScrollContainerState"), l = Ct("scrollContainerState"), c = s || r ? i : l, d = A("itemContent"), m = A("context"), v = A("groupContent"), p = A("trackItemSizes"), I = A("itemSize"), w = A("log"), R = Ct("gap"), h = A("horizontalDirection"), { callbackRef: f } = _n(
|
|
2459
2468
|
o,
|
|
2460
2469
|
I,
|
|
2461
2470
|
p,
|
|
@@ -2466,10 +2475,10 @@ const dr = /* @__PURE__ */ j(() => {
|
|
|
2466
2475
|
h,
|
|
2467
2476
|
A("skipAnimationFrameInResizeObserver")
|
|
2468
2477
|
), [a, S] = E.useState(0);
|
|
2469
|
-
|
|
2478
|
+
rn("deviation", (F) => {
|
|
2470
2479
|
a !== F && S(F);
|
|
2471
2480
|
});
|
|
2472
|
-
const H = A("EmptyPlaceholder"), y = A("ScrollSeekPlaceholder") ??
|
|
2481
|
+
const H = A("EmptyPlaceholder"), y = A("ScrollSeekPlaceholder") ?? pr, L = A("ListComponent"), u = A("ItemComponent"), g = A("GroupComponent"), C = A("computeItemKey"), k = A("isSeeking"), O = A("groupIndices").length > 0, V = A("alignToBottom"), N = A("initialItemFinalLocationReached"), Z = e ? {} : {
|
|
2473
2482
|
boxSizing: "border-box",
|
|
2474
2483
|
...h ? {
|
|
2475
2484
|
display: "inline-block",
|
|
@@ -2512,33 +2521,33 @@ const dr = /* @__PURE__ */ j(() => {
|
|
|
2512
2521
|
"data-item-index": F.index,
|
|
2513
2522
|
"data-known-size": F.size,
|
|
2514
2523
|
key: q,
|
|
2515
|
-
style:
|
|
2524
|
+
style: hr
|
|
2516
2525
|
},
|
|
2517
2526
|
v(F.index, m)
|
|
2518
2527
|
) : /* @__PURE__ */ Dt(
|
|
2519
2528
|
u,
|
|
2520
2529
|
{
|
|
2521
2530
|
...ot(u, m),
|
|
2522
|
-
...
|
|
2531
|
+
...fo(u, F.data),
|
|
2523
2532
|
"data-index": mt,
|
|
2524
2533
|
"data-item-group-index": F.groupIndex,
|
|
2525
2534
|
"data-item-index": F.index,
|
|
2526
2535
|
"data-known-size": F.size,
|
|
2527
2536
|
key: q,
|
|
2528
|
-
style: h ?
|
|
2537
|
+
style: h ? gr : ao
|
|
2529
2538
|
},
|
|
2530
2539
|
O ? d(F.index, F.groupIndex, F.data, m) : d(F.index, F.data, m)
|
|
2531
2540
|
);
|
|
2532
2541
|
})
|
|
2533
2542
|
}
|
|
2534
2543
|
);
|
|
2535
|
-
}),
|
|
2544
|
+
}), Ir = {
|
|
2536
2545
|
height: "100%",
|
|
2537
2546
|
outline: "none",
|
|
2538
2547
|
overflowY: "auto",
|
|
2539
2548
|
position: "relative",
|
|
2540
2549
|
WebkitOverflowScrolling: "touch"
|
|
2541
|
-
},
|
|
2550
|
+
}, Sr = {
|
|
2542
2551
|
outline: "none",
|
|
2543
2552
|
overflowX: "auto",
|
|
2544
2553
|
position: "relative"
|
|
@@ -2548,12 +2557,12 @@ const dr = /* @__PURE__ */ j(() => {
|
|
|
2548
2557
|
top: 0,
|
|
2549
2558
|
width: "100%",
|
|
2550
2559
|
...t ? { display: "flex", flexDirection: "column" } : void 0
|
|
2551
|
-
}),
|
|
2560
|
+
}), en = (t, e, n = 0) => ({
|
|
2552
2561
|
...He(t),
|
|
2553
2562
|
position: e ? "relative" : "absolute",
|
|
2554
2563
|
top: e ? -n : 0
|
|
2555
|
-
}),
|
|
2556
|
-
position:
|
|
2564
|
+
}), xr = {
|
|
2565
|
+
position: Qe(),
|
|
2557
2566
|
top: 0,
|
|
2558
2567
|
width: "100%",
|
|
2559
2568
|
zIndex: 1
|
|
@@ -2562,10 +2571,10 @@ function ot(t, e) {
|
|
|
2562
2571
|
if (typeof t != "string")
|
|
2563
2572
|
return { context: e };
|
|
2564
2573
|
}
|
|
2565
|
-
function
|
|
2574
|
+
function fo(t, e) {
|
|
2566
2575
|
return { item: typeof t == "string" ? void 0 : e };
|
|
2567
2576
|
}
|
|
2568
|
-
const
|
|
2577
|
+
const vr = /* @__PURE__ */ E.memo(function() {
|
|
2569
2578
|
const e = A("HeaderComponent"), n = Ct("headerHeight"), o = A("HeaderFooterTag"), r = Lt(
|
|
2570
2579
|
E.useMemo(
|
|
2571
2580
|
() => (i) => {
|
|
@@ -2577,7 +2586,7 @@ const xr = /* @__PURE__ */ E.memo(function() {
|
|
|
2577
2586
|
A("skipAnimationFrameInResizeObserver")
|
|
2578
2587
|
), s = A("context");
|
|
2579
2588
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
|
|
2580
|
-
}),
|
|
2589
|
+
}), Tr = /* @__PURE__ */ E.memo(function() {
|
|
2581
2590
|
const e = A("FooterComponent"), n = Ct("footerHeight"), o = A("HeaderFooterTag"), r = Lt(
|
|
2582
2591
|
E.useMemo(
|
|
2583
2592
|
() => (i) => {
|
|
@@ -2590,9 +2599,9 @@ const xr = /* @__PURE__ */ E.memo(function() {
|
|
|
2590
2599
|
), s = A("context");
|
|
2591
2600
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
|
|
2592
2601
|
});
|
|
2593
|
-
function
|
|
2602
|
+
function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
2594
2603
|
return E.memo(function({ children: s, style: i, context: l, ...c }) {
|
|
2595
|
-
const d = n("scrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("scrollerRef"), I = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: R, scrollToCallback: h } =
|
|
2604
|
+
const d = n("scrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("scrollerRef"), I = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: R, scrollToCallback: h } = uo(
|
|
2596
2605
|
d,
|
|
2597
2606
|
v,
|
|
2598
2607
|
m,
|
|
@@ -2606,7 +2615,7 @@ function en({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2606
2615
|
"data-testid": "virtuoso-scroller",
|
|
2607
2616
|
"data-virtuoso-scroller": !0,
|
|
2608
2617
|
ref: R,
|
|
2609
|
-
style: { ...I ?
|
|
2618
|
+
style: { ...I ? Sr : Ir, ...i },
|
|
2610
2619
|
tabIndex: 0,
|
|
2611
2620
|
...c,
|
|
2612
2621
|
...ot(m, l),
|
|
@@ -2615,16 +2624,16 @@ function en({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2615
2624
|
);
|
|
2616
2625
|
});
|
|
2617
2626
|
}
|
|
2618
|
-
function
|
|
2627
|
+
function on({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
2619
2628
|
return E.memo(function({ children: s, style: i, context: l, ...c }) {
|
|
2620
|
-
const d = n("windowScrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("totalListHeight"), I = e("deviation"), w = e("customScrollParent"), R = E.useRef(null), h = e("scrollerRef"), { scrollByCallback: f, scrollerRef: a, scrollToCallback: S } =
|
|
2629
|
+
const d = n("windowScrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("totalListHeight"), I = e("deviation"), w = e("customScrollParent"), R = E.useRef(null), h = e("scrollerRef"), { scrollByCallback: f, scrollerRef: a, scrollToCallback: S } = uo(
|
|
2621
2630
|
d,
|
|
2622
2631
|
v,
|
|
2623
2632
|
m,
|
|
2624
2633
|
h,
|
|
2625
2634
|
w
|
|
2626
2635
|
);
|
|
2627
|
-
return
|
|
2636
|
+
return co(() => (a.current = w ?? R.current?.ownerDocument.defaultView, () => {
|
|
2628
2637
|
a.current = null;
|
|
2629
2638
|
}), [a, w]), t("windowScrollTo", S), t("scrollBy", f), /* @__PURE__ */ G(
|
|
2630
2639
|
m,
|
|
@@ -2639,7 +2648,7 @@ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2639
2648
|
);
|
|
2640
2649
|
});
|
|
2641
2650
|
}
|
|
2642
|
-
const
|
|
2651
|
+
const Cr = ({ children: t }) => {
|
|
2643
2652
|
const e = E.useContext(Re), n = Ct("viewportHeight"), o = Ct("fixedItemHeight"), r = A("alignToBottom"), s = A("horizontalDirection"), i = E.useMemo(
|
|
2644
2653
|
() => re(n, (c) => Ht(c, s ? "width" : "height")),
|
|
2645
2654
|
[n, s]
|
|
@@ -2647,35 +2656,35 @@ const Tr = ({ children: t }) => {
|
|
|
2647
2656
|
return E.useEffect(() => {
|
|
2648
2657
|
e && (n(e.viewportHeight), o(e.itemHeight));
|
|
2649
2658
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: l, style: He(r), children: t });
|
|
2650
|
-
},
|
|
2651
|
-
const e = E.useContext(Re), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r = A("customScrollParent"), s = A("useWindowScroll"), i = A("topListHeight"), l =
|
|
2659
|
+
}, wr = ({ children: t }) => {
|
|
2660
|
+
const e = E.useContext(Re), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r = A("customScrollParent"), s = A("useWindowScroll"), i = A("topListHeight"), l = Ue(
|
|
2652
2661
|
n,
|
|
2653
2662
|
r,
|
|
2654
2663
|
A("skipAnimationFrameInResizeObserver")
|
|
2655
2664
|
), c = A("alignToBottom");
|
|
2656
2665
|
return E.useEffect(() => {
|
|
2657
2666
|
e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2658
|
-
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: l, style:
|
|
2659
|
-
},
|
|
2660
|
-
const e = A("TopItemListComponent") ?? "div", n = A("headerHeight"), o = { ...
|
|
2667
|
+
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: l, style: en(c, s, i), children: t });
|
|
2668
|
+
}, yr = ({ children: t }) => {
|
|
2669
|
+
const e = A("TopItemListComponent") ?? "div", n = A("headerHeight"), o = { ...xr, marginTop: `${n}px` }, r = A("context");
|
|
2661
2670
|
return /* @__PURE__ */ G(e, { style: o, ...ot(e, r), children: t });
|
|
2662
|
-
},
|
|
2671
|
+
}, br = /* @__PURE__ */ E.memo(function(e) {
|
|
2663
2672
|
const n = A("useWindowScroll"), o = A("topItemsIndexes").length > 0, r = A("customScrollParent"), s = A("context");
|
|
2664
|
-
return /* @__PURE__ */ $t(r || n ?
|
|
2665
|
-
o && /* @__PURE__ */ G(
|
|
2666
|
-
/* @__PURE__ */ $t(r || n ?
|
|
2667
|
-
/* @__PURE__ */ G(
|
|
2668
|
-
/* @__PURE__ */ G(
|
|
2669
|
-
/* @__PURE__ */ G(
|
|
2673
|
+
return /* @__PURE__ */ $t(r || n ? Hr : Rr, { ...e, context: s, children: [
|
|
2674
|
+
o && /* @__PURE__ */ G(yr, { children: /* @__PURE__ */ G(En, { showTopList: !0 }) }),
|
|
2675
|
+
/* @__PURE__ */ $t(r || n ? wr : Cr, { children: [
|
|
2676
|
+
/* @__PURE__ */ G(vr, {}),
|
|
2677
|
+
/* @__PURE__ */ G(En, {}),
|
|
2678
|
+
/* @__PURE__ */ G(Tr, {})
|
|
2670
2679
|
] })
|
|
2671
2680
|
] });
|
|
2672
2681
|
}), {
|
|
2673
|
-
Component:
|
|
2674
|
-
useEmitter:
|
|
2682
|
+
Component: mo,
|
|
2683
|
+
useEmitter: rn,
|
|
2675
2684
|
useEmitterValue: A,
|
|
2676
2685
|
usePublisher: Ct
|
|
2677
|
-
} = /* @__PURE__ */
|
|
2678
|
-
|
|
2686
|
+
} = /* @__PURE__ */ Je(
|
|
2687
|
+
mr,
|
|
2679
2688
|
{
|
|
2680
2689
|
optional: {
|
|
2681
2690
|
restoreStateFrom: "restoreStateFrom",
|
|
@@ -2735,15 +2744,15 @@ const Tr = ({ children: t }) => {
|
|
|
2735
2744
|
groupIndices: "groupIndices"
|
|
2736
2745
|
}
|
|
2737
2746
|
},
|
|
2738
|
-
|
|
2739
|
-
),
|
|
2747
|
+
br
|
|
2748
|
+
), Rr = /* @__PURE__ */ nn({ useEmitter: rn, useEmitterValue: A, usePublisher: Ct }), Hr = /* @__PURE__ */ on({ useEmitter: rn, useEmitterValue: A, usePublisher: Ct }), rs = mo, ss = mo, Er = /* @__PURE__ */ j(() => {
|
|
2740
2749
|
const t = T((d) => /* @__PURE__ */ $t("td", { children: [
|
|
2741
2750
|
"Item $",
|
|
2742
2751
|
d
|
|
2743
2752
|
] })), e = T(null), n = T((d) => /* @__PURE__ */ $t("td", { colSpan: 1e3, children: [
|
|
2744
2753
|
"Group ",
|
|
2745
2754
|
d
|
|
2746
|
-
] })), o = T(null), r = T(null), s = T({}), i = T(
|
|
2755
|
+
] })), o = T(null), r = T(null), s = T({}), i = T(tn), l = T(Jt), c = (d, m = null) => ht(
|
|
2747
2756
|
x(
|
|
2748
2757
|
s,
|
|
2749
2758
|
B((v) => v[d]),
|
|
@@ -2771,11 +2780,11 @@ const Tr = ({ children: t }) => {
|
|
|
2771
2780
|
TableRowComponent: c("TableRow", "tr"),
|
|
2772
2781
|
GroupComponent: c("Group", "tr")
|
|
2773
2782
|
};
|
|
2774
|
-
}),
|
|
2783
|
+
}), Br = /* @__PURE__ */ j(
|
|
2775
2784
|
([t, e]) => ({ ...t, ...e }),
|
|
2776
|
-
rt(
|
|
2777
|
-
),
|
|
2778
|
-
const n =
|
|
2785
|
+
rt(io, Er)
|
|
2786
|
+
), Or = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), Lr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), kr = { overflowAnchor: "none" }, Bn = { position: Qe(), zIndex: 2, overflowAnchor: "none" }, On = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
|
|
2787
|
+
const n = _("listState"), o = _("computeItemKey"), r = _("firstItemIndex"), s = _("context"), i = _("isSeeking"), l = _("fixedHeaderHeight"), c = _("groupIndices").length > 0, d = _("itemContent"), m = _("groupContent"), v = _("ScrollSeekPlaceholder") ?? Or, p = _("GroupComponent"), I = _("TableRowComponent"), w = (e ? n.topItems : []).reduce((h, f, a) => (a === 0 ? h.push(f.size) : h.push(h[a - 1] + f.size), h), []);
|
|
2779
2788
|
return (e ? n.topItems : n.items).map((h) => {
|
|
2780
2789
|
const f = h.originalIndex, a = o(f + r, h.data, s), S = e ? f === 0 ? 0 : w[f - 1] : 0;
|
|
2781
2790
|
return i ? /* @__PURE__ */ Dt(
|
|
@@ -2796,7 +2805,7 @@ const Tr = ({ children: t }) => {
|
|
|
2796
2805
|
"data-known-size": h.size,
|
|
2797
2806
|
key: a,
|
|
2798
2807
|
style: {
|
|
2799
|
-
...
|
|
2808
|
+
...Bn,
|
|
2800
2809
|
top: l
|
|
2801
2810
|
}
|
|
2802
2811
|
},
|
|
@@ -2805,19 +2814,19 @@ const Tr = ({ children: t }) => {
|
|
|
2805
2814
|
I,
|
|
2806
2815
|
{
|
|
2807
2816
|
...ot(I, s),
|
|
2808
|
-
...
|
|
2817
|
+
...fo(I, h.data),
|
|
2809
2818
|
"data-index": f,
|
|
2810
2819
|
"data-item-index": h.index,
|
|
2811
2820
|
"data-known-size": h.size,
|
|
2812
2821
|
"data-item-group-index": h.groupIndex,
|
|
2813
2822
|
key: a,
|
|
2814
|
-
style: e ? { ...
|
|
2823
|
+
style: e ? { ...Bn, top: l + S } : kr
|
|
2815
2824
|
},
|
|
2816
2825
|
c ? d(h.index, h.groupIndex, h.data, s) : d(h.index, h.data, s)
|
|
2817
2826
|
);
|
|
2818
2827
|
});
|
|
2819
|
-
}),
|
|
2820
|
-
const e =
|
|
2828
|
+
}), zr = /* @__PURE__ */ E.memo(function() {
|
|
2829
|
+
const e = _("listState"), n = _("topItemsIndexes").length > 0, o = bt("sizeRanges"), r = _("useWindowScroll"), s = _("customScrollParent"), i = bt("windowScrollContainerState"), l = bt("scrollContainerState"), c = s || r ? i : l, d = _("trackItemSizes"), m = _("itemSize"), v = _("log"), { callbackRef: p, ref: I } = _n(
|
|
2821
2830
|
o,
|
|
2822
2831
|
m,
|
|
2823
2832
|
d,
|
|
@@ -2826,49 +2835,49 @@ const Tr = ({ children: t }) => {
|
|
|
2826
2835
|
void 0,
|
|
2827
2836
|
s,
|
|
2828
2837
|
!1,
|
|
2829
|
-
|
|
2838
|
+
_("skipAnimationFrameInResizeObserver")
|
|
2830
2839
|
), [w, R] = E.useState(0);
|
|
2831
|
-
|
|
2840
|
+
sn("deviation", (O) => {
|
|
2832
2841
|
w !== O && (I.current.style.marginTop = `${O}px`, R(O));
|
|
2833
2842
|
});
|
|
2834
|
-
const h =
|
|
2843
|
+
const h = _("EmptyPlaceholder"), f = _("FillerRow") ?? Lr, a = _("TableBodyComponent"), S = _("paddingTopAddition"), H = _("statefulTotalCount"), y = _("context");
|
|
2835
2844
|
if (H === 0 && h !== null && h !== void 0)
|
|
2836
2845
|
return /* @__PURE__ */ G(h, { ...ot(h, y) });
|
|
2837
2846
|
const L = (n ? e.topItems : []).reduce((O, V) => O + V.size, 0), u = e.offsetTop + S + w - L, g = e.offsetBottom, C = u > 0 ? /* @__PURE__ */ G(f, { context: y, height: u }, "padding-top") : null, k = g > 0 ? /* @__PURE__ */ G(f, { context: y, height: g }, "padding-bottom") : null;
|
|
2838
2847
|
return /* @__PURE__ */ $t(a, { "data-testid": "virtuoso-item-list", ref: p, ...ot(a, y), children: [
|
|
2839
2848
|
C,
|
|
2840
|
-
n && /* @__PURE__ */ G(
|
|
2841
|
-
/* @__PURE__ */ G(
|
|
2849
|
+
n && /* @__PURE__ */ G(On, { showTopList: !0 }),
|
|
2850
|
+
/* @__PURE__ */ G(On, {}),
|
|
2842
2851
|
k
|
|
2843
2852
|
] });
|
|
2844
|
-
}),
|
|
2853
|
+
}), Fr = ({ children: t }) => {
|
|
2845
2854
|
const e = E.useContext(Re), n = bt("viewportHeight"), o = bt("fixedItemHeight"), r = Lt(
|
|
2846
2855
|
E.useMemo(() => re(n, (s) => Ht(s, "height")), [n]),
|
|
2847
2856
|
!0,
|
|
2848
|
-
|
|
2857
|
+
_("skipAnimationFrameInResizeObserver")
|
|
2849
2858
|
);
|
|
2850
2859
|
return E.useEffect(() => {
|
|
2851
2860
|
e && (n(e.viewportHeight), o(e.itemHeight));
|
|
2852
2861
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: r, style: He(!1), children: t });
|
|
2853
|
-
},
|
|
2854
|
-
const e = E.useContext(Re), n = bt("windowViewportRect"), o = bt("fixedItemHeight"), r =
|
|
2862
|
+
}, Vr = ({ children: t }) => {
|
|
2863
|
+
const e = E.useContext(Re), n = bt("windowViewportRect"), o = bt("fixedItemHeight"), r = _("customScrollParent"), s = _("useWindowScroll"), i = Ue(
|
|
2855
2864
|
n,
|
|
2856
2865
|
r,
|
|
2857
|
-
|
|
2866
|
+
_("skipAnimationFrameInResizeObserver")
|
|
2858
2867
|
);
|
|
2859
2868
|
return E.useEffect(() => {
|
|
2860
2869
|
e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2861
|
-
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: i, style:
|
|
2862
|
-
},
|
|
2863
|
-
const n =
|
|
2870
|
+
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: i, style: en(!1, s), children: t });
|
|
2871
|
+
}, Wr = /* @__PURE__ */ E.memo(function(e) {
|
|
2872
|
+
const n = _("useWindowScroll"), o = _("customScrollParent"), r = bt("fixedHeaderHeight"), s = bt("fixedFooterHeight"), i = _("fixedHeaderContent"), l = _("fixedFooterContent"), c = _("context"), d = Lt(
|
|
2864
2873
|
E.useMemo(() => re(r, (a) => Ht(a, "height")), [r]),
|
|
2865
2874
|
!0,
|
|
2866
|
-
|
|
2875
|
+
_("skipAnimationFrameInResizeObserver")
|
|
2867
2876
|
), m = Lt(
|
|
2868
2877
|
E.useMemo(() => re(s, (a) => Ht(a, "height")), [s]),
|
|
2869
2878
|
!0,
|
|
2870
|
-
|
|
2871
|
-
), v = o || n ?
|
|
2879
|
+
_("skipAnimationFrameInResizeObserver")
|
|
2880
|
+
), v = o || n ? Gr : Pr, p = o || n ? Vr : Fr, I = _("TableComponent"), w = _("TableHeadComponent"), R = _("TableFooterComponent"), h = i ? /* @__PURE__ */ G(
|
|
2872
2881
|
w,
|
|
2873
2882
|
{
|
|
2874
2883
|
ref: d,
|
|
@@ -2889,16 +2898,16 @@ const Tr = ({ children: t }) => {
|
|
|
2889
2898
|
) : null;
|
|
2890
2899
|
return /* @__PURE__ */ G(v, { ...e, ...ot(v, c), children: /* @__PURE__ */ G(p, { children: /* @__PURE__ */ $t(I, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...ot(I, c), children: [
|
|
2891
2900
|
h,
|
|
2892
|
-
/* @__PURE__ */ G(
|
|
2901
|
+
/* @__PURE__ */ G(zr, {}, "TableBody"),
|
|
2893
2902
|
f
|
|
2894
2903
|
] }) }) });
|
|
2895
2904
|
}), {
|
|
2896
|
-
Component:
|
|
2897
|
-
useEmitter:
|
|
2898
|
-
useEmitterValue:
|
|
2905
|
+
Component: po,
|
|
2906
|
+
useEmitter: sn,
|
|
2907
|
+
useEmitterValue: _,
|
|
2899
2908
|
usePublisher: bt
|
|
2900
|
-
} = /* @__PURE__ */
|
|
2901
|
-
|
|
2909
|
+
} = /* @__PURE__ */ Je(
|
|
2910
|
+
Br,
|
|
2902
2911
|
{
|
|
2903
2912
|
optional: {
|
|
2904
2913
|
restoreStateFrom: "restoreStateFrom",
|
|
@@ -2954,8 +2963,8 @@ const Tr = ({ children: t }) => {
|
|
|
2954
2963
|
groupIndices: "groupIndices"
|
|
2955
2964
|
}
|
|
2956
2965
|
},
|
|
2957
|
-
|
|
2958
|
-
),
|
|
2966
|
+
Wr
|
|
2967
|
+
), Pr = /* @__PURE__ */ nn({ useEmitter: sn, useEmitterValue: _, usePublisher: bt }), Gr = /* @__PURE__ */ on({ useEmitter: sn, useEmitterValue: _, usePublisher: bt }), is = po, ls = po, Ln = {
|
|
2959
2968
|
bottom: 0,
|
|
2960
2969
|
itemHeight: 0,
|
|
2961
2970
|
items: [],
|
|
@@ -2963,7 +2972,7 @@ const Tr = ({ children: t }) => {
|
|
|
2963
2972
|
offsetBottom: 0,
|
|
2964
2973
|
offsetTop: 0,
|
|
2965
2974
|
top: 0
|
|
2966
|
-
},
|
|
2975
|
+
}, Ar = {
|
|
2967
2976
|
bottom: 0,
|
|
2968
2977
|
itemHeight: 0,
|
|
2969
2978
|
items: [{ index: 0 }],
|
|
@@ -2971,23 +2980,23 @@ const Tr = ({ children: t }) => {
|
|
|
2971
2980
|
offsetBottom: 0,
|
|
2972
2981
|
offsetTop: 0,
|
|
2973
2982
|
top: 0
|
|
2974
|
-
}, { ceil:
|
|
2975
|
-
function
|
|
2983
|
+
}, { ceil: kn, floor: Ce, max: oe, min: ze, round: zn } = Math;
|
|
2984
|
+
function Fn(t, e, n) {
|
|
2976
2985
|
return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
|
|
2977
2986
|
}
|
|
2978
|
-
function
|
|
2987
|
+
function Mr(t) {
|
|
2979
2988
|
return {
|
|
2980
|
-
...
|
|
2989
|
+
...Ar,
|
|
2981
2990
|
items: t
|
|
2982
2991
|
};
|
|
2983
2992
|
}
|
|
2984
2993
|
function Se(t, e) {
|
|
2985
2994
|
return t !== void 0 && t.width === e.width && t.height === e.height;
|
|
2986
2995
|
}
|
|
2987
|
-
function
|
|
2996
|
+
function _r(t, e) {
|
|
2988
2997
|
return t !== void 0 && t.column === e.column && t.row === e.row;
|
|
2989
2998
|
}
|
|
2990
|
-
const
|
|
2999
|
+
const Nr = /* @__PURE__ */ j(
|
|
2991
3000
|
([
|
|
2992
3001
|
{ increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
|
|
2993
3002
|
{ footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: d, smoothScrollTargetReached: m, viewportHeight: v },
|
|
@@ -2997,26 +3006,30 @@ const _r = /* @__PURE__ */ j(
|
|
|
2997
3006
|
{ customScrollParent: h, useWindowScroll: f, windowScrollContainerState: a, windowScrollTo: S, windowViewportRect: H },
|
|
2998
3007
|
y
|
|
2999
3008
|
]) => {
|
|
3000
|
-
const L = T(0), u = T(0), g = T(
|
|
3009
|
+
const L = T(0), u = T(0), g = T(Ln), C = T({ height: 0, width: 0 }), k = T({ height: 0, width: 0 }), O = U(), V = U(), N = T(0), Z = T(null), F = T({ column: 0, row: 0 }), mt = U(), q = U(), Q = T(!1), gt = T(0), lt = T(!0), St = T(!1), Ft = T(!1);
|
|
3001
3010
|
Y(
|
|
3002
3011
|
x(
|
|
3003
3012
|
w,
|
|
3004
3013
|
$(gt),
|
|
3005
|
-
P(([b, D]) => D
|
|
3014
|
+
P(([b, D]) => !Me(D))
|
|
3006
3015
|
),
|
|
3007
3016
|
() => {
|
|
3008
|
-
|
|
3017
|
+
M(lt, !1);
|
|
3009
3018
|
}
|
|
3010
3019
|
), Y(
|
|
3011
3020
|
x(
|
|
3012
|
-
at(w,
|
|
3021
|
+
at(w, lt, k, C, gt, St),
|
|
3013
3022
|
P(([b, D, K, st, , tt]) => b && !D && K.height !== 0 && st.height !== 0 && !tt)
|
|
3014
3023
|
),
|
|
3015
3024
|
([, , , , b]) => {
|
|
3016
|
-
|
|
3017
|
-
|
|
3025
|
+
if (b === void 0) {
|
|
3026
|
+
M(lt, !0);
|
|
3027
|
+
return;
|
|
3028
|
+
}
|
|
3029
|
+
M(St, !0), qe(1, () => {
|
|
3030
|
+
M(O, b);
|
|
3018
3031
|
}), yt(x(d), () => {
|
|
3019
|
-
|
|
3032
|
+
M(e, [0, 0]), M(lt, !0);
|
|
3020
3033
|
});
|
|
3021
3034
|
}
|
|
3022
3035
|
), z(
|
|
@@ -3033,9 +3046,9 @@ const _r = /* @__PURE__ */ j(
|
|
|
3033
3046
|
P(([, b]) => b != null)
|
|
3034
3047
|
),
|
|
3035
3048
|
([, b]) => {
|
|
3036
|
-
b && (
|
|
3037
|
-
|
|
3038
|
-
}),
|
|
3049
|
+
b && (M(C, b.viewport), M(k, b.item), M(F, b.gap), b.scrollTop > 0 && (M(Q, !0), yt(x(d, Ut(1)), (D) => {
|
|
3050
|
+
M(Q, !1);
|
|
3051
|
+
}), M(c, { top: b.scrollTop })));
|
|
3039
3052
|
}
|
|
3040
3053
|
), z(
|
|
3041
3054
|
x(
|
|
@@ -3064,13 +3077,13 @@ const _r = /* @__PURE__ */ j(
|
|
|
3064
3077
|
at(
|
|
3065
3078
|
W(L),
|
|
3066
3079
|
o,
|
|
3067
|
-
W(F,
|
|
3080
|
+
W(F, _r),
|
|
3068
3081
|
W(k, Se),
|
|
3069
3082
|
W(C, Se),
|
|
3070
3083
|
W(Z),
|
|
3071
3084
|
W(u),
|
|
3072
3085
|
W(Q),
|
|
3073
|
-
W(
|
|
3086
|
+
W(lt),
|
|
3074
3087
|
W(gt)
|
|
3075
3088
|
),
|
|
3076
3089
|
P(([, , , , , , , b]) => !b),
|
|
@@ -3081,24 +3094,24 @@ const _r = /* @__PURE__ */ j(
|
|
|
3081
3094
|
st,
|
|
3082
3095
|
tt,
|
|
3083
3096
|
X,
|
|
3084
|
-
|
|
3097
|
+
ct,
|
|
3085
3098
|
xt,
|
|
3086
3099
|
,
|
|
3087
|
-
|
|
3100
|
+
ut,
|
|
3088
3101
|
Vt
|
|
3089
3102
|
]) => {
|
|
3090
|
-
const { column: Wt, row: ee } = st, { height: he, width: Ee } = tt, { width:
|
|
3091
|
-
if (xt === 0 && (b === 0 ||
|
|
3092
|
-
return
|
|
3103
|
+
const { column: Wt, row: ee } = st, { height: he, width: Ee } = tt, { width: ln } = X;
|
|
3104
|
+
if (xt === 0 && (b === 0 || ln === 0))
|
|
3105
|
+
return Ln;
|
|
3093
3106
|
if (Ee === 0) {
|
|
3094
|
-
const
|
|
3095
|
-
return
|
|
3107
|
+
const fn = Ye(Vt, b), So = fn + Math.max(xt - 1, 0);
|
|
3108
|
+
return Mr(Fn(fn, So, ct));
|
|
3096
3109
|
}
|
|
3097
|
-
const ge =
|
|
3110
|
+
const ge = ho(ln, Ee, Wt);
|
|
3098
3111
|
let qt, Mt;
|
|
3099
|
-
|
|
3100
|
-
const
|
|
3101
|
-
return { bottom:
|
|
3112
|
+
ut ? D === 0 && K === 0 && xt > 0 ? (qt = 0, Mt = xt - 1) : (qt = ge * Ce((D + ee) / (he + ee)), Mt = ge * kn((K + ee) / (he + ee)) - 1, Mt = ze(b - 1, oe(Mt, ge - 1)), qt = ze(Mt, oe(0, qt))) : (qt = 0, Mt = -1);
|
|
3113
|
+
const cn = Fn(qt, Mt, ct), { bottom: un, top: an } = Vn(X, st, tt, cn), dn = kn(b / ge), Io = dn * he + (dn - 1) * ee - un;
|
|
3114
|
+
return { bottom: un, itemHeight: he, items: cn, itemWidth: Ee, offsetBottom: Io, offsetTop: an, top: an };
|
|
3102
3115
|
}
|
|
3103
3116
|
)
|
|
3104
3117
|
),
|
|
@@ -3115,7 +3128,7 @@ const _r = /* @__PURE__ */ j(
|
|
|
3115
3128
|
at(C, k, g, F),
|
|
3116
3129
|
P(([b, D, { items: K }]) => K.length > 0 && D.height !== 0 && b.height !== 0),
|
|
3117
3130
|
B(([b, D, { items: K }, st]) => {
|
|
3118
|
-
const { bottom: tt, top: X } =
|
|
3131
|
+
const { bottom: tt, top: X } = Vn(b, st, D, K);
|
|
3119
3132
|
return [X, tt];
|
|
3120
3133
|
}),
|
|
3121
3134
|
nt(le)
|
|
@@ -3159,7 +3172,7 @@ const _r = /* @__PURE__ */ j(
|
|
|
3159
3172
|
endIndex: b[b.length - 1].index,
|
|
3160
3173
|
startIndex: b[0].index
|
|
3161
3174
|
})),
|
|
3162
|
-
nt(
|
|
3175
|
+
nt(jn),
|
|
3163
3176
|
zt(0)
|
|
3164
3177
|
)
|
|
3165
3178
|
);
|
|
@@ -3168,11 +3181,11 @@ const _r = /* @__PURE__ */ j(
|
|
|
3168
3181
|
O,
|
|
3169
3182
|
$(C, k, L, F),
|
|
3170
3183
|
B(([b, D, K, st, tt]) => {
|
|
3171
|
-
const X =
|
|
3184
|
+
const X = Jn(b), { align: ct, behavior: xt, offset: ut } = X;
|
|
3172
3185
|
let Vt = X.index;
|
|
3173
3186
|
Vt === "LAST" && (Vt = st - 1), Vt = oe(0, Vt, ze(st - 1, Vt));
|
|
3174
|
-
let Wt =
|
|
3175
|
-
return
|
|
3187
|
+
let Wt = _e(D, tt, K, Vt);
|
|
3188
|
+
return ct === "end" ? Wt = zn(Wt - D.height + K.height) : ct === "center" && (Wt = zn(Wt - D.height / 2 + K.height / 2)), ut !== void 0 && ut !== 0 && (Wt += ut), { behavior: xt, top: Wt };
|
|
3176
3189
|
})
|
|
3177
3190
|
),
|
|
3178
3191
|
c
|
|
@@ -3232,24 +3245,24 @@ const _r = /* @__PURE__ */ j(
|
|
|
3232
3245
|
...y
|
|
3233
3246
|
};
|
|
3234
3247
|
},
|
|
3235
|
-
rt(
|
|
3248
|
+
rt(Ze, It, pe, ro, At, Xe, Gt)
|
|
3236
3249
|
);
|
|
3237
|
-
function
|
|
3250
|
+
function ho(t, e, n) {
|
|
3238
3251
|
return oe(1, Ce((t + n) / (Ce(e) + n)));
|
|
3239
3252
|
}
|
|
3240
|
-
function
|
|
3253
|
+
function Vn(t, e, n, o) {
|
|
3241
3254
|
const { height: r } = n;
|
|
3242
3255
|
if (r === void 0 || o.length === 0)
|
|
3243
3256
|
return { bottom: 0, top: 0 };
|
|
3244
|
-
const s =
|
|
3245
|
-
return { bottom:
|
|
3257
|
+
const s = _e(t, e, n, o[0].index);
|
|
3258
|
+
return { bottom: _e(t, e, n, o[o.length - 1].index) + r, top: s };
|
|
3246
3259
|
}
|
|
3247
|
-
function
|
|
3248
|
-
const r =
|
|
3260
|
+
function _e(t, e, n, o) {
|
|
3261
|
+
const r = ho(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + oe(0, s - 1) * e.row;
|
|
3249
3262
|
return i > 0 ? i + e.row : i;
|
|
3250
3263
|
}
|
|
3251
|
-
const
|
|
3252
|
-
const t = T((v) => `Item ${v}`), e = T({}), n = T(null), o = T("virtuoso-grid-item"), r = T("virtuoso-grid-list"), s = T(
|
|
3264
|
+
const Dr = /* @__PURE__ */ j(() => {
|
|
3265
|
+
const t = T((v) => `Item ${v}`), e = T({}), n = T(null), o = T("virtuoso-grid-item"), r = T("virtuoso-grid-list"), s = T(tn), i = T("div"), l = T(Jt), c = (v, p = null) => ht(
|
|
3253
3266
|
x(
|
|
3254
3267
|
e,
|
|
3255
3268
|
B((I) => I[v]),
|
|
@@ -3275,10 +3288,10 @@ const Nr = /* @__PURE__ */ j(() => {
|
|
|
3275
3288
|
scrollerRef: l,
|
|
3276
3289
|
ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
|
|
3277
3290
|
};
|
|
3278
|
-
}),
|
|
3291
|
+
}), $r = /* @__PURE__ */ j(
|
|
3279
3292
|
([t, e]) => ({ ...t, ...e }),
|
|
3280
|
-
rt(
|
|
3281
|
-
),
|
|
3293
|
+
rt(Nr, Dr)
|
|
3294
|
+
), Ur = /* @__PURE__ */ E.memo(function() {
|
|
3282
3295
|
const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = wt("scrollHeight"), c = et("ItemComponent"), d = et("ListComponent"), m = et("ScrollSeekPlaceholder"), v = et("context"), p = wt("itemDimensions"), I = wt("gap"), w = et("log"), R = et("stateRestoreInProgress"), h = wt("reportReadyState"), f = Lt(
|
|
3283
3296
|
E.useMemo(
|
|
3284
3297
|
() => (a) => {
|
|
@@ -3290,8 +3303,8 @@ const Nr = /* @__PURE__ */ j(() => {
|
|
|
3290
3303
|
p({ height: y, width: L });
|
|
3291
3304
|
}
|
|
3292
3305
|
I({
|
|
3293
|
-
column:
|
|
3294
|
-
row:
|
|
3306
|
+
column: Wn("column-gap", getComputedStyle(a).columnGap, w),
|
|
3307
|
+
row: Wn("row-gap", getComputedStyle(a).rowGap, w)
|
|
3295
3308
|
});
|
|
3296
3309
|
},
|
|
3297
3310
|
[l, p, I, w]
|
|
@@ -3299,7 +3312,7 @@ const Nr = /* @__PURE__ */ j(() => {
|
|
|
3299
3312
|
!0,
|
|
3300
3313
|
!1
|
|
3301
3314
|
);
|
|
3302
|
-
return
|
|
3315
|
+
return co(() => {
|
|
3303
3316
|
e.itemHeight > 0 && e.itemWidth > 0 && h(!0);
|
|
3304
3317
|
}, [e]), R ? null : /* @__PURE__ */ G(
|
|
3305
3318
|
d,
|
|
@@ -3333,7 +3346,7 @@ const Nr = /* @__PURE__ */ j(() => {
|
|
|
3333
3346
|
})
|
|
3334
3347
|
}
|
|
3335
3348
|
);
|
|
3336
|
-
}),
|
|
3349
|
+
}), Kr = E.memo(function() {
|
|
3337
3350
|
const e = et("HeaderComponent"), n = wt("headerHeight"), o = et("headerFooterTag"), r = Lt(
|
|
3338
3351
|
E.useMemo(
|
|
3339
3352
|
() => (i) => {
|
|
@@ -3345,7 +3358,7 @@ const Nr = /* @__PURE__ */ j(() => {
|
|
|
3345
3358
|
!1
|
|
3346
3359
|
), s = et("context");
|
|
3347
3360
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
|
|
3348
|
-
}),
|
|
3361
|
+
}), jr = E.memo(function() {
|
|
3349
3362
|
const e = et("FooterComponent"), n = wt("footerHeight"), o = et("headerFooterTag"), r = Lt(
|
|
3350
3363
|
E.useMemo(
|
|
3351
3364
|
() => (i) => {
|
|
@@ -3357,8 +3370,8 @@ const Nr = /* @__PURE__ */ j(() => {
|
|
|
3357
3370
|
!1
|
|
3358
3371
|
), s = et("context");
|
|
3359
3372
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
|
|
3360
|
-
}),
|
|
3361
|
-
const e = E.useContext(
|
|
3373
|
+
}), qr = ({ children: t }) => {
|
|
3374
|
+
const e = E.useContext(lo), n = wt("itemDimensions"), o = wt("viewportDimensions"), r = Lt(
|
|
3362
3375
|
E.useMemo(
|
|
3363
3376
|
() => (s) => {
|
|
3364
3377
|
o(s.getBoundingClientRect());
|
|
@@ -3371,25 +3384,25 @@ const Nr = /* @__PURE__ */ j(() => {
|
|
|
3371
3384
|
return E.useEffect(() => {
|
|
3372
3385
|
e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
|
|
3373
3386
|
}, [e, o, n]), /* @__PURE__ */ G("div", { ref: r, style: He(!1), children: t });
|
|
3374
|
-
},
|
|
3375
|
-
const e = E.useContext(
|
|
3387
|
+
}, Yr = ({ children: t }) => {
|
|
3388
|
+
const e = E.useContext(lo), n = wt("windowViewportRect"), o = wt("itemDimensions"), r = et("customScrollParent"), s = et("useWindowScroll"), i = Ue(n, r, !1);
|
|
3376
3389
|
return E.useEffect(() => {
|
|
3377
3390
|
e && (o({ height: e.itemHeight, width: e.itemWidth }), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
|
|
3378
|
-
}, [e, n, o]), /* @__PURE__ */ G("div", { ref: i, style:
|
|
3379
|
-
},
|
|
3380
|
-
const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ?
|
|
3391
|
+
}, [e, n, o]), /* @__PURE__ */ G("div", { ref: i, style: en(!1, s), children: t });
|
|
3392
|
+
}, Zr = /* @__PURE__ */ E.memo(function({ ...e }) {
|
|
3393
|
+
const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Qr : Jr, s = o || n ? Yr : qr, i = et("context");
|
|
3381
3394
|
return /* @__PURE__ */ G(r, { ...e, ...ot(r, i), children: /* @__PURE__ */ $t(s, { children: [
|
|
3395
|
+
/* @__PURE__ */ G(Kr, {}),
|
|
3382
3396
|
/* @__PURE__ */ G(Ur, {}),
|
|
3383
|
-
/* @__PURE__ */ G(
|
|
3384
|
-
/* @__PURE__ */ G(Kr, {})
|
|
3397
|
+
/* @__PURE__ */ G(jr, {})
|
|
3385
3398
|
] }) });
|
|
3386
3399
|
}), {
|
|
3387
|
-
Component:
|
|
3388
|
-
useEmitter:
|
|
3400
|
+
Component: Xr,
|
|
3401
|
+
useEmitter: go,
|
|
3389
3402
|
useEmitterValue: et,
|
|
3390
3403
|
usePublisher: wt
|
|
3391
|
-
} = /* @__PURE__ */
|
|
3392
|
-
|
|
3404
|
+
} = /* @__PURE__ */ Je(
|
|
3405
|
+
$r,
|
|
3393
3406
|
{
|
|
3394
3407
|
optional: {
|
|
3395
3408
|
context: "context",
|
|
@@ -3428,19 +3441,19 @@ const Nr = /* @__PURE__ */ j(() => {
|
|
|
3428
3441
|
readyStateChanged: "readyStateChanged"
|
|
3429
3442
|
}
|
|
3430
3443
|
},
|
|
3431
|
-
|
|
3432
|
-
),
|
|
3433
|
-
function
|
|
3444
|
+
Zr
|
|
3445
|
+
), Jr = /* @__PURE__ */ nn({ useEmitter: go, useEmitterValue: et, usePublisher: wt }), Qr = /* @__PURE__ */ on({ useEmitter: go, useEmitterValue: et, usePublisher: wt });
|
|
3446
|
+
function Wn(t, e, n) {
|
|
3434
3447
|
return e !== "normal" && e?.endsWith("px") !== !0 && n(`${t} was not resolved to pixel value correctly`, e, ft.WARN), e === "normal" ? 0 : parseInt(e ?? "0", 10);
|
|
3435
3448
|
}
|
|
3436
|
-
const
|
|
3449
|
+
const cs = Xr;
|
|
3437
3450
|
export {
|
|
3438
|
-
|
|
3439
|
-
|
|
3451
|
+
ls as GroupedTableVirtuoso,
|
|
3452
|
+
ss as GroupedVirtuoso,
|
|
3440
3453
|
ft as LogLevel,
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3454
|
+
is as TableVirtuoso,
|
|
3455
|
+
rs as Virtuoso,
|
|
3456
|
+
cs as VirtuosoGrid,
|
|
3457
|
+
lo as VirtuosoGridMockContext,
|
|
3445
3458
|
Re as VirtuosoMockContext
|
|
3446
3459
|
};
|