@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.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as S, jsx as a, Fragment as me } from "react/jsx-runtime";
2
- import { O as Ve, s as Be, S as De, f$1 as $e, M as ze, U as Ue, r as Fe, o as Pe, n as ge, l as Ge, a as W, isLastMessageFromRole as ye, x as fe, CANCEL as je, CLEAR as We, ACTION_RESET as he, ROLE_ASSISTANT as L, ROLE_INTERNAL as X, ROLE_USER as Q, Cr as K, ROLE_SYSTEM as Ye, ROLE_HIDDEN as qe, MODEL_GPT4 as xe, STATS_SEPARATOR as ae, ACTION_MODEL as be, ACTION_MESSAGE as H, TYPE_QUESTION as Je, SEND as Qe, ACTION_STREAMING as ke, ERROR_MESSAGE as Xe, getMessageContaintWrapperClass as Ke, MessagesContainerHeader as Ze, ACTION_SEARCH as er, ACTION_SORT as rr, ACTION_RESTORE as tr, ACTION_LOCATION as _, getCurrentGeoLocation as or, c as sr, AppFooter as ar, LOCAL_STORAGE_PREFIX as Y, LOCAL_STORAGE_SEARCH as nr, LOCAL_STORAGE_SORT as lr, LOCAL_STORAGE_LOCATION as cr } from "./index.DcXJ8skl.js";
3
- import { g as Ce, AppContext as U, restCall as ir, E as q, serviceCall as ne, SERVICE_TYPES as le, HistoryContext as dr, k as ur } from "./useLocalStorage.Cx1iecci.js";
4
- import pr, { useState as R, useEffect as E, useRef as x, useLayoutEffect as D, useContext as Z, lazy as mr, Suspense as ce, useReducer as ie, useCallback as gr } from "react";
2
+ import { O as Ve, s as Be, S as De, f$1 as $e, M as ze, U as Ue, r as Fe, o as Pe, n as ge, l as Ge, a as W, isLastMessageFromRole as ye, x as fe, CANCEL as je, CLEAR as We, ACTION_RESET as he, ROLE_ASSISTANT as L, ROLE_INTERNAL as X, ROLE_USER as Q, Nr as K, ROLE_SYSTEM as Ye, ROLE_HIDDEN as qe, MODEL_GPT4 as xe, STATS_SEPARATOR as ae, ACTION_MODEL as be, ACTION_MESSAGE as H, TYPE_QUESTION as Je, SEND as Qe, ACTION_STREAMING as ke, ERROR_MESSAGE as Xe, getMessageContaintWrapperClass as Ke, MessagesContainerHeader as Ze, ACTION_SEARCH as er, ACTION_SORT as rr, ACTION_RESTORE as tr, ACTION_LOCATION as _, getCurrentGeoLocation as or, c as sr, AppFooter as ar, LOCAL_STORAGE_PREFIX as Y, LOCAL_STORAGE_SEARCH as nr, LOCAL_STORAGE_SORT as lr, LOCAL_STORAGE_LOCATION as cr } from "./index.t9wD3Z9D.js";
3
+ import { g as Ce, AppContext as U, restCall as ir, E as q, serviceCall as ne, SERVICE_TYPES as le, HistoryContext as dr, k as ur } from "./useLocalStorage.DagJSzA9.js";
4
+ import pr, { useState as R, useEffect as N, useRef as x, useLayoutEffect as D, useContext as Z, lazy as mr, Suspense as ce, useReducer as ie, useCallback as gr } from "react";
5
5
  import y from "clsx";
