teodor-new-chat-ui 3.0.145 → 3.0.146

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
@@ -263,14 +263,14 @@ function gm() {
263
263
  } catch (bt) {
264
264
  if (bt && xe && typeof bt.stack == "string") {
265
265
  for (var Ie = bt.stack.split(`
266
- `), pt = xe.stack.split(`
267
- `), Xe = Ie.length - 1, tt = pt.length - 1; Xe >= 1 && tt >= 0 && Ie[Xe] !== pt[tt]; )
266
+ `), mt = xe.stack.split(`
267
+ `), Xe = Ie.length - 1, tt = mt.length - 1; Xe >= 1 && tt >= 0 && Ie[Xe] !== mt[tt]; )
268
268
  tt--;
269
269
  for (; Xe >= 1 && tt >= 0; Xe--, tt--)
270
- if (Ie[Xe] !== pt[tt]) {
270
+ if (Ie[Xe] !== mt[tt]) {
271
271
  if (Xe !== 1 || tt !== 1)
272
272
  do
273
- if (Xe--, tt--, tt < 0 || Ie[Xe] !== pt[tt]) {
273
+ if (Xe--, tt--, tt < 0 || Ie[Xe] !== mt[tt]) {
274
274
  var kt = `
275
275
  ` + Ie[Xe].replace(" at new ", " at ");
276
276
  return T.displayName && kt.includes("<anonymous>") && (kt = kt.replace("<anonymous>", T.displayName)), typeof T == "function" && J.set(T, kt), kt;
@@ -321,15 +321,15 @@ function gm() {
321
321
  }
322
322
  return "";
323
323
  }
324
- var ie = Object.prototype.hasOwnProperty, Ne = {}, Se = g.ReactDebugCurrentFrame;
324
+ var ie = Object.prototype.hasOwnProperty, Ne = {}, Ce = g.ReactDebugCurrentFrame;
325
325
  function fe(T) {
326
326
  if (T) {
327
327
  var z = T._owner, ne = je(T.type, T._source, z ? z.type : null);
328
- Se.setExtraStackFrame(ne);
328
+ Ce.setExtraStackFrame(ne);
329
329
  } else
330
- Se.setExtraStackFrame(null);
330
+ Ce.setExtraStackFrame(null);
331
331
  }
332
- function Ce(T, z, ne, xe, Le) {
332
+ function Te(T, z, ne, xe, Le) {
333
333
  {
334
334
  var He = Function.call.bind(ie);
335
335
  for (var Pe in T)
@@ -337,8 +337,8 @@ function gm() {
337
337
  var Ie = void 0;
338
338
  try {
339
339
  if (typeof T[Pe] != "function") {
340
- var pt = Error((xe || "React class") + ": " + ne + " type `" + Pe + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof T[Pe] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
341
- throw pt.name = "Invariant Violation", pt;
340
+ var mt = Error((xe || "React class") + ": " + ne + " type `" + Pe + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof T[Pe] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
341
+ throw mt.name = "Invariant Violation", mt;
342
342
  }
343
343
  Ie = T[Pe](z, Pe, xe, ne, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
344
344
  } catch (Xe) {
@@ -349,7 +349,7 @@ function gm() {
349
349
  }
350
350
  }
351
351
  var Be = Array.isArray;
352
- function ot(T) {
352
+ function st(T) {
353
353
  return Be(T);
354
354
  }
355
355
  function et(T) {
@@ -358,27 +358,27 @@ function gm() {
358
358
  return ne;
359
359
  }
360
360
  }
361
- function vt(T) {
361
+ function xt(T) {
362
362
  try {
363
- return it(T), !1;
363
+ return at(T), !1;
364
364
  } catch {
365
365
  return !0;
366
366
  }
367
367
  }
368
- function it(T) {
368
+ function at(T) {
369
369
  return "" + T;
370
370
  }
371
371
  function an(T) {
372
- if (vt(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.", et(T)), it(T);
372
+ if (xt(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.", et(T)), at(T);
374
374
  }
375
375
  var V = g.ReactCurrentOwner, ae = {
376
376
  key: !0,
377
377
  ref: !0,
378
378
  __self: !0,
379
379
  __source: !0
380
- }, $e, qe;
381
- function Re(T) {
380
+ }, $e, rt;
381
+ function we(T) {
382
382
  if (ie.call(T, "ref")) {
383
383
  var z = Object.getOwnPropertyDescriptor(T, "ref").get;
384
384
  if (z && z.isReactWarning)
@@ -386,7 +386,7 @@ function gm() {
386
386
  }
387
387
  return T.ref !== void 0;
388
388
  }
389
- function xt(T) {
389
+ function qe(T) {
390
390
  if (ie.call(T, "key")) {
391
391
  var z = Object.getOwnPropertyDescriptor(T, "key").get;
392
392
  if (z && z.isReactWarning)
@@ -408,10 +408,10 @@ function gm() {
408
408
  });
409
409
  }
410
410
  }
411
- function lt(T, z) {
411
+ function ut(T, z) {
412
412
  {
413
413
  var ne = function() {
414
- qe || (qe = !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)", z));
414
+ rt || (rt = !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)", z));
415
415
  };
416
416
  ne.isReactWarning = !0, Object.defineProperty(T, "ref", {
417
417
  get: ne,
@@ -448,10 +448,10 @@ function gm() {
448
448
  value: Le
449
449
  }), Object.freeze && (Object.freeze(Ie.props), Object.freeze(Ie)), Ie;
450
450
  };
451
- function at(T, z, ne, xe, Le) {
451
+ function ct(T, z, ne, xe, Le) {
452
452
  {
453
- var He, Pe = {}, Ie = null, pt = null;
454
- ne !== void 0 && (an(ne), Ie = "" + ne), xt(z) && (an(z.key), Ie = "" + z.key), Re(z) && (pt = z.ref, jt(z, Le));
453
+ var He, Pe = {}, Ie = null, mt = null;
454
+ ne !== void 0 && (an(ne), Ie = "" + ne), qe(z) && (an(z.key), Ie = "" + z.key), we(z) && (mt = z.ref, jt(z, Le));
455
455
  for (He in z)
456
456
  ie.call(z, He) && !ae.hasOwnProperty(He) && (Pe[He] = z[He]);
457
457
  if (T && T.defaultProps) {
@@ -459,14 +459,14 @@ function gm() {
459
459
  for (He in Xe)
460
460
  Pe[He] === void 0 && (Pe[He] = Xe[He]);
461
461
  }
462
- if (Ie || pt) {
462
+ if (Ie || mt) {
463
463
  var tt = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
464
- Ie && En(Pe, tt), pt && lt(Pe, tt);
464
+ Ie && En(Pe, tt), mt && ut(Pe, tt);
465
465
  }
466
- return Tt(T, Ie, pt, Le, xe, V.current, Pe);
466
+ return Tt(T, Ie, mt, Le, xe, V.current, Pe);
467
467
  }
468
468
  }
469
- var ht = g.ReactCurrentOwner, cn = g.ReactDebugCurrentFrame;
469
+ var pt = g.ReactCurrentOwner, cn = g.ReactDebugCurrentFrame;
470
470
  function Yt(T) {
471
471
  if (T) {
472
472
  var z = T._owner, ne = je(T.type, T._source, z ? z.type : null);
@@ -481,8 +481,8 @@ function gm() {
481
481
  }
482
482
  function le() {
483
483
  {
484
- if (ht.current) {
485
- var T = G(ht.current.type);
484
+ if (pt.current) {
485
+ var T = G(pt.current.type);
486
486
  if (T)
487
487
  return `
488
488
 
@@ -517,14 +517,14 @@ Check the top-level render call using <` + ne + ">.");
517
517
  return;
518
518
  Ye[ne] = !0;
519
519
  var xe = "";
520
- T && T._owner && T._owner !== ht.current && (xe = " It was passed a child from " + G(T._owner.type) + "."), Yt(T), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', ne, xe), Yt(null);
520
+ T && T._owner && T._owner !== pt.current && (xe = " It was passed a child from " + G(T._owner.type) + "."), Yt(T), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', ne, xe), Yt(null);
521
521
  }
522
522
  }
523
523
  function Gn(T, z) {
524
524
  {
525
525
  if (typeof T != "object")
526
526
  return;
527
- if (ot(T))
527
+ if (st(T))
528
528
  for (var ne = 0; ne < T.length; ne++) {
529
529
  var xe = T[ne];
530
530
  te(xe) && Vn(xe, z);
@@ -555,7 +555,7 @@ Check the top-level render call using <` + ne + ">.");
555
555
  return;
556
556
  if (ne) {
557
557
  var xe = G(z);
558
- Ce(ne, T.props, "prop", xe, T);
558
+ Te(ne, T.props, "prop", xe, T);
559
559
  } else if (z.PropTypes !== void 0 && !hn) {
560
560
  hn = !0;
561
561
  var Le = G(z);
@@ -583,19 +583,19 @@ Check the top-level render call using <` + ne + ">.");
583
583
  if (!Pe) {
584
584
  var Ie = "";
585
585
  (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.");
586
- var pt = Oe();
587
- pt ? Ie += pt : Ie += le();
586
+ var mt = Oe();
587
+ mt ? Ie += mt : Ie += le();
588
588
  var Xe;
589
- T === null ? Xe = "null" : ot(T) ? Xe = "array" : T !== void 0 && T.$$typeof === t ? (Xe = "<" + (G(T.type) || "Unknown") + " />", Ie = " Did you accidentally export a JSX literal instead of a component?") : Xe = 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", Xe, Ie);
589
+ T === null ? Xe = "null" : st(T) ? Xe = "array" : T !== void 0 && T.$$typeof === t ? (Xe = "<" + (G(T.type) || "Unknown") + " />", Ie = " Did you accidentally export a JSX literal instead of a component?") : Xe = 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", Xe, Ie);
590
590
  }
591
- var tt = at(T, z, ne, Le, He);
591
+ var tt = ct(T, z, ne, Le, He);
592
592
  if (tt == null)
593
593
  return tt;
594
594
  if (Pe) {
595
595
  var kt = z.children;
596
596
  if (kt !== void 0)
597
597
  if (xe)
598
- if (ot(kt)) {
598
+ if (st(kt)) {
599
599
  for (var Yn = 0; Yn < kt.length; Yn++)
600
600
  Gn(kt[Yn], T);
601
601
  Object.freeze && Object.freeze(kt);
@@ -871,10 +871,10 @@ const Jm = (e) => {
871
871
  asap: eg,
872
872
  isIterable: tg
873
873
  };
874
- function we(e, t, n, r, o) {
874
+ function ye(e, t, n, r, o) {
875
875
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
876
876
  }
877
- k.inherits(we, Error, {
877
+ k.inherits(ye, Error, {
878
878
  toJSON: function() {
879
879
  return {
880
880
  // Standard
@@ -895,7 +895,7 @@ k.inherits(we, Error, {
895
895
  };
896
896
  }
897
897
  });
898
- const Ml = we.prototype, Dl = {};
898
+ const Ml = ye.prototype, Dl = {};
899
899
  [
900
900
  "ERR_BAD_OPTION_VALUE",
901
901
  "ERR_BAD_OPTION",
@@ -913,15 +913,15 @@ const Ml = we.prototype, Dl = {};
913
913
  ].forEach((e) => {
914
914
  Dl[e] = { value: e };
915
915
  });
916
- Object.defineProperties(we, Dl);
916
+ Object.defineProperties(ye, Dl);
917
917
  Object.defineProperty(Ml, "isAxiosError", { value: !0 });
918
- we.from = (e, t, n, r, o, s) => {
918
+ ye.from = (e, t, n, r, o, s) => {
919
919
  const i = Object.create(Ml);
920
920
  k.toFlatObject(e, i, function(d) {
921
921
  return d !== Error.prototype;
922
922
  }, (u) => u !== "isAxiosError");
923
923
  const a = e && e.message ? e.message : "Error", l = t == null && e ? e.code : t;
924
- return we.call(i, a, l, n, r, o), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", s && Object.assign(i, s), i;
924
+ return ye.call(i, a, l, n, r, o), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", s && Object.assign(i, s), i;
925
925
  };
926
926
  const ng = null;
927
927
  function fi(e) {
@@ -961,7 +961,7 @@ function ns(e, t, n) {
961
961
  if (k.isBoolean(x))
962
962
  return x.toString();
963
963
  if (!l && k.isBlob(x))
964
- throw new we("Blob is not supported. Use a Buffer instead.");
964
+ throw new ye("Blob is not supported. Use a Buffer instead.");
965
965
  return k.isArrayBuffer(x) || k.isTypedArray(x) ? l && typeof Blob == "function" ? new Blob([x]) : Buffer.from(x) : x;
966
966
  }
967
967
  function d(x, v, p) {
@@ -1125,14 +1125,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", fg
1125
1125
  hasStandardBrowserWebWorkerEnv: dg,
1126
1126
  navigator: hi,
1127
1127
  origin: fg
1128
- }, Symbol.toStringTag, { value: "Module" })), ut = {
1128
+ }, Symbol.toStringTag, { value: "Module" })), dt = {
1129
1129
  ...hg,
1130
1130
  ...lg
1131
1131
  };
1132
1132
  function pg(e, t) {
1133
- return ns(e, new ut.classes.URLSearchParams(), {
1133
+ return ns(e, new dt.classes.URLSearchParams(), {
1134
1134
  visitor: function(n, r, o, s) {
1135
- return ut.isNode && k.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1135
+ return dt.isNode && k.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1136
1136
  },
1137
1137
  ...t
1138
1138
  });
@@ -1212,7 +1212,7 @@ const Yr = {
1212
1212
  return JSON.parse(t, this.parseReviver);
1213
1213
  } catch (a) {
1214
1214
  if (i)
1215
- throw a.name === "SyntaxError" ? we.from(a, we.ERR_BAD_RESPONSE, this, null, this.response) : a;
1215
+ throw a.name === "SyntaxError" ? ye.from(a, ye.ERR_BAD_RESPONSE, this, null, this.response) : a;
1216
1216
  }
1217
1217
  }
1218
1218
  return t;
@@ -1227,8 +1227,8 @@ const Yr = {
1227
1227
  maxContentLength: -1,
1228
1228
  maxBodyLength: -1,
1229
1229
  env: {
1230
- FormData: ut.classes.FormData,
1231
- Blob: ut.classes.Blob
1230
+ FormData: dt.classes.FormData,
1231
+ Blob: dt.classes.Blob
1232
1232
  },
1233
1233
  validateStatus: function(t) {
1234
1234
  return t >= 200 && t < 300;
@@ -1455,16 +1455,16 @@ function zl(e) {
1455
1455
  return !!(e && e.__CANCEL__);
1456
1456
  }
1457
1457
  function fr(e, t, n) {
1458
- we.call(this, e ?? "canceled", we.ERR_CANCELED, t, n), this.name = "CanceledError";
1458
+ ye.call(this, e ?? "canceled", ye.ERR_CANCELED, t, n), this.name = "CanceledError";
1459
1459
  }
1460
- k.inherits(fr, we, {
1460
+ k.inherits(fr, ye, {
1461
1461
  __CANCEL__: !0
1462
1462
  });
1463
1463
  function Ul(e, t, n) {
1464
1464
  const r = n.config.validateStatus;
1465
- !n.status || !r || r(n.status) ? e(n) : t(new we(
1465
+ !n.status || !r || r(n.status) ? e(n) : t(new ye(
1466
1466
  "Request failed with status code " + n.status,
1467
- [we.ERR_BAD_REQUEST, we.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1467
+ [ye.ERR_BAD_REQUEST, ye.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1468
1468
  n.config,
1469
1469
  n.request,
1470
1470
  n
@@ -1528,10 +1528,10 @@ const Mo = (e, t, n = 3) => {
1528
1528
  total: e,
1529
1529
  loaded: r
1530
1530
  }), t[1]];
1531
- }, ic = (e) => (...t) => k.asap(() => e(...t)), Ng = ut.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, ut.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1532
- new URL(ut.origin),
1533
- ut.navigator && /(msie|trident)/i.test(ut.navigator.userAgent)
1534
- ) : () => !0, Ig = ut.hasStandardBrowserEnv ? (
1531
+ }, ic = (e) => (...t) => k.asap(() => e(...t)), Ng = dt.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, dt.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1532
+ new URL(dt.origin),
1533
+ dt.navigator && /(msie|trident)/i.test(dt.navigator.userAgent)
1534
+ ) : () => !0, Ig = dt.hasStandardBrowserEnv ? (
1535
1535
  // Standard browser envs support document.cookie
1536
1536
  {
1537
1537
  write(e, t, n, r, o, s) {
@@ -1640,7 +1640,7 @@ const Vl = (e) => {
1640
1640
  "Authorization",
1641
1641
  "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
1642
1642
  ), k.isFormData(n)) {
1643
- if (ut.hasStandardBrowserEnv || ut.hasStandardBrowserWebWorkerEnv)
1643
+ if (dt.hasStandardBrowserEnv || dt.hasStandardBrowserWebWorkerEnv)
1644
1644
  i.setContentType(void 0);
1645
1645
  else if (k.isFunction(n.getHeaders)) {
1646
1646
  const l = n.getHeaders(), u = ["content-type", "content-length"];
@@ -1649,7 +1649,7 @@ const Vl = (e) => {
1649
1649
  });
1650
1650
  }
1651
1651
  }
1652
- if (ut.hasStandardBrowserEnv && (r && k.isFunction(r) && (r = r(t)), r || r !== !1 && Ng(t.url))) {
1652
+ if (dt.hasStandardBrowserEnv && (r && k.isFunction(r) && (r = r(t)), r || r !== !1 && Ng(t.url))) {
1653
1653
  const l = o && s && Ig.read(s);
1654
1654
  l && i.set(o, l);
1655
1655
  }
@@ -1687,16 +1687,16 @@ const Vl = (e) => {
1687
1687
  "onloadend" in p ? p.onloadend = g : p.onreadystatechange = function() {
1688
1688
  !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(g);
1689
1689
  }, p.onabort = function() {
1690
- p && (r(new we("Request aborted", we.ECONNABORTED, e, p)), p = null);
1690
+ p && (r(new ye("Request aborted", ye.ECONNABORTED, e, p)), p = null);
1691
1691
  }, p.onerror = function(R) {
1692
- const S = R && R.message ? R.message : "Network Error", C = new we(S, we.ERR_NETWORK, e, p);
1692
+ const S = R && R.message ? R.message : "Network Error", C = new ye(S, ye.ERR_NETWORK, e, p);
1693
1693
  C.event = R || null, r(C), p = null;
1694
1694
  }, p.ontimeout = function() {
1695
1695
  let R = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1696
1696
  const S = o.transitional || $l;
1697
- o.timeoutErrorMessage && (R = o.timeoutErrorMessage), r(new we(
1697
+ o.timeoutErrorMessage && (R = o.timeoutErrorMessage), r(new ye(
1698
1698
  R,
1699
- S.clarifyTimeoutError ? we.ETIMEDOUT : we.ECONNABORTED,
1699
+ S.clarifyTimeoutError ? ye.ETIMEDOUT : ye.ECONNABORTED,
1700
1700
  e,
1701
1701
  p
1702
1702
  )), p = null;
@@ -1706,8 +1706,8 @@ const Vl = (e) => {
1706
1706
  p && (r(!y || y.type ? new fr(null, e, p) : y), p.abort(), p = null);
1707
1707
  }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
1708
1708
  const b = Tg(o.url);
1709
- if (b && ut.protocols.indexOf(b) === -1) {
1710
- r(new we("Unsupported protocol " + b + ":", we.ERR_BAD_REQUEST, e));
1709
+ if (b && dt.protocols.indexOf(b) === -1) {
1710
+ r(new ye("Unsupported protocol " + b + ":", ye.ERR_BAD_REQUEST, e));
1711
1711
  return;
1712
1712
  }
1713
1713
  p.send(s || null);
@@ -1720,11 +1720,11 @@ const Vl = (e) => {
1720
1720
  if (!o) {
1721
1721
  o = !0, a();
1722
1722
  const d = u instanceof Error ? u : this.reason;
1723
- r.abort(d instanceof we ? d : new fr(d instanceof Error ? d.message : d));
1723
+ r.abort(d instanceof ye ? d : new fr(d instanceof Error ? d.message : d));
1724
1724
  }
1725
1725
  };
1726
1726
  let i = t && setTimeout(() => {
1727
- i = null, s(new we(`timeout ${t} of ms exceeded`, we.ETIMEDOUT));
1727
+ i = null, s(new ye(`timeout ${t} of ms exceeded`, ye.ETIMEDOUT));
1728
1728
  }, t);
1729
1729
  const a = () => {
1730
1730
  e && (i && clearTimeout(i), i = null, e.forEach((u) => {
@@ -1813,7 +1813,7 @@ const Vl = (e) => {
1813
1813
  return !1;
1814
1814
  const a = o && so(uc), l = o && (typeof dc == "function" ? /* @__PURE__ */ ((x) => (v) => x.encode(v))(new dc()) : async (x) => new Uint8Array(await new n(x).arrayBuffer())), u = s && a && fc(() => {
1815
1815
  let x = !1;
1816
- const v = new n(ut.origin, {
1816
+ const v = new n(dt.origin, {
1817
1817
  body: new uc(),
1818
1818
  method: "POST",
1819
1819
  get duplex() {
@@ -1829,7 +1829,7 @@ const Vl = (e) => {
1829
1829
  let g = v && v[x];
1830
1830
  if (g)
1831
1831
  return g.call(v);
1832
- throw new we(`Response type '${x}' is not supported`, we.ERR_NOT_SUPPORT, p);
1832
+ throw new ye(`Response type '${x}' is not supported`, ye.ERR_NOT_SUPPORT, p);
1833
1833
  });
1834
1834
  });
1835
1835
  const m = async (x) => {
@@ -1838,7 +1838,7 @@ const Vl = (e) => {
1838
1838
  if (k.isBlob(x))
1839
1839
  return x.size;
1840
1840
  if (k.isSpecCompliantForm(x))
1841
- return (await new n(ut.origin, {
1841
+ return (await new n(dt.origin, {
1842
1842
  method: "POST",
1843
1843
  body: x
1844
1844
  }).arrayBuffer()).byteLength;
@@ -1929,11 +1929,11 @@ const Vl = (e) => {
1929
1929
  });
1930
1930
  } catch (U) {
1931
1931
  throw _ && _(), U && U.name === "TypeError" && /Load failed|fetch/i.test(U.message) ? Object.assign(
1932
- new we("Network Error", we.ERR_NETWORK, x, G),
1932
+ new ye("Network Error", ye.ERR_NETWORK, x, G),
1933
1933
  {
1934
1934
  cause: U.cause || U
1935
1935
  }
1936
- ) : we.from(U, U && U.code, x, G);
1936
+ ) : ye.from(U, U && U.code, x, G);
1937
1937
  }
1938
1938
  };
1939
1939
  }, Bg = /* @__PURE__ */ new Map(), Gl = (e) => {
@@ -1975,7 +1975,7 @@ const hc = (e) => `- ${e}`, $g = (e) => k.isFunction(e) || e === null || e === !
1975
1975
  r = e[i];
1976
1976
  let a;
1977
1977
  if (o = r, !$g(r) && (o = pi[(a = String(r)).toLowerCase()], o === void 0))
1978
- throw new we(`Unknown adapter '${a}'`);
1978
+ throw new ye(`Unknown adapter '${a}'`);
1979
1979
  if (o && (k.isFunction(o) || (o = o.get(t))))
1980
1980
  break;
1981
1981
  s[a || "#" + i] = o;
@@ -1987,7 +1987,7 @@ const hc = (e) => `- ${e}`, $g = (e) => k.isFunction(e) || e === null || e === !
1987
1987
  let a = n ? i.length > 1 ? `since :
1988
1988
  ` + i.map(hc).join(`
1989
1989
  `) : " " + hc(i[0]) : "as no adapter specified";
1990
- throw new we(
1990
+ throw new ye(
1991
1991
  "There is no suitable adapter to dispatch the request " + a,
1992
1992
  "ERR_NOT_SUPPORT"
1993
1993
  );
@@ -2031,9 +2031,9 @@ rs.transitional = function(t, n, r) {
2031
2031
  }
2032
2032
  return (s, i, a) => {
2033
2033
  if (t === !1)
2034
- throw new we(
2034
+ throw new ye(
2035
2035
  o(i, " has been removed" + (n ? " in " + n : "")),
2036
- we.ERR_DEPRECATED
2036
+ ye.ERR_DEPRECATED
2037
2037
  );
2038
2038
  return n && !mc[i] && (mc[i] = !0, console.warn(
2039
2039
  o(
@@ -2048,7 +2048,7 @@ rs.spelling = function(t) {
2048
2048
  };
2049
2049
  function Hg(e, t, n) {
2050
2050
  if (typeof e != "object")
2051
- throw new we("options must be an object", we.ERR_BAD_OPTION_VALUE);
2051
+ throw new ye("options must be an object", ye.ERR_BAD_OPTION_VALUE);
2052
2052
  const r = Object.keys(e);
2053
2053
  let o = r.length;
2054
2054
  for (; o-- > 0; ) {
@@ -2056,11 +2056,11 @@ function Hg(e, t, n) {
2056
2056
  if (i) {
2057
2057
  const a = e[s], l = a === void 0 || i(a, s, e);
2058
2058
  if (l !== !0)
2059
- throw new we("option " + s + " must be " + l, we.ERR_BAD_OPTION_VALUE);
2059
+ throw new ye("option " + s + " must be " + l, ye.ERR_BAD_OPTION_VALUE);
2060
2060
  continue;
2061
2061
  }
2062
2062
  if (n !== !0)
2063
- throw new we("Unknown option " + s, we.ERR_BAD_OPTION);
2063
+ throw new ye("Unknown option " + s, ye.ERR_BAD_OPTION);
2064
2064
  }
2065
2065
  }
2066
2066
  const bo = {
@@ -2353,7 +2353,7 @@ Qe.CancelToken = zg;
2353
2353
  Qe.isCancel = zl;
2354
2354
  Qe.VERSION = Yl;
2355
2355
  Qe.toFormData = ns;
2356
- Qe.AxiosError = we;
2356
+ Qe.AxiosError = ye;
2357
2357
  Qe.Cancel = Qe.CanceledError;
2358
2358
  Qe.all = function(t) {
2359
2359
  return Promise.all(t);
@@ -2610,24 +2610,24 @@ function Jg(e = {}) {
2610
2610
  B && console.debug("[use-chat] skip malformed SSE data:", ie == null ? void 0 : ie.slice(0, 200));
2611
2611
  continue;
2612
2612
  }
2613
- const Se = Zg(Ne) ? Ne.data : Ne;
2614
- B && console.debug("[use-chat] event:", Se == null ? void 0 : Se.type, Se);
2615
- const fe = Se.seq;
2613
+ const Ce = Zg(Ne) ? Ne.data : Ne;
2614
+ B && console.debug("[use-chat] event:", Ce == null ? void 0 : Ce.type, Ce);
2615
+ const fe = Ce.seq;
2616
2616
  if (fe !== void 0 && (ce > 0 && fe > ce + 1 && console.warn(`[use-chat] Gap detected: expected ${ce + 1}, got ${fe}`), ce = fe, y.current = fe, v(fe)), fe !== void 0 && fe <= y.current) {
2617
2617
  B && console.debug("[use-chat] Duplicate event ignored:", fe);
2618
2618
  continue;
2619
2619
  }
2620
- if (Se.type === "token" && e.autoAppendAssistant !== !1)
2621
- J += Se.content, Z || (Z = window.setTimeout(() => {
2622
- J && (h((Ce) => Ce + J), J = ""), Z = null;
2623
- }, 50)), I == null || I(Se);
2624
- else if (Se.type === "message_delta") {
2625
- const Ce = Se.delta.filter((Be) => Be.type === "text").map((Be) => Be.text).join("");
2626
- Ce && e.autoAppendAssistant !== !1 && (J += Ce, Z || (Z = window.setTimeout(() => {
2620
+ if (Ce.type === "token" && e.autoAppendAssistant !== !1)
2621
+ J += Ce.content, Z || (Z = window.setTimeout(() => {
2622
+ J && (h((Te) => Te + J), J = ""), Z = null;
2623
+ }, 50)), I == null || I(Ce);
2624
+ else if (Ce.type === "message_delta") {
2625
+ const Te = Ce.delta.filter((Be) => Be.type === "text").map((Be) => Be.text).join("");
2626
+ Te && e.autoAppendAssistant !== !1 && (J += Te, Z || (Z = window.setTimeout(() => {
2627
2627
  J && (h((Be) => Be + J), J = ""), Z = null;
2628
- }, 50))), I == null || I(Se);
2628
+ }, 50))), I == null || I(Ce);
2629
2629
  } else
2630
- Z && (window.clearTimeout(Z), Z = null), J && (h((Ce) => Ce + J), J = ""), Se.type === "checkpoint" ? w(Se.checkpointId) : Se.type === "error" && u(Se.message);
2630
+ Z && (window.clearTimeout(Z), Z = null), J && (h((Te) => Te + J), J = ""), Ce.type === "checkpoint" ? w(Ce.checkpointId) : Ce.type === "error" && u(Ce.message);
2631
2631
  }
2632
2632
  }
2633
2633
  J && h((se) => se + J);
@@ -2963,17 +2963,17 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2963
2963
  l.setAuthToken(V);
2964
2964
  }, [l]), { state: g, seed: b, prepend: y, pushUser: R, onEvent: S, reset: C } = nv(), E = 20, [N, I] = ue(!1), [j, P] = ue(!1), [B, G] = ue(null), [_, Y] = ue(void 0), [U, oe] = ue(void 0), [O, D] = ue(!1), K = Ke(!1), W = Ke([]), ee = Ue((V) => {
2965
2965
  V.cursor !== void 0 && G(V.cursor), V.hasMore !== void 0 && I(V.hasMore), V.checkpointId !== void 0 && Y(V.checkpointId), V.checkpointNs !== void 0 && oe(V.checkpointNs);
2966
- }, []), L = Ue((V, ae) => {
2967
- const $e = async () => {
2966
+ }, []), L = Ue((V, ae) => new Promise(($e, rt) => {
2967
+ const we = async () => {
2968
2968
  if (K.current) {
2969
- console.warn(`[ChatProvider] Operation "${ae}" queued - another operation in progress`), W.current.push($e);
2969
+ console.warn(`[ChatProvider] Operation "${ae}" queued - another operation in progress`), W.current.push(we);
2970
2970
  return;
2971
2971
  }
2972
2972
  K.current = !0;
2973
2973
  try {
2974
- console.log(`[ChatProvider] Executing operation: ${ae}`), await V();
2974
+ console.log(`[ChatProvider] Executing operation: ${ae}`), await V(), $e();
2975
2975
  } catch (qe) {
2976
- throw console.error(`[ChatProvider] Operation "${ae}" failed:`, qe), qe;
2976
+ console.error(`[ChatProvider] Operation "${ae}" failed:`, qe), rt(qe);
2977
2977
  } finally {
2978
2978
  K.current = !1;
2979
2979
  const qe = W.current.shift();
@@ -2981,15 +2981,16 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2981
2981
  });
2982
2982
  }
2983
2983
  };
2984
- K.current ? (W.current.push($e), console.log(`[ChatProvider] Queued operation: ${ae}`)) : $e().catch(() => {
2984
+ K.current ? (W.current.push(we), console.log(`[ChatProvider] Queued operation: ${ae}`)) : we().catch((qe) => {
2985
+ rt(qe);
2985
2986
  });
2986
- }, []), Z = Ue(
2987
+ }), []), Z = Ue(
2987
2988
  (V, ae) => {
2988
2989
  const $e = Array.isArray(V == null ? void 0 : V.messages) ? V.messages : [];
2989
2990
  ae === "replace" ? (console.log("[ChatProvider] Replacing messages, count:", $e.length), b($e, {
2990
2991
  checkpointId: (V == null ? void 0 : V.checkpointId) ?? null,
2991
2992
  checkpointNs: (V == null ? void 0 : V.checkpointNs) ?? null
2992
- })) : ae === "prepend" && $e.length ? (console.log("[ChatProvider] Calling prepend with", $e.length, "messages"), y($e)) : console.log("[ChatProvider] Skipping prepend - empty list or wrong mode"), G((V == null ? void 0 : V.nextCursor) ?? null), I(!!(V != null && V.hasMore)), Y((qe) => (V == null ? void 0 : V.checkpointId) ?? qe ?? void 0), oe((qe) => (V == null ? void 0 : V.checkpointNs) ?? qe ?? void 0);
2993
+ })) : ae === "prepend" && $e.length ? (console.log("[ChatProvider] Calling prepend with", $e.length, "messages"), y($e)) : console.log("[ChatProvider] Skipping prepend - empty list or wrong mode"), G((V == null ? void 0 : V.nextCursor) ?? null), I(!!(V != null && V.hasMore)), Y((rt) => (V == null ? void 0 : V.checkpointId) ?? rt ?? void 0), oe((rt) => (V == null ? void 0 : V.checkpointNs) ?? rt ?? void 0);
2993
2994
  },
2994
2995
  [b, y]
2995
2996
  ), [pe, he] = ue([]), [F, A] = ue(null), H = Ue(async () => {
@@ -2997,41 +2998,41 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2997
2998
  he(V);
2998
2999
  }, [l]), [J, ce] = ue(!1), se = Ue(
2999
3000
  async (V) => {
3000
- const ae = (V == null ? void 0 : V.maxAttempts) ?? 5, $e = (V == null ? void 0 : V.baseDelayMs) ?? 500, qe = (V == null ? void 0 : V.timeoutMs) ?? 2e3;
3001
+ const ae = (V == null ? void 0 : V.maxAttempts) ?? 5, $e = (V == null ? void 0 : V.baseDelayMs) ?? 500, rt = (V == null ? void 0 : V.timeoutMs) ?? 2e3;
3001
3002
  if (!l.baseUrl) return !1;
3002
- const Re = l.baseUrl.replace(/\/+$/, ""), xt = [
3003
+ const we = l.baseUrl.replace(/\/+$/, ""), qe = [
3003
3004
  "/health",
3004
3005
  "/api/health",
3005
3006
  "/",
3006
3007
  // root
3007
3008
  "/api/v2/health",
3008
3009
  "/api/v2/chat/health"
3009
- ], jt = async (lt) => {
3010
+ ], jt = async (ut) => {
3010
3011
  try {
3011
- const Tt = new AbortController(), at = setTimeout(() => Tt.abort(), qe), ht = await fetch(lt, { method: "GET", signal: Tt.signal });
3012
- return clearTimeout(at), ht.ok;
3012
+ const Tt = new AbortController(), ct = setTimeout(() => Tt.abort(), rt), pt = await fetch(ut, { method: "GET", signal: Tt.signal });
3013
+ return clearTimeout(ct), pt.ok;
3013
3014
  } catch {
3014
3015
  return !1;
3015
3016
  }
3016
- }, En = async (lt) => {
3017
+ }, En = async (ut) => {
3017
3018
  try {
3018
- const Tt = new AbortController(), at = setTimeout(() => Tt.abort(), qe), ht = await fetch(lt, { method: "HEAD", signal: Tt.signal });
3019
- return clearTimeout(at), ht.ok;
3019
+ const Tt = new AbortController(), ct = setTimeout(() => Tt.abort(), rt), pt = await fetch(ut, { method: "HEAD", signal: Tt.signal });
3020
+ return clearTimeout(ct), pt.ok;
3020
3021
  } catch {
3021
3022
  return !1;
3022
3023
  }
3023
3024
  };
3024
- for (let lt = 0; lt < ae; lt++) {
3025
- console.debug(`[ChatProvider] health-check attempt ${lt + 1}/${ae}`);
3026
- for (const at of xt) {
3027
- let ht = at;
3028
- Re.endsWith("/api") && at.startsWith("/api") && (ht = at.replace(/^\/api/, "") || "/");
3029
- const cn = ht === "/" ? Re + "/" : Re + ht;
3030
- if (console.debug(`[ChatProvider] checking ${cn}`), await jt(cn) || at === "/" && await En(Re + "/"))
3025
+ for (let ut = 0; ut < ae; ut++) {
3026
+ console.debug(`[ChatProvider] health-check attempt ${ut + 1}/${ae}`);
3027
+ for (const ct of qe) {
3028
+ let pt = ct;
3029
+ we.endsWith("/api") && ct.startsWith("/api") && (pt = ct.replace(/^\/api/, "") || "/");
3030
+ const cn = pt === "/" ? we + "/" : we + pt;
3031
+ if (console.debug(`[ChatProvider] checking ${cn}`), await jt(cn) || ct === "/" && await En(we + "/"))
3031
3032
  return ce(!0), !0;
3032
3033
  }
3033
- const Tt = $e * Math.pow(2, lt);
3034
- await new Promise((at) => setTimeout(at, Tt));
3034
+ const Tt = $e * Math.pow(2, ut);
3035
+ await new Promise((ct) => setTimeout(ct, Tt));
3035
3036
  }
3036
3037
  return ce(!1), !1;
3037
3038
  },
@@ -3091,18 +3092,18 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3091
3092
  checkpointId: void 0,
3092
3093
  checkpointNs: void 0
3093
3094
  });
3094
- const Re = await l.getMessages({
3095
+ const we = await l.getMessages({
3095
3096
  threadId: V,
3096
3097
  checkpointId: ae,
3097
3098
  checkpointNs: $e,
3098
3099
  limit: E
3099
3100
  });
3100
3101
  A(V);
3101
- const xt = Array.isArray(Re == null ? void 0 : Re.messages) ? Re.messages : [];
3102
- console.log("[ChatProvider] Loading thread with", xt.length, "messages"), b(xt, {
3103
- checkpointId: (Re == null ? void 0 : Re.checkpointId) ?? null,
3104
- checkpointNs: (Re == null ? void 0 : Re.checkpointNs) ?? null
3105
- }), G((Re == null ? void 0 : Re.nextCursor) ?? null), I(!!(Re != null && Re.hasMore)), Y((jt) => (Re == null ? void 0 : Re.checkpointId) ?? jt ?? void 0), oe((jt) => (Re == null ? void 0 : Re.checkpointNs) ?? jt ?? void 0);
3102
+ const qe = Array.isArray(we == null ? void 0 : we.messages) ? we.messages : [];
3103
+ console.log("[ChatProvider] Loading thread with", qe.length, "messages"), b(qe, {
3104
+ checkpointId: (we == null ? void 0 : we.checkpointId) ?? null,
3105
+ checkpointNs: (we == null ? void 0 : we.checkpointNs) ?? null
3106
+ }), G((we == null ? void 0 : we.nextCursor) ?? null), I(!!(we != null && we.hasMore)), Y((jt) => (we == null ? void 0 : we.checkpointId) ?? jt ?? void 0), oe((jt) => (we == null ? void 0 : we.checkpointNs) ?? jt ?? void 0);
3106
3107
  } finally {
3107
3108
  _e.current = null;
3108
3109
  }
@@ -3112,7 +3113,7 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3112
3113
  ), Ne = Ue(async (V) => {
3113
3114
  const ae = await l.listCheckpoints(V);
3114
3115
  return cv(ae, V);
3115
- }, [l]), Se = Ue(async (V, ae) => {
3116
+ }, [l]), Ce = Ue(async (V, ae) => {
3116
3117
  await L(async () => {
3117
3118
  if (!F) throw new Error("No active thread");
3118
3119
  ee({
@@ -3132,10 +3133,10 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3132
3133
  }, [l, F, Z, L, ee]), fe = Ue(async () => {
3133
3134
  if (!F) throw new Error("No active thread");
3134
3135
  await ie(F);
3135
- }, [F, ie]), Ce = Ke(!1);
3136
+ }, [F, ie]), Te = Ke(!1);
3136
3137
  Ze(() => {
3137
- const V = Ce.current;
3138
- Ce.current = u, V && !u && F && L(async () => {
3138
+ const V = Te.current;
3139
+ Te.current = u, V && !u && F && L(async () => {
3139
3140
  try {
3140
3141
  await H();
3141
3142
  } catch (ae) {
@@ -3146,22 +3147,22 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3146
3147
  const Be = Ue(async (V) => {
3147
3148
  const ae = await l.createThread(V);
3148
3149
  return await H(), await ie(ae.threadId), ae.threadId;
3149
- }, [l, H, ie]), ot = Ue(async (V) => {
3150
+ }, [l, H, ie]), st = Ue(async (V) => {
3150
3151
  await l.deleteThread(V), await H(), F === V && (A(null), C([]), I(!1), G(null), Y(void 0), oe(void 0));
3151
3152
  }, [l, H, F, C]), et = Ue(async (V, ae) => {
3152
3153
  await l.updateThread(V, ae), await H();
3153
- }, [l, H]), vt = Ue(async (V, ae) => {
3154
+ }, [l, H]), xt = Ue(async (V, ae) => {
3154
3155
  var hn;
3155
- const $e = (ae == null ? void 0 : ae.attachments) || [], { contentParts: qe, filesInfo: Re } = await uv(
3156
+ const $e = (ae == null ? void 0 : ae.attachments) || [], { contentParts: rt, filesInfo: we } = await uv(
3156
3157
  l,
3157
3158
  $e,
3158
3159
  t == null ? void 0 : t.uploadPath
3159
- ), xt = [];
3160
- V && V.trim() && xt.push({ type: "text", text: V.trim() });
3160
+ ), qe = [];
3161
+ V && V.trim() && qe.push({ type: "text", text: V.trim() });
3161
3162
  const jt = {
3162
3163
  id: ((hn = crypto.randomUUID) == null ? void 0 : hn.call(crypto)) || `user-${Date.now()}`,
3163
3164
  role: "user",
3164
- content: xt,
3165
+ content: qe,
3165
3166
  // ← No empty text parts
3166
3167
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
3167
3168
  checkpointId: (ae == null ? void 0 : ae.checkpointId) ?? g.lastCheckpointId ?? void 0,
@@ -3171,23 +3172,23 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3171
3172
  const En = {
3172
3173
  ...jt,
3173
3174
  // No need to filter - messageContent already only contains text
3174
- content: xt
3175
+ content: qe
3175
3176
  // ← Clean content without empty parts
3176
- }, lt = { ...(ae == null ? void 0 : ae.payloadExtras) ?? {} }, Tt = !!lt.edit, at = lt.originalMessageId, ht = typeof at == "string" ? at : void 0, cn = $e && $e.length > 0, Yt = {
3177
+ }, ut = { ...(ae == null ? void 0 : ae.payloadExtras) ?? {} }, Tt = !!ut.edit, ct = ut.originalMessageId, pt = typeof ct == "string" ? ct : void 0, cn = $e && $e.length > 0, Yt = {
3177
3178
  ...F ? { threadId: F } : {},
3178
3179
  payload: {
3179
3180
  messages: [En],
3180
3181
  // Remove attachments array since we're not including file parts in message content
3181
- files_info: Re,
3182
+ files_info: we,
3182
3183
  ...i && cn && a ? { active_agent: a } : {},
3183
- ...lt
3184
+ ...ut
3184
3185
  },
3185
3186
  checkpointId: (ae == null ? void 0 : ae.checkpointId) ?? g.lastCheckpointId ?? void 0,
3186
3187
  checkpointNs: (ae == null ? void 0 : ae.checkpointNs) ?? g.lastCheckpointNs ?? void 0,
3187
3188
  nodeFilter: ae == null ? void 0 : ae.nodeFilter,
3188
3189
  config: ae == null ? void 0 : ae.config,
3189
3190
  edit: Tt,
3190
- originalMessageId: ht
3191
+ originalMessageId: pt
3191
3192
  };
3192
3193
  h(
3193
3194
  Yt,
@@ -3200,7 +3201,7 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3200
3201
  }
3201
3202
  }
3202
3203
  );
3203
- }, [F, R, h, S, g.lastCheckpointId, g.lastCheckpointNs, l, t == null ? void 0 : t.uploadPath, H, A, i, a]), it = Ue(
3204
+ }, [F, R, h, S, g.lastCheckpointId, g.lastCheckpointNs, l, t == null ? void 0 : t.uploadPath, H, A, i, a]), at = Ue(
3204
3205
  async (V) => {
3205
3206
  if (!F) throw new Error("No active thread");
3206
3207
  if (j || !N) return;
@@ -3240,17 +3241,17 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3240
3241
  isLoadingHistory: j,
3241
3242
  isPostStreamFetch: O,
3242
3243
  // NEW: expose flag for post-stream fetches to consumers
3243
- loadOlderMessages: it,
3244
+ loadOlderMessages: at,
3244
3245
  historyPageSize: E,
3245
3246
  listCheckpoints: Ne,
3246
- navigateToCheckpoint: Se,
3247
+ navigateToCheckpoint: Ce,
3247
3248
  returnToLatest: fe,
3248
3249
  refreshThreads: H,
3249
3250
  createThread: Be,
3250
- deleteThread: ot,
3251
+ deleteThread: st,
3251
3252
  renameThread: et,
3252
3253
  loadThread: ie,
3253
- send: vt,
3254
+ send: xt,
3254
3255
  stop: m
3255
3256
  };
3256
3257
  return /* @__PURE__ */ c.jsx(Jl.Provider, { value: an, children: e });
@@ -3446,7 +3447,7 @@ function Ve(...e) {
3446
3447
  function Fe(e, t) {
3447
3448
  return e(yn, t);
3448
3449
  }
3449
- function ye(e, t) {
3450
+ function Se(e, t) {
3450
3451
  e(os, t);
3451
3452
  }
3452
3453
  function Xi(e) {
@@ -3524,7 +3525,7 @@ function un(e) {
3524
3525
  }, e));
3525
3526
  };
3526
3527
  }
3527
- function Te(...e) {
3528
+ function Re(...e) {
3528
3529
  const t = new Array(e.length);
3529
3530
  let n = 0, r = null;
3530
3531
  const o = Math.pow(2, e.length) - 1;
@@ -3575,7 +3576,7 @@ function X(e) {
3575
3576
  return n(r, o);
3576
3577
  };
3577
3578
  }
3578
- function ft(e, t) {
3579
+ function ht(e, t) {
3579
3580
  return ss(X(t), (n) => de(e, n));
3580
3581
  }
3581
3582
  function ke() {
@@ -3626,7 +3627,7 @@ function nt(...e) {
3626
3627
  return e.forEach((s, i) => {
3627
3628
  const a = Math.pow(2, i);
3628
3629
  Fe(s, (l) => {
3629
- n[i] = l, r = r | a, r === o && ye(t, n);
3630
+ n[i] = l, r = r | a, r === o && Se(t, n);
3630
3631
  });
3631
3632
  }), function(s, i) {
3632
3633
  switch (s) {
@@ -3786,7 +3787,7 @@ function nu(e, t, n) {
3786
3787
  }
3787
3788
  }, [a, t, i]), s;
3788
3789
  }
3789
- const mt = Me(
3790
+ const gt = Me(
3790
3791
  () => {
3791
3792
  const e = ke(), t = ke(), n = X(0), r = ke(), o = X(0), s = ke(), i = ke(), a = X(0), l = X(0), u = X(0), d = X(0), h = ke(), m = ke(), w = X(!1), x = X(!1), v = X(!1);
3792
3793
  return de(
@@ -3857,7 +3858,7 @@ function zt(e, t, n = "k") {
3857
3858
  return zt(e.l, t, n);
3858
3859
  }
3859
3860
  function Et(e, t, n) {
3860
- return ze(e) ? iu(t, n, 1) : t === e.k ? rt(e, { k: t, v: n }) : t < e.k ? Tc(rt(e, { l: Et(e.l, t, n) })) : Tc(rt(e, { r: Et(e.r, t, n) }));
3861
+ return ze(e) ? iu(t, n, 1) : t === e.k ? ot(e, { k: t, v: n }) : t < e.k ? Tc(ot(e, { l: Et(e.l, t, n) })) : Tc(ot(e, { r: Et(e.r, t, n) }));
3861
3862
  }
3862
3863
  function tr() {
3863
3864
  return _r;
@@ -3878,9 +3879,9 @@ function bi(e, t) {
3878
3879
  return r;
3879
3880
  {
3880
3881
  const [s, i] = su(r);
3881
- return yo(rt(e, { k: s, l: ou(r), v: i }));
3882
+ return yo(ot(e, { k: s, l: ou(r), v: i }));
3882
3883
  }
3883
- } else return t < n ? yo(rt(e, { l: bi(r, t) })) : yo(rt(e, { r: bi(o, t) }));
3884
+ } else return t < n ? yo(ot(e, { l: bi(r, t) })) : yo(ot(e, { r: bi(o, t) }));
3884
3885
  }
3885
3886
  function An(e) {
3886
3887
  return ze(e) ? [] : [...An(e.l), { k: e.k, v: e.v }, ...An(e.r)];
@@ -3898,12 +3899,12 @@ function yo(e) {
3898
3899
  return e;
3899
3900
  if (n > r.lvl + 1) {
3900
3901
  if (Hs(t))
3901
- return au(rt(e, { lvl: n - 1 }));
3902
+ return au(ot(e, { lvl: n - 1 }));
3902
3903
  if (!ze(t) && !ze(t.r))
3903
- return rt(t.r, {
3904
- l: rt(t, { r: t.r.l }),
3904
+ return ot(t.r, {
3905
+ l: ot(t, { r: t.r.l }),
3905
3906
  lvl: n,
3906
- r: rt(e, {
3907
+ r: ot(e, {
3907
3908
  l: t.r.r,
3908
3909
  lvl: n - 1
3909
3910
  })
@@ -3911,22 +3912,22 @@ function yo(e) {
3911
3912
  throw new Error("Unexpected empty nodes");
3912
3913
  } else {
3913
3914
  if (Hs(e))
3914
- return yi(rt(e, { lvl: n - 1 }));
3915
+ return yi(ot(e, { lvl: n - 1 }));
3915
3916
  if (!ze(r) && !ze(r.l)) {
3916
3917
  const o = r.l, s = Hs(o) ? r.lvl - 1 : r.lvl;
3917
- return rt(o, {
3918
- l: rt(e, {
3918
+ return ot(o, {
3919
+ l: ot(e, {
3919
3920
  lvl: n - 1,
3920
3921
  r: o.l
3921
3922
  }),
3922
3923
  lvl: o.lvl + 1,
3923
- r: yi(rt(r, { l: o.r, lvl: s }))
3924
+ r: yi(ot(r, { l: o.r, lvl: s }))
3924
3925
  });
3925
3926
  } else
3926
3927
  throw new Error("Unexpected empty nodes");
3927
3928
  }
3928
3929
  }
3929
- function rt(e, t) {
3930
+ function ot(e, t) {
3930
3931
  return iu(
3931
3932
  t.k !== void 0 ? t.k : e.k,
3932
3933
  t.v !== void 0 ? t.v : e.v,
@@ -3936,7 +3937,7 @@ function rt(e, t) {
3936
3937
  );
3937
3938
  }
3938
3939
  function ou(e) {
3939
- return ze(e.r) ? e.l : yo(rt(e, { r: ou(e.r) }));
3940
+ return ze(e.r) ? e.l : yo(ot(e, { r: ou(e.r) }));
3940
3941
  }
3941
3942
  function Hs(e) {
3942
3943
  return ze(e) || e.lvl > e.r.lvl;
@@ -3952,11 +3953,11 @@ function Tc(e) {
3952
3953
  }
3953
3954
  function au(e) {
3954
3955
  const { l: t } = e;
3955
- return !ze(t) && t.lvl === e.lvl ? rt(t, { r: rt(e, { l: t.r }) }) : e;
3956
+ return !ze(t) && t.lvl === e.lvl ? ot(t, { r: ot(e, { l: t.r }) }) : e;
3956
3957
  }
3957
3958
  function yi(e) {
3958
3959
  const { lvl: t, r: n } = e;
3959
- return !ze(n) && !ze(n.r) && n.lvl === t && n.r.lvl === t ? rt(n, { l: rt(e, { r: n.l }), lvl: t + 1 }) : e;
3960
+ return !ze(n) && !ze(n.r) && n.lvl === t && n.r.lvl === t ? ot(n, { l: ot(e, { r: n.l }), lvl: t + 1 }) : e;
3960
3961
  }
3961
3962
  function Ev(e) {
3962
3963
  return ru(e, ({ k: t, v: n }) => ({ index: t, value: n }));
@@ -4136,10 +4137,10 @@ const Lv = {
4136
4137
  offsetWidth: "width"
4137
4138
  }, rn = Me(
4138
4139
  ([{ log: e }, { recalcInProgress: t }]) => {
4139
- const n = ke(), r = ke(), o = ft(r, 0), s = ke(), i = ke(), a = X(0), l = X([]), u = X(void 0), d = X(void 0), h = X((S, C) => vn(S, Lv[C])), m = X(void 0), w = X(0), x = Iv(), v = ft(
4140
- $(n, Te(l, e, w), Qt(_v, x), We()),
4140
+ const n = ke(), r = ke(), o = ht(r, 0), s = ke(), i = ke(), a = X(0), l = X([]), u = X(void 0), d = X(void 0), h = X((S, C) => vn(S, Lv[C])), m = X(void 0), w = X(0), x = Iv(), v = ht(
4141
+ $(n, Re(l, e, w), Qt(_v, x), We()),
4141
4142
  x
4142
- ), p = ft(
4143
+ ), p = ht(
4143
4144
  $(
4144
4145
  l,
4145
4146
  We(),
@@ -4155,7 +4156,7 @@ const Lv = {
4155
4156
  $(
4156
4157
  l,
4157
4158
  ge((S) => S.length > 0),
4158
- Te(v, w),
4159
+ Re(v, w),
4159
4160
  re(([S, C, E]) => {
4160
4161
  const N = S.reduce((I, j, P) => Et(I, j, Dr(j, C.offsetTree, E) || P), tr());
4161
4162
  return {
@@ -4169,7 +4170,7 @@ const Lv = {
4169
4170
  ), de(
4170
4171
  $(
4171
4172
  r,
4172
- Te(v),
4173
+ Re(v),
4173
4174
  ge(([S, { lastIndex: C }]) => S < C),
4174
4175
  re(([S, { lastIndex: C, lastSize: E }]) => [
4175
4176
  {
@@ -4181,7 +4182,7 @@ const Lv = {
4181
4182
  ),
4182
4183
  n
4183
4184
  ), de(u, d);
4184
- const g = ft(
4185
+ const g = ht(
4185
4186
  $(
4186
4187
  u,
4187
4188
  re((S) => S === void 0)
@@ -4199,7 +4200,7 @@ const Lv = {
4199
4200
  const b = Nt(
4200
4201
  $(
4201
4202
  n,
4202
- Te(v),
4203
+ Re(v),
4203
4204
  Qt(
4204
4205
  ({ sizes: S }, [C, E]) => ({
4205
4206
  changed: E !== S,
@@ -4222,13 +4223,13 @@ const Lv = {
4222
4223
  (S) => {
4223
4224
  const { groupIndices: C } = Je(v);
4224
4225
  if (S > 0)
4225
- ye(t, !0), ye(s, S + Rc(S, C));
4226
+ Se(t, !0), Se(s, S + Rc(S, C));
4226
4227
  else if (S < 0) {
4227
4228
  const E = Je(p);
4228
- E.length > 0 && (S -= Rc(-S, E)), ye(i, S);
4229
+ E.length > 0 && (S -= Rc(-S, E)), Se(i, S);
4229
4230
  }
4230
4231
  }
4231
- ), Fe($(a, Te(e)), ([S, C]) => {
4232
+ ), Fe($(a, Re(e)), ([S, C]) => {
4232
4233
  S < 0 && C(
4233
4234
  "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
4234
4235
  { firstItemIndex: a },
@@ -4239,7 +4240,7 @@ const Lv = {
4239
4240
  de(
4240
4241
  $(
4241
4242
  s,
4242
- Te(v),
4243
+ Re(v),
4243
4244
  re(([S, C]) => {
4244
4245
  const E = C.groupIndices.length > 0, N = [], I = C.lastSize;
4245
4246
  if (E) {
@@ -4300,7 +4301,7 @@ const Lv = {
4300
4301
  const R = Nt(
4301
4302
  $(
4302
4303
  i,
4303
- Te(v, w),
4304
+ Re(v, w),
4304
4305
  re(([S, { offsetTree: C }, E]) => {
4305
4306
  const N = -S;
4306
4307
  return Dr(N, C, E);
@@ -4310,7 +4311,7 @@ const Lv = {
4310
4311
  return de(
4311
4312
  $(
4312
4313
  i,
4313
- Te(v, w),
4314
+ Re(v, w),
4314
4315
  re(([S, C, E]) => {
4315
4316
  if (C.groupIndices.length > 0) {
4316
4317
  if (ze(C.sizeTree))
@@ -4405,7 +4406,7 @@ const fu = Me(
4405
4406
  i
4406
4407
  ), { groupCounts: s, topItemsIndexes: i };
4407
4408
  },
4408
- Ve(rn, mt)
4409
+ Ve(rn, gt)
4409
4410
  ), Cn = Me(
4410
4411
  ([{ log: e }]) => {
4411
4412
  const t = X(!1), n = Nt(
@@ -4444,13 +4445,13 @@ const qr = Me(
4444
4445
  const w = ke(), x = ke(), v = X(0);
4445
4446
  let p = null, g = null, b = null;
4446
4447
  function y() {
4447
- p && (p(), p = null), b && (b(), b = null), g && (clearTimeout(g), g = null), ye(l, !1);
4448
+ p && (p(), p = null), b && (b(), b = null), g && (clearTimeout(g), g = null), Se(l, !1);
4448
4449
  }
4449
4450
  return de(
4450
4451
  $(
4451
4452
  w,
4452
- Te(n, h, r, v, a, i, m),
4453
- Te(e, s, o),
4453
+ Re(n, h, r, v, a, i, m),
4454
+ Re(e, s, o),
4454
4455
  re(
4455
4456
  ([
4456
4457
  [R, S, C, E, N, I, j, P],
@@ -4462,7 +4463,7 @@ const qr = Me(
4462
4463
  let W = Dr(K, S.offsetTree, B) + I;
4463
4464
  U === "end" ? (W += G + zt(S.sizeTree, K)[1] - C + _, K === D && (W += j)) : U === "center" ? W += (G + zt(S.sizeTree, K)[1] - C + _) / 2 : W -= N, O && (W += O);
4464
4465
  const ee = (L) => {
4465
- y(), L ? (P("retrying to scroll to", { location: R }, St.DEBUG), ye(w, R)) : (ye(x, !0), P("list did not change, scroll successful", {}, St.DEBUG));
4466
+ y(), L ? (P("retrying to scroll to", { location: R }, St.DEBUG), Se(w, R)) : (Se(x, !0), P("list did not change, scroll successful", {}, St.DEBUG));
4466
4467
  };
4467
4468
  if (y(), oe === "smooth") {
4468
4469
  let L = !1;
@@ -4475,7 +4476,7 @@ const qr = Me(
4475
4476
  p = $t($(t, $v(150)), ee);
4476
4477
  return g = setTimeout(() => {
4477
4478
  y();
4478
- }, 1200), ye(l, !0), P("scrolling from index to", { behavior: oe, index: K, top: W }, St.DEBUG), { behavior: oe, top: W };
4479
+ }, 1200), Se(l, !0), P("scrolling from index to", { behavior: oe, index: K, top: W }, St.DEBUG), { behavior: oe, top: W };
4479
4480
  }
4480
4481
  )
4481
4482
  ),
@@ -4486,7 +4487,7 @@ const qr = Me(
4486
4487
  topListHeight: v
4487
4488
  };
4488
4489
  },
4489
- Ve(rn, mt, Sn),
4490
+ Ve(rn, gt, Sn),
4490
4491
  { singleton: !0 }
4491
4492
  );
4492
4493
  function $v(e) {
@@ -4514,7 +4515,7 @@ const Xr = Me(
4514
4515
  return de(
4515
4516
  $(
4516
4517
  i,
4517
- Te(l),
4518
+ Re(l),
4518
4519
  ge(([d, h]) => !!h),
4519
4520
  Jt(!1)
4520
4521
  ),
@@ -4522,7 +4523,7 @@ const Xr = Me(
4522
4523
  ), de(
4523
4524
  $(
4524
4525
  i,
4525
- Te(l),
4526
+ Re(l),
4526
4527
  ge(([d, h]) => !!h),
4527
4528
  Jt(!1)
4528
4529
  ),
@@ -4530,17 +4531,17 @@ const Xr = Me(
4530
4531
  ), Fe(
4531
4532
  $(
4532
4533
  nt(t, i),
4533
- Te(a, n, e, u),
4534
+ Re(a, n, e, u),
4534
4535
  ge(([[, d], h, { sizeTree: m }, w, x]) => d && (!ze(m) || qi(w)) && !h && !x),
4535
- Te(l)
4536
+ Re(l)
4536
4537
  ),
4537
4538
  ([, d]) => {
4538
4539
  $t(o, () => {
4539
- ye(u, !0);
4540
+ Se(u, !0);
4540
4541
  }), ea(4, () => {
4541
4542
  $t(r, () => {
4542
- ye(a, !0);
4543
- }), ye(s, d);
4543
+ Se(a, !0);
4544
+ }), Se(s, d);
4544
4545
  });
4545
4546
  }
4546
4547
  ), {
@@ -4549,7 +4550,7 @@ const Xr = Me(
4549
4550
  scrolledToInitialItem: a
4550
4551
  };
4551
4552
  },
4552
- Ve(rn, mt, qr, Cn),
4553
+ Ve(rn, gt, qr, Cn),
4553
4554
  { singleton: !0 }
4554
4555
  );
4555
4556
  function pu(e, t) {
@@ -4565,13 +4566,13 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4565
4566
  viewportHeight: 0
4566
4567
  }
4567
4568
  }, Uv = 0, Jr = Me(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
4568
- const i = X(!1), a = X(!0), l = ke(), u = ke(), d = X(4), h = X(Uv), m = ft(
4569
+ const i = X(!1), a = X(!0), l = ke(), u = ke(), d = X(4), h = X(Uv), m = ht(
4569
4570
  $(
4570
4571
  xi($(me(o), Dn(1), Jt(!0)), $(me(o), Dn(1), Jt(!1), Sc(100))),
4571
4572
  We()
4572
4573
  ),
4573
4574
  !1
4574
- ), w = ft(
4575
+ ), w = ht(
4575
4576
  $(xi($(n, Jt(!0)), $(n, Jt(!1), Sc(200))), We()),
4576
4577
  !1
4577
4578
  );
@@ -4610,7 +4611,7 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4610
4611
  }, zv),
4611
4612
  We((b, y) => b && b.atBottom === y.atBottom)
4612
4613
  )
4613
- ), v = ft(
4614
+ ), v = ht(
4614
4615
  $(
4615
4616
  r,
4616
4617
  Qt(
@@ -4677,7 +4678,7 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4677
4678
  $(
4678
4679
  o,
4679
4680
  un(100),
4680
- Te(m),
4681
+ Re(m),
4681
4682
  ge(([b, y]) => !!y),
4682
4683
  Qt(([b, y], [R]) => [y, R], [0, 0]),
4683
4684
  re(([b, y]) => y - b)
@@ -4696,7 +4697,7 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4696
4697
  scrollDirection: p,
4697
4698
  scrollVelocity: g
4698
4699
  };
4699
- }, Ve(mt)), Fo = "top", Bo = "bottom", Ec = "none";
4700
+ }, Ve(gt)), Fo = "top", Bo = "bottom", Ec = "none";
4700
4701
  function Nc(e, t, n) {
4701
4702
  return typeof e == "number" ? n === Lr && t === Fo || n === Nr && t === Bo ? e : 0 : n === Lr ? t === Fo ? e.main : e.reverse : t === Bo ? e.main : e.reverse;
4702
4703
  }
@@ -4706,7 +4707,7 @@ function Ic(e, t) {
4706
4707
  }
4707
4708
  const na = Me(
4708
4709
  ([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
4709
- const s = ke(), i = X(0), a = X(0), l = X(0), u = ft(
4710
+ const s = ke(), i = X(0), a = X(0), l = X(0), u = ht(
4710
4711
  $(
4711
4712
  nt(
4712
4713
  me(r),
@@ -4755,7 +4756,7 @@ const na = Me(
4755
4756
  visibleRange: u
4756
4757
  };
4757
4758
  },
4758
- Ve(mt),
4759
+ Ve(gt),
4759
4760
  { singleton: !0 }
4760
4761
  );
4761
4762
  function Wv(e, t, n) {
@@ -4855,7 +4856,7 @@ const zn = Me(
4855
4856
  ]) => {
4856
4857
  const v = X([]), p = X(0), g = ke();
4857
4858
  de(s.topItemsIndexes, v);
4858
- const b = ft(
4859
+ const b = ht(
4859
4860
  $(
4860
4861
  nt(
4861
4862
  w,
@@ -4972,7 +4973,7 @@ const zn = Me(
4972
4973
  $(
4973
4974
  b,
4974
4975
  ge(({ items: C }) => C.length > 0),
4975
- Te(o, e),
4976
+ Re(o, e),
4976
4977
  ge(([{ items: C }, E]) => C[C.length - 1].originalIndex === E - 1),
4977
4978
  re(([, C, E]) => [C - 1, E]),
4978
4979
  We(Mr),
@@ -5019,7 +5020,7 @@ const zn = Me(
5019
5020
  { singleton: !0 }
5020
5021
  ), gu = Me(
5021
5022
  ([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
5022
- const s = ke(), i = ft(
5023
+ const s = ke(), i = ht(
5023
5024
  $(
5024
5025
  nt(n, e, r, t, o),
5025
5026
  re(([a, l, u, d, h]) => a + l + u + d + h.offsetBottom + h.bottom)
@@ -5028,11 +5029,11 @@ const zn = Me(
5028
5029
  );
5029
5030
  return de(me(i), s), { totalListHeight: i, totalListHeightChanged: s };
5030
5031
  },
5031
- Ve(mt, zn),
5032
+ Ve(gt, zn),
5032
5033
  { singleton: !0 }
5033
5034
  ), Vv = Me(
5034
5035
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
5035
- const n = X(!1), r = ft(
5036
+ const n = X(!1), r = ht(
5036
5037
  $(
5037
5038
  nt(n, e, t),
5038
5039
  ge(([o]) => o),
@@ -5044,7 +5045,7 @@ const zn = Me(
5044
5045
  );
5045
5046
  return { alignToBottom: n, paddingTopAddition: r };
5046
5047
  },
5047
- Ve(mt, gu),
5048
+ Ve(gt, gu),
5048
5049
  { singleton: !0 }
5049
5050
  ), vu = Me(() => ({
5050
5051
  context: X(null)
@@ -5064,8 +5065,8 @@ const zn = Me(
5064
5065
  return de(
5065
5066
  $(
5066
5067
  d,
5067
- Te(t, l, n, s, o, r, a),
5068
- Te(e),
5068
+ Re(t, l, n, s, o, r, a),
5069
+ Re(e),
5069
5070
  re(([[h, m, w, x, v, p, g, b], y]) => {
5070
5071
  const { align: R, behavior: S, calculateViewLocation: C = Gv, done: E, ...N } = h, I = du(h, m, x - 1), j = Dr(I, m.offsetTree, y) + v + p, P = j + zt(m.sizeTree, I)[1], B = b + p, G = b + w - g, _ = C({
5071
5072
  itemBottom: P,
@@ -5092,7 +5093,7 @@ const zn = Me(
5092
5093
  scrollIntoView: d
5093
5094
  };
5094
5095
  },
5095
- Ve(rn, mt, qr, zn, Sn),
5096
+ Ve(rn, gt, qr, zn, Sn),
5096
5097
  { singleton: !0 }
5097
5098
  );
5098
5099
  function kc(e) {
@@ -5113,7 +5114,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5113
5114
  const x = X(!1), v = ke();
5114
5115
  let p = null;
5115
5116
  function g(S) {
5116
- ye(i, {
5117
+ Se(i, {
5117
5118
  align: "end",
5118
5119
  behavior: S,
5119
5120
  index: "LAST"
@@ -5122,7 +5123,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5122
5123
  Fe(
5123
5124
  $(
5124
5125
  nt($(me(t), Dn(1)), l),
5125
- Te(me(x), s, a, h),
5126
+ Re(me(x), s, a, h),
5126
5127
  re(([[S, C], E, N, I, j]) => {
5127
5128
  let P = C && I, B = "auto";
5128
5129
  return P && (B = Kv(E, N || j), P = P && !!B), { followOutputBehavior: B, shouldFollow: P, totalCount: S };
@@ -5152,7 +5153,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5152
5153
  { refreshed: !1, value: 0 }
5153
5154
  ),
5154
5155
  ge(({ refreshed: S }) => S),
5155
- Te(x, t)
5156
+ Re(x, t)
5156
5157
  ),
5157
5158
  ([, S]) => {
5158
5159
  Je(a) && b(S !== !1);
@@ -5178,16 +5179,16 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5178
5179
  ), Fe(
5179
5180
  $(
5180
5181
  nt($(R, Dn(1)), l),
5181
- Te(me(y), a, h, m),
5182
+ Re(me(y), a, h, m),
5182
5183
  re(([[S, C], E, N, I, j]) => C && N && (E == null ? void 0 : E({ context: j, totalCount: S, scrollingInProgress: I }))),
5183
5184
  ge((S) => !!S),
5184
5185
  un(0)
5185
5186
  ),
5186
5187
  (S) => {
5187
5188
  p && (p(), p = null), Je(n) ? requestAnimationFrame(() => {
5188
- Je(d)("scrolling into view", {}), ye(w, S);
5189
+ Je(d)("scrolling into view", {}), Se(w, S);
5189
5190
  }) : p = $t(e, () => {
5190
- Je(d)("scrolling into view", {}), ye(w, S), p = null;
5191
+ Je(d)("scrolling into view", {}), Se(w, S), p = null;
5191
5192
  });
5192
5193
  }
5193
5194
  ), { autoscrollToBottom: v, followOutput: x, scrollIntoViewOnChange: y };
@@ -5199,7 +5200,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5199
5200
  Xr,
5200
5201
  Cn,
5201
5202
  Sn,
5202
- mt,
5203
+ gt,
5203
5204
  vu,
5204
5205
  xu
5205
5206
  )
@@ -5207,9 +5208,9 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5207
5208
  ([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: i }, { didMount: a }]) => (de(
5208
5209
  $(
5209
5210
  a,
5210
- Te(s),
5211
+ Re(s),
5211
5212
  ge(([, l]) => l !== 0),
5212
- Te(o, r, t, n, e),
5213
+ Re(o, r, t, n, e),
5213
5214
  re(([[, l], u, d, h, m, w = []]) => mu(l, u, d, h, m, w))
5214
5215
  ),
5215
5216
  i
@@ -5222,7 +5223,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5222
5223
  return Fe(
5223
5224
  $(
5224
5225
  e,
5225
- Te(r),
5226
+ Re(r),
5226
5227
  ge(([, o]) => o !== 0),
5227
5228
  re(([, o]) => ({ top: o }))
5228
5229
  ),
@@ -5235,7 +5236,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5235
5236
  ),
5236
5237
  () => {
5237
5238
  requestAnimationFrame(() => {
5238
- ye(t, o);
5239
+ Se(t, o);
5239
5240
  });
5240
5241
  }
5241
5242
  );
@@ -5244,7 +5245,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5244
5245
  initialScrollTop: r
5245
5246
  };
5246
5247
  },
5247
- Ve(Cn, mt, zn),
5248
+ Ve(Cn, gt, zn),
5248
5249
  { singleton: !0 }
5249
5250
  ), bu = Me(
5250
5251
  ([{ scrollVelocity: e }]) => {
@@ -5252,7 +5253,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5252
5253
  return de(
5253
5254
  $(
5254
5255
  e,
5255
- Te(r, t, n),
5256
+ Re(r, t, n),
5256
5257
  ge(([o, s]) => !!s),
5257
5258
  re(([o, s, i, a]) => {
5258
5259
  const { enter: l, exit: u } = s;
@@ -5267,7 +5268,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5267
5268
  ),
5268
5269
  t
5269
5270
  ), Fe(
5270
- $(nt(t, e, n), Te(r)),
5271
+ $(nt(t, e, n), Re(r)),
5271
5272
  ([[o, s, i], a]) => {
5272
5273
  o && a && a.change && a.change(s, i);
5273
5274
  }
@@ -5290,7 +5291,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5290
5291
  ), de(
5291
5292
  $(
5292
5293
  t,
5293
- Te(r),
5294
+ Re(r),
5294
5295
  re(([a, { offsetTop: l }]) => ({
5295
5296
  ...a,
5296
5297
  top: a.top + l
@@ -5307,7 +5308,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5307
5308
  windowScrollTo: o,
5308
5309
  windowViewportRect: r
5309
5310
  };
5310
- }, Ve(mt)), Jv = Me(
5311
+ }, Ve(gt)), Jv = Me(
5311
5312
  ([
5312
5313
  { sizeRanges: e, sizes: t },
5313
5314
  { headerHeight: n, scrollTop: r },
@@ -5319,7 +5320,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5319
5320
  return de(a, h), de(l, m), Fe(
5320
5321
  $(
5321
5322
  u,
5322
- Te(t, r, i, h, m, n)
5323
+ Re(t, r, i, h, m, n)
5323
5324
  ),
5324
5325
  ([w, x, v, p, g, b, y]) => {
5325
5326
  const R = Ov(x.sizeTree);
@@ -5328,7 +5329,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5328
5329
  ), de($(d, ge(qi), re(Zv)), o), de(
5329
5330
  $(
5330
5331
  s,
5331
- Te(d),
5332
+ Re(d),
5332
5333
  ge(([, w]) => w !== void 0),
5333
5334
  We(),
5334
5335
  re(([, w]) => w.ranges)
@@ -5339,7 +5340,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5339
5340
  restoreStateFrom: d
5340
5341
  };
5341
5342
  },
5342
- Ve(rn, mt, Xr, Cn, ra)
5343
+ Ve(rn, gt, Xr, Cn, ra)
5343
5344
  );
5344
5345
  function Zv(e) {
5345
5346
  return { align: "start", index: 0, offset: e.scrollTop };
@@ -5371,7 +5372,7 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5371
5372
  const v = Nt(
5372
5373
  $(
5373
5374
  l,
5374
- Te(i),
5375
+ Re(i),
5375
5376
  Qt(
5376
5377
  ([, g, b, y], [{ bottom: R, items: S, offsetBottom: C, totalCount: E }, N]) => {
5377
5378
  const I = R + C;
@@ -5381,19 +5382,19 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5381
5382
  [0, [], 0, 0]
5382
5383
  ),
5383
5384
  ge(([g]) => g !== 0),
5384
- Te(r, a, n, o, w, x),
5385
+ Re(r, a, n, o, w, x),
5385
5386
  ge(([, g, b, y, , , R]) => !R && !y && g !== 0 && b === Lr),
5386
5387
  re(([[g], , , , , b]) => (b("Upward scrolling compensation", { amount: g }, St.DEBUG), g))
5387
5388
  )
5388
5389
  );
5389
5390
  function p(g) {
5390
- g > 0 ? (ye(t, { behavior: "auto", top: -g }), ye(e, 0)) : (ye(e, 0), ye(t, { behavior: "auto", top: -g }));
5391
+ g > 0 ? (Se(t, { behavior: "auto", top: -g }), Se(e, 0)) : (Se(e, 0), Se(t, { behavior: "auto", top: -g }));
5391
5392
  }
5392
- return Fe($(v, Te(e, s)), ([g, b, y]) => {
5393
- y && ex() ? ye(e, b - g) : p(-g);
5393
+ return Fe($(v, Re(e, s)), ([g, b, y]) => {
5394
+ y && ex() ? Se(e, b - g) : p(-g);
5394
5395
  }), Fe(
5395
5396
  $(
5396
- nt(ft(s, !1), e, x),
5397
+ nt(ht(s, !1), e, x),
5397
5398
  ge(([g, b, y]) => !g && !y && b !== 0),
5398
5399
  re(([g, b]) => b),
5399
5400
  un(1)
@@ -5408,7 +5409,7 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5408
5409
  ), Fe(
5409
5410
  $(
5410
5411
  u,
5411
- Te(m, d),
5412
+ Re(m, d),
5412
5413
  re(([g, { groupIndices: b, lastSize: y, sizeTree: R }, S]) => {
5413
5414
  function C(E) {
5414
5415
  return E * (y + S);
@@ -5429,15 +5430,15 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5429
5430
  })
5430
5431
  ),
5431
5432
  (g) => {
5432
- ye(e, g), requestAnimationFrame(() => {
5433
- ye(t, { top: g }), requestAnimationFrame(() => {
5434
- ye(e, 0), ye(x, !1);
5433
+ Se(e, g), requestAnimationFrame(() => {
5434
+ Se(t, { top: g }), requestAnimationFrame(() => {
5435
+ Se(e, 0), Se(x, !1);
5435
5436
  });
5436
5437
  });
5437
5438
  }
5438
5439
  ), { deviation: e };
5439
5440
  },
5440
- Ve(mt, Jr, zn, rn, Sn, Zi)
5441
+ Ve(gt, Jr, zn, rn, Sn, Zi)
5441
5442
  ), nx = Me(
5442
5443
  ([
5443
5444
  e,
@@ -5543,7 +5544,7 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5543
5544
  Ve(
5544
5545
  rn,
5545
5546
  Xr,
5546
- mt,
5547
+ gt,
5547
5548
  Jv,
5548
5549
  Yv,
5549
5550
  zn,
@@ -5568,22 +5569,22 @@ const io = typeof document < "u" ? q.useLayoutEffect : q.useEffect;
5568
5569
  function Su(e, t, n) {
5569
5570
  const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), s = Object.keys(t.methods || {}), i = Object.keys(t.events || {}), a = q.createContext({});
5570
5571
  function l(p, g) {
5571
- p.propsReady && ye(p.propsReady, !1);
5572
+ p.propsReady && Se(p.propsReady, !1);
5572
5573
  for (const b of r) {
5573
5574
  const y = p[t.required[b]];
5574
- ye(y, g[b]);
5575
+ Se(y, g[b]);
5575
5576
  }
5576
5577
  for (const b of o)
5577
5578
  if (b in g) {
5578
5579
  const y = p[t.optional[b]];
5579
- ye(y, g[b]);
5580
+ Se(y, g[b]);
5580
5581
  }
5581
- p.propsReady && ye(p.propsReady, !0);
5582
+ p.propsReady && Se(p.propsReady, !0);
5582
5583
  }
5583
5584
  function u(p) {
5584
5585
  return s.reduce((g, b) => (g[b] = (y) => {
5585
5586
  const R = p[t.methods[b]];
5586
- ye(R, y);
5587
+ Se(R, y);
5587
5588
  }, g), {});
5588
5589
  }
5589
5590
  function d(p) {
@@ -5608,7 +5609,7 @@ function Su(e, t, n) {
5608
5609
  const g = q.useContext(a);
5609
5610
  return q.useCallback(
5610
5611
  (b) => {
5611
- ye(g[p], b);
5612
+ Se(g[p], b);
5612
5613
  },
5613
5614
  [g, p]
5614
5615
  );
@@ -5709,7 +5710,7 @@ function sa(e) {
5709
5710
  return e;
5710
5711
  }
5711
5712
  const sx = /* @__PURE__ */ Me(() => {
5712
- const e = X((a) => `Item ${a}`), t = X((a) => `Group ${a}`), n = X({}), r = X(sa), o = X("div"), s = X(pr), i = (a, l = null) => ft(
5713
+ const e = X((a) => `Item ${a}`), t = X((a) => `Group ${a}`), n = X({}), r = X(sa), o = X("div"), s = X(pr), i = (a, l = null) => ht(
5713
5714
  $(
5714
5715
  n,
5715
5716
  re((u) => u[a]),
@@ -5768,10 +5769,10 @@ const sx = /* @__PURE__ */ Me(() => {
5768
5769
  },
5769
5770
  ...B ? {} : { visibility: "hidden" }
5770
5771
  };
5771
- return !e && t.totalCount === 0 && y ? /* @__PURE__ */ c.jsx(y, { ...dt(y, u) }) : /* @__PURE__ */ c.jsx(
5772
+ return !e && t.totalCount === 0 && y ? /* @__PURE__ */ c.jsx(y, { ...ft(y, u) }) : /* @__PURE__ */ c.jsx(
5772
5773
  S,
5773
5774
  {
5774
- ...dt(S, u),
5775
+ ...ft(S, u),
5775
5776
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
5776
5777
  ref: p,
5777
5778
  style: G,
@@ -5780,7 +5781,7 @@ const sx = /* @__PURE__ */ Me(() => {
5780
5781
  return I ? /* @__PURE__ */ go(
5781
5782
  R,
5782
5783
  {
5783
- ...dt(R, u),
5784
+ ...ft(R, u),
5784
5785
  height: _.size,
5785
5786
  index: _.index,
5786
5787
  key: U,
@@ -5790,7 +5791,7 @@ const sx = /* @__PURE__ */ Me(() => {
5790
5791
  ) : _.type === "group" ? /* @__PURE__ */ go(
5791
5792
  E,
5792
5793
  {
5793
- ...dt(E, u),
5794
+ ...ft(E, u),
5794
5795
  "data-index": Y,
5795
5796
  "data-item-index": _.index,
5796
5797
  "data-known-size": _.size,
@@ -5801,7 +5802,7 @@ const sx = /* @__PURE__ */ Me(() => {
5801
5802
  ) : /* @__PURE__ */ go(
5802
5803
  C,
5803
5804
  {
5804
- ...dt(C, u),
5805
+ ...ft(C, u),
5805
5806
  ...hx(C, _.data),
5806
5807
  "data-index": Y,
5807
5808
  "data-item-group-index": _.groupIndex,
@@ -5837,7 +5838,7 @@ const sx = /* @__PURE__ */ Me(() => {
5837
5838
  width: "100%",
5838
5839
  zIndex: 1
5839
5840
  };
5840
- function dt(e, t) {
5841
+ function ft(e, t) {
5841
5842
  if (typeof e != "string")
5842
5843
  return { context: t };
5843
5844
  }
@@ -5855,7 +5856,7 @@ const px = /* @__PURE__ */ q.memo(function() {
5855
5856
  !0,
5856
5857
  be("skipAnimationFrameInResizeObserver")
5857
5858
  ), o = be("context");
5858
- return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...dt(e, o) }) }) : null;
5859
+ return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...ft(e, o) }) }) : null;
5859
5860
  }), mx = /* @__PURE__ */ q.memo(function() {
5860
5861
  const e = be("FooterComponent"), t = _t("footerHeight"), n = be("HeaderFooterTag"), r = Hn(
5861
5862
  q.useMemo(
@@ -5867,7 +5868,7 @@ const px = /* @__PURE__ */ q.memo(function() {
5867
5868
  !0,
5868
5869
  be("skipAnimationFrameInResizeObserver")
5869
5870
  ), o = be("context");
5870
- return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...dt(e, o) }) }) : null;
5871
+ return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...ft(e, o) }) }) : null;
5871
5872
  });
5872
5873
  function Iu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5873
5874
  return q.memo(function({ children: r, style: o, context: s, ...i }) {
@@ -5888,7 +5889,7 @@ function Iu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5888
5889
  style: { ...h ? dx : ux, ...o },
5889
5890
  tabIndex: 0,
5890
5891
  ...i,
5891
- ...dt(l, s),
5892
+ ...ft(l, s),
5892
5893
  children: r
5893
5894
  }
5894
5895
  );
@@ -5915,7 +5916,7 @@ function ju({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5915
5916
  "data-virtuoso-scroller": !0,
5916
5917
  style: { position: "relative", ...o, ...d !== 0 ? { height: d + h } : {} },
5917
5918
  ...i,
5918
- ...dt(l, s),
5919
+ ...ft(l, s),
5919
5920
  children: r
5920
5921
  }
5921
5922
  );
@@ -5940,7 +5941,7 @@ const gx = ({ children: e }) => {
5940
5941
  }, [t, n, r]), /* @__PURE__ */ c.jsx("div", { "data-viewport-type": "window", ref: s, style: cs(i), children: e });
5941
5942
  }, xx = ({ children: e }) => {
5942
5943
  const t = be("TopItemListComponent") || "div", n = be("headerHeight"), r = { ...fx, marginTop: `${n}px` }, o = be("context");
5943
- return /* @__PURE__ */ c.jsx(t, { style: r, ...dt(t, o), children: e });
5944
+ return /* @__PURE__ */ c.jsx(t, { style: r, ...ft(t, o), children: e });
5944
5945
  }, bx = /* @__PURE__ */ q.memo(function(e) {
5945
5946
  const t = be("useWindowScroll"), n = be("topItemsIndexes").length > 0, r = be("customScrollParent"), o = be("context");
5946
5947
  return /* @__PURE__ */ c.jsxs(r || t ? Sx : yx, { ...e, context: o, children: [
@@ -6022,7 +6023,7 @@ const gx = ({ children: e }) => {
6022
6023
  ] })), t = X(null), n = X((u) => /* @__PURE__ */ c.jsxs("td", { colSpan: 1e3, children: [
6023
6024
  "Group ",
6024
6025
  u
6025
- ] })), r = X(null), o = X(null), s = X({}), i = X(sa), a = X(pr), l = (u, d = null) => ft(
6026
+ ] })), r = X(null), o = X(null), s = X({}), i = X(sa), a = X(pr), l = (u, d = null) => ht(
6026
6027
  $(
6027
6028
  s,
6028
6029
  re((h) => h[u]),
@@ -6099,11 +6100,11 @@ const Ix = /* @__PURE__ */ Me(
6099
6100
  Fe(
6100
6101
  $(
6101
6102
  x,
6102
- Te(D),
6103
+ Re(D),
6103
6104
  ge(([A, H]) => !!H)
6104
6105
  ),
6105
6106
  () => {
6106
- ye(K, !1);
6107
+ Se(K, !1);
6107
6108
  }
6108
6109
  ), Fe(
6109
6110
  $(
@@ -6111,10 +6112,10 @@ const Ix = /* @__PURE__ */ Me(
6111
6112
  ge(([A, H, J, ce, , se]) => A && !H && J.height !== 0 && ce.height !== 0 && !se)
6112
6113
  ),
6113
6114
  ([, , , , A]) => {
6114
- ye(W, !0), ea(1, () => {
6115
- ye(P, A);
6115
+ Se(W, !0), ea(1, () => {
6116
+ Se(P, A);
6116
6117
  }), $t($(u), () => {
6117
- ye(t, [0, 0]), ye(K, !0);
6118
+ Se(t, [0, 0]), Se(K, !0);
6118
6119
  });
6119
6120
  }
6120
6121
  ), de(
@@ -6127,13 +6128,13 @@ const Ix = /* @__PURE__ */ Me(
6127
6128
  ), Fe(
6128
6129
  $(
6129
6130
  x,
6130
- Te(oe),
6131
+ Re(oe),
6131
6132
  ge(([, A]) => A != null)
6132
6133
  ),
6133
6134
  ([, A]) => {
6134
- A && (ye(I, A.viewport), ye(j, A.item), ye(Y, A.gap), A.scrollTop > 0 && (ye(O, !0), $t($(u, Dn(1)), (H) => {
6135
- ye(O, !1);
6136
- }), ye(l, { top: A.scrollTop })));
6135
+ A && (Se(I, A.viewport), Se(j, A.item), Se(Y, A.gap), A.scrollTop > 0 && (Se(O, !0), $t($(u, Dn(1)), (H) => {
6136
+ Se(O, !1);
6137
+ }), Se(l, { top: A.scrollTop })));
6137
6138
  }
6138
6139
  ), de(
6139
6140
  $(
@@ -6185,18 +6186,18 @@ const Ix = /* @__PURE__ */ Me(
6185
6186
  ie,
6186
6187
  Ne
6187
6188
  ]) => {
6188
- const { column: Se, row: fe } = ce, { height: Ce, width: Be } = se, { width: ot } = Ae;
6189
- if (je === 0 && (A === 0 || ot === 0))
6189
+ const { column: Ce, row: fe } = ce, { height: Te, width: Be } = se, { width: st } = Ae;
6190
+ if (je === 0 && (A === 0 || st === 0))
6190
6191
  return _c;
6191
6192
  if (Be === 0) {
6192
- const Re = ta(Ne, A), xt = Re + Math.max(je - 1, 0);
6193
- return Ex(Dc(Re, xt, _e));
6193
+ const we = ta(Ne, A), qe = we + Math.max(je - 1, 0);
6194
+ return Ex(Dc(we, qe, _e));
6194
6195
  }
6195
- const et = ku(ot, Be, Se);
6196
- let vt, it;
6197
- ie ? H === 0 && J === 0 && je > 0 ? (vt = 0, it = je - 1) : (vt = et * $o((H + fe) / (Ce + fe)), it = et * Oc((J + fe) / (Ce + fe)) - 1, it = Vs(A - 1, Ir(it, et - 1)), vt = Vs(it, Ir(0, vt))) : (vt = 0, it = -1);
6198
- const an = Dc(vt, it, _e), { bottom: V, top: ae } = Lc(Ae, ce, se, an), $e = Oc(A / et), qe = $e * Ce + ($e - 1) * fe - V;
6199
- return { bottom: V, itemHeight: Ce, items: an, itemWidth: Be, offsetBottom: qe, offsetTop: ae, top: ae };
6196
+ const et = ku(st, Be, Ce);
6197
+ let xt, at;
6198
+ ie ? H === 0 && J === 0 && je > 0 ? (xt = 0, at = je - 1) : (xt = et * $o((H + fe) / (Te + fe)), at = et * Oc((J + fe) / (Te + fe)) - 1, at = Vs(A - 1, Ir(at, et - 1)), xt = Vs(at, Ir(0, xt))) : (xt = 0, at = -1);
6199
+ const an = Dc(xt, at, _e), { bottom: V, top: ae } = Lc(Ae, ce, se, an), $e = Oc(A / et), rt = $e * Te + ($e - 1) * fe - V;
6200
+ return { bottom: V, itemHeight: Te, items: an, itemWidth: Be, offsetBottom: rt, offsetTop: ae, top: ae };
6200
6201
  }
6201
6202
  )
6202
6203
  ),
@@ -6224,7 +6225,7 @@ const Ix = /* @__PURE__ */ Me(
6224
6225
  de(
6225
6226
  $(
6226
6227
  u,
6227
- Te(L),
6228
+ Re(L),
6228
6229
  re(([A, H]) => H || A !== 0)
6229
6230
  ),
6230
6231
  L
@@ -6233,7 +6234,7 @@ const Ix = /* @__PURE__ */ Me(
6233
6234
  $(
6234
6235
  nt(N, C),
6235
6236
  ge(([{ items: A }]) => A.length > 0),
6236
- Te(L),
6237
+ Re(L),
6237
6238
  ge(([[A, H], J]) => {
6238
6239
  const ce = A.items[A.items.length - 1].index === H - 1;
6239
6240
  return (J || A.bottom > 0 && A.itemHeight > 0 && A.offsetBottom === 0 && A.items.length === H) && ce;
@@ -6251,7 +6252,7 @@ const Ix = /* @__PURE__ */ Me(
6251
6252
  ), he = Nt(
6252
6253
  $(
6253
6254
  me(N),
6254
- Te(O),
6255
+ Re(O),
6255
6256
  ge(([{ items: A }, H]) => A.length > 0 && !H),
6256
6257
  re(([{ items: A }]) => ({
6257
6258
  endIndex: A[A.length - 1].index,
@@ -6264,18 +6265,18 @@ const Ix = /* @__PURE__ */ Me(
6264
6265
  de(he, w.scrollSeekRangeChanged), de(
6265
6266
  $(
6266
6267
  P,
6267
- Te(I, j, C, Y),
6268
+ Re(I, j, C, Y),
6268
6269
  re(([A, H, J, ce, se]) => {
6269
6270
  const Ae = hu(A), { align: _e, behavior: je, offset: ie } = Ae;
6270
6271
  let Ne = Ae.index;
6271
6272
  Ne === "LAST" && (Ne = ce - 1), Ne = Ir(0, Ne, Vs(ce - 1, Ne));
6272
- let Se = Ci(H, se, J, Ne);
6273
- return _e === "end" ? Se = Mc(Se - H.height + J.height) : _e === "center" && (Se = Mc(Se - H.height / 2 + J.height / 2)), ie && (Se += ie), { behavior: je, top: Se };
6273
+ let Ce = Ci(H, se, J, Ne);
6274
+ return _e === "end" ? Ce = Mc(Ce - H.height + J.height) : _e === "center" && (Ce = Mc(Ce - H.height / 2 + J.height / 2)), ie && (Ce += ie), { behavior: je, top: Ce };
6274
6275
  })
6275
6276
  ),
6276
6277
  l
6277
6278
  );
6278
- const F = ft(
6279
+ const F = ht(
6279
6280
  $(
6280
6281
  N,
6281
6282
  re((A) => A.offsetBottom + A.bottom)
@@ -6330,7 +6331,7 @@ const Ix = /* @__PURE__ */ Me(
6330
6331
  ...S
6331
6332
  };
6332
6333
  },
6333
- Ve(na, mt, Jr, bu, Cn, ra, Sn)
6334
+ Ve(na, gt, Jr, bu, Cn, ra, Sn)
6334
6335
  );
6335
6336
  function ku(e, t, n) {
6336
6337
  return Ir(1, $o((e + n) / ($o(t) + n)));
@@ -6347,7 +6348,7 @@ function Ci(e, t, n, r) {
6347
6348
  return i > 0 ? i + t.row : i;
6348
6349
  }
6349
6350
  const jx = /* @__PURE__ */ Me(() => {
6350
- const e = X((h) => `Item ${h}`), t = X({}), n = X(null), r = X("virtuoso-grid-item"), o = X("virtuoso-grid-list"), s = X(sa), i = X("div"), a = X(pr), l = (h, m = null) => ft(
6351
+ const e = X((h) => `Item ${h}`), t = X({}), n = X(null), r = X("virtuoso-grid-item"), o = X("virtuoso-grid-list"), s = X(sa), i = X("div"), a = X(pr), l = (h, m = null) => ht(
6351
6352
  $(
6352
6353
  t,
6353
6354
  re((w) => w[h]),
@@ -6404,7 +6405,7 @@ const jx = /* @__PURE__ */ Me(() => {
6404
6405
  {
6405
6406
  className: t,
6406
6407
  ref: p,
6407
- ...dt(l, d),
6408
+ ...ft(l, d),
6408
6409
  "data-testid": "virtuoso-item-list",
6409
6410
  style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
6410
6411
  children: e.items.map((g) => {
@@ -6412,7 +6413,7 @@ const jx = /* @__PURE__ */ Me(() => {
6412
6413
  return s ? /* @__PURE__ */ c.jsx(
6413
6414
  u,
6414
6415
  {
6415
- ...dt(u, d),
6416
+ ...ft(u, d),
6416
6417
  height: e.itemHeight,
6417
6418
  index: g.index,
6418
6419
  width: e.itemWidth
@@ -6421,7 +6422,7 @@ const jx = /* @__PURE__ */ Me(() => {
6421
6422
  ) : /* @__PURE__ */ go(
6422
6423
  a,
6423
6424
  {
6424
- ...dt(a, d),
6425
+ ...ft(a, d),
6425
6426
  className: n,
6426
6427
  "data-index": g.index,
6427
6428
  key: b
@@ -6442,7 +6443,7 @@ const jx = /* @__PURE__ */ Me(() => {
6442
6443
  !0,
6443
6444
  !1
6444
6445
  ), o = Ge("context");
6445
- return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...dt(e, o) }) }) : null;
6446
+ return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...ft(e, o) }) }) : null;
6446
6447
  }), _x = q.memo(function() {
6447
6448
  const e = Ge("FooterComponent"), t = Ot("footerHeight"), n = Ge("headerFooterTag"), r = Hn(
6448
6449
  q.useMemo(
@@ -6454,7 +6455,7 @@ const jx = /* @__PURE__ */ Me(() => {
6454
6455
  !0,
6455
6456
  !1
6456
6457
  ), o = Ge("context");
6457
- return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...dt(e, o) }) }) : null;
6458
+ return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...ft(e, o) }) }) : null;
6458
6459
  }), Ox = ({ children: e }) => {
6459
6460
  const t = q.useContext(Tu), n = Ot("itemDimensions"), r = Ot("viewportDimensions"), o = Hn(
6460
6461
  q.useMemo(
@@ -6476,7 +6477,7 @@ const jx = /* @__PURE__ */ Me(() => {
6476
6477
  }, [t, n, r]), /* @__PURE__ */ c.jsx("div", { ref: s, style: cs(!1), children: e });
6477
6478
  }, Dx = /* @__PURE__ */ q.memo(function({ ...e }) {
6478
6479
  const t = Ge("useWindowScroll"), n = Ge("customScrollParent"), r = n || t ? Fx : Lx, o = n || t ? Mx : Ox, s = Ge("context");
6479
- return /* @__PURE__ */ c.jsx(r, { ...e, ...dt(r, s), children: /* @__PURE__ */ c.jsxs(o, { children: [
6480
+ return /* @__PURE__ */ c.jsx(r, { ...e, ...ft(r, s), children: /* @__PURE__ */ c.jsxs(o, { children: [
6480
6481
  /* @__PURE__ */ c.jsx(Px, {}),
6481
6482
  /* @__PURE__ */ c.jsx(Ax, {}),
6482
6483
  /* @__PURE__ */ c.jsx(_x, {})
@@ -6619,8 +6620,8 @@ function Hx(...e) {
6619
6620
  };
6620
6621
  return n.scopeName = t.scopeName, n;
6621
6622
  }
6622
- var st = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
6623
- }, zx = f[" useInsertionEffect ".trim().toString()] || st;
6623
+ var it = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
6624
+ }, zx = f[" useInsertionEffect ".trim().toString()] || it;
6624
6625
  function xn({
6625
6626
  prop: e,
6626
6627
  defaultProp: t,
@@ -6746,13 +6747,13 @@ function Kx(e) {
6746
6747
  return f.useEffect(() => {
6747
6748
  const u = co(r.current);
6748
6749
  s.current = a === "mounted" ? u : "none";
6749
- }, [a]), st(() => {
6750
+ }, [a]), it(() => {
6750
6751
  const u = r.current, d = o.current;
6751
6752
  if (d !== e) {
6752
6753
  const m = s.current, w = co(u);
6753
6754
  e ? l("MOUNT") : w === "none" || (u == null ? void 0 : u.display) === "none" ? l("UNMOUNT") : l(d && m !== w ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
6754
6755
  }
6755
- }, [e, l]), st(() => {
6756
+ }, [e, l]), it(() => {
6756
6757
  if (t) {
6757
6758
  let u;
6758
6759
  const d = t.ownerDocument.defaultView ?? window, h = (w) => {
@@ -6790,7 +6791,7 @@ var qx = f[" useId ".trim().toString()] || (() => {
6790
6791
  }), Xx = 0;
6791
6792
  function Ht(e) {
6792
6793
  const [t, n] = f.useState(qx());
6793
- return st(() => {
6794
+ return it(() => {
6794
6795
  n((r) => r ?? String(Xx++));
6795
6796
  }, [e]), e || (t ? `radix-${t}` : "");
6796
6797
  }
@@ -6863,7 +6864,7 @@ var eb = f.forwardRef((e, t) => {
6863
6864
  return f.useEffect(() => {
6864
6865
  const b = requestAnimationFrame(() => p.current = !1);
6865
6866
  return () => cancelAnimationFrame(b);
6866
- }, []), st(() => {
6867
+ }, []), it(() => {
6867
6868
  const b = u.current;
6868
6869
  if (b) {
6869
6870
  g.current = g.current || {
@@ -7304,7 +7305,7 @@ function ha() {
7304
7305
  dismiss: (n) => Ar({ type: "DISMISS_TOAST", toastId: n })
7305
7306
  };
7306
7307
  }
7307
- function ct(e) {
7308
+ function lt(e) {
7308
7309
  const t = f.useRef(e);
7309
7310
  return f.useEffect(() => {
7310
7311
  t.current = e;
@@ -7314,7 +7315,7 @@ function ct(e) {
7314
7315
  }, []);
7315
7316
  }
7316
7317
  function vb(e, t = globalThis == null ? void 0 : globalThis.document) {
7317
- const n = ct(e);
7318
+ const n = lt(e);
7318
7319
  f.useEffect(() => {
7319
7320
  const r = (o) => {
7320
7321
  o.key === "Escape" && n(o);
@@ -7387,7 +7388,7 @@ var yb = "DismissableLayerBranch", Sb = f.forwardRef((e, t) => {
7387
7388
  });
7388
7389
  Sb.displayName = yb;
7389
7390
  function Cb(e, t = globalThis == null ? void 0 : globalThis.document) {
7390
- const n = ct(e), r = f.useRef(!1), o = f.useRef(() => {
7391
+ const n = lt(e), r = f.useRef(!1), o = f.useRef(() => {
7391
7392
  });
7392
7393
  return f.useEffect(() => {
7393
7394
  const s = (a) => {
@@ -7417,7 +7418,7 @@ function Cb(e, t = globalThis == null ? void 0 : globalThis.document) {
7417
7418
  };
7418
7419
  }
7419
7420
  function Tb(e, t = globalThis == null ? void 0 : globalThis.document) {
7420
- const n = ct(e), r = f.useRef(!1);
7421
+ const n = lt(e), r = f.useRef(!1);
7421
7422
  return f.useEffect(() => {
7422
7423
  const o = (s) => {
7423
7424
  s.target && !r.current && Hu(wb, n, { originalEvent: s }, {
@@ -7445,7 +7446,7 @@ var Xs = "focusScope.autoFocusOnMount", Js = "focusScope.autoFocusOnUnmount", Yc
7445
7446
  onMountAutoFocus: o,
7446
7447
  onUnmountAutoFocus: s,
7447
7448
  ...i
7448
- } = e, [a, l] = f.useState(null), u = ct(o), d = ct(s), h = f.useRef(null), m = Ee(t, (v) => l(v)), w = f.useRef({
7449
+ } = e, [a, l] = f.useState(null), u = lt(o), d = lt(s), h = f.useRef(null), m = Ee(t, (v) => l(v)), w = f.useRef({
7449
7450
  paused: !1,
7450
7451
  pause() {
7451
7452
  this.paused = !0;
@@ -7570,7 +7571,7 @@ function Ab(e) {
7570
7571
  var Pb = "Portal", ds = f.forwardRef((e, t) => {
7571
7572
  var a;
7572
7573
  const { container: n, ...r } = e, [o, s] = f.useState(!1);
7573
- st(() => s(!0), []);
7574
+ it(() => s(!0), []);
7574
7575
  const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
7575
7576
  return i ? El.createPortal(/* @__PURE__ */ c.jsx(ve.div, { ...r, ref: t }), i) : null;
7576
7577
  });
@@ -8675,12 +8676,12 @@ const _w = q.memo(function({
8675
8676
  /* @__PURE__ */ c.jsx("span", { className: "text-sm text-muted-foreground", children: "File upload" })
8676
8677
  ] });
8677
8678
  if (t.model === "reflection") {
8678
- const fe = ee.trim(), Ce = ri(fe);
8679
- if (Ce && typeof Ce == "object")
8680
- return /* @__PURE__ */ c.jsx(zw, { data: Ce });
8679
+ const fe = ee.trim(), Te = ri(fe);
8680
+ if (Te && typeof Te == "object")
8681
+ return /* @__PURE__ */ c.jsx(zw, { data: Te });
8681
8682
  }
8682
8683
  if (K && L.name === "get_issues") {
8683
- const fe = t.content.find((ot) => ot.type === "tool_result"), Ce = (fe == null ? void 0 : fe.output) ?? Zn(t.content), Be = yd(Ce);
8684
+ const fe = t.content.find((st) => st.type === "tool_result"), Te = (fe == null ? void 0 : fe.output) ?? Zn(t.content), Be = yd(Te);
8684
8685
  if (Be) return /* @__PURE__ */ c.jsx(Uw, { issues: Be });
8685
8686
  }
8686
8687
  if (K && !E) {
@@ -8691,10 +8692,10 @@ const _w = q.memo(function({
8691
8692
  ] }) });
8692
8693
  }
8693
8694
  if (K && d) {
8694
- const fe = Zn(t.content), Ce = fe.length > h;
8695
+ const fe = Zn(t.content), Te = fe.length > h;
8695
8696
  return /* @__PURE__ */ c.jsx($c, { open: S, onOpenChange: C, children: /* @__PURE__ */ c.jsxs("div", { className: "font-mono text-sm text-current", children: [
8696
- /* @__PURE__ */ c.jsx("pre", { className: M("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: Ce && !S ? fe.substring(0, h) + "..." : fe }),
8697
- Ce && /* @__PURE__ */ c.jsx(Hc, { asChild: !0, children: /* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: S ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
8697
+ /* @__PURE__ */ c.jsx("pre", { className: M("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: Te && !S ? fe.substring(0, h) + "..." : fe }),
8698
+ Te && /* @__PURE__ */ c.jsx(Hc, { asChild: !0, children: /* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: S ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
8698
8699
  /* @__PURE__ */ c.jsx(Cr, { className: "h-3 w-3 mr-1" }),
8699
8700
  "Show less"
8700
8701
  ] }) : /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
@@ -8709,10 +8710,10 @@ const _w = q.memo(function({
8709
8710
  const fe = Ww(t.content);
8710
8711
  if (fe && Mw(fe))
8711
8712
  return /* @__PURE__ */ c.jsx(Ks, { content: fe.trim(), hideFallbackDuringStreaming: !0 });
8712
- const Ce = Zn(t.content);
8713
- return /* @__PURE__ */ c.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ c.jsx("pre", { className: M("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: Ce }) });
8713
+ const Te = Zn(t.content);
8714
+ return /* @__PURE__ */ c.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ c.jsx("pre", { className: M("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: Te }) });
8714
8715
  }
8715
- const Ne = Z.length > 0 && D !== "tool", Se = pe.length > 0 && D !== "tool" && !1;
8716
+ const Ne = Z.length > 0 && D !== "tool", Ce = pe.length > 0 && D !== "tool" && !1;
8716
8717
  return /* @__PURE__ */ c.jsxs("div", { children: [
8717
8718
  r ? (
8718
8719
  // Streaming container: reserve space and show a skeleton until we have text,
@@ -8732,7 +8733,7 @@ const _w = q.memo(function({
8732
8733
  const fe = ri(he);
8733
8734
  if (fe !== null)
8734
8735
  return /* @__PURE__ */ c.jsx(ol, { data: fe });
8735
- const Ce = Lw(Dw(he)), Be = he.trim().length === 0;
8736
+ const Te = Lw(Dw(he)), Be = he.trim().length === 0;
8736
8737
  return /* @__PURE__ */ c.jsx(c.Fragment, { children: Be ? /* @__PURE__ */ c.jsx("div", { className: "w-full", children: /* @__PURE__ */ c.jsxs("div", { className: "animate-pulse space-y-2", children: [
8737
8738
  /* @__PURE__ */ c.jsx("div", { className: "h-3 bg-slate-200 dark:bg-slate-700 rounded w-3/4" }),
8738
8739
  /* @__PURE__ */ c.jsx("div", { className: "h-3 bg-slate-200 dark:bg-slate-700 rounded w-5/6" }),
@@ -8744,7 +8745,7 @@ const _w = q.memo(function({
8744
8745
  "whitespace-pre-wrap break-words font-sans leading-relaxed transition-opacity duration-200",
8745
8746
  O && "text-xs"
8746
8747
  ),
8747
- children: Ce
8748
+ children: Te
8748
8749
  }
8749
8750
  ) });
8750
8751
  })(),
@@ -8756,11 +8757,11 @@ const _w = q.memo(function({
8756
8757
  const fe = ri(ee.trim());
8757
8758
  if (fe !== null) return /* @__PURE__ */ c.jsx(ol, { data: fe });
8758
8759
  if (D === "user" && m) {
8759
- const Ce = ee.trim();
8760
- if (Ce.length > w)
8760
+ const Te = ee.trim();
8761
+ if (Te.length > w)
8761
8762
  return /* @__PURE__ */ c.jsxs($c, { open: I, onOpenChange: j, children: [
8762
- /* @__PURE__ */ c.jsx("div", { className: M("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: I ? /* @__PURE__ */ c.jsx(Ks, { content: Ce, hideFallbackDuringStreaming: !0 }) : /* @__PURE__ */ c.jsxs("pre", { className: M("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
8763
- Ce.substring(0, w),
8763
+ /* @__PURE__ */ c.jsx("div", { className: M("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: I ? /* @__PURE__ */ c.jsx(Ks, { content: Te, hideFallbackDuringStreaming: !0 }) : /* @__PURE__ */ c.jsxs("pre", { className: M("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
8764
+ Te.substring(0, w),
8764
8765
  "..."
8765
8766
  ] }) }),
8766
8767
  /* @__PURE__ */ c.jsx(Hc, { asChild: !0, children: /* @__PURE__ */ c.jsx(
@@ -8775,7 +8776,7 @@ const _w = q.memo(function({
8775
8776
  ] }) : /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
8776
8777
  /* @__PURE__ */ c.jsx(Qn, { className: "h-3 w-3 mr-1" }),
8777
8778
  " Show more (",
8778
- Ce.length - w,
8779
+ Te.length - w,
8779
8780
  " chars)"
8780
8781
  ] })
8781
8782
  }
@@ -8793,14 +8794,14 @@ const _w = q.memo(function({
8793
8794
  }
8794
8795
  );
8795
8796
  })(),
8796
- Ne && /* @__PURE__ */ c.jsx("div", { className: "mt-2 grid grid-cols-2 gap-2", children: Z.map((fe, Ce) => {
8797
- const Be = fe, ot = typeof Be.width == "number" ? Be.width : void 0, et = typeof Be.height == "number" ? Be.height : void 0, vt = ot && et && et > 0 ? `${ot} / ${et}` : "4 / 3", it = ot && et && et > 0 ? Math.max(120, Math.round(et / ot * 140)) : 160;
8797
+ Ne && /* @__PURE__ */ c.jsx("div", { className: "mt-2 grid grid-cols-2 gap-2", children: Z.map((fe, Te) => {
8798
+ const Be = fe, st = typeof Be.width == "number" ? Be.width : void 0, et = typeof Be.height == "number" ? Be.height : void 0, xt = st && et && et > 0 ? `${st} / ${et}` : "4 / 3", at = st && et && et > 0 ? Math.max(120, Math.round(et / st * 140)) : 160;
8798
8799
  return /* @__PURE__ */ c.jsxs(
8799
8800
  "div",
8800
8801
  {
8801
8802
  className: "relative border rounded overflow-hidden bg-gray-100 dark:bg-gray-900/40",
8802
- style: { aspectRatio: vt, minHeight: it },
8803
- "data-placeholder-height": it,
8803
+ style: { aspectRatio: xt, minHeight: at },
8804
+ "data-placeholder-height": at,
8804
8805
  children: [
8805
8806
  /* @__PURE__ */ c.jsx(
8806
8807
  "img",
@@ -8817,10 +8818,10 @@ const _w = q.memo(function({
8817
8818
  ] })
8818
8819
  ]
8819
8820
  },
8820
- Ce
8821
+ Te
8821
8822
  );
8822
8823
  }) }),
8823
- Se
8824
+ Ce
8824
8825
  ] });
8825
8826
  }, je = ln(() => $w(t), [t]);
8826
8827
  return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
@@ -10730,7 +10731,7 @@ Od.displayName = s0;
10730
10731
  var i0 = Od;
10731
10732
  function Md(e) {
10732
10733
  const [t, n] = f.useState(void 0);
10733
- return st(() => {
10734
+ return it(() => {
10734
10735
  if (e) {
10735
10736
  n({ width: e.offsetWidth, height: e.offsetHeight });
10736
10737
  const r = new ResizeObserver((o) => {
@@ -10810,20 +10811,20 @@ var Ia = "PopperContent", [c0, l0] = Dd(Ia), Hd = f.forwardRef(
10810
10811
  n0({
10811
10812
  ...G,
10812
10813
  apply: ({ elements: Ae, rects: _e, availableWidth: je, availableHeight: ie }) => {
10813
- const { width: Ne, height: Se } = _e.reference, fe = Ae.floating.style;
10814
- fe.setProperty("--radix-popper-available-width", `${je}px`), fe.setProperty("--radix-popper-available-height", `${ie}px`), fe.setProperty("--radix-popper-anchor-width", `${Ne}px`), fe.setProperty("--radix-popper-anchor-height", `${Se}px`);
10814
+ const { width: Ne, height: Ce } = _e.reference, fe = Ae.floating.style;
10815
+ fe.setProperty("--radix-popper-available-width", `${je}px`), fe.setProperty("--radix-popper-available-height", `${ie}px`), fe.setProperty("--radix-popper-anchor-width", `${Ne}px`), fe.setProperty("--radix-popper-anchor-height", `${Ce}px`);
10815
10816
  }
10816
10817
  }),
10817
10818
  R && o0({ element: R, padding: a }),
10818
10819
  f0({ arrowWidth: E, arrowHeight: N }),
10819
10820
  m && r0({ strategy: "referenceHidden", ...G })
10820
10821
  ]
10821
- }), [D, K] = Wd(U), W = ct(x);
10822
- st(() => {
10822
+ }), [D, K] = Wd(U), W = lt(x);
10823
+ it(() => {
10823
10824
  oe && (W == null || W());
10824
10825
  }, [oe, W]);
10825
10826
  const ee = (F = O.arrow) == null ? void 0 : F.x, L = (A = O.arrow) == null ? void 0 : A.y, Z = ((H = O.arrow) == null ? void 0 : H.centerOffset) !== 0, [pe, he] = f.useState();
10826
- return st(() => {
10827
+ return it(() => {
10827
10828
  g && he(window.getComputedStyle(g).zIndex);
10828
10829
  }, [g]), /* @__PURE__ */ c.jsx(
10829
10830
  "div",
@@ -10972,7 +10973,7 @@ var x0 = f.forwardRef((e, t) => {
10972
10973
  defaultProp: a ?? null,
10973
10974
  onChange: l,
10974
10975
  caller: eo
10975
- }), [g, b] = f.useState(!1), y = ct(u), R = Vd(n), S = f.useRef(!1), [C, E] = f.useState(0);
10976
+ }), [g, b] = f.useState(!1), y = lt(u), R = Vd(n), S = f.useRef(!1), [C, E] = f.useState(0);
10976
10977
  return f.useEffect(() => {
10977
10978
  const N = m.current;
10978
10979
  if (N)
@@ -11123,7 +11124,7 @@ var C0 = Kd, T0 = qd, Ai = ["Enter", " "], R0 = ["ArrowDown", "PageUp", "Home"],
11123
11124
  vr,
11124
11125
  Gd
11125
11126
  ]), Ss = vr(), Qd = Gd(), [A0, Wn] = Un(to), [P0, no] = Un(to), ef = (e) => {
11126
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = Ss(t), [l, u] = f.useState(null), d = f.useRef(!1), h = ct(s), m = xs(o);
11127
+ const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = Ss(t), [l, u] = f.useState(null), d = f.useRef(!1), h = lt(s), m = xs(o);
11127
11128
  return f.useEffect(() => {
11128
11129
  const w = () => {
11129
11130
  d.current = !0, document.addEventListener("pointerdown", x, { capture: !0, once: !0 }), document.addEventListener("pointermove", x, { capture: !0, once: !0 });
@@ -11459,7 +11460,7 @@ var cf = "MenuRadioGroup", [z0, U0] = Un(
11459
11460
  } }
11460
11461
  ), lf = f.forwardRef(
11461
11462
  (e, t) => {
11462
- const { value: n, onValueChange: r, ...o } = e, s = ct(r);
11463
+ const { value: n, onValueChange: r, ...o } = e, s = lt(r);
11463
11464
  return /* @__PURE__ */ c.jsx(z0, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ c.jsx(La, { ...o, ref: t }) });
11464
11465
  }
11465
11466
  );
@@ -11686,7 +11687,7 @@ function Hr(e) {
11686
11687
  var Q0 = ef, eS = _a, tS = nf, nS = rf, rS = La, oS = of, sS = Cs, iS = af, aS = lf, cS = df, lS = hf, uS = pf, dS = mf, fS = vf, hS = bf, Ts = "DropdownMenu", [pS, gR] = Gt(
11687
11688
  Ts,
11688
11689
  [Zd]
11689
- ), gt = Zd(), [mS, yf] = pS(Ts), Sf = (e) => {
11690
+ ), vt = Zd(), [mS, yf] = pS(Ts), Sf = (e) => {
11690
11691
  const {
11691
11692
  __scopeDropdownMenu: t,
11692
11693
  children: n,
@@ -11695,7 +11696,7 @@ var Q0 = ef, eS = _a, tS = nf, nS = rf, rS = La, oS = of, sS = Cs, iS = af, aS =
11695
11696
  defaultOpen: s,
11696
11697
  onOpenChange: i,
11697
11698
  modal: a = !0
11698
- } = e, l = gt(t), u = f.useRef(null), [d, h] = xn({
11699
+ } = e, l = vt(t), u = f.useRef(null), [d, h] = xn({
11699
11700
  prop: o,
11700
11701
  defaultProp: s ?? !1,
11701
11702
  onChange: i,
@@ -11719,7 +11720,7 @@ var Q0 = ef, eS = _a, tS = nf, nS = rf, rS = La, oS = of, sS = Cs, iS = af, aS =
11719
11720
  Sf.displayName = Ts;
11720
11721
  var Cf = "DropdownMenuTrigger", Tf = f.forwardRef(
11721
11722
  (e, t) => {
11722
- const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = yf(Cf, n), i = gt(n);
11723
+ const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = yf(Cf, n), i = vt(n);
11723
11724
  return /* @__PURE__ */ c.jsx(eS, { asChild: !0, ...i, children: /* @__PURE__ */ c.jsx(
11724
11725
  ve.button,
11725
11726
  {
@@ -11745,13 +11746,13 @@ var Cf = "DropdownMenuTrigger", Tf = f.forwardRef(
11745
11746
  );
11746
11747
  Tf.displayName = Cf;
11747
11748
  var gS = "DropdownMenuPortal", Rf = (e) => {
11748
- const { __scopeDropdownMenu: t, ...n } = e, r = gt(t);
11749
+ const { __scopeDropdownMenu: t, ...n } = e, r = vt(t);
11749
11750
  return /* @__PURE__ */ c.jsx(tS, { ...r, ...n });
11750
11751
  };
11751
11752
  Rf.displayName = gS;
11752
11753
  var Ef = "DropdownMenuContent", Nf = f.forwardRef(
11753
11754
  (e, t) => {
11754
- const { __scopeDropdownMenu: n, ...r } = e, o = yf(Ef, n), s = gt(n), i = f.useRef(!1);
11755
+ const { __scopeDropdownMenu: n, ...r } = e, o = yf(Ef, n), s = vt(n), i = f.useRef(!1);
11755
11756
  return /* @__PURE__ */ c.jsx(
11756
11757
  nS,
11757
11758
  {
@@ -11783,64 +11784,64 @@ var Ef = "DropdownMenuContent", Nf = f.forwardRef(
11783
11784
  Nf.displayName = Ef;
11784
11785
  var vS = "DropdownMenuGroup", xS = f.forwardRef(
11785
11786
  (e, t) => {
11786
- const { __scopeDropdownMenu: n, ...r } = e, o = gt(n);
11787
+ const { __scopeDropdownMenu: n, ...r } = e, o = vt(n);
11787
11788
  return /* @__PURE__ */ c.jsx(rS, { ...o, ...r, ref: t });
11788
11789
  }
11789
11790
  );
11790
11791
  xS.displayName = vS;
11791
11792
  var bS = "DropdownMenuLabel", If = f.forwardRef(
11792
11793
  (e, t) => {
11793
- const { __scopeDropdownMenu: n, ...r } = e, o = gt(n);
11794
+ const { __scopeDropdownMenu: n, ...r } = e, o = vt(n);
11794
11795
  return /* @__PURE__ */ c.jsx(oS, { ...o, ...r, ref: t });
11795
11796
  }
11796
11797
  );
11797
11798
  If.displayName = bS;
11798
11799
  var wS = "DropdownMenuItem", jf = f.forwardRef(
11799
11800
  (e, t) => {
11800
- const { __scopeDropdownMenu: n, ...r } = e, o = gt(n);
11801
+ const { __scopeDropdownMenu: n, ...r } = e, o = vt(n);
11801
11802
  return /* @__PURE__ */ c.jsx(sS, { ...o, ...r, ref: t });
11802
11803
  }
11803
11804
  );
11804
11805
  jf.displayName = wS;
11805
11806
  var yS = "DropdownMenuCheckboxItem", kf = f.forwardRef((e, t) => {
11806
- const { __scopeDropdownMenu: n, ...r } = e, o = gt(n);
11807
+ const { __scopeDropdownMenu: n, ...r } = e, o = vt(n);
11807
11808
  return /* @__PURE__ */ c.jsx(iS, { ...o, ...r, ref: t });
11808
11809
  });
11809
11810
  kf.displayName = yS;
11810
11811
  var SS = "DropdownMenuRadioGroup", CS = f.forwardRef((e, t) => {
11811
- const { __scopeDropdownMenu: n, ...r } = e, o = gt(n);
11812
+ const { __scopeDropdownMenu: n, ...r } = e, o = vt(n);
11812
11813
  return /* @__PURE__ */ c.jsx(aS, { ...o, ...r, ref: t });
11813
11814
  });
11814
11815
  CS.displayName = SS;
11815
11816
  var TS = "DropdownMenuRadioItem", Af = f.forwardRef((e, t) => {
11816
- const { __scopeDropdownMenu: n, ...r } = e, o = gt(n);
11817
+ const { __scopeDropdownMenu: n, ...r } = e, o = vt(n);
11817
11818
  return /* @__PURE__ */ c.jsx(cS, { ...o, ...r, ref: t });
11818
11819
  });
11819
11820
  Af.displayName = TS;
11820
11821
  var RS = "DropdownMenuItemIndicator", Pf = f.forwardRef((e, t) => {
11821
- const { __scopeDropdownMenu: n, ...r } = e, o = gt(n);
11822
+ const { __scopeDropdownMenu: n, ...r } = e, o = vt(n);
11822
11823
  return /* @__PURE__ */ c.jsx(lS, { ...o, ...r, ref: t });
11823
11824
  });
11824
11825
  Pf.displayName = RS;
11825
11826
  var ES = "DropdownMenuSeparator", _f = f.forwardRef((e, t) => {
11826
- const { __scopeDropdownMenu: n, ...r } = e, o = gt(n);
11827
+ const { __scopeDropdownMenu: n, ...r } = e, o = vt(n);
11827
11828
  return /* @__PURE__ */ c.jsx(uS, { ...o, ...r, ref: t });
11828
11829
  });
11829
11830
  _f.displayName = ES;
11830
11831
  var NS = "DropdownMenuArrow", IS = f.forwardRef(
11831
11832
  (e, t) => {
11832
- const { __scopeDropdownMenu: n, ...r } = e, o = gt(n);
11833
+ const { __scopeDropdownMenu: n, ...r } = e, o = vt(n);
11833
11834
  return /* @__PURE__ */ c.jsx(dS, { ...o, ...r, ref: t });
11834
11835
  }
11835
11836
  );
11836
11837
  IS.displayName = NS;
11837
11838
  var jS = "DropdownMenuSubTrigger", Of = f.forwardRef((e, t) => {
11838
- const { __scopeDropdownMenu: n, ...r } = e, o = gt(n);
11839
+ const { __scopeDropdownMenu: n, ...r } = e, o = vt(n);
11839
11840
  return /* @__PURE__ */ c.jsx(fS, { ...o, ...r, ref: t });
11840
11841
  });
11841
11842
  Of.displayName = jS;
11842
11843
  var kS = "DropdownMenuSubContent", Mf = f.forwardRef((e, t) => {
11843
- const { __scopeDropdownMenu: n, ...r } = e, o = gt(n);
11844
+ const { __scopeDropdownMenu: n, ...r } = e, o = vt(n);
11844
11845
  return /* @__PURE__ */ c.jsx(
11845
11846
  hS,
11846
11847
  {
@@ -12004,17 +12005,17 @@ function ko({
12004
12005
  loadOlderMessages: B,
12005
12006
  isPostStreamFetch: G,
12006
12007
  api: _
12007
- } = Yi(), [Y, U] = ue(null), [oe, O] = ue(""), [D, K] = ue(null), [W, ee] = ue([]), [L, Z] = ue(!1), [pe, he] = ue(null), [F, A] = ue(null), [H, J] = ue(!1), [ce, se] = ue(null), [Ae, _e] = ue([]), [je, ie] = ue(null), [Ne, Se] = ue(null), [fe, Ce] = ue(!1), Be = Ke(null), ot = Ke(null), et = Ke(null), [vt, it] = ue("desktop");
12008
+ } = Yi(), [Y, U] = ue(null), [oe, O] = ue(""), [D, K] = ue(null), [W, ee] = ue([]), [L, Z] = ue(!1), [pe, he] = ue(null), [F, A] = ue(null), [H, J] = ue(!1), [ce, se] = ue(null), [Ae, _e] = ue([]), [je, ie] = ue(null), [Ne, Ce] = ue(null), [fe, Te] = ue(!1), Be = Ke(null), st = Ke(null), et = Ke(null), [xt, at] = ue("desktop");
12008
12009
  Ze(() => {
12009
12010
  const te = () => {
12010
12011
  const le = window.innerWidth;
12011
- it(le < 640 ? "phone" : le < 1024 ? "tablet" : "desktop");
12012
+ at(le < 640 ? "phone" : le < 1024 ? "tablet" : "desktop");
12012
12013
  };
12013
12014
  return te(), window.addEventListener("resize", te), () => window.removeEventListener("resize", te);
12014
12015
  }, []), Ze(() => {
12015
12016
  let te = !1;
12016
12017
  if (!x) {
12017
- _e([]), ie(null), Se(null), et.current = null;
12018
+ _e([]), ie(null), Ce(null), et.current = null;
12018
12019
  return;
12019
12020
  }
12020
12021
  const le = {
@@ -12034,14 +12035,14 @@ function ko({
12034
12035
  const qt = Nn.find((Kn) => Kn.checkpointId === Gn);
12035
12036
  ro = (qt == null ? void 0 : qt.checkpointNs) ?? null;
12036
12037
  }
12037
- ie(Gn), Se(ro), et.current = le;
12038
+ ie(Gn), Ce(ro), et.current = le;
12038
12039
  }).catch((Ye) => {
12039
12040
  console.error("ChatInterface - listCheckpoints error:", Ye), te || (_e([]), et.current = null);
12040
12041
  }), () => {
12041
12042
  te = !0;
12042
12043
  };
12043
12044
  }, [x, S, C, je, E]), Ze(() => {
12044
- S && (ie(S), Se(C ?? null));
12045
+ S && (ie(S), Ce(C ?? null));
12045
12046
  }, [S, C]);
12046
12047
  const an = Ue(async () => {
12047
12048
  if (!(!j || P))
@@ -12101,13 +12102,13 @@ function ko({
12101
12102
  K(Ye), w == null || w(Ye);
12102
12103
  }
12103
12104
  }
12104
- }, qe = q.useCallback((te, le) => {
12105
+ }, rt = q.useCallback((te, le) => {
12105
12106
  u && (U(te), O(le), K(null));
12106
- }, [u]), Re = q.useCallback(() => {
12107
+ }, [u]), we = q.useCallback(() => {
12107
12108
  U(null), O(""), K(null);
12108
- }, []), xt = Ue((te, le) => {
12109
- qe(te, le);
12110
- }, [qe]), jt = Ue((te) => {
12109
+ }, []), qe = Ue((te, le) => {
12110
+ rt(te, le);
12111
+ }, [rt]), jt = Ue((te) => {
12111
12112
  for (let le = te - 1; le >= 0; le--)
12112
12113
  if (v[le].role === "user") {
12113
12114
  const Oe = ae(v[le]);
@@ -12120,7 +12121,7 @@ function ko({
12120
12121
  }, [v, y, je, Ne, S, C, ae]), En = (te) => {
12121
12122
  const le = Array.from(te.target.files || []);
12122
12123
  ee((Oe) => [...Oe, ...le]);
12123
- }, lt = (te) => ee((le) => le.filter((Oe, Ye) => te !== Ye)), Tt = async (te) => {
12124
+ }, ut = (te) => ee((le) => le.filter((Oe, Ye) => te !== Ye)), Tt = async (te) => {
12124
12125
  const le = (te.target.files || [])[0];
12125
12126
  if (le) {
12126
12127
  he(null), A(null), Z(!0);
@@ -12139,22 +12140,22 @@ function ko({
12139
12140
  Z(!1), te.target.value = "";
12140
12141
  }
12141
12142
  }
12142
- }, at = (te) => {
12143
+ }, ct = (te) => {
12143
12144
  if (!te) return "Unknown";
12144
12145
  const le = Date.parse(te);
12145
12146
  return Number.isNaN(le) ? te : new Date(le).toLocaleString();
12146
- }, ht = async (te) => {
12147
+ }, pt = async (te) => {
12147
12148
  if (x) {
12148
- Ce(!0);
12149
+ Te(!0);
12149
12150
  try {
12150
12151
  if (!te) {
12151
- await I(), ie(null), Se(null);
12152
+ await I(), ie(null), Ce(null);
12152
12153
  return;
12153
12154
  }
12154
12155
  const le = Ae.find((Ye) => Ye.checkpointId === te), Oe = (le == null ? void 0 : le.checkpointNs) ?? null;
12155
- await N(te, Oe), ie(te), Se(Oe);
12156
+ await N(te, Oe), ie(te), Ce(Oe);
12156
12157
  } finally {
12157
- Ce(!1);
12158
+ Te(!1);
12158
12159
  }
12159
12160
  }
12160
12161
  }, cn = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${d.container || ""}`, Yt = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-y-auto overflow-x-auto overscroll-contain break-words break-anywhere p-4 bg-transparent ${d.messagesArea || ""}`, hn = `flex-shrink-0 w-full border-t p-4 bg-transparent ${d.inputArea || ""}`;
@@ -12182,12 +12183,12 @@ function ko({
12182
12183
  value: je ?? "",
12183
12184
  onChange: (te) => {
12184
12185
  const le = te.target.value || null;
12185
- ht(le);
12186
+ pt(le);
12186
12187
  },
12187
12188
  children: [
12188
12189
  /* @__PURE__ */ c.jsx("option", { value: "", children: "Latest" }),
12189
12190
  Ae.map((te) => /* @__PURE__ */ c.jsxs("option", { value: te.checkpointId, children: [
12190
- at(te.createdAt),
12191
+ ct(te.createdAt),
12191
12192
  te.preview ? ` — ${te.preview.slice(0, 40)}` : ""
12192
12193
  ] }, te.checkpointId))
12193
12194
  ]
@@ -12204,15 +12205,15 @@ function ko({
12204
12205
  streamingAssistantId: g,
12205
12206
  streamingDebounceMs: typeof s == "number" ? s : o,
12206
12207
  followNewMessages: i,
12207
- layoutSize: vt,
12208
+ layoutSize: xt,
12208
12209
  enableMessageEditing: u,
12209
12210
  editingMessageId: Y,
12210
12211
  onStartReached: () => {
12211
12212
  an();
12212
12213
  },
12213
- onEdit: xt,
12214
+ onEdit: qe,
12214
12215
  onRegenerate: jt,
12215
- onCancelEdit: Re,
12216
+ onCancelEdit: we,
12216
12217
  emptyMessage: ce ?? void 0,
12217
12218
  isNavigatingCheckpoint: fe || G
12218
12219
  }
@@ -12228,7 +12229,7 @@ function ko({
12228
12229
  {
12229
12230
  variant: "ghost",
12230
12231
  size: "sm",
12231
- onClick: Re,
12232
+ onClick: we,
12232
12233
  className: "text-blue-600 hover:bg-blue-100",
12233
12234
  children: /* @__PURE__ */ c.jsx(er, { size: 16 })
12234
12235
  }
@@ -12254,7 +12255,7 @@ function ko({
12254
12255
  {
12255
12256
  variant: "ghost",
12256
12257
  size: "sm",
12257
- onClick: () => lt(le),
12258
+ onClick: () => ut(le),
12258
12259
  className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
12259
12260
  "aria-label": `Remove ${te.name}`,
12260
12261
  children: /* @__PURE__ */ c.jsx(er, { size: 12 })
@@ -12266,7 +12267,7 @@ function ko({
12266
12267
  /* @__PURE__ */ c.jsx(
12267
12268
  "input",
12268
12269
  {
12269
- ref: ot,
12270
+ ref: st,
12270
12271
  type: "file",
12271
12272
  accept: ".xls,.xlsx,.xlsm",
12272
12273
  onChange: Tt,
@@ -12309,7 +12310,7 @@ function ko({
12309
12310
  {
12310
12311
  onClick: () => {
12311
12312
  var te;
12312
- L || (te = ot.current) == null || te.click();
12313
+ L || (te = st.current) == null || te.click();
12313
12314
  },
12314
12315
  className: `cursor-pointer ${L ? "opacity-60 pointer-events-none" : ""}`,
12315
12316
  children: [
@@ -12330,7 +12331,7 @@ function ko({
12330
12331
  disabled: !1,
12331
12332
  maxLength: Io,
12332
12333
  onSend: $e,
12333
- onCancelEdit: Re,
12334
+ onCancelEdit: we,
12334
12335
  onStop: R,
12335
12336
  allowEmptySend: W.length > 0,
12336
12337
  textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${Y ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${D ? "border-red-400" : ""} ${d.textarea || ""}`
@@ -12691,7 +12692,7 @@ var WS = f.forwardRef((e, t) => {
12691
12692
  onWheelScroll: d,
12692
12693
  onResize: h,
12693
12694
  ...m
12694
- } = e, w = Lt(sn, n), [x, v] = f.useState(null), p = Ee(t, (I) => v(I)), g = f.useRef(null), b = f.useRef(""), y = w.viewport, R = r.content - r.viewport, S = ct(d), C = ct(l), E = Es(h, 10);
12695
+ } = e, w = Lt(sn, n), [x, v] = f.useState(null), p = Ee(t, (I) => v(I)), g = f.useRef(null), b = f.useRef(""), y = w.viewport, R = r.content - r.viewport, S = lt(d), C = lt(l), E = Es(h, 10);
12695
12696
  function N(I) {
12696
12697
  if (g.current) {
12697
12698
  const j = I.clientX - g.current.left, P = I.clientY - g.current.top;
@@ -12710,10 +12711,10 @@ var WS = f.forwardRef((e, t) => {
12710
12711
  scope: n,
12711
12712
  scrollbar: x,
12712
12713
  hasThumb: o,
12713
- onThumbChange: ct(s),
12714
- onThumbPointerUp: ct(i),
12714
+ onThumbChange: lt(s),
12715
+ onThumbPointerUp: lt(i),
12715
12716
  onThumbPositionChange: C,
12716
- onThumbPointerDown: ct(a),
12717
+ onThumbPointerDown: lt(a),
12717
12718
  children: /* @__PURE__ */ c.jsx(
12718
12719
  ve.div,
12719
12720
  {
@@ -12849,14 +12850,14 @@ var ZS = (e, t = () => {
12849
12850
  }(), () => window.cancelAnimationFrame(r);
12850
12851
  };
12851
12852
  function Es(e, t) {
12852
- const n = ct(e), r = f.useRef(0);
12853
+ const n = lt(e), r = f.useRef(0);
12853
12854
  return f.useEffect(() => () => window.clearTimeout(r.current), []), f.useCallback(() => {
12854
12855
  window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
12855
12856
  }, [n, t]);
12856
12857
  }
12857
12858
  function cr(e, t) {
12858
- const n = ct(t);
12859
- st(() => {
12859
+ const n = lt(t);
12860
+ it(() => {
12860
12861
  let r = 0;
12861
12862
  if (e) {
12862
12863
  const o = new ResizeObserver(() => {
@@ -14448,7 +14449,7 @@ Qh.displayName = Zh;
14448
14449
  var ep = "SelectValue", tp = f.forwardRef(
14449
14450
  (e, t) => {
14450
14451
  const { __scopeSelect: n, className: r, style: o, children: s, placeholder: i = "", ...a } = e, l = Tn(ep, n), { onValueNodeHasChildrenChange: u } = l, d = s !== void 0, h = Ee(t, l.onValueNodeChange);
14451
- return st(() => {
14452
+ return it(() => {
14452
14453
  u(d);
14453
14454
  }, [u, d]), /* @__PURE__ */ c.jsx(
14454
14455
  ve.span,
@@ -14474,7 +14475,7 @@ rp.displayName = mT;
14474
14475
  var $n = "SelectContent", op = f.forwardRef(
14475
14476
  (e, t) => {
14476
14477
  const n = Tn($n, e.__scopeSelect), [r, o] = f.useState();
14477
- if (st(() => {
14478
+ if (it(() => {
14478
14479
  o(new DocumentFragment());
14479
14480
  }, []), !n.open) {
14480
14481
  const s = r;
@@ -14714,9 +14715,9 @@ var xT = "SelectItemAlignedPosition", ap = f.forwardRef((e, t) => {
14714
14715
  s.dir,
14715
14716
  r
14716
14717
  ]);
14717
- st(() => y(), [y]);
14718
+ it(() => y(), [y]);
14718
14719
  const [R, S] = f.useState();
14719
- st(() => {
14720
+ it(() => {
14720
14721
  u && S(window.getComputedStyle(u).zIndex);
14721
14722
  }, [u]);
14722
14723
  const C = f.useCallback(
@@ -14957,7 +14958,7 @@ var Er = "SelectItemText", pp = f.forwardRef(
14957
14958
  () => /* @__PURE__ */ c.jsx("option", { value: l.value, disabled: l.disabled, children: w }, l.value),
14958
14959
  [l.disabled, l.value, w]
14959
14960
  ), { onNativeOptionAdd: v, onNativeOptionRemove: p } = u;
14960
- return st(() => (v(x), () => p(x)), [v, p, x]), /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
14961
+ return it(() => (v(x), () => p(x)), [v, p, x]), /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
14961
14962
  /* @__PURE__ */ c.jsx(ve.span, { id: l.textId, ...s, ref: m }),
14962
14963
  l.isSelected && i.valueNode && !i.valueNodeHasChildren ? Zo.createPortal(s.children, i.valueNode) : null
14963
14964
  ] });
@@ -14973,7 +14974,7 @@ var mp = "SelectItemIndicator", gp = f.forwardRef(
14973
14974
  gp.displayName = mp;
14974
14975
  var Bi = "SelectScrollUpButton", vp = f.forwardRef((e, t) => {
14975
14976
  const n = Rn(Bi, e.__scopeSelect), r = Ka(Bi, e.__scopeSelect), [o, s] = f.useState(!1), i = Ee(t, r.onScrollButtonChange);
14976
- return st(() => {
14977
+ return it(() => {
14977
14978
  if (n.viewport && n.isPositioned) {
14978
14979
  let a = function() {
14979
14980
  const u = l.scrollTop > 0;
@@ -14997,7 +14998,7 @@ var Bi = "SelectScrollUpButton", vp = f.forwardRef((e, t) => {
14997
14998
  vp.displayName = Bi;
14998
14999
  var $i = "SelectScrollDownButton", xp = f.forwardRef((e, t) => {
14999
15000
  const n = Rn($i, e.__scopeSelect), r = Ka($i, e.__scopeSelect), [o, s] = f.useState(!1), i = Ee(t, r.onScrollButtonChange);
15000
- return st(() => {
15001
+ return it(() => {
15001
15002
  if (n.viewport && n.isPositioned) {
15002
15003
  let a = function() {
15003
15004
  const u = l.scrollHeight - l.clientHeight, d = Math.ceil(l.scrollTop) < u;
@@ -15023,7 +15024,7 @@ var bp = f.forwardRef((e, t) => {
15023
15024
  const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = Rn("SelectScrollButton", n), i = f.useRef(null), a = _s(n), l = f.useCallback(() => {
15024
15025
  i.current !== null && (window.clearInterval(i.current), i.current = null);
15025
15026
  }, []);
15026
- return f.useEffect(() => () => l(), [l]), st(() => {
15027
+ return f.useEffect(() => () => l(), [l]), it(() => {
15027
15028
  var d;
15028
15029
  const u = a().find((h) => h.ref.current === document.activeElement);
15029
15030
  (d = u == null ? void 0 : u.ref.current) == null || d.scrollIntoView({ block: "nearest" });
@@ -15090,7 +15091,7 @@ function Sp(e) {
15090
15091
  return e === "" || e === void 0;
15091
15092
  }
15092
15093
  function Cp(e) {
15093
- const t = ct(e), n = f.useRef(""), r = f.useRef(0), o = f.useCallback(
15094
+ const t = lt(e), n = f.useRef(""), r = f.useRef(0), o = f.useCallback(
15094
15095
  (i) => {
15095
15096
  const a = n.current + i;
15096
15097
  t(a), function l(u) {