react-virtuoso 4.12.8 → 4.13.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/dist/index.cjs +1 -1
- package/dist/index.d.ts +53 -7
- package/dist/index.mjs +872 -850
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as z, jsxs as
|
|
2
|
-
import H, { createElement as
|
|
3
|
-
import
|
|
4
|
-
const we = 0, zt = 1, qt = 2,
|
|
5
|
-
function
|
|
1
|
+
import { jsx as z, jsxs as Nt, Fragment as lo } from "react/jsx-runtime";
|
|
2
|
+
import H, { createElement as _t } from "react";
|
|
3
|
+
import co from "react-dom";
|
|
4
|
+
const we = 0, zt = 1, qt = 2, kn = 4;
|
|
5
|
+
function cn(t) {
|
|
6
6
|
return () => t;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function uo(t) {
|
|
9
9
|
t();
|
|
10
10
|
}
|
|
11
11
|
function ne(t, e) {
|
|
12
12
|
return (n) => t(e(n));
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function un(t, e) {
|
|
15
15
|
return () => t(e);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function ao(t, e) {
|
|
18
18
|
return (n) => t(e, n);
|
|
19
19
|
}
|
|
20
20
|
function Me(t) {
|
|
21
21
|
return t !== void 0;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function fo(...t) {
|
|
24
24
|
return () => {
|
|
25
|
-
t.map(
|
|
25
|
+
t.map(uo);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
function Yt() {
|
|
@@ -30,7 +30,7 @@ function Yt() {
|
|
|
30
30
|
function ve(t, e) {
|
|
31
31
|
return e(t), t;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function mo(t, e) {
|
|
34
34
|
return e(t);
|
|
35
35
|
}
|
|
36
36
|
function X(...t) {
|
|
@@ -39,17 +39,17 @@ function X(...t) {
|
|
|
39
39
|
function K(t, e) {
|
|
40
40
|
return t(zt, e);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function G(t, e) {
|
|
43
43
|
t(we, e);
|
|
44
44
|
}
|
|
45
45
|
function We(t) {
|
|
46
46
|
t(qt);
|
|
47
47
|
}
|
|
48
48
|
function st(t) {
|
|
49
|
-
return t(
|
|
49
|
+
return t(kn);
|
|
50
50
|
}
|
|
51
51
|
function O(t, e) {
|
|
52
|
-
return K(t,
|
|
52
|
+
return K(t, ao(e, we));
|
|
53
53
|
}
|
|
54
54
|
function bt(t, e) {
|
|
55
55
|
const n = t(zt, (o) => {
|
|
@@ -57,7 +57,7 @@ function bt(t, e) {
|
|
|
57
57
|
});
|
|
58
58
|
return n;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function an(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 un(t) {
|
|
|
65
65
|
}, t);
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Fn(t, e) {
|
|
69
69
|
return t === e;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Z(t = Fn) {
|
|
72
72
|
let e;
|
|
73
73
|
return (n) => (o) => {
|
|
74
74
|
t(e, o) || (e = o, n(o));
|
|
@@ -88,7 +88,7 @@ function yt(t) {
|
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
function x(t, ...e) {
|
|
91
|
-
const n =
|
|
91
|
+
const n = po(...e);
|
|
92
92
|
return (o, r) => {
|
|
93
93
|
switch (o) {
|
|
94
94
|
case qt:
|
|
@@ -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 po(...t) {
|
|
138
|
+
return (e) => t.reduceRight(mo, e);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function ho(t) {
|
|
141
141
|
let e, n;
|
|
142
142
|
const o = () => e == null ? void 0 : e();
|
|
143
143
|
return function(r, s) {
|
|
@@ -150,7 +150,7 @@ function mo(t) {
|
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function C(t) {
|
|
154
154
|
let e = t;
|
|
155
155
|
const n = $();
|
|
156
156
|
return (o, r) => {
|
|
@@ -162,14 +162,14 @@ function v(t) {
|
|
|
162
162
|
r(e);
|
|
163
163
|
break;
|
|
164
164
|
}
|
|
165
|
-
case
|
|
165
|
+
case kn:
|
|
166
166
|
return e;
|
|
167
167
|
}
|
|
168
168
|
return n(o, r);
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
function ct(t, e) {
|
|
172
|
-
return ve(
|
|
172
|
+
return ve(C(e), (n) => O(t, n));
|
|
173
173
|
}
|
|
174
174
|
function $() {
|
|
175
175
|
const t = [];
|
|
@@ -198,12 +198,12 @@ function U(t, e = [], { singleton: n } = { singleton: !0 }) {
|
|
|
198
198
|
return {
|
|
199
199
|
constructor: t,
|
|
200
200
|
dependencies: e,
|
|
201
|
-
id:
|
|
201
|
+
id: go(),
|
|
202
202
|
singleton: n
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
const
|
|
206
|
-
function
|
|
205
|
+
const go = () => Symbol();
|
|
206
|
+
function Io(t) {
|
|
207
207
|
const e = /* @__PURE__ */ new Map(), n = ({ constructor: o, dependencies: r, id: s, singleton: i }) => {
|
|
208
208
|
if (i && e.has(s))
|
|
209
209
|
return e.get(s);
|
|
@@ -219,7 +219,7 @@ function rt(...t) {
|
|
|
219
219
|
return t.forEach((s, i) => {
|
|
220
220
|
const l = Math.pow(2, i);
|
|
221
221
|
K(s, (c) => {
|
|
222
|
-
n[i] = c, o = o | l, o === r &&
|
|
222
|
+
n[i] = c, o = o | l, o === r && G(e, n);
|
|
223
223
|
});
|
|
224
224
|
}), function(s, i) {
|
|
225
225
|
switch (s) {
|
|
@@ -232,36 +232,36 @@ function rt(...t) {
|
|
|
232
232
|
}
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
|
-
function A(t, e =
|
|
236
|
-
return x(t,
|
|
235
|
+
function A(t, e = Fn) {
|
|
236
|
+
return x(t, Z(e));
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function dn(...t) {
|
|
239
239
|
return function(e, n) {
|
|
240
240
|
switch (e) {
|
|
241
241
|
case qt:
|
|
242
242
|
return;
|
|
243
243
|
case zt:
|
|
244
|
-
return
|
|
244
|
+
return fo(...t.map((o) => K(o, n)));
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
248
|
var mt = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t))(mt || {});
|
|
249
|
-
const
|
|
249
|
+
const So = {
|
|
250
250
|
0: "debug",
|
|
251
251
|
3: "error",
|
|
252
252
|
1: "log",
|
|
253
253
|
2: "warn"
|
|
254
|
-
},
|
|
254
|
+
}, xo = () => typeof globalThis > "u" ? window : globalThis, Vt = U(
|
|
255
255
|
() => {
|
|
256
|
-
const t =
|
|
256
|
+
const t = C(
|
|
257
257
|
3
|
|
258
258
|
/* ERROR */
|
|
259
259
|
);
|
|
260
260
|
return {
|
|
261
|
-
log:
|
|
261
|
+
log: C((n, o, r = 1) => {
|
|
262
262
|
var i;
|
|
263
|
-
const s = (i =
|
|
264
|
-
r >= s && console[
|
|
263
|
+
const s = (i = xo().VIRTUOSO_LOG_LEVEL) != null ? i : st(t);
|
|
264
|
+
r >= s && console[So[r]](
|
|
265
265
|
"%creact-virtuoso: %c%s %o",
|
|
266
266
|
"color: #0253b3; font-weight: bold",
|
|
267
267
|
"color: initial",
|
|
@@ -293,30 +293,30 @@ function Ge(t, e, n) {
|
|
|
293
293
|
i && e ? (s == null || s.observe(i), o.current = i) : (o.current && (s == null || s.unobserve(o.current)), o.current = null);
|
|
294
294
|
}, { callbackRef: r, ref: o };
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function On(t, e, n, o, r, s, i, l, c) {
|
|
297
297
|
const a = H.useCallback(
|
|
298
298
|
(p) => {
|
|
299
|
-
const
|
|
300
|
-
let
|
|
301
|
-
for (; !
|
|
302
|
-
|
|
303
|
-
const
|
|
304
|
-
let
|
|
305
|
-
|
|
306
|
-
const
|
|
299
|
+
const S = To(p.children, e, l ? "offsetWidth" : "offsetHeight", r);
|
|
300
|
+
let g = p.parentElement;
|
|
301
|
+
for (; !g.dataset.virtuosoScroller; )
|
|
302
|
+
g = g.parentElement;
|
|
303
|
+
const h = g.lastElementChild.dataset.viewportType === "window";
|
|
304
|
+
let w;
|
|
305
|
+
h && (w = g.ownerDocument.defaultView);
|
|
306
|
+
const v = i ? l ? i.scrollLeft : i.scrollTop : h ? l ? w.scrollX || w.document.documentElement.scrollLeft : w.scrollY || w.document.documentElement.scrollTop : l ? g.scrollLeft : g.scrollTop, m = i ? l ? i.scrollWidth : i.scrollHeight : h ? l ? w.document.documentElement.scrollWidth : w.document.documentElement.scrollHeight : l ? g.scrollWidth : g.scrollHeight, d = i ? l ? i.offsetWidth : i.offsetHeight : h ? l ? w.innerWidth : w.innerHeight : l ? g.offsetWidth : g.offsetHeight;
|
|
307
307
|
o({
|
|
308
|
-
scrollHeight:
|
|
309
|
-
scrollTop: Math.max(
|
|
310
|
-
viewportHeight:
|
|
308
|
+
scrollHeight: m,
|
|
309
|
+
scrollTop: Math.max(v, 0),
|
|
310
|
+
viewportHeight: d
|
|
311
311
|
}), s == null || s(
|
|
312
|
-
l ?
|
|
313
|
-
),
|
|
312
|
+
l ? fn("column-gap", getComputedStyle(p).columnGap, r) : fn("row-gap", getComputedStyle(p).rowGap, r)
|
|
313
|
+
), S !== null && t(S);
|
|
314
314
|
},
|
|
315
315
|
[t, e, r, s, i, o, l]
|
|
316
316
|
);
|
|
317
317
|
return Ge(a, n, c);
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function To(t, e, n, o) {
|
|
320
320
|
const r = t.length;
|
|
321
321
|
if (r === 0)
|
|
322
322
|
return null;
|
|
@@ -328,12 +328,12 @@ function So(t, e, n, o) {
|
|
|
328
328
|
const c = parseInt(l.dataset.index), a = parseFloat(l.dataset.knownSize), p = e(l, n);
|
|
329
329
|
if (p === 0 && o("Zero-sized element, this should not happen", { child: l }, mt.ERROR), p === a)
|
|
330
330
|
continue;
|
|
331
|
-
const
|
|
332
|
-
s.length === 0 ||
|
|
331
|
+
const S = s[s.length - 1];
|
|
332
|
+
s.length === 0 || S.size !== p || S.endIndex !== c - 1 ? s.push({ endIndex: c, size: p, startIndex: c }) : s[s.length - 1].endIndex++;
|
|
333
333
|
}
|
|
334
334
|
return s;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function fn(t, e, n) {
|
|
337
337
|
return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, mt.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
|
|
338
338
|
}
|
|
339
339
|
function _e(t, e, n) {
|
|
@@ -342,17 +342,17 @@ function _e(t, e, n) {
|
|
|
342
342
|
if (!(c != null && c.offsetParent))
|
|
343
343
|
return;
|
|
344
344
|
const a = c.getBoundingClientRect(), p = a.width;
|
|
345
|
-
let
|
|
345
|
+
let S, g;
|
|
346
346
|
if (e) {
|
|
347
|
-
const
|
|
348
|
-
|
|
347
|
+
const h = e.getBoundingClientRect(), w = a.top - h.top;
|
|
348
|
+
g = h.height - Math.max(0, w), S = w + e.scrollTop;
|
|
349
349
|
} else {
|
|
350
|
-
const
|
|
351
|
-
|
|
350
|
+
const h = i.current.ownerDocument.defaultView;
|
|
351
|
+
g = h.innerHeight - Math.max(0, a.top), S = a.top + h.scrollY;
|
|
352
352
|
}
|
|
353
353
|
o.current = {
|
|
354
|
-
offsetTop:
|
|
355
|
-
visibleHeight:
|
|
354
|
+
offsetTop: S,
|
|
355
|
+
visibleHeight: g,
|
|
356
356
|
visibleWidth: p
|
|
357
357
|
}, t(o.current);
|
|
358
358
|
},
|
|
@@ -381,17 +381,17 @@ function _e(t, e, n) {
|
|
|
381
381
|
}
|
|
382
382
|
const at = U(
|
|
383
383
|
() => {
|
|
384
|
-
const t = $(), e = $(), n =
|
|
384
|
+
const t = $(), e = $(), n = C(0), o = $(), r = C(0), s = $(), i = $(), l = C(0), c = C(0), a = C(0), p = C(0), S = $(), g = $(), h = C(!1), w = C(!1), v = C(!1);
|
|
385
385
|
return O(
|
|
386
386
|
x(
|
|
387
387
|
t,
|
|
388
|
-
E(({ scrollTop:
|
|
388
|
+
E(({ scrollTop: m }) => m)
|
|
389
389
|
),
|
|
390
390
|
e
|
|
391
391
|
), O(
|
|
392
392
|
x(
|
|
393
393
|
t,
|
|
394
|
-
E(({ scrollHeight:
|
|
394
|
+
E(({ scrollHeight: m }) => m)
|
|
395
395
|
),
|
|
396
396
|
i
|
|
397
397
|
), O(e, r), {
|
|
@@ -400,16 +400,16 @@ const at = U(
|
|
|
400
400
|
fixedHeaderHeight: c,
|
|
401
401
|
footerHeight: p,
|
|
402
402
|
headerHeight: l,
|
|
403
|
-
horizontalDirection:
|
|
404
|
-
scrollBy:
|
|
403
|
+
horizontalDirection: w,
|
|
404
|
+
scrollBy: g,
|
|
405
405
|
// input
|
|
406
406
|
scrollContainerState: t,
|
|
407
407
|
scrollHeight: i,
|
|
408
|
-
scrollingInProgress:
|
|
408
|
+
scrollingInProgress: h,
|
|
409
409
|
// signals
|
|
410
|
-
scrollTo:
|
|
410
|
+
scrollTo: S,
|
|
411
411
|
scrollTop: e,
|
|
412
|
-
skipAnimationFrameInResizeObserver:
|
|
412
|
+
skipAnimationFrameInResizeObserver: v,
|
|
413
413
|
smoothScrollTargetReached: o,
|
|
414
414
|
// state
|
|
415
415
|
statefulScrollTop: r,
|
|
@@ -419,7 +419,7 @@ const at = U(
|
|
|
419
419
|
[],
|
|
420
420
|
{ singleton: !0 }
|
|
421
421
|
), oe = { lvl: 0 };
|
|
422
|
-
function
|
|
422
|
+
function Ln(t, e) {
|
|
423
423
|
const n = t.length;
|
|
424
424
|
if (n === 0)
|
|
425
425
|
return [];
|
|
@@ -450,16 +450,16 @@ function Ct(t, e, n = "k") {
|
|
|
450
450
|
return Ct(t.l, e, n);
|
|
451
451
|
}
|
|
452
452
|
function pt(t, e, n) {
|
|
453
|
-
return j(t) ?
|
|
453
|
+
return j(t) ? Pn(e, n, 1) : e === t.k ? ot(t, { k: e, v: n }) : e < t.k ? mn(ot(t, { l: pt(t.l, e, n) })) : mn(ot(t, { r: pt(t.r, e, n) }));
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Kt() {
|
|
456
456
|
return oe;
|
|
457
457
|
}
|
|
458
458
|
function ye(t, e, n) {
|
|
459
459
|
if (j(t))
|
|
460
460
|
return [];
|
|
461
461
|
const o = Ct(t, e)[0];
|
|
462
|
-
return
|
|
462
|
+
return Co(ze(t, o, n));
|
|
463
463
|
}
|
|
464
464
|
function Le(t, e) {
|
|
465
465
|
if (j(t)) return oe;
|
|
@@ -470,8 +470,8 @@ function Le(t, e) {
|
|
|
470
470
|
if (j(r))
|
|
471
471
|
return o;
|
|
472
472
|
{
|
|
473
|
-
const [s, i] =
|
|
474
|
-
return ge(ot(t, { k: s, l:
|
|
473
|
+
const [s, i] = Vn(o);
|
|
474
|
+
return ge(ot(t, { k: s, l: zn(o), v: i }));
|
|
475
475
|
}
|
|
476
476
|
} else return e < n ? ge(ot(t, { l: Le(o, e) })) : ge(ot(t, { r: Le(r, e) }));
|
|
477
477
|
}
|
|
@@ -491,7 +491,7 @@ function ge(t) {
|
|
|
491
491
|
return t;
|
|
492
492
|
if (n > o.lvl + 1) {
|
|
493
493
|
if (Ee(e))
|
|
494
|
-
return
|
|
494
|
+
return An(ot(t, { lvl: n - 1 }));
|
|
495
495
|
if (!j(e) && !j(e.r))
|
|
496
496
|
return ot(e.r, {
|
|
497
497
|
l: ot(e, { r: e.r.l }),
|
|
@@ -520,7 +520,7 @@ function ge(t) {
|
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
522
|
function ot(t, e) {
|
|
523
|
-
return
|
|
523
|
+
return Pn(
|
|
524
524
|
e.k !== void 0 ? e.k : t.k,
|
|
525
525
|
e.v !== void 0 ? e.v : t.v,
|
|
526
526
|
e.lvl !== void 0 ? e.lvl : t.lvl,
|
|
@@ -528,22 +528,22 @@ function ot(t, e) {
|
|
|
528
528
|
e.r !== void 0 ? e.r : t.r
|
|
529
529
|
);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
return j(t.r) ? t.l : ge(ot(t, { r:
|
|
531
|
+
function zn(t) {
|
|
532
|
+
return j(t.r) ? t.l : ge(ot(t, { r: zn(t.r) }));
|
|
533
533
|
}
|
|
534
534
|
function Ee(t) {
|
|
535
535
|
return j(t) || t.lvl > t.r.lvl;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
538
|
-
return j(t.r) ? [t.k, t.v] :
|
|
537
|
+
function Vn(t) {
|
|
538
|
+
return j(t.r) ? [t.k, t.v] : Vn(t.r);
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function Pn(t, e, n, o = oe, r = oe) {
|
|
541
541
|
return { k: t, l: o, lvl: n, r, v: e };
|
|
542
542
|
}
|
|
543
|
-
function
|
|
544
|
-
return Ve(
|
|
543
|
+
function mn(t) {
|
|
544
|
+
return Ve(An(t));
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function An(t) {
|
|
547
547
|
const { l: e } = t;
|
|
548
548
|
return !j(e) && e.lvl === t.lvl ? ot(e, { r: ot(t, { l: e.r }) }) : t;
|
|
549
549
|
}
|
|
@@ -551,21 +551,21 @@ function Ve(t) {
|
|
|
551
551
|
const { lvl: e, r: n } = t;
|
|
552
552
|
return !j(n) && !j(n.r) && n.lvl === e && n.r.lvl === e ? ot(n, { l: ot(t, { r: n.l }), lvl: e + 1 }) : t;
|
|
553
553
|
}
|
|
554
|
-
function
|
|
555
|
-
return
|
|
554
|
+
function Co(t) {
|
|
555
|
+
return Ln(t, ({ k: e, v: n }) => ({ index: e, value: n }));
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function Mn(t, e) {
|
|
558
558
|
return !!(t && t.startIndex === e.startIndex && t.endIndex === e.endIndex);
|
|
559
559
|
}
|
|
560
560
|
function se(t, e) {
|
|
561
561
|
return !!(t && t[0] === e[0] && t[1] === e[1]);
|
|
562
562
|
}
|
|
563
563
|
const Ne = U(
|
|
564
|
-
() => ({ recalcInProgress:
|
|
564
|
+
() => ({ recalcInProgress: C(!1) }),
|
|
565
565
|
[],
|
|
566
566
|
{ singleton: !0 }
|
|
567
567
|
);
|
|
568
|
-
function
|
|
568
|
+
function Wn(t, e, n) {
|
|
569
569
|
return t[Se(t, e, n)];
|
|
570
570
|
}
|
|
571
571
|
function Se(t, e, n, o = 0) {
|
|
@@ -586,7 +586,7 @@ function Se(t, e, n, o = 0) {
|
|
|
586
586
|
}
|
|
587
587
|
throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`);
|
|
588
588
|
}
|
|
589
|
-
function
|
|
589
|
+
function wo(t, e, n, o) {
|
|
590
590
|
const r = Se(t, e, o), s = Se(t, n, o, r);
|
|
591
591
|
return t.slice(r, s + 1);
|
|
592
592
|
}
|
|
@@ -599,18 +599,18 @@ function Re(t) {
|
|
|
599
599
|
function De({ index: t }, e) {
|
|
600
600
|
return e === t ? 0 : e < t ? -1 : 1;
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function vo() {
|
|
603
603
|
return {
|
|
604
604
|
groupIndices: [],
|
|
605
|
-
groupOffsetTree:
|
|
605
|
+
groupOffsetTree: Kt(),
|
|
606
606
|
lastIndex: 0,
|
|
607
607
|
lastOffset: 0,
|
|
608
608
|
lastSize: 0,
|
|
609
609
|
offsetTree: [],
|
|
610
|
-
sizeTree:
|
|
610
|
+
sizeTree: Kt()
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function yo(t, e) {
|
|
614
614
|
let n = j(t) ? 0 : 1 / 0;
|
|
615
615
|
for (const o of e) {
|
|
616
616
|
const { endIndex: r, size: s, startIndex: i } = o;
|
|
@@ -619,28 +619,28 @@ function wo(t, e) {
|
|
|
619
619
|
continue;
|
|
620
620
|
}
|
|
621
621
|
const l = ye(t, i - 1, r + 1);
|
|
622
|
-
if (l.some(
|
|
622
|
+
if (l.some(Fo(o)))
|
|
623
623
|
continue;
|
|
624
624
|
let c = !1, a = !1;
|
|
625
|
-
for (const { end: p, start:
|
|
626
|
-
c ? (r >=
|
|
625
|
+
for (const { end: p, start: S, value: g } of l)
|
|
626
|
+
c ? (r >= S || s === g) && (t = Le(t, S)) : (a = g !== s, c = !0), p > r && r >= S && g !== s && (t = pt(t, r + 1, g));
|
|
627
627
|
a && (t = pt(t, i, s));
|
|
628
628
|
}
|
|
629
629
|
return [t, n];
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Ro(t) {
|
|
632
632
|
return typeof t.groupIndex < "u";
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function bo({ offset: t }, e) {
|
|
635
635
|
return e === t ? 0 : e < t ? -1 : 1;
|
|
636
636
|
}
|
|
637
637
|
function ie(t, e, n) {
|
|
638
638
|
if (e.length === 0)
|
|
639
639
|
return 0;
|
|
640
|
-
const { index: o, offset: r, size: s } =
|
|
640
|
+
const { index: o, offset: r, size: s } = Wn(e, t, De), i = t - o, l = s * i + (i - 1) * n + r;
|
|
641
641
|
return l > 0 ? l + n : l;
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function Gn(t, e) {
|
|
644
644
|
if (!Re(e))
|
|
645
645
|
return t;
|
|
646
646
|
let n = 0;
|
|
@@ -648,47 +648,47 @@ function Mn(t, e) {
|
|
|
648
648
|
n++;
|
|
649
649
|
return t + n;
|
|
650
650
|
}
|
|
651
|
-
function
|
|
652
|
-
if (
|
|
651
|
+
function _n(t, e, n) {
|
|
652
|
+
if (Ro(t))
|
|
653
653
|
return e.groupIndices[t.groupIndex] + 1;
|
|
654
654
|
{
|
|
655
655
|
const o = t.index === "LAST" ? n : t.index;
|
|
656
|
-
let r =
|
|
656
|
+
let r = Gn(o, e);
|
|
657
657
|
return r = Math.max(0, r, Math.min(n, r)), r;
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
return o > 0 && (e = Math.max(e,
|
|
660
|
+
function Ho(t, e, n, o = 0) {
|
|
661
|
+
return o > 0 && (e = Math.max(e, Wn(t, o, De).offset)), Ln(wo(t, e, n, bo), ko);
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function Eo(t, [e, n, o, r]) {
|
|
664
664
|
e.length > 0 && o("received item sizes", e, mt.DEBUG);
|
|
665
665
|
const s = t.sizeTree;
|
|
666
666
|
let i = s, l = 0;
|
|
667
667
|
if (n.length > 0 && j(s) && e.length === 2) {
|
|
668
|
-
const
|
|
669
|
-
i = n.reduce((
|
|
668
|
+
const g = e[0].size, h = e[1].size;
|
|
669
|
+
i = n.reduce((w, v) => pt(pt(w, v, g), v + 1, h), i);
|
|
670
670
|
} else
|
|
671
|
-
[i, l] =
|
|
671
|
+
[i, l] = yo(i, e);
|
|
672
672
|
if (i === s)
|
|
673
673
|
return t;
|
|
674
|
-
const { lastIndex: c, lastOffset: a, lastSize: p, offsetTree:
|
|
674
|
+
const { lastIndex: c, lastOffset: a, lastSize: p, offsetTree: S } = Pe(t.offsetTree, l, i, r);
|
|
675
675
|
return {
|
|
676
676
|
groupIndices: n,
|
|
677
|
-
groupOffsetTree: n.reduce((
|
|
677
|
+
groupOffsetTree: n.reduce((g, h) => pt(g, h, ie(h, S, r)), Kt()),
|
|
678
678
|
lastIndex: c,
|
|
679
679
|
lastOffset: a,
|
|
680
680
|
lastSize: p,
|
|
681
|
-
offsetTree:
|
|
681
|
+
offsetTree: S,
|
|
682
682
|
sizeTree: i
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function Bo(t) {
|
|
686
686
|
return Gt(t).map(({ k: e, v: n }, o, r) => {
|
|
687
687
|
const s = r[o + 1];
|
|
688
688
|
return { endIndex: s ? s.k - 1 : 1 / 0, size: n, startIndex: e };
|
|
689
689
|
});
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function pn(t, e) {
|
|
692
692
|
let n = 0, o = 0;
|
|
693
693
|
for (; n < t; )
|
|
694
694
|
n += e[o + 1] - e[o] - 1, o++;
|
|
@@ -703,12 +703,12 @@ function Pe(t, e, n, o) {
|
|
|
703
703
|
} else
|
|
704
704
|
r = [];
|
|
705
705
|
for (const { start: a, value: p } of ye(n, e, 1 / 0)) {
|
|
706
|
-
const
|
|
706
|
+
const S = a - s, g = S * i + l + S * o;
|
|
707
707
|
r.push({
|
|
708
708
|
index: a,
|
|
709
|
-
offset:
|
|
709
|
+
offset: g,
|
|
710
710
|
size: p
|
|
711
|
-
}), s = a, l =
|
|
711
|
+
}), s = a, l = g, i = p;
|
|
712
712
|
}
|
|
713
713
|
return {
|
|
714
714
|
lastIndex: s,
|
|
@@ -717,112 +717,112 @@ function Pe(t, e, n, o) {
|
|
|
717
717
|
offsetTree: r
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function ko(t) {
|
|
721
721
|
return { index: t.index, value: t };
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function Fo(t) {
|
|
724
724
|
const { endIndex: e, size: n, startIndex: o } = t;
|
|
725
725
|
return (r) => r.start === o && (r.end === e || r.end === 1 / 0) && r.value === n;
|
|
726
726
|
}
|
|
727
|
-
const
|
|
727
|
+
const Oo = {
|
|
728
728
|
offsetHeight: "height",
|
|
729
729
|
offsetWidth: "width"
|
|
730
730
|
}, Et = U(
|
|
731
731
|
([{ log: t }, { recalcInProgress: e }]) => {
|
|
732
|
-
const n = $(), o = $(), r = ct(o, 0), s = $(), i = $(), l =
|
|
733
|
-
x(n, _(c, t,
|
|
734
|
-
|
|
735
|
-
),
|
|
732
|
+
const n = $(), o = $(), r = ct(o, 0), s = $(), i = $(), l = C(0), c = C([]), a = C(void 0), p = C(void 0), S = C((I, f) => wt(I, Oo[f])), g = C(void 0), h = C(0), w = vo(), v = ct(
|
|
733
|
+
x(n, _(c, t, h), Rt(Eo, w), Z()),
|
|
734
|
+
w
|
|
735
|
+
), m = ct(
|
|
736
736
|
x(
|
|
737
737
|
c,
|
|
738
|
-
|
|
739
|
-
Rt((
|
|
738
|
+
Z(),
|
|
739
|
+
Rt((I, f) => ({ current: f, prev: I.current }), {
|
|
740
740
|
current: [],
|
|
741
741
|
prev: []
|
|
742
742
|
}),
|
|
743
|
-
E(({ prev:
|
|
743
|
+
E(({ prev: I }) => I)
|
|
744
744
|
),
|
|
745
745
|
[]
|
|
746
746
|
);
|
|
747
747
|
O(
|
|
748
748
|
x(
|
|
749
749
|
c,
|
|
750
|
-
P((
|
|
751
|
-
_(
|
|
752
|
-
E(([
|
|
753
|
-
const k =
|
|
750
|
+
P((I) => I.length > 0),
|
|
751
|
+
_(v, h),
|
|
752
|
+
E(([I, f, b]) => {
|
|
753
|
+
const k = I.reduce((F, L, V) => pt(F, L, ie(L, f.offsetTree, b) || V), Kt());
|
|
754
754
|
return {
|
|
755
|
-
...
|
|
756
|
-
groupIndices:
|
|
755
|
+
...f,
|
|
756
|
+
groupIndices: I,
|
|
757
757
|
groupOffsetTree: k
|
|
758
758
|
};
|
|
759
759
|
})
|
|
760
760
|
),
|
|
761
|
-
|
|
761
|
+
v
|
|
762
762
|
), O(
|
|
763
763
|
x(
|
|
764
764
|
o,
|
|
765
|
-
_(
|
|
766
|
-
P(([
|
|
767
|
-
E(([
|
|
765
|
+
_(v),
|
|
766
|
+
P(([I, { lastIndex: f }]) => I < f),
|
|
767
|
+
E(([I, { lastIndex: f, lastSize: b }]) => [
|
|
768
768
|
{
|
|
769
|
-
endIndex:
|
|
769
|
+
endIndex: f,
|
|
770
770
|
size: b,
|
|
771
|
-
startIndex:
|
|
771
|
+
startIndex: I
|
|
772
772
|
}
|
|
773
773
|
])
|
|
774
774
|
),
|
|
775
775
|
n
|
|
776
776
|
), O(a, p);
|
|
777
|
-
const
|
|
777
|
+
const d = ct(
|
|
778
778
|
x(
|
|
779
779
|
a,
|
|
780
|
-
E((
|
|
780
|
+
E((I) => I === void 0)
|
|
781
781
|
),
|
|
782
782
|
!0
|
|
783
783
|
);
|
|
784
784
|
O(
|
|
785
785
|
x(
|
|
786
786
|
p,
|
|
787
|
-
P((
|
|
788
|
-
E((
|
|
787
|
+
P((I) => I !== void 0 && j(st(v).sizeTree)),
|
|
788
|
+
E((I) => [{ endIndex: 0, size: I, startIndex: 0 }])
|
|
789
789
|
),
|
|
790
790
|
n
|
|
791
791
|
);
|
|
792
792
|
const u = ht(
|
|
793
793
|
x(
|
|
794
794
|
n,
|
|
795
|
-
_(
|
|
795
|
+
_(v),
|
|
796
796
|
Rt(
|
|
797
|
-
({ sizes:
|
|
798
|
-
changed: b !==
|
|
797
|
+
({ sizes: I }, [f, b]) => ({
|
|
798
|
+
changed: b !== I,
|
|
799
799
|
sizes: b
|
|
800
800
|
}),
|
|
801
|
-
{ changed: !1, sizes:
|
|
801
|
+
{ changed: !1, sizes: w }
|
|
802
802
|
),
|
|
803
|
-
E((
|
|
803
|
+
E((I) => I.changed)
|
|
804
804
|
)
|
|
805
805
|
);
|
|
806
806
|
K(
|
|
807
807
|
x(
|
|
808
808
|
l,
|
|
809
809
|
Rt(
|
|
810
|
-
(
|
|
810
|
+
(I, f) => ({ diff: I.prev - f, prev: f }),
|
|
811
811
|
{ diff: 0, prev: 0 }
|
|
812
812
|
),
|
|
813
|
-
E((
|
|
813
|
+
E((I) => I.diff)
|
|
814
814
|
),
|
|
815
|
-
(
|
|
816
|
-
const { groupIndices:
|
|
817
|
-
if (
|
|
818
|
-
|
|
819
|
-
else if (
|
|
820
|
-
const b = st(
|
|
821
|
-
b.length > 0 && (
|
|
815
|
+
(I) => {
|
|
816
|
+
const { groupIndices: f } = st(v);
|
|
817
|
+
if (I > 0)
|
|
818
|
+
G(e, !0), G(s, I + pn(I, f));
|
|
819
|
+
else if (I < 0) {
|
|
820
|
+
const b = st(m);
|
|
821
|
+
b.length > 0 && (I -= pn(-I, b)), G(i, I);
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
), K(x(l, _(t)), ([
|
|
825
|
-
|
|
824
|
+
), K(x(l, _(t)), ([I, f]) => {
|
|
825
|
+
I < 0 && f(
|
|
826
826
|
"`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
|
|
827
827
|
{ firstItemIndex: l },
|
|
828
828
|
mt.ERROR
|
|
@@ -832,53 +832,53 @@ const ko = {
|
|
|
832
832
|
O(
|
|
833
833
|
x(
|
|
834
834
|
s,
|
|
835
|
-
_(
|
|
836
|
-
E(([
|
|
837
|
-
const b =
|
|
835
|
+
_(v),
|
|
836
|
+
E(([I, f]) => {
|
|
837
|
+
const b = f.groupIndices.length > 0, k = [], F = f.lastSize;
|
|
838
838
|
if (b) {
|
|
839
|
-
const L = re(
|
|
839
|
+
const L = re(f.sizeTree, 0);
|
|
840
840
|
let V = 0, D = 0;
|
|
841
|
-
for (; V <
|
|
842
|
-
const B =
|
|
841
|
+
for (; V < I; ) {
|
|
842
|
+
const B = f.groupIndices[D], Y = f.groupIndices.length === D + 1 ? 1 / 0 : f.groupIndices[D + 1] - B - 1;
|
|
843
843
|
k.push({
|
|
844
844
|
endIndex: B,
|
|
845
845
|
size: L,
|
|
846
846
|
startIndex: B
|
|
847
847
|
}), k.push({
|
|
848
|
-
endIndex: B + 1 +
|
|
848
|
+
endIndex: B + 1 + Y - 1,
|
|
849
849
|
size: F,
|
|
850
850
|
startIndex: B + 1
|
|
851
|
-
}), D++, V +=
|
|
851
|
+
}), D++, V += Y + 1;
|
|
852
852
|
}
|
|
853
|
-
const J = Gt(
|
|
854
|
-
return V !==
|
|
855
|
-
(B, { k:
|
|
853
|
+
const J = Gt(f.sizeTree);
|
|
854
|
+
return V !== I && J.shift(), J.reduce(
|
|
855
|
+
(B, { k: Y, v: it }) => {
|
|
856
856
|
let dt = B.ranges;
|
|
857
857
|
return B.prevSize !== 0 && (dt = [
|
|
858
858
|
...B.ranges,
|
|
859
859
|
{
|
|
860
|
-
endIndex:
|
|
860
|
+
endIndex: Y + I - 1,
|
|
861
861
|
size: B.prevSize,
|
|
862
862
|
startIndex: B.prevIndex
|
|
863
863
|
}
|
|
864
864
|
]), {
|
|
865
|
-
prevIndex:
|
|
865
|
+
prevIndex: Y + I,
|
|
866
866
|
prevSize: it,
|
|
867
867
|
ranges: dt
|
|
868
868
|
};
|
|
869
869
|
},
|
|
870
870
|
{
|
|
871
|
-
prevIndex:
|
|
871
|
+
prevIndex: I,
|
|
872
872
|
prevSize: 0,
|
|
873
873
|
ranges: k
|
|
874
874
|
}
|
|
875
875
|
).ranges;
|
|
876
876
|
}
|
|
877
|
-
return Gt(
|
|
877
|
+
return Gt(f.sizeTree).reduce(
|
|
878
878
|
(L, { k: V, v: D }) => ({
|
|
879
|
-
prevIndex: V +
|
|
879
|
+
prevIndex: V + I,
|
|
880
880
|
prevSize: D,
|
|
881
|
-
ranges: [...L.ranges, { endIndex: V +
|
|
881
|
+
ranges: [...L.ranges, { endIndex: V + I - 1, size: L.prevSize, startIndex: L.prevIndex }]
|
|
882
882
|
}),
|
|
883
883
|
{
|
|
884
884
|
prevIndex: 0,
|
|
@@ -893,77 +893,77 @@ const ko = {
|
|
|
893
893
|
const R = ht(
|
|
894
894
|
x(
|
|
895
895
|
i,
|
|
896
|
-
_(
|
|
897
|
-
E(([
|
|
898
|
-
const k = -
|
|
899
|
-
return ie(k,
|
|
896
|
+
_(v, h),
|
|
897
|
+
E(([I, { offsetTree: f }, b]) => {
|
|
898
|
+
const k = -I;
|
|
899
|
+
return ie(k, f, b);
|
|
900
900
|
})
|
|
901
901
|
)
|
|
902
902
|
);
|
|
903
903
|
return O(
|
|
904
904
|
x(
|
|
905
905
|
i,
|
|
906
|
-
_(
|
|
907
|
-
E(([
|
|
908
|
-
if (
|
|
909
|
-
if (j(
|
|
910
|
-
return
|
|
911
|
-
let F =
|
|
912
|
-
const L = st(
|
|
906
|
+
_(v, h),
|
|
907
|
+
E(([I, f, b]) => {
|
|
908
|
+
if (f.groupIndices.length > 0) {
|
|
909
|
+
if (j(f.sizeTree))
|
|
910
|
+
return f;
|
|
911
|
+
let F = Kt();
|
|
912
|
+
const L = st(m);
|
|
913
913
|
let V = 0, D = 0, J = 0;
|
|
914
|
-
for (; V < -
|
|
914
|
+
for (; V < -I; ) {
|
|
915
915
|
J = L[D];
|
|
916
916
|
const B = L[D + 1] - J - 1;
|
|
917
917
|
D++, V += B + 1;
|
|
918
918
|
}
|
|
919
|
-
if (F = Gt(
|
|
920
|
-
const B = re(
|
|
919
|
+
if (F = Gt(f.sizeTree).reduce((B, { k: Y, v: it }) => pt(B, Math.max(0, Y + I), it), F), V !== -I) {
|
|
920
|
+
const B = re(f.sizeTree, J);
|
|
921
921
|
F = pt(F, 0, B);
|
|
922
|
-
const
|
|
923
|
-
F = pt(F, 1,
|
|
922
|
+
const Y = Ct(f.sizeTree, -I + 1)[1];
|
|
923
|
+
F = pt(F, 1, Y);
|
|
924
924
|
}
|
|
925
925
|
return {
|
|
926
|
-
...
|
|
926
|
+
...f,
|
|
927
927
|
sizeTree: F,
|
|
928
|
-
...Pe(
|
|
928
|
+
...Pe(f.offsetTree, 0, F, b)
|
|
929
929
|
};
|
|
930
930
|
} else {
|
|
931
|
-
const F = Gt(
|
|
931
|
+
const F = Gt(f.sizeTree).reduce((L, { k: V, v: D }) => pt(L, Math.max(0, V + I), D), Kt());
|
|
932
932
|
return {
|
|
933
|
-
...
|
|
933
|
+
...f,
|
|
934
934
|
sizeTree: F,
|
|
935
|
-
...Pe(
|
|
935
|
+
...Pe(f.offsetTree, 0, F, b)
|
|
936
936
|
};
|
|
937
937
|
}
|
|
938
938
|
})
|
|
939
939
|
),
|
|
940
|
-
|
|
940
|
+
v
|
|
941
941
|
), {
|
|
942
942
|
beforeUnshiftWith: T,
|
|
943
943
|
// input
|
|
944
|
-
data:
|
|
944
|
+
data: g,
|
|
945
945
|
defaultItemSize: p,
|
|
946
946
|
firstItemIndex: l,
|
|
947
947
|
fixedItemSize: a,
|
|
948
|
-
gap:
|
|
948
|
+
gap: h,
|
|
949
949
|
groupIndices: c,
|
|
950
|
-
itemSize:
|
|
950
|
+
itemSize: S,
|
|
951
951
|
listRefresh: u,
|
|
952
952
|
shiftWith: i,
|
|
953
953
|
shiftWithOffset: R,
|
|
954
954
|
sizeRanges: n,
|
|
955
955
|
// output
|
|
956
|
-
sizes:
|
|
956
|
+
sizes: v,
|
|
957
957
|
statefulTotalCount: r,
|
|
958
958
|
totalCount: o,
|
|
959
|
-
trackItemSizes:
|
|
959
|
+
trackItemSizes: d,
|
|
960
960
|
unshiftWith: s
|
|
961
961
|
};
|
|
962
962
|
},
|
|
963
963
|
X(Vt, Ne),
|
|
964
964
|
{ singleton: !0 }
|
|
965
965
|
);
|
|
966
|
-
function
|
|
966
|
+
function Lo(t) {
|
|
967
967
|
return t.reduce(
|
|
968
968
|
(e, n) => (e.groupIndices.push(e.totalCount), e.totalCount += n + 1, e),
|
|
969
969
|
{
|
|
@@ -972,9 +972,9 @@ function Fo(t) {
|
|
|
972
972
|
}
|
|
973
973
|
);
|
|
974
974
|
}
|
|
975
|
-
const
|
|
975
|
+
const Nn = U(
|
|
976
976
|
([{ groupIndices: t, sizes: e, totalCount: n }, { headerHeight: o, scrollTop: r }]) => {
|
|
977
|
-
const s = $(), i = $(), l = ht(x(s, E(
|
|
977
|
+
const s = $(), i = $(), l = ht(x(s, E(Lo)));
|
|
978
978
|
return O(
|
|
979
979
|
x(
|
|
980
980
|
l,
|
|
@@ -992,7 +992,7 @@ const Gn = U(
|
|
|
992
992
|
rt(r, e, o),
|
|
993
993
|
P(([c, a]) => Re(a)),
|
|
994
994
|
E(([c, a, p]) => Ct(a.groupOffsetTree, Math.max(c - p, 0), "v")[0]),
|
|
995
|
-
|
|
995
|
+
Z(),
|
|
996
996
|
E((c) => [c])
|
|
997
997
|
),
|
|
998
998
|
i
|
|
@@ -1001,11 +1001,11 @@ const Gn = U(
|
|
|
1001
1001
|
X(Et, at)
|
|
1002
1002
|
), Pt = U(
|
|
1003
1003
|
([{ log: t }]) => {
|
|
1004
|
-
const e =
|
|
1004
|
+
const e = C(!1), n = ht(
|
|
1005
1005
|
x(
|
|
1006
1006
|
e,
|
|
1007
1007
|
P((o) => o),
|
|
1008
|
-
|
|
1008
|
+
Z()
|
|
1009
1009
|
)
|
|
1010
1010
|
);
|
|
1011
1011
|
return K(e, (o) => {
|
|
@@ -1014,10 +1014,10 @@ const Gn = U(
|
|
|
1014
1014
|
},
|
|
1015
1015
|
X(Vt),
|
|
1016
1016
|
{ singleton: !0 }
|
|
1017
|
-
),
|
|
1018
|
-
function
|
|
1017
|
+
), zo = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
1018
|
+
function Dn(t) {
|
|
1019
1019
|
const e = typeof t == "number" ? { index: t } : t;
|
|
1020
|
-
return e.align || (e.align = "start"), (!e.behavior || !
|
|
1020
|
+
return e.align || (e.align = "start"), (!e.behavior || !zo) && (e.behavior = "auto"), e.offset || (e.offset = 0), e;
|
|
1021
1021
|
}
|
|
1022
1022
|
const ce = U(
|
|
1023
1023
|
([
|
|
@@ -1030,59 +1030,59 @@ const ce = U(
|
|
|
1030
1030
|
scrollingInProgress: c,
|
|
1031
1031
|
scrollTo: a,
|
|
1032
1032
|
smoothScrollTargetReached: p,
|
|
1033
|
-
viewportHeight:
|
|
1033
|
+
viewportHeight: S
|
|
1034
1034
|
},
|
|
1035
|
-
{ log:
|
|
1035
|
+
{ log: g }
|
|
1036
1036
|
]) => {
|
|
1037
|
-
const
|
|
1038
|
-
let
|
|
1037
|
+
const h = $(), w = $(), v = C(0);
|
|
1038
|
+
let m = null, d = null, u = null;
|
|
1039
1039
|
function T() {
|
|
1040
|
-
|
|
1040
|
+
m && (m(), m = null), u && (u(), u = null), d && (clearTimeout(d), d = null), G(c, !1);
|
|
1041
1041
|
}
|
|
1042
1042
|
return O(
|
|
1043
1043
|
x(
|
|
1044
|
-
|
|
1045
|
-
_(n,
|
|
1044
|
+
h,
|
|
1045
|
+
_(n, S, o, v, l, i, g),
|
|
1046
1046
|
_(t, s, r),
|
|
1047
1047
|
E(
|
|
1048
1048
|
([
|
|
1049
|
-
[R,
|
|
1049
|
+
[R, I, f, b, k, F, L, V],
|
|
1050
1050
|
D,
|
|
1051
1051
|
J,
|
|
1052
1052
|
nt
|
|
1053
1053
|
]) => {
|
|
1054
|
-
const B =
|
|
1055
|
-
let ut = ie(ft,
|
|
1056
|
-
|
|
1054
|
+
const B = Dn(R), { align: Y, behavior: it, offset: dt } = B, St = b - 1, ft = _n(B, I, St);
|
|
1055
|
+
let ut = ie(ft, I.offsetTree, D) + F;
|
|
1056
|
+
Y === "end" ? (ut += J + Ct(I.sizeTree, ft)[1] - f + nt, ft === St && (ut += L)) : Y === "center" ? ut += (J + Ct(I.sizeTree, ft)[1] - f + nt) / 2 : ut -= k, dt && (ut += dt);
|
|
1057
1057
|
const At = (xt) => {
|
|
1058
|
-
T(), xt ? (V("retrying to scroll to", { location: R }, mt.DEBUG),
|
|
1058
|
+
T(), xt ? (V("retrying to scroll to", { location: R }, mt.DEBUG), G(h, R)) : (G(w, !0), V("list did not change, scroll successful", {}, mt.DEBUG));
|
|
1059
1059
|
};
|
|
1060
1060
|
if (T(), it === "smooth") {
|
|
1061
1061
|
let xt = !1;
|
|
1062
1062
|
u = K(e, (Xt) => {
|
|
1063
1063
|
xt = xt || Xt;
|
|
1064
|
-
}),
|
|
1064
|
+
}), m = bt(p, () => {
|
|
1065
1065
|
At(xt);
|
|
1066
1066
|
});
|
|
1067
1067
|
} else
|
|
1068
|
-
|
|
1069
|
-
return
|
|
1068
|
+
m = bt(x(e, Vo(150)), At);
|
|
1069
|
+
return d = setTimeout(() => {
|
|
1070
1070
|
T();
|
|
1071
|
-
}, 1200),
|
|
1071
|
+
}, 1200), G(c, !0), V("scrolling from index to", { behavior: it, index: ft, top: ut }, mt.DEBUG), { behavior: it, top: ut };
|
|
1072
1072
|
}
|
|
1073
1073
|
)
|
|
1074
1074
|
),
|
|
1075
1075
|
a
|
|
1076
1076
|
), {
|
|
1077
|
-
scrollTargetReached:
|
|
1078
|
-
scrollToIndex:
|
|
1079
|
-
topListHeight:
|
|
1077
|
+
scrollTargetReached: w,
|
|
1078
|
+
scrollToIndex: h,
|
|
1079
|
+
topListHeight: v
|
|
1080
1080
|
};
|
|
1081
1081
|
},
|
|
1082
1082
|
X(Et, at, Vt),
|
|
1083
1083
|
{ singleton: !0 }
|
|
1084
1084
|
);
|
|
1085
|
-
function
|
|
1085
|
+
function Vo(t) {
|
|
1086
1086
|
return (e) => {
|
|
1087
1087
|
const n = setTimeout(() => {
|
|
1088
1088
|
e(!1);
|
|
@@ -1103,12 +1103,12 @@ function Ue(t, e) {
|
|
|
1103
1103
|
}
|
|
1104
1104
|
const ue = U(
|
|
1105
1105
|
([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
|
|
1106
|
-
const l =
|
|
1106
|
+
const l = C(!0), c = C(0), a = C(!0);
|
|
1107
1107
|
return O(
|
|
1108
1108
|
x(
|
|
1109
1109
|
i,
|
|
1110
1110
|
_(c),
|
|
1111
|
-
P(([p,
|
|
1111
|
+
P(([p, S]) => !!S),
|
|
1112
1112
|
yt(!1)
|
|
1113
1113
|
),
|
|
1114
1114
|
l
|
|
@@ -1116,7 +1116,7 @@ const ue = U(
|
|
|
1116
1116
|
x(
|
|
1117
1117
|
i,
|
|
1118
1118
|
_(c),
|
|
1119
|
-
P(([p,
|
|
1119
|
+
P(([p, S]) => !!S),
|
|
1120
1120
|
yt(!1)
|
|
1121
1121
|
),
|
|
1122
1122
|
a
|
|
@@ -1124,16 +1124,16 @@ const ue = U(
|
|
|
1124
1124
|
x(
|
|
1125
1125
|
rt(e, i),
|
|
1126
1126
|
_(l, n, t, a),
|
|
1127
|
-
P(([[, p],
|
|
1127
|
+
P(([[, p], S, { sizeTree: g }, h, w]) => p && (!j(g) || Me(h)) && !S && !w),
|
|
1128
1128
|
_(c)
|
|
1129
1129
|
),
|
|
1130
1130
|
([, p]) => {
|
|
1131
1131
|
bt(r, () => {
|
|
1132
|
-
|
|
1132
|
+
G(a, !0);
|
|
1133
1133
|
}), $e(4, () => {
|
|
1134
1134
|
bt(o, () => {
|
|
1135
|
-
|
|
1136
|
-
}),
|
|
1135
|
+
G(l, !0);
|
|
1136
|
+
}), G(s, p);
|
|
1137
1137
|
});
|
|
1138
1138
|
}
|
|
1139
1139
|
), {
|
|
@@ -1145,10 +1145,10 @@ const ue = U(
|
|
|
1145
1145
|
X(Et, at, ce, Pt),
|
|
1146
1146
|
{ singleton: !0 }
|
|
1147
1147
|
);
|
|
1148
|
-
function
|
|
1148
|
+
function $n(t, e) {
|
|
1149
1149
|
return Math.abs(t - e) < 1.01;
|
|
1150
1150
|
}
|
|
1151
|
-
const le = "up", te = "down",
|
|
1151
|
+
const le = "up", te = "down", Po = "none", Ao = {
|
|
1152
1152
|
atBottom: !1,
|
|
1153
1153
|
notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
|
|
1154
1154
|
state: {
|
|
@@ -1157,33 +1157,33 @@ const le = "up", te = "down", zo = "none", Vo = {
|
|
|
1157
1157
|
scrollTop: 0,
|
|
1158
1158
|
viewportHeight: 0
|
|
1159
1159
|
}
|
|
1160
|
-
},
|
|
1161
|
-
const i =
|
|
1160
|
+
}, Mo = 0, ae = U(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
|
|
1161
|
+
const i = C(!1), l = C(!0), c = $(), a = $(), p = C(4), S = C(Mo), g = ct(
|
|
1162
1162
|
x(
|
|
1163
|
-
|
|
1164
|
-
|
|
1163
|
+
dn(x(A(r), jt(1), yt(!0)), x(A(r), jt(1), yt(!1), an(100))),
|
|
1164
|
+
Z()
|
|
1165
1165
|
),
|
|
1166
1166
|
!1
|
|
1167
|
-
),
|
|
1168
|
-
x(
|
|
1167
|
+
), h = ct(
|
|
1168
|
+
x(dn(x(n, yt(!0)), x(n, yt(!1), an(200))), Z()),
|
|
1169
1169
|
!1
|
|
1170
1170
|
);
|
|
1171
1171
|
O(
|
|
1172
1172
|
x(
|
|
1173
|
-
rt(A(r), A(
|
|
1173
|
+
rt(A(r), A(S)),
|
|
1174
1174
|
E(([u, T]) => u <= T),
|
|
1175
|
-
|
|
1175
|
+
Z()
|
|
1176
1176
|
),
|
|
1177
1177
|
l
|
|
1178
1178
|
), O(x(l, Lt(50)), a);
|
|
1179
|
-
const
|
|
1179
|
+
const w = ht(
|
|
1180
1180
|
x(
|
|
1181
1181
|
rt(o, A(s), A(e), A(t), A(p)),
|
|
1182
|
-
Rt((u, [{ scrollHeight: T, scrollTop: R },
|
|
1183
|
-
const F = R +
|
|
1182
|
+
Rt((u, [{ scrollHeight: T, scrollTop: R }, I, f, b, k]) => {
|
|
1183
|
+
const F = R + I - T > -k, L = {
|
|
1184
1184
|
scrollHeight: T,
|
|
1185
1185
|
scrollTop: R,
|
|
1186
|
-
viewportHeight:
|
|
1186
|
+
viewportHeight: I
|
|
1187
1187
|
};
|
|
1188
1188
|
if (F) {
|
|
1189
1189
|
let D, J;
|
|
@@ -1195,20 +1195,20 @@ const le = "up", te = "down", zo = "none", Vo = {
|
|
|
1195
1195
|
};
|
|
1196
1196
|
}
|
|
1197
1197
|
let V;
|
|
1198
|
-
return L.scrollHeight > u.state.scrollHeight ? V = "SIZE_INCREASED" :
|
|
1198
|
+
return L.scrollHeight > u.state.scrollHeight ? V = "SIZE_INCREASED" : I < u.state.viewportHeight ? V = "VIEWPORT_HEIGHT_DECREASING" : R < u.state.scrollTop ? V = "SCROLLING_UPWARDS" : V = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
1199
1199
|
atBottom: !1,
|
|
1200
1200
|
notAtBottomBecause: V,
|
|
1201
1201
|
state: L
|
|
1202
1202
|
};
|
|
1203
|
-
},
|
|
1204
|
-
|
|
1203
|
+
}, Ao),
|
|
1204
|
+
Z((u, T) => u && u.atBottom === T.atBottom)
|
|
1205
1205
|
)
|
|
1206
|
-
),
|
|
1206
|
+
), v = ct(
|
|
1207
1207
|
x(
|
|
1208
1208
|
o,
|
|
1209
1209
|
Rt(
|
|
1210
|
-
(u, { scrollHeight: T, scrollTop: R, viewportHeight:
|
|
1211
|
-
if (
|
|
1210
|
+
(u, { scrollHeight: T, scrollTop: R, viewportHeight: I }) => {
|
|
1211
|
+
if ($n(u.scrollHeight, T))
|
|
1212
1212
|
return {
|
|
1213
1213
|
changed: !1,
|
|
1214
1214
|
jump: 0,
|
|
@@ -1216,8 +1216,8 @@ const le = "up", te = "down", zo = "none", Vo = {
|
|
|
1216
1216
|
scrollTop: R
|
|
1217
1217
|
};
|
|
1218
1218
|
{
|
|
1219
|
-
const
|
|
1220
|
-
return u.scrollTop !== R &&
|
|
1219
|
+
const f = T - (R + I) < 1;
|
|
1220
|
+
return u.scrollTop !== R && f ? {
|
|
1221
1221
|
changed: !0,
|
|
1222
1222
|
jump: u.scrollTop - R,
|
|
1223
1223
|
scrollHeight: T,
|
|
@@ -1239,67 +1239,67 @@ const le = "up", te = "down", zo = "none", Vo = {
|
|
|
1239
1239
|
);
|
|
1240
1240
|
O(
|
|
1241
1241
|
x(
|
|
1242
|
-
|
|
1242
|
+
w,
|
|
1243
1243
|
E((u) => u.atBottom)
|
|
1244
1244
|
),
|
|
1245
1245
|
i
|
|
1246
1246
|
), O(x(i, Lt(50)), c);
|
|
1247
|
-
const
|
|
1247
|
+
const m = C(te);
|
|
1248
1248
|
O(
|
|
1249
1249
|
x(
|
|
1250
1250
|
o,
|
|
1251
1251
|
E(({ scrollTop: u }) => u),
|
|
1252
|
-
|
|
1252
|
+
Z(),
|
|
1253
1253
|
Rt(
|
|
1254
|
-
(u, T) => st(
|
|
1254
|
+
(u, T) => st(h) ? { direction: u.direction, prevScrollTop: T } : { direction: T < u.prevScrollTop ? le : te, prevScrollTop: T },
|
|
1255
1255
|
{ direction: te, prevScrollTop: 0 }
|
|
1256
1256
|
),
|
|
1257
1257
|
E((u) => u.direction)
|
|
1258
1258
|
),
|
|
1259
|
-
|
|
1260
|
-
), O(x(o, Lt(50), yt(
|
|
1261
|
-
const
|
|
1259
|
+
m
|
|
1260
|
+
), O(x(o, Lt(50), yt(Po)), m);
|
|
1261
|
+
const d = C(0);
|
|
1262
1262
|
return O(
|
|
1263
1263
|
x(
|
|
1264
|
-
|
|
1264
|
+
g,
|
|
1265
1265
|
P((u) => !u),
|
|
1266
1266
|
yt(0)
|
|
1267
1267
|
),
|
|
1268
|
-
|
|
1268
|
+
d
|
|
1269
1269
|
), O(
|
|
1270
1270
|
x(
|
|
1271
1271
|
r,
|
|
1272
1272
|
Lt(100),
|
|
1273
|
-
_(
|
|
1273
|
+
_(g),
|
|
1274
1274
|
P(([u, T]) => !!T),
|
|
1275
1275
|
Rt(([u, T], [R]) => [T, R], [0, 0]),
|
|
1276
1276
|
E(([u, T]) => T - u)
|
|
1277
1277
|
),
|
|
1278
|
-
|
|
1278
|
+
d
|
|
1279
1279
|
), {
|
|
1280
|
-
atBottomState:
|
|
1280
|
+
atBottomState: w,
|
|
1281
1281
|
atBottomStateChange: c,
|
|
1282
1282
|
atBottomThreshold: p,
|
|
1283
1283
|
atTopStateChange: a,
|
|
1284
|
-
atTopThreshold:
|
|
1284
|
+
atTopThreshold: S,
|
|
1285
1285
|
isAtBottom: i,
|
|
1286
1286
|
isAtTop: l,
|
|
1287
|
-
isScrolling:
|
|
1288
|
-
lastJumpDueToItemResize:
|
|
1289
|
-
scrollDirection:
|
|
1290
|
-
scrollVelocity:
|
|
1287
|
+
isScrolling: g,
|
|
1288
|
+
lastJumpDueToItemResize: v,
|
|
1289
|
+
scrollDirection: m,
|
|
1290
|
+
scrollVelocity: d
|
|
1291
1291
|
};
|
|
1292
|
-
}, X(at)), xe = "top", Te = "bottom",
|
|
1293
|
-
function
|
|
1292
|
+
}, X(at)), xe = "top", Te = "bottom", hn = "none";
|
|
1293
|
+
function gn(t, e, n) {
|
|
1294
1294
|
return typeof t == "number" ? n === le && e === xe || n === te && e === Te ? t : 0 : n === le ? e === xe ? t.main : t.reverse : e === Te ? t.main : t.reverse;
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function In(t, e) {
|
|
1297
1297
|
var n;
|
|
1298
1298
|
return typeof t == "number" ? t : (n = t[e]) != null ? n : 0;
|
|
1299
1299
|
}
|
|
1300
1300
|
const Ke = U(
|
|
1301
1301
|
([{ deviation: t, fixedHeaderHeight: e, headerHeight: n, scrollTop: o, viewportHeight: r }]) => {
|
|
1302
|
-
const s = $(), i =
|
|
1302
|
+
const s = $(), i = C(0), l = C(0), c = C(0), a = ct(
|
|
1303
1303
|
x(
|
|
1304
1304
|
rt(
|
|
1305
1305
|
A(o),
|
|
@@ -1315,26 +1315,26 @@ const Ke = U(
|
|
|
1315
1315
|
E(
|
|
1316
1316
|
([
|
|
1317
1317
|
p,
|
|
1318
|
-
I,
|
|
1319
|
-
h,
|
|
1320
|
-
[f, C],
|
|
1321
|
-
w,
|
|
1322
1318
|
S,
|
|
1319
|
+
g,
|
|
1320
|
+
[h, w],
|
|
1321
|
+
v,
|
|
1323
1322
|
m,
|
|
1323
|
+
d,
|
|
1324
1324
|
u,
|
|
1325
1325
|
T
|
|
1326
1326
|
]) => {
|
|
1327
|
-
const R = p - u,
|
|
1328
|
-
let b =
|
|
1329
|
-
const k =
|
|
1330
|
-
return
|
|
1331
|
-
Math.max(R -
|
|
1332
|
-
R -
|
|
1327
|
+
const R = p - u, I = m + d, f = Math.max(g - R, 0);
|
|
1328
|
+
let b = hn;
|
|
1329
|
+
const k = In(T, xe), F = In(T, Te);
|
|
1330
|
+
return h -= u, h += g + d, w += g + d, w -= u, h > p + I - k && (b = le), w < p - f + S + F && (b = te), b !== hn ? [
|
|
1331
|
+
Math.max(R - g - gn(v, xe, b) - k, 0),
|
|
1332
|
+
R - f - d + S + gn(v, Te, b) + F
|
|
1333
1333
|
] : null;
|
|
1334
1334
|
}
|
|
1335
1335
|
),
|
|
1336
1336
|
P((p) => p != null),
|
|
1337
|
-
|
|
1337
|
+
Z(se)
|
|
1338
1338
|
),
|
|
1339
1339
|
[0, 0]
|
|
1340
1340
|
);
|
|
@@ -1351,9 +1351,9 @@ const Ke = U(
|
|
|
1351
1351
|
X(at),
|
|
1352
1352
|
{ singleton: !0 }
|
|
1353
1353
|
);
|
|
1354
|
-
function
|
|
1354
|
+
function Wo(t, e, n) {
|
|
1355
1355
|
if (Re(e)) {
|
|
1356
|
-
const o =
|
|
1356
|
+
const o = Gn(t, e);
|
|
1357
1357
|
return [
|
|
1358
1358
|
{ index: Ct(e.groupOffsetTree, o)[0], offset: 0, size: 0 },
|
|
1359
1359
|
{ data: n == null ? void 0 : n[0], index: o, offset: 0, size: 0 }
|
|
@@ -1377,23 +1377,23 @@ function Ie(t, e, n, o, r, s) {
|
|
|
1377
1377
|
let a = 0, p = 0;
|
|
1378
1378
|
if (t.length > 0) {
|
|
1379
1379
|
a = t[0].offset;
|
|
1380
|
-
const
|
|
1381
|
-
p =
|
|
1380
|
+
const v = t[t.length - 1];
|
|
1381
|
+
p = v.offset + v.size;
|
|
1382
1382
|
}
|
|
1383
|
-
const
|
|
1383
|
+
const S = n - i, g = l + S * c + (S - 1) * o, h = a, w = g - p;
|
|
1384
1384
|
return {
|
|
1385
1385
|
bottom: p,
|
|
1386
1386
|
firstItemIndex: s,
|
|
1387
|
-
items:
|
|
1388
|
-
offsetBottom:
|
|
1387
|
+
items: Sn(t, r, s),
|
|
1388
|
+
offsetBottom: w,
|
|
1389
1389
|
offsetTop: a,
|
|
1390
|
-
top:
|
|
1391
|
-
topItems:
|
|
1392
|
-
topListHeight: e.reduce((
|
|
1390
|
+
top: h,
|
|
1391
|
+
topItems: Sn(e, r, s),
|
|
1392
|
+
topListHeight: e.reduce((v, m) => m.size + v, 0),
|
|
1393
1393
|
totalCount: n
|
|
1394
1394
|
};
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1396
|
+
function Un(t, e, n, o, r, s) {
|
|
1397
1397
|
let i = 0;
|
|
1398
1398
|
if (n.groupIndices.length > 0)
|
|
1399
1399
|
for (const p of n.groupIndices) {
|
|
@@ -1401,15 +1401,15 @@ function Dn(t, e, n, o, r, s) {
|
|
|
1401
1401
|
break;
|
|
1402
1402
|
i++;
|
|
1403
1403
|
}
|
|
1404
|
-
const l = t + i, c = Ue(e, l), a = Array.from({ length: l }).map((p,
|
|
1405
|
-
data: s[
|
|
1406
|
-
index:
|
|
1404
|
+
const l = t + i, c = Ue(e, l), a = Array.from({ length: l }).map((p, S) => ({
|
|
1405
|
+
data: s[S + c],
|
|
1406
|
+
index: S + c,
|
|
1407
1407
|
offset: 0,
|
|
1408
1408
|
size: 0
|
|
1409
1409
|
}));
|
|
1410
1410
|
return Ie(a, [], l, r, n, o);
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function Sn(t, e, n) {
|
|
1413
1413
|
if (t.length === 0)
|
|
1414
1414
|
return [];
|
|
1415
1415
|
if (!Re(e))
|
|
@@ -1435,43 +1435,43 @@ function In(t, e, n) {
|
|
|
1435
1435
|
}
|
|
1436
1436
|
return s;
|
|
1437
1437
|
}
|
|
1438
|
-
const
|
|
1438
|
+
const Dt = U(
|
|
1439
1439
|
([
|
|
1440
1440
|
{ data: t, firstItemIndex: e, gap: n, sizes: o, totalCount: r },
|
|
1441
1441
|
s,
|
|
1442
1442
|
{ listBoundary: i, topListHeight: l, visibleRange: c },
|
|
1443
1443
|
{ initialTopMostItemIndex: a, scrolledToInitialItem: p },
|
|
1444
|
-
{ topListHeight:
|
|
1445
|
-
|
|
1446
|
-
{ didMount:
|
|
1447
|
-
{ recalcInProgress:
|
|
1444
|
+
{ topListHeight: S },
|
|
1445
|
+
g,
|
|
1446
|
+
{ didMount: h },
|
|
1447
|
+
{ recalcInProgress: w }
|
|
1448
1448
|
]) => {
|
|
1449
|
-
const
|
|
1450
|
-
O(s.topItemsIndexes,
|
|
1449
|
+
const v = C([]), m = C(0), d = $();
|
|
1450
|
+
O(s.topItemsIndexes, v);
|
|
1451
1451
|
const u = ct(
|
|
1452
1452
|
x(
|
|
1453
1453
|
rt(
|
|
1454
|
-
|
|
1455
|
-
|
|
1454
|
+
h,
|
|
1455
|
+
w,
|
|
1456
1456
|
A(c, se),
|
|
1457
1457
|
A(r),
|
|
1458
1458
|
A(o),
|
|
1459
1459
|
A(a),
|
|
1460
1460
|
p,
|
|
1461
|
-
A(
|
|
1461
|
+
A(v),
|
|
1462
1462
|
A(e),
|
|
1463
1463
|
A(n),
|
|
1464
1464
|
t
|
|
1465
1465
|
),
|
|
1466
|
-
P(([
|
|
1466
|
+
P(([f, b, , k, , , , , , , F]) => {
|
|
1467
1467
|
const L = F && F.length !== k;
|
|
1468
|
-
return
|
|
1468
|
+
return f && !b && !L;
|
|
1469
1469
|
}),
|
|
1470
1470
|
E(
|
|
1471
1471
|
([
|
|
1472
1472
|
,
|
|
1473
1473
|
,
|
|
1474
|
-
[
|
|
1474
|
+
[f, b],
|
|
1475
1475
|
k,
|
|
1476
1476
|
F,
|
|
1477
1477
|
L,
|
|
@@ -1481,18 +1481,18 @@ const _t = U(
|
|
|
1481
1481
|
nt,
|
|
1482
1482
|
B
|
|
1483
1483
|
]) => {
|
|
1484
|
-
const
|
|
1484
|
+
const Y = F, { offsetTree: it, sizeTree: dt } = Y, St = st(m);
|
|
1485
1485
|
if (k === 0)
|
|
1486
1486
|
return { ...Be, totalCount: k };
|
|
1487
|
-
if (
|
|
1488
|
-
return St === 0 ? { ...Be, totalCount: k } :
|
|
1487
|
+
if (f === 0 && b === 0)
|
|
1488
|
+
return St === 0 ? { ...Be, totalCount: k } : Un(St, L, F, J, nt, B || []);
|
|
1489
1489
|
if (j(dt))
|
|
1490
1490
|
return St > 0 ? null : Ie(
|
|
1491
|
-
|
|
1491
|
+
Wo(Ue(L, k), Y, B),
|
|
1492
1492
|
[],
|
|
1493
1493
|
k,
|
|
1494
1494
|
nt,
|
|
1495
|
-
|
|
1495
|
+
Y,
|
|
1496
1496
|
J
|
|
1497
1497
|
);
|
|
1498
1498
|
const ft = [];
|
|
@@ -1506,8 +1506,8 @@ const _t = U(
|
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
1508
|
if (!V)
|
|
1509
|
-
return Ie([], ft, k, nt,
|
|
1510
|
-
const ut = D.length > 0 ? D[D.length - 1] + 1 : 0, At =
|
|
1509
|
+
return Ie([], ft, k, nt, Y, J);
|
|
1510
|
+
const ut = D.length > 0 ? D[D.length - 1] + 1 : 0, At = Ho(it, f, b, ut);
|
|
1511
1511
|
if (At.length === 0)
|
|
1512
1512
|
return null;
|
|
1513
1513
|
const xt = k - 1, Xt = ve([], (Mt) => {
|
|
@@ -1515,8 +1515,8 @@ const _t = U(
|
|
|
1515
1515
|
const Bt = vt.value;
|
|
1516
1516
|
let y = Bt.offset, N = vt.start;
|
|
1517
1517
|
const Q = Bt.size;
|
|
1518
|
-
if (Bt.offset <
|
|
1519
|
-
N += Math.floor((
|
|
1518
|
+
if (Bt.offset < f) {
|
|
1519
|
+
N += Math.floor((f - Bt.offset + nt) / (Q + nt));
|
|
1520
1520
|
const tt = N - vt.start;
|
|
1521
1521
|
y += tt * Q + tt * nt;
|
|
1522
1522
|
}
|
|
@@ -1526,12 +1526,12 @@ const _t = U(
|
|
|
1526
1526
|
Mt.push({ data: B == null ? void 0 : B[tt], index: tt, offset: y, size: Q }), y += Q + nt;
|
|
1527
1527
|
}
|
|
1528
1528
|
});
|
|
1529
|
-
return Ie(Xt, ft, k, nt,
|
|
1529
|
+
return Ie(Xt, ft, k, nt, Y, J);
|
|
1530
1530
|
}
|
|
1531
1531
|
),
|
|
1532
1532
|
//@ts-expect-error filter needs to be fixed
|
|
1533
|
-
P((
|
|
1534
|
-
|
|
1533
|
+
P((f) => f !== null),
|
|
1534
|
+
Z()
|
|
1535
1535
|
),
|
|
1536
1536
|
Be
|
|
1537
1537
|
);
|
|
@@ -1539,69 +1539,69 @@ const _t = U(
|
|
|
1539
1539
|
x(
|
|
1540
1540
|
t,
|
|
1541
1541
|
P(Me),
|
|
1542
|
-
E((
|
|
1542
|
+
E((f) => f == null ? void 0 : f.length)
|
|
1543
1543
|
),
|
|
1544
1544
|
r
|
|
1545
1545
|
), O(
|
|
1546
1546
|
x(
|
|
1547
1547
|
u,
|
|
1548
|
-
E((
|
|
1548
|
+
E((f) => f.topListHeight)
|
|
1549
1549
|
),
|
|
1550
|
-
|
|
1551
|
-
), O(
|
|
1550
|
+
S
|
|
1551
|
+
), O(S, l), O(
|
|
1552
1552
|
x(
|
|
1553
1553
|
u,
|
|
1554
|
-
E((
|
|
1554
|
+
E((f) => [f.top, f.bottom])
|
|
1555
1555
|
),
|
|
1556
1556
|
i
|
|
1557
1557
|
), O(
|
|
1558
1558
|
x(
|
|
1559
1559
|
u,
|
|
1560
|
-
E((
|
|
1560
|
+
E((f) => f.items)
|
|
1561
1561
|
),
|
|
1562
|
-
|
|
1562
|
+
d
|
|
1563
1563
|
);
|
|
1564
1564
|
const T = ht(
|
|
1565
1565
|
x(
|
|
1566
1566
|
u,
|
|
1567
|
-
P(({ items:
|
|
1567
|
+
P(({ items: f }) => f.length > 0),
|
|
1568
1568
|
_(r, t),
|
|
1569
|
-
P(([{ items:
|
|
1570
|
-
E(([,
|
|
1571
|
-
|
|
1572
|
-
E(([
|
|
1569
|
+
P(([{ items: f }, b]) => f[f.length - 1].originalIndex === b - 1),
|
|
1570
|
+
E(([, f, b]) => [f - 1, b]),
|
|
1571
|
+
Z(se),
|
|
1572
|
+
E(([f]) => f)
|
|
1573
1573
|
)
|
|
1574
1574
|
), R = ht(
|
|
1575
1575
|
x(
|
|
1576
1576
|
u,
|
|
1577
1577
|
Lt(200),
|
|
1578
|
-
P(({ items:
|
|
1579
|
-
E(({ items:
|
|
1580
|
-
|
|
1578
|
+
P(({ items: f, topItems: b }) => f.length > 0 && f[0].originalIndex === b.length),
|
|
1579
|
+
E(({ items: f }) => f[0].index),
|
|
1580
|
+
Z()
|
|
1581
1581
|
)
|
|
1582
|
-
),
|
|
1582
|
+
), I = ht(
|
|
1583
1583
|
x(
|
|
1584
1584
|
u,
|
|
1585
|
-
P(({ items:
|
|
1586
|
-
E(({ items:
|
|
1587
|
-
let b = 0, k =
|
|
1588
|
-
for (;
|
|
1585
|
+
P(({ items: f }) => f.length > 0),
|
|
1586
|
+
E(({ items: f }) => {
|
|
1587
|
+
let b = 0, k = f.length - 1;
|
|
1588
|
+
for (; f[b].type === "group" && b < k; )
|
|
1589
1589
|
b++;
|
|
1590
|
-
for (;
|
|
1590
|
+
for (; f[k].type === "group" && k > b; )
|
|
1591
1591
|
k--;
|
|
1592
1592
|
return {
|
|
1593
|
-
endIndex:
|
|
1594
|
-
startIndex:
|
|
1593
|
+
endIndex: f[k].index,
|
|
1594
|
+
startIndex: f[b].index
|
|
1595
1595
|
};
|
|
1596
1596
|
}),
|
|
1597
|
-
|
|
1597
|
+
Z(Mn)
|
|
1598
1598
|
)
|
|
1599
1599
|
);
|
|
1600
|
-
return { endReached: T, initialItemCount:
|
|
1600
|
+
return { endReached: T, initialItemCount: m, itemsRendered: d, listState: u, rangeChanged: I, startReached: R, topItemsIndexes: v, ...g };
|
|
1601
1601
|
},
|
|
1602
1602
|
X(
|
|
1603
1603
|
Et,
|
|
1604
|
-
|
|
1604
|
+
Nn,
|
|
1605
1605
|
Ke,
|
|
1606
1606
|
ue,
|
|
1607
1607
|
ce,
|
|
@@ -1610,40 +1610,40 @@ const _t = U(
|
|
|
1610
1610
|
Ne
|
|
1611
1611
|
),
|
|
1612
1612
|
{ singleton: !0 }
|
|
1613
|
-
),
|
|
1613
|
+
), Kn = U(
|
|
1614
1614
|
([{ fixedFooterHeight: t, fixedHeaderHeight: e, footerHeight: n, headerHeight: o }, { listState: r }]) => {
|
|
1615
1615
|
const s = $(), i = ct(
|
|
1616
1616
|
x(
|
|
1617
1617
|
rt(n, t, o, e, r),
|
|
1618
|
-
E(([l, c, a, p,
|
|
1618
|
+
E(([l, c, a, p, S]) => l + c + a + p + S.offsetBottom + S.bottom)
|
|
1619
1619
|
),
|
|
1620
1620
|
0
|
|
1621
1621
|
);
|
|
1622
1622
|
return O(A(i), s), { totalListHeight: i, totalListHeightChanged: s };
|
|
1623
1623
|
},
|
|
1624
|
-
X(at,
|
|
1624
|
+
X(at, Dt),
|
|
1625
1625
|
{ singleton: !0 }
|
|
1626
|
-
),
|
|
1626
|
+
), Go = U(
|
|
1627
1627
|
([{ viewportHeight: t }, { totalListHeight: e }]) => {
|
|
1628
|
-
const n =
|
|
1628
|
+
const n = C(!1), o = ct(
|
|
1629
1629
|
x(
|
|
1630
1630
|
rt(n, t, e),
|
|
1631
1631
|
P(([r]) => r),
|
|
1632
1632
|
E(([, r, s]) => Math.max(0, r - s)),
|
|
1633
1633
|
Lt(0),
|
|
1634
|
-
|
|
1634
|
+
Z()
|
|
1635
1635
|
),
|
|
1636
1636
|
0
|
|
1637
1637
|
);
|
|
1638
1638
|
return { alignToBottom: n, paddingTopAddition: o };
|
|
1639
1639
|
},
|
|
1640
|
-
X(at,
|
|
1640
|
+
X(at, Kn),
|
|
1641
1641
|
{ singleton: !0 }
|
|
1642
1642
|
);
|
|
1643
|
-
function
|
|
1643
|
+
function xn(t) {
|
|
1644
1644
|
return t ? t === "smooth" ? "smooth" : "auto" : !1;
|
|
1645
1645
|
}
|
|
1646
|
-
const
|
|
1646
|
+
const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
|
|
1647
1647
|
([
|
|
1648
1648
|
{ listRefresh: t, totalCount: e, fixedItemSize: n },
|
|
1649
1649
|
{ atBottomState: o, isAtBottom: r },
|
|
@@ -1653,76 +1653,76 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), Go = U(
|
|
|
1653
1653
|
{ log: a },
|
|
1654
1654
|
{ scrollingInProgress: p }
|
|
1655
1655
|
]) => {
|
|
1656
|
-
const
|
|
1657
|
-
let
|
|
1658
|
-
function
|
|
1659
|
-
|
|
1656
|
+
const S = C(!1), g = $();
|
|
1657
|
+
let h = null;
|
|
1658
|
+
function w(m) {
|
|
1659
|
+
G(s, {
|
|
1660
1660
|
align: "end",
|
|
1661
|
-
behavior:
|
|
1661
|
+
behavior: m,
|
|
1662
1662
|
index: "LAST"
|
|
1663
1663
|
});
|
|
1664
1664
|
}
|
|
1665
1665
|
K(
|
|
1666
1666
|
x(
|
|
1667
1667
|
rt(x(A(e), jt(1)), l),
|
|
1668
|
-
_(A(
|
|
1669
|
-
E(([[
|
|
1670
|
-
let
|
|
1671
|
-
return
|
|
1668
|
+
_(A(S), r, i, p),
|
|
1669
|
+
E(([[m, d], u, T, R, I]) => {
|
|
1670
|
+
let f = d && R, b = "auto";
|
|
1671
|
+
return f && (b = _o(u, T || I), f = f && !!b), { followOutputBehavior: b, shouldFollow: f, totalCount: m };
|
|
1672
1672
|
}),
|
|
1673
|
-
P(({ shouldFollow:
|
|
1673
|
+
P(({ shouldFollow: m }) => m)
|
|
1674
1674
|
),
|
|
1675
|
-
({ followOutputBehavior:
|
|
1676
|
-
|
|
1677
|
-
st(a)("following output to ", { totalCount:
|
|
1678
|
-
}) :
|
|
1679
|
-
st(a)("following output to ", { totalCount:
|
|
1675
|
+
({ followOutputBehavior: m, totalCount: d }) => {
|
|
1676
|
+
h && (h(), h = null), st(n) ? requestAnimationFrame(() => {
|
|
1677
|
+
st(a)("following output to ", { totalCount: d }, mt.DEBUG), w(m);
|
|
1678
|
+
}) : h = bt(t, () => {
|
|
1679
|
+
st(a)("following output to ", { totalCount: d }, mt.DEBUG), w(m), h = null;
|
|
1680
1680
|
});
|
|
1681
1681
|
}
|
|
1682
1682
|
);
|
|
1683
|
-
function
|
|
1684
|
-
const
|
|
1685
|
-
|
|
1683
|
+
function v(m) {
|
|
1684
|
+
const d = bt(o, (u) => {
|
|
1685
|
+
m && !u.atBottom && u.notAtBottomBecause === "SIZE_INCREASED" && !h && (st(a)("scrolling to bottom due to increased size", {}, mt.DEBUG), w("auto"));
|
|
1686
1686
|
});
|
|
1687
|
-
setTimeout(
|
|
1687
|
+
setTimeout(d, 100);
|
|
1688
1688
|
}
|
|
1689
1689
|
return K(
|
|
1690
1690
|
x(
|
|
1691
|
-
rt(A(
|
|
1692
|
-
P(([
|
|
1691
|
+
rt(A(S), e, c),
|
|
1692
|
+
P(([m, , d]) => m && d),
|
|
1693
1693
|
Rt(
|
|
1694
|
-
({ value:
|
|
1694
|
+
({ value: m }, [, d]) => ({ refreshed: m === d, value: d }),
|
|
1695
1695
|
{ refreshed: !1, value: 0 }
|
|
1696
1696
|
),
|
|
1697
|
-
P(({ refreshed:
|
|
1698
|
-
_(
|
|
1697
|
+
P(({ refreshed: m }) => m),
|
|
1698
|
+
_(S, e)
|
|
1699
1699
|
),
|
|
1700
|
-
([,
|
|
1701
|
-
st(i) &&
|
|
1700
|
+
([, m]) => {
|
|
1701
|
+
st(i) && v(m !== !1);
|
|
1702
1702
|
}
|
|
1703
|
-
), K(
|
|
1704
|
-
|
|
1705
|
-
}), K(rt(A(
|
|
1706
|
-
|
|
1707
|
-
}), { autoscrollToBottom:
|
|
1703
|
+
), K(g, () => {
|
|
1704
|
+
v(st(S) !== !1);
|
|
1705
|
+
}), K(rt(A(S), o), ([m, d]) => {
|
|
1706
|
+
m && !d.atBottom && d.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && w("auto");
|
|
1707
|
+
}), { autoscrollToBottom: g, followOutput: S };
|
|
1708
1708
|
},
|
|
1709
1709
|
X(Et, ae, ce, ue, Pt, Vt, at)
|
|
1710
|
-
),
|
|
1710
|
+
), Do = U(
|
|
1711
1711
|
([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (O(
|
|
1712
1712
|
x(
|
|
1713
1713
|
l,
|
|
1714
1714
|
_(s),
|
|
1715
1715
|
P(([, c]) => c !== 0),
|
|
1716
1716
|
_(r, o, e, n, t),
|
|
1717
|
-
E(([[, c], a, p,
|
|
1717
|
+
E(([[, c], a, p, S, g, h = []]) => Un(c, a, p, S, g, h))
|
|
1718
1718
|
),
|
|
1719
1719
|
i
|
|
1720
1720
|
), {}),
|
|
1721
|
-
X(Et, ue,
|
|
1721
|
+
X(Et, ue, Dt, Pt),
|
|
1722
1722
|
{ singleton: !0 }
|
|
1723
|
-
),
|
|
1723
|
+
), $o = U(
|
|
1724
1724
|
([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
|
|
1725
|
-
const o =
|
|
1725
|
+
const o = C(0);
|
|
1726
1726
|
return K(
|
|
1727
1727
|
x(
|
|
1728
1728
|
t,
|
|
@@ -1739,7 +1739,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), Go = U(
|
|
|
1739
1739
|
),
|
|
1740
1740
|
() => {
|
|
1741
1741
|
requestAnimationFrame(() => {
|
|
1742
|
-
|
|
1742
|
+
G(e, r);
|
|
1743
1743
|
});
|
|
1744
1744
|
}
|
|
1745
1745
|
);
|
|
@@ -1748,15 +1748,15 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), Go = U(
|
|
|
1748
1748
|
initialScrollTop: o
|
|
1749
1749
|
};
|
|
1750
1750
|
},
|
|
1751
|
-
X(Pt, at,
|
|
1751
|
+
X(Pt, at, Dt),
|
|
1752
1752
|
{ singleton: !0 }
|
|
1753
|
-
),
|
|
1753
|
+
), Uo = ({
|
|
1754
1754
|
itemBottom: t,
|
|
1755
1755
|
itemTop: e,
|
|
1756
1756
|
locationParams: { align: n, behavior: o, ...r },
|
|
1757
1757
|
viewportBottom: s,
|
|
1758
1758
|
viewportTop: i
|
|
1759
|
-
}) => e < i ? { ...r, align: n != null ? n : "start", behavior: o } : t > s ? { ...r, align: n != null ? n : "end", behavior: o } : null,
|
|
1759
|
+
}) => e < i ? { ...r, align: n != null ? n : "start", behavior: o } : t > s ? { ...r, align: n != null ? n : "end", behavior: o } : null, Ko = U(
|
|
1760
1760
|
([
|
|
1761
1761
|
{ gap: t, sizes: e, totalCount: n },
|
|
1762
1762
|
{ fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: c },
|
|
@@ -1768,11 +1768,11 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), Go = U(
|
|
|
1768
1768
|
p,
|
|
1769
1769
|
_(e, c, n, s, r, o, l),
|
|
1770
1770
|
_(t),
|
|
1771
|
-
E(([[
|
|
1772
|
-
const { align: R, behavior:
|
|
1771
|
+
E(([[S, g, h, w, v, m, d, u], T]) => {
|
|
1772
|
+
const { align: R, behavior: I, calculateViewLocation: f = Uo, done: b, ...k } = S, F = _n(S, g, w - 1), L = ie(F, g.offsetTree, T) + v + m, V = L + Ct(g.sizeTree, F)[1], D = u + m, J = u + h - d, nt = f({
|
|
1773
1773
|
itemBottom: V,
|
|
1774
1774
|
itemTop: L,
|
|
1775
|
-
locationParams: { align: R, behavior:
|
|
1775
|
+
locationParams: { align: R, behavior: I, ...k },
|
|
1776
1776
|
viewportBottom: J,
|
|
1777
1777
|
viewportTop: D
|
|
1778
1778
|
});
|
|
@@ -1787,18 +1787,18 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), Go = U(
|
|
|
1787
1787
|
b
|
|
1788
1788
|
) : b && b(), nt;
|
|
1789
1789
|
}),
|
|
1790
|
-
P((
|
|
1790
|
+
P((S) => S !== null)
|
|
1791
1791
|
),
|
|
1792
1792
|
a
|
|
1793
1793
|
), {
|
|
1794
1794
|
scrollIntoView: p
|
|
1795
1795
|
};
|
|
1796
1796
|
},
|
|
1797
|
-
X(Et, at, ce,
|
|
1797
|
+
X(Et, at, ce, Dt, Vt),
|
|
1798
1798
|
{ singleton: !0 }
|
|
1799
|
-
),
|
|
1799
|
+
), jn = U(
|
|
1800
1800
|
([{ scrollVelocity: t }]) => {
|
|
1801
|
-
const e =
|
|
1801
|
+
const e = C(!1), n = $(), o = C(!1);
|
|
1802
1802
|
return O(
|
|
1803
1803
|
x(
|
|
1804
1804
|
t,
|
|
@@ -1813,7 +1813,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), Go = U(
|
|
|
1813
1813
|
return !0;
|
|
1814
1814
|
return i;
|
|
1815
1815
|
}),
|
|
1816
|
-
|
|
1816
|
+
Z()
|
|
1817
1817
|
),
|
|
1818
1818
|
e
|
|
1819
1819
|
), K(
|
|
@@ -1826,7 +1826,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), Go = U(
|
|
|
1826
1826
|
X(ae),
|
|
1827
1827
|
{ singleton: !0 }
|
|
1828
1828
|
), je = U(([{ scrollContainerState: t, scrollTo: e }]) => {
|
|
1829
|
-
const n = $(), o = $(), r = $(), s =
|
|
1829
|
+
const n = $(), o = $(), r = $(), s = C(!1), i = C(void 0);
|
|
1830
1830
|
return O(
|
|
1831
1831
|
x(
|
|
1832
1832
|
rt(n, o),
|
|
@@ -1857,7 +1857,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), Go = U(
|
|
|
1857
1857
|
windowScrollTo: r,
|
|
1858
1858
|
windowViewportRect: o
|
|
1859
1859
|
};
|
|
1860
|
-
}, X(at)),
|
|
1860
|
+
}, X(at)), jo = U(
|
|
1861
1861
|
([
|
|
1862
1862
|
{ sizeRanges: t, sizes: e },
|
|
1863
1863
|
{ headerHeight: n, scrollTop: o },
|
|
@@ -1865,23 +1865,23 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), Go = U(
|
|
|
1865
1865
|
{ didMount: s },
|
|
1866
1866
|
{ useWindowScroll: i, windowScrollContainerState: l, windowViewportRect: c }
|
|
1867
1867
|
]) => {
|
|
1868
|
-
const a = $(), p =
|
|
1869
|
-
return O(l,
|
|
1868
|
+
const a = $(), p = C(void 0), S = C(null), g = C(null);
|
|
1869
|
+
return O(l, S), O(c, g), K(
|
|
1870
1870
|
x(
|
|
1871
1871
|
a,
|
|
1872
|
-
_(e, o, i,
|
|
1872
|
+
_(e, o, i, S, g, n)
|
|
1873
1873
|
),
|
|
1874
|
-
([
|
|
1875
|
-
const R =
|
|
1876
|
-
|
|
1874
|
+
([h, w, v, m, d, u, T]) => {
|
|
1875
|
+
const R = Bo(w.sizeTree);
|
|
1876
|
+
m && d !== null && u !== null && (v = d.scrollTop - u.offsetTop), v -= T, h({ ranges: R, scrollTop: v });
|
|
1877
1877
|
}
|
|
1878
|
-
), O(x(p, P(Me), E(
|
|
1878
|
+
), O(x(p, P(Me), E(qo)), r), O(
|
|
1879
1879
|
x(
|
|
1880
1880
|
s,
|
|
1881
1881
|
_(p),
|
|
1882
|
-
P(([,
|
|
1883
|
-
|
|
1884
|
-
E(([,
|
|
1882
|
+
P(([, h]) => h !== void 0),
|
|
1883
|
+
Z(),
|
|
1884
|
+
E(([, h]) => h.ranges)
|
|
1885
1885
|
),
|
|
1886
1886
|
t
|
|
1887
1887
|
), {
|
|
@@ -1891,11 +1891,11 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), Go = U(
|
|
|
1891
1891
|
},
|
|
1892
1892
|
X(Et, at, ue, Pt, je)
|
|
1893
1893
|
);
|
|
1894
|
-
function
|
|
1894
|
+
function qo(t) {
|
|
1895
1895
|
return { align: "start", index: 0, offset: t.scrollTop };
|
|
1896
1896
|
}
|
|
1897
|
-
const
|
|
1898
|
-
const e =
|
|
1897
|
+
const Yo = U(([{ topItemsIndexes: t }]) => {
|
|
1898
|
+
const e = C(0);
|
|
1899
1899
|
return O(
|
|
1900
1900
|
x(
|
|
1901
1901
|
e,
|
|
@@ -1904,91 +1904,91 @@ const jo = U(([{ topItemsIndexes: t }]) => {
|
|
|
1904
1904
|
),
|
|
1905
1905
|
t
|
|
1906
1906
|
), { topItemCount: e };
|
|
1907
|
-
}, X(
|
|
1908
|
-
function
|
|
1907
|
+
}, X(Dt));
|
|
1908
|
+
function qn(t) {
|
|
1909
1909
|
let e = !1, n;
|
|
1910
1910
|
return () => (e || (e = !0, n = t()), n);
|
|
1911
1911
|
}
|
|
1912
|
-
const
|
|
1912
|
+
const Zo = qn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Xo = U(
|
|
1913
1913
|
([
|
|
1914
1914
|
{ deviation: t, scrollBy: e, scrollingInProgress: n, scrollTop: o },
|
|
1915
1915
|
{ isAtBottom: r, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: l },
|
|
1916
1916
|
{ listState: c },
|
|
1917
|
-
{ beforeUnshiftWith: a, gap: p, shiftWithOffset:
|
|
1918
|
-
{ log:
|
|
1919
|
-
{ recalcInProgress:
|
|
1917
|
+
{ beforeUnshiftWith: a, gap: p, shiftWithOffset: S, sizes: g },
|
|
1918
|
+
{ log: h },
|
|
1919
|
+
{ recalcInProgress: w }
|
|
1920
1920
|
]) => {
|
|
1921
|
-
const
|
|
1921
|
+
const v = ht(
|
|
1922
1922
|
x(
|
|
1923
1923
|
c,
|
|
1924
1924
|
_(i),
|
|
1925
1925
|
Rt(
|
|
1926
|
-
([,
|
|
1927
|
-
const F = R +
|
|
1926
|
+
([, d, u, T], [{ bottom: R, items: I, offsetBottom: f, totalCount: b }, k]) => {
|
|
1927
|
+
const F = R + f;
|
|
1928
1928
|
let L = 0;
|
|
1929
|
-
return u === b &&
|
|
1929
|
+
return u === b && d.length > 0 && I.length > 0 && (I[0].originalIndex === 0 && d[0].originalIndex === 0 || (L = F - T, L !== 0 && (L += k))), [L, I, b, F];
|
|
1930
1930
|
},
|
|
1931
1931
|
[0, [], 0, 0]
|
|
1932
1932
|
),
|
|
1933
|
-
P(([
|
|
1934
|
-
_(o, l, n, r,
|
|
1935
|
-
P(([,
|
|
1936
|
-
E(([[
|
|
1933
|
+
P(([d]) => d !== 0),
|
|
1934
|
+
_(o, l, n, r, h, w),
|
|
1935
|
+
P(([, d, u, T, , , R]) => !R && !T && d !== 0 && u === le),
|
|
1936
|
+
E(([[d], , , , , u]) => (u("Upward scrolling compensation", { amount: d }, mt.DEBUG), d))
|
|
1937
1937
|
)
|
|
1938
1938
|
);
|
|
1939
|
-
function
|
|
1940
|
-
|
|
1939
|
+
function m(d) {
|
|
1940
|
+
d > 0 ? (G(e, { behavior: "auto", top: -d }), G(t, 0)) : (G(t, 0), G(e, { behavior: "auto", top: -d }));
|
|
1941
1941
|
}
|
|
1942
|
-
return K(x(
|
|
1943
|
-
T &&
|
|
1942
|
+
return K(x(v, _(t, s)), ([d, u, T]) => {
|
|
1943
|
+
T && Zo() ? G(t, u - d) : m(-d);
|
|
1944
1944
|
}), K(
|
|
1945
1945
|
x(
|
|
1946
|
-
rt(ct(s, !1), t,
|
|
1947
|
-
P(([
|
|
1948
|
-
E(([
|
|
1946
|
+
rt(ct(s, !1), t, w),
|
|
1947
|
+
P(([d, u, T]) => !d && !T && u !== 0),
|
|
1948
|
+
E(([d, u]) => u),
|
|
1949
1949
|
Lt(1)
|
|
1950
1950
|
),
|
|
1951
|
-
|
|
1951
|
+
m
|
|
1952
1952
|
), O(
|
|
1953
1953
|
x(
|
|
1954
|
-
|
|
1955
|
-
E((
|
|
1954
|
+
S,
|
|
1955
|
+
E((d) => ({ top: -d }))
|
|
1956
1956
|
),
|
|
1957
1957
|
e
|
|
1958
1958
|
), K(
|
|
1959
1959
|
x(
|
|
1960
1960
|
a,
|
|
1961
|
-
_(
|
|
1962
|
-
E(([
|
|
1963
|
-
function
|
|
1964
|
-
return b * (T +
|
|
1961
|
+
_(g, p),
|
|
1962
|
+
E(([d, { groupIndices: u, lastSize: T, sizeTree: R }, I]) => {
|
|
1963
|
+
function f(b) {
|
|
1964
|
+
return b * (T + I);
|
|
1965
1965
|
}
|
|
1966
1966
|
if (u.length === 0)
|
|
1967
|
-
return d
|
|
1967
|
+
return f(d);
|
|
1968
1968
|
{
|
|
1969
1969
|
let b = 0;
|
|
1970
1970
|
const k = re(R, 0);
|
|
1971
1971
|
let F = 0, L = 0;
|
|
1972
|
-
for (; F <
|
|
1972
|
+
for (; F < d; ) {
|
|
1973
1973
|
F++, b += k;
|
|
1974
1974
|
let V = u.length === L + 1 ? 1 / 0 : u[L + 1] - u[L] - 1;
|
|
1975
|
-
F + V >
|
|
1975
|
+
F + V > d && (b -= k, V = d - F + 1), F += V, b += f(V), L++;
|
|
1976
1976
|
}
|
|
1977
1977
|
return b;
|
|
1978
1978
|
}
|
|
1979
1979
|
})
|
|
1980
1980
|
),
|
|
1981
|
-
(
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1981
|
+
(d) => {
|
|
1982
|
+
G(t, d), requestAnimationFrame(() => {
|
|
1983
|
+
G(e, { top: d }), requestAnimationFrame(() => {
|
|
1984
|
+
G(t, 0), G(w, !1);
|
|
1985
1985
|
});
|
|
1986
1986
|
});
|
|
1987
1987
|
}
|
|
1988
1988
|
), { deviation: t };
|
|
1989
1989
|
},
|
|
1990
|
-
X(at, ae,
|
|
1991
|
-
),
|
|
1990
|
+
X(at, ae, Dt, Et, Vt, Ne)
|
|
1991
|
+
), Jo = U(
|
|
1992
1992
|
([
|
|
1993
1993
|
t,
|
|
1994
1994
|
e,
|
|
@@ -2014,17 +2014,17 @@ const qo = Kn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2014
2014
|
}),
|
|
2015
2015
|
X(
|
|
2016
2016
|
Ke,
|
|
2017
|
-
|
|
2017
|
+
Do,
|
|
2018
2018
|
Pt,
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
No,
|
|
2022
|
-
Mo,
|
|
2023
|
-
je,
|
|
2019
|
+
jn,
|
|
2020
|
+
Kn,
|
|
2024
2021
|
$o,
|
|
2022
|
+
Go,
|
|
2023
|
+
je,
|
|
2024
|
+
Ko,
|
|
2025
2025
|
Vt
|
|
2026
2026
|
)
|
|
2027
|
-
),
|
|
2027
|
+
), Yn = U(
|
|
2028
2028
|
([
|
|
2029
2029
|
{
|
|
2030
2030
|
data: t,
|
|
@@ -2038,15 +2038,15 @@ const qo = Kn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2038
2038
|
sizes: c,
|
|
2039
2039
|
statefulTotalCount: a,
|
|
2040
2040
|
totalCount: p,
|
|
2041
|
-
trackItemSizes:
|
|
2041
|
+
trackItemSizes: S
|
|
2042
2042
|
},
|
|
2043
|
-
{ initialItemFinalLocationReached:
|
|
2044
|
-
|
|
2045
|
-
S,
|
|
2043
|
+
{ initialItemFinalLocationReached: g, initialTopMostItemIndex: h, scrolledToInitialItem: w },
|
|
2044
|
+
v,
|
|
2046
2045
|
m,
|
|
2047
|
-
{ listState: u, topItemsIndexes: T, ...R },
|
|
2048
|
-
{ scrollToIndex: g },
|
|
2049
2046
|
d,
|
|
2047
|
+
{ listState: u, topItemsIndexes: T, ...R },
|
|
2048
|
+
{ scrollToIndex: I },
|
|
2049
|
+
f,
|
|
2050
2050
|
{ topItemCount: b },
|
|
2051
2051
|
{ groupCounts: k },
|
|
2052
2052
|
F
|
|
@@ -2055,7 +2055,7 @@ const qo = Kn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2055
2055
|
F.windowViewportRect,
|
|
2056
2056
|
E((L) => L.visibleHeight)
|
|
2057
2057
|
),
|
|
2058
|
-
|
|
2058
|
+
v.viewportHeight
|
|
2059
2059
|
), {
|
|
2060
2060
|
data: t,
|
|
2061
2061
|
defaultItemHeight: e,
|
|
@@ -2063,45 +2063,45 @@ const qo = Kn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2063
2063
|
fixedItemHeight: o,
|
|
2064
2064
|
gap: r,
|
|
2065
2065
|
groupCounts: k,
|
|
2066
|
-
initialItemFinalLocationReached:
|
|
2067
|
-
initialTopMostItemIndex:
|
|
2068
|
-
scrolledToInitialItem:
|
|
2066
|
+
initialItemFinalLocationReached: g,
|
|
2067
|
+
initialTopMostItemIndex: h,
|
|
2068
|
+
scrolledToInitialItem: w,
|
|
2069
2069
|
sizeRanges: l,
|
|
2070
2070
|
topItemCount: b,
|
|
2071
2071
|
topItemsIndexes: T,
|
|
2072
2072
|
// input
|
|
2073
2073
|
totalCount: p,
|
|
2074
|
-
...
|
|
2074
|
+
...d,
|
|
2075
2075
|
groupIndices: s,
|
|
2076
2076
|
itemSize: i,
|
|
2077
2077
|
listState: u,
|
|
2078
|
-
scrollToIndex:
|
|
2078
|
+
scrollToIndex: I,
|
|
2079
2079
|
// output
|
|
2080
2080
|
statefulTotalCount: a,
|
|
2081
|
-
trackItemSizes:
|
|
2081
|
+
trackItemSizes: S,
|
|
2082
2082
|
// exported from stateFlagsSystem
|
|
2083
2083
|
...R,
|
|
2084
2084
|
// the bag of IO from featureGroup1System
|
|
2085
2085
|
...F,
|
|
2086
|
-
...
|
|
2086
|
+
...v,
|
|
2087
2087
|
sizes: c,
|
|
2088
|
-
...
|
|
2088
|
+
...m
|
|
2089
2089
|
}),
|
|
2090
2090
|
X(
|
|
2091
2091
|
Et,
|
|
2092
2092
|
ue,
|
|
2093
2093
|
at,
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2094
|
+
jo,
|
|
2095
|
+
No,
|
|
2096
|
+
Dt,
|
|
2097
2097
|
ce,
|
|
2098
|
+
Xo,
|
|
2098
2099
|
Yo,
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
Zo
|
|
2100
|
+
Nn,
|
|
2101
|
+
Jo
|
|
2102
2102
|
)
|
|
2103
2103
|
);
|
|
2104
|
-
function
|
|
2104
|
+
function Qo(t, e) {
|
|
2105
2105
|
const n = {}, o = {};
|
|
2106
2106
|
let r = 0;
|
|
2107
2107
|
const s = t.length;
|
|
@@ -2114,54 +2114,54 @@ function Xo(t, e) {
|
|
|
2114
2114
|
const pe = typeof document < "u" ? H.useLayoutEffect : H.useEffect;
|
|
2115
2115
|
function qe(t, e, n) {
|
|
2116
2116
|
const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = H.createContext({});
|
|
2117
|
-
function c(
|
|
2118
|
-
|
|
2117
|
+
function c(d, u) {
|
|
2118
|
+
d.propsReady && G(d.propsReady, !1);
|
|
2119
2119
|
for (const T of o) {
|
|
2120
|
-
const R =
|
|
2121
|
-
|
|
2120
|
+
const R = d[e.required[T]];
|
|
2121
|
+
G(R, u[T]);
|
|
2122
2122
|
}
|
|
2123
2123
|
for (const T of r)
|
|
2124
2124
|
if (T in u) {
|
|
2125
|
-
const R =
|
|
2126
|
-
|
|
2125
|
+
const R = d[e.optional[T]];
|
|
2126
|
+
G(R, u[T]);
|
|
2127
2127
|
}
|
|
2128
|
-
|
|
2128
|
+
d.propsReady && G(d.propsReady, !0);
|
|
2129
2129
|
}
|
|
2130
|
-
function a(
|
|
2130
|
+
function a(d) {
|
|
2131
2131
|
return s.reduce((u, T) => (u[T] = (R) => {
|
|
2132
|
-
const
|
|
2133
|
-
|
|
2132
|
+
const I = d[e.methods[T]];
|
|
2133
|
+
G(I, R);
|
|
2134
2134
|
}, u), {});
|
|
2135
2135
|
}
|
|
2136
|
-
function p(
|
|
2137
|
-
return i.reduce((u, T) => (u[T] =
|
|
2136
|
+
function p(d) {
|
|
2137
|
+
return i.reduce((u, T) => (u[T] = ho(d[e.events[T]]), u), {});
|
|
2138
2138
|
}
|
|
2139
|
-
const
|
|
2140
|
-
const { children: T, ...R } =
|
|
2139
|
+
const S = H.forwardRef((d, u) => {
|
|
2140
|
+
const { children: T, ...R } = d, [I] = H.useState(() => ve(Io(t), (k) => {
|
|
2141
2141
|
c(k, R);
|
|
2142
|
-
})), [
|
|
2142
|
+
})), [f] = H.useState(un(p, I));
|
|
2143
2143
|
pe(() => {
|
|
2144
2144
|
for (const k of i)
|
|
2145
|
-
k in R && K(
|
|
2145
|
+
k in R && K(f[k], R[k]);
|
|
2146
2146
|
return () => {
|
|
2147
|
-
Object.values(
|
|
2147
|
+
Object.values(f).map(We);
|
|
2148
2148
|
};
|
|
2149
|
-
}, [R,
|
|
2150
|
-
c(
|
|
2151
|
-
}), H.useImperativeHandle(u,
|
|
2149
|
+
}, [R, f, I]), pe(() => {
|
|
2150
|
+
c(I, R);
|
|
2151
|
+
}), H.useImperativeHandle(u, cn(a(I)));
|
|
2152
2152
|
const b = n;
|
|
2153
|
-
return /* @__PURE__ */ z(l.Provider, { value:
|
|
2154
|
-
}),
|
|
2153
|
+
return /* @__PURE__ */ z(l.Provider, { value: I, children: n ? /* @__PURE__ */ z(b, { ...Qo([...o, ...r, ...i], R), children: T }) : T });
|
|
2154
|
+
}), g = (d) => {
|
|
2155
2155
|
const u = H.useContext(l);
|
|
2156
2156
|
return H.useCallback(
|
|
2157
2157
|
(T) => {
|
|
2158
|
-
|
|
2158
|
+
G(u[d], T);
|
|
2159
2159
|
},
|
|
2160
|
-
[u,
|
|
2160
|
+
[u, d]
|
|
2161
2161
|
);
|
|
2162
|
-
},
|
|
2163
|
-
const T = H.useContext(l)[
|
|
2164
|
-
(
|
|
2162
|
+
}, h = (d) => {
|
|
2163
|
+
const T = H.useContext(l)[d], R = H.useCallback(
|
|
2164
|
+
(I) => K(T, I),
|
|
2165
2165
|
[T]
|
|
2166
2166
|
);
|
|
2167
2167
|
return H.useSyncExternalStore(
|
|
@@ -2169,98 +2169,98 @@ function qe(t, e, n) {
|
|
|
2169
2169
|
() => st(T),
|
|
2170
2170
|
() => st(T)
|
|
2171
2171
|
);
|
|
2172
|
-
},
|
|
2173
|
-
const T = H.useContext(l)[
|
|
2172
|
+
}, w = (d) => {
|
|
2173
|
+
const T = H.useContext(l)[d], [R, I] = H.useState(un(st, T));
|
|
2174
2174
|
return pe(
|
|
2175
|
-
() => K(T, (
|
|
2176
|
-
|
|
2175
|
+
() => K(T, (f) => {
|
|
2176
|
+
f !== R && I(cn(f));
|
|
2177
2177
|
}),
|
|
2178
2178
|
[T, R]
|
|
2179
2179
|
), R;
|
|
2180
|
-
},
|
|
2180
|
+
}, v = H.version.startsWith("18") ? h : w;
|
|
2181
2181
|
return {
|
|
2182
|
-
Component:
|
|
2183
|
-
useEmitter: (
|
|
2184
|
-
const R = H.useContext(l)[
|
|
2182
|
+
Component: S,
|
|
2183
|
+
useEmitter: (d, u) => {
|
|
2184
|
+
const R = H.useContext(l)[d];
|
|
2185
2185
|
pe(() => K(R, u), [u, R]);
|
|
2186
2186
|
},
|
|
2187
|
-
useEmitterValue:
|
|
2188
|
-
usePublisher:
|
|
2187
|
+
useEmitterValue: v,
|
|
2188
|
+
usePublisher: g
|
|
2189
2189
|
};
|
|
2190
2190
|
}
|
|
2191
|
-
const be = H.createContext(void 0),
|
|
2191
|
+
const be = H.createContext(void 0), Zn = H.createContext(void 0), Xn = typeof document < "u" ? H.useLayoutEffect : H.useEffect;
|
|
2192
2192
|
function ke(t) {
|
|
2193
2193
|
return "self" in t;
|
|
2194
2194
|
}
|
|
2195
|
-
function
|
|
2195
|
+
function tr(t) {
|
|
2196
2196
|
return "body" in t;
|
|
2197
2197
|
}
|
|
2198
|
-
function
|
|
2198
|
+
function Jn(t, e, n, o = Yt, r, s) {
|
|
2199
2199
|
const i = H.useRef(null), l = H.useRef(null), c = H.useRef(null), a = H.useCallback(
|
|
2200
|
-
(
|
|
2201
|
-
let
|
|
2202
|
-
const
|
|
2203
|
-
if (
|
|
2204
|
-
const u = ke(
|
|
2205
|
-
|
|
2200
|
+
(g) => {
|
|
2201
|
+
let h, w, v;
|
|
2202
|
+
const m = g.target;
|
|
2203
|
+
if (tr(m) || ke(m)) {
|
|
2204
|
+
const u = ke(m) ? m : m.defaultView;
|
|
2205
|
+
v = s ? u.scrollX : u.scrollY, h = s ? u.document.documentElement.scrollWidth : u.document.documentElement.scrollHeight, w = s ? u.innerWidth : u.innerHeight;
|
|
2206
2206
|
} else
|
|
2207
|
-
|
|
2208
|
-
const
|
|
2207
|
+
v = s ? m.scrollLeft : m.scrollTop, h = s ? m.scrollWidth : m.scrollHeight, w = s ? m.offsetWidth : m.offsetHeight;
|
|
2208
|
+
const d = () => {
|
|
2209
2209
|
t({
|
|
2210
|
-
scrollHeight:
|
|
2211
|
-
scrollTop: Math.max(
|
|
2212
|
-
viewportHeight:
|
|
2210
|
+
scrollHeight: h,
|
|
2211
|
+
scrollTop: Math.max(v, 0),
|
|
2212
|
+
viewportHeight: w
|
|
2213
2213
|
});
|
|
2214
2214
|
};
|
|
2215
|
-
|
|
2215
|
+
g.suppressFlushSync ? d() : co.flushSync(d), l.current !== null && (v === l.current || v <= 0 || v === h - w) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
|
|
2216
2216
|
},
|
|
2217
2217
|
[t, e, s]
|
|
2218
2218
|
);
|
|
2219
2219
|
H.useEffect(() => {
|
|
2220
|
-
const
|
|
2221
|
-
return o(r || i.current), a({ suppressFlushSync: !0, target:
|
|
2222
|
-
o(null),
|
|
2220
|
+
const g = r || i.current;
|
|
2221
|
+
return o(r || i.current), a({ suppressFlushSync: !0, target: g }), g.addEventListener("scroll", a, { passive: !0 }), () => {
|
|
2222
|
+
o(null), g.removeEventListener("scroll", a);
|
|
2223
2223
|
};
|
|
2224
2224
|
}, [i, a, n, o, r]);
|
|
2225
|
-
function p(
|
|
2226
|
-
const
|
|
2227
|
-
if (!
|
|
2225
|
+
function p(g) {
|
|
2226
|
+
const h = i.current;
|
|
2227
|
+
if (!h || (s ? "offsetWidth" in h && h.offsetWidth === 0 : "offsetHeight" in h && h.offsetHeight === 0))
|
|
2228
2228
|
return;
|
|
2229
|
-
const
|
|
2230
|
-
let
|
|
2231
|
-
ke(
|
|
2232
|
-
wt(
|
|
2233
|
-
s ?
|
|
2234
|
-
),
|
|
2235
|
-
const u =
|
|
2236
|
-
if (
|
|
2237
|
-
t({ scrollHeight:
|
|
2229
|
+
const w = g.behavior === "smooth";
|
|
2230
|
+
let v, m, d;
|
|
2231
|
+
ke(h) ? (m = Math.max(
|
|
2232
|
+
wt(h.document.documentElement, s ? "width" : "height"),
|
|
2233
|
+
s ? h.document.documentElement.scrollWidth : h.document.documentElement.scrollHeight
|
|
2234
|
+
), v = s ? h.innerWidth : h.innerHeight, d = s ? window.scrollX : window.scrollY) : (m = h[s ? "scrollWidth" : "scrollHeight"], v = wt(h, s ? "width" : "height"), d = h[s ? "scrollLeft" : "scrollTop"]);
|
|
2235
|
+
const u = m - v;
|
|
2236
|
+
if (g.top = Math.ceil(Math.max(Math.min(u, g.top), 0)), $n(v, m) || g.top === d) {
|
|
2237
|
+
t({ scrollHeight: m, scrollTop: d, viewportHeight: v }), w && e(!0);
|
|
2238
2238
|
return;
|
|
2239
2239
|
}
|
|
2240
|
-
|
|
2240
|
+
w ? (l.current = g.top, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
|
|
2241
2241
|
c.current = null, l.current = null, e(!0);
|
|
2242
|
-
}, 1e3)) : l.current = null, s && (
|
|
2242
|
+
}, 1e3)) : l.current = null, s && (g = { behavior: g.behavior, left: g.top }), h.scrollTo(g);
|
|
2243
2243
|
}
|
|
2244
|
-
function
|
|
2245
|
-
s && (
|
|
2244
|
+
function S(g) {
|
|
2245
|
+
s && (g = { behavior: g.behavior, left: g.top }), i.current.scrollBy(g);
|
|
2246
2246
|
}
|
|
2247
|
-
return { scrollByCallback:
|
|
2247
|
+
return { scrollByCallback: S, scrollerRef: i, scrollToCallback: p };
|
|
2248
2248
|
}
|
|
2249
|
-
const Fe = "-webkit-sticky",
|
|
2249
|
+
const Fe = "-webkit-sticky", Tn = "sticky", Ye = qn(() => {
|
|
2250
2250
|
if (typeof document > "u")
|
|
2251
|
-
return
|
|
2251
|
+
return Tn;
|
|
2252
2252
|
const t = document.createElement("div");
|
|
2253
|
-
return t.style.position = Fe, t.style.position === Fe ? Fe :
|
|
2253
|
+
return t.style.position = Fe, t.style.position === Fe ? Fe : Tn;
|
|
2254
2254
|
});
|
|
2255
|
-
function
|
|
2255
|
+
function Ze(t) {
|
|
2256
2256
|
return t;
|
|
2257
2257
|
}
|
|
2258
|
-
const
|
|
2259
|
-
const t =
|
|
2258
|
+
const er = /* @__PURE__ */ U(() => {
|
|
2259
|
+
const t = C((c) => `Item ${c}`), e = C(null), n = C((c) => `Group ${c}`), o = C({}), r = C(Ze), s = C("div"), i = C(Yt), l = (c, a = null) => ct(
|
|
2260
2260
|
x(
|
|
2261
2261
|
o,
|
|
2262
2262
|
E((p) => p[c]),
|
|
2263
|
-
|
|
2263
|
+
Z()
|
|
2264
2264
|
),
|
|
2265
2265
|
a
|
|
2266
2266
|
);
|
|
@@ -2282,27 +2282,27 @@ const Qo = /* @__PURE__ */ U(() => {
|
|
|
2282
2282
|
ScrollSeekPlaceholder: l("ScrollSeekPlaceholder"),
|
|
2283
2283
|
TopItemListComponent: l("TopItemList")
|
|
2284
2284
|
};
|
|
2285
|
-
}),
|
|
2285
|
+
}), nr = /* @__PURE__ */ U(
|
|
2286
2286
|
([t, e]) => ({ ...t, ...e }),
|
|
2287
|
-
X(
|
|
2288
|
-
),
|
|
2289
|
-
const n = M("listState"), o = gt("sizeRanges"), r = M("useWindowScroll"), s = M("customScrollParent"), i = gt("windowScrollContainerState"), l = gt("scrollContainerState"), c = s || r ? i : l, a = M("itemContent"), p = M("context"),
|
|
2287
|
+
X(Yn, er)
|
|
2288
|
+
), or = ({ height: t }) => /* @__PURE__ */ z("div", { style: { height: t } }), rr = { overflowAnchor: "none", position: Ye(), zIndex: 1 }, Qn = { overflowAnchor: "none" }, sr = { ...Qn, display: "inline-block", height: "100%" }, Cn = /* @__PURE__ */ H.memo(function({ showTopList: e = !1 }) {
|
|
2289
|
+
const n = M("listState"), o = gt("sizeRanges"), r = M("useWindowScroll"), s = M("customScrollParent"), i = gt("windowScrollContainerState"), l = gt("scrollContainerState"), c = s || r ? i : l, a = M("itemContent"), p = M("context"), S = M("groupContent"), g = M("trackItemSizes"), h = M("itemSize"), w = M("log"), v = gt("gap"), m = M("horizontalDirection"), { callbackRef: d } = On(
|
|
2290
2290
|
o,
|
|
2291
|
-
f,
|
|
2292
2291
|
h,
|
|
2292
|
+
g,
|
|
2293
2293
|
e ? Yt : c,
|
|
2294
|
-
C,
|
|
2295
2294
|
w,
|
|
2295
|
+
v,
|
|
2296
2296
|
s,
|
|
2297
|
-
|
|
2297
|
+
m,
|
|
2298
2298
|
M("skipAnimationFrameInResizeObserver")
|
|
2299
2299
|
), [u, T] = H.useState(0);
|
|
2300
|
-
|
|
2300
|
+
Qe("deviation", (B) => {
|
|
2301
2301
|
u !== B && T(B);
|
|
2302
2302
|
});
|
|
2303
|
-
const R = M("EmptyPlaceholder"),
|
|
2303
|
+
const R = M("EmptyPlaceholder"), I = M("ScrollSeekPlaceholder") || or, f = M("ListComponent"), b = M("ItemComponent"), k = M("GroupComponent"), F = M("computeItemKey"), L = M("isSeeking"), V = M("groupIndices").length > 0, D = M("alignToBottom"), J = M("initialItemFinalLocationReached"), nt = e ? {} : {
|
|
2304
2304
|
boxSizing: "border-box",
|
|
2305
|
-
...
|
|
2305
|
+
...m ? {
|
|
2306
2306
|
display: "inline-block",
|
|
2307
2307
|
height: "100%",
|
|
2308
2308
|
marginLeft: u !== 0 ? u : D ? "auto" : 0,
|
|
@@ -2316,60 +2316,60 @@ const Qo = /* @__PURE__ */ U(() => {
|
|
|
2316
2316
|
},
|
|
2317
2317
|
...J ? {} : { visibility: "hidden" }
|
|
2318
2318
|
};
|
|
2319
|
-
return !e && n.totalCount === 0 && R ? /* @__PURE__ */ z(R, { ...
|
|
2320
|
-
|
|
2319
|
+
return !e && n.totalCount === 0 && R ? /* @__PURE__ */ z(R, { ...q(R, p) }) : /* @__PURE__ */ z(
|
|
2320
|
+
f,
|
|
2321
2321
|
{
|
|
2322
|
-
...
|
|
2322
|
+
...q(f, p),
|
|
2323
2323
|
"data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
|
|
2324
|
-
ref:
|
|
2324
|
+
ref: d,
|
|
2325
2325
|
style: nt,
|
|
2326
2326
|
children: (e ? n.topItems : n.items).map((B) => {
|
|
2327
|
-
const
|
|
2328
|
-
return L ? /* @__PURE__ */
|
|
2329
|
-
|
|
2327
|
+
const Y = B.originalIndex, it = F(Y + n.firstItemIndex, B.data, p);
|
|
2328
|
+
return L ? /* @__PURE__ */ _t(
|
|
2329
|
+
I,
|
|
2330
2330
|
{
|
|
2331
|
-
...
|
|
2331
|
+
...q(I, p),
|
|
2332
2332
|
height: B.size,
|
|
2333
2333
|
index: B.index,
|
|
2334
2334
|
key: it,
|
|
2335
2335
|
type: B.type || "item",
|
|
2336
2336
|
...B.type === "group" ? {} : { groupIndex: B.groupIndex }
|
|
2337
2337
|
}
|
|
2338
|
-
) : B.type === "group" ? /* @__PURE__ */
|
|
2338
|
+
) : B.type === "group" ? /* @__PURE__ */ _t(
|
|
2339
2339
|
k,
|
|
2340
2340
|
{
|
|
2341
|
-
...
|
|
2342
|
-
"data-index":
|
|
2341
|
+
...q(k, p),
|
|
2342
|
+
"data-index": Y,
|
|
2343
2343
|
"data-item-index": B.index,
|
|
2344
2344
|
"data-known-size": B.size,
|
|
2345
2345
|
key: it,
|
|
2346
|
-
style:
|
|
2346
|
+
style: rr
|
|
2347
2347
|
},
|
|
2348
|
-
|
|
2349
|
-
) : /* @__PURE__ */
|
|
2348
|
+
S(B.index, p)
|
|
2349
|
+
) : /* @__PURE__ */ _t(
|
|
2350
2350
|
b,
|
|
2351
2351
|
{
|
|
2352
|
-
...
|
|
2353
|
-
...
|
|
2354
|
-
"data-index":
|
|
2352
|
+
...q(b, p),
|
|
2353
|
+
...to(b, B.data),
|
|
2354
|
+
"data-index": Y,
|
|
2355
2355
|
"data-item-group-index": B.groupIndex,
|
|
2356
2356
|
"data-item-index": B.index,
|
|
2357
2357
|
"data-known-size": B.size,
|
|
2358
2358
|
key: it,
|
|
2359
|
-
style:
|
|
2359
|
+
style: m ? sr : Qn
|
|
2360
2360
|
},
|
|
2361
2361
|
V ? a(B.index, B.groupIndex, B.data, p) : a(B.index, B.data, p)
|
|
2362
2362
|
);
|
|
2363
2363
|
})
|
|
2364
2364
|
}
|
|
2365
2365
|
);
|
|
2366
|
-
}),
|
|
2366
|
+
}), ir = {
|
|
2367
2367
|
height: "100%",
|
|
2368
2368
|
outline: "none",
|
|
2369
2369
|
overflowY: "auto",
|
|
2370
2370
|
position: "relative",
|
|
2371
2371
|
WebkitOverflowScrolling: "touch"
|
|
2372
|
-
},
|
|
2372
|
+
}, lr = {
|
|
2373
2373
|
outline: "none",
|
|
2374
2374
|
overflowX: "auto",
|
|
2375
2375
|
position: "relative"
|
|
@@ -2379,20 +2379,20 @@ const Qo = /* @__PURE__ */ U(() => {
|
|
|
2379
2379
|
top: 0,
|
|
2380
2380
|
width: "100%",
|
|
2381
2381
|
...t ? { display: "flex", flexDirection: "column" } : {}
|
|
2382
|
-
}),
|
|
2383
|
-
position:
|
|
2382
|
+
}), cr = {
|
|
2383
|
+
position: Ye(),
|
|
2384
2384
|
top: 0,
|
|
2385
2385
|
width: "100%",
|
|
2386
2386
|
zIndex: 1
|
|
2387
2387
|
};
|
|
2388
|
-
function
|
|
2388
|
+
function q(t, e) {
|
|
2389
2389
|
if (typeof t != "string")
|
|
2390
2390
|
return { context: e };
|
|
2391
2391
|
}
|
|
2392
|
-
function
|
|
2392
|
+
function to(t, e) {
|
|
2393
2393
|
return { item: typeof t == "string" ? void 0 : e };
|
|
2394
2394
|
}
|
|
2395
|
-
const
|
|
2395
|
+
const ur = /* @__PURE__ */ H.memo(function() {
|
|
2396
2396
|
const e = M("HeaderComponent"), n = gt("headerHeight"), o = M("HeaderFooterTag"), r = Ht(
|
|
2397
2397
|
H.useMemo(
|
|
2398
2398
|
() => (i) => {
|
|
@@ -2403,8 +2403,8 @@ const lr = /* @__PURE__ */ H.memo(function() {
|
|
|
2403
2403
|
!0,
|
|
2404
2404
|
M("skipAnimationFrameInResizeObserver")
|
|
2405
2405
|
), s = M("context");
|
|
2406
|
-
return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...
|
|
2407
|
-
}),
|
|
2406
|
+
return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...q(e, s) }) }) : null;
|
|
2407
|
+
}), ar = /* @__PURE__ */ H.memo(function() {
|
|
2408
2408
|
const e = M("FooterComponent"), n = gt("footerHeight"), o = M("HeaderFooterTag"), r = Ht(
|
|
2409
2409
|
H.useMemo(
|
|
2410
2410
|
() => (i) => {
|
|
@@ -2415,61 +2415,61 @@ const lr = /* @__PURE__ */ H.memo(function() {
|
|
|
2415
2415
|
!0,
|
|
2416
2416
|
M("skipAnimationFrameInResizeObserver")
|
|
2417
2417
|
), s = M("context");
|
|
2418
|
-
return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...
|
|
2418
|
+
return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...q(e, s) }) }) : null;
|
|
2419
2419
|
});
|
|
2420
|
-
function
|
|
2420
|
+
function Xe({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
2421
2421
|
return H.memo(function({ children: s, style: i, ...l }) {
|
|
2422
|
-
const c = n("scrollContainerState"), a = e("ScrollerComponent"), p = n("smoothScrollTargetReached"),
|
|
2422
|
+
const c = n("scrollContainerState"), a = e("ScrollerComponent"), p = n("smoothScrollTargetReached"), S = e("scrollerRef"), g = e("context"), h = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: v, scrollToCallback: m } = Jn(
|
|
2423
2423
|
c,
|
|
2424
2424
|
p,
|
|
2425
2425
|
a,
|
|
2426
|
-
|
|
2426
|
+
S,
|
|
2427
2427
|
void 0,
|
|
2428
|
-
|
|
2428
|
+
h
|
|
2429
2429
|
);
|
|
2430
|
-
return t("scrollTo",
|
|
2430
|
+
return t("scrollTo", m), t("scrollBy", w), /* @__PURE__ */ z(
|
|
2431
2431
|
a,
|
|
2432
2432
|
{
|
|
2433
2433
|
"data-testid": "virtuoso-scroller",
|
|
2434
2434
|
"data-virtuoso-scroller": !0,
|
|
2435
|
-
ref:
|
|
2436
|
-
style: { ...
|
|
2435
|
+
ref: v,
|
|
2436
|
+
style: { ...h ? lr : ir, ...i },
|
|
2437
2437
|
tabIndex: 0,
|
|
2438
2438
|
...l,
|
|
2439
|
-
...
|
|
2439
|
+
...q(a, g),
|
|
2440
2440
|
children: s
|
|
2441
2441
|
}
|
|
2442
2442
|
);
|
|
2443
2443
|
});
|
|
2444
2444
|
}
|
|
2445
|
-
function
|
|
2445
|
+
function Je({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
2446
2446
|
return H.memo(function({ children: s, style: i, ...l }) {
|
|
2447
|
-
const c = n("windowScrollContainerState"), a = e("ScrollerComponent"), p = n("smoothScrollTargetReached"),
|
|
2447
|
+
const c = n("windowScrollContainerState"), a = e("ScrollerComponent"), p = n("smoothScrollTargetReached"), S = e("totalListHeight"), g = e("deviation"), h = e("customScrollParent"), w = e("context"), v = H.useRef(null), m = e("scrollerRef"), { scrollByCallback: d, scrollerRef: u, scrollToCallback: T } = Jn(
|
|
2448
2448
|
c,
|
|
2449
2449
|
p,
|
|
2450
2450
|
a,
|
|
2451
|
-
|
|
2452
|
-
|
|
2451
|
+
m,
|
|
2452
|
+
h
|
|
2453
2453
|
);
|
|
2454
|
-
return
|
|
2454
|
+
return Xn(() => {
|
|
2455
2455
|
var R;
|
|
2456
|
-
return u.current =
|
|
2456
|
+
return u.current = h || ((R = v.current) == null ? void 0 : R.ownerDocument.defaultView), () => {
|
|
2457
2457
|
u.current = null;
|
|
2458
2458
|
};
|
|
2459
|
-
}, [u,
|
|
2459
|
+
}, [u, h]), t("windowScrollTo", T), t("scrollBy", d), /* @__PURE__ */ z(
|
|
2460
2460
|
a,
|
|
2461
2461
|
{
|
|
2462
|
-
ref:
|
|
2462
|
+
ref: v,
|
|
2463
2463
|
"data-virtuoso-scroller": !0,
|
|
2464
|
-
style: { position: "relative", ...i, ...
|
|
2464
|
+
style: { position: "relative", ...i, ...S !== 0 ? { height: S + g } : {} },
|
|
2465
2465
|
...l,
|
|
2466
|
-
...
|
|
2466
|
+
...q(a, w),
|
|
2467
2467
|
children: s
|
|
2468
2468
|
}
|
|
2469
2469
|
);
|
|
2470
2470
|
});
|
|
2471
2471
|
}
|
|
2472
|
-
const
|
|
2472
|
+
const dr = ({ children: t }) => {
|
|
2473
2473
|
const e = H.useContext(be), n = gt("viewportHeight"), o = gt("fixedItemHeight"), r = M("alignToBottom"), s = M("horizontalDirection"), i = H.useMemo(
|
|
2474
2474
|
() => ne(n, (c) => wt(c, s ? "width" : "height")),
|
|
2475
2475
|
[n, s]
|
|
@@ -2477,7 +2477,7 @@ const ur = ({ children: t }) => {
|
|
|
2477
2477
|
return H.useEffect(() => {
|
|
2478
2478
|
e && (n(e.viewportHeight), o(e.itemHeight));
|
|
2479
2479
|
}, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "element", ref: l, style: Zt(r), children: t });
|
|
2480
|
-
},
|
|
2480
|
+
}, fr = ({ children: t }) => {
|
|
2481
2481
|
const e = H.useContext(be), n = gt("windowViewportRect"), o = gt("fixedItemHeight"), r = M("customScrollParent"), s = _e(
|
|
2482
2482
|
n,
|
|
2483
2483
|
r,
|
|
@@ -2486,26 +2486,26 @@ const ur = ({ children: t }) => {
|
|
|
2486
2486
|
return H.useEffect(() => {
|
|
2487
2487
|
e && (o(e.itemHeight), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2488
2488
|
}, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "window", ref: s, style: Zt(i), children: t });
|
|
2489
|
-
},
|
|
2490
|
-
const e = M("TopItemListComponent") || "div", n = M("headerHeight"), o = { ...
|
|
2491
|
-
return /* @__PURE__ */ z(e, { style: o, ...
|
|
2492
|
-
},
|
|
2493
|
-
const n = M("useWindowScroll"), o = M("topItemsIndexes").length > 0, r = M("customScrollParent"), s = M("context"), i = r || n ?
|
|
2494
|
-
return /* @__PURE__ */
|
|
2495
|
-
o && /* @__PURE__ */ z(
|
|
2496
|
-
/* @__PURE__ */
|
|
2497
|
-
/* @__PURE__ */ z(
|
|
2498
|
-
/* @__PURE__ */ z(
|
|
2499
|
-
/* @__PURE__ */ z(
|
|
2489
|
+
}, mr = ({ children: t }) => {
|
|
2490
|
+
const e = M("TopItemListComponent") || "div", n = M("headerHeight"), o = { ...cr, marginTop: `${n}px` }, r = M("context");
|
|
2491
|
+
return /* @__PURE__ */ z(e, { style: o, ...q(e, r), children: t });
|
|
2492
|
+
}, pr = /* @__PURE__ */ H.memo(function(e) {
|
|
2493
|
+
const n = M("useWindowScroll"), o = M("topItemsIndexes").length > 0, r = M("customScrollParent"), s = M("context"), i = r || n ? gr : hr, l = r || n ? fr : dr;
|
|
2494
|
+
return /* @__PURE__ */ Nt(i, { ...e, ...q(i, s), children: [
|
|
2495
|
+
o && /* @__PURE__ */ z(mr, { children: /* @__PURE__ */ z(Cn, { showTopList: !0 }) }),
|
|
2496
|
+
/* @__PURE__ */ Nt(l, { children: [
|
|
2497
|
+
/* @__PURE__ */ z(ur, {}),
|
|
2498
|
+
/* @__PURE__ */ z(Cn, {}),
|
|
2499
|
+
/* @__PURE__ */ z(ar, {})
|
|
2500
2500
|
] })
|
|
2501
2501
|
] });
|
|
2502
2502
|
}), {
|
|
2503
|
-
Component:
|
|
2504
|
-
useEmitter:
|
|
2503
|
+
Component: eo,
|
|
2504
|
+
useEmitter: Qe,
|
|
2505
2505
|
useEmitterValue: M,
|
|
2506
2506
|
usePublisher: gt
|
|
2507
2507
|
} = /* @__PURE__ */ qe(
|
|
2508
|
-
|
|
2508
|
+
nr,
|
|
2509
2509
|
{
|
|
2510
2510
|
required: {},
|
|
2511
2511
|
optional: {
|
|
@@ -2561,150 +2561,170 @@ const ur = ({ children: t }) => {
|
|
|
2561
2561
|
groupIndices: "groupIndices"
|
|
2562
2562
|
}
|
|
2563
2563
|
},
|
|
2564
|
-
|
|
2565
|
-
),
|
|
2566
|
-
const t =
|
|
2564
|
+
pr
|
|
2565
|
+
), hr = /* @__PURE__ */ Xe({ useEmitter: Qe, useEmitterValue: M, usePublisher: gt }), gr = /* @__PURE__ */ Je({ useEmitter: Qe, useEmitterValue: M, usePublisher: gt }), jr = eo, qr = eo, Ir = /* @__PURE__ */ U(() => {
|
|
2566
|
+
const t = C((a) => /* @__PURE__ */ Nt("td", { children: [
|
|
2567
2567
|
"Item $",
|
|
2568
|
-
|
|
2569
|
-
] })), e =
|
|
2568
|
+
a
|
|
2569
|
+
] })), e = C(null), n = C((a) => /* @__PURE__ */ Nt("td", { colSpan: 1e3, children: [
|
|
2570
|
+
"Group ",
|
|
2571
|
+
a
|
|
2572
|
+
] })), o = C(null), r = C(null), s = C({}), i = C(Ze), l = C(Yt), c = (a, p = null) => ct(
|
|
2570
2573
|
x(
|
|
2571
|
-
|
|
2572
|
-
E((
|
|
2573
|
-
|
|
2574
|
+
s,
|
|
2575
|
+
E((S) => S[a]),
|
|
2576
|
+
Z()
|
|
2574
2577
|
),
|
|
2575
|
-
|
|
2578
|
+
p
|
|
2576
2579
|
);
|
|
2577
2580
|
return {
|
|
2578
|
-
components:
|
|
2579
|
-
computeItemKey:
|
|
2581
|
+
components: s,
|
|
2582
|
+
computeItemKey: i,
|
|
2580
2583
|
context: e,
|
|
2581
|
-
EmptyPlaceholder:
|
|
2582
|
-
FillerRow:
|
|
2583
|
-
fixedFooterContent:
|
|
2584
|
-
fixedHeaderContent:
|
|
2584
|
+
EmptyPlaceholder: c("EmptyPlaceholder"),
|
|
2585
|
+
FillerRow: c("FillerRow"),
|
|
2586
|
+
fixedFooterContent: r,
|
|
2587
|
+
fixedHeaderContent: o,
|
|
2585
2588
|
itemContent: t,
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2589
|
+
groupContent: n,
|
|
2590
|
+
ScrollerComponent: c("Scroller", "div"),
|
|
2591
|
+
scrollerRef: l,
|
|
2592
|
+
ScrollSeekPlaceholder: c("ScrollSeekPlaceholder"),
|
|
2593
|
+
TableBodyComponent: c("TableBody", "tbody"),
|
|
2594
|
+
TableComponent: c("Table", "table"),
|
|
2595
|
+
TableFooterComponent: c("TableFoot", "tfoot"),
|
|
2596
|
+
TableHeadComponent: c("TableHead", "thead"),
|
|
2597
|
+
TableRowComponent: c("TableRow", "tr"),
|
|
2598
|
+
GroupComponent: c("Group", "tr")
|
|
2594
2599
|
};
|
|
2595
|
-
}),
|
|
2600
|
+
}), Sr = /* @__PURE__ */ U(
|
|
2596
2601
|
([t, e]) => ({ ...t, ...e }),
|
|
2597
|
-
X(
|
|
2598
|
-
),
|
|
2599
|
-
const n =
|
|
2600
|
-
const
|
|
2601
|
-
return
|
|
2602
|
-
|
|
2602
|
+
X(Yn, Ir)
|
|
2603
|
+
), xr = ({ height: t }) => /* @__PURE__ */ z("tr", { children: /* @__PURE__ */ z("td", { style: { height: t } }) }), Tr = ({ height: t }) => /* @__PURE__ */ z("tr", { children: /* @__PURE__ */ z("td", { style: { border: 0, height: t, padding: 0 } }) }), Cr = { overflowAnchor: "none" }, wn = { position: Ye(), zIndex: 2, overflowAnchor: "none" }, vn = /* @__PURE__ */ H.memo(function({ showTopList: e = !1 }) {
|
|
2604
|
+
const n = W("listState"), o = W("computeItemKey"), r = W("firstItemIndex"), s = W("context"), i = W("isSeeking"), l = W("fixedHeaderHeight"), c = W("groupIndices").length > 0, a = W("itemContent"), p = W("groupContent"), S = W("ScrollSeekPlaceholder") || xr, g = W("GroupComponent"), h = W("TableRowComponent"), w = (e ? n.topItems : []).reduce((m, d, u) => (u === 0 ? m.push(d.size) : m.push(m[u - 1] + d.size), m), []), v = (e ? n.topItems : n.items).map((m) => {
|
|
2605
|
+
const d = m.originalIndex, u = o(d + r, m.data, s), T = e ? d === 0 ? 0 : w[d - 1] : 0;
|
|
2606
|
+
return i ? /* @__PURE__ */ _t(
|
|
2607
|
+
S,
|
|
2603
2608
|
{
|
|
2604
|
-
...
|
|
2605
|
-
height:
|
|
2606
|
-
index:
|
|
2607
|
-
key:
|
|
2608
|
-
type:
|
|
2609
|
+
...q(S, s),
|
|
2610
|
+
height: m.size,
|
|
2611
|
+
index: m.index,
|
|
2612
|
+
key: u,
|
|
2613
|
+
type: m.type || "item"
|
|
2609
2614
|
}
|
|
2610
|
-
) : /* @__PURE__ */
|
|
2611
|
-
|
|
2615
|
+
) : m.type === "group" ? /* @__PURE__ */ _t(
|
|
2616
|
+
g,
|
|
2612
2617
|
{
|
|
2613
|
-
...
|
|
2614
|
-
|
|
2615
|
-
"data-index":
|
|
2616
|
-
"data-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2618
|
+
...q(g, s),
|
|
2619
|
+
"data-index": d,
|
|
2620
|
+
"data-item-index": m.index,
|
|
2621
|
+
"data-known-size": m.size,
|
|
2622
|
+
key: u,
|
|
2623
|
+
style: {
|
|
2624
|
+
...wn,
|
|
2625
|
+
top: l
|
|
2626
|
+
}
|
|
2620
2627
|
},
|
|
2621
|
-
p(
|
|
2628
|
+
p(m.index, s)
|
|
2629
|
+
) : /* @__PURE__ */ _t(
|
|
2630
|
+
h,
|
|
2631
|
+
{
|
|
2632
|
+
...q(h, s),
|
|
2633
|
+
...to(h, m.data),
|
|
2634
|
+
"data-index": d,
|
|
2635
|
+
"data-item-index": m.index,
|
|
2636
|
+
"data-known-size": m.size,
|
|
2637
|
+
"data-item-group-index": m.groupIndex,
|
|
2638
|
+
key: u,
|
|
2639
|
+
style: e ? { ...wn, top: l + T } : Cr
|
|
2640
|
+
},
|
|
2641
|
+
c ? a(m.index, m.groupIndex, m.data, s) : a(m.index, m.data, s)
|
|
2622
2642
|
);
|
|
2623
2643
|
});
|
|
2624
|
-
return /* @__PURE__ */ z(
|
|
2625
|
-
}),
|
|
2626
|
-
const e =
|
|
2644
|
+
return /* @__PURE__ */ z(lo, { children: v });
|
|
2645
|
+
}), wr = /* @__PURE__ */ H.memo(function() {
|
|
2646
|
+
const e = W("listState"), n = W("topItemsIndexes").length > 0, o = Tt("sizeRanges"), r = W("useWindowScroll"), s = W("customScrollParent"), i = Tt("windowScrollContainerState"), l = Tt("scrollContainerState"), c = s || r ? i : l, a = W("trackItemSizes"), p = W("itemSize"), S = W("log"), { callbackRef: g, ref: h } = On(
|
|
2627
2647
|
o,
|
|
2628
2648
|
p,
|
|
2629
2649
|
a,
|
|
2630
2650
|
c,
|
|
2631
|
-
|
|
2651
|
+
S,
|
|
2632
2652
|
void 0,
|
|
2633
2653
|
s,
|
|
2634
2654
|
!1,
|
|
2635
|
-
|
|
2636
|
-
), [
|
|
2637
|
-
|
|
2638
|
-
|
|
2655
|
+
W("skipAnimationFrameInResizeObserver")
|
|
2656
|
+
), [w, v] = H.useState(0);
|
|
2657
|
+
tn("deviation", (V) => {
|
|
2658
|
+
w !== V && (h.current.style.marginTop = `${V}px`, v(V));
|
|
2639
2659
|
});
|
|
2640
|
-
const
|
|
2641
|
-
if (R === 0 &&
|
|
2642
|
-
return /* @__PURE__ */ z(
|
|
2643
|
-
const
|
|
2644
|
-
return /* @__PURE__ */
|
|
2660
|
+
const m = W("EmptyPlaceholder"), d = W("FillerRow") || Tr, u = W("TableBodyComponent"), T = W("paddingTopAddition"), R = W("statefulTotalCount"), I = W("context");
|
|
2661
|
+
if (R === 0 && m)
|
|
2662
|
+
return /* @__PURE__ */ z(m, { ...q(m, I) });
|
|
2663
|
+
const f = (n ? e.topItems : []).reduce((V, D) => V + D.size, 0), b = e.offsetTop + T + w - f, k = e.offsetBottom, F = b > 0 ? /* @__PURE__ */ z(d, { context: I, height: b }, "padding-top") : null, L = k > 0 ? /* @__PURE__ */ z(d, { context: I, height: k }, "padding-bottom") : null;
|
|
2664
|
+
return /* @__PURE__ */ Nt(u, { "data-testid": "virtuoso-item-list", ref: g, ...q(u, I), children: [
|
|
2645
2665
|
F,
|
|
2646
|
-
n && /* @__PURE__ */ z(
|
|
2647
|
-
/* @__PURE__ */ z(
|
|
2666
|
+
n && /* @__PURE__ */ z(vn, { showTopList: !0 }),
|
|
2667
|
+
/* @__PURE__ */ z(vn, {}),
|
|
2648
2668
|
L
|
|
2649
2669
|
] });
|
|
2650
|
-
}),
|
|
2670
|
+
}), vr = ({ children: t }) => {
|
|
2651
2671
|
const e = H.useContext(be), n = Tt("viewportHeight"), o = Tt("fixedItemHeight"), r = Ht(
|
|
2652
2672
|
H.useMemo(() => ne(n, (s) => wt(s, "height")), [n]),
|
|
2653
2673
|
!0,
|
|
2654
|
-
|
|
2674
|
+
W("skipAnimationFrameInResizeObserver")
|
|
2655
2675
|
);
|
|
2656
2676
|
return H.useEffect(() => {
|
|
2657
2677
|
e && (n(e.viewportHeight), o(e.itemHeight));
|
|
2658
2678
|
}, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "element", ref: r, style: Zt(!1), children: t });
|
|
2659
|
-
},
|
|
2660
|
-
const e = H.useContext(be), n = Tt("windowViewportRect"), o = Tt("fixedItemHeight"), r =
|
|
2679
|
+
}, yr = ({ children: t }) => {
|
|
2680
|
+
const e = H.useContext(be), n = Tt("windowViewportRect"), o = Tt("fixedItemHeight"), r = W("customScrollParent"), s = _e(
|
|
2661
2681
|
n,
|
|
2662
2682
|
r,
|
|
2663
|
-
|
|
2683
|
+
W("skipAnimationFrameInResizeObserver")
|
|
2664
2684
|
);
|
|
2665
2685
|
return H.useEffect(() => {
|
|
2666
2686
|
e && (o(e.itemHeight), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2667
2687
|
}, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "window", ref: s, style: Zt(!1), children: t });
|
|
2668
|
-
},
|
|
2669
|
-
const n =
|
|
2688
|
+
}, Rr = /* @__PURE__ */ H.memo(function(e) {
|
|
2689
|
+
const n = W("useWindowScroll"), o = W("customScrollParent"), r = Tt("fixedHeaderHeight"), s = Tt("fixedFooterHeight"), i = W("fixedHeaderContent"), l = W("fixedFooterContent"), c = W("context"), a = Ht(
|
|
2670
2690
|
H.useMemo(() => ne(r, (u) => wt(u, "height")), [r]),
|
|
2671
2691
|
!0,
|
|
2672
|
-
|
|
2692
|
+
W("skipAnimationFrameInResizeObserver")
|
|
2673
2693
|
), p = Ht(
|
|
2674
2694
|
H.useMemo(() => ne(s, (u) => wt(u, "height")), [s]),
|
|
2675
2695
|
!0,
|
|
2676
|
-
|
|
2677
|
-
),
|
|
2678
|
-
|
|
2696
|
+
W("skipAnimationFrameInResizeObserver")
|
|
2697
|
+
), S = o || n ? Hr : br, g = o || n ? yr : vr, h = W("TableComponent"), w = W("TableHeadComponent"), v = W("TableFooterComponent"), m = i ? /* @__PURE__ */ z(
|
|
2698
|
+
w,
|
|
2679
2699
|
{
|
|
2680
2700
|
ref: a,
|
|
2681
2701
|
style: { position: "sticky", top: 0, zIndex: 2 },
|
|
2682
|
-
...
|
|
2702
|
+
...q(w, c),
|
|
2683
2703
|
children: i()
|
|
2684
2704
|
},
|
|
2685
2705
|
"TableHead"
|
|
2686
|
-
) : null,
|
|
2687
|
-
|
|
2706
|
+
) : null, d = l ? /* @__PURE__ */ z(
|
|
2707
|
+
v,
|
|
2688
2708
|
{
|
|
2689
2709
|
ref: p,
|
|
2690
2710
|
style: { bottom: 0, position: "sticky", zIndex: 1 },
|
|
2691
|
-
...
|
|
2711
|
+
...q(v, c),
|
|
2692
2712
|
children: l()
|
|
2693
2713
|
},
|
|
2694
2714
|
"TableFoot"
|
|
2695
2715
|
) : null;
|
|
2696
|
-
return /* @__PURE__ */ z(
|
|
2697
|
-
|
|
2698
|
-
/* @__PURE__ */ z(
|
|
2699
|
-
|
|
2716
|
+
return /* @__PURE__ */ z(S, { ...e, ...q(S, c), children: /* @__PURE__ */ z(g, { children: /* @__PURE__ */ Nt(h, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...q(h, c), children: [
|
|
2717
|
+
m,
|
|
2718
|
+
/* @__PURE__ */ z(wr, {}, "TableBody"),
|
|
2719
|
+
d
|
|
2700
2720
|
] }) }) });
|
|
2701
2721
|
}), {
|
|
2702
|
-
Component:
|
|
2703
|
-
useEmitter:
|
|
2704
|
-
useEmitterValue:
|
|
2722
|
+
Component: no,
|
|
2723
|
+
useEmitter: tn,
|
|
2724
|
+
useEmitterValue: W,
|
|
2705
2725
|
usePublisher: Tt
|
|
2706
2726
|
} = /* @__PURE__ */ qe(
|
|
2707
|
-
|
|
2727
|
+
Sr,
|
|
2708
2728
|
{
|
|
2709
2729
|
required: {},
|
|
2710
2730
|
optional: {
|
|
@@ -2713,6 +2733,7 @@ const ur = ({ children: t }) => {
|
|
|
2713
2733
|
followOutput: "followOutput",
|
|
2714
2734
|
firstItemIndex: "firstItemIndex",
|
|
2715
2735
|
itemContent: "itemContent",
|
|
2736
|
+
groupContent: "groupContent",
|
|
2716
2737
|
fixedHeaderContent: "fixedHeaderContent",
|
|
2717
2738
|
fixedFooterContent: "fixedFooterContent",
|
|
2718
2739
|
overscan: "overscan",
|
|
@@ -2757,8 +2778,8 @@ const ur = ({ children: t }) => {
|
|
|
2757
2778
|
groupIndices: "groupIndices"
|
|
2758
2779
|
}
|
|
2759
2780
|
},
|
|
2760
|
-
|
|
2761
|
-
),
|
|
2781
|
+
Rr
|
|
2782
|
+
), br = /* @__PURE__ */ Xe({ useEmitter: tn, useEmitterValue: W, usePublisher: Tt }), Hr = /* @__PURE__ */ Je({ useEmitter: tn, useEmitterValue: W, usePublisher: Tt }), Yr = no, Zr = no, yn = {
|
|
2762
2783
|
bottom: 0,
|
|
2763
2784
|
itemHeight: 0,
|
|
2764
2785
|
items: [],
|
|
@@ -2766,7 +2787,7 @@ const ur = ({ children: t }) => {
|
|
|
2766
2787
|
offsetBottom: 0,
|
|
2767
2788
|
offsetTop: 0,
|
|
2768
2789
|
top: 0
|
|
2769
|
-
},
|
|
2790
|
+
}, Er = {
|
|
2770
2791
|
bottom: 0,
|
|
2771
2792
|
itemHeight: 0,
|
|
2772
2793
|
items: [{ index: 0 }],
|
|
@@ -2774,52 +2795,52 @@ const ur = ({ children: t }) => {
|
|
|
2774
2795
|
offsetBottom: 0,
|
|
2775
2796
|
offsetTop: 0,
|
|
2776
2797
|
top: 0
|
|
2777
|
-
}, { ceil:
|
|
2778
|
-
function
|
|
2798
|
+
}, { ceil: Rn, floor: Ce, max: ee, min: Oe, round: bn } = Math;
|
|
2799
|
+
function Hn(t, e, n) {
|
|
2779
2800
|
return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
|
|
2780
2801
|
}
|
|
2781
|
-
function
|
|
2802
|
+
function Br(t) {
|
|
2782
2803
|
return {
|
|
2783
|
-
...
|
|
2804
|
+
...Er,
|
|
2784
2805
|
items: t
|
|
2785
2806
|
};
|
|
2786
2807
|
}
|
|
2787
2808
|
function he(t, e) {
|
|
2788
2809
|
return t && t.width === e.width && t.height === e.height;
|
|
2789
2810
|
}
|
|
2790
|
-
function
|
|
2811
|
+
function kr(t, e) {
|
|
2791
2812
|
return t && t.column === e.column && t.row === e.row;
|
|
2792
2813
|
}
|
|
2793
|
-
const
|
|
2814
|
+
const Fr = /* @__PURE__ */ U(
|
|
2794
2815
|
([
|
|
2795
2816
|
{ increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
|
|
2796
|
-
{ footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: a, smoothScrollTargetReached: p, viewportHeight:
|
|
2817
|
+
{ footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: a, smoothScrollTargetReached: p, viewportHeight: S },
|
|
2818
|
+
g,
|
|
2797
2819
|
h,
|
|
2798
|
-
|
|
2799
|
-
{
|
|
2800
|
-
|
|
2801
|
-
g
|
|
2820
|
+
{ didMount: w, propsReady: v },
|
|
2821
|
+
{ customScrollParent: m, useWindowScroll: d, windowScrollContainerState: u, windowScrollTo: T, windowViewportRect: R },
|
|
2822
|
+
I
|
|
2802
2823
|
]) => {
|
|
2803
|
-
const
|
|
2824
|
+
const f = C(0), b = C(0), k = C(yn), F = C({ height: 0, width: 0 }), L = C({ height: 0, width: 0 }), V = $(), D = $(), J = C(0), nt = C(null), B = C({ column: 0, row: 0 }), Y = $(), it = $(), dt = C(!1), St = C(0), ft = C(!0), ut = C(!1), At = C(!1);
|
|
2804
2825
|
K(
|
|
2805
2826
|
x(
|
|
2806
|
-
|
|
2827
|
+
w,
|
|
2807
2828
|
_(St),
|
|
2808
2829
|
P(([y, N]) => !!N)
|
|
2809
2830
|
),
|
|
2810
2831
|
() => {
|
|
2811
|
-
|
|
2832
|
+
G(ft, !1);
|
|
2812
2833
|
}
|
|
2813
2834
|
), K(
|
|
2814
2835
|
x(
|
|
2815
|
-
rt(
|
|
2836
|
+
rt(w, ft, L, F, St, ut),
|
|
2816
2837
|
P(([y, N, Q, lt, , tt]) => y && !N && Q.height !== 0 && lt.height !== 0 && !tt)
|
|
2817
2838
|
),
|
|
2818
2839
|
([, , , , y]) => {
|
|
2819
|
-
|
|
2820
|
-
|
|
2840
|
+
G(ut, !0), $e(1, () => {
|
|
2841
|
+
G(V, y);
|
|
2821
2842
|
}), bt(x(a), () => {
|
|
2822
|
-
|
|
2843
|
+
G(e, [0, 0]), G(ft, !0);
|
|
2823
2844
|
});
|
|
2824
2845
|
}
|
|
2825
2846
|
), O(
|
|
@@ -2831,21 +2852,21 @@ const kr = /* @__PURE__ */ U(
|
|
|
2831
2852
|
b
|
|
2832
2853
|
), K(
|
|
2833
2854
|
x(
|
|
2834
|
-
|
|
2855
|
+
w,
|
|
2835
2856
|
_(it),
|
|
2836
2857
|
P(([, y]) => y != null)
|
|
2837
2858
|
),
|
|
2838
2859
|
([, y]) => {
|
|
2839
|
-
y && (
|
|
2840
|
-
|
|
2841
|
-
}),
|
|
2860
|
+
y && (G(F, y.viewport), G(L, y.item), G(B, y.gap), y.scrollTop > 0 && (G(dt, !0), bt(x(a, jt(1)), (N) => {
|
|
2861
|
+
G(dt, !1);
|
|
2862
|
+
}), G(c, { top: y.scrollTop })));
|
|
2842
2863
|
}
|
|
2843
2864
|
), O(
|
|
2844
2865
|
x(
|
|
2845
2866
|
F,
|
|
2846
2867
|
E(({ height: y }) => y)
|
|
2847
2868
|
),
|
|
2848
|
-
|
|
2869
|
+
S
|
|
2849
2870
|
), O(
|
|
2850
2871
|
x(
|
|
2851
2872
|
rt(
|
|
@@ -2861,13 +2882,13 @@ const kr = /* @__PURE__ */ U(
|
|
|
2861
2882
|
viewport: y
|
|
2862
2883
|
}))
|
|
2863
2884
|
),
|
|
2864
|
-
|
|
2885
|
+
Y
|
|
2865
2886
|
), O(
|
|
2866
2887
|
x(
|
|
2867
2888
|
rt(
|
|
2868
|
-
A(
|
|
2889
|
+
A(f),
|
|
2869
2890
|
o,
|
|
2870
|
-
A(B,
|
|
2891
|
+
A(B, kr),
|
|
2871
2892
|
A(L, he),
|
|
2872
2893
|
A(F, he),
|
|
2873
2894
|
A(nt),
|
|
@@ -2885,23 +2906,23 @@ const kr = /* @__PURE__ */ U(
|
|
|
2885
2906
|
tt,
|
|
2886
2907
|
kt,
|
|
2887
2908
|
Jt,
|
|
2888
|
-
|
|
2909
|
+
$t,
|
|
2889
2910
|
,
|
|
2890
2911
|
de,
|
|
2891
2912
|
Ft
|
|
2892
2913
|
]) => {
|
|
2893
|
-
const { column: Ot, row: Qt } = lt, { height: fe, width: He } = tt, { width:
|
|
2894
|
-
if (
|
|
2895
|
-
return
|
|
2914
|
+
const { column: Ot, row: Qt } = lt, { height: fe, width: He } = tt, { width: en } = kt;
|
|
2915
|
+
if ($t === 0 && (y === 0 || en === 0))
|
|
2916
|
+
return yn;
|
|
2896
2917
|
if (He === 0) {
|
|
2897
|
-
const
|
|
2898
|
-
return
|
|
2918
|
+
const ln = Ue(Ft, y), io = ln + Math.max($t - 1, 0);
|
|
2919
|
+
return Br(Hn(ln, io, Jt));
|
|
2899
2920
|
}
|
|
2900
|
-
const me =
|
|
2901
|
-
let
|
|
2902
|
-
de ? N === 0 && Q === 0 &&
|
|
2903
|
-
const
|
|
2904
|
-
return { bottom:
|
|
2921
|
+
const me = oo(en, He, Ot);
|
|
2922
|
+
let Ut, Wt;
|
|
2923
|
+
de ? N === 0 && Q === 0 && $t > 0 ? (Ut = 0, Wt = $t - 1) : (Ut = me * Ce((N + Qt) / (fe + Qt)), Wt = me * Rn((Q + Qt) / (fe + Qt)) - 1, Wt = Oe(y - 1, ee(Wt, me - 1)), Ut = Oe(Wt, ee(0, Ut))) : (Ut = 0, Wt = -1);
|
|
2924
|
+
const nn = Hn(Ut, Wt, Jt), { bottom: on, top: rn } = En(kt, lt, tt, nn), sn = Rn(y / me), so = sn * fe + (sn - 1) * Qt - on;
|
|
2925
|
+
return { bottom: on, itemHeight: fe, items: nn, itemWidth: He, offsetBottom: so, offsetTop: rn, top: rn };
|
|
2905
2926
|
}
|
|
2906
2927
|
)
|
|
2907
2928
|
),
|
|
@@ -2912,20 +2933,20 @@ const kr = /* @__PURE__ */ U(
|
|
|
2912
2933
|
P((y) => y !== null),
|
|
2913
2934
|
E((y) => y.length)
|
|
2914
2935
|
),
|
|
2915
|
-
|
|
2936
|
+
f
|
|
2916
2937
|
), O(
|
|
2917
2938
|
x(
|
|
2918
2939
|
rt(F, L, k, B),
|
|
2919
2940
|
P(([y, N, { items: Q }]) => Q.length > 0 && N.height !== 0 && y.height !== 0),
|
|
2920
2941
|
E(([y, N, { items: Q }, lt]) => {
|
|
2921
|
-
const { bottom: tt, top: kt } =
|
|
2942
|
+
const { bottom: tt, top: kt } = En(y, lt, N, Q);
|
|
2922
2943
|
return [kt, tt];
|
|
2923
2944
|
}),
|
|
2924
|
-
|
|
2945
|
+
Z(se)
|
|
2925
2946
|
),
|
|
2926
2947
|
e
|
|
2927
2948
|
);
|
|
2928
|
-
const xt =
|
|
2949
|
+
const xt = C(!1);
|
|
2929
2950
|
O(
|
|
2930
2951
|
x(
|
|
2931
2952
|
a,
|
|
@@ -2936,7 +2957,7 @@ const kr = /* @__PURE__ */ U(
|
|
|
2936
2957
|
);
|
|
2937
2958
|
const Xt = ht(
|
|
2938
2959
|
x(
|
|
2939
|
-
rt(k,
|
|
2960
|
+
rt(k, f),
|
|
2940
2961
|
P(([{ items: y }]) => y.length > 0),
|
|
2941
2962
|
_(xt),
|
|
2942
2963
|
P(([[y, N], Q]) => {
|
|
@@ -2944,14 +2965,14 @@ const kr = /* @__PURE__ */ U(
|
|
|
2944
2965
|
return (Q || y.bottom > 0 && y.itemHeight > 0 && y.offsetBottom === 0 && y.items.length === N) && tt;
|
|
2945
2966
|
}),
|
|
2946
2967
|
E(([[, y]]) => y - 1),
|
|
2947
|
-
|
|
2968
|
+
Z()
|
|
2948
2969
|
)
|
|
2949
2970
|
), Mt = ht(
|
|
2950
2971
|
x(
|
|
2951
2972
|
A(k),
|
|
2952
2973
|
P(({ items: y }) => y.length > 0 && y[0].index === 0),
|
|
2953
2974
|
yt(0),
|
|
2954
|
-
|
|
2975
|
+
Z()
|
|
2955
2976
|
)
|
|
2956
2977
|
), vt = ht(
|
|
2957
2978
|
x(
|
|
@@ -2962,20 +2983,20 @@ const kr = /* @__PURE__ */ U(
|
|
|
2962
2983
|
endIndex: y[y.length - 1].index,
|
|
2963
2984
|
startIndex: y[0].index
|
|
2964
2985
|
})),
|
|
2965
|
-
|
|
2986
|
+
Z(Mn),
|
|
2966
2987
|
Lt(0)
|
|
2967
2988
|
)
|
|
2968
2989
|
);
|
|
2969
|
-
O(vt,
|
|
2990
|
+
O(vt, h.scrollSeekRangeChanged), O(
|
|
2970
2991
|
x(
|
|
2971
2992
|
V,
|
|
2972
|
-
_(F, L,
|
|
2993
|
+
_(F, L, f, B),
|
|
2973
2994
|
E(([y, N, Q, lt, tt]) => {
|
|
2974
|
-
const kt =
|
|
2995
|
+
const kt = Dn(y), { align: Jt, behavior: $t, offset: de } = kt;
|
|
2975
2996
|
let Ft = kt.index;
|
|
2976
2997
|
Ft === "LAST" && (Ft = lt - 1), Ft = ee(0, Ft, Oe(lt - 1, Ft));
|
|
2977
2998
|
let Ot = Ae(N, tt, Q, Ft);
|
|
2978
|
-
return Jt === "end" ? Ot =
|
|
2999
|
+
return Jt === "end" ? Ot = bn(Ot - N.height + Q.height) : Jt === "center" && (Ot = bn(Ot - N.height / 2 + Q.height / 2)), de && (Ot += de), { behavior: $t, top: Ot };
|
|
2979
3000
|
})
|
|
2980
3001
|
),
|
|
2981
3002
|
c
|
|
@@ -2994,7 +3015,7 @@ const kr = /* @__PURE__ */ U(
|
|
|
2994
3015
|
),
|
|
2995
3016
|
F
|
|
2996
3017
|
), {
|
|
2997
|
-
customScrollParent:
|
|
3018
|
+
customScrollParent: m,
|
|
2998
3019
|
// input
|
|
2999
3020
|
data: nt,
|
|
3000
3021
|
deviation: J,
|
|
@@ -3013,34 +3034,34 @@ const kr = /* @__PURE__ */ U(
|
|
|
3013
3034
|
scrollToIndex: V,
|
|
3014
3035
|
scrollTop: a,
|
|
3015
3036
|
smoothScrollTargetReached: p,
|
|
3016
|
-
totalCount:
|
|
3017
|
-
useWindowScroll:
|
|
3037
|
+
totalCount: f,
|
|
3038
|
+
useWindowScroll: d,
|
|
3018
3039
|
viewportDimensions: F,
|
|
3019
3040
|
windowScrollContainerState: u,
|
|
3020
3041
|
windowScrollTo: T,
|
|
3021
3042
|
windowViewportRect: R,
|
|
3022
|
-
...
|
|
3043
|
+
...h,
|
|
3023
3044
|
// output
|
|
3024
3045
|
gridState: k,
|
|
3025
3046
|
horizontalDirection: At,
|
|
3026
3047
|
initialTopMostItemIndex: St,
|
|
3027
3048
|
totalListHeight: Bt,
|
|
3028
|
-
...
|
|
3049
|
+
...g,
|
|
3029
3050
|
endReached: Xt,
|
|
3030
|
-
propsReady:
|
|
3051
|
+
propsReady: v,
|
|
3031
3052
|
rangeChanged: vt,
|
|
3032
3053
|
startReached: Mt,
|
|
3033
|
-
stateChanged:
|
|
3054
|
+
stateChanged: Y,
|
|
3034
3055
|
stateRestoreInProgress: dt,
|
|
3035
|
-
...
|
|
3056
|
+
...I
|
|
3036
3057
|
};
|
|
3037
3058
|
},
|
|
3038
|
-
X(Ke, at, ae,
|
|
3059
|
+
X(Ke, at, ae, jn, Pt, je, Vt)
|
|
3039
3060
|
);
|
|
3040
|
-
function
|
|
3061
|
+
function oo(t, e, n) {
|
|
3041
3062
|
return ee(1, Ce((t + n) / (Ce(e) + n)));
|
|
3042
3063
|
}
|
|
3043
|
-
function
|
|
3064
|
+
function En(t, e, n, o) {
|
|
3044
3065
|
const { height: r } = n;
|
|
3045
3066
|
if (r === void 0 || o.length === 0)
|
|
3046
3067
|
return { bottom: 0, top: 0 };
|
|
@@ -3048,18 +3069,18 @@ function bn(t, e, n, o) {
|
|
|
3048
3069
|
return { bottom: Ae(t, e, n, o[o.length - 1].index) + r, top: s };
|
|
3049
3070
|
}
|
|
3050
3071
|
function Ae(t, e, n, o) {
|
|
3051
|
-
const r =
|
|
3072
|
+
const r = oo(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + ee(0, s - 1) * e.row;
|
|
3052
3073
|
return i > 0 ? i + e.row : i;
|
|
3053
3074
|
}
|
|
3054
|
-
const
|
|
3055
|
-
const t =
|
|
3075
|
+
const Or = /* @__PURE__ */ U(() => {
|
|
3076
|
+
const t = C((S) => `Item ${S}`), e = C({}), n = C(null), o = C("virtuoso-grid-item"), r = C("virtuoso-grid-list"), s = C(Ze), i = C("div"), l = C(Yt), c = (S, g = null) => ct(
|
|
3056
3077
|
x(
|
|
3057
3078
|
e,
|
|
3058
|
-
E((
|
|
3059
|
-
|
|
3079
|
+
E((h) => h[S]),
|
|
3080
|
+
Z()
|
|
3060
3081
|
),
|
|
3061
|
-
|
|
3062
|
-
), a =
|
|
3082
|
+
g
|
|
3083
|
+
), a = C(!1), p = C(!1);
|
|
3063
3084
|
return O(A(p), a), {
|
|
3064
3085
|
components: e,
|
|
3065
3086
|
computeItemKey: s,
|
|
@@ -3078,65 +3099,65 @@ const Fr = /* @__PURE__ */ U(() => {
|
|
|
3078
3099
|
scrollerRef: l,
|
|
3079
3100
|
ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
|
|
3080
3101
|
};
|
|
3081
|
-
}),
|
|
3102
|
+
}), Lr = /* @__PURE__ */ U(
|
|
3082
3103
|
([t, e]) => ({ ...t, ...e }),
|
|
3083
|
-
X(
|
|
3084
|
-
),
|
|
3085
|
-
const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = It("scrollHeight"), c = et("ItemComponent"), a = et("ListComponent"), p = et("ScrollSeekPlaceholder"),
|
|
3104
|
+
X(Fr, Or)
|
|
3105
|
+
), zr = /* @__PURE__ */ H.memo(function() {
|
|
3106
|
+
const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = It("scrollHeight"), c = et("ItemComponent"), a = et("ListComponent"), p = et("ScrollSeekPlaceholder"), S = et("context"), g = It("itemDimensions"), h = It("gap"), w = et("log"), v = et("stateRestoreInProgress"), m = It("reportReadyState"), d = Ht(
|
|
3086
3107
|
H.useMemo(
|
|
3087
3108
|
() => (u) => {
|
|
3088
3109
|
const T = u.parentElement.parentElement.scrollHeight;
|
|
3089
3110
|
l(T);
|
|
3090
3111
|
const R = u.firstChild;
|
|
3091
3112
|
if (R) {
|
|
3092
|
-
const { height:
|
|
3093
|
-
|
|
3113
|
+
const { height: I, width: f } = R.getBoundingClientRect();
|
|
3114
|
+
g({ height: I, width: f });
|
|
3094
3115
|
}
|
|
3095
|
-
|
|
3096
|
-
column:
|
|
3097
|
-
row:
|
|
3116
|
+
h({
|
|
3117
|
+
column: Bn("column-gap", getComputedStyle(u).columnGap, w),
|
|
3118
|
+
row: Bn("row-gap", getComputedStyle(u).rowGap, w)
|
|
3098
3119
|
});
|
|
3099
3120
|
},
|
|
3100
|
-
[l,
|
|
3121
|
+
[l, g, h, w]
|
|
3101
3122
|
),
|
|
3102
3123
|
!0,
|
|
3103
3124
|
!1
|
|
3104
3125
|
);
|
|
3105
|
-
return
|
|
3106
|
-
e.itemHeight > 0 && e.itemWidth > 0 &&
|
|
3107
|
-
}, [e]),
|
|
3126
|
+
return Xn(() => {
|
|
3127
|
+
e.itemHeight > 0 && e.itemWidth > 0 && m(!0);
|
|
3128
|
+
}, [e]), v ? null : /* @__PURE__ */ z(
|
|
3108
3129
|
a,
|
|
3109
3130
|
{
|
|
3110
3131
|
className: n,
|
|
3111
|
-
ref:
|
|
3112
|
-
...
|
|
3132
|
+
ref: d,
|
|
3133
|
+
...q(a, S),
|
|
3113
3134
|
"data-testid": "virtuoso-item-list",
|
|
3114
3135
|
style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
|
|
3115
3136
|
children: e.items.map((u) => {
|
|
3116
|
-
const T = s(u.index, u.data,
|
|
3137
|
+
const T = s(u.index, u.data, S);
|
|
3117
3138
|
return i ? /* @__PURE__ */ z(
|
|
3118
3139
|
p,
|
|
3119
3140
|
{
|
|
3120
|
-
...
|
|
3141
|
+
...q(p, S),
|
|
3121
3142
|
height: e.itemHeight,
|
|
3122
3143
|
index: u.index,
|
|
3123
3144
|
width: e.itemWidth
|
|
3124
3145
|
},
|
|
3125
3146
|
T
|
|
3126
|
-
) : /* @__PURE__ */
|
|
3147
|
+
) : /* @__PURE__ */ _t(
|
|
3127
3148
|
c,
|
|
3128
3149
|
{
|
|
3129
|
-
...
|
|
3150
|
+
...q(c, S),
|
|
3130
3151
|
className: o,
|
|
3131
3152
|
"data-index": u.index,
|
|
3132
3153
|
key: T
|
|
3133
3154
|
},
|
|
3134
|
-
r(u.index, u.data,
|
|
3155
|
+
r(u.index, u.data, S)
|
|
3135
3156
|
);
|
|
3136
3157
|
})
|
|
3137
3158
|
}
|
|
3138
3159
|
);
|
|
3139
|
-
}),
|
|
3160
|
+
}), Vr = H.memo(function() {
|
|
3140
3161
|
const e = et("HeaderComponent"), n = It("headerHeight"), o = et("headerFooterTag"), r = Ht(
|
|
3141
3162
|
H.useMemo(
|
|
3142
3163
|
() => (i) => {
|
|
@@ -3147,8 +3168,8 @@ const Fr = /* @__PURE__ */ U(() => {
|
|
|
3147
3168
|
!0,
|
|
3148
3169
|
!1
|
|
3149
3170
|
), s = et("context");
|
|
3150
|
-
return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...
|
|
3151
|
-
}),
|
|
3171
|
+
return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...q(e, s) }) }) : null;
|
|
3172
|
+
}), Pr = H.memo(function() {
|
|
3152
3173
|
const e = et("FooterComponent"), n = It("footerHeight"), o = et("headerFooterTag"), r = Ht(
|
|
3153
3174
|
H.useMemo(
|
|
3154
3175
|
() => (i) => {
|
|
@@ -3159,9 +3180,9 @@ const Fr = /* @__PURE__ */ U(() => {
|
|
|
3159
3180
|
!0,
|
|
3160
3181
|
!1
|
|
3161
3182
|
), s = et("context");
|
|
3162
|
-
return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...
|
|
3163
|
-
}),
|
|
3164
|
-
const e = H.useContext(
|
|
3183
|
+
return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...q(e, s) }) }) : null;
|
|
3184
|
+
}), Ar = ({ children: t }) => {
|
|
3185
|
+
const e = H.useContext(Zn), n = It("itemDimensions"), o = It("viewportDimensions"), r = Ht(
|
|
3165
3186
|
H.useMemo(
|
|
3166
3187
|
() => (s) => {
|
|
3167
3188
|
o(s.getBoundingClientRect());
|
|
@@ -3174,25 +3195,25 @@ const Fr = /* @__PURE__ */ U(() => {
|
|
|
3174
3195
|
return H.useEffect(() => {
|
|
3175
3196
|
e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
|
|
3176
3197
|
}, [e, o, n]), /* @__PURE__ */ z("div", { ref: r, style: Zt(!1), children: t });
|
|
3177
|
-
},
|
|
3178
|
-
const e = H.useContext(
|
|
3198
|
+
}, Mr = ({ children: t }) => {
|
|
3199
|
+
const e = H.useContext(Zn), n = It("windowViewportRect"), o = It("itemDimensions"), r = et("customScrollParent"), s = _e(n, r, !1);
|
|
3179
3200
|
return H.useEffect(() => {
|
|
3180
3201
|
e && (o({ height: e.itemHeight, width: e.itemWidth }), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
|
|
3181
3202
|
}, [e, n, o]), /* @__PURE__ */ z("div", { ref: s, style: Zt(!1), children: t });
|
|
3182
|
-
},
|
|
3183
|
-
const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ?
|
|
3184
|
-
return /* @__PURE__ */ z(r, { ...e, ...
|
|
3203
|
+
}, Wr = /* @__PURE__ */ H.memo(function({ ...e }) {
|
|
3204
|
+
const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Nr : _r, s = o || n ? Mr : Ar, i = et("context");
|
|
3205
|
+
return /* @__PURE__ */ z(r, { ...e, ...q(r, i), children: /* @__PURE__ */ Nt(s, { children: [
|
|
3206
|
+
/* @__PURE__ */ z(Vr, {}),
|
|
3185
3207
|
/* @__PURE__ */ z(zr, {}),
|
|
3186
|
-
/* @__PURE__ */ z(
|
|
3187
|
-
/* @__PURE__ */ z(Vr, {})
|
|
3208
|
+
/* @__PURE__ */ z(Pr, {})
|
|
3188
3209
|
] }) });
|
|
3189
3210
|
}), {
|
|
3190
|
-
Component:
|
|
3191
|
-
useEmitter:
|
|
3211
|
+
Component: Gr,
|
|
3212
|
+
useEmitter: ro,
|
|
3192
3213
|
useEmitterValue: et,
|
|
3193
3214
|
usePublisher: It
|
|
3194
3215
|
} = /* @__PURE__ */ qe(
|
|
3195
|
-
|
|
3216
|
+
Lr,
|
|
3196
3217
|
{
|
|
3197
3218
|
optional: {
|
|
3198
3219
|
context: "context",
|
|
@@ -3231,18 +3252,19 @@ const Fr = /* @__PURE__ */ U(() => {
|
|
|
3231
3252
|
readyStateChanged: "readyStateChanged"
|
|
3232
3253
|
}
|
|
3233
3254
|
},
|
|
3234
|
-
|
|
3235
|
-
),
|
|
3236
|
-
function
|
|
3255
|
+
Wr
|
|
3256
|
+
), _r = /* @__PURE__ */ Xe({ useEmitter: ro, useEmitterValue: et, usePublisher: It }), Nr = /* @__PURE__ */ Je({ useEmitter: ro, useEmitterValue: et, usePublisher: It });
|
|
3257
|
+
function Bn(t, e, n) {
|
|
3237
3258
|
return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, mt.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
|
|
3238
3259
|
}
|
|
3239
|
-
const
|
|
3260
|
+
const Xr = Gr;
|
|
3240
3261
|
export {
|
|
3241
|
-
|
|
3262
|
+
Zr as GroupedTableVirtuoso,
|
|
3263
|
+
qr as GroupedVirtuoso,
|
|
3242
3264
|
mt as LogLevel,
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3265
|
+
Yr as TableVirtuoso,
|
|
3266
|
+
jr as Virtuoso,
|
|
3267
|
+
Xr as VirtuosoGrid,
|
|
3268
|
+
Zn as VirtuosoGridMockContext,
|
|
3247
3269
|
be as VirtuosoMockContext
|
|
3248
3270
|
};
|