6
6
  const yr = ({
7
7
  className: e,
@@ -104,7 +104,7 @@ const yr = ({
104
104
  const [u, i] = R(!1), h = Cr({ kind: r, className: o, spacing: g }), b = !!n && (typeof n == "function" || typeof n == "string" || typeof e == "string"), k = () => {
105
105
  i(!0), typeof n == "function" ? n(e) : typeof n == "string" ? navigator.clipboard.writeText(n) : typeof e == "string" && navigator.clipboard.writeText(e);
106
106
  };
107
- return E(() => {
107
+ return N(() => {
108
108
  let p;
109
109
  return u && (p = window.setTimeout(() => {
110
110
  i(!1);
@@ -158,14 +158,14 @@ const Sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
158
158
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
159
159
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
160
160
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
161
- }), Er = ({
161
+ }), Nr = ({
162
162
  focusMode: e
163
163
  }) => y("focus:outline focus:outline-2 focus:outline-offset-2", {
164
164
  "focus:outline-focus-dark": e === "dark",
165
165
  "focus:outline-focus-light": e === "light",
166
166
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
167
167
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
168
- }), Nr = ({
168
+ }), Er = ({
169
169
  noBorder: e,
170
170
  error: r
171
171
  }) => y("border-2", {
@@ -245,8 +245,8 @@ const Sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
245
245
  r,
246
246
  Sr(),
247
247
  Ar({ mode: g }),
248
- Er({ focusMode: t }),
249
- Nr({
248
+ Nr({ focusMode: t }),
249
+ Er({
250
250
  noBorder: n,
251
251
  error: l
252
252
  }),
@@ -308,12 +308,12 @@ const Sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
308
308
  helperTextOnFocus: T = !1,
309
309
  rightElement: m,
310
310
  onChange: d,
311
- onFocus: N,
311
+ onFocus: E,
312
312
  onBlur: V,
313
313
  spacing: O,
314
314
  ...Se
315
315
  }, Ae) => {
316
- const v = x(null), Ee = $e([Ae, v]), B = x(null), F = x(80), re = x(-25), M = x(null), te = x(30), P = x(null), I = ze({ id: e, prefix: `${ge}-` }), [Ne, Oe] = R(0), [we, oe] = R(
316
+ const v = x(null), Ne = $e([Ae, v]), B = x(null), F = x(80), re = x(-25), M = x(null), te = x(30), P = x(null), I = ze({ id: e, prefix: `${ge}-` }), [Ee, Oe] = R(0), [we, oe] = R(
317
317
  !!(!T && p)
318
318
  ), Le = `${r} error, ${p}`, w = Lr({
319
319
  className: n,
@@ -338,7 +338,7 @@ const Sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
338
338
  }), Me = (C) => {
339
339
  Re(C.target.value);
340
340
  }, Ie = (C) => {
341
- T && p && oe(!0), N && N(C);
341
+ T && p && oe(!0), E && E(C);
342
342
  }, _e = (C) => {
343
343
  T && p && !A && oe(!1), V && V(C);
344
344
  };
@@ -384,7 +384,7 @@ const Sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
384
384
  /* @__PURE__ */ a(
385
385
  "textarea",
386
386
  {
387
- ref: Ee,
387
+ ref: Ne,
388
388
  id: I,
389
389
  name: r,
390
390
  disabled: h,
@@ -393,7 +393,7 @@ const Sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
393
393
  rows: 1,
394
394
  ...p && { "aria-describedby": `${I}-helper` },
395
395
  ...t && { "aria-invalid": "true" },
396
- ...m && !s && { style: { paddingRight: Ne } },
396
+ ...m && !s && { style: { paddingRight: Ee } },
397
397
  value: A,
398
398
  onChange: Me,
399
399
  onFocus: Ie,
@@ -462,7 +462,7 @@ const Vr = () => {
462
462
  type: he
463
463
  });
464
464
  };
465
- return E(() => {
465
+ return N(() => {
466
466
  (r == null ? void 0 : r.streaming) === !0 && !s.current && t.current && (s.current = !0, t.current.focus()), (r == null ? void 0 : r.streaming) === !1 && (s.current = !1);
467
467
  }, [r]), ye(L, r) ? /* @__PURE__ */ a("div", { className: o, children: /* @__PURE__ */ a(
468
468
  fe,
@@ -475,7 +475,7 @@ const Vr = () => {
475
475
  children: r != null && r.streaming ? je : We
476
476
  }
477
477
  ) }) : null;
478
- }, ue = mr(() => import("./LazyMessageAssistant.BP4_wS5W.js").then((e) => e.LazyMessageAssistant)), Br = () => {
478
+ }, ue = mr(() => import("./LazyMessageAssistant.uUafovZf.js").then((e) => e.LazyMessageAssistant)), Br = () => {
479
479
  const { state: e } = Z(U);
480
480
  return /* @__PURE__ */ S(me, { children: [
481
481
  e && e.messages.length > 0 && e.messages.map((r, o) => {
@@ -521,7 +521,7 @@ const Vr = () => {
521
521
  const { state: e, dispatch: r } = Z(U), [o, t] = R(""), { getAccessToken: s, user: n } = K(), l = x(!1), c = x(null), g = x(
522
522
  null
523
523
  );
524
- E(() => {
524
+ N(() => {
525
525
  (async () => {
526
526
  var h;
527
527
  if (!e || e.messages.length === 0) {
@@ -554,10 +554,10 @@ const Vr = () => {
554
554
  z(r, !1);
555
555
  break;
556
556
  }
557
- const d = p.decode(m, { stream: !0 }), N = d.indexOf(ae);
558
- if (N !== -1) {
559
- const V = d.substring(0, N), O = JSON.parse(
560
- d.substring(N + ae.length)
557
+ const d = p.decode(m, { stream: !0 }), E = d.indexOf(ae);
558
+ if (E !== -1) {
559
+ const V = d.substring(0, E), O = JSON.parse(
560
+ d.substring(E + ae.length)
561
561
  );
562
562
  r({
563
563
  type: be,
@@ -608,7 +608,7 @@ const Vr = () => {
608
608
  }
609
609
  }), t("");
610
610
  };
611
- return E(() => {
611
+ return N(() => {
612
612
  (e == null ? void 0 : e.streaming) === !1 && !l.current && c.current && (l.current = !0, c.current.focus()), (e == null ? void 0 : e.streaming) === !0 && l.current === !0 && (l.current = !1);
613
613
  }, [e]), /* @__PURE__ */ a("form", { className: "mt-2", onSubmit: u, children: /* @__PURE__ */ a(
614
614
  Te,
@@ -782,7 +782,7 @@ function ve({ isComponent: e = !1 }) {
782
782
  }
783
783
  });
784
784
  }, [c]);
785
- return E(() => {
785
+ return N(() => {
786
786
  k.version !== "" || o.current || (async () => {
787
787
  try {
788
788
  o.current = !0;
@@ -794,7 +794,7 @@ function ve({ isComponent: e = !1 }) {
794
794
  } catch {
795
795
  }
796
796
  })();
797
- }, [k, s]), E(() => {
797
+ }, [k, s]), N(() => {
798
798
  t && ((!c || c.accuracy === 0) && (async () => {
799
799
  const m = await or();
800
800
  g(m), i({
@@ -809,7 +809,7 @@ function ve({ isComponent: e = !1 }) {
809
809
  location: c
810
810
  }
811
811
  }));
812
- }, [t, c, g, u.location]), E(() => {
812
+ }, [t, c, g, u.location]), N(() => {
813
813
  !u.location || u.location.accuracy === 0 || u.location.city || r.current || (async () => {
814
814
  var m;
815
815
  r.current = !0;
@@ -839,7 +839,7 @@ function ve({ isComponent: e = !1 }) {
839
839
  T();
840
840
  }
841
841
  })();
842
- }, [u, c, s, T]), E(() => {
842
+ }, [u, c, s, T]), N(() => {
843
843
  var m;
844
844
  (m = document.getElementById("logo")) == null || m.classList.add("fadeOut"), setTimeout(() => {
845
845
  var d;