@versini/sassysaint 4.3.3 → 4.3.5
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/{App.Dkjj-6lf.js → App.BDhgKayb.js} +3 -3
- package/dist/chunks/{LazyHeader.B0DWuoW8.js → LazyHeader.Dzj0SxfZ.js} +238 -239
- package/dist/chunks/{LazyMarkdownWithExtra.B6ArTFcZ.js → LazyMarkdownWithExtra.D0TcUIim.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.6l2ElKdb.js → LazyMessageAssistant.BVbfNukB.js} +4 -4
- package/dist/chunks/{index.Bzt9pToY.AYXUeiUe.js → index.BA5202H5.n-3JBGIa.js} +2 -2
- package/dist/chunks/{index.Bd1O6OvY.js → index.DXHNooT6.js} +10 -10
- package/dist/chunks/{useLocalStorage.BJF_XPk2.js → useLocalStorage.Bp1o7FYF.js} +98 -98
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as d, jsx as t, Fragment as w } from "react/jsx-runtime";
|
|
2
|
-
import { O as B, i$1 as le, N as de, p as De, o as Oe, g as
|
|
2
|
+
import { O as B, i$1 as le, N as de, p as De, o as Oe, g as I, N$1 as R, CARDS as f, renderDataAsList as j, pluralize as Q, ABOUT_TITLE as ze, MODEL_GPT4 as Be, numberFormatter as Pe, durationFormatter as Ce, NA as Ve, ROLE_ASSISTANT as Fe, extractAverage as $e, GPT4_MAX_TOKENS as Ge, qr as V, STATS as Te, b as re, j$1 as P, x as z, LOCAL_STORAGE_PREFIX as ce, LOCAL_STORAGE_SORT as Ue, ACTION_RESET as je, ACTION_RESTORE as Ye, truncate as Ke, ACTION_SORT as ae, LOCAL_STORAGE_SEARCH as We, G as Xe, ACTION_SEARCH as qe, HISTORY_TITLE as Je, getCurrentGeoLocation as Qe, LOCAL_STORAGE_CHAT_DETAILS as Ze, W as et, v as ue, PROFILE_TITLE as tt, LOG_OUT as me } from "./index.DXHNooT6.js";
|
|
3
3
|
import * as ne from "react";
|
|
4
|
-
import
|
|
5
|
-
import { g as ct, AppContext as Z, serviceCall as H, SERVICE_TYPES as L, HistoryContext as Se, E as ie, k as
|
|
4
|
+
import at, { forwardRef as Ne, useState as T, useRef as Y, useContext as _, useEffect as D, Suspense as ot, lazy as nt, useId as st, useMemo as rt } from "react";
|
|
5
|
+
import { g as ct, AppContext as Z, serviceCall as H, SERVICE_TYPES as L, HistoryContext as Se, E as ie, k as x, et as it, at as lt, lt as oe, J as M, ct as dt, st as ut, rt as mt, Tt as he } from "./useLocalStorage.Bp1o7FYF.js";
|
|
6
6
|
import b from "clsx";
|
|
7
|
-
import { useFloatingTree as Ee, useFloatingNodeId as ht, useListItem as ye, useFloating as pt, offset as ft, flip as gt, shift as Ct, autoUpdate as Tt, useClick as Nt, useRole as St, useDismiss as Et, useListNavigation as yt, useTypeahead as wt, useInteractions as bt, useMergeRefs as we, FloatingNode as kt, FloatingList as
|
|
7
|
+
import { useFloatingTree as Ee, useFloatingNodeId as ht, useListItem as ye, useFloating as pt, offset as ft, flip as gt, shift as Ct, autoUpdate as Tt, useClick as Nt, useRole as St, useDismiss as Et, useListNavigation as yt, useTypeahead as wt, useInteractions as bt, useMergeRefs as we, FloatingNode as kt, FloatingList as xt, FloatingPortal as It, FloatingFocusManager as vt, FloatingTree as At } from "@floating-ui/react";
|
|
8
8
|
const se = ne.createContext({
|
|
9
9
|
getItemProps: () => ({}),
|
|
10
10
|
activeIndex: null,
|
|
@@ -20,16 +20,16 @@ const se = ne.createContext({
|
|
|
20
20
|
if (typeof e == "function")
|
|
21
21
|
return e.displayName || e.name || "Component";
|
|
22
22
|
if (typeof e == "object" && e !== null && "type" in e) {
|
|
23
|
-
const
|
|
24
|
-
if (typeof
|
|
25
|
-
return
|
|
23
|
+
const a = e.type;
|
|
24
|
+
if (typeof a == "function" || typeof a == "object")
|
|
25
|
+
return a.displayName || a.name || "Component";
|
|
26
26
|
}
|
|
27
27
|
return "Element";
|
|
28
28
|
}, be = Ne(
|
|
29
29
|
({
|
|
30
30
|
trigger: e,
|
|
31
|
-
children:
|
|
32
|
-
label:
|
|
31
|
+
children: a,
|
|
32
|
+
label: o = "Open menu",
|
|
33
33
|
defaultPlacement: n = "bottom-start",
|
|
34
34
|
onOpenChange: s,
|
|
35
35
|
spacing: r,
|
|
@@ -37,8 +37,8 @@ const se = ne.createContext({
|
|
|
37
37
|
focusMode: m = "system",
|
|
38
38
|
...c
|
|
39
39
|
}, i) => {
|
|
40
|
-
const [u, g] = T(!1), [N, C] = T(!1), [p, y] = T(null), k = Y([]), h = Y([]), S = _(se), E = Ee(),
|
|
41
|
-
nodeId:
|
|
40
|
+
const [u, g] = T(!1), [N, C] = T(!1), [p, y] = T(null), k = Y([]), h = Y([]), S = _(se), E = Ee(), v = ht(), ee = ye(), { floatingStyles: te, refs: X, context: A } = pt({
|
|
41
|
+
nodeId: v,
|
|
42
42
|
open: u,
|
|
43
43
|
onOpenChange: (G) => {
|
|
44
44
|
g(G), s == null || s(G);
|
|
@@ -51,7 +51,7 @@ const se = ne.createContext({
|
|
|
51
51
|
event: "mousedown",
|
|
52
52
|
toggle: !0,
|
|
53
53
|
ignoreMouse: !1
|
|
54
|
-
}), $ = St(A, { role: "menu" }),
|
|
54
|
+
}), $ = St(A, { role: "menu" }), Ie = Et(A, { bubbles: !0 }), ve = yt(A, {
|
|
55
55
|
listRef: k,
|
|
56
56
|
activeIndex: p,
|
|
57
57
|
nested: !1,
|
|
@@ -61,12 +61,12 @@ const se = ne.createContext({
|
|
|
61
61
|
listRef: h,
|
|
62
62
|
onMatch: u ? y : void 0,
|
|
63
63
|
activeIndex: p
|
|
64
|
-
}), { getReferenceProps: Me, getFloatingProps: Re, getItemProps: He } = bt([q, $,
|
|
64
|
+
}), { getReferenceProps: Me, getFloatingProps: Re, getItemProps: He } = bt([q, $, Ie, ve, Ae]), Le = pe(e) === "Button" || pe(e) === "ButtonIcon", _e = at.cloneElement(e, {
|
|
65
65
|
mode: l,
|
|
66
66
|
focusMode: m,
|
|
67
67
|
spacing: r,
|
|
68
68
|
noInternalClick: Le,
|
|
69
|
-
"aria-label":
|
|
69
|
+
"aria-label": o,
|
|
70
70
|
"data-open": u ? "" : void 0,
|
|
71
71
|
"data-focus-inside": N ? "" : void 0,
|
|
72
72
|
ref: we([X.setReference, ee.ref, i]),
|
|
@@ -86,8 +86,8 @@ const se = ne.createContext({
|
|
|
86
86
|
E.events.off("click", G);
|
|
87
87
|
};
|
|
88
88
|
}, [E, s]), D(() => {
|
|
89
|
-
u && E && E.events.emit("menuopen", { nodeId:
|
|
90
|
-
}, [E, u,
|
|
89
|
+
u && E && E.events.emit("menuopen", { nodeId: v });
|
|
90
|
+
}, [E, u, v]), /* @__PURE__ */ d(kt, { id: v, children: [
|
|
91
91
|
_e,
|
|
92
92
|
/* @__PURE__ */ t(
|
|
93
93
|
se.Provider,
|
|
@@ -99,8 +99,8 @@ const se = ne.createContext({
|
|
|
99
99
|
setHasFocusInside: C,
|
|
100
100
|
isOpen: u
|
|
101
101
|
},
|
|
102
|
-
children: /* @__PURE__ */ t(
|
|
103
|
-
|
|
102
|
+
children: /* @__PURE__ */ t(xt, { elementsRef: k, labelsRef: h, children: u && /* @__PURE__ */ t(It, { children: /* @__PURE__ */ t(
|
|
103
|
+
vt,
|
|
104
104
|
{
|
|
105
105
|
context: A,
|
|
106
106
|
modal: !1,
|
|
@@ -113,7 +113,7 @@ const se = ne.createContext({
|
|
|
113
113
|
className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
|
|
114
114
|
style: te,
|
|
115
115
|
...Re(),
|
|
116
|
-
children:
|
|
116
|
+
children: a
|
|
117
117
|
}
|
|
118
118
|
)
|
|
119
119
|
}
|
|
@@ -122,11 +122,11 @@ const se = ne.createContext({
|
|
|
122
122
|
)
|
|
123
123
|
] });
|
|
124
124
|
}
|
|
125
|
-
), ke = Ne((e,
|
|
125
|
+
), ke = Ne((e, a) => /* @__PURE__ */ t(At, { children: /* @__PURE__ */ t(be, { ...e, ref: a }) }));
|
|
126
126
|
ke.displayName = "Menu";
|
|
127
127
|
be.displayName = "MenuComponent";
|
|
128
|
-
const O = ne.forwardRef(({ label: e, disabled:
|
|
129
|
-
const r = ne.useContext(se), l = ye({ label:
|
|
128
|
+
const O = ne.forwardRef(({ label: e, disabled: a, icon: o, ...n }, s) => {
|
|
129
|
+
const r = ne.useContext(se), l = ye({ label: a ? null : e }), m = Ee();
|
|
130
130
|
return /* @__PURE__ */ d(
|
|
131
131
|
"button",
|
|
132
132
|
{
|
|
@@ -135,7 +135,7 @@ const O = ne.forwardRef(({ label: e, disabled: o, icon: a, ...n }, s) => {
|
|
|
135
135
|
role: "menuitem",
|
|
136
136
|
className: "m-0 flex w-full rounded-md border border-transparent bg-none px-3 py-2 text-left text-base outline-none focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium sm:py-1",
|
|
137
137
|
tabIndex: 0,
|
|
138
|
-
disabled:
|
|
138
|
+
disabled: a,
|
|
139
139
|
...r.getItemProps({
|
|
140
140
|
onClick(c) {
|
|
141
141
|
var i;
|
|
@@ -147,20 +147,20 @@ const O = ne.forwardRef(({ label: e, disabled: o, icon: a, ...n }, s) => {
|
|
|
147
147
|
}
|
|
148
148
|
}),
|
|
149
149
|
children: [
|
|
150
|
-
|
|
150
|
+
o,
|
|
151
151
|
e && /* @__PURE__ */ t("span", { className: "pl-2", children: e })
|
|
152
152
|
]
|
|
153
153
|
}
|
|
154
154
|
);
|
|
155
155
|
});
|
|
156
156
|
O.displayName = "MenuItem";
|
|
157
|
-
const Mt = ({ className: e, ...
|
|
158
|
-
const
|
|
159
|
-
return /* @__PURE__ */ t("div", { className:
|
|
157
|
+
const Mt = ({ className: e, ...a }) => {
|
|
158
|
+
const o = b(e, "my-1 border-t border-border-medium");
|
|
159
|
+
return /* @__PURE__ */ t("div", { className: o, ...a });
|
|
160
160
|
}, Rt = ({
|
|
161
161
|
className: e,
|
|
162
|
-
viewBox:
|
|
163
|
-
spacing:
|
|
162
|
+
viewBox: a,
|
|
163
|
+
spacing: o,
|
|
164
164
|
title: n,
|
|
165
165
|
monotone: s,
|
|
166
166
|
...r
|
|
@@ -169,41 +169,41 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
169
169
|
{
|
|
170
170
|
defaultViewBox: "0 0 384 512",
|
|
171
171
|
defaultClassName: "size-5",
|
|
172
|
-
viewBox:
|
|
172
|
+
viewBox: a,
|
|
173
173
|
className: e,
|
|
174
|
-
spacing:
|
|
174
|
+
spacing: o,
|
|
175
175
|
title: n || "Close",
|
|
176
176
|
...r,
|
|
177
177
|
children: /* @__PURE__ */ t("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
|
|
178
178
|
}
|
|
179
179
|
), U = "panel", J = "messagebox", Ht = ({
|
|
180
180
|
className: e,
|
|
181
|
-
kind:
|
|
182
|
-
borderMode:
|
|
181
|
+
kind: a,
|
|
182
|
+
borderMode: o
|
|
183
183
|
}) => ({
|
|
184
184
|
main: b("prose prose-lighter flex flex-col bg-surface-medium", {
|
|
185
|
-
[`${le} h-full min-h-[95%] sm:h-auto sm:min-h-[10rem] sm:rounded-lg sm:border-2`]:
|
|
186
|
-
[`${le} w-full sm:w-[95%] md:max-w-2xl`]:
|
|
187
|
-
[`${de} rounded-lg border-2`]:
|
|
188
|
-
[`${de} w-[95%] sm:w-[50%] md:max-w-2xl`]:
|
|
185
|
+
[`${le} h-full min-h-[95%] sm:h-auto sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: a === U,
|
|
186
|
+
[`${le} w-full sm:w-[95%] md:max-w-2xl`]: a === U && !e,
|
|
187
|
+
[`${de} rounded-lg border-2`]: a === J,
|
|
188
|
+
[`${de} w-[95%] sm:w-[50%] md:max-w-2xl`]: a === J && !e,
|
|
189
189
|
[`${e}`]: !!e,
|
|
190
|
-
"sm:border-border-dark":
|
|
191
|
-
"sm:border-border-accent":
|
|
192
|
-
"border-border-dark":
|
|
193
|
-
"border-border-accent":
|
|
190
|
+
"sm:border-border-dark": o === "dark" && a === U,
|
|
191
|
+
"sm:border-border-accent": o === "light" && a === U,
|
|
192
|
+
"border-border-dark": o === "dark" && a === J,
|
|
193
|
+
"border-border-accent": o === "light" && a === J
|
|
194
194
|
}),
|
|
195
|
-
content: "flex flex-grow flex-col py-2 sm:py-4 px-4",
|
|
196
|
-
footer: "flex flex-grow flex-col p-4",
|
|
197
|
-
header: "p-4 mb-0",
|
|
198
|
-
close: "p-4"
|
|
195
|
+
content: "flex flex-grow flex-col py-2 sm:py-4 sm:px-4 px-2",
|
|
196
|
+
footer: "flex flex-grow flex-col sm:p-4 p-2",
|
|
197
|
+
header: "sm:p-4 mb-0 p-2",
|
|
198
|
+
close: "sm:p-4 p-2"
|
|
199
199
|
}), W = (e) => nt(
|
|
200
|
-
() => import("./index.
|
|
201
|
-
default:
|
|
200
|
+
() => import("./index.BA5202H5.n-3JBGIa.js").then((a) => ({
|
|
201
|
+
default: a[e]
|
|
202
202
|
}))
|
|
203
203
|
), Lt = W("Modal"), _t = W("ModalClose"), Dt = W("ModalContent"), Ot = W("ModalDescription"), zt = W("ModalHeading"), F = ({
|
|
204
204
|
open: e,
|
|
205
|
-
onOpenChange:
|
|
206
|
-
title:
|
|
205
|
+
onOpenChange: a,
|
|
206
|
+
title: o,
|
|
207
207
|
children: n,
|
|
208
208
|
footer: s,
|
|
209
209
|
borderMode: r = "light",
|
|
@@ -211,9 +211,9 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
211
211
|
className: m
|
|
212
212
|
}) => {
|
|
213
213
|
const c = Y(""), i = Ht({ className: m, kind: l, borderMode: r });
|
|
214
|
-
return D(() => (e && (c.current = document.title, document.title = `${
|
|
214
|
+
return D(() => (e && (c.current = document.title, document.title = `${o} | ${c.current}`), () => {
|
|
215
215
|
e && (document.title = c.current);
|
|
216
|
-
}), [
|
|
216
|
+
}), [o, e]), /* @__PURE__ */ t(ot, { fallback: /* @__PURE__ */ t("div", {}), children: e && /* @__PURE__ */ t(Lt, { open: e, onOpenChange: a, children: /* @__PURE__ */ d(Dt, { className: i.main, children: [
|
|
217
217
|
/* @__PURE__ */ d("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
218
218
|
/* @__PURE__ */ t(
|
|
219
219
|
_t,
|
|
@@ -231,7 +231,7 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
231
231
|
)
|
|
232
232
|
}
|
|
233
233
|
),
|
|
234
|
-
/* @__PURE__ */ t(zt, { className: i.header, children:
|
|
234
|
+
/* @__PURE__ */ t(zt, { className: i.header, children: o })
|
|
235
235
|
] }),
|
|
236
236
|
/* @__PURE__ */ t(Ot, { className: i.content, children: n }),
|
|
237
237
|
s && /* @__PURE__ */ t("div", { className: i.footer, children: s })
|
|
@@ -269,17 +269,17 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
269
269
|
"after:content-['']"
|
|
270
270
|
), $t = ({
|
|
271
271
|
mode: e,
|
|
272
|
-
noBorder:
|
|
272
|
+
noBorder: a
|
|
273
273
|
}) => b({
|
|
274
|
-
border: !
|
|
274
|
+
border: !a,
|
|
275
275
|
"border-border-dark bg-surface-medium": e === "light",
|
|
276
276
|
"border-border-light bg-surface-darker": e === "dark",
|
|
277
277
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
|
278
278
|
"border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
|
279
279
|
}), Gt = ({
|
|
280
280
|
mode: e,
|
|
281
|
-
labelHidden:
|
|
282
|
-
}) =>
|
|
281
|
+
labelHidden: a
|
|
282
|
+
}) => a ? "sr-only" : b("ml-2 text-sm", {
|
|
283
283
|
"text-copy-dark": e === "light",
|
|
284
284
|
"text-copy-lighter": e === "dark",
|
|
285
285
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
|
@@ -290,25 +290,25 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
290
290
|
Oe(e)
|
|
291
291
|
), jt = ({
|
|
292
292
|
mode: e,
|
|
293
|
-
focusMode:
|
|
294
|
-
labelHidden:
|
|
293
|
+
focusMode: a,
|
|
294
|
+
labelHidden: o,
|
|
295
295
|
spacing: n,
|
|
296
296
|
noBorder: s
|
|
297
297
|
}) => ({
|
|
298
298
|
toggle: b(
|
|
299
299
|
Bt(),
|
|
300
300
|
$t({ mode: e, noBorder: s }),
|
|
301
|
-
Pt({ focusMode:
|
|
301
|
+
Pt({ focusMode: a }),
|
|
302
302
|
Ft(),
|
|
303
303
|
Vt()
|
|
304
304
|
),
|
|
305
|
-
label: Gt({ mode: e, labelHidden:
|
|
305
|
+
label: Gt({ mode: e, labelHidden: o }),
|
|
306
306
|
input: "peer sr-only",
|
|
307
307
|
wrapper: Ut({ spacing: n })
|
|
308
308
|
}), Yt = ({
|
|
309
309
|
checked: e = !1,
|
|
310
|
-
onChange:
|
|
311
|
-
label:
|
|
310
|
+
onChange: a,
|
|
311
|
+
label: o,
|
|
312
312
|
labelHidden: n = !1,
|
|
313
313
|
name: s,
|
|
314
314
|
mode: r = "system",
|
|
@@ -323,7 +323,7 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
323
323
|
spacing: m,
|
|
324
324
|
noBorder: c
|
|
325
325
|
}), u = (g) => {
|
|
326
|
-
|
|
326
|
+
a == null || a(g.target.checked);
|
|
327
327
|
};
|
|
328
328
|
return /* @__PURE__ */ d("label", { className: i.wrapper, children: [
|
|
329
329
|
/* @__PURE__ */ t(
|
|
@@ -337,23 +337,23 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
337
337
|
}
|
|
338
338
|
),
|
|
339
339
|
/* @__PURE__ */ t("div", { className: i.toggle }),
|
|
340
|
-
/* @__PURE__ */ t("span", { className: i.label, children:
|
|
340
|
+
/* @__PURE__ */ t("span", { className: i.label, children: o })
|
|
341
341
|
] });
|
|
342
342
|
}, Kt = ({
|
|
343
343
|
className: e,
|
|
344
|
-
viewBox:
|
|
345
|
-
spacing:
|
|
344
|
+
viewBox: a,
|
|
345
|
+
spacing: o,
|
|
346
346
|
title: n,
|
|
347
347
|
monotone: s,
|
|
348
348
|
...r
|
|
349
349
|
}) => /* @__PURE__ */ d(
|
|
350
|
-
|
|
350
|
+
I,
|
|
351
351
|
{
|
|
352
352
|
defaultViewBox: "0 0 512 512",
|
|
353
353
|
defaultClassName: "size-5",
|
|
354
|
-
viewBox:
|
|
354
|
+
viewBox: a,
|
|
355
355
|
className: e,
|
|
356
|
-
spacing:
|
|
356
|
+
spacing: o,
|
|
357
357
|
title: n || "Back",
|
|
358
358
|
...r,
|
|
359
359
|
children: [
|
|
@@ -369,19 +369,19 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
369
369
|
}
|
|
370
370
|
), Wt = ({
|
|
371
371
|
className: e,
|
|
372
|
-
viewBox:
|
|
373
|
-
spacing:
|
|
372
|
+
viewBox: a,
|
|
373
|
+
spacing: o,
|
|
374
374
|
title: n,
|
|
375
375
|
monotone: s,
|
|
376
376
|
...r
|
|
377
377
|
}) => /* @__PURE__ */ d(
|
|
378
|
-
|
|
378
|
+
I,
|
|
379
379
|
{
|
|
380
380
|
defaultViewBox: "0 0 448 512",
|
|
381
381
|
defaultClassName: "size-5",
|
|
382
|
-
viewBox:
|
|
382
|
+
viewBox: a,
|
|
383
383
|
className: e,
|
|
384
|
-
spacing:
|
|
384
|
+
spacing: o,
|
|
385
385
|
title: n || "Chart",
|
|
386
386
|
...r,
|
|
387
387
|
children: [
|
|
@@ -397,19 +397,19 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
397
397
|
}
|
|
398
398
|
), Xt = ({
|
|
399
399
|
className: e,
|
|
400
|
-
viewBox:
|
|
401
|
-
spacing:
|
|
400
|
+
viewBox: a,
|
|
401
|
+
spacing: o,
|
|
402
402
|
title: n,
|
|
403
403
|
monotone: s,
|
|
404
404
|
...r
|
|
405
405
|
}) => /* @__PURE__ */ d(
|
|
406
|
-
|
|
406
|
+
I,
|
|
407
407
|
{
|
|
408
408
|
defaultViewBox: "0 0 448 512",
|
|
409
409
|
defaultClassName: "size-5",
|
|
410
|
-
viewBox:
|
|
410
|
+
viewBox: a,
|
|
411
411
|
className: e,
|
|
412
|
-
spacing:
|
|
412
|
+
spacing: o,
|
|
413
413
|
title: n || "Delete",
|
|
414
414
|
...r,
|
|
415
415
|
children: [
|
|
@@ -425,19 +425,19 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
425
425
|
}
|
|
426
426
|
), qt = ({
|
|
427
427
|
className: e,
|
|
428
|
-
viewBox:
|
|
429
|
-
spacing:
|
|
428
|
+
viewBox: a,
|
|
429
|
+
spacing: o,
|
|
430
430
|
title: n,
|
|
431
431
|
monotone: s,
|
|
432
432
|
...r
|
|
433
433
|
}) => /* @__PURE__ */ d(
|
|
434
|
-
|
|
434
|
+
I,
|
|
435
435
|
{
|
|
436
436
|
defaultViewBox: "0 0 512 512",
|
|
437
437
|
defaultClassName: "size-5",
|
|
438
|
-
viewBox:
|
|
438
|
+
viewBox: a,
|
|
439
439
|
className: e,
|
|
440
|
-
spacing:
|
|
440
|
+
spacing: o,
|
|
441
441
|
title: n || "Edit",
|
|
442
442
|
...r,
|
|
443
443
|
children: [
|
|
@@ -453,19 +453,19 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
453
453
|
}
|
|
454
454
|
), Jt = ({
|
|
455
455
|
className: e,
|
|
456
|
-
viewBox:
|
|
457
|
-
spacing:
|
|
456
|
+
viewBox: a,
|
|
457
|
+
spacing: o,
|
|
458
458
|
title: n,
|
|
459
459
|
monotone: s,
|
|
460
460
|
...r
|
|
461
461
|
}) => /* @__PURE__ */ d(
|
|
462
|
-
|
|
462
|
+
I,
|
|
463
463
|
{
|
|
464
464
|
defaultViewBox: "0 0 512 512",
|
|
465
465
|
defaultClassName: "size-5",
|
|
466
|
-
viewBox:
|
|
466
|
+
viewBox: a,
|
|
467
467
|
className: e,
|
|
468
|
-
spacing:
|
|
468
|
+
spacing: o,
|
|
469
469
|
title: n || "History",
|
|
470
470
|
...r,
|
|
471
471
|
children: [
|
|
@@ -481,19 +481,19 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
481
481
|
}
|
|
482
482
|
), Qt = ({
|
|
483
483
|
className: e,
|
|
484
|
-
viewBox:
|
|
485
|
-
spacing:
|
|
484
|
+
viewBox: a,
|
|
485
|
+
spacing: o,
|
|
486
486
|
title: n,
|
|
487
487
|
monotone: s,
|
|
488
488
|
...r
|
|
489
489
|
}) => /* @__PURE__ */ d(
|
|
490
|
-
|
|
490
|
+
I,
|
|
491
491
|
{
|
|
492
492
|
defaultViewBox: "0 0 512 512",
|
|
493
493
|
defaultClassName: "size-5",
|
|
494
|
-
viewBox:
|
|
494
|
+
viewBox: a,
|
|
495
495
|
className: e,
|
|
496
|
-
spacing:
|
|
496
|
+
spacing: o,
|
|
497
497
|
title: n || "Info",
|
|
498
498
|
...r,
|
|
499
499
|
children: [
|
|
@@ -509,19 +509,19 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
509
509
|
}
|
|
510
510
|
), Zt = ({
|
|
511
511
|
className: e,
|
|
512
|
-
viewBox:
|
|
513
|
-
spacing:
|
|
512
|
+
viewBox: a,
|
|
513
|
+
spacing: o,
|
|
514
514
|
title: n,
|
|
515
515
|
monotone: s,
|
|
516
516
|
...r
|
|
517
517
|
}) => /* @__PURE__ */ d(
|
|
518
|
-
|
|
518
|
+
I,
|
|
519
519
|
{
|
|
520
520
|
defaultViewBox: "0 0 576 512",
|
|
521
521
|
defaultClassName: "size-5",
|
|
522
|
-
viewBox:
|
|
522
|
+
viewBox: a,
|
|
523
523
|
className: e,
|
|
524
|
-
spacing:
|
|
524
|
+
spacing: o,
|
|
525
525
|
title: n || "Profile",
|
|
526
526
|
...r,
|
|
527
527
|
children: [
|
|
@@ -535,21 +535,21 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
535
535
|
/* @__PURE__ */ t("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16H272c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80H144z" })
|
|
536
536
|
]
|
|
537
537
|
}
|
|
538
|
-
),
|
|
538
|
+
), ea = ({
|
|
539
539
|
className: e,
|
|
540
|
-
viewBox:
|
|
541
|
-
spacing:
|
|
540
|
+
viewBox: a,
|
|
541
|
+
spacing: o,
|
|
542
542
|
title: n,
|
|
543
543
|
monotone: s,
|
|
544
544
|
...r
|
|
545
545
|
}) => /* @__PURE__ */ d(
|
|
546
|
-
|
|
546
|
+
I,
|
|
547
547
|
{
|
|
548
548
|
defaultViewBox: "0 0 512 512",
|
|
549
549
|
defaultClassName: "size-5",
|
|
550
|
-
viewBox:
|
|
550
|
+
viewBox: a,
|
|
551
551
|
className: e,
|
|
552
|
-
spacing:
|
|
552
|
+
spacing: o,
|
|
553
553
|
title: n || "Restore",
|
|
554
554
|
...r,
|
|
555
555
|
children: [
|
|
@@ -563,21 +563,21 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
563
563
|
/* @__PURE__ */ t("path", { d: "M64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64H64zm32 64H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32z" })
|
|
564
564
|
]
|
|
565
565
|
}
|
|
566
|
-
),
|
|
566
|
+
), ta = ({
|
|
567
567
|
className: e,
|
|
568
|
-
viewBox:
|
|
569
|
-
spacing:
|
|
568
|
+
viewBox: a,
|
|
569
|
+
spacing: o,
|
|
570
570
|
title: n,
|
|
571
571
|
monotone: s,
|
|
572
572
|
...r
|
|
573
573
|
}) => /* @__PURE__ */ t(
|
|
574
|
-
|
|
574
|
+
I,
|
|
575
575
|
{
|
|
576
576
|
defaultViewBox: "0 0 448 512",
|
|
577
577
|
defaultClassName: "size-5",
|
|
578
|
-
viewBox:
|
|
578
|
+
viewBox: a,
|
|
579
579
|
className: e,
|
|
580
|
-
spacing:
|
|
580
|
+
spacing: o,
|
|
581
581
|
title: n || "Settings",
|
|
582
582
|
...r,
|
|
583
583
|
children: /* @__PURE__ */ t("path", { d: "M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" })
|
|
@@ -586,8 +586,8 @@ const Mt = ({ className: e, ...o }) => {
|
|
|
586
586
|
function K(e) {
|
|
587
587
|
return st();
|
|
588
588
|
}
|
|
589
|
-
const
|
|
590
|
-
const
|
|
589
|
+
const aa = ({ stats: e }) => {
|
|
590
|
+
const a = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "", n = (e == null ? void 0 : e.models) || [], s = K(), r = K();
|
|
591
591
|
return /* @__PURE__ */ d(w, { children: [
|
|
592
592
|
/* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t(
|
|
593
593
|
R,
|
|
@@ -595,8 +595,8 @@ const oo = ({ stats: e }) => {
|
|
|
595
595
|
header: f.ABOUT.TITLE_CLIENT,
|
|
596
596
|
className: "prose-dark dark:prose-lighter",
|
|
597
597
|
children: j(s, {
|
|
598
|
-
[f.ABOUT.VERSION]: "4.3.
|
|
599
|
-
[f.ABOUT.BUILD_TIMESTAMP]: "09/
|
|
598
|
+
[f.ABOUT.VERSION]: "4.3.5",
|
|
599
|
+
[f.ABOUT.BUILD_TIMESTAMP]: "09/10/2024 09:59 AM EDT"
|
|
600
600
|
})
|
|
601
601
|
}
|
|
602
602
|
) }),
|
|
@@ -606,48 +606,48 @@ const oo = ({ stats: e }) => {
|
|
|
606
606
|
header: f.ABOUT.TITLE_SERVER,
|
|
607
607
|
className: "prose-dark dark:prose-lighter",
|
|
608
608
|
children: j(r, {
|
|
609
|
-
[f.ABOUT.VERSION]:
|
|
609
|
+
[f.ABOUT.VERSION]: o,
|
|
610
610
|
[Q(f.ABOUT.ENGINE, n.length)]: /* @__PURE__ */ t(w, { children: n.map((l) => /* @__PURE__ */ t("div", { className: "text-right", children: l }, l)) }),
|
|
611
|
-
[Q(f.ABOUT.PLUGIN,
|
|
611
|
+
[Q(f.ABOUT.PLUGIN, a.length)]: /* @__PURE__ */ t(w, { children: a.map((l) => /* @__PURE__ */ t("div", { className: "text-right", children: l }, l)) })
|
|
612
612
|
})
|
|
613
613
|
}
|
|
614
614
|
)
|
|
615
615
|
] });
|
|
616
|
-
},
|
|
616
|
+
}, oa = ({
|
|
617
617
|
open: e,
|
|
618
|
-
onOpenChange:
|
|
618
|
+
onOpenChange: a
|
|
619
619
|
}) => {
|
|
620
|
-
const { serverStats:
|
|
621
|
-
return /* @__PURE__ */ t(F, { open: e, onOpenChange:
|
|
622
|
-
},
|
|
620
|
+
const { serverStats: o } = _(Z);
|
|
621
|
+
return /* @__PURE__ */ t(F, { open: e, onOpenChange: a, title: ze, children: /* @__PURE__ */ t(aa, { stats: o }) });
|
|
622
|
+
}, na = (e) => Ce(e), sa = (e) => {
|
|
623
623
|
if (!e || e.length === 0)
|
|
624
624
|
return Ve;
|
|
625
|
-
const
|
|
626
|
-
(
|
|
625
|
+
const a = e.filter(
|
|
626
|
+
(o) => {
|
|
627
627
|
var n, s;
|
|
628
|
-
return ((n =
|
|
628
|
+
return ((n = o == null ? void 0 : o.message) == null ? void 0 : n.role) === Fe && typeof ((s = o == null ? void 0 : o.message) == null ? void 0 : s.processingTime) == "number";
|
|
629
629
|
}
|
|
630
|
-
).map((
|
|
630
|
+
).map((o) => o.message.processingTime);
|
|
631
631
|
return $e({
|
|
632
|
-
data:
|
|
633
|
-
formatter:
|
|
632
|
+
data: a,
|
|
633
|
+
formatter: na
|
|
634
634
|
});
|
|
635
|
-
},
|
|
635
|
+
}, ra = ({
|
|
636
636
|
isAuthenticated: e,
|
|
637
|
-
stats:
|
|
637
|
+
stats: a
|
|
638
638
|
}) => {
|
|
639
|
-
const { state:
|
|
639
|
+
const { state: o } = _(Z), n = Ge - Number(o == null ? void 0 : o.usage), s = K(), r = K();
|
|
640
640
|
return e ? /* @__PURE__ */ d(w, { children: [
|
|
641
|
-
|
|
641
|
+
o && o.messages.length > 0 && /* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t(
|
|
642
642
|
R,
|
|
643
643
|
{
|
|
644
644
|
header: f.CURRENT_STATISTICS.TITLE,
|
|
645
645
|
className: "prose-dark dark:prose-lighter",
|
|
646
646
|
children: j(s, {
|
|
647
|
-
[f.CURRENT_STATISTICS.MODEL_NAME]: (
|
|
648
|
-
[f.CURRENT_STATISTICS.TOKENS_USED]:
|
|
647
|
+
[f.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) || Be,
|
|
648
|
+
[f.CURRENT_STATISTICS.TOKENS_USED]: o == null ? void 0 : o.usage,
|
|
649
649
|
[f.CURRENT_STATISTICS.REMAINING_TOKENS]: Pe.format(n),
|
|
650
|
-
[f.CURRENT_STATISTICS.PROCESSING_TIME]:
|
|
650
|
+
[f.CURRENT_STATISTICS.PROCESSING_TIME]: sa(o == null ? void 0 : o.messages)
|
|
651
651
|
})
|
|
652
652
|
}
|
|
653
653
|
) }),
|
|
@@ -657,19 +657,19 @@ const oo = ({ stats: e }) => {
|
|
|
657
657
|
header: f.MAIN_STATISTICS.TITLE,
|
|
658
658
|
className: "prose-dark dark:prose-lighter",
|
|
659
659
|
children: j(r, {
|
|
660
|
-
[Q(f.MAIN_STATISTICS.TOTAL,
|
|
660
|
+
[Q(f.MAIN_STATISTICS.TOTAL, a.totalChats)]: a.totalChats,
|
|
661
661
|
[f.MAIN_STATISTICS.PROCESSING_TIME]: Ce(
|
|
662
|
-
|
|
662
|
+
a.averageProcessingTimes
|
|
663
663
|
)
|
|
664
664
|
})
|
|
665
665
|
}
|
|
666
666
|
)
|
|
667
667
|
] }) : null;
|
|
668
|
-
},
|
|
668
|
+
}, ca = ({
|
|
669
669
|
open: e,
|
|
670
|
-
onOpenChange:
|
|
670
|
+
onOpenChange: a
|
|
671
671
|
}) => {
|
|
672
|
-
const [
|
|
672
|
+
const [o, n] = T({
|
|
673
673
|
averageProcessingTimes: 0,
|
|
674
674
|
totalChats: 0
|
|
675
675
|
}), { isAuthenticated: s, getAccessToken: r, user: l } = V();
|
|
@@ -687,11 +687,11 @@ const oo = ({ stats: e }) => {
|
|
|
687
687
|
} catch {
|
|
688
688
|
}
|
|
689
689
|
})();
|
|
690
|
-
}, [e, r, l]), /* @__PURE__ */ t(F, { open: e, onOpenChange:
|
|
691
|
-
},
|
|
690
|
+
}, [e, r, l]), /* @__PURE__ */ t(F, { open: e, onOpenChange: a, title: Te, children: /* @__PURE__ */ t(ra, { isAuthenticated: s, stats: o }) });
|
|
691
|
+
}, xe = ({
|
|
692
692
|
showConfirmation: e,
|
|
693
|
-
setShowConfirmation:
|
|
694
|
-
action:
|
|
693
|
+
setShowConfirmation: a,
|
|
694
|
+
action: o,
|
|
695
695
|
children: n,
|
|
696
696
|
customStrings: s
|
|
697
697
|
}) => /* @__PURE__ */ t(
|
|
@@ -699,7 +699,7 @@ const oo = ({ stats: e }) => {
|
|
|
699
699
|
{
|
|
700
700
|
kind: "messagebox",
|
|
701
701
|
open: e,
|
|
702
|
-
onOpenChange:
|
|
702
|
+
onOpenChange: a,
|
|
703
703
|
title: s.title,
|
|
704
704
|
footer: /* @__PURE__ */ d(re, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
705
705
|
/* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(
|
|
@@ -709,7 +709,7 @@ const oo = ({ stats: e }) => {
|
|
|
709
709
|
variant: "secondary",
|
|
710
710
|
focusMode: "light",
|
|
711
711
|
onClick: () => {
|
|
712
|
-
|
|
712
|
+
a(!1);
|
|
713
713
|
},
|
|
714
714
|
children: s.cancelAction
|
|
715
715
|
}
|
|
@@ -721,7 +721,7 @@ const oo = ({ stats: e }) => {
|
|
|
721
721
|
variant: "danger",
|
|
722
722
|
focusMode: "light",
|
|
723
723
|
onClick: () => {
|
|
724
|
-
|
|
724
|
+
a(!1), o();
|
|
725
725
|
},
|
|
726
726
|
children: s.confirmAction
|
|
727
727
|
}
|
|
@@ -730,10 +730,10 @@ const oo = ({ stats: e }) => {
|
|
|
730
730
|
children: n
|
|
731
731
|
}
|
|
732
732
|
);
|
|
733
|
-
var
|
|
734
|
-
return
|
|
735
|
-
},
|
|
736
|
-
var
|
|
733
|
+
var ia = typeof window < "u", la = function(e, a) {
|
|
734
|
+
return ia ? window.matchMedia(e).matches : (process.env.NODE_ENV !== "production" && console.warn("`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches."), !1);
|
|
735
|
+
}, da = function(e, a) {
|
|
736
|
+
var o = T(la(e)), n = o[0], s = o[1];
|
|
737
737
|
return D(function() {
|
|
738
738
|
var r = !0, l = window.matchMedia(e), m = function() {
|
|
739
739
|
r && s(!!l.matches);
|
|
@@ -743,7 +743,7 @@ var io = typeof window < "u", lo = function(e, o) {
|
|
|
743
743
|
};
|
|
744
744
|
}, [e]), n;
|
|
745
745
|
};
|
|
746
|
-
const
|
|
746
|
+
const ua = async (e, a, o, n) => {
|
|
747
747
|
try {
|
|
748
748
|
const s = await H({
|
|
749
749
|
accessToken: n,
|
|
@@ -752,9 +752,9 @@ const mo = async (e, o, a, n) => {
|
|
|
752
752
|
id: e.id
|
|
753
753
|
}
|
|
754
754
|
});
|
|
755
|
-
s.status === 200 && (
|
|
755
|
+
s.status === 200 && (a({
|
|
756
756
|
type: je
|
|
757
|
-
}),
|
|
757
|
+
}), a({
|
|
758
758
|
type: Ye,
|
|
759
759
|
payload: {
|
|
760
760
|
id: e.id,
|
|
@@ -762,16 +762,16 @@ const mo = async (e, o, a, n) => {
|
|
|
762
762
|
usage: s.data.usage,
|
|
763
763
|
messages: s.data.messages
|
|
764
764
|
}
|
|
765
|
-
}),
|
|
765
|
+
}), o(!1));
|
|
766
766
|
} catch {
|
|
767
767
|
}
|
|
768
768
|
}, fe = (e) => {
|
|
769
|
-
const
|
|
770
|
-
return Ke(
|
|
771
|
-
},
|
|
769
|
+
const a = e[0];
|
|
770
|
+
return Ke(a == null ? void 0 : a.content, 100);
|
|
771
|
+
}, ma = ({
|
|
772
772
|
filteredHistory: e,
|
|
773
|
-
setFilteredHistory:
|
|
774
|
-
dispatch:
|
|
773
|
+
setFilteredHistory: a,
|
|
774
|
+
dispatch: o,
|
|
775
775
|
onOpenChange: n
|
|
776
776
|
}) => {
|
|
777
777
|
var k;
|
|
@@ -779,16 +779,16 @@ const mo = async (e, o, a, n) => {
|
|
|
779
779
|
id: 0,
|
|
780
780
|
timestamp: "",
|
|
781
781
|
message: ""
|
|
782
|
-
}), [m, c] = T(!1), i =
|
|
782
|
+
}), [m, c] = T(!1), i = da("(min-width: 480px)"), { state: u, dispatch: g } = _(Se), [, N] = ie({
|
|
783
783
|
key: ce + Ue,
|
|
784
784
|
initialValue: u.sortDirection
|
|
785
785
|
}), C = e.data.sort(
|
|
786
786
|
(h, S) => {
|
|
787
787
|
switch (u.sortedCell) {
|
|
788
788
|
case "timestamp":
|
|
789
|
-
if (u.sortDirection ===
|
|
789
|
+
if (u.sortDirection === x.ASC)
|
|
790
790
|
return new Date(h[u.sortedCell]).getTime() - new Date(S[u.sortedCell]).getTime();
|
|
791
|
-
if (u.sortDirection ===
|
|
791
|
+
if (u.sortDirection === x.DESC)
|
|
792
792
|
return new Date(S[u.sortedCell]).getTime() - new Date(h[u.sortedCell]).getTime();
|
|
793
793
|
break;
|
|
794
794
|
default:
|
|
@@ -799,29 +799,29 @@ const mo = async (e, o, a, n) => {
|
|
|
799
799
|
), p = (h) => {
|
|
800
800
|
switch (u.sortDirection) {
|
|
801
801
|
case !1:
|
|
802
|
-
N(
|
|
803
|
-
type:
|
|
802
|
+
N(x.ASC), g({
|
|
803
|
+
type: ae,
|
|
804
804
|
payload: {
|
|
805
805
|
sortedCell: h,
|
|
806
|
-
sortDirection:
|
|
806
|
+
sortDirection: x.ASC
|
|
807
807
|
}
|
|
808
808
|
});
|
|
809
809
|
break;
|
|
810
|
-
case
|
|
811
|
-
N(
|
|
812
|
-
type:
|
|
810
|
+
case x.ASC:
|
|
811
|
+
N(x.DESC), g({
|
|
812
|
+
type: ae,
|
|
813
813
|
payload: {
|
|
814
814
|
sortedCell: h,
|
|
815
|
-
sortDirection:
|
|
815
|
+
sortDirection: x.DESC
|
|
816
816
|
}
|
|
817
817
|
});
|
|
818
818
|
break;
|
|
819
819
|
default:
|
|
820
|
-
N(
|
|
821
|
-
type:
|
|
820
|
+
N(x.ASC), g({
|
|
821
|
+
type: ae,
|
|
822
822
|
payload: {
|
|
823
823
|
sortedCell: h,
|
|
824
|
-
sortDirection:
|
|
824
|
+
sortDirection: x.ASC
|
|
825
825
|
}
|
|
826
826
|
});
|
|
827
827
|
break;
|
|
@@ -829,7 +829,7 @@ const mo = async (e, o, a, n) => {
|
|
|
829
829
|
};
|
|
830
830
|
return /* @__PURE__ */ d(w, { children: [
|
|
831
831
|
/* @__PURE__ */ d(
|
|
832
|
-
|
|
832
|
+
xe,
|
|
833
833
|
{
|
|
834
834
|
showConfirmation: m,
|
|
835
835
|
setShowConfirmation: c,
|
|
@@ -844,7 +844,7 @@ const mo = async (e, o, a, n) => {
|
|
|
844
844
|
id: h.id
|
|
845
845
|
}
|
|
846
846
|
});
|
|
847
|
-
S.status === 200 &&
|
|
847
|
+
S.status === 200 && a({ data: S.data });
|
|
848
848
|
} catch {
|
|
849
849
|
}
|
|
850
850
|
},
|
|
@@ -871,7 +871,7 @@ const mo = async (e, o, a, n) => {
|
|
|
871
871
|
}
|
|
872
872
|
),
|
|
873
873
|
/* @__PURE__ */ d(it, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
|
|
874
|
-
/* @__PURE__ */ t(lt, { children: /* @__PURE__ */ d(
|
|
874
|
+
/* @__PURE__ */ t(lt, { children: /* @__PURE__ */ d(oe, { children: [
|
|
875
875
|
i && /* @__PURE__ */ t(M, { className: "sr-only", children: "Row" }),
|
|
876
876
|
/* @__PURE__ */ t(
|
|
877
877
|
dt,
|
|
@@ -891,7 +891,7 @@ const mo = async (e, o, a, n) => {
|
|
|
891
891
|
] }) }),
|
|
892
892
|
/* @__PURE__ */ t(ut, { children: C.map((h, S) => {
|
|
893
893
|
var E;
|
|
894
|
-
return ((E = h == null ? void 0 : h.messages) == null ? void 0 : E.length) > 0 ? /* @__PURE__ */ d(
|
|
894
|
+
return ((E = h == null ? void 0 : h.messages) == null ? void 0 : E.length) > 0 ? /* @__PURE__ */ d(oe, { children: [
|
|
895
895
|
i && /* @__PURE__ */ t(M, { children: S + 1 }),
|
|
896
896
|
/* @__PURE__ */ t(
|
|
897
897
|
M,
|
|
@@ -911,15 +911,15 @@ const mo = async (e, o, a, n) => {
|
|
|
911
911
|
noBorder: !0,
|
|
912
912
|
label: "Restore chat",
|
|
913
913
|
onClick: async () => {
|
|
914
|
-
const
|
|
915
|
-
|
|
914
|
+
const v = await r();
|
|
915
|
+
ua(
|
|
916
916
|
h,
|
|
917
|
-
|
|
917
|
+
o,
|
|
918
918
|
n,
|
|
919
|
-
|
|
919
|
+
v
|
|
920
920
|
);
|
|
921
921
|
},
|
|
922
|
-
children: /* @__PURE__ */ t(
|
|
922
|
+
children: /* @__PURE__ */ t(ea, { className: "h-3 w-3", monotone: !0 })
|
|
923
923
|
}
|
|
924
924
|
),
|
|
925
925
|
/* @__PURE__ */ t(
|
|
@@ -941,28 +941,28 @@ const mo = async (e, o, a, n) => {
|
|
|
941
941
|
] }) })
|
|
942
942
|
] }, `${f.HISTORY.TITLE}-${h.id}-${S}`) : null;
|
|
943
943
|
}) }),
|
|
944
|
-
/* @__PURE__ */ t(mt, { children: /* @__PURE__ */ t(
|
|
944
|
+
/* @__PURE__ */ t(mt, { children: /* @__PURE__ */ t(oe, { children: /* @__PURE__ */ t(M, { colSpan: 4, children: /* @__PURE__ */ t("div", { children: Q(
|
|
945
945
|
`${e.data.length} chat`,
|
|
946
946
|
e.data.length
|
|
947
947
|
) }) }) }) })
|
|
948
948
|
] })
|
|
949
949
|
] });
|
|
950
950
|
};
|
|
951
|
-
function ge(e,
|
|
952
|
-
return
|
|
953
|
-
(
|
|
954
|
-
(n) => n.content !== null && n.content.toLowerCase().includes(
|
|
951
|
+
function ge(e, a) {
|
|
952
|
+
return a ? e.filter(
|
|
953
|
+
(o) => o.messages.some(
|
|
954
|
+
(n) => n.content !== null && n.content.toLowerCase().includes(a.toLowerCase())
|
|
955
955
|
)
|
|
956
956
|
) : e;
|
|
957
957
|
}
|
|
958
|
-
const
|
|
958
|
+
const ha = ({
|
|
959
959
|
onOpenChange: e,
|
|
960
|
-
historyData:
|
|
960
|
+
historyData: a
|
|
961
961
|
}) => {
|
|
962
|
-
const { isAuthenticated:
|
|
962
|
+
const { isAuthenticated: o } = V(), n = Y(null), { dispatch: s } = _(Z), { state: r, dispatch: l } = _(Se), [, m] = ie({
|
|
963
963
|
key: ce + We,
|
|
964
964
|
initialValue: r.searchString
|
|
965
|
-
}), c = rt(() =>
|
|
965
|
+
}), c = rt(() => a, [a]), [i, u] = T({
|
|
966
966
|
data: c
|
|
967
967
|
}), g = (p) => {
|
|
968
968
|
const y = ge(c, p);
|
|
@@ -979,13 +979,13 @@ const po = ({
|
|
|
979
979
|
};
|
|
980
980
|
return D(() => {
|
|
981
981
|
const p = ge(
|
|
982
|
-
|
|
982
|
+
a,
|
|
983
983
|
r.searchString
|
|
984
984
|
);
|
|
985
985
|
u({
|
|
986
986
|
data: p
|
|
987
987
|
});
|
|
988
|
-
}, [
|
|
988
|
+
}, [a, r.searchString]), o ? i && i.data && /* @__PURE__ */ d(w, { children: [
|
|
989
989
|
/* @__PURE__ */ t("form", { autoComplete: "off", onSubmit: C, children: /* @__PURE__ */ t(
|
|
990
990
|
Xe,
|
|
991
991
|
{
|
|
@@ -1015,7 +1015,7 @@ const po = ({
|
|
|
1015
1015
|
}
|
|
1016
1016
|
) }),
|
|
1017
1017
|
/* @__PURE__ */ t("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ t(
|
|
1018
|
-
|
|
1018
|
+
ma,
|
|
1019
1019
|
{
|
|
1020
1020
|
filteredHistory: i,
|
|
1021
1021
|
setFilteredHistory: u,
|
|
@@ -1024,15 +1024,15 @@ const po = ({
|
|
|
1024
1024
|
}
|
|
1025
1025
|
) })
|
|
1026
1026
|
] }) : null;
|
|
1027
|
-
},
|
|
1027
|
+
}, pa = ({
|
|
1028
1028
|
open: e,
|
|
1029
|
-
onOpenChange:
|
|
1030
|
-
historyData:
|
|
1031
|
-
}) => /* @__PURE__ */ t(F, { open: e, onOpenChange:
|
|
1029
|
+
onOpenChange: a,
|
|
1030
|
+
historyData: o
|
|
1031
|
+
}) => /* @__PURE__ */ t(F, { open: e, onOpenChange: a, title: Je, children: /* @__PURE__ */ t(ha, { onOpenChange: a, historyData: o }) }), fa = ({
|
|
1032
1032
|
open: e,
|
|
1033
|
-
onOpenChange:
|
|
1033
|
+
onOpenChange: a
|
|
1034
1034
|
}) => {
|
|
1035
|
-
const { getAccessToken:
|
|
1035
|
+
const { getAccessToken: o, user: n } = V(), [s, r] = T({
|
|
1036
1036
|
loaded: !1,
|
|
1037
1037
|
content: "",
|
|
1038
1038
|
loadingLocation: !1,
|
|
@@ -1041,7 +1041,7 @@ const po = ({
|
|
|
1041
1041
|
c.preventDefault();
|
|
1042
1042
|
try {
|
|
1043
1043
|
await H({
|
|
1044
|
-
accessToken: await
|
|
1044
|
+
accessToken: await o(),
|
|
1045
1045
|
type: L.SET_CUSTOM_INSTRUCTIONS,
|
|
1046
1046
|
params: {
|
|
1047
1047
|
user: n == null ? void 0 : n.username,
|
|
@@ -1059,7 +1059,7 @@ const po = ({
|
|
|
1059
1059
|
}));
|
|
1060
1060
|
try {
|
|
1061
1061
|
const c = Date.now(), i = await Qe(), u = await H({
|
|
1062
|
-
accessToken: await
|
|
1062
|
+
accessToken: await o(),
|
|
1063
1063
|
type: L.GET_LOCATION,
|
|
1064
1064
|
params: {
|
|
1065
1065
|
latitude: i.latitude,
|
|
@@ -1097,7 +1097,7 @@ const po = ({
|
|
|
1097
1097
|
(async () => {
|
|
1098
1098
|
try {
|
|
1099
1099
|
const c = await H({
|
|
1100
|
-
accessToken: await
|
|
1100
|
+
accessToken: await o(),
|
|
1101
1101
|
type: L.GET_CUSTOM_INSTRUCTIONS,
|
|
1102
1102
|
params: {
|
|
1103
1103
|
user: n.username
|
|
@@ -1116,7 +1116,7 @@ const po = ({
|
|
|
1116
1116
|
F,
|
|
1117
1117
|
{
|
|
1118
1118
|
open: e,
|
|
1119
|
-
onOpenChange:
|
|
1119
|
+
onOpenChange: a,
|
|
1120
1120
|
title: "Engine Fine Tuning",
|
|
1121
1121
|
footer: /* @__PURE__ */ d(re, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
1122
1122
|
/* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(
|
|
@@ -1126,7 +1126,7 @@ const po = ({
|
|
|
1126
1126
|
variant: "secondary",
|
|
1127
1127
|
focusMode: "light",
|
|
1128
1128
|
onClick: () => {
|
|
1129
|
-
|
|
1129
|
+
a(!1);
|
|
1130
1130
|
},
|
|
1131
1131
|
children: "Cancel"
|
|
1132
1132
|
}
|
|
@@ -1138,7 +1138,7 @@ const po = ({
|
|
|
1138
1138
|
variant: "danger",
|
|
1139
1139
|
focusMode: "light",
|
|
1140
1140
|
onClick: async (c) => {
|
|
1141
|
-
|
|
1141
|
+
a(!1), await l(c);
|
|
1142
1142
|
},
|
|
1143
1143
|
children: "Save"
|
|
1144
1144
|
}
|
|
@@ -1197,19 +1197,18 @@ const po = ({
|
|
|
1197
1197
|
location: c.target.value
|
|
1198
1198
|
}));
|
|
1199
1199
|
},
|
|
1200
|
-
helperText: "Enter your location or press auto-detect."
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
)
|
|
1200
|
+
helperText: "Enter your location or press auto-detect."
|
|
1201
|
+
}
|
|
1202
|
+
),
|
|
1203
|
+
/* @__PURE__ */ t(
|
|
1204
|
+
z,
|
|
1205
|
+
{
|
|
1206
|
+
spacing: { t: 2 },
|
|
1207
|
+
size: "small",
|
|
1208
|
+
noBorder: !0,
|
|
1209
|
+
disabled: s.loadingLocation,
|
|
1210
|
+
onClick: m,
|
|
1211
|
+
children: s.loadingLocation ? "Detecting..." : "Auto-detect"
|
|
1213
1212
|
}
|
|
1214
1213
|
)
|
|
1215
1214
|
]
|
|
@@ -1218,18 +1217,18 @@ const po = ({
|
|
|
1218
1217
|
]
|
|
1219
1218
|
}
|
|
1220
1219
|
) });
|
|
1221
|
-
},
|
|
1222
|
-
const { isAuthenticated: e, user:
|
|
1220
|
+
}, ga = () => {
|
|
1221
|
+
const { isAuthenticated: e, user: a, registeringForPasskey: o, authenticationType: n } = V(), [s, r] = ie({
|
|
1223
1222
|
key: ce + Ze,
|
|
1224
1223
|
initialValue: !1
|
|
1225
|
-
}), [l, m] = T(!1), c = K(), i = (
|
|
1224
|
+
}), [l, m] = T(!1), c = K(), i = (a == null ? void 0 : a.username) || "", u = (N) => {
|
|
1226
1225
|
r(N);
|
|
1227
1226
|
}, g = () => {
|
|
1228
1227
|
m(!l);
|
|
1229
1228
|
};
|
|
1230
1229
|
return e && i ? /* @__PURE__ */ d(w, { children: [
|
|
1231
1230
|
l && /* @__PURE__ */ t(
|
|
1232
|
-
|
|
1231
|
+
fa,
|
|
1233
1232
|
{
|
|
1234
1233
|
open: l,
|
|
1235
1234
|
onOpenChange: m
|
|
@@ -1243,7 +1242,7 @@ const po = ({
|
|
|
1243
1242
|
children: [
|
|
1244
1243
|
j(c, {
|
|
1245
1244
|
[f.PREFERENCES.NAME]: i,
|
|
1246
|
-
[f.PREFERENCES.EMAIL]: (
|
|
1245
|
+
[f.PREFERENCES.EMAIL]: (a == null ? void 0 : a.email) || "",
|
|
1247
1246
|
[f.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ t(
|
|
1248
1247
|
Yt,
|
|
1249
1248
|
{
|
|
@@ -1285,7 +1284,7 @@ const po = ({
|
|
|
1285
1284
|
{
|
|
1286
1285
|
size: "small",
|
|
1287
1286
|
spacing: { t: 2 },
|
|
1288
|
-
onClick:
|
|
1287
|
+
onClick: o,
|
|
1289
1288
|
labelLeft: f.PREFERENCES.PASSKEY_BUTTON,
|
|
1290
1289
|
children: /* @__PURE__ */ t(ue, { className: "size-5", monotone: !0 })
|
|
1291
1290
|
}
|
|
@@ -1294,19 +1293,19 @@ const po = ({
|
|
|
1294
1293
|
}
|
|
1295
1294
|
)
|
|
1296
1295
|
] }) : null;
|
|
1297
|
-
},
|
|
1296
|
+
}, Ca = ({
|
|
1298
1297
|
open: e,
|
|
1299
|
-
onOpenChange:
|
|
1300
|
-
}) => /* @__PURE__ */ t(F, { open: e, onOpenChange:
|
|
1301
|
-
const { state: e } = _(Z), [
|
|
1298
|
+
onOpenChange: a
|
|
1299
|
+
}) => /* @__PURE__ */ t(F, { open: e, onOpenChange: a, title: tt, children: /* @__PURE__ */ t(ga, {}) }), ba = () => {
|
|
1300
|
+
const { state: e } = _(Z), [a, o] = T(!1), [n, s] = T(!1), [r, l] = T(!1), [m, c] = T(!1), [i, u] = T([]), [g, N] = T(!1), [C, p] = T({
|
|
1302
1301
|
done: !1,
|
|
1303
1302
|
progress: !1,
|
|
1304
1303
|
timestamp: Date.now()
|
|
1305
1304
|
}), { logout: y, getAccessToken: k, user: h } = V(), S = () => {
|
|
1306
|
-
|
|
1305
|
+
o(!a);
|
|
1307
1306
|
}, E = () => {
|
|
1308
1307
|
s(!n);
|
|
1309
|
-
},
|
|
1308
|
+
}, v = () => {
|
|
1310
1309
|
l(!r);
|
|
1311
1310
|
}, ee = () => {
|
|
1312
1311
|
c(!m);
|
|
@@ -1344,7 +1343,7 @@ const po = ({
|
|
|
1344
1343
|
};
|
|
1345
1344
|
return /* @__PURE__ */ d(w, { children: [
|
|
1346
1345
|
/* @__PURE__ */ t(
|
|
1347
|
-
|
|
1346
|
+
xe,
|
|
1348
1347
|
{
|
|
1349
1348
|
showConfirmation: g,
|
|
1350
1349
|
setShowConfirmation: N,
|
|
@@ -1357,23 +1356,23 @@ const po = ({
|
|
|
1357
1356
|
children: /* @__PURE__ */ t("p", { children: "Are you sure you want to log out?" })
|
|
1358
1357
|
}
|
|
1359
1358
|
),
|
|
1360
|
-
/* @__PURE__ */ t(
|
|
1361
|
-
/* @__PURE__ */ t(
|
|
1359
|
+
/* @__PURE__ */ t(Ca, { open: a, onOpenChange: o }),
|
|
1360
|
+
/* @__PURE__ */ t(ca, { open: n, onOpenChange: s }),
|
|
1362
1361
|
/* @__PURE__ */ t(
|
|
1363
|
-
|
|
1362
|
+
pa,
|
|
1364
1363
|
{
|
|
1365
1364
|
open: r,
|
|
1366
1365
|
onOpenChange: l,
|
|
1367
1366
|
historyData: i
|
|
1368
1367
|
}
|
|
1369
1368
|
),
|
|
1370
|
-
/* @__PURE__ */ t(
|
|
1369
|
+
/* @__PURE__ */ t(oa, { open: m, onOpenChange: c }),
|
|
1371
1370
|
/* @__PURE__ */ t("div", { className: "relative", children: /* @__PURE__ */ t("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ d(
|
|
1372
1371
|
ke,
|
|
1373
1372
|
{
|
|
1374
1373
|
mode: "dark",
|
|
1375
1374
|
focusMode: "light",
|
|
1376
|
-
trigger: /* @__PURE__ */ t(B, { children: /* @__PURE__ */ t(
|
|
1375
|
+
trigger: /* @__PURE__ */ t(B, { children: /* @__PURE__ */ t(ta, {}) }),
|
|
1377
1376
|
defaultPlacement: "bottom-end",
|
|
1378
1377
|
onOpenChange: te,
|
|
1379
1378
|
children: [
|
|
@@ -1397,7 +1396,7 @@ const po = ({
|
|
|
1397
1396
|
O,
|
|
1398
1397
|
{
|
|
1399
1398
|
label: "History",
|
|
1400
|
-
onClick:
|
|
1399
|
+
onClick: v,
|
|
1401
1400
|
icon: /* @__PURE__ */ t(Jt, {})
|
|
1402
1401
|
}
|
|
1403
1402
|
),
|
|
@@ -1426,5 +1425,5 @@ const po = ({
|
|
|
1426
1425
|
] });
|
|
1427
1426
|
};
|
|
1428
1427
|
export {
|
|
1429
|
-
|
|
1428
|
+
ba as default
|
|
1430
1429
|
};
|