@rinzai/zen 0.1.7 → 0.1.8

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/zen.js CHANGED
@@ -2,12 +2,12 @@ import { jsx as b, jsxs as W, Fragment as Fe } from "react/jsx-runtime";
2
2
  import * as C from "react";
3
3
  import { useLayoutEffect as tt, useEffect as re, useState as de, useId as nt, useMemo as ve, useRef as Ee } from "react";
4
4
  import * as ot from "react-dom";
5
- import { createPortal as st, flushSync as it } from "react-dom";
6
- const k = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "string" || typeof t == "number" ? o + " " + t : Array.isArray(t) ? o + " " + k(...t) : typeof t == "object" ? o + " " + Object.entries(t).reduce((n, [s, i]) => i == null || i === !1 ? n : typeof i == "string" || typeof i == "number" ? n + " " + s + "-" + i : typeof i == "boolean" && i ? n + " " + s : n, "") : o, ""), Te = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ve = (e, o) => (t) => {
5
+ import { createPortal as it, flushSync as st } from "react-dom";
6
+ const k = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "string" || typeof t == "number" ? o + " " + t : Array.isArray(t) ? o + " " + k(...t) : typeof t == "object" ? o + " " + Object.entries(t).reduce((n, [i, s]) => s == null || s === !1 ? n : typeof s == "string" || typeof s == "number" ? n + " " + i + "-" + s : typeof s == "boolean" && s ? n + " " + i : n, "") : o, ""), Te = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ve = (e, o) => (t) => {
7
7
  var c;
8
8
  if ((o == null ? void 0 : o.variants) == null) return k(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
9
- const { variants: n, defaultVariants: s } = o, i = Object.keys(n).map((a) => {
10
- const u = t == null ? void 0 : t[a], d = s == null ? void 0 : s[a];
9
+ const { variants: n, defaultVariants: i } = o, s = Object.keys(n).map((a) => {
10
+ const u = t == null ? void 0 : t[a], d = i == null ? void 0 : i[a];
11
11
  if (u === null) return null;
12
12
  const m = Te(u) || Te(d);
13
13
  return n[a][m];
@@ -18,17 +18,17 @@ const k = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "
18
18
  (a, { class: u, className: d, ...m }) => Object.entries(m).every(
19
19
  ([f, g]) => Array.isArray(g) ? g.includes(
20
20
  {
21
- ...s,
21
+ ...i,
22
22
  ...r
23
23
  }[f]
24
24
  ) : {
25
- ...s,
25
+ ...i,
26
26
  ...r
27
27
  }[f] === g
28
28
  ) ? [...a, u, d] : a,
29
29
  []
30
30
  );
31
- return k(e, i, l, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
31
+ return k(e, s, l, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
32
32
  };
33
33
  function We({ variant: e, className: o, ...t }) {
34
34
  return /* @__PURE__ */ b("span", { ...t, className: rt({ variant: e, className: o }) });
@@ -77,7 +77,7 @@ const ct = Ve(
77
77
  size: "default"
78
78
  }
79
79
  }
80
- ), le = Math.min, H = Math.max, ce = Math.round, se = Math.floor, _ = (e) => ({
80
+ ), le = Math.min, H = Math.max, ce = Math.round, ie = Math.floor, _ = (e) => ({
81
81
  x: e,
82
82
  y: e
83
83
  }), at = {
@@ -115,9 +115,9 @@ function $e(e) {
115
115
  }
116
116
  function ft(e, o, t) {
117
117
  t === void 0 && (t = !1);
118
- const n = me(e), s = $e(e), i = je(s);
119
- let r = s === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
120
- return o.reference[i] > o.floating[i] && (r = ae(r)), [r, ae(r)];
118
+ const n = me(e), i = $e(e), s = je(i);
119
+ let r = i === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
120
+ return o.reference[s] > o.floating[s] && (r = ae(r)), [r, ae(r)];
121
121
  }
122
122
  function dt(e) {
123
123
  const o = ae(e);
@@ -127,22 +127,22 @@ function Se(e) {
127
127
  return e.replace(/start|end/g, (o) => ut[o]);
128
128
  }
129
129
  function ht(e, o, t) {
130
- const n = ["left", "right"], s = ["right", "left"], i = ["top", "bottom"], r = ["bottom", "top"];
130
+ const n = ["left", "right"], i = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
131
131
  switch (e) {
132
132
  case "top":
133
133
  case "bottom":
134
- return t ? o ? s : n : o ? n : s;
134
+ return t ? o ? i : n : o ? n : i;
135
135
  case "left":
136
136
  case "right":
137
- return o ? i : r;
137
+ return o ? s : r;
138
138
  default:
139
139
  return [];
140
140
  }
141
141
  }
142
142
  function mt(e, o, t, n) {
143
- const s = me(e);
144
- let i = ht(U(e), t === "start", n);
145
- return s && (i = i.map((r) => r + "-" + s), o && (i = i.concat(i.map(Se)))), i;
143
+ const i = me(e);
144
+ let s = ht(U(e), t === "start", n);
145
+ return i && (s = s.map((r) => r + "-" + i), o && (s = s.concat(s.map(Se)))), s;
146
146
  }
147
147
  function ae(e) {
148
148
  return e.replace(/left|right|bottom|top/g, (o) => at[o]);
@@ -169,15 +169,15 @@ function ue(e) {
169
169
  x: o,
170
170
  y: t,
171
171
  width: n,
172
- height: s
172
+ height: i
173
173
  } = e;
174
174
  return {
175
175
  width: n,
176
- height: s,
176
+ height: i,
177
177
  top: t,
178
178
  left: o,
179
179
  right: o + n,
180
- bottom: t + s,
180
+ bottom: t + i,
181
181
  x: o,
182
182
  y: t
183
183
  };
@@ -185,15 +185,15 @@ function ue(e) {
185
185
  function ze(e, o, t) {
186
186
  let {
187
187
  reference: n,
188
- floating: s
188
+ floating: i
189
189
  } = e;
190
- const i = G(o), r = $e(o), l = je(r), c = U(o), a = i === "y", u = n.x + n.width / 2 - s.width / 2, d = n.y + n.height / 2 - s.height / 2, m = n[l] / 2 - s[l] / 2;
190
+ const s = G(o), r = $e(o), l = je(r), c = U(o), a = s === "y", u = n.x + n.width / 2 - i.width / 2, d = n.y + n.height / 2 - i.height / 2, m = n[l] / 2 - i[l] / 2;
191
191
  let f;
192
192
  switch (c) {
193
193
  case "top":
194
194
  f = {
195
195
  x: u,
196
- y: n.y - s.height
196
+ y: n.y - i.height
197
197
  };
198
198
  break;
199
199
  case "bottom":
@@ -210,7 +210,7 @@ function ze(e, o, t) {
210
210
  break;
211
211
  case "left":
212
212
  f = {
213
- x: n.x - s.width,
213
+ x: n.x - i.width,
214
214
  y: d
215
215
  };
216
216
  break;
@@ -230,26 +230,26 @@ function ze(e, o, t) {
230
230
  }
231
231
  return f;
232
232
  }
233
- const xt = async (e, o, t) => {
233
+ const wt = async (e, o, t) => {
234
234
  const {
235
235
  placement: n = "bottom",
236
- strategy: s = "absolute",
237
- middleware: i = [],
236
+ strategy: i = "absolute",
237
+ middleware: s = [],
238
238
  platform: r
239
- } = t, l = i.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(o));
239
+ } = t, l = s.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(o));
240
240
  let a = await r.getElementRects({
241
241
  reference: e,
242
242
  floating: o,
243
- strategy: s
243
+ strategy: i
244
244
  }), {
245
245
  x: u,
246
246
  y: d
247
247
  } = ze(a, n, c), m = n, f = {}, g = 0;
248
- for (let x = 0; x < l.length; x++) {
248
+ for (let w = 0; w < l.length; w++) {
249
249
  const {
250
- name: w,
250
+ name: x,
251
251
  fn: h
252
- } = l[x], {
252
+ } = l[w], {
253
253
  x: p,
254
254
  y: v,
255
255
  data: E,
@@ -259,7 +259,7 @@ const xt = async (e, o, t) => {
259
259
  y: d,
260
260
  initialPlacement: n,
261
261
  placement: m,
262
- strategy: s,
262
+ strategy: i,
263
263
  middlewareData: f,
264
264
  rects: a,
265
265
  platform: r,
@@ -270,24 +270,24 @@ const xt = async (e, o, t) => {
270
270
  });
271
271
  u = p ?? u, d = v ?? d, f = {
272
272
  ...f,
273
- [w]: {
274
- ...f[w],
273
+ [x]: {
274
+ ...f[x],
275
275
  ...E
276
276
  }
277
277
  }, y && g <= 50 && (g++, typeof y == "object" && (y.placement && (m = y.placement), y.rects && (a = y.rects === !0 ? await r.getElementRects({
278
278
  reference: e,
279
279
  floating: o,
280
- strategy: s
280
+ strategy: i
281
281
  }) : y.rects), {
282
282
  x: u,
283
283
  y: d
284
- } = ze(a, m, c)), x = -1);
284
+ } = ze(a, m, c)), w = -1);
285
285
  }
286
286
  return {
287
287
  x: u,
288
288
  y: d,
289
289
  placement: m,
290
- strategy: s,
290
+ strategy: i,
291
291
  middlewareData: f
292
292
  };
293
293
  };
@@ -296,8 +296,8 @@ async function He(e, o) {
296
296
  o === void 0 && (o = {});
297
297
  const {
298
298
  x: n,
299
- y: s,
300
- platform: i,
299
+ y: i,
300
+ platform: s,
301
301
  rects: r,
302
302
  elements: l,
303
303
  strategy: c
@@ -307,23 +307,23 @@ async function He(e, o) {
307
307
  elementContext: d = "floating",
308
308
  altBoundary: m = !1,
309
309
  padding: f = 0
310
- } = he(o, e), g = pt(f), w = l[m ? d === "floating" ? "reference" : "floating" : d], h = ue(await i.getClippingRect({
311
- element: (t = await (i.isElement == null ? void 0 : i.isElement(w))) == null || t ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
310
+ } = he(o, e), g = pt(f), x = l[m ? d === "floating" ? "reference" : "floating" : d], h = ue(await s.getClippingRect({
311
+ element: (t = await (s.isElement == null ? void 0 : s.isElement(x))) == null || t ? x : x.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
312
312
  boundary: a,
313
313
  rootBoundary: u,
314
314
  strategy: c
315
315
  })), p = d === "floating" ? {
316
316
  x: n,
317
- y: s,
317
+ y: i,
318
318
  width: r.floating.width,
319
319
  height: r.floating.height
320
- } : r.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), E = await (i.isElement == null ? void 0 : i.isElement(v)) ? await (i.getScale == null ? void 0 : i.getScale(v)) || {
320
+ } : r.reference, v = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), E = await (s.isElement == null ? void 0 : s.isElement(v)) ? await (s.getScale == null ? void 0 : s.getScale(v)) || {
321
321
  x: 1,
322
322
  y: 1
323
323
  } : {
324
324
  x: 1,
325
325
  y: 1
326
- }, y = ue(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
326
+ }, y = ue(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
327
327
  elements: l,
328
328
  rect: p,
329
329
  offsetParent: v,
@@ -336,15 +336,15 @@ async function He(e, o) {
336
336
  right: (y.right - h.right + g.right) / E.x
337
337
  };
338
338
  }
339
- const wt = function(e) {
339
+ const xt = function(e) {
340
340
  return e === void 0 && (e = {}), {
341
341
  name: "flip",
342
342
  options: e,
343
343
  async fn(o) {
344
344
  var t, n;
345
345
  const {
346
- placement: s,
347
- middlewareData: i,
346
+ placement: i,
347
+ middlewareData: s,
348
348
  rects: r,
349
349
  initialPlacement: l,
350
350
  platform: c,
@@ -355,25 +355,25 @@ const wt = function(e) {
355
355
  fallbackPlacements: m,
356
356
  fallbackStrategy: f = "bestFit",
357
357
  fallbackAxisSideDirection: g = "none",
358
- flipAlignment: x = !0,
359
- ...w
358
+ flipAlignment: w = !0,
359
+ ...x
360
360
  } = he(e, o);
361
- if ((t = i.arrow) != null && t.alignmentOffset)
361
+ if ((t = s.arrow) != null && t.alignmentOffset)
362
362
  return {};
363
- const h = U(s), p = G(l), v = U(l) === l, E = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), y = m || (v || !x ? [ae(l)] : dt(l)), O = g !== "none";
364
- !m && O && y.push(...mt(l, x, g, E));
365
- const R = [l, ...y], z = await He(o, w), Y = [];
366
- let F = ((n = i.flip) == null ? void 0 : n.overflows) || [];
363
+ const h = U(i), p = G(l), v = U(l) === l, E = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), y = m || (v || !w ? [ae(l)] : dt(l)), O = g !== "none";
364
+ !m && O && y.push(...mt(l, w, g, E));
365
+ const R = [l, ...y], z = await He(o, x), Y = [];
366
+ let F = ((n = s.flip) == null ? void 0 : n.overflows) || [];
367
367
  if (u && Y.push(z[h]), d) {
368
- const I = ft(s, r, E);
368
+ const I = ft(i, r, E);
369
369
  Y.push(z[I[0]], z[I[1]]);
370
370
  }
371
371
  if (F = [...F, {
372
- placement: s,
372
+ placement: i,
373
373
  overflows: Y
374
374
  }], !Y.every((I) => I <= 0)) {
375
375
  var q, ee;
376
- const I = (((q = i.flip) == null ? void 0 : q.index) || 0) + 1, te = R[I];
376
+ const I = (((q = s.flip) == null ? void 0 : q.index) || 0) + 1, te = R[I];
377
377
  if (te)
378
378
  return {
379
379
  data: {
@@ -405,7 +405,7 @@ const wt = function(e) {
405
405
  M = l;
406
406
  break;
407
407
  }
408
- if (s !== M)
408
+ if (i !== M)
409
409
  return {
410
410
  reset: {
411
411
  placement: M
@@ -420,8 +420,8 @@ async function yt(e, o) {
420
420
  const {
421
421
  placement: t,
422
422
  platform: n,
423
- elements: s
424
- } = e, i = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), r = U(t), l = me(t), c = G(t) === "y", a = ["left", "top"].includes(r) ? -1 : 1, u = i && c ? -1 : 1, d = he(o, e);
423
+ elements: i
424
+ } = e, s = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), r = U(t), l = me(t), c = G(t) === "y", a = ["left", "top"].includes(r) ? -1 : 1, u = s && c ? -1 : 1, d = he(o, e);
425
425
  let {
426
426
  mainAxis: m,
427
427
  crossAxis: f,
@@ -450,14 +450,14 @@ const bt = function(e) {
450
450
  async fn(o) {
451
451
  var t, n;
452
452
  const {
453
- x: s,
454
- y: i,
453
+ x: i,
454
+ y: s,
455
455
  placement: r,
456
456
  middlewareData: l
457
457
  } = o, c = await yt(o, e);
458
458
  return r === ((t = l.offset) == null ? void 0 : t.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
459
- x: s + c.x,
460
- y: i + c.y,
459
+ x: i + c.x,
460
+ y: s + c.y,
461
461
  data: {
462
462
  ...c,
463
463
  placement: r
@@ -473,16 +473,16 @@ const bt = function(e) {
473
473
  const {
474
474
  x: t,
475
475
  y: n,
476
- placement: s
476
+ placement: i
477
477
  } = o, {
478
- mainAxis: i = !0,
478
+ mainAxis: s = !0,
479
479
  crossAxis: r = !1,
480
480
  limiter: l = {
481
- fn: (w) => {
481
+ fn: (x) => {
482
482
  let {
483
483
  x: h,
484
484
  y: p
485
- } = w;
485
+ } = x;
486
486
  return {
487
487
  x: h,
488
488
  y: p
@@ -493,28 +493,28 @@ const bt = function(e) {
493
493
  } = he(e, o), a = {
494
494
  x: t,
495
495
  y: n
496
- }, u = await He(o, c), d = G(U(s)), m = Be(d);
496
+ }, u = await He(o, c), d = G(U(i)), m = Be(d);
497
497
  let f = a[m], g = a[d];
498
- if (i) {
499
- const w = m === "y" ? "top" : "left", h = m === "y" ? "bottom" : "right", p = f + u[w], v = f - u[h];
498
+ if (s) {
499
+ const x = m === "y" ? "top" : "left", h = m === "y" ? "bottom" : "right", p = f + u[x], v = f - u[h];
500
500
  f = Ae(p, f, v);
501
501
  }
502
502
  if (r) {
503
- const w = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", p = g + u[w], v = g - u[h];
503
+ const x = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", p = g + u[x], v = g - u[h];
504
504
  g = Ae(p, g, v);
505
505
  }
506
- const x = l.fn({
506
+ const w = l.fn({
507
507
  ...o,
508
508
  [m]: f,
509
509
  [d]: g
510
510
  });
511
511
  return {
512
- ...x,
512
+ ...w,
513
513
  data: {
514
- x: x.x - t,
515
- y: x.y - n,
514
+ x: w.x - t,
515
+ y: w.y - n,
516
516
  enabled: {
517
- [m]: i,
517
+ [m]: s,
518
518
  [d]: r
519
519
  }
520
520
  }
@@ -553,9 +553,9 @@ function oe(e) {
553
553
  overflow: o,
554
554
  overflowX: t,
555
555
  overflowY: n,
556
- display: s
556
+ display: i
557
557
  } = L(e);
558
- return /auto|scroll|overlay|hidden|clip/.test(o + n + t) && !["inline", "contents"].includes(s);
558
+ return /auto|scroll|overlay|hidden|clip/.test(o + n + t) && !["inline", "contents"].includes(i);
559
559
  }
560
560
  function Et(e) {
561
561
  return ["table", "td", "th"].includes(Q(e));
@@ -593,7 +593,7 @@ function J(e) {
593
593
  function L(e) {
594
594
  return A(e).getComputedStyle(e);
595
595
  }
596
- function xe(e) {
596
+ function we(e) {
597
597
  return N(e) ? {
598
598
  scrollLeft: e.scrollLeft,
599
599
  scrollTop: e.scrollTop
@@ -621,12 +621,12 @@ function Ke(e) {
621
621
  function ne(e, o, t) {
622
622
  var n;
623
623
  o === void 0 && (o = []), t === void 0 && (t = !0);
624
- const s = Ke(e), i = s === ((n = e.ownerDocument) == null ? void 0 : n.body), r = A(s);
625
- if (i) {
624
+ const i = Ke(e), s = i === ((n = e.ownerDocument) == null ? void 0 : n.body), r = A(i);
625
+ if (s) {
626
626
  const l = Ce(r);
627
- return o.concat(r, r.visualViewport || [], oe(s) ? s : [], l && t ? ne(l) : []);
627
+ return o.concat(r, r.visualViewport || [], oe(i) ? i : [], l && t ? ne(l) : []);
628
628
  }
629
- return o.concat(s, ne(s, [], t));
629
+ return o.concat(i, ne(i, [], t));
630
630
  }
631
631
  function Ce(e) {
632
632
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
@@ -634,8 +634,8 @@ function Ce(e) {
634
634
  function Ye(e) {
635
635
  const o = L(e);
636
636
  let t = parseFloat(o.width) || 0, n = parseFloat(o.height) || 0;
637
- const s = D(e), i = s ? e.offsetWidth : t, r = s ? e.offsetHeight : n, l = ce(t) !== i || ce(n) !== r;
638
- return l && (t = i, n = r), {
637
+ const i = D(e), s = i ? e.offsetWidth : t, r = i ? e.offsetHeight : n, l = ce(t) !== s || ce(n) !== r;
638
+ return l && (t = s, n = r), {
639
639
  width: t,
640
640
  height: n,
641
641
  $: l
@@ -650,10 +650,10 @@ function Z(e) {
650
650
  return _(1);
651
651
  const t = o.getBoundingClientRect(), {
652
652
  width: n,
653
- height: s,
654
- $: i
653
+ height: i,
654
+ $: s
655
655
  } = Ye(o);
656
- let r = (i ? ce(t.width) : t.width) / n, l = (i ? ce(t.height) : t.height) / s;
656
+ let r = (s ? ce(t.width) : t.width) / n, l = (s ? ce(t.height) : t.height) / i;
657
657
  return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
658
658
  x: r,
659
659
  y: l
@@ -672,17 +672,17 @@ function Ot(e, o, t) {
672
672
  }
673
673
  function K(e, o, t, n) {
674
674
  o === void 0 && (o = !1), t === void 0 && (t = !1);
675
- const s = e.getBoundingClientRect(), i = ke(e);
675
+ const i = e.getBoundingClientRect(), s = ke(e);
676
676
  let r = _(1);
677
677
  o && (n ? N(n) && (r = Z(n)) : r = Z(e));
678
- const l = Ot(i, t, n) ? qe(i) : _(0);
679
- let c = (s.left + l.x) / r.x, a = (s.top + l.y) / r.y, u = s.width / r.x, d = s.height / r.y;
680
- if (i) {
681
- const m = A(i), f = n && N(n) ? A(n) : n;
682
- let g = m, x = Ce(g);
683
- for (; x && n && f !== g; ) {
684
- const w = Z(x), h = x.getBoundingClientRect(), p = L(x), v = h.left + (x.clientLeft + parseFloat(p.paddingLeft)) * w.x, E = h.top + (x.clientTop + parseFloat(p.paddingTop)) * w.y;
685
- c *= w.x, a *= w.y, u *= w.x, d *= w.y, c += v, a += E, g = A(x), x = Ce(g);
678
+ const l = Ot(s, t, n) ? qe(s) : _(0);
679
+ let c = (i.left + l.x) / r.x, a = (i.top + l.y) / r.y, u = i.width / r.x, d = i.height / r.y;
680
+ if (s) {
681
+ const m = A(s), f = n && N(n) ? A(n) : n;
682
+ let g = m, w = Ce(g);
683
+ for (; w && n && f !== g; ) {
684
+ const x = Z(w), h = w.getBoundingClientRect(), p = L(w), v = h.left + (w.clientLeft + parseFloat(p.paddingLeft)) * x.x, E = h.top + (w.clientTop + parseFloat(p.paddingTop)) * x.y;
685
+ c *= x.x, a *= x.y, u *= x.x, d *= x.y, c += v, a += E, g = A(w), w = Ce(g);
686
686
  }
687
687
  }
688
688
  return ue({
@@ -693,18 +693,18 @@ function K(e, o, t, n) {
693
693
  });
694
694
  }
695
695
  function Me(e, o) {
696
- const t = xe(e).scrollLeft;
696
+ const t = we(e).scrollLeft;
697
697
  return o ? o.left + t : K(P(e)).left + t;
698
698
  }
699
699
  function Xe(e, o, t) {
700
700
  t === void 0 && (t = !1);
701
- const n = e.getBoundingClientRect(), s = n.left + o.scrollLeft - (t ? 0 : (
701
+ const n = e.getBoundingClientRect(), i = n.left + o.scrollLeft - (t ? 0 : (
702
702
  // RTL <body> scrollbar.
703
703
  Me(e, n)
704
- )), i = n.top + o.scrollTop;
704
+ )), s = n.top + o.scrollTop;
705
705
  return {
706
- x: s,
707
- y: i
706
+ x: i,
707
+ y: s
708
708
  };
709
709
  }
710
710
  function Rt(e) {
@@ -712,21 +712,21 @@ function Rt(e) {
712
712
  elements: o,
713
713
  rect: t,
714
714
  offsetParent: n,
715
- strategy: s
715
+ strategy: i
716
716
  } = e;
717
- const i = s === "fixed", r = P(n), l = o ? pe(o.floating) : !1;
718
- if (n === r || l && i)
717
+ const s = i === "fixed", r = P(n), l = o ? pe(o.floating) : !1;
718
+ if (n === r || l && s)
719
719
  return t;
720
720
  let c = {
721
721
  scrollLeft: 0,
722
722
  scrollTop: 0
723
723
  }, a = _(1);
724
724
  const u = _(0), d = D(n);
725
- if ((d || !d && !i) && ((Q(n) !== "body" || oe(r)) && (c = xe(n)), D(n))) {
725
+ if ((d || !d && !s) && ((Q(n) !== "body" || oe(r)) && (c = we(n)), D(n))) {
726
726
  const f = K(n);
727
727
  a = Z(n), u.x = f.x + n.clientLeft, u.y = f.y + n.clientTop;
728
728
  }
729
- const m = r && !d && !i ? Xe(r, c, !0) : _(0);
729
+ const m = r && !d && !s ? Xe(r, c, !0) : _(0);
730
730
  return {
731
731
  width: t.width * a.x,
732
732
  height: t.height * a.y,
@@ -738,33 +738,33 @@ function kt(e) {
738
738
  return Array.from(e.getClientRects());
739
739
  }
740
740
  function Mt(e) {
741
- const o = P(e), t = xe(e), n = e.ownerDocument.body, s = H(o.scrollWidth, o.clientWidth, n.scrollWidth, n.clientWidth), i = H(o.scrollHeight, o.clientHeight, n.scrollHeight, n.clientHeight);
741
+ const o = P(e), t = we(e), n = e.ownerDocument.body, i = H(o.scrollWidth, o.clientWidth, n.scrollWidth, n.clientWidth), s = H(o.scrollHeight, o.clientHeight, n.scrollHeight, n.clientHeight);
742
742
  let r = -t.scrollLeft + Me(e);
743
743
  const l = -t.scrollTop;
744
- return L(n).direction === "rtl" && (r += H(o.clientWidth, n.clientWidth) - s), {
745
- width: s,
746
- height: i,
744
+ return L(n).direction === "rtl" && (r += H(o.clientWidth, n.clientWidth) - i), {
745
+ width: i,
746
+ height: s,
747
747
  x: r,
748
748
  y: l
749
749
  };
750
750
  }
751
751
  function Tt(e, o) {
752
- const t = A(e), n = P(e), s = t.visualViewport;
753
- let i = n.clientWidth, r = n.clientHeight, l = 0, c = 0;
754
- if (s) {
755
- i = s.width, r = s.height;
752
+ const t = A(e), n = P(e), i = t.visualViewport;
753
+ let s = n.clientWidth, r = n.clientHeight, l = 0, c = 0;
754
+ if (i) {
755
+ s = i.width, r = i.height;
756
756
  const a = Re();
757
- (!a || a && o === "fixed") && (l = s.offsetLeft, c = s.offsetTop);
757
+ (!a || a && o === "fixed") && (l = i.offsetLeft, c = i.offsetTop);
758
758
  }
759
759
  return {
760
- width: i,
760
+ width: s,
761
761
  height: r,
762
762
  x: l,
763
763
  y: c
764
764
  };
765
765
  }
766
766
  function At(e, o) {
767
- const t = K(e, !0, o === "fixed"), n = t.top + e.clientTop, s = t.left + e.clientLeft, i = D(e) ? Z(e) : _(1), r = e.clientWidth * i.x, l = e.clientHeight * i.y, c = s * i.x, a = n * i.y;
767
+ const t = K(e, !0, o === "fixed"), n = t.top + e.clientTop, i = t.left + e.clientLeft, s = D(e) ? Z(e) : _(1), r = e.clientWidth * s.x, l = e.clientHeight * s.y, c = i * s.x, a = n * s.y;
768
768
  return {
769
769
  width: r,
770
770
  height: l,
@@ -781,10 +781,10 @@ function Ne(e, o, t) {
781
781
  else if (N(o))
782
782
  n = At(o, t);
783
783
  else {
784
- const s = qe(e);
784
+ const i = qe(e);
785
785
  n = {
786
- x: o.x - s.x,
787
- y: o.y - s.y,
786
+ x: o.x - i.x,
787
+ y: o.y - i.y,
788
788
  width: o.width,
789
789
  height: o.height
790
790
  };
@@ -799,12 +799,12 @@ function zt(e, o) {
799
799
  const t = o.get(e);
800
800
  if (t)
801
801
  return t;
802
- let n = ne(e, [], !1).filter((l) => N(l) && Q(l) !== "body"), s = null;
803
- const i = L(e).position === "fixed";
804
- let r = i ? $(e) : e;
802
+ let n = ne(e, [], !1).filter((l) => N(l) && Q(l) !== "body"), i = null;
803
+ const s = L(e).position === "fixed";
804
+ let r = s ? $(e) : e;
805
805
  for (; N(r) && !J(r); ) {
806
806
  const l = L(r), c = Oe(r);
807
- !c && l.position === "fixed" && (s = null), (i ? !c && !s : !c && l.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || oe(r) && !c && Ze(e, r)) ? n = n.filter((u) => u !== r) : s = l, r = $(r);
807
+ !c && l.position === "fixed" && (i = null), (s ? !c && !i : !c && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || oe(r) && !c && Ze(e, r)) ? n = n.filter((u) => u !== r) : i = l, r = $(r);
808
808
  }
809
809
  return o.set(e, n), n;
810
810
  }
@@ -813,12 +813,12 @@ function It(e) {
813
813
  element: o,
814
814
  boundary: t,
815
815
  rootBoundary: n,
816
- strategy: s
816
+ strategy: i
817
817
  } = e;
818
818
  const r = [...t === "clippingAncestors" ? pe(o) ? [] : zt(o, this._c) : [].concat(t), n], l = r[0], c = r.reduce((a, u) => {
819
- const d = Ne(o, u, s);
819
+ const d = Ne(o, u, i);
820
820
  return a.top = H(d.top, a.top), a.right = le(d.right, a.right), a.bottom = le(d.bottom, a.bottom), a.left = H(d.left, a.left), a;
821
- }, Ne(o, l, s));
821
+ }, Ne(o, l, i));
822
822
  return {
823
823
  width: c.right - c.left,
824
824
  height: c.bottom - c.top,
@@ -837,18 +837,18 @@ function Nt(e) {
837
837
  };
838
838
  }
839
839
  function Lt(e, o, t) {
840
- const n = D(o), s = P(o), i = t === "fixed", r = K(e, !0, i, o);
840
+ const n = D(o), i = P(o), s = t === "fixed", r = K(e, !0, s, o);
841
841
  let l = {
842
842
  scrollLeft: 0,
843
843
  scrollTop: 0
844
844
  };
845
845
  const c = _(0);
846
- if (n || !n && !i)
847
- if ((Q(o) !== "body" || oe(s)) && (l = xe(o)), n) {
848
- const m = K(o, !0, i, o);
846
+ if (n || !n && !s)
847
+ if ((Q(o) !== "body" || oe(i)) && (l = we(o)), n) {
848
+ const m = K(o, !0, s, o);
849
849
  c.x = m.x + o.clientLeft, c.y = m.y + o.clientTop;
850
- } else s && (c.x = Me(s));
851
- const a = s && !n && !i ? Xe(s, l) : _(0), u = r.left + l.scrollLeft - c.x - a.x, d = r.top + l.scrollTop - c.y - a.y;
850
+ } else i && (c.x = Me(i));
851
+ const a = i && !n && !s ? Xe(i, l) : _(0), u = r.left + l.scrollLeft - c.x - a.x, d = r.top + l.scrollTop - c.y - a.y;
852
852
  return {
853
853
  x: u,
854
854
  y: d,
@@ -856,7 +856,7 @@ function Lt(e, o, t) {
856
856
  height: r.height
857
857
  };
858
858
  }
859
- function we(e) {
859
+ function xe(e) {
860
860
  return L(e).position === "static";
861
861
  }
862
862
  function Le(e, o) {
@@ -872,18 +872,18 @@ function Ge(e, o) {
872
872
  if (pe(e))
873
873
  return t;
874
874
  if (!D(e)) {
875
- let s = $(e);
876
- for (; s && !J(s); ) {
877
- if (N(s) && !we(s))
878
- return s;
879
- s = $(s);
875
+ let i = $(e);
876
+ for (; i && !J(i); ) {
877
+ if (N(i) && !xe(i))
878
+ return i;
879
+ i = $(i);
880
880
  }
881
881
  return t;
882
882
  }
883
883
  let n = Le(e, o);
884
- for (; n && Et(n) && we(n); )
884
+ for (; n && Et(n) && xe(n); )
885
885
  n = Le(n, o);
886
- return n && J(n) && we(n) && !Oe(n) ? t : n || St(e) || t;
886
+ return n && J(n) && xe(n) && !Oe(n) ? t : n || St(e) || t;
887
887
  }
888
888
  const _t = async function(e) {
889
889
  const o = this.getOffsetParent || Ge, t = this.getDimensions, n = await t(e.floating);
@@ -914,13 +914,13 @@ const Pt = {
914
914
  };
915
915
  function Ft(e, o) {
916
916
  let t = null, n;
917
- const s = P(e);
918
- function i() {
917
+ const i = P(e);
918
+ function s() {
919
919
  var l;
920
920
  clearTimeout(n), (l = t) == null || l.disconnect(), t = null;
921
921
  }
922
922
  function r(l, c) {
923
- l === void 0 && (l = !1), c === void 0 && (c = 1), i();
923
+ l === void 0 && (l = !1), c === void 0 && (c = 1), s();
924
924
  const {
925
925
  left: a,
926
926
  top: u,
@@ -929,8 +929,8 @@ function Ft(e, o) {
929
929
  } = e.getBoundingClientRect();
930
930
  if (l || o(), !d || !m)
931
931
  return;
932
- const f = se(u), g = se(s.clientWidth - (a + d)), x = se(s.clientHeight - (u + m)), w = se(a), p = {
933
- rootMargin: -f + "px " + -g + "px " + -x + "px " + -w + "px",
932
+ const f = ie(u), g = ie(i.clientWidth - (a + d)), w = ie(i.clientHeight - (u + m)), x = ie(a), p = {
933
+ rootMargin: -f + "px " + -g + "px " + -w + "px " + -x + "px",
934
934
  threshold: H(0, le(1, c)) || 1
935
935
  };
936
936
  let v = !0;
@@ -949,28 +949,28 @@ function Ft(e, o) {
949
949
  t = new IntersectionObserver(E, {
950
950
  ...p,
951
951
  // Handle <iframe>s
952
- root: s.ownerDocument
952
+ root: i.ownerDocument
953
953
  });
954
954
  } catch {
955
955
  t = new IntersectionObserver(E, p);
956
956
  }
957
957
  t.observe(e);
958
958
  }
959
- return r(!0), i;
959
+ return r(!0), s;
960
960
  }
961
961
  function Vt(e, o, t, n) {
962
962
  n === void 0 && (n = {});
963
963
  const {
964
- ancestorScroll: s = !0,
965
- ancestorResize: i = !0,
964
+ ancestorScroll: i = !0,
965
+ ancestorResize: s = !0,
966
966
  elementResize: r = typeof ResizeObserver == "function",
967
967
  layoutShift: l = typeof IntersectionObserver == "function",
968
968
  animationFrame: c = !1
969
- } = n, a = ke(e), u = s || i ? [...a ? ne(a) : [], ...ne(o)] : [];
969
+ } = n, a = ke(e), u = i || s ? [...a ? ne(a) : [], ...ne(o)] : [];
970
970
  u.forEach((h) => {
971
- s && h.addEventListener("scroll", t, {
971
+ i && h.addEventListener("scroll", t, {
972
972
  passive: !0
973
- }), i && h.addEventListener("resize", t);
973
+ }), s && h.addEventListener("resize", t);
974
974
  });
975
975
  const d = a && l ? Ft(a, t) : null;
976
976
  let m = -1, f = null;
@@ -981,33 +981,33 @@ function Vt(e, o, t, n) {
981
981
  (v = f) == null || v.observe(o);
982
982
  })), t();
983
983
  }), a && !c && f.observe(a), f.observe(o));
984
- let g, x = c ? K(e) : null;
985
- c && w();
986
- function w() {
984
+ let g, w = c ? K(e) : null;
985
+ c && x();
986
+ function x() {
987
987
  const h = K(e);
988
- x && (h.x !== x.x || h.y !== x.y || h.width !== x.width || h.height !== x.height) && t(), x = h, g = requestAnimationFrame(w);
988
+ w && (h.x !== w.x || h.y !== w.y || h.width !== w.width || h.height !== w.height) && t(), w = h, g = requestAnimationFrame(x);
989
989
  }
990
990
  return t(), () => {
991
991
  var h;
992
992
  u.forEach((p) => {
993
- s && p.removeEventListener("scroll", t), i && p.removeEventListener("resize", t);
993
+ i && p.removeEventListener("scroll", t), s && p.removeEventListener("resize", t);
994
994
  }), d == null || d(), (h = f) == null || h.disconnect(), f = null, c && cancelAnimationFrame(g);
995
995
  };
996
996
  }
997
- const Wt = bt, Bt = vt, jt = wt, $t = (e, o, t) => {
998
- const n = /* @__PURE__ */ new Map(), s = {
997
+ const Wt = bt, Bt = vt, jt = xt, $t = (e, o, t) => {
998
+ const n = /* @__PURE__ */ new Map(), i = {
999
999
  platform: Pt,
1000
1000
  ...t
1001
- }, i = {
1002
- ...s.platform,
1001
+ }, s = {
1002
+ ...i.platform,
1003
1003
  _c: n
1004
1004
  };
1005
- return xt(e, o, {
1006
- ...s,
1007
- platform: i
1005
+ return wt(e, o, {
1006
+ ...i,
1007
+ platform: s
1008
1008
  });
1009
1009
  };
1010
- var ie = typeof document < "u" ? tt : re;
1010
+ var se = typeof document < "u" ? tt : re;
1011
1011
  function fe(e, o) {
1012
1012
  if (e === o)
1013
1013
  return !0;
@@ -1015,7 +1015,7 @@ function fe(e, o) {
1015
1015
  return !1;
1016
1016
  if (typeof e == "function" && e.toString() === o.toString())
1017
1017
  return !0;
1018
- let t, n, s;
1018
+ let t, n, i;
1019
1019
  if (e && o && typeof e == "object") {
1020
1020
  if (Array.isArray(e)) {
1021
1021
  if (t = e.length, t !== o.length) return !1;
@@ -1024,14 +1024,14 @@ function fe(e, o) {
1024
1024
  return !1;
1025
1025
  return !0;
1026
1026
  }
1027
- if (s = Object.keys(e), t = s.length, t !== Object.keys(o).length)
1027
+ if (i = Object.keys(e), t = i.length, t !== Object.keys(o).length)
1028
1028
  return !1;
1029
1029
  for (n = t; n-- !== 0; )
1030
- if (!{}.hasOwnProperty.call(o, s[n]))
1030
+ if (!{}.hasOwnProperty.call(o, i[n]))
1031
1031
  return !1;
1032
1032
  for (n = t; n-- !== 0; ) {
1033
- const i = s[n];
1034
- if (!(i === "_owner" && e.$$typeof) && !fe(e[i], o[i]))
1033
+ const s = i[n];
1034
+ if (!(s === "_owner" && e.$$typeof) && !fe(e[s], o[s]))
1035
1035
  return !1;
1036
1036
  }
1037
1037
  return !0;
@@ -1047,7 +1047,7 @@ function _e(e, o) {
1047
1047
  }
1048
1048
  function ye(e) {
1049
1049
  const o = C.useRef(e);
1050
- return ie(() => {
1050
+ return se(() => {
1051
1051
  o.current = e;
1052
1052
  }), o;
1053
1053
  }
@@ -1057,9 +1057,9 @@ function Ht(e) {
1057
1057
  placement: o = "bottom",
1058
1058
  strategy: t = "absolute",
1059
1059
  middleware: n = [],
1060
- platform: s,
1060
+ platform: i,
1061
1061
  elements: {
1062
- reference: i,
1062
+ reference: s,
1063
1063
  floating: r
1064
1064
  } = {},
1065
1065
  transform: l = !0,
@@ -1074,11 +1074,11 @@ function Ht(e) {
1074
1074
  isPositioned: !1
1075
1075
  }), [m, f] = C.useState(n);
1076
1076
  fe(m, n) || f(n);
1077
- const [g, x] = C.useState(null), [w, h] = C.useState(null), p = C.useCallback((S) => {
1078
- S !== O.current && (O.current = S, x(S));
1077
+ const [g, w] = C.useState(null), [x, h] = C.useState(null), p = C.useCallback((S) => {
1078
+ S !== O.current && (O.current = S, w(S));
1079
1079
  }, []), v = C.useCallback((S) => {
1080
1080
  S !== R.current && (R.current = S, h(S));
1081
- }, []), E = i || g, y = r || w, O = C.useRef(null), R = C.useRef(null), z = C.useRef(u), Y = c != null, F = ye(c), q = ye(s), ee = ye(a), B = C.useCallback(() => {
1081
+ }, []), E = s || g, y = r || x, O = C.useRef(null), R = C.useRef(null), z = C.useRef(u), Y = c != null, F = ye(c), q = ye(i), ee = ye(a), B = C.useCallback(() => {
1082
1082
  if (!O.current || !R.current)
1083
1083
  return;
1084
1084
  const S = {
@@ -1100,16 +1100,16 @@ function Ht(e) {
1100
1100
  }));
1101
1101
  });
1102
1102
  }, [m, o, t, q, ee]);
1103
- ie(() => {
1103
+ se(() => {
1104
1104
  a === !1 && z.current.isPositioned && (z.current.isPositioned = !1, d((S) => ({
1105
1105
  ...S,
1106
1106
  isPositioned: !1
1107
1107
  })));
1108
1108
  }, [a]);
1109
1109
  const I = C.useRef(!1);
1110
- ie(() => (I.current = !0, () => {
1110
+ se(() => (I.current = !0, () => {
1111
1111
  I.current = !1;
1112
- }), []), ie(() => {
1112
+ }), []), se(() => {
1113
1113
  if (E && (O.current = E), y && (R.current = y), E && y) {
1114
1114
  if (F.current)
1115
1115
  return F.current(E, y, B);
@@ -1180,8 +1180,8 @@ function Qe(e) {
1180
1180
  className: o,
1181
1181
  placement: t = "bottom-start",
1182
1182
  trigger: n = "hover",
1183
- content: s,
1184
- children: i,
1183
+ content: i,
1184
+ children: s,
1185
1185
  onClose: r,
1186
1186
  onOpen: l,
1187
1187
  disabled: c = !1,
@@ -1190,8 +1190,8 @@ function Qe(e) {
1190
1190
  role: d = "tooltip",
1191
1191
  style: m,
1192
1192
  ...f
1193
- } = e, [g, x] = de(a), w = () => u !== void 0 && a !== void 0 ? a : g, h = () => u !== void 0 && a !== void 0 ? u : x, { x: p, y: v, strategy: E, refs: y } = Ht({
1194
- open: w(),
1193
+ } = e, [g, w] = de(a), x = () => u !== void 0 && a !== void 0 ? a : g, h = () => u !== void 0 && a !== void 0 ? u : w, { x: p, y: v, strategy: E, refs: y } = Ht({
1194
+ open: x(),
1195
1195
  middleware: [Ut(4), Yt(), Kt()],
1196
1196
  whileElementsMounted: Vt,
1197
1197
  placement: t
@@ -1212,15 +1212,15 @@ function Qe(e) {
1212
1212
  if (n === "click") {
1213
1213
  if (c)
1214
1214
  return;
1215
- w() ? (h()(!1), r == null || r()) : (h()(!0), l == null || l());
1215
+ x() ? (h()(!1), r == null || r()) : (h()(!0), l == null || l());
1216
1216
  }
1217
1217
  R.stopPropagation();
1218
1218
  },
1219
1219
  role: d,
1220
- children: i
1220
+ children: s
1221
1221
  }
1222
1222
  ),
1223
- w() && st(
1223
+ x() && it(
1224
1224
  /* @__PURE__ */ b(
1225
1225
  "div",
1226
1226
  {
@@ -1238,7 +1238,7 @@ function Qe(e) {
1238
1238
  top: v ?? 0,
1239
1239
  left: p ?? 0
1240
1240
  },
1241
- children: s
1241
+ children: i
1242
1242
  }
1243
1243
  ),
1244
1244
  document.body
@@ -1246,13 +1246,13 @@ function Qe(e) {
1246
1246
  ] });
1247
1247
  }
1248
1248
  function Xt(e) {
1249
- var x, w;
1249
+ var w, x;
1250
1250
  const {
1251
1251
  items: o = [],
1252
1252
  children: t,
1253
1253
  moreItemsLabel: n = "",
1254
- parentRef: s,
1255
- data: i,
1254
+ parentRef: i,
1255
+ data: s,
1256
1256
  estimator: r = (h, p) => p + 30,
1257
1257
  font: l = "12px Inter",
1258
1258
  badgeVariant: c = "secondary",
@@ -1266,31 +1266,34 @@ function Xt(e) {
1266
1266
  const p = document.createElement("canvas").getContext("2d");
1267
1267
  return p && (p.font = l), p;
1268
1268
  }, []), f = () => {
1269
- const h = s == null ? void 0 : s.current;
1269
+ const h = i == null ? void 0 : i.current;
1270
1270
  if (!h)
1271
1271
  return;
1272
- const p = h.offsetWidth, v = [], E = [], y = r(n, m.measureText(n).width + 10);
1272
+ const p = h.offsetWidth, v = [], E = [], y = r(
1273
+ n,
1274
+ ((m == null ? void 0 : m.measureText(n).width) ?? 0) + 10
1275
+ );
1273
1276
  g == null || g.reduce((O, R, z) => (O + R + y > p - 20 ? E.push(o[z]) : v.push(o[z]), O + R), 0), d({
1274
1277
  visible: v,
1275
1278
  hidden: E
1276
1279
  });
1277
1280
  }, g = ve(
1278
- () => (o == null ? void 0 : o.map((h) => r(h, m.measureText(h).width))) ?? [],
1281
+ () => (o == null ? void 0 : o.map((h) => r(h, (m == null ? void 0 : m.measureText(h).width) ?? 0))) ?? [],
1279
1282
  [o]
1280
1283
  );
1281
1284
  return re(() => {
1282
1285
  f();
1283
1286
  }, [o]), re(() => {
1284
- if (!(s != null && s.current)) return;
1287
+ if (!(i != null && i.current)) return;
1285
1288
  const h = new ResizeObserver(() => {
1286
1289
  f();
1287
1290
  });
1288
- return h.observe(s.current), () => {
1291
+ return h.observe(i.current), () => {
1289
1292
  h.disconnect();
1290
1293
  };
1291
1294
  }, [o]), /* @__PURE__ */ W(Fe, { children: [
1292
- (x = u.visible) == null ? void 0 : x.map((h, p) => t(h, p, i == null ? void 0 : i[p])),
1293
- ((w = u.hidden) == null ? void 0 : w.length) > 0 && /* @__PURE__ */ b(
1295
+ (w = u.visible) == null ? void 0 : w.map((h, p) => t(h, p, s == null ? void 0 : s[p])),
1296
+ ((x = u.hidden) == null ? void 0 : x.length) > 0 && /* @__PURE__ */ b(
1294
1297
  Qe,
1295
1298
  {
1296
1299
  trigger: "click",
@@ -1298,7 +1301,7 @@ function Xt(e) {
1298
1301
  (h, p) => t(
1299
1302
  h,
1300
1303
  u.visible.length + p,
1301
- i == null ? void 0 : i[u.visible.length + p]
1304
+ s == null ? void 0 : s[u.visible.length + p]
1302
1305
  )
1303
1306
  ) }),
1304
1307
  children: /* @__PURE__ */ b(We, { className: a, variant: c, children: /* @__PURE__ */ b("p", { children: `+${u.hidden.length} ${n}` }) }, "more_items_button")
@@ -1307,35 +1310,35 @@ function Xt(e) {
1307
1310
  ] });
1308
1311
  }
1309
1312
  function X(e, o, t) {
1310
- let n = t.initialDeps ?? [], s;
1313
+ let n = t.initialDeps ?? [], i;
1311
1314
  return () => {
1312
- var i, r, l, c;
1315
+ var s, r, l, c;
1313
1316
  let a;
1314
- t.key && ((i = t.debug) != null && i.call(t)) && (a = Date.now());
1317
+ t.key && ((s = t.debug) != null && s.call(t)) && (a = Date.now());
1315
1318
  const u = e();
1316
1319
  if (!(u.length !== n.length || u.some((f, g) => n[g] !== f)))
1317
- return s;
1320
+ return i;
1318
1321
  n = u;
1319
1322
  let m;
1320
- if (t.key && ((r = t.debug) != null && r.call(t)) && (m = Date.now()), s = o(...u), t.key && ((l = t.debug) != null && l.call(t))) {
1321
- const f = Math.round((Date.now() - a) * 100) / 100, g = Math.round((Date.now() - m) * 100) / 100, x = g / 16, w = (h, p) => {
1323
+ if (t.key && ((r = t.debug) != null && r.call(t)) && (m = Date.now()), i = o(...u), t.key && ((l = t.debug) != null && l.call(t))) {
1324
+ const f = Math.round((Date.now() - a) * 100) / 100, g = Math.round((Date.now() - m) * 100) / 100, w = g / 16, x = (h, p) => {
1322
1325
  for (h = String(h); h.length < p; )
1323
1326
  h = " " + h;
1324
1327
  return h;
1325
1328
  };
1326
1329
  console.info(
1327
- `%c⏱ ${w(g, 5)} /${w(f, 5)} ms`,
1330
+ `%c⏱ ${x(g, 5)} /${x(f, 5)} ms`,
1328
1331
  `
1329
1332
  font-size: .6rem;
1330
1333
  font-weight: bold;
1331
1334
  color: hsl(${Math.max(
1332
1335
  0,
1333
- Math.min(120 - 120 * x, 120)
1336
+ Math.min(120 - 120 * w, 120)
1334
1337
  )}deg 100% 31%);`,
1335
1338
  t == null ? void 0 : t.key
1336
1339
  );
1337
1340
  }
1338
- return (c = t == null ? void 0 : t.onChange) == null || c.call(t, s), s;
1341
+ return (c = t == null ? void 0 : t.onChange) == null || c.call(t, i), i;
1339
1342
  };
1340
1343
  }
1341
1344
  function be(e, o) {
@@ -1345,13 +1348,13 @@ function be(e, o) {
1345
1348
  }
1346
1349
  const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
1347
1350
  let n;
1348
- return function(...s) {
1349
- e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, s), t);
1351
+ return function(...i) {
1352
+ e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, i), t);
1350
1353
  };
1351
1354
  }, Jt = (e) => e, Qt = (e) => {
1352
1355
  const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
1353
- for (let s = o; s <= t; s++)
1354
- n.push(s);
1356
+ for (let i = o; i <= t; i++)
1357
+ n.push(i);
1355
1358
  return n;
1356
1359
  }, en = (e, o) => {
1357
1360
  const t = e.scrollElement;
@@ -1360,26 +1363,26 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
1360
1363
  const n = e.targetWindow;
1361
1364
  if (!n)
1362
1365
  return;
1363
- const s = (r) => {
1366
+ const i = (r) => {
1364
1367
  const { width: l, height: c } = r;
1365
1368
  o({ width: Math.round(l), height: Math.round(c) });
1366
1369
  };
1367
- if (s(t.getBoundingClientRect()), !n.ResizeObserver)
1370
+ if (i(t.getBoundingClientRect()), !n.ResizeObserver)
1368
1371
  return () => {
1369
1372
  };
1370
- const i = new n.ResizeObserver((r) => {
1373
+ const s = new n.ResizeObserver((r) => {
1371
1374
  const l = r[0];
1372
1375
  if (l != null && l.borderBoxSize) {
1373
1376
  const c = l.borderBoxSize[0];
1374
1377
  if (c) {
1375
- s({ width: c.inlineSize, height: c.blockSize });
1378
+ i({ width: c.inlineSize, height: c.blockSize });
1376
1379
  return;
1377
1380
  }
1378
1381
  }
1379
- s(t.getBoundingClientRect());
1382
+ i(t.getBoundingClientRect());
1380
1383
  });
1381
- return i.observe(t, { box: "border-box" }), () => {
1382
- i.unobserve(t);
1384
+ return s.observe(t, { box: "border-box" }), () => {
1385
+ s.unobserve(t);
1383
1386
  };
1384
1387
  }, De = {
1385
1388
  passive: !0
@@ -1390,17 +1393,17 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
1390
1393
  const n = e.targetWindow;
1391
1394
  if (!n)
1392
1395
  return;
1393
- let s = 0;
1394
- const i = e.options.useScrollendEvent && tn ? () => {
1396
+ let i = 0;
1397
+ const s = e.options.useScrollendEvent && tn ? () => {
1395
1398
  } : Gt(
1396
1399
  n,
1397
1400
  () => {
1398
- o(s, !1);
1401
+ o(i, !1);
1399
1402
  },
1400
1403
  e.options.isScrollingResetDelay
1401
1404
  ), r = (a) => () => {
1402
1405
  const { horizontal: u, isRtl: d } = e.options;
1403
- s = u ? t.scrollLeft * (d && -1 || 1) : t.scrollTop, i(), o(s, a);
1406
+ i = u ? t.scrollLeft * (d && -1 || 1) : t.scrollTop, s(), o(i, a);
1404
1407
  }, l = r(!0), c = r(!1);
1405
1408
  return c(), t.addEventListener("scroll", l, De), t.addEventListener("scrollend", c, De), () => {
1406
1409
  t.removeEventListener("scroll", l), t.removeEventListener("scrollend", c);
@@ -1420,9 +1423,9 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
1420
1423
  adjustments: o = 0,
1421
1424
  behavior: t
1422
1425
  }, n) => {
1423
- var s, i;
1426
+ var i, s;
1424
1427
  const r = e + o;
1425
- (i = (s = n.scrollElement) == null ? void 0 : s.scrollTo) == null || i.call(s, {
1428
+ (s = (i = n.scrollElement) == null ? void 0 : i.scrollTo) == null || s.call(i, {
1426
1429
  [n.options.horizontal ? "left" : "top"]: r,
1427
1430
  behavior: t
1428
1431
  });
@@ -1431,28 +1434,28 @@ class rn {
1431
1434
  constructor(o) {
1432
1435
  this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
1433
1436
  let t = null;
1434
- const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((s) => {
1435
- s.forEach((i) => {
1436
- this._measureElement(i.target, i);
1437
+ const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((i) => {
1438
+ i.forEach((s) => {
1439
+ this._measureElement(s.target, s);
1437
1440
  });
1438
1441
  }));
1439
1442
  return {
1440
1443
  disconnect: () => {
1441
- var s;
1442
- (s = n()) == null || s.disconnect(), t = null;
1443
- },
1444
- observe: (s) => {
1445
1444
  var i;
1446
- return (i = n()) == null ? void 0 : i.observe(s, { box: "border-box" });
1445
+ (i = n()) == null || i.disconnect(), t = null;
1447
1446
  },
1448
- unobserve: (s) => {
1449
- var i;
1450
- return (i = n()) == null ? void 0 : i.unobserve(s);
1447
+ observe: (i) => {
1448
+ var s;
1449
+ return (s = n()) == null ? void 0 : s.observe(i, { box: "border-box" });
1450
+ },
1451
+ unobserve: (i) => {
1452
+ var s;
1453
+ return (s = n()) == null ? void 0 : s.unobserve(i);
1451
1454
  }
1452
1455
  };
1453
1456
  })(), this.range = null, this.setOptions = (t) => {
1454
- Object.entries(t).forEach(([n, s]) => {
1455
- typeof s > "u" && delete t[n];
1457
+ Object.entries(t).forEach(([n, i]) => {
1458
+ typeof i > "u" && delete t[n];
1456
1459
  }), this.options = {
1457
1460
  debug: !1,
1458
1461
  initialOffset: 0,
@@ -1480,8 +1483,8 @@ class rn {
1480
1483
  ...t
1481
1484
  };
1482
1485
  }, this.notify = (t) => {
1483
- var n, s;
1484
- (s = (n = this.options).onChange) == null || s.call(n, this, t);
1486
+ var n, i;
1487
+ (i = (n = this.options).onChange) == null || i.call(n, this, t);
1485
1488
  }, this.maybeNotify = X(
1486
1489
  () => (this.calculateRange(), [
1487
1490
  this.isScrolling,
@@ -1512,34 +1515,34 @@ class rn {
1512
1515
  this.maybeNotify();
1513
1516
  return;
1514
1517
  }
1515
- this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((s) => {
1516
- this.observer.observe(s);
1518
+ this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((i) => {
1519
+ this.observer.observe(i);
1517
1520
  }), this._scrollToOffset(this.getScrollOffset(), {
1518
1521
  adjustments: void 0,
1519
1522
  behavior: void 0
1520
1523
  }), this.unsubs.push(
1521
- this.options.observeElementRect(this, (s) => {
1522
- this.scrollRect = s, this.maybeNotify();
1524
+ this.options.observeElementRect(this, (i) => {
1525
+ this.scrollRect = i, this.maybeNotify();
1523
1526
  })
1524
1527
  ), this.unsubs.push(
1525
- this.options.observeElementOffset(this, (s, i) => {
1526
- this.scrollAdjustments = 0, this.scrollDirection = i ? this.getScrollOffset() < s ? "forward" : "backward" : null, this.scrollOffset = s, this.isScrolling = i, this.maybeNotify();
1528
+ this.options.observeElementOffset(this, (i, s) => {
1529
+ this.scrollAdjustments = 0, this.scrollDirection = s ? this.getScrollOffset() < i ? "forward" : "backward" : null, this.scrollOffset = i, this.isScrolling = s, this.maybeNotify();
1527
1530
  })
1528
1531
  );
1529
1532
  }
1530
1533
  }, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, n) => {
1531
- const s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
1534
+ const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
1532
1535
  for (let r = n - 1; r >= 0; r--) {
1533
1536
  const l = t[r];
1534
- if (s.has(l.lane))
1537
+ if (i.has(l.lane))
1535
1538
  continue;
1536
- const c = i.get(
1539
+ const c = s.get(
1537
1540
  l.lane
1538
1541
  );
1539
- if (c == null || l.end > c.end ? i.set(l.lane, l) : l.end < c.end && s.set(l.lane, !0), s.size === this.options.lanes)
1542
+ if (c == null || l.end > c.end ? s.set(l.lane, l) : l.end < c.end && i.set(l.lane, !0), i.size === this.options.lanes)
1540
1543
  break;
1541
1544
  }
1542
- return i.size === this.options.lanes ? Array.from(i.values()).sort((r, l) => r.end === l.end ? r.index - l.index : r.end - l.end)[0] : void 0;
1545
+ return s.size === this.options.lanes ? Array.from(s.values()).sort((r, l) => r.end === l.end ? r.index - l.index : r.end - l.end)[0] : void 0;
1543
1546
  }, this.getMeasurementOptions = X(
1544
1547
  () => [
1545
1548
  this.options.count,
@@ -1548,11 +1551,11 @@ class rn {
1548
1551
  this.options.getItemKey,
1549
1552
  this.options.enabled
1550
1553
  ],
1551
- (t, n, s, i, r) => (this.pendingMeasuredCacheIndexes = [], {
1554
+ (t, n, i, s, r) => (this.pendingMeasuredCacheIndexes = [], {
1552
1555
  count: t,
1553
1556
  paddingStart: n,
1554
- scrollMargin: s,
1555
- getItemKey: i,
1557
+ scrollMargin: i,
1558
+ getItemKey: s,
1556
1559
  enabled: r
1557
1560
  }),
1558
1561
  {
@@ -1560,7 +1563,7 @@ class rn {
1560
1563
  }
1561
1564
  ), this.getMeasurements = X(
1562
1565
  () => [this.getMeasurementOptions(), this.itemSizeCache],
1563
- ({ count: t, paddingStart: n, scrollMargin: s, getItemKey: i, enabled: r }, l) => {
1566
+ ({ count: t, paddingStart: n, scrollMargin: i, getItemKey: s, enabled: r }, l) => {
1564
1567
  if (!r)
1565
1568
  return this.measurementsCache = [], this.itemSizeCache.clear(), [];
1566
1569
  this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((u) => {
@@ -1570,12 +1573,12 @@ class rn {
1570
1573
  this.pendingMeasuredCacheIndexes = [];
1571
1574
  const a = this.measurementsCache.slice(0, c);
1572
1575
  for (let u = c; u < t; u++) {
1573
- const d = i(u), m = this.options.lanes === 1 ? a[u - 1] : this.getFurthestMeasurement(a, u), f = m ? m.end + this.options.gap : n + s, g = l.get(d), x = typeof g == "number" ? g : this.options.estimateSize(u), w = f + x, h = m ? m.lane : u % this.options.lanes;
1576
+ const d = s(u), m = this.options.lanes === 1 ? a[u - 1] : this.getFurthestMeasurement(a, u), f = m ? m.end + this.options.gap : n + i, g = l.get(d), w = typeof g == "number" ? g : this.options.estimateSize(u), x = f + w, h = m ? m.lane : u % this.options.lanes;
1574
1577
  a[u] = {
1575
1578
  index: u,
1576
1579
  start: f,
1577
- size: x,
1578
- end: w,
1580
+ size: w,
1581
+ end: x,
1579
1582
  key: d,
1580
1583
  lane: h
1581
1584
  };
@@ -1588,10 +1591,10 @@ class rn {
1588
1591
  }
1589
1592
  ), this.calculateRange = X(
1590
1593
  () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
1591
- (t, n, s) => this.range = t.length > 0 && n > 0 ? ln({
1594
+ (t, n, i) => this.range = t.length > 0 && n > 0 ? ln({
1592
1595
  measurements: t,
1593
1596
  outerSize: n,
1594
- scrollOffset: s
1597
+ scrollOffset: i
1595
1598
  }) : null,
1596
1599
  {
1597
1600
  key: process.env.NODE_ENV !== "production" && "calculateRange",
@@ -1604,40 +1607,40 @@ class rn {
1604
1607
  this.options.overscan,
1605
1608
  this.options.count
1606
1609
  ],
1607
- (t, n, s, i) => n === null ? [] : t({
1610
+ (t, n, i, s) => n === null ? [] : t({
1608
1611
  startIndex: n.startIndex,
1609
1612
  endIndex: n.endIndex,
1610
- overscan: s,
1611
- count: i
1613
+ overscan: i,
1614
+ count: s
1612
1615
  }),
1613
1616
  {
1614
1617
  key: process.env.NODE_ENV !== "production" && "getIndexes",
1615
1618
  debug: () => this.options.debug
1616
1619
  }
1617
1620
  ), this.indexFromElement = (t) => {
1618
- const n = this.options.indexAttribute, s = t.getAttribute(n);
1619
- return s ? parseInt(s, 10) : (console.warn(
1621
+ const n = this.options.indexAttribute, i = t.getAttribute(n);
1622
+ return i ? parseInt(i, 10) : (console.warn(
1620
1623
  `Missing attribute name '${n}={index}' on measured element.`
1621
1624
  ), -1);
1622
1625
  }, this._measureElement = (t, n) => {
1623
- const s = this.indexFromElement(t), i = this.measurementsCache[s];
1624
- if (!i)
1626
+ const i = this.indexFromElement(t), s = this.measurementsCache[i];
1627
+ if (!s)
1625
1628
  return;
1626
- const r = i.key, l = this.elementsCache.get(r);
1627
- l !== t && (l && this.observer.unobserve(l), this.observer.observe(t), this.elementsCache.set(r, t)), t.isConnected && this.resizeItem(s, this.options.measureElement(t, n, this));
1629
+ const r = s.key, l = this.elementsCache.get(r);
1630
+ l !== t && (l && this.observer.unobserve(l), this.observer.observe(t), this.elementsCache.set(r, t)), t.isConnected && this.resizeItem(i, this.options.measureElement(t, n, this));
1628
1631
  }, this.resizeItem = (t, n) => {
1629
- const s = this.measurementsCache[t];
1630
- if (!s)
1632
+ const i = this.measurementsCache[t];
1633
+ if (!i)
1631
1634
  return;
1632
- const i = this.itemSizeCache.get(s.key) ?? s.size, r = n - i;
1633
- r !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(s, r, this) : s.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", r), this._scrollToOffset(this.getScrollOffset(), {
1635
+ const s = this.itemSizeCache.get(i.key) ?? i.size, r = n - s;
1636
+ r !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(i, r, this) : i.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", r), this._scrollToOffset(this.getScrollOffset(), {
1634
1637
  adjustments: this.scrollAdjustments += r,
1635
1638
  behavior: void 0
1636
- })), this.pendingMeasuredCacheIndexes.push(s.index), this.itemSizeCache = new Map(this.itemSizeCache.set(s.key, n)), this.notify(!1));
1639
+ })), this.pendingMeasuredCacheIndexes.push(i.index), this.itemSizeCache = new Map(this.itemSizeCache.set(i.key, n)), this.notify(!1));
1637
1640
  }, this.measureElement = (t) => {
1638
1641
  if (!t) {
1639
- this.elementsCache.forEach((n, s) => {
1640
- n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(s));
1642
+ this.elementsCache.forEach((n, i) => {
1643
+ n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(i));
1641
1644
  });
1642
1645
  return;
1643
1646
  }
@@ -1645,12 +1648,12 @@ class rn {
1645
1648
  }, this.getVirtualItems = X(
1646
1649
  () => [this.getIndexes(), this.getMeasurements()],
1647
1650
  (t, n) => {
1648
- const s = [];
1649
- for (let i = 0, r = t.length; i < r; i++) {
1650
- const l = t[i], c = n[l];
1651
- s.push(c);
1651
+ const i = [];
1652
+ for (let s = 0, r = t.length; s < r; s++) {
1653
+ const l = t[s], c = n[l];
1654
+ i.push(c);
1652
1655
  }
1653
- return s;
1656
+ return i;
1654
1657
  },
1655
1658
  {
1656
1659
  key: process.env.NODE_ENV !== "production" && "getVirtualItems",
@@ -1663,56 +1666,56 @@ class rn {
1663
1666
  n[et(
1664
1667
  0,
1665
1668
  n.length - 1,
1666
- (s) => be(n[s]).start,
1669
+ (i) => be(n[i]).start,
1667
1670
  t
1668
1671
  )]
1669
1672
  );
1670
1673
  }, this.getOffsetForAlignment = (t, n) => {
1671
- const s = this.getSize(), i = this.getScrollOffset();
1672
- n === "auto" && (t <= i ? n = "start" : t >= i + s ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - s : n === "center" && (t = t - s / 2);
1673
- const r = this.options.horizontal ? "scrollWidth" : "scrollHeight", c = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[r] : this.scrollElement[r] : 0) - s;
1674
+ const i = this.getSize(), s = this.getScrollOffset();
1675
+ n === "auto" && (t <= s ? n = "start" : t >= s + i ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - i : n === "center" && (t = t - i / 2);
1676
+ const r = this.options.horizontal ? "scrollWidth" : "scrollHeight", c = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[r] : this.scrollElement[r] : 0) - i;
1674
1677
  return Math.max(Math.min(c, t), 0);
1675
1678
  }, this.getOffsetForIndex = (t, n = "auto") => {
1676
1679
  t = Math.max(0, Math.min(t, this.options.count - 1));
1677
- const s = this.measurementsCache[t];
1678
- if (!s)
1680
+ const i = this.measurementsCache[t];
1681
+ if (!i)
1679
1682
  return;
1680
- const i = this.getSize(), r = this.getScrollOffset();
1683
+ const s = this.getSize(), r = this.getScrollOffset();
1681
1684
  if (n === "auto")
1682
- if (s.end >= r + i - this.options.scrollPaddingEnd)
1685
+ if (i.end >= r + s - this.options.scrollPaddingEnd)
1683
1686
  n = "end";
1684
- else if (s.start <= r + this.options.scrollPaddingStart)
1687
+ else if (i.start <= r + this.options.scrollPaddingStart)
1685
1688
  n = "start";
1686
1689
  else
1687
1690
  return [r, n];
1688
- const l = n === "end" ? s.end + this.options.scrollPaddingEnd : s.start - this.options.scrollPaddingStart;
1691
+ const l = n === "end" ? i.end + this.options.scrollPaddingEnd : i.start - this.options.scrollPaddingStart;
1689
1692
  return [this.getOffsetForAlignment(l, n), n];
1690
1693
  }, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
1691
1694
  this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
1692
- }, this.scrollToOffset = (t, { align: n = "start", behavior: s } = {}) => {
1693
- this.cancelScrollToIndex(), s === "smooth" && this.isDynamicMode() && console.warn(
1695
+ }, this.scrollToOffset = (t, { align: n = "start", behavior: i } = {}) => {
1696
+ this.cancelScrollToIndex(), i === "smooth" && this.isDynamicMode() && console.warn(
1694
1697
  "The `smooth` scroll behavior is not fully supported with dynamic size."
1695
1698
  ), this._scrollToOffset(this.getOffsetForAlignment(t, n), {
1696
1699
  adjustments: void 0,
1697
- behavior: s
1700
+ behavior: i
1698
1701
  });
1699
- }, this.scrollToIndex = (t, { align: n = "auto", behavior: s } = {}) => {
1700
- t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), s === "smooth" && this.isDynamicMode() && console.warn(
1702
+ }, this.scrollToIndex = (t, { align: n = "auto", behavior: i } = {}) => {
1703
+ t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), i === "smooth" && this.isDynamicMode() && console.warn(
1701
1704
  "The `smooth` scroll behavior is not fully supported with dynamic size."
1702
1705
  );
1703
- const i = this.getOffsetForIndex(t, n);
1704
- if (!i) return;
1705
- const [r, l] = i;
1706
- this._scrollToOffset(r, { adjustments: void 0, behavior: s }), s !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
1706
+ const s = this.getOffsetForIndex(t, n);
1707
+ if (!s) return;
1708
+ const [r, l] = s;
1709
+ this._scrollToOffset(r, { adjustments: void 0, behavior: i }), i !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
1707
1710
  if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
1708
1711
  this.options.getItemKey(t)
1709
1712
  )) {
1710
1713
  const [a] = be(
1711
1714
  this.getOffsetForIndex(t, l)
1712
1715
  );
1713
- Zt(a, this.getScrollOffset()) || this.scrollToIndex(t, { align: l, behavior: s });
1716
+ Zt(a, this.getScrollOffset()) || this.scrollToIndex(t, { align: l, behavior: i });
1714
1717
  } else
1715
- this.scrollToIndex(t, { align: l, behavior: s });
1718
+ this.scrollToIndex(t, { align: l, behavior: i });
1716
1719
  }));
1717
1720
  }, this.scrollBy = (t, { behavior: n } = {}) => {
1718
1721
  this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
@@ -1724,18 +1727,18 @@ class rn {
1724
1727
  }, this.getTotalSize = () => {
1725
1728
  var t;
1726
1729
  const n = this.getMeasurements();
1727
- let s;
1728
- return n.length === 0 ? s = this.options.paddingStart : s = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
1729
- ...n.slice(-this.options.lanes).map((i) => i.end)
1730
+ let i;
1731
+ return n.length === 0 ? i = this.options.paddingStart : i = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
1732
+ ...n.slice(-this.options.lanes).map((s) => s.end)
1730
1733
  ), Math.max(
1731
- s - this.options.scrollMargin + this.options.paddingEnd,
1734
+ i - this.options.scrollMargin + this.options.paddingEnd,
1732
1735
  0
1733
1736
  );
1734
1737
  }, this._scrollToOffset = (t, {
1735
1738
  adjustments: n,
1736
- behavior: s
1739
+ behavior: i
1737
1740
  }) => {
1738
- this.options.scrollToFn(t, { behavior: s, adjustments: n }, this);
1741
+ this.options.scrollToFn(t, { behavior: i, adjustments: n }, this);
1739
1742
  }, this.measure = () => {
1740
1743
  this.itemSizeCache = /* @__PURE__ */ new Map(), this.notify(!1);
1741
1744
  }, this.setOptions(o);
@@ -1743,13 +1746,13 @@ class rn {
1743
1746
  }
1744
1747
  const et = (e, o, t, n) => {
1745
1748
  for (; e <= o; ) {
1746
- const s = (e + o) / 2 | 0, i = t(s);
1747
- if (i < n)
1748
- e = s + 1;
1749
- else if (i > n)
1750
- o = s - 1;
1749
+ const i = (e + o) / 2 | 0, s = t(i);
1750
+ if (s < n)
1751
+ e = i + 1;
1752
+ else if (s > n)
1753
+ o = i - 1;
1751
1754
  else
1752
- return s;
1755
+ return i;
1753
1756
  }
1754
1757
  return e > 0 ? e - 1 : 0;
1755
1758
  };
@@ -1758,19 +1761,19 @@ function ln({
1758
1761
  outerSize: o,
1759
1762
  scrollOffset: t
1760
1763
  }) {
1761
- const n = e.length - 1, i = et(0, n, (l) => e[l].start, t);
1762
- let r = i;
1764
+ const n = e.length - 1, s = et(0, n, (l) => e[l].start, t);
1765
+ let r = s;
1763
1766
  for (; r < n && e[r].end < t + o; )
1764
1767
  r++;
1765
- return { startIndex: i, endIndex: r };
1768
+ return { startIndex: s, endIndex: r };
1766
1769
  }
1767
1770
  const Pe = typeof document < "u" ? C.useLayoutEffect : C.useEffect;
1768
1771
  function cn(e) {
1769
1772
  const o = C.useReducer(() => ({}), {})[1], t = {
1770
1773
  ...e,
1771
- onChange: (s, i) => {
1774
+ onChange: (i, s) => {
1772
1775
  var r;
1773
- i ? it(o) : o(), (r = e.onChange) == null || r.call(e, s, i);
1776
+ s ? st(o) : o(), (r = e.onChange) == null || r.call(e, i, s);
1774
1777
  }
1775
1778
  }, [n] = C.useState(
1776
1779
  () => new rn(t)
@@ -1837,14 +1840,14 @@ function dn(e) {
1837
1840
  }
1838
1841
  );
1839
1842
  }
1840
- function xn(e) {
1843
+ function wn(e) {
1841
1844
  var g;
1842
1845
  const {
1843
1846
  items: o,
1844
1847
  selected: t,
1845
1848
  className: n,
1846
- onChange: s,
1847
- disabled: i,
1849
+ onChange: i,
1850
+ disabled: s,
1848
1851
  placeholder: r = "Select an Item",
1849
1852
  multiple: l,
1850
1853
  mutable: c,
@@ -1858,7 +1861,7 @@ function xn(e) {
1858
1861
  show: d,
1859
1862
  setShow: m,
1860
1863
  role: "combobox",
1861
- disabled: i,
1864
+ disabled: s,
1862
1865
  style: {
1863
1866
  "--input-width": `${(g = f.current) == null ? void 0 : g.offsetWidth}px`
1864
1867
  },
@@ -1866,7 +1869,7 @@ function xn(e) {
1866
1869
  hn,
1867
1870
  {
1868
1871
  ...c ? { mutable: c, onAdd: a } : { mutable: c },
1869
- ...l ? { multiple: l, items: o, onChange: s, selected: t } : { items: o, onChange: s, selected: t }
1872
+ ...l ? { multiple: l, items: o, onChange: i, selected: t } : { items: o, onChange: i, selected: t }
1870
1873
  }
1871
1874
  ),
1872
1875
  children: /* @__PURE__ */ W(
@@ -1874,7 +1877,7 @@ function xn(e) {
1874
1877
  {
1875
1878
  className: k(
1876
1879
  "inline-flex h-10 w-56 grow items-center justify-between rounded border-2 border-input bg-background p-2 transition",
1877
- i ? "cursor-not-allowed bg-muted text-muted" : "cursor-pointer",
1880
+ s ? "cursor-not-allowed bg-muted text-muted" : "cursor-pointer",
1878
1881
  d && "border-primary shadow-sm shadow-ring",
1879
1882
  n
1880
1883
  ),
@@ -1885,30 +1888,30 @@ function xn(e) {
1885
1888
  {
1886
1889
  className: k(
1887
1890
  "flex max-w-[calc(100%-30px)] flex-none grow items-center gap-1 text-sm",
1888
- i ? "text-muted-foreground" : "text-foreground"
1891
+ s ? "text-muted-foreground" : "text-foreground"
1889
1892
  ),
1890
1893
  ref: u,
1891
1894
  children: l ? /* @__PURE__ */ b(
1892
1895
  Xt,
1893
1896
  {
1894
- items: t.map((x) => x.text),
1897
+ items: t.map((w) => w.text),
1895
1898
  data: t,
1896
1899
  parentRef: u,
1897
- estimator: (x, w) => w + 40,
1900
+ estimator: (w, x) => x + 40,
1898
1901
  badgeVariant: "secondary",
1899
1902
  badgeStyles: "!bg-input h-6 min-w-min gap-2 !bg-input",
1900
- children: (x, w, h) => /* @__PURE__ */ W(
1903
+ children: (w, x, h) => /* @__PURE__ */ W(
1901
1904
  We,
1902
1905
  {
1903
1906
  className: "flex h-6 min-w-min gap-2 !bg-input pr-1",
1904
1907
  variant: "secondary",
1905
1908
  children: [
1906
- x,
1909
+ w,
1907
1910
  /* @__PURE__ */ b(
1908
1911
  lt,
1909
1912
  {
1910
1913
  onClick: () => {
1911
- s(t.filter((p) => p.key !== (h == null ? void 0 : h.key)));
1914
+ i(t.filter((p) => p.key !== (h == null ? void 0 : h.key)));
1912
1915
  },
1913
1916
  variant: "icon",
1914
1917
  size: "icon",
@@ -1918,7 +1921,7 @@ function xn(e) {
1918
1921
  )
1919
1922
  ]
1920
1923
  },
1921
- `collapsed_item_${w}`
1924
+ `collapsed_item_${x}`
1922
1925
  )
1923
1926
  }
1924
1927
  ) : t.text ?? r
@@ -1930,7 +1933,7 @@ function xn(e) {
1930
1933
  className: k(
1931
1934
  "size-4 rounded-full bg-input p-0.5 transition duration-300 ease-in-out",
1932
1935
  d ? "rotate-180" : "rotate-0",
1933
- i ? "text-muted-foreground" : "text-foreground"
1936
+ s ? "text-muted-foreground" : "text-foreground"
1934
1937
  )
1935
1938
  }
1936
1939
  )
@@ -1941,7 +1944,7 @@ function xn(e) {
1941
1944
  );
1942
1945
  }
1943
1946
  function hn(e) {
1944
- const { items: o, multiple: t, selected: n, onChange: s, mutable: i, onAdd: r } = e, [l, c] = de(""), a = Ee(null), u = ve(
1947
+ const { items: o, multiple: t, selected: n, onChange: i, mutable: s, onAdd: r } = e, [l, c] = de(""), a = Ee(null), u = ve(
1945
1948
  () => o.reduce((f, g) => ((!l.length || g.text.toLowerCase().includes(l.toLowerCase())) && f.push(g), f), []),
1946
1949
  [o, l]
1947
1950
  ), d = an({
@@ -1988,13 +1991,13 @@ function hn(e) {
1988
1991
  m.includes(u[f.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
1989
1992
  ),
1990
1993
  onClick: () => {
1991
- t ? m.includes(u[f.index].key) ? s(
1994
+ t ? m.includes(u[f.index].key) ? i(
1992
1995
  structuredClone(
1993
1996
  n.filter(
1994
1997
  (g) => g.key !== u[f.index].key
1995
1998
  )
1996
1999
  )
1997
- ) : s(structuredClone([...n, u[f.index]])) : s(u[f.index]);
2000
+ ) : i(structuredClone([...n, u[f.index]])) : i(u[f.index]);
1998
2001
  },
1999
2002
  children: u[f.index].text
2000
2003
  },
@@ -2002,7 +2005,7 @@ function hn(e) {
2002
2005
  ))
2003
2006
  }
2004
2007
  ),
2005
- l.length > 0 && u.length === 0 && (i ? /* @__PURE__ */ W(
2008
+ l.length > 0 && u.length === 0 && (s ? /* @__PURE__ */ W(
2006
2009
  "li",
2007
2010
  {
2008
2011
  className: k("px-3 py-2 text-sm text-foreground"),
@@ -2020,7 +2023,7 @@ function hn(e) {
2020
2023
  )
2021
2024
  ] });
2022
2025
  }
2023
- function wn(e) {
2026
+ function xn(e) {
2024
2027
  return /* @__PURE__ */ b(
2025
2028
  "svg",
2026
2029
  {
@@ -2053,7 +2056,7 @@ function yn(e) {
2053
2056
  );
2054
2057
  }
2055
2058
  function bn(e) {
2056
- const { className: o, checked: t, onChange: n, defaultChecked: s, ...i } = e;
2059
+ const { className: o, checked: t, onChange: n, defaultChecked: i, ...s } = e;
2057
2060
  return /* @__PURE__ */ W(
2058
2061
  "div",
2059
2062
  {
@@ -2066,7 +2069,7 @@ function bn(e) {
2066
2069
  ),
2067
2070
  onClick: () => n == null ? void 0 : n(!t),
2068
2071
  children: [
2069
- /* @__PURE__ */ b("input", { type: "hidden", readOnly: !0, ...i, defaultChecked: s, checked: t }),
2072
+ /* @__PURE__ */ b("input", { type: "hidden", readOnly: !0, ...s, defaultChecked: i, checked: t }),
2070
2073
  /* @__PURE__ */ b(
2071
2074
  "div",
2072
2075
  {
@@ -2083,10 +2086,10 @@ function bn(e) {
2083
2086
  export {
2084
2087
  We as Badge,
2085
2088
  lt as Button,
2086
- wn as ChevronDown,
2089
+ xn as ChevronDown,
2087
2090
  un as ChevronUp,
2088
2091
  Xt as Collapse,
2089
- xn as Dropdown,
2092
+ wn as Dropdown,
2090
2093
  yn as Input,
2091
2094
  Qe as Popover,
2092
2095
  fn as Search,