@versini/sassysaint 6.3.2 → 6.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { jsx as l, jsxs as O, Fragment as Qe } from "react/jsx-runtime";
2
- import F, { createContext as nr, useReducer as wt, useRef as $, useCallback as q, useEffect as Q, useContext as Tt, useSyncExternalStore as or, useId as It, useState as z, useLayoutEffect as ot, useMemo as St, lazy as sr, Suspense as ir } from "react";
3
- import f from "clsx";
4
- var cr = Object.defineProperty, lr = (e, t, r) => t in e ? cr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ue = (e, t, r) => lr(e, typeof t != "symbol" ? t + "" : t, r);
1
+ import { jsx as l, jsxs as M, Fragment as et } from "react/jsx-runtime";
2
+ import X, { createContext as or, useReducer as Tt, useRef as x, useCallback as q, useEffect as Y, useContext as It, useSyncExternalStore as sr, useLayoutEffect as Re, useMemo as De, useState as z, useId as St, lazy as ir, Suspense as cr } from "react";
3
+ import p from "clsx";
4
+ var lr = Object.defineProperty, dr = (e, t, r) => t in e ? lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, He = (e, t, r) => dr(e, typeof t != "symbol" ? t + "" : t, r);
5
5
  /*!
6
6
  @versini/auth-provider v7.4.0
7
7
  © 2024 gizmette.com
@@ -15,82 +15,82 @@ try {
15
15
  });
16
16
  } catch {
17
17
  }
18
- function J(e) {
18
+ function V(e) {
19
19
  const t = new Uint8Array(e);
20
20
  let r = "";
21
21
  for (const a of t)
22
22
  r += String.fromCharCode(a);
23
23
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
24
24
  }
25
- function Re(e) {
25
+ function Ne(e) {
26
26
  const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, a = t.padEnd(t.length + r, "="), n = atob(a), o = new ArrayBuffer(n.length), s = new Uint8Array(o);
27
27
  for (let i = 0; i < n.length; i++)
28
28
  s[i] = n.charCodeAt(i);
29
29
  return o;
30
30
  }
31
- function Ze() {
31
+ function tt() {
32
32
  return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
33
33
  }
34
34
  function _t(e) {
35
35
  const { id: t } = e;
36
36
  return {
37
37
  ...e,
38
- id: Re(t),
38
+ id: Ne(t),
39
39
  transports: e.transports
40
40
  };
41
41
  }
42
42
  function kt(e) {
43
43
  return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
44
44
  }
45
- let N = class extends Error {
45
+ let v = class extends Error {
46
46
  constructor({ message: t, code: r, cause: a, name: n }) {
47
47
  super(t, { cause: a }), this.name = n ?? a.name, this.code = r;
48
48
  }
49
49
  };
50
- function dr({ error: e, options: t }) {
50
+ function ur({ error: e, options: t }) {
51
51
  var a, n;
52
52
  const { publicKey: r } = t;
53
53
  if (!r)
54
54
  throw Error("options was missing required publicKey property");
55
55
  if (e.name === "AbortError") {
56
56
  if (t.signal instanceof AbortSignal)
57
- return new N({
57
+ return new v({
58
58
  message: "Registration ceremony was sent an abort signal",
59
59
  code: "ERROR_CEREMONY_ABORTED",
60
60
  cause: e
61
61
  });
62
62
  } else if (e.name === "ConstraintError") {
63
63
  if (((a = r.authenticatorSelection) == null ? void 0 : a.requireResidentKey) === !0)
64
- return new N({
64
+ return new v({
65
65
  message: "Discoverable credentials were required but no available authenticator supported it",
66
66
  code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
67
67
  cause: e
68
68
  });
69
69
  if (((n = r.authenticatorSelection) == null ? void 0 : n.userVerification) === "required")
70
- return new N({
70
+ return new v({
71
71
  message: "User verification was required but no available authenticator supported it",
72
72
  code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
73
73
  cause: e
74
74
  });
75
75
  } else {
76
76
  if (e.name === "InvalidStateError")
77
- return new N({
77
+ return new v({
78
78
  message: "The authenticator was previously registered",
79
79
  code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
80
80
  cause: e
81
81
  });
82
82
  if (e.name === "NotAllowedError")
83
- return new N({
83
+ return new v({
84
84
  message: e.message,
85
85
  code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
86
86
  cause: e
87
87
  });
88
88
  if (e.name === "NotSupportedError")
89
- return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new N({
89
+ return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new v({
90
90
  message: 'No entry in pubKeyCredParams was of type "public-key"',
91
91
  code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
92
92
  cause: e
93
- }) : new N({
93
+ }) : new v({
94
94
  message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
95
95
  code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
96
96
  cause: e
@@ -99,25 +99,25 @@ function dr({ error: e, options: t }) {
99
99
  const o = window.location.hostname;
100
100
  if (kt(o)) {
101
101
  if (r.rp.id !== o)
102
- return new N({
102
+ return new v({
103
103
  message: `The RP ID "${r.rp.id}" is invalid for this domain`,
104
104
  code: "ERROR_INVALID_RP_ID",
105
105
  cause: e
106
106
  });
107
- } else return new N({
107
+ } else return new v({
108
108
  message: `${window.location.hostname} is an invalid domain`,
109
109
  code: "ERROR_INVALID_DOMAIN",
110
110
  cause: e
111
111
  });
112
112
  } else if (e.name === "TypeError") {
113
113
  if (r.user.id.byteLength < 1 || r.user.id.byteLength > 64)
114
- return new N({
114
+ return new v({
115
115
  message: "User ID was not between 1 and 64 characters",
116
116
  code: "ERROR_INVALID_USER_ID_LENGTH",
117
117
  cause: e
118
118
  });
119
119
  } else if (e.name === "UnknownError")
120
- return new N({
120
+ return new v({
121
121
  message: "The authenticator was unable to process the specified options, or could not create a new credential",
122
122
  code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
123
123
  cause: e
@@ -125,7 +125,7 @@ function dr({ error: e, options: t }) {
125
125
  }
126
126
  return e;
127
127
  }
128
- class ur {
128
+ class mr {
129
129
  createNewAbortSignal() {
130
130
  if (this.controller) {
131
131
  const r = new Error("Cancelling existing WebAuthn API call for new one");
@@ -141,21 +141,21 @@ class ur {
141
141
  }
142
142
  }
143
143
  }
144
- const At = new ur(), mr = ["cross-platform", "platform"];
144
+ const At = new mr(), hr = ["cross-platform", "platform"];
145
145
  function Rt(e) {
146
- if (e && !(mr.indexOf(e) < 0))
146
+ if (e && !(hr.indexOf(e) < 0))
147
147
  return e;
148
148
  }
149
- async function hr(e) {
149
+ async function pr(e) {
150
150
  var u;
151
- if (!Ze())
151
+ if (!tt())
152
152
  throw new Error("WebAuthn is not supported in this browser");
153
153
  const t = { publicKey: {
154
154
  ...e,
155
- challenge: Re(e.challenge),
155
+ challenge: Ne(e.challenge),
156
156
  user: {
157
157
  ...e.user,
158
- id: Re(e.user.id)
158
+ id: Ne(e.user.id)
159
159
  },
160
160
  excludeCredentials: (u = e.excludeCredentials) == null ? void 0 : u.map(_t)
161
161
  } };
@@ -164,7 +164,7 @@ async function hr(e) {
164
164
  try {
165
165
  r = await navigator.credentials.create(t);
166
166
  } catch (c) {
167
- throw dr({ error: c, options: t });
167
+ throw ur({ error: c, options: t });
168
168
  }
169
169
  if (!r)
170
170
  throw new Error("Registration was not completed");
@@ -176,63 +176,63 @@ async function hr(e) {
176
176
  try {
177
177
  d = o.getPublicKeyAlgorithm();
178
178
  } catch (c) {
179
- Ke("getPublicKeyAlgorithm()", c);
179
+ We("getPublicKeyAlgorithm()", c);
180
180
  }
181
181
  let h;
182
182
  if (typeof o.getPublicKey == "function")
183
183
  try {
184
184
  const c = o.getPublicKey();
185
- c !== null && (h = J(c));
185
+ c !== null && (h = V(c));
186
186
  } catch (c) {
187
- Ke("getPublicKey()", c);
187
+ We("getPublicKey()", c);
188
188
  }
189
- let p;
189
+ let f;
190
190
  if (typeof o.getAuthenticatorData == "function")
191
191
  try {
192
- p = J(o.getAuthenticatorData());
192
+ f = V(o.getAuthenticatorData());
193
193
  } catch (c) {
194
- Ke("getAuthenticatorData()", c);
194
+ We("getAuthenticatorData()", c);
195
195
  }
196
196
  return {
197
197
  id: a,
198
- rawId: J(n),
198
+ rawId: V(n),
199
199
  response: {
200
- attestationObject: J(o.attestationObject),
201
- clientDataJSON: J(o.clientDataJSON),
200
+ attestationObject: V(o.attestationObject),
201
+ clientDataJSON: V(o.clientDataJSON),
202
202
  transports: i,
203
203
  publicKeyAlgorithm: d,
204
204
  publicKey: h,
205
- authenticatorData: p
205
+ authenticatorData: f
206
206
  },
207
207
  type: s,
208
208
  clientExtensionResults: r.getClientExtensionResults(),
209
209
  authenticatorAttachment: Rt(r.authenticatorAttachment)
210
210
  };
211
211
  }
212
- function Ke(e, t) {
212
+ function We(e, t) {
213
213
  console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
214
214
  `, t);
215
215
  }
216
- function pr() {
217
- if (!Ze())
216
+ function fr() {
217
+ if (!tt())
218
218
  return new Promise((t) => t(!1));
219
219
  const e = window.PublicKeyCredential;
220
220
  return e.isConditionalMediationAvailable === void 0 ? new Promise((t) => t(!1)) : e.isConditionalMediationAvailable();
221
221
  }
222
- function fr({ error: e, options: t }) {
222
+ function gr({ error: e, options: t }) {
223
223
  const { publicKey: r } = t;
224
224
  if (!r)
225
225
  throw Error("options was missing required publicKey property");
226
226
  if (e.name === "AbortError") {
227
227
  if (t.signal instanceof AbortSignal)
228
- return new N({
228
+ return new v({
229
229
  message: "Authentication ceremony was sent an abort signal",
230
230
  code: "ERROR_CEREMONY_ABORTED",
231
231
  cause: e
232
232
  });
233
233
  } else {
234
234
  if (e.name === "NotAllowedError")
235
- return new N({
235
+ return new v({
236
236
  message: e.message,
237
237
  code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
238
238
  cause: e
@@ -241,18 +241,18 @@ function fr({ error: e, options: t }) {
241
241
  const a = window.location.hostname;
242
242
  if (kt(a)) {
243
243
  if (r.rpId !== a)
244
- return new N({
244
+ return new v({
245
245
  message: `The RP ID "${r.rpId}" is invalid for this domain`,
246
246
  code: "ERROR_INVALID_RP_ID",
247
247
  cause: e
248
248
  });
249
- } else return new N({
249
+ } else return new v({
250
250
  message: `${window.location.hostname} is an invalid domain`,
251
251
  code: "ERROR_INVALID_DOMAIN",
252
252
  cause: e
253
253
  });
254
254
  } else if (e.name === "UnknownError")
255
- return new N({
255
+ return new v({
256
256
  message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
257
257
  code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
258
258
  cause: e
@@ -260,19 +260,19 @@ function fr({ error: e, options: t }) {
260
260
  }
261
261
  return e;
262
262
  }
263
- async function gr(e, t = !1) {
263
+ async function yr(e, t = !1) {
264
264
  var u, c;
265
- if (!Ze())
265
+ if (!tt())
266
266
  throw new Error("WebAuthn is not supported in this browser");
267
267
  let r;
268
268
  ((u = e.allowCredentials) == null ? void 0 : u.length) !== 0 && (r = (c = e.allowCredentials) == null ? void 0 : c.map(_t));
269
269
  const a = {
270
270
  ...e,
271
- challenge: Re(e.challenge),
271
+ challenge: Ne(e.challenge),
272
272
  allowCredentials: r
273
273
  }, n = {};
274
274
  if (t) {
275
- if (!await pr())
275
+ if (!await fr())
276
276
  throw Error("Browser does not support WebAuthn autofill");
277
277
  if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1)
278
278
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
@@ -283,20 +283,20 @@ async function gr(e, t = !1) {
283
283
  try {
284
284
  o = await navigator.credentials.get(n);
285
285
  } catch (m) {
286
- throw fr({ error: m, options: n });
286
+ throw gr({ error: m, options: n });
287
287
  }
288
288
  if (!o)
289
289
  throw new Error("Authentication was not completed");
290
290
  const { id: s, rawId: i, response: d, type: h } = o;
291
- let p;
292
- return d.userHandle && (p = J(d.userHandle)), {
291
+ let f;
292
+ return d.userHandle && (f = V(d.userHandle)), {
293
293
  id: s,
294
- rawId: J(i),
294
+ rawId: V(i),
295
295
  response: {
296
- authenticatorData: J(d.authenticatorData),
297
- clientDataJSON: J(d.clientDataJSON),
298
- signature: J(d.signature),
299
- userHandle: p
296
+ authenticatorData: V(d.authenticatorData),
297
+ clientDataJSON: V(d.clientDataJSON),
298
+ signature: V(d.signature),
299
+ userHandle: f
300
300
  },
301
301
  type: h,
302
302
  clientExtensionResults: o.getClientExtensionResults(),
@@ -316,7 +316,7 @@ try {
316
316
  });
317
317
  } catch {
318
318
  }
319
- const ue = {
319
+ const me = {
320
320
  ID_TOKEN: "id_token",
321
321
  ACCESS_TOKEN: "token",
322
322
  ID_AND_ACCESS_TOKEN: "id_token token",
@@ -325,7 +325,7 @@ const ue = {
325
325
  PASSKEY: "passkey"
326
326
  }, Nt = {
327
327
  CLIENT_ID: "X-Auth-ClientId"
328
- }, A = {
328
+ }, N = {
329
329
  ALG: "RS256",
330
330
  USER_ID_KEY: "sub",
331
331
  USERNAME_KEY: "username",
@@ -338,7 +338,7 @@ const ue = {
338
338
  SCOPES_KEY: "scopes",
339
339
  CLIENT_ID_KEY: "aud",
340
340
  ISSUER: "gizmette.com"
341
- }, yr = `-----BEGIN PUBLIC KEY-----
341
+ }, br = `-----BEGIN PUBLIC KEY-----
342
342
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
343
343
  w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
344
344
  i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
@@ -346,134 +346,134 @@ aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
346
346
  l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
347
347
  sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
348
348
  awIDAQAB
349
- -----END PUBLIC KEY-----`, Oe = {
349
+ -----END PUBLIC KEY-----`, Le = {
350
350
  CODE: "code",
351
351
  LOGOUT: "logout",
352
352
  LOGIN: "login",
353
353
  REFRESH: "refresh"
354
- }, Pe = crypto, vt = (e) => e instanceof CryptoKey, Ee = new TextEncoder(), ye = new TextDecoder();
355
- function br(...e) {
354
+ }, $e = crypto, vt = (e) => e instanceof CryptoKey, Ee = new TextEncoder(), ye = new TextDecoder();
355
+ function Er(...e) {
356
356
  const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
357
357
  let a = 0;
358
358
  for (const n of e)
359
359
  r.set(n, a), a += n.length;
360
360
  return r;
361
361
  }
362
- const Er = (e) => {
362
+ const wr = (e) => {
363
363
  const t = atob(e), r = new Uint8Array(t.length);
364
364
  for (let a = 0; a < t.length; a++)
365
365
  r[a] = t.charCodeAt(a);
366
366
  return r;
367
- }, X = (e) => {
367
+ }, te = (e) => {
368
368
  let t = e;
369
369
  t instanceof Uint8Array && (t = ye.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
370
370
  try {
371
- return Er(t);
371
+ return wr(t);
372
372
  } catch {
373
373
  throw new TypeError("The input to be decoded is not correctly encoded.");
374
374
  }
375
375
  };
376
- let C = class extends Error {
376
+ let P = class extends Error {
377
377
  constructor(t, r) {
378
378
  var a;
379
379
  super(t, r), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (a = Error.captureStackTrace) == null || a.call(Error, this, this.constructor);
380
380
  }
381
381
  };
382
- C.code = "ERR_JOSE_GENERIC";
383
- let L = class extends C {
382
+ P.code = "ERR_JOSE_GENERIC";
383
+ let H = class extends P {
384
384
  constructor(t, r, a = "unspecified", n = "unspecified") {
385
385
  super(t, { cause: { claim: a, reason: n, payload: r } }), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
386
386
  }
387
387
  };
388
- L.code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
389
- class Fe extends C {
388
+ H.code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
389
+ class qe extends P {
390
390
  constructor(t, r, a = "unspecified", n = "unspecified") {
391
391
  super(t, { cause: { claim: a, reason: n, payload: r } }), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
392
392
  }
393
393
  }
394
- Fe.code = "ERR_JWT_EXPIRED";
395
- class xt extends C {
394
+ qe.code = "ERR_JWT_EXPIRED";
395
+ class xt extends P {
396
396
  constructor() {
397
397
  super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
398
398
  }
399
399
  }
400
400
  xt.code = "ERR_JOSE_ALG_NOT_ALLOWED";
401
- let M = class extends C {
401
+ let W = class extends P {
402
402
  constructor() {
403
403
  super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
404
404
  }
405
405
  };
406
- M.code = "ERR_JOSE_NOT_SUPPORTED";
407
- class wr extends C {
406
+ W.code = "ERR_JOSE_NOT_SUPPORTED";
407
+ class Tr extends P {
408
408
  constructor(t = "decryption operation failed", r) {
409
409
  super(t, r), this.code = "ERR_JWE_DECRYPTION_FAILED";
410
410
  }
411
411
  }
412
- wr.code = "ERR_JWE_DECRYPTION_FAILED";
413
- class Tr extends C {
412
+ Tr.code = "ERR_JWE_DECRYPTION_FAILED";
413
+ class Ir extends P {
414
414
  constructor() {
415
415
  super(...arguments), this.code = "ERR_JWE_INVALID";
416
416
  }
417
417
  }
418
- Tr.code = "ERR_JWE_INVALID";
419
- let S = class extends C {
418
+ Ir.code = "ERR_JWE_INVALID";
419
+ let _ = class extends P {
420
420
  constructor() {
421
421
  super(...arguments), this.code = "ERR_JWS_INVALID";
422
422
  }
423
423
  };
424
- S.code = "ERR_JWS_INVALID";
425
- let G = class extends C {
424
+ _.code = "ERR_JWS_INVALID";
425
+ let J = class extends P {
426
426
  constructor() {
427
427
  super(...arguments), this.code = "ERR_JWT_INVALID";
428
428
  }
429
429
  };
430
- G.code = "ERR_JWT_INVALID";
431
- class Ir extends C {
430
+ J.code = "ERR_JWT_INVALID";
431
+ class Sr extends P {
432
432
  constructor() {
433
433
  super(...arguments), this.code = "ERR_JWK_INVALID";
434
434
  }
435
435
  }
436
- Ir.code = "ERR_JWK_INVALID";
437
- class Sr extends C {
436
+ Sr.code = "ERR_JWK_INVALID";
437
+ class _r extends P {
438
438
  constructor() {
439
439
  super(...arguments), this.code = "ERR_JWKS_INVALID";
440
440
  }
441
441
  }
442
- Sr.code = "ERR_JWKS_INVALID";
443
- class _r extends C {
442
+ _r.code = "ERR_JWKS_INVALID";
443
+ class kr extends P {
444
444
  constructor(t = "no applicable key found in the JSON Web Key Set", r) {
445
445
  super(t, r), this.code = "ERR_JWKS_NO_MATCHING_KEY";
446
446
  }
447
447
  }
448
- _r.code = "ERR_JWKS_NO_MATCHING_KEY";
449
- class kr extends C {
448
+ kr.code = "ERR_JWKS_NO_MATCHING_KEY";
449
+ class Ar extends P {
450
450
  constructor(t = "multiple matching keys found in the JSON Web Key Set", r) {
451
451
  super(t, r), this.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
452
452
  }
453
453
  }
454
- kr.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
455
- class Ar extends C {
454
+ Ar.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
455
+ class Rr extends P {
456
456
  constructor(t = "request timed out", r) {
457
457
  super(t, r), this.code = "ERR_JWKS_TIMEOUT";
458
458
  }
459
459
  }
460
- Ar.code = "ERR_JWKS_TIMEOUT";
461
- class Ct extends C {
460
+ Rr.code = "ERR_JWKS_TIMEOUT";
461
+ class Ot extends P {
462
462
  constructor(t = "signature verification failed", r) {
463
463
  super(t, r), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
464
464
  }
465
465
  }
466
- Ct.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
467
- function Y(e, t = "algorithm.name") {
466
+ Ot.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
467
+ function j(e, t = "algorithm.name") {
468
468
  return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
469
469
  }
470
470
  function we(e, t) {
471
471
  return e.name === t;
472
472
  }
473
- function He(e) {
473
+ function Be(e) {
474
474
  return parseInt(e.name.slice(4), 10);
475
475
  }
476
- function Rr(e) {
476
+ function Nr(e) {
477
477
  switch (e) {
478
478
  case "ES256":
479
479
  return "P-256";
@@ -485,7 +485,7 @@ function Rr(e) {
485
485
  throw new Error("unreachable");
486
486
  }
487
487
  }
488
- function Nr(e, t) {
488
+ function vr(e, t) {
489
489
  if (t.length && !t.some((r) => e.usages.includes(r))) {
490
490
  let r = "CryptoKey does not support this operation, its usages must include ";
491
491
  if (t.length > 2) {
@@ -495,59 +495,59 @@ function Nr(e, t) {
495
495
  throw new TypeError(r);
496
496
  }
497
497
  }
498
- function vr(e, t, ...r) {
498
+ function xr(e, t, ...r) {
499
499
  switch (t) {
500
500
  case "HS256":
501
501
  case "HS384":
502
502
  case "HS512": {
503
503
  if (!we(e.algorithm, "HMAC"))
504
- throw Y("HMAC");
504
+ throw j("HMAC");
505
505
  const a = parseInt(t.slice(2), 10);
506
- if (He(e.algorithm.hash) !== a)
507
- throw Y(`SHA-${a}`, "algorithm.hash");
506
+ if (Be(e.algorithm.hash) !== a)
507
+ throw j(`SHA-${a}`, "algorithm.hash");
508
508
  break;
509
509
  }
510
510
  case "RS256":
511
511
  case "RS384":
512
512
  case "RS512": {
513
513
  if (!we(e.algorithm, "RSASSA-PKCS1-v1_5"))
514
- throw Y("RSASSA-PKCS1-v1_5");
514
+ throw j("RSASSA-PKCS1-v1_5");
515
515
  const a = parseInt(t.slice(2), 10);
516
- if (He(e.algorithm.hash) !== a)
517
- throw Y(`SHA-${a}`, "algorithm.hash");
516
+ if (Be(e.algorithm.hash) !== a)
517
+ throw j(`SHA-${a}`, "algorithm.hash");
518
518
  break;
519
519
  }
520
520
  case "PS256":
521
521
  case "PS384":
522
522
  case "PS512": {
523
523
  if (!we(e.algorithm, "RSA-PSS"))
524
- throw Y("RSA-PSS");
524
+ throw j("RSA-PSS");
525
525
  const a = parseInt(t.slice(2), 10);
526
- if (He(e.algorithm.hash) !== a)
527
- throw Y(`SHA-${a}`, "algorithm.hash");
526
+ if (Be(e.algorithm.hash) !== a)
527
+ throw j(`SHA-${a}`, "algorithm.hash");
528
528
  break;
529
529
  }
530
530
  case "EdDSA": {
531
531
  if (e.algorithm.name !== "Ed25519" && e.algorithm.name !== "Ed448")
532
- throw Y("Ed25519 or Ed448");
532
+ throw j("Ed25519 or Ed448");
533
533
  break;
534
534
  }
535
535
  case "ES256":
536
536
  case "ES384":
537
537
  case "ES512": {
538
538
  if (!we(e.algorithm, "ECDSA"))
539
- throw Y("ECDSA");
540
- const a = Rr(t);
539
+ throw j("ECDSA");
540
+ const a = Nr(t);
541
541
  if (e.algorithm.namedCurve !== a)
542
- throw Y(a, "algorithm.namedCurve");
542
+ throw j(a, "algorithm.namedCurve");
543
543
  break;
544
544
  }
545
545
  default:
546
546
  throw new TypeError("CryptoKey does not support this operation");
547
547
  }
548
- Nr(e, r);
548
+ vr(e, r);
549
549
  }
550
- function Ot(e, t, ...r) {
550
+ function Ct(e, t, ...r) {
551
551
  var a;
552
552
  if (r = r.filter(Boolean), r.length > 2) {
553
553
  const n = r.pop();
@@ -555,11 +555,11 @@ function Ot(e, t, ...r) {
555
555
  } else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
556
556
  return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (a = t.constructor) != null && a.name && (e += ` Received an instance of ${t.constructor.name}`), e;
557
557
  }
558
- const st = (e, ...t) => Ot("Key must be ", e, ...t);
558
+ const it = (e, ...t) => Ct("Key must be ", e, ...t);
559
559
  function Pt(e, t, ...r) {
560
- return Ot(`Key for the ${e} algorithm must be `, t, ...r);
560
+ return Ct(`Key for the ${e} algorithm must be `, t, ...r);
561
561
  }
562
- const Dt = (e) => vt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ne = ["CryptoKey"], xr = (...e) => {
562
+ const Dt = (e) => vt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", ve = ["CryptoKey"], Or = (...e) => {
563
563
  const t = e.filter(Boolean);
564
564
  if (t.length === 0 || t.length === 1)
565
565
  return !0;
@@ -581,7 +581,7 @@ const Dt = (e) => vt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
581
581
  function Cr(e) {
582
582
  return typeof e == "object" && e !== null;
583
583
  }
584
- function me(e) {
584
+ function he(e) {
585
585
  if (!Cr(e) || Object.prototype.toString.call(e) !== "[object Object]")
586
586
  return !1;
587
587
  if (Object.getPrototypeOf(e) === null)
@@ -591,24 +591,24 @@ function me(e) {
591
591
  t = Object.getPrototypeOf(t);
592
592
  return Object.getPrototypeOf(e) === t;
593
593
  }
594
- const Or = (e, t) => {
594
+ const Pr = (e, t) => {
595
595
  if (e.startsWith("RS") || e.startsWith("PS")) {
596
596
  const { modulusLength: r } = t.algorithm;
597
597
  if (typeof r != "number" || r < 2048)
598
598
  throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
599
599
  }
600
600
  };
601
- function he(e) {
602
- return me(e) && typeof e.kty == "string";
601
+ function pe(e) {
602
+ return he(e) && typeof e.kty == "string";
603
603
  }
604
- function Pr(e) {
604
+ function Dr(e) {
605
605
  return e.kty !== "oct" && typeof e.d == "string";
606
606
  }
607
- function Dr(e) {
607
+ function Lr(e) {
608
608
  return e.kty !== "oct" && typeof e.d > "u";
609
609
  }
610
- function Lr(e) {
611
- return he(e) && e.kty === "oct" && typeof e.k == "string";
610
+ function $r(e) {
611
+ return pe(e) && e.kty === "oct" && typeof e.k == "string";
612
612
  }
613
613
  function Mr(e) {
614
614
  let t, r;
@@ -635,7 +635,7 @@ function Mr(e) {
635
635
  }, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
636
636
  break;
637
637
  default:
638
- throw new M('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
638
+ throw new W('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
639
639
  }
640
640
  break;
641
641
  }
@@ -657,7 +657,7 @@ function Mr(e) {
657
657
  t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
658
658
  break;
659
659
  default:
660
- throw new M('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
660
+ throw new W('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
661
661
  }
662
662
  break;
663
663
  }
@@ -673,12 +673,12 @@ function Mr(e) {
673
673
  t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
674
674
  break;
675
675
  default:
676
- throw new M('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
676
+ throw new W('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
677
677
  }
678
678
  break;
679
679
  }
680
680
  default:
681
- throw new M('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
681
+ throw new W('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
682
682
  }
683
683
  return { algorithm: t, keyUsages: r };
684
684
  }
@@ -690,54 +690,54 @@ const Lt = async (e) => {
690
690
  e.ext ?? !1,
691
691
  e.key_ops ?? r
692
692
  ], n = { ...e };
693
- return delete n.alg, delete n.use, Pe.subtle.importKey("jwk", n, ...a);
694
- }, Mt = (e) => X(e);
695
- let ne, oe;
696
- const $t = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", ve = async (e, t, r, a, n = !1) => {
693
+ return delete n.alg, delete n.use, $e.subtle.importKey("jwk", n, ...a);
694
+ }, $t = (e) => te(e);
695
+ let oe, se;
696
+ const Mt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", xe = async (e, t, r, a, n = !1) => {
697
697
  let o = e.get(t);
698
698
  if (o != null && o[a])
699
699
  return o[a];
700
700
  const s = await Lt({ ...r, alg: a });
701
701
  return n && Object.freeze(t), o ? o[a] = s : e.set(t, { [a]: s }), s;
702
- }, $r = (e, t) => {
703
- if ($t(e)) {
702
+ }, Ur = (e, t) => {
703
+ if (Mt(e)) {
704
704
  let r = e.export({ format: "jwk" });
705
- return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Mt(r.k) : (oe || (oe = /* @__PURE__ */ new WeakMap()), ve(oe, e, r, t));
705
+ return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? $t(r.k) : (se || (se = /* @__PURE__ */ new WeakMap()), xe(se, e, r, t));
706
706
  }
