@versini/sassysaint 8.58.2 → 8.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/chunks/{AboutChangelog.BJb6evn9.js → AboutChangelog.VIMWfrJ2.js} +2 -2
  2. package/dist/chunks/{AboutEntry.CKS9KQYk.js → AboutEntry.HhBVaghX.js} +9 -9
  3. package/dist/chunks/{App.Bw24TFS-.js → App.DFkumxrG.js} +1798 -1780
  4. package/dist/chunks/{Chart.Cddg0IXQ.js → Chart.DyiU5Qev.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.6-hK6qAF.js → ChatBubbleAssistant.a1OalMkY.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.DpUR_1HU.js → ChatBubbleUser.DP50erQL.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.BB5ESpr2.js → ChatHistoryTable.9NfCFVTm.js} +3 -3
  8. package/dist/chunks/{HistoryEntry.BQlLgB9G.js → HistoryEntry.Dz-6Alzn.js} +14 -14
  9. package/dist/chunks/{ProfileEntry.CuUO01aL.js → ProfileEntry.DJ4q6KoG.js} +2 -2
  10. package/dist/chunks/SettingsEntry.Cc0vofff.js +430 -0
  11. package/dist/chunks/{Table.BLNonpLk.js → Table.CGJz3l0P.js} +2 -2
  12. package/dist/chunks/{UsageEntry.CuWrk617.js → UsageEntry.B6zt1DS_.js} +3 -3
  13. package/dist/chunks/UserMemoriesPanel.C2262GRv.js +693 -0
  14. package/dist/chunks/{index.BjpuOtB7.js → index.6QVNoWZY.js} +616 -584
  15. package/dist/chunks/{index.Dgyiis4p.js → index.BlzmTlvN.js} +2 -2
  16. package/dist/chunks/{index.YTqgXQdg.js → index.CGcokH1z.js} +3 -3
  17. package/dist/chunks/{index.Ds-UToar.js → index.CV96FPnP.js} +1 -1
  18. package/dist/chunks/{index.CQgBz9Dt.js → index.D69nnw0C.js} +1 -1
  19. package/dist/chunks/{index.Cs8bFhFv.js → index.DXesyWpt.js} +1 -1
  20. package/dist/chunks/{index.CcOFJwqN.js → index.en8Vui5r.js} +1 -1
  21. package/dist/chunks/{useMarkdown.CskeXXFn.js → useMarkdown.DRQL-Q_k.js} +6 -6
  22. package/dist/components/SassySaint/SassySaint.js +1 -1
  23. package/dist/index.js +4 -4
  24. package/dist/style.css +1 -1
  25. package/package.json +3 -3
  26. package/dist/chunks/SettingsEntry.6T_vvycf.js +0 -781
  27. package/dist/chunks/UserMemoriesPanel.3ikfhdxH.js +0 -205
@@ -1,7 +1,7 @@
1
1
  import { jsx as Ap } from "react/jsx-runtime";
2
- import { getDefaultExportFromCjs as ln } from "./App.Bw24TFS-.js";
2
+ import { getDefaultExportFromCjs as ln } from "./App.DFkumxrG.js";
3
3
  import Cp, { useState as Pp, useEffect as Op } from "react";
4
- import { TRIMESTERS as rn, TRIMESTERS_SHORT as Lp, isProbablyMobile as Ep } from "./index.BjpuOtB7.js";
4
+ import { TRIMESTERS as rn, TRIMESTERS_SHORT as Lp, isProbablyMobile as Ep } from "./index.6QVNoWZY.js";
5
5
  var ls = { exports: {} }, Ip = ls.exports, on;
