react-virtuoso 4.18.17 → 4.18.18

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