707
- return he(e) ? e.k ? X(e.k) : (oe || (oe = /* @__PURE__ */ new WeakMap()), ve(oe, e, e, t, !0)) : e;
708
- }, Ur = (e, t) => {
709
- if ($t(e)) {
707
+ return pe(e) ? e.k ? te(e.k) : (se || (se = /* @__PURE__ */ new WeakMap()), xe(se, e, e, t, !0)) : e;
708
+ }, Kr = (e, t) => {
709
+ if (Mt(e)) {
710
710
  let r = e.export({ format: "jwk" });
711
- return r.k ? Mt(r.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), ve(ne, e, r, t));
711
+ return r.k ? $t(r.k) : (oe || (oe = /* @__PURE__ */ new WeakMap()), xe(oe, e, r, t));
712
712
  }
713
- return he(e) ? e.k ? X(e.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), ve(ne, e, e, t, !0)) : e;
714
- }, Kr = { normalizePublicKey: $r, normalizePrivateKey: Ur }, j = (e, t, r = 0) => {
713
+ return pe(e) ? e.k ? te(e.k) : (oe || (oe = /* @__PURE__ */ new WeakMap()), xe(oe, e, e, t, !0)) : e;
714
+ }, Hr = { normalizePublicKey: Ur, normalizePrivateKey: Kr }, ee = (e, t, r = 0) => {
715
715
  r === 0 && (t.unshift(t.length), t.unshift(6));
716
716
  const a = e.indexOf(t[0], r);
717
717
  if (a === -1)
718
718
  return !1;
719
719
  const n = e.subarray(a, a + t.length);
720
- return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || j(e, t, a + 1);
721
- }, it = (e) => {
720
+ return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || ee(e, t, a + 1);
721
+ }, ct = (e) => {
722
722
  switch (!0) {
723
- case j(e, [42, 134, 72, 206, 61, 3, 1, 7]):
723
+ case ee(e, [42, 134, 72, 206, 61, 3, 1, 7]):
724
724
  return "P-256";
725
- case j(e, [43, 129, 4, 0, 34]):
725
+ case ee(e, [43, 129, 4, 0, 34]):
726
726
  return "P-384";
727
- case j(e, [43, 129, 4, 0, 35]):
727
+ case ee(e, [43, 129, 4, 0, 35]):
728
728
  return "P-521";
729
- case j(e, [43, 101, 110]):
729
+ case ee(e, [43, 101, 110]):
730
730
  return "X25519";
731
- case j(e, [43, 101, 111]):
731
+ case ee(e, [43, 101, 111]):
732
732
  return "X448";
733
- case j(e, [43, 101, 112]):
733
+ case ee(e, [43, 101, 112]):
734
734
  return "Ed25519";
735
- case j(e, [43, 101, 113]):
735
+ case ee(e, [43, 101, 113]):
736
736
  return "Ed448";
737
737
  default:
738
- throw new M("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
738
+ throw new W("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
739
739
  }
740
- }, Hr = async (e, t, r, a, n) => {
740
+ }, Wr = async (e, t, r, a, n) => {
741
741
  let o, s;
742
742
  const i = new Uint8Array(atob(r.replace(e, "")).split("").map((d) => d.charCodeAt(0)));
743
743
  switch (a) {
@@ -773,42 +773,42 @@ const $t = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
773
773
  case "ECDH-ES+A128KW":
774
774
  case "ECDH-ES+A192KW":
775
775
  case "ECDH-ES+A256KW": {
776
- const d = it(i);
776
+ const d = ct(i);
777
777
  o = d.startsWith("P-") ? { name: "ECDH", namedCurve: d } : { name: d }, s = [];
778
778
  break;
779
779
  }
780
780
  case "EdDSA":
781
- o = { name: it(i) }, s = ["verify"];
781
+ o = { name: ct(i) }, s = ["verify"];
782
782
  break;
783
783
  default:
784
- throw new M('Invalid or unsupported "alg" (Algorithm) value');
784
+ throw new W('Invalid or unsupported "alg" (Algorithm) value');
785
785
  }
786
- return Pe.subtle.importKey(t, i, o, !1, s);
787
- }, Wr = (e, t, r) => Hr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
788
- async function Br(e, t, r) {
786
+ return $e.subtle.importKey(t, i, o, !1, s);
787
+ }, Br = (e, t, r) => Wr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
788
+ async function Gr(e, t, r) {
789
789
  if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
790
790
  throw new TypeError('"spki" must be SPKI formatted string');
791
- return Wr(e, t);
791
+ return Br(e, t);
792
792
  }
793
- async function Gr(e, t) {
794
- if (!me(e))
793
+ async function Jr(e, t) {
794
+ if (!he(e))
795
795
  throw new TypeError("JWK must be an object");
796
796
  switch (t || (t = e.alg), e.kty) {
797
797
  case "oct":
798
798
  if (typeof e.k != "string" || !e.k)
799
799
  throw new TypeError('missing "k" (Key Value) Parameter value');
800
- return X(e.k);
800
+ return te(e.k);
801
801
  case "RSA":
802
802
  if (e.oth !== void 0)
803
- throw new M('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
803
+ throw new W('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
804
804
  case "EC":
805
805
  case "OKP":
806
806
  return Lt({ ...e, alg: t });
807
807
  default:
808
- throw new M('Unsupported "kty" (Key Type) Parameter value');
808
+ throw new W('Unsupported "kty" (Key Type) Parameter value');
809
809
  }
810
810
  }
811
- const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], je = (e, t, r) => {
811
+ const ue = (e) => e == null ? void 0 : e[Symbol.toStringTag], Xe = (e, t, r) => {
812
812
  var a, n;
813
813
  if (t.use !== void 0 && t.use !== "sig")
814
814
  throw new TypeError("Invalid key for this operation, when present its use must be sig");
@@ -817,49 +817,49 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], je = (e, t, r) =>
817
817
  if (t.alg !== void 0 && t.alg !== e)
818
818
  throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);
819
819
  return !0;
820
- }, Jr = (e, t, r, a) => {
820
+ }, Vr = (e, t, r, a) => {
821
821
  if (!(t instanceof Uint8Array)) {
822
- if (a && he(t)) {
823
- if (Lr(t) && je(e, t, r))
822
+ if (a && pe(t)) {
823
+ if ($r(t) && Xe(e, t, r))
824
824
  return;
825
825
  throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
826
826
  }
827
827
  if (!Dt(t))
828
- throw new TypeError(Pt(e, t, ...Ne, "Uint8Array", a ? "JSON Web Key" : null));
828
+ throw new TypeError(Pt(e, t, ...ve, "Uint8Array", a ? "JSON Web Key" : null));
829
829
  if (t.type !== "secret")
830
- throw new TypeError(`${de(t)} instances for symmetric algorithms must be of type "secret"`);
830
+ throw new TypeError(`${ue(t)} instances for symmetric algorithms must be of type "secret"`);
831
831
  }
832
- }, Vr = (e, t, r, a) => {
833
- if (a && he(t))
832
+ }, Yr = (e, t, r, a) => {
833
+ if (a && pe(t))
834
834
  switch (r) {
835
835
  case "sign":
836
- if (Pr(t) && je(e, t, r))
836
+ if (Dr(t) && Xe(e, t, r))
837
837
  return;
838
838
  throw new TypeError("JSON Web Key for this operation be a private JWK");
839
839
  case "verify":
840
- if (Dr(t) && je(e, t, r))
840
+ if (Lr(t) && Xe(e, t, r))
841
841
  return;
842
842
  throw new TypeError("JSON Web Key for this operation be a public JWK");
843
843
  }
844
844
  if (!Dt(t))
845
- throw new TypeError(Pt(e, t, ...Ne, a ? "JSON Web Key" : null));
845
+ throw new TypeError(Pt(e, t, ...ve, a ? "JSON Web Key" : null));
846
846
  if (t.type === "secret")
847
- throw new TypeError(`${de(t)} instances for asymmetric algorithms must not be of type "secret"`);
847
+ throw new TypeError(`${ue(t)} instances for asymmetric algorithms must not be of type "secret"`);
848
848
  if (r === "sign" && t.type === "public")
849
- throw new TypeError(`${de(t)} instances for asymmetric algorithm signing must be of type "private"`);
849
+ throw new TypeError(`${ue(t)} instances for asymmetric algorithm signing must be of type "private"`);
850
850
  if (r === "decrypt" && t.type === "public")
851
- throw new TypeError(`${de(t)} instances for asymmetric algorithm decryption must be of type "private"`);
851
+ throw new TypeError(`${ue(t)} instances for asymmetric algorithm decryption must be of type "private"`);
852
852
  if (t.algorithm && r === "verify" && t.type === "private")
853
- throw new TypeError(`${de(t)} instances for asymmetric algorithm verifying must be of type "public"`);
853
+ throw new TypeError(`${ue(t)} instances for asymmetric algorithm verifying must be of type "public"`);
854
854
  if (t.algorithm && r === "encrypt" && t.type === "private")
855
- throw new TypeError(`${de(t)} instances for asymmetric algorithm encryption must be of type "public"`);
855
+ throw new TypeError(`${ue(t)} instances for asymmetric algorithm encryption must be of type "public"`);
856
856
  };
857
857
  function Ut(e, t, r, a) {
858
- t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Jr(t, r, a, e) : Vr(t, r, a, e);
858
+ t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Vr(t, r, a, e) : Yr(t, r, a, e);
859
859
  }
860
860
  Ut.bind(void 0, !1);
861
- const ct = Ut.bind(void 0, !0);
862
- function Yr(e, t, r, a, n) {
861
+ const lt = Ut.bind(void 0, !0);
862
+ function Fr(e, t, r, a, n) {
863
863
  if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
864
864
  throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
865
865
  if (!a || a.crit === void 0)
@@ -870,7 +870,7 @@ function Yr(e, t, r, a, n) {
870
870
  r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
871
871
  for (const s of a.crit) {
872
872
  if (!o.has(s))
873
- throw new M(`Extension Header Parameter "${s}" is not recognized`);
873
+ throw new W(`Extension Header Parameter "${s}" is not recognized`);
874
874
  if (n[s] === void 0)
875
875
  throw new e(`Extension Header Parameter "${s}" is missing`);
876
876
  if (o.get(s) && a[s] === void 0)
@@ -878,13 +878,13 @@ function Yr(e, t, r, a, n) {
878
878
  }
879
879
  return new Set(a.crit);
880
880
  }
881
- const Fr = (e, t) => {
881
+ const jr = (e, t) => {
882
882
  if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
883
883
  throw new TypeError(`"${e}" option must be an array of strings`);
884
884
  if (t)
885
885
  return new Set(t);
886
886
  };
887
- function jr(e, t) {
887
+ function zr(e, t) {
888
888
  const r = `SHA-${e.slice(-3)}`;
889
889
  switch (e) {
890
890
  case "HS256":
@@ -906,103 +906,103 @@ function jr(e, t) {
906
906
  case "EdDSA":
907
907
  return { name: t.name };
908
908
  default:
909
- throw new M(`alg ${e} is not supported either by JOSE or your javascript runtime`);
909
+ throw new W(`alg ${e} is not supported either by JOSE or your javascript runtime`);
910
910
  }
911
911
  }
912
- async function zr(e, t, r) {
913
- if (t = await Kr.normalizePublicKey(t, e), vt(t))
914
- return vr(t, e, r), t;
912
+ async function qr(e, t, r) {
913
+ if (t = await Hr.normalizePublicKey(t, e), vt(t))
914
+ return xr(t, e, r), t;
915
915
  if (t instanceof Uint8Array) {
916
916
  if (!e.startsWith("HS"))
917
- throw new TypeError(st(t, ...Ne));
918
- return Pe.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
917
+ throw new TypeError(it(t, ...ve));
918
+ return $e.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
919
919
  }
920
- throw new TypeError(st(t, ...Ne, "Uint8Array", "JSON Web Key"));
920
+ throw new TypeError(it(t, ...ve, "Uint8Array", "JSON Web Key"));
921
921
  }
922
- const qr = async (e, t, r, a) => {
923
- const n = await zr(e, t, "verify");
924
- Or(e, n);
925
- const o = jr(e, n.algorithm);
922
+ const Xr = async (e, t, r, a) => {
923
+ const n = await qr(e, t, "verify");
924
+ Pr(e, n);
925
+ const o = zr(e, n.algorithm);
926
926
  try {
927
- return await Pe.subtle.verify(o, n, r, a);
927
+ return await $e.subtle.verify(o, n, r, a);
928
928
  } catch {
929
929
  return !1;
930
930
  }
931
931
  };
932
- async function Xr(e, t, r) {
933
- if (!me(e))
934
- throw new S("Flattened JWS must be an object");
932
+ async function Qr(e, t, r) {
933
+ if (!he(e))
934
+ throw new _("Flattened JWS must be an object");
935
935
  if (e.protected === void 0 && e.header === void 0)
936
- throw new S('Flattened JWS must have either of the "protected" or "header" members');
936
+ throw new _('Flattened JWS must have either of the "protected" or "header" members');
937
937
  if (e.protected !== void 0 && typeof e.protected != "string")
938
- throw new S("JWS Protected Header incorrect type");
938
+ throw new _("JWS Protected Header incorrect type");
939
939
  if (e.payload === void 0)
940
- throw new S("JWS Payload missing");
940
+ throw new _("JWS Payload missing");
941
941
  if (typeof e.signature != "string")
942
- throw new S("JWS Signature missing or incorrect type");
943
- if (e.header !== void 0 && !me(e.header))
944
- throw new S("JWS Unprotected Header incorrect type");
942
+ throw new _("JWS Signature missing or incorrect type");
943
+ if (e.header !== void 0 && !he(e.header))
944
+ throw new _("JWS Unprotected Header incorrect type");
945
945
  let a = {};
946
946
  if (e.protected)
947
947
  try {
948
- const y = X(e.protected);
948
+ const y = te(e.protected);
949
949
  a = JSON.parse(ye.decode(y));
950
950
  } catch {
951
- throw new S("JWS Protected Header is invalid");
951
+ throw new _("JWS Protected Header is invalid");
952
952
  }
953
- if (!xr(a, e.header))
954
- throw new S("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
953
+ if (!Or(a, e.header))
954
+ throw new _("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
955
955
  const n = {
956
956
  ...a,
957
957
  ...e.header
958
- }, o = Yr(S, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
958
+ }, o = Fr(_, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
959
959
  let s = !0;
960
960
  if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
961
- throw new S('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
961
+ throw new _('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
962
962
  const { alg: i } = n;
963
963
  if (typeof i != "string" || !i)
964
- throw new S('JWS "alg" (Algorithm) Header Parameter missing or invalid');
965
- const d = Fr("algorithms", r.algorithms);
964
+ throw new _('JWS "alg" (Algorithm) Header Parameter missing or invalid');
965
+ const d = jr("algorithms", r.algorithms);
966
966
  if (d && !d.has(i))
967
967
  throw new xt('"alg" (Algorithm) Header Parameter value not allowed');
968
968
  if (s) {
969
969
  if (typeof e.payload != "string")
970
- throw new S("JWS Payload must be a string");
970
+ throw new _("JWS Payload must be a string");
971
971
  } else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
972
- throw new S("JWS Payload must be a string or an Uint8Array instance");
972
+ throw new _("JWS Payload must be a string or an Uint8Array instance");
973
973
  let h = !1;
974
- typeof t == "function" ? (t = await t(a, e), h = !0, ct(i, t, "verify"), he(t) && (t = await Gr(t, i))) : ct(i, t, "verify");
975
- const p = br(Ee.encode(e.protected ?? ""), Ee.encode("."), typeof e.payload == "string" ? Ee.encode(e.payload) : e.payload);
974
+ typeof t == "function" ? (t = await t(a, e), h = !0, lt(i, t, "verify"), pe(t) && (t = await Jr(t, i))) : lt(i, t, "verify");
975
+ const f = Er(Ee.encode(e.protected ?? ""), Ee.encode("."), typeof e.payload == "string" ? Ee.encode(e.payload) : e.payload);
976
976
  let u;
977
977
  try {
978
- u = X(e.signature);
978
+ u = te(e.signature);
979
979
  } catch {
980
- throw new S("Failed to base64url decode the signature");
980
+ throw new _("Failed to base64url decode the signature");
981
981
  }
982
- if (!await qr(i, t, u, p))
983
- throw new Ct();
982
+ if (!await Xr(i, t, u, f))
983
+ throw new Ot();
984
984
  let c;
985
985
  if (s)
986
986
  try {
987
- c = X(e.payload);
987
+ c = te(e.payload);
988
988
  } catch {
989
- throw new S("Failed to base64url decode the payload");
989
+ throw new _("Failed to base64url decode the payload");
990
990
  }
991
991
  else typeof e.payload == "string" ? c = Ee.encode(e.payload) : c = e.payload;
992
992
  const m = { payload: c };
993
993
  return e.protected !== void 0 && (m.protectedHeader = a), e.header !== void 0 && (m.unprotectedHeader = e.header), h ? { ...m, key: t } : m;
994
994
  }
995
- async function Qr(e, t, r) {
995
+ async function Zr(e, t, r) {
996
996
  if (e instanceof Uint8Array && (e = ye.decode(e)), typeof e != "string")
997
- throw new S("Compact JWS must be a string or Uint8Array");
997
+ throw new _("Compact JWS must be a string or Uint8Array");
998
998
  const { 0: a, 1: n, 2: o, length: s } = e.split(".");
999
999
  if (s !== 3)
1000
- throw new S("Invalid Compact JWS");
1001
- const i = await Xr({ payload: n, protected: a, signature: o }, t, r), d = { payload: i.payload, protectedHeader: i.protectedHeader };
1000
+ throw new _("Invalid Compact JWS");
1001
+ const i = await Qr({ payload: n, protected: a, signature: o }, t, r), d = { payload: i.payload, protectedHeader: i.protectedHeader };
1002
1002
  return typeof t == "function" ? { ...d, key: i.key } : d;
1003
1003
  }
1004
- const Zr = (e) => Math.floor(e.getTime() / 1e3), Kt = 60, Ht = Kt * 60, et = Ht * 24, ea = et * 7, ta = et * 365.25, ra = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, lt = (e) => {
1005
- const t = ra.exec(e);
1004
+ const ea = (e) => Math.floor(e.getTime() / 1e3), Kt = 60, Ht = Kt * 60, rt = Ht * 24, ta = rt * 7, ra = rt * 365.25, aa = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, dt = (e) => {
1005
+ const t = aa.exec(e);
1006
1006
  if (!t || t[4] && t[1])
1007
1007
  throw new TypeError("Invalid time period format");
1008
1008
  const r = parseFloat(t[2]), a = t[3].toLowerCase();
@@ -1032,44 +1032,44 @@ const Zr = (e) => Math.floor(e.getTime() / 1e3), Kt = 60, Ht = Kt * 60, et = Ht
1032
1032
  case "day":
1033
1033
  case "days":
1034
1034
  case "d":
1035
- n = Math.round(r * et);
1035
+ n = Math.round(r * rt);
1036
1036
  break;
1037
1037
  case "week":
1038
1038
  case "weeks":
1039
1039
  case "w":
1040
- n = Math.round(r * ea);
1040
+ n = Math.round(r * ta);
1041
1041
  break;
1042
1042
  default:
1043
- n = Math.round(r * ta);
1043
+ n = Math.round(r * ra);
1044
1044
  break;
1045
1045
  }
1046
1046
  return t[1] === "-" || t[4] === "ago" ? -n : n;
1047
- }, dt = (e) => e.toLowerCase().replace(/^application\//, ""), aa = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, na = (e, t, r = {}) => {
1047
+ }, ut = (e) => e.toLowerCase().replace(/^application\//, ""), na = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, oa = (e, t, r = {}) => {
1048
1048
  let a;
1049
1049
  try {
1050
1050
  a = JSON.parse(ye.decode(t));
1051
1051
  } catch {
1052
1052
  }
1053
- if (!me(a))
1054
- throw new G("JWT Claims Set must be a top-level JSON object");
1053
+ if (!he(a))
1054
+ throw new J("JWT Claims Set must be a top-level JSON object");
1055
1055
  const { typ: n } = r;
1056
- if (n && (typeof e.typ != "string" || dt(e.typ) !== dt(n)))
1057
- throw new L('unexpected "typ" JWT header value', a, "typ", "check_failed");
1058
- const { requiredClaims: o = [], issuer: s, subject: i, audience: d, maxTokenAge: h } = r, p = [...o];
1059
- h !== void 0 && p.push("iat"), d !== void 0 && p.push("aud"), i !== void 0 && p.push("sub"), s !== void 0 && p.push("iss");
1060
- for (const y of new Set(p.reverse()))
1056
+ if (n && (typeof e.typ != "string" || ut(e.typ) !== ut(n)))
1057
+ throw new H('unexpected "typ" JWT header value', a, "typ", "check_failed");
1058
+ const { requiredClaims: o = [], issuer: s, subject: i, audience: d, maxTokenAge: h } = r, f = [...o];
1059
+ h !== void 0 && f.push("iat"), d !== void 0 && f.push("aud"), i !== void 0 && f.push("sub"), s !== void 0 && f.push("iss");
1060
+ for (const y of new Set(f.reverse()))
1061
1061
  if (!(y in a))
1062
- throw new L(`missing required "${y}" claim`, a, y, "missing");
1062
+ throw new H(`missing required "${y}" claim`, a, y, "missing");
1063
1063
  if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
1064
- throw new L('unexpected "iss" claim value', a, "iss", "check_failed");
1064
+ throw new H('unexpected "iss" claim value', a, "iss", "check_failed");
1065
1065
  if (i && a.sub !== i)
1066
- throw new L('unexpected "sub" claim value', a, "sub", "check_failed");
1067
- if (d && !aa(a.aud, typeof d == "string" ? [d] : d))
1068
- throw new L('unexpected "aud" claim value', a, "aud", "check_failed");
1066
+ throw new H('unexpected "sub" claim value', a, "sub", "check_failed");
1067
+ if (d && !na(a.aud, typeof d == "string" ? [d] : d))
1068
+ throw new H('unexpected "aud" claim value', a, "aud", "check_failed");
1069
1069
  let u;
1070
1070
  switch (typeof r.clockTolerance) {
1071
1071
  case "string":
1072
- u = lt(r.clockTolerance);
1072
+ u = dt(r.clockTolerance);
1073
1073
  break;
1074
1074
  case "number":
1075
1075
  u = r.clockTolerance;
@@ -1080,117 +1080,117 @@ const Zr = (e) => Math.floor(e.getTime() / 1e3), Kt = 60, Ht = Kt * 60, et = Ht
1080
1080
  default:
1081
1081
  throw new TypeError("Invalid clockTolerance option type");
1082
1082
  }
1083
- const { currentDate: c } = r, m = Zr(c || /* @__PURE__ */ new Date());
1083
+ const { currentDate: c } = r, m = ea(c || /* @__PURE__ */ new Date());
1084
1084
  if ((a.iat !== void 0 || h) && typeof a.iat != "number")
1085
- throw new L('"iat" claim must be a number', a, "iat", "invalid");
1085
+ throw new H('"iat" claim must be a number', a, "iat", "invalid");
1086
1086
  if (a.nbf !== void 0) {
1087
1087
  if (typeof a.nbf != "number")
1088
- throw new L('"nbf" claim must be a number', a, "nbf", "invalid");
1088
+ throw new H('"nbf" claim must be a number', a, "nbf", "invalid");
1089
1089
  if (a.nbf > m + u)
1090
- throw new L('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
1090
+ throw new H('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
1091
1091
  }
1092
1092
  if (a.exp !== void 0) {
1093
1093
  if (typeof a.exp != "number")
1094
- throw new L('"exp" claim must be a number', a, "exp", "invalid");
1094
+ throw new H('"exp" claim must be a number', a, "exp", "invalid");
1095
1095
  if (a.exp <= m - u)
1096
- throw new Fe('"exp" claim timestamp check failed', a, "exp", "check_failed");
1096
+ throw new qe('"exp" claim timestamp check failed', a, "exp", "check_failed");
1097
1097
  }
1098
1098
  if (h) {
1099
- const y = m - a.iat, E = typeof h == "number" ? h : lt(h);
1100
- if (y - u > E)
1101
- throw new Fe('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
1099
+ const y = m - a.iat, w = typeof h == "number" ? h : dt(h);
1100
+ if (y - u > w)
1101
+ throw new qe('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
1102
1102
  if (y < 0 - u)
1103
- throw new L('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
1103
+ throw new H('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
1104
1104
  }
1105
1105
  return a;
1106
1106
  };
1107
- async function oa(e, t, r) {
1107
+ async function sa(e, t, r) {
1108
1108
  var a;
1109
- const n = await Qr(e, t, r);
1109
+ const n = await Zr(e, t, r);
1110
1110
  if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
1111
- throw new G("JWTs MUST NOT use unencoded payload");
1112
- const o = { payload: na(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
1111
+ throw new J("JWTs MUST NOT use unencoded payload");
1112
+ const o = { payload: oa(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
1113
1113
  return typeof t == "function" ? { ...o, key: n.key } : o;
1114
1114
  }
1115
- const sa = X;
1116
- function ia(e) {
1115
+ const ia = te;
1116
+ function ca(e) {
1117
1117
  if (typeof e != "string")
1118
- throw new G("JWTs must use Compact JWS serialization, JWT must be a string");
1118
+ throw new J("JWTs must use Compact JWS serialization, JWT must be a string");
1119
1119
  const { 1: t, length: r } = e.split(".");
1120
1120
  if (r === 5)
1121
- throw new G("Only JWTs using Compact JWS serialization can be decoded");
1121
+ throw new J("Only JWTs using Compact JWS serialization can be decoded");
1122
1122
  if (r !== 3)
1123
- throw new G("Invalid JWT");
1123
+ throw new J("Invalid JWT");
1124
1124
  if (!t)
1125
- throw new G("JWTs must contain a payload");
1125
+ throw new J("JWTs must contain a payload");
1126
1126
  let a;
1127
1127
  try {
1128
- a = sa(t);
1128
+ a = ia(t);
1129
1129
  } catch {
1130
- throw new G("Failed to base64url decode the payload");
1130
+ throw new J("Failed to base64url decode the payload");
1131
1131
  }
1132
1132
  let n;
1133
1133
  try {
1134
1134
  n = JSON.parse(ye.decode(a));
1135
1135
  } catch {
1136
- throw new G("Failed to parse the decoded payload as JSON");
1136
+ throw new J("Failed to parse the decoded payload as JSON");
1137
1137
  }
1138
- if (!me(n))
1139
- throw new G("Invalid JWT Claims Set");
1138
+ if (!he(n))
1139
+ throw new J("Invalid JWT Claims Set");
1140
1140
  return n;
1141
1141
  }
1142
1142
  const ge = async (e) => {
1143
1143
  try {
1144
- const t = A.ALG, r = await Br(yr, t);
1145
- return await oa(e, r, {
1146
- issuer: A.ISSUER
1144
+ const t = N.ALG, r = await Gr(br, t);
1145
+ return await sa(e, r, {
1146
+ issuer: N.ISSUER
1147
1147
  });
1148
1148
  } catch {
1149
1149
  return;
1150
1150
  }
1151
- }, ca = (e) => {
1151
+ }, la = (e) => {
1152
1152
  try {
1153
- return ia(e);
1153
+ return ca(e);
1154
1154
  } catch {
1155
1155
  return;
1156
1156
  }
1157
- }, _ = [];
1157
+ }, A = [];
1158
1158
  for (let e = 0; e < 256; ++e)
1159
- _.push((e + 256).toString(16).slice(1));
1160
- function la(e, t = 0) {
1161
- return (_[e[t + 0]] + _[e[t + 1]] + _[e[t + 2]] + _[e[t + 3]] + "-" + _[e[t + 4]] + _[e[t + 5]] + "-" + _[e[t + 6]] + _[e[t + 7]] + "-" + _[e[t + 8]] + _[e[t + 9]] + "-" + _[e[t + 10]] + _[e[t + 11]] + _[e[t + 12]] + _[e[t + 13]] + _[e[t + 14]] + _[e[t + 15]]).toLowerCase();
1162
- }
1163
- let We;
1164
- const da = new Uint8Array(16);
1165
- function ua() {
1166
- if (!We) {
1159
+ A.push((e + 256).toString(16).slice(1));
1160
+ function da(e, t = 0) {
1161
+ return (A[e[t + 0]] + A[e[t + 1]] + A[e[t + 2]] + A[e[t + 3]] + "-" + A[e[t + 4]] + A[e[t + 5]] + "-" + A[e[t + 6]] + A[e[t + 7]] + "-" + A[e[t + 8]] + A[e[t + 9]] + "-" + A[e[t + 10]] + A[e[t + 11]] + A[e[t + 12]] + A[e[t + 13]] + A[e[t + 14]] + A[e[t + 15]]).toLowerCase();
1162
+ }
1163
+ let Ge;
1164
+ const ua = new Uint8Array(16);
1165
+ function ma() {
1166
+ if (!Ge) {
1167
1167
  if (typeof crypto > "u" || !crypto.getRandomValues)
1168
1168
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1169
- We = crypto.getRandomValues.bind(crypto);
1169
+ Ge = crypto.getRandomValues.bind(crypto);
1170
1170
  }
1171
- return We(da);
1171
+ return Ge(ua);
1172
1172
  }
1173
- const ma = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ut = { randomUUID: ma };
1174
- function mt(e, t, r) {
1175
- if (ut.randomUUID && !e)
1176
- return ut.randomUUID();
1173
+ const ha = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mt = { randomUUID: ha };
1174
+ function ht(e, t, r) {
1175
+ if (mt.randomUUID && !e)
1176
+ return mt.randomUUID();
1177
1177
  e = e || {};
1178
- const a = e.random || (e.rng || ua)();
1179
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, la(a);
1178
+ const a = e.random || (e.rng || ma)();
1179
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, da(a);
1180
1180
  }
1181
- const ht = globalThis.crypto, ha = (e) => `${mt()}${mt()}`.slice(0, e), pa = (e) => btoa(
1181
+ const pt = globalThis.crypto, pa = (e) => `${ht()}${ht()}`.slice(0, e), fa = (e) => btoa(
1182
1182
  [...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
1183
1183
  );
1184
- async function fa(e) {
1185
- if (!ht.subtle)
1184
+ async function ga(e) {
1185
+ if (!pt.subtle)
1186
1186
  throw new Error(
1187
1187
  "crypto.subtle is available only in secure contexts (HTTPS)."
1188
1188
  );
1189
- const t = new TextEncoder().encode(e), r = await ht.subtle.digest("SHA-256", t);
1190
- return pa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
1189
+ const t = new TextEncoder().encode(e), r = await pt.subtle.digest("SHA-256", t);
1190
+ return fa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
1191
1191
  }
1192
- async function ga(e) {
1193
- const t = ha(43), r = await fa(t);
1192
+ async function ya(e) {
1193
+ const t = pa(43), r = await ga(t);
1194
1194
  return {
1195
1195
  code_verifier: t,
1196
1196
  code_challenge: r
@@ -1199,23 +1199,23 @@ async function ga(e) {
1199
1199
  function Wt(e, t) {
1200
1200
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
1201
1201
  }
1202
- const pt = (e, t) => {
1202
+ const ft = (e, t) => {
1203
1203
  const r = JSON.stringify(
1204
1204
  typeof t == "function" ? t() : t
1205
1205
  );
1206
1206
  window.localStorage.setItem(e, r), Wt(e, r);
1207
- }, ya = (e) => {
1207
+ }, ba = (e) => {
1208
1208
  window.localStorage.removeItem(e), Wt(e, null);
1209
- }, ft = (e) => window.localStorage.getItem(e), ba = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
1209
+ }, gt = (e) => window.localStorage.getItem(e), Ea = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
1210
1210
  function Te({
1211
1211
  key: e,
1212
1212
  initialValue: t
1213
1213
  }) {
1214
- const r = or(ba, () => ft(e)), a = q(
1214
+ const r = sr(Ea, () => gt(e)), a = q(
1215
1215
  (s) => {
1216
1216
  try {
1217
1217
  const i = typeof s == "function" ? s(JSON.parse(r)) : s;
1218
- i == null ? ya(e) : pt(e, i);
1218
+ i == null ? ba(e) : ft(e, i);
1219
1219
  } catch (i) {
1220
1220
  console.warn(i);
1221
1221
  }
@@ -1226,42 +1226,42 @@ function Te({
1226
1226
  }, [t, a]), o = q(() => {
1227
1227
  a(null);
1228
1228
  }, [a]);
1229
- return Q(() => {
1229
+ return Y(() => {
1230
1230
  try {
1231
- ft(e) === null && typeof t < "u" && pt(e, t);
1231
+ gt(e) === null && typeof t < "u" && ft(e, t);
1232
1232
  } catch (s) {
1233
1233
  console.warn(s);
1234
1234
  }
1235
1235
  }, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
1236
1236
  }
1237
- const k = [];
1237
+ const R = [];
1238
1238
  for (let e = 0; e < 256; ++e)
1239
- k.push((e + 256).toString(16).slice(1));
1240
- function Ea(e, t = 0) {
1241
- return (k[e[t + 0]] + k[e[t + 1]] + k[e[t + 2]] + k[e[t + 3]] + "-" + k[e[t + 4]] + k[e[t + 5]] + "-" + k[e[t + 6]] + k[e[t + 7]] + "-" + k[e[t + 8]] + k[e[t + 9]] + "-" + k[e[t + 10]] + k[e[t + 11]] + k[e[t + 12]] + k[e[t + 13]] + k[e[t + 14]] + k[e[t + 15]]).toLowerCase();
1242
- }
1243
- let Be;
1244
- const wa = new Uint8Array(16);
1245
- function Ta() {
1246
- if (!Be) {
1239
+ R.push((e + 256).toString(16).slice(1));
1240
+ function wa(e, t = 0) {
1241
+ return (R[e[t + 0]] + R[e[t + 1]] + R[e[t + 2]] + R[e[t + 3]] + "-" + R[e[t + 4]] + R[e[t + 5]] + "-" + R[e[t + 6]] + R[e[t + 7]] + "-" + R[e[t + 8]] + R[e[t + 9]] + "-" + R[e[t + 10]] + R[e[t + 11]] + R[e[t + 12]] + R[e[t + 13]] + R[e[t + 14]] + R[e[t + 15]]).toLowerCase();
1242
+ }
1243
+ let Je;
1244
+ const Ta = new Uint8Array(16);
1245
+ function Ia() {
1246
+ if (!Je) {
1247
1247
  if (typeof crypto > "u" || !crypto.getRandomValues)
1248
1248
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1249
- Be = crypto.getRandomValues.bind(crypto);
1249
+ Je = crypto.getRandomValues.bind(crypto);
1250
1250
  }
1251
- return Be(wa);
1251
+ return Je(Ta);
1252
1252
  }
1253
- const Ia = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), gt = { randomUUID: Ia };
1254
- function Ge(e, t, r) {
1255
- if (gt.randomUUID && !e)
1256
- return gt.randomUUID();
1253
+ const Sa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), yt = { randomUUID: Sa };
1254
+ function Ve(e, t, r) {
1255
+ if (yt.randomUUID && !e)
1256
+ return yt.randomUUID();
1257
1257
  e = e || {};
1258
- const a = e.random || (e.rng || Ta)();
1259
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ea(a);
1258
+ const a = e.random || (e.rng || Ia)();
1259
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, wa(a);
1260
1260
  }
1261
- const se = "Your session has expired. For your security, please log in again to continue.", Sa = "Your session has been successfully terminated.", Je = "Login failed. Please try again.", _a = "Error getting access token, please re-authenticate.", ka = "You forgot to wrap your component in <AuthProvider>.", xe = {
1261
+ const ie = "Your session has expired. For your security, please log in again to continue.", _a = "Your session has been successfully terminated.", Ye = "Login failed. Please try again.", ka = "Error getting access token, please re-authenticate.", Aa = "You forgot to wrap your component in <AuthProvider>.", Oe = {
1262
1262
  dev: "https://auth.gizmette.local.com:3003",
1263
1263
  prod: "https://mylogin.gizmette.com/auth"
1264
- }, Ie = "@@auth@@", fe = "LOADING", ke = "LOGIN", Bt = "LOGOUT", be = "success", V = "failure", Gt = "include", Jt = "POST", Vt = "application/json", Se = {
1264
+ }, Ie = "@@auth@@", fe = "LOADING", ke = "LOGIN", Bt = "LOGOUT", be = "success", F = "failure", Gt = "include", Jt = "POST", Vt = "application/json", Se = {
1265
1265
  GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
1266
1266
  $clientId: String!,
1267
1267
  $username: String!,
@@ -1342,7 +1342,7 @@ const se = "Your session has expired. For your security, please log in again to
1342
1342
  email
1343
1343
  }
1344
1344
  }`
1345
- }, ie = {
1345
+ }, ce = {
1346
1346
  GET_REGISTRATION_OPTIONS: {
1347
1347
  schema: Se.GET_REGISTRATION_OPTIONS,
1348
1348
  method: "getPasskeyRegistrationOptions"
@@ -1359,7 +1359,7 @@ const se = "Your session has expired. For your security, please log in again to
1359
1359
  schema: Se.VERIFY_AUTHENTICATION,
1360
1360
  method: "verifyPasskeyAuthentication"
1361
1361
  }
1362
- }, ce = async ({
1362
+ }, le = async ({
1363
1363
  accessToken: e,
1364
1364
  type: t,
1365
1365
  clientId: r,
@@ -1367,7 +1367,7 @@ const se = "Your session has expired. For your security, please log in again to
1367
1367
  }) => {
1368
1368
  try {
1369
1369
  const n = `Bearer ${e}`, o = await fetch(
1370
- Yt ? `${xe.dev}/graphql` : `${xe.prod}/graphql`,
1370
+ Yt ? `${Oe.dev}/graphql` : `${Oe.prod}/graphql`,
1371
1371
  {
1372
1372
  credentials: Gt,
1373
1373
  method: Jt,
@@ -1383,23 +1383,23 @@ const se = "Your session has expired. For your security, please log in again to
1383
1383
  }
1384
1384
  );
1385
1385
  if (o.status !== 200)
1386
- return { status: V, data: [] };
1386
+ return { status: F, data: [] };
1387
1387
  const { data: s } = await o.json();
1388
1388
  return {
1389
1389
  status: be,
1390
1390
  data: s[t.method]
1391
1391
  };
1392
1392
  } catch (n) {
1393
- return console.error(n), { status: V, data: [] };
1393
+ return console.error(n), { status: F, data: [] };
1394
1394
  }
1395
- }, De = async ({
1395
+ }, Me = async ({
1396
1396
  type: e,
1397
1397
  clientId: t,
1398
1398
  params: r = {}
1399
1399
  }) => {
1400
1400
  try {
1401
1401
  const a = await fetch(
1402
- Yt ? `${xe.dev}/${e}` : `${xe.prod}/${e}`,
1402
+ Yt ? `${Oe.dev}/${e}` : `${Oe.prod}/${e}`,
1403
1403
  {
1404
1404
  credentials: Gt,
1405
1405
  method: Jt,
@@ -1411,30 +1411,30 @@ const se = "Your session has expired. For your security, please log in again to
1411
1411
  }
1412
1412
  );
1413
1413
  if (a.status !== 200)
1414
- return { status: V, data: [] };
1414
+ return { status: F, data: [] };
1415
1415
  const { data: n } = await a.json();
1416
1416
  return {
1417
1417
  status: be,
1418
1418
  data: n || []
1419
1419
  };
1420
1420
  } catch (a) {
1421
- return console.error(a), { status: V, data: [] };
1421
+ return console.error(a), { status: F, data: [] };
1422
1422
  }
1423
- }, Aa = process.env.NODE_ENV === "production", Yt = !Aa, Ft = {
1423
+ }, Ra = process.env.NODE_ENV === "production", Yt = !Ra, Ft = {
1424
1424
  isLoading: !0,
1425
1425
  isAuthenticated: !1,
1426
1426
  user: void 0,
1427
1427
  logoutReason: "",
1428
1428
  debug: !1,
1429
1429
  authenticationType: ""
1430
- }, Ra = (e) => {
1430
+ }, Na = (e) => {
1431
1431
  try {
1432
- const t = ca(e);
1433
- return t ? t[A.USER_ID_KEY] : "";
1432
+ const t = la(e);
1433
+ return t ? t[N.USER_ID_KEY] : "";
1434
1434
  } catch {
1435
1435
  return "";
1436
1436
  }
1437
- }, Na = async ({
1437
+ }, va = async ({
1438
1438
  userId: e,
1439
1439
  clientId: t,
1440
1440
  domain: r,
@@ -1443,22 +1443,22 @@ const se = "Your session has expired. For your security, please log in again to
1443
1443
  var n;
1444
1444
  try {
1445
1445
  return {
1446
- status: ((n = await De({
1447
- type: Oe.LOGOUT,
1446
+ status: ((n = await Me({
1447
+ type: Le.LOGOUT,
1448
1448
  clientId: t,
1449
1449
  params: {
1450
1450
  userId: e,
1451
1451
  domain: r,
1452
1452
  idToken: a
1453
1453
  }
1454
- })) == null ? void 0 : n.status) || V
1454
+ })) == null ? void 0 : n.status) || F
1455
1455
  };
1456
1456
  } catch {
1457
1457
  return {
1458
- status: V
1458
+ status: F
1459
1459
  };
1460
1460
  }
1461
- }, va = async ({
1461
+ }, xa = async ({
1462
1462
  username: e,
1463
1463
  password: t,
1464
1464
  clientId: r,
@@ -1470,13 +1470,13 @@ const se = "Your session has expired. For your security, please log in again to
1470
1470
  domain: d,
1471
1471
  ua: h
1472
1472
  }) => {
1473
- var p;
1473
+ var f;
1474
1474
  try {
1475
- const u = await De({
1476
- type: Oe.LOGIN,
1475
+ const u = await Me({
1476
+ type: Le.LOGIN,
1477
1477
  clientId: r,
1478
1478
  params: {
1479
- type: n || ue.ID_AND_ACCESS_TOKEN,
1479
+ type: n || me.ID_AND_ACCESS_TOKEN,
1480
1480
  username: e,
1481
1481
  password: t,
1482
1482
  sessionExpiration: o,
@@ -1486,13 +1486,13 @@ const se = "Your session has expired. For your security, please log in again to
1486
1486
  domain: d,
1487
1487
  ua: h
1488
1488
  }
1489
- }), c = await ge((p = u == null ? void 0 : u.data) == null ? void 0 : p.idToken);
1490
- return c && c.payload[A.USER_ID_KEY] !== "" && c.payload[A.NONCE_KEY] === a ? {
1489
+ }), c = await ge((f = u == null ? void 0 : u.data) == null ? void 0 : f.idToken);
1490
+ return c && c.payload[N.USER_ID_KEY] !== "" && c.payload[N.NONCE_KEY] === a ? {
1491
1491
  idToken: u.data.idToken,
1492
1492
  accessToken: u.data.accessToken,
1493
1493
  refreshToken: u.data.refreshToken,
1494
- userId: c.payload[A.USER_ID_KEY],
1495
- email: c.payload[A.EMAIL_KEY],
1494
+ userId: c.payload[N.USER_ID_KEY],
1495
+ email: c.payload[N.EMAIL_KEY],
1496
1496
  status: !0
1497
1497
  } : {
1498
1498
  status: !1
@@ -1502,18 +1502,18 @@ const se = "Your session has expired. For your security, please log in again to
1502
1502
  status: !1
1503
1503
  };
1504
1504
  }
1505
- }, xa = async ({
1505
+ }, Oa = async ({
1506
1506
  nonce: e,
1507
1507
  clientId: t,
1508
1508
  code_challenge: r
1509
1509
  }) => {
1510
1510
  var a;
1511
1511
  try {
1512
- const n = await De({
1513
- type: Oe.CODE,
1512
+ const n = await Me({
1513
+ type: Le.CODE,
1514
1514
  clientId: t,
1515
1515
  params: {
1516
- type: ue.CODE,
1516
+ type: me.CODE,
1517
1517
  nonce: e,
1518
1518
  code_challenge: r
1519
1519
  }
@@ -1522,12 +1522,12 @@ const se = "Your session has expired. For your security, please log in again to
1522
1522
  status: be,
1523
1523
  data: n.data.code
1524
1524
  } : {
1525
- status: V,
1525
+ status: F,
1526
1526
  data: ""
1527
1527
  };
1528
1528
  } catch {
1529
1529
  return {
1530
- status: V,
1530
+ status: F,
1531
1531
  data: ""
1532
1532
  };
1533
1533
  }
@@ -1541,11 +1541,11 @@ const se = "Your session has expired. For your security, please log in again to
1541
1541
  }) => {
1542
1542
  var s;
1543
1543
  try {
1544
- const i = await De({
1545
- type: Oe.REFRESH,
1544
+ const i = await Me({
1545
+ type: Le.REFRESH,
1546
1546
  clientId: e,
1547
1547
  params: {
1548
- type: ue.REFRESH_TOKEN,
1548
+ type: me.REFRESH_TOKEN,
1549
1549
  userId: t,
1550
1550
  nonce: r,
1551
1551
  refreshToken: a,
@@ -1553,10 +1553,10 @@ const se = "Your session has expired. For your security, please log in again to
1553
1553
  domain: o
1554
1554
  }
1555
1555
  }), d = await ge((s = i == null ? void 0 : i.data) == null ? void 0 : s.accessToken);
1556
- return d && d.payload[A.USER_ID_KEY] !== "" && d.payload[A.NONCE_KEY] === r ? {
1556
+ return d && d.payload[N.USER_ID_KEY] !== "" && d.payload[N.NONCE_KEY] === r ? {
1557
1557
  accessToken: i.data.accessToken,
1558
1558
  refreshToken: i.data.refreshToken,
1559
- userId: d.payload[A.USER_ID_KEY],
1559
+ userId: d.payload[N.USER_ID_KEY],
1560
1560
  status: !0
1561
1561
  } : {
1562
1562
  status: !1
@@ -1567,9 +1567,9 @@ const se = "Your session has expired. For your security, please log in again to
1567
1567
  };
1568
1568
  }
1569
1569
  };
1570
- class Oa {
1570
+ class Pa {
1571
1571
  constructor(t = null, r = null) {
1572
- Ue(this, "refreshTokenPromise", null), Ue(this, "accessToken"), Ue(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
1572
+ He(this, "refreshTokenPromise", null), He(this, "accessToken"), He(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
1573
1573
  }
1574
1574
  async refreshtoken({
1575
1575
  clientId: t,
@@ -1596,7 +1596,7 @@ class Oa {
1596
1596
  domain: n
1597
1597
  }) {
1598
1598
  const o = await ge(this.refreshToken);
1599
- if (o && o.payload[A.USER_ID_KEY] !== "") {
1599
+ if (o && o.payload[N.USER_ID_KEY] !== "") {
1600
1600
  const s = await Ca({
1601
1601
  clientId: t,
1602
1602
  userId: r,
@@ -1610,37 +1610,37 @@ class Oa {
1610
1610
  newAccessToken: s.accessToken,
1611
1611
  newRefreshToken: s.refreshToken
1612
1612
  }) : {
1613
- status: V
1613
+ status: F
1614
1614
  };
1615
1615
  } else
1616
1616
  return {
1617
- status: V
1617
+ status: F
1618
1618
  };
1619
1619
  }
1620
1620
  }
1621
- const Pa = (e) => q(
1621
+ const Da = (e) => q(
1622
1622
  (...t) => {
1623
1623
  e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
1624
1624
  },
1625
1625
  [e]
1626
- ), le = () => {
1627
- throw new Error(ka);
1628
- }, jt = nr({
1626
+ ), de = () => {
1627
+ throw new Error(Aa);
1628
+ }, jt = or({
1629
1629
  isAuthenticated: !1,
1630
1630
  isLoading: !1,
1631
- login: le,
1632
- logout: le,
1633
- getAccessToken: le,
1634
- getIdToken: le,
1635
- registeringForPasskey: le,
1636
- loginWithPasskey: le,
1631
+ login: de,
1632
+ logout: de,
1633
+ getAccessToken: de,
1634
+ getIdToken: de,
1635
+ registeringForPasskey: de,
1636
+ loginWithPasskey: de,
1637
1637
  logoutReason: "",
1638
1638
  authenticationType: ""
1639
- }), Da = F.createContext({
1639
+ }), La = X.createContext({
1640
1640
  state: Ft,
1641
1641
  dispatch: () => {
1642
1642
  }
1643
- }), La = (e, t) => (t == null ? void 0 : t.type) === fe ? {
1643
+ }), $a = (e, t) => (t == null ? void 0 : t.type) === fe ? {
1644
1644
  ...e,
1645
1645
  isLoading: t.payload.isLoading
1646
1646
  } : (t == null ? void 0 : t.type) === ke ? {
@@ -1664,28 +1664,28 @@ const Pa = (e) => q(
1664
1664
  domain: a = "",
1665
1665
  debug: n = !1
1666
1666
  }) => {
1667
- const [o, s] = wt(La, {
1667
+ const [o, s] = Tt($a, {
1668
1668
  ...Ft,
1669
1669
  debug: n
1670
- }), i = Pa(n), d = $(!1), [h, p, , u] = Te({
1670
+ }), i = Da(n), d = x(!1), [h, f, , u] = Te({
1671
1671
  key: `${Ie}::${r}::@@user@@`
1672
1672
  }), [c, m, , y] = Te({
1673
1673
  key: `${Ie}::${r}::@@access@@`
1674
- }), [E, w, , I] = Te(
1674
+ }), [w, T, , k] = Te(
1675
1675
  {
1676
1676
  key: `${Ie}::${r}::@@refresh@@`
1677
1677
  }
1678
- ), [U, K, , H] = Te({
1678
+ ), [Q, D, , Z] = Te({
1679
1679
  key: `${Ie}::${r}::@@nonce@@`
1680
- }), v = new Oa(c, E), P = q(() => {
1681
- i("removeLocalStorage: removing local storage"), u(), y(), I(), H();
1680
+ }), L = new Pa(c, w), B = q(() => {
1681
+ i("removeLocalStorage: removing local storage"), u(), y(), k(), Z();
1682
1682
  }, [
1683
1683
  y,
1684
1684
  u,
1685
- H,
1686
- I,
1685
+ Z,
1686
+ k,
1687
1687
  i
1688
- ]), W = q(
1688
+ ]), U = q(
1689
1689
  (g) => {
1690
1690
  i(
1691
1691
  "removeStateAndLocalStorage: removing state and local storage with reason: ",
@@ -1693,148 +1693,148 @@ const Pa = (e) => q(
1693
1693
  ), s({
1694
1694
  type: Bt,
1695
1695
  payload: {
1696
- logoutReason: g || se
1696
+ logoutReason: g || ie
1697
1697
  }
1698
- }), P(), s({ type: fe, payload: { isLoading: !1 } });
1698
+ }), B(), s({ type: fe, payload: { isLoading: !1 } });
1699
1699
  },
1700
- [P, i]
1701
- ), x = q(
1700
+ [B, i]
1701
+ ), S = q(
1702
1702
  async (g) => {
1703
1703
  i("invalidateAndLogout: invalidating and logging out");
1704
- const { user: T } = o, b = (T == null ? void 0 : T.userId) || Ra(h);
1704
+ const { user: E } = o, b = (E == null ? void 0 : E.userId) || Na(h);
1705
1705
  b || i(
1706
1706
  "invalidateAndLogout: user cannot be identified, logging out without userId"
1707
- ), await Na({
1707
+ ), await va({
1708
1708
  userId: b,
1709
1709
  clientId: r,
1710
1710
  domain: a,
1711
1711
  idToken: h
1712
- }), W(g || se);
1712
+ }), U(g || ie);
1713
1713
  },
1714
- [h, o, r, a, W, i]
1714
+ [h, o, r, a, U, i]
1715
1715
  );
1716
- Q(() => {
1716
+ Y(() => {
1717
1717
  if (!d.current)
1718
1718
  return o.isLoading && h !== null ? (async () => {
1719
1719
  try {
1720
1720
  const g = await ge(h);
1721
- g && g.payload[A.USER_ID_KEY] !== "" ? (i("useEffect: setting the authentication state"), s({
1721
+ g && g.payload[N.USER_ID_KEY] !== "" ? (i("useEffect: setting the authentication state"), s({
1722
1722
  type: ke,
1723
1723
  payload: {
1724
- authenticationType: g.payload[A.AUTH_TYPE_KEY],
1724
+ authenticationType: g.payload[N.AUTH_TYPE_KEY],
1725
1725
  user: {
1726
- userId: g.payload[A.USER_ID_KEY],
1727
- username: g.payload[A.USERNAME_KEY],
1728
- email: g.payload[A.EMAIL_KEY]
1726
+ userId: g.payload[N.USER_ID_KEY],
1727
+ username: g.payload[N.USERNAME_KEY],
1728
+ email: g.payload[N.EMAIL_KEY]
1729
1729
  }
1730
1730
  }
1731
- })) : (i("useEffect: invalid JWT, invalidating and logging out"), await x(se));
1731
+ })) : (i("useEffect: invalid JWT, invalidating and logging out"), await S(ie));
1732
1732
  } catch {
1733
1733
  i(
1734
1734
  "useEffect: exception validating JWT, invalidating and logging out"
1735
- ), await x(se);
1735
+ ), await S(ie);
1736
1736
  }
1737
1737
  })() : (i("useEffect: setting the loading state to false"), s({ type: fe, payload: { isLoading: !1 } })), () => {
1738
1738
  d.current = !0;
1739
1739
  };
1740
- }, [o.isLoading, h, x, i]);
1741
- const pe = async (g, T) => {
1742
- s({ type: fe, payload: { isLoading: !0 } }), P();
1743
- const b = Ge();
1744
- K(b), i("login: Logging in with password");
1745
- const { code_verifier: re, code_challenge: ar } = await ga(), nt = await xa({
1740
+ }, [o.isLoading, h, S, i]);
1741
+ const $ = async (g, E) => {
1742
+ s({ type: fe, payload: { isLoading: !0 } }), B();
1743
+ const b = Ve();
1744
+ D(b), i("login: Logging in with password");
1745
+ const { code_verifier: ae, code_challenge: nr } = await ya(), st = await Oa({
1746
1746
  nonce: b,
1747
1747
  clientId: r,
1748
- code_challenge: ar
1748
+ code_challenge: nr
1749
1749
  });
1750
- if (nt.status) {
1751
- const ae = await va({
1750
+ if (st.status) {
1751
+ const ne = await xa({
1752
1752
  username: g,
1753
- password: T,
1753
+ password: E,
1754
1754
  clientId: r,
1755
1755
  sessionExpiration: t,
1756
1756
  nonce: b,
1757
- type: ue.CODE,
1758
- code: nt.data,
1759
- code_verifier: re,
1757
+ type: me.CODE,
1758
+ code: st.data,
1759
+ code_verifier: ae,
1760
1760
  domain: a,
1761
1761
  ua: navigator.userAgent
1762
1762
  });
1763
- return ae.status ? (p(ae.idToken), m(ae.accessToken), w(ae.refreshToken), s({
1763
+ return ne.status ? (f(ne.idToken), m(ne.accessToken), T(ne.refreshToken), s({
1764
1764
  type: ke,
1765
1765
  payload: {
1766
- authenticationType: ue.CODE,
1766
+ authenticationType: me.CODE,
1767
1767
  user: {
1768
- userId: ae.userId,
1768
+ userId: ne.userId,
1769
1769
  username: g,
1770
- email: ae.email
1770
+ email: ne.email
1771
1771
  }
1772
1772
  }
1773
- }), !0) : (W(Je), !1);
1773
+ }), !0) : (U(Ye), !1);
1774
1774
  }
1775
1775
  return !1;
1776
- }, Z = async (g) => {
1777
- g == null || g.preventDefault(), await x(Sa);
1778
- }, R = async () => {
1779
- const { isAuthenticated: g, user: T } = o;
1776
+ }, K = async (g) => {
1777
+ g == null || g.preventDefault(), await S(_a);
1778
+ }, I = async () => {
1779
+ const { isAuthenticated: g, user: E } = o;
1780
1780
  try {
1781
- if (g && T && T.userId) {
1781
+ if (g && E && E.userId) {
1782
1782
  if (c) {
1783
1783
  i("getAccessToken");
1784
- const re = await ge(c);
1785
- if (re && re.payload[A.USER_ID_KEY] !== "")
1784
+ const ae = await ge(c);
1785
+ if (ae && ae.payload[N.USER_ID_KEY] !== "")
1786
1786
  return c;
1787
1787
  }
1788
1788
  i("getAccessToken: invalid access token, trying to refresh it");
1789
- const b = await v.refreshtoken({
1789
+ const b = await L.refreshtoken({
1790
1790
  clientId: r,
1791
- userId: T.userId,
1792
- nonce: U,
1791
+ userId: E.userId,
1792
+ nonce: Q,
1793
1793
  domain: a
1794
1794
  });
1795
- return b.status && b.status === "success" && b.newAccessToken ? (m(b.newAccessToken), w(b.newRefreshToken), b.newAccessToken) : (i(
1795
+ return b.status && b.status === "success" && b.newAccessToken ? (m(b.newAccessToken), T(b.newRefreshToken), b.newAccessToken) : (i(
1796
1796
  "getAccessToken: invalid refresh token, need to re-authenticate"
1797
- ), await x(se), "");
1797
+ ), await S(ie), "");
1798
1798
  }
1799
1799
  return i(
1800
1800
  "getAccessToken: user is not authenticated, cannot get access token"
1801
- ), await x(se), "";
1801
+ ), await S(ie), "";
1802
1802
  } catch {
1803
1803
  return i(
1804
1804
  "getAccessToken: exception occurred, invalidating and logging out"
1805
- ), await x(_a), "";
1805
+ ), await S(ka), "";
1806
1806
  }
1807
- }, D = () => o.isAuthenticated && h ? h : "", B = async () => {
1807
+ }, O = () => o.isAuthenticated && h ? h : "", C = async () => {
1808
1808
  const { user: g } = o;
1809
- let T = await ce({
1809
+ let E = await le({
1810
1810
  accessToken: c,
1811
1811
  clientId: r,
1812
- type: ie.GET_REGISTRATION_OPTIONS,
1812
+ type: ce.GET_REGISTRATION_OPTIONS,
1813
1813
  params: {
1814
1814
  clientId: r,
1815
1815
  id: g == null ? void 0 : g.userId,
1816
1816
  username: g == null ? void 0 : g.username
1817
1817
  }
1818
1818
  });
1819
- if (T.status)
1819
+ if (E.status)
1820
1820
  try {
1821
- const b = await hr(T.data);
1822
- return T = await ce({
1821
+ const b = await pr(E.data);
1822
+ return E = await le({
1823
1823
  accessToken: c,
1824
1824
  clientId: r,
1825
- type: ie.VERIFY_REGISTRATION,
1825
+ type: ce.VERIFY_REGISTRATION,
1826
1826
  params: {
1827
1827
  clientId: r,
1828
1828
  id: g == null ? void 0 : g.userId,
1829
1829
  username: g == null ? void 0 : g.username,
1830
1830
  registration: b
1831
1831
  }
1832
- }), !!(T.status && T.data.length > 0);
1832
+ }), !!(E.status && E.data.length > 0);
1833
1833
  } catch {
1834
- return await ce({
1834
+ return await le({
1835
1835
  accessToken: c,
1836
1836
  clientId: r,
1837
- type: ie.VERIFY_REGISTRATION,
1837
+ type: ce.VERIFY_REGISTRATION,
1838
1838
  params: {
1839
1839
  clientId: r,
1840
1840
  id: g == null ? void 0 : g.userId,
@@ -1844,92 +1844,92 @@ const Pa = (e) => q(
1844
1844
  }), !1;
1845
1845
  }
1846
1846
  return !1;
1847
- }, ee = async () => {
1848
- s({ type: fe, payload: { isLoading: !0 } }), P();
1849
- const g = Ge();
1850
- K(g), i("loginWithPasskey");
1851
- const T = Ge();
1852
- let b = await ce({
1847
+ }, G = async () => {
1848
+ s({ type: fe, payload: { isLoading: !0 } }), B();
1849
+ const g = Ve();
1850
+ D(g), i("loginWithPasskey");
1851
+ const E = Ve();
1852
+ let b = await le({
1853
1853
  accessToken: c,
1854
1854
  clientId: r,
1855
- type: ie.GET_AUTHENTICATION_OPTIONS,
1855
+ type: ce.GET_AUTHENTICATION_OPTIONS,
1856
1856
  params: {
1857
- id: T,
1857
+ id: E,
1858
1858
  clientId: r
1859
1859
  }
1860
1860
  });
1861
1861
  if (b.status)
1862
1862
  try {
1863
- const re = await gr(b.data);
1864
- return b = await ce({
1863
+ const ae = await yr(b.data);
1864
+ return b = await le({
1865
1865
  accessToken: c,
1866
1866
  clientId: r,
1867
- type: ie.VERIFY_AUTHENTICATION,
1867
+ type: ce.VERIFY_AUTHENTICATION,
1868
1868
  params: {
1869
1869
  clientId: r,
1870
- id: T,
1871
- authentication: re,
1870
+ id: E,
1871
+ authentication: ae,
1872
1872
  nonce: g,
1873
1873
  domain: a,
1874
1874
  sessionExpiration: t,
1875
1875
  ua: navigator.userAgent
1876
1876
  }
1877
- }), b.data.status === be ? (p(b.data.idToken), m(b.data.accessToken), w(b.data.refreshToken), s({
1877
+ }), b.data.status === be ? (f(b.data.idToken), m(b.data.accessToken), T(b.data.refreshToken), s({
1878
1878
  type: ke,
1879
1879
  payload: {
1880
- authenticationType: ue.PASSKEY,
1880
+ authenticationType: me.PASSKEY,
1881
1881
  user: {
1882
1882
  userId: b.data.userId,
1883
1883
  username: b.data.username,
1884
1884
  email: b.data.email
1885
1885
  }
1886
1886
  }
1887
- }), !0) : (W(Je), !1);
1887
+ }), !0) : (U(Ye), !1);
1888
1888
  } catch {
1889
- return await ce({
1889
+ return await le({
1890
1890
  accessToken: c,
1891
1891
  clientId: r,
1892
- type: ie.VERIFY_AUTHENTICATION,
1892
+ type: ce.VERIFY_AUTHENTICATION,
1893
1893
  params: {
1894
1894
  clientId: r,
1895
- id: T,
1895
+ id: E,
1896
1896
  authentication: {},
1897
1897
  nonce: g,
1898
1898
  domain: a,
1899
1899
  sessionExpiration: t
1900
1900
  }
1901
- }), W(Je), !1;
1901
+ }), U(Ye), !1;
1902
1902
  }
1903
1903
  return !1;
1904
1904
  };
1905
- return /* @__PURE__ */ l(Da.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ l(
1905
+ return /* @__PURE__ */ l(La.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ l(
1906
1906
  jt.Provider,
1907
1907
  {
1908
1908
  value: {
1909
1909
  ...o,
1910
- login: pe,
1911
- logout: Z,
1912
- getAccessToken: R,
1913
- getIdToken: D,
1914
- registeringForPasskey: B,
1915
- loginWithPasskey: ee
1910
+ login: $,
1911
+ logout: K,
1912
+ getAccessToken: I,
1913
+ getIdToken: O,
1914
+ registeringForPasskey: C,
1915
+ loginWithPasskey: G
1916
1916
  },
1917
1917
  children: e
1918
1918
  }
1919
1919
  ) });
1920
- }, zt = (e = jt) => Tt(e), co = "user", lo = "assistant", uo = "system", mo = "internal", ho = "hidden", po = "I'm having trouble right now. Please try again later.", fo = "OpenAI", go = "OpenAI", yo = "Anthropic", bo = "action-message", Eo = "action-reset", wo = "action-model", To = "action-restore", Io = "action-streaming", So = "action-search", _o = "action-sort", ko = "action-toggle-prompt", Ao = "action-reset-prompt", Ro = "sassy-saint-", No = "details", vo = "search", xo = "sort", Co = "private-disclosure", Oo = "==stats==", $a = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Po = 10, Do = 30, Lo = "av-prompt", Mo = "av-prompt-editable", $o = "size-4", yt = (e) => Number.isFinite(e) ? e : 0;
1921
- function Ua(e) {
1920
+ }, zt = (e = jt) => It(e), yo = "user", bo = "assistant", Eo = "system", wo = "internal", To = "hidden", Io = "I'm having trouble right now. Please try again later.", So = "OpenAI", _o = "OpenAI", ko = "Anthropic", Ao = "action-message", Ro = "action-reset", No = "action-model", vo = "action-restore", xo = "action-streaming", Oo = "action-search", Co = "action-sort", Po = "action-toggle-prompt", Do = "action-reset-prompt", Lo = "sassy-saint-", $o = "details", Mo = "search", Uo = "sort", Ko = "private-disclosure", Ho = "==stats==", Ua = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Wo = 10, Bo = 30, Go = "av-prompt", Jo = "av-prompt-editable", Vo = "size-4", bt = (e) => Number.isFinite(e) ? e : 0;
1921
+ function Ka(e) {
1922
1922
  return {
1923
1923
  days: Math.trunc(e / 864e5),
1924
1924
  hours: Math.trunc(e / 36e5 % 24),
1925
1925
  minutes: Math.trunc(e / 6e4 % 60),
1926
1926
  seconds: Math.trunc(e / 1e3 % 60),
1927
1927
  milliseconds: Math.trunc(e % 1e3),
1928
- microseconds: Math.trunc(yt(e * 1e3) % 1e3),
1929
- nanoseconds: Math.trunc(yt(e * 1e6) % 1e3)
1928
+ microseconds: Math.trunc(bt(e * 1e3) % 1e3),
1929
+ nanoseconds: Math.trunc(bt(e * 1e6) % 1e3)
1930
1930
  };
1931
1931
  }
1932
- function Ka(e) {
1932
+ function Ha(e) {
1933
1933
  return {
1934
1934
  days: e / 86400000n,
1935
1935
  hours: e / 3600000n % 24n,
@@ -1940,20 +1940,20 @@ function Ka(e) {
1940
1940
  nanoseconds: 0n
1941
1941
  };
1942
1942
  }
1943
- function Ha(e) {
1943
+ function Wa(e) {
1944
1944
  switch (typeof e) {
1945
1945
  case "number": {
1946
1946
  if (Number.isFinite(e))
1947
- return Ua(e);
1947
+ return Ka(e);
1948
1948
  break;
1949
1949
  }
1950
1950
  case "bigint":
1951
- return Ka(e);
1951
+ return Ha(e);
1952
1952
  }
1953
1953
  throw new TypeError("Expected a finite number or bigint");
1954
1954
  }
1955
- const Wa = (e) => e === 0 || e === 0n, Ba = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Ga = 1e-7, Ja = 24n * 60n * 60n * 1000n;
1956
- function Va(e, t) {
1955
+ const Ba = (e) => e === 0 || e === 0n, Ga = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Ja = 1e-7, Va = 24n * 60n * 60n * 1000n;
1956
+ function Ya(e, t) {
1957
1957
  const r = typeof e == "bigint";
1958
1958
  if (!r && !Number.isFinite(e))
1959
1959
  throw new TypeError("Expected a finite number or bigint");
@@ -1961,35 +1961,35 @@ function Va(e, t) {
1961
1961
  const a = e < 0 ? "-" : "";
1962
1962
  e = e < 0 ? -e : e, 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);
1963
1963
  let n = [];
1964
- const o = (p, u) => {
1965
- const c = Math.floor(p * 10 ** u + Ga);
1964
+ const o = (f, u) => {
1965
+ const c = Math.floor(f * 10 ** u + Ja);
1966
1966
  return (Math.round(c) / 10 ** u).toFixed(u);
1967
- }, s = (p, u, c, m) => {
1968
- if (!((n.length === 0 || !t.colonNotation) && Wa(p) && !(t.colonNotation && c === "m"))) {
1969
- if (m ?? (m = String(p)), t.colonNotation) {
1970
- const y = m.includes(".") ? m.split(".")[0].length : m.length, E = n.length > 0 ? 2 : 1;
1971
- m = "0".repeat(Math.max(0, E - y)) + m;
1967
+ }, s = (f, u, c, m) => {
1968
+ if (!((n.length === 0 || !t.colonNotation) && Ba(f) && !(t.colonNotation && c === "m"))) {
1969
+ if (m ?? (m = String(f)), t.colonNotation) {
1970
+ const y = m.includes(".") ? m.split(".")[0].length : m.length, w = n.length > 0 ? 2 : 1;
1971
+ m = "0".repeat(Math.max(0, w - y)) + m;
1972
1972
  } else
1973
- m += t.verbose ? " " + Ba(u, p) : c;
1973
+ m += t.verbose ? " " + Ga(u, f) : c;
1974
1974
  n.push(m);
1975
1975
  }
1976
- }, i = Ha(e), d = BigInt(i.days);
1976
+ }, i = Wa(e), d = BigInt(i.days);
1977
1977
  if (t.hideYearAndDays ? s(BigInt(d) * 24n + BigInt(i.hours), "hour", "h") : (t.hideYear ? s(d, "day", "d") : (s(d / 365n, "year", "y"), s(d % 365n, "day", "d")), s(Number(i.hours), "hour", "h")), s(Number(i.minutes), "minute", "m"), !t.hideSeconds)
1978
1978
  if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
1979
- const p = Number(i.seconds), u = Number(i.milliseconds), c = Number(i.microseconds), m = Number(i.nanoseconds);
1980
- if (s(p, "second", "s"), t.formatSubMilliseconds)
1979
+ const f = Number(i.seconds), u = Number(i.milliseconds), c = Number(i.microseconds), m = Number(i.nanoseconds);
1980
+ if (s(f, "second", "s"), t.formatSubMilliseconds)
1981
1981
  s(u, "millisecond", "ms"), s(c, "microsecond", "µs"), s(m, "nanosecond", "ns");
1982
1982
  else {
1983
- const y = u + c / 1e3 + m / 1e6, E = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, w = y >= 1 ? Math.round(y) : Math.ceil(y), I = E ? y.toFixed(E) : w;
1983
+ const y = u + c / 1e3 + m / 1e6, w = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, T = y >= 1 ? Math.round(y) : Math.ceil(y), k = w ? y.toFixed(w) : T;
1984
1984
  s(
1985
- Number.parseFloat(I),
1985
+ Number.parseFloat(k),
1986
1986
  "millisecond",
1987
1987
  "ms",
1988
- I
1988
+ k
1989
1989
  );
1990
1990
  }
1991
1991
  } else {
1992
- const p = (r ? Number(e % Ja) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, c = o(p, u), m = t.keepDecimalsOnWholeSeconds ? c : c.replace(/\.0+$/, "");
1992
+ const f = (r ? Number(e % Va) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, c = o(f, u), m = t.keepDecimalsOnWholeSeconds ? c : c.replace(/\.0+$/, "");
1993
1993
  s(Number.parseFloat(m), "second", "s", m);
1994
1994
  }
1995
1995
  if (n.length === 0)
@@ -1997,7 +1997,7 @@ function Va(e, t) {
1997
1997
  const h = t.colonNotation ? ":" : " ";
1998
1998
  return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(h);
1999
1999
  }
2000
- const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.local.com" : "gizmette.com", Uo = async () => {
2000
+ const Fa = process.env.NODE_ENV === "production", ja = !Fa, za = ja ? "gizmette.local.com" : "gizmette.com", Yo = async () => {
2001
2001
  const e = {
2002
2002
  /**
2003
2003
  * A boolean value that indicates the application would
@@ -2046,56 +2046,63 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2046
2046
  e
2047
2047
  );
2048
2048
  });
2049
- }, Ko = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ l("dl", { className: "my-0", children: /* @__PURE__ */ O("div", { className: "flex items-center justify-between", children: [
2049
+ }, Fo = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ l("dl", { className: "my-0", children: /* @__PURE__ */ M("div", { className: "flex items-center justify-between", children: [
2050
2050
  /* @__PURE__ */ l("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
2051
2051
  /* @__PURE__ */ l("dd", { className: "my-1 inline-block", children: t[r] })
2052
- ] }) }, `${e}-${r}`)) : null, Ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Wo = (e) => e > 0 ? Va(e, {
2052
+ ] }) }, `${e}-${r}`)) : null, jo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, zo = (e) => e > 0 ? Ya(e, {
2053
2053
  secondsDecimalDigits: 2,
2054
2054
  unitCount: 2
2055
- }) : "N/A", za = ({
2055
+ }) : "N/A", qa = ({
2056
2056
  isAuthenticated: e,
2057
2057
  extraClass: t
2058
- }) => f(
2058
+ }) => p(
2059
2059
  "flex-1 overflow-y-auto bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
2060
2060
  e ? "pt-0" : "pt-10",
2061
2061
  t
2062
- ), qa = ({
2062
+ ), Xa = ({
2063
2063
  extraClass: e
2064
- }) => f("px-2 sm:px-0", e), Bo = (e, t) => t === 1 ? e : `${e}s`, Go = (e, t) => {
2064
+ }) => p("px-2 sm:px-0", e), qo = (e, t) => t === 1 ? e : `${e}s`, Xo = (e, t) => {
2065
2065
  let r;
2066
2066
  return (...a) => {
2067
2067
  window.clearTimeout(r), r = window.setTimeout(() => e(...a), t);
2068
2068
  };
2069
- }, bt = "av-button", Le = "icon", tt = "button", ze = "link", Xa = ({
2069
+ }, Et = "av-button", Ue = "icon", at = "button", Qe = "link", Qa = ({
2070
2070
  type: e,
2071
2071
  size: t,
2072
2072
  labelRight: r,
2073
2073
  labelLeft: a,
2074
- align: n
2074
+ align: n,
2075
+ animated: o
2075
2076
  }) => {
2076
- const o = "max-h-8 py-0 px-2", s = "max-h-9 h-8 px-3", i = "max-h-12 py-2 px-4";
2077
+ const s = "max-h-8 py-0 px-2", i = "max-h-9 h-8 px-3", d = "max-h-12 py-2 px-4";
2077
2078
  switch (e) {
2078
- case tt:
2079
- case ze:
2080
- return f({
2081
- [o]: t === "small",
2082
- [s]: t === "medium",
2083
- [i]: t === "large"
2079
+ case at:
2080
+ case Qe:
2081
+ return p({
2082
+ [s]: t === "small",
2083
+ [i]: t === "medium",
2084
+ [d]: t === "large"
2084
2085
  });
2085
- case Le:
2086
- return f("inline-flex items-center", {
2086
+ case Ue:
2087
+ return p("inline-flex items-center", {
2087
2088
  "justify-center": n === "center",
2088
2089
  "justify-start": n === "left",
2089
2090
  "justify-end": n === "right",
2090
- "h-6 w-6 p-0": t === "small" && !(r || a),
2091
- "h-6 px-2": t === "small" && (r || a),
2092
- "h-8 w-8 p-1": t === "medium" && !(r || a),
2093
- "h-8 px-3": t === "medium" && (r || a),
2094
- "h-12 w-12 p-2": t === "large" && !(r || a),
2095
- "h-12 px-4": t === "large" && (r || a)
2091
+ "h-6 w-6 p-0": t === "small" && !o && !(r || a),
2092
+ "h-6 px-2": t === "small" && !o && (r || a),
2093
+ "h-8 w-8 p-1": t === "medium" && !o && !(r || a),
2094
+ "h-8 px-3": t === "medium" && !o && (r || a),
2095
+ "h-12 w-12 p-2": t === "large" && !o && !(r || a),
2096
+ "h-12 px-4": t === "large" && !o && (r || a),
2097
+ "h-6 py-0": t === "small" && o && !(r || a),
2098
+ "h-6": t === "small" && o && (r || a),
2099
+ "h-8 py-1": t === "medium" && o && !(r || a),
2100
+ "h-8": t === "medium" && o && (r || a),
2101
+ "h-12 py-2": t === "large" && o && !(r || a),
2102
+ "h-12": t === "large" && o && (r || a)
2096
2103
  });
2097
2104
  }
2098
- }, Qa = ({
2105
+ }, Za = ({
2099
2106
  type: e,
2100
2107
  size: t,
2101
2108
  labelRight: r,
@@ -2103,22 +2110,22 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2103
2110
  }) => {
2104
2111
  const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
2105
2112
  switch (e) {
2106
- case tt:
2107
- case ze:
2108
- return f({
2109
- "text-center": e === ze,
2113
+ case at:
2114
+ case Qe:
2115
+ return p({
2116
+ "text-center": e === Qe,
2110
2117
  [n]: t === "small",
2111
2118
  [o]: t === "medium",
2112
2119
  [s]: t === "large"
2113
2120
  });
2114
- case Le:
2115
- return f({
2121
+ case Ue:
2122
+ return p({
2116
2123
  [n]: t === "small" && (r || a),
2117
2124
  [o]: t === "medium" && (r || a),
2118
2125
  [s]: t === "large" && (r || a)
2119
2126
  });
2120
2127
  }
2121
- }, Za = ({
2128
+ }, en = ({
2122
2129
  mode: e,
2123
2130
  noBackground: t,
2124
2131
  noTruncate: r,
@@ -2127,7 +2134,7 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2127
2134
  if (t)
2128
2135
  return "not-prose";
2129
2136
  if (a === "primary")
2130
- return f("not-prose", {
2137
+ return p("not-prose", {
2131
2138
  truncate: !r,
2132
2139
  "text-copy-light": e === "dark" || e === "system",
2133
2140
  "text-copy-lighter": e === "light" || e === "alt-system",
@@ -2135,7 +2142,7 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2135
2142
  "dark:text-copy-light": e === "alt-system"
2136
2143
  });
2137
2144
  if (a === "secondary")
2138
- return f("not-prose", {
2145
+ return p("not-prose", {
2139
2146
  truncate: !r,
2140
2147
  "text-copy-light": e === "light" || e === "system",
2141
2148
  "text-copy-lighter": e === "dark" || e === "alt-system",
@@ -2143,7 +2150,7 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2143
2150
  "dark:text-copy-light": e === "system"
2144
2151
  });
2145
2152
  if (a === "danger")
2146
- return f("not-prose", {
2153
+ return p("not-prose", {
2147
2154
  truncate: !r,
2148
2155
  "text-copy-light": e === "dark" || e === "system",
2149
2156
  "text-copy-lighter": e === "light" || e === "alt-system",
@@ -2151,31 +2158,31 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2151
2158
  "dark:text-copy-light": e === "alt-system"
2152
2159
  });
2153
2160
  if (a === "selected")
2154
- return f("not-prose text-copy-lighter", {
2161
+ return p("not-prose text-copy-lighter", {
2155
2162
  truncate: !r
2156
2163
  });
2157
- }, en = ({
2164
+ }, tn = ({
2158
2165
  mode: e,
2159
2166
  noBackground: t,
2160
2167
  variant: r
2161
2168
  }) => {
2162
2169
  if (!t) {
2163
2170
  if (r === "primary")
2164
- return f({
2171
+ return p({
2165
2172
  "bg-action-dark": e === "dark",
2166
2173
  "bg-action-light": e === "light",
2167
2174
  "bg-action-dark dark:bg-action-light": e === "system",
2168
2175
  "bg-action-light dark:bg-action-dark": e === "alt-system"
2169
2176
  });
2170
2177
  if (r === "secondary")
2171
- return f({
2178
+ return p({
2172
2179
  "bg-action-dark": e === "light",
2173
2180
  "bg-action-light": e === "dark",
2174
2181
  "bg-action-dark dark:bg-action-light": e === "alt-system",
2175
2182
  "bg-action-light dark:bg-action-dark": e === "system"
2176
2183
  });
2177
2184
  if (r === "danger")
2178
- return f({
2185
+ return p({
2179
2186
  "bg-action-danger-dark": e === "dark",
2180
2187
  "bg-action-danger-light": e === "light",
2181
2188
  "bg-action-danger-dark dark:bg-action-danger-light": e === "system",
@@ -2184,13 +2191,13 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2184
2191
  if (r === "selected")
2185
2192
  return "bg-action-selected-dark";
2186
2193
  }
2187
- }, tn = ({
2194
+ }, rn = ({
2188
2195
  radius: e
2189
- }) => f({
2196
+ }) => p({
2190
2197
  "rounded-full": e === "large",
2191
2198
  "rounded-md": e === "medium",
2192
2199
  "rounded-sm": e === "small"
2193
- }), rn = ({
2200
+ }), an = ({
2194
2201
  mode: e,
2195
2202
  disabled: t,
2196
2203
  variant: r
@@ -2198,21 +2205,21 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2198
2205
  if (t)
2199
2206
  return "";
2200
2207
  if (r === "primary")
2201
- return f("hover:text-copy-light-hover", {
2208
+ return p("hover:text-copy-light-hover", {
2202
2209
  "hover:bg-action-dark-hover": e === "dark",
2203
2210
  "hover:bg-action-light-hover": e === "light",
2204
2211
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
2205
2212
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
2206
2213
  });
2207
2214
  if (r === "secondary")
2208
- return f("hover:text-copy-light-hover", {
2215
+ return p("hover:text-copy-light-hover", {
2209
2216
  "hover:bg-action-dark-hover": e === "light",
2210
2217
  "hover:bg-action-light-hover": e === "dark",
2211
2218
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
2212
2219
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
2213
2220
  });
2214
2221
  if (r === "danger")
2215
- return f("hover:text-copy-light-hover", {
2222
+ return p("hover:text-copy-light-hover", {
2216
2223
  "hover:bg-action-danger-dark-hover": e === "dark",
2217
2224
  "hover:bg-action-danger-light-hover": e === "light",
2218
2225
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
@@ -2220,7 +2227,7 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2220
2227
  });
2221
2228
  if (r === "selected")
2222
2229
  return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
2223
- }, an = ({
2230
+ }, nn = ({
2224
2231
  mode: e,
2225
2232
  disabled: t,
2226
2233
  variant: r
@@ -2228,21 +2235,21 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2228
2235
  if (t)
2229
2236
  return "";
2230
2237
  if (r === "primary")
2231
- return f("active:text-copy-light-active", {
2238
+ return p("active:text-copy-light-active", {
2232
2239
  "active:bg-action-dark-active": e === "dark",
2233
2240
  "active:bg-action-light-active": e === "light",
2234
2241
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
2235
2242
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
2236
2243
  });
2237
2244
  if (r === "secondary")
2238
- return f("active:text-copy-light-active", {
2245
+ return p("active:text-copy-light-active", {
2239
2246
  "active:bg-action-dark-active": e === "light",
2240
2247
  "active:bg-action-light-active": e === "dark",
2241
2248
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
2242
2249
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
2243
2250
  });
2244
2251
  if (r === "danger")
2245
- return f("active:text-copy-lighter-active", {
2252
+ return p("active:text-copy-lighter-active", {
2246
2253
  "active:bg-action-danger-dark-active": e === "dark",
2247
2254
  "active:bg-action-danger-light-active": e === "light",
2248
2255
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
@@ -2250,7 +2257,7 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2250
2257
  });
2251
2258
  if (r === "selected")
2252
2259
  return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
2253
- }, nn = ({
2260
+ }, on = ({
2254
2261
  mode: e,
2255
2262
  noBorder: t,
2256
2263
  variant: r
@@ -2258,21 +2265,21 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2258
2265
  if (t)
2259
2266
  return "border border-transparent";
2260
2267
  if (r === "primary")
2261
- return f("border", {
2268
+ return p("border", {
2262
2269
  "border-border-dark": e === "dark",
2263
2270
  "border-border-accent": e === "light",
2264
2271
  "border-border-dark dark:border-border-accent": e === "system",
2265
2272
  "border-border-accent dark:border-border-dark": e === "alt-system"
2266
2273
  });
2267
2274
  if (r === "secondary")
2268
- return f("border", {
2275
+ return p("border", {
2269
2276
  "border-border-dark": e === "light",
2270
2277
  "border-border-accent": e === "dark",
2271
2278
  "border-border-dark dark:border-border-accent": e === "alt-system",
2272
2279
  "border-border-accent dark:border-border-dark": e === "system"
2273
2280
  });
2274
2281
  if (r === "danger")
2275
- return f("border", {
2282
+ return p("border", {
2276
2283
  "border-border-danger-dark": e === "dark",
2277
2284
  "border-border-danger-medium": e === "light",
2278
2285
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
@@ -2280,18 +2287,18 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2280
2287
  });
2281
2288
  if (r === "selected")
2282
2289
  return "border border-border-selected-dark";
2283
- }, on = ({
2290
+ }, sn = ({
2284
2291
  focusMode: e
2285
- }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
2292
+ }) => p("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
2286
2293
  "focus:outline-focus-dark": e === "dark",
2287
2294
  "focus:outline-focus-light": e === "light",
2288
2295
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
2289
2296
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
2290
- }), sn = ({
2297
+ }), cn = ({
2291
2298
  mode: e,
2292
2299
  raw: t,
2293
2300
  iconClassName: r
2294
- }) => t ? "" : f(
2301
+ }) => t ? "" : p(
2295
2302
  {
2296
2303
  "text-copy-accent-dark": e === "light" || e === "alt-system",
2297
2304
  "text-copy-light": e === "dark" || e === "system",
@@ -2299,7 +2306,11 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2299
2306
  "dark:text-copy-accent-dark": e === "system"
2300
2307
  },
2301
2308
  r
2302
- ), rt = ({
2309
+ ), ln = ({
2310
+ animated: e
2311
+ }) => p({
2312
+ "transition-opacity duration-300 ease-in": e
2313
+ }), qt = ({
2303
2314
  type: e,
2304
2315
  className: t,
2305
2316
  raw: r,
@@ -2310,57 +2321,62 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
2310
2321
  size: i,
2311
2322
  noBorder: d,
2312
2323
  labelRight: h,
2313
- labelLeft: p,
2324
+ labelLeft: f,
2314
2325
  noBackground: u,
2315
2326
  variant: c,
2316
2327
  noTruncate: m,
2317
2328
  align: y,
2318
- radius: E
2319
- }) => (c || (c = "primary"), r ? f(bt, t) : f(
2320
- bt,
2321
- Za({
2329
+ radius: w,
2330
+ animated: T
2331
+ }) => (c || (c = "primary"), r ? p(Et, t) : p(
2332
+ Et,
2333
+ en({
2322
2334
  mode: a,
2323
2335
  variant: c,
2324
2336
  noBackground: u,
2325
2337
  noTruncate: m
2326
2338
  }),
2327
- en({ mode: a, noBackground: u, variant: c }),
2328
- tn({ radius: E }),
2329
- Xa({
2339
+ tn({ mode: a, noBackground: u, variant: c }),
2340
+ rn({ radius: w }),
2341
+ Qa({
2330
2342
  type: e,
2331
2343
  size: i,
2332
2344
  labelRight: h,
2333
- labelLeft: p,
2334
- align: y
2345
+ labelLeft: f,
2346
+ align: y,
2347
+ animated: T
2335
2348
  }),
2336
- Qa({ type: e, size: i, labelRight: h, labelLeft: p }),
2337
- nn({ mode: a, variant: c, noBorder: d }),
2338
- on({ focusMode: n }),
2339
- rn({ mode: a, variant: c, disabled: o }),
2349
+ Za({ type: e, size: i, labelRight: h, labelLeft: f }),
2350
+ on({ mode: a, variant: c, noBorder: d }),
2351
+ sn({ focusMode: n }),
2340
2352
  an({ mode: a, variant: c, disabled: o }),
2353
+ nn({ mode: a, variant: c, disabled: o }),
2341
2354
  {
2342
2355
  "w-full": s,
2343
2356
  "disabled:cursor-not-allowed disabled:opacity-50": o
2344
2357
  },
2358
+ p({
2359
+ "transition-[width] duration-300 ease-in-out": e === Ue && T
2360
+ }),
2345
2361
  t
2346
- )), cn = (e, t, r) => {
2362
+ )), dn = (e, t, r) => {
2347
2363
  var a;
2348
2364
  !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);
2349
- }, Me = F.forwardRef((e, t) => {
2365
+ }, nt = X.forwardRef((e, t) => {
2350
2366
  const { onClick: r, noInternalClick: a = !1, ...n } = e;
2351
2367
  return /* @__PURE__ */ l(
2352
2368
  "button",
2353
2369
  {
2354
2370
  ref: t,
2355
2371
  onClick: (o) => {
2356
- cn(o, a, r);
2372
+ dn(o, a, r);
2357
2373
  },
2358
2374
  ...n
2359
2375
  }
2360
2376
  );
2361
2377
  });
2362
- Me.displayName = "BaseButton";
2363
- const qt = F.forwardRef(
2378
+ nt.displayName = "BaseButton";
2379
+ const Xt = X.forwardRef(
2364
2380
  ({
2365
2381
  children: e,
2366
2382
  disabled: t = !1,
@@ -2372,12 +2388,12 @@ const qt = F.forwardRef(
2372
2388
  raw: i = !1,
2373
2389
  noBorder: d = !1,
2374
2390
  variant: h = "primary",
2375
- noTruncate: p = !1,
2391
+ noTruncate: f = !1,
2376
2392
  radius: u = "large",
2377
2393
  ...c
2378
2394
  }, m) => {
2379
- const y = rt({
2380
- type: tt,
2395
+ const y = qt({
2396
+ type: at,
2381
2397
  mode: r,
2382
2398
  focusMode: a,
2383
2399
  fullWidth: n,
@@ -2387,11 +2403,11 @@ const qt = F.forwardRef(
2387
2403
  size: s,
2388
2404
  noBorder: d,
2389
2405
  variant: h,
2390
- noTruncate: p,
2406
+ noTruncate: f,
2391
2407
  radius: u
2392
2408
  });
2393
2409
  return /* @__PURE__ */ l(
2394
- Me,
2410
+ nt,
2395
2411
  {
2396
2412
  ref: m,
2397
2413
  className: y,
@@ -2402,8 +2418,57 @@ const qt = F.forwardRef(
2402
2418
  );
2403
2419
  }
2404
2420
  );
2405
- qt.displayName = "Button";
2406
- const qe = F.forwardRef(
2421
+ Xt.displayName = "Button";
2422
+ function un() {
2423
+ const e = x(!1);
2424
+ return Y(() => (e.current = !0, () => {
2425
+ e.current = !1;
2426
+ }), []), q(() => e.current, []);
2427
+ }
2428
+ function mn(e) {
2429
+ return De(() => e.every((t) => t == null) ? () => {
2430
+ } : (t) => {
2431
+ e.forEach((r) => {
2432
+ typeof r == "function" ? r(t) : r != null && (r.current = t);
2433
+ });
2434
+ }, e);
2435
+ }
2436
+ const hn = {
2437
+ x: 0,
2438
+ y: 0,
2439
+ width: 0,
2440
+ height: 0,
2441
+ top: 0,
2442
+ left: 0,
2443
+ bottom: 0,
2444
+ right: 0
2445
+ };
2446
+ function Fe(e) {
2447
+ const t = un(), r = x(0), a = x(null), [n, o] = z(hn), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
2448
+ const d = i[0];
2449
+ d && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
2450
+ a.current && t() && o(d.contentRect);
2451
+ }));
2452
+ }), [t]);
2453
+ return Y(() => (a.current && (s == null || s.observe(a.current, e)), () => {
2454
+ s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
2455
+ }), [s, e]), [a, n];
2456
+ }
2457
+ const pn = {
2458
+ small: 24,
2459
+ // w-6
2460
+ medium: 32,
2461
+ // w-8
2462
+ large: 48
2463
+ // w-12
2464
+ }, fn = {
2465
+ small: 8 * 2,
2466
+ // px-2 x 2
2467
+ medium: 12 * 2,
2468
+ // px-3 x 2
2469
+ large: 16 * 2
2470
+ // px-4 x 2
2471
+ }, gn = 2, Ce = X.forwardRef(
2407
2472
  ({
2408
2473
  children: e,
2409
2474
  disabled: t = !1,
@@ -2415,19 +2480,20 @@ const qe = F.forwardRef(
2415
2480
  raw: i = !1,
2416
2481
  noBorder: d = !1,
2417
2482
  "aria-label": h,
2418
- label: p,
2483
+ label: f,
2419
2484
  size: u = "medium",
2420
2485
  labelRight: c,
2421
2486
  labelLeft: m,
2422
2487
  noBackground: y = !1,
2423
- align: E = "center",
2424
- radius: w = "large",
2425
- variant: I = "primary",
2426
- iconClassName: U,
2427
- ...K
2428
- }, H) => {
2429
- const v = rt({
2430
- type: Le,
2488
+ align: w = "center",
2489
+ radius: T = "large",
2490
+ variant: k = "primary",
2491
+ iconClassName: Q,
2492
+ animated: D = !1,
2493
+ ...Z
2494
+ }, L) => {
2495
+ const B = qt({
2496
+ type: Ue,
2431
2497
  mode: r,
2432
2498
  focusMode: a,
2433
2499
  fullWidth: n,
@@ -2439,85 +2505,65 @@ const qe = F.forwardRef(
2439
2505
  labelRight: c,
2440
2506
  labelLeft: m,
2441
2507
  noBackground: y,
2442
- align: E,
2443
- radius: w,
2444
- variant: I
2445
- }), P = sn({ mode: r, raw: i, iconClassName: U });
2446
- return /* @__PURE__ */ O(
2447
- Me,
2508
+ align: w,
2509
+ radius: T,
2510
+ variant: k,
2511
+ animated: D
2512
+ }), U = cn({ mode: r, raw: i, iconClassName: Q }), S = ln({ animated: D }), [$, K] = Fe(), [I, O] = Fe(), [C, G] = Fe(), g = x(0), E = x(null), b = mn([L, E]);
2513
+ return Re(() => {
2514
+ C && C.current && D && (g.current = G.width + fn[u] + (d ? 0 : gn));
2515
+ }, [G, C, u, d, D]), Re(() => {
2516
+ E && E.current && D && (c && $ && K.width > 0 ? ($.current && ($.current.style.opacity = "100"), E.current.style.width = `${K.width + g.current}px`) : m && O.width > 0 ? (I.current && (I.current.style.opacity = "100"), E.current.style.width = `${O.width + g.current}px`) : ($.current && ($.current.style.opacity = "0"), I.current && (I.current.style.opacity = "0"), E.current.style.width = `${pn[u]}px`));
2517
+ }, [
2518
+ K,
2519
+ c,
2520
+ $,
2521
+ O,
2522
+ m,
2523
+ I,
2524
+ u,
2525
+ D
2526
+ ]), /* @__PURE__ */ M(
2527
+ nt,
2448
2528
  {
2449
- ref: H,
2450
- className: v,
2529
+ ref: b,
2530
+ className: B,
2451
2531
  disabled: t,
2452
2532
  type: s,
2453
- "aria-label": h || p,
2454
- ...K,
2533
+ "aria-label": h || f,
2534
+ ...Z,
2455
2535
  children: [
2456
- m && /* @__PURE__ */ l("span", { className: "pr-2", children: m }),
2457
- /* @__PURE__ */ l("span", { className: P, children: e }),
2458
- c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
2536
+ /* @__PURE__ */ l("span", { ref: I, className: S, children: m && /* @__PURE__ */ l("span", { className: "pr-2", children: m }) }),
2537
+ /* @__PURE__ */ l("span", { ref: C, className: U, children: e }),
2538
+ /* @__PURE__ */ l("span", { ref: $, className: S, children: c && /* @__PURE__ */ l("span", { className: "pl-2", children: c }) })
2459
2539
  ]
2460
2540
  }
2461
2541
  );
2462
2542
  }
2463
2543
  );
2464
- qe.displayName = "ButtonIcon";
2544
+ Ce.displayName = "ButtonIcon";
2465
2545
  /*!
2466
- @versini/ui-button v4.1.5
2546
+ @versini/ui-button v4.2.2
2467
2547
  © 2025 gizmette.com
2468
2548
  */
2469
2549
  try {
2470
2550
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
2471
- version: "4.1.5",
2472
- buildTime: "01/24/2025 09:19 AM EST",
2551
+ version: "4.2.2",
2552
+ buildTime: "01/26/2025 07:26 PM EST",
2473
2553
  homepage: "https://github.com/aversini/ui-components",
2474
2554
  license: "MIT"
2475
2555
  });
2476
2556
  } catch {
2477
2557
  }
2478
- const ln = F.forwardRef(
2558
+ const yn = X.forwardRef(
2479
2559
  ({
2480
2560
  children: e,
2481
- disabled: t = !1,
2482
- mode: r = "system",
2483
- focusMode: a = "system",
2484
- fullWidth: n = !1,
2485
- className: o,
2486
- type: s = "button",
2487
- raw: i = !1,
2488
- noBorder: d = !1,
2489
- "aria-label": h,
2490
- label: p,
2491
- size: u = "medium",
2492
- labelRight: c,
2493
- labelLeft: m,
2494
- noBackground: y = !1,
2495
- align: E = "center",
2496
- active: w = !1,
2497
- radius: I = "large",
2498
- ...U
2499
- }, K) => {
2500
- const H = rt({
2501
- type: Le,
2502
- mode: r,
2503
- focusMode: a,
2504
- fullWidth: n,
2505
- disabled: t,
2506
- raw: i,
2507
- className: o,
2508
- noBorder: d,
2509
- size: u,
2510
- labelRight: c,
2511
- labelLeft: m,
2512
- noBackground: y,
2513
- align: E,
2514
- radius: I
2515
- }), v = f({
2516
- "text-copy-accent-dark": r === "light" && !i,
2517
- "text-copy-light": r === "dark" && !i,
2518
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
2519
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !i
2520
- }), P = w ? f(
2561
+ mode: t = "system",
2562
+ className: r,
2563
+ active: a = !1,
2564
+ ...n
2565
+ }, o) => {
2566
+ const s = a ? p(
2521
2567
  "relative",
2522
2568
  "focus-within:static",
2523
2569
  "focus-within:after:border-transparent",
@@ -2528,50 +2574,45 @@ const ln = F.forwardRef(
2528
2574
  "after:left-0",
2529
2575
  "after:right-0",
2530
2576
  {
2531
- "after:border-table-dark": r === "dark",
2532
- "after:border-table-light": r === "light",
2533
- "after:border-table-dark dark:after:border-table-light": r === "system",
2534
- "after:border-table-light dark:after:border-table-dark": r === "alt-system"
2577
+ "after:border-table-dark": t === "dark",
2578
+ "after:border-table-light": t === "light",
2579
+ "after:border-table-dark dark:after:border-table-light": t === "system",
2580
+ "after:border-table-light dark:after:border-table-dark": t === "alt-system"
2535
2581
  }
2536
2582
  ) : "";
2537
- return /* @__PURE__ */ l("div", { className: P, children: /* @__PURE__ */ O(
2538
- Me,
2583
+ return /* @__PURE__ */ l("div", { className: s, children: /* @__PURE__ */ l(
2584
+ Ce,
2539
2585
  {
2540
- ref: K,
2541
- className: H,
2542
- disabled: t,
2543
- type: s,
2544
- "aria-label": h || p,
2545
- ...U,
2546
- children: [
2547
- m && /* @__PURE__ */ l("span", { className: "pr-2", children: m }),
2548
- /* @__PURE__ */ l("div", { className: v, children: e }),
2549
- c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
2550
- ]
2586
+ className: p("justify-center", r),
2587
+ ref: o,
2588
+ mode: t,
2589
+ radius: "small",
2590
+ ...n,
2591
+ children: e
2551
2592
  }
2552
2593
  ) });
2553
2594
  }
2554
2595
  );
2555
- ln.displayName = "ButtonSort";
2596
+ yn.displayName = "ButtonSort";
2556
2597
  /*!
2557
- @versini/ui-card v3.0.12
2598
+ @versini/ui-card v3.0.13
2558
2599
  © 2025 gizmette.com
2559
2600
  */
2560
2601
  try {
2561
2602
  window.__VERSINI_UI_CARD__ || (window.__VERSINI_UI_CARD__ = {
2562
- version: "3.0.12",
2563
- buildTime: "01/25/2025 11:56 AM EST",
2603
+ version: "3.0.13",
2604
+ buildTime: "01/25/2025 10:54 PM EST",
2564
2605
  homepage: "https://github.com/aversini/ui-components",
2565
2606
  license: "MIT"
2566
2607
  });
2567
2608
  } catch {
2568
2609
  }
2569
2610
  const Ae = "av-card";
2570
- function dn(e) {
2571
- const t = It();
2611
+ function bn(e) {
2612
+ const t = St();
2572
2613
  return `${e}${t}`;
2573
2614
  }
2574
- const un = ({
2615
+ const En = ({
2575
2616
  className: e,
2576
2617
  headerClassName: t,
2577
2618
  bodyClassName: r,
@@ -2580,7 +2621,7 @@ const un = ({
2580
2621
  compact: o,
2581
2622
  noBorder: s
2582
2623
  }) => {
2583
- const i = f(
2624
+ const i = p(
2584
2625
  Ae,
2585
2626
  "rounded-md",
2586
2627
  {
@@ -2595,7 +2636,7 @@ const un = ({
2595
2636
  "border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": n === "alt-system"
2596
2637
  },
2597
2638
  e
2598
- ), d = t || f(`${Ae}__header mt-0 border-b-2`, {
2639
+ ), d = t || p(`${Ae}__header mt-0 border-b-2`, {
2599
2640
  "text-copy-light border-border-accent": n === "darker",
2600
2641
  "border-border-accent": n === "dark",
2601
2642
  "border-border-medium": n === "light",
@@ -2603,15 +2644,15 @@ const un = ({
2603
2644
  "border-border-accent dark:border-border-medium": n === "alt-system",
2604
2645
  "mb-4": !o,
2605
2646
  "mb-2": o
2606
- }), h = f(r), p = a || f(`${Ae}__footer pt-2`);
2647
+ }), h = p(r), f = a || p(`${Ae}__footer pt-2`);
2607
2648
  return {
2608
2649
  wrapper: i,
2609
2650
  header: d,
2610
2651
  body: h,
2611
- footer: p
2652
+ footer: f
2612
2653
  };
2613
2654
  };
2614
- function mn({
2655
+ function wn({
2615
2656
  id: e,
2616
2657
  content: t,
2617
2658
  userAriaLabelledby: r,
@@ -2619,7 +2660,7 @@ function mn({
2619
2660
  }) {
2620
2661
  return typeof t == "string" ? /* @__PURE__ */ l("h2", { id: e, className: a, children: t }) : r ? /* @__PURE__ */ l("div", { className: a, children: t }) : t ? /* @__PURE__ */ l("div", { className: a, id: e, children: t }) : null;
2621
2662
  }
2622
- const hn = ({
2663
+ const Tn = ({
2623
2664
  header: e,
2624
2665
  headerClassName: t,
2625
2666
  footer: r,
@@ -2630,43 +2671,43 @@ const hn = ({
2630
2671
  "aria-labelledby": i,
2631
2672
  mode: d = "system",
2632
2673
  compact: h = !1,
2633
- noBorder: p = !1,
2674
+ noBorder: f = !1,
2634
2675
  ...u
2635
2676
  }) => {
2636
2677
  let c = null, m = null;
2637
- const y = typeof e == "string", E = dn(Ae), w = un({
2678
+ const y = typeof e == "string", w = bn(Ae), T = En({
2638
2679
  className: o,
2639
2680
  headerClassName: t,
2640
2681
  bodyClassName: s,
2641
2682
  footerClassName: a,
2642
2683
  mode: d,
2643
2684
  compact: h,
2644
- noBorder: p
2685
+ noBorder: f
2645
2686
  });
2646
- return y ? (c = E, m = c) : !y && e && i ? (c = null, m = i) : !y && e && !i ? (c = E, m = c) : (c = null, m = i || null), /* @__PURE__ */ l("div", { className: w.wrapper, children: /* @__PURE__ */ O(
2687
+ return y ? (c = w, m = c) : !y && e && i ? (c = null, m = i) : !y && e && !i ? (c = w, m = c) : (c = null, m = i || null), /* @__PURE__ */ l("div", { className: T.wrapper, children: /* @__PURE__ */ M(
2647
2688
  "section",
2648
2689
  {
2649
2690
  ...m && {
2650
2691
  "aria-labelledby": m
2651
2692
  },
2652
- className: w.body,
2693
+ className: T.body,
2653
2694
  ...u,
2654
2695
  children: [
2655
2696
  /* @__PURE__ */ l(
2656
- mn,
2697
+ wn,
2657
2698
  {
2658
2699
  ...c && { id: c },
2659
2700
  content: e,
2660
- className: w.header,
2701
+ className: T.header,
2661
2702
  userAriaLabelledby: i
2662
2703
  }
2663
2704
  ),
2664
2705
  /* @__PURE__ */ l("div", { children: n }),
2665
- r ? /* @__PURE__ */ l("div", { className: w.footer, children: r }) : null
2706
+ r ? /* @__PURE__ */ l("div", { className: T.footer, children: r }) : null
2666
2707
  ]
2667
2708
  }
2668
2709
  ) });
2669
- }, $e = ({
2710
+ }, Ke = ({
2670
2711
  children: e,
2671
2712
  fill: t,
2672
2713
  viewBox: r,
@@ -2677,8 +2718,8 @@ const hn = ({
2677
2718
  semantic: i = !1,
2678
2719
  ...d
2679
2720
  }) => {
2680
- const h = f(o, a);
2681
- return /* @__PURE__ */ O(Qe, { children: [
2721
+ const h = p(o, a);
2722
+ return /* @__PURE__ */ M(et, { children: [
2682
2723
  /* @__PURE__ */ l(
2683
2724
  "svg",
2684
2725
  {
@@ -2709,14 +2750,14 @@ try {
2709
2750
  });
2710
2751
  } catch {
2711
2752
  }
2712
- const pn = ({
2753
+ const In = ({
2713
2754
  className: e,
2714
2755
  viewBox: t,
2715
2756
  title: r,
2716
2757
  monotone: a,
2717
2758
  ...n
2718
2759
  }) => /* @__PURE__ */ l(
2719
- $e,
2760
+ Ke,
2720
2761
  {
2721
2762
  defaultViewBox: "0 0 1200 500",
2722
2763
  size: "w-full",
@@ -2726,14 +2767,14 @@ const pn = ({
2726
2767
  ...n,
2727
2768
  children: /* @__PURE__ */ l("path", { d: "M927.943 30.81c0-2.381-1.191-5.954-3.573-7.145-7.146-4.763-19.055-1.19-26.2 0-17.864 2.382-34.537 4.764-53.592 4.764-26.2 0-53.591-1.19-79.791-4.764-23.819-3.572-44.064-10.718-69.074-3.572-35.727 9.527-58.355 38.109-57.164 75.028 1.191 21.436-2.382 38.109-9.527 57.164-7.146 17.864-15.482 20.245-32.155 20.245-115.52 0-229.848-1.19-345.367 0h-63.119c-29.773 0-59.546 5.955-89.319 0-21.436-4.763-42.873-15.482-58.355-30.964-3.573-3.572-10.718-14.29-14.29-14.29-4.765 1.19-4.765 15.481-4.765 19.054 0 15.482 5.955 30.964 5.955 46.446s-7.145 28.582-11.91 42.873c-4.763 16.673-4.763 33.346-2.381 50.019 4.764 27.39 9.527 55.973 11.91 84.555 2.381 25.01 2.381 48.828 4.763 73.837 2.382 20.246 3.573 29.773 29.773 33.346 30.964 4.764 30.964-5.955 38.11-26.2 9.527-25.01 17.863-51.21 27.39-76.22 8.337-19.054 15.482-60.736 67.883-40.49 28.582 10.718 58.355 16.672 88.128 25.009 32.155 8.336 65.5 16.673 97.655 22.627 65.501 13.1 132.193 20.246 200.075 23.819 7.146 0 11.91 0 16.673 5.954 17.864 22.628-3.573 63.119 41.682 70.265 40.491 5.954 40.491-22.628 45.255-47.637 2.382-14.291 4.764-27.391 8.337-40.492 1.19-5.954 5.954-11.909 10.718-15.481 55.973-33.346 88.128-98.847 78.6-164.347-1.19-10.719-4.763-21.437-3.572-33.346 2.382-23.819 32.155-33.346 50.018-42.873 22.628-13.1 47.637-25.01 66.692-42.873 13.1-11.91 23.818-27.392 29.773-44.064 3.573-5.955 5.955-14.292 4.764-20.246M737.395 190.395c-2.381 25.01-13.1 36.919-35.727 41.682-40.491 8.337-66.692-19.054-54.783-58.355 8.337-26.2 17.864-51.21 29.773-75.028 11.91-23.818 22.628-23.818 36.919-1.19 17.864 28.581 27.391 59.545 23.818 92.891m38.11-109.564c-7.146 0-13.1-5.955-13.1-13.1 0-7.146 5.954-13.1 13.1-13.1 7.145 0 13.1 5.954 13.1 13.1 0 7.145-5.955 13.1-13.1 13.1" })
2728
2769
  }
2729
- ), fn = ({
2770
+ ), Sn = ({
2730
2771
  className: e,
2731
2772
  viewBox: t,
2732
2773
  title: r,
2733
2774
  monotone: a,
2734
2775
  ...n
2735
- }) => /* @__PURE__ */ O(
2736
- $e,
2776
+ }) => /* @__PURE__ */ M(
2777
+ Ke,
2737
2778
  {
2738
2779
  defaultViewBox: "0 0 640 512",
2739
2780
  size: "size-5",
@@ -2752,7 +2793,7 @@ const pn = ({
2752
2793
  /* @__PURE__ */ l("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.1l-592-464C-1.2 34.7-3.1 19.6 5.1 9.2" })
2753
2794
  ]
2754
2795
  }
2755
- ), gn = ({
2796
+ ), _n = ({
2756
2797
  className: e,
2757
2798
  viewBox: t,
2758
2799
  title: r,
@@ -2760,8 +2801,8 @@ const pn = ({
2760
2801
  ...n
2761
2802
  }) => {
2762
2803
  const o = a ? "1" : "0.4";
2763
- return /* @__PURE__ */ O(
2764
- $e,
2804
+ return /* @__PURE__ */ M(
2805
+ Ke,
2765
2806
  {
2766
2807
  defaultViewBox: "0 0 190 190",
2767
2808
  size: "size-5",
@@ -2788,14 +2829,14 @@ const pn = ({
2788
2829
  ]
2789
2830
  }
2790
2831
  );
2791
- }, yn = ({
2832
+ }, kn = ({
2792
2833
  className: e,
2793
2834
  viewBox: t,
2794
2835
  title: r,
2795
2836
  monotone: a,
2796
2837
  ...n
2797
- }) => /* @__PURE__ */ O(
2798
- $e,
2838
+ }) => /* @__PURE__ */ M(
2839
+ Ke,
2799
2840
  {
2800
2841
  defaultViewBox: "0 0 576 512",
2801
2842
  size: "size-5",
@@ -2829,27 +2870,27 @@ try {
2829
2870
  } catch {
2830
2871
  }
2831
2872
  /*!
2832
- @versini/ui-main v3.0.8
2873
+ @versini/ui-main v3.0.9
2833
2874
  © 2025 gizmette.com
2834
2875
  */
2835
2876
  try {
2836
2877
  window.__VERSINI_UI_MAIN__ || (window.__VERSINI_UI_MAIN__ = {
2837
- version: "3.0.8",
2838
- buildTime: "01/20/2025 01:49 PM EST",
2878
+ version: "3.0.9",
2879
+ buildTime: "01/25/2025 10:54 PM EST",
2839
2880
  homepage: "https://github.com/aversini/ui-components",
2840
2881
  license: "MIT"
2841
2882
  });
2842
2883
  } catch {
2843
2884
  }
2844
- const bn = "av-main", En = ({
2885
+ const An = "av-main", Rn = ({
2845
2886
  children: e,
2846
2887
  className: t,
2847
2888
  raw: r = !1,
2848
2889
  noMargin: a = !1,
2849
2890
  noPadding: n = !1
2850
2891
  }) => {
2851
- const o = f(
2852
- bn,
2892
+ const o = p(
2893
+ An,
2853
2894
  {
2854
2895
  "mt-2 sm:mt-3": !r && !a,
2855
2896
  "p-2": !r && !n,
@@ -2858,10 +2899,10 @@ const bn = "av-main", En = ({
2858
2899
  t
2859
2900
  );
2860
2901
  return /* @__PURE__ */ l("main", { className: o, children: e });
2861
- }, wn = "av-flexgrid", _e = "av-flexgrid-item", Ce = 0.25, Xe = F.createContext({
2902
+ }, Nn = "av-flexgrid", _e = "av-flexgrid-item", Pe = 0.25, Ze = X.createContext({
2862
2903
  columnGap: 0,
2863
2904
  rowGap: 0
2864
- }), Tn = ({
2905
+ }), vn = ({
2865
2906
  children: e,
2866
2907
  className: t,
2867
2908
  columnGap: r = 1,
@@ -2873,7 +2914,7 @@ const bn = "av-main", En = ({
2873
2914
  alignVertical: d = "normal",
2874
2915
  ...h
2875
2916
  }) => {
2876
- const p = {
2917
+ const f = {
2877
2918
  flexDirection: s,
2878
2919
  justifyContent: i,
2879
2920
  alignItems: d,
@@ -2884,14 +2925,14 @@ const bn = "av-main", En = ({
2884
2925
  * by the columnGap and rowGap that will be applied
2885
2926
  * to all FlexgridItems (see context and paddings).
2886
2927
  */
2887
- marginLeft: r * -1 * Ce + "rem",
2888
- marginTop: a * -1 * Ce + "rem"
2889
- }, u = f(
2890
- wn,
2928
+ marginLeft: r * -1 * Pe + "rem",
2929
+ marginTop: a * -1 * Pe + "rem"
2930
+ }, u = p(
2931
+ Nn,
2891
2932
  "box-border flex flex-wrap"
2892
2933
  ), c = { columnGap: r, rowGap: a };
2893
- return t ? /* @__PURE__ */ l("div", { className: t, children: /* @__PURE__ */ l("div", { className: u, style: p, ...h, children: /* @__PURE__ */ l(Xe.Provider, { value: c, children: e }) }) }) : /* @__PURE__ */ l("div", { className: u, style: p, ...h, children: /* @__PURE__ */ l(Xe.Provider, { value: c, children: e }) });
2894
- }, Ve = (e, t) => f({
2934
+ return t ? /* @__PURE__ */ l("div", { className: t, children: /* @__PURE__ */ l("div", { className: u, style: f, ...h, children: /* @__PURE__ */ l(Ze.Provider, { value: c, children: e }) }) }) : /* @__PURE__ */ l("div", { className: u, style: f, ...h, children: /* @__PURE__ */ l(Ze.Provider, { value: c, children: e }) });
2935
+ }, je = (e, t) => p({
2895
2936
  "basis-1/12": e === 1 && !t,
2896
2937
  "sm:basis-1/12": e === 1 && t === "sm",
2897
2938
  "md:basis-1/12": e === 1 && t === "md",
@@ -2964,65 +3005,65 @@ const bn = "av-main", En = ({
2964
3005
  "lg:basis-full": e === 12 && t === "lg",
2965
3006
  "xl:basis-full": e === 12 && t === "xl",
2966
3007
  "2xl:basis-full": e === 12 && t === "2xl"
2967
- }), In = ({
3008
+ }), xn = ({
2968
3009
  className: e,
2969
3010
  span: t
2970
3011
  }) => {
2971
3012
  if (!t)
2972
- return f(e, _e, "box-border basis-auto");
3013
+ return p(e, _e, "box-border basis-auto");
2973
3014
  if (typeof t == "number")
2974
- return f(e, _e, "box-border max-w-full", {
2975
- [`${Ve(t)}`]: !0
3015
+ return p(e, _e, "box-border max-w-full", {
3016
+ [`${je(t)}`]: !0
2976
3017
  });
2977
3018
  if (typeof t == "string")
2978
- return f(e, _e, "box-border basis-auto", {
3019
+ return p(e, _e, "box-border basis-auto", {
2979
3020
  "max-w-full grow": t === "auto"
2980
3021
  });
2981
3022
  if (typeof t == "object") {
2982
- const r = Object.entries(t).map(([a, n]) => a === "fallback" ? Ve(n) : Ve(n, a));
2983
- return f(
3023
+ const r = Object.entries(t).map(([a, n]) => a === "fallback" ? je(n) : je(n, a));
3024
+ return p(
2984
3025
  e,
2985
3026
  _e,
2986
3027
  "box-border",
2987
3028
  r
2988
3029
  );
2989
3030
  }
2990
- }, te = ({
3031
+ }, re = ({
2991
3032
  children: e,
2992
3033
  className: t,
2993
3034
  span: r,
2994
3035
  ...a
2995
3036
  }) => {
2996
- const { columnGap: n, rowGap: o } = Tt(Xe), s = {
2997
- paddingLeft: n * Ce + "rem",
2998
- paddingTop: o * Ce + "rem"
2999
- }, i = In({
3037
+ const { columnGap: n, rowGap: o } = It(Ze), s = {
3038
+ paddingLeft: n * Pe + "rem",
3039
+ paddingTop: o * Pe + "rem"
3040
+ }, i = xn({
3000
3041
  className: t,
3001
3042
  span: r
3002
3043
  });
3003
3044
  return /* @__PURE__ */ l("div", { className: i, style: s, ...a, children: e });
3004
3045
  };
3005
3046
  /*!
3006
- @versini/ui-system v3.0.7
3047
+ @versini/ui-system v3.0.8
3007
3048
  © 2025 gizmette.com
3008
3049
  */
3009
3050
  try {
3010
3051
  window.__VERSINI_UI_SYSTEM__ || (window.__VERSINI_UI_SYSTEM__ = {
3011
- version: "3.0.7",
3012
- buildTime: "01/20/2025 01:49 PM EST",
3052
+ version: "3.0.8",
3053
+ buildTime: "01/25/2025 10:54 PM EST",
3013
3054
  homepage: "https://github.com/aversini/ui-components",
3014
3055
  license: "MIT"
3015
3056
  });
3016
3057
  } catch {
3017
3058
  }
3018
- const Xt = "av-text-input", Sn = "av-text-input-wrapper", Ye = "av-text-input-helper-text";
3019
- function _n() {
3020
- const e = $(!1);
3021
- return Q(() => (e.current = !0, () => {
3059
+ const Qt = "av-text-input", On = "av-text-input-wrapper", ze = "av-text-input-helper-text";
3060
+ function Cn() {
3061
+ const e = x(!1);
3062
+ return Y(() => (e.current = !0, () => {
3022
3063
  e.current = !1;
3023
3064
  }), []), q(() => e.current, []);
3024
3065
  }
3025
- const kn = {
3066
+ const Pn = {
3026
3067
  x: 0,
3027
3068
  y: 0,
3028
3069
  width: 0,
@@ -3032,19 +3073,19 @@ const kn = {
3032
3073
  bottom: 0,
3033
3074
  right: 0
3034
3075
  };
3035
- function An(e) {
3036
- const t = _n(), r = $(0), a = $(null), [n, o] = z(kn), s = St(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
3076
+ function Dn(e) {
3077
+ const t = Cn(), r = x(0), a = x(null), [n, o] = z(Pn), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
3037
3078
  const d = i[0];
3038
3079
  d && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
3039
3080
  a.current && t() && o(d.contentRect);
3040
3081
  }));
3041
3082
  }), [t]);
3042
- return Q(() => (a.current && (s == null || s.observe(a.current, e)), () => {
3083
+ return Y(() => (a.current && (s == null || s.observe(a.current, e)), () => {
3043
3084
  s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
3044
3085
  }), [s, e]), [a, n];
3045
3086
  }
3046
- function Rn(e) {
3047
- const t = It();
3087
+ function Ln(e) {
3088
+ const t = St();
3048
3089
  if (!e)
3049
3090
  return t;
3050
3091
  if (typeof e == "number" || typeof e == "string")
@@ -3054,7 +3095,7 @@ function Rn(e) {
3054
3095
  return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
3055
3096
  }
3056
3097
  }
3057
- const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", Nn = {
3098
+ const Zt = "SET_ANNOUNCEMENT", er = "CLEAR_ANNOUNCEMENT", $n = {
3058
3099
  alert: null,
3059
3100
  alertdialog: null,
3060
3101
  log: "polite",
@@ -3062,14 +3103,14 @@ const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", Nn = {
3062
3103
  progressbar: null,
3063
3104
  status: "polite",
3064
3105
  timer: "assertive"
3065
- }, vn = (e, t) => {
3106
+ }, Mn = (e, t) => {
3066
3107
  switch (t == null ? void 0 : t.type) {
3067
- case Qt:
3108
+ case Zt:
3068
3109
  return {
3069
3110
  ...e,
3070
3111
  announcement: t.payload
3071
3112
  };
3072
- case Zt:
3113
+ case er:
3073
3114
  return {
3074
3115
  ...e,
3075
3116
  announcement: null
@@ -3077,14 +3118,14 @@ const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", Nn = {
3077
3118
  default:
3078
3119
  return e;
3079
3120
  }
3080
- }, xn = ({
3121
+ }, Un = ({
3081
3122
  onAnnouncementClear: e,
3082
3123
  dispatch: t
3083
3124
  }) => {
3084
3125
  t({
3085
- type: Zt
3126
+ type: er
3086
3127
  }), typeof e == "function" && e();
3087
- }, Et = ({
3128
+ }, wt = ({
3088
3129
  children: e,
3089
3130
  clearAnnouncementDelay: t,
3090
3131
  clearAnnouncementTimeoutRef: r,
@@ -3092,16 +3133,16 @@ const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", Nn = {
3092
3133
  dispatch: n
3093
3134
  }) => {
3094
3135
  clearTimeout(r.current), e !== null && n({
3095
- type: Qt,
3136
+ type: Zt,
3096
3137
  payload: e
3097
3138
  }), t && (r.current = setTimeout(
3098
- () => xn({
3139
+ () => Un({
3099
3140
  onAnnouncementClear: a,
3100
3141
  dispatch: n
3101
3142
  }),
3102
3143
  t
3103
3144
  ));
3104
- }, Cn = ({
3145
+ }, Kn = ({
3105
3146
  children: e,
3106
3147
  announcementTimeoutRef: t,
3107
3148
  announcementDelay: r,
@@ -3110,13 +3151,13 @@ const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", Nn = {
3110
3151
  onAnnouncementClear: o,
3111
3152
  dispatch: s
3112
3153
  }) => {
3113
- clearTimeout(t.current), r ? t.current = setTimeout(Et, r, {
3154
+ clearTimeout(t.current), r ? t.current = setTimeout(wt, r, {
3114
3155
  children: e,
3115
3156
  clearAnnouncementDelay: a,
3116
3157
  clearAnnouncementTimeoutRef: n,
3117
3158
  onAnnouncementClear: o,
3118
3159
  dispatch: s
3119
- }) : Et({
3160
+ }) : wt({
3120
3161
  children: e,
3121
3162
  clearAnnouncementDelay: a,
3122
3163
  clearAnnouncementTimeoutRef: n,
@@ -3124,7 +3165,7 @@ const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", Nn = {
3124
3165
  dispatch: s
3125
3166
  });
3126
3167
  };
3127
- function er({
3168
+ function tr({
3128
3169
  children: e,
3129
3170
  className: t,
3130
3171
  politeness: r,
@@ -3135,17 +3176,17 @@ function er({
3135
3176
  visible: i,
3136
3177
  ...d
3137
3178
  }) {
3138
- const h = $(null), p = $(null), [u, c] = wt(vn, {
3179
+ const h = x(null), f = x(null), [u, c] = Tt(Mn, {
3139
3180
  announcement: null
3140
3181
  });
3141
3182
  let m = r;
3142
- typeof m > "u" && (m = a ? Nn[a] : "assertive"), Q(() => {
3143
- Cn({
3183
+ typeof m > "u" && (m = a ? $n[a] : "assertive"), Y(() => {
3184
+ Kn({
3144
3185
  announcementTimeoutRef: h,
3145
3186
  announcementDelay: n,
3146
3187
  children: e,
3147
3188
  clearAnnouncementDelay: o,
3148
- clearAnnouncementTimeoutRef: p,
3189
+ clearAnnouncementTimeoutRef: f,
3149
3190
  onAnnouncementClear: s,
3150
3191
  dispatch: c
3151
3192
  });
@@ -3155,7 +3196,7 @@ function er({
3155
3196
  o,
3156
3197
  s
3157
3198
  ]);
3158
- const y = f(t, {
3199
+ const y = p(t, {
3159
3200
  "sr-only": !i
3160
3201
  });
3161
3202
  return /* @__PURE__ */ l(
@@ -3170,41 +3211,41 @@ function er({
3170
3211
  );
3171
3212
  }
3172
3213
  /*!
3173
- @versini/ui-liveregion v1.3.7
3214
+ @versini/ui-liveregion v1.3.8
3174
3215
  © 2025 gizmette.com
3175
3216
  */
3176
3217
  try {
3177
3218
  window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
3178
- version: "1.3.7",
3179
- buildTime: "01/25/2025 11:56 AM EST",
3219
+ version: "1.3.8",
3220
+ buildTime: "01/25/2025 10:54 PM EST",
3180
3221
  homepage: "https://github.com/aversini/ui-components",
3181
3222
  license: "MIT"
3182
3223
  });
3183
3224
  } catch {
3184
3225
  }
3185
- const On = ({
3226
+ const Hn = ({
3186
3227
  mode: e
3187
- }) => f({
3228
+ }) => p({
3188
3229
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
3189
3230
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
3190
3231
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
3191
3232
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
3192
- }), Pn = ({
3233
+ }), Wn = ({
3193
3234
  focusMode: e
3194
- }) => f("focus:outline focus:outline-2 focus:outline-offset-2", {
3235
+ }) => p("focus:outline focus:outline-2 focus:outline-offset-2", {
3195
3236
  "focus:outline-focus-dark": e === "dark",
3196
3237
  "focus:outline-focus-light": e === "light",
3197
3238
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
3198
3239
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
3199
- }), Dn = ({
3240
+ }), Bn = ({
3200
3241
  noBorder: e,
3201
3242
  error: t
3202
- }) => f("border-2", {
3243
+ }) => p("border-2", {
3203
3244
  "border-border-dark": !e && !t,
3204
3245
  "focus:border-border-dark": !e && t,
3205
3246
  "border-border-error-dark": !e && t,
3206
3247
  "border-transparent": e
3207
- }), Ln = ({
3248
+ }), Gn = ({
3208
3249
  disabled: e,
3209
3250
  raw: t,
3210
3251
  error: r,
@@ -3213,22 +3254,22 @@ const On = ({
3213
3254
  if (t)
3214
3255
  return "";
3215
3256
  if (e)
3216
- return f("absolute px-2 cursor-not-allowed opacity-50 font-medium");
3257
+ return p("absolute px-2 cursor-not-allowed opacity-50 font-medium");
3217
3258
  if (!r)
3218
- return f("absolute px-2 cursor-text font-medium", {
3259
+ return p("absolute px-2 cursor-text font-medium", {
3219
3260
  "text-copy-lighter": a === "dark",
3220
3261
  "text-copy-dark": a === "light",
3221
3262
  "text-copy-dark dark:text-copy-lighter": a === "system",
3222
3263
  "text-copy-lighter dark:text-copy-dark": a === "alt-system"
3223
3264
  });
3224
3265
  if (r)
3225
- return f("absolute px-2 cursor-text font-medium", {
3266
+ return p("absolute px-2 cursor-text font-medium", {
3226
3267
  "text-copy-lighter": a === "dark",
3227
3268
  "text-copy-error-dark": a === "light",
3228
3269
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
3229
3270
  "text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
3230
3271
  });
3231
- }, Mn = ({
3272
+ }, Jn = ({
3232
3273
  error: e,
3233
3274
  raw: t,
3234
3275
  mode: r,
@@ -3237,25 +3278,25 @@ const On = ({
3237
3278
  if (t)
3238
3279
  return "";
3239
3280
  if (a)
3240
- return f(
3241
- Ye,
3281
+ return p(
3282
+ ze,
3242
3283
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
3243
3284
  );
3244
3285
  if (!e)
3245
- return f(Ye, "absolute px-2 font-medium", {
3286
+ return p(ze, "absolute px-2 font-medium", {
3246
3287
  "text-copy-lighter": r === "dark",
3247
3288
  "text-copy-dark": r === "light",
3248
3289
  "text-copy-dark dark:text-copy-lighter": r === "system",
3249
3290
  "text-copy-lighter dark:text-copy-dark": r === "alt-system"
3250
3291
  });
3251
3292
  if (e)
3252
- return f(Ye, "absolute px-2 font-medium", {
3293
+ return p(ze, "absolute px-2 font-medium", {
3253
3294
  "text-copy-error-light bg-surface-darker": r === "dark",
3254
3295
  "text-copy-error-dark": r === "light",
3255
3296
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
3256
3297
  "dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
3257
3298
  });
3258
- }, $n = ({
3299
+ }, Vn = ({
3259
3300
  className: e,
3260
3301
  inputClassName: t,
3261
3302
  raw: r,
@@ -3267,9 +3308,9 @@ const On = ({
3267
3308
  size: d,
3268
3309
  rightElementClassName: h
3269
3310
  }) => {
3270
- const p = r ? e : f(
3311
+ const f = r ? e : p(
3271
3312
  "relative flex w-full flex-col justify-center",
3272
- Sn,
3313
+ On,
3273
3314
  e
3274
3315
  );
3275
3316
  let u = "";
@@ -3290,37 +3331,37 @@ const On = ({
3290
3331
  u = "h-12";
3291
3332
  break;
3292
3333
  }
3293
- const c = r ? f(t) : f(
3294
- Xt,
3334
+ const c = r ? p(t) : p(
3335
+ Qt,
3295
3336
  u,
3296
3337
  "rounded-md text-base px-4",
3297
- On({ mode: s }),
3298
- Pn({ focusMode: i }),
3299
- Dn({ noBorder: n, error: o }),
3338
+ Hn({ mode: s }),
3339
+ Wn({ focusMode: i }),
3340
+ Bn({ noBorder: n, error: o }),
3300
3341
  {
3301
3342
  "disabled:cursor-not-allowed disabled:opacity-50": a
3302
3343
  },
3303
3344
  t
3304
- ), m = r ? void 0 : "sr-only", y = Ln({
3345
+ ), m = r ? void 0 : "sr-only", y = Gn({
3305
3346
  disabled: a,
3306
3347
  raw: r,
3307
3348
  error: o,
3308
3349
  mode: s
3309
- }), E = Mn({
3350
+ }), w = Jn({
3310
3351
  error: o,
3311
3352
  raw: r,
3312
3353
  mode: s,
3313
3354
  disabled: a
3314
- }), w = r ? void 0 : f("absolute right-3", h);
3355
+ }), T = r ? void 0 : p("absolute right-3", h);
3315
3356
  return {
3316
- wrapper: p,
3357
+ wrapper: f,
3317
3358
  input: c,
3318
3359
  accessibleLabel: m,
3319
3360
  visibleLabel: y,
3320
- helperText: E,
3321
- rightElement: w
3361
+ helperText: w,
3362
+ rightElement: T
3322
3363
  };
3323
- }, at = F.forwardRef(
3364
+ }, ot = X.forwardRef(
3324
3365
  ({
3325
3366
  id: e,
3326
3367
  name: t,
@@ -3332,110 +3373,110 @@ const On = ({
3332
3373
  mode: i = "system",
3333
3374
  focusMode: d = "system",
3334
3375
  disabled: h = !1,
3335
- noBorder: p = !1,
3376
+ noBorder: f = !1,
3336
3377
  labelId: u,
3337
3378
  labelHidden: c = !1,
3338
3379
  type: m = "text",
3339
3380
  helperText: y = "",
3340
- rightElement: E,
3341
- rightElementClassName: w,
3342
- size: I = "md",
3343
- ...U
3344
- }, K) => {
3345
- const [H, v] = An(), [P, W] = z(0), x = Rn({ id: e, prefix: `${Xt}-` }), pe = `${t} error, ${y}`, Z = $(null), R = $(null), D = {
3381
+ rightElement: w,
3382
+ rightElementClassName: T,
3383
+ size: k = "md",
3384
+ ...Q
3385
+ }, D) => {
3386
+ const [Z, L] = Dn(), [B, U] = z(0), S = Ln({ id: e, prefix: `${Qt}-` }), $ = `${t} error, ${y}`, K = x(null), I = x(null), O = {
3346
3387
  xs: { label: "-25px", helperText: "30px" },
3347
3388
  sm: { label: "-29px", helperText: "34px" },
3348
3389
  md: { label: "-33px", helperText: "38px" },
3349
3390
  lg: { label: "-15px", helperText: "22px" },
3350
3391
  xl: { label: "-19px", helperText: "25px" }
3351
- }, B = $n({
3392
+ }, C = Vn({
3352
3393
  className: o,
3353
3394
  inputClassName: s,
3354
3395
  error: a,
3355
3396
  raw: n,
3356
3397
  focusMode: d,
3357
3398
  disabled: h,
3358
- noBorder: p,
3399
+ noBorder: f,
3359
3400
  mode: i,
3360
- size: I,
3361
- rightElementClassName: w
3401
+ size: k,
3402
+ rightElementClassName: T
3362
3403
  });
3363
- return ot(() => {
3364
- v && v.width && W(v.width + 18 + 10);
3365
- }, [v]), ot(() => {
3366
- var ee, g;
3367
- const { label: T, helperText: b } = D[I];
3368
- (ee = Z == null ? void 0 : Z.current) == null || ee.style.setProperty("--av-text-input-label", T), (g = R == null ? void 0 : R.current) == null || g.style.setProperty(
3404
+ return Re(() => {
3405
+ L && L.width && U(L.width + 18 + 10);
3406
+ }, [L]), Re(() => {
3407
+ var G, g;
3408
+ const { label: E, helperText: b } = O[k];
3409
+ (G = K == null ? void 0 : K.current) == null || G.style.setProperty("--av-text-input-label", E), (g = I == null ? void 0 : I.current) == null || g.style.setProperty(
3369
3410
  "--av-text-input-helper-text",
3370
3411
  b
3371
3412
  );
3372
- }, [I]), /* @__PURE__ */ O("div", { className: B.wrapper, children: [
3413
+ }, [k]), /* @__PURE__ */ M("div", { className: C.wrapper, children: [
3373
3414
  /* @__PURE__ */ l(
3374
3415
  "label",
3375
3416
  {
3376
- htmlFor: x,
3417
+ htmlFor: S,
3377
3418
  id: u,
3378
- className: B.accessibleLabel,
3419
+ className: C.accessibleLabel,
3379
3420
  children: r
3380
3421
  }
3381
3422
  ),
3382
3423
  /* @__PURE__ */ l(
3383
3424
  "input",
3384
3425
  {
3385
- ref: K,
3386
- id: x,
3426
+ ref: D,
3427
+ id: S,
3387
3428
  name: t,
3388
3429
  type: m,
3389
3430
  disabled: h,
3390
3431
  placeholder: n ? void 0 : " ",
3391
- className: B.input,
3392
- ...y && { "aria-describedby": `${x}-helper` },
3432
+ className: C.input,
3433
+ ...y && { "aria-describedby": `${S}-helper` },
3393
3434
  ...a && { "aria-invalid": "true" },
3394
- ...E && !n && { style: { paddingRight: P } },
3395
- ...U
3435
+ ...w && !n && { style: { paddingRight: B } },
3436
+ ...Q
3396
3437
  }
3397
3438
  ),
3398
3439
  !n && !c && /* @__PURE__ */ l(
3399
3440
  "label",
3400
3441
  {
3401
- ref: Z,
3442
+ ref: K,
3402
3443
  "aria-hidden": !0,
3403
- htmlFor: x,
3404
- className: B.visibleLabel,
3444
+ htmlFor: S,
3445
+ className: C.visibleLabel,
3405
3446
  children: r
3406
3447
  }
3407
3448
  ),
3408
3449
  y && /* @__PURE__ */ l(
3409
3450
  "div",
3410
3451
  {
3411
- ref: R,
3412
- id: `${x}-helper`,
3413
- className: B.helperText,
3452
+ ref: I,
3453
+ id: `${S}-helper`,
3454
+ className: C.helperText,
3414
3455
  children: y
3415
3456
  }
3416
3457
  ),
3417
- E && /* @__PURE__ */ l(
3458
+ w && /* @__PURE__ */ l(
3418
3459
  "div",
3419
3460
  {
3420
- ref: H,
3421
- className: B.rightElement,
3422
- children: E
3461
+ ref: Z,
3462
+ className: C.rightElement,
3463
+ children: w
3423
3464
  }
3424
3465
  ),
3425
- a && y && /* @__PURE__ */ l(er, { politeness: "polite", clearAnnouncementDelay: 500, children: pe })
3466
+ a && y && /* @__PURE__ */ l(tr, { politeness: "polite", clearAnnouncementDelay: 500, children: $ })
3426
3467
  ] });
3427
3468
  }
3428
3469
  );
3429
- at.displayName = "TextInput";
3430
- function Un(e) {
3431
- return St(() => e.every((t) => t == null) ? () => {
3470
+ ot.displayName = "TextInput";
3471
+ function Yn(e) {
3472
+ return De(() => e.every((t) => t == null) ? () => {
3432
3473
  } : (t) => {
3433
3474
  e.forEach((r) => {
3434
3475
  typeof r == "function" ? r(t) : r != null && (r.current = t);
3435
3476
  });
3436
3477
  }, e);
3437
3478
  }
3438
- const Kn = 500, Hn = 5e3, Wn = 2e4, tr = F.forwardRef(
3479
+ const Fn = 500, jn = 5e3, zn = 2e4, rr = X.forwardRef(
3439
3480
  ({
3440
3481
  name: e,
3441
3482
  disabled: t,
@@ -3447,65 +3488,65 @@ const Kn = 500, Hn = 5e3, Wn = 2e4, tr = F.forwardRef(
3447
3488
  onFocus: i,
3448
3489
  onTextInputMaskBlur: d,
3449
3490
  rightElement: h,
3450
- ...p
3491
+ ...f
3451
3492
  }, u) => {
3452
- const [c, m] = z(!0), [y, E] = z({
3493
+ const [c, m] = z(!0), [y, w] = z({
3453
3494
  message: null,
3454
3495
  politeness: null
3455
- }), w = $(!0), I = $(null), U = $(null), K = Un([u, U]), H = c ? "Show" : "Hide", v = () => {
3456
- I.current && clearTimeout(I.current), w.current || (I.current = setTimeout(() => {
3457
- w.current = !0, m(!0), E({
3458
- announcementTimeout: Hn,
3496
+ }), T = x(!0), k = x(null), Q = x(null), D = Yn([u, Q]), Z = c ? "Show" : "Hide", L = () => {
3497
+ k.current && clearTimeout(k.current), T.current || (k.current = setTimeout(() => {
3498
+ T.current = !0, m(!0), w({
3499
+ announcementTimeout: jn,
3459
3500
  politeness: "polite",
3460
3501
  message: `${r} hiding characters`
3461
3502
  }), n && n(!0);
3462
- }, Wn));
3463
- }, P = (R) => {
3464
- R.preventDefault();
3465
- const D = !w.current;
3466
- w.current = D, v(), m(D), E({
3467
- announcementTimeout: Kn,
3503
+ }, zn));
3504
+ }, B = (I) => {
3505
+ I.preventDefault();
3506
+ const O = !T.current;
3507
+ T.current = O, L(), m(O), w({
3508
+ announcementTimeout: Fn,
3468
3509
  politeness: "assertive",
3469
- message: D ? "Characters hidden" : "Characters showing"
3470
- }), n && n(D);
3471
- }, W = (R) => {
3472
- var D;
3473
- const { relatedTarget: B } = R, ee = (D = U.current) == null ? void 0 : D.parentElement;
3474
- ee != null && ee.contains(B) || d && d();
3475
- }, x = (R) => {
3476
- v(), s && s(R), W(R);
3477
- }, pe = (R) => {
3478
- v(), i && i(R);
3479
- }, Z = (R) => {
3480
- v(), o && o(R);
3510
+ message: O ? "Characters hidden" : "Characters showing"
3511
+ }), n && n(O);
3512
+ }, U = (I) => {
3513
+ var O;
3514
+ const { relatedTarget: C } = I, G = (O = Q.current) == null ? void 0 : O.parentElement;
3515
+ G != null && G.contains(C) || d && d();
3516
+ }, S = (I) => {
3517
+ L(), s && s(I), U(I);
3518
+ }, $ = (I) => {
3519
+ L(), i && i(I);
3520
+ }, K = (I) => {
3521
+ L(), o && o(I);
3481
3522
  };
3482
- return Q(() => () => {
3483
- I.current && clearTimeout(I.current);
3484
- }, []), /* @__PURE__ */ O(Qe, { children: [
3523
+ return Y(() => () => {
3524
+ k.current && clearTimeout(k.current);
3525
+ }, []), /* @__PURE__ */ M(et, { children: [
3485
3526
  /* @__PURE__ */ l(
3486
- at,
3527
+ ot,
3487
3528
  {
3488
- ref: K,
3529
+ ref: D,
3489
3530
  name: e,
3490
3531
  label: r,
3491
3532
  labelHidden: a,
3492
3533
  type: c ? "password" : "text",
3493
3534
  disabled: t,
3494
- onBlur: x,
3495
- onFocus: pe,
3496
- onChange: Z,
3497
- rightElement: F.cloneElement(h, {
3535
+ onBlur: S,
3536
+ onFocus: $,
3537
+ onChange: K,
3538
+ rightElement: X.cloneElement(h, {
3498
3539
  ref: u,
3499
- label: H,
3500
- onClick: P,
3501
- onBlur: W,
3540
+ label: Z,
3541
+ onClick: B,
3542
+ onBlur: U,
3502
3543
  disabled: t
3503
3544
  }),
3504
- ...p
3545
+ ...f
3505
3546
  }
3506
3547
  ),
3507
3548
  /* @__PURE__ */ l(
3508
- er,
3549
+ tr,
3509
3550
  {
3510
3551
  role: "status",
3511
3552
  politeness: y.politeness,
@@ -3516,21 +3557,21 @@ const Kn = 500, Hn = 5e3, Wn = 2e4, tr = F.forwardRef(
3516
3557
  ] });
3517
3558
  }
3518
3559
  );
3519
- tr.displayName = "TextInputMask";
3560
+ rr.displayName = "TextInputMask";
3520
3561
  /*!
3521
- @versini/ui-textinput v3.0.12
3562
+ @versini/ui-textinput v3.0.13
3522
3563
  © 2025 gizmette.com
3523
3564
  */
3524
3565
  try {
3525
3566
  window.__VERSINI_UI_TEXTINPUT__ || (window.__VERSINI_UI_TEXTINPUT__ = {
3526
- version: "3.0.12",
3527
- buildTime: "01/25/2025 11:56 AM EST",
3567
+ version: "3.0.13",
3568
+ buildTime: "01/25/2025 10:54 PM EST",
3528
3569
  homepage: "https://github.com/aversini/ui-components",
3529
3570
  license: "MIT"
3530
3571
  });
3531
3572
  } catch {
3532
3573
  }
3533
- const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in with a Passkey", Jo = "Log out", Vn = "Password", Vo = "Profile", Yo = "Settings", Fo = "Chat history", jo = "About", zo = "Type your question here", qo = "{{clipboard}}", Xo = `Sometimes, ${rr} hallucinates. Review important details.`, Qo = "Prompts are pre-filled buttons available on the main screen, to help you quickly start requests. The label is used for the button, and the content is what will be inserted in the chat when the button is pressed. You can use the special placeholder {{clipboard}} to automatically insert the content of your clipboard.", Zo = {
3574
+ const qn = "ASK! ME! ANYTHING!", ar = "Callisto", Xn = "Log in", Qn = "Sign in with a Passkey", Qo = "Log out", Zn = "Password", Zo = "Profile", es = "Settings", ts = "Chat history", rs = "About", as = "Type your question here", ns = "{{clipboard}}", os = `Sometimes, ${ar} hallucinates. Review important details.`, ss = "Prompts are pre-filled buttons available on the main screen, to help you quickly start requests. The label is used for the button, and the content is what will be inserted in the chat when the button is pressed. You can use the special placeholder {{clipboard}} to automatically insert the content of your clipboard.", is = {
3534
3575
  PREFERENCES: {
3535
3576
  TITLE: "User profile",
3536
3577
  NAME: "Name",
@@ -3567,31 +3608,31 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
3567
3608
  SETTINGS_ENGINE: {
3568
3609
  TITLE: "AI Engine"
3569
3610
  }
3570
- }, Yn = () => /* @__PURE__ */ O("div", { className: "flex items-center justify-center", children: [
3571
- /* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(pn, {}) }),
3572
- /* @__PURE__ */ O("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
3573
- /* @__PURE__ */ l("h1", { children: rr }),
3574
- /* @__PURE__ */ l("h2", { children: Bn })
3611
+ }, eo = () => /* @__PURE__ */ M("div", { className: "flex items-center justify-center", children: [
3612
+ /* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(In, {}) }),
3613
+ /* @__PURE__ */ M("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
3614
+ /* @__PURE__ */ l("h1", { children: ar }),
3615
+ /* @__PURE__ */ l("h2", { children: qn })
3575
3616
  ] })
3576
- ] }), Fn = () => {
3577
- const { login: e, logoutReason: t, loginWithPasskey: r } = zt(), [a, n] = z(""), [o, s] = z(""), [i, d] = z(!0), [h, p] = z({
3617
+ ] }), to = () => {
3618
+ const { login: e, logoutReason: t, loginWithPasskey: r } = zt(), [a, n] = z(""), [o, s] = z(""), [i, d] = z(!0), [h, f] = z({
3578
3619
  username: "",
3579
3620
  password: ""
3580
3621
  }), u = async (c) => {
3581
3622
  c.preventDefault(), await e(h.username, h.password) || (s(""), n("Invalid username or password"));
3582
3623
  };
3583
- return Q(() => {
3624
+ return Y(() => {
3584
3625
  var c;
3585
3626
  (c = document.getElementById("logo")) == null || c.classList.add("fadeOut"), setTimeout(() => {
3586
3627
  var m;
3587
3628
  (m = document.getElementById("root")) == null || m.classList.replace("app-hidden", "fadeIn");
3588
3629
  }, 500);
3589
- }), Q(() => {
3630
+ }), Y(() => {
3590
3631
  t && s(t);
3591
- }, [t]), /* @__PURE__ */ l(Qe, { children: /* @__PURE__ */ O(
3592
- En,
3632
+ }, [t]), /* @__PURE__ */ l(et, { children: /* @__PURE__ */ M(
3633
+ Rn,
3593
3634
  {
3594
- className: qa({
3635
+ className: Xa({
3595
3636
  extraClass: "mt-5"
3596
3637
  }),
3597
3638
  noMargin: !0,
@@ -3600,16 +3641,16 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
3600
3641
  /* @__PURE__ */ l(
3601
3642
  "div",
3602
3643
  {
3603
- className: za({
3644
+ className: qa({
3604
3645
  extraClass: "rounded-md"
3605
3646
  }),
3606
- children: /* @__PURE__ */ l(Yn, {})
3647
+ children: /* @__PURE__ */ l(eo, {})
3607
3648
  }
3608
3649
  ),
3609
- /* @__PURE__ */ l("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ l(Tn, { alignHorizontal: "center", children: /* @__PURE__ */ l(te, { span: 6, children: /* @__PURE__ */ O(hn, { mode: "dark", children: [
3610
- /* @__PURE__ */ l(te, { span: 12, className: "mt-7", children: o && /* @__PURE__ */ l("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
3611
- /* @__PURE__ */ l(te, { span: 12, children: /* @__PURE__ */ l(
3612
- at,
3650
+ /* @__PURE__ */ l("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ l(vn, { alignHorizontal: "center", children: /* @__PURE__ */ l(re, { span: 6, children: /* @__PURE__ */ M(Tn, { mode: "dark", children: [
3651
+ /* @__PURE__ */ l(re, { span: 12, className: "mt-7", children: o && /* @__PURE__ */ l("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
3652
+ /* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
3653
+ ot,
3613
3654
  {
3614
3655
  className: "mt-7",
3615
3656
  required: !0,
@@ -3621,7 +3662,7 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
3621
3662
  name: "username",
3622
3663
  label: "Username",
3623
3664
  onChange: (c) => {
3624
- p({
3665
+ f({
3625
3666
  ...h,
3626
3667
  username: c.target.value
3627
3668
  }), n("");
@@ -3629,8 +3670,8 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
3629
3670
  error: a !== ""
3630
3671
  }
3631
3672
  ) }),
3632
- /* @__PURE__ */ l(te, { span: 12, children: /* @__PURE__ */ l(
3633
- tr,
3673
+ /* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
3674
+ rr,
3634
3675
  {
3635
3676
  className: "mt-7",
3636
3677
  required: !0,
@@ -3640,19 +3681,19 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
3640
3681
  mode: "dark",
3641
3682
  focusMode: "light",
3642
3683
  name: "password",
3643
- label: Vn,
3684
+ label: Zn,
3644
3685
  rightElement: /* @__PURE__ */ l(
3645
- qe,
3686
+ Ce,
3646
3687
  {
3647
3688
  focusMode: "light",
3648
3689
  mode: "dark",
3649
3690
  label: i ? "Show" : "Hide",
3650
- children: i ? /* @__PURE__ */ l(yn, {}) : /* @__PURE__ */ l(fn, {})
3691
+ children: i ? /* @__PURE__ */ l(kn, {}) : /* @__PURE__ */ l(Sn, {})
3651
3692
  }
3652
3693
  ),
3653
3694
  onMaskChange: d,
3654
3695
  onChange: (c) => {
3655
- p({
3696
+ f({
3656
3697
  ...h,
3657
3698
  password: c.target.value
3658
3699
  }), n("");
@@ -3661,8 +3702,8 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
3661
3702
  helperText: a
3662
3703
  }
3663
3704
  ) }),
3664
- /* @__PURE__ */ l(te, { span: 12, children: /* @__PURE__ */ l(
3665
- qt,
3705
+ /* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
3706
+ Xt,
3666
3707
  {
3667
3708
  mode: "light",
3668
3709
  focusMode: "light",
@@ -3670,97 +3711,97 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
3670
3711
  noBorder: !0,
3671
3712
  type: "submit",
3672
3713
  className: "mt-7",
3673
- children: Gn
3714
+ children: Xn
3674
3715
  }
3675
3716
  ) }),
3676
- /* @__PURE__ */ l(te, { span: 12, children: /* @__PURE__ */ l("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
3677
- /* @__PURE__ */ l(te, { span: 12, children: /* @__PURE__ */ l(
3678
- qe,
3717
+ /* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
3718
+ /* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
3719
+ Ce,
3679
3720
  {
3680
3721
  variant: "selected",
3681
3722
  mode: "dark",
3682
3723
  focusMode: "light",
3683
3724
  fullWidth: !0,
3684
3725
  className: "mb-4",
3685
- labelRight: Jn,
3726
+ labelRight: Qn,
3686
3727
  onClick: r,
3687
- children: /* @__PURE__ */ l(gn, { size: "size-7" })
3728
+ children: /* @__PURE__ */ l(_n, { size: "size-7" })
3688
3729
  }
3689
3730
  ) })
3690
3731
  ] }) }) }) })
3691
3732
  ]
3692
3733
  }
3693
3734
  ) });
3694
- }, jn = new URL(document.location.href).searchParams, zn = !!jn.get("debug") || !1, qn = sr(() => import(
3735
+ }, ro = new URL(document.location.href).searchParams, ao = !!ro.get("debug") || !1, no = ir(() => import(
3695
3736
  /* webpackChunkName: "LazyApp" */
3696
- "./App.BFCImKH0.js"
3697
- ).then((e) => e.App)), Xn = ({ isComponent: e }) => {
3737
+ "./App.KB01Hp9h.js"
3738
+ ).then((e) => e.App)), oo = ({ isComponent: e }) => {
3698
3739
  const { isAuthenticated: t } = zt();
3699
- return t ? /* @__PURE__ */ l(ir, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(qn, { isComponent: e }) }) : /* @__PURE__ */ l(Fn, {});
3700
- }, Qn = ({
3740
+ return t ? /* @__PURE__ */ l(cr, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(no, { isComponent: e }) }) : /* @__PURE__ */ l(to, {});
3741
+ }, so = ({
3701
3742
  isComponent: e = !1,
3702
- domain: t = ja
3703
- }) => /* @__PURE__ */ l(Ma, { clientId: $a, domain: t, debug: zn, children: /* @__PURE__ */ l(Xn, { isComponent: e }) }), es = ({ domain: e }) => /* @__PURE__ */ l(Qn, { isComponent: !0, domain: e });
3743
+ domain: t = za
3744
+ }) => /* @__PURE__ */ l(Ma, { clientId: Ua, domain: t, debug: ao, children: /* @__PURE__ */ l(oo, { isComponent: e }) }), cs = ({ domain: e }) => /* @__PURE__ */ l(so, { isComponent: !0, domain: e });
3704
3745
  export {
3705
- jo as ABOUT_TITLE,
3706
- bo as ACTION_MESSAGE,
3707
- wo as ACTION_MODEL,
3708
- Eo as ACTION_RESET,
3709
- Ao as ACTION_RESET_PROMPT,
3710
- To as ACTION_RESTORE,
3711
- So as ACTION_SEARCH,
3712
- _o as ACTION_SORT,
3713
- Io as ACTION_STREAMING,
3714
- ko as ACTION_TOGGLE_PROMPT,
3715
- rr as APP_NAME,
3716
- qt as C,
3717
- Zo as CARDS,
3718
- qo as CLIPBOARD_PROMPT,
3719
- fo as DEFAULT_AI_ENGINE,
3720
- $o as DEFAULT_ICON_ACTION_SIZE,
3721
- yo as ENGINE_ANTHROPIC,
3722
- go as ENGINE_OPENAI,
3723
- po as ERROR_MESSAGE,
3724
- Xo as FOOTER_DISCLAIMER,
3725
- Fo as HISTORY_TITLE,
3726
- Do as INFINITE_SCROLL_LIMIT,
3727
- Po as INFINITE_SCROLL_THRESHOLD,
3728
- Tn as L,
3729
- No as LOCAL_STORAGE_CHAT_DETAILS,
3730
- Ro as LOCAL_STORAGE_PREFIX,
3731
- Co as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
3732
- vo as LOCAL_STORAGE_SEARCH,
3733
- xo as LOCAL_STORAGE_SORT,
3734
- Jo as LOG_OUT,
3735
- Yn as Logo,
3736
- ue as M,
3737
- Vo as PROFILE_TITLE,
3738
- Qo as PROMPTS_DESCRIPTION,
3739
- Lo as PROMPT_CLASSNAME,
3740
- Mo as PROMPT_EDITABLE_AREA_CLASSNAME,
3741
- hn as R,
3742
- lo as ROLE_ASSISTANT,
3743
- ho as ROLE_HIDDEN,
3744
- mo as ROLE_INTERNAL,
3745
- uo as ROLE_SYSTEM,
3746
- co as ROLE_USER,
3747
- Yo as SETTINGS_TITLE,
3748
- Oo as STATS_SEPARATOR,
3749
- es as SassySaint,
3750
- zo as TYPE_QUESTION,
3751
- qe as Y,
3752
- Go as debounce,
3753
- Wo as durationFormatter,
3754
- $e as f,
3755
- at as fe,
3756
- Uo as getCurrentGeoLocation,
3757
- qa as getMainPaddingClass,
3758
- za as getMessageContaintWrapperClass,
3759
- Ho as isLastMessageFromRole,
3760
- te as j,
3761
- gn as l,
3762
- Bo as pluralize,
3763
- En as r,
3764
- Ko as renderDataAsList,
3746
+ rs as ABOUT_TITLE,
3747
+ Ao as ACTION_MESSAGE,
3748
+ No as ACTION_MODEL,
3749
+ Ro as ACTION_RESET,
3750
+ Do as ACTION_RESET_PROMPT,
3751
+ vo as ACTION_RESTORE,
3752
+ Oo as ACTION_SEARCH,
3753
+ Co as ACTION_SORT,
3754
+ xo as ACTION_STREAMING,
3755
+ Po as ACTION_TOGGLE_PROMPT,
3756
+ ar as APP_NAME,
3757
+ Xt as C,
3758
+ is as CARDS,
3759
+ ns as CLIPBOARD_PROMPT,
3760
+ So as DEFAULT_AI_ENGINE,
3761
+ Vo as DEFAULT_ICON_ACTION_SIZE,
3762
+ ko as ENGINE_ANTHROPIC,
3763
+ _o as ENGINE_OPENAI,
3764
+ Io as ERROR_MESSAGE,
3765
+ os as FOOTER_DISCLAIMER,
3766
+ ts as HISTORY_TITLE,
3767
+ Bo as INFINITE_SCROLL_LIMIT,
3768
+ Wo as INFINITE_SCROLL_THRESHOLD,
3769
+ vn as L,
3770
+ $o as LOCAL_STORAGE_CHAT_DETAILS,
3771
+ Lo as LOCAL_STORAGE_PREFIX,
3772
+ Ko as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
3773
+ Mo as LOCAL_STORAGE_SEARCH,
3774
+ Uo as LOCAL_STORAGE_SORT,
3775
+ Qo as LOG_OUT,
3776
+ eo as Logo,
3777
+ me as M,
3778
+ Zo as PROFILE_TITLE,
3779
+ ss as PROMPTS_DESCRIPTION,
3780
+ Go as PROMPT_CLASSNAME,
3781
+ Jo as PROMPT_EDITABLE_AREA_CLASSNAME,
3782
+ Tn as R,
3783
+ bo as ROLE_ASSISTANT,
3784
+ To as ROLE_HIDDEN,
3785
+ wo as ROLE_INTERNAL,
3786
+ Eo as ROLE_SYSTEM,
3787
+ yo as ROLE_USER,
3788
+ es as SETTINGS_TITLE,
3789
+ Ho as STATS_SEPARATOR,
3790
+ cs as SassySaint,
3791
+ as as TYPE_QUESTION,
3792
+ Xo as debounce,
3793
+ zo as durationFormatter,
3794
+ Ke as f,
3795
+ ot as fe,
3796
+ Yo as getCurrentGeoLocation,
3797
+ Xa as getMainPaddingClass,
3798
+ qa as getMessageContaintWrapperClass,
3799
+ jo as isLastMessageFromRole,
3800
+ re as j,
3801
+ _n as l,
3802
+ qo as pluralize,
3803
+ Rn as r,
3804
+ Fo as renderDataAsList,
3805
+ Ce as te,
3765
3806
  zt as un
3766
3807
  };