@versini/sassysaint 5.0.1 → 5.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,123 +1,123 @@
1
- import { jsx as c, jsxs as I, Fragment as le } from "react/jsx-runtime";
2
- import V, { createContext as rr, useReducer as ft, useRef as G, useCallback as j, useEffect as z, useContext as yt, useSyncExternalStore as ar, useId as bt, useMemo as Et, useState as J, useLayoutEffect as nr, lazy as wt, Suspense as Tt } from "react";
3
- import f from "clsx";
4
- var or = Object.defineProperty, sr = (e, t, r) => t in e ? or(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Le = (e, t, r) => sr(e, typeof t != "symbol" ? t + "" : t, r);
1
+ import { jsx as c, jsxs as v, Fragment as ye } from "react/jsx-runtime";
2
+ import W, { createContext as cr, useReducer as It, useRef as $, useCallback as z, useEffect as q, useContext as kt, useSyncExternalStore as lr, useId as At, useState as F, useLayoutEffect as st, useMemo as St, lazy as _t, Suspense as Rt } from "react";
3
+ import y from "clsx";
4
+ var dr = Object.defineProperty, ur = (e, t, r) => t in e ? dr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, He = (e, t, r) => ur(e, typeof t != "symbol" ? t + "" : t, r);
5
5
  /*!
6
- @versini/auth-provider v7.3.1
6
+ @versini/auth-provider v7.3.2
7
7
  © 2024 gizmette.com
8
8
  */
9
9
  try {
10
10
  window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
11
- version: "7.3.1",
12
- buildTime: "09/05/2024 04:25 PM EDT",
11
+ version: "7.3.2",
12
+ buildTime: "09/19/2024 02:34 PM EDT",
13
13
  homepage: "https://github.com/aversini/auth-client",
14
14
  license: "MIT"
15
15
  });
16
16
  } catch {
17
17
  }
