react-virtuoso 4.13.0 → 4.14.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 +10 -0
- package/dist/index.mjs +1116 -1070
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as P, jsxs as Nt, Fragment as uo } from "react/jsx-runtime";
|
|
2
2
|
import H, { createElement as _t } from "react";
|
|
3
|
-
import
|
|
3
|
+
import ao from "react-dom";
|
|
4
4
|
const we = 0, zt = 1, qt = 2, kn = 4;
|
|
5
|
-
function
|
|
5
|
+
function un(t) {
|
|
6
6
|
return () => t;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function fo(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 an(t, e) {
|
|
15
15
|
return () => t(e);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function mo(t, e) {
|
|
18
18
|
return (n) => t(e, n);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function We(t) {
|
|
21
21
|
return t !== void 0;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function po(...t) {
|
|
24
24
|
return () => {
|
|
25
|
-
t.map(
|
|
25
|
+
t.map(fo);
|
|
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 ho(t, e) {
|
|
34
34
|
return e(t);
|
|
35
35
|
}
|
|
36
36
|
function X(...t) {
|
|
@@ -42,22 +42,22 @@ function K(t, e) {
|
|
|
42
42
|
function G(t, e) {
|
|
43
43
|
t(we, e);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Ge(t) {
|
|
46
46
|
t(qt);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function ot(t) {
|
|
49
49
|
return t(kn);
|
|
50
50
|
}
|
|
51
51
|
function O(t, e) {
|
|
52
|
-
return K(t,
|
|
52
|
+
return K(t, mo(e, we));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Tt(t, e) {
|
|
55
55
|
const n = t(zt, (o) => {
|
|
56
56
|
n(), e(o);
|
|
57
57
|
});
|
|
58
58
|
return n;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function dn(t) {
|
|
61
61
|
let e, n;
|
|
62
62
|
return (o) => (r) => {
|
|
63
63
|
e = r, n && clearTimeout(n), n = setTimeout(() => {
|
|
@@ -74,7 +74,7 @@ function Z(t = Fn) {
|
|
|
74
74
|
t(e, o) || (e = o, n(o));
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function A(t) {
|
|
78
78
|
return (e) => (n) => {
|
|
79
79
|
t(n) && e(n);
|
|
80
80
|
};
|
|
@@ -82,34 +82,34 @@ function P(t) {
|
|
|
82
82
|
function E(t) {
|
|
83
83
|
return (e) => ne(e, t);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Rt(t) {
|
|
86
86
|
return (e) => () => {
|
|
87
87
|
e(t);
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
function x(t, ...e) {
|
|
91
|
-
const n =
|
|
91
|
+
const n = go(...e);
|
|
92
92
|
return (o, r) => {
|
|
93
93
|
switch (o) {
|
|
94
94
|
case qt:
|
|
95
|
-
|
|
95
|
+
Ge(t);
|
|
96
96
|
return;
|
|
97
97
|
case zt:
|
|
98
98
|
return K(t, n(r));
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function bt(t, e) {
|
|
103
103
|
return (n) => (o) => {
|
|
104
104
|
n(e = t(e, o));
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Dt(t) {
|
|
108
108
|
return (e) => (n) => {
|
|
109
109
|
t > 0 ? t-- : e(n);
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function kt(t) {
|
|
113
113
|
let e = null, n;
|
|
114
114
|
return (o) => (r) => {
|
|
115
115
|
e = r, !n && (n = setTimeout(() => {
|
|
@@ -117,7 +117,7 @@ function Lt(t) {
|
|
|
117
117
|
}, t));
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function N(...t) {
|
|
121
121
|
const e = new Array(t.length);
|
|
122
122
|
let n = 0, o = null;
|
|
123
123
|
const r = Math.pow(2, t.length) - 1;
|
|
@@ -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 go(...t) {
|
|
138
|
+
return (e) => t.reduceRight(ho, e);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function Io(t) {
|
|
141
141
|
let e, n;
|
|
142
142
|
const o = () => e == null ? void 0 : e();
|
|
143
143
|
return function(r, s) {
|
|
@@ -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: So(),
|
|
202
202
|
singleton: n
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
const
|
|
206
|
-
function
|
|
205
|
+
const So = () => Symbol();
|
|
206
|
+
function xo(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);
|
|
@@ -224,7 +224,7 @@ function rt(...t) {
|
|
|
224
224
|
}), function(s, i) {
|
|
225
225
|
switch (s) {
|
|
226
226
|
case qt: {
|
|
227
|
-
|
|
227
|
+
Ge(e);
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
230
|
case zt:
|
|
@@ -232,26 +232,26 @@ function rt(...t) {
|
|
|
232
232
|
}
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function V(t, e = Fn) {
|
|
236
236
|
return x(t, Z(e));
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function Le(...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 po(...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 To = {
|
|
250
250
|
0: "debug",
|
|
251
251
|
3: "error",
|
|
252
252
|
1: "log",
|
|
253
253
|
2: "warn"
|
|
254
|
-
},
|
|
254
|
+
}, Co = () => typeof globalThis > "u" ? window : globalThis, Vt = U(
|
|
255
255
|
() => {
|
|
256
256
|
const t = C(
|
|
257
257
|
3
|
|
@@ -260,8 +260,8 @@ const So = {
|
|
|
260
260
|
return {
|
|
261
261
|
log: C((n, o, r = 1) => {
|
|
262
262
|
var i;
|
|
263
|
-
const s = (i =
|
|
264
|
-
r >= s && console[
|
|
263
|
+
const s = (i = Co().VIRTUOSO_LOG_LEVEL) != null ? i : ot(t);
|
|
264
|
+
r >= s && console[To[r]](
|
|
265
265
|
"%creact-virtuoso: %c%s %o",
|
|
266
266
|
"color: #0253b3; font-weight: bold",
|
|
267
267
|
"color: initial",
|
|
@@ -276,9 +276,9 @@ const So = {
|
|
|
276
276
|
{ singleton: !0 }
|
|
277
277
|
);
|
|
278
278
|
function Ht(t, e, n) {
|
|
279
|
-
return
|
|
279
|
+
return _e(t, e, n).callbackRef;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function _e(t, e, n) {
|
|
282
282
|
const o = H.useRef(null);
|
|
283
283
|
let r = (i) => {
|
|
284
284
|
};
|
|
@@ -295,28 +295,28 @@ function Ge(t, e, n) {
|
|
|
295
295
|
}
|
|
296
296
|
function On(t, e, n, o, r, s, i, l, c) {
|
|
297
297
|
const a = H.useCallback(
|
|
298
|
-
(
|
|
299
|
-
const S =
|
|
300
|
-
let g =
|
|
298
|
+
(m) => {
|
|
299
|
+
const S = wo(m.children, e, l ? "offsetWidth" : "offsetHeight", r);
|
|
300
|
+
let g = m.parentElement;
|
|
301
301
|
for (; !g.dataset.virtuosoScroller; )
|
|
302
302
|
g = g.parentElement;
|
|
303
|
-
const
|
|
303
|
+
const I = g.lastElementChild.dataset.viewportType === "window";
|
|
304
304
|
let w;
|
|
305
|
-
|
|
306
|
-
const v = i ? l ? i.scrollLeft : i.scrollTop :
|
|
305
|
+
I && (w = g.ownerDocument.defaultView);
|
|
306
|
+
const v = i ? l ? i.scrollLeft : i.scrollTop : I ? l ? w.scrollX || w.document.documentElement.scrollLeft : w.scrollY || w.document.documentElement.scrollTop : l ? g.scrollLeft : g.scrollTop, h = i ? l ? i.scrollWidth : i.scrollHeight : I ? l ? w.document.documentElement.scrollWidth : w.document.documentElement.scrollHeight : l ? g.scrollWidth : g.scrollHeight, p = i ? l ? i.offsetWidth : i.offsetHeight : I ? l ? w.innerWidth : w.innerHeight : l ? g.offsetWidth : g.offsetHeight;
|
|
307
307
|
o({
|
|
308
|
-
scrollHeight:
|
|
308
|
+
scrollHeight: h,
|
|
309
309
|
scrollTop: Math.max(v, 0),
|
|
310
|
-
viewportHeight:
|
|
310
|
+
viewportHeight: p
|
|
311
311
|
}), s == null || s(
|
|
312
|
-
l ? fn("column-gap", getComputedStyle(
|
|
312
|
+
l ? fn("column-gap", getComputedStyle(m).columnGap, r) : fn("row-gap", getComputedStyle(m).rowGap, r)
|
|
313
313
|
), S !== null && t(S);
|
|
314
314
|
},
|
|
315
315
|
[t, e, r, s, i, o, l]
|
|
316
316
|
);
|
|
317
|
-
return
|
|
317
|
+
return _e(a, n, c);
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function wo(t, e, n, o) {
|
|
320
320
|
const r = t.length;
|
|
321
321
|
if (r === 0)
|
|
322
322
|
return null;
|
|
@@ -325,40 +325,40 @@ function To(t, e, n, o) {
|
|
|
325
325
|
const l = t.item(i);
|
|
326
326
|
if (l.dataset.index === void 0)
|
|
327
327
|
continue;
|
|
328
|
-
const c = parseInt(l.dataset.index), a = parseFloat(l.dataset.knownSize),
|
|
329
|
-
if (
|
|
328
|
+
const c = parseInt(l.dataset.index), a = parseFloat(l.dataset.knownSize), m = e(l, n);
|
|
329
|
+
if (m === 0 && o("Zero-sized element, this should not happen", { child: l }, mt.ERROR), m === a)
|
|
330
330
|
continue;
|
|
331
331
|
const S = s[s.length - 1];
|
|
332
|
-
s.length === 0 || S.size !==
|
|
332
|
+
s.length === 0 || S.size !== m || S.endIndex !== c - 1 ? s.push({ endIndex: c, size: m, startIndex: c }) : s[s.length - 1].endIndex++;
|
|
333
333
|
}
|
|
334
334
|
return s;
|
|
335
335
|
}
|
|
336
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
|
-
function
|
|
339
|
+
function Ne(t, e, n) {
|
|
340
340
|
const o = H.useRef(null), r = H.useCallback(
|
|
341
341
|
(c) => {
|
|
342
342
|
if (!(c != null && c.offsetParent))
|
|
343
343
|
return;
|
|
344
|
-
const a = c.getBoundingClientRect(),
|
|
344
|
+
const a = c.getBoundingClientRect(), m = a.width;
|
|
345
345
|
let S, g;
|
|
346
346
|
if (e) {
|
|
347
|
-
const
|
|
348
|
-
g =
|
|
347
|
+
const I = e.getBoundingClientRect(), w = a.top - I.top;
|
|
348
|
+
g = I.height - Math.max(0, w), S = w + e.scrollTop;
|
|
349
349
|
} else {
|
|
350
|
-
const
|
|
351
|
-
g =
|
|
350
|
+
const I = i.current.ownerDocument.defaultView;
|
|
351
|
+
g = I.innerHeight - Math.max(0, a.top), S = a.top + I.scrollY;
|
|
352
352
|
}
|
|
353
353
|
o.current = {
|
|
354
354
|
offsetTop: S,
|
|
355
355
|
visibleHeight: g,
|
|
356
|
-
visibleWidth:
|
|
356
|
+
visibleWidth: m
|
|
357
357
|
}, t(o.current);
|
|
358
358
|
},
|
|
359
359
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
360
360
|
[t, e]
|
|
361
|
-
), { callbackRef: s, ref: i } =
|
|
361
|
+
), { callbackRef: s, ref: i } = _e(r, !0, n), l = H.useCallback(() => {
|
|
362
362
|
r(i.current);
|
|
363
363
|
}, [r, i]);
|
|
364
364
|
return H.useEffect(() => {
|
|
@@ -381,31 +381,31 @@ function _e(t, e, n) {
|
|
|
381
381
|
}
|
|
382
382
|
const at = U(
|
|
383
383
|
() => {
|
|
384
|
-
const t = $(), e = $(), n = C(0), o = $(), r = C(0), s = $(), i = $(), l = C(0), c = C(0), a = C(0),
|
|
384
|
+
const t = $(), e = $(), n = C(0), o = $(), r = C(0), s = $(), i = $(), l = C(0), c = C(0), a = C(0), m = C(0), S = $(), g = $(), I = C(!1), w = C(!1), v = C(!1);
|
|
385
385
|
return O(
|
|
386
386
|
x(
|
|
387
387
|
t,
|
|
388
|
-
E(({ scrollTop:
|
|
388
|
+
E(({ scrollTop: h }) => h)
|
|
389
389
|
),
|
|
390
390
|
e
|
|
391
391
|
), O(
|
|
392
392
|
x(
|
|
393
393
|
t,
|
|
394
|
-
E(({ scrollHeight:
|
|
394
|
+
E(({ scrollHeight: h }) => h)
|
|
395
395
|
),
|
|
396
396
|
i
|
|
397
397
|
), O(e, r), {
|
|
398
398
|
deviation: n,
|
|
399
399
|
fixedFooterHeight: a,
|
|
400
400
|
fixedHeaderHeight: c,
|
|
401
|
-
footerHeight:
|
|
401
|
+
footerHeight: m,
|
|
402
402
|
headerHeight: l,
|
|
403
403
|
horizontalDirection: w,
|
|
404
404
|
scrollBy: g,
|
|
405
405
|
// input
|
|
406
406
|
scrollContainerState: t,
|
|
407
407
|
scrollHeight: i,
|
|
408
|
-
scrollingInProgress:
|
|
408
|
+
scrollingInProgress: I,
|
|
409
409
|
// signals
|
|
410
410
|
scrollTo: S,
|
|
411
411
|
scrollTop: e,
|
|
@@ -438,30 +438,30 @@ function re(t, e) {
|
|
|
438
438
|
if (!j(t))
|
|
439
439
|
return e === t.k ? t.v : e < t.k ? re(t.l, e) : re(t.r, e);
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function wt(t, e, n = "k") {
|
|
442
442
|
if (j(t))
|
|
443
443
|
return [-1 / 0, void 0];
|
|
444
444
|
if (Number(t[n]) === e)
|
|
445
445
|
return [t.k, t.v];
|
|
446
446
|
if (Number(t[n]) < e) {
|
|
447
|
-
const o =
|
|
447
|
+
const o = wt(t.r, e, n);
|
|
448
448
|
return o[0] === -1 / 0 ? [t.k, t.v] : o;
|
|
449
449
|
}
|
|
450
|
-
return
|
|
450
|
+
return wt(t.l, e, n);
|
|
451
451
|
}
|
|
452
452
|
function pt(t, e, n) {
|
|
453
|
-
return j(t) ? Pn(e, n, 1) : e === t.k ?
|
|
453
|
+
return j(t) ? Pn(e, n, 1) : e === t.k ? st(t, { k: e, v: n }) : e < t.k ? mn(st(t, { l: pt(t.l, e, n) })) : mn(st(t, { r: pt(t.r, e, n) }));
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function jt() {
|
|
456
456
|
return oe;
|
|
457
457
|
}
|
|
458
458
|
function ye(t, e, n) {
|
|
459
459
|
if (j(t))
|
|
460
460
|
return [];
|
|
461
|
-
const o =
|
|
462
|
-
return
|
|
461
|
+
const o = wt(t, e)[0];
|
|
462
|
+
return vo(Ve(t, o, n));
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function ze(t, e) {
|
|
465
465
|
if (j(t)) return oe;
|
|
466
466
|
const { k: n, l: o, r } = t;
|
|
467
467
|
if (e === n) {
|
|
@@ -471,19 +471,19 @@ function Le(t, e) {
|
|
|
471
471
|
return o;
|
|
472
472
|
{
|
|
473
473
|
const [s, i] = Vn(o);
|
|
474
|
-
return ge(
|
|
474
|
+
return ge(st(t, { k: s, l: zn(o), v: i }));
|
|
475
475
|
}
|
|
476
|
-
} else return e < n ? ge(
|
|
476
|
+
} else return e < n ? ge(st(t, { l: ze(o, e) })) : ge(st(t, { r: ze(r, e) }));
|
|
477
477
|
}
|
|
478
478
|
function Gt(t) {
|
|
479
479
|
return j(t) ? [] : [...Gt(t.l), { k: t.k, v: t.v }, ...Gt(t.r)];
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Ve(t, e, n) {
|
|
482
482
|
if (j(t))
|
|
483
483
|
return [];
|
|
484
484
|
const { k: o, l: r, r: s, v: i } = t;
|
|
485
485
|
let l = [];
|
|
486
|
-
return o > e && (l = l.concat(
|
|
486
|
+
return o > e && (l = l.concat(Ve(r, e, n))), o >= e && o <= n && l.push({ k: o, v: i }), o <= n && (l = l.concat(Ve(s, e, n))), l;
|
|
487
487
|
}
|
|
488
488
|
function ge(t) {
|
|
489
489
|
const { l: e, lvl: n, r: o } = t;
|
|
@@ -491,12 +491,12 @@ function ge(t) {
|
|
|
491
491
|
return t;
|
|
492
492
|
if (n > o.lvl + 1) {
|
|
493
493
|
if (Ee(e))
|
|
494
|
-
return An(
|
|
494
|
+
return An(st(t, { lvl: n - 1 }));
|
|
495
495
|
if (!j(e) && !j(e.r))
|
|
496
|
-
return
|
|
497
|
-
l:
|
|
496
|
+
return st(e.r, {
|
|
497
|
+
l: st(e, { r: e.r.l }),
|
|
498
498
|
lvl: n,
|
|
499
|
-
r:
|
|
499
|
+
r: st(t, {
|
|
500
500
|
l: e.r.r,
|
|
501
501
|
lvl: n - 1
|
|
502
502
|
})
|
|
@@ -504,22 +504,22 @@ function ge(t) {
|
|
|
504
504
|
throw new Error("Unexpected empty nodes");
|
|
505
505
|
} else {
|
|
506
506
|
if (Ee(t))
|
|
507
|
-
return
|
|
507
|
+
return Pe(st(t, { lvl: n - 1 }));
|
|
508
508
|
if (!j(o) && !j(o.l)) {
|
|
509
509
|
const r = o.l, s = Ee(r) ? o.lvl - 1 : o.lvl;
|
|
510
|
-
return
|
|
511
|
-
l:
|
|
510
|
+
return st(r, {
|
|
511
|
+
l: st(t, {
|
|
512
512
|
lvl: n - 1,
|
|
513
513
|
r: r.l
|
|
514
514
|
}),
|
|
515
515
|
lvl: r.lvl + 1,
|
|
516
|
-
r:
|
|
516
|
+
r: Pe(st(o, { l: r.r, lvl: s }))
|
|
517
517
|
});
|
|
518
518
|
} else
|
|
519
519
|
throw new Error("Unexpected empty nodes");
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function st(t, e) {
|
|
523
523
|
return Pn(
|
|
524
524
|
e.k !== void 0 ? e.k : t.k,
|
|
525
525
|
e.v !== void 0 ? e.v : t.v,
|
|
@@ -529,7 +529,7 @@ function ot(t, e) {
|
|
|
529
529
|
);
|
|
530
530
|
}
|
|
531
531
|
function zn(t) {
|
|
532
|
-
return j(t.r) ? t.l : ge(
|
|
532
|
+
return j(t.r) ? t.l : ge(st(t, { r: zn(t.r) }));
|
|
533
533
|
}
|
|
534
534
|
function Ee(t) {
|
|
535
535
|
return j(t) || t.lvl > t.r.lvl;
|
|
@@ -541,17 +541,17 @@ function Pn(t, e, n, o = oe, r = oe) {
|
|
|
541
541
|
return { k: t, l: o, lvl: n, r, v: e };
|
|
542
542
|
}
|
|
543
543
|
function mn(t) {
|
|
544
|
-
return
|
|
544
|
+
return Pe(An(t));
|
|
545
545
|
}
|
|
546
546
|
function An(t) {
|
|
547
547
|
const { l: e } = t;
|
|
548
|
-
return !j(e) && e.lvl === t.lvl ?
|
|
548
|
+
return !j(e) && e.lvl === t.lvl ? st(e, { r: st(t, { l: e.r }) }) : t;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function Pe(t) {
|
|
551
551
|
const { lvl: e, r: n } = t;
|
|
552
|
-
return !j(n) && !j(n.r) && n.lvl === e && n.r.lvl === e ?
|
|
552
|
+
return !j(n) && !j(n.r) && n.lvl === e && n.r.lvl === e ? st(n, { l: st(t, { r: n.l }), lvl: e + 1 }) : t;
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function vo(t) {
|
|
555
555
|
return Ln(t, ({ k: e, v: n }) => ({ index: e, value: n }));
|
|
556
556
|
}
|
|
557
557
|
function Mn(t, e) {
|
|
@@ -560,7 +560,7 @@ function Mn(t, e) {
|
|
|
560
560
|
function se(t, e) {
|
|
561
561
|
return !!(t && t[0] === e[0] && t[1] === e[1]);
|
|
562
562
|
}
|
|
563
|
-
const
|
|
563
|
+
const De = U(
|
|
564
564
|
() => ({ recalcInProgress: C(!1) }),
|
|
565
565
|
[],
|
|
566
566
|
{ singleton: !0 }
|
|
@@ -586,31 +586,31 @@ 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 yo(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
|
}
|
|
593
|
-
function
|
|
593
|
+
function vt(t, e) {
|
|
594
594
|
return Math.round(t.getBoundingClientRect()[e]);
|
|
595
595
|
}
|
|
596
596
|
function Re(t) {
|
|
597
597
|
return !j(t.groupOffsetTree);
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function $e({ index: t }, e) {
|
|
600
600
|
return e === t ? 0 : e < t ? -1 : 1;
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function Ro() {
|
|
603
603
|
return {
|
|
604
604
|
groupIndices: [],
|
|
605
|
-
groupOffsetTree:
|
|
605
|
+
groupOffsetTree: jt(),
|
|
606
606
|
lastIndex: 0,
|
|
607
607
|
lastOffset: 0,
|
|
608
608
|
lastSize: 0,
|
|
609
609
|
offsetTree: [],
|
|
610
|
-
sizeTree:
|
|
610
|
+
sizeTree: jt()
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function bo(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,25 +619,25 @@ function yo(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(Lo(o)))
|
|
623
623
|
continue;
|
|
624
624
|
let c = !1, a = !1;
|
|
625
|
-
for (const { end:
|
|
626
|
-
c ? (r >= S || s === g) && (t =
|
|
625
|
+
for (const { end: m, start: S, value: g } of l)
|
|
626
|
+
c ? (r >= S || s === g) && (t = ze(t, S)) : (a = g !== s, c = !0), m > 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 Ho(t) {
|
|
632
632
|
return typeof t.groupIndex < "u";
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Eo({ 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 } = Wn(e, t,
|
|
640
|
+
const { index: o, offset: r, size: s } = Wn(e, t, $e), i = t - o, l = s * i + (i - 1) * n + r;
|
|
641
641
|
return l > 0 ? l + n : l;
|
|
642
642
|
}
|
|
643
643
|
function Gn(t, e) {
|
|
@@ -649,7 +649,7 @@ function Gn(t, e) {
|
|
|
649
649
|
return t + n;
|
|
650
650
|
}
|
|
651
651
|
function _n(t, e, n) {
|
|
652
|
-
if (
|
|
652
|
+
if (Ho(t))
|
|
653
653
|
return e.groupIndices[t.groupIndex] + 1;
|
|
654
654
|
{
|
|
655
655
|
const o = t.index === "LAST" ? n : t.index;
|
|
@@ -657,32 +657,32 @@ function _n(t, e, n) {
|
|
|
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, Wn(t, o,
|
|
660
|
+
function Bo(t, e, n, o = 0) {
|
|
661
|
+
return o > 0 && (e = Math.max(e, Wn(t, o, $e).offset)), Ln(yo(t, e, n, Eo), Oo);
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function ko(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 g = e[0].size,
|
|
669
|
-
i = n.reduce((w, v) => pt(pt(w, v, g), v + 1,
|
|
668
|
+
const g = e[0].size, I = e[1].size;
|
|
669
|
+
i = n.reduce((w, v) => pt(pt(w, v, g), v + 1, I), i);
|
|
670
670
|
} else
|
|
671
|
-
[i, l] =
|
|
671
|
+
[i, l] = bo(i, e);
|
|
672
672
|
if (i === s)
|
|
673
673
|
return t;
|
|
674
|
-
const { lastIndex: c, lastOffset: a, lastSize:
|
|
674
|
+
const { lastIndex: c, lastOffset: a, lastSize: m, offsetTree: S } = Ae(t.offsetTree, l, i, r);
|
|
675
675
|
return {
|
|
676
676
|
groupIndices: n,
|
|
677
|
-
groupOffsetTree: n.reduce((g,
|
|
677
|
+
groupOffsetTree: n.reduce((g, I) => pt(g, I, ie(I, S, r)), jt()),
|
|
678
678
|
lastIndex: c,
|
|
679
679
|
lastOffset: a,
|
|
680
|
-
lastSize:
|
|
680
|
+
lastSize: m,
|
|
681
681
|
offsetTree: S,
|
|
682
682
|
sizeTree: i
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function Fo(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 };
|
|
@@ -694,21 +694,21 @@ function pn(t, e) {
|
|
|
694
694
|
n += e[o + 1] - e[o] - 1, o++;
|
|
695
695
|
return o - (n === t ? 0 : 1);
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function Ae(t, e, n, o) {
|
|
698
698
|
let r = t, s = 0, i = 0, l = 0, c = 0;
|
|
699
699
|
if (e !== 0) {
|
|
700
|
-
c = Se(r, e - 1,
|
|
701
|
-
const
|
|
702
|
-
s =
|
|
700
|
+
c = Se(r, e - 1, $e), l = r[c].offset;
|
|
701
|
+
const m = wt(n, e - 1);
|
|
702
|
+
s = m[0], i = m[1], r.length && r[c].size === wt(n, e)[1] && (c -= 1), r = r.slice(0, c + 1);
|
|
703
703
|
} else
|
|
704
704
|
r = [];
|
|
705
|
-
for (const { start: a, value:
|
|
705
|
+
for (const { start: a, value: m } of ye(n, e, 1 / 0)) {
|
|
706
706
|
const S = a - s, g = S * i + l + S * o;
|
|
707
707
|
r.push({
|
|
708
708
|
index: a,
|
|
709
709
|
offset: g,
|
|
710
|
-
size:
|
|
711
|
-
}), s = a, l = g, i =
|
|
710
|
+
size: m
|
|
711
|
+
}), s = a, l = g, i = m;
|
|
712
712
|
}
|
|
713
713
|
return {
|
|
714
714
|
lastIndex: s,
|
|
@@ -717,44 +717,44 @@ function Pe(t, e, n, o) {
|
|
|
717
717
|
offsetTree: r
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function Oo(t) {
|
|
721
721
|
return { index: t.index, value: t };
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function Lo(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 zo = {
|
|
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 = C(0), c = C([]), a = C(void 0),
|
|
733
|
-
x(n,
|
|
732
|
+
const n = $(), o = $(), r = ct(o, 0), s = $(), i = $(), l = C(0), c = C([]), a = C(void 0), m = C(void 0), S = C((f, d) => vt(f, zo[d])), g = C(void 0), I = C(0), w = Ro(), v = ct(
|
|
733
|
+
x(n, N(c, t, I), bt(ko, w), Z()),
|
|
734
734
|
w
|
|
735
|
-
),
|
|
735
|
+
), h = ct(
|
|
736
736
|
x(
|
|
737
737
|
c,
|
|
738
738
|
Z(),
|
|
739
|
-
|
|
739
|
+
bt((f, d) => ({ current: d, prev: f.current }), {
|
|
740
740
|
current: [],
|
|
741
741
|
prev: []
|
|
742
742
|
}),
|
|
743
|
-
E(({ prev:
|
|
743
|
+
E(({ prev: f }) => f)
|
|
744
744
|
),
|
|
745
745
|
[]
|
|
746
746
|
);
|
|
747
747
|
O(
|
|
748
748
|
x(
|
|
749
749
|
c,
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
E(([
|
|
753
|
-
const
|
|
750
|
+
A((f) => f.length > 0),
|
|
751
|
+
N(v, I),
|
|
752
|
+
E(([f, d, y]) => {
|
|
753
|
+
const B = f.reduce((k, L, z) => pt(k, L, ie(L, d.offsetTree, y) || z), jt());
|
|
754
754
|
return {
|
|
755
|
-
...
|
|
756
|
-
groupIndices:
|
|
757
|
-
groupOffsetTree:
|
|
755
|
+
...d,
|
|
756
|
+
groupIndices: f,
|
|
757
|
+
groupOffsetTree: B
|
|
758
758
|
};
|
|
759
759
|
})
|
|
760
760
|
),
|
|
@@ -762,67 +762,67 @@ const Oo = {
|
|
|
762
762
|
), O(
|
|
763
763
|
x(
|
|
764
764
|
o,
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
E(([
|
|
765
|
+
N(v),
|
|
766
|
+
A(([f, { lastIndex: d }]) => f < d),
|
|
767
|
+
E(([f, { lastIndex: d, lastSize: y }]) => [
|
|
768
768
|
{
|
|
769
|
-
endIndex:
|
|
770
|
-
size:
|
|
771
|
-
startIndex:
|
|
769
|
+
endIndex: d,
|
|
770
|
+
size: y,
|
|
771
|
+
startIndex: f
|
|
772
772
|
}
|
|
773
773
|
])
|
|
774
774
|
),
|
|
775
775
|
n
|
|
776
|
-
), O(a,
|
|
777
|
-
const
|
|
776
|
+
), O(a, m);
|
|
777
|
+
const p = ct(
|
|
778
778
|
x(
|
|
779
779
|
a,
|
|
780
|
-
E((
|
|
780
|
+
E((f) => f === void 0)
|
|
781
781
|
),
|
|
782
782
|
!0
|
|
783
783
|
);
|
|
784
784
|
O(
|
|
785
785
|
x(
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
E((
|
|
786
|
+
m,
|
|
787
|
+
A((f) => f !== void 0 && j(ot(v).sizeTree)),
|
|
788
|
+
E((f) => [{ endIndex: 0, size: f, startIndex: 0 }])
|
|
789
789
|
),
|
|
790
790
|
n
|
|
791
791
|
);
|
|
792
792
|
const u = ht(
|
|
793
793
|
x(
|
|
794
794
|
n,
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
({ sizes:
|
|
798
|
-
changed:
|
|
799
|
-
sizes:
|
|
795
|
+
N(v),
|
|
796
|
+
bt(
|
|
797
|
+
({ sizes: f }, [d, y]) => ({
|
|
798
|
+
changed: y !== f,
|
|
799
|
+
sizes: y
|
|
800
800
|
}),
|
|
801
801
|
{ changed: !1, sizes: w }
|
|
802
802
|
),
|
|
803
|
-
E((
|
|
803
|
+
E((f) => f.changed)
|
|
804
804
|
)
|
|
805
805
|
);
|
|
806
806
|
K(
|
|
807
807
|
x(
|
|
808
808
|
l,
|
|
809
|
-
|
|
810
|
-
(
|
|
809
|
+
bt(
|
|
810
|
+
(f, d) => ({ diff: f.prev - d, prev: d }),
|
|
811
811
|
{ diff: 0, prev: 0 }
|
|
812
812
|
),
|
|
813
|
-
E((
|
|
813
|
+
E((f) => f.diff)
|
|
814
814
|
),
|
|
815
|
-
(
|
|
816
|
-
const { groupIndices:
|
|
817
|
-
if (
|
|
818
|
-
G(e, !0), G(s,
|
|
819
|
-
else if (
|
|
820
|
-
const
|
|
821
|
-
|
|
815
|
+
(f) => {
|
|
816
|
+
const { groupIndices: d } = ot(v);
|
|
817
|
+
if (f > 0)
|
|
818
|
+
G(e, !0), G(s, f + pn(f, d));
|
|
819
|
+
else if (f < 0) {
|
|
820
|
+
const y = ot(h);
|
|
821
|
+
y.length > 0 && (f -= pn(-f, y)), G(i, f);
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
), K(x(l,
|
|
825
|
-
|
|
824
|
+
), K(x(l, N(t)), ([f, d]) => {
|
|
825
|
+
f < 0 && d(
|
|
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,57 +832,57 @@ const Oo = {
|
|
|
832
832
|
O(
|
|
833
833
|
x(
|
|
834
834
|
s,
|
|
835
|
-
|
|
836
|
-
E(([
|
|
837
|
-
const
|
|
838
|
-
if (
|
|
839
|
-
const L = re(
|
|
840
|
-
let
|
|
841
|
-
for (;
|
|
842
|
-
const
|
|
843
|
-
|
|
844
|
-
endIndex:
|
|
835
|
+
N(v),
|
|
836
|
+
E(([f, d]) => {
|
|
837
|
+
const y = d.groupIndices.length > 0, B = [], k = d.lastSize;
|
|
838
|
+
if (y) {
|
|
839
|
+
const L = re(d.sizeTree, 0);
|
|
840
|
+
let z = 0, _ = 0;
|
|
841
|
+
for (; z < f; ) {
|
|
842
|
+
const F = d.groupIndices[_], Y = d.groupIndices.length === _ + 1 ? 1 / 0 : d.groupIndices[_ + 1] - F - 1;
|
|
843
|
+
B.push({
|
|
844
|
+
endIndex: F,
|
|
845
845
|
size: L,
|
|
846
|
-
startIndex:
|
|
847
|
-
}),
|
|
848
|
-
endIndex:
|
|
849
|
-
size:
|
|
850
|
-
startIndex:
|
|
851
|
-
}),
|
|
846
|
+
startIndex: F
|
|
847
|
+
}), B.push({
|
|
848
|
+
endIndex: F + 1 + Y - 1,
|
|
849
|
+
size: k,
|
|
850
|
+
startIndex: F + 1
|
|
851
|
+
}), _++, z += Y + 1;
|
|
852
852
|
}
|
|
853
|
-
const J = Gt(
|
|
854
|
-
return
|
|
855
|
-
(
|
|
856
|
-
let dt =
|
|
857
|
-
return
|
|
858
|
-
...
|
|
853
|
+
const J = Gt(d.sizeTree);
|
|
854
|
+
return z !== f && J.shift(), J.reduce(
|
|
855
|
+
(F, { k: Y, v: it }) => {
|
|
856
|
+
let dt = F.ranges;
|
|
857
|
+
return F.prevSize !== 0 && (dt = [
|
|
858
|
+
...F.ranges,
|
|
859
859
|
{
|
|
860
|
-
endIndex: Y +
|
|
861
|
-
size:
|
|
862
|
-
startIndex:
|
|
860
|
+
endIndex: Y + f - 1,
|
|
861
|
+
size: F.prevSize,
|
|
862
|
+
startIndex: F.prevIndex
|
|
863
863
|
}
|
|
864
864
|
]), {
|
|
865
|
-
prevIndex: Y +
|
|
865
|
+
prevIndex: Y + f,
|
|
866
866
|
prevSize: it,
|
|
867
867
|
ranges: dt
|
|
868
868
|
};
|
|
869
869
|
},
|
|
870
870
|
{
|
|
871
|
-
prevIndex:
|
|
871
|
+
prevIndex: f,
|
|
872
872
|
prevSize: 0,
|
|
873
|
-
ranges:
|
|
873
|
+
ranges: B
|
|
874
874
|
}
|
|
875
875
|
).ranges;
|
|
876
876
|
}
|
|
877
|
-
return Gt(
|
|
878
|
-
(L, { k:
|
|
879
|
-
prevIndex:
|
|
880
|
-
prevSize:
|
|
881
|
-
ranges: [...L.ranges, { endIndex:
|
|
877
|
+
return Gt(d.sizeTree).reduce(
|
|
878
|
+
(L, { k: z, v: _ }) => ({
|
|
879
|
+
prevIndex: z + f,
|
|
880
|
+
prevSize: _,
|
|
881
|
+
ranges: [...L.ranges, { endIndex: z + f - 1, size: L.prevSize, startIndex: L.prevIndex }]
|
|
882
882
|
}),
|
|
883
883
|
{
|
|
884
884
|
prevIndex: 0,
|
|
885
|
-
prevSize:
|
|
885
|
+
prevSize: k,
|
|
886
886
|
ranges: []
|
|
887
887
|
}
|
|
888
888
|
).ranges;
|
|
@@ -890,49 +890,49 @@ const Oo = {
|
|
|
890
890
|
),
|
|
891
891
|
n
|
|
892
892
|
);
|
|
893
|
-
const
|
|
893
|
+
const b = ht(
|
|
894
894
|
x(
|
|
895
895
|
i,
|
|
896
|
-
|
|
897
|
-
E(([
|
|
898
|
-
const
|
|
899
|
-
return ie(
|
|
896
|
+
N(v, I),
|
|
897
|
+
E(([f, { offsetTree: d }, y]) => {
|
|
898
|
+
const B = -f;
|
|
899
|
+
return ie(B, d, y);
|
|
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
|
|
912
|
-
const L =
|
|
913
|
-
let
|
|
914
|
-
for (;
|
|
915
|
-
J = L[
|
|
916
|
-
const
|
|
917
|
-
|
|
906
|
+
N(v, I),
|
|
907
|
+
E(([f, d, y]) => {
|
|
908
|
+
if (d.groupIndices.length > 0) {
|
|
909
|
+
if (j(d.sizeTree))
|
|
910
|
+
return d;
|
|
911
|
+
let k = jt();
|
|
912
|
+
const L = ot(h);
|
|
913
|
+
let z = 0, _ = 0, J = 0;
|
|
914
|
+
for (; z < -f; ) {
|
|
915
|
+
J = L[_];
|
|
916
|
+
const F = L[_ + 1] - J - 1;
|
|
917
|
+
_++, z += F + 1;
|
|
918
918
|
}
|
|
919
|
-
if (
|
|
920
|
-
const
|
|
921
|
-
|
|
922
|
-
const Y =
|
|
923
|
-
|
|
919
|
+
if (k = Gt(d.sizeTree).reduce((F, { k: Y, v: it }) => pt(F, Math.max(0, Y + f), it), k), z !== -f) {
|
|
920
|
+
const F = re(d.sizeTree, J);
|
|
921
|
+
k = pt(k, 0, F);
|
|
922
|
+
const Y = wt(d.sizeTree, -f + 1)[1];
|
|
923
|
+
k = pt(k, 1, Y);
|
|
924
924
|
}
|
|
925
925
|
return {
|
|
926
|
-
...
|
|
927
|
-
sizeTree:
|
|
928
|
-
...
|
|
926
|
+
...d,
|
|
927
|
+
sizeTree: k,
|
|
928
|
+
...Ae(d.offsetTree, 0, k, y)
|
|
929
929
|
};
|
|
930
930
|
} else {
|
|
931
|
-
const
|
|
931
|
+
const k = Gt(d.sizeTree).reduce((L, { k: z, v: _ }) => pt(L, Math.max(0, z + f), _), jt());
|
|
932
932
|
return {
|
|
933
|
-
...
|
|
934
|
-
sizeTree:
|
|
935
|
-
...
|
|
933
|
+
...d,
|
|
934
|
+
sizeTree: k,
|
|
935
|
+
...Ae(d.offsetTree, 0, k, y)
|
|
936
936
|
};
|
|
937
937
|
}
|
|
938
938
|
})
|
|
@@ -942,28 +942,28 @@ const Oo = {
|
|
|
942
942
|
beforeUnshiftWith: T,
|
|
943
943
|
// input
|
|
944
944
|
data: g,
|
|
945
|
-
defaultItemSize:
|
|
945
|
+
defaultItemSize: m,
|
|
946
946
|
firstItemIndex: l,
|
|
947
947
|
fixedItemSize: a,
|
|
948
|
-
gap:
|
|
948
|
+
gap: I,
|
|
949
949
|
groupIndices: c,
|
|
950
950
|
itemSize: S,
|
|
951
951
|
listRefresh: u,
|
|
952
952
|
shiftWith: i,
|
|
953
|
-
shiftWithOffset:
|
|
953
|
+
shiftWithOffset: b,
|
|
954
954
|
sizeRanges: n,
|
|
955
955
|
// output
|
|
956
956
|
sizes: v,
|
|
957
957
|
statefulTotalCount: r,
|
|
958
958
|
totalCount: o,
|
|
959
|
-
trackItemSizes:
|
|
959
|
+
trackItemSizes: p,
|
|
960
960
|
unshiftWith: s
|
|
961
961
|
};
|
|
962
962
|
},
|
|
963
|
-
X(Vt,
|
|
963
|
+
X(Vt, De),
|
|
964
964
|
{ singleton: !0 }
|
|
965
965
|
);
|
|
966
|
-
function
|
|
966
|
+
function Vo(t) {
|
|
967
967
|
return t.reduce(
|
|
968
968
|
(e, n) => (e.groupIndices.push(e.totalCount), e.totalCount += n + 1, e),
|
|
969
969
|
{
|
|
@@ -974,7 +974,7 @@ function Lo(t) {
|
|
|
974
974
|
}
|
|
975
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(Vo)));
|
|
978
978
|
return O(
|
|
979
979
|
x(
|
|
980
980
|
l,
|
|
@@ -990,8 +990,8 @@ const Nn = U(
|
|
|
990
990
|
), O(
|
|
991
991
|
x(
|
|
992
992
|
rt(r, e, o),
|
|
993
|
-
|
|
994
|
-
E(([c, a,
|
|
993
|
+
A(([c, a]) => Re(a)),
|
|
994
|
+
E(([c, a, m]) => wt(a.groupOffsetTree, Math.max(c - m, 0), "v")[0]),
|
|
995
995
|
Z(),
|
|
996
996
|
E((c) => [c])
|
|
997
997
|
),
|
|
@@ -1004,20 +1004,20 @@ const Nn = U(
|
|
|
1004
1004
|
const e = C(!1), n = ht(
|
|
1005
1005
|
x(
|
|
1006
1006
|
e,
|
|
1007
|
-
|
|
1007
|
+
A((o) => o),
|
|
1008
1008
|
Z()
|
|
1009
1009
|
)
|
|
1010
1010
|
);
|
|
1011
1011
|
return K(e, (o) => {
|
|
1012
|
-
o &&
|
|
1012
|
+
o && ot(t)("props updated", {}, mt.DEBUG);
|
|
1013
1013
|
}), { didMount: n, propsReady: e };
|
|
1014
1014
|
},
|
|
1015
1015
|
X(Vt),
|
|
1016
1016
|
{ singleton: !0 }
|
|
1017
|
-
),
|
|
1017
|
+
), Po = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
1018
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 || !Po) && (e.behavior = "auto"), e.offset || (e.offset = 0), e;
|
|
1021
1021
|
}
|
|
1022
1022
|
const ce = U(
|
|
1023
1023
|
([
|
|
@@ -1029,60 +1029,60 @@ const ce = U(
|
|
|
1029
1029
|
headerHeight: l,
|
|
1030
1030
|
scrollingInProgress: c,
|
|
1031
1031
|
scrollTo: a,
|
|
1032
|
-
smoothScrollTargetReached:
|
|
1032
|
+
smoothScrollTargetReached: m,
|
|
1033
1033
|
viewportHeight: S
|
|
1034
1034
|
},
|
|
1035
1035
|
{ log: g }
|
|
1036
1036
|
]) => {
|
|
1037
|
-
const
|
|
1038
|
-
let
|
|
1037
|
+
const I = $(), w = $(), v = C(0);
|
|
1038
|
+
let h = null, p = null, u = null;
|
|
1039
1039
|
function T() {
|
|
1040
|
-
|
|
1040
|
+
h && (h(), h = null), u && (u(), u = null), p && (clearTimeout(p), p = null), G(c, !1);
|
|
1041
1041
|
}
|
|
1042
1042
|
return O(
|
|
1043
1043
|
x(
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1044
|
+
I,
|
|
1045
|
+
N(n, S, o, v, l, i, g),
|
|
1046
|
+
N(t, s, r),
|
|
1047
1047
|
E(
|
|
1048
1048
|
([
|
|
1049
|
-
[
|
|
1050
|
-
|
|
1049
|
+
[b, f, d, y, B, k, L, z],
|
|
1050
|
+
_,
|
|
1051
1051
|
J,
|
|
1052
1052
|
nt
|
|
1053
1053
|
]) => {
|
|
1054
|
-
const
|
|
1055
|
-
let ut = ie(ft,
|
|
1056
|
-
Y === "end" ? (ut += J +
|
|
1054
|
+
const F = Dn(b), { align: Y, behavior: it, offset: dt } = F, St = y - 1, ft = _n(F, f, St);
|
|
1055
|
+
let ut = ie(ft, f.offsetTree, _) + k;
|
|
1056
|
+
Y === "end" ? (ut += J + wt(f.sizeTree, ft)[1] - d + nt, ft === St && (ut += L)) : Y === "center" ? ut += (J + wt(f.sizeTree, ft)[1] - d + nt) / 2 : ut -= B, dt && (ut += dt);
|
|
1057
1057
|
const At = (xt) => {
|
|
1058
|
-
T(), xt ? (
|
|
1058
|
+
T(), xt ? (z("retrying to scroll to", { location: b }, mt.DEBUG), G(I, b)) : (G(w, !0), z("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
|
+
}), h = Tt(m, () => {
|
|
1065
1065
|
At(xt);
|
|
1066
1066
|
});
|
|
1067
1067
|
} else
|
|
1068
|
-
|
|
1069
|
-
return
|
|
1068
|
+
h = Tt(x(e, Ao(150)), At);
|
|
1069
|
+
return p = setTimeout(() => {
|
|
1070
1070
|
T();
|
|
1071
|
-
}, 1200), G(c, !0),
|
|
1071
|
+
}, 1200), G(c, !0), z("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
1077
|
scrollTargetReached: w,
|
|
1078
|
-
scrollToIndex:
|
|
1078
|
+
scrollToIndex: I,
|
|
1079
1079
|
topListHeight: v
|
|
1080
1080
|
};
|
|
1081
1081
|
},
|
|
1082
1082
|
X(Et, at, Vt),
|
|
1083
1083
|
{ singleton: !0 }
|
|
1084
1084
|
);
|
|
1085
|
-
function
|
|
1085
|
+
function Ao(t) {
|
|
1086
1086
|
return (e) => {
|
|
1087
1087
|
const n = setTimeout(() => {
|
|
1088
1088
|
e(!1);
|
|
@@ -1092,12 +1092,12 @@ function Vo(t) {
|
|
|
1092
1092
|
};
|
|
1093
1093
|
};
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1095
|
+
function Ue(t, e) {
|
|
1096
1096
|
t == 0 ? e() : requestAnimationFrame(() => {
|
|
1097
|
-
|
|
1097
|
+
Ue(t - 1, e);
|
|
1098
1098
|
});
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function Ke(t, e) {
|
|
1101
1101
|
const n = e - 1;
|
|
1102
1102
|
return typeof t == "number" ? t : t.index === "LAST" ? n : t.index;
|
|
1103
1103
|
}
|
|
@@ -1107,33 +1107,33 @@ const ue = U(
|
|
|
1107
1107
|
return O(
|
|
1108
1108
|
x(
|
|
1109
1109
|
i,
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1110
|
+
N(c),
|
|
1111
|
+
A(([m, S]) => !!S),
|
|
1112
|
+
Rt(!1)
|
|
1113
1113
|
),
|
|
1114
1114
|
l
|
|
1115
1115
|
), O(
|
|
1116
1116
|
x(
|
|
1117
1117
|
i,
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1118
|
+
N(c),
|
|
1119
|
+
A(([m, S]) => !!S),
|
|
1120
|
+
Rt(!1)
|
|
1121
1121
|
),
|
|
1122
1122
|
a
|
|
1123
1123
|
), K(
|
|
1124
1124
|
x(
|
|
1125
1125
|
rt(e, i),
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1126
|
+
N(l, n, t, a),
|
|
1127
|
+
A(([[, m], S, { sizeTree: g }, I, w]) => m && (!j(g) || We(I)) && !S && !w),
|
|
1128
|
+
N(c)
|
|
1129
1129
|
),
|
|
1130
|
-
([,
|
|
1131
|
-
|
|
1130
|
+
([, m]) => {
|
|
1131
|
+
Tt(r, () => {
|
|
1132
1132
|
G(a, !0);
|
|
1133
|
-
}),
|
|
1134
|
-
|
|
1133
|
+
}), Ue(4, () => {
|
|
1134
|
+
Tt(o, () => {
|
|
1135
1135
|
G(l, !0);
|
|
1136
|
-
}), G(s,
|
|
1136
|
+
}), G(s, m);
|
|
1137
1137
|
});
|
|
1138
1138
|
}
|
|
1139
1139
|
), {
|
|
@@ -1148,7 +1148,7 @@ const ue = U(
|
|
|
1148
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", Mo = "none", Wo = {
|
|
1152
1152
|
atBottom: !1,
|
|
1153
1153
|
notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
|
|
1154
1154
|
state: {
|
|
@@ -1157,82 +1157,82 @@ const le = "up", te = "down", Po = "none", Ao = {
|
|
|
1157
1157
|
scrollTop: 0,
|
|
1158
1158
|
viewportHeight: 0
|
|
1159
1159
|
}
|
|
1160
|
-
},
|
|
1161
|
-
const i = C(!1), l = C(!0), c = $(), a = $(),
|
|
1160
|
+
}, Go = 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 = $(), m = C(4), S = C(Go), g = ct(
|
|
1162
1162
|
x(
|
|
1163
|
-
|
|
1163
|
+
Le(x(V(r), Dt(1), Rt(!0)), x(V(r), Dt(1), Rt(!1), dn(100))),
|
|
1164
1164
|
Z()
|
|
1165
1165
|
),
|
|
1166
1166
|
!1
|
|
1167
|
-
),
|
|
1168
|
-
x(
|
|
1167
|
+
), I = ct(
|
|
1168
|
+
x(Le(x(n, Rt(!0)), x(n, Rt(!1), dn(200))), Z()),
|
|
1169
1169
|
!1
|
|
1170
1170
|
);
|
|
1171
1171
|
O(
|
|
1172
1172
|
x(
|
|
1173
|
-
rt(
|
|
1173
|
+
rt(V(r), V(S)),
|
|
1174
1174
|
E(([u, T]) => u <= T),
|
|
1175
1175
|
Z()
|
|
1176
1176
|
),
|
|
1177
1177
|
l
|
|
1178
|
-
), O(x(l,
|
|
1178
|
+
), O(x(l, kt(50)), a);
|
|
1179
1179
|
const w = ht(
|
|
1180
1180
|
x(
|
|
1181
|
-
rt(o,
|
|
1182
|
-
|
|
1183
|
-
const
|
|
1181
|
+
rt(o, V(s), V(e), V(t), V(m)),
|
|
1182
|
+
bt((u, [{ scrollHeight: T, scrollTop: b }, f, d, y, B]) => {
|
|
1183
|
+
const k = b + f - T > -B, L = {
|
|
1184
1184
|
scrollHeight: T,
|
|
1185
|
-
scrollTop:
|
|
1186
|
-
viewportHeight:
|
|
1185
|
+
scrollTop: b,
|
|
1186
|
+
viewportHeight: f
|
|
1187
1187
|
};
|
|
1188
|
-
if (
|
|
1189
|
-
let
|
|
1190
|
-
return
|
|
1188
|
+
if (k) {
|
|
1189
|
+
let _, J;
|
|
1190
|
+
return b > u.state.scrollTop ? (_ = "SCROLLED_DOWN", J = u.state.scrollTop - b) : (_ = "SIZE_DECREASED", J = u.state.scrollTop - b || u.scrollTopDelta), {
|
|
1191
1191
|
atBottom: !0,
|
|
1192
|
-
atBottomBecause:
|
|
1192
|
+
atBottomBecause: _,
|
|
1193
1193
|
scrollTopDelta: J,
|
|
1194
1194
|
state: L
|
|
1195
1195
|
};
|
|
1196
1196
|
}
|
|
1197
|
-
let
|
|
1198
|
-
return L.scrollHeight > u.state.scrollHeight ?
|
|
1197
|
+
let z;
|
|
1198
|
+
return L.scrollHeight > u.state.scrollHeight ? z = "SIZE_INCREASED" : f < u.state.viewportHeight ? z = "VIEWPORT_HEIGHT_DECREASING" : b < u.state.scrollTop ? z = "SCROLLING_UPWARDS" : z = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
1199
1199
|
atBottom: !1,
|
|
1200
|
-
notAtBottomBecause:
|
|
1200
|
+
notAtBottomBecause: z,
|
|
1201
1201
|
state: L
|
|
1202
1202
|
};
|
|
1203
|
-
},
|
|
1203
|
+
}, Wo),
|
|
1204
1204
|
Z((u, T) => u && u.atBottom === T.atBottom)
|
|
1205
1205
|
)
|
|
1206
1206
|
), v = ct(
|
|
1207
1207
|
x(
|
|
1208
1208
|
o,
|
|
1209
|
-
|
|
1210
|
-
(u, { scrollHeight: T, scrollTop:
|
|
1209
|
+
bt(
|
|
1210
|
+
(u, { scrollHeight: T, scrollTop: b, viewportHeight: f }) => {
|
|
1211
1211
|
if ($n(u.scrollHeight, T))
|
|
1212
1212
|
return {
|
|
1213
1213
|
changed: !1,
|
|
1214
1214
|
jump: 0,
|
|
1215
1215
|
scrollHeight: T,
|
|
1216
|
-
scrollTop:
|
|
1216
|
+
scrollTop: b
|
|
1217
1217
|
};
|
|
1218
1218
|
{
|
|
1219
|
-
const
|
|
1220
|
-
return u.scrollTop !==
|
|
1219
|
+
const d = T - (b + f) < 1;
|
|
1220
|
+
return u.scrollTop !== b && d ? {
|
|
1221
1221
|
changed: !0,
|
|
1222
|
-
jump: u.scrollTop -
|
|
1222
|
+
jump: u.scrollTop - b,
|
|
1223
1223
|
scrollHeight: T,
|
|
1224
|
-
scrollTop:
|
|
1224
|
+
scrollTop: b
|
|
1225
1225
|
} : {
|
|
1226
1226
|
changed: !0,
|
|
1227
1227
|
jump: 0,
|
|
1228
1228
|
scrollHeight: T,
|
|
1229
|
-
scrollTop:
|
|
1229
|
+
scrollTop: b
|
|
1230
1230
|
};
|
|
1231
1231
|
}
|
|
1232
1232
|
},
|
|
1233
1233
|
{ changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
|
|
1234
1234
|
),
|
|
1235
|
-
|
|
1235
|
+
A((u) => u.changed),
|
|
1236
1236
|
E((u) => u.jump)
|
|
1237
1237
|
),
|
|
1238
1238
|
0
|
|
@@ -1243,51 +1243,51 @@ const le = "up", te = "down", Po = "none", Ao = {
|
|
|
1243
1243
|
E((u) => u.atBottom)
|
|
1244
1244
|
),
|
|
1245
1245
|
i
|
|
1246
|
-
), O(x(i,
|
|
1247
|
-
const
|
|
1246
|
+
), O(x(i, kt(50)), c);
|
|
1247
|
+
const h = C(te);
|
|
1248
1248
|
O(
|
|
1249
1249
|
x(
|
|
1250
1250
|
o,
|
|
1251
1251
|
E(({ scrollTop: u }) => u),
|
|
1252
1252
|
Z(),
|
|
1253
|
-
|
|
1254
|
-
(u, T) =>
|
|
1253
|
+
bt(
|
|
1254
|
+
(u, T) => ot(I) ? { 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,
|
|
1261
|
-
const
|
|
1259
|
+
h
|
|
1260
|
+
), O(x(o, kt(50), Rt(Mo)), h);
|
|
1261
|
+
const p = C(0);
|
|
1262
1262
|
return O(
|
|
1263
1263
|
x(
|
|
1264
1264
|
g,
|
|
1265
|
-
|
|
1266
|
-
|
|
1265
|
+
A((u) => !u),
|
|
1266
|
+
Rt(0)
|
|
1267
1267
|
),
|
|
1268
|
-
|
|
1268
|
+
p
|
|
1269
1269
|
), O(
|
|
1270
1270
|
x(
|
|
1271
1271
|
r,
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1272
|
+
kt(100),
|
|
1273
|
+
N(g),
|
|
1274
|
+
A(([u, T]) => !!T),
|
|
1275
|
+
bt(([u, T], [b]) => [T, b], [0, 0]),
|
|
1276
1276
|
E(([u, T]) => T - u)
|
|
1277
1277
|
),
|
|
1278
|
-
|
|
1278
|
+
p
|
|
1279
1279
|
), {
|
|
1280
1280
|
atBottomState: w,
|
|
1281
1281
|
atBottomStateChange: c,
|
|
1282
|
-
atBottomThreshold:
|
|
1282
|
+
atBottomThreshold: m,
|
|
1283
1283
|
atTopStateChange: a,
|
|
1284
1284
|
atTopThreshold: S,
|
|
1285
1285
|
isAtBottom: i,
|
|
1286
1286
|
isAtTop: l,
|
|
1287
1287
|
isScrolling: g,
|
|
1288
1288
|
lastJumpDueToItemResize: v,
|
|
1289
|
-
scrollDirection:
|
|
1290
|
-
scrollVelocity:
|
|
1289
|
+
scrollDirection: h,
|
|
1290
|
+
scrollVelocity: p
|
|
1291
1291
|
};
|
|
1292
1292
|
}, X(at)), xe = "top", Te = "bottom", hn = "none";
|
|
1293
1293
|
function gn(t, e, n) {
|
|
@@ -1297,43 +1297,43 @@ function In(t, e) {
|
|
|
1297
1297
|
var n;
|
|
1298
1298
|
return typeof t == "number" ? t : (n = t[e]) != null ? n : 0;
|
|
1299
1299
|
}
|
|
1300
|
-
const
|
|
1300
|
+
const je = U(
|
|
1301
1301
|
([{ deviation: t, fixedHeaderHeight: e, headerHeight: n, scrollTop: o, viewportHeight: r }]) => {
|
|
1302
1302
|
const s = $(), i = C(0), l = C(0), c = C(0), a = ct(
|
|
1303
1303
|
x(
|
|
1304
1304
|
rt(
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1305
|
+
V(o),
|
|
1306
|
+
V(r),
|
|
1307
|
+
V(n),
|
|
1308
|
+
V(s, se),
|
|
1309
|
+
V(c),
|
|
1310
|
+
V(i),
|
|
1311
|
+
V(e),
|
|
1312
|
+
V(t),
|
|
1313
|
+
V(l)
|
|
1314
1314
|
),
|
|
1315
1315
|
E(
|
|
1316
1316
|
([
|
|
1317
|
-
|
|
1317
|
+
m,
|
|
1318
1318
|
S,
|
|
1319
1319
|
g,
|
|
1320
|
-
[
|
|
1320
|
+
[I, w],
|
|
1321
1321
|
v,
|
|
1322
|
-
|
|
1323
|
-
|
|
1322
|
+
h,
|
|
1323
|
+
p,
|
|
1324
1324
|
u,
|
|
1325
1325
|
T
|
|
1326
1326
|
]) => {
|
|
1327
|
-
const
|
|
1328
|
-
let
|
|
1329
|
-
const
|
|
1330
|
-
return
|
|
1331
|
-
Math.max(
|
|
1332
|
-
|
|
1327
|
+
const b = m - u, f = h + p, d = Math.max(g - b, 0);
|
|
1328
|
+
let y = hn;
|
|
1329
|
+
const B = In(T, xe), k = In(T, Te);
|
|
1330
|
+
return I -= u, I += g + p, w += g + p, w -= u, I > m + f - B && (y = le), w < m - d + S + k && (y = te), y !== hn ? [
|
|
1331
|
+
Math.max(b - g - gn(v, xe, y) - B, 0),
|
|
1332
|
+
b - d - p + S + gn(v, Te, y) + k
|
|
1333
1333
|
] : null;
|
|
1334
1334
|
}
|
|
1335
1335
|
),
|
|
1336
|
-
|
|
1336
|
+
A((m) => m != null),
|
|
1337
1337
|
Z(se)
|
|
1338
1338
|
),
|
|
1339
1339
|
[0, 0]
|
|
@@ -1351,11 +1351,11 @@ const Ke = U(
|
|
|
1351
1351
|
X(at),
|
|
1352
1352
|
{ singleton: !0 }
|
|
1353
1353
|
);
|
|
1354
|
-
function
|
|
1354
|
+
function _o(t, e, n) {
|
|
1355
1355
|
if (Re(e)) {
|
|
1356
1356
|
const o = Gn(t, e);
|
|
1357
1357
|
return [
|
|
1358
|
-
{ index:
|
|
1358
|
+
{ index: wt(e.groupOffsetTree, o)[0], offset: 0, size: 0 },
|
|
1359
1359
|
{ data: n == null ? void 0 : n[0], index: o, offset: 0, size: 0 }
|
|
1360
1360
|
];
|
|
1361
1361
|
}
|
|
@@ -1374,34 +1374,34 @@ const Be = {
|
|
|
1374
1374
|
};
|
|
1375
1375
|
function Ie(t, e, n, o, r, s) {
|
|
1376
1376
|
const { lastIndex: i, lastOffset: l, lastSize: c } = r;
|
|
1377
|
-
let a = 0,
|
|
1377
|
+
let a = 0, m = 0;
|
|
1378
1378
|
if (t.length > 0) {
|
|
1379
1379
|
a = t[0].offset;
|
|
1380
1380
|
const v = t[t.length - 1];
|
|
1381
|
-
|
|
1381
|
+
m = v.offset + v.size;
|
|
1382
1382
|
}
|
|
1383
|
-
const S = n - i, g = l + S * c + (S - 1) * o,
|
|
1383
|
+
const S = n - i, g = l + S * c + (S - 1) * o, I = a, w = g - m;
|
|
1384
1384
|
return {
|
|
1385
|
-
bottom:
|
|
1385
|
+
bottom: m,
|
|
1386
1386
|
firstItemIndex: s,
|
|
1387
1387
|
items: Sn(t, r, s),
|
|
1388
1388
|
offsetBottom: w,
|
|
1389
1389
|
offsetTop: a,
|
|
1390
|
-
top:
|
|
1390
|
+
top: I,
|
|
1391
1391
|
topItems: Sn(e, r, s),
|
|
1392
|
-
topListHeight: e.reduce((v,
|
|
1392
|
+
topListHeight: e.reduce((v, h) => h.size + v, 0),
|
|
1393
1393
|
totalCount: n
|
|
1394
1394
|
};
|
|
1395
1395
|
}
|
|
1396
1396
|
function Un(t, e, n, o, r, s) {
|
|
1397
1397
|
let i = 0;
|
|
1398
1398
|
if (n.groupIndices.length > 0)
|
|
1399
|
-
for (const
|
|
1400
|
-
if (
|
|
1399
|
+
for (const m of n.groupIndices) {
|
|
1400
|
+
if (m - i >= t)
|
|
1401
1401
|
break;
|
|
1402
1402
|
i++;
|
|
1403
1403
|
}
|
|
1404
|
-
const l = t + i, c =
|
|
1404
|
+
const l = t + i, c = Ke(e, l), a = Array.from({ length: l }).map((m, S) => ({
|
|
1405
1405
|
data: s[S + c],
|
|
1406
1406
|
index: S + c,
|
|
1407
1407
|
offset: 0,
|
|
@@ -1418,15 +1418,15 @@ function Sn(t, e, n) {
|
|
|
1418
1418
|
let l, c = 0;
|
|
1419
1419
|
for (const a of t) {
|
|
1420
1420
|
(!l || l.end < a.index) && (l = i.shift(), c = e.groupIndices.indexOf(l.start));
|
|
1421
|
-
let
|
|
1422
|
-
a.index === l.start ?
|
|
1421
|
+
let m;
|
|
1422
|
+
a.index === l.start ? m = {
|
|
1423
1423
|
index: c,
|
|
1424
1424
|
type: "group"
|
|
1425
|
-
} :
|
|
1425
|
+
} : m = {
|
|
1426
1426
|
groupIndex: c,
|
|
1427
1427
|
index: a.index - (c + 1) + n
|
|
1428
1428
|
}, s.push({
|
|
1429
|
-
...
|
|
1429
|
+
...m,
|
|
1430
1430
|
data: a.data,
|
|
1431
1431
|
offset: a.offset,
|
|
1432
1432
|
originalIndex: a.index,
|
|
@@ -1435,102 +1435,102 @@ function Sn(t, e, n) {
|
|
|
1435
1435
|
}
|
|
1436
1436
|
return s;
|
|
1437
1437
|
}
|
|
1438
|
-
const
|
|
1438
|
+
const $t = 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
|
-
{ initialTopMostItemIndex: a, scrolledToInitialItem:
|
|
1443
|
+
{ initialTopMostItemIndex: a, scrolledToInitialItem: m },
|
|
1444
1444
|
{ topListHeight: S },
|
|
1445
1445
|
g,
|
|
1446
|
-
{ didMount:
|
|
1446
|
+
{ didMount: I },
|
|
1447
1447
|
{ recalcInProgress: w }
|
|
1448
1448
|
]) => {
|
|
1449
|
-
const v = C([]),
|
|
1449
|
+
const v = C([]), h = C(0), p = $();
|
|
1450
1450
|
O(s.topItemsIndexes, v);
|
|
1451
1451
|
const u = ct(
|
|
1452
1452
|
x(
|
|
1453
1453
|
rt(
|
|
1454
|
-
|
|
1454
|
+
I,
|
|
1455
1455
|
w,
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1456
|
+
V(c, se),
|
|
1457
|
+
V(r),
|
|
1458
|
+
V(o),
|
|
1459
|
+
V(a),
|
|
1460
|
+
m,
|
|
1461
|
+
V(v),
|
|
1462
|
+
V(e),
|
|
1463
|
+
V(n),
|
|
1464
1464
|
t
|
|
1465
1465
|
),
|
|
1466
|
-
|
|
1467
|
-
const L =
|
|
1468
|
-
return
|
|
1466
|
+
A(([d, y, , B, , , , , , , k]) => {
|
|
1467
|
+
const L = k && k.length !== B;
|
|
1468
|
+
return d && !y && !L;
|
|
1469
1469
|
}),
|
|
1470
1470
|
E(
|
|
1471
1471
|
([
|
|
1472
1472
|
,
|
|
1473
1473
|
,
|
|
1474
|
-
[
|
|
1474
|
+
[d, y],
|
|
1475
|
+
B,
|
|
1475
1476
|
k,
|
|
1476
|
-
F,
|
|
1477
1477
|
L,
|
|
1478
|
-
|
|
1479
|
-
|
|
1478
|
+
z,
|
|
1479
|
+
_,
|
|
1480
1480
|
J,
|
|
1481
1481
|
nt,
|
|
1482
|
-
|
|
1482
|
+
F
|
|
1483
1483
|
]) => {
|
|
1484
|
-
const Y =
|
|
1485
|
-
if (
|
|
1486
|
-
return { ...Be, totalCount:
|
|
1487
|
-
if (
|
|
1488
|
-
return St === 0 ? { ...Be, totalCount:
|
|
1484
|
+
const Y = k, { offsetTree: it, sizeTree: dt } = Y, St = ot(h);
|
|
1485
|
+
if (B === 0)
|
|
1486
|
+
return { ...Be, totalCount: B };
|
|
1487
|
+
if (d === 0 && y === 0)
|
|
1488
|
+
return St === 0 ? { ...Be, totalCount: B } : Un(St, L, k, J, nt, F || []);
|
|
1489
1489
|
if (j(dt))
|
|
1490
1490
|
return St > 0 ? null : Ie(
|
|
1491
|
-
|
|
1491
|
+
_o(Ke(L, B), Y, F),
|
|
1492
1492
|
[],
|
|
1493
|
-
|
|
1493
|
+
B,
|
|
1494
1494
|
nt,
|
|
1495
1495
|
Y,
|
|
1496
1496
|
J
|
|
1497
1497
|
);
|
|
1498
1498
|
const ft = [];
|
|
1499
|
-
if (
|
|
1500
|
-
const Mt =
|
|
1499
|
+
if (_.length > 0) {
|
|
1500
|
+
const Mt = _[0], yt = _[_.length - 1];
|
|
1501
1501
|
let Bt = 0;
|
|
1502
|
-
for (const
|
|
1503
|
-
const
|
|
1502
|
+
for (const R of ye(dt, Mt, yt)) {
|
|
1503
|
+
const D = R.value, Q = Math.max(R.start, Mt), lt = Math.min(R.end, yt);
|
|
1504
1504
|
for (let tt = Q; tt <= lt; tt++)
|
|
1505
|
-
ft.push({ data:
|
|
1505
|
+
ft.push({ data: F == null ? void 0 : F[tt], index: tt, offset: Bt, size: D }), Bt += D;
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
if (!
|
|
1509
|
-
return Ie([], ft,
|
|
1510
|
-
const ut =
|
|
1508
|
+
if (!z)
|
|
1509
|
+
return Ie([], ft, B, nt, Y, J);
|
|
1510
|
+
const ut = _.length > 0 ? _[_.length - 1] + 1 : 0, At = Bo(it, d, y, ut);
|
|
1511
1511
|
if (At.length === 0)
|
|
1512
1512
|
return null;
|
|
1513
|
-
const xt =
|
|
1514
|
-
for (const
|
|
1515
|
-
const Bt =
|
|
1516
|
-
let
|
|
1513
|
+
const xt = B - 1, Xt = ve([], (Mt) => {
|
|
1514
|
+
for (const yt of At) {
|
|
1515
|
+
const Bt = yt.value;
|
|
1516
|
+
let R = Bt.offset, D = yt.start;
|
|
1517
1517
|
const Q = Bt.size;
|
|
1518
|
-
if (Bt.offset <
|
|
1519
|
-
|
|
1520
|
-
const tt =
|
|
1521
|
-
|
|
1518
|
+
if (Bt.offset < d) {
|
|
1519
|
+
D += Math.floor((d - Bt.offset + nt) / (Q + nt));
|
|
1520
|
+
const tt = D - yt.start;
|
|
1521
|
+
R += tt * Q + tt * nt;
|
|
1522
1522
|
}
|
|
1523
|
-
|
|
1524
|
-
const lt = Math.min(
|
|
1525
|
-
for (let tt =
|
|
1526
|
-
Mt.push({ data:
|
|
1523
|
+
D < ut && (R += (ut - D) * Q, D = ut);
|
|
1524
|
+
const lt = Math.min(yt.end, xt);
|
|
1525
|
+
for (let tt = D; tt <= lt && !(R >= y); tt++)
|
|
1526
|
+
Mt.push({ data: F == null ? void 0 : F[tt], index: tt, offset: R, size: Q }), R += Q + nt;
|
|
1527
1527
|
}
|
|
1528
1528
|
});
|
|
1529
|
-
return Ie(Xt, ft,
|
|
1529
|
+
return Ie(Xt, ft, B, nt, Y, J);
|
|
1530
1530
|
}
|
|
1531
1531
|
),
|
|
1532
1532
|
//@ts-expect-error filter needs to be fixed
|
|
1533
|
-
|
|
1533
|
+
A((d) => d !== null),
|
|
1534
1534
|
Z()
|
|
1535
1535
|
),
|
|
1536
1536
|
Be
|
|
@@ -1538,76 +1538,76 @@ const Dt = U(
|
|
|
1538
1538
|
O(
|
|
1539
1539
|
x(
|
|
1540
1540
|
t,
|
|
1541
|
-
|
|
1542
|
-
E((
|
|
1541
|
+
A(We),
|
|
1542
|
+
E((d) => d == null ? void 0 : d.length)
|
|
1543
1543
|
),
|
|
1544
1544
|
r
|
|
1545
1545
|
), O(
|
|
1546
1546
|
x(
|
|
1547
1547
|
u,
|
|
1548
|
-
E((
|
|
1548
|
+
E((d) => d.topListHeight)
|
|
1549
1549
|
),
|
|
1550
1550
|
S
|
|
1551
1551
|
), O(S, l), O(
|
|
1552
1552
|
x(
|
|
1553
1553
|
u,
|
|
1554
|
-
E((
|
|
1554
|
+
E((d) => [d.top, d.bottom])
|
|
1555
1555
|
),
|
|
1556
1556
|
i
|
|
1557
1557
|
), O(
|
|
1558
1558
|
x(
|
|
1559
1559
|
u,
|
|
1560
|
-
E((
|
|
1560
|
+
E((d) => d.items)
|
|
1561
1561
|
),
|
|
1562
|
-
|
|
1562
|
+
p
|
|
1563
1563
|
);
|
|
1564
1564
|
const T = ht(
|
|
1565
1565
|
x(
|
|
1566
1566
|
u,
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
E(([,
|
|
1567
|
+
A(({ items: d }) => d.length > 0),
|
|
1568
|
+
N(r, t),
|
|
1569
|
+
A(([{ items: d }, y]) => d[d.length - 1].originalIndex === y - 1),
|
|
1570
|
+
E(([, d, y]) => [d - 1, y]),
|
|
1571
1571
|
Z(se),
|
|
1572
|
-
E(([
|
|
1572
|
+
E(([d]) => d)
|
|
1573
1573
|
)
|
|
1574
|
-
),
|
|
1574
|
+
), b = ht(
|
|
1575
1575
|
x(
|
|
1576
1576
|
u,
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
E(({ items:
|
|
1577
|
+
kt(200),
|
|
1578
|
+
A(({ items: d, topItems: y }) => d.length > 0 && d[0].originalIndex === y.length),
|
|
1579
|
+
E(({ items: d }) => d[0].index),
|
|
1580
1580
|
Z()
|
|
1581
1581
|
)
|
|
1582
|
-
),
|
|
1582
|
+
), f = ht(
|
|
1583
1583
|
x(
|
|
1584
1584
|
u,
|
|
1585
|
-
|
|
1586
|
-
E(({ items:
|
|
1587
|
-
let
|
|
1588
|
-
for (;
|
|
1589
|
-
|
|
1590
|
-
for (;
|
|
1591
|
-
|
|
1585
|
+
A(({ items: d }) => d.length > 0),
|
|
1586
|
+
E(({ items: d }) => {
|
|
1587
|
+
let y = 0, B = d.length - 1;
|
|
1588
|
+
for (; d[y].type === "group" && y < B; )
|
|
1589
|
+
y++;
|
|
1590
|
+
for (; d[B].type === "group" && B > y; )
|
|
1591
|
+
B--;
|
|
1592
1592
|
return {
|
|
1593
|
-
endIndex:
|
|
1594
|
-
startIndex:
|
|
1593
|
+
endIndex: d[B].index,
|
|
1594
|
+
startIndex: d[y].index
|
|
1595
1595
|
};
|
|
1596
1596
|
}),
|
|
1597
1597
|
Z(Mn)
|
|
1598
1598
|
)
|
|
1599
1599
|
);
|
|
1600
|
-
return { endReached: T, initialItemCount:
|
|
1600
|
+
return { endReached: T, initialItemCount: h, itemsRendered: p, listState: u, rangeChanged: f, startReached: b, topItemsIndexes: v, ...g };
|
|
1601
1601
|
},
|
|
1602
1602
|
X(
|
|
1603
1603
|
Et,
|
|
1604
1604
|
Nn,
|
|
1605
|
-
|
|
1605
|
+
je,
|
|
1606
1606
|
ue,
|
|
1607
1607
|
ce,
|
|
1608
1608
|
ae,
|
|
1609
1609
|
Pt,
|
|
1610
|
-
|
|
1610
|
+
De
|
|
1611
1611
|
),
|
|
1612
1612
|
{ singleton: !0 }
|
|
1613
1613
|
), Kn = U(
|
|
@@ -1615,22 +1615,22 @@ const Dt = U(
|
|
|
1615
1615
|
const s = $(), i = ct(
|
|
1616
1616
|
x(
|
|
1617
1617
|
rt(n, t, o, e, r),
|
|
1618
|
-
E(([l, c, a,
|
|
1618
|
+
E(([l, c, a, m, S]) => l + c + a + m + S.offsetBottom + S.bottom)
|
|
1619
1619
|
),
|
|
1620
1620
|
0
|
|
1621
1621
|
);
|
|
1622
|
-
return O(
|
|
1622
|
+
return O(V(i), s), { totalListHeight: i, totalListHeightChanged: s };
|
|
1623
1623
|
},
|
|
1624
|
-
X(at,
|
|
1624
|
+
X(at, $t),
|
|
1625
1625
|
{ singleton: !0 }
|
|
1626
|
-
),
|
|
1626
|
+
), No = U(
|
|
1627
1627
|
([{ viewportHeight: t }, { totalListHeight: e }]) => {
|
|
1628
1628
|
const n = C(!1), o = ct(
|
|
1629
1629
|
x(
|
|
1630
1630
|
rt(n, t, e),
|
|
1631
|
-
|
|
1631
|
+
A(([r]) => r),
|
|
1632
1632
|
E(([, r, s]) => Math.max(0, r - s)),
|
|
1633
|
-
|
|
1633
|
+
kt(0),
|
|
1634
1634
|
Z()
|
|
1635
1635
|
),
|
|
1636
1636
|
0
|
|
@@ -1639,103 +1639,192 @@ const Dt = U(
|
|
|
1639
1639
|
},
|
|
1640
1640
|
X(at, Kn),
|
|
1641
1641
|
{ singleton: !0 }
|
|
1642
|
+
), jn = U(() => ({
|
|
1643
|
+
context: C(null)
|
|
1644
|
+
})), Do = ({
|
|
1645
|
+
itemBottom: t,
|
|
1646
|
+
itemTop: e,
|
|
1647
|
+
locationParams: { align: n, behavior: o, ...r },
|
|
1648
|
+
viewportBottom: s,
|
|
1649
|
+
viewportTop: i
|
|
1650
|
+
}) => e < i ? { ...r, align: n != null ? n : "start", behavior: o } : t > s ? { ...r, align: n != null ? n : "end", behavior: o } : null, qn = U(
|
|
1651
|
+
([
|
|
1652
|
+
{ gap: t, sizes: e, totalCount: n },
|
|
1653
|
+
{ fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: c },
|
|
1654
|
+
{ scrollToIndex: a }
|
|
1655
|
+
]) => {
|
|
1656
|
+
const m = $();
|
|
1657
|
+
return O(
|
|
1658
|
+
x(
|
|
1659
|
+
m,
|
|
1660
|
+
N(e, c, n, s, r, o, l),
|
|
1661
|
+
N(t),
|
|
1662
|
+
E(([[S, g, I, w, v, h, p, u], T]) => {
|
|
1663
|
+
const { align: b, behavior: f, calculateViewLocation: d = Do, done: y, ...B } = S, k = _n(S, g, w - 1), L = ie(k, g.offsetTree, T) + v + h, z = L + wt(g.sizeTree, k)[1], _ = u + h, J = u + I - p, nt = d({
|
|
1664
|
+
itemBottom: z,
|
|
1665
|
+
itemTop: L,
|
|
1666
|
+
locationParams: { align: b, behavior: f, ...B },
|
|
1667
|
+
viewportBottom: J,
|
|
1668
|
+
viewportTop: _
|
|
1669
|
+
});
|
|
1670
|
+
return nt ? y && Tt(
|
|
1671
|
+
x(
|
|
1672
|
+
i,
|
|
1673
|
+
A((F) => !F),
|
|
1674
|
+
// skips the initial publish of false, and the cleanup call.
|
|
1675
|
+
// but if scrollingInProgress is true, we skip the initial publish.
|
|
1676
|
+
Dt(ot(i) ? 1 : 2)
|
|
1677
|
+
),
|
|
1678
|
+
y
|
|
1679
|
+
) : y && y(), nt;
|
|
1680
|
+
}),
|
|
1681
|
+
A((S) => S !== null)
|
|
1682
|
+
),
|
|
1683
|
+
a
|
|
1684
|
+
), {
|
|
1685
|
+
scrollIntoView: m
|
|
1686
|
+
};
|
|
1687
|
+
},
|
|
1688
|
+
X(Et, at, ce, $t, Vt),
|
|
1689
|
+
{ singleton: !0 }
|
|
1642
1690
|
);
|
|
1643
1691
|
function xn(t) {
|
|
1644
1692
|
return t ? t === "smooth" ? "smooth" : "auto" : !1;
|
|
1645
1693
|
}
|
|
1646
|
-
const
|
|
1694
|
+
const $o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), Uo = U(
|
|
1647
1695
|
([
|
|
1648
|
-
{ listRefresh: t, totalCount: e, fixedItemSize: n },
|
|
1649
|
-
{ atBottomState:
|
|
1650
|
-
{ scrollToIndex:
|
|
1651
|
-
{ scrolledToInitialItem:
|
|
1652
|
-
{ didMount:
|
|
1653
|
-
{ log:
|
|
1654
|
-
{ scrollingInProgress:
|
|
1696
|
+
{ listRefresh: t, totalCount: e, fixedItemSize: n, data: o },
|
|
1697
|
+
{ atBottomState: r, isAtBottom: s },
|
|
1698
|
+
{ scrollToIndex: i },
|
|
1699
|
+
{ scrolledToInitialItem: l },
|
|
1700
|
+
{ didMount: c, propsReady: a },
|
|
1701
|
+
{ log: m },
|
|
1702
|
+
{ scrollingInProgress: S },
|
|
1703
|
+
{ context: g },
|
|
1704
|
+
{ scrollIntoView: I }
|
|
1655
1705
|
]) => {
|
|
1656
|
-
const
|
|
1706
|
+
const w = C(!1), v = $();
|
|
1657
1707
|
let h = null;
|
|
1658
|
-
function
|
|
1659
|
-
G(
|
|
1708
|
+
function p(f) {
|
|
1709
|
+
G(i, {
|
|
1660
1710
|
align: "end",
|
|
1661
|
-
behavior:
|
|
1711
|
+
behavior: f,
|
|
1662
1712
|
index: "LAST"
|
|
1663
1713
|
});
|
|
1664
1714
|
}
|
|
1665
1715
|
K(
|
|
1666
1716
|
x(
|
|
1667
|
-
rt(x(
|
|
1668
|
-
|
|
1669
|
-
E(([[
|
|
1670
|
-
let
|
|
1671
|
-
return
|
|
1717
|
+
rt(x(V(e), Dt(1)), c),
|
|
1718
|
+
N(V(w), s, l, S),
|
|
1719
|
+
E(([[f, d], y, B, k, L]) => {
|
|
1720
|
+
let z = d && k, _ = "auto";
|
|
1721
|
+
return z && (_ = $o(y, B || L), z = z && !!_), { followOutputBehavior: _, shouldFollow: z, totalCount: f };
|
|
1672
1722
|
}),
|
|
1673
|
-
|
|
1723
|
+
A(({ shouldFollow: f }) => f)
|
|
1674
1724
|
),
|
|
1675
|
-
({ followOutputBehavior:
|
|
1676
|
-
h && (h(), h = null),
|
|
1677
|
-
|
|
1678
|
-
}) : h =
|
|
1679
|
-
|
|
1725
|
+
({ followOutputBehavior: f, totalCount: d }) => {
|
|
1726
|
+
h && (h(), h = null), ot(n) ? requestAnimationFrame(() => {
|
|
1727
|
+
ot(m)("following output to ", { totalCount: d }, mt.DEBUG), p(f);
|
|
1728
|
+
}) : h = Tt(t, () => {
|
|
1729
|
+
ot(m)("following output to ", { totalCount: d }, mt.DEBUG), p(f), h = null;
|
|
1680
1730
|
});
|
|
1681
1731
|
}
|
|
1682
1732
|
);
|
|
1683
|
-
function
|
|
1684
|
-
const d =
|
|
1685
|
-
|
|
1733
|
+
function u(f) {
|
|
1734
|
+
const d = Tt(r, (y) => {
|
|
1735
|
+
f && !y.atBottom && y.notAtBottomBecause === "SIZE_INCREASED" && !h && (ot(m)("scrolling to bottom due to increased size", {}, mt.DEBUG), p("auto"));
|
|
1686
1736
|
});
|
|
1687
1737
|
setTimeout(d, 100);
|
|
1688
1738
|
}
|
|
1689
|
-
|
|
1739
|
+
K(
|
|
1690
1740
|
x(
|
|
1691
|
-
rt(
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
({ value:
|
|
1741
|
+
rt(V(w), e, a),
|
|
1742
|
+
A(([f, , d]) => f && d),
|
|
1743
|
+
bt(
|
|
1744
|
+
({ value: f }, [, d]) => ({ refreshed: f === d, value: d }),
|
|
1695
1745
|
{ refreshed: !1, value: 0 }
|
|
1696
1746
|
),
|
|
1697
|
-
|
|
1698
|
-
|
|
1747
|
+
A(({ refreshed: f }) => f),
|
|
1748
|
+
N(w, e)
|
|
1699
1749
|
),
|
|
1700
|
-
([,
|
|
1701
|
-
|
|
1750
|
+
([, f]) => {
|
|
1751
|
+
ot(l) && u(f !== !1);
|
|
1702
1752
|
}
|
|
1703
|
-
), K(
|
|
1704
|
-
|
|
1705
|
-
}), K(rt(
|
|
1706
|
-
|
|
1707
|
-
})
|
|
1753
|
+
), K(v, () => {
|
|
1754
|
+
u(ot(w) !== !1);
|
|
1755
|
+
}), K(rt(V(w), r), ([f, d]) => {
|
|
1756
|
+
f && !d.atBottom && d.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && p("auto");
|
|
1757
|
+
});
|
|
1758
|
+
const T = C(null), b = $();
|
|
1759
|
+
return O(
|
|
1760
|
+
Le(
|
|
1761
|
+
x(
|
|
1762
|
+
V(o),
|
|
1763
|
+
E((f) => {
|
|
1764
|
+
var d;
|
|
1765
|
+
return (d = f == null ? void 0 : f.length) != null ? d : 0;
|
|
1766
|
+
})
|
|
1767
|
+
),
|
|
1768
|
+
x(V(e))
|
|
1769
|
+
),
|
|
1770
|
+
b
|
|
1771
|
+
), K(
|
|
1772
|
+
x(
|
|
1773
|
+
rt(x(b, Dt(1)), c),
|
|
1774
|
+
N(V(T), l, S, g),
|
|
1775
|
+
E(([[f, d], y, B, k, L]) => d && B && (y == null ? void 0 : y({ context: L, totalCount: f, scrollingInProgress: k }))),
|
|
1776
|
+
A((f) => !!f),
|
|
1777
|
+
kt(0)
|
|
1778
|
+
),
|
|
1779
|
+
(f) => {
|
|
1780
|
+
h && (h(), h = null), ot(n) ? requestAnimationFrame(() => {
|
|
1781
|
+
ot(m)("scrolling into view", {}), G(I, f);
|
|
1782
|
+
}) : h = Tt(t, () => {
|
|
1783
|
+
ot(m)("scrolling into view", {}), G(I, f), h = null;
|
|
1784
|
+
});
|
|
1785
|
+
}
|
|
1786
|
+
), { autoscrollToBottom: v, followOutput: w, scrollIntoViewOnChange: T };
|
|
1708
1787
|
},
|
|
1709
|
-
X(
|
|
1710
|
-
|
|
1788
|
+
X(
|
|
1789
|
+
Et,
|
|
1790
|
+
ae,
|
|
1791
|
+
ce,
|
|
1792
|
+
ue,
|
|
1793
|
+
Pt,
|
|
1794
|
+
Vt,
|
|
1795
|
+
at,
|
|
1796
|
+
jn,
|
|
1797
|
+
qn
|
|
1798
|
+
)
|
|
1799
|
+
), Ko = U(
|
|
1711
1800
|
([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (O(
|
|
1712
1801
|
x(
|
|
1713
1802
|
l,
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
E(([[, c], a,
|
|
1803
|
+
N(s),
|
|
1804
|
+
A(([, c]) => c !== 0),
|
|
1805
|
+
N(r, o, e, n, t),
|
|
1806
|
+
E(([[, c], a, m, S, g, I = []]) => Un(c, a, m, S, g, I))
|
|
1718
1807
|
),
|
|
1719
1808
|
i
|
|
1720
1809
|
), {}),
|
|
1721
|
-
X(Et, ue,
|
|
1810
|
+
X(Et, ue, $t, Pt),
|
|
1722
1811
|
{ singleton: !0 }
|
|
1723
|
-
),
|
|
1812
|
+
), jo = U(
|
|
1724
1813
|
([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
|
|
1725
1814
|
const o = C(0);
|
|
1726
1815
|
return K(
|
|
1727
1816
|
x(
|
|
1728
1817
|
t,
|
|
1729
|
-
|
|
1730
|
-
|
|
1818
|
+
N(o),
|
|
1819
|
+
A(([, r]) => r !== 0),
|
|
1731
1820
|
E(([, r]) => ({ top: r }))
|
|
1732
1821
|
),
|
|
1733
1822
|
(r) => {
|
|
1734
|
-
|
|
1823
|
+
Tt(
|
|
1735
1824
|
x(
|
|
1736
1825
|
n,
|
|
1737
|
-
|
|
1738
|
-
|
|
1826
|
+
Dt(1),
|
|
1827
|
+
A((s) => s.items.length > 1)
|
|
1739
1828
|
),
|
|
1740
1829
|
() => {
|
|
1741
1830
|
requestAnimationFrame(() => {
|
|
@@ -1748,62 +1837,16 @@ const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
|
|
|
1748
1837
|
initialScrollTop: o
|
|
1749
1838
|
};
|
|
1750
1839
|
},
|
|
1751
|
-
X(Pt, at,
|
|
1840
|
+
X(Pt, at, $t),
|
|
1752
1841
|
{ singleton: !0 }
|
|
1753
|
-
),
|
|
1754
|
-
itemBottom: t,
|
|
1755
|
-
itemTop: e,
|
|
1756
|
-
locationParams: { align: n, behavior: o, ...r },
|
|
1757
|
-
viewportBottom: s,
|
|
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, Ko = U(
|
|
1760
|
-
([
|
|
1761
|
-
{ gap: t, sizes: e, totalCount: n },
|
|
1762
|
-
{ fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: c },
|
|
1763
|
-
{ scrollToIndex: a }
|
|
1764
|
-
]) => {
|
|
1765
|
-
const p = $();
|
|
1766
|
-
return O(
|
|
1767
|
-
x(
|
|
1768
|
-
p,
|
|
1769
|
-
_(e, c, n, s, r, o, l),
|
|
1770
|
-
_(t),
|
|
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
|
-
itemBottom: V,
|
|
1774
|
-
itemTop: L,
|
|
1775
|
-
locationParams: { align: R, behavior: I, ...k },
|
|
1776
|
-
viewportBottom: J,
|
|
1777
|
-
viewportTop: D
|
|
1778
|
-
});
|
|
1779
|
-
return nt ? b && bt(
|
|
1780
|
-
x(
|
|
1781
|
-
i,
|
|
1782
|
-
P((B) => !B),
|
|
1783
|
-
// skips the initial publish of false, and the cleanup call.
|
|
1784
|
-
// but if scrollingInProgress is true, we skip the initial publish.
|
|
1785
|
-
jt(st(i) ? 1 : 2)
|
|
1786
|
-
),
|
|
1787
|
-
b
|
|
1788
|
-
) : b && b(), nt;
|
|
1789
|
-
}),
|
|
1790
|
-
P((S) => S !== null)
|
|
1791
|
-
),
|
|
1792
|
-
a
|
|
1793
|
-
), {
|
|
1794
|
-
scrollIntoView: p
|
|
1795
|
-
};
|
|
1796
|
-
},
|
|
1797
|
-
X(Et, at, ce, Dt, Vt),
|
|
1798
|
-
{ singleton: !0 }
|
|
1799
|
-
), jn = U(
|
|
1842
|
+
), Yn = U(
|
|
1800
1843
|
([{ scrollVelocity: t }]) => {
|
|
1801
1844
|
const e = C(!1), n = $(), o = C(!1);
|
|
1802
1845
|
return O(
|
|
1803
1846
|
x(
|
|
1804
1847
|
t,
|
|
1805
|
-
|
|
1806
|
-
|
|
1848
|
+
N(o, e, n),
|
|
1849
|
+
A(([r, s]) => !!s),
|
|
1807
1850
|
E(([r, s, i, l]) => {
|
|
1808
1851
|
const { enter: c, exit: a } = s;
|
|
1809
1852
|
if (i) {
|
|
@@ -1817,7 +1860,7 @@ const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
|
|
|
1817
1860
|
),
|
|
1818
1861
|
e
|
|
1819
1862
|
), K(
|
|
1820
|
-
x(rt(e, t, n),
|
|
1863
|
+
x(rt(e, t, n), N(o)),
|
|
1821
1864
|
([[r, s, i], l]) => {
|
|
1822
1865
|
r && l && l.change && l.change(s, i);
|
|
1823
1866
|
}
|
|
@@ -1825,14 +1868,14 @@ const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
|
|
|
1825
1868
|
},
|
|
1826
1869
|
X(ae),
|
|
1827
1870
|
{ singleton: !0 }
|
|
1828
|
-
),
|
|
1871
|
+
), qe = U(([{ scrollContainerState: t, scrollTo: e }]) => {
|
|
1829
1872
|
const n = $(), o = $(), r = $(), s = C(!1), i = C(void 0);
|
|
1830
1873
|
return O(
|
|
1831
1874
|
x(
|
|
1832
1875
|
rt(n, o),
|
|
1833
|
-
E(([{ scrollHeight: l, scrollTop: c, viewportHeight: a }, { offsetTop:
|
|
1876
|
+
E(([{ scrollHeight: l, scrollTop: c, viewportHeight: a }, { offsetTop: m }]) => ({
|
|
1834
1877
|
scrollHeight: l,
|
|
1835
|
-
scrollTop: Math.max(0, c -
|
|
1878
|
+
scrollTop: Math.max(0, c - m),
|
|
1836
1879
|
viewportHeight: a
|
|
1837
1880
|
}))
|
|
1838
1881
|
),
|
|
@@ -1840,7 +1883,7 @@ const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
|
|
|
1840
1883
|
), O(
|
|
1841
1884
|
x(
|
|
1842
1885
|
e,
|
|
1843
|
-
|
|
1886
|
+
N(o),
|
|
1844
1887
|
E(([l, { offsetTop: c }]) => ({
|
|
1845
1888
|
...l,
|
|
1846
1889
|
top: l.top + c
|
|
@@ -1857,7 +1900,7 @@ const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
|
|
|
1857
1900
|
windowScrollTo: r,
|
|
1858
1901
|
windowViewportRect: o
|
|
1859
1902
|
};
|
|
1860
|
-
}, X(at)),
|
|
1903
|
+
}, X(at)), qo = U(
|
|
1861
1904
|
([
|
|
1862
1905
|
{ sizeRanges: t, sizes: e },
|
|
1863
1906
|
{ headerHeight: n, scrollTop: o },
|
|
@@ -1865,130 +1908,130 @@ const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
|
|
|
1865
1908
|
{ didMount: s },
|
|
1866
1909
|
{ useWindowScroll: i, windowScrollContainerState: l, windowViewportRect: c }
|
|
1867
1910
|
]) => {
|
|
1868
|
-
const a = $(),
|
|
1911
|
+
const a = $(), m = C(void 0), S = C(null), g = C(null);
|
|
1869
1912
|
return O(l, S), O(c, g), K(
|
|
1870
1913
|
x(
|
|
1871
1914
|
a,
|
|
1872
|
-
|
|
1915
|
+
N(e, o, i, S, g, n)
|
|
1873
1916
|
),
|
|
1874
|
-
([
|
|
1875
|
-
const
|
|
1876
|
-
|
|
1917
|
+
([I, w, v, h, p, u, T]) => {
|
|
1918
|
+
const b = Fo(w.sizeTree);
|
|
1919
|
+
h && p !== null && u !== null && (v = p.scrollTop - u.offsetTop), v -= T, I({ ranges: b, scrollTop: v });
|
|
1877
1920
|
}
|
|
1878
|
-
), O(x(
|
|
1921
|
+
), O(x(m, A(We), E(Yo)), r), O(
|
|
1879
1922
|
x(
|
|
1880
1923
|
s,
|
|
1881
|
-
|
|
1882
|
-
|
|
1924
|
+
N(m),
|
|
1925
|
+
A(([, I]) => I !== void 0),
|
|
1883
1926
|
Z(),
|
|
1884
|
-
E(([,
|
|
1927
|
+
E(([, I]) => I.ranges)
|
|
1885
1928
|
),
|
|
1886
1929
|
t
|
|
1887
1930
|
), {
|
|
1888
1931
|
getState: a,
|
|
1889
|
-
restoreStateFrom:
|
|
1932
|
+
restoreStateFrom: m
|
|
1890
1933
|
};
|
|
1891
1934
|
},
|
|
1892
|
-
X(Et, at, ue, Pt,
|
|
1935
|
+
X(Et, at, ue, Pt, qe)
|
|
1893
1936
|
);
|
|
1894
|
-
function
|
|
1937
|
+
function Yo(t) {
|
|
1895
1938
|
return { align: "start", index: 0, offset: t.scrollTop };
|
|
1896
1939
|
}
|
|
1897
|
-
const
|
|
1940
|
+
const Zo = U(([{ topItemsIndexes: t }]) => {
|
|
1898
1941
|
const e = C(0);
|
|
1899
1942
|
return O(
|
|
1900
1943
|
x(
|
|
1901
1944
|
e,
|
|
1902
|
-
|
|
1945
|
+
A((n) => n >= 0),
|
|
1903
1946
|
E((n) => Array.from({ length: n }).map((o, r) => r))
|
|
1904
1947
|
),
|
|
1905
1948
|
t
|
|
1906
1949
|
), { topItemCount: e };
|
|
1907
|
-
}, X(
|
|
1908
|
-
function
|
|
1950
|
+
}, X($t));
|
|
1951
|
+
function Zn(t) {
|
|
1909
1952
|
let e = !1, n;
|
|
1910
1953
|
return () => (e || (e = !0, n = t()), n);
|
|
1911
1954
|
}
|
|
1912
|
-
const
|
|
1955
|
+
const Xo = Zn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Jo = U(
|
|
1913
1956
|
([
|
|
1914
1957
|
{ deviation: t, scrollBy: e, scrollingInProgress: n, scrollTop: o },
|
|
1915
1958
|
{ isAtBottom: r, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: l },
|
|
1916
1959
|
{ listState: c },
|
|
1917
|
-
{ beforeUnshiftWith: a, gap:
|
|
1918
|
-
{ log:
|
|
1960
|
+
{ beforeUnshiftWith: a, gap: m, shiftWithOffset: S, sizes: g },
|
|
1961
|
+
{ log: I },
|
|
1919
1962
|
{ recalcInProgress: w }
|
|
1920
1963
|
]) => {
|
|
1921
1964
|
const v = ht(
|
|
1922
1965
|
x(
|
|
1923
1966
|
c,
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
([,
|
|
1927
|
-
const
|
|
1967
|
+
N(i),
|
|
1968
|
+
bt(
|
|
1969
|
+
([, p, u, T], [{ bottom: b, items: f, offsetBottom: d, totalCount: y }, B]) => {
|
|
1970
|
+
const k = b + d;
|
|
1928
1971
|
let L = 0;
|
|
1929
|
-
return u ===
|
|
1972
|
+
return u === y && p.length > 0 && f.length > 0 && (f[0].originalIndex === 0 && p[0].originalIndex === 0 || (L = k - T, L !== 0 && (L += B))), [L, f, y, k];
|
|
1930
1973
|
},
|
|
1931
1974
|
[0, [], 0, 0]
|
|
1932
1975
|
),
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
E(([[
|
|
1976
|
+
A(([p]) => p !== 0),
|
|
1977
|
+
N(o, l, n, r, I, w),
|
|
1978
|
+
A(([, p, u, T, , , b]) => !b && !T && p !== 0 && u === le),
|
|
1979
|
+
E(([[p], , , , , u]) => (u("Upward scrolling compensation", { amount: p }, mt.DEBUG), p))
|
|
1937
1980
|
)
|
|
1938
1981
|
);
|
|
1939
|
-
function
|
|
1940
|
-
|
|
1982
|
+
function h(p) {
|
|
1983
|
+
p > 0 ? (G(e, { behavior: "auto", top: -p }), G(t, 0)) : (G(t, 0), G(e, { behavior: "auto", top: -p }));
|
|
1941
1984
|
}
|
|
1942
|
-
return K(x(v,
|
|
1943
|
-
T &&
|
|
1985
|
+
return K(x(v, N(t, s)), ([p, u, T]) => {
|
|
1986
|
+
T && Xo() ? G(t, u - p) : h(-p);
|
|
1944
1987
|
}), K(
|
|
1945
1988
|
x(
|
|
1946
1989
|
rt(ct(s, !1), t, w),
|
|
1947
|
-
|
|
1948
|
-
E(([
|
|
1949
|
-
|
|
1990
|
+
A(([p, u, T]) => !p && !T && u !== 0),
|
|
1991
|
+
E(([p, u]) => u),
|
|
1992
|
+
kt(1)
|
|
1950
1993
|
),
|
|
1951
|
-
|
|
1994
|
+
h
|
|
1952
1995
|
), O(
|
|
1953
1996
|
x(
|
|
1954
1997
|
S,
|
|
1955
|
-
E((
|
|
1998
|
+
E((p) => ({ top: -p }))
|
|
1956
1999
|
),
|
|
1957
2000
|
e
|
|
1958
2001
|
), K(
|
|
1959
2002
|
x(
|
|
1960
2003
|
a,
|
|
1961
|
-
|
|
1962
|
-
E(([
|
|
1963
|
-
function
|
|
1964
|
-
return
|
|
2004
|
+
N(g, m),
|
|
2005
|
+
E(([p, { groupIndices: u, lastSize: T, sizeTree: b }, f]) => {
|
|
2006
|
+
function d(y) {
|
|
2007
|
+
return y * (T + f);
|
|
1965
2008
|
}
|
|
1966
2009
|
if (u.length === 0)
|
|
1967
|
-
return
|
|
2010
|
+
return d(p);
|
|
1968
2011
|
{
|
|
1969
|
-
let
|
|
1970
|
-
const
|
|
1971
|
-
let
|
|
1972
|
-
for (;
|
|
1973
|
-
|
|
1974
|
-
let
|
|
1975
|
-
|
|
2012
|
+
let y = 0;
|
|
2013
|
+
const B = re(b, 0);
|
|
2014
|
+
let k = 0, L = 0;
|
|
2015
|
+
for (; k < p; ) {
|
|
2016
|
+
k++, y += B;
|
|
2017
|
+
let z = u.length === L + 1 ? 1 / 0 : u[L + 1] - u[L] - 1;
|
|
2018
|
+
k + z > p && (y -= B, z = p - k + 1), k += z, y += d(z), L++;
|
|
1976
2019
|
}
|
|
1977
|
-
return
|
|
2020
|
+
return y;
|
|
1978
2021
|
}
|
|
1979
2022
|
})
|
|
1980
2023
|
),
|
|
1981
|
-
(
|
|
1982
|
-
G(t,
|
|
1983
|
-
G(e, { top:
|
|
2024
|
+
(p) => {
|
|
2025
|
+
G(t, p), requestAnimationFrame(() => {
|
|
2026
|
+
G(e, { top: p }), requestAnimationFrame(() => {
|
|
1984
2027
|
G(t, 0), G(w, !1);
|
|
1985
2028
|
});
|
|
1986
2029
|
});
|
|
1987
2030
|
}
|
|
1988
2031
|
), { deviation: t };
|
|
1989
2032
|
},
|
|
1990
|
-
X(at, ae,
|
|
1991
|
-
),
|
|
2033
|
+
X(at, ae, $t, Et, Vt, De)
|
|
2034
|
+
), Qo = U(
|
|
1992
2035
|
([
|
|
1993
2036
|
t,
|
|
1994
2037
|
e,
|
|
@@ -1999,7 +2042,8 @@ const Zo = qn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
1999
2042
|
i,
|
|
2000
2043
|
l,
|
|
2001
2044
|
c,
|
|
2002
|
-
a
|
|
2045
|
+
a,
|
|
2046
|
+
m
|
|
2003
2047
|
]) => ({
|
|
2004
2048
|
...t,
|
|
2005
2049
|
...e,
|
|
@@ -2010,21 +2054,23 @@ const Zo = qn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2010
2054
|
...i,
|
|
2011
2055
|
...l,
|
|
2012
2056
|
...c,
|
|
2013
|
-
...a
|
|
2057
|
+
...a,
|
|
2058
|
+
...m
|
|
2014
2059
|
}),
|
|
2015
2060
|
X(
|
|
2016
|
-
Ke,
|
|
2017
|
-
Do,
|
|
2018
|
-
Pt,
|
|
2019
|
-
jn,
|
|
2020
|
-
Kn,
|
|
2021
|
-
$o,
|
|
2022
|
-
Go,
|
|
2023
2061
|
je,
|
|
2024
2062
|
Ko,
|
|
2025
|
-
|
|
2063
|
+
Pt,
|
|
2064
|
+
Yn,
|
|
2065
|
+
Kn,
|
|
2066
|
+
jo,
|
|
2067
|
+
No,
|
|
2068
|
+
qe,
|
|
2069
|
+
qn,
|
|
2070
|
+
Vt,
|
|
2071
|
+
jn
|
|
2026
2072
|
)
|
|
2027
|
-
),
|
|
2073
|
+
), Xn = U(
|
|
2028
2074
|
([
|
|
2029
2075
|
{
|
|
2030
2076
|
data: t,
|
|
@@ -2037,22 +2083,22 @@ const Zo = qn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2037
2083
|
sizeRanges: l,
|
|
2038
2084
|
sizes: c,
|
|
2039
2085
|
statefulTotalCount: a,
|
|
2040
|
-
totalCount:
|
|
2086
|
+
totalCount: m,
|
|
2041
2087
|
trackItemSizes: S
|
|
2042
2088
|
},
|
|
2043
|
-
{ initialItemFinalLocationReached: g, initialTopMostItemIndex:
|
|
2089
|
+
{ initialItemFinalLocationReached: g, initialTopMostItemIndex: I, scrolledToInitialItem: w },
|
|
2044
2090
|
v,
|
|
2045
|
-
|
|
2091
|
+
h,
|
|
2092
|
+
p,
|
|
2093
|
+
{ listState: u, topItemsIndexes: T, ...b },
|
|
2094
|
+
{ scrollToIndex: f },
|
|
2046
2095
|
d,
|
|
2047
|
-
{
|
|
2048
|
-
{
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
{ groupCounts: k },
|
|
2052
|
-
F
|
|
2053
|
-
]) => (O(R.rangeChanged, F.scrollSeekRangeChanged), O(
|
|
2096
|
+
{ topItemCount: y },
|
|
2097
|
+
{ groupCounts: B },
|
|
2098
|
+
k
|
|
2099
|
+
]) => (O(b.rangeChanged, k.scrollSeekRangeChanged), O(
|
|
2054
2100
|
x(
|
|
2055
|
-
|
|
2101
|
+
k.windowViewportRect,
|
|
2056
2102
|
E((L) => L.visibleHeight)
|
|
2057
2103
|
),
|
|
2058
2104
|
v.viewportHeight
|
|
@@ -2062,46 +2108,46 @@ const Zo = qn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2062
2108
|
firstItemIndex: n,
|
|
2063
2109
|
fixedItemHeight: o,
|
|
2064
2110
|
gap: r,
|
|
2065
|
-
groupCounts:
|
|
2111
|
+
groupCounts: B,
|
|
2066
2112
|
initialItemFinalLocationReached: g,
|
|
2067
|
-
initialTopMostItemIndex:
|
|
2113
|
+
initialTopMostItemIndex: I,
|
|
2068
2114
|
scrolledToInitialItem: w,
|
|
2069
2115
|
sizeRanges: l,
|
|
2070
|
-
topItemCount:
|
|
2116
|
+
topItemCount: y,
|
|
2071
2117
|
topItemsIndexes: T,
|
|
2072
2118
|
// input
|
|
2073
|
-
totalCount:
|
|
2074
|
-
...
|
|
2119
|
+
totalCount: m,
|
|
2120
|
+
...p,
|
|
2075
2121
|
groupIndices: s,
|
|
2076
2122
|
itemSize: i,
|
|
2077
2123
|
listState: u,
|
|
2078
|
-
scrollToIndex:
|
|
2124
|
+
scrollToIndex: f,
|
|
2079
2125
|
// output
|
|
2080
2126
|
statefulTotalCount: a,
|
|
2081
2127
|
trackItemSizes: S,
|
|
2082
2128
|
// exported from stateFlagsSystem
|
|
2083
|
-
...
|
|
2129
|
+
...b,
|
|
2084
2130
|
// the bag of IO from featureGroup1System
|
|
2085
|
-
...
|
|
2131
|
+
...k,
|
|
2086
2132
|
...v,
|
|
2087
2133
|
sizes: c,
|
|
2088
|
-
...
|
|
2134
|
+
...h
|
|
2089
2135
|
}),
|
|
2090
2136
|
X(
|
|
2091
2137
|
Et,
|
|
2092
2138
|
ue,
|
|
2093
2139
|
at,
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2140
|
+
qo,
|
|
2141
|
+
Uo,
|
|
2142
|
+
$t,
|
|
2097
2143
|
ce,
|
|
2098
|
-
|
|
2099
|
-
|
|
2144
|
+
Jo,
|
|
2145
|
+
Zo,
|
|
2100
2146
|
Nn,
|
|
2101
|
-
|
|
2147
|
+
Qo
|
|
2102
2148
|
)
|
|
2103
2149
|
);
|
|
2104
|
-
function
|
|
2150
|
+
function tr(t, e) {
|
|
2105
2151
|
const n = {}, o = {};
|
|
2106
2152
|
let r = 0;
|
|
2107
2153
|
const s = t.length;
|
|
@@ -2112,107 +2158,107 @@ function Qo(t, e) {
|
|
|
2112
2158
|
return n;
|
|
2113
2159
|
}
|
|
2114
2160
|
const pe = typeof document < "u" ? H.useLayoutEffect : H.useEffect;
|
|
2115
|
-
function
|
|
2161
|
+
function Ye(t, e, n) {
|
|
2116
2162
|
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
|
-
|
|
2163
|
+
function c(p, u) {
|
|
2164
|
+
p.propsReady && G(p.propsReady, !1);
|
|
2119
2165
|
for (const T of o) {
|
|
2120
|
-
const
|
|
2121
|
-
G(
|
|
2166
|
+
const b = p[e.required[T]];
|
|
2167
|
+
G(b, u[T]);
|
|
2122
2168
|
}
|
|
2123
2169
|
for (const T of r)
|
|
2124
2170
|
if (T in u) {
|
|
2125
|
-
const
|
|
2126
|
-
G(
|
|
2171
|
+
const b = p[e.optional[T]];
|
|
2172
|
+
G(b, u[T]);
|
|
2127
2173
|
}
|
|
2128
|
-
|
|
2174
|
+
p.propsReady && G(p.propsReady, !0);
|
|
2129
2175
|
}
|
|
2130
|
-
function a(
|
|
2131
|
-
return s.reduce((u, T) => (u[T] = (
|
|
2132
|
-
const
|
|
2133
|
-
G(
|
|
2176
|
+
function a(p) {
|
|
2177
|
+
return s.reduce((u, T) => (u[T] = (b) => {
|
|
2178
|
+
const f = p[e.methods[T]];
|
|
2179
|
+
G(f, b);
|
|
2134
2180
|
}, u), {});
|
|
2135
2181
|
}
|
|
2136
|
-
function p
|
|
2137
|
-
return i.reduce((u, T) => (u[T] =
|
|
2182
|
+
function m(p) {
|
|
2183
|
+
return i.reduce((u, T) => (u[T] = Io(p[e.events[T]]), u), {});
|
|
2138
2184
|
}
|
|
2139
|
-
const S = H.forwardRef((
|
|
2140
|
-
const { children: T, ...
|
|
2141
|
-
c(
|
|
2142
|
-
})), [
|
|
2185
|
+
const S = H.forwardRef((p, u) => {
|
|
2186
|
+
const { children: T, ...b } = p, [f] = H.useState(() => ve(xo(t), (B) => {
|
|
2187
|
+
c(B, b);
|
|
2188
|
+
})), [d] = H.useState(an(m, f));
|
|
2143
2189
|
pe(() => {
|
|
2144
|
-
for (const
|
|
2145
|
-
|
|
2190
|
+
for (const B of i)
|
|
2191
|
+
B in b && K(d[B], b[B]);
|
|
2146
2192
|
return () => {
|
|
2147
|
-
Object.values(
|
|
2193
|
+
Object.values(d).map(Ge);
|
|
2148
2194
|
};
|
|
2149
|
-
}, [
|
|
2150
|
-
c(
|
|
2151
|
-
}), H.useImperativeHandle(u,
|
|
2152
|
-
const
|
|
2153
|
-
return /* @__PURE__ */
|
|
2154
|
-
}), g = (
|
|
2195
|
+
}, [b, d, f]), pe(() => {
|
|
2196
|
+
c(f, b);
|
|
2197
|
+
}), H.useImperativeHandle(u, un(a(f)));
|
|
2198
|
+
const y = n;
|
|
2199
|
+
return /* @__PURE__ */ P(l.Provider, { value: f, children: n ? /* @__PURE__ */ P(y, { ...tr([...o, ...r, ...i], b), children: T }) : T });
|
|
2200
|
+
}), g = (p) => {
|
|
2155
2201
|
const u = H.useContext(l);
|
|
2156
2202
|
return H.useCallback(
|
|
2157
2203
|
(T) => {
|
|
2158
|
-
G(u[
|
|
2204
|
+
G(u[p], T);
|
|
2159
2205
|
},
|
|
2160
|
-
[u,
|
|
2206
|
+
[u, p]
|
|
2161
2207
|
);
|
|
2162
|
-
},
|
|
2163
|
-
const T = H.useContext(l)[
|
|
2164
|
-
(
|
|
2208
|
+
}, I = (p) => {
|
|
2209
|
+
const T = H.useContext(l)[p], b = H.useCallback(
|
|
2210
|
+
(f) => K(T, f),
|
|
2165
2211
|
[T]
|
|
2166
2212
|
);
|
|
2167
2213
|
return H.useSyncExternalStore(
|
|
2168
|
-
|
|
2169
|
-
() =>
|
|
2170
|
-
() =>
|
|
2214
|
+
b,
|
|
2215
|
+
() => ot(T),
|
|
2216
|
+
() => ot(T)
|
|
2171
2217
|
);
|
|
2172
|
-
}, w = (
|
|
2173
|
-
const T = H.useContext(l)[
|
|
2218
|
+
}, w = (p) => {
|
|
2219
|
+
const T = H.useContext(l)[p], [b, f] = H.useState(an(ot, T));
|
|
2174
2220
|
return pe(
|
|
2175
|
-
() => K(T, (
|
|
2176
|
-
|
|
2221
|
+
() => K(T, (d) => {
|
|
2222
|
+
d !== b && f(un(d));
|
|
2177
2223
|
}),
|
|
2178
|
-
[T,
|
|
2179
|
-
),
|
|
2180
|
-
}, v = H.version.startsWith("18") ?
|
|
2224
|
+
[T, b]
|
|
2225
|
+
), b;
|
|
2226
|
+
}, v = H.version.startsWith("18") ? I : w;
|
|
2181
2227
|
return {
|
|
2182
2228
|
Component: S,
|
|
2183
|
-
useEmitter: (
|
|
2184
|
-
const
|
|
2185
|
-
pe(() => K(
|
|
2229
|
+
useEmitter: (p, u) => {
|
|
2230
|
+
const b = H.useContext(l)[p];
|
|
2231
|
+
pe(() => K(b, u), [u, b]);
|
|
2186
2232
|
},
|
|
2187
2233
|
useEmitterValue: v,
|
|
2188
2234
|
usePublisher: g
|
|
2189
2235
|
};
|
|
2190
2236
|
}
|
|
2191
|
-
const be = H.createContext(void 0),
|
|
2237
|
+
const be = H.createContext(void 0), Jn = H.createContext(void 0), Qn = typeof document < "u" ? H.useLayoutEffect : H.useEffect;
|
|
2192
2238
|
function ke(t) {
|
|
2193
2239
|
return "self" in t;
|
|
2194
2240
|
}
|
|
2195
|
-
function
|
|
2241
|
+
function er(t) {
|
|
2196
2242
|
return "body" in t;
|
|
2197
2243
|
}
|
|
2198
|
-
function
|
|
2244
|
+
function to(t, e, n, o = Yt, r, s) {
|
|
2199
2245
|
const i = H.useRef(null), l = H.useRef(null), c = H.useRef(null), a = H.useCallback(
|
|
2200
2246
|
(g) => {
|
|
2201
|
-
let
|
|
2202
|
-
const
|
|
2203
|
-
if (
|
|
2204
|
-
const u = ke(
|
|
2205
|
-
v = s ? u.scrollX : u.scrollY,
|
|
2247
|
+
let I, w, v;
|
|
2248
|
+
const h = g.target;
|
|
2249
|
+
if (er(h) || ke(h)) {
|
|
2250
|
+
const u = ke(h) ? h : h.defaultView;
|
|
2251
|
+
v = s ? u.scrollX : u.scrollY, I = s ? u.document.documentElement.scrollWidth : u.document.documentElement.scrollHeight, w = s ? u.innerWidth : u.innerHeight;
|
|
2206
2252
|
} else
|
|
2207
|
-
v = s ?
|
|
2208
|
-
const
|
|
2253
|
+
v = s ? h.scrollLeft : h.scrollTop, I = s ? h.scrollWidth : h.scrollHeight, w = s ? h.offsetWidth : h.offsetHeight;
|
|
2254
|
+
const p = () => {
|
|
2209
2255
|
t({
|
|
2210
|
-
scrollHeight:
|
|
2256
|
+
scrollHeight: I,
|
|
2211
2257
|
scrollTop: Math.max(v, 0),
|
|
2212
2258
|
viewportHeight: w
|
|
2213
2259
|
});
|
|
2214
2260
|
};
|
|
2215
|
-
g.suppressFlushSync ?
|
|
2261
|
+
g.suppressFlushSync ? p() : ao.flushSync(p), l.current !== null && (v === l.current || v <= 0 || v === I - w) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
|
|
2216
2262
|
},
|
|
2217
2263
|
[t, e, s]
|
|
2218
2264
|
);
|
|
@@ -2222,154 +2268,153 @@ function Jn(t, e, n, o = Yt, r, s) {
|
|
|
2222
2268
|
o(null), g.removeEventListener("scroll", a);
|
|
2223
2269
|
};
|
|
2224
2270
|
}, [i, a, n, o, r]);
|
|
2225
|
-
function
|
|
2226
|
-
const
|
|
2227
|
-
if (!
|
|
2271
|
+
function m(g) {
|
|
2272
|
+
const I = i.current;
|
|
2273
|
+
if (!I || (s ? "offsetWidth" in I && I.offsetWidth === 0 : "offsetHeight" in I && I.offsetHeight === 0))
|
|
2228
2274
|
return;
|
|
2229
2275
|
const w = g.behavior === "smooth";
|
|
2230
|
-
let v,
|
|
2231
|
-
ke(
|
|
2232
|
-
|
|
2233
|
-
s ?
|
|
2234
|
-
), v = s ?
|
|
2235
|
-
const u =
|
|
2236
|
-
if (g.top = Math.ceil(Math.max(Math.min(u, g.top), 0)), $n(v,
|
|
2237
|
-
t({ scrollHeight:
|
|
2276
|
+
let v, h, p;
|
|
2277
|
+
ke(I) ? (h = Math.max(
|
|
2278
|
+
vt(I.document.documentElement, s ? "width" : "height"),
|
|
2279
|
+
s ? I.document.documentElement.scrollWidth : I.document.documentElement.scrollHeight
|
|
2280
|
+
), v = s ? I.innerWidth : I.innerHeight, p = s ? window.scrollX : window.scrollY) : (h = I[s ? "scrollWidth" : "scrollHeight"], v = vt(I, s ? "width" : "height"), p = I[s ? "scrollLeft" : "scrollTop"]);
|
|
2281
|
+
const u = h - v;
|
|
2282
|
+
if (g.top = Math.ceil(Math.max(Math.min(u, g.top), 0)), $n(v, h) || g.top === p) {
|
|
2283
|
+
t({ scrollHeight: h, scrollTop: p, viewportHeight: v }), w && e(!0);
|
|
2238
2284
|
return;
|
|
2239
2285
|
}
|
|
2240
2286
|
w ? (l.current = g.top, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
|
|
2241
2287
|
c.current = null, l.current = null, e(!0);
|
|
2242
|
-
}, 1e3)) : l.current = null, s && (g = { behavior: g.behavior, left: g.top }),
|
|
2288
|
+
}, 1e3)) : l.current = null, s && (g = { behavior: g.behavior, left: g.top }), I.scrollTo(g);
|
|
2243
2289
|
}
|
|
2244
2290
|
function S(g) {
|
|
2245
2291
|
s && (g = { behavior: g.behavior, left: g.top }), i.current.scrollBy(g);
|
|
2246
2292
|
}
|
|
2247
|
-
return { scrollByCallback: S, scrollerRef: i, scrollToCallback:
|
|
2293
|
+
return { scrollByCallback: S, scrollerRef: i, scrollToCallback: m };
|
|
2248
2294
|
}
|
|
2249
|
-
const Fe = "-webkit-sticky", Tn = "sticky",
|
|
2295
|
+
const Fe = "-webkit-sticky", Tn = "sticky", Ze = Zn(() => {
|
|
2250
2296
|
if (typeof document > "u")
|
|
2251
2297
|
return Tn;
|
|
2252
2298
|
const t = document.createElement("div");
|
|
2253
2299
|
return t.style.position = Fe, t.style.position === Fe ? Fe : Tn;
|
|
2254
2300
|
});
|
|
2255
|
-
function
|
|
2301
|
+
function Xe(t) {
|
|
2256
2302
|
return t;
|
|
2257
2303
|
}
|
|
2258
|
-
const
|
|
2259
|
-
const t = C((
|
|
2304
|
+
const nr = /* @__PURE__ */ U(() => {
|
|
2305
|
+
const t = C((l) => `Item ${l}`), e = C((l) => `Group ${l}`), n = C({}), o = C(Xe), r = C("div"), s = C(Yt), i = (l, c = null) => ct(
|
|
2260
2306
|
x(
|
|
2261
|
-
|
|
2262
|
-
E((
|
|
2307
|
+
n,
|
|
2308
|
+
E((a) => a[l]),
|
|
2263
2309
|
Z()
|
|
2264
2310
|
),
|
|
2265
|
-
|
|
2311
|
+
c
|
|
2266
2312
|
);
|
|
2267
2313
|
return {
|
|
2268
|
-
components:
|
|
2269
|
-
computeItemKey:
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
ItemComponent: l("Item", "div"),
|
|
2314
|
+
components: n,
|
|
2315
|
+
computeItemKey: o,
|
|
2316
|
+
EmptyPlaceholder: i("EmptyPlaceholder"),
|
|
2317
|
+
FooterComponent: i("Footer"),
|
|
2318
|
+
GroupComponent: i("Group", "div"),
|
|
2319
|
+
groupContent: e,
|
|
2320
|
+
HeaderComponent: i("Header"),
|
|
2321
|
+
HeaderFooterTag: r,
|
|
2322
|
+
ItemComponent: i("Item", "div"),
|
|
2278
2323
|
itemContent: t,
|
|
2279
|
-
ListComponent:
|
|
2280
|
-
ScrollerComponent:
|
|
2281
|
-
scrollerRef:
|
|
2282
|
-
ScrollSeekPlaceholder:
|
|
2283
|
-
TopItemListComponent:
|
|
2324
|
+
ListComponent: i("List", "div"),
|
|
2325
|
+
ScrollerComponent: i("Scroller", "div"),
|
|
2326
|
+
scrollerRef: s,
|
|
2327
|
+
ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
|
|
2328
|
+
TopItemListComponent: i("TopItemList")
|
|
2284
2329
|
};
|
|
2285
|
-
}),
|
|
2330
|
+
}), or = /* @__PURE__ */ U(
|
|
2286
2331
|
([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"),
|
|
2332
|
+
X(Xn, nr)
|
|
2333
|
+
), rr = ({ height: t }) => /* @__PURE__ */ P("div", { style: { height: t } }), sr = { overflowAnchor: "none", position: Ze(), zIndex: 1 }, eo = { overflowAnchor: "none" }, ir = { ...eo, display: "inline-block", height: "100%" }, Cn = /* @__PURE__ */ H.memo(function({ showTopList: e = !1 }) {
|
|
2334
|
+
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"), m = M("context"), S = M("groupContent"), g = M("trackItemSizes"), I = M("itemSize"), w = M("log"), v = gt("gap"), h = M("horizontalDirection"), { callbackRef: p } = On(
|
|
2290
2335
|
o,
|
|
2291
|
-
|
|
2336
|
+
I,
|
|
2292
2337
|
g,
|
|
2293
2338
|
e ? Yt : c,
|
|
2294
2339
|
w,
|
|
2295
2340
|
v,
|
|
2296
2341
|
s,
|
|
2297
|
-
|
|
2342
|
+
h,
|
|
2298
2343
|
M("skipAnimationFrameInResizeObserver")
|
|
2299
2344
|
), [u, T] = H.useState(0);
|
|
2300
|
-
|
|
2301
|
-
u !==
|
|
2345
|
+
tn("deviation", (F) => {
|
|
2346
|
+
u !== F && T(F);
|
|
2302
2347
|
});
|
|
2303
|
-
const
|
|
2348
|
+
const b = M("EmptyPlaceholder"), f = M("ScrollSeekPlaceholder") || rr, d = M("ListComponent"), y = M("ItemComponent"), B = M("GroupComponent"), k = M("computeItemKey"), L = M("isSeeking"), z = M("groupIndices").length > 0, _ = M("alignToBottom"), J = M("initialItemFinalLocationReached"), nt = e ? {} : {
|
|
2304
2349
|
boxSizing: "border-box",
|
|
2305
|
-
...
|
|
2350
|
+
...h ? {
|
|
2306
2351
|
display: "inline-block",
|
|
2307
2352
|
height: "100%",
|
|
2308
|
-
marginLeft: u !== 0 ? u :
|
|
2353
|
+
marginLeft: u !== 0 ? u : _ ? "auto" : 0,
|
|
2309
2354
|
paddingLeft: n.offsetTop,
|
|
2310
2355
|
paddingRight: n.offsetBottom,
|
|
2311
2356
|
whiteSpace: "nowrap"
|
|
2312
2357
|
} : {
|
|
2313
|
-
marginTop: u !== 0 ? u :
|
|
2358
|
+
marginTop: u !== 0 ? u : _ ? "auto" : 0,
|
|
2314
2359
|
paddingBottom: n.offsetBottom,
|
|
2315
2360
|
paddingTop: n.offsetTop
|
|
2316
2361
|
},
|
|
2317
2362
|
...J ? {} : { visibility: "hidden" }
|
|
2318
2363
|
};
|
|
2319
|
-
return !e && n.totalCount === 0 &&
|
|
2320
|
-
|
|
2364
|
+
return !e && n.totalCount === 0 && b ? /* @__PURE__ */ P(b, { ...q(b, m) }) : /* @__PURE__ */ P(
|
|
2365
|
+
d,
|
|
2321
2366
|
{
|
|
2322
|
-
...q(
|
|
2367
|
+
...q(d, m),
|
|
2323
2368
|
"data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
|
|
2324
|
-
ref:
|
|
2369
|
+
ref: p,
|
|
2325
2370
|
style: nt,
|
|
2326
|
-
children: (e ? n.topItems : n.items).map((
|
|
2327
|
-
const Y =
|
|
2371
|
+
children: (e ? n.topItems : n.items).map((F) => {
|
|
2372
|
+
const Y = F.originalIndex, it = k(Y + n.firstItemIndex, F.data, m);
|
|
2328
2373
|
return L ? /* @__PURE__ */ _t(
|
|
2329
|
-
|
|
2374
|
+
f,
|
|
2330
2375
|
{
|
|
2331
|
-
...q(
|
|
2332
|
-
height:
|
|
2333
|
-
index:
|
|
2376
|
+
...q(f, m),
|
|
2377
|
+
height: F.size,
|
|
2378
|
+
index: F.index,
|
|
2334
2379
|
key: it,
|
|
2335
|
-
type:
|
|
2336
|
-
...
|
|
2380
|
+
type: F.type || "item",
|
|
2381
|
+
...F.type === "group" ? {} : { groupIndex: F.groupIndex }
|
|
2337
2382
|
}
|
|
2338
|
-
) :
|
|
2339
|
-
|
|
2383
|
+
) : F.type === "group" ? /* @__PURE__ */ _t(
|
|
2384
|
+
B,
|
|
2340
2385
|
{
|
|
2341
|
-
...q(
|
|
2386
|
+
...q(B, m),
|
|
2342
2387
|
"data-index": Y,
|
|
2343
|
-
"data-item-index":
|
|
2344
|
-
"data-known-size":
|
|
2388
|
+
"data-item-index": F.index,
|
|
2389
|
+
"data-known-size": F.size,
|
|
2345
2390
|
key: it,
|
|
2346
|
-
style:
|
|
2391
|
+
style: sr
|
|
2347
2392
|
},
|
|
2348
|
-
S(
|
|
2393
|
+
S(F.index, m)
|
|
2349
2394
|
) : /* @__PURE__ */ _t(
|
|
2350
|
-
|
|
2395
|
+
y,
|
|
2351
2396
|
{
|
|
2352
|
-
...q(
|
|
2353
|
-
...
|
|
2397
|
+
...q(y, m),
|
|
2398
|
+
...no(y, F.data),
|
|
2354
2399
|
"data-index": Y,
|
|
2355
|
-
"data-item-group-index":
|
|
2356
|
-
"data-item-index":
|
|
2357
|
-
"data-known-size":
|
|
2400
|
+
"data-item-group-index": F.groupIndex,
|
|
2401
|
+
"data-item-index": F.index,
|
|
2402
|
+
"data-known-size": F.size,
|
|
2358
2403
|
key: it,
|
|
2359
|
-
style:
|
|
2404
|
+
style: h ? ir : eo
|
|
2360
2405
|
},
|
|
2361
|
-
|
|
2406
|
+
z ? a(F.index, F.groupIndex, F.data, m) : a(F.index, F.data, m)
|
|
2362
2407
|
);
|
|
2363
2408
|
})
|
|
2364
2409
|
}
|
|
2365
2410
|
);
|
|
2366
|
-
}),
|
|
2411
|
+
}), lr = {
|
|
2367
2412
|
height: "100%",
|
|
2368
2413
|
outline: "none",
|
|
2369
2414
|
overflowY: "auto",
|
|
2370
2415
|
position: "relative",
|
|
2371
2416
|
WebkitOverflowScrolling: "touch"
|
|
2372
|
-
},
|
|
2417
|
+
}, cr = {
|
|
2373
2418
|
outline: "none",
|
|
2374
2419
|
overflowX: "auto",
|
|
2375
2420
|
position: "relative"
|
|
@@ -2379,8 +2424,8 @@ const er = /* @__PURE__ */ U(() => {
|
|
|
2379
2424
|
top: 0,
|
|
2380
2425
|
width: "100%",
|
|
2381
2426
|
...t ? { display: "flex", flexDirection: "column" } : {}
|
|
2382
|
-
}),
|
|
2383
|
-
position:
|
|
2427
|
+
}), ur = {
|
|
2428
|
+
position: Ze(),
|
|
2384
2429
|
top: 0,
|
|
2385
2430
|
width: "100%",
|
|
2386
2431
|
zIndex: 1
|
|
@@ -2389,51 +2434,51 @@ function q(t, e) {
|
|
|
2389
2434
|
if (typeof t != "string")
|
|
2390
2435
|
return { context: e };
|
|
2391
2436
|
}
|
|
2392
|
-
function
|
|
2437
|
+
function no(t, e) {
|
|
2393
2438
|
return { item: typeof t == "string" ? void 0 : e };
|
|
2394
2439
|
}
|
|
2395
|
-
const
|
|
2440
|
+
const ar = /* @__PURE__ */ H.memo(function() {
|
|
2396
2441
|
const e = M("HeaderComponent"), n = gt("headerHeight"), o = M("HeaderFooterTag"), r = Ht(
|
|
2397
2442
|
H.useMemo(
|
|
2398
2443
|
() => (i) => {
|
|
2399
|
-
n(
|
|
2444
|
+
n(vt(i, "height"));
|
|
2400
2445
|
},
|
|
2401
2446
|
[n]
|
|
2402
2447
|
),
|
|
2403
2448
|
!0,
|
|
2404
2449
|
M("skipAnimationFrameInResizeObserver")
|
|
2405
2450
|
), s = M("context");
|
|
2406
|
-
return e ? /* @__PURE__ */
|
|
2407
|
-
}),
|
|
2451
|
+
return e ? /* @__PURE__ */ P(o, { ref: r, children: /* @__PURE__ */ P(e, { ...q(e, s) }) }) : null;
|
|
2452
|
+
}), dr = /* @__PURE__ */ H.memo(function() {
|
|
2408
2453
|
const e = M("FooterComponent"), n = gt("footerHeight"), o = M("HeaderFooterTag"), r = Ht(
|
|
2409
2454
|
H.useMemo(
|
|
2410
2455
|
() => (i) => {
|
|
2411
|
-
n(
|
|
2456
|
+
n(vt(i, "height"));
|
|
2412
2457
|
},
|
|
2413
2458
|
[n]
|
|
2414
2459
|
),
|
|
2415
2460
|
!0,
|
|
2416
2461
|
M("skipAnimationFrameInResizeObserver")
|
|
2417
2462
|
), s = M("context");
|
|
2418
|
-
return e ? /* @__PURE__ */
|
|
2463
|
+
return e ? /* @__PURE__ */ P(o, { ref: r, children: /* @__PURE__ */ P(e, { ...q(e, s) }) }) : null;
|
|
2419
2464
|
});
|
|
2420
|
-
function
|
|
2465
|
+
function Je({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
2421
2466
|
return H.memo(function({ children: s, style: i, ...l }) {
|
|
2422
|
-
const c = n("scrollContainerState"), a = e("ScrollerComponent"),
|
|
2467
|
+
const c = n("scrollContainerState"), a = e("ScrollerComponent"), m = n("smoothScrollTargetReached"), S = e("scrollerRef"), g = e("context"), I = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: v, scrollToCallback: h } = to(
|
|
2423
2468
|
c,
|
|
2424
|
-
|
|
2469
|
+
m,
|
|
2425
2470
|
a,
|
|
2426
2471
|
S,
|
|
2427
2472
|
void 0,
|
|
2428
|
-
|
|
2473
|
+
I
|
|
2429
2474
|
);
|
|
2430
|
-
return t("scrollTo",
|
|
2475
|
+
return t("scrollTo", h), t("scrollBy", w), /* @__PURE__ */ P(
|
|
2431
2476
|
a,
|
|
2432
2477
|
{
|
|
2433
2478
|
"data-testid": "virtuoso-scroller",
|
|
2434
2479
|
"data-virtuoso-scroller": !0,
|
|
2435
2480
|
ref: v,
|
|
2436
|
-
style: { ...
|
|
2481
|
+
style: { ...I ? cr : lr, ...i },
|
|
2437
2482
|
tabIndex: 0,
|
|
2438
2483
|
...l,
|
|
2439
2484
|
...q(a, g),
|
|
@@ -2442,21 +2487,21 @@ function Xe({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2442
2487
|
);
|
|
2443
2488
|
});
|
|
2444
2489
|
}
|
|
2445
|
-
function
|
|
2490
|
+
function Qe({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
2446
2491
|
return H.memo(function({ children: s, style: i, ...l }) {
|
|
2447
|
-
const c = n("windowScrollContainerState"), a = e("ScrollerComponent"),
|
|
2492
|
+
const c = n("windowScrollContainerState"), a = e("ScrollerComponent"), m = n("smoothScrollTargetReached"), S = e("totalListHeight"), g = e("deviation"), I = e("customScrollParent"), w = e("context"), v = H.useRef(null), h = e("scrollerRef"), { scrollByCallback: p, scrollerRef: u, scrollToCallback: T } = to(
|
|
2448
2493
|
c,
|
|
2449
|
-
p,
|
|
2450
|
-
a,
|
|
2451
2494
|
m,
|
|
2452
|
-
|
|
2495
|
+
a,
|
|
2496
|
+
h,
|
|
2497
|
+
I
|
|
2453
2498
|
);
|
|
2454
|
-
return
|
|
2455
|
-
var
|
|
2456
|
-
return u.current =
|
|
2499
|
+
return Qn(() => {
|
|
2500
|
+
var b;
|
|
2501
|
+
return u.current = I || ((b = v.current) == null ? void 0 : b.ownerDocument.defaultView), () => {
|
|
2457
2502
|
u.current = null;
|
|
2458
2503
|
};
|
|
2459
|
-
}, [u,
|
|
2504
|
+
}, [u, I]), t("windowScrollTo", T), t("scrollBy", p), /* @__PURE__ */ P(
|
|
2460
2505
|
a,
|
|
2461
2506
|
{
|
|
2462
2507
|
ref: v,
|
|
@@ -2469,49 +2514,50 @@ function Je({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2469
2514
|
);
|
|
2470
2515
|
});
|
|
2471
2516
|
}
|
|
2472
|
-
const
|
|
2517
|
+
const fr = ({ children: t }) => {
|
|
2473
2518
|
const e = H.useContext(be), n = gt("viewportHeight"), o = gt("fixedItemHeight"), r = M("alignToBottom"), s = M("horizontalDirection"), i = H.useMemo(
|
|
2474
|
-
() => ne(n, (c) =>
|
|
2519
|
+
() => ne(n, (c) => vt(c, s ? "width" : "height")),
|
|
2475
2520
|
[n, s]
|
|
2476
2521
|
), l = Ht(i, !0, M("skipAnimationFrameInResizeObserver"));
|
|
2477
2522
|
return H.useEffect(() => {
|
|
2478
2523
|
e && (n(e.viewportHeight), o(e.itemHeight));
|
|
2479
|
-
}, [e, n, o]), /* @__PURE__ */
|
|
2480
|
-
},
|
|
2481
|
-
const e = H.useContext(be), n = gt("windowViewportRect"), o = gt("fixedItemHeight"), r = M("customScrollParent"), s =
|
|
2524
|
+
}, [e, n, o]), /* @__PURE__ */ P("div", { "data-viewport-type": "element", ref: l, style: Zt(r), children: t });
|
|
2525
|
+
}, mr = ({ children: t }) => {
|
|
2526
|
+
const e = H.useContext(be), n = gt("windowViewportRect"), o = gt("fixedItemHeight"), r = M("customScrollParent"), s = Ne(
|
|
2482
2527
|
n,
|
|
2483
2528
|
r,
|
|
2484
2529
|
M("skipAnimationFrameInResizeObserver")
|
|
2485
2530
|
), i = M("alignToBottom");
|
|
2486
2531
|
return H.useEffect(() => {
|
|
2487
2532
|
e && (o(e.itemHeight), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2488
|
-
}, [e, n, o]), /* @__PURE__ */
|
|
2489
|
-
},
|
|
2490
|
-
const e = M("TopItemListComponent") || "div", n = M("headerHeight"), o = { ...
|
|
2491
|
-
return /* @__PURE__ */
|
|
2492
|
-
},
|
|
2493
|
-
const n = M("useWindowScroll"), o = M("topItemsIndexes").length > 0, r = M("customScrollParent"), s = M("context"), i = r || n ?
|
|
2533
|
+
}, [e, n, o]), /* @__PURE__ */ P("div", { "data-viewport-type": "window", ref: s, style: Zt(i), children: t });
|
|
2534
|
+
}, pr = ({ children: t }) => {
|
|
2535
|
+
const e = M("TopItemListComponent") || "div", n = M("headerHeight"), o = { ...ur, marginTop: `${n}px` }, r = M("context");
|
|
2536
|
+
return /* @__PURE__ */ P(e, { style: o, ...q(e, r), children: t });
|
|
2537
|
+
}, hr = /* @__PURE__ */ H.memo(function(e) {
|
|
2538
|
+
const n = M("useWindowScroll"), o = M("topItemsIndexes").length > 0, r = M("customScrollParent"), s = M("context"), i = r || n ? Ir : gr, l = r || n ? mr : fr;
|
|
2494
2539
|
return /* @__PURE__ */ Nt(i, { ...e, ...q(i, s), children: [
|
|
2495
|
-
o && /* @__PURE__ */
|
|
2540
|
+
o && /* @__PURE__ */ P(pr, { children: /* @__PURE__ */ P(Cn, { showTopList: !0 }) }),
|
|
2496
2541
|
/* @__PURE__ */ Nt(l, { children: [
|
|
2497
|
-
/* @__PURE__ */
|
|
2498
|
-
/* @__PURE__ */
|
|
2499
|
-
/* @__PURE__ */
|
|
2542
|
+
/* @__PURE__ */ P(ar, {}),
|
|
2543
|
+
/* @__PURE__ */ P(Cn, {}),
|
|
2544
|
+
/* @__PURE__ */ P(dr, {})
|
|
2500
2545
|
] })
|
|
2501
2546
|
] });
|
|
2502
2547
|
}), {
|
|
2503
|
-
Component:
|
|
2504
|
-
useEmitter:
|
|
2548
|
+
Component: oo,
|
|
2549
|
+
useEmitter: tn,
|
|
2505
2550
|
useEmitterValue: M,
|
|
2506
2551
|
usePublisher: gt
|
|
2507
|
-
} = /* @__PURE__ */
|
|
2508
|
-
|
|
2552
|
+
} = /* @__PURE__ */ Ye(
|
|
2553
|
+
or,
|
|
2509
2554
|
{
|
|
2510
2555
|
required: {},
|
|
2511
2556
|
optional: {
|
|
2512
2557
|
restoreStateFrom: "restoreStateFrom",
|
|
2513
2558
|
context: "context",
|
|
2514
2559
|
followOutput: "followOutput",
|
|
2560
|
+
scrollIntoViewOnChange: "scrollIntoViewOnChange",
|
|
2515
2561
|
itemContent: "itemContent",
|
|
2516
2562
|
groupContent: "groupContent",
|
|
2517
2563
|
overscan: "overscan",
|
|
@@ -2561,21 +2607,21 @@ const dr = ({ children: t }) => {
|
|
|
2561
2607
|
groupIndices: "groupIndices"
|
|
2562
2608
|
}
|
|
2563
2609
|
},
|
|
2564
|
-
|
|
2565
|
-
),
|
|
2610
|
+
hr
|
|
2611
|
+
), gr = /* @__PURE__ */ Je({ useEmitter: tn, useEmitterValue: M, usePublisher: gt }), Ir = /* @__PURE__ */ Qe({ useEmitter: tn, useEmitterValue: M, usePublisher: gt }), qr = oo, Yr = oo, Sr = /* @__PURE__ */ U(() => {
|
|
2566
2612
|
const t = C((a) => /* @__PURE__ */ Nt("td", { children: [
|
|
2567
2613
|
"Item $",
|
|
2568
2614
|
a
|
|
2569
2615
|
] })), e = C(null), n = C((a) => /* @__PURE__ */ Nt("td", { colSpan: 1e3, children: [
|
|
2570
2616
|
"Group ",
|
|
2571
2617
|
a
|
|
2572
|
-
] })), o = C(null), r = C(null), s = C({}), i = C(
|
|
2618
|
+
] })), o = C(null), r = C(null), s = C({}), i = C(Xe), l = C(Yt), c = (a, m = null) => ct(
|
|
2573
2619
|
x(
|
|
2574
2620
|
s,
|
|
2575
2621
|
E((S) => S[a]),
|
|
2576
2622
|
Z()
|
|
2577
2623
|
),
|
|
2578
|
-
|
|
2624
|
+
m
|
|
2579
2625
|
);
|
|
2580
2626
|
return {
|
|
2581
2627
|
components: s,
|
|
@@ -2597,55 +2643,55 @@ const dr = ({ children: t }) => {
|
|
|
2597
2643
|
TableRowComponent: c("TableRow", "tr"),
|
|
2598
2644
|
GroupComponent: c("Group", "tr")
|
|
2599
2645
|
};
|
|
2600
|
-
}),
|
|
2646
|
+
}), xr = /* @__PURE__ */ U(
|
|
2601
2647
|
([t, e]) => ({ ...t, ...e }),
|
|
2602
|
-
X(
|
|
2603
|
-
),
|
|
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"),
|
|
2605
|
-
const
|
|
2648
|
+
X(Xn, Sr)
|
|
2649
|
+
), Tr = ({ height: t }) => /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", { style: { height: t } }) }), Cr = ({ height: t }) => /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", { style: { border: 0, height: t, padding: 0 } }) }), wr = { overflowAnchor: "none" }, wn = { position: Ze(), zIndex: 2, overflowAnchor: "none" }, vn = /* @__PURE__ */ H.memo(function({ showTopList: e = !1 }) {
|
|
2650
|
+
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"), m = W("groupContent"), S = W("ScrollSeekPlaceholder") || Tr, g = W("GroupComponent"), I = W("TableRowComponent"), w = (e ? n.topItems : []).reduce((h, p, u) => (u === 0 ? h.push(p.size) : h.push(h[u - 1] + p.size), h), []), v = (e ? n.topItems : n.items).map((h) => {
|
|
2651
|
+
const p = h.originalIndex, u = o(p + r, h.data, s), T = e ? p === 0 ? 0 : w[p - 1] : 0;
|
|
2606
2652
|
return i ? /* @__PURE__ */ _t(
|
|
2607
2653
|
S,
|
|
2608
2654
|
{
|
|
2609
2655
|
...q(S, s),
|
|
2610
|
-
height:
|
|
2611
|
-
index:
|
|
2656
|
+
height: h.size,
|
|
2657
|
+
index: h.index,
|
|
2612
2658
|
key: u,
|
|
2613
|
-
type:
|
|
2659
|
+
type: h.type || "item"
|
|
2614
2660
|
}
|
|
2615
|
-
) :
|
|
2661
|
+
) : h.type === "group" ? /* @__PURE__ */ _t(
|
|
2616
2662
|
g,
|
|
2617
2663
|
{
|
|
2618
2664
|
...q(g, s),
|
|
2619
|
-
"data-index":
|
|
2620
|
-
"data-item-index":
|
|
2621
|
-
"data-known-size":
|
|
2665
|
+
"data-index": p,
|
|
2666
|
+
"data-item-index": h.index,
|
|
2667
|
+
"data-known-size": h.size,
|
|
2622
2668
|
key: u,
|
|
2623
2669
|
style: {
|
|
2624
2670
|
...wn,
|
|
2625
2671
|
top: l
|
|
2626
2672
|
}
|
|
2627
2673
|
},
|
|
2628
|
-
|
|
2674
|
+
m(h.index, s)
|
|
2629
2675
|
) : /* @__PURE__ */ _t(
|
|
2630
|
-
|
|
2676
|
+
I,
|
|
2631
2677
|
{
|
|
2632
|
-
...q(
|
|
2633
|
-
...
|
|
2634
|
-
"data-index":
|
|
2635
|
-
"data-item-index":
|
|
2636
|
-
"data-known-size":
|
|
2637
|
-
"data-item-group-index":
|
|
2678
|
+
...q(I, s),
|
|
2679
|
+
...no(I, h.data),
|
|
2680
|
+
"data-index": p,
|
|
2681
|
+
"data-item-index": h.index,
|
|
2682
|
+
"data-known-size": h.size,
|
|
2683
|
+
"data-item-group-index": h.groupIndex,
|
|
2638
2684
|
key: u,
|
|
2639
|
-
style: e ? { ...wn, top: l + T } :
|
|
2685
|
+
style: e ? { ...wn, top: l + T } : wr
|
|
2640
2686
|
},
|
|
2641
|
-
c ? a(
|
|
2687
|
+
c ? a(h.index, h.groupIndex, h.data, s) : a(h.index, h.data, s)
|
|
2642
2688
|
);
|
|
2643
2689
|
});
|
|
2644
|
-
return /* @__PURE__ */
|
|
2645
|
-
}),
|
|
2646
|
-
const e = W("listState"), n = W("topItemsIndexes").length > 0, o =
|
|
2690
|
+
return /* @__PURE__ */ P(uo, { children: v });
|
|
2691
|
+
}), vr = /* @__PURE__ */ H.memo(function() {
|
|
2692
|
+
const e = W("listState"), n = W("topItemsIndexes").length > 0, o = Ct("sizeRanges"), r = W("useWindowScroll"), s = W("customScrollParent"), i = Ct("windowScrollContainerState"), l = Ct("scrollContainerState"), c = s || r ? i : l, a = W("trackItemSizes"), m = W("itemSize"), S = W("log"), { callbackRef: g, ref: I } = On(
|
|
2647
2693
|
o,
|
|
2648
|
-
|
|
2694
|
+
m,
|
|
2649
2695
|
a,
|
|
2650
2696
|
c,
|
|
2651
2697
|
S,
|
|
@@ -2654,47 +2700,47 @@ const dr = ({ children: t }) => {
|
|
|
2654
2700
|
!1,
|
|
2655
2701
|
W("skipAnimationFrameInResizeObserver")
|
|
2656
2702
|
), [w, v] = H.useState(0);
|
|
2657
|
-
|
|
2658
|
-
w !==
|
|
2703
|
+
en("deviation", (z) => {
|
|
2704
|
+
w !== z && (I.current.style.marginTop = `${z}px`, v(z));
|
|
2659
2705
|
});
|
|
2660
|
-
const
|
|
2661
|
-
if (
|
|
2662
|
-
return /* @__PURE__ */
|
|
2663
|
-
const
|
|
2664
|
-
return /* @__PURE__ */ Nt(u, { "data-testid": "virtuoso-item-list", ref: g, ...q(u,
|
|
2665
|
-
|
|
2666
|
-
n && /* @__PURE__ */
|
|
2667
|
-
/* @__PURE__ */
|
|
2706
|
+
const h = W("EmptyPlaceholder"), p = W("FillerRow") || Cr, u = W("TableBodyComponent"), T = W("paddingTopAddition"), b = W("statefulTotalCount"), f = W("context");
|
|
2707
|
+
if (b === 0 && h)
|
|
2708
|
+
return /* @__PURE__ */ P(h, { ...q(h, f) });
|
|
2709
|
+
const d = (n ? e.topItems : []).reduce((z, _) => z + _.size, 0), y = e.offsetTop + T + w - d, B = e.offsetBottom, k = y > 0 ? /* @__PURE__ */ P(p, { context: f, height: y }, "padding-top") : null, L = B > 0 ? /* @__PURE__ */ P(p, { context: f, height: B }, "padding-bottom") : null;
|
|
2710
|
+
return /* @__PURE__ */ Nt(u, { "data-testid": "virtuoso-item-list", ref: g, ...q(u, f), children: [
|
|
2711
|
+
k,
|
|
2712
|
+
n && /* @__PURE__ */ P(vn, { showTopList: !0 }),
|
|
2713
|
+
/* @__PURE__ */ P(vn, {}),
|
|
2668
2714
|
L
|
|
2669
2715
|
] });
|
|
2670
|
-
}),
|
|
2671
|
-
const e = H.useContext(be), n =
|
|
2672
|
-
H.useMemo(() => ne(n, (s) =>
|
|
2716
|
+
}), yr = ({ children: t }) => {
|
|
2717
|
+
const e = H.useContext(be), n = Ct("viewportHeight"), o = Ct("fixedItemHeight"), r = Ht(
|
|
2718
|
+
H.useMemo(() => ne(n, (s) => vt(s, "height")), [n]),
|
|
2673
2719
|
!0,
|
|
2674
2720
|
W("skipAnimationFrameInResizeObserver")
|
|
2675
2721
|
);
|
|
2676
2722
|
return H.useEffect(() => {
|
|
2677
2723
|
e && (n(e.viewportHeight), o(e.itemHeight));
|
|
2678
|
-
}, [e, n, o]), /* @__PURE__ */
|
|
2679
|
-
},
|
|
2680
|
-
const e = H.useContext(be), n =
|
|
2724
|
+
}, [e, n, o]), /* @__PURE__ */ P("div", { "data-viewport-type": "element", ref: r, style: Zt(!1), children: t });
|
|
2725
|
+
}, Rr = ({ children: t }) => {
|
|
2726
|
+
const e = H.useContext(be), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r = W("customScrollParent"), s = Ne(
|
|
2681
2727
|
n,
|
|
2682
2728
|
r,
|
|
2683
2729
|
W("skipAnimationFrameInResizeObserver")
|
|
2684
2730
|
);
|
|
2685
2731
|
return H.useEffect(() => {
|
|
2686
2732
|
e && (o(e.itemHeight), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2687
|
-
}, [e, n, o]), /* @__PURE__ */
|
|
2688
|
-
},
|
|
2689
|
-
const n = W("useWindowScroll"), o = W("customScrollParent"), r =
|
|
2690
|
-
H.useMemo(() => ne(r, (u) =>
|
|
2733
|
+
}, [e, n, o]), /* @__PURE__ */ P("div", { "data-viewport-type": "window", ref: s, style: Zt(!1), children: t });
|
|
2734
|
+
}, br = /* @__PURE__ */ H.memo(function(e) {
|
|
2735
|
+
const n = W("useWindowScroll"), o = W("customScrollParent"), r = Ct("fixedHeaderHeight"), s = Ct("fixedFooterHeight"), i = W("fixedHeaderContent"), l = W("fixedFooterContent"), c = W("context"), a = Ht(
|
|
2736
|
+
H.useMemo(() => ne(r, (u) => vt(u, "height")), [r]),
|
|
2691
2737
|
!0,
|
|
2692
2738
|
W("skipAnimationFrameInResizeObserver")
|
|
2693
|
-
),
|
|
2694
|
-
H.useMemo(() => ne(s, (u) =>
|
|
2739
|
+
), m = Ht(
|
|
2740
|
+
H.useMemo(() => ne(s, (u) => vt(u, "height")), [s]),
|
|
2695
2741
|
!0,
|
|
2696
2742
|
W("skipAnimationFrameInResizeObserver")
|
|
2697
|
-
), S = o || n ?
|
|
2743
|
+
), S = o || n ? Er : Hr, g = o || n ? Rr : yr, I = W("TableComponent"), w = W("TableHeadComponent"), v = W("TableFooterComponent"), h = i ? /* @__PURE__ */ P(
|
|
2698
2744
|
w,
|
|
2699
2745
|
{
|
|
2700
2746
|
ref: a,
|
|
@@ -2703,28 +2749,28 @@ const dr = ({ children: t }) => {
|
|
|
2703
2749
|
children: i()
|
|
2704
2750
|
},
|
|
2705
2751
|
"TableHead"
|
|
2706
|
-
) : null,
|
|
2752
|
+
) : null, p = l ? /* @__PURE__ */ P(
|
|
2707
2753
|
v,
|
|
2708
2754
|
{
|
|
2709
|
-
ref:
|
|
2755
|
+
ref: m,
|
|
2710
2756
|
style: { bottom: 0, position: "sticky", zIndex: 1 },
|
|
2711
2757
|
...q(v, c),
|
|
2712
2758
|
children: l()
|
|
2713
2759
|
},
|
|
2714
2760
|
"TableFoot"
|
|
2715
2761
|
) : null;
|
|
2716
|
-
return /* @__PURE__ */
|
|
2717
|
-
|
|
2718
|
-
/* @__PURE__ */
|
|
2719
|
-
|
|
2762
|
+
return /* @__PURE__ */ P(S, { ...e, ...q(S, c), children: /* @__PURE__ */ P(g, { children: /* @__PURE__ */ Nt(I, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...q(I, c), children: [
|
|
2763
|
+
h,
|
|
2764
|
+
/* @__PURE__ */ P(vr, {}, "TableBody"),
|
|
2765
|
+
p
|
|
2720
2766
|
] }) }) });
|
|
2721
2767
|
}), {
|
|
2722
|
-
Component:
|
|
2723
|
-
useEmitter:
|
|
2768
|
+
Component: ro,
|
|
2769
|
+
useEmitter: en,
|
|
2724
2770
|
useEmitterValue: W,
|
|
2725
|
-
usePublisher:
|
|
2726
|
-
} = /* @__PURE__ */
|
|
2727
|
-
|
|
2771
|
+
usePublisher: Ct
|
|
2772
|
+
} = /* @__PURE__ */ Ye(
|
|
2773
|
+
xr,
|
|
2728
2774
|
{
|
|
2729
2775
|
required: {},
|
|
2730
2776
|
optional: {
|
|
@@ -2778,8 +2824,8 @@ const dr = ({ children: t }) => {
|
|
|
2778
2824
|
groupIndices: "groupIndices"
|
|
2779
2825
|
}
|
|
2780
2826
|
},
|
|
2781
|
-
|
|
2782
|
-
),
|
|
2827
|
+
br
|
|
2828
|
+
), Hr = /* @__PURE__ */ Je({ useEmitter: en, useEmitterValue: W, usePublisher: Ct }), Er = /* @__PURE__ */ Qe({ useEmitter: en, useEmitterValue: W, usePublisher: Ct }), Zr = ro, Xr = ro, yn = {
|
|
2783
2829
|
bottom: 0,
|
|
2784
2830
|
itemHeight: 0,
|
|
2785
2831
|
items: [],
|
|
@@ -2787,7 +2833,7 @@ const dr = ({ children: t }) => {
|
|
|
2787
2833
|
offsetBottom: 0,
|
|
2788
2834
|
offsetTop: 0,
|
|
2789
2835
|
top: 0
|
|
2790
|
-
},
|
|
2836
|
+
}, Br = {
|
|
2791
2837
|
bottom: 0,
|
|
2792
2838
|
itemHeight: 0,
|
|
2793
2839
|
items: [{ index: 0 }],
|
|
@@ -2799,148 +2845,148 @@ const dr = ({ children: t }) => {
|
|
|
2799
2845
|
function Hn(t, e, n) {
|
|
2800
2846
|
return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
|
|
2801
2847
|
}
|
|
2802
|
-
function
|
|
2848
|
+
function kr(t) {
|
|
2803
2849
|
return {
|
|
2804
|
-
...
|
|
2850
|
+
...Br,
|
|
2805
2851
|
items: t
|
|
2806
2852
|
};
|
|
2807
2853
|
}
|
|
2808
2854
|
function he(t, e) {
|
|
2809
2855
|
return t && t.width === e.width && t.height === e.height;
|
|
2810
2856
|
}
|
|
2811
|
-
function
|
|
2857
|
+
function Fr(t, e) {
|
|
2812
2858
|
return t && t.column === e.column && t.row === e.row;
|
|
2813
2859
|
}
|
|
2814
|
-
const
|
|
2860
|
+
const Or = /* @__PURE__ */ U(
|
|
2815
2861
|
([
|
|
2816
2862
|
{ increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
|
|
2817
|
-
{ footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: a, smoothScrollTargetReached:
|
|
2863
|
+
{ footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: a, smoothScrollTargetReached: m, viewportHeight: S },
|
|
2818
2864
|
g,
|
|
2819
|
-
|
|
2865
|
+
I,
|
|
2820
2866
|
{ didMount: w, propsReady: v },
|
|
2821
|
-
{ customScrollParent:
|
|
2822
|
-
|
|
2867
|
+
{ customScrollParent: h, useWindowScroll: p, windowScrollContainerState: u, windowScrollTo: T, windowViewportRect: b },
|
|
2868
|
+
f
|
|
2823
2869
|
]) => {
|
|
2824
|
-
const
|
|
2870
|
+
const d = C(0), y = C(0), B = C(yn), k = C({ height: 0, width: 0 }), L = C({ height: 0, width: 0 }), z = $(), _ = $(), J = C(0), nt = C(null), F = C({ column: 0, row: 0 }), Y = $(), it = $(), dt = C(!1), St = C(0), ft = C(!0), ut = C(!1), At = C(!1);
|
|
2825
2871
|
K(
|
|
2826
2872
|
x(
|
|
2827
2873
|
w,
|
|
2828
|
-
|
|
2829
|
-
|
|
2874
|
+
N(St),
|
|
2875
|
+
A(([R, D]) => !!D)
|
|
2830
2876
|
),
|
|
2831
2877
|
() => {
|
|
2832
2878
|
G(ft, !1);
|
|
2833
2879
|
}
|
|
2834
2880
|
), K(
|
|
2835
2881
|
x(
|
|
2836
|
-
rt(w, ft, L,
|
|
2837
|
-
|
|
2882
|
+
rt(w, ft, L, k, St, ut),
|
|
2883
|
+
A(([R, D, Q, lt, , tt]) => R && !D && Q.height !== 0 && lt.height !== 0 && !tt)
|
|
2838
2884
|
),
|
|
2839
|
-
([, , , ,
|
|
2840
|
-
G(ut, !0),
|
|
2841
|
-
G(
|
|
2842
|
-
}),
|
|
2885
|
+
([, , , , R]) => {
|
|
2886
|
+
G(ut, !0), Ue(1, () => {
|
|
2887
|
+
G(z, R);
|
|
2888
|
+
}), Tt(x(a), () => {
|
|
2843
2889
|
G(e, [0, 0]), G(ft, !0);
|
|
2844
2890
|
});
|
|
2845
2891
|
}
|
|
2846
2892
|
), O(
|
|
2847
2893
|
x(
|
|
2848
2894
|
it,
|
|
2849
|
-
|
|
2850
|
-
|
|
2895
|
+
A((R) => R != null && R.scrollTop > 0),
|
|
2896
|
+
Rt(0)
|
|
2851
2897
|
),
|
|
2852
|
-
|
|
2898
|
+
y
|
|
2853
2899
|
), K(
|
|
2854
2900
|
x(
|
|
2855
2901
|
w,
|
|
2856
|
-
|
|
2857
|
-
|
|
2902
|
+
N(it),
|
|
2903
|
+
A(([, R]) => R != null)
|
|
2858
2904
|
),
|
|
2859
|
-
([,
|
|
2860
|
-
|
|
2905
|
+
([, R]) => {
|
|
2906
|
+
R && (G(k, R.viewport), G(L, R.item), G(F, R.gap), R.scrollTop > 0 && (G(dt, !0), Tt(x(a, Dt(1)), (D) => {
|
|
2861
2907
|
G(dt, !1);
|
|
2862
|
-
}), G(c, { top:
|
|
2908
|
+
}), G(c, { top: R.scrollTop })));
|
|
2863
2909
|
}
|
|
2864
2910
|
), O(
|
|
2865
2911
|
x(
|
|
2866
|
-
|
|
2867
|
-
E(({ height:
|
|
2912
|
+
k,
|
|
2913
|
+
E(({ height: R }) => R)
|
|
2868
2914
|
),
|
|
2869
2915
|
S
|
|
2870
2916
|
), O(
|
|
2871
2917
|
x(
|
|
2872
2918
|
rt(
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2919
|
+
V(k, he),
|
|
2920
|
+
V(L, he),
|
|
2921
|
+
V(F, (R, D) => R && R.column === D.column && R.row === D.row),
|
|
2922
|
+
V(a)
|
|
2877
2923
|
),
|
|
2878
|
-
E(([
|
|
2924
|
+
E(([R, D, Q, lt]) => ({
|
|
2879
2925
|
gap: Q,
|
|
2880
|
-
item:
|
|
2926
|
+
item: D,
|
|
2881
2927
|
scrollTop: lt,
|
|
2882
|
-
viewport:
|
|
2928
|
+
viewport: R
|
|
2883
2929
|
}))
|
|
2884
2930
|
),
|
|
2885
2931
|
Y
|
|
2886
2932
|
), O(
|
|
2887
2933
|
x(
|
|
2888
2934
|
rt(
|
|
2889
|
-
|
|
2935
|
+
V(d),
|
|
2890
2936
|
o,
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2937
|
+
V(F, Fr),
|
|
2938
|
+
V(L, he),
|
|
2939
|
+
V(k, he),
|
|
2940
|
+
V(nt),
|
|
2941
|
+
V(y),
|
|
2942
|
+
V(dt),
|
|
2943
|
+
V(ft),
|
|
2944
|
+
V(St)
|
|
2899
2945
|
),
|
|
2900
|
-
|
|
2946
|
+
A(([, , , , , , , R]) => !R),
|
|
2901
2947
|
E(
|
|
2902
2948
|
([
|
|
2903
|
-
|
|
2904
|
-
[
|
|
2949
|
+
R,
|
|
2950
|
+
[D, Q],
|
|
2905
2951
|
lt,
|
|
2906
2952
|
tt,
|
|
2907
|
-
|
|
2953
|
+
Ft,
|
|
2908
2954
|
Jt,
|
|
2909
|
-
|
|
2955
|
+
Ut,
|
|
2910
2956
|
,
|
|
2911
2957
|
de,
|
|
2912
|
-
|
|
2958
|
+
Ot
|
|
2913
2959
|
]) => {
|
|
2914
|
-
const { column:
|
|
2915
|
-
if (
|
|
2960
|
+
const { column: Lt, row: Qt } = lt, { height: fe, width: He } = tt, { width: nn } = Ft;
|
|
2961
|
+
if (Ut === 0 && (R === 0 || nn === 0))
|
|
2916
2962
|
return yn;
|
|
2917
2963
|
if (He === 0) {
|
|
2918
|
-
const
|
|
2919
|
-
return
|
|
2964
|
+
const cn = Ke(Ot, R), co = cn + Math.max(Ut - 1, 0);
|
|
2965
|
+
return kr(Hn(cn, co, Jt));
|
|
2920
2966
|
}
|
|
2921
|
-
const me =
|
|
2922
|
-
let
|
|
2923
|
-
de ?
|
|
2924
|
-
const
|
|
2925
|
-
return { bottom:
|
|
2967
|
+
const me = so(nn, He, Lt);
|
|
2968
|
+
let Kt, Wt;
|
|
2969
|
+
de ? D === 0 && Q === 0 && Ut > 0 ? (Kt = 0, Wt = Ut - 1) : (Kt = me * Ce((D + Qt) / (fe + Qt)), Wt = me * Rn((Q + Qt) / (fe + Qt)) - 1, Wt = Oe(R - 1, ee(Wt, me - 1)), Kt = Oe(Wt, ee(0, Kt))) : (Kt = 0, Wt = -1);
|
|
2970
|
+
const on = Hn(Kt, Wt, Jt), { bottom: rn, top: sn } = En(Ft, lt, tt, on), ln = Rn(R / me), lo = ln * fe + (ln - 1) * Qt - rn;
|
|
2971
|
+
return { bottom: rn, itemHeight: fe, items: on, itemWidth: He, offsetBottom: lo, offsetTop: sn, top: sn };
|
|
2926
2972
|
}
|
|
2927
2973
|
)
|
|
2928
2974
|
),
|
|
2929
|
-
|
|
2975
|
+
B
|
|
2930
2976
|
), O(
|
|
2931
2977
|
x(
|
|
2932
2978
|
nt,
|
|
2933
|
-
|
|
2934
|
-
E((
|
|
2979
|
+
A((R) => R !== null),
|
|
2980
|
+
E((R) => R.length)
|
|
2935
2981
|
),
|
|
2936
|
-
|
|
2982
|
+
d
|
|
2937
2983
|
), O(
|
|
2938
2984
|
x(
|
|
2939
|
-
rt(
|
|
2940
|
-
|
|
2941
|
-
E(([
|
|
2942
|
-
const { bottom: tt, top:
|
|
2943
|
-
return [
|
|
2985
|
+
rt(k, L, B, F),
|
|
2986
|
+
A(([R, D, { items: Q }]) => Q.length > 0 && D.height !== 0 && R.height !== 0),
|
|
2987
|
+
E(([R, D, { items: Q }, lt]) => {
|
|
2988
|
+
const { bottom: tt, top: Ft } = En(R, lt, D, Q);
|
|
2989
|
+
return [Ft, tt];
|
|
2944
2990
|
}),
|
|
2945
2991
|
Z(se)
|
|
2946
2992
|
),
|
|
@@ -2950,138 +2996,138 @@ const Fr = /* @__PURE__ */ U(
|
|
|
2950
2996
|
O(
|
|
2951
2997
|
x(
|
|
2952
2998
|
a,
|
|
2953
|
-
|
|
2954
|
-
E(([
|
|
2999
|
+
N(xt),
|
|
3000
|
+
E(([R, D]) => D || R !== 0)
|
|
2955
3001
|
),
|
|
2956
3002
|
xt
|
|
2957
3003
|
);
|
|
2958
3004
|
const Xt = ht(
|
|
2959
3005
|
x(
|
|
2960
|
-
rt(
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
const tt =
|
|
2965
|
-
return (Q ||
|
|
3006
|
+
rt(B, d),
|
|
3007
|
+
A(([{ items: R }]) => R.length > 0),
|
|
3008
|
+
N(xt),
|
|
3009
|
+
A(([[R, D], Q]) => {
|
|
3010
|
+
const tt = R.items[R.items.length - 1].index === D - 1;
|
|
3011
|
+
return (Q || R.bottom > 0 && R.itemHeight > 0 && R.offsetBottom === 0 && R.items.length === D) && tt;
|
|
2966
3012
|
}),
|
|
2967
|
-
E(([[,
|
|
3013
|
+
E(([[, R]]) => R - 1),
|
|
2968
3014
|
Z()
|
|
2969
3015
|
)
|
|
2970
3016
|
), Mt = ht(
|
|
2971
3017
|
x(
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
3018
|
+
V(B),
|
|
3019
|
+
A(({ items: R }) => R.length > 0 && R[0].index === 0),
|
|
3020
|
+
Rt(0),
|
|
2975
3021
|
Z()
|
|
2976
3022
|
)
|
|
2977
|
-
),
|
|
3023
|
+
), yt = ht(
|
|
2978
3024
|
x(
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
E(([{ items:
|
|
2983
|
-
endIndex:
|
|
2984
|
-
startIndex:
|
|
3025
|
+
V(B),
|
|
3026
|
+
N(dt),
|
|
3027
|
+
A(([{ items: R }, D]) => R.length > 0 && !D),
|
|
3028
|
+
E(([{ items: R }]) => ({
|
|
3029
|
+
endIndex: R[R.length - 1].index,
|
|
3030
|
+
startIndex: R[0].index
|
|
2985
3031
|
})),
|
|
2986
3032
|
Z(Mn),
|
|
2987
|
-
|
|
3033
|
+
kt(0)
|
|
2988
3034
|
)
|
|
2989
3035
|
);
|
|
2990
|
-
O(
|
|
3036
|
+
O(yt, I.scrollSeekRangeChanged), O(
|
|
2991
3037
|
x(
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
E(([
|
|
2995
|
-
const
|
|
2996
|
-
let
|
|
2997
|
-
|
|
2998
|
-
let
|
|
2999
|
-
return Jt === "end" ?
|
|
3038
|
+
z,
|
|
3039
|
+
N(k, L, d, F),
|
|
3040
|
+
E(([R, D, Q, lt, tt]) => {
|
|
3041
|
+
const Ft = Dn(R), { align: Jt, behavior: Ut, offset: de } = Ft;
|
|
3042
|
+
let Ot = Ft.index;
|
|
3043
|
+
Ot === "LAST" && (Ot = lt - 1), Ot = ee(0, Ot, Oe(lt - 1, Ot));
|
|
3044
|
+
let Lt = Me(D, tt, Q, Ot);
|
|
3045
|
+
return Jt === "end" ? Lt = bn(Lt - D.height + Q.height) : Jt === "center" && (Lt = bn(Lt - D.height / 2 + Q.height / 2)), de && (Lt += de), { behavior: Ut, top: Lt };
|
|
3000
3046
|
})
|
|
3001
3047
|
),
|
|
3002
3048
|
c
|
|
3003
3049
|
);
|
|
3004
3050
|
const Bt = ct(
|
|
3005
3051
|
x(
|
|
3006
|
-
|
|
3007
|
-
E((
|
|
3052
|
+
B,
|
|
3053
|
+
E((R) => R.offsetBottom + R.bottom)
|
|
3008
3054
|
),
|
|
3009
3055
|
0
|
|
3010
3056
|
);
|
|
3011
3057
|
return O(
|
|
3012
3058
|
x(
|
|
3013
|
-
|
|
3014
|
-
E((
|
|
3059
|
+
b,
|
|
3060
|
+
E((R) => ({ height: R.visibleHeight, width: R.visibleWidth }))
|
|
3015
3061
|
),
|
|
3016
|
-
|
|
3062
|
+
k
|
|
3017
3063
|
), {
|
|
3018
|
-
customScrollParent:
|
|
3064
|
+
customScrollParent: h,
|
|
3019
3065
|
// input
|
|
3020
3066
|
data: nt,
|
|
3021
3067
|
deviation: J,
|
|
3022
3068
|
footerHeight: r,
|
|
3023
|
-
gap:
|
|
3069
|
+
gap: F,
|
|
3024
3070
|
headerHeight: s,
|
|
3025
3071
|
increaseViewportBy: t,
|
|
3026
|
-
initialItemCount:
|
|
3072
|
+
initialItemCount: y,
|
|
3027
3073
|
itemDimensions: L,
|
|
3028
3074
|
overscan: n,
|
|
3029
3075
|
restoreStateFrom: it,
|
|
3030
3076
|
scrollBy: i,
|
|
3031
3077
|
scrollContainerState: l,
|
|
3032
|
-
scrollHeight:
|
|
3078
|
+
scrollHeight: _,
|
|
3033
3079
|
scrollTo: c,
|
|
3034
|
-
scrollToIndex:
|
|
3080
|
+
scrollToIndex: z,
|
|
3035
3081
|
scrollTop: a,
|
|
3036
|
-
smoothScrollTargetReached:
|
|
3037
|
-
totalCount:
|
|
3038
|
-
useWindowScroll:
|
|
3039
|
-
viewportDimensions:
|
|
3082
|
+
smoothScrollTargetReached: m,
|
|
3083
|
+
totalCount: d,
|
|
3084
|
+
useWindowScroll: p,
|
|
3085
|
+
viewportDimensions: k,
|
|
3040
3086
|
windowScrollContainerState: u,
|
|
3041
3087
|
windowScrollTo: T,
|
|
3042
|
-
windowViewportRect:
|
|
3043
|
-
...
|
|
3088
|
+
windowViewportRect: b,
|
|
3089
|
+
...I,
|
|
3044
3090
|
// output
|
|
3045
|
-
gridState:
|
|
3091
|
+
gridState: B,
|
|
3046
3092
|
horizontalDirection: At,
|
|
3047
3093
|
initialTopMostItemIndex: St,
|
|
3048
3094
|
totalListHeight: Bt,
|
|
3049
3095
|
...g,
|
|
3050
3096
|
endReached: Xt,
|
|
3051
3097
|
propsReady: v,
|
|
3052
|
-
rangeChanged:
|
|
3098
|
+
rangeChanged: yt,
|
|
3053
3099
|
startReached: Mt,
|
|
3054
3100
|
stateChanged: Y,
|
|
3055
3101
|
stateRestoreInProgress: dt,
|
|
3056
|
-
...
|
|
3102
|
+
...f
|
|
3057
3103
|
};
|
|
3058
3104
|
},
|
|
3059
|
-
X(
|
|
3105
|
+
X(je, at, ae, Yn, Pt, qe, Vt)
|
|
3060
3106
|
);
|
|
3061
|
-
function
|
|
3107
|
+
function so(t, e, n) {
|
|
3062
3108
|
return ee(1, Ce((t + n) / (Ce(e) + n)));
|
|
3063
3109
|
}
|
|
3064
3110
|
function En(t, e, n, o) {
|
|
3065
3111
|
const { height: r } = n;
|
|
3066
3112
|
if (r === void 0 || o.length === 0)
|
|
3067
3113
|
return { bottom: 0, top: 0 };
|
|
3068
|
-
const s =
|
|
3069
|
-
return { bottom:
|
|
3114
|
+
const s = Me(t, e, n, o[0].index);
|
|
3115
|
+
return { bottom: Me(t, e, n, o[o.length - 1].index) + r, top: s };
|
|
3070
3116
|
}
|
|
3071
|
-
function
|
|
3072
|
-
const r =
|
|
3117
|
+
function Me(t, e, n, o) {
|
|
3118
|
+
const r = so(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + ee(0, s - 1) * e.row;
|
|
3073
3119
|
return i > 0 ? i + e.row : i;
|
|
3074
3120
|
}
|
|
3075
|
-
const
|
|
3076
|
-
const t = C((S) => `Item ${S}`), e = C({}), n = C(null), o = C("virtuoso-grid-item"), r = C("virtuoso-grid-list"), s = C(
|
|
3121
|
+
const Lr = /* @__PURE__ */ U(() => {
|
|
3122
|
+
const t = C((S) => `Item ${S}`), e = C({}), n = C(null), o = C("virtuoso-grid-item"), r = C("virtuoso-grid-list"), s = C(Xe), i = C("div"), l = C(Yt), c = (S, g = null) => ct(
|
|
3077
3123
|
x(
|
|
3078
3124
|
e,
|
|
3079
|
-
E((
|
|
3125
|
+
E((I) => I[S]),
|
|
3080
3126
|
Z()
|
|
3081
3127
|
),
|
|
3082
3128
|
g
|
|
3083
|
-
), a = C(!1),
|
|
3084
|
-
return O(
|
|
3129
|
+
), a = C(!1), m = C(!1);
|
|
3130
|
+
return O(V(m), a), {
|
|
3085
3131
|
components: e,
|
|
3086
3132
|
computeItemKey: s,
|
|
3087
3133
|
context: n,
|
|
@@ -3094,51 +3140,51 @@ const Or = /* @__PURE__ */ U(() => {
|
|
|
3094
3140
|
listClassName: r,
|
|
3095
3141
|
ListComponent: c("List", "div"),
|
|
3096
3142
|
readyStateChanged: a,
|
|
3097
|
-
reportReadyState:
|
|
3143
|
+
reportReadyState: m,
|
|
3098
3144
|
ScrollerComponent: c("Scroller", "div"),
|
|
3099
3145
|
scrollerRef: l,
|
|
3100
3146
|
ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
|
|
3101
3147
|
};
|
|
3102
|
-
}),
|
|
3148
|
+
}), zr = /* @__PURE__ */ U(
|
|
3103
3149
|
([t, e]) => ({ ...t, ...e }),
|
|
3104
|
-
X(
|
|
3105
|
-
),
|
|
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"),
|
|
3150
|
+
X(Or, Lr)
|
|
3151
|
+
), Vr = /* @__PURE__ */ H.memo(function() {
|
|
3152
|
+
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"), m = et("ScrollSeekPlaceholder"), S = et("context"), g = It("itemDimensions"), I = It("gap"), w = et("log"), v = et("stateRestoreInProgress"), h = It("reportReadyState"), p = Ht(
|
|
3107
3153
|
H.useMemo(
|
|
3108
3154
|
() => (u) => {
|
|
3109
3155
|
const T = u.parentElement.parentElement.scrollHeight;
|
|
3110
3156
|
l(T);
|
|
3111
|
-
const
|
|
3112
|
-
if (
|
|
3113
|
-
const { height:
|
|
3114
|
-
g({ height:
|
|
3157
|
+
const b = u.firstChild;
|
|
3158
|
+
if (b) {
|
|
3159
|
+
const { height: f, width: d } = b.getBoundingClientRect();
|
|
3160
|
+
g({ height: f, width: d });
|
|
3115
3161
|
}
|
|
3116
|
-
|
|
3162
|
+
I({
|
|
3117
3163
|
column: Bn("column-gap", getComputedStyle(u).columnGap, w),
|
|
3118
3164
|
row: Bn("row-gap", getComputedStyle(u).rowGap, w)
|
|
3119
3165
|
});
|
|
3120
3166
|
},
|
|
3121
|
-
[l, g,
|
|
3167
|
+
[l, g, I, w]
|
|
3122
3168
|
),
|
|
3123
3169
|
!0,
|
|
3124
3170
|
!1
|
|
3125
3171
|
);
|
|
3126
|
-
return
|
|
3127
|
-
e.itemHeight > 0 && e.itemWidth > 0 &&
|
|
3128
|
-
}, [e]), v ? null : /* @__PURE__ */
|
|
3172
|
+
return Qn(() => {
|
|
3173
|
+
e.itemHeight > 0 && e.itemWidth > 0 && h(!0);
|
|
3174
|
+
}, [e]), v ? null : /* @__PURE__ */ P(
|
|
3129
3175
|
a,
|
|
3130
3176
|
{
|
|
3131
3177
|
className: n,
|
|
3132
|
-
ref:
|
|
3178
|
+
ref: p,
|
|
3133
3179
|
...q(a, S),
|
|
3134
3180
|
"data-testid": "virtuoso-item-list",
|
|
3135
3181
|
style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
|
|
3136
3182
|
children: e.items.map((u) => {
|
|
3137
3183
|
const T = s(u.index, u.data, S);
|
|
3138
|
-
return i ? /* @__PURE__ */
|
|
3139
|
-
|
|
3184
|
+
return i ? /* @__PURE__ */ P(
|
|
3185
|
+
m,
|
|
3140
3186
|
{
|
|
3141
|
-
...q(
|
|
3187
|
+
...q(m, S),
|
|
3142
3188
|
height: e.itemHeight,
|
|
3143
3189
|
index: u.index,
|
|
3144
3190
|
width: e.itemWidth
|
|
@@ -3157,32 +3203,32 @@ const Or = /* @__PURE__ */ U(() => {
|
|
|
3157
3203
|
})
|
|
3158
3204
|
}
|
|
3159
3205
|
);
|
|
3160
|
-
}),
|
|
3206
|
+
}), Pr = H.memo(function() {
|
|
3161
3207
|
const e = et("HeaderComponent"), n = It("headerHeight"), o = et("headerFooterTag"), r = Ht(
|
|
3162
3208
|
H.useMemo(
|
|
3163
3209
|
() => (i) => {
|
|
3164
|
-
n(
|
|
3210
|
+
n(vt(i, "height"));
|
|
3165
3211
|
},
|
|
3166
3212
|
[n]
|
|
3167
3213
|
),
|
|
3168
3214
|
!0,
|
|
3169
3215
|
!1
|
|
3170
3216
|
), s = et("context");
|
|
3171
|
-
return e ? /* @__PURE__ */
|
|
3172
|
-
}),
|
|
3217
|
+
return e ? /* @__PURE__ */ P(o, { ref: r, children: /* @__PURE__ */ P(e, { ...q(e, s) }) }) : null;
|
|
3218
|
+
}), Ar = H.memo(function() {
|
|
3173
3219
|
const e = et("FooterComponent"), n = It("footerHeight"), o = et("headerFooterTag"), r = Ht(
|
|
3174
3220
|
H.useMemo(
|
|
3175
3221
|
() => (i) => {
|
|
3176
|
-
n(
|
|
3222
|
+
n(vt(i, "height"));
|
|
3177
3223
|
},
|
|
3178
3224
|
[n]
|
|
3179
3225
|
),
|
|
3180
3226
|
!0,
|
|
3181
3227
|
!1
|
|
3182
3228
|
), s = et("context");
|
|
3183
|
-
return e ? /* @__PURE__ */
|
|
3184
|
-
}),
|
|
3185
|
-
const e = H.useContext(
|
|
3229
|
+
return e ? /* @__PURE__ */ P(o, { ref: r, children: /* @__PURE__ */ P(e, { ...q(e, s) }) }) : null;
|
|
3230
|
+
}), Mr = ({ children: t }) => {
|
|
3231
|
+
const e = H.useContext(Jn), n = It("itemDimensions"), o = It("viewportDimensions"), r = Ht(
|
|
3186
3232
|
H.useMemo(
|
|
3187
3233
|
() => (s) => {
|
|
3188
3234
|
o(s.getBoundingClientRect());
|
|
@@ -3194,26 +3240,26 @@ const Or = /* @__PURE__ */ U(() => {
|
|
|
3194
3240
|
);
|
|
3195
3241
|
return H.useEffect(() => {
|
|
3196
3242
|
e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
|
|
3197
|
-
}, [e, o, n]), /* @__PURE__ */
|
|
3198
|
-
},
|
|
3199
|
-
const e = H.useContext(
|
|
3243
|
+
}, [e, o, n]), /* @__PURE__ */ P("div", { ref: r, style: Zt(!1), children: t });
|
|
3244
|
+
}, Wr = ({ children: t }) => {
|
|
3245
|
+
const e = H.useContext(Jn), n = It("windowViewportRect"), o = It("itemDimensions"), r = et("customScrollParent"), s = Ne(n, r, !1);
|
|
3200
3246
|
return H.useEffect(() => {
|
|
3201
3247
|
e && (o({ height: e.itemHeight, width: e.itemWidth }), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
|
|
3202
|
-
}, [e, n, o]), /* @__PURE__ */
|
|
3203
|
-
},
|
|
3204
|
-
const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ?
|
|
3205
|
-
return /* @__PURE__ */
|
|
3206
|
-
/* @__PURE__ */
|
|
3207
|
-
/* @__PURE__ */
|
|
3208
|
-
/* @__PURE__ */
|
|
3248
|
+
}, [e, n, o]), /* @__PURE__ */ P("div", { ref: s, style: Zt(!1), children: t });
|
|
3249
|
+
}, Gr = /* @__PURE__ */ H.memo(function({ ...e }) {
|
|
3250
|
+
const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Dr : Nr, s = o || n ? Wr : Mr, i = et("context");
|
|
3251
|
+
return /* @__PURE__ */ P(r, { ...e, ...q(r, i), children: /* @__PURE__ */ Nt(s, { children: [
|
|
3252
|
+
/* @__PURE__ */ P(Pr, {}),
|
|
3253
|
+
/* @__PURE__ */ P(Vr, {}),
|
|
3254
|
+
/* @__PURE__ */ P(Ar, {})
|
|
3209
3255
|
] }) });
|
|
3210
3256
|
}), {
|
|
3211
|
-
Component:
|
|
3212
|
-
useEmitter:
|
|
3257
|
+
Component: _r,
|
|
3258
|
+
useEmitter: io,
|
|
3213
3259
|
useEmitterValue: et,
|
|
3214
3260
|
usePublisher: It
|
|
3215
|
-
} = /* @__PURE__ */
|
|
3216
|
-
|
|
3261
|
+
} = /* @__PURE__ */ Ye(
|
|
3262
|
+
zr,
|
|
3217
3263
|
{
|
|
3218
3264
|
optional: {
|
|
3219
3265
|
context: "context",
|
|
@@ -3252,19 +3298,19 @@ const Or = /* @__PURE__ */ U(() => {
|
|
|
3252
3298
|
readyStateChanged: "readyStateChanged"
|
|
3253
3299
|
}
|
|
3254
3300
|
},
|
|
3255
|
-
|
|
3256
|
-
),
|
|
3301
|
+
Gr
|
|
3302
|
+
), Nr = /* @__PURE__ */ Je({ useEmitter: io, useEmitterValue: et, usePublisher: It }), Dr = /* @__PURE__ */ Qe({ useEmitter: io, useEmitterValue: et, usePublisher: It });
|
|
3257
3303
|
function Bn(t, e, n) {
|
|
3258
3304
|
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);
|
|
3259
3305
|
}
|
|
3260
|
-
const
|
|
3306
|
+
const Jr = _r;
|
|
3261
3307
|
export {
|
|
3262
|
-
|
|
3263
|
-
|
|
3308
|
+
Xr as GroupedTableVirtuoso,
|
|
3309
|
+
Yr as GroupedVirtuoso,
|
|
3264
3310
|
mt as LogLevel,
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3311
|
+
Zr as TableVirtuoso,
|
|
3312
|
+
qr as Virtuoso,
|
|
3313
|
+
Jr as VirtuosoGrid,
|
|
3314
|
+
Jn as VirtuosoGridMockContext,
|
|
3269
3315
|
be as VirtuosoMockContext
|
|
3270
3316
|
};
|