@versini/sassysaint 5.3.16 → 5.4.0
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.
- package/dist/chunks/{LazyApp.By3JU--q.js → LazyApp.T9mKlSIX.js} +21 -21
- package/dist/chunks/{LazyHeader.CtbnJfCu.js → LazyHeader.CaiWcJOn.js} +726 -708
- package/dist/chunks/{LazyMarkdownWithExtra.5DIzO8pJ.js → LazyMarkdownWithExtra.BdJ0w8to.js} +4488 -4479
- package/dist/chunks/{LazyMessageAssistant.DxbwaE9c.js → LazyMessageAssistant.D_c4nLO4.js} +2349 -2330
- package/dist/chunks/{index.BnAnY2Vs.js → index.CnjK4JPd.js} +19 -19
- package/dist/chunks/{index.C_44Odxq.js → index.DNlKJfQz.js} +799 -769
- package/dist/chunks/{index.DfFZfYdy.DM48ssjd.js → index.MEUopFRx.6qFMhBMt.js} +11 -11
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +6 -6
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { jsx as l, jsxs as I, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import P, { createContext as cr, useReducer as It, useRef as H, useCallback as X, useEffect as Z, useContext as Xe, useSyncExternalStore as lr, useId as _t, useState as q, useLayoutEffect as st, useMemo as St, lazy as vt, Suspense as kt } from "react";
|
|
3
3
|
import f 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,
|
|
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, Ke = (e, t, r) => ur(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
|
-
@versini/auth-provider v7.
|
|
6
|
+
@versini/auth-provider v7.4.0
|
|
7
7
|
© 2024 gizmette.com
|
|
8
8
|
*/
|
|
9
9
|
try {
|
|
10
10
|
window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
|
|
11
|
-
version: "7.
|
|
12
|
-
buildTime: "
|
|
11
|
+
version: "7.4.0",
|
|
12
|
+
buildTime: "12/18/2024 02:36 PM EST",
|
|
13
13
|
homepage: "https://github.com/aversini/auth-client",
|
|
14
14
|
license: "MIT"
|
|
15
15
|
});
|
|
16
16
|
} catch {
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function G(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
|
|
25
|
+
function Ne(e) {
|
|
26
26
|
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, a = t.padEnd(t.length + r, "="), n = atob(a), o = new ArrayBuffer(n.length), s = new Uint8Array(o);
|
|
27
27
|
for (let i = 0; i < n.length; i++)
|
|
28
28
|
s[i] = n.charCodeAt(i);
|
|
29
29
|
return o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Qe() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function At(e) {
|
|
35
35
|
const { id: t } = e;
|
|
36
36
|
return {
|
|
37
37
|
...e,
|
|
38
|
-
id:
|
|
38
|
+
id: Ne(t),
|
|
39
39
|
transports: e.transports
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Nt(e) {
|
|
43
43
|
return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
|
|
44
44
|
}
|
|
45
45
|
let x = class extends Error {
|
|
@@ -97,7 +97,7 @@ function mr({ error: e, options: t }) {
|
|
|
97
97
|
});
|
|
98
98
|
if (e.name === "SecurityError") {
|
|
99
99
|
const o = window.location.hostname;
|
|
100
|
-
if (
|
|
100
|
+
if (Nt(o)) {
|
|
101
101
|
if (r.rp.id !== o)
|
|
102
102
|
return new x({
|
|
103
103
|
message: `The RP ID "${r.rp.id}" is invalid for this domain`,
|
|
@@ -141,25 +141,25 @@ class hr {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
function
|
|
144
|
+
const Rt = new hr(), pr = ["cross-platform", "platform"];
|
|
145
|
+
function xt(e) {
|
|
146
146
|
if (e && !(pr.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
149
|
async function gr(e) {
|
|
150
150
|
var m;
|
|
151
|
-
if (!
|
|
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:
|
|
155
|
+
challenge: Ne(e.challenge),
|
|
156
156
|
user: {
|
|
157
157
|
...e.user,
|
|
158
|
-
id:
|
|
158
|
+
id: Ne(e.user.id)
|
|
159
159
|
},
|
|
160
|
-
excludeCredentials: (m = e.excludeCredentials) == null ? void 0 : m.map(
|
|
160
|
+
excludeCredentials: (m = e.excludeCredentials) == null ? void 0 : m.map(At)
|
|
161
161
|
} };
|
|
162
|
-
t.signal =
|
|
162
|
+
t.signal = Rt.createNewAbortSignal();
|
|
163
163
|
let r;
|
|
164
164
|
try {
|
|
165
165
|
r = await navigator.credentials.create(t);
|
|
@@ -176,29 +176,29 @@ async function gr(e) {
|
|
|
176
176
|
try {
|
|
177
177
|
u = o.getPublicKeyAlgorithm();
|
|
178
178
|
} catch (c) {
|
|
179
|
-
|
|
179
|
+
He("getPublicKeyAlgorithm()", c);
|
|
180
180
|
}
|
|
181
181
|
let h;
|
|
182
182
|
if (typeof o.getPublicKey == "function")
|
|
183
183
|
try {
|
|
184
184
|
const c = o.getPublicKey();
|
|
185
|
-
c !== null && (h =
|
|
185
|
+
c !== null && (h = G(c));
|
|
186
186
|
} catch (c) {
|
|
187
|
-
|
|
187
|
+
He("getPublicKey()", c);
|
|
188
188
|
}
|
|
189
189
|
let p;
|
|
190
190
|
if (typeof o.getAuthenticatorData == "function")
|
|
191
191
|
try {
|
|
192
|
-
p =
|
|
192
|
+
p = G(o.getAuthenticatorData());
|
|
193
193
|
} catch (c) {
|
|
194
|
-
|
|
194
|
+
He("getAuthenticatorData()", c);
|
|
195
195
|
}
|
|
196
196
|
return {
|
|
197
197
|
id: a,
|
|
198
|
-
rawId:
|
|
198
|
+
rawId: G(n),
|
|
199
199
|
response: {
|
|
200
|
-
attestationObject:
|
|
201
|
-
clientDataJSON:
|
|
200
|
+
attestationObject: G(o.attestationObject),
|
|
201
|
+
clientDataJSON: G(o.clientDataJSON),
|
|
202
202
|
transports: i,
|
|
203
203
|
publicKeyAlgorithm: u,
|
|
204
204
|
publicKey: h,
|
|
@@ -206,15 +206,15 @@ async function gr(e) {
|
|
|
206
206
|
},
|
|
207
207
|
type: s,
|
|
208
208
|
clientExtensionResults: r.getClientExtensionResults(),
|
|
209
|
-
authenticatorAttachment:
|
|
209
|
+
authenticatorAttachment: xt(r.authenticatorAttachment)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function He(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
216
|
function fr() {
|
|
217
|
-
if (!
|
|
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();
|
|
@@ -239,7 +239,7 @@ function yr({ error: e, options: t }) {
|
|
|
239
239
|
});
|
|
240
240
|
if (e.name === "SecurityError") {
|
|
241
241
|
const a = window.location.hostname;
|
|
242
|
-
if (
|
|
242
|
+
if (Nt(a)) {
|
|
243
243
|
if (r.rpId !== a)
|
|
244
244
|
return new x({
|
|
245
245
|
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
@@ -262,13 +262,13 @@ function yr({ error: e, options: t }) {
|
|
|
262
262
|
}
|
|
263
263
|
async function br(e, t = !1) {
|
|
264
264
|
var m, c;
|
|
265
|
-
if (!
|
|
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 = (c = e.allowCredentials) == null ? void 0 : c.map(
|
|
268
|
+
((m = e.allowCredentials) == null ? void 0 : m.length) !== 0 && (r = (c = e.allowCredentials) == null ? void 0 : c.map(At));
|
|
269
269
|
const a = {
|
|
270
270
|
...e,
|
|
271
|
-
challenge:
|
|
271
|
+
challenge: Ne(e.challenge),
|
|
272
272
|
allowCredentials: r
|
|
273
273
|
}, n = {};
|
|
274
274
|
if (t) {
|
|
@@ -278,7 +278,7 @@ async function br(e, t = !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 =
|
|
281
|
+
n.publicKey = a, n.signal = Rt.createNewAbortSignal();
|
|
282
282
|
let o;
|
|
283
283
|
try {
|
|
284
284
|
o = await navigator.credentials.get(n);
|
|
@@ -289,28 +289,28 @@ async function br(e, t = !1) {
|
|
|
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 =
|
|
292
|
+
return u.userHandle && (p = G(u.userHandle)), {
|
|
293
293
|
id: s,
|
|
294
|
-
rawId:
|
|
294
|
+
rawId: G(i),
|
|
295
295
|
response: {
|
|
296
|
-
authenticatorData:
|
|
297
|
-
clientDataJSON:
|
|
298
|
-
signature:
|
|
296
|
+
authenticatorData: G(u.authenticatorData),
|
|
297
|
+
clientDataJSON: G(u.clientDataJSON),
|
|
298
|
+
signature: G(u.signature),
|
|
299
299
|
userHandle: p
|
|
300
300
|
},
|
|
301
301
|
type: h,
|
|
302
302
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
303
|
-
authenticatorAttachment:
|
|
303
|
+
authenticatorAttachment: xt(o.authenticatorAttachment)
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
/*!
|
|
307
|
-
@versini/auth-common v4.
|
|
307
|
+
@versini/auth-common v4.2.0
|
|
308
308
|
© 2024 gizmette.com
|
|
309
309
|
*/
|
|
310
310
|
try {
|
|
311
311
|
window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
|
|
312
|
-
version: "4.
|
|
313
|
-
buildTime: "
|
|
312
|
+
version: "4.2.0",
|
|
313
|
+
buildTime: "12/18/2024 02:36 PM EST",
|
|
314
314
|
homepage: "https://github.com/aversini/auth-client",
|
|
315
315
|
license: "MIT"
|
|
316
316
|
});
|
|
@@ -323,7 +323,7 @@ const ue = {
|
|
|
323
323
|
CODE: "code",
|
|
324
324
|
REFRESH_TOKEN: "refresh_token",
|
|
325
325
|
PASSKEY: "passkey"
|
|
326
|
-
},
|
|
326
|
+
}, Ct = {
|
|
327
327
|
CLIENT_ID: "X-Auth-ClientId"
|
|
328
328
|
}, A = {
|
|
329
329
|
ALG: "RS256",
|
|
@@ -346,12 +346,12 @@ aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
|
|
|
346
346
|
l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
|
|
347
347
|
sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
|
|
348
348
|
awIDAQAB
|
|
349
|
-
-----END PUBLIC KEY-----`,
|
|
349
|
+
-----END PUBLIC KEY-----`, Pe = {
|
|
350
350
|
CODE: "code",
|
|
351
351
|
LOGOUT: "logout",
|
|
352
352
|
LOGIN: "login",
|
|
353
353
|
REFRESH: "refresh"
|
|
354
|
-
},
|
|
354
|
+
}, De = crypto, Ot = (e) => e instanceof CryptoKey, we = new TextEncoder(), be = new TextDecoder();
|
|
355
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;
|
|
@@ -364,7 +364,7 @@ const Tr = (e) => {
|
|
|
364
364
|
for (let a = 0; a < t.length; a++)
|
|
365
365
|
r[a] = t.charCodeAt(a);
|
|
366
366
|
return r;
|
|
367
|
-
},
|
|
367
|
+
}, Q = (e) => {
|
|
368
368
|
let t = e;
|
|
369
369
|
t instanceof Uint8Array && (t = be.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
370
370
|
try {
|
|
@@ -373,78 +373,107 @@ const Tr = (e) => {
|
|
|
373
373
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
|
-
let
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
constructor(t) {
|
|
381
|
-
var r;
|
|
382
|
-
super(t), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (r = Error.captureStackTrace) == null || r.call(Error, this, this.constructor);
|
|
383
|
-
}
|
|
384
|
-
}, H = class extends te {
|
|
385
|
-
static get code() {
|
|
386
|
-
return "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
376
|
+
let O = class extends Error {
|
|
377
|
+
constructor(t, r) {
|
|
378
|
+
var a;
|
|
379
|
+
super(t, r), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (a = Error.captureStackTrace) == null || a.call(Error, this, this.constructor);
|
|
387
380
|
}
|
|
381
|
+
};
|
|
382
|
+
O.code = "ERR_JOSE_GENERIC";
|
|
383
|
+
let U = class extends O {
|
|
388
384
|
constructor(t, r, a = "unspecified", n = "unspecified") {
|
|
389
|
-
super(t), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
|
|
385
|
+
super(t, { cause: { claim: a, reason: n, payload: r } }), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
|
|
390
386
|
}
|
|
391
387
|
};
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
return "ERR_JWT_EXPIRED";
|
|
395
|
-
}
|
|
388
|
+
U.code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
389
|
+
class ze extends O {
|
|
396
390
|
constructor(t, r, a = "unspecified", n = "unspecified") {
|
|
397
|
-
super(t), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
|
|
391
|
+
super(t, { cause: { claim: a, reason: n, payload: r } }), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
|
|
398
392
|
}
|
|
399
393
|
}
|
|
400
|
-
|
|
394
|
+
ze.code = "ERR_JWT_EXPIRED";
|
|
395
|
+
class Pt extends O {
|
|
401
396
|
constructor() {
|
|
402
397
|
super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
403
398
|
}
|
|
404
|
-
static get code() {
|
|
405
|
-
return "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
406
|
-
}
|
|
407
399
|
}
|
|
408
|
-
|
|
400
|
+
Pt.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
401
|
+
let K = class extends O {
|
|
409
402
|
constructor() {
|
|
410
403
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
411
404
|
}
|
|
412
|
-
|
|
413
|
-
|
|
405
|
+
};
|
|
406
|
+
K.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
407
|
+
class Ir extends O {
|
|
408
|
+
constructor(t = "decryption operation failed", r) {
|
|
409
|
+
super(t, r), this.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
Ir.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
413
|
+
class _r extends O {
|
|
414
|
+
constructor() {
|
|
415
|
+
super(...arguments), this.code = "ERR_JWE_INVALID";
|
|
414
416
|
}
|
|
415
|
-
}
|
|
417
|
+
}
|
|
418
|
+
_r.code = "ERR_JWE_INVALID";
|
|
419
|
+
let S = class extends O {
|
|
416
420
|
constructor() {
|
|
417
421
|
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
418
422
|
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
}, Y = class extends te {
|
|
423
|
+
};
|
|
424
|
+
S.code = "ERR_JWS_INVALID";
|
|
425
|
+
let B = class extends O {
|
|
423
426
|
constructor() {
|
|
424
427
|
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
425
428
|
}
|
|
426
|
-
static get code() {
|
|
427
|
-
return "ERR_JWT_INVALID";
|
|
428
|
-
}
|
|
429
429
|
};
|
|
430
|
-
|
|
430
|
+
B.code = "ERR_JWT_INVALID";
|
|
431
|
+
class Sr extends O {
|
|
432
|
+
constructor() {
|
|
433
|
+
super(...arguments), this.code = "ERR_JWK_INVALID";
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
Sr.code = "ERR_JWK_INVALID";
|
|
437
|
+
class vr extends O {
|
|
431
438
|
constructor() {
|
|
432
|
-
super(...arguments), this.code = "
|
|
439
|
+
super(...arguments), this.code = "ERR_JWKS_INVALID";
|
|
433
440
|
}
|
|
434
|
-
|
|
435
|
-
|
|
441
|
+
}
|
|
442
|
+
vr.code = "ERR_JWKS_INVALID";
|
|
443
|
+
class kr extends O {
|
|
444
|
+
constructor(t = "no applicable key found in the JSON Web Key Set", r) {
|
|
445
|
+
super(t, r), this.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
436
446
|
}
|
|
437
447
|
}
|
|
438
|
-
|
|
448
|
+
kr.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
449
|
+
class Ar extends O {
|
|
450
|
+
constructor(t = "multiple matching keys found in the JSON Web Key Set", r) {
|
|
451
|
+
super(t, r), this.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
Ar.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
455
|
+
class Nr extends O {
|
|
456
|
+
constructor(t = "request timed out", r) {
|
|
457
|
+
super(t, r), this.code = "ERR_JWKS_TIMEOUT";
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
Nr.code = "ERR_JWKS_TIMEOUT";
|
|
461
|
+
class Dt extends O {
|
|
462
|
+
constructor(t = "signature verification failed", r) {
|
|
463
|
+
super(t, r), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
Dt.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
467
|
+
function F(e, t = "algorithm.name") {
|
|
439
468
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
440
469
|
}
|
|
441
470
|
function Te(e, t) {
|
|
442
471
|
return e.name === t;
|
|
443
472
|
}
|
|
444
|
-
function
|
|
473
|
+
function $e(e) {
|
|
445
474
|
return parseInt(e.name.slice(4), 10);
|
|
446
475
|
}
|
|
447
|
-
function
|
|
476
|
+
function Rr(e) {
|
|
448
477
|
switch (e) {
|
|
449
478
|
case "ES256":
|
|
450
479
|
return "P-256";
|
|
@@ -456,7 +485,7 @@ function Sr(e) {
|
|
|
456
485
|
throw new Error("unreachable");
|
|
457
486
|
}
|
|
458
487
|
}
|
|
459
|
-
function
|
|
488
|
+
function xr(e, t) {
|
|
460
489
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
461
490
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
462
491
|
if (t.length > 2) {
|
|
@@ -466,57 +495,57 @@ function kr(e, t) {
|
|
|
466
495
|
throw new TypeError(r);
|
|
467
496
|
}
|
|
468
497
|
}
|
|
469
|
-
function
|
|
498
|
+
function Cr(e, t, ...r) {
|
|
470
499
|
switch (t) {
|
|
471
500
|
case "HS256":
|
|
472
501
|
case "HS384":
|
|
473
502
|
case "HS512": {
|
|
474
503
|
if (!Te(e.algorithm, "HMAC"))
|
|
475
|
-
throw
|
|
504
|
+
throw F("HMAC");
|
|
476
505
|
const a = parseInt(t.slice(2), 10);
|
|
477
|
-
if (
|
|
478
|
-
throw
|
|
506
|
+
if ($e(e.algorithm.hash) !== a)
|
|
507
|
+
throw F(`SHA-${a}`, "algorithm.hash");
|
|
479
508
|
break;
|
|
480
509
|
}
|
|
481
510
|
case "RS256":
|
|
482
511
|
case "RS384":
|
|
483
512
|
case "RS512": {
|
|
484
513
|
if (!Te(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
485
|
-
throw
|
|
514
|
+
throw F("RSASSA-PKCS1-v1_5");
|
|
486
515
|
const a = parseInt(t.slice(2), 10);
|
|
487
|
-
if (
|
|
488
|
-
throw
|
|
516
|
+
if ($e(e.algorithm.hash) !== a)
|
|
517
|
+
throw F(`SHA-${a}`, "algorithm.hash");
|
|
489
518
|
break;
|
|
490
519
|
}
|
|
491
520
|
case "PS256":
|
|
492
521
|
case "PS384":
|
|
493
522
|
case "PS512": {
|
|
494
523
|
if (!Te(e.algorithm, "RSA-PSS"))
|
|
495
|
-
throw
|
|
524
|
+
throw F("RSA-PSS");
|
|
496
525
|
const a = parseInt(t.slice(2), 10);
|
|
497
|
-
if (
|
|
498
|
-
throw
|
|
526
|
+
if ($e(e.algorithm.hash) !== a)
|
|
527
|
+
throw F(`SHA-${a}`, "algorithm.hash");
|
|
499
528
|
break;
|
|
500
529
|
}
|
|
501
530
|
case "EdDSA": {
|
|
502
531
|
if (e.algorithm.name !== "Ed25519" && e.algorithm.name !== "Ed448")
|
|
503
|
-
throw
|
|
532
|
+
throw F("Ed25519 or Ed448");
|
|
504
533
|
break;
|
|
505
534
|
}
|
|
506
535
|
case "ES256":
|
|
507
536
|
case "ES384":
|
|
508
537
|
case "ES512": {
|
|
509
538
|
if (!Te(e.algorithm, "ECDSA"))
|
|
510
|
-
throw
|
|
511
|
-
const a =
|
|
539
|
+
throw F("ECDSA");
|
|
540
|
+
const a = Rr(t);
|
|
512
541
|
if (e.algorithm.namedCurve !== a)
|
|
513
|
-
throw
|
|
542
|
+
throw F(a, "algorithm.namedCurve");
|
|
514
543
|
break;
|
|
515
544
|
}
|
|
516
545
|
default:
|
|
517
546
|
throw new TypeError("CryptoKey does not support this operation");
|
|
518
547
|
}
|
|
519
|
-
|
|
548
|
+
xr(e, r);
|
|
520
549
|
}
|
|
521
550
|
function Lt(e, t, ...r) {
|
|
522
551
|
var a;
|
|
@@ -526,11 +555,11 @@ function Lt(e, t, ...r) {
|
|
|
526
555
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
527
556
|
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (a = t.constructor) != null && a.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
528
557
|
}
|
|
529
|
-
const
|
|
558
|
+
const it = (e, ...t) => Lt("Key must be ", e, ...t);
|
|
530
559
|
function Mt(e, t, ...r) {
|
|
531
560
|
return Lt(`Key for the ${e} algorithm must be `, t, ...r);
|
|
532
561
|
}
|
|
533
|
-
const Ut = (e) =>
|
|
562
|
+
const Ut = (e) => Ot(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Re = ["CryptoKey"], Or = (...e) => {
|
|
534
563
|
const t = e.filter(Boolean);
|
|
535
564
|
if (t.length === 0 || t.length === 1)
|
|
536
565
|
return !0;
|
|
@@ -549,11 +578,11 @@ const Ut = (e) => Dt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
549
578
|
}
|
|
550
579
|
return !0;
|
|
551
580
|
};
|
|
552
|
-
function
|
|
581
|
+
function Pr(e) {
|
|
553
582
|
return typeof e == "object" && e !== null;
|
|
554
583
|
}
|
|
555
584
|
function me(e) {
|
|
556
|
-
if (!
|
|
585
|
+
if (!Pr(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
557
586
|
return !1;
|
|
558
587
|
if (Object.getPrototypeOf(e) === null)
|
|
559
588
|
return !0;
|
|
@@ -562,7 +591,7 @@ function me(e) {
|
|
|
562
591
|
t = Object.getPrototypeOf(t);
|
|
563
592
|
return Object.getPrototypeOf(e) === t;
|
|
564
593
|
}
|
|
565
|
-
const
|
|
594
|
+
const Dr = (e, t) => {
|
|
566
595
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
567
596
|
const { modulusLength: r } = t.algorithm;
|
|
568
597
|
if (typeof r != "number" || r < 2048)
|
|
@@ -572,16 +601,16 @@ const Rr = (e, t) => {
|
|
|
572
601
|
function he(e) {
|
|
573
602
|
return me(e) && typeof e.kty == "string";
|
|
574
603
|
}
|
|
575
|
-
function
|
|
604
|
+
function Lr(e) {
|
|
576
605
|
return e.kty !== "oct" && typeof e.d == "string";
|
|
577
606
|
}
|
|
578
|
-
function
|
|
607
|
+
function Mr(e) {
|
|
579
608
|
return e.kty !== "oct" && typeof e.d > "u";
|
|
580
609
|
}
|
|
581
|
-
function
|
|
610
|
+
function Ur(e) {
|
|
582
611
|
return he(e) && e.kty === "oct" && typeof e.k == "string";
|
|
583
612
|
}
|
|
584
|
-
function
|
|
613
|
+
function Kr(e) {
|
|
585
614
|
let t, r;
|
|
586
615
|
switch (e.kty) {
|
|
587
616
|
case "RSA": {
|
|
@@ -606,7 +635,7 @@ function Pr(e) {
|
|
|
606
635
|
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
607
636
|
break;
|
|
608
637
|
default:
|
|
609
|
-
throw new
|
|
638
|
+
throw new K('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
610
639
|
}
|
|
611
640
|
break;
|
|
612
641
|
}
|
|
@@ -628,7 +657,7 @@ function Pr(e) {
|
|
|
628
657
|
t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
629
658
|
break;
|
|
630
659
|
default:
|
|
631
|
-
throw new
|
|
660
|
+
throw new K('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
632
661
|
}
|
|
633
662
|
break;
|
|
634
663
|
}
|
|
@@ -644,71 +673,71 @@ function Pr(e) {
|
|
|
644
673
|
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
645
674
|
break;
|
|
646
675
|
default:
|
|
647
|
-
throw new
|
|
676
|
+
throw new K('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
648
677
|
}
|
|
649
678
|
break;
|
|
650
679
|
}
|
|
651
680
|
default:
|
|
652
|
-
throw new
|
|
681
|
+
throw new K('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
653
682
|
}
|
|
654
683
|
return { algorithm: t, keyUsages: r };
|
|
655
684
|
}
|
|
656
685
|
const Kt = async (e) => {
|
|
657
686
|
if (!e.alg)
|
|
658
687
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
659
|
-
const { algorithm: t, keyUsages: r } =
|
|
688
|
+
const { algorithm: t, keyUsages: r } = Kr(e), a = [
|
|
660
689
|
t,
|
|
661
690
|
e.ext ?? !1,
|
|
662
691
|
e.key_ops ?? r
|
|
663
692
|
], n = { ...e };
|
|
664
|
-
return delete n.alg, delete n.use,
|
|
665
|
-
}, Ht = (e) =>
|
|
693
|
+
return delete n.alg, delete n.use, De.subtle.importKey("jwk", n, ...a);
|
|
694
|
+
}, Ht = (e) => Q(e);
|
|
666
695
|
let ae, ne;
|
|
667
|
-
const $t = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
696
|
+
const $t = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", xe = async (e, t, r, a, n = !1) => {
|
|
668
697
|
let o = e.get(t);
|
|
669
698
|
if (o != null && o[a])
|
|
670
699
|
return o[a];
|
|
671
700
|
const s = await Kt({ ...r, alg: a });
|
|
672
701
|
return n && Object.freeze(t), o ? o[a] = s : e.set(t, { [a]: s }), s;
|
|
673
|
-
},
|
|
702
|
+
}, Hr = (e, t) => {
|
|
674
703
|
if ($t(e)) {
|
|
675
704
|
let r = e.export({ format: "jwk" });
|
|
676
|
-
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Ht(r.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()),
|
|
705
|
+
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Ht(r.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), xe(ne, e, r, t));
|
|
677
706
|
}
|
|
678
|
-
return he(e) ? e.k ?
|
|
679
|
-
},
|
|
707
|
+
return he(e) ? e.k ? Q(e.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), xe(ne, e, e, t, !0)) : e;
|
|
708
|
+
}, $r = (e, t) => {
|
|
680
709
|
if ($t(e)) {
|
|
681
710
|
let r = e.export({ format: "jwk" });
|
|
682
|
-
return r.k ? Ht(r.k) : (ae || (ae = /* @__PURE__ */ new WeakMap()),
|
|
711
|
+
return r.k ? Ht(r.k) : (ae || (ae = /* @__PURE__ */ new WeakMap()), xe(ae, e, r, t));
|
|
683
712
|
}
|
|
684
|
-
return he(e) ? e.k ?
|
|
685
|
-
},
|
|
713
|
+
return he(e) ? e.k ? Q(e.k) : (ae || (ae = /* @__PURE__ */ new WeakMap()), xe(ae, e, e, t, !0)) : e;
|
|
714
|
+
}, Wr = { normalizePublicKey: Hr, normalizePrivateKey: $r }, j = (e, t, r = 0) => {
|
|
686
715
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
687
716
|
const a = e.indexOf(t[0], r);
|
|
688
717
|
if (a === -1)
|
|
689
718
|
return !1;
|
|
690
719
|
const n = e.subarray(a, a + t.length);
|
|
691
|
-
return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) ||
|
|
692
|
-
},
|
|
720
|
+
return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || j(e, t, a + 1);
|
|
721
|
+
}, ct = (e) => {
|
|
693
722
|
switch (!0) {
|
|
694
|
-
case
|
|
723
|
+
case j(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
|
695
724
|
return "P-256";
|
|
696
|
-
case
|
|
725
|
+
case j(e, [43, 129, 4, 0, 34]):
|
|
697
726
|
return "P-384";
|
|
698
|
-
case
|
|
727
|
+
case j(e, [43, 129, 4, 0, 35]):
|
|
699
728
|
return "P-521";
|
|
700
|
-
case
|
|
729
|
+
case j(e, [43, 101, 110]):
|
|
701
730
|
return "X25519";
|
|
702
|
-
case
|
|
731
|
+
case j(e, [43, 101, 111]):
|
|
703
732
|
return "X448";
|
|
704
|
-
case
|
|
733
|
+
case j(e, [43, 101, 112]):
|
|
705
734
|
return "Ed25519";
|
|
706
|
-
case
|
|
735
|
+
case j(e, [43, 101, 113]):
|
|
707
736
|
return "Ed448";
|
|
708
737
|
default:
|
|
709
|
-
throw new
|
|
738
|
+
throw new K("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
710
739
|
}
|
|
711
|
-
},
|
|
740
|
+
}, Br = async (e, t, r, a, n) => {
|
|
712
741
|
let o, s;
|
|
713
742
|
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((u) => u.charCodeAt(0)));
|
|
714
743
|
switch (a) {
|
|
@@ -744,42 +773,42 @@ const $t = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
744
773
|
case "ECDH-ES+A128KW":
|
|
745
774
|
case "ECDH-ES+A192KW":
|
|
746
775
|
case "ECDH-ES+A256KW": {
|
|
747
|
-
const u =
|
|
776
|
+
const u = ct(i);
|
|
748
777
|
o = u.startsWith("P-") ? { name: "ECDH", namedCurve: u } : { name: u }, s = [];
|
|
749
778
|
break;
|
|
750
779
|
}
|
|
751
780
|
case "EdDSA":
|
|
752
|
-
o = { name:
|
|
781
|
+
o = { name: ct(i) }, s = ["verify"];
|
|
753
782
|
break;
|
|
754
783
|
default:
|
|
755
|
-
throw new
|
|
784
|
+
throw new K('Invalid or unsupported "alg" (Algorithm) value');
|
|
756
785
|
}
|
|
757
|
-
return
|
|
758
|
-
},
|
|
759
|
-
async function
|
|
786
|
+
return De.subtle.importKey(t, i, o, !1, s);
|
|
787
|
+
}, Gr = (e, t, r) => Br(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
788
|
+
async function Jr(e, t, r) {
|
|
760
789
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
761
790
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
762
|
-
return
|
|
791
|
+
return Gr(e, t);
|
|
763
792
|
}
|
|
764
|
-
async function
|
|
793
|
+
async function Vr(e, t) {
|
|
765
794
|
if (!me(e))
|
|
766
795
|
throw new TypeError("JWK must be an object");
|
|
767
796
|
switch (t || (t = e.alg), e.kty) {
|
|
768
797
|
case "oct":
|
|
769
798
|
if (typeof e.k != "string" || !e.k)
|
|
770
799
|
throw new TypeError('missing "k" (Key Value) Parameter value');
|
|
771
|
-
return
|
|
800
|
+
return Q(e.k);
|
|
772
801
|
case "RSA":
|
|
773
802
|
if (e.oth !== void 0)
|
|
774
|
-
throw new
|
|
803
|
+
throw new K('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
775
804
|
case "EC":
|
|
776
805
|
case "OKP":
|
|
777
806
|
return Kt({ ...e, alg: t });
|
|
778
807
|
default:
|
|
779
|
-
throw new
|
|
808
|
+
throw new K('Unsupported "kty" (Key Type) Parameter value');
|
|
780
809
|
}
|
|
781
810
|
}
|
|
782
|
-
const de = (e) => e == null ? void 0 : e[Symbol.toStringTag],
|
|
811
|
+
const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], je = (e, t, r) => {
|
|
783
812
|
var a, n;
|
|
784
813
|
if (t.use !== void 0 && t.use !== "sig")
|
|
785
814
|
throw new TypeError("Invalid key for this operation, when present its use must be sig");
|
|
@@ -788,32 +817,32 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], qe = (e, t, r) =>
|
|
|
788
817
|
if (t.alg !== void 0 && t.alg !== e)
|
|
789
818
|
throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);
|
|
790
819
|
return !0;
|
|
791
|
-
},
|
|
820
|
+
}, Yr = (e, t, r, a) => {
|
|
792
821
|
if (!(t instanceof Uint8Array)) {
|
|
793
822
|
if (a && he(t)) {
|
|
794
|
-
if (
|
|
823
|
+
if (Ur(t) && je(e, t, r))
|
|
795
824
|
return;
|
|
796
825
|
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
797
826
|
}
|
|
798
827
|
if (!Ut(t))
|
|
799
|
-
throw new TypeError(Mt(e, t, ...
|
|
828
|
+
throw new TypeError(Mt(e, t, ...Re, "Uint8Array", a ? "JSON Web Key" : null));
|
|
800
829
|
if (t.type !== "secret")
|
|
801
830
|
throw new TypeError(`${de(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
802
831
|
}
|
|
803
|
-
},
|
|
832
|
+
}, Fr = (e, t, r, a) => {
|
|
804
833
|
if (a && he(t))
|
|
805
834
|
switch (r) {
|
|
806
835
|
case "sign":
|
|
807
|
-
if (
|
|
836
|
+
if (Lr(t) && je(e, t, r))
|
|
808
837
|
return;
|
|
809
838
|
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
|
810
839
|
case "verify":
|
|
811
|
-
if (
|
|
840
|
+
if (Mr(t) && je(e, t, r))
|
|
812
841
|
return;
|
|
813
842
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
814
843
|
}
|
|
815
844
|
if (!Ut(t))
|
|
816
|
-
throw new TypeError(Mt(e, t, ...
|
|
845
|
+
throw new TypeError(Mt(e, t, ...Re, a ? "JSON Web Key" : null));
|
|
817
846
|
if (t.type === "secret")
|
|
818
847
|
throw new TypeError(`${de(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
819
848
|
if (r === "sign" && t.type === "public")
|
|
@@ -826,11 +855,11 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], qe = (e, t, r) =>
|
|
|
826
855
|
throw new TypeError(`${de(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
827
856
|
};
|
|
828
857
|
function Wt(e, t, r, a) {
|
|
829
|
-
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ?
|
|
858
|
+
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Yr(t, r, a, e) : Fr(t, r, a, e);
|
|
830
859
|
}
|
|
831
860
|
Wt.bind(void 0, !1);
|
|
832
|
-
const
|
|
833
|
-
function
|
|
861
|
+
const lt = Wt.bind(void 0, !0);
|
|
862
|
+
function zr(e, t, r, a, n) {
|
|
834
863
|
if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
|
|
835
864
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
836
865
|
if (!a || a.crit === void 0)
|
|
@@ -841,7 +870,7 @@ function Gr(e, t, r, a, n) {
|
|
|
841
870
|
r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
|
|
842
871
|
for (const s of a.crit) {
|
|
843
872
|
if (!o.has(s))
|
|
844
|
-
throw new
|
|
873
|
+
throw new K(`Extension Header Parameter "${s}" is not recognized`);
|
|
845
874
|
if (n[s] === void 0)
|
|
846
875
|
throw new e(`Extension Header Parameter "${s}" is missing`);
|
|
847
876
|
if (o.get(s) && a[s] === void 0)
|
|
@@ -849,13 +878,13 @@ function Gr(e, t, r, a, n) {
|
|
|
849
878
|
}
|
|
850
879
|
return new Set(a.crit);
|
|
851
880
|
}
|
|
852
|
-
const
|
|
881
|
+
const jr = (e, t) => {
|
|
853
882
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
854
883
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
855
884
|
if (t)
|
|
856
885
|
return new Set(t);
|
|
857
886
|
};
|
|
858
|
-
function
|
|
887
|
+
function qr(e, t) {
|
|
859
888
|
const r = `SHA-${e.slice(-3)}`;
|
|
860
889
|
switch (e) {
|
|
861
890
|
case "HS256":
|
|
@@ -877,103 +906,103 @@ function Jr(e, t) {
|
|
|
877
906
|
case "EdDSA":
|
|
878
907
|
return { name: t.name };
|
|
879
908
|
default:
|
|
880
|
-
throw new
|
|
909
|
+
throw new K(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
881
910
|
}
|
|
882
911
|
}
|
|
883
|
-
async function
|
|
884
|
-
if (t = await
|
|
885
|
-
return
|
|
912
|
+
async function Xr(e, t, r) {
|
|
913
|
+
if (t = await Wr.normalizePublicKey(t, e), Ot(t))
|
|
914
|
+
return Cr(t, e, r), t;
|
|
886
915
|
if (t instanceof Uint8Array) {
|
|
887
916
|
if (!e.startsWith("HS"))
|
|
888
|
-
throw new TypeError(
|
|
889
|
-
return
|
|
917
|
+
throw new TypeError(it(t, ...Re));
|
|
918
|
+
return De.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
890
919
|
}
|
|
891
|
-
throw new TypeError(
|
|
920
|
+
throw new TypeError(it(t, ...Re, "Uint8Array", "JSON Web Key"));
|
|
892
921
|
}
|
|
893
|
-
const
|
|
894
|
-
const n = await
|
|
895
|
-
|
|
896
|
-
const o =
|
|
922
|
+
const Qr = async (e, t, r, a) => {
|
|
923
|
+
const n = await Xr(e, t, "verify");
|
|
924
|
+
Dr(e, n);
|
|
925
|
+
const o = qr(e, n.algorithm);
|
|
897
926
|
try {
|
|
898
|
-
return await
|
|
927
|
+
return await De.subtle.verify(o, n, r, a);
|
|
899
928
|
} catch {
|
|
900
929
|
return !1;
|
|
901
930
|
}
|
|
902
931
|
};
|
|
903
|
-
async function
|
|
932
|
+
async function Zr(e, t, r) {
|
|
904
933
|
if (!me(e))
|
|
905
|
-
throw new
|
|
934
|
+
throw new S("Flattened JWS must be an object");
|
|
906
935
|
if (e.protected === void 0 && e.header === void 0)
|
|
907
|
-
throw new
|
|
936
|
+
throw new S('Flattened JWS must have either of the "protected" or "header" members');
|
|
908
937
|
if (e.protected !== void 0 && typeof e.protected != "string")
|
|
909
|
-
throw new
|
|
938
|
+
throw new S("JWS Protected Header incorrect type");
|
|
910
939
|
if (e.payload === void 0)
|
|
911
|
-
throw new
|
|
940
|
+
throw new S("JWS Payload missing");
|
|
912
941
|
if (typeof e.signature != "string")
|
|
913
|
-
throw new
|
|
942
|
+
throw new S("JWS Signature missing or incorrect type");
|
|
914
943
|
if (e.header !== void 0 && !me(e.header))
|
|
915
|
-
throw new
|
|
944
|
+
throw new S("JWS Unprotected Header incorrect type");
|
|
916
945
|
let a = {};
|
|
917
946
|
if (e.protected)
|
|
918
947
|
try {
|
|
919
|
-
const y =
|
|
948
|
+
const y = Q(e.protected);
|
|
920
949
|
a = JSON.parse(be.decode(y));
|
|
921
950
|
} catch {
|
|
922
|
-
throw new
|
|
951
|
+
throw new S("JWS Protected Header is invalid");
|
|
923
952
|
}
|
|
924
|
-
if (!
|
|
925
|
-
throw new
|
|
953
|
+
if (!Or(a, e.header))
|
|
954
|
+
throw new S("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
926
955
|
const n = {
|
|
927
956
|
...a,
|
|
928
957
|
...e.header
|
|
929
|
-
}, o =
|
|
958
|
+
}, o = zr(S, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
|
|
930
959
|
let s = !0;
|
|
931
960
|
if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
|
|
932
|
-
throw new
|
|
961
|
+
throw new S('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
933
962
|
const { alg: i } = n;
|
|
934
963
|
if (typeof i != "string" || !i)
|
|
935
|
-
throw new
|
|
936
|
-
const u = r &&
|
|
964
|
+
throw new S('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
965
|
+
const u = r && jr("algorithms", r.algorithms);
|
|
937
966
|
if (u && !u.has(i))
|
|
938
|
-
throw new
|
|
967
|
+
throw new Pt('"alg" (Algorithm) Header Parameter value not allowed');
|
|
939
968
|
if (s) {
|
|
940
969
|
if (typeof e.payload != "string")
|
|
941
|
-
throw new
|
|
970
|
+
throw new S("JWS Payload must be a string");
|
|
942
971
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
943
|
-
throw new
|
|
972
|
+
throw new S("JWS Payload must be a string or an Uint8Array instance");
|
|
944
973
|
let h = !1;
|
|
945
|
-
typeof t == "function" ? (t = await t(a, e), h = !0,
|
|
974
|
+
typeof t == "function" ? (t = await t(a, e), h = !0, lt(i, t, "verify"), he(t) && (t = await Vr(t, i))) : lt(i, t, "verify");
|
|
946
975
|
const p = wr(we.encode(e.protected ?? ""), we.encode("."), typeof e.payload == "string" ? we.encode(e.payload) : e.payload);
|
|
947
976
|
let m;
|
|
948
977
|
try {
|
|
949
|
-
m =
|
|
978
|
+
m = Q(e.signature);
|
|
950
979
|
} catch {
|
|
951
|
-
throw new
|
|
980
|
+
throw new S("Failed to base64url decode the signature");
|
|
952
981
|
}
|
|
953
|
-
if (!await
|
|
954
|
-
throw new
|
|
982
|
+
if (!await Qr(i, t, m, p))
|
|
983
|
+
throw new Dt();
|
|
955
984
|
let c;
|
|
956
985
|
if (s)
|
|
957
986
|
try {
|
|
958
|
-
c =
|
|
987
|
+
c = Q(e.payload);
|
|
959
988
|
} catch {
|
|
960
|
-
throw new
|
|
989
|
+
throw new S("Failed to base64url decode the payload");
|
|
961
990
|
}
|
|
962
991
|
else typeof e.payload == "string" ? c = we.encode(e.payload) : c = e.payload;
|
|
963
992
|
const d = { payload: c };
|
|
964
993
|
return e.protected !== void 0 && (d.protectedHeader = a), e.header !== void 0 && (d.unprotectedHeader = e.header), h ? { ...d, key: t } : d;
|
|
965
994
|
}
|
|
966
|
-
async function
|
|
995
|
+
async function ea(e, t, r) {
|
|
967
996
|
if (e instanceof Uint8Array && (e = be.decode(e)), typeof e != "string")
|
|
968
|
-
throw new
|
|
997
|
+
throw new S("Compact JWS must be a string or Uint8Array");
|
|
969
998
|
const { 0: a, 1: n, 2: o, length: s } = e.split(".");
|
|
970
999
|
if (s !== 3)
|
|
971
|
-
throw new
|
|
972
|
-
const i = await
|
|
1000
|
+
throw new S("Invalid Compact JWS");
|
|
1001
|
+
const i = await Zr({ payload: n, protected: a, signature: o }, t, r), u = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
973
1002
|
return typeof t == "function" ? { ...u, key: i.key } : u;
|
|
974
1003
|
}
|
|
975
|
-
const
|
|
976
|
-
const t =
|
|
1004
|
+
const ta = (e) => Math.floor(e.getTime() / 1e3), Bt = 60, Gt = Bt * 60, Ze = Gt * 24, ra = Ze * 7, aa = Ze * 365.25, na = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, dt = (e) => {
|
|
1005
|
+
const t = na.exec(e);
|
|
977
1006
|
if (!t || t[4] && t[1])
|
|
978
1007
|
throw new TypeError("Invalid time period format");
|
|
979
1008
|
const r = parseFloat(t[2]), a = t[3].toLowerCase();
|
|
@@ -1003,44 +1032,44 @@ const qr = (e) => Math.floor(e.getTime() / 1e3), Bt = 60, Gt = Bt * 60, et = Gt
|
|
|
1003
1032
|
case "day":
|
|
1004
1033
|
case "days":
|
|
1005
1034
|
case "d":
|
|
1006
|
-
n = Math.round(r *
|
|
1035
|
+
n = Math.round(r * Ze);
|
|
1007
1036
|
break;
|
|
1008
1037
|
case "week":
|
|
1009
1038
|
case "weeks":
|
|
1010
1039
|
case "w":
|
|
1011
|
-
n = Math.round(r *
|
|
1040
|
+
n = Math.round(r * ra);
|
|
1012
1041
|
break;
|
|
1013
1042
|
default:
|
|
1014
|
-
n = Math.round(r *
|
|
1043
|
+
n = Math.round(r * aa);
|
|
1015
1044
|
break;
|
|
1016
1045
|
}
|
|
1017
1046
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
1018
|
-
},
|
|
1047
|
+
}, ut = (e) => e.toLowerCase().replace(/^application\//, ""), oa = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, sa = (e, t, r = {}) => {
|
|
1019
1048
|
let a;
|
|
1020
1049
|
try {
|
|
1021
1050
|
a = JSON.parse(be.decode(t));
|
|
1022
1051
|
} catch {
|
|
1023
1052
|
}
|
|
1024
1053
|
if (!me(a))
|
|
1025
|
-
throw new
|
|
1054
|
+
throw new B("JWT Claims Set must be a top-level JSON object");
|
|
1026
1055
|
const { typ: n } = r;
|
|
1027
|
-
if (n && (typeof e.typ != "string" ||
|
|
1028
|
-
throw new
|
|
1056
|
+
if (n && (typeof e.typ != "string" || ut(e.typ) !== ut(n)))
|
|
1057
|
+
throw new U('unexpected "typ" JWT header value', a, "typ", "check_failed");
|
|
1029
1058
|
const { requiredClaims: o = [], issuer: s, subject: i, audience: u, maxTokenAge: h } = r, p = [...o];
|
|
1030
1059
|
h !== void 0 && p.push("iat"), u !== void 0 && p.push("aud"), i !== void 0 && p.push("sub"), s !== void 0 && p.push("iss");
|
|
1031
1060
|
for (const y of new Set(p.reverse()))
|
|
1032
1061
|
if (!(y in a))
|
|
1033
|
-
throw new
|
|
1062
|
+
throw new U(`missing required "${y}" claim`, a, y, "missing");
|
|
1034
1063
|
if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
|
|
1035
|
-
throw new
|
|
1064
|
+
throw new U('unexpected "iss" claim value', a, "iss", "check_failed");
|
|
1036
1065
|
if (i && a.sub !== i)
|
|
1037
|
-
throw new
|
|
1038
|
-
if (u && !
|
|
1039
|
-
throw new
|
|
1066
|
+
throw new U('unexpected "sub" claim value', a, "sub", "check_failed");
|
|
1067
|
+
if (u && !oa(a.aud, typeof u == "string" ? [u] : u))
|
|
1068
|
+
throw new U('unexpected "aud" claim value', a, "aud", "check_failed");
|
|
1040
1069
|
let m;
|
|
1041
1070
|
switch (typeof r.clockTolerance) {
|
|
1042
1071
|
case "string":
|
|
1043
|
-
m =
|
|
1072
|
+
m = dt(r.clockTolerance);
|
|
1044
1073
|
break;
|
|
1045
1074
|
case "number":
|
|
1046
1075
|
m = r.clockTolerance;
|
|
@@ -1051,187 +1080,188 @@ const qr = (e) => Math.floor(e.getTime() / 1e3), Bt = 60, Gt = Bt * 60, et = Gt
|
|
|
1051
1080
|
default:
|
|
1052
1081
|
throw new TypeError("Invalid clockTolerance option type");
|
|
1053
1082
|
}
|
|
1054
|
-
const { currentDate: c } = r, d =
|
|
1083
|
+
const { currentDate: c } = r, d = ta(c || /* @__PURE__ */ new Date());
|
|
1055
1084
|
if ((a.iat !== void 0 || h) && typeof a.iat != "number")
|
|
1056
|
-
throw new
|
|
1085
|
+
throw new U('"iat" claim must be a number', a, "iat", "invalid");
|
|
1057
1086
|
if (a.nbf !== void 0) {
|
|
1058
1087
|
if (typeof a.nbf != "number")
|
|
1059
|
-
throw new
|
|
1088
|
+
throw new U('"nbf" claim must be a number', a, "nbf", "invalid");
|
|
1060
1089
|
if (a.nbf > d + m)
|
|
1061
|
-
throw new
|
|
1090
|
+
throw new U('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
|
|
1062
1091
|
}
|
|
1063
1092
|
if (a.exp !== void 0) {
|
|
1064
1093
|
if (typeof a.exp != "number")
|
|
1065
|
-
throw new
|
|
1094
|
+
throw new U('"exp" claim must be a number', a, "exp", "invalid");
|
|
1066
1095
|
if (a.exp <= d - m)
|
|
1067
|
-
throw new
|
|
1096
|
+
throw new ze('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
|
1068
1097
|
}
|
|
1069
1098
|
if (h) {
|
|
1070
|
-
const y = d - a.iat, b = typeof h == "number" ? h :
|
|
1099
|
+
const y = d - a.iat, b = typeof h == "number" ? h : dt(h);
|
|
1071
1100
|
if (y - m > b)
|
|
1072
|
-
throw new
|
|
1101
|
+
throw new ze('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
|
1073
1102
|
if (y < 0 - m)
|
|
1074
|
-
throw new
|
|
1103
|
+
throw new U('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
|
|
1075
1104
|
}
|
|
1076
1105
|
return a;
|
|
1077
1106
|
};
|
|
1078
|
-
async function
|
|
1107
|
+
async function ia(e, t, r) {
|
|
1079
1108
|
var a;
|
|
1080
|
-
const n = await
|
|
1109
|
+
const n = await ea(e, t, r);
|
|
1081
1110
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
1082
|
-
throw new
|
|
1083
|
-
const o = { payload:
|
|
1111
|
+
throw new B("JWTs MUST NOT use unencoded payload");
|
|
1112
|
+
const o = { payload: sa(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
|
|
1084
1113
|
return typeof t == "function" ? { ...o, key: n.key } : o;
|
|
1085
1114
|
}
|
|
1086
|
-
const
|
|
1087
|
-
function
|
|
1115
|
+
const ca = Q;
|
|
1116
|
+
function la(e) {
|
|
1088
1117
|
if (typeof e != "string")
|
|
1089
|
-
throw new
|
|
1118
|
+
throw new B("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1090
1119
|
const { 1: t, length: r } = e.split(".");
|
|
1091
1120
|
if (r === 5)
|
|
1092
|
-
throw new
|
|
1121
|
+
throw new B("Only JWTs using Compact JWS serialization can be decoded");
|
|
1093
1122
|
if (r !== 3)
|
|
1094
|
-
throw new
|
|
1123
|
+
throw new B("Invalid JWT");
|
|
1095
1124
|
if (!t)
|
|
1096
|
-
throw new
|
|
1125
|
+
throw new B("JWTs must contain a payload");
|
|
1097
1126
|
let a;
|
|
1098
1127
|
try {
|
|
1099
|
-
a =
|
|
1128
|
+
a = ca(t);
|
|
1100
1129
|
} catch {
|
|
1101
|
-
throw new
|
|
1130
|
+
throw new B("Failed to base64url decode the payload");
|
|
1102
1131
|
}
|
|
1103
1132
|
let n;
|
|
1104
1133
|
try {
|
|
1105
1134
|
n = JSON.parse(be.decode(a));
|
|
1106
1135
|
} catch {
|
|
1107
|
-
throw new
|
|
1136
|
+
throw new B("Failed to parse the decoded payload as JSON");
|
|
1108
1137
|
}
|
|
1109
1138
|
if (!me(n))
|
|
1110
|
-
throw new
|
|
1139
|
+
throw new B("Invalid JWT Claims Set");
|
|
1111
1140
|
return n;
|
|
1112
1141
|
}
|
|
1113
1142
|
const fe = async (e) => {
|
|
1114
1143
|
try {
|
|
1115
|
-
const t = A.ALG, r = await
|
|
1116
|
-
return await
|
|
1144
|
+
const t = A.ALG, r = await Jr(Er, t);
|
|
1145
|
+
return await ia(e, r, {
|
|
1117
1146
|
issuer: A.ISSUER
|
|
1118
1147
|
});
|
|
1119
1148
|
} catch {
|
|
1120
1149
|
return;
|
|
1121
1150
|
}
|
|
1122
|
-
},
|
|
1151
|
+
}, da = (e) => {
|
|
1123
1152
|
try {
|
|
1124
|
-
return
|
|
1153
|
+
return la(e);
|
|
1125
1154
|
} catch {
|
|
1126
1155
|
return;
|
|
1127
1156
|
}
|
|
1128
|
-
};
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
function
|
|
1137
|
-
if (!
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
};
|
|
1145
|
-
function
|
|
1146
|
-
if (
|
|
1147
|
-
return
|
|
1157
|
+
}, v = [];
|
|
1158
|
+
for (let e = 0; e < 256; ++e)
|
|
1159
|
+
v.push((e + 256).toString(16).slice(1));
|
|
1160
|
+
function ua(e, t = 0) {
|
|
1161
|
+
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();
|
|
1162
|
+
}
|
|
1163
|
+
let We;
|
|
1164
|
+
const ma = new Uint8Array(16);
|
|
1165
|
+
function ha() {
|
|
1166
|
+
if (!We) {
|
|
1167
|
+
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1168
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1169
|
+
We = crypto.getRandomValues.bind(crypto);
|
|
1170
|
+
}
|
|
1171
|
+
return We(ma);
|
|
1172
|
+
}
|
|
1173
|
+
const pa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mt = { randomUUID: pa };
|
|
1174
|
+
function ht(e, t, r) {
|
|
1175
|
+
if (mt.randomUUID && !t && !e)
|
|
1176
|
+
return mt.randomUUID();
|
|
1148
1177
|
e = e || {};
|
|
1149
|
-
|
|
1150
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1178
|
+
const a = e.random || (e.rng || ha)();
|
|
1179
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, ua(a);
|
|
1151
1180
|
}
|
|
1152
|
-
const
|
|
1181
|
+
const pt = globalThis.crypto, ga = (e) => `${ht()}${ht()}`.slice(0, e), fa = (e) => btoa(
|
|
1153
1182
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1154
1183
|
);
|
|
1155
|
-
async function
|
|
1156
|
-
if (!
|
|
1184
|
+
async function ya(e) {
|
|
1185
|
+
if (!pt.subtle)
|
|
1157
1186
|
throw new Error(
|
|
1158
1187
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1159
1188
|
);
|
|
1160
|
-
const t = new TextEncoder().encode(e), r = await
|
|
1161
|
-
return
|
|
1189
|
+
const t = new TextEncoder().encode(e), r = await pt.subtle.digest("SHA-256", t);
|
|
1190
|
+
return fa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1162
1191
|
}
|
|
1163
|
-
async function
|
|
1164
|
-
const t =
|
|
1192
|
+
async function ba(e) {
|
|
1193
|
+
const t = ga(43), r = await ya(t);
|
|
1165
1194
|
return {
|
|
1166
1195
|
code_verifier: t,
|
|
1167
1196
|
code_challenge: r
|
|
1168
1197
|
};
|
|
1169
1198
|
}
|
|
1170
|
-
function
|
|
1199
|
+
function Jt(e, t) {
|
|
1171
1200
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
1172
1201
|
}
|
|
1173
|
-
const
|
|
1202
|
+
const gt = (e, t) => {
|
|
1174
1203
|
const r = JSON.stringify(
|
|
1175
1204
|
typeof t == "function" ? t() : t
|
|
1176
1205
|
);
|
|
1177
|
-
window.localStorage.setItem(e, r),
|
|
1178
|
-
},
|
|
1179
|
-
window.localStorage.removeItem(e),
|
|
1180
|
-
},
|
|
1181
|
-
function
|
|
1206
|
+
window.localStorage.setItem(e, r), Jt(e, r);
|
|
1207
|
+
}, Ea = (e) => {
|
|
1208
|
+
window.localStorage.removeItem(e), Jt(e, null);
|
|
1209
|
+
}, ft = (e) => window.localStorage.getItem(e), wa = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
1210
|
+
function Ie({
|
|
1182
1211
|
key: e,
|
|
1183
1212
|
initialValue: t
|
|
1184
1213
|
}) {
|
|
1185
|
-
const r = lr(
|
|
1214
|
+
const r = lr(wa, () => ft(e)), a = X(
|
|
1186
1215
|
(s) => {
|
|
1187
1216
|
try {
|
|
1188
1217
|
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
1189
|
-
i == null ?
|
|
1218
|
+
i == null ? Ea(e) : gt(e, i);
|
|
1190
1219
|
} catch (i) {
|
|
1191
1220
|
console.warn(i);
|
|
1192
1221
|
}
|
|
1193
1222
|
},
|
|
1194
1223
|
[e, r]
|
|
1195
|
-
), n =
|
|
1224
|
+
), n = X(() => {
|
|
1196
1225
|
a(t);
|
|
1197
|
-
}, [t, a]), o =
|
|
1226
|
+
}, [t, a]), o = X(() => {
|
|
1198
1227
|
a(null);
|
|
1199
1228
|
}, [a]);
|
|
1200
|
-
return
|
|
1229
|
+
return Z(() => {
|
|
1201
1230
|
try {
|
|
1202
|
-
|
|
1231
|
+
ft(e) === null && typeof t < "u" && gt(e, t);
|
|
1203
1232
|
} catch (s) {
|
|
1204
1233
|
console.warn(s);
|
|
1205
1234
|
}
|
|
1206
1235
|
}, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
|
|
1207
1236
|
}
|
|
1208
|
-
|
|
1209
|
-
for (
|
|
1210
|
-
k.push((
|
|
1211
|
-
function
|
|
1237
|
+
const k = [];
|
|
1238
|
+
for (let e = 0; e < 256; ++e)
|
|
1239
|
+
k.push((e + 256).toString(16).slice(1));
|
|
1240
|
+
function Ta(e, t = 0) {
|
|
1212
1241
|
return (k[e[t + 0]] + k[e[t + 1]] + k[e[t + 2]] + k[e[t + 3]] + "-" + k[e[t + 4]] + k[e[t + 5]] + "-" + k[e[t + 6]] + k[e[t + 7]] + "-" + k[e[t + 8]] + k[e[t + 9]] + "-" + k[e[t + 10]] + k[e[t + 11]] + k[e[t + 12]] + k[e[t + 13]] + k[e[t + 14]] + k[e[t + 15]]).toLowerCase();
|
|
1213
1242
|
}
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1243
|
+
let Be;
|
|
1244
|
+
const Ia = new Uint8Array(16);
|
|
1245
|
+
function _a() {
|
|
1246
|
+
if (!Be) {
|
|
1247
|
+
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1248
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1249
|
+
Be = crypto.getRandomValues.bind(crypto);
|
|
1250
|
+
}
|
|
1251
|
+
return Be(Ia);
|
|
1219
1252
|
}
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
randomUUID
|
|
1223
|
-
|
|
1224
|
-
function Je(e, t, r) {
|
|
1225
|
-
if (Et.randomUUID && !t && !e)
|
|
1226
|
-
return Et.randomUUID();
|
|
1253
|
+
const Sa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), yt = { randomUUID: Sa };
|
|
1254
|
+
function Ge(e, t, r) {
|
|
1255
|
+
if (yt.randomUUID && !t && !e)
|
|
1256
|
+
return yt.randomUUID();
|
|
1227
1257
|
e = e || {};
|
|
1228
|
-
|
|
1229
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1258
|
+
const a = e.random || (e.rng || _a)();
|
|
1259
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ta(a);
|
|
1230
1260
|
}
|
|
1231
|
-
const oe = "Your session has expired. For your security, please log in again to continue.",
|
|
1261
|
+
const oe = "Your session has expired. For your security, please log in again to continue.", va = "Your session has been successfully terminated.", Je = "Login failed. Please try again.", ka = "Error getting access token, please re-authenticate.", Aa = "You forgot to wrap your component in <AuthProvider>.", Ce = {
|
|
1232
1262
|
dev: "https://auth.gizmette.local.com:3003",
|
|
1233
1263
|
prod: "https://mylogin.gizmette.com/auth"
|
|
1234
|
-
},
|
|
1264
|
+
}, _e = "@@auth@@", ge = "LOADING", ke = "LOGIN", Vt = "LOGOUT", Ee = "success", J = "failure", Yt = "include", Ft = "POST", zt = "application/json", Se = {
|
|
1235
1265
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1236
1266
|
$clientId: String!,
|
|
1237
1267
|
$username: String!,
|
|
@@ -1314,19 +1344,19 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1314
1344
|
}`
|
|
1315
1345
|
}, se = {
|
|
1316
1346
|
GET_REGISTRATION_OPTIONS: {
|
|
1317
|
-
schema:
|
|
1347
|
+
schema: Se.GET_REGISTRATION_OPTIONS,
|
|
1318
1348
|
method: "getPasskeyRegistrationOptions"
|
|
1319
1349
|
},
|
|
1320
1350
|
VERIFY_REGISTRATION: {
|
|
1321
|
-
schema:
|
|
1351
|
+
schema: Se.VERIFY_REGISTRATION,
|
|
1322
1352
|
method: "verifyPasskeyRegistration"
|
|
1323
1353
|
},
|
|
1324
1354
|
GET_AUTHENTICATION_OPTIONS: {
|
|
1325
|
-
schema:
|
|
1355
|
+
schema: Se.GET_AUTHENTICATION_OPTIONS,
|
|
1326
1356
|
method: "getPasskeyAuthenticationOptions"
|
|
1327
1357
|
},
|
|
1328
1358
|
VERIFY_AUTHENTICATION: {
|
|
1329
|
-
schema:
|
|
1359
|
+
schema: Se.VERIFY_AUTHENTICATION,
|
|
1330
1360
|
method: "verifyPasskeyAuthentication"
|
|
1331
1361
|
}
|
|
1332
1362
|
}, ie = async ({
|
|
@@ -1337,14 +1367,14 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1337
1367
|
}) => {
|
|
1338
1368
|
try {
|
|
1339
1369
|
const n = `Bearer ${e}`, o = await fetch(
|
|
1340
|
-
jt ? `${
|
|
1370
|
+
jt ? `${Ce.dev}/graphql` : `${Ce.prod}/graphql`,
|
|
1341
1371
|
{
|
|
1342
1372
|
credentials: Yt,
|
|
1343
1373
|
method: Ft,
|
|
1344
1374
|
headers: {
|
|
1345
1375
|
authorization: n,
|
|
1346
1376
|
"Content-Type": zt,
|
|
1347
|
-
[
|
|
1377
|
+
[Ct.CLIENT_ID]: `${r}`
|
|
1348
1378
|
},
|
|
1349
1379
|
body: JSON.stringify({
|
|
1350
1380
|
query: t.schema,
|
|
@@ -1353,58 +1383,58 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1353
1383
|
}
|
|
1354
1384
|
);
|
|
1355
1385
|
if (o.status !== 200)
|
|
1356
|
-
return { status:
|
|
1386
|
+
return { status: J, data: [] };
|
|
1357
1387
|
const { data: s } = await o.json();
|
|
1358
1388
|
return {
|
|
1359
1389
|
status: Ee,
|
|
1360
1390
|
data: s[t.method]
|
|
1361
1391
|
};
|
|
1362
1392
|
} catch (n) {
|
|
1363
|
-
return console.error(n), { status:
|
|
1393
|
+
return console.error(n), { status: J, data: [] };
|
|
1364
1394
|
}
|
|
1365
|
-
},
|
|
1395
|
+
}, Le = async ({
|
|
1366
1396
|
type: e,
|
|
1367
1397
|
clientId: t,
|
|
1368
1398
|
params: r = {}
|
|
1369
1399
|
}) => {
|
|
1370
1400
|
try {
|
|
1371
1401
|
const a = await fetch(
|
|
1372
|
-
jt ? `${
|
|
1402
|
+
jt ? `${Ce.dev}/${e}` : `${Ce.prod}/${e}`,
|
|
1373
1403
|
{
|
|
1374
1404
|
credentials: Yt,
|
|
1375
1405
|
method: Ft,
|
|
1376
1406
|
headers: {
|
|
1377
1407
|
"Content-Type": zt,
|
|
1378
|
-
[
|
|
1408
|
+
[Ct.CLIENT_ID]: `${t}`
|
|
1379
1409
|
},
|
|
1380
1410
|
body: JSON.stringify(r)
|
|
1381
1411
|
}
|
|
1382
1412
|
);
|
|
1383
1413
|
if (a.status !== 200)
|
|
1384
|
-
return { status:
|
|
1414
|
+
return { status: J, data: [] };
|
|
1385
1415
|
const { data: n } = await a.json();
|
|
1386
1416
|
return {
|
|
1387
1417
|
status: Ee,
|
|
1388
1418
|
data: n || []
|
|
1389
1419
|
};
|
|
1390
1420
|
} catch (a) {
|
|
1391
|
-
return console.error(a), { status:
|
|
1421
|
+
return console.error(a), { status: J, data: [] };
|
|
1392
1422
|
}
|
|
1393
|
-
},
|
|
1423
|
+
}, Na = process.env.NODE_ENV === "production", jt = !Na, qt = {
|
|
1394
1424
|
isLoading: !0,
|
|
1395
1425
|
isAuthenticated: !1,
|
|
1396
1426
|
user: void 0,
|
|
1397
1427
|
logoutReason: "",
|
|
1398
1428
|
debug: !1,
|
|
1399
1429
|
authenticationType: ""
|
|
1400
|
-
},
|
|
1430
|
+
}, Ra = (e) => {
|
|
1401
1431
|
try {
|
|
1402
|
-
const t =
|
|
1432
|
+
const t = da(e);
|
|
1403
1433
|
return t ? t[A.USER_ID_KEY] : "";
|
|
1404
1434
|
} catch {
|
|
1405
1435
|
return "";
|
|
1406
1436
|
}
|
|
1407
|
-
},
|
|
1437
|
+
}, xa = async ({
|
|
1408
1438
|
userId: e,
|
|
1409
1439
|
clientId: t,
|
|
1410
1440
|
domain: r,
|
|
@@ -1413,22 +1443,22 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1413
1443
|
var n;
|
|
1414
1444
|
try {
|
|
1415
1445
|
return {
|
|
1416
|
-
status: ((n = await
|
|
1417
|
-
type:
|
|
1446
|
+
status: ((n = await Le({
|
|
1447
|
+
type: Pe.LOGOUT,
|
|
1418
1448
|
clientId: t,
|
|
1419
1449
|
params: {
|
|
1420
1450
|
userId: e,
|
|
1421
1451
|
domain: r,
|
|
1422
1452
|
idToken: a
|
|
1423
1453
|
}
|
|
1424
|
-
})) == null ? void 0 : n.status) ||
|
|
1454
|
+
})) == null ? void 0 : n.status) || J
|
|
1425
1455
|
};
|
|
1426
1456
|
} catch {
|
|
1427
1457
|
return {
|
|
1428
|
-
status:
|
|
1458
|
+
status: J
|
|
1429
1459
|
};
|
|
1430
1460
|
}
|
|
1431
|
-
},
|
|
1461
|
+
}, Ca = async ({
|
|
1432
1462
|
username: e,
|
|
1433
1463
|
password: t,
|
|
1434
1464
|
clientId: r,
|
|
@@ -1442,8 +1472,8 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1442
1472
|
}) => {
|
|
1443
1473
|
var p;
|
|
1444
1474
|
try {
|
|
1445
|
-
const m = await
|
|
1446
|
-
type:
|
|
1475
|
+
const m = await Le({
|
|
1476
|
+
type: Pe.LOGIN,
|
|
1447
1477
|
clientId: r,
|
|
1448
1478
|
params: {
|
|
1449
1479
|
type: n || ue.ID_AND_ACCESS_TOKEN,
|
|
@@ -1472,15 +1502,15 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1472
1502
|
status: !1
|
|
1473
1503
|
};
|
|
1474
1504
|
}
|
|
1475
|
-
},
|
|
1505
|
+
}, Oa = async ({
|
|
1476
1506
|
nonce: e,
|
|
1477
1507
|
clientId: t,
|
|
1478
1508
|
code_challenge: r
|
|
1479
1509
|
}) => {
|
|
1480
1510
|
var a;
|
|
1481
1511
|
try {
|
|
1482
|
-
const n = await
|
|
1483
|
-
type:
|
|
1512
|
+
const n = await Le({
|
|
1513
|
+
type: Pe.CODE,
|
|
1484
1514
|
clientId: t,
|
|
1485
1515
|
params: {
|
|
1486
1516
|
type: ue.CODE,
|
|
@@ -1492,16 +1522,16 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1492
1522
|
status: Ee,
|
|
1493
1523
|
data: n.data.code
|
|
1494
1524
|
} : {
|
|
1495
|
-
status:
|
|
1525
|
+
status: J,
|
|
1496
1526
|
data: ""
|
|
1497
1527
|
};
|
|
1498
1528
|
} catch {
|
|
1499
1529
|
return {
|
|
1500
|
-
status:
|
|
1530
|
+
status: J,
|
|
1501
1531
|
data: ""
|
|
1502
1532
|
};
|
|
1503
1533
|
}
|
|
1504
|
-
},
|
|
1534
|
+
}, Pa = async ({
|
|
1505
1535
|
clientId: e,
|
|
1506
1536
|
userId: t,
|
|
1507
1537
|
nonce: r,
|
|
@@ -1511,8 +1541,8 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1511
1541
|
}) => {
|
|
1512
1542
|
var s;
|
|
1513
1543
|
try {
|
|
1514
|
-
const i = await
|
|
1515
|
-
type:
|
|
1544
|
+
const i = await Le({
|
|
1545
|
+
type: Pe.REFRESH,
|
|
1516
1546
|
clientId: e,
|
|
1517
1547
|
params: {
|
|
1518
1548
|
type: ue.REFRESH_TOKEN,
|
|
@@ -1537,9 +1567,9 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1537
1567
|
};
|
|
1538
1568
|
}
|
|
1539
1569
|
};
|
|
1540
|
-
class
|
|
1570
|
+
class Da {
|
|
1541
1571
|
constructor(t = null, r = null) {
|
|
1542
|
-
|
|
1572
|
+
Ke(this, "refreshTokenPromise", null), Ke(this, "accessToken"), Ke(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1543
1573
|
}
|
|
1544
1574
|
async refreshtoken({
|
|
1545
1575
|
clientId: t,
|
|
@@ -1567,7 +1597,7 @@ class Ra {
|
|
|
1567
1597
|
}) {
|
|
1568
1598
|
const o = await fe(this.refreshToken);
|
|
1569
1599
|
if (o && o.payload[A.USER_ID_KEY] !== "") {
|
|
1570
|
-
const s = await
|
|
1600
|
+
const s = await Pa({
|
|
1571
1601
|
clientId: t,
|
|
1572
1602
|
userId: r,
|
|
1573
1603
|
nonce: a,
|
|
@@ -1580,21 +1610,21 @@ class Ra {
|
|
|
1580
1610
|
newAccessToken: s.accessToken,
|
|
1581
1611
|
newRefreshToken: s.refreshToken
|
|
1582
1612
|
}) : {
|
|
1583
|
-
status:
|
|
1613
|
+
status: J
|
|
1584
1614
|
};
|
|
1585
1615
|
} else
|
|
1586
1616
|
return {
|
|
1587
|
-
status:
|
|
1617
|
+
status: J
|
|
1588
1618
|
};
|
|
1589
1619
|
}
|
|
1590
1620
|
}
|
|
1591
|
-
const
|
|
1621
|
+
const La = (e) => X(
|
|
1592
1622
|
(...t) => {
|
|
1593
1623
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1594
1624
|
},
|
|
1595
1625
|
[e]
|
|
1596
1626
|
), ce = () => {
|
|
1597
|
-
throw new Error(
|
|
1627
|
+
throw new Error(Aa);
|
|
1598
1628
|
}, Xt = cr({
|
|
1599
1629
|
isAuthenticated: !1,
|
|
1600
1630
|
isLoading: !1,
|
|
@@ -1606,90 +1636,90 @@ const xa = (e) => q(
|
|
|
1606
1636
|
loginWithPasskey: ce,
|
|
1607
1637
|
logoutReason: "",
|
|
1608
1638
|
authenticationType: ""
|
|
1609
|
-
}),
|
|
1639
|
+
}), Ma = P.createContext({
|
|
1610
1640
|
state: qt,
|
|
1611
1641
|
dispatch: () => {
|
|
1612
1642
|
}
|
|
1613
|
-
}),
|
|
1643
|
+
}), Ua = (e, t) => (t == null ? void 0 : t.type) === ge ? {
|
|
1614
1644
|
...e,
|
|
1615
1645
|
isLoading: t.payload.isLoading
|
|
1616
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1646
|
+
} : (t == null ? void 0 : t.type) === ke ? {
|
|
1617
1647
|
...e,
|
|
1618
1648
|
isLoading: !1,
|
|
1619
1649
|
isAuthenticated: !0,
|
|
1620
1650
|
user: t.payload.user,
|
|
1621
1651
|
authenticationType: t.payload.authenticationType,
|
|
1622
1652
|
logoutReason: ""
|
|
1623
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1653
|
+
} : (t == null ? void 0 : t.type) === Vt ? {
|
|
1624
1654
|
...e,
|
|
1625
1655
|
isLoading: !1,
|
|
1626
1656
|
isAuthenticated: !1,
|
|
1627
1657
|
user: void 0,
|
|
1628
1658
|
authenticationType: "",
|
|
1629
1659
|
logoutReason: t.payload.logoutReason
|
|
1630
|
-
} : e,
|
|
1660
|
+
} : e, Ka = ({
|
|
1631
1661
|
children: e,
|
|
1632
1662
|
sessionExpiration: t,
|
|
1633
1663
|
clientId: r,
|
|
1634
1664
|
domain: a = "",
|
|
1635
1665
|
debug: n = !1
|
|
1636
1666
|
}) => {
|
|
1637
|
-
const [o, s] =
|
|
1667
|
+
const [o, s] = It(Ua, {
|
|
1638
1668
|
...qt,
|
|
1639
1669
|
debug: n
|
|
1640
|
-
}), i =
|
|
1641
|
-
key: `${
|
|
1642
|
-
}), [c, d, , y] =
|
|
1643
|
-
key: `${
|
|
1644
|
-
}), [b,
|
|
1670
|
+
}), i = La(n), u = H(!1), [h, p, , m] = Ie({
|
|
1671
|
+
key: `${_e}::${r}::@@user@@`
|
|
1672
|
+
}), [c, d, , y] = Ie({
|
|
1673
|
+
key: `${_e}::${r}::@@access@@`
|
|
1674
|
+
}), [b, _, , w] = Ie(
|
|
1645
1675
|
{
|
|
1646
|
-
key: `${
|
|
1676
|
+
key: `${_e}::${r}::@@refresh@@`
|
|
1647
1677
|
}
|
|
1648
|
-
), [C,
|
|
1649
|
-
key: `${
|
|
1650
|
-
}),
|
|
1651
|
-
i("removeLocalStorage: removing local storage"), m(), y(), w(),
|
|
1678
|
+
), [C, L, , $] = Ie({
|
|
1679
|
+
key: `${_e}::${r}::@@nonce@@`
|
|
1680
|
+
}), ee = new Da(c, b), N = X(() => {
|
|
1681
|
+
i("removeLocalStorage: removing local storage"), m(), y(), w(), $();
|
|
1652
1682
|
}, [
|
|
1653
1683
|
y,
|
|
1654
1684
|
m,
|
|
1655
|
-
|
|
1685
|
+
$,
|
|
1656
1686
|
w,
|
|
1657
1687
|
i
|
|
1658
|
-
]),
|
|
1688
|
+
]), V = X(
|
|
1659
1689
|
(g) => {
|
|
1660
1690
|
i(
|
|
1661
1691
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1662
1692
|
g
|
|
1663
1693
|
), s({
|
|
1664
|
-
type:
|
|
1694
|
+
type: Vt,
|
|
1665
1695
|
payload: {
|
|
1666
1696
|
logoutReason: g || oe
|
|
1667
1697
|
}
|
|
1668
1698
|
}), N(), s({ type: ge, payload: { isLoading: !1 } });
|
|
1669
1699
|
},
|
|
1670
1700
|
[N, i]
|
|
1671
|
-
),
|
|
1701
|
+
), D = X(
|
|
1672
1702
|
async (g) => {
|
|
1673
1703
|
i("invalidateAndLogout: invalidating and logging out");
|
|
1674
|
-
const { user: T } = o, E = (T == null ? void 0 : T.userId) ||
|
|
1704
|
+
const { user: T } = o, E = (T == null ? void 0 : T.userId) || Ra(h);
|
|
1675
1705
|
E || i(
|
|
1676
1706
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1677
|
-
), await
|
|
1707
|
+
), await xa({
|
|
1678
1708
|
userId: E,
|
|
1679
1709
|
clientId: r,
|
|
1680
1710
|
domain: a,
|
|
1681
1711
|
idToken: h
|
|
1682
|
-
}),
|
|
1712
|
+
}), V(g || oe);
|
|
1683
1713
|
},
|
|
1684
|
-
[h, o, r, a,
|
|
1714
|
+
[h, o, r, a, V, i]
|
|
1685
1715
|
);
|
|
1686
|
-
|
|
1716
|
+
Z(() => {
|
|
1687
1717
|
if (!u.current)
|
|
1688
1718
|
return o.isLoading && h !== null ? (async () => {
|
|
1689
1719
|
try {
|
|
1690
1720
|
const g = await fe(h);
|
|
1691
1721
|
g && g.payload[A.USER_ID_KEY] !== "" ? (i("useEffect: setting the authentication state"), s({
|
|
1692
|
-
type:
|
|
1722
|
+
type: ke,
|
|
1693
1723
|
payload: {
|
|
1694
1724
|
authenticationType: g.payload[A.AUTH_TYPE_KEY],
|
|
1695
1725
|
user: {
|
|
@@ -1698,40 +1728,40 @@ const xa = (e) => q(
|
|
|
1698
1728
|
email: g.payload[A.EMAIL_KEY]
|
|
1699
1729
|
}
|
|
1700
1730
|
}
|
|
1701
|
-
})) : (i("useEffect: invalid JWT, invalidating and logging out"), await
|
|
1731
|
+
})) : (i("useEffect: invalid JWT, invalidating and logging out"), await D(oe));
|
|
1702
1732
|
} catch {
|
|
1703
1733
|
i(
|
|
1704
1734
|
"useEffect: exception validating JWT, invalidating and logging out"
|
|
1705
|
-
), await
|
|
1735
|
+
), await D(oe);
|
|
1706
1736
|
}
|
|
1707
1737
|
})() : (i("useEffect: setting the loading state to false"), s({ type: ge, payload: { isLoading: !1 } })), () => {
|
|
1708
1738
|
u.current = !0;
|
|
1709
1739
|
};
|
|
1710
|
-
}, [o.isLoading, h,
|
|
1711
|
-
const
|
|
1740
|
+
}, [o.isLoading, h, D, i]);
|
|
1741
|
+
const Y = async (g, T) => {
|
|
1712
1742
|
s({ type: ge, payload: { isLoading: !0 } }), N();
|
|
1713
|
-
const E =
|
|
1714
|
-
|
|
1715
|
-
const { code_verifier:
|
|
1743
|
+
const E = Ge();
|
|
1744
|
+
L(E), i("login: Logging in with password");
|
|
1745
|
+
const { code_verifier: z, code_challenge: ir } = await ba(), ot = await Oa({
|
|
1716
1746
|
nonce: E,
|
|
1717
1747
|
clientId: r,
|
|
1718
1748
|
code_challenge: ir
|
|
1719
1749
|
});
|
|
1720
|
-
if (
|
|
1721
|
-
const re = await
|
|
1750
|
+
if (ot.status) {
|
|
1751
|
+
const re = await Ca({
|
|
1722
1752
|
username: g,
|
|
1723
1753
|
password: T,
|
|
1724
1754
|
clientId: r,
|
|
1725
1755
|
sessionExpiration: t,
|
|
1726
1756
|
nonce: E,
|
|
1727
1757
|
type: ue.CODE,
|
|
1728
|
-
code:
|
|
1729
|
-
code_verifier:
|
|
1758
|
+
code: ot.data,
|
|
1759
|
+
code_verifier: z,
|
|
1730
1760
|
domain: a,
|
|
1731
1761
|
ua: navigator.userAgent
|
|
1732
1762
|
});
|
|
1733
|
-
return re.status ? (p(re.idToken), d(re.accessToken),
|
|
1734
|
-
type:
|
|
1763
|
+
return re.status ? (p(re.idToken), d(re.accessToken), _(re.refreshToken), s({
|
|
1764
|
+
type: ke,
|
|
1735
1765
|
payload: {
|
|
1736
1766
|
authenticationType: ue.CODE,
|
|
1737
1767
|
user: {
|
|
@@ -1740,41 +1770,41 @@ const xa = (e) => q(
|
|
|
1740
1770
|
email: re.email
|
|
1741
1771
|
}
|
|
1742
1772
|
}
|
|
1743
|
-
}), !0) : (
|
|
1773
|
+
}), !0) : (V(Je), !1);
|
|
1744
1774
|
}
|
|
1745
1775
|
return !1;
|
|
1746
1776
|
}, pe = async (g) => {
|
|
1747
|
-
g == null || g.preventDefault(), await
|
|
1748
|
-
},
|
|
1777
|
+
g == null || g.preventDefault(), await D(va);
|
|
1778
|
+
}, te = async () => {
|
|
1749
1779
|
const { isAuthenticated: g, user: T } = o;
|
|
1750
1780
|
try {
|
|
1751
1781
|
if (g && T && T.userId) {
|
|
1752
1782
|
if (c) {
|
|
1753
1783
|
i("getAccessToken");
|
|
1754
|
-
const
|
|
1755
|
-
if (
|
|
1784
|
+
const z = await fe(c);
|
|
1785
|
+
if (z && z.payload[A.USER_ID_KEY] !== "")
|
|
1756
1786
|
return c;
|
|
1757
1787
|
}
|
|
1758
1788
|
i("getAccessToken: invalid access token, trying to refresh it");
|
|
1759
|
-
const E = await
|
|
1789
|
+
const E = await ee.refreshtoken({
|
|
1760
1790
|
clientId: r,
|
|
1761
1791
|
userId: T.userId,
|
|
1762
1792
|
nonce: C,
|
|
1763
1793
|
domain: a
|
|
1764
1794
|
});
|
|
1765
|
-
return E.status && E.status === "success" && E.newAccessToken ? (d(E.newAccessToken),
|
|
1795
|
+
return E.status && E.status === "success" && E.newAccessToken ? (d(E.newAccessToken), _(E.newRefreshToken), E.newAccessToken) : (i(
|
|
1766
1796
|
"getAccessToken: invalid refresh token, need to re-authenticate"
|
|
1767
|
-
), await
|
|
1797
|
+
), await D(oe), "");
|
|
1768
1798
|
}
|
|
1769
1799
|
return i(
|
|
1770
1800
|
"getAccessToken: user is not authenticated, cannot get access token"
|
|
1771
|
-
), await
|
|
1801
|
+
), await D(oe), "";
|
|
1772
1802
|
} catch {
|
|
1773
1803
|
return i(
|
|
1774
1804
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1775
|
-
), await
|
|
1805
|
+
), await D(ka), "";
|
|
1776
1806
|
}
|
|
1777
|
-
}, R = () => o.isAuthenticated && h ? h : "",
|
|
1807
|
+
}, R = () => o.isAuthenticated && h ? h : "", M = async () => {
|
|
1778
1808
|
const { user: g } = o;
|
|
1779
1809
|
let T = await ie({
|
|
1780
1810
|
accessToken: c,
|
|
@@ -1814,11 +1844,11 @@ const xa = (e) => q(
|
|
|
1814
1844
|
}), !1;
|
|
1815
1845
|
}
|
|
1816
1846
|
return !1;
|
|
1817
|
-
},
|
|
1847
|
+
}, W = async () => {
|
|
1818
1848
|
s({ type: ge, payload: { isLoading: !0 } }), N();
|
|
1819
|
-
const g =
|
|
1820
|
-
|
|
1821
|
-
const T =
|
|
1849
|
+
const g = Ge();
|
|
1850
|
+
L(g), i("loginWithPasskey");
|
|
1851
|
+
const T = Ge();
|
|
1822
1852
|
let E = await ie({
|
|
1823
1853
|
accessToken: c,
|
|
1824
1854
|
clientId: r,
|
|
@@ -1830,7 +1860,7 @@ const xa = (e) => q(
|
|
|
1830
1860
|
});
|
|
1831
1861
|
if (E.status)
|
|
1832
1862
|
try {
|
|
1833
|
-
const
|
|
1863
|
+
const z = await br(E.data);
|
|
1834
1864
|
return E = await ie({
|
|
1835
1865
|
accessToken: c,
|
|
1836
1866
|
clientId: r,
|
|
@@ -1838,14 +1868,14 @@ const xa = (e) => q(
|
|
|
1838
1868
|
params: {
|
|
1839
1869
|
clientId: r,
|
|
1840
1870
|
id: T,
|
|
1841
|
-
authentication:
|
|
1871
|
+
authentication: z,
|
|
1842
1872
|
nonce: g,
|
|
1843
1873
|
domain: a,
|
|
1844
1874
|
sessionExpiration: t,
|
|
1845
1875
|
ua: navigator.userAgent
|
|
1846
1876
|
}
|
|
1847
|
-
}), E.data.status === Ee ? (p(E.data.idToken), d(E.data.accessToken),
|
|
1848
|
-
type:
|
|
1877
|
+
}), E.data.status === Ee ? (p(E.data.idToken), d(E.data.accessToken), _(E.data.refreshToken), s({
|
|
1878
|
+
type: ke,
|
|
1849
1879
|
payload: {
|
|
1850
1880
|
authenticationType: ue.PASSKEY,
|
|
1851
1881
|
user: {
|
|
@@ -1854,7 +1884,7 @@ const xa = (e) => q(
|
|
|
1854
1884
|
email: E.data.email
|
|
1855
1885
|
}
|
|
1856
1886
|
}
|
|
1857
|
-
}), !0) : (
|
|
1887
|
+
}), !0) : (V(Je), !1);
|
|
1858
1888
|
} catch {
|
|
1859
1889
|
return await ie({
|
|
1860
1890
|
accessToken: c,
|
|
@@ -1868,38 +1898,38 @@ const xa = (e) => q(
|
|
|
1868
1898
|
domain: a,
|
|
1869
1899
|
sessionExpiration: t
|
|
1870
1900
|
}
|
|
1871
|
-
}),
|
|
1901
|
+
}), V(Je), !1;
|
|
1872
1902
|
}
|
|
1873
1903
|
return !1;
|
|
1874
1904
|
};
|
|
1875
|
-
return /* @__PURE__ */ l(
|
|
1905
|
+
return /* @__PURE__ */ l(Ma.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ l(
|
|
1876
1906
|
Xt.Provider,
|
|
1877
1907
|
{
|
|
1878
1908
|
value: {
|
|
1879
1909
|
...o,
|
|
1880
|
-
login:
|
|
1910
|
+
login: Y,
|
|
1881
1911
|
logout: pe,
|
|
1882
|
-
getAccessToken:
|
|
1912
|
+
getAccessToken: te,
|
|
1883
1913
|
getIdToken: R,
|
|
1884
|
-
registeringForPasskey:
|
|
1885
|
-
loginWithPasskey:
|
|
1914
|
+
registeringForPasskey: M,
|
|
1915
|
+
loginWithPasskey: W
|
|
1886
1916
|
},
|
|
1887
1917
|
children: e
|
|
1888
1918
|
}
|
|
1889
1919
|
) });
|
|
1890
|
-
},
|
|
1891
|
-
function
|
|
1920
|
+
}, et = (e = Xt) => Xe(e), Eo = "user", wo = "assistant", To = "system", Io = "internal", _o = "hidden", So = "I'm having trouble right now. Please try again later.", Ve = "OpenAI", vo = "OpenAI", ko = "Anthropic", Ao = 128e3, No = "action-message", Ro = "action-reset", xo = "action-model", Co = "action-restore", Oo = "action-streaming", Po = "action-engine", Do = "action-search", Lo = "action-sort", Mo = "action-toggle-tag", Uo = "action-reset-tags", Ko = "action-set-tags", Ho = "sassy-saint-", $o = "details", Wo = "search", Bo = "sort", Go = "engine-toggle", Jo = "==stats==", Ha = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", bt = (e) => Number.isFinite(e) ? e : 0;
|
|
1921
|
+
function $a(e) {
|
|
1892
1922
|
return {
|
|
1893
1923
|
days: Math.trunc(e / 864e5),
|
|
1894
1924
|
hours: Math.trunc(e / 36e5 % 24),
|
|
1895
1925
|
minutes: Math.trunc(e / 6e4 % 60),
|
|
1896
1926
|
seconds: Math.trunc(e / 1e3 % 60),
|
|
1897
1927
|
milliseconds: Math.trunc(e % 1e3),
|
|
1898
|
-
microseconds: Math.trunc(
|
|
1899
|
-
nanoseconds: Math.trunc(
|
|
1928
|
+
microseconds: Math.trunc(bt(e * 1e3) % 1e3),
|
|
1929
|
+
nanoseconds: Math.trunc(bt(e * 1e6) % 1e3)
|
|
1900
1930
|
};
|
|
1901
1931
|
}
|
|
1902
|
-
function
|
|
1932
|
+
function Wa(e) {
|
|
1903
1933
|
return {
|
|
1904
1934
|
days: e / 86400000n,
|
|
1905
1935
|
hours: e / 3600000n % 24n,
|
|
@@ -1910,20 +1940,20 @@ function Ma(e) {
|
|
|
1910
1940
|
nanoseconds: 0n
|
|
1911
1941
|
};
|
|
1912
1942
|
}
|
|
1913
|
-
function
|
|
1943
|
+
function Ba(e) {
|
|
1914
1944
|
switch (typeof e) {
|
|
1915
1945
|
case "number": {
|
|
1916
1946
|
if (Number.isFinite(e))
|
|
1917
|
-
return
|
|
1947
|
+
return $a(e);
|
|
1918
1948
|
break;
|
|
1919
1949
|
}
|
|
1920
1950
|
case "bigint":
|
|
1921
|
-
return
|
|
1951
|
+
return Wa(e);
|
|
1922
1952
|
}
|
|
1923
1953
|
throw new TypeError("Expected a finite number or bigint");
|
|
1924
1954
|
}
|
|
1925
|
-
const
|
|
1926
|
-
function
|
|
1955
|
+
const Ga = (e) => e === 0 || e === 0n, Ja = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Va = 1e-7, Ya = 24n * 60n * 60n * 1000n;
|
|
1956
|
+
function Fa(e, t) {
|
|
1927
1957
|
const r = typeof e == "bigint";
|
|
1928
1958
|
if (!r && !Number.isFinite(e))
|
|
1929
1959
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -1932,25 +1962,25 @@ function Ba(e, t) {
|
|
|
1932
1962
|
e = e < 0 ? -e : e, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
|
|
1933
1963
|
let n = [];
|
|
1934
1964
|
const o = (p, m) => {
|
|
1935
|
-
const c = Math.floor(p * 10 ** m +
|
|
1965
|
+
const c = Math.floor(p * 10 ** m + Va);
|
|
1936
1966
|
return (Math.round(c) / 10 ** m).toFixed(m);
|
|
1937
1967
|
}, s = (p, m, c, d) => {
|
|
1938
|
-
if (!((n.length === 0 || !t.colonNotation) &&
|
|
1968
|
+
if (!((n.length === 0 || !t.colonNotation) && Ga(p) && !(t.colonNotation && c === "m"))) {
|
|
1939
1969
|
if (d ?? (d = String(p)), t.colonNotation) {
|
|
1940
1970
|
const y = d.includes(".") ? d.split(".")[0].length : d.length, b = n.length > 0 ? 2 : 1;
|
|
1941
1971
|
d = "0".repeat(Math.max(0, b - y)) + d;
|
|
1942
1972
|
} else
|
|
1943
|
-
d += t.verbose ? " " +
|
|
1973
|
+
d += t.verbose ? " " + Ja(m, p) : c;
|
|
1944
1974
|
n.push(d);
|
|
1945
1975
|
}
|
|
1946
|
-
}, i =
|
|
1976
|
+
}, i = Ba(e), u = BigInt(i.days);
|
|
1947
1977
|
if (t.hideYearAndDays ? s(BigInt(u) * 24n + BigInt(i.hours), "hour", "h") : (t.hideYear ? s(u, "day", "d") : (s(u / 365n, "year", "y"), s(u % 365n, "day", "d")), s(Number(i.hours), "hour", "h")), s(Number(i.minutes), "minute", "m"), !t.hideSeconds)
|
|
1948
1978
|
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1949
1979
|
const p = Number(i.seconds), m = Number(i.milliseconds), c = Number(i.microseconds), d = Number(i.nanoseconds);
|
|
1950
1980
|
if (s(p, "second", "s"), t.formatSubMilliseconds)
|
|
1951
1981
|
s(m, "millisecond", "ms"), s(c, "microsecond", "µs"), s(d, "nanosecond", "ns");
|
|
1952
1982
|
else {
|
|
1953
|
-
const y = m + c / 1e3 + d / 1e6, b = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0,
|
|
1983
|
+
const y = m + c / 1e3 + d / 1e6, b = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, _ = y >= 1 ? Math.round(y) : Math.ceil(y), w = b ? y.toFixed(b) : _;
|
|
1954
1984
|
s(
|
|
1955
1985
|
Number.parseFloat(w),
|
|
1956
1986
|
"millisecond",
|
|
@@ -1959,7 +1989,7 @@ function Ba(e, t) {
|
|
|
1959
1989
|
);
|
|
1960
1990
|
}
|
|
1961
1991
|
} else {
|
|
1962
|
-
const p = (r ? Number(e %
|
|
1992
|
+
const p = (r ? Number(e % Ya) : e) / 1e3 % 60, m = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, c = o(p, m), d = t.keepDecimalsOnWholeSeconds ? c : c.replace(/\.0+$/, "");
|
|
1963
1993
|
s(Number.parseFloat(d), "second", "s", d);
|
|
1964
1994
|
}
|
|
1965
1995
|
if (n.length === 0)
|
|
@@ -1967,7 +1997,7 @@ function Ba(e, t) {
|
|
|
1967
1997
|
const h = t.colonNotation ? ":" : " ";
|
|
1968
1998
|
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(h);
|
|
1969
1999
|
}
|
|
1970
|
-
const
|
|
2000
|
+
const za = process.env.NODE_ENV === "production", tt = !za, ja = tt ? "gizmette.local.com" : "gizmette.com", Vo = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, Yo = async () => {
|
|
1971
2001
|
const e = {
|
|
1972
2002
|
/**
|
|
1973
2003
|
* A boolean value that indicates the application would
|
|
@@ -2016,11 +2046,11 @@ const Ga = process.env.NODE_ENV === "production", rt = !Ga, Va = rt ? "gizmette.
|
|
|
2016
2046
|
e
|
|
2017
2047
|
);
|
|
2018
2048
|
});
|
|
2019
|
-
},
|
|
2049
|
+
}, Fo = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ l("dl", { className: "my-0", children: /* @__PURE__ */ I("div", { className: "flex items-center justify-between", children: [
|
|
2020
2050
|
/* @__PURE__ */ l("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2021
2051
|
/* @__PURE__ */ l("dd", { className: "my-1 inline-block", children: t[r] })
|
|
2022
2052
|
] }) }, `${e}-${r}`)) : null;
|
|
2023
|
-
function
|
|
2053
|
+
function zo({
|
|
2024
2054
|
data: e,
|
|
2025
2055
|
formatter: t = (r) => r
|
|
2026
2056
|
}) {
|
|
@@ -2032,18 +2062,18 @@ function Go({
|
|
|
2032
2062
|
);
|
|
2033
2063
|
return t(a ? a / r.length : 0);
|
|
2034
2064
|
}
|
|
2035
|
-
const
|
|
2065
|
+
const jo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, qo = new Intl.NumberFormat("en", {
|
|
2036
2066
|
style: "decimal",
|
|
2037
2067
|
signDisplay: "never",
|
|
2038
2068
|
minimumFractionDigits: 0,
|
|
2039
2069
|
maximumFractionDigits: 0
|
|
2040
|
-
}),
|
|
2070
|
+
}), Xo = (e) => e > 0 ? Fa(e, {
|
|
2041
2071
|
secondsDecimalDigits: 2,
|
|
2042
2072
|
unitCount: 2
|
|
2043
|
-
}) : "N/A",
|
|
2073
|
+
}) : "N/A", qa = (e) => f(
|
|
2044
2074
|
"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",
|
|
2045
|
-
e ||
|
|
2046
|
-
),
|
|
2075
|
+
e || tt ? "pt-4" : "pt-10"
|
|
2076
|
+
), Qo = (e, t) => t === 1 ? e : `${e}s`, Et = "av-button", Xa = (e) => {
|
|
2047
2077
|
let t = "";
|
|
2048
2078
|
if (typeof e == "number" || typeof e == "string")
|
|
2049
2079
|
t = "m-" + e;
|
|
@@ -2052,7 +2082,7 @@ const Vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2052
2082
|
(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(" ");
|
|
2053
2083
|
}
|
|
2054
2084
|
return t;
|
|
2055
|
-
},
|
|
2085
|
+
}, rt = "icon", Qt = "button", Qa = "link", Za = ({
|
|
2056
2086
|
type: e,
|
|
2057
2087
|
size: t,
|
|
2058
2088
|
labelRight: r,
|
|
@@ -2067,13 +2097,13 @@ const Vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2067
2097
|
[s]: t === "medium",
|
|
2068
2098
|
[i]: t === "large"
|
|
2069
2099
|
});
|
|
2070
|
-
case
|
|
2100
|
+
case Qa:
|
|
2071
2101
|
return f("px-4 text-center", {
|
|
2072
2102
|
[o]: t === "small",
|
|
2073
2103
|
[s]: t === "medium",
|
|
2074
2104
|
[i]: t === "large"
|
|
2075
2105
|
});
|
|
2076
|
-
case
|
|
2106
|
+
case rt:
|
|
2077
2107
|
return f("inline-flex items-center", {
|
|
2078
2108
|
"justify-center": n === "center",
|
|
2079
2109
|
"justify-start": n === "left",
|
|
@@ -2086,7 +2116,7 @@ const Vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2086
2116
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
2087
2117
|
});
|
|
2088
2118
|
}
|
|
2089
|
-
},
|
|
2119
|
+
}, en = ({
|
|
2090
2120
|
mode: e,
|
|
2091
2121
|
noBackground: t,
|
|
2092
2122
|
noTruncate: r,
|
|
@@ -2118,7 +2148,7 @@ const Vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2118
2148
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
2119
2149
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
2120
2150
|
});
|
|
2121
|
-
},
|
|
2151
|
+
}, tn = ({
|
|
2122
2152
|
mode: e,
|
|
2123
2153
|
disabled: t,
|
|
2124
2154
|
variant: r
|
|
@@ -2146,7 +2176,7 @@ const Vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2146
2176
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
2147
2177
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
2148
2178
|
});
|
|
2149
|
-
},
|
|
2179
|
+
}, rn = ({
|
|
2150
2180
|
mode: e,
|
|
2151
2181
|
disabled: t,
|
|
2152
2182
|
variant: r
|
|
@@ -2174,7 +2204,7 @@ const Vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2174
2204
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
2175
2205
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
2176
2206
|
});
|
|
2177
|
-
},
|
|
2207
|
+
}, an = ({
|
|
2178
2208
|
mode: e,
|
|
2179
2209
|
noBorder: t,
|
|
2180
2210
|
variant: r
|
|
@@ -2202,12 +2232,12 @@ const Vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2202
2232
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
2203
2233
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
2204
2234
|
});
|
|
2205
|
-
},
|
|
2235
|
+
}, nn = ({ focusMode: e }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2206
2236
|
"focus:outline-focus-dark": e === "dark",
|
|
2207
2237
|
"focus:outline-focus-light": e === "light",
|
|
2208
2238
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2209
2239
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2210
|
-
}),
|
|
2240
|
+
}), at = ({
|
|
2211
2241
|
type: e,
|
|
2212
2242
|
className: t,
|
|
2213
2243
|
raw: r,
|
|
@@ -2224,38 +2254,38 @@ const Vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2224
2254
|
variant: d,
|
|
2225
2255
|
noTruncate: y,
|
|
2226
2256
|
align: b
|
|
2227
|
-
}) => (d || (d = "primary"), r ? f(
|
|
2228
|
-
|
|
2257
|
+
}) => (d || (d = "primary"), r ? f(Et, t) : f(
|
|
2258
|
+
Et,
|
|
2229
2259
|
t,
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2260
|
+
Xa(m),
|
|
2261
|
+
en({ mode: a, variant: d, noBackground: c, noTruncate: y }),
|
|
2262
|
+
Za({ type: e, size: i, labelRight: h, labelLeft: p, align: b }),
|
|
2263
|
+
an({ mode: a, variant: d, noBorder: u }),
|
|
2264
|
+
nn({ focusMode: n }),
|
|
2265
|
+
tn({ mode: a, variant: d, disabled: o }),
|
|
2266
|
+
rn({ mode: a, variant: d, disabled: o }),
|
|
2237
2267
|
{
|
|
2238
2268
|
"w-full": s,
|
|
2239
2269
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
2240
2270
|
}
|
|
2241
|
-
)),
|
|
2271
|
+
)), on = (e, t, r) => {
|
|
2242
2272
|
var a;
|
|
2243
2273
|
!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);
|
|
2244
|
-
},
|
|
2274
|
+
}, Me = P.forwardRef((e, t) => {
|
|
2245
2275
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
2246
2276
|
return /* @__PURE__ */ l(
|
|
2247
2277
|
"button",
|
|
2248
2278
|
{
|
|
2249
2279
|
ref: t,
|
|
2250
2280
|
onClick: (o) => {
|
|
2251
|
-
|
|
2281
|
+
on(o, a, r);
|
|
2252
2282
|
},
|
|
2253
2283
|
...n
|
|
2254
2284
|
}
|
|
2255
2285
|
);
|
|
2256
2286
|
});
|
|
2257
|
-
|
|
2258
|
-
const Zt =
|
|
2287
|
+
Me.displayName = "BaseButton";
|
|
2288
|
+
const Zt = P.forwardRef(
|
|
2259
2289
|
({
|
|
2260
2290
|
children: e,
|
|
2261
2291
|
disabled: t = !1,
|
|
@@ -2271,7 +2301,7 @@ const Zt = O.forwardRef(
|
|
|
2271
2301
|
noTruncate: m = !1,
|
|
2272
2302
|
...c
|
|
2273
2303
|
}, d) => {
|
|
2274
|
-
const y =
|
|
2304
|
+
const y = at({
|
|
2275
2305
|
type: Qt,
|
|
2276
2306
|
mode: r,
|
|
2277
2307
|
focusMode: a,
|
|
@@ -2286,7 +2316,7 @@ const Zt = O.forwardRef(
|
|
|
2286
2316
|
noTruncate: m
|
|
2287
2317
|
});
|
|
2288
2318
|
return /* @__PURE__ */ l(
|
|
2289
|
-
|
|
2319
|
+
Me,
|
|
2290
2320
|
{
|
|
2291
2321
|
ref: d,
|
|
2292
2322
|
className: y,
|
|
@@ -2298,7 +2328,7 @@ const Zt = O.forwardRef(
|
|
|
2298
2328
|
}
|
|
2299
2329
|
);
|
|
2300
2330
|
Zt.displayName = "Button";
|
|
2301
|
-
const
|
|
2331
|
+
const qe = P.forwardRef(
|
|
2302
2332
|
({
|
|
2303
2333
|
children: e,
|
|
2304
2334
|
disabled: t = !1,
|
|
@@ -2316,11 +2346,11 @@ const Xe = O.forwardRef(
|
|
|
2316
2346
|
labelLeft: d,
|
|
2317
2347
|
spacing: y,
|
|
2318
2348
|
noBackground: b = !1,
|
|
2319
|
-
align:
|
|
2349
|
+
align: _ = "center",
|
|
2320
2350
|
...w
|
|
2321
2351
|
}, C) => {
|
|
2322
|
-
const
|
|
2323
|
-
type:
|
|
2352
|
+
const L = at({
|
|
2353
|
+
type: rt,
|
|
2324
2354
|
mode: r,
|
|
2325
2355
|
focusMode: a,
|
|
2326
2356
|
fullWidth: n,
|
|
@@ -2333,46 +2363,46 @@ const Xe = O.forwardRef(
|
|
|
2333
2363
|
labelLeft: d,
|
|
2334
2364
|
spacing: y,
|
|
2335
2365
|
noBackground: b,
|
|
2336
|
-
align:
|
|
2337
|
-
}),
|
|
2366
|
+
align: _
|
|
2367
|
+
}), $ = f({
|
|
2338
2368
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2339
2369
|
"text-copy-light": r === "dark" && !i,
|
|
2340
2370
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
2341
2371
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
2342
2372
|
});
|
|
2343
2373
|
return /* @__PURE__ */ I(
|
|
2344
|
-
|
|
2374
|
+
Me,
|
|
2345
2375
|
{
|
|
2346
2376
|
ref: C,
|
|
2347
|
-
className:
|
|
2377
|
+
className: L,
|
|
2348
2378
|
disabled: t,
|
|
2349
2379
|
type: s,
|
|
2350
2380
|
"aria-label": h || p,
|
|
2351
2381
|
...w,
|
|
2352
2382
|
children: [
|
|
2353
2383
|
d && /* @__PURE__ */ l("span", { className: "pr-2", children: d }),
|
|
2354
|
-
/* @__PURE__ */ l("div", { className:
|
|
2384
|
+
/* @__PURE__ */ l("div", { className: $, children: e }),
|
|
2355
2385
|
c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
|
|
2356
2386
|
]
|
|
2357
2387
|
}
|
|
2358
2388
|
);
|
|
2359
2389
|
}
|
|
2360
2390
|
);
|
|
2361
|
-
|
|
2391
|
+
qe.displayName = "ButtonIcon";
|
|
2362
2392
|
/*!
|
|
2363
|
-
@versini/ui-button v1.1
|
|
2393
|
+
@versini/ui-button v1.2.1
|
|
2364
2394
|
© 2024 gizmette.com
|
|
2365
2395
|
*/
|
|
2366
2396
|
try {
|
|
2367
2397
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
2368
|
-
version: "1.1
|
|
2369
|
-
buildTime: "12/
|
|
2398
|
+
version: "1.2.1",
|
|
2399
|
+
buildTime: "12/18/2024 01:22 PM EST",
|
|
2370
2400
|
homepage: "https://github.com/aversini/ui-components",
|
|
2371
2401
|
license: "MIT"
|
|
2372
2402
|
});
|
|
2373
2403
|
} catch {
|
|
2374
2404
|
}
|
|
2375
|
-
const
|
|
2405
|
+
const sn = P.forwardRef(
|
|
2376
2406
|
({
|
|
2377
2407
|
children: e,
|
|
2378
2408
|
disabled: t = !1,
|
|
@@ -2390,12 +2420,12 @@ const tn = O.forwardRef(
|
|
|
2390
2420
|
labelLeft: d,
|
|
2391
2421
|
spacing: y,
|
|
2392
2422
|
noBackground: b = !1,
|
|
2393
|
-
align:
|
|
2423
|
+
align: _ = "center",
|
|
2394
2424
|
active: w = !1,
|
|
2395
2425
|
...C
|
|
2396
|
-
},
|
|
2397
|
-
const
|
|
2398
|
-
type:
|
|
2426
|
+
}, L) => {
|
|
2427
|
+
const $ = at({
|
|
2428
|
+
type: rt,
|
|
2399
2429
|
mode: r,
|
|
2400
2430
|
focusMode: a,
|
|
2401
2431
|
fullWidth: n,
|
|
@@ -2408,8 +2438,8 @@ const tn = O.forwardRef(
|
|
|
2408
2438
|
labelLeft: d,
|
|
2409
2439
|
spacing: y,
|
|
2410
2440
|
noBackground: b,
|
|
2411
|
-
align:
|
|
2412
|
-
}),
|
|
2441
|
+
align: _
|
|
2442
|
+
}), ee = f({
|
|
2413
2443
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2414
2444
|
"text-copy-light": r === "dark" && !i,
|
|
2415
2445
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
@@ -2432,43 +2462,43 @@ const tn = O.forwardRef(
|
|
|
2432
2462
|
}
|
|
2433
2463
|
) : "";
|
|
2434
2464
|
return /* @__PURE__ */ l("div", { className: N, children: /* @__PURE__ */ I(
|
|
2435
|
-
|
|
2465
|
+
Me,
|
|
2436
2466
|
{
|
|
2437
|
-
ref:
|
|
2438
|
-
className:
|
|
2467
|
+
ref: L,
|
|
2468
|
+
className: $,
|
|
2439
2469
|
disabled: t,
|
|
2440
2470
|
type: s,
|
|
2441
2471
|
"aria-label": h || p,
|
|
2442
2472
|
...C,
|
|
2443
2473
|
children: [
|
|
2444
2474
|
d && /* @__PURE__ */ l("span", { className: "pr-2", children: d }),
|
|
2445
|
-
/* @__PURE__ */ l("div", { className:
|
|
2475
|
+
/* @__PURE__ */ l("div", { className: ee, children: e }),
|
|
2446
2476
|
c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
|
|
2447
2477
|
]
|
|
2448
2478
|
}
|
|
2449
2479
|
) });
|
|
2450
2480
|
}
|
|
2451
2481
|
);
|
|
2452
|
-
|
|
2482
|
+
sn.displayName = "ButtonSort";
|
|
2453
2483
|
/*!
|
|
2454
|
-
@versini/ui-card v1.
|
|
2484
|
+
@versini/ui-card v1.1.1
|
|
2455
2485
|
© 2024 gizmette.com
|
|
2456
2486
|
*/
|
|
2457
2487
|
try {
|
|
2458
2488
|
window.__VERSINI_UI_CARD__ || (window.__VERSINI_UI_CARD__ = {
|
|
2459
|
-
version: "1.
|
|
2460
|
-
buildTime: "12/
|
|
2489
|
+
version: "1.1.1",
|
|
2490
|
+
buildTime: "12/18/2024 01:22 PM EST",
|
|
2461
2491
|
homepage: "https://github.com/aversini/ui-components",
|
|
2462
2492
|
license: "MIT"
|
|
2463
2493
|
});
|
|
2464
2494
|
} catch {
|
|
2465
2495
|
}
|
|
2466
|
-
const
|
|
2467
|
-
function
|
|
2468
|
-
const t =
|
|
2496
|
+
const Ae = "av-card";
|
|
2497
|
+
function cn(e) {
|
|
2498
|
+
const t = _t();
|
|
2469
2499
|
return `${e}${t}`;
|
|
2470
2500
|
}
|
|
2471
|
-
const
|
|
2501
|
+
const ln = (e) => {
|
|
2472
2502
|
let t = "";
|
|
2473
2503
|
if (typeof e == "number" || typeof e == "string")
|
|
2474
2504
|
t = "m-" + e;
|
|
@@ -2477,7 +2507,7 @@ const an = (e) => {
|
|
|
2477
2507
|
(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(" ");
|
|
2478
2508
|
}
|
|
2479
2509
|
return t;
|
|
2480
|
-
},
|
|
2510
|
+
}, dn = ({
|
|
2481
2511
|
className: e,
|
|
2482
2512
|
headerClassName: t,
|
|
2483
2513
|
bodyClassName: r,
|
|
@@ -2488,10 +2518,10 @@ const an = (e) => {
|
|
|
2488
2518
|
noBorder: i
|
|
2489
2519
|
}) => {
|
|
2490
2520
|
const u = f(
|
|
2491
|
-
|
|
2521
|
+
Ae,
|
|
2492
2522
|
e,
|
|
2493
2523
|
"rounded-md",
|
|
2494
|
-
|
|
2524
|
+
ln(n),
|
|
2495
2525
|
{
|
|
2496
2526
|
"border-none": i,
|
|
2497
2527
|
"border-2": !i,
|
|
@@ -2503,7 +2533,7 @@ const an = (e) => {
|
|
|
2503
2533
|
"border-border-dark bg-surface-lighter text-copy-dark dark:border-border-accent dark:bg-surface-dark dark:text-copy-light": o === "system",
|
|
2504
2534
|
"border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": o === "alt-system"
|
|
2505
2535
|
}
|
|
2506
|
-
), h = t || f(`${
|
|
2536
|
+
), h = t || f(`${Ae}__header mt-0 border-b-2`, {
|
|
2507
2537
|
"text-copy-light border-border-accent": o === "darker",
|
|
2508
2538
|
"border-border-accent": o === "dark",
|
|
2509
2539
|
"border-border-medium": o === "light",
|
|
@@ -2511,7 +2541,7 @@ const an = (e) => {
|
|
|
2511
2541
|
"border-border-accent dark:border-border-medium": o === "alt-system",
|
|
2512
2542
|
"mb-4": !s,
|
|
2513
2543
|
"mb-2": s
|
|
2514
|
-
}), p = f(r), m = a || f(`${
|
|
2544
|
+
}), p = f(r), m = a || f(`${Ae}__footer pt-2`);
|
|
2515
2545
|
return {
|
|
2516
2546
|
wrapper: u,
|
|
2517
2547
|
header: h,
|
|
@@ -2519,7 +2549,7 @@ const an = (e) => {
|
|
|
2519
2549
|
footer: m
|
|
2520
2550
|
};
|
|
2521
2551
|
};
|
|
2522
|
-
function
|
|
2552
|
+
function un({
|
|
2523
2553
|
id: e,
|
|
2524
2554
|
content: t,
|
|
2525
2555
|
userAriaLabelledby: r,
|
|
@@ -2527,7 +2557,7 @@ function on({
|
|
|
2527
2557
|
}) {
|
|
2528
2558
|
return typeof t == "string" ? /* @__PURE__ */ l("h2", { id: e, className: a, children: t }) : r ? /* @__PURE__ */ l("div", { className: a, children: t }) : t ? /* @__PURE__ */ l("div", { className: a, id: e, children: t }) : null;
|
|
2529
2559
|
}
|
|
2530
|
-
const
|
|
2560
|
+
const mn = ({
|
|
2531
2561
|
header: e,
|
|
2532
2562
|
headerClassName: t,
|
|
2533
2563
|
footer: r,
|
|
@@ -2543,7 +2573,7 @@ const sn = ({
|
|
|
2543
2573
|
...c
|
|
2544
2574
|
}) => {
|
|
2545
2575
|
let d = null, y = null;
|
|
2546
|
-
const b = typeof e == "string",
|
|
2576
|
+
const b = typeof e == "string", _ = cn(Ae), w = dn({
|
|
2547
2577
|
className: o,
|
|
2548
2578
|
headerClassName: t,
|
|
2549
2579
|
bodyClassName: s,
|
|
@@ -2553,7 +2583,7 @@ const sn = ({
|
|
|
2553
2583
|
compact: p,
|
|
2554
2584
|
noBorder: m
|
|
2555
2585
|
});
|
|
2556
|
-
return b ? (d =
|
|
2586
|
+
return b ? (d = _, y = d) : !b && e && i ? (d = null, y = i) : !b && e && !i ? (d = _, y = d) : (d = null, y = i || null), /* @__PURE__ */ l("div", { className: w.wrapper, children: /* @__PURE__ */ I(
|
|
2557
2587
|
"section",
|
|
2558
2588
|
{
|
|
2559
2589
|
...y && {
|
|
@@ -2563,7 +2593,7 @@ const sn = ({
|
|
|
2563
2593
|
...c,
|
|
2564
2594
|
children: [
|
|
2565
2595
|
/* @__PURE__ */ l(
|
|
2566
|
-
|
|
2596
|
+
un,
|
|
2567
2597
|
{
|
|
2568
2598
|
...d && { id: d },
|
|
2569
2599
|
content: e,
|
|
@@ -2576,7 +2606,7 @@ const sn = ({
|
|
|
2576
2606
|
]
|
|
2577
2607
|
}
|
|
2578
2608
|
) });
|
|
2579
|
-
},
|
|
2609
|
+
}, hn = (e) => {
|
|
2580
2610
|
let t = "";
|
|
2581
2611
|
if (typeof e == "number" || typeof e == "string")
|
|
2582
2612
|
t = "m-" + e;
|
|
@@ -2585,7 +2615,7 @@ const sn = ({
|
|
|
2585
2615
|
(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(" ");
|
|
2586
2616
|
}
|
|
2587
2617
|
return t;
|
|
2588
|
-
},
|
|
2618
|
+
}, Ue = ({
|
|
2589
2619
|
children: e,
|
|
2590
2620
|
fill: t,
|
|
2591
2621
|
viewBox: r,
|
|
@@ -2597,7 +2627,7 @@ const sn = ({
|
|
|
2597
2627
|
semantic: u = !1,
|
|
2598
2628
|
...h
|
|
2599
2629
|
}) => {
|
|
2600
|
-
const p =
|
|
2630
|
+
const p = hn(s), m = f(
|
|
2601
2631
|
p,
|
|
2602
2632
|
a || o
|
|
2603
2633
|
);
|
|
@@ -2620,25 +2650,25 @@ const sn = ({
|
|
|
2620
2650
|
] });
|
|
2621
2651
|
};
|
|
2622
2652
|
/*!
|
|
2623
|
-
@versini/ui-private v1.
|
|
2653
|
+
@versini/ui-private v1.5.1
|
|
2624
2654
|
© 2024 gizmette.com
|
|
2625
2655
|
*/
|
|
2626
2656
|
try {
|
|
2627
2657
|
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
2628
|
-
version: "1.
|
|
2629
|
-
buildTime: "12/
|
|
2658
|
+
version: "1.5.1",
|
|
2659
|
+
buildTime: "12/18/2024 01:22 PM EST",
|
|
2630
2660
|
homepage: "https://github.com/aversini/ui-components",
|
|
2631
2661
|
license: "MIT"
|
|
2632
2662
|
});
|
|
2633
2663
|
} catch {
|
|
2634
2664
|
}
|
|
2635
|
-
const
|
|
2665
|
+
const pn = ({
|
|
2636
2666
|
className: e,
|
|
2637
2667
|
viewBox: t,
|
|
2638
2668
|
spacing: r,
|
|
2639
2669
|
...a
|
|
2640
2670
|
}) => /* @__PURE__ */ l(
|
|
2641
|
-
|
|
2671
|
+
Ue,
|
|
2642
2672
|
{
|
|
2643
2673
|
defaultViewBox: "0 0 1200 500",
|
|
2644
2674
|
defaultClassName: "w-full",
|
|
@@ -2657,7 +2687,7 @@ const ln = ({
|
|
|
2657
2687
|
}
|
|
2658
2688
|
) })
|
|
2659
2689
|
}
|
|
2660
|
-
),
|
|
2690
|
+
), gn = ({
|
|
2661
2691
|
className: e,
|
|
2662
2692
|
viewBox: t,
|
|
2663
2693
|
spacing: r,
|
|
@@ -2665,7 +2695,7 @@ const ln = ({
|
|
|
2665
2695
|
monotone: n,
|
|
2666
2696
|
...o
|
|
2667
2697
|
}) => /* @__PURE__ */ I(
|
|
2668
|
-
|
|
2698
|
+
Ue,
|
|
2669
2699
|
{
|
|
2670
2700
|
defaultViewBox: "0 0 640 512",
|
|
2671
2701
|
defaultClassName: "size-5",
|
|
@@ -2685,7 +2715,7 @@ const ln = ({
|
|
|
2685
2715
|
/* @__PURE__ */ l("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z" })
|
|
2686
2716
|
]
|
|
2687
2717
|
}
|
|
2688
|
-
),
|
|
2718
|
+
), fn = ({
|
|
2689
2719
|
className: e,
|
|
2690
2720
|
viewBox: t,
|
|
2691
2721
|
spacing: r,
|
|
@@ -2695,7 +2725,7 @@ const ln = ({
|
|
|
2695
2725
|
}) => {
|
|
2696
2726
|
const s = n ? "1" : "0.4";
|
|
2697
2727
|
return /* @__PURE__ */ I(
|
|
2698
|
-
|
|
2728
|
+
Ue,
|
|
2699
2729
|
{
|
|
2700
2730
|
defaultViewBox: "0 0 190 190",
|
|
2701
2731
|
defaultClassName: "size-5",
|
|
@@ -2724,7 +2754,7 @@ const ln = ({
|
|
|
2724
2754
|
]
|
|
2725
2755
|
}
|
|
2726
2756
|
);
|
|
2727
|
-
},
|
|
2757
|
+
}, yn = ({
|
|
2728
2758
|
className: e,
|
|
2729
2759
|
viewBox: t,
|
|
2730
2760
|
spacing: r,
|
|
@@ -2732,7 +2762,7 @@ const ln = ({
|
|
|
2732
2762
|
monotone: n,
|
|
2733
2763
|
...o
|
|
2734
2764
|
}) => /* @__PURE__ */ I(
|
|
2735
|
-
|
|
2765
|
+
Ue,
|
|
2736
2766
|
{
|
|
2737
2767
|
defaultViewBox: "0 0 576 512",
|
|
2738
2768
|
defaultClassName: "size-5",
|
|
@@ -2754,32 +2784,32 @@ const ln = ({
|
|
|
2754
2784
|
}
|
|
2755
2785
|
);
|
|
2756
2786
|
/*!
|
|
2757
|
-
@versini/ui-icons v1.
|
|
2787
|
+
@versini/ui-icons v1.16.1
|
|
2758
2788
|
© 2024 gizmette.com
|
|
2759
2789
|
*/
|
|
2760
2790
|
try {
|
|
2761
2791
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
2762
|
-
version: "1.
|
|
2763
|
-
buildTime: "12/
|
|
2792
|
+
version: "1.16.1",
|
|
2793
|
+
buildTime: "12/18/2024 01:22 PM EST",
|
|
2764
2794
|
homepage: "https://github.com/aversini/ui-components",
|
|
2765
2795
|
license: "MIT"
|
|
2766
2796
|
});
|
|
2767
2797
|
} catch {
|
|
2768
2798
|
}
|
|
2769
2799
|
/*!
|
|
2770
|
-
@versini/ui-main v1.
|
|
2800
|
+
@versini/ui-main v1.1.1
|
|
2771
2801
|
© 2024 gizmette.com
|
|
2772
2802
|
*/
|
|
2773
2803
|
try {
|
|
2774
2804
|
window.__VERSINI_UI_MAIN__ || (window.__VERSINI_UI_MAIN__ = {
|
|
2775
|
-
version: "1.
|
|
2776
|
-
buildTime: "12/
|
|
2805
|
+
version: "1.1.1",
|
|
2806
|
+
buildTime: "12/18/2024 01:22 PM EST",
|
|
2777
2807
|
homepage: "https://github.com/aversini/ui-components",
|
|
2778
2808
|
license: "MIT"
|
|
2779
2809
|
});
|
|
2780
2810
|
} catch {
|
|
2781
2811
|
}
|
|
2782
|
-
const
|
|
2812
|
+
const bn = "av-main", En = (e) => {
|
|
2783
2813
|
let t = "";
|
|
2784
2814
|
if (typeof e == "number" || typeof e == "string")
|
|
2785
2815
|
t = "m-" + e;
|
|
@@ -2788,17 +2818,17 @@ const hn = "av-main", pn = (e) => {
|
|
|
2788
2818
|
(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(" ");
|
|
2789
2819
|
}
|
|
2790
2820
|
return t;
|
|
2791
|
-
},
|
|
2821
|
+
}, wn = ({
|
|
2792
2822
|
children: e,
|
|
2793
2823
|
className: t,
|
|
2794
2824
|
raw: r = !1,
|
|
2795
2825
|
spacing: a
|
|
2796
2826
|
}) => {
|
|
2797
|
-
const n = f(t,
|
|
2827
|
+
const n = f(t, bn, En(a), {
|
|
2798
2828
|
"mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
|
|
2799
2829
|
});
|
|
2800
2830
|
return /* @__PURE__ */ l("main", { className: n, children: e });
|
|
2801
|
-
},
|
|
2831
|
+
}, Tn = (e) => {
|
|
2802
2832
|
let t = "";
|
|
2803
2833
|
if (typeof e == "number" || typeof e == "string")
|
|
2804
2834
|
t = "m-" + e;
|
|
@@ -2807,10 +2837,10 @@ const hn = "av-main", pn = (e) => {
|
|
|
2807
2837
|
(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(" ");
|
|
2808
2838
|
}
|
|
2809
2839
|
return t;
|
|
2810
|
-
},
|
|
2840
|
+
}, In = "av-flexgrid", ve = "av-flexgrid-item", Oe = 0.25, er = P.createContext({
|
|
2811
2841
|
columnGap: 0,
|
|
2812
2842
|
rowGap: 0
|
|
2813
|
-
}),
|
|
2843
|
+
}), wt = ({
|
|
2814
2844
|
children: e,
|
|
2815
2845
|
className: t,
|
|
2816
2846
|
columnGap: r = 1,
|
|
@@ -2834,15 +2864,15 @@ const hn = "av-main", pn = (e) => {
|
|
|
2834
2864
|
* by the columnGap and rowGap that will be applied
|
|
2835
2865
|
* to all FlexgridItems (see context and paddings).
|
|
2836
2866
|
*/
|
|
2837
|
-
marginLeft: r * -1 *
|
|
2838
|
-
marginTop: a * -1 *
|
|
2867
|
+
marginLeft: r * -1 * Oe + "rem",
|
|
2868
|
+
marginTop: a * -1 * Oe + "rem"
|
|
2839
2869
|
}, c = f(
|
|
2840
|
-
|
|
2870
|
+
In,
|
|
2841
2871
|
t,
|
|
2842
2872
|
"box-border flex flex-wrap"
|
|
2843
|
-
), d = { columnGap: r, rowGap: a }, y = h ? "div" :
|
|
2844
|
-
return /* @__PURE__ */ l(y, { ...h ? { className:
|
|
2845
|
-
},
|
|
2873
|
+
), d = { columnGap: r, rowGap: a }, y = h ? "div" : P.Fragment;
|
|
2874
|
+
return /* @__PURE__ */ l(y, { ...h ? { className: Tn(h) } : {}, children: /* @__PURE__ */ l("div", { className: c, style: m, ...p, children: /* @__PURE__ */ l(er.Provider, { value: d, children: e }) }) });
|
|
2875
|
+
}, Ye = (e, t) => f({
|
|
2846
2876
|
"basis-1/12": e === 1 && !t,
|
|
2847
2877
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
2848
2878
|
"md:basis-1/12": e === 1 && t === "md",
|
|
@@ -2915,25 +2945,25 @@ const hn = "av-main", pn = (e) => {
|
|
|
2915
2945
|
"lg:basis-full": e === 12 && t === "lg",
|
|
2916
2946
|
"xl:basis-full": e === 12 && t === "xl",
|
|
2917
2947
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
2918
|
-
}),
|
|
2948
|
+
}), _n = ({
|
|
2919
2949
|
className: e,
|
|
2920
2950
|
span: t
|
|
2921
2951
|
}) => {
|
|
2922
2952
|
if (!t)
|
|
2923
|
-
return f(e,
|
|
2953
|
+
return f(e, ve, "box-border basis-auto");
|
|
2924
2954
|
if (typeof t == "number")
|
|
2925
|
-
return f(e,
|
|
2926
|
-
[`${
|
|
2955
|
+
return f(e, ve, "box-border max-w-full", {
|
|
2956
|
+
[`${Ye(t)}`]: !0
|
|
2927
2957
|
});
|
|
2928
2958
|
if (typeof t == "string")
|
|
2929
|
-
return f(e,
|
|
2959
|
+
return f(e, ve, "box-border basis-auto", {
|
|
2930
2960
|
"max-w-full grow": t === "auto"
|
|
2931
2961
|
});
|
|
2932
2962
|
if (typeof t == "object") {
|
|
2933
|
-
const r = Object.entries(t).map(([a, n]) => a === "fallback" ?
|
|
2963
|
+
const r = Object.entries(t).map(([a, n]) => a === "fallback" ? Ye(n) : Ye(n, a));
|
|
2934
2964
|
return f(
|
|
2935
2965
|
e,
|
|
2936
|
-
|
|
2966
|
+
ve,
|
|
2937
2967
|
"box-border",
|
|
2938
2968
|
r
|
|
2939
2969
|
);
|
|
@@ -2944,36 +2974,36 @@ const hn = "av-main", pn = (e) => {
|
|
|
2944
2974
|
span: r,
|
|
2945
2975
|
...a
|
|
2946
2976
|
}) => {
|
|
2947
|
-
const { columnGap: n, rowGap: o } =
|
|
2948
|
-
paddingLeft: n *
|
|
2949
|
-
paddingTop: o *
|
|
2950
|
-
}, i =
|
|
2977
|
+
const { columnGap: n, rowGap: o } = Xe(er), s = {
|
|
2978
|
+
paddingLeft: n * Oe + "rem",
|
|
2979
|
+
paddingTop: o * Oe + "rem"
|
|
2980
|
+
}, i = _n({
|
|
2951
2981
|
className: t,
|
|
2952
2982
|
span: r
|
|
2953
2983
|
});
|
|
2954
2984
|
return /* @__PURE__ */ l("div", { className: i, style: s, ...a, children: e });
|
|
2955
2985
|
};
|
|
2956
2986
|
/*!
|
|
2957
|
-
@versini/ui-system v1.
|
|
2987
|
+
@versini/ui-system v1.5.1
|
|
2958
2988
|
© 2024 gizmette.com
|
|
2959
2989
|
*/
|
|
2960
2990
|
try {
|
|
2961
2991
|
window.__VERSINI_UI_SYSTEM__ || (window.__VERSINI_UI_SYSTEM__ = {
|
|
2962
|
-
version: "1.
|
|
2963
|
-
buildTime: "12/
|
|
2992
|
+
version: "1.5.1",
|
|
2993
|
+
buildTime: "12/18/2024 01:22 PM EST",
|
|
2964
2994
|
homepage: "https://github.com/aversini/ui-components",
|
|
2965
2995
|
license: "MIT"
|
|
2966
2996
|
});
|
|
2967
2997
|
} catch {
|
|
2968
2998
|
}
|
|
2969
|
-
const tr = "av-text-input",
|
|
2970
|
-
function
|
|
2971
|
-
const e =
|
|
2972
|
-
return
|
|
2999
|
+
const tr = "av-text-input", Sn = "av-text-input-wrapper", Fe = "av-text-input-helper-text";
|
|
3000
|
+
function vn() {
|
|
3001
|
+
const e = H(!1);
|
|
3002
|
+
return Z(() => (e.current = !0, () => {
|
|
2973
3003
|
e.current = !1;
|
|
2974
|
-
}), []),
|
|
3004
|
+
}), []), X(() => e.current, []);
|
|
2975
3005
|
}
|
|
2976
|
-
const
|
|
3006
|
+
const kn = {
|
|
2977
3007
|
x: 0,
|
|
2978
3008
|
y: 0,
|
|
2979
3009
|
width: 0,
|
|
@@ -2983,19 +3013,19 @@ const Tn = {
|
|
|
2983
3013
|
bottom: 0,
|
|
2984
3014
|
right: 0
|
|
2985
3015
|
};
|
|
2986
|
-
function
|
|
2987
|
-
const t =
|
|
3016
|
+
function An(e) {
|
|
3017
|
+
const t = vn(), r = H(0), a = H(null), [n, o] = q(kn), s = St(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
2988
3018
|
const u = i[0];
|
|
2989
3019
|
u && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
2990
3020
|
a.current && t() && o(u.contentRect);
|
|
2991
3021
|
}));
|
|
2992
3022
|
}), [t]);
|
|
2993
|
-
return
|
|
3023
|
+
return Z(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
2994
3024
|
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
2995
3025
|
}), [s, e]), [a, n];
|
|
2996
3026
|
}
|
|
2997
|
-
function
|
|
2998
|
-
const t =
|
|
3027
|
+
function Nn(e) {
|
|
3028
|
+
const t = _t();
|
|
2999
3029
|
if (!e)
|
|
3000
3030
|
return t;
|
|
3001
3031
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -3005,7 +3035,7 @@ function vn(e) {
|
|
|
3005
3035
|
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
3006
3036
|
}
|
|
3007
3037
|
}
|
|
3008
|
-
const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT",
|
|
3038
|
+
const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", Rn = {
|
|
3009
3039
|
alert: null,
|
|
3010
3040
|
alertdialog: null,
|
|
3011
3041
|
log: "polite",
|
|
@@ -3013,7 +3043,7 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", Sn = {
|
|
|
3013
3043
|
progressbar: null,
|
|
3014
3044
|
status: "polite",
|
|
3015
3045
|
timer: "assertive"
|
|
3016
|
-
},
|
|
3046
|
+
}, xn = (e, t) => {
|
|
3017
3047
|
switch (t == null ? void 0 : t.type) {
|
|
3018
3048
|
case rr:
|
|
3019
3049
|
return {
|
|
@@ -3028,14 +3058,14 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", Sn = {
|
|
|
3028
3058
|
default:
|
|
3029
3059
|
return e;
|
|
3030
3060
|
}
|
|
3031
|
-
},
|
|
3061
|
+
}, Cn = ({
|
|
3032
3062
|
onAnnouncementClear: e,
|
|
3033
3063
|
dispatch: t
|
|
3034
3064
|
}) => {
|
|
3035
3065
|
t({
|
|
3036
3066
|
type: ar
|
|
3037
3067
|
}), typeof e == "function" && e();
|
|
3038
|
-
},
|
|
3068
|
+
}, Tt = ({
|
|
3039
3069
|
children: e,
|
|
3040
3070
|
clearAnnouncementDelay: t,
|
|
3041
3071
|
clearAnnouncementTimeoutRef: r,
|
|
@@ -3046,13 +3076,13 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", Sn = {
|
|
|
3046
3076
|
type: rr,
|
|
3047
3077
|
payload: e
|
|
3048
3078
|
}), t && (r.current = setTimeout(
|
|
3049
|
-
() =>
|
|
3079
|
+
() => Cn({
|
|
3050
3080
|
onAnnouncementClear: a,
|
|
3051
3081
|
dispatch: n
|
|
3052
3082
|
}),
|
|
3053
3083
|
t
|
|
3054
3084
|
));
|
|
3055
|
-
},
|
|
3085
|
+
}, On = ({
|
|
3056
3086
|
children: e,
|
|
3057
3087
|
announcementTimeoutRef: t,
|
|
3058
3088
|
announcementDelay: r,
|
|
@@ -3061,13 +3091,13 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", Sn = {
|
|
|
3061
3091
|
onAnnouncementClear: o,
|
|
3062
3092
|
dispatch: s
|
|
3063
3093
|
}) => {
|
|
3064
|
-
clearTimeout(t.current), r ? t.current = setTimeout(
|
|
3094
|
+
clearTimeout(t.current), r ? t.current = setTimeout(Tt, r, {
|
|
3065
3095
|
children: e,
|
|
3066
3096
|
clearAnnouncementDelay: a,
|
|
3067
3097
|
clearAnnouncementTimeoutRef: n,
|
|
3068
3098
|
onAnnouncementClear: o,
|
|
3069
3099
|
dispatch: s
|
|
3070
|
-
}) :
|
|
3100
|
+
}) : Tt({
|
|
3071
3101
|
children: e,
|
|
3072
3102
|
clearAnnouncementDelay: a,
|
|
3073
3103
|
clearAnnouncementTimeoutRef: n,
|
|
@@ -3086,12 +3116,12 @@ function nr({
|
|
|
3086
3116
|
visible: i,
|
|
3087
3117
|
...u
|
|
3088
3118
|
}) {
|
|
3089
|
-
const h =
|
|
3119
|
+
const h = H(null), p = H(null), [m, c] = It(xn, {
|
|
3090
3120
|
announcement: null
|
|
3091
3121
|
});
|
|
3092
3122
|
let d = r;
|
|
3093
|
-
typeof d > "u" && (d = a ?
|
|
3094
|
-
|
|
3123
|
+
typeof d > "u" && (d = a ? Rn[a] : "assertive"), Z(() => {
|
|
3124
|
+
On({
|
|
3095
3125
|
announcementTimeoutRef: h,
|
|
3096
3126
|
announcementDelay: n,
|
|
3097
3127
|
children: e,
|
|
@@ -3120,7 +3150,7 @@ function nr({
|
|
|
3120
3150
|
}
|
|
3121
3151
|
);
|
|
3122
3152
|
}
|
|
3123
|
-
const
|
|
3153
|
+
const Pn = (e) => {
|
|
3124
3154
|
let t = "";
|
|
3125
3155
|
if (typeof e == "number" || typeof e == "string")
|
|
3126
3156
|
t = "m-" + e;
|
|
@@ -3131,33 +3161,33 @@ const Nn = (e) => {
|
|
|
3131
3161
|
return t;
|
|
3132
3162
|
};
|
|
3133
3163
|
/*!
|
|
3134
|
-
@versini/ui-private v1.
|
|
3164
|
+
@versini/ui-private v1.5.1
|
|
3135
3165
|
© 2024 gizmette.com
|
|
3136
3166
|
*/
|
|
3137
3167
|
try {
|
|
3138
3168
|
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
3139
|
-
version: "1.
|
|
3140
|
-
buildTime: "12/
|
|
3169
|
+
version: "1.5.1",
|
|
3170
|
+
buildTime: "12/18/2024 01:22 PM EST",
|
|
3141
3171
|
homepage: "https://github.com/aversini/ui-components",
|
|
3142
3172
|
license: "MIT"
|
|
3143
3173
|
});
|
|
3144
3174
|
} catch {
|
|
3145
3175
|
}
|
|
3146
|
-
const
|
|
3176
|
+
const Dn = ({
|
|
3147
3177
|
mode: e
|
|
3148
3178
|
}) => f({
|
|
3149
3179
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
3150
3180
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
3151
3181
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
3152
3182
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
3153
|
-
}),
|
|
3183
|
+
}), Ln = ({
|
|
3154
3184
|
focusMode: e
|
|
3155
3185
|
}) => f("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
3156
3186
|
"focus:outline-focus-dark": e === "dark",
|
|
3157
3187
|
"focus:outline-focus-light": e === "light",
|
|
3158
3188
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3159
3189
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3160
|
-
}),
|
|
3190
|
+
}), Mn = ({
|
|
3161
3191
|
noBorder: e,
|
|
3162
3192
|
error: t
|
|
3163
3193
|
}) => f("border-2", {
|
|
@@ -3165,7 +3195,7 @@ const Rn = ({
|
|
|
3165
3195
|
"focus:border-border-dark": !e && t,
|
|
3166
3196
|
"border-border-error-dark": !e && t,
|
|
3167
3197
|
"border-transparent": e
|
|
3168
|
-
}),
|
|
3198
|
+
}), Un = ({
|
|
3169
3199
|
disabled: e,
|
|
3170
3200
|
raw: t,
|
|
3171
3201
|
error: r,
|
|
@@ -3189,7 +3219,7 @@ const Rn = ({
|
|
|
3189
3219
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
3190
3220
|
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
3191
3221
|
});
|
|
3192
|
-
},
|
|
3222
|
+
}, Kn = ({
|
|
3193
3223
|
error: e,
|
|
3194
3224
|
raw: t,
|
|
3195
3225
|
mode: r,
|
|
@@ -3199,24 +3229,24 @@ const Rn = ({
|
|
|
3199
3229
|
return "";
|
|
3200
3230
|
if (a)
|
|
3201
3231
|
return f(
|
|
3202
|
-
|
|
3232
|
+
Fe,
|
|
3203
3233
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
3204
3234
|
);
|
|
3205
3235
|
if (!e)
|
|
3206
|
-
return f(
|
|
3236
|
+
return f(Fe, "absolute px-2 font-medium", {
|
|
3207
3237
|
"text-copy-lighter": r === "dark",
|
|
3208
3238
|
"text-copy-dark": r === "light",
|
|
3209
3239
|
"text-copy-dark dark:text-copy-lighter": r === "system",
|
|
3210
3240
|
"text-copy-lighter dark:text-copy-dark": r === "alt-system"
|
|
3211
3241
|
});
|
|
3212
3242
|
if (e)
|
|
3213
|
-
return f(
|
|
3243
|
+
return f(Fe, "absolute px-2 font-medium", {
|
|
3214
3244
|
"text-copy-error-light bg-surface-darker": r === "dark",
|
|
3215
3245
|
"text-copy-error-dark": r === "light",
|
|
3216
3246
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
3217
3247
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
3218
3248
|
});
|
|
3219
|
-
},
|
|
3249
|
+
}, Hn = ({
|
|
3220
3250
|
className: e,
|
|
3221
3251
|
inputClassName: t,
|
|
3222
3252
|
raw: r,
|
|
@@ -3231,9 +3261,9 @@ const Rn = ({
|
|
|
3231
3261
|
}) => {
|
|
3232
3262
|
const m = r ? e : f(
|
|
3233
3263
|
"relative flex w-full flex-col justify-center",
|
|
3234
|
-
|
|
3264
|
+
Sn,
|
|
3235
3265
|
e,
|
|
3236
|
-
|
|
3266
|
+
Pn(s)
|
|
3237
3267
|
);
|
|
3238
3268
|
let c = "";
|
|
3239
3269
|
switch (h) {
|
|
@@ -3258,18 +3288,18 @@ const Rn = ({
|
|
|
3258
3288
|
t,
|
|
3259
3289
|
c,
|
|
3260
3290
|
"rounded-md text-base px-4",
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3291
|
+
Dn({ mode: i }),
|
|
3292
|
+
Ln({ focusMode: u }),
|
|
3293
|
+
Mn({ noBorder: n, error: o }),
|
|
3264
3294
|
{
|
|
3265
3295
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
3266
3296
|
}
|
|
3267
|
-
), y = r ? void 0 : "sr-only", b =
|
|
3297
|
+
), y = r ? void 0 : "sr-only", b = Un({
|
|
3268
3298
|
disabled: a,
|
|
3269
3299
|
raw: r,
|
|
3270
3300
|
error: o,
|
|
3271
3301
|
mode: i
|
|
3272
|
-
}),
|
|
3302
|
+
}), _ = Kn({
|
|
3273
3303
|
error: o,
|
|
3274
3304
|
raw: r,
|
|
3275
3305
|
mode: i,
|
|
@@ -3280,10 +3310,10 @@ const Rn = ({
|
|
|
3280
3310
|
input: d,
|
|
3281
3311
|
accessibleLabel: y,
|
|
3282
3312
|
visibleLabel: b,
|
|
3283
|
-
helperText:
|
|
3313
|
+
helperText: _,
|
|
3284
3314
|
rightElement: w
|
|
3285
3315
|
};
|
|
3286
|
-
},
|
|
3316
|
+
}, nt = P.forwardRef(
|
|
3287
3317
|
({
|
|
3288
3318
|
id: e,
|
|
3289
3319
|
name: t,
|
|
@@ -3301,18 +3331,18 @@ const Rn = ({
|
|
|
3301
3331
|
type: d = "text",
|
|
3302
3332
|
helperText: y = "",
|
|
3303
3333
|
rightElement: b,
|
|
3304
|
-
rightElementClassName:
|
|
3334
|
+
rightElementClassName: _,
|
|
3305
3335
|
spacing: w,
|
|
3306
3336
|
size: C = "md",
|
|
3307
|
-
...
|
|
3308
|
-
},
|
|
3309
|
-
const [
|
|
3337
|
+
...L
|
|
3338
|
+
}, $) => {
|
|
3339
|
+
const [ee, N] = An(), [V, D] = q(0), Y = Nn({ id: e, prefix: `${tr}-` }), pe = `${t} error, ${y}`, te = H(null), R = H(null), M = {
|
|
3310
3340
|
xs: { label: "-25px", helperText: "30px" },
|
|
3311
3341
|
sm: { label: "-29px", helperText: "34px" },
|
|
3312
3342
|
md: { label: "-33px", helperText: "38px" },
|
|
3313
3343
|
lg: { label: "-15px", helperText: "22px" },
|
|
3314
3344
|
xl: { label: "-19px", helperText: "25px" }
|
|
3315
|
-
},
|
|
3345
|
+
}, W = Hn({
|
|
3316
3346
|
className: o,
|
|
3317
3347
|
inputClassName: s,
|
|
3318
3348
|
error: a,
|
|
@@ -3323,50 +3353,50 @@ const Rn = ({
|
|
|
3323
3353
|
spacing: w,
|
|
3324
3354
|
mode: i,
|
|
3325
3355
|
size: C,
|
|
3326
|
-
rightElementClassName:
|
|
3356
|
+
rightElementClassName: _
|
|
3327
3357
|
});
|
|
3328
|
-
return
|
|
3329
|
-
N && N.width &&
|
|
3330
|
-
}, [N]),
|
|
3358
|
+
return st(() => {
|
|
3359
|
+
N && N.width && D(N.width + 18 + 10);
|
|
3360
|
+
}, [N]), st(() => {
|
|
3331
3361
|
var g, T;
|
|
3332
|
-
const { label: E, helperText:
|
|
3333
|
-
(g =
|
|
3362
|
+
const { label: E, helperText: z } = M[C];
|
|
3363
|
+
(g = te == null ? void 0 : te.current) == null || g.style.setProperty("--av-text-input-label", E), (T = R == null ? void 0 : R.current) == null || T.style.setProperty(
|
|
3334
3364
|
"--av-text-input-helper-text",
|
|
3335
|
-
|
|
3365
|
+
z
|
|
3336
3366
|
);
|
|
3337
|
-
}, [C]), /* @__PURE__ */ I("div", { className:
|
|
3367
|
+
}, [C]), /* @__PURE__ */ I("div", { className: W.wrapper, children: [
|
|
3338
3368
|
/* @__PURE__ */ l(
|
|
3339
3369
|
"label",
|
|
3340
3370
|
{
|
|
3341
|
-
htmlFor:
|
|
3371
|
+
htmlFor: Y,
|
|
3342
3372
|
id: m,
|
|
3343
|
-
className:
|
|
3373
|
+
className: W.accessibleLabel,
|
|
3344
3374
|
children: r
|
|
3345
3375
|
}
|
|
3346
3376
|
),
|
|
3347
3377
|
/* @__PURE__ */ l(
|
|
3348
3378
|
"input",
|
|
3349
3379
|
{
|
|
3350
|
-
ref:
|
|
3351
|
-
id:
|
|
3380
|
+
ref: $,
|
|
3381
|
+
id: Y,
|
|
3352
3382
|
name: t,
|
|
3353
3383
|
type: d,
|
|
3354
3384
|
disabled: h,
|
|
3355
3385
|
placeholder: n ? void 0 : " ",
|
|
3356
|
-
className:
|
|
3357
|
-
...y && { "aria-describedby": `${
|
|
3386
|
+
className: W.input,
|
|
3387
|
+
...y && { "aria-describedby": `${Y}-helper` },
|
|
3358
3388
|
...a && { "aria-invalid": "true" },
|
|
3359
|
-
...b && !n && { style: { paddingRight:
|
|
3360
|
-
...
|
|
3389
|
+
...b && !n && { style: { paddingRight: V } },
|
|
3390
|
+
...L
|
|
3361
3391
|
}
|
|
3362
3392
|
),
|
|
3363
3393
|
!n && !c && /* @__PURE__ */ l(
|
|
3364
3394
|
"label",
|
|
3365
3395
|
{
|
|
3366
|
-
ref:
|
|
3396
|
+
ref: te,
|
|
3367
3397
|
"aria-hidden": !0,
|
|
3368
|
-
htmlFor:
|
|
3369
|
-
className:
|
|
3398
|
+
htmlFor: Y,
|
|
3399
|
+
className: W.visibleLabel,
|
|
3370
3400
|
children: r
|
|
3371
3401
|
}
|
|
3372
3402
|
),
|
|
@@ -3374,16 +3404,16 @@ const Rn = ({
|
|
|
3374
3404
|
"div",
|
|
3375
3405
|
{
|
|
3376
3406
|
ref: R,
|
|
3377
|
-
id: `${
|
|
3378
|
-
className:
|
|
3407
|
+
id: `${Y}-helper`,
|
|
3408
|
+
className: W.helperText,
|
|
3379
3409
|
children: y
|
|
3380
3410
|
}
|
|
3381
3411
|
),
|
|
3382
3412
|
b && /* @__PURE__ */ l(
|
|
3383
3413
|
"div",
|
|
3384
3414
|
{
|
|
3385
|
-
ref:
|
|
3386
|
-
className:
|
|
3415
|
+
ref: ee,
|
|
3416
|
+
className: W.rightElement,
|
|
3387
3417
|
children: b
|
|
3388
3418
|
}
|
|
3389
3419
|
),
|
|
@@ -3391,16 +3421,16 @@ const Rn = ({
|
|
|
3391
3421
|
] });
|
|
3392
3422
|
}
|
|
3393
3423
|
);
|
|
3394
|
-
|
|
3395
|
-
function
|
|
3396
|
-
return
|
|
3424
|
+
nt.displayName = "TextInput";
|
|
3425
|
+
function $n(e) {
|
|
3426
|
+
return St(() => e.every((t) => t == null) ? () => {
|
|
3397
3427
|
} : (t) => {
|
|
3398
3428
|
e.forEach((r) => {
|
|
3399
3429
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
3400
3430
|
});
|
|
3401
3431
|
}, e);
|
|
3402
3432
|
}
|
|
3403
|
-
const
|
|
3433
|
+
const Wn = 500, Bn = 5e3, Gn = 2e4, or = P.forwardRef(
|
|
3404
3434
|
({
|
|
3405
3435
|
name: e,
|
|
3406
3436
|
disabled: t,
|
|
@@ -3415,57 +3445,57 @@ const Mn = 500, Un = 5e3, Kn = 2e4, or = O.forwardRef(
|
|
|
3415
3445
|
spacing: p,
|
|
3416
3446
|
...m
|
|
3417
3447
|
}, c) => {
|
|
3418
|
-
const [d, y] =
|
|
3448
|
+
const [d, y] = q(!0), [b, _] = q({
|
|
3419
3449
|
message: null,
|
|
3420
3450
|
politeness: null
|
|
3421
|
-
}), w =
|
|
3451
|
+
}), w = H(!0), C = H(null), L = H(null), $ = $n([c, L]), ee = d ? "Show" : "Hide", N = () => {
|
|
3422
3452
|
C.current && clearTimeout(C.current), w.current || (C.current = setTimeout(() => {
|
|
3423
|
-
w.current = !0, y(!0),
|
|
3424
|
-
announcementTimeout:
|
|
3453
|
+
w.current = !0, y(!0), _({
|
|
3454
|
+
announcementTimeout: Bn,
|
|
3425
3455
|
politeness: "polite",
|
|
3426
3456
|
message: `${r} hiding characters`
|
|
3427
3457
|
}), n && n(!0);
|
|
3428
|
-
},
|
|
3429
|
-
},
|
|
3458
|
+
}, Gn));
|
|
3459
|
+
}, V = (R) => {
|
|
3430
3460
|
R.preventDefault();
|
|
3431
|
-
const
|
|
3432
|
-
w.current =
|
|
3433
|
-
announcementTimeout:
|
|
3461
|
+
const M = !w.current;
|
|
3462
|
+
w.current = M, N(), y(M), _({
|
|
3463
|
+
announcementTimeout: Wn,
|
|
3434
3464
|
politeness: "assertive",
|
|
3435
|
-
message:
|
|
3436
|
-
}), n && n(
|
|
3437
|
-
},
|
|
3438
|
-
var
|
|
3439
|
-
const { relatedTarget:
|
|
3440
|
-
g != null && g.contains(
|
|
3441
|
-
},
|
|
3442
|
-
N(), s && s(R),
|
|
3465
|
+
message: M ? "Characters hidden" : "Characters showing"
|
|
3466
|
+
}), n && n(M);
|
|
3467
|
+
}, D = (R) => {
|
|
3468
|
+
var M;
|
|
3469
|
+
const { relatedTarget: W } = R, g = (M = L.current) == null ? void 0 : M.parentElement;
|
|
3470
|
+
g != null && g.contains(W) || u && u();
|
|
3471
|
+
}, Y = (R) => {
|
|
3472
|
+
N(), s && s(R), D(R);
|
|
3443
3473
|
}, pe = (R) => {
|
|
3444
3474
|
N(), i && i(R);
|
|
3445
|
-
},
|
|
3475
|
+
}, te = (R) => {
|
|
3446
3476
|
N(), o && o(R);
|
|
3447
3477
|
};
|
|
3448
|
-
return
|
|
3478
|
+
return Z(() => () => {
|
|
3449
3479
|
C.current && clearTimeout(C.current);
|
|
3450
3480
|
}, []), /* @__PURE__ */ I(ye, { children: [
|
|
3451
3481
|
/* @__PURE__ */ l(
|
|
3452
|
-
|
|
3482
|
+
nt,
|
|
3453
3483
|
{
|
|
3454
|
-
ref:
|
|
3484
|
+
ref: $,
|
|
3455
3485
|
name: e,
|
|
3456
3486
|
label: r,
|
|
3457
3487
|
labelHidden: a,
|
|
3458
3488
|
type: d ? "password" : "text",
|
|
3459
3489
|
disabled: t,
|
|
3460
3490
|
spacing: p,
|
|
3461
|
-
onBlur:
|
|
3491
|
+
onBlur: Y,
|
|
3462
3492
|
onFocus: pe,
|
|
3463
|
-
onChange:
|
|
3464
|
-
rightElement:
|
|
3493
|
+
onChange: te,
|
|
3494
|
+
rightElement: P.cloneElement(h, {
|
|
3465
3495
|
ref: c,
|
|
3466
|
-
label:
|
|
3467
|
-
onClick:
|
|
3468
|
-
onBlur:
|
|
3496
|
+
label: ee,
|
|
3497
|
+
onClick: V,
|
|
3498
|
+
onBlur: D,
|
|
3469
3499
|
disabled: t
|
|
3470
3500
|
}),
|
|
3471
3501
|
...m
|
|
@@ -3485,26 +3515,26 @@ const Mn = 500, Un = 5e3, Kn = 2e4, or = O.forwardRef(
|
|
|
3485
3515
|
);
|
|
3486
3516
|
or.displayName = "TextInputMask";
|
|
3487
3517
|
/*!
|
|
3488
|
-
@versini/ui-textinput v1.
|
|
3518
|
+
@versini/ui-textinput v1.3.1
|
|
3489
3519
|
© 2024 gizmette.com
|
|
3490
3520
|
*/
|
|
3491
3521
|
try {
|
|
3492
3522
|
window.__VERSINI_UI_TEXTINPUT__ || (window.__VERSINI_UI_TEXTINPUT__ = {
|
|
3493
|
-
version: "1.
|
|
3494
|
-
buildTime: "12/
|
|
3523
|
+
version: "1.3.1",
|
|
3524
|
+
buildTime: "12/18/2024 01:22 PM EST",
|
|
3495
3525
|
homepage: "https://github.com/aversini/ui-components",
|
|
3496
3526
|
license: "MIT"
|
|
3497
3527
|
});
|
|
3498
3528
|
} catch {
|
|
3499
3529
|
}
|
|
3500
|
-
const
|
|
3530
|
+
const Jn = "ASK! ME! ANYTHING!", sr = "LeeLou", Vn = "gizmette.com", Yn = "Log in", Fn = "Sign in with a Passkey", Zo = "Log out", zn = "Password", jn = "Powered by ", es = "Send", ts = "Profile", rs = "Statistics", as = "Chat history", ns = "About", os = "Type your question here", ss = {
|
|
3501
3531
|
ACTION_WHILE_STREAMING: {
|
|
3502
3532
|
content: "Cancel chat"
|
|
3503
3533
|
},
|
|
3504
3534
|
ACTION_WHILE_NOT_STREAMING: {
|
|
3505
3535
|
content: "New chat"
|
|
3506
3536
|
}
|
|
3507
|
-
},
|
|
3537
|
+
}, is = "N/A", cs = "Tags are pre-filled buttons available on the main screen, to help you quickly start requests. The label is used for the button, and the content is what will be inserted in the chat when the button is pressed.", ls = {
|
|
3508
3538
|
PREFERENCES: {
|
|
3509
3539
|
TITLE: "User settings",
|
|
3510
3540
|
NAME: "Name",
|
|
@@ -3540,19 +3570,19 @@ const Hn = "ASK! ME! ANYTHING!", sr = "LeeLou", $n = "gizmette.com", Wn = "Log i
|
|
|
3540
3570
|
}
|
|
3541
3571
|
};
|
|
3542
3572
|
/*!
|
|
3543
|
-
@versini/ui-footer v1.
|
|
3573
|
+
@versini/ui-footer v1.1.1
|
|
3544
3574
|
© 2024 gizmette.com
|
|
3545
3575
|
*/
|
|
3546
3576
|
try {
|
|
3547
3577
|
window.__VERSINI_UI_FOOTER__ || (window.__VERSINI_UI_FOOTER__ = {
|
|
3548
|
-
version: "1.
|
|
3549
|
-
buildTime: "12/
|
|
3578
|
+
version: "1.1.1",
|
|
3579
|
+
buildTime: "12/18/2024 01:22 PM EST",
|
|
3550
3580
|
homepage: "https://github.com/aversini/ui-components",
|
|
3551
3581
|
license: "MIT"
|
|
3552
3582
|
});
|
|
3553
3583
|
} catch {
|
|
3554
3584
|
}
|
|
3555
|
-
const
|
|
3585
|
+
const qn = "av-footer", Xn = (e) => {
|
|
3556
3586
|
let t = "";
|
|
3557
3587
|
if (typeof e == "number" || typeof e == "string")
|
|
3558
3588
|
t = "m-" + e;
|
|
@@ -3561,7 +3591,7 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3561
3591
|
(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(" ");
|
|
3562
3592
|
}
|
|
3563
3593
|
return t;
|
|
3564
|
-
},
|
|
3594
|
+
}, Qn = ({
|
|
3565
3595
|
className: e,
|
|
3566
3596
|
mode: t = "system",
|
|
3567
3597
|
row1: r,
|
|
@@ -3570,7 +3600,7 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3570
3600
|
spacing: o,
|
|
3571
3601
|
raw: s = !1
|
|
3572
3602
|
}) => {
|
|
3573
|
-
const i = f(
|
|
3603
|
+
const i = f(qn, e, Xn(o), {
|
|
3574
3604
|
"text-copy-dark": !s && t === "dark",
|
|
3575
3605
|
"text-copy-lighter": !s && t === "light",
|
|
3576
3606
|
"text-copy-dark dark:text-copy-lighter": !s && t === "system",
|
|
@@ -3582,11 +3612,11 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3582
3612
|
r && /* @__PURE__ */ l("div", { children: r }),
|
|
3583
3613
|
a && /* @__PURE__ */ l("div", { children: a })
|
|
3584
3614
|
] });
|
|
3585
|
-
},
|
|
3615
|
+
}, Zn = P.createContext({
|
|
3586
3616
|
state: {
|
|
3587
3617
|
id: "",
|
|
3588
|
-
model:
|
|
3589
|
-
engine:
|
|
3618
|
+
model: Ve,
|
|
3619
|
+
engine: Ve,
|
|
3590
3620
|
usage: 0,
|
|
3591
3621
|
messages: [],
|
|
3592
3622
|
isComponent: !1,
|
|
@@ -3598,82 +3628,82 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3598
3628
|
version: "",
|
|
3599
3629
|
models: [],
|
|
3600
3630
|
plugins: [],
|
|
3601
|
-
engine:
|
|
3631
|
+
engine: Ve,
|
|
3602
3632
|
engines: []
|
|
3603
3633
|
}
|
|
3604
|
-
}),
|
|
3634
|
+
}), ds = P.createContext({
|
|
3605
3635
|
state: { searchString: "", sortedCell: "", sortDirection: "" },
|
|
3606
3636
|
dispatch: () => {
|
|
3607
3637
|
}
|
|
3608
|
-
}),
|
|
3638
|
+
}), us = P.createContext({
|
|
3609
3639
|
state: { tag: "" },
|
|
3610
3640
|
dispatch: () => {
|
|
3611
3641
|
}
|
|
3612
|
-
}),
|
|
3642
|
+
}), eo = ({
|
|
3613
3643
|
serverStats: e
|
|
3614
3644
|
}) => {
|
|
3615
|
-
const { state: t } =
|
|
3645
|
+
const { state: t } = Xe(Zn);
|
|
3616
3646
|
return /* @__PURE__ */ l(
|
|
3617
|
-
|
|
3647
|
+
Qn,
|
|
3618
3648
|
{
|
|
3619
3649
|
mode: "light",
|
|
3620
3650
|
row1: /* @__PURE__ */ I("div", { children: [
|
|
3621
3651
|
sr,
|
|
3622
3652
|
" v",
|
|
3623
|
-
"5.
|
|
3653
|
+
"5.7.0",
|
|
3624
3654
|
" - ",
|
|
3625
|
-
|
|
3655
|
+
jn,
|
|
3626
3656
|
t && t.engine,
|
|
3627
|
-
|
|
3657
|
+
tt && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
|
|
3628
3658
|
] }),
|
|
3629
3659
|
row2: /* @__PURE__ */ I("div", { children: [
|
|
3630
3660
|
"© ",
|
|
3631
3661
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
3632
3662
|
" ",
|
|
3633
|
-
|
|
3663
|
+
Vn
|
|
3634
3664
|
] })
|
|
3635
3665
|
}
|
|
3636
3666
|
);
|
|
3637
|
-
},
|
|
3667
|
+
}, to = vt(
|
|
3638
3668
|
() => import(
|
|
3639
3669
|
/* webpackChunkName: "LazyHeader" */
|
|
3640
|
-
"./LazyHeader.
|
|
3670
|
+
"./LazyHeader.CaiWcJOn.js"
|
|
3641
3671
|
)
|
|
3642
|
-
),
|
|
3643
|
-
const { isAuthenticated: e } =
|
|
3672
|
+
), ro = () => {
|
|
3673
|
+
const { isAuthenticated: e } = et();
|
|
3644
3674
|
return /* @__PURE__ */ I(ye, { children: [
|
|
3645
|
-
e && /* @__PURE__ */ l(
|
|
3675
|
+
e && /* @__PURE__ */ l(kt, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(to, {}) }),
|
|
3646
3676
|
/* @__PURE__ */ I("div", { className: "flex items-center justify-center", children: [
|
|
3647
|
-
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(
|
|
3677
|
+
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(pn, {}) }),
|
|
3648
3678
|
/* @__PURE__ */ I("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3649
3679
|
/* @__PURE__ */ l("h1", { children: sr }),
|
|
3650
|
-
/* @__PURE__ */ l("h2", { children:
|
|
3680
|
+
/* @__PURE__ */ l("h2", { children: Jn })
|
|
3651
3681
|
] })
|
|
3652
3682
|
] })
|
|
3653
3683
|
] });
|
|
3654
|
-
},
|
|
3655
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } =
|
|
3684
|
+
}, ao = () => {
|
|
3685
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = et(), [a, n] = q(""), [o, s] = q(""), [i, u] = q(!0), [h, p] = q({
|
|
3656
3686
|
username: "",
|
|
3657
3687
|
password: ""
|
|
3658
3688
|
}), m = async (c) => {
|
|
3659
3689
|
c.preventDefault(), await e(h.username, h.password) || (s(""), n("Invalid username or password"));
|
|
3660
3690
|
};
|
|
3661
|
-
return
|
|
3691
|
+
return Z(() => {
|
|
3662
3692
|
var c;
|
|
3663
3693
|
(c = document.getElementById("logo")) == null || c.classList.add("fadeOut"), setTimeout(() => {
|
|
3664
3694
|
var d;
|
|
3665
3695
|
(d = document.getElementById("root")) == null || d.classList.replace("app-hidden", "fadeIn");
|
|
3666
3696
|
}, 500);
|
|
3667
|
-
}),
|
|
3697
|
+
}), Z(() => {
|
|
3668
3698
|
t && s(t);
|
|
3669
3699
|
}, [t]), /* @__PURE__ */ I(ye, { children: [
|
|
3670
|
-
/* @__PURE__ */ I(
|
|
3671
|
-
/* @__PURE__ */ l("div", { className:
|
|
3700
|
+
/* @__PURE__ */ I(wn, { children: [
|
|
3701
|
+
/* @__PURE__ */ l("div", { className: qa(), children: /* @__PURE__ */ l(ro, {}) }),
|
|
3672
3702
|
/* @__PURE__ */ I("form", { className: "mt-5", onSubmit: m, children: [
|
|
3673
|
-
/* @__PURE__ */ l(
|
|
3703
|
+
/* @__PURE__ */ l(wt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ l(le, { span: 6, children: /* @__PURE__ */ I(mn, { mode: "dark", children: [
|
|
3674
3704
|
/* @__PURE__ */ l(le, { span: 12, children: o && /* @__PURE__ */ l("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
|
|
3675
3705
|
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3676
|
-
|
|
3706
|
+
nt,
|
|
3677
3707
|
{
|
|
3678
3708
|
required: !0,
|
|
3679
3709
|
autoCapitalize: "off",
|
|
@@ -3702,8 +3732,8 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3702
3732
|
mode: "dark",
|
|
3703
3733
|
focusMode: "light",
|
|
3704
3734
|
name: "password",
|
|
3705
|
-
label:
|
|
3706
|
-
rightElement: /* @__PURE__ */ l(
|
|
3735
|
+
label: zn,
|
|
3736
|
+
rightElement: /* @__PURE__ */ l(qe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ l(yn, {}) : /* @__PURE__ */ l(gn, {}) }),
|
|
3707
3737
|
onMaskChange: u,
|
|
3708
3738
|
onChange: (c) => {
|
|
3709
3739
|
p({
|
|
@@ -3724,104 +3754,104 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3724
3754
|
noBorder: !0,
|
|
3725
3755
|
type: "submit",
|
|
3726
3756
|
className: "mb-4 mt-6",
|
|
3727
|
-
children:
|
|
3757
|
+
children: Yn
|
|
3728
3758
|
}
|
|
3729
3759
|
) })
|
|
3730
3760
|
] }) }) }),
|
|
3731
3761
|
/* @__PURE__ */ l("div", { className: "text-center text-copy-light", children: "or" }),
|
|
3732
|
-
/* @__PURE__ */ l(
|
|
3733
|
-
|
|
3762
|
+
/* @__PURE__ */ l(wt, { alignHorizontal: "center", children: /* @__PURE__ */ l(le, { span: 6, children: /* @__PURE__ */ l(
|
|
3763
|
+
qe,
|
|
3734
3764
|
{
|
|
3735
3765
|
mode: "dark",
|
|
3736
3766
|
focusMode: "light",
|
|
3737
3767
|
fullWidth: !0,
|
|
3738
3768
|
noBorder: !0,
|
|
3739
3769
|
className: "mb-4 mt-1",
|
|
3740
|
-
labelRight:
|
|
3770
|
+
labelRight: Fn,
|
|
3741
3771
|
onClick: r,
|
|
3742
|
-
children: /* @__PURE__ */ l(
|
|
3772
|
+
children: /* @__PURE__ */ l(fn, { className: "size-7" })
|
|
3743
3773
|
}
|
|
3744
3774
|
) }) })
|
|
3745
3775
|
] })
|
|
3746
3776
|
] }),
|
|
3747
|
-
/* @__PURE__ */ l(
|
|
3777
|
+
/* @__PURE__ */ l(eo, {})
|
|
3748
3778
|
] });
|
|
3749
|
-
},
|
|
3779
|
+
}, no = new URL(document.location.href).searchParams, oo = !!no.get("debug") || !1, so = vt(
|
|
3750
3780
|
() => import(
|
|
3751
3781
|
/* webpackChunkName: "LazyApp" */
|
|
3752
|
-
"./LazyApp.
|
|
3782
|
+
"./LazyApp.T9mKlSIX.js"
|
|
3753
3783
|
).then((e) => e.LazyApp)
|
|
3754
|
-
),
|
|
3755
|
-
const { isAuthenticated: t } =
|
|
3756
|
-
return t ? /* @__PURE__ */ l(
|
|
3757
|
-
},
|
|
3784
|
+
), io = ({ isComponent: e }) => {
|
|
3785
|
+
const { isAuthenticated: t } = et();
|
|
3786
|
+
return t ? /* @__PURE__ */ l(kt, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(so, { isComponent: e }) }) : /* @__PURE__ */ l(ao, {});
|
|
3787
|
+
}, co = ({
|
|
3758
3788
|
isComponent: e = !1,
|
|
3759
|
-
domain: t =
|
|
3760
|
-
}) => /* @__PURE__ */ l(ye, { children: /* @__PURE__ */ l(
|
|
3789
|
+
domain: t = ja
|
|
3790
|
+
}) => /* @__PURE__ */ l(ye, { children: /* @__PURE__ */ l(Ka, { clientId: Ha, domain: t, debug: oo, children: /* @__PURE__ */ l(io, { isComponent: e }) }) }), ms = ({ domain: e }) => /* @__PURE__ */ l(co, { isComponent: !0, domain: e });
|
|
3761
3791
|
export {
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3792
|
+
ns as ABOUT_TITLE,
|
|
3793
|
+
Po as ACTION_ENGINE,
|
|
3794
|
+
No as ACTION_MESSAGE,
|
|
3795
|
+
xo as ACTION_MODEL,
|
|
3796
|
+
Ro as ACTION_RESET,
|
|
3797
|
+
Uo as ACTION_RESET_TAGS,
|
|
3798
|
+
Co as ACTION_RESTORE,
|
|
3799
|
+
Do as ACTION_SEARCH,
|
|
3800
|
+
Ko as ACTION_SET_TAGS,
|
|
3801
|
+
Lo as ACTION_SORT,
|
|
3802
|
+
Oo as ACTION_STREAMING,
|
|
3803
|
+
Mo as ACTION_TOGGLE_TAG,
|
|
3774
3804
|
sr as APP_NAME,
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3805
|
+
Zn as AppContext,
|
|
3806
|
+
eo as AppFooter,
|
|
3807
|
+
ls as CARDS,
|
|
3808
|
+
Ve as DEFAULT_AI_ENGINE,
|
|
3809
|
+
mn as E,
|
|
3810
|
+
ko as ENGINE_ANTHROPIC,
|
|
3811
|
+
vo as ENGINE_OPENAI,
|
|
3812
|
+
So as ERROR_MESSAGE,
|
|
3813
|
+
Ao as GPT4_MAX_TOKENS,
|
|
3814
|
+
as as HISTORY_TITLE,
|
|
3815
|
+
ds as HistoryContext,
|
|
3816
|
+
$o as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3817
|
+
Go as LOCAL_STORAGE_ENGINE_TOGGLE,
|
|
3818
|
+
Ho as LOCAL_STORAGE_PREFIX,
|
|
3819
|
+
Wo as LOCAL_STORAGE_SEARCH,
|
|
3820
|
+
Bo as LOCAL_STORAGE_SORT,
|
|
3821
|
+
Zo as LOG_OUT,
|
|
3822
|
+
ue as M,
|
|
3823
|
+
ro as MessagesContainerHeader,
|
|
3824
|
+
is as NA,
|
|
3825
|
+
qe as O,
|
|
3826
|
+
ts as PROFILE_TITLE,
|
|
3797
3827
|
Zt as R,
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3828
|
+
wo as ROLE_ASSISTANT,
|
|
3829
|
+
_o as ROLE_HIDDEN,
|
|
3830
|
+
Io as ROLE_INTERNAL,
|
|
3831
|
+
To as ROLE_SYSTEM,
|
|
3832
|
+
Eo as ROLE_USER,
|
|
3833
|
+
es as SEND,
|
|
3834
|
+
rs as STATS,
|
|
3835
|
+
Jo as STATS_SEPARATOR,
|
|
3836
|
+
ms as SassySaint,
|
|
3837
|
+
cs as TAGS_DESCRIPTION,
|
|
3838
|
+
ss as TOOLBOX,
|
|
3839
|
+
os as TYPE_QUESTION,
|
|
3840
|
+
us as TagsContext,
|
|
3841
|
+
wt as b,
|
|
3842
|
+
wn as d,
|
|
3843
|
+
Xo as durationFormatter,
|
|
3844
|
+
zo as extractAverage,
|
|
3845
|
+
Ue as g,
|
|
3846
|
+
Yo as getCurrentGeoLocation,
|
|
3847
|
+
qa as getMessageContaintWrapperClass,
|
|
3848
|
+
jo as isLastMessageFromRole,
|
|
3819
3849
|
le as j,
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3850
|
+
nt as me,
|
|
3851
|
+
qo as numberFormatter,
|
|
3852
|
+
Qo as pluralize,
|
|
3853
|
+
Fo as renderDataAsList,
|
|
3854
|
+
Vo as truncate,
|
|
3855
|
+
et as un,
|
|
3856
|
+
fn as v
|
|
3827
3857
|
};
|