@versini/sassysaint 1.0.0 → 1.0.2

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,29 +1,29 @@
1
- import { jsx as c, jsxs as S, Fragment as q } from "react/jsx-runtime";
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 It, useRef as B, useState as U, useCallback as Me, useEffect as z, useContext as Xe, useMemo as xt, useId as Nt, useReducer as Ct, useLayoutEffect as Rt, lazy as Ze, Suspense as et } 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";
4
4
  import g from "clsx";
5
- var Ot = Object.defineProperty, Dt = (e, t, r) => t in e ? Ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ye = (e, t, r) => (Dt(e, typeof t != "symbol" ? t + "" : t, r), r);
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
  /*!
7
- @versini/auth-provider v5.0.5
7
+ @versini/auth-provider v5.1.1
8
8
  © 2024 gizmette.com
9
9
  */
10
10
  try {
11
11
  window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
12
- version: "5.0.5",
13
- buildTime: "07/05/2024 02:22 PM EDT",
12
+ version: "5.1.1",
13
+ buildTime: "07/07/2024 10:59 AM EDT",
14
14
  homepage: "https://github.com/aversini/auth-client",
15
15
  license: "MIT"
16
16
  });
17
17
  } catch {
18
18
  }
19
19
  /*!
20
- @versini/auth-common v2.10.1
20
+ @versini/auth-common v2.11.0
21
21
  © 2024 gizmette.com
22
22
  */
23
23
  try {
24
24
  window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
25
- version: "2.10.1",
26
- buildTime: "07/05/2024 02:22 PM EDT",
25
+ version: "2.11.0",
26
+ buildTime: "07/07/2024 10:59 AM EDT",
27
27
  homepage: "https://github.com/aversini/auth-client",
28
28
  license: "MIT"
29
29
  });
@@ -37,14 +37,14 @@ const Q = {
37
37
  REFRESH_TOKEN: "refresh_token"
38
38
  }, Mt = {
39
39
  CLIENT_ID: "X-Auth-ClientId"
40
- }, N = {
40
+ }, I = {
41
41
  ALG: "RS256",
42
42
  USER_ID_KEY: "sub",
43
43
  TOKEN_ID_KEY: "__raw",
44
44
  NONCE_KEY: "_nonce",
45
45
  USERNAME_KEY: "username",
46
46
  ISSUER: "gizmette.com"
47
- }, $t = `-----BEGIN PUBLIC KEY-----
47
+ }, Lt = `-----BEGIN PUBLIC KEY-----
48
48
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
49
49
  w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
50
50
  i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
@@ -52,33 +52,33 @@ aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
52
52
  l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
53
53
  sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
54
54
  awIDAQAB
55
- -----END PUBLIC KEY-----`, he = {
55
+ -----END PUBLIC KEY-----`, me = {
56
56
  AUTHENTICATE: "authenticate",
57
57
  CODE: "code",
58
58
  LOGOUT: "logout"
59
- }, pe = crypto, tt = (e) => e instanceof CryptoKey, Z = new TextEncoder(), ge = new TextDecoder();
60
- function Lt(...e) {
59
+ }, he = crypto, tt = (e) => e instanceof CryptoKey, X = new TextEncoder(), pe = new TextDecoder();
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;
63
63
  for (const n of e)
64
64
  r.set(n, a), a += n.length;
65
65
  return r;
66
66
  }
