@versini/sassysaint 1.0.2 → 1.0.3

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 { jsx as c, jsxs as T, Fragment as q } from "react/jsx-runtime";
2
2
  import * as F from "react";
3
- import K, { createContext as xt, useRef as W, useState as U, useCallback as $e, useEffect as z, useContext as Xe, useMemo as Nt, useId as Ct, useReducer as Rt, useLayoutEffect as Ot, lazy as Ze, Suspense as et } from "react";
3
+ import K, { createContext as xt, useRef as W, useState as U, useCallback as Me, useEffect as z, useContext as Ze, useMemo as Nt, useId as Ct, useReducer as Rt, useLayoutEffect as Ot, lazy as et, Suspense as tt } from "react";
4
4
  import g from "clsx";
5
5
  var Dt = Object.defineProperty, $t = (e, t, r) => t in e ? Dt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ye = (e, t, r) => ($t(e, typeof t != "symbol" ? t + "" : t, r), r);
6
6
  /*!
@@ -56,7 +56,7 @@ awIDAQAB
56
56
  AUTHENTICATE: "authenticate",
57
57
  CODE: "code",
58
58
  LOGOUT: "logout"
59
- }, he = crypto, tt = (e) => e instanceof CryptoKey, X = new TextEncoder(), pe = new TextDecoder();
59
+ }, he = crypto, rt = (e) => e instanceof CryptoKey, X = new TextEncoder(), pe = new TextDecoder();
60
60
  function Pt(...e) {
61
61
  const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
62
62
  let a = 0;
@@ -94,7 +94,7 @@ let j = class extends Error {
94
94
  super(t), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
95
95
  }
96
96
  };
97
- class Me extends j {
97
+ class Le extends j {
98
98
  static get code() {
99
99
  return "ERR_JWT_EXPIRED";
100
100
  }
@@ -125,7 +125,7 @@ let H = class extends j {
125
125
  return "ERR_JWS_INVALID";
126
126
  }
127
127
  };
128
- class rt extends j {
128
+ class at extends j {
129
129
  constructor() {
130
130
  super(...arguments), this.code = "ERR_JWT_INVALID";
131
131
  }
@@ -225,7 +225,7 @@ function jt(e, t, ...r) {
225
225
  }
226
226
  Wt(e, r);
227
227
  }
228
- function at(e, t, ...r) {
228
+ function nt(e, t, ...r) {
229
229
  var a;
230
230
  if (r.length > 2) {
231
231
  const n = r.pop();
@@ -234,11 +234,11 @@ function at(e, t, ...r) {
234
234
  r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
235
235
  return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (a = t.constructor) != null && a.name && (e += ` Received an instance of ${t.constructor.name}`), e;
236
236
  }
237
- const Le = (e, ...t) => at("Key must be ", e, ...t);
238
- function nt(e, t, ...r) {
239
- return at(`Key for the ${e} algorithm must be `, t, ...r);
237
+ const Pe = (e, ...t) => nt("Key must be ", e, ...t);
238
+ function ot(e, t, ...r) {
239
+ return nt(`Key for the ${e} algorithm must be `, t, ...r);
240
240
  }
241
- const ot = (e) => tt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", de = ["CryptoKey"], Gt = (...e) => {
241
+ const st = (e) => rt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", de = ["CryptoKey"], Gt = (...e) => {
242
242
  const t = e.filter(Boolean);
243
243
  if (t.length === 0 || t.length === 1)
244
244
  return !0;
@@ -358,24 +358,24 @@ const zt = async (e) => {
358
358
  e.key_ops ?? r
359
359
  ], n = { ...e };
360
360
  return delete n.alg, delete n.use, he.subtle.importKey("jwk", n, ...a);
361
- }, st = (e) => ce(e);
361
+ }, it = (e) => ce(e);
362
362
  let we, Ee;
363
- const it = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", ct = async (e, t, r, a) => {
363
+ const ct = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", lt = async (e, t, r, a) => {
364
364
  let n = e.get(t);
365
365
  if (n != null && n[a])
366
366
  return n[a];
367
367
  const o = await zt({ ...r, alg: a });
368
368
  return n ? n[a] = o : e.set(t, { [a]: o }), o;
369
369
  }, Yt = (e, t) => {
370
- if (it(e)) {
370
+ if (ct(e)) {
371
371
  let r = e.export({ format: "jwk" });
372
- return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? st(r.k) : (Ee || (Ee = /* @__PURE__ */ new WeakMap()), ct(Ee, e, r, t));
372
+ return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? it(r.k) : (Ee || (Ee = /* @__PURE__ */ new WeakMap()), lt(Ee, e, r, t));
373
373
  }
374
374
  return e;
