teodor-new-chat-ui 3.0.38 → 3.0.40

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.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as f from "react";
2
- import Y, { useState as be, useRef as vt, useCallback as Ye, useEffect as Ze, useReducer as yh, useMemo as wn, createContext as cc, useContext as uc, createElement as no, useLayoutEffect as Sh } from "react";
2
+ import Y, { useState as be, useRef as bt, useCallback as Ye, useEffect as et, useReducer as yh, useMemo as wn, createContext as cc, useContext as uc, createElement as no, useLayoutEffect as Sh } from "react";
3
3
  import * as Bo from "react-dom";
4
4
  import dc from "react-dom";
5
5
  import { Square as fc, Send as Ch, ChevronUp as dr, ChevronDown as zn, Copy as Da, Edit as La, RotateCcw as Ks, Bot as Fa, Wrench as Th, User as Eh, Image as Rh, Loader as Ih, ChevronRight as Nh, Check as Pi, Circle as Ah, X as hr, Edit3 as pc, Paperclip as Ba, Loader2 as jh, Plus as Ph, FileSpreadsheet as kh, MessageSquarePlus as _h, MessageSquare as Oh, Calendar as Mh, Trash2 as Dh, PanelLeft as Lh, Settings as Fh, Server as Bh, EyeOff as Hh, Eye as $h, Layout as zh, MessageCircle as Uh, Save as Wh } from "lucide-react";
@@ -240,42 +240,42 @@ function Xh() {
240
240
  }), typeof Reflect == "object" && Reflect.construct) {
241
241
  try {
242
242
  Reflect.construct(je, []);
243
- } catch (Zt) {
244
- ve = Zt;
243
+ } catch (en) {
244
+ ve = en;
245
245
  }
246
246
  Reflect.construct(T, [], je);
247
247
  } else {
248
248
  try {
249
249
  je.call();
250
- } catch (Zt) {
251
- ve = Zt;
250
+ } catch (en) {
251
+ ve = en;
252
252
  }
253
253
  T.call(je.prototype);
254
254
  }
255
255
  } else {
256
256
  try {
257
257
  throw Error();
258
- } catch (Zt) {
259
- ve = Zt;
258
+ } catch (en) {
259
+ ve = en;
260
260
  }
261
261
  T();
262
262
  }
