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