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