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