375
375
  }, qt = (e, t) => {
376
- if (it(e)) {
376
+ if (ct(e)) {
377
377
  let r = e.export({ format: "jwk" });
378
- return r.k ? st(r.k) : (we || (we = /* @__PURE__ */ new WeakMap()), ct(we, e, r, t));
378
+ return r.k ? it(r.k) : (we || (we = /* @__PURE__ */ new WeakMap()), lt(we, e, r, t));
379
379
  }
380
380
  return e;
381
381
  }, Qt = { normalizePublicKey: Yt, normalizePrivateKey: qt }, P = (e, t, r = 0) => {
@@ -385,7 +385,7 @@ const it = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
385
385
  return !1;
386
386
  const n = e.subarray(a, a + t.length);
387
387
  return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || P(e, t, a + 1);
388
- }, Pe = (e) => {
388
+ }, Ue = (e) => {
389
389
  switch (!0) {
390
390
  case P(e, [42, 134, 72, 206, 61, 3, 1, 7]):
391
391
  return "P-256";
@@ -440,12 +440,12 @@ const it = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
440
440
  case "ECDH-ES+A128KW":
441
441
  case "ECDH-ES+A192KW":
442
442
  case "ECDH-ES+A256KW": {
443
- const l = Pe(i);
443
+ const l = Ue(i);
444
444
  o = l.startsWith("P-") ? { name: "ECDH", namedCurve: l } : { name: l }, s = [];
445
445
  break;
446
446
  }
447
447
  case "EdDSA":
448
- o = { name: Pe(i) }, s = ["verify"];
448
+ o = { name: Ue(i) }, s = ["verify"];
449
449
  break;
450
450
  default:
451
451
  throw new H('Invalid or unsupported "alg" (Algorithm) value');
@@ -459,14 +459,14 @@ async function er(e, t, r) {
459
459
  }
460
460
  const le = (e) => e == null ? void 0 : e[Symbol.toStringTag], tr = (e, t) => {
461
461
  if (!(t instanceof Uint8Array)) {
462
- if (!ot(t))
463
- throw new TypeError(nt(e, t, ...de, "Uint8Array"));
462
+ if (!st(t))
463
+ throw new TypeError(ot(e, t, ...de, "Uint8Array"));
464
464
  if (t.type !== "secret")
465
465
  throw new TypeError(`${le(t)} instances for symmetric algorithms must be of type "secret"`);
466
466
  }
467
467
  }, rr = (e, t, r) => {
468
- if (!ot(t))
469
- throw new TypeError(nt(e, t, ...de));
468
+ if (!st(t))
469
+ throw new TypeError(ot(e, t, ...de));
470
470
  if (t.type === "secret")
471
471
  throw new TypeError(`${le(t)} instances for asymmetric algorithms must not be of type "secret"`);
472
472
  if (t.algorithm && r === "verify" && t.type === "private")
@@ -527,14 +527,14 @@ function sr(e, t) {
527
527
  }
528
528
  }
529
529
  async function ir(e, t, r) {
530
- if (t = await Qt.normalizePublicKey(t, e), tt(t))
530
+ if (t = await Qt.normalizePublicKey(t, e), rt(t))
531
531
  return jt(t, e, r), t;
532
532
  if (t instanceof Uint8Array) {
533
533
  if (!e.startsWith("HS"))
534
- throw new TypeError(Le(t, ...de));
534
+ throw new TypeError(Pe(t, ...de));
535
535
  return he.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
536
536
  }
537
- throw new TypeError(Le(t, ...de, "Uint8Array"));
537
+ throw new TypeError(Pe(t, ...de, "Uint8Array"));
538
538
  }
539
539
  const cr = async (e, t, r, a) => {
540
540
  const n = await ir(e, t, "verify");
@@ -619,7 +619,7 @@ async function dr(e, t, r) {
619
619
  const i = await lr({ payload: n, protected: a, signature: o }, t, r), l = { payload: i.payload, protectedHeader: i.protectedHeader };
620
620
  return typeof t == "function" ? { ...l, key: i.key } : l;
621
621
  }
622
- const ur = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, Ie = dt * 24, mr = Ie * 7, hr = Ie * 365.25, pr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, Ue = (e) => {
622
+ const ur = (e) => Math.floor(e.getTime() / 1e3), dt = 60, ut = dt * 60, Ie = ut * 24, mr = Ie * 7, hr = Ie * 365.25, pr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, He = (e) => {
623
623
  const t = pr.exec(e);
624
624
  if (!t || t[4] && t[1])
625
625
  throw new TypeError("Invalid time period format");
@@ -638,14 +638,14 @@ const ur = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, Ie = dt
638
638
  case "min":
639
639
  case "mins":
640
640
  case "m":
641
- n = Math.round(r * lt);
641
+ n = Math.round(r * dt);
642
642
  break;
643
643
  case "hour":
644
644
  case "hours":
645
645
  case "hr":
646
646
  case "hrs":
647
647
  case "h":
648
- n = Math.round(r * dt);
648
+ n = Math.round(r * ut);
649
649
  break;
650
650
  case "day":
651
651
  case "days":
@@ -662,16 +662,16 @@ const ur = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, Ie = dt
662
662
  break;
663
663
  }
664
664
  return t[1] === "-" || t[4] === "ago" ? -n : n;
665
- }, He = (e) => e.toLowerCase().replace(/^application\//, ""), gr = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, fr = (e, t, r = {}) => {
665
+ }, Ke = (e) => e.toLowerCase().replace(/^application\//, ""), gr = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, fr = (e, t, r = {}) => {
666
666
  let a;
667
667
  try {
668
668
  a = JSON.parse(pe.decode(t));
669
669
  } catch {
670
670
  }
671
671
  if (!_e(a))
672
- throw new rt("JWT Claims Set must be a top-level JSON object");
672
+ throw new at("JWT Claims Set must be a top-level JSON object");
673
673
  const { typ: n } = r;
674
- if (n && (typeof e.typ != "string" || He(e.typ) !== He(n)))
674
+ if (n && (typeof e.typ != "string" || Ke(e.typ) !== Ke(n)))
675
675
  throw new M('unexpected "typ" JWT header value', a, "typ", "check_failed");
676
676
  const { requiredClaims: o = [], issuer: s, subject: i, audience: l, maxTokenAge: d } = r, h = [...o];
677
677
  d !== void 0 && h.push("iat"), l !== void 0 && h.push("aud"), i !== void 0 && h.push("sub"), s !== void 0 && h.push("iss");
@@ -687,7 +687,7 @@ const ur = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, Ie = dt
687
687
  let u;
688
688
  switch (typeof r.clockTolerance) {
689
689
  case "string":
690
- u = Ue(r.clockTolerance);
690
+ u = He(r.clockTolerance);
691
691
  break;
692
692
  case "number":
693
693
  u = r.clockTolerance;
@@ -711,12 +711,12 @@ const ur = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, Ie = dt
711
711
  if (typeof a.exp != "number")
712
712
  throw new M('"exp" claim must be a number', a, "exp", "invalid");
713
713
  if (a.exp <= p - u)
714
- throw new Me('"exp" claim timestamp check failed', a, "exp", "check_failed");
714
+ throw new Le('"exp" claim timestamp check failed', a, "exp", "check_failed");
715
715
  }
716
716
  if (d) {
717
- const f = p - a.iat, w = typeof d == "number" ? d : Ue(d);
717
+ const f = p - a.iat, w = typeof d == "number" ? d : He(d);
718
718
  if (f - u > w)
719
- throw new Me('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
719
+ throw new Le('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
720
720
  if (f < 0 - u)
721
721
  throw new M('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
722
722
  }
@@ -726,7 +726,7 @@ async function yr(e, t, r) {
726
726
  var a;
727
727
  const n = await dr(e, t, r);
728
728
  if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
729
- throw new rt("JWTs MUST NOT use unencoded payload");
729
+ throw new at("JWTs MUST NOT use unencoded payload");
730
730
  const o = { payload: fr(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
731
731
  return typeof t == "function" ? { ...o, key: n.key } : o;
732
732
  }
@@ -753,25 +753,25 @@ function Er() {
753
753
  return ee(wr);
754
754
  }
755
755
  var vr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
756
- const Ke = {
756
+ const Be = {
757
757
  randomUUID: vr
758
758
  };
759
- function Be(e, t, r) {
760
- if (Ke.randomUUID && !t && !e)
761
- return Ke.randomUUID();
759
+ function We(e, t, r) {
760
+ if (Be.randomUUID && !t && !e)
761
+ return Be.randomUUID();
762
762
  e = e || {};
763
763
  var a = e.random || (e.rng || Er)();
764
764
  return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, br(a);
765
765
  }
766
- const We = globalThis.crypto, kr = (e) => `${Be()}${Be()}`.slice(0, e), Sr = (e) => btoa(
766
+ const je = globalThis.crypto, kr = (e) => `${We()}${We()}`.slice(0, e), Sr = (e) => btoa(
767
767
  [...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
768
768
  );
769
769
  async function Tr(e) {
770
- if (!We.subtle)
770
+ if (!je.subtle)
771
771
  throw new Error(
772
772
  "crypto.subtle is available only in secure contexts (HTTPS)."
773
773
  );
774
- const t = new TextEncoder().encode(e), r = await We.subtle.digest("SHA-256", t);
774
+ const t = new TextEncoder().encode(e), r = await je.subtle.digest("SHA-256", t);
775
775
  return Sr(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
776
776
  }
777
777
  async function Ar(e) {
@@ -781,29 +781,29 @@ async function Ar(e) {
781
781
  code_challenge: r
782
782
  };
783
783
  }
784
- function ut(e, t) {
784
+ function mt(e, t) {
785
785
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
786
786
  }
787
- const je = (e, t) => {
787
+ const Ge = (e, t) => {
788
788
  const r = JSON.stringify(
789
789
  typeof t == "function" ? t() : t
790
790
  );
791
- window.localStorage.setItem(e, r), ut(e, r);
791
+ window.localStorage.setItem(e, r), mt(e, r);
792
792
  }, _r = (e) => {
793
- window.localStorage.removeItem(e), ut(e, null);
794
- }, Ge = (e) => window.localStorage.getItem(e), Ir = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
793
+ window.localStorage.removeItem(e), mt(e, null);
794
+ }, Ve = (e) => window.localStorage.getItem(e), Ir = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
795
795
  function te({
796
796
  key: e,
797
797
  initialValue: t
798
798
  }) {
799
- const r = () => Ge(e), a = F.useSyncExternalStore(
799
+ const r = () => Ve(e), a = F.useSyncExternalStore(
800
800
  Ir,
801
801
  r
802
802
  ), n = F.useCallback(
803
803
  (i) => {
804
804
  try {
805
805
  const l = typeof i == "function" ? i(JSON.parse(a)) : i;
806
- l == null ? _r(e) : je(e, l);
806
+ l == null ? _r(e) : Ge(e, l);
807
807
  } catch (l) {
808
808
  console.warn(l);
809
809
  }
@@ -816,7 +816,7 @@ function te({
816
816
  }, [n]);
817
817
  return F.useEffect(() => {
818
818
  try {
819
- Ge(e) === null && typeof t < "u" && je(e, t);
819
+ Ve(e) === null && typeof t < "u" && Ge(e, t);
820
820
  } catch (i) {
821
821
  console.warn(i);
822
822
  }
@@ -835,17 +835,17 @@ function Cr() {
835
835
  return re(Nr);
836
836
  }
837
837
  var Rr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
838
- const Ve = {
838
+ const Je = {
839
839
  randomUUID: Rr
840
840
  };
841
841
  function Or(e, t, r) {
842
- if (Ve.randomUUID && !t && !e)
843
- return Ve.randomUUID();
842
+ if (Je.randomUUID && !t && !e)
843
+ return Je.randomUUID();
844
844
  e = e || {};
845
845
  var a = e.random || (e.rng || Cr)();
846
846
  return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, xr(a);
847
847
  }
848
- const ae = "Oops! It looks like your session has expired. For your security, please log in again to continue.", Dr = "Your session has been successfully terminated.", Je = "Login failed. Please try again.", Se = "Error getting access token, please re-authenticate.", $r = "You forgot to wrap your component in <AuthProvider>.", Fe = {
848
+ const ae = "Oops! It looks like your session has expired. For your security, please log in again to continue.", Dr = "Your session has been successfully terminated.", Fe = "Login failed. Please try again.", Se = "Error getting access token, please re-authenticate.", $r = "You forgot to wrap your component in <AuthProvider>.", ze = {
849
849
  dev: "https://auth.gizmette.local.com:3003",
850
850
  prod: "https://mylogin.gizmette.com"
851
851
  }, ne = "@@auth@@", Mr = process.env.NODE_ENV === "production", Lr = !Mr, ge = async ({
@@ -855,7 +855,7 @@ const ae = "Oops! It looks like your session has expired. For your security, ple
855
855
  }) => {
856
856
  try {
857
857
  const a = await fetch(
858
- Lr ? `${Fe.dev}/${e}` : `${Fe.prod}/${e}`,
858
+ Lr ? `${ze.dev}/${e}` : `${ze.prod}/${e}`,
859
859
  {
860
860
  credentials: "include",
861
861
  method: "POST",
@@ -902,7 +902,7 @@ const ae = "Oops! It looks like your session has expired. For your security, ple
902
902
  status: !1
903
903
  };
904
904
  }
905
- }, ze = async ({
905
+ }, Ye = async ({
906
906
  username: e,
907
907
  password: t,
908
908
  clientId: r,
@@ -1056,7 +1056,7 @@ class Kr {
1056
1056
  }
1057
1057
  const oe = () => {
1058
1058
  throw new Error($r);
1059
- }, mt = xt({
1059
+ }, ht = xt({
1060
1060
  isAuthenticated: !1,
1061
1061
  isLoading: !1,
1062
1062
  login: oe,
@@ -1085,7 +1085,7 @@ const oe = () => {
1085
1085
  isAuthenticated: !1,
1086
1086
  user: void 0,
1087
1087
  logoutReason: ""
1088
- }), D = $e(
1088
+ }), D = Me(
1089
1089
  (y) => {
1090
1090
  console.warn(y), S({
1091
1091
  isLoading: !0,
@@ -1095,7 +1095,7 @@ const oe = () => {
1095
1095
  }), i(), h(), p(), x();
1096
1096
  },
1097
1097
  [h, i, x, p]
1098
- ), C = $e(
1098
+ ), C = Me(
1099
1099
  async (y) => {
1100
1100
  D(y || ae), await Pr({
1101
1101
  idToken: o,
@@ -1147,20 +1147,20 @@ const oe = () => {
1147
1147
  ...G,
1148
1148
  isLoading: !0
1149
1149
  })), i(), h(), p(), b === Q.CODE) {
1150
- const { code_verifier: G, code_challenge: It } = await Ar(), De = await Ur({
1150
+ const { code_verifier: G, code_challenge: It } = await Ar(), $e = await Ur({
1151
1151
  nonce: A,
1152
1152
  clientId: r,
1153
1153
  code_challenge: It
1154
1154
  });
1155
- if (De.status) {
1156
- const J = await ze({
1155
+ if ($e.status) {
1156
+ const J = await Ye({
1157
1157
  username: y,
1158
1158
  password: $,
1159
1159
  clientId: r,
1160
1160
  sessionExpiration: t,
1161
1161
  nonce: A,
1162
1162
  type: b,
1163
- code: De.code,
1163
+ code: $e.code,
1164
1164
  code_verifier: G,
1165
1165
  domain: a
1166
1166
  });
@@ -1172,11 +1172,11 @@ const oe = () => {
1172
1172
  username: y
1173
1173
  },
1174
1174
  logoutReason: ""
1175
- }), !0) : (D(Je), !1);
1175
+ }), !0) : (D(Fe), !1);
1176
1176
  }
1177
1177
  return !1;
1178
1178
  }
1179
- const B = await ze({
1179
+ const B = await Ye({
1180
1180
  username: y,
1181
1181
  password: $,
1182
1182
  clientId: r,
@@ -1192,7 +1192,7 @@ const oe = () => {
1192
1192
  userId: B.userId,
1193
1193
  username: y
1194
1194
  }
1195
- }), !0) : (D(Je), !1);
1195
+ }), !0) : (D(Fe), !1);
1196
1196
  }, V = async (y) => {
1197
1197
  y == null || y.preventDefault(), await C(Dr);
1198
1198
  }, R = async () => {
@@ -1221,13 +1221,184 @@ const oe = () => {
1221
1221
  return o;
1222
1222
  };
1223
1223
  return /* @__PURE__ */ c(
1224
- mt.Provider,
1224
+ ht.Provider,
1225
1225
  {
1226
1226
  value: { ..._, login: N, logout: V, getAccessToken: R, getIdToken: fe },
1227
1227
  children: e
1228
1228
  }
1229
1229
  );
1230
- }, xe = (e = mt) => Xe(e), tn = "user", rn = "assistant", an = "system", nn = "internal", on = "hidden", sn = "I'm having trouble right now. Please try again later.", cn = "gpt-4", ln = 128e3, dn = "action-message", un = "action-reset", mn = "action-model", hn = "action-restore", pn = "action-location", gn = "action-streaming", fn = "action-search", yn = "action-sort", bn = "sassy-saint-", wn = "details", En = "search", vn = "sort", kn = "location", Sn = "==stats==", Wr = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Ne = (e) => {
1230
+ }, xe = (e = ht) => Ze(e), rn = "user", an = "assistant", nn = "system", on = "internal", sn = "hidden", cn = "I'm having trouble right now. Please try again later.", ln = "gpt-4", dn = 128e3, un = "action-message", mn = "action-reset", hn = "action-model", pn = "action-restore", gn = "action-location", fn = "action-streaming", yn = "action-search", bn = "action-sort", wn = "sassy-saint-", En = "details", vn = "search", kn = "sort", Sn = "location", Tn = "==stats==", Wr = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", qe = (e) => Number.isFinite(e) ? e : 0;
1231
+ function jr(e) {
1232
+ return {
1233
+ days: Math.trunc(e / 864e5),
1234
+ hours: Math.trunc(e / 36e5 % 24),
1235
+ minutes: Math.trunc(e / 6e4 % 60),
1236
+ seconds: Math.trunc(e / 1e3 % 60),
1237
+ milliseconds: Math.trunc(e % 1e3),
1238
+ microseconds: Math.trunc(qe(e * 1e3) % 1e3),
1239
+ nanoseconds: Math.trunc(qe(e * 1e6) % 1e3)
1240
+ };
1241
+ }
1242
+ function Gr(e) {
1243
+ return {
1244
+ days: e / 86400000n,
1245
+ hours: e / 3600000n % 24n,
1246
+ minutes: e / 60000n % 60n,
1247
+ seconds: e / 1000n % 60n,
1248
+ milliseconds: e % 1000n,
1249
+ microseconds: 0n,
1250
+ nanoseconds: 0n
1251
+ };
1252
+ }
1253
+ function Vr(e) {
1254
+ switch (typeof e) {
1255
+ case "number": {
1256
+ if (Number.isFinite(e))
1257
+ return jr(e);
1258
+ break;
1259
+ }
1260
+ case "bigint":
1261
+ return Gr(e);
1262
+ }
1263
+ throw new TypeError("Expected a finite number or bigint");
1264
+ }
1265
+ const Jr = (e) => e === 0 || e === 0n, Fr = (e, t) => t === 1 || t === 1n ? e : `${e}s`, zr = 1e-7, Yr = 24n * 60n * 60n * 1000n;
1266
+ function qr(e, t) {
1267
+ const r = typeof e == "bigint";
1268
+ if (!r && !Number.isFinite(e))
1269
+ throw new TypeError("Expected a finite number or bigint");
1270
+ t = { ...t }, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
1271
+ let a = [];
1272
+ const n = (d, h) => {
1273
+ const u = Math.floor(d * 10 ** h + zr);
1274
+ return (Math.round(u) / 10 ** h).toFixed(h);
1275
+ }, o = (d, h, u, m) => {
1276
+ if (!((a.length === 0 || !t.colonNotation) && Jr(d) && !(t.colonNotation && u === "m"))) {
1277
+ if (m = m ?? String(d), t.colonNotation) {
1278
+ const p = m.includes(".") ? m.split(".")[0].length : m.length, f = a.length > 0 ? 2 : 1;
1279
+ m = "0".repeat(Math.max(0, f - p)) + m;
1280
+ } else
1281
+ m += t.verbose ? " " + Fr(h, d) : u;
1282
+ a.push(m);
1283
+ }
1284
+ }, s = Vr(e), i = BigInt(s.days);
1285
+ if (o(i / 365n, "year", "y"), o(i % 365n, "day", "d"), o(Number(s.hours), "hour", "h"), o(Number(s.minutes), "minute", "m"), t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
1286
+ const d = Number(s.seconds), h = Number(s.milliseconds), u = Number(s.microseconds), m = Number(s.nanoseconds);
1287
+ if (o(d, "second", "s"), t.formatSubMilliseconds)
1288
+ o(h, "millisecond", "ms"), o(u, "microsecond", "µs"), o(m, "nanosecond", "ns");
1289
+ else {
1290
+ const p = h + u / 1e3 + m / 1e6, f = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, w = p >= 1 ? Math.round(p) : Math.ceil(p), x = f ? p.toFixed(f) : w;
1291
+ o(
1292
+ Number.parseFloat(x),
1293
+ "millisecond",
1294
+ "ms",
1295
+ x
1296
+ );
1297
+ }
1298
+ } else {
1299
+ const d = (r ? Number(e % Yr) : e) / 1e3 % 60, h = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, u = n(d, h), m = t.keepDecimalsOnWholeSeconds ? u : u.replace(/\.0+$/, "");
1300
+ o(Number.parseFloat(m), "second", "s", m);
1301
+ }
1302
+ if (a.length === 0)
1303
+ return "0" + (t.verbose ? " milliseconds" : "ms");
1304
+ const l = t.colonNotation ? ":" : " ";
1305
+ return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), a.join(l);
1306
+ }
1307
+ const Qr = process.env.NODE_ENV === "production", Ne = !Qr, Xr = Ne ? "gizmette.local.com" : "gizmette.com", An = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, pt = (e, t) => {
1308
+ const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N", a = 0 | Math.abs(e), n = 0 | Math.abs(e) * 60 % 60, o = (0 | Math.abs(e) * 60 % 1 * 6e3) / 100;
1309
+ return {
1310
+ dir: r,
1311
+ deg: a,
1312
+ min: n,
1313
+ sec: o
1314
+ };
1315
+ }, _n = (e) => {
1316
+ if (!e && e !== 0)
1317
+ return "N/A";
1318
+ const t = pt(e, !1);
1319
+ return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
1320
+ }, In = (e) => {
1321
+ if (!e && e !== 0)
1322
+ return "N/A";
1323
+ const t = pt(e, !0);
1324
+ return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
1325
+ }, xn = async () => {
1326
+ const e = {
1327
+ /**
1328
+ * A boolean value that indicates the application would
1329
+ * like to receive the best possible results. If true
1330
+ * and if the device is able to provide a more accurate
1331
+ * position, it will do so. Note that this can result in
1332
+ * slower response times or increased power consumption
1333
+ * (with a GPS chip on a mobile device for example). On
1334
+ * the other hand, if false, the device can take the
1335
+ * liberty to save resources by responding more quickly
1336
+ * and/or using less power. Default: false.
1337
+ */
1338
+ enableHighAccuracy: !1,
1339
+ /**
1340
+ * A positive long value representing the maximum length
1341
+ * of time (in milliseconds) the device is allowed to
1342
+ * take in order to return a position. The default value
1343
+ * is Infinity, meaning that getCurrentPosition() won't
1344
+ * return until the position is available.
1345
+ */
1346
+ timeout: 1e4,
1347
+ /**
1348
+ * A positive long value indicating the maximum age in
1349
+ * milliseconds of a possible cached position that is
1350
+ * acceptable to return. If set to 0, it means that the
1351
+ * device cannot use a cached position and must attempt
1352
+ * to retrieve the real current position. If set to
1353
+ * Infinity the device must return a cached position
1354
+ * regardless of its age. Default: 0.
1355
+ */
1356
+ maximumAge: 6e4
1357
+ };
1358
+ return new Promise((t, r) => {
1359
+ var a;
1360
+ (a = navigator == null ? void 0 : navigator.geolocation) == null || a.getCurrentPosition(
1361
+ (n) => {
1362
+ t({
1363
+ latitude: n.coords.latitude,
1364
+ longitude: n.coords.longitude,
1365
+ accuracy: n.coords.accuracy
1366
+ });
1367
+ },
1368
+ (n) => {
1369
+ r(n);
1370
+ },
1371
+ e
1372
+ );
1373
+ });
1374
+ }, Nn = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ c("dl", { className: "my-0", children: /* @__PURE__ */ T("div", { className: "flex items-center justify-between", children: [
1375
+ /* @__PURE__ */ c("dt", { className: "inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
1376
+ /* @__PURE__ */ c("dd", { className: "inline-block", children: t[r] })
1377
+ ] }) }, `${e}-${r}`)) : null;
1378
+ function Cn({
1379
+ data: e,
1380
+ formatter: t = (r) => r
1381
+ }) {
1382
+ const r = e.filter(
1383
+ (n) => typeof n == "number" && n > 0
1384
+ ), a = r.reduce(
1385
+ (n, o) => (n || 0) + (o || 0),
1386
+ 0
1387
+ );
1388
+ return t(a ? a / r.length : 0);
1389
+ }
1390
+ const Rn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, On = new Intl.NumberFormat("en", {
1391
+ style: "decimal",
1392
+ signDisplay: "never",
1393
+ minimumFractionDigits: 0,
1394
+ maximumFractionDigits: 0
1395
+ }), Dn = (e) => qr(e, {
1396
+ secondsDecimalDigits: 2,
1397
+ unitCount: 2
1398
+ }), Zr = (e) => g(
1399
+ "flex-1 space-y-6 overflow-y-auto rounded-md bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
1400
+ e || Ne ? "pt-4" : "pt-10"
1401
+ ), $n = (e, t) => t === 1 ? e : `${e}s`, Ce = (e) => {
1231
1402
  let t = "";
1232
1403
  if (typeof e == "number" || typeof e == "string")
1233
1404
  t = "m-" + e;
@@ -1236,7 +1407,7 @@ const oe = () => {
1236
1407
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
1237
1408
  }
1238
1409
  return t;
1239
- }, Tn = "av-bubble", Ye = "av-button", An = "av-card", jr = "av-footer", Gr = "av-main", _n = "av-messagebox", In = "av-panel", xn = "av-spinner", ht = "icon", pt = "button", Vr = "link", Jr = ({
1410
+ }, Mn = "av-bubble", Qe = "av-button", Ln = "av-card", ea = "av-footer", ta = "av-main", Pn = "av-messagebox", Un = "av-panel", Hn = "av-spinner", gt = "icon", ft = "button", ra = "link", aa = ({
1240
1411
  type: e,
1241
1412
  size: t,
1242
1413
  labelRight: r,
@@ -1245,19 +1416,19 @@ const oe = () => {
1245
1416
  }) => {
1246
1417
  const o = "text-sm font-medium max-h-8 py-0", s = "text-base font-medium max-h-9 py-1", i = "text-lg font-medium max-h-12 py-2";
1247
1418
  switch (e) {
1248
- case pt:
1419
+ case ft:
1249
1420
  return g("px-4", {
1250
1421
  [o]: t === "small",
1251
1422
  [s]: t === "medium",
1252
1423
  [i]: t === "large"
1253
1424
  });
1254
- case Vr:
1425
+ case ra:
1255
1426
  return g("px-4 text-center", {
1256
1427
  [o]: t === "small",
1257
1428
  [s]: t === "medium",
1258
1429
  [i]: t === "large"
1259
1430
  });
1260
- case ht:
1431
+ case gt:
1261
1432
  return g("inline-flex items-center", {
1262
1433
  "justify-center": n === "center",
1263
1434
  "justify-start": n === "left",
@@ -1270,7 +1441,7 @@ const oe = () => {
1270
1441
  "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
1271
1442
  });
1272
1443
  }
1273
- }, Fr = ({
1444
+ }, na = ({
1274
1445
  mode: e,
1275
1446
  noBackground: t,
1276
1447
  noTruncate: r,
@@ -1302,7 +1473,7 @@ const oe = () => {
1302
1473
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
1303
1474
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
1304
1475
  });
1305
- }, zr = ({
1476
+ }, oa = ({
1306
1477
  mode: e,
1307
1478
  disabled: t,
1308
1479
  variant: r
@@ -1330,7 +1501,7 @@ const oe = () => {
1330
1501
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
1331
1502
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
1332
1503
  });
1333
- }, Yr = ({
1504
+ }, sa = ({
1334
1505
  mode: e,
1335
1506
  disabled: t,
1336
1507
  variant: r
@@ -1358,7 +1529,7 @@ const oe = () => {
1358
1529
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
1359
1530
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
1360
1531
  });
1361
- }, qr = ({
1532
+ }, ia = ({
1362
1533
  mode: e,
1363
1534
  noBorder: t,
1364
1535
  variant: r
@@ -1386,12 +1557,12 @@ const oe = () => {
1386
1557
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
1387
1558
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
1388
1559
  });
1389
- }, Qr = ({ focusMode: e }) => g("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1560
+ }, ca = ({ focusMode: e }) => g("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1390
1561
  "focus:outline-focus-dark": e === "dark",
1391
1562
  "focus:outline-focus-light": e === "light",
1392
1563
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1393
1564
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1394
- }), gt = ({
1565
+ }), yt = ({
1395
1566
  type: e,
1396
1567
  className: t,
1397
1568
  raw: r,
@@ -1408,24 +1579,24 @@ const oe = () => {
1408
1579
  variant: p,
1409
1580
  noTruncate: f,
1410
1581
  align: w
1411
- }) => (p || (p = "primary"), r ? g(Ye, t) : g(
1412
- Ye,
1582
+ }) => (p || (p = "primary"), r ? g(Qe, t) : g(
1583
+ Qe,
1413
1584
  t,
1414
- Ne(u),
1415
- Fr({ mode: a, variant: p, noBackground: m, noTruncate: f }),
1416
- Jr({ type: e, size: i, labelRight: d, labelLeft: h, align: w }),
1417
- qr({ mode: a, variant: p, noBorder: l }),
1418
- Qr({ focusMode: n }),
1419
- zr({ mode: a, variant: p, disabled: o }),
1420
- Yr({ mode: a, variant: p, disabled: o }),
1585
+ Ce(u),
1586
+ na({ mode: a, variant: p, noBackground: m, noTruncate: f }),
1587
+ aa({ type: e, size: i, labelRight: d, labelLeft: h, align: w }),
1588
+ ia({ mode: a, variant: p, noBorder: l }),
1589
+ ca({ focusMode: n }),
1590
+ oa({ mode: a, variant: p, disabled: o }),
1591
+ sa({ mode: a, variant: p, disabled: o }),
1421
1592
  {
1422
1593
  "w-full": s,
1423
1594
  "disabled:cursor-not-allowed disabled:opacity-50": o
1424
1595
  }
1425
- )), Xr = (e, t, r) => {
1596
+ )), la = (e, t, r) => {
1426
1597
  var a;
1427
1598
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
1428
- }, Ce = K.forwardRef(
1599
+ }, Re = K.forwardRef(
1429
1600
  (e, t) => {
1430
1601
  const { onClick: r, noInternalClick: a = !1, ...n } = e;
1431
1602
  return /* @__PURE__ */ c(
@@ -1433,15 +1604,15 @@ const oe = () => {
1433
1604
  {
1434
1605
  ref: t,
1435
1606
  onClick: (o) => {
1436
- Xr(o, a, r);
1607
+ la(o, a, r);
1437
1608
  },
1438
1609
  ...n
1439
1610
  }
1440
1611
  );
1441
1612
  }
1442
1613
  );
1443
- Ce.displayName = "BaseButton";
1444
- const ft = K.forwardRef(
1614
+ Re.displayName = "BaseButton";
1615
+ const bt = K.forwardRef(
1445
1616
  ({
1446
1617
  children: e,
1447
1618
  disabled: t = !1,
@@ -1462,8 +1633,8 @@ const ft = K.forwardRef(
1462
1633
  align: x = "center",
1463
1634
  ...O
1464
1635
  }, _) => {
1465
- const S = gt({
1466
- type: ht,
1636
+ const S = yt({
1637
+ type: gt,
1467
1638
  mode: r,
1468
1639
  focusMode: a,
1469
1640
  fullWidth: n,
@@ -1484,7 +1655,7 @@ const ft = K.forwardRef(
1484
1655
  "text-copy-light dark:text-copy-accent-dark": r === "system" && !i
1485
1656
  });
1486
1657
  return /* @__PURE__ */ T(
1487
- Ce,
1658
+ Re,
1488
1659
  {
1489
1660
  ref: _,
1490
1661
  className: S,
@@ -1501,8 +1672,8 @@ const ft = K.forwardRef(
1501
1672
  );
1502
1673
  }
1503
1674
  );
1504
- ft.displayName = "ButtonIcon";
1505
- const yt = K.forwardRef(
1675
+ bt.displayName = "ButtonIcon";
1676
+ const wt = K.forwardRef(
1506
1677
  ({
1507
1678
  children: e,
1508
1679
  disabled: t = !1,
@@ -1518,8 +1689,8 @@ const yt = K.forwardRef(
1518
1689
  noTruncate: u = !1,
1519
1690
  ...m
1520
1691
  }, p) => {
1521
- const f = gt({
1522
- type: pt,
1692
+ const f = yt({
1693
+ type: ft,
1523
1694
  mode: r,
1524
1695
  focusMode: a,
1525
1696
  fullWidth: n,
@@ -1533,7 +1704,7 @@ const yt = K.forwardRef(
1533
1704
  noTruncate: u
1534
1705
  });
1535
1706
  return /* @__PURE__ */ c(
1536
- Ce,
1707
+ Re,
1537
1708
  {
1538
1709
  ref: p,
1539
1710
  className: f,
@@ -1544,8 +1715,8 @@ const yt = K.forwardRef(
1544
1715
  );
1545
1716
  }
1546
1717
  );
1547
- yt.displayName = "Button";
1548
- const Zr = ({
1718
+ wt.displayName = "Button";
1719
+ const da = ({
1549
1720
  className: e,
1550
1721
  mode: t = "system",
1551
1722
  row1: r,
@@ -1554,7 +1725,7 @@ const Zr = ({
1554
1725
  spacing: o,
1555
1726
  raw: s = !1
1556
1727
  }) => {
1557
- const i = g(jr, e, Ne(o), {
1728
+ const i = g(ea, e, Ce(o), {
1558
1729
  "text-copy-dark": !s && t === "dark",
1559
1730
  "text-copy-lighter": !s && t === "light",
1560
1731
  "text-copy-dark dark:text-copy-lighter": !s && t === "system",
@@ -1566,13 +1737,13 @@ const Zr = ({
1566
1737
  r && /* @__PURE__ */ c("div", { children: r }),
1567
1738
  a && /* @__PURE__ */ c("div", { children: a })
1568
1739
  ] });
1569
- }, ea = ({
1740
+ }, ua = ({
1570
1741
  children: e,
1571
1742
  className: t,
1572
1743
  raw: r = !1,
1573
1744
  spacing: a
1574
1745
  }) => {
1575
- const n = g(t, Gr, Ne(a), {
1746
+ const n = g(t, ta, Ce(a), {
1576
1747
  "mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
1577
1748
  });
1578
1749
  return /* @__PURE__ */ c("main", { className: n, children: e });
@@ -1590,7 +1761,7 @@ try {
1590
1761
  });
1591
1762
  } catch {
1592
1763
  }
1593
- function ta(e) {
1764
+ function ma(e) {
1594
1765
  return Nt(() => e.every((t) => t == null) ? () => {
1595
1766
  } : (t) => {
1596
1767
  e.forEach((r) => {
@@ -1598,7 +1769,7 @@ function ta(e) {
1598
1769
  });
1599
1770
  }, e);
1600
1771
  }
1601
- function ra(e) {
1772
+ function ha(e) {
1602
1773
  const t = Ct();
1603
1774
  if (!e)
1604
1775
  return t;
@@ -1609,7 +1780,7 @@ function ra(e) {
1609
1780
  return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
1610
1781
  }
1611
1782
  }
1612
- const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
1783
+ const Et = "SET_ANNOUNCEMENT", vt = "CLEAR_ANNOUNCEMENT", pa = {
1613
1784
  alert: null,
1614
1785
  alertdialog: null,
1615
1786
  log: "polite",
@@ -1617,14 +1788,14 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
1617
1788
  progressbar: null,
1618
1789
  status: "polite",
1619
1790
  timer: "assertive"
1620
- }, na = (e, t) => {
1791
+ }, ga = (e, t) => {
1621
1792
  switch (t == null ? void 0 : t.type) {
1622
- case bt:
1793
+ case Et:
1623
1794
  return {
1624
1795
  ...e,
1625
1796
  announcement: t.payload
1626
1797
  };
1627
- case wt:
1798
+ case vt:
1628
1799
  return {
1629
1800
  ...e,
1630
1801
  announcement: null
@@ -1632,14 +1803,14 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
1632
1803
  default:
1633
1804
  return e;
1634
1805
  }
1635
- }, oa = ({
1806
+ }, fa = ({
1636
1807
  onAnnouncementClear: e,
1637
1808
  dispatch: t
1638
1809
  }) => {
1639
1810
  t({
1640
- type: wt
1811
+ type: vt
1641
1812
  }), typeof e == "function" && e();
1642
- }, qe = ({
1813
+ }, Xe = ({
1643
1814
  children: e,
1644
1815
  clearAnnouncementDelay: t,
1645
1816
  clearAnnouncementTimeoutRef: r,
@@ -1647,16 +1818,16 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
1647
1818
  dispatch: n
1648
1819
  }) => {
1649
1820
  (r == null ? void 0 : r.current) !== null && clearTimeout(r.current), e !== null && n({
1650
- type: bt,
1821
+ type: Et,
1651
1822
  payload: e
1652
1823
  }), t && (r.current = setTimeout(
1653
- () => oa({
1824
+ () => fa({
1654
1825
  onAnnouncementClear: a,
1655
1826
  dispatch: n
1656
1827
  }),
1657
1828
  t
1658
1829
  ));
1659
- }, sa = ({
1830
+ }, ya = ({
1660
1831
  children: e,
1661
1832
  announcementTimeoutRef: t,
1662
1833
  announcementDelay: r,
@@ -1665,13 +1836,13 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
1665
1836
  onAnnouncementClear: o,
1666
1837
  dispatch: s
1667
1838
  }) => {
1668
- clearTimeout(t.current), r ? t.current = setTimeout(qe, r, {
1839
+ clearTimeout(t.current), r ? t.current = setTimeout(Xe, r, {
1669
1840
  children: e,
1670
1841
  clearAnnouncementDelay: a,
1671
1842
  clearAnnouncementTimeoutRef: n,
1672
1843
  onAnnouncementClear: o,
1673
1844
  dispatch: s
1674
- }) : qe({
1845
+ }) : Xe({
1675
1846
  children: e,
1676
1847
  clearAnnouncementDelay: a,
1677
1848
  clearAnnouncementTimeoutRef: n,
@@ -1679,7 +1850,7 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
1679
1850
  dispatch: s
1680
1851
  });
1681
1852
  };
1682
- function Et({
1853
+ function kt({
1683
1854
  children: e,
1684
1855
  className: t,
1685
1856
  politeness: r,
@@ -1690,12 +1861,12 @@ function Et({
1690
1861
  visible: i,
1691
1862
  ...l
1692
1863
  }) {
1693
- const d = W(), h = W(), [u, m] = Rt(na, {
1864
+ const d = W(), h = W(), [u, m] = Rt(ga, {
1694
1865
  announcement: null
1695
1866
  });
1696
1867
  let p = r;
1697
- typeof p > "u" && (p = a ? aa[a] : "assertive"), z(() => {
1698
- sa({
1868
+ typeof p > "u" && (p = a ? pa[a] : "assertive"), z(() => {
1869
+ ya({
1699
1870
  announcementTimeoutRef: d,
1700
1871
  announcementDelay: n,
1701
1872
  children: e,
@@ -1737,7 +1908,7 @@ try {
1737
1908
  });
1738
1909
  } catch {
1739
1910
  }
1740
- const ia = (e) => {
1911
+ const ba = (e) => {
1741
1912
  let t = "";
1742
1913
  if (typeof e == "number" || typeof e == "string")
1743
1914
  t = "m-" + e;
@@ -1746,21 +1917,21 @@ const ia = (e) => {
1746
1917
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
1747
1918
  }
1748
1919
  return t;
1749
- }, vt = "av-text-input", ca = "av-text-input-wrapper", Te = "av-text-input-helper-text", Nn = "av-text-area", Cn = "av-text-area-wrapper", Rn = "av-text-area-helper-text", On = "av-text-area__control--right", Dn = "av-toggle", la = ({
1920
+ }, St = "av-text-input", wa = "av-text-input-wrapper", Te = "av-text-input-helper-text", Kn = "av-text-area", Bn = "av-text-area-wrapper", Wn = "av-text-area-helper-text", jn = "av-text-area__control--right", Gn = "av-toggle", Ea = ({
1750
1921
  mode: e
1751
1922
  }) => g({
1752
1923
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
1753
1924
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
1754
1925
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
1755
1926
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
1756
- }), da = ({
1927
+ }), va = ({
1757
1928
  focusMode: e
1758
1929
  }) => g("focus:outline focus:outline-2 focus:outline-offset-2", {
1759
1930
  "focus:outline-focus-dark": e === "dark",
1760
1931
  "focus:outline-focus-light": e === "light",
1761
1932
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1762
1933
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1763
- }), ua = ({
1934
+ }), ka = ({
1764
1935
  noBorder: e,
1765
1936
  error: t
1766
1937
  }) => g("border-2", {
@@ -1768,7 +1939,7 @@ const ia = (e) => {
1768
1939
  "focus:border-border-dark": !e && t,
1769
1940
  "border-border-error-dark": !e && t,
1770
1941
  "border-transparent": e
1771
- }), ma = ({
1942
+ }), Sa = ({
1772
1943
  disabled: e,
1773
1944
  raw: t,
1774
1945
  error: r,
@@ -1792,7 +1963,7 @@ const ia = (e) => {
1792
1963
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
1793
1964
  "text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
1794
1965
  });
1795
- }, ha = ({
1966
+ }, Ta = ({
1796
1967
  error: e,
1797
1968
  raw: t,
1798
1969
  mode: r,
@@ -1819,7 +1990,7 @@ const ia = (e) => {
1819
1990
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
1820
1991
  "dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
1821
1992
  });
1822
- }, pa = ({
1993
+ }, Aa = ({
1823
1994
  className: e,
1824
1995
  inputClassName: t,
1825
1996
  raw: r,
@@ -1832,25 +2003,25 @@ const ia = (e) => {
1832
2003
  }) => {
1833
2004
  const d = r ? e : g(
1834
2005
  "relative flex w-full flex-col justify-center",
1835
- ca,
2006
+ wa,
1836
2007
  e,
1837
- ia(s)
2008
+ ba(s)
1838
2009
  ), h = r ? g(t) : g(
1839
- vt,
2010
+ St,
1840
2011
  t,
1841
2012
  "h-12 rounded-md px-4 text-base",
1842
- la({ mode: i }),
1843
- da({ focusMode: l }),
1844
- ua({ noBorder: n, error: o }),
2013
+ Ea({ mode: i }),
2014
+ va({ focusMode: l }),
2015
+ ka({ noBorder: n, error: o }),
1845
2016
  {
1846
2017
  "disabled:cursor-not-allowed disabled:opacity-50": a
1847
2018
  }
1848
- ), u = r ? void 0 : "sr-only", m = ma({
2019
+ ), u = r ? void 0 : "sr-only", m = Sa({
1849
2020
  disabled: a,
1850
2021
  raw: r,
1851
2022
  error: o,
1852
2023
  mode: i
1853
- }), p = ha({
2024
+ }), p = Ta({
1854
2025
  error: o,
1855
2026
  raw: r,
1856
2027
  mode: i,
@@ -1864,7 +2035,7 @@ const ia = (e) => {
1864
2035
  helperText: p,
1865
2036
  rightElement: r ? void 0 : "absolute right-3"
1866
2037
  };
1867
- }, Re = K.forwardRef(
2038
+ }, Oe = K.forwardRef(
1868
2039
  ({
1869
2040
  id: e,
1870
2041
  name: t,
@@ -1885,7 +2056,7 @@ const ia = (e) => {
1885
2056
  spacing: x,
1886
2057
  ...O
1887
2058
  }, _) => {
1888
- const S = W(null), [D, C] = U(0), N = ra({ id: e, prefix: `${vt}-` }), V = `${t} error, ${f}`, R = pa({
2059
+ const S = W(null), [D, C] = U(0), N = ha({ id: e, prefix: `${St}-` }), V = `${t} error, ${f}`, R = Aa({
1889
2060
  className: o,
1890
2061
  inputClassName: s,
1891
2062
  error: a,
@@ -1949,12 +2120,12 @@ const ia = (e) => {
1949
2120
  children: w
1950
2121
  }
1951
2122
  ),
1952
- a && f && /* @__PURE__ */ c(Et, { politeness: "polite", clearAnnouncementDelay: 500, children: V })
2123
+ a && f && /* @__PURE__ */ c(kt, { politeness: "polite", clearAnnouncementDelay: 500, children: V })
1953
2124
  ] });
1954
2125
  }
1955
2126
  );
1956
- Re.displayName = "TextInput";
1957
- const ga = 500, fa = 5e3, ya = 2e4, kt = K.forwardRef(
2127
+ Oe.displayName = "TextInput";
2128
+ const _a = 500, Ia = 5e3, xa = 2e4, Tt = K.forwardRef(
1958
2129
  ({
1959
2130
  name: e,
1960
2131
  disabled: t,
@@ -1972,19 +2143,19 @@ const ga = 500, fa = 5e3, ya = 2e4, kt = K.forwardRef(
1972
2143
  const [p, f] = U(!0), [w, x] = U({
1973
2144
  message: null,
1974
2145
  politeness: null
1975
- }), O = W(!0), _ = W(), S = W(null), D = ta([m, S]), C = p ? "Show" : "Hide", N = () => {
2146
+ }), O = W(!0), _ = W(), S = W(null), D = ma([m, S]), C = p ? "Show" : "Hide", N = () => {
1976
2147
  clearTimeout(_.current), O.current || (_.current = window.setTimeout(() => {
1977
2148
  O.current = !0, f(!0), x({
1978
- announcementTimeout: fa,
2149
+ announcementTimeout: Ia,
1979
2150
  politeness: "polite",
1980
2151
  message: `${r} hiding characters`
1981
2152
  }), n && n(!0);
1982
- }, ya));
2153
+ }, xa));
1983
2154
  }, V = (b) => {
1984
2155
  b.preventDefault();
1985
2156
  const A = !O.current;
1986
2157
  O.current = A, N(), f(A), x({
1987
- announcementTimeout: ga,
2158
+ announcementTimeout: _a,
1988
2159
  politeness: "assertive",
1989
2160
  message: A ? "Characters hidden" : "Characters showing"
1990
2161
  }), n && n(A);
@@ -2003,7 +2174,7 @@ const ga = 500, fa = 5e3, ya = 2e4, kt = K.forwardRef(
2003
2174
  clearTimeout(_.current);
2004
2175
  }, []), /* @__PURE__ */ T(q, { children: [
2005
2176
  /* @__PURE__ */ c(
2006
- Re,
2177
+ Oe,
2007
2178
  {
2008
2179
  ref: D,
2009
2180
  name: e,
@@ -2026,7 +2197,7 @@ const ga = 500, fa = 5e3, ya = 2e4, kt = K.forwardRef(
2026
2197
  }
2027
2198
  ),
2028
2199
  /* @__PURE__ */ c(
2029
- Et,
2200
+ kt,
2030
2201
  {
2031
2202
  role: "status",
2032
2203
  politeness: w.politeness,
@@ -2037,7 +2208,7 @@ const ga = 500, fa = 5e3, ya = 2e4, kt = K.forwardRef(
2037
2208
  ] });
2038
2209
  }
2039
2210
  );
2040
- kt.displayName = "TextInputMask";
2211
+ Tt.displayName = "TextInputMask";
2041
2212
  /*!
2042
2213
  @versini/ui-form v1.3.5
2043
2214
  © 2024 gizmette.com
@@ -2051,7 +2222,7 @@ try {
2051
2222
  });
2052
2223
  } catch {
2053
2224
  }
2054
- const ba = (e) => {
2225
+ const Na = (e) => {
2055
2226
  let t = "";
2056
2227
  if (typeof e == "number" || typeof e == "string")
2057
2228
  t = "m-" + e;
@@ -2060,7 +2231,7 @@ const ba = (e) => {
2060
2231
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2061
2232
  }
2062
2233
  return t;
2063
- }, Oe = ({
2234
+ }, De = ({
2064
2235
  children: e,
2065
2236
  fill: t,
2066
2237
  viewBox: r,
@@ -2072,7 +2243,7 @@ const ba = (e) => {
2072
2243
  semantic: l = !1,
2073
2244
  ...d
2074
2245
  }) => {
2075
- const h = ba(s), u = g(
2246
+ const h = Na(s), u = g(
2076
2247
  h,
2077
2248
  a || o
2078
2249
  );
@@ -2107,13 +2278,13 @@ try {
2107
2278
  });
2108
2279
  } catch {
2109
2280
  }
2110
- const wa = ({
2281
+ const Ca = ({
2111
2282
  className: e,
2112
2283
  viewBox: t,
2113
2284
  spacing: r,
2114
2285
  ...a
2115
2286
  }) => /* @__PURE__ */ c(
2116
- Oe,
2287
+ De,
2117
2288
  {
2118
2289
  defaultViewBox: "0 0 1200 500",
2119
2290
  defaultClassName: "w-full",
@@ -2132,7 +2303,7 @@ const wa = ({
2132
2303
  }
2133
2304
  ) })
2134
2305
  }
2135
- ), Ea = ({
2306
+ ), Ra = ({
2136
2307
  className: e,
2137
2308
  viewBox: t,
2138
2309
  spacing: r,
@@ -2140,7 +2311,7 @@ const wa = ({
2140
2311
  monotone: n,
2141
2312
  ...o
2142
2313
  }) => /* @__PURE__ */ T(
2143
- Oe,
2314
+ De,
2144
2315
  {
2145
2316
  defaultViewBox: "0 0 640 512",
2146
2317
  defaultClassName: "size-5",
@@ -2160,7 +2331,7 @@ const wa = ({
2160
2331
  /* @__PURE__ */ c("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z" })
2161
2332
  ]
2162
2333
  }
2163
- ), va = ({
2334
+ ), Oa = ({
2164
2335
  className: e,
2165
2336
  viewBox: t,
2166
2337
  spacing: r,
@@ -2168,7 +2339,7 @@ const wa = ({
2168
2339
  monotone: n,
2169
2340
  ...o
2170
2341
  }) => /* @__PURE__ */ T(
2171
- Oe,
2342
+ De,
2172
2343
  {
2173
2344
  defaultViewBox: "0 0 576 512",
2174
2345
  defaultClassName: "size-5",
@@ -2202,7 +2373,7 @@ try {
2202
2373
  });
2203
2374
  } catch {
2204
2375
  }
2205
- const ka = (e) => {
2376
+ const Da = (e) => {
2206
2377
  let t = "";
2207
2378
  if (typeof e == "number" || typeof e == "string")
2208
2379
  t = "m-" + e;
@@ -2211,10 +2382,10 @@ const ka = (e) => {
2211
2382
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2212
2383
  }
2213
2384
  return t;
2214
- }, Sa = "av-flexgrid", se = "av-flexgrid-item", ue = 0.25, St = K.createContext({
2385
+ }, $a = "av-flexgrid", se = "av-flexgrid-item", ue = 0.25, At = K.createContext({
2215
2386
  columnGap: 0,
2216
2387
  rowGap: 0
2217
- }), Ta = ({
2388
+ }), Ma = ({
2218
2389
  children: e,
2219
2390
  className: t,
2220
2391
  columnGap: r = 1,
@@ -2241,11 +2412,11 @@ const ka = (e) => {
2241
2412
  marginLeft: r * -1 * ue + "rem",
2242
2413
  marginTop: a * -1 * ue + "rem"
2243
2414
  }, m = g(
2244
- Sa,
2415
+ $a,
2245
2416
  t,
2246
2417
  "box-border flex flex-wrap"
2247
2418
  ), p = { columnGap: r, rowGap: a }, f = d ? "div" : K.Fragment;
2248
- return /* @__PURE__ */ c(f, { ...d ? { className: ka(d) } : {}, children: /* @__PURE__ */ c("div", { className: m, style: u, ...h, children: /* @__PURE__ */ c(St.Provider, { value: p, children: e }) }) });
2419
+ return /* @__PURE__ */ c(f, { ...d ? { className: Da(d) } : {}, children: /* @__PURE__ */ c("div", { className: m, style: u, ...h, children: /* @__PURE__ */ c(At.Provider, { value: p, children: e }) }) });
2249
2420
  }, Ae = (e, t) => g({
2250
2421
  "basis-1/12": e === 1 && !t,
2251
2422
  "sm:basis-1/12": e === 1 && t === "sm",
@@ -2319,7 +2490,7 @@ const ka = (e) => {
2319
2490
  "lg:basis-full": e === 12 && t === "lg",
2320
2491
  "xl:basis-full": e === 12 && t === "xl",
2321
2492
  "2xl:basis-full": e === 12 && t === "2xl"
2322
- }), Aa = ({
2493
+ }), La = ({
2323
2494
  className: e,
2324
2495
  span: t
2325
2496
  }) => {
@@ -2348,10 +2519,10 @@ const ka = (e) => {
2348
2519
  span: r,
2349
2520
  ...a
2350
2521
  }) => {
2351
- const { columnGap: n, rowGap: o } = Xe(St), s = {
2522
+ const { columnGap: n, rowGap: o } = Ze(At), s = {
2352
2523
  paddingLeft: n * ue + "rem",
2353
2524
  paddingTop: o * ue + "rem"
2354
- }, i = Aa({
2525
+ }, i = La({
2355
2526
  className: t,
2356
2527
  span: r
2357
2528
  });
@@ -2370,7 +2541,7 @@ try {
2370
2541
  });
2371
2542
  } catch {
2372
2543
  }
2373
- const _a = "ASK! ME! ANYTHING!", Tt = "Sassy Saint", Ia = "gizmette.com", xa = "Log in", $n = "Log out", Na = "Password", Ca = "Powered by OpenAI", Mn = "Send", Ln = "Profile", Pn = "Statistics", Un = "Chat history", Hn = "About", Kn = "Type your question here", Bn = "Clear chat", Wn = "Cancel chat", jn = "N/A", Gn = {
2544
+ const Pa = "ASK! ME! ANYTHING!", _t = "Sassy Saint", Ua = "gizmette.com", Ha = "Log in", Vn = "Log out", Ka = "Password", Ba = "Powered by OpenAI", Jn = "Send", Fn = "Profile", zn = "Statistics", Yn = "Chat history", qn = "About", Qn = "Type your question here", Xn = "Clear chat", Zn = "Cancel chat", eo = "N/A", to = {
2374
2545
  PREFERENCES: {
2375
2546
  TITLE: "User preferences",
2376
2547
  NAME: "Name",
@@ -2402,211 +2573,40 @@ const _a = "ASK! ME! ANYTHING!", Tt = "Sassy Saint", Ia = "gizmette.com", xa = "
2402
2573
  ENGINE: "OpenAI model",
2403
2574
  PLUGIN: "Plugin"
2404
2575
  }
2405
- }, Qe = (e) => Number.isFinite(e) ? e : 0;
2406
- function Ra(e) {
2407
- return {
2408
- days: Math.trunc(e / 864e5),
2409
- hours: Math.trunc(e / 36e5 % 24),
2410
- minutes: Math.trunc(e / 6e4 % 60),
2411
- seconds: Math.trunc(e / 1e3 % 60),
2412
- milliseconds: Math.trunc(e % 1e3),
2413
- microseconds: Math.trunc(Qe(e * 1e3) % 1e3),
2414
- nanoseconds: Math.trunc(Qe(e * 1e6) % 1e3)
2415
- };
2416
- }
2417
- function Oa(e) {
2418
- return {
2419
- days: e / 86400000n,
2420
- hours: e / 3600000n % 24n,
2421
- minutes: e / 60000n % 60n,
2422
- seconds: e / 1000n % 60n,
2423
- milliseconds: e % 1000n,
2424
- microseconds: 0n,
2425
- nanoseconds: 0n
2426
- };
2427
- }
2428
- function Da(e) {
2429
- switch (typeof e) {
2430
- case "number": {
2431
- if (Number.isFinite(e))
2432
- return Ra(e);
2433
- break;
2434
- }
2435
- case "bigint":
2436
- return Oa(e);
2437
- }
2438
- throw new TypeError("Expected a finite number or bigint");
2439
- }
2440
- const $a = (e) => e === 0 || e === 0n, Ma = (e, t) => t === 1 || t === 1n ? e : `${e}s`, La = 1e-7, Pa = 24n * 60n * 60n * 1000n;
2441
- function Ua(e, t) {
2442
- const r = typeof e == "bigint";
2443
- if (!r && !Number.isFinite(e))
2444
- throw new TypeError("Expected a finite number or bigint");
2445
- t = { ...t }, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
2446
- let a = [];
2447
- const n = (d, h) => {
2448
- const u = Math.floor(d * 10 ** h + La);
2449
- return (Math.round(u) / 10 ** h).toFixed(h);
2450
- }, o = (d, h, u, m) => {
2451
- if (!((a.length === 0 || !t.colonNotation) && $a(d) && !(t.colonNotation && u === "m"))) {
2452
- if (m = m ?? String(d), t.colonNotation) {
2453
- const p = m.includes(".") ? m.split(".")[0].length : m.length, f = a.length > 0 ? 2 : 1;
2454
- m = "0".repeat(Math.max(0, f - p)) + m;
2455
- } else
2456
- m += t.verbose ? " " + Ma(h, d) : u;
2457
- a.push(m);
2458
- }
2459
- }, s = Da(e), i = BigInt(s.days);
2460
- if (o(i / 365n, "year", "y"), o(i % 365n, "day", "d"), o(Number(s.hours), "hour", "h"), o(Number(s.minutes), "minute", "m"), t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
2461
- const d = Number(s.seconds), h = Number(s.milliseconds), u = Number(s.microseconds), m = Number(s.nanoseconds);
2462
- if (o(d, "second", "s"), t.formatSubMilliseconds)
2463
- o(h, "millisecond", "ms"), o(u, "microsecond", "µs"), o(m, "nanosecond", "ns");
2464
- else {
2465
- const p = h + u / 1e3 + m / 1e6, f = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, w = p >= 1 ? Math.round(p) : Math.ceil(p), x = f ? p.toFixed(f) : w;
2466
- o(
2467
- Number.parseFloat(x),
2468
- "millisecond",
2469
- "ms",
2470
- x
2471
- );
2472
- }
2473
- } else {
2474
- const d = (r ? Number(e % Pa) : e) / 1e3 % 60, h = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, u = n(d, h), m = t.keepDecimalsOnWholeSeconds ? u : u.replace(/\.0+$/, "");
2475
- o(Number.parseFloat(m), "second", "s", m);
2476
- }
2477
- if (a.length === 0)
2478
- return "0" + (t.verbose ? " milliseconds" : "ms");
2479
- const l = t.colonNotation ? ":" : " ";
2480
- return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), a.join(l);
2481
- }
2482
- const Ha = process.env.NODE_ENV === "production", At = !Ha, Vn = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, _t = (e, t) => {
2483
- const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N", a = 0 | Math.abs(e), n = 0 | Math.abs(e) * 60 % 60, o = (0 | Math.abs(e) * 60 % 1 * 6e3) / 100;
2484
- return {
2485
- dir: r,
2486
- deg: a,
2487
- min: n,
2488
- sec: o
2489
- };
2490
- }, Jn = (e) => {
2491
- if (!e && e !== 0)
2492
- return "N/A";
2493
- const t = _t(e, !1);
2494
- return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
2495
- }, Fn = (e) => {
2496
- if (!e && e !== 0)
2497
- return "N/A";
2498
- const t = _t(e, !0);
2499
- return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
2500
- }, zn = async () => {
2501
- const e = {
2502
- /**
2503
- * A boolean value that indicates the application would
2504
- * like to receive the best possible results. If true
2505
- * and if the device is able to provide a more accurate
2506
- * position, it will do so. Note that this can result in
2507
- * slower response times or increased power consumption
2508
- * (with a GPS chip on a mobile device for example). On
2509
- * the other hand, if false, the device can take the
2510
- * liberty to save resources by responding more quickly
2511
- * and/or using less power. Default: false.
2512
- */
2513
- enableHighAccuracy: !1,
2514
- /**
2515
- * A positive long value representing the maximum length
2516
- * of time (in milliseconds) the device is allowed to
2517
- * take in order to return a position. The default value
2518
- * is Infinity, meaning that getCurrentPosition() won't
2519
- * return until the position is available.
2520
- */
2521
- timeout: 1e4,
2522
- /**
2523
- * A positive long value indicating the maximum age in
2524
- * milliseconds of a possible cached position that is
2525
- * acceptable to return. If set to 0, it means that the
2526
- * device cannot use a cached position and must attempt
2527
- * to retrieve the real current position. If set to
2528
- * Infinity the device must return a cached position
2529
- * regardless of its age. Default: 0.
2530
- */
2531
- maximumAge: 6e4
2532
- };
2533
- return new Promise((t, r) => {
2534
- var a;
2535
- (a = navigator == null ? void 0 : navigator.geolocation) == null || a.getCurrentPosition(
2536
- (n) => {
2537
- t({
2538
- latitude: n.coords.latitude,
2539
- longitude: n.coords.longitude,
2540
- accuracy: n.coords.accuracy
2541
- });
2542
- },
2543
- (n) => {
2544
- r(n);
2545
- },
2546
- e
2547
- );
2548
- });
2549
- }, Yn = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ c("dl", { className: "my-0", children: /* @__PURE__ */ T("div", { className: "flex items-center justify-between", children: [
2550
- /* @__PURE__ */ c("dt", { className: "inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
2551
- /* @__PURE__ */ c("dd", { className: "inline-block", children: t[r] })
2552
- ] }) }, `${e}-${r}`)) : null;
2553
- function qn({
2554
- data: e,
2555
- formatter: t = (r) => r
2556
- }) {
2557
- const r = e.filter(
2558
- (n) => typeof n == "number" && n > 0
2559
- ), a = r.reduce(
2560
- (n, o) => (n || 0) + (o || 0),
2561
- 0
2562
- );
2563
- return t(a ? a / r.length : 0);
2564
- }
2565
- const Qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Xn = new Intl.NumberFormat("en", {
2566
- style: "decimal",
2567
- signDisplay: "never",
2568
- minimumFractionDigits: 0,
2569
- maximumFractionDigits: 0
2570
- }), Zn = (e) => Ua(e, {
2571
- secondsDecimalDigits: 2,
2572
- unitCount: 2
2573
- }), Ka = (e) => g(
2574
- "flex-1 space-y-6 overflow-y-auto rounded-md bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
2575
- e || At ? "pt-4" : "pt-10"
2576
- ), eo = (e, t) => t === 1 ? e : `${e}s`, Ba = ({
2576
+ }, Wa = ({
2577
2577
  serverStats: e
2578
2578
  }) => /* @__PURE__ */ c(
2579
- Zr,
2579
+ da,
2580
2580
  {
2581
2581
  mode: "light",
2582
2582
  row1: /* @__PURE__ */ T("div", { children: [
2583
- Tt,
2583
+ _t,
2584
2584
  " v",
2585
- "3.1.2",
2585
+ "3.2.1",
2586
2586
  " - ",
2587
- Ca,
2588
- At && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
2587
+ Ba,
2588
+ Ne && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
2589
2589
  ] }),
2590
2590
  row2: /* @__PURE__ */ T("div", { children: [
2591
2591
  "© ",
2592
2592
  (/* @__PURE__ */ new Date()).getFullYear(),
2593
2593
  " ",
2594
- Ia
2594
+ Ua
2595
2595
  ] })
2596
2596
  }
2597
- ), Wa = Ze(() => import("./LazyHeader.B1723ukv.js")), ja = () => {
2597
+ ), ja = et(() => import("./LazyHeader.D3qbUck7.js")), Ga = () => {
2598
2598
  const { isAuthenticated: e } = xe();
2599
2599
  return /* @__PURE__ */ T(q, { children: [
2600
- e && /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Wa, {}) }),
2600
+ e && /* @__PURE__ */ c(tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(ja, {}) }),
2601
2601
  /* @__PURE__ */ T("div", { className: "flex items-center justify-center", children: [
2602
- /* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(wa, {}) }),
2602
+ /* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(Ca, {}) }),
2603
2603
  /* @__PURE__ */ T("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
2604
- /* @__PURE__ */ c("h1", { children: Tt }),
2605
- /* @__PURE__ */ c("h2", { children: _a })
2604
+ /* @__PURE__ */ c("h1", { children: _t }),
2605
+ /* @__PURE__ */ c("h2", { children: Pa })
2606
2606
  ] })
2607
2607
  ] })
2608
2608
  ] });
2609
- }, Ga = () => {
2609
+ }, Va = () => {
2610
2610
  const { login: e, logoutReason: t } = xe(), [r, a] = U(""), [n, o] = U(""), [s, i] = U(!0), [l, d] = U({
2611
2611
  username: "",
2612
2612
  password: ""
@@ -2626,12 +2626,12 @@ const Qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2626
2626
  }), z(() => {
2627
2627
  t && o(t);
2628
2628
  }, [t]), /* @__PURE__ */ T(q, { children: [
2629
- /* @__PURE__ */ T(ea, { children: [
2630
- /* @__PURE__ */ c("div", { className: Ka(), children: /* @__PURE__ */ c(ja, {}) }),
2631
- /* @__PURE__ */ c("form", { className: "mx-auto mt-5", onSubmit: h, children: /* @__PURE__ */ T(Ta, { rowGap: 7, width: "350px", children: [
2629
+ /* @__PURE__ */ T(ua, { children: [
2630
+ /* @__PURE__ */ c("div", { className: Zr(), children: /* @__PURE__ */ c(Ga, {}) }),
2631
+ /* @__PURE__ */ c("form", { className: "mx-auto mt-5", onSubmit: h, children: /* @__PURE__ */ T(Ma, { rowGap: 7, width: "350px", children: [
2632
2632
  /* @__PURE__ */ c(ie, { span: 12, children: n && /* @__PURE__ */ c("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: n }) }),
2633
2633
  /* @__PURE__ */ c(ie, { span: 12, children: /* @__PURE__ */ c(
2634
- Re,
2634
+ Oe,
2635
2635
  {
2636
2636
  required: !0,
2637
2637
  autoCapitalize: "off",
@@ -2651,7 +2651,7 @@ const Qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2651
2651
  }
2652
2652
  ) }),
2653
2653
  /* @__PURE__ */ c(ie, { span: 12, children: /* @__PURE__ */ c(
2654
- kt,
2654
+ Tt,
2655
2655
  {
2656
2656
  required: !0,
2657
2657
  autoCapitalize: "off",
@@ -2660,8 +2660,8 @@ const Qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2660
2660
  mode: "dark",
2661
2661
  focusMode: "light",
2662
2662
  name: "password",
2663
- label: Na,
2664
- rightElement: /* @__PURE__ */ c(ft, { focusMode: "light", children: s ? /* @__PURE__ */ c(va, {}) : /* @__PURE__ */ c(Ea, {}) }),
2663
+ label: Ka,
2664
+ rightElement: /* @__PURE__ */ c(bt, { focusMode: "light", children: s ? /* @__PURE__ */ c(Oa, {}) : /* @__PURE__ */ c(Ra, {}) }),
2665
2665
  onMaskChange: i,
2666
2666
  onChange: (u) => {
2667
2667
  d({
@@ -2674,98 +2674,99 @@ const Qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2674
2674
  }
2675
2675
  ) }),
2676
2676
  /* @__PURE__ */ c(ie, { span: 12, children: /* @__PURE__ */ c(
2677
- yt,
2677
+ wt,
2678
2678
  {
2679
2679
  focusMode: "light",
2680
2680
  fullWidth: !0,
2681
2681
  noBorder: !0,
2682
2682
  type: "submit",
2683
2683
  className: "mb-4 mt-6",
2684
- children: xa
2684
+ children: Ha
2685
2685
  }
2686
2686
  ) })
2687
2687
  ] }) })
2688
2688
  ] }),
2689
- /* @__PURE__ */ c(Ba, {})
2689
+ /* @__PURE__ */ c(Wa, {})
2690
2690
  ] });
2691
- }, Va = Ze(() => import("./App.DJozcBeB.js").then((e) => e.App)), Ja = ({ isComponent: e }) => {
2691
+ }, Ja = et(() => import("./App.pFoMWtnP.js").then((e) => e.App)), Fa = ({ isComponent: e }) => {
2692
2692
  const { isAuthenticated: t } = xe();
2693
- return t ? /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Va, { isComponent: e }) }) : /* @__PURE__ */ c(Ga, {});
2694
- }, Fa = ({
2695
- isComponent: e = !1
2696
- }) => /* @__PURE__ */ c(q, { children: /* @__PURE__ */ c(Br, { clientId: Wr, children: /* @__PURE__ */ c(Ja, { isComponent: e }) }) }), to = () => /* @__PURE__ */ c(Fa, { isComponent: !0 });
2693
+ return t ? /* @__PURE__ */ c(tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Ja, { isComponent: e }) }) : /* @__PURE__ */ c(Va, {});
2694
+ }, za = ({
2695
+ isComponent: e = !1,
2696
+ domain: t = Xr
2697
+ }) => /* @__PURE__ */ c(q, { children: /* @__PURE__ */ c(Br, { clientId: Wr, domain: t, children: /* @__PURE__ */ c(Fa, { isComponent: e }) }) }), ro = ({ domain: e }) => /* @__PURE__ */ c(za, { isComponent: !0, domain: e });
2697
2698
  export {
2698
- gt as A,
2699
- Hn as ABOUT_TITLE,
2700
- pn as ACTION_LOCATION,
2701
- dn as ACTION_MESSAGE,
2702
- mn as ACTION_MODEL,
2703
- un as ACTION_RESET,
2704
- hn as ACTION_RESTORE,
2705
- fn as ACTION_SEARCH,
2706
- yn as ACTION_SORT,
2707
- gn as ACTION_STREAMING,
2708
- Ba as AppFooter,
2709
- Wn as CANCEL,
2710
- Gn as CARDS,
2711
- Bn as CLEAR,
2712
- An as E,
2713
- sn as ERROR_MESSAGE,
2714
- Re as G,
2715
- ln as GPT4_MAX_TOKENS,
2716
- Un as HISTORY_TITLE,
2717
- wn as LOCAL_STORAGE_CHAT_DETAILS,
2718
- kn as LOCAL_STORAGE_LOCATION,
2719
- bn as LOCAL_STORAGE_PREFIX,
2720
- En as LOCAL_STORAGE_SEARCH,
2721
- vn as LOCAL_STORAGE_SORT,
2722
- $n as LOG_OUT,
2723
- ra as M,
2724
- cn as MODEL_GPT4,
2725
- ja as MessagesContainerHeader,
2726
- _n as N,
2727
- jn as NA,
2728
- ft as O,
2729
- Ln as PROFILE_TITLE,
2730
- rn as ROLE_ASSISTANT,
2731
- on as ROLE_HIDDEN,
2732
- nn as ROLE_INTERNAL,
2733
- an as ROLE_SYSTEM,
2734
- tn as ROLE_USER,
2735
- Ne as S,
2736
- Mn as SEND,
2737
- Pn as STATS,
2738
- Sn as STATS_SEPARATOR,
2739
- to as SassySaint,
2740
- Kn as TYPE_QUESTION,
2741
- Et as U,
2742
- Rn as a,
2743
- Ta as b,
2744
- ea as c,
2745
- xn as c$1,
2746
- Jn as convertLatitudeToDMS,
2747
- Fn as convertLongitudeToDMS,
2699
+ yt as A,
2700
+ qn as ABOUT_TITLE,
2701
+ gn as ACTION_LOCATION,
2702
+ un as ACTION_MESSAGE,
2703
+ hn as ACTION_MODEL,
2704
+ mn as ACTION_RESET,
2705
+ pn as ACTION_RESTORE,
2706
+ yn as ACTION_SEARCH,
2707
+ bn as ACTION_SORT,
2708
+ fn as ACTION_STREAMING,
2709
+ Wa as AppFooter,
2710
+ Zn as CANCEL,
2711
+ to as CARDS,
2712
+ Xn as CLEAR,
2713
+ Ln as E,
2714
+ cn as ERROR_MESSAGE,
2715
+ Oe as G,
2716
+ dn as GPT4_MAX_TOKENS,
2717
+ Yn as HISTORY_TITLE,
2718
+ En as LOCAL_STORAGE_CHAT_DETAILS,
2719
+ Sn as LOCAL_STORAGE_LOCATION,
2720
+ wn as LOCAL_STORAGE_PREFIX,
2721
+ vn as LOCAL_STORAGE_SEARCH,
2722
+ kn as LOCAL_STORAGE_SORT,
2723
+ Vn as LOG_OUT,
2724
+ ha as M,
2725
+ ln as MODEL_GPT4,
2726
+ Ga as MessagesContainerHeader,
2727
+ Pn as N,
2728
+ eo as NA,
2729
+ bt as O,
2730
+ Fn as PROFILE_TITLE,
2731
+ an as ROLE_ASSISTANT,
2732
+ sn as ROLE_HIDDEN,
2733
+ on as ROLE_INTERNAL,
2734
+ nn as ROLE_SYSTEM,
2735
+ rn as ROLE_USER,
2736
+ Ce as S,
2737
+ Jn as SEND,
2738
+ zn as STATS,
2739
+ Tn as STATS_SEPARATOR,
2740
+ ro as SassySaint,
2741
+ Qn as TYPE_QUESTION,
2742
+ kt as U,
2743
+ Wn as a,
2744
+ Ma as b,
2745
+ ua as c,
2746
+ Hn as c$1,
2747
+ _n as convertLatitudeToDMS,
2748
+ In as convertLongitudeToDMS,
2748
2749
  xe as dr,
2749
- Zn as durationFormatter,
2750
- qn as extractAverage,
2751
- ht as f,
2752
- ta as f$1,
2753
- Oe as g,
2754
- zn as getCurrentGeoLocation,
2755
- Ka as getMessageContaintWrapperClass,
2756
- Ce as i,
2757
- In as i$1,
2758
- Qn as isLastMessageFromRole,
2750
+ Dn as durationFormatter,
2751
+ Cn as extractAverage,
2752
+ gt as f,
2753
+ ma as f$1,
2754
+ De as g,
2755
+ xn as getCurrentGeoLocation,
2756
+ Zr as getMessageContaintWrapperClass,
2757
+ Re as i,
2758
+ Un as i$1,
2759
+ Rn as isLastMessageFromRole,
2759
2760
  ie as j,
2760
- On as l,
2761
- Nn as n,
2762
- Xn as numberFormatter,
2763
- ia as o,
2764
- Dn as p,
2765
- eo as pluralize,
2766
- Cn as r,
2767
- Yn as renderDataAsList,
2768
- Tn as s,
2769
- Vn as truncate,
2770
- yt as x
2761
+ jn as l,
2762
+ Kn as n,
2763
+ On as numberFormatter,
2764
+ ba as o,
2765
+ Gn as p,
2766
+ $n as pluralize,
2767
+ Bn as r,
2768
+ Nn as renderDataAsList,
2769
+ Mn as s,
2770
+ An as truncate,
2771
+ wt as x
2771
2772
  };