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