@versini/sassysaint 5.1.4 → 5.1.6
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/{App.DVd22A7h.js → App.68xrhTIC.js} +418 -400
- package/dist/chunks/{LazyHeader.ChGYAocD.js → LazyHeader.DPlhG-1q.js} +687 -635
- package/dist/chunks/{LazyMarkdownWithExtra.oW3Pc5wQ.js → LazyMarkdownWithExtra.o-qNkWIb.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.BcING2GM.js → LazyMessageAssistant.CkSUdQWN.js} +8 -8
- package/dist/chunks/{index.DuOyoYqm.js → index.B6C-bgBL.js} +186 -202
- package/dist/chunks/{index.QOymzv8v.js → index.DaWYWXXP.js} +663 -628
- package/dist/chunks/{index.BV7w1tBT.B-qjwzFk.js → index.jf7dGfT1.C4ay3jrh.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as l, jsxs as I, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import O, { createContext as lr, useReducer as kt, useRef as L, useCallback as q, useEffect as Q, useContext as Ze, useSyncExternalStore as dr, useId as St, useState as j, useLayoutEffect as ct, useMemo as _t, lazy as Nt, Suspense as Rt } from "react";
|
|
3
3
|
import f from "clsx";
|
|
4
|
-
var
|
|
4
|
+
var ur = Object.defineProperty, mr = (e, t, r) => t in e ? ur(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, He = (e, t, r) => mr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
6
|
@versini/auth-provider v7.3.3
|
|
7
7
|
© 2024 gizmette.com
|
|
@@ -15,7 +15,7 @@ try {
|
|
|
15
15
|
});
|
|
16
16
|
} catch {
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function H(e) {
|
|
19
19
|
const t = new Uint8Array(e);
|
|
20
20
|
let r = "";
|
|
21
21
|
for (const a of t)
|
|
@@ -28,10 +28,10 @@ function xe(e) {
|
|
|
28
28
|
s[i] = n.charCodeAt(i);
|
|
29
29
|
return o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function et() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function xt(e) {
|
|
35
35
|
const { id: t } = e;
|
|
36
36
|
return {
|
|
37
37
|
...e,
|
|
@@ -39,7 +39,7 @@ function Nt(e) {
|
|
|
39
39
|
transports: e.transports
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Ct(e) {
|
|
43
43
|
return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
|
|
44
44
|
}
|
|
45
45
|
class x extends Error {
|
|
@@ -47,7 +47,7 @@ class x extends Error {
|
|
|
47
47
|
super(t, { cause: a }), this.name = n ?? a.name, this.code = r;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function hr({ error: e, options: t }) {
|
|
51
51
|
var a, n;
|
|
52
52
|
const { publicKey: r } = t;
|
|
53
53
|
if (!r)
|
|
@@ -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 (Ct(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`,
|
|
@@ -125,7 +125,7 @@ function mr({ error: e, options: t }) {
|
|
|
125
125
|
}
|
|
126
126
|
return e;
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class pr {
|
|
129
129
|
createNewAbortSignal() {
|
|
130
130
|
if (this.controller) {
|
|
131
131
|
const r = new Error("Cancelling existing WebAuthn API call for new one");
|
|
@@ -141,14 +141,14 @@ class hr {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
function
|
|
146
|
-
if (e && !(
|
|
144
|
+
const Ot = new pr(), gr = ["cross-platform", "platform"];
|
|
145
|
+
function Pt(e) {
|
|
146
|
+
if (e && !(gr.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
|
-
async function
|
|
149
|
+
async function fr(e) {
|
|
150
150
|
var m;
|
|
151
|
-
if (!
|
|
151
|
+
if (!et())
|
|
152
152
|
throw new Error("WebAuthn is not supported in this browser");
|
|
153
153
|
const t = { publicKey: {
|
|
154
154
|
...e,
|
|
@@ -157,14 +157,14 @@ async function gr(e) {
|
|
|
157
157
|
...e.user,
|
|
158
158
|
id: xe(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(xt)
|
|
161
161
|
} };
|
|
162
|
-
t.signal =
|
|
162
|
+
t.signal = Ot.createNewAbortSignal();
|
|
163
163
|
let r;
|
|
164
164
|
try {
|
|
165
165
|
r = await navigator.credentials.create(t);
|
|
166
166
|
} catch (c) {
|
|
167
|
-
throw
|
|
167
|
+
throw hr({ error: c, options: t });
|
|
168
168
|
}
|
|
169
169
|
if (!r)
|
|
170
170
|
throw new Error("Registration was not completed");
|
|
@@ -182,23 +182,23 @@ async function gr(e) {
|
|
|
182
182
|
if (typeof o.getPublicKey == "function")
|
|
183
183
|
try {
|
|
184
184
|
const c = o.getPublicKey();
|
|
185
|
-
c !== null && (h =
|
|
185
|
+
c !== null && (h = H(c));
|
|
186
186
|
} catch (c) {
|
|
187
187
|
We("getPublicKey()", c);
|
|
188
188
|
}
|
|
189
189
|
let p;
|
|
190
190
|
if (typeof o.getAuthenticatorData == "function")
|
|
191
191
|
try {
|
|
192
|
-
p =
|
|
192
|
+
p = H(o.getAuthenticatorData());
|
|
193
193
|
} catch (c) {
|
|
194
194
|
We("getAuthenticatorData()", c);
|
|
195
195
|
}
|
|
196
196
|
return {
|
|
197
197
|
id: a,
|
|
198
|
-
rawId:
|
|
198
|
+
rawId: H(n),
|
|
199
199
|
response: {
|
|
200
|
-
attestationObject:
|
|
201
|
-
clientDataJSON:
|
|
200
|
+
attestationObject: H(o.attestationObject),
|
|
201
|
+
clientDataJSON: H(o.clientDataJSON),
|
|
202
202
|
transports: i,
|
|
203
203
|
publicKeyAlgorithm: u,
|
|
204
204
|
publicKey: h,
|
|
@@ -206,20 +206,20 @@ async function gr(e) {
|
|
|
206
206
|
},
|
|
207
207
|
type: s,
|
|
208
208
|
clientExtensionResults: r.getClientExtensionResults(),
|
|
209
|
-
authenticatorAttachment:
|
|
209
|
+
authenticatorAttachment: Pt(r.authenticatorAttachment)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
function We(e, t) {
|
|
213
213
|
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
214
214
|
`, t);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
if (!
|
|
216
|
+
function yr() {
|
|
217
|
+
if (!et())
|
|
218
218
|
return new Promise((t) => t(!1));
|
|
219
219
|
const e = window.PublicKeyCredential;
|
|
220
220
|
return e.isConditionalMediationAvailable === void 0 ? new Promise((t) => t(!1)) : e.isConditionalMediationAvailable();
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function br({ error: e, options: t }) {
|
|
223
223
|
const { publicKey: r } = t;
|
|
224
224
|
if (!r)
|
|
225
225
|
throw Error("options was missing required publicKey property");
|
|
@@ -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 (Ct(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`,
|
|
@@ -260,47 +260,47 @@ function yr({ error: e, options: t }) {
|
|
|
260
260
|
}
|
|
261
261
|
return e;
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
263
|
+
async function Er(e, t = !1) {
|
|
264
264
|
var m, c;
|
|
265
|
-
if (!
|
|
265
|
+
if (!et())
|
|
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(xt));
|
|
269
269
|
const a = {
|
|
270
270
|
...e,
|
|
271
271
|
challenge: xe(e.challenge),
|
|
272
272
|
allowCredentials: r
|
|
273
273
|
}, n = {};
|
|
274
274
|
if (t) {
|
|
275
|
-
if (!await
|
|
275
|
+
if (!await yr())
|
|
276
276
|
throw Error("Browser does not support WebAuthn autofill");
|
|
277
277
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1)
|
|
278
278
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
279
279
|
n.mediation = "conditional", a.allowCredentials = [];
|
|
280
280
|
}
|
|
281
|
-
n.publicKey = a, n.signal =
|
|
281
|
+
n.publicKey = a, n.signal = Ot.createNewAbortSignal();
|
|
282
282
|
let o;
|
|
283
283
|
try {
|
|
284
284
|
o = await navigator.credentials.get(n);
|
|
285
285
|
} catch (d) {
|
|
286
|
-
throw
|
|
286
|
+
throw br({ error: d, options: n });
|
|
287
287
|
}
|
|
288
288
|
if (!o)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
290
290
|
const { id: s, rawId: i, response: u, type: h } = o;
|
|
291
291
|
let p;
|
|
292
|
-
return u.userHandle && (p =
|
|
292
|
+
return u.userHandle && (p = H(u.userHandle)), {
|
|
293
293
|
id: s,
|
|
294
|
-
rawId:
|
|
294
|
+
rawId: H(i),
|
|
295
295
|
response: {
|
|
296
|
-
authenticatorData:
|
|
297
|
-
clientDataJSON:
|
|
298
|
-
signature:
|
|
296
|
+
authenticatorData: H(u.authenticatorData),
|
|
297
|
+
clientDataJSON: H(u.clientDataJSON),
|
|
298
|
+
signature: H(u.signature),
|
|
299
299
|
userHandle: p
|
|
300
300
|
},
|
|
301
301
|
type: h,
|
|
302
302
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
303
|
-
authenticatorAttachment:
|
|
303
|
+
authenticatorAttachment: Pt(o.authenticatorAttachment)
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
/*!
|
|
@@ -323,7 +323,7 @@ const ue = {
|
|
|
323
323
|
CODE: "code",
|
|
324
324
|
REFRESH_TOKEN: "refresh_token",
|
|
325
325
|
PASSKEY: "passkey"
|
|
326
|
-
},
|
|
326
|
+
}, Dt = {
|
|
327
327
|
CLIENT_ID: "X-Auth-ClientId"
|
|
328
328
|
}, _ = {
|
|
329
329
|
ALG: "RS256",
|
|
@@ -338,7 +338,7 @@ const ue = {
|
|
|
338
338
|
SCOPES_KEY: "scopes",
|
|
339
339
|
CLIENT_ID_KEY: "aud",
|
|
340
340
|
ISSUER: "gizmette.com"
|
|
341
|
-
},
|
|
341
|
+
}, wr = `-----BEGIN PUBLIC KEY-----
|
|
342
342
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
343
343
|
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
344
344
|
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
@@ -351,15 +351,15 @@ awIDAQAB
|
|
|
351
351
|
LOGOUT: "logout",
|
|
352
352
|
LOGIN: "login",
|
|
353
353
|
REFRESH: "refresh"
|
|
354
|
-
}, Le = crypto,
|
|
355
|
-
function
|
|
354
|
+
}, Le = crypto, $t = (e) => e instanceof CryptoKey, we = new TextEncoder(), be = new TextDecoder();
|
|
355
|
+
function Tr(...e) {
|
|
356
356
|
const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
|
|
357
357
|
let a = 0;
|
|
358
358
|
for (const n of e)
|
|
359
359
|
r.set(n, a), a += n.length;
|
|
360
360
|
return r;
|
|
361
361
|
}
|
|
362
|
-
const
|
|
362
|
+
const Ir = (e) => {
|
|
363
363
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
364
364
|
for (let a = 0; a < t.length; a++)
|
|
365
365
|
r[a] = t.charCodeAt(a);
|
|
@@ -368,7 +368,7 @@ const Tr = (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 {
|
|
371
|
-
return
|
|
371
|
+
return Ir(t);
|
|
372
372
|
} catch {
|
|
373
373
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
374
374
|
}
|
|
@@ -381,7 +381,7 @@ let te = class extends Error {
|
|
|
381
381
|
var r;
|
|
382
382
|
super(t), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (r = Error.captureStackTrace) == null || r.call(Error, this, this.constructor);
|
|
383
383
|
}
|
|
384
|
-
},
|
|
384
|
+
}, K = class extends te {
|
|
385
385
|
static get code() {
|
|
386
386
|
return "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
387
387
|
}
|
|
@@ -389,7 +389,7 @@ let te = class extends Error {
|
|
|
389
389
|
super(t), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
|
|
390
390
|
}
|
|
391
391
|
};
|
|
392
|
-
class
|
|
392
|
+
class lt extends te {
|
|
393
393
|
static get code() {
|
|
394
394
|
return "ERR_JWT_EXPIRED";
|
|
395
395
|
}
|
|
@@ -405,7 +405,7 @@ class vr extends te {
|
|
|
405
405
|
return "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
let
|
|
408
|
+
let W = class extends te {
|
|
409
409
|
constructor() {
|
|
410
410
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
411
411
|
}
|
|
@@ -419,7 +419,7 @@ let H = class extends te {
|
|
|
419
419
|
static get code() {
|
|
420
420
|
return "ERR_JWS_INVALID";
|
|
421
421
|
}
|
|
422
|
-
},
|
|
422
|
+
}, F = class extends te {
|
|
423
423
|
constructor() {
|
|
424
424
|
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
425
425
|
}
|
|
@@ -427,7 +427,7 @@ let H = class extends te {
|
|
|
427
427
|
return "ERR_JWT_INVALID";
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
-
class
|
|
430
|
+
class Ar extends te {
|
|
431
431
|
constructor() {
|
|
432
432
|
super(...arguments), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED", this.message = "signature verification failed";
|
|
433
433
|
}
|
|
@@ -444,7 +444,7 @@ function Te(e, t) {
|
|
|
444
444
|
function Be(e) {
|
|
445
445
|
return parseInt(e.name.slice(4), 10);
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function kr(e) {
|
|
448
448
|
switch (e) {
|
|
449
449
|
case "ES256":
|
|
450
450
|
return "P-256";
|
|
@@ -456,7 +456,7 @@ function Ar(e) {
|
|
|
456
456
|
throw new Error("unreachable");
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function Sr(e, t) {
|
|
460
460
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
461
461
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
462
462
|
if (t.length > 2) {
|
|
@@ -466,7 +466,7 @@ function kr(e, t) {
|
|
|
466
466
|
throw new TypeError(r);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function _r(e, t, ...r) {
|
|
470
470
|
switch (t) {
|
|
471
471
|
case "HS256":
|
|
472
472
|
case "HS384":
|
|
@@ -508,7 +508,7 @@ function Sr(e, t, ...r) {
|
|
|
508
508
|
case "ES512": {
|
|
509
509
|
if (!Te(e.algorithm, "ECDSA"))
|
|
510
510
|
throw J("ECDSA");
|
|
511
|
-
const a =
|
|
511
|
+
const a = kr(t);
|
|
512
512
|
if (e.algorithm.namedCurve !== a)
|
|
513
513
|
throw J(a, "algorithm.namedCurve");
|
|
514
514
|
break;
|
|
@@ -516,9 +516,9 @@ function Sr(e, t, ...r) {
|
|
|
516
516
|
default:
|
|
517
517
|
throw new TypeError("CryptoKey does not support this operation");
|
|
518
518
|
}
|
|
519
|
-
|
|
519
|
+
Sr(e, r);
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function Lt(e, t, ...r) {
|
|
522
522
|
var a;
|
|
523
523
|
if (r = r.filter(Boolean), r.length > 2) {
|
|
524
524
|
const n = r.pop();
|
|
@@ -526,11 +526,11 @@ function $t(e, t, ...r) {
|
|
|
526
526
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
527
527
|
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (a = t.constructor) != null && a.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
528
528
|
}
|
|
529
|
-
const
|
|
530
|
-
function
|
|
531
|
-
return
|
|
529
|
+
const dt = (e, ...t) => Lt("Key must be ", e, ...t);
|
|
530
|
+
function Mt(e, t, ...r) {
|
|
531
|
+
return Lt(`Key for the ${e} algorithm must be `, t, ...r);
|
|
532
532
|
}
|
|
533
|
-
const
|
|
533
|
+
const Ut = (e) => $t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ce = ["CryptoKey"], Nr = (...e) => {
|
|
534
534
|
const t = e.filter(Boolean);
|
|
535
535
|
if (t.length === 0 || t.length === 1)
|
|
536
536
|
return !0;
|
|
@@ -562,7 +562,7 @@ function me(e) {
|
|
|
562
562
|
t = Object.getPrototypeOf(t);
|
|
563
563
|
return Object.getPrototypeOf(e) === t;
|
|
564
564
|
}
|
|
565
|
-
const
|
|
565
|
+
const xr = (e, t) => {
|
|
566
566
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
567
567
|
const { modulusLength: r } = t.algorithm;
|
|
568
568
|
if (typeof r != "number" || r < 2048)
|
|
@@ -572,16 +572,16 @@ const Nr = (e, t) => {
|
|
|
572
572
|
function he(e) {
|
|
573
573
|
return me(e) && typeof e.kty == "string";
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function Cr(e) {
|
|
576
576
|
return e.kty !== "oct" && typeof e.d == "string";
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function Or(e) {
|
|
579
579
|
return e.kty !== "oct" && typeof e.d > "u";
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function Pr(e) {
|
|
582
582
|
return he(e) && e.kty === "oct" && typeof e.k == "string";
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function Dr(e) {
|
|
585
585
|
let t, r;
|
|
586
586
|
switch (e.kty) {
|
|
587
587
|
case "RSA": {
|
|
@@ -606,7 +606,7 @@ function Pr(e) {
|
|
|
606
606
|
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
607
607
|
break;
|
|
608
608
|
default:
|
|
609
|
-
throw new
|
|
609
|
+
throw new W('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
610
610
|
}
|
|
611
611
|
break;
|
|
612
612
|
}
|
|
@@ -628,7 +628,7 @@ function Pr(e) {
|
|
|
628
628
|
t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
629
629
|
break;
|
|
630
630
|
default:
|
|
631
|
-
throw new
|
|
631
|
+
throw new W('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
632
632
|
}
|
|
633
633
|
break;
|
|
634
634
|
}
|
|
@@ -644,52 +644,52 @@ function Pr(e) {
|
|
|
644
644
|
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
645
645
|
break;
|
|
646
646
|
default:
|
|
647
|
-
throw new
|
|
647
|
+
throw new W('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
648
648
|
}
|
|
649
649
|
break;
|
|
650
650
|
}
|
|
651
651
|
default:
|
|
652
|
-
throw new
|
|
652
|
+
throw new W('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
653
653
|
}
|
|
654
654
|
return { algorithm: t, keyUsages: r };
|
|
655
655
|
}
|
|
656
|
-
const
|
|
656
|
+
const Kt = async (e) => {
|
|
657
657
|
if (!e.alg)
|
|
658
658
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
659
|
-
const { algorithm: t, keyUsages: r } =
|
|
659
|
+
const { algorithm: t, keyUsages: r } = Dr(e), a = [
|
|
660
660
|
t,
|
|
661
661
|
e.ext ?? !1,
|
|
662
662
|
e.key_ops ?? r
|
|
663
663
|
], n = { ...e };
|
|
664
664
|
return delete n.alg, delete n.use, Le.subtle.importKey("jwk", n, ...a);
|
|
665
|
-
},
|
|
665
|
+
}, Ht = (e) => X(e);
|
|
666
666
|
let ae, ne;
|
|
667
|
-
const
|
|
667
|
+
const Wt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Oe = async (e, t, r, a, n = !1) => {
|
|
668
668
|
let o = e.get(t);
|
|
669
669
|
if (o != null && o[a])
|
|
670
670
|
return o[a];
|
|
671
|
-
const s = await
|
|
671
|
+
const s = await Kt({ ...r, alg: a });
|
|
672
672
|
return n && Object.freeze(t), o ? o[a] = s : e.set(t, { [a]: s }), s;
|
|
673
|
-
},
|
|
674
|
-
if (
|
|
673
|
+
}, $r = (e, t) => {
|
|
674
|
+
if (Wt(e)) {
|
|
675
675
|
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 ?
|
|
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()), Oe(ne, e, r, t));
|
|
677
677
|
}
|
|
678
678
|
return he(e) ? e.k ? X(e.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), Oe(ne, e, e, t, !0)) : e;
|
|
679
|
-
},
|
|
680
|
-
if (
|
|
679
|
+
}, Lr = (e, t) => {
|
|
680
|
+
if (Wt(e)) {
|
|
681
681
|
let r = e.export({ format: "jwk" });
|
|
682
|
-
return r.k ?
|
|
682
|
+
return r.k ? Ht(r.k) : (ae || (ae = /* @__PURE__ */ new WeakMap()), Oe(ae, e, r, t));
|
|
683
683
|
}
|
|
684
684
|
return he(e) ? e.k ? X(e.k) : (ae || (ae = /* @__PURE__ */ new WeakMap()), Oe(ae, e, e, t, !0)) : e;
|
|
685
|
-
},
|
|
685
|
+
}, Mr = { normalizePublicKey: $r, normalizePrivateKey: Lr }, z = (e, t, r = 0) => {
|
|
686
686
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
687
687
|
const a = e.indexOf(t[0], r);
|
|
688
688
|
if (a === -1)
|
|
689
689
|
return !1;
|
|
690
690
|
const n = e.subarray(a, a + t.length);
|
|
691
691
|
return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || z(e, t, a + 1);
|
|
692
|
-
},
|
|
692
|
+
}, ut = (e) => {
|
|
693
693
|
switch (!0) {
|
|
694
694
|
case z(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
|
695
695
|
return "P-256";
|
|
@@ -706,9 +706,9 @@ const Ht = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
706
706
|
case z(e, [43, 101, 113]):
|
|
707
707
|
return "Ed448";
|
|
708
708
|
default:
|
|
709
|
-
throw new
|
|
709
|
+
throw new W("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
710
710
|
}
|
|
711
|
-
},
|
|
711
|
+
}, Ur = async (e, t, r, a, n) => {
|
|
712
712
|
let o, s;
|
|
713
713
|
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((u) => u.charCodeAt(0)));
|
|
714
714
|
switch (a) {
|
|
@@ -744,24 +744,24 @@ const Ht = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
744
744
|
case "ECDH-ES+A128KW":
|
|
745
745
|
case "ECDH-ES+A192KW":
|
|
746
746
|
case "ECDH-ES+A256KW": {
|
|
747
|
-
const u =
|
|
747
|
+
const u = ut(i);
|
|
748
748
|
o = u.startsWith("P-") ? { name: "ECDH", namedCurve: u } : { name: u }, s = [];
|
|
749
749
|
break;
|
|
750
750
|
}
|
|
751
751
|
case "EdDSA":
|
|
752
|
-
o = { name:
|
|
752
|
+
o = { name: ut(i) }, s = ["verify"];
|
|
753
753
|
break;
|
|
754
754
|
default:
|
|
755
|
-
throw new
|
|
755
|
+
throw new W('Invalid or unsupported "alg" (Algorithm) value');
|
|
756
756
|
}
|
|
757
757
|
return Le.subtle.importKey(t, i, o, !1, s);
|
|
758
|
-
},
|
|
759
|
-
async function
|
|
758
|
+
}, Kr = (e, t, r) => Ur(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
759
|
+
async function Hr(e, t, r) {
|
|
760
760
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
761
761
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
762
|
-
return
|
|
762
|
+
return Kr(e, t);
|
|
763
763
|
}
|
|
764
|
-
async function
|
|
764
|
+
async function Wr(e, t) {
|
|
765
765
|
if (!me(e))
|
|
766
766
|
throw new TypeError("JWK must be an object");
|
|
767
767
|
switch (t || (t = e.alg), e.kty) {
|
|
@@ -771,15 +771,15 @@ async function Hr(e, t) {
|
|
|
771
771
|
return X(e.k);
|
|
772
772
|
case "RSA":
|
|
773
773
|
if (e.oth !== void 0)
|
|
774
|
-
throw new
|
|
774
|
+
throw new W('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
775
775
|
case "EC":
|
|
776
776
|
case "OKP":
|
|
777
|
-
return
|
|
777
|
+
return Kt({ ...e, alg: t });
|
|
778
778
|
default:
|
|
779
|
-
throw new
|
|
779
|
+
throw new W('Unsupported "kty" (Key Type) Parameter value');
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
const de = (e) => e == null ? void 0 : e[Symbol.toStringTag],
|
|
782
|
+
const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], Xe = (e, t, r) => {
|
|
783
783
|
var a, n;
|
|
784
784
|
if (t.use !== void 0 && t.use !== "sig")
|
|
785
785
|
throw new TypeError("Invalid key for this operation, when present its use must be sig");
|
|
@@ -788,32 +788,32 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], qe = (e, t, r) =>
|
|
|
788
788
|
if (t.alg !== void 0 && t.alg !== e)
|
|
789
789
|
throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);
|
|
790
790
|
return !0;
|
|
791
|
-
},
|
|
791
|
+
}, Br = (e, t, r, a) => {
|
|
792
792
|
if (!(t instanceof Uint8Array)) {
|
|
793
793
|
if (a && he(t)) {
|
|
794
|
-
if (
|
|
794
|
+
if (Pr(t) && Xe(e, t, r))
|
|
795
795
|
return;
|
|
796
796
|
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
797
797
|
}
|
|
798
|
-
if (!
|
|
799
|
-
throw new TypeError(
|
|
798
|
+
if (!Ut(t))
|
|
799
|
+
throw new TypeError(Mt(e, t, ...Ce, "Uint8Array", a ? "JSON Web Key" : null));
|
|
800
800
|
if (t.type !== "secret")
|
|
801
801
|
throw new TypeError(`${de(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
802
802
|
}
|
|
803
|
-
},
|
|
803
|
+
}, Gr = (e, t, r, a) => {
|
|
804
804
|
if (a && he(t))
|
|
805
805
|
switch (r) {
|
|
806
806
|
case "sign":
|
|
807
|
-
if (
|
|
807
|
+
if (Cr(t) && Xe(e, t, r))
|
|
808
808
|
return;
|
|
809
809
|
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
|
810
810
|
case "verify":
|
|
811
|
-
if (
|
|
811
|
+
if (Or(t) && Xe(e, t, r))
|
|
812
812
|
return;
|
|
813
813
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
814
814
|
}
|
|
815
|
-
if (!
|
|
816
|
-
throw new TypeError(
|
|
815
|
+
if (!Ut(t))
|
|
816
|
+
throw new TypeError(Mt(e, t, ...Ce, a ? "JSON Web Key" : null));
|
|
817
817
|
if (t.type === "secret")
|
|
818
818
|
throw new TypeError(`${de(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
819
819
|
if (r === "sign" && t.type === "public")
|
|
@@ -825,12 +825,12 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], qe = (e, t, r) =>
|
|
|
825
825
|
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
826
826
|
throw new TypeError(`${de(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
827
827
|
};
|
|
828
|
-
function
|
|
829
|
-
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ?
|
|
828
|
+
function Bt(e, t, r, a) {
|
|
829
|
+
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Br(t, r, a, e) : Gr(t, r, a, e);
|
|
830
830
|
}
|
|
831
|
-
|
|
832
|
-
const
|
|
833
|
-
function
|
|
831
|
+
Bt.bind(void 0, !1);
|
|
832
|
+
const mt = Bt.bind(void 0, !0);
|
|
833
|
+
function Vr(e, t, r, a, n) {
|
|
834
834
|
if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
|
|
835
835
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
836
836
|
if (!a || a.crit === void 0)
|
|
@@ -841,7 +841,7 @@ function Gr(e, t, r, a, n) {
|
|
|
841
841
|
r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
|
|
842
842
|
for (const s of a.crit) {
|
|
843
843
|
if (!o.has(s))
|
|
844
|
-
throw new
|
|
844
|
+
throw new W(`Extension Header Parameter "${s}" is not recognized`);
|
|
845
845
|
if (n[s] === void 0)
|
|
846
846
|
throw new e(`Extension Header Parameter "${s}" is missing`);
|
|
847
847
|
if (o.get(s) && a[s] === void 0)
|
|
@@ -849,13 +849,13 @@ function Gr(e, t, r, a, n) {
|
|
|
849
849
|
}
|
|
850
850
|
return new Set(a.crit);
|
|
851
851
|
}
|
|
852
|
-
const
|
|
852
|
+
const Jr = (e, t) => {
|
|
853
853
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
854
854
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
855
855
|
if (t)
|
|
856
856
|
return new Set(t);
|
|
857
857
|
};
|
|
858
|
-
function
|
|
858
|
+
function Fr(e, t) {
|
|
859
859
|
const r = `SHA-${e.slice(-3)}`;
|
|
860
860
|
switch (e) {
|
|
861
861
|
case "HS256":
|
|
@@ -877,30 +877,30 @@ function Jr(e, t) {
|
|
|
877
877
|
case "EdDSA":
|
|
878
878
|
return { name: t.name };
|
|
879
879
|
default:
|
|
880
|
-
throw new
|
|
880
|
+
throw new W(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
883
|
async function Yr(e, t, r) {
|
|
884
|
-
if (t = await
|
|
885
|
-
return
|
|
884
|
+
if (t = await Mr.normalizePublicKey(t, e), $t(t))
|
|
885
|
+
return _r(t, e, r), t;
|
|
886
886
|
if (t instanceof Uint8Array) {
|
|
887
887
|
if (!e.startsWith("HS"))
|
|
888
|
-
throw new TypeError(
|
|
888
|
+
throw new TypeError(dt(t, ...Ce));
|
|
889
889
|
return Le.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
890
890
|
}
|
|
891
|
-
throw new TypeError(
|
|
891
|
+
throw new TypeError(dt(t, ...Ce, "Uint8Array", "JSON Web Key"));
|
|
892
892
|
}
|
|
893
|
-
const
|
|
893
|
+
const zr = async (e, t, r, a) => {
|
|
894
894
|
const n = await Yr(e, t, "verify");
|
|
895
|
-
|
|
896
|
-
const o =
|
|
895
|
+
xr(e, n);
|
|
896
|
+
const o = Fr(e, n.algorithm);
|
|
897
897
|
try {
|
|
898
898
|
return await Le.subtle.verify(o, n, r, a);
|
|
899
899
|
} catch {
|
|
900
900
|
return !1;
|
|
901
901
|
}
|
|
902
902
|
};
|
|
903
|
-
async function
|
|
903
|
+
async function jr(e, t, r) {
|
|
904
904
|
if (!me(e))
|
|
905
905
|
throw new S("Flattened JWS must be an object");
|
|
906
906
|
if (e.protected === void 0 && e.header === void 0)
|
|
@@ -921,19 +921,19 @@ async function zr(e, t, r) {
|
|
|
921
921
|
} catch {
|
|
922
922
|
throw new S("JWS Protected Header is invalid");
|
|
923
923
|
}
|
|
924
|
-
if (!
|
|
924
|
+
if (!Nr(a, e.header))
|
|
925
925
|
throw new S("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
926
926
|
const n = {
|
|
927
927
|
...a,
|
|
928
928
|
...e.header
|
|
929
|
-
}, o =
|
|
929
|
+
}, o = Vr(S, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
|
|
930
930
|
let s = !0;
|
|
931
931
|
if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
|
|
932
932
|
throw new S('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
933
933
|
const { alg: i } = n;
|
|
934
934
|
if (typeof i != "string" || !i)
|
|
935
935
|
throw new S('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
936
|
-
const u = r &&
|
|
936
|
+
const u = r && Jr("algorithms", r.algorithms);
|
|
937
937
|
if (u && !u.has(i))
|
|
938
938
|
throw new vr('"alg" (Algorithm) Header Parameter value not allowed');
|
|
939
939
|
if (s) {
|
|
@@ -942,16 +942,16 @@ async function zr(e, t, r) {
|
|
|
942
942
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
943
943
|
throw new S("JWS Payload must be a string or an Uint8Array instance");
|
|
944
944
|
let h = !1;
|
|
945
|
-
typeof t == "function" ? (t = await t(a, e), h = !0,
|
|
946
|
-
const p =
|
|
945
|
+
typeof t == "function" ? (t = await t(a, e), h = !0, mt(i, t, "verify"), he(t) && (t = await Wr(t, i))) : mt(i, t, "verify");
|
|
946
|
+
const p = Tr(we.encode(e.protected ?? ""), we.encode("."), typeof e.payload == "string" ? we.encode(e.payload) : e.payload);
|
|
947
947
|
let m;
|
|
948
948
|
try {
|
|
949
949
|
m = X(e.signature);
|
|
950
950
|
} catch {
|
|
951
951
|
throw new S("Failed to base64url decode the signature");
|
|
952
952
|
}
|
|
953
|
-
if (!await
|
|
954
|
-
throw new
|
|
953
|
+
if (!await zr(i, t, m, p))
|
|
954
|
+
throw new Ar();
|
|
955
955
|
let c;
|
|
956
956
|
if (s)
|
|
957
957
|
try {
|
|
@@ -963,17 +963,17 @@ async function zr(e, t, r) {
|
|
|
963
963
|
const d = { payload: c };
|
|
964
964
|
return e.protected !== void 0 && (d.protectedHeader = a), e.header !== void 0 && (d.unprotectedHeader = e.header), h ? { ...d, key: t } : d;
|
|
965
965
|
}
|
|
966
|
-
async function
|
|
966
|
+
async function qr(e, t, r) {
|
|
967
967
|
if (e instanceof Uint8Array && (e = be.decode(e)), typeof e != "string")
|
|
968
968
|
throw new S("Compact JWS must be a string or Uint8Array");
|
|
969
969
|
const { 0: a, 1: n, 2: o, length: s } = e.split(".");
|
|
970
970
|
if (s !== 3)
|
|
971
971
|
throw new S("Invalid Compact JWS");
|
|
972
|
-
const i = await
|
|
972
|
+
const i = await jr({ payload: n, protected: a, signature: o }, t, r), u = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
973
973
|
return typeof t == "function" ? { ...u, key: i.key } : u;
|
|
974
974
|
}
|
|
975
|
-
const
|
|
976
|
-
const t =
|
|
975
|
+
const Xr = (e) => Math.floor(e.getTime() / 1e3), Gt = 60, Vt = Gt * 60, tt = Vt * 24, Qr = tt * 7, Zr = tt * 365.25, ea = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, ht = (e) => {
|
|
976
|
+
const t = ea.exec(e);
|
|
977
977
|
if (!t || t[4] && t[1])
|
|
978
978
|
throw new TypeError("Invalid time period format");
|
|
979
979
|
const r = parseFloat(t[2]), a = t[3].toLowerCase();
|
|
@@ -991,56 +991,56 @@ const qr = (e) => Math.floor(e.getTime() / 1e3), Bt = 60, Gt = Bt * 60, Ze = Gt
|
|
|
991
991
|
case "min":
|
|
992
992
|
case "mins":
|
|
993
993
|
case "m":
|
|
994
|
-
n = Math.round(r *
|
|
994
|
+
n = Math.round(r * Gt);
|
|
995
995
|
break;
|
|
996
996
|
case "hour":
|
|
997
997
|
case "hours":
|
|
998
998
|
case "hr":
|
|
999
999
|
case "hrs":
|
|
1000
1000
|
case "h":
|
|
1001
|
-
n = Math.round(r *
|
|
1001
|
+
n = Math.round(r * Vt);
|
|
1002
1002
|
break;
|
|
1003
1003
|
case "day":
|
|
1004
1004
|
case "days":
|
|
1005
1005
|
case "d":
|
|
1006
|
-
n = Math.round(r *
|
|
1006
|
+
n = Math.round(r * tt);
|
|
1007
1007
|
break;
|
|
1008
1008
|
case "week":
|
|
1009
1009
|
case "weeks":
|
|
1010
1010
|
case "w":
|
|
1011
|
-
n = Math.round(r *
|
|
1011
|
+
n = Math.round(r * Qr);
|
|
1012
1012
|
break;
|
|
1013
1013
|
default:
|
|
1014
|
-
n = Math.round(r *
|
|
1014
|
+
n = Math.round(r * Zr);
|
|
1015
1015
|
break;
|
|
1016
1016
|
}
|
|
1017
1017
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
1018
|
-
},
|
|
1018
|
+
}, pt = (e) => e.toLowerCase().replace(/^application\//, ""), ta = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, ra = (e, t, r = {}) => {
|
|
1019
1019
|
let a;
|
|
1020
1020
|
try {
|
|
1021
1021
|
a = JSON.parse(be.decode(t));
|
|
1022
1022
|
} catch {
|
|
1023
1023
|
}
|
|
1024
1024
|
if (!me(a))
|
|
1025
|
-
throw new
|
|
1025
|
+
throw new F("JWT Claims Set must be a top-level JSON object");
|
|
1026
1026
|
const { typ: n } = r;
|
|
1027
|
-
if (n && (typeof e.typ != "string" ||
|
|
1028
|
-
throw new
|
|
1027
|
+
if (n && (typeof e.typ != "string" || pt(e.typ) !== pt(n)))
|
|
1028
|
+
throw new K('unexpected "typ" JWT header value', a, "typ", "check_failed");
|
|
1029
1029
|
const { requiredClaims: o = [], issuer: s, subject: i, audience: u, maxTokenAge: h } = r, p = [...o];
|
|
1030
1030
|
h !== void 0 && p.push("iat"), u !== void 0 && p.push("aud"), i !== void 0 && p.push("sub"), s !== void 0 && p.push("iss");
|
|
1031
1031
|
for (const y of new Set(p.reverse()))
|
|
1032
1032
|
if (!(y in a))
|
|
1033
|
-
throw new
|
|
1033
|
+
throw new K(`missing required "${y}" claim`, a, y, "missing");
|
|
1034
1034
|
if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
|
|
1035
|
-
throw new
|
|
1035
|
+
throw new K('unexpected "iss" claim value', a, "iss", "check_failed");
|
|
1036
1036
|
if (i && a.sub !== i)
|
|
1037
|
-
throw new
|
|
1038
|
-
if (u && !
|
|
1039
|
-
throw new
|
|
1037
|
+
throw new K('unexpected "sub" claim value', a, "sub", "check_failed");
|
|
1038
|
+
if (u && !ta(a.aud, typeof u == "string" ? [u] : u))
|
|
1039
|
+
throw new K('unexpected "aud" claim value', a, "aud", "check_failed");
|
|
1040
1040
|
let m;
|
|
1041
1041
|
switch (typeof r.clockTolerance) {
|
|
1042
1042
|
case "string":
|
|
1043
|
-
m =
|
|
1043
|
+
m = ht(r.clockTolerance);
|
|
1044
1044
|
break;
|
|
1045
1045
|
case "number":
|
|
1046
1046
|
m = r.clockTolerance;
|
|
@@ -1051,77 +1051,77 @@ const qr = (e) => Math.floor(e.getTime() / 1e3), Bt = 60, Gt = Bt * 60, Ze = Gt
|
|
|
1051
1051
|
default:
|
|
1052
1052
|
throw new TypeError("Invalid clockTolerance option type");
|
|
1053
1053
|
}
|
|
1054
|
-
const { currentDate: c } = r, d =
|
|
1054
|
+
const { currentDate: c } = r, d = Xr(c || /* @__PURE__ */ new Date());
|
|
1055
1055
|
if ((a.iat !== void 0 || h) && typeof a.iat != "number")
|
|
1056
|
-
throw new
|
|
1056
|
+
throw new K('"iat" claim must be a number', a, "iat", "invalid");
|
|
1057
1057
|
if (a.nbf !== void 0) {
|
|
1058
1058
|
if (typeof a.nbf != "number")
|
|
1059
|
-
throw new
|
|
1059
|
+
throw new K('"nbf" claim must be a number', a, "nbf", "invalid");
|
|
1060
1060
|
if (a.nbf > d + m)
|
|
1061
|
-
throw new
|
|
1061
|
+
throw new K('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
|
|
1062
1062
|
}
|
|
1063
1063
|
if (a.exp !== void 0) {
|
|
1064
1064
|
if (typeof a.exp != "number")
|
|
1065
|
-
throw new
|
|
1065
|
+
throw new K('"exp" claim must be a number', a, "exp", "invalid");
|
|
1066
1066
|
if (a.exp <= d - m)
|
|
1067
|
-
throw new
|
|
1067
|
+
throw new lt('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
|
1068
1068
|
}
|
|
1069
1069
|
if (h) {
|
|
1070
|
-
const y = d - a.iat, b = typeof h == "number" ? h :
|
|
1070
|
+
const y = d - a.iat, b = typeof h == "number" ? h : ht(h);
|
|
1071
1071
|
if (y - m > b)
|
|
1072
|
-
throw new
|
|
1072
|
+
throw new lt('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
|
1073
1073
|
if (y < 0 - m)
|
|
1074
|
-
throw new
|
|
1074
|
+
throw new K('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
|
|
1075
1075
|
}
|
|
1076
1076
|
return a;
|
|
1077
1077
|
};
|
|
1078
|
-
async function
|
|
1078
|
+
async function aa(e, t, r) {
|
|
1079
1079
|
var a;
|
|
1080
|
-
const n = await
|
|
1080
|
+
const n = await qr(e, t, r);
|
|
1081
1081
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
1082
|
-
throw new
|
|
1083
|
-
const o = { payload:
|
|
1082
|
+
throw new F("JWTs MUST NOT use unencoded payload");
|
|
1083
|
+
const o = { payload: ra(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
|
|
1084
1084
|
return typeof t == "function" ? { ...o, key: n.key } : o;
|
|
1085
1085
|
}
|
|
1086
|
-
const
|
|
1087
|
-
function
|
|
1086
|
+
const na = X;
|
|
1087
|
+
function oa(e) {
|
|
1088
1088
|
if (typeof e != "string")
|
|
1089
|
-
throw new
|
|
1089
|
+
throw new F("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1090
1090
|
const { 1: t, length: r } = e.split(".");
|
|
1091
1091
|
if (r === 5)
|
|
1092
|
-
throw new
|
|
1092
|
+
throw new F("Only JWTs using Compact JWS serialization can be decoded");
|
|
1093
1093
|
if (r !== 3)
|
|
1094
|
-
throw new
|
|
1094
|
+
throw new F("Invalid JWT");
|
|
1095
1095
|
if (!t)
|
|
1096
|
-
throw new
|
|
1096
|
+
throw new F("JWTs must contain a payload");
|
|
1097
1097
|
let a;
|
|
1098
1098
|
try {
|
|
1099
|
-
a =
|
|
1099
|
+
a = na(t);
|
|
1100
1100
|
} catch {
|
|
1101
|
-
throw new
|
|
1101
|
+
throw new F("Failed to base64url decode the payload");
|
|
1102
1102
|
}
|
|
1103
1103
|
let n;
|
|
1104
1104
|
try {
|
|
1105
1105
|
n = JSON.parse(be.decode(a));
|
|
1106
1106
|
} catch {
|
|
1107
|
-
throw new
|
|
1107
|
+
throw new F("Failed to parse the decoded payload as JSON");
|
|
1108
1108
|
}
|
|
1109
1109
|
if (!me(n))
|
|
1110
|
-
throw new
|
|
1110
|
+
throw new F("Invalid JWT Claims Set");
|
|
1111
1111
|
return n;
|
|
1112
1112
|
}
|
|
1113
1113
|
const fe = async (e) => {
|
|
1114
1114
|
try {
|
|
1115
|
-
const t = _.ALG, r = await
|
|
1116
|
-
return await
|
|
1115
|
+
const t = _.ALG, r = await Hr(wr, t);
|
|
1116
|
+
return await aa(e, r, {
|
|
1117
1117
|
issuer: _.ISSUER
|
|
1118
1118
|
});
|
|
1119
1119
|
} catch {
|
|
1120
1120
|
return;
|
|
1121
1121
|
}
|
|
1122
|
-
},
|
|
1122
|
+
}, sa = (e) => {
|
|
1123
1123
|
try {
|
|
1124
|
-
return
|
|
1124
|
+
return oa(e);
|
|
1125
1125
|
} catch {
|
|
1126
1126
|
return;
|
|
1127
1127
|
}
|
|
@@ -1129,64 +1129,64 @@ const fe = async (e) => {
|
|
|
1129
1129
|
var A = [];
|
|
1130
1130
|
for (var Ge = 0; Ge < 256; ++Ge)
|
|
1131
1131
|
A.push((Ge + 256).toString(16).slice(1));
|
|
1132
|
-
function
|
|
1132
|
+
function ia(e, t = 0) {
|
|
1133
1133
|
return (A[e[t + 0]] + A[e[t + 1]] + A[e[t + 2]] + A[e[t + 3]] + "-" + A[e[t + 4]] + A[e[t + 5]] + "-" + A[e[t + 6]] + A[e[t + 7]] + "-" + A[e[t + 8]] + A[e[t + 9]] + "-" + A[e[t + 10]] + A[e[t + 11]] + A[e[t + 12]] + A[e[t + 13]] + A[e[t + 14]] + A[e[t + 15]]).toLowerCase();
|
|
1134
1134
|
}
|
|
1135
|
-
var
|
|
1136
|
-
function
|
|
1137
|
-
if (!
|
|
1135
|
+
var Ie, ca = new Uint8Array(16);
|
|
1136
|
+
function la() {
|
|
1137
|
+
if (!Ie && (Ie = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Ie))
|
|
1138
1138
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1139
|
-
return
|
|
1139
|
+
return Ie(ca);
|
|
1140
1140
|
}
|
|
1141
|
-
var
|
|
1142
|
-
const
|
|
1143
|
-
randomUUID:
|
|
1141
|
+
var da = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1142
|
+
const gt = {
|
|
1143
|
+
randomUUID: da
|
|
1144
1144
|
};
|
|
1145
|
-
function
|
|
1146
|
-
if (
|
|
1147
|
-
return
|
|
1145
|
+
function ft(e, t, r) {
|
|
1146
|
+
if (gt.randomUUID && !t && !e)
|
|
1147
|
+
return gt.randomUUID();
|
|
1148
1148
|
e = e || {};
|
|
1149
|
-
var a = e.random || (e.rng ||
|
|
1150
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1149
|
+
var a = e.random || (e.rng || la)();
|
|
1150
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, ia(a);
|
|
1151
1151
|
}
|
|
1152
|
-
const
|
|
1152
|
+
const yt = globalThis.crypto, ua = (e) => `${ft()}${ft()}`.slice(0, e), ma = (e) => btoa(
|
|
1153
1153
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1154
1154
|
);
|
|
1155
|
-
async function
|
|
1156
|
-
if (!
|
|
1155
|
+
async function ha(e) {
|
|
1156
|
+
if (!yt.subtle)
|
|
1157
1157
|
throw new Error(
|
|
1158
1158
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1159
1159
|
);
|
|
1160
|
-
const t = new TextEncoder().encode(e), r = await
|
|
1161
|
-
return
|
|
1160
|
+
const t = new TextEncoder().encode(e), r = await yt.subtle.digest("SHA-256", t);
|
|
1161
|
+
return ma(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1162
1162
|
}
|
|
1163
|
-
async function
|
|
1164
|
-
const t =
|
|
1163
|
+
async function pa(e) {
|
|
1164
|
+
const t = ua(43), r = await ha(t);
|
|
1165
1165
|
return {
|
|
1166
1166
|
code_verifier: t,
|
|
1167
1167
|
code_challenge: r
|
|
1168
1168
|
};
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function Jt(e, t) {
|
|
1171
1171
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
1172
1172
|
}
|
|
1173
|
-
const
|
|
1173
|
+
const bt = (e, t) => {
|
|
1174
1174
|
const r = JSON.stringify(
|
|
1175
1175
|
typeof t == "function" ? t() : t
|
|
1176
1176
|
);
|
|
1177
|
-
window.localStorage.setItem(e, r),
|
|
1178
|
-
},
|
|
1179
|
-
window.localStorage.removeItem(e),
|
|
1180
|
-
},
|
|
1181
|
-
function
|
|
1177
|
+
window.localStorage.setItem(e, r), Jt(e, r);
|
|
1178
|
+
}, ga = (e) => {
|
|
1179
|
+
window.localStorage.removeItem(e), Jt(e, null);
|
|
1180
|
+
}, Et = (e) => window.localStorage.getItem(e), fa = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
1181
|
+
function ve({
|
|
1182
1182
|
key: e,
|
|
1183
1183
|
initialValue: t
|
|
1184
1184
|
}) {
|
|
1185
|
-
const r =
|
|
1185
|
+
const r = dr(fa, () => Et(e)), a = q(
|
|
1186
1186
|
(s) => {
|
|
1187
1187
|
try {
|
|
1188
1188
|
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
1189
|
-
i == null ?
|
|
1189
|
+
i == null ? ga(e) : bt(e, i);
|
|
1190
1190
|
} catch (i) {
|
|
1191
1191
|
console.warn(i);
|
|
1192
1192
|
}
|
|
@@ -1199,7 +1199,7 @@ function Ie({
|
|
|
1199
1199
|
}, [a]);
|
|
1200
1200
|
return Q(() => {
|
|
1201
1201
|
try {
|
|
1202
|
-
|
|
1202
|
+
Et(e) === null && typeof t < "u" && bt(e, t);
|
|
1203
1203
|
} catch (s) {
|
|
1204
1204
|
console.warn(s);
|
|
1205
1205
|
}
|
|
@@ -1208,30 +1208,30 @@ function Ie({
|
|
|
1208
1208
|
var k = [];
|
|
1209
1209
|
for (var Ve = 0; Ve < 256; ++Ve)
|
|
1210
1210
|
k.push((Ve + 256).toString(16).slice(1));
|
|
1211
|
-
function
|
|
1211
|
+
function ya(e, t = 0) {
|
|
1212
1212
|
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
1213
|
}
|
|
1214
|
-
var Ae,
|
|
1215
|
-
function
|
|
1214
|
+
var Ae, ba = new Uint8Array(16);
|
|
1215
|
+
function Ea() {
|
|
1216
1216
|
if (!Ae && (Ae = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Ae))
|
|
1217
1217
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1218
|
-
return Ae(
|
|
1218
|
+
return Ae(ba);
|
|
1219
1219
|
}
|
|
1220
|
-
var
|
|
1221
|
-
const
|
|
1222
|
-
randomUUID:
|
|
1220
|
+
var wa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1221
|
+
const wt = {
|
|
1222
|
+
randomUUID: wa
|
|
1223
1223
|
};
|
|
1224
1224
|
function Je(e, t, r) {
|
|
1225
|
-
if (
|
|
1226
|
-
return
|
|
1225
|
+
if (wt.randomUUID && !t && !e)
|
|
1226
|
+
return wt.randomUUID();
|
|
1227
1227
|
e = e || {};
|
|
1228
|
-
var a = e.random || (e.rng ||
|
|
1229
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1228
|
+
var a = e.random || (e.rng || Ea)();
|
|
1229
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, ya(a);
|
|
1230
1230
|
}
|
|
1231
|
-
const oe = "Your session has expired. For your security, please log in again to continue.",
|
|
1231
|
+
const oe = "Your session has expired. For your security, please log in again to continue.", Ta = "Your session has been successfully terminated.", Fe = "Login failed. Please try again.", Ia = "Error getting access token, please re-authenticate.", va = "You forgot to wrap your component in <AuthProvider>.", Pe = {
|
|
1232
1232
|
dev: "https://auth.gizmette.local.com:3003",
|
|
1233
1233
|
prod: "https://mylogin.gizmette.com/auth"
|
|
1234
|
-
}, ke = "@@auth@@", ge = "LOADING",
|
|
1234
|
+
}, ke = "@@auth@@", ge = "LOADING", Ne = "LOGIN", Ft = "LOGOUT", Ee = "success", B = "failure", Yt = "include", zt = "POST", jt = "application/json", Se = {
|
|
1235
1235
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1236
1236
|
$clientId: String!,
|
|
1237
1237
|
$username: String!,
|
|
@@ -1337,14 +1337,14 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1337
1337
|
}) => {
|
|
1338
1338
|
try {
|
|
1339
1339
|
const n = `Bearer ${e}`, o = await fetch(
|
|
1340
|
-
|
|
1340
|
+
qt ? `${Pe.dev}/graphql` : `${Pe.prod}/graphql`,
|
|
1341
1341
|
{
|
|
1342
1342
|
credentials: Yt,
|
|
1343
|
-
method:
|
|
1343
|
+
method: zt,
|
|
1344
1344
|
headers: {
|
|
1345
1345
|
authorization: n,
|
|
1346
|
-
"Content-Type":
|
|
1347
|
-
[
|
|
1346
|
+
"Content-Type": jt,
|
|
1347
|
+
[Dt.CLIENT_ID]: `${r}`
|
|
1348
1348
|
},
|
|
1349
1349
|
body: JSON.stringify({
|
|
1350
1350
|
query: t.schema,
|
|
@@ -1369,13 +1369,13 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1369
1369
|
}) => {
|
|
1370
1370
|
try {
|
|
1371
1371
|
const a = await fetch(
|
|
1372
|
-
|
|
1372
|
+
qt ? `${Pe.dev}/${e}` : `${Pe.prod}/${e}`,
|
|
1373
1373
|
{
|
|
1374
1374
|
credentials: Yt,
|
|
1375
|
-
method:
|
|
1375
|
+
method: zt,
|
|
1376
1376
|
headers: {
|
|
1377
|
-
"Content-Type":
|
|
1378
|
-
[
|
|
1377
|
+
"Content-Type": jt,
|
|
1378
|
+
[Dt.CLIENT_ID]: `${t}`
|
|
1379
1379
|
},
|
|
1380
1380
|
body: JSON.stringify(r)
|
|
1381
1381
|
}
|
|
@@ -1390,21 +1390,21 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1390
1390
|
} catch (a) {
|
|
1391
1391
|
return console.error(a), { status: B, data: [] };
|
|
1392
1392
|
}
|
|
1393
|
-
},
|
|
1393
|
+
}, Aa = process.env.NODE_ENV === "production", qt = !Aa, Xt = {
|
|
1394
1394
|
isLoading: !0,
|
|
1395
1395
|
isAuthenticated: !1,
|
|
1396
1396
|
user: void 0,
|
|
1397
1397
|
logoutReason: "",
|
|
1398
1398
|
debug: !1,
|
|
1399
1399
|
authenticationType: ""
|
|
1400
|
-
},
|
|
1400
|
+
}, ka = (e) => {
|
|
1401
1401
|
try {
|
|
1402
|
-
const t =
|
|
1402
|
+
const t = sa(e);
|
|
1403
1403
|
return t ? t[_.USER_ID_KEY] : "";
|
|
1404
1404
|
} catch {
|
|
1405
1405
|
return "";
|
|
1406
1406
|
}
|
|
1407
|
-
},
|
|
1407
|
+
}, Sa = async ({
|
|
1408
1408
|
userId: e,
|
|
1409
1409
|
clientId: t,
|
|
1410
1410
|
domain: r,
|
|
@@ -1428,7 +1428,7 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1428
1428
|
status: B
|
|
1429
1429
|
};
|
|
1430
1430
|
}
|
|
1431
|
-
},
|
|
1431
|
+
}, _a = async ({
|
|
1432
1432
|
username: e,
|
|
1433
1433
|
password: t,
|
|
1434
1434
|
clientId: r,
|
|
@@ -1472,7 +1472,7 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1472
1472
|
status: !1
|
|
1473
1473
|
};
|
|
1474
1474
|
}
|
|
1475
|
-
},
|
|
1475
|
+
}, Na = async ({
|
|
1476
1476
|
nonce: e,
|
|
1477
1477
|
clientId: t,
|
|
1478
1478
|
code_challenge: r
|
|
@@ -1537,7 +1537,7 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1537
1537
|
};
|
|
1538
1538
|
}
|
|
1539
1539
|
};
|
|
1540
|
-
class
|
|
1540
|
+
class xa {
|
|
1541
1541
|
constructor(t = null, r = null) {
|
|
1542
1542
|
He(this, "refreshTokenPromise", null), He(this, "accessToken"), He(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1543
1543
|
}
|
|
@@ -1588,14 +1588,14 @@ class Na {
|
|
|
1588
1588
|
};
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
|
-
const
|
|
1591
|
+
const Ca = (e) => q(
|
|
1592
1592
|
(...t) => {
|
|
1593
1593
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1594
1594
|
},
|
|
1595
1595
|
[e]
|
|
1596
1596
|
), ce = () => {
|
|
1597
1597
|
throw new Error(va);
|
|
1598
|
-
},
|
|
1598
|
+
}, Qt = lr({
|
|
1599
1599
|
isAuthenticated: !1,
|
|
1600
1600
|
isLoading: !1,
|
|
1601
1601
|
login: ce,
|
|
@@ -1606,53 +1606,53 @@ const xa = (e) => q(
|
|
|
1606
1606
|
loginWithPasskey: ce,
|
|
1607
1607
|
logoutReason: "",
|
|
1608
1608
|
authenticationType: ""
|
|
1609
|
-
}),
|
|
1610
|
-
state:
|
|
1609
|
+
}), Oa = O.createContext({
|
|
1610
|
+
state: Xt,
|
|
1611
1611
|
dispatch: () => {
|
|
1612
1612
|
}
|
|
1613
|
-
}),
|
|
1613
|
+
}), Pa = (e, t) => (t == null ? void 0 : t.type) === ge ? {
|
|
1614
1614
|
...e,
|
|
1615
1615
|
isLoading: t.payload.isLoading
|
|
1616
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1616
|
+
} : (t == null ? void 0 : t.type) === Ne ? {
|
|
1617
1617
|
...e,
|
|
1618
1618
|
isLoading: !1,
|
|
1619
1619
|
isAuthenticated: !0,
|
|
1620
1620
|
user: t.payload.user,
|
|
1621
1621
|
authenticationType: t.payload.authenticationType,
|
|
1622
1622
|
logoutReason: ""
|
|
1623
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1623
|
+
} : (t == null ? void 0 : t.type) === Ft ? {
|
|
1624
1624
|
...e,
|
|
1625
1625
|
isLoading: !1,
|
|
1626
1626
|
isAuthenticated: !1,
|
|
1627
1627
|
user: void 0,
|
|
1628
1628
|
authenticationType: "",
|
|
1629
1629
|
logoutReason: t.payload.logoutReason
|
|
1630
|
-
} : e,
|
|
1630
|
+
} : e, Da = ({
|
|
1631
1631
|
children: e,
|
|
1632
1632
|
sessionExpiration: t,
|
|
1633
1633
|
clientId: r,
|
|
1634
1634
|
domain: a = "",
|
|
1635
1635
|
debug: n = !1
|
|
1636
1636
|
}) => {
|
|
1637
|
-
const [o, s] =
|
|
1638
|
-
...
|
|
1637
|
+
const [o, s] = kt(Pa, {
|
|
1638
|
+
...Xt,
|
|
1639
1639
|
debug: n
|
|
1640
|
-
}), i =
|
|
1640
|
+
}), i = Ca(n), u = L(!1), [h, p, , m] = ve({
|
|
1641
1641
|
key: `${ke}::${r}::@@user@@`
|
|
1642
|
-
}), [c, d, , y] =
|
|
1642
|
+
}), [c, d, , y] = ve({
|
|
1643
1643
|
key: `${ke}::${r}::@@access@@`
|
|
1644
|
-
}), [b,
|
|
1644
|
+
}), [b, v, , w] = ve(
|
|
1645
1645
|
{
|
|
1646
1646
|
key: `${ke}::${r}::@@refresh@@`
|
|
1647
1647
|
}
|
|
1648
|
-
), [C,
|
|
1648
|
+
), [C, D, , M] = ve({
|
|
1649
1649
|
key: `${ke}::${r}::@@nonce@@`
|
|
1650
|
-
}), Z = new
|
|
1651
|
-
i("removeLocalStorage: removing local storage"), m(), y(), w(),
|
|
1650
|
+
}), Z = new xa(c, b), N = q(() => {
|
|
1651
|
+
i("removeLocalStorage: removing local storage"), m(), y(), w(), M();
|
|
1652
1652
|
}, [
|
|
1653
1653
|
y,
|
|
1654
1654
|
m,
|
|
1655
|
-
|
|
1655
|
+
M,
|
|
1656
1656
|
w,
|
|
1657
1657
|
i
|
|
1658
1658
|
]), G = q(
|
|
@@ -1661,20 +1661,20 @@ const xa = (e) => q(
|
|
|
1661
1661
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1662
1662
|
g
|
|
1663
1663
|
), s({
|
|
1664
|
-
type:
|
|
1664
|
+
type: Ft,
|
|
1665
1665
|
payload: {
|
|
1666
1666
|
logoutReason: g || oe
|
|
1667
1667
|
}
|
|
1668
|
-
}),
|
|
1668
|
+
}), N(), s({ type: ge, payload: { isLoading: !1 } });
|
|
1669
1669
|
},
|
|
1670
|
-
[
|
|
1671
|
-
),
|
|
1670
|
+
[N, i]
|
|
1671
|
+
), P = q(
|
|
1672
1672
|
async (g) => {
|
|
1673
1673
|
i("invalidateAndLogout: invalidating and logging out");
|
|
1674
|
-
const { user: T } = o, E = (T == null ? void 0 : T.userId) ||
|
|
1674
|
+
const { user: T } = o, E = (T == null ? void 0 : T.userId) || ka(h);
|
|
1675
1675
|
E || i(
|
|
1676
1676
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1677
|
-
), await
|
|
1677
|
+
), await Sa({
|
|
1678
1678
|
userId: E,
|
|
1679
1679
|
clientId: r,
|
|
1680
1680
|
domain: a,
|
|
@@ -1689,7 +1689,7 @@ const xa = (e) => q(
|
|
|
1689
1689
|
try {
|
|
1690
1690
|
const g = await fe(h);
|
|
1691
1691
|
g && g.payload[_.USER_ID_KEY] !== "" ? (i("useEffect: setting the authentication state"), s({
|
|
1692
|
-
type:
|
|
1692
|
+
type: Ne,
|
|
1693
1693
|
payload: {
|
|
1694
1694
|
authenticationType: g.payload[_.AUTH_TYPE_KEY],
|
|
1695
1695
|
user: {
|
|
@@ -1698,40 +1698,40 @@ const xa = (e) => q(
|
|
|
1698
1698
|
email: g.payload[_.EMAIL_KEY]
|
|
1699
1699
|
}
|
|
1700
1700
|
}
|
|
1701
|
-
})) : (i("useEffect: invalid JWT, invalidating and logging out"), await
|
|
1701
|
+
})) : (i("useEffect: invalid JWT, invalidating and logging out"), await P(oe));
|
|
1702
1702
|
} catch {
|
|
1703
1703
|
i(
|
|
1704
1704
|
"useEffect: exception validating JWT, invalidating and logging out"
|
|
1705
|
-
), await
|
|
1705
|
+
), await P(oe);
|
|
1706
1706
|
}
|
|
1707
1707
|
})() : (i("useEffect: setting the loading state to false"), s({ type: ge, payload: { isLoading: !1 } })), () => {
|
|
1708
1708
|
u.current = !0;
|
|
1709
1709
|
};
|
|
1710
|
-
}, [o.isLoading, h,
|
|
1710
|
+
}, [o.isLoading, h, P, i]);
|
|
1711
1711
|
const V = async (g, T) => {
|
|
1712
|
-
s({ type: ge, payload: { isLoading: !0 } }),
|
|
1712
|
+
s({ type: ge, payload: { isLoading: !0 } }), N();
|
|
1713
1713
|
const E = Je();
|
|
1714
|
-
|
|
1715
|
-
const { code_verifier:
|
|
1714
|
+
D(E), i("login: Logging in with password");
|
|
1715
|
+
const { code_verifier: Y, code_challenge: cr } = await pa(), it = await Na({
|
|
1716
1716
|
nonce: E,
|
|
1717
1717
|
clientId: r,
|
|
1718
|
-
code_challenge:
|
|
1718
|
+
code_challenge: cr
|
|
1719
1719
|
});
|
|
1720
|
-
if (
|
|
1721
|
-
const re = await
|
|
1720
|
+
if (it.status) {
|
|
1721
|
+
const re = await _a({
|
|
1722
1722
|
username: g,
|
|
1723
1723
|
password: T,
|
|
1724
1724
|
clientId: r,
|
|
1725
1725
|
sessionExpiration: t,
|
|
1726
1726
|
nonce: E,
|
|
1727
1727
|
type: ue.CODE,
|
|
1728
|
-
code:
|
|
1729
|
-
code_verifier:
|
|
1728
|
+
code: it.data,
|
|
1729
|
+
code_verifier: Y,
|
|
1730
1730
|
domain: a,
|
|
1731
1731
|
ua: navigator.userAgent
|
|
1732
1732
|
});
|
|
1733
|
-
return re.status ? (p(re.idToken), d(re.accessToken),
|
|
1734
|
-
type:
|
|
1733
|
+
return re.status ? (p(re.idToken), d(re.accessToken), v(re.refreshToken), s({
|
|
1734
|
+
type: Ne,
|
|
1735
1735
|
payload: {
|
|
1736
1736
|
authenticationType: ue.CODE,
|
|
1737
1737
|
user: {
|
|
@@ -1740,19 +1740,19 @@ const xa = (e) => q(
|
|
|
1740
1740
|
email: re.email
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
|
-
}), !0) : (G(
|
|
1743
|
+
}), !0) : (G(Fe), !1);
|
|
1744
1744
|
}
|
|
1745
1745
|
return !1;
|
|
1746
1746
|
}, pe = async (g) => {
|
|
1747
|
-
g == null || g.preventDefault(), await
|
|
1747
|
+
g == null || g.preventDefault(), await P(Ta);
|
|
1748
1748
|
}, ee = async () => {
|
|
1749
1749
|
const { isAuthenticated: g, user: T } = o;
|
|
1750
1750
|
try {
|
|
1751
1751
|
if (g && T && T.userId) {
|
|
1752
1752
|
if (c) {
|
|
1753
1753
|
i("getAccessToken");
|
|
1754
|
-
const
|
|
1755
|
-
if (
|
|
1754
|
+
const Y = await fe(c);
|
|
1755
|
+
if (Y && Y.payload[_.USER_ID_KEY] !== "")
|
|
1756
1756
|
return c;
|
|
1757
1757
|
}
|
|
1758
1758
|
i("getAccessToken: invalid access token, trying to refresh it");
|
|
@@ -1762,19 +1762,19 @@ const xa = (e) => q(
|
|
|
1762
1762
|
nonce: C,
|
|
1763
1763
|
domain: a
|
|
1764
1764
|
});
|
|
1765
|
-
return E.status && E.status === "success" && E.newAccessToken ? (d(E.newAccessToken),
|
|
1765
|
+
return E.status && E.status === "success" && E.newAccessToken ? (d(E.newAccessToken), v(E.newRefreshToken), E.newAccessToken) : (i(
|
|
1766
1766
|
"getAccessToken: invalid refresh token, need to re-authenticate"
|
|
1767
|
-
), await
|
|
1767
|
+
), await P(oe), "");
|
|
1768
1768
|
}
|
|
1769
1769
|
return i(
|
|
1770
1770
|
"getAccessToken: user is not authenticated, cannot get access token"
|
|
1771
|
-
), await
|
|
1771
|
+
), await P(oe), "";
|
|
1772
1772
|
} catch {
|
|
1773
1773
|
return i(
|
|
1774
1774
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1775
|
-
), await
|
|
1775
|
+
), await P(Ia), "";
|
|
1776
1776
|
}
|
|
1777
|
-
},
|
|
1777
|
+
}, R = () => o.isAuthenticated && h ? h : "", $ = async () => {
|
|
1778
1778
|
const { user: g } = o;
|
|
1779
1779
|
let T = await ie({
|
|
1780
1780
|
accessToken: c,
|
|
@@ -1788,7 +1788,7 @@ const xa = (e) => q(
|
|
|
1788
1788
|
});
|
|
1789
1789
|
if (T.status)
|
|
1790
1790
|
try {
|
|
1791
|
-
const E = await
|
|
1791
|
+
const E = await fr(T.data);
|
|
1792
1792
|
return T = await ie({
|
|
1793
1793
|
accessToken: c,
|
|
1794
1794
|
clientId: r,
|
|
@@ -1814,10 +1814,10 @@ const xa = (e) => q(
|
|
|
1814
1814
|
}), !1;
|
|
1815
1815
|
}
|
|
1816
1816
|
return !1;
|
|
1817
|
-
},
|
|
1818
|
-
s({ type: ge, payload: { isLoading: !0 } }),
|
|
1817
|
+
}, U = async () => {
|
|
1818
|
+
s({ type: ge, payload: { isLoading: !0 } }), N();
|
|
1819
1819
|
const g = Je();
|
|
1820
|
-
|
|
1820
|
+
D(g), i("loginWithPasskey");
|
|
1821
1821
|
const T = Je();
|
|
1822
1822
|
let E = await ie({
|
|
1823
1823
|
accessToken: c,
|
|
@@ -1830,7 +1830,7 @@ const xa = (e) => q(
|
|
|
1830
1830
|
});
|
|
1831
1831
|
if (E.status)
|
|
1832
1832
|
try {
|
|
1833
|
-
const
|
|
1833
|
+
const Y = await Er(E.data);
|
|
1834
1834
|
return E = await ie({
|
|
1835
1835
|
accessToken: c,
|
|
1836
1836
|
clientId: r,
|
|
@@ -1838,14 +1838,14 @@ const xa = (e) => q(
|
|
|
1838
1838
|
params: {
|
|
1839
1839
|
clientId: r,
|
|
1840
1840
|
id: T,
|
|
1841
|
-
authentication:
|
|
1841
|
+
authentication: Y,
|
|
1842
1842
|
nonce: g,
|
|
1843
1843
|
domain: a,
|
|
1844
1844
|
sessionExpiration: t,
|
|
1845
1845
|
ua: navigator.userAgent
|
|
1846
1846
|
}
|
|
1847
|
-
}), E.data.status === Ee ? (p(E.data.idToken), d(E.data.accessToken),
|
|
1848
|
-
type:
|
|
1847
|
+
}), E.data.status === Ee ? (p(E.data.idToken), d(E.data.accessToken), v(E.data.refreshToken), s({
|
|
1848
|
+
type: Ne,
|
|
1849
1849
|
payload: {
|
|
1850
1850
|
authenticationType: ue.PASSKEY,
|
|
1851
1851
|
user: {
|
|
@@ -1854,7 +1854,7 @@ const xa = (e) => q(
|
|
|
1854
1854
|
email: E.data.email
|
|
1855
1855
|
}
|
|
1856
1856
|
}
|
|
1857
|
-
}), !0) : (G(
|
|
1857
|
+
}), !0) : (G(Fe), !1);
|
|
1858
1858
|
} catch {
|
|
1859
1859
|
return await ie({
|
|
1860
1860
|
accessToken: c,
|
|
@@ -1868,52 +1868,52 @@ const xa = (e) => q(
|
|
|
1868
1868
|
domain: a,
|
|
1869
1869
|
sessionExpiration: t
|
|
1870
1870
|
}
|
|
1871
|
-
}), G(
|
|
1871
|
+
}), G(Fe), !1;
|
|
1872
1872
|
}
|
|
1873
1873
|
return !1;
|
|
1874
1874
|
};
|
|
1875
|
-
return /* @__PURE__ */ l(
|
|
1876
|
-
|
|
1875
|
+
return /* @__PURE__ */ l(Oa.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ l(
|
|
1876
|
+
Qt.Provider,
|
|
1877
1877
|
{
|
|
1878
1878
|
value: {
|
|
1879
1879
|
...o,
|
|
1880
1880
|
login: V,
|
|
1881
1881
|
logout: pe,
|
|
1882
1882
|
getAccessToken: ee,
|
|
1883
|
-
getIdToken:
|
|
1884
|
-
registeringForPasskey:
|
|
1885
|
-
loginWithPasskey:
|
|
1883
|
+
getIdToken: R,
|
|
1884
|
+
registeringForPasskey: $,
|
|
1885
|
+
loginWithPasskey: U
|
|
1886
1886
|
},
|
|
1887
1887
|
children: e
|
|
1888
1888
|
}
|
|
1889
1889
|
) });
|
|
1890
|
-
},
|
|
1890
|
+
}, rt = (e = Qt) => Ze(e), po = "user", go = "assistant", fo = "system", yo = "internal", bo = "hidden", Eo = "I'm having trouble right now. Please try again later.", Ye = "OpenAI", wo = "OpenAI", To = "Anthropic", Io = 128e3, vo = "action-message", Ao = "action-reset", ko = "action-model", So = "action-restore", _o = "action-streaming", No = "action-engine", Ro = "action-search", xo = "action-sort", Co = "action-toggle-tag", Oo = "action-reset-tags", ze = {
|
|
1891
1891
|
SUMMARIZE_ARTICLE: "summarize-article",
|
|
1892
1892
|
PROOFREAD_CONTENT: "proofread-content",
|
|
1893
1893
|
REPHRASE_CONTENT: "rephrase-content"
|
|
1894
|
-
},
|
|
1895
|
-
[
|
|
1894
|
+
}, Po = {
|
|
1895
|
+
[ze.SUMMARIZE_ARTICLE]: {
|
|
1896
1896
|
label: "Summarize...",
|
|
1897
1897
|
content: "Summarize this article: "
|
|
1898
1898
|
},
|
|
1899
|
-
[
|
|
1899
|
+
[ze.PROOFREAD_CONTENT]: {
|
|
1900
1900
|
label: "Proofread...",
|
|
1901
1901
|
content: "Proofread this: "
|
|
1902
1902
|
},
|
|
1903
|
-
[
|
|
1904
|
-
},
|
|
1905
|
-
function
|
|
1903
|
+
[ze.REPHRASE_CONTENT]: { label: "Rephrase...", content: "Rephrase this: " }
|
|
1904
|
+
}, Do = "sassy-saint-", $o = "details", Lo = "search", Mo = "sort", Uo = "summarize-article", Ko = "proofread-content", Ho = "rephrase-content", Wo = "==stats==", $a = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Tt = (e) => Number.isFinite(e) ? e : 0;
|
|
1905
|
+
function La(e) {
|
|
1906
1906
|
return {
|
|
1907
1907
|
days: Math.trunc(e / 864e5),
|
|
1908
1908
|
hours: Math.trunc(e / 36e5 % 24),
|
|
1909
1909
|
minutes: Math.trunc(e / 6e4 % 60),
|
|
1910
1910
|
seconds: Math.trunc(e / 1e3 % 60),
|
|
1911
1911
|
milliseconds: Math.trunc(e % 1e3),
|
|
1912
|
-
microseconds: Math.trunc(
|
|
1913
|
-
nanoseconds: Math.trunc(
|
|
1912
|
+
microseconds: Math.trunc(Tt(e * 1e3) % 1e3),
|
|
1913
|
+
nanoseconds: Math.trunc(Tt(e * 1e6) % 1e3)
|
|
1914
1914
|
};
|
|
1915
1915
|
}
|
|
1916
|
-
function
|
|
1916
|
+
function Ma(e) {
|
|
1917
1917
|
return {
|
|
1918
1918
|
days: e / 86400000n,
|
|
1919
1919
|
hours: e / 3600000n % 24n,
|
|
@@ -1924,20 +1924,20 @@ function La(e) {
|
|
|
1924
1924
|
nanoseconds: 0n
|
|
1925
1925
|
};
|
|
1926
1926
|
}
|
|
1927
|
-
function
|
|
1927
|
+
function Ua(e) {
|
|
1928
1928
|
switch (typeof e) {
|
|
1929
1929
|
case "number": {
|
|
1930
1930
|
if (Number.isFinite(e))
|
|
1931
|
-
return
|
|
1931
|
+
return La(e);
|
|
1932
1932
|
break;
|
|
1933
1933
|
}
|
|
1934
1934
|
case "bigint":
|
|
1935
|
-
return
|
|
1935
|
+
return Ma(e);
|
|
1936
1936
|
}
|
|
1937
1937
|
throw new TypeError("Expected a finite number or bigint");
|
|
1938
1938
|
}
|
|
1939
|
-
const
|
|
1940
|
-
function
|
|
1939
|
+
const Ka = (e) => e === 0 || e === 0n, Ha = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Wa = 1e-7, Ba = 24n * 60n * 60n * 1000n;
|
|
1940
|
+
function Ga(e, t) {
|
|
1941
1941
|
const r = typeof e == "bigint";
|
|
1942
1942
|
if (!r && !Number.isFinite(e))
|
|
1943
1943
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -1946,24 +1946,24 @@ function Ba(e, t) {
|
|
|
1946
1946
|
e = e < 0 ? -e : e, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
|
|
1947
1947
|
let n = [];
|
|
1948
1948
|
const o = (p, m) => {
|
|
1949
|
-
const c = Math.floor(p * 10 ** m +
|
|
1949
|
+
const c = Math.floor(p * 10 ** m + Wa);
|
|
1950
1950
|
return (Math.round(c) / 10 ** m).toFixed(m);
|
|
1951
1951
|
}, s = (p, m, c, d) => {
|
|
1952
|
-
if (!((n.length === 0 || !t.colonNotation) &&
|
|
1952
|
+
if (!((n.length === 0 || !t.colonNotation) && Ka(p) && !(t.colonNotation && c === "m"))) {
|
|
1953
1953
|
if (d ?? (d = String(p)), t.colonNotation) {
|
|
1954
1954
|
const y = d.includes(".") ? d.split(".")[0].length : d.length, b = n.length > 0 ? 2 : 1;
|
|
1955
1955
|
d = "0".repeat(Math.max(0, b - y)) + d;
|
|
1956
1956
|
} else
|
|
1957
|
-
d += t.verbose ? " " +
|
|
1957
|
+
d += t.verbose ? " " + Ha(m, p) : c;
|
|
1958
1958
|
n.push(d);
|
|
1959
1959
|
}
|
|
1960
|
-
}, i =
|
|
1960
|
+
}, i = Ua(e), u = BigInt(i.days);
|
|
1961
1961
|
if (s(u / 365n, "year", "y"), s(u % 365n, "day", "d"), s(Number(i.hours), "hour", "h"), s(Number(i.minutes), "minute", "m"), t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1962
1962
|
const p = Number(i.seconds), m = Number(i.milliseconds), c = Number(i.microseconds), d = Number(i.nanoseconds);
|
|
1963
1963
|
if (s(p, "second", "s"), t.formatSubMilliseconds)
|
|
1964
1964
|
s(m, "millisecond", "ms"), s(c, "microsecond", "µs"), s(d, "nanosecond", "ns");
|
|
1965
1965
|
else {
|
|
1966
|
-
const y = m + c / 1e3 + d / 1e6, b = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0,
|
|
1966
|
+
const y = m + c / 1e3 + d / 1e6, b = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, v = y >= 1 ? Math.round(y) : Math.ceil(y), w = b ? y.toFixed(b) : v;
|
|
1967
1967
|
s(
|
|
1968
1968
|
Number.parseFloat(w),
|
|
1969
1969
|
"millisecond",
|
|
@@ -1972,7 +1972,7 @@ function Ba(e, t) {
|
|
|
1972
1972
|
);
|
|
1973
1973
|
}
|
|
1974
1974
|
} else {
|
|
1975
|
-
const p = (r ? Number(e %
|
|
1975
|
+
const p = (r ? Number(e % Ba) : e) / 1e3 % 60, m = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, c = o(p, m), d = t.keepDecimalsOnWholeSeconds ? c : c.replace(/\.0+$/, "");
|
|
1976
1976
|
s(Number.parseFloat(d), "second", "s", d);
|
|
1977
1977
|
}
|
|
1978
1978
|
if (n.length === 0)
|
|
@@ -1980,7 +1980,7 @@ function Ba(e, t) {
|
|
|
1980
1980
|
const h = t.colonNotation ? ":" : " ";
|
|
1981
1981
|
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(h);
|
|
1982
1982
|
}
|
|
1983
|
-
const
|
|
1983
|
+
const Va = process.env.NODE_ENV === "production", at = !Va, Ja = at ? "gizmette.local.com" : "gizmette.com", Bo = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, Go = async () => {
|
|
1984
1984
|
const e = {
|
|
1985
1985
|
/**
|
|
1986
1986
|
* A boolean value that indicates the application would
|
|
@@ -2029,11 +2029,11 @@ const Ga = process.env.NODE_ENV === "production", tt = !Ga, Va = tt ? "gizmette.
|
|
|
2029
2029
|
e
|
|
2030
2030
|
);
|
|
2031
2031
|
});
|
|
2032
|
-
},
|
|
2032
|
+
}, Vo = (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: [
|
|
2033
2033
|
/* @__PURE__ */ l("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2034
2034
|
/* @__PURE__ */ l("dd", { className: "my-1 inline-block", children: t[r] })
|
|
2035
2035
|
] }) }, `${e}-${r}`)) : null;
|
|
2036
|
-
function
|
|
2036
|
+
function Jo({
|
|
2037
2037
|
data: e,
|
|
2038
2038
|
formatter: t = (r) => r
|
|
2039
2039
|
}) {
|
|
@@ -2045,18 +2045,18 @@ function Wo({
|
|
|
2045
2045
|
);
|
|
2046
2046
|
return t(a ? a / r.length : 0);
|
|
2047
2047
|
}
|
|
2048
|
-
const
|
|
2048
|
+
const Fo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Yo = new Intl.NumberFormat("en", {
|
|
2049
2049
|
style: "decimal",
|
|
2050
2050
|
signDisplay: "never",
|
|
2051
2051
|
minimumFractionDigits: 0,
|
|
2052
2052
|
maximumFractionDigits: 0
|
|
2053
|
-
}),
|
|
2053
|
+
}), zo = (e) => e > 0 ? Ga(e, {
|
|
2054
2054
|
secondsDecimalDigits: 2,
|
|
2055
2055
|
unitCount: 2
|
|
2056
|
-
}) : "N/A",
|
|
2056
|
+
}) : "N/A", Fa = (e) => f(
|
|
2057
2057
|
"flex-1 space-y-6 overflow-y-auto rounded-md bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
|
|
2058
|
-
e ||
|
|
2059
|
-
),
|
|
2058
|
+
e || at ? "pt-4" : "pt-10"
|
|
2059
|
+
), jo = (e, t) => t === 1 ? e : `${e}s`, It = "av-button", Ya = (e) => {
|
|
2060
2060
|
let t = "";
|
|
2061
2061
|
if (typeof e == "number" || typeof e == "string")
|
|
2062
2062
|
t = "m-" + e;
|
|
@@ -2065,7 +2065,7 @@ const Bo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2065
2065
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
2066
2066
|
}
|
|
2067
2067
|
return t;
|
|
2068
|
-
},
|
|
2068
|
+
}, nt = "icon", Zt = "button", za = "link", ja = ({
|
|
2069
2069
|
type: e,
|
|
2070
2070
|
size: t,
|
|
2071
2071
|
labelRight: r,
|
|
@@ -2074,19 +2074,19 @@ const Bo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2074
2074
|
}) => {
|
|
2075
2075
|
const o = "text-sm font-medium max-h-8 py-0", s = "text-base font-medium max-h-9 py-1", i = "text-lg font-medium max-h-12 py-2";
|
|
2076
2076
|
switch (e) {
|
|
2077
|
-
case
|
|
2077
|
+
case Zt:
|
|
2078
2078
|
return f("px-4", {
|
|
2079
2079
|
[o]: t === "small",
|
|
2080
2080
|
[s]: t === "medium",
|
|
2081
2081
|
[i]: t === "large"
|
|
2082
2082
|
});
|
|
2083
|
-
case
|
|
2083
|
+
case za:
|
|
2084
2084
|
return f("px-4 text-center", {
|
|
2085
2085
|
[o]: t === "small",
|
|
2086
2086
|
[s]: t === "medium",
|
|
2087
2087
|
[i]: t === "large"
|
|
2088
2088
|
});
|
|
2089
|
-
case
|
|
2089
|
+
case nt:
|
|
2090
2090
|
return f("inline-flex items-center", {
|
|
2091
2091
|
"justify-center": n === "center",
|
|
2092
2092
|
"justify-start": n === "left",
|
|
@@ -2099,7 +2099,7 @@ const Bo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2099
2099
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
2100
2100
|
});
|
|
2101
2101
|
}
|
|
2102
|
-
},
|
|
2102
|
+
}, qa = ({
|
|
2103
2103
|
mode: e,
|
|
2104
2104
|
noBackground: t,
|
|
2105
2105
|
noTruncate: r,
|
|
@@ -2131,7 +2131,7 @@ const Bo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2131
2131
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
2132
2132
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
2133
2133
|
});
|
|
2134
|
-
},
|
|
2134
|
+
}, Xa = ({
|
|
2135
2135
|
mode: e,
|
|
2136
2136
|
disabled: t,
|
|
2137
2137
|
variant: r
|
|
@@ -2159,7 +2159,7 @@ const Bo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2159
2159
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
2160
2160
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
2161
2161
|
});
|
|
2162
|
-
},
|
|
2162
|
+
}, Qa = ({
|
|
2163
2163
|
mode: e,
|
|
2164
2164
|
disabled: t,
|
|
2165
2165
|
variant: r
|
|
@@ -2187,7 +2187,7 @@ const Bo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2187
2187
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
2188
2188
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
2189
2189
|
});
|
|
2190
|
-
},
|
|
2190
|
+
}, Za = ({
|
|
2191
2191
|
mode: e,
|
|
2192
2192
|
noBorder: t,
|
|
2193
2193
|
variant: r
|
|
@@ -2215,12 +2215,12 @@ const Bo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2215
2215
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
2216
2216
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
2217
2217
|
});
|
|
2218
|
-
},
|
|
2218
|
+
}, en = ({ focusMode: e }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2219
2219
|
"focus:outline-focus-dark": e === "dark",
|
|
2220
2220
|
"focus:outline-focus-light": e === "light",
|
|
2221
2221
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2222
2222
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2223
|
-
}),
|
|
2223
|
+
}), ot = ({
|
|
2224
2224
|
type: e,
|
|
2225
2225
|
className: t,
|
|
2226
2226
|
raw: r,
|
|
@@ -2237,38 +2237,38 @@ const Bo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2237
2237
|
variant: d,
|
|
2238
2238
|
noTruncate: y,
|
|
2239
2239
|
align: b
|
|
2240
|
-
}) => (d || (d = "primary"), r ? f(
|
|
2241
|
-
|
|
2240
|
+
}) => (d || (d = "primary"), r ? f(It, t) : f(
|
|
2241
|
+
It,
|
|
2242
2242
|
t,
|
|
2243
2243
|
Ya(m),
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
qa({ mode: a, variant: d, disabled: o }),
|
|
2244
|
+
qa({ mode: a, variant: d, noBackground: c, noTruncate: y }),
|
|
2245
|
+
ja({ type: e, size: i, labelRight: h, labelLeft: p, align: b }),
|
|
2246
|
+
Za({ mode: a, variant: d, noBorder: u }),
|
|
2247
|
+
en({ focusMode: n }),
|
|
2249
2248
|
Xa({ mode: a, variant: d, disabled: o }),
|
|
2249
|
+
Qa({ mode: a, variant: d, disabled: o }),
|
|
2250
2250
|
{
|
|
2251
2251
|
"w-full": s,
|
|
2252
2252
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
2253
2253
|
}
|
|
2254
|
-
)),
|
|
2254
|
+
)), tn = (e, t, r) => {
|
|
2255
2255
|
var a;
|
|
2256
2256
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
2257
|
-
}, Ue =
|
|
2257
|
+
}, Ue = O.forwardRef((e, t) => {
|
|
2258
2258
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
2259
2259
|
return /* @__PURE__ */ l(
|
|
2260
2260
|
"button",
|
|
2261
2261
|
{
|
|
2262
2262
|
ref: t,
|
|
2263
2263
|
onClick: (o) => {
|
|
2264
|
-
|
|
2264
|
+
tn(o, a, r);
|
|
2265
2265
|
},
|
|
2266
2266
|
...n
|
|
2267
2267
|
}
|
|
2268
2268
|
);
|
|
2269
2269
|
});
|
|
2270
2270
|
Ue.displayName = "BaseButton";
|
|
2271
|
-
const
|
|
2271
|
+
const er = O.forwardRef(
|
|
2272
2272
|
({
|
|
2273
2273
|
children: e,
|
|
2274
2274
|
disabled: t = !1,
|
|
@@ -2284,8 +2284,8 @@ const Zt = W.forwardRef(
|
|
|
2284
2284
|
noTruncate: m = !1,
|
|
2285
2285
|
...c
|
|
2286
2286
|
}, d) => {
|
|
2287
|
-
const y =
|
|
2288
|
-
type:
|
|
2287
|
+
const y = ot({
|
|
2288
|
+
type: Zt,
|
|
2289
2289
|
mode: r,
|
|
2290
2290
|
focusMode: a,
|
|
2291
2291
|
fullWidth: n,
|
|
@@ -2310,8 +2310,8 @@ const Zt = W.forwardRef(
|
|
|
2310
2310
|
);
|
|
2311
2311
|
}
|
|
2312
2312
|
);
|
|
2313
|
-
|
|
2314
|
-
const
|
|
2313
|
+
er.displayName = "Button";
|
|
2314
|
+
const Qe = O.forwardRef(
|
|
2315
2315
|
({
|
|
2316
2316
|
children: e,
|
|
2317
2317
|
disabled: t = !1,
|
|
@@ -2329,11 +2329,11 @@ const Xe = W.forwardRef(
|
|
|
2329
2329
|
labelLeft: d,
|
|
2330
2330
|
spacing: y,
|
|
2331
2331
|
noBackground: b = !1,
|
|
2332
|
-
align:
|
|
2332
|
+
align: v = "center",
|
|
2333
2333
|
...w
|
|
2334
2334
|
}, C) => {
|
|
2335
|
-
const
|
|
2336
|
-
type:
|
|
2335
|
+
const D = ot({
|
|
2336
|
+
type: nt,
|
|
2337
2337
|
mode: r,
|
|
2338
2338
|
focusMode: a,
|
|
2339
2339
|
fullWidth: n,
|
|
@@ -2346,32 +2346,32 @@ const Xe = W.forwardRef(
|
|
|
2346
2346
|
labelLeft: d,
|
|
2347
2347
|
spacing: y,
|
|
2348
2348
|
noBackground: b,
|
|
2349
|
-
align:
|
|
2350
|
-
}),
|
|
2349
|
+
align: v
|
|
2350
|
+
}), M = f({
|
|
2351
2351
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2352
2352
|
"text-copy-light": r === "dark" && !i,
|
|
2353
2353
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
2354
2354
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
2355
2355
|
});
|
|
2356
|
-
return /* @__PURE__ */
|
|
2356
|
+
return /* @__PURE__ */ I(
|
|
2357
2357
|
Ue,
|
|
2358
2358
|
{
|
|
2359
2359
|
ref: C,
|
|
2360
|
-
className:
|
|
2360
|
+
className: D,
|
|
2361
2361
|
disabled: t,
|
|
2362
2362
|
type: s,
|
|
2363
2363
|
"aria-label": h || p,
|
|
2364
2364
|
...w,
|
|
2365
2365
|
children: [
|
|
2366
2366
|
d && /* @__PURE__ */ l("span", { className: "pr-2", children: d }),
|
|
2367
|
-
/* @__PURE__ */ l("div", { className:
|
|
2367
|
+
/* @__PURE__ */ l("div", { className: M, children: e }),
|
|
2368
2368
|
c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
|
|
2369
2369
|
]
|
|
2370
2370
|
}
|
|
2371
2371
|
);
|
|
2372
2372
|
}
|
|
2373
2373
|
);
|
|
2374
|
-
|
|
2374
|
+
Qe.displayName = "ButtonIcon";
|
|
2375
2375
|
/*!
|
|
2376
2376
|
@versini/ui-button v1.1.10
|
|
2377
2377
|
© 2024 gizmette.com
|
|
@@ -2385,7 +2385,7 @@ try {
|
|
|
2385
2385
|
});
|
|
2386
2386
|
} catch {
|
|
2387
2387
|
}
|
|
2388
|
-
const
|
|
2388
|
+
const rn = O.forwardRef(
|
|
2389
2389
|
({
|
|
2390
2390
|
children: e,
|
|
2391
2391
|
disabled: t = !1,
|
|
@@ -2403,12 +2403,12 @@ const tn = W.forwardRef(
|
|
|
2403
2403
|
labelLeft: d,
|
|
2404
2404
|
spacing: y,
|
|
2405
2405
|
noBackground: b = !1,
|
|
2406
|
-
align:
|
|
2406
|
+
align: v = "center",
|
|
2407
2407
|
active: w = !1,
|
|
2408
2408
|
...C
|
|
2409
|
-
},
|
|
2410
|
-
const
|
|
2411
|
-
type:
|
|
2409
|
+
}, D) => {
|
|
2410
|
+
const M = ot({
|
|
2411
|
+
type: nt,
|
|
2412
2412
|
mode: r,
|
|
2413
2413
|
focusMode: a,
|
|
2414
2414
|
fullWidth: n,
|
|
@@ -2421,13 +2421,13 @@ const tn = W.forwardRef(
|
|
|
2421
2421
|
labelLeft: d,
|
|
2422
2422
|
spacing: y,
|
|
2423
2423
|
noBackground: b,
|
|
2424
|
-
align:
|
|
2424
|
+
align: v
|
|
2425
2425
|
}), Z = f({
|
|
2426
2426
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2427
2427
|
"text-copy-light": r === "dark" && !i,
|
|
2428
2428
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
2429
2429
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
2430
|
-
}),
|
|
2430
|
+
}), N = w ? f(
|
|
2431
2431
|
"relative",
|
|
2432
2432
|
"focus-within:static",
|
|
2433
2433
|
"focus-within:after:border-transparent",
|
|
@@ -2444,11 +2444,11 @@ const tn = W.forwardRef(
|
|
|
2444
2444
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
2445
2445
|
}
|
|
2446
2446
|
) : "";
|
|
2447
|
-
return /* @__PURE__ */ l("div", { className:
|
|
2447
|
+
return /* @__PURE__ */ l("div", { className: N, children: /* @__PURE__ */ I(
|
|
2448
2448
|
Ue,
|
|
2449
2449
|
{
|
|
2450
|
-
ref:
|
|
2451
|
-
className:
|
|
2450
|
+
ref: D,
|
|
2451
|
+
className: M,
|
|
2452
2452
|
disabled: t,
|
|
2453
2453
|
type: s,
|
|
2454
2454
|
"aria-label": h || p,
|
|
@@ -2462,7 +2462,7 @@ const tn = W.forwardRef(
|
|
|
2462
2462
|
) });
|
|
2463
2463
|
}
|
|
2464
2464
|
);
|
|
2465
|
-
|
|
2465
|
+
rn.displayName = "ButtonSort";
|
|
2466
2466
|
/*!
|
|
2467
2467
|
@versini/ui-card v1.0.8
|
|
2468
2468
|
© 2024 gizmette.com
|
|
@@ -2476,12 +2476,12 @@ try {
|
|
|
2476
2476
|
});
|
|
2477
2477
|
} catch {
|
|
2478
2478
|
}
|
|
2479
|
-
const
|
|
2480
|
-
function
|
|
2481
|
-
const t =
|
|
2479
|
+
const Re = "av-card";
|
|
2480
|
+
function an(e) {
|
|
2481
|
+
const t = St();
|
|
2482
2482
|
return `${e}${t}`;
|
|
2483
2483
|
}
|
|
2484
|
-
const
|
|
2484
|
+
const nn = (e) => {
|
|
2485
2485
|
let t = "";
|
|
2486
2486
|
if (typeof e == "number" || typeof e == "string")
|
|
2487
2487
|
t = "m-" + e;
|
|
@@ -2490,7 +2490,7 @@ const an = (e) => {
|
|
|
2490
2490
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
2491
2491
|
}
|
|
2492
2492
|
return t;
|
|
2493
|
-
},
|
|
2493
|
+
}, on = ({
|
|
2494
2494
|
className: e,
|
|
2495
2495
|
headerClassName: t,
|
|
2496
2496
|
bodyClassName: r,
|
|
@@ -2501,10 +2501,10 @@ const an = (e) => {
|
|
|
2501
2501
|
noBorder: i
|
|
2502
2502
|
}) => {
|
|
2503
2503
|
const u = f(
|
|
2504
|
-
|
|
2504
|
+
Re,
|
|
2505
2505
|
e,
|
|
2506
2506
|
"rounded-md",
|
|
2507
|
-
|
|
2507
|
+
nn(n),
|
|
2508
2508
|
{
|
|
2509
2509
|
"border-none": i,
|
|
2510
2510
|
"border-2": !i,
|
|
@@ -2516,7 +2516,7 @@ const an = (e) => {
|
|
|
2516
2516
|
"border-border-dark bg-surface-lighter text-copy-dark dark:border-border-accent dark:bg-surface-dark dark:text-copy-light": o === "system",
|
|
2517
2517
|
"border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": o === "alt-system"
|
|
2518
2518
|
}
|
|
2519
|
-
), h = t || f(`${
|
|
2519
|
+
), h = t || f(`${Re}__header mt-0 border-b-2`, {
|
|
2520
2520
|
"text-copy-light border-border-accent": o === "darker",
|
|
2521
2521
|
"border-border-accent": o === "dark",
|
|
2522
2522
|
"border-border-medium": o === "light",
|
|
@@ -2524,7 +2524,7 @@ const an = (e) => {
|
|
|
2524
2524
|
"border-border-accent dark:border-border-medium": o === "alt-system",
|
|
2525
2525
|
"mb-4": !s,
|
|
2526
2526
|
"mb-2": s
|
|
2527
|
-
}), p = f(r), m = a || f(`${
|
|
2527
|
+
}), p = f(r), m = a || f(`${Re}__footer pt-2`);
|
|
2528
2528
|
return {
|
|
2529
2529
|
wrapper: u,
|
|
2530
2530
|
header: h,
|
|
@@ -2532,7 +2532,7 @@ const an = (e) => {
|
|
|
2532
2532
|
footer: m
|
|
2533
2533
|
};
|
|
2534
2534
|
};
|
|
2535
|
-
function
|
|
2535
|
+
function sn({
|
|
2536
2536
|
id: e,
|
|
2537
2537
|
content: t,
|
|
2538
2538
|
userAriaLabelledby: r,
|
|
@@ -2540,7 +2540,7 @@ function on({
|
|
|
2540
2540
|
}) {
|
|
2541
2541
|
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;
|
|
2542
2542
|
}
|
|
2543
|
-
const
|
|
2543
|
+
const cn = ({
|
|
2544
2544
|
header: e,
|
|
2545
2545
|
headerClassName: t,
|
|
2546
2546
|
footer: r,
|
|
@@ -2556,7 +2556,7 @@ const sn = ({
|
|
|
2556
2556
|
...c
|
|
2557
2557
|
}) => {
|
|
2558
2558
|
let d = null, y = null;
|
|
2559
|
-
const b = typeof e == "string",
|
|
2559
|
+
const b = typeof e == "string", v = an(Re), w = on({
|
|
2560
2560
|
className: o,
|
|
2561
2561
|
headerClassName: t,
|
|
2562
2562
|
bodyClassName: s,
|
|
@@ -2566,7 +2566,7 @@ const sn = ({
|
|
|
2566
2566
|
compact: p,
|
|
2567
2567
|
noBorder: m
|
|
2568
2568
|
});
|
|
2569
|
-
return b ? (d =
|
|
2569
|
+
return b ? (d = v, y = d) : !b && e && i ? (d = null, y = i) : !b && e && !i ? (d = v, y = d) : (d = null, y = i || null), /* @__PURE__ */ l("div", { className: w.wrapper, children: /* @__PURE__ */ I(
|
|
2570
2570
|
"section",
|
|
2571
2571
|
{
|
|
2572
2572
|
...y && {
|
|
@@ -2576,7 +2576,7 @@ const sn = ({
|
|
|
2576
2576
|
...c,
|
|
2577
2577
|
children: [
|
|
2578
2578
|
/* @__PURE__ */ l(
|
|
2579
|
-
|
|
2579
|
+
sn,
|
|
2580
2580
|
{
|
|
2581
2581
|
...d && { id: d },
|
|
2582
2582
|
content: e,
|
|
@@ -2589,7 +2589,7 @@ const sn = ({
|
|
|
2589
2589
|
]
|
|
2590
2590
|
}
|
|
2591
2591
|
) });
|
|
2592
|
-
},
|
|
2592
|
+
}, ln = (e) => {
|
|
2593
2593
|
let t = "";
|
|
2594
2594
|
if (typeof e == "number" || typeof e == "string")
|
|
2595
2595
|
t = "m-" + e;
|
|
@@ -2610,11 +2610,11 @@ const sn = ({
|
|
|
2610
2610
|
semantic: u = !1,
|
|
2611
2611
|
...h
|
|
2612
2612
|
}) => {
|
|
2613
|
-
const p =
|
|
2613
|
+
const p = ln(s), m = f(
|
|
2614
2614
|
p,
|
|
2615
2615
|
a || o
|
|
2616
2616
|
);
|
|
2617
|
-
return /* @__PURE__ */
|
|
2617
|
+
return /* @__PURE__ */ I(ye, { children: [
|
|
2618
2618
|
/* @__PURE__ */ l(
|
|
2619
2619
|
"svg",
|
|
2620
2620
|
{
|
|
@@ -2639,13 +2639,13 @@ const sn = ({
|
|
|
2639
2639
|
try {
|
|
2640
2640
|
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
2641
2641
|
version: "1.4.17",
|
|
2642
|
-
buildTime: "
|
|
2642
|
+
buildTime: "10/02/2024 09:57 AM EDT",
|
|
2643
2643
|
homepage: "https://github.com/aversini/ui-components",
|
|
2644
2644
|
license: "MIT"
|
|
2645
2645
|
});
|
|
2646
2646
|
} catch {
|
|
2647
2647
|
}
|
|
2648
|
-
const
|
|
2648
|
+
const dn = ({
|
|
2649
2649
|
className: e,
|
|
2650
2650
|
viewBox: t,
|
|
2651
2651
|
spacing: r,
|
|
@@ -2670,14 +2670,14 @@ const ln = ({
|
|
|
2670
2670
|
}
|
|
2671
2671
|
) })
|
|
2672
2672
|
}
|
|
2673
|
-
),
|
|
2673
|
+
), un = ({
|
|
2674
2674
|
className: e,
|
|
2675
2675
|
viewBox: t,
|
|
2676
2676
|
spacing: r,
|
|
2677
2677
|
title: a,
|
|
2678
2678
|
monotone: n,
|
|
2679
2679
|
...o
|
|
2680
|
-
}) => /* @__PURE__ */
|
|
2680
|
+
}) => /* @__PURE__ */ I(
|
|
2681
2681
|
Ke,
|
|
2682
2682
|
{
|
|
2683
2683
|
defaultViewBox: "0 0 640 512",
|
|
@@ -2698,7 +2698,7 @@ const ln = ({
|
|
|
2698
2698
|
/* @__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" })
|
|
2699
2699
|
]
|
|
2700
2700
|
}
|
|
2701
|
-
),
|
|
2701
|
+
), mn = ({
|
|
2702
2702
|
className: e,
|
|
2703
2703
|
viewBox: t,
|
|
2704
2704
|
spacing: r,
|
|
@@ -2707,7 +2707,7 @@ const ln = ({
|
|
|
2707
2707
|
...o
|
|
2708
2708
|
}) => {
|
|
2709
2709
|
const s = n ? "1" : "0.4";
|
|
2710
|
-
return /* @__PURE__ */
|
|
2710
|
+
return /* @__PURE__ */ I(
|
|
2711
2711
|
Ke,
|
|
2712
2712
|
{
|
|
2713
2713
|
defaultViewBox: "0 0 190 190",
|
|
@@ -2737,14 +2737,14 @@ const ln = ({
|
|
|
2737
2737
|
]
|
|
2738
2738
|
}
|
|
2739
2739
|
);
|
|
2740
|
-
},
|
|
2740
|
+
}, hn = ({
|
|
2741
2741
|
className: e,
|
|
2742
2742
|
viewBox: t,
|
|
2743
2743
|
spacing: r,
|
|
2744
2744
|
title: a,
|
|
2745
2745
|
monotone: n,
|
|
2746
2746
|
...o
|
|
2747
|
-
}) => /* @__PURE__ */
|
|
2747
|
+
}) => /* @__PURE__ */ I(
|
|
2748
2748
|
Ke,
|
|
2749
2749
|
{
|
|
2750
2750
|
defaultViewBox: "0 0 576 512",
|
|
@@ -2767,13 +2767,13 @@ const ln = ({
|
|
|
2767
2767
|
}
|
|
2768
2768
|
);
|
|
2769
2769
|
/*!
|
|
2770
|
-
@versini/ui-icons v1.
|
|
2770
|
+
@versini/ui-icons v1.14.0
|
|
2771
2771
|
© 2024 gizmette.com
|
|
2772
2772
|
*/
|
|
2773
2773
|
try {
|
|
2774
2774
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
2775
|
-
version: "1.
|
|
2776
|
-
buildTime: "
|
|
2775
|
+
version: "1.14.0",
|
|
2776
|
+
buildTime: "10/02/2024 09:57 AM EDT",
|
|
2777
2777
|
homepage: "https://github.com/aversini/ui-components",
|
|
2778
2778
|
license: "MIT"
|
|
2779
2779
|
});
|
|
@@ -2792,7 +2792,7 @@ try {
|
|
|
2792
2792
|
});
|
|
2793
2793
|
} catch {
|
|
2794
2794
|
}
|
|
2795
|
-
const
|
|
2795
|
+
const pn = "av-main", gn = (e) => {
|
|
2796
2796
|
let t = "";
|
|
2797
2797
|
if (typeof e == "number" || typeof e == "string")
|
|
2798
2798
|
t = "m-" + e;
|
|
@@ -2801,17 +2801,17 @@ const hn = "av-main", pn = (e) => {
|
|
|
2801
2801
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
2802
2802
|
}
|
|
2803
2803
|
return t;
|
|
2804
|
-
},
|
|
2804
|
+
}, fn = ({
|
|
2805
2805
|
children: e,
|
|
2806
2806
|
className: t,
|
|
2807
2807
|
raw: r = !1,
|
|
2808
2808
|
spacing: a
|
|
2809
2809
|
}) => {
|
|
2810
|
-
const n = f(t,
|
|
2810
|
+
const n = f(t, pn, gn(a), {
|
|
2811
2811
|
"mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
|
|
2812
2812
|
});
|
|
2813
2813
|
return /* @__PURE__ */ l("main", { className: n, children: e });
|
|
2814
|
-
},
|
|
2814
|
+
}, yn = (e) => {
|
|
2815
2815
|
let t = "";
|
|
2816
2816
|
if (typeof e == "number" || typeof e == "string")
|
|
2817
2817
|
t = "m-" + e;
|
|
@@ -2820,10 +2820,10 @@ const hn = "av-main", pn = (e) => {
|
|
|
2820
2820
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
2821
2821
|
}
|
|
2822
2822
|
return t;
|
|
2823
|
-
},
|
|
2823
|
+
}, bn = "av-flexgrid", _e = "av-flexgrid-item", De = 0.25, tr = O.createContext({
|
|
2824
2824
|
columnGap: 0,
|
|
2825
2825
|
rowGap: 0
|
|
2826
|
-
}),
|
|
2826
|
+
}), vt = ({
|
|
2827
2827
|
children: e,
|
|
2828
2828
|
className: t,
|
|
2829
2829
|
columnGap: r = 1,
|
|
@@ -2850,12 +2850,12 @@ const hn = "av-main", pn = (e) => {
|
|
|
2850
2850
|
marginLeft: r * -1 * De + "rem",
|
|
2851
2851
|
marginTop: a * -1 * De + "rem"
|
|
2852
2852
|
}, c = f(
|
|
2853
|
-
|
|
2853
|
+
bn,
|
|
2854
2854
|
t,
|
|
2855
2855
|
"box-border flex flex-wrap"
|
|
2856
|
-
), d = { columnGap: r, rowGap: a }, y = h ? "div" :
|
|
2857
|
-
return /* @__PURE__ */ l(y, { ...h ? { className:
|
|
2858
|
-
},
|
|
2856
|
+
), d = { columnGap: r, rowGap: a }, y = h ? "div" : O.Fragment;
|
|
2857
|
+
return /* @__PURE__ */ l(y, { ...h ? { className: yn(h) } : {}, children: /* @__PURE__ */ l("div", { className: c, style: m, ...p, children: /* @__PURE__ */ l(tr.Provider, { value: d, children: e }) }) });
|
|
2858
|
+
}, je = (e, t) => f({
|
|
2859
2859
|
"basis-1/12": e === 1 && !t,
|
|
2860
2860
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
2861
2861
|
"md:basis-1/12": e === 1 && t === "md",
|
|
@@ -2928,7 +2928,7 @@ const hn = "av-main", pn = (e) => {
|
|
|
2928
2928
|
"lg:basis-full": e === 12 && t === "lg",
|
|
2929
2929
|
"xl:basis-full": e === 12 && t === "xl",
|
|
2930
2930
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
2931
|
-
}),
|
|
2931
|
+
}), En = ({
|
|
2932
2932
|
className: e,
|
|
2933
2933
|
span: t
|
|
2934
2934
|
}) => {
|
|
@@ -2936,14 +2936,14 @@ const hn = "av-main", pn = (e) => {
|
|
|
2936
2936
|
return f(e, _e, "box-border basis-auto");
|
|
2937
2937
|
if (typeof t == "number")
|
|
2938
2938
|
return f(e, _e, "box-border max-w-full", {
|
|
2939
|
-
[`${
|
|
2939
|
+
[`${je(t)}`]: !0
|
|
2940
2940
|
});
|
|
2941
2941
|
if (typeof t == "string")
|
|
2942
2942
|
return f(e, _e, "box-border basis-auto", {
|
|
2943
2943
|
"max-w-full grow": t === "auto"
|
|
2944
2944
|
});
|
|
2945
2945
|
if (typeof t == "object") {
|
|
2946
|
-
const r = Object.entries(t).map(([a, n]) => a === "fallback" ?
|
|
2946
|
+
const r = Object.entries(t).map(([a, n]) => a === "fallback" ? je(n) : je(n, a));
|
|
2947
2947
|
return f(
|
|
2948
2948
|
e,
|
|
2949
2949
|
_e,
|
|
@@ -2957,10 +2957,10 @@ const hn = "av-main", pn = (e) => {
|
|
|
2957
2957
|
span: r,
|
|
2958
2958
|
...a
|
|
2959
2959
|
}) => {
|
|
2960
|
-
const { columnGap: n, rowGap: o } =
|
|
2960
|
+
const { columnGap: n, rowGap: o } = Ze(tr), s = {
|
|
2961
2961
|
paddingLeft: n * De + "rem",
|
|
2962
2962
|
paddingTop: o * De + "rem"
|
|
2963
|
-
}, i =
|
|
2963
|
+
}, i = En({
|
|
2964
2964
|
className: t,
|
|
2965
2965
|
span: r
|
|
2966
2966
|
});
|
|
@@ -2979,14 +2979,14 @@ try {
|
|
|
2979
2979
|
});
|
|
2980
2980
|
} catch {
|
|
2981
2981
|
}
|
|
2982
|
-
const
|
|
2983
|
-
function
|
|
2984
|
-
const e =
|
|
2982
|
+
const rr = "av-text-input", wn = "av-text-input-wrapper", qe = "av-text-input-helper-text";
|
|
2983
|
+
function Tn() {
|
|
2984
|
+
const e = L(!1);
|
|
2985
2985
|
return Q(() => (e.current = !0, () => {
|
|
2986
2986
|
e.current = !1;
|
|
2987
2987
|
}), []), q(() => e.current, []);
|
|
2988
2988
|
}
|
|
2989
|
-
const
|
|
2989
|
+
const In = {
|
|
2990
2990
|
x: 0,
|
|
2991
2991
|
y: 0,
|
|
2992
2992
|
width: 0,
|
|
@@ -2997,7 +2997,7 @@ const Tn = {
|
|
|
2997
2997
|
right: 0
|
|
2998
2998
|
};
|
|
2999
2999
|
function vn(e) {
|
|
3000
|
-
const t =
|
|
3000
|
+
const t = Tn(), r = L(0), a = L(null), [n, o] = j(In), s = _t(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
3001
3001
|
const u = i[0];
|
|
3002
3002
|
u && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
3003
3003
|
a.current && t() && o(u.contentRect);
|
|
@@ -3007,8 +3007,8 @@ function vn(e) {
|
|
|
3007
3007
|
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
3008
3008
|
}), [s, e]), [a, n];
|
|
3009
3009
|
}
|
|
3010
|
-
function
|
|
3011
|
-
const t =
|
|
3010
|
+
function An(e) {
|
|
3011
|
+
const t = St();
|
|
3012
3012
|
if (!e)
|
|
3013
3013
|
return t;
|
|
3014
3014
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -3018,7 +3018,7 @@ function In(e) {
|
|
|
3018
3018
|
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
3019
3019
|
}
|
|
3020
3020
|
}
|
|
3021
|
-
const
|
|
3021
|
+
const ar = "SET_ANNOUNCEMENT", nr = "CLEAR_ANNOUNCEMENT", kn = {
|
|
3022
3022
|
alert: null,
|
|
3023
3023
|
alertdialog: null,
|
|
3024
3024
|
log: "polite",
|
|
@@ -3026,14 +3026,14 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", An = {
|
|
|
3026
3026
|
progressbar: null,
|
|
3027
3027
|
status: "polite",
|
|
3028
3028
|
timer: "assertive"
|
|
3029
|
-
},
|
|
3029
|
+
}, Sn = (e, t) => {
|
|
3030
3030
|
switch (t == null ? void 0 : t.type) {
|
|
3031
|
-
case
|
|
3031
|
+
case ar:
|
|
3032
3032
|
return {
|
|
3033
3033
|
...e,
|
|
3034
3034
|
announcement: t.payload
|
|
3035
3035
|
};
|
|
3036
|
-
case
|
|
3036
|
+
case nr:
|
|
3037
3037
|
return {
|
|
3038
3038
|
...e,
|
|
3039
3039
|
announcement: null
|
|
@@ -3041,14 +3041,14 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", An = {
|
|
|
3041
3041
|
default:
|
|
3042
3042
|
return e;
|
|
3043
3043
|
}
|
|
3044
|
-
},
|
|
3044
|
+
}, _n = ({
|
|
3045
3045
|
onAnnouncementClear: e,
|
|
3046
3046
|
dispatch: t
|
|
3047
3047
|
}) => {
|
|
3048
3048
|
t({
|
|
3049
|
-
type:
|
|
3049
|
+
type: nr
|
|
3050
3050
|
}), typeof e == "function" && e();
|
|
3051
|
-
},
|
|
3051
|
+
}, At = ({
|
|
3052
3052
|
children: e,
|
|
3053
3053
|
clearAnnouncementDelay: t,
|
|
3054
3054
|
clearAnnouncementTimeoutRef: r,
|
|
@@ -3056,16 +3056,16 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", An = {
|
|
|
3056
3056
|
dispatch: n
|
|
3057
3057
|
}) => {
|
|
3058
3058
|
(r == null ? void 0 : r.current) !== null && clearTimeout(r.current), e !== null && n({
|
|
3059
|
-
type:
|
|
3059
|
+
type: ar,
|
|
3060
3060
|
payload: e
|
|
3061
3061
|
}), t && (r.current = setTimeout(
|
|
3062
|
-
() =>
|
|
3062
|
+
() => _n({
|
|
3063
3063
|
onAnnouncementClear: a,
|
|
3064
3064
|
dispatch: n
|
|
3065
3065
|
}),
|
|
3066
3066
|
t
|
|
3067
3067
|
));
|
|
3068
|
-
},
|
|
3068
|
+
}, Nn = ({
|
|
3069
3069
|
children: e,
|
|
3070
3070
|
announcementTimeoutRef: t,
|
|
3071
3071
|
announcementDelay: r,
|
|
@@ -3074,13 +3074,13 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", An = {
|
|
|
3074
3074
|
onAnnouncementClear: o,
|
|
3075
3075
|
dispatch: s
|
|
3076
3076
|
}) => {
|
|
3077
|
-
clearTimeout(t.current), r ? t.current = setTimeout(
|
|
3077
|
+
clearTimeout(t.current), r ? t.current = setTimeout(At, r, {
|
|
3078
3078
|
children: e,
|
|
3079
3079
|
clearAnnouncementDelay: a,
|
|
3080
3080
|
clearAnnouncementTimeoutRef: n,
|
|
3081
3081
|
onAnnouncementClear: o,
|
|
3082
3082
|
dispatch: s
|
|
3083
|
-
}) :
|
|
3083
|
+
}) : At({
|
|
3084
3084
|
children: e,
|
|
3085
3085
|
clearAnnouncementDelay: a,
|
|
3086
3086
|
clearAnnouncementTimeoutRef: n,
|
|
@@ -3088,7 +3088,7 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", An = {
|
|
|
3088
3088
|
dispatch: s
|
|
3089
3089
|
});
|
|
3090
3090
|
};
|
|
3091
|
-
function
|
|
3091
|
+
function or({
|
|
3092
3092
|
children: e,
|
|
3093
3093
|
className: t,
|
|
3094
3094
|
politeness: r,
|
|
@@ -3099,12 +3099,12 @@ function nr({
|
|
|
3099
3099
|
visible: i,
|
|
3100
3100
|
...u
|
|
3101
3101
|
}) {
|
|
3102
|
-
const h =
|
|
3102
|
+
const h = L(), p = L(), [m, c] = kt(Sn, {
|
|
3103
3103
|
announcement: null
|
|
3104
3104
|
});
|
|
3105
3105
|
let d = r;
|
|
3106
|
-
typeof d > "u" && (d = a ?
|
|
3107
|
-
|
|
3106
|
+
typeof d > "u" && (d = a ? kn[a] : "assertive"), Q(() => {
|
|
3107
|
+
Nn({
|
|
3108
3108
|
announcementTimeoutRef: h,
|
|
3109
3109
|
announcementDelay: n,
|
|
3110
3110
|
children: e,
|
|
@@ -3156,21 +3156,21 @@ try {
|
|
|
3156
3156
|
});
|
|
3157
3157
|
} catch {
|
|
3158
3158
|
}
|
|
3159
|
-
const
|
|
3159
|
+
const xn = ({
|
|
3160
3160
|
mode: e
|
|
3161
3161
|
}) => f({
|
|
3162
3162
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
3163
3163
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
3164
3164
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
3165
3165
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
3166
|
-
}),
|
|
3166
|
+
}), Cn = ({
|
|
3167
3167
|
focusMode: e
|
|
3168
3168
|
}) => f("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
3169
3169
|
"focus:outline-focus-dark": e === "dark",
|
|
3170
3170
|
"focus:outline-focus-light": e === "light",
|
|
3171
3171
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3172
3172
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3173
|
-
}),
|
|
3173
|
+
}), On = ({
|
|
3174
3174
|
noBorder: e,
|
|
3175
3175
|
error: t
|
|
3176
3176
|
}) => f("border-2", {
|
|
@@ -3178,7 +3178,7 @@ const Nn = ({
|
|
|
3178
3178
|
"focus:border-border-dark": !e && t,
|
|
3179
3179
|
"border-border-error-dark": !e && t,
|
|
3180
3180
|
"border-transparent": e
|
|
3181
|
-
}),
|
|
3181
|
+
}), Pn = ({
|
|
3182
3182
|
disabled: e,
|
|
3183
3183
|
raw: t,
|
|
3184
3184
|
error: r,
|
|
@@ -3202,7 +3202,7 @@ const Nn = ({
|
|
|
3202
3202
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
3203
3203
|
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
3204
3204
|
});
|
|
3205
|
-
},
|
|
3205
|
+
}, Dn = ({
|
|
3206
3206
|
error: e,
|
|
3207
3207
|
raw: t,
|
|
3208
3208
|
mode: r,
|
|
@@ -3212,24 +3212,24 @@ const Nn = ({
|
|
|
3212
3212
|
return "";
|
|
3213
3213
|
if (a)
|
|
3214
3214
|
return f(
|
|
3215
|
-
|
|
3215
|
+
qe,
|
|
3216
3216
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
3217
3217
|
);
|
|
3218
3218
|
if (!e)
|
|
3219
|
-
return f(
|
|
3219
|
+
return f(qe, "absolute px-2 font-medium", {
|
|
3220
3220
|
"text-copy-lighter": r === "dark",
|
|
3221
3221
|
"text-copy-dark": r === "light",
|
|
3222
3222
|
"text-copy-dark dark:text-copy-lighter": r === "system",
|
|
3223
3223
|
"text-copy-lighter dark:text-copy-dark": r === "alt-system"
|
|
3224
3224
|
});
|
|
3225
3225
|
if (e)
|
|
3226
|
-
return f(
|
|
3226
|
+
return f(qe, "absolute px-2 font-medium", {
|
|
3227
3227
|
"text-copy-error-light bg-surface-darker": r === "dark",
|
|
3228
3228
|
"text-copy-error-dark": r === "light",
|
|
3229
3229
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
3230
3230
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
3231
3231
|
});
|
|
3232
|
-
},
|
|
3232
|
+
}, $n = ({
|
|
3233
3233
|
className: e,
|
|
3234
3234
|
inputClassName: t,
|
|
3235
3235
|
raw: r,
|
|
@@ -3244,7 +3244,7 @@ const Nn = ({
|
|
|
3244
3244
|
}) => {
|
|
3245
3245
|
const m = r ? e : f(
|
|
3246
3246
|
"relative flex w-full flex-col justify-center",
|
|
3247
|
-
|
|
3247
|
+
wn,
|
|
3248
3248
|
e,
|
|
3249
3249
|
Rn(s)
|
|
3250
3250
|
);
|
|
@@ -3267,22 +3267,22 @@ const Nn = ({
|
|
|
3267
3267
|
break;
|
|
3268
3268
|
}
|
|
3269
3269
|
const d = r ? f(t) : f(
|
|
3270
|
-
|
|
3270
|
+
rr,
|
|
3271
3271
|
t,
|
|
3272
3272
|
c,
|
|
3273
3273
|
"rounded-md text-base px-4",
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3274
|
+
xn({ mode: i }),
|
|
3275
|
+
Cn({ focusMode: u }),
|
|
3276
|
+
On({ noBorder: n, error: o }),
|
|
3277
3277
|
{
|
|
3278
3278
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
3279
3279
|
}
|
|
3280
|
-
), y = r ? void 0 : "sr-only", b =
|
|
3280
|
+
), y = r ? void 0 : "sr-only", b = Pn({
|
|
3281
3281
|
disabled: a,
|
|
3282
3282
|
raw: r,
|
|
3283
3283
|
error: o,
|
|
3284
3284
|
mode: i
|
|
3285
|
-
}),
|
|
3285
|
+
}), v = Dn({
|
|
3286
3286
|
error: o,
|
|
3287
3287
|
raw: r,
|
|
3288
3288
|
mode: i,
|
|
@@ -3293,10 +3293,10 @@ const Nn = ({
|
|
|
3293
3293
|
input: d,
|
|
3294
3294
|
accessibleLabel: y,
|
|
3295
3295
|
visibleLabel: b,
|
|
3296
|
-
helperText:
|
|
3296
|
+
helperText: v,
|
|
3297
3297
|
rightElement: w
|
|
3298
3298
|
};
|
|
3299
|
-
},
|
|
3299
|
+
}, st = O.forwardRef(
|
|
3300
3300
|
({
|
|
3301
3301
|
id: e,
|
|
3302
3302
|
name: t,
|
|
@@ -3314,18 +3314,18 @@ const Nn = ({
|
|
|
3314
3314
|
type: d = "text",
|
|
3315
3315
|
helperText: y = "",
|
|
3316
3316
|
rightElement: b,
|
|
3317
|
-
rightElementClassName:
|
|
3317
|
+
rightElementClassName: v,
|
|
3318
3318
|
spacing: w,
|
|
3319
3319
|
size: C = "md",
|
|
3320
|
-
...
|
|
3321
|
-
},
|
|
3322
|
-
const [Z,
|
|
3320
|
+
...D
|
|
3321
|
+
}, M) => {
|
|
3322
|
+
const [Z, N] = vn(), [G, P] = j(0), V = An({ id: e, prefix: `${rr}-` }), pe = `${t} error, ${y}`, ee = L(null), R = L(null), $ = {
|
|
3323
3323
|
xs: { label: "-25px", helperText: "30px" },
|
|
3324
3324
|
sm: { label: "-29px", helperText: "34px" },
|
|
3325
3325
|
md: { label: "-33px", helperText: "38px" },
|
|
3326
3326
|
lg: { label: "-15px", helperText: "22px" },
|
|
3327
3327
|
xl: { label: "-19px", helperText: "25px" }
|
|
3328
|
-
},
|
|
3328
|
+
}, U = $n({
|
|
3329
3329
|
className: o,
|
|
3330
3330
|
inputClassName: s,
|
|
3331
3331
|
error: a,
|
|
@@ -3336,41 +3336,41 @@ const Nn = ({
|
|
|
3336
3336
|
spacing: w,
|
|
3337
3337
|
mode: i,
|
|
3338
3338
|
size: C,
|
|
3339
|
-
rightElementClassName:
|
|
3339
|
+
rightElementClassName: v
|
|
3340
3340
|
});
|
|
3341
|
-
return
|
|
3342
|
-
|
|
3343
|
-
}, [
|
|
3341
|
+
return ct(() => {
|
|
3342
|
+
N && N.width && P(N.width + 18 + 10);
|
|
3343
|
+
}, [N]), ct(() => {
|
|
3344
3344
|
var g, T;
|
|
3345
|
-
const { label: E, helperText:
|
|
3346
|
-
(g = ee == null ? void 0 : ee.current) == null || g.style.setProperty("--av-text-input-label", E), (T =
|
|
3345
|
+
const { label: E, helperText: Y } = $[C];
|
|
3346
|
+
(g = ee == null ? void 0 : ee.current) == null || g.style.setProperty("--av-text-input-label", E), (T = R == null ? void 0 : R.current) == null || T.style.setProperty(
|
|
3347
3347
|
"--av-text-input-helper-text",
|
|
3348
|
-
|
|
3348
|
+
Y
|
|
3349
3349
|
);
|
|
3350
|
-
}, [C]), /* @__PURE__ */
|
|
3350
|
+
}, [C]), /* @__PURE__ */ I("div", { className: U.wrapper, children: [
|
|
3351
3351
|
/* @__PURE__ */ l(
|
|
3352
3352
|
"label",
|
|
3353
3353
|
{
|
|
3354
3354
|
htmlFor: V,
|
|
3355
3355
|
id: m,
|
|
3356
|
-
className:
|
|
3356
|
+
className: U.accessibleLabel,
|
|
3357
3357
|
children: r
|
|
3358
3358
|
}
|
|
3359
3359
|
),
|
|
3360
3360
|
/* @__PURE__ */ l(
|
|
3361
3361
|
"input",
|
|
3362
3362
|
{
|
|
3363
|
-
ref:
|
|
3363
|
+
ref: M,
|
|
3364
3364
|
id: V,
|
|
3365
3365
|
name: t,
|
|
3366
3366
|
type: d,
|
|
3367
3367
|
disabled: h,
|
|
3368
3368
|
placeholder: n ? void 0 : " ",
|
|
3369
|
-
className:
|
|
3369
|
+
className: U.input,
|
|
3370
3370
|
...y && { "aria-describedby": `${V}-helper` },
|
|
3371
3371
|
...a && { "aria-invalid": "true" },
|
|
3372
3372
|
...b && !n && { style: { paddingRight: G } },
|
|
3373
|
-
...
|
|
3373
|
+
...D
|
|
3374
3374
|
}
|
|
3375
3375
|
),
|
|
3376
3376
|
!n && !c && /* @__PURE__ */ l(
|
|
@@ -3379,16 +3379,16 @@ const Nn = ({
|
|
|
3379
3379
|
ref: ee,
|
|
3380
3380
|
"aria-hidden": !0,
|
|
3381
3381
|
htmlFor: V,
|
|
3382
|
-
className:
|
|
3382
|
+
className: U.visibleLabel,
|
|
3383
3383
|
children: r
|
|
3384
3384
|
}
|
|
3385
3385
|
),
|
|
3386
3386
|
y && /* @__PURE__ */ l(
|
|
3387
3387
|
"div",
|
|
3388
3388
|
{
|
|
3389
|
-
ref:
|
|
3389
|
+
ref: R,
|
|
3390
3390
|
id: `${V}-helper`,
|
|
3391
|
-
className:
|
|
3391
|
+
className: U.helperText,
|
|
3392
3392
|
children: y
|
|
3393
3393
|
}
|
|
3394
3394
|
),
|
|
@@ -3396,24 +3396,24 @@ const Nn = ({
|
|
|
3396
3396
|
"div",
|
|
3397
3397
|
{
|
|
3398
3398
|
ref: Z,
|
|
3399
|
-
className:
|
|
3399
|
+
className: U.rightElement,
|
|
3400
3400
|
children: b
|
|
3401
3401
|
}
|
|
3402
3402
|
),
|
|
3403
|
-
a && y && /* @__PURE__ */ l(
|
|
3403
|
+
a && y && /* @__PURE__ */ l(or, { politeness: "polite", clearAnnouncementDelay: 500, children: pe })
|
|
3404
3404
|
] });
|
|
3405
3405
|
}
|
|
3406
3406
|
);
|
|
3407
|
-
|
|
3408
|
-
function
|
|
3409
|
-
return
|
|
3407
|
+
st.displayName = "TextInput";
|
|
3408
|
+
function Ln(e) {
|
|
3409
|
+
return _t(() => e.every((t) => t == null) ? () => {
|
|
3410
3410
|
} : (t) => {
|
|
3411
3411
|
e.forEach((r) => {
|
|
3412
3412
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
3413
3413
|
});
|
|
3414
3414
|
}, e);
|
|
3415
3415
|
}
|
|
3416
|
-
const
|
|
3416
|
+
const Mn = 500, Un = 5e3, Kn = 2e4, sr = O.forwardRef(
|
|
3417
3417
|
({
|
|
3418
3418
|
name: e,
|
|
3419
3419
|
disabled: t,
|
|
@@ -3428,43 +3428,43 @@ const Ln = 500, Mn = 5e3, Un = 2e4, or = W.forwardRef(
|
|
|
3428
3428
|
spacing: p,
|
|
3429
3429
|
...m
|
|
3430
3430
|
}, c) => {
|
|
3431
|
-
const [d, y] = j(!0), [b,
|
|
3431
|
+
const [d, y] = j(!0), [b, v] = j({
|
|
3432
3432
|
message: null,
|
|
3433
3433
|
politeness: null
|
|
3434
|
-
}), w =
|
|
3434
|
+
}), w = L(!0), C = L(), D = L(null), M = Ln([c, D]), Z = d ? "Show" : "Hide", N = () => {
|
|
3435
3435
|
clearTimeout(C.current), w.current || (C.current = window.setTimeout(() => {
|
|
3436
|
-
w.current = !0, y(!0),
|
|
3437
|
-
announcementTimeout:
|
|
3436
|
+
w.current = !0, y(!0), v({
|
|
3437
|
+
announcementTimeout: Un,
|
|
3438
3438
|
politeness: "polite",
|
|
3439
3439
|
message: `${r} hiding characters`
|
|
3440
3440
|
}), n && n(!0);
|
|
3441
|
-
},
|
|
3442
|
-
}, G = (
|
|
3443
|
-
|
|
3444
|
-
const
|
|
3445
|
-
w.current =
|
|
3446
|
-
announcementTimeout:
|
|
3441
|
+
}, Kn));
|
|
3442
|
+
}, G = (R) => {
|
|
3443
|
+
R.preventDefault();
|
|
3444
|
+
const $ = !w.current;
|
|
3445
|
+
w.current = $, N(), y($), v({
|
|
3446
|
+
announcementTimeout: Mn,
|
|
3447
3447
|
politeness: "assertive",
|
|
3448
|
-
message:
|
|
3449
|
-
}), n && n(
|
|
3450
|
-
},
|
|
3451
|
-
var
|
|
3452
|
-
const { relatedTarget:
|
|
3453
|
-
g != null && g.contains(
|
|
3454
|
-
}, V = (
|
|
3455
|
-
|
|
3456
|
-
}, pe = (
|
|
3457
|
-
|
|
3458
|
-
}, ee = (
|
|
3459
|
-
|
|
3448
|
+
message: $ ? "Characters hidden" : "Characters showing"
|
|
3449
|
+
}), n && n($);
|
|
3450
|
+
}, P = (R) => {
|
|
3451
|
+
var $;
|
|
3452
|
+
const { relatedTarget: U } = R, g = ($ = D.current) == null ? void 0 : $.parentElement;
|
|
3453
|
+
g != null && g.contains(U) || u && u();
|
|
3454
|
+
}, V = (R) => {
|
|
3455
|
+
N(), s && s(R), P(R);
|
|
3456
|
+
}, pe = (R) => {
|
|
3457
|
+
N(), i && i(R);
|
|
3458
|
+
}, ee = (R) => {
|
|
3459
|
+
N(), o && o(R);
|
|
3460
3460
|
};
|
|
3461
3461
|
return Q(() => () => {
|
|
3462
3462
|
clearTimeout(C.current);
|
|
3463
|
-
}, []), /* @__PURE__ */
|
|
3463
|
+
}, []), /* @__PURE__ */ I(ye, { children: [
|
|
3464
3464
|
/* @__PURE__ */ l(
|
|
3465
|
-
|
|
3465
|
+
st,
|
|
3466
3466
|
{
|
|
3467
|
-
ref:
|
|
3467
|
+
ref: M,
|
|
3468
3468
|
name: e,
|
|
3469
3469
|
label: r,
|
|
3470
3470
|
labelHidden: a,
|
|
@@ -3474,18 +3474,18 @@ const Ln = 500, Mn = 5e3, Un = 2e4, or = W.forwardRef(
|
|
|
3474
3474
|
onBlur: V,
|
|
3475
3475
|
onFocus: pe,
|
|
3476
3476
|
onChange: ee,
|
|
3477
|
-
rightElement:
|
|
3477
|
+
rightElement: O.cloneElement(h, {
|
|
3478
3478
|
ref: c,
|
|
3479
3479
|
label: Z,
|
|
3480
3480
|
onClick: G,
|
|
3481
|
-
onBlur:
|
|
3481
|
+
onBlur: P,
|
|
3482
3482
|
disabled: t
|
|
3483
3483
|
}),
|
|
3484
3484
|
...m
|
|
3485
3485
|
}
|
|
3486
3486
|
),
|
|
3487
3487
|
/* @__PURE__ */ l(
|
|
3488
|
-
|
|
3488
|
+
or,
|
|
3489
3489
|
{
|
|
3490
3490
|
role: "status",
|
|
3491
3491
|
politeness: b.politeness,
|
|
@@ -3496,7 +3496,7 @@ const Ln = 500, Mn = 5e3, Un = 2e4, or = W.forwardRef(
|
|
|
3496
3496
|
] });
|
|
3497
3497
|
}
|
|
3498
3498
|
);
|
|
3499
|
-
|
|
3499
|
+
sr.displayName = "TextInputMask";
|
|
3500
3500
|
/*!
|
|
3501
3501
|
@versini/ui-textinput v1.2.0
|
|
3502
3502
|
© 2024 gizmette.com
|
|
@@ -3510,7 +3510,7 @@ try {
|
|
|
3510
3510
|
});
|
|
3511
3511
|
} catch {
|
|
3512
3512
|
}
|
|
3513
|
-
const
|
|
3513
|
+
const Hn = "ASK! ME! ANYTHING!", ir = "Sassy Saint", Wn = "gizmette.com", Bn = "Log in", Gn = "Sign in with a Passkey", qo = "Log out", Vn = "Password", Jn = "Powered by ", Xo = "Send", Qo = "Profile", Zo = "Statistics", es = "Chat history", ts = "About", rs = "Type your question here", as = "Clear chat", ns = "Cancel chat", os = "N/A", ss = {
|
|
3514
3514
|
TAGS: {
|
|
3515
3515
|
TITLE: "Pre-filled tags",
|
|
3516
3516
|
DESCRIPTION: "Tags are pre-filled buttons available on the main screen, to help you quickly start requests."
|
|
@@ -3545,7 +3545,7 @@ const Kn = "ASK! ME! ANYTHING!", sr = "Sassy Saint", Hn = "gizmette.com", Wn = "
|
|
|
3545
3545
|
TITLE_SERVER: "Server details",
|
|
3546
3546
|
VERSION: "Version",
|
|
3547
3547
|
BUILD_TIMESTAMP: "Build date",
|
|
3548
|
-
ENGINE: "
|
|
3548
|
+
ENGINE: "AI model",
|
|
3549
3549
|
PLUGIN: "Plugin"
|
|
3550
3550
|
}
|
|
3551
3551
|
};
|
|
@@ -3562,7 +3562,7 @@ try {
|
|
|
3562
3562
|
});
|
|
3563
3563
|
} catch {
|
|
3564
3564
|
}
|
|
3565
|
-
const
|
|
3565
|
+
const Fn = "av-footer", Yn = (e) => {
|
|
3566
3566
|
let t = "";
|
|
3567
3567
|
if (typeof e == "number" || typeof e == "string")
|
|
3568
3568
|
t = "m-" + e;
|
|
@@ -3571,7 +3571,7 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3571
3571
|
(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(" ");
|
|
3572
3572
|
}
|
|
3573
3573
|
return t;
|
|
3574
|
-
},
|
|
3574
|
+
}, zn = ({
|
|
3575
3575
|
className: e,
|
|
3576
3576
|
mode: t = "system",
|
|
3577
3577
|
row1: r,
|
|
@@ -3580,7 +3580,7 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3580
3580
|
spacing: o,
|
|
3581
3581
|
raw: s = !1
|
|
3582
3582
|
}) => {
|
|
3583
|
-
const i = f(
|
|
3583
|
+
const i = f(Fn, e, Yn(o), {
|
|
3584
3584
|
"text-copy-dark": !s && t === "dark",
|
|
3585
3585
|
"text-copy-lighter": !s && t === "light",
|
|
3586
3586
|
"text-copy-dark dark:text-copy-lighter": !s && t === "system",
|
|
@@ -3588,50 +3588,79 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3588
3588
|
"mb-[100px]": !n && !s,
|
|
3589
3589
|
"mt-0 flex w-full flex-col p-2 text-center text-xs sm:mt-3 md:mx-auto md:max-w-4xl": !s
|
|
3590
3590
|
});
|
|
3591
|
-
return /* @__PURE__ */
|
|
3591
|
+
return /* @__PURE__ */ I("footer", { className: i, children: [
|
|
3592
3592
|
r && /* @__PURE__ */ l("div", { children: r }),
|
|
3593
3593
|
a && /* @__PURE__ */ l("div", { children: a })
|
|
3594
3594
|
] });
|
|
3595
|
-
},
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
]
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3595
|
+
}, jn = O.createContext({
|
|
3596
|
+
state: {
|
|
3597
|
+
id: "",
|
|
3598
|
+
model: Ye,
|
|
3599
|
+
engine: Ye,
|
|
3600
|
+
usage: 0,
|
|
3601
|
+
messages: [],
|
|
3602
|
+
isComponent: !1
|
|
3603
|
+
},
|
|
3604
|
+
dispatch: () => {
|
|
3605
|
+
},
|
|
3606
|
+
serverStats: {
|
|
3607
|
+
version: "",
|
|
3608
|
+
models: [],
|
|
3609
|
+
plugins: [],
|
|
3610
|
+
engine: Ye
|
|
3611
|
+
}
|
|
3612
|
+
}), is = O.createContext({
|
|
3613
|
+
state: { searchString: "", sortedCell: "", sortDirection: "" },
|
|
3614
|
+
dispatch: () => {
|
|
3615
3615
|
}
|
|
3616
|
-
),
|
|
3616
|
+
}), cs = O.createContext({
|
|
3617
|
+
state: { tag: "" },
|
|
3618
|
+
dispatch: () => {
|
|
3619
|
+
}
|
|
3620
|
+
}), qn = ({
|
|
3621
|
+
serverStats: e
|
|
3622
|
+
}) => {
|
|
3623
|
+
const { state: t } = Ze(jn);
|
|
3624
|
+
return /* @__PURE__ */ l(
|
|
3625
|
+
zn,
|
|
3626
|
+
{
|
|
3627
|
+
mode: "light",
|
|
3628
|
+
row1: /* @__PURE__ */ I("div", { children: [
|
|
3629
|
+
ir,
|
|
3630
|
+
" v",
|
|
3631
|
+
"5.0.1",
|
|
3632
|
+
" - ",
|
|
3633
|
+
Jn,
|
|
3634
|
+
t && t.engine,
|
|
3635
|
+
at && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
|
|
3636
|
+
] }),
|
|
3637
|
+
row2: /* @__PURE__ */ I("div", { children: [
|
|
3638
|
+
"© ",
|
|
3639
|
+
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
3640
|
+
" ",
|
|
3641
|
+
Wn
|
|
3642
|
+
] })
|
|
3643
|
+
}
|
|
3644
|
+
);
|
|
3645
|
+
}, Xn = Nt(
|
|
3617
3646
|
() => import(
|
|
3618
3647
|
/* webpackChunkName: "LazyHeader" */
|
|
3619
|
-
"./LazyHeader.
|
|
3648
|
+
"./LazyHeader.DPlhG-1q.js"
|
|
3620
3649
|
)
|
|
3621
|
-
),
|
|
3622
|
-
const { isAuthenticated: e } =
|
|
3623
|
-
return /* @__PURE__ */
|
|
3624
|
-
e && /* @__PURE__ */ l(Rt, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(
|
|
3625
|
-
/* @__PURE__ */
|
|
3626
|
-
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(
|
|
3627
|
-
/* @__PURE__ */
|
|
3628
|
-
/* @__PURE__ */ l("h1", { children:
|
|
3629
|
-
/* @__PURE__ */ l("h2", { children:
|
|
3650
|
+
), Qn = () => {
|
|
3651
|
+
const { isAuthenticated: e } = rt();
|
|
3652
|
+
return /* @__PURE__ */ I(ye, { children: [
|
|
3653
|
+
e && /* @__PURE__ */ l(Rt, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(Xn, {}) }),
|
|
3654
|
+
/* @__PURE__ */ I("div", { className: "flex items-center justify-center", children: [
|
|
3655
|
+
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(dn, {}) }),
|
|
3656
|
+
/* @__PURE__ */ I("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3657
|
+
/* @__PURE__ */ l("h1", { children: ir }),
|
|
3658
|
+
/* @__PURE__ */ l("h2", { children: Hn })
|
|
3630
3659
|
] })
|
|
3631
3660
|
] })
|
|
3632
3661
|
] });
|
|
3633
|
-
},
|
|
3634
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } =
|
|
3662
|
+
}, Zn = () => {
|
|
3663
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = rt(), [a, n] = j(""), [o, s] = j(""), [i, u] = j(!0), [h, p] = j({
|
|
3635
3664
|
username: "",
|
|
3636
3665
|
password: ""
|
|
3637
3666
|
}), m = async (c) => {
|
|
@@ -3645,14 +3674,14 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3645
3674
|
}, 500);
|
|
3646
3675
|
}), Q(() => {
|
|
3647
3676
|
t && s(t);
|
|
3648
|
-
}, [t]), /* @__PURE__ */
|
|
3649
|
-
/* @__PURE__ */
|
|
3650
|
-
/* @__PURE__ */ l("div", { className:
|
|
3651
|
-
/* @__PURE__ */
|
|
3652
|
-
/* @__PURE__ */ l(
|
|
3677
|
+
}, [t]), /* @__PURE__ */ I(ye, { children: [
|
|
3678
|
+
/* @__PURE__ */ I(fn, { children: [
|
|
3679
|
+
/* @__PURE__ */ l("div", { className: Fa(), children: /* @__PURE__ */ l(Qn, {}) }),
|
|
3680
|
+
/* @__PURE__ */ I("form", { className: "mt-5", onSubmit: m, children: [
|
|
3681
|
+
/* @__PURE__ */ l(vt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ l(le, { span: 6, children: /* @__PURE__ */ I(cn, { mode: "dark", children: [
|
|
3653
3682
|
/* @__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 }) }),
|
|
3654
3683
|
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3655
|
-
|
|
3684
|
+
st,
|
|
3656
3685
|
{
|
|
3657
3686
|
required: !0,
|
|
3658
3687
|
autoCapitalize: "off",
|
|
@@ -3672,7 +3701,7 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3672
3701
|
}
|
|
3673
3702
|
) }),
|
|
3674
3703
|
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3675
|
-
|
|
3704
|
+
sr,
|
|
3676
3705
|
{
|
|
3677
3706
|
required: !0,
|
|
3678
3707
|
autoCapitalize: "off",
|
|
@@ -3681,8 +3710,8 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3681
3710
|
mode: "dark",
|
|
3682
3711
|
focusMode: "light",
|
|
3683
3712
|
name: "password",
|
|
3684
|
-
label:
|
|
3685
|
-
rightElement: /* @__PURE__ */ l(
|
|
3713
|
+
label: Vn,
|
|
3714
|
+
rightElement: /* @__PURE__ */ l(Qe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ l(hn, {}) : /* @__PURE__ */ l(un, {}) }),
|
|
3686
3715
|
onMaskChange: u,
|
|
3687
3716
|
onChange: (c) => {
|
|
3688
3717
|
p({
|
|
@@ -3695,7 +3724,7 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3695
3724
|
}
|
|
3696
3725
|
) }),
|
|
3697
3726
|
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3698
|
-
|
|
3727
|
+
er,
|
|
3699
3728
|
{
|
|
3700
3729
|
mode: "light",
|
|
3701
3730
|
focusMode: "light",
|
|
@@ -3703,98 +3732,104 @@ const Jn = "av-footer", Yn = (e) => {
|
|
|
3703
3732
|
noBorder: !0,
|
|
3704
3733
|
type: "submit",
|
|
3705
3734
|
className: "mb-4 mt-6",
|
|
3706
|
-
children:
|
|
3735
|
+
children: Bn
|
|
3707
3736
|
}
|
|
3708
3737
|
) })
|
|
3709
3738
|
] }) }) }),
|
|
3710
3739
|
/* @__PURE__ */ l("div", { className: "text-center text-copy-light", children: "or" }),
|
|
3711
|
-
/* @__PURE__ */ l(
|
|
3712
|
-
|
|
3740
|
+
/* @__PURE__ */ l(vt, { alignHorizontal: "center", children: /* @__PURE__ */ l(le, { span: 6, children: /* @__PURE__ */ l(
|
|
3741
|
+
Qe,
|
|
3713
3742
|
{
|
|
3714
3743
|
mode: "dark",
|
|
3715
3744
|
focusMode: "light",
|
|
3716
3745
|
fullWidth: !0,
|
|
3717
3746
|
noBorder: !0,
|
|
3718
3747
|
className: "mb-4 mt-1",
|
|
3719
|
-
labelRight:
|
|
3748
|
+
labelRight: Gn,
|
|
3720
3749
|
onClick: r,
|
|
3721
|
-
children: /* @__PURE__ */ l(
|
|
3750
|
+
children: /* @__PURE__ */ l(mn, { className: "size-7" })
|
|
3722
3751
|
}
|
|
3723
3752
|
) }) })
|
|
3724
3753
|
] })
|
|
3725
3754
|
] }),
|
|
3726
|
-
/* @__PURE__ */ l(
|
|
3755
|
+
/* @__PURE__ */ l(qn, {})
|
|
3727
3756
|
] });
|
|
3728
|
-
},
|
|
3757
|
+
}, eo = new URL(document.location.href).searchParams, to = !!eo.get("debug") || !1, ro = Nt(() => import(
|
|
3729
3758
|
/* webpackChunkName: "LazyApp" */
|
|
3730
|
-
"./App.
|
|
3731
|
-
).then((e) => e.App)),
|
|
3732
|
-
const { isAuthenticated: t } =
|
|
3733
|
-
return t ? /* @__PURE__ */ l(Rt, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(
|
|
3734
|
-
},
|
|
3759
|
+
"./App.68xrhTIC.js"
|
|
3760
|
+
).then((e) => e.App)), ao = ({ isComponent: e }) => {
|
|
3761
|
+
const { isAuthenticated: t } = rt();
|
|
3762
|
+
return t ? /* @__PURE__ */ l(Rt, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(ro, { isComponent: e }) }) : /* @__PURE__ */ l(Zn, {});
|
|
3763
|
+
}, no = ({
|
|
3735
3764
|
isComponent: e = !1,
|
|
3736
|
-
domain: t =
|
|
3737
|
-
}) => /* @__PURE__ */ l(ye, { children: /* @__PURE__ */ l(
|
|
3765
|
+
domain: t = Ja
|
|
3766
|
+
}) => /* @__PURE__ */ l(ye, { children: /* @__PURE__ */ l(Da, { clientId: $a, domain: t, debug: to, children: /* @__PURE__ */ l(ao, { isComponent: e }) }) }), ls = ({ domain: e }) => /* @__PURE__ */ l(no, { isComponent: !0, domain: e });
|
|
3738
3767
|
export {
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
vo as
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
_o as
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3768
|
+
ts as ABOUT_TITLE,
|
|
3769
|
+
No as ACTION_ENGINE,
|
|
3770
|
+
vo as ACTION_MESSAGE,
|
|
3771
|
+
ko as ACTION_MODEL,
|
|
3772
|
+
Ao as ACTION_RESET,
|
|
3773
|
+
Oo as ACTION_RESET_TAGS,
|
|
3774
|
+
So as ACTION_RESTORE,
|
|
3775
|
+
Ro as ACTION_SEARCH,
|
|
3776
|
+
xo as ACTION_SORT,
|
|
3777
|
+
_o as ACTION_STREAMING,
|
|
3778
|
+
Co as ACTION_TOGGLE_TAG,
|
|
3779
|
+
jn as AppContext,
|
|
3780
|
+
qn as AppFooter,
|
|
3781
|
+
ns as CANCEL,
|
|
3782
|
+
ss as CARDS,
|
|
3783
|
+
as as CLEAR,
|
|
3784
|
+
cn as D,
|
|
3785
|
+
Ye as DEFAULT_AI_ENGINE,
|
|
3786
|
+
To as ENGINE_ANTHROPIC,
|
|
3787
|
+
wo as ENGINE_OPENAI,
|
|
3788
|
+
Eo as ERROR_MESSAGE,
|
|
3755
3789
|
ue as G,
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3790
|
+
Io as GPT4_MAX_TOKENS,
|
|
3791
|
+
es as HISTORY_TITLE,
|
|
3792
|
+
is as HistoryContext,
|
|
3793
|
+
$o as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3794
|
+
Do as LOCAL_STORAGE_PREFIX,
|
|
3795
|
+
Lo as LOCAL_STORAGE_SEARCH,
|
|
3796
|
+
Mo as LOCAL_STORAGE_SORT,
|
|
3797
|
+
Ko as LOCAL_STORAGE_TAG_PROOFREAD,
|
|
3798
|
+
Ho as LOCAL_STORAGE_TAG_REPHRASE,
|
|
3799
|
+
Uo as LOCAL_STORAGE_TAG_SUMMARIZE,
|
|
3800
|
+
qo as LOG_OUT,
|
|
3801
|
+
Qn as MessagesContainerHeader,
|
|
3802
|
+
os as NA,
|
|
3803
|
+
Qe as O,
|
|
3804
|
+
Qo as PROFILE_TITLE,
|
|
3805
|
+
er as R,
|
|
3806
|
+
go as ROLE_ASSISTANT,
|
|
3807
|
+
bo as ROLE_HIDDEN,
|
|
3808
|
+
yo as ROLE_INTERNAL,
|
|
3809
|
+
fo as ROLE_SYSTEM,
|
|
3810
|
+
po as ROLE_USER,
|
|
3811
|
+
Xo as SEND,
|
|
3812
|
+
Zo as STATS,
|
|
3813
|
+
Wo as STATS_SEPARATOR,
|
|
3814
|
+
ls as SassySaint,
|
|
3815
|
+
ze as TAGS,
|
|
3816
|
+
Po as TAG_CONTENT,
|
|
3817
|
+
rs as TYPE_QUESTION,
|
|
3818
|
+
cs as TagsContext,
|
|
3819
|
+
vt as b,
|
|
3820
|
+
fn as d,
|
|
3821
|
+
zo as durationFormatter,
|
|
3822
|
+
Jo as extractAverage,
|
|
3788
3823
|
Ke as g,
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3824
|
+
Go as getCurrentGeoLocation,
|
|
3825
|
+
Fa as getMessageContaintWrapperClass,
|
|
3826
|
+
Fo as isLastMessageFromRole,
|
|
3792
3827
|
le as j,
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3828
|
+
st as me,
|
|
3829
|
+
Yo as numberFormatter,
|
|
3830
|
+
jo as pluralize,
|
|
3831
|
+
Vo as renderDataAsList,
|
|
3832
|
+
rt as rn,
|
|
3833
|
+
Bo as truncate,
|
|
3834
|
+
mn as v
|
|
3800
3835
|
};
|