@versini/sassysaint 8.61.3 → 8.62.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 (25) hide show
  1. package/dist/chunks/{AboutChangelog.BAx1HqFg.js → AboutChangelog.Bcp6_JXd.js} +2 -2
  2. package/dist/chunks/{AboutEntry.BxOSZ9Zn.js → AboutEntry.DVBUjCJk.js} +7 -7
  3. package/dist/chunks/{App.rQbSKvZ3.js → App.DL4IaJKE.js} +17 -20
  4. package/dist/chunks/{Chart.Dj64lK_N.js → Chart.COg_T_AO.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.DrDq6NyF.js → ChatBubbleAssistant.Bde_BKC8.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.C9mGRscp.js → ChatBubbleUser.CylWmaAk.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.BlfO2pn7.js → ChatHistoryTable.DwiAf2iK.js} +3 -3
  8. package/dist/chunks/{HistoryEntry.D6wETXAB.js → HistoryEntry.1J_Lw9HH.js} +3 -3
  9. package/dist/chunks/{ProfileEntry.BkNCg9RV.js → ProfileEntry.B7sOPbBh.js} +2 -2
  10. package/dist/chunks/SettingsEntry.fBAXDI0G.js +777 -0
  11. package/dist/chunks/{Table.BlbxuxDe.js → Table.DECiK51P.js} +2 -2
  12. package/dist/chunks/{UsageEntry.Mu8PQ0UR.js → UsageEntry.BnQ-62s3.js} +3 -3
  13. package/dist/chunks/{UserMemoriesPanel.wX3eDJpK.js → UserMemoriesPanel.DGqSP95i.js} +3 -3
  14. package/dist/chunks/{index.GWzy3bHo.js → index.Bt79QV0P.js} +1 -1
  15. package/dist/chunks/{index.BJWpr4PY.js → index.BxeCb1YH.js} +3 -3
  16. package/dist/chunks/{index.BDp4lUob.js → index.Cj-3H--g.js} +2 -2
  17. package/dist/chunks/{index.7KZcTWqp.js → index.CpgcMuF-.js} +1 -1
  18. package/dist/chunks/{index.BuMpzx4r.js → index.DZQCXS_u.js} +1 -1
  19. package/dist/chunks/{index.ENZu2o5O.js → index.DuFPaE4g.js} +1 -1
  20. package/dist/chunks/{index.Dk2MVovf.js → index.IGrBIWZE.js} +1 -1
  21. package/dist/chunks/{useMarkdown.CaiQ1WFj.js → useMarkdown.DfDymT8d.js} +6 -6
  22. package/dist/components/SassySaint/SassySaint.js +1 -1
  23. package/dist/index.js +4 -4
  24. package/package.json +3 -3
  25. package/dist/chunks/SettingsEntry.DrOPbOB2.js +0 -799
