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