@versini/sassysaint 1.0.8 → 1.0.9
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.D3duFcJD.js → App.C6D9sIPY.js} +25 -25
- package/dist/chunks/{LazyHeader.B56caFgn.js → LazyHeader.p9mJYmhc.js} +335 -333
- package/dist/chunks/{LazyMarkdownWithExtra.C659-_hy.js → LazyMarkdownWithExtra.CA6Eg_N6.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.BP4_wS5W.js → LazyMessageAssistant.uUafovZf.js} +4 -4
- package/dist/chunks/{index.DruzEDnN.C6Ffe-lT.js → index.BcV6McvW.3HAbnzVE.js} +12 -12
- package/dist/chunks/{index.DcXJ8skl.js → index.t9wD3Z9D.js} +778 -774
- package/dist/chunks/{useLocalStorage.Cx1iecci.js → useLocalStorage.DagJSzA9.js} +9 -9
- 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 c, jsx as t, Fragment as w } from "react/jsx-runtime";
|
|
2
|
-
import { O, i$1 as
|
|
2
|
+
import { O as D, i$1 as le, N as de, p as De, o as _e, g as A, N$1 as _, CARDS as C, renderDataAsList as F, pluralize as Q, ABOUT_TITLE as ze, MODEL_GPT4 as Be, numberFormatter as Ve, durationFormatter as Ce, NA as Pe, ROLE_ASSISTANT as Fe, extractAverage as $e, GPT4_MAX_TOKENS as Ge, Nr as U, STATS as Ne, b as q, j as M, x as Z, LOCAL_STORAGE_PREFIX as ee, LOCAL_STORAGE_SORT as Ue, ACTION_RESET as je, ACTION_RESTORE as Ke, truncate as Ye, ACTION_SORT as re, LOCAL_STORAGE_SEARCH as We, G as Xe, ACTION_SEARCH as Je, HISTORY_TITLE as qe, LOCAL_STORAGE_CHAT_DETAILS as Qe, LOCAL_STORAGE_LOCATION as Ze, j$1 as et, f$2 as tt, ACTION_LOCATION as me, getCurrentGeoLocation as st, convertLatitudeToDMS as at, convertLongitudeToDMS as nt, PROFILE_TITLE as rt, LOG_OUT as ue } from "./index.t9wD3Z9D.js";
|
|
3
3
|
import * as ce from "react";
|
|
4
|
-
import ot, { forwardRef as
|
|
5
|
-
import { g as dt, AppContext as
|
|
6
|
-
import
|
|
7
|
-
import { useFloatingTree as
|
|
4
|
+
import ot, { forwardRef as Te, useState as T, useRef as $, useContext as R, useEffect as L, Suspense as ct, lazy as it, useId as lt } from "react";
|
|
5
|
+
import { g as dt, AppContext as j, serviceCall as se, SERVICE_TYPES as ae, HistoryContext as ye, E as te, k as v, et as mt, at as ut, lt as oe, J as H, ct as ht, st as pt, rt as ft } from "./useLocalStorage.DagJSzA9.js";
|
|
6
|
+
import k from "clsx";
|
|
7
|
+
import { useFloatingTree as be, useFloatingNodeId as gt, useListItem as Se, useFloating as Ct, offset as Nt, flip as Tt, shift as yt, autoUpdate as bt, useClick as St, useRole as wt, useDismiss as kt, useListNavigation as Et, useTypeahead as xt, useInteractions as vt, useMergeRefs as we, FloatingNode as At, FloatingList as It, FloatingPortal as Ht, FloatingFocusManager as Mt, FloatingTree as Rt } from "@floating-ui/react";
|
|
8
8
|
const ie = ce.createContext({
|
|
9
9
|
getItemProps: () => ({}),
|
|
10
10
|
activeIndex: null,
|
|
@@ -14,7 +14,7 @@ const ie = ce.createContext({
|
|
|
14
14
|
setHasFocusInside: () => {
|
|
15
15
|
},
|
|
16
16
|
isOpen: !1
|
|
17
|
-
}),
|
|
17
|
+
}), he = (e) => {
|
|
18
18
|
if (typeof e == "string")
|
|
19
19
|
return e;
|
|
20
20
|
if (typeof e == "function")
|
|
@@ -25,54 +25,54 @@ const ie = ce.createContext({
|
|
|
25
25
|
return s.displayName || s.name || "Component";
|
|
26
26
|
}
|
|
27
27
|
return "Element";
|
|
28
|
-
},
|
|
28
|
+
}, ke = Te(
|
|
29
29
|
({
|
|
30
30
|
trigger: e,
|
|
31
31
|
children: s,
|
|
32
32
|
label: a = "Open menu",
|
|
33
|
-
defaultPlacement:
|
|
34
|
-
onOpenChange:
|
|
33
|
+
defaultPlacement: n = "bottom-start",
|
|
34
|
+
onOpenChange: r,
|
|
35
35
|
spacing: o,
|
|
36
36
|
mode: l = "system",
|
|
37
37
|
focusMode: d = "system",
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
const [N,
|
|
38
|
+
...h
|
|
39
|
+
}, m) => {
|
|
40
|
+
const [N, u] = T(!1), [y, b] = T(!1), [S, f] = T(null), E = $([]), i = $([]), p = R(ie), g = be(), x = gt(), z = Se(), { floatingStyles: ne, refs: W, context: I } = Ct({
|
|
41
41
|
nodeId: x,
|
|
42
42
|
open: N,
|
|
43
43
|
onOpenChange: (V) => {
|
|
44
|
-
|
|
44
|
+
u(V), r == null || r(V);
|
|
45
45
|
},
|
|
46
|
-
placement:
|
|
46
|
+
placement: n,
|
|
47
47
|
strategy: "fixed",
|
|
48
48
|
middleware: [Nt({ mainAxis: 10 }), Tt(), yt()],
|
|
49
49
|
whileElementsMounted: bt
|
|
50
|
-
}),
|
|
50
|
+
}), X = St(I, {
|
|
51
51
|
event: "mousedown",
|
|
52
52
|
toggle: !0,
|
|
53
53
|
ignoreMouse: !1
|
|
54
|
-
}), B = wt(I, { role: "menu" }),
|
|
55
|
-
listRef:
|
|
54
|
+
}), B = wt(I, { role: "menu" }), ve = kt(I, { bubbles: !0 }), Ae = Et(I, {
|
|
55
|
+
listRef: E,
|
|
56
56
|
activeIndex: S,
|
|
57
57
|
nested: !1,
|
|
58
|
-
onNavigate:
|
|
58
|
+
onNavigate: f,
|
|
59
59
|
loop: !0
|
|
60
|
-
}),
|
|
60
|
+
}), Ie = xt(I, {
|
|
61
61
|
listRef: i,
|
|
62
|
-
onMatch: N ?
|
|
62
|
+
onMatch: N ? f : void 0,
|
|
63
63
|
activeIndex: S
|
|
64
|
-
}), { getReferenceProps:
|
|
64
|
+
}), { getReferenceProps: He, getFloatingProps: Me, getItemProps: Re } = vt([X, B, ve, Ae, Ie]), Le = he(e) === "Button" || he(e) === "ButtonIcon", Oe = ot.cloneElement(e, {
|
|
65
65
|
mode: l,
|
|
66
66
|
focusMode: d,
|
|
67
67
|
spacing: o,
|
|
68
|
-
noInternalClick:
|
|
68
|
+
noInternalClick: Le,
|
|
69
69
|
"aria-label": a,
|
|
70
70
|
"data-open": N ? "" : void 0,
|
|
71
71
|
"data-focus-inside": y ? "" : void 0,
|
|
72
|
-
ref:
|
|
73
|
-
...
|
|
74
|
-
|
|
75
|
-
...
|
|
72
|
+
ref: we([W.setReference, z.ref, m]),
|
|
73
|
+
...He(
|
|
74
|
+
p.getItemProps({
|
|
75
|
+
...h
|
|
76
76
|
})
|
|
77
77
|
)
|
|
78
78
|
});
|
|
@@ -80,26 +80,26 @@ const ie = ce.createContext({
|
|
|
80
80
|
if (!g)
|
|
81
81
|
return;
|
|
82
82
|
function V() {
|
|
83
|
-
|
|
83
|
+
u(!1), r == null || r(!1);
|
|
84
84
|
}
|
|
85
85
|
return g.events.on("click", V), () => {
|
|
86
86
|
g.events.off("click", V);
|
|
87
87
|
};
|
|
88
|
-
}, [g,
|
|
88
|
+
}, [g, r]), L(() => {
|
|
89
89
|
N && g && g.events.emit("menuopen", { nodeId: x });
|
|
90
90
|
}, [g, N, x]), /* @__PURE__ */ c(At, { id: x, children: [
|
|
91
|
-
|
|
91
|
+
Oe,
|
|
92
92
|
/* @__PURE__ */ t(
|
|
93
93
|
ie.Provider,
|
|
94
94
|
{
|
|
95
95
|
value: {
|
|
96
96
|
activeIndex: S,
|
|
97
|
-
setActiveIndex:
|
|
98
|
-
getItemProps:
|
|
97
|
+
setActiveIndex: f,
|
|
98
|
+
getItemProps: Re,
|
|
99
99
|
setHasFocusInside: b,
|
|
100
100
|
isOpen: N
|
|
101
101
|
},
|
|
102
|
-
children: /* @__PURE__ */ t(It, { elementsRef:
|
|
102
|
+
children: /* @__PURE__ */ t(It, { elementsRef: E, labelsRef: i, children: N && /* @__PURE__ */ t(Ht, { children: /* @__PURE__ */ t(
|
|
103
103
|
Mt,
|
|
104
104
|
{
|
|
105
105
|
context: I,
|
|
@@ -109,10 +109,10 @@ const ie = ce.createContext({
|
|
|
109
109
|
children: /* @__PURE__ */ t(
|
|
110
110
|
"div",
|
|
111
111
|
{
|
|
112
|
-
ref:
|
|
112
|
+
ref: W.setFloating,
|
|
113
113
|
className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
|
|
114
|
-
style:
|
|
115
|
-
...
|
|
114
|
+
style: ne,
|
|
115
|
+
...Me(),
|
|
116
116
|
children: s
|
|
117
117
|
}
|
|
118
118
|
)
|
|
@@ -122,28 +122,28 @@ const ie = ce.createContext({
|
|
|
122
122
|
)
|
|
123
123
|
] });
|
|
124
124
|
}
|
|
125
|
-
),
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
const o = ce.useContext(ie), l =
|
|
125
|
+
), Ee = Te((e, s) => /* @__PURE__ */ t(Rt, { children: /* @__PURE__ */ t(ke, { ...e, ref: s }) }));
|
|
126
|
+
Ee.displayName = "Menu";
|
|
127
|
+
ke.displayName = "MenuComponent";
|
|
128
|
+
const O = ce.forwardRef(({ label: e, disabled: s, icon: a, ...n }, r) => {
|
|
129
|
+
const o = ce.useContext(ie), l = Se({ label: s ? null : e }), d = be();
|
|
130
130
|
return /* @__PURE__ */ c(
|
|
131
131
|
"button",
|
|
132
132
|
{
|
|
133
|
-
...
|
|
134
|
-
ref:
|
|
133
|
+
...n,
|
|
134
|
+
ref: we([l.ref, r]),
|
|
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
138
|
disabled: s,
|
|
139
139
|
...o.getItemProps({
|
|
140
|
-
onClick(
|
|
141
|
-
var
|
|
142
|
-
(
|
|
140
|
+
onClick(h) {
|
|
141
|
+
var m;
|
|
142
|
+
(m = n.onClick) == null || m.call(n, h), d == null || d.events.emit("click");
|
|
143
143
|
},
|
|
144
|
-
onFocus(
|
|
145
|
-
var
|
|
146
|
-
(
|
|
144
|
+
onFocus(h) {
|
|
145
|
+
var m;
|
|
146
|
+
(m = n.onFocus) == null || m.call(n, h), o.setHasFocusInside(!0);
|
|
147
147
|
}
|
|
148
148
|
}),
|
|
149
149
|
children: [
|
|
@@ -153,16 +153,16 @@ const D = ce.forwardRef(({ label: e, disabled: s, icon: a, ...r }, n) => {
|
|
|
153
153
|
}
|
|
154
154
|
);
|
|
155
155
|
});
|
|
156
|
-
|
|
156
|
+
O.displayName = "MenuItem";
|
|
157
157
|
const Lt = ({ className: e, ...s }) => {
|
|
158
|
-
const a =
|
|
158
|
+
const a = k(e, "my-1 border-t border-border-medium");
|
|
159
159
|
return /* @__PURE__ */ t("div", { className: a, ...s });
|
|
160
|
-
},
|
|
160
|
+
}, Ot = ({
|
|
161
161
|
className: e,
|
|
162
162
|
viewBox: s,
|
|
163
163
|
spacing: a,
|
|
164
|
-
title:
|
|
165
|
-
monotone:
|
|
164
|
+
title: n,
|
|
165
|
+
monotone: r,
|
|
166
166
|
...o
|
|
167
167
|
}) => /* @__PURE__ */ t(
|
|
168
168
|
dt,
|
|
@@ -172,71 +172,73 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
172
172
|
viewBox: s,
|
|
173
173
|
className: e,
|
|
174
174
|
spacing: a,
|
|
175
|
-
title:
|
|
175
|
+
title: n || "Close",
|
|
176
176
|
...o,
|
|
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
|
-
),
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
), P = "panel", J = "messagebox", Dt = ({
|
|
180
|
+
className: e,
|
|
181
|
+
kind: s,
|
|
182
|
+
borderMode: a
|
|
182
183
|
}) => ({
|
|
183
|
-
main:
|
|
184
|
-
|
|
185
|
-
{
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
),
|
|
184
|
+
main: k("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`]: s === P,
|
|
186
|
+
[`${le} w-full sm:w-[95%] md:max-w-2xl`]: s === P && !e,
|
|
187
|
+
[`${de} rounded-lg border-2`]: s === J,
|
|
188
|
+
[`${de} w-[95%] sm:w-[50%] md:max-w-2xl`]: s === J && !e,
|
|
189
|
+
[`${e}`]: !!e,
|
|
190
|
+
"sm:border-border-dark": a === "dark" && s === P,
|
|
191
|
+
"sm:border-border-accent": a === "light" && s === P,
|
|
192
|
+
"border-border-dark": a === "dark" && s === J,
|
|
193
|
+
"border-border-accent": a === "light" && s === J
|
|
194
|
+
}),
|
|
194
195
|
content: "flex flex-grow flex-col py-2 sm:py-4 px-4",
|
|
195
196
|
footer: "flex flex-grow flex-col p-4",
|
|
196
197
|
header: "p-4 mb-0",
|
|
197
198
|
close: "p-4"
|
|
198
|
-
}),
|
|
199
|
-
() => import("./index.
|
|
199
|
+
}), K = (e) => it(
|
|
200
|
+
() => import("./index.BcV6McvW.3HAbnzVE.js").then((s) => ({
|
|
200
201
|
default: s[e]
|
|
201
202
|
}))
|
|
202
|
-
), _t =
|
|
203
|
+
), _t = K("Modal"), zt = K("ModalClose"), Bt = K("ModalContent"), Vt = K("ModalDescription"), Pt = K("ModalHeading"), Y = ({
|
|
203
204
|
open: e,
|
|
204
205
|
onOpenChange: s,
|
|
205
206
|
title: a,
|
|
206
|
-
children:
|
|
207
|
-
footer:
|
|
207
|
+
children: n,
|
|
208
|
+
footer: r,
|
|
208
209
|
borderMode: o = "light",
|
|
209
|
-
kind: l =
|
|
210
|
+
kind: l = P,
|
|
211
|
+
className: d
|
|
210
212
|
}) => {
|
|
211
|
-
const
|
|
212
|
-
return L(() => (e && (
|
|
213
|
-
e && (document.title =
|
|
214
|
-
}), [a, e]), /* @__PURE__ */ t(ct, { fallback: /* @__PURE__ */ t("div", {}), children: e && /* @__PURE__ */ t(_t, { open: e, onOpenChange: s, children: /* @__PURE__ */ c(Bt, { className:
|
|
213
|
+
const h = $(""), m = Dt({ className: d, kind: l, borderMode: o });
|
|
214
|
+
return L(() => (e && (h.current = document.title, document.title = `${a} | ${h.current}`), () => {
|
|
215
|
+
e && (document.title = h.current);
|
|
216
|
+
}), [a, e]), /* @__PURE__ */ t(ct, { fallback: /* @__PURE__ */ t("div", {}), children: e && /* @__PURE__ */ t(_t, { open: e, onOpenChange: s, children: /* @__PURE__ */ c(Bt, { className: m.main, children: [
|
|
215
217
|
/* @__PURE__ */ c("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
216
218
|
/* @__PURE__ */ t(
|
|
217
219
|
zt,
|
|
218
220
|
{
|
|
219
|
-
className:
|
|
221
|
+
className: m.close,
|
|
220
222
|
trigger: /* @__PURE__ */ t(
|
|
221
|
-
|
|
223
|
+
D,
|
|
222
224
|
{
|
|
223
225
|
mode: "dark",
|
|
224
226
|
focusMode: "light",
|
|
225
227
|
noBorder: !0,
|
|
226
228
|
label: "Close",
|
|
227
|
-
children: /* @__PURE__ */ t(
|
|
229
|
+
children: /* @__PURE__ */ t(Ot, {})
|
|
228
230
|
}
|
|
229
231
|
)
|
|
230
232
|
}
|
|
231
233
|
),
|
|
232
|
-
/* @__PURE__ */ t(Pt, { className:
|
|
234
|
+
/* @__PURE__ */ t(Pt, { className: m.header, children: a })
|
|
233
235
|
] }),
|
|
234
|
-
/* @__PURE__ */ t(Vt, { className:
|
|
235
|
-
|
|
236
|
+
/* @__PURE__ */ t(Vt, { className: m.content, children: n }),
|
|
237
|
+
r && /* @__PURE__ */ t("div", { className: m.footer, children: r })
|
|
236
238
|
] }) }) });
|
|
237
|
-
}, Ft = () =>
|
|
239
|
+
}, Ft = () => k("peer", "h-6", "w-11", "rounded-full"), $t = ({
|
|
238
240
|
focusMode: e
|
|
239
|
-
}) =>
|
|
241
|
+
}) => k(
|
|
240
242
|
"peer-focus:outline",
|
|
241
243
|
"peer-focus:outline-2",
|
|
242
244
|
"peer-focus:outline-offset-2",
|
|
@@ -246,14 +248,14 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
246
248
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
|
247
249
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
|
248
250
|
}
|
|
249
|
-
), Gt = () =>
|
|
251
|
+
), Gt = () => k(
|
|
250
252
|
"peer-checked:after:translate-x-full",
|
|
251
253
|
// background color when checked
|
|
252
254
|
"peer-checked:bg-violet-500",
|
|
253
255
|
// knob circle and border color when checked
|
|
254
256
|
"peer-checked:after:bg-white",
|
|
255
257
|
"peer-checked:after:border-white"
|
|
256
|
-
), Ut = () =>
|
|
258
|
+
), Ut = () => k(
|
|
257
259
|
"after:left-[2px]",
|
|
258
260
|
"after:top-[2px]",
|
|
259
261
|
"after:border",
|
|
@@ -268,7 +270,7 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
268
270
|
), jt = ({
|
|
269
271
|
mode: e,
|
|
270
272
|
noBorder: s
|
|
271
|
-
}) =>
|
|
273
|
+
}) => k({
|
|
272
274
|
border: !s,
|
|
273
275
|
"border-border-dark bg-surface-medium": e === "light",
|
|
274
276
|
"border-border-light bg-surface-darker": e === "dark",
|
|
@@ -277,72 +279,72 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
277
279
|
}), Kt = ({
|
|
278
280
|
mode: e,
|
|
279
281
|
labelHidden: s
|
|
280
|
-
}) => s ? "sr-only" :
|
|
282
|
+
}) => s ? "sr-only" : k("ml-2 text-sm", {
|
|
281
283
|
"text-copy-dark": e === "light",
|
|
282
284
|
"text-copy-lighter": e === "dark",
|
|
283
285
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
|
284
286
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
|
285
|
-
}), Yt = ({ spacing: e }) =>
|
|
286
|
-
|
|
287
|
+
}), Yt = ({ spacing: e }) => k(
|
|
288
|
+
De,
|
|
287
289
|
"relative flex cursor-pointer items-center",
|
|
288
290
|
_e(e)
|
|
289
291
|
), Wt = ({
|
|
290
292
|
mode: e,
|
|
291
293
|
focusMode: s,
|
|
292
294
|
labelHidden: a,
|
|
293
|
-
spacing:
|
|
294
|
-
noBorder:
|
|
295
|
+
spacing: n,
|
|
296
|
+
noBorder: r
|
|
295
297
|
}) => ({
|
|
296
|
-
toggle:
|
|
298
|
+
toggle: k(
|
|
297
299
|
Ft(),
|
|
298
|
-
jt({ mode: e, noBorder:
|
|
300
|
+
jt({ mode: e, noBorder: r }),
|
|
299
301
|
$t({ focusMode: s }),
|
|
300
302
|
Ut(),
|
|
301
303
|
Gt()
|
|
302
304
|
),
|
|
303
305
|
label: Kt({ mode: e, labelHidden: a }),
|
|
304
306
|
input: "peer sr-only",
|
|
305
|
-
wrapper: Yt({ spacing:
|
|
307
|
+
wrapper: Yt({ spacing: n })
|
|
306
308
|
}), Xt = ({
|
|
307
309
|
checked: e = !1,
|
|
308
310
|
onChange: s,
|
|
309
311
|
label: a,
|
|
310
|
-
labelHidden:
|
|
311
|
-
name:
|
|
312
|
+
labelHidden: n = !1,
|
|
313
|
+
name: r,
|
|
312
314
|
mode: o = "system",
|
|
313
315
|
focusMode: l = "system",
|
|
314
316
|
spacing: d,
|
|
315
|
-
noBorder:
|
|
317
|
+
noBorder: h = !1
|
|
316
318
|
}) => {
|
|
317
|
-
const
|
|
319
|
+
const m = Wt({
|
|
318
320
|
mode: o,
|
|
319
321
|
focusMode: l,
|
|
320
|
-
labelHidden:
|
|
322
|
+
labelHidden: n,
|
|
321
323
|
spacing: d,
|
|
322
|
-
noBorder:
|
|
323
|
-
}), N = (
|
|
324
|
-
s == null || s(
|
|
324
|
+
noBorder: h
|
|
325
|
+
}), N = (u) => {
|
|
326
|
+
s == null || s(u.target.checked);
|
|
325
327
|
};
|
|
326
|
-
return /* @__PURE__ */ c("label", { className:
|
|
328
|
+
return /* @__PURE__ */ c("label", { className: m.wrapper, children: [
|
|
327
329
|
/* @__PURE__ */ t(
|
|
328
330
|
"input",
|
|
329
331
|
{
|
|
330
|
-
name:
|
|
332
|
+
name: r,
|
|
331
333
|
checked: e,
|
|
332
334
|
type: "checkbox",
|
|
333
|
-
className:
|
|
335
|
+
className: m.input,
|
|
334
336
|
onChange: N
|
|
335
337
|
}
|
|
336
338
|
),
|
|
337
|
-
/* @__PURE__ */ t("div", { className:
|
|
338
|
-
/* @__PURE__ */ t("span", { className:
|
|
339
|
+
/* @__PURE__ */ t("div", { className: m.toggle }),
|
|
340
|
+
/* @__PURE__ */ t("span", { className: m.label, children: a })
|
|
339
341
|
] });
|
|
340
342
|
}, Jt = ({
|
|
341
343
|
className: e,
|
|
342
344
|
viewBox: s,
|
|
343
345
|
spacing: a,
|
|
344
|
-
title:
|
|
345
|
-
monotone:
|
|
346
|
+
title: n,
|
|
347
|
+
monotone: r,
|
|
346
348
|
...o
|
|
347
349
|
}) => /* @__PURE__ */ c(
|
|
348
350
|
A,
|
|
@@ -352,13 +354,13 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
352
354
|
viewBox: s,
|
|
353
355
|
className: e,
|
|
354
356
|
spacing: a,
|
|
355
|
-
title:
|
|
357
|
+
title: n || "Back",
|
|
356
358
|
...o,
|
|
357
359
|
children: [
|
|
358
360
|
/* @__PURE__ */ t(
|
|
359
361
|
"path",
|
|
360
362
|
{
|
|
361
|
-
opacity:
|
|
363
|
+
opacity: r ? "1" : "0.4",
|
|
362
364
|
d: "M288.4 93.4c2.9-17.4 19.4-29.2 36.9-26.3C431.3 84.9 512 177 512 288c0 123.7-100.3 224-224 224C177 512 84.9 431.3 67.1 325.3c-2.9-17.4 8.8-33.9 26.3-36.9s33.9 8.8 36.9 26.3C142.9 390.4 208.8 448 288 448c88.4 0 160-71.6 160-160c0-79.2-57.6-145.1-133.3-157.8c-17.4-2.9-29.2-19.4-26.3-36.9z"
|
|
363
365
|
}
|
|
364
366
|
),
|
|
@@ -369,8 +371,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
369
371
|
className: e,
|
|
370
372
|
viewBox: s,
|
|
371
373
|
spacing: a,
|
|
372
|
-
title:
|
|
373
|
-
monotone:
|
|
374
|
+
title: n,
|
|
375
|
+
monotone: r,
|
|
374
376
|
...o
|
|
375
377
|
}) => /* @__PURE__ */ c(
|
|
376
378
|
A,
|
|
@@ -380,13 +382,13 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
380
382
|
viewBox: s,
|
|
381
383
|
className: e,
|
|
382
384
|
spacing: a,
|
|
383
|
-
title:
|
|
385
|
+
title: n || "Chart",
|
|
384
386
|
...o,
|
|
385
387
|
children: [
|
|
386
388
|
/* @__PURE__ */ t(
|
|
387
389
|
"path",
|
|
388
390
|
{
|
|
389
|
-
opacity:
|
|
391
|
+
opacity: r ? "1" : "0.4",
|
|
390
392
|
d: "M160 80c0-26.5 21.5-48 48-48h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V80z"
|
|
391
393
|
}
|
|
392
394
|
),
|
|
@@ -397,8 +399,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
397
399
|
className: e,
|
|
398
400
|
viewBox: s,
|
|
399
401
|
spacing: a,
|
|
400
|
-
title:
|
|
401
|
-
monotone:
|
|
402
|
+
title: n,
|
|
403
|
+
monotone: r,
|
|
402
404
|
...o
|
|
403
405
|
}) => /* @__PURE__ */ c(
|
|
404
406
|
A,
|
|
@@ -408,13 +410,13 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
408
410
|
viewBox: s,
|
|
409
411
|
className: e,
|
|
410
412
|
spacing: a,
|
|
411
|
-
title:
|
|
413
|
+
title: n || "Delete",
|
|
412
414
|
...o,
|
|
413
415
|
children: [
|
|
414
416
|
/* @__PURE__ */ t(
|
|
415
417
|
"path",
|
|
416
418
|
{
|
|
417
|
-
opacity:
|
|
419
|
+
opacity: r ? "1" : "0.4",
|
|
418
420
|
d: "M416 96H32V448c0 35.3 28.7 64 64 64H352c35.3 0 64-28.7 64-64V96zM144 176V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16zm96 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16zm96 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16z"
|
|
419
421
|
}
|
|
420
422
|
),
|
|
@@ -425,8 +427,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
425
427
|
className: e,
|
|
426
428
|
viewBox: s,
|
|
427
429
|
spacing: a,
|
|
428
|
-
title:
|
|
429
|
-
monotone:
|
|
430
|
+
title: n,
|
|
431
|
+
monotone: r,
|
|
430
432
|
...o
|
|
431
433
|
}) => /* @__PURE__ */ c(
|
|
432
434
|
A,
|
|
@@ -436,13 +438,13 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
436
438
|
viewBox: s,
|
|
437
439
|
className: e,
|
|
438
440
|
spacing: a,
|
|
439
|
-
title:
|
|
441
|
+
title: n || "History",
|
|
440
442
|
...o,
|
|
441
443
|
children: [
|
|
442
444
|
/* @__PURE__ */ t(
|
|
443
445
|
"path",
|
|
444
446
|
{
|
|
445
|
-
opacity:
|
|
447
|
+
opacity: r ? "1" : "0.4",
|
|
446
448
|
d: "M120.2 120.2C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75L41 41C25.9 25.9 0 36.6 0 57.9V168c0 13.3 10.7 24 24 24H134.1c21.4 0 32.1-25.9 17-41l-30.8-30.8z"
|
|
447
449
|
}
|
|
448
450
|
),
|
|
@@ -453,8 +455,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
453
455
|
className: e,
|
|
454
456
|
viewBox: s,
|
|
455
457
|
spacing: a,
|
|
456
|
-
title:
|
|
457
|
-
monotone:
|
|
458
|
+
title: n,
|
|
459
|
+
monotone: r,
|
|
458
460
|
...o
|
|
459
461
|
}) => /* @__PURE__ */ c(
|
|
460
462
|
A,
|
|
@@ -464,7 +466,7 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
464
466
|
viewBox: s,
|
|
465
467
|
className: e,
|
|
466
468
|
spacing: a,
|
|
467
|
-
title:
|
|
469
|
+
title: n || "Info",
|
|
468
470
|
...o,
|
|
469
471
|
children: [
|
|
470
472
|
/* @__PURE__ */ t(
|
|
@@ -481,8 +483,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
481
483
|
className: e,
|
|
482
484
|
viewBox: s,
|
|
483
485
|
spacing: a,
|
|
484
|
-
title:
|
|
485
|
-
monotone:
|
|
486
|
+
title: n,
|
|
487
|
+
monotone: r,
|
|
486
488
|
...o
|
|
487
489
|
}) => /* @__PURE__ */ c(
|
|
488
490
|
A,
|
|
@@ -492,7 +494,7 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
492
494
|
viewBox: s,
|
|
493
495
|
className: e,
|
|
494
496
|
spacing: a,
|
|
495
|
-
title:
|
|
497
|
+
title: n || "Profile",
|
|
496
498
|
...o,
|
|
497
499
|
children: [
|
|
498
500
|
/* @__PURE__ */ t(
|
|
@@ -505,12 +507,12 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
505
507
|
/* @__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" })
|
|
506
508
|
]
|
|
507
509
|
}
|
|
508
|
-
),
|
|
510
|
+
), pe = ({
|
|
509
511
|
className: e,
|
|
510
512
|
viewBox: s,
|
|
511
513
|
spacing: a,
|
|
512
|
-
title:
|
|
513
|
-
monotone:
|
|
514
|
+
title: n,
|
|
515
|
+
monotone: r,
|
|
514
516
|
...o
|
|
515
517
|
}) => /* @__PURE__ */ c(
|
|
516
518
|
A,
|
|
@@ -520,14 +522,14 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
520
522
|
viewBox: s,
|
|
521
523
|
className: e,
|
|
522
524
|
spacing: a,
|
|
523
|
-
title:
|
|
525
|
+
title: n || "Refresh",
|
|
524
526
|
...o,
|
|
525
527
|
children: [
|
|
526
528
|
/* @__PURE__ */ t(
|
|
527
529
|
"path",
|
|
528
530
|
{
|
|
529
531
|
className: "fa-secondary",
|
|
530
|
-
opacity:
|
|
532
|
+
opacity: r ? "1" : "0.4",
|
|
531
533
|
d: "M80 396.9V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V320c0-17.7 14.3-32 32-32H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H125.6l17.2 17.1c62.5 62.5 163.8 62.5 226.3 0c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.5 87.5-229.3 87.5-316.7 0L80 396.9z"
|
|
532
534
|
}
|
|
533
535
|
),
|
|
@@ -544,8 +546,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
544
546
|
className: e,
|
|
545
547
|
viewBox: s,
|
|
546
548
|
spacing: a,
|
|
547
|
-
title:
|
|
548
|
-
monotone:
|
|
549
|
+
title: n,
|
|
550
|
+
monotone: r,
|
|
549
551
|
...o
|
|
550
552
|
}) => /* @__PURE__ */ c(
|
|
551
553
|
A,
|
|
@@ -555,13 +557,13 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
555
557
|
viewBox: s,
|
|
556
558
|
className: e,
|
|
557
559
|
spacing: a,
|
|
558
|
-
title:
|
|
560
|
+
title: n || "Restore",
|
|
559
561
|
...o,
|
|
560
562
|
children: [
|
|
561
563
|
/* @__PURE__ */ t(
|
|
562
564
|
"path",
|
|
563
565
|
{
|
|
564
|
-
opacity:
|
|
566
|
+
opacity: r ? "1" : "0.4",
|
|
565
567
|
d: "M208 64H432c8.8 0 16 7.2 16 16V304c0 8.8-7.2 16-16 16H416v64h16c44.2 0 80-35.8 80-80V80c0-44.2-35.8-80-80-80H208c-44.2 0-80 35.8-80 80V96h64V80c0-8.8 7.2-16 16-16z"
|
|
566
568
|
}
|
|
567
569
|
),
|
|
@@ -572,8 +574,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
572
574
|
className: e,
|
|
573
575
|
viewBox: s,
|
|
574
576
|
spacing: a,
|
|
575
|
-
title:
|
|
576
|
-
monotone:
|
|
577
|
+
title: n,
|
|
578
|
+
monotone: r,
|
|
577
579
|
...o
|
|
578
580
|
}) => /* @__PURE__ */ t(
|
|
579
581
|
A,
|
|
@@ -583,25 +585,25 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
583
585
|
viewBox: s,
|
|
584
586
|
className: e,
|
|
585
587
|
spacing: a,
|
|
586
|
-
title:
|
|
588
|
+
title: n || "Settings",
|
|
587
589
|
...o,
|
|
588
590
|
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" })
|
|
589
591
|
}
|
|
590
592
|
);
|
|
591
|
-
function
|
|
593
|
+
function G(e) {
|
|
592
594
|
return lt();
|
|
593
595
|
}
|
|
594
|
-
const
|
|
595
|
-
const s = (e == null ? void 0 : e.plugins) || [], a = (e == null ? void 0 : e.version) || "",
|
|
596
|
+
const ns = ({ stats: e }) => {
|
|
597
|
+
const s = (e == null ? void 0 : e.plugins) || [], a = (e == null ? void 0 : e.version) || "", n = (e == null ? void 0 : e.models) || [], r = G(), o = G();
|
|
596
598
|
return /* @__PURE__ */ c(w, { children: [
|
|
597
599
|
/* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t(
|
|
598
600
|
_,
|
|
599
601
|
{
|
|
600
602
|
header: C.ABOUT.TITLE_CLIENT,
|
|
601
603
|
className: "prose-dark dark:prose-lighter",
|
|
602
|
-
children:
|
|
603
|
-
[C.ABOUT.VERSION]: "3.4.
|
|
604
|
-
[C.ABOUT.BUILD_TIMESTAMP]: "07/
|
|
604
|
+
children: F(r, {
|
|
605
|
+
[C.ABOUT.VERSION]: "3.4.3",
|
|
606
|
+
[C.ABOUT.BUILD_TIMESTAMP]: "07/23/2024 01:46 PM EDT"
|
|
605
607
|
})
|
|
606
608
|
}
|
|
607
609
|
) }),
|
|
@@ -610,27 +612,27 @@ const rs = ({ stats: e }) => {
|
|
|
610
612
|
{
|
|
611
613
|
header: C.ABOUT.TITLE_SERVER,
|
|
612
614
|
className: "prose-dark dark:prose-lighter",
|
|
613
|
-
children:
|
|
615
|
+
children: F(o, {
|
|
614
616
|
[C.ABOUT.VERSION]: a,
|
|
615
|
-
[
|
|
616
|
-
[
|
|
617
|
+
[Q(C.ABOUT.ENGINE, n.length)]: /* @__PURE__ */ t(w, { children: n.map((l) => /* @__PURE__ */ t("div", { className: "text-right", children: l }, l)) }),
|
|
618
|
+
[Q(C.ABOUT.PLUGIN, s.length)]: /* @__PURE__ */ t(w, { children: s.map((l) => /* @__PURE__ */ t("div", { className: "text-right", children: l }, l)) })
|
|
617
619
|
})
|
|
618
620
|
}
|
|
619
621
|
)
|
|
620
622
|
] });
|
|
621
|
-
},
|
|
623
|
+
}, rs = ({
|
|
622
624
|
open: e,
|
|
623
625
|
onOpenChange: s
|
|
624
626
|
}) => {
|
|
625
|
-
const { serverStats: a } = R(
|
|
626
|
-
return /* @__PURE__ */ t(
|
|
627
|
-
}, os = (e) =>
|
|
627
|
+
const { serverStats: a } = R(j);
|
|
628
|
+
return /* @__PURE__ */ t(Y, { open: e, onOpenChange: s, title: ze, children: /* @__PURE__ */ t(ns, { stats: a }) });
|
|
629
|
+
}, os = (e) => Ce(e), cs = (e) => {
|
|
628
630
|
if (!e || e.length === 0)
|
|
629
631
|
return Pe;
|
|
630
632
|
const s = e.filter(
|
|
631
633
|
(a) => {
|
|
632
|
-
var
|
|
633
|
-
return ((
|
|
634
|
+
var n, r;
|
|
635
|
+
return ((n = a == null ? void 0 : a.message) == null ? void 0 : n.role) === Fe && typeof ((r = a == null ? void 0 : a.message) == null ? void 0 : r.processingTime) == "number";
|
|
634
636
|
}
|
|
635
637
|
).map((a) => a.message.processingTime);
|
|
636
638
|
return $e({
|
|
@@ -641,17 +643,17 @@ const rs = ({ stats: e }) => {
|
|
|
641
643
|
isAuthenticated: e,
|
|
642
644
|
stats: s
|
|
643
645
|
}) => {
|
|
644
|
-
const { state: a } = R(
|
|
646
|
+
const { state: a } = R(j), n = Ge - Number(a == null ? void 0 : a.usage), r = G(), o = G();
|
|
645
647
|
return e ? /* @__PURE__ */ c(w, { children: [
|
|
646
648
|
a && a.messages.length > 0 && /* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t(
|
|
647
649
|
_,
|
|
648
650
|
{
|
|
649
651
|
header: C.CURRENT_STATISTICS.TITLE,
|
|
650
652
|
className: "prose-dark dark:prose-lighter",
|
|
651
|
-
children:
|
|
653
|
+
children: F(r, {
|
|
652
654
|
[C.CURRENT_STATISTICS.MODEL_NAME]: (a == null ? void 0 : a.model) || Be,
|
|
653
655
|
[C.CURRENT_STATISTICS.TOKENS_USED]: a == null ? void 0 : a.usage,
|
|
654
|
-
[C.CURRENT_STATISTICS.REMAINING_TOKENS]: Ve.format(
|
|
656
|
+
[C.CURRENT_STATISTICS.REMAINING_TOKENS]: Ve.format(n),
|
|
655
657
|
[C.CURRENT_STATISTICS.PROCESSING_TIME]: cs(a == null ? void 0 : a.messages)
|
|
656
658
|
})
|
|
657
659
|
}
|
|
@@ -661,9 +663,9 @@ const rs = ({ stats: e }) => {
|
|
|
661
663
|
{
|
|
662
664
|
header: C.MAIN_STATISTICS.TITLE,
|
|
663
665
|
className: "prose-dark dark:prose-lighter",
|
|
664
|
-
children:
|
|
665
|
-
[
|
|
666
|
-
[C.MAIN_STATISTICS.PROCESSING_TIME]:
|
|
666
|
+
children: F(o, {
|
|
667
|
+
[Q(C.MAIN_STATISTICS.TOTAL, s.totalChats)]: s.totalChats,
|
|
668
|
+
[C.MAIN_STATISTICS.PROCESSING_TIME]: Ce(
|
|
667
669
|
s.averageProcessingTimes
|
|
668
670
|
)
|
|
669
671
|
})
|
|
@@ -674,41 +676,41 @@ const rs = ({ stats: e }) => {
|
|
|
674
676
|
open: e,
|
|
675
677
|
onOpenChange: s
|
|
676
678
|
}) => {
|
|
677
|
-
const [a,
|
|
679
|
+
const [a, n] = T({
|
|
678
680
|
averageProcessingTimes: 0,
|
|
679
681
|
totalChats: 0
|
|
680
|
-
}), { isAuthenticated:
|
|
682
|
+
}), { isAuthenticated: r, getAccessToken: o, user: l } = U();
|
|
681
683
|
return L(() => {
|
|
682
684
|
!e || !l || (async () => {
|
|
683
685
|
try {
|
|
684
|
-
const d = await
|
|
686
|
+
const d = await se({
|
|
685
687
|
accessToken: await o(),
|
|
686
|
-
type:
|
|
688
|
+
type: ae.GET_CHATS_STATS,
|
|
687
689
|
params: {
|
|
688
690
|
userId: l.username
|
|
689
691
|
}
|
|
690
692
|
});
|
|
691
|
-
d.status === 200 &&
|
|
693
|
+
d.status === 200 && n(d.data);
|
|
692
694
|
} catch {
|
|
693
695
|
}
|
|
694
696
|
})();
|
|
695
|
-
}, [e, o, l]), /* @__PURE__ */ t(
|
|
696
|
-
},
|
|
697
|
+
}, [e, o, l]), /* @__PURE__ */ t(Y, { open: e, onOpenChange: s, title: Ne, children: /* @__PURE__ */ t(is, { isAuthenticated: r, stats: a }) });
|
|
698
|
+
}, xe = ({
|
|
697
699
|
showConfirmation: e,
|
|
698
700
|
setShowConfirmation: s,
|
|
699
701
|
action: a,
|
|
700
|
-
children:
|
|
701
|
-
customStrings:
|
|
702
|
+
children: n,
|
|
703
|
+
customStrings: r
|
|
702
704
|
}) => /* @__PURE__ */ t(
|
|
703
|
-
|
|
705
|
+
Y,
|
|
704
706
|
{
|
|
705
707
|
kind: "messagebox",
|
|
706
708
|
open: e,
|
|
707
709
|
onOpenChange: s,
|
|
708
|
-
title:
|
|
709
|
-
footer: /* @__PURE__ */ c(
|
|
710
|
+
title: r.title,
|
|
711
|
+
footer: /* @__PURE__ */ c(q, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
710
712
|
/* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(
|
|
711
|
-
|
|
713
|
+
Z,
|
|
712
714
|
{
|
|
713
715
|
mode: "dark",
|
|
714
716
|
variant: "secondary",
|
|
@@ -716,11 +718,11 @@ const rs = ({ stats: e }) => {
|
|
|
716
718
|
onClick: () => {
|
|
717
719
|
s(!1);
|
|
718
720
|
},
|
|
719
|
-
children:
|
|
721
|
+
children: r.cancelAction
|
|
720
722
|
}
|
|
721
723
|
) }),
|
|
722
724
|
/* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(
|
|
723
|
-
|
|
725
|
+
Z,
|
|
724
726
|
{
|
|
725
727
|
mode: "dark",
|
|
726
728
|
variant: "danger",
|
|
@@ -728,87 +730,87 @@ const rs = ({ stats: e }) => {
|
|
|
728
730
|
onClick: () => {
|
|
729
731
|
s(!1), a();
|
|
730
732
|
},
|
|
731
|
-
children:
|
|
733
|
+
children: r.confirmAction
|
|
732
734
|
}
|
|
733
735
|
) })
|
|
734
736
|
] }),
|
|
735
|
-
children:
|
|
737
|
+
children: n
|
|
736
738
|
}
|
|
737
739
|
);
|
|
738
|
-
var ds = typeof window < "u",
|
|
740
|
+
var ds = typeof window < "u", ms = function(e, s) {
|
|
739
741
|
return ds ? 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);
|
|
740
|
-
},
|
|
741
|
-
var a = T(
|
|
742
|
+
}, us = function(e, s) {
|
|
743
|
+
var a = T(ms(e)), n = a[0], r = a[1];
|
|
742
744
|
return L(function() {
|
|
743
745
|
var o = !0, l = window.matchMedia(e), d = function() {
|
|
744
|
-
o &&
|
|
746
|
+
o && r(!!l.matches);
|
|
745
747
|
};
|
|
746
|
-
return l.addEventListener("change", d),
|
|
748
|
+
return l.addEventListener("change", d), r(l.matches), function() {
|
|
747
749
|
o = !1, l.removeEventListener("change", d);
|
|
748
750
|
};
|
|
749
|
-
}, [e]),
|
|
751
|
+
}, [e]), n;
|
|
750
752
|
};
|
|
751
|
-
const hs = async (e, s, a,
|
|
753
|
+
const hs = async (e, s, a, n) => {
|
|
752
754
|
try {
|
|
753
|
-
const
|
|
754
|
-
accessToken:
|
|
755
|
-
type:
|
|
755
|
+
const r = await se({
|
|
756
|
+
accessToken: n,
|
|
757
|
+
type: ae.GET_CHAT,
|
|
756
758
|
params: {
|
|
757
759
|
id: e.id
|
|
758
760
|
}
|
|
759
761
|
});
|
|
760
|
-
|
|
762
|
+
r.status === 200 && (s({
|
|
761
763
|
type: je
|
|
762
764
|
}), s({
|
|
763
765
|
type: Ke,
|
|
764
766
|
payload: {
|
|
765
767
|
id: e.id,
|
|
766
|
-
model:
|
|
767
|
-
usage:
|
|
768
|
-
messages:
|
|
768
|
+
model: r.data.model,
|
|
769
|
+
usage: r.data.usage,
|
|
770
|
+
messages: r.data.messages
|
|
769
771
|
}
|
|
770
772
|
}), a(!1));
|
|
771
773
|
} catch {
|
|
772
774
|
}
|
|
773
|
-
},
|
|
775
|
+
}, fe = (e) => {
|
|
774
776
|
const s = e[0];
|
|
775
777
|
return Ye(s == null ? void 0 : s.content, 100);
|
|
776
778
|
}, ps = ({
|
|
777
779
|
filteredHistory: e,
|
|
778
780
|
setFilteredHistory: s,
|
|
779
781
|
setFullHistory: a,
|
|
780
|
-
dispatch:
|
|
781
|
-
onOpenChange:
|
|
782
|
+
dispatch: n,
|
|
783
|
+
onOpenChange: r
|
|
782
784
|
}) => {
|
|
783
785
|
var i;
|
|
784
|
-
const { user: o, getAccessToken: l } =
|
|
786
|
+
const { user: o, getAccessToken: l } = U(), d = $({
|
|
785
787
|
id: 0,
|
|
786
788
|
timestamp: "",
|
|
787
789
|
message: ""
|
|
788
|
-
}), [
|
|
789
|
-
key:
|
|
790
|
-
initialValue:
|
|
790
|
+
}), [h, m] = T(!1), N = us("(min-width: 480px)"), { state: u, dispatch: y } = R(ye), [, b] = te({
|
|
791
|
+
key: ee + Ue,
|
|
792
|
+
initialValue: u.sortDirection
|
|
791
793
|
}), S = e.data.sort(
|
|
792
|
-
(
|
|
793
|
-
switch (
|
|
794
|
+
(p, g) => {
|
|
795
|
+
switch (u.sortedCell) {
|
|
794
796
|
case "timestamp":
|
|
795
|
-
if (
|
|
796
|
-
return new Date(
|
|
797
|
-
if (
|
|
798
|
-
return new Date(g[
|
|
797
|
+
if (u.sortDirection === v.ASC)
|
|
798
|
+
return new Date(p[u.sortedCell]).getTime() - new Date(g[u.sortedCell]).getTime();
|
|
799
|
+
if (u.sortDirection === v.DESC)
|
|
800
|
+
return new Date(g[u.sortedCell]).getTime() - new Date(p[u.sortedCell]).getTime();
|
|
799
801
|
break;
|
|
800
802
|
default:
|
|
801
803
|
return 0;
|
|
802
804
|
}
|
|
803
805
|
return 0;
|
|
804
806
|
}
|
|
805
|
-
),
|
|
806
|
-
switch (
|
|
807
|
+
), f = (p) => {
|
|
808
|
+
switch (u.sortDirection) {
|
|
807
809
|
case !1:
|
|
808
810
|
b(v.ASC), y({
|
|
809
811
|
type: re,
|
|
810
812
|
payload: {
|
|
811
|
-
sortedCell:
|
|
813
|
+
sortedCell: p,
|
|
812
814
|
sortDirection: v.ASC
|
|
813
815
|
}
|
|
814
816
|
});
|
|
@@ -817,7 +819,7 @@ const hs = async (e, s, a, r) => {
|
|
|
817
819
|
b(v.DESC), y({
|
|
818
820
|
type: re,
|
|
819
821
|
payload: {
|
|
820
|
-
sortedCell:
|
|
822
|
+
sortedCell: p,
|
|
821
823
|
sortDirection: v.DESC
|
|
822
824
|
}
|
|
823
825
|
});
|
|
@@ -826,7 +828,7 @@ const hs = async (e, s, a, r) => {
|
|
|
826
828
|
b(v.ASC), y({
|
|
827
829
|
type: re,
|
|
828
830
|
payload: {
|
|
829
|
-
sortedCell:
|
|
831
|
+
sortedCell: p,
|
|
830
832
|
sortDirection: v.ASC
|
|
831
833
|
}
|
|
832
834
|
});
|
|
@@ -835,19 +837,19 @@ const hs = async (e, s, a, r) => {
|
|
|
835
837
|
};
|
|
836
838
|
return /* @__PURE__ */ c(w, { children: [
|
|
837
839
|
/* @__PURE__ */ c(
|
|
838
|
-
|
|
840
|
+
xe,
|
|
839
841
|
{
|
|
840
|
-
showConfirmation:
|
|
841
|
-
setShowConfirmation:
|
|
842
|
+
showConfirmation: h,
|
|
843
|
+
setShowConfirmation: m,
|
|
842
844
|
action: async () => {
|
|
843
|
-
const
|
|
845
|
+
const p = d.current;
|
|
844
846
|
try {
|
|
845
|
-
const g = await
|
|
847
|
+
const g = await se({
|
|
846
848
|
accessToken: await l(),
|
|
847
|
-
type:
|
|
849
|
+
type: ae.DELETE_CHAT,
|
|
848
850
|
params: {
|
|
849
851
|
userId: (o == null ? void 0 : o.username) || "",
|
|
850
|
-
id:
|
|
852
|
+
id: p.id
|
|
851
853
|
}
|
|
852
854
|
});
|
|
853
855
|
g.status === 200 && (a(g.data), s({ data: g.data }));
|
|
@@ -876,18 +878,18 @@ const hs = async (e, s, a, r) => {
|
|
|
876
878
|
]
|
|
877
879
|
}
|
|
878
880
|
),
|
|
879
|
-
/* @__PURE__ */ c(
|
|
880
|
-
/* @__PURE__ */ t(
|
|
881
|
+
/* @__PURE__ */ c(mt, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
|
|
882
|
+
/* @__PURE__ */ t(ut, { children: /* @__PURE__ */ c(oe, { children: [
|
|
881
883
|
N && /* @__PURE__ */ t(H, { className: "sr-only", children: "Row" }),
|
|
882
884
|
/* @__PURE__ */ t(
|
|
883
885
|
ht,
|
|
884
886
|
{
|
|
885
887
|
cellId: "timestamp",
|
|
886
888
|
align: "left",
|
|
887
|
-
sortDirection:
|
|
888
|
-
sortedCell:
|
|
889
|
+
sortDirection: u.sortDirection,
|
|
890
|
+
sortedCell: u.sortedCell,
|
|
889
891
|
onClick: () => {
|
|
890
|
-
|
|
892
|
+
f("timestamp");
|
|
891
893
|
},
|
|
892
894
|
children: "Date"
|
|
893
895
|
}
|
|
@@ -895,9 +897,9 @@ const hs = async (e, s, a, r) => {
|
|
|
895
897
|
/* @__PURE__ */ t(H, { children: "First message" }),
|
|
896
898
|
/* @__PURE__ */ t(H, { className: "text-right", children: "Actions" })
|
|
897
899
|
] }) }),
|
|
898
|
-
/* @__PURE__ */ t(pt, { children: S.map((
|
|
900
|
+
/* @__PURE__ */ t(pt, { children: S.map((p, g) => {
|
|
899
901
|
var x;
|
|
900
|
-
return ((x =
|
|
902
|
+
return ((x = p == null ? void 0 : p.messages) == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ c(oe, { children: [
|
|
901
903
|
N && /* @__PURE__ */ t(H, { children: g + 1 }),
|
|
902
904
|
/* @__PURE__ */ t(
|
|
903
905
|
H,
|
|
@@ -905,13 +907,13 @@ const hs = async (e, s, a, r) => {
|
|
|
905
907
|
component: "th",
|
|
906
908
|
scope: "row",
|
|
907
909
|
className: "font-medium text-gray-400 sm:whitespace-nowrap",
|
|
908
|
-
children:
|
|
910
|
+
children: p.timestamp
|
|
909
911
|
}
|
|
910
912
|
),
|
|
911
|
-
/* @__PURE__ */ t(H, { className: "max-w-[100px] text-white sm:max-w-full", children:
|
|
913
|
+
/* @__PURE__ */ t(H, { className: "max-w-[100px] text-white sm:max-w-full", children: fe(p.messages) }),
|
|
912
914
|
/* @__PURE__ */ t(H, { children: /* @__PURE__ */ c("div", { className: "flex justify-end gap-2", children: [
|
|
913
915
|
/* @__PURE__ */ t(
|
|
914
|
-
|
|
916
|
+
D,
|
|
915
917
|
{
|
|
916
918
|
focusMode: "alt-system",
|
|
917
919
|
noBorder: !0,
|
|
@@ -919,9 +921,9 @@ const hs = async (e, s, a, r) => {
|
|
|
919
921
|
onClick: async () => {
|
|
920
922
|
const z = await l();
|
|
921
923
|
hs(
|
|
922
|
-
|
|
923
|
-
r,
|
|
924
|
+
p,
|
|
924
925
|
n,
|
|
926
|
+
r,
|
|
925
927
|
z
|
|
926
928
|
);
|
|
927
929
|
},
|
|
@@ -929,35 +931,35 @@ const hs = async (e, s, a, r) => {
|
|
|
929
931
|
}
|
|
930
932
|
),
|
|
931
933
|
/* @__PURE__ */ t(
|
|
932
|
-
|
|
934
|
+
D,
|
|
933
935
|
{
|
|
934
936
|
focusMode: "alt-system",
|
|
935
937
|
noBorder: !0,
|
|
936
938
|
label: "Delete chat",
|
|
937
939
|
onClick: () => {
|
|
938
940
|
d.current = {
|
|
939
|
-
id:
|
|
940
|
-
timestamp:
|
|
941
|
-
message:
|
|
942
|
-
},
|
|
941
|
+
id: p.id,
|
|
942
|
+
timestamp: p.timestamp,
|
|
943
|
+
message: fe(p.messages)
|
|
944
|
+
}, m(!h);
|
|
943
945
|
},
|
|
944
946
|
children: /* @__PURE__ */ t("div", { className: "text-red-400", children: /* @__PURE__ */ t(Qt, { className: "h-3 w-3", monotone: !0 }) })
|
|
945
947
|
}
|
|
946
948
|
)
|
|
947
949
|
] }) })
|
|
948
|
-
] }, `${C.HISTORY.TITLE}-${
|
|
950
|
+
] }, `${C.HISTORY.TITLE}-${p.id}-${g}`) : null;
|
|
949
951
|
}) }),
|
|
950
|
-
/* @__PURE__ */ t(ft, { children: /* @__PURE__ */ t(
|
|
952
|
+
/* @__PURE__ */ t(ft, { children: /* @__PURE__ */ t(oe, { children: /* @__PURE__ */ t(H, { colSpan: 4, children: /* @__PURE__ */ t("div", { children: Q(
|
|
951
953
|
`${e.data.length} chat`,
|
|
952
954
|
e.data.length
|
|
953
955
|
) }) }) }) })
|
|
954
956
|
] })
|
|
955
957
|
] });
|
|
956
958
|
};
|
|
957
|
-
function
|
|
959
|
+
function ge(e, s) {
|
|
958
960
|
return s ? e.filter(
|
|
959
961
|
(a) => a.messages.some(
|
|
960
|
-
(
|
|
962
|
+
(n) => n.content !== null && n.content.toLowerCase().includes(s.toLowerCase())
|
|
961
963
|
)
|
|
962
964
|
) : e;
|
|
963
965
|
}
|
|
@@ -965,37 +967,37 @@ const fs = ({
|
|
|
965
967
|
onOpenChange: e,
|
|
966
968
|
historyData: s
|
|
967
969
|
}) => {
|
|
968
|
-
const { isAuthenticated: a } =
|
|
969
|
-
key:
|
|
970
|
+
const { isAuthenticated: a } = U(), n = $(null), { dispatch: r } = R(j), { state: o, dispatch: l } = R(ye), [, d] = te({
|
|
971
|
+
key: ee + We,
|
|
970
972
|
initialValue: o.searchString
|
|
971
|
-
}), [
|
|
972
|
-
data:
|
|
973
|
-
}), y = (
|
|
974
|
-
const
|
|
975
|
-
|
|
976
|
-
data:
|
|
977
|
-
}), d(
|
|
973
|
+
}), [h, m] = T(s), [N, u] = T({
|
|
974
|
+
data: h
|
|
975
|
+
}), y = (f) => {
|
|
976
|
+
const E = ge(h, f);
|
|
977
|
+
u({
|
|
978
|
+
data: E
|
|
979
|
+
}), d(f), l({
|
|
978
980
|
type: Je,
|
|
979
|
-
payload: { searchString:
|
|
981
|
+
payload: { searchString: f }
|
|
980
982
|
});
|
|
981
|
-
}, b = (
|
|
982
|
-
y(
|
|
983
|
-
}, S = async (
|
|
984
|
-
|
|
983
|
+
}, b = (f) => {
|
|
984
|
+
y(f.target.value);
|
|
985
|
+
}, S = async (f) => {
|
|
986
|
+
f.preventDefault();
|
|
985
987
|
};
|
|
986
988
|
return L(() => {
|
|
987
|
-
const
|
|
988
|
-
|
|
989
|
+
const f = ge(
|
|
990
|
+
h,
|
|
989
991
|
o.searchString
|
|
990
992
|
);
|
|
991
|
-
|
|
992
|
-
data:
|
|
993
|
+
u({
|
|
994
|
+
data: f
|
|
993
995
|
});
|
|
994
|
-
}, [
|
|
996
|
+
}, [h, o.searchString]), a ? N && N.data && /* @__PURE__ */ c(w, { children: [
|
|
995
997
|
/* @__PURE__ */ t("form", { autoComplete: "off", onSubmit: S, children: /* @__PURE__ */ t(
|
|
996
998
|
Xe,
|
|
997
999
|
{
|
|
998
|
-
ref:
|
|
1000
|
+
ref: n,
|
|
999
1001
|
defaultValue: o.searchString,
|
|
1000
1002
|
focusMode: "light",
|
|
1001
1003
|
name: "Search",
|
|
@@ -1004,15 +1006,15 @@ const fs = ({
|
|
|
1004
1006
|
spacing: { t: 2, b: 2 },
|
|
1005
1007
|
...o.searchString && {
|
|
1006
1008
|
rightElement: /* @__PURE__ */ t(
|
|
1007
|
-
|
|
1009
|
+
Z,
|
|
1008
1010
|
{
|
|
1009
1011
|
disabled: !o.searchString,
|
|
1010
1012
|
mode: "dark",
|
|
1011
1013
|
noBorder: !0,
|
|
1012
1014
|
size: "small",
|
|
1013
1015
|
onClick: () => {
|
|
1014
|
-
var
|
|
1015
|
-
y(""), (
|
|
1016
|
+
var f;
|
|
1017
|
+
y(""), (f = n.current) != null && f.value && (n.current.value = "", n.current.focus());
|
|
1016
1018
|
},
|
|
1017
1019
|
children: "Reset"
|
|
1018
1020
|
}
|
|
@@ -1024,9 +1026,9 @@ const fs = ({
|
|
|
1024
1026
|
ps,
|
|
1025
1027
|
{
|
|
1026
1028
|
filteredHistory: N,
|
|
1027
|
-
setFilteredHistory:
|
|
1028
|
-
setFullHistory:
|
|
1029
|
-
dispatch:
|
|
1029
|
+
setFilteredHistory: u,
|
|
1030
|
+
setFullHistory: m,
|
|
1031
|
+
dispatch: r,
|
|
1030
1032
|
onOpenChange: e
|
|
1031
1033
|
}
|
|
1032
1034
|
) })
|
|
@@ -1035,18 +1037,18 @@ const fs = ({
|
|
|
1035
1037
|
open: e,
|
|
1036
1038
|
onOpenChange: s,
|
|
1037
1039
|
historyData: a
|
|
1038
|
-
}) => /* @__PURE__ */ t(
|
|
1039
|
-
const { isAuthenticated: e, user: s, registeringForPasskey: a, authenticationType:
|
|
1040
|
-
key:
|
|
1040
|
+
}) => /* @__PURE__ */ t(Y, { open: e, onOpenChange: s, title: qe, children: /* @__PURE__ */ t(fs, { onOpenChange: s, historyData: a }) }), Cs = () => {
|
|
1041
|
+
const { isAuthenticated: e, user: s, registeringForPasskey: a, authenticationType: n } = U(), [r, o] = te({
|
|
1042
|
+
key: ee + Qe,
|
|
1041
1043
|
initialValue: !1
|
|
1042
|
-
}), [, l, d] =
|
|
1043
|
-
key:
|
|
1044
|
+
}), [, l, d] = te({
|
|
1045
|
+
key: ee + Ze,
|
|
1044
1046
|
initialValue: { latitude: 0, longitude: 0, accuracy: 0 }
|
|
1045
|
-
}), [
|
|
1047
|
+
}), [h, m] = T(!0), N = G(), { state: u, dispatch: y } = R(j), b = (s == null ? void 0 : s.username) || "", S = (i) => {
|
|
1046
1048
|
o(i);
|
|
1047
|
-
},
|
|
1048
|
-
|
|
1049
|
-
type:
|
|
1049
|
+
}, f = async () => {
|
|
1050
|
+
m(!1), d(), y({
|
|
1051
|
+
type: me,
|
|
1050
1052
|
payload: {
|
|
1051
1053
|
location: {
|
|
1052
1054
|
latitude: 0,
|
|
@@ -1057,7 +1059,7 @@ const fs = ({
|
|
|
1057
1059
|
});
|
|
1058
1060
|
const i = await st();
|
|
1059
1061
|
l(i), y({
|
|
1060
|
-
type:
|
|
1062
|
+
type: me,
|
|
1061
1063
|
payload: {
|
|
1062
1064
|
location: i
|
|
1063
1065
|
}
|
|
@@ -1065,15 +1067,15 @@ const fs = ({
|
|
|
1065
1067
|
};
|
|
1066
1068
|
L(() => {
|
|
1067
1069
|
let i;
|
|
1068
|
-
return
|
|
1069
|
-
|
|
1070
|
+
return h || (i = window.setTimeout(() => {
|
|
1071
|
+
m(!0);
|
|
1070
1072
|
}, 3e3)), () => {
|
|
1071
1073
|
clearTimeout(i);
|
|
1072
1074
|
};
|
|
1073
|
-
}, [
|
|
1074
|
-
const
|
|
1075
|
+
}, [h]);
|
|
1076
|
+
const E = (i) => {
|
|
1075
1077
|
if (i != null && i.city && (i != null && i.country) && (i != null && i.region))
|
|
1076
|
-
return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(
|
|
1078
|
+
return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(q, { alignVertical: "center", columnGap: 4, children: [
|
|
1077
1079
|
/* @__PURE__ */ c(M, { children: [
|
|
1078
1080
|
/* @__PURE__ */ c("div", { className: "text-right", children: [
|
|
1079
1081
|
i.city,
|
|
@@ -1083,29 +1085,29 @@ const fs = ({
|
|
|
1083
1085
|
/* @__PURE__ */ t("div", { className: "text-right", children: i.country })
|
|
1084
1086
|
] }),
|
|
1085
1087
|
/* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(
|
|
1086
|
-
|
|
1088
|
+
D,
|
|
1087
1089
|
{
|
|
1088
|
-
disabled: !
|
|
1090
|
+
disabled: !h,
|
|
1089
1091
|
size: "small",
|
|
1090
1092
|
className: "mt-2",
|
|
1091
|
-
onClick:
|
|
1092
|
-
children: /* @__PURE__ */ t(
|
|
1093
|
+
onClick: f,
|
|
1094
|
+
children: /* @__PURE__ */ t(pe, { className: "size-3", monotone: !0 })
|
|
1093
1095
|
}
|
|
1094
1096
|
) })
|
|
1095
1097
|
] }) });
|
|
1096
|
-
const
|
|
1097
|
-
return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(
|
|
1098
|
+
const p = at(i == null ? void 0 : i.latitude), g = nt(i == null ? void 0 : i.longitude);
|
|
1099
|
+
return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(q, { alignVertical: "center", columnGap: 4, children: [
|
|
1098
1100
|
/* @__PURE__ */ c(M, { children: [
|
|
1099
|
-
/* @__PURE__ */ t("div", { children:
|
|
1101
|
+
/* @__PURE__ */ t("div", { children: p }),
|
|
1100
1102
|
/* @__PURE__ */ t("div", { children: g })
|
|
1101
1103
|
] }),
|
|
1102
1104
|
/* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(
|
|
1103
|
-
|
|
1105
|
+
D,
|
|
1104
1106
|
{
|
|
1105
1107
|
size: "small",
|
|
1106
1108
|
className: "mt-2",
|
|
1107
|
-
onClick:
|
|
1108
|
-
children: /* @__PURE__ */ t(
|
|
1109
|
+
onClick: f,
|
|
1110
|
+
children: /* @__PURE__ */ t(pe, { className: "size-3", monotone: !0 })
|
|
1109
1111
|
}
|
|
1110
1112
|
) })
|
|
1111
1113
|
] }) });
|
|
@@ -1116,7 +1118,7 @@ const fs = ({
|
|
|
1116
1118
|
{
|
|
1117
1119
|
header: C.PREFERENCES.TITLE,
|
|
1118
1120
|
className: "prose-dark dark:prose-lighter",
|
|
1119
|
-
children:
|
|
1121
|
+
children: F(N, {
|
|
1120
1122
|
[C.PREFERENCES.NAME]: b,
|
|
1121
1123
|
// [CARDS.PREFERENCES.EMAIL]: endUser.email,
|
|
1122
1124
|
[C.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ t(
|
|
@@ -1127,25 +1129,25 @@ const fs = ({
|
|
|
1127
1129
|
label: C.PREFERENCES.ENGINE_DETAILS,
|
|
1128
1130
|
name: C.PREFERENCES.ENGINE_DETAILS,
|
|
1129
1131
|
onChange: S,
|
|
1130
|
-
checked:
|
|
1132
|
+
checked: r
|
|
1131
1133
|
}
|
|
1132
1134
|
),
|
|
1133
|
-
[C.PREFERENCES.LOCATION]:
|
|
1135
|
+
[C.PREFERENCES.LOCATION]: E(u == null ? void 0 : u.location)
|
|
1134
1136
|
})
|
|
1135
1137
|
}
|
|
1136
1138
|
),
|
|
1137
|
-
|
|
1139
|
+
n !== et.PASSKEY && /* @__PURE__ */ c(
|
|
1138
1140
|
_,
|
|
1139
1141
|
{
|
|
1140
1142
|
spacing: { t: 4 },
|
|
1141
1143
|
className: "prose-dark dark:prose-lighter",
|
|
1142
|
-
header: /* @__PURE__ */ t("h2", { className: "m-0", children: /* @__PURE__ */ c(
|
|
1144
|
+
header: /* @__PURE__ */ t("h2", { className: "m-0", children: /* @__PURE__ */ c(q, { columnGap: 3, alignVertical: "center", children: [
|
|
1143
1145
|
/* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(tt, { className: "size-6 text-center" }) }),
|
|
1144
1146
|
/* @__PURE__ */ t(M, { children: /* @__PURE__ */ t("div", { children: "Passkey" }) })
|
|
1145
1147
|
] }) }),
|
|
1146
1148
|
children: [
|
|
1147
1149
|
"Sign in without a password using a passkey (face or fingerprint sign-in).",
|
|
1148
|
-
/* @__PURE__ */ t(
|
|
1150
|
+
/* @__PURE__ */ t(Z, { spacing: { t: 2 }, onClick: a, children: "Create a Passkey" })
|
|
1149
1151
|
]
|
|
1150
1152
|
}
|
|
1151
1153
|
)
|
|
@@ -1153,31 +1155,31 @@ const fs = ({
|
|
|
1153
1155
|
}, Ns = ({
|
|
1154
1156
|
open: e,
|
|
1155
1157
|
onOpenChange: s
|
|
1156
|
-
}) => /* @__PURE__ */ t(
|
|
1157
|
-
const { state: e } = R(
|
|
1158
|
+
}) => /* @__PURE__ */ t(Y, { open: e, onOpenChange: s, title: rt, children: /* @__PURE__ */ t(Cs, {}) }), Es = () => {
|
|
1159
|
+
const { state: e } = R(j), [s, a] = T(!1), [n, r] = T(!1), [o, l] = T(!1), [d, h] = T(!1), [m, N] = T([]), [u, y] = T(!1), [b, S] = T({
|
|
1158
1160
|
done: !1,
|
|
1159
1161
|
progress: !1,
|
|
1160
1162
|
timestamp: Date.now()
|
|
1161
|
-
}), { logout:
|
|
1163
|
+
}), { logout: f, getAccessToken: E, user: i } = U(), p = () => {
|
|
1162
1164
|
a(!s);
|
|
1163
1165
|
}, g = () => {
|
|
1164
|
-
|
|
1166
|
+
r(!n);
|
|
1165
1167
|
}, x = () => {
|
|
1166
1168
|
l(!o);
|
|
1167
1169
|
}, z = () => {
|
|
1168
|
-
|
|
1169
|
-
},
|
|
1170
|
-
const
|
|
1171
|
-
if (I && !(!i || !e || b.progress || b.done === !0 &&
|
|
1170
|
+
h(!d);
|
|
1171
|
+
}, ne = async (I) => {
|
|
1172
|
+
const X = Date.now();
|
|
1173
|
+
if (I && !(!i || !e || b.progress || b.done === !0 && X - b.timestamp < 5e3)) {
|
|
1172
1174
|
S({
|
|
1173
1175
|
done: !0,
|
|
1174
1176
|
progress: !0,
|
|
1175
|
-
timestamp:
|
|
1177
|
+
timestamp: X
|
|
1176
1178
|
});
|
|
1177
1179
|
try {
|
|
1178
|
-
const B = await
|
|
1179
|
-
accessToken: await
|
|
1180
|
-
type:
|
|
1180
|
+
const B = await se({
|
|
1181
|
+
accessToken: await E(),
|
|
1182
|
+
type: ae.GET_CHATS,
|
|
1181
1183
|
params: {
|
|
1182
1184
|
userId: i.username
|
|
1183
1185
|
}
|
|
@@ -1195,62 +1197,62 @@ const fs = ({
|
|
|
1195
1197
|
});
|
|
1196
1198
|
}
|
|
1197
1199
|
}
|
|
1198
|
-
},
|
|
1199
|
-
y(!
|
|
1200
|
+
}, W = () => {
|
|
1201
|
+
y(!u);
|
|
1200
1202
|
};
|
|
1201
1203
|
return /* @__PURE__ */ c(w, { children: [
|
|
1202
1204
|
/* @__PURE__ */ t(
|
|
1203
|
-
|
|
1205
|
+
xe,
|
|
1204
1206
|
{
|
|
1205
|
-
showConfirmation:
|
|
1207
|
+
showConfirmation: u,
|
|
1206
1208
|
setShowConfirmation: y,
|
|
1207
|
-
action:
|
|
1209
|
+
action: f,
|
|
1208
1210
|
customStrings: {
|
|
1209
|
-
confirmAction:
|
|
1211
|
+
confirmAction: ue,
|
|
1210
1212
|
cancelAction: "Cancel",
|
|
1211
|
-
title:
|
|
1213
|
+
title: ue
|
|
1212
1214
|
},
|
|
1213
1215
|
children: /* @__PURE__ */ t("p", { children: "Are you sure you want to log out?" })
|
|
1214
1216
|
}
|
|
1215
1217
|
),
|
|
1216
1218
|
/* @__PURE__ */ t(Ns, { open: s, onOpenChange: a }),
|
|
1217
|
-
/* @__PURE__ */ t(ls, { open:
|
|
1219
|
+
/* @__PURE__ */ t(ls, { open: n, onOpenChange: r }),
|
|
1218
1220
|
/* @__PURE__ */ t(
|
|
1219
1221
|
gs,
|
|
1220
1222
|
{
|
|
1221
1223
|
open: o,
|
|
1222
1224
|
onOpenChange: l,
|
|
1223
|
-
historyData:
|
|
1225
|
+
historyData: m
|
|
1224
1226
|
}
|
|
1225
1227
|
),
|
|
1226
|
-
/* @__PURE__ */ t(
|
|
1228
|
+
/* @__PURE__ */ t(rs, { open: d, onOpenChange: h }),
|
|
1227
1229
|
/* @__PURE__ */ t("div", { className: "relative", children: /* @__PURE__ */ t("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ c(
|
|
1228
|
-
|
|
1230
|
+
Ee,
|
|
1229
1231
|
{
|
|
1230
1232
|
mode: "dark",
|
|
1231
1233
|
focusMode: "light",
|
|
1232
|
-
trigger: /* @__PURE__ */ t(
|
|
1234
|
+
trigger: /* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(as, {}) }),
|
|
1233
1235
|
defaultPlacement: "bottom-end",
|
|
1234
|
-
onOpenChange:
|
|
1236
|
+
onOpenChange: ne,
|
|
1235
1237
|
children: [
|
|
1236
1238
|
/* @__PURE__ */ t(
|
|
1237
|
-
|
|
1239
|
+
O,
|
|
1238
1240
|
{
|
|
1239
1241
|
label: "Profile",
|
|
1240
|
-
onClick:
|
|
1242
|
+
onClick: p,
|
|
1241
1243
|
icon: /* @__PURE__ */ t(ts, {})
|
|
1242
1244
|
}
|
|
1243
1245
|
),
|
|
1244
1246
|
/* @__PURE__ */ t(
|
|
1245
|
-
|
|
1247
|
+
O,
|
|
1246
1248
|
{
|
|
1247
|
-
label:
|
|
1249
|
+
label: Ne,
|
|
1248
1250
|
onClick: g,
|
|
1249
1251
|
icon: /* @__PURE__ */ t(qt, {})
|
|
1250
1252
|
}
|
|
1251
1253
|
),
|
|
1252
1254
|
/* @__PURE__ */ t(
|
|
1253
|
-
|
|
1255
|
+
O,
|
|
1254
1256
|
{
|
|
1255
1257
|
label: "History",
|
|
1256
1258
|
onClick: x,
|
|
@@ -1258,7 +1260,7 @@ const fs = ({
|
|
|
1258
1260
|
}
|
|
1259
1261
|
),
|
|
1260
1262
|
/* @__PURE__ */ t(
|
|
1261
|
-
|
|
1263
|
+
O,
|
|
1262
1264
|
{
|
|
1263
1265
|
label: "About",
|
|
1264
1266
|
onClick: z,
|
|
@@ -1268,10 +1270,10 @@ const fs = ({
|
|
|
1268
1270
|
e && e.id && !e.isComponent && /* @__PURE__ */ c(w, { children: [
|
|
1269
1271
|
/* @__PURE__ */ t(Lt, {}),
|
|
1270
1272
|
/* @__PURE__ */ t(
|
|
1271
|
-
|
|
1273
|
+
O,
|
|
1272
1274
|
{
|
|
1273
1275
|
label: "Log out",
|
|
1274
|
-
onClick:
|
|
1276
|
+
onClick: W,
|
|
1275
1277
|
icon: /* @__PURE__ */ t("div", { className: "text-red-700", children: /* @__PURE__ */ t(Jt, { monotone: !0 }) })
|
|
1276
1278
|
}
|
|
1277
1279
|
)
|
|
@@ -1282,5 +1284,5 @@ const fs = ({
|
|
|
1282
1284
|
] });
|
|
1283
1285
|
};
|
|
1284
1286
|
export {
|
|
1285
|
-
|
|
1287
|
+
Es as default
|
|
1286
1288
|
};
|