@versini/sassysaint 8.62.0 → 8.62.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/chunks/{AboutChangelog.Bcp6_JXd.js → AboutChangelog.CT9VUfw7.js} +2 -2
  2. package/dist/chunks/{AboutEntry.DVBUjCJk.js → AboutEntry.BAV6U9d7.js} +7 -7
  3. package/dist/chunks/{App.DL4IaJKE.js → App.ByA_PhA6.js} +486 -487
  4. package/dist/chunks/{Chart.COg_T_AO.js → Chart.45iF-v1E.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.Bde_BKC8.js → ChatBubbleAssistant.BIc18KeQ.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.CylWmaAk.js → ChatBubbleUser.D1IsMeJR.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.DwiAf2iK.js → ChatHistoryTable.DDQqfUs6.js} +3 -3
  8. package/dist/chunks/{HistoryEntry.1J_Lw9HH.js → HistoryEntry.D7LEo6EF.js} +3 -3
  9. package/dist/chunks/{ProfileEntry.B7sOPbBh.js → ProfileEntry.B5YgbWry.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.fBAXDI0G.js → SettingsEntry.BBArtflQ.js} +2 -2
  11. package/dist/chunks/{Table.DECiK51P.js → Table.CmspC-kZ.js} +2 -2
  12. package/dist/chunks/{UsageEntry.BnQ-62s3.js → UsageEntry.CsPdGiMH.js} +3 -3
  13. package/dist/chunks/{UserMemoriesPanel.DGqSP95i.js → UserMemoriesPanel.CVYRKovm.js} +3 -3
  14. package/dist/chunks/{index.Cj-3H--g.js → index.BAEtT1xs.js} +2 -2
  15. package/dist/chunks/{index.Bt79QV0P.js → index.BK3MryNi.js} +1 -1
  16. package/dist/chunks/{index.CpgcMuF-.js → index.CVZpQ81V.js} +1 -1
  17. package/dist/chunks/{index.DZQCXS_u.js → index.CdY2RtyT.js} +1 -1
  18. package/dist/chunks/{index.BxeCb1YH.js → index.DNNq5sbs.js} +3 -3
  19. package/dist/chunks/{index.IGrBIWZE.js → index.DlvXzO73.js} +1 -1
  20. package/dist/chunks/{index.DuFPaE4g.js → index.Up_W-2I1.js} +1 -1
  21. package/dist/chunks/{useMarkdown.DfDymT8d.js → useMarkdown.C2vABRox.js} +6 -6
  22. package/dist/components/SassySaint/SassySaint.js +1 -1
  23. package/dist/index.js +4 -4
  24. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  import { jsx as l, jsxs as x, Fragment as Oe } from "react/jsx-runtime";
2
- import { I as G, ACTION_SORT as Xa, ACTION_SEARCH as Qa, ACTION_RESET_PROMPT as eo, ACTION_TOGGLE_PROMPT as to, oe as Ka, te as ve, DEFAULT_ICON_ACTION_SIZE as Ie, isTauri as Bt, n as ye, useUserPreferences as Ze, isProbablyiPhone as Ae, serverUrl as ro, useEntitlements as es, L as wr, j as Qe, C as Kr, LOCAL_STORAGE_PREFIX as Ke, LOCAL_STORAGE_PRIVATE_DISCLOSURE as ts, Pe as jt, LOCAL_STORAGE_REASONING_DISCLOSURE as rs, useChatsHistory as no, mutateCall as ns, SERVICE_TYPES as os, TOAST_CHAT_SAVED as as, PROMPT_CLASSNAME as ss, PROMPT_EDITABLE_AREA_CLASSNAME as is, i as cs, ERROR_MESSAGE as ls, c as ht, CLIPBOARD_PROMPT as en, INPUT_PLACEHOLDER_TEXT_MOBILE as tn, INPUT_PLACEHOLDER_TEXT_ENTER as rn, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as nn, isProbablyMobile as Ir, ue as us, FOOTER_DISCLAIMERS as on, h as oo, isProbablyiPad as ds, INPUT_BOTTOM_OFFSET_EXTRA as an, INPUT_BOTTOM_OFFSET_IPHONE as ps, INPUT_BOTTOM_OFFSET_IPAD as ms, INPUT_BOTTOM_OFFSET as ao, getLayoutPaddingClass as Er, i$1 as hs, E as fs, y as gs, setNewProvider as vs, TOAST_PROVIDER_CHANGED as ys, LOG_OUT as sn, a as so, ne as cn, useServerCapabilities as _s, getMessageContaintWrapperClass as bs, UI_FOOTER_BUFFER as io, UI_BUTTON_SCROLL_BUFFER as ws, Logo as Is, UI_DEFAULT_MAIN_HEIGHT as ln, isPWAMode as Es, UI_DEFAULT_MAIN_HEIGHT_IPHONE as Ts, APP_CLASSNAME as Ss, le as un, pe as xs, LOCAL_STORAGE_SORT as ks, LOCAL_STORAGE_SEARCH as Cs, LOCAL_STORAGE_SORT_TIMESTAMP as Ns, LOCAL_STORAGE_SORT_TOKEN_USAGE as zs, TOAST_CACHE_ENABLED as As, TOAST_CACHE_DISABLED as Os } from "./index.Bt79QV0P.js";
2
+ import { I as G, ACTION_SORT as Xa, ACTION_SEARCH as Qa, ACTION_RESET_PROMPT as eo, ACTION_TOGGLE_PROMPT as to, oe as Ka, te as ye, DEFAULT_ICON_ACTION_SIZE as Ee, isTauri as jt, n as _e, useUserPreferences as Ze, isProbablyiPhone as Ae, serverUrl as ro, useEntitlements as es, L as wr, j as Ke, C as Kr, LOCAL_STORAGE_PREFIX as et, LOCAL_STORAGE_PRIVATE_DISCLOSURE as ts, Pe as Vt, LOCAL_STORAGE_REASONING_DISCLOSURE as rs, useChatsHistory as no, mutateCall as ns, SERVICE_TYPES as os, TOAST_CHAT_SAVED as as, PROMPT_CLASSNAME as ss, PROMPT_EDITABLE_AREA_CLASSNAME as is, i as cs, ERROR_MESSAGE as ls, c as ft, CLIPBOARD_PROMPT as en, INPUT_PLACEHOLDER_TEXT_MOBILE as tn, INPUT_PLACEHOLDER_TEXT_ENTER as rn, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as nn, isProbablyMobile as Ir, ue as us, FOOTER_DISCLAIMERS as on, h as oo, isProbablyiPad as ds, INPUT_BOTTOM_OFFSET_EXTRA as an, INPUT_BOTTOM_OFFSET_IPHONE as ps, INPUT_BOTTOM_OFFSET_IPAD as ms, INPUT_BOTTOM_OFFSET as ao, getLayoutPaddingClass as Er, i$1 as hs, E as fs, y as gs, setNewProvider as vs, TOAST_PROVIDER_CHANGED as ys, LOG_OUT as sn, a as so, ne as cn, useServerCapabilities as _s, getMessageContaintWrapperClass as bs, UI_FOOTER_BUFFER as io, UI_BUTTON_SCROLL_BUFFER as ws, Logo as Is, UI_DEFAULT_MAIN_HEIGHT as ln, isPWAMode as Es, UI_DEFAULT_MAIN_HEIGHT_IPHONE as Ts, APP_CLASSNAME as Ss, le as un, pe as xs, LOCAL_STORAGE_SORT as ks, LOCAL_STORAGE_SEARCH as Cs, LOCAL_STORAGE_SORT_TIMESTAMP as Ns, LOCAL_STORAGE_SORT_TOKEN_USAGE as zs, TOAST_CACHE_ENABLED as As, TOAST_CACHE_DISABLED as Os } from "./index.BK3MryNi.js";
3
3
  import * as ae from "react";
4
- import st, { useRef as J, useEffect as $, useState as P, useCallback as B, useSyncExternalStore as Pt, createContext as Ms, useContext as te, useId as co, forwardRef as lo, useMemo as nt, Suspense as Vt, lazy as Te, useReducer as xt, useLayoutEffect as $s } from "react";
4
+ import it, { useRef as J, useEffect as $, useState as P, useCallback as B, useSyncExternalStore as Rt, createContext as Ms, useContext as te, useId as co, forwardRef as lo, useMemo as ot, Suspense as Ft, lazy as Te, useReducer as kt, useLayoutEffect as $s } from "react";
5
5
  import M from "clsx";
6
6
  import { computePosition as Ps, offset as uo, flip as po, shift as mo, arrow as Rs, useMergeRefs as $r, FloatingPortal as ho, FloatingOverlay as Zs, FloatingFocusManager as fo, useFloating as go, useClick as vo, useDismiss as yo, useRole as _o, useInteractions as bo, FloatingTree as Ds, useFloatingTree as wo, useFloatingNodeId as Ls, useListItem as Io, autoUpdate as Us, useListNavigation as Bs, useTypeahead as js, FloatingNode as Vs, FloatingList as Fs } from "@floating-ui/react";
7
7
  const dn = ["mousedown", "touchstart"];
@@ -103,11 +103,11 @@ const pn = (e, t) => {
103
103
  }, Qs = (e) => {
104
104
  window.localStorage.removeItem(e), To(e, null);
105
105
  }, mn = (e) => window.localStorage.getItem(e), Ks = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