18
- function L(e) {
18
+ function K(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 ve(e) {
25
+ function xe(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 je() {
31
+ function Qe() {
32
32
  return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
33
33
  }
34
- function It(e) {
34
+ function Nt(e) {
35
35
  const { id: t } = e;
36
36
  return {
37
37
  ...e,
38
- id: ve(t),
38
+ id: xe(t),
39
39
  transports: e.transports
40
40
  };
41
41
  }
42
- function vt(e) {
42
+ function xt(e) {
43
43
  return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
44
44
  }
45
- let _ = class extends Error {
45
+ class x 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
- };
50
- function ir({ error: e, options: t }) {
49
+ }
50
+ function mr({ 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 _({
57
+ return new x({
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 _({
64
+ return new x({
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 _({
70
+ return new x({
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 _({
77
+ return new x({
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 _({
83
+ return new x({
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 _({
89
+ return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new x({
90
90
  message: 'No entry in pubKeyCredParams was of type "public-key"',
91
91
  code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
92
92
  cause: e
93
- }) : new _({
93
+ }) : new x({
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
97
97
  });
98
98
  if (e.name === "SecurityError") {
99
99
  const o = window.location.hostname;
100
- if (vt(o)) {
100
+ if (xt(o)) {
101
101
  if (r.rp.id !== o)
102
- return new _({
102
+ return new x({
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 _({
107
+ } else return new x({
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 _({
114
+ return new x({
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 _({
120
+ return new x({
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 ir({ error: e, options: t }) {
125
125
  }
126
126
  return e;
127
127
  }
128
- class cr {
128
+ class hr {
129
129
  createNewAbortSignal() {
130
130
  if (this.controller) {
131
131
  const r = new Error("Cancelling existing WebAuthn API call for new one");
@@ -141,30 +141,30 @@ class cr {
141
141
  }
142
142
  }
143
143
  }
144
- const St = new cr(), lr = ["cross-platform", "platform"];
145
- function At(e) {
146
- if (e && !(lr.indexOf(e) < 0))
144
+ const Ct = new hr(), pr = ["cross-platform", "platform"];
145
+ function Ot(e) {
146
+ if (e && !(pr.indexOf(e) < 0))
147
147
  return e;
148
148
  }
149
- async function dr(e) {
149
+ async function gr(e) {
150
150
  var m;
151
- if (!je())
151
+ if (!Qe())
152
152
  throw new Error("WebAuthn is not supported in this browser");
153
153
  const t = { publicKey: {
154
154
  ...e,
155
- challenge: ve(e.challenge),
155
+ challenge: xe(e.challenge),
156
156
  user: {
157
157
  ...e.user,
158
- id: ve(e.user.id)
158
+ id: xe(e.user.id)
159
159
  },
160
- excludeCredentials: (m = e.excludeCredentials) == null ? void 0 : m.map(It)
160
+ excludeCredentials: (m = e.excludeCredentials) == null ? void 0 : m.map(Nt)
161
161
  } };
162
- t.signal = St.createNewAbortSignal();
162
+ t.signal = Ct.createNewAbortSignal();
163
163
  let r;
164
164
  try {
165
165
  r = await navigator.credentials.create(t);
166
166
  } catch (l) {
167
- throw ir({ error: l, options: t });
167
+ throw mr({ error: l, options: t });
168
168
  }
169
169
  if (!r)
170
170
  throw new Error("Registration was not completed");
@@ -176,29 +176,29 @@ async function dr(e) {
176
176
  try {
177
177
  u = o.getPublicKeyAlgorithm();
178
178
  } catch (l) {
179
- Me("getPublicKeyAlgorithm()", l);
179
+ We("getPublicKeyAlgorithm()", l);
180
180
  }
181
181
  let h;
182
182
  if (typeof o.getPublicKey == "function")
183
183
  try {
184
184
  const l = o.getPublicKey();
185
- l !== null && (h = L(l));
185
+ l !== null && (h = K(l));
186
186
  } catch (l) {
187
- Me("getPublicKey()", l);
187
+ We("getPublicKey()", l);
188
188
  }
189
189
  let p;
190
190
  if (typeof o.getAuthenticatorData == "function")
191
191
  try {
192
- p = L(o.getAuthenticatorData());
192
+ p = K(o.getAuthenticatorData());
193
193
  } catch (l) {
194
- Me("getAuthenticatorData()", l);
194
+ We("getAuthenticatorData()", l);
195
195
  }
196
196
  return {
197
197
  id: a,
198
- rawId: L(n),
198
+ rawId: K(n),
199
199
  response: {
200
- attestationObject: L(o.attestationObject),
201
- clientDataJSON: L(o.clientDataJSON),
200
+ attestationObject: K(o.attestationObject),
201
+ clientDataJSON: K(o.clientDataJSON),
202
202
  transports: i,
203
203
  publicKeyAlgorithm: u,
204
204
  publicKey: h,
@@ -206,53 +206,53 @@ async function dr(e) {
206
206
  },
207
207
  type: s,
208
208
  clientExtensionResults: r.getClientExtensionResults(),
209
- authenticatorAttachment: At(r.authenticatorAttachment)
209
+ authenticatorAttachment: Ot(r.authenticatorAttachment)
210
210
  };
211
211
  }
212
- function Me(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 ur() {
217
- if (!je())
216
+ function fr() {
217
+ if (!Qe())
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 mr({ error: e, options: t }) {
222
+ function yr({ 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 _({
228
+ return new x({
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 _({
235
+ return new x({
236
236
  message: e.message,
237
237
  code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
238
238
  cause: e
239
239
  });
240
240
  if (e.name === "SecurityError") {
241
241
  const a = window.location.hostname;
242
- if (vt(a)) {
242
+ if (xt(a)) {
243
243
  if (r.rpId !== a)
244
- return new _({
244
+ return new x({
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 _({
249
+ } else return new x({
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 _({
255
+ return new x({
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,72 +260,72 @@ function mr({ error: e, options: t }) {
260
260
  }
261
261
  return e;
262
262
  }
263
- async function hr(e, t = !1) {
263
+ async function br(e, t = !1) {
264
264
  var m, l;
265
- if (!je())
265
+ if (!Qe())
266
266
  throw new Error("WebAuthn is not supported in this browser");
267
267
  let r;
268
- ((m = e.allowCredentials) == null ? void 0 : m.length) !== 0 && (r = (l = e.allowCredentials) == null ? void 0 : l.map(It));
268
+ ((m = e.allowCredentials) == null ? void 0 : m.length) !== 0 && (r = (l = e.allowCredentials) == null ? void 0 : l.map(Nt));
269
269
  const a = {
270
270
  ...e,
271
- challenge: ve(e.challenge),
271
+ challenge: xe(e.challenge),
272
272
  allowCredentials: r
273
273
  }, n = {};
274
274
  if (t) {
275
- if (!await ur())
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');
279
279
  n.mediation = "conditional", a.allowCredentials = [];
280
280
  }
281
- n.publicKey = a, n.signal = St.createNewAbortSignal();
281
+ n.publicKey = a, n.signal = Ct.createNewAbortSignal();
282
282
  let o;
283
283
  try {
284
284
  o = await navigator.credentials.get(n);
285
285
  } catch (d) {
286
- throw mr({ error: d, options: n });
286
+ throw yr({ error: d, 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: u, type: h } = o;
291
291
  let p;
292
- return u.userHandle && (p = L(u.userHandle)), {
292
+ return u.userHandle && (p = K(u.userHandle)), {
293
293
  id: s,
294
- rawId: L(i),
294
+ rawId: K(i),
295
295
  response: {
296
- authenticatorData: L(u.authenticatorData),
297
- clientDataJSON: L(u.clientDataJSON),
298
- signature: L(u.signature),
296
+ authenticatorData: K(u.authenticatorData),
297
+ clientDataJSON: K(u.clientDataJSON),
298
+ signature: K(u.signature),
299
299
  userHandle: p
300
300
  },
301
301
  type: h,
302
302
  clientExtensionResults: o.getClientExtensionResults(),
303
- authenticatorAttachment: At(o.authenticatorAttachment)
303
+ authenticatorAttachment: Ot(o.authenticatorAttachment)
304
304
  };
305
305
  }
306
306
  /*!
307
- @versini/auth-common v4.1.1
307
+ @versini/auth-common v4.1.2
308
308
  © 2024 gizmette.com
309
309
  */
310
310
  try {
311
311
  window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
312
- version: "4.1.1",
313
- buildTime: "09/05/2024 04:25 PM EDT",
312
+ version: "4.1.2",
313
+ buildTime: "09/19/2024 02:34 PM EDT",
314
314
  homepage: "https://github.com/aversini/auth-client",
315
315
  license: "MIT"
316
316
  });
317
317
  } catch {
318
318
  }
319
- const ne = {
319
+ const ue = {
320
320
  ID_TOKEN: "id_token",
321
321
  ACCESS_TOKEN: "token",
322
322
  ID_AND_ACCESS_TOKEN: "id_token token",
323
323
  CODE: "code",
324
324
  REFRESH_TOKEN: "refresh_token",
325
325
  PASSKEY: "passkey"
326
- }, kt = {
326
+ }, Pt = {
327
327
  CLIENT_ID: "X-Auth-ClientId"
328
- }, k = {
328
+ }, _ = {
329
329
  ALG: "RS256",
330
330
  USER_ID_KEY: "sub",
331
331
  USERNAME_KEY: "username",
@@ -338,7 +338,7 @@ const ne = {
338
338
  SCOPES_KEY: "scopes",
339
339
  CLIENT_ID_KEY: "aud",
340
340
  ISSUER: "gizmette.com"
341
- }, pr = `-----BEGIN PUBLIC KEY-----
341
+ }, Er = `-----BEGIN PUBLIC KEY-----
342
342
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
343
343
  w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
344
344
  i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
@@ -346,34 +346,34 @@ aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
346
346
  l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
347
347
  sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
348
348
  awIDAQAB
349
- -----END PUBLIC KEY-----`, Re = {
349
+ -----END PUBLIC KEY-----`, $e = {
350
350
  CODE: "code",
351
351
  LOGOUT: "logout",
352
352
  LOGIN: "login",
353
353
  REFRESH: "refresh"
354
- }, Ne = crypto, _t = (e) => e instanceof CryptoKey, me = new TextEncoder(), de = new TextDecoder();
355
- function gr(...e) {
354
+ }, Le = crypto, Dt = (e) => e instanceof CryptoKey, we = new TextEncoder(), be = new TextDecoder();
355
+ function wr(...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 fr = (e) => {
362
+ const Tr = (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
- }, ie = (e) => {
367
+ }, j = (e) => {
368
368
  let t = e;
369
- t instanceof Uint8Array && (t = de.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
369
+ t instanceof Uint8Array && (t = be.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
370
370
  try {
371
- return fr(t);
371
+ return Tr(t);
372
372
  } catch {
373
373
  throw new TypeError("The input to be decoded is not correctly encoded.");
374
374
  }
375
375
  };
376
- let q = class extends Error {
376
+ let Z = class extends Error {
377
377
  static get code() {
378
378
  return "ERR_JOSE_GENERIC";
379
379
  }
@@ -381,16 +381,15 @@ let q = class extends Error {
381
381
  var r;
382
382
  super(t), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (r = Error.captureStackTrace) == null || r.call(Error, this, this.constructor);
383
383
  }
384
- };
385
- class $ extends q {
384
+ }, U = class extends Z {
386
385
  static get code() {
387
386
  return "ERR_JWT_CLAIM_VALIDATION_FAILED";
388
387
  }
389
388
  constructor(t, r, a = "unspecified", n = "unspecified") {
390
389
  super(t), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
391
390
  }
392
- }
393
- class tt extends q {
391
+ };
392
+ class it extends Z {
394
393
  static get code() {
395
394
  return "ERR_JWT_EXPIRED";
396
395
  }
@@ -398,7 +397,7 @@ class tt extends q {
398
397
  super(t), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
399
398
  }
400
399
  }
401
- class yr extends q {
400
+ class vr extends Z {
402
401
  constructor() {
403
402
  super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
404
403
  }
@@ -406,22 +405,21 @@ class yr extends q {
406
405
  return "ERR_JOSE_ALG_NOT_ALLOWED";
407
406
  }
408
407
  }
409
- class F extends q {
408
+ let H = class extends Z {
410
409
  constructor() {
411
410
  super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
412
411
  }
413
412
  static get code() {
414
413
  return "ERR_JOSE_NOT_SUPPORTED";
415
414
  }
416
- }
417
- let A = class extends q {
415
+ }, S = class extends Z {
418
416
  constructor() {
419
417
  super(...arguments), this.code = "ERR_JWS_INVALID";
420
418
  }
421
419
  static get code() {
422
420
  return "ERR_JWS_INVALID";
423
421
  }
424
- }, W = class extends q {
422
+ }, J = class extends Z {
425
423
  constructor() {
426
424
  super(...arguments), this.code = "ERR_JWT_INVALID";
427
425
  }
@@ -429,7 +427,7 @@ let A = class extends q {
429
427
  return "ERR_JWT_INVALID";
430
428
  }
431
429
  };
432
- class br extends q {
430
+ class Ir extends Z {
433
431
  constructor() {
434
432
  super(...arguments), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED", this.message = "signature verification failed";
435
433
  }
@@ -437,16 +435,16 @@ class br extends q {
437
435
  return "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
438
436
  }
439
437
  }
440
- function B(e, t = "algorithm.name") {
438
+ function V(e, t = "algorithm.name") {
441
439
  return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
442
440
  }
443
- function he(e, t) {
441
+ function Te(e, t) {
444
442
  return e.name === t;
445
443
  }
446
- function Ue(e) {
444
+ function Be(e) {
447
445
  return parseInt(e.name.slice(4), 10);
448
446
  }
449
- function Er(e) {
447
+ function kr(e) {
450
448
  switch (e) {
451
449
  case "ES256":
452
450
  return "P-256";
@@ -458,7 +456,7 @@ function Er(e) {
458
456
  throw new Error("unreachable");
459
457
  }
460
458
  }
461
- function wr(e, t) {
459
+ function Ar(e, t) {
462
460
  if (t.length && !t.some((r) => e.usages.includes(r))) {
463
461
  let r = "CryptoKey does not support this operation, its usages must include ";
464
462
  if (t.length > 2) {
@@ -468,71 +466,71 @@ function wr(e, t) {
468
466
  throw new TypeError(r);
469
467
  }
470
468
  }
471
- function Tr(e, t, ...r) {
469
+ function Sr(e, t, ...r) {
472
470
  switch (t) {
473
471
  case "HS256":
474
472
  case "HS384":
475
473
  case "HS512": {
476
- if (!he(e.algorithm, "HMAC"))
477
- throw B("HMAC");
474
+ if (!Te(e.algorithm, "HMAC"))
475
+ throw V("HMAC");
478
476
  const a = parseInt(t.slice(2), 10);
479
- if (Ue(e.algorithm.hash) !== a)
480
- throw B(`SHA-${a}`, "algorithm.hash");
477
+ if (Be(e.algorithm.hash) !== a)
478
+ throw V(`SHA-${a}`, "algorithm.hash");
481
479
  break;
482
480
  }
483
481
  case "RS256":
484
482
  case "RS384":
485
483
  case "RS512": {
486
- if (!he(e.algorithm, "RSASSA-PKCS1-v1_5"))
487
- throw B("RSASSA-PKCS1-v1_5");
484
+ if (!Te(e.algorithm, "RSASSA-PKCS1-v1_5"))
485
+ throw V("RSASSA-PKCS1-v1_5");
488
486
  const a = parseInt(t.slice(2), 10);
489
- if (Ue(e.algorithm.hash) !== a)
490
- throw B(`SHA-${a}`, "algorithm.hash");
487
+ if (Be(e.algorithm.hash) !== a)
488
+ throw V(`SHA-${a}`, "algorithm.hash");
491
489
  break;
492
490
  }
493
491
  case "PS256":
494
492
  case "PS384":
495
493
  case "PS512": {
496
- if (!he(e.algorithm, "RSA-PSS"))
497
- throw B("RSA-PSS");
494
+ if (!Te(e.algorithm, "RSA-PSS"))
495
+ throw V("RSA-PSS");
498
496
  const a = parseInt(t.slice(2), 10);
499
- if (Ue(e.algorithm.hash) !== a)
500
- throw B(`SHA-${a}`, "algorithm.hash");
497
+ if (Be(e.algorithm.hash) !== a)
498
+ throw V(`SHA-${a}`, "algorithm.hash");
501
499
  break;
502
500
  }
503
501
  case "EdDSA": {
504
502
  if (e.algorithm.name !== "Ed25519" && e.algorithm.name !== "Ed448")
505
- throw B("Ed25519 or Ed448");
503
+ throw V("Ed25519 or Ed448");
506
504
  break;
507
505
  }
508
506
  case "ES256":
509
507
  case "ES384":
510
508
  case "ES512": {
511
- if (!he(e.algorithm, "ECDSA"))
512
- throw B("ECDSA");
513
- const a = Er(t);
509
+ if (!Te(e.algorithm, "ECDSA"))
510
+ throw V("ECDSA");
511
+ const a = kr(t);
514
512
  if (e.algorithm.namedCurve !== a)
515
- throw B(a, "algorithm.namedCurve");
513
+ throw V(a, "algorithm.namedCurve");
516
514
  break;
517
515
  }
518
516
  default:
519
517
  throw new TypeError("CryptoKey does not support this operation");
520
518
  }
521
- wr(e, r);
519
+ Ar(e, r);
522
520
  }
523
- function Rt(e, t, ...r) {
521
+ function $t(e, t, ...r) {
524
522
  var a;
525
- if (r.length > 2) {
523
+ if (r = r.filter(Boolean), r.length > 2) {
526
524
  const n = r.pop();
527
525
  e += `one of type ${r.join(", ")}, or ${n}.`;
528
526
  } else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
529
527
  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;
530
528
  }
531
- const rt = (e, ...t) => Rt("Key must be ", e, ...t);
532
- function Nt(e, t, ...r) {
533
- return Rt(`Key for the ${e} algorithm must be `, t, ...r);
529
+ const ct = (e, ...t) => $t("Key must be ", e, ...t);
530
+ function Lt(e, t, ...r) {
531
+ return $t(`Key for the ${e} algorithm must be `, t, ...r);
534
532
  }
535
- const xt = (e) => _t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Se = ["CryptoKey"], Ir = (...e) => {
533
+ const Mt = (e) => Dt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ce = ["CryptoKey"], _r = (...e) => {
536
534
  const t = e.filter(Boolean);
537
535
  if (t.length === 0 || t.length === 1)
538
536
  return !0;
@@ -551,11 +549,11 @@ const xt = (e) => _t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
551
549
  }
552
550
  return !0;
553
551
  };
554
- function vr(e) {
552
+ function Rr(e) {
555
553
  return typeof e == "object" && e !== null;
556
554
  }
557
- function Ae(e) {
558
- if (!vr(e) || Object.prototype.toString.call(e) !== "[object Object]")
555
+ function me(e) {
556
+ if (!Rr(e) || Object.prototype.toString.call(e) !== "[object Object]")
559
557
  return !1;
560
558
  if (Object.getPrototypeOf(e) === null)
561
559
  return !0;
@@ -564,14 +562,26 @@ function Ae(e) {
564
562
  t = Object.getPrototypeOf(t);
565
563
  return Object.getPrototypeOf(e) === t;
566
564
  }
567
- const Sr = (e, t) => {
565
+ const Nr = (e, t) => {
568
566
  if (e.startsWith("RS") || e.startsWith("PS")) {
569
567
  const { modulusLength: r } = t.algorithm;
570
568
  if (typeof r != "number" || r < 2048)
571
569
  throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
572
570
  }
573
571
  };
574
- function Ar(e) {
572
+ function he(e) {
573
+ return me(e) && typeof e.kty == "string";
574
+ }
575
+ function xr(e) {
576
+ return e.kty !== "oct" && typeof e.d == "string";
577
+ }
578
+ function Cr(e) {
579
+ return e.kty !== "oct" && typeof e.d > "u";
580
+ }
581
+ function Or(e) {
582
+ return he(e) && e.kty === "oct" && typeof e.k == "string";
583
+ }
584
+ function Pr(e) {
575
585
  let t, r;
576
586
  switch (e.kty) {
577
587
  case "RSA": {
@@ -596,7 +606,7 @@ function Ar(e) {
596
606
  }, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
597
607
  break;
598
608
  default:
599
- throw new F('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
609
+ throw new H('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
600
610
  }
601
611
  break;
602
612
  }
@@ -618,7 +628,7 @@ function Ar(e) {
618
628
  t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
619
629
  break;
620
630
  default:
621
- throw new F('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
631
+ throw new H('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
622
632
  }
623
633
  break;
624
634
  }
@@ -634,52 +644,52 @@ function Ar(e) {
634
644
  t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
635
645
  break;
636
646
  default:
637
- throw new F('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
647
+ throw new H('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
638
648
  }
639
649
  break;
640
650
  }
641
651
  default:
642
- throw new F('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
652
+ throw new H('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
643
653
  }
644
654
  return { algorithm: t, keyUsages: r };
645
655
  }
646
- const kr = async (e) => {
656
+ const Ut = async (e) => {
647
657
  if (!e.alg)
648
658
  throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
649
- const { algorithm: t, keyUsages: r } = Ar(e), a = [
659
+ const { algorithm: t, keyUsages: r } = Pr(e), a = [
650
660
  t,
651
661
  e.ext ?? !1,
652
662
  e.key_ops ?? r
653
663
  ], n = { ...e };
654
- return delete n.alg, delete n.use, Ne.subtle.importKey("jwk", n, ...a);
655
- }, Ct = (e) => ie(e);
656
- let He, Ke;
657
- const Ot = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Pt = async (e, t, r, a) => {
658
- let n = e.get(t);
659
- if (n != null && n[a])
660
- return n[a];
661
- const o = await kr({ ...r, alg: a });
662
- return n ? n[a] = o : e.set(t, { [a]: o }), o;
663
- }, _r = (e, t) => {
664
- if (Ot(e)) {
664
+ return delete n.alg, delete n.use, Le.subtle.importKey("jwk", n, ...a);
665
+ }, Kt = (e) => j(e);
666
+ let ae, ne;
667
+ const Ht = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Oe = async (e, t, r, a, n = !1) => {
668
+ let o = e.get(t);
669
+ if (o != null && o[a])
670
+ return o[a];
671
+ const s = await Ut({ ...r, alg: a });
672
+ return n && Object.freeze(t), o ? o[a] = s : e.set(t, { [a]: s }), s;
673
+ }, Dr = (e, t) => {
674
+ if (Ht(e)) {
665
675
  let r = e.export({ format: "jwk" });
666
- return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Ct(r.k) : (Ke || (Ke = /* @__PURE__ */ new WeakMap()), Pt(Ke, e, r, t));
676
+ return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Kt(r.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), Oe(ne, e, r, t));
667
677
  }
668
- return e;
669
- }, Rr = (e, t) => {
670
- if (Ot(e)) {
678
+ return he(e) ? e.k ? j(e.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), Oe(ne, e, e, t, !0)) : e;
679
+ }, $r = (e, t) => {
680
+ if (Ht(e)) {
671
681
  let r = e.export({ format: "jwk" });
672
- return r.k ? Ct(r.k) : (He || (He = /* @__PURE__ */ new WeakMap()), Pt(He, e, r, t));
682
+ return r.k ? Kt(r.k) : (ae || (ae = /* @__PURE__ */ new WeakMap()), Oe(ae, e, r, t));
673
683
  }
674
- return e;
675
- }, Nr = { normalizePublicKey: _r, normalizePrivateKey: Rr }, Y = (e, t, r = 0) => {
684
+ return he(e) ? e.k ? j(e.k) : (ae || (ae = /* @__PURE__ */ new WeakMap()), Oe(ae, e, e, t, !0)) : e;
685
+ }, Lr = { normalizePublicKey: Dr, normalizePrivateKey: $r }, Y = (e, t, r = 0) => {
676
686
  r === 0 && (t.unshift(t.length), t.unshift(6));
677
687
  const a = e.indexOf(t[0], r);
678
688
  if (a === -1)
679
689
  return !1;
680
690
  const n = e.subarray(a, a + t.length);
681
691
  return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || Y(e, t, a + 1);
682
- }, at = (e) => {
692
+ }, lt = (e) => {
683
693
  switch (!0) {
684
694
  case Y(e, [42, 134, 72, 206, 61, 3, 1, 7]):
685
695
  return "P-256";
@@ -696,9 +706,9 @@ const Ot = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
696
706
  case Y(e, [43, 101, 113]):
697
707
  return "Ed448";
698
708
  default:
699
- throw new F("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
709
+ throw new H("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
700
710
  }
701
- }, xr = async (e, t, r, a, n) => {
711
+ }, Mr = async (e, t, r, a, n) => {
702
712
  let o, s;
703
713
  const i = new Uint8Array(atob(r.replace(e, "")).split("").map((u) => u.charCodeAt(0)));
704
714
  switch (a) {
@@ -734,43 +744,93 @@ const Ot = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
734
744
  case "ECDH-ES+A128KW":
735
745
  case "ECDH-ES+A192KW":
736
746
  case "ECDH-ES+A256KW": {
737
- const u = at(i);
747
+ const u = lt(i);
738
748
  o = u.startsWith("P-") ? { name: "ECDH", namedCurve: u } : { name: u }, s = [];
739
749
  break;
740
750
  }
741
751
  case "EdDSA":
742
- o = { name: at(i) }, s = ["verify"];
752
+ o = { name: lt(i) }, s = ["verify"];
743
753
  break;
744
754
  default:
745
- throw new F('Invalid or unsupported "alg" (Algorithm) value');
755
+ throw new H('Invalid or unsupported "alg" (Algorithm) value');
746
756
  }
747
- return Ne.subtle.importKey(t, i, o, !1, s);
748
- }, Cr = (e, t, r) => xr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
749
- async function Or(e, t, r) {
757
+ return Le.subtle.importKey(t, i, o, !1, s);
758
+ }, Ur = (e, t, r) => Mr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
759
+ async function Kr(e, t, r) {
750
760
  if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
751
761
  throw new TypeError('"spki" must be SPKI formatted string');
752
- return Cr(e, t);
762
+ return Ur(e, t);
763
+ }
764
+ async function Hr(e, t) {
765
+ if (!me(e))
766
+ throw new TypeError("JWK must be an object");
767
+ switch (t || (t = e.alg), e.kty) {
768
+ case "oct":
769
+ if (typeof e.k != "string" || !e.k)
770
+ throw new TypeError('missing "k" (Key Value) Parameter value');
771
+ return j(e.k);
772
+ case "RSA":
773
+ if (e.oth !== void 0)
774
+ throw new H('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
775
+ case "EC":
776
+ case "OKP":
777
+ return Ut({ ...e, alg: t });
778
+ default:
779
+ throw new H('Unsupported "kty" (Key Type) Parameter value');
780
+ }
753
781
  }
754
- const we = (e) => e == null ? void 0 : e[Symbol.toStringTag], Pr = (e, t) => {
782
+ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], qe = (e, t, r) => {
783
+ var a, n;
784
+ if (t.use !== void 0 && t.use !== "sig")
785
+ throw new TypeError("Invalid key for this operation, when present its use must be sig");
786
+ if (t.key_ops !== void 0 && ((n = (a = t.key_ops).includes) == null ? void 0 : n.call(a, r)) !== !0)
787
+ throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${r}`);
788
+ if (t.alg !== void 0 && t.alg !== e)
789
+ throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);
790
+ return !0;
791
+ }, Wr = (e, t, r, a) => {
755
792
  if (!(t instanceof Uint8Array)) {
756
- if (!xt(t))
757
- throw new TypeError(Nt(e, t, ...Se, "Uint8Array"));
793
+ if (a && he(t)) {
794
+ if (Or(t) && qe(e, t, r))
795
+ return;
796
+ 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');
797
+ }
798
+ if (!Mt(t))
799
+ throw new TypeError(Lt(e, t, ...Ce, "Uint8Array", a ? "JSON Web Key" : null));
758
800
  if (t.type !== "secret")
759
- throw new TypeError(`${we(t)} instances for symmetric algorithms must be of type "secret"`);
760
- }
761
- }, Dr = (e, t, r) => {
762
- if (!xt(t))
763
- throw new TypeError(Nt(e, t, ...Se));
801
+ throw new TypeError(`${de(t)} instances for symmetric algorithms must be of type "secret"`);
802
+ }
803
+ }, Br = (e, t, r, a) => {
804
+ if (a && he(t))
805
+ switch (r) {
806
+ case "sign":
807
+ if (xr(t) && qe(e, t, r))
808
+ return;
809
+ throw new TypeError("JSON Web Key for this operation be a private JWK");
810
+ case "verify":
811
+ if (Cr(t) && qe(e, t, r))
812
+ return;
813
+ throw new TypeError("JSON Web Key for this operation be a public JWK");
814
+ }
815
+ if (!Mt(t))
816
+ throw new TypeError(Lt(e, t, ...Ce, a ? "JSON Web Key" : null));
764
817
  if (t.type === "secret")
765
- throw new TypeError(`${we(t)} instances for asymmetric algorithms must not be of type "secret"`);
818
+ throw new TypeError(`${de(t)} instances for asymmetric algorithms must not be of type "secret"`);
819
+ if (r === "sign" && t.type === "public")
820
+ throw new TypeError(`${de(t)} instances for asymmetric algorithm signing must be of type "private"`);
821
+ if (r === "decrypt" && t.type === "public")
822
+ throw new TypeError(`${de(t)} instances for asymmetric algorithm decryption must be of type "private"`);
766
823
  if (t.algorithm && r === "verify" && t.type === "private")
767
- throw new TypeError(`${we(t)} instances for asymmetric algorithm verifying must be of type "public"`);
824
+ throw new TypeError(`${de(t)} instances for asymmetric algorithm verifying must be of type "public"`);
768
825
  if (t.algorithm && r === "encrypt" && t.type === "private")
769
- throw new TypeError(`${we(t)} instances for asymmetric algorithm encryption must be of type "public"`);
770
- }, $r = (e, t, r) => {
771
- e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? Pr(e, t) : Dr(e, t, r);
826
+ throw new TypeError(`${de(t)} instances for asymmetric algorithm encryption must be of type "public"`);
772
827
  };
773
- function Lr(e, t, r, a, n) {
828
+ function Wt(e, t, r, a) {
829
+ t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Wr(t, r, a, e) : Br(t, r, a, e);
830
+ }
831
+ Wt.bind(void 0, !1);
832
+ const dt = Wt.bind(void 0, !0);
833
+ function Gr(e, t, r, a, n) {
774
834
  if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
775
835
  throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
776
836
  if (!a || a.crit === void 0)
@@ -781,7 +841,7 @@ function Lr(e, t, r, a, n) {
781
841
  r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
782
842
  for (const s of a.crit) {
783
843
  if (!o.has(s))
784
- throw new F(`Extension Header Parameter "${s}" is not recognized`);
844
+ throw new H(`Extension Header Parameter "${s}" is not recognized`);
785
845
  if (n[s] === void 0)
786
846
  throw new e(`Extension Header Parameter "${s}" is missing`);
787
847
  if (o.get(s) && a[s] === void 0)
@@ -789,13 +849,13 @@ function Lr(e, t, r, a, n) {
789
849
  }
790
850
  return new Set(a.crit);
791
851
  }
792
- const Mr = (e, t) => {
852
+ const Vr = (e, t) => {
793
853
  if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
794
854
  throw new TypeError(`"${e}" option must be an array of strings`);
795
855
  if (t)
796
856
  return new Set(t);
797
857
  };
798
- function Ur(e, t) {
858
+ function Jr(e, t) {
799
859
  const r = `SHA-${e.slice(-3)}`;
800
860
  switch (e) {
801
861
  case "HS256":
@@ -817,103 +877,103 @@ function Ur(e, t) {
817
877
  case "EdDSA":
818
878
  return { name: t.name };
819
879
  default:
820
- throw new F(`alg ${e} is not supported either by JOSE or your javascript runtime`);
880
+ throw new H(`alg ${e} is not supported either by JOSE or your javascript runtime`);
821
881
  }
822
882
  }
823
- async function Hr(e, t, r) {
824
- if (t = await Nr.normalizePublicKey(t, e), _t(t))
825
- return Tr(t, e, r), t;
883
+ async function Yr(e, t, r) {
884
+ if (t = await Lr.normalizePublicKey(t, e), Dt(t))
885
+ return Sr(t, e, r), t;
826
886
  if (t instanceof Uint8Array) {
827
887
  if (!e.startsWith("HS"))
828
- throw new TypeError(rt(t, ...Se));
829
- return Ne.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
888
+ throw new TypeError(ct(t, ...Ce));
889
+ return Le.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
830
890
  }
831
- throw new TypeError(rt(t, ...Se, "Uint8Array"));
891
+ throw new TypeError(ct(t, ...Ce, "Uint8Array", "JSON Web Key"));
832
892
  }
833
- const Kr = async (e, t, r, a) => {
834
- const n = await Hr(e, t, "verify");
835
- Sr(e, n);
836
- const o = Ur(e, n.algorithm);
893
+ const Fr = async (e, t, r, a) => {
894
+ const n = await Yr(e, t, "verify");
895
+ Nr(e, n);
896
+ const o = Jr(e, n.algorithm);
837
897
  try {
838
- return await Ne.subtle.verify(o, n, r, a);
898
+ return await Le.subtle.verify(o, n, r, a);
839
899
  } catch {
840
900
  return !1;
841
901
  }
842
902
  };
843
- async function Br(e, t, r) {
844
- if (!Ae(e))
845
- throw new A("Flattened JWS must be an object");
903
+ async function zr(e, t, r) {
904
+ if (!me(e))
905
+ throw new S("Flattened JWS must be an object");
846
906
  if (e.protected === void 0 && e.header === void 0)
847
- throw new A('Flattened JWS must have either of the "protected" or "header" members');
907
+ throw new S('Flattened JWS must have either of the "protected" or "header" members');
848
908
  if (e.protected !== void 0 && typeof e.protected != "string")
849
- throw new A("JWS Protected Header incorrect type");
909
+ throw new S("JWS Protected Header incorrect type");
850
910
  if (e.payload === void 0)
851
- throw new A("JWS Payload missing");
911
+ throw new S("JWS Payload missing");
852
912
  if (typeof e.signature != "string")
853
- throw new A("JWS Signature missing or incorrect type");
854
- if (e.header !== void 0 && !Ae(e.header))
855
- throw new A("JWS Unprotected Header incorrect type");
913
+ throw new S("JWS Signature missing or incorrect type");
914
+ if (e.header !== void 0 && !me(e.header))
915
+ throw new S("JWS Unprotected Header incorrect type");
856
916
  let a = {};
857
917
  if (e.protected)
858
918
  try {
859
- const y = ie(e.protected);
860
- a = JSON.parse(de.decode(y));
919
+ const f = j(e.protected);
920
+ a = JSON.parse(be.decode(f));
861
921
  } catch {
862
- throw new A("JWS Protected Header is invalid");
922
+ throw new S("JWS Protected Header is invalid");
863
923
  }
864
- if (!Ir(a, e.header))
865
- throw new A("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
924
+ if (!_r(a, e.header))
925
+ throw new S("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
866
926
  const n = {
867
927
  ...a,
868
928
  ...e.header
869
- }, o = Lr(A, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
929
+ }, o = Gr(S, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
870
930
  let s = !0;
871
931
  if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
872
- throw new A('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
932
+ throw new S('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
873
933
  const { alg: i } = n;
874
934
  if (typeof i != "string" || !i)
875
- throw new A('JWS "alg" (Algorithm) Header Parameter missing or invalid');
876
- const u = r && Mr("algorithms", r.algorithms);
935
+ throw new S('JWS "alg" (Algorithm) Header Parameter missing or invalid');
936
+ const u = r && Vr("algorithms", r.algorithms);
877
937
  if (u && !u.has(i))
878
- throw new yr('"alg" (Algorithm) Header Parameter value not allowed');
938
+ throw new vr('"alg" (Algorithm) Header Parameter value not allowed');
879
939
  if (s) {
880
940
  if (typeof e.payload != "string")
881
- throw new A("JWS Payload must be a string");
941
+ throw new S("JWS Payload must be a string");
882
942
  } else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
883
- throw new A("JWS Payload must be a string or an Uint8Array instance");
943
+ throw new S("JWS Payload must be a string or an Uint8Array instance");
884
944
  let h = !1;
885
- typeof t == "function" && (t = await t(a, e), h = !0), $r(i, t, "verify");
886
- const p = gr(me.encode(e.protected ?? ""), me.encode("."), typeof e.payload == "string" ? me.encode(e.payload) : e.payload);
945
+ typeof t == "function" ? (t = await t(a, e), h = !0, dt(i, t, "verify"), he(t) && (t = await Hr(t, i))) : dt(i, t, "verify");
946
+ const p = wr(we.encode(e.protected ?? ""), we.encode("."), typeof e.payload == "string" ? we.encode(e.payload) : e.payload);
887
947
  let m;
888
948
  try {
889
- m = ie(e.signature);
949
+ m = j(e.signature);
890
950
  } catch {
891
- throw new A("Failed to base64url decode the signature");
951
+ throw new S("Failed to base64url decode the signature");
892
952
  }
893
- if (!await Kr(i, t, m, p))
894
- throw new br();
953
+ if (!await Fr(i, t, m, p))
954
+ throw new Ir();
895
955
  let l;
896
956
  if (s)
897
957
  try {
898
- l = ie(e.payload);
958
+ l = j(e.payload);
899
959
  } catch {
900
- throw new A("Failed to base64url decode the payload");
960
+ throw new S("Failed to base64url decode the payload");
901
961
  }
902
- else typeof e.payload == "string" ? l = me.encode(e.payload) : l = e.payload;
962
+ else typeof e.payload == "string" ? l = we.encode(e.payload) : l = e.payload;
903
963
  const d = { payload: l };
904
964
  return e.protected !== void 0 && (d.protectedHeader = a), e.header !== void 0 && (d.unprotectedHeader = e.header), h ? { ...d, key: t } : d;
905
965
  }
906
- async function Wr(e, t, r) {
907
- if (e instanceof Uint8Array && (e = de.decode(e)), typeof e != "string")
908
- throw new A("Compact JWS must be a string or Uint8Array");
966
+ async function jr(e, t, r) {
967
+ if (e instanceof Uint8Array && (e = be.decode(e)), typeof e != "string")
968
+ throw new S("Compact JWS must be a string or Uint8Array");
909
969
  const { 0: a, 1: n, 2: o, length: s } = e.split(".");
910
970
  if (s !== 3)
911
- throw new A("Invalid Compact JWS");
912
- const i = await Br({ payload: n, protected: a, signature: o }, t, r), u = { payload: i.payload, protectedHeader: i.protectedHeader };
971
+ throw new S("Invalid Compact JWS");
972
+ const i = await zr({ payload: n, protected: a, signature: o }, t, r), u = { payload: i.payload, protectedHeader: i.protectedHeader };
913
973
  return typeof t == "function" ? { ...u, key: i.key } : u;
914
974
  }
915
- const Gr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, ze = $t * 24, Vr = ze * 7, Yr = ze * 365.25, Jr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, nt = (e) => {
916
- const t = Jr.exec(e);
975
+ const qr = (e) => Math.floor(e.getTime() / 1e3), Bt = 60, Gt = Bt * 60, Ze = Gt * 24, Xr = Ze * 7, Qr = Ze * 365.25, Zr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, ut = (e) => {
976
+ const t = Zr.exec(e);
917
977
  if (!t || t[4] && t[1])
918
978
  throw new TypeError("Invalid time period format");
919
979
  const r = parseFloat(t[2]), a = t[3].toLowerCase();
@@ -931,56 +991,56 @@ const Gr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, ze = $t
931
991
  case "min":
932
992
  case "mins":
933
993
  case "m":
934
- n = Math.round(r * Dt);
994
+ n = Math.round(r * Bt);
935
995
  break;
936
996
  case "hour":
937
997
  case "hours":
938
998
  case "hr":
939
999
  case "hrs":
940
1000
  case "h":
941
- n = Math.round(r * $t);
1001
+ n = Math.round(r * Gt);
942
1002
  break;
943
1003
  case "day":
944
1004
  case "days":
945
1005
  case "d":
946
- n = Math.round(r * ze);
1006
+ n = Math.round(r * Ze);
947
1007
  break;
948
1008
  case "week":
949
1009
  case "weeks":
950
1010
  case "w":
951
- n = Math.round(r * Vr);
1011
+ n = Math.round(r * Xr);
952
1012
  break;
953
1013
  default:
954
- n = Math.round(r * Yr);
1014
+ n = Math.round(r * Qr);
955
1015
  break;
956
1016
  }
957
1017
  return t[1] === "-" || t[4] === "ago" ? -n : n;
958
- }, ot = (e) => e.toLowerCase().replace(/^application\//, ""), Fr = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, jr = (e, t, r = {}) => {
1018
+ }, mt = (e) => e.toLowerCase().replace(/^application\//, ""), ea = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, ta = (e, t, r = {}) => {
959
1019
  let a;
960
1020
  try {
961
- a = JSON.parse(de.decode(t));
1021
+ a = JSON.parse(be.decode(t));
962
1022
  } catch {
963
1023
  }
964
- if (!Ae(a))
965
- throw new W("JWT Claims Set must be a top-level JSON object");
1024
+ if (!me(a))
1025
+ throw new J("JWT Claims Set must be a top-level JSON object");
966
1026
  const { typ: n } = r;
967
- if (n && (typeof e.typ != "string" || ot(e.typ) !== ot(n)))
968
- throw new $('unexpected "typ" JWT header value', a, "typ", "check_failed");
1027
+ if (n && (typeof e.typ != "string" || mt(e.typ) !== mt(n)))
1028
+ throw new U('unexpected "typ" JWT header value', a, "typ", "check_failed");
969
1029
  const { requiredClaims: o = [], issuer: s, subject: i, audience: u, maxTokenAge: h } = r, p = [...o];
970
1030
  h !== void 0 && p.push("iat"), u !== void 0 && p.push("aud"), i !== void 0 && p.push("sub"), s !== void 0 && p.push("iss");
971
- for (const y of new Set(p.reverse()))
972
- if (!(y in a))
973
- throw new $(`missing required "${y}" claim`, a, y, "missing");
1031
+ for (const f of new Set(p.reverse()))
1032
+ if (!(f in a))
1033
+ throw new U(`missing required "${f}" claim`, a, f, "missing");
974
1034
  if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
975
- throw new $('unexpected "iss" claim value', a, "iss", "check_failed");
1035
+ throw new U('unexpected "iss" claim value', a, "iss", "check_failed");
976
1036
  if (i && a.sub !== i)
977
- throw new $('unexpected "sub" claim value', a, "sub", "check_failed");
978
- if (u && !Fr(a.aud, typeof u == "string" ? [u] : u))
979
- throw new $('unexpected "aud" claim value', a, "aud", "check_failed");
1037
+ throw new U('unexpected "sub" claim value', a, "sub", "check_failed");
1038
+ if (u && !ea(a.aud, typeof u == "string" ? [u] : u))
1039
+ throw new U('unexpected "aud" claim value', a, "aud", "check_failed");
980
1040
  let m;
981
1041
  switch (typeof r.clockTolerance) {
982
1042
  case "string":
983
- m = nt(r.clockTolerance);
1043
+ m = ut(r.clockTolerance);
984
1044
  break;
985
1045
  case "number":
986
1046
  m = r.clockTolerance;
@@ -991,187 +1051,187 @@ const Gr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, ze = $t
991
1051
  default:
992
1052
  throw new TypeError("Invalid clockTolerance option type");
993
1053
  }
994
- const { currentDate: l } = r, d = Gr(l || /* @__PURE__ */ new Date());
1054
+ const { currentDate: l } = r, d = qr(l || /* @__PURE__ */ new Date());
995
1055
  if ((a.iat !== void 0 || h) && typeof a.iat != "number")
996
- throw new $('"iat" claim must be a number', a, "iat", "invalid");
1056
+ throw new U('"iat" claim must be a number', a, "iat", "invalid");
997
1057
  if (a.nbf !== void 0) {
998
1058
  if (typeof a.nbf != "number")
999
- throw new $('"nbf" claim must be a number', a, "nbf", "invalid");
1059
+ throw new U('"nbf" claim must be a number', a, "nbf", "invalid");
1000
1060
  if (a.nbf > d + m)
1001
- throw new $('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
1061
+ throw new U('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
1002
1062
  }
1003
1063
  if (a.exp !== void 0) {
1004
1064
  if (typeof a.exp != "number")
1005
- throw new $('"exp" claim must be a number', a, "exp", "invalid");
1065
+ throw new U('"exp" claim must be a number', a, "exp", "invalid");
1006
1066
  if (a.exp <= d - m)
1007
- throw new tt('"exp" claim timestamp check failed', a, "exp", "check_failed");
1067
+ throw new it('"exp" claim timestamp check failed', a, "exp", "check_failed");
1008
1068
  }
1009
1069
  if (h) {
1010
- const y = d - a.iat, E = typeof h == "number" ? h : nt(h);
1011
- if (y - m > E)
1012
- throw new tt('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
1013
- if (y < 0 - m)
1014
- throw new $('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
1070
+ const f = d - a.iat, b = typeof h == "number" ? h : ut(h);
1071
+ if (f - m > b)
1072
+ throw new it('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
1073
+ if (f < 0 - m)
1074
+ throw new U('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
1015
1075
  }
1016
1076
  return a;
1017
1077
  };
1018
- async function zr(e, t, r) {
1078
+ async function ra(e, t, r) {
1019
1079
  var a;
1020
- const n = await Wr(e, t, r);
1080
+ const n = await jr(e, t, r);
1021
1081
  if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
1022
- throw new W("JWTs MUST NOT use unencoded payload");
1023
- const o = { payload: jr(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
1082
+ throw new J("JWTs MUST NOT use unencoded payload");
1083
+ const o = { payload: ta(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
1024
1084
  return typeof t == "function" ? { ...o, key: n.key } : o;
1025
1085
  }
1026
- const qr = ie;
1027
- function Qr(e) {
1086
+ const aa = j;
1087
+ function na(e) {
1028
1088
  if (typeof e != "string")
1029
- throw new W("JWTs must use Compact JWS serialization, JWT must be a string");
1089
+ throw new J("JWTs must use Compact JWS serialization, JWT must be a string");
1030
1090
  const { 1: t, length: r } = e.split(".");
1031
1091
  if (r === 5)
1032
- throw new W("Only JWTs using Compact JWS serialization can be decoded");
1092
+ throw new J("Only JWTs using Compact JWS serialization can be decoded");
1033
1093
  if (r !== 3)
1034
- throw new W("Invalid JWT");
1094
+ throw new J("Invalid JWT");
1035
1095
  if (!t)
1036
- throw new W("JWTs must contain a payload");
1096
+ throw new J("JWTs must contain a payload");
1037
1097
  let a;
1038
1098
  try {
1039
- a = qr(t);
1099
+ a = aa(t);
1040
1100
  } catch {
1041
- throw new W("Failed to base64url decode the payload");
1101
+ throw new J("Failed to base64url decode the payload");
1042
1102
  }
1043
1103
  let n;
1044
1104
  try {
1045
- n = JSON.parse(de.decode(a));
1105
+ n = JSON.parse(be.decode(a));
1046
1106
  } catch {
1047
- throw new W("Failed to parse the decoded payload as JSON");
1107
+ throw new J("Failed to parse the decoded payload as JSON");
1048
1108
  }
1049
- if (!Ae(n))
1050
- throw new W("Invalid JWT Claims Set");
1109
+ if (!me(n))
1110
+ throw new J("Invalid JWT Claims Set");
1051
1111
  return n;
1052
1112
  }
1053
- const ce = async (e) => {
1113
+ const fe = async (e) => {
1054
1114
  try {
1055
- const t = k.ALG, r = await Or(pr, t);
1056
- return await zr(e, r, {
1057
- issuer: k.ISSUER
1115
+ const t = _.ALG, r = await Kr(Er, t);
1116
+ return await ra(e, r, {
1117
+ issuer: _.ISSUER
1058
1118
  });
1059
1119
  } catch {
1060
1120
  return;
1061
1121
  }
1062
- }, Xr = (e) => {
1122
+ }, oa = (e) => {
1063
1123
  try {
1064
- return Qr(e);
1124
+ return na(e);
1065
1125
  } catch {
1066
1126
  return;
1067
1127
  }
1068
1128
  };
1069
- var v = [];
1070
- for (var Be = 0; Be < 256; ++Be)
1071
- v.push((Be + 256).toString(16).slice(1));
1072
- function Zr(e, t = 0) {
1073
- return (v[e[t + 0]] + v[e[t + 1]] + v[e[t + 2]] + v[e[t + 3]] + "-" + v[e[t + 4]] + v[e[t + 5]] + "-" + v[e[t + 6]] + v[e[t + 7]] + "-" + v[e[t + 8]] + v[e[t + 9]] + "-" + v[e[t + 10]] + v[e[t + 11]] + v[e[t + 12]] + v[e[t + 13]] + v[e[t + 14]] + v[e[t + 15]]).toLowerCase();
1074
- }
1075
- var pe, ea = new Uint8Array(16);
1076
- function ta() {
1077
- if (!pe && (pe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !pe))
1129
+ var k = [];
1130
+ for (var Ge = 0; Ge < 256; ++Ge)
1131
+ k.push((Ge + 256).toString(16).slice(1));
1132
+ function sa(e, t = 0) {
1133
+ 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();
1134
+ }
1135
+ var ve, ia = new Uint8Array(16);
1136
+ function ca() {
1137
+ if (!ve && (ve = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ve))
1078
1138
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1079
- return pe(ea);
1139
+ return ve(ia);
1080
1140
  }
1081
- var ra = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1082
- const st = {
1083
- randomUUID: ra
1141
+ var la = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1142
+ const ht = {
1143
+ randomUUID: la
1084
1144
  };
1085
- function it(e, t, r) {
1086
- if (st.randomUUID && !t && !e)
1087
- return st.randomUUID();
1145
+ function pt(e, t, r) {
1146
+ if (ht.randomUUID && !t && !e)
1147
+ return ht.randomUUID();
1088
1148
  e = e || {};
1089
- var a = e.random || (e.rng || ta)();
1090
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Zr(a);
1149
+ var a = e.random || (e.rng || ca)();
1150
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, sa(a);
1091
1151
  }
1092
- const ct = globalThis.crypto, aa = (e) => `${it()}${it()}`.slice(0, e), na = (e) => btoa(
1152
+ const gt = globalThis.crypto, da = (e) => `${pt()}${pt()}`.slice(0, e), ua = (e) => btoa(
1093
1153
  [...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
1094
1154
  );
1095
- async function oa(e) {
1096
- if (!ct.subtle)
1155
+ async function ma(e) {
1156
+ if (!gt.subtle)
1097
1157
  throw new Error(
1098
1158
  "crypto.subtle is available only in secure contexts (HTTPS)."
1099
1159
  );
1100
- const t = new TextEncoder().encode(e), r = await ct.subtle.digest("SHA-256", t);
1101
- return na(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
1160
+ const t = new TextEncoder().encode(e), r = await gt.subtle.digest("SHA-256", t);
1161
+ return ua(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
1102
1162
  }
1103
- async function sa(e) {
1104
- const t = aa(43), r = await oa(t);
1163
+ async function ha(e) {
1164
+ const t = da(43), r = await ma(t);
1105
1165
  return {
1106
1166
  code_verifier: t,
1107
1167
  code_challenge: r
1108
1168
  };
1109
1169
  }
1110
- function Lt(e, t) {
1170
+ function Vt(e, t) {
1111
1171
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
1112
1172
  }
1113
- const lt = (e, t) => {
1173
+ const ft = (e, t) => {
1114
1174
  const r = JSON.stringify(
1115
1175
  typeof t == "function" ? t() : t
1116
1176
  );
1117
- window.localStorage.setItem(e, r), Lt(e, r);
1118
- }, ia = (e) => {
1119
- window.localStorage.removeItem(e), Lt(e, null);
1120
- }, dt = (e) => window.localStorage.getItem(e), ca = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
1121
- function ge({
1177
+ window.localStorage.setItem(e, r), Vt(e, r);
1178
+ }, pa = (e) => {
1179
+ window.localStorage.removeItem(e), Vt(e, null);
1180
+ }, yt = (e) => window.localStorage.getItem(e), ga = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
1181
+ function Ie({
1122
1182
  key: e,
1123
1183
  initialValue: t
1124
1184
  }) {
1125
- const r = ar(ca, () => dt(e)), a = j(
1185
+ const r = lr(ga, () => yt(e)), a = z(
1126
1186
  (s) => {
1127
1187
  try {
1128
1188
  const i = typeof s == "function" ? s(JSON.parse(r)) : s;
1129
- i == null ? ia(e) : lt(e, i);
1189
+ i == null ? pa(e) : ft(e, i);
1130
1190
  } catch (i) {
1131
1191
  console.warn(i);
1132
1192
  }
1133
1193
  },
1134
1194
  [e, r]
1135
- ), n = j(() => {
1195
+ ), n = z(() => {
1136
1196
  a(t);
1137
- }, [t, a]), o = j(() => {
1197
+ }, [t, a]), o = z(() => {
1138
1198
  a(null);
1139
1199
  }, [a]);
1140
- return z(() => {
1200
+ return q(() => {
1141
1201
  try {
1142
- dt(e) === null && typeof t < "u" && lt(e, t);
1202
+ yt(e) === null && typeof t < "u" && ft(e, t);
1143
1203
  } catch (s) {
1144
1204
  console.warn(s);
1145
1205
  }
1146
1206
  }, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
1147
1207
  }
1148
- var S = [];
1149
- for (var We = 0; We < 256; ++We)
1150
- S.push((We + 256).toString(16).slice(1));
1151
- function la(e, t = 0) {
1152
- return (S[e[t + 0]] + S[e[t + 1]] + S[e[t + 2]] + S[e[t + 3]] + "-" + S[e[t + 4]] + S[e[t + 5]] + "-" + S[e[t + 6]] + S[e[t + 7]] + "-" + S[e[t + 8]] + S[e[t + 9]] + "-" + S[e[t + 10]] + S[e[t + 11]] + S[e[t + 12]] + S[e[t + 13]] + S[e[t + 14]] + S[e[t + 15]]).toLowerCase();
1208
+ var A = [];
1209
+ for (var Ve = 0; Ve < 256; ++Ve)
1210
+ A.push((Ve + 256).toString(16).slice(1));
1211
+ function fa(e, t = 0) {
1212
+ 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();
1153
1213
  }
1154
- var fe, da = new Uint8Array(16);
1155
- function ua() {
1156
- if (!fe && (fe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !fe))
1214
+ var ke, ya = new Uint8Array(16);
1215
+ function ba() {
1216
+ if (!ke && (ke = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ke))
1157
1217
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1158
- return fe(da);
1218
+ return ke(ya);
1159
1219
  }
1160
- var ma = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1161
- const ut = {
1162
- randomUUID: ma
1220
+ var Ea = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1221
+ const bt = {
1222
+ randomUUID: Ea
1163
1223
  };
1164
- function Ge(e, t, r) {
1165
- if (ut.randomUUID && !t && !e)
1166
- return ut.randomUUID();
1224
+ function Je(e, t, r) {
1225
+ if (bt.randomUUID && !t && !e)
1226
+ return bt.randomUUID();
1167
1227
  e = e || {};
1168
- var a = e.random || (e.rng || ua)();
1169
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, la(a);
1228
+ var a = e.random || (e.rng || ba)();
1229
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, fa(a);
1170
1230
  }
1171
- const Z = "Your session has expired. For your security, please log in again to continue.", ha = "Your session has been successfully terminated.", Ve = "Login failed. Please try again.", pa = "Error getting access token, please re-authenticate.", ga = "You forgot to wrap your component in <AuthProvider>.", ke = {
1231
+ const oe = "Your session has expired. For your security, please log in again to continue.", wa = "Your session has been successfully terminated.", Ye = "Login failed. Please try again.", Ta = "Error getting access token, please re-authenticate.", va = "You forgot to wrap your component in <AuthProvider>.", Pe = {
1172
1232
  dev: "https://auth.gizmette.local.com:3003",
1173
1233
  prod: "https://mylogin.gizmette.com/auth"
1174
- }, ye = "@@auth@@", se = "LOADING", Te = "LOGIN", Mt = "LOGOUT", ue = "success", M = "failure", Ut = "include", Ht = "POST", Kt = "application/json", be = {
1234
+ }, Ae = "@@auth@@", ge = "LOADING", Re = "LOGIN", Jt = "LOGOUT", Ee = "success", B = "failure", Yt = "include", Ft = "POST", zt = "application/json", Se = {
1175
1235
  GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
1176
1236
  $clientId: String!,
1177
1237
  $username: String!,
@@ -1252,24 +1312,24 @@ const Z = "Your session has expired. For your security, please log in again to c
1252
1312
  email
1253
1313
  }
1254
1314
  }`
1255
- }, ee = {
1315
+ }, se = {
1256
1316
  GET_REGISTRATION_OPTIONS: {
1257
- schema: be.GET_REGISTRATION_OPTIONS,
1317
+ schema: Se.GET_REGISTRATION_OPTIONS,
1258
1318
  method: "getPasskeyRegistrationOptions"
1259
1319
  },
1260
1320
  VERIFY_REGISTRATION: {
1261
- schema: be.VERIFY_REGISTRATION,
1321
+ schema: Se.VERIFY_REGISTRATION,
1262
1322
  method: "verifyPasskeyRegistration"
1263
1323
  },
1264
1324
  GET_AUTHENTICATION_OPTIONS: {
1265
- schema: be.GET_AUTHENTICATION_OPTIONS,
1325
+ schema: Se.GET_AUTHENTICATION_OPTIONS,
1266
1326
  method: "getPasskeyAuthenticationOptions"
1267
1327
  },
1268
1328
  VERIFY_AUTHENTICATION: {
1269
- schema: be.VERIFY_AUTHENTICATION,
1329
+ schema: Se.VERIFY_AUTHENTICATION,
1270
1330
  method: "verifyPasskeyAuthentication"
1271
1331
  }
1272
- }, te = async ({
1332
+ }, ie = async ({
1273
1333
  accessToken: e,
1274
1334
  type: t,
1275
1335
  clientId: r,
@@ -1277,14 +1337,14 @@ const Z = "Your session has expired. For your security, please log in again to c
1277
1337
  }) => {
1278
1338
  try {
1279
1339
  const n = `Bearer ${e}`, o = await fetch(
1280
- Bt ? `${ke.dev}/graphql` : `${ke.prod}/graphql`,
1340
+ jt ? `${Pe.dev}/graphql` : `${Pe.prod}/graphql`,
1281
1341
  {
1282
- credentials: Ut,
1283
- method: Ht,
1342
+ credentials: Yt,
1343
+ method: Ft,
1284
1344
  headers: {
1285
1345
  authorization: n,
1286
- "Content-Type": Kt,
1287
- [kt.CLIENT_ID]: `${r}`
1346
+ "Content-Type": zt,
1347
+ [Pt.CLIENT_ID]: `${r}`
1288
1348
  },
1289
1349
  body: JSON.stringify({
1290
1350
  query: t.schema,
@@ -1293,58 +1353,58 @@ const Z = "Your session has expired. For your security, please log in again to c
1293
1353
  }
1294
1354
  );
1295
1355
  if (o.status !== 200)
1296
- return { status: M, data: [] };
1356
+ return { status: B, data: [] };
1297
1357
  const { data: s } = await o.json();
1298
1358
  return {
1299
- status: ue,
1359
+ status: Ee,
1300
1360
  data: s[t.method]
1301
1361
  };
1302
1362
  } catch (n) {
1303
- return console.error(n), { status: M, data: [] };
1363
+ return console.error(n), { status: B, data: [] };
1304
1364
  }
1305
- }, xe = async ({
1365
+ }, Me = async ({
1306
1366
  type: e,
1307
1367
  clientId: t,
1308
1368
  params: r = {}
1309
1369
  }) => {
1310
1370
  try {
1311
1371
  const a = await fetch(
1312
- Bt ? `${ke.dev}/${e}` : `${ke.prod}/${e}`,
1372
+ jt ? `${Pe.dev}/${e}` : `${Pe.prod}/${e}`,
1313
1373
  {
1314
- credentials: Ut,
1315
- method: Ht,
1374
+ credentials: Yt,
1375
+ method: Ft,
1316
1376
  headers: {
1317
- "Content-Type": Kt,
1318
- [kt.CLIENT_ID]: `${t}`
1377
+ "Content-Type": zt,
1378
+ [Pt.CLIENT_ID]: `${t}`
1319
1379
  },
1320
1380
  body: JSON.stringify(r)
1321
1381
  }
1322
1382
  );
1323
1383
  if (a.status !== 200)
1324
- return { status: M, data: [] };
1384
+ return { status: B, data: [] };
1325
1385
  const { data: n } = await a.json();
1326
1386
  return {
1327
- status: ue,
1387
+ status: Ee,
1328
1388
  data: n || []
1329
1389
  };
1330
1390
  } catch (a) {
1331
- return console.error(a), { status: M, data: [] };
1391
+ return console.error(a), { status: B, data: [] };
1332
1392
  }
1333
- }, fa = process.env.NODE_ENV === "production", Bt = !fa, Wt = {
1393
+ }, Ia = process.env.NODE_ENV === "production", jt = !Ia, qt = {
1334
1394
  isLoading: !0,
1335
1395
  isAuthenticated: !1,
1336
1396
  user: void 0,
1337
1397
  logoutReason: "",
1338
1398
  debug: !1,
1339
1399
  authenticationType: ""
1340
- }, ya = (e) => {
1400
+ }, ka = (e) => {
1341
1401
  try {
1342
- const t = Xr(e);
1343
- return t ? t[k.USER_ID_KEY] : "";
1402
+ const t = oa(e);
1403
+ return t ? t[_.USER_ID_KEY] : "";
1344
1404
  } catch {
1345
1405
  return "";
1346
1406
  }
1347
- }, ba = async ({
1407
+ }, Aa = async ({
1348
1408
  userId: e,
1349
1409
  clientId: t,
1350
1410
  domain: r,
@@ -1353,22 +1413,22 @@ const Z = "Your session has expired. For your security, please log in again to c
1353
1413
  var n;
1354
1414
  try {
1355
1415
  return {
1356
- status: ((n = await xe({
1357
- type: Re.LOGOUT,
1416
+ status: ((n = await Me({
1417
+ type: $e.LOGOUT,
1358
1418
  clientId: t,
1359
1419
  params: {
1360
1420
  userId: e,
1361
1421
  domain: r,
1362
1422
  idToken: a
1363
1423
  }
1364
- })) == null ? void 0 : n.status) || M
1424
+ })) == null ? void 0 : n.status) || B
1365
1425
  };
1366
1426
  } catch {
1367
1427
  return {
1368
- status: M
1428
+ status: B
1369
1429
  };
1370
1430
  }
1371
- }, Ea = async ({
1431
+ }, Sa = async ({
1372
1432
  username: e,
1373
1433
  password: t,
1374
1434
  clientId: r,
@@ -1382,11 +1442,11 @@ const Z = "Your session has expired. For your security, please log in again to c
1382
1442
  }) => {
1383
1443
  var p;
1384
1444
  try {
1385
- const m = await xe({
1386
- type: Re.LOGIN,
1445
+ const m = await Me({
1446
+ type: $e.LOGIN,
1387
1447
  clientId: r,
1388
1448
  params: {
1389
- type: n || ne.ID_AND_ACCESS_TOKEN,
1449
+ type: n || ue.ID_AND_ACCESS_TOKEN,
1390
1450
  username: e,
1391
1451
  password: t,
1392
1452
  sessionExpiration: o,
@@ -1396,13 +1456,13 @@ const Z = "Your session has expired. For your security, please log in again to c
1396
1456
  domain: u,
1397
1457
  ua: h
1398
1458
  }
1399
- }), l = await ce((p = m == null ? void 0 : m.data) == null ? void 0 : p.idToken);
1400
- return l && l.payload[k.USER_ID_KEY] !== "" && l.payload[k.NONCE_KEY] === a ? {
1459
+ }), l = await fe((p = m == null ? void 0 : m.data) == null ? void 0 : p.idToken);
1460
+ return l && l.payload[_.USER_ID_KEY] !== "" && l.payload[_.NONCE_KEY] === a ? {
1401
1461
  idToken: m.data.idToken,
1402
1462
  accessToken: m.data.accessToken,
1403
1463
  refreshToken: m.data.refreshToken,
1404
- userId: l.payload[k.USER_ID_KEY],
1405
- email: l.payload[k.EMAIL_KEY],
1464
+ userId: l.payload[_.USER_ID_KEY],
1465
+ email: l.payload[_.EMAIL_KEY],
1406
1466
  status: !0
1407
1467
  } : {
1408
1468
  status: !1
@@ -1412,36 +1472,36 @@ const Z = "Your session has expired. For your security, please log in again to c
1412
1472
  status: !1
1413
1473
  };
1414
1474
  }
1415
- }, wa = async ({
1475
+ }, _a = async ({
1416
1476
  nonce: e,
1417
1477
  clientId: t,
1418
1478
  code_challenge: r
1419
1479
  }) => {
1420
1480
  var a;
1421
1481
  try {
1422
- const n = await xe({
1423
- type: Re.CODE,
1482
+ const n = await Me({
1483
+ type: $e.CODE,
1424
1484
  clientId: t,
1425
1485
  params: {
1426
- type: ne.CODE,
1486
+ type: ue.CODE,
1427
1487
  nonce: e,
1428
1488
  code_challenge: r
1429
1489
  }
1430
1490
  });
1431
1491
  return (a = n == null ? void 0 : n.data) != null && a.code ? {
1432
- status: ue,
1492
+ status: Ee,
1433
1493
  data: n.data.code
1434
1494
  } : {
1435
- status: M,
1495
+ status: B,
1436
1496
  data: ""
1437
1497
  };
1438
1498
  } catch {
1439
1499
  return {
1440
- status: M,
1500
+ status: B,
1441
1501
  data: ""
1442
1502
  };
1443
1503
  }
1444
- }, Ta = async ({
1504
+ }, Ra = async ({
1445
1505
  clientId: e,
1446
1506
  userId: t,
1447
1507
  nonce: r,
@@ -1451,22 +1511,22 @@ const Z = "Your session has expired. For your security, please log in again to c
1451
1511
  }) => {
1452
1512
  var s;
1453
1513
  try {
1454
- const i = await xe({
1455
- type: Re.REFRESH,
1514
+ const i = await Me({
1515
+ type: $e.REFRESH,
1456
1516
  clientId: e,
1457
1517
  params: {
1458
- type: ne.REFRESH_TOKEN,
1518
+ type: ue.REFRESH_TOKEN,
1459
1519
  userId: t,
1460
1520
  nonce: r,
1461
1521
  refreshToken: a,
1462
1522
  accessToken: n,
1463
1523
  domain: o
1464
1524
  }
1465
- }), u = await ce((s = i == null ? void 0 : i.data) == null ? void 0 : s.accessToken);
1466
- return u && u.payload[k.USER_ID_KEY] !== "" && u.payload[k.NONCE_KEY] === r ? {
1525
+ }), u = await fe((s = i == null ? void 0 : i.data) == null ? void 0 : s.accessToken);
1526
+ return u && u.payload[_.USER_ID_KEY] !== "" && u.payload[_.NONCE_KEY] === r ? {
1467
1527
  accessToken: i.data.accessToken,
1468
1528
  refreshToken: i.data.refreshToken,
1469
- userId: u.payload[k.USER_ID_KEY],
1529
+ userId: u.payload[_.USER_ID_KEY],
1470
1530
  status: !0
1471
1531
  } : {
1472
1532
  status: !1
@@ -1477,9 +1537,9 @@ const Z = "Your session has expired. For your security, please log in again to c
1477
1537
  };
1478
1538
  }
1479
1539
  };
1480
- class Ia {
1540
+ class Na {
1481
1541
  constructor(t = null, r = null) {
1482
- Le(this, "refreshTokenPromise", null), Le(this, "accessToken"), Le(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
1542
+ He(this, "refreshTokenPromise", null), He(this, "accessToken"), He(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
1483
1543
  }
1484
1544
  async refreshtoken({
1485
1545
  clientId: t,
@@ -1505,9 +1565,9 @@ class Ia {
1505
1565
  nonce: a,
1506
1566
  domain: n
1507
1567
  }) {
1508
- const o = await ce(this.refreshToken);
1509
- if (o && o.payload[k.USER_ID_KEY] !== "") {
1510
- const s = await Ta({
1568
+ const o = await fe(this.refreshToken);
1569
+ if (o && o.payload[_.USER_ID_KEY] !== "") {
1570
+ const s = await Ra({
1511
1571
  clientId: t,
1512
1572
  userId: r,
1513
1573
  nonce: a,
@@ -1516,210 +1576,210 @@ class Ia {
1516
1576
  domain: n
1517
1577
  });
1518
1578
  return s.status ? (this.accessToken = s.accessToken, this.refreshToken = s.refreshToken, {
1519
- status: ue,
1579
+ status: Ee,
1520
1580
  newAccessToken: s.accessToken,
1521
1581
  newRefreshToken: s.refreshToken
1522
1582
  }) : {
1523
- status: M
1583
+ status: B
1524
1584
  };
1525
1585
  } else
1526
1586
  return {
1527
- status: M
1587
+ status: B
1528
1588
  };
1529
1589
  }
1530
1590
  }
1531
- const va = (e) => j(
1591
+ const xa = (e) => z(
1532
1592
  (...t) => {
1533
1593
  e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
1534
1594
  },
1535
1595
  [e]
1536
- ), re = () => {
1537
- throw new Error(ga);
1538
- }, Gt = rr({
1596
+ ), ce = () => {
1597
+ throw new Error(va);
1598
+ }, Xt = cr({
1539
1599
  isAuthenticated: !1,
1540
1600
  isLoading: !1,
1541
- login: re,
1542
- logout: re,
1543
- getAccessToken: re,
1544
- getIdToken: re,
1545
- registeringForPasskey: re,
1546
- loginWithPasskey: re,
1601
+ login: ce,
1602
+ logout: ce,
1603
+ getAccessToken: ce,
1604
+ getIdToken: ce,
1605
+ registeringForPasskey: ce,
1606
+ loginWithPasskey: ce,
1547
1607
  logoutReason: "",
1548
1608
  authenticationType: ""
1549
- }), Sa = V.createContext({
1550
- state: Wt,
1609
+ }), Ca = W.createContext({
1610
+ state: qt,
1551
1611
  dispatch: () => {
1552
1612
  }
1553
- }), Aa = (e, t) => (t == null ? void 0 : t.type) === se ? {
1613
+ }), Oa = (e, t) => (t == null ? void 0 : t.type) === ge ? {
1554
1614
  ...e,
1555
1615
  isLoading: t.payload.isLoading
1556
- } : (t == null ? void 0 : t.type) === Te ? {
1616
+ } : (t == null ? void 0 : t.type) === Re ? {
1557
1617
  ...e,
1558
1618
  isLoading: !1,
1559
1619
  isAuthenticated: !0,
1560
1620
  user: t.payload.user,
1561
1621
  authenticationType: t.payload.authenticationType,
1562
1622
  logoutReason: ""
1563
- } : (t == null ? void 0 : t.type) === Mt ? {
1623
+ } : (t == null ? void 0 : t.type) === Jt ? {
1564
1624
  ...e,
1565
1625
  isLoading: !1,
1566
1626
  isAuthenticated: !1,
1567
1627
  user: void 0,
1568
1628
  authenticationType: "",
1569
1629
  logoutReason: t.payload.logoutReason
1570
- } : e, ka = ({
1630
+ } : e, Pa = ({
1571
1631
  children: e,
1572
1632
  sessionExpiration: t,
1573
1633
  clientId: r,
1574
1634
  domain: a = "",
1575
1635
  debug: n = !1
1576
1636
  }) => {
1577
- const [o, s] = ft(Aa, {
1578
- ...Wt,
1637
+ const [o, s] = It(Oa, {
1638
+ ...qt,
1579
1639
  debug: n
1580
- }), i = va(n), u = G(!1), [h, p, , m] = ge({
1581
- key: `${ye}::${r}::@@user@@`
1582
- }), [l, d, , y] = ge({
1583
- key: `${ye}::${r}::@@access@@`
1584
- }), [E, R, , w] = ge(
1640
+ }), i = xa(n), u = $(!1), [h, p, , m] = Ie({
1641
+ key: `${Ae}::${r}::@@user@@`
1642
+ }), [l, d, , f] = Ie({
1643
+ key: `${Ae}::${r}::@@access@@`
1644
+ }), [b, I, , w] = Ie(
1585
1645
  {
1586
- key: `${ye}::${r}::@@refresh@@`
1646
+ key: `${Ae}::${r}::@@refresh@@`
1587
1647
  }
1588
- ), [U, H, , O] = ge({
1589
- key: `${ye}::${r}::@@nonce@@`
1590
- }), oe = new Ia(l, E), P = j(() => {
1591
- i("removeLocalStorage: removing local storage"), m(), y(), w(), O();
1648
+ ), [P, D, , L] = Ie({
1649
+ key: `${Ae}::${r}::@@nonce@@`
1650
+ }), M = new Na(l, b), O = z(() => {
1651
+ i("removeLocalStorage: removing local storage"), m(), f(), w(), L();
1592
1652
  }, [
1593
- y,
1653
+ f,
1594
1654
  m,
1595
- O,
1655
+ L,
1596
1656
  w,
1597
1657
  i
1598
- ]), N = j(
1658
+ ]), G = z(
1599
1659
  (g) => {
1600
1660
  i(
1601
1661
  "removeStateAndLocalStorage: removing state and local storage with reason: ",
1602
1662
  g
1603
1663
  ), s({
1604
- type: Mt,
1664
+ type: Jt,
1605
1665
  payload: {
1606
- logoutReason: g || Z
1666
+ logoutReason: g || oe
1607
1667
  }
1608
- }), P(), s({ type: se, payload: { isLoading: !1 } });
1668
+ }), O(), s({ type: ge, payload: { isLoading: !1 } });
1609
1669
  },
1610
- [P, i]
1611
- ), x = j(
1670
+ [O, i]
1671
+ ), R = z(
1612
1672
  async (g) => {
1613
1673
  i("invalidateAndLogout: invalidating and logging out");
1614
- const { user: T } = o, b = (T == null ? void 0 : T.userId) || ya(h);
1615
- b || i(
1674
+ const { user: T } = o, E = (T == null ? void 0 : T.userId) || ka(h);
1675
+ E || i(
1616
1676
  "invalidateAndLogout: user cannot be identified, logging out without userId"
1617
- ), await ba({
1618
- userId: b,
1677
+ ), await Aa({
1678
+ userId: E,
1619
1679
  clientId: r,
1620
1680
  domain: a,
1621
1681
  idToken: h
1622
- }), N(g || Z);
1682
+ }), G(g || oe);
1623
1683
  },
1624
- [h, o, r, a, N, i]
1684
+ [h, o, r, a, G, i]
1625
1685
  );
1626
- z(() => {
1686
+ q(() => {
1627
1687
  if (!u.current)
1628
1688
  return o.isLoading && h !== null ? (async () => {
1629
1689
  try {
1630
- const g = await ce(h);
1631
- g && g.payload[k.USER_ID_KEY] !== "" ? (i("useEffect: setting the authentication state"), s({
1632
- type: Te,
1690
+ const g = await fe(h);
1691
+ g && g.payload[_.USER_ID_KEY] !== "" ? (i("useEffect: setting the authentication state"), s({
1692
+ type: Re,
1633
1693
  payload: {
1634
- authenticationType: g.payload[k.AUTH_TYPE_KEY],
1694
+ authenticationType: g.payload[_.AUTH_TYPE_KEY],
1635
1695
  user: {
1636
- userId: g.payload[k.USER_ID_KEY],
1637
- username: g.payload[k.USERNAME_KEY],
1638
- email: g.payload[k.EMAIL_KEY]
1696
+ userId: g.payload[_.USER_ID_KEY],
1697
+ username: g.payload[_.USERNAME_KEY],
1698
+ email: g.payload[_.EMAIL_KEY]
1639
1699
  }
1640
1700
  }
1641
- })) : (i("useEffect: invalid JWT, invalidating and logging out"), await x(Z));
1701
+ })) : (i("useEffect: invalid JWT, invalidating and logging out"), await R(oe));
1642
1702
  } catch {
1643
1703
  i(
1644
1704
  "useEffect: exception validating JWT, invalidating and logging out"
1645
- ), await x(Z);
1705
+ ), await R(oe);
1646
1706
  }
1647
- })() : (i("useEffect: setting the loading state to false"), s({ type: se, payload: { isLoading: !1 } })), () => {
1707
+ })() : (i("useEffect: setting the loading state to false"), s({ type: ge, payload: { isLoading: !1 } })), () => {
1648
1708
  u.current = !0;
1649
1709
  };
1650
- }, [o.isLoading, h, x, i]);
1651
- const D = async (g, T) => {
1652
- s({ type: se, payload: { isLoading: !0 } }), P();
1653
- const b = Ge();
1654
- H(b), i("login: Logging in with password");
1655
- const { code_verifier: Q, code_challenge: tr } = await sa(), et = await wa({
1656
- nonce: b,
1710
+ }, [o.isLoading, h, R, i]);
1711
+ const pe = async (g, T) => {
1712
+ s({ type: ge, payload: { isLoading: !0 } }), O();
1713
+ const E = Je();
1714
+ D(E), i("login: Logging in with password");
1715
+ const { code_verifier: te, code_challenge: ir } = await ha(), ot = await _a({
1716
+ nonce: E,
1657
1717
  clientId: r,
1658
- code_challenge: tr
1718
+ code_challenge: ir
1659
1719
  });
1660
- if (et.status) {
1661
- const X = await Ea({
1720
+ if (ot.status) {
1721
+ const re = await Sa({
1662
1722
  username: g,
1663
1723
  password: T,
1664
1724
  clientId: r,
1665
1725
  sessionExpiration: t,
1666
- nonce: b,
1667
- type: ne.CODE,
1668
- code: et.data,
1669
- code_verifier: Q,
1726
+ nonce: E,
1727
+ type: ue.CODE,
1728
+ code: ot.data,
1729
+ code_verifier: te,
1670
1730
  domain: a,
1671
1731
  ua: navigator.userAgent
1672
1732
  });
1673
- return X.status ? (p(X.idToken), d(X.accessToken), R(X.refreshToken), s({
1674
- type: Te,
1733
+ return re.status ? (p(re.idToken), d(re.accessToken), I(re.refreshToken), s({
1734
+ type: Re,
1675
1735
  payload: {
1676
- authenticationType: ne.CODE,
1736
+ authenticationType: ue.CODE,
1677
1737
  user: {
1678
- userId: X.userId,
1738
+ userId: re.userId,
1679
1739
  username: g,
1680
- email: X.email
1740
+ email: re.email
1681
1741
  }
1682
1742
  }
1683
- }), !0) : (N(Ve), !1);
1743
+ }), !0) : (G(Ye), !1);
1684
1744
  }
1685
1745
  return !1;
1686
- }, Pe = async (g) => {
1687
- g == null || g.preventDefault(), await x(ha);
1688
- }, De = async () => {
1746
+ }, X = async (g) => {
1747
+ g == null || g.preventDefault(), await R(wa);
1748
+ }, Q = async () => {
1689
1749
  const { isAuthenticated: g, user: T } = o;
1690
1750
  try {
1691
1751
  if (g && T && T.userId) {
1692
1752
  if (l) {
1693
1753
  i("getAccessToken");
1694
- const Q = await ce(l);
1695
- if (Q && Q.payload[k.USER_ID_KEY] !== "")
1754
+ const te = await fe(l);
1755
+ if (te && te.payload[_.USER_ID_KEY] !== "")
1696
1756
  return l;
1697
1757
  }
1698
1758
  i("getAccessToken: invalid access token, trying to refresh it");
1699
- const b = await oe.refreshtoken({
1759
+ const E = await M.refreshtoken({
1700
1760
  clientId: r,
1701
1761
  userId: T.userId,
1702
- nonce: U,
1762
+ nonce: P,
1703
1763
  domain: a
1704
1764
  });
1705
- return b.status && b.status === "success" && b.newAccessToken ? (d(b.newAccessToken), R(b.newRefreshToken), b.newAccessToken) : (i(
1765
+ return E.status && E.status === "success" && E.newAccessToken ? (d(E.newAccessToken), I(E.newRefreshToken), E.newAccessToken) : (i(
1706
1766
  "getAccessToken: invalid refresh token, need to re-authenticate"
1707
- ), await x(Z), "");
1767
+ ), await R(oe), "");
1708
1768
  }
1709
1769
  return i(
1710
1770
  "getAccessToken: user is not authenticated, cannot get access token"
1711
- ), await x(Z), "";
1771
+ ), await R(oe), "";
1712
1772
  } catch {
1713
1773
  return i(
1714
1774
  "getAccessToken: exception occurred, invalidating and logging out"
1715
- ), await x(pa), "";
1775
+ ), await R(Ta), "";
1716
1776
  }
1717
- }, C = () => o.isAuthenticated && h ? h : "", K = async () => {
1777
+ }, C = () => o.isAuthenticated && h ? h : "", N = async () => {
1718
1778
  const { user: g } = o;
1719
- let T = await te({
1779
+ let T = await ie({
1720
1780
  accessToken: l,
1721
1781
  clientId: r,
1722
- type: ee.GET_REGISTRATION_OPTIONS,
1782
+ type: se.GET_REGISTRATION_OPTIONS,
1723
1783
  params: {
1724
1784
  clientId: r,
1725
1785
  id: g == null ? void 0 : g.userId,
@@ -1728,23 +1788,23 @@ const va = (e) => j(
1728
1788
  });
1729
1789
  if (T.status)
1730
1790
  try {
1731
- const b = await dr(T.data);
1732
- return T = await te({
1791
+ const E = await gr(T.data);
1792
+ return T = await ie({
1733
1793
  accessToken: l,
1734
1794
  clientId: r,
1735
- type: ee.VERIFY_REGISTRATION,
1795
+ type: se.VERIFY_REGISTRATION,
1736
1796
  params: {
1737
1797
  clientId: r,
1738
1798
  id: g == null ? void 0 : g.userId,
1739
1799
  username: g == null ? void 0 : g.username,
1740
- registration: b
1800
+ registration: E
1741
1801
  }
1742
1802
  }), !!(T.status && T.data.length > 0);
1743
1803
  } catch {
1744
- return await te({
1804
+ return await ie({
1745
1805
  accessToken: l,
1746
1806
  clientId: r,
1747
- type: ee.VERIFY_REGISTRATION,
1807
+ type: se.VERIFY_REGISTRATION,
1748
1808
  params: {
1749
1809
  clientId: r,
1750
1810
  id: g == null ? void 0 : g.userId,
@@ -1754,52 +1814,52 @@ const va = (e) => j(
1754
1814
  }), !1;
1755
1815
  }
1756
1816
  return !1;
1757
- }, $e = async () => {
1758
- s({ type: se, payload: { isLoading: !0 } }), P();
1759
- const g = Ge();
1760
- H(g), i("loginWithPasskey");
1761
- const T = Ge();
1762
- let b = await te({
1817
+ }, ee = async () => {
1818
+ s({ type: ge, payload: { isLoading: !0 } }), O();
1819
+ const g = Je();
1820
+ D(g), i("loginWithPasskey");
1821
+ const T = Je();
1822
+ let E = await ie({
1763
1823
  accessToken: l,
1764
1824
  clientId: r,
1765
- type: ee.GET_AUTHENTICATION_OPTIONS,
1825
+ type: se.GET_AUTHENTICATION_OPTIONS,
1766
1826
  params: {
1767
1827
  id: T,
1768
1828
  clientId: r
1769
1829
  }
1770
1830
  });
1771
- if (b.status)
1831
+ if (E.status)
1772
1832
  try {
1773
- const Q = await hr(b.data);
1774
- return b = await te({
1833
+ const te = await br(E.data);
1834
+ return E = await ie({
1775
1835
  accessToken: l,
1776
1836
  clientId: r,
1777
- type: ee.VERIFY_AUTHENTICATION,
1837
+ type: se.VERIFY_AUTHENTICATION,
1778
1838
  params: {
1779
1839
  clientId: r,
1780
1840
  id: T,
1781
- authentication: Q,
1841
+ authentication: te,
1782
1842
  nonce: g,
1783
1843
  domain: a,
1784
1844
  sessionExpiration: t,
1785
1845
  ua: navigator.userAgent
1786
1846
  }
1787
- }), b.data.status === ue ? (p(b.data.idToken), d(b.data.accessToken), R(b.data.refreshToken), s({
1788
- type: Te,
1847
+ }), E.data.status === Ee ? (p(E.data.idToken), d(E.data.accessToken), I(E.data.refreshToken), s({
1848
+ type: Re,
1789
1849
  payload: {
1790
- authenticationType: ne.PASSKEY,
1850
+ authenticationType: ue.PASSKEY,
1791
1851
  user: {
1792
- userId: b.data.userId,
1793
- username: b.data.username,
1794
- email: b.data.email
1852
+ userId: E.data.userId,
1853
+ username: E.data.username,
1854
+ email: E.data.email
1795
1855
  }
1796
1856
  }
1797
- }), !0) : (N(Ve), !1);
1857
+ }), !0) : (G(Ye), !1);
1798
1858
  } catch {
1799
- return await te({
1859
+ return await ie({
1800
1860
  accessToken: l,
1801
1861
  clientId: r,
1802
- type: ee.VERIFY_AUTHENTICATION,
1862
+ type: se.VERIFY_AUTHENTICATION,
1803
1863
  params: {
1804
1864
  clientId: r,
1805
1865
  id: T,
@@ -1808,38 +1868,52 @@ const va = (e) => j(
1808
1868
  domain: a,
1809
1869
  sessionExpiration: t
1810
1870
  }
1811
- }), N(Ve), !1;
1871
+ }), G(Ye), !1;
1812
1872
  }
1813
1873
  return !1;
1814
1874
  };
1815
- return /* @__PURE__ */ c(Sa.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ c(
1816
- Gt.Provider,
1875
+ return /* @__PURE__ */ c(Ca.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ c(
1876
+ Xt.Provider,
1817
1877
  {
1818
1878
  value: {
1819
1879
  ...o,
1820
- login: D,
1821
- logout: Pe,
1822
- getAccessToken: De,
1880
+ login: pe,
1881
+ logout: X,
1882
+ getAccessToken: Q,
1823
1883
  getIdToken: C,
1824
- registeringForPasskey: K,
1825
- loginWithPasskey: $e
1884
+ registeringForPasskey: N,
1885
+ loginWithPasskey: ee
1826
1886
  },
1827
1887
  children: e
1828
1888
  }
1829
1889
  ) });
1830
- }, qe = (e = Gt) => yt(e), Xn = "user", Zn = "assistant", eo = "system", to = "internal", ro = "hidden", ao = "I'm having trouble right now. Please try again later.", no = "gpt-4", oo = 128e3, so = "action-message", io = "action-reset", co = "action-model", lo = "action-restore", uo = "action-streaming", mo = "action-search", ho = "action-sort", po = "sassy-saint-", go = "details", fo = "search", yo = "sort", bo = "==stats==", _a = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", mt = (e) => Number.isFinite(e) ? e : 0;
1831
- function Ra(e) {
1890
+ }, et = (e = Xt) => kt(e), mo = "user", ho = "assistant", po = "system", go = "internal", fo = "hidden", yo = "I'm having trouble right now. Please try again later.", bo = "gpt-4", Eo = 128e3, wo = "action-message", To = "action-reset", vo = "action-model", Io = "action-restore", ko = "action-streaming", Ao = "action-search", So = "action-sort", _o = "action-toggle-tag", Ro = "action-reset-tags", Fe = {
1891
+ SUMMARIZE_ARTICLE: "summarize-article",
1892
+ PROOFREAD_CONTENT: "proofread-content",
1893
+ REPHRASE_CONTENT: "rephrase-content"
1894
+ }, No = {
1895
+ [Fe.SUMMARIZE_ARTICLE]: {
1896
+ label: "Summarize...",
1897
+ content: "Summarize this article: "
1898
+ },
1899
+ [Fe.PROOFREAD_CONTENT]: {
1900
+ label: "Proofread...",
1901
+ content: "Proofread this: "
1902
+ },
1903
+ [Fe.REPHRASE_CONTENT]: { label: "Rephrase...", content: "Rephrase this: " }
1904
+ }, xo = "sassy-saint-", Co = "details", Oo = "search", Po = "sort", Do = "summarize-article", $o = "proofread-content", Lo = "rephrase-content", Mo = "==stats==", Da = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Et = (e) => Number.isFinite(e) ? e : 0;
1905
+ function $a(e) {
1832
1906
  return {
1833
1907
  days: Math.trunc(e / 864e5),
1834
1908
  hours: Math.trunc(e / 36e5 % 24),
1835
1909
  minutes: Math.trunc(e / 6e4 % 60),
1836
1910
  seconds: Math.trunc(e / 1e3 % 60),
1837
1911
  milliseconds: Math.trunc(e % 1e3),
1838
- microseconds: Math.trunc(mt(e * 1e3) % 1e3),
1839
- nanoseconds: Math.trunc(mt(e * 1e6) % 1e3)
1912
+ microseconds: Math.trunc(Et(e * 1e3) % 1e3),
1913
+ nanoseconds: Math.trunc(Et(e * 1e6) % 1e3)
1840
1914
  };
1841
1915
  }
1842
- function Na(e) {
1916
+ function La(e) {
1843
1917
  return {
1844
1918
  days: e / 86400000n,
1845
1919
  hours: e / 3600000n % 24n,
@@ -1850,20 +1924,20 @@ function Na(e) {
1850
1924
  nanoseconds: 0n
1851
1925
  };
1852
1926
  }
1853
- function xa(e) {
1927
+ function Ma(e) {
1854
1928
  switch (typeof e) {
1855
1929
  case "number": {
1856
1930
  if (Number.isFinite(e))
1857
- return Ra(e);
1931
+ return $a(e);
1858
1932
  break;
1859
1933
  }
1860
1934
  case "bigint":
1861
- return Na(e);
1935
+ return La(e);
1862
1936
  }
1863
1937
  throw new TypeError("Expected a finite number or bigint");
1864
1938
  }
1865
- const Ca = (e) => e === 0 || e === 0n, Oa = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Pa = 1e-7, Da = 24n * 60n * 60n * 1000n;
1866
- function $a(e, t) {
1939
+ const Ua = (e) => e === 0 || e === 0n, Ka = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Ha = 1e-7, Wa = 24n * 60n * 60n * 1000n;
1940
+ function Ba(e, t) {
1867
1941
  const r = typeof e == "bigint";
1868
1942
  if (!r && !Number.isFinite(e))
1869
1943
  throw new TypeError("Expected a finite number or bigint");
@@ -1872,24 +1946,24 @@ function $a(e, t) {
1872
1946
  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);
1873
1947
  let n = [];
1874
1948
  const o = (p, m) => {
1875
- const l = Math.floor(p * 10 ** m + Pa);
1949
+ const l = Math.floor(p * 10 ** m + Ha);
1876
1950
  return (Math.round(l) / 10 ** m).toFixed(m);
1877
1951
  }, s = (p, m, l, d) => {
1878
- if (!((n.length === 0 || !t.colonNotation) && Ca(p) && !(t.colonNotation && l === "m"))) {
1952
+ if (!((n.length === 0 || !t.colonNotation) && Ua(p) && !(t.colonNotation && l === "m"))) {
1879
1953
  if (d ?? (d = String(p)), t.colonNotation) {
1880
- const y = d.includes(".") ? d.split(".")[0].length : d.length, E = n.length > 0 ? 2 : 1;
1881
- d = "0".repeat(Math.max(0, E - y)) + d;
1954
+ const f = d.includes(".") ? d.split(".")[0].length : d.length, b = n.length > 0 ? 2 : 1;
1955
+ d = "0".repeat(Math.max(0, b - f)) + d;
1882
1956
  } else
1883
- d += t.verbose ? " " + Oa(m, p) : l;
1957
+ d += t.verbose ? " " + Ka(m, p) : l;
1884
1958
  n.push(d);
1885
1959
  }
1886
- }, i = xa(e), u = BigInt(i.days);
1960
+ }, i = Ma(e), u = BigInt(i.days);
1887
1961
  if (s(u / 365n, "year", "y"), s(u % 365n, "day", "d"), s(Number(i.hours), "hour", "h"), s(Number(i.minutes), "minute", "m"), t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
1888
1962
  const p = Number(i.seconds), m = Number(i.milliseconds), l = Number(i.microseconds), d = Number(i.nanoseconds);
1889
1963
  if (s(p, "second", "s"), t.formatSubMilliseconds)
1890
1964
  s(m, "millisecond", "ms"), s(l, "microsecond", "µs"), s(d, "nanosecond", "ns");
1891
1965
  else {
1892
- const y = m + l / 1e3 + d / 1e6, E = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, R = y >= 1 ? Math.round(y) : Math.ceil(y), w = E ? y.toFixed(E) : R;
1966
+ const f = m + l / 1e3 + d / 1e6, b = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, I = f >= 1 ? Math.round(f) : Math.ceil(f), w = b ? f.toFixed(b) : I;
1893
1967
  s(
1894
1968
  Number.parseFloat(w),
1895
1969
  "millisecond",
@@ -1898,7 +1972,7 @@ function $a(e, t) {
1898
1972
  );
1899
1973
  }
1900
1974
  } else {
1901
- const p = (r ? Number(e % Da) : e) / 1e3 % 60, m = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, l = o(p, m), d = t.keepDecimalsOnWholeSeconds ? l : l.replace(/\.0+$/, "");
1975
+ const p = (r ? Number(e % Wa) : e) / 1e3 % 60, m = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, l = o(p, m), d = t.keepDecimalsOnWholeSeconds ? l : l.replace(/\.0+$/, "");
1902
1976
  s(Number.parseFloat(d), "second", "s", d);
1903
1977
  }
1904
1978
  if (n.length === 0)
@@ -1906,7 +1980,7 @@ function $a(e, t) {
1906
1980
  const h = t.colonNotation ? ":" : " ";
1907
1981
  return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(h);
1908
1982
  }
1909
- const La = process.env.NODE_ENV === "production", Qe = !La, Ma = Qe ? "gizmette.local.com" : "gizmette.com", Eo = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, wo = async () => {
1983
+ const Ga = process.env.NODE_ENV === "production", tt = !Ga, Va = tt ? "gizmette.local.com" : "gizmette.com", Uo = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, Ko = async () => {
1910
1984
  const e = {
1911
1985
  /**
1912
1986
  * A boolean value that indicates the application would
@@ -1955,11 +2029,11 @@ const La = process.env.NODE_ENV === "production", Qe = !La, Ma = Qe ? "gizmette.
1955
2029
  e
1956
2030
  );
1957
2031
  });
1958
- }, To = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ c("dl", { className: "my-0", children: /* @__PURE__ */ I("div", { className: "flex items-center justify-between", children: [
2032
+ }, Ho = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ c("dl", { className: "my-0", children: /* @__PURE__ */ v("div", { className: "flex items-center justify-between", children: [
1959
2033
  /* @__PURE__ */ c("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
1960
2034
  /* @__PURE__ */ c("dd", { className: "my-1 inline-block", children: t[r] })
1961
2035
  ] }) }, `${e}-${r}`)) : null;
1962
- function Io({
2036
+ function Wo({
1963
2037
  data: e,
1964
2038
  formatter: t = (r) => r
1965
2039
  }) {
@@ -1971,18 +2045,18 @@ function Io({
1971
2045
  );
1972
2046
  return t(a ? a / r.length : 0);
1973
2047
  }
1974
- const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, So = new Intl.NumberFormat("en", {
2048
+ const Bo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Go = new Intl.NumberFormat("en", {
1975
2049
  style: "decimal",
1976
2050
  signDisplay: "never",
1977
2051
  minimumFractionDigits: 0,
1978
2052
  maximumFractionDigits: 0
1979
- }), Ao = (e) => e > 0 ? $a(e, {
2053
+ }), Vo = (e) => e > 0 ? Ba(e, {
1980
2054
  secondsDecimalDigits: 2,
1981
2055
  unitCount: 2
1982
- }) : "N/A", Ua = (e) => f(
2056
+ }) : "N/A", Ja = (e) => y(
1983
2057
  "flex-1 space-y-6 overflow-y-auto rounded-md bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
1984
- e || Qe ? "pt-4" : "pt-10"
1985
- ), ko = (e, t) => t === 1 ? e : `${e}s`, Ce = (e) => {
2058
+ e || tt ? "pt-4" : "pt-10"
2059
+ ), Jo = (e, t) => t === 1 ? e : `${e}s`, wt = "av-button", Ya = (e) => {
1986
2060
  let t = "";
1987
2061
  if (typeof e == "number" || typeof e == "string")
1988
2062
  t = "m-" + e;
@@ -1991,7 +2065,7 @@ const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
1991
2065
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
1992
2066
  }
1993
2067
  return t;
1994
- }, _o = "av-bubble", ht = "av-button", Ie = "av-card", Ha = "av-footer", Ka = "av-main", Ro = "av-messagebox", No = "av-panel", xo = "av-spinner", Vt = "icon", Yt = "button", Ba = "link", Wa = ({
2068
+ }, rt = "icon", Qt = "button", Fa = "link", za = ({
1995
2069
  type: e,
1996
2070
  size: t,
1997
2071
  labelRight: r,
@@ -2000,20 +2074,20 @@ const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2000
2074
  }) => {
2001
2075
  const o = "text-sm font-medium max-h-8 py-0", s = "text-base font-medium max-h-9 py-1", i = "text-lg font-medium max-h-12 py-2";
2002
2076
  switch (e) {
2003
- case Yt:
2004
- return f("px-4", {
2077
+ case Qt:
2078
+ return y("px-4", {
2005
2079
  [o]: t === "small",
2006
2080
  [s]: t === "medium",
2007
2081
  [i]: t === "large"
2008
2082
  });
2009
- case Ba:
2010
- return f("px-4 text-center", {
2083
+ case Fa:
2084
+ return y("px-4 text-center", {
2011
2085
  [o]: t === "small",
2012
2086
  [s]: t === "medium",
2013
2087
  [i]: t === "large"
2014
2088
  });
2015
- case Vt:
2016
- return f("inline-flex items-center", {
2089
+ case rt:
2090
+ return y("inline-flex items-center", {
2017
2091
  "justify-center": n === "center",
2018
2092
  "justify-start": n === "left",
2019
2093
  "justify-end": n === "right",
@@ -2025,7 +2099,7 @@ const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2025
2099
  "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
2026
2100
  });
2027
2101
  }
2028
- }, Ga = ({
2102
+ }, ja = ({
2029
2103
  mode: e,
2030
2104
  noBackground: t,
2031
2105
  noTruncate: r,
@@ -2034,7 +2108,7 @@ const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2034
2108
  if (t)
2035
2109
  return "not-prose rounded-full";
2036
2110
  if (a === "primary")
2037
- return f("not-prose rounded-full", {
2111
+ return y("not-prose rounded-full", {
2038
2112
  truncate: !r,
2039
2113
  "bg-action-dark text-copy-light": e === "dark",
2040
2114
  "bg-action-light text-copy-lighter": e === "light",
@@ -2042,7 +2116,7 @@ const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2042
2116
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
2043
2117
  });
2044
2118
  if (a === "secondary")
2045
- return f("not-prose rounded-full", {
2119
+ return y("not-prose rounded-full", {
2046
2120
  truncate: !r,
2047
2121
  "bg-action-dark text-copy-light": e === "light",
2048
2122
  "bg-action-light text-copy-lighter": e === "dark",
@@ -2050,14 +2124,14 @@ const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2050
2124
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
2051
2125
  });
2052
2126
  if (a === "danger")
2053
- return f("not-prose rounded-full", {
2127
+ return y("not-prose rounded-full", {
2054
2128
  truncate: !r,
2055
2129
  "bg-action-danger-dark text-copy-light": e === "dark",
2056
2130
  "bg-action-danger-light text-copy-lighter": e === "light",
2057
2131
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
2058
2132
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
2059
2133
  });
2060
- }, Va = ({
2134
+ }, qa = ({
2061
2135
  mode: e,
2062
2136
  disabled: t,
2063
2137
  variant: r
@@ -2065,27 +2139,27 @@ const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2065
2139
  if (t)
2066
2140
  return "";
2067
2141
  if (r === "primary")
2068
- return f("hover:text-copy-light-hover", {
2142
+ return y("hover:text-copy-light-hover", {
2069
2143
  "hover:bg-action-dark-hover": e === "dark",
2070
2144
  "hover:bg-action-light-hover": e === "light",
2071
2145
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
2072
2146
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
2073
2147
  });
2074
2148
  if (r === "secondary")
2075
- return f("hover:text-copy-light-hover", {
2149
+ return y("hover:text-copy-light-hover", {
2076
2150
  "hover:bg-action-dark-hover": e === "light",
2077
2151
  "hover:bg-action-light-hover": e === "dark",
2078
2152
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
2079
2153
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
2080
2154
  });
2081
2155
  if (r === "danger")
2082
- return f("hover:text-copy-light-hover", {
2156
+ return y("hover:text-copy-light-hover", {
2083
2157
  "hover:bg-action-danger-dark-hover": e === "dark",
2084
2158
  "hover:bg-action-danger-light-hover": e === "light",
2085
2159
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
2086
2160
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
2087
2161
  });
2088
- }, Ya = ({
2162
+ }, Xa = ({
2089
2163
  mode: e,
2090
2164
  disabled: t,
2091
2165
  variant: r
@@ -2093,27 +2167,27 @@ const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2093
2167
  if (t)
2094
2168
  return "";
2095
2169
  if (r === "primary")
2096
- return f("active:text-copy-light-active", {
2170
+ return y("active:text-copy-light-active", {
2097
2171
  "active:bg-action-dark-active": e === "dark",
2098
2172
  "active:bg-action-light-active": e === "light",
2099
2173
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
2100
2174
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
2101
2175
  });
2102
2176
  if (r === "secondary")
2103
- return f("active:text-copy-light-active", {
2177
+ return y("active:text-copy-light-active", {
2104
2178
  "active:bg-action-dark-active": e === "light",
2105
2179
  "active:bg-action-light-active": e === "dark",
2106
2180
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
2107
2181
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
2108
2182
  });
2109
2183
  if (r === "danger")
2110
- return f("active:text-copy-lighter-active", {
2184
+ return y("active:text-copy-lighter-active", {
2111
2185
  "active:bg-action-danger-dark-active": e === "dark",
2112
2186
  "active:bg-action-danger-light-active": e === "light",
2113
2187
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
2114
2188
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
2115
2189
  });
2116
- }, Ja = ({
2190
+ }, Qa = ({
2117
2191
  mode: e,
2118
2192
  noBorder: t,
2119
2193
  variant: r
@@ -2121,32 +2195,32 @@ const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2121
2195
  if (t)
2122
2196
  return "border border-transparent";
2123
2197
  if (r === "primary")
2124
- return f("border", {
2198
+ return y("border", {
2125
2199
  "border-border-dark": e === "dark",
2126
2200
  "border-border-accent": e === "light",
2127
2201
  "border-border-dark dark:border-border-accent": e === "system",
2128
2202
  "border-border-accent dark:border-border-dark": e === "alt-system"
2129
2203
  });
2130
2204
  if (r === "secondary")
2131
- return f("border", {
2205
+ return y("border", {
2132
2206
  "border-border-dark": e === "light",
2133
2207
  "border-border-accent": e === "dark",
2134
2208
  "border-border-dark dark:border-border-accent": e === "alt-system",
2135
2209
  "border-border-accent dark:border-border-dark": e === "system"
2136
2210
  });
2137
2211
  if (r === "danger")
2138
- return f("border", {
2212
+ return y("border", {
2139
2213
  "border-border-danger-dark": e === "dark",
2140
2214
  "border-border-danger-medium": e === "light",
2141
2215
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
2142
2216
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
2143
2217
  });
2144
- }, Fa = ({ focusMode: e }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
2218
+ }, Za = ({ focusMode: e }) => y("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
2145
2219
  "focus:outline-focus-dark": e === "dark",
2146
2220
  "focus:outline-focus-light": e === "light",
2147
2221
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
2148
2222
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
2149
- }), Jt = ({
2223
+ }), at = ({
2150
2224
  type: e,
2151
2225
  className: t,
2152
2226
  raw: r,
@@ -2161,42 +2235,83 @@ const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2161
2235
  spacing: m,
2162
2236
  noBackground: l,
2163
2237
  variant: d,
2164
- noTruncate: y,
2165
- align: E
2166
- }) => (d || (d = "primary"), r ? f(ht, t) : f(
2167
- ht,
2238
+ noTruncate: f,
2239
+ align: b
2240
+ }) => (d || (d = "primary"), r ? y(wt, t) : y(
2241
+ wt,
2168
2242
  t,
2169
- Ce(m),
2170
- Ga({ mode: a, variant: d, noBackground: l, noTruncate: y }),
2171
- Wa({ type: e, size: i, labelRight: h, labelLeft: p, align: E }),
2172
- Ja({ mode: a, variant: d, noBorder: u }),
2173
- Fa({ focusMode: n }),
2174
- Va({ mode: a, variant: d, disabled: o }),
2175
- Ya({ mode: a, variant: d, disabled: o }),
2243
+ Ya(m),
2244
+ ja({ mode: a, variant: d, noBackground: l, noTruncate: f }),
2245
+ za({ type: e, size: i, labelRight: h, labelLeft: p, align: b }),
2246
+ Qa({ mode: a, variant: d, noBorder: u }),
2247
+ Za({ focusMode: n }),
2248
+ qa({ mode: a, variant: d, disabled: o }),
2249
+ Xa({ mode: a, variant: d, disabled: o }),
2176
2250
  {
2177
2251
  "w-full": s,
2178
2252
  "disabled:cursor-not-allowed disabled:opacity-50": o
2179
2253
  }
2180
- )), ja = (e, t, r) => {
2254
+ )), en = (e, t, r) => {
2181
2255
  var a;
2182
2256
  !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);
2183
- }, Xe = V.forwardRef(
2184
- (e, t) => {
2185
- const { onClick: r, noInternalClick: a = !1, ...n } = e;
2257
+ }, Ue = W.forwardRef((e, t) => {
2258
+ const { onClick: r, noInternalClick: a = !1, ...n } = e;
2259
+ return /* @__PURE__ */ c(
2260
+ "button",
2261
+ {
2262
+ ref: t,
2263
+ onClick: (o) => {
2264
+ en(o, a, r);
2265
+ },
2266
+ ...n
2267
+ }
2268
+ );
2269
+ });
2270
+ Ue.displayName = "BaseButton";
2271
+ const Zt = W.forwardRef(
2272
+ ({
2273
+ children: e,
2274
+ disabled: t = !1,
2275
+ mode: r = "system",
2276
+ focusMode: a = "system",
2277
+ fullWidth: n = !1,
2278
+ className: o,
2279
+ size: s = "medium",
2280
+ raw: i = !1,
2281
+ noBorder: u = !1,
2282
+ spacing: h,
2283
+ variant: p = "primary",
2284
+ noTruncate: m = !1,
2285
+ ...l
2286
+ }, d) => {
2287
+ const f = at({
2288
+ type: Qt,
2289
+ mode: r,
2290
+ focusMode: a,
2291
+ fullWidth: n,
2292
+ disabled: t,
2293
+ raw: i,
2294
+ className: o,
2295
+ size: s,
2296
+ noBorder: u,
2297
+ spacing: h,
2298
+ variant: p,
2299
+ noTruncate: m
2300
+ });
2186
2301
  return /* @__PURE__ */ c(
2187
- "button",
2302
+ Ue,
2188
2303
  {
2189
- ref: t,
2190
- onClick: (o) => {
2191
- ja(o, a, r);
2192
- },
2193
- ...n
2304
+ ref: d,
2305
+ className: f,
2306
+ disabled: t,
2307
+ ...l,
2308
+ children: e
2194
2309
  }
2195
2310
  );
2196
2311
  }
2197
2312
  );
2198
- Xe.displayName = "BaseButton";
2199
- const Fe = V.forwardRef(
2313
+ Zt.displayName = "Button";
2314
+ const Xe = W.forwardRef(
2200
2315
  ({
2201
2316
  children: e,
2202
2317
  disabled: t = !1,
@@ -2212,13 +2327,13 @@ const Fe = V.forwardRef(
2212
2327
  size: m = "medium",
2213
2328
  labelRight: l,
2214
2329
  labelLeft: d,
2215
- spacing: y,
2216
- noBackground: E = !1,
2217
- align: R = "center",
2330
+ spacing: f,
2331
+ noBackground: b = !1,
2332
+ align: I = "center",
2218
2333
  ...w
2219
- }, U) => {
2220
- const H = Jt({
2221
- type: Vt,
2334
+ }, P) => {
2335
+ const D = at({
2336
+ type: rt,
2222
2337
  mode: r,
2223
2338
  focusMode: a,
2224
2339
  fullWidth: n,
@@ -2229,35 +2344,48 @@ const Fe = V.forwardRef(
2229
2344
  size: m,
2230
2345
  labelRight: l,
2231
2346
  labelLeft: d,
2232
- spacing: y,
2233
- noBackground: E,
2234
- align: R
2235
- }), O = f({
2347
+ spacing: f,
2348
+ noBackground: b,
2349
+ align: I
2350
+ }), L = y({
2236
2351
  "text-copy-accent-dark": r === "light" && !i,
2237
2352
  "text-copy-light": r === "dark" && !i,
2238
2353
  "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
2239
2354
  "text-copy-light dark:text-copy-accent-dark": r === "system" && !i
2240
2355
  });
2241
- return /* @__PURE__ */ I(
2242
- Xe,
2356
+ return /* @__PURE__ */ v(
2357
+ Ue,
2243
2358
  {
2244
- ref: U,
2245
- className: H,
2359
+ ref: P,
2360
+ className: D,
2246
2361
  disabled: t,
2247
2362
  type: s,
2248
2363
  "aria-label": h || p,
2249
2364
  ...w,
2250
2365
  children: [
2251
2366
  d && /* @__PURE__ */ c("span", { className: "pr-2", children: d }),
2252
- /* @__PURE__ */ c("div", { className: O, children: e }),
2367
+ /* @__PURE__ */ c("div", { className: L, children: e }),
2253
2368
  l && /* @__PURE__ */ c("span", { className: "pl-2", children: l })
2254
2369
  ]
2255
2370
  }
2256
2371
  );
2257
2372
  }
2258
2373
  );
2259
- Fe.displayName = "ButtonIcon";
2260
- const Ft = V.forwardRef(
2374
+ Xe.displayName = "ButtonIcon";
2375
+ /*!
2376
+ @versini/ui-button v1.1.10
2377
+ © 2024 gizmette.com
2378
+ */
2379
+ try {
2380
+ window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
2381
+ version: "1.1.10",
2382
+ buildTime: "09/28/2024 06:29 PM EDT",
2383
+ homepage: "https://github.com/aversini/ui-components",
2384
+ license: "MIT"
2385
+ });
2386
+ } catch {
2387
+ }
2388
+ const tn = W.forwardRef(
2261
2389
  ({
2262
2390
  children: e,
2263
2391
  disabled: t = !1,
@@ -2265,46 +2393,104 @@ const Ft = V.forwardRef(
2265
2393
  focusMode: a = "system",
2266
2394
  fullWidth: n = !1,
2267
2395
  className: o,
2268
- size: s = "medium",
2396
+ type: s = "button",
2269
2397
  raw: i = !1,
2270
2398
  noBorder: u = !1,
2271
- spacing: h,
2272
- variant: p = "primary",
2273
- noTruncate: m = !1,
2274
- ...l
2275
- }, d) => {
2276
- const y = Jt({
2277
- type: Yt,
2399
+ "aria-label": h,
2400
+ label: p,
2401
+ size: m = "medium",
2402
+ labelRight: l,
2403
+ labelLeft: d,
2404
+ spacing: f,
2405
+ noBackground: b = !1,
2406
+ align: I = "center",
2407
+ active: w = !1,
2408
+ ...P
2409
+ }, D) => {
2410
+ const L = at({
2411
+ type: rt,
2278
2412
  mode: r,
2279
2413
  focusMode: a,
2280
2414
  fullWidth: n,
2281
2415
  disabled: t,
2282
2416
  raw: i,
2283
2417
  className: o,
2284
- size: s,
2285
2418
  noBorder: u,
2286
- spacing: h,
2287
- variant: p,
2288
- noTruncate: m
2289
- });
2290
- return /* @__PURE__ */ c(
2291
- Xe,
2419
+ size: m,
2420
+ labelRight: l,
2421
+ labelLeft: d,
2422
+ spacing: f,
2423
+ noBackground: b,
2424
+ align: I
2425
+ }), M = y({
2426
+ "text-copy-accent-dark": r === "light" && !i,
2427
+ "text-copy-light": r === "dark" && !i,
2428
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
2429
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !i
2430
+ }), O = w ? y(
2431
+ "relative",
2432
+ "focus-within:static",
2433
+ "focus-within:after:border-transparent",
2434
+ "after:absolute",
2435
+ "after:content-['']",
2436
+ "after:border-b-2",
2437
+ "after:bottom-[-4px]",
2438
+ "after:left-0",
2439
+ "after:right-0",
2292
2440
  {
2293
- ref: d,
2294
- className: y,
2441
+ "after:border-table-dark": r === "dark",
2442
+ "after:border-table-light": r === "light",
2443
+ "after:border-table-dark dark:after:border-table-light": r === "system",
2444
+ "after:border-table-light dark:after:border-table-dark": r === "alt-system"
2445
+ }
2446
+ ) : "";
2447
+ return /* @__PURE__ */ c("div", { className: O, children: /* @__PURE__ */ v(
2448
+ Ue,
2449
+ {
2450
+ ref: D,
2451
+ className: L,
2295
2452
  disabled: t,
2296
- ...l,
2297
- children: e
2453
+ type: s,
2454
+ "aria-label": h || p,
2455
+ ...P,
2456
+ children: [
2457
+ d && /* @__PURE__ */ c("span", { className: "pr-2", children: d }),
2458
+ /* @__PURE__ */ c("div", { className: M, children: e }),
2459
+ l && /* @__PURE__ */ c("span", { className: "pl-2", children: l })
2460
+ ]
2298
2461
  }
2299
- );
2462
+ ) });
2300
2463
  }
2301
2464
  );
2302
- Ft.displayName = "Button";
2303
- function za(e) {
2304
- const t = bt();
2465
+ tn.displayName = "ButtonSort";
2466
+ /*!
2467
+ @versini/ui-card v1.0.8
2468
+ © 2024 gizmette.com
2469
+ */
2470
+ try {
2471
+ window.__VERSINI_UI_CARD__ || (window.__VERSINI_UI_CARD__ = {
2472
+ version: "1.0.8",
2473
+ buildTime: "09/27/2024 11:55 AM EDT",
2474
+ homepage: "https://github.com/aversini/ui-components",
2475
+ license: "MIT"
2476
+ });
2477
+ } catch {
2478
+ }
2479
+ const Ne = "av-card";
2480
+ function rn(e) {
2481
+ const t = At();
2305
2482
  return `${e}${t}`;
2306
2483
  }
2307
- const qa = ({
2484
+ const an = (e) => {
2485
+ let t = "";
2486
+ if (typeof e == "number" || typeof e == "string")
2487
+ t = "m-" + e;
2488
+ else {
2489
+ const r = [];
2490
+ (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2491
+ }
2492
+ return t;
2493
+ }, nn = ({
2308
2494
  className: e,
2309
2495
  headerClassName: t,
2310
2496
  bodyClassName: r,
@@ -2314,11 +2500,11 @@ const qa = ({
2314
2500
  compact: s,
2315
2501
  noBorder: i
2316
2502
  }) => {
2317
- const u = f(
2318
- Ie,
2503
+ const u = y(
2504
+ Ne,
2319
2505
  e,
2320
2506
  "rounded-md",
2321
- Ce(n),
2507
+ an(n),
2322
2508
  {
2323
2509
  "border-none": i,
2324
2510
  "border-2": !i,
@@ -2330,7 +2516,7 @@ const qa = ({
2330
2516
  "border-border-dark bg-surface-lighter text-copy-dark dark:border-border-accent dark:bg-surface-dark dark:text-copy-light": o === "system",
2331
2517
  "border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": o === "alt-system"
2332
2518
  }
2333
- ), h = t || f(`${Ie}__header mt-0 border-b-2`, {
2519
+ ), h = t || y(`${Ne}__header mt-0 border-b-2`, {
2334
2520
  "text-copy-light border-border-accent": o === "darker",
2335
2521
  "border-border-accent": o === "dark",
2336
2522
  "border-border-medium": o === "light",
@@ -2338,7 +2524,7 @@ const qa = ({
2338
2524
  "border-border-accent dark:border-border-medium": o === "alt-system",
2339
2525
  "mb-4": !s,
2340
2526
  "mb-2": s
2341
- }), p = f(r), m = a || f(`${Ie}__footer pt-2`);
2527
+ }), p = y(r), m = a || y(`${Ne}__footer pt-2`);
2342
2528
  return {
2343
2529
  wrapper: u,
2344
2530
  header: h,
@@ -2346,7 +2532,7 @@ const qa = ({
2346
2532
  footer: m
2347
2533
  };
2348
2534
  };
2349
- function Qa({
2535
+ function on({
2350
2536
  id: e,
2351
2537
  content: t,
2352
2538
  userAriaLabelledby: r,
@@ -2354,7 +2540,7 @@ function Qa({
2354
2540
  }) {
2355
2541
  return typeof t == "string" ? /* @__PURE__ */ c("h2", { id: e, className: a, children: t }) : r ? /* @__PURE__ */ c("div", { className: a, children: t }) : t ? /* @__PURE__ */ c("div", { className: a, id: e, children: t }) : null;
2356
2542
  }
2357
- const Xa = ({
2543
+ const sn = ({
2358
2544
  header: e,
2359
2545
  headerClassName: t,
2360
2546
  footer: r,
@@ -2369,8 +2555,8 @@ const Xa = ({
2369
2555
  noBorder: m = !1,
2370
2556
  ...l
2371
2557
  }) => {
2372
- let d = null, y = null;
2373
- const E = typeof e == "string", R = za(Ie), w = qa({
2558
+ let d = null, f = null;
2559
+ const b = typeof e == "string", I = rn(Ne), w = nn({
2374
2560
  className: o,
2375
2561
  headerClassName: t,
2376
2562
  bodyClassName: s,
@@ -2380,17 +2566,17 @@ const Xa = ({
2380
2566
  compact: p,
2381
2567
  noBorder: m
2382
2568
  });
2383
- return E ? (d = R, y = d) : !E && e && i ? (d = null, y = i) : !E && e && !i ? (d = R, y = d) : (d = null, y = i || null), /* @__PURE__ */ c("div", { className: w.wrapper, children: /* @__PURE__ */ I(
2569
+ return b ? (d = I, f = d) : !b && e && i ? (d = null, f = i) : !b && e && !i ? (d = I, f = d) : (d = null, f = i || null), /* @__PURE__ */ c("div", { className: w.wrapper, children: /* @__PURE__ */ v(
2384
2570
  "section",
2385
2571
  {
2386
- ...y && {
2387
- "aria-labelledby": y
2572
+ ...f && {
2573
+ "aria-labelledby": f
2388
2574
  },
2389
2575
  className: w.body,
2390
2576
  ...l,
2391
2577
  children: [
2392
2578
  /* @__PURE__ */ c(
2393
- Qa,
2579
+ on,
2394
2580
  {
2395
2581
  ...d && { id: d },
2396
2582
  content: e,
@@ -2403,128 +2589,466 @@ const Xa = ({
2403
2589
  ]
2404
2590
  }
2405
2591
  ) });
2406
- }, Za = ({
2407
- className: e,
2408
- mode: t = "system",
2409
- row1: r,
2410
- row2: a,
2411
- noMargins: n = !1,
2412
- spacing: o,
2413
- raw: s = !1
2414
- }) => {
2415
- const i = f(Ha, e, Ce(o), {
2416
- "text-copy-dark": !s && t === "dark",
2417
- "text-copy-lighter": !s && t === "light",
2418
- "text-copy-dark dark:text-copy-lighter": !s && t === "system",
2419
- "text-copy-lighter dark:text-copy-dark": !s && t === "alt-system",
2420
- "mb-[100px]": !n && !s,
2421
- "mt-0 flex w-full flex-col p-2 text-center text-xs sm:mt-3 md:mx-auto md:max-w-4xl": !s
2422
- });
2423
- return /* @__PURE__ */ I("footer", { className: i, children: [
2424
- r && /* @__PURE__ */ c("div", { children: r }),
2425
- a && /* @__PURE__ */ c("div", { children: a })
2426
- ] });
2427
- }, en = ({
2592
+ }, cn = (e) => {
2593
+ let t = "";
2594
+ if (typeof e == "number" || typeof e == "string")
2595
+ t = "m-" + e;
2596
+ else {
2597
+ const r = [];
2598
+ (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2599
+ }
2600
+ return t;
2601
+ }, Ke = ({
2428
2602
  children: e,
2429
- className: t,
2430
- raw: r = !1,
2431
- spacing: a
2603
+ fill: t,
2604
+ viewBox: r,
2605
+ className: a,
2606
+ defaultViewBox: n,
2607
+ defaultClassName: o,
2608
+ spacing: s,
2609
+ title: i,
2610
+ semantic: u = !1,
2611
+ ...h
2432
2612
  }) => {
2433
- const n = f(t, Ka, Ce(a), {
2434
- "mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
2435
- });
2436
- return /* @__PURE__ */ c("main", { className: n, children: e });
2613
+ const p = cn(s), m = y(
2614
+ p,
2615
+ a || o
2616
+ );
2617
+ return /* @__PURE__ */ v(ye, { children: [
2618
+ /* @__PURE__ */ c(
2619
+ "svg",
2620
+ {
2621
+ xmlns: "http://www.w3.org/2000/svg",
2622
+ className: m,
2623
+ viewBox: r || n,
2624
+ fill: t || "currentColor",
2625
+ role: "img",
2626
+ "aria-hidden": !u,
2627
+ focusable: !1,
2628
+ ...h,
2629
+ children: e
2630
+ }
2631
+ ),
2632
+ i && u && /* @__PURE__ */ c("span", { className: "sr-only", children: i })
2633
+ ] });
2437
2634
  };
2438
2635
  /*!
2439
- @versini/ui-components v5.21.4
2636
+ @versini/ui-private v1.4.17
2440
2637
  © 2024 gizmette.com
2441
2638
  */
2442
2639
  try {
2443
- window.__VERSINI_UI_GLOBAL__ || (window.__VERSINI_UI_GLOBAL__ = {
2444
- version: "5.21.4",
2445
- buildTime: "09/09/2024 06:39 PM EDT",
2640
+ window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
2641
+ version: "1.4.17",
2642
+ buildTime: "09/27/2024 11:55 AM EDT",
2446
2643
  homepage: "https://github.com/aversini/ui-components",
2447
2644
  license: "MIT"
2448
2645
  });
2449
2646
  } catch {
2450
2647
  }
2451
- function tn(e) {
2452
- return Et(() => e.every((t) => t == null) ? () => {
2453
- } : (t) => {
2454
- e.forEach((r) => {
2455
- typeof r == "function" ? r(t) : r != null && (r.current = t);
2456
- });
2457
- }, e);
2458
- }
2459
- function rn() {
2460
- const e = G(!1);
2461
- return z(() => (e.current = !0, () => {
2462
- e.current = !1;
2463
- }), []), j(() => e.current, []);
2464
- }
2465
- const an = {
2466
- x: 0,
2467
- y: 0,
2468
- width: 0,
2469
- height: 0,
2470
- top: 0,
2471
- left: 0,
2472
- bottom: 0,
2473
- right: 0
2474
- };
2475
- function nn(e) {
2476
- const t = rn(), r = G(0), a = G(null), [n, o] = J(an), s = Et(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
2477
- const u = i[0];
2478
- u && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
2479
- a.current && t() && o(u.contentRect);
2480
- }));
2481
- }), [t]);
2482
- return z(() => (a.current && (s == null || s.observe(a.current, e)), () => {
2483
- s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
2484
- }), [s, e]), [a, n];
2485
- }
2486
- function on(e) {
2487
- const t = bt();
2488
- if (!e)
2489
- return t;
2490
- if (typeof e == "number" || typeof e == "string")
2491
- return `${e}${t}`;
2492
- if (typeof e == "object") {
2493
- const { id: r, prefix: a = "" } = e;
2494
- return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
2648
+ const ln = ({
2649
+ className: e,
2650
+ viewBox: t,
2651
+ spacing: r,
2652
+ ...a
2653
+ }) => /* @__PURE__ */ c(
2654
+ Ke,
2655
+ {
2656
+ defaultViewBox: "0 0 1200 500",
2657
+ defaultClassName: "w-full",
2658
+ viewBox: t,
2659
+ className: e,
2660
+ spacing: r,
2661
+ title: "Sassy Dog",
2662
+ ...a,
2663
+ children: /* @__PURE__ */ c("g", { transform: "matrix(11.9092 0 0 11.9092 470.0017 250.0009)", id: "879221", children: /* @__PURE__ */ c(
2664
+ "path",
2665
+ {
2666
+ vectorEffect: "non-scaling-stroke",
2667
+ transform: " translate(-50.7473, -45.4051)",
2668
+ d: "M 89.2 27 c 0 -0.2 -0.1 -0.5 -0.3 -0.6 c -0.6 -0.4 -1.6 -0.1 -2.2 0 c -1.5 0.2 -2.9 0.4 -4.5 0.4 c -2.2 0 -4.5 -0.1 -6.7 -0.4 c -2 -0.3 -3.7 -0.9 -5.8 -0.3 c -3 0.8 -4.9 3.2 -4.8 6.3 c 0.1 1.8 -0.2 3.2 -0.8 4.8 c -0.6 1.5 -1.3 1.7 -2.7 1.7 c -9.7 0 -19.3 -0.1 -29 0 c -1.7 0 -3.5 0 -5.3 0 c -2.5 0 -5 0.5 -7.5 0 c -1.8 -0.4 -3.6 -1.3 -4.9 -2.6 c -0.3 -0.3 -0.9 -1.2 -1.2 -1.2 c -0.4 0.1 -0.4 1.3 -0.4 1.6 c 0 1.3 0.5 2.6 0.5 3.9 c 0 1.3 -0.6 2.4 -1 3.6 c -0.4 1.4 -0.4 2.8 -0.2 4.2 c 0.4 2.3 0.8 4.7 1 7.1 c 0.2 2.1 0.2 4.1 0.4 6.2 c 0.2 1.7 0.3 2.5 2.5 2.8 c 2.6 0.4 2.6 -0.5 3.2 -2.2 c 0.8 -2.1 1.5 -4.3 2.3 -6.4 c 0.7 -1.6 1.3 -5.1 5.7 -3.4 c 2.4 0.9 4.9 1.4 7.4 2.1 c 2.7 0.7 5.5 1.4 8.2 1.9 c 5.5 1.1 11.1 1.7 16.8 2 c 0.6 0 1 0 1.4 0.5 c 1.5 1.9 -0.3 5.3 3.5 5.9 c 3.4 0.5 3.4 -1.9 3.8 -4 c 0.2 -1.2 0.4 -2.3 0.7 -3.4 c 0.1 -0.5 0.5 -1 0.9 -1.3 c 4.7 -2.8 7.4 -8.3 6.6 -13.8 c -0.1 -0.9 -0.4 -1.8 -0.3 -2.8 c 0.2 -2 2.7 -2.8 4.2 -3.6 c 1.9 -1.1 4 -2.1 5.6 -3.6 c 1.1 -1 2 -2.3 2.5 -3.7 C 89.1 28.2 89.3 27.5 89.2 27 z M 73.2 40.4 c -0.2 2.1 -1.1 3.1 -3 3.5 c -3.4 0.7 -5.6 -1.6 -4.6 -4.9 c 0.7 -2.2 1.5 -4.3 2.5 -6.3 c 1 -2 1.9 -2 3.1 -0.1 C 72.7 35 73.5 37.6 73.2 40.4 z M 76.4 31.2 c -0.6 0 -1.1 -0.5 -1.1 -1.1 c 0 -0.6 0.5 -1.1 1.1 -1.1 c 0.6 0 1.1 0.5 1.1 1.1 C 77.5 30.7 77 31.2 76.4 31.2 z",
2669
+ strokeLinecap: "round"
2670
+ }
2671
+ ) })
2495
2672
  }
2496
- }
2497
- const jt = "SET_ANNOUNCEMENT", zt = "CLEAR_ANNOUNCEMENT", sn = {
2498
- alert: null,
2499
- alertdialog: null,
2500
- log: "polite",
2501
- marquee: null,
2502
- progressbar: null,
2503
- status: "polite",
2504
- timer: "assertive"
2505
- }, cn = (e, t) => {
2506
- switch (t == null ? void 0 : t.type) {
2507
- case jt:
2508
- return {
2509
- ...e,
2510
- announcement: t.payload
2511
- };
2512
- case zt:
2513
- return {
2514
- ...e,
2673
+ ), dn = ({
2674
+ className: e,
2675
+ viewBox: t,
2676
+ spacing: r,
2677
+ title: a,
2678
+ monotone: n,
2679
+ ...o
2680
+ }) => /* @__PURE__ */ v(
2681
+ Ke,
2682
+ {
2683
+ defaultViewBox: "0 0 640 512",
2684
+ defaultClassName: "size-5",
2685
+ viewBox: t,
2686
+ className: e,
2687
+ spacing: r,
2688
+ title: a || "Hide",
2689
+ ...o,
2690
+ children: [
2691
+ /* @__PURE__ */ c(
2692
+ "path",
2693
+ {
2694
+ opacity: n ? "1" : "0.4",
2695
+ d: "M360.8 380.3C339.4 392.8 314.6 400 288 400c-79.5 0-144-64.5-144-144c0-14.5 2.1-28.5 6.1-41.7L63.5 146c-29.4 34.7-49.9 70.8-61.1 97.6c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480c56.1 0 104.4-17.8 144.5-43.2l-71.7-56.5zM198.5 252.4c-3.7 .8-6.7 3.7-6.5 7.7c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9c1.9-.5 3.9-1.1 5.7-1.7l-120-94.6zm89-52.4l94.8 74.3c2.7-13.9 2.4-28.6-1.5-43.2c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 2.7-.2 5.4-.5 8zM432 256c0 17.7-3.2 34.6-9 50.2l84.1 65.9c32.3-36.6 54.6-75.4 66.4-103.9c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32c-60 0-111.1 20.3-152.8 48.7L207 136.9c23.1-15.7 51-24.9 81-24.9c79.5 0 144 64.5 144 144z"
2696
+ }
2697
+ ),
2698
+ /* @__PURE__ */ c("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z" })
2699
+ ]
2700
+ }
2701
+ ), un = ({
2702
+ className: e,
2703
+ viewBox: t,
2704
+ spacing: r,
2705
+ title: a,
2706
+ monotone: n,
2707
+ ...o
2708
+ }) => {
2709
+ const s = n ? "1" : "0.4";
2710
+ return /* @__PURE__ */ v(
2711
+ Ke,
2712
+ {
2713
+ defaultViewBox: "0 0 190 190",
2714
+ defaultClassName: "size-5",
2715
+ viewBox: t,
2716
+ className: e,
2717
+ spacing: r,
2718
+ title: a || "Passkey",
2719
+ ...o,
2720
+ children: [
2721
+ /* @__PURE__ */ c(
2722
+ "path",
2723
+ {
2724
+ opacity: s,
2725
+ d: "M172.32,96.79c0,13.78-8.48,25.5-20.29,29.78l7.14,11.83l-10.57,13l10.57,12.71l-17.04,22.87l-12.01-12.82 v-25.9v-22.56c-10.68-4.85-18.15-15.97-18.15-28.91c0-17.4,13.51-31.51,30.18-31.51C158.81,65.28,172.32,79.39,172.32,96.79z M142.14,101.61c4.02,0,7.28-3.4,7.28-7.6c0-4.2-3.26-7.61-7.28-7.61s-7.28,3.4-7.28,7.61 C134.85,98.21,138.12,101.61,142.14,101.61z"
2726
+ }
2727
+ ),
2728
+ /* @__PURE__ */ c(
2729
+ "path",
2730
+ {
2731
+ opacity: s,
2732
+ d: "M172.41,96.88c0,13.62-8.25,25.23-19.83,29.67l6.58,11.84l-9.73,13l9.73,12.71l-17.03,23.05v-25.9v-32.77 v-26.87c4.02,0,7.28-3.41,7.28-7.6c0-4.2-3.26-7.61-7.28-7.61V65.28C158.86,65.28,172.41,79.43,172.41,96.88z"
2733
+ }
2734
+ ),
2735
+ /* @__PURE__ */ c("path", { d: "M120.24,131.43c-9.75-8-16.3-20.3-17.2-34.27H50.8c-10.96,0-19.84,9.01-19.84,20.13v25.17 c0,5.56,4.44,10.07,9.92,10.07h69.44c5.48,0,9.92-4.51,9.92-10.07V131.43z" }),
2736
+ /* @__PURE__ */ c("path", { d: "M73.16,91.13c-2.42-0.46-4.82-0.89-7.11-1.86C57.4,85.64,52.36,78.95,50.73,69.5 c-1.12-6.47-0.59-12.87,2.03-18.92c3.72-8.6,10.39-13.26,19.15-14.84c5.24-0.94,10.46-0.73,15.5,1.15 c7.59,2.82,12.68,8.26,15.03,16.24c2.38,8.05,2.03,16.1-1.56,23.72c-3.72,7.96-10.21,12.23-18.42,13.9 c-0.68,0.14-1.37,0.27-2.05,0.41C78,91.13,75.58,91.13,73.16,91.13z" })
2737
+ ]
2738
+ }
2739
+ );
2740
+ }, mn = ({
2741
+ className: e,
2742
+ viewBox: t,
2743
+ spacing: r,
2744
+ title: a,
2745
+ monotone: n,
2746
+ ...o
2747
+ }) => /* @__PURE__ */ v(
2748
+ Ke,
2749
+ {
2750
+ defaultViewBox: "0 0 576 512",
2751
+ defaultClassName: "size-5",
2752
+ viewBox: t,
2753
+ className: e,
2754
+ spacing: r,
2755
+ title: a || "Show",
2756
+ ...o,
2757
+ children: [
2758
+ /* @__PURE__ */ c(
2759
+ "path",
2760
+ {
2761
+ opacity: n ? "1" : "0.4",
2762
+ d: "M95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 400a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"
2763
+ }
2764
+ ),
2765
+ /* @__PURE__ */ c("path", { d: "M224 256c35.3 0 64-28.7 64-64c0-7.1-1.2-13.9-3.3-20.3c-1.8-5.5 1.6-11.9 7.4-11.7c40.8 1.7 77.5 29.6 88.6 71.1c13.7 51.2-16.7 103.9-67.9 117.6s-103.9-16.7-117.6-67.9c-1.9-6.9-2.9-13.9-3.2-20.7c-.3-5.8 6.1-9.2 11.7-7.4c6.4 2.1 13.2 3.3 20.3 3.3z" })
2766
+ ]
2767
+ }
2768
+ );
2769
+ /*!
2770
+ @versini/ui-icons v1.13.1
2771
+ © 2024 gizmette.com
2772
+ */
2773
+ try {
2774
+ window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
2775
+ version: "1.13.1",
2776
+ buildTime: "09/27/2024 11:55 AM EDT",
2777
+ homepage: "https://github.com/aversini/ui-components",
2778
+ license: "MIT"
2779
+ });
2780
+ } catch {
2781
+ }
2782
+ /*!
2783
+ @versini/ui-main v1.0.8
2784
+ © 2024 gizmette.com
2785
+ */
2786
+ try {
2787
+ window.__VERSINI_UI_MAIN__ || (window.__VERSINI_UI_MAIN__ = {
2788
+ version: "1.0.8",
2789
+ buildTime: "09/27/2024 11:55 AM EDT",
2790
+ homepage: "https://github.com/aversini/ui-components",
2791
+ license: "MIT"
2792
+ });
2793
+ } catch {
2794
+ }
2795
+ const hn = "av-main", pn = (e) => {
2796
+ let t = "";
2797
+ if (typeof e == "number" || typeof e == "string")
2798
+ t = "m-" + e;
2799
+ else {
2800
+ const r = [];
2801
+ (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2802
+ }
2803
+ return t;
2804
+ }, gn = ({
2805
+ children: e,
2806
+ className: t,
2807
+ raw: r = !1,
2808
+ spacing: a
2809
+ }) => {
2810
+ const n = y(t, hn, pn(a), {
2811
+ "mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
2812
+ });
2813
+ return /* @__PURE__ */ c("main", { className: n, children: e });
2814
+ }, fn = (e) => {
2815
+ let t = "";
2816
+ if (typeof e == "number" || typeof e == "string")
2817
+ t = "m-" + e;
2818
+ else {
2819
+ const r = [];
2820
+ (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2821
+ }
2822
+ return t;
2823
+ }, yn = "av-flexgrid", _e = "av-flexgrid-item", De = 0.25, er = W.createContext({
2824
+ columnGap: 0,
2825
+ rowGap: 0
2826
+ }), Tt = ({
2827
+ children: e,
2828
+ className: t,
2829
+ columnGap: r = 1,
2830
+ rowGap: a = 0,
2831
+ height: n = "auto",
2832
+ width: o = "auto",
2833
+ direction: s = "row",
2834
+ alignHorizontal: i = "normal",
2835
+ alignVertical: u = "normal",
2836
+ spacing: h,
2837
+ ...p
2838
+ }) => {
2839
+ const m = {
2840
+ flexDirection: s,
2841
+ justifyContent: i,
2842
+ alignItems: u,
2843
+ height: n,
2844
+ width: o,
2845
+ /**
2846
+ * Trick to account for the extra space taken
2847
+ * by the columnGap and rowGap that will be applied
2848
+ * to all FlexgridItems (see context and paddings).
2849
+ */
2850
+ marginLeft: r * -1 * De + "rem",
2851
+ marginTop: a * -1 * De + "rem"
2852
+ }, l = y(
2853
+ yn,
2854
+ t,
2855
+ "box-border flex flex-wrap"
2856
+ ), d = { columnGap: r, rowGap: a }, f = h ? "div" : W.Fragment;
2857
+ return /* @__PURE__ */ c(f, { ...h ? { className: fn(h) } : {}, children: /* @__PURE__ */ c("div", { className: l, style: m, ...p, children: /* @__PURE__ */ c(er.Provider, { value: d, children: e }) }) });
2858
+ }, ze = (e, t) => y({
2859
+ "basis-1/12": e === 1 && !t,
2860
+ "sm:basis-1/12": e === 1 && t === "sm",
2861
+ "md:basis-1/12": e === 1 && t === "md",
2862
+ "lg:basis-1/12": e === 1 && t === "lg",
2863
+ "xl:basis-1/12": e === 1 && t === "xl",
2864
+ "2xl:basis-1/12": e === 1 && t === "2xl",
2865
+ "basis-2/12": e === 2 && !t,
2866
+ "sm:basis-2/12": e === 2 && t === "sm",
2867
+ "md:basis-2/12": e === 2 && t === "md",
2868
+ "lg:basis-2/12": e === 2 && t === "lg",
2869
+ "xl:basis-2/12": e === 2 && t === "xl",
2870
+ "2xl:basis-2/12": e === 2 && t === "2xl",
2871
+ "basis-3/12": e === 3 && !t,
2872
+ "sm:basis-3/12": e === 3 && t === "sm",
2873
+ "md:basis-3/12": e === 3 && t === "md",
2874
+ "lg:basis-3/12": e === 3 && t === "lg",
2875
+ "xl:basis-3/12": e === 3 && t === "xl",
2876
+ "2xl:basis-3/12": e === 3 && t === "2xl",
2877
+ "basis-4/12": e === 4 && !t,
2878
+ "sm:basis-4/12": e === 4 && t === "sm",
2879
+ "md:basis-4/12": e === 4 && t === "md",
2880
+ "lg:basis-4/12": e === 4 && t === "lg",
2881
+ "xl:basis-4/12": e === 4 && t === "xl",
2882
+ "2xl:basis-4/12": e === 4 && t === "2xl",
2883
+ "basis-5/12": e === 5 && !t,
2884
+ "sm:basis-5/12": e === 5 && t === "sm",
2885
+ "md:basis-5/12": e === 5 && t === "md",
2886
+ "lg:basis-5/12": e === 5 && t === "lg",
2887
+ "xl:basis-5/12": e === 5 && t === "xl",
2888
+ "2xl:basis-5/12": e === 5 && t === "2xl",
2889
+ "basis-6/12": e === 6 && !t,
2890
+ "sm:basis-6/12": e === 6 && t === "sm",
2891
+ "md:basis-6/12": e === 6 && t === "md",
2892
+ "lg:basis-6/12": e === 6 && t === "lg",
2893
+ "xl:basis-6/12": e === 6 && t === "xl",
2894
+ "2xl:basis-6/12": e === 6 && t === "2xl",
2895
+ "basis-7/12": e === 7 && !t,
2896
+ "sm:basis-7/12": e === 7 && t === "sm",
2897
+ "md:basis-7/12": e === 7 && t === "md",
2898
+ "lg:basis-7/12": e === 7 && t === "lg",
2899
+ "xl:basis-7/12": e === 7 && t === "xl",
2900
+ "2xl:basis-7/12": e === 7 && t === "2xl",
2901
+ "basis-8/12": e === 8 && !t,
2902
+ "sm:basis-8/12": e === 8 && t === "sm",
2903
+ "md:basis-8/12": e === 8 && t === "md",
2904
+ "lg:basis-8/12": e === 8 && t === "lg",
2905
+ "xl:basis-8/12": e === 8 && t === "xl",
2906
+ "2xl:basis-8/12": e === 8 && t === "2xl",
2907
+ "basis-9/12": e === 9 && !t,
2908
+ "sm:basis-9/12": e === 9 && t === "sm",
2909
+ "md:basis-9/12": e === 9 && t === "md",
2910
+ "lg:basis-9/12": e === 9 && t === "lg",
2911
+ "xl:basis-9/12": e === 9 && t === "xl",
2912
+ "2xl:basis-9/12": e === 9 && t === "2xl",
2913
+ "basis-10/12": e === 10 && !t,
2914
+ "sm:basis-10/12": e === 10 && t === "sm",
2915
+ "md:basis-10/12": e === 10 && t === "md",
2916
+ "lg:basis-10/12": e === 10 && t === "lg",
2917
+ "xl:basis-10/12": e === 10 && t === "xl",
2918
+ "2xl:basis-10/12": e === 10 && t === "2xl",
2919
+ "basis-11/12": e === 11 && !t,
2920
+ "sm:basis-11/12": e === 11 && t === "sm",
2921
+ "md:basis-11/12": e === 11 && t === "md",
2922
+ "lg:basis-11/12": e === 11 && t === "lg",
2923
+ "xl:basis-11/12": e === 11 && t === "xl",
2924
+ "2xl:basis-11/12": e === 11 && t === "2xl",
2925
+ "basis-full": e === 12 && !t,
2926
+ "sm:basis-full": e === 12 && t === "sm",
2927
+ "md:basis-full": e === 12 && t === "md",
2928
+ "lg:basis-full": e === 12 && t === "lg",
2929
+ "xl:basis-full": e === 12 && t === "xl",
2930
+ "2xl:basis-full": e === 12 && t === "2xl"
2931
+ }), bn = ({
2932
+ className: e,
2933
+ span: t
2934
+ }) => {
2935
+ if (!t)
2936
+ return y(e, _e, "box-border basis-auto");
2937
+ if (typeof t == "number")
2938
+ return y(e, _e, "box-border max-w-full", {
2939
+ [`${ze(t)}`]: !0
2940
+ });
2941
+ if (typeof t == "string")
2942
+ return y(e, _e, "box-border basis-auto", {
2943
+ "max-w-full grow": t === "auto"
2944
+ });
2945
+ if (typeof t == "object") {
2946
+ const r = Object.entries(t).map(([a, n]) => a === "fallback" ? ze(n) : ze(n, a));
2947
+ return y(
2948
+ e,
2949
+ _e,
2950
+ "box-border",
2951
+ r
2952
+ );
2953
+ }
2954
+ }, le = ({
2955
+ children: e,
2956
+ className: t,
2957
+ span: r,
2958
+ ...a
2959
+ }) => {
2960
+ const { columnGap: n, rowGap: o } = kt(er), s = {
2961
+ paddingLeft: n * De + "rem",
2962
+ paddingTop: o * De + "rem"
2963
+ }, i = bn({
2964
+ className: t,
2965
+ span: r
2966
+ });
2967
+ return /* @__PURE__ */ c("div", { className: i, style: s, ...a, children: e });
2968
+ };
2969
+ /*!
2970
+ @versini/ui-system v1.4.19
2971
+ © 2024 gizmette.com
2972
+ */
2973
+ try {
2974
+ window.__VERSINI_UI_SYSTEM__ || (window.__VERSINI_UI_SYSTEM__ = {
2975
+ version: "1.4.19",
2976
+ buildTime: "09/27/2024 11:56 AM EDT",
2977
+ homepage: "https://github.com/aversini/ui-components",
2978
+ license: "MIT"
2979
+ });
2980
+ } catch {
2981
+ }
2982
+ const tr = "av-text-input", En = "av-text-input-wrapper", je = "av-text-input-helper-text";
2983
+ function wn() {
2984
+ const e = $(!1);
2985
+ return q(() => (e.current = !0, () => {
2986
+ e.current = !1;
2987
+ }), []), z(() => e.current, []);
2988
+ }
2989
+ const Tn = {
2990
+ x: 0,
2991
+ y: 0,
2992
+ width: 0,
2993
+ height: 0,
2994
+ top: 0,
2995
+ left: 0,
2996
+ bottom: 0,
2997
+ right: 0
2998
+ };
2999
+ function vn(e) {
3000
+ const t = wn(), r = $(0), a = $(null), [n, o] = F(Tn), s = St(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
3001
+ const u = i[0];
3002
+ u && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
3003
+ a.current && t() && o(u.contentRect);
3004
+ }));
3005
+ }), [t]);
3006
+ return q(() => (a.current && (s == null || s.observe(a.current, e)), () => {
3007
+ s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
3008
+ }), [s, e]), [a, n];
3009
+ }
3010
+ function In(e) {
3011
+ const t = At();
3012
+ if (!e)
3013
+ return t;
3014
+ if (typeof e == "number" || typeof e == "string")
3015
+ return `${e}${t}`;
3016
+ if (typeof e == "object") {
3017
+ const { id: r, prefix: a = "" } = e;
3018
+ return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
3019
+ }
3020
+ }
3021
+ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", kn = {
3022
+ alert: null,
3023
+ alertdialog: null,
3024
+ log: "polite",
3025
+ marquee: null,
3026
+ progressbar: null,
3027
+ status: "polite",
3028
+ timer: "assertive"
3029
+ }, An = (e, t) => {
3030
+ switch (t == null ? void 0 : t.type) {
3031
+ case rr:
3032
+ return {
3033
+ ...e,
3034
+ announcement: t.payload
3035
+ };
3036
+ case ar:
3037
+ return {
3038
+ ...e,
2515
3039
  announcement: null
2516
3040
  };
2517
3041
  default:
2518
3042
  return e;
2519
3043
  }
2520
- }, ln = ({
3044
+ }, Sn = ({
2521
3045
  onAnnouncementClear: e,
2522
3046
  dispatch: t
2523
3047
  }) => {
2524
3048
  t({
2525
- type: zt
3049
+ type: ar
2526
3050
  }), typeof e == "function" && e();
2527
- }, pt = ({
3051
+ }, vt = ({
2528
3052
  children: e,
2529
3053
  clearAnnouncementDelay: t,
2530
3054
  clearAnnouncementTimeoutRef: r,
@@ -2532,16 +3056,16 @@ const jt = "SET_ANNOUNCEMENT", zt = "CLEAR_ANNOUNCEMENT", sn = {
2532
3056
  dispatch: n
2533
3057
  }) => {
2534
3058
  (r == null ? void 0 : r.current) !== null && clearTimeout(r.current), e !== null && n({
2535
- type: jt,
3059
+ type: rr,
2536
3060
  payload: e
2537
3061
  }), t && (r.current = setTimeout(
2538
- () => ln({
3062
+ () => Sn({
2539
3063
  onAnnouncementClear: a,
2540
3064
  dispatch: n
2541
3065
  }),
2542
3066
  t
2543
3067
  ));
2544
- }, dn = ({
3068
+ }, _n = ({
2545
3069
  children: e,
2546
3070
  announcementTimeoutRef: t,
2547
3071
  announcementDelay: r,
@@ -2550,13 +3074,13 @@ const jt = "SET_ANNOUNCEMENT", zt = "CLEAR_ANNOUNCEMENT", sn = {
2550
3074
  onAnnouncementClear: o,
2551
3075
  dispatch: s
2552
3076
  }) => {
2553
- clearTimeout(t.current), r ? t.current = setTimeout(pt, r, {
3077
+ clearTimeout(t.current), r ? t.current = setTimeout(vt, r, {
2554
3078
  children: e,
2555
3079
  clearAnnouncementDelay: a,
2556
3080
  clearAnnouncementTimeoutRef: n,
2557
3081
  onAnnouncementClear: o,
2558
3082
  dispatch: s
2559
- }) : pt({
3083
+ }) : vt({
2560
3084
  children: e,
2561
3085
  clearAnnouncementDelay: a,
2562
3086
  clearAnnouncementTimeoutRef: n,
@@ -2564,7 +3088,7 @@ const jt = "SET_ANNOUNCEMENT", zt = "CLEAR_ANNOUNCEMENT", sn = {
2564
3088
  dispatch: s
2565
3089
  });
2566
3090
  };
2567
- function qt({
3091
+ function nr({
2568
3092
  children: e,
2569
3093
  className: t,
2570
3094
  politeness: r,
@@ -2575,12 +3099,12 @@ function qt({
2575
3099
  visible: i,
2576
3100
  ...u
2577
3101
  }) {
2578
- const h = G(), p = G(), [m, l] = ft(cn, {
3102
+ const h = $(), p = $(), [m, l] = It(An, {
2579
3103
  announcement: null
2580
3104
  });
2581
3105
  let d = r;
2582
- typeof d > "u" && (d = a ? sn[a] : "assertive"), z(() => {
2583
- dn({
3106
+ typeof d > "u" && (d = a ? kn[a] : "assertive"), q(() => {
3107
+ _n({
2584
3108
  announcementTimeoutRef: h,
2585
3109
  announcementDelay: n,
2586
3110
  children: e,
@@ -2595,7 +3119,7 @@ function qt({
2595
3119
  o,
2596
3120
  s
2597
3121
  ]);
2598
- const y = f(t, {
3122
+ const f = y(t, {
2599
3123
  "sr-only": !i
2600
3124
  });
2601
3125
  return /* @__PURE__ */ c(
@@ -2603,57 +3127,58 @@ function qt({
2603
3127
  {
2604
3128
  "aria-live": d,
2605
3129
  ...a && { role: a },
2606
- className: y,
3130
+ className: f,
2607
3131
  ...u,
2608
3132
  children: m.announcement
2609
3133
  }
2610
3134
  );
2611
3135
  }
3136
+ const Rn = (e) => {
3137
+ let t = "";
3138
+ if (typeof e == "number" || typeof e == "string")
3139
+ t = "m-" + e;
3140
+ else {
3141
+ const r = [];
3142
+ (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
3143
+ }
3144
+ return t;
3145
+ };
2612
3146
  /*!
2613
- @versini/ui-private v1.4.8
3147
+ @versini/ui-private v1.4.17
2614
3148
  © 2024 gizmette.com
2615
3149
  */
2616
3150
  try {
2617
3151
  window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
2618
- version: "1.4.8",
2619
- buildTime: "09/09/2024 06:06 PM EDT",
3152
+ version: "1.4.17",
3153
+ buildTime: "09/28/2024 06:57 PM EDT",
2620
3154
  homepage: "https://github.com/aversini/ui-components",
2621
3155
  license: "MIT"
2622
3156
  });
2623
3157
  } catch {
2624
3158
  }
2625
- const un = (e) => {
2626
- let t = "";
2627
- if (typeof e == "number" || typeof e == "string")
2628
- t = "m-" + e;
2629
- else {
2630
- const r = [];
2631
- (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2632
- }
2633
- return t;
2634
- }, Qt = "av-text-input", mn = "av-text-input-wrapper", Ye = "av-text-input-helper-text", Co = "av-text-area", Oo = "av-text-area-wrapper", Po = "av-text-area-helper-text", Do = "av-text-area__control--right", $o = "av-toggle", hn = ({
3159
+ const Nn = ({
2635
3160
  mode: e
2636
- }) => f({
3161
+ }) => y({
2637
3162
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
2638
3163
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
2639
3164
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
2640
3165
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
2641
- }), pn = ({
3166
+ }), xn = ({
2642
3167
  focusMode: e
2643
- }) => f("focus:outline focus:outline-2 focus:outline-offset-2", {
3168
+ }) => y("focus:outline focus:outline-2 focus:outline-offset-2", {
2644
3169
  "focus:outline-focus-dark": e === "dark",
2645
3170
  "focus:outline-focus-light": e === "light",
2646
3171
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
2647
3172
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
2648
- }), gn = ({
3173
+ }), Cn = ({
2649
3174
  noBorder: e,
2650
3175
  error: t
2651
- }) => f("border-2", {
3176
+ }) => y("border-2", {
2652
3177
  "border-border-dark": !e && !t,
2653
3178
  "focus:border-border-dark": !e && t,
2654
3179
  "border-border-error-dark": !e && t,
2655
3180
  "border-transparent": e
2656
- }), fn = ({
3181
+ }), On = ({
2657
3182
  disabled: e,
2658
3183
  raw: t,
2659
3184
  error: r,
@@ -2662,22 +3187,22 @@ const un = (e) => {
2662
3187
  if (t)
2663
3188
  return "";
2664
3189
  if (e)
2665
- return f("absolute px-2 cursor-not-allowed opacity-50 font-medium");
3190
+ return y("absolute px-2 cursor-not-allowed opacity-50 font-medium");
2666
3191
  if (!r)
2667
- return f("absolute px-2 cursor-text font-medium", {
3192
+ return y("absolute px-2 cursor-text font-medium", {
2668
3193
  "text-copy-lighter": a === "dark",
2669
3194
  "text-copy-dark": a === "light",
2670
3195
  "text-copy-dark dark:text-copy-lighter": a === "system",
2671
3196
  "text-copy-lighter dark:text-copy-dark": a === "alt-system"
2672
3197
  });
2673
3198
  if (r)
2674
- return f("absolute px-2 cursor-text font-medium", {
3199
+ return y("absolute px-2 cursor-text font-medium", {
2675
3200
  "text-copy-lighter": a === "dark",
2676
3201
  "text-copy-error-dark": a === "light",
2677
3202
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
2678
3203
  "text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
2679
3204
  });
2680
- }, yn = ({
3205
+ }, Pn = ({
2681
3206
  error: e,
2682
3207
  raw: t,
2683
3208
  mode: r,
@@ -2686,25 +3211,25 @@ const un = (e) => {
2686
3211
  if (t)
2687
3212
  return "";
2688
3213
  if (a)
2689
- return f(
2690
- Ye,
3214
+ return y(
3215
+ je,
2691
3216
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
2692
3217
  );
2693
3218
  if (!e)
2694
- return f(Ye, "absolute px-2 font-medium", {
3219
+ return y(je, "absolute px-2 font-medium", {
2695
3220
  "text-copy-lighter": r === "dark",
2696
3221
  "text-copy-dark": r === "light",
2697
3222
  "text-copy-dark dark:text-copy-lighter": r === "system",
2698
3223
  "text-copy-lighter dark:text-copy-dark": r === "alt-system"
2699
3224
  });
2700
3225
  if (e)
2701
- return f(Ye, "absolute px-2 font-medium", {
3226
+ return y(je, "absolute px-2 font-medium", {
2702
3227
  "text-copy-error-light bg-surface-darker": r === "dark",
2703
3228
  "text-copy-error-dark": r === "light",
2704
3229
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
2705
3230
  "dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
2706
3231
  });
2707
- }, bn = ({
3232
+ }, Dn = ({
2708
3233
  className: e,
2709
3234
  inputClassName: t,
2710
3235
  raw: r,
@@ -2713,43 +3238,64 @@ const un = (e) => {
2713
3238
  error: o,
2714
3239
  spacing: s,
2715
3240
  mode: i,
2716
- focusMode: u
3241
+ focusMode: u,
3242
+ size: h
2717
3243
  }) => {
2718
- const h = r ? e : f(
3244
+ const p = r ? e : y(
2719
3245
  "relative flex w-full flex-col justify-center",
2720
- mn,
3246
+ En,
2721
3247
  e,
2722
- un(s)
2723
- ), p = r ? f(t) : f(
2724
- Qt,
3248
+ Rn(s)
3249
+ );
3250
+ let m = "";
3251
+ switch (h) {
3252
+ case "xs":
3253
+ m = "h-8";
3254
+ break;
3255
+ case "sm":
3256
+ m = "h-10";
3257
+ break;
3258
+ case "lg":
3259
+ m = "h-14";
3260
+ break;
3261
+ case "xl":
3262
+ m = "h-16";
3263
+ break;
3264
+ default:
3265
+ m = "h-12";
3266
+ break;
3267
+ }
3268
+ const l = r ? y(t) : y(
3269
+ tr,
2725
3270
  t,
2726
- "h-12 rounded-md px-4 text-base",
2727
- hn({ mode: i }),
2728
- pn({ focusMode: u }),
2729
- gn({ noBorder: n, error: o }),
3271
+ m,
3272
+ "rounded-md text-base px-4",
3273
+ Nn({ mode: i }),
3274
+ xn({ focusMode: u }),
3275
+ Cn({ noBorder: n, error: o }),
2730
3276
  {
2731
3277
  "disabled:cursor-not-allowed disabled:opacity-50": a
2732
3278
  }
2733
- ), m = r ? void 0 : "sr-only", l = fn({
3279
+ ), d = r ? void 0 : "sr-only", f = On({
2734
3280
  disabled: a,
2735
3281
  raw: r,
2736
3282
  error: o,
2737
3283
  mode: i
2738
- }), d = yn({
3284
+ }), b = Pn({
2739
3285
  error: o,
2740
3286
  raw: r,
2741
3287
  mode: i,
2742
3288
  disabled: a
2743
3289
  });
2744
3290
  return {
2745
- wrapper: h,
2746
- input: p,
2747
- accessibleLabel: m,
2748
- visibleLabel: l,
2749
- helperText: d,
3291
+ wrapper: p,
3292
+ input: l,
3293
+ accessibleLabel: d,
3294
+ visibleLabel: f,
3295
+ helperText: b,
2750
3296
  rightElement: r ? void 0 : "absolute right-3"
2751
3297
  };
2752
- }, Ze = V.forwardRef(
3298
+ }, nt = W.forwardRef(
2753
3299
  ({
2754
3300
  id: e,
2755
3301
  name: t,
@@ -2765,12 +3311,19 @@ const un = (e) => {
2765
3311
  labelId: m,
2766
3312
  labelHidden: l = !1,
2767
3313
  type: d = "text",
2768
- helperText: y = "",
2769
- rightElement: E,
2770
- spacing: R,
2771
- ...w
2772
- }, U) => {
2773
- const [H, O] = nn(), [oe, P] = J(0), N = on({ id: e, prefix: `${Qt}-` }), x = `${t} error, ${y}`, D = bn({
3314
+ helperText: f = "",
3315
+ rightElement: b,
3316
+ spacing: I,
3317
+ size: w = "md",
3318
+ ...P
3319
+ }, D) => {
3320
+ const [L, M] = vn(), [O, G] = F(0), R = In({ id: e, prefix: `${tr}-` }), pe = `${t} error, ${f}`, X = $(null), Q = $(null), C = {
3321
+ xs: { label: "-25px", helperText: "30px" },
3322
+ sm: { label: "-29px", helperText: "34px" },
3323
+ md: { label: "-33px", helperText: "38px" },
3324
+ lg: { label: "-15px", helperText: "22px" },
3325
+ xl: { label: "-19px", helperText: "25px" }
3326
+ }, N = Dn({
2774
3327
  className: o,
2775
3328
  inputClassName: s,
2776
3329
  error: a,
@@ -2778,68 +3331,86 @@ const un = (e) => {
2778
3331
  focusMode: u,
2779
3332
  disabled: h,
2780
3333
  noBorder: p,
2781
- spacing: R,
2782
- mode: i
3334
+ spacing: I,
3335
+ mode: i,
3336
+ size: w
2783
3337
  });
2784
- return nr(() => {
2785
- O && O.width && P(O.width + 18 + 10);
2786
- }, [O]), /* @__PURE__ */ I("div", { className: D.wrapper, children: [
3338
+ return st(() => {
3339
+ M && M.width && G(M.width + 18 + 10);
3340
+ }, [M]), st(() => {
3341
+ var ee, g;
3342
+ const { label: T, helperText: E } = C[w];
3343
+ (ee = X == null ? void 0 : X.current) == null || ee.style.setProperty("--av-text-input-label", T), (g = Q == null ? void 0 : Q.current) == null || g.style.setProperty(
3344
+ "--av-text-input-helper-text",
3345
+ E
3346
+ );
3347
+ }, [w]), /* @__PURE__ */ v("div", { className: N.wrapper, children: [
2787
3348
  /* @__PURE__ */ c(
2788
3349
  "label",
2789
3350
  {
2790
- htmlFor: N,
3351
+ htmlFor: R,
2791
3352
  id: m,
2792
- className: D.accessibleLabel,
3353
+ className: N.accessibleLabel,
2793
3354
  children: r
2794
3355
  }
2795
3356
  ),
2796
3357
  /* @__PURE__ */ c(
2797
3358
  "input",
2798
3359
  {
2799
- ref: U,
2800
- id: N,
3360
+ ref: D,
3361
+ id: R,
2801
3362
  name: t,
2802
3363
  type: d,
2803
3364
  disabled: h,
2804
3365
  placeholder: n ? void 0 : " ",
2805
- className: D.input,
2806
- ...y && { "aria-describedby": `${N}-helper` },
3366
+ className: N.input,
3367
+ ...f && { "aria-describedby": `${R}-helper` },
2807
3368
  ...a && { "aria-invalid": "true" },
2808
- ...E && !n && { style: { paddingRight: oe } },
2809
- ...w
3369
+ ...b && !n && { style: { paddingRight: O } },
3370
+ ...P
2810
3371
  }
2811
3372
  ),
2812
3373
  !n && !l && /* @__PURE__ */ c(
2813
3374
  "label",
2814
3375
  {
3376
+ ref: X,
2815
3377
  "aria-hidden": !0,
2816
- htmlFor: N,
2817
- className: D.visibleLabel,
3378
+ htmlFor: R,
3379
+ className: N.visibleLabel,
2818
3380
  children: r
2819
3381
  }
2820
3382
  ),
2821
- y && /* @__PURE__ */ c(
3383
+ f && /* @__PURE__ */ c(
2822
3384
  "div",
2823
3385
  {
2824
- id: `${N}-helper`,
2825
- className: D.helperText,
2826
- children: y
3386
+ ref: Q,
3387
+ id: `${R}-helper`,
3388
+ className: N.helperText,
3389
+ children: f
2827
3390
  }
2828
3391
  ),
2829
- E && /* @__PURE__ */ c(
3392
+ b && /* @__PURE__ */ c(
2830
3393
  "div",
2831
3394
  {
2832
- ref: H,
2833
- className: D.rightElement,
2834
- children: E
3395
+ ref: L,
3396
+ className: N.rightElement,
3397
+ children: b
2835
3398
  }
2836
3399
  ),
2837
- a && y && /* @__PURE__ */ c(qt, { politeness: "polite", clearAnnouncementDelay: 500, children: x })
3400
+ a && f && /* @__PURE__ */ c(nr, { politeness: "polite", clearAnnouncementDelay: 500, children: pe })
2838
3401
  ] });
2839
3402
  }
2840
3403
  );
2841
- Ze.displayName = "TextInput";
2842
- const En = 500, wn = 5e3, Tn = 2e4, Xt = V.forwardRef(
3404
+ nt.displayName = "TextInput";
3405
+ function $n(e) {
3406
+ return St(() => e.every((t) => t == null) ? () => {
3407
+ } : (t) => {
3408
+ e.forEach((r) => {
3409
+ typeof r == "function" ? r(t) : r != null && (r.current = t);
3410
+ });
3411
+ }, e);
3412
+ }
3413
+ const Ln = 500, Mn = 5e3, Un = 2e4, or = W.forwardRef(
2843
3414
  ({
2844
3415
  name: e,
2845
3416
  disabled: t,
@@ -2854,447 +3425,93 @@ const En = 500, wn = 5e3, Tn = 2e4, Xt = V.forwardRef(
2854
3425
  spacing: p,
2855
3426
  ...m
2856
3427
  }, l) => {
2857
- const [d, y] = J(!0), [E, R] = J({
3428
+ const [d, f] = F(!0), [b, I] = F({
2858
3429
  message: null,
2859
3430
  politeness: null
2860
- }), w = G(!0), U = G(), H = G(null), O = tn([l, H]), oe = d ? "Show" : "Hide", P = () => {
2861
- clearTimeout(U.current), w.current || (U.current = window.setTimeout(() => {
2862
- w.current = !0, y(!0), R({
2863
- announcementTimeout: wn,
3431
+ }), w = $(!0), P = $(), D = $(null), L = $n([l, D]), M = d ? "Show" : "Hide", O = () => {
3432
+ clearTimeout(P.current), w.current || (P.current = window.setTimeout(() => {
3433
+ w.current = !0, f(!0), I({
3434
+ announcementTimeout: Mn,
2864
3435
  politeness: "polite",
2865
3436
  message: `${r} hiding characters`
2866
3437
  }), n && n(!0);
2867
- }, Tn));
2868
- }, N = (C) => {
3438
+ }, Un));
3439
+ }, G = (C) => {
2869
3440
  C.preventDefault();
2870
- const K = !w.current;
2871
- w.current = K, P(), y(K), R({
2872
- announcementTimeout: En,
3441
+ const N = !w.current;
3442
+ w.current = N, O(), f(N), I({
3443
+ announcementTimeout: Ln,
2873
3444
  politeness: "assertive",
2874
- message: K ? "Characters hidden" : "Characters showing"
2875
- }), n && n(K);
2876
- }, x = (C) => {
2877
- var K;
2878
- const { relatedTarget: $e } = C, g = (K = H.current) == null ? void 0 : K.parentElement;
2879
- g != null && g.contains($e) || u && u();
2880
- }, D = (C) => {
2881
- P(), s && s(C), x(C);
2882
- }, Pe = (C) => {
2883
- P(), i && i(C);
2884
- }, De = (C) => {
2885
- P(), o && o(C);
2886
- };
2887
- return z(() => () => {
2888
- clearTimeout(U.current);
2889
- }, []), /* @__PURE__ */ I(le, { children: [
2890
- /* @__PURE__ */ c(
2891
- Ze,
2892
- {
2893
- ref: O,
2894
- name: e,
2895
- label: r,
2896
- labelHidden: a,
2897
- type: d ? "password" : "text",
2898
- disabled: t,
2899
- spacing: p,
2900
- onBlur: D,
2901
- onFocus: Pe,
2902
- onChange: De,
2903
- rightElement: V.cloneElement(h, {
2904
- ref: l,
2905
- label: oe,
2906
- onClick: N,
2907
- onBlur: x,
2908
- disabled: t
2909
- }),
2910
- ...m
2911
- }
2912
- ),
2913
- /* @__PURE__ */ c(
2914
- qt,
2915
- {
2916
- role: "status",
2917
- politeness: E.politeness,
2918
- clearAnnouncementDelay: E.announcementTimeout,
2919
- children: E.message
2920
- }
2921
- )
2922
- ] });
2923
- }
2924
- );
2925
- Xt.displayName = "TextInputMask";
2926
- /*!
2927
- @versini/ui-form v1.3.10
2928
- © 2024 gizmette.com
2929
- */
2930
- try {
2931
- window.__VERSINI_UI_FORM__ || (window.__VERSINI_UI_FORM__ = {
2932
- version: "1.3.10",
2933
- buildTime: "09/09/2024 06:06 PM EDT",
2934
- homepage: "https://github.com/aversini/ui-components",
2935
- license: "MIT"
2936
- });
2937
- } catch {
2938
- }
2939
- const In = (e) => {
2940
- let t = "";
2941
- if (typeof e == "number" || typeof e == "string")
2942
- t = "m-" + e;
2943
- else {
2944
- const r = [];
2945
- (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2946
- }
2947
- return t;
2948
- }, Oe = ({
2949
- children: e,
2950
- fill: t,
2951
- viewBox: r,
2952
- className: a,
2953
- defaultViewBox: n,
2954
- defaultClassName: o,
2955
- spacing: s,
2956
- title: i,
2957
- semantic: u = !1,
2958
- ...h
2959
- }) => {
2960
- const p = In(s), m = f(
2961
- p,
2962
- a || o
2963
- );
2964
- return /* @__PURE__ */ I(le, { children: [
2965
- /* @__PURE__ */ c(
2966
- "svg",
2967
- {
2968
- xmlns: "http://www.w3.org/2000/svg",
2969
- className: m,
2970
- viewBox: r || n,
2971
- fill: t || "currentColor",
2972
- role: "img",
2973
- "aria-hidden": !u,
2974
- focusable: !1,
2975
- ...h,
2976
- children: e
2977
- }
2978
- ),
2979
- i && u && /* @__PURE__ */ c("span", { className: "sr-only", children: i })
2980
- ] });
2981
- };
2982
- /*!
2983
- @versini/ui-private v1.4.8
2984
- © 2024 gizmette.com
2985
- */
2986
- try {
2987
- window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
2988
- version: "1.4.8",
2989
- buildTime: "08/31/2024 05:10 PM EDT",
2990
- homepage: "https://github.com/aversini/ui-components",
2991
- license: "MIT"
2992
- });
2993
- } catch {
2994
- }
2995
- const vn = ({
2996
- className: e,
2997
- viewBox: t,
2998
- spacing: r,
2999
- ...a
3000
- }) => /* @__PURE__ */ c(
3001
- Oe,
3002
- {
3003
- defaultViewBox: "0 0 1200 500",
3004
- defaultClassName: "w-full",
3005
- viewBox: t,
3006
- className: e,
3007
- spacing: r,
3008
- title: "Sassy Dog",
3009
- ...a,
3010
- children: /* @__PURE__ */ c("g", { transform: "matrix(11.9092 0 0 11.9092 470.0017 250.0009)", id: "879221", children: /* @__PURE__ */ c(
3011
- "path",
3012
- {
3013
- vectorEffect: "non-scaling-stroke",
3014
- transform: " translate(-50.7473, -45.4051)",
3015
- d: "M 89.2 27 c 0 -0.2 -0.1 -0.5 -0.3 -0.6 c -0.6 -0.4 -1.6 -0.1 -2.2 0 c -1.5 0.2 -2.9 0.4 -4.5 0.4 c -2.2 0 -4.5 -0.1 -6.7 -0.4 c -2 -0.3 -3.7 -0.9 -5.8 -0.3 c -3 0.8 -4.9 3.2 -4.8 6.3 c 0.1 1.8 -0.2 3.2 -0.8 4.8 c -0.6 1.5 -1.3 1.7 -2.7 1.7 c -9.7 0 -19.3 -0.1 -29 0 c -1.7 0 -3.5 0 -5.3 0 c -2.5 0 -5 0.5 -7.5 0 c -1.8 -0.4 -3.6 -1.3 -4.9 -2.6 c -0.3 -0.3 -0.9 -1.2 -1.2 -1.2 c -0.4 0.1 -0.4 1.3 -0.4 1.6 c 0 1.3 0.5 2.6 0.5 3.9 c 0 1.3 -0.6 2.4 -1 3.6 c -0.4 1.4 -0.4 2.8 -0.2 4.2 c 0.4 2.3 0.8 4.7 1 7.1 c 0.2 2.1 0.2 4.1 0.4 6.2 c 0.2 1.7 0.3 2.5 2.5 2.8 c 2.6 0.4 2.6 -0.5 3.2 -2.2 c 0.8 -2.1 1.5 -4.3 2.3 -6.4 c 0.7 -1.6 1.3 -5.1 5.7 -3.4 c 2.4 0.9 4.9 1.4 7.4 2.1 c 2.7 0.7 5.5 1.4 8.2 1.9 c 5.5 1.1 11.1 1.7 16.8 2 c 0.6 0 1 0 1.4 0.5 c 1.5 1.9 -0.3 5.3 3.5 5.9 c 3.4 0.5 3.4 -1.9 3.8 -4 c 0.2 -1.2 0.4 -2.3 0.7 -3.4 c 0.1 -0.5 0.5 -1 0.9 -1.3 c 4.7 -2.8 7.4 -8.3 6.6 -13.8 c -0.1 -0.9 -0.4 -1.8 -0.3 -2.8 c 0.2 -2 2.7 -2.8 4.2 -3.6 c 1.9 -1.1 4 -2.1 5.6 -3.6 c 1.1 -1 2 -2.3 2.5 -3.7 C 89.1 28.2 89.3 27.5 89.2 27 z M 73.2 40.4 c -0.2 2.1 -1.1 3.1 -3 3.5 c -3.4 0.7 -5.6 -1.6 -4.6 -4.9 c 0.7 -2.2 1.5 -4.3 2.5 -6.3 c 1 -2 1.9 -2 3.1 -0.1 C 72.7 35 73.5 37.6 73.2 40.4 z M 76.4 31.2 c -0.6 0 -1.1 -0.5 -1.1 -1.1 c 0 -0.6 0.5 -1.1 1.1 -1.1 c 0.6 0 1.1 0.5 1.1 1.1 C 77.5 30.7 77 31.2 76.4 31.2 z",
3016
- strokeLinecap: "round"
3017
- }
3018
- ) })
3019
- }
3020
- ), Sn = ({
3021
- className: e,
3022
- viewBox: t,
3023
- spacing: r,
3024
- title: a,
3025
- monotone: n,
3026
- ...o
3027
- }) => /* @__PURE__ */ I(
3028
- Oe,
3029
- {
3030
- defaultViewBox: "0 0 640 512",
3031
- defaultClassName: "size-5",
3032
- viewBox: t,
3033
- className: e,
3034
- spacing: r,
3035
- title: a || "Hide",
3036
- ...o,
3037
- children: [
3445
+ message: N ? "Characters hidden" : "Characters showing"
3446
+ }), n && n(N);
3447
+ }, R = (C) => {
3448
+ var N;
3449
+ const { relatedTarget: ee } = C, g = (N = D.current) == null ? void 0 : N.parentElement;
3450
+ g != null && g.contains(ee) || u && u();
3451
+ }, pe = (C) => {
3452
+ O(), s && s(C), R(C);
3453
+ }, X = (C) => {
3454
+ O(), i && i(C);
3455
+ }, Q = (C) => {
3456
+ O(), o && o(C);
3457
+ };
3458
+ return q(() => () => {
3459
+ clearTimeout(P.current);
3460
+ }, []), /* @__PURE__ */ v(ye, { children: [
3038
3461
  /* @__PURE__ */ c(
3039
- "path",
3462
+ nt,
3040
3463
  {
3041
- opacity: n ? "1" : "0.4",
3042
- d: "M360.8 380.3C339.4 392.8 314.6 400 288 400c-79.5 0-144-64.5-144-144c0-14.5 2.1-28.5 6.1-41.7L63.5 146c-29.4 34.7-49.9 70.8-61.1 97.6c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480c56.1 0 104.4-17.8 144.5-43.2l-71.7-56.5zM198.5 252.4c-3.7 .8-6.7 3.7-6.5 7.7c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9c1.9-.5 3.9-1.1 5.7-1.7l-120-94.6zm89-52.4l94.8 74.3c2.7-13.9 2.4-28.6-1.5-43.2c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 2.7-.2 5.4-.5 8zM432 256c0 17.7-3.2 34.6-9 50.2l84.1 65.9c32.3-36.6 54.6-75.4 66.4-103.9c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32c-60 0-111.1 20.3-152.8 48.7L207 136.9c23.1-15.7 51-24.9 81-24.9c79.5 0 144 64.5 144 144z"
3464
+ ref: L,
3465
+ name: e,
3466
+ label: r,
3467
+ labelHidden: a,
3468
+ type: d ? "password" : "text",
3469
+ disabled: t,
3470
+ spacing: p,
3471
+ onBlur: pe,
3472
+ onFocus: X,
3473
+ onChange: Q,
3474
+ rightElement: W.cloneElement(h, {
3475
+ ref: l,
3476
+ label: M,
3477
+ onClick: G,
3478
+ onBlur: R,
3479
+ disabled: t
3480
+ }),
3481
+ ...m
3043
3482
  }
3044
3483
  ),
3045
- /* @__PURE__ */ c("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z" })
3046
- ]
3047
- }
3048
- ), An = ({
3049
- className: e,
3050
- viewBox: t,
3051
- spacing: r,
3052
- title: a,
3053
- monotone: n,
3054
- ...o
3055
- }) => {
3056
- const s = n ? "1" : "0.4";
3057
- return /* @__PURE__ */ I(
3058
- Oe,
3059
- {
3060
- defaultViewBox: "0 0 216 216",
3061
- defaultClassName: "size-5",
3062
- viewBox: t,
3063
- className: e,
3064
- spacing: r,
3065
- title: a || "Passkey",
3066
- ...o,
3067
- children: [
3068
- /* @__PURE__ */ c(
3069
- "path",
3070
- {
3071
- opacity: s,
3072
- d: "M172.32,96.79c0,13.78-8.48,25.5-20.29,29.78l7.14,11.83l-10.57,13l10.57,12.71l-17.04,22.87l-12.01-12.82 v-25.9v-22.56c-10.68-4.85-18.15-15.97-18.15-28.91c0-17.4,13.51-31.51,30.18-31.51C158.81,65.28,172.32,79.39,172.32,96.79z M142.14,101.61c4.02,0,7.28-3.4,7.28-7.6c0-4.2-3.26-7.61-7.28-7.61s-7.28,3.4-7.28,7.61 C134.85,98.21,138.12,101.61,142.14,101.61z"
3073
- }
3074
- ),
3075
- /* @__PURE__ */ c(
3076
- "path",
3077
- {
3078
- opacity: s,
3079
- d: "M172.41,96.88c0,13.62-8.25,25.23-19.83,29.67l6.58,11.84l-9.73,13l9.73,12.71l-17.03,23.05v-25.9v-32.77 v-26.87c4.02,0,7.28-3.41,7.28-7.6c0-4.2-3.26-7.61-7.28-7.61V65.28C158.86,65.28,172.41,79.43,172.41,96.88z"
3080
- }
3081
- ),
3082
- /* @__PURE__ */ c("path", { d: "M120.24,131.43c-9.75-8-16.3-20.3-17.2-34.27H50.8c-10.96,0-19.84,9.01-19.84,20.13v25.17 c0,5.56,4.44,10.07,9.92,10.07h69.44c5.48,0,9.92-4.51,9.92-10.07V131.43z" }),
3083
- /* @__PURE__ */ c("path", { d: "M73.16,91.13c-2.42-0.46-4.82-0.89-7.11-1.86C57.4,85.64,52.36,78.95,50.73,69.5 c-1.12-6.47-0.59-12.87,2.03-18.92c3.72-8.6,10.39-13.26,19.15-14.84c5.24-0.94,10.46-0.73,15.5,1.15 c7.59,2.82,12.68,8.26,15.03,16.24c2.38,8.05,2.03,16.1-1.56,23.72c-3.72,7.96-10.21,12.23-18.42,13.9 c-0.68,0.14-1.37,0.27-2.05,0.41C78,91.13,75.58,91.13,73.16,91.13z" })
3084
- ]
3085
- }
3086
- );
3087
- }, kn = ({
3088
- className: e,
3089
- viewBox: t,
3090
- spacing: r,
3091
- title: a,
3092
- monotone: n,
3093
- ...o
3094
- }) => /* @__PURE__ */ I(
3095
- Oe,
3096
- {
3097
- defaultViewBox: "0 0 576 512",
3098
- defaultClassName: "size-5",
3099
- viewBox: t,
3100
- className: e,
3101
- spacing: r,
3102
- title: a || "Show",
3103
- ...o,
3104
- children: [
3105
3484
  /* @__PURE__ */ c(
3106
- "path",
3485
+ nr,
3107
3486
  {
3108
- opacity: n ? "1" : "0.4",
3109
- d: "M95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 400a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"
3487
+ role: "status",
3488
+ politeness: b.politeness,
3489
+ clearAnnouncementDelay: b.announcementTimeout,
3490
+ children: b.message
3110
3491
  }
3111
- ),
3112
- /* @__PURE__ */ c("path", { d: "M224 256c35.3 0 64-28.7 64-64c0-7.1-1.2-13.9-3.3-20.3c-1.8-5.5 1.6-11.9 7.4-11.7c40.8 1.7 77.5 29.6 88.6 71.1c13.7 51.2-16.7 103.9-67.9 117.6s-103.9-16.7-117.6-67.9c-1.9-6.9-2.9-13.9-3.2-20.7c-.3-5.8 6.1-9.2 11.7-7.4c6.4 2.1 13.2 3.3 20.3 3.3z" })
3113
- ]
3492
+ )
3493
+ ] });
3114
3494
  }
3115
3495
  );
3496
+ or.displayName = "TextInputMask";
3116
3497
  /*!
3117
- @versini/ui-icons v1.12.0
3118
- © 2024 gizmette.com
3119
- */
3120
- try {
3121
- window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
3122
- version: "1.12.0",
3123
- buildTime: "08/31/2024 05:10 PM EDT",
3124
- homepage: "https://github.com/aversini/ui-components",
3125
- license: "MIT"
3126
- });
3127
- } catch {
3128
- }
3129
- const _n = (e) => {
3130
- let t = "";
3131
- if (typeof e == "number" || typeof e == "string")
3132
- t = "m-" + e;
3133
- else {
3134
- const r = [];
3135
- (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
3136
- }
3137
- return t;
3138
- }, Rn = "av-flexgrid", Ee = "av-flexgrid-item", _e = 0.25, Zt = V.createContext({
3139
- columnGap: 0,
3140
- rowGap: 0
3141
- }), gt = ({
3142
- children: e,
3143
- className: t,
3144
- columnGap: r = 1,
3145
- rowGap: a = 0,
3146
- height: n = "auto",
3147
- width: o = "auto",
3148
- direction: s = "row",
3149
- alignHorizontal: i = "normal",
3150
- alignVertical: u = "normal",
3151
- spacing: h,
3152
- ...p
3153
- }) => {
3154
- const m = {
3155
- flexDirection: s,
3156
- justifyContent: i,
3157
- alignItems: u,
3158
- height: n,
3159
- width: o,
3160
- /**
3161
- * Trick to account for the extra space taken
3162
- * by the columnGap and rowGap that will be applied
3163
- * to all FlexgridItems (see context and paddings).
3164
- */
3165
- marginLeft: r * -1 * _e + "rem",
3166
- marginTop: a * -1 * _e + "rem"
3167
- }, l = f(
3168
- Rn,
3169
- t,
3170
- "box-border flex flex-wrap"
3171
- ), d = { columnGap: r, rowGap: a }, y = h ? "div" : V.Fragment;
3172
- return /* @__PURE__ */ c(y, { ...h ? { className: _n(h) } : {}, children: /* @__PURE__ */ c("div", { className: l, style: m, ...p, children: /* @__PURE__ */ c(Zt.Provider, { value: d, children: e }) }) });
3173
- }, Je = (e, t) => f({
3174
- "basis-1/12": e === 1 && !t,
3175
- "sm:basis-1/12": e === 1 && t === "sm",
3176
- "md:basis-1/12": e === 1 && t === "md",
3177
- "lg:basis-1/12": e === 1 && t === "lg",
3178
- "xl:basis-1/12": e === 1 && t === "xl",
3179
- "2xl:basis-1/12": e === 1 && t === "2xl",
3180
- "basis-2/12": e === 2 && !t,
3181
- "sm:basis-2/12": e === 2 && t === "sm",
3182
- "md:basis-2/12": e === 2 && t === "md",
3183
- "lg:basis-2/12": e === 2 && t === "lg",
3184
- "xl:basis-2/12": e === 2 && t === "xl",
3185
- "2xl:basis-2/12": e === 2 && t === "2xl",
3186
- "basis-3/12": e === 3 && !t,
3187
- "sm:basis-3/12": e === 3 && t === "sm",
3188
- "md:basis-3/12": e === 3 && t === "md",
3189
- "lg:basis-3/12": e === 3 && t === "lg",
3190
- "xl:basis-3/12": e === 3 && t === "xl",
3191
- "2xl:basis-3/12": e === 3 && t === "2xl",
3192
- "basis-4/12": e === 4 && !t,
3193
- "sm:basis-4/12": e === 4 && t === "sm",
3194
- "md:basis-4/12": e === 4 && t === "md",
3195
- "lg:basis-4/12": e === 4 && t === "lg",
3196
- "xl:basis-4/12": e === 4 && t === "xl",
3197
- "2xl:basis-4/12": e === 4 && t === "2xl",
3198
- "basis-5/12": e === 5 && !t,
3199
- "sm:basis-5/12": e === 5 && t === "sm",
3200
- "md:basis-5/12": e === 5 && t === "md",
3201
- "lg:basis-5/12": e === 5 && t === "lg",
3202
- "xl:basis-5/12": e === 5 && t === "xl",
3203
- "2xl:basis-5/12": e === 5 && t === "2xl",
3204
- "basis-6/12": e === 6 && !t,
3205
- "sm:basis-6/12": e === 6 && t === "sm",
3206
- "md:basis-6/12": e === 6 && t === "md",
3207
- "lg:basis-6/12": e === 6 && t === "lg",
3208
- "xl:basis-6/12": e === 6 && t === "xl",
3209
- "2xl:basis-6/12": e === 6 && t === "2xl",
3210
- "basis-7/12": e === 7 && !t,
3211
- "sm:basis-7/12": e === 7 && t === "sm",
3212
- "md:basis-7/12": e === 7 && t === "md",
3213
- "lg:basis-7/12": e === 7 && t === "lg",
3214
- "xl:basis-7/12": e === 7 && t === "xl",
3215
- "2xl:basis-7/12": e === 7 && t === "2xl",
3216
- "basis-8/12": e === 8 && !t,
3217
- "sm:basis-8/12": e === 8 && t === "sm",
3218
- "md:basis-8/12": e === 8 && t === "md",
3219
- "lg:basis-8/12": e === 8 && t === "lg",
3220
- "xl:basis-8/12": e === 8 && t === "xl",
3221
- "2xl:basis-8/12": e === 8 && t === "2xl",
3222
- "basis-9/12": e === 9 && !t,
3223
- "sm:basis-9/12": e === 9 && t === "sm",
3224
- "md:basis-9/12": e === 9 && t === "md",
3225
- "lg:basis-9/12": e === 9 && t === "lg",
3226
- "xl:basis-9/12": e === 9 && t === "xl",
3227
- "2xl:basis-9/12": e === 9 && t === "2xl",
3228
- "basis-10/12": e === 10 && !t,
3229
- "sm:basis-10/12": e === 10 && t === "sm",
3230
- "md:basis-10/12": e === 10 && t === "md",
3231
- "lg:basis-10/12": e === 10 && t === "lg",
3232
- "xl:basis-10/12": e === 10 && t === "xl",
3233
- "2xl:basis-10/12": e === 10 && t === "2xl",
3234
- "basis-11/12": e === 11 && !t,
3235
- "sm:basis-11/12": e === 11 && t === "sm",
3236
- "md:basis-11/12": e === 11 && t === "md",
3237
- "lg:basis-11/12": e === 11 && t === "lg",
3238
- "xl:basis-11/12": e === 11 && t === "xl",
3239
- "2xl:basis-11/12": e === 11 && t === "2xl",
3240
- "basis-full": e === 12 && !t,
3241
- "sm:basis-full": e === 12 && t === "sm",
3242
- "md:basis-full": e === 12 && t === "md",
3243
- "lg:basis-full": e === 12 && t === "lg",
3244
- "xl:basis-full": e === 12 && t === "xl",
3245
- "2xl:basis-full": e === 12 && t === "2xl"
3246
- }), Nn = ({
3247
- className: e,
3248
- span: t
3249
- }) => {
3250
- if (!t)
3251
- return f(e, Ee, "box-border basis-auto");
3252
- if (typeof t == "number")
3253
- return f(e, Ee, "box-border max-w-full", {
3254
- [`${Je(t)}`]: !0
3255
- });
3256
- if (typeof t == "string")
3257
- return f(e, Ee, "box-border basis-auto", {
3258
- "max-w-full grow": t === "auto"
3259
- });
3260
- if (typeof t == "object") {
3261
- const r = Object.entries(t).map(([a, n]) => a === "fallback" ? Je(n) : Je(n, a));
3262
- return f(
3263
- e,
3264
- Ee,
3265
- "box-border",
3266
- r
3267
- );
3268
- }
3269
- }, ae = ({
3270
- children: e,
3271
- className: t,
3272
- span: r,
3273
- ...a
3274
- }) => {
3275
- const { columnGap: n, rowGap: o } = yt(Zt), s = {
3276
- paddingLeft: n * _e + "rem",
3277
- paddingTop: o * _e + "rem"
3278
- }, i = Nn({
3279
- className: t,
3280
- span: r
3281
- });
3282
- return /* @__PURE__ */ c("div", { className: i, style: s, ...a, children: e });
3283
- };
3284
- /*!
3285
- @versini/ui-system v1.4.4
3498
+ @versini/ui-textinput v1.1.6
3286
3499
  © 2024 gizmette.com
3287
3500
  */
3288
3501
  try {
3289
- window.__VERSINI_UI_SYSTEM__ || (window.__VERSINI_UI_SYSTEM__ = {
3290
- version: "1.4.4",
3291
- buildTime: "08/25/2024 02:12 PM EDT",
3502
+ window.__VERSINI_UI_TEXTINPUT__ || (window.__VERSINI_UI_TEXTINPUT__ = {
3503
+ version: "1.1.6",
3504
+ buildTime: "09/28/2024 06:57 PM EDT",
3292
3505
  homepage: "https://github.com/aversini/ui-components",
3293
3506
  license: "MIT"
3294
3507
  });
3295
3508
  } catch {
3296
3509
  }
3297
- const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "Log in", Pn = "Sign in with a Passkey", Lo = "Log out", Dn = "Password", $n = "Powered by OpenAI", Mo = "Send", Uo = "Profile", Ho = "Statistics", Ko = "Chat history", Bo = "About", Wo = "Type your question here", Go = "Clear chat", Vo = "Cancel chat", Yo = "N/A", Jo = {
3510
+ const Kn = "ASK! ME! ANYTHING!", sr = "Sassy Saint", Hn = "gizmette.com", Wn = "Log in", Bn = "Sign in with a Passkey", Yo = "Log out", Gn = "Password", Vn = "Powered by OpenAI", Fo = "Send", zo = "Profile", jo = "Statistics", qo = "Chat history", Xo = "About", Qo = "Type your question here", Zo = "Clear chat", es = "Cancel chat", ts = "N/A", rs = {
3511
+ TAGS: {
3512
+ TITLE: "Pre-filled tags",
3513
+ DESCRIPTION: "Tags are pre-filled buttons available on the main screen, to help you quickly start requests."
3514
+ },
3298
3515
  PREFERENCES: {
3299
3516
  TITLE: "User settings",
3300
3517
  NAME: "Name",
@@ -3328,62 +3545,111 @@ const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "
3328
3545
  ENGINE: "OpenAI model",
3329
3546
  PLUGIN: "Plugin"
3330
3547
  }
3331
- }, Ln = ({
3548
+ };
3549
+ /*!
3550
+ @versini/ui-footer v1.0.8
3551
+ © 2024 gizmette.com
3552
+ */
3553
+ try {
3554
+ window.__VERSINI_UI_FOOTER__ || (window.__VERSINI_UI_FOOTER__ = {
3555
+ version: "1.0.8",
3556
+ buildTime: "09/27/2024 11:55 AM EDT",
3557
+ homepage: "https://github.com/aversini/ui-components",
3558
+ license: "MIT"
3559
+ });
3560
+ } catch {
3561
+ }
3562
+ const Jn = "av-footer", Yn = (e) => {
3563
+ let t = "";
3564
+ if (typeof e == "number" || typeof e == "string")
3565
+ t = "m-" + e;
3566
+ else {
3567
+ const r = [];
3568
+ (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
3569
+ }
3570
+ return t;
3571
+ }, Fn = ({
3572
+ className: e,
3573
+ mode: t = "system",
3574
+ row1: r,
3575
+ row2: a,
3576
+ noMargins: n = !1,
3577
+ spacing: o,
3578
+ raw: s = !1
3579
+ }) => {
3580
+ const i = y(Jn, e, Yn(o), {
3581
+ "text-copy-dark": !s && t === "dark",
3582
+ "text-copy-lighter": !s && t === "light",
3583
+ "text-copy-dark dark:text-copy-lighter": !s && t === "system",
3584
+ "text-copy-lighter dark:text-copy-dark": !s && t === "alt-system",
3585
+ "mb-[100px]": !n && !s,
3586
+ "mt-0 flex w-full flex-col p-2 text-center text-xs sm:mt-3 md:mx-auto md:max-w-4xl": !s
3587
+ });
3588
+ return /* @__PURE__ */ v("footer", { className: i, children: [
3589
+ r && /* @__PURE__ */ c("div", { children: r }),
3590
+ a && /* @__PURE__ */ c("div", { children: a })
3591
+ ] });
3592
+ }, zn = ({
3332
3593
  serverStats: e
3333
3594
  }) => /* @__PURE__ */ c(
3334
- Za,
3595
+ Fn,
3335
3596
  {
3336
3597
  mode: "light",
3337
- row1: /* @__PURE__ */ I("div", { children: [
3338
- er,
3598
+ row1: /* @__PURE__ */ v("div", { children: [
3599
+ sr,
3339
3600
  " v",
3340
- "4.3.6",
3601
+ "4.5.2",
3341
3602
  " - ",
3342
- $n,
3343
- Qe && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
3603
+ Vn,
3604
+ tt && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
3344
3605
  ] }),
3345
- row2: /* @__PURE__ */ I("div", { children: [
3606
+ row2: /* @__PURE__ */ v("div", { children: [
3346
3607
  "© ",
3347
3608
  (/* @__PURE__ */ new Date()).getFullYear(),
3348
3609
  " ",
3349
- Cn
3610
+ Hn
3350
3611
  ] })
3351
3612
  }
3352
- ), Mn = wt(() => import("./LazyHeader.Bu6NhpqV.js")), Un = () => {
3353
- const { isAuthenticated: e } = qe();
3354
- return /* @__PURE__ */ I(le, { children: [
3355
- e && /* @__PURE__ */ c(Tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Mn, {}) }),
3356
- /* @__PURE__ */ I("div", { className: "flex items-center justify-center", children: [
3357
- /* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(vn, {}) }),
3358
- /* @__PURE__ */ I("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
3359
- /* @__PURE__ */ c("h1", { children: er }),
3360
- /* @__PURE__ */ c("h2", { children: xn })
3613
+ ), jn = _t(
3614
+ () => import(
3615
+ /* webpackChunkName: "LazyHeader" */
3616
+ "./LazyHeader.rYQgZPSI.js"
3617
+ )
3618
+ ), qn = () => {
3619
+ const { isAuthenticated: e } = et();
3620
+ return /* @__PURE__ */ v(ye, { children: [
3621
+ e && /* @__PURE__ */ c(Rt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(jn, {}) }),
3622
+ /* @__PURE__ */ v("div", { className: "flex items-center justify-center", children: [
3623
+ /* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(ln, {}) }),
3624
+ /* @__PURE__ */ v("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
3625
+ /* @__PURE__ */ c("h1", { children: sr }),
3626
+ /* @__PURE__ */ c("h2", { children: Kn })
3361
3627
  ] })
3362
3628
  ] })
3363
3629
  ] });
3364
- }, Hn = () => {
3365
- const { login: e, logoutReason: t, loginWithPasskey: r } = qe(), [a, n] = J(""), [o, s] = J(""), [i, u] = J(!0), [h, p] = J({
3630
+ }, Xn = () => {
3631
+ const { login: e, logoutReason: t, loginWithPasskey: r } = et(), [a, n] = F(""), [o, s] = F(""), [i, u] = F(!0), [h, p] = F({
3366
3632
  username: "",
3367
3633
  password: ""
3368
3634
  }), m = async (l) => {
3369
3635
  l.preventDefault(), await e(h.username, h.password) || (s(""), n("Invalid username or password"));
3370
3636
  };
3371
- return z(() => {
3637
+ return q(() => {
3372
3638
  var l;
3373
3639
  (l = document.getElementById("logo")) == null || l.classList.add("fadeOut"), setTimeout(() => {
3374
3640
  var d;
3375
3641
  (d = document.getElementById("root")) == null || d.classList.replace("app-hidden", "fadeIn");
3376
3642
  }, 500);
3377
- }), z(() => {
3643
+ }), q(() => {
3378
3644
  t && s(t);
3379
- }, [t]), /* @__PURE__ */ I(le, { children: [
3380
- /* @__PURE__ */ I(en, { children: [
3381
- /* @__PURE__ */ c("div", { className: Ua(), children: /* @__PURE__ */ c(Un, {}) }),
3382
- /* @__PURE__ */ I("form", { className: "mt-5", onSubmit: m, children: [
3383
- /* @__PURE__ */ c(gt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ c(ae, { span: 6, children: /* @__PURE__ */ I(Xa, { mode: "dark", children: [
3384
- /* @__PURE__ */ c(ae, { span: 12, children: o && /* @__PURE__ */ c("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
3385
- /* @__PURE__ */ c(ae, { span: 12, children: /* @__PURE__ */ c(
3386
- Ze,
3645
+ }, [t]), /* @__PURE__ */ v(ye, { children: [
3646
+ /* @__PURE__ */ v(gn, { children: [
3647
+ /* @__PURE__ */ c("div", { className: Ja(), children: /* @__PURE__ */ c(qn, {}) }),
3648
+ /* @__PURE__ */ v("form", { className: "mt-5", onSubmit: m, children: [
3649
+ /* @__PURE__ */ c(Tt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ c(le, { span: 6, children: /* @__PURE__ */ v(sn, { mode: "dark", children: [
3650
+ /* @__PURE__ */ c(le, { span: 12, children: o && /* @__PURE__ */ c("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
3651
+ /* @__PURE__ */ c(le, { span: 12, children: /* @__PURE__ */ c(
3652
+ nt,
3387
3653
  {
3388
3654
  required: !0,
3389
3655
  autoCapitalize: "off",
@@ -3402,8 +3668,8 @@ const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "
3402
3668
  error: a !== ""
3403
3669
  }
3404
3670
  ) }),
3405
- /* @__PURE__ */ c(ae, { span: 12, children: /* @__PURE__ */ c(
3406
- Xt,
3671
+ /* @__PURE__ */ c(le, { span: 12, children: /* @__PURE__ */ c(
3672
+ or,
3407
3673
  {
3408
3674
  required: !0,
3409
3675
  autoCapitalize: "off",
@@ -3412,8 +3678,8 @@ const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "
3412
3678
  mode: "dark",
3413
3679
  focusMode: "light",
3414
3680
  name: "password",
3415
- label: Dn,
3416
- rightElement: /* @__PURE__ */ c(Fe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ c(kn, {}) : /* @__PURE__ */ c(Sn, {}) }),
3681
+ label: Gn,
3682
+ rightElement: /* @__PURE__ */ c(Xe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ c(mn, {}) : /* @__PURE__ */ c(dn, {}) }),
3417
3683
  onMaskChange: u,
3418
3684
  onChange: (l) => {
3419
3685
  p({
@@ -3425,8 +3691,8 @@ const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "
3425
3691
  helperText: a
3426
3692
  }
3427
3693
  ) }),
3428
- /* @__PURE__ */ c(ae, { span: 12, children: /* @__PURE__ */ c(
3429
- Ft,
3694
+ /* @__PURE__ */ c(le, { span: 12, children: /* @__PURE__ */ c(
3695
+ Zt,
3430
3696
  {
3431
3697
  mode: "light",
3432
3698
  focusMode: "light",
@@ -3434,106 +3700,98 @@ const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "
3434
3700
  noBorder: !0,
3435
3701
  type: "submit",
3436
3702
  className: "mb-4 mt-6",
3437
- children: On
3703
+ children: Wn
3438
3704
  }
3439
3705
  ) })
3440
3706
  ] }) }) }),
3441
3707
  /* @__PURE__ */ c("div", { className: "text-center text-copy-light", children: "or" }),
3442
- /* @__PURE__ */ c(gt, { alignHorizontal: "center", children: /* @__PURE__ */ c(ae, { span: 6, children: /* @__PURE__ */ c(
3443
- Fe,
3708
+ /* @__PURE__ */ c(Tt, { alignHorizontal: "center", children: /* @__PURE__ */ c(le, { span: 6, children: /* @__PURE__ */ c(
3709
+ Xe,
3444
3710
  {
3445
3711
  mode: "dark",
3446
3712
  focusMode: "light",
3447
3713
  fullWidth: !0,
3448
3714
  noBorder: !0,
3449
3715
  className: "mb-4 mt-1",
3450
- labelRight: Pn,
3716
+ labelRight: Bn,
3451
3717
  onClick: r,
3452
- children: /* @__PURE__ */ c(An, { className: "size-7" })
3718
+ children: /* @__PURE__ */ c(un, { className: "size-7" })
3453
3719
  }
3454
3720
  ) }) })
3455
3721
  ] })
3456
3722
  ] }),
3457
- /* @__PURE__ */ c(Ln, {})
3723
+ /* @__PURE__ */ c(zn, {})
3458
3724
  ] });
3459
- }, Kn = new URL(document.location.href).searchParams, Bn = !!Kn.get("debug") || !1, Wn = wt(() => import("./App.BMR9hf5e.js").then((e) => e.App)), Gn = ({ isComponent: e }) => {
3460
- const { isAuthenticated: t } = qe();
3461
- return t ? /* @__PURE__ */ c(Tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Wn, { isComponent: e }) }) : /* @__PURE__ */ c(Hn, {});
3462
- }, Vn = ({
3725
+ }, Qn = new URL(document.location.href).searchParams, Zn = !!Qn.get("debug") || !1, eo = _t(() => import(
3726
+ /* webpackChunkName: "LazyApp" */
3727
+ "./App.Da6BVUYy.js"
3728
+ ).then((e) => e.App)), to = ({ isComponent: e }) => {
3729
+ const { isAuthenticated: t } = et();
3730
+ return t ? /* @__PURE__ */ c(Rt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(eo, { isComponent: e }) }) : /* @__PURE__ */ c(Xn, {});
3731
+ }, ro = ({
3463
3732
  isComponent: e = !1,
3464
- domain: t = Ma
3465
- }) => /* @__PURE__ */ c(le, { children: /* @__PURE__ */ c(ka, { clientId: _a, domain: t, debug: Bn, children: /* @__PURE__ */ c(Gn, { isComponent: e }) }) }), Fo = ({ domain: e }) => /* @__PURE__ */ c(Vn, { isComponent: !0, domain: e });
3733
+ domain: t = Va
3734
+ }) => /* @__PURE__ */ c(ye, { children: /* @__PURE__ */ c(Pa, { clientId: Da, domain: t, debug: Zn, children: /* @__PURE__ */ c(to, { isComponent: e }) }) }), as = ({ domain: e }) => /* @__PURE__ */ c(ro, { isComponent: !0, domain: e });
3466
3735
  export {
3467
- Jt as A,
3468
- Bo as ABOUT_TITLE,
3469
- so as ACTION_MESSAGE,
3470
- co as ACTION_MODEL,
3471
- io as ACTION_RESET,
3472
- lo as ACTION_RESTORE,
3473
- mo as ACTION_SEARCH,
3474
- ho as ACTION_SORT,
3475
- uo as ACTION_STREAMING,
3476
- Ln as AppFooter,
3477
- Vo as CANCEL,
3478
- Jo as CARDS,
3479
- Go as CLEAR,
3480
- ao as ERROR_MESSAGE,
3481
- qt as F,
3482
- Ze as G,
3483
- oo as GPT4_MAX_TOKENS,
3484
- Ko as HISTORY_TITLE,
3485
- go as LOCAL_STORAGE_CHAT_DETAILS,
3486
- po as LOCAL_STORAGE_PREFIX,
3487
- fo as LOCAL_STORAGE_SEARCH,
3488
- yo as LOCAL_STORAGE_SORT,
3489
- Lo as LOG_OUT,
3490
- no as MODEL_GPT4,
3491
- Un as MessagesContainerHeader,
3492
- Ro as N,
3493
- Xa as N$1,
3494
- Yo as NA,
3495
- Fe as O,
3496
- Uo as PROFILE_TITLE,
3497
- Zn as ROLE_ASSISTANT,
3498
- ro as ROLE_HIDDEN,
3499
- to as ROLE_INTERNAL,
3500
- eo as ROLE_SYSTEM,
3501
- Xn as ROLE_USER,
3502
- Ce as S,
3503
- Mo as SEND,
3504
- Ho as STATS,
3505
- bo as STATS_SEPARATOR,
3506
- Fo as SassySaint,
3507
- Wo as TYPE_QUESTION,
3508
- nn as V,
3509
- ne as W,
3510
- Po as a,
3511
- gt as b,
3512
- en as c,
3513
- xo as c$1,
3514
- Ao as durationFormatter,
3515
- Io as extractAverage,
3516
- Vt as f,
3517
- tn as f$1,
3518
- Oe as g,
3519
- wo as getCurrentGeoLocation,
3520
- Ua as getMessageContaintWrapperClass,
3521
- Xe as i,
3522
- No as i$1,
3523
- vo as isLastMessageFromRole,
3524
- on as j,
3525
- ae as j$1,
3526
- Do as l,
3527
- Co as n,
3528
- So as numberFormatter,
3529
- un as o,
3530
- $o as p,
3531
- ko as pluralize,
3532
- qe as qr,
3533
- Oo as r,
3534
- To as renderDataAsList,
3535
- _o as s,
3536
- Eo as truncate,
3537
- An as v,
3538
- Ft as x
3736
+ Xo as ABOUT_TITLE,
3737
+ wo as ACTION_MESSAGE,
3738
+ vo as ACTION_MODEL,
3739
+ To as ACTION_RESET,
3740
+ Ro as ACTION_RESET_TAGS,
3741
+ Io as ACTION_RESTORE,
3742
+ Ao as ACTION_SEARCH,
3743
+ So as ACTION_SORT,
3744
+ ko as ACTION_STREAMING,
3745
+ _o as ACTION_TOGGLE_TAG,
3746
+ zn as AppFooter,
3747
+ es as CANCEL,
3748
+ rs as CARDS,
3749
+ Zo as CLEAR,
3750
+ sn as D,
3751
+ yo as ERROR_MESSAGE,
3752
+ ue as G,
3753
+ Eo as GPT4_MAX_TOKENS,
3754
+ qo as HISTORY_TITLE,
3755
+ Co as LOCAL_STORAGE_CHAT_DETAILS,
3756
+ xo as LOCAL_STORAGE_PREFIX,
3757
+ Oo as LOCAL_STORAGE_SEARCH,
3758
+ Po as LOCAL_STORAGE_SORT,
3759
+ $o as LOCAL_STORAGE_TAG_PROOFREAD,
3760
+ Lo as LOCAL_STORAGE_TAG_REPHRASE,
3761
+ Do as LOCAL_STORAGE_TAG_SUMMARIZE,
3762
+ Yo as LOG_OUT,
3763
+ bo as MODEL_GPT4,
3764
+ qn as MessagesContainerHeader,
3765
+ ts as NA,
3766
+ Xe as O,
3767
+ zo as PROFILE_TITLE,
3768
+ Zt as R,
3769
+ ho as ROLE_ASSISTANT,
3770
+ fo as ROLE_HIDDEN,
3771
+ go as ROLE_INTERNAL,
3772
+ po as ROLE_SYSTEM,
3773
+ mo as ROLE_USER,
3774
+ Fo as SEND,
3775
+ jo as STATS,
3776
+ Mo as STATS_SEPARATOR,
3777
+ as as SassySaint,
3778
+ Fe as TAGS,
3779
+ No as TAG_CONTENT,
3780
+ Qo as TYPE_QUESTION,
3781
+ Tt as b,
3782
+ gn as d,
3783
+ Vo as durationFormatter,
3784
+ Wo as extractAverage,
3785
+ Ke as g,
3786
+ Ko as getCurrentGeoLocation,
3787
+ Ja as getMessageContaintWrapperClass,
3788
+ Bo as isLastMessageFromRole,
3789
+ le as j,
3790
+ Go as numberFormatter,
3791
+ Jo as pluralize,
3792
+ Ho as renderDataAsList,
3793
+ et as rn,
3794
+ Uo as truncate,
3795
+ un as v,
3796
+ nt as ye
3539
3797
  };