67
- const Pt = (e) => {
67
+ const Ut = (e) => {
68
68
  const t = atob(e), r = new Uint8Array(t.length);
69
69
  for (let a = 0; a < t.length; a++)
70
70
  r[a] = t.charCodeAt(a);
71
71
  return r;
72
- }, le = (e) => {
72
+ }, ce = (e) => {
73
73
  let t = e;
74
- t instanceof Uint8Array && (t = ge.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
74
+ t instanceof Uint8Array && (t = pe.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
75
75
  try {
76
- return Pt(t);
76
+ return Ut(t);
77
77
  } catch {
78
78
  throw new TypeError("The input to be decoded is not correctly encoded.");
79
79
  }
80
80
  };
81
- let W = class extends Error {
81
+ let j = class extends Error {
82
82
  static get code() {
83
83
  return "ERR_JOSE_GENERIC";
84
84
  }
@@ -86,7 +86,7 @@ let W = class extends Error {
86
86
  var r;
87
87
  super(t), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (r = Error.captureStackTrace) == null || r.call(Error, this, this.constructor);
88
88
  }
89
- }, $ = class extends W {
89
+ }, M = class extends j {
90
90
  static get code() {
91
91
  return "ERR_JWT_CLAIM_VALIDATION_FAILED";
92
92
  }
@@ -94,7 +94,7 @@ let W = 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 $e extends W {
97
+ class Me extends j {
98
98
  static get code() {
99
99
  return "ERR_JWT_EXPIRED";
100
100
  }
@@ -102,7 +102,7 @@ class $e extends W {
102
102
  super(t), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
103
103
  }
104
104
  }
105
- class Ut extends W {
105
+ class Ht extends j {
106
106
  constructor() {
107
107
  super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
108
108
  }
@@ -110,14 +110,14 @@ class Ut extends W {
110
110
  return "ERR_JOSE_ALG_NOT_ALLOWED";
111
111
  }
112
112
  }
113
- let H = class extends W {
113
+ let H = class extends j {
114
114
  constructor() {
115
115
  super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
116
116
  }
117
117
  static get code() {
118
118
  return "ERR_JOSE_NOT_SUPPORTED";
119
119
  }
120
- }, k = class extends W {
120
+ }, k = class extends j {
121
121
  constructor() {
122
122
  super(...arguments), this.code = "ERR_JWS_INVALID";
123
123
  }
@@ -125,7 +125,7 @@ let H = class extends W {
125
125
  return "ERR_JWS_INVALID";
126
126
  }
127
127
  };
128
- class rt extends W {
128
+ class rt extends j {
129
129
  constructor() {
130
130
  super(...arguments), this.code = "ERR_JWT_INVALID";
131
131
  }
@@ -133,7 +133,7 @@ class rt extends W {
133
133
  return "ERR_JWT_INVALID";
134
134
  }
135
135
  }
136
- class Ht extends W {
136
+ class Kt extends j {
137
137
  constructor() {
138
138
  super(...arguments), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED", this.message = "signature verification failed";
139
139
  }
@@ -144,13 +144,13 @@ class Ht extends W {
144
144
  function L(e, t = "algorithm.name") {
145
145
  return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
146
146
  }
147
- function ee(e, t) {
147
+ function Z(e, t) {
148
148
  return e.name === t;
149
149
  }
150
150
  function be(e) {
151
151
  return parseInt(e.name.slice(4), 10);
152
152
  }
153
- function Kt(e) {
153
+ function Bt(e) {
154
154
  switch (e) {
155
155
  case "ES256":
156
156
  return "P-256";
@@ -162,7 +162,7 @@ function Kt(e) {
162
162
  throw new Error("unreachable");
163
163
  }
164
164
  }
165
- function Bt(e, t) {
165
+ function Wt(e, t) {
166
166
  if (t.length && !t.some((r) => e.usages.includes(r))) {
167
167
  let r = "CryptoKey does not support this operation, its usages must include ";
168
168
  if (t.length > 2) {
@@ -173,12 +173,12 @@ function Bt(e, t) {
173
173
  throw new TypeError(r);
174
174
  }
175
175
  }
176
- function Wt(e, t, ...r) {
176
+ function jt(e, t, ...r) {
177
177
  switch (t) {
178
178
  case "HS256":
179
179
  case "HS384":
180
180
  case "HS512": {
181
- if (!ee(e.algorithm, "HMAC"))
181
+ if (!Z(e.algorithm, "HMAC"))
182
182
  throw L("HMAC");
183
183
  const a = parseInt(t.slice(2), 10);
184
184
  if (be(e.algorithm.hash) !== a)
@@ -188,7 +188,7 @@ function Wt(e, t, ...r) {
188
188
  case "RS256":
189
189
  case "RS384":
190
190
  case "RS512": {
191
- if (!ee(e.algorithm, "RSASSA-PKCS1-v1_5"))
191
+ if (!Z(e.algorithm, "RSASSA-PKCS1-v1_5"))
192
192
  throw L("RSASSA-PKCS1-v1_5");
193
193
  const a = parseInt(t.slice(2), 10);
194
194
  if (be(e.algorithm.hash) !== a)
@@ -198,7 +198,7 @@ function Wt(e, t, ...r) {
198
198
  case "PS256":
199
199
  case "PS384":
200
200
  case "PS512": {
201
- if (!ee(e.algorithm, "RSA-PSS"))
201
+ if (!Z(e.algorithm, "RSA-PSS"))
202
202
  throw L("RSA-PSS");
203
203
  const a = parseInt(t.slice(2), 10);
204
204
  if (be(e.algorithm.hash) !== a)
@@ -213,9 +213,9 @@ function Wt(e, t, ...r) {
213
213
  case "ES256":
214
214
  case "ES384":
215
215
  case "ES512": {
216
- if (!ee(e.algorithm, "ECDSA"))
216
+ if (!Z(e.algorithm, "ECDSA"))
217
217
  throw L("ECDSA");
218
- const a = Kt(t);
218
+ const a = Bt(t);
219
219
  if (e.algorithm.namedCurve !== a)
220
220
  throw L(a, "algorithm.namedCurve");
221
221
  break;
@@ -223,7 +223,7 @@ function Wt(e, t, ...r) {
223
223
  default:
224
224
  throw new TypeError("CryptoKey does not support this operation");
225
225
  }
226
- Bt(e, r);
226
+ Wt(e, r);
227
227
  }
228
228
  function at(e, t, ...r) {
229
229
  var a;
@@ -238,7 +238,7 @@ const Le = (e, ...t) => at("Key must be ", e, ...t);
238
238
  function nt(e, t, ...r) {
239
239
  return at(`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", ue = ["CryptoKey"], jt = (...e) => {
241
+ const ot = (e) => tt(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;
@@ -257,11 +257,11 @@ const ot = (e) => tt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
257
257
  }
258
258
  return !0;
259
259
  };
260
- function Gt(e) {
260
+ function Vt(e) {
261
261
  return typeof e == "object" && e !== null;
262
262
  }
263
263
  function _e(e) {
264
- if (!Gt(e) || Object.prototype.toString.call(e) !== "[object Object]")
264
+ if (!Vt(e) || Object.prototype.toString.call(e) !== "[object Object]")
265
265
  return !1;
266
266
  if (Object.getPrototypeOf(e) === null)
267
267
  return !0;
@@ -270,14 +270,14 @@ function _e(e) {
270
270
  t = Object.getPrototypeOf(t);
271
271
  return Object.getPrototypeOf(e) === t;
272
272
  }
273
- const Vt = (e, t) => {
273
+ const Jt = (e, t) => {
274
274
  if (e.startsWith("RS") || e.startsWith("PS")) {
275
275
  const { modulusLength: r } = t.algorithm;
276
276
  if (typeof r != "number" || r < 2048)
277
277
  throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
278
278
  }
279
279
  };
280
- function Jt(e) {
280
+ function Ft(e) {
281
281
  let t, r;
282
282
  switch (e.kty) {
283
283
  case "RSA": {
@@ -349,36 +349,36 @@ function Jt(e) {
349
349
  }
350
350
  return { algorithm: t, keyUsages: r };
351
351
  }
352
- const Ft = async (e) => {
352
+ const zt = async (e) => {
353
353
  if (!e.alg)
354
354
  throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
355
- const { algorithm: t, keyUsages: r } = Jt(e), a = [
355
+ const { algorithm: t, keyUsages: r } = Ft(e), a = [
356
356
  t,
357
357
  e.ext ?? !1,
358
358
  e.key_ops ?? r
359
359
  ], n = { ...e };
360
- return delete n.alg, delete n.use, pe.subtle.importKey("jwk", n, ...a);
361
- }, st = (e) => le(e);
360
+ return delete n.alg, delete n.use, he.subtle.importKey("jwk", n, ...a);
361
+ }, st = (e) => ce(e);
362
362
  let we, Ee;
363
363
  const it = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", ct = 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
- const o = await Ft({ ...r, alg: a });
367
+ const o = await zt({ ...r, alg: a });
368
368
  return n ? n[a] = o : e.set(t, { [a]: o }), o;
369
- }, zt = (e, t) => {
369
+ }, Yt = (e, t) => {
370
370
  if (it(e)) {
371
371
  let r = e.export({ format: "jwk" });
372
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));
373
373
  }
374
374
  return e;
375
- }, Yt = (e, t) => {
375
+ }, qt = (e, t) => {
376
376
  if (it(e)) {
377
377
  let r = e.export({ format: "jwk" });
378
378
  return r.k ? st(r.k) : (we || (we = /* @__PURE__ */ new WeakMap()), ct(we, e, r, t));
379
379
  }
380
380
  return e;
381
- }, qt = { normalizePublicKey: zt, normalizePrivateKey: Yt }, P = (e, t, r = 0) => {
381
+ }, Qt = { normalizePublicKey: Yt, normalizePrivateKey: qt }, P = (e, t, r = 0) => {
382
382
  r === 0 && (t.unshift(t.length), t.unshift(6));
383
383
  const a = e.indexOf(t[0], r);
384
384
  if (a === -1)
@@ -404,7 +404,7 @@ const it = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
404
404
  default:
405
405
  throw new H("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
406
406
  }
407
- }, Qt = async (e, t, r, a, n) => {
407
+ }, Xt = async (e, t, r, a, n) => {
408
408
  let o, s;
409
409
  const i = new Uint8Array(atob(r.replace(e, "")).split("").map((l) => l.charCodeAt(0)));
410
410
  switch (a) {
@@ -450,33 +450,33 @@ const it = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
450
450
  default:
451
451
  throw new H('Invalid or unsupported "alg" (Algorithm) value');
452
452
  }
453
- return pe.subtle.importKey(t, i, o, !1, s);
454
- }, Xt = (e, t, r) => Qt(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
455
- async function Zt(e, t, r) {
453
+ return he.subtle.importKey(t, i, o, !1, s);
454
+ }, Zt = (e, t, r) => Xt(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
455
+ async function er(e, t, r) {
456
456
  if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
457
457
  throw new TypeError('"spki" must be SPKI formatted string');
458
- return Xt(e, t);
458
+ return Zt(e, t);
459
459
  }
460
- const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], er = (e, t) => {
460
+ const le = (e) => e == null ? void 0 : e[Symbol.toStringTag], tr = (e, t) => {
461
461
  if (!(t instanceof Uint8Array)) {
462
462
  if (!ot(t))
463
- throw new TypeError(nt(e, t, ...ue, "Uint8Array"));
463
+ throw new TypeError(nt(e, t, ...de, "Uint8Array"));
464
464
  if (t.type !== "secret")
465
- throw new TypeError(`${de(t)} instances for symmetric algorithms must be of type "secret"`);
465
+ throw new TypeError(`${le(t)} instances for symmetric algorithms must be of type "secret"`);
466
466
  }
467
- }, tr = (e, t, r) => {
467
+ }, rr = (e, t, r) => {
468
468
  if (!ot(t))
469
- throw new TypeError(nt(e, t, ...ue));
469
+ throw new TypeError(nt(e, t, ...de));
470
470
  if (t.type === "secret")
471
- throw new TypeError(`${de(t)} instances for asymmetric algorithms must not be of type "secret"`);
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")
473
- throw new TypeError(`${de(t)} instances for asymmetric algorithm verifying must be of type "public"`);
473
+ throw new TypeError(`${le(t)} instances for asymmetric algorithm verifying must be of type "public"`);
474
474
  if (t.algorithm && r === "encrypt" && t.type === "private")
475
- throw new TypeError(`${de(t)} instances for asymmetric algorithm encryption must be of type "public"`);
476
- }, rr = (e, t, r) => {
477
- e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? er(e, t) : tr(e, t, r);
475
+ throw new TypeError(`${le(t)} instances for asymmetric algorithm encryption must be of type "public"`);
476
+ }, ar = (e, t, r) => {
477
+ e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? tr(e, t) : rr(e, t, r);
478
478
  };
479
- function ar(e, t, r, a, n) {
479
+ function nr(e, t, r, a, n) {
480
480
  if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
481
481
  throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
482
482
  if (!a || a.crit === void 0)
@@ -495,13 +495,13 @@ function ar(e, t, r, a, n) {
495
495
  }
496
496
  return new Set(a.crit);
497
497
  }
498
- const nr = (e, t) => {
498
+ const or = (e, t) => {
499
499
  if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
500
500
  throw new TypeError(`"${e}" option must be an array of strings`);
501
501
  if (t)
502
502
  return new Set(t);
503
503
  };
504
- function or(e, t) {
504
+ function sr(e, t) {
505
505
  const r = `SHA-${e.slice(-3)}`;
506
506
  switch (e) {
507
507
  case "HS256":
@@ -526,27 +526,27 @@ function or(e, t) {
526
526
  throw new H(`alg ${e} is not supported either by JOSE or your javascript runtime`);
527
527
  }
528
528
  }
529
- async function sr(e, t, r) {
530
- if (t = await qt.normalizePublicKey(t, e), tt(t))
531
- return Wt(t, e, r), t;
529
+ async function ir(e, t, r) {
530
+ if (t = await Qt.normalizePublicKey(t, e), tt(t))
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, ...ue));
535
- return pe.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
534
+ throw new TypeError(Le(t, ...de));
535
+ return he.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
536
536
  }
537
- throw new TypeError(Le(t, ...ue, "Uint8Array"));
537
+ throw new TypeError(Le(t, ...de, "Uint8Array"));
538
538
  }
539
- const ir = async (e, t, r, a) => {
540
- const n = await sr(e, t, "verify");
541
- Vt(e, n);
542
- const o = or(e, n.algorithm);
539
+ const cr = async (e, t, r, a) => {
540
+ const n = await ir(e, t, "verify");
541
+ Jt(e, n);
542
+ const o = sr(e, n.algorithm);
543
543
  try {
544
- return await pe.subtle.verify(o, n, r, a);
544
+ return await he.subtle.verify(o, n, r, a);
545
545
  } catch {
546
546
  return !1;
547
547
  }
548
548
  };
549
- async function cr(e, t, r) {
549
+ async function lr(e, t, r) {
550
550
  if (!_e(e))
551
551
  throw new k("Flattened JWS must be an object");
552
552
  if (e.protected === void 0 && e.header === void 0)
@@ -562,65 +562,65 @@ async function cr(e, t, r) {
562
562
  let a = {};
563
563
  if (e.protected)
564
564
  try {
565
- const f = le(e.protected);
566
- a = JSON.parse(ge.decode(f));
565
+ const f = ce(e.protected);
566
+ a = JSON.parse(pe.decode(f));
567
567
  } catch {
568
568
  throw new k("JWS Protected Header is invalid");
569
569
  }
570
- if (!jt(a, e.header))
570
+ if (!Gt(a, e.header))
571
571
  throw new k("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
572
572
  const n = {
573
573
  ...a,
574
574
  ...e.header
575
- }, o = ar(k, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
575
+ }, o = nr(k, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
576
576
  let s = !0;
577
577
  if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
578
578
  throw new k('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
579
579
  const { alg: i } = n;
580
580
  if (typeof i != "string" || !i)
581
581
  throw new k('JWS "alg" (Algorithm) Header Parameter missing or invalid');
582
- const l = r && nr("algorithms", r.algorithms);
582
+ const l = r && or("algorithms", r.algorithms);
583
583
  if (l && !l.has(i))
584
- throw new Ut('"alg" (Algorithm) Header Parameter value not allowed');
584
+ throw new Ht('"alg" (Algorithm) Header Parameter value not allowed');
585
585
  if (s) {
586
586
  if (typeof e.payload != "string")
587
587
  throw new k("JWS Payload must be a string");
588
588
  } else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
589
589
  throw new k("JWS Payload must be a string or an Uint8Array instance");
590
- let u = !1;
591
- typeof t == "function" && (t = await t(a, e), u = !0), rr(i, t, "verify");
592
- const p = Lt(Z.encode(e.protected ?? ""), Z.encode("."), typeof e.payload == "string" ? Z.encode(e.payload) : e.payload);
593
- let d;
590
+ let d = !1;
591
+ typeof t == "function" && (t = await t(a, e), d = !0), ar(i, t, "verify");
592
+ const h = Pt(X.encode(e.protected ?? ""), X.encode("."), typeof e.payload == "string" ? X.encode(e.payload) : e.payload);
593
+ let u;
594
594
  try {
595
- d = le(e.signature);
595
+ u = ce(e.signature);
596
596
  } catch {
597
597
  throw new k("Failed to base64url decode the signature");
598
598
  }
599
- if (!await ir(i, t, d, p))
600
- throw new Ht();
599
+ if (!await cr(i, t, u, h))
600
+ throw new Kt();
601
601
  let m;
602
602
  if (s)
603
603
  try {
604
- m = le(e.payload);
604
+ m = ce(e.payload);
605
605
  } catch {
606
606
  throw new k("Failed to base64url decode the payload");
607
607
  }
608
608
  else
609
- typeof e.payload == "string" ? m = Z.encode(e.payload) : m = e.payload;
610
- const h = { payload: m };
611
- return e.protected !== void 0 && (h.protectedHeader = a), e.header !== void 0 && (h.unprotectedHeader = e.header), u ? { ...h, key: t } : h;
609
+ typeof e.payload == "string" ? m = X.encode(e.payload) : m = e.payload;
610
+ const p = { payload: m };
611
+ return e.protected !== void 0 && (p.protectedHeader = a), e.header !== void 0 && (p.unprotectedHeader = e.header), d ? { ...p, key: t } : p;
612
612
  }
613
- async function lr(e, t, r) {
614
- if (e instanceof Uint8Array && (e = ge.decode(e)), typeof e != "string")
613
+ async function dr(e, t, r) {
614
+ if (e instanceof Uint8Array && (e = pe.decode(e)), typeof e != "string")
615
615
  throw new k("Compact JWS must be a string or Uint8Array");
616
616
  const { 0: a, 1: n, 2: o, length: s } = e.split(".");
617
617
  if (s !== 3)
618
618
  throw new k("Invalid Compact JWS");
619
- const i = await cr({ payload: n, protected: a, signature: o }, t, r), l = { payload: i.payload, protectedHeader: i.protectedHeader };
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 dr = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, Ie = dt * 24, ur = Ie * 7, mr = Ie * 365.25, hr = /^(\+|\-)? ?(\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) => {
623
- const t = hr.exec(e);
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) => {
623
+ const t = pr.exec(e);
624
624
  if (!t || t[4] && t[1])
625
625
  throw new TypeError("Invalid time period format");
626
626
  const r = parseFloat(t[2]), a = t[3].toLowerCase();
@@ -655,86 +655,86 @@ const dr = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, Ie = dt
655
655
  case "week":
656
656
  case "weeks":
657
657
  case "w":
658
- n = Math.round(r * ur);
658
+ n = Math.round(r * mr);
659
659
  break;
660
660
  default:
661
- n = Math.round(r * mr);
661
+ n = Math.round(r * hr);
662
662
  break;
663
663
  }
664
664
  return t[1] === "-" || t[4] === "ago" ? -n : n;
665
- }, He = (e) => e.toLowerCase().replace(/^application\//, ""), pr = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, gr = (e, t, r = {}) => {
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 = {}) => {
666
666
  let a;
667
667
  try {
668
- a = JSON.parse(ge.decode(t));
668
+ a = JSON.parse(pe.decode(t));
669
669
  } catch {
670
670
  }
671
671
  if (!_e(a))
672
672
  throw new rt("JWT Claims Set must be a top-level JSON object");
673
673
  const { typ: n } = r;
674
674
  if (n && (typeof e.typ != "string" || He(e.typ) !== He(n)))
675
- throw new $('unexpected "typ" JWT header value', a, "typ", "check_failed");
676
- const { requiredClaims: o = [], issuer: s, subject: i, audience: l, maxTokenAge: u } = r, p = [...o];
677
- u !== void 0 && p.push("iat"), l !== void 0 && p.push("aud"), i !== void 0 && p.push("sub"), s !== void 0 && p.push("iss");
678
- for (const f of new Set(p.reverse()))
675
+ throw new M('unexpected "typ" JWT header value', a, "typ", "check_failed");
676
+ const { requiredClaims: o = [], issuer: s, subject: i, audience: l, maxTokenAge: d } = r, h = [...o];
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");
678
+ for (const f of new Set(h.reverse()))
679
679
  if (!(f in a))
680
- throw new $(`missing required "${f}" claim`, a, f, "missing");
680
+ throw new M(`missing required "${f}" claim`, a, f, "missing");
681
681
  if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
682
- throw new $('unexpected "iss" claim value', a, "iss", "check_failed");
682
+ throw new M('unexpected "iss" claim value', a, "iss", "check_failed");
683
683
  if (i && a.sub !== i)
684
- throw new $('unexpected "sub" claim value', a, "sub", "check_failed");
685
- if (l && !pr(a.aud, typeof l == "string" ? [l] : l))
686
- throw new $('unexpected "aud" claim value', a, "aud", "check_failed");
687
- let d;
684
+ throw new M('unexpected "sub" claim value', a, "sub", "check_failed");
685
+ if (l && !gr(a.aud, typeof l == "string" ? [l] : l))
686
+ throw new M('unexpected "aud" claim value', a, "aud", "check_failed");
687
+ let u;
688
688
  switch (typeof r.clockTolerance) {
689
689
  case "string":
690
- d = Ue(r.clockTolerance);
690
+ u = Ue(r.clockTolerance);
691
691
  break;
692
692
  case "number":
693
- d = r.clockTolerance;
693
+ u = r.clockTolerance;
694
694
  break;
695
695
  case "undefined":
696
- d = 0;
696
+ u = 0;
697
697
  break;
698
698
  default:
699
699
  throw new TypeError("Invalid clockTolerance option type");
700
700
  }
701
- const { currentDate: m } = r, h = dr(m || /* @__PURE__ */ new Date());
702
- if ((a.iat !== void 0 || u) && typeof a.iat != "number")
703
- throw new $('"iat" claim must be a number', a, "iat", "invalid");
701
+ const { currentDate: m } = r, p = ur(m || /* @__PURE__ */ new Date());
702
+ if ((a.iat !== void 0 || d) && typeof a.iat != "number")
703
+ throw new M('"iat" claim must be a number', a, "iat", "invalid");
704
704
  if (a.nbf !== void 0) {
705
705
  if (typeof a.nbf != "number")
706
- throw new $('"nbf" claim must be a number', a, "nbf", "invalid");
707
- if (a.nbf > h + d)
708
- throw new $('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
706
+ throw new M('"nbf" claim must be a number', a, "nbf", "invalid");
707
+ if (a.nbf > p + u)
708
+ throw new M('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
709
709
  }
710
710
  if (a.exp !== void 0) {
711
711
  if (typeof a.exp != "number")
712
- throw new $('"exp" claim must be a number', a, "exp", "invalid");
713
- if (a.exp <= h - d)
714
- throw new $e('"exp" claim timestamp check failed', a, "exp", "check_failed");
712
+ throw new M('"exp" claim must be a number', a, "exp", "invalid");
713
+ if (a.exp <= p - u)
714
+ throw new Me('"exp" claim timestamp check failed', a, "exp", "check_failed");
715
715
  }
716
- if (u) {
717
- const f = h - a.iat, b = typeof u == "number" ? u : Ue(u);
718
- if (f - d > b)
719
- throw new $e('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
720
- if (f < 0 - d)
721
- throw new $('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
716
+ if (d) {
717
+ const f = p - a.iat, w = typeof d == "number" ? d : Ue(d);
718
+ if (f - u > w)
719
+ throw new Me('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
720
+ if (f < 0 - u)
721
+ throw new M('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
722
722
  }
723
723
  return a;
724
724
  };
725
- async function fr(e, t, r) {
725
+ async function yr(e, t, r) {
726
726
  var a;
727
- const n = await lr(e, t, r);
727
+ const n = await dr(e, t, r);
728
728
  if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
729
729
  throw new rt("JWTs MUST NOT use unencoded payload");
730
- const o = { payload: gr(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
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
  }
733
733
  const Y = async (e) => {
734
734
  try {
735
- const t = N.ALG, r = await Zt($t, t);
736
- return await fr(e, r, {
737
- issuer: N.ISSUER
735
+ const t = I.ALG, r = await er(Lt, t);
736
+ return await yr(e, r, {
737
+ issuer: I.ISSUER
738
738
  });
739
739
  } catch {
740
740
  return;
@@ -743,39 +743,39 @@ const Y = async (e) => {
743
743
  var E = [];
744
744
  for (var ve = 0; ve < 256; ++ve)
745
745
  E.push((ve + 256).toString(16).slice(1));
746
- function yr(e, t = 0) {
746
+ function br(e, t = 0) {
747
747
  return (E[e[t + 0]] + E[e[t + 1]] + E[e[t + 2]] + E[e[t + 3]] + "-" + E[e[t + 4]] + E[e[t + 5]] + "-" + E[e[t + 6]] + E[e[t + 7]] + "-" + E[e[t + 8]] + E[e[t + 9]] + "-" + E[e[t + 10]] + E[e[t + 11]] + E[e[t + 12]] + E[e[t + 13]] + E[e[t + 14]] + E[e[t + 15]]).toLowerCase();
748
748
  }
749
- var te, br = new Uint8Array(16);
750
- function wr() {
751
- if (!te && (te = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !te))
749
+ var ee, wr = new Uint8Array(16);
750
+ function Er() {
751
+ if (!ee && (ee = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ee))
752
752
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
753
- return te(br);
753
+ return ee(wr);
754
754
  }
755
- var Er = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
755
+ var vr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
756
756
  const Ke = {
757
- randomUUID: Er
757
+ randomUUID: vr
758
758
  };
759
759
  function Be(e, t, r) {
760
760
  if (Ke.randomUUID && !t && !e)
761
761
  return Ke.randomUUID();
762
762
  e = e || {};
763
- var a = e.random || (e.rng || wr)();
764
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, yr(a);
763
+ var a = e.random || (e.rng || Er)();
764
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, br(a);
765
765
  }
766
- const We = globalThis.crypto, vr = (e) => `${Be()}${Be()}`.slice(0, e), kr = (e) => btoa(
766
+ const We = globalThis.crypto, kr = (e) => `${Be()}${Be()}`.slice(0, e), Sr = (e) => btoa(
767
767
  [...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
768
768
  );
769
- async function Sr(e) {
769
+ async function Tr(e) {
770
770
  if (!We.subtle)
771
771
  throw new Error(
772
772
  "crypto.subtle is available only in secure contexts (HTTPS)."
773
773
  );
774
774
  const t = new TextEncoder().encode(e), r = await We.subtle.digest("SHA-256", t);
775
- return kr(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
775
+ return Sr(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
776
776
  }
777
- async function Tr(e) {
778
- const t = vr(43), r = await Sr(t);
777
+ async function Ar(e) {
778
+ const t = kr(43), r = await Tr(t);
779
779
  return {
780
780
  code_verifier: t,
781
781
  code_challenge: r
@@ -789,21 +789,21 @@ const je = (e, t) => {
789
789
  typeof t == "function" ? t() : t
790
790
  );
791
791
  window.localStorage.setItem(e, r), ut(e, r);
792
- }, Ar = (e) => {
792
+ }, _r = (e) => {
793
793
  window.localStorage.removeItem(e), ut(e, null);
794
- }, Ge = (e) => window.localStorage.getItem(e), _r = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
795
- function re({
794
+ }, Ge = (e) => window.localStorage.getItem(e), Ir = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
795
+ function te({
796
796
  key: e,
797
797
  initialValue: t
798
798
  }) {
799
799
  const r = () => Ge(e), a = F.useSyncExternalStore(
800
- _r,
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 ? Ar(e) : je(e, l);
806
+ l == null ? _r(e) : je(e, l);
807
807
  } catch (l) {
808
808
  console.warn(l);
809
809
  }
@@ -825,37 +825,37 @@ function re({
825
825
  var v = [];
826
826
  for (var ke = 0; ke < 256; ++ke)
827
827
  v.push((ke + 256).toString(16).slice(1));
828
- function Ir(e, t = 0) {
828
+ function xr(e, t = 0) {
829
829
  return (v[e[t + 0]] + v[e[t + 1]] + v[e[t + 2]] + v[e[t + 3]] + "-" + v[e[t + 4]] + v[e[t + 5]] + "-" + v[e[t + 6]] + v[e[t + 7]] + "-" + v[e[t + 8]] + v[e[t + 9]] + "-" + v[e[t + 10]] + v[e[t + 11]] + v[e[t + 12]] + v[e[t + 13]] + v[e[t + 14]] + v[e[t + 15]]).toLowerCase();
830
830
  }
831
- var ae, xr = new Uint8Array(16);
832
- function Nr() {
833
- if (!ae && (ae = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ae))
831
+ var re, Nr = new Uint8Array(16);
832
+ function Cr() {
833
+ if (!re && (re = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !re))
834
834
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
835
- return ae(xr);
835
+ return re(Nr);
836
836
  }
837
- var Cr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
837
+ var Rr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
838
838
  const Ve = {
839
- randomUUID: Cr
839
+ randomUUID: Rr
840
840
  };
841
- function Rr(e, t, r) {
841
+ function Or(e, t, r) {
842
842
  if (Ve.randomUUID && !t && !e)
843
843
  return Ve.randomUUID();
844
844
  e = e || {};
845
- var a = e.random || (e.rng || Nr)();
846
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ir(a);
845
+ var a = e.random || (e.rng || Cr)();
846
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, xr(a);
847
847
  }
848
- const ne = "Oops! It looks like your session has expired. For your security, please log in again to continue.", Or = "Your session has been successfully terminated.", Je = "Login failed. Please try again.", Se = "Error getting access token, please re-authenticate.", Dr = "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.", Je = "Login failed. Please try again.", Se = "Error getting access token, please re-authenticate.", $r = "You forgot to wrap your component in <AuthProvider>.", Fe = {
849
849
  dev: "https://auth.gizmette.local.com:3003",
850
850
  prod: "https://mylogin.gizmette.com"
851
- }, oe = "@@auth@@", Mr = process.env.NODE_ENV === "production", $r = !Mr, fe = async ({
851
+ }, ne = "@@auth@@", Mr = process.env.NODE_ENV === "production", Lr = !Mr, ge = async ({
852
852
  type: e,
853
853
  clientId: t,
854
854
  params: r = {}
855
855
  }) => {
856
856
  try {
857
857
  const a = await fetch(
858
- $r ? `${Fe.dev}/${e}` : `${Fe.prod}/${e}`,
858
+ Lr ? `${Fe.dev}/${e}` : `${Fe.prod}/${e}`,
859
859
  {
860
860
  credentials: "include",
861
861
  method: "POST",
@@ -877,21 +877,23 @@ const ne = "Oops! It looks like your session has expired. For your security, ple
877
877
  } catch (a) {
878
878
  return console.error(a), { status: 500, data: [] };
879
879
  }
880
- }, Lr = async ({
880
+ }, Pr = async ({
881
881
  idToken: e,
882
882
  accessToken: t,
883
883
  refreshToken: r,
884
- clientId: a
884
+ clientId: a,
885
+ domain: n
885
886
  }) => {
886
887
  try {
887
888
  return {
888
- status: (await fe({
889
- type: he.LOGOUT,
889
+ status: (await ge({
890
+ type: me.LOGOUT,
890
891
  clientId: a,
891
892
  params: {
892
893
  idToken: e,
893
894
  accessToken: t,
894
- refreshToken: r
895
+ refreshToken: r,
896
+ domain: n
895
897
  }
896
898
  })).status === 200
897
899
  };
@@ -908,11 +910,12 @@ const ne = "Oops! It looks like your session has expired. For your security, ple
908
910
  type: n,
909
911
  sessionExpiration: o,
910
912
  code: s,
911
- code_verifier: i
913
+ code_verifier: i,
914
+ domain: l
912
915
  }) => {
913
916
  try {
914
- const l = await fe({
915
- type: he.AUTHENTICATE,
917
+ const d = await ge({
918
+ type: me.AUTHENTICATE,
916
919
  clientId: r,
917
920
  params: {
918
921
  type: n || Q.ID_AND_ACCESS_TOKEN,
@@ -921,14 +924,15 @@ const ne = "Oops! It looks like your session has expired. For your security, ple
921
924
  sessionExpiration: o,
922
925
  nonce: a,
923
926
  code: s,
924
- code_verifier: i
927
+ code_verifier: i,
928
+ domain: l
925
929
  }
926
- }), u = await Y(l.data.idToken);
927
- return u && u.payload[N.USER_ID_KEY] !== "" && u.payload[N.NONCE_KEY] === a ? {
928
- idToken: l.data.idToken,
929
- accessToken: l.data.accessToken,
930
- refreshToken: l.data.refreshToken,
931
- userId: u.payload[N.USER_ID_KEY],
930
+ }), h = await Y(d.data.idToken);
931
+ return h && h.payload[I.USER_ID_KEY] !== "" && h.payload[I.NONCE_KEY] === a ? {
932
+ idToken: d.data.idToken,
933
+ accessToken: d.data.accessToken,
934
+ refreshToken: d.data.refreshToken,
935
+ userId: h.payload[I.USER_ID_KEY],
932
936
  status: !0
933
937
  } : {
934
938
  status: !1
@@ -938,14 +942,14 @@ const ne = "Oops! It looks like your session has expired. For your security, ple
938
942
  status: !1
939
943
  };
940
944
  }
941
- }, Pr = async ({
945
+ }, Ur = async ({
942
946
  nonce: e,
943
947
  clientId: t,
944
948
  code_challenge: r
945
949
  }) => {
946
950
  try {
947
- const a = await fe({
948
- type: he.CODE,
951
+ const a = await ge({
952
+ type: me.CODE,
949
953
  clientId: t,
950
954
  params: {
951
955
  type: Q.CODE,
@@ -964,29 +968,31 @@ const ne = "Oops! It looks like your session has expired. For your security, ple
964
968
  status: !1
965
969
  };
966
970
  }
967
- }, Ur = async ({
971
+ }, Hr = async ({
968
972
  clientId: e,
969
973
  userId: t,
970
974
  nonce: r,
971
975
  refreshToken: a,
972
- accessToken: n
976
+ accessToken: n,
977
+ domain: o
973
978
  }) => {
974
979
  try {
975
- const o = await fe({
976
- type: he.AUTHENTICATE,
980
+ const s = await ge({
981
+ type: me.AUTHENTICATE,
977
982
  clientId: e,
978
983
  params: {
979
984
  type: Q.REFRESH_TOKEN,
980
985
  userId: t,
981
986
  nonce: r,
982
987
  refreshToken: a,
983
- accessToken: n
988
+ accessToken: n,
989
+ domain: o
984
990
  }
985
- }), s = await Y(o.data.accessToken);
986
- return s && s.payload[N.USER_ID_KEY] !== "" && s.payload[N.NONCE_KEY] === r ? {
987
- accessToken: o.data.accessToken,
988
- refreshToken: o.data.refreshToken,
989
- userId: s.payload[N.USER_ID_KEY],
991
+ }), i = await Y(s.data.accessToken);
992
+ return i && i.payload[I.USER_ID_KEY] !== "" && i.payload[I.NONCE_KEY] === r ? {
993
+ accessToken: s.data.accessToken,
994
+ refreshToken: s.data.refreshToken,
995
+ userId: i.payload[I.USER_ID_KEY],
990
996
  status: !0
991
997
  } : {
992
998
  status: !1
@@ -997,19 +1003,21 @@ const ne = "Oops! It looks like your session has expired. For your security, ple
997
1003
  };
998
1004
  }
999
1005
  };
1000
- class Hr {
1006
+ class Kr {
1001
1007
  constructor(t = null, r = null) {
1002
1008
  ye(this, "refreshTokenPromise", null), ye(this, "accessToken"), ye(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
1003
1009
  }
1004
1010
  async refreshtoken({
1005
1011
  clientId: t,
1006
1012
  userId: r,
1007
- nonce: a
1013
+ nonce: a,
1014
+ domain: n
1008
1015
  }) {
1009
1016
  this.refreshTokenPromise || (this.refreshTokenPromise = this._refreshToken({
1010
1017
  clientId: t,
1011
1018
  userId: r,
1012
- nonce: a
1019
+ nonce: a,
1020
+ domain: n
1013
1021
  }));
1014
1022
  try {
1015
1023
  return await this.refreshTokenPromise;
@@ -1020,21 +1028,23 @@ class Hr {
1020
1028
  async _refreshToken({
1021
1029
  clientId: t,
1022
1030
  userId: r,
1023
- nonce: a
1031
+ nonce: a,
1032
+ domain: n
1024
1033
  }) {
1025
- const n = await Y(this.refreshToken);
1026
- if (n && n.payload[N.USER_ID_KEY] !== "") {
1027
- const o = await Ur({
1034
+ const o = await Y(this.refreshToken);
1035
+ if (o && o.payload[I.USER_ID_KEY] !== "") {
1036
+ const s = await Hr({
1028
1037
  clientId: t,
1029
1038
  userId: r,
1030
1039
  nonce: a,
1031
1040
  refreshToken: this.refreshToken,
1032
- accessToken: this.accessToken
1041
+ accessToken: this.accessToken,
1042
+ domain: n
1033
1043
  });
1034
- return o.status ? (this.accessToken = o.accessToken, this.refreshToken = o.refreshToken, {
1044
+ return s.status ? (this.accessToken = s.accessToken, this.refreshToken = s.refreshToken, {
1035
1045
  status: "success",
1036
- newAccessToken: o.accessToken,
1037
- newRefreshToken: o.refreshToken
1046
+ newAccessToken: s.accessToken,
1047
+ newRefreshToken: s.refreshToken
1038
1048
  }) : {
1039
1049
  status: "failure"
1040
1050
  };
@@ -1044,107 +1054,117 @@ class Hr {
1044
1054
  };
1045
1055
  }
1046
1056
  }
1047
- const se = () => {
1048
- throw new Error(Dr);
1049
- }, mt = It({
1057
+ const oe = () => {
1058
+ throw new Error($r);
1059
+ }, mt = xt({
1050
1060
  isAuthenticated: !1,
1051
1061
  isLoading: !1,
1052
- login: se,
1053
- logout: se,
1054
- getAccessToken: se,
1055
- getIdToken: se,
1062
+ login: oe,
1063
+ logout: oe,
1064
+ getAccessToken: oe,
1065
+ getIdToken: oe,
1056
1066
  logoutReason: ""
1057
- }), Kr = ({
1067
+ }), Br = ({
1058
1068
  children: e,
1059
1069
  sessionExpiration: t,
1060
- clientId: r
1070
+ clientId: r,
1071
+ domain: a = ""
1061
1072
  }) => {
1062
- const a = B(!1), [n, o, , s] = re({
1063
- key: `${oe}::${r}::@@user@@`
1064
- }), [i, l, , u] = re({
1065
- key: `${oe}::${r}::@@access@@`
1066
- }), [p, d, , m] = re(
1073
+ const n = W(!1), [o, s, , i] = te({
1074
+ key: `${ne}::${r}::@@user@@`
1075
+ }), [l, d, , h] = te({
1076
+ key: `${ne}::${r}::@@access@@`
1077
+ }), [u, m, , p] = te(
1067
1078
  {
1068
- key: `${oe}::${r}::@@refresh@@`
1079
+ key: `${ne}::${r}::@@refresh@@`
1069
1080
  }
1070
- ), [h, f, , b] = re({
1071
- key: `${oe}::${r}::@@nonce@@`
1072
- }), R = new Hr(i, p), [A, T] = U({
1081
+ ), [f, w, , x] = te({
1082
+ key: `${ne}::${r}::@@nonce@@`
1083
+ }), O = new Kr(l, u), [_, S] = U({
1073
1084
  isLoading: !0,
1074
1085
  isAuthenticated: !1,
1075
1086
  user: void 0,
1076
1087
  logoutReason: ""
1077
- }), _ = Me(
1088
+ }), D = $e(
1078
1089
  (y) => {
1079
- console.warn(y), T({
1090
+ console.warn(y), S({
1080
1091
  isLoading: !0,
1081
1092
  isAuthenticated: !1,
1082
1093
  user: void 0,
1083
- logoutReason: y || ne
1084
- }), s(), u(), m(), b();
1094
+ logoutReason: y || ae
1095
+ }), i(), h(), p(), x();
1085
1096
  },
1086
- [s, u, b, m]
1087
- ), I = Me(
1097
+ [h, i, x, p]
1098
+ ), C = $e(
1088
1099
  async (y) => {
1089
- _(y || ne), await Lr({
1090
- idToken: n,
1091
- accessToken: i,
1092
- refreshToken: p,
1093
- clientId: r
1094
- }), T((M) => ({
1095
- ...M,
1100
+ D(y || ae), await Pr({
1101
+ idToken: o,
1102
+ accessToken: l,
1103
+ refreshToken: u,
1104
+ clientId: r,
1105
+ domain: a
1106
+ }), S(($) => ({
1107
+ ...$,
1096
1108
  isLoading: !1
1097
1109
  }));
1098
1110
  },
1099
- [i, r, n, _, p]
1111
+ [
1112
+ l,
1113
+ r,
1114
+ a,
1115
+ o,
1116
+ u,
1117
+ D
1118
+ ]
1100
1119
  );
1101
1120
  z(() => {
1102
- if (!a.current)
1103
- return A.isLoading && n !== null ? (async () => {
1121
+ if (!n.current)
1122
+ return _.isLoading && o !== null ? (async () => {
1104
1123
  try {
1105
- const y = await Y(n);
1106
- y && y.payload[N.USER_ID_KEY] !== "" ? T({
1124
+ const y = await Y(o);
1125
+ y && y.payload[I.USER_ID_KEY] !== "" ? S({
1107
1126
  isLoading: !1,
1108
1127
  isAuthenticated: !0,
1109
1128
  user: {
1110
- userId: y.payload[N.USER_ID_KEY],
1111
- username: y.payload[N.USERNAME_KEY]
1129
+ userId: y.payload[I.USER_ID_KEY],
1130
+ username: y.payload[I.USERNAME_KEY]
1112
1131
  },
1113
1132
  logoutReason: ""
1114
- }) : await I(ne);
1133
+ }) : await C(ae);
1115
1134
  } catch {
1116
- await I(ne);
1135
+ await C(ae);
1117
1136
  }
1118
- })() : T((y) => ({
1137
+ })() : S((y) => ({
1119
1138
  ...y,
1120
1139
  isLoading: !1
1121
1140
  })), () => {
1122
- a.current = !0;
1141
+ n.current = !0;
1123
1142
  };
1124
- }, [A.isLoading, n, I]);
1125
- const j = async (y, M, D) => {
1126
- const w = Rr();
1127
- if (f(w), T((V) => ({
1128
- ...V,
1143
+ }, [_.isLoading, o, C]);
1144
+ const N = async (y, $, b) => {
1145
+ const A = Or();
1146
+ if (w(A), S((G) => ({
1147
+ ...G,
1129
1148
  isLoading: !0
1130
- })), D === Q.CODE) {
1131
- const { code_verifier: V, code_challenge: X } = await Tr(), De = await Pr({
1132
- nonce: w,
1149
+ })), i(), h(), p(), b === Q.CODE) {
1150
+ const { code_verifier: G, code_challenge: It } = await Ar(), De = await Ur({
1151
+ nonce: A,
1133
1152
  clientId: r,
1134
- code_challenge: X
1153
+ code_challenge: It
1135
1154
  });
1136
1155
  if (De.status) {
1137
1156
  const J = await ze({
1138
1157
  username: y,
1139
- password: M,
1158
+ password: $,
1140
1159
  clientId: r,
1141
1160
  sessionExpiration: t,
1142
- nonce: w,
1143
- type: D,
1161
+ nonce: A,
1162
+ type: b,
1144
1163
  code: De.code,
1145
- code_verifier: V
1164
+ code_verifier: G,
1165
+ domain: a
1146
1166
  });
1147
- return J.status ? (o(J.idToken), l(J.accessToken), d(J.refreshToken), T({
1167
+ return J.status ? (s(J.idToken), d(J.accessToken), m(J.refreshToken), S({
1148
1168
  isLoading: !1,
1149
1169
  isAuthenticated: !0,
1150
1170
  user: {
@@ -1152,60 +1172,62 @@ const se = () => {
1152
1172
  username: y
1153
1173
  },
1154
1174
  logoutReason: ""
1155
- }), !0) : (_(Je), !1);
1175
+ }), !0) : (D(Je), !1);
1156
1176
  }
1157
1177
  return !1;
1158
1178
  }
1159
- const x = await ze({
1179
+ const B = await ze({
1160
1180
  username: y,
1161
- password: M,
1181
+ password: $,
1162
1182
  clientId: r,
1163
1183
  sessionExpiration: t,
1164
- nonce: w,
1165
- type: D
1184
+ nonce: A,
1185
+ type: b,
1186
+ domain: a
1166
1187
  });
1167
- return x.status ? (o(x.idToken), l(x.accessToken), d(x.refreshToken), T({
1188
+ return B.status ? (s(B.idToken), d(B.accessToken), m(B.refreshToken), S({
1168
1189
  isLoading: !1,
1169
1190
  isAuthenticated: !0,
1170
1191
  user: {
1171
- userId: x.userId,
1192
+ userId: B.userId,
1172
1193
  username: y
1173
1194
  }
1174
- }), !0) : (_(Je), !1);
1175
- }, C = async (y) => {
1176
- y == null || y.preventDefault(), await I(Or);
1177
- }, G = async () => {
1178
- const { isAuthenticated: y, user: M } = A;
1195
+ }), !0) : (D(Je), !1);
1196
+ }, V = async (y) => {
1197
+ y == null || y.preventDefault(), await C(Dr);
1198
+ }, R = async () => {
1199
+ const { isAuthenticated: y, user: $ } = _;
1179
1200
  try {
1180
- if (y && M && M.userId) {
1181
- if (i) {
1182
- const w = await Y(i);
1183
- if (w && w.payload[N.USER_ID_KEY] !== "")
1184
- return i;
1201
+ if (y && $ && $.userId) {
1202
+ if (l) {
1203
+ const A = await Y(l);
1204
+ if (A && A.payload[I.USER_ID_KEY] !== "")
1205
+ return l;
1185
1206
  }
1186
- const D = await R.refreshtoken({
1207
+ const b = await O.refreshtoken({
1187
1208
  clientId: r,
1188
- userId: M.userId,
1189
- nonce: h
1209
+ userId: $.userId,
1210
+ nonce: f,
1211
+ domain: a
1190
1212
  });
1191
- return D.status && D.status === "success" ? (l(D.newAccessToken), d(D.newRefreshToken), D.newAccessToken) : (await I(Se), "");
1213
+ return b.status && b.status === "success" ? (d(b.newAccessToken), m(b.newRefreshToken), b.newAccessToken) : (await C(Se), "");
1192
1214
  }
1193
- return await I(Se), "";
1215
+ return await C(Se), "";
1194
1216
  } catch {
1195
- return await I(Se), "";
1217
+ return await C(Se), "";
1196
1218
  }
1197
- }, O = () => {
1198
- if (A.isAuthenticated && n)
1199
- return n;
1219
+ }, fe = () => {
1220
+ if (_.isAuthenticated && o)
1221
+ return o;
1200
1222
  };
1201
1223
  return /* @__PURE__ */ c(
1202
1224
  mt.Provider,
1203
1225
  {
1204
- value: { ...A, login: j, logout: C, getAccessToken: G, getIdToken: O },
1226
+ value: { ..._, login: N, logout: V, getAccessToken: R, getIdToken: fe },
1205
1227
  children: e
1206
1228
  }
1207
1229
  );
1208
- }, xe = (e = mt) => Xe(e), en = "user", tn = "assistant", rn = "system", an = "internal", nn = "hidden", on = "I'm having trouble right now. Please try again later.", sn = "gpt-4", cn = 128e3, ln = "action-message", dn = "action-reset", un = "action-model", mn = "action-restore", hn = "action-location", pn = "action-streaming", gn = "action-search", fn = "action-sort", yn = "sassy-saint-", bn = "details", wn = "search", En = "sort", vn = "location", kn = "==stats==", Br = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Ne = (e) => {
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) => {
1209
1231
  let t = "";
1210
1232
  if (typeof e == "number" || typeof e == "string")
1211
1233
  t = "m-" + e;
@@ -1214,7 +1236,7 @@ const se = () => {
1214
1236
  (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(" ");
1215
1237
  }
1216
1238
  return t;
1217
- }, Sn = "av-bubble", Ye = "av-button", Tn = "av-card", Wr = "av-footer", jr = "av-main", An = "av-messagebox", _n = "av-panel", In = "av-spinner", ht = "icon", pt = "button", Gr = "link", Vr = ({
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 = ({
1218
1240
  type: e,
1219
1241
  size: t,
1220
1242
  labelRight: r,
@@ -1229,7 +1251,7 @@ const se = () => {
1229
1251
  [s]: t === "medium",
1230
1252
  [i]: t === "large"
1231
1253
  });
1232
- case Gr:
1254
+ case Vr:
1233
1255
  return g("px-4 text-center", {
1234
1256
  [o]: t === "small",
1235
1257
  [s]: t === "medium",
@@ -1248,7 +1270,7 @@ const se = () => {
1248
1270
  "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
1249
1271
  });
1250
1272
  }
1251
- }, Jr = ({
1273
+ }, Fr = ({
1252
1274
  mode: e,
1253
1275
  noBackground: t,
1254
1276
  noTruncate: r,
@@ -1280,7 +1302,7 @@ const se = () => {
1280
1302
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
1281
1303
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
1282
1304
  });
1283
- }, Fr = ({
1305
+ }, zr = ({
1284
1306
  mode: e,
1285
1307
  disabled: t,
1286
1308
  variant: r
@@ -1308,7 +1330,7 @@ const se = () => {
1308
1330
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
1309
1331
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
1310
1332
  });
1311
- }, zr = ({
1333
+ }, Yr = ({
1312
1334
  mode: e,
1313
1335
  disabled: t,
1314
1336
  variant: r
@@ -1336,7 +1358,7 @@ const se = () => {
1336
1358
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
1337
1359
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
1338
1360
  });
1339
- }, Yr = ({
1361
+ }, qr = ({
1340
1362
  mode: e,
1341
1363
  noBorder: t,
1342
1364
  variant: r
@@ -1364,7 +1386,7 @@ const se = () => {
1364
1386
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
1365
1387
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
1366
1388
  });
1367
- }, qr = ({ focusMode: e }) => g("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1389
+ }, Qr = ({ focusMode: e }) => g("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1368
1390
  "focus:outline-focus-dark": e === "dark",
1369
1391
  "focus:outline-focus-light": e === "light",
1370
1392
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
@@ -1379,28 +1401,28 @@ const se = () => {
1379
1401
  fullWidth: s,
1380
1402
  size: i,
1381
1403
  noBorder: l,
1382
- labelRight: u,
1383
- labelLeft: p,
1384
- spacing: d,
1404
+ labelRight: d,
1405
+ labelLeft: h,
1406
+ spacing: u,
1385
1407
  noBackground: m,
1386
- variant: h,
1408
+ variant: p,
1387
1409
  noTruncate: f,
1388
- align: b
1389
- }) => (h || (h = "primary"), r ? g(Ye, t) : g(
1410
+ align: w
1411
+ }) => (p || (p = "primary"), r ? g(Ye, t) : g(
1390
1412
  Ye,
1391
1413
  t,
1392
- Ne(d),
1393
- Jr({ mode: a, variant: h, noBackground: m, noTruncate: f }),
1394
- Vr({ type: e, size: i, labelRight: u, labelLeft: p, align: b }),
1395
- Yr({ mode: a, variant: h, noBorder: l }),
1396
- qr({ focusMode: n }),
1397
- Fr({ mode: a, variant: h, disabled: o }),
1398
- zr({ mode: a, variant: h, disabled: o }),
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 }),
1399
1421
  {
1400
1422
  "w-full": s,
1401
1423
  "disabled:cursor-not-allowed disabled:opacity-50": o
1402
1424
  }
1403
- )), Qr = (e, t, r) => {
1425
+ )), Xr = (e, t, r) => {
1404
1426
  var a;
1405
1427
  !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);
1406
1428
  }, Ce = K.forwardRef(
@@ -1411,7 +1433,7 @@ const se = () => {
1411
1433
  {
1412
1434
  ref: t,
1413
1435
  onClick: (o) => {
1414
- Qr(o, a, r);
1436
+ Xr(o, a, r);
1415
1437
  },
1416
1438
  ...n
1417
1439
  }
@@ -1430,17 +1452,17 @@ const ft = K.forwardRef(
1430
1452
  type: s = "button",
1431
1453
  raw: i = !1,
1432
1454
  noBorder: l = !1,
1433
- "aria-label": u,
1434
- label: p,
1435
- size: d = "medium",
1455
+ "aria-label": d,
1456
+ label: h,
1457
+ size: u = "medium",
1436
1458
  labelRight: m,
1437
- labelLeft: h,
1459
+ labelLeft: p,
1438
1460
  spacing: f,
1439
- noBackground: b = !1,
1440
- align: R = "center",
1441
- ...A
1442
- }, T) => {
1443
- const _ = gt({
1461
+ noBackground: w = !1,
1462
+ align: x = "center",
1463
+ ...O
1464
+ }, _) => {
1465
+ const S = gt({
1444
1466
  type: ht,
1445
1467
  mode: r,
1446
1468
  focusMode: a,
@@ -1449,30 +1471,30 @@ const ft = K.forwardRef(
1449
1471
  raw: i,
1450
1472
  className: o,
1451
1473
  noBorder: l,
1452
- size: d,
1474
+ size: u,
1453
1475
  labelRight: m,
1454
- labelLeft: h,
1476
+ labelLeft: p,
1455
1477
  spacing: f,
1456
- noBackground: b,
1457
- align: R
1458
- }), I = g({
1478
+ noBackground: w,
1479
+ align: x
1480
+ }), D = g({
1459
1481
  "text-copy-accent-dark": r === "light" && !i,
1460
1482
  "text-copy-light": r === "dark" && !i,
1461
1483
  "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
1462
1484
  "text-copy-light dark:text-copy-accent-dark": r === "system" && !i
1463
1485
  });
1464
- return /* @__PURE__ */ S(
1486
+ return /* @__PURE__ */ T(
1465
1487
  Ce,
1466
1488
  {
1467
- ref: T,
1468
- className: _,
1489
+ ref: _,
1490
+ className: S,
1469
1491
  disabled: t,
1470
1492
  type: s,
1471
- "aria-label": u || p,
1472
- ...A,
1493
+ "aria-label": d || h,
1494
+ ...O,
1473
1495
  children: [
1474
- h && /* @__PURE__ */ c("span", { className: "pr-2", children: h }),
1475
- /* @__PURE__ */ c("div", { className: I, children: e }),
1496
+ p && /* @__PURE__ */ c("span", { className: "pr-2", children: p }),
1497
+ /* @__PURE__ */ c("div", { className: D, children: e }),
1476
1498
  m && /* @__PURE__ */ c("span", { className: "pl-2", children: m })
1477
1499
  ]
1478
1500
  }
@@ -1491,11 +1513,11 @@ const yt = K.forwardRef(
1491
1513
  size: s = "medium",
1492
1514
  raw: i = !1,
1493
1515
  noBorder: l = !1,
1494
- spacing: u,
1495
- variant: p = "primary",
1496
- noTruncate: d = !1,
1516
+ spacing: d,
1517
+ variant: h = "primary",
1518
+ noTruncate: u = !1,
1497
1519
  ...m
1498
- }, h) => {
1520
+ }, p) => {
1499
1521
  const f = gt({
1500
1522
  type: pt,
1501
1523
  mode: r,
@@ -1506,14 +1528,14 @@ const yt = K.forwardRef(
1506
1528
  className: o,
1507
1529
  size: s,
1508
1530
  noBorder: l,
1509
- spacing: u,
1510
- variant: p,
1511
- noTruncate: d
1531
+ spacing: d,
1532
+ variant: h,
1533
+ noTruncate: u
1512
1534
  });
1513
1535
  return /* @__PURE__ */ c(
1514
1536
  Ce,
1515
1537
  {
1516
- ref: h,
1538
+ ref: p,
1517
1539
  className: f,
1518
1540
  disabled: t,
1519
1541
  ...m,
@@ -1523,7 +1545,7 @@ const yt = K.forwardRef(
1523
1545
  }
1524
1546
  );
1525
1547
  yt.displayName = "Button";
1526
- const Xr = ({
1548
+ const Zr = ({
1527
1549
  className: e,
1528
1550
  mode: t = "system",
1529
1551
  row1: r,
@@ -1532,7 +1554,7 @@ const Xr = ({
1532
1554
  spacing: o,
1533
1555
  raw: s = !1
1534
1556
  }) => {
1535
- const i = g(Wr, e, Ne(o), {
1557
+ const i = g(jr, e, Ne(o), {
1536
1558
  "text-copy-dark": !s && t === "dark",
1537
1559
  "text-copy-lighter": !s && t === "light",
1538
1560
  "text-copy-dark dark:text-copy-lighter": !s && t === "system",
@@ -1540,17 +1562,17 @@ const Xr = ({
1540
1562
  "mb-[100px]": !n && !s,
1541
1563
  "mt-0 flex w-full flex-col p-2 text-center text-xs sm:mt-3 md:mx-auto md:max-w-4xl": !s
1542
1564
  });
1543
- return /* @__PURE__ */ S("footer", { className: i, children: [
1565
+ return /* @__PURE__ */ T("footer", { className: i, children: [
1544
1566
  r && /* @__PURE__ */ c("div", { children: r }),
1545
1567
  a && /* @__PURE__ */ c("div", { children: a })
1546
1568
  ] });
1547
- }, Zr = ({
1569
+ }, ea = ({
1548
1570
  children: e,
1549
1571
  className: t,
1550
1572
  raw: r = !1,
1551
1573
  spacing: a
1552
1574
  }) => {
1553
- const n = g(t, jr, Ne(a), {
1575
+ const n = g(t, Gr, Ne(a), {
1554
1576
  "mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
1555
1577
  });
1556
1578
  return /* @__PURE__ */ c("main", { className: n, children: e });
@@ -1568,16 +1590,16 @@ try {
1568
1590
  });
1569
1591
  } catch {
1570
1592
  }
1571
- function ea(e) {
1572
- return xt(() => e.every((t) => t == null) ? () => {
1593
+ function ta(e) {
1594
+ return Nt(() => e.every((t) => t == null) ? () => {
1573
1595
  } : (t) => {
1574
1596
  e.forEach((r) => {
1575
1597
  typeof r == "function" ? r(t) : r != null && (r.current = t);
1576
1598
  });
1577
1599
  }, e);
1578
1600
  }
1579
- function ta(e) {
1580
- const t = Nt();
1601
+ function ra(e) {
1602
+ const t = Ct();
1581
1603
  if (!e)
1582
1604
  return t;
1583
1605
  if (typeof e == "number" || typeof e == "string")
@@ -1587,7 +1609,7 @@ function ta(e) {
1587
1609
  return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
1588
1610
  }
1589
1611
  }
1590
- const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", ra = {
1612
+ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
1591
1613
  alert: null,
1592
1614
  alertdialog: null,
1593
1615
  log: "polite",
@@ -1595,7 +1617,7 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", ra = {
1595
1617
  progressbar: null,
1596
1618
  status: "polite",
1597
1619
  timer: "assertive"
1598
- }, aa = (e, t) => {
1620
+ }, na = (e, t) => {
1599
1621
  switch (t == null ? void 0 : t.type) {
1600
1622
  case bt:
1601
1623
  return {
@@ -1610,7 +1632,7 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", ra = {
1610
1632
  default:
1611
1633
  return e;
1612
1634
  }
1613
- }, na = ({
1635
+ }, oa = ({
1614
1636
  onAnnouncementClear: e,
1615
1637
  dispatch: t
1616
1638
  }) => {
@@ -1628,13 +1650,13 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", ra = {
1628
1650
  type: bt,
1629
1651
  payload: e
1630
1652
  }), t && (r.current = setTimeout(
1631
- () => na({
1653
+ () => oa({
1632
1654
  onAnnouncementClear: a,
1633
1655
  dispatch: n
1634
1656
  }),
1635
1657
  t
1636
1658
  ));
1637
- }, oa = ({
1659
+ }, sa = ({
1638
1660
  children: e,
1639
1661
  announcementTimeoutRef: t,
1640
1662
  announcementDelay: r,
@@ -1668,17 +1690,17 @@ function Et({
1668
1690
  visible: i,
1669
1691
  ...l
1670
1692
  }) {
1671
- const u = B(), p = B(), [d, m] = Ct(aa, {
1693
+ const d = W(), h = W(), [u, m] = Rt(na, {
1672
1694
  announcement: null
1673
1695
  });
1674
- let h = r;
1675
- typeof h > "u" && (h = a ? ra[a] : "assertive"), z(() => {
1676
- oa({
1677
- announcementTimeoutRef: u,
1696
+ let p = r;
1697
+ typeof p > "u" && (p = a ? aa[a] : "assertive"), z(() => {
1698
+ sa({
1699
+ announcementTimeoutRef: d,
1678
1700
  announcementDelay: n,
1679
1701
  children: e,
1680
1702
  clearAnnouncementDelay: o,
1681
- clearAnnouncementTimeoutRef: p,
1703
+ clearAnnouncementTimeoutRef: h,
1682
1704
  onAnnouncementClear: s,
1683
1705
  dispatch: m
1684
1706
  });
@@ -1694,11 +1716,11 @@ function Et({
1694
1716
  return /* @__PURE__ */ c(
1695
1717
  "div",
1696
1718
  {
1697
- "aria-live": h,
1719
+ "aria-live": p,
1698
1720
  ...a && { role: a },
1699
1721
  className: f,
1700
1722
  ...l,
1701
- children: d.announcement
1723
+ children: u.announcement
1702
1724
  }
1703
1725
  );
1704
1726
  }
@@ -1715,7 +1737,7 @@ try {
1715
1737
  });
1716
1738
  } catch {
1717
1739
  }
1718
- const sa = (e) => {
1740
+ const ia = (e) => {
1719
1741
  let t = "";
1720
1742
  if (typeof e == "number" || typeof e == "string")
1721
1743
  t = "m-" + e;
@@ -1724,21 +1746,21 @@ const sa = (e) => {
1724
1746
  (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(" ");
1725
1747
  }
1726
1748
  return t;
1727
- }, vt = "av-text-input", ia = "av-text-input-wrapper", Te = "av-text-input-helper-text", xn = "av-text-area", Nn = "av-text-area-wrapper", Cn = "av-text-area-helper-text", Rn = "av-text-area__control--right", On = "av-toggle", ca = ({
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 = ({
1728
1750
  mode: e
1729
1751
  }) => g({
1730
1752
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
1731
1753
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
1732
1754
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
1733
1755
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
1734
- }), la = ({
1756
+ }), da = ({
1735
1757
  focusMode: e
1736
1758
  }) => g("focus:outline focus:outline-2 focus:outline-offset-2", {
1737
1759
  "focus:outline-focus-dark": e === "dark",
1738
1760
  "focus:outline-focus-light": e === "light",
1739
1761
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1740
1762
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1741
- }), da = ({
1763
+ }), ua = ({
1742
1764
  noBorder: e,
1743
1765
  error: t
1744
1766
  }) => g("border-2", {
@@ -1746,7 +1768,7 @@ const sa = (e) => {
1746
1768
  "focus:border-border-dark": !e && t,
1747
1769
  "border-border-error-dark": !e && t,
1748
1770
  "border-transparent": e
1749
- }), ua = ({
1771
+ }), ma = ({
1750
1772
  disabled: e,
1751
1773
  raw: t,
1752
1774
  error: r,
@@ -1770,7 +1792,7 @@ const sa = (e) => {
1770
1792
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
1771
1793
  "text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
1772
1794
  });
1773
- }, ma = ({
1795
+ }, ha = ({
1774
1796
  error: e,
1775
1797
  raw: t,
1776
1798
  mode: r,
@@ -1797,7 +1819,7 @@ const sa = (e) => {
1797
1819
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
1798
1820
  "dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
1799
1821
  });
1800
- }, ha = ({
1822
+ }, pa = ({
1801
1823
  className: e,
1802
1824
  inputClassName: t,
1803
1825
  raw: r,
@@ -1808,38 +1830,38 @@ const sa = (e) => {
1808
1830
  mode: i,
1809
1831
  focusMode: l
1810
1832
  }) => {
1811
- const u = r ? e : g(
1833
+ const d = r ? e : g(
1812
1834
  "relative flex w-full flex-col justify-center",
1813
- ia,
1835
+ ca,
1814
1836
  e,
1815
- sa(s)
1816
- ), p = r ? g(t) : g(
1837
+ ia(s)
1838
+ ), h = r ? g(t) : g(
1817
1839
  vt,
1818
1840
  t,
1819
1841
  "h-12 rounded-md px-4 text-base",
1820
- ca({ mode: i }),
1821
- la({ focusMode: l }),
1822
- da({ noBorder: n, error: o }),
1842
+ la({ mode: i }),
1843
+ da({ focusMode: l }),
1844
+ ua({ noBorder: n, error: o }),
1823
1845
  {
1824
1846
  "disabled:cursor-not-allowed disabled:opacity-50": a
1825
1847
  }
1826
- ), d = r ? void 0 : "sr-only", m = ua({
1848
+ ), u = r ? void 0 : "sr-only", m = ma({
1827
1849
  disabled: a,
1828
1850
  raw: r,
1829
1851
  error: o,
1830
1852
  mode: i
1831
- }), h = ma({
1853
+ }), p = ha({
1832
1854
  error: o,
1833
1855
  raw: r,
1834
1856
  mode: i,
1835
1857
  disabled: a
1836
1858
  });
1837
1859
  return {
1838
- wrapper: u,
1839
- input: p,
1840
- accessibleLabel: d,
1860
+ wrapper: d,
1861
+ input: h,
1862
+ accessibleLabel: u,
1841
1863
  visibleLabel: m,
1842
- helperText: h,
1864
+ helperText: p,
1843
1865
  rightElement: r ? void 0 : "absolute right-3"
1844
1866
  };
1845
1867
  }, Re = K.forwardRef(
@@ -1853,86 +1875,86 @@ const sa = (e) => {
1853
1875
  inputClassName: s,
1854
1876
  mode: i = "system",
1855
1877
  focusMode: l = "system",
1856
- disabled: u = !1,
1857
- noBorder: p = !1,
1858
- labelId: d,
1878
+ disabled: d = !1,
1879
+ noBorder: h = !1,
1880
+ labelId: u,
1859
1881
  labelHidden: m = !1,
1860
- type: h = "text",
1882
+ type: p = "text",
1861
1883
  helperText: f = "",
1862
- rightElement: b,
1863
- spacing: R,
1864
- ...A
1865
- }, T) => {
1866
- const _ = B(null), [I, j] = U(0), C = ta({ id: e, prefix: `${vt}-` }), G = `${t} error, ${f}`, O = ha({
1884
+ rightElement: w,
1885
+ spacing: x,
1886
+ ...O
1887
+ }, _) => {
1888
+ const S = W(null), [D, C] = U(0), N = ra({ id: e, prefix: `${vt}-` }), V = `${t} error, ${f}`, R = pa({
1867
1889
  className: o,
1868
1890
  inputClassName: s,
1869
1891
  error: a,
1870
1892
  raw: n,
1871
1893
  focusMode: l,
1872
- disabled: u,
1873
- noBorder: p,
1874
- spacing: R,
1894
+ disabled: d,
1895
+ noBorder: h,
1896
+ spacing: x,
1875
1897
  mode: i
1876
1898
  });
1877
- return Rt(() => {
1878
- _.current && j(_.current.offsetWidth + 18 + 10);
1879
- }, []), /* @__PURE__ */ S("div", { className: O.wrapper, children: [
1899
+ return Ot(() => {
1900
+ S.current && C(S.current.offsetWidth + 18 + 10);
1901
+ }, []), /* @__PURE__ */ T("div", { className: R.wrapper, children: [
1880
1902
  /* @__PURE__ */ c(
1881
1903
  "label",
1882
1904
  {
1883
- htmlFor: C,
1884
- id: d,
1885
- className: O.accessibleLabel,
1905
+ htmlFor: N,
1906
+ id: u,
1907
+ className: R.accessibleLabel,
1886
1908
  children: r
1887
1909
  }
1888
1910
  ),
1889
1911
  /* @__PURE__ */ c(
1890
1912
  "input",
1891
1913
  {
1892
- ref: T,
1893
- id: C,
1914
+ ref: _,
1915
+ id: N,
1894
1916
  name: t,
1895
- type: h,
1896
- disabled: u,
1917
+ type: p,
1918
+ disabled: d,
1897
1919
  placeholder: n ? void 0 : " ",
1898
- className: O.input,
1899
- ...f && { "aria-describedby": `${C}-helper` },
1920
+ className: R.input,
1921
+ ...f && { "aria-describedby": `${N}-helper` },
1900
1922
  ...a && { "aria-invalid": "true" },
1901
- ...b && !n && { style: { paddingRight: I } },
1902
- ...A
1923
+ ...w && !n && { style: { paddingRight: D } },
1924
+ ...O
1903
1925
  }
1904
1926
  ),
1905
1927
  !n && !m && /* @__PURE__ */ c(
1906
1928
  "label",
1907
1929
  {
1908
1930
  "aria-hidden": !0,
1909
- htmlFor: C,
1910
- className: O.visibleLabel,
1931
+ htmlFor: N,
1932
+ className: R.visibleLabel,
1911
1933
  children: r
1912
1934
  }
1913
1935
  ),
1914
1936
  f && /* @__PURE__ */ c(
1915
1937
  "div",
1916
1938
  {
1917
- id: `${C}-helper`,
1918
- className: O.helperText,
1939
+ id: `${N}-helper`,
1940
+ className: R.helperText,
1919
1941
  children: f
1920
1942
  }
1921
1943
  ),
1922
- b && /* @__PURE__ */ c(
1944
+ w && /* @__PURE__ */ c(
1923
1945
  "div",
1924
1946
  {
1925
- ref: _,
1926
- className: O.rightElement,
1927
- children: b
1947
+ ref: S,
1948
+ className: R.rightElement,
1949
+ children: w
1928
1950
  }
1929
1951
  ),
1930
- a && f && /* @__PURE__ */ c(Et, { politeness: "polite", clearAnnouncementDelay: 500, children: G })
1952
+ a && f && /* @__PURE__ */ c(Et, { politeness: "polite", clearAnnouncementDelay: 500, children: V })
1931
1953
  ] });
1932
1954
  }
1933
1955
  );
1934
1956
  Re.displayName = "TextInput";
1935
- const pa = 500, ga = 5e3, fa = 2e4, kt = K.forwardRef(
1957
+ const ga = 500, fa = 5e3, ya = 2e4, kt = K.forwardRef(
1936
1958
  ({
1937
1959
  name: e,
1938
1960
  disabled: t,
@@ -1943,73 +1965,73 @@ const pa = 500, ga = 5e3, fa = 2e4, kt = K.forwardRef(
1943
1965
  onBlur: s,
1944
1966
  onFocus: i,
1945
1967
  onTextInputMaskBlur: l,
1946
- rightElement: u,
1947
- spacing: p,
1948
- ...d
1968
+ rightElement: d,
1969
+ spacing: h,
1970
+ ...u
1949
1971
  }, m) => {
1950
- const [h, f] = U(!0), [b, R] = U({
1972
+ const [p, f] = U(!0), [w, x] = U({
1951
1973
  message: null,
1952
1974
  politeness: null
1953
- }), A = B(!0), T = B(), _ = B(null), I = ea([m, _]), j = h ? "Show" : "Hide", C = () => {
1954
- clearTimeout(T.current), A.current || (T.current = window.setTimeout(() => {
1955
- A.current = !0, f(!0), R({
1956
- announcementTimeout: ga,
1975
+ }), O = W(!0), _ = W(), S = W(null), D = ta([m, S]), C = p ? "Show" : "Hide", N = () => {
1976
+ clearTimeout(_.current), O.current || (_.current = window.setTimeout(() => {
1977
+ O.current = !0, f(!0), x({
1978
+ announcementTimeout: fa,
1957
1979
  politeness: "polite",
1958
1980
  message: `${r} hiding characters`
1959
1981
  }), n && n(!0);
1960
- }, fa));
1961
- }, G = (w) => {
1962
- w.preventDefault();
1963
- const x = !A.current;
1964
- A.current = x, C(), f(x), R({
1965
- announcementTimeout: pa,
1982
+ }, ya));
1983
+ }, V = (b) => {
1984
+ b.preventDefault();
1985
+ const A = !O.current;
1986
+ O.current = A, N(), f(A), x({
1987
+ announcementTimeout: ga,
1966
1988
  politeness: "assertive",
1967
- message: x ? "Characters hidden" : "Characters showing"
1968
- }), n && n(x);
1969
- }, O = (w) => {
1970
- var x;
1971
- const { relatedTarget: V } = w, X = (x = _.current) == null ? void 0 : x.parentElement;
1972
- X != null && X.contains(V) || l && l();
1973
- }, y = (w) => {
1974
- C(), s && s(w), O(w);
1975
- }, M = (w) => {
1976
- C(), i && i(w);
1977
- }, D = (w) => {
1978
- C(), o && o(w);
1989
+ message: A ? "Characters hidden" : "Characters showing"
1990
+ }), n && n(A);
1991
+ }, R = (b) => {
1992
+ var A;
1993
+ const { relatedTarget: B } = b, G = (A = S.current) == null ? void 0 : A.parentElement;
1994
+ G != null && G.contains(B) || l && l();
1995
+ }, fe = (b) => {
1996
+ N(), s && s(b), R(b);
1997
+ }, y = (b) => {
1998
+ N(), i && i(b);
1999
+ }, $ = (b) => {
2000
+ N(), o && o(b);
1979
2001
  };
1980
2002
  return z(() => () => {
1981
- clearTimeout(T.current);
1982
- }, []), /* @__PURE__ */ S(q, { children: [
2003
+ clearTimeout(_.current);
2004
+ }, []), /* @__PURE__ */ T(q, { children: [
1983
2005
  /* @__PURE__ */ c(
1984
2006
  Re,
1985
2007
  {
1986
- ref: I,
2008
+ ref: D,
1987
2009
  name: e,
1988
2010
  label: r,
1989
2011
  labelHidden: a,
1990
- type: h ? "password" : "text",
2012
+ type: p ? "password" : "text",
1991
2013
  disabled: t,
1992
- spacing: p,
1993
- onBlur: y,
1994
- onFocus: M,
1995
- onChange: D,
1996
- rightElement: K.cloneElement(u, {
2014
+ spacing: h,
2015
+ onBlur: fe,
2016
+ onFocus: y,
2017
+ onChange: $,
2018
+ rightElement: K.cloneElement(d, {
1997
2019
  ref: m,
1998
- label: j,
1999
- onClick: G,
2000
- onBlur: O,
2020
+ label: C,
2021
+ onClick: V,
2022
+ onBlur: R,
2001
2023
  disabled: t
2002
2024
  }),
2003
- ...d
2025
+ ...u
2004
2026
  }
2005
2027
  ),
2006
2028
  /* @__PURE__ */ c(
2007
2029
  Et,
2008
2030
  {
2009
2031
  role: "status",
2010
- politeness: b.politeness,
2011
- clearAnnouncementDelay: b.announcementTimeout,
2012
- children: b.message
2032
+ politeness: w.politeness,
2033
+ clearAnnouncementDelay: w.announcementTimeout,
2034
+ children: w.message
2013
2035
  }
2014
2036
  )
2015
2037
  ] });
@@ -2029,7 +2051,7 @@ try {
2029
2051
  });
2030
2052
  } catch {
2031
2053
  }
2032
- const ya = (e) => {
2054
+ const ba = (e) => {
2033
2055
  let t = "";
2034
2056
  if (typeof e == "number" || typeof e == "string")
2035
2057
  t = "m-" + e;
@@ -2048,24 +2070,24 @@ const ya = (e) => {
2048
2070
  spacing: s,
2049
2071
  title: i,
2050
2072
  semantic: l = !1,
2051
- ...u
2073
+ ...d
2052
2074
  }) => {
2053
- const p = ya(s), d = g(
2054
- p,
2075
+ const h = ba(s), u = g(
2076
+ h,
2055
2077
  a || o
2056
2078
  );
2057
- return /* @__PURE__ */ S(q, { children: [
2079
+ return /* @__PURE__ */ T(q, { children: [
2058
2080
  /* @__PURE__ */ c(
2059
2081
  "svg",
2060
2082
  {
2061
2083
  xmlns: "http://www.w3.org/2000/svg",
2062
- className: d,
2084
+ className: u,
2063
2085
  viewBox: r || n,
2064
2086
  fill: t || "currentColor",
2065
2087
  role: "img",
2066
2088
  "aria-hidden": !l,
2067
2089
  focusable: !1,
2068
- ...u,
2090
+ ...d,
2069
2091
  children: e
2070
2092
  }
2071
2093
  ),
@@ -2085,7 +2107,7 @@ try {
2085
2107
  });
2086
2108
  } catch {
2087
2109
  }
2088
- const ba = ({
2110
+ const wa = ({
2089
2111
  className: e,
2090
2112
  viewBox: t,
2091
2113
  spacing: r,
@@ -2110,14 +2132,14 @@ const ba = ({
2110
2132
  }
2111
2133
  ) })
2112
2134
  }
2113
- ), wa = ({
2135
+ ), Ea = ({
2114
2136
  className: e,
2115
2137
  viewBox: t,
2116
2138
  spacing: r,
2117
2139
  title: a,
2118
2140
  monotone: n,
2119
2141
  ...o
2120
- }) => /* @__PURE__ */ S(
2142
+ }) => /* @__PURE__ */ T(
2121
2143
  Oe,
2122
2144
  {
2123
2145
  defaultViewBox: "0 0 640 512",
@@ -2138,14 +2160,14 @@ const ba = ({
2138
2160
  /* @__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" })
2139
2161
  ]
2140
2162
  }
2141
- ), Ea = ({
2163
+ ), va = ({
2142
2164
  className: e,
2143
2165
  viewBox: t,
2144
2166
  spacing: r,
2145
2167
  title: a,
2146
2168
  monotone: n,
2147
2169
  ...o
2148
- }) => /* @__PURE__ */ S(
2170
+ }) => /* @__PURE__ */ T(
2149
2171
  Oe,
2150
2172
  {
2151
2173
  defaultViewBox: "0 0 576 512",
@@ -2180,7 +2202,7 @@ try {
2180
2202
  });
2181
2203
  } catch {
2182
2204
  }
2183
- const va = (e) => {
2205
+ const ka = (e) => {
2184
2206
  let t = "";
2185
2207
  if (typeof e == "number" || typeof e == "string")
2186
2208
  t = "m-" + e;
@@ -2189,10 +2211,10 @@ const va = (e) => {
2189
2211
  (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(" ");
2190
2212
  }
2191
2213
  return t;
2192
- }, ka = "av-flexgrid", ie = "av-flexgrid-item", me = 0.25, St = K.createContext({
2214
+ }, Sa = "av-flexgrid", se = "av-flexgrid-item", ue = 0.25, St = K.createContext({
2193
2215
  columnGap: 0,
2194
2216
  rowGap: 0
2195
- }), Sa = ({
2217
+ }), Ta = ({
2196
2218
  children: e,
2197
2219
  className: t,
2198
2220
  columnGap: r = 1,
@@ -2202,10 +2224,10 @@ const va = (e) => {
2202
2224
  direction: s = "row",
2203
2225
  alignHorizontal: i = "normal",
2204
2226
  alignVertical: l = "normal",
2205
- spacing: u,
2206
- ...p
2227
+ spacing: d,
2228
+ ...h
2207
2229
  }) => {
2208
- const d = {
2230
+ const u = {
2209
2231
  flexDirection: s,
2210
2232
  justifyContent: i,
2211
2233
  alignItems: l,
@@ -2216,14 +2238,14 @@ const va = (e) => {
2216
2238
  * by the columnGap and rowGap that will be applied
2217
2239
  * to all FlexgridItems (see context and paddings).
2218
2240
  */
2219
- marginLeft: r * -1 * me + "rem",
2220
- marginTop: a * -1 * me + "rem"
2241
+ marginLeft: r * -1 * ue + "rem",
2242
+ marginTop: a * -1 * ue + "rem"
2221
2243
  }, m = g(
2222
- ka,
2244
+ Sa,
2223
2245
  t,
2224
2246
  "box-border flex flex-wrap"
2225
- ), h = { columnGap: r, rowGap: a }, f = u ? "div" : K.Fragment;
2226
- return /* @__PURE__ */ c(f, { ...u ? { className: va(u) } : {}, children: /* @__PURE__ */ c("div", { className: m, style: d, ...p, children: /* @__PURE__ */ c(St.Provider, { value: h, children: e }) }) });
2247
+ ), 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 }) }) });
2227
2249
  }, Ae = (e, t) => g({
2228
2250
  "basis-1/12": e === 1 && !t,
2229
2251
  "sm:basis-1/12": e === 1 && t === "sm",
@@ -2297,39 +2319,39 @@ const va = (e) => {
2297
2319
  "lg:basis-full": e === 12 && t === "lg",
2298
2320
  "xl:basis-full": e === 12 && t === "xl",
2299
2321
  "2xl:basis-full": e === 12 && t === "2xl"
2300
- }), Ta = ({
2322
+ }), Aa = ({
2301
2323
  className: e,
2302
2324
  span: t
2303
2325
  }) => {
2304
2326
  if (!t)
2305
- return g(e, ie, "box-border basis-auto");
2327
+ return g(e, se, "box-border basis-auto");
2306
2328
  if (typeof t == "number")
2307
- return g(e, ie, "box-border max-w-full", {
2329
+ return g(e, se, "box-border max-w-full", {
2308
2330
  [`${Ae(t)}`]: !0
2309
2331
  });
2310
2332
  if (typeof t == "string")
2311
- return g(e, ie, "box-border basis-auto", {
2333
+ return g(e, se, "box-border basis-auto", {
2312
2334
  "max-w-full grow": t === "auto"
2313
2335
  });
2314
2336
  if (typeof t == "object") {
2315
2337
  const r = Object.entries(t).map(([a, n]) => a === "fallback" ? Ae(n) : Ae(n, a));
2316
2338
  return g(
2317
2339
  e,
2318
- ie,
2340
+ se,
2319
2341
  "box-border",
2320
2342
  r
2321
2343
  );
2322
2344
  }
2323
- }, ce = ({
2345
+ }, ie = ({
2324
2346
  children: e,
2325
2347
  className: t,
2326
2348
  span: r,
2327
2349
  ...a
2328
2350
  }) => {
2329
2351
  const { columnGap: n, rowGap: o } = Xe(St), s = {
2330
- paddingLeft: n * me + "rem",
2331
- paddingTop: o * me + "rem"
2332
- }, i = Ta({
2352
+ paddingLeft: n * ue + "rem",
2353
+ paddingTop: o * ue + "rem"
2354
+ }, i = Aa({
2333
2355
  className: t,
2334
2356
  span: r
2335
2357
  });
@@ -2348,7 +2370,7 @@ try {
2348
2370
  });
2349
2371
  } catch {
2350
2372
  }
2351
- const Aa = "ASK! ME! ANYTHING!", Tt = "Sassy Saint", _a = "gizmette.com", Ia = "Log in", Dn = "Log out", xa = "Password", Na = "Powered by OpenAI", Mn = "Send", $n = "Profile", Ln = "Statistics", Pn = "Chat history", Un = "About", Hn = "Type your question here", Kn = "Clear chat", Bn = "Cancel chat", Wn = "N/A", jn = {
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 = {
2352
2374
  PREFERENCES: {
2353
2375
  TITLE: "User preferences",
2354
2376
  NAME: "Name",
@@ -2381,7 +2403,7 @@ const Aa = "ASK! ME! ANYTHING!", Tt = "Sassy Saint", _a = "gizmette.com", Ia = "
2381
2403
  PLUGIN: "Plugin"
2382
2404
  }
2383
2405
  }, Qe = (e) => Number.isFinite(e) ? e : 0;
2384
- function Ca(e) {
2406
+ function Ra(e) {
2385
2407
  return {
2386
2408
  days: Math.trunc(e / 864e5),
2387
2409
  hours: Math.trunc(e / 36e5 % 24),
@@ -2392,7 +2414,7 @@ function Ca(e) {
2392
2414
  nanoseconds: Math.trunc(Qe(e * 1e6) % 1e3)
2393
2415
  };
2394
2416
  }
2395
- function Ra(e) {
2417
+ function Oa(e) {
2396
2418
  return {
2397
2419
  days: e / 86400000n,
2398
2420
  hours: e / 3600000n % 24n,
@@ -2403,53 +2425,53 @@ function Ra(e) {
2403
2425
  nanoseconds: 0n
2404
2426
  };
2405
2427
  }
2406
- function Oa(e) {
2428
+ function Da(e) {
2407
2429
  switch (typeof e) {
2408
2430
  case "number": {
2409
2431
  if (Number.isFinite(e))
2410
- return Ca(e);
2432
+ return Ra(e);
2411
2433
  break;
2412
2434
  }
2413
2435
  case "bigint":
2414
- return Ra(e);
2436
+ return Oa(e);
2415
2437
  }
2416
2438
  throw new TypeError("Expected a finite number or bigint");
2417
2439
  }
2418
- const Da = (e) => e === 0 || e === 0n, Ma = (e, t) => t === 1 || t === 1n ? e : `${e}s`, $a = 1e-7, La = 24n * 60n * 60n * 1000n;
2419
- function Pa(e, t) {
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) {
2420
2442
  const r = typeof e == "bigint";
2421
2443
  if (!r && !Number.isFinite(e))
2422
2444
  throw new TypeError("Expected a finite number or bigint");
2423
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);
2424
2446
  let a = [];
2425
- const n = (u, p) => {
2426
- const d = Math.floor(u * 10 ** p + $a);
2427
- return (Math.round(d) / 10 ** p).toFixed(p);
2428
- }, o = (u, p, d, m) => {
2429
- if (!((a.length === 0 || !t.colonNotation) && Da(u) && !(t.colonNotation && d === "m"))) {
2430
- if (m = m ?? String(u), t.colonNotation) {
2431
- const h = m.includes(".") ? m.split(".")[0].length : m.length, f = a.length > 0 ? 2 : 1;
2432
- m = "0".repeat(Math.max(0, f - h)) + m;
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;
2433
2455
  } else
2434
- m += t.verbose ? " " + Ma(p, u) : d;
2456
+ m += t.verbose ? " " + Ma(h, d) : u;
2435
2457
  a.push(m);
2436
2458
  }
2437
- }, s = Oa(e), i = BigInt(s.days);
2459
+ }, s = Da(e), i = BigInt(s.days);
2438
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) {
2439
- const u = Number(s.seconds), p = Number(s.milliseconds), d = Number(s.microseconds), m = Number(s.nanoseconds);
2440
- if (o(u, "second", "s"), t.formatSubMilliseconds)
2441
- o(p, "millisecond", "ms"), o(d, "microsecond", "µs"), o(m, "nanosecond", "ns");
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");
2442
2464
  else {
2443
- const h = p + d / 1e3 + m / 1e6, f = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, b = h >= 1 ? Math.round(h) : Math.ceil(h), R = f ? h.toFixed(f) : b;
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;
2444
2466
  o(
2445
- Number.parseFloat(R),
2467
+ Number.parseFloat(x),
2446
2468
  "millisecond",
2447
2469
  "ms",
2448
- R
2470
+ x
2449
2471
  );
2450
2472
  }
2451
2473
  } else {
2452
- const u = (r ? Number(e % La) : e) / 1e3 % 60, p = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, d = n(u, p), m = t.keepDecimalsOnWholeSeconds ? d : d.replace(/\.0+$/, "");
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+$/, "");
2453
2475
  o(Number.parseFloat(m), "second", "s", m);
2454
2476
  }
2455
2477
  if (a.length === 0)
@@ -2457,7 +2479,7 @@ function Pa(e, t) {
2457
2479
  const l = t.colonNotation ? ":" : " ";
2458
2480
  return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), a.join(l);
2459
2481
  }
2460
- const Ua = process.env.NODE_ENV === "production", At = !Ua, Gn = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, _t = (e, t) => {
2482
+ const Ha = process.env.NODE_ENV === "production", At = !Ha, Vn = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, _t = (e, t) => {
2461
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;
2462
2484
  return {
2463
2485
  dir: r,
@@ -2465,17 +2487,17 @@ const Ua = process.env.NODE_ENV === "production", At = !Ua, Gn = (e, t) => e.len
2465
2487
  min: n,
2466
2488
  sec: o
2467
2489
  };
2468
- }, Vn = (e) => {
2490
+ }, Jn = (e) => {
2469
2491
  if (!e && e !== 0)
2470
2492
  return "N/A";
2471
2493
  const t = _t(e, !1);
2472
2494
  return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
2473
- }, Jn = (e) => {
2495
+ }, Fn = (e) => {
2474
2496
  if (!e && e !== 0)
2475
2497
  return "N/A";
2476
2498
  const t = _t(e, !0);
2477
2499
  return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
2478
- }, Fn = async () => {
2500
+ }, zn = async () => {
2479
2501
  const e = {
2480
2502
  /**
2481
2503
  * A boolean value that indicates the application would
@@ -2524,11 +2546,11 @@ const Ua = process.env.NODE_ENV === "production", At = !Ua, Gn = (e, t) => e.len
2524
2546
  e
2525
2547
  );
2526
2548
  });
2527
- }, zn = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ c("dl", { className: "my-0", children: /* @__PURE__ */ S("div", { className: "flex items-center justify-between", children: [
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: [
2528
2550
  /* @__PURE__ */ c("dt", { className: "inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
2529
2551
  /* @__PURE__ */ c("dd", { className: "inline-block", children: t[r] })
2530
2552
  ] }) }, `${e}-${r}`)) : null;
2531
- function Yn({
2553
+ function qn({
2532
2554
  data: e,
2533
2555
  formatter: t = (r) => r
2534
2556
  }) {
@@ -2540,75 +2562,75 @@ function Yn({
2540
2562
  );
2541
2563
  return t(a ? a / r.length : 0);
2542
2564
  }
2543
- const qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Qn = new Intl.NumberFormat("en", {
2565
+ const Qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Xn = new Intl.NumberFormat("en", {
2544
2566
  style: "decimal",
2545
2567
  signDisplay: "never",
2546
2568
  minimumFractionDigits: 0,
2547
2569
  maximumFractionDigits: 0
2548
- }), Xn = (e) => Pa(e, {
2570
+ }), Zn = (e) => Ua(e, {
2549
2571
  secondsDecimalDigits: 2,
2550
2572
  unitCount: 2
2551
- }), Ha = (e) => g(
2573
+ }), Ka = (e) => g(
2552
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",
2553
2575
  e || At ? "pt-4" : "pt-10"
2554
- ), Zn = (e, t) => t === 1 ? e : `${e}s`, Ka = ({
2576
+ ), eo = (e, t) => t === 1 ? e : `${e}s`, Ba = ({
2555
2577
  serverStats: e
2556
2578
  }) => /* @__PURE__ */ c(
2557
- Xr,
2579
+ Zr,
2558
2580
  {
2559
2581
  mode: "light",
2560
- row1: /* @__PURE__ */ S("div", { children: [
2582
+ row1: /* @__PURE__ */ T("div", { children: [
2561
2583
  Tt,
2562
2584
  " v",
2563
- "3.1.0",
2585
+ "3.1.2",
2564
2586
  " - ",
2565
- Na,
2587
+ Ca,
2566
2588
  At && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
2567
2589
  ] }),
2568
- row2: /* @__PURE__ */ S("div", { children: [
2590
+ row2: /* @__PURE__ */ T("div", { children: [
2569
2591
  "© ",
2570
2592
  (/* @__PURE__ */ new Date()).getFullYear(),
2571
2593
  " ",
2572
- _a
2594
+ Ia
2573
2595
  ] })
2574
2596
  }
2575
- ), Ba = Ze(() => import("./LazyHeader.Dq9Jaelp.js")), Wa = () => {
2597
+ ), Wa = Ze(() => import("./LazyHeader.B1723ukv.js")), ja = () => {
2576
2598
  const { isAuthenticated: e } = xe();
2577
- return /* @__PURE__ */ S(q, { children: [
2578
- e && /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Ba, {}) }),
2579
- /* @__PURE__ */ S("div", { className: "flex items-center justify-center", children: [
2580
- /* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(ba, {}) }),
2581
- /* @__PURE__ */ S("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
2599
+ return /* @__PURE__ */ T(q, { children: [
2600
+ e && /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Wa, {}) }),
2601
+ /* @__PURE__ */ T("div", { className: "flex items-center justify-center", children: [
2602
+ /* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(wa, {}) }),
2603
+ /* @__PURE__ */ T("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
2582
2604
  /* @__PURE__ */ c("h1", { children: Tt }),
2583
- /* @__PURE__ */ c("h2", { children: Aa })
2605
+ /* @__PURE__ */ c("h2", { children: _a })
2584
2606
  ] })
2585
2607
  ] })
2586
2608
  ] });
2587
- }, ja = () => {
2588
- const { login: e, logoutReason: t } = xe(), [r, a] = U(""), [n, o] = U(""), [s, i] = U(!0), [l, u] = U({
2609
+ }, Ga = () => {
2610
+ const { login: e, logoutReason: t } = xe(), [r, a] = U(""), [n, o] = U(""), [s, i] = U(!0), [l, d] = U({
2589
2611
  username: "",
2590
2612
  password: ""
2591
- }), p = async (d) => {
2592
- d.preventDefault(), await e(
2613
+ }), h = async (u) => {
2614
+ u.preventDefault(), await e(
2593
2615
  l.username,
2594
2616
  l.password,
2595
2617
  Q.CODE
2596
2618
  ) || (o(""), a("Invalid username or password"));
2597
2619
  };
2598
2620
  return z(() => {
2599
- var d;
2600
- (d = document.getElementById("logo")) == null || d.classList.add("fadeOut"), setTimeout(() => {
2621
+ var u;
2622
+ (u = document.getElementById("logo")) == null || u.classList.add("fadeOut"), setTimeout(() => {
2601
2623
  var m;
2602
2624
  (m = document.getElementById("root")) == null || m.classList.replace("app-hidden", "fadeIn");
2603
2625
  }, 500);
2604
2626
  }), z(() => {
2605
2627
  t && o(t);
2606
- }, [t]), /* @__PURE__ */ S(q, { children: [
2607
- /* @__PURE__ */ S(Zr, { children: [
2608
- /* @__PURE__ */ c("div", { className: Ha(), children: /* @__PURE__ */ c(Wa, {}) }),
2609
- /* @__PURE__ */ c("form", { className: "mx-auto mt-5", onSubmit: p, children: /* @__PURE__ */ S(Sa, { rowGap: 7, width: "350px", children: [
2610
- /* @__PURE__ */ c(ce, { span: 12, children: n && /* @__PURE__ */ c("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: n }) }),
2611
- /* @__PURE__ */ c(ce, { span: 12, children: /* @__PURE__ */ c(
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: [
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
+ /* @__PURE__ */ c(ie, { span: 12, children: /* @__PURE__ */ c(
2612
2634
  Re,
2613
2635
  {
2614
2636
  required: !0,
@@ -2619,16 +2641,16 @@ const qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2619
2641
  focusMode: "light",
2620
2642
  name: "username",
2621
2643
  label: "Username",
2622
- onChange: (d) => {
2623
- u({
2644
+ onChange: (u) => {
2645
+ d({
2624
2646
  ...l,
2625
- username: d.target.value
2647
+ username: u.target.value
2626
2648
  }), a("");
2627
2649
  },
2628
2650
  error: r !== ""
2629
2651
  }
2630
2652
  ) }),
2631
- /* @__PURE__ */ c(ce, { span: 12, children: /* @__PURE__ */ c(
2653
+ /* @__PURE__ */ c(ie, { span: 12, children: /* @__PURE__ */ c(
2632
2654
  kt,
2633
2655
  {
2634
2656
  required: !0,
@@ -2638,20 +2660,20 @@ const qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2638
2660
  mode: "dark",
2639
2661
  focusMode: "light",
2640
2662
  name: "password",
2641
- label: xa,
2642
- rightElement: /* @__PURE__ */ c(ft, { focusMode: "light", children: s ? /* @__PURE__ */ c(Ea, {}) : /* @__PURE__ */ c(wa, {}) }),
2663
+ label: Na,
2664
+ rightElement: /* @__PURE__ */ c(ft, { focusMode: "light", children: s ? /* @__PURE__ */ c(va, {}) : /* @__PURE__ */ c(Ea, {}) }),
2643
2665
  onMaskChange: i,
2644
- onChange: (d) => {
2645
- u({
2666
+ onChange: (u) => {
2667
+ d({
2646
2668
  ...l,
2647
- password: d.target.value
2669
+ password: u.target.value
2648
2670
  }), a("");
2649
2671
  },
2650
2672
  error: r !== "",
2651
2673
  helperText: r
2652
2674
  }
2653
2675
  ) }),
2654
- /* @__PURE__ */ c(ce, { span: 12, children: /* @__PURE__ */ c(
2676
+ /* @__PURE__ */ c(ie, { span: 12, children: /* @__PURE__ */ c(
2655
2677
  yt,
2656
2678
  {
2657
2679
  focusMode: "light",
@@ -2659,91 +2681,91 @@ const qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2659
2681
  noBorder: !0,
2660
2682
  type: "submit",
2661
2683
  className: "mb-4 mt-6",
2662
- children: Ia
2684
+ children: xa
2663
2685
  }
2664
2686
  ) })
2665
2687
  ] }) })
2666
2688
  ] }),
2667
- /* @__PURE__ */ c(Ka, {})
2689
+ /* @__PURE__ */ c(Ba, {})
2668
2690
  ] });
2669
- }, Ga = Ze(() => import("./App.BDNqHRx0.js").then((e) => e.App)), Va = ({ isComponent: e }) => {
2691
+ }, Va = Ze(() => import("./App.DJozcBeB.js").then((e) => e.App)), Ja = ({ isComponent: e }) => {
2670
2692
  const { isAuthenticated: t } = xe();
2671
- return t ? /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Ga, { isComponent: e }) }) : /* @__PURE__ */ c(ja, {});
2672
- }, Ja = ({
2693
+ return t ? /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Va, { isComponent: e }) }) : /* @__PURE__ */ c(Ga, {});
2694
+ }, Fa = ({
2673
2695
  isComponent: e = !1
2674
- }) => /* @__PURE__ */ c(q, { children: /* @__PURE__ */ c(Kr, { clientId: Br, children: /* @__PURE__ */ c(Va, { isComponent: e }) }) }), eo = () => /* @__PURE__ */ c(Ja, { isComponent: !0 });
2696
+ }) => /* @__PURE__ */ c(q, { children: /* @__PURE__ */ c(Br, { clientId: Wr, children: /* @__PURE__ */ c(Ja, { isComponent: e }) }) }), to = () => /* @__PURE__ */ c(Fa, { isComponent: !0 });
2675
2697
  export {
2676
2698
  gt as A,
2677
- Un as ABOUT_TITLE,
2678
- hn as ACTION_LOCATION,
2679
- ln as ACTION_MESSAGE,
2680
- un as ACTION_MODEL,
2681
- dn as ACTION_RESET,
2682
- mn as ACTION_RESTORE,
2683
- gn as ACTION_SEARCH,
2684
- fn as ACTION_SORT,
2685
- pn as ACTION_STREAMING,
2686
- Ka as AppFooter,
2687
- Bn as CANCEL,
2688
- jn as CARDS,
2689
- Kn as CLEAR,
2690
- Tn as E,
2691
- on as ERROR_MESSAGE,
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,
2692
2714
  Re as G,
2693
- cn as GPT4_MAX_TOKENS,
2694
- Pn as HISTORY_TITLE,
2695
- bn as LOCAL_STORAGE_CHAT_DETAILS,
2696
- vn as LOCAL_STORAGE_LOCATION,
2697
- yn as LOCAL_STORAGE_PREFIX,
2698
- wn as LOCAL_STORAGE_SEARCH,
2699
- En as LOCAL_STORAGE_SORT,
2700
- Dn as LOG_OUT,
2701
- ta as M,
2702
- sn as MODEL_GPT4,
2703
- Wa as MessagesContainerHeader,
2704
- An as N,
2705
- Wn as NA,
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,
2706
2728
  ft as O,
2707
- $n as PROFILE_TITLE,
2708
- tn as ROLE_ASSISTANT,
2709
- nn as ROLE_HIDDEN,
2710
- an as ROLE_INTERNAL,
2711
- rn as ROLE_SYSTEM,
2712
- en as ROLE_USER,
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,
2713
2735
  Ne as S,
2714
2736
  Mn as SEND,
2715
- Ln as STATS,
2716
- kn as STATS_SEPARATOR,
2717
- eo as SassySaint,
2718
- Hn as TYPE_QUESTION,
2737
+ Pn as STATS,
2738
+ Sn as STATS_SEPARATOR,
2739
+ to as SassySaint,
2740
+ Kn as TYPE_QUESTION,
2719
2741
  Et as U,
2720
- Cn as a,
2721
- Sa as b,
2722
- Zr as c,
2723
- In as c$1,
2724
- Vn as convertLatitudeToDMS,
2725
- Jn as convertLongitudeToDMS,
2726
- Xn as durationFormatter,
2727
- Yn as extractAverage,
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,
2748
+ xe as dr,
2749
+ Zn as durationFormatter,
2750
+ qn as extractAverage,
2728
2751
  ht as f,
2729
- ea as f$1,
2752
+ ta as f$1,
2730
2753
  Oe as g,
2731
- Fn as getCurrentGeoLocation,
2732
- Ha as getMessageContaintWrapperClass,
2754
+ zn as getCurrentGeoLocation,
2755
+ Ka as getMessageContaintWrapperClass,
2733
2756
  Ce as i,
2734
- _n as i$1,
2735
- qn as isLastMessageFromRole,
2736
- ce as j,
2737
- Rn as l,
2738
- xn as n,
2739
- Qn as numberFormatter,
2740
- sa as o,
2741
- On as p,
2742
- Zn as pluralize,
2743
- Nn as r,
2744
- zn as renderDataAsList,
2745
- Sn as s,
2746
- Gn as truncate,
2747
- xe as ur,
2757
+ In as i$1,
2758
+ Qn as isLastMessageFromRole,
2759
+ 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,
2748
2770
  yt as x
2749
2771
  };