106
- function et({
106
+ function tt({
107
107
  key: e,
108
108
  initialValue: t
109
109
  }) {
110
- const r = Pt(Ks, () => mn(e)), n = B(
110
+ const r = Rt(Ks, () => mn(e)), n = B(
111
111
  (i) => {
112
112
  try {
113
113
  const s = typeof i == "function" ? i(JSON.parse(r)) : i;
@@ -732,7 +732,7 @@ const ri = ({
732
732
  /* @__PURE__ */ l("path", { d: "M224 32c-53 0-96 43-96 96v64h240c44.2 0 80 35.8 80 80v160c0 44.2-35.8 80-80 80H80c-44.2 0-80-35.8-80-80V272c0-44.2 35.8-80 80-80h16v-64C96 57.3 153.3 0 224 0c58 0 107 38.6 122.7 91.4 2.5 8.5-2.3 17.4-10.8 19.9s-17.4-2.3-19.9-10.8C304.2 60.9 267.5 32 224 32M80 224c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm184 144h-80c-8.8 0-16-7.2-16-16s7.2-16 16-16h80c8.8 0 16 7.2 16 16s-7.2 16-16 16" })
733
733
  ]
734
734
  }
735
- ), ot = {
735
+ ), at = {
736
736
  ASC: "asc",
737
737
  DESC: "desc"
738
738
  };
@@ -840,20 +840,20 @@ Error message: ${Co(r)}`,
840
840
  }
841
841
  };
842
842
  Zo = Ai;
843
- var Ft = Oi;
843
+ var Ht = Oi;
844
844
  class gn extends Error {
845
845
  constructor(t, r) {
846
846
  super(t), this.name = "ParseError", this.type = r.type, this.field = r.field, this.value = r.value, this.line = r.line;
847
847
  }
848
848
  }
849
- function ur(e) {
849
+ function dr(e) {
850
850
  }
851
851
  function Mi(e) {
852
852
  if (typeof e == "function")
853
853
  throw new TypeError(
854
854
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
855
855
  );
856
- const { onEvent: t = ur, onError: r = ur, onRetry: n = ur, onComment: o } = e;
856
+ const { onEvent: t = dr, onError: r = dr, onRetry: n = dr, onComment: o } = e;
857
857
  let a = "", i = !0, s, u = "", c = "";
858
858
  function p(h) {
859
859
  const v = i ? h.replace(/^\xEF\xBB\xBF/, "") : h, [I, y] = $i(`${a}${v}`);
@@ -991,7 +991,7 @@ function _(e, t, r) {
991
991
  value: (s) => r?.Parent && s instanceof r.Parent ? !0 : s?._zod?.traits?.has(e)
992
992
  }), Object.defineProperty(i, "name", { value: e }), i;
993
993
  }
994
- class ft extends Error {
994
+ class gt extends Error {
995
995
  constructor() {
996
996
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
997
997
  }
@@ -1045,7 +1045,7 @@ function Z(e, t, r) {
1045
1045
  configurable: !0
1046
1046
  });
1047
1047
  }
1048
- function bt(e, t, r) {
1048
+ function wt(e, t, r) {
1049
1049
  Object.defineProperty(e, t, {
1050
1050
  value: r,
1051
1051
  writable: !0,
@@ -1053,12 +1053,12 @@ function bt(e, t, r) {
1053
1053
  configurable: !0
1054
1054
  });
1055
1055
  }
1056
- function it(e) {
1056
+ function ct(e) {
1057
1057
  return JSON.stringify(e);
1058
1058
  }
1059
1059
  const Uo = Error.captureStackTrace ? Error.captureStackTrace : (...e) => {
1060
1060
  };
1061
- function Ht(e) {
1061
+ function Jt(e) {
1062
1062
  return typeof e == "object" && e !== null && !Array.isArray(e);
1063
1063
  }
1064
1064
  const Di = Rr(() => {
@@ -1071,20 +1071,20 @@ const Di = Rr(() => {
1071
1071
  return !1;
1072
1072
  }
1073
1073
  });
1074
- function Jt(e) {
1075
- if (Ht(e) === !1)
1074
+ function Gt(e) {
1075
+ if (Jt(e) === !1)
1076
1076
  return !1;
1077
1077
  const t = e.constructor;
1078
1078
  if (t === void 0)
1079
1079
  return !0;
1080
1080
  const r = t.prototype;
1081
- return !(Ht(r) === !1 || Object.prototype.hasOwnProperty.call(r, "isPrototypeOf") === !1);
1081
+ return !(Jt(r) === !1 || Object.prototype.hasOwnProperty.call(r, "isPrototypeOf") === !1);
1082
1082
  }
1083
1083
  const Li = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
1084
- function wt(e) {
1084
+ function It(e) {
1085
1085
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1086
1086
  }
1087
- function Ve(e, t, r) {
1087
+ function Fe(e, t, r) {
1088
1088
  const n = new e._zod.constr(t ?? e._zod.def);
1089
1089
  return (!t || r?.parent) && (n._zod.parent = e), n;
1090
1090
  }
@@ -1118,7 +1118,7 @@ function ji(e, t) {
1118
1118
  throw new Error(`Unrecognized key: "${o}"`);
1119
1119
  t[o] && (r[o] = n.shape[o]);
1120
1120
  }
1121
- return Ve(e, {
1121
+ return Fe(e, {
1122
1122
  ...e._zod.def,
1123
1123
  shape: r,
1124
1124
  checks: []
@@ -1131,32 +1131,32 @@ function Vi(e, t) {
1131
1131
  throw new Error(`Unrecognized key: "${o}"`);
1132
1132
  t[o] && delete r[o];
1133
1133
  }
1134
- return Ve(e, {
1134
+ return Fe(e, {
1135
1135
  ...e._zod.def,
1136
1136
  shape: r,
1137
1137
  checks: []
1138
1138
  });
1139
1139
  }
1140
1140
  function Fi(e, t) {
1141
- if (!Jt(t))
1141
+ if (!Gt(t))
1142
1142
  throw new Error("Invalid input to extend: expected a plain object");
1143
1143
  const r = {
1144
1144
  ...e._zod.def,
1145
1145
  get shape() {
1146
1146
  const n = { ...e._zod.def.shape, ...t };
1147
- return bt(this, "shape", n), n;
1147
+ return wt(this, "shape", n), n;
1148
1148
  },
1149
1149
  checks: []
1150
1150
  // delete existing checks
1151
1151
  };
1152
- return Ve(e, r);
1152
+ return Fe(e, r);
1153
1153
  }
1154
1154
  function Hi(e, t) {
1155
- return Ve(e, {
1155
+ return Fe(e, {
1156
1156
  ...e._zod.def,
1157
1157
  get shape() {
1158
1158
  const r = { ...e._zod.def.shape, ...t._zod.def.shape };
1159
- return bt(this, "shape", r), r;
1159
+ return wt(this, "shape", r), r;
1160
1160
  },
1161
1161
  catchall: t._zod.def.catchall,
1162
1162
  checks: []
@@ -1180,7 +1180,7 @@ function Ji(e, t, r) {
1180
1180
  type: "optional",
1181
1181
  innerType: n[a]
1182
1182
  }) : n[a];
1183
- return Ve(t, {
1183
+ return Fe(t, {
1184
1184
  ...t._zod.def,
1185
1185
  shape: o,
1186
1186
  checks: []
@@ -1203,32 +1203,32 @@ function Gi(e, t, r) {
1203
1203
  type: "nonoptional",
1204
1204
  innerType: n[a]
1205
1205
  });
1206
- return Ve(t, {
1206
+ return Fe(t, {
1207
1207
  ...t._zod.def,
1208
1208
  shape: o,
1209
1209
  // optional: [],
1210
1210
  checks: []
1211
1211
  });
1212
1212
  }
1213
- function pt(e, t = 0) {
1213
+ function mt(e, t = 0) {
1214
1214
  for (let r = t; r < e.issues.length; r++)
1215
1215
  if (e.issues[r]?.continue !== !0)
1216
1216
  return !0;
1217
1217
  return !1;
1218
1218
  }
1219
- function Be(e, t) {
1219
+ function je(e, t) {
1220
1220
  return t.map((r) => {
1221
1221
  var n;
1222
1222
  return (n = r).path ?? (n.path = []), r.path.unshift(e), r;
1223
1223
  });
1224
1224
  }
1225
- function kt(e) {
1225
+ function Ct(e) {
1226
1226
  return typeof e == "string" ? e : e?.message;
1227
1227
  }
1228
1228
  function Pe(e, t, r) {
1229
1229
  const n = { ...e, path: e.path ?? [] };
1230
1230
  if (!e.message) {
1231
- const o = kt(e.inst?._zod.def?.error?.(e)) ?? kt(t?.error?.(e)) ?? kt(r.customError?.(e)) ?? kt(r.localeError?.(e)) ?? "Invalid input";
1231
+ const o = Ct(e.inst?._zod.def?.error?.(e)) ?? Ct(t?.error?.(e)) ?? Ct(r.customError?.(e)) ?? Ct(r.localeError?.(e)) ?? "Invalid input";
1232
1232
  n.message = o;
1233
1233
  }
1234
1234
  return delete n.inst, delete n.continue, t?.reportInput || delete n.input, n;
@@ -1236,7 +1236,7 @@ function Pe(e, t, r) {
1236
1236
  function Lr(e) {
1237
1237
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
1238
1238
  }
1239
- function gt(...e) {
1239
+ function vt(...e) {
1240
1240
  const [t, r, n] = e;
1241
1241
  return typeof t == "string" ? {
1242
1242
  message: t,
@@ -1295,7 +1295,7 @@ function qi(e, t) {
1295
1295
  const Yi = (e) => (t, r, n, o) => {
1296
1296
  const a = n ? Object.assign(n, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: r, issues: [] }, a);
1297
1297
  if (i instanceof Promise)
1298
- throw new ft();
1298
+ throw new gt();
1299
1299
  if (i.issues.length) {
1300
1300
  const s = new (o?.Err ?? e)(i.issues.map((u) => Pe(u, a, $e())));
1301
1301
  throw Uo(s, o?.callee), s;
@@ -1312,7 +1312,7 @@ const Yi = (e) => (t, r, n, o) => {
1312
1312
  }, Fo = (e) => (t, r, n) => {
1313
1313
  const o = n ? { ...n, async: !1 } : { async: !1 }, a = t._zod.run({ value: r, issues: [] }, o);
1314
1314
  if (a instanceof Promise)
1315
- throw new ft();
1315
+ throw new gt();
1316
1316
  return a.issues.length ? {
1317
1317
  success: !1,
1318
1318
  error: new (e ?? jo)(a.issues.map((i) => Pe(i, o, $e())))
@@ -1527,7 +1527,7 @@ const wc = (e) => {
1527
1527
  continue: !t.abort
1528
1528
  });
1529
1529
  };
1530
- }), er = /* @__PURE__ */ _("$ZodCheckStringFormat", (e, t) => {
1530
+ }), tr = /* @__PURE__ */ _("$ZodCheckStringFormat", (e, t) => {
1531
1531
  var r, n;
1532
1532
  ue.init(e, t), e._zod.onattach.push((o) => {
1533
1533
  const a = o._zod.bag;
@@ -1545,7 +1545,7 @@ const wc = (e) => {
1545
1545
  }) : (n = e._zod).check ?? (n.check = () => {
1546
1546
  });
1547
1547
  }), Mc = /* @__PURE__ */ _("$ZodCheckRegex", (e, t) => {
1548
- er.init(e, t), e._zod.check = (r) => {
1548
+ tr.init(e, t), e._zod.check = (r) => {
1549
1549
  t.pattern.lastIndex = 0, !t.pattern.test(r.value) && r.issues.push({
1550
1550
  origin: "string",
1551
1551
  code: "invalid_format",
@@ -1557,12 +1557,12 @@ const wc = (e) => {
1557
1557
  });
1558
1558
  };
1559
1559
  }), $c = /* @__PURE__ */ _("$ZodCheckLowerCase", (e, t) => {
1560
- t.pattern ?? (t.pattern = xc), er.init(e, t);
1560
+ t.pattern ?? (t.pattern = xc), tr.init(e, t);
1561
1561
  }), Pc = /* @__PURE__ */ _("$ZodCheckUpperCase", (e, t) => {
1562
- t.pattern ?? (t.pattern = kc), er.init(e, t);
1562
+ t.pattern ?? (t.pattern = kc), tr.init(e, t);
1563
1563
  }), Rc = /* @__PURE__ */ _("$ZodCheckIncludes", (e, t) => {
1564
1564
  ue.init(e, t);
1565
- const r = wt(t.includes), n = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${r}` : r);
1565
+ const r = It(t.includes), n = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${r}` : r);
1566
1566
  t.pattern = n, e._zod.onattach.push((o) => {
1567
1567
  const a = o._zod.bag;
1568
1568
  a.patterns ?? (a.patterns = /* @__PURE__ */ new Set()), a.patterns.add(n);
@@ -1579,7 +1579,7 @@ const wc = (e) => {
1579
1579
  };
1580
1580
  }), Zc = /* @__PURE__ */ _("$ZodCheckStartsWith", (e, t) => {
1581
1581
  ue.init(e, t);
1582
- const r = new RegExp(`^${wt(t.prefix)}.*`);
1582
+ const r = new RegExp(`^${It(t.prefix)}.*`);
1583
1583
  t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
1584
1584
  const o = n._zod.bag;
1585
1585
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(r);
@@ -1596,7 +1596,7 @@ const wc = (e) => {
1596
1596
  };
1597
1597
  }), Dc = /* @__PURE__ */ _("$ZodCheckEndsWith", (e, t) => {
1598
1598
  ue.init(e, t);
1599
- const r = new RegExp(`.*${wt(t.suffix)}$`);
1599
+ const r = new RegExp(`.*${It(t.suffix)}$`);
1600
1600
  t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
1601
1601
  const o = n._zod.bag;
1602
1602
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(r);
@@ -1657,7 +1657,7 @@ const Bc = {
1657
1657
  });
1658
1658
  else {
1659
1659
  const o = (a, i, s) => {
1660
- let u = pt(a), c;
1660
+ let u = mt(a), c;
1661
1661
  for (const p of i) {
1662
1662
  if (p._zod.def.when) {
1663
1663
  if (!p._zod.def.when(a))
@@ -1666,15 +1666,15 @@ const Bc = {
1666
1666
  continue;
1667
1667
  const d = a.issues.length, f = p._zod.check(a);
1668
1668
  if (f instanceof Promise && s?.async === !1)
1669
- throw new ft();
1669
+ throw new gt();
1670
1670
  if (c || f instanceof Promise)
1671
1671
  c = (c ?? Promise.resolve()).then(async () => {
1672
- await f, a.issues.length !== d && (u || (u = pt(a, d)));
1672
+ await f, a.issues.length !== d && (u || (u = mt(a, d)));
1673
1673
  });
1674
1674
  else {
1675
1675
  if (a.issues.length === d)
1676
1676
  continue;
1677
- u || (u = pt(a, d));
1677
+ u || (u = mt(a, d));
1678
1678
  }
1679
1679
  }
1680
1680
  return c ? c.then(() => a) : a;
@@ -1683,7 +1683,7 @@ const Bc = {
1683
1683
  const s = e._zod.parse(a, i);
1684
1684
  if (s instanceof Promise) {
1685
1685
  if (i.async === !1)
1686
- throw new ft();
1686
+ throw new gt();
1687
1687
  return s.then((u) => o(u, n, i));
1688
1688
  }
1689
1689
  return o(s, n, i);
@@ -1716,7 +1716,7 @@ const Bc = {
1716
1716
  }), r;
1717
1717
  };
1718
1718
  }), W = /* @__PURE__ */ _("$ZodStringFormat", (e, t) => {
1719
- er.init(e, t), Ur.init(e, t);
1719
+ tr.init(e, t), Ur.init(e, t);
1720
1720
  }), jc = /* @__PURE__ */ _("$ZodGUID", (e, t) => {
1721
1721
  t.pattern ?? (t.pattern = ic), W.init(e, t);
1722
1722
  }), Vc = /* @__PURE__ */ _("$ZodUUID", (e, t) => {
@@ -1966,7 +1966,7 @@ const pl = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
1966
1966
  }), r);
1967
1967
  });
1968
1968
  function yn(e, t, r) {
1969
- e.issues.length && t.issues.push(...Be(r, e.issues)), t.value[r] = e.value;
1969
+ e.issues.length && t.issues.push(...je(r, e.issues)), t.value[r] = e.value;
1970
1970
  }
1971
1971
  const yl = /* @__PURE__ */ _("$ZodArray", (e, t) => {
1972
1972
  j.init(e, t), e._zod.parse = (r, n) => {
@@ -1990,11 +1990,11 @@ const yl = /* @__PURE__ */ _("$ZodArray", (e, t) => {
1990
1990
  return a.length ? Promise.all(a).then(() => r) : r;
1991
1991
  };
1992
1992
  });
1993
- function Ct(e, t, r) {
1994
- e.issues.length && t.issues.push(...Be(r, e.issues)), t.value[r] = e.value;
1993
+ function Nt(e, t, r) {
1994
+ e.issues.length && t.issues.push(...je(r, e.issues)), t.value[r] = e.value;
1995
1995
  }
1996
1996
  function _n(e, t, r, n) {
1997
- e.issues.length ? n[r] === void 0 ? r in n ? t.value[r] = void 0 : t.value[r] = e.value : t.issues.push(...Be(r, e.issues)) : e.value === void 0 ? r in n && (t.value[r] = void 0) : t.value[r] = e.value;
1997
+ e.issues.length ? n[r] === void 0 ? r in n ? t.value[r] = void 0 : t.value[r] = e.value : t.issues.push(...je(r, e.issues)) : e.value === void 0 ? r in n && (t.value[r] = void 0) : t.value[r] = e.value;
1998
1998
  }
1999
1999
  const _l = /* @__PURE__ */ _("$ZodObject", (e, t) => {
2000
2000
  j.init(e, t);
@@ -2026,7 +2026,7 @@ const _l = /* @__PURE__ */ _("$ZodObject", (e, t) => {
2026
2026
  });
2027
2027
  const n = (d) => {
2028
2028
  const f = new Uc(["shape", "payload", "ctx"]), g = r.value, m = (y) => {
2029
- const E = it(y);
2029
+ const E = ct(y);
2030
2030
  return `shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`;
2031
2031
  };
2032
2032
  f.write("const input = payload.value;");
@@ -2039,7 +2039,7 @@ const _l = /* @__PURE__ */ _("$ZodObject", (e, t) => {
2039
2039
  if (g.optionalKeys.has(y)) {
2040
2040
  const E = h[y];
2041
2041
  f.write(`const ${E} = ${m(y)};`);
2042
- const b = it(y);
2042
+ const b = ct(y);
2043
2043
  f.write(`
2044
2044
  if (${E}.issues.length) {
2045
2045
  if (input[${b}] === undefined) {
@@ -2065,15 +2065,15 @@ const _l = /* @__PURE__ */ _("$ZodObject", (e, t) => {
2065
2065
  f.write(`const ${E} = ${m(y)};`), f.write(`
2066
2066
  if (${E}.issues.length) payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
2067
2067
  ...iss,
2068
- path: iss.path ? [${it(y)}, ...iss.path] : [${it(y)}]
2069
- })));`), f.write(`newResult[${it(y)}] = ${E}.value`);
2068
+ path: iss.path ? [${ct(y)}, ...iss.path] : [${ct(y)}]
2069
+ })));`), f.write(`newResult[${ct(y)}] = ${E}.value`);
2070
2070
  }
2071
2071
  f.write("payload.value = newResult;"), f.write("return payload;");
2072
2072
  const I = f.compile();
2073
2073
  return (y, E) => I(d, y, E);
2074
2074
  };
2075
2075
  let o;
2076
- const a = Ht, i = !Do.jitless, u = i && Di.value, c = t.catchall;
2076
+ const a = Jt, i = !Do.jitless, u = i && Di.value, c = t.catchall;
2077
2077
  let p;
2078
2078
  e._zod.parse = (d, f) => {
2079
2079
  p ?? (p = r.value);
@@ -2093,7 +2093,7 @@ const _l = /* @__PURE__ */ _("$ZodObject", (e, t) => {
2093
2093
  const E = p.shape;
2094
2094
  for (const b of p.keys) {
2095
2095
  const z = E[b], A = z._zod.run({ value: g[b], issues: [] }, f), k = z._zod.optin === "optional" && z._zod.optout === "optional";
2096
- A instanceof Promise ? m.push(A.then((O) => k ? _n(O, d, b, g) : Ct(O, d, b))) : k ? _n(A, d, b, g) : Ct(A, d, b);
2096
+ A instanceof Promise ? m.push(A.then((O) => k ? _n(O, d, b, g) : Nt(O, d, b))) : k ? _n(A, d, b, g) : Nt(A, d, b);
2097
2097
  }
2098
2098
  }
2099
2099
  if (!c)
@@ -2107,7 +2107,7 @@ const _l = /* @__PURE__ */ _("$ZodObject", (e, t) => {
2107
2107
  continue;
2108
2108
  }
2109
2109
  const b = I.run({ value: g[E], issues: [] }, f);
2110
- b instanceof Promise ? m.push(b.then((z) => Ct(z, d, E))) : Ct(b, d, E);
2110
+ b instanceof Promise ? m.push(b.then((z) => Nt(z, d, E))) : Nt(b, d, E);
2111
2111
  }
2112
2112
  return h.length && d.issues.push({
2113
2113
  code: "unrecognized_keys",
@@ -2188,7 +2188,7 @@ const ea = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
2188
2188
  });
2189
2189
  e._zod.parse = (o, a) => {
2190
2190
  const i = o.value;
2191
- if (!Ht(i))
2191
+ if (!Jt(i))
2192
2192
  return o.issues.push({
2193
2193
  code: "invalid_type",
2194
2194
  expected: "object",
@@ -2216,7 +2216,7 @@ function Sr(e, t) {
2216
2216
  return { valid: !0, data: e };
2217
2217
  if (e instanceof Date && t instanceof Date && +e == +t)
2218
2218
  return { valid: !0, data: e };
2219
- if (Jt(e) && Jt(t)) {
2219
+ if (Gt(e) && Gt(t)) {
2220
2220
  const r = Object.keys(t), n = Object.keys(e).filter((a) => r.indexOf(a) !== -1), o = { ...e, ...t };
2221
2221
  for (const a of n) {
2222
2222
  const i = Sr(e[a], t[a]);
@@ -2247,7 +2247,7 @@ function Sr(e, t) {
2247
2247
  return { valid: !1, mergeErrorPath: [] };
2248
2248
  }
2249
2249
  function wn(e, t, r) {
2250
- if (t.issues.length && e.issues.push(...t.issues), r.issues.length && e.issues.push(...r.issues), pt(e))
2250
+ if (t.issues.length && e.issues.push(...t.issues), r.issues.length && e.issues.push(...r.issues), mt(e))
2251
2251
  return e;
2252
2252
  const n = Sr(t.value, r.value);
2253
2253
  if (!n.valid)
@@ -2257,7 +2257,7 @@ function wn(e, t, r) {
2257
2257
  const Il = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
2258
2258
  j.init(e, t), e._zod.parse = (r, n) => {
2259
2259
  const o = r.value;
2260
- if (!Jt(o))
2260
+ if (!Gt(o))
2261
2261
  return r.issues.push({
2262
2262
  expected: "record",
2263
2263
  code: "invalid_type",
@@ -2272,8 +2272,8 @@ const Il = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
2272
2272
  if (typeof u == "string" || typeof u == "number" || typeof u == "symbol") {
2273
2273
  const c = t.valueType._zod.run({ value: o[u], issues: [] }, n);
2274
2274
  c instanceof Promise ? a.push(c.then((p) => {
2275
- p.issues.length && r.issues.push(...Be(u, p.issues)), r.value[u] = p.value;
2276
- })) : (c.issues.length && r.issues.push(...Be(u, c.issues)), r.value[u] = c.value);
2275
+ p.issues.length && r.issues.push(...je(u, p.issues)), r.value[u] = p.value;
2276
+ })) : (c.issues.length && r.issues.push(...je(u, c.issues)), r.value[u] = c.value);
2277
2277
  }
2278
2278
  let s;
2279
2279
  for (const u in o)
@@ -2305,8 +2305,8 @@ const Il = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
2305
2305
  }
2306
2306
  const u = t.valueType._zod.run({ value: o[i], issues: [] }, n);
2307
2307
  u instanceof Promise ? a.push(u.then((c) => {
2308
- c.issues.length && r.issues.push(...Be(i, c.issues)), r.value[s.value] = c.value;
2309
- })) : (u.issues.length && r.issues.push(...Be(i, u.issues)), r.value[s.value] = u.value);
2308
+ c.issues.length && r.issues.push(...je(i, c.issues)), r.value[s.value] = c.value;
2309
+ })) : (u.issues.length && r.issues.push(...je(i, u.issues)), r.value[s.value] = u.value);
2310
2310
  }
2311
2311
  }
2312
2312
  return a.length ? Promise.all(a).then(() => r) : r;
@@ -2314,7 +2314,7 @@ const Il = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
2314
2314
  }), El = /* @__PURE__ */ _("$ZodEnum", (e, t) => {
2315
2315
  j.init(e, t);
2316
2316
  const r = Lo(t.entries);
2317
- e._zod.values = new Set(r), e._zod.pattern = new RegExp(`^(${r.filter((n) => Li.has(typeof n)).map((n) => typeof n == "string" ? wt(n) : n.toString()).join("|")})$`), e._zod.parse = (n, o) => {
2317
+ e._zod.values = new Set(r), e._zod.pattern = new RegExp(`^(${r.filter((n) => Li.has(typeof n)).map((n) => typeof n == "string" ? It(n) : n.toString()).join("|")})$`), e._zod.parse = (n, o) => {
2318
2318
  const a = n.value;
2319
2319
  return e._zod.values.has(a) || n.issues.push({
2320
2320
  code: "invalid_value",
@@ -2324,7 +2324,7 @@ const Il = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
2324
2324
  }), n;
2325
2325
  };
2326
2326
  }), Tl = /* @__PURE__ */ _("$ZodLiteral", (e, t) => {
2327
- j.init(e, t), e._zod.values = new Set(t.values), e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ? wt(r) : r ? r.toString() : String(r)).join("|")})$`), e._zod.parse = (r, n) => {
2327
+ j.init(e, t), e._zod.values = new Set(t.values), e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ? It(r) : r ? r.toString() : String(r)).join("|")})$`), e._zod.parse = (r, n) => {
2328
2328
  const o = r.value;
2329
2329
  return e._zod.values.has(o) || r.issues.push({
2330
2330
  code: "invalid_value",
@@ -2339,7 +2339,7 @@ const Il = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
2339
2339
  if (n.async)
2340
2340
  return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (r.value = i, r));
2341
2341
  if (o instanceof Promise)
2342
- throw new ft();
2342
+ throw new gt();
2343
2343
  return r.value = o, r;
2344
2344
  };
2345
2345
  }), xl = /* @__PURE__ */ _("$ZodOptional", (e, t) => {
@@ -2406,7 +2406,7 @@ const Al = /* @__PURE__ */ _("$ZodCatch", (e, t) => {
2406
2406
  };
2407
2407
  });
2408
2408
  function Tn(e, t, r) {
2409
- return pt(e) ? e : t.out._zod.run({ value: e.value, issues: e.issues }, r);
2409
+ return mt(e) ? e : t.out._zod.run({ value: e.value, issues: e.issues }, r);
2410
2410
  }
2411
2411
  const Ml = /* @__PURE__ */ _("$ZodReadonly", (e, t) => {
2412
2412
  j.init(e, t), Z(e._zod, "propValues", () => t.innerType._zod.propValues), Z(e._zod, "values", () => t.innerType._zod.values), Z(e._zod, "optin", () => t.innerType._zod.optin), Z(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (r, n) => {
@@ -2439,7 +2439,7 @@ function xn(e, t, r, n) {
2439
2439
  continue: !n._zod.def.abort
2440
2440
  // params: inst._zod.def.params,
2441
2441
  };
2442
- n._zod.def.params && (o.params = n._zod.def.params), t.issues.push(gt(o));
2442
+ n._zod.def.params && (o.params = n._zod.def.params), t.issues.push(vt(o));
2443
2443
  }
2444
2444
  }
2445
2445
  class ta {
@@ -2477,7 +2477,7 @@ class ta {
2477
2477
  function Rl() {
2478
2478
  return new ta();
2479
2479
  }
2480
- const ct = /* @__PURE__ */ Rl();
2480
+ const lt = /* @__PURE__ */ Rl();
2481
2481
  function Zl(e, t) {
2482
2482
  return new e({
2483
2483
  type: "string",
@@ -2768,7 +2768,7 @@ function Cn(e, t) {
2768
2768
  inclusive: !1
2769
2769
  });
2770
2770
  }
2771
- function dr(e, t) {
2771
+ function pr(e, t) {
2772
2772
  return new Yo({
2773
2773
  check: "less_than",
2774
2774
  ...S(t),
@@ -2784,7 +2784,7 @@ function Nn(e, t) {
2784
2784
  inclusive: !1
2785
2785
  });
2786
2786
  }
2787
- function pr(e, t) {
2787
+ function mr(e, t) {
2788
2788
  return new Xo({
2789
2789
  check: "greater_than",
2790
2790
  ...S(t),
@@ -2806,7 +2806,7 @@ function na(e, t) {
2806
2806
  maximum: e
2807
2807
  });
2808
2808
  }
2809
- function Gt(e, t) {
2809
+ function Wt(e, t) {
2810
2810
  return new Ac({
2811
2811
  check: "min_length",
2812
2812
  ...S(t),
@@ -2866,23 +2866,23 @@ function _u(e, t) {
2866
2866
  suffix: e
2867
2867
  });
2868
2868
  }
2869
- function It(e) {
2869
+ function Et(e) {
2870
2870
  return new Lc({
2871
2871
  check: "overwrite",
2872
2872
  tx: e
2873
2873
  });
2874
2874
  }
2875
2875
  function bu(e) {
2876
- return It((t) => t.normalize(e));
2876
+ return Et((t) => t.normalize(e));
2877
2877
  }
2878
2878
  function wu() {
2879
- return It((e) => e.trim());
2879
+ return Et((e) => e.trim());
2880
2880
  }
2881
2881
  function Iu() {
2882
- return It((e) => e.toLowerCase());
2882
+ return Et((e) => e.toLowerCase());
2883
2883
  }
2884
2884
  function Eu() {
2885
- return It((e) => e.toUpperCase());
2885
+ return Et((e) => e.toUpperCase());
2886
2886
  }
2887
2887
  function Tu(e, t, r) {
2888
2888
  return new e({
@@ -2913,7 +2913,7 @@ function xu(e, t, r) {
2913
2913
  }
2914
2914
  class An {
2915
2915
  constructor(t) {
2916
- this.counter = 0, this.metadataRegistry = t?.metadata ?? ct, this.target = t?.target ?? "draft-2020-12", this.unrepresentable = t?.unrepresentable ?? "throw", this.override = t?.override ?? (() => {
2916
+ this.counter = 0, this.metadataRegistry = t?.metadata ?? lt, this.target = t?.target ?? "draft-2020-12", this.unrepresentable = t?.unrepresentable ?? "throw", this.override = t?.override ?? (() => {
2917
2917
  }), this.io = t?.io ?? "output", this.seen = /* @__PURE__ */ new Map();
2918
2918
  }
2919
2919
  process(t, r = { path: [], schemaPath: [] }) {
@@ -3470,9 +3470,9 @@ const Ru = (e, t) => {
3470
3470
  // enumerable: false,
3471
3471
  }
3472
3472
  });
3473
- }, tr = _("ZodError", Ru, {
3473
+ }, rr = _("ZodError", Ru, {
3474
3474
  Parent: Error
3475
- }), Zu = /* @__PURE__ */ Yi(tr), Du = /* @__PURE__ */ Xi(tr), Lu = /* @__PURE__ */ Fo(tr), aa = /* @__PURE__ */ Ho(tr), q = /* @__PURE__ */ _("ZodType", (e, t) => (j.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(
3475
+ }), Zu = /* @__PURE__ */ Yi(rr), Du = /* @__PURE__ */ Xi(rr), Lu = /* @__PURE__ */ Fo(rr), aa = /* @__PURE__ */ Ho(rr), q = /* @__PURE__ */ _("ZodType", (e, t) => (j.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(
3476
3476
  {
3477
3477
  ...t,
3478
3478
  checks: [
@@ -3481,25 +3481,25 @@ const Ru = (e, t) => {
3481
3481
  ]
3482
3482
  }
3483
3483
  // { parent: true }
3484
- ), e.clone = (r, n) => Ve(e, r, n), e.brand = () => e, e.register = ((r, n) => (r.add(e, n), e)), e.parse = (r, n) => Zu(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => Lu(e, r, n), e.parseAsync = async (r, n) => Du(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => aa(e, r, n), e.spa = e.safeParseAsync, e.refine = (r, n) => e.check(Md(r, n)), e.superRefine = (r) => e.check($d(r)), e.overwrite = (r) => e.check(It(r)), e.optional = () => Q(e), e.nullable = () => $n(e), e.nullish = () => Q($n(e)), e.nonoptional = (r) => Ed(e, r), e.array = () => Se(e), e.or = (r) => ee([e, r]), e.and = (r) => md(e, r), e.transform = (r) => Pn(e, vd(r)), e.default = (r) => bd(e, r), e.prefault = (r) => Id(e, r), e.catch = (r) => Sd(e, r), e.pipe = (r) => Pn(e, r), e.readonly = () => Cd(e), e.describe = (r) => {
3484
+ ), e.clone = (r, n) => Fe(e, r, n), e.brand = () => e, e.register = ((r, n) => (r.add(e, n), e)), e.parse = (r, n) => Zu(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => Lu(e, r, n), e.parseAsync = async (r, n) => Du(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => aa(e, r, n), e.spa = e.safeParseAsync, e.refine = (r, n) => e.check(Md(r, n)), e.superRefine = (r) => e.check($d(r)), e.overwrite = (r) => e.check(Et(r)), e.optional = () => Q(e), e.nullable = () => $n(e), e.nullish = () => Q($n(e)), e.nonoptional = (r) => Ed(e, r), e.array = () => Se(e), e.or = (r) => ee([e, r]), e.and = (r) => md(e, r), e.transform = (r) => Pn(e, vd(r)), e.default = (r) => bd(e, r), e.prefault = (r) => Id(e, r), e.catch = (r) => Sd(e, r), e.pipe = (r) => Pn(e, r), e.readonly = () => Cd(e), e.describe = (r) => {
3485
3485
  const n = e.clone();
3486
- return ct.add(n, { description: r }), n;
3486
+ return lt.add(n, { description: r }), n;
3487
3487
  }, Object.defineProperty(e, "description", {
3488
3488
  get() {
3489
- return ct.get(e)?.description;
3489
+ return lt.get(e)?.description;
3490
3490
  },
3491
3491
  configurable: !0
3492
3492
  }), e.meta = (...r) => {
3493
3493
  if (r.length === 0)
3494
- return ct.get(e);
3494
+ return lt.get(e);
3495
3495
  const n = e.clone();
3496
- return ct.add(n, r[0]), n;
3496
+ return lt.add(n, r[0]), n;
3497
3497
  }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), sa = /* @__PURE__ */ _("_ZodString", (e, t) => {
3498
3498
  Ur.init(e, t), q.init(e, t);
3499
3499
  const r = e._zod.bag;
3500
- e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(hu(...n)), e.includes = (...n) => e.check(vu(...n)), e.startsWith = (...n) => e.check(yu(...n)), e.endsWith = (...n) => e.check(_u(...n)), e.min = (...n) => e.check(Gt(...n)), e.max = (...n) => e.check(na(...n)), e.length = (...n) => e.check(oa(...n)), e.nonempty = (...n) => e.check(Gt(1, ...n)), e.lowercase = (n) => e.check(fu(n)), e.uppercase = (n) => e.check(gu(n)), e.trim = () => e.check(wu()), e.normalize = (...n) => e.check(bu(...n)), e.toLowerCase = () => e.check(Iu()), e.toUpperCase = () => e.check(Eu());
3500
+ e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(hu(...n)), e.includes = (...n) => e.check(vu(...n)), e.startsWith = (...n) => e.check(yu(...n)), e.endsWith = (...n) => e.check(_u(...n)), e.min = (...n) => e.check(Wt(...n)), e.max = (...n) => e.check(na(...n)), e.length = (...n) => e.check(oa(...n)), e.nonempty = (...n) => e.check(Wt(1, ...n)), e.lowercase = (n) => e.check(fu(n)), e.uppercase = (n) => e.check(gu(n)), e.trim = () => e.check(wu()), e.normalize = (...n) => e.check(bu(...n)), e.toLowerCase = () => e.check(Iu()), e.toUpperCase = () => e.check(Eu());
3501
3501
  }), Uu = /* @__PURE__ */ _("ZodString", (e, t) => {
3502
- Ur.init(e, t), sa.init(e, t), e.email = (r) => e.check(Dl(Bu, r)), e.url = (r) => e.check(Vl(ju, r)), e.jwt = (r) => e.check(nu(rd, r)), e.emoji = (r) => e.check(Fl(Vu, r)), e.guid = (r) => e.check(kn(On, r)), e.uuid = (r) => e.check(Ll(Nt, r)), e.uuidv4 = (r) => e.check(Ul(Nt, r)), e.uuidv6 = (r) => e.check(Bl(Nt, r)), e.uuidv7 = (r) => e.check(jl(Nt, r)), e.nanoid = (r) => e.check(Hl(Fu, r)), e.guid = (r) => e.check(kn(On, r)), e.cuid = (r) => e.check(Jl(Hu, r)), e.cuid2 = (r) => e.check(Gl(Ju, r)), e.ulid = (r) => e.check(Wl(Gu, r)), e.base64 = (r) => e.check(ra(ia, r)), e.base64url = (r) => e.check(tu(ed, r)), e.xid = (r) => e.check(ql(Wu, r)), e.ksuid = (r) => e.check(Yl(qu, r)), e.ipv4 = (r) => e.check(Xl(Yu, r)), e.ipv6 = (r) => e.check(Ql(Xu, r)), e.cidrv4 = (r) => e.check(Kl(Qu, r)), e.cidrv6 = (r) => e.check(eu(Ku, r)), e.e164 = (r) => e.check(ru(td, r)), e.datetime = (r) => e.check(Nu(r)), e.date = (r) => e.check(Au(r)), e.time = (r) => e.check(Mu(r)), e.duration = (r) => e.check(Pu(r));
3502
+ Ur.init(e, t), sa.init(e, t), e.email = (r) => e.check(Dl(Bu, r)), e.url = (r) => e.check(Vl(ju, r)), e.jwt = (r) => e.check(nu(rd, r)), e.emoji = (r) => e.check(Fl(Vu, r)), e.guid = (r) => e.check(kn(On, r)), e.uuid = (r) => e.check(Ll(zt, r)), e.uuidv4 = (r) => e.check(Ul(zt, r)), e.uuidv6 = (r) => e.check(Bl(zt, r)), e.uuidv7 = (r) => e.check(jl(zt, r)), e.nanoid = (r) => e.check(Hl(Fu, r)), e.guid = (r) => e.check(kn(On, r)), e.cuid = (r) => e.check(Jl(Hu, r)), e.cuid2 = (r) => e.check(Gl(Ju, r)), e.ulid = (r) => e.check(Wl(Gu, r)), e.base64 = (r) => e.check(ra(ia, r)), e.base64url = (r) => e.check(tu(ed, r)), e.xid = (r) => e.check(ql(Wu, r)), e.ksuid = (r) => e.check(Yl(qu, r)), e.ipv4 = (r) => e.check(Xl(Yu, r)), e.ipv6 = (r) => e.check(Ql(Xu, r)), e.cidrv4 = (r) => e.check(Kl(Qu, r)), e.cidrv6 = (r) => e.check(eu(Ku, r)), e.e164 = (r) => e.check(ru(td, r)), e.datetime = (r) => e.check(Nu(r)), e.date = (r) => e.check(Au(r)), e.time = (r) => e.check(Mu(r)), e.duration = (r) => e.check(Pu(r));
3503
3503
  });
3504
3504
  function w(e) {
3505
3505
  return Zl(Uu, e);
@@ -3510,7 +3510,7 @@ const Y = /* @__PURE__ */ _("ZodStringFormat", (e, t) => {
3510
3510
  Fc.init(e, t), Y.init(e, t);
3511
3511
  }), On = /* @__PURE__ */ _("ZodGUID", (e, t) => {
3512
3512
  jc.init(e, t), Y.init(e, t);
3513
- }), Nt = /* @__PURE__ */ _("ZodUUID", (e, t) => {
3513
+ }), zt = /* @__PURE__ */ _("ZodUUID", (e, t) => {
3514
3514
  Vc.init(e, t), Y.init(e, t);
3515
3515
  }), ju = /* @__PURE__ */ _("ZodURL", (e, t) => {
3516
3516
  Hc.init(e, t), Y.init(e, t);
@@ -3549,11 +3549,11 @@ const ed = /* @__PURE__ */ _("ZodBase64URL", (e, t) => {
3549
3549
  }), rd = /* @__PURE__ */ _("ZodJWT", (e, t) => {
3550
3550
  pl.init(e, t), Y.init(e, t);
3551
3551
  }), la = /* @__PURE__ */ _("ZodNumber", (e, t) => {
3552
- Ko.init(e, t), q.init(e, t), e.gt = (n, o) => e.check(Nn(n, o)), e.gte = (n, o) => e.check(pr(n, o)), e.min = (n, o) => e.check(pr(n, o)), e.lt = (n, o) => e.check(Cn(n, o)), e.lte = (n, o) => e.check(dr(n, o)), e.max = (n, o) => e.check(dr(n, o)), e.int = (n) => e.check(Mn(n)), e.safe = (n) => e.check(Mn(n)), e.positive = (n) => e.check(Nn(0, n)), e.nonnegative = (n) => e.check(pr(0, n)), e.negative = (n) => e.check(Cn(0, n)), e.nonpositive = (n) => e.check(dr(0, n)), e.multipleOf = (n, o) => e.check(zn(n, o)), e.step = (n, o) => e.check(zn(n, o)), e.finite = () => e;
3552
+ Ko.init(e, t), q.init(e, t), e.gt = (n, o) => e.check(Nn(n, o)), e.gte = (n, o) => e.check(mr(n, o)), e.min = (n, o) => e.check(mr(n, o)), e.lt = (n, o) => e.check(Cn(n, o)), e.lte = (n, o) => e.check(pr(n, o)), e.max = (n, o) => e.check(pr(n, o)), e.int = (n) => e.check(Mn(n)), e.safe = (n) => e.check(Mn(n)), e.positive = (n) => e.check(Nn(0, n)), e.nonnegative = (n) => e.check(mr(0, n)), e.negative = (n) => e.check(Cn(0, n)), e.nonpositive = (n) => e.check(pr(0, n)), e.multipleOf = (n, o) => e.check(zn(n, o)), e.step = (n, o) => e.check(zn(n, o)), e.finite = () => e;
3553
3553
  const r = e._zod.bag;
3554
3554
  e.minValue = Math.max(r.minimum ?? Number.NEGATIVE_INFINITY, r.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(r.maximum ?? Number.POSITIVE_INFINITY, r.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (r.format ?? "").includes("int") || Number.isSafeInteger(r.multipleOf ?? 0.5), e.isFinite = !0, e.format = r.format ?? null;
3555
3555
  });
3556
- function vt(e) {
3556
+ function yt(e) {
3557
3557
  return cu(la, e);
3558
3558
  }
3559
3559
  const nd = /* @__PURE__ */ _("ZodNumberFormat", (e, t) => {
@@ -3587,19 +3587,19 @@ function le(e) {
3587
3587
  return mu(cd, e);
3588
3588
  }
3589
3589
  const ld = /* @__PURE__ */ _("ZodArray", (e, t) => {
3590
- yl.init(e, t), q.init(e, t), e.element = t.element, e.min = (r, n) => e.check(Gt(r, n)), e.nonempty = (r) => e.check(Gt(1, r)), e.max = (r, n) => e.check(na(r, n)), e.length = (r, n) => e.check(oa(r, n)), e.unwrap = () => e.element;
3590
+ yl.init(e, t), q.init(e, t), e.element = t.element, e.min = (r, n) => e.check(Wt(r, n)), e.nonempty = (r) => e.check(Wt(1, r)), e.max = (r, n) => e.check(na(r, n)), e.length = (r, n) => e.check(oa(r, n)), e.unwrap = () => e.element;
3591
3591
  });
3592
3592
  function Se(e, t) {
3593
3593
  return Tu(ld, e, t);
3594
3594
  }
3595
3595
  const Br = /* @__PURE__ */ _("ZodObject", (e, t) => {
3596
- _l.init(e, t), q.init(e, t), Z(e, "shape", () => t.shape), e.keyof = () => rr(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: H() }), e.loose = () => e.clone({ ...e._zod.def, catchall: H() }), e.strict = () => e.clone({ ...e._zod.def, catchall: le() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => Fi(e, r), e.merge = (r) => Hi(e, r), e.pick = (r) => ji(e, r), e.omit = (r) => Vi(e, r), e.partial = (...r) => Ji(da, e, r[0]), e.required = (...r) => Gi(pa, e, r[0]);
3596
+ _l.init(e, t), q.init(e, t), Z(e, "shape", () => t.shape), e.keyof = () => nr(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: H() }), e.loose = () => e.clone({ ...e._zod.def, catchall: H() }), e.strict = () => e.clone({ ...e._zod.def, catchall: le() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => Fi(e, r), e.merge = (r) => Hi(e, r), e.pick = (r) => ji(e, r), e.omit = (r) => Vi(e, r), e.partial = (...r) => Ji(da, e, r[0]), e.required = (...r) => Gi(pa, e, r[0]);
3597
3597
  });
3598
3598
  function C(e, t) {
3599
3599
  const r = {
3600
3600
  type: "object",
3601
3601
  get shape() {
3602
- return bt(this, "shape", { ...e }), this.shape;
3602
+ return wt(this, "shape", { ...e }), this.shape;
3603
3603
  },
3604
3604
  ...S(t)
3605
3605
  };
@@ -3609,17 +3609,17 @@ function V(e, t) {
3609
3609
  return new Br({
3610
3610
  type: "object",
3611
3611
  get shape() {
3612
- return bt(this, "shape", { ...e }), this.shape;
3612
+ return wt(this, "shape", { ...e }), this.shape;
3613
3613
  },
3614
3614
  catchall: le(),
3615
3615
  ...S(t)
3616
3616
  });
3617
3617
  }
3618
- function tt(e, t) {
3618
+ function rt(e, t) {
3619
3619
  return new Br({
3620
3620
  type: "object",
3621
3621
  get shape() {
3622
- return bt(this, "shape", { ...e }), this.shape;
3622
+ return wt(this, "shape", { ...e }), this.shape;
3623
3623
  },
3624
3624
  catchall: H(),
3625
3625
  ...S(t)
@@ -3698,7 +3698,7 @@ const kr = /* @__PURE__ */ _("ZodEnum", (e, t) => {
3698
3698
  });
3699
3699
  };
3700
3700
  });
3701
- function rr(e, t) {
3701
+ function nr(e, t) {
3702
3702
  const r = Array.isArray(e) ? Object.fromEntries(e.map((n) => [n, n])) : e;
3703
3703
  return new kr({
3704
3704
  type: "enum",
@@ -3726,10 +3726,10 @@ const gd = /* @__PURE__ */ _("ZodTransform", (e, t) => {
3726
3726
  Sl.init(e, t), q.init(e, t), e._zod.parse = (r, n) => {
3727
3727
  r.addIssue = (a) => {
3728
3728
  if (typeof a == "string")
3729
- r.issues.push(gt(a, r.value, t));
3729
+ r.issues.push(vt(a, r.value, t));
3730
3730
  else {
3731
3731
  const i = a;
3732
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = r.value), i.inst ?? (i.inst = e), i.continue ?? (i.continue = !0), r.issues.push(gt(i));
3732
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = r.value), i.inst ?? (i.inst = e), i.continue ?? (i.continue = !0), r.issues.push(vt(i));
3733
3733
  }
3734
3734
  };
3735
3735
  const o = t.transform(r.value, r);
@@ -3852,15 +3852,15 @@ function Md(e, t = {}) {
3852
3852
  function $d(e) {
3853
3853
  const t = Ad((r) => (r.addIssue = (n) => {
3854
3854
  if (typeof n == "string")
3855
- r.issues.push(gt(n, r.value, t._zod.def));
3855
+ r.issues.push(vt(n, r.value, t._zod.def));
3856
3856
  else {
3857
3857
  const o = n;
3858
- o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = r.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), r.issues.push(gt(o));
3858
+ o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = r.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), r.issues.push(vt(o));
3859
3859
  }
3860
3860
  }, e(r.value, r)));
3861
3861
  return t;
3862
3862
  }
3863
- function Wt(e, t = {
3863
+ function qt(e, t = {
3864
3864
  error: `Input not instance of ${e.name}`
3865
3865
  }) {
3866
3866
  const r = new jr({
@@ -3876,7 +3876,7 @@ var N;
3876
3876
  (function(e) {
3877
3877
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
3878
3878
  })(N || (N = {}));
3879
- var Et = ({
3879
+ var Tt = ({
3880
3880
  prefix: e,
3881
3881
  size: t = 16,
3882
3882
  alphabet: r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
@@ -3896,7 +3896,7 @@ var Et = ({
3896
3896
  message: `The separator "${n}" must not be part of the alphabet "${r}".`
3897
3897
  });
3898
3898
  return () => `${e}${n}${o()}`;
3899
- }, Pd = Et(), Rd = /"__proto__"\s*:/, Zd = /"constructor"\s*:/;
3899
+ }, Pd = Tt(), Rd = /"__proto__"\s*:/, Zd = /"constructor"\s*:/;
3900
3900
  function Dd(e) {
3901
3901
  const t = JSON.parse(e);
3902
3902
  return t === null || typeof t != "object" || Rd.test(e) === !1 && Zd.test(e) === !1 ? t : Ld(t);
@@ -3928,12 +3928,12 @@ function Ud(e) {
3928
3928
  Error.stackTraceLimit = t;
3929
3929
  }
3930
3930
  }
3931
- var qt = Symbol.for("vercel.ai.validator");
3931
+ var Yt = Symbol.for("vercel.ai.validator");
3932
3932
  function Bd(e) {
3933
- return { [qt]: !0, validate: e };
3933
+ return { [Yt]: !0, validate: e };
3934
3934
  }
3935
3935
  function jd(e) {
3936
- return typeof e == "object" && e !== null && qt in e && e[qt] === !0 && "validate" in e;
3936
+ return typeof e == "object" && e !== null && Yt in e && e[Yt] === !0 && "validate" in e;
3937
3937
  }
3938
3938
  function Vd(e) {
3939
3939
  return jd(e) ? e : Fd(e);
@@ -3943,7 +3943,7 @@ function Fd(e) {
3943
3943
  const r = await e["~standard"].validate(t);
3944
3944
  return r.issues == null ? { success: !0, value: r.value } : {
3945
3945
  success: !1,
3946
- error: new Ft({
3946
+ error: new Ht({
3947
3947
  value: t,
3948
3948
  cause: r.issues
3949
3949
  })
@@ -3956,7 +3956,7 @@ async function Rn({
3956
3956
  }) {
3957
3957
  const r = await Vr({ value: e, schema: t });
3958
3958
  if (!r.success)
3959
- throw Ft.wrap({ value: e, cause: r.error });
3959
+ throw Ht.wrap({ value: e, cause: r.error });
3960
3960
  return r.value;
3961
3961
  }
3962
3962
  async function Vr({
@@ -3970,18 +3970,18 @@ async function Vr({
3970
3970
  const n = await r.validate(e);
3971
3971
  return n.success ? { success: !0, value: n.value, rawValue: e } : {
3972
3972
  success: !1,
3973
- error: Ft.wrap({ value: e, cause: n.error }),
3973
+ error: Ht.wrap({ value: e, cause: n.error }),
3974
3974
  rawValue: e
3975
3975
  };
3976
3976
  } catch (n) {
3977
3977
  return {
3978
3978
  success: !1,
3979
- error: Ft.wrap({ value: e, cause: n }),
3979
+ error: Ht.wrap({ value: e, cause: n }),
3980
3980
  rawValue: e
3981
3981
  };
3982
3982
  }
3983
3983
  }
3984
- async function Yt({
3984
+ async function Xt({
3985
3985
  text: e,
3986
3986
  schema: t
3987
3987
  }) {
@@ -4003,12 +4003,12 @@ function Hd({
4003
4003
  return e.pipeThrough(new TextDecoderStream()).pipeThrough(new Pi()).pipeThrough(
4004
4004
  new TransformStream({
4005
4005
  async transform({ data: r }, n) {
4006
- r !== "[DONE]" && n.enqueue(await Yt({ text: r, schema: t }));
4006
+ r !== "[DONE]" && n.enqueue(await Xt({ text: r, schema: t }));
4007
4007
  }
4008
4008
  })
4009
4009
  );
4010
4010
  }
4011
- async function qe(e) {
4011
+ async function Ye(e) {
4012
4012
  return typeof e == "function" && (e = e()), Promise.resolve(e);
4013
4013
  }
4014
4014
  var Jd = (e, t) => {
@@ -4173,7 +4173,7 @@ function ap(e) {
4173
4173
  const: e.value
4174
4174
  };
4175
4175
  }
4176
- var mr = void 0, he = {
4176
+ var hr = void 0, fe = {
4177
4177
  /**
4178
4178
  * `c` was changed to `[cC]` to replicate /i flag
4179
4179
  */
@@ -4195,10 +4195,10 @@ var mr = void 0, he = {
4195
4195
  * Fix in Zod:
4196
4196
  * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
4197
4197
  */
4198
- emoji: () => (mr === void 0 && (mr = RegExp(
4198
+ emoji: () => (hr === void 0 && (hr = RegExp(
4199
4199
  "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
4200
4200
  "u"
4201
- )), mr),
4201
+ )), hr),
4202
4202
  /**
4203
4203
  * Unused
4204
4204
  */
@@ -4234,35 +4234,35 @@ function fa(e, t) {
4234
4234
  case "email":
4235
4235
  switch (t.emailStrategy) {
4236
4236
  case "format:email":
4237
- fe(r, "email", n.message, t);
4237
+ ge(r, "email", n.message, t);
4238
4238
  break;
4239
4239
  case "format:idn-email":
4240
- fe(r, "idn-email", n.message, t);
4240
+ ge(r, "idn-email", n.message, t);
4241
4241
  break;
4242
4242
  case "pattern:zod":
4243
- se(r, he.email, n.message, t);
4243
+ se(r, fe.email, n.message, t);
4244
4244
  break;
4245
4245
  }
4246
4246
  break;
4247
4247
  case "url":
4248
- fe(r, "uri", n.message, t);
4248
+ ge(r, "uri", n.message, t);
4249
4249
  break;
4250
4250
  case "uuid":
4251
- fe(r, "uuid", n.message, t);
4251
+ ge(r, "uuid", n.message, t);
4252
4252
  break;
4253
4253
  case "regex":
4254
4254
  se(r, n.regex, n.message, t);
4255
4255
  break;
4256
4256
  case "cuid":
4257
- se(r, he.cuid, n.message, t);
4257
+ se(r, fe.cuid, n.message, t);
4258
4258
  break;
4259
4259
  case "cuid2":
4260
- se(r, he.cuid2, n.message, t);
4260
+ se(r, fe.cuid2, n.message, t);
4261
4261
  break;
4262
4262
  case "startsWith":
4263
4263
  se(
4264
4264
  r,
4265
- RegExp(`^${hr(n.value, t)}`),
4265
+ RegExp(`^${fr(n.value, t)}`),
4266
4266
  n.message,
4267
4267
  t
4268
4268
  );
@@ -4270,22 +4270,22 @@ function fa(e, t) {
4270
4270
  case "endsWith":
4271
4271
  se(
4272
4272
  r,
4273
- RegExp(`${hr(n.value, t)}$`),
4273
+ RegExp(`${fr(n.value, t)}$`),
4274
4274
  n.message,
4275
4275
  t
4276
4276
  );
4277
4277
  break;
4278
4278
  case "datetime":
4279
- fe(r, "date-time", n.message, t);
4279
+ ge(r, "date-time", n.message, t);
4280
4280
  break;
4281
4281
  case "date":
4282
- fe(r, "date", n.message, t);
4282
+ ge(r, "date", n.message, t);
4283
4283
  break;
4284
4284
  case "time":
4285
- fe(r, "time", n.message, t);
4285
+ ge(r, "time", n.message, t);
4286
4286
  break;
4287
4287
  case "duration":
4288
- fe(r, "duration", n.message, t);
4288
+ ge(r, "duration", n.message, t);
4289
4289
  break;
4290
4290
  case "length":
4291
4291
  r.minLength = typeof r.minLength == "number" ? Math.max(r.minLength, n.value) : n.value, r.maxLength = typeof r.maxLength == "number" ? Math.min(r.maxLength, n.value) : n.value;
@@ -4293,37 +4293,37 @@ function fa(e, t) {
4293
4293
  case "includes": {
4294
4294
  se(
4295
4295
  r,
4296
- RegExp(hr(n.value, t)),
4296
+ RegExp(fr(n.value, t)),
4297
4297
  n.message,
4298
4298
  t
4299
4299
  );
4300
4300
  break;
4301
4301
  }
4302
4302
  case "ip": {
4303
- n.version !== "v6" && fe(r, "ipv4", n.message, t), n.version !== "v4" && fe(r, "ipv6", n.message, t);
4303
+ n.version !== "v6" && ge(r, "ipv4", n.message, t), n.version !== "v4" && ge(r, "ipv6", n.message, t);
4304
4304
  break;
4305
4305
  }
4306
4306
  case "base64url":
4307
- se(r, he.base64url, n.message, t);
4307
+ se(r, fe.base64url, n.message, t);
4308
4308
  break;
4309
4309
  case "jwt":
4310
- se(r, he.jwt, n.message, t);
4310
+ se(r, fe.jwt, n.message, t);
4311
4311
  break;
4312
4312
  case "cidr": {
4313
- n.version !== "v6" && se(r, he.ipv4Cidr, n.message, t), n.version !== "v4" && se(r, he.ipv6Cidr, n.message, t);
4313
+ n.version !== "v6" && se(r, fe.ipv4Cidr, n.message, t), n.version !== "v4" && se(r, fe.ipv6Cidr, n.message, t);
4314
4314
  break;
4315
4315
  }
4316
4316
  case "emoji":
4317
- se(r, he.emoji(), n.message, t);
4317
+ se(r, fe.emoji(), n.message, t);
4318
4318
  break;
4319
4319
  case "ulid": {
4320
- se(r, he.ulid, n.message, t);
4320
+ se(r, fe.ulid, n.message, t);
4321
4321
  break;
4322
4322
  }
4323
4323
  case "base64": {
4324
4324
  switch (t.base64Strategy) {
4325
4325
  case "format:binary": {
4326
- fe(r, "binary", n.message, t);
4326
+ ge(r, "binary", n.message, t);
4327
4327
  break;
4328
4328
  }
4329
4329
  case "contentEncoding:base64": {
@@ -4331,18 +4331,18 @@ function fa(e, t) {
4331
4331
  break;
4332
4332
  }
4333
4333
  case "pattern:zod": {
4334
- se(r, he.base64, n.message, t);
4334
+ se(r, fe.base64, n.message, t);
4335
4335
  break;
4336
4336
  }
4337
4337
  }
4338
4338
  break;
4339
4339
  }
4340
4340
  case "nanoid":
4341
- se(r, he.nanoid, n.message, t);
4341
+ se(r, fe.nanoid, n.message, t);
4342
4342
  }
4343
4343
  return r;
4344
4344
  }
4345
- function hr(e, t) {
4345
+ function fr(e, t) {
4346
4346
  return t.patternStrategy === "escape" ? ip(e) : e;
4347
4347
  }
4348
4348
  var sp = new Set(
@@ -4354,7 +4354,7 @@ function ip(e) {
4354
4354
  sp.has(e[r]) || (t += "\\"), t += e[r];
4355
4355
  return t;
4356
4356
  }
4357
- function fe(e, t, r, n) {
4357
+ function ge(e, t, r, n) {
4358
4358
  var o;
4359
4359
  e.format || (o = e.anyOf) != null && o.some((a) => a.format) ? (e.anyOf || (e.anyOf = []), e.format && (e.anyOf.push({
4360
4360
  format: e.format
@@ -4955,7 +4955,7 @@ function Fr(e, {
4955
4955
  [Nr]: !0,
4956
4956
  _type: void 0,
4957
4957
  // should never be used directly
4958
- [qt]: !0,
4958
+ [Yt]: !0,
4959
4959
  jsonSchema: e,
4960
4960
  validate: t
4961
4961
  };
@@ -4990,8 +4990,8 @@ var Lp = Object.defineProperty, Up = (e, t) => {
4990
4990
  _a = Bp;
4991
4991
  var ba = ee([
4992
4992
  w(),
4993
- Wt(Uint8Array),
4994
- Wt(ArrayBuffer),
4993
+ qt(Uint8Array),
4994
+ qt(ArrayBuffer),
4995
4995
  Od(
4996
4996
  // Buffer might not be available in some environments such as CloudFlare:
4997
4997
  (e) => {
@@ -5000,30 +5000,30 @@ var ba = ee([
5000
5000
  },
5001
5001
  { message: "Must be a Buffer" }
5002
5002
  )
5003
- ]), yt = zd(
5003
+ ]), _t = zd(
5004
5004
  () => ee([
5005
5005
  sd(),
5006
5006
  w(),
5007
- vt(),
5007
+ yt(),
5008
5008
  X(),
5009
- xr(w(), yt),
5010
- Se(yt)
5009
+ xr(w(), _t),
5010
+ Se(_t)
5011
5011
  ])
5012
5012
  ), R = xr(
5013
5013
  w(),
5014
- xr(w(), yt)
5014
+ xr(w(), _t)
5015
5015
  ), wa = C({
5016
5016
  type: T("text"),
5017
5017
  text: w(),
5018
5018
  providerOptions: R.optional()
5019
5019
  }), jp = C({
5020
5020
  type: T("image"),
5021
- image: ee([ba, Wt(URL)]),
5021
+ image: ee([ba, qt(URL)]),
5022
5022
  mediaType: w().optional(),
5023
5023
  providerOptions: R.optional()
5024
5024
  }), Ia = C({
5025
5025
  type: T("file"),
5026
- data: ee([ba, Wt(URL)]),
5026
+ data: ee([ba, qt(URL)]),
5027
5027
  filename: w().optional(),
5028
5028
  mediaType: w(),
5029
5029
  providerOptions: R.optional()
@@ -5045,7 +5045,7 @@ var ba = ee([
5045
5045
  }),
5046
5046
  C({
5047
5047
  type: T("json"),
5048
- value: yt
5048
+ value: _t
5049
5049
  }),
5050
5050
  C({
5051
5051
  type: T("error-text"),
@@ -5053,7 +5053,7 @@ var ba = ee([
5053
5053
  }),
5054
5054
  C({
5055
5055
  type: T("error-json"),
5056
- value: yt
5056
+ value: _t
5057
5057
  }),
5058
5058
  C({
5059
5059
  type: T("content"),
@@ -5116,7 +5116,7 @@ ee([
5116
5116
  Wp,
5117
5117
  qp
5118
5118
  ]);
5119
- Et({
5119
+ Tt({
5120
5120
  prefix: "aitxt",
5121
5121
  size: 24
5122
5122
  });
@@ -5536,17 +5536,17 @@ function Qp(e) {
5536
5536
  async function Sa(e) {
5537
5537
  if (e === void 0)
5538
5538
  return { value: void 0, state: "undefined-input" };
5539
- let t = await Yt({ text: e });
5540
- return t.success ? { value: t.value, state: "successful-parse" } : (t = await Yt({ text: Qp(e) }), t.success ? { value: t.value, state: "repaired-parse" } : { value: void 0, state: "failed-parse" });
5539
+ let t = await Xt({ text: e });
5540
+ return t.success ? { value: t.value, state: "successful-parse" } : (t = await Xt({ text: Qp(e) }), t.success ? { value: t.value, state: "repaired-parse" } : { value: void 0, state: "failed-parse" });
5541
5541
  }
5542
- function Rt(e) {
5542
+ function Zt(e) {
5543
5543
  return e.type.startsWith("tool-");
5544
5544
  }
5545
5545
  function Kp(e) {
5546
5546
  return e.type === "dynamic-tool";
5547
5547
  }
5548
5548
  function Un(e) {
5549
- return Rt(e) || Kp(e);
5549
+ return Zt(e) || Kp(e);
5550
5550
  }
5551
5551
  function Bn(e) {
5552
5552
  return e.type.split("-").slice(1).join("-");
@@ -5582,7 +5582,7 @@ function tm({
5582
5582
  await n(async ({ state: c, write: p }) => {
5583
5583
  var d, f, g, m;
5584
5584
  function h(b) {
5585
- const A = c.message.parts.filter(Rt).find(
5585
+ const A = c.message.parts.filter(Zt).find(
5586
5586
  (k) => k.toolCallId === b
5587
5587
  );
5588
5588
  if (A == null)
@@ -5606,7 +5606,7 @@ function tm({
5606
5606
  function I(b) {
5607
5607
  var z;
5608
5608
  const A = c.message.parts.find(
5609
- (ie) => Rt(ie) && ie.toolCallId === b.toolCallId
5609
+ (ie) => Zt(ie) && ie.toolCallId === b.toolCallId
5610
5610
  ), k = b, O = A;
5611
5611
  A != null ? (A.state = b.state, O.input = k.input, O.output = k.output, O.errorText = k.errorText, O.rawInput = k.rawInput, O.preliminary = k.preliminary, O.providerExecuted = (z = k.providerExecuted) != null ? z : A.providerExecuted, k.providerMetadata != null && A.state === "input-available" && (A.callProviderMetadata = k.providerMetadata)) : c.message.parts.push({
5612
5612
  type: `tool-${b.toolName}`,
@@ -5718,7 +5718,7 @@ function tm({
5718
5718
  break;
5719
5719
  }
5720
5720
  case "tool-input-start": {
5721
- const b = c.message.parts.filter(Rt);
5721
+ const b = c.message.parts.filter(Zt);
5722
5722
  c.partialToolCalls[s.toolCallId] = {
5723
5723
  text: "",
5724
5724
  toolName: s.toolName,
@@ -5914,11 +5914,11 @@ async function rm({
5914
5914
  r.releaseLock();
5915
5915
  }
5916
5916
  }
5917
- Et({
5917
+ Tt({
5918
5918
  prefix: "aitxt",
5919
5919
  size: 24
5920
5920
  });
5921
- Et({ prefix: "aiobj", size: 24 });
5921
+ Tt({ prefix: "aiobj", size: 24 });
5922
5922
  var nm = class {
5923
5923
  constructor() {
5924
5924
  this.queue = [], this.isProcessing = !1;
@@ -5942,7 +5942,7 @@ var nm = class {
5942
5942
  });
5943
5943
  }
5944
5944
  };
5945
- Et({ prefix: "aiobj", size: 24 });
5945
+ Tt({ prefix: "aiobj", size: 24 });
5946
5946
  var om = {};
5947
5947
  Up(om, {
5948
5948
  object: () => sm,
@@ -5986,7 +5986,7 @@ var am = () => ({
5986
5986
  }
5987
5987
  },
5988
5988
  async parseOutput({ text: r }, n) {
5989
- const o = await Yt({ text: r });
5989
+ const o = await Xt({ text: r });
5990
5990
  if (!o.success)
5991
5991
  throw new Ln({
5992
5992
  message: "No object generated: could not parse the response.",
@@ -6012,41 +6012,41 @@ var am = () => ({
6012
6012
  return a.value;
6013
6013
  }
6014
6014
  };
6015
- }, im = tt({
6015
+ }, im = rt({
6016
6016
  name: w(),
6017
6017
  version: w()
6018
- }), Hr = tt({
6018
+ }), Hr = rt({
6019
6019
  _meta: Q(C({}).loose())
6020
- }), _t = Hr, cm = C({
6020
+ }), bt = Hr, cm = C({
6021
6021
  method: w(),
6022
6022
  params: Q(Hr)
6023
- }), lm = tt({
6023
+ }), lm = rt({
6024
6024
  experimental: Q(C({}).loose()),
6025
6025
  logging: Q(C({}).loose()),
6026
6026
  prompts: Q(
6027
- tt({
6027
+ rt({
6028
6028
  listChanged: Q(X())
6029
6029
  })
6030
6030
  ),
6031
6031
  resources: Q(
6032
- tt({
6032
+ rt({
6033
6033
  subscribe: Q(X()),
6034
6034
  listChanged: Q(X())
6035
6035
  })
6036
6036
  ),
6037
6037
  tools: Q(
6038
- tt({
6038
+ rt({
6039
6039
  listChanged: Q(X())
6040
6040
  })
6041
6041
  )
6042
6042
  });
6043
- _t.extend({
6043
+ bt.extend({
6044
6044
  protocolVersion: w(),
6045
6045
  capabilities: lm,
6046
6046
  serverInfo: im,
6047
6047
  instructions: Q(w())
6048
6048
  });
6049
- var um = _t.extend({
6049
+ var um = bt.extend({
6050
6050
  nextCursor: Q(w())
6051
6051
  }), dm = C({
6052
6052
  name: w(),
@@ -6083,33 +6083,33 @@ var pm = C({
6083
6083
  type: T("resource"),
6084
6084
  resource: ee([hm, fm])
6085
6085
  }).loose();
6086
- _t.extend({
6086
+ bt.extend({
6087
6087
  content: Se(
6088
6088
  ee([pm, mm, gm])
6089
6089
  ),
6090
6090
  isError: X().default(!1).optional()
6091
6091
  }).or(
6092
- _t.extend({
6092
+ bt.extend({
6093
6093
  toolResult: H()
6094
6094
  })
6095
6095
  );
6096
- var nr = "2.0", vm = C({
6097
- jsonrpc: T(nr),
6098
- id: ee([w(), vt().int()])
6096
+ var or = "2.0", vm = C({
6097
+ jsonrpc: T(or),
6098
+ id: ee([w(), yt().int()])
6099
6099
  }).merge(cm).strict(), ym = C({
6100
- jsonrpc: T(nr),
6101
- id: ee([w(), vt().int()]),
6102
- result: _t
6100
+ jsonrpc: T(or),
6101
+ id: ee([w(), yt().int()]),
6102
+ result: bt
6103
6103
  }).strict(), _m = C({
6104
- jsonrpc: T(nr),
6105
- id: ee([w(), vt().int()]),
6104
+ jsonrpc: T(or),
6105
+ id: ee([w(), yt().int()]),
6106
6106
  error: C({
6107
- code: vt().int(),
6107
+ code: yt().int(),
6108
6108
  message: w(),
6109
6109
  data: Q(H())
6110
6110
  })
6111
6111
  }).strict(), bm = C({
6112
- jsonrpc: T(nr)
6112
+ jsonrpc: T(or)
6113
6113
  }).merge(
6114
6114
  C({
6115
6115
  method: w(),
@@ -6162,7 +6162,7 @@ var Im = class {
6162
6162
  ...t
6163
6163
  }) {
6164
6164
  var r, n, o, a, i;
6165
- const s = await qe(this.body), u = await qe(this.headers), c = await qe(this.credentials), p = await ((r = this.prepareSendMessagesRequest) == null ? void 0 : r.call(this, {
6165
+ const s = await Ye(this.body), u = await Ye(this.headers), c = await Ye(this.credentials), p = await ((r = this.prepareSendMessagesRequest) == null ? void 0 : r.call(this, {
6166
6166
  api: this.api,
6167
6167
  id: t.chatId,
6168
6168
  messages: t.messages,
@@ -6199,7 +6199,7 @@ var Im = class {
6199
6199
  }
6200
6200
  async reconnectToStream(e) {
6201
6201
  var t, r, n, o, a;
6202
- const i = await qe(this.body), s = await qe(this.headers), u = await qe(this.credentials), c = await ((t = this.prepareReconnectToStreamRequest) == null ? void 0 : t.call(this, {
6202
+ const i = await Ye(this.body), s = await Ye(this.headers), u = await Ye(this.credentials), c = await ((t = this.prepareReconnectToStreamRequest) == null ? void 0 : t.call(this, {
6203
6203
  api: this.api,
6204
6204
  id: e.chatId,
6205
6205
  body: { ...i, ...e.body },
@@ -6480,12 +6480,12 @@ var Im = class {
6480
6480
  }, Tm = C({
6481
6481
  type: T("text"),
6482
6482
  text: w(),
6483
- state: rr(["streaming", "done"]).optional(),
6483
+ state: nr(["streaming", "done"]).optional(),
6484
6484
  providerMetadata: R.optional()
6485
6485
  }), Sm = C({
6486
6486
  type: T("reasoning"),
6487
6487
  text: w(),
6488
- state: rr(["streaming", "done"]).optional(),
6488
+ state: nr(["streaming", "done"]).optional(),
6489
6489
  providerMetadata: R.optional()
6490
6490
  }), xm = C({
6491
6491
  type: T("source-url"),
@@ -6593,7 +6593,7 @@ var Im = class {
6593
6593
  ];
6594
6594
  C({
6595
6595
  id: w(),
6596
- role: rr(["system", "user", "assistant"]),
6596
+ role: nr(["system", "user", "assistant"]),
6597
6597
  metadata: H().optional(),
6598
6598
  parts: Se(
6599
6599
  ee([
@@ -6615,15 +6615,15 @@ for (let e = 0; e < 256; ++e)
6615
6615
  function Mm(e, t = 0) {
6616
6616
  return (oe[e[t + 0]] + oe[e[t + 1]] + oe[e[t + 2]] + oe[e[t + 3]] + "-" + oe[e[t + 4]] + oe[e[t + 5]] + "-" + oe[e[t + 6]] + oe[e[t + 7]] + "-" + oe[e[t + 8]] + oe[e[t + 9]] + "-" + oe[e[t + 10]] + oe[e[t + 11]] + oe[e[t + 12]] + oe[e[t + 13]] + oe[e[t + 14]] + oe[e[t + 15]]).toLowerCase();
6617
6617
  }
6618
- let fr;
6618
+ let gr;
6619
6619
  const $m = new Uint8Array(16);
6620
6620
  function Pm() {
6621
- if (!fr) {
6621
+ if (!gr) {
6622
6622
  if (typeof crypto > "u" || !crypto.getRandomValues)
6623
6623
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
6624
- fr = crypto.getRandomValues.bind(crypto);
6624
+ gr = crypto.getRandomValues.bind(crypto);
6625
6625
  }
6626
- return fr($m);
6626
+ return gr($m);
6627
6627
  }
6628
6628
  const Rm = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), jn = { randomUUID: Rm };
6629
6629
  function Re(e, t, r) {
@@ -6635,14 +6635,14 @@ function Re(e, t, r) {
6635
6635
  throw new Error("Random bytes length must be >= 16");
6636
6636
  return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Mm(n);
6637
6637
  }
6638
- let gr = null, vr = null;
6639
- const ka = async () => (gr || (gr = import(
6638
+ let vr = null, yr = null;
6639
+ const ka = async () => (vr || (vr = import(
6640
6640
  /* webpackChunkName: "toast-react-toastify" */
6641
6641
  "./index.BwP0kG4H.js"
6642
- )), gr), Ca = async () => (vr || (vr = import(
6642
+ )), vr), Ca = async () => (yr || (yr = import(
6643
6643
  /* webpackChunkName: "toast-utilities" */
6644
- "./index.Bt79QV0P.js"
6645
- ).then((e) => e.utilities)), vr), Zm = async () => {
6644
+ "./index.BK3MryNi.js"
6645
+ ).then((e) => e.utilities)), yr), Zm = async () => {
6646
6646
  try {
6647
6647
  await Promise.all([ka(), Ca()]);
6648
6648
  } catch {
@@ -6663,9 +6663,9 @@ const ka = async () => (gr || (gr = import(
6663
6663
  }, 100);
6664
6664
  } catch {
6665
6665
  }
6666
- }, Xt = (e, t) => Na(e, "success", t), Of = (e, t) => Na(e, "error", t), mt = "FOOTER_BOTTOM", Qt = "FOOTER_TOP", Zt = "APP_SET_FOOTER_POSITION", za = "APP_SET_FOOTER_HEIGHT", Dm = (e, t) => {
6666
+ }, Qt = (e, t) => Na(e, "success", t), Of = (e, t) => Na(e, "error", t), ht = "FOOTER_BOTTOM", Kt = "FOOTER_TOP", Dt = "APP_SET_FOOTER_POSITION", za = "APP_SET_FOOTER_HEIGHT", Dm = (e, t) => {
6667
6667
  switch (t.type) {
6668
- case Zt:
6668
+ case Dt:
6669
6669
  return {
6670
6670
  ...e,
6671
6671
  footerPosition: t.payload.footerPosition,
@@ -6679,19 +6679,19 @@ const ka = async () => (gr || (gr = import(
6679
6679
  default:
6680
6680
  return e;
6681
6681
  }
6682
- }, rt = "CHAT_SET_STATUS", Aa = "CHAT_SET_USAGE", at = "CHAT_SET_ATTACHMENTS", Oa = "CHAT_SET_PROVIDER", Fe = "CHAT_RESET", Lm = (e, t) => {
6682
+ }, nt = "CHAT_SET_STATUS", Aa = "CHAT_SET_USAGE", st = "CHAT_SET_ATTACHMENTS", Oa = "CHAT_SET_PROVIDER", He = "CHAT_RESET", Lm = (e, t) => {
6683
6683
  switch (t.type) {
6684
6684
  case Aa:
6685
6685
  return {
6686
6686
  ...e,
6687
6687
  tokenUsage: e.tokenUsage + t.payload.tokenUsage
6688
6688
  };
6689
- case at:
6689
+ case st:
6690
6690
  return {
6691
6691
  ...e,
6692
6692
  attachments: t.payload.attachments
6693
6693
  };
6694
- case rt: {
6694
+ case nt: {
6695
6695
  let r = !1, n = !1, o = !1, a = !1, i = "", s = 0, u = e.tokenUsage;
6696
6696
  return typeof t?.payload?.loading == "boolean" ? o = t.payload.loading : typeof e.loading == "boolean" && (o = e.loading), typeof t?.payload?.streaming == "boolean" ? n = t.payload.streaming : typeof e.streaming == "boolean" && (n = e.streaming), typeof t?.payload?.restoring == "boolean" ? (r = t.payload.restoring, i = t.payload.restoredModel || "", s = t.payload.restoredUsage || 0, r && (u = s)) : typeof e.restoring == "boolean" && (r = e.restoring, i = e.restoredModel || "", s = e.restoredUsage || 0), typeof t?.payload?.aborted == "boolean" ? a = t.payload.aborted : typeof e.aborted == "boolean" && (a = e.aborted), (n || o) && (r = !1, i = "", s = 0, a = !1), {
6697
6697
  ...e,
@@ -6712,7 +6712,7 @@ const ka = async () => (gr || (gr = import(
6712
6712
  ...e,
6713
6713
  provider: t.payload.provider
6714
6714
  };
6715
- case Fe: {
6715
+ case He: {
6716
6716
  let r = !1, n = !1;
6717
6717
  return typeof t?.payload?.privateChat == "boolean" ? r = t.payload.privateChat : typeof e.privateChat == "boolean" && (r = e.privateChat), typeof t?.payload?.reasoning == "boolean" ? n = t.payload.reasoning : typeof e.reasoning == "boolean" && (n = e.reasoning), {
6718
6718
  privateChat: r,
@@ -6740,7 +6740,7 @@ const ka = async () => (gr || (gr = import(
6740
6740
  sortDirection: e.sortDirection
6741
6741
  };
6742
6742
  case Xa: {
6743
- const r = t.payload.sortDirection, n = r === ot.ASC || r === ot.DESC ? r : ot.DESC;
6743
+ const r = t.payload.sortDirection, n = r === at.ASC || r === at.DESC ? r : at.DESC;
6744
6744
  return {
6745
6745
  searchString: e.searchString,
6746
6746
  sortedCell: t.payload.sortedCell,
@@ -6769,9 +6769,9 @@ const ka = async () => (gr || (gr = import(
6769
6769
  function jm(e) {
6770
6770
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6771
6771
  }
6772
- var yr, Vn;
6772
+ var _r, Vn;
6773
6773
  function Vm() {
6774
- if (Vn) return yr;
6774
+ if (Vn) return _r;
6775
6775
  Vn = 1;
6776
6776
  function e(t, r) {
6777
6777
  if (typeof t != "function")
@@ -6785,14 +6785,14 @@ function Vm() {
6785
6785
  }, c);
6786
6786
  };
6787
6787
  }
6788
- return yr = e, yr;
6788
+ return _r = e, _r;
6789
6789
  }
6790
6790
  var Fm = /* @__PURE__ */ Vm();
6791
6791
  const Hm = /* @__PURE__ */ jm(Fm);
6792
6792
  var Ma = (e, t, r) => {
6793
6793
  if (!t.has(e))
6794
6794
  throw TypeError("Cannot " + r);
6795
- }, F = (e, t, r) => (Ma(e, t, "read from private field"), r ? r.call(e) : t.get(e)), be = (e, t, r) => {
6795
+ }, F = (e, t, r) => (Ma(e, t, "read from private field"), r ? r.call(e) : t.get(e)), we = (e, t, r) => {
6796
6796
  if (t.has(e))
6797
6797
  throw TypeError("Cannot add the same private member more than once");
6798
6798
  t instanceof WeakSet ? t.add(e) : t.set(e, r);
@@ -6800,71 +6800,71 @@ var Ma = (e, t, r) => {
6800
6800
  function Jm(e, t) {
6801
6801
  return t != null ? Hm(e, t) : e;
6802
6802
  }
6803
- var me, Dt, Lt, lt, ut, dt, Ye, zr, Ar, Gm = class {
6803
+ var me, Lt, Ut, ut, dt, pt, Xe, zr, Ar, Gm = class {
6804
6804
  constructor(e = []) {
6805
- be(this, me, void 0), be(this, Dt, "ready"), be(this, Lt, void 0), be(this, lt, /* @__PURE__ */ new Set()), be(this, ut, /* @__PURE__ */ new Set()), be(this, dt, /* @__PURE__ */ new Set()), this.pushMessage = (t) => {
6806
- ze(this, me, F(this, me).concat(t)), F(this, Ye).call(this);
6805
+ we(this, me, void 0), we(this, Lt, "ready"), we(this, Ut, void 0), we(this, ut, /* @__PURE__ */ new Set()), we(this, dt, /* @__PURE__ */ new Set()), we(this, pt, /* @__PURE__ */ new Set()), this.pushMessage = (t) => {
6806
+ ze(this, me, F(this, me).concat(t)), F(this, Xe).call(this);
6807
6807
  }, this.popMessage = () => {
6808
- ze(this, me, F(this, me).slice(0, -1)), F(this, Ye).call(this);
6808
+ ze(this, me, F(this, me).slice(0, -1)), F(this, Xe).call(this);
6809
6809
  }, this.replaceMessage = (t, r) => {
6810
6810
  ze(this, me, [
6811
6811
  ...F(this, me).slice(0, t),
6812
6812
  // We deep clone the message here to ensure the new React Compiler (currently in RC) detects deeply nested parts/metadata changes:
6813
6813
  this.snapshot(r),
6814
6814
  ...F(this, me).slice(t + 1)
6815
- ]), F(this, Ye).call(this);
6815
+ ]), F(this, Xe).call(this);
6816
6816
  }, this.snapshot = (t) => structuredClone(t), this["~registerMessagesCallback"] = (t, r) => {
6817
6817
  const n = r ? Jm(t, r) : t;
6818
- return F(this, lt).add(n), () => {
6819
- F(this, lt).delete(n);
6818
+ return F(this, ut).add(n), () => {
6819
+ F(this, ut).delete(n);
6820
6820
  };
6821
- }, this["~registerStatusCallback"] = (t) => (F(this, ut).add(t), () => {
6822
- F(this, ut).delete(t);
6823
- }), this["~registerErrorCallback"] = (t) => (F(this, dt).add(t), () => {
6821
+ }, this["~registerStatusCallback"] = (t) => (F(this, dt).add(t), () => {
6824
6822
  F(this, dt).delete(t);
6825
- }), be(this, Ye, () => {
6826
- F(this, lt).forEach((t) => t());
6827
- }), be(this, zr, () => {
6823
+ }), this["~registerErrorCallback"] = (t) => (F(this, pt).add(t), () => {
6824
+ F(this, pt).delete(t);
6825
+ }), we(this, Xe, () => {
6828
6826
  F(this, ut).forEach((t) => t());
6829
- }), be(this, Ar, () => {
6827
+ }), we(this, zr, () => {
6830
6828
  F(this, dt).forEach((t) => t());
6829
+ }), we(this, Ar, () => {
6830
+ F(this, pt).forEach((t) => t());
6831
6831
  }), ze(this, me, e);
6832
6832
  }
6833
6833
  get status() {
6834
- return F(this, Dt);
6834
+ return F(this, Lt);
6835
6835
  }
6836
6836
  set status(e) {
6837
- ze(this, Dt, e), F(this, zr).call(this);
6837
+ ze(this, Lt, e), F(this, zr).call(this);
6838
6838
  }
6839
6839
  get error() {
6840
- return F(this, Lt);
6840
+ return F(this, Ut);
6841
6841
  }
6842
6842
  set error(e) {
6843
- ze(this, Lt, e), F(this, Ar).call(this);
6843
+ ze(this, Ut, e), F(this, Ar).call(this);
6844
6844
  }
6845
6845
  get messages() {
6846
6846
  return F(this, me);
6847
6847
  }
6848
6848
  set messages(e) {
6849
- ze(this, me, [...e]), F(this, Ye).call(this);
6849
+ ze(this, me, [...e]), F(this, Xe).call(this);
6850
6850
  }
6851
6851
  };
6852
6852
  me = /* @__PURE__ */ new WeakMap();
6853
- Dt = /* @__PURE__ */ new WeakMap();
6854
6853
  Lt = /* @__PURE__ */ new WeakMap();
6855
- lt = /* @__PURE__ */ new WeakMap();
6854
+ Ut = /* @__PURE__ */ new WeakMap();
6856
6855
  ut = /* @__PURE__ */ new WeakMap();
6857
6856
  dt = /* @__PURE__ */ new WeakMap();
6858
- Ye = /* @__PURE__ */ new WeakMap();
6857
+ pt = /* @__PURE__ */ new WeakMap();
6858
+ Xe = /* @__PURE__ */ new WeakMap();
6859
6859
  zr = /* @__PURE__ */ new WeakMap();
6860
6860
  Ar = /* @__PURE__ */ new WeakMap();
6861
- var Xe, Fn = class extends Em {
6861
+ var Qe, Fn = class extends Em {
6862
6862
  constructor({ messages: e, ...t }) {
6863
6863
  const r = new Gm(e);
6864
- super({ ...t, state: r }), be(this, Xe, void 0), this["~registerMessagesCallback"] = (n, o) => F(this, Xe)["~registerMessagesCallback"](n, o), this["~registerStatusCallback"] = (n) => F(this, Xe)["~registerStatusCallback"](n), this["~registerErrorCallback"] = (n) => F(this, Xe)["~registerErrorCallback"](n), ze(this, Xe, r);
6864
+ super({ ...t, state: r }), we(this, Qe, void 0), this["~registerMessagesCallback"] = (n, o) => F(this, Qe)["~registerMessagesCallback"](n, o), this["~registerStatusCallback"] = (n) => F(this, Qe)["~registerStatusCallback"](n), this["~registerErrorCallback"] = (n) => F(this, Qe)["~registerErrorCallback"](n), ze(this, Qe, r);
6865
6865
  }
6866
6866
  };
6867
- Xe = /* @__PURE__ */ new WeakMap();
6867
+ Qe = /* @__PURE__ */ new WeakMap();
6868
6868
  function Wm({
6869
6869
  experimental_throttle: e,
6870
6870
  resume: t = !1,
@@ -6879,15 +6879,15 @@ function Wm({
6879
6879
  // optionsId is required to trigger re-subscription when the chat ID changes
6880
6880
  // eslint-disable-next-line react-hooks/exhaustive-deps
6881
6881
  [e, a]
6882
- ), s = Pt(
6882
+ ), s = Rt(
6883
6883
  i,
6884
6884
  () => n.current.messages,
6885
6885
  () => n.current.messages
6886
- ), u = Pt(
6886
+ ), u = Rt(
6887
6887
  n.current["~registerStatusCallback"],
6888
6888
  () => n.current.status,
6889
6889
  () => n.current.status
6890
- ), c = Pt(
6890
+ ), c = Rt(
6891
6891
  n.current["~registerErrorCallback"],
6892
6892
  () => n.current.error,
6893
6893
  () => n.current.error
@@ -6919,7 +6919,7 @@ const Hn = () => ({
6919
6919
  onData: /* @__PURE__ */ new Set(),
6920
6920
  onToolCall: /* @__PURE__ */ new Set()
6921
6921
  }), $a = Ms(null);
6922
- function He(e = {}) {
6922
+ function Je(e = {}) {
6923
6923
  const t = te($a);
6924
6924
  if (!t)
6925
6925
  throw new Error("useAiChat must be used within a AiChatProvider");
@@ -6983,45 +6983,45 @@ function qm({
6983
6983
  }
6984
6984
  );
6985
6985
  }
6986
- let zt = !1, _r = null;
6986
+ let At = !1, br = null;
6987
6987
  const Jn = ({
6988
6988
  containerId: e,
6989
6989
  ...t
6990
6990
  }) => {
6991
- const [r, n] = P(zt);
6991
+ const [r, n] = P(At);
6992
6992
  return $(() => {
6993
- if (!zt) {
6993
+ if (!At) {
6994
6994
  const o = async () => {
6995
6995
  try {
6996
6996
  const { ToastContainer: i } = await import(
6997
6997
  /* webpackChunkName: "toast-react-toastify" */
6998
6998
  "./index.BwP0kG4H.js"
6999
6999
  );
7000
- _r = i, zt = !0, n(!0);
7000
+ br = i, At = !0, n(!0);
7001
7001
  } catch (i) {
7002
7002
  console.error("Failed to load ToastContainer:", i);
7003
7003
  }
7004
7004
  }, a = () => {
7005
- zt || o();
7005
+ At || o();
7006
7006
  };
7007
7007
  return window.addEventListener("toast-request", a), () => {
7008
7008
  window.removeEventListener("toast-request", a);
7009
7009
  };
7010
7010
  }
7011
- }, []), r && _r ? /* @__PURE__ */ l(_r, { containerId: e, ...t }) : null;
7012
- }, Ym = "z-20", Xm = "z-10", Gr = st.createContext({
7011
+ }, []), r && br ? /* @__PURE__ */ l(br, { containerId: e, ...t }) : null;
7012
+ }, Ym = "z-20", Xm = "z-10", Gr = it.createContext({
7013
7013
  state: {
7014
7014
  searchString: "",
7015
7015
  sortedCell: "",
7016
- sortDirection: ot.DESC
7016
+ sortDirection: at.DESC
7017
7017
  },
7018
7018
  dispatch: () => {
7019
7019
  }
7020
- }), Wr = st.createContext({
7020
+ }), Wr = it.createContext({
7021
7021
  state: { prompt: "", lastTriggeredTimestamp: 0 },
7022
7022
  dispatch: () => {
7023
7023
  }
7024
- }), _e = st.createContext({
7024
+ }), be = it.createContext({
7025
7025
  state: {
7026
7026
  provider: Ka,
7027
7027
  privateChat: !1,
@@ -7041,15 +7041,15 @@ const Jn = ({
7041
7041
  },
7042
7042
  setInitialMessages: () => {
7043
7043
  }
7044
- }), qr = st.createContext({
7044
+ }), qr = it.createContext({
7045
7045
  state: {
7046
- footerPosition: Qt,
7046
+ footerPosition: Kt,
7047
7047
  footerHeight: 0,
7048
7048
  footerOffset: 0
7049
7049
  },
7050
7050
  dispatch: () => {
7051
7051
  }
7052
- }), Qm = "av-tooltip", Km = "av-tooltip-arrow", At = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, eh = () => M("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"), Gn = ({
7052
+ }), Qm = "av-tooltip", Km = "av-tooltip-arrow", Ot = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, eh = () => M("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"), Gn = ({
7053
7053
  mode: e
7054
7054
  }) => M({
7055
7055
  "bg-surface-darker": e === "dark" || e === "system",
@@ -7123,8 +7123,8 @@ const Jn = ({
7123
7123
  ]
7124
7124
  });
7125
7125
  c?.current?.style && Object.assign(c.current.style, {
7126
- left: At(A),
7127
- top: At(k),
7126
+ left: Ot(A),
7127
+ top: Ot(k),
7128
7128
  ...I
7129
7129
  });
7130
7130
  const ke = {
@@ -7134,8 +7134,8 @@ const Jn = ({
7134
7134
  left: "right"
7135
7135
  }[ie.split("-")[0]];
7136
7136
  p?.current?.style && Object.assign(p.current.style, {
7137
- left: At(O.arrow?.x),
7138
- top: At(O.arrow?.y),
7137
+ left: Ot(O.arrow?.x),
7138
+ top: Ot(O.arrow?.y),
7139
7139
  right: "",
7140
7140
  bottom: "",
7141
7141
  [ke]: "-4px"
@@ -7202,7 +7202,7 @@ const sh = ({
7202
7202
  placement: "top",
7203
7203
  className: e,
7204
7204
  trigger: /* @__PURE__ */ l(
7205
- ve,
7205
+ ye,
7206
7206
  {
7207
7207
  mode: "dark",
7208
7208
  focusMode: "light",
@@ -7210,14 +7210,14 @@ const sh = ({
7210
7210
  onClick: t,
7211
7211
  noBorder: !0,
7212
7212
  noBackground: !0,
7213
- children: /* @__PURE__ */ l(ri, { size: Ie, monotone: !0 })
7213
+ children: /* @__PURE__ */ l(ri, { size: Ee, monotone: !0 })
7214
7214
  }
7215
7215
  )
7216
7216
  }
7217
7217
  );
7218
7218
  function Pa(e, t) {
7219
7219
  $(() => {
7220
- if (Bt() && typeof window < "u")
7220
+ if (jt() && typeof window < "u")
7221
7221
  return window.__VERSINI_DIGGIDY_TAURI_EVENTS__ && (window.__VERSINI_DIGGIDY_TAURI_EVENTS__[e] = t), () => {
7222
7222
  window.__VERSINI_DIGGIDY_TAURI_EVENTS__ && (window.__VERSINI_DIGGIDY_TAURI_EVENTS__[e] = null);
7223
7223
  };
@@ -7226,23 +7226,23 @@ function Pa(e, t) {
7226
7226
  const ih = ({
7227
7227
  className: e
7228
7228
  }) => {
7229
- const { getAccessToken: t, user: r } = ye(), {
7229
+ const { getAccessToken: t, user: r } = _e(), {
7230
7230
  state: { streaming: n, loading: o },
7231
7231
  dispatch: a,
7232
7232
  setChatId: i,
7233
7233
  setInitialMessages: s
7234
- } = te(_e), { id: u, setInput: c, stop: p } = He(), d = J(null), f = J(!1), { data: g, isSuccess: m } = Ze({
7234
+ } = te(be), { id: u, setInput: c, stop: p } = Je(), d = J(null), f = J(!1), { data: g, isSuccess: m } = Ze({
7235
7235
  user: r?.username,
7236
7236
  getAccessToken: t
7237
7237
  }), h = B(() => {
7238
7238
  i(Re()), s([]), c(""), a({
7239
- type: Fe,
7239
+ type: He,
7240
7240
  payload: {
7241
7241
  privateChat: !1,
7242
7242
  reasoning: !1
7243
7243
  }
7244
7244
  }), a({
7245
- type: at,
7245
+ type: st,
7246
7246
  payload: {
7247
7247
  attachments: 0
7248
7248
  }
@@ -7253,13 +7253,13 @@ const ih = ({
7253
7253
  [
7254
7254
  "mod+N",
7255
7255
  () => {
7256
- Bt() && h();
7256
+ jt() && h();
7257
7257
  }
7258
7258
  ],
7259
7259
  [
7260
7260
  "mod+T",
7261
7261
  () => {
7262
- Bt() && h();
7262
+ jt() && h();
7263
7263
  }
7264
7264
  ]
7265
7265
  ],
@@ -7272,7 +7272,7 @@ const ih = ({
7272
7272
  );
7273
7273
  const v = async (y) => {
7274
7274
  y.preventDefault(), p(), a({
7275
- type: rt,
7275
+ type: nt,
7276
7276
  payload: {
7277
7277
  aborted: !0,
7278
7278
  streaming: !1,
@@ -7305,7 +7305,7 @@ const ih = ({
7305
7305
  placement: "top-start",
7306
7306
  className: e,
7307
7307
  trigger: /* @__PURE__ */ l(
7308
- ve,
7308
+ ye,
7309
7309
  {
7310
7310
  noBorder: !0,
7311
7311
  noBackground: !0,
@@ -7315,12 +7315,12 @@ const ih = ({
7315
7315
  ref: d,
7316
7316
  onClick: n || o ? v : I,
7317
7317
  disabled: !(m && g),
7318
- children: n || o ? /* @__PURE__ */ l(ci, { size: Ie, monotone: !0 }) : /* @__PURE__ */ l(ui, { size: Ie })
7318
+ children: n || o ? /* @__PURE__ */ l(ci, { size: Ee, monotone: !0 }) : /* @__PURE__ */ l(ui, { size: Ee })
7319
7319
  }
7320
7320
  )
7321
7321
  }
7322
7322
  );
7323
- }, Kt = (e) => {
7323
+ }, er = (e) => {
7324
7324
  const { check: t } = es();
7325
7325
  return t(e);
7326
7326
  }, ch = "av-messagebox", lh = "av-panel", uh = ({
@@ -7432,7 +7432,7 @@ function ph({
7432
7432
  [c, p, v, d, a, s]
7433
7433
  );
7434
7434
  }
7435
- const or = () => {
7435
+ const ar = () => {
7436
7436
  const e = ae.useContext(Ra);
7437
7437
  if (e == null)
7438
7438
  throw new Error("Modal components must be wrapped in <Modal />");
@@ -7446,7 +7446,7 @@ function mh({
7446
7446
  return /* @__PURE__ */ l(Ra.Provider, { value: r, children: e });
7447
7447
  }
7448
7448
  const hh = ae.forwardRef(function(e, t) {
7449
- const { context: r, ...n } = or(), o = $r([n.refs.setFloating, t]);
7449
+ const { context: r, ...n } = ar(), o = $r([n.refs.setFloating, t]);
7450
7450
  if (!r.open)
7451
7451
  return null;
7452
7452
  const { overlayBackground: a, ...i } = e, s = M("grid place-items-center", {
@@ -7464,13 +7464,13 @@ const hh = ae.forwardRef(function(e, t) {
7464
7464
  }
7465
7465
  ) }) }) });
7466
7466
  }), fh = ae.forwardRef(function({ children: e, ...t }, r) {
7467
- const { setLabelId: n } = or(), o = co();
7467
+ const { setLabelId: n } = ar(), o = co();
7468
7468
  return ae.useLayoutEffect(() => (n(o), () => n(void 0)), [o, n]), /* @__PURE__ */ l("h1", { ...t, ref: r, id: o, children: e });
7469
7469
  }), gh = ae.forwardRef(function({ children: e, ...t }, r) {
7470
- const { setDescriptionId: n } = or(), o = co();
7470
+ const { setDescriptionId: n } = ar(), o = co();
7471
7471
  return ae.useLayoutEffect(() => (n(o), () => n(void 0)), [o, n]), /* @__PURE__ */ l("div", { ...t, ref: r, id: o, children: e });
7472
7472
  }), vh = ae.forwardRef(function(e, t) {
7473
- const { setOpen: r } = or(), { trigger: n, className: o, ...a } = e, i = ae.useCallback(() => r(!1), [r]);
7473
+ const { setOpen: r } = ar(), { trigger: n, className: o, ...a } = e, i = ae.useCallback(() => r(!1), [r]);
7474
7474
  return /* @__PURE__ */ l("div", { className: o, children: ae.cloneElement(n, {
7475
7475
  ref: t,
7476
7476
  onClick: i,
@@ -7490,7 +7490,7 @@ try {
7490
7490
  });
7491
7491
  } catch {
7492
7492
  }
7493
- const ge = "panel", Ue = "messagebox", yh = ({
7493
+ const ve = "panel", Ue = "messagebox", yh = ({
7494
7494
  className: e,
7495
7495
  kind: t,
7496
7496
  borderMode: r,
@@ -7498,22 +7498,22 @@ const ge = "panel", Ue = "messagebox", yh = ({
7498
7498
  maxWidth: o = "medium",
7499
7499
  maxHeight: a
7500
7500
  }) => {
7501
- const i = a ?? (t === ge ? "large" : void 0);
7501
+ const i = a ?? (t === ve ? "large" : void 0);
7502
7502
  return {
7503
7503
  main: M("prose prose-lighter flex flex-col bg-surface-dark", {
7504
7504
  "duration-200 ease-out": n,
7505
7505
  /**
7506
7506
  * Panel styles
7507
7507
  */
7508
- [`${lh} min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === ge,
7509
- "w-full sm:w-[95%] md:max-w-2xl": t === ge && !e && o === "small",
7510
- "w-full sm:w-[95%] md:max-w-3xl": t === ge && !e && o === "medium",
7511
- "w-full sm:w-[95%] md:max-w-4xl": t === ge && !e && o === "large",
7512
- "max-h-full sm:max-h-[40%]": t === ge && i === "small",
7513
- "max-h-full sm:max-h-[60%]": t === ge && i === "medium",
7514
- "max-h-full sm:max-h-[95%]": t === ge && i === "large",
7515
- "sm:border-border-dark": r === "dark" && t === ge,
7516
- "sm:border-border-accent": r === "light" && t === ge,
7508
+ [`${lh} min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === ve,
7509
+ "w-full sm:w-[95%] md:max-w-2xl": t === ve && !e && o === "small",
7510
+ "w-full sm:w-[95%] md:max-w-3xl": t === ve && !e && o === "medium",
7511
+ "w-full sm:w-[95%] md:max-w-4xl": t === ve && !e && o === "large",
7512
+ "max-h-full sm:max-h-[40%]": t === ve && i === "small",
7513
+ "max-h-full sm:max-h-[60%]": t === ve && i === "medium",
7514
+ "max-h-full sm:max-h-[95%]": t === ve && i === "large",
7515
+ "sm:border-border-dark": r === "dark" && t === ve,
7516
+ "sm:border-border-accent": r === "light" && t === ve,
7517
7517
  /**
7518
7518
  * Messagebox styles
7519
7519
  */
@@ -7538,7 +7538,7 @@ const ge = "panel", Ue = "messagebox", yh = ({
7538
7538
  children: n,
7539
7539
  footer: o,
7540
7540
  borderMode: a = "light",
7541
- kind: i = ge,
7541
+ kind: i = ve,
7542
7542
  className: s,
7543
7543
  animation: u = !1,
7544
7544
  animationType: c = _h,
@@ -7582,7 +7582,7 @@ const ge = "panel", Ue = "messagebox", yh = ({
7582
7582
  {
7583
7583
  className: h.close,
7584
7584
  trigger: /* @__PURE__ */ l(
7585
- ve,
7585
+ ye,
7586
7586
  {
7587
7587
  mode: "dark",
7588
7588
  focusMode: "light",
@@ -7752,7 +7752,7 @@ try {
7752
7752
  });
7753
7753
  } catch {
7754
7754
  }
7755
- const je = ({
7755
+ const Ve = ({
7756
7756
  showConfirmation: e,
7757
7757
  setShowConfirmation: t,
7758
7758
  action: r,
@@ -7770,7 +7770,7 @@ const je = ({
7770
7770
  onToggleChange: p
7771
7771
  }) => {
7772
7772
  const d = /* @__PURE__ */ x(wr, { columnGap: 2, alignHorizontal: "flex-end", children: [
7773
- /* @__PURE__ */ l(Qe, { children: !a && /* @__PURE__ */ l(
7773
+ /* @__PURE__ */ l(Ke, { children: !a && /* @__PURE__ */ l(
7774
7774
  Kr,
7775
7775
  {
7776
7776
  noBorder: !0,
@@ -7783,7 +7783,7 @@ const je = ({
7783
7783
  children: o.cancelAction
7784
7784
  }
7785
7785
  ) }),
7786
- /* @__PURE__ */ l(Qe, { children: /* @__PURE__ */ l(
7786
+ /* @__PURE__ */ l(Ke, { children: /* @__PURE__ */ l(
7787
7787
  Kr,
7788
7788
  {
7789
7789
  noBorder: !0,
@@ -7803,7 +7803,7 @@ const je = ({
7803
7803
  alignVertical: "center",
7804
7804
  columnGap: 2,
7805
7805
  children: [
7806
- /* @__PURE__ */ l(Qe, { span: "auto", children: /* @__PURE__ */ l(
7806
+ /* @__PURE__ */ l(Ke, { span: "auto", children: /* @__PURE__ */ l(
7807
7807
  zh,
7808
7808
  {
7809
7809
  narrow: !0,
@@ -7818,7 +7818,7 @@ const je = ({
7818
7818
  }
7819
7819
  }
7820
7820
  ) }),
7821
- /* @__PURE__ */ l(Qe, { span: "auto", children: d })
7821
+ /* @__PURE__ */ l(Ke, { span: "auto", children: d })
7822
7822
  ]
7823
7823
  }
7824
7824
  ) : d;
@@ -7836,25 +7836,25 @@ const je = ({
7836
7836
  }, Ah = ({
7837
7837
  className: e
7838
7838
  }) => {
7839
- const { getAccessToken: t, user: r } = ye(), {
7839
+ const { getAccessToken: t, user: r } = _e(), {
7840
7840
  state: { privateChat: n, tokenUsage: o },
7841
7841
  dispatch: a,
7842
7842
  setChatId: i,
7843
7843
  setInitialMessages: s
7844
- } = te(_e), [u, c] = P(!1), [p, d] = P(!1), [f, g] = P(!1), [m, h] = et({
7845
- key: Ke + ts,
7844
+ } = te(be), [u, c] = P(!1), [p, d] = P(!1), [f, g] = P(!1), [m, h] = tt({
7845
+ key: et + ts,
7846
7846
  initialValue: ""
7847
- }), v = Kt(jt.TOOL.MEMORIES), { data: I, isSuccess: y } = Ze({
7847
+ }), v = er(Vt.TOOL.MEMORIES), { data: I, isSuccess: y } = Ze({
7848
7848
  user: r?.username,
7849
7849
  getAccessToken: t
7850
7850
  }), E = (z) => {
7851
7851
  i(Re()), s([]), a({
7852
- type: Fe,
7852
+ type: He,
7853
7853
  payload: {
7854
7854
  privateChat: !n
7855
7855
  }
7856
7856
  }), z && a({
7857
- type: at,
7857
+ type: st,
7858
7858
  payload: {
7859
7859
  attachments: 0
7860
7860
  }
@@ -7862,7 +7862,7 @@ const je = ({
7862
7862
  };
7863
7863
  return /* @__PURE__ */ x(Oe, { children: [
7864
7864
  f && /* @__PURE__ */ x(
7865
- je,
7865
+ Ve,
7866
7866
  {
7867
7867
  showConfirmation: f,
7868
7868
  setShowConfirmation: g,
@@ -7879,7 +7879,7 @@ const je = ({
7879
7879
  }
7880
7880
  ),
7881
7881
  p && /* @__PURE__ */ l(
7882
- je,
7882
+ Ve,
7883
7883
  {
7884
7884
  toggleLabel: "Don't show this again",
7885
7885
  toggleName: "private-disclosure",
@@ -7912,7 +7912,7 @@ const je = ({
7912
7912
  placement: "top",
7913
7913
  className: e,
7914
7914
  trigger: /* @__PURE__ */ l(
7915
- ve,
7915
+ ye,
7916
7916
  {
7917
7917
  noBorder: !0,
7918
7918
  noBackground: !n,
@@ -7927,7 +7927,7 @@ const je = ({
7927
7927
  },
7928
7928
  className: "text-sm",
7929
7929
  disabled: !(y && I) || n && o > 0,
7930
- children: n ? /* @__PURE__ */ l(gi, { size: Ie }) : /* @__PURE__ */ l(Si, { size: Ie })
7930
+ children: n ? /* @__PURE__ */ l(gi, { size: Ee }) : /* @__PURE__ */ l(Si, { size: Ee })
7931
7931
  }
7932
7932
  )
7933
7933
  }
@@ -7978,7 +7978,7 @@ const je = ({
7978
7978
  event: "mousedown",
7979
7979
  toggle: !0,
7980
7980
  ignoreMouse: !1
7981
- }), ie = _o(k, { role: "menu" }), ke = yo(k, { bubbles: !0 }), Je = Bs(k, {
7981
+ }), ie = _o(k, { role: "menu" }), ke = yo(k, { bubbles: !0 }), Ge = Bs(k, {
7982
7982
  listRef: h,
7983
7983
  activeIndex: g,
7984
7984
  nested: !1,
@@ -7988,19 +7988,19 @@ const je = ({
7988
7988
  listRef: v,
7989
7989
  onMatch: c ? m : void 0,
7990
7990
  activeIndex: g
7991
- }), { getReferenceProps: Ge, getFloatingProps: de, getItemProps: Ce } = bo([O, ie, ke, Je, U]), We = qn(e) === "Button" || qn(e) === "ButtonIcon", sr = We ? {
7992
- noInternalClick: We,
7991
+ }), { getReferenceProps: We, getFloatingProps: de, getItemProps: Ce } = bo([O, ie, ke, Ge, U]), qe = qn(e) === "Button" || qn(e) === "ButtonIcon", ir = qe ? {
7992
+ noInternalClick: qe,
7993
7993
  focusMode: i,
7994
7994
  mode: a
7995
- } : {}, Tt = st.cloneElement(
7995
+ } : {}, St = it.cloneElement(
7996
7996
  e,
7997
7997
  {
7998
- ...sr,
7998
+ ...ir,
7999
7999
  "aria-label": r,
8000
8000
  "data-open": c ? "" : void 0,
8001
8001
  "data-focus-inside": d ? "" : void 0,
8002
8002
  ref: $r([A.setReference, b.ref, u]),
8003
- ...Ge(
8003
+ ...We(
8004
8004
  I.getItemProps({
8005
8005
  ...s
8006
8006
  })
@@ -8019,7 +8019,7 @@ const je = ({
8019
8019
  }, [y, o]), $(() => {
8020
8020
  c && y && y.events.emit("menuopen", { nodeId: E });
8021
8021
  }, [y, c, E]), /* @__PURE__ */ x(Vs, { id: E, children: [
8022
- Tt,
8022
+ St,
8023
8023
  /* @__PURE__ */ l(
8024
8024
  Or.Provider,
8025
8025
  {
@@ -8053,8 +8053,8 @@ const je = ({
8053
8053
  )
8054
8054
  ] });
8055
8055
  }
8056
- ), ar = lo((e, t) => /* @__PURE__ */ l(Ds, { children: /* @__PURE__ */ l(Za, { ...e, ref: t }) }));
8057
- ar.displayName = "Menu";
8056
+ ), sr = lo((e, t) => /* @__PURE__ */ l(Ds, { children: /* @__PURE__ */ l(Za, { ...e, ref: t }) }));
8057
+ sr.displayName = "Menu";
8058
8058
  Za.displayName = "MenuComponent";
8059
8059
  const Oh = ({
8060
8060
  children: e,
@@ -8139,7 +8139,7 @@ try {
8139
8139
  });
8140
8140
  } catch {
8141
8141
  }
8142
- const we = ae.forwardRef(
8142
+ const Ie = ae.forwardRef(
8143
8143
  ({
8144
8144
  label: e,
8145
8145
  disabled: t,
@@ -8199,7 +8199,7 @@ const we = ae.forwardRef(
8199
8199
  );
8200
8200
  }
8201
8201
  );
8202
- we.displayName = "MenuItem";
8202
+ Ie.displayName = "MenuItem";
8203
8203
  const $h = ({ className: e, ...t }) => {
8204
8204
  const r = M(e, "my-1 border-t border-border-medium");
8205
8205
  return /* @__PURE__ */ l("div", { className: r, ...t });
@@ -8235,12 +8235,12 @@ const Ph = (e) => {
8235
8235
  className: e,
8236
8236
  defaultPlacement: t = "top-start"
8237
8237
  }) => {
8238
- const { dispatch: r, setChatId: n, setInitialMessages: o } = te(_e), { dispatch: a } = te(Wr), { getAccessToken: i, user: s } = ye(), { data: u, isSuccess: c } = Ze({
8238
+ const { dispatch: r, setChatId: n, setInitialMessages: o } = te(be), { dispatch: a } = te(Wr), { getAccessToken: i, user: s } = _e(), { data: u, isSuccess: c } = Ze({
8239
8239
  user: s?.username,
8240
8240
  getAccessToken: i
8241
8241
  }), p = (g, m, h) => {
8242
8242
  g.preventDefault(), n(Re()), o([]), r({
8243
- type: Fe,
8243
+ type: He,
8244
8244
  payload: {
8245
8245
  privateChat: h
8246
8246
  }
@@ -8251,18 +8251,18 @@ const Ph = (e) => {
8251
8251
  }
8252
8252
  });
8253
8253
  }, d = c && u && u.tags && Ph(u.tags), f = /* @__PURE__ */ x(
8254
- ar,
8254
+ sr,
8255
8255
  {
8256
8256
  mode: "dark",
8257
8257
  focusMode: "light",
8258
8258
  trigger: /* @__PURE__ */ l(
8259
- ve,
8259
+ ye,
8260
8260
  {
8261
8261
  noBorder: !0,
8262
8262
  noBackground: !0,
8263
8263
  label: "Prompts",
8264
8264
  disabled: !d,
8265
- children: /* @__PURE__ */ l(ai, { size: Ie })
8265
+ children: /* @__PURE__ */ l(ai, { size: Ee })
8266
8266
  }
8267
8267
  ),
8268
8268
  defaultPlacement: t,
@@ -8285,7 +8285,7 @@ const Ph = (e) => {
8285
8285
  break;
8286
8286
  }
8287
8287
  return g.enabled && g.label && g.content && /* @__PURE__ */ l(
8288
- we,
8288
+ Ie,
8289
8289
  {
8290
8290
  label: g.label,
8291
8291
  icon: m,
@@ -8314,17 +8314,17 @@ const Ph = (e) => {
8314
8314
  dispatch: n,
8315
8315
  setChatId: o,
8316
8316
  setInitialMessages: a
8317
- } = te(_e), [i, s] = P(!1), [u, c] = P(!1), [p, d] = et({
8318
- key: Ke + rs,
8317
+ } = te(be), [i, s] = P(!1), [u, c] = P(!1), [p, d] = tt({
8318
+ key: et + rs,
8319
8319
  initialValue: ""
8320
8320
  }), [f, g] = P(!1), m = (v) => {
8321
8321
  o(Re()), a([]), n({
8322
- type: Fe,
8322
+ type: He,
8323
8323
  payload: {
8324
8324
  reasoning: !t
8325
8325
  }
8326
8326
  }), v && n({
8327
- type: at,
8327
+ type: st,
8328
8328
  payload: {
8329
8329
  attachments: 0
8330
8330
  }
@@ -8332,7 +8332,7 @@ const Ph = (e) => {
8332
8332
  };
8333
8333
  return /* @__PURE__ */ x(Oe, { children: [
8334
8334
  u && /* @__PURE__ */ l(
8335
- je,
8335
+ Ve,
8336
8336
  {
8337
8337
  showConfirmation: u,
8338
8338
  setShowConfirmation: c,
@@ -8346,7 +8346,7 @@ const Ph = (e) => {
8346
8346
  }
8347
8347
  ),
8348
8348
  i && /* @__PURE__ */ l(
8349
- je,
8349
+ Ve,
8350
8350
  {
8351
8351
  toggleLabel: "Don't show this again",
8352
8352
  toggleName: "reasoning-disclosure",
@@ -8377,7 +8377,7 @@ const Ph = (e) => {
8377
8377
  placement: "top",
8378
8378
  className: e,
8379
8379
  trigger: /* @__PURE__ */ l(
8380
- ve,
8380
+ ye,
8381
8381
  {
8382
8382
  noBorder: !0,
8383
8383
  animated: !0,
@@ -8390,7 +8390,7 @@ const Ph = (e) => {
8390
8390
  v && v.preventDefault(), p ? r > 0 ? c(!u) : m() : s(!i);
8391
8391
  },
8392
8392
  className: "text-sm",
8393
- children: /* @__PURE__ */ l(fi, { size: Ie })
8393
+ children: /* @__PURE__ */ l(fi, { size: Ee })
8394
8394
  }
8395
8395
  )
8396
8396
  }
@@ -8399,10 +8399,10 @@ const Ph = (e) => {
8399
8399
  }, Dh = ({
8400
8400
  className: e
8401
8401
  }) => {
8402
- const { user: t, getAccessToken: r } = ye(), {
8402
+ const { user: t, getAccessToken: r } = _e(), {
8403
8403
  dispatch: n,
8404
8404
  state: { tokenUsage: o, provider: a, privateChat: i }
8405
- } = te(_e), { messages: s, id: u } = He(), { state: c } = te(Gr), { refetch: p } = no({
8405
+ } = te(be), { messages: s, id: u } = Je(), { state: c } = te(Gr), { refetch: p } = no({
8406
8406
  enabled: !1,
8407
8407
  user: t?.username || "",
8408
8408
  searchString: c.searchString,
@@ -8431,12 +8431,12 @@ const Ph = (e) => {
8431
8431
  tokenUsage: o
8432
8432
  }
8433
8433
  }), n({
8434
- type: Fe,
8434
+ type: He,
8435
8435
  payload: {
8436
8436
  privateChat: !1,
8437
8437
  preserveTokenUsage: !0
8438
8438
  }
8439
- }), p(), await Xt(as, {
8439
+ }), p(), await Qt(as, {
8440
8440
  containerId: "toggle-save"
8441
8441
  });
8442
8442
  }
@@ -8449,7 +8449,7 @@ const Ph = (e) => {
8449
8449
  i && s?.length > 0 ? f(!0) : f(!1);
8450
8450
  }, [i, s]), /* @__PURE__ */ x(Oe, { children: [
8451
8451
  g && /* @__PURE__ */ l(
8452
- je,
8452
+ Ve,
8453
8453
  {
8454
8454
  showConfirmation: g,
8455
8455
  setShowConfirmation: m,
@@ -8470,7 +8470,7 @@ const Ph = (e) => {
8470
8470
  placement: "top",
8471
8471
  className: e,
8472
8472
  trigger: /* @__PURE__ */ l(
8473
- ve,
8473
+ ye,
8474
8474
  {
8475
8475
  noBorder: !0,
8476
8476
  noBackground: !0,
@@ -8478,7 +8478,7 @@ const Ph = (e) => {
8478
8478
  focusMode: "light",
8479
8479
  label: "Save Private Chat",
8480
8480
  onClick: v,
8481
- children: /* @__PURE__ */ l(li, { size: Ie, monotone: !0 })
8481
+ children: /* @__PURE__ */ l(li, { size: Ee, monotone: !0 })
8482
8482
  }
8483
8483
  )
8484
8484
  }
@@ -8487,9 +8487,9 @@ const Ph = (e) => {
8487
8487
  }, Lh = ({
8488
8488
  className: e
8489
8489
  }) => {
8490
- const { getAccessToken: t, user: r } = ye(), {
8490
+ const { getAccessToken: t, user: r } = _e(), {
8491
8491
  state: { loading: n, streaming: o }
8492
- } = te(_e), { data: a, isSuccess: i } = Ze({
8492
+ } = te(be), { data: a, isSuccess: i } = Ze({
8493
8493
  user: r?.username,
8494
8494
  getAccessToken: t
8495
8495
  });
@@ -8501,7 +8501,7 @@ const Ph = (e) => {
8501
8501
  placement: "top-end",
8502
8502
  className: e,
8503
8503
  trigger: /* @__PURE__ */ l(
8504
- ve,
8504
+ ye,
8505
8505
  {
8506
8506
  iconClassName: "text-copy-lighter pr-0.5",
8507
8507
  disabled: !(i && a) || n || o,
@@ -8510,7 +8510,7 @@ const Ph = (e) => {
8510
8510
  type: "submit",
8511
8511
  mode: "dark",
8512
8512
  focusMode: "light",
8513
- children: /* @__PURE__ */ l(Ii, { size: Ie })
8513
+ children: /* @__PURE__ */ l(Ii, { size: Ee })
8514
8514
  }
8515
8515
  )
8516
8516
  }
@@ -8529,7 +8529,7 @@ const Ph = (e) => {
8529
8529
  ".html",
8530
8530
  ".json",
8531
8531
  ".md"
8532
- ], br = [
8532
+ ], Be = [
8533
8533
  ...Uh,
8534
8534
  ...Bh
8535
8535
  ], Mr = 400 * 1024, jh = "text/plain", Vh = () => M(
@@ -8561,7 +8561,7 @@ const Ph = (e) => {
8561
8561
  wrapper: t,
8562
8562
  textArea: r
8563
8563
  };
8564
- }, Ut = (e) => {
8564
+ }, Bt = (e) => {
8565
8565
  if (e === 0)
8566
8566
  return "0 Bytes";
8567
8567
  const t = 1024, r = ["Bytes", "KB", "MB", "GB"], n = Math.floor(Math.log(e) / Math.log(t));
@@ -8586,11 +8586,11 @@ const Ph = (e) => {
8586
8586
  /* @__PURE__ */ l("span", { className: "max-w-[150px] truncate", children: r.name }),
8587
8587
  /* @__PURE__ */ x("span", { className: "mx-1 text-gray-400", children: [
8588
8588
  "(",
8589
- Ut(r.size),
8589
+ Bt(r.size),
8590
8590
  ")"
8591
8591
  ] }),
8592
8592
  /* @__PURE__ */ l(
8593
- ve,
8593
+ ye,
8594
8594
  {
8595
8595
  mode: "dark",
8596
8596
  focusMode: "light",
@@ -8608,15 +8608,15 @@ const Ph = (e) => {
8608
8608
  )) }),
8609
8609
  /* @__PURE__ */ x("div", { className: "text-xs text-gray-400 mt-1 pl-1", children: [
8610
8610
  "Total: ",
8611
- Ut(La(Array.from(e))),
8611
+ Bt(La(Array.from(e))),
8612
8612
  " /",
8613
8613
  " ",
8614
- Ut(Mr)
8614
+ Bt(Mr)
8615
8615
  ] })
8616
- ] }), Ua = 24, Yh = 500, Ba = 2, Xh = 5, Qh = Ua * Ba, Xn = Xh * Ua, Kh = "ready", ef = "streaming", tf = "error", rf = "submitted", Ot = (e) => {
8616
+ ] }), Ua = 24, Yh = 500, Ba = 2, Xh = 5, Qh = Ua * Ba, Xn = Xh * Ua, Kh = "ready", ef = "streaming", tf = "error", rf = "submitted", Mt = (e) => {
8617
8617
  e.current && (e.current.style.height = `${Qh}px`);
8618
8618
  }, nf = () => {
8619
- const { user: e, getAccessToken: t } = ye(), r = Kt(jt.ADDON.ATTACHMENTS), n = Kt(jt.ADDON.REASONING), [o, a] = P(null), [i, s] = P(!1), [u, c] = P(!1), {
8619
+ const { user: e, getAccessToken: t } = _e(), r = er(Vt.ADDON.ATTACHMENTS), n = er(Vt.ADDON.REASONING), [o, a] = P(null), [i, s] = P(!1), [u, c] = P(!1), {
8620
8620
  dispatch: p,
8621
8621
  state: {
8622
8622
  reasoning: d,
@@ -8627,7 +8627,7 @@ const Ph = (e) => {
8627
8627
  provider: v,
8628
8628
  privateChat: I
8629
8629
  }
8630
- } = te(_e), { state: y, dispatch: E } = te(Wr), { state: b } = te(Gr), { refetch: z } = no({
8630
+ } = te(be), { state: y, dispatch: E } = te(Wr), { state: b } = te(Gr), { refetch: z } = no({
8631
8631
  enabled: !1,
8632
8632
  user: e?.username || "",
8633
8633
  searchString: b.searchString,
@@ -8637,9 +8637,9 @@ const Ph = (e) => {
8637
8637
  }), { data: A } = Ze({
8638
8638
  user: e?.username,
8639
8639
  getAccessToken: t
8640
- }), k = J(null), O = J(null), ie = J(!1), ke = J(0), Je = J(null), U = J(null), Ge = cs(), de = Gh({
8640
+ }), k = J(null), O = J(null), ie = J(!1), ke = J(0), Ge = J(null), U = J(null), We = cs(), de = Gh({
8641
8641
  className: ""
8642
- }), { setMessages: Ce, status: We, id: sr, sendMessage: Tt, input: ce, setInput: De } = He({
8642
+ }), { setMessages: Ce, status: qe, id: ir, sendMessage: St, input: ce, setInput: De } = Je({
8643
8643
  onFinish: (D) => {
8644
8644
  z();
8645
8645
  const ne = D.message?.metadata;
@@ -8667,7 +8667,7 @@ const Ph = (e) => {
8667
8667
  privateChat: I,
8668
8668
  ...re?.body
8669
8669
  };
8670
- Tt(
8670
+ St(
8671
8671
  {
8672
8672
  text: ce,
8673
8673
  ...re?.experimental_attachments && {
@@ -8681,30 +8681,30 @@ const Ph = (e) => {
8681
8681
  ), De("");
8682
8682
  }
8683
8683
  },
8684
- [ce, Tt, De, v, I]
8684
+ [ce, St, De, v, I]
8685
8685
  ), Xr = B(
8686
8686
  async (D) => {
8687
8687
  D === Kh && p({
8688
- type: rt,
8688
+ type: nt,
8689
8689
  payload: {
8690
8690
  loading: !1,
8691
8691
  streaming: !1
8692
8692
  }
8693
8693
  }), D === rf && p({
8694
- type: rt,
8694
+ type: nt,
8695
8695
  payload: {
8696
8696
  loading: !0,
8697
8697
  streaming: !1
8698
8698
  }
8699
8699
  }), D === ef && p({
8700
- type: rt,
8700
+ type: nt,
8701
8701
  payload: {
8702
8702
  loading: !1,
8703
8703
  streaming: !0
8704
8704
  }
8705
8705
  }), D === tf && setTimeout(() => {
8706
8706
  g || (p({
8707
- type: rt,
8707
+ type: nt,
8708
8708
  payload: {
8709
8709
  loading: !1,
8710
8710
  streaming: !1
@@ -8713,7 +8713,7 @@ const Ph = (e) => {
8713
8713
  ...re,
8714
8714
  {
8715
8715
  id: Re(),
8716
- role: ht,
8716
+ role: ft,
8717
8717
  parts: [{ type: "text", text: ls }]
8718
8718
  }
8719
8719
  ]));
@@ -8722,11 +8722,11 @@ const Ph = (e) => {
8722
8722
  [p, Ce, g]
8723
8723
  );
8724
8724
  $(() => {
8725
- We && Xr(We);
8726
- }, [We, Xr]), $(() => {
8725
+ qe && Xr(qe);
8726
+ }, [qe, Xr]), $(() => {
8727
8727
  A?.sendOnEnter !== void 0 && c(A.sendOnEnter);
8728
8728
  }, [A]);
8729
- const ir = B(() => {
8729
+ const cr = B(() => {
8730
8730
  if (!U.current)
8731
8731
  return;
8732
8732
  U.current.style.height = "auto";
@@ -8740,30 +8740,29 @@ const Ph = (e) => {
8740
8740
  if (D.preventDefault(), D.target.files && D.target.files.length > 0) {
8741
8741
  const re = o ? Array.from(o) : [], ne = Array.from(D.target.files), Ne = [...re];
8742
8742
  let Le = !1;
8743
- for (const Ee of ne) {
8744
- const cr = "." + Ee.name.split(".").pop()?.toLowerCase();
8745
- br.includes(cr) ? Ne.some(
8746
- (lr) => lr.name === Ee.name && lr.size === Ee.size && lr.lastModified === Ee.lastModified
8747
- ) || Ne.push(Ee) : Le = !0;
8743
+ for (const he of ne) {
8744
+ const lr = "." + he.name.split(".").pop()?.toLowerCase();
8745
+ Be.includes(lr) ? Ne.some(
8746
+ (ur) => ur.name === he.name && ur.size === he.size && ur.lastModified === he.lastModified
8747
+ ) || Ne.push(he) : Le = !0;
8748
8748
  }
8749
8749
  if (O.current && (O.current.value = ""), La(Ne) > Mr) {
8750
- k.current = `Total file size exceeds the limit of ${Ut(
8750
+ k.current = `Total file size exceeds the limit of ${Bt(
8751
8751
  Mr
8752
8752
  )}.`, s(!0);
8753
8753
  return;
8754
8754
  }
8755
8755
  if (Le) {
8756
- k.current = `Only ${br.join(
8757
- ", "
8758
- )} files are allowed.`, s(!0);
8756
+ const he = Be.length > 1 ? `${Be.slice(0, -1).join(", ")} and ${Be[Be.length - 1]}` : Be[0];
8757
+ k.current = `Only ${he} files are allowed.`, s(!0);
8759
8758
  return;
8760
8759
  }
8761
8760
  if (Ne.length > 0) {
8762
- const Ee = new DataTransfer();
8763
- Ne.forEach((cr) => Ee.items.add(cr)), a(Ee.files), p({
8764
- type: at,
8761
+ const he = new DataTransfer();
8762
+ Ne.forEach((lr) => he.items.add(lr)), a(he.files), p({
8763
+ type: st,
8765
8764
  payload: {
8766
- attachments: Ee.files.length
8765
+ attachments: he.files.length
8767
8766
  }
8768
8767
  });
8769
8768
  }
@@ -8777,7 +8776,7 @@ const Ph = (e) => {
8777
8776
  Array.from(o).forEach((ne) => {
8778
8777
  ne !== D && re.items.add(ne);
8779
8778
  }), re.files.length === 0 ? a(null) : a(re.files), p({
8780
- type: at,
8779
+ type: st,
8781
8780
  payload: {
8782
8781
  attachments: re.files.length
8783
8782
  }
@@ -8785,20 +8784,20 @@ const Ph = (e) => {
8785
8784
  }, qa = B(() => {
8786
8785
  O.current && (O.current.value = ""), a(null);
8787
8786
  }, []), Qr = async (D) => {
8788
- D.preventDefault(), Ot(U);
8787
+ D.preventDefault(), Mt(U);
8789
8788
  const re = await t();
8790
8789
  let ne;
8791
8790
  if (o && o.length > 0) {
8792
8791
  const Ne = Array.from(o).map(
8793
- (St) => Wh(St)
8792
+ (xt) => Wh(xt)
8794
8793
  ), Le = new DataTransfer();
8795
- Ne.forEach((St) => Le.items.add(St)), ne = Le.files;
8794
+ Ne.forEach((xt) => Le.items.add(xt)), ne = Le.files;
8796
8795
  }
8797
8796
  Ha(D, {
8798
8797
  headers: {
8799
8798
  "Content-Type": "application/json",
8800
8799
  authorization: `Bearer ${re}`,
8801
- [us]: sr
8800
+ [us]: ir
8802
8801
  },
8803
8802
  body: {
8804
8803
  reasoning: d
@@ -8806,7 +8805,7 @@ const Ph = (e) => {
8806
8805
  experimental_attachments: ne
8807
8806
  }), qa();
8808
8807
  }, Ya = (D) => {
8809
- ir(), Fa(D);
8808
+ cr(), Fa(D);
8810
8809
  };
8811
8810
  return Pr([
8812
8811
  [
@@ -8827,21 +8826,21 @@ const Ph = (e) => {
8827
8826
  }
8828
8827
  }, [y, E, De]), $(() => {
8829
8828
  if (ie.current === !1) {
8830
- ie.current = !0, !ce && Ot(U);
8829
+ ie.current = !0, !ce && Mt(U);
8831
8830
  return;
8832
8831
  }
8833
8832
  m > 0 && m !== ke.current ? (ke.current = m, setTimeout(() => {
8834
- U.current && (!ce && Ot(U), U.current.focus());
8835
- }, Yh)) : f === !1 && !ce && (Ot(U), !Ae() && U.current && U.current.focus());
8833
+ U.current && (!ce && Mt(U), U.current.focus());
8834
+ }, Yh)) : f === !1 && !ce && (Mt(U), !Ae() && U.current && U.current.focus());
8836
8835
  }, [m, f, ce]), $(() => {
8837
8836
  y.lastTriggeredTimestamp && setTimeout(() => {
8838
- ir();
8837
+ cr();
8839
8838
  }, 100);
8840
- }, [y.lastTriggeredTimestamp, ir]), $(() => {
8839
+ }, [y.lastTriggeredTimestamp, cr]), $(() => {
8841
8840
  h === 0 && (O.current && (O.current.value = ""), a(null));
8842
8841
  }, [h]), /* @__PURE__ */ x(Oe, { children: [
8843
8842
  /* @__PURE__ */ l(
8844
- je,
8843
+ Ve,
8845
8844
  {
8846
8845
  showConfirmation: i,
8847
8846
  setShowConfirmation: s,
@@ -8856,8 +8855,8 @@ const Ph = (e) => {
8856
8855
  children: /* @__PURE__ */ l("p", { className: "m-0", children: k.current })
8857
8856
  }
8858
8857
  ),
8859
- /* @__PURE__ */ l("div", { className: de.wrapper, ref: Je, children: /* @__PURE__ */ x("form", { onSubmit: Qr, children: [
8860
- /* @__PURE__ */ l("div", { id: Ge, className: "sr-only", children: Ir() ? tn : u ? rn : nn }),
8858
+ /* @__PURE__ */ l("div", { className: de.wrapper, ref: Ge, children: /* @__PURE__ */ x("form", { onSubmit: Qr, children: [
8859
+ /* @__PURE__ */ l("div", { id: We, className: "sr-only", children: Ir() ? tn : u ? rn : nn }),
8861
8860
  /* @__PURE__ */ x("div", { className: "relative", children: [
8862
8861
  /* @__PURE__ */ l(
8863
8862
  "textarea",
@@ -8873,7 +8872,7 @@ const Ph = (e) => {
8873
8872
  [u ? "enter" : "mod+Enter", Qr]
8874
8873
  ]),
8875
8874
  className: de.textArea,
8876
- "aria-labelledby": Ge
8875
+ "aria-labelledby": We
8877
8876
  }
8878
8877
  ),
8879
8878
  /* @__PURE__ */ l(
@@ -8884,7 +8883,7 @@ const Ph = (e) => {
8884
8883
  onChange: Ja,
8885
8884
  className: "hidden",
8886
8885
  multiple: !0,
8887
- accept: br.join(","),
8886
+ accept: Be.join(","),
8888
8887
  "aria-label": "Upload files"
8889
8888
  }
8890
8889
  )
@@ -8907,15 +8906,15 @@ const Ph = (e) => {
8907
8906
  ] })
8908
8907
  ] }) })
8909
8908
  ] });
8910
- }, Mt = "--sassy-bottom", of = ({ isComponent: e }) => {
8909
+ }, $t = "--sassy-bottom", of = ({ isComponent: e }) => {
8911
8910
  const {
8912
8911
  state: { loading: t, streaming: r, restoring: n }
8913
- } = te(_e), {
8912
+ } = te(be), {
8914
8913
  state: { footerHeight: o, footerPosition: a },
8915
8914
  dispatch: i
8916
8915
  } = te(qr), [s] = P(
8917
8916
  () => on[Math.floor(Math.random() * on.length)]
8918
- ), { messages: u } = He(), { height: c } = ei(), { height: p } = ti(), [d, f] = oo(), g = nt(() => Ae(), []), m = nt(() => ds(), []), h = c - p, v = nt(() => {
8917
+ ), { messages: u } = Je(), { height: c } = ei(), { height: p } = ti(), [d, f] = oo(), g = ot(() => Ae(), []), m = ot(() => ds(), []), h = c - p, v = ot(() => {
8919
8918
  const I = g ? ps : m ? ms : ao;
8920
8919
  return h > 70 && h < 500 ? g ? an / 2 : an : I;
8921
8920
  }, [h, g, m]);
@@ -8929,35 +8928,35 @@ const Ph = (e) => {
8929
8928
  }, [f.height, o, i]), $(() => {
8930
8929
  if (!d || !d.current)
8931
8930
  return;
8932
- const I = d?.current?.style.getPropertyValue(Mt);
8933
- if (a === Qt && (t && !r || n) && I !== `${v}px` && (i({
8934
- type: Zt,
8931
+ const I = d?.current?.style.getPropertyValue($t);
8932
+ if (a === Kt && (t && !r || n) && I !== `${v}px` && (i({
8933
+ type: Dt,
8935
8934
  payload: {
8936
- footerPosition: mt,
8935
+ footerPosition: ht,
8937
8936
  footerOffset: v
8938
8937
  }
8939
8938
  }), d.current.style.setProperty(
8940
- Mt,
8939
+ $t,
8941
8940
  `${v}px`
8942
- )), a === mt && I !== `${v}px` && (i({
8943
- type: Zt,
8941
+ )), a === ht && I !== `${v}px` && (i({
8942
+ type: Dt,
8944
8943
  payload: {
8945
- footerPosition: mt,
8944
+ footerPosition: ht,
8946
8945
  footerOffset: v
8947
8946
  }
8948
8947
  }), d.current.style.setProperty(
8949
- Mt,
8948
+ $t,
8950
8949
  `${v}px`
8951
8950
  )), !t && !r && !n && u.length === 0 && c > 0 && f.height > 0) {
8952
8951
  const y = `${c - f.height - (e ? 300 : 245)}`;
8953
8952
  I !== `${y}px` && Number(y) > 0 && (i({
8954
- type: Zt,
8953
+ type: Dt,
8955
8954
  payload: {
8956
- footerPosition: Qt,
8955
+ footerPosition: Kt,
8957
8956
  footerOffset: Number(y)
8958
8957
  }
8959
8958
  }), d?.current?.style.setProperty(
8960
- Mt,
8959
+ $t,
8961
8960
  `${y}px`
8962
8961
  ));
8963
8962
  }
@@ -8988,7 +8987,7 @@ const Ph = (e) => {
8988
8987
  ] })
8989
8988
  }
8990
8989
  );
8991
- }, $t = [
8990
+ }, Pt = [
8992
8991
  {
8993
8992
  id: hs,
8994
8993
  label: "OpenAI",
@@ -9010,7 +9009,7 @@ const Ph = (e) => {
9010
9009
  state: { privateChat: r },
9011
9010
  setChatId: n,
9012
9011
  setInitialMessages: o
9013
- } = te(_e), { getAccessToken: a, user: i } = ye(), { status: s } = He(), [u, c] = P(!1), p = B(() => {
9012
+ } = te(be), { getAccessToken: a, user: i } = _e(), { status: s } = Je(), [u, c] = P(!1), p = B(() => {
9014
9013
  u || (Zm(), c(!0));
9015
9014
  }, [u]), { isSuccess: d, refetch: f, data: g } = Ze({
9016
9015
  user: i?.username,
@@ -9021,23 +9020,23 @@ const Ph = (e) => {
9021
9020
  provider: y,
9022
9021
  accessToken: await a(),
9023
9022
  username: i?.username || ""
9024
- }), f(), await Xt(`${ys} ${y}`, {
9023
+ }), f(), await Qt(`${ys} ${y}`, {
9025
9024
  containerId: "toggle-provider"
9026
9025
  })), t({
9027
- type: Fe,
9026
+ type: He,
9028
9027
  payload: {
9029
9028
  privateChat: r
9030
9029
  }
9031
9030
  });
9032
9031
  } catch {
9033
9032
  }
9034
- }, h = g && d, v = h && $t.find((y) => g.provider === y.id)?.icon || $t[0].icon, I = /* @__PURE__ */ x(
9035
- ar,
9033
+ }, h = g && d, v = h && Pt.find((y) => g.provider === y.id)?.icon || Pt[0].icon, I = /* @__PURE__ */ x(
9034
+ sr,
9036
9035
  {
9037
9036
  mode: "dark",
9038
9037
  focusMode: "light",
9039
9038
  trigger: /* @__PURE__ */ l(
9040
- ve,
9039
+ ye,
9041
9040
  {
9042
9041
  noBorder: !0,
9043
9042
  noBackground: !0,
@@ -9049,7 +9048,7 @@ const Ph = (e) => {
9049
9048
  v,
9050
9049
  {
9051
9050
  className: h && s === "streaming" ? "av-pulsate-icon" : "",
9052
- size: Ie
9051
+ size: Ee
9053
9052
  }
9054
9053
  )
9055
9054
  }
@@ -9057,8 +9056,8 @@ const Ph = (e) => {
9057
9056
  defaultPlacement: "top-start",
9058
9057
  children: [
9059
9058
  /* @__PURE__ */ l(Da, { children: "Providers" }),
9060
- h && $t.map((y) => /* @__PURE__ */ l(
9061
- we,
9059
+ h && Pt.map((y) => /* @__PURE__ */ l(
9060
+ Ie,
9062
9061
  {
9063
9062
  selected: g.provider === y.id,
9064
9063
  label: y.label,
@@ -9083,38 +9082,38 @@ const Ph = (e) => {
9083
9082
  }, sf = Te(
9084
9083
  () => import(
9085
9084
  /* webpackChunkName: "modal-chunk" */
9086
- "./ProfileEntry.B7sOPbBh.js"
9085
+ "./ProfileEntry.B5YgbWry.js"
9087
9086
  ).then((e) => ({
9088
9087
  default: e.Profile
9089
9088
  }))
9090
9089
  ), cf = Te(
9091
9090
  () => import(
9092
9091
  /* webpackChunkName: "modal-chunk" */
9093
- "./SettingsEntry.fBAXDI0G.js"
9092
+ "./SettingsEntry.BBArtflQ.js"
9094
9093
  ).then((e) => ({
9095
9094
  default: e.SettingsPanel
9096
9095
  }))
9097
9096
  ), lf = Te(
9098
9097
  () => import(
9099
9098
  /* webpackChunkName: "modal-chunk" */
9100
- "./HistoryEntry.1J_Lw9HH.js"
9099
+ "./HistoryEntry.D7LEo6EF.js"
9101
9100
  ).then((e) => ({
9102
9101
  default: e.HistoryPanel
9103
9102
  }))
9104
9103
  ), uf = Te(
9105
9104
  () => import(
9106
9105
  /* webpackChunkName: "modal-chunk" */
9107
- "./AboutEntry.DVBUjCJk.js"
9106
+ "./AboutEntry.BAV6U9d7.js"
9108
9107
  ).then((e) => ({ default: e.About }))
9109
9108
  ), df = Te(
9110
9109
  () => import(
9111
9110
  /* webpackChunkName: "modal-chunk" */
9112
- "./UsageEntry.BnQ-62s3.js"
9111
+ "./UsageEntry.CsPdGiMH.js"
9113
9112
  ).then((e) => ({ default: e.Usage }))
9114
9113
  ), pf = Te(
9115
9114
  () => import(
9116
9115
  /* webpackChunkName: "modal-chunk" */
9117
- "./UserMemoriesPanel.DGqSP95i.js"
9116
+ "./UserMemoriesPanel.CVYRKovm.js"
9118
9117
  ).then(
9119
9118
  (e) => ({ default: e.default })
9120
9119
  )
@@ -9122,7 +9121,7 @@ const Ph = (e) => {
9122
9121
  open: e,
9123
9122
  onOpenChange: t
9124
9123
  }) => {
9125
- const { user: r } = ye();
9124
+ const { user: r } = _e();
9126
9125
  return /* @__PURE__ */ l(
9127
9126
  pf,
9128
9127
  {
@@ -9131,7 +9130,7 @@ const Ph = (e) => {
9131
9130
  user: r?.username
9132
9131
  }
9133
9132
  );
9134
- }, hf = ({ type: e, open: t, onOpenChange: r }) => t ? /* @__PURE__ */ l(Vt, { fallback: /* @__PURE__ */ l("div", {}), children: (() => {
9133
+ }, hf = ({ type: e, open: t, onOpenChange: r }) => t ? /* @__PURE__ */ l(Ft, { fallback: /* @__PURE__ */ l("div", {}), children: (() => {
9135
9134
  switch (e) {
9136
9135
  case "profile":
9137
9136
  return /* @__PURE__ */ l(sf, { open: t, onOpenChange: r });
@@ -9151,10 +9150,10 @@ const Ph = (e) => {
9151
9150
  })() }) : null, ff = ({
9152
9151
  isComponent: e = !1
9153
9152
  }) => {
9154
- const { logout: t, getAccessToken: r, user: n } = ye(), { data: o, isSuccess: a } = Ze({
9153
+ const { logout: t, getAccessToken: r, user: n } = _e(), { data: o, isSuccess: a } = Ze({
9155
9154
  user: n?.username,
9156
9155
  getAccessToken: r
9157
- }), [i, s] = P(null), [u, c] = P(!1), [p, d] = P(!1), [f, g] = P(!1), m = Kt(jt.TOOL.MEMORIES);
9156
+ }), [i, s] = P(null), [u, c] = P(!1), [p, d] = P(!1), [f, g] = P(!1), m = er(Vt.TOOL.MEMORIES);
9158
9157
  $(() => {
9159
9158
  a && o && m && g(o?.useMemory ?? !1);
9160
9159
  }, [a, o, m]);
@@ -9162,23 +9161,23 @@ const Ph = (e) => {
9162
9161
  p || Promise.all([
9163
9162
  import(
9164
9163
  /* webpackChunkName: "modal-chunk" */
9165
- "./ProfileEntry.B7sOPbBh.js"
9164
+ "./ProfileEntry.B5YgbWry.js"
9166
9165
  ),
9167
9166
  import(
9168
9167
  /* webpackChunkName: "modal-chunk" */
9169
- "./SettingsEntry.fBAXDI0G.js"
9168
+ "./SettingsEntry.BBArtflQ.js"
9170
9169
  ),
9171
9170
  import(
9172
9171
  /* webpackChunkName: "modal-chunk" */
9173
- "./HistoryEntry.1J_Lw9HH.js"
9172
+ "./HistoryEntry.D7LEo6EF.js"
9174
9173
  ),
9175
9174
  import(
9176
9175
  /* webpackChunkName: "modal-chunk" */
9177
- "./AboutEntry.DVBUjCJk.js"
9176
+ "./AboutEntry.BAV6U9d7.js"
9178
9177
  ),
9179
9178
  import(
9180
9179
  /* webpackChunkName: "modal-chunk" */
9181
- "./UsageEntry.BnQ-62s3.js"
9180
+ "./UsageEntry.CsPdGiMH.js"
9182
9181
  )
9183
9182
  ]).finally(() => d(!0));
9184
9183
  }, [p]), v = B((b) => {
@@ -9197,7 +9196,7 @@ const Ph = (e) => {
9197
9196
  [
9198
9197
  "mod+,",
9199
9198
  () => {
9200
- Bt() && v("settings");
9199
+ jt() && v("settings");
9201
9200
  }
9202
9201
  ]
9203
9202
  ],
@@ -9209,7 +9208,7 @@ const Ph = (e) => {
9209
9208
  []
9210
9209
  ), /* @__PURE__ */ x(Oe, { children: [
9211
9210
  /* @__PURE__ */ l(
9212
- je,
9211
+ Ve,
9213
9212
  {
9214
9213
  showConfirmation: u,
9215
9214
  setShowConfirmation: c,
@@ -9238,20 +9237,20 @@ const Ph = (e) => {
9238
9237
  rowGap: 0,
9239
9238
  columnGap: 0,
9240
9239
  children: [
9241
- /* @__PURE__ */ l(Qe, { children: /* @__PURE__ */ l(af, { className: " mr-4 sm:mr-2" }) }),
9242
- /* @__PURE__ */ l(Qe, { children: /* @__PURE__ */ l(
9240
+ /* @__PURE__ */ l(Ke, { children: /* @__PURE__ */ l(af, { className: " mr-4 sm:mr-2" }) }),
9241
+ /* @__PURE__ */ l(Ke, { children: /* @__PURE__ */ l(
9243
9242
  xe,
9244
9243
  {
9245
9244
  label: "Profile, Settings, etc.",
9246
9245
  mode: "light",
9247
9246
  placement: "left",
9248
9247
  trigger: /* @__PURE__ */ x(
9249
- ar,
9248
+ sr,
9250
9249
  {
9251
9250
  mode: "dark",
9252
9251
  focusMode: "light",
9253
9252
  trigger: /* @__PURE__ */ l(
9254
- ve,
9253
+ ye,
9255
9254
  {
9256
9255
  noBorder: !0,
9257
9256
  noBackground: !0,
@@ -9264,7 +9263,7 @@ const Ph = (e) => {
9264
9263
  defaultPlacement: "bottom-end",
9265
9264
  children: [
9266
9265
  /* @__PURE__ */ l(
9267
- we,
9266
+ Ie,
9268
9267
  {
9269
9268
  label: "Profile",
9270
9269
  onClick: () => v("profile"),
@@ -9272,7 +9271,7 @@ const Ph = (e) => {
9272
9271
  }
9273
9272
  ),
9274
9273
  /* @__PURE__ */ l(
9275
- we,
9274
+ Ie,
9276
9275
  {
9277
9276
  label: "Settings",
9278
9277
  onClick: () => v("settings"),
@@ -9280,7 +9279,7 @@ const Ph = (e) => {
9280
9279
  }
9281
9280
  ),
9282
9281
  /* @__PURE__ */ l(
9283
- we,
9282
+ Ie,
9284
9283
  {
9285
9284
  label: "History",
9286
9285
  onClick: () => v("history"),
@@ -9288,7 +9287,7 @@ const Ph = (e) => {
9288
9287
  }
9289
9288
  ),
9290
9289
  f && /* @__PURE__ */ l(
9291
- we,
9290
+ Ie,
9292
9291
  {
9293
9292
  label: "Memories",
9294
9293
  onClick: () => v("memories"),
@@ -9296,7 +9295,7 @@ const Ph = (e) => {
9296
9295
  }
9297
9296
  ),
9298
9297
  !e && /* @__PURE__ */ l(
9299
- we,
9298
+ Ie,
9300
9299
  {
9301
9300
  label: "Usage",
9302
9301
  onClick: () => v("usage"),
@@ -9304,7 +9303,7 @@ const Ph = (e) => {
9304
9303
  }
9305
9304
  ),
9306
9305
  /* @__PURE__ */ l(
9307
- we,
9306
+ Ie,
9308
9307
  {
9309
9308
  label: "About",
9310
9309
  onClick: () => v("about"),
@@ -9314,7 +9313,7 @@ const Ph = (e) => {
9314
9313
  !e && /* @__PURE__ */ x(Oe, { children: [
9315
9314
  /* @__PURE__ */ l($h, {}),
9316
9315
  /* @__PURE__ */ l(
9317
- we,
9316
+ Ie,
9318
9317
  {
9319
9318
  label: "Log out",
9320
9319
  onClick: E,
@@ -9424,20 +9423,20 @@ try {
9424
9423
  } catch {
9425
9424
  }
9426
9425
  const vf = Te(
9427
- () => import("./index.IGrBIWZE.js").then((e) => ({ default: e.Bubble }))
9428
- ), Yr = (e) => /* @__PURE__ */ l(Vt, { fallback: /* @__PURE__ */ l("span", { className: "inline-block" }), children: /* @__PURE__ */ l(vf, { ...e }) });
9426
+ () => import("./index.DlvXzO73.js").then((e) => ({ default: e.Bubble }))
9427
+ ), Yr = (e) => /* @__PURE__ */ l(Ft, { fallback: /* @__PURE__ */ l("span", { className: "inline-block" }), children: /* @__PURE__ */ l(vf, { ...e }) });
9429
9428
  Yr.displayName = "AsyncBubble";
9430
9429
  const Kn = 1, yf = 150, _f = Te(
9431
9430
  () => import(
9432
9431
  /* webpackChunkName: "LazyMessageAssistant" */
9433
- "./ChatBubbleAssistant.Bde_BKC8.js"
9432
+ "./ChatBubbleAssistant.BIc18KeQ.js"
9434
9433
  )
9435
9434
  ), bf = Te(
9436
9435
  () => import(
9437
9436
  /* webpackChunkName: "LazyMessageUser" */
9438
- "./ChatBubbleUser.CylWmaAk.js"
9437
+ "./ChatBubbleUser.D1IsMeJR.js"
9439
9438
  )
9440
- ), wf = st.memo(
9439
+ ), wf = it.memo(
9441
9440
  ({
9442
9441
  role: e,
9443
9442
  content: t,
@@ -9461,7 +9460,7 @@ const Kn = 1, yf = 150, _f = Te(
9461
9460
  }
9462
9461
  s(!1);
9463
9462
  }
9464
- }, [t, i, o]), e === so && t ? /* @__PURE__ */ l(Vt, { fallback: /* @__PURE__ */ l("span", {}), children: /* @__PURE__ */ l(bf, { content: t }) }) : (e === ht || e === cn) && o && (a === "submitted" || a === "streaming") && i ? /* @__PURE__ */ l(Yr, { tail: !0, children: /* @__PURE__ */ l(ja, { type: "dots" }) }) : (e === ht || e === cn) && t && t.trim().length >= Kn ? /* @__PURE__ */ l(Vt, { fallback: /* @__PURE__ */ l("span", {}), children: /* @__PURE__ */ l(
9463
+ }, [t, i, o]), e === so && t ? /* @__PURE__ */ l(Ft, { fallback: /* @__PURE__ */ l("span", {}), children: /* @__PURE__ */ l(bf, { content: t }) }) : (e === ft || e === cn) && o && (a === "submitted" || a === "streaming") && i ? /* @__PURE__ */ l(Yr, { tail: !0, children: /* @__PURE__ */ l(ja, { type: "dots" }) }) : (e === ft || e === cn) && t && t.trim().length >= Kn ? /* @__PURE__ */ l(Ft, { fallback: /* @__PURE__ */ l("span", {}), children: /* @__PURE__ */ l(
9465
9464
  _f,
9466
9465
  {
9467
9466
  role: e,
@@ -9497,11 +9496,11 @@ function Ef(e) {
9497
9496
  }
9498
9497
  }
9499
9498
  const Tf = () => {
9500
- const { messages: e, status: t } = He(), r = e ? e.map((a, i) => a.role === ht ? i : -1).filter((a) => a !== -1).pop() : -1, n = e && e.length > 0 ? e[e.length - 1] : null, o = (t === "submitted" || t === "streaming") && n?.role === so;
9499
+ const { messages: e, status: t } = Je(), r = e ? e.map((a, i) => a.role === ft ? i : -1).filter((a) => a !== -1).pop() : -1, n = e && e.length > 0 ? e[e.length - 1] : null, o = (t === "submitted" || t === "streaming") && n?.role === so;
9501
9500
  return e && e.length > 0 ? /* @__PURE__ */ x("div", { className: "space-y-6 mt-2 @container", children: [
9502
9501
  e?.map((a, i) => {
9503
9502
  let s;
9504
- const u = `${i}-${a.role}`, c = If(a), p = Ef(a), d = a.role === ht && i === r;
9503
+ const u = `${i}-${a.role}`, c = If(a), p = Ef(a), d = a.role === ft && i === r;
9505
9504
  return /* @__PURE__ */ l(
9506
9505
  wf,
9507
9506
  {
@@ -9518,11 +9517,11 @@ const Tf = () => {
9518
9517
  o && /* @__PURE__ */ l(Yr, { tail: !0, children: /* @__PURE__ */ l(ja, { type: "dots" }) })
9519
9518
  ] }) : null;
9520
9519
  }, Sf = () => {
9521
- const { isAuthenticated: e } = ye(), { ref: t, inViewport: r } = Xs(), n = J(null), o = J(null), {
9520
+ const { isAuthenticated: e } = _e(), { ref: t, inViewport: r } = Xs(), n = J(null), o = J(null), {
9522
9521
  state: { footerPosition: a, footerHeight: i, footerOffset: s }
9523
9522
  } = te(qr), {
9524
9523
  state: { loading: u }
9525
- } = te(_e), { messages: c } = He(), p = J(0), { data: d, isSuccess: f } = _s(), g = bs({
9524
+ } = te(be), { messages: c } = Je(), p = J(0), { data: d, isSuccess: f } = _s(), g = bs({
9526
9525
  isAuthenticated: e,
9527
9526
  extraClass: "rounded-b-md relative border-b-16 border-slate-900"
9528
9527
  }), m = Ir() ? "mt-4" : "", h = B(() => {
@@ -9534,7 +9533,7 @@ const Tf = () => {
9534
9533
  return $(() => {
9535
9534
  u && h();
9536
9535
  }, [u, h]), $(() => {
9537
- p.current = a === mt ? i + s + io + ws + 15 : 0;
9536
+ p.current = a === ht ? i + s + io + ws + 15 : 0;
9538
9537
  }, [a, i, s]), /* @__PURE__ */ x(Oe, { children: [
9539
9538
  /* @__PURE__ */ x("div", { className: g, ref: n, children: [
9540
9539
  /* @__PURE__ */ l(
@@ -9560,7 +9559,7 @@ const Tf = () => {
9560
9559
  /* @__PURE__ */ l(
9561
9560
  gf,
9562
9561
  {
9563
- show: !r && a === mt,
9562
+ show: !r && a === ht,
9564
9563
  bottom: p.current,
9565
9564
  onClick: h
9566
9565
  }
@@ -9571,23 +9570,23 @@ function Va({
9571
9570
  isComponent: e = !1,
9572
9571
  headerHeight: t = 0
9573
9572
  }) {
9574
- const { user: r, getAccessToken: n } = ye(), [o, a] = P(`${ln}px`), [i, s] = oo(), [u, c] = P(Re()), [p, d] = P([]), [f] = et({
9575
- key: Ke + Cs,
9573
+ const { user: r, getAccessToken: n } = _e(), [o, a] = P(`${ln}px`), [i, s] = oo(), [u, c] = P(Re()), [p, d] = P([]), [f] = tt({
9574
+ key: et + Cs,
9576
9575
  initialValue: ""
9577
- }), [g] = et({
9578
- key: Ke + ks,
9576
+ }), [g] = tt({
9577
+ key: et + ks,
9579
9578
  initialValue: un
9580
- }), [m] = et({
9581
- key: Ke + Ns,
9582
- initialValue: ot.DESC
9583
- }), [h] = et({
9584
- key: Ke + zs,
9585
- initialValue: ot.ASC
9586
- }), v = nt(() => ({
9587
- footerPosition: Qt,
9579
+ }), [m] = tt({
9580
+ key: et + Ns,
9581
+ initialValue: at.DESC
9582
+ }), [h] = tt({
9583
+ key: et + zs,
9584
+ initialValue: at.ASC
9585
+ }), v = ot(() => ({
9586
+ footerPosition: Kt,
9588
9587
  footerHeight: 0,
9589
9588
  footerOffset: Ae() ? ao : 0
9590
- }), []), [I, y] = xt(Dm, v), E = nt(() => {
9589
+ }), []), [I, y] = kt(Dm, v), E = ot(() => {
9591
9590
  const de = Ae(), Ce = Es();
9592
9591
  return de && Ce ? "mt-1" : "mt-5";
9593
9592
  }, []), z = {
@@ -9602,13 +9601,13 @@ function Va({
9602
9601
  return m;
9603
9602
  }
9604
9603
  })()
9605
- }, [A, k] = xt(
9604
+ }, [A, k] = kt(
9606
9605
  Um,
9607
9606
  z
9608
- ), [O, ie] = xt(Bm, {
9607
+ ), [O, ie] = kt(Bm, {
9609
9608
  prompt: "",
9610
9609
  lastTriggeredTimestamp: 0
9611
- }), [ke, Je] = xt(Lm, {
9610
+ }), [ke, Ge] = kt(Lm, {
9612
9611
  provider: "",
9613
9612
  // OpenAI, Anthropic, etc.
9614
9613
  privateChat: !1,
@@ -9624,7 +9623,7 @@ function Va({
9624
9623
  }), { data: U } = Ze({
9625
9624
  user: r?.username,
9626
9625
  getAccessToken: n
9627
- }), Ge = nt(() => new Jr({
9626
+ }), We = ot(() => new Jr({
9628
9627
  api: `${ro}/api/generate`,
9629
9628
  // Only include static values in transport body.
9630
9629
  body: {
@@ -9634,7 +9633,7 @@ function Va({
9634
9633
  return $(() => {
9635
9634
  document.getElementById("root")?.classList.replace("app-hidden", "fadeIn");
9636
9635
  }, []), $(() => {
9637
- U && U.provider && Je({
9636
+ U && U.provider && Ge({
9638
9637
  type: Oa,
9639
9638
  payload: {
9640
9639
  provider: U.provider
@@ -9643,7 +9642,7 @@ function Va({
9643
9642
  }, [U]), $(() => {
9644
9643
  try {
9645
9644
  const de = sessionStorage.getItem("sw-toggle-pending");
9646
- de && (de === "enabled" ? Xt(As, { containerId: "toggle-save" }) : de === "disabled" && Xt(Os, {
9645
+ de && (de === "enabled" ? Qt(As, { containerId: "toggle-save" }) : de === "disabled" && Qt(Os, {
9647
9646
  containerId: "toggle-save"
9648
9647
  }), sessionStorage.removeItem("sw-toggle-pending"));
9649
9648
  } catch {
@@ -9670,11 +9669,11 @@ function Va({
9670
9669
  {
9671
9670
  value: { state: O, dispatch: ie },
9672
9671
  children: /* @__PURE__ */ l(
9673
- _e.Provider,
9672
+ be.Provider,
9674
9673
  {
9675
9674
  value: {
9676
9675
  state: ke,
9677
- dispatch: Je,
9676
+ dispatch: Ge,
9678
9677
  setChatId: c,
9679
9678
  setInitialMessages: d
9680
9679
  },
@@ -9684,7 +9683,7 @@ function Va({
9684
9683
  value: {
9685
9684
  id: u,
9686
9685
  messages: p,
9687
- transport: Ge,
9686
+ transport: We,
9688
9687
  experimental_throttle: 300,
9689
9688
  generateId() {
9690
9689
  return Re();
@@ -9733,23 +9732,23 @@ export {
9733
9732
  Yr as AsyncBubble,
9734
9733
  gf as ButtonScroll,
9735
9734
  Oa as CHAT_SET_PROVIDER,
9736
- rt as CHAT_SET_STATUS,
9737
- _e as ChatContext,
9738
- je as ConfirmationPanel,
9739
- et as E,
9735
+ nt as CHAT_SET_STATUS,
9736
+ be as ChatContext,
9737
+ Ve as ConfirmationPanel,
9738
+ tt as E,
9740
9739
  Gr as HistoryContext,
9741
9740
  Jn as LazyToastContainerWrapper,
9742
9741
  zh as O,
9743
- ot as e,
9742
+ at as e,
9744
9743
  jm as getDefaultExportFromCjs,
9745
9744
  bh as oe,
9746
9745
  Xs as p,
9747
9746
  pi as p$1,
9748
9747
  ni as p$2,
9749
9748
  Of as showErrorToast,
9750
- Xt as showSuccessToast,
9749
+ Qt as showSuccessToast,
9751
9750
  xe as st,
9752
- He as useAiChat,
9753
- Kt as useCapability,
9751
+ Je as useAiChat,
9752
+ er as useCapability,
9754
9753
  yi as z
9755
9754
  };