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