6
6
  function Dp() {
7
7
  return on || (on = 1, (function(ke, ne) {
@@ -1,10 +1,10 @@
1
1
  import { jsx as M } from "react/jsx-runtime";
2
- import { n as N, useUserPreferences as O, convertCamelCaseToReadable as P, numberFormatter as R, pluralize as y, ne as L } from "./index.BjpuOtB7.js";
3
- import { BUBBLE_FOOTER_EMPTY as _ } from "./index.CcOFJwqN.js";
2
+ import { n as N, useUserPreferences as O, convertCamelCaseToReadable as P, numberFormatter as R, pluralize as y, ne as L } from "./index.6QVNoWZY.js";
3
+ import { BUBBLE_FOOTER_EMPTY as _ } from "./index.en8Vui5r.js";
4
4
  import w from "clsx";
5
5
  import v, { useState as b, useRef as A, useEffect as U, useContext as B } from "react";
6
- import { ChatContext as G, AsyncBubble as E } from "./App.Bw24TFS-.js";
7
- import { useMarkdown as D } from "./useMarkdown.CskeXXFn.js";
6
+ import { ChatContext as G, AsyncBubble as E } from "./App.DFkumxrG.js";
7
+ import { useMarkdown as D } from "./useMarkdown.DRQL-Q_k.js";
8
8
  const j = 2, q = j * 1e3, x = "", I = (e) => e * (2 - e);
9
9
  function W(e, n = !0) {
10
10
  const [a, p] = b(0), [i, C] = b(0), [t, T] = b(e), r = A(0), s = A(0);
@@ -1,8 +1,8 @@
1
1
  import { jsx as n, Fragment as b, jsxs as A } from "react/jsx-runtime";
2
2
  import { useState as C, useMemo as u, isValidElement as p, useEffect as I } from "react";
3
- import { AsyncBubble as w } from "./App.Bw24TFS-.js";
4
- import { useMarkdown as _ } from "./useMarkdown.CskeXXFn.js";
5
- import { C as M } from "./index.BjpuOtB7.js";
3
+ import { AsyncBubble as w } from "./App.DFkumxrG.js";
4
+ import { useMarkdown as _ } from "./useMarkdown.DRQL-Q_k.js";
5
+ import { C as M } from "./index.6QVNoWZY.js";
6
6
  const R = 200, N = ({
7
7
  string: e,
8
8
  idealLength: r = R
@@ -1,9 +1,9 @@
1
1
  import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
- import { I as g, de as N, Oe as C, INFINITE_SCROLL_THRESHOLD as A, CARDS as E, pluralize as y, te as p, numberFormatter as k, ue as b, isProbablyMobile as D, y as U, i$1 as B, E as I } from "./index.BjpuOtB7.js";
3
- import { st as u, p$1 as P, z as L, p$2 as V } from "./App.Bw24TFS-.js";
2
+ import { I as g, de as N, Oe as C, INFINITE_SCROLL_THRESHOLD as A, CARDS as E, pluralize as y, te as p, numberFormatter as k, ue as b, isProbablyMobile as D, y as U, i$1 as B, E as I } from "./index.6QVNoWZY.js";
3
+ import { st as u, p$1 as P, z as L, p$2 as V } from "./App.DFkumxrG.js";
4
4
  import h from "clsx";
5
5
  import { Fragment as $ } from "react";
6
- import { j as _, D as H, G as M, H as Y, U as F, M as a, F as f, l as G } from "./Table.BLNonpLk.js";
6
+ import { j as _, D as H, G as M, H as Y, U as F, M as a, F as f, l as G } from "./Table.CGJz3l0P.js";
7
7
  const K = ({
8
8
  className: c,
9
9
  viewBox: l,
@@ -1,6 +1,6 @@
1
1
  import { jsxs as n, jsx as t, Fragment as Q } from "react/jsx-runtime";
2
- import { I as Z, n as P, INFINITE_SCROLL_LIMIT as G, INFINITE_SCROLL_THRESHOLD as ee, LOCAL_STORAGE_PREFIX as y, LOCAL_STORAGE_SORT_TIMESTAMP as te, LOCAL_STORAGE_SORT_TOKEN_USAGE as re, LOCAL_STORAGE_SORT as ae, de as L, useUserPreferences as se, APP_CLASSNAME as oe, mutateCall as b, SERVICE_TYPES as x, setNewProvider as ie, ACTION_SORT as ne, Oe as ce, TOAST_CHAT_DELETED as le, TOAST_PROVIDER_CHANGED as de, useChatsHistory as he, LOCAL_STORAGE_SEARCH as me, LOCAL_STORAGE_FAVORITES_ONLY as ue, HISTORY_TITLE as Ce, S as Se, Y as pe, debounce as Te, C as fe, ACTION_SEARCH as ye } from "./index.BjpuOtB7.js";
3
- import { HistoryContext as z, ChatContext as M, useAiChat as Ee, E, e as m, ConfirmationPanel as ge, LazyToastContainerWrapper as Ae, showErrorToast as _e, CHAT_SET_PROVIDER as Oe, showSuccessToast as De, CHAT_SET_STATUS as ve, se as Le, O as Re } from "./App.Bw24TFS-.js";
2
+ import { I as Z, n as P, INFINITE_SCROLL_LIMIT as G, INFINITE_SCROLL_THRESHOLD as ee, LOCAL_STORAGE_PREFIX as y, LOCAL_STORAGE_SORT_TIMESTAMP as te, LOCAL_STORAGE_SORT_TOKEN_USAGE as re, LOCAL_STORAGE_SORT as ae, de as L, useUserPreferences as se, APP_CLASSNAME as oe, mutateCall as b, SERVICE_TYPES as x, setNewProvider as ie, ACTION_SORT as ne, Oe as ce, TOAST_CHAT_DELETED as le, TOAST_PROVIDER_CHANGED as de, useChatsHistory as he, LOCAL_STORAGE_SEARCH as me, LOCAL_STORAGE_FAVORITES_ONLY as ue, HISTORY_TITLE as Ce, S as Se, Y as pe, debounce as Te, C as fe, ACTION_SEARCH as ye } from "./index.6QVNoWZY.js";
3
+ import { HistoryContext as z, ChatContext as M, useAiChat as Ee, E, e as m, ConfirmationPanel as ge, LazyToastContainerWrapper as Ae, showErrorToast as _e, CHAT_SET_PROVIDER as Oe, showSuccessToast as ve, CHAT_SET_STATUS as De, oe as Le, O as Re } from "./App.DFkumxrG.js";
4
4
  import { useRef as H, useState as F, useContext as R, useCallback as ke, useEffect as U, Suspense as Ie, lazy as we } from "react";
5
5
  const Ne = ({
6
6
  className: l,
@@ -31,7 +31,7 @@ const Ne = ({
31
31
  ), be = we(
32
32
  () => import(
33
33
  /* webpackChunkName: "history-table" */
34
- "./ChatHistoryTable.BB5ESpr2.js"
34
+ "./ChatHistoryTable.9NfCFVTm.js"
35
35
  ).then((l) => ({ default: l.ChatHistoryTable }))
36
36
  ), xe = ({
37
37
  filteredHistory: l,
@@ -53,7 +53,7 @@ const Ne = ({
53
53
  state: { provider: f },
54
54
  setChatId: w,
55
55
  setInitialMessages: _
56
- } = R(M), { setInput: N } = Ee(), [O, D] = E({
56
+ } = R(M), { setInput: N } = Ee(), [O, v] = E({
57
57
  key: y + te,
58
58
  initialValue: m.DESC
59
59
  }), [s, B] = E({
@@ -67,20 +67,20 @@ const Ne = ({
67
67
  getAccessToken: C
68
68
  }), $ = (e) => {
69
69
  const a = i.sortedCell === e;
70
- let r, v;
70
+ let r, D;
71
71
  switch (e) {
72
72
  case L:
73
- v = D, r = a ? i.sortDirection : O;
73
+ D = v, r = a ? i.sortDirection : O;
74
74
  break;
75
75
  case ce:
76
- v = B, r = a ? i.sortDirection : s;
76
+ D = B, r = a ? i.sortDirection : s;
77
77
  break;
78
78
  default:
79
- v = D, r = a ? i.sortDirection : O;
79
+ D = v, r = a ? i.sortDirection : O;
80
80
  break;
81
81
  }
82
82
  const V = r === m.ASC ? m.DESC : m.ASC;
83
- v(V), Y(e), A({
83
+ D(V), Y(e), A({
84
84
  type: ne,
85
85
  payload: {
86
86
  sortedCell: e,
@@ -121,13 +121,13 @@ const Ne = ({
121
121
  payload: {
122
122
  provider: r.data.provider
123
123
  }
124
- }), j(), await De(
124
+ }), j(), await ve(
125
125
  `${de} ${r.data.provider}`,
126
126
  {
127
127
  containerId: "toggle-provider"
128
128
  }
129
129
  )), h({
130
- type: ve,
130
+ type: De,
131
131
  payload: {
132
132
  restoring: !0,
133
133
  restoredModel: r.data?.model || "",
@@ -244,7 +244,7 @@ const Ne = ({
244
244
  _(s.target.value.trim());
245
245
  }, 500), O = async (s) => {
246
246
  s.preventDefault();
247
- }, D = (s) => {
247
+ }, v = (s) => {
248
248
  w(s);
249
249
  };
250
250
  return /* @__PURE__ */ n(
@@ -289,7 +289,7 @@ const Ne = ({
289
289
  {
290
290
  name: "favorites-only",
291
291
  checked: f,
292
- onChange: D,
292
+ onChange: v,
293
293
  label: "Show favorites only",
294
294
  narrow: !0,
295
295
  noBorder: !0
@@ -310,7 +310,7 @@ const Ne = ({
310
310
  ] })
311
311
  }
312
312
  ),
313
- /* @__PURE__ */ n("div", { className: "flex flex-col sm:flex-row max-h-[75vh] min-h-[60vh]", children: [
313
+ /* @__PURE__ */ n("div", { className: "flex flex-col sm:flex-row max-h-[65vh] sm:max-h-[75vh] min-h-[60vh]", children: [
314
314
  i && /* @__PURE__ */ t("p", { className: "m-0", children: "Loading..." }),
315
315
  A && /* @__PURE__ */ t("p", { className: "m-0 text-red-500", children: "Failed to load history." }),
316
316
  !i && !A && /* @__PURE__ */ t(
@@ -1,6 +1,6 @@
1
1
  import { jsxs as t, Fragment as m, jsx as e } from "react/jsx-runtime";
2
- import { se as h } from "./App.Bw24TFS-.js";
3
- import { n as S, i as R, S as a, renderDataAsList as N, CARDS as r, it as P, isTauri as u, te as T, l as E, L as p, j as l, PROFILE_TITLE as C } from "./index.BjpuOtB7.js";
2
+ import { oe as h } from "./App.DFkumxrG.js";
3
+ import { n as S, i as R, S as a, renderDataAsList as N, CARDS as r, it as P, isTauri as u, te as T, l as E, L as p, j as l, PROFILE_TITLE as C } from "./index.6QVNoWZY.js";
4
4
  const A = () => {
5
5
  const { isAuthenticated: n, user: i, registeringForPasskey: o, authenticationType: c } = S(), d = R(), s = i?.username || "";
6
6
  return n && s ? /* @__PURE__ */ t(m, { children: [
@@ -0,0 +1,430 @@
1
+ import { jsxs as s, Fragment as q, jsx as a } from "react/jsx-runtime";
2
+ import { n as de, useUserPreferences as me, Re as he, getCacheInfo as ue, isServiceWorkerEnabled as pe, SETTINGS_TITLE as fe, S as m, CARDS as l, C as E, le as ge, PROMPTS_DESCRIPTION as Se, L as Ne, j as J, getCurrentGeoLocation as Ee, mutateCall as K, handleServiceWorkerToggle as Te, SERVICE_TYPES as Q } from "./index.6QVNoWZY.js";
3
+ import { useCapability as Ce, oe as ke, O as i } from "./App.DFkumxrG.js";
4
+ import { me as X, UserMemoriesPanel as be } from "./UserMemoriesPanel.C2262GRv.js";
5
+ import { useState as r, useCallback as Ie, useEffect as Z } from "react";
6
+ const Me = ({
7
+ open: ee,
8
+ onOpenChange: v
9
+ }) => {
10
+ const { getAccessToken: T, user: C } = de(), {
11
+ data: t,
12
+ isSuccess: ae,
13
+ refetch: L
14
+ } = me({
15
+ user: C?.username,
16
+ getAccessToken: T
17
+ }), [x, f] = r({
18
+ loadingLocation: !1
19
+ }), [k, M] = r({
20
+ prompts: []
21
+ }), [P, D] = r(""), [_, g] = r(""), [O, B] = r(!1), [b, R] = r(!1), [S, A] = r(!1), [N, G] = r(!1), [h, U] = r(null), [W, z] = r(!1), [$, j] = r(!1), [te, H] = r(!1), Y = Ce(he.TOOL.MEMORIES), oe = (e) => {
22
+ j(e);
23
+ }, se = (e) => {
24
+ B(e);
25
+ }, re = (e) => {
26
+ Y && R(e);
27
+ }, ne = (e) => {
28
+ G(e);
29
+ }, ce = async (e) => {
30
+ e.preventDefault();
31
+ try {
32
+ await K({
33
+ accessToken: await T(),
34
+ type: Q.SET_USER_PREFERENCES,
35
+ params: {
36
+ user: C?.username,
37
+ instructions: P,
38
+ location: _,
39
+ provider: t?.provider,
40
+ tags: k.prompts,
41
+ sendOnEnter: O,
42
+ useMemory: b,
43
+ showDetails: $
44
+ }
45
+ }), N !== S && (await Te(N), A(N)), L(), f({
46
+ loadingLocation: !1
47
+ });
48
+ } catch {
49
+ }
50
+ }, le = async () => {
51
+ f({
52
+ loadingLocation: !0
53
+ }), g("...");
54
+ try {
55
+ const e = Date.now(), o = await Ee(), u = await K({
56
+ accessToken: await T(),
57
+ type: Q.GET_LOCATION,
58
+ params: {
59
+ latitude: o.latitude,
60
+ longitude: o.longitude
61
+ }
62
+ }), d = Date.now() - e;
63
+ if (d < 2e3 && await new Promise((n) => setTimeout(n, 2e3 - d)), u.status === 200) {
64
+ const { city: n, state: c, country: p, displayName: w } = u.data, ie = n && c && p ? `${n}, ${c}, ${p}` : w;
65
+ f({
66
+ loadingLocation: !1
67
+ }), g(ie);
68
+ } else
69
+ f({
70
+ loadingLocation: !1
71
+ });
72
+ } catch {
73
+ }
74
+ }, F = () => {
75
+ L(), v(!1);
76
+ }, I = ({
77
+ enabled: e = !1,
78
+ privateChat: o = !1,
79
+ clipboardAccess: u = !1,
80
+ ...y
81
+ }) => {
82
+ M((d) => {
83
+ const n = d.prompts, c = {
84
+ ...y,
85
+ enabled: e,
86
+ privateChat: o,
87
+ clipboardAccess: u
88
+ };
89
+ u ? c.content = c.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : c.content = c.content.replace(/{{clipboard}}/g, "");
90
+ const p = n.findIndex((w) => w.slot === y.slot);
91
+ return p === -1 ? {
92
+ ...d,
93
+ prompts: [...n, { ...c }]
94
+ } : (n[p] = c, {
95
+ ...d,
96
+ prompts: [...n]
97
+ });
98
+ });
99
+ }, V = Ie(async () => {
100
+ try {
101
+ z(!0);
102
+ const e = await ue();
103
+ U(e);
104
+ } catch {
105
+ } finally {
106
+ z(!1);
107
+ }
108
+ }, []);
109
+ return Z(() => {
110
+ if (!t)
111
+ return;
112
+ t.instructions && D(t.instructions), t.location && g(t.location), t.tags && M({ prompts: t.tags }), t.sendOnEnter !== void 0 && B(t.sendOnEnter), t.useMemory !== void 0 && R(t.useMemory), t.showDetails !== void 0 && j(t.showDetails);
113
+ const e = pe();
114
+ A(e), G(e);
115
+ }, [t]), Z(() => {
116
+ S ? V() : U(null);
117
+ }, [S, V]), ae ? /* @__PURE__ */ s(q, { children: [
118
+ /* @__PURE__ */ s(
119
+ ke,
120
+ {
121
+ open: ee,
122
+ onOpenChange: F,
123
+ title: fe,
124
+ animation: !0,
125
+ animationType: "fade",
126
+ footer: /* @__PURE__ */ s(
127
+ Ne,
128
+ {
129
+ columnGap: 2,
130
+ alignHorizontal: "flex-end",
131
+ className: "pb-8 sm:pb-0",
132
+ children: [
133
+ /* @__PURE__ */ a(J, { children: /* @__PURE__ */ a(
134
+ E,
135
+ {
136
+ mode: "dark",
137
+ variant: "secondary",
138
+ focusMode: "light",
139
+ noBorder: !0,
140
+ onClick: F,
141
+ children: "Cancel"
142
+ }
143
+ ) }),
144
+ /* @__PURE__ */ a(J, { children: /* @__PURE__ */ a(
145
+ E,
146
+ {
147
+ mode: "dark",
148
+ focusMode: "light",
149
+ onClick: async (e) => {
150
+ v(!1), await ce(e);
151
+ },
152
+ children: "Save"
153
+ }
154
+ ) })
155
+ ]
156
+ }
157
+ ),
158
+ children: [
159
+ /* @__PURE__ */ s(
160
+ m,
161
+ {
162
+ header: l.SETTINGS_DETAILS.TITLE,
163
+ className: "prose-dark dark:prose-lighter",
164
+ noBorder: !0,
165
+ children: [
166
+ /* @__PURE__ */ a("p", { className: "text-sm", children: l.SETTINGS_DETAILS.DETAILS }),
167
+ /* @__PURE__ */ a(
168
+ i,
169
+ {
170
+ noBorder: !0,
171
+ narrow: !0,
172
+ className: "mt-2",
173
+ label: "Show Message Statistics",
174
+ name: "show-message-statistics",
175
+ onChange: oe,
176
+ checked: $
177
+ }
178
+ ),
179
+ /* @__PURE__ */ a("p", { className: "text-sm mt-5", children: l.SETTINGS_DETAILS.SEND_ON_ENTER }),
180
+ /* @__PURE__ */ a(
181
+ i,
182
+ {
183
+ noBorder: !0,
184
+ narrow: !0,
185
+ className: "mt-2",
186
+ label: "Send Message on Enter",
187
+ name: "send-message-on-enter",
188
+ onChange: se,
189
+ checked: O
190
+ }
191
+ ),
192
+ Y && /* @__PURE__ */ s(q, { children: [
193
+ /* @__PURE__ */ a("p", { className: "text-sm mt-5", children: l.SETTINGS_DETAILS.USE_MEMORY }),
194
+ /* @__PURE__ */ a(
195
+ i,
196
+ {
197
+ noBorder: !0,
198
+ narrow: !0,
199
+ className: "mt-2",
200
+ label: "Use Memory",
201
+ name: "use-memory",
202
+ onChange: re,
203
+ checked: b
204
+ }
205
+ ),
206
+ b && /* @__PURE__ */ a(
207
+ E,
208
+ {
209
+ variant: "secondary",
210
+ noBorder: !0,
211
+ size: "small",
212
+ className: "mt-3",
213
+ onClick: () => H(!0),
214
+ children: "Manage Memories"
215
+ }
216
+ )
217
+ ] })
218
+ ]
219
+ }
220
+ ),
221
+ /* @__PURE__ */ s(
222
+ m,
223
+ {
224
+ header: "Custom Instructions",
225
+ className: "prose-dark dark:prose-lighter mt-4",
226
+ noBorder: !0,
227
+ children: [
228
+ /* @__PURE__ */ s("p", { className: "text-sm", children: [
229
+ "What would you like ",
230
+ /* @__PURE__ */ a("em", { children: ge }),
231
+ " to know about you to provide better responses?"
232
+ ] }),
233
+ /* @__PURE__ */ a(
234
+ X,
235
+ {
236
+ mode: "alt-system",
237
+ autoCapitalize: "off",
238
+ autoComplete: "off",
239
+ autoCorrect: "off",
240
+ name: "customInstructions",
241
+ label: "Custom Instructions",
242
+ value: P,
243
+ onChange: (e) => {
244
+ D(e.target.value);
245
+ },
246
+ helperText: "Press ENTER to add a new line."
247
+ }
248
+ )
249
+ ]
250
+ }
251
+ ),
252
+ /* @__PURE__ */ s(
253
+ m,
254
+ {
255
+ header: "Location",
256
+ className: "prose-dark dark:prose-lighter mt-4",
257
+ noBorder: !0,
258
+ children: [
259
+ /* @__PURE__ */ a("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
260
+ /* @__PURE__ */ a(
261
+ X,
262
+ {
263
+ mode: "alt-system",
264
+ name: "location",
265
+ label: "Location",
266
+ value: _,
267
+ onChange: (e) => {
268
+ g(e.target.value);
269
+ },
270
+ helperText: "Enter your location or press auto-detect."
271
+ }
272
+ ),
273
+ /* @__PURE__ */ a(
274
+ E,
275
+ {
276
+ className: "mt-2",
277
+ size: "small",
278
+ noBorder: !0,
279
+ variant: "secondary",
280
+ disabled: x.loadingLocation,
281
+ onClick: le,
282
+ children: x.loadingLocation ? "Detecting..." : "Auto-detect"
283
+ }
284
+ )
285
+ ]
286
+ }
287
+ ),
288
+ /* @__PURE__ */ s(
289
+ m,
290
+ {
291
+ header: l.SETTINGS_PROMPTS.TITLE,
292
+ className: "prose-dark dark:prose-lighter mt-4",
293
+ noBorder: !0,
294
+ children: [
295
+ /* @__PURE__ */ a("p", { className: "text-sm", children: Se }),
296
+ k.prompts && k.prompts.slice(0, 3).map((e) => /* @__PURE__ */ s(
297
+ m,
298
+ {
299
+ mode: "dark",
300
+ noBorder: !0,
301
+ header: e.label.replace("...", ""),
302
+ className: "prose-light mb-2",
303
+ children: [
304
+ /* @__PURE__ */ a("p", { className: "text-sm", children: e.description }),
305
+ /* @__PURE__ */ a(
306
+ i,
307
+ {
308
+ noBorder: !0,
309
+ narrow: !0,
310
+ mode: "dark",
311
+ focusMode: "light",
312
+ className: "mt-2",
313
+ label: "Enabled",
314
+ name: e.slot.toString(),
315
+ onChange: (o) => {
316
+ I({
317
+ ...e,
318
+ enabled: o
319
+ });
320
+ },
321
+ checked: e.enabled
322
+ }
323
+ ),
324
+ /* @__PURE__ */ a(
325
+ i,
326
+ {
327
+ noBorder: !0,
328
+ narrow: !0,
329
+ mode: "dark",
330
+ focusMode: "light",
331
+ className: "mt-2",
332
+ label: "Private Chat",
333
+ name: `private-${e.slot.toString()}`,
334
+ onChange: (o) => {
335
+ I({
336
+ ...e,
337
+ privateChat: o
338
+ });
339
+ },
340
+ checked: e.privateChat
341
+ }
342
+ ),
343
+ /* @__PURE__ */ a(
344
+ i,
345
+ {
346
+ noBorder: !0,
347
+ narrow: !0,
348
+ mode: "dark",
349
+ focusMode: "light",
350
+ className: "mt-2",
351
+ label: "Use Clipboard",
352
+ name: `clipboard-${e.slot.toString()}`,
353
+ onChange: (o) => {
354
+ I({
355
+ ...e,
356
+ clipboardAccess: o
357
+ });
358
+ },
359
+ checked: e.clipboardAccess
360
+ }
361
+ )
362
+ ]
363
+ },
364
+ `prompt-slot-${e.slot}`
365
+ ))
366
+ ]
367
+ }
368
+ ),
369
+ /* @__PURE__ */ s(
370
+ m,
371
+ {
372
+ header: l.SETTINGS_CACHING.TITLE,
373
+ className: "prose-dark dark:prose-lighter mt-4 ",
374
+ noBorder: !0,
375
+ children: [
376
+ /* @__PURE__ */ a("p", { className: "text-sm", children: l.SETTINGS_CACHING.DESCRIPTION }),
377
+ /* @__PURE__ */ a(
378
+ i,
379
+ {
380
+ noBorder: !0,
381
+ narrow: !0,
382
+ className: "mt-2",
383
+ label: "Enable Assets Caching",
384
+ name: "enable-service-worker",
385
+ onChange: ne,
386
+ checked: N
387
+ }
388
+ ),
389
+ S && /* @__PURE__ */ s("div", { className: "mt-4 p-3 border border-dashed border-neutral-700 dark:border-neutral-400 rounded @container/optimizations", children: [
390
+ /* @__PURE__ */ a("h3", { className: "m-0 mb-2 text-xs uppercase opacity-70", children: "Cache Info" }),
391
+ h ? /* @__PURE__ */ s("div", { className: "text-xs space-y-2", children: [
392
+ /* @__PURE__ */ s("p", { className: "m-0", children: [
393
+ "Version: ",
394
+ /* @__PURE__ */ a("strong", { children: h.version })
395
+ ] }),
396
+ /* @__PURE__ */ s("p", { className: "m-0", children: [
397
+ "Total Items: ",
398
+ /* @__PURE__ */ a("strong", { children: h.totalItems })
399
+ ] }),
400
+ h.caches.map((e) => /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: e.urls.map((o) => /* @__PURE__ */ a(
401
+ "li",
402
+ {
403
+ className: "truncate text-xs text-copy-dark dark:text-copy-light overflow-hidden text-ellipsis",
404
+ title: o,
405
+ children: new URL(o).pathname
406
+ },
407
+ o
408
+ )) }) }, e.name)),
409
+ h.totalItems === 0 && !W && /* @__PURE__ */ a("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
410
+ ] }) : /* @__PURE__ */ a("p", { className: "text-xs opacity-70 m-0", children: W ? "Loading cache info..." : "No cache info available." })
411
+ ] })
412
+ ]
413
+ }
414
+ )
415
+ ]
416
+ }
417
+ ),
418
+ /* @__PURE__ */ a(
419
+ be,
420
+ {
421
+ open: te,
422
+ onOpenChange: H,
423
+ user: C?.username
424
+ }
425
+ )
426
+ ] }) : null;
427
+ };
428
+ export {
429
+ Me as SettingsPanel
430
+ };
@@ -1,8 +1,8 @@
1
1
  import { jsxs as _, jsx as r } from "react/jsx-runtime";
2
- import { I as f, b as v } from "./index.BjpuOtB7.js";
2
+ import { I as f, b as v } from "./index.6QVNoWZY.js";
3
3
  import C, { useContext as b } from "react";
4
4
  import o from "clsx";
5
- import { e as k } from "./App.Bw24TFS-.js";
5
+ import { e as k } from "./App.DFkumxrG.js";
6
6
  const A = ({
7
7
  className: e,
8
8
  viewBox: a,
@@ -1,10 +1,10 @@
1
1
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import { n as f, i as U, useUserChatStats as v, useChatsUsage as E, USAGE_TITLE as L, S as h, renderDataAsList as M, CARDS as n, L as _, j as D, C as m, pluralize as i } from "./index.BjpuOtB7.js";
3
- import { se as z } from "./App.Bw24TFS-.js";
2
+ import { n as f, i as U, useUserChatStats as v, useChatsUsage as E, USAGE_TITLE as L, S as h, renderDataAsList as M, CARDS as n, L as _, j as D, C as m, pluralize as i } from "./index.6QVNoWZY.js";
3
+ import { oe as z } from "./App.DFkumxrG.js";
4
4
  import { useState as O, Suspense as P, lazy as B } from "react";
5
5
  const t = [0, 3, 6, 9], j = B(() => import(
6
6
  /* webpackChunkName: "LazyChart" */
7
- "./Chart.Cddg0IXQ.js"
7
+ "./Chart.DyiU5Qev.js"
8
8
  )), b = ({
9
9
  open: S,
10
10
  onOpenChange: I