@@ -0,0 +1,777 @@
1
+ import { jsxs as u, jsx as r, Fragment as ue } from "react/jsx-runtime";
2
+ import { o as ke, h as me, i as Ee, x as Ne, n as Te, useUserPreferences as we, Pe as he, getCacheInfo as ve, isServiceWorkerEnabled as Se, SETTINGS_TITLE as Ce, S as V, CARDS as C, _e as Ie, C as le, PROMPTS_DESCRIPTION as _e, L as Le, j as pe, getCurrentGeoLocation as Re, mutateCall as fe, handleServiceWorkerToggle as Ae, SERVICE_TYPES as ge } from "./index.Bt79QV0P.js";
3
+ import { useCapability as ye, oe as De, O as I } from "./App.DL4IaJKE.js";
4
+ import Oe, { useState as d, useEffect as ie, useRef as $, useLayoutEffect as J, useCallback as Me } from "react";
5
+ import p from "clsx";
6
+ function Be({
7
+ value: a,
8
+ defaultValue: n,
9
+ finalValue: o,
10
+ onChange: s = () => {
11
+ },
12
+ initialControlledDelay: t = 0
13
+ }) {
14
+ const [c, m] = d(!1), [f, k] = d(
15
+ n !== void 0 ? n : o
16
+ ), N = (x) => {
17
+ k(x), s?.(x);
18
+ };
19
+ return ie(() => {
20
+ (async () => a !== void 0 && !c && t > 0 && (await new Promise(
21
+ (x) => setTimeout(x, t)
22
+ ), m(!0)))();
23
+ }, [a, t, c]), a !== void 0 ? !c && t > 0 ? ["", s, !0] : [a, s, !0] : [f, N, !1];
24
+ }
25
+ const xe = "av-text-area", Pe = "av-text-area-wrapper", ce = "av-text-area-helper-text", Ge = "av-text-area__control--right", Ue = "av-text-area__control--left", He = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Ve = ({ mode: a }) => p({
26
+ "bg-surface-darker text-copy-lighter caret-copy-light": a === "dark",
27
+ "bg-surface-lighter text-copy-dark caret-copy-dark": a === "light",
28
+ "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": a === "system",
29
+ "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": a === "alt-system"
30
+ }), $e = ({
31
+ focusMode: a
32
+ }) => p("focus:outline focus:outline-2 focus:outline-offset-2", {
33
+ "focus:outline-focus-dark": a === "dark",
34
+ "focus:outline-focus-light": a === "light",
35
+ "focus:outline-focus-light dark:focus:outline-focus-dark": a === "alt-system",
36
+ "focus:outline-focus-dark dark:focus:outline-focus-light": a === "system"
37
+ }), We = ({
38
+ noBorder: a,
39
+ error: n
40
+ }) => p("border-2", {
41
+ "border-border-dark": !a && !n,
42
+ "focus:border-border-dark": !a && n,
43
+ "border-border-error-dark": !a && n,
44
+ "border-transparent": a
45
+ }), ze = ({
46
+ disabled: a,
47
+ raw: n,
48
+ error: o,
49
+ mode: s,
50
+ leftElement: t,
51
+ rightElement: c
52
+ }) => {
53
+ if (n)
54
+ return "";
55
+ if (a)
56
+ return p(
57
+ "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
58
+ {
59
+ "translate-x-[10px]": c === !0 && !t || !c && !t
60
+ }
61
+ );
62
+ if (!o)
63
+ return p(
64
+ "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
65
+ {
66
+ "translate-x-[10px]": c === !0 && !t || !c && !t,
67
+ "text-copy-medium": s === "dark",
68
+ "text-copy-dark": s === "light",
69
+ "text-copy-dark dark:text-copy-medium": s === "system",
70
+ "text-copy-medium dark:text-copy-dark": s === "alt-system"
71
+ }
72
+ );
73
+ if (o)
74
+ return p(
75
+ "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
76
+ {
77
+ "translate-x-[10px]": c === !0 && !t || !c && !t,
78
+ "text-copy-medium": s === "dark",
79
+ "text-copy-error-dark": s === "light",
80
+ "text-copy-error-dark dark:text-copy-error-light": s === "system",
81
+ "text-copy-medium dark:text-copy-error-dark": s === "alt-system"
82
+ }
83
+ );
84
+ }, Fe = ({
85
+ error: a,
86
+ raw: n,
87
+ mode: o,
88
+ disabled: s
89
+ }) => {
90
+ if (n)
91
+ return "";
92
+ if (s)
93
+ return p(
94
+ ce,
95
+ "absolute px-2 cursor-not-allowed opacity-50 font-medium"
96
+ );
97
+ if (!a)
98
+ return p(ce, "absolute px-2 font-medium", {
99
+ "text-copy-medium": o === "dark",
100
+ "text-copy-dark": o === "light",
101
+ "text-copy-dark dark:text-copy-medium": o === "system",
102
+ "text-copy-medium dark:text-copy-dark": o === "alt-system"
103
+ });
104
+ if (a)
105
+ return p(ce, "absolute px-2 font-medium", {
106
+ "text-copy-error-light": o === "dark",
107
+ "text-copy-error-dark": o === "light",
108
+ "text-copy-error-dark dark:text-copy-error-light": o === "system",
109
+ "dark:text-copy-error-dark text-copy-error-light": o === "alt-system"
110
+ });
111
+ }, je = ({
112
+ className: a,
113
+ textAreaClassName: n,
114
+ raw: o,
115
+ focusMode: s,
116
+ disabled: t,
117
+ noBorder: c,
118
+ error: m,
119
+ mode: f,
120
+ leftElement: k,
121
+ rightElement: N
122
+ }) => {
123
+ const x = o ? a : p(
124
+ "relative flex w-full flex-col justify-center",
125
+ Pe,
126
+ a
127
+ ), _ = o ? p(n) : p(
128
+ xe,
129
+ n,
130
+ He(),
131
+ Ve({ mode: f }),
132
+ $e({ focusMode: s }),
133
+ We({
134
+ noBorder: c,
135
+ error: m
136
+ }),
137
+ {
138
+ "disabled:cursor-not-allowed disabled:opacity-50": t
139
+ }
140
+ ), P = o ? void 0 : "sr-only", G = ze({
141
+ disabled: t,
142
+ raw: o,
143
+ error: m,
144
+ mode: f,
145
+ rightElement: N,
146
+ leftElement: k
147
+ }), h = Fe({
148
+ error: m,
149
+ raw: o,
150
+ mode: f,
151
+ disabled: t
152
+ }), v = o ? void 0 : p(Ge, "absolute"), b = o ? void 0 : p(Ue, "absolute");
153
+ return {
154
+ wrapper: x,
155
+ textArea: _,
156
+ accessibleLabel: P,
157
+ visibleLabel: G,
158
+ helperText: h,
159
+ rightElement: v,
160
+ leftElement: b
161
+ };
162
+ }, Xe = ({
163
+ scrollHeight: a,
164
+ currentHeight: n,
165
+ currentLabelOffset: o = 0,
166
+ currentHelperTextOffset: s = 0
167
+ }) => {
168
+ let t, c;
169
+ if (a > 0 && a !== n) {
170
+ const m = a - n, f = Math.abs(m / 24);
171
+ t = o + -1 * Math.sign(m) * (12 * f), c = s + Math.sign(m) * (12 * f);
172
+ }
173
+ return {
174
+ labelOffset: t,
175
+ helperTextOffset: c,
176
+ scrollHeight: a
177
+ };
178
+ }, de = Oe.forwardRef(
179
+ ({
180
+ id: a,
181
+ name: n,
182
+ label: o,
183
+ error: s = !1,
184
+ raw: t = !1,
185
+ className: c,
186
+ textAreaClassName: m,
187
+ mode: f = "system",
188
+ focusMode: k = "system",
189
+ value: N,
190
+ defaultValue: x,
191
+ disabled: _ = !1,
192
+ noBorder: P = !1,
193
+ labelId: G,
194
+ helperText: h = "",
195
+ helperTextOnFocus: v = !1,
196
+ rightElement: b,
197
+ leftElement: T,
198
+ onChange: W,
199
+ onFocus: L,
200
+ onBlur: z,
201
+ ...U
202
+ }, K) => {
203
+ const y = $(null), Q = ke([K, y]), [R, A] = me(), [Z, w] = me(), H = $(80), F = $(-25), D = $(null), j = $(30), ee = $(null), O = Ee({ id: a, prefix: `${xe}-` }), [te, ae] = d(0), [re, oe] = d(0), [se, X] = d(
204
+ !!(!v && h)
205
+ ), Y = `${n} error, ${h}`, E = je({
206
+ className: c,
207
+ textAreaClassName: m,
208
+ error: s,
209
+ raw: t,
210
+ focusMode: k,
211
+ disabled: _,
212
+ noBorder: P,
213
+ mode: f,
214
+ rightElement: !!b,
215
+ leftElement: !!T
216
+ }), [e, i] = Be({
217
+ value: N,
218
+ initialControlledDelay: 20,
219
+ defaultValue: x,
220
+ onChange: (l) => {
221
+ W && W({
222
+ target: {
223
+ value: l
224
+ }
225
+ });
226
+ }
227
+ }), M = (l) => {
228
+ i(l.target.value);
229
+ }, q = (l) => {
230
+ v && h && X(!0), L && L(l);
231
+ }, S = (l) => {
232
+ v && h && !e && X(!1), z && z(l);
233
+ };
234
+ return J(() => {
235
+ A && A.width && ae(A.width + 18 + 10);
236
+ }, [A]), J(() => {
237
+ w && w.width && oe(w.width + 18 + 10);
238
+ }, [w]), J(() => {
239
+ t || y && y.current && e !== void 0 && (y.current.style.height = "inherit", y.current.style.height = y.current.scrollHeight + "px");
240
+ }, [e, t]), J(() => {
241
+ t || setTimeout(() => {
242
+ D?.current?.style.setProperty(
243
+ "--av-text-area-wrapper-transition",
244
+ e ? "none" : "all 0.2s ease-out"
245
+ );
246
+ }, 0);
247
+ }, [e, t]), J(() => {
248
+ if (!t && y && y.current && e !== void 0) {
249
+ const { labelOffset: l, helperTextOffset: g, scrollHeight: B } = Xe({
250
+ scrollHeight: y.current.scrollHeight,
251
+ currentHeight: H.current,
252
+ currentLabelOffset: F.current,
253
+ currentHelperTextOffset: j.current
254
+ });
255
+ l && (F.current = l, D?.current?.style.setProperty(
256
+ "--av-text-area-label",
257
+ `${l}px`
258
+ )), g && (j.current = g, ee?.current?.style.setProperty(
259
+ "--av-text-area-helper-text",
260
+ `${g}px`
261
+ )), H.current = B || H.current;
262
+ }
263
+ }, [e, t]), w.width > 0 && D?.current?.style.setProperty(
264
+ "--tw-translate-x",
265
+ `${12 + w.width + 5}px`
266
+ ), /* @__PURE__ */ u("div", { className: E.wrapper, children: [
267
+ /* @__PURE__ */ r(
268
+ "label",
269
+ {
270
+ htmlFor: O,
271
+ id: G,
272
+ className: E.accessibleLabel,
273
+ children: o
274
+ }
275
+ ),
276
+ T && /* @__PURE__ */ r(
277
+ "div",
278
+ {
279
+ ref: Z,
280
+ className: E.leftElement,
281
+ children: T
282
+ }
283
+ ),
284
+ /* @__PURE__ */ r(
285
+ "textarea",
286
+ {
287
+ ref: Q,
288
+ id: O,
289
+ name: n,
290
+ disabled: _,
291
+ placeholder: t ? void 0 : " ",
292
+ className: E.textArea,
293
+ rows: 1,
294
+ ...h && { "aria-describedby": `${O}-helper` },
295
+ ...s && { "aria-invalid": "true" },
296
+ ...b && !T && !t && { style: { paddingRight: te } },
297
+ ...T && !b && !t && { style: { paddingLeft: re } },
298
+ ...b && T && !t && {
299
+ style: {
300
+ paddingRight: te,
301
+ paddingLeft: re
302
+ }
303
+ },
304
+ value: e,
305
+ onChange: M,
306
+ onFocus: q,
307
+ onBlur: S,
308
+ ...U
309
+ }
310
+ ),
311
+ !t && /* @__PURE__ */ r(
312
+ "label",
313
+ {
314
+ ref: D,
315
+ "aria-hidden": !0,
316
+ htmlFor: O,
317
+ className: `${E.visibleLabel}`,
318
+ children: o
319
+ }
320
+ ),
321
+ se && /* @__PURE__ */ r(
322
+ "div",
323
+ {
324
+ ref: ee,
325
+ id: `${O}-helper`,
326
+ className: E.helperText,
327
+ children: h
328
+ }
329
+ ),
330
+ b && /* @__PURE__ */ r(
331
+ "div",
332
+ {
333
+ ref: R,
334
+ className: E.rightElement,
335
+ children: b
336
+ }
337
+ ),
338
+ s && h && /* @__PURE__ */ r(Ne, { politeness: "polite", clearAnnouncementDelay: 500, children: Y })
339
+ ] });
340
+ }
341
+ );
342
+ de.displayName = "TextArea";
343
+ /*!
344
+ @versini/ui-textarea v5.0.2
345
+ © 2025 gizmette.com
346
+ */
347
+ try {
348
+ window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
349
+ version: "5.0.2",
350
+ buildTime: "10/11/2025 07:15 PM EDT",
351
+ homepage: "https://github.com/aversini/ui-components",
352
+ license: "MIT"
353
+ });
354
+ } catch {
355
+ }
356
+ const Ze = ({
357
+ open: a,
358
+ onOpenChange: n
359
+ }) => {
360
+ const { getAccessToken: o, user: s } = Te(), {
361
+ data: t,
362
+ isSuccess: c,
363
+ refetch: m
364
+ } = we({
365
+ user: s?.username,
366
+ getAccessToken: o
367
+ }), [f, k] = d({
368
+ loadingLocation: !1
369
+ }), [N, x] = d({
370
+ prompts: []
371
+ }), [_, P] = d(""), [G, h] = d(""), [v, b] = d(!1), [T, W] = d(!1), [L, z] = d(!1), [U, K] = d(!1), [y, Q] = d(!1), [R, A] = d(null), [Z, w] = d(!1), [H, F] = d(!1), D = ye(he.TOOL.MEMORIES), j = ye(he.ADDON.REASONING), ee = (e) => {
372
+ F(e);
373
+ }, O = (e) => {
374
+ b(e);
375
+ }, te = (e) => {
376
+ D && W(e);
377
+ }, ae = (e) => {
378
+ K(e);
379
+ }, re = (e) => {
380
+ j && Q(e);
381
+ }, oe = async (e) => {
382
+ e.preventDefault();
383
+ try {
384
+ await fe({
385
+ accessToken: await o(),
386
+ type: ge.SET_USER_PREFERENCES,
387
+ params: {
388
+ user: s?.username,
389
+ instructions: _,
390
+ location: G,
391
+ provider: t?.provider,
392
+ tags: N.prompts,
393
+ sendOnEnter: v,
394
+ useMemory: T,
395
+ showDetails: H,
396
+ showReasoningButton: y
397
+ }
398
+ }), U !== L && (await Ae(U), z(U)), m(), k({
399
+ loadingLocation: !1
400
+ });
401
+ } catch {
402
+ }
403
+ }, se = async () => {
404
+ k({
405
+ loadingLocation: !0
406
+ }), h("...");
407
+ try {
408
+ const e = Date.now(), i = await Re(), M = await fe({
409
+ accessToken: await o(),
410
+ type: ge.GET_LOCATION,
411
+ params: {
412
+ latitude: i.latitude,
413
+ longitude: i.longitude
414
+ }
415
+ }), S = Date.now() - e;
416
+ if (S < 2e3 && await new Promise((l) => setTimeout(l, 2e3 - S)), M.status === 200) {
417
+ const { city: l, state: g, country: B, displayName: ne } = M.data, be = l && g && B ? `${l}, ${g}, ${B}` : ne;
418
+ k({
419
+ loadingLocation: !1
420
+ }), h(be);
421
+ } else
422
+ k({
423
+ loadingLocation: !1
424
+ });
425
+ } catch {
426
+ }
427
+ }, X = () => {
428
+ m(), n(!1);
429
+ }, Y = ({
430
+ enabled: e = !1,
431
+ privateChat: i = !1,
432
+ clipboardAccess: M = !1,
433
+ ...q
434
+ }) => {
435
+ x((S) => {
436
+ const l = S.prompts, g = {
437
+ ...q,
438
+ enabled: e,
439
+ privateChat: i,
440
+ clipboardAccess: M
441
+ };
442
+ M ? g.content = g.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : g.content = g.content.replace(/{{clipboard}}/g, "");
443
+ const B = l.findIndex((ne) => ne.slot === q.slot);
444
+ return B === -1 ? {
445
+ ...S,
446
+ prompts: [...l, { ...g }]
447
+ } : (l[B] = g, {
448
+ ...S,
449
+ prompts: [...l]
450
+ });
451
+ });
452
+ }, E = Me(async () => {
453
+ try {
454
+ w(!0);
455
+ const e = await ve();
456
+ A(e);
457
+ } catch {
458
+ } finally {
459
+ w(!1);
460
+ }
461
+ }, []);
462
+ return ie(() => {
463
+ if (!t)
464
+ return;
465
+ t.instructions && P(t.instructions), t.location && h(t.location), t.tags && x({ prompts: t.tags }), t.sendOnEnter !== void 0 && b(t.sendOnEnter), t.useMemory !== void 0 && W(t.useMemory), t.showDetails !== void 0 && F(t.showDetails), t.showReasoningButton !== void 0 && Q(t.showReasoningButton);
466
+ const e = Se();
467
+ z(e), K(e);
468
+ }, [t]), ie(() => {
469
+ L ? E() : A(null);
470
+ }, [L, E]), c ? /* @__PURE__ */ u(
471
+ De,
472
+ {
473
+ open: a,
474
+ onOpenChange: X,
475
+ title: Ce,
476
+ animation: !0,
477
+ animationType: "fade",
478
+ footer: /* @__PURE__ */ u(
479
+ Le,
480
+ {
481
+ columnGap: 2,
482
+ alignHorizontal: "flex-end",
483
+ className: "pb-8 sm:pb-0",
484
+ children: [
485
+ /* @__PURE__ */ r(pe, { children: /* @__PURE__ */ r(
486
+ le,
487
+ {
488
+ mode: "dark",
489
+ variant: "secondary",
490
+ focusMode: "light",
491
+ noBorder: !0,
492
+ onClick: X,
493
+ children: "Cancel"
494
+ }
495
+ ) }),
496
+ /* @__PURE__ */ r(pe, { children: /* @__PURE__ */ r(
497
+ le,
498
+ {
499
+ mode: "dark",
500
+ focusMode: "light",
501
+ onClick: async (e) => {
502
+ n(!1), await oe(e);
503
+ },
504
+ children: "Save"
505
+ }
506
+ ) })
507
+ ]
508
+ }
509
+ ),
510
+ children: [
511
+ /* @__PURE__ */ u(
512
+ V,
513
+ {
514
+ header: C.SETTINGS_DETAILS.TITLE,
515
+ className: "prose-dark dark:prose-lighter",
516
+ noBorder: !0,
517
+ children: [
518
+ /* @__PURE__ */ r("p", { className: "text-sm", children: C.SETTINGS_DETAILS.DETAILS }),
519
+ /* @__PURE__ */ r(
520
+ I,
521
+ {
522
+ noBorder: !0,
523
+ narrow: !0,
524
+ className: "mt-2",
525
+ label: "Show Message Statistics",
526
+ name: "show-message-statistics",
527
+ onChange: ee,
528
+ checked: H
529
+ }
530
+ ),
531
+ /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: C.SETTINGS_DETAILS.SEND_ON_ENTER }),
532
+ /* @__PURE__ */ r(
533
+ I,
534
+ {
535
+ noBorder: !0,
536
+ narrow: !0,
537
+ className: "mt-2",
538
+ label: "Send Message on Enter",
539
+ name: "send-message-on-enter",
540
+ onChange: O,
541
+ checked: v
542
+ }
543
+ ),
544
+ D && /* @__PURE__ */ u(ue, { children: [
545
+ /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: C.SETTINGS_DETAILS.USE_MEMORY }),
546
+ /* @__PURE__ */ r(
547
+ I,
548
+ {
549
+ noBorder: !0,
550
+ narrow: !0,
551
+ className: "mt-2",
552
+ label: "Use Memory",
553
+ name: "use-memory",
554
+ onChange: te,
555
+ checked: T
556
+ }
557
+ )
558
+ ] })
559
+ ]
560
+ }
561
+ ),
562
+ /* @__PURE__ */ u(
563
+ V,
564
+ {
565
+ header: "Custom Instructions",
566
+ className: "prose-dark dark:prose-lighter mt-4",
567
+ noBorder: !0,
568
+ children: [
569
+ /* @__PURE__ */ u("p", { className: "text-sm", children: [
570
+ "What would you like ",
571
+ /* @__PURE__ */ r("em", { children: Ie }),
572
+ " to know about you to provide better responses?"
573
+ ] }),
574
+ /* @__PURE__ */ r(
575
+ de,
576
+ {
577
+ mode: "alt-system",
578
+ autoCapitalize: "off",
579
+ autoComplete: "off",
580
+ autoCorrect: "off",
581
+ name: "customInstructions",
582
+ label: "Custom Instructions",
583
+ value: _,
584
+ onChange: (e) => {
585
+ P(e.target.value);
586
+ },
587
+ helperText: "Press ENTER to add a new line."
588
+ }
589
+ )
590
+ ]
591
+ }
592
+ ),
593
+ /* @__PURE__ */ u(
594
+ V,
595
+ {
596
+ header: "Location",
597
+ className: "prose-dark dark:prose-lighter mt-4",
598
+ noBorder: !0,
599
+ children: [
600
+ /* @__PURE__ */ r("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
601
+ /* @__PURE__ */ r(
602
+ de,
603
+ {
604
+ mode: "alt-system",
605
+ name: "location",
606
+ label: "Location",
607
+ value: G,
608
+ onChange: (e) => {
609
+ h(e.target.value);
610
+ },
611
+ helperText: "Enter your location or press auto-detect."
612
+ }
613
+ ),
614
+ /* @__PURE__ */ r(
615
+ le,
616
+ {
617
+ className: "mt-2",
618
+ size: "small",
619
+ noBorder: !0,
620
+ variant: "secondary",
621
+ disabled: f.loadingLocation,
622
+ onClick: se,
623
+ children: f.loadingLocation ? "Detecting..." : "Auto-detect"
624
+ }
625
+ )
626
+ ]
627
+ }
628
+ ),
629
+ /* @__PURE__ */ u(
630
+ V,
631
+ {
632
+ header: C.SETTINGS_PROMPTS.TITLE,
633
+ className: "prose-dark dark:prose-lighter mt-4",
634
+ noBorder: !0,
635
+ children: [
636
+ /* @__PURE__ */ r("p", { className: "text-sm", children: _e }),
637
+ N.prompts && N.prompts.slice(0, 3).map((e) => /* @__PURE__ */ u(
638
+ V,
639
+ {
640
+ mode: "dark",
641
+ noBorder: !0,
642
+ header: e.label.replace("...", ""),
643
+ className: "prose-light mb-2",
644
+ children: [
645
+ /* @__PURE__ */ r("p", { className: "text-sm", children: e.description }),
646
+ /* @__PURE__ */ r(
647
+ I,
648
+ {
649
+ noBorder: !0,
650
+ narrow: !0,
651
+ mode: "dark",
652
+ focusMode: "light",
653
+ className: "mt-2",
654
+ label: "Enabled",
655
+ name: e.slot.toString(),
656
+ onChange: (i) => {
657
+ Y({
658
+ ...e,
659
+ enabled: i
660
+ });
661
+ },
662
+ checked: e.enabled
663
+ }
664
+ ),
665
+ /* @__PURE__ */ r(
666
+ I,
667
+ {
668
+ noBorder: !0,
669
+ narrow: !0,
670
+ mode: "dark",
671
+ focusMode: "light",
672
+ className: "mt-2",
673
+ label: "Private Chat",
674
+ name: `private-${e.slot.toString()}`,
675
+ onChange: (i) => {
676
+ Y({
677
+ ...e,
678
+ privateChat: i
679
+ });
680
+ },
681
+ checked: e.privateChat
682
+ }
683
+ ),
684
+ /* @__PURE__ */ r(
685
+ I,
686
+ {
687
+ noBorder: !0,
688
+ narrow: !0,
689
+ mode: "dark",
690
+ focusMode: "light",
691
+ className: "mt-2",
692
+ label: "Use Clipboard",
693
+ name: `clipboard-${e.slot.toString()}`,
694
+ onChange: (i) => {
695
+ Y({
696
+ ...e,
697
+ clipboardAccess: i
698
+ });
699
+ },
700
+ checked: e.clipboardAccess
701
+ }
702
+ )
703
+ ]
704
+ },
705
+ `prompt-slot-${e.slot}`
706
+ ))
707
+ ]
708
+ }
709
+ ),
710
+ /* @__PURE__ */ u(
711
+ V,
712
+ {
713
+ header: C.SETTINGS_ADVANCED.TITLE,
714
+ className: "prose-dark dark:prose-lighter mt-4 ",
715
+ noBorder: !0,
716
+ children: [
717
+ j && /* @__PURE__ */ u(ue, { children: [
718
+ /* @__PURE__ */ r("p", { className: "text-sm", children: C.SETTINGS_ADVANCED.REASONING_BUTTON_DESCRIPTION }),
719
+ /* @__PURE__ */ r(
720
+ I,
721
+ {
722
+ noBorder: !0,
723
+ narrow: !0,
724
+ className: "mt-2",
725
+ label: "Show Reasoning Button",
726
+ name: "show-reasoning-button",
727
+ onChange: re,
728
+ checked: y
729
+ }
730
+ )
731
+ ] }),
732
+ /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: C.SETTINGS_ADVANCED.CACHE_DESCRIPTION }),
733
+ /* @__PURE__ */ r(
734
+ I,
735
+ {
736
+ noBorder: !0,
737
+ narrow: !0,
738
+ className: "mt-2",
739
+ label: "Enable Assets Caching",
740
+ name: "enable-service-worker",
741
+ onChange: ae,
742
+ checked: U
743
+ }
744
+ ),
745
+ L && /* @__PURE__ */ u("div", { className: "mt-4 p-3 border border-dashed border-neutral-700 dark:border-neutral-400 rounded @container/optimizations", children: [
746
+ /* @__PURE__ */ r("h3", { className: "m-0 mb-2 text-xs uppercase opacity-70", children: "Cache Info" }),
747
+ R ? /* @__PURE__ */ u("div", { className: "text-xs space-y-2", children: [
748
+ /* @__PURE__ */ u("p", { className: "m-0", children: [
749
+ "Version: ",
750
+ /* @__PURE__ */ r("strong", { children: R.version })
751
+ ] }),
752
+ /* @__PURE__ */ u("p", { className: "m-0", children: [
753
+ "Total Items: ",
754
+ /* @__PURE__ */ r("strong", { children: R.totalItems })
755
+ ] }),
756
+ R.caches.map((e) => /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: e.urls.map((i) => /* @__PURE__ */ r(
757
+ "li",
758
+ {
759
+ className: "truncate text-xs text-copy-dark dark:text-copy-light overflow-hidden text-ellipsis",
760
+ title: i,
761
+ children: new URL(i).pathname
762
+ },
763
+ i
764
+ )) }) }, e.name)),
765
+ R.totalItems === 0 && !Z && /* @__PURE__ */ r("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
766
+ ] }) : /* @__PURE__ */ r("p", { className: "text-xs opacity-70 m-0", children: Z ? "Loading cache info..." : "No cache info available." })
767
+ ] })
768
+ ]
769
+ }
770
+ )
771
+ ]
772
+ }
773
+ ) : null;
774
+ };
775
+ export {
776
+ Ze as SettingsPanel
777
+ };