react-virtuoso 4.18.5 → 4.18.7

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