263
- } catch (Zt) {
264
- if (Zt && ve && typeof Zt.stack == "string") {
265
- for (var Ie = Zt.stack.split(`
266
- `), lt = ve.stack.split(`
267
- `), Ke = Ie.length - 1, Je = lt.length - 1; Ke >= 1 && Je >= 0 && Ie[Ke] !== lt[Je]; )
268
- Je--;
269
- for (; Ke >= 1 && Je >= 0; Ke--, Je--)
270
- if (Ie[Ke] !== lt[Je]) {
271
- if (Ke !== 1 || Je !== 1)
263
+ } catch (en) {
264
+ if (en && ve && typeof en.stack == "string") {
265
+ for (var Ie = en.stack.split(`
266
+ `), dt = ve.stack.split(`
267
+ `), Ke = Ie.length - 1, Qe = dt.length - 1; Ke >= 1 && Qe >= 0 && Ie[Ke] !== dt[Qe]; )
268
+ Qe--;
269
+ for (; Ke >= 1 && Qe >= 0; Ke--, Qe--)
270
+ if (Ie[Ke] !== dt[Qe]) {
271
+ if (Ke !== 1 || Qe !== 1)
272
272
  do
273
- if (Ke--, Je--, Je < 0 || Ie[Ke] !== lt[Je]) {
274
- var St = `
273
+ if (Ke--, Qe--, Qe < 0 || Ie[Ke] !== dt[Qe]) {
274
+ var Et = `
275
275
  ` + Ie[Ke].replace(" at new ", " at ");
276
- return T.displayName && St.includes("<anonymous>") && (St = St.replace("<anonymous>", T.displayName)), typeof T == "function" && re.set(T, St), St;
276
+ return T.displayName && Et.includes("<anonymous>") && (Et = Et.replace("<anonymous>", T.displayName)), typeof T == "function" && re.set(T, Et), Et;
277
277
  }
278
- while (Ke >= 1 && Je >= 0);
278
+ while (Ke >= 1 && Qe >= 0);
279
279
  break;
280
280
  }
281
281
  }
@@ -285,7 +285,7 @@ function Xh() {
285
285
  var Dn = T ? T.displayName || T.name : "", Ma = Dn ? k(Dn) : "";
286
286
  return typeof T == "function" && re.set(T, Ma), Ma;
287
287
  }
288
- function Oe(T, $, ne) {
288
+ function Me(T, $, ne) {
289
289
  return ie(T, !1);
290
290
  }
291
291
  function ue(T) {
@@ -308,7 +308,7 @@ function Xh() {
308
308
  if (typeof T == "object")
309
309
  switch (T.$$typeof) {
310
310
  case c:
311
- return Oe(T.render);
311
+ return Me(T.render);
312
312
  case p:
313
313
  return Ae(T.type, $, ne);
314
314
  case h: {
@@ -337,8 +337,8 @@ function Xh() {
337
337
  var Ie = void 0;
338
338
  try {
339
339
  if (typeof T[je] != "function") {
340
- var lt = Error((ve || "React class") + ": " + ne + " type `" + je + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof T[je] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
341
- throw lt.name = "Invariant Violation", lt;
340
+ var dt = Error((ve || "React class") + ": " + ne + " type `" + je + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof T[je] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
341
+ throw dt.name = "Invariant Violation", dt;
342
342
  }
343
343
  Ie = T[je]($, je, ve, ne, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
344
344
  } catch (Ke) {
@@ -349,35 +349,35 @@ function Xh() {
349
349
  }
350
350
  }
351
351
  var ye = Array.isArray;
352
- function Me(T) {
352
+ function _e(T) {
353
353
  return ye(T);
354
354
  }
355
- function tt(T) {
355
+ function Je(T) {
356
356
  {
357
357
  var $ = typeof Symbol == "function" && Symbol.toStringTag, ne = $ && T[Symbol.toStringTag] || T.constructor.name || "Object";
358
358
  return ne;
359
359
  }
360
360
  }
361
- function $e(T) {
361
+ function nt(T) {
362
362
  try {
363
- return Ve(T), !1;
363
+ return Ge(T), !1;
364
364
  } catch {
365
365
  return !0;
366
366
  }
367
367
  }
368
- function Ve(T) {
368
+ function Ge(T) {
369
369
  return "" + T;
370
370
  }
371
- function ft(T) {
372
- if ($e(T))
373
- return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tt(T)), Ve(T);
371
+ function Tt(T) {
372
+ if (nt(T))
373
+ return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(T)), Ge(T);
374
374
  }
375
- var at = w.ReactCurrentOwner, nn = {
375
+ var We = w.ReactCurrentOwner, it = {
376
376
  key: !0,
377
377
  ref: !0,
378
378
  __self: !0,
379
379
  __source: !0
380
- }, $t, rn;
380
+ }, Ze, ut;
381
381
  function on(T) {
382
382
  if (le.call(T, "ref")) {
383
383
  var $ = Object.getOwnPropertyDescriptor(T, "ref").get;
@@ -395,12 +395,12 @@ function Xh() {
395
395
  return T.key !== void 0;
396
396
  }
397
397
  function On(T, $) {
398
- typeof T.ref == "string" && at.current;
398
+ typeof T.ref == "string" && We.current;
399
399
  }
400
- function Ge(T, $) {
400
+ function Ve(T, $) {
401
401
  {
402
402
  var ne = function() {
403
- $t || ($t = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", $));
403
+ Ze || (Ze = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", $));
404
404
  };
405
405
  ne.isReactWarning = !0, Object.defineProperty(T, "key", {
406
406
  get: ne,
@@ -411,7 +411,7 @@ function Xh() {
411
411
  function ir(T, $) {
412
412
  {
413
413
  var ne = function() {
414
- rn || (rn = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", $));
414
+ ut || (ut = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", $));
415
415
  };
416
416
  ne.isReactWarning = !0, Object.defineProperty(T, "ref", {
417
417
  get: ne,
@@ -450,20 +450,20 @@ function Xh() {
450
450
  };
451
451
  function ys(T, $, ne, ve, De) {
452
452
  {
453
- var Be, je = {}, Ie = null, lt = null;
454
- ne !== void 0 && (ft(ne), Ie = "" + ne), xn($) && (ft($.key), Ie = "" + $.key), on($) && (lt = $.ref, On($, De));
453
+ var Be, je = {}, Ie = null, dt = null;
454
+ ne !== void 0 && (Tt(ne), Ie = "" + ne), xn($) && (Tt($.key), Ie = "" + $.key), on($) && (dt = $.ref, On($, De));
455
455
  for (Be in $)
456
- le.call($, Be) && !nn.hasOwnProperty(Be) && (je[Be] = $[Be]);
456
+ le.call($, Be) && !it.hasOwnProperty(Be) && (je[Be] = $[Be]);
457
457
  if (T && T.defaultProps) {
458
458
  var Ke = T.defaultProps;
459
459
  for (Be in Ke)
460
460
  je[Be] === void 0 && (je[Be] = Ke[Be]);
461
461
  }
462
- if (Ie || lt) {
463
- var Je = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
464
- Ie && Ge(je, Je), lt && ir(je, Je);
462
+ if (Ie || dt) {
463
+ var Qe = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
464
+ Ie && Ve(je, Qe), dt && ir(je, Qe);
465
465
  }
466
- return ws(T, Ie, lt, De, ve, at.current, je);
466
+ return ws(T, Ie, dt, De, ve, We.current, je);
467
467
  }
468
468
  }
469
469
  var q = w.ReactCurrentOwner, se = w.ReactDebugCurrentFrame;
@@ -476,10 +476,10 @@ function Xh() {
476
476
  }
477
477
  var Pe;
478
478
  Pe = !1;
479
- function At(T) {
479
+ function kt(T) {
480
480
  return typeof T == "object" && T !== null && T.$$typeof === t;
481
481
  }
482
- function jt() {
482
+ function _t() {
483
483
  {
484
484
  if (q.current) {
485
485
  var T = G(q.current.type);
@@ -497,7 +497,7 @@ Check the render method of \`` + T + "`.";
497
497
  var Pa = {};
498
498
  function hh(T) {
499
499
  {
500
- var $ = jt();
500
+ var $ = _t();
501
501
  if (!$) {
502
502
  var ne = typeof T == "string" ? T : T.displayName || T.name;
503
503
  ne && ($ = `
@@ -524,18 +524,18 @@ Check the top-level render call using <` + ne + ">.");
524
524
  {
525
525
  if (typeof T != "object")
526
526
  return;
527
- if (Me(T))
527
+ if (_e(T))
528
528
  for (var ne = 0; ne < T.length; ne++) {
529
529
  var ve = T[ne];
530
- At(ve) && ka(ve, $);
530
+ kt(ve) && ka(ve, $);
531
531
  }
532
- else if (At(T))
532
+ else if (kt(T))
533
533
  T._store && (T._store.validated = !0);
534
534
  else if (T) {
535
535
  var De = g(T);
536
536
  if (typeof De == "function" && De !== T.entries)
537
537
  for (var Be = De.call(T), je; !(je = Be.next()).done; )
538
- At(je.value) && ka(je.value, $);
538
+ kt(je.value) && ka(je.value, $);
539
539
  }
540
540
  }
541
541
  }
@@ -582,28 +582,28 @@ Check the top-level render call using <` + ne + ">.");
582
582
  if (!je) {
583
583
  var Ie = "";
584
584
  (T === void 0 || typeof T == "object" && T !== null && Object.keys(T).length === 0) && (Ie += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
585
- var lt = Mn();
586
- lt ? Ie += lt : Ie += jt();
585
+ var dt = Mn();
586
+ dt ? Ie += dt : Ie += _t();
587
587
  var Ke;
588
- T === null ? Ke = "null" : Me(T) ? Ke = "array" : T !== void 0 && T.$$typeof === t ? (Ke = "<" + (G(T.type) || "Unknown") + " />", Ie = " Did you accidentally export a JSX literal instead of a component?") : Ke = typeof T, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ke, Ie);
588
+ T === null ? Ke = "null" : _e(T) ? Ke = "array" : T !== void 0 && T.$$typeof === t ? (Ke = "<" + (G(T.type) || "Unknown") + " />", Ie = " Did you accidentally export a JSX literal instead of a component?") : Ke = typeof T, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ke, Ie);
589
589
  }
590
- var Je = ys(T, $, ne, De, Be);
591
- if (Je == null)
592
- return Je;
590
+ var Qe = ys(T, $, ne, De, Be);
591
+ if (Qe == null)
592
+ return Qe;
593
593
  if (je) {
594
- var St = $.children;
595
- if (St !== void 0)
594
+ var Et = $.children;
595
+ if (Et !== void 0)
596
596
  if (ve)
597
- if (Me(St)) {
598
- for (var Dn = 0; Dn < St.length; Dn++)
599
- _a(St[Dn], T);
600
- Object.freeze && Object.freeze(St);
597
+ if (_e(Et)) {
598
+ for (var Dn = 0; Dn < Et.length; Dn++)
599
+ _a(Et[Dn], T);
600
+ Object.freeze && Object.freeze(Et);
601
601
  } else
602
602
  b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
603
603
  else
604
- _a(St, T);
604
+ _a(Et, T);
605
605
  }
606
- return T === r ? gh(Je) : mh(Je), Je;
606
+ return T === r ? gh(Qe) : mh(Qe), Qe;
607
607
  }
608
608
  }
609
609
  function vh(T, $, ne) {
@@ -626,16 +626,16 @@ function hc(e, t) {
626
626
  const { toString: qh } = Object.prototype, { getPrototypeOf: ki } = Object, { iterator: Ho, toStringTag: mc } = Symbol, $o = /* @__PURE__ */ ((e) => (t) => {
627
627
  const n = qh.call(t);
628
628
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
629
- })(/* @__PURE__ */ Object.create(null)), Ft = (e) => (e = e.toLowerCase(), (t) => $o(t) === e), zo = (e) => (t) => typeof t === e, { isArray: Zn } = Array, Kn = zo("undefined");
629
+ })(/* @__PURE__ */ Object.create(null)), $t = (e) => (e = e.toLowerCase(), (t) => $o(t) === e), zo = (e) => (t) => typeof t === e, { isArray: Zn } = Array, Kn = zo("undefined");
630
630
  function _r(e) {
631
- return e !== null && !Kn(e) && e.constructor !== null && !Kn(e.constructor) && pt(e.constructor.isBuffer) && e.constructor.isBuffer(e);
631
+ return e !== null && !Kn(e) && e.constructor !== null && !Kn(e.constructor) && mt(e.constructor.isBuffer) && e.constructor.isBuffer(e);
632
632
  }
633
- const gc = Ft("ArrayBuffer");
633
+ const gc = $t("ArrayBuffer");
634
634
  function Jh(e) {
635
635
  let t;
636
636
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && gc(e.buffer), t;
637
637
  }
638
- const Zh = zo("string"), pt = zo("function"), vc = zo("number"), Or = (e) => e !== null && typeof e == "object", Qh = (e) => e === !0 || e === !1, ro = (e) => {
638
+ const Zh = zo("string"), mt = zo("function"), vc = zo("number"), Or = (e) => e !== null && typeof e == "object", Qh = (e) => e === !0 || e === !1, ro = (e) => {
639
639
  if ($o(e) !== "object")
640
640
  return !1;
641
641
  const t = ki(e);
@@ -648,11 +648,11 @@ const Zh = zo("string"), pt = zo("function"), vc = zo("number"), Or = (e) => e !
648
648
  } catch {
649
649
  return !1;
650
650
  }
651
- }, tm = Ft("Date"), nm = Ft("File"), rm = Ft("Blob"), om = Ft("FileList"), sm = (e) => Or(e) && pt(e.pipe), im = (e) => {
651
+ }, tm = $t("Date"), nm = $t("File"), rm = $t("Blob"), om = $t("FileList"), sm = (e) => Or(e) && mt(e.pipe), im = (e) => {
652
652
  let t;
653
- return e && (typeof FormData == "function" && e instanceof FormData || pt(e.append) && ((t = $o(e)) === "formdata" || // detect form-data instance
654
- t === "object" && pt(e.toString) && e.toString() === "[object FormData]"));
655
- }, am = Ft("URLSearchParams"), [lm, cm, um, dm] = ["ReadableStream", "Request", "Response", "Headers"].map(Ft), fm = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
653
+ return e && (typeof FormData == "function" && e instanceof FormData || mt(e.append) && ((t = $o(e)) === "formdata" || // detect form-data instance
654
+ t === "object" && mt(e.toString) && e.toString() === "[object FormData]"));
655
+ }, am = $t("URLSearchParams"), [lm, cm, um, dm] = ["ReadableStream", "Request", "Response", "Headers"].map($t), fm = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
656
656
  function Mr(e, t, { allOwnKeys: n = !1 } = {}) {
657
657
  if (e === null || typeof e > "u")
658
658
  return;
@@ -691,7 +691,7 @@ function Xs() {
691
691
  return n;
692
692
  }
693
693
  const pm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
694
- n && pt(o) ? e[s] = hc(o, n) : e[s] = o;
694
+ n && mt(o) ? e[s] = hc(o, n) : e[s] = o;
695
695
  }, { allOwnKeys: r }), e), hm = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), mm = (e, t, n, r) => {
696
696
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
697
697
  value: t.prototype
@@ -732,12 +732,12 @@ const pm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
732
732
  for (; (n = e.exec(t)) !== null; )
733
733
  r.push(n);
734
734
  return r;
735
- }, Sm = Ft("HTMLFormElement"), Cm = (e) => e.toLowerCase().replace(
735
+ }, Sm = $t("HTMLFormElement"), Cm = (e) => e.toLowerCase().replace(
736
736
  /[-_\s]([a-z\d])(\w*)/g,
737
737
  function(n, r, o) {
738
738
  return r.toUpperCase() + o;
739
739
  }
740
- ), za = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Tm = Ft("RegExp"), wc = (e, t) => {
740
+ ), za = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Tm = $t("RegExp"), wc = (e, t) => {
741
741
  const n = Object.getOwnPropertyDescriptors(e), r = {};
742
742
  Mr(n, (o, s) => {
743
743
  let i;
@@ -745,10 +745,10 @@ const pm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
745
745
  }), Object.defineProperties(e, r);
746
746
  }, Em = (e) => {
747
747
  wc(e, (t, n) => {
748
- if (pt(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
748
+ if (mt(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
749
749
  return !1;
750
750
  const r = e[n];
751
- if (pt(r)) {
751
+ if (mt(r)) {
752
752
  if (t.enumerable = !1, "writable" in t) {
753
753
  t.writable = !1;
754
754
  return;
@@ -768,7 +768,7 @@ const pm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
768
768
  }, Im = () => {
769
769
  }, Nm = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
770
770
  function Am(e) {
771
- return !!(e && pt(e.append) && e[mc] === "FormData" && e[Ho]);
771
+ return !!(e && mt(e.append) && e[mc] === "FormData" && e[Ho]);
772
772
  }
773
773
  const jm = (e) => {
774
774
  const t = new Array(10), n = (r, o) => {
@@ -789,14 +789,14 @@ const jm = (e) => {
789
789
  return r;
790
790
  };
791
791
  return n(e, 0);
792
- }, Pm = Ft("AsyncFunction"), km = (e) => e && (Or(e) || pt(e)) && pt(e.then) && pt(e.catch), yc = ((e, t) => e ? setImmediate : t ? ((n, r) => (yn.addEventListener("message", ({ source: o, data: s }) => {
792
+ }, Pm = $t("AsyncFunction"), km = (e) => e && (Or(e) || mt(e)) && mt(e.then) && mt(e.catch), yc = ((e, t) => e ? setImmediate : t ? ((n, r) => (yn.addEventListener("message", ({ source: o, data: s }) => {
793
793
  o === yn && s === n && r.length && r.shift()();
794
794
  }, !1), (o) => {
795
795
  r.push(o), yn.postMessage(n, "*");
796
796
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
797
797
  typeof setImmediate == "function",
798
- pt(yn.postMessage)
799
- ), _m = typeof queueMicrotask < "u" ? queueMicrotask.bind(yn) : typeof process < "u" && process.nextTick || yc, Om = (e) => e != null && pt(e[Ho]), A = {
798
+ mt(yn.postMessage)
799
+ ), _m = typeof queueMicrotask < "u" ? queueMicrotask.bind(yn) : typeof process < "u" && process.nextTick || yc, Om = (e) => e != null && mt(e[Ho]), A = {
800
800
  isArray: Zn,
801
801
  isArrayBuffer: gc,
802
802
  isBuffer: _r,
@@ -817,7 +817,7 @@ const jm = (e) => {
817
817
  isFile: nm,
818
818
  isBlob: rm,
819
819
  isRegExp: Tm,
820
- isFunction: pt,
820
+ isFunction: mt,
821
821
  isStream: sm,
822
822
  isURLSearchParams: am,
823
823
  isTypedArray: bm,
@@ -830,7 +830,7 @@ const jm = (e) => {
830
830
  inherits: mm,
831
831
  toFlatObject: gm,
832
832
  kindOf: $o,
833
- kindOfTest: Ft,
833
+ kindOfTest: $t,
834
834
  endsWith: vm,
835
835
  toArray: xm,
836
836
  forEachEntry: wm,
@@ -1110,14 +1110,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Vm
1110
1110
  hasStandardBrowserWebWorkerEnv: Wm,
1111
1111
  navigator: Js,
1112
1112
  origin: Vm
1113
- }, Symbol.toStringTag, { value: "Module" })), ot = {
1113
+ }, Symbol.toStringTag, { value: "Module" })), at = {
1114
1114
  ...Gm,
1115
1115
  ...zm
1116
1116
  };
1117
1117
  function Km(e, t) {
1118
- return Uo(e, new ot.classes.URLSearchParams(), {
1118
+ return Uo(e, new at.classes.URLSearchParams(), {
1119
1119
  visitor: function(n, r, o, s) {
1120
- return ot.isNode && A.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1120
+ return at.isNode && A.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1121
1121
  },
1122
1122
  ...t
1123
1123
  });
@@ -1212,8 +1212,8 @@ const Dr = {
1212
1212
  maxContentLength: -1,
1213
1213
  maxBodyLength: -1,
1214
1214
  env: {
1215
- FormData: ot.classes.FormData,
1216
- Blob: ot.classes.Blob
1215
+ FormData: at.classes.FormData,
1216
+ Blob: at.classes.Blob
1217
1217
  },
1218
1218
  validateStatus: function(t) {
1219
1219
  return t >= 200 && t < 300;
@@ -1292,7 +1292,7 @@ function ng(e, t) {
1292
1292
  });
1293
1293
  });
1294
1294
  }
1295
- let ht = class {
1295
+ let gt = class {
1296
1296
  constructor(t) {
1297
1297
  t && this.set(t);
1298
1298
  }
@@ -1418,8 +1418,8 @@ let ht = class {
1418
1418
  return A.isArray(t) ? t.forEach(s) : s(t), this;
1419
1419
  }
1420
1420
  };
1421
- ht.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1422
- A.reduceDescriptors(ht.prototype, ({ value: e }, t) => {
1421
+ gt.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1422
+ A.reduceDescriptors(gt.prototype, ({ value: e }, t) => {
1423
1423
  let n = t[0].toUpperCase() + t.slice(1);
1424
1424
  return {
1425
1425
  get: () => e,
@@ -1428,9 +1428,9 @@ A.reduceDescriptors(ht.prototype, ({ value: e }, t) => {
1428
1428
  }
1429
1429
  };
1430
1430
  });
1431
- A.freezeMethods(ht);
1431
+ A.freezeMethods(gt);
1432
1432
  function Cs(e, t) {
1433
- const n = this || Dr, r = t || n, o = ht.from(r.headers);
1433
+ const n = this || Dr, r = t || n, o = gt.from(r.headers);
1434
1434
  let s = r.data;
1435
1435
  return A.forEach(e, function(a) {
1436
1436
  s = a.call(n, s, o.normalize(), t ? t.status : void 0);
@@ -1513,10 +1513,10 @@ const So = (e, t, n = 3) => {
1513
1513
  total: e,
1514
1514
  loaded: r
1515
1515
  }), t[1]];
1516
- }, Ya = (e) => (...t) => A.asap(() => e(...t)), ig = ot.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, ot.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1517
- new URL(ot.origin),
1518
- ot.navigator && /(msie|trident)/i.test(ot.navigator.userAgent)
1519
- ) : () => !0, ag = ot.hasStandardBrowserEnv ? (
1516
+ }, Ya = (e) => (...t) => A.asap(() => e(...t)), ig = at.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, at.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1517
+ new URL(at.origin),
1518
+ at.navigator && /(msie|trident)/i.test(at.navigator.userAgent)
1519
+ ) : () => !0, ag = at.hasStandardBrowserEnv ? (
1520
1520
  // Standard browser envs support document.cookie
1521
1521
  {
1522
1522
  write(e, t, n, r, o, s) {
@@ -1553,7 +1553,7 @@ function Pc(e, t, n) {
1553
1553
  let r = !lg(t);
1554
1554
  return e && (r || n == !1) ? cg(e, t) : t;
1555
1555
  }
1556
- const Xa = (e) => e instanceof ht ? { ...e } : e;
1556
+ const Xa = (e) => e instanceof gt ? { ...e } : e;
1557
1557
  function Tn(e, t) {
1558
1558
  t = t || {};
1559
1559
  const n = {};
@@ -1621,11 +1621,11 @@ function Tn(e, t) {
1621
1621
  const kc = (e) => {
1622
1622
  const t = Tn({}, e);
1623
1623
  let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: i, auth: a } = t;
1624
- if (t.headers = i = ht.from(i), t.url = Rc(Pc(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
1624
+ if (t.headers = i = gt.from(i), t.url = Rc(Pc(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
1625
1625
  "Authorization",
1626
1626
  "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
1627
1627
  ), A.isFormData(n)) {
1628
- if (ot.hasStandardBrowserEnv || ot.hasStandardBrowserWebWorkerEnv)
1628
+ if (at.hasStandardBrowserEnv || at.hasStandardBrowserWebWorkerEnv)
1629
1629
  i.setContentType(void 0);
1630
1630
  else if (A.isFunction(n.getHeaders)) {
1631
1631
  const c = n.getHeaders(), u = ["content-type", "content-length"];
@@ -1634,7 +1634,7 @@ const kc = (e) => {
1634
1634
  });
1635
1635
  }
1636
1636
  }
1637
- if (ot.hasStandardBrowserEnv && (r && A.isFunction(r) && (r = r(t)), r || r !== !1 && ig(t.url))) {
1637
+ if (at.hasStandardBrowserEnv && (r && A.isFunction(r) && (r = r(t)), r || r !== !1 && ig(t.url))) {
1638
1638
  const c = o && s && ag.read(s);
1639
1639
  c && i.set(o, c);
1640
1640
  }
@@ -1643,7 +1643,7 @@ const kc = (e) => {
1643
1643
  return new Promise(function(n, r) {
1644
1644
  const o = kc(e);
1645
1645
  let s = o.data;
1646
- const i = ht.from(o.headers).normalize();
1646
+ const i = gt.from(o.headers).normalize();
1647
1647
  let { responseType: a, onUploadProgress: c, onDownloadProgress: u } = o, d, p, h, x, m;
1648
1648
  function v() {
1649
1649
  x && x(), m && m(), o.cancelToken && o.cancelToken.unsubscribe(d), o.signal && o.signal.removeEventListener("abort", d);
@@ -1653,7 +1653,7 @@ const kc = (e) => {
1653
1653
  function w() {
1654
1654
  if (!g)
1655
1655
  return;
1656
- const y = ht.from(
1656
+ const y = gt.from(
1657
1657
  "getAllResponseHeaders" in g && g.getAllResponseHeaders()
1658
1658
  ), S = {
1659
1659
  data: !a || a === "text" || a === "json" ? g.responseText : g.response,
@@ -1691,7 +1691,7 @@ const kc = (e) => {
1691
1691
  g && (r(!y || y.type ? new Qn(null, e, g) : y), g.abort(), g = null);
1692
1692
  }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
1693
1693
  const b = rg(o.url);
1694
- if (b && ot.protocols.indexOf(b) === -1) {
1694
+ if (b && at.protocols.indexOf(b) === -1) {
1695
1695
  r(new Se("Unsupported protocol " + b + ":", Se.ERR_BAD_REQUEST, e));
1696
1696
  return;
1697
1697
  }
@@ -1798,7 +1798,7 @@ const kc = (e) => {
1798
1798
  return !1;
1799
1799
  const a = o && Vr(Za), c = o && (typeof Qa == "function" ? /* @__PURE__ */ ((m) => (v) => m.encode(v))(new Qa()) : async (m) => new Uint8Array(await new n(m).arrayBuffer())), u = s && a && el(() => {
1800
1800
  let m = !1;
1801
- const v = new n(ot.origin, {
1801
+ const v = new n(at.origin, {
1802
1802
  body: new Za(),
1803
1803
  method: "POST",
1804
1804
  get duplex() {
@@ -1823,7 +1823,7 @@ const kc = (e) => {
1823
1823
  if (A.isBlob(m))
1824
1824
  return m.size;
1825
1825
  if (A.isSpecCompliantForm(m))
1826
- return (await new n(ot.origin, {
1826
+ return (await new n(at.origin, {
1827
1827
  method: "POST",
1828
1828
  body: m
1829
1829
  }).arrayBuffer()).byteLength;
@@ -1905,7 +1905,7 @@ const kc = (e) => {
1905
1905
  return !O && N && N(), await new Promise((Q, ae) => {
1906
1906
  jc(Q, ae, {
1907
1907
  data: z,
1908
- headers: ht.from(F.headers),
1908
+ headers: gt.from(F.headers),
1909
1909
  status: F.status,
1910
1910
  statusText: F.statusText,
1911
1911
  config: m,
@@ -1986,7 +1986,7 @@ function Ts(e) {
1986
1986
  throw new Qn(null, e);
1987
1987
  }
1988
1988
  function nl(e) {
1989
- return Ts(e), e.headers = ht.from(e.headers), e.data = Cs.call(
1989
+ return Ts(e), e.headers = gt.from(e.headers), e.data = Cs.call(
1990
1990
  e,
1991
1991
  e.transformRequest
1992
1992
  ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Oc.getAdapter(e.adapter || Dr.adapter, e)(e).then(function(r) {
@@ -1994,13 +1994,13 @@ function nl(e) {
1994
1994
  e,
1995
1995
  e.transformResponse,
1996
1996
  r
1997
- ), r.headers = ht.from(r.headers), r;
1997
+ ), r.headers = gt.from(r.headers), r;
1998
1998
  }, function(r) {
1999
1999
  return Ac(r) || (Ts(e), r && r.response && (r.response.data = Cs.call(
2000
2000
  e,
2001
2001
  e.transformResponse,
2002
2002
  r.response
2003
- ), r.response.headers = ht.from(r.response.headers))), Promise.reject(r);
2003
+ ), r.response.headers = gt.from(r.response.headers))), Promise.reject(r);
2004
2004
  });
2005
2005
  }
2006
2006
  const Mc = "1.12.2", Wo = {};
@@ -2051,7 +2051,7 @@ function wg(e, t, n) {
2051
2051
  const so = {
2052
2052
  assertOptions: wg,
2053
2053
  validators: Wo
2054
- }, zt = so.validators;
2054
+ }, Wt = so.validators;
2055
2055
  let Cn = class {
2056
2056
  constructor(t) {
2057
2057
  this.defaults = t || {}, this.interceptors = {
@@ -2088,17 +2088,17 @@ let Cn = class {
2088
2088
  typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Tn(this.defaults, n);
2089
2089
  const { transitional: r, paramsSerializer: o, headers: s } = n;
2090
2090
  r !== void 0 && so.assertOptions(r, {
2091
- silentJSONParsing: zt.transitional(zt.boolean),
2092
- forcedJSONParsing: zt.transitional(zt.boolean),
2093
- clarifyTimeoutError: zt.transitional(zt.boolean)
2091
+ silentJSONParsing: Wt.transitional(Wt.boolean),
2092
+ forcedJSONParsing: Wt.transitional(Wt.boolean),
2093
+ clarifyTimeoutError: Wt.transitional(Wt.boolean)
2094
2094
  }, !1), o != null && (A.isFunction(o) ? n.paramsSerializer = {
2095
2095
  serialize: o
2096
2096
  } : so.assertOptions(o, {
2097
- encode: zt.function,
2098
- serialize: zt.function
2097
+ encode: Wt.function,
2098
+ serialize: Wt.function
2099
2099
  }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), so.assertOptions(n, {
2100
- baseUrl: zt.spelling("baseURL"),
2101
- withXsrfToken: zt.spelling("withXSRFToken")
2100
+ baseUrl: Wt.spelling("baseURL"),
2101
+ withXsrfToken: Wt.spelling("withXSRFToken")
2102
2102
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
2103
2103
  let i = s && A.merge(
2104
2104
  s.common,
@@ -2109,7 +2109,7 @@ let Cn = class {
2109
2109
  (m) => {
2110
2110
  delete s[m];
2111
2111
  }
2112
- ), n.headers = ht.concat(i, s);
2112
+ ), n.headers = gt.concat(i, s);
2113
2113
  const a = [];
2114
2114
  let c = !0;
2115
2115
  this.interceptors.request.forEach(function(v) {
@@ -2346,7 +2346,7 @@ qe.all = function(t) {
2346
2346
  qe.spread = Sg;
2347
2347
  qe.isAxiosError = Cg;
2348
2348
  qe.mergeConfig = Tn;
2349
- qe.AxiosHeaders = ht;
2349
+ qe.AxiosHeaders = gt;
2350
2350
  qe.formToJSON = (e) => Nc(A.isHTMLForm(e) ? new FormData(e) : e);
2351
2351
  qe.getAdapter = Oc.getAdapter;
2352
2352
  qe.HttpStatusCode = Qs;
@@ -2390,41 +2390,41 @@ function sl(e) {
2390
2390
  function Ig(e) {
2391
2391
  return ti.add(e), () => ti.delete(e);
2392
2392
  }
2393
- const It = qe.create({
2393
+ const jt = qe.create({
2394
2394
  // Only set baseURL when configured — do NOT fall back to localhost. Falling back causes
2395
2395
  // noisy network requests to the frontend Dev server when the backend isn't configured.
2396
2396
  ...ei ? { baseURL: ei } : {},
2397
2397
  timeout: 3e4,
2398
2398
  withCredentials: !0
2399
2399
  });
2400
- It.interceptors.request.use((e) => (Co && (e.headers.Authorization = `Bearer ${Co}`), e));
2401
- It.interceptors.response.use(
2400
+ jt.interceptors.request.use((e) => (Co && (e.headers.Authorization = `Bearer ${Co}`), e));
2401
+ jt.interceptors.response.use(
2402
2402
  (e) => e,
2403
2403
  (e) => Promise.reject(e)
2404
2404
  );
2405
- async function Pt(e, t) {
2406
- return It.defaults.baseURL ? (await It.get(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
2405
+ async function Ot(e, t) {
2406
+ return jt.defaults.baseURL ? (await jt.get(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
2407
2407
  }
2408
2408
  async function Gr(e, t, n) {
2409
- return It.defaults.baseURL ? (await It.post(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
2409
+ return jt.defaults.baseURL ? (await jt.post(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
2410
2410
  }
2411
2411
  async function Ng(e, t, n) {
2412
- return It.defaults.baseURL ? (await It.put(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
2412
+ return jt.defaults.baseURL ? (await jt.put(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
2413
2413
  }
2414
2414
  async function Ag(e, t) {
2415
- return It.defaults.baseURL ? (await It.delete(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
2415
+ return jt.defaults.baseURL ? (await jt.delete(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
2416
2416
  }
2417
- function ct(e) {
2417
+ function ft(e) {
2418
2418
  return e && typeof e == "object" && "data" in e ? e.data : e;
2419
2419
  }
2420
2420
  class jg {
2421
2421
  // ---- Configuration ----
2422
2422
  get baseUrl() {
2423
- const t = It.defaults.baseURL || "";
2423
+ const t = jt.defaults.baseURL || "";
2424
2424
  return String(t).replace(/\/+$|^\s+|\s+$/g, "");
2425
2425
  }
2426
2426
  updateConfig(t) {
2427
- t.baseUrl && (It.defaults.baseURL = String(t.baseUrl).replace(/\/+$/g, "")), t.authToken !== void 0 && sl(t.authToken);
2427
+ t.baseUrl && (jt.defaults.baseURL = String(t.baseUrl).replace(/\/+$/g, "")), t.authToken !== void 0 && sl(t.authToken);
2428
2428
  }
2429
2429
  // ---- Token Management ----
2430
2430
  getAuthToken() {
@@ -2438,41 +2438,41 @@ class jg {
2438
2438
  }
2439
2439
  // ---- Thread Management ----
2440
2440
  async listThreads() {
2441
- const t = await Pt("/chat/threads"), n = ct(t);
2441
+ const t = await Ot("/chat/threads"), n = ft(t);
2442
2442
  return (n == null ? void 0 : n.items) ?? (t == null ? void 0 : t.items) ?? [];
2443
2443
  }
2444
2444
  async createThread(t) {
2445
2445
  const r = await Gr("/chat/threads", t ? { title: t } : void 0);
2446
- return ct(r);
2446
+ return ft(r);
2447
2447
  }
2448
2448
  async updateThread(t, n) {
2449
2449
  const r = await Ng(`/chat/threads/${t}`, { title: n });
2450
- return ct(r);
2450
+ return ft(r);
2451
2451
  }
2452
2452
  async deleteThread(t) {
2453
2453
  const n = await Ag(`/chat/threads/${t}`);
2454
- return ct(n);
2454
+ return ft(n);
2455
2455
  }
2456
2456
  async threadInfo(t) {
2457
- const n = await Pt(`/chat/threads/${t}/info`);
2458
- return ct(n);
2457
+ const n = await Ot(`/chat/threads/${t}/info`);
2458
+ return ft(n);
2459
2459
  }
2460
2460
  // ---- Agents ----
2461
2461
  async listAgents() {
2462
- const t = await Pt("/chat/agents"), n = ct(t);
2462
+ const t = await Ot("/chat/agents"), n = ft(t);
2463
2463
  return (n == null ? void 0 : n.items) ?? [];
2464
2464
  }
2465
2465
  async getAgent(t) {
2466
- const n = await Pt(`/chat/agents/${t}`);
2467
- return ct(n);
2466
+ const n = await Ot(`/chat/agents/${t}`);
2467
+ return ft(n);
2468
2468
  }
2469
2469
  async getAgentSchema(t) {
2470
- const n = await Pt(`/chat/agents/${t}/schema`);
2471
- return ct(n);
2470
+ const n = await Ot(`/chat/agents/${t}/schema`);
2471
+ return ft(n);
2472
2472
  }
2473
2473
  // ---- Messages & State ----
2474
2474
  async getMessages(t) {
2475
- const n = await Pt(`/chat/threads/${t.threadId}/messages`, {
2475
+ const n = await Ot(`/chat/threads/${t.threadId}/messages`, {
2476
2476
  params: {
2477
2477
  thread_id: t.threadId,
2478
2478
  checkpoint_id: t.checkpointId,
@@ -2481,34 +2481,34 @@ class jg {
2481
2481
  before_id: t.beforeId ?? void 0
2482
2482
  }
2483
2483
  });
2484
- return ct(n);
2484
+ return ft(n);
2485
2485
  }
2486
2486
  async getState(t) {
2487
- const n = await Pt(`/chat/threads/${t.threadId}/state`, {
2487
+ const n = await Ot(`/chat/threads/${t.threadId}/state`, {
2488
2488
  params: {
2489
2489
  thread_id: t.threadId,
2490
2490
  checkpoint_id: t.checkpointId,
2491
2491
  checkpoint_ns: t.checkpointNs
2492
2492
  }
2493
2493
  });
2494
- return ct(n);
2494
+ return ft(n);
2495
2495
  }
2496
2496
  async getStateHistory(t) {
2497
- const n = await Pt(`/chat/threads/${t.threadId}/state/history`, {
2497
+ const n = await Ot(`/chat/threads/${t.threadId}/state/history`, {
2498
2498
  params: {
2499
2499
  thread_id: t.threadId,
2500
2500
  checkpoint_id: t.checkpointId,
2501
2501
  checkpoint_ns: t.checkpointNs
2502
2502
  }
2503
2503
  });
2504
- return ct(n);
2504
+ return ft(n);
2505
2505
  }
2506
2506
  // ---- Checkpoints ----
2507
2507
  async listCheckpoints(t) {
2508
- const n = await Pt(`/chat/threads/${t}/checkpoints`, {
2508
+ const n = await Ot(`/chat/threads/${t}/checkpoints`, {
2509
2509
  params: { thread_id: t }
2510
2510
  });
2511
- return ct(n);
2511
+ return ft(n);
2512
2512
  }
2513
2513
  // ---- File Uploads ----
2514
2514
  async uploadExcel(t, n = "/upload_excel", r = {}) {
@@ -2517,7 +2517,7 @@ class jg {
2517
2517
  const a = await Gr(n, o, {
2518
2518
  headers: { Accept: "application/json" },
2519
2519
  maxBodyLength: 1 / 0
2520
- }), c = ct(a);
2520
+ }), c = ft(a);
2521
2521
  return Ln() && console.debug("[api.uploadExcel] <-", c), c;
2522
2522
  }
2523
2523
  // ---- File Uploads ----
@@ -2527,7 +2527,7 @@ class jg {
2527
2527
  const o = await Gr(n, r, {
2528
2528
  headers: { Accept: "application/json" },
2529
2529
  maxBodyLength: 1 / 0
2530
- }), s = ct(o);
2530
+ }), s = ft(o);
2531
2531
  if (Ln() && console.debug("[api.uploadImage] <-", s), !(s != null && s.url))
2532
2532
  throw new Error("Invalid upload response: missing url");
2533
2533
  return {
@@ -2542,7 +2542,7 @@ class jg {
2542
2542
  o && (s.thread_id = o), Ln() && console.debug("[api.uploadFile] ->", "/chat/files/upload", s);
2543
2543
  const i = await Gr("/chat/files/upload", s, {
2544
2544
  headers: { Accept: "application/json" }
2545
- }), a = ct(i);
2545
+ }), a = ft(i);
2546
2546
  if (Ln() && console.debug("[api.uploadFile] <-", a), !(a != null && a.id))
2547
2547
  throw new Error("Invalid upload response: missing id");
2548
2548
  return a;
@@ -2550,7 +2550,7 @@ class jg {
2550
2550
  }
2551
2551
  const ln = new jg();
2552
2552
  function Pg(e = {}) {
2553
- const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = be(e.token ?? null), s = vt(e.headers ?? {}), [i, a] = be(!1), [c, u] = be(null), [d, p] = be(""), [h, x] = be(null), m = vt(null), v = Ye((y) => {
2553
+ const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = be(e.token ?? null), s = bt(e.headers ?? {}), [i, a] = be(!1), [c, u] = be(null), [d, p] = be(""), [h, x] = be(null), m = bt(null), v = Ye((y) => {
2554
2554
  o(y);
2555
2555
  }, []), g = Ye(() => {
2556
2556
  var y;
@@ -2667,7 +2667,7 @@ function Pg(e = {}) {
2667
2667
  },
2668
2668
  [t, r, e.autoAppendAssistant]
2669
2669
  );
2670
- return Ze(() => () => {
2670
+ return et(() => () => {
2671
2671
  var y;
2672
2672
  return (y = m.current) == null ? void 0 : y.abort();
2673
2673
  }, []), {
@@ -2953,7 +2953,7 @@ async function Wg(e, t = [], n, r, o, s) {
2953
2953
  const Fc = cc(null);
2954
2954
  function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialThreadId: o = null, historyPageSize: s, autoLoadInitial: i = !0, enableFileAgentRouting: a = !1, fileAgentId: c = "invoice_reader" }) {
2955
2955
  const u = ln;
2956
- Ze(() => {
2956
+ et(() => {
2957
2957
  t && u.updateConfig({
2958
2958
  baseUrl: t.baseUrl,
2959
2959
  authToken: t.apiKey
@@ -2968,7 +2968,7 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2968
2968
  // Ensure the path matches the chat endpoint
2969
2969
  streamPath: "/chat/runs/stream"
2970
2970
  }), [v, g] = be(() => typeof u.getAuthToken == "function" ? u.getAuthToken() : null);
2971
- Ze(() => {
2971
+ et(() => {
2972
2972
  m(typeof u.getAuthToken == "function" ? u.getAuthToken() : null);
2973
2973
  const W = u.onTokenChange((te) => {
2974
2974
  g(te), m(te);
@@ -2982,7 +2982,7 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2982
2982
  }, [u]), { state: b, seed: y, prepend: R, pushUser: S, onEvent: C, reset: E } = Dg(), I = s && s > 0 ? s : 6, [j, P] = be(!1), [D, H] = be(!1), [G, N] = be(null), [_, M] = be(void 0), V = Ye(
2983
2983
  (W, te) => {
2984
2984
  const ye = Array.isArray(W == null ? void 0 : W.messages) ? W.messages : [];
2985
- te === "replace" ? y(ye) : te === "prepend" && ye.length && R(ye), N((W == null ? void 0 : W.nextCursor) ?? null), P(!!(W != null && W.hasMore)), M((Me) => (W == null ? void 0 : W.checkpointId) ?? Me ?? void 0);
2985
+ te === "replace" ? y(ye) : te === "prepend" && ye.length && R(ye), N((W == null ? void 0 : W.nextCursor) ?? null), P(!!(W != null && W.hasMore)), M((_e) => (W == null ? void 0 : W.checkpointId) ?? _e ?? void 0);
2986
2986
  },
2987
2987
  [y, R]
2988
2988
  ), [F, O] = be([]), [z, Q] = be(null), ae = Ye(async () => {
@@ -2990,27 +2990,45 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2990
2990
  O(W);
2991
2991
  }, [u]), [U, ee] = be(!1), pe = Ye(
2992
2992
  async (W) => {
2993
- const te = (W == null ? void 0 : W.maxAttempts) ?? 5, ye = (W == null ? void 0 : W.baseDelayMs) ?? 500, Me = (W == null ? void 0 : W.timeoutMs) ?? 2e3;
2993
+ const te = (W == null ? void 0 : W.maxAttempts) ?? 5, ye = (W == null ? void 0 : W.baseDelayMs) ?? 500, _e = (W == null ? void 0 : W.timeoutMs) ?? 2e3;
2994
2994
  if (!u.baseUrl) return !1;
2995
- const tt = async () => {
2995
+ const Je = u.baseUrl.replace(/\/+$/, ""), nt = [
2996
+ "/health",
2997
+ "/api/health",
2998
+ "/",
2999
+ // root
3000
+ "/api/v2/health",
3001
+ "/api/v2/chat/health"
3002
+ ], Ge = async (We) => {
2996
3003
  try {
2997
- const $e = new AbortController(), Ve = setTimeout(() => $e.abort(), Me), ft = u.baseUrl.replace(/\/+$/, "") + "/health", at = await fetch(ft, { method: "GET", signal: $e.signal });
2998
- return clearTimeout(Ve), at.ok;
3004
+ const it = new AbortController(), Ze = setTimeout(() => it.abort(), _e), ut = await fetch(We, { method: "GET", signal: it.signal });
3005
+ return clearTimeout(Ze), ut.ok;
3006
+ } catch {
3007
+ return !1;
3008
+ }
3009
+ }, Tt = async (We) => {
3010
+ try {
3011
+ const it = new AbortController(), Ze = setTimeout(() => it.abort(), _e), ut = await fetch(We, { method: "HEAD", signal: it.signal });
3012
+ return clearTimeout(Ze), ut.ok;
2999
3013
  } catch {
3000
3014
  return !1;
3001
3015
  }
3002
3016
  };
3003
- for (let $e = 0; $e < te; $e++) {
3004
- if (console.debug(`[ChatProvider] health-check attempt ${$e + 1}/${te}`), await tt())
3005
- return ee(!0), !0;
3006
- const Ve = ye * Math.pow(2, $e);
3007
- await new Promise((ft) => setTimeout(ft, Ve));
3017
+ for (let We = 0; We < te; We++) {
3018
+ console.debug(`[ChatProvider] health-check attempt ${We + 1}/${te}`);
3019
+ for (const Ze of nt) {
3020
+ const ut = Ze === "/" ? Je + "/" : Je + Ze;
3021
+ if (console.debug(`[ChatProvider] checking ${ut}`), await Ge(ut) || Ze === "/" && await Tt(Je + "/"))
3022
+ return ee(!0), !0;
3023
+ }
3024
+ const it = ye * Math.pow(2, We);
3025
+ await new Promise((Ze) => setTimeout(Ze, it));
3008
3026
  }
3009
3027
  return ee(!1), !1;
3010
3028
  },
3011
3029
  [u.baseUrl]
3012
3030
  );
3013
- Ze(() => {
3031
+ et(() => {
3014
3032
  let W = !0;
3015
3033
  if (!u.baseUrl) {
3016
3034
  console.debug("[ChatProvider] skipping initial refreshThreads: api.baseUrl not configured");
@@ -3027,11 +3045,11 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3027
3045
  })(), () => {
3028
3046
  W = !1;
3029
3047
  };
3030
- }, [ae, u.baseUrl, pe]), Ze(() => {
3048
+ }, [ae, u.baseUrl, pe]), et(() => {
3031
3049
  r == null || r(z);
3032
3050
  }, [z, r]);
3033
- const we = vt(null);
3034
- Ze(() => {
3051
+ const we = bt(null);
3052
+ et(() => {
3035
3053
  if (o && i) {
3036
3054
  if (!u.baseUrl) {
3037
3055
  console.debug("[ChatProvider] skipping initial load: api.baseUrl not configured");
@@ -3045,7 +3063,7 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3045
3063
  }));
3046
3064
  }
3047
3065
  }, [o, i, u.baseUrl, U]);
3048
- const X = vt(null), k = Ye(
3066
+ const X = bt(null), k = Ye(
3049
3067
  async (W, te, ye) => {
3050
3068
  if (!u.baseUrl) {
3051
3069
  console.debug("[ChatProvider] skipping loadThread: api.baseUrl not configured");
@@ -3055,13 +3073,13 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3055
3073
  X.current = W;
3056
3074
  try {
3057
3075
  P(!1), N(null), M(void 0);
3058
- const Me = await u.getMessages({
3076
+ const _e = await u.getMessages({
3059
3077
  threadId: W,
3060
3078
  checkpointId: te,
3061
3079
  checkpointNs: ye,
3062
3080
  limit: I
3063
3081
  });
3064
- Q(W), V(Me, "replace");
3082
+ Q(W), V(_e, "replace");
3065
3083
  } finally {
3066
3084
  X.current = null;
3067
3085
  }
@@ -3083,8 +3101,8 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3083
3101
  }, [u, z, V, I]), ce = Ye(async () => {
3084
3102
  if (!z) throw new Error("No active thread");
3085
3103
  await k(z);
3086
- }, [z, k]), ie = vt(!1);
3087
- Ze(() => {
3104
+ }, [z, k]), ie = bt(!1);
3105
+ et(() => {
3088
3106
  const W = ie.current;
3089
3107
  if (ie.current = d, W && !d && z) {
3090
3108
  const te = b.lastCheckpointId ?? void 0;
@@ -3105,7 +3123,7 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3105
3123
  })();
3106
3124
  }
3107
3125
  }, [d, z, b.lastCheckpointId, u, V, ae]);
3108
- const Oe = Ye(async (W) => {
3126
+ const Me = Ye(async (W) => {
3109
3127
  const te = await u.createThread(W);
3110
3128
  return await ae(), await k(te.threadId), te.threadId;
3111
3129
  }, [u, ae, k]), ue = Ye(async (W) => {
@@ -3114,50 +3132,50 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3114
3132
  await u.updateThread(W, te), await ae();
3115
3133
  }, [u, ae]), le = Ye(async (W, te) => {
3116
3134
  var On;
3117
- const ye = (te == null ? void 0 : te.attachments) || [], { contentParts: Me, filesInfo: tt } = await Wg(
3135
+ const ye = (te == null ? void 0 : te.attachments) || [], { contentParts: _e, filesInfo: Je } = await Wg(
3118
3136
  u,
3119
3137
  ye,
3120
3138
  t == null ? void 0 : t.uploadPath,
3121
3139
  a,
3122
3140
  c,
3123
3141
  z
3124
- ), $e = [];
3125
- W && $e.push({ type: "text", text: W });
3126
- for (const Ge of Me) $e.push(Ge);
3127
- const Ve = {
3142
+ ), nt = [];
3143
+ W && nt.push({ type: "text", text: W });
3144
+ for (const Ve of _e) nt.push(Ve);
3145
+ const Ge = {
3128
3146
  id: ((On = crypto.randomUUID) == null ? void 0 : On.call(crypto)) || `user-${Date.now()}`,
3129
3147
  role: "user",
3130
- content: $e,
3148
+ content: nt,
3131
3149
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
3132
3150
  checkpointId: (te == null ? void 0 : te.checkpointId) ?? b.lastCheckpointId ?? void 0
3133
3151
  };
3134
- S(Ve);
3135
- const ft = {
3136
- ...Ve,
3137
- content: Ve.content.filter((Ge) => Ge.type === "text" || Ge.type === "image_url")
3138
- }, at = { ...(te == null ? void 0 : te.payloadExtras) ?? {} }, nn = !!at.edit, $t = at.originalMessageId, rn = typeof $t == "string" ? $t : void 0, on = ye && ye.length > 0, xn = {
3152
+ S(Ge);
3153
+ const Tt = {
3154
+ ...Ge,
3155
+ content: Ge.content.filter((Ve) => Ve.type === "text" || Ve.type === "image_url")
3156
+ }, We = { ...(te == null ? void 0 : te.payloadExtras) ?? {} }, it = !!We.edit, Ze = We.originalMessageId, ut = typeof Ze == "string" ? Ze : void 0, on = ye && ye.length > 0, xn = {
3139
3157
  ...z ? { threadId: z } : {},
3140
3158
  payload: {
3141
- messages: [ft],
3142
- attachments: Ve.content.filter((Ge) => Ge.type === "file").map((Ge) => ({ type: "file", url: Ge.url, mimeType: Ge.mimeType, name: Ge.name, size: Ge.size })),
3143
- files_info: tt,
3159
+ messages: [Tt],
3160
+ attachments: Ge.content.filter((Ve) => Ve.type === "file").map((Ve) => ({ type: "file", url: Ve.url, mimeType: Ve.mimeType, name: Ve.name, size: Ve.size })),
3161
+ files_info: Je,
3144
3162
  ...a && on && c ? { agent_id: c } : {},
3145
- ...at
3163
+ ...We
3146
3164
  },
3147
3165
  checkpointId: (te == null ? void 0 : te.checkpointId) ?? b.lastCheckpointId ?? void 0,
3148
3166
  checkpointNs: te == null ? void 0 : te.checkpointNs,
3149
3167
  nodeFilter: te == null ? void 0 : te.nodeFilter,
3150
3168
  config: te == null ? void 0 : te.config,
3151
- edit: nn,
3152
- originalMessageId: rn
3169
+ edit: it,
3170
+ originalMessageId: ut
3153
3171
  };
3154
3172
  h(
3155
3173
  xn,
3156
- (Ge) => C(Ge),
3174
+ (Ve) => C(Ve),
3157
3175
  {
3158
- onError: (Ge) => console.warn("stream error", Ge),
3159
- onOpen: ({ threadId: Ge, created: ir }) => {
3160
- !z && Ge && (Q(Ge), ir && ae().catch(() => {
3176
+ onError: (Ve) => console.warn("stream error", Ve),
3177
+ onOpen: ({ threadId: Ve, created: ir }) => {
3178
+ !z && Ve && (Q(Ve), ir && ae().catch(() => {
3161
3179
  }));
3162
3180
  }
3163
3181
  }
@@ -3204,7 +3222,7 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3204
3222
  navigateToCheckpoint: re,
3205
3223
  returnToLatest: ce,
3206
3224
  refreshThreads: ae,
3207
- createThread: Oe,
3225
+ createThread: Me,
3208
3226
  deleteThread: ue,
3209
3227
  renameThread: Ae,
3210
3228
  loadThread: k,
@@ -3250,7 +3268,7 @@ function Go(e, t) {
3250
3268
  function Yg(e, t) {
3251
3269
  return t(e);
3252
3270
  }
3253
- function Ue(...e) {
3271
+ function ze(...e) {
3254
3272
  return e;
3255
3273
  }
3256
3274
  function Le(e, t) {
@@ -3268,7 +3286,7 @@ function Xe(e) {
3268
3286
  function de(e, t) {
3269
3287
  return Le(e, Gg(t, Vo));
3270
3288
  }
3271
- function _t(e, t) {
3289
+ function Dt(e, t) {
3272
3290
  const n = e(pn, (r) => {
3273
3291
  n(), t(r);
3274
3292
  });
@@ -3285,7 +3303,7 @@ function cl(e) {
3285
3303
  function $c(e, t) {
3286
3304
  return e === t;
3287
3305
  }
3288
- function ze(e = $c) {
3306
+ function $e(e = $c) {
3289
3307
  let t;
3290
3308
  return (n) => (r) => {
3291
3309
  e(t, r) || (t = r, n(r));
@@ -3299,7 +3317,7 @@ function me(e) {
3299
3317
  function oe(e) {
3300
3318
  return (t) => Hc(t, e);
3301
3319
  }
3302
- function Ut(e) {
3320
+ function Vt(e) {
3303
3321
  return (t) => () => {
3304
3322
  t(e);
3305
3323
  };
@@ -3316,7 +3334,7 @@ function B(e, ...t) {
3316
3334
  }
3317
3335
  };
3318
3336
  }
3319
- function Vt(e, t) {
3337
+ function Kt(e, t) {
3320
3338
  return (n) => (r) => {
3321
3339
  n(t = e(t, r));
3322
3340
  };
@@ -3326,7 +3344,7 @@ function En(e) {
3326
3344
  e > 0 ? e-- : t(n);
3327
3345
  };
3328
3346
  }
3329
- function Qt(e) {
3347
+ function tn(e) {
3330
3348
  let t = null, n;
3331
3349
  return (r) => (o) => {
3332
3350
  t = o, !n && (n = setTimeout(() => {
@@ -3385,7 +3403,7 @@ function K(e) {
3385
3403
  return n(r, o);
3386
3404
  };
3387
3405
  }
3388
- function it(e, t) {
3406
+ function ct(e, t) {
3389
3407
  return Go(K(t), (n) => de(e, n));
3390
3408
  }
3391
3409
  function Ne() {
@@ -3408,10 +3426,10 @@ function Ne() {
3408
3426
  }
3409
3427
  };
3410
3428
  }
3411
- function wt(e) {
3429
+ function St(e) {
3412
3430
  return Go(Ne(), (t) => de(e, t));
3413
3431
  }
3414
- function _e(e, t = [], { singleton: n } = { singleton: !0 }) {
3432
+ function Oe(e, t = [], { singleton: n } = { singleton: !0 }) {
3415
3433
  return {
3416
3434
  constructor: e,
3417
3435
  dependencies: t,
@@ -3429,7 +3447,7 @@ function Zg(e) {
3429
3447
  };
3430
3448
  return n(e);
3431
3449
  }
3432
- function Qe(...e) {
3450
+ function tt(...e) {
3433
3451
  const t = Ne(), n = new Array(e.length);
3434
3452
  let r = 0;
3435
3453
  const o = Math.pow(2, e.length) - 1;
@@ -3450,7 +3468,7 @@ function Qe(...e) {
3450
3468
  };
3451
3469
  }
3452
3470
  function he(e, t = $c) {
3453
- return B(e, ze(t));
3471
+ return B(e, $e(t));
3454
3472
  }
3455
3473
  function ri(...e) {
3456
3474
  return function(t, n) {
@@ -3462,13 +3480,13 @@ function ri(...e) {
3462
3480
  }
3463
3481
  };
3464
3482
  }
3465
- var mt = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(mt || {});
3483
+ var vt = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(vt || {});
3466
3484
  const Qg = {
3467
3485
  0: "debug",
3468
3486
  3: "error",
3469
3487
  1: "log",
3470
3488
  2: "warn"
3471
- }, ev = () => typeof globalThis > "u" ? window : globalThis, hn = _e(
3489
+ }, ev = () => typeof globalThis > "u" ? window : globalThis, hn = Oe(
3472
3490
  () => {
3473
3491
  const e = K(
3474
3492
  3
@@ -3543,7 +3561,7 @@ function nv(e, t, n, r) {
3543
3561
  if (a.dataset.index === void 0)
3544
3562
  continue;
3545
3563
  const c = parseInt(a.dataset.index), u = parseFloat(a.dataset.knownSize), d = t(a, n);
3546
- if (d === 0 && r("Zero-sized element, this should not happen", { child: a }, mt.ERROR), d === u)
3564
+ if (d === 0 && r("Zero-sized element, this should not happen", { child: a }, vt.ERROR), d === u)
3547
3565
  continue;
3548
3566
  const p = s[s.length - 1];
3549
3567
  s.length === 0 || p.size !== d || p.endIndex !== c - 1 ? s.push({ endIndex: c, size: d, startIndex: c }) : s[s.length - 1].endIndex++;
@@ -3551,7 +3569,7 @@ function nv(e, t, n, r) {
3551
3569
  return s;
3552
3570
  }
3553
3571
  function ul(e, t, n) {
3554
- return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, mt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
3572
+ return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, vt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
3555
3573
  }
3556
3574
  function zc(e, t, n) {
3557
3575
  const r = Y.useRef(null), o = Y.useCallback(
@@ -3596,7 +3614,7 @@ function zc(e, t, n) {
3596
3614
  }
3597
3615
  }, [a, t, i]), s;
3598
3616
  }
3599
- const ut = _e(
3617
+ const pt = Oe(
3600
3618
  () => {
3601
3619
  const e = Ne(), t = Ne(), n = K(0), r = Ne(), o = K(0), s = Ne(), i = Ne(), a = K(0), c = K(0), u = K(0), d = K(0), p = Ne(), h = Ne(), x = K(!1), m = K(!1), v = K(!1);
3602
3620
  return de(
@@ -3655,19 +3673,19 @@ function Sr(e, t) {
3655
3673
  if (!He(e))
3656
3674
  return t === e.k ? e.v : t < e.k ? Sr(e.l, t) : Sr(e.r, t);
3657
3675
  }
3658
- function Mt(e, t, n = "k") {
3676
+ function Ft(e, t, n = "k") {
3659
3677
  if (He(e))
3660
3678
  return [-1 / 0, void 0];
3661
3679
  if (Number(e[n]) === t)
3662
3680
  return [e.k, e.v];
3663
3681
  if (Number(e[n]) < t) {
3664
- const r = Mt(e.r, t, n);
3682
+ const r = Ft(e.r, t, n);
3665
3683
  return r[0] === -1 / 0 ? [e.k, e.v] : r;
3666
3684
  }
3667
- return Mt(e.l, t, n);
3685
+ return Ft(e.l, t, n);
3668
3686
  }
3669
- function bt(e, t, n) {
3670
- return He(e) ? Gc(t, n, 1) : t === e.k ? et(e, { k: t, v: n }) : t < e.k ? dl(et(e, { l: bt(e.l, t, n) })) : dl(et(e, { r: bt(e.r, t, n) }));
3687
+ function yt(e, t, n) {
3688
+ return He(e) ? Gc(t, n, 1) : t === e.k ? rt(e, { k: t, v: n }) : t < e.k ? dl(rt(e, { l: yt(e.l, t, n) })) : dl(rt(e, { r: yt(e.r, t, n) }));
3671
3689
  }
3672
3690
  function Un() {
3673
3691
  return yr;
@@ -3675,7 +3693,7 @@ function Un() {
3675
3693
  function Ko(e, t, n) {
3676
3694
  if (He(e))
3677
3695
  return [];
3678
- const r = Mt(e, t)[0];
3696
+ const r = Ft(e, t)[0];
3679
3697
  return rv(si(e, r, n));
3680
3698
  }
3681
3699
  function oi(e, t) {
@@ -3688,9 +3706,9 @@ function oi(e, t) {
3688
3706
  return r;
3689
3707
  {
3690
3708
  const [s, i] = Vc(r);
3691
- return ao(et(e, { k: s, l: Wc(r), v: i }));
3709
+ return ao(rt(e, { k: s, l: Wc(r), v: i }));
3692
3710
  }
3693
- } else return t < n ? ao(et(e, { l: oi(r, t) })) : ao(et(e, { r: oi(o, t) }));
3711
+ } else return t < n ? ao(rt(e, { l: oi(r, t) })) : ao(rt(e, { r: oi(o, t) }));
3694
3712
  }
3695
3713
  function Sn(e) {
3696
3714
  return He(e) ? [] : [...Sn(e.l), { k: e.k, v: e.v }, ...Sn(e.r)];
@@ -3708,12 +3726,12 @@ function ao(e) {
3708
3726
  return e;
3709
3727
  if (n > r.lvl + 1) {
3710
3728
  if (Ns(t))
3711
- return Kc(et(e, { lvl: n - 1 }));
3729
+ return Kc(rt(e, { lvl: n - 1 }));
3712
3730
  if (!He(t) && !He(t.r))
3713
- return et(t.r, {
3714
- l: et(t, { r: t.r.l }),
3731
+ return rt(t.r, {
3732
+ l: rt(t, { r: t.r.l }),
3715
3733
  lvl: n,
3716
- r: et(e, {
3734
+ r: rt(e, {
3717
3735
  l: t.r.r,
3718
3736
  lvl: n - 1
3719
3737
  })
@@ -3721,22 +3739,22 @@ function ao(e) {
3721
3739
  throw new Error("Unexpected empty nodes");
3722
3740
  } else {
3723
3741
  if (Ns(e))
3724
- return ii(et(e, { lvl: n - 1 }));
3742
+ return ii(rt(e, { lvl: n - 1 }));
3725
3743
  if (!He(r) && !He(r.l)) {
3726
3744
  const o = r.l, s = Ns(o) ? r.lvl - 1 : r.lvl;
3727
- return et(o, {
3728
- l: et(e, {
3745
+ return rt(o, {
3746
+ l: rt(e, {
3729
3747
  lvl: n - 1,
3730
3748
  r: o.l
3731
3749
  }),
3732
3750
  lvl: o.lvl + 1,
3733
- r: ii(et(r, { l: o.r, lvl: s }))
3751
+ r: ii(rt(r, { l: o.r, lvl: s }))
3734
3752
  });
3735
3753
  } else
3736
3754
  throw new Error("Unexpected empty nodes");
3737
3755
  }
3738
3756
  }
3739
- function et(e, t) {
3757
+ function rt(e, t) {
3740
3758
  return Gc(
3741
3759
  t.k !== void 0 ? t.k : e.k,
3742
3760
  t.v !== void 0 ? t.v : e.v,
@@ -3746,7 +3764,7 @@ function et(e, t) {
3746
3764
  );
3747
3765
  }
3748
3766
  function Wc(e) {
3749
- return He(e.r) ? e.l : ao(et(e, { r: Wc(e.r) }));
3767
+ return He(e.r) ? e.l : ao(rt(e, { r: Wc(e.r) }));
3750
3768
  }
3751
3769
  function Ns(e) {
3752
3770
  return He(e) || e.lvl > e.r.lvl;
@@ -3762,11 +3780,11 @@ function dl(e) {
3762
3780
  }
3763
3781
  function Kc(e) {
3764
3782
  const { l: t } = e;
3765
- return !He(t) && t.lvl === e.lvl ? et(t, { r: et(e, { l: t.r }) }) : e;
3783
+ return !He(t) && t.lvl === e.lvl ? rt(t, { r: rt(e, { l: t.r }) }) : e;
3766
3784
  }
3767
3785
  function ii(e) {
3768
3786
  const { lvl: t, r: n } = e;
3769
- return !He(n) && !He(n.r) && n.lvl === t && n.r.lvl === t ? et(n, { l: et(e, { r: n.l }), lvl: t + 1 }) : e;
3787
+ return !He(n) && !He(n.r) && n.lvl === t && n.r.lvl === t ? rt(n, { l: rt(e, { r: n.l }), lvl: t + 1 }) : e;
3770
3788
  }
3771
3789
  function rv(e) {
3772
3790
  return Uc(e, ({ k: t, v: n }) => ({ index: t, value: n }));
@@ -3777,7 +3795,7 @@ function Yc(e, t) {
3777
3795
  function Cr(e, t) {
3778
3796
  return !!(e && e[0] === t[0] && e[1] === t[1]);
3779
3797
  }
3780
- const Bi = _e(
3798
+ const Bi = Oe(
3781
3799
  () => ({ recalcInProgress: K(!1) }),
3782
3800
  [],
3783
3801
  { singleton: !0 }
@@ -3832,7 +3850,7 @@ function iv(e, t) {
3832
3850
  for (const r of t) {
3833
3851
  const { endIndex: o, size: s, startIndex: i } = r;
3834
3852
  if (n = Math.min(n, i), He(e)) {
3835
- e = bt(e, 0, s);
3853
+ e = yt(e, 0, s);
3836
3854
  continue;
3837
3855
  }
3838
3856
  const a = Ko(e, i - 1, o + 1);
@@ -3840,8 +3858,8 @@ function iv(e, t) {
3840
3858
  continue;
3841
3859
  let c = !1, u = !1;
3842
3860
  for (const { end: d, start: p, value: h } of a)
3843
- c ? (o >= p || s === h) && (e = oi(e, p)) : (u = h !== s, c = !0), d > o && o >= p && h !== s && (e = bt(e, o + 1, h));
3844
- u && (e = bt(e, i, s));
3861
+ c ? (o >= p || s === h) && (e = oi(e, p)) : (u = h !== s, c = !0), d > o && o >= p && h !== s && (e = yt(e, o + 1, h));
3862
+ u && (e = yt(e, i, s));
3845
3863
  }
3846
3864
  return [e, n];
3847
3865
  }
@@ -3878,12 +3896,12 @@ function cv(e, t, n, r = 0) {
3878
3896
  return r > 0 && (t = Math.max(t, Xc(e, r, Hi).offset)), Uc(ov(e, t, n, lv), fv);
3879
3897
  }
3880
3898
  function uv(e, [t, n, r, o]) {
3881
- t.length > 0 && r("received item sizes", t, mt.DEBUG);
3899
+ t.length > 0 && r("received item sizes", t, vt.DEBUG);
3882
3900
  const s = e.sizeTree;
3883
3901
  let i = s, a = 0;
3884
3902
  if (n.length > 0 && He(s) && t.length === 2) {
3885
3903
  const h = t[0].size, x = t[1].size;
3886
- i = n.reduce((m, v) => bt(bt(m, v, h), v + 1, x), i);
3904
+ i = n.reduce((m, v) => yt(yt(m, v, h), v + 1, x), i);
3887
3905
  } else
3888
3906
  [i, a] = iv(i, t);
3889
3907
  if (i === s)
@@ -3891,7 +3909,7 @@ function uv(e, [t, n, r, o]) {
3891
3909
  const { lastIndex: c, lastOffset: u, lastSize: d, offsetTree: p } = ai(e.offsetTree, a, i, o);
3892
3910
  return {
3893
3911
  groupIndices: n,
3894
- groupOffsetTree: n.reduce((h, x) => bt(h, x, Tr(x, p, o)), Un()),
3912
+ groupOffsetTree: n.reduce((h, x) => yt(h, x, Tr(x, p, o)), Un()),
3895
3913
  lastIndex: c,
3896
3914
  lastOffset: u,
3897
3915
  lastSize: d,
@@ -3915,8 +3933,8 @@ function ai(e, t, n, r) {
3915
3933
  let o = e, s = 0, i = 0, a = 0, c = 0;
3916
3934
  if (t !== 0) {
3917
3935
  c = To(o, t - 1, Hi), a = o[c].offset;
3918
- const u = Mt(n, t - 1);
3919
- s = u[0], i = u[1], o.length && o[c].size === Mt(n, t)[1] && (c -= 1), o = o.slice(0, c + 1);
3936
+ const u = Ft(n, t - 1);
3937
+ s = u[0], i = u[1], o.length && o[c].size === Ft(n, t)[1] && (c -= 1), o = o.slice(0, c + 1);
3920
3938
  } else
3921
3939
  o = [];
3922
3940
  for (const { start: u, value: d } of Ko(n, t, 1 / 0)) {
@@ -3944,16 +3962,16 @@ function pv(e) {
3944
3962
  const hv = {
3945
3963
  offsetHeight: "height",
3946
3964
  offsetWidth: "width"
3947
- }, Xt = _e(
3965
+ }, Jt = Oe(
3948
3966
  ([{ log: e }, { recalcInProgress: t }]) => {
3949
- const n = Ne(), r = Ne(), o = it(r, 0), s = Ne(), i = Ne(), a = K(0), c = K([]), u = K(void 0), d = K(void 0), p = K((S, C) => cn(S, hv[C])), h = K(void 0), x = K(0), m = sv(), v = it(
3950
- B(n, Te(c, e, x), Vt(uv, m), ze()),
3967
+ const n = Ne(), r = Ne(), o = ct(r, 0), s = Ne(), i = Ne(), a = K(0), c = K([]), u = K(void 0), d = K(void 0), p = K((S, C) => cn(S, hv[C])), h = K(void 0), x = K(0), m = sv(), v = ct(
3968
+ B(n, Te(c, e, x), Kt(uv, m), $e()),
3951
3969
  m
3952
- ), g = it(
3970
+ ), g = ct(
3953
3971
  B(
3954
3972
  c,
3955
- ze(),
3956
- Vt((S, C) => ({ current: C, prev: S.current }), {
3973
+ $e(),
3974
+ Kt((S, C) => ({ current: C, prev: S.current }), {
3957
3975
  current: [],
3958
3976
  prev: []
3959
3977
  }),
@@ -3967,7 +3985,7 @@ const hv = {
3967
3985
  me((S) => S.length > 0),
3968
3986
  Te(v, x),
3969
3987
  oe(([S, C, E]) => {
3970
- const I = S.reduce((j, P, D) => bt(j, P, Tr(P, C.offsetTree, E) || D), Un());
3988
+ const I = S.reduce((j, P, D) => yt(j, P, Tr(P, C.offsetTree, E) || D), Un());
3971
3989
  return {
3972
3990
  ...C,
3973
3991
  groupIndices: S,
@@ -3991,7 +4009,7 @@ const hv = {
3991
4009
  ),
3992
4010
  n
3993
4011
  ), de(u, d);
3994
- const w = it(
4012
+ const w = ct(
3995
4013
  B(
3996
4014
  u,
3997
4015
  oe((S) => S === void 0)
@@ -4006,11 +4024,11 @@ const hv = {
4006
4024
  ),
4007
4025
  n
4008
4026
  );
4009
- const b = wt(
4027
+ const b = St(
4010
4028
  B(
4011
4029
  n,
4012
4030
  Te(v),
4013
- Vt(
4031
+ Kt(
4014
4032
  ({ sizes: S }, [C, E]) => ({
4015
4033
  changed: E !== S,
4016
4034
  sizes: E
@@ -4023,7 +4041,7 @@ const hv = {
4023
4041
  Le(
4024
4042
  B(
4025
4043
  a,
4026
- Vt(
4044
+ Kt(
4027
4045
  (S, C) => ({ diff: S.prev - C, prev: C }),
4028
4046
  { diff: 0, prev: 0 }
4029
4047
  ),
@@ -4042,10 +4060,10 @@ const hv = {
4042
4060
  S < 0 && C(
4043
4061
  "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
4044
4062
  { firstItemIndex: a },
4045
- mt.ERROR
4063
+ vt.ERROR
4046
4064
  );
4047
4065
  });
4048
- const y = wt(s);
4066
+ const y = St(s);
4049
4067
  de(
4050
4068
  B(
4051
4069
  s,
@@ -4107,7 +4125,7 @@ const hv = {
4107
4125
  ),
4108
4126
  n
4109
4127
  );
4110
- const R = wt(
4128
+ const R = St(
4111
4129
  B(
4112
4130
  i,
4113
4131
  Te(v, x),
@@ -4133,11 +4151,11 @@ const hv = {
4133
4151
  const G = j[D + 1] - H - 1;
4134
4152
  D++, P += G + 1;
4135
4153
  }
4136
- if (I = Sn(C.sizeTree).reduce((G, { k: N, v: _ }) => bt(G, Math.max(0, N + S), _), I), P !== -S) {
4154
+ if (I = Sn(C.sizeTree).reduce((G, { k: N, v: _ }) => yt(G, Math.max(0, N + S), _), I), P !== -S) {
4137
4155
  const G = Sr(C.sizeTree, H);
4138
- I = bt(I, 0, G);
4139
- const N = Mt(C.sizeTree, -S + 1)[1];
4140
- I = bt(I, 1, N);
4156
+ I = yt(I, 0, G);
4157
+ const N = Ft(C.sizeTree, -S + 1)[1];
4158
+ I = yt(I, 1, N);
4141
4159
  }
4142
4160
  return {
4143
4161
  ...C,
@@ -4145,7 +4163,7 @@ const hv = {
4145
4163
  ...ai(C.offsetTree, 0, I, E)
4146
4164
  };
4147
4165
  } else {
4148
- const I = Sn(C.sizeTree).reduce((j, { k: P, v: D }) => bt(j, Math.max(0, P + S), D), Un());
4166
+ const I = Sn(C.sizeTree).reduce((j, { k: P, v: D }) => yt(j, Math.max(0, P + S), D), Un());
4149
4167
  return {
4150
4168
  ...C,
4151
4169
  sizeTree: I,
@@ -4177,7 +4195,7 @@ const hv = {
4177
4195
  unshiftWith: s
4178
4196
  };
4179
4197
  },
4180
- Ue(hn, Bi),
4198
+ ze(hn, Bi),
4181
4199
  { singleton: !0 }
4182
4200
  );
4183
4201
  function mv(e) {
@@ -4189,9 +4207,9 @@ function mv(e) {
4189
4207
  }
4190
4208
  );
4191
4209
  }
4192
- const Zc = _e(
4210
+ const Zc = Oe(
4193
4211
  ([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
4194
- const s = Ne(), i = Ne(), a = wt(B(s, oe(mv)));
4212
+ const s = Ne(), i = Ne(), a = St(B(s, oe(mv)));
4195
4213
  return de(
4196
4214
  B(
4197
4215
  a,
@@ -4206,37 +4224,37 @@ const Zc = _e(
4206
4224
  e
4207
4225
  ), de(
4208
4226
  B(
4209
- Qe(o, t, r),
4227
+ tt(o, t, r),
4210
4228
  me(([c, u]) => Yo(u)),
4211
- oe(([c, u, d]) => Mt(u.groupOffsetTree, Math.max(c - d, 0), "v")[0]),
4212
- ze(),
4229
+ oe(([c, u, d]) => Ft(u.groupOffsetTree, Math.max(c - d, 0), "v")[0]),
4230
+ $e(),
4213
4231
  oe((c) => [c])
4214
4232
  ),
4215
4233
  i
4216
4234
  ), { groupCounts: s, topItemsIndexes: i };
4217
4235
  },
4218
- Ue(Xt, ut)
4219
- ), mn = _e(
4236
+ ze(Jt, pt)
4237
+ ), mn = Oe(
4220
4238
  ([{ log: e }]) => {
4221
- const t = K(!1), n = wt(
4239
+ const t = K(!1), n = St(
4222
4240
  B(
4223
4241
  t,
4224
4242
  me((r) => r),
4225
- ze()
4243
+ $e()
4226
4244
  )
4227
4245
  );
4228
4246
  return Le(t, (r) => {
4229
- r && Xe(e)("props updated", {}, mt.DEBUG);
4247
+ r && Xe(e)("props updated", {}, vt.DEBUG);
4230
4248
  }), { didMount: n, propsReady: t };
4231
4249
  },
4232
- Ue(hn),
4250
+ ze(hn),
4233
4251
  { singleton: !0 }
4234
4252
  ), gv = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
4235
4253
  function Qc(e) {
4236
4254
  const t = typeof e == "number" ? { index: e } : e;
4237
4255
  return t.align || (t.align = "start"), (!t.behavior || !gv) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
4238
4256
  }
4239
- const Lr = _e(
4257
+ const Lr = Oe(
4240
4258
  ([
4241
4259
  { gap: e, listRefresh: t, sizes: n, totalCount: r },
4242
4260
  {
@@ -4270,22 +4288,22 @@ const Lr = _e(
4270
4288
  ]) => {
4271
4289
  const _ = Qc(R), { align: M, behavior: V, offset: F } = _, O = E - 1, z = Jc(_, S, O);
4272
4290
  let Q = Tr(z, S.offsetTree, H) + j;
4273
- M === "end" ? (Q += G + Mt(S.sizeTree, z)[1] - C + N, z === O && (Q += P)) : M === "center" ? Q += (G + Mt(S.sizeTree, z)[1] - C + N) / 2 : Q -= I, F && (Q += F);
4291
+ M === "end" ? (Q += G + Ft(S.sizeTree, z)[1] - C + N, z === O && (Q += P)) : M === "center" ? Q += (G + Ft(S.sizeTree, z)[1] - C + N) / 2 : Q -= I, F && (Q += F);
4274
4292
  const ae = (U) => {
4275
- y(), U ? (D("retrying to scroll to", { location: R }, mt.DEBUG), Ce(x, R)) : (Ce(m, !0), D("list did not change, scroll successful", {}, mt.DEBUG));
4293
+ y(), U ? (D("retrying to scroll to", { location: R }, vt.DEBUG), Ce(x, R)) : (Ce(m, !0), D("list did not change, scroll successful", {}, vt.DEBUG));
4276
4294
  };
4277
4295
  if (y(), V === "smooth") {
4278
4296
  let U = !1;
4279
4297
  b = Le(t, (ee) => {
4280
4298
  U = U || ee;
4281
- }), g = _t(d, () => {
4299
+ }), g = Dt(d, () => {
4282
4300
  ae(U);
4283
4301
  });
4284
4302
  } else
4285
- g = _t(B(t, vv(150)), ae);
4303
+ g = Dt(B(t, vv(150)), ae);
4286
4304
  return w = setTimeout(() => {
4287
4305
  y();
4288
- }, 1200), Ce(c, !0), D("scrolling from index to", { behavior: V, index: z, top: Q }, mt.DEBUG), { behavior: V, top: Q };
4306
+ }, 1200), Ce(c, !0), D("scrolling from index to", { behavior: V, index: z, top: Q }, vt.DEBUG), { behavior: V, top: Q };
4289
4307
  }
4290
4308
  )
4291
4309
  ),
@@ -4296,7 +4314,7 @@ const Lr = _e(
4296
4314
  topListHeight: v
4297
4315
  };
4298
4316
  },
4299
- Ue(Xt, ut, hn),
4317
+ ze(Jt, pt, hn),
4300
4318
  { singleton: !0 }
4301
4319
  );
4302
4320
  function vv(e) {
@@ -4318,7 +4336,7 @@ function zi(e, t) {
4318
4336
  const n = t - 1;
4319
4337
  return typeof e == "number" ? e : e.index === "LAST" ? n : e.index;
4320
4338
  }
4321
- const Fr = _e(
4339
+ const Fr = Oe(
4322
4340
  ([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: o, scrollToIndex: s }, { didMount: i }]) => {
4323
4341
  const a = K(!0), c = K(0), u = K(!0);
4324
4342
  return de(
@@ -4326,7 +4344,7 @@ const Fr = _e(
4326
4344
  i,
4327
4345
  Te(c),
4328
4346
  me(([d, p]) => !!p),
4329
- Ut(!1)
4347
+ Vt(!1)
4330
4348
  ),
4331
4349
  a
4332
4350
  ), de(
@@ -4334,21 +4352,21 @@ const Fr = _e(
4334
4352
  i,
4335
4353
  Te(c),
4336
4354
  me(([d, p]) => !!p),
4337
- Ut(!1)
4355
+ Vt(!1)
4338
4356
  ),
4339
4357
  u
4340
4358
  ), Le(
4341
4359
  B(
4342
- Qe(t, i),
4360
+ tt(t, i),
4343
4361
  Te(a, n, e, u),
4344
4362
  me(([[, d], p, { sizeTree: h }, x, m]) => d && (!He(h) || Di(x)) && !p && !m),
4345
4363
  Te(c)
4346
4364
  ),
4347
4365
  ([, d]) => {
4348
- _t(o, () => {
4366
+ Dt(o, () => {
4349
4367
  Ce(u, !0);
4350
4368
  }), $i(4, () => {
4351
- _t(r, () => {
4369
+ Dt(r, () => {
4352
4370
  Ce(a, !0);
4353
4371
  }), Ce(s, d);
4354
4372
  });
@@ -4359,7 +4377,7 @@ const Fr = _e(
4359
4377
  scrolledToInitialItem: a
4360
4378
  };
4361
4379
  },
4362
- Ue(Xt, ut, Lr, mn),
4380
+ ze(Jt, pt, Lr, mn),
4363
4381
  { singleton: !0 }
4364
4382
  );
4365
4383
  function eu(e, t) {
@@ -4374,29 +4392,29 @@ const Er = "up", mr = "down", xv = "none", bv = {
4374
4392
  scrollTop: 0,
4375
4393
  viewportHeight: 0
4376
4394
  }
4377
- }, wv = 0, Br = _e(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
4378
- const i = K(!1), a = K(!0), c = Ne(), u = Ne(), d = K(4), p = K(wv), h = it(
4395
+ }, wv = 0, Br = Oe(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
4396
+ const i = K(!1), a = K(!0), c = Ne(), u = Ne(), d = K(4), p = K(wv), h = ct(
4379
4397
  B(
4380
- ri(B(he(o), En(1), Ut(!0)), B(he(o), En(1), Ut(!1), cl(100))),
4381
- ze()
4398
+ ri(B(he(o), En(1), Vt(!0)), B(he(o), En(1), Vt(!1), cl(100))),
4399
+ $e()
4382
4400
  ),
4383
4401
  !1
4384
- ), x = it(
4385
- B(ri(B(n, Ut(!0)), B(n, Ut(!1), cl(200))), ze()),
4402
+ ), x = ct(
4403
+ B(ri(B(n, Vt(!0)), B(n, Vt(!1), cl(200))), $e()),
4386
4404
  !1
4387
4405
  );
4388
4406
  de(
4389
4407
  B(
4390
- Qe(he(o), he(p)),
4408
+ tt(he(o), he(p)),
4391
4409
  oe(([b, y]) => b <= y),
4392
- ze()
4410
+ $e()
4393
4411
  ),
4394
4412
  a
4395
- ), de(B(a, Qt(50)), u);
4396
- const m = wt(
4413
+ ), de(B(a, tn(50)), u);
4414
+ const m = St(
4397
4415
  B(
4398
- Qe(r, he(s), he(t), he(e), he(d)),
4399
- Vt((b, [{ scrollHeight: y, scrollTop: R }, S, C, E, I]) => {
4416
+ tt(r, he(s), he(t), he(e), he(d)),
4417
+ Kt((b, [{ scrollHeight: y, scrollTop: R }, S, C, E, I]) => {
4400
4418
  const j = R + S - y > -I, P = {
4401
4419
  scrollHeight: y,
4402
4420
  scrollTop: R,
@@ -4418,12 +4436,12 @@ const Er = "up", mr = "down", xv = "none", bv = {
4418
4436
  state: P
4419
4437
  };
4420
4438
  }, bv),
4421
- ze((b, y) => b && b.atBottom === y.atBottom)
4439
+ $e((b, y) => b && b.atBottom === y.atBottom)
4422
4440
  )
4423
- ), v = it(
4441
+ ), v = ct(
4424
4442
  B(
4425
4443
  r,
4426
- Vt(
4444
+ Kt(
4427
4445
  (b, { scrollHeight: y, scrollTop: R, viewportHeight: S }) => {
4428
4446
  if (eu(b.scrollHeight, y))
4429
4447
  return {
@@ -4460,36 +4478,36 @@ const Er = "up", mr = "down", xv = "none", bv = {
4460
4478
  oe((b) => b.atBottom)
4461
4479
  ),
4462
4480
  i
4463
- ), de(B(i, Qt(50)), c);
4481
+ ), de(B(i, tn(50)), c);
4464
4482
  const g = K(mr);
4465
4483
  de(
4466
4484
  B(
4467
4485
  r,
4468
4486
  oe(({ scrollTop: b }) => b),
4469
- ze(),
4470
- Vt(
4487
+ $e(),
4488
+ Kt(
4471
4489
  (b, y) => Xe(x) ? { direction: b.direction, prevScrollTop: y } : { direction: y < b.prevScrollTop ? Er : mr, prevScrollTop: y },
4472
4490
  { direction: mr, prevScrollTop: 0 }
4473
4491
  ),
4474
4492
  oe((b) => b.direction)
4475
4493
  ),
4476
4494
  g
4477
- ), de(B(r, Qt(50), Ut(xv)), g);
4495
+ ), de(B(r, tn(50), Vt(xv)), g);
4478
4496
  const w = K(0);
4479
4497
  return de(
4480
4498
  B(
4481
4499
  h,
4482
4500
  me((b) => !b),
4483
- Ut(0)
4501
+ Vt(0)
4484
4502
  ),
4485
4503
  w
4486
4504
  ), de(
4487
4505
  B(
4488
4506
  o,
4489
- Qt(100),
4507
+ tn(100),
4490
4508
  Te(h),
4491
4509
  me(([b, y]) => !!y),
4492
- Vt(([b, y], [R]) => [y, R], [0, 0]),
4510
+ Kt(([b, y], [R]) => [y, R], [0, 0]),
4493
4511
  oe(([b, y]) => y - b)
4494
4512
  ),
4495
4513
  w
@@ -4506,7 +4524,7 @@ const Er = "up", mr = "down", xv = "none", bv = {
4506
4524
  scrollDirection: g,
4507
4525
  scrollVelocity: w
4508
4526
  };
4509
- }, Ue(ut)), Eo = "top", Ro = "bottom", pl = "none";
4527
+ }, ze(pt)), Eo = "top", Ro = "bottom", pl = "none";
4510
4528
  function hl(e, t, n) {
4511
4529
  return typeof e == "number" ? n === Er && t === Eo || n === mr && t === Ro ? e : 0 : n === Er ? t === Eo ? e.main : e.reverse : t === Ro ? e.main : e.reverse;
4512
4530
  }
@@ -4514,11 +4532,11 @@ function ml(e, t) {
4514
4532
  var n;
4515
4533
  return typeof e == "number" ? e : (n = e[t]) != null ? n : 0;
4516
4534
  }
4517
- const Ui = _e(
4535
+ const Ui = Oe(
4518
4536
  ([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
4519
- const s = Ne(), i = K(0), a = K(0), c = K(0), u = it(
4537
+ const s = Ne(), i = K(0), a = K(0), c = K(0), u = ct(
4520
4538
  B(
4521
- Qe(
4539
+ tt(
4522
4540
  he(r),
4523
4541
  he(o),
4524
4542
  he(n),
@@ -4551,7 +4569,7 @@ const Ui = _e(
4551
4569
  }
4552
4570
  ),
4553
4571
  me((d) => d != null),
4554
- ze(Cr)
4572
+ $e(Cr)
4555
4573
  ),
4556
4574
  [0, 0]
4557
4575
  );
@@ -4565,14 +4583,14 @@ const Ui = _e(
4565
4583
  visibleRange: u
4566
4584
  };
4567
4585
  },
4568
- Ue(ut),
4586
+ ze(pt),
4569
4587
  { singleton: !0 }
4570
4588
  );
4571
4589
  function yv(e, t, n) {
4572
4590
  if (Yo(t)) {
4573
4591
  const r = qc(e, t);
4574
4592
  return [
4575
- { index: Mt(t.groupOffsetTree, r)[0], offset: 0, size: 0 },
4593
+ { index: Ft(t.groupOffsetTree, r)[0], offset: 0, size: 0 },
4576
4594
  { data: n == null ? void 0 : n[0], index: r, offset: 0, size: 0 }
4577
4595
  ];
4578
4596
  }
@@ -4652,7 +4670,7 @@ function gl(e, t, n) {
4652
4670
  }
4653
4671
  return s;
4654
4672
  }
4655
- const Pn = _e(
4673
+ const Pn = Oe(
4656
4674
  ([
4657
4675
  { data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: o },
4658
4676
  s,
@@ -4665,9 +4683,9 @@ const Pn = _e(
4665
4683
  ]) => {
4666
4684
  const v = K([]), g = K(0), w = Ne();
4667
4685
  de(s.topItemsIndexes, v);
4668
- const b = it(
4686
+ const b = ct(
4669
4687
  B(
4670
- Qe(
4688
+ tt(
4671
4689
  x,
4672
4690
  m,
4673
4691
  he(c, Cr),
@@ -4748,7 +4766,7 @@ const Pn = _e(
4748
4766
  ),
4749
4767
  //@ts-expect-error filter needs to be fixed
4750
4768
  me((C) => C !== null),
4751
- ze()
4769
+ $e()
4752
4770
  ),
4753
4771
  As
4754
4772
  );
@@ -4778,25 +4796,25 @@ const Pn = _e(
4778
4796
  ),
4779
4797
  w
4780
4798
  );
4781
- const y = wt(
4799
+ const y = St(
4782
4800
  B(
4783
4801
  b,
4784
4802
  me(({ items: C }) => C.length > 0),
4785
4803
  Te(o, e),
4786
4804
  me(([{ items: C }, E]) => C[C.length - 1].originalIndex === E - 1),
4787
4805
  oe(([, C, E]) => [C - 1, E]),
4788
- ze(Cr),
4806
+ $e(Cr),
4789
4807
  oe(([C]) => C)
4790
4808
  )
4791
- ), R = wt(
4809
+ ), R = St(
4792
4810
  B(
4793
4811
  b,
4794
- Qt(200),
4812
+ tn(200),
4795
4813
  me(({ items: C, topItems: E }) => C.length > 0 && C[0].originalIndex === E.length),
4796
4814
  oe(({ items: C }) => C[0].index),
4797
- ze()
4815
+ $e()
4798
4816
  )
4799
- ), S = wt(
4817
+ ), S = St(
4800
4818
  B(
4801
4819
  b,
4802
4820
  me(({ items: C }) => C.length > 0),
@@ -4811,13 +4829,13 @@ const Pn = _e(
4811
4829
  startIndex: C[E].index
4812
4830
  };
4813
4831
  }),
4814
- ze(Yc)
4832
+ $e(Yc)
4815
4833
  )
4816
4834
  );
4817
4835
  return { endReached: y, initialItemCount: g, itemsRendered: w, listState: b, rangeChanged: S, startReached: R, topItemsIndexes: v, ...h };
4818
4836
  },
4819
- Ue(
4820
- Xt,
4837
+ ze(
4838
+ Jt,
4821
4839
  Zc,
4822
4840
  Ui,
4823
4841
  Fr,
@@ -4827,36 +4845,36 @@ const Pn = _e(
4827
4845
  Bi
4828
4846
  ),
4829
4847
  { singleton: !0 }
4830
- ), nu = _e(
4848
+ ), nu = Oe(
4831
4849
  ([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
4832
- const s = Ne(), i = it(
4850
+ const s = Ne(), i = ct(
4833
4851
  B(
4834
- Qe(n, e, r, t, o),
4852
+ tt(n, e, r, t, o),
4835
4853
  oe(([a, c, u, d, p]) => a + c + u + d + p.offsetBottom + p.bottom)
4836
4854
  ),
4837
4855
  0
4838
4856
  );
4839
4857
  return de(he(i), s), { totalListHeight: i, totalListHeightChanged: s };
4840
4858
  },
4841
- Ue(ut, Pn),
4859
+ ze(pt, Pn),
4842
4860
  { singleton: !0 }
4843
- ), Sv = _e(
4861
+ ), Sv = Oe(
4844
4862
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
4845
- const n = K(!1), r = it(
4863
+ const n = K(!1), r = ct(
4846
4864
  B(
4847
- Qe(n, e, t),
4865
+ tt(n, e, t),
4848
4866
  me(([o]) => o),
4849
4867
  oe(([, o, s]) => Math.max(0, o - s)),
4850
- Qt(0),
4851
- ze()
4868
+ tn(0),
4869
+ $e()
4852
4870
  ),
4853
4871
  0
4854
4872
  );
4855
4873
  return { alignToBottom: n, paddingTopAddition: r };
4856
4874
  },
4857
- Ue(ut, nu),
4875
+ ze(pt, nu),
4858
4876
  { singleton: !0 }
4859
- ), ru = _e(() => ({
4877
+ ), ru = Oe(() => ({
4860
4878
  context: K(null)
4861
4879
  })), Cv = ({
4862
4880
  itemBottom: e,
@@ -4864,7 +4882,7 @@ const Pn = _e(
4864
4882
  locationParams: { align: n, behavior: r, ...o },
4865
4883
  viewportBottom: s,
4866
4884
  viewportTop: i
4867
- }) => t < i ? { ...o, align: n ?? "start", behavior: r } : e > s ? { ...o, align: n ?? "end", behavior: r } : null, ou = _e(
4885
+ }) => t < i ? { ...o, align: n ?? "start", behavior: r } : e > s ? { ...o, align: n ?? "end", behavior: r } : null, ou = Oe(
4868
4886
  ([
4869
4887
  { gap: e, sizes: t, totalCount: n },
4870
4888
  { fixedFooterHeight: r, fixedHeaderHeight: o, headerHeight: s, scrollingInProgress: i, scrollTop: a, viewportHeight: c },
@@ -4877,14 +4895,14 @@ const Pn = _e(
4877
4895
  Te(t, c, n, s, o, r, a),
4878
4896
  Te(e),
4879
4897
  oe(([[p, h, x, m, v, g, w, b], y]) => {
4880
- const { align: R, behavior: S, calculateViewLocation: C = Cv, done: E, ...I } = p, j = Jc(p, h, m - 1), P = Tr(j, h.offsetTree, y) + v + g, D = P + Mt(h.sizeTree, j)[1], H = b + g, G = b + x - w, N = C({
4898
+ const { align: R, behavior: S, calculateViewLocation: C = Cv, done: E, ...I } = p, j = Jc(p, h, m - 1), P = Tr(j, h.offsetTree, y) + v + g, D = P + Ft(h.sizeTree, j)[1], H = b + g, G = b + x - w, N = C({
4881
4899
  itemBottom: D,
4882
4900
  itemTop: P,
4883
4901
  locationParams: { align: R, behavior: S, ...I },
4884
4902
  viewportBottom: G,
4885
4903
  viewportTop: H
4886
4904
  });
4887
- return N ? E && _t(
4905
+ return N ? E && Dt(
4888
4906
  B(
4889
4907
  i,
4890
4908
  me((_) => !_),
@@ -4902,13 +4920,13 @@ const Pn = _e(
4902
4920
  scrollIntoView: d
4903
4921
  };
4904
4922
  },
4905
- Ue(Xt, ut, Lr, Pn, hn),
4923
+ ze(Jt, pt, Lr, Pn, hn),
4906
4924
  { singleton: !0 }
4907
4925
  );
4908
4926
  function vl(e) {
4909
4927
  return e ? e === "smooth" ? "smooth" : "auto" : !1;
4910
4928
  }
4911
- const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
4929
+ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = Oe(
4912
4930
  ([
4913
4931
  { listRefresh: e, totalCount: t, fixedItemSize: n, data: r },
4914
4932
  { atBottomState: o, isAtBottom: s },
@@ -4931,7 +4949,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
4931
4949
  }
4932
4950
  Le(
4933
4951
  B(
4934
- Qe(B(he(t), En(1)), c),
4952
+ tt(B(he(t), En(1)), c),
4935
4953
  Te(he(m), s, a, p),
4936
4954
  oe(([[S, C], E, I, j, P]) => {
4937
4955
  let D = C && j, H = "auto";
@@ -4941,23 +4959,23 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
4941
4959
  ),
4942
4960
  ({ followOutputBehavior: S, totalCount: C }) => {
4943
4961
  g && (g(), g = null), Xe(n) ? requestAnimationFrame(() => {
4944
- Xe(d)("following output to ", { totalCount: C }, mt.DEBUG), w(S);
4945
- }) : g = _t(e, () => {
4946
- Xe(d)("following output to ", { totalCount: C }, mt.DEBUG), w(S), g = null;
4962
+ Xe(d)("following output to ", { totalCount: C }, vt.DEBUG), w(S);
4963
+ }) : g = Dt(e, () => {
4964
+ Xe(d)("following output to ", { totalCount: C }, vt.DEBUG), w(S), g = null;
4947
4965
  });
4948
4966
  }
4949
4967
  );
4950
4968
  function b(S) {
4951
- const C = _t(o, (E) => {
4952
- S && !E.atBottom && E.notAtBottomBecause === "SIZE_INCREASED" && !g && (Xe(d)("scrolling to bottom due to increased size", {}, mt.DEBUG), w("auto"));
4969
+ const C = Dt(o, (E) => {
4970
+ S && !E.atBottom && E.notAtBottomBecause === "SIZE_INCREASED" && !g && (Xe(d)("scrolling to bottom due to increased size", {}, vt.DEBUG), w("auto"));
4953
4971
  });
4954
4972
  setTimeout(C, 100);
4955
4973
  }
4956
4974
  Le(
4957
4975
  B(
4958
- Qe(he(m), t, u),
4976
+ tt(he(m), t, u),
4959
4977
  me(([S, , C]) => S && C),
4960
- Vt(
4978
+ Kt(
4961
4979
  ({ value: S }, [, C]) => ({ refreshed: S === C, value: C }),
4962
4980
  { refreshed: !1, value: 0 }
4963
4981
  ),
@@ -4969,7 +4987,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
4969
4987
  }
4970
4988
  ), Le(v, () => {
4971
4989
  b(Xe(m) !== !1);
4972
- }), Le(Qe(he(m), o), ([S, C]) => {
4990
+ }), Le(tt(he(m), o), ([S, C]) => {
4973
4991
  S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && w("auto");
4974
4992
  });
4975
4993
  const y = K(null), R = Ne();
@@ -4987,33 +5005,33 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
4987
5005
  R
4988
5006
  ), Le(
4989
5007
  B(
4990
- Qe(B(R, En(1)), c),
5008
+ tt(B(R, En(1)), c),
4991
5009
  Te(he(y), a, p, h),
4992
5010
  oe(([[S, C], E, I, j, P]) => C && I && (E == null ? void 0 : E({ context: P, totalCount: S, scrollingInProgress: j }))),
4993
5011
  me((S) => !!S),
4994
- Qt(0)
5012
+ tn(0)
4995
5013
  ),
4996
5014
  (S) => {
4997
5015
  g && (g(), g = null), Xe(n) ? requestAnimationFrame(() => {
4998
5016
  Xe(d)("scrolling into view", {}), Ce(x, S);
4999
- }) : g = _t(e, () => {
5017
+ }) : g = Dt(e, () => {
5000
5018
  Xe(d)("scrolling into view", {}), Ce(x, S), g = null;
5001
5019
  });
5002
5020
  }
5003
5021
  ), { autoscrollToBottom: v, followOutput: m, scrollIntoViewOnChange: y };
5004
5022
  },
5005
- Ue(
5006
- Xt,
5023
+ ze(
5024
+ Jt,
5007
5025
  Br,
5008
5026
  Lr,
5009
5027
  Fr,
5010
5028
  mn,
5011
5029
  hn,
5012
- ut,
5030
+ pt,
5013
5031
  ru,
5014
5032
  ou
5015
5033
  )
5016
- ), Rv = _e(
5034
+ ), Rv = Oe(
5017
5035
  ([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: i }, { didMount: a }]) => (de(
5018
5036
  B(
5019
5037
  a,
@@ -5024,9 +5042,9 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5024
5042
  ),
5025
5043
  i
5026
5044
  ), {}),
5027
- Ue(Xt, Fr, Pn, mn),
5045
+ ze(Jt, Fr, Pn, mn),
5028
5046
  { singleton: !0 }
5029
- ), Iv = _e(
5047
+ ), Iv = Oe(
5030
5048
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
5031
5049
  const r = K(0);
5032
5050
  return Le(
@@ -5037,7 +5055,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5037
5055
  oe(([, o]) => ({ top: o }))
5038
5056
  ),
5039
5057
  (o) => {
5040
- _t(
5058
+ Dt(
5041
5059
  B(
5042
5060
  n,
5043
5061
  En(1),
@@ -5054,9 +5072,9 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5054
5072
  initialScrollTop: r
5055
5073
  };
5056
5074
  },
5057
- Ue(mn, ut, Pn),
5075
+ ze(mn, pt, Pn),
5058
5076
  { singleton: !0 }
5059
- ), su = _e(
5077
+ ), su = Oe(
5060
5078
  ([{ scrollVelocity: e }]) => {
5061
5079
  const t = K(!1), n = Ne(), r = K(!1);
5062
5080
  return de(
@@ -5073,23 +5091,23 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5073
5091
  return !0;
5074
5092
  return i;
5075
5093
  }),
5076
- ze()
5094
+ $e()
5077
5095
  ),
5078
5096
  t
5079
5097
  ), Le(
5080
- B(Qe(t, e, n), Te(r)),
5098
+ B(tt(t, e, n), Te(r)),
5081
5099
  ([[o, s, i], a]) => {
5082
5100
  o && a && a.change && a.change(s, i);
5083
5101
  }
5084
5102
  ), { isSeeking: t, scrollSeekConfiguration: r, scrollSeekRangeChanged: n, scrollVelocity: e };
5085
5103
  },
5086
- Ue(Br),
5104
+ ze(Br),
5087
5105
  { singleton: !0 }
5088
- ), Wi = _e(([{ scrollContainerState: e, scrollTo: t }]) => {
5106
+ ), Wi = Oe(([{ scrollContainerState: e, scrollTo: t }]) => {
5089
5107
  const n = Ne(), r = Ne(), o = Ne(), s = K(!1), i = K(void 0);
5090
5108
  return de(
5091
5109
  B(
5092
- Qe(n, r),
5110
+ tt(n, r),
5093
5111
  oe(([{ scrollHeight: a, scrollTop: c, viewportHeight: u }, { offsetTop: d }]) => ({
5094
5112
  scrollHeight: a,
5095
5113
  scrollTop: Math.max(0, c - d),
@@ -5117,7 +5135,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5117
5135
  windowScrollTo: o,
5118
5136
  windowViewportRect: r
5119
5137
  };
5120
- }, Ue(ut)), Nv = _e(
5138
+ }, ze(pt)), Nv = Oe(
5121
5139
  ([
5122
5140
  { sizeRanges: e, sizes: t },
5123
5141
  { headerHeight: n, scrollTop: r },
@@ -5140,7 +5158,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5140
5158
  s,
5141
5159
  Te(d),
5142
5160
  me(([, x]) => x !== void 0),
5143
- ze(),
5161
+ $e(),
5144
5162
  oe(([, x]) => x.ranges)
5145
5163
  ),
5146
5164
  e
@@ -5149,12 +5167,12 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5149
5167
  restoreStateFrom: d
5150
5168
  };
5151
5169
  },
5152
- Ue(Xt, ut, Fr, mn, Wi)
5170
+ ze(Jt, pt, Fr, mn, Wi)
5153
5171
  );
5154
5172
  function Av(e) {
5155
5173
  return { align: "start", index: 0, offset: e.scrollTop };
5156
5174
  }
5157
- const jv = _e(([{ topItemsIndexes: e }]) => {
5175
+ const jv = Oe(([{ topItemsIndexes: e }]) => {
5158
5176
  const t = K(0);
5159
5177
  return de(
5160
5178
  B(
@@ -5164,12 +5182,12 @@ const jv = _e(([{ topItemsIndexes: e }]) => {
5164
5182
  ),
5165
5183
  e
5166
5184
  ), { topItemCount: t };
5167
- }, Ue(Pn));
5185
+ }, ze(Pn));
5168
5186
  function iu(e) {
5169
5187
  let t = !1, n;
5170
5188
  return () => (t || (t = !0, n = e()), n);
5171
5189
  }
5172
- const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), kv = _e(
5190
+ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), kv = Oe(
5173
5191
  ([
5174
5192
  { deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
5175
5193
  { isAtBottom: o, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: a },
@@ -5178,11 +5196,11 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5178
5196
  { log: x },
5179
5197
  { recalcInProgress: m }
5180
5198
  ]) => {
5181
- const v = wt(
5199
+ const v = St(
5182
5200
  B(
5183
5201
  c,
5184
5202
  Te(i),
5185
- Vt(
5203
+ Kt(
5186
5204
  ([, w, b, y], [{ bottom: R, items: S, offsetBottom: C, totalCount: E }, I]) => {
5187
5205
  const j = R + C;
5188
5206
  let P = 0;
@@ -5193,7 +5211,7 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5193
5211
  me(([w]) => w !== 0),
5194
5212
  Te(r, a, n, o, x, m),
5195
5213
  me(([, w, b, y, , , R]) => !R && !y && w !== 0 && b === Er),
5196
- oe(([[w], , , , , b]) => (b("Upward scrolling compensation", { amount: w }, mt.DEBUG), w))
5214
+ oe(([[w], , , , , b]) => (b("Upward scrolling compensation", { amount: w }, vt.DEBUG), w))
5197
5215
  )
5198
5216
  );
5199
5217
  function g(w) {
@@ -5203,10 +5221,10 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5203
5221
  y && Pv() ? Ce(e, b - w) : g(-w);
5204
5222
  }), Le(
5205
5223
  B(
5206
- Qe(it(s, !1), e, m),
5224
+ tt(ct(s, !1), e, m),
5207
5225
  me(([w, b, y]) => !w && !y && b !== 0),
5208
5226
  oe(([w, b]) => b),
5209
- Qt(1)
5227
+ tn(1)
5210
5228
  ),
5211
5229
  g
5212
5230
  ), de(
@@ -5247,8 +5265,8 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5247
5265
  }
5248
5266
  ), { deviation: e };
5249
5267
  },
5250
- Ue(ut, Br, Pn, Xt, hn, Bi)
5251
- ), _v = _e(
5268
+ ze(pt, Br, Pn, Jt, hn, Bi)
5269
+ ), _v = Oe(
5252
5270
  ([
5253
5271
  e,
5254
5272
  t,
@@ -5274,7 +5292,7 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5274
5292
  ...u,
5275
5293
  ...d
5276
5294
  }),
5277
- Ue(
5295
+ ze(
5278
5296
  Ui,
5279
5297
  Rv,
5280
5298
  mn,
@@ -5287,7 +5305,7 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5287
5305
  hn,
5288
5306
  ru
5289
5307
  )
5290
- ), au = _e(
5308
+ ), au = Oe(
5291
5309
  ([
5292
5310
  {
5293
5311
  data: e,
@@ -5350,10 +5368,10 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5350
5368
  sizes: c,
5351
5369
  ...g
5352
5370
  }),
5353
- Ue(
5354
- Xt,
5371
+ ze(
5372
+ Jt,
5355
5373
  Fr,
5356
- ut,
5374
+ pt,
5357
5375
  Nv,
5358
5376
  Ev,
5359
5377
  Pn,
@@ -5518,12 +5536,12 @@ const Ps = "-webkit-sticky", xl = "sticky", Vi = iu(() => {
5518
5536
  function Gi(e) {
5519
5537
  return e;
5520
5538
  }
5521
- const Dv = /* @__PURE__ */ _e(() => {
5522
- const e = K((a) => `Item ${a}`), t = K((a) => `Group ${a}`), n = K({}), r = K(Gi), o = K("div"), s = K(tr), i = (a, c = null) => it(
5539
+ const Dv = /* @__PURE__ */ Oe(() => {
5540
+ const e = K((a) => `Item ${a}`), t = K((a) => `Group ${a}`), n = K({}), r = K(Gi), o = K("div"), s = K(tr), i = (a, c = null) => ct(
5523
5541
  B(
5524
5542
  n,
5525
5543
  oe((u) => u[a]),
5526
- ze()
5544
+ $e()
5527
5545
  ),
5528
5546
  c
5529
5547
  );
@@ -5544,11 +5562,11 @@ const Dv = /* @__PURE__ */ _e(() => {
5544
5562
  ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
5545
5563
  TopItemListComponent: i("TopItemList")
5546
5564
  };
5547
- }), Lv = /* @__PURE__ */ _e(
5565
+ }), Lv = /* @__PURE__ */ Oe(
5548
5566
  ([e, t]) => ({ ...e, ...t }),
5549
- Ue(au, Dv)
5567
+ ze(au, Dv)
5550
5568
  ), Fv = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), Bv = { overflowAnchor: "none", position: Vi(), zIndex: 1 }, pu = { overflowAnchor: "none" }, Hv = { ...pu, display: "inline-block", height: "100%" }, bl = /* @__PURE__ */ Y.memo(function({ showTopList: e = !1 }) {
5551
- const t = xe("listState"), n = Tt("sizeRanges"), r = xe("useWindowScroll"), o = xe("customScrollParent"), s = Tt("windowScrollContainerState"), i = Tt("scrollContainerState"), a = o || r ? s : i, c = xe("itemContent"), u = xe("context"), d = xe("groupContent"), p = xe("trackItemSizes"), h = xe("itemSize"), x = xe("log"), m = Tt("gap"), v = xe("horizontalDirection"), { callbackRef: g } = tv(
5569
+ const t = xe("listState"), n = It("sizeRanges"), r = xe("useWindowScroll"), o = xe("customScrollParent"), s = It("windowScrollContainerState"), i = It("scrollContainerState"), a = o || r ? s : i, c = xe("itemContent"), u = xe("context"), d = xe("groupContent"), p = xe("trackItemSizes"), h = xe("itemSize"), x = xe("log"), m = It("gap"), v = xe("horizontalDirection"), { callbackRef: g } = tv(
5552
5570
  n,
5553
5571
  h,
5554
5572
  p,
@@ -5578,10 +5596,10 @@ const Dv = /* @__PURE__ */ _e(() => {
5578
5596
  },
5579
5597
  ...H ? {} : { visibility: "hidden" }
5580
5598
  };
5581
- return !e && t.totalCount === 0 && y ? /* @__PURE__ */ l.jsx(y, { ...st(y, u) }) : /* @__PURE__ */ l.jsx(
5599
+ return !e && t.totalCount === 0 && y ? /* @__PURE__ */ l.jsx(y, { ...lt(y, u) }) : /* @__PURE__ */ l.jsx(
5582
5600
  S,
5583
5601
  {
5584
- ...st(S, u),
5602
+ ...lt(S, u),
5585
5603
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
5586
5604
  ref: g,
5587
5605
  style: G,
@@ -5590,7 +5608,7 @@ const Dv = /* @__PURE__ */ _e(() => {
5590
5608
  return j ? /* @__PURE__ */ no(
5591
5609
  R,
5592
5610
  {
5593
- ...st(R, u),
5611
+ ...lt(R, u),
5594
5612
  height: N.size,
5595
5613
  index: N.index,
5596
5614
  key: M,
@@ -5600,7 +5618,7 @@ const Dv = /* @__PURE__ */ _e(() => {
5600
5618
  ) : N.type === "group" ? /* @__PURE__ */ no(
5601
5619
  E,
5602
5620
  {
5603
- ...st(E, u),
5621
+ ...lt(E, u),
5604
5622
  "data-index": _,
5605
5623
  "data-item-index": N.index,
5606
5624
  "data-known-size": N.size,
@@ -5611,7 +5629,7 @@ const Dv = /* @__PURE__ */ _e(() => {
5611
5629
  ) : /* @__PURE__ */ no(
5612
5630
  C,
5613
5631
  {
5614
- ...st(C, u),
5632
+ ...lt(C, u),
5615
5633
  ...Wv(C, N.data),
5616
5634
  "data-index": _,
5617
5635
  "data-item-group-index": N.groupIndex,
@@ -5647,7 +5665,7 @@ const Dv = /* @__PURE__ */ _e(() => {
5647
5665
  width: "100%",
5648
5666
  zIndex: 1
5649
5667
  };
5650
- function st(e, t) {
5668
+ function lt(e, t) {
5651
5669
  if (typeof e != "string")
5652
5670
  return { context: t };
5653
5671
  }
@@ -5655,7 +5673,7 @@ function Wv(e, t) {
5655
5673
  return { item: typeof e == "string" ? void 0 : t };
5656
5674
  }
5657
5675
  const Vv = /* @__PURE__ */ Y.memo(function() {
5658
- const e = xe("HeaderComponent"), t = Tt("headerHeight"), n = xe("HeaderFooterTag"), r = jn(
5676
+ const e = xe("HeaderComponent"), t = It("headerHeight"), n = xe("HeaderFooterTag"), r = jn(
5659
5677
  Y.useMemo(
5660
5678
  () => (s) => {
5661
5679
  t(cn(s, "height"));
@@ -5665,9 +5683,9 @@ const Vv = /* @__PURE__ */ Y.memo(function() {
5665
5683
  !0,
5666
5684
  xe("skipAnimationFrameInResizeObserver")
5667
5685
  ), o = xe("context");
5668
- return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...st(e, o) }) }) : null;
5686
+ return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...lt(e, o) }) }) : null;
5669
5687
  }), Gv = /* @__PURE__ */ Y.memo(function() {
5670
- const e = xe("FooterComponent"), t = Tt("footerHeight"), n = xe("HeaderFooterTag"), r = jn(
5688
+ const e = xe("FooterComponent"), t = It("footerHeight"), n = xe("HeaderFooterTag"), r = jn(
5671
5689
  Y.useMemo(
5672
5690
  () => (s) => {
5673
5691
  t(cn(s, "height"));
@@ -5677,7 +5695,7 @@ const Vv = /* @__PURE__ */ Y.memo(function() {
5677
5695
  !0,
5678
5696
  xe("skipAnimationFrameInResizeObserver")
5679
5697
  ), o = xe("context");
5680
- return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...st(e, o) }) }) : null;
5698
+ return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...lt(e, o) }) }) : null;
5681
5699
  });
5682
5700
  function hu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5683
5701
  return Y.memo(function({ children: r, style: o, context: s, ...i }) {
@@ -5698,7 +5716,7 @@ function hu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5698
5716
  style: { ...p ? zv : $v, ...o },
5699
5717
  tabIndex: 0,
5700
5718
  ...i,
5701
- ...st(c, s),
5719
+ ...lt(c, s),
5702
5720
  children: r
5703
5721
  }
5704
5722
  );
@@ -5725,14 +5743,14 @@ function mu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5725
5743
  "data-virtuoso-scroller": !0,
5726
5744
  style: { position: "relative", ...o, ...d !== 0 ? { height: d + p } : {} },
5727
5745
  ...i,
5728
- ...st(c, s),
5746
+ ...lt(c, s),
5729
5747
  children: r
5730
5748
  }
5731
5749
  );
5732
5750
  });
5733
5751
  }
5734
5752
  const Kv = ({ children: e }) => {
5735
- const t = Y.useContext(cu), n = Tt("viewportHeight"), r = Tt("fixedItemHeight"), o = xe("alignToBottom"), s = xe("horizontalDirection"), i = Y.useMemo(
5753
+ const t = Y.useContext(cu), n = It("viewportHeight"), r = It("fixedItemHeight"), o = xe("alignToBottom"), s = xe("horizontalDirection"), i = Y.useMemo(
5736
5754
  () => Hc(n, (c) => cn(c, s ? "width" : "height")),
5737
5755
  [n, s]
5738
5756
  ), a = jn(i, !0, xe("skipAnimationFrameInResizeObserver"));
@@ -5740,7 +5758,7 @@ const Kv = ({ children: e }) => {
5740
5758
  t && (n(t.viewportHeight), r(t.itemHeight));
5741
5759
  }, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "element", ref: a, style: Xo(o), children: e });
5742
5760
  }, Yv = ({ children: e }) => {
5743
- const t = Y.useContext(cu), n = Tt("windowViewportRect"), r = Tt("fixedItemHeight"), o = xe("customScrollParent"), s = zc(
5761
+ const t = Y.useContext(cu), n = It("windowViewportRect"), r = It("fixedItemHeight"), o = xe("customScrollParent"), s = zc(
5744
5762
  n,
5745
5763
  o,
5746
5764
  xe("skipAnimationFrameInResizeObserver")
@@ -5750,7 +5768,7 @@ const Kv = ({ children: e }) => {
5750
5768
  }, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "window", ref: s, style: Xo(i), children: e });
5751
5769
  }, Xv = ({ children: e }) => {
5752
5770
  const t = xe("TopItemListComponent") || "div", n = xe("headerHeight"), r = { ...Uv, marginTop: `${n}px` }, o = xe("context");
5753
- return /* @__PURE__ */ l.jsx(t, { style: r, ...st(t, o), children: e });
5771
+ return /* @__PURE__ */ l.jsx(t, { style: r, ...lt(t, o), children: e });
5754
5772
  }, qv = /* @__PURE__ */ Y.memo(function(e) {
5755
5773
  const t = xe("useWindowScroll"), n = xe("topItemsIndexes").length > 0, r = xe("customScrollParent"), o = xe("context");
5756
5774
  return /* @__PURE__ */ l.jsxs(r || t ? Qv : Zv, { ...e, context: o, children: [
@@ -5765,7 +5783,7 @@ const Kv = ({ children: e }) => {
5765
5783
  Component: Jv,
5766
5784
  useEmitter: Ki,
5767
5785
  useEmitterValue: xe,
5768
- usePublisher: Tt
5786
+ usePublisher: It
5769
5787
  } = /* @__PURE__ */ lu(
5770
5788
  Lv,
5771
5789
  {
@@ -5825,18 +5843,18 @@ const Kv = ({ children: e }) => {
5825
5843
  }
5826
5844
  },
5827
5845
  qv
5828
- ), Zv = /* @__PURE__ */ hu({ useEmitter: Ki, useEmitterValue: xe, usePublisher: Tt }), Qv = /* @__PURE__ */ mu({ useEmitter: Ki, useEmitterValue: xe, usePublisher: Tt }), ex = Jv, tx = /* @__PURE__ */ _e(() => {
5846
+ ), Zv = /* @__PURE__ */ hu({ useEmitter: Ki, useEmitterValue: xe, usePublisher: It }), Qv = /* @__PURE__ */ mu({ useEmitter: Ki, useEmitterValue: xe, usePublisher: It }), ex = Jv, tx = /* @__PURE__ */ Oe(() => {
5829
5847
  const e = K((u) => /* @__PURE__ */ l.jsxs("td", { children: [
5830
5848
  "Item $",
5831
5849
  u
5832
5850
  ] })), t = K(null), n = K((u) => /* @__PURE__ */ l.jsxs("td", { colSpan: 1e3, children: [
5833
5851
  "Group ",
5834
5852
  u
5835
- ] })), r = K(null), o = K(null), s = K({}), i = K(Gi), a = K(tr), c = (u, d = null) => it(
5853
+ ] })), r = K(null), o = K(null), s = K({}), i = K(Gi), a = K(tr), c = (u, d = null) => ct(
5836
5854
  B(
5837
5855
  s,
5838
5856
  oe((p) => p[u]),
5839
- ze()
5857
+ $e()
5840
5858
  ),
5841
5859
  d
5842
5860
  );
@@ -5861,7 +5879,7 @@ const Kv = ({ children: e }) => {
5861
5879
  GroupComponent: c("Group", "tr")
5862
5880
  };
5863
5881
  });
5864
- Ue(au, tx);
5882
+ ze(au, tx);
5865
5883
  Vi();
5866
5884
  const wl = {
5867
5885
  bottom: 0,
@@ -5895,7 +5913,7 @@ function Yr(e, t) {
5895
5913
  function ox(e, t) {
5896
5914
  return e && e.column === t.column && e.row === t.row;
5897
5915
  }
5898
- const sx = /* @__PURE__ */ _e(
5916
+ const sx = /* @__PURE__ */ Oe(
5899
5917
  ([
5900
5918
  { increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
5901
5919
  { footerHeight: o, headerHeight: s, scrollBy: i, scrollContainerState: a, scrollTo: c, scrollTop: u, smoothScrollTargetReached: d, viewportHeight: p },
@@ -5917,13 +5935,13 @@ const sx = /* @__PURE__ */ _e(
5917
5935
  }
5918
5936
  ), Le(
5919
5937
  B(
5920
- Qe(m, z, P, j, O, Q),
5938
+ tt(m, z, P, j, O, Q),
5921
5939
  me(([k, J, re, ce, , ie]) => k && !J && re.height !== 0 && ce.height !== 0 && !ie)
5922
5940
  ),
5923
5941
  ([, , , , k]) => {
5924
5942
  Ce(Q, !0), $i(1, () => {
5925
5943
  Ce(D, k);
5926
- }), _t(B(u), () => {
5944
+ }), Dt(B(u), () => {
5927
5945
  Ce(t, [0, 0]), Ce(z, !0);
5928
5946
  });
5929
5947
  }
@@ -5931,7 +5949,7 @@ const sx = /* @__PURE__ */ _e(
5931
5949
  B(
5932
5950
  V,
5933
5951
  me((k) => k != null && k.scrollTop > 0),
5934
- Ut(0)
5952
+ Vt(0)
5935
5953
  ),
5936
5954
  E
5937
5955
  ), Le(
@@ -5941,7 +5959,7 @@ const sx = /* @__PURE__ */ _e(
5941
5959
  me(([, k]) => k != null)
5942
5960
  ),
5943
5961
  ([, k]) => {
5944
- k && (Ce(j, k.viewport), Ce(P, k.item), Ce(_, k.gap), k.scrollTop > 0 && (Ce(F, !0), _t(B(u, En(1)), (J) => {
5962
+ k && (Ce(j, k.viewport), Ce(P, k.item), Ce(_, k.gap), k.scrollTop > 0 && (Ce(F, !0), Dt(B(u, En(1)), (J) => {
5945
5963
  Ce(F, !1);
5946
5964
  }), Ce(c, { top: k.scrollTop })));
5947
5965
  }
@@ -5953,7 +5971,7 @@ const sx = /* @__PURE__ */ _e(
5953
5971
  p
5954
5972
  ), de(
5955
5973
  B(
5956
- Qe(
5974
+ tt(
5957
5975
  he(j, Yr),
5958
5976
  he(P, Yr),
5959
5977
  he(_, (k, J) => k && k.column === J.column && k.row === J.row),
@@ -5969,7 +5987,7 @@ const sx = /* @__PURE__ */ _e(
5969
5987
  M
5970
5988
  ), de(
5971
5989
  B(
5972
- Qe(
5990
+ tt(
5973
5991
  he(C),
5974
5992
  r,
5975
5993
  he(_, ox),
@@ -5988,25 +6006,25 @@ const sx = /* @__PURE__ */ _e(
5988
6006
  [J, re],
5989
6007
  ce,
5990
6008
  ie,
5991
- Oe,
6009
+ Me,
5992
6010
  ue,
5993
6011
  Ae,
5994
6012
  ,
5995
6013
  le,
5996
6014
  fe
5997
6015
  ]) => {
5998
- const { column: ke, row: W } = ce, { height: te, width: ye } = ie, { width: Me } = Oe;
5999
- if (Ae === 0 && (k === 0 || Me === 0))
6016
+ const { column: ke, row: W } = ce, { height: te, width: ye } = ie, { width: _e } = Me;
6017
+ if (Ae === 0 && (k === 0 || _e === 0))
6000
6018
  return wl;
6001
6019
  if (ye === 0) {
6002
6020
  const on = zi(fe, k), xn = on + Math.max(Ae - 1, 0);
6003
6021
  return rx(Cl(on, xn, ue));
6004
6022
  }
6005
- const tt = gu(Me, ye, ke);
6006
- let $e, Ve;
6007
- le ? J === 0 && re === 0 && Ae > 0 ? ($e = 0, Ve = Ae - 1) : ($e = tt * Io((J + W) / (te + W)), Ve = tt * yl((re + W) / (te + W)) - 1, Ve = ks(k - 1, gr(Ve, tt - 1)), $e = ks(Ve, gr(0, $e))) : ($e = 0, Ve = -1);
6008
- const ft = Cl($e, Ve, ue), { bottom: at, top: nn } = Tl(Oe, ce, ie, ft), $t = yl(k / tt), rn = $t * te + ($t - 1) * W - at;
6009
- return { bottom: at, itemHeight: te, items: ft, itemWidth: ye, offsetBottom: rn, offsetTop: nn, top: nn };
6023
+ const Je = gu(_e, ye, ke);
6024
+ let nt, Ge;
6025
+ le ? J === 0 && re === 0 && Ae > 0 ? (nt = 0, Ge = Ae - 1) : (nt = Je * Io((J + W) / (te + W)), Ge = Je * yl((re + W) / (te + W)) - 1, Ge = ks(k - 1, gr(Ge, Je - 1)), nt = ks(Ge, gr(0, nt))) : (nt = 0, Ge = -1);
6026
+ const Tt = Cl(nt, Ge, ue), { bottom: We, top: it } = Tl(Me, ce, ie, Tt), Ze = yl(k / Je), ut = Ze * te + (Ze - 1) * W - We;
6027
+ return { bottom: We, itemHeight: te, items: Tt, itemWidth: ye, offsetBottom: ut, offsetTop: it, top: it };
6010
6028
  }
6011
6029
  )
6012
6030
  ),
@@ -6020,13 +6038,13 @@ const sx = /* @__PURE__ */ _e(
6020
6038
  C
6021
6039
  ), de(
6022
6040
  B(
6023
- Qe(j, P, I, _),
6041
+ tt(j, P, I, _),
6024
6042
  me(([k, J, { items: re }]) => re.length > 0 && J.height !== 0 && k.height !== 0),
6025
6043
  oe(([k, J, { items: re }, ce]) => {
6026
- const { bottom: ie, top: Oe } = Tl(k, ce, J, re);
6027
- return [Oe, ie];
6044
+ const { bottom: ie, top: Me } = Tl(k, ce, J, re);
6045
+ return [Me, ie];
6028
6046
  }),
6029
- ze(Cr)
6047
+ $e(Cr)
6030
6048
  ),
6031
6049
  t
6032
6050
  );
@@ -6039,9 +6057,9 @@ const sx = /* @__PURE__ */ _e(
6039
6057
  ),
6040
6058
  U
6041
6059
  );
6042
- const ee = wt(
6060
+ const ee = St(
6043
6061
  B(
6044
- Qe(I, C),
6062
+ tt(I, C),
6045
6063
  me(([{ items: k }]) => k.length > 0),
6046
6064
  Te(U),
6047
6065
  me(([[k, J], re]) => {
@@ -6049,16 +6067,16 @@ const sx = /* @__PURE__ */ _e(
6049
6067
  return (re || k.bottom > 0 && k.itemHeight > 0 && k.offsetBottom === 0 && k.items.length === J) && ce;
6050
6068
  }),
6051
6069
  oe(([[, k]]) => k - 1),
6052
- ze()
6070
+ $e()
6053
6071
  )
6054
- ), pe = wt(
6072
+ ), pe = St(
6055
6073
  B(
6056
6074
  he(I),
6057
6075
  me(({ items: k }) => k.length > 0 && k[0].index === 0),
6058
- Ut(0),
6059
- ze()
6076
+ Vt(0),
6077
+ $e()
6060
6078
  )
6061
- ), we = wt(
6079
+ ), we = St(
6062
6080
  B(
6063
6081
  he(I),
6064
6082
  Te(F),
@@ -6067,8 +6085,8 @@ const sx = /* @__PURE__ */ _e(
6067
6085
  endIndex: k[k.length - 1].index,
6068
6086
  startIndex: k[0].index
6069
6087
  })),
6070
- ze(Yc),
6071
- Qt(0)
6088
+ $e(Yc),
6089
+ tn(0)
6072
6090
  )
6073
6091
  );
6074
6092
  de(we, x.scrollSeekRangeChanged), de(
@@ -6076,8 +6094,8 @@ const sx = /* @__PURE__ */ _e(
6076
6094
  D,
6077
6095
  Te(j, P, C, _),
6078
6096
  oe(([k, J, re, ce, ie]) => {
6079
- const Oe = Qc(k), { align: ue, behavior: Ae, offset: le } = Oe;
6080
- let fe = Oe.index;
6097
+ const Me = Qc(k), { align: ue, behavior: Ae, offset: le } = Me;
6098
+ let fe = Me.index;
6081
6099
  fe === "LAST" && (fe = ce - 1), fe = gr(0, fe, ks(ce - 1, fe));
6082
6100
  let ke = li(J, ie, re, fe);
6083
6101
  return ue === "end" ? ke = Sl(ke - J.height + re.height) : ue === "center" && (ke = Sl(ke - J.height / 2 + re.height / 2)), le && (ke += le), { behavior: Ae, top: ke };
@@ -6085,7 +6103,7 @@ const sx = /* @__PURE__ */ _e(
6085
6103
  ),
6086
6104
  c
6087
6105
  );
6088
- const X = it(
6106
+ const X = ct(
6089
6107
  B(
6090
6108
  I,
6091
6109
  oe((k) => k.offsetBottom + k.bottom)
@@ -6140,7 +6158,7 @@ const sx = /* @__PURE__ */ _e(
6140
6158
  ...S
6141
6159
  };
6142
6160
  },
6143
- Ue(Ui, ut, Br, su, mn, Wi, hn)
6161
+ ze(Ui, pt, Br, su, mn, Wi, hn)
6144
6162
  );
6145
6163
  function gu(e, t, n) {
6146
6164
  return gr(1, Io((e + n) / (Io(t) + n)));
@@ -6156,12 +6174,12 @@ function li(e, t, n, r) {
6156
6174
  const o = gu(e.width, n.width, t.column), s = Io(r / o), i = s * n.height + gr(0, s - 1) * t.row;
6157
6175
  return i > 0 ? i + t.row : i;
6158
6176
  }
6159
- const ix = /* @__PURE__ */ _e(() => {
6160
- const e = K((p) => `Item ${p}`), t = K({}), n = K(null), r = K("virtuoso-grid-item"), o = K("virtuoso-grid-list"), s = K(Gi), i = K("div"), a = K(tr), c = (p, h = null) => it(
6177
+ const ix = /* @__PURE__ */ Oe(() => {
6178
+ const e = K((p) => `Item ${p}`), t = K({}), n = K(null), r = K("virtuoso-grid-item"), o = K("virtuoso-grid-list"), s = K(Gi), i = K("div"), a = K(tr), c = (p, h = null) => ct(
6161
6179
  B(
6162
6180
  t,
6163
6181
  oe((x) => x[p]),
6164
- ze()
6182
+ $e()
6165
6183
  ),
6166
6184
  h
6167
6185
  ), u = K(!1), d = K(!1);
@@ -6183,11 +6201,11 @@ const ix = /* @__PURE__ */ _e(() => {
6183
6201
  scrollerRef: a,
6184
6202
  ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
6185
6203
  };
6186
- }), ax = /* @__PURE__ */ _e(
6204
+ }), ax = /* @__PURE__ */ Oe(
6187
6205
  ([e, t]) => ({ ...e, ...t }),
6188
- Ue(sx, ix)
6206
+ ze(sx, ix)
6189
6207
  ), lx = /* @__PURE__ */ Y.memo(function() {
6190
- const e = We("gridState"), t = We("listClassName"), n = We("itemClassName"), r = We("itemContent"), o = We("computeItemKey"), s = We("isSeeking"), i = Et("scrollHeight"), a = We("ItemComponent"), c = We("ListComponent"), u = We("ScrollSeekPlaceholder"), d = We("context"), p = Et("itemDimensions"), h = Et("gap"), x = We("log"), m = We("stateRestoreInProgress"), v = Et("reportReadyState"), g = jn(
6208
+ const e = Ue("gridState"), t = Ue("listClassName"), n = Ue("itemClassName"), r = Ue("itemContent"), o = Ue("computeItemKey"), s = Ue("isSeeking"), i = Nt("scrollHeight"), a = Ue("ItemComponent"), c = Ue("ListComponent"), u = Ue("ScrollSeekPlaceholder"), d = Ue("context"), p = Nt("itemDimensions"), h = Nt("gap"), x = Ue("log"), m = Ue("stateRestoreInProgress"), v = Nt("reportReadyState"), g = jn(
6191
6209
  Y.useMemo(
6192
6210
  () => (w) => {
6193
6211
  const b = w.parentElement.parentElement.scrollHeight;
@@ -6214,7 +6232,7 @@ const ix = /* @__PURE__ */ _e(() => {
6214
6232
  {
6215
6233
  className: t,
6216
6234
  ref: g,
6217
- ...st(c, d),
6235
+ ...lt(c, d),
6218
6236
  "data-testid": "virtuoso-item-list",
6219
6237
  style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
6220
6238
  children: e.items.map((w) => {
@@ -6222,7 +6240,7 @@ const ix = /* @__PURE__ */ _e(() => {
6222
6240
  return s ? /* @__PURE__ */ l.jsx(
6223
6241
  u,
6224
6242
  {
6225
- ...st(u, d),
6243
+ ...lt(u, d),
6226
6244
  height: e.itemHeight,
6227
6245
  index: w.index,
6228
6246
  width: e.itemWidth
@@ -6231,7 +6249,7 @@ const ix = /* @__PURE__ */ _e(() => {
6231
6249
  ) : /* @__PURE__ */ no(
6232
6250
  a,
6233
6251
  {
6234
- ...st(a, d),
6252
+ ...lt(a, d),
6235
6253
  className: n,
6236
6254
  "data-index": w.index,
6237
6255
  key: b
@@ -6242,7 +6260,7 @@ const ix = /* @__PURE__ */ _e(() => {
6242
6260
  }
6243
6261
  );
6244
6262
  }), cx = Y.memo(function() {
6245
- const e = We("HeaderComponent"), t = Et("headerHeight"), n = We("headerFooterTag"), r = jn(
6263
+ const e = Ue("HeaderComponent"), t = Nt("headerHeight"), n = Ue("headerFooterTag"), r = jn(
6246
6264
  Y.useMemo(
6247
6265
  () => (s) => {
6248
6266
  t(cn(s, "height"));
@@ -6251,10 +6269,10 @@ const ix = /* @__PURE__ */ _e(() => {
6251
6269
  ),
6252
6270
  !0,
6253
6271
  !1
6254
- ), o = We("context");
6255
- return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...st(e, o) }) }) : null;
6272
+ ), o = Ue("context");
6273
+ return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...lt(e, o) }) }) : null;
6256
6274
  }), ux = Y.memo(function() {
6257
- const e = We("FooterComponent"), t = Et("footerHeight"), n = We("headerFooterTag"), r = jn(
6275
+ const e = Ue("FooterComponent"), t = Nt("footerHeight"), n = Ue("headerFooterTag"), r = jn(
6258
6276
  Y.useMemo(
6259
6277
  () => (s) => {
6260
6278
  t(cn(s, "height"));
@@ -6263,10 +6281,10 @@ const ix = /* @__PURE__ */ _e(() => {
6263
6281
  ),
6264
6282
  !0,
6265
6283
  !1
6266
- ), o = We("context");
6267
- return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...st(e, o) }) }) : null;
6284
+ ), o = Ue("context");
6285
+ return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...lt(e, o) }) }) : null;
6268
6286
  }), dx = ({ children: e }) => {
6269
- const t = Y.useContext(uu), n = Et("itemDimensions"), r = Et("viewportDimensions"), o = jn(
6287
+ const t = Y.useContext(uu), n = Nt("itemDimensions"), r = Nt("viewportDimensions"), o = jn(
6270
6288
  Y.useMemo(
6271
6289
  () => (s) => {
6272
6290
  r(s.getBoundingClientRect());
@@ -6280,21 +6298,21 @@ const ix = /* @__PURE__ */ _e(() => {
6280
6298
  t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
6281
6299
  }, [t, r, n]), /* @__PURE__ */ l.jsx("div", { ref: o, style: Xo(!1), children: e });
6282
6300
  }, fx = ({ children: e }) => {
6283
- const t = Y.useContext(uu), n = Et("windowViewportRect"), r = Et("itemDimensions"), o = We("customScrollParent"), s = zc(n, o, !1);
6301
+ const t = Y.useContext(uu), n = Nt("windowViewportRect"), r = Nt("itemDimensions"), o = Ue("customScrollParent"), s = zc(n, o, !1);
6284
6302
  return Y.useEffect(() => {
6285
6303
  t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
6286
6304
  }, [t, n, r]), /* @__PURE__ */ l.jsx("div", { ref: s, style: Xo(!1), children: e });
6287
6305
  }, px = /* @__PURE__ */ Y.memo(function({ ...e }) {
6288
- const t = We("useWindowScroll"), n = We("customScrollParent"), r = n || t ? mx : hx, o = n || t ? fx : dx, s = We("context");
6289
- return /* @__PURE__ */ l.jsx(r, { ...e, ...st(r, s), children: /* @__PURE__ */ l.jsxs(o, { children: [
6306
+ const t = Ue("useWindowScroll"), n = Ue("customScrollParent"), r = n || t ? mx : hx, o = n || t ? fx : dx, s = Ue("context");
6307
+ return /* @__PURE__ */ l.jsx(r, { ...e, ...lt(r, s), children: /* @__PURE__ */ l.jsxs(o, { children: [
6290
6308
  /* @__PURE__ */ l.jsx(cx, {}),
6291
6309
  /* @__PURE__ */ l.jsx(lx, {}),
6292
6310
  /* @__PURE__ */ l.jsx(ux, {})
6293
6311
  ] }) });
6294
6312
  }), {
6295
6313
  useEmitter: vu,
6296
- useEmitterValue: We,
6297
- usePublisher: Et
6314
+ useEmitterValue: Ue,
6315
+ usePublisher: Nt
6298
6316
  } = /* @__PURE__ */ lu(
6299
6317
  ax,
6300
6318
  {
@@ -6336,9 +6354,9 @@ const ix = /* @__PURE__ */ _e(() => {
6336
6354
  }
6337
6355
  },
6338
6356
  px
6339
- ), hx = /* @__PURE__ */ hu({ useEmitter: vu, useEmitterValue: We, usePublisher: Et }), mx = /* @__PURE__ */ mu({ useEmitter: vu, useEmitterValue: We, usePublisher: Et });
6357
+ ), hx = /* @__PURE__ */ hu({ useEmitter: vu, useEmitterValue: Ue, usePublisher: Nt }), mx = /* @__PURE__ */ mu({ useEmitter: vu, useEmitterValue: Ue, usePublisher: Nt });
6340
6358
  function El(e, t, n) {
6341
- return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, mt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
6359
+ return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, vt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
6342
6360
  }
6343
6361
  function L(...e) {
6344
6362
  return Kh(Gh(e));
@@ -6524,7 +6542,7 @@ function wx(e, t) {
6524
6542
  }
6525
6543
  return [r, o];
6526
6544
  }
6527
- function Bt(e, t = []) {
6545
+ function zt(e, t = []) {
6528
6546
  let n = [];
6529
6547
  function r(s, i) {
6530
6548
  const a = f.createContext(i), c = n.length;
@@ -6574,8 +6592,8 @@ function yx(...e) {
6574
6592
  };
6575
6593
  return n.scopeName = t.scopeName, n;
6576
6594
  }
6577
- var nt = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
6578
- }, Sx = f[" useInsertionEffect ".trim().toString()] || nt;
6595
+ var ot = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
6596
+ }, Sx = f[" useInsertionEffect ".trim().toString()] || ot;
6579
6597
  function un({
6580
6598
  prop: e,
6581
6599
  defaultProp: t,
@@ -6679,11 +6697,11 @@ function wu(e, t) {
6679
6697
  function Rx(e, t) {
6680
6698
  return f.useReducer((n, r) => t[n][r] ?? n, e);
6681
6699
  }
6682
- var gt = (e) => {
6700
+ var xt = (e) => {
6683
6701
  const { present: t, children: n } = e, r = Ix(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), s = Re(r.ref, Nx(o));
6684
6702
  return typeof n == "function" || r.isPresent ? f.cloneElement(o, { ref: s }) : null;
6685
6703
  };
6686
- gt.displayName = "Presence";
6704
+ xt.displayName = "Presence";
6687
6705
  function Ix(e) {
6688
6706
  const [t, n] = f.useState(), r = f.useRef(null), o = f.useRef(e), s = f.useRef("none"), i = e ? "mounted" : "unmounted", [a, c] = Rx(i, {
6689
6707
  mounted: {
@@ -6701,13 +6719,13 @@ function Ix(e) {
6701
6719
  return f.useEffect(() => {
6702
6720
  const u = Xr(r.current);
6703
6721
  s.current = a === "mounted" ? u : "none";
6704
- }, [a]), nt(() => {
6722
+ }, [a]), ot(() => {
6705
6723
  const u = r.current, d = o.current;
6706
6724
  if (d !== e) {
6707
6725
  const h = s.current, x = Xr(u);
6708
6726
  e ? c("MOUNT") : x === "none" || (u == null ? void 0 : u.display) === "none" ? c("UNMOUNT") : c(d && h !== x ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
6709
6727
  }
6710
- }, [e, c]), nt(() => {
6728
+ }, [e, c]), ot(() => {
6711
6729
  if (t) {
6712
6730
  let u;
6713
6731
  const d = t.ownerDocument.defaultView ?? window, p = (x) => {
@@ -6743,13 +6761,13 @@ function Nx(e) {
6743
6761
  }
6744
6762
  var Ax = f[" useId ".trim().toString()] || (() => {
6745
6763
  }), jx = 0;
6746
- function Ot(e) {
6764
+ function Lt(e) {
6747
6765
  const [t, n] = f.useState(Ax());
6748
- return nt(() => {
6766
+ return ot(() => {
6749
6767
  n((r) => r ?? String(jx++));
6750
6768
  }, [e]), e || (t ? `radix-${t}` : "");
6751
6769
  }
6752
- var qo = "Collapsible", [Px, BT] = Bt(qo), [kx, Xi] = Px(qo), yu = f.forwardRef(
6770
+ var qo = "Collapsible", [Px, BT] = zt(qo), [kx, Xi] = Px(qo), yu = f.forwardRef(
6753
6771
  (e, t) => {
6754
6772
  const {
6755
6773
  __scopeCollapsible: n,
@@ -6769,7 +6787,7 @@ var qo = "Collapsible", [Px, BT] = Bt(qo), [kx, Xi] = Px(qo), yu = f.forwardRef(
6769
6787
  {
6770
6788
  scope: n,
6771
6789
  disabled: s,
6772
- contentId: Ot(),
6790
+ contentId: Lt(),
6773
6791
  open: c,
6774
6792
  onOpenToggle: f.useCallback(() => u((d) => !d), [u]),
6775
6793
  children: /* @__PURE__ */ l.jsx(
@@ -6809,7 +6827,7 @@ Cu.displayName = Su;
6809
6827
  var qi = "CollapsibleContent", _x = f.forwardRef(
6810
6828
  (e, t) => {
6811
6829
  const { forceMount: n, ...r } = e, o = Xi(qi, e.__scopeCollapsible);
6812
- return /* @__PURE__ */ l.jsx(gt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ l.jsx(Ox, { ...r, ref: t, present: s }) });
6830
+ return /* @__PURE__ */ l.jsx(xt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ l.jsx(Ox, { ...r, ref: t, present: s }) });
6813
6831
  }
6814
6832
  );
6815
6833
  _x.displayName = qi;
@@ -6818,7 +6836,7 @@ var Ox = f.forwardRef((e, t) => {
6818
6836
  return f.useEffect(() => {
6819
6837
  const b = requestAnimationFrame(() => g.current = !1);
6820
6838
  return () => cancelAnimationFrame(b);
6821
- }, []), nt(() => {
6839
+ }, []), ot(() => {
6822
6840
  const b = u.current;
6823
6841
  if (b) {
6824
6842
  w.current = w.current || {
@@ -6912,7 +6930,7 @@ function Lx(e) {
6912
6930
  }
6913
6931
  function qr({ content: e, className: t = "", fallback: n = /* @__PURE__ */ l.jsx("div", { "aria-busy": !0, children: "Rendering…" }) }) {
6914
6932
  const r = Lx(e), [o, s] = be(() => ur.get(r) ?? null);
6915
- Ze(() => {
6933
+ et(() => {
6916
6934
  if (ur.has(r)) {
6917
6935
  const m = ur.get(r) ?? null;
6918
6936
  s(m);
@@ -6989,7 +7007,7 @@ function qr({ content: e, className: t = "", fallback: n = /* @__PURE__ */ l.jsx
6989
7007
  }, [o]), o ? /* @__PURE__ */ l.jsx("div", { ref: i, className: L("markdown prose max-w-none break-words dark:prose-invert", t), dangerouslySetInnerHTML: { __html: o } }) : /* @__PURE__ */ l.jsx("div", { className: L("markdown prose max-w-none break-words dark:prose-invert", t), children: n });
6990
7008
  }
6991
7009
  async function Tu(e, t) {
6992
- return await Pt(e, {
7010
+ return await Ot(e, {
6993
7011
  responseType: "blob",
6994
7012
  onDownloadProgress: (r) => {
6995
7013
  try {
@@ -7012,7 +7030,7 @@ async function Fx(e, t) {
7012
7030
  const n = await Tu(`/chat/files/${e}/download`, t), r = URL.createObjectURL(n);
7013
7031
  let o = `file_${e}`;
7014
7032
  try {
7015
- const i = await Pt(`/chat/files/${e}`);
7033
+ const i = await Ot(`/chat/files/${e}`);
7016
7034
  o = (i == null ? void 0 : i.filename) ?? o;
7017
7035
  } catch {
7018
7036
  }
@@ -7113,7 +7131,7 @@ function Eu() {
7113
7131
  const fo = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words";
7114
7132
  function Wx({ className: e }) {
7115
7133
  const [t, n] = be(0);
7116
- return Ze(() => {
7134
+ return et(() => {
7117
7135
  const r = setInterval(() => n((o) => (o + 1) % 4), 500);
7118
7136
  return () => clearInterval(r);
7119
7137
  }, []), /* @__PURE__ */ l.jsxs(
@@ -7183,10 +7201,10 @@ const Vx = Y.memo(function({
7183
7201
  if (G[le]) return;
7184
7202
  N((ye) => ({ ...ye, [le]: !0 }));
7185
7203
  try {
7186
- const ye = H({ title: te === "download" ? "Downloading file..." : "Opening file...", description: "", open: !0 }), Me = (tt) => {
7187
- ye.update({ id: ye.id, description: `Progress: ${(tt * 100).toFixed(0)}%` });
7204
+ const ye = H({ title: te === "download" ? "Downloading file..." : "Opening file...", description: "", open: !0 }), _e = (Je) => {
7205
+ ye.update({ id: ye.id, description: `Progress: ${(Je * 100).toFixed(0)}%` });
7188
7206
  };
7189
- te === "download" ? await Fx(W, Me) : await jl(W, Me), ye.update({ id: ye.id, title: "Done", description: void 0 });
7207
+ te === "download" ? await Fx(W, _e) : await jl(W, _e), ye.update({ id: ye.id, title: "Done", description: void 0 });
7190
7208
  } catch (ye) {
7191
7209
  console.error("Failed to fetch server file:", ye), H({ title: "Failed to fetch file", description: String(ye), open: !0 });
7192
7210
  } finally {
@@ -7198,21 +7216,21 @@ const Vx = Y.memo(function({
7198
7216
  }
7199
7217
  if (fe.startsWith("data:")) {
7200
7218
  if (ue.preventDefault(), G[le]) return;
7201
- N((Me) => ({ ...Me, [le]: !0 }));
7219
+ N((_e) => ({ ..._e, [le]: !0 }));
7202
7220
  const W = fe.split(",")[1] ?? "";
7203
7221
  let te = Ae.mimeType ?? "application/octet-stream";
7204
7222
  const ye = fe.substring(5, fe.indexOf(","));
7205
7223
  ye && ye.includes(";") ? te = ye.split(";")[0] || te : ye && !ye.includes(";") && (te = ye || te);
7206
7224
  try {
7207
- const Me = H({ title: "Uploading file...", description: "", open: !0 }), tt = await ln.uploadFile(W, Ae.name ?? "file", te, D ?? void 0);
7208
- if (tt && tt.id) {
7209
- const $e = tt.id;
7210
- await jl($e, (Ve) => Me.update({ id: Me.id, description: `Progress: ${(Ve * 100).toFixed(0)}%` })), Me.update({ id: Me.id, title: "Done", description: void 0 });
7225
+ const _e = H({ title: "Uploading file...", description: "", open: !0 }), Je = await ln.uploadFile(W, Ae.name ?? "file", te, D ?? void 0);
7226
+ if (Je && Je.id) {
7227
+ const nt = Je.id;
7228
+ await jl(nt, (Ge) => _e.update({ id: _e.id, description: `Progress: ${(Ge * 100).toFixed(0)}%` })), _e.update({ id: _e.id, title: "Done", description: void 0 });
7211
7229
  }
7212
- } catch (Me) {
7213
- console.error("Failed to upload file for viewing:", Me), H({ title: "Failed to upload file", description: String(Me), open: !0 });
7230
+ } catch (_e) {
7231
+ console.error("Failed to upload file for viewing:", _e), H({ title: "Failed to upload file", description: String(_e), open: !0 });
7214
7232
  } finally {
7215
- N((Me) => ({ ...Me, [le]: !1 }));
7233
+ N((_e) => ({ ..._e, [le]: !1 }));
7216
7234
  }
7217
7235
  }
7218
7236
  } finally {
@@ -7399,7 +7417,7 @@ const Vx = Y.memo(function({
7399
7417
  );
7400
7418
  }) })
7401
7419
  ] });
7402
- }, Oe = wn(() => Zx(t), [t]);
7420
+ }, Me = wn(() => Zx(t), [t]);
7403
7421
  return /* @__PURE__ */ l.jsx("div", { className: L(J(), m.container), children: /* @__PURE__ */ l.jsxs("div", { className: L(re(), m.content), children: [
7404
7422
  (a || c || V) && /* @__PURE__ */ l.jsxs(
7405
7423
  "div",
@@ -7413,7 +7431,7 @@ const Vx = Y.memo(function({
7413
7431
  children: [
7414
7432
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2", children: [
7415
7433
  k(),
7416
- c && Oe && /* @__PURE__ */ l.jsx("span", { className: L("font-medium", _ ? "text-xs" : "text-sm"), children: Oe }),
7434
+ c && Me && /* @__PURE__ */ l.jsx("span", { className: L("font-medium", _ ? "text-xs" : "text-sm"), children: Me }),
7417
7435
  V && z.name && /* @__PURE__ */ l.jsxs(
7418
7436
  bu,
7419
7437
  {
@@ -7683,7 +7701,7 @@ function Zx(e) {
7683
7701
  }
7684
7702
  function Qx(e, t) {
7685
7703
  const [n, r] = be(e);
7686
- return Ze(() => {
7704
+ return et(() => {
7687
7705
  if (!t) {
7688
7706
  r(e);
7689
7707
  return;
@@ -7823,7 +7841,7 @@ function sb(e) {
7823
7841
  return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), ob(t), rb(t);
7824
7842
  }
7825
7843
  function Zi(e) {
7826
- const t = e + "CollectionProvider", [n, r] = Bt(t), [o, s] = n(
7844
+ const t = e + "CollectionProvider", [n, r] = zt(t), [o, s] = n(
7827
7845
  t,
7828
7846
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
7829
7847
  ), i = (v) => {
@@ -7867,7 +7885,7 @@ function Jo(e) {
7867
7885
  const t = f.useContext(ib);
7868
7886
  return e || t || "ltr";
7869
7887
  }
7870
- function rt(e) {
7888
+ function st(e) {
7871
7889
  const t = f.useRef(e);
7872
7890
  return f.useEffect(() => {
7873
7891
  t.current = e;
@@ -7877,7 +7895,7 @@ function rt(e) {
7877
7895
  }, []);
7878
7896
  }
7879
7897
  function ab(e, t = globalThis == null ? void 0 : globalThis.document) {
7880
- const n = rt(e);
7898
+ const n = st(e);
7881
7899
  f.useEffect(() => {
7882
7900
  const r = (o) => {
7883
7901
  o.key === "Escape" && n(o);
@@ -7950,7 +7968,7 @@ var db = "DismissableLayerBranch", fb = f.forwardRef((e, t) => {
7950
7968
  });
7951
7969
  fb.displayName = db;
7952
7970
  function pb(e, t = globalThis == null ? void 0 : globalThis.document) {
7953
- const n = rt(e), r = f.useRef(!1), o = f.useRef(() => {
7971
+ const n = st(e), r = f.useRef(!1), o = f.useRef(() => {
7954
7972
  });
7955
7973
  return f.useEffect(() => {
7956
7974
  const s = (a) => {
@@ -7980,7 +7998,7 @@ function pb(e, t = globalThis == null ? void 0 : globalThis.document) {
7980
7998
  };
7981
7999
  }
7982
8000
  function hb(e, t = globalThis == null ? void 0 : globalThis.document) {
7983
- const n = rt(e), r = f.useRef(!1);
8001
+ const n = st(e), r = f.useRef(!1);
7984
8002
  return f.useEffect(() => {
7985
8003
  const o = (s) => {
7986
8004
  s.target && !r.current && Au(ub, n, { originalEvent: s }, {
@@ -8021,7 +8039,7 @@ var Ls = "focusScope.autoFocusOnMount", Fs = "focusScope.autoFocusOnUnmount", Dl
8021
8039
  onMountAutoFocus: o,
8022
8040
  onUnmountAutoFocus: s,
8023
8041
  ...i
8024
- } = e, [a, c] = f.useState(null), u = rt(o), d = rt(s), p = f.useRef(null), h = Re(t, (v) => c(v)), x = f.useRef({
8042
+ } = e, [a, c] = f.useState(null), u = st(o), d = st(s), p = f.useRef(null), h = Re(t, (v) => c(v)), x = f.useRef({
8025
8043
  paused: !1,
8026
8044
  pause() {
8027
8045
  this.paused = !0;
@@ -8143,7 +8161,7 @@ function Bl(e, t) {
8143
8161
  function yb(e) {
8144
8162
  return e.filter((t) => t.tagName !== "A");
8145
8163
  }
8146
- const Sb = ["top", "right", "bottom", "left"], dn = Math.min, xt = Math.max, Ao = Math.round, Jr = Math.floor, Kt = (e) => ({
8164
+ const Sb = ["top", "right", "bottom", "left"], dn = Math.min, wt = Math.max, Ao = Math.round, Jr = Math.floor, Xt = (e) => ({
8147
8165
  x: e,
8148
8166
  y: e
8149
8167
  }), Cb = {
@@ -8156,12 +8174,12 @@ const Sb = ["top", "right", "bottom", "left"], dn = Math.min, xt = Math.max, Ao
8156
8174
  end: "start"
8157
8175
  };
8158
8176
  function pi(e, t, n) {
8159
- return xt(e, dn(t, n));
8177
+ return wt(e, dn(t, n));
8160
8178
  }
8161
- function en(e, t) {
8179
+ function nn(e, t) {
8162
8180
  return typeof e == "function" ? e(t) : e;
8163
8181
  }
8164
- function tn(e) {
8182
+ function rn(e) {
8165
8183
  return e.split("-")[0];
8166
8184
  }
8167
8185
  function nr(e) {
@@ -8174,11 +8192,11 @@ function ta(e) {
8174
8192
  return e === "y" ? "height" : "width";
8175
8193
  }
8176
8194
  const Eb = /* @__PURE__ */ new Set(["top", "bottom"]);
8177
- function Gt(e) {
8178
- return Eb.has(tn(e)) ? "y" : "x";
8195
+ function Yt(e) {
8196
+ return Eb.has(rn(e)) ? "y" : "x";
8179
8197
  }
8180
8198
  function na(e) {
8181
- return ea(Gt(e));
8199
+ return ea(Yt(e));
8182
8200
  }
8183
8201
  function Rb(e, t, n) {
8184
8202
  n === void 0 && (n = !1);
@@ -8208,7 +8226,7 @@ function jb(e, t, n) {
8208
8226
  }
8209
8227
  function Pb(e, t, n, r) {
8210
8228
  const o = nr(e);
8211
- let s = jb(tn(e), n === "start", r);
8229
+ let s = jb(rn(e), n === "start", r);
8212
8230
  return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(hi)))), s;
8213
8231
  }
8214
8232
  function jo(e) {
@@ -8254,7 +8272,7 @@ function zl(e, t, n) {
8254
8272
  reference: r,
8255
8273
  floating: o
8256
8274
  } = e;
8257
- const s = Gt(t), i = na(t), a = ta(i), c = tn(t), u = s === "y", d = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, h = r[a] / 2 - o[a] / 2;
8275
+ const s = Yt(t), i = na(t), a = ta(i), c = rn(t), u = s === "y", d = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, h = r[a] / 2 - o[a] / 2;
8258
8276
  let x;
8259
8277
  switch (c) {
8260
8278
  case "top":
@@ -8374,7 +8392,7 @@ async function Rr(e, t) {
8374
8392
  elementContext: p = "floating",
8375
8393
  altBoundary: h = !1,
8376
8394
  padding: x = 0
8377
- } = en(t, e), m = Pu(x), g = a[h ? p === "floating" ? "reference" : "floating" : p], w = Po(await s.getClippingRect({
8395
+ } = nn(t, e), m = Pu(x), g = a[h ? p === "floating" ? "reference" : "floating" : p], w = Po(await s.getClippingRect({
8378
8396
  element: (n = await (s.isElement == null ? void 0 : s.isElement(g))) == null || n ? g : g.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
8379
8397
  boundary: u,
8380
8398
  rootBoundary: d,
@@ -8418,7 +8436,7 @@ const Ob = (e) => ({
8418
8436
  } = t, {
8419
8437
  element: u,
8420
8438
  padding: d = 0
8421
- } = en(e, t) || {};
8439
+ } = nn(e, t) || {};
8422
8440
  if (u == null)
8423
8441
  return {};
8424
8442
  const p = Pu(d), h = {
@@ -8461,10 +8479,10 @@ const Ob = (e) => ({
8461
8479
  fallbackAxisSideDirection: m = "none",
8462
8480
  flipAlignment: v = !0,
8463
8481
  ...g
8464
- } = en(e, t);
8482
+ } = nn(e, t);
8465
8483
  if ((n = s.arrow) != null && n.alignmentOffset)
8466
8484
  return {};
8467
- const w = tn(o), b = Gt(a), y = tn(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = h || (y || !v ? [jo(a)] : Ib(a)), C = m !== "none";
8485
+ const w = rn(o), b = Yt(a), y = rn(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = h || (y || !v ? [jo(a)] : Ib(a)), C = m !== "none";
8468
8486
  !h && C && S.push(...Pb(a, v, m, R));
8469
8487
  const E = [a, ...S], I = await Rr(t, g), j = [];
8470
8488
  let P = ((r = s.flip) == null ? void 0 : r.overflows) || [];
@@ -8478,9 +8496,9 @@ const Ob = (e) => ({
8478
8496
  }], !j.every((N) => N <= 0)) {
8479
8497
  var D, H;
8480
8498
  const N = (((D = s.flip) == null ? void 0 : D.index) || 0) + 1, _ = E[N];
8481
- if (_ && (!(p === "alignment" ? b !== Gt(_) : !1) || // We leave the current main axis only if every placement on that axis
8499
+ if (_ && (!(p === "alignment" ? b !== Yt(_) : !1) || // We leave the current main axis only if every placement on that axis
8482
8500
  // overflows the main axis.
8483
- P.every((F) => Gt(F.placement) === b ? F.overflows[0] > 0 : !0)))
8501
+ P.every((F) => Yt(F.placement) === b ? F.overflows[0] > 0 : !0)))
8484
8502
  return {
8485
8503
  data: {
8486
8504
  index: N,
@@ -8497,7 +8515,7 @@ const Ob = (e) => ({
8497
8515
  var G;
8498
8516
  const V = (G = P.filter((F) => {
8499
8517
  if (C) {
8500
- const O = Gt(F.placement);
8518
+ const O = Yt(F.placement);
8501
8519
  return O === b || // Create a bias to the `y` side axis due to horizontal
8502
8520
  // reading directions favoring greater width.
8503
8521
  O === "y";
@@ -8543,7 +8561,7 @@ const Db = function(e) {
8543
8561
  } = t, {
8544
8562
  strategy: r = "referenceHidden",
8545
8563
  ...o
8546
- } = en(e, t);
8564
+ } = nn(e, t);
8547
8565
  switch (r) {
8548
8566
  case "referenceHidden": {
8549
8567
  const s = await Rr(t, {
@@ -8580,7 +8598,7 @@ async function Lb(e, t) {
8580
8598
  placement: n,
8581
8599
  platform: r,
8582
8600
  elements: o
8583
- } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = tn(n), a = nr(n), c = Gt(n) === "y", u = ku.has(i) ? -1 : 1, d = s && c ? -1 : 1, p = en(t, e);
8601
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = rn(n), a = nr(n), c = Yt(n) === "y", u = ku.has(i) ? -1 : 1, d = s && c ? -1 : 1, p = nn(t, e);
8584
8602
  let {
8585
8603
  mainAxis: h,
8586
8604
  crossAxis: x,
@@ -8649,10 +8667,10 @@ const Fb = function(e) {
8649
8667
  }
8650
8668
  },
8651
8669
  ...c
8652
- } = en(e, t), u = {
8670
+ } = nn(e, t), u = {
8653
8671
  x: n,
8654
8672
  y: r
8655
- }, d = await Rr(t, c), p = Gt(tn(o)), h = ea(p);
8673
+ }, d = await Rr(t, c), p = Yt(rn(o)), h = ea(p);
8656
8674
  let x = u[h], m = u[p];
8657
8675
  if (s) {
8658
8676
  const g = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", b = x + d[g], y = x - d[w];
@@ -8694,12 +8712,12 @@ const Fb = function(e) {
8694
8712
  offset: a = 0,
8695
8713
  mainAxis: c = !0,
8696
8714
  crossAxis: u = !0
8697
- } = en(e, t), d = {
8715
+ } = nn(e, t), d = {
8698
8716
  x: n,
8699
8717
  y: r
8700
- }, p = Gt(o), h = ea(p);
8718
+ }, p = Yt(o), h = ea(p);
8701
8719
  let x = d[h], m = d[p];
8702
- const v = en(a, t), g = typeof v == "number" ? {
8720
+ const v = nn(a, t), g = typeof v == "number" ? {
8703
8721
  mainAxis: v,
8704
8722
  crossAxis: 0
8705
8723
  } : {
@@ -8713,7 +8731,7 @@ const Fb = function(e) {
8713
8731
  }
8714
8732
  if (u) {
8715
8733
  var w, b;
8716
- const y = h === "y" ? "width" : "height", R = ku.has(tn(o)), S = s.reference[p] - s.floating[y] + (R && ((w = i.offset) == null ? void 0 : w[p]) || 0) + (R ? 0 : g.crossAxis), C = s.reference[p] + s.reference[y] + (R ? 0 : ((b = i.offset) == null ? void 0 : b[p]) || 0) - (R ? g.crossAxis : 0);
8734
+ const y = h === "y" ? "width" : "height", R = ku.has(rn(o)), S = s.reference[p] - s.floating[y] + (R && ((w = i.offset) == null ? void 0 : w[p]) || 0) + (R ? 0 : g.crossAxis), C = s.reference[p] + s.reference[y] + (R ? 0 : ((b = i.offset) == null ? void 0 : b[p]) || 0) - (R ? g.crossAxis : 0);
8717
8735
  m < S ? m = S : m > C && (m = C);
8718
8736
  }
8719
8737
  return {
@@ -8737,7 +8755,7 @@ const Fb = function(e) {
8737
8755
  apply: c = () => {
8738
8756
  },
8739
8757
  ...u
8740
- } = en(e, t), d = await Rr(t, u), p = tn(o), h = nr(o), x = Gt(o) === "y", {
8758
+ } = nn(e, t), d = await Rr(t, u), p = rn(o), h = nr(o), x = Yt(o) === "y", {
8741
8759
  width: m,
8742
8760
  height: v
8743
8761
  } = s.floating;
@@ -8746,8 +8764,8 @@ const Fb = function(e) {
8746
8764
  const b = v - d.top - d.bottom, y = m - d.left - d.right, R = dn(v - d[g], b), S = dn(m - d[w], y), C = !t.middlewareData.shift;
8747
8765
  let E = R, I = S;
8748
8766
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (E = b), C && !h) {
8749
- const P = xt(d.left, 0), D = xt(d.right, 0), H = xt(d.top, 0), G = xt(d.bottom, 0);
8750
- x ? I = m - 2 * (P !== 0 || D !== 0 ? P + D : xt(d.left, d.right)) : E = v - 2 * (H !== 0 || G !== 0 ? H + G : xt(d.top, d.bottom));
8767
+ const P = wt(d.left, 0), D = wt(d.right, 0), H = wt(d.top, 0), G = wt(d.bottom, 0);
8768
+ x ? I = m - 2 * (P !== 0 || D !== 0 ? P + D : wt(d.left, d.right)) : E = v - 2 * (H !== 0 || G !== 0 ? H + G : wt(d.top, d.bottom));
8751
8769
  }
8752
8770
  await c({
8753
8771
  ...t,
@@ -8769,25 +8787,25 @@ function Qo() {
8769
8787
  function rr(e) {
8770
8788
  return _u(e) ? (e.nodeName || "").toLowerCase() : "#document";
8771
8789
  }
8772
- function yt(e) {
8790
+ function Ct(e) {
8773
8791
  var t;
8774
8792
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
8775
8793
  }
8776
- function qt(e) {
8794
+ function Zt(e) {
8777
8795
  var t;
8778
8796
  return (t = (_u(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
8779
8797
  }
8780
8798
  function _u(e) {
8781
- return Qo() ? e instanceof Node || e instanceof yt(e).Node : !1;
8799
+ return Qo() ? e instanceof Node || e instanceof Ct(e).Node : !1;
8782
8800
  }
8783
- function Dt(e) {
8784
- return Qo() ? e instanceof Element || e instanceof yt(e).Element : !1;
8801
+ function Bt(e) {
8802
+ return Qo() ? e instanceof Element || e instanceof Ct(e).Element : !1;
8785
8803
  }
8786
- function Yt(e) {
8787
- return Qo() ? e instanceof HTMLElement || e instanceof yt(e).HTMLElement : !1;
8804
+ function qt(e) {
8805
+ return Qo() ? e instanceof HTMLElement || e instanceof Ct(e).HTMLElement : !1;
8788
8806
  }
8789
8807
  function Vl(e) {
8790
- return !Qo() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof yt(e).ShadowRoot;
8808
+ return !Qo() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Ct(e).ShadowRoot;
8791
8809
  }
8792
8810
  const zb = /* @__PURE__ */ new Set(["inline", "contents"]);
8793
8811
  function $r(e) {
@@ -8796,7 +8814,7 @@ function $r(e) {
8796
8814
  overflowX: n,
8797
8815
  overflowY: r,
8798
8816
  display: o
8799
- } = Lt(e);
8817
+ } = Ht(e);
8800
8818
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !zb.has(o);
8801
8819
  }
8802
8820
  const Ub = /* @__PURE__ */ new Set(["table", "td", "th"]);
@@ -8815,12 +8833,12 @@ function es(e) {
8815
8833
  }
8816
8834
  const Gb = ["transform", "translate", "scale", "rotate", "perspective"], Kb = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Yb = ["paint", "layout", "strict", "content"];
8817
8835
  function ra(e) {
8818
- const t = oa(), n = Dt(e) ? Lt(e) : e;
8836
+ const t = oa(), n = Bt(e) ? Ht(e) : e;
8819
8837
  return Gb.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Kb.some((r) => (n.willChange || "").includes(r)) || Yb.some((r) => (n.contain || "").includes(r));
8820
8838
  }
8821
8839
  function Xb(e) {
8822
8840
  let t = fn(e);
8823
- for (; Yt(t) && !Yn(t); ) {
8841
+ for (; qt(t) && !Yn(t); ) {
8824
8842
  if (ra(t))
8825
8843
  return t;
8826
8844
  if (es(t))
@@ -8836,11 +8854,11 @@ const qb = /* @__PURE__ */ new Set(["html", "body", "#document"]);
8836
8854
  function Yn(e) {
8837
8855
  return qb.has(rr(e));
8838
8856
  }
8839
- function Lt(e) {
8840
- return yt(e).getComputedStyle(e);
8857
+ function Ht(e) {
8858
+ return Ct(e).getComputedStyle(e);
8841
8859
  }
8842
8860
  function ts(e) {
8843
- return Dt(e) ? {
8861
+ return Bt(e) ? {
8844
8862
  scrollLeft: e.scrollLeft,
8845
8863
  scrollTop: e.scrollTop
8846
8864
  } : {
@@ -8856,18 +8874,18 @@ function fn(e) {
8856
8874
  e.assignedSlot || // DOM Element detected.
8857
8875
  e.parentNode || // ShadowRoot detected.
8858
8876
  Vl(e) && e.host || // Fallback.
8859
- qt(e)
8877
+ Zt(e)
8860
8878
  );
8861
8879
  return Vl(t) ? t.host : t;
8862
8880
  }
8863
8881
  function Ou(e) {
8864
8882
  const t = fn(e);
8865
- return Yn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Yt(t) && $r(t) ? t : Ou(t);
8883
+ return Yn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : qt(t) && $r(t) ? t : Ou(t);
8866
8884
  }
8867
8885
  function Ir(e, t, n) {
8868
8886
  var r;
8869
8887
  t === void 0 && (t = []), n === void 0 && (n = !0);
8870
- const o = Ou(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = yt(o);
8888
+ const o = Ou(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = Ct(o);
8871
8889
  if (s) {
8872
8890
  const a = mi(i);
8873
8891
  return t.concat(i, i.visualViewport || [], $r(o) ? o : [], a && n ? Ir(a) : []);
@@ -8878,9 +8896,9 @@ function mi(e) {
8878
8896
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
8879
8897
  }
8880
8898
  function Mu(e) {
8881
- const t = Lt(e);
8899
+ const t = Ht(e);
8882
8900
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
8883
- const o = Yt(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Ao(n) !== s || Ao(r) !== i;
8901
+ const o = qt(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Ao(n) !== s || Ao(r) !== i;
8884
8902
  return a && (n = s, r = i), {
8885
8903
  width: n,
8886
8904
  height: r,
@@ -8888,12 +8906,12 @@ function Mu(e) {
8888
8906
  };
8889
8907
  }
8890
8908
  function sa(e) {
8891
- return Dt(e) ? e : e.contextElement;
8909
+ return Bt(e) ? e : e.contextElement;
8892
8910
  }
8893
8911
  function Wn(e) {
8894
8912
  const t = sa(e);
8895
- if (!Yt(t))
8896
- return Kt(1);
8913
+ if (!qt(t))
8914
+ return Xt(1);
8897
8915
  const n = t.getBoundingClientRect(), {
8898
8916
  width: r,
8899
8917
  height: o,
@@ -8905,30 +8923,30 @@ function Wn(e) {
8905
8923
  y: a
8906
8924
  };
8907
8925
  }
8908
- const Jb = /* @__PURE__ */ Kt(0);
8926
+ const Jb = /* @__PURE__ */ Xt(0);
8909
8927
  function Du(e) {
8910
- const t = yt(e);
8928
+ const t = Ct(e);
8911
8929
  return !oa() || !t.visualViewport ? Jb : {
8912
8930
  x: t.visualViewport.offsetLeft,
8913
8931
  y: t.visualViewport.offsetTop
8914
8932
  };
8915
8933
  }
8916
8934
  function Zb(e, t, n) {
8917
- return t === void 0 && (t = !1), !n || t && n !== yt(e) ? !1 : t;
8935
+ return t === void 0 && (t = !1), !n || t && n !== Ct(e) ? !1 : t;
8918
8936
  }
8919
8937
  function Rn(e, t, n, r) {
8920
8938
  t === void 0 && (t = !1), n === void 0 && (n = !1);
8921
8939
  const o = e.getBoundingClientRect(), s = sa(e);
8922
- let i = Kt(1);
8923
- t && (r ? Dt(r) && (i = Wn(r)) : i = Wn(e));
8924
- const a = Zb(s, n, r) ? Du(s) : Kt(0);
8940
+ let i = Xt(1);
8941
+ t && (r ? Bt(r) && (i = Wn(r)) : i = Wn(e));
8942
+ const a = Zb(s, n, r) ? Du(s) : Xt(0);
8925
8943
  let c = (o.left + a.x) / i.x, u = (o.top + a.y) / i.y, d = o.width / i.x, p = o.height / i.y;
8926
8944
  if (s) {
8927
- const h = yt(s), x = r && Dt(r) ? yt(r) : r;
8945
+ const h = Ct(s), x = r && Bt(r) ? Ct(r) : r;
8928
8946
  let m = h, v = mi(m);
8929
8947
  for (; v && r && x !== m; ) {
8930
- const g = Wn(v), w = v.getBoundingClientRect(), b = Lt(v), y = w.left + (v.clientLeft + parseFloat(b.paddingLeft)) * g.x, R = w.top + (v.clientTop + parseFloat(b.paddingTop)) * g.y;
8931
- c *= g.x, u *= g.y, d *= g.x, p *= g.y, c += y, u += R, m = yt(v), v = mi(m);
8948
+ const g = Wn(v), w = v.getBoundingClientRect(), b = Ht(v), y = w.left + (v.clientLeft + parseFloat(b.paddingLeft)) * g.x, R = w.top + (v.clientTop + parseFloat(b.paddingTop)) * g.y;
8949
+ c *= g.x, u *= g.y, d *= g.x, p *= g.y, c += y, u += R, m = Ct(v), v = mi(m);
8932
8950
  }
8933
8951
  }
8934
8952
  return Po({
@@ -8940,7 +8958,7 @@ function Rn(e, t, n, r) {
8940
8958
  }
8941
8959
  function ns(e, t) {
8942
8960
  const n = ts(e).scrollLeft;
8943
- return t ? t.left + n : Rn(qt(e)).left + n;
8961
+ return t ? t.left + n : Rn(Zt(e)).left + n;
8944
8962
  }
8945
8963
  function Lu(e, t) {
8946
8964
  const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - ns(e, n), o = n.top + t.scrollTop;
@@ -8956,19 +8974,19 @@ function Qb(e) {
8956
8974
  offsetParent: r,
8957
8975
  strategy: o
8958
8976
  } = e;
8959
- const s = o === "fixed", i = qt(r), a = t ? es(t.floating) : !1;
8977
+ const s = o === "fixed", i = Zt(r), a = t ? es(t.floating) : !1;
8960
8978
  if (r === i || a && s)
8961
8979
  return n;
8962
8980
  let c = {
8963
8981
  scrollLeft: 0,
8964
8982
  scrollTop: 0
8965
- }, u = Kt(1);
8966
- const d = Kt(0), p = Yt(r);
8967
- if ((p || !p && !s) && ((rr(r) !== "body" || $r(i)) && (c = ts(r)), Yt(r))) {
8983
+ }, u = Xt(1);
8984
+ const d = Xt(0), p = qt(r);
8985
+ if ((p || !p && !s) && ((rr(r) !== "body" || $r(i)) && (c = ts(r)), qt(r))) {
8968
8986
  const x = Rn(r);
8969
8987
  u = Wn(r), d.x = x.x + r.clientLeft, d.y = x.y + r.clientTop;
8970
8988
  }
8971
- const h = i && !p && !s ? Lu(i, c) : Kt(0);
8989
+ const h = i && !p && !s ? Lu(i, c) : Xt(0);
8972
8990
  return {
8973
8991
  width: n.width * u.x,
8974
8992
  height: n.height * u.y,
@@ -8980,10 +8998,10 @@ function ew(e) {
8980
8998
  return Array.from(e.getClientRects());
8981
8999
  }
8982
9000
  function tw(e) {
8983
- const t = qt(e), n = ts(e), r = e.ownerDocument.body, o = xt(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = xt(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
9001
+ const t = Zt(e), n = ts(e), r = e.ownerDocument.body, o = wt(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = wt(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
8984
9002
  let i = -n.scrollLeft + ns(e);
8985
9003
  const a = -n.scrollTop;
8986
- return Lt(r).direction === "rtl" && (i += xt(t.clientWidth, r.clientWidth) - o), {
9004
+ return Ht(r).direction === "rtl" && (i += wt(t.clientWidth, r.clientWidth) - o), {
8987
9005
  width: o,
8988
9006
  height: s,
8989
9007
  x: i,
@@ -8992,7 +9010,7 @@ function tw(e) {
8992
9010
  }
8993
9011
  const Gl = 25;
8994
9012
  function nw(e, t) {
8995
- const n = yt(e), r = qt(e), o = n.visualViewport;
9013
+ const n = Ct(e), r = Zt(e), o = n.visualViewport;
8996
9014
  let s = r.clientWidth, i = r.clientHeight, a = 0, c = 0;
8997
9015
  if (o) {
8998
9016
  s = o.width, i = o.height;
@@ -9013,7 +9031,7 @@ function nw(e, t) {
9013
9031
  }
9014
9032
  const rw = /* @__PURE__ */ new Set(["absolute", "fixed"]);
9015
9033
  function ow(e, t) {
9016
- const n = Rn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Yt(e) ? Wn(e) : Kt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = r * s.y;
9034
+ const n = Rn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = qt(e) ? Wn(e) : Xt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = r * s.y;
9017
9035
  return {
9018
9036
  width: i,
9019
9037
  height: a,
@@ -9026,8 +9044,8 @@ function Kl(e, t, n) {
9026
9044
  if (t === "viewport")
9027
9045
  r = nw(e, n);
9028
9046
  else if (t === "document")
9029
- r = tw(qt(e));
9030
- else if (Dt(t))
9047
+ r = tw(Zt(e));
9048
+ else if (Bt(t))
9031
9049
  r = ow(t, n);
9032
9050
  else {
9033
9051
  const o = Du(e);
@@ -9042,17 +9060,17 @@ function Kl(e, t, n) {
9042
9060
  }
9043
9061
  function Fu(e, t) {
9044
9062
  const n = fn(e);
9045
- return n === t || !Dt(n) || Yn(n) ? !1 : Lt(n).position === "fixed" || Fu(n, t);
9063
+ return n === t || !Bt(n) || Yn(n) ? !1 : Ht(n).position === "fixed" || Fu(n, t);
9046
9064
  }
9047
9065
  function sw(e, t) {
9048
9066
  const n = t.get(e);
9049
9067
  if (n)
9050
9068
  return n;
9051
- let r = Ir(e, [], !1).filter((a) => Dt(a) && rr(a) !== "body"), o = null;
9052
- const s = Lt(e).position === "fixed";
9069
+ let r = Ir(e, [], !1).filter((a) => Bt(a) && rr(a) !== "body"), o = null;
9070
+ const s = Ht(e).position === "fixed";
9053
9071
  let i = s ? fn(e) : e;
9054
- for (; Dt(i) && !Yn(i); ) {
9055
- const a = Lt(i), c = ra(i);
9072
+ for (; Bt(i) && !Yn(i); ) {
9073
+ const a = Ht(i), c = ra(i);
9056
9074
  !c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && rw.has(o.position) || $r(i) && !c && Fu(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = fn(i);
9057
9075
  }
9058
9076
  return t.set(e, r), r;
@@ -9066,7 +9084,7 @@ function iw(e) {
9066
9084
  } = e;
9067
9085
  const i = [...n === "clippingAncestors" ? es(t) ? [] : sw(t, this._c) : [].concat(n), r], a = i[0], c = i.reduce((u, d) => {
9068
9086
  const p = Kl(t, d, o);
9069
- return u.top = xt(p.top, u.top), u.right = dn(p.right, u.right), u.bottom = dn(p.bottom, u.bottom), u.left = xt(p.left, u.left), u;
9087
+ return u.top = wt(p.top, u.top), u.right = dn(p.right, u.right), u.bottom = dn(p.bottom, u.bottom), u.left = wt(p.left, u.left), u;
9070
9088
  }, Kl(t, a, o));
9071
9089
  return {
9072
9090
  width: c.right - c.left,
@@ -9086,12 +9104,12 @@ function aw(e) {
9086
9104
  };
9087
9105
  }
9088
9106
  function lw(e, t, n) {
9089
- const r = Yt(t), o = qt(t), s = n === "fixed", i = Rn(e, !0, s, t);
9107
+ const r = qt(t), o = Zt(t), s = n === "fixed", i = Rn(e, !0, s, t);
9090
9108
  let a = {
9091
9109
  scrollLeft: 0,
9092
9110
  scrollTop: 0
9093
9111
  };
9094
- const c = Kt(0);
9112
+ const c = Xt(0);
9095
9113
  function u() {
9096
9114
  c.x = ns(o);
9097
9115
  }
@@ -9101,7 +9119,7 @@ function lw(e, t, n) {
9101
9119
  c.x = x.x + t.clientLeft, c.y = x.y + t.clientTop;
9102
9120
  } else o && u();
9103
9121
  s && !r && o && u();
9104
- const d = o && !r && !s ? Lu(o, a) : Kt(0), p = i.left + a.scrollLeft - c.x - d.x, h = i.top + a.scrollTop - c.y - d.y;
9122
+ const d = o && !r && !s ? Lu(o, a) : Xt(0), p = i.left + a.scrollLeft - c.x - d.x, h = i.top + a.scrollTop - c.y - d.y;
9105
9123
  return {
9106
9124
  x: p,
9107
9125
  y: h,
@@ -9110,24 +9128,24 @@ function lw(e, t, n) {
9110
9128
  };
9111
9129
  }
9112
9130
  function Bs(e) {
9113
- return Lt(e).position === "static";
9131
+ return Ht(e).position === "static";
9114
9132
  }
9115
9133
  function Yl(e, t) {
9116
- if (!Yt(e) || Lt(e).position === "fixed")
9134
+ if (!qt(e) || Ht(e).position === "fixed")
9117
9135
  return null;
9118
9136
  if (t)
9119
9137
  return t(e);
9120
9138
  let n = e.offsetParent;
9121
- return qt(e) === n && (n = n.ownerDocument.body), n;
9139
+ return Zt(e) === n && (n = n.ownerDocument.body), n;
9122
9140
  }
9123
9141
  function Bu(e, t) {
9124
- const n = yt(e);
9142
+ const n = Ct(e);
9125
9143
  if (es(e))
9126
9144
  return n;
9127
- if (!Yt(e)) {
9145
+ if (!qt(e)) {
9128
9146
  let o = fn(e);
9129
9147
  for (; o && !Yn(o); ) {
9130
- if (Dt(o) && !Bs(o))
9148
+ if (Bt(o) && !Bs(o))
9131
9149
  return o;
9132
9150
  o = fn(o);
9133
9151
  }
@@ -9151,18 +9169,18 @@ const cw = async function(e) {
9151
9169
  };
9152
9170
  };
9153
9171
  function uw(e) {
9154
- return Lt(e).direction === "rtl";
9172
+ return Ht(e).direction === "rtl";
9155
9173
  }
9156
9174
  const dw = {
9157
9175
  convertOffsetParentRelativeRectToViewportRelativeRect: Qb,
9158
- getDocumentElement: qt,
9176
+ getDocumentElement: Zt,
9159
9177
  getClippingRect: iw,
9160
9178
  getOffsetParent: Bu,
9161
9179
  getElementRects: cw,
9162
9180
  getClientRects: ew,
9163
9181
  getDimensions: aw,
9164
9182
  getScale: Wn,
9165
- isElement: Dt,
9183
+ isElement: Bt,
9166
9184
  isRTL: uw
9167
9185
  };
9168
9186
  function Hu(e, t) {
@@ -9170,7 +9188,7 @@ function Hu(e, t) {
9170
9188
  }
9171
9189
  function fw(e, t) {
9172
9190
  let n = null, r;
9173
- const o = qt(e);
9191
+ const o = Zt(e);
9174
9192
  function s() {
9175
9193
  var a;
9176
9194
  clearTimeout(r), (a = n) == null || a.disconnect(), n = null;
@@ -9187,7 +9205,7 @@ function fw(e, t) {
9187
9205
  return;
9188
9206
  const m = Jr(p), v = Jr(o.clientWidth - (d + h)), g = Jr(o.clientHeight - (p + x)), w = Jr(d), y = {
9189
9207
  rootMargin: -m + "px " + -v + "px " + -g + "px " + -w + "px",
9190
- threshold: xt(0, dn(1, c)) || 1
9208
+ threshold: wt(0, dn(1, c)) || 1
9191
9209
  };
9192
9210
  let R = !0;
9193
9211
  function S(C) {
@@ -9472,7 +9490,7 @@ zu.displayName = kw;
9472
9490
  var _w = zu;
9473
9491
  function Uu(e) {
9474
9492
  const [t, n] = f.useState(void 0);
9475
- return nt(() => {
9493
+ return ot(() => {
9476
9494
  if (e) {
9477
9495
  n({ width: e.offsetWidth, height: e.offsetHeight });
9478
9496
  const r = new ResizeObserver((o) => {
@@ -9492,7 +9510,7 @@ function Uu(e) {
9492
9510
  n(void 0);
9493
9511
  }, [e]), t;
9494
9512
  }
9495
- var ia = "Popper", [Wu, or] = Bt(ia), [Ow, Vu] = Wu(ia), Gu = (e) => {
9513
+ var ia = "Popper", [Wu, or] = zt(ia), [Ow, Vu] = Wu(ia), Gu = (e) => {
9496
9514
  const { __scopePopper: t, children: n } = e, [r, o] = f.useState(null);
9497
9515
  return /* @__PURE__ */ l.jsx(Ow, { scope: t, anchor: r, onAnchorChange: o, children: n });
9498
9516
  };
@@ -9525,7 +9543,7 @@ var aa = "PopperContent", [Mw, Dw] = Wu(aa), Xu = f.forwardRef(
9525
9543
  updatePositionStrategy: x = "optimized",
9526
9544
  onPlaced: m,
9527
9545
  ...v
9528
- } = e, g = Vu(aa, n), [w, b] = f.useState(null), y = Re(t, (Oe) => b(Oe)), [R, S] = f.useState(null), C = Uu(R), E = (C == null ? void 0 : C.width) ?? 0, I = (C == null ? void 0 : C.height) ?? 0, j = r + (s !== "center" ? "-" + s : ""), P = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, D = Array.isArray(u) ? u : [u], H = D.length > 0, G = {
9546
+ } = e, g = Vu(aa, n), [w, b] = f.useState(null), y = Re(t, (Me) => b(Me)), [R, S] = f.useState(null), C = Uu(R), E = (C == null ? void 0 : C.width) ?? 0, I = (C == null ? void 0 : C.height) ?? 0, j = r + (s !== "center" ? "-" + s : ""), P = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, D = Array.isArray(u) ? u : [u], H = D.length > 0, G = {
9529
9547
  padding: P,
9530
9548
  boundary: D.filter(Fw),
9531
9549
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -9534,7 +9552,7 @@ var aa = "PopperContent", [Mw, Dw] = Wu(aa), Xu = f.forwardRef(
9534
9552
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
9535
9553
  strategy: "fixed",
9536
9554
  placement: j,
9537
- whileElementsMounted: (...Oe) => pw(...Oe, {
9555
+ whileElementsMounted: (...Me) => pw(...Me, {
9538
9556
  animationFrame: x === "always"
9539
9557
  }),
9540
9558
  elements: {
@@ -9551,8 +9569,8 @@ var aa = "PopperContent", [Mw, Dw] = Wu(aa), Xu = f.forwardRef(
9551
9569
  c && Nw({ ...G }),
9552
9570
  Aw({
9553
9571
  ...G,
9554
- apply: ({ elements: Oe, rects: ue, availableWidth: Ae, availableHeight: le }) => {
9555
- const { width: fe, height: ke } = ue.reference, W = Oe.floating.style;
9572
+ apply: ({ elements: Me, rects: ue, availableWidth: Ae, availableHeight: le }) => {
9573
+ const { width: fe, height: ke } = ue.reference, W = Me.floating.style;
9556
9574
  W.setProperty("--radix-popper-available-width", `${Ae}px`), W.setProperty("--radix-popper-available-height", `${le}px`), W.setProperty("--radix-popper-anchor-width", `${fe}px`), W.setProperty("--radix-popper-anchor-height", `${ke}px`);
9557
9575
  }
9558
9576
  }),
@@ -9560,12 +9578,12 @@ var aa = "PopperContent", [Mw, Dw] = Wu(aa), Xu = f.forwardRef(
9560
9578
  Bw({ arrowWidth: E, arrowHeight: I }),
9561
9579
  h && jw({ strategy: "referenceHidden", ...G })
9562
9580
  ]
9563
- }), [O, z] = Zu(M), Q = rt(m);
9564
- nt(() => {
9581
+ }), [O, z] = Zu(M), Q = st(m);
9582
+ ot(() => {
9565
9583
  V && (Q == null || Q());
9566
9584
  }, [V, Q]);
9567
9585
  const ae = (X = F.arrow) == null ? void 0 : X.x, U = (k = F.arrow) == null ? void 0 : k.y, ee = ((J = F.arrow) == null ? void 0 : J.centerOffset) !== 0, [pe, we] = f.useState();
9568
- return nt(() => {
9586
+ return ot(() => {
9569
9587
  w && we(window.getComputedStyle(w).zIndex);
9570
9588
  }, [w]), /* @__PURE__ */ l.jsx(
9571
9589
  "div",
@@ -9693,12 +9711,12 @@ function Zu(e) {
9693
9711
  var la = Gu, ca = Yu, ua = Xu, da = Ju, Hw = "Portal", rs = f.forwardRef((e, t) => {
9694
9712
  var a;
9695
9713
  const { container: n, ...r } = e, [o, s] = f.useState(!1);
9696
- nt(() => s(!0), []);
9714
+ ot(() => s(!0), []);
9697
9715
  const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
9698
9716
  return i ? dc.createPortal(/* @__PURE__ */ l.jsx(ge.div, { ...r, ref: t }), i) : null;
9699
9717
  });
9700
9718
  rs.displayName = Hw;
9701
- var $s = "rovingFocusGroup.onEntryFocus", $w = { bubbles: !1, cancelable: !0 }, zr = "RovingFocusGroup", [gi, Qu, zw] = Zi(zr), [Uw, ed] = Bt(
9719
+ var $s = "rovingFocusGroup.onEntryFocus", $w = { bubbles: !1, cancelable: !0 }, zr = "RovingFocusGroup", [gi, Qu, zw] = Zi(zr), [Uw, ed] = zt(
9702
9720
  zr,
9703
9721
  [zw]
9704
9722
  ), [Ww, Vw] = Uw(zr), td = f.forwardRef(
@@ -9722,7 +9740,7 @@ var Gw = f.forwardRef((e, t) => {
9722
9740
  defaultProp: a ?? null,
9723
9741
  onChange: c,
9724
9742
  caller: zr
9725
- }), [w, b] = f.useState(!1), y = rt(u), R = Qu(n), S = f.useRef(!1), [C, E] = f.useState(0);
9743
+ }), [w, b] = f.useState(!1), y = st(u), R = Qu(n), S = f.useRef(!1), [C, E] = f.useState(0);
9726
9744
  return f.useEffect(() => {
9727
9745
  const I = h.current;
9728
9746
  if (I)
@@ -9786,7 +9804,7 @@ var Gw = f.forwardRef((e, t) => {
9786
9804
  tabStopId: s,
9787
9805
  children: i,
9788
9806
  ...a
9789
- } = e, c = Ot(), u = s || c, d = Vw(nd, n), p = d.currentTabStopId === u, h = Qu(n), { onFocusableItemAdd: x, onFocusableItemRemove: m, currentTabStopId: v } = d;
9807
+ } = e, c = Lt(), u = s || c, d = Vw(nd, n), p = d.currentTabStopId === u, h = Qu(n), { onFocusableItemAdd: x, onFocusableItemRemove: m, currentTabStopId: v } = d;
9790
9808
  return f.useEffect(() => {
9791
9809
  if (r)
9792
9810
  return x(), () => m();
@@ -9910,14 +9928,14 @@ var Jw = td, Zw = rd, Qw = function(e) {
9910
9928
  return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), ty(r, o, n, "aria-hidden")) : function() {
9911
9929
  return null;
9912
9930
  };
9913
- }, Wt = function() {
9914
- return Wt = Object.assign || function(t) {
9931
+ }, Gt = function() {
9932
+ return Gt = Object.assign || function(t) {
9915
9933
  for (var n, r = 1, o = arguments.length; r < o; r++) {
9916
9934
  n = arguments[r];
9917
9935
  for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
9918
9936
  }
9919
9937
  return t;
9920
- }, Wt.apply(this, arguments);
9938
+ }, Gt.apply(this, arguments);
9921
9939
  };
9922
9940
  function id(e, t) {
9923
9941
  var n = {};
@@ -10038,7 +10056,7 @@ function cy(e, t) {
10038
10056
  function uy(e) {
10039
10057
  e === void 0 && (e = {});
10040
10058
  var t = cy(null);
10041
- return t.options = Wt({ async: !0, ssr: !1 }, e), t;
10059
+ return t.options = Gt({ async: !0, ssr: !1 }, e), t;
10042
10060
  }
10043
10061
  var ad = function(e) {
10044
10062
  var t = e.sideCar, n = id(e, ["sideCar"]);
@@ -10047,7 +10065,7 @@ var ad = function(e) {
10047
10065
  var r = t.read();
10048
10066
  if (!r)
10049
10067
  throw new Error("Sidecar medium not found");
10050
- return f.createElement(r, Wt({}, n));
10068
+ return f.createElement(r, Gt({}, n));
10051
10069
  };
10052
10070
  ad.isSideCarExport = !0;
10053
10071
  function dy(e, t) {
@@ -10059,12 +10077,12 @@ var ld = uy(), Ws = function() {
10059
10077
  onScrollCapture: Ws,
10060
10078
  onWheelCapture: Ws,
10061
10079
  onTouchMoveCapture: Ws
10062
- }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, p = e.shards, h = e.sideCar, x = e.noRelative, m = e.noIsolation, v = e.inert, g = e.allowPinchZoom, w = e.as, b = w === void 0 ? "div" : w, y = e.gapMode, R = id(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = h, C = ay([n, t]), E = Wt(Wt({}, R), o);
10080
+ }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, p = e.shards, h = e.sideCar, x = e.noRelative, m = e.noIsolation, v = e.inert, g = e.allowPinchZoom, w = e.as, b = w === void 0 ? "div" : w, y = e.gapMode, R = id(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = h, C = ay([n, t]), E = Gt(Gt({}, R), o);
10063
10081
  return f.createElement(
10064
10082
  f.Fragment,
10065
10083
  null,
10066
10084
  d && f.createElement(S, { sideCar: ld, removeScrollBar: u, shards: p, noRelative: x, noIsolation: m, inert: v, setCallbacks: s, allowPinchZoom: !!g, lockRef: n, gapMode: y }),
10067
- i ? f.cloneElement(f.Children.only(a), Wt(Wt({}, E), { ref: C })) : f.createElement(b, Wt({}, E, { className: c, ref: C }), a)
10085
+ i ? f.cloneElement(f.Children.only(a), Gt(Gt({}, E), { ref: C })) : f.createElement(b, Gt({}, E, { className: c, ref: C }), a)
10068
10086
  );
10069
10087
  });
10070
10088
  os.defaultProps = {
@@ -10379,7 +10397,7 @@ function Dy(e) {
10379
10397
  }
10380
10398
  const Ly = dy(ld, My);
10381
10399
  var ss = f.forwardRef(function(e, t) {
10382
- return f.createElement(os, Wt({}, e, { ref: t, sideCar: Ly }));
10400
+ return f.createElement(os, Gt({}, e, { ref: t, sideCar: Ly }));
10383
10401
  });
10384
10402
  ss.classNames = os.classNames;
10385
10403
  var xi = ["Enter", " "], Fy = ["ArrowDown", "PageUp", "Home"], pd = ["ArrowUp", "PageDown", "End"], By = [...Fy, ...pd], Hy = {
@@ -10388,12 +10406,12 @@ var xi = ["Enter", " "], Fy = ["ArrowDown", "PageUp", "Home"], pd = ["ArrowUp",
10388
10406
  }, $y = {
10389
10407
  ltr: ["ArrowLeft"],
10390
10408
  rtl: ["ArrowRight"]
10391
- }, Ur = "Menu", [Nr, zy, Uy] = Zi(Ur), [kn, hd] = Bt(Ur, [
10409
+ }, Ur = "Menu", [Nr, zy, Uy] = Zi(Ur), [kn, hd] = zt(Ur, [
10392
10410
  Uy,
10393
10411
  or,
10394
10412
  ed
10395
10413
  ]), is = or(), md = ed(), [Wy, _n] = kn(Ur), [Vy, Wr] = kn(Ur), gd = (e) => {
10396
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = is(t), [c, u] = f.useState(null), d = f.useRef(!1), p = rt(s), h = Jo(o);
10414
+ const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = is(t), [c, u] = f.useState(null), d = f.useRef(!1), p = st(s), h = Jo(o);
10397
10415
  return f.useEffect(() => {
10398
10416
  const x = () => {
10399
10417
  d.current = !0, document.addEventListener("pointerdown", m, { capture: !0, once: !0 }), document.addEventListener("pointermove", m, { capture: !0, once: !0 });
@@ -10435,17 +10453,17 @@ var ha = "MenuPortal", [Ky, vd] = kn(ha, {
10435
10453
  forceMount: void 0
10436
10454
  }), xd = (e) => {
10437
10455
  const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = _n(ha, t);
10438
- return /* @__PURE__ */ l.jsx(Ky, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(gt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(rs, { asChild: !0, container: o, children: r }) }) });
10456
+ return /* @__PURE__ */ l.jsx(Ky, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(rs, { asChild: !0, container: o, children: r }) }) });
10439
10457
  };
10440
10458
  xd.displayName = ha;
10441
- var Rt = "MenuContent", [Yy, ma] = kn(Rt), bd = f.forwardRef(
10459
+ var At = "MenuContent", [Yy, ma] = kn(At), bd = f.forwardRef(
10442
10460
  (e, t) => {
10443
- const n = vd(Rt, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = _n(Rt, e.__scopeMenu), i = Wr(Rt, e.__scopeMenu);
10444
- return /* @__PURE__ */ l.jsx(Nr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(gt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(Nr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ l.jsx(Xy, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(qy, { ...o, ref: t }) }) }) });
10461
+ const n = vd(At, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = _n(At, e.__scopeMenu), i = Wr(At, e.__scopeMenu);
10462
+ return /* @__PURE__ */ l.jsx(Nr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(Nr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ l.jsx(Xy, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(qy, { ...o, ref: t }) }) }) });
10445
10463
  }
10446
10464
  ), Xy = f.forwardRef(
10447
10465
  (e, t) => {
10448
- const n = _n(Rt, e.__scopeMenu), r = f.useRef(null), o = Re(t, r);
10466
+ const n = _n(At, e.__scopeMenu), r = f.useRef(null), o = Re(t, r);
10449
10467
  return f.useEffect(() => {
10450
10468
  const s = r.current;
10451
10469
  if (s) return fa(s);
@@ -10467,7 +10485,7 @@ var Rt = "MenuContent", [Yy, ma] = kn(Rt), bd = f.forwardRef(
10467
10485
  );
10468
10486
  }
10469
10487
  ), qy = f.forwardRef((e, t) => {
10470
- const n = _n(Rt, e.__scopeMenu);
10488
+ const n = _n(At, e.__scopeMenu);
10471
10489
  return /* @__PURE__ */ l.jsx(
10472
10490
  ga,
10473
10491
  {
@@ -10496,7 +10514,7 @@ var Rt = "MenuContent", [Yy, ma] = kn(Rt), bd = f.forwardRef(
10496
10514
  onDismiss: x,
10497
10515
  disableOutsideScroll: m,
10498
10516
  ...v
10499
- } = e, g = _n(Rt, n), w = Wr(Rt, n), b = is(n), y = md(n), R = zy(n), [S, C] = f.useState(null), E = f.useRef(null), I = Re(t, E, g.onContentChange), j = f.useRef(0), P = f.useRef(""), D = f.useRef(0), H = f.useRef(null), G = f.useRef("right"), N = f.useRef(0), _ = m ? ss : f.Fragment, M = m ? { as: Jy, allowPinchZoom: !0 } : void 0, V = (O) => {
10517
+ } = e, g = _n(At, n), w = Wr(At, n), b = is(n), y = md(n), R = zy(n), [S, C] = f.useState(null), E = f.useRef(null), I = Re(t, E, g.onContentChange), j = f.useRef(0), P = f.useRef(""), D = f.useRef(0), H = f.useRef(null), G = f.useRef("right"), N = f.useRef(0), _ = m ? ss : f.Fragment, M = m ? { as: Jy, allowPinchZoom: !0 } : void 0, V = (O) => {
10500
10518
  var X, k;
10501
10519
  const z = P.current + O, Q = R().filter((J) => !J.disabled), ae = document.activeElement, U = (X = Q.find((J) => J.ref.current === ae)) == null ? void 0 : X.textValue, ee = Q.map((J) => J.textValue), pe = cS(ee, z, U), we = (k = Q.find((J) => J.textValue === pe)) == null ? void 0 : k.ref.current;
10502
10520
  (function J(re) {
@@ -10616,7 +10634,7 @@ var Rt = "MenuContent", [Yy, ma] = kn(Rt), bd = f.forwardRef(
10616
10634
  );
10617
10635
  }
10618
10636
  );
10619
- bd.displayName = Rt;
10637
+ bd.displayName = At;
10620
10638
  var Zy = "MenuGroup", va = f.forwardRef(
10621
10639
  (e, t) => {
10622
10640
  const { __scopeMenu: n, ...r } = e;
@@ -10729,7 +10747,7 @@ var Cd = "MenuRadioGroup", [tS, nS] = kn(
10729
10747
  } }
10730
10748
  ), Td = f.forwardRef(
10731
10749
  (e, t) => {
10732
- const { value: n, onValueChange: r, ...o } = e, s = rt(r);
10750
+ const { value: n, onValueChange: r, ...o } = e, s = st(r);
10733
10751
  return /* @__PURE__ */ l.jsx(tS, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ l.jsx(va, { ...o, ref: t }) });
10734
10752
  }
10735
10753
  );
@@ -10765,7 +10783,7 @@ var xa = "MenuItemIndicator", [Id, rS] = kn(
10765
10783
  (e, t) => {
10766
10784
  const { __scopeMenu: n, forceMount: r, ...o } = e, s = rS(xa, n);
10767
10785
  return /* @__PURE__ */ l.jsx(
10768
- gt,
10786
+ xt,
10769
10787
  {
10770
10788
  present: r || Oo(s.checked) || s.checked === !0,
10771
10789
  children: /* @__PURE__ */ l.jsx(
@@ -10876,8 +10894,8 @@ var iS = "MenuSub", [HT, Pd] = kn(iS), fr = "MenuSubTrigger", kd = f.forwardRef(
10876
10894
  kd.displayName = fr;
10877
10895
  var _d = "MenuSubContent", Od = f.forwardRef(
10878
10896
  (e, t) => {
10879
- const n = vd(Rt, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = _n(Rt, e.__scopeMenu), i = Wr(Rt, e.__scopeMenu), a = Pd(_d, e.__scopeMenu), c = f.useRef(null), u = Re(t, c);
10880
- return /* @__PURE__ */ l.jsx(Nr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(gt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(Nr.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(
10897
+ const n = vd(At, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = _n(At, e.__scopeMenu), i = Wr(At, e.__scopeMenu), a = Pd(_d, e.__scopeMenu), c = f.useRef(null), u = Re(t, c);
10898
+ return /* @__PURE__ */ l.jsx(Nr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(Nr.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(
10881
10899
  ga,
10882
10900
  {
10883
10901
  id: a.contentId,
@@ -10953,10 +10971,10 @@ function dS(e, t) {
10953
10971
  function Ar(e) {
10954
10972
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
10955
10973
  }
10956
- var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS = Td, yS = Rd, SS = Nd, CS = Ad, TS = jd, ES = kd, RS = Od, ls = "DropdownMenu", [IS, $T] = Bt(
10974
+ var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS = Td, yS = Rd, SS = Nd, CS = Ad, TS = jd, ES = kd, RS = Od, ls = "DropdownMenu", [IS, $T] = zt(
10957
10975
  ls,
10958
10976
  [hd]
10959
- ), dt = hd(), [NS, Dd] = IS(ls), Ld = (e) => {
10977
+ ), ht = hd(), [NS, Dd] = IS(ls), Ld = (e) => {
10960
10978
  const {
10961
10979
  __scopeDropdownMenu: t,
10962
10980
  children: n,
@@ -10965,7 +10983,7 @@ var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS =
10965
10983
  defaultOpen: s,
10966
10984
  onOpenChange: i,
10967
10985
  modal: a = !0
10968
- } = e, c = dt(t), u = f.useRef(null), [d, p] = un({
10986
+ } = e, c = ht(t), u = f.useRef(null), [d, p] = un({
10969
10987
  prop: o,
10970
10988
  defaultProp: s ?? !1,
10971
10989
  onChange: i,
@@ -10975,9 +10993,9 @@ var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS =
10975
10993
  NS,
10976
10994
  {
10977
10995
  scope: t,
10978
- triggerId: Ot(),
10996
+ triggerId: Lt(),
10979
10997
  triggerRef: u,
10980
- contentId: Ot(),
10998
+ contentId: Lt(),
10981
10999
  open: d,
10982
11000
  onOpenChange: p,
10983
11001
  onOpenToggle: f.useCallback(() => p((h) => !h), [p]),
@@ -10989,7 +11007,7 @@ var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS =
10989
11007
  Ld.displayName = ls;
10990
11008
  var Fd = "DropdownMenuTrigger", Bd = f.forwardRef(
10991
11009
  (e, t) => {
10992
- const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Dd(Fd, n), i = dt(n);
11010
+ const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Dd(Fd, n), i = ht(n);
10993
11011
  return /* @__PURE__ */ l.jsx(pS, { asChild: !0, ...i, children: /* @__PURE__ */ l.jsx(
10994
11012
  ge.button,
10995
11013
  {
@@ -11015,13 +11033,13 @@ var Fd = "DropdownMenuTrigger", Bd = f.forwardRef(
11015
11033
  );
11016
11034
  Bd.displayName = Fd;
11017
11035
  var AS = "DropdownMenuPortal", Hd = (e) => {
11018
- const { __scopeDropdownMenu: t, ...n } = e, r = dt(t);
11036
+ const { __scopeDropdownMenu: t, ...n } = e, r = ht(t);
11019
11037
  return /* @__PURE__ */ l.jsx(hS, { ...r, ...n });
11020
11038
  };
11021
11039
  Hd.displayName = AS;
11022
11040
  var $d = "DropdownMenuContent", zd = f.forwardRef(
11023
11041
  (e, t) => {
11024
- const { __scopeDropdownMenu: n, ...r } = e, o = Dd($d, n), s = dt(n), i = f.useRef(!1);
11042
+ const { __scopeDropdownMenu: n, ...r } = e, o = Dd($d, n), s = ht(n), i = f.useRef(!1);
11025
11043
  return /* @__PURE__ */ l.jsx(
11026
11044
  mS,
11027
11045
  {
@@ -11053,64 +11071,64 @@ var $d = "DropdownMenuContent", zd = f.forwardRef(
11053
11071
  zd.displayName = $d;
11054
11072
  var jS = "DropdownMenuGroup", PS = f.forwardRef(
11055
11073
  (e, t) => {
11056
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11074
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11057
11075
  return /* @__PURE__ */ l.jsx(gS, { ...o, ...r, ref: t });
11058
11076
  }
11059
11077
  );
11060
11078
  PS.displayName = jS;
11061
11079
  var kS = "DropdownMenuLabel", Ud = f.forwardRef(
11062
11080
  (e, t) => {
11063
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11081
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11064
11082
  return /* @__PURE__ */ l.jsx(vS, { ...o, ...r, ref: t });
11065
11083
  }
11066
11084
  );
11067
11085
  Ud.displayName = kS;
11068
11086
  var _S = "DropdownMenuItem", Wd = f.forwardRef(
11069
11087
  (e, t) => {
11070
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11088
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11071
11089
  return /* @__PURE__ */ l.jsx(xS, { ...o, ...r, ref: t });
11072
11090
  }
11073
11091
  );
11074
11092
  Wd.displayName = _S;
11075
11093
  var OS = "DropdownMenuCheckboxItem", Vd = f.forwardRef((e, t) => {
11076
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11094
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11077
11095
  return /* @__PURE__ */ l.jsx(bS, { ...o, ...r, ref: t });
11078
11096
  });
11079
11097
  Vd.displayName = OS;
11080
11098
  var MS = "DropdownMenuRadioGroup", DS = f.forwardRef((e, t) => {
11081
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11099
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11082
11100
  return /* @__PURE__ */ l.jsx(wS, { ...o, ...r, ref: t });
11083
11101
  });
11084
11102
  DS.displayName = MS;
11085
11103
  var LS = "DropdownMenuRadioItem", Gd = f.forwardRef((e, t) => {
11086
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11104
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11087
11105
  return /* @__PURE__ */ l.jsx(yS, { ...o, ...r, ref: t });
11088
11106
  });
11089
11107
  Gd.displayName = LS;
11090
11108
  var FS = "DropdownMenuItemIndicator", Kd = f.forwardRef((e, t) => {
11091
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11109
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11092
11110
  return /* @__PURE__ */ l.jsx(SS, { ...o, ...r, ref: t });
11093
11111
  });
11094
11112
  Kd.displayName = FS;
11095
11113
  var BS = "DropdownMenuSeparator", Yd = f.forwardRef((e, t) => {
11096
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11114
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11097
11115
  return /* @__PURE__ */ l.jsx(CS, { ...o, ...r, ref: t });
11098
11116
  });
11099
11117
  Yd.displayName = BS;
11100
11118
  var HS = "DropdownMenuArrow", $S = f.forwardRef(
11101
11119
  (e, t) => {
11102
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11120
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11103
11121
  return /* @__PURE__ */ l.jsx(TS, { ...o, ...r, ref: t });
11104
11122
  }
11105
11123
  );
11106
11124
  $S.displayName = HS;
11107
11125
  var zS = "DropdownMenuSubTrigger", Xd = f.forwardRef((e, t) => {
11108
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11126
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11109
11127
  return /* @__PURE__ */ l.jsx(ES, { ...o, ...r, ref: t });
11110
11128
  });
11111
11129
  Xd.displayName = zS;
11112
11130
  var US = "DropdownMenuSubContent", qd = f.forwardRef((e, t) => {
11113
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11131
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11114
11132
  return /* @__PURE__ */ l.jsx(
11115
11133
  RS,
11116
11134
  {
@@ -11271,15 +11289,15 @@ function vo({
11271
11289
  loadOlderMessages: j,
11272
11290
  api: P
11273
11291
  } = Mi(), [D, H] = be(null), [G, N] = be(""), [_, M] = be(null), [V, F] = be([]), [O, z] = be(!1), [Q, ae] = be(null), [U, ee] = be(null), [pe, we] = be(!1), [X, k] = be(null), [J, re] = be([]), [ce, ie] = be(null);
11274
- vt(null);
11275
- const Oe = vt(null), ue = vt(null), Ae = vt(null), le = vt(!1), fe = vt(!0), ke = vt(0), W = vt(null), [te, ye] = be("desktop");
11276
- Ze(() => {
11292
+ bt(null);
11293
+ const Me = bt(null), ue = bt(null), Ae = bt(null), le = bt(!1), fe = bt(!0), ke = bt(0), W = bt(null), [te, ye] = be("desktop");
11294
+ et(() => {
11277
11295
  const q = () => {
11278
11296
  const se = window.innerWidth;
11279
11297
  ye(se < 640 ? "phone" : se < 1024 ? "tablet" : "desktop");
11280
11298
  };
11281
11299
  return q(), window.addEventListener("resize", q), () => window.removeEventListener("resize", q);
11282
- }, []), Ze(() => {
11300
+ }, []), et(() => {
11283
11301
  let q = !1;
11284
11302
  if (!h) {
11285
11303
  re([]), ie(null), W.current = null;
@@ -11292,20 +11310,20 @@ function vo({
11292
11310
  if (!(Ee && Ee.threadId === se.threadId && Ee.checkpointId === se.checkpointId))
11293
11311
  return R(h).then((Pe) => {
11294
11312
  if (q) return;
11295
- const At = ((Pe == null ? void 0 : Pe.checkpoints) ?? []).slice().sort((jt, Mn) => new Date(Mn.createdAt).getTime() - new Date(jt.createdAt).getTime());
11296
- re(At), ie((jt) => {
11313
+ const kt = ((Pe == null ? void 0 : Pe.checkpoints) ?? []).slice().sort((_t, Mn) => new Date(Mn.createdAt).getTime() - new Date(_t.createdAt).getTime());
11314
+ re(kt), ie((_t) => {
11297
11315
  var Mn;
11298
- return jt ?? ((Mn = At[0]) == null ? void 0 : Mn.checkpointId) ?? null;
11316
+ return _t ?? ((Mn = kt[0]) == null ? void 0 : Mn.checkpointId) ?? null;
11299
11317
  }), W.current = se;
11300
11318
  }).catch((Pe) => {
11301
11319
  console.error("ChatInterface - listCheckpoints error:", Pe), q || (re([]), W.current = null);
11302
11320
  }), () => {
11303
11321
  q = !0;
11304
11322
  };
11305
- }, [h, y, R]), Ze(() => {
11323
+ }, [h, y, R]), et(() => {
11306
11324
  y && ie(y);
11307
11325
  }, [y]);
11308
- const Me = Ye(async () => {
11326
+ const _e = Ye(async () => {
11309
11327
  if (!E || I) return;
11310
11328
  const q = Ae.current;
11311
11329
  if (!q) return;
@@ -11322,19 +11340,19 @@ function vo({
11322
11340
  le.current = !1;
11323
11341
  return;
11324
11342
  }
11325
- const At = Pe.scrollHeight;
11326
- Pe.scrollTop = Ee + (At - se);
11327
- const jt = At - Pe.scrollTop - Pe.clientHeight;
11328
- fe.current = jt <= 32, le.current = !1;
11343
+ const kt = Pe.scrollHeight;
11344
+ Pe.scrollTop = Ee + (kt - se);
11345
+ const _t = kt - Pe.scrollTop - Pe.clientHeight;
11346
+ fe.current = _t <= 32, le.current = !1;
11329
11347
  });
11330
11348
  }
11331
11349
  }, [E, I, j]);
11332
- Ze(() => {
11350
+ et(() => {
11333
11351
  x.length < ke.current && (fe.current = !0), ke.current = x.length;
11334
- }, [x.length]), Ze(() => {
11352
+ }, [x.length]), et(() => {
11335
11353
  const q = Ae.current;
11336
11354
  q && (le.current || fe.current && (q.scrollTop = q.scrollHeight, fe.current = !0));
11337
- }, [x]), Ze(() => {
11355
+ }, [x]), et(() => {
11338
11356
  (async () => {
11339
11357
  try {
11340
11358
  const se = await P.getAgent("default");
@@ -11343,10 +11361,10 @@ function vo({
11343
11361
  console.warn("Failed to fetch default message:", se), k(null);
11344
11362
  }
11345
11363
  })();
11346
- }, [P]), Ze(() => {
11364
+ }, [P]), et(() => {
11347
11365
  g && !pe && (p == null || p(g));
11348
11366
  }, [g, pe, p]);
11349
- const tt = (q) => {
11367
+ const Je = (q) => {
11350
11368
  if (q.length > po)
11351
11369
  return `Message too long (${q.length}/${po} characters)`;
11352
11370
  try {
@@ -11354,7 +11372,7 @@ function vo({
11354
11372
  } catch (se) {
11355
11373
  return (se == null ? void 0 : se.message) || "Invalid message";
11356
11374
  }
11357
- }, $e = (q) => {
11375
+ }, nt = (q) => {
11358
11376
  const se = q.content || [], Ee = se.filter((Pe) => Pe.type === "text").map((Pe) => Pe.text).join("");
11359
11377
  if (Ee) return Ee;
11360
11378
  try {
@@ -11362,11 +11380,11 @@ function vo({
11362
11380
  } catch {
11363
11381
  return String(se);
11364
11382
  }
11365
- }, Ve = async (q) => {
11383
+ }, Ge = async (q) => {
11366
11384
  const se = q.trim();
11367
11385
  if (!(!se && V.length === 0)) {
11368
11386
  if (se) {
11369
- const Ee = tt(se);
11387
+ const Ee = Je(se);
11370
11388
  if (Ee) {
11371
11389
  M(Ee);
11372
11390
  return;
@@ -11379,20 +11397,20 @@ function vo({
11379
11397
  M(Pe), p == null || p(Pe);
11380
11398
  }
11381
11399
  }
11382
- }, ft = Y.useCallback((q, se) => {
11400
+ }, Tt = Y.useCallback((q, se) => {
11383
11401
  a && (H(q), N(se), M(null));
11384
- }, [a]), at = Y.useCallback(() => {
11402
+ }, [a]), We = Y.useCallback(() => {
11385
11403
  H(null), N(""), M(null);
11386
- }, []), nn = Ye((q, se) => {
11387
- ft(q, se);
11388
- }, [ft]), $t = Ye((q) => {
11404
+ }, []), it = Ye((q, se) => {
11405
+ Tt(q, se);
11406
+ }, [Tt]), Ze = Ye((q) => {
11389
11407
  for (let se = q - 1; se >= 0; se--)
11390
11408
  if (x[se].role === "user") {
11391
- const Ee = $e(x[se]);
11409
+ const Ee = nt(x[se]);
11392
11410
  Ee && w(Ee, { checkpointId: ce || y || void 0 });
11393
11411
  break;
11394
11412
  }
11395
- }, [x, w, ce, y, $e]), rn = (q) => {
11413
+ }, [x, w, ce, y, nt]), ut = (q) => {
11396
11414
  const se = Array.from(q.target.files || []);
11397
11415
  F((Ee) => [...Ee, ...se]);
11398
11416
  }, on = (q) => F((se) => se.filter((Ee, Pe) => q !== Pe)), xn = async (q) => {
@@ -11400,8 +11418,8 @@ function vo({
11400
11418
  if (se) {
11401
11419
  ae(null), ee(null), z(!0);
11402
11420
  try {
11403
- const Ee = await P.uploadExcel(se), Pe = Ee.sheets.map((jt) => `${jt.sheetName} -> ${jt.tableName}`).join(", "), At = Pe ? `Uploaded ${se.name} (${Ee.sheets.length} sheet${Ee.sheets.length === 1 ? "" : "s"}: ${Pe})` : `Uploaded ${se.name}`;
11404
- ee(At), d == null || d({ file: se, response: Ee });
11421
+ const Ee = await P.uploadExcel(se), Pe = Ee.sheets.map((_t) => `${_t.sheetName} -> ${_t.tableName}`).join(", "), kt = Pe ? `Uploaded ${se.name} (${Ee.sheets.length} sheet${Ee.sheets.length === 1 ? "" : "s"}: ${Pe})` : `Uploaded ${se.name}`;
11422
+ ee(kt), d == null || d({ file: se, response: Ee });
11405
11423
  } catch (Ee) {
11406
11424
  const Pe = Ee instanceof Error ? Ee.message : "Failed to upload Excel file";
11407
11425
  console.error("Excel upload failed", Ee), ae(Pe), p == null || p(Pe);
@@ -11413,7 +11431,7 @@ function vo({
11413
11431
  if (!q) return "Unknown";
11414
11432
  const se = Date.parse(q);
11415
11433
  return Number.isNaN(se) ? q : new Date(se).toLocaleString();
11416
- }, Ge = async (q) => {
11434
+ }, Ve = async (q) => {
11417
11435
  if (h) {
11418
11436
  if (!q) {
11419
11437
  await C(), ie(null);
@@ -11446,7 +11464,7 @@ function vo({
11446
11464
  value: ce ?? "",
11447
11465
  onChange: (q) => {
11448
11466
  const se = q.target.value || null;
11449
- Ge(se);
11467
+ Ve(se);
11450
11468
  },
11451
11469
  children: [
11452
11470
  /* @__PURE__ */ l.jsx("option", { value: "", children: "Latest" }),
@@ -11471,7 +11489,7 @@ function vo({
11471
11489
  overscan: 120,
11472
11490
  increaseViewportBy: { top: 200, bottom: 200 },
11473
11491
  startReached: () => {
11474
- Me();
11492
+ _e();
11475
11493
  },
11476
11494
  style: { height: "100%", overscrollBehavior: "contain" },
11477
11495
  components: {
@@ -11502,9 +11520,9 @@ function vo({
11502
11520
  layoutSize: te,
11503
11521
  truncateToolMessages: !1,
11504
11522
  toolMessagePreviewLength: 200,
11505
- onEdit: nn,
11506
- onRegenerate: () => $t(q),
11507
- onCancelEdit: at
11523
+ onEdit: it,
11524
+ onRegenerate: () => Ze(q),
11525
+ onCancelEdit: We
11508
11526
  },
11509
11527
  se.id ?? `msg-${se.role}-${q}-${se.createdAt ?? ""}`
11510
11528
  )
@@ -11523,7 +11541,7 @@ function vo({
11523
11541
  {
11524
11542
  variant: "ghost",
11525
11543
  size: "sm",
11526
- onClick: at,
11544
+ onClick: We,
11527
11545
  className: "text-blue-600 hover:bg-blue-100",
11528
11546
  children: /* @__PURE__ */ l.jsx(hr, { size: 16 })
11529
11547
  }
@@ -11534,10 +11552,10 @@ function vo({
11534
11552
  /* @__PURE__ */ l.jsx(
11535
11553
  "input",
11536
11554
  {
11537
- ref: Oe,
11555
+ ref: Me,
11538
11556
  type: "file",
11539
11557
  multiple: !0,
11540
- onChange: (q) => rn(q),
11558
+ onChange: (q) => ut(q),
11541
11559
  className: "hidden"
11542
11560
  }
11543
11561
  ),
@@ -11594,7 +11612,7 @@ function vo({
11594
11612
  /* @__PURE__ */ l.jsxs(af, { align: "start", sideOffset: 6, className: "w-52", children: [
11595
11613
  s && /* @__PURE__ */ l.jsxs(bi, { onClick: () => {
11596
11614
  var q;
11597
- return (q = Oe.current) == null ? void 0 : q.click();
11615
+ return (q = Me.current) == null ? void 0 : q.click();
11598
11616
  }, className: "cursor-pointer", children: [
11599
11617
  /* @__PURE__ */ l.jsx(Ba, { className: "h-4 w-4 mr-2" }),
11600
11618
  " Attach files or images"
@@ -11624,8 +11642,8 @@ function vo({
11624
11642
  isStreaming: m,
11625
11643
  disabled: !1,
11626
11644
  maxLength: po,
11627
- onSend: Ve,
11628
- onCancelEdit: at,
11645
+ onSend: Ge,
11646
+ onCancelEdit: We,
11629
11647
  textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${D ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${_ ? "border-red-400" : ""} ${c.textarea || ""}`
11630
11648
  }
11631
11649
  ) }),
@@ -11666,7 +11684,7 @@ function wi(e, [t, n]) {
11666
11684
  function t0(e, t) {
11667
11685
  return f.useReducer((n, r) => t[n][r] ?? n, e);
11668
11686
  }
11669
- var wa = "ScrollArea", [lf, zT] = Bt(wa), [n0, Nt] = lf(wa), cf = f.forwardRef(
11687
+ var wa = "ScrollArea", [lf, zT] = zt(wa), [n0, Pt] = lf(wa), cf = f.forwardRef(
11670
11688
  (e, t) => {
11671
11689
  const {
11672
11690
  __scopeScrollArea: n,
@@ -11719,7 +11737,7 @@ var wa = "ScrollArea", [lf, zT] = Bt(wa), [n0, Nt] = lf(wa), cf = f.forwardRef(
11719
11737
  cf.displayName = wa;
11720
11738
  var uf = "ScrollAreaViewport", df = f.forwardRef(
11721
11739
  (e, t) => {
11722
- const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = Nt(uf, n), a = f.useRef(null), c = Re(t, a, i.onViewportChange);
11740
+ const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = Pt(uf, n), a = f.useRef(null), c = Re(t, a, i.onViewportChange);
11723
11741
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
11724
11742
  /* @__PURE__ */ l.jsx(
11725
11743
  "style",
@@ -11759,17 +11777,17 @@ var uf = "ScrollAreaViewport", df = f.forwardRef(
11759
11777
  }
11760
11778
  );
11761
11779
  df.displayName = uf;
11762
- var Jt = "ScrollAreaScrollbar", ya = f.forwardRef(
11780
+ var Qt = "ScrollAreaScrollbar", ya = f.forwardRef(
11763
11781
  (e, t) => {
11764
- const { forceMount: n, ...r } = e, o = Nt(Jt, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
11782
+ const { forceMount: n, ...r } = e, o = Pt(Qt, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
11765
11783
  return f.useEffect(() => (a ? s(!0) : i(!0), () => {
11766
11784
  a ? s(!1) : i(!1);
11767
11785
  }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ l.jsx(r0, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ l.jsx(o0, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ l.jsx(ff, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ l.jsx(Sa, { ...r, ref: t }) : null;
11768
11786
  }
11769
11787
  );
11770
- ya.displayName = Jt;
11788
+ ya.displayName = Qt;
11771
11789
  var r0 = f.forwardRef((e, t) => {
11772
- const { forceMount: n, ...r } = e, o = Nt(Jt, e.__scopeScrollArea), [s, i] = f.useState(!1);
11790
+ const { forceMount: n, ...r } = e, o = Pt(Qt, e.__scopeScrollArea), [s, i] = f.useState(!1);
11773
11791
  return f.useEffect(() => {
11774
11792
  const a = o.scrollArea;
11775
11793
  let c = 0;
@@ -11783,7 +11801,7 @@ var r0 = f.forwardRef((e, t) => {
11783
11801
  window.clearTimeout(c), a.removeEventListener("pointerenter", u), a.removeEventListener("pointerleave", d);
11784
11802
  };
11785
11803
  }
11786
- }, [o.scrollArea, o.scrollHideDelay]), /* @__PURE__ */ l.jsx(gt, { present: n || s, children: /* @__PURE__ */ l.jsx(
11804
+ }, [o.scrollArea, o.scrollHideDelay]), /* @__PURE__ */ l.jsx(xt, { present: n || s, children: /* @__PURE__ */ l.jsx(
11787
11805
  ff,
11788
11806
  {
11789
11807
  "data-state": s ? "visible" : "hidden",
@@ -11792,7 +11810,7 @@ var r0 = f.forwardRef((e, t) => {
11792
11810
  }
11793
11811
  ) });
11794
11812
  }), o0 = f.forwardRef((e, t) => {
11795
- const { forceMount: n, ...r } = e, o = Nt(Jt, e.__scopeScrollArea), s = e.orientation === "horizontal", i = us(() => c("SCROLL_END"), 100), [a, c] = t0("hidden", {
11813
+ const { forceMount: n, ...r } = e, o = Pt(Qt, e.__scopeScrollArea), s = e.orientation === "horizontal", i = us(() => c("SCROLL_END"), 100), [a, c] = t0("hidden", {
11796
11814
  hidden: {
11797
11815
  SCROLL: "scrolling"
11798
11816
  },
@@ -11825,7 +11843,7 @@ var r0 = f.forwardRef((e, t) => {
11825
11843
  };
11826
11844
  return u.addEventListener("scroll", h), () => u.removeEventListener("scroll", h);
11827
11845
  }
11828
- }, [o.viewport, s, c, i]), /* @__PURE__ */ l.jsx(gt, { present: n || a !== "hidden", children: /* @__PURE__ */ l.jsx(
11846
+ }, [o.viewport, s, c, i]), /* @__PURE__ */ l.jsx(xt, { present: n || a !== "hidden", children: /* @__PURE__ */ l.jsx(
11829
11847
  Sa,
11830
11848
  {
11831
11849
  "data-state": a === "hidden" ? "hidden" : "visible",
@@ -11836,13 +11854,13 @@ var r0 = f.forwardRef((e, t) => {
11836
11854
  }
11837
11855
  ) });
11838
11856
  }), ff = f.forwardRef((e, t) => {
11839
- const n = Nt(Jt, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, i] = f.useState(!1), a = e.orientation === "horizontal", c = us(() => {
11857
+ const n = Pt(Qt, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, i] = f.useState(!1), a = e.orientation === "horizontal", c = us(() => {
11840
11858
  if (n.viewport) {
11841
11859
  const u = n.viewport.offsetWidth < n.viewport.scrollWidth, d = n.viewport.offsetHeight < n.viewport.scrollHeight;
11842
11860
  i(a ? u : d);
11843
11861
  }
11844
11862
  }, 10);
11845
- return Xn(n.viewport, c), Xn(n.content, c), /* @__PURE__ */ l.jsx(gt, { present: r || s, children: /* @__PURE__ */ l.jsx(
11863
+ return Xn(n.viewport, c), Xn(n.content, c), /* @__PURE__ */ l.jsx(xt, { present: r || s, children: /* @__PURE__ */ l.jsx(
11846
11864
  Sa,
11847
11865
  {
11848
11866
  "data-state": s ? "visible" : "hidden",
@@ -11851,7 +11869,7 @@ var r0 = f.forwardRef((e, t) => {
11851
11869
  }
11852
11870
  ) });
11853
11871
  }), Sa = f.forwardRef((e, t) => {
11854
- const { orientation: n = "vertical", ...r } = e, o = Nt(Jt, e.__scopeScrollArea), s = f.useRef(null), i = f.useRef(0), [a, c] = f.useState({
11872
+ const { orientation: n = "vertical", ...r } = e, o = Pt(Qt, e.__scopeScrollArea), s = f.useRef(null), i = f.useRef(0), [a, c] = f.useState({
11855
11873
  content: 0,
11856
11874
  viewport: 0,
11857
11875
  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
@@ -11905,7 +11923,7 @@ var r0 = f.forwardRef((e, t) => {
11905
11923
  }
11906
11924
  ) : null;
11907
11925
  }), s0 = f.forwardRef((e, t) => {
11908
- const { sizes: n, onSizesChange: r, ...o } = e, s = Nt(Jt, e.__scopeScrollArea), [i, a] = f.useState(), c = f.useRef(null), u = Re(t, c, s.onScrollbarXChange);
11926
+ const { sizes: n, onSizesChange: r, ...o } = e, s = Pt(Qt, e.__scopeScrollArea), [i, a] = f.useState(), c = f.useRef(null), u = Re(t, c, s.onScrollbarXChange);
11909
11927
  return f.useEffect(() => {
11910
11928
  c.current && a(getComputedStyle(c.current));
11911
11929
  }, [c]), /* @__PURE__ */ l.jsx(
@@ -11944,7 +11962,7 @@ var r0 = f.forwardRef((e, t) => {
11944
11962
  }
11945
11963
  );
11946
11964
  }), i0 = f.forwardRef((e, t) => {
11947
- const { sizes: n, onSizesChange: r, ...o } = e, s = Nt(Jt, e.__scopeScrollArea), [i, a] = f.useState(), c = f.useRef(null), u = Re(t, c, s.onScrollbarYChange);
11965
+ const { sizes: n, onSizesChange: r, ...o } = e, s = Pt(Qt, e.__scopeScrollArea), [i, a] = f.useState(), c = f.useRef(null), u = Re(t, c, s.onScrollbarYChange);
11948
11966
  return f.useEffect(() => {
11949
11967
  c.current && a(getComputedStyle(c.current));
11950
11968
  }, [c]), /* @__PURE__ */ l.jsx(
@@ -11983,7 +12001,7 @@ var r0 = f.forwardRef((e, t) => {
11983
12001
  }
11984
12002
  }
11985
12003
  );
11986
- }), [a0, pf] = lf(Jt), hf = f.forwardRef((e, t) => {
12004
+ }), [a0, pf] = lf(Qt), hf = f.forwardRef((e, t) => {
11987
12005
  const {
11988
12006
  __scopeScrollArea: n,
11989
12007
  sizes: r,
@@ -11996,7 +12014,7 @@ var r0 = f.forwardRef((e, t) => {
11996
12014
  onWheelScroll: d,
11997
12015
  onResize: p,
11998
12016
  ...h
11999
- } = e, x = Nt(Jt, n), [m, v] = f.useState(null), g = Re(t, (j) => v(j)), w = f.useRef(null), b = f.useRef(""), y = x.viewport, R = r.content - r.viewport, S = rt(d), C = rt(c), E = us(p, 10);
12017
+ } = e, x = Pt(Qt, n), [m, v] = f.useState(null), g = Re(t, (j) => v(j)), w = f.useRef(null), b = f.useRef(""), y = x.viewport, R = r.content - r.viewport, S = st(d), C = st(c), E = us(p, 10);
12000
12018
  function I(j) {
12001
12019
  if (w.current) {
12002
12020
  const P = j.clientX - w.current.left, D = j.clientY - w.current.top;
@@ -12015,10 +12033,10 @@ var r0 = f.forwardRef((e, t) => {
12015
12033
  scope: n,
12016
12034
  scrollbar: m,
12017
12035
  hasThumb: o,
12018
- onThumbChange: rt(s),
12019
- onThumbPointerUp: rt(i),
12036
+ onThumbChange: st(s),
12037
+ onThumbPointerUp: st(i),
12020
12038
  onThumbPositionChange: C,
12021
- onThumbPointerDown: rt(a),
12039
+ onThumbPointerDown: st(a),
12022
12040
  children: /* @__PURE__ */ l.jsx(
12023
12041
  ge.div,
12024
12042
  {
@@ -12040,11 +12058,11 @@ var r0 = f.forwardRef((e, t) => {
12040
12058
  }), Mo = "ScrollAreaThumb", mf = f.forwardRef(
12041
12059
  (e, t) => {
12042
12060
  const { forceMount: n, ...r } = e, o = pf(Mo, e.__scopeScrollArea);
12043
- return /* @__PURE__ */ l.jsx(gt, { present: n || o.hasThumb, children: /* @__PURE__ */ l.jsx(l0, { ref: t, ...r }) });
12061
+ return /* @__PURE__ */ l.jsx(xt, { present: n || o.hasThumb, children: /* @__PURE__ */ l.jsx(l0, { ref: t, ...r }) });
12044
12062
  }
12045
12063
  ), l0 = f.forwardRef(
12046
12064
  (e, t) => {
12047
- const { __scopeScrollArea: n, style: r, ...o } = e, s = Nt(Mo, n), i = pf(Mo, n), { onThumbPositionChange: a } = i, c = Re(
12065
+ const { __scopeScrollArea: n, style: r, ...o } = e, s = Pt(Mo, n), i = pf(Mo, n), { onThumbPositionChange: a } = i, c = Re(
12048
12066
  t,
12049
12067
  (p) => i.onThumbChange(p)
12050
12068
  ), u = f.useRef(void 0), d = us(() => {
@@ -12084,13 +12102,13 @@ var r0 = f.forwardRef((e, t) => {
12084
12102
  mf.displayName = Mo;
12085
12103
  var Ca = "ScrollAreaCorner", gf = f.forwardRef(
12086
12104
  (e, t) => {
12087
- const n = Nt(Ca, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
12105
+ const n = Pt(Ca, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
12088
12106
  return n.type !== "scroll" && r ? /* @__PURE__ */ l.jsx(c0, { ...e, ref: t }) : null;
12089
12107
  }
12090
12108
  );
12091
12109
  gf.displayName = Ca;
12092
12110
  var c0 = f.forwardRef((e, t) => {
12093
- const { __scopeScrollArea: n, ...r } = e, o = Nt(Ca, n), [s, i] = f.useState(0), [a, c] = f.useState(0), u = !!(s && a);
12111
+ const { __scopeScrollArea: n, ...r } = e, o = Pt(Ca, n), [s, i] = f.useState(0), [a, c] = f.useState(0), u = !!(s && a);
12094
12112
  return Xn(o.scrollbarX, () => {
12095
12113
  var p;
12096
12114
  const d = ((p = o.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
@@ -12154,14 +12172,14 @@ var d0 = (e, t = () => {
12154
12172
  }(), () => window.cancelAnimationFrame(r);
12155
12173
  };
12156
12174
  function us(e, t) {
12157
- const n = rt(e), r = f.useRef(0);
12175
+ const n = st(e), r = f.useRef(0);
12158
12176
  return f.useEffect(() => () => window.clearTimeout(r.current), []), f.useCallback(() => {
12159
12177
  window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
12160
12178
  }, [n, t]);
12161
12179
  }
12162
12180
  function Xn(e, t) {
12163
- const n = rt(t);
12164
- nt(() => {
12181
+ const n = st(t);
12182
+ ot(() => {
12165
12183
  let r = 0;
12166
12184
  if (e) {
12167
12185
  const o = new ResizeObserver(() => {
@@ -12226,7 +12244,7 @@ function yi({
12226
12244
  deleteThread: g,
12227
12245
  renameThread: w
12228
12246
  } = Mi(), [b, y] = be(h ?? []), [R, S] = be(!1), [C, E] = be(null), [I, j] = be(null), [P, D] = be(""), [H, G] = be(!1);
12229
- Ze(() => {
12247
+ et(() => {
12230
12248
  y(h ?? []);
12231
12249
  }, [h]);
12232
12250
  const N = async (U) => {
@@ -12462,7 +12480,7 @@ const Ta = f.forwardRef(
12462
12480
  )
12463
12481
  );
12464
12482
  Ta.displayName = Rf.displayName;
12465
- var ds = "Dialog", [If, KT] = Bt(ds), [T0, Ht] = If(ds), Nf = (e) => {
12483
+ var ds = "Dialog", [If, KT] = zt(ds), [T0, Ut] = If(ds), Nf = (e) => {
12466
12484
  const {
12467
12485
  __scopeDialog: t,
12468
12486
  children: n,
@@ -12482,9 +12500,9 @@ var ds = "Dialog", [If, KT] = Bt(ds), [T0, Ht] = If(ds), Nf = (e) => {
12482
12500
  scope: t,
12483
12501
  triggerRef: a,
12484
12502
  contentRef: c,
12485
- contentId: Ot(),
12486
- titleId: Ot(),
12487
- descriptionId: Ot(),
12503
+ contentId: Lt(),
12504
+ titleId: Lt(),
12505
+ descriptionId: Lt(),
12488
12506
  open: u,
12489
12507
  onOpenChange: d,
12490
12508
  onOpenToggle: f.useCallback(() => d((p) => !p), [d]),
@@ -12496,7 +12514,7 @@ var ds = "Dialog", [If, KT] = Bt(ds), [T0, Ht] = If(ds), Nf = (e) => {
12496
12514
  Nf.displayName = ds;
12497
12515
  var Af = "DialogTrigger", jf = f.forwardRef(
12498
12516
  (e, t) => {
12499
- const { __scopeDialog: n, ...r } = e, o = Ht(Af, n), s = Re(t, o.triggerRef);
12517
+ const { __scopeDialog: n, ...r } = e, o = Ut(Af, n), s = Re(t, o.triggerRef);
12500
12518
  return /* @__PURE__ */ l.jsx(
12501
12519
  ge.button,
12502
12520
  {
@@ -12516,20 +12534,20 @@ jf.displayName = Af;
12516
12534
  var Ea = "DialogPortal", [E0, Pf] = If(Ea, {
12517
12535
  forceMount: void 0
12518
12536
  }), kf = (e) => {
12519
- const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = Ht(Ea, t);
12520
- return /* @__PURE__ */ l.jsx(E0, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ l.jsx(gt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(rs, { asChild: !0, container: o, children: i }) })) });
12537
+ const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = Ut(Ea, t);
12538
+ return /* @__PURE__ */ l.jsx(E0, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ l.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(rs, { asChild: !0, container: o, children: i }) })) });
12521
12539
  };
12522
12540
  kf.displayName = Ea;
12523
12541
  var Lo = "DialogOverlay", _f = f.forwardRef(
12524
12542
  (e, t) => {
12525
- const n = Pf(Lo, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Ht(Lo, e.__scopeDialog);
12526
- return s.modal ? /* @__PURE__ */ l.jsx(gt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(I0, { ...o, ref: t }) }) : null;
12543
+ const n = Pf(Lo, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Ut(Lo, e.__scopeDialog);
12544
+ return s.modal ? /* @__PURE__ */ l.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(I0, { ...o, ref: t }) }) : null;
12527
12545
  }
12528
12546
  );
12529
12547
  _f.displayName = Lo;
12530
12548
  var R0 = Gn("DialogOverlay.RemoveScroll"), I0 = f.forwardRef(
12531
12549
  (e, t) => {
12532
- const { __scopeDialog: n, ...r } = e, o = Ht(Lo, n);
12550
+ const { __scopeDialog: n, ...r } = e, o = Ut(Lo, n);
12533
12551
  return (
12534
12552
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
12535
12553
  // ie. when `Overlay` and `Content` are siblings
@@ -12546,14 +12564,14 @@ var R0 = Gn("DialogOverlay.RemoveScroll"), I0 = f.forwardRef(
12546
12564
  }
12547
12565
  ), In = "DialogContent", Of = f.forwardRef(
12548
12566
  (e, t) => {
12549
- const n = Pf(In, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Ht(In, e.__scopeDialog);
12550
- return /* @__PURE__ */ l.jsx(gt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(N0, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(A0, { ...o, ref: t }) });
12567
+ const n = Pf(In, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Ut(In, e.__scopeDialog);
12568
+ return /* @__PURE__ */ l.jsx(xt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(N0, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(A0, { ...o, ref: t }) });
12551
12569
  }
12552
12570
  );
12553
12571
  Of.displayName = In;
12554
12572
  var N0 = f.forwardRef(
12555
12573
  (e, t) => {
12556
- const n = Ht(In, e.__scopeDialog), r = f.useRef(null), o = Re(t, n.contentRef, r);
12574
+ const n = Ut(In, e.__scopeDialog), r = f.useRef(null), o = Re(t, n.contentRef, r);
12557
12575
  return f.useEffect(() => {
12558
12576
  const s = r.current;
12559
12577
  if (s) return fa(s);
@@ -12581,7 +12599,7 @@ var N0 = f.forwardRef(
12581
12599
  }
12582
12600
  ), A0 = f.forwardRef(
12583
12601
  (e, t) => {
12584
- const n = Ht(In, e.__scopeDialog), r = f.useRef(!1), o = f.useRef(!1);
12602
+ const n = Ut(In, e.__scopeDialog), r = f.useRef(!1), o = f.useRef(!1);
12585
12603
  return /* @__PURE__ */ l.jsx(
12586
12604
  Mf,
12587
12605
  {
@@ -12604,7 +12622,7 @@ var N0 = f.forwardRef(
12604
12622
  }
12605
12623
  ), Mf = f.forwardRef(
12606
12624
  (e, t) => {
12607
- const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = Ht(In, n), c = f.useRef(null), u = Re(t, c);
12625
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = Ut(In, n), c = f.useRef(null), u = Re(t, c);
12608
12626
  return Qi(), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
12609
12627
  /* @__PURE__ */ l.jsx(
12610
12628
  Zo,
@@ -12637,21 +12655,21 @@ var N0 = f.forwardRef(
12637
12655
  }
12638
12656
  ), Ra = "DialogTitle", Df = f.forwardRef(
12639
12657
  (e, t) => {
12640
- const { __scopeDialog: n, ...r } = e, o = Ht(Ra, n);
12658
+ const { __scopeDialog: n, ...r } = e, o = Ut(Ra, n);
12641
12659
  return /* @__PURE__ */ l.jsx(ge.h2, { id: o.titleId, ...r, ref: t });
12642
12660
  }
12643
12661
  );
12644
12662
  Df.displayName = Ra;
12645
12663
  var Lf = "DialogDescription", Ff = f.forwardRef(
12646
12664
  (e, t) => {
12647
- const { __scopeDialog: n, ...r } = e, o = Ht(Lf, n);
12665
+ const { __scopeDialog: n, ...r } = e, o = Ut(Lf, n);
12648
12666
  return /* @__PURE__ */ l.jsx(ge.p, { id: o.descriptionId, ...r, ref: t });
12649
12667
  }
12650
12668
  );
12651
12669
  Ff.displayName = Lf;
12652
12670
  var Bf = "DialogClose", Hf = f.forwardRef(
12653
12671
  (e, t) => {
12654
- const { __scopeDialog: n, ...r } = e, o = Ht(Bf, n);
12672
+ const { __scopeDialog: n, ...r } = e, o = Ut(Bf, n);
12655
12673
  return /* @__PURE__ */ l.jsx(
12656
12674
  ge.button,
12657
12675
  {
@@ -12801,7 +12819,7 @@ var Zf = Object.freeze({
12801
12819
  )
12802
12820
  );
12803
12821
  Qf.displayName = H0;
12804
- var $0 = Qf, [fs, XT] = Bt("Tooltip", [
12822
+ var $0 = Qf, [fs, XT] = zt("Tooltip", [
12805
12823
  or
12806
12824
  ]), ps = or(), ep = "TooltipProvider", z0 = 700, Si = "tooltip.open", [U0, Aa] = fs(ep), tp = (e) => {
12807
12825
  const {
@@ -12848,7 +12866,7 @@ var Pr = "Tooltip", [W0, hs] = fs(Pr), np = (e) => {
12848
12866
  onOpenChange: s,
12849
12867
  disableHoverableContent: i,
12850
12868
  delayDuration: a
12851
- } = e, c = Aa(Pr, e.__scopeTooltip), u = ps(t), [d, p] = f.useState(null), h = Ot(), x = f.useRef(0), m = i ?? c.disableHoverableContent, v = a ?? c.delayDuration, g = f.useRef(!1), [w, b] = un({
12869
+ } = e, c = Aa(Pr, e.__scopeTooltip), u = ps(t), [d, p] = f.useState(null), h = Lt(), x = f.useRef(0), m = i ?? c.disableHoverableContent, v = a ?? c.delayDuration, g = f.useRef(!1), [w, b] = un({
12852
12870
  prop: r,
12853
12871
  defaultProp: o ?? !1,
12854
12872
  onChange: (E) => {
@@ -12923,7 +12941,7 @@ var V0 = "TooltipPortal", [qT, G0] = fs(V0, {
12923
12941
  }), qn = "TooltipContent", op = f.forwardRef(
12924
12942
  (e, t) => {
12925
12943
  const n = G0(qn, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, i = hs(qn, e.__scopeTooltip);
12926
- return /* @__PURE__ */ l.jsx(gt, { present: r || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ l.jsx(sp, { side: o, ...s, ref: t }) : /* @__PURE__ */ l.jsx(K0, { side: o, ...s, ref: t }) });
12944
+ return /* @__PURE__ */ l.jsx(xt, { present: r || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ l.jsx(sp, { side: o, ...s, ref: t }) : /* @__PURE__ */ l.jsx(K0, { side: o, ...s, ref: t }) });
12927
12945
  }
12928
12946
  ), K0 = f.forwardRef((e, t) => {
12929
12947
  const n = hs(qn, e.__scopeTooltip), r = Aa(qn, e.__scopeTooltip), o = f.useRef(null), s = Re(t, o), [i, a] = f.useState(null), { trigger: c, onClose: u } = n, d = o.current, { onPointerInTransitChange: p } = r, h = f.useCallback(() => {
@@ -13673,7 +13691,7 @@ Sp.displayName = NC;
13673
13691
  var Cp = Sp;
13674
13692
  const AC = kr(
13675
13693
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
13676
- ), Ct = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13694
+ ), Rt = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13677
13695
  Cp,
13678
13696
  {
13679
13697
  ref: n,
@@ -13681,12 +13699,12 @@ const AC = kr(
13681
13699
  ...t
13682
13700
  }
13683
13701
  ));
13684
- Ct.displayName = Cp.displayName;
13702
+ Rt.displayName = Cp.displayName;
13685
13703
  function Tp(e) {
13686
13704
  const t = f.useRef({ value: e, previous: e });
13687
13705
  return f.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
13688
13706
  }
13689
- var gs = "Switch", [jC, ZT] = Bt(gs), [PC, kC] = jC(gs), Ep = f.forwardRef(
13707
+ var gs = "Switch", [jC, ZT] = zt(gs), [PC, kC] = jC(gs), Ep = f.forwardRef(
13690
13708
  (e, t) => {
13691
13709
  const {
13692
13710
  __scopeSwitch: n,
@@ -13823,7 +13841,7 @@ const an = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13823
13841
  }
13824
13842
  ));
13825
13843
  an.displayName = jp.displayName;
13826
- var MC = [" ", "Enter", "ArrowUp", "ArrowDown"], DC = [" ", "Enter"], Nn = "Select", [vs, xs, LC] = Zi(Nn), [sr, QT] = Bt(Nn, [
13844
+ var MC = [" ", "Enter", "ArrowUp", "ArrowDown"], DC = [" ", "Enter"], Nn = "Select", [vs, xs, LC] = Zi(Nn), [sr, QT] = zt(Nn, [
13827
13845
  LC,
13828
13846
  or
13829
13847
  ]), bs = or(), [FC, gn] = sr(Nn), [BC, HC] = sr(Nn), Pp = (e) => {
@@ -13864,7 +13882,7 @@ var MC = [" ", "Enter", "ArrowUp", "ArrowDown"], DC = [" ", "Enter"], Nn = "Sele
13864
13882
  onValueNodeChange: y,
13865
13883
  valueNodeHasChildren: R,
13866
13884
  onValueNodeHasChildrenChange: S,
13867
- contentId: Ot(),
13885
+ contentId: Lt(),
13868
13886
  value: j,
13869
13887
  onValueChange: P,
13870
13888
  open: E,
@@ -13960,7 +13978,7 @@ _p.displayName = kp;
13960
13978
  var Op = "SelectValue", Mp = f.forwardRef(
13961
13979
  (e, t) => {
13962
13980
  const { __scopeSelect: n, className: r, style: o, children: s, placeholder: i = "", ...a } = e, c = gn(Op, n), { onValueNodeHasChildrenChange: u } = c, d = s !== void 0, p = Re(t, c.onValueNodeChange);
13963
- return nt(() => {
13981
+ return ot(() => {
13964
13982
  u(d);
13965
13983
  }, [u, d]), /* @__PURE__ */ l.jsx(
13966
13984
  ge.span,
@@ -13986,7 +14004,7 @@ Lp.displayName = zC;
13986
14004
  var An = "SelectContent", Fp = f.forwardRef(
13987
14005
  (e, t) => {
13988
14006
  const n = gn(An, e.__scopeSelect), [r, o] = f.useState();
13989
- if (nt(() => {
14007
+ if (ot(() => {
13990
14008
  o(new DocumentFragment());
13991
14009
  }, []), !n.open) {
13992
14010
  const s = r;
@@ -13999,7 +14017,7 @@ var An = "SelectContent", Fp = f.forwardRef(
13999
14017
  }
14000
14018
  );
14001
14019
  Fp.displayName = An;
14002
- var kt = 10, [Bp, vn] = sr(An), UC = "SelectContentImpl", WC = Gn("SelectContent.RemoveScroll"), Hp = f.forwardRef(
14020
+ var Mt = 10, [Bp, vn] = sr(An), UC = "SelectContentImpl", WC = Gn("SelectContent.RemoveScroll"), Hp = f.forwardRef(
14003
14021
  (e, t) => {
14004
14022
  const {
14005
14023
  __scopeSelect: n,
@@ -14175,44 +14193,44 @@ var VC = "SelectItemAlignedPosition", $p = f.forwardRef((e, t) => {
14175
14193
  if (s.trigger && s.valueNode && a && u && v && g && w) {
14176
14194
  const E = s.trigger.getBoundingClientRect(), I = u.getBoundingClientRect(), j = s.valueNode.getBoundingClientRect(), P = w.getBoundingClientRect();
14177
14195
  if (s.dir !== "rtl") {
14178
- const ce = P.left - I.left, ie = j.left - ce, Oe = E.left - ie, ue = E.width + Oe, Ae = Math.max(ue, I.width), le = window.innerWidth - kt, fe = wi(ie, [
14179
- kt,
14196
+ const ce = P.left - I.left, ie = j.left - ce, Me = E.left - ie, ue = E.width + Me, Ae = Math.max(ue, I.width), le = window.innerWidth - Mt, fe = wi(ie, [
14197
+ Mt,
14180
14198
  // Prevents the content from going off the starting edge of the
14181
14199
  // viewport. It may still go off the ending edge, but this can be
14182
14200
  // controlled by the user since they may want to manage overflow in a
14183
14201
  // specific way.
14184
14202
  // https://github.com/radix-ui/primitives/issues/2049
14185
- Math.max(kt, le - Ae)
14203
+ Math.max(Mt, le - Ae)
14186
14204
  ]);
14187
14205
  a.style.minWidth = ue + "px", a.style.left = fe + "px";
14188
14206
  } else {
14189
- const ce = I.right - P.right, ie = window.innerWidth - j.right - ce, Oe = window.innerWidth - E.right - ie, ue = E.width + Oe, Ae = Math.max(ue, I.width), le = window.innerWidth - kt, fe = wi(ie, [
14190
- kt,
14191
- Math.max(kt, le - Ae)
14207
+ const ce = I.right - P.right, ie = window.innerWidth - j.right - ce, Me = window.innerWidth - E.right - ie, ue = E.width + Me, Ae = Math.max(ue, I.width), le = window.innerWidth - Mt, fe = wi(ie, [
14208
+ Mt,
14209
+ Math.max(Mt, le - Ae)
14192
14210
  ]);
14193
14211
  a.style.minWidth = ue + "px", a.style.right = fe + "px";
14194
14212
  }
14195
- const D = h(), H = window.innerHeight - kt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), _ = parseInt(N.borderTopWidth, 10), M = parseInt(N.paddingTop, 10), V = parseInt(N.borderBottomWidth, 10), F = parseInt(N.paddingBottom, 10), O = _ + M + G + F + V, z = Math.min(g.offsetHeight * 5, O), Q = window.getComputedStyle(v), ae = parseInt(Q.paddingTop, 10), U = parseInt(Q.paddingBottom, 10), ee = E.top + E.height / 2 - kt, pe = H - ee, we = g.offsetHeight / 2, X = g.offsetTop + we, k = _ + M + X, J = O - k;
14213
+ const D = h(), H = window.innerHeight - Mt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), _ = parseInt(N.borderTopWidth, 10), M = parseInt(N.paddingTop, 10), V = parseInt(N.borderBottomWidth, 10), F = parseInt(N.paddingBottom, 10), O = _ + M + G + F + V, z = Math.min(g.offsetHeight * 5, O), Q = window.getComputedStyle(v), ae = parseInt(Q.paddingTop, 10), U = parseInt(Q.paddingBottom, 10), ee = E.top + E.height / 2 - Mt, pe = H - ee, we = g.offsetHeight / 2, X = g.offsetTop + we, k = _ + M + X, J = O - k;
14196
14214
  if (k <= ee) {
14197
14215
  const ce = D.length > 0 && g === D[D.length - 1].ref.current;
14198
14216
  a.style.bottom = "0px";
14199
- const ie = u.clientHeight - v.offsetTop - v.offsetHeight, Oe = Math.max(
14217
+ const ie = u.clientHeight - v.offsetTop - v.offsetHeight, Me = Math.max(
14200
14218
  pe,
14201
14219
  we + // viewport might have padding bottom, include it to avoid a scrollable viewport
14202
14220
  (ce ? U : 0) + ie + V
14203
- ), ue = k + Oe;
14221
+ ), ue = k + Me;
14204
14222
  a.style.height = ue + "px";
14205
14223
  } else {
14206
14224
  const ce = D.length > 0 && g === D[0].ref.current;
14207
14225
  a.style.top = "0px";
14208
- const Oe = Math.max(
14226
+ const Me = Math.max(
14209
14227
  ee,
14210
14228
  _ + v.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
14211
14229
  (ce ? ae : 0) + we
14212
14230
  ) + J;
14213
- a.style.height = Oe + "px", v.scrollTop = k - ee + v.offsetTop;
14231
+ a.style.height = Me + "px", v.scrollTop = k - ee + v.offsetTop;
14214
14232
  }
14215
- a.style.margin = `${kt}px 0`, a.style.minHeight = z + "px", a.style.maxHeight = H + "px", r == null || r(), requestAnimationFrame(() => x.current = !0);
14233
+ a.style.margin = `${Mt}px 0`, a.style.minHeight = z + "px", a.style.maxHeight = H + "px", r == null || r(), requestAnimationFrame(() => x.current = !0);
14216
14234
  }
14217
14235
  }, [
14218
14236
  h,
@@ -14226,9 +14244,9 @@ var VC = "SelectItemAlignedPosition", $p = f.forwardRef((e, t) => {
14226
14244
  s.dir,
14227
14245
  r
14228
14246
  ]);
14229
- nt(() => y(), [y]);
14247
+ ot(() => y(), [y]);
14230
14248
  const [R, S] = f.useState();
14231
- nt(() => {
14249
+ ot(() => {
14232
14250
  u && S(window.getComputedStyle(u).zIndex);
14233
14251
  }, [u]);
14234
14252
  const C = f.useCallback(
@@ -14279,7 +14297,7 @@ var GC = "SelectPopperPosition", Ti = f.forwardRef((e, t) => {
14279
14297
  const {
14280
14298
  __scopeSelect: n,
14281
14299
  align: r = "start",
14282
- collisionPadding: o = kt,
14300
+ collisionPadding: o = Mt,
14283
14301
  ...s
14284
14302
  } = e, i = bs(n);
14285
14303
  return /* @__PURE__ */ l.jsx(
@@ -14342,7 +14360,7 @@ var [KC, ja] = sr(An, {}), Ei = "SelectViewport", zp = f.forwardRef(
14342
14360
  if (h != null && h.current && p) {
14343
14361
  const x = Math.abs(c.current - d.scrollTop);
14344
14362
  if (x > 0) {
14345
- const m = window.innerHeight - kt * 2, v = parseFloat(p.style.minHeight), g = parseFloat(p.style.height), w = Math.max(v, g);
14363
+ const m = window.innerHeight - Mt * 2, v = parseFloat(p.style.minHeight), g = parseFloat(p.style.height), w = Math.max(v, g);
14346
14364
  if (w < m) {
14347
14365
  const b = w + x, y = Math.min(m, b), R = b - y;
14348
14366
  p.style.height = y + "px", p.style.bottom === "0px" && (d.scrollTop = R > 0 ? R : 0, p.style.justifyContent = "flex-end");
@@ -14359,7 +14377,7 @@ var [KC, ja] = sr(An, {}), Ei = "SelectViewport", zp = f.forwardRef(
14359
14377
  zp.displayName = Ei;
14360
14378
  var Up = "SelectGroup", [YC, XC] = sr(Up), qC = f.forwardRef(
14361
14379
  (e, t) => {
14362
- const { __scopeSelect: n, ...r } = e, o = Ot();
14380
+ const { __scopeSelect: n, ...r } = e, o = Lt();
14363
14381
  return /* @__PURE__ */ l.jsx(YC, { scope: n, id: o, children: /* @__PURE__ */ l.jsx(ge.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
14364
14382
  }
14365
14383
  );
@@ -14385,7 +14403,7 @@ var Fo = "SelectItem", [JC, Gp] = sr(Fo), Kp = f.forwardRef(
14385
14403
  var y;
14386
14404
  return (y = c.itemRefCallback) == null ? void 0 : y.call(c, b, r, o);
14387
14405
  }
14388
- ), v = Ot(), g = f.useRef("touch"), w = () => {
14406
+ ), v = Lt(), g = f.useRef("touch"), w = () => {
14389
14407
  o || (a.onValueChange(r), a.onOpenChange(!1));
14390
14408
  };
14391
14409
  if (r === "")
@@ -14469,7 +14487,7 @@ var pr = "SelectItemText", Yp = f.forwardRef(
14469
14487
  () => /* @__PURE__ */ l.jsx("option", { value: c.value, disabled: c.disabled, children: x }, c.value),
14470
14488
  [c.disabled, c.value, x]
14471
14489
  ), { onNativeOptionAdd: v, onNativeOptionRemove: g } = u;
14472
- return nt(() => (v(m), () => g(m)), [v, g, m]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
14490
+ return ot(() => (v(m), () => g(m)), [v, g, m]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
14473
14491
  /* @__PURE__ */ l.jsx(ge.span, { id: c.textId, ...s, ref: h }),
14474
14492
  c.isSelected && i.valueNode && !i.valueNodeHasChildren ? Bo.createPortal(s.children, i.valueNode) : null
14475
14493
  ] });
@@ -14485,7 +14503,7 @@ var Xp = "SelectItemIndicator", qp = f.forwardRef(
14485
14503
  qp.displayName = Xp;
14486
14504
  var Ri = "SelectScrollUpButton", Jp = f.forwardRef((e, t) => {
14487
14505
  const n = vn(Ri, e.__scopeSelect), r = ja(Ri, e.__scopeSelect), [o, s] = f.useState(!1), i = Re(t, r.onScrollButtonChange);
14488
- return nt(() => {
14506
+ return ot(() => {
14489
14507
  if (n.viewport && n.isPositioned) {
14490
14508
  let a = function() {
14491
14509
  const u = c.scrollTop > 0;
@@ -14509,7 +14527,7 @@ var Ri = "SelectScrollUpButton", Jp = f.forwardRef((e, t) => {
14509
14527
  Jp.displayName = Ri;
14510
14528
  var Ii = "SelectScrollDownButton", Zp = f.forwardRef((e, t) => {
14511
14529
  const n = vn(Ii, e.__scopeSelect), r = ja(Ii, e.__scopeSelect), [o, s] = f.useState(!1), i = Re(t, r.onScrollButtonChange);
14512
- return nt(() => {
14530
+ return ot(() => {
14513
14531
  if (n.viewport && n.isPositioned) {
14514
14532
  let a = function() {
14515
14533
  const u = c.scrollHeight - c.clientHeight, d = Math.ceil(c.scrollTop) < u;
@@ -14535,7 +14553,7 @@ var Qp = f.forwardRef((e, t) => {
14535
14553
  const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = vn("SelectScrollButton", n), i = f.useRef(null), a = xs(n), c = f.useCallback(() => {
14536
14554
  i.current !== null && (window.clearInterval(i.current), i.current = null);
14537
14555
  }, []);
14538
- return f.useEffect(() => () => c(), [c]), nt(() => {
14556
+ return f.useEffect(() => () => c(), [c]), ot(() => {
14539
14557
  var d;
14540
14558
  const u = a().find((p) => p.ref.current === document.activeElement);
14541
14559
  (d = u == null ? void 0 : u.ref.current) == null || d.scrollIntoView({ block: "nearest" });
@@ -14602,7 +14620,7 @@ function nh(e) {
14602
14620
  return e === "" || e === void 0;
14603
14621
  }
14604
14622
  function rh(e) {
14605
- const t = rt(e), n = f.useRef(""), r = f.useRef(0), o = f.useCallback(
14623
+ const t = st(e), n = f.useRef(""), r = f.useRef(0), o = f.useCallback(
14606
14624
  (i) => {
14607
14625
  const a = n.current + i;
14608
14626
  t(a), function c(u) {
@@ -14806,10 +14824,10 @@ const pT = {
14806
14824
  };
14807
14825
  function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14808
14826
  const [r, o] = be(!1), [s, i] = be(!1), [a, c] = be(e), [u, d] = be(!1), { toast: p } = Eu();
14809
- Ze(() => {
14827
+ et(() => {
14810
14828
  const g = JSON.stringify(a) !== JSON.stringify(e);
14811
14829
  d(g);
14812
- }, [a, e]), Ze(() => {
14830
+ }, [a, e]), et(() => {
14813
14831
  c(e);
14814
14832
  }, [e]);
14815
14833
  const h = () => {
@@ -14858,7 +14876,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14858
14876
  ] }) }),
14859
14877
  /* @__PURE__ */ l.jsxs(yo, { className: "space-y-4", children: [
14860
14878
  /* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
14861
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "api-url", children: "API Base URL" }),
14879
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "api-url", children: "API Base URL" }),
14862
14880
  /* @__PURE__ */ l.jsxs("div", { className: "flex gap-2", children: [
14863
14881
  /* @__PURE__ */ l.jsx(
14864
14882
  jr,
@@ -14876,7 +14894,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14876
14894
  ] })
14877
14895
  ] }),
14878
14896
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
14879
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "enable-auth", children: "Enable Authentication" }),
14897
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "enable-auth", children: "Enable Authentication" }),
14880
14898
  /* @__PURE__ */ l.jsx(
14881
14899
  an,
14882
14900
  {
@@ -14890,7 +14908,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14890
14908
  )
14891
14909
  ] }),
14892
14910
  a.api.enableAuth && /* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
14893
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "auth-token", children: "Authentication Token" }),
14911
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "auth-token", children: "Authentication Token" }),
14894
14912
  /* @__PURE__ */ l.jsxs("div", { className: "flex gap-2", children: [
14895
14913
  /* @__PURE__ */ l.jsx(
14896
14914
  jr,
@@ -14925,7 +14943,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14925
14943
  ] }) }),
14926
14944
  /* @__PURE__ */ l.jsxs(yo, { className: "space-y-4", children: [
14927
14945
  /* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
14928
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "layout", children: "Layout Style" }),
14946
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "layout", children: "Layout Style" }),
14929
14947
  /* @__PURE__ */ l.jsxs(
14930
14948
  ac,
14931
14949
  {
@@ -14946,7 +14964,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14946
14964
  )
14947
14965
  ] }),
14948
14966
  /* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
14949
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "theme", children: "Theme" }),
14967
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "theme", children: "Theme" }),
14950
14968
  /* @__PURE__ */ l.jsxs(
14951
14969
  ac,
14952
14970
  {
@@ -14969,7 +14987,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14969
14987
  /* @__PURE__ */ l.jsx(Ta, {}),
14970
14988
  /* @__PURE__ */ l.jsxs("div", { className: "space-y-3", children: [
14971
14989
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
14972
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "show-timestamps", children: "Show Timestamps" }),
14990
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "show-timestamps", children: "Show Timestamps" }),
14973
14991
  /* @__PURE__ */ l.jsx(
14974
14992
  an,
14975
14993
  {
@@ -14983,7 +15001,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14983
15001
  )
14984
15002
  ] }),
14985
15003
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
14986
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "show-agent-names", children: "Show Agent Names" }),
15004
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "show-agent-names", children: "Show Agent Names" }),
14987
15005
  /* @__PURE__ */ l.jsx(
14988
15006
  an,
14989
15007
  {
@@ -14997,7 +15015,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14997
15015
  )
14998
15016
  ] }),
14999
15017
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
15000
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "compact-messages", children: "Compact Messages" }),
15018
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "compact-messages", children: "Compact Messages" }),
15001
15019
  /* @__PURE__ */ l.jsx(
15002
15020
  an,
15003
15021
  {
@@ -15021,7 +15039,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
15021
15039
  /* @__PURE__ */ l.jsxs(yo, { className: "space-y-4", children: [
15022
15040
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
15023
15041
  /* @__PURE__ */ l.jsxs("div", { children: [
15024
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "auto-save", children: "Auto-save Conversations" }),
15042
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "auto-save", children: "Auto-save Conversations" }),
15025
15043
  /* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "Automatically save messages to threads" })
15026
15044
  ] }),
15027
15045
  /* @__PURE__ */ l.jsx(
@@ -15038,7 +15056,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
15038
15056
  ] }),
15039
15057
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
15040
15058
  /* @__PURE__ */ l.jsxs("div", { children: [
15041
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "enable-streaming", children: "Enable Streaming" }),
15059
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "enable-streaming", children: "Enable Streaming" }),
15042
15060
  /* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "Stream responses in real-time" })
15043
15061
  ] }),
15044
15062
  /* @__PURE__ */ l.jsx(
@@ -15055,7 +15073,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
15055
15073
  ] }),
15056
15074
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
15057
15075
  /* @__PURE__ */ l.jsxs("div", { children: [
15058
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "typing-indicator", children: "Typing Indicator" }),
15076
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "typing-indicator", children: "Typing Indicator" }),
15059
15077
  /* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "Show typing indicator during responses" })
15060
15078
  ] }),
15061
15079
  /* @__PURE__ */ l.jsx(
@@ -15180,7 +15198,7 @@ export {
15180
15198
  ln as chatApiClient,
15181
15199
  tE as default,
15182
15200
  Ag as del,
15183
- Pt as get,
15201
+ Ot as get,
15184
15202
  Rg as getChatToken,
15185
15203
  VT as getCurrentSettings,
15186
15204
  g0 as getDefaultApiConfig,