@versini/sassysaint 1.0.5 → 1.0.7

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,6 +1,6 @@
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, Hr 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.Bzq4mcwZ.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.IVvZKc3P.js";
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, _n 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 I, 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.DgZgswqQ.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.D3_0xm5E.js";
4
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";
5
5
  import y from "clsx";
6
6
  const yr = ({
@@ -313,7 +313,7 @@ const Sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
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), Ee = $e([Ae, v]), B = x(null), F = x(80), re = x(-25), M = x(null), te = x(30), P = x(null), _ = ze({ id: e, prefix: `${ge}-` }), [Ne, Oe] = R(0), [we, oe] = R(
317
317
  !!(!T && p)
318
318
  ), Le = `${r} error, ${p}`, w = Lr({
319
319
  className: n,
@@ -337,9 +337,9 @@ const Sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
337
337
  }
338
338
  }), Me = (C) => {
339
339
  Re(C.target.value);
340
- }, Ie = (C) => {
341
- T && p && oe(!0), N && N(C);
342
340
  }, _e = (C) => {
341
+ T && p && oe(!0), N && N(C);
342
+ }, Ie = (C) => {
343
343
  T && p && !A && oe(!1), V && V(C);
344
344
  };
345
345
  return D(() => {
@@ -375,7 +375,7 @@ const Sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
375
375
  /* @__PURE__ */ a(
376
376
  "label",
377
377
  {
378
- htmlFor: I,
378
+ htmlFor: _,
379
379
  id: k,
380
380
  className: w.accessibleLabel,
381
381
  children: o
@@ -385,19 +385,19 @@ const Sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
385
385
  "textarea",
386
386
  {
387
387
  ref: Ee,
388
- id: I,
388
+ id: _,
389
389
  name: r,
390
390
  disabled: h,
391
391
  placeholder: s ? void 0 : " ",
392
392
  className: w.textArea,
393
393
  rows: 1,
394
- ...p && { "aria-describedby": `${I}-helper` },
394
+ ...p && { "aria-describedby": `${_}-helper` },
395
395
  ...t && { "aria-invalid": "true" },
396
396
  ...m && !s && { style: { paddingRight: Ne } },
397
397
  value: A,
398
398
  onChange: Me,
399
- onFocus: Ie,
400
- onBlur: _e,
399
+ onFocus: _e,
400
+ onBlur: Ie,
401
401
  ...Se
402
402
  }
403
403
  ),
@@ -406,7 +406,7 @@ const Sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
406
406
  {
407
407
  ref: M,
408
408
  "aria-hidden": !0,
409
- htmlFor: I,
409
+ htmlFor: _,
410
410
  className: w.visibleLabel,
411
411
  children: o
412
412
  }
@@ -415,7 +415,7 @@ const Sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
415
415
  "div",
416
416
  {
417
417
  ref: P,
418
- id: `${I}-helper`,
418
+ id: `${_}-helper`,
419
419
  className: w.helperText,
420
420
  children: p
421
421
  }
@@ -439,11 +439,11 @@ for (var J = 0; J < 256; ++J)
439
439
  function Mr(e, r = 0) {
440
440
  return (f[e[r + 0]] + f[e[r + 1]] + f[e[r + 2]] + f[e[r + 3]] + "-" + f[e[r + 4]] + f[e[r + 5]] + "-" + f[e[r + 6]] + f[e[r + 7]] + "-" + f[e[r + 8]] + f[e[r + 9]] + "-" + f[e[r + 10]] + f[e[r + 11]] + f[e[r + 12]] + f[e[r + 13]] + f[e[r + 14]] + f[e[r + 15]]).toLowerCase();
441
441
  }
442
- var $, Ir = new Uint8Array(16);
443
- function _r() {
442
+ var $, _r = new Uint8Array(16);
443
+ function Ir() {
444
444
  if (!$ && ($ = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !$))
445
445
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
446
- return $(Ir);
446
+ return $(_r);
447
447
  }
448
448
  var Hr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
449
449
  const de = {
@@ -453,7 +453,7 @@ function ee(e, r, o) {
453
453
  if (de.randomUUID && !r && !e)
454
454
  return de.randomUUID();
455
455
  e = e || {};
456
- var t = e.random || (e.rng || _r)();
456
+ var t = e.random || (e.rng || Ir)();
457
457
  return t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128, Mr(t);
458
458
  }
459
459
  const Vr = () => {
@@ -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.DIvKjv9v.js").then((e) => e.LazyMessageAssistant)), Br = () => {
478
+ }, ue = mr(() => import("./LazyMessageAssistant.BsRJpVww.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) => {
@@ -735,7 +735,7 @@ const Vr = () => {
735
735
  messages: e.messages,
736
736
  location: e.location,
737
737
  isComponent: e.isComponent
738
- } : (r == null ? void 0 : r.type) === _ ? {
738
+ } : (r == null ? void 0 : r.type) === I ? {
739
739
  id: e.id,
740
740
  model: e.model,
741
741
  usage: e.usage,
@@ -773,7 +773,7 @@ function ve({ isComponent: e = !1 }) {
773
773
  plugins: []
774
774
  }), T = gr(() => {
775
775
  i({
776
- type: _,
776
+ type: I,
777
777
  payload: {
778
778
  location: {
779
779
  ...c,
@@ -798,13 +798,13 @@ function ve({ isComponent: e = !1 }) {
798
798
  t && ((!c || c.accuracy === 0) && (async () => {
799
799
  const m = await or();
800
800
  g(m), i({
801
- type: _,
801
+ type: I,
802
802
  payload: {
803
803
  location: m
804
804
  }
805
805
  });
806
806
  })(), c && c.accuracy !== 0 && !u.location && i({
807
- type: _,
807
+ type: I,
808
808
  payload: {
809
809
  location: c
810
810
  }
@@ -823,7 +823,7 @@ function ve({ isComponent: e = !1 }) {
823
823
  }
824
824
  });
825
825
  r.current = !1, d.status !== 200 || ((m = d == null ? void 0 : d.errors) == null ? void 0 : m.length) > 0 || !d.data || !d.data.city || !d.data.region || !d.data.country ? T() : i({
826
- type: _,
826
+ type: I,
827
827
  payload: {
828
828
  location: {
829
829
  ...c,