@versini/sassysaint 4.2.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/App.C232zHGs.js +500 -0
- package/dist/chunks/LazyHeader.BcKwtFsD.js +1415 -0
- package/dist/chunks/{LazyMarkdownWithExtra.ewFAuyG5.js → LazyMarkdownWithExtra.CacXy27y.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.Brog9qTL.js → LazyMessageAssistant.9TRoCl8r.js} +4 -4
- package/dist/chunks/{index.BvXbpfqe.js → index.BlSrPZWf.js} +431 -456
- package/dist/chunks/{index.7JJYsiGN.DsnJzdm4.js → index.Bzt9pToY.DmOBHHnp.js} +2 -2
- package/dist/chunks/{useLocalStorage.DJIqD2i3.js → useLocalStorage.C4iGBmg7.js} +166 -156
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
- package/dist/chunks/App.C-MlCVQG.js +0 -570
- package/dist/chunks/LazyHeader.CpW4p3Sk.js +0 -1438
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as c, jsxs as I, Fragment as le } from "react/jsx-runtime";
|
|
2
|
-
import V, { createContext as
|
|
2
|
+
import V, { createContext as rr, useReducer as ft, useRef as G, useCallback as j, useEffect as z, useContext as yt, useSyncExternalStore as ar, useId as bt, useMemo as Et, useState as J, useLayoutEffect as nr, lazy as wt, Suspense as Tt } from "react";
|
|
3
3
|
import f from "clsx";
|
|
4
|
-
var
|
|
4
|
+
var or = Object.defineProperty, sr = (e, t, r) => t in e ? or(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Le = (e, t, r) => sr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
|
-
@versini/auth-provider v7.3.
|
|
6
|
+
@versini/auth-provider v7.3.1
|
|
7
7
|
© 2024 gizmette.com
|
|
8
8
|
*/
|
|
9
9
|
try {
|
|
10
10
|
window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
|
|
11
|
-
version: "7.3.
|
|
12
|
-
buildTime: "09/
|
|
11
|
+
version: "7.3.1",
|
|
12
|
+
buildTime: "09/05/2024 04:25 PM EDT",
|
|
13
13
|
homepage: "https://github.com/aversini/auth-client",
|
|
14
14
|
license: "MIT"
|
|
15
15
|
});
|
|
@@ -22,24 +22,24 @@ function L(e) {
|
|
|
22
22
|
r += String.fromCharCode(a);
|
|
23
23
|
return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function ve(e) {
|
|
26
26
|
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, a = t.padEnd(t.length + r, "="), n = atob(a), o = new ArrayBuffer(n.length), s = new Uint8Array(o);
|
|
27
27
|
for (let i = 0; i < n.length; i++)
|
|
28
28
|
s[i] = n.charCodeAt(i);
|
|
29
29
|
return o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function je() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
34
|
function It(e) {
|
|
35
35
|
const { id: t } = e;
|
|
36
36
|
return {
|
|
37
37
|
...e,
|
|
38
|
-
id:
|
|
38
|
+
id: ve(t),
|
|
39
39
|
transports: e.transports
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function vt(e) {
|
|
43
43
|
return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
|
|
44
44
|
}
|
|
45
45
|
let _ = class extends Error {
|
|
@@ -47,7 +47,7 @@ let _ = class extends Error {
|
|
|
47
47
|
super(t, { cause: a }), this.name = n ?? a.name, this.code = r;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
function
|
|
50
|
+
function ir({ error: e, options: t }) {
|
|
51
51
|
var a, n;
|
|
52
52
|
const { publicKey: r } = t;
|
|
53
53
|
if (!r)
|
|
@@ -97,7 +97,7 @@ function cr({ error: e, options: t }) {
|
|
|
97
97
|
});
|
|
98
98
|
if (e.name === "SecurityError") {
|
|
99
99
|
const o = window.location.hostname;
|
|
100
|
-
if (
|
|
100
|
+
if (vt(o)) {
|
|
101
101
|
if (r.rp.id !== o)
|
|
102
102
|
return new _({
|
|
103
103
|
message: `The RP ID "${r.rp.id}" is invalid for this domain`,
|
|
@@ -125,7 +125,7 @@ function cr({ error: e, options: t }) {
|
|
|
125
125
|
}
|
|
126
126
|
return e;
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class cr {
|
|
129
129
|
createNewAbortSignal() {
|
|
130
130
|
if (this.controller) {
|
|
131
131
|
const r = new Error("Cancelling existing WebAuthn API call for new one");
|
|
@@ -141,30 +141,30 @@ class lr {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
function
|
|
146
|
-
if (e && !(
|
|
144
|
+
const St = new cr(), lr = ["cross-platform", "platform"];
|
|
145
|
+
function At(e) {
|
|
146
|
+
if (e && !(lr.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
|
-
async function
|
|
149
|
+
async function dr(e) {
|
|
150
150
|
var m;
|
|
151
|
-
if (!
|
|
151
|
+
if (!je())
|
|
152
152
|
throw new Error("WebAuthn is not supported in this browser");
|
|
153
153
|
const t = { publicKey: {
|
|
154
154
|
...e,
|
|
155
|
-
challenge:
|
|
155
|
+
challenge: ve(e.challenge),
|
|
156
156
|
user: {
|
|
157
157
|
...e.user,
|
|
158
|
-
id:
|
|
158
|
+
id: ve(e.user.id)
|
|
159
159
|
},
|
|
160
160
|
excludeCredentials: (m = e.excludeCredentials) == null ? void 0 : m.map(It)
|
|
161
161
|
} };
|
|
162
|
-
t.signal =
|
|
162
|
+
t.signal = St.createNewAbortSignal();
|
|
163
163
|
let r;
|
|
164
164
|
try {
|
|
165
165
|
r = await navigator.credentials.create(t);
|
|
166
166
|
} catch (l) {
|
|
167
|
-
throw
|
|
167
|
+
throw ir({ error: l, options: t });
|
|
168
168
|
}
|
|
169
169
|
if (!r)
|
|
170
170
|
throw new Error("Registration was not completed");
|
|
@@ -206,20 +206,20 @@ async function ur(e) {
|
|
|
206
206
|
},
|
|
207
207
|
type: s,
|
|
208
208
|
clientExtensionResults: r.getClientExtensionResults(),
|
|
209
|
-
authenticatorAttachment:
|
|
209
|
+
authenticatorAttachment: At(r.authenticatorAttachment)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
function Me(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 ur() {
|
|
217
|
+
if (!je())
|
|
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 mr({ 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 hr({ error: e, options: t }) {
|
|
|
239
239
|
});
|
|
240
240
|
if (e.name === "SecurityError") {
|
|
241
241
|
const a = window.location.hostname;
|
|
242
|
-
if (
|
|
242
|
+
if (vt(a)) {
|
|
243
243
|
if (r.rpId !== a)
|
|
244
244
|
return new _({
|
|
245
245
|
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
@@ -260,30 +260,30 @@ function hr({ error: e, options: t }) {
|
|
|
260
260
|
}
|
|
261
261
|
return e;
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
263
|
+
async function hr(e, t = !1) {
|
|
264
264
|
var m, l;
|
|
265
|
-
if (!
|
|
265
|
+
if (!je())
|
|
266
266
|
throw new Error("WebAuthn is not supported in this browser");
|
|
267
267
|
let r;
|
|
268
268
|
((m = e.allowCredentials) == null ? void 0 : m.length) !== 0 && (r = (l = e.allowCredentials) == null ? void 0 : l.map(It));
|
|
269
269
|
const a = {
|
|
270
270
|
...e,
|
|
271
|
-
challenge:
|
|
271
|
+
challenge: ve(e.challenge),
|
|
272
272
|
allowCredentials: r
|
|
273
273
|
}, n = {};
|
|
274
274
|
if (t) {
|
|
275
|
-
if (!await
|
|
275
|
+
if (!await ur())
|
|
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 = St.createNewAbortSignal();
|
|
282
282
|
let o;
|
|
283
283
|
try {
|
|
284
284
|
o = await navigator.credentials.get(n);
|
|
285
285
|
} catch (d) {
|
|
286
|
-
throw
|
|
286
|
+
throw mr({ error: d, options: n });
|
|
287
287
|
}
|
|
288
288
|
if (!o)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
@@ -300,17 +300,17 @@ async function pr(e, t = !1) {
|
|
|
300
300
|
},
|
|
301
301
|
type: h,
|
|
302
302
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
303
|
-
authenticatorAttachment:
|
|
303
|
+
authenticatorAttachment: At(o.authenticatorAttachment)
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
/*!
|
|
307
|
-
@versini/auth-common v4.1.
|
|
307
|
+
@versini/auth-common v4.1.1
|
|
308
308
|
© 2024 gizmette.com
|
|
309
309
|
*/
|
|
310
310
|
try {
|
|
311
311
|
window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
|
|
312
|
-
version: "4.1.
|
|
313
|
-
buildTime: "09/
|
|
312
|
+
version: "4.1.1",
|
|
313
|
+
buildTime: "09/05/2024 04:25 PM EDT",
|
|
314
314
|
homepage: "https://github.com/aversini/auth-client",
|
|
315
315
|
license: "MIT"
|
|
316
316
|
});
|
|
@@ -338,7 +338,7 @@ const ne = {
|
|
|
338
338
|
SCOPES_KEY: "scopes",
|
|
339
339
|
CLIENT_ID_KEY: "aud",
|
|
340
340
|
ISSUER: "gizmette.com"
|
|
341
|
-
},
|
|
341
|
+
}, pr = `-----BEGIN PUBLIC KEY-----
|
|
342
342
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
343
343
|
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
344
344
|
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
@@ -352,14 +352,14 @@ awIDAQAB
|
|
|
352
352
|
LOGIN: "login",
|
|
353
353
|
REFRESH: "refresh"
|
|
354
354
|
}, Ne = crypto, _t = (e) => e instanceof CryptoKey, me = new TextEncoder(), de = new TextDecoder();
|
|
355
|
-
function
|
|
355
|
+
function gr(...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 fr = (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 yr = (e) => {
|
|
|
368
368
|
let t = e;
|
|
369
369
|
t instanceof Uint8Array && (t = de.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
370
370
|
try {
|
|
371
|
-
return
|
|
371
|
+
return fr(t);
|
|
372
372
|
} catch {
|
|
373
373
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
374
374
|
}
|
|
@@ -398,7 +398,7 @@ class tt extends q {
|
|
|
398
398
|
super(t), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
class
|
|
401
|
+
class yr extends q {
|
|
402
402
|
constructor() {
|
|
403
403
|
super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
404
404
|
}
|
|
@@ -414,7 +414,7 @@ class F extends q {
|
|
|
414
414
|
return "ERR_JOSE_NOT_SUPPORTED";
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
let
|
|
417
|
+
let A = class extends q {
|
|
418
418
|
constructor() {
|
|
419
419
|
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
420
420
|
}
|
|
@@ -429,7 +429,7 @@ let v = class extends q {
|
|
|
429
429
|
return "ERR_JWT_INVALID";
|
|
430
430
|
}
|
|
431
431
|
};
|
|
432
|
-
class
|
|
432
|
+
class br extends q {
|
|
433
433
|
constructor() {
|
|
434
434
|
super(...arguments), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED", this.message = "signature verification failed";
|
|
435
435
|
}
|
|
@@ -446,7 +446,7 @@ function he(e, t) {
|
|
|
446
446
|
function Ue(e) {
|
|
447
447
|
return parseInt(e.name.slice(4), 10);
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Er(e) {
|
|
450
450
|
switch (e) {
|
|
451
451
|
case "ES256":
|
|
452
452
|
return "P-256";
|
|
@@ -458,7 +458,7 @@ function wr(e) {
|
|
|
458
458
|
throw new Error("unreachable");
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function wr(e, t) {
|
|
462
462
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
463
463
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
464
464
|
if (t.length > 2) {
|
|
@@ -468,7 +468,7 @@ function Tr(e, t) {
|
|
|
468
468
|
throw new TypeError(r);
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function Tr(e, t, ...r) {
|
|
472
472
|
switch (t) {
|
|
473
473
|
case "HS256":
|
|
474
474
|
case "HS384":
|
|
@@ -510,7 +510,7 @@ function Ir(e, t, ...r) {
|
|
|
510
510
|
case "ES512": {
|
|
511
511
|
if (!he(e.algorithm, "ECDSA"))
|
|
512
512
|
throw B("ECDSA");
|
|
513
|
-
const a =
|
|
513
|
+
const a = Er(t);
|
|
514
514
|
if (e.algorithm.namedCurve !== a)
|
|
515
515
|
throw B(a, "algorithm.namedCurve");
|
|
516
516
|
break;
|
|
@@ -518,7 +518,7 @@ function Ir(e, t, ...r) {
|
|
|
518
518
|
default:
|
|
519
519
|
throw new TypeError("CryptoKey does not support this operation");
|
|
520
520
|
}
|
|
521
|
-
|
|
521
|
+
wr(e, r);
|
|
522
522
|
}
|
|
523
523
|
function Rt(e, t, ...r) {
|
|
524
524
|
var a;
|
|
@@ -532,7 +532,7 @@ const rt = (e, ...t) => Rt("Key must be ", e, ...t);
|
|
|
532
532
|
function Nt(e, t, ...r) {
|
|
533
533
|
return Rt(`Key for the ${e} algorithm must be `, t, ...r);
|
|
534
534
|
}
|
|
535
|
-
const xt = (e) => _t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
535
|
+
const xt = (e) => _t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Se = ["CryptoKey"], Ir = (...e) => {
|
|
536
536
|
const t = e.filter(Boolean);
|
|
537
537
|
if (t.length === 0 || t.length === 1)
|
|
538
538
|
return !0;
|
|
@@ -551,11 +551,11 @@ const xt = (e) => _t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
551
551
|
}
|
|
552
552
|
return !0;
|
|
553
553
|
};
|
|
554
|
-
function
|
|
554
|
+
function vr(e) {
|
|
555
555
|
return typeof e == "object" && e !== null;
|
|
556
556
|
}
|
|
557
|
-
function
|
|
558
|
-
if (!
|
|
557
|
+
function Ae(e) {
|
|
558
|
+
if (!vr(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
559
559
|
return !1;
|
|
560
560
|
if (Object.getPrototypeOf(e) === null)
|
|
561
561
|
return !0;
|
|
@@ -564,14 +564,14 @@ function ve(e) {
|
|
|
564
564
|
t = Object.getPrototypeOf(t);
|
|
565
565
|
return Object.getPrototypeOf(e) === t;
|
|
566
566
|
}
|
|
567
|
-
const
|
|
567
|
+
const Sr = (e, t) => {
|
|
568
568
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
569
569
|
const { modulusLength: r } = t.algorithm;
|
|
570
570
|
if (typeof r != "number" || r < 2048)
|
|
571
571
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
572
572
|
}
|
|
573
573
|
};
|
|
574
|
-
function
|
|
574
|
+
function Ar(e) {
|
|
575
575
|
let t, r;
|
|
576
576
|
switch (e.kty) {
|
|
577
577
|
case "RSA": {
|
|
@@ -643,10 +643,10 @@ function kr(e) {
|
|
|
643
643
|
}
|
|
644
644
|
return { algorithm: t, keyUsages: r };
|
|
645
645
|
}
|
|
646
|
-
const
|
|
646
|
+
const kr = async (e) => {
|
|
647
647
|
if (!e.alg)
|
|
648
648
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
649
|
-
const { algorithm: t, keyUsages: r } =
|
|
649
|
+
const { algorithm: t, keyUsages: r } = Ar(e), a = [
|
|
650
650
|
t,
|
|
651
651
|
e.ext ?? !1,
|
|
652
652
|
e.key_ops ?? r
|
|
@@ -658,21 +658,21 @@ const Ot = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
658
658
|
let n = e.get(t);
|
|
659
659
|
if (n != null && n[a])
|
|
660
660
|
return n[a];
|
|
661
|
-
const o = await
|
|
661
|
+
const o = await kr({ ...r, alg: a });
|
|
662
662
|
return n ? n[a] = o : e.set(t, { [a]: o }), o;
|
|
663
|
-
},
|
|
663
|
+
}, _r = (e, t) => {
|
|
664
664
|
if (Ot(e)) {
|
|
665
665
|
let r = e.export({ format: "jwk" });
|
|
666
666
|
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Ct(r.k) : (Ke || (Ke = /* @__PURE__ */ new WeakMap()), Pt(Ke, e, r, t));
|
|
667
667
|
}
|
|
668
668
|
return e;
|
|
669
|
-
},
|
|
669
|
+
}, Rr = (e, t) => {
|
|
670
670
|
if (Ot(e)) {
|
|
671
671
|
let r = e.export({ format: "jwk" });
|
|
672
672
|
return r.k ? Ct(r.k) : (He || (He = /* @__PURE__ */ new WeakMap()), Pt(He, e, r, t));
|
|
673
673
|
}
|
|
674
674
|
return e;
|
|
675
|
-
},
|
|
675
|
+
}, Nr = { normalizePublicKey: _r, normalizePrivateKey: Rr }, Y = (e, t, r = 0) => {
|
|
676
676
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
677
677
|
const a = e.indexOf(t[0], r);
|
|
678
678
|
if (a === -1)
|
|
@@ -698,7 +698,7 @@ const Ot = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
698
698
|
default:
|
|
699
699
|
throw new F("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
700
700
|
}
|
|
701
|
-
},
|
|
701
|
+
}, xr = async (e, t, r, a, n) => {
|
|
702
702
|
let o, s;
|
|
703
703
|
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((u) => u.charCodeAt(0)));
|
|
704
704
|
switch (a) {
|
|
@@ -745,32 +745,32 @@ const Ot = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
745
745
|
throw new F('Invalid or unsupported "alg" (Algorithm) value');
|
|
746
746
|
}
|
|
747
747
|
return Ne.subtle.importKey(t, i, o, !1, s);
|
|
748
|
-
},
|
|
749
|
-
async function
|
|
748
|
+
}, Cr = (e, t, r) => xr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
749
|
+
async function Or(e, t, r) {
|
|
750
750
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
751
751
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
752
|
-
return
|
|
752
|
+
return Cr(e, t);
|
|
753
753
|
}
|
|
754
|
-
const we = (e) => e == null ? void 0 : e[Symbol.toStringTag],
|
|
754
|
+
const we = (e) => e == null ? void 0 : e[Symbol.toStringTag], Pr = (e, t) => {
|
|
755
755
|
if (!(t instanceof Uint8Array)) {
|
|
756
756
|
if (!xt(t))
|
|
757
|
-
throw new TypeError(Nt(e, t, ...
|
|
757
|
+
throw new TypeError(Nt(e, t, ...Se, "Uint8Array"));
|
|
758
758
|
if (t.type !== "secret")
|
|
759
759
|
throw new TypeError(`${we(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
760
760
|
}
|
|
761
|
-
},
|
|
761
|
+
}, Dr = (e, t, r) => {
|
|
762
762
|
if (!xt(t))
|
|
763
|
-
throw new TypeError(Nt(e, t, ...
|
|
763
|
+
throw new TypeError(Nt(e, t, ...Se));
|
|
764
764
|
if (t.type === "secret")
|
|
765
765
|
throw new TypeError(`${we(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
766
766
|
if (t.algorithm && r === "verify" && t.type === "private")
|
|
767
767
|
throw new TypeError(`${we(t)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
768
768
|
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
769
769
|
throw new TypeError(`${we(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
770
|
-
},
|
|
771
|
-
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ?
|
|
770
|
+
}, $r = (e, t, r) => {
|
|
771
|
+
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? Pr(e, t) : Dr(e, t, r);
|
|
772
772
|
};
|
|
773
|
-
function
|
|
773
|
+
function Lr(e, t, r, a, n) {
|
|
774
774
|
if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
|
|
775
775
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
776
776
|
if (!a || a.crit === void 0)
|
|
@@ -789,13 +789,13 @@ function Mr(e, t, r, a, n) {
|
|
|
789
789
|
}
|
|
790
790
|
return new Set(a.crit);
|
|
791
791
|
}
|
|
792
|
-
const
|
|
792
|
+
const Mr = (e, t) => {
|
|
793
793
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
794
794
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
795
795
|
if (t)
|
|
796
796
|
return new Set(t);
|
|
797
797
|
};
|
|
798
|
-
function
|
|
798
|
+
function Ur(e, t) {
|
|
799
799
|
const r = `SHA-${e.slice(-3)}`;
|
|
800
800
|
switch (e) {
|
|
801
801
|
case "HS256":
|
|
@@ -820,100 +820,100 @@ function Hr(e, t) {
|
|
|
820
820
|
throw new F(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
|
-
async function
|
|
824
|
-
if (t = await
|
|
825
|
-
return
|
|
823
|
+
async function Hr(e, t, r) {
|
|
824
|
+
if (t = await Nr.normalizePublicKey(t, e), _t(t))
|
|
825
|
+
return Tr(t, e, r), t;
|
|
826
826
|
if (t instanceof Uint8Array) {
|
|
827
827
|
if (!e.startsWith("HS"))
|
|
828
|
-
throw new TypeError(rt(t, ...
|
|
828
|
+
throw new TypeError(rt(t, ...Se));
|
|
829
829
|
return Ne.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
830
830
|
}
|
|
831
|
-
throw new TypeError(rt(t, ...
|
|
831
|
+
throw new TypeError(rt(t, ...Se, "Uint8Array"));
|
|
832
832
|
}
|
|
833
|
-
const
|
|
834
|
-
const n = await
|
|
835
|
-
|
|
836
|
-
const o =
|
|
833
|
+
const Kr = async (e, t, r, a) => {
|
|
834
|
+
const n = await Hr(e, t, "verify");
|
|
835
|
+
Sr(e, n);
|
|
836
|
+
const o = Ur(e, n.algorithm);
|
|
837
837
|
try {
|
|
838
838
|
return await Ne.subtle.verify(o, n, r, a);
|
|
839
839
|
} catch {
|
|
840
840
|
return !1;
|
|
841
841
|
}
|
|
842
842
|
};
|
|
843
|
-
async function
|
|
844
|
-
if (!
|
|
845
|
-
throw new
|
|
843
|
+
async function Br(e, t, r) {
|
|
844
|
+
if (!Ae(e))
|
|
845
|
+
throw new A("Flattened JWS must be an object");
|
|
846
846
|
if (e.protected === void 0 && e.header === void 0)
|
|
847
|
-
throw new
|
|
847
|
+
throw new A('Flattened JWS must have either of the "protected" or "header" members');
|
|
848
848
|
if (e.protected !== void 0 && typeof e.protected != "string")
|
|
849
|
-
throw new
|
|
849
|
+
throw new A("JWS Protected Header incorrect type");
|
|
850
850
|
if (e.payload === void 0)
|
|
851
|
-
throw new
|
|
851
|
+
throw new A("JWS Payload missing");
|
|
852
852
|
if (typeof e.signature != "string")
|
|
853
|
-
throw new
|
|
854
|
-
if (e.header !== void 0 && !
|
|
855
|
-
throw new
|
|
853
|
+
throw new A("JWS Signature missing or incorrect type");
|
|
854
|
+
if (e.header !== void 0 && !Ae(e.header))
|
|
855
|
+
throw new A("JWS Unprotected Header incorrect type");
|
|
856
856
|
let a = {};
|
|
857
857
|
if (e.protected)
|
|
858
858
|
try {
|
|
859
859
|
const y = ie(e.protected);
|
|
860
860
|
a = JSON.parse(de.decode(y));
|
|
861
861
|
} catch {
|
|
862
|
-
throw new
|
|
862
|
+
throw new A("JWS Protected Header is invalid");
|
|
863
863
|
}
|
|
864
|
-
if (!
|
|
865
|
-
throw new
|
|
864
|
+
if (!Ir(a, e.header))
|
|
865
|
+
throw new A("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
866
866
|
const n = {
|
|
867
867
|
...a,
|
|
868
868
|
...e.header
|
|
869
|
-
}, o =
|
|
869
|
+
}, o = Lr(A, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
|
|
870
870
|
let s = !0;
|
|
871
871
|
if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
|
|
872
|
-
throw new
|
|
872
|
+
throw new A('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
873
873
|
const { alg: i } = n;
|
|
874
874
|
if (typeof i != "string" || !i)
|
|
875
|
-
throw new
|
|
876
|
-
const u = r &&
|
|
875
|
+
throw new A('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
876
|
+
const u = r && Mr("algorithms", r.algorithms);
|
|
877
877
|
if (u && !u.has(i))
|
|
878
|
-
throw new
|
|
878
|
+
throw new yr('"alg" (Algorithm) Header Parameter value not allowed');
|
|
879
879
|
if (s) {
|
|
880
880
|
if (typeof e.payload != "string")
|
|
881
|
-
throw new
|
|
881
|
+
throw new A("JWS Payload must be a string");
|
|
882
882
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
883
|
-
throw new
|
|
883
|
+
throw new A("JWS Payload must be a string or an Uint8Array instance");
|
|
884
884
|
let h = !1;
|
|
885
|
-
typeof t == "function" && (t = await t(a, e), h = !0),
|
|
886
|
-
const p =
|
|
885
|
+
typeof t == "function" && (t = await t(a, e), h = !0), $r(i, t, "verify");
|
|
886
|
+
const p = gr(me.encode(e.protected ?? ""), me.encode("."), typeof e.payload == "string" ? me.encode(e.payload) : e.payload);
|
|
887
887
|
let m;
|
|
888
888
|
try {
|
|
889
889
|
m = ie(e.signature);
|
|
890
890
|
} catch {
|
|
891
|
-
throw new
|
|
891
|
+
throw new A("Failed to base64url decode the signature");
|
|
892
892
|
}
|
|
893
|
-
if (!await
|
|
894
|
-
throw new
|
|
893
|
+
if (!await Kr(i, t, m, p))
|
|
894
|
+
throw new br();
|
|
895
895
|
let l;
|
|
896
896
|
if (s)
|
|
897
897
|
try {
|
|
898
898
|
l = ie(e.payload);
|
|
899
899
|
} catch {
|
|
900
|
-
throw new
|
|
900
|
+
throw new A("Failed to base64url decode the payload");
|
|
901
901
|
}
|
|
902
902
|
else typeof e.payload == "string" ? l = me.encode(e.payload) : l = e.payload;
|
|
903
903
|
const d = { payload: l };
|
|
904
904
|
return e.protected !== void 0 && (d.protectedHeader = a), e.header !== void 0 && (d.unprotectedHeader = e.header), h ? { ...d, key: t } : d;
|
|
905
905
|
}
|
|
906
|
-
async function
|
|
906
|
+
async function Wr(e, t, r) {
|
|
907
907
|
if (e instanceof Uint8Array && (e = de.decode(e)), typeof e != "string")
|
|
908
|
-
throw new
|
|
908
|
+
throw new A("Compact JWS must be a string or Uint8Array");
|
|
909
909
|
const { 0: a, 1: n, 2: o, length: s } = e.split(".");
|
|
910
910
|
if (s !== 3)
|
|
911
|
-
throw new
|
|
912
|
-
const i = await
|
|
911
|
+
throw new A("Invalid Compact JWS");
|
|
912
|
+
const i = await Br({ payload: n, protected: a, signature: o }, t, r), u = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
913
913
|
return typeof t == "function" ? { ...u, key: i.key } : u;
|
|
914
914
|
}
|
|
915
|
-
const
|
|
916
|
-
const t =
|
|
915
|
+
const Gr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, ze = $t * 24, Vr = ze * 7, Yr = ze * 365.25, Jr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, nt = (e) => {
|
|
916
|
+
const t = Jr.exec(e);
|
|
917
917
|
if (!t || t[4] && t[1])
|
|
918
918
|
throw new TypeError("Invalid time period format");
|
|
919
919
|
const r = parseFloat(t[2]), a = t[3].toLowerCase();
|
|
@@ -943,25 +943,25 @@ const Vr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t
|
|
|
943
943
|
case "day":
|
|
944
944
|
case "days":
|
|
945
945
|
case "d":
|
|
946
|
-
n = Math.round(r *
|
|
946
|
+
n = Math.round(r * ze);
|
|
947
947
|
break;
|
|
948
948
|
case "week":
|
|
949
949
|
case "weeks":
|
|
950
950
|
case "w":
|
|
951
|
-
n = Math.round(r *
|
|
951
|
+
n = Math.round(r * Vr);
|
|
952
952
|
break;
|
|
953
953
|
default:
|
|
954
|
-
n = Math.round(r *
|
|
954
|
+
n = Math.round(r * Yr);
|
|
955
955
|
break;
|
|
956
956
|
}
|
|
957
957
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
958
|
-
}, ot = (e) => e.toLowerCase().replace(/^application\//, ""),
|
|
958
|
+
}, ot = (e) => e.toLowerCase().replace(/^application\//, ""), Fr = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, jr = (e, t, r = {}) => {
|
|
959
959
|
let a;
|
|
960
960
|
try {
|
|
961
961
|
a = JSON.parse(de.decode(t));
|
|
962
962
|
} catch {
|
|
963
963
|
}
|
|
964
|
-
if (!
|
|
964
|
+
if (!Ae(a))
|
|
965
965
|
throw new W("JWT Claims Set must be a top-level JSON object");
|
|
966
966
|
const { typ: n } = r;
|
|
967
967
|
if (n && (typeof e.typ != "string" || ot(e.typ) !== ot(n)))
|
|
@@ -975,7 +975,7 @@ const Vr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t
|
|
|
975
975
|
throw new $('unexpected "iss" claim value', a, "iss", "check_failed");
|
|
976
976
|
if (i && a.sub !== i)
|
|
977
977
|
throw new $('unexpected "sub" claim value', a, "sub", "check_failed");
|
|
978
|
-
if (u && !
|
|
978
|
+
if (u && !Fr(a.aud, typeof u == "string" ? [u] : u))
|
|
979
979
|
throw new $('unexpected "aud" claim value', a, "aud", "check_failed");
|
|
980
980
|
let m;
|
|
981
981
|
switch (typeof r.clockTolerance) {
|
|
@@ -991,7 +991,7 @@ const Vr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t
|
|
|
991
991
|
default:
|
|
992
992
|
throw new TypeError("Invalid clockTolerance option type");
|
|
993
993
|
}
|
|
994
|
-
const { currentDate: l } = r, d =
|
|
994
|
+
const { currentDate: l } = r, d = Gr(l || /* @__PURE__ */ new Date());
|
|
995
995
|
if ((a.iat !== void 0 || h) && typeof a.iat != "number")
|
|
996
996
|
throw new $('"iat" claim must be a number', a, "iat", "invalid");
|
|
997
997
|
if (a.nbf !== void 0) {
|
|
@@ -1015,16 +1015,16 @@ const Vr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t
|
|
|
1015
1015
|
}
|
|
1016
1016
|
return a;
|
|
1017
1017
|
};
|
|
1018
|
-
async function
|
|
1018
|
+
async function zr(e, t, r) {
|
|
1019
1019
|
var a;
|
|
1020
|
-
const n = await
|
|
1020
|
+
const n = await Wr(e, t, r);
|
|
1021
1021
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
1022
1022
|
throw new W("JWTs MUST NOT use unencoded payload");
|
|
1023
1023
|
const o = { payload: jr(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
|
|
1024
1024
|
return typeof t == "function" ? { ...o, key: n.key } : o;
|
|
1025
1025
|
}
|
|
1026
|
-
const
|
|
1027
|
-
function
|
|
1026
|
+
const qr = ie;
|
|
1027
|
+
function Qr(e) {
|
|
1028
1028
|
if (typeof e != "string")
|
|
1029
1029
|
throw new W("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1030
1030
|
const { 1: t, length: r } = e.split(".");
|
|
@@ -1036,7 +1036,7 @@ function Xr(e) {
|
|
|
1036
1036
|
throw new W("JWTs must contain a payload");
|
|
1037
1037
|
let a;
|
|
1038
1038
|
try {
|
|
1039
|
-
a =
|
|
1039
|
+
a = qr(t);
|
|
1040
1040
|
} catch {
|
|
1041
1041
|
throw new W("Failed to base64url decode the payload");
|
|
1042
1042
|
}
|
|
@@ -1046,62 +1046,62 @@ function Xr(e) {
|
|
|
1046
1046
|
} catch {
|
|
1047
1047
|
throw new W("Failed to parse the decoded payload as JSON");
|
|
1048
1048
|
}
|
|
1049
|
-
if (!
|
|
1049
|
+
if (!Ae(n))
|
|
1050
1050
|
throw new W("Invalid JWT Claims Set");
|
|
1051
1051
|
return n;
|
|
1052
1052
|
}
|
|
1053
1053
|
const ce = async (e) => {
|
|
1054
1054
|
try {
|
|
1055
|
-
const t = k.ALG, r = await
|
|
1056
|
-
return await
|
|
1055
|
+
const t = k.ALG, r = await Or(pr, t);
|
|
1056
|
+
return await zr(e, r, {
|
|
1057
1057
|
issuer: k.ISSUER
|
|
1058
1058
|
});
|
|
1059
1059
|
} catch {
|
|
1060
1060
|
return;
|
|
1061
1061
|
}
|
|
1062
|
-
},
|
|
1062
|
+
}, Xr = (e) => {
|
|
1063
1063
|
try {
|
|
1064
|
-
return
|
|
1064
|
+
return Qr(e);
|
|
1065
1065
|
} catch {
|
|
1066
1066
|
return;
|
|
1067
1067
|
}
|
|
1068
1068
|
};
|
|
1069
|
-
var
|
|
1069
|
+
var v = [];
|
|
1070
1070
|
for (var Be = 0; Be < 256; ++Be)
|
|
1071
|
-
|
|
1072
|
-
function
|
|
1073
|
-
return (
|
|
1071
|
+
v.push((Be + 256).toString(16).slice(1));
|
|
1072
|
+
function Zr(e, t = 0) {
|
|
1073
|
+
return (v[e[t + 0]] + v[e[t + 1]] + v[e[t + 2]] + v[e[t + 3]] + "-" + v[e[t + 4]] + v[e[t + 5]] + "-" + v[e[t + 6]] + v[e[t + 7]] + "-" + v[e[t + 8]] + v[e[t + 9]] + "-" + v[e[t + 10]] + v[e[t + 11]] + v[e[t + 12]] + v[e[t + 13]] + v[e[t + 14]] + v[e[t + 15]]).toLowerCase();
|
|
1074
1074
|
}
|
|
1075
|
-
var pe,
|
|
1076
|
-
function
|
|
1075
|
+
var pe, ea = new Uint8Array(16);
|
|
1076
|
+
function ta() {
|
|
1077
1077
|
if (!pe && (pe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !pe))
|
|
1078
1078
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1079
|
-
return pe(
|
|
1079
|
+
return pe(ea);
|
|
1080
1080
|
}
|
|
1081
|
-
var
|
|
1081
|
+
var ra = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1082
1082
|
const st = {
|
|
1083
|
-
randomUUID:
|
|
1083
|
+
randomUUID: ra
|
|
1084
1084
|
};
|
|
1085
1085
|
function it(e, t, r) {
|
|
1086
1086
|
if (st.randomUUID && !t && !e)
|
|
1087
1087
|
return st.randomUUID();
|
|
1088
1088
|
e = e || {};
|
|
1089
|
-
var a = e.random || (e.rng ||
|
|
1090
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1089
|
+
var a = e.random || (e.rng || ta)();
|
|
1090
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Zr(a);
|
|
1091
1091
|
}
|
|
1092
|
-
const ct = globalThis.crypto,
|
|
1092
|
+
const ct = globalThis.crypto, aa = (e) => `${it()}${it()}`.slice(0, e), na = (e) => btoa(
|
|
1093
1093
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1094
1094
|
);
|
|
1095
|
-
async function
|
|
1095
|
+
async function oa(e) {
|
|
1096
1096
|
if (!ct.subtle)
|
|
1097
1097
|
throw new Error(
|
|
1098
1098
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1099
1099
|
);
|
|
1100
1100
|
const t = new TextEncoder().encode(e), r = await ct.subtle.digest("SHA-256", t);
|
|
1101
|
-
return
|
|
1101
|
+
return na(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1102
1102
|
}
|
|
1103
|
-
async function
|
|
1104
|
-
const t =
|
|
1103
|
+
async function sa(e) {
|
|
1104
|
+
const t = aa(43), r = await oa(t);
|
|
1105
1105
|
return {
|
|
1106
1106
|
code_verifier: t,
|
|
1107
1107
|
code_challenge: r
|
|
@@ -1115,29 +1115,29 @@ const lt = (e, t) => {
|
|
|
1115
1115
|
typeof t == "function" ? t() : t
|
|
1116
1116
|
);
|
|
1117
1117
|
window.localStorage.setItem(e, r), Lt(e, r);
|
|
1118
|
-
},
|
|
1118
|
+
}, ia = (e) => {
|
|
1119
1119
|
window.localStorage.removeItem(e), Lt(e, null);
|
|
1120
|
-
}, dt = (e) => window.localStorage.getItem(e),
|
|
1120
|
+
}, dt = (e) => window.localStorage.getItem(e), ca = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
1121
1121
|
function ge({
|
|
1122
1122
|
key: e,
|
|
1123
1123
|
initialValue: t
|
|
1124
1124
|
}) {
|
|
1125
|
-
const r =
|
|
1125
|
+
const r = ar(ca, () => dt(e)), a = j(
|
|
1126
1126
|
(s) => {
|
|
1127
1127
|
try {
|
|
1128
1128
|
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
1129
|
-
i == null ?
|
|
1129
|
+
i == null ? ia(e) : lt(e, i);
|
|
1130
1130
|
} catch (i) {
|
|
1131
1131
|
console.warn(i);
|
|
1132
1132
|
}
|
|
1133
1133
|
},
|
|
1134
1134
|
[e, r]
|
|
1135
|
-
), n =
|
|
1135
|
+
), n = j(() => {
|
|
1136
1136
|
a(t);
|
|
1137
|
-
}, [t, a]), o =
|
|
1137
|
+
}, [t, a]), o = j(() => {
|
|
1138
1138
|
a(null);
|
|
1139
1139
|
}, [a]);
|
|
1140
|
-
return
|
|
1140
|
+
return z(() => {
|
|
1141
1141
|
try {
|
|
1142
1142
|
dt(e) === null && typeof t < "u" && lt(e, t);
|
|
1143
1143
|
} catch (s) {
|
|
@@ -1145,30 +1145,30 @@ function ge({
|
|
|
1145
1145
|
}
|
|
1146
1146
|
}, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
|
|
1147
1147
|
}
|
|
1148
|
-
var
|
|
1148
|
+
var S = [];
|
|
1149
1149
|
for (var We = 0; We < 256; ++We)
|
|
1150
|
-
|
|
1151
|
-
function
|
|
1152
|
-
return (
|
|
1150
|
+
S.push((We + 256).toString(16).slice(1));
|
|
1151
|
+
function la(e, t = 0) {
|
|
1152
|
+
return (S[e[t + 0]] + S[e[t + 1]] + S[e[t + 2]] + S[e[t + 3]] + "-" + S[e[t + 4]] + S[e[t + 5]] + "-" + S[e[t + 6]] + S[e[t + 7]] + "-" + S[e[t + 8]] + S[e[t + 9]] + "-" + S[e[t + 10]] + S[e[t + 11]] + S[e[t + 12]] + S[e[t + 13]] + S[e[t + 14]] + S[e[t + 15]]).toLowerCase();
|
|
1153
1153
|
}
|
|
1154
|
-
var fe,
|
|
1155
|
-
function
|
|
1154
|
+
var fe, da = new Uint8Array(16);
|
|
1155
|
+
function ua() {
|
|
1156
1156
|
if (!fe && (fe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !fe))
|
|
1157
1157
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1158
|
-
return fe(
|
|
1158
|
+
return fe(da);
|
|
1159
1159
|
}
|
|
1160
|
-
var
|
|
1160
|
+
var ma = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1161
1161
|
const ut = {
|
|
1162
|
-
randomUUID:
|
|
1162
|
+
randomUUID: ma
|
|
1163
1163
|
};
|
|
1164
1164
|
function Ge(e, t, r) {
|
|
1165
1165
|
if (ut.randomUUID && !t && !e)
|
|
1166
1166
|
return ut.randomUUID();
|
|
1167
1167
|
e = e || {};
|
|
1168
|
-
var a = e.random || (e.rng ||
|
|
1169
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1168
|
+
var a = e.random || (e.rng || ua)();
|
|
1169
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, la(a);
|
|
1170
1170
|
}
|
|
1171
|
-
const Z = "Your session has expired. For your security, please log in again to continue.",
|
|
1171
|
+
const Z = "Your session has expired. For your security, please log in again to continue.", ha = "Your session has been successfully terminated.", Ve = "Login failed. Please try again.", pa = "Error getting access token, please re-authenticate.", ga = "You forgot to wrap your component in <AuthProvider>.", ke = {
|
|
1172
1172
|
dev: "https://auth.gizmette.local.com:3003",
|
|
1173
1173
|
prod: "https://mylogin.gizmette.com/auth"
|
|
1174
1174
|
}, ye = "@@auth@@", se = "LOADING", Te = "LOGIN", Mt = "LOGOUT", ue = "success", M = "failure", Ut = "include", Ht = "POST", Kt = "application/json", be = {
|
|
@@ -1330,21 +1330,21 @@ const Z = "Your session has expired. For your security, please log in again to c
|
|
|
1330
1330
|
} catch (a) {
|
|
1331
1331
|
return console.error(a), { status: M, data: [] };
|
|
1332
1332
|
}
|
|
1333
|
-
},
|
|
1333
|
+
}, fa = process.env.NODE_ENV === "production", Bt = !fa, Wt = {
|
|
1334
1334
|
isLoading: !0,
|
|
1335
1335
|
isAuthenticated: !1,
|
|
1336
1336
|
user: void 0,
|
|
1337
1337
|
logoutReason: "",
|
|
1338
1338
|
debug: !1,
|
|
1339
1339
|
authenticationType: ""
|
|
1340
|
-
},
|
|
1340
|
+
}, ya = (e) => {
|
|
1341
1341
|
try {
|
|
1342
|
-
const t =
|
|
1342
|
+
const t = Xr(e);
|
|
1343
1343
|
return t ? t[k.USER_ID_KEY] : "";
|
|
1344
1344
|
} catch {
|
|
1345
1345
|
return "";
|
|
1346
1346
|
}
|
|
1347
|
-
},
|
|
1347
|
+
}, ba = async ({
|
|
1348
1348
|
userId: e,
|
|
1349
1349
|
clientId: t,
|
|
1350
1350
|
domain: r,
|
|
@@ -1368,7 +1368,7 @@ const Z = "Your session has expired. For your security, please log in again to c
|
|
|
1368
1368
|
status: M
|
|
1369
1369
|
};
|
|
1370
1370
|
}
|
|
1371
|
-
},
|
|
1371
|
+
}, Ea = async ({
|
|
1372
1372
|
username: e,
|
|
1373
1373
|
password: t,
|
|
1374
1374
|
clientId: r,
|
|
@@ -1412,7 +1412,7 @@ const Z = "Your session has expired. For your security, please log in again to c
|
|
|
1412
1412
|
status: !1
|
|
1413
1413
|
};
|
|
1414
1414
|
}
|
|
1415
|
-
},
|
|
1415
|
+
}, wa = async ({
|
|
1416
1416
|
nonce: e,
|
|
1417
1417
|
clientId: t,
|
|
1418
1418
|
code_challenge: r
|
|
@@ -1441,7 +1441,7 @@ const Z = "Your session has expired. For your security, please log in again to c
|
|
|
1441
1441
|
data: ""
|
|
1442
1442
|
};
|
|
1443
1443
|
}
|
|
1444
|
-
},
|
|
1444
|
+
}, Ta = async ({
|
|
1445
1445
|
clientId: e,
|
|
1446
1446
|
userId: t,
|
|
1447
1447
|
nonce: r,
|
|
@@ -1477,7 +1477,7 @@ const Z = "Your session has expired. For your security, please log in again to c
|
|
|
1477
1477
|
};
|
|
1478
1478
|
}
|
|
1479
1479
|
};
|
|
1480
|
-
class
|
|
1480
|
+
class Ia {
|
|
1481
1481
|
constructor(t = null, r = null) {
|
|
1482
1482
|
Le(this, "refreshTokenPromise", null), Le(this, "accessToken"), Le(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1483
1483
|
}
|
|
@@ -1507,7 +1507,7 @@ class Sa {
|
|
|
1507
1507
|
}) {
|
|
1508
1508
|
const o = await ce(this.refreshToken);
|
|
1509
1509
|
if (o && o.payload[k.USER_ID_KEY] !== "") {
|
|
1510
|
-
const s = await
|
|
1510
|
+
const s = await Ta({
|
|
1511
1511
|
clientId: t,
|
|
1512
1512
|
userId: r,
|
|
1513
1513
|
nonce: a,
|
|
@@ -1528,14 +1528,14 @@ class Sa {
|
|
|
1528
1528
|
};
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
|
-
const
|
|
1531
|
+
const va = (e) => j(
|
|
1532
1532
|
(...t) => {
|
|
1533
1533
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1534
1534
|
},
|
|
1535
1535
|
[e]
|
|
1536
1536
|
), re = () => {
|
|
1537
|
-
throw new Error(
|
|
1538
|
-
}, Gt =
|
|
1537
|
+
throw new Error(ga);
|
|
1538
|
+
}, Gt = rr({
|
|
1539
1539
|
isAuthenticated: !1,
|
|
1540
1540
|
isLoading: !1,
|
|
1541
1541
|
login: re,
|
|
@@ -1546,11 +1546,11 @@ const Aa = (e) => z(
|
|
|
1546
1546
|
loginWithPasskey: re,
|
|
1547
1547
|
logoutReason: "",
|
|
1548
1548
|
authenticationType: ""
|
|
1549
|
-
}),
|
|
1549
|
+
}), Sa = V.createContext({
|
|
1550
1550
|
state: Wt,
|
|
1551
1551
|
dispatch: () => {
|
|
1552
1552
|
}
|
|
1553
|
-
}),
|
|
1553
|
+
}), Aa = (e, t) => (t == null ? void 0 : t.type) === se ? {
|
|
1554
1554
|
...e,
|
|
1555
1555
|
isLoading: t.payload.isLoading
|
|
1556
1556
|
} : (t == null ? void 0 : t.type) === Te ? {
|
|
@@ -1567,17 +1567,17 @@ const Aa = (e) => z(
|
|
|
1567
1567
|
user: void 0,
|
|
1568
1568
|
authenticationType: "",
|
|
1569
1569
|
logoutReason: t.payload.logoutReason
|
|
1570
|
-
} : e,
|
|
1570
|
+
} : e, ka = ({
|
|
1571
1571
|
children: e,
|
|
1572
1572
|
sessionExpiration: t,
|
|
1573
1573
|
clientId: r,
|
|
1574
1574
|
domain: a = "",
|
|
1575
1575
|
debug: n = !1
|
|
1576
1576
|
}) => {
|
|
1577
|
-
const [o, s] = ft(
|
|
1577
|
+
const [o, s] = ft(Aa, {
|
|
1578
1578
|
...Wt,
|
|
1579
1579
|
debug: n
|
|
1580
|
-
}), i =
|
|
1580
|
+
}), i = va(n), u = G(!1), [h, p, , m] = ge({
|
|
1581
1581
|
key: `${ye}::${r}::@@user@@`
|
|
1582
1582
|
}), [l, d, , y] = ge({
|
|
1583
1583
|
key: `${ye}::${r}::@@access@@`
|
|
@@ -1587,7 +1587,7 @@ const Aa = (e) => z(
|
|
|
1587
1587
|
}
|
|
1588
1588
|
), [U, H, , O] = ge({
|
|
1589
1589
|
key: `${ye}::${r}::@@nonce@@`
|
|
1590
|
-
}), oe = new
|
|
1590
|
+
}), oe = new Ia(l, E), P = j(() => {
|
|
1591
1591
|
i("removeLocalStorage: removing local storage"), m(), y(), w(), O();
|
|
1592
1592
|
}, [
|
|
1593
1593
|
y,
|
|
@@ -1595,7 +1595,7 @@ const Aa = (e) => z(
|
|
|
1595
1595
|
O,
|
|
1596
1596
|
w,
|
|
1597
1597
|
i
|
|
1598
|
-
]), N =
|
|
1598
|
+
]), N = j(
|
|
1599
1599
|
(g) => {
|
|
1600
1600
|
i(
|
|
1601
1601
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
@@ -1608,13 +1608,13 @@ const Aa = (e) => z(
|
|
|
1608
1608
|
}), P(), s({ type: se, payload: { isLoading: !1 } });
|
|
1609
1609
|
},
|
|
1610
1610
|
[P, i]
|
|
1611
|
-
), x =
|
|
1611
|
+
), x = j(
|
|
1612
1612
|
async (g) => {
|
|
1613
1613
|
i("invalidateAndLogout: invalidating and logging out");
|
|
1614
|
-
const { user: T } = o, b = (T == null ? void 0 : T.userId) ||
|
|
1614
|
+
const { user: T } = o, b = (T == null ? void 0 : T.userId) || ya(h);
|
|
1615
1615
|
b || i(
|
|
1616
1616
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1617
|
-
), await
|
|
1617
|
+
), await ba({
|
|
1618
1618
|
userId: b,
|
|
1619
1619
|
clientId: r,
|
|
1620
1620
|
domain: a,
|
|
@@ -1623,7 +1623,7 @@ const Aa = (e) => z(
|
|
|
1623
1623
|
},
|
|
1624
1624
|
[h, o, r, a, N, i]
|
|
1625
1625
|
);
|
|
1626
|
-
|
|
1626
|
+
z(() => {
|
|
1627
1627
|
if (!u.current)
|
|
1628
1628
|
return o.isLoading && h !== null ? (async () => {
|
|
1629
1629
|
try {
|
|
@@ -1652,13 +1652,13 @@ const Aa = (e) => z(
|
|
|
1652
1652
|
s({ type: se, payload: { isLoading: !0 } }), P();
|
|
1653
1653
|
const b = Ge();
|
|
1654
1654
|
H(b), i("login: Logging in with password");
|
|
1655
|
-
const { code_verifier: Q, code_challenge:
|
|
1655
|
+
const { code_verifier: Q, code_challenge: tr } = await sa(), et = await wa({
|
|
1656
1656
|
nonce: b,
|
|
1657
1657
|
clientId: r,
|
|
1658
|
-
code_challenge:
|
|
1658
|
+
code_challenge: tr
|
|
1659
1659
|
});
|
|
1660
1660
|
if (et.status) {
|
|
1661
|
-
const X = await
|
|
1661
|
+
const X = await Ea({
|
|
1662
1662
|
username: g,
|
|
1663
1663
|
password: T,
|
|
1664
1664
|
clientId: r,
|
|
@@ -1684,7 +1684,7 @@ const Aa = (e) => z(
|
|
|
1684
1684
|
}
|
|
1685
1685
|
return !1;
|
|
1686
1686
|
}, Pe = async (g) => {
|
|
1687
|
-
g == null || g.preventDefault(), await x(
|
|
1687
|
+
g == null || g.preventDefault(), await x(ha);
|
|
1688
1688
|
}, De = async () => {
|
|
1689
1689
|
const { isAuthenticated: g, user: T } = o;
|
|
1690
1690
|
try {
|
|
@@ -1712,7 +1712,7 @@ const Aa = (e) => z(
|
|
|
1712
1712
|
} catch {
|
|
1713
1713
|
return i(
|
|
1714
1714
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1715
|
-
), await x(
|
|
1715
|
+
), await x(pa), "";
|
|
1716
1716
|
}
|
|
1717
1717
|
}, C = () => o.isAuthenticated && h ? h : "", K = async () => {
|
|
1718
1718
|
const { user: g } = o;
|
|
@@ -1728,7 +1728,7 @@ const Aa = (e) => z(
|
|
|
1728
1728
|
});
|
|
1729
1729
|
if (T.status)
|
|
1730
1730
|
try {
|
|
1731
|
-
const b = await
|
|
1731
|
+
const b = await dr(T.data);
|
|
1732
1732
|
return T = await te({
|
|
1733
1733
|
accessToken: l,
|
|
1734
1734
|
clientId: r,
|
|
@@ -1770,7 +1770,7 @@ const Aa = (e) => z(
|
|
|
1770
1770
|
});
|
|
1771
1771
|
if (b.status)
|
|
1772
1772
|
try {
|
|
1773
|
-
const Q = await
|
|
1773
|
+
const Q = await hr(b.data);
|
|
1774
1774
|
return b = await te({
|
|
1775
1775
|
accessToken: l,
|
|
1776
1776
|
clientId: r,
|
|
@@ -1812,7 +1812,7 @@ const Aa = (e) => z(
|
|
|
1812
1812
|
}
|
|
1813
1813
|
return !1;
|
|
1814
1814
|
};
|
|
1815
|
-
return /* @__PURE__ */ c(
|
|
1815
|
+
return /* @__PURE__ */ c(Sa.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ c(
|
|
1816
1816
|
Gt.Provider,
|
|
1817
1817
|
{
|
|
1818
1818
|
value: {
|
|
@@ -1827,8 +1827,8 @@ const Aa = (e) => z(
|
|
|
1827
1827
|
children: e
|
|
1828
1828
|
}
|
|
1829
1829
|
) });
|
|
1830
|
-
}, qe = (e = Gt) => yt(e),
|
|
1831
|
-
function
|
|
1830
|
+
}, qe = (e = Gt) => yt(e), Xn = "user", Zn = "assistant", eo = "system", to = "internal", ro = "hidden", ao = "I'm having trouble right now. Please try again later.", no = "gpt-4", oo = 128e3, so = "action-message", io = "action-reset", co = "action-model", lo = "action-restore", uo = "action-streaming", mo = "action-search", ho = "action-sort", po = "sassy-saint-", go = "details", fo = "search", yo = "sort", bo = "==stats==", _a = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", mt = (e) => Number.isFinite(e) ? e : 0;
|
|
1831
|
+
function Ra(e) {
|
|
1832
1832
|
return {
|
|
1833
1833
|
days: Math.trunc(e / 864e5),
|
|
1834
1834
|
hours: Math.trunc(e / 36e5 % 24),
|
|
@@ -1839,7 +1839,7 @@ function Na(e) {
|
|
|
1839
1839
|
nanoseconds: Math.trunc(mt(e * 1e6) % 1e3)
|
|
1840
1840
|
};
|
|
1841
1841
|
}
|
|
1842
|
-
function
|
|
1842
|
+
function Na(e) {
|
|
1843
1843
|
return {
|
|
1844
1844
|
days: e / 86400000n,
|
|
1845
1845
|
hours: e / 3600000n % 24n,
|
|
@@ -1850,20 +1850,20 @@ function xa(e) {
|
|
|
1850
1850
|
nanoseconds: 0n
|
|
1851
1851
|
};
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function xa(e) {
|
|
1854
1854
|
switch (typeof e) {
|
|
1855
1855
|
case "number": {
|
|
1856
1856
|
if (Number.isFinite(e))
|
|
1857
|
-
return
|
|
1857
|
+
return Ra(e);
|
|
1858
1858
|
break;
|
|
1859
1859
|
}
|
|
1860
1860
|
case "bigint":
|
|
1861
|
-
return
|
|
1861
|
+
return Na(e);
|
|
1862
1862
|
}
|
|
1863
1863
|
throw new TypeError("Expected a finite number or bigint");
|
|
1864
1864
|
}
|
|
1865
|
-
const
|
|
1866
|
-
function
|
|
1865
|
+
const Ca = (e) => e === 0 || e === 0n, Oa = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Pa = 1e-7, Da = 24n * 60n * 60n * 1000n;
|
|
1866
|
+
function $a(e, t) {
|
|
1867
1867
|
const r = typeof e == "bigint";
|
|
1868
1868
|
if (!r && !Number.isFinite(e))
|
|
1869
1869
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -1872,18 +1872,18 @@ function La(e, t) {
|
|
|
1872
1872
|
e = e < 0 ? -e : e, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
|
|
1873
1873
|
let n = [];
|
|
1874
1874
|
const o = (p, m) => {
|
|
1875
|
-
const l = Math.floor(p * 10 ** m +
|
|
1875
|
+
const l = Math.floor(p * 10 ** m + Pa);
|
|
1876
1876
|
return (Math.round(l) / 10 ** m).toFixed(m);
|
|
1877
1877
|
}, s = (p, m, l, d) => {
|
|
1878
|
-
if (!((n.length === 0 || !t.colonNotation) &&
|
|
1878
|
+
if (!((n.length === 0 || !t.colonNotation) && Ca(p) && !(t.colonNotation && l === "m"))) {
|
|
1879
1879
|
if (d ?? (d = String(p)), t.colonNotation) {
|
|
1880
1880
|
const y = d.includes(".") ? d.split(".")[0].length : d.length, E = n.length > 0 ? 2 : 1;
|
|
1881
1881
|
d = "0".repeat(Math.max(0, E - y)) + d;
|
|
1882
1882
|
} else
|
|
1883
|
-
d += t.verbose ? " " +
|
|
1883
|
+
d += t.verbose ? " " + Oa(m, p) : l;
|
|
1884
1884
|
n.push(d);
|
|
1885
1885
|
}
|
|
1886
|
-
}, i =
|
|
1886
|
+
}, i = xa(e), u = BigInt(i.days);
|
|
1887
1887
|
if (s(u / 365n, "year", "y"), s(u % 365n, "day", "d"), s(Number(i.hours), "hour", "h"), s(Number(i.minutes), "minute", "m"), t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1888
1888
|
const p = Number(i.seconds), m = Number(i.milliseconds), l = Number(i.microseconds), d = Number(i.nanoseconds);
|
|
1889
1889
|
if (s(p, "second", "s"), t.formatSubMilliseconds)
|
|
@@ -1898,7 +1898,7 @@ function La(e, t) {
|
|
|
1898
1898
|
);
|
|
1899
1899
|
}
|
|
1900
1900
|
} else {
|
|
1901
|
-
const p = (r ? Number(e %
|
|
1901
|
+
const p = (r ? Number(e % Da) : e) / 1e3 % 60, m = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, l = o(p, m), d = t.keepDecimalsOnWholeSeconds ? l : l.replace(/\.0+$/, "");
|
|
1902
1902
|
s(Number.parseFloat(d), "second", "s", d);
|
|
1903
1903
|
}
|
|
1904
1904
|
if (n.length === 0)
|
|
@@ -1906,25 +1906,7 @@ function La(e, t) {
|
|
|
1906
1906
|
const h = t.colonNotation ? ":" : " ";
|
|
1907
1907
|
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(h);
|
|
1908
1908
|
}
|
|
1909
|
-
const
|
|
1910
|
-
const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N", a = 0 | Math.abs(e), n = 0 | Math.abs(e) * 60 % 60, o = (0 | Math.abs(e) * 60 % 1 * 6e3) / 100;
|
|
1911
|
-
return {
|
|
1912
|
-
dir: r,
|
|
1913
|
-
deg: a,
|
|
1914
|
-
min: n,
|
|
1915
|
-
sec: o
|
|
1916
|
-
};
|
|
1917
|
-
}, So = (e) => {
|
|
1918
|
-
if (!e && e !== 0)
|
|
1919
|
-
return "N/A";
|
|
1920
|
-
const t = Vt(e, !1);
|
|
1921
|
-
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
1922
|
-
}, Ao = (e) => {
|
|
1923
|
-
if (!e && e !== 0)
|
|
1924
|
-
return "N/A";
|
|
1925
|
-
const t = Vt(e, !0);
|
|
1926
|
-
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
1927
|
-
}, vo = async () => {
|
|
1909
|
+
const La = process.env.NODE_ENV === "production", Qe = !La, Ma = Qe ? "gizmette.local.com" : "gizmette.com", Eo = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, wo = async () => {
|
|
1928
1910
|
const e = {
|
|
1929
1911
|
/**
|
|
1930
1912
|
* A boolean value that indicates the application would
|
|
@@ -1973,11 +1955,11 @@ const Ma = process.env.NODE_ENV === "production", Qe = !Ma, Ua = Qe ? "gizmette.
|
|
|
1973
1955
|
e
|
|
1974
1956
|
);
|
|
1975
1957
|
});
|
|
1976
|
-
},
|
|
1958
|
+
}, To = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ c("dl", { className: "my-0", children: /* @__PURE__ */ I("div", { className: "flex items-center justify-between", children: [
|
|
1977
1959
|
/* @__PURE__ */ c("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
1978
1960
|
/* @__PURE__ */ c("dd", { className: "my-1 inline-block", children: t[r] })
|
|
1979
1961
|
] }) }, `${e}-${r}`)) : null;
|
|
1980
|
-
function
|
|
1962
|
+
function Io({
|
|
1981
1963
|
data: e,
|
|
1982
1964
|
formatter: t = (r) => r
|
|
1983
1965
|
}) {
|
|
@@ -1989,18 +1971,18 @@ function _o({
|
|
|
1989
1971
|
);
|
|
1990
1972
|
return t(a ? a / r.length : 0);
|
|
1991
1973
|
}
|
|
1992
|
-
const
|
|
1974
|
+
const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, So = new Intl.NumberFormat("en", {
|
|
1993
1975
|
style: "decimal",
|
|
1994
1976
|
signDisplay: "never",
|
|
1995
1977
|
minimumFractionDigits: 0,
|
|
1996
1978
|
maximumFractionDigits: 0
|
|
1997
|
-
}),
|
|
1979
|
+
}), Ao = (e) => e > 0 ? $a(e, {
|
|
1998
1980
|
secondsDecimalDigits: 2,
|
|
1999
1981
|
unitCount: 2
|
|
2000
|
-
}) : "N/A",
|
|
1982
|
+
}) : "N/A", Ua = (e) => f(
|
|
2001
1983
|
"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",
|
|
2002
1984
|
e || Qe ? "pt-4" : "pt-10"
|
|
2003
|
-
),
|
|
1985
|
+
), ko = (e, t) => t === 1 ? e : `${e}s`, Ce = (e) => {
|
|
2004
1986
|
let t = "";
|
|
2005
1987
|
if (typeof e == "number" || typeof e == "string")
|
|
2006
1988
|
t = "m-" + e;
|
|
@@ -2009,7 +1991,7 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2009
1991
|
(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(" ");
|
|
2010
1992
|
}
|
|
2011
1993
|
return t;
|
|
2012
|
-
},
|
|
1994
|
+
}, _o = "av-bubble", ht = "av-button", Ie = "av-card", Ha = "av-footer", Ka = "av-main", Ro = "av-messagebox", No = "av-panel", xo = "av-spinner", Vt = "icon", Yt = "button", Ba = "link", Wa = ({
|
|
2013
1995
|
type: e,
|
|
2014
1996
|
size: t,
|
|
2015
1997
|
labelRight: r,
|
|
@@ -2018,19 +2000,19 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2018
2000
|
}) => {
|
|
2019
2001
|
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";
|
|
2020
2002
|
switch (e) {
|
|
2021
|
-
case
|
|
2003
|
+
case Yt:
|
|
2022
2004
|
return f("px-4", {
|
|
2023
2005
|
[o]: t === "small",
|
|
2024
2006
|
[s]: t === "medium",
|
|
2025
2007
|
[i]: t === "large"
|
|
2026
2008
|
});
|
|
2027
|
-
case
|
|
2009
|
+
case Ba:
|
|
2028
2010
|
return f("px-4 text-center", {
|
|
2029
2011
|
[o]: t === "small",
|
|
2030
2012
|
[s]: t === "medium",
|
|
2031
2013
|
[i]: t === "large"
|
|
2032
2014
|
});
|
|
2033
|
-
case
|
|
2015
|
+
case Vt:
|
|
2034
2016
|
return f("inline-flex items-center", {
|
|
2035
2017
|
"justify-center": n === "center",
|
|
2036
2018
|
"justify-start": n === "left",
|
|
@@ -2043,7 +2025,7 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2043
2025
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
2044
2026
|
});
|
|
2045
2027
|
}
|
|
2046
|
-
},
|
|
2028
|
+
}, Ga = ({
|
|
2047
2029
|
mode: e,
|
|
2048
2030
|
noBackground: t,
|
|
2049
2031
|
noTruncate: r,
|
|
@@ -2075,7 +2057,7 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2075
2057
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
2076
2058
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
2077
2059
|
});
|
|
2078
|
-
},
|
|
2060
|
+
}, Va = ({
|
|
2079
2061
|
mode: e,
|
|
2080
2062
|
disabled: t,
|
|
2081
2063
|
variant: r
|
|
@@ -2103,7 +2085,7 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2103
2085
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
2104
2086
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
2105
2087
|
});
|
|
2106
|
-
},
|
|
2088
|
+
}, Ya = ({
|
|
2107
2089
|
mode: e,
|
|
2108
2090
|
disabled: t,
|
|
2109
2091
|
variant: r
|
|
@@ -2131,7 +2113,7 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2131
2113
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
2132
2114
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
2133
2115
|
});
|
|
2134
|
-
},
|
|
2116
|
+
}, Ja = ({
|
|
2135
2117
|
mode: e,
|
|
2136
2118
|
noBorder: t,
|
|
2137
2119
|
variant: r
|
|
@@ -2159,12 +2141,12 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2159
2141
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
2160
2142
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
2161
2143
|
});
|
|
2162
|
-
},
|
|
2144
|
+
}, Fa = ({ focusMode: e }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2163
2145
|
"focus:outline-focus-dark": e === "dark",
|
|
2164
2146
|
"focus:outline-focus-light": e === "light",
|
|
2165
2147
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2166
2148
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2167
|
-
}),
|
|
2149
|
+
}), Jt = ({
|
|
2168
2150
|
type: e,
|
|
2169
2151
|
className: t,
|
|
2170
2152
|
raw: r,
|
|
@@ -2185,12 +2167,12 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2185
2167
|
ht,
|
|
2186
2168
|
t,
|
|
2187
2169
|
Ce(m),
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2170
|
+
Ga({ mode: a, variant: d, noBackground: l, noTruncate: y }),
|
|
2171
|
+
Wa({ type: e, size: i, labelRight: h, labelLeft: p, align: E }),
|
|
2172
|
+
Ja({ mode: a, variant: d, noBorder: u }),
|
|
2173
|
+
Fa({ focusMode: n }),
|
|
2174
|
+
Va({ mode: a, variant: d, disabled: o }),
|
|
2192
2175
|
Ya({ mode: a, variant: d, disabled: o }),
|
|
2193
|
-
Ja({ mode: a, variant: d, disabled: o }),
|
|
2194
2176
|
{
|
|
2195
2177
|
"w-full": s,
|
|
2196
2178
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
@@ -2235,8 +2217,8 @@ const Fe = V.forwardRef(
|
|
|
2235
2217
|
align: R = "center",
|
|
2236
2218
|
...w
|
|
2237
2219
|
}, U) => {
|
|
2238
|
-
const H =
|
|
2239
|
-
type:
|
|
2220
|
+
const H = Jt({
|
|
2221
|
+
type: Vt,
|
|
2240
2222
|
mode: r,
|
|
2241
2223
|
focusMode: a,
|
|
2242
2224
|
fullWidth: n,
|
|
@@ -2275,7 +2257,7 @@ const Fe = V.forwardRef(
|
|
|
2275
2257
|
}
|
|
2276
2258
|
);
|
|
2277
2259
|
Fe.displayName = "ButtonIcon";
|
|
2278
|
-
const
|
|
2260
|
+
const Ft = V.forwardRef(
|
|
2279
2261
|
({
|
|
2280
2262
|
children: e,
|
|
2281
2263
|
disabled: t = !1,
|
|
@@ -2291,8 +2273,8 @@ const zt = V.forwardRef(
|
|
|
2291
2273
|
noTruncate: m = !1,
|
|
2292
2274
|
...l
|
|
2293
2275
|
}, d) => {
|
|
2294
|
-
const y =
|
|
2295
|
-
type:
|
|
2276
|
+
const y = Jt({
|
|
2277
|
+
type: Yt,
|
|
2296
2278
|
mode: r,
|
|
2297
2279
|
focusMode: a,
|
|
2298
2280
|
fullWidth: n,
|
|
@@ -2317,12 +2299,12 @@ const zt = V.forwardRef(
|
|
|
2317
2299
|
);
|
|
2318
2300
|
}
|
|
2319
2301
|
);
|
|
2320
|
-
|
|
2321
|
-
function
|
|
2302
|
+
Ft.displayName = "Button";
|
|
2303
|
+
function za(e) {
|
|
2322
2304
|
const t = bt();
|
|
2323
2305
|
return `${e}${t}`;
|
|
2324
2306
|
}
|
|
2325
|
-
const
|
|
2307
|
+
const qa = ({
|
|
2326
2308
|
className: e,
|
|
2327
2309
|
headerClassName: t,
|
|
2328
2310
|
bodyClassName: r,
|
|
@@ -2364,7 +2346,7 @@ const Qa = ({
|
|
|
2364
2346
|
footer: m
|
|
2365
2347
|
};
|
|
2366
2348
|
};
|
|
2367
|
-
function
|
|
2349
|
+
function Qa({
|
|
2368
2350
|
id: e,
|
|
2369
2351
|
content: t,
|
|
2370
2352
|
userAriaLabelledby: r,
|
|
@@ -2372,7 +2354,7 @@ function Xa({
|
|
|
2372
2354
|
}) {
|
|
2373
2355
|
return typeof t == "string" ? /* @__PURE__ */ c("h2", { id: e, className: a, children: t }) : r ? /* @__PURE__ */ c("div", { className: a, children: t }) : t ? /* @__PURE__ */ c("div", { className: a, id: e, children: t }) : null;
|
|
2374
2356
|
}
|
|
2375
|
-
const
|
|
2357
|
+
const Xa = ({
|
|
2376
2358
|
header: e,
|
|
2377
2359
|
headerClassName: t,
|
|
2378
2360
|
footer: r,
|
|
@@ -2388,7 +2370,7 @@ const Za = ({
|
|
|
2388
2370
|
...l
|
|
2389
2371
|
}) => {
|
|
2390
2372
|
let d = null, y = null;
|
|
2391
|
-
const E = typeof e == "string", R =
|
|
2373
|
+
const E = typeof e == "string", R = za(Ie), w = qa({
|
|
2392
2374
|
className: o,
|
|
2393
2375
|
headerClassName: t,
|
|
2394
2376
|
bodyClassName: s,
|
|
@@ -2408,7 +2390,7 @@ const Za = ({
|
|
|
2408
2390
|
...l,
|
|
2409
2391
|
children: [
|
|
2410
2392
|
/* @__PURE__ */ c(
|
|
2411
|
-
|
|
2393
|
+
Qa,
|
|
2412
2394
|
{
|
|
2413
2395
|
...d && { id: d },
|
|
2414
2396
|
content: e,
|
|
@@ -2421,7 +2403,7 @@ const Za = ({
|
|
|
2421
2403
|
]
|
|
2422
2404
|
}
|
|
2423
2405
|
) });
|
|
2424
|
-
},
|
|
2406
|
+
}, Za = ({
|
|
2425
2407
|
className: e,
|
|
2426
2408
|
mode: t = "system",
|
|
2427
2409
|
row1: r,
|
|
@@ -2430,7 +2412,7 @@ const Za = ({
|
|
|
2430
2412
|
spacing: o,
|
|
2431
2413
|
raw: s = !1
|
|
2432
2414
|
}) => {
|
|
2433
|
-
const i = f(
|
|
2415
|
+
const i = f(Ha, e, Ce(o), {
|
|
2434
2416
|
"text-copy-dark": !s && t === "dark",
|
|
2435
2417
|
"text-copy-lighter": !s && t === "light",
|
|
2436
2418
|
"text-copy-dark dark:text-copy-lighter": !s && t === "system",
|
|
@@ -2442,31 +2424,31 @@ const Za = ({
|
|
|
2442
2424
|
r && /* @__PURE__ */ c("div", { children: r }),
|
|
2443
2425
|
a && /* @__PURE__ */ c("div", { children: a })
|
|
2444
2426
|
] });
|
|
2445
|
-
},
|
|
2427
|
+
}, en = ({
|
|
2446
2428
|
children: e,
|
|
2447
2429
|
className: t,
|
|
2448
2430
|
raw: r = !1,
|
|
2449
2431
|
spacing: a
|
|
2450
2432
|
}) => {
|
|
2451
|
-
const n = f(t,
|
|
2433
|
+
const n = f(t, Ka, Ce(a), {
|
|
2452
2434
|
"mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
|
|
2453
2435
|
});
|
|
2454
2436
|
return /* @__PURE__ */ c("main", { className: n, children: e });
|
|
2455
2437
|
};
|
|
2456
2438
|
/*!
|
|
2457
|
-
@versini/ui-components v5.21.
|
|
2439
|
+
@versini/ui-components v5.21.3
|
|
2458
2440
|
© 2024 gizmette.com
|
|
2459
2441
|
*/
|
|
2460
2442
|
try {
|
|
2461
2443
|
window.__VERSINI_UI_GLOBAL__ || (window.__VERSINI_UI_GLOBAL__ = {
|
|
2462
|
-
version: "5.21.
|
|
2463
|
-
buildTime: "
|
|
2444
|
+
version: "5.21.3",
|
|
2445
|
+
buildTime: "09/05/2024 01:34 PM EDT",
|
|
2464
2446
|
homepage: "https://github.com/aversini/ui-components",
|
|
2465
2447
|
license: "MIT"
|
|
2466
2448
|
});
|
|
2467
2449
|
} catch {
|
|
2468
2450
|
}
|
|
2469
|
-
function
|
|
2451
|
+
function tn(e) {
|
|
2470
2452
|
return Et(() => e.every((t) => t == null) ? () => {
|
|
2471
2453
|
} : (t) => {
|
|
2472
2454
|
e.forEach((r) => {
|
|
@@ -2474,7 +2456,34 @@ function rn(e) {
|
|
|
2474
2456
|
});
|
|
2475
2457
|
}, e);
|
|
2476
2458
|
}
|
|
2477
|
-
function
|
|
2459
|
+
function rn() {
|
|
2460
|
+
const e = G(!1);
|
|
2461
|
+
return z(() => (e.current = !0, () => {
|
|
2462
|
+
e.current = !1;
|
|
2463
|
+
}), []), j(() => e.current, []);
|
|
2464
|
+
}
|
|
2465
|
+
const an = {
|
|
2466
|
+
x: 0,
|
|
2467
|
+
y: 0,
|
|
2468
|
+
width: 0,
|
|
2469
|
+
height: 0,
|
|
2470
|
+
top: 0,
|
|
2471
|
+
left: 0,
|
|
2472
|
+
bottom: 0,
|
|
2473
|
+
right: 0
|
|
2474
|
+
};
|
|
2475
|
+
function nn(e) {
|
|
2476
|
+
const t = rn(), r = G(0), a = G(null), [n, o] = J(an), s = Et(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
2477
|
+
const u = i[0];
|
|
2478
|
+
u && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
2479
|
+
a.current && t() && o(u.contentRect);
|
|
2480
|
+
}));
|
|
2481
|
+
}), [t]);
|
|
2482
|
+
return z(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
2483
|
+
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
2484
|
+
}), [s, e]), [a, n];
|
|
2485
|
+
}
|
|
2486
|
+
function on(e) {
|
|
2478
2487
|
const t = bt();
|
|
2479
2488
|
if (!e)
|
|
2480
2489
|
return t;
|
|
@@ -2485,7 +2494,7 @@ function an(e) {
|
|
|
2485
2494
|
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
2486
2495
|
}
|
|
2487
2496
|
}
|
|
2488
|
-
const jt = "SET_ANNOUNCEMENT",
|
|
2497
|
+
const jt = "SET_ANNOUNCEMENT", zt = "CLEAR_ANNOUNCEMENT", sn = {
|
|
2489
2498
|
alert: null,
|
|
2490
2499
|
alertdialog: null,
|
|
2491
2500
|
log: "polite",
|
|
@@ -2493,14 +2502,14 @@ const jt = "SET_ANNOUNCEMENT", qt = "CLEAR_ANNOUNCEMENT", nn = {
|
|
|
2493
2502
|
progressbar: null,
|
|
2494
2503
|
status: "polite",
|
|
2495
2504
|
timer: "assertive"
|
|
2496
|
-
},
|
|
2505
|
+
}, cn = (e, t) => {
|
|
2497
2506
|
switch (t == null ? void 0 : t.type) {
|
|
2498
2507
|
case jt:
|
|
2499
2508
|
return {
|
|
2500
2509
|
...e,
|
|
2501
2510
|
announcement: t.payload
|
|
2502
2511
|
};
|
|
2503
|
-
case
|
|
2512
|
+
case zt:
|
|
2504
2513
|
return {
|
|
2505
2514
|
...e,
|
|
2506
2515
|
announcement: null
|
|
@@ -2508,12 +2517,12 @@ const jt = "SET_ANNOUNCEMENT", qt = "CLEAR_ANNOUNCEMENT", nn = {
|
|
|
2508
2517
|
default:
|
|
2509
2518
|
return e;
|
|
2510
2519
|
}
|
|
2511
|
-
},
|
|
2520
|
+
}, ln = ({
|
|
2512
2521
|
onAnnouncementClear: e,
|
|
2513
2522
|
dispatch: t
|
|
2514
2523
|
}) => {
|
|
2515
2524
|
t({
|
|
2516
|
-
type:
|
|
2525
|
+
type: zt
|
|
2517
2526
|
}), typeof e == "function" && e();
|
|
2518
2527
|
}, pt = ({
|
|
2519
2528
|
children: e,
|
|
@@ -2526,13 +2535,13 @@ const jt = "SET_ANNOUNCEMENT", qt = "CLEAR_ANNOUNCEMENT", nn = {
|
|
|
2526
2535
|
type: jt,
|
|
2527
2536
|
payload: e
|
|
2528
2537
|
}), t && (r.current = setTimeout(
|
|
2529
|
-
() =>
|
|
2538
|
+
() => ln({
|
|
2530
2539
|
onAnnouncementClear: a,
|
|
2531
2540
|
dispatch: n
|
|
2532
2541
|
}),
|
|
2533
2542
|
t
|
|
2534
2543
|
));
|
|
2535
|
-
},
|
|
2544
|
+
}, dn = ({
|
|
2536
2545
|
children: e,
|
|
2537
2546
|
announcementTimeoutRef: t,
|
|
2538
2547
|
announcementDelay: r,
|
|
@@ -2555,7 +2564,7 @@ const jt = "SET_ANNOUNCEMENT", qt = "CLEAR_ANNOUNCEMENT", nn = {
|
|
|
2555
2564
|
dispatch: s
|
|
2556
2565
|
});
|
|
2557
2566
|
};
|
|
2558
|
-
function
|
|
2567
|
+
function qt({
|
|
2559
2568
|
children: e,
|
|
2560
2569
|
className: t,
|
|
2561
2570
|
politeness: r,
|
|
@@ -2566,12 +2575,12 @@ function Qt({
|
|
|
2566
2575
|
visible: i,
|
|
2567
2576
|
...u
|
|
2568
2577
|
}) {
|
|
2569
|
-
const h = G(), p = G(), [m, l] = ft(
|
|
2578
|
+
const h = G(), p = G(), [m, l] = ft(cn, {
|
|
2570
2579
|
announcement: null
|
|
2571
2580
|
});
|
|
2572
2581
|
let d = r;
|
|
2573
|
-
typeof d > "u" && (d = a ?
|
|
2574
|
-
|
|
2582
|
+
typeof d > "u" && (d = a ? sn[a] : "assertive"), z(() => {
|
|
2583
|
+
dn({
|
|
2575
2584
|
announcementTimeoutRef: h,
|
|
2576
2585
|
announcementDelay: n,
|
|
2577
2586
|
children: e,
|
|
@@ -2601,19 +2610,19 @@ function Qt({
|
|
|
2601
2610
|
);
|
|
2602
2611
|
}
|
|
2603
2612
|
/*!
|
|
2604
|
-
@versini/ui-private v1.4.
|
|
2613
|
+
@versini/ui-private v1.4.8
|
|
2605
2614
|
© 2024 gizmette.com
|
|
2606
2615
|
*/
|
|
2607
2616
|
try {
|
|
2608
2617
|
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
2609
|
-
version: "1.4.
|
|
2610
|
-
buildTime: "
|
|
2618
|
+
version: "1.4.8",
|
|
2619
|
+
buildTime: "09/06/2024 06:38 PM EDT",
|
|
2611
2620
|
homepage: "https://github.com/aversini/ui-components",
|
|
2612
2621
|
license: "MIT"
|
|
2613
2622
|
});
|
|
2614
2623
|
} catch {
|
|
2615
2624
|
}
|
|
2616
|
-
const
|
|
2625
|
+
const un = (e) => {
|
|
2617
2626
|
let t = "";
|
|
2618
2627
|
if (typeof e == "number" || typeof e == "string")
|
|
2619
2628
|
t = "m-" + e;
|
|
@@ -2622,52 +2631,21 @@ const ln = (e) => {
|
|
|
2622
2631
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
2623
2632
|
}
|
|
2624
2633
|
return t;
|
|
2625
|
-
},
|
|
2626
|
-
function un() {
|
|
2627
|
-
const e = G(!1);
|
|
2628
|
-
return j(() => (e.current = !0, () => {
|
|
2629
|
-
e.current = !1;
|
|
2630
|
-
}), []), z(() => e.current, []);
|
|
2631
|
-
}
|
|
2632
|
-
const mn = {
|
|
2633
|
-
x: 0,
|
|
2634
|
-
y: 0,
|
|
2635
|
-
width: 0,
|
|
2636
|
-
height: 0,
|
|
2637
|
-
top: 0,
|
|
2638
|
-
left: 0,
|
|
2639
|
-
bottom: 0,
|
|
2640
|
-
right: 0
|
|
2641
|
-
};
|
|
2642
|
-
function hn(e) {
|
|
2643
|
-
const t = un(), r = G(0), a = G(null), [n, o] = J(mn), s = Et(
|
|
2644
|
-
() => typeof window < "u" ? new ResizeObserver((i) => {
|
|
2645
|
-
const u = i[0];
|
|
2646
|
-
u && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
2647
|
-
a.current && t() && o(u.contentRect);
|
|
2648
|
-
}));
|
|
2649
|
-
}) : null,
|
|
2650
|
-
[t]
|
|
2651
|
-
);
|
|
2652
|
-
return j(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
2653
|
-
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
2654
|
-
}), [s, e]), [a, n];
|
|
2655
|
-
}
|
|
2656
|
-
const pn = ({
|
|
2634
|
+
}, Qt = "av-text-input", mn = "av-text-input-wrapper", Ye = "av-text-input-helper-text", Co = "av-text-area", Oo = "av-text-area-wrapper", Po = "av-text-area-helper-text", Do = "av-text-area__control--right", $o = "av-toggle", hn = ({
|
|
2657
2635
|
mode: e
|
|
2658
2636
|
}) => f({
|
|
2659
2637
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
2660
2638
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
2661
2639
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
2662
2640
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
2663
|
-
}),
|
|
2641
|
+
}), pn = ({
|
|
2664
2642
|
focusMode: e
|
|
2665
2643
|
}) => f("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
2666
2644
|
"focus:outline-focus-dark": e === "dark",
|
|
2667
2645
|
"focus:outline-focus-light": e === "light",
|
|
2668
2646
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2669
2647
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2670
|
-
}),
|
|
2648
|
+
}), gn = ({
|
|
2671
2649
|
noBorder: e,
|
|
2672
2650
|
error: t
|
|
2673
2651
|
}) => f("border-2", {
|
|
@@ -2675,7 +2653,7 @@ const pn = ({
|
|
|
2675
2653
|
"focus:border-border-dark": !e && t,
|
|
2676
2654
|
"border-border-error-dark": !e && t,
|
|
2677
2655
|
"border-transparent": e
|
|
2678
|
-
}),
|
|
2656
|
+
}), fn = ({
|
|
2679
2657
|
disabled: e,
|
|
2680
2658
|
raw: t,
|
|
2681
2659
|
error: r,
|
|
@@ -2699,7 +2677,7 @@ const pn = ({
|
|
|
2699
2677
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
2700
2678
|
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
2701
2679
|
});
|
|
2702
|
-
},
|
|
2680
|
+
}, yn = ({
|
|
2703
2681
|
error: e,
|
|
2704
2682
|
raw: t,
|
|
2705
2683
|
mode: r,
|
|
@@ -2726,7 +2704,7 @@ const pn = ({
|
|
|
2726
2704
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
2727
2705
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
2728
2706
|
});
|
|
2729
|
-
},
|
|
2707
|
+
}, bn = ({
|
|
2730
2708
|
className: e,
|
|
2731
2709
|
inputClassName: t,
|
|
2732
2710
|
raw: r,
|
|
@@ -2739,25 +2717,25 @@ const pn = ({
|
|
|
2739
2717
|
}) => {
|
|
2740
2718
|
const h = r ? e : f(
|
|
2741
2719
|
"relative flex w-full flex-col justify-center",
|
|
2742
|
-
|
|
2720
|
+
mn,
|
|
2743
2721
|
e,
|
|
2744
|
-
|
|
2722
|
+
un(s)
|
|
2745
2723
|
), p = r ? f(t) : f(
|
|
2746
|
-
|
|
2724
|
+
Qt,
|
|
2747
2725
|
t,
|
|
2748
2726
|
"h-12 rounded-md px-4 text-base",
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2727
|
+
hn({ mode: i }),
|
|
2728
|
+
pn({ focusMode: u }),
|
|
2729
|
+
gn({ noBorder: n, error: o }),
|
|
2752
2730
|
{
|
|
2753
2731
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
2754
2732
|
}
|
|
2755
|
-
), m = r ? void 0 : "sr-only", l =
|
|
2733
|
+
), m = r ? void 0 : "sr-only", l = fn({
|
|
2756
2734
|
disabled: a,
|
|
2757
2735
|
raw: r,
|
|
2758
2736
|
error: o,
|
|
2759
2737
|
mode: i
|
|
2760
|
-
}), d =
|
|
2738
|
+
}), d = yn({
|
|
2761
2739
|
error: o,
|
|
2762
2740
|
raw: r,
|
|
2763
2741
|
mode: i,
|
|
@@ -2792,7 +2770,7 @@ const pn = ({
|
|
|
2792
2770
|
spacing: R,
|
|
2793
2771
|
...w
|
|
2794
2772
|
}, U) => {
|
|
2795
|
-
const [H, O] =
|
|
2773
|
+
const [H, O] = nn(), [oe, P] = J(0), N = on({ id: e, prefix: `${Qt}-` }), x = `${t} error, ${y}`, D = bn({
|
|
2796
2774
|
className: o,
|
|
2797
2775
|
inputClassName: s,
|
|
2798
2776
|
error: a,
|
|
@@ -2803,7 +2781,7 @@ const pn = ({
|
|
|
2803
2781
|
spacing: R,
|
|
2804
2782
|
mode: i
|
|
2805
2783
|
});
|
|
2806
|
-
return
|
|
2784
|
+
return nr(() => {
|
|
2807
2785
|
O && O.width && P(O.width + 18 + 10);
|
|
2808
2786
|
}, [O]), /* @__PURE__ */ I("div", { className: D.wrapper, children: [
|
|
2809
2787
|
/* @__PURE__ */ c(
|
|
@@ -2856,12 +2834,12 @@ const pn = ({
|
|
|
2856
2834
|
children: E
|
|
2857
2835
|
}
|
|
2858
2836
|
),
|
|
2859
|
-
a && y && /* @__PURE__ */ c(
|
|
2837
|
+
a && y && /* @__PURE__ */ c(qt, { politeness: "polite", clearAnnouncementDelay: 500, children: x })
|
|
2860
2838
|
] });
|
|
2861
2839
|
}
|
|
2862
2840
|
);
|
|
2863
2841
|
Ze.displayName = "TextInput";
|
|
2864
|
-
const
|
|
2842
|
+
const En = 500, wn = 5e3, Tn = 2e4, Xt = V.forwardRef(
|
|
2865
2843
|
({
|
|
2866
2844
|
name: e,
|
|
2867
2845
|
disabled: t,
|
|
@@ -2879,19 +2857,19 @@ const wn = 500, Tn = 5e3, In = 2e4, Zt = V.forwardRef(
|
|
|
2879
2857
|
const [d, y] = J(!0), [E, R] = J({
|
|
2880
2858
|
message: null,
|
|
2881
2859
|
politeness: null
|
|
2882
|
-
}), w = G(!0), U = G(), H = G(null), O =
|
|
2860
|
+
}), w = G(!0), U = G(), H = G(null), O = tn([l, H]), oe = d ? "Show" : "Hide", P = () => {
|
|
2883
2861
|
clearTimeout(U.current), w.current || (U.current = window.setTimeout(() => {
|
|
2884
2862
|
w.current = !0, y(!0), R({
|
|
2885
|
-
announcementTimeout:
|
|
2863
|
+
announcementTimeout: wn,
|
|
2886
2864
|
politeness: "polite",
|
|
2887
2865
|
message: `${r} hiding characters`
|
|
2888
2866
|
}), n && n(!0);
|
|
2889
|
-
},
|
|
2867
|
+
}, Tn));
|
|
2890
2868
|
}, N = (C) => {
|
|
2891
2869
|
C.preventDefault();
|
|
2892
2870
|
const K = !w.current;
|
|
2893
2871
|
w.current = K, P(), y(K), R({
|
|
2894
|
-
announcementTimeout:
|
|
2872
|
+
announcementTimeout: En,
|
|
2895
2873
|
politeness: "assertive",
|
|
2896
2874
|
message: K ? "Characters hidden" : "Characters showing"
|
|
2897
2875
|
}), n && n(K);
|
|
@@ -2906,7 +2884,7 @@ const wn = 500, Tn = 5e3, In = 2e4, Zt = V.forwardRef(
|
|
|
2906
2884
|
}, De = (C) => {
|
|
2907
2885
|
P(), o && o(C);
|
|
2908
2886
|
};
|
|
2909
|
-
return
|
|
2887
|
+
return z(() => () => {
|
|
2910
2888
|
clearTimeout(U.current);
|
|
2911
2889
|
}, []), /* @__PURE__ */ I(le, { children: [
|
|
2912
2890
|
/* @__PURE__ */ c(
|
|
@@ -2933,7 +2911,7 @@ const wn = 500, Tn = 5e3, In = 2e4, Zt = V.forwardRef(
|
|
|
2933
2911
|
}
|
|
2934
2912
|
),
|
|
2935
2913
|
/* @__PURE__ */ c(
|
|
2936
|
-
|
|
2914
|
+
qt,
|
|
2937
2915
|
{
|
|
2938
2916
|
role: "status",
|
|
2939
2917
|
politeness: E.politeness,
|
|
@@ -2944,21 +2922,21 @@ const wn = 500, Tn = 5e3, In = 2e4, Zt = V.forwardRef(
|
|
|
2944
2922
|
] });
|
|
2945
2923
|
}
|
|
2946
2924
|
);
|
|
2947
|
-
|
|
2925
|
+
Xt.displayName = "TextInputMask";
|
|
2948
2926
|
/*!
|
|
2949
|
-
@versini/ui-form v1.3.
|
|
2927
|
+
@versini/ui-form v1.3.8
|
|
2950
2928
|
© 2024 gizmette.com
|
|
2951
2929
|
*/
|
|
2952
2930
|
try {
|
|
2953
2931
|
window.__VERSINI_UI_FORM__ || (window.__VERSINI_UI_FORM__ = {
|
|
2954
|
-
version: "1.3.
|
|
2955
|
-
buildTime: "
|
|
2932
|
+
version: "1.3.8",
|
|
2933
|
+
buildTime: "09/06/2024 06:38 PM EDT",
|
|
2956
2934
|
homepage: "https://github.com/aversini/ui-components",
|
|
2957
2935
|
license: "MIT"
|
|
2958
2936
|
});
|
|
2959
2937
|
} catch {
|
|
2960
2938
|
}
|
|
2961
|
-
const
|
|
2939
|
+
const In = (e) => {
|
|
2962
2940
|
let t = "";
|
|
2963
2941
|
if (typeof e == "number" || typeof e == "string")
|
|
2964
2942
|
t = "m-" + e;
|
|
@@ -2979,7 +2957,7 @@ const Sn = (e) => {
|
|
|
2979
2957
|
semantic: u = !1,
|
|
2980
2958
|
...h
|
|
2981
2959
|
}) => {
|
|
2982
|
-
const p =
|
|
2960
|
+
const p = In(s), m = f(
|
|
2983
2961
|
p,
|
|
2984
2962
|
a || o
|
|
2985
2963
|
);
|
|
@@ -3014,7 +2992,7 @@ try {
|
|
|
3014
2992
|
});
|
|
3015
2993
|
} catch {
|
|
3016
2994
|
}
|
|
3017
|
-
const
|
|
2995
|
+
const vn = ({
|
|
3018
2996
|
className: e,
|
|
3019
2997
|
viewBox: t,
|
|
3020
2998
|
spacing: r,
|
|
@@ -3039,7 +3017,7 @@ const An = ({
|
|
|
3039
3017
|
}
|
|
3040
3018
|
) })
|
|
3041
3019
|
}
|
|
3042
|
-
),
|
|
3020
|
+
), Sn = ({
|
|
3043
3021
|
className: e,
|
|
3044
3022
|
viewBox: t,
|
|
3045
3023
|
spacing: r,
|
|
@@ -3067,7 +3045,7 @@ const An = ({
|
|
|
3067
3045
|
/* @__PURE__ */ c("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z" })
|
|
3068
3046
|
]
|
|
3069
3047
|
}
|
|
3070
|
-
),
|
|
3048
|
+
), An = ({
|
|
3071
3049
|
className: e,
|
|
3072
3050
|
viewBox: t,
|
|
3073
3051
|
spacing: r,
|
|
@@ -3106,7 +3084,7 @@ const An = ({
|
|
|
3106
3084
|
]
|
|
3107
3085
|
}
|
|
3108
3086
|
);
|
|
3109
|
-
},
|
|
3087
|
+
}, kn = ({
|
|
3110
3088
|
className: e,
|
|
3111
3089
|
viewBox: t,
|
|
3112
3090
|
spacing: r,
|
|
@@ -3148,7 +3126,7 @@ try {
|
|
|
3148
3126
|
});
|
|
3149
3127
|
} catch {
|
|
3150
3128
|
}
|
|
3151
|
-
const
|
|
3129
|
+
const _n = (e) => {
|
|
3152
3130
|
let t = "";
|
|
3153
3131
|
if (typeof e == "number" || typeof e == "string")
|
|
3154
3132
|
t = "m-" + e;
|
|
@@ -3157,7 +3135,7 @@ const Rn = (e) => {
|
|
|
3157
3135
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
3158
3136
|
}
|
|
3159
3137
|
return t;
|
|
3160
|
-
},
|
|
3138
|
+
}, Rn = "av-flexgrid", Ee = "av-flexgrid-item", _e = 0.25, Zt = V.createContext({
|
|
3161
3139
|
columnGap: 0,
|
|
3162
3140
|
rowGap: 0
|
|
3163
3141
|
}), gt = ({
|
|
@@ -3187,11 +3165,11 @@ const Rn = (e) => {
|
|
|
3187
3165
|
marginLeft: r * -1 * _e + "rem",
|
|
3188
3166
|
marginTop: a * -1 * _e + "rem"
|
|
3189
3167
|
}, l = f(
|
|
3190
|
-
|
|
3168
|
+
Rn,
|
|
3191
3169
|
t,
|
|
3192
3170
|
"box-border flex flex-wrap"
|
|
3193
3171
|
), d = { columnGap: r, rowGap: a }, y = h ? "div" : V.Fragment;
|
|
3194
|
-
return /* @__PURE__ */ c(y, { ...h ? { className:
|
|
3172
|
+
return /* @__PURE__ */ c(y, { ...h ? { className: _n(h) } : {}, children: /* @__PURE__ */ c("div", { className: l, style: m, ...p, children: /* @__PURE__ */ c(Zt.Provider, { value: d, children: e }) }) });
|
|
3195
3173
|
}, Je = (e, t) => f({
|
|
3196
3174
|
"basis-1/12": e === 1 && !t,
|
|
3197
3175
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
@@ -3265,7 +3243,7 @@ const Rn = (e) => {
|
|
|
3265
3243
|
"lg:basis-full": e === 12 && t === "lg",
|
|
3266
3244
|
"xl:basis-full": e === 12 && t === "xl",
|
|
3267
3245
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
3268
|
-
}),
|
|
3246
|
+
}), Nn = ({
|
|
3269
3247
|
className: e,
|
|
3270
3248
|
span: t
|
|
3271
3249
|
}) => {
|
|
@@ -3294,10 +3272,10 @@ const Rn = (e) => {
|
|
|
3294
3272
|
span: r,
|
|
3295
3273
|
...a
|
|
3296
3274
|
}) => {
|
|
3297
|
-
const { columnGap: n, rowGap: o } = yt(
|
|
3275
|
+
const { columnGap: n, rowGap: o } = yt(Zt), s = {
|
|
3298
3276
|
paddingLeft: n * _e + "rem",
|
|
3299
3277
|
paddingTop: o * _e + "rem"
|
|
3300
|
-
}, i =
|
|
3278
|
+
}, i = Nn({
|
|
3301
3279
|
className: t,
|
|
3302
3280
|
span: r
|
|
3303
3281
|
});
|
|
@@ -3316,7 +3294,7 @@ try {
|
|
|
3316
3294
|
});
|
|
3317
3295
|
} catch {
|
|
3318
3296
|
}
|
|
3319
|
-
const
|
|
3297
|
+
const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "Log in", Pn = "Sign in with a Passkey", Lo = "Log out", Dn = "Password", $n = "Powered by OpenAI", Mo = "Send", Uo = "Profile", Ho = "Statistics", Ko = "Chat history", Bo = "About", Wo = "Type your question here", Go = "Clear chat", Vo = "Cancel chat", Yo = "N/A", Jo = {
|
|
3320
3298
|
PREFERENCES: {
|
|
3321
3299
|
TITLE: "User settings",
|
|
3322
3300
|
NAME: "Name",
|
|
@@ -3350,59 +3328,59 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
|
|
|
3350
3328
|
ENGINE: "OpenAI model",
|
|
3351
3329
|
PLUGIN: "Plugin"
|
|
3352
3330
|
}
|
|
3353
|
-
},
|
|
3331
|
+
}, Ln = ({
|
|
3354
3332
|
serverStats: e
|
|
3355
3333
|
}) => /* @__PURE__ */ c(
|
|
3356
|
-
|
|
3334
|
+
Za,
|
|
3357
3335
|
{
|
|
3358
3336
|
mode: "light",
|
|
3359
3337
|
row1: /* @__PURE__ */ I("div", { children: [
|
|
3360
|
-
|
|
3338
|
+
er,
|
|
3361
3339
|
" v",
|
|
3362
|
-
"4.
|
|
3340
|
+
"4.3.1",
|
|
3363
3341
|
" - ",
|
|
3364
|
-
|
|
3342
|
+
$n,
|
|
3365
3343
|
Qe && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
|
|
3366
3344
|
] }),
|
|
3367
3345
|
row2: /* @__PURE__ */ I("div", { children: [
|
|
3368
3346
|
"© ",
|
|
3369
3347
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
3370
3348
|
" ",
|
|
3371
|
-
|
|
3349
|
+
Cn
|
|
3372
3350
|
] })
|
|
3373
3351
|
}
|
|
3374
|
-
),
|
|
3352
|
+
), Mn = wt(() => import("./LazyHeader.BcKwtFsD.js")), Un = () => {
|
|
3375
3353
|
const { isAuthenticated: e } = qe();
|
|
3376
3354
|
return /* @__PURE__ */ I(le, { children: [
|
|
3377
|
-
e && /* @__PURE__ */ c(Tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(
|
|
3355
|
+
e && /* @__PURE__ */ c(Tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Mn, {}) }),
|
|
3378
3356
|
/* @__PURE__ */ I("div", { className: "flex items-center justify-center", children: [
|
|
3379
|
-
/* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(
|
|
3357
|
+
/* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(vn, {}) }),
|
|
3380
3358
|
/* @__PURE__ */ I("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3381
|
-
/* @__PURE__ */ c("h1", { children:
|
|
3382
|
-
/* @__PURE__ */ c("h2", { children:
|
|
3359
|
+
/* @__PURE__ */ c("h1", { children: er }),
|
|
3360
|
+
/* @__PURE__ */ c("h2", { children: xn })
|
|
3383
3361
|
] })
|
|
3384
3362
|
] })
|
|
3385
3363
|
] });
|
|
3386
|
-
},
|
|
3364
|
+
}, Hn = () => {
|
|
3387
3365
|
const { login: e, logoutReason: t, loginWithPasskey: r } = qe(), [a, n] = J(""), [o, s] = J(""), [i, u] = J(!0), [h, p] = J({
|
|
3388
3366
|
username: "",
|
|
3389
3367
|
password: ""
|
|
3390
3368
|
}), m = async (l) => {
|
|
3391
3369
|
l.preventDefault(), await e(h.username, h.password) || (s(""), n("Invalid username or password"));
|
|
3392
3370
|
};
|
|
3393
|
-
return
|
|
3371
|
+
return z(() => {
|
|
3394
3372
|
var l;
|
|
3395
3373
|
(l = document.getElementById("logo")) == null || l.classList.add("fadeOut"), setTimeout(() => {
|
|
3396
3374
|
var d;
|
|
3397
3375
|
(d = document.getElementById("root")) == null || d.classList.replace("app-hidden", "fadeIn");
|
|
3398
3376
|
}, 500);
|
|
3399
|
-
}),
|
|
3377
|
+
}), z(() => {
|
|
3400
3378
|
t && s(t);
|
|
3401
3379
|
}, [t]), /* @__PURE__ */ I(le, { children: [
|
|
3402
|
-
/* @__PURE__ */ I(
|
|
3403
|
-
/* @__PURE__ */ c("div", { className:
|
|
3380
|
+
/* @__PURE__ */ I(en, { children: [
|
|
3381
|
+
/* @__PURE__ */ c("div", { className: Ua(), children: /* @__PURE__ */ c(Un, {}) }),
|
|
3404
3382
|
/* @__PURE__ */ I("form", { className: "mt-5", onSubmit: m, children: [
|
|
3405
|
-
/* @__PURE__ */ c(gt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ c(ae, { span: 6, children: /* @__PURE__ */ I(
|
|
3383
|
+
/* @__PURE__ */ c(gt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ c(ae, { span: 6, children: /* @__PURE__ */ I(Xa, { mode: "dark", children: [
|
|
3406
3384
|
/* @__PURE__ */ c(ae, { span: 12, children: o && /* @__PURE__ */ c("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
|
|
3407
3385
|
/* @__PURE__ */ c(ae, { span: 12, children: /* @__PURE__ */ c(
|
|
3408
3386
|
Ze,
|
|
@@ -3425,7 +3403,7 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
|
|
|
3425
3403
|
}
|
|
3426
3404
|
) }),
|
|
3427
3405
|
/* @__PURE__ */ c(ae, { span: 12, children: /* @__PURE__ */ c(
|
|
3428
|
-
|
|
3406
|
+
Xt,
|
|
3429
3407
|
{
|
|
3430
3408
|
required: !0,
|
|
3431
3409
|
autoCapitalize: "off",
|
|
@@ -3434,8 +3412,8 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
|
|
|
3434
3412
|
mode: "dark",
|
|
3435
3413
|
focusMode: "light",
|
|
3436
3414
|
name: "password",
|
|
3437
|
-
label:
|
|
3438
|
-
rightElement: /* @__PURE__ */ c(Fe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ c(
|
|
3415
|
+
label: Dn,
|
|
3416
|
+
rightElement: /* @__PURE__ */ c(Fe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ c(kn, {}) : /* @__PURE__ */ c(Sn, {}) }),
|
|
3439
3417
|
onMaskChange: u,
|
|
3440
3418
|
onChange: (l) => {
|
|
3441
3419
|
p({
|
|
@@ -3448,7 +3426,7 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
|
|
|
3448
3426
|
}
|
|
3449
3427
|
) }),
|
|
3450
3428
|
/* @__PURE__ */ c(ae, { span: 12, children: /* @__PURE__ */ c(
|
|
3451
|
-
|
|
3429
|
+
Ft,
|
|
3452
3430
|
{
|
|
3453
3431
|
mode: "light",
|
|
3454
3432
|
focusMode: "light",
|
|
@@ -3456,7 +3434,7 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
|
|
|
3456
3434
|
noBorder: !0,
|
|
3457
3435
|
type: "submit",
|
|
3458
3436
|
className: "mb-4 mt-6",
|
|
3459
|
-
children:
|
|
3437
|
+
children: On
|
|
3460
3438
|
}
|
|
3461
3439
|
) })
|
|
3462
3440
|
] }) }) }),
|
|
@@ -3469,96 +3447,93 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
|
|
|
3469
3447
|
fullWidth: !0,
|
|
3470
3448
|
noBorder: !0,
|
|
3471
3449
|
className: "mb-4 mt-1",
|
|
3472
|
-
labelRight:
|
|
3450
|
+
labelRight: Pn,
|
|
3473
3451
|
onClick: r,
|
|
3474
|
-
children: /* @__PURE__ */ c(
|
|
3452
|
+
children: /* @__PURE__ */ c(An, { className: "size-7" })
|
|
3475
3453
|
}
|
|
3476
3454
|
) }) })
|
|
3477
3455
|
] })
|
|
3478
3456
|
] }),
|
|
3479
|
-
/* @__PURE__ */ c(
|
|
3457
|
+
/* @__PURE__ */ c(Ln, {})
|
|
3480
3458
|
] });
|
|
3481
|
-
},
|
|
3459
|
+
}, Kn = new URL(document.location.href).searchParams, Bn = !!Kn.get("debug") || !1, Wn = wt(() => import("./App.C232zHGs.js").then((e) => e.App)), Gn = ({ isComponent: e }) => {
|
|
3482
3460
|
const { isAuthenticated: t } = qe();
|
|
3483
|
-
return t ? /* @__PURE__ */ c(Tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(
|
|
3484
|
-
},
|
|
3461
|
+
return t ? /* @__PURE__ */ c(Tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Wn, { isComponent: e }) }) : /* @__PURE__ */ c(Hn, {});
|
|
3462
|
+
}, Vn = ({
|
|
3485
3463
|
isComponent: e = !1,
|
|
3486
|
-
domain: t =
|
|
3487
|
-
}) => /* @__PURE__ */ c(le, { children: /* @__PURE__ */ c(
|
|
3464
|
+
domain: t = Ma
|
|
3465
|
+
}) => /* @__PURE__ */ c(le, { children: /* @__PURE__ */ c(ka, { clientId: _a, domain: t, debug: Bn, children: /* @__PURE__ */ c(Gn, { isComponent: e }) }) }), Fo = ({ domain: e }) => /* @__PURE__ */ c(Vn, { isComponent: !0, domain: e });
|
|
3488
3466
|
export {
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
qo as NA,
|
|
3467
|
+
Jt as A,
|
|
3468
|
+
Bo as ABOUT_TITLE,
|
|
3469
|
+
so as ACTION_MESSAGE,
|
|
3470
|
+
co as ACTION_MODEL,
|
|
3471
|
+
io as ACTION_RESET,
|
|
3472
|
+
lo as ACTION_RESTORE,
|
|
3473
|
+
mo as ACTION_SEARCH,
|
|
3474
|
+
ho as ACTION_SORT,
|
|
3475
|
+
uo as ACTION_STREAMING,
|
|
3476
|
+
Ln as AppFooter,
|
|
3477
|
+
Vo as CANCEL,
|
|
3478
|
+
Jo as CARDS,
|
|
3479
|
+
Go as CLEAR,
|
|
3480
|
+
ao as ERROR_MESSAGE,
|
|
3481
|
+
qt as F,
|
|
3482
|
+
Ze as G,
|
|
3483
|
+
oo as GPT4_MAX_TOKENS,
|
|
3484
|
+
Ko as HISTORY_TITLE,
|
|
3485
|
+
go as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3486
|
+
po as LOCAL_STORAGE_PREFIX,
|
|
3487
|
+
fo as LOCAL_STORAGE_SEARCH,
|
|
3488
|
+
yo as LOCAL_STORAGE_SORT,
|
|
3489
|
+
Lo as LOG_OUT,
|
|
3490
|
+
no as MODEL_GPT4,
|
|
3491
|
+
Un as MessagesContainerHeader,
|
|
3492
|
+
Ro as N,
|
|
3493
|
+
Xa as N$1,
|
|
3494
|
+
Yo as NA,
|
|
3518
3495
|
Fe as O,
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3496
|
+
Uo as PROFILE_TITLE,
|
|
3497
|
+
Zn as ROLE_ASSISTANT,
|
|
3498
|
+
ro as ROLE_HIDDEN,
|
|
3499
|
+
to as ROLE_INTERNAL,
|
|
3500
|
+
eo as ROLE_SYSTEM,
|
|
3501
|
+
Xn as ROLE_USER,
|
|
3525
3502
|
Ce as S,
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3503
|
+
Mo as SEND,
|
|
3504
|
+
Ho as STATS,
|
|
3505
|
+
bo as STATS_SEPARATOR,
|
|
3506
|
+
Fo as SassySaint,
|
|
3507
|
+
Wo as TYPE_QUESTION,
|
|
3508
|
+
nn as V,
|
|
3532
3509
|
ne as W,
|
|
3533
|
-
|
|
3534
|
-
Uo as a,
|
|
3510
|
+
Po as a,
|
|
3535
3511
|
gt as b,
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
Yt as f,
|
|
3543
|
-
rn as f$1,
|
|
3512
|
+
en as c,
|
|
3513
|
+
xo as c$1,
|
|
3514
|
+
Ao as durationFormatter,
|
|
3515
|
+
Io as extractAverage,
|
|
3516
|
+
Vt as f,
|
|
3517
|
+
tn as f$1,
|
|
3544
3518
|
Oe as g,
|
|
3545
|
-
|
|
3546
|
-
|
|
3519
|
+
wo as getCurrentGeoLocation,
|
|
3520
|
+
Ua as getMessageContaintWrapperClass,
|
|
3547
3521
|
Xe as i,
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3522
|
+
No as i$1,
|
|
3523
|
+
vo as isLastMessageFromRole,
|
|
3524
|
+
on as j,
|
|
3525
|
+
ae as j$1,
|
|
3526
|
+
Do as l,
|
|
3527
|
+
Co as n,
|
|
3528
|
+
So as numberFormatter,
|
|
3529
|
+
un as o,
|
|
3530
|
+
$o as p,
|
|
3531
|
+
ko as pluralize,
|
|
3557
3532
|
qe as qr,
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3533
|
+
Oo as r,
|
|
3534
|
+
To as renderDataAsList,
|
|
3535
|
+
_o as s,
|
|
3536
|
+
Eo as truncate,
|
|
3537
|
+
An as v,
|
|
3538
|
+
Ft as x
|
|
3564
3539
|
};
|