@versini/sassysaint 8.73.1 → 8.73.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AboutChangelog.2b2DI_SN.js → AboutChangelog.661DKCgk.js} +2 -2
- package/dist/chunks/{AboutEntry.BHq7KBa1.js → AboutEntry.DiCPTiLj.js} +5 -5
- package/dist/chunks/{App.DcQF9Hq9.js → App.5gxvd-4-.js} +699 -681
- package/dist/chunks/{Chart.DAdepX81.js → Chart.DTAX5Zd_.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.BF3Bj7JJ.js → ChatBubbleAssistant.C-aLHVG0.js} +4 -4
- package/dist/chunks/{ChatBubbleUser.B5uyfOKG.js → ChatBubbleUser.Cb2OzGt2.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.BwjPu3FF.js → ChatHistoryTable.DodhSBf9.js} +63 -62
- package/dist/chunks/HistoryEntry.BHKiSJYf.js +333 -0
- package/dist/chunks/{ProfileEntry.Ce801i2m.js → ProfileEntry.A_AoGwYv.js} +2 -2
- package/dist/chunks/{SettingsEntry.fNHoX42W.js → SettingsEntry.D4RhlncR.js} +3 -3
- package/dist/chunks/{Table.J1RcsDNn.js → Table.Uvq7uGxR.js} +2 -2
- package/dist/chunks/{UsageEntry.k-Ljpdg9.js → UsageEntry.DrVVPYLQ.js} +3 -3
- package/dist/chunks/{UserMemoriesPanel.C0BI-Pbv.js → UserMemoriesPanel.kh9_pfi_.js} +4 -4
- package/dist/chunks/{index.C_OZL-ky.js → index.B6va7ILw.js} +1 -1
- package/dist/chunks/{index.CauWbyr8.js → index.CCW8q5W5.js} +3 -3
- package/dist/chunks/{index.RnO-M1tm.js → index.CJZ4xgED.js} +2 -2
- package/dist/chunks/{index.uzB9FupG.js → index.DB7deAkb.js} +10 -5
- package/dist/chunks/{index.FbsVqChk.js → index.Dfe22wCV.js} +1 -1
- package/dist/chunks/{index.nSgn5ZFo.js → index.Dq4WBOGA.js} +1 -1
- package/dist/chunks/{index.CmXD-yP7.js → index.DtuEQYZN.js} +1 -1
- package/dist/chunks/{index.BqnKf1sr.js → index.O2zfzZcM.js} +1 -1
- package/dist/chunks/{useMarkdown.rLeRHXfb.js → useMarkdown.DpoGjOrf.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/chunks/HistoryEntry.Cj5Hwpkx.js +0 -327
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as l, jsxs as T, Fragment as Me } from "react/jsx-runtime";
|
|
2
|
-
import { I as J, ACTION_SORT as bs, ACTION_SEARCH as ws, ACTION_RESET_PROMPT as Eo, ACTION_TOGGLE_PROMPT as To, LOCAL_STORAGE_PREFIX as je, LOCAL_STORAGE_CHAT_ID as So, n as ve, isDev as Is, isPWAMode as xo, useChat as Es, F as Ts, te as Se, DEFAULT_ICON_ACTION_SIZE as ze, isTauri as
|
|
2
|
+
import { I as J, ACTION_SORT as bs, ACTION_SEARCH as ws, ACTION_RESET_PROMPT as Eo, ACTION_TOGGLE_PROMPT as To, LOCAL_STORAGE_PREFIX as je, LOCAL_STORAGE_CHAT_ID as So, n as ve, isDev as Is, isPWAMode as xo, useChat as Es, F as Ts, te as Se, DEFAULT_ICON_ACTION_SIZE as ze, isTauri as Kt, useUserPreferences as We, isProbablyiPhone as Ve, serverUrl as ko, useEntitlements as Gr, L as Ar, j as ct, C as mn, LOCAL_STORAGE_PRIVATE_DISCLOSURE as Ss, ot as er, LOCAL_STORAGE_REASONING_DISCLOSURE as xs, useSaveChat as ks, TOAST_CHAT_SAVED as Cs, PROMPT_CLASSNAME as Ns, PROMPT_EDITABLE_AREA_CLASSNAME as zs, useChatsHistory as As, i as Os, rt as Co, ERROR_MESSAGE as Ms, E as It, CLIPBOARD_PROMPT as hn, INPUT_PLACEHOLDER_TEXT_MOBILE as fn, INPUT_PLACEHOLDER_TEXT_ENTER as gn, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as vn, isProbablyMobile as Or, Z as $s, FOOTER_DISCLAIMERS as yn, h as No, isProbablyiPad as Rs, INPUT_BOTTOM_OFFSET_EXTRA as _n, INPUT_BOTTOM_OFFSET_IPHONE as Ps, INPUT_BOTTOM_OFFSET_IPAD as Zs, INPUT_BOTTOM_OFFSET as zo, getLayoutPaddingClass as Mr, canEvaluateModels as bn, et as Ds, r as Ls, O as Bs, c as Us, V as js, j$1 as yr, setNewProvider as wn, TOAST_PROVIDER_CHANGED as In, useQueryClient as Vs, LOG_OUT as En, e as Ao, b as Tn, useServerCapabilities as Fs, getMessageContaintWrapperClass as Hs, UI_FOOTER_BUFFER as Oo, UI_BUTTON_SCROLL_BUFFER as Js, Logo as Gs, UI_DEFAULT_MAIN_HEIGHT as Sn, applyOledMode as Ws, UI_DEFAULT_MAIN_HEIGHT_IPHONE as qs, APP_CLASSNAME as Ys, J as xn, Q as Xs, LOCAL_STORAGE_SORT as Qs, LOCAL_STORAGE_SEARCH as Ks, LOCAL_STORAGE_OLED_MODE as ei, LOCAL_STORAGE_SORT_TIMESTAMP as ti, LOCAL_STORAGE_SORT_TOKEN_USAGE as ri, TOAST_CACHE_ENABLED as ni, TOAST_CACHE_DISABLED as oi } from "./index.DB7deAkb.js";
|
|
3
3
|
import * as ie from "react";
|
|
4
|
-
import pt, { useRef as j, useEffect as $, useCallback as D, useState as R, useSyncExternalStore as
|
|
5
|
-
import
|
|
4
|
+
import pt, { useRef as j, useEffect as $, useCallback as D, useState as R, useSyncExternalStore as Jt, createContext as ai, useContext as re, useId as Mo, forwardRef as $o, useMemo as Ne, Suspense as tr, lazy as Re, useReducer as Zt, useLayoutEffect as si } from "react";
|
|
5
|
+
import N from "clsx";
|
|
6
6
|
import { computePosition as ii, offset as Ro, flip as Po, shift as Zo, arrow as ci, useMergeRefs as Wr, FloatingPortal as $r, FloatingOverlay as li, FloatingFocusManager as Rr, useFloating as Do, useClick as Lo, useDismiss as Bo, useRole as Uo, useInteractions as jo, useFloatingParentNodeId as Vo, FloatingTree as ui, useFloatingTree as Fo, useFloatingNodeId as di, useListItem as Ho, autoUpdate as pi, useHover as mi, safePolygon as hi, useListNavigation as fi, useTypeahead as gi, FloatingNode as kn, FloatingList as Cn } from "@floating-ui/react";
|
|
7
7
|
const Nn = ["mousedown", "touchstart"];
|
|
8
8
|
function vi(e, t, r) {
|
|
@@ -27,7 +27,7 @@ function vi(e, t, r) {
|
|
|
27
27
|
}, [e, r, t]), n;
|
|
28
28
|
}
|
|
29
29
|
const _r = 50, zn = 120;
|
|
30
|
-
let Ce = null,
|
|
30
|
+
let Ce = null, Dt = 0;
|
|
31
31
|
const yi = () => {
|
|
32
32
|
if (typeof window > "u" || Ce && document.body.contains(Ce))
|
|
33
33
|
return;
|
|
@@ -48,16 +48,16 @@ const yi = () => {
|
|
|
48
48
|
}, bi = () => {
|
|
49
49
|
const e = j(/* @__PURE__ */ new Set());
|
|
50
50
|
$(() => {
|
|
51
|
-
|
|
51
|
+
Dt++;
|
|
52
52
|
try {
|
|
53
53
|
yi();
|
|
54
54
|
} catch (r) {
|
|
55
|
-
throw
|
|
55
|
+
throw Dt--, r;
|
|
56
56
|
}
|
|
57
57
|
return () => {
|
|
58
58
|
for (const r of e.current)
|
|
59
59
|
clearTimeout(r);
|
|
60
|
-
e.current.clear(),
|
|
60
|
+
e.current.clear(), Dt--, Dt === 0 && _i();
|
|
61
61
|
};
|
|
62
62
|
}, []);
|
|
63
63
|
const t = D(() => {
|
|
@@ -172,7 +172,7 @@ function Oe({
|
|
|
172
172
|
key: e,
|
|
173
173
|
initialValue: t
|
|
174
174
|
}) {
|
|
175
|
-
const r =
|
|
175
|
+
const r = Jt(Ci, () => On(e)), n = D(
|
|
176
176
|
(i) => {
|
|
177
177
|
try {
|
|
178
178
|
const s = typeof i == "function" ? i(JSON.parse(r)) : i;
|
|
@@ -905,7 +905,7 @@ Error message: ${Xo(r)}`,
|
|
|
905
905
|
}
|
|
906
906
|
};
|
|
907
907
|
sa = sc;
|
|
908
|
-
var
|
|
908
|
+
var rr = ic;
|
|
909
909
|
class Rn extends Error {
|
|
910
910
|
constructor(t, r) {
|
|
911
911
|
super(t), this.name = "ParseError", this.type = r.type, this.field = r.field, this.value = r.value, this.line = r.line;
|
|
@@ -921,9 +921,9 @@ function cc(e) {
|
|
|
921
921
|
const { onEvent: t = br, onError: r = br, onRetry: n = br, onComment: o } = e;
|
|
922
922
|
let a = "", i = !0, s, u = "", c = "";
|
|
923
923
|
function p(h) {
|
|
924
|
-
const
|
|
925
|
-
for (const
|
|
926
|
-
d(
|
|
924
|
+
const v = i ? h.replace(/^\xEF\xBB\xBF/, "") : h, [I, b] = lc(`${a}${v}`);
|
|
925
|
+
for (const w of I)
|
|
926
|
+
d(w);
|
|
927
927
|
a = b, i = !1;
|
|
928
928
|
}
|
|
929
929
|
function d(h) {
|
|
@@ -935,32 +935,32 @@ function cc(e) {
|
|
|
935
935
|
o && o(h.slice(h.startsWith(": ") ? 2 : 1));
|
|
936
936
|
return;
|
|
937
937
|
}
|
|
938
|
-
const
|
|
939
|
-
if (
|
|
940
|
-
const
|
|
941
|
-
f(
|
|
938
|
+
const v = h.indexOf(":");
|
|
939
|
+
if (v !== -1) {
|
|
940
|
+
const I = h.slice(0, v), b = h[v + 1] === " " ? 2 : 1, w = h.slice(v + b);
|
|
941
|
+
f(I, w, h);
|
|
942
942
|
return;
|
|
943
943
|
}
|
|
944
944
|
f(h, "", h);
|
|
945
945
|
}
|
|
946
|
-
function f(h,
|
|
946
|
+
function f(h, v, I) {
|
|
947
947
|
switch (h) {
|
|
948
948
|
case "event":
|
|
949
|
-
c =
|
|
949
|
+
c = v;
|
|
950
950
|
break;
|
|
951
951
|
case "data":
|
|
952
|
-
u = `${u}${
|
|
952
|
+
u = `${u}${v}
|
|
953
953
|
`;
|
|
954
954
|
break;
|
|
955
955
|
case "id":
|
|
956
|
-
s =
|
|
956
|
+
s = v.includes("\0") ? void 0 : v;
|
|
957
957
|
break;
|
|
958
958
|
case "retry":
|
|
959
|
-
/^\d+$/.test(
|
|
960
|
-
new Rn(`Invalid \`retry\` value: "${
|
|
959
|
+
/^\d+$/.test(v) ? n(parseInt(v, 10)) : r(
|
|
960
|
+
new Rn(`Invalid \`retry\` value: "${v}"`, {
|
|
961
961
|
type: "invalid-retry",
|
|
962
|
-
value:
|
|
963
|
-
line:
|
|
962
|
+
value: v,
|
|
963
|
+
line: I
|
|
964
964
|
})
|
|
965
965
|
);
|
|
966
966
|
break;
|
|
@@ -968,7 +968,7 @@ function cc(e) {
|
|
|
968
968
|
r(
|
|
969
969
|
new Rn(
|
|
970
970
|
`Unknown field "${h.length > 20 ? `${h.slice(0, 20)}…` : h}"`,
|
|
971
|
-
{ type: "unknown-field", field: h, value:
|
|
971
|
+
{ type: "unknown-field", field: h, value: v, line: I }
|
|
972
972
|
)
|
|
973
973
|
);
|
|
974
974
|
break;
|
|
@@ -1123,7 +1123,7 @@ function ft(e) {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
const la = Error.captureStackTrace ? Error.captureStackTrace : (...e) => {
|
|
1125
1125
|
};
|
|
1126
|
-
function
|
|
1126
|
+
function nr(e) {
|
|
1127
1127
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1128
1128
|
}
|
|
1129
1129
|
const mc = Yr(() => {
|
|
@@ -1136,14 +1136,14 @@ const mc = Yr(() => {
|
|
|
1136
1136
|
return !1;
|
|
1137
1137
|
}
|
|
1138
1138
|
});
|
|
1139
|
-
function
|
|
1140
|
-
if (
|
|
1139
|
+
function or(e) {
|
|
1140
|
+
if (nr(e) === !1)
|
|
1141
1141
|
return !1;
|
|
1142
1142
|
const t = e.constructor;
|
|
1143
1143
|
if (t === void 0)
|
|
1144
1144
|
return !0;
|
|
1145
1145
|
const r = t.prototype;
|
|
1146
|
-
return !(
|
|
1146
|
+
return !(nr(r) === !1 || Object.prototype.hasOwnProperty.call(r, "isPrototypeOf") === !1);
|
|
1147
1147
|
}
|
|
1148
1148
|
const hc = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
1149
1149
|
function At(e) {
|
|
@@ -1203,7 +1203,7 @@ function yc(e, t) {
|
|
|
1203
1203
|
});
|
|
1204
1204
|
}
|
|
1205
1205
|
function _c(e, t) {
|
|
1206
|
-
if (!
|
|
1206
|
+
if (!or(t))
|
|
1207
1207
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
1208
1208
|
const r = {
|
|
1209
1209
|
...e._zod.def,
|
|
@@ -1287,13 +1287,13 @@ function et(e, t) {
|
|
|
1287
1287
|
return (n = r).path ?? (n.path = []), r.path.unshift(e), r;
|
|
1288
1288
|
});
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function Lt(e) {
|
|
1291
1291
|
return typeof e == "string" ? e : e?.message;
|
|
1292
1292
|
}
|
|
1293
1293
|
function Je(e, t, r) {
|
|
1294
1294
|
const n = { ...e, path: e.path ?? [] };
|
|
1295
1295
|
if (!e.message) {
|
|
1296
|
-
const o =
|
|
1296
|
+
const o = Lt(e.inst?._zod.def?.error?.(e)) ?? Lt(t?.error?.(e)) ?? Lt(r.customError?.(e)) ?? Lt(r.localeError?.(e)) ?? "Invalid input";
|
|
1297
1297
|
n.message = o;
|
|
1298
1298
|
}
|
|
1299
1299
|
return delete n.inst, delete n.continue, t?.reportInput || delete n.input, n;
|
|
@@ -1592,7 +1592,7 @@ const Yc = (e) => {
|
|
|
1592
1592
|
continue: !t.abort
|
|
1593
1593
|
});
|
|
1594
1594
|
};
|
|
1595
|
-
}),
|
|
1595
|
+
}), dr = /* @__PURE__ */ _("$ZodCheckStringFormat", (e, t) => {
|
|
1596
1596
|
var r, n;
|
|
1597
1597
|
ue.init(e, t), e._zod.onattach.push((o) => {
|
|
1598
1598
|
const a = o._zod.bag;
|
|
@@ -1610,7 +1610,7 @@ const Yc = (e) => {
|
|
|
1610
1610
|
}) : (n = e._zod).check ?? (n.check = () => {
|
|
1611
1611
|
});
|
|
1612
1612
|
}), cl = /* @__PURE__ */ _("$ZodCheckRegex", (e, t) => {
|
|
1613
|
-
|
|
1613
|
+
dr.init(e, t), e._zod.check = (r) => {
|
|
1614
1614
|
t.pattern.lastIndex = 0, !t.pattern.test(r.value) && r.issues.push({
|
|
1615
1615
|
origin: "string",
|
|
1616
1616
|
code: "invalid_format",
|
|
@@ -1622,9 +1622,9 @@ const Yc = (e) => {
|
|
|
1622
1622
|
});
|
|
1623
1623
|
};
|
|
1624
1624
|
}), ll = /* @__PURE__ */ _("$ZodCheckLowerCase", (e, t) => {
|
|
1625
|
-
t.pattern ?? (t.pattern = tl),
|
|
1625
|
+
t.pattern ?? (t.pattern = tl), dr.init(e, t);
|
|
1626
1626
|
}), ul = /* @__PURE__ */ _("$ZodCheckUpperCase", (e, t) => {
|
|
1627
|
-
t.pattern ?? (t.pattern = rl),
|
|
1627
|
+
t.pattern ?? (t.pattern = rl), dr.init(e, t);
|
|
1628
1628
|
}), dl = /* @__PURE__ */ _("$ZodCheckIncludes", (e, t) => {
|
|
1629
1629
|
ue.init(e, t);
|
|
1630
1630
|
const r = At(t.includes), n = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${r}` : r);
|
|
@@ -1781,7 +1781,7 @@ const gl = {
|
|
|
1781
1781
|
}), r;
|
|
1782
1782
|
};
|
|
1783
1783
|
}), G = /* @__PURE__ */ _("$ZodStringFormat", (e, t) => {
|
|
1784
|
-
|
|
1784
|
+
dr.init(e, t), en.init(e, t);
|
|
1785
1785
|
}), vl = /* @__PURE__ */ _("$ZodGUID", (e, t) => {
|
|
1786
1786
|
t.pattern ?? (t.pattern = Pc), G.init(e, t);
|
|
1787
1787
|
}), yl = /* @__PURE__ */ _("$ZodUUID", (e, t) => {
|
|
@@ -2055,7 +2055,7 @@ const Gl = /* @__PURE__ */ _("$ZodArray", (e, t) => {
|
|
|
2055
2055
|
return a.length ? Promise.all(a).then(() => r) : r;
|
|
2056
2056
|
};
|
|
2057
2057
|
});
|
|
2058
|
-
function
|
|
2058
|
+
function Bt(e, t, r) {
|
|
2059
2059
|
e.issues.length && t.issues.push(...et(r, e.issues)), t.value[r] = e.value;
|
|
2060
2060
|
}
|
|
2061
2061
|
function Dn(e, t, r, n) {
|
|
@@ -2091,54 +2091,54 @@ const Wl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
|
|
|
2091
2091
|
});
|
|
2092
2092
|
const n = (d) => {
|
|
2093
2093
|
const f = new fl(["shape", "payload", "ctx"]), g = r.value, m = (b) => {
|
|
2094
|
-
const
|
|
2095
|
-
return `shape[${
|
|
2094
|
+
const w = ft(b);
|
|
2095
|
+
return `shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`;
|
|
2096
2096
|
};
|
|
2097
2097
|
f.write("const input = payload.value;");
|
|
2098
2098
|
const h = /* @__PURE__ */ Object.create(null);
|
|
2099
|
-
let
|
|
2099
|
+
let v = 0;
|
|
2100
2100
|
for (const b of g.keys)
|
|
2101
|
-
h[b] = `key_${
|
|
2101
|
+
h[b] = `key_${v++}`;
|
|
2102
2102
|
f.write("const newResult = {}");
|
|
2103
2103
|
for (const b of g.keys)
|
|
2104
2104
|
if (g.optionalKeys.has(b)) {
|
|
2105
|
-
const
|
|
2106
|
-
f.write(`const ${
|
|
2107
|
-
const
|
|
2105
|
+
const w = h[b];
|
|
2106
|
+
f.write(`const ${w} = ${m(b)};`);
|
|
2107
|
+
const y = ft(b);
|
|
2108
2108
|
f.write(`
|
|
2109
|
-
if (${
|
|
2110
|
-
if (input[${
|
|
2111
|
-
if (${
|
|
2112
|
-
newResult[${
|
|
2109
|
+
if (${w}.issues.length) {
|
|
2110
|
+
if (input[${y}] === undefined) {
|
|
2111
|
+
if (${y} in input) {
|
|
2112
|
+
newResult[${y}] = undefined;
|
|
2113
2113
|
}
|
|
2114
2114
|
} else {
|
|
2115
2115
|
payload.issues = payload.issues.concat(
|
|
2116
|
-
${
|
|
2116
|
+
${w}.issues.map((iss) => ({
|
|
2117
2117
|
...iss,
|
|
2118
|
-
path: iss.path ? [${
|
|
2118
|
+
path: iss.path ? [${y}, ...iss.path] : [${y}],
|
|
2119
2119
|
}))
|
|
2120
2120
|
);
|
|
2121
2121
|
}
|
|
2122
|
-
} else if (${
|
|
2123
|
-
if (${
|
|
2122
|
+
} else if (${w}.value === undefined) {
|
|
2123
|
+
if (${y} in input) newResult[${y}] = undefined;
|
|
2124
2124
|
} else {
|
|
2125
|
-
newResult[${
|
|
2125
|
+
newResult[${y}] = ${w}.value;
|
|
2126
2126
|
}
|
|
2127
2127
|
`);
|
|
2128
2128
|
} else {
|
|
2129
|
-
const
|
|
2130
|
-
f.write(`const ${
|
|
2131
|
-
if (${
|
|
2129
|
+
const w = h[b];
|
|
2130
|
+
f.write(`const ${w} = ${m(b)};`), f.write(`
|
|
2131
|
+
if (${w}.issues.length) payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
|
|
2132
2132
|
...iss,
|
|
2133
2133
|
path: iss.path ? [${ft(b)}, ...iss.path] : [${ft(b)}]
|
|
2134
|
-
})));`), f.write(`newResult[${ft(b)}] = ${
|
|
2134
|
+
})));`), f.write(`newResult[${ft(b)}] = ${w}.value`);
|
|
2135
2135
|
}
|
|
2136
2136
|
f.write("payload.value = newResult;"), f.write("return payload;");
|
|
2137
|
-
const
|
|
2138
|
-
return (b,
|
|
2137
|
+
const I = f.compile();
|
|
2138
|
+
return (b, w) => I(d, b, w);
|
|
2139
2139
|
};
|
|
2140
2140
|
let o;
|
|
2141
|
-
const a =
|
|
2141
|
+
const a = nr, i = !ia.jitless, u = i && mc.value, c = t.catchall;
|
|
2142
2142
|
let p;
|
|
2143
2143
|
e._zod.parse = (d, f) => {
|
|
2144
2144
|
p ?? (p = r.value);
|
|
@@ -2155,24 +2155,24 @@ const Wl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
|
|
|
2155
2155
|
o || (o = n(t.shape)), d = o(d, f);
|
|
2156
2156
|
else {
|
|
2157
2157
|
d.value = {};
|
|
2158
|
-
const
|
|
2159
|
-
for (const
|
|
2160
|
-
const x =
|
|
2161
|
-
A instanceof Promise ? m.push(A.then((O) => k ? Dn(O, d,
|
|
2158
|
+
const w = p.shape;
|
|
2159
|
+
for (const y of p.keys) {
|
|
2160
|
+
const x = w[y], A = x._zod.run({ value: g[y], issues: [] }, f), k = x._zod.optin === "optional" && x._zod.optout === "optional";
|
|
2161
|
+
A instanceof Promise ? m.push(A.then((O) => k ? Dn(O, d, y, g) : Bt(O, d, y))) : k ? Dn(A, d, y, g) : Bt(A, d, y);
|
|
2162
2162
|
}
|
|
2163
2163
|
}
|
|
2164
2164
|
if (!c)
|
|
2165
2165
|
return m.length ? Promise.all(m).then(() => d) : d;
|
|
2166
|
-
const h = [],
|
|
2167
|
-
for (const
|
|
2168
|
-
if (
|
|
2166
|
+
const h = [], v = p.keySet, I = c._zod, b = I.def.type;
|
|
2167
|
+
for (const w of Object.keys(g)) {
|
|
2168
|
+
if (v.has(w))
|
|
2169
2169
|
continue;
|
|
2170
2170
|
if (b === "never") {
|
|
2171
|
-
h.push(
|
|
2171
|
+
h.push(w);
|
|
2172
2172
|
continue;
|
|
2173
2173
|
}
|
|
2174
|
-
const
|
|
2175
|
-
|
|
2174
|
+
const y = I.run({ value: g[w], issues: [] }, f);
|
|
2175
|
+
y instanceof Promise ? m.push(y.then((x) => Bt(x, d, w))) : Bt(y, d, w);
|
|
2176
2176
|
}
|
|
2177
2177
|
return h.length && d.issues.push({
|
|
2178
2178
|
code: "unrecognized_keys",
|
|
@@ -2253,7 +2253,7 @@ const Ea = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
|
|
|
2253
2253
|
});
|
|
2254
2254
|
e._zod.parse = (o, a) => {
|
|
2255
2255
|
const i = o.value;
|
|
2256
|
-
if (!
|
|
2256
|
+
if (!nr(i))
|
|
2257
2257
|
return o.issues.push({
|
|
2258
2258
|
code: "invalid_type",
|
|
2259
2259
|
expected: "object",
|
|
@@ -2281,7 +2281,7 @@ function Zr(e, t) {
|
|
|
2281
2281
|
return { valid: !0, data: e };
|
|
2282
2282
|
if (e instanceof Date && t instanceof Date && +e == +t)
|
|
2283
2283
|
return { valid: !0, data: e };
|
|
2284
|
-
if (
|
|
2284
|
+
if (or(e) && or(t)) {
|
|
2285
2285
|
const r = Object.keys(t), n = Object.keys(e).filter((a) => r.indexOf(a) !== -1), o = { ...e, ...t };
|
|
2286
2286
|
for (const a of n) {
|
|
2287
2287
|
const i = Zr(e[a], t[a]);
|
|
@@ -2322,7 +2322,7 @@ function Bn(e, t, r) {
|
|
|
2322
2322
|
const Xl = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
|
|
2323
2323
|
V.init(e, t), e._zod.parse = (r, n) => {
|
|
2324
2324
|
const o = r.value;
|
|
2325
|
-
if (!
|
|
2325
|
+
if (!or(o))
|
|
2326
2326
|
return r.issues.push({
|
|
2327
2327
|
expected: "record",
|
|
2328
2328
|
code: "invalid_type",
|
|
@@ -2871,7 +2871,7 @@ function xa(e, t) {
|
|
|
2871
2871
|
maximum: e
|
|
2872
2872
|
});
|
|
2873
2873
|
}
|
|
2874
|
-
function
|
|
2874
|
+
function ar(e, t) {
|
|
2875
2875
|
return new sl({
|
|
2876
2876
|
check: "min_length",
|
|
2877
2877
|
...S(t),
|
|
@@ -3012,11 +3012,11 @@ class Yn {
|
|
|
3012
3012
|
case "string": {
|
|
3013
3013
|
const m = g;
|
|
3014
3014
|
m.type = "string";
|
|
3015
|
-
const { minimum: h, maximum:
|
|
3016
|
-
if (typeof h == "number" && (m.minLength = h), typeof
|
|
3017
|
-
const
|
|
3018
|
-
|
|
3019
|
-
...
|
|
3015
|
+
const { minimum: h, maximum: v, format: I, patterns: b, contentEncoding: w } = t._zod.bag;
|
|
3016
|
+
if (typeof h == "number" && (m.minLength = h), typeof v == "number" && (m.maxLength = v), I && (m.format = a[I] ?? I, m.format === "" && delete m.format), w && (m.contentEncoding = w), b && b.size > 0) {
|
|
3017
|
+
const y = [...b];
|
|
3018
|
+
y.length === 1 ? m.pattern = y[0].source : y.length > 1 && (s.schema.allOf = [
|
|
3019
|
+
...y.map((x) => ({
|
|
3020
3020
|
...this.target === "draft-7" ? { type: "string" } : {},
|
|
3021
3021
|
pattern: x.source
|
|
3022
3022
|
}))
|
|
@@ -3025,8 +3025,8 @@ class Yn {
|
|
|
3025
3025
|
break;
|
|
3026
3026
|
}
|
|
3027
3027
|
case "number": {
|
|
3028
|
-
const m = g, { minimum: h, maximum:
|
|
3029
|
-
typeof
|
|
3028
|
+
const m = g, { minimum: h, maximum: v, format: I, multipleOf: b, exclusiveMaximum: w, exclusiveMinimum: y } = t._zod.bag;
|
|
3029
|
+
typeof I == "string" && I.includes("int") ? m.type = "integer" : m.type = "number", typeof y == "number" && (m.exclusiveMinimum = y), typeof h == "number" && (m.minimum = h, typeof y == "number" && (y >= h ? delete m.minimum : delete m.exclusiveMinimum)), typeof w == "number" && (m.exclusiveMaximum = w), typeof v == "number" && (m.maximum = v, typeof w == "number" && (w <= v ? delete m.maximum : delete m.exclusiveMaximum)), typeof b == "number" && (m.multipleOf = b);
|
|
3030
3030
|
break;
|
|
3031
3031
|
}
|
|
3032
3032
|
case "boolean": {
|
|
@@ -3072,8 +3072,8 @@ class Yn {
|
|
|
3072
3072
|
break;
|
|
3073
3073
|
}
|
|
3074
3074
|
case "array": {
|
|
3075
|
-
const m = g, { minimum: h, maximum:
|
|
3076
|
-
typeof h == "number" && (m.minItems = h), typeof
|
|
3075
|
+
const m = g, { minimum: h, maximum: v } = t._zod.bag;
|
|
3076
|
+
typeof h == "number" && (m.minItems = h), typeof v == "number" && (m.maxItems = v), m.type = "array", m.items = this.process(o.element, { ...d, path: [...d.path, "items"] });
|
|
3077
3077
|
break;
|
|
3078
3078
|
}
|
|
3079
3079
|
case "object": {
|
|
@@ -3085,11 +3085,11 @@ class Yn {
|
|
|
3085
3085
|
...d,
|
|
3086
3086
|
path: [...d.path, "properties", b]
|
|
3087
3087
|
});
|
|
3088
|
-
const
|
|
3089
|
-
const
|
|
3090
|
-
return this.io === "input" ?
|
|
3088
|
+
const v = new Set(Object.keys(h)), I = new Set([...v].filter((b) => {
|
|
3089
|
+
const w = o.shape[b]._zod;
|
|
3090
|
+
return this.io === "input" ? w.optin === void 0 : w.optout === void 0;
|
|
3091
3091
|
}));
|
|
3092
|
-
|
|
3092
|
+
I.size > 0 && (m.required = Array.from(I)), o.catchall?._zod.def.type === "never" ? m.additionalProperties = !1 : o.catchall ? o.catchall && (m.additionalProperties = this.process(o.catchall, {
|
|
3093
3093
|
...d,
|
|
3094
3094
|
path: [...d.path, "additionalProperties"]
|
|
3095
3095
|
})) : this.io === "output" && (m.additionalProperties = !1);
|
|
@@ -3097,9 +3097,9 @@ class Yn {
|
|
|
3097
3097
|
}
|
|
3098
3098
|
case "union": {
|
|
3099
3099
|
const m = g;
|
|
3100
|
-
m.anyOf = o.options.map((h,
|
|
3100
|
+
m.anyOf = o.options.map((h, v) => this.process(h, {
|
|
3101
3101
|
...d,
|
|
3102
|
-
path: [...d.path, "anyOf",
|
|
3102
|
+
path: [...d.path, "anyOf", v]
|
|
3103
3103
|
}));
|
|
3104
3104
|
break;
|
|
3105
3105
|
}
|
|
@@ -3107,12 +3107,12 @@ class Yn {
|
|
|
3107
3107
|
const m = g, h = this.process(o.left, {
|
|
3108
3108
|
...d,
|
|
3109
3109
|
path: [...d.path, "allOf", 0]
|
|
3110
|
-
}),
|
|
3110
|
+
}), v = this.process(o.right, {
|
|
3111
3111
|
...d,
|
|
3112
3112
|
path: [...d.path, "allOf", 1]
|
|
3113
|
-
}),
|
|
3114
|
-
...
|
|
3115
|
-
...
|
|
3113
|
+
}), I = (w) => "allOf" in w && Object.keys(w).length === 1, b = [
|
|
3114
|
+
...I(h) ? h.allOf : [h],
|
|
3115
|
+
...I(v) ? v.allOf : [v]
|
|
3116
3116
|
];
|
|
3117
3117
|
m.allOf = b;
|
|
3118
3118
|
break;
|
|
@@ -3120,7 +3120,7 @@ class Yn {
|
|
|
3120
3120
|
case "tuple": {
|
|
3121
3121
|
const m = g;
|
|
3122
3122
|
m.type = "array";
|
|
3123
|
-
const h = o.items.map((b,
|
|
3123
|
+
const h = o.items.map((b, w) => this.process(b, { ...d, path: [...d.path, "prefixItems", w] }));
|
|
3124
3124
|
if (this.target === "draft-2020-12" ? m.prefixItems = h : m.items = h, o.rest) {
|
|
3125
3125
|
const b = this.process(o.rest, {
|
|
3126
3126
|
...d,
|
|
@@ -3132,8 +3132,8 @@ class Yn {
|
|
|
3132
3132
|
...d,
|
|
3133
3133
|
path: [...d.path, "items"]
|
|
3134
3134
|
}));
|
|
3135
|
-
const { minimum:
|
|
3136
|
-
typeof
|
|
3135
|
+
const { minimum: v, maximum: I } = t._zod.bag;
|
|
3136
|
+
typeof v == "number" && (m.minItems = v), typeof I == "number" && (m.maxItems = I);
|
|
3137
3137
|
break;
|
|
3138
3138
|
}
|
|
3139
3139
|
case "record": {
|
|
@@ -3156,26 +3156,26 @@ class Yn {
|
|
|
3156
3156
|
}
|
|
3157
3157
|
case "enum": {
|
|
3158
3158
|
const m = g, h = ca(o.entries);
|
|
3159
|
-
h.every((
|
|
3159
|
+
h.every((v) => typeof v == "number") && (m.type = "number"), h.every((v) => typeof v == "string") && (m.type = "string"), m.enum = h;
|
|
3160
3160
|
break;
|
|
3161
3161
|
}
|
|
3162
3162
|
case "literal": {
|
|
3163
3163
|
const m = g, h = [];
|
|
3164
|
-
for (const
|
|
3165
|
-
if (
|
|
3164
|
+
for (const v of o.values)
|
|
3165
|
+
if (v === void 0) {
|
|
3166
3166
|
if (this.unrepresentable === "throw")
|
|
3167
3167
|
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
3168
|
-
} else if (typeof
|
|
3168
|
+
} else if (typeof v == "bigint") {
|
|
3169
3169
|
if (this.unrepresentable === "throw")
|
|
3170
3170
|
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
3171
|
-
h.push(Number(
|
|
3171
|
+
h.push(Number(v));
|
|
3172
3172
|
} else
|
|
3173
|
-
h.push(
|
|
3173
|
+
h.push(v);
|
|
3174
3174
|
if (h.length !== 0) if (h.length === 1) {
|
|
3175
|
-
const
|
|
3176
|
-
m.type =
|
|
3175
|
+
const v = h[0];
|
|
3176
|
+
m.type = v === null ? "null" : typeof v, m.const = v;
|
|
3177
3177
|
} else
|
|
3178
|
-
h.every((
|
|
3178
|
+
h.every((v) => typeof v == "number") && (m.type = "number"), h.every((v) => typeof v == "string") && (m.type = "string"), h.every((v) => typeof v == "boolean") && (m.type = "string"), h.every((v) => v === null) && (m.type = "null"), m.enum = h;
|
|
3179
3179
|
break;
|
|
3180
3180
|
}
|
|
3181
3181
|
case "file": {
|
|
@@ -3183,8 +3183,8 @@ class Yn {
|
|
|
3183
3183
|
type: "string",
|
|
3184
3184
|
format: "binary",
|
|
3185
3185
|
contentEncoding: "binary"
|
|
3186
|
-
}, { minimum:
|
|
3187
|
-
|
|
3186
|
+
}, { minimum: v, maximum: I, mime: b } = t._zod.bag;
|
|
3187
|
+
v !== void 0 && (h.minLength = v), I !== void 0 && (h.maxLength = I), b ? b.length === 1 ? (h.contentMediaType = b[0], Object.assign(m, h)) : m.anyOf = b.map((w) => ({ ...h, contentMediaType: w })) : Object.assign(m, h);
|
|
3188
3188
|
break;
|
|
3189
3189
|
}
|
|
3190
3190
|
case "transform": {
|
|
@@ -3284,11 +3284,11 @@ class Yn {
|
|
|
3284
3284
|
const a = (p) => {
|
|
3285
3285
|
const d = this.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
3286
3286
|
if (n.external) {
|
|
3287
|
-
const h = n.external.registry.get(p[0])?.id,
|
|
3287
|
+
const h = n.external.registry.get(p[0])?.id, v = n.external.uri ?? ((b) => b);
|
|
3288
3288
|
if (h)
|
|
3289
|
-
return { ref:
|
|
3290
|
-
const
|
|
3291
|
-
return p[1].defId =
|
|
3289
|
+
return { ref: v(h) };
|
|
3290
|
+
const I = p[1].defId ?? p[1].schema.id ?? `schema${this.counter++}`;
|
|
3291
|
+
return p[1].defId = I, { defId: I, ref: `${v("__shared")}#/${d}/${I}` };
|
|
3292
3292
|
}
|
|
3293
3293
|
if (p[1] === o)
|
|
3294
3294
|
return { ref: "#" };
|
|
@@ -3345,8 +3345,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3345
3345
|
const h = f.ref;
|
|
3346
3346
|
if (f.ref = null, h) {
|
|
3347
3347
|
s(h, d);
|
|
3348
|
-
const
|
|
3349
|
-
|
|
3348
|
+
const v = this.seen.get(h).schema;
|
|
3349
|
+
v.$ref && d.target === "draft-7" ? (g.allOf = g.allOf ?? [], g.allOf.push(v)) : (Object.assign(g, v), Object.assign(g, m));
|
|
3350
3350
|
}
|
|
3351
3351
|
f.isParent || this.override({
|
|
3352
3352
|
zodSchema: p,
|
|
@@ -3535,9 +3535,9 @@ const dd = (e, t) => {
|
|
|
3535
3535
|
// enumerable: false,
|
|
3536
3536
|
}
|
|
3537
3537
|
});
|
|
3538
|
-
},
|
|
3538
|
+
}, pr = _("ZodError", dd, {
|
|
3539
3539
|
Parent: Error
|
|
3540
|
-
}), pd = /* @__PURE__ */ Sc(
|
|
3540
|
+
}), pd = /* @__PURE__ */ Sc(pr), md = /* @__PURE__ */ xc(pr), hd = /* @__PURE__ */ ma(pr), Ca = /* @__PURE__ */ ha(pr), W = /* @__PURE__ */ _("ZodType", (e, t) => (V.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(
|
|
3541
3541
|
{
|
|
3542
3542
|
...t,
|
|
3543
3543
|
checks: [
|
|
@@ -3562,9 +3562,9 @@ const dd = (e, t) => {
|
|
|
3562
3562
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Na = /* @__PURE__ */ _("_ZodString", (e, t) => {
|
|
3563
3563
|
en.init(e, t), W.init(e, t);
|
|
3564
3564
|
const r = e._zod.bag;
|
|
3565
|
-
e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(Vu(...n)), e.includes = (...n) => e.check(Ju(...n)), e.startsWith = (...n) => e.check(Gu(...n)), e.endsWith = (...n) => e.check(Wu(...n)), e.min = (...n) => e.check(
|
|
3565
|
+
e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(Vu(...n)), e.includes = (...n) => e.check(Ju(...n)), e.startsWith = (...n) => e.check(Gu(...n)), e.endsWith = (...n) => e.check(Wu(...n)), e.min = (...n) => e.check(ar(...n)), e.max = (...n) => e.check(xa(...n)), e.length = (...n) => e.check(ka(...n)), e.nonempty = (...n) => e.check(ar(1, ...n)), e.lowercase = (n) => e.check(Fu(n)), e.uppercase = (n) => e.check(Hu(n)), e.trim = () => e.check(Yu()), e.normalize = (...n) => e.check(qu(...n)), e.toLowerCase = () => e.check(Xu()), e.toUpperCase = () => e.check(Qu());
|
|
3566
3566
|
}), fd = /* @__PURE__ */ _("ZodString", (e, t) => {
|
|
3567
|
-
en.init(e, t), Na.init(e, t), e.email = (r) => e.check(mu(gd, r)), e.url = (r) => e.check(yu(vd, r)), e.jwt = (r) => e.check(Ou(Ad, r)), e.emoji = (r) => e.check(_u(yd, r)), e.guid = (r) => e.check(Jn(Xn, r)), e.uuid = (r) => e.check(hu(
|
|
3567
|
+
en.init(e, t), Na.init(e, t), e.email = (r) => e.check(mu(gd, r)), e.url = (r) => e.check(yu(vd, r)), e.jwt = (r) => e.check(Ou(Ad, r)), e.emoji = (r) => e.check(_u(yd, r)), e.guid = (r) => e.check(Jn(Xn, r)), e.uuid = (r) => e.check(hu(Ut, r)), e.uuidv4 = (r) => e.check(fu(Ut, r)), e.uuidv6 = (r) => e.check(gu(Ut, r)), e.uuidv7 = (r) => e.check(vu(Ut, r)), e.nanoid = (r) => e.check(bu(_d, r)), e.guid = (r) => e.check(Jn(Xn, r)), e.cuid = (r) => e.check(wu(bd, r)), e.cuid2 = (r) => e.check(Iu(wd, r)), e.ulid = (r) => e.check(Eu(Id, r)), e.base64 = (r) => e.check(Sa(za, r)), e.base64url = (r) => e.check(zu(Nd, r)), e.xid = (r) => e.check(Tu(Ed, r)), e.ksuid = (r) => e.check(Su(Td, r)), e.ipv4 = (r) => e.check(xu(Sd, r)), e.ipv6 = (r) => e.check(ku(xd, r)), e.cidrv4 = (r) => e.check(Cu(kd, r)), e.cidrv6 = (r) => e.check(Nu(Cd, r)), e.e164 = (r) => e.check(Au(zd, r)), e.datetime = (r) => e.check(od(r)), e.date = (r) => e.check(sd(r)), e.time = (r) => e.check(cd(r)), e.duration = (r) => e.check(ud(r));
|
|
3568
3568
|
});
|
|
3569
3569
|
function E(e) {
|
|
3570
3570
|
return pu(fd, e);
|
|
@@ -3575,7 +3575,7 @@ const Y = /* @__PURE__ */ _("ZodStringFormat", (e, t) => {
|
|
|
3575
3575
|
_l.init(e, t), Y.init(e, t);
|
|
3576
3576
|
}), Xn = /* @__PURE__ */ _("ZodGUID", (e, t) => {
|
|
3577
3577
|
vl.init(e, t), Y.init(e, t);
|
|
3578
|
-
}),
|
|
3578
|
+
}), Ut = /* @__PURE__ */ _("ZodUUID", (e, t) => {
|
|
3579
3579
|
yl.init(e, t), Y.init(e, t);
|
|
3580
3580
|
}), vd = /* @__PURE__ */ _("ZodURL", (e, t) => {
|
|
3581
3581
|
bl.init(e, t), Y.init(e, t);
|
|
@@ -3652,7 +3652,7 @@ function Ma(e) {
|
|
|
3652
3652
|
return ju(Zd, e);
|
|
3653
3653
|
}
|
|
3654
3654
|
const Dd = /* @__PURE__ */ _("ZodArray", (e, t) => {
|
|
3655
|
-
Gl.init(e, t), W.init(e, t), e.element = t.element, e.min = (r, n) => e.check(
|
|
3655
|
+
Gl.init(e, t), W.init(e, t), e.element = t.element, e.min = (r, n) => e.check(ar(r, n)), e.nonempty = (r) => e.check(ar(1, r)), e.max = (r, n) => e.check(xa(r, n)), e.length = (r, n) => e.check(ka(r, n)), e.unwrap = () => e.element;
|
|
3656
3656
|
});
|
|
3657
3657
|
function qe(e, t) {
|
|
3658
3658
|
return Ku(Dd, e, t);
|
|
@@ -3925,7 +3925,7 @@ function lp(e) {
|
|
|
3925
3925
|
}, e(r.value, r)));
|
|
3926
3926
|
return t;
|
|
3927
3927
|
}
|
|
3928
|
-
function
|
|
3928
|
+
function sr(e, t = {
|
|
3929
3929
|
error: `Input not instance of ${e.name}`
|
|
3930
3930
|
}) {
|
|
3931
3931
|
const r = new rn({
|
|
@@ -3937,10 +3937,10 @@ function ar(e, t = {
|
|
|
3937
3937
|
});
|
|
3938
3938
|
return r._zod.bag.Class = e, r;
|
|
3939
3939
|
}
|
|
3940
|
-
var
|
|
3940
|
+
var z;
|
|
3941
3941
|
(function(e) {
|
|
3942
3942
|
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";
|
|
3943
|
-
})(
|
|
3943
|
+
})(z || (z = {}));
|
|
3944
3944
|
var Mt = ({
|
|
3945
3945
|
prefix: e,
|
|
3946
3946
|
size: t = 16,
|
|
@@ -4012,12 +4012,12 @@ function gp(e) {
|
|
|
4012
4012
|
Error.stackTraceLimit = t;
|
|
4013
4013
|
}
|
|
4014
4014
|
}
|
|
4015
|
-
var
|
|
4015
|
+
var ir = Symbol.for("vercel.ai.validator");
|
|
4016
4016
|
function vp(e) {
|
|
4017
|
-
return { [
|
|
4017
|
+
return { [ir]: !0, validate: e };
|
|
4018
4018
|
}
|
|
4019
4019
|
function yp(e) {
|
|
4020
|
-
return typeof e == "object" && e !== null &&
|
|
4020
|
+
return typeof e == "object" && e !== null && ir in e && e[ir] === !0 && "validate" in e;
|
|
4021
4021
|
}
|
|
4022
4022
|
function _p(e) {
|
|
4023
4023
|
let t;
|
|
@@ -4031,7 +4031,7 @@ function wp(e) {
|
|
|
4031
4031
|
const r = await e["~standard"].validate(t);
|
|
4032
4032
|
return r.issues == null ? { success: !0, value: r.value } : {
|
|
4033
4033
|
success: !1,
|
|
4034
|
-
error: new
|
|
4034
|
+
error: new rr({
|
|
4035
4035
|
value: t,
|
|
4036
4036
|
cause: r.issues
|
|
4037
4037
|
})
|
|
@@ -4044,7 +4044,7 @@ async function no({
|
|
|
4044
4044
|
}) {
|
|
4045
4045
|
const r = await nn({ value: e, schema: t });
|
|
4046
4046
|
if (!r.success)
|
|
4047
|
-
throw
|
|
4047
|
+
throw rr.wrap({ value: e, cause: r.error });
|
|
4048
4048
|
return r.value;
|
|
4049
4049
|
}
|
|
4050
4050
|
async function nn({
|
|
@@ -4058,18 +4058,18 @@ async function nn({
|
|
|
4058
4058
|
const n = await r.validate(e);
|
|
4059
4059
|
return n.success ? { success: !0, value: n.value, rawValue: e } : {
|
|
4060
4060
|
success: !1,
|
|
4061
|
-
error:
|
|
4061
|
+
error: rr.wrap({ value: e, cause: n.error }),
|
|
4062
4062
|
rawValue: e
|
|
4063
4063
|
};
|
|
4064
4064
|
} catch (n) {
|
|
4065
4065
|
return {
|
|
4066
4066
|
success: !1,
|
|
4067
|
-
error:
|
|
4067
|
+
error: rr.wrap({ value: e, cause: n }),
|
|
4068
4068
|
rawValue: e
|
|
4069
4069
|
};
|
|
4070
4070
|
}
|
|
4071
4071
|
}
|
|
4072
|
-
async function
|
|
4072
|
+
async function cr({
|
|
4073
4073
|
text: e,
|
|
4074
4074
|
schema: t
|
|
4075
4075
|
}) {
|
|
@@ -4091,7 +4091,7 @@ function Ip({
|
|
|
4091
4091
|
return e.pipeThrough(new TextDecoderStream()).pipeThrough(new uc()).pipeThrough(
|
|
4092
4092
|
new TransformStream({
|
|
4093
4093
|
async transform({ data: r }, n) {
|
|
4094
|
-
r !== "[DONE]" && n.enqueue(await
|
|
4094
|
+
r !== "[DONE]" && n.enqueue(await cr({ text: r, schema: t }));
|
|
4095
4095
|
}
|
|
4096
4096
|
})
|
|
4097
4097
|
);
|
|
@@ -4141,7 +4141,7 @@ function xp(e, t) {
|
|
|
4141
4141
|
const a = {
|
|
4142
4142
|
type: "array"
|
|
4143
4143
|
};
|
|
4144
|
-
return (r = e.type) != null && r._def && ((o = (n = e.type) == null ? void 0 : n._def) == null ? void 0 : o.typeName) !==
|
|
4144
|
+
return (r = e.type) != null && r._def && ((o = (n = e.type) == null ? void 0 : n._def) == null ? void 0 : o.typeName) !== z.ZodAny && (a.items = U(e.type._def, {
|
|
4145
4145
|
...t,
|
|
4146
4146
|
currentPath: [...t.currentPath, "items"]
|
|
4147
4147
|
})), e.minLength && (a.minItems = e.minLength.value), e.maxLength && (a.maxItems = e.maxLength.value), e.exactLength && (a.minItems = e.exactLength.value, a.maxItems = e.exactLength.value), a;
|
|
@@ -4518,21 +4518,21 @@ function Ua(e, t) {
|
|
|
4518
4518
|
currentPath: [...t.currentPath, "additionalProperties"]
|
|
4519
4519
|
})) != null ? r : t.allowedAdditionalProperties
|
|
4520
4520
|
};
|
|
4521
|
-
if (((n = e.keyType) == null ? void 0 : n._def.typeName) ===
|
|
4521
|
+
if (((n = e.keyType) == null ? void 0 : n._def.typeName) === z.ZodString && ((o = e.keyType._def.checks) != null && o.length)) {
|
|
4522
4522
|
const { type: c, ...p } = Ba(e.keyType._def, t);
|
|
4523
4523
|
return {
|
|
4524
4524
|
...u,
|
|
4525
4525
|
propertyNames: p
|
|
4526
4526
|
};
|
|
4527
4527
|
} else {
|
|
4528
|
-
if (((a = e.keyType) == null ? void 0 : a._def.typeName) ===
|
|
4528
|
+
if (((a = e.keyType) == null ? void 0 : a._def.typeName) === z.ZodEnum)
|
|
4529
4529
|
return {
|
|
4530
4530
|
...u,
|
|
4531
4531
|
propertyNames: {
|
|
4532
4532
|
enum: e.keyType._def.values
|
|
4533
4533
|
}
|
|
4534
4534
|
};
|
|
4535
|
-
if (((i = e.keyType) == null ? void 0 : i._def.typeName) ===
|
|
4535
|
+
if (((i = e.keyType) == null ? void 0 : i._def.typeName) === z.ZodBranded && e.keyType._def.type._def.typeName === z.ZodString && ((s = e.keyType._def.type._def.checks) != null && s.length)) {
|
|
4536
4536
|
const { type: c, ...p } = Da(
|
|
4537
4537
|
e.keyType._def,
|
|
4538
4538
|
t
|
|
@@ -4819,73 +4819,73 @@ function rm() {
|
|
|
4819
4819
|
}
|
|
4820
4820
|
var nm = (e, t) => U(e.innerType._def, t), om = (e, t, r) => {
|
|
4821
4821
|
switch (t) {
|
|
4822
|
-
case
|
|
4822
|
+
case z.ZodString:
|
|
4823
4823
|
return Ba(e, r);
|
|
4824
|
-
case
|
|
4824
|
+
case z.ZodNumber:
|
|
4825
4825
|
return Jp(e);
|
|
4826
|
-
case
|
|
4826
|
+
case z.ZodObject:
|
|
4827
4827
|
return Gp(e, r);
|
|
4828
|
-
case
|
|
4828
|
+
case z.ZodBigInt:
|
|
4829
4829
|
return kp(e);
|
|
4830
|
-
case
|
|
4830
|
+
case z.ZodBoolean:
|
|
4831
4831
|
return Cp();
|
|
4832
|
-
case
|
|
4832
|
+
case z.ZodDate:
|
|
4833
4833
|
return La(e, r);
|
|
4834
|
-
case
|
|
4834
|
+
case z.ZodUndefined:
|
|
4835
4835
|
return tm();
|
|
4836
|
-
case
|
|
4836
|
+
case z.ZodNull:
|
|
4837
4837
|
return jp();
|
|
4838
|
-
case
|
|
4838
|
+
case z.ZodArray:
|
|
4839
4839
|
return xp(e, r);
|
|
4840
|
-
case
|
|
4841
|
-
case
|
|
4840
|
+
case z.ZodUnion:
|
|
4841
|
+
case z.ZodDiscriminatedUnion:
|
|
4842
4842
|
return Vp(e, r);
|
|
4843
|
-
case
|
|
4843
|
+
case z.ZodIntersection:
|
|
4844
4844
|
return Rp(e, r);
|
|
4845
|
-
case
|
|
4845
|
+
case z.ZodTuple:
|
|
4846
4846
|
return em(e, r);
|
|
4847
|
-
case
|
|
4847
|
+
case z.ZodRecord:
|
|
4848
4848
|
return Ua(e, r);
|
|
4849
|
-
case
|
|
4849
|
+
case z.ZodLiteral:
|
|
4850
4850
|
return Pp(e);
|
|
4851
|
-
case
|
|
4851
|
+
case z.ZodEnum:
|
|
4852
4852
|
return Mp(e);
|
|
4853
|
-
case
|
|
4853
|
+
case z.ZodNativeEnum:
|
|
4854
4854
|
return Bp(e);
|
|
4855
|
-
case
|
|
4855
|
+
case z.ZodNullable:
|
|
4856
4856
|
return Hp(e, r);
|
|
4857
|
-
case
|
|
4857
|
+
case z.ZodOptional:
|
|
4858
4858
|
return Yp(e, r);
|
|
4859
|
-
case
|
|
4859
|
+
case z.ZodMap:
|
|
4860
4860
|
return Lp(e, r);
|
|
4861
|
-
case
|
|
4861
|
+
case z.ZodSet:
|
|
4862
4862
|
return Kp(e, r);
|
|
4863
|
-
case
|
|
4863
|
+
case z.ZodLazy:
|
|
4864
4864
|
return () => e.getter()._def;
|
|
4865
|
-
case
|
|
4865
|
+
case z.ZodPromise:
|
|
4866
4866
|
return Qp(e, r);
|
|
4867
|
-
case
|
|
4868
|
-
case
|
|
4867
|
+
case z.ZodNaN:
|
|
4868
|
+
case z.ZodNever:
|
|
4869
4869
|
return Up();
|
|
4870
|
-
case
|
|
4870
|
+
case z.ZodEffects:
|
|
4871
4871
|
return Op(e, r);
|
|
4872
|
-
case
|
|
4872
|
+
case z.ZodAny:
|
|
4873
4873
|
return me();
|
|
4874
|
-
case
|
|
4874
|
+
case z.ZodUnknown:
|
|
4875
4875
|
return rm();
|
|
4876
|
-
case
|
|
4876
|
+
case z.ZodDefault:
|
|
4877
4877
|
return Ap(e, r);
|
|
4878
|
-
case
|
|
4878
|
+
case z.ZodBranded:
|
|
4879
4879
|
return Da(e, r);
|
|
4880
|
-
case
|
|
4880
|
+
case z.ZodReadonly:
|
|
4881
4881
|
return nm(e, r);
|
|
4882
|
-
case
|
|
4882
|
+
case z.ZodCatch:
|
|
4883
4883
|
return Np(e, r);
|
|
4884
|
-
case
|
|
4884
|
+
case z.ZodPipeline:
|
|
4885
4885
|
return Xp(e, r);
|
|
4886
|
-
case
|
|
4887
|
-
case
|
|
4888
|
-
case
|
|
4886
|
+
case z.ZodFunction:
|
|
4887
|
+
case z.ZodVoid:
|
|
4888
|
+
case z.ZodSymbol:
|
|
4889
4889
|
return;
|
|
4890
4890
|
default:
|
|
4891
4891
|
return /* @__PURE__ */ ((n) => {
|
|
@@ -5045,7 +5045,7 @@ function on(e, {
|
|
|
5045
5045
|
[Ur]: !0,
|
|
5046
5046
|
_type: void 0,
|
|
5047
5047
|
// should never be used directly
|
|
5048
|
-
[
|
|
5048
|
+
[ir]: !0,
|
|
5049
5049
|
get jsonSchema() {
|
|
5050
5050
|
return typeof e == "function" && (e = e()), e;
|
|
5051
5051
|
},
|
|
@@ -5085,8 +5085,8 @@ var gm = Object.defineProperty, vm = (e, t) => {
|
|
|
5085
5085
|
Ha = ym;
|
|
5086
5086
|
var io = "5.0.78", Ja = oe([
|
|
5087
5087
|
E(),
|
|
5088
|
-
|
|
5089
|
-
|
|
5088
|
+
sr(Uint8Array),
|
|
5089
|
+
sr(ArrayBuffer),
|
|
5090
5090
|
Za(
|
|
5091
5091
|
// Buffer might not be available in some environments such as CloudFlare:
|
|
5092
5092
|
(e) => {
|
|
@@ -5113,12 +5113,12 @@ var io = "5.0.78", Ja = oe([
|
|
|
5113
5113
|
providerOptions: X.optional()
|
|
5114
5114
|
}), _m = P({
|
|
5115
5115
|
type: C("image"),
|
|
5116
|
-
image: oe([Ja,
|
|
5116
|
+
image: oe([Ja, sr(URL)]),
|
|
5117
5117
|
mediaType: E().optional(),
|
|
5118
5118
|
providerOptions: X.optional()
|
|
5119
5119
|
}), Wa = P({
|
|
5120
5120
|
type: C("file"),
|
|
5121
|
-
data: oe([Ja,
|
|
5121
|
+
data: oe([Ja, sr(URL)]),
|
|
5122
5122
|
filename: E().optional(),
|
|
5123
5123
|
mediaType: E(),
|
|
5124
5124
|
providerOptions: X.optional()
|
|
@@ -5630,17 +5630,17 @@ function Nm(e) {
|
|
|
5630
5630
|
async function Xa(e) {
|
|
5631
5631
|
if (e === void 0)
|
|
5632
5632
|
return { value: void 0, state: "undefined-input" };
|
|
5633
|
-
let t = await
|
|
5634
|
-
return t.success ? { value: t.value, state: "successful-parse" } : (t = await
|
|
5633
|
+
let t = await cr({ text: e });
|
|
5634
|
+
return t.success ? { value: t.value, state: "successful-parse" } : (t = await cr({ text: Nm(e) }), t.success ? { value: t.value, state: "repaired-parse" } : { value: void 0, state: "failed-parse" });
|
|
5635
5635
|
}
|
|
5636
|
-
function
|
|
5636
|
+
function Gt(e) {
|
|
5637
5637
|
return e.type.startsWith("tool-");
|
|
5638
5638
|
}
|
|
5639
5639
|
function zm(e) {
|
|
5640
5640
|
return e.type === "dynamic-tool";
|
|
5641
5641
|
}
|
|
5642
5642
|
function co(e) {
|
|
5643
|
-
return
|
|
5643
|
+
return Gt(e) || zm(e);
|
|
5644
5644
|
}
|
|
5645
5645
|
function lo(e) {
|
|
5646
5646
|
return e.type.split("-").slice(1).join("-");
|
|
@@ -5675,9 +5675,9 @@ function Om({
|
|
|
5675
5675
|
async transform(s, u) {
|
|
5676
5676
|
await n(async ({ state: c, write: p }) => {
|
|
5677
5677
|
var d, f, g, m;
|
|
5678
|
-
function h(
|
|
5679
|
-
const A = c.message.parts.filter(
|
|
5680
|
-
(k) => k.toolCallId ===
|
|
5678
|
+
function h(y) {
|
|
5679
|
+
const A = c.message.parts.filter(Gt).find(
|
|
5680
|
+
(k) => k.toolCallId === y
|
|
5681
5681
|
);
|
|
5682
5682
|
if (A == null)
|
|
5683
5683
|
throw new Error(
|
|
@@ -5685,11 +5685,11 @@ function Om({
|
|
|
5685
5685
|
);
|
|
5686
5686
|
return A;
|
|
5687
5687
|
}
|
|
5688
|
-
function y
|
|
5688
|
+
function v(y) {
|
|
5689
5689
|
const A = c.message.parts.filter(
|
|
5690
5690
|
(k) => k.type === "dynamic-tool"
|
|
5691
5691
|
).find(
|
|
5692
|
-
(k) => k.toolCallId ===
|
|
5692
|
+
(k) => k.toolCallId === y
|
|
5693
5693
|
);
|
|
5694
5694
|
if (A == null)
|
|
5695
5695
|
throw new Error(
|
|
@@ -5697,15 +5697,15 @@ function Om({
|
|
|
5697
5697
|
);
|
|
5698
5698
|
return A;
|
|
5699
5699
|
}
|
|
5700
|
-
function
|
|
5700
|
+
function I(y) {
|
|
5701
5701
|
var x;
|
|
5702
5702
|
const A = c.message.parts.find(
|
|
5703
|
-
(M) =>
|
|
5704
|
-
), k =
|
|
5705
|
-
A != null ? (A.state =
|
|
5706
|
-
type: `tool-${
|
|
5707
|
-
toolCallId:
|
|
5708
|
-
state:
|
|
5703
|
+
(M) => Gt(M) && M.toolCallId === y.toolCallId
|
|
5704
|
+
), k = y, O = A;
|
|
5705
|
+
A != null ? (A.state = y.state, O.input = k.input, O.output = k.output, O.errorText = k.errorText, O.rawInput = k.rawInput, O.preliminary = k.preliminary, O.providerExecuted = (x = k.providerExecuted) != null ? x : A.providerExecuted, k.providerMetadata != null && A.state === "input-available" && (A.callProviderMetadata = k.providerMetadata)) : c.message.parts.push({
|
|
5706
|
+
type: `tool-${y.toolName}`,
|
|
5707
|
+
toolCallId: y.toolCallId,
|
|
5708
|
+
state: y.state,
|
|
5709
5709
|
input: k.input,
|
|
5710
5710
|
output: k.output,
|
|
5711
5711
|
rawInput: k.rawInput,
|
|
@@ -5715,16 +5715,16 @@ function Om({
|
|
|
5715
5715
|
...k.providerMetadata != null ? { callProviderMetadata: k.providerMetadata } : {}
|
|
5716
5716
|
});
|
|
5717
5717
|
}
|
|
5718
|
-
function b(
|
|
5718
|
+
function b(y) {
|
|
5719
5719
|
var x;
|
|
5720
5720
|
const A = c.message.parts.find(
|
|
5721
|
-
(M) => M.type === "dynamic-tool" && M.toolCallId ===
|
|
5722
|
-
), k =
|
|
5723
|
-
A != null ? (A.state =
|
|
5721
|
+
(M) => M.type === "dynamic-tool" && M.toolCallId === y.toolCallId
|
|
5722
|
+
), k = y, O = A;
|
|
5723
|
+
A != null ? (A.state = y.state, O.toolName = y.toolName, O.input = k.input, O.output = k.output, O.errorText = k.errorText, O.rawInput = (x = k.rawInput) != null ? x : O.rawInput, O.preliminary = k.preliminary, k.providerMetadata != null && A.state === "input-available" && (A.callProviderMetadata = k.providerMetadata)) : c.message.parts.push({
|
|
5724
5724
|
type: "dynamic-tool",
|
|
5725
|
-
toolName:
|
|
5726
|
-
toolCallId:
|
|
5727
|
-
state:
|
|
5725
|
+
toolName: y.toolName,
|
|
5726
|
+
toolCallId: y.toolCallId,
|
|
5727
|
+
state: y.state,
|
|
5728
5728
|
input: k.input,
|
|
5729
5729
|
output: k.output,
|
|
5730
5730
|
errorText: k.errorText,
|
|
@@ -5732,9 +5732,9 @@ function Om({
|
|
|
5732
5732
|
...k.providerMetadata != null ? { callProviderMetadata: k.providerMetadata } : {}
|
|
5733
5733
|
});
|
|
5734
5734
|
}
|
|
5735
|
-
async function
|
|
5736
|
-
if (
|
|
5737
|
-
const x = c.message.metadata != null ? Ya(c.message.metadata,
|
|
5735
|
+
async function w(y) {
|
|
5736
|
+
if (y != null) {
|
|
5737
|
+
const x = c.message.metadata != null ? Ya(c.message.metadata, y) : y;
|
|
5738
5738
|
t != null && await no({
|
|
5739
5739
|
value: x,
|
|
5740
5740
|
schema: t
|
|
@@ -5743,43 +5743,43 @@ function Om({
|
|
|
5743
5743
|
}
|
|
5744
5744
|
switch (s.type) {
|
|
5745
5745
|
case "text-start": {
|
|
5746
|
-
const
|
|
5746
|
+
const y = {
|
|
5747
5747
|
type: "text",
|
|
5748
5748
|
text: "",
|
|
5749
5749
|
providerMetadata: s.providerMetadata,
|
|
5750
5750
|
state: "streaming"
|
|
5751
5751
|
};
|
|
5752
|
-
c.activeTextParts[s.id] =
|
|
5752
|
+
c.activeTextParts[s.id] = y, c.message.parts.push(y), p();
|
|
5753
5753
|
break;
|
|
5754
5754
|
}
|
|
5755
5755
|
case "text-delta": {
|
|
5756
|
-
const
|
|
5757
|
-
|
|
5756
|
+
const y = c.activeTextParts[s.id];
|
|
5757
|
+
y.text += s.delta, y.providerMetadata = (d = s.providerMetadata) != null ? d : y.providerMetadata, p();
|
|
5758
5758
|
break;
|
|
5759
5759
|
}
|
|
5760
5760
|
case "text-end": {
|
|
5761
|
-
const
|
|
5762
|
-
|
|
5761
|
+
const y = c.activeTextParts[s.id];
|
|
5762
|
+
y.state = "done", y.providerMetadata = (f = s.providerMetadata) != null ? f : y.providerMetadata, delete c.activeTextParts[s.id], p();
|
|
5763
5763
|
break;
|
|
5764
5764
|
}
|
|
5765
5765
|
case "reasoning-start": {
|
|
5766
|
-
const
|
|
5766
|
+
const y = {
|
|
5767
5767
|
type: "reasoning",
|
|
5768
5768
|
text: "",
|
|
5769
5769
|
providerMetadata: s.providerMetadata,
|
|
5770
5770
|
state: "streaming"
|
|
5771
5771
|
};
|
|
5772
|
-
c.activeReasoningParts[s.id] =
|
|
5772
|
+
c.activeReasoningParts[s.id] = y, c.message.parts.push(y), p();
|
|
5773
5773
|
break;
|
|
5774
5774
|
}
|
|
5775
5775
|
case "reasoning-delta": {
|
|
5776
|
-
const
|
|
5777
|
-
|
|
5776
|
+
const y = c.activeReasoningParts[s.id];
|
|
5777
|
+
y.text += s.delta, y.providerMetadata = (g = s.providerMetadata) != null ? g : y.providerMetadata, p();
|
|
5778
5778
|
break;
|
|
5779
5779
|
}
|
|
5780
5780
|
case "reasoning-end": {
|
|
5781
|
-
const
|
|
5782
|
-
|
|
5781
|
+
const y = c.activeReasoningParts[s.id];
|
|
5782
|
+
y.providerMetadata = (m = s.providerMetadata) != null ? m : y.providerMetadata, y.state = "done", delete c.activeReasoningParts[s.id], p();
|
|
5783
5783
|
break;
|
|
5784
5784
|
}
|
|
5785
5785
|
case "file": {
|
|
@@ -5812,18 +5812,18 @@ function Om({
|
|
|
5812
5812
|
break;
|
|
5813
5813
|
}
|
|
5814
5814
|
case "tool-input-start": {
|
|
5815
|
-
const
|
|
5815
|
+
const y = c.message.parts.filter(Gt);
|
|
5816
5816
|
c.partialToolCalls[s.toolCallId] = {
|
|
5817
5817
|
text: "",
|
|
5818
5818
|
toolName: s.toolName,
|
|
5819
|
-
index:
|
|
5819
|
+
index: y.length,
|
|
5820
5820
|
dynamic: s.dynamic
|
|
5821
5821
|
}, s.dynamic ? b({
|
|
5822
5822
|
toolCallId: s.toolCallId,
|
|
5823
5823
|
toolName: s.toolName,
|
|
5824
5824
|
state: "input-streaming",
|
|
5825
5825
|
input: void 0
|
|
5826
|
-
}) :
|
|
5826
|
+
}) : I({
|
|
5827
5827
|
toolCallId: s.toolCallId,
|
|
5828
5828
|
toolName: s.toolName,
|
|
5829
5829
|
state: "input-streaming",
|
|
@@ -5833,19 +5833,19 @@ function Om({
|
|
|
5833
5833
|
break;
|
|
5834
5834
|
}
|
|
5835
5835
|
case "tool-input-delta": {
|
|
5836
|
-
const
|
|
5837
|
-
|
|
5836
|
+
const y = c.partialToolCalls[s.toolCallId];
|
|
5837
|
+
y.text += s.inputTextDelta;
|
|
5838
5838
|
const { value: x } = await Xa(
|
|
5839
|
-
|
|
5839
|
+
y.text
|
|
5840
5840
|
);
|
|
5841
|
-
|
|
5841
|
+
y.dynamic ? b({
|
|
5842
5842
|
toolCallId: s.toolCallId,
|
|
5843
|
-
toolName:
|
|
5843
|
+
toolName: y.toolName,
|
|
5844
5844
|
state: "input-streaming",
|
|
5845
5845
|
input: x
|
|
5846
|
-
}) :
|
|
5846
|
+
}) : I({
|
|
5847
5847
|
toolCallId: s.toolCallId,
|
|
5848
|
-
toolName:
|
|
5848
|
+
toolName: y.toolName,
|
|
5849
5849
|
state: "input-streaming",
|
|
5850
5850
|
input: x
|
|
5851
5851
|
}), p();
|
|
@@ -5858,7 +5858,7 @@ function Om({
|
|
|
5858
5858
|
state: "input-available",
|
|
5859
5859
|
input: s.input,
|
|
5860
5860
|
providerMetadata: s.providerMetadata
|
|
5861
|
-
}) :
|
|
5861
|
+
}) : I({
|
|
5862
5862
|
toolCallId: s.toolCallId,
|
|
5863
5863
|
toolName: s.toolName,
|
|
5864
5864
|
state: "input-available",
|
|
@@ -5878,7 +5878,7 @@ function Om({
|
|
|
5878
5878
|
input: s.input,
|
|
5879
5879
|
errorText: s.errorText,
|
|
5880
5880
|
providerMetadata: s.providerMetadata
|
|
5881
|
-
}) :
|
|
5881
|
+
}) : I({
|
|
5882
5882
|
toolCallId: s.toolCallId,
|
|
5883
5883
|
toolName: s.toolName,
|
|
5884
5884
|
state: "output-error",
|
|
@@ -5892,24 +5892,24 @@ function Om({
|
|
|
5892
5892
|
}
|
|
5893
5893
|
case "tool-output-available": {
|
|
5894
5894
|
if (s.dynamic) {
|
|
5895
|
-
const
|
|
5895
|
+
const y = v(
|
|
5896
5896
|
s.toolCallId
|
|
5897
5897
|
);
|
|
5898
5898
|
b({
|
|
5899
5899
|
toolCallId: s.toolCallId,
|
|
5900
|
-
toolName:
|
|
5900
|
+
toolName: y.toolName,
|
|
5901
5901
|
state: "output-available",
|
|
5902
|
-
input:
|
|
5902
|
+
input: y.input,
|
|
5903
5903
|
output: s.output,
|
|
5904
5904
|
preliminary: s.preliminary
|
|
5905
5905
|
});
|
|
5906
5906
|
} else {
|
|
5907
|
-
const
|
|
5908
|
-
|
|
5907
|
+
const y = h(s.toolCallId);
|
|
5908
|
+
I({
|
|
5909
5909
|
toolCallId: s.toolCallId,
|
|
5910
|
-
toolName: lo(
|
|
5910
|
+
toolName: lo(y),
|
|
5911
5911
|
state: "output-available",
|
|
5912
|
-
input:
|
|
5912
|
+
input: y.input,
|
|
5913
5913
|
output: s.output,
|
|
5914
5914
|
providerExecuted: s.providerExecuted,
|
|
5915
5915
|
preliminary: s.preliminary
|
|
@@ -5920,24 +5920,24 @@ function Om({
|
|
|
5920
5920
|
}
|
|
5921
5921
|
case "tool-output-error": {
|
|
5922
5922
|
if (s.dynamic) {
|
|
5923
|
-
const
|
|
5923
|
+
const y = v(
|
|
5924
5924
|
s.toolCallId
|
|
5925
5925
|
);
|
|
5926
5926
|
b({
|
|
5927
5927
|
toolCallId: s.toolCallId,
|
|
5928
|
-
toolName:
|
|
5928
|
+
toolName: y.toolName,
|
|
5929
5929
|
state: "output-error",
|
|
5930
|
-
input:
|
|
5930
|
+
input: y.input,
|
|
5931
5931
|
errorText: s.errorText
|
|
5932
5932
|
});
|
|
5933
5933
|
} else {
|
|
5934
|
-
const
|
|
5935
|
-
|
|
5934
|
+
const y = h(s.toolCallId);
|
|
5935
|
+
I({
|
|
5936
5936
|
toolCallId: s.toolCallId,
|
|
5937
|
-
toolName: lo(
|
|
5937
|
+
toolName: lo(y),
|
|
5938
5938
|
state: "output-error",
|
|
5939
|
-
input:
|
|
5940
|
-
rawInput:
|
|
5939
|
+
input: y.input,
|
|
5940
|
+
rawInput: y.rawInput,
|
|
5941
5941
|
errorText: s.errorText
|
|
5942
5942
|
});
|
|
5943
5943
|
}
|
|
@@ -5953,15 +5953,15 @@ function Om({
|
|
|
5953
5953
|
break;
|
|
5954
5954
|
}
|
|
5955
5955
|
case "start": {
|
|
5956
|
-
s.messageId != null && (c.message.id = s.messageId), await
|
|
5956
|
+
s.messageId != null && (c.message.id = s.messageId), await w(s.messageMetadata), (s.messageId != null || s.messageMetadata != null) && p();
|
|
5957
5957
|
break;
|
|
5958
5958
|
}
|
|
5959
5959
|
case "finish": {
|
|
5960
|
-
await
|
|
5960
|
+
await w(s.messageMetadata), s.messageMetadata != null && p();
|
|
5961
5961
|
break;
|
|
5962
5962
|
}
|
|
5963
5963
|
case "message-metadata": {
|
|
5964
|
-
await
|
|
5964
|
+
await w(s.messageMetadata), s.messageMetadata != null && p();
|
|
5965
5965
|
break;
|
|
5966
5966
|
}
|
|
5967
5967
|
case "error": {
|
|
@@ -5974,15 +5974,15 @@ function Om({
|
|
|
5974
5974
|
value: s.data,
|
|
5975
5975
|
schema: r[s.type]
|
|
5976
5976
|
});
|
|
5977
|
-
const
|
|
5978
|
-
if (
|
|
5979
|
-
i?.(
|
|
5977
|
+
const y = s;
|
|
5978
|
+
if (y.transient) {
|
|
5979
|
+
i?.(y);
|
|
5980
5980
|
break;
|
|
5981
5981
|
}
|
|
5982
|
-
const x =
|
|
5983
|
-
(A) =>
|
|
5982
|
+
const x = y.id != null ? c.message.parts.find(
|
|
5983
|
+
(A) => y.type === A.type && y.id === A.id
|
|
5984
5984
|
) : void 0;
|
|
5985
|
-
x != null ? x.data =
|
|
5985
|
+
x != null ? x.data = y.data : c.message.parts.push(y), i?.(y), p();
|
|
5986
5986
|
}
|
|
5987
5987
|
}
|
|
5988
5988
|
u.enqueue(s);
|
|
@@ -6080,7 +6080,7 @@ var Pm = () => ({
|
|
|
6080
6080
|
}
|
|
6081
6081
|
},
|
|
6082
6082
|
async parseOutput({ text: r }, n) {
|
|
6083
|
-
const o = await
|
|
6083
|
+
const o = await cr({ text: r });
|
|
6084
6084
|
if (!o.success)
|
|
6085
6085
|
throw new so({
|
|
6086
6086
|
message: "No object generated: could not parse the response.",
|
|
@@ -6187,15 +6187,15 @@ kt.extend({
|
|
|
6187
6187
|
toolResult: pe()
|
|
6188
6188
|
})
|
|
6189
6189
|
);
|
|
6190
|
-
var
|
|
6191
|
-
jsonrpc: C(
|
|
6190
|
+
var mr = "2.0", Wm = P({
|
|
6191
|
+
jsonrpc: C(mr),
|
|
6192
6192
|
id: oe([E(), St().int()])
|
|
6193
6193
|
}).merge(Lm).strict(), qm = P({
|
|
6194
|
-
jsonrpc: C(
|
|
6194
|
+
jsonrpc: C(mr),
|
|
6195
6195
|
id: oe([E(), St().int()]),
|
|
6196
6196
|
result: kt
|
|
6197
6197
|
}).strict(), Ym = P({
|
|
6198
|
-
jsonrpc: C(
|
|
6198
|
+
jsonrpc: C(mr),
|
|
6199
6199
|
id: oe([E(), St().int()]),
|
|
6200
6200
|
error: P({
|
|
6201
6201
|
code: St().int(),
|
|
@@ -6203,7 +6203,7 @@ var pr = "2.0", Wm = P({
|
|
|
6203
6203
|
data: K(pe())
|
|
6204
6204
|
})
|
|
6205
6205
|
}).strict(), Xm = P({
|
|
6206
|
-
jsonrpc: C(
|
|
6206
|
+
jsonrpc: C(mr)
|
|
6207
6207
|
}).merge(
|
|
6208
6208
|
P({
|
|
6209
6209
|
method: E(),
|
|
@@ -6273,7 +6273,7 @@ var Km = class {
|
|
|
6273
6273
|
messages: t.messages,
|
|
6274
6274
|
trigger: t.trigger,
|
|
6275
6275
|
messageId: t.messageId
|
|
6276
|
-
}, m = (o = p?.credentials) != null ? o : c,
|
|
6276
|
+
}, m = (o = p?.credentials) != null ? o : c, v = await ((a = this.fetch) != null ? a : globalThis.fetch)(d, {
|
|
6277
6277
|
method: "POST",
|
|
6278
6278
|
headers: ro(
|
|
6279
6279
|
{
|
|
@@ -6287,13 +6287,13 @@ var Km = class {
|
|
|
6287
6287
|
credentials: m,
|
|
6288
6288
|
signal: e
|
|
6289
6289
|
});
|
|
6290
|
-
if (!
|
|
6290
|
+
if (!v.ok)
|
|
6291
6291
|
throw new Error(
|
|
6292
|
-
(i = await
|
|
6292
|
+
(i = await v.text()) != null ? i : "Failed to fetch the chat response."
|
|
6293
6293
|
);
|
|
6294
|
-
if (!
|
|
6294
|
+
if (!v.body)
|
|
6295
6295
|
throw new Error("The response body is empty.");
|
|
6296
|
-
return this.processResponseStream(
|
|
6296
|
+
return this.processResponseStream(v.body);
|
|
6297
6297
|
}
|
|
6298
6298
|
async reconnectToStream(e) {
|
|
6299
6299
|
var t, r, n, o, a;
|
|
@@ -6356,7 +6356,7 @@ var Km = class {
|
|
|
6356
6356
|
sendAutomaticallyWhen: p
|
|
6357
6357
|
}) {
|
|
6358
6358
|
this.activeResponse = void 0, this.jobExecutor = new $m(), this.sendMessage = async (d, f) => {
|
|
6359
|
-
var g, m, h,
|
|
6359
|
+
var g, m, h, v;
|
|
6360
6360
|
if (d == null) {
|
|
6361
6361
|
await this.makeRequest({
|
|
6362
6362
|
trigger: "submit-message",
|
|
@@ -6365,15 +6365,15 @@ var Km = class {
|
|
|
6365
6365
|
});
|
|
6366
6366
|
return;
|
|
6367
6367
|
}
|
|
6368
|
-
let
|
|
6369
|
-
if ("text" in d || "files" in d ?
|
|
6368
|
+
let I;
|
|
6369
|
+
if ("text" in d || "files" in d ? I = {
|
|
6370
6370
|
parts: [
|
|
6371
6371
|
...Array.isArray(d.files) ? d.files : await Qm(d.files),
|
|
6372
6372
|
..."text" in d && d.text != null ? [{ type: "text", text: d.text }] : []
|
|
6373
6373
|
]
|
|
6374
|
-
} :
|
|
6374
|
+
} : I = d, d.messageId != null) {
|
|
6375
6375
|
const b = this.state.messages.findIndex(
|
|
6376
|
-
(
|
|
6376
|
+
(w) => w.id === d.messageId
|
|
6377
6377
|
);
|
|
6378
6378
|
if (b === -1)
|
|
6379
6379
|
throw new Error(`message with id ${d.messageId} not found`);
|
|
@@ -6382,16 +6382,16 @@ var Km = class {
|
|
|
6382
6382
|
`message with id ${d.messageId} is not a user message`
|
|
6383
6383
|
);
|
|
6384
6384
|
this.state.messages = this.state.messages.slice(0, b + 1), this.state.replaceMessage(b, {
|
|
6385
|
-
...
|
|
6385
|
+
...I,
|
|
6386
6386
|
id: d.messageId,
|
|
6387
|
-
role: (m =
|
|
6387
|
+
role: (m = I.role) != null ? m : "user",
|
|
6388
6388
|
metadata: d.metadata
|
|
6389
6389
|
});
|
|
6390
6390
|
} else
|
|
6391
6391
|
this.state.pushMessage({
|
|
6392
|
-
...
|
|
6393
|
-
id: (h =
|
|
6394
|
-
role: (
|
|
6392
|
+
...I,
|
|
6393
|
+
id: (h = I.id) != null ? h : this.generateId(),
|
|
6394
|
+
role: (v = I.role) != null ? v : "user",
|
|
6395
6395
|
metadata: d.metadata
|
|
6396
6396
|
});
|
|
6397
6397
|
await this.makeRequest({
|
|
@@ -6426,23 +6426,23 @@ var Km = class {
|
|
|
6426
6426
|
output: m,
|
|
6427
6427
|
errorText: h
|
|
6428
6428
|
}) => this.jobExecutor.run(async () => {
|
|
6429
|
-
var
|
|
6430
|
-
const b = this.state.messages,
|
|
6429
|
+
var v, I;
|
|
6430
|
+
const b = this.state.messages, w = b[b.length - 1];
|
|
6431
6431
|
this.state.replaceMessage(b.length - 1, {
|
|
6432
|
-
...
|
|
6433
|
-
parts:
|
|
6434
|
-
(
|
|
6432
|
+
...w,
|
|
6433
|
+
parts: w.parts.map(
|
|
6434
|
+
(y) => co(y) && y.toolCallId === g ? { ...y, state: d, output: m, errorText: h } : y
|
|
6435
6435
|
)
|
|
6436
6436
|
}), this.activeResponse && (this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map(
|
|
6437
|
-
(
|
|
6438
|
-
...
|
|
6437
|
+
(y) => co(y) && y.toolCallId === g ? {
|
|
6438
|
+
...y,
|
|
6439
6439
|
state: d,
|
|
6440
6440
|
output: m,
|
|
6441
6441
|
errorText: h
|
|
6442
|
-
} :
|
|
6443
|
-
)), this.status !== "streaming" && this.status !== "submitted" && ((
|
|
6442
|
+
} : y
|
|
6443
|
+
)), this.status !== "streaming" && this.status !== "submitted" && ((v = this.sendAutomaticallyWhen) != null && v.call(this, { messages: this.state.messages })) && this.makeRequest({
|
|
6444
6444
|
trigger: "submit-message",
|
|
6445
|
-
messageId: (
|
|
6445
|
+
messageId: (I = this.lastMessage) == null ? void 0 : I.id
|
|
6446
6446
|
});
|
|
6447
6447
|
}), this.stop = async () => {
|
|
6448
6448
|
var d;
|
|
@@ -6530,8 +6530,8 @@ var Km = class {
|
|
|
6530
6530
|
() => h({
|
|
6531
6531
|
state: f.state,
|
|
6532
6532
|
write: () => {
|
|
6533
|
-
var
|
|
6534
|
-
this.setStatus({ status: "streaming" }), f.state.message.id === ((
|
|
6533
|
+
var v;
|
|
6534
|
+
this.setStatus({ status: "streaming" }), f.state.message.id === ((v = this.lastMessage) == null ? void 0 : v.id) ? this.state.replaceMessage(
|
|
6535
6535
|
this.state.messages.length - 1,
|
|
6536
6536
|
f.state.message
|
|
6537
6537
|
) : this.state.pushMessage(f.state.message);
|
|
@@ -6614,7 +6614,7 @@ const Ka = async () => (xr || (xr = import(
|
|
|
6614
6614
|
"./index.790ujKXR.js"
|
|
6615
6615
|
)), xr), es = async () => (kr || (kr = import(
|
|
6616
6616
|
/* webpackChunkName: "toast-utilities" */
|
|
6617
|
-
"./index.
|
|
6617
|
+
"./index.DB7deAkb.js"
|
|
6618
6618
|
).then((e) => e.utilities)), kr), ah = async () => {
|
|
6619
6619
|
try {
|
|
6620
6620
|
await Promise.all([Ka(), es()]);
|
|
@@ -6636,9 +6636,9 @@ const Ka = async () => (xr || (xr = import(
|
|
|
6636
6636
|
}, 100);
|
|
6637
6637
|
} catch {
|
|
6638
6638
|
}
|
|
6639
|
-
}, Ct = (e, t) => ts(e, "success", t), r1 = (e, t) => ts(e, "error", t), wt = "FOOTER_BOTTOM",
|
|
6639
|
+
}, Ct = (e, t) => ts(e, "success", t), r1 = (e, t) => ts(e, "error", t), wt = "FOOTER_BOTTOM", lr = "FOOTER_TOP", Wt = "APP_SET_FOOTER_POSITION", rs = "APP_SET_FOOTER_HEIGHT", ns = "APP_SET_OLED_MODE", sh = (e, t) => {
|
|
6640
6640
|
switch (t.type) {
|
|
6641
|
-
case
|
|
6641
|
+
case Wt:
|
|
6642
6642
|
return {
|
|
6643
6643
|
...e,
|
|
6644
6644
|
footerPosition: t.payload.footerPosition,
|
|
@@ -6775,9 +6775,9 @@ var as = (e, t, r) => {
|
|
|
6775
6775
|
function mh(e, t) {
|
|
6776
6776
|
return t != null ? ph(e, t) : e;
|
|
6777
6777
|
}
|
|
6778
|
-
var ge,
|
|
6778
|
+
var ge, qt, Yt, vt, yt, _t, st, jr, Vr, hh = class {
|
|
6779
6779
|
constructor(e = []) {
|
|
6780
|
-
ke(this, ge, void 0), ke(this,
|
|
6780
|
+
ke(this, ge, void 0), ke(this, qt, "ready"), ke(this, Yt, void 0), ke(this, vt, /* @__PURE__ */ new Set()), ke(this, yt, /* @__PURE__ */ new Set()), ke(this, _t, /* @__PURE__ */ new Set()), this.pushMessage = (t) => {
|
|
6781
6781
|
Ue(this, ge, H(this, ge).concat(t)), H(this, st).call(this);
|
|
6782
6782
|
}, this.popMessage = () => {
|
|
6783
6783
|
Ue(this, ge, H(this, ge).slice(0, -1)), H(this, st).call(this);
|
|
@@ -6806,16 +6806,16 @@ var ge, Wt, qt, vt, yt, _t, st, jr, Vr, hh = class {
|
|
|
6806
6806
|
}), Ue(this, ge, e);
|
|
6807
6807
|
}
|
|
6808
6808
|
get status() {
|
|
6809
|
-
return H(this,
|
|
6809
|
+
return H(this, qt);
|
|
6810
6810
|
}
|
|
6811
6811
|
set status(e) {
|
|
6812
|
-
Ue(this,
|
|
6812
|
+
Ue(this, qt, e), H(this, jr).call(this);
|
|
6813
6813
|
}
|
|
6814
6814
|
get error() {
|
|
6815
|
-
return H(this,
|
|
6815
|
+
return H(this, Yt);
|
|
6816
6816
|
}
|
|
6817
6817
|
set error(e) {
|
|
6818
|
-
Ue(this,
|
|
6818
|
+
Ue(this, Yt, e), H(this, Vr).call(this);
|
|
6819
6819
|
}
|
|
6820
6820
|
get messages() {
|
|
6821
6821
|
return H(this, ge);
|
|
@@ -6825,8 +6825,8 @@ var ge, Wt, qt, vt, yt, _t, st, jr, Vr, hh = class {
|
|
|
6825
6825
|
}
|
|
6826
6826
|
};
|
|
6827
6827
|
ge = /* @__PURE__ */ new WeakMap();
|
|
6828
|
-
Wt = /* @__PURE__ */ new WeakMap();
|
|
6829
6828
|
qt = /* @__PURE__ */ new WeakMap();
|
|
6829
|
+
Yt = /* @__PURE__ */ new WeakMap();
|
|
6830
6830
|
vt = /* @__PURE__ */ new WeakMap();
|
|
6831
6831
|
yt = /* @__PURE__ */ new WeakMap();
|
|
6832
6832
|
_t = /* @__PURE__ */ new WeakMap();
|
|
@@ -6854,15 +6854,15 @@ function fh({
|
|
|
6854
6854
|
// optionsId is required to trigger re-subscription when the chat ID changes
|
|
6855
6855
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6856
6856
|
[e, a]
|
|
6857
|
-
), s =
|
|
6857
|
+
), s = Jt(
|
|
6858
6858
|
i,
|
|
6859
6859
|
() => n.current.messages,
|
|
6860
6860
|
() => n.current.messages
|
|
6861
|
-
), u =
|
|
6861
|
+
), u = Jt(
|
|
6862
6862
|
n.current["~registerStatusCallback"],
|
|
6863
6863
|
() => n.current.status,
|
|
6864
6864
|
() => n.current.status
|
|
6865
|
-
), c =
|
|
6865
|
+
), c = Jt(
|
|
6866
6866
|
n.current["~registerErrorCallback"],
|
|
6867
6867
|
() => n.current.error,
|
|
6868
6868
|
() => n.current.error
|
|
@@ -6895,7 +6895,7 @@ const ho = () => ({
|
|
|
6895
6895
|
onToolCall: /* @__PURE__ */ new Set()
|
|
6896
6896
|
}), ss = ai(null);
|
|
6897
6897
|
function Ye(e = {}) {
|
|
6898
|
-
const t =
|
|
6898
|
+
const t = re(ss);
|
|
6899
6899
|
if (!t)
|
|
6900
6900
|
throw new Error("useAiChat must be used within a AiChatProvider");
|
|
6901
6901
|
const r = j(e);
|
|
@@ -6968,26 +6968,26 @@ const vh = ({ chatId: e }) => {
|
|
|
6968
6968
|
t.length > 0 ? (n(e), a.current = !0) : i && a.current && (n(""), a.current = !1), o.current = e;
|
|
6969
6969
|
}, [e, t.length, n]), null;
|
|
6970
6970
|
};
|
|
6971
|
-
let
|
|
6971
|
+
let jt = !1, Nr = null;
|
|
6972
6972
|
const fo = ({
|
|
6973
6973
|
containerId: e,
|
|
6974
6974
|
...t
|
|
6975
6975
|
}) => {
|
|
6976
|
-
const [r, n] = R(
|
|
6976
|
+
const [r, n] = R(jt);
|
|
6977
6977
|
return $(() => {
|
|
6978
|
-
if (!
|
|
6978
|
+
if (!jt) {
|
|
6979
6979
|
const o = async () => {
|
|
6980
6980
|
try {
|
|
6981
6981
|
const { ToastContainer: i } = await import(
|
|
6982
6982
|
/* webpackChunkName: "toast-react-toastify" */
|
|
6983
6983
|
"./index.790ujKXR.js"
|
|
6984
6984
|
);
|
|
6985
|
-
Nr = i,
|
|
6985
|
+
Nr = i, jt = !0, n(!0);
|
|
6986
6986
|
} catch (i) {
|
|
6987
6987
|
console.error("Failed to load ToastContainer:", i);
|
|
6988
6988
|
}
|
|
6989
6989
|
}, a = () => {
|
|
6990
|
-
|
|
6990
|
+
jt || o();
|
|
6991
6991
|
};
|
|
6992
6992
|
return window.addEventListener("toast-request", a), () => {
|
|
6993
6993
|
window.removeEventListener("toast-request", a);
|
|
@@ -7067,42 +7067,42 @@ const fo = ({
|
|
|
7067
7067
|
},
|
|
7068
7068
|
setInitialMessages: () => {
|
|
7069
7069
|
}
|
|
7070
|
-
}),
|
|
7070
|
+
}), $t = pt.createContext({
|
|
7071
7071
|
state: {
|
|
7072
|
-
footerPosition:
|
|
7072
|
+
footerPosition: lr,
|
|
7073
7073
|
footerHeight: 0,
|
|
7074
7074
|
footerOffset: 0,
|
|
7075
7075
|
oledMode: !1
|
|
7076
7076
|
},
|
|
7077
7077
|
dispatch: () => {
|
|
7078
7078
|
}
|
|
7079
|
-
}), wh = "av-tooltip", Ih = "av-tooltip-arrow",
|
|
7079
|
+
}), wh = "av-tooltip", Ih = "av-tooltip-arrow", Vt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Eh = () => N("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"), go = ({
|
|
7080
7080
|
mode: e
|
|
7081
|
-
}) =>
|
|
7081
|
+
}) => N({
|
|
7082
7082
|
"bg-surface-darker": e === "dark" || e === "system",
|
|
7083
7083
|
"bg-surface-light": e === "light" || e === "alt-system",
|
|
7084
7084
|
"dark:bg-surface-light": e === "system",
|
|
7085
7085
|
"dark:bg-surface-darker": e === "alt-system"
|
|
7086
7086
|
}), Th = ({
|
|
7087
7087
|
mode: e
|
|
7088
|
-
}) =>
|
|
7088
|
+
}) => N({
|
|
7089
7089
|
"text-copy-light": e === "dark" || e === "system",
|
|
7090
7090
|
"text-copy-dark": e === "light" || e === "alt-system",
|
|
7091
7091
|
"dark:text-copy-dark": e === "system",
|
|
7092
7092
|
"dark:text-copy-light": e === "alt-system"
|
|
7093
|
-
}), Sh = () =>
|
|
7093
|
+
}), Sh = () => N("absolute", "size-2", "transform rotate-45"), xh = ({
|
|
7094
7094
|
mode: e,
|
|
7095
7095
|
className: t,
|
|
7096
7096
|
tooltipClassName: r,
|
|
7097
7097
|
arrowClassName: n
|
|
7098
7098
|
}) => {
|
|
7099
|
-
const o =
|
|
7099
|
+
const o = N("relative inline-block", t), a = N(
|
|
7100
7100
|
wh,
|
|
7101
7101
|
Eh(),
|
|
7102
7102
|
go({ mode: e }),
|
|
7103
7103
|
Th({ mode: e }),
|
|
7104
7104
|
r
|
|
7105
|
-
), i =
|
|
7105
|
+
), i = N(
|
|
7106
7106
|
Ih,
|
|
7107
7107
|
Sh(),
|
|
7108
7108
|
go({ mode: e }),
|
|
@@ -7125,12 +7125,12 @@ const fo = ({
|
|
|
7125
7125
|
h.stop(), m(!1);
|
|
7126
7126
|
}), c = j(null), p = j(null), [d, f] = R(!1), [g, m] = R(!1), h = Si(() => {
|
|
7127
7127
|
m(!1);
|
|
7128
|
-
}, Ch),
|
|
7128
|
+
}, Ch), v = xh({
|
|
7129
7129
|
mode: n,
|
|
7130
7130
|
className: a,
|
|
7131
7131
|
tooltipClassName: i,
|
|
7132
7132
|
arrowClassName: s
|
|
7133
|
-
}),
|
|
7133
|
+
}), I = kh({ delay: o }), b = D(async () => {
|
|
7134
7134
|
if (u.current && c.current && p.current) {
|
|
7135
7135
|
const {
|
|
7136
7136
|
x: A,
|
|
@@ -7150,9 +7150,9 @@ const fo = ({
|
|
|
7150
7150
|
]
|
|
7151
7151
|
});
|
|
7152
7152
|
c?.current?.style && Object.assign(c.current.style, {
|
|
7153
|
-
left:
|
|
7154
|
-
top:
|
|
7155
|
-
...
|
|
7153
|
+
left: Vt(A),
|
|
7154
|
+
top: Vt(k),
|
|
7155
|
+
...I
|
|
7156
7156
|
});
|
|
7157
7157
|
const Z = {
|
|
7158
7158
|
top: "bottom",
|
|
@@ -7161,20 +7161,20 @@ const fo = ({
|
|
|
7161
7161
|
left: "right"
|
|
7162
7162
|
}[M.split("-")[0]];
|
|
7163
7163
|
p?.current?.style && Object.assign(p.current.style, {
|
|
7164
|
-
left:
|
|
7165
|
-
top:
|
|
7164
|
+
left: Vt(O.arrow?.x),
|
|
7165
|
+
top: Vt(O.arrow?.y),
|
|
7166
7166
|
right: "",
|
|
7167
7167
|
bottom: "",
|
|
7168
7168
|
[Z]: "-4px"
|
|
7169
7169
|
});
|
|
7170
7170
|
}
|
|
7171
|
-
}, [r,
|
|
7171
|
+
}, [r, I, u]);
|
|
7172
7172
|
$(() => {
|
|
7173
7173
|
(async () => d && await b())();
|
|
7174
7174
|
}, [b, d]);
|
|
7175
|
-
const
|
|
7175
|
+
const w = () => {
|
|
7176
7176
|
f(!1), m(!0), h.start();
|
|
7177
|
-
},
|
|
7177
|
+
}, y = () => {
|
|
7178
7178
|
g || f(!0);
|
|
7179
7179
|
}, x = () => {
|
|
7180
7180
|
g || f(!1);
|
|
@@ -7182,11 +7182,11 @@ const fo = ({
|
|
|
7182
7182
|
return /* @__PURE__ */ T(
|
|
7183
7183
|
"div",
|
|
7184
7184
|
{
|
|
7185
|
-
className:
|
|
7185
|
+
className: v.wrapper,
|
|
7186
7186
|
ref: u,
|
|
7187
|
-
onMouseEnter:
|
|
7187
|
+
onMouseEnter: y,
|
|
7188
7188
|
onMouseLeave: x,
|
|
7189
|
-
onClick:
|
|
7189
|
+
onClick: w,
|
|
7190
7190
|
children: [
|
|
7191
7191
|
e,
|
|
7192
7192
|
d && /* @__PURE__ */ T(
|
|
@@ -7194,10 +7194,10 @@ const fo = ({
|
|
|
7194
7194
|
{
|
|
7195
7195
|
role: "tooltip",
|
|
7196
7196
|
ref: c,
|
|
7197
|
-
className:
|
|
7197
|
+
className: v.tooltip,
|
|
7198
7198
|
children: [
|
|
7199
7199
|
t,
|
|
7200
|
-
/* @__PURE__ */ l("div", { ref: p, className:
|
|
7200
|
+
/* @__PURE__ */ l("div", { ref: p, className: v.arrow })
|
|
7201
7201
|
]
|
|
7202
7202
|
}
|
|
7203
7203
|
)
|
|
@@ -7244,7 +7244,7 @@ const Nh = ({
|
|
|
7244
7244
|
);
|
|
7245
7245
|
function cs(e, t) {
|
|
7246
7246
|
$(() => {
|
|
7247
|
-
if (
|
|
7247
|
+
if (Kt() && typeof window < "u")
|
|
7248
7248
|
return window.__VERSINI_DIGGIDY_TAURI_EVENTS__ && (window.__VERSINI_DIGGIDY_TAURI_EVENTS__[e] = t), () => {
|
|
7249
7249
|
window.__VERSINI_DIGGIDY_TAURI_EVENTS__ && (window.__VERSINI_DIGGIDY_TAURI_EVENTS__[e] = null);
|
|
7250
7250
|
};
|
|
@@ -7258,7 +7258,7 @@ const zh = ({
|
|
|
7258
7258
|
dispatch: a,
|
|
7259
7259
|
setChatId: i,
|
|
7260
7260
|
setInitialMessages: s
|
|
7261
|
-
} =
|
|
7261
|
+
} = re(xe), { id: u, setInput: c, stop: p } = Ye(), d = j(null), f = j(!1), { data: g, isSuccess: m } = We({
|
|
7262
7262
|
user: r?.username,
|
|
7263
7263
|
getAccessToken: t
|
|
7264
7264
|
}), h = D(() => {
|
|
@@ -7280,13 +7280,13 @@ const zh = ({
|
|
|
7280
7280
|
[
|
|
7281
7281
|
"mod+N",
|
|
7282
7282
|
() => {
|
|
7283
|
-
|
|
7283
|
+
Kt() && h();
|
|
7284
7284
|
}
|
|
7285
7285
|
],
|
|
7286
7286
|
[
|
|
7287
7287
|
"mod+T",
|
|
7288
7288
|
() => {
|
|
7289
|
-
|
|
7289
|
+
Kt() && h();
|
|
7290
7290
|
}
|
|
7291
7291
|
]
|
|
7292
7292
|
],
|
|
@@ -7297,7 +7297,7 @@ const zh = ({
|
|
|
7297
7297
|
*/
|
|
7298
7298
|
[]
|
|
7299
7299
|
);
|
|
7300
|
-
const
|
|
7300
|
+
const v = async (b) => {
|
|
7301
7301
|
b.preventDefault(), p(), a({
|
|
7302
7302
|
type: tt,
|
|
7303
7303
|
payload: {
|
|
@@ -7307,19 +7307,19 @@ const zh = ({
|
|
|
7307
7307
|
}
|
|
7308
7308
|
});
|
|
7309
7309
|
try {
|
|
7310
|
-
const
|
|
7310
|
+
const w = await t();
|
|
7311
7311
|
await fetch(`${ko}/api/abort`, {
|
|
7312
7312
|
method: "POST",
|
|
7313
7313
|
headers: {
|
|
7314
7314
|
"Content-Type": "application/json",
|
|
7315
|
-
Authorization: `Bearer ${
|
|
7315
|
+
Authorization: `Bearer ${w}`
|
|
7316
7316
|
},
|
|
7317
7317
|
body: JSON.stringify({ chatId: u })
|
|
7318
7318
|
});
|
|
7319
|
-
} catch (
|
|
7320
|
-
console.error("Failed to send abort signal:",
|
|
7319
|
+
} catch (w) {
|
|
7320
|
+
console.error("Failed to send abort signal:", w);
|
|
7321
7321
|
}
|
|
7322
|
-
},
|
|
7322
|
+
}, I = (b) => {
|
|
7323
7323
|
b.preventDefault(), h();
|
|
7324
7324
|
};
|
|
7325
7325
|
return $(() => {
|
|
@@ -7340,14 +7340,14 @@ const zh = ({
|
|
|
7340
7340
|
focusMode: "light",
|
|
7341
7341
|
label: "New Chat",
|
|
7342
7342
|
ref: d,
|
|
7343
|
-
onClick: n || o ?
|
|
7343
|
+
onClick: n || o ? v : I,
|
|
7344
7344
|
disabled: !(m && g),
|
|
7345
7345
|
children: n || o ? /* @__PURE__ */ l(Zi, { size: ze, monotone: !0 }) : /* @__PURE__ */ l(Li, { size: ze })
|
|
7346
7346
|
}
|
|
7347
7347
|
)
|
|
7348
7348
|
}
|
|
7349
7349
|
);
|
|
7350
|
-
},
|
|
7350
|
+
}, ur = (e) => {
|
|
7351
7351
|
const { check: t } = Gr();
|
|
7352
7352
|
return t(e);
|
|
7353
7353
|
}, Ah = "av-messagebox", Oh = "av-panel", Mh = ({
|
|
@@ -7361,7 +7361,7 @@ const zh = ({
|
|
|
7361
7361
|
semantic: s = !1,
|
|
7362
7362
|
...u
|
|
7363
7363
|
}) => {
|
|
7364
|
-
const c =
|
|
7364
|
+
const c = N(a, n);
|
|
7365
7365
|
return /* @__PURE__ */ T(
|
|
7366
7366
|
"svg",
|
|
7367
7367
|
{
|
|
@@ -7444,19 +7444,19 @@ function Rh({
|
|
|
7444
7444
|
}), m = Bo(f, {
|
|
7445
7445
|
outsidePress: !1,
|
|
7446
7446
|
outsidePressEvent: "mousedown"
|
|
7447
|
-
}), h = Uo(f),
|
|
7447
|
+
}), h = Uo(f), v = jo([g, m, h]);
|
|
7448
7448
|
return ie.useMemo(
|
|
7449
7449
|
() => ({
|
|
7450
7450
|
open: c,
|
|
7451
7451
|
setOpen: p,
|
|
7452
|
-
...
|
|
7452
|
+
...v,
|
|
7453
7453
|
...d,
|
|
7454
7454
|
labelId: a,
|
|
7455
7455
|
descriptionId: s,
|
|
7456
7456
|
setLabelId: i,
|
|
7457
7457
|
setDescriptionId: u
|
|
7458
7458
|
}),
|
|
7459
|
-
[c, p,
|
|
7459
|
+
[c, p, v, d, a, s]
|
|
7460
7460
|
);
|
|
7461
7461
|
}
|
|
7462
7462
|
const hr = () => {
|
|
@@ -7476,7 +7476,7 @@ const Zh = ie.forwardRef(function(e, t) {
|
|
|
7476
7476
|
const { context: r, ...n } = hr(), o = Wr([n.refs.setFloating, t]);
|
|
7477
7477
|
if (!r.open)
|
|
7478
7478
|
return null;
|
|
7479
|
-
const { overlayBackground: a, ...i } = e, s =
|
|
7479
|
+
const { overlayBackground: a, ...i } = e, s = N("grid place-items-center", {
|
|
7480
7480
|
[`${a}`]: a,
|
|
7481
7481
|
"bg-black sm:bg-black/[.8]": !a
|
|
7482
7482
|
});
|
|
@@ -7527,7 +7527,7 @@ const Ee = "panel", Qe = "messagebox", Uh = ({
|
|
|
7527
7527
|
}) => {
|
|
7528
7528
|
const i = a ?? (t === Ee ? "large" : void 0);
|
|
7529
7529
|
return {
|
|
7530
|
-
main:
|
|
7530
|
+
main: N("prose prose-lighter flex flex-col bg-surface-dark", {
|
|
7531
7531
|
"duration-200 ease-out": n,
|
|
7532
7532
|
/**
|
|
7533
7533
|
* Panel styles
|
|
@@ -7593,14 +7593,14 @@ const Ee = "panel", Qe = "messagebox", Uh = ({
|
|
|
7593
7593
|
transform: "translateY(-666vh)"
|
|
7594
7594
|
} : {}
|
|
7595
7595
|
);
|
|
7596
|
-
const
|
|
7596
|
+
const v = setTimeout(() => {
|
|
7597
7597
|
m(
|
|
7598
7598
|
u ? c === "fade" ? { opacity: 1 } : {
|
|
7599
7599
|
transform: "translateY(0)"
|
|
7600
7600
|
} : {}
|
|
7601
7601
|
);
|
|
7602
7602
|
}, 100);
|
|
7603
|
-
return () => clearTimeout(
|
|
7603
|
+
return () => clearTimeout(v);
|
|
7604
7604
|
}
|
|
7605
7605
|
}, [e, u, c]), /* @__PURE__ */ l(Me, { children: e && /* @__PURE__ */ l(Ph, { open: e, onOpenChange: t, children: /* @__PURE__ */ T(Zh, { className: h.main, style: g, children: [
|
|
7606
7606
|
/* @__PURE__ */ T("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
@@ -7639,7 +7639,7 @@ try {
|
|
|
7639
7639
|
});
|
|
7640
7640
|
} catch {
|
|
7641
7641
|
}
|
|
7642
|
-
const Fh = "av-toggle", Hh = ({ narrow: e }) =>
|
|
7642
|
+
const Fh = "av-toggle", Hh = ({ narrow: e }) => N(
|
|
7643
7643
|
"peer",
|
|
7644
7644
|
"rounded-full",
|
|
7645
7645
|
{
|
|
@@ -7650,7 +7650,7 @@ const Fh = "av-toggle", Hh = ({ narrow: e }) => z(
|
|
|
7650
7650
|
"transition-colors duration-300 ease-in-out motion-reduce:transition-none"
|
|
7651
7651
|
), Jh = ({
|
|
7652
7652
|
focusMode: e
|
|
7653
|
-
}) =>
|
|
7653
|
+
}) => N(
|
|
7654
7654
|
"peer-focus:outline",
|
|
7655
7655
|
"peer-focus:outline-2",
|
|
7656
7656
|
"peer-focus:outline-offset-2",
|
|
@@ -7660,7 +7660,7 @@ const Fh = "av-toggle", Hh = ({ narrow: e }) => z(
|
|
|
7660
7660
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
|
7661
7661
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
|
7662
7662
|
}
|
|
7663
|
-
), Gh = ({ narrow: e }) =>
|
|
7663
|
+
), Gh = ({ narrow: e }) => N(
|
|
7664
7664
|
{
|
|
7665
7665
|
"peer-checked:after:translate-x-full": !e,
|
|
7666
7666
|
"peer-checked:after:translate-x-4": e
|
|
@@ -7670,7 +7670,7 @@ const Fh = "av-toggle", Hh = ({ narrow: e }) => z(
|
|
|
7670
7670
|
// knob circle and border color when checked
|
|
7671
7671
|
"peer-checked:after:bg-white",
|
|
7672
7672
|
"peer-checked:after:border-white"
|
|
7673
|
-
), Wh = ({ narrow: e }) =>
|
|
7673
|
+
), Wh = ({ narrow: e }) => N(
|
|
7674
7674
|
"after:left-[2px]",
|
|
7675
7675
|
"after:top-[2px]",
|
|
7676
7676
|
"after:border",
|
|
@@ -7689,7 +7689,7 @@ const Fh = "av-toggle", Hh = ({ narrow: e }) => z(
|
|
|
7689
7689
|
), qh = ({
|
|
7690
7690
|
mode: e,
|
|
7691
7691
|
noBorder: t
|
|
7692
|
-
}) =>
|
|
7692
|
+
}) => N({
|
|
7693
7693
|
border: !t,
|
|
7694
7694
|
"border-border-medium bg-surface-medium": e === "light",
|
|
7695
7695
|
"border-border-light bg-surface-darker": e === "dark",
|
|
@@ -7699,12 +7699,12 @@ const Fh = "av-toggle", Hh = ({ narrow: e }) => z(
|
|
|
7699
7699
|
labelHidden: e,
|
|
7700
7700
|
labelMode: t,
|
|
7701
7701
|
mode: r
|
|
7702
|
-
}) => (t = t || r, e ? "sr-only" :
|
|
7702
|
+
}) => (t = t || r, e ? "sr-only" : N("ml-2 text-sm", {
|
|
7703
7703
|
"text-copy-dark": t === "light",
|
|
7704
7704
|
"text-copy-lighter": t === "dark",
|
|
7705
7705
|
"text-copy-lighter dark:text-copy-dark": t === "alt-system",
|
|
7706
7706
|
"text-copy-dark dark:text-copy-lighter": t === "system"
|
|
7707
|
-
})), Xh = ({ className: e }) =>
|
|
7707
|
+
})), Xh = ({ className: e }) => N(
|
|
7708
7708
|
Fh,
|
|
7709
7709
|
"relative flex cursor-pointer items-center",
|
|
7710
7710
|
e
|
|
@@ -7717,7 +7717,7 @@ const Fh = "av-toggle", Hh = ({ narrow: e }) => z(
|
|
|
7717
7717
|
narrow: a,
|
|
7718
7718
|
labelMode: i
|
|
7719
7719
|
}) => ({
|
|
7720
|
-
toggle:
|
|
7720
|
+
toggle: N(
|
|
7721
7721
|
Hh({ narrow: a }),
|
|
7722
7722
|
qh({ mode: e, noBorder: o }),
|
|
7723
7723
|
Jh({ focusMode: t }),
|
|
@@ -7869,13 +7869,13 @@ const rt = ({
|
|
|
7869
7869
|
dispatch: a,
|
|
7870
7870
|
setChatId: i,
|
|
7871
7871
|
setInitialMessages: s
|
|
7872
|
-
} =
|
|
7872
|
+
} = re(xe), [u, c] = R(!1), [p, d] = R(!1), [f, g] = R(!1), [m, h] = Oe({
|
|
7873
7873
|
key: je + Ss,
|
|
7874
7874
|
initialValue: ""
|
|
7875
|
-
}),
|
|
7875
|
+
}), v = ur(er.TOOL.MEMORIES), { data: I, isSuccess: b } = We({
|
|
7876
7876
|
user: r?.username,
|
|
7877
7877
|
getAccessToken: t
|
|
7878
|
-
}),
|
|
7878
|
+
}), w = (x) => {
|
|
7879
7879
|
i($e()), s([]), a({
|
|
7880
7880
|
type: Ge,
|
|
7881
7881
|
payload: {
|
|
@@ -7894,7 +7894,7 @@ const rt = ({
|
|
|
7894
7894
|
{
|
|
7895
7895
|
showConfirmation: f,
|
|
7896
7896
|
setShowConfirmation: g,
|
|
7897
|
-
action: () =>
|
|
7897
|
+
action: () => w(!0),
|
|
7898
7898
|
customStrings: {
|
|
7899
7899
|
confirmAction: "Continue",
|
|
7900
7900
|
cancelAction: "Cancel",
|
|
@@ -7916,7 +7916,7 @@ const rt = ({
|
|
|
7916
7916
|
showConfirmation: p,
|
|
7917
7917
|
setShowConfirmation: d,
|
|
7918
7918
|
action: () => {
|
|
7919
|
-
u && h("true"),
|
|
7919
|
+
u && h("true"), w();
|
|
7920
7920
|
},
|
|
7921
7921
|
customStrings: {
|
|
7922
7922
|
confirmAction: "Continue",
|
|
@@ -7926,7 +7926,7 @@ const rt = ({
|
|
|
7926
7926
|
children: /* @__PURE__ */ T("ul", { children: [
|
|
7927
7927
|
/* @__PURE__ */ T("li", { children: [
|
|
7928
7928
|
"In Private Mode, your chat sessions will not be saved to your chat history. ",
|
|
7929
|
-
|
|
7929
|
+
v && "Memories will also be disabled."
|
|
7930
7930
|
] }),
|
|
7931
7931
|
/* @__PURE__ */ l("li", { children: "If you refresh your browser, the setting will revert to the default (non-private) chat." })
|
|
7932
7932
|
] })
|
|
@@ -7951,10 +7951,10 @@ const rt = ({
|
|
|
7951
7951
|
labelRight: n ? "private" : "",
|
|
7952
7952
|
variant: n ? "danger" : "secondary",
|
|
7953
7953
|
onClick: (x) => {
|
|
7954
|
-
x && x.preventDefault(), m ? o > 0 ? g(!f) :
|
|
7954
|
+
x && x.preventDefault(), m ? o > 0 ? g(!f) : w() : d(!p);
|
|
7955
7955
|
},
|
|
7956
7956
|
className: "text-sm",
|
|
7957
|
-
disabled: !(b &&
|
|
7957
|
+
disabled: !(b && I) || n && o > 0,
|
|
7958
7958
|
children: n ? /* @__PURE__ */ l(Hi, { size: ze }) : /* @__PURE__ */ l(ec, { size: ze })
|
|
7959
7959
|
}
|
|
7960
7960
|
)
|
|
@@ -7972,7 +7972,7 @@ const rt = ({
|
|
|
7972
7972
|
semantic: s = !1,
|
|
7973
7973
|
...u
|
|
7974
7974
|
}) => {
|
|
7975
|
-
const c =
|
|
7975
|
+
const c = N(a, n);
|
|
7976
7976
|
return /* @__PURE__ */ T(
|
|
7977
7977
|
"svg",
|
|
7978
7978
|
{
|
|
@@ -8017,7 +8017,7 @@ try {
|
|
|
8017
8017
|
});
|
|
8018
8018
|
} catch {
|
|
8019
8019
|
}
|
|
8020
|
-
const
|
|
8020
|
+
const Xt = ie.createContext({
|
|
8021
8021
|
getItemProps: () => ({}),
|
|
8022
8022
|
activeIndex: null,
|
|
8023
8023
|
/* v8 ignore next 2 */
|
|
@@ -8076,7 +8076,7 @@ const Yt = ie.createContext({
|
|
|
8076
8076
|
focusMode: i = "system",
|
|
8077
8077
|
...s
|
|
8078
8078
|
}, u) => {
|
|
8079
|
-
const [c, p] = R(!1), [d, f] = R(!1), [g, m] = R(null), [h,
|
|
8079
|
+
const [c, p] = R(!1), [d, f] = R(!1), [g, m] = R(null), [h, v] = R(!1), I = j([]), b = j([]), w = re(Xt), y = Fo(), x = di(), A = Vo(), k = Ho({ label: r !== "Open menu" ? r : null }), O = A != null, { floatingStyles: M, refs: Z, context: Q } = Do({
|
|
8080
8080
|
nodeId: x,
|
|
8081
8081
|
open: c,
|
|
8082
8082
|
onOpenChange: (he) => {
|
|
@@ -8105,7 +8105,7 @@ const Yt = ie.createContext({
|
|
|
8105
8105
|
toggle: !O || !h,
|
|
8106
8106
|
ignoreMouse: O && h
|
|
8107
8107
|
}), F = Uo(Q, { role: "menu" }), de = Bo(Q, { bubbles: !0 }), De = fi(Q, {
|
|
8108
|
-
listRef:
|
|
8108
|
+
listRef: I,
|
|
8109
8109
|
activeIndex: g,
|
|
8110
8110
|
nested: O,
|
|
8111
8111
|
onNavigate: m,
|
|
@@ -8114,9 +8114,9 @@ const Yt = ie.createContext({
|
|
|
8114
8114
|
listRef: b,
|
|
8115
8115
|
onMatch: c ? m : void 0,
|
|
8116
8116
|
activeIndex: g
|
|
8117
|
-
}), { getReferenceProps: mt, getFloatingProps: ot, getItemProps:
|
|
8117
|
+
}), { getReferenceProps: mt, getFloatingProps: ot, getItemProps: Rt } = jo([le, Ze, F, de, De, ye]), ht = Wr([Z.setReference, k.ref, u]);
|
|
8118
8118
|
$(() => {
|
|
8119
|
-
if (!
|
|
8119
|
+
if (!y)
|
|
8120
8120
|
return;
|
|
8121
8121
|
function he() {
|
|
8122
8122
|
p(!1), o?.(!1);
|
|
@@ -8124,17 +8124,17 @@ const Yt = ie.createContext({
|
|
|
8124
8124
|
function fe(Le) {
|
|
8125
8125
|
Le.nodeId !== x && Le.parentId === A && p(!1);
|
|
8126
8126
|
}
|
|
8127
|
-
return
|
|
8128
|
-
|
|
8127
|
+
return y.events.on("click", he), y.events.on("menuopen", fe), () => {
|
|
8128
|
+
y.events.off("click", he), y.events.off("menuopen", fe);
|
|
8129
8129
|
};
|
|
8130
|
-
}, [
|
|
8131
|
-
c &&
|
|
8132
|
-
}, [
|
|
8130
|
+
}, [y, x, A, o]), $(() => {
|
|
8131
|
+
c && y && y.events.emit("menuopen", { parentId: A, nodeId: x });
|
|
8132
|
+
}, [y, c, x, A]), $(() => {
|
|
8133
8133
|
function he({ pointerType: Le }) {
|
|
8134
|
-
Le !== "touch" &&
|
|
8134
|
+
Le !== "touch" && v(!0);
|
|
8135
8135
|
}
|
|
8136
8136
|
function fe() {
|
|
8137
|
-
|
|
8137
|
+
v(!1);
|
|
8138
8138
|
}
|
|
8139
8139
|
return window.addEventListener("pointermove", he, {
|
|
8140
8140
|
once: !0,
|
|
@@ -8151,7 +8151,7 @@ const Yt = ie.createContext({
|
|
|
8151
8151
|
mode: a
|
|
8152
8152
|
} : {};
|
|
8153
8153
|
if (O && !e) {
|
|
8154
|
-
const he =
|
|
8154
|
+
const he = N(
|
|
8155
8155
|
"flex items-center flex-row justify-between",
|
|
8156
8156
|
"w-full",
|
|
8157
8157
|
"m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1",
|
|
@@ -8170,14 +8170,14 @@ const Yt = ie.createContext({
|
|
|
8170
8170
|
ref: ht,
|
|
8171
8171
|
"data-open": c ? "" : void 0,
|
|
8172
8172
|
...mt(
|
|
8173
|
-
|
|
8173
|
+
w.getItemProps({
|
|
8174
8174
|
...s,
|
|
8175
8175
|
className: he,
|
|
8176
8176
|
onFocus(fe) {
|
|
8177
|
-
s.onFocus?.(fe), f(!1),
|
|
8177
|
+
s.onFocus?.(fe), f(!1), w.setHasFocusInside(!0);
|
|
8178
8178
|
},
|
|
8179
8179
|
onMouseEnter(fe) {
|
|
8180
|
-
s.onMouseEnter?.(fe),
|
|
8180
|
+
s.onMouseEnter?.(fe), w.allowHover && w.isOpen && w.setActiveIndex(k.index);
|
|
8181
8181
|
}
|
|
8182
8182
|
})
|
|
8183
8183
|
),
|
|
@@ -8188,18 +8188,18 @@ const Yt = ie.createContext({
|
|
|
8188
8188
|
}
|
|
8189
8189
|
),
|
|
8190
8190
|
/* @__PURE__ */ l(
|
|
8191
|
-
|
|
8191
|
+
Xt.Provider,
|
|
8192
8192
|
{
|
|
8193
8193
|
value: {
|
|
8194
8194
|
activeIndex: g,
|
|
8195
8195
|
setActiveIndex: m,
|
|
8196
|
-
getItemProps:
|
|
8196
|
+
getItemProps: Rt,
|
|
8197
8197
|
setHasFocusInside: f,
|
|
8198
8198
|
isOpen: c,
|
|
8199
8199
|
allowHover: h,
|
|
8200
|
-
parent:
|
|
8200
|
+
parent: w
|
|
8201
8201
|
},
|
|
8202
|
-
children: /* @__PURE__ */ l(Cn, { elementsRef:
|
|
8202
|
+
children: /* @__PURE__ */ l(Cn, { elementsRef: I, labelsRef: b, children: c && /* @__PURE__ */ l($r, { children: /* @__PURE__ */ l(
|
|
8203
8203
|
Rr,
|
|
8204
8204
|
{
|
|
8205
8205
|
context: Q,
|
|
@@ -8231,7 +8231,7 @@ const Yt = ie.createContext({
|
|
|
8231
8231
|
"data-focus-inside": d ? "" : void 0,
|
|
8232
8232
|
ref: ht,
|
|
8233
8233
|
...mt(
|
|
8234
|
-
|
|
8234
|
+
w.getItemProps({
|
|
8235
8235
|
...s
|
|
8236
8236
|
})
|
|
8237
8237
|
)
|
|
@@ -8240,18 +8240,18 @@ const Yt = ie.createContext({
|
|
|
8240
8240
|
return /* @__PURE__ */ T(kn, { id: x, children: [
|
|
8241
8241
|
fr,
|
|
8242
8242
|
/* @__PURE__ */ l(
|
|
8243
|
-
|
|
8243
|
+
Xt.Provider,
|
|
8244
8244
|
{
|
|
8245
8245
|
value: {
|
|
8246
8246
|
activeIndex: g,
|
|
8247
8247
|
setActiveIndex: m,
|
|
8248
|
-
getItemProps:
|
|
8248
|
+
getItemProps: Rt,
|
|
8249
8249
|
setHasFocusInside: f,
|
|
8250
8250
|
isOpen: c,
|
|
8251
8251
|
allowHover: h,
|
|
8252
|
-
parent:
|
|
8252
|
+
parent: w
|
|
8253
8253
|
},
|
|
8254
|
-
children: /* @__PURE__ */ l(Cn, { elementsRef:
|
|
8254
|
+
children: /* @__PURE__ */ l(Cn, { elementsRef: I, labelsRef: b, children: c && /* @__PURE__ */ l($r, { children: /* @__PURE__ */ l(
|
|
8255
8255
|
Rr,
|
|
8256
8256
|
{
|
|
8257
8257
|
context: Q,
|
|
@@ -8332,7 +8332,7 @@ const rf = ({
|
|
|
8332
8332
|
...s
|
|
8333
8333
|
}, u) => {
|
|
8334
8334
|
let c = "";
|
|
8335
|
-
const p = ie.useContext(
|
|
8335
|
+
const p = ie.useContext(Xt), d = Ho({ label: t ? null : e }), f = Fo(), g = Wr([d.ref, u]);
|
|
8336
8336
|
if (n && o)
|
|
8337
8337
|
return /* @__PURE__ */ l(
|
|
8338
8338
|
"div",
|
|
@@ -8347,7 +8347,7 @@ const rf = ({
|
|
|
8347
8347
|
}
|
|
8348
8348
|
);
|
|
8349
8349
|
r && (c = "pl-2");
|
|
8350
|
-
const m =
|
|
8350
|
+
const m = N(
|
|
8351
8351
|
"flex flex-row items-center",
|
|
8352
8352
|
"w-full",
|
|
8353
8353
|
"m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1",
|
|
@@ -8388,13 +8388,13 @@ const rf = ({
|
|
|
8388
8388
|
);
|
|
8389
8389
|
Te.displayName = "MenuItem";
|
|
8390
8390
|
const of = ({ className: e, ...t }) => {
|
|
8391
|
-
const r =
|
|
8391
|
+
const r = N(e, "my-1 border-t border-border-medium");
|
|
8392
8392
|
return /* @__PURE__ */ l("div", { className: r, ...t });
|
|
8393
8393
|
}, Hr = ({
|
|
8394
8394
|
className: e,
|
|
8395
8395
|
...t
|
|
8396
8396
|
}) => {
|
|
8397
|
-
const r =
|
|
8397
|
+
const r = N(
|
|
8398
8398
|
e,
|
|
8399
8399
|
"pt-1 mb-2",
|
|
8400
8400
|
"text-sm text-copy-dark font-bold",
|
|
@@ -8424,7 +8424,7 @@ const af = (e) => {
|
|
|
8424
8424
|
className: e,
|
|
8425
8425
|
defaultPlacement: t = "top-start"
|
|
8426
8426
|
}) => {
|
|
8427
|
-
const { dispatch: r, setChatId: n, setInitialMessages: o } =
|
|
8427
|
+
const { dispatch: r, setChatId: n, setInitialMessages: o } = re(xe), { dispatch: a } = re(ln), { getAccessToken: i, user: s } = ve(), { data: u, isSuccess: c } = We({
|
|
8428
8428
|
user: s?.username,
|
|
8429
8429
|
getAccessToken: i
|
|
8430
8430
|
}), p = (g, m, h) => {
|
|
@@ -8503,16 +8503,16 @@ const af = (e) => {
|
|
|
8503
8503
|
dispatch: n,
|
|
8504
8504
|
setChatId: o,
|
|
8505
8505
|
setInitialMessages: a
|
|
8506
|
-
} =
|
|
8506
|
+
} = re(xe), [i, s] = R(!1), [u, c] = R(!1), [p, d] = Oe({
|
|
8507
8507
|
key: je + xs,
|
|
8508
8508
|
initialValue: ""
|
|
8509
|
-
}), [f, g] = R(!1), m = (
|
|
8509
|
+
}), [f, g] = R(!1), m = (v) => {
|
|
8510
8510
|
o($e()), a([]), n({
|
|
8511
8511
|
type: Ge,
|
|
8512
8512
|
payload: {
|
|
8513
8513
|
reasoning: !t
|
|
8514
8514
|
}
|
|
8515
|
-
}),
|
|
8515
|
+
}), v && n({
|
|
8516
8516
|
type: dt,
|
|
8517
8517
|
payload: {
|
|
8518
8518
|
attachments: 0
|
|
@@ -8540,7 +8540,7 @@ const af = (e) => {
|
|
|
8540
8540
|
toggleLabel: "Don't show this again",
|
|
8541
8541
|
toggleName: "reasoning-disclosure",
|
|
8542
8542
|
toggleChecked: f,
|
|
8543
|
-
onToggleChange: (
|
|
8543
|
+
onToggleChange: (v) => g(v),
|
|
8544
8544
|
showConfirmation: i,
|
|
8545
8545
|
setShowConfirmation: s,
|
|
8546
8546
|
action: () => {
|
|
@@ -8575,8 +8575,8 @@ const af = (e) => {
|
|
|
8575
8575
|
focusMode: "light",
|
|
8576
8576
|
label: "Reasoning Chat",
|
|
8577
8577
|
variant: t ? "selected" : "secondary",
|
|
8578
|
-
onClick: (
|
|
8579
|
-
|
|
8578
|
+
onClick: (v) => {
|
|
8579
|
+
v && v.preventDefault(), p ? r > 0 ? c(!u) : m() : s(!i);
|
|
8580
8580
|
},
|
|
8581
8581
|
className: "text-sm",
|
|
8582
8582
|
children: /* @__PURE__ */ l(Fi, { size: ze })
|
|
@@ -8591,21 +8591,21 @@ const af = (e) => {
|
|
|
8591
8591
|
const { user: t, getAccessToken: r } = ve(), {
|
|
8592
8592
|
dispatch: n,
|
|
8593
8593
|
state: { tokenUsage: o, provider: a, privateChat: i }
|
|
8594
|
-
} =
|
|
8594
|
+
} = re(xe), { messages: s, id: u } = Ye(), { mutateAsync: c } = ks({ getAccessToken: r }), [p, d] = R(!1), [f, g] = R(!1), m = async () => {
|
|
8595
8595
|
try {
|
|
8596
8596
|
if (u && s && a) {
|
|
8597
|
-
const
|
|
8597
|
+
const v = s.filter((I) => I.parts && I.parts.length > 0 ? I.parts.some(
|
|
8598
8598
|
(b) => b.type === "text" && b.text?.trim()
|
|
8599
|
-
) : !1).map((
|
|
8600
|
-
role:
|
|
8599
|
+
) : !1).map((I) => ({
|
|
8600
|
+
role: I.role,
|
|
8601
8601
|
// Convert v5 parts array to v4-style content string for storage.
|
|
8602
|
-
content:
|
|
8603
|
-
id:
|
|
8602
|
+
content: I.parts?.filter((b) => b.type === "text").map((b) => b.text).join("") || "",
|
|
8603
|
+
id: I.id
|
|
8604
8604
|
}));
|
|
8605
8605
|
await c({
|
|
8606
8606
|
userId: t?.username || "",
|
|
8607
8607
|
id: u,
|
|
8608
|
-
messages:
|
|
8608
|
+
messages: v,
|
|
8609
8609
|
provider: a,
|
|
8610
8610
|
tokenUsage: o
|
|
8611
8611
|
}), n({
|
|
@@ -8620,8 +8620,8 @@ const af = (e) => {
|
|
|
8620
8620
|
}
|
|
8621
8621
|
} catch {
|
|
8622
8622
|
}
|
|
8623
|
-
}, h = (
|
|
8624
|
-
|
|
8623
|
+
}, h = (v) => {
|
|
8624
|
+
v && v.preventDefault(), o > 0 ? g(!f) : m();
|
|
8625
8625
|
};
|
|
8626
8626
|
return $(() => {
|
|
8627
8627
|
i && s?.length > 0 ? d(!0) : d(!1);
|
|
@@ -8667,7 +8667,7 @@ const af = (e) => {
|
|
|
8667
8667
|
}) => {
|
|
8668
8668
|
const { getAccessToken: t, user: r } = ve(), {
|
|
8669
8669
|
state: { loading: n, streaming: o }
|
|
8670
|
-
} =
|
|
8670
|
+
} = re(xe), { data: a, isSuccess: i } = We({
|
|
8671
8671
|
user: r?.username,
|
|
8672
8672
|
getAccessToken: t
|
|
8673
8673
|
});
|
|
@@ -8710,9 +8710,12 @@ const af = (e) => {
|
|
|
8710
8710
|
], Ke = [
|
|
8711
8711
|
...df,
|
|
8712
8712
|
...pf
|
|
8713
|
-
], Jr = 400 * 1024, mf = "text/plain", hf = () =>
|
|
8713
|
+
], Jr = 400 * 1024, mf = "text/plain", hf = () => N(
|
|
8714
8714
|
"relative rounded-md text-base h-auto min-w-28 overflow-hidden pt-2"
|
|
8715
|
-
), _o = (
|
|
8715
|
+
), _o = ({ oledMode: e }) => N({
|
|
8716
|
+
"bg-surface-dark dark:bg-surface-darker": e,
|
|
8717
|
+
"bg-surface-darker": !e
|
|
8718
|
+
}), ff = () => N("text-copy-lighter caret-copy-light"), gf = ({ oledMode: e }) => N(
|
|
8716
8719
|
"has-[.av-prompt-editable:focus]:outline",
|
|
8717
8720
|
"has-[.av-prompt-editable:focus]:outline-2",
|
|
8718
8721
|
"has-[.av-prompt-editable:focus]:outline-offset-2",
|
|
@@ -8720,32 +8723,35 @@ const af = (e) => {
|
|
|
8720
8723
|
"has-[.av-prompt-editable:focus]:outline-focus-light": !e,
|
|
8721
8724
|
"dark:has-[.av-prompt-editable:focus]:outline-focus-light has-[.av-prompt-editable:focus]:outline-focus-dark": e
|
|
8722
8725
|
}
|
|
8723
|
-
), vf = () =>
|
|
8726
|
+
), vf = ({ oledMode: e }) => N(
|
|
8724
8727
|
"peer",
|
|
8725
8728
|
"text-base resize-none overflow-hidden w-full text-inherit outline-none",
|
|
8726
8729
|
"h-6 pr-2 pl-4",
|
|
8727
|
-
|
|
8730
|
+
{
|
|
8731
|
+
"placeholder:text-surface-light dark:placeholder:text-surface-medium": e,
|
|
8732
|
+
"placeholder:text-surface-medium": !e
|
|
8733
|
+
}
|
|
8728
8734
|
), yf = ({
|
|
8729
8735
|
className: e,
|
|
8730
8736
|
oledMode: t
|
|
8731
8737
|
}) => {
|
|
8732
|
-
const r =
|
|
8738
|
+
const r = N(
|
|
8733
8739
|
Ns,
|
|
8734
8740
|
hf(),
|
|
8735
|
-
_o(),
|
|
8741
|
+
_o({ oledMode: t }),
|
|
8736
8742
|
ff(),
|
|
8737
8743
|
gf({ oledMode: t }),
|
|
8738
8744
|
e
|
|
8739
|
-
), n =
|
|
8745
|
+
), n = N(
|
|
8740
8746
|
zs,
|
|
8741
|
-
vf(),
|
|
8742
|
-
_o()
|
|
8747
|
+
vf({ oledMode: t }),
|
|
8748
|
+
_o({ oledMode: t })
|
|
8743
8749
|
);
|
|
8744
8750
|
return {
|
|
8745
8751
|
wrapper: r,
|
|
8746
8752
|
textArea: n
|
|
8747
8753
|
};
|
|
8748
|
-
},
|
|
8754
|
+
}, Qt = (e) => {
|
|
8749
8755
|
if (e === 0)
|
|
8750
8756
|
return "0 Bytes";
|
|
8751
8757
|
const t = 1024, r = ["Bytes", "KB", "MB", "GB"], n = Math.floor(Math.log(e) / Math.log(t));
|
|
@@ -8770,7 +8776,7 @@ const af = (e) => {
|
|
|
8770
8776
|
/* @__PURE__ */ l("span", { className: "max-w-[150px] truncate", children: r.name }),
|
|
8771
8777
|
/* @__PURE__ */ T("span", { className: "mx-1 text-gray-400", children: [
|
|
8772
8778
|
"(",
|
|
8773
|
-
|
|
8779
|
+
Qt(r.size),
|
|
8774
8780
|
")"
|
|
8775
8781
|
] }),
|
|
8776
8782
|
/* @__PURE__ */ l(
|
|
@@ -8792,28 +8798,28 @@ const af = (e) => {
|
|
|
8792
8798
|
)) }),
|
|
8793
8799
|
/* @__PURE__ */ T("div", { className: "text-xs text-gray-400 mt-1 pl-1", children: [
|
|
8794
8800
|
"Total: ",
|
|
8795
|
-
|
|
8801
|
+
Qt(us(Array.from(e))),
|
|
8796
8802
|
" /",
|
|
8797
8803
|
" ",
|
|
8798
|
-
|
|
8804
|
+
Qt(Jr)
|
|
8799
8805
|
] })
|
|
8800
|
-
] }), ds = 24, wf = 500, ps = 2, If = 5, Ef = ds * ps, bo = If * ds, Tf = "ready", Sf = "streaming", xf = "error", kf = "submitted",
|
|
8806
|
+
] }), ds = 24, wf = 500, ps = 2, If = 5, Ef = ds * ps, bo = If * ds, Tf = "ready", Sf = "streaming", xf = "error", kf = "submitted", Ft = (e) => {
|
|
8801
8807
|
e.current && (e.current.style.height = `${Ef}px`);
|
|
8802
8808
|
}, Cf = () => {
|
|
8803
|
-
const { user: e, getAccessToken: t } = ve(), r =
|
|
8809
|
+
const { user: e, getAccessToken: t } = ve(), r = ur(er.ADDON.ATTACHMENTS), n = ur(er.ADDON.REASONING), { allowedModels: o } = Gr(), [a, i] = R(null), [s, u] = R(!1), [c, p] = R(!1), {
|
|
8804
8810
|
dispatch: d,
|
|
8805
8811
|
state: {
|
|
8806
8812
|
reasoning: f,
|
|
8807
8813
|
streaming: g,
|
|
8808
8814
|
aborted: m,
|
|
8809
8815
|
lastResetTimestamp: h,
|
|
8810
|
-
attachments:
|
|
8811
|
-
provider:
|
|
8816
|
+
attachments: v,
|
|
8817
|
+
provider: I,
|
|
8812
8818
|
privateChat: b
|
|
8813
8819
|
}
|
|
8814
|
-
} =
|
|
8820
|
+
} = re(xe), { state: w, dispatch: y } = re(ln), { state: x } = re(is), {
|
|
8815
8821
|
state: { oledMode: A }
|
|
8816
|
-
} =
|
|
8822
|
+
} = re($t), { refetch: k } = As({
|
|
8817
8823
|
enabled: !1,
|
|
8818
8824
|
user: e?.username || "",
|
|
8819
8825
|
searchString: x.searchString,
|
|
@@ -8826,14 +8832,14 @@ const af = (e) => {
|
|
|
8826
8832
|
}), M = j(null), Z = j(null), Q = j(!1), le = j(0), Ze = j(null), F = j(null), de = Os(), De = yf({
|
|
8827
8833
|
oledMode: A,
|
|
8828
8834
|
className: ""
|
|
8829
|
-
}), ye = n && O?.showReasoningButton, { setMessages: mt, status: ot, id:
|
|
8835
|
+
}), ye = n && O?.showReasoningButton, { setMessages: mt, status: ot, id: Rt, sendMessage: ht, input: _e, setInput: Ae } = Ye({
|
|
8830
8836
|
onFinish: (B) => {
|
|
8831
8837
|
k();
|
|
8832
|
-
const
|
|
8833
|
-
|
|
8838
|
+
const ne = B.message?.metadata;
|
|
8839
|
+
ne?.tokenUsage && d({
|
|
8834
8840
|
type: os,
|
|
8835
8841
|
payload: {
|
|
8836
|
-
tokenUsage:
|
|
8842
|
+
tokenUsage: ne.tokenUsage
|
|
8837
8843
|
}
|
|
8838
8844
|
});
|
|
8839
8845
|
}
|
|
@@ -8845,16 +8851,16 @@ const af = (e) => {
|
|
|
8845
8851
|
), he = D(
|
|
8846
8852
|
(B, ae) => {
|
|
8847
8853
|
if (B.preventDefault(), _e.trim()) {
|
|
8848
|
-
const
|
|
8854
|
+
const ne = {
|
|
8849
8855
|
/**
|
|
8850
8856
|
* Include dynamic values that change during runtime. Static values like
|
|
8851
8857
|
* `username` were set at initialization - see App.tsx.
|
|
8852
8858
|
*/
|
|
8853
|
-
provider:
|
|
8859
|
+
provider: I,
|
|
8854
8860
|
privateChat: b,
|
|
8855
8861
|
...ae?.body
|
|
8856
8862
|
};
|
|
8857
|
-
O?.model && Co(O.model, o) && (
|
|
8863
|
+
O?.model && Co(O.model, o) && (ne.model = O.model), ht(
|
|
8858
8864
|
{
|
|
8859
8865
|
text: _e,
|
|
8860
8866
|
...ae?.experimental_attachments && {
|
|
@@ -8863,7 +8869,7 @@ const af = (e) => {
|
|
|
8863
8869
|
},
|
|
8864
8870
|
{
|
|
8865
8871
|
headers: ae?.headers,
|
|
8866
|
-
body:
|
|
8872
|
+
body: ne
|
|
8867
8873
|
}
|
|
8868
8874
|
), Ae("");
|
|
8869
8875
|
}
|
|
@@ -8872,7 +8878,7 @@ const af = (e) => {
|
|
|
8872
8878
|
_e,
|
|
8873
8879
|
ht,
|
|
8874
8880
|
Ae,
|
|
8875
|
-
|
|
8881
|
+
I,
|
|
8876
8882
|
b,
|
|
8877
8883
|
O?.model,
|
|
8878
8884
|
o
|
|
@@ -8933,16 +8939,16 @@ const af = (e) => {
|
|
|
8933
8939
|
F.current.style.height = `${B}px`, F.current.style.overflowY = "hidden";
|
|
8934
8940
|
}, []), fs = (B) => {
|
|
8935
8941
|
if (B.preventDefault(), B.target.files && B.target.files.length > 0) {
|
|
8936
|
-
const ae = a ? Array.from(a) : [],
|
|
8942
|
+
const ae = a ? Array.from(a) : [], ne = Array.from(B.target.files), Be = [...ae];
|
|
8937
8943
|
let Xe = !1;
|
|
8938
|
-
for (const be of
|
|
8944
|
+
for (const be of ne) {
|
|
8939
8945
|
const gr = "." + be.name.split(".").pop()?.toLowerCase();
|
|
8940
8946
|
Ke.includes(gr) ? Be.some(
|
|
8941
8947
|
(vr) => vr.name === be.name && vr.size === be.size && vr.lastModified === be.lastModified
|
|
8942
8948
|
) || Be.push(be) : Xe = !0;
|
|
8943
8949
|
}
|
|
8944
8950
|
if (Z.current && (Z.current.value = ""), us(Be) > Jr) {
|
|
8945
|
-
M.current = `Total file size exceeds the limit of ${
|
|
8951
|
+
M.current = `Total file size exceeds the limit of ${Qt(
|
|
8946
8952
|
Jr
|
|
8947
8953
|
)}.`, u(!0);
|
|
8948
8954
|
return;
|
|
@@ -8968,8 +8974,8 @@ const af = (e) => {
|
|
|
8968
8974
|
if (!a)
|
|
8969
8975
|
return;
|
|
8970
8976
|
const ae = new DataTransfer();
|
|
8971
|
-
Array.from(a).forEach((
|
|
8972
|
-
|
|
8977
|
+
Array.from(a).forEach((ne) => {
|
|
8978
|
+
ne !== B && ae.items.add(ne);
|
|
8973
8979
|
}), ae.files.length === 0 ? i(null) : i(ae.files), d({
|
|
8974
8980
|
type: dt,
|
|
8975
8981
|
payload: {
|
|
@@ -8979,25 +8985,25 @@ const af = (e) => {
|
|
|
8979
8985
|
}, ys = D(() => {
|
|
8980
8986
|
Z.current && (Z.current.value = ""), i(null);
|
|
8981
8987
|
}, []), pn = async (B) => {
|
|
8982
|
-
B.preventDefault(),
|
|
8988
|
+
B.preventDefault(), Ft(F);
|
|
8983
8989
|
const ae = await t();
|
|
8984
|
-
let
|
|
8990
|
+
let ne;
|
|
8985
8991
|
if (a && a.length > 0) {
|
|
8986
8992
|
const Be = Array.from(a).map(
|
|
8987
|
-
(
|
|
8993
|
+
(Pt) => _f(Pt)
|
|
8988
8994
|
), Xe = new DataTransfer();
|
|
8989
|
-
Be.forEach((
|
|
8995
|
+
Be.forEach((Pt) => Xe.items.add(Pt)), ne = Xe.files;
|
|
8990
8996
|
}
|
|
8991
8997
|
he(B, {
|
|
8992
8998
|
headers: {
|
|
8993
8999
|
"Content-Type": "application/json",
|
|
8994
9000
|
authorization: `Bearer ${ae}`,
|
|
8995
|
-
[$s]:
|
|
9001
|
+
[$s]: Rt
|
|
8996
9002
|
},
|
|
8997
9003
|
body: {
|
|
8998
9004
|
reasoning: f
|
|
8999
9005
|
},
|
|
9000
|
-
experimental_attachments:
|
|
9006
|
+
experimental_attachments: ne
|
|
9001
9007
|
}), ys();
|
|
9002
9008
|
}, _s = (B) => {
|
|
9003
9009
|
Le(), fr(B);
|
|
@@ -9010,30 +9016,30 @@ const af = (e) => {
|
|
|
9010
9016
|
}
|
|
9011
9017
|
]
|
|
9012
9018
|
]), $(() => {
|
|
9013
|
-
if (
|
|
9014
|
-
const B =
|
|
9015
|
-
B.indexOf(hn) !== -1 ? navigator.clipboard.readText().then((
|
|
9016
|
-
const Xe =
|
|
9019
|
+
if (w.prompt !== "") {
|
|
9020
|
+
const B = w.prompt.endsWith(":") && !w.prompt.endsWith(": ") ? w.prompt + " " : w.prompt;
|
|
9021
|
+
B.indexOf(hn) !== -1 ? navigator.clipboard.readText().then((ne) => {
|
|
9022
|
+
const Xe = ne.startsWith("http://") || ne.startsWith("https://") ? ne : `"""${ne}"""`;
|
|
9017
9023
|
Ae(B.replace(hn, Xe));
|
|
9018
|
-
}) : Ae(B), !Ve() && F.current && F.current.focus(),
|
|
9024
|
+
}) : Ae(B), !Ve() && F.current && F.current.focus(), y({
|
|
9019
9025
|
type: Eo
|
|
9020
9026
|
});
|
|
9021
9027
|
}
|
|
9022
|
-
}, [
|
|
9028
|
+
}, [w, y, Ae]), $(() => {
|
|
9023
9029
|
if (Q.current === !1) {
|
|
9024
|
-
Q.current = !0, !_e &&
|
|
9030
|
+
Q.current = !0, !_e && Ft(F);
|
|
9025
9031
|
return;
|
|
9026
9032
|
}
|
|
9027
9033
|
h > 0 && h !== le.current ? (le.current = h, setTimeout(() => {
|
|
9028
|
-
F.current && (!_e &&
|
|
9029
|
-
}, wf)) : g === !1 && !_e && (
|
|
9034
|
+
F.current && (!_e && Ft(F), F.current.focus());
|
|
9035
|
+
}, wf)) : g === !1 && !_e && (Ft(F), !Ve() && F.current && F.current.focus());
|
|
9030
9036
|
}, [h, g, _e]), $(() => {
|
|
9031
|
-
|
|
9037
|
+
w.lastTriggeredTimestamp && setTimeout(() => {
|
|
9032
9038
|
Le();
|
|
9033
9039
|
}, 100);
|
|
9034
|
-
}, [
|
|
9035
|
-
|
|
9036
|
-
}, [
|
|
9040
|
+
}, [w.lastTriggeredTimestamp, Le]), $(() => {
|
|
9041
|
+
v === 0 && (Z.current && (Z.current.value = ""), i(null));
|
|
9042
|
+
}, [v]), /* @__PURE__ */ T(Me, { children: [
|
|
9037
9043
|
/* @__PURE__ */ l(
|
|
9038
9044
|
rt,
|
|
9039
9045
|
{
|
|
@@ -9089,7 +9095,7 @@ const af = (e) => {
|
|
|
9089
9095
|
/* @__PURE__ */ l(
|
|
9090
9096
|
zh,
|
|
9091
9097
|
{
|
|
9092
|
-
className:
|
|
9098
|
+
className: N("order-1 sm:mr-2", {
|
|
9093
9099
|
"mr-3": ye,
|
|
9094
9100
|
"mr-4": !ye
|
|
9095
9101
|
})
|
|
@@ -9098,7 +9104,7 @@ const af = (e) => {
|
|
|
9098
9104
|
/* @__PURE__ */ l(
|
|
9099
9105
|
sf,
|
|
9100
9106
|
{
|
|
9101
|
-
className:
|
|
9107
|
+
className: N("order-2 sm:mr-2", {
|
|
9102
9108
|
"mr-3": ye,
|
|
9103
9109
|
"mr-4": !ye
|
|
9104
9110
|
})
|
|
@@ -9107,18 +9113,18 @@ const af = (e) => {
|
|
|
9107
9113
|
r && /* @__PURE__ */ l(
|
|
9108
9114
|
Nh,
|
|
9109
9115
|
{
|
|
9110
|
-
className:
|
|
9116
|
+
className: N("order-3 sm:mr-2", {
|
|
9111
9117
|
"mr-3": ye,
|
|
9112
9118
|
"mr-4": !ye
|
|
9113
9119
|
}),
|
|
9114
9120
|
onClick: gs
|
|
9115
9121
|
}
|
|
9116
9122
|
),
|
|
9117
|
-
ye && /* @__PURE__ */ l(cf, { className:
|
|
9123
|
+
ye && /* @__PURE__ */ l(cf, { className: N("order-4 mr-3 sm:mr-2") }),
|
|
9118
9124
|
/* @__PURE__ */ l(
|
|
9119
9125
|
ef,
|
|
9120
9126
|
{
|
|
9121
|
-
className:
|
|
9127
|
+
className: N("order-5 mr-3 sm:mr-2", {
|
|
9122
9128
|
"mr-3": ye,
|
|
9123
9129
|
"mr-4": !ye
|
|
9124
9130
|
})
|
|
@@ -9128,18 +9134,18 @@ const af = (e) => {
|
|
|
9128
9134
|
] })
|
|
9129
9135
|
] }) })
|
|
9130
9136
|
] });
|
|
9131
|
-
},
|
|
9137
|
+
}, Ht = "--sassy-bottom", Nf = ({ isComponent: e }) => {
|
|
9132
9138
|
const {
|
|
9133
9139
|
state: { loading: t, streaming: r, restoring: n }
|
|
9134
|
-
} =
|
|
9140
|
+
} = re(xe), {
|
|
9135
9141
|
state: { footerHeight: o, footerPosition: a, oledMode: i },
|
|
9136
9142
|
dispatch: s
|
|
9137
|
-
} =
|
|
9143
|
+
} = re($t), [u] = R(
|
|
9138
9144
|
() => yn[Math.floor(Math.random() * yn.length)]
|
|
9139
|
-
), { messages: c } = Ye(), { height: p } = Ni(), { height: d } = zi(), [f, g] = No(), m = Ne(() => Ve(), []), h = Ne(() => Rs(), []),
|
|
9145
|
+
), { messages: c } = Ye(), { height: p } = Ni(), { height: d } = zi(), [f, g] = No(), m = Ne(() => Ve(), []), h = Ne(() => Rs(), []), v = p - d, I = Ne(() => {
|
|
9140
9146
|
const b = m ? Ps : h ? Zs : zo;
|
|
9141
|
-
return
|
|
9142
|
-
}, [
|
|
9147
|
+
return v > 70 && v < 500 ? m ? _n / 2 : _n : b;
|
|
9148
|
+
}, [v, m, h]);
|
|
9143
9149
|
return $(() => {
|
|
9144
9150
|
o !== g.height && s({
|
|
9145
9151
|
type: rs,
|
|
@@ -9150,36 +9156,36 @@ const af = (e) => {
|
|
|
9150
9156
|
}, [g.height, o, s]), $(() => {
|
|
9151
9157
|
if (!f || !f.current)
|
|
9152
9158
|
return;
|
|
9153
|
-
const b = f?.current?.style.getPropertyValue(
|
|
9154
|
-
if (a ===
|
|
9155
|
-
type:
|
|
9159
|
+
const b = f?.current?.style.getPropertyValue(Ht);
|
|
9160
|
+
if (a === lr && (t && !r || n) && b !== `${I}px` && (s({
|
|
9161
|
+
type: Wt,
|
|
9156
9162
|
payload: {
|
|
9157
9163
|
footerPosition: wt,
|
|
9158
|
-
footerOffset:
|
|
9164
|
+
footerOffset: I
|
|
9159
9165
|
}
|
|
9160
9166
|
}), f.current.style.setProperty(
|
|
9161
|
-
|
|
9162
|
-
`${
|
|
9163
|
-
)), a === wt && b !== `${
|
|
9164
|
-
type:
|
|
9167
|
+
Ht,
|
|
9168
|
+
`${I}px`
|
|
9169
|
+
)), a === wt && b !== `${I}px` && (s({
|
|
9170
|
+
type: Wt,
|
|
9165
9171
|
payload: {
|
|
9166
9172
|
footerPosition: wt,
|
|
9167
|
-
footerOffset:
|
|
9173
|
+
footerOffset: I
|
|
9168
9174
|
}
|
|
9169
9175
|
}), f.current.style.setProperty(
|
|
9170
|
-
|
|
9171
|
-
`${
|
|
9176
|
+
Ht,
|
|
9177
|
+
`${I}px`
|
|
9172
9178
|
)), !t && !r && !n && c.length === 0 && p > 0 && g.height > 0) {
|
|
9173
|
-
const
|
|
9174
|
-
b !== `${
|
|
9175
|
-
type:
|
|
9179
|
+
const w = `${p - g.height - (e ? 300 : 245)}`;
|
|
9180
|
+
b !== `${w}px` && Number(w) > 0 && (s({
|
|
9181
|
+
type: Wt,
|
|
9176
9182
|
payload: {
|
|
9177
|
-
footerPosition:
|
|
9178
|
-
footerOffset: Number(
|
|
9183
|
+
footerPosition: lr,
|
|
9184
|
+
footerOffset: Number(w)
|
|
9179
9185
|
}
|
|
9180
9186
|
}), f?.current?.style.setProperty(
|
|
9181
|
-
|
|
9182
|
-
`${
|
|
9187
|
+
Ht,
|
|
9188
|
+
`${w}px`
|
|
9183
9189
|
));
|
|
9184
9190
|
}
|
|
9185
9191
|
}, [
|
|
@@ -9192,13 +9198,13 @@ const af = (e) => {
|
|
|
9192
9198
|
p,
|
|
9193
9199
|
g.height,
|
|
9194
9200
|
a,
|
|
9195
|
-
|
|
9201
|
+
I,
|
|
9196
9202
|
s
|
|
9197
9203
|
]), /* @__PURE__ */ l(
|
|
9198
9204
|
"footer",
|
|
9199
9205
|
{
|
|
9200
9206
|
ref: f,
|
|
9201
|
-
className:
|
|
9207
|
+
className: N(
|
|
9202
9208
|
"border-transparent mt-5",
|
|
9203
9209
|
"bottom-(--sassy-bottom)",
|
|
9204
9210
|
_h
|
|
@@ -9208,7 +9214,7 @@ const af = (e) => {
|
|
|
9208
9214
|
/* @__PURE__ */ l(
|
|
9209
9215
|
"div",
|
|
9210
9216
|
{
|
|
9211
|
-
className:
|
|
9217
|
+
className: N("w-full text-center text-xs pt-2", {
|
|
9212
9218
|
"text-copy-dark dark:text-slate-400": i,
|
|
9213
9219
|
"text-slate-300": !i
|
|
9214
9220
|
}),
|
|
@@ -9240,7 +9246,7 @@ const af = (e) => {
|
|
|
9240
9246
|
state: { privateChat: r },
|
|
9241
9247
|
setChatId: n,
|
|
9242
9248
|
setInitialMessages: o
|
|
9243
|
-
} =
|
|
9249
|
+
} = re(xe), { getAccessToken: a, user: i } = ve(), { status: s } = Ye(), { allowedModels: u, status: c } = Gr(), [p, d] = R(!1), f = D(() => {
|
|
9244
9250
|
p || (ah(), d(!0));
|
|
9245
9251
|
}, [p]), {
|
|
9246
9252
|
isSuccess: g,
|
|
@@ -9249,7 +9255,7 @@ const af = (e) => {
|
|
|
9249
9255
|
} = We({
|
|
9250
9256
|
user: i?.username,
|
|
9251
9257
|
getAccessToken: a
|
|
9252
|
-
}),
|
|
9258
|
+
}), v = Ne(() => {
|
|
9253
9259
|
if (bn(u, c)) {
|
|
9254
9260
|
const M = Ds(u), Z = zr.filter(
|
|
9255
9261
|
(Q) => M.includes(
|
|
@@ -9259,14 +9265,14 @@ const af = (e) => {
|
|
|
9259
9265
|
return Z.length > 0 ? Z : zr;
|
|
9260
9266
|
}
|
|
9261
9267
|
return zr;
|
|
9262
|
-
}, [u, c]),
|
|
9268
|
+
}, [u, c]), I = Ne(() => bn(u, c) ? js(u) : /* @__PURE__ */ new Map(), [u, c]), b = Ne(() => {
|
|
9263
9269
|
if (!h?.useNestedModelSelection)
|
|
9264
9270
|
return !1;
|
|
9265
|
-
for (const M of
|
|
9271
|
+
for (const M of I.values())
|
|
9266
9272
|
if (M.length > 1)
|
|
9267
9273
|
return !0;
|
|
9268
9274
|
return !1;
|
|
9269
|
-
}, [h?.useNestedModelSelection,
|
|
9275
|
+
}, [h?.useNestedModelSelection, I]), w = async (M) => {
|
|
9270
9276
|
try {
|
|
9271
9277
|
n($e()), o([]), M !== h?.provider && (await wn({
|
|
9272
9278
|
provider: M,
|
|
@@ -9282,7 +9288,7 @@ const af = (e) => {
|
|
|
9282
9288
|
});
|
|
9283
9289
|
} catch {
|
|
9284
9290
|
}
|
|
9285
|
-
},
|
|
9291
|
+
}, y = async (M, Z) => {
|
|
9286
9292
|
try {
|
|
9287
9293
|
if (n($e()), o([]), M !== h?.provider || Z !== h?.model) {
|
|
9288
9294
|
await wn({
|
|
@@ -9307,9 +9313,9 @@ const af = (e) => {
|
|
|
9307
9313
|
});
|
|
9308
9314
|
} catch {
|
|
9309
9315
|
}
|
|
9310
|
-
}, x = h && g, A = x &&
|
|
9316
|
+
}, x = h && g, A = x && v.find(
|
|
9311
9317
|
(M) => h.provider === M.id
|
|
9312
|
-
)?.icon ||
|
|
9318
|
+
)?.icon || v[0]?.icon, k = Ne(() => !h?.useNestedModelSelection || !h?.model || !u || !Co(h.model, u) ? null : yr[h.model] || h.model, [h?.useNestedModelSelection, h?.model, u]), O = /* @__PURE__ */ l(Me, { children: /* @__PURE__ */ T(
|
|
9313
9319
|
Nt,
|
|
9314
9320
|
{
|
|
9315
9321
|
mode: "dark",
|
|
@@ -9335,8 +9341,8 @@ const af = (e) => {
|
|
|
9335
9341
|
defaultPlacement: "top-start",
|
|
9336
9342
|
children: [
|
|
9337
9343
|
/* @__PURE__ */ l(Hr, { children: "Providers" }),
|
|
9338
|
-
x &&
|
|
9339
|
-
const Z =
|
|
9344
|
+
x && v.map((M) => {
|
|
9345
|
+
const Z = I.get(M.id) || [];
|
|
9340
9346
|
return b && Z.length > 1 ? /* @__PURE__ */ T(Nt, { label: M.label, children: [
|
|
9341
9347
|
/* @__PURE__ */ T(Hr, { children: [
|
|
9342
9348
|
M.label,
|
|
@@ -9347,7 +9353,7 @@ const af = (e) => {
|
|
|
9347
9353
|
{
|
|
9348
9354
|
selected: h.provider === M.id && h.model === le,
|
|
9349
9355
|
label: yr[le] || le,
|
|
9350
|
-
onClick: () =>
|
|
9356
|
+
onClick: () => y(M.id, le)
|
|
9351
9357
|
},
|
|
9352
9358
|
le
|
|
9353
9359
|
))
|
|
@@ -9357,7 +9363,7 @@ const af = (e) => {
|
|
|
9357
9363
|
selected: h.provider === M.id,
|
|
9358
9364
|
label: M.label,
|
|
9359
9365
|
icon: /* @__PURE__ */ l(M.icon, {}),
|
|
9360
|
-
onClick: () =>
|
|
9366
|
+
onClick: () => w(M.id)
|
|
9361
9367
|
},
|
|
9362
9368
|
M.id
|
|
9363
9369
|
);
|
|
@@ -9381,38 +9387,38 @@ const af = (e) => {
|
|
|
9381
9387
|
}, Af = Re(
|
|
9382
9388
|
() => import(
|
|
9383
9389
|
/* webpackChunkName: "modal-chunk" */
|
|
9384
|
-
"./ProfileEntry.
|
|
9390
|
+
"./ProfileEntry.A_AoGwYv.js"
|
|
9385
9391
|
).then((e) => ({
|
|
9386
9392
|
default: e.Profile
|
|
9387
9393
|
}))
|
|
9388
9394
|
), Of = Re(
|
|
9389
9395
|
() => import(
|
|
9390
9396
|
/* webpackChunkName: "modal-chunk" */
|
|
9391
|
-
"./SettingsEntry.
|
|
9397
|
+
"./SettingsEntry.D4RhlncR.js"
|
|
9392
9398
|
).then((e) => ({
|
|
9393
9399
|
default: e.SettingsPanel
|
|
9394
9400
|
}))
|
|
9395
9401
|
), Mf = Re(
|
|
9396
9402
|
() => import(
|
|
9397
9403
|
/* webpackChunkName: "modal-chunk" */
|
|
9398
|
-
"./HistoryEntry.
|
|
9404
|
+
"./HistoryEntry.BHKiSJYf.js"
|
|
9399
9405
|
).then((e) => ({
|
|
9400
9406
|
default: e.HistoryPanel
|
|
9401
9407
|
}))
|
|
9402
9408
|
), $f = Re(
|
|
9403
9409
|
() => import(
|
|
9404
9410
|
/* webpackChunkName: "modal-chunk" */
|
|
9405
|
-
"./AboutEntry.
|
|
9411
|
+
"./AboutEntry.DiCPTiLj.js"
|
|
9406
9412
|
).then((e) => ({ default: e.About }))
|
|
9407
9413
|
), Rf = Re(
|
|
9408
9414
|
() => import(
|
|
9409
9415
|
/* webpackChunkName: "modal-chunk" */
|
|
9410
|
-
"./UsageEntry.
|
|
9416
|
+
"./UsageEntry.DrVVPYLQ.js"
|
|
9411
9417
|
).then((e) => ({ default: e.Usage }))
|
|
9412
9418
|
), Pf = Re(
|
|
9413
9419
|
() => import(
|
|
9414
9420
|
/* webpackChunkName: "modal-chunk" */
|
|
9415
|
-
"./UserMemoriesPanel.
|
|
9421
|
+
"./UserMemoriesPanel.kh9_pfi_.js"
|
|
9416
9422
|
).then(
|
|
9417
9423
|
(e) => ({ default: e.default })
|
|
9418
9424
|
)
|
|
@@ -9429,7 +9435,7 @@ const af = (e) => {
|
|
|
9429
9435
|
user: r?.username
|
|
9430
9436
|
}
|
|
9431
9437
|
);
|
|
9432
|
-
}, Df = ({ type: e, open: t, onOpenChange: r }) => t ? /* @__PURE__ */ l(
|
|
9438
|
+
}, Df = ({ type: e, open: t, onOpenChange: r }) => t ? /* @__PURE__ */ l(tr, { fallback: /* @__PURE__ */ l("div", {}), children: (() => {
|
|
9433
9439
|
switch (e) {
|
|
9434
9440
|
case "profile":
|
|
9435
9441
|
return /* @__PURE__ */ l(Af, { open: t, onOpenChange: r });
|
|
@@ -9449,55 +9455,57 @@ const af = (e) => {
|
|
|
9449
9455
|
})() }) : null, Lf = ({
|
|
9450
9456
|
isComponent: e = !1
|
|
9451
9457
|
}) => {
|
|
9452
|
-
const {
|
|
9453
|
-
|
|
9454
|
-
|
|
9455
|
-
|
|
9458
|
+
const {
|
|
9459
|
+
state: { oledMode: t }
|
|
9460
|
+
} = re($t), { logout: r, getAccessToken: n, user: o } = ve(), a = Vs(), { data: i, isSuccess: s } = We({
|
|
9461
|
+
user: o?.username,
|
|
9462
|
+
getAccessToken: n
|
|
9463
|
+
}), [u, c] = R(null), [p, d] = R(!1), [f, g] = R(!1), [m, h] = R(!1), v = ur(er.TOOL.MEMORIES);
|
|
9456
9464
|
$(() => {
|
|
9457
|
-
|
|
9458
|
-
}, [
|
|
9459
|
-
const
|
|
9460
|
-
|
|
9465
|
+
s && i && v && h(i?.useMemory ?? !1);
|
|
9466
|
+
}, [s, i, v]);
|
|
9467
|
+
const I = D(() => {
|
|
9468
|
+
f || Promise.all([
|
|
9461
9469
|
import(
|
|
9462
9470
|
/* webpackChunkName: "modal-chunk" */
|
|
9463
|
-
"./ProfileEntry.
|
|
9471
|
+
"./ProfileEntry.A_AoGwYv.js"
|
|
9464
9472
|
),
|
|
9465
9473
|
import(
|
|
9466
9474
|
/* webpackChunkName: "modal-chunk" */
|
|
9467
|
-
"./SettingsEntry.
|
|
9475
|
+
"./SettingsEntry.D4RhlncR.js"
|
|
9468
9476
|
),
|
|
9469
9477
|
import(
|
|
9470
9478
|
/* webpackChunkName: "modal-chunk" */
|
|
9471
|
-
"./HistoryEntry.
|
|
9479
|
+
"./HistoryEntry.BHKiSJYf.js"
|
|
9472
9480
|
),
|
|
9473
9481
|
import(
|
|
9474
9482
|
/* webpackChunkName: "modal-chunk" */
|
|
9475
|
-
"./AboutEntry.
|
|
9483
|
+
"./AboutEntry.DiCPTiLj.js"
|
|
9476
9484
|
),
|
|
9477
9485
|
import(
|
|
9478
9486
|
/* webpackChunkName: "modal-chunk" */
|
|
9479
|
-
"./UsageEntry.
|
|
9487
|
+
"./UsageEntry.DrVVPYLQ.js"
|
|
9480
9488
|
)
|
|
9481
|
-
]).finally(() =>
|
|
9482
|
-
}, [
|
|
9483
|
-
|
|
9484
|
-
}, []),
|
|
9485
|
-
|
|
9486
|
-
}, []),
|
|
9487
|
-
|
|
9488
|
-
}, [
|
|
9489
|
-
cs("openSettings",
|
|
9490
|
-
const
|
|
9491
|
-
|
|
9492
|
-
},
|
|
9493
|
-
|
|
9494
|
-
}, [
|
|
9489
|
+
]).finally(() => g(!0));
|
|
9490
|
+
}, [f]), b = D((k) => {
|
|
9491
|
+
c(k);
|
|
9492
|
+
}, []), w = D(() => {
|
|
9493
|
+
c(null);
|
|
9494
|
+
}, []), y = D(() => {
|
|
9495
|
+
b("settings");
|
|
9496
|
+
}, [b]);
|
|
9497
|
+
cs("openSettings", y);
|
|
9498
|
+
const x = () => {
|
|
9499
|
+
d(!p);
|
|
9500
|
+
}, A = D(() => {
|
|
9501
|
+
a.clear(), r();
|
|
9502
|
+
}, [r, a]);
|
|
9495
9503
|
return qr(
|
|
9496
9504
|
[
|
|
9497
9505
|
[
|
|
9498
9506
|
"mod+,",
|
|
9499
9507
|
() => {
|
|
9500
|
-
|
|
9508
|
+
Kt() && b("settings");
|
|
9501
9509
|
}
|
|
9502
9510
|
]
|
|
9503
9511
|
],
|
|
@@ -9511,9 +9519,9 @@ const af = (e) => {
|
|
|
9511
9519
|
/* @__PURE__ */ l(
|
|
9512
9520
|
rt,
|
|
9513
9521
|
{
|
|
9514
|
-
showConfirmation:
|
|
9515
|
-
setShowConfirmation:
|
|
9516
|
-
action:
|
|
9522
|
+
showConfirmation: p,
|
|
9523
|
+
setShowConfirmation: d,
|
|
9524
|
+
action: A,
|
|
9517
9525
|
customStrings: {
|
|
9518
9526
|
confirmAction: En,
|
|
9519
9527
|
cancelAction: "Cancel",
|
|
@@ -9525,111 +9533,120 @@ const af = (e) => {
|
|
|
9525
9533
|
/* @__PURE__ */ l(
|
|
9526
9534
|
Df,
|
|
9527
9535
|
{
|
|
9528
|
-
type:
|
|
9529
|
-
open:
|
|
9530
|
-
onOpenChange:
|
|
9536
|
+
type: u,
|
|
9537
|
+
open: u !== null,
|
|
9538
|
+
onOpenChange: w
|
|
9531
9539
|
}
|
|
9532
9540
|
),
|
|
9533
|
-
/* @__PURE__ */ l(
|
|
9534
|
-
|
|
9541
|
+
/* @__PURE__ */ l(
|
|
9542
|
+
"div",
|
|
9535
9543
|
{
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
children:
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9544
|
+
className: N("py-4 px-4 rounded-t-md", {
|
|
9545
|
+
"bg-slate-900": !t,
|
|
9546
|
+
"bg-slate-700 dark:bg-slate-900": t
|
|
9547
|
+
}),
|
|
9548
|
+
children: /* @__PURE__ */ T(
|
|
9549
|
+
Ar,
|
|
9550
|
+
{
|
|
9551
|
+
alignHorizontal: "space-between",
|
|
9552
|
+
alignVertical: "center",
|
|
9553
|
+
rowGap: 0,
|
|
9554
|
+
columnGap: 0,
|
|
9555
|
+
children: [
|
|
9556
|
+
/* @__PURE__ */ l(ct, { children: /* @__PURE__ */ l(zf, { className: "mr-2" }) }),
|
|
9557
|
+
/* @__PURE__ */ l(ct, { children: /* @__PURE__ */ l(
|
|
9558
|
+
Pe,
|
|
9550
9559
|
{
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9560
|
+
label: "Profile, Settings, etc.",
|
|
9561
|
+
mode: "light",
|
|
9562
|
+
placement: "left",
|
|
9563
|
+
trigger: /* @__PURE__ */ T(
|
|
9564
|
+
Nt,
|
|
9555
9565
|
{
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
onFocus: y,
|
|
9561
|
-
children: /* @__PURE__ */ l(Qi, {})
|
|
9562
|
-
}
|
|
9563
|
-
),
|
|
9564
|
-
defaultPlacement: "bottom-end",
|
|
9565
|
-
children: [
|
|
9566
|
-
/* @__PURE__ */ l(
|
|
9567
|
-
Te,
|
|
9568
|
-
{
|
|
9569
|
-
label: "Profile",
|
|
9570
|
-
onClick: () => w("profile"),
|
|
9571
|
-
icon: /* @__PURE__ */ l(Wi, {})
|
|
9572
|
-
}
|
|
9573
|
-
),
|
|
9574
|
-
/* @__PURE__ */ l(
|
|
9575
|
-
Te,
|
|
9576
|
-
{
|
|
9577
|
-
label: "Settings",
|
|
9578
|
-
onClick: () => w("settings"),
|
|
9579
|
-
icon: /* @__PURE__ */ l(Ki, {})
|
|
9580
|
-
}
|
|
9581
|
-
),
|
|
9582
|
-
/* @__PURE__ */ l(
|
|
9583
|
-
Te,
|
|
9584
|
-
{
|
|
9585
|
-
label: "History",
|
|
9586
|
-
onClick: () => w("history"),
|
|
9587
|
-
icon: /* @__PURE__ */ l(ji, {})
|
|
9588
|
-
}
|
|
9589
|
-
),
|
|
9590
|
-
g && /* @__PURE__ */ l(
|
|
9591
|
-
Te,
|
|
9592
|
-
{
|
|
9593
|
-
label: "Memories",
|
|
9594
|
-
onClick: () => w("memories"),
|
|
9595
|
-
icon: /* @__PURE__ */ l(Bi, {})
|
|
9596
|
-
}
|
|
9597
|
-
),
|
|
9598
|
-
!e && /* @__PURE__ */ l(
|
|
9599
|
-
Te,
|
|
9600
|
-
{
|
|
9601
|
-
label: "Usage",
|
|
9602
|
-
onClick: () => w("usage"),
|
|
9603
|
-
icon: /* @__PURE__ */ l(Ri, {})
|
|
9604
|
-
}
|
|
9605
|
-
),
|
|
9606
|
-
/* @__PURE__ */ l(
|
|
9607
|
-
Te,
|
|
9608
|
-
{
|
|
9609
|
-
label: "About",
|
|
9610
|
-
onClick: () => w("about"),
|
|
9611
|
-
icon: /* @__PURE__ */ l(Vi, {})
|
|
9612
|
-
}
|
|
9613
|
-
),
|
|
9614
|
-
!e && /* @__PURE__ */ T(Me, { children: [
|
|
9615
|
-
/* @__PURE__ */ l(of, {}),
|
|
9616
|
-
/* @__PURE__ */ l(
|
|
9617
|
-
Te,
|
|
9566
|
+
mode: "dark",
|
|
9567
|
+
focusMode: "light",
|
|
9568
|
+
trigger: /* @__PURE__ */ l(
|
|
9569
|
+
Se,
|
|
9618
9570
|
{
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9571
|
+
noBorder: !0,
|
|
9572
|
+
noBackground: !0,
|
|
9573
|
+
label: "Settings",
|
|
9574
|
+
onMouseEnter: I,
|
|
9575
|
+
onFocus: I,
|
|
9576
|
+
children: /* @__PURE__ */ l(Qi, {})
|
|
9622
9577
|
}
|
|
9623
|
-
)
|
|
9624
|
-
|
|
9625
|
-
|
|
9578
|
+
),
|
|
9579
|
+
defaultPlacement: "bottom-end",
|
|
9580
|
+
children: [
|
|
9581
|
+
/* @__PURE__ */ l(
|
|
9582
|
+
Te,
|
|
9583
|
+
{
|
|
9584
|
+
label: "Profile",
|
|
9585
|
+
onClick: () => b("profile"),
|
|
9586
|
+
icon: /* @__PURE__ */ l(Wi, {})
|
|
9587
|
+
}
|
|
9588
|
+
),
|
|
9589
|
+
/* @__PURE__ */ l(
|
|
9590
|
+
Te,
|
|
9591
|
+
{
|
|
9592
|
+
label: "Settings",
|
|
9593
|
+
onClick: () => b("settings"),
|
|
9594
|
+
icon: /* @__PURE__ */ l(Ki, {})
|
|
9595
|
+
}
|
|
9596
|
+
),
|
|
9597
|
+
/* @__PURE__ */ l(
|
|
9598
|
+
Te,
|
|
9599
|
+
{
|
|
9600
|
+
label: "History",
|
|
9601
|
+
onClick: () => b("history"),
|
|
9602
|
+
icon: /* @__PURE__ */ l(ji, {})
|
|
9603
|
+
}
|
|
9604
|
+
),
|
|
9605
|
+
m && /* @__PURE__ */ l(
|
|
9606
|
+
Te,
|
|
9607
|
+
{
|
|
9608
|
+
label: "Memories",
|
|
9609
|
+
onClick: () => b("memories"),
|
|
9610
|
+
icon: /* @__PURE__ */ l(Bi, {})
|
|
9611
|
+
}
|
|
9612
|
+
),
|
|
9613
|
+
!e && /* @__PURE__ */ l(
|
|
9614
|
+
Te,
|
|
9615
|
+
{
|
|
9616
|
+
label: "Usage",
|
|
9617
|
+
onClick: () => b("usage"),
|
|
9618
|
+
icon: /* @__PURE__ */ l(Ri, {})
|
|
9619
|
+
}
|
|
9620
|
+
),
|
|
9621
|
+
/* @__PURE__ */ l(
|
|
9622
|
+
Te,
|
|
9623
|
+
{
|
|
9624
|
+
label: "About",
|
|
9625
|
+
onClick: () => b("about"),
|
|
9626
|
+
icon: /* @__PURE__ */ l(Vi, {})
|
|
9627
|
+
}
|
|
9628
|
+
),
|
|
9629
|
+
!e && /* @__PURE__ */ T(Me, { children: [
|
|
9630
|
+
/* @__PURE__ */ l(of, {}),
|
|
9631
|
+
/* @__PURE__ */ l(
|
|
9632
|
+
Te,
|
|
9633
|
+
{
|
|
9634
|
+
label: "Log out",
|
|
9635
|
+
onClick: x,
|
|
9636
|
+
icon: /* @__PURE__ */ l("div", { className: "text-red-700", children: /* @__PURE__ */ l(Mi, { monotone: !0 }) })
|
|
9637
|
+
}
|
|
9638
|
+
)
|
|
9639
|
+
] })
|
|
9640
|
+
]
|
|
9641
|
+
}
|
|
9642
|
+
)
|
|
9626
9643
|
}
|
|
9627
|
-
)
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9644
|
+
) })
|
|
9645
|
+
]
|
|
9646
|
+
}
|
|
9647
|
+
)
|
|
9631
9648
|
}
|
|
9632
|
-
)
|
|
9649
|
+
)
|
|
9633
9650
|
] });
|
|
9634
9651
|
}, Bf = ({
|
|
9635
9652
|
show: e,
|
|
@@ -9641,14 +9658,14 @@ const af = (e) => {
|
|
|
9641
9658
|
"div",
|
|
9642
9659
|
{
|
|
9643
9660
|
style: { bottom: `${t}px` },
|
|
9644
|
-
className: n ||
|
|
9661
|
+
className: n || N(
|
|
9645
9662
|
bh,
|
|
9646
9663
|
"fixed left-1/2 transform -translate-x-1/2 isolate"
|
|
9647
9664
|
),
|
|
9648
9665
|
children: /* @__PURE__ */ l(
|
|
9649
9666
|
"button",
|
|
9650
9667
|
{
|
|
9651
|
-
className:
|
|
9668
|
+
className: N(
|
|
9652
9669
|
"focus:outline-2",
|
|
9653
9670
|
"focus:outline-focus-dark dark:focus:outline-focus-light",
|
|
9654
9671
|
"av-button not-prose truncate text-copy-light rounded-full inline-flex items-center justify-center h-8 w-8 p-1 border border-white/20 dark:border-black/20 focus:outline-offset-2 disabled:opacity-50 dark:bg-slate-50/60 bg-slate-500/60 backdrop-blur-lg backdrop-saturate-150 disabled:cursor-auto opacity-90 hover:opacity-100 transition-opacity",
|
|
@@ -9682,7 +9699,7 @@ const af = (e) => {
|
|
|
9682
9699
|
type: r = "circle",
|
|
9683
9700
|
className: n
|
|
9684
9701
|
}) => {
|
|
9685
|
-
const o = r === "circle" ?
|
|
9702
|
+
const o = r === "circle" ? N(
|
|
9686
9703
|
wo,
|
|
9687
9704
|
"h-8 w-8",
|
|
9688
9705
|
"align-[-0.125em]",
|
|
@@ -9695,7 +9712,7 @@ const af = (e) => {
|
|
|
9695
9712
|
"text-copy-accent dark:text-copy-dark": t === "alt-system"
|
|
9696
9713
|
},
|
|
9697
9714
|
n
|
|
9698
|
-
) :
|
|
9715
|
+
) : N(wo, n), a = N("av-spinner__dot", {
|
|
9699
9716
|
"fill-copy-dark": t === "dark",
|
|
9700
9717
|
"fill-copy-accent": t === "light",
|
|
9701
9718
|
"fill-copy-dark dark:fill-copy-accent": t === "system",
|
|
@@ -9724,18 +9741,18 @@ try {
|
|
|
9724
9741
|
} catch {
|
|
9725
9742
|
}
|
|
9726
9743
|
const Uf = Re(
|
|
9727
|
-
() => import("./index.
|
|
9728
|
-
), dn = (e) => /* @__PURE__ */ l(
|
|
9744
|
+
() => import("./index.O2zfzZcM.js").then((e) => ({ default: e.Bubble }))
|
|
9745
|
+
), dn = (e) => /* @__PURE__ */ l(tr, { fallback: /* @__PURE__ */ l("span", { className: "inline-block" }), children: /* @__PURE__ */ l(Uf, { ...e }) });
|
|
9729
9746
|
dn.displayName = "AsyncBubble";
|
|
9730
9747
|
const Io = 1, jf = 150, Vf = Re(
|
|
9731
9748
|
() => import(
|
|
9732
9749
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
9733
|
-
"./ChatBubbleAssistant.
|
|
9750
|
+
"./ChatBubbleAssistant.C-aLHVG0.js"
|
|
9734
9751
|
)
|
|
9735
9752
|
), Ff = Re(
|
|
9736
9753
|
() => import(
|
|
9737
9754
|
/* webpackChunkName: "LazyMessageUser" */
|
|
9738
|
-
"./ChatBubbleUser.
|
|
9755
|
+
"./ChatBubbleUser.Cb2OzGt2.js"
|
|
9739
9756
|
)
|
|
9740
9757
|
), Hf = pt.memo(
|
|
9741
9758
|
({
|
|
@@ -9761,7 +9778,7 @@ const Io = 1, jf = 150, Vf = Re(
|
|
|
9761
9778
|
}
|
|
9762
9779
|
s(!1);
|
|
9763
9780
|
}
|
|
9764
|
-
}, [t, i, o]), e === Ao && t ? /* @__PURE__ */ l(
|
|
9781
|
+
}, [t, i, o]), e === Ao && t ? /* @__PURE__ */ l(tr, { fallback: /* @__PURE__ */ l("span", {}), children: /* @__PURE__ */ l(Ff, { content: t }) }) : (e === It || e === Tn) && o && (a === "submitted" || a === "streaming") && i ? /* @__PURE__ */ l(dn, { tail: !0, children: /* @__PURE__ */ l(ms, { type: "dots" }) }) : (e === It || e === Tn) && t && t.trim().length >= Io ? /* @__PURE__ */ l(tr, { fallback: /* @__PURE__ */ l("span", {}), children: /* @__PURE__ */ l(
|
|
9765
9782
|
Vf,
|
|
9766
9783
|
{
|
|
9767
9784
|
role: e,
|
|
@@ -9819,30 +9836,31 @@ const Wf = () => {
|
|
|
9819
9836
|
] }) : null;
|
|
9820
9837
|
}, qf = () => {
|
|
9821
9838
|
const { isAuthenticated: e } = ve(), { ref: t, inViewport: r } = xi(), n = j(null), o = j(null), {
|
|
9822
|
-
state: { footerPosition: a, footerHeight: i, footerOffset: s }
|
|
9823
|
-
} =
|
|
9824
|
-
state: { loading:
|
|
9825
|
-
} =
|
|
9839
|
+
state: { footerPosition: a, footerHeight: i, footerOffset: s, oledMode: u }
|
|
9840
|
+
} = re($t), {
|
|
9841
|
+
state: { loading: c }
|
|
9842
|
+
} = re(xe), { messages: p } = Ye(), d = j(0), { data: f, isSuccess: g } = Fs(), m = Hs({
|
|
9826
9843
|
isAuthenticated: e,
|
|
9827
|
-
|
|
9828
|
-
|
|
9844
|
+
oledMode: u,
|
|
9845
|
+
extraClass: `rounded-b-md relative border-b-16 ${u ? "border-slate-700 dark:border-slate-900" : "border-slate-900"}`
|
|
9846
|
+
}), h = Or() ? "mt-4" : "", v = D(() => {
|
|
9829
9847
|
o.current && o.current.scrollIntoView({
|
|
9830
9848
|
behavior: "smooth",
|
|
9831
9849
|
block: "end"
|
|
9832
9850
|
});
|
|
9833
9851
|
}, []);
|
|
9834
9852
|
return $(() => {
|
|
9835
|
-
|
|
9836
|
-
}, [
|
|
9837
|
-
|
|
9853
|
+
c && v();
|
|
9854
|
+
}, [c, v]), $(() => {
|
|
9855
|
+
d.current = a === wt ? i + s + Oo + Js + 15 : 0;
|
|
9838
9856
|
}, [a, i, s]), /* @__PURE__ */ T(Me, { children: [
|
|
9839
|
-
/* @__PURE__ */ T("div", { className:
|
|
9857
|
+
/* @__PURE__ */ T("div", { className: m, ref: n, children: [
|
|
9840
9858
|
/* @__PURE__ */ l(
|
|
9841
9859
|
Gs,
|
|
9842
9860
|
{
|
|
9843
|
-
className:
|
|
9844
|
-
isCapabilitiesSuccess:
|
|
9845
|
-
capabilities:
|
|
9861
|
+
className: h,
|
|
9862
|
+
isCapabilitiesSuccess: g,
|
|
9863
|
+
capabilities: f
|
|
9846
9864
|
}
|
|
9847
9865
|
),
|
|
9848
9866
|
/* @__PURE__ */ l(Wf, {}),
|
|
@@ -9851,8 +9869,8 @@ const Wf = () => {
|
|
|
9851
9869
|
"div",
|
|
9852
9870
|
{
|
|
9853
9871
|
ref: o,
|
|
9854
|
-
className:
|
|
9855
|
-
"pt-20":
|
|
9872
|
+
className: N({
|
|
9873
|
+
"pt-20": p && p.length > 1
|
|
9856
9874
|
})
|
|
9857
9875
|
}
|
|
9858
9876
|
)
|
|
@@ -9861,8 +9879,8 @@ const Wf = () => {
|
|
|
9861
9879
|
Bf,
|
|
9862
9880
|
{
|
|
9863
9881
|
show: !r && a === wt,
|
|
9864
|
-
bottom:
|
|
9865
|
-
onClick:
|
|
9882
|
+
bottom: d.current,
|
|
9883
|
+
onClick: v
|
|
9866
9884
|
}
|
|
9867
9885
|
)
|
|
9868
9886
|
] });
|
|
@@ -9883,15 +9901,15 @@ function hs({
|
|
|
9883
9901
|
}), [h] = Oe({
|
|
9884
9902
|
key: je + ri,
|
|
9885
9903
|
initialValue: ut.ASC
|
|
9886
|
-
}), [
|
|
9904
|
+
}), [v] = Oe({
|
|
9887
9905
|
key: ei,
|
|
9888
9906
|
initialValue: !1
|
|
9889
|
-
}),
|
|
9890
|
-
footerPosition:
|
|
9907
|
+
}), I = Ne(() => ({
|
|
9908
|
+
footerPosition: lr,
|
|
9891
9909
|
footerHeight: 0,
|
|
9892
9910
|
footerOffset: Ve() ? zo : 0,
|
|
9893
9911
|
oledMode: !1
|
|
9894
|
-
}), []), [b,
|
|
9912
|
+
}), []), [b, w] = Zt(sh, I), y = Ne(() => {
|
|
9895
9913
|
const de = Ve(), De = xo();
|
|
9896
9914
|
return de && De ? "mt-1" : "mt-5";
|
|
9897
9915
|
}, []), A = {
|
|
@@ -9906,13 +9924,13 @@ function hs({
|
|
|
9906
9924
|
return m;
|
|
9907
9925
|
}
|
|
9908
9926
|
})()
|
|
9909
|
-
}, [k, O] =
|
|
9927
|
+
}, [k, O] = Zt(
|
|
9910
9928
|
ch,
|
|
9911
9929
|
A
|
|
9912
|
-
), [M, Z] =
|
|
9930
|
+
), [M, Z] = Zt(lh, {
|
|
9913
9931
|
prompt: "",
|
|
9914
9932
|
lastTriggeredTimestamp: 0
|
|
9915
|
-
}), [Q, le] =
|
|
9933
|
+
}), [Q, le] = Zt(ih, {
|
|
9916
9934
|
provider: "",
|
|
9917
9935
|
// OpenAI, Anthropic, etc.
|
|
9918
9936
|
privateChat: !1,
|
|
@@ -9944,11 +9962,11 @@ function hs({
|
|
|
9944
9962
|
}), $(() => {
|
|
9945
9963
|
document.getElementById("root")?.classList.replace("app-hidden", "fadeIn");
|
|
9946
9964
|
}, []), $(() => {
|
|
9947
|
-
Ws(
|
|
9965
|
+
Ws(v), w({
|
|
9948
9966
|
type: ns,
|
|
9949
|
-
payload: { oledMode:
|
|
9967
|
+
payload: { oledMode: v }
|
|
9950
9968
|
});
|
|
9951
|
-
}, [
|
|
9969
|
+
}, [v]), $(() => {
|
|
9952
9970
|
Ze && Ze.provider && le({
|
|
9953
9971
|
type: cn,
|
|
9954
9972
|
payload: {
|
|
@@ -9965,7 +9983,7 @@ function hs({
|
|
|
9965
9983
|
}
|
|
9966
9984
|
}, []), si(() => {
|
|
9967
9985
|
if (b.footerPosition === "FOOTER_BOTTOM") {
|
|
9968
|
-
const de =
|
|
9986
|
+
const de = y === "mt-1" ? 4 : 20, De = `calc(${s.height}px + ${de}px)`;
|
|
9969
9987
|
a(
|
|
9970
9988
|
`calc(100svh - ${t}px - ${De} - ${b.footerHeight}px - ${b.footerOffset}px - ${Oo}px)`
|
|
9971
9989
|
);
|
|
@@ -9973,14 +9991,14 @@ function hs({
|
|
|
9973
9991
|
a(
|
|
9974
9992
|
Ve() ? `${qs}px` : `${Sn}px`
|
|
9975
9993
|
);
|
|
9976
|
-
}, [b, s, t,
|
|
9994
|
+
}, [b, s, t, y]), /* @__PURE__ */ l(
|
|
9977
9995
|
is.Provider,
|
|
9978
9996
|
{
|
|
9979
9997
|
value: {
|
|
9980
9998
|
state: k,
|
|
9981
9999
|
dispatch: O
|
|
9982
10000
|
},
|
|
9983
|
-
children: /* @__PURE__ */ l(
|
|
10001
|
+
children: /* @__PURE__ */ l($t.Provider, { value: { state: b, dispatch: w }, children: /* @__PURE__ */ l(
|
|
9984
10002
|
ln.Provider,
|
|
9985
10003
|
{
|
|
9986
10004
|
value: { state: M, dispatch: Z },
|
|
@@ -10016,7 +10034,7 @@ function hs({
|
|
|
10016
10034
|
{
|
|
10017
10035
|
ref: i,
|
|
10018
10036
|
className: Mr({
|
|
10019
|
-
extraClass:
|
|
10037
|
+
extraClass: y
|
|
10020
10038
|
}),
|
|
10021
10039
|
children: /* @__PURE__ */ l(Lf, { isComponent: e })
|
|
10022
10040
|
}
|
|
@@ -10047,7 +10065,7 @@ const n1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10047
10065
|
export {
|
|
10048
10066
|
ns as APP_SET_OLED_MODE,
|
|
10049
10067
|
n1 as App,
|
|
10050
|
-
|
|
10068
|
+
$t as AppContext,
|
|
10051
10069
|
dn as AsyncBubble,
|
|
10052
10070
|
Bf as ButtonScroll,
|
|
10053
10071
|
cn as CHAT_SET_PROVIDER,
|
|
@@ -10069,6 +10087,6 @@ export {
|
|
|
10069
10087
|
Ct as showSuccessToast,
|
|
10070
10088
|
Pe as st,
|
|
10071
10089
|
Ye as useAiChat,
|
|
10072
|
-
|
|
10090
|
+
ur as useCapability,
|
|
10073
10091
|
Gi as z
|
|
10074
10092
|
};
|