@versini/sassysaint 5.3.8 → 5.3.9
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.DlhiXCoz.js → App.CiWR0jbo.js} +563 -555
- package/dist/chunks/{LazyHeader.DqDJRIjX.js → LazyHeader.C3UmEKkw.js} +1076 -985
- package/dist/chunks/{LazyMarkdownWithExtra.DdI965fc.js → LazyMarkdownWithExtra.CA4l-kCG.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.CI97mVOI.js → LazyMessageAssistant.Bq--JTre.js} +4 -4
- package/dist/chunks/{index.BsmLg4en.js → index.BiQ5lu6V.js} +522 -542
- package/dist/chunks/{index.C8-dCwmB.js → index.DbhB3Iku.js} +101 -93
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as l, jsxs as I, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
-
import O, { createContext as
|
|
2
|
+
import O, { createContext as cr, useReducer as St, useRef as L, useCallback as q, useEffect as Q, useContext as Qe, useSyncExternalStore as lr, useId as kt, useState as j, useLayoutEffect as it, useMemo as At, lazy as _t, Suspense as Nt } from "react";
|
|
3
3
|
import f from "clsx";
|
|
4
|
-
var
|
|
4
|
+
var dr = Object.defineProperty, ur = (e, t, r) => t in e ? dr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, He = (e, t, r) => ur(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
6
|
@versini/auth-provider v7.3.3
|
|
7
7
|
© 2024 gizmette.com
|
|
@@ -28,10 +28,10 @@ function xe(e) {
|
|
|
28
28
|
s[i] = n.charCodeAt(i);
|
|
29
29
|
return o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Ze() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Rt(e) {
|
|
35
35
|
const { id: t } = e;
|
|
36
36
|
return {
|
|
37
37
|
...e,
|
|
@@ -39,7 +39,7 @@ function xt(e) {
|
|
|
39
39
|
transports: e.transports
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function xt(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 mr({ error: e, options: t }) {
|
|
51
51
|
var a, n;
|
|
52
52
|
const { publicKey: r } = t;
|
|
53
53
|
if (!r)
|
|
@@ -97,7 +97,7 @@ function hr({ error: e, options: t }) {
|
|
|
97
97
|
});
|
|
98
98
|
if (e.name === "SecurityError") {
|
|
99
99
|
const o = window.location.hostname;
|
|
100
|
-
if (
|
|
100
|
+
if (xt(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 hr({ error: e, options: t }) {
|
|
|
125
125
|
}
|
|
126
126
|
return e;
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class hr {
|
|
129
129
|
createNewAbortSignal() {
|
|
130
130
|
if (this.controller) {
|
|
131
131
|
const r = new Error("Cancelling existing WebAuthn API call for new one");
|
|
@@ -141,14 +141,14 @@ class pr {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
function
|
|
146
|
-
if (e && !(
|
|
144
|
+
const Ct = new hr(), pr = ["cross-platform", "platform"];
|
|
145
|
+
function Ot(e) {
|
|
146
|
+
if (e && !(pr.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
|
-
async function
|
|
149
|
+
async function gr(e) {
|
|
150
150
|
var m;
|
|
151
|
-
if (!
|
|
151
|
+
if (!Ze())
|
|
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 fr(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(Rt)
|
|
161
161
|
} };
|
|
162
|
-
t.signal =
|
|
162
|
+
t.signal = Ct.createNewAbortSignal();
|
|
163
163
|
let r;
|
|
164
164
|
try {
|
|
165
165
|
r = await navigator.credentials.create(t);
|
|
166
166
|
} catch (c) {
|
|
167
|
-
throw
|
|
167
|
+
throw mr({ error: c, options: t });
|
|
168
168
|
}
|
|
169
169
|
if (!r)
|
|
170
170
|
throw new Error("Registration was not completed");
|
|
@@ -176,7 +176,7 @@ async function fr(e) {
|
|
|
176
176
|
try {
|
|
177
177
|
u = o.getPublicKeyAlgorithm();
|
|
178
178
|
} catch (c) {
|
|
179
|
-
|
|
179
|
+
Be("getPublicKeyAlgorithm()", c);
|
|
180
180
|
}
|
|
181
181
|
let h;
|
|
182
182
|
if (typeof o.getPublicKey == "function")
|
|
@@ -184,14 +184,14 @@ async function fr(e) {
|
|
|
184
184
|
const c = o.getPublicKey();
|
|
185
185
|
c !== null && (h = H(c));
|
|
186
186
|
} catch (c) {
|
|
187
|
-
|
|
187
|
+
Be("getPublicKey()", c);
|
|
188
188
|
}
|
|
189
189
|
let p;
|
|
190
190
|
if (typeof o.getAuthenticatorData == "function")
|
|
191
191
|
try {
|
|
192
192
|
p = H(o.getAuthenticatorData());
|
|
193
193
|
} catch (c) {
|
|
194
|
-
|
|
194
|
+
Be("getAuthenticatorData()", c);
|
|
195
195
|
}
|
|
196
196
|
return {
|
|
197
197
|
id: a,
|
|
@@ -206,20 +206,20 @@ async function fr(e) {
|
|
|
206
206
|
},
|
|
207
207
|
type: s,
|
|
208
208
|
clientExtensionResults: r.getClientExtensionResults(),
|
|
209
|
-
authenticatorAttachment:
|
|
209
|
+
authenticatorAttachment: Ot(r.authenticatorAttachment)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function Be(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 fr() {
|
|
217
|
+
if (!Ze())
|
|
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 yr({ error: e, options: t }) {
|
|
223
223
|
const { publicKey: r } = t;
|
|
224
224
|
if (!r)
|
|
225
225
|
throw Error("options was missing required publicKey property");
|
|
@@ -239,7 +239,7 @@ function br({ error: e, options: t }) {
|
|
|
239
239
|
});
|
|
240
240
|
if (e.name === "SecurityError") {
|
|
241
241
|
const a = window.location.hostname;
|
|
242
|
-
if (
|
|
242
|
+
if (xt(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,30 +260,30 @@ function br({ error: e, options: t }) {
|
|
|
260
260
|
}
|
|
261
261
|
return e;
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
263
|
+
async function br(e, t = !1) {
|
|
264
264
|
var m, c;
|
|
265
|
-
if (!
|
|
265
|
+
if (!Ze())
|
|
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(Rt));
|
|
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 fr())
|
|
276
276
|
throw Error("Browser does not support WebAuthn autofill");
|
|
277
277
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1)
|
|
278
278
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
279
279
|
n.mediation = "conditional", a.allowCredentials = [];
|
|
280
280
|
}
|
|
281
|
-
n.publicKey = a, n.signal =
|
|
281
|
+
n.publicKey = a, n.signal = Ct.createNewAbortSignal();
|
|
282
282
|
let o;
|
|
283
283
|
try {
|
|
284
284
|
o = await navigator.credentials.get(n);
|
|
285
285
|
} catch (d) {
|
|
286
|
-
throw
|
|
286
|
+
throw yr({ error: d, options: n });
|
|
287
287
|
}
|
|
288
288
|
if (!o)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
@@ -300,7 +300,7 @@ async function Er(e, t = !1) {
|
|
|
300
300
|
},
|
|
301
301
|
type: h,
|
|
302
302
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
303
|
-
authenticatorAttachment:
|
|
303
|
+
authenticatorAttachment: Ot(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
|
+
}, Pt = {
|
|
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
|
+
}, Er = `-----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, Dt = (e) => e instanceof CryptoKey, we = new TextEncoder(), be = new TextDecoder();
|
|
355
|
+
function wr(...e) {
|
|
356
356
|
const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
|
|
357
357
|
let a = 0;
|
|
358
358
|
for (const n of e)
|
|
359
359
|
r.set(n, a), a += n.length;
|
|
360
360
|
return r;
|
|
361
361
|
}
|
|
362
|
-
const
|
|
362
|
+
const Tr = (e) => {
|
|
363
363
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
364
364
|
for (let a = 0; a < t.length; a++)
|
|
365
365
|
r[a] = t.charCodeAt(a);
|
|
@@ -368,7 +368,7 @@ const Ir = (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 Tr(t);
|
|
372
372
|
} catch {
|
|
373
373
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
374
374
|
}
|
|
@@ -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 ct extends te {
|
|
393
393
|
static get code() {
|
|
394
394
|
return "ERR_JWT_EXPIRED";
|
|
395
395
|
}
|
|
@@ -397,7 +397,7 @@ class lt extends te {
|
|
|
397
397
|
super(t), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
class
|
|
400
|
+
class Ir extends te {
|
|
401
401
|
constructor() {
|
|
402
402
|
super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
403
403
|
}
|
|
@@ -405,14 +405,14 @@ class vr extends te {
|
|
|
405
405
|
return "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
let
|
|
408
|
+
let B = class extends te {
|
|
409
409
|
constructor() {
|
|
410
410
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
411
411
|
}
|
|
412
412
|
static get code() {
|
|
413
413
|
return "ERR_JOSE_NOT_SUPPORTED";
|
|
414
414
|
}
|
|
415
|
-
},
|
|
415
|
+
}, A = class extends te {
|
|
416
416
|
constructor() {
|
|
417
417
|
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
418
418
|
}
|
|
@@ -427,7 +427,7 @@ let G = class extends te {
|
|
|
427
427
|
return "ERR_JWT_INVALID";
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
-
class
|
|
430
|
+
class vr extends te {
|
|
431
431
|
constructor() {
|
|
432
432
|
super(...arguments), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED", this.message = "signature verification failed";
|
|
433
433
|
}
|
|
@@ -441,7 +441,7 @@ function J(e, t = "algorithm.name") {
|
|
|
441
441
|
function Te(e, t) {
|
|
442
442
|
return e.name === t;
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function We(e) {
|
|
445
445
|
return parseInt(e.name.slice(4), 10);
|
|
446
446
|
}
|
|
447
447
|
function Sr(e) {
|
|
@@ -466,7 +466,7 @@ function kr(e, t) {
|
|
|
466
466
|
throw new TypeError(r);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function Ar(e, t, ...r) {
|
|
470
470
|
switch (t) {
|
|
471
471
|
case "HS256":
|
|
472
472
|
case "HS384":
|
|
@@ -474,7 +474,7 @@ function _r(e, t, ...r) {
|
|
|
474
474
|
if (!Te(e.algorithm, "HMAC"))
|
|
475
475
|
throw J("HMAC");
|
|
476
476
|
const a = parseInt(t.slice(2), 10);
|
|
477
|
-
if (
|
|
477
|
+
if (We(e.algorithm.hash) !== a)
|
|
478
478
|
throw J(`SHA-${a}`, "algorithm.hash");
|
|
479
479
|
break;
|
|
480
480
|
}
|
|
@@ -484,7 +484,7 @@ function _r(e, t, ...r) {
|
|
|
484
484
|
if (!Te(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
485
485
|
throw J("RSASSA-PKCS1-v1_5");
|
|
486
486
|
const a = parseInt(t.slice(2), 10);
|
|
487
|
-
if (
|
|
487
|
+
if (We(e.algorithm.hash) !== a)
|
|
488
488
|
throw J(`SHA-${a}`, "algorithm.hash");
|
|
489
489
|
break;
|
|
490
490
|
}
|
|
@@ -494,7 +494,7 @@ function _r(e, t, ...r) {
|
|
|
494
494
|
if (!Te(e.algorithm, "RSA-PSS"))
|
|
495
495
|
throw J("RSA-PSS");
|
|
496
496
|
const a = parseInt(t.slice(2), 10);
|
|
497
|
-
if (
|
|
497
|
+
if (We(e.algorithm.hash) !== a)
|
|
498
498
|
throw J(`SHA-${a}`, "algorithm.hash");
|
|
499
499
|
break;
|
|
500
500
|
}
|
|
@@ -518,7 +518,7 @@ function _r(e, t, ...r) {
|
|
|
518
518
|
}
|
|
519
519
|
kr(e, r);
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function $t(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 Lt(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 lt = (e, ...t) => $t("Key must be ", e, ...t);
|
|
530
|
+
function Lt(e, t, ...r) {
|
|
531
|
+
return $t(`Key for the ${e} algorithm must be `, t, ...r);
|
|
532
532
|
}
|
|
533
|
-
const
|
|
533
|
+
const Mt = (e) => Dt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ce = ["CryptoKey"], _r = (...e) => {
|
|
534
534
|
const t = e.filter(Boolean);
|
|
535
535
|
if (t.length === 0 || t.length === 1)
|
|
536
536
|
return !0;
|
|
@@ -549,11 +549,11 @@ const Ut = (e) => $t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
549
549
|
}
|
|
550
550
|
return !0;
|
|
551
551
|
};
|
|
552
|
-
function
|
|
552
|
+
function Nr(e) {
|
|
553
553
|
return typeof e == "object" && e !== null;
|
|
554
554
|
}
|
|
555
555
|
function me(e) {
|
|
556
|
-
if (!
|
|
556
|
+
if (!Nr(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
557
557
|
return !1;
|
|
558
558
|
if (Object.getPrototypeOf(e) === null)
|
|
559
559
|
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 Rr = (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 xr = (e, t) => {
|
|
|
572
572
|
function he(e) {
|
|
573
573
|
return me(e) && typeof e.kty == "string";
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function xr(e) {
|
|
576
576
|
return e.kty !== "oct" && typeof e.d == "string";
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function Cr(e) {
|
|
579
579
|
return e.kty !== "oct" && typeof e.d > "u";
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function Or(e) {
|
|
582
582
|
return he(e) && e.kty === "oct" && typeof e.k == "string";
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function Pr(e) {
|
|
585
585
|
let t, r;
|
|
586
586
|
switch (e.kty) {
|
|
587
587
|
case "RSA": {
|
|
@@ -606,7 +606,7 @@ function Dr(e) {
|
|
|
606
606
|
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
607
607
|
break;
|
|
608
608
|
default:
|
|
609
|
-
throw new
|
|
609
|
+
throw new B('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
610
610
|
}
|
|
611
611
|
break;
|
|
612
612
|
}
|
|
@@ -628,7 +628,7 @@ function Dr(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 B('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
632
632
|
}
|
|
633
633
|
break;
|
|
634
634
|
}
|
|
@@ -644,52 +644,52 @@ function Dr(e) {
|
|
|
644
644
|
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
645
645
|
break;
|
|
646
646
|
default:
|
|
647
|
-
throw new
|
|
647
|
+
throw new B('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
648
648
|
}
|
|
649
649
|
break;
|
|
650
650
|
}
|
|
651
651
|
default:
|
|
652
|
-
throw new
|
|
652
|
+
throw new B('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
653
653
|
}
|
|
654
654
|
return { algorithm: t, keyUsages: r };
|
|
655
655
|
}
|
|
656
|
-
const
|
|
656
|
+
const Ut = 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 } = Pr(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
|
+
}, Kt = (e) => X(e);
|
|
666
666
|
let ae, ne;
|
|
667
|
-
const
|
|
667
|
+
const Ht = (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 Ut({ ...r, alg: a });
|
|
672
672
|
return n && Object.freeze(t), o ? o[a] = s : e.set(t, { [a]: s }), s;
|
|
673
|
-
},
|
|
674
|
-
if (
|
|
673
|
+
}, Dr = (e, t) => {
|
|
674
|
+
if (Ht(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 ? Kt(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
|
+
}, $r = (e, t) => {
|
|
680
|
+
if (Ht(e)) {
|
|
681
681
|
let r = e.export({ format: "jwk" });
|
|
682
|
-
return r.k ?
|
|
682
|
+
return r.k ? Kt(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
|
+
}, Lr = { normalizePublicKey: Dr, normalizePrivateKey: $r }, 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
|
+
}, dt = (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 Gt = (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 B("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
710
710
|
}
|
|
711
|
-
},
|
|
711
|
+
}, Mr = 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 Gt = (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 = dt(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: dt(i) }, s = ["verify"];
|
|
753
753
|
break;
|
|
754
754
|
default:
|
|
755
|
-
throw new
|
|
755
|
+
throw new B('Invalid or unsupported "alg" (Algorithm) value');
|
|
756
756
|
}
|
|
757
757
|
return Le.subtle.importKey(t, i, o, !1, s);
|
|
758
|
-
},
|
|
759
|
-
async function
|
|
758
|
+
}, Ur = (e, t, r) => Mr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
759
|
+
async function Kr(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 Ur(e, t);
|
|
763
763
|
}
|
|
764
|
-
async function
|
|
764
|
+
async function Hr(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 Gr(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 B('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
775
775
|
case "EC":
|
|
776
776
|
case "OKP":
|
|
777
|
-
return
|
|
777
|
+
return Ut({ ...e, alg: t });
|
|
778
778
|
default:
|
|
779
|
-
throw new
|
|
779
|
+
throw new B('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], qe = (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");
|
|
@@ -791,12 +791,12 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], Xe = (e, t, r) =>
|
|
|
791
791
|
}, Br = (e, t, r, a) => {
|
|
792
792
|
if (!(t instanceof Uint8Array)) {
|
|
793
793
|
if (a && he(t)) {
|
|
794
|
-
if (
|
|
794
|
+
if (Or(t) && qe(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 (!Mt(t))
|
|
799
|
+
throw new TypeError(Lt(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
|
}
|
|
@@ -804,16 +804,16 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], Xe = (e, t, r) =>
|
|
|
804
804
|
if (a && he(t))
|
|
805
805
|
switch (r) {
|
|
806
806
|
case "sign":
|
|
807
|
-
if (
|
|
807
|
+
if (xr(t) && qe(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 (Cr(t) && qe(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 (!Mt(t))
|
|
816
|
+
throw new TypeError(Lt(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")
|
|
@@ -829,8 +829,8 @@ function Bt(e, t, r, a) {
|
|
|
829
829
|
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Br(t, r, a, e) : Wr(t, r, a, e);
|
|
830
830
|
}
|
|
831
831
|
Bt.bind(void 0, !1);
|
|
832
|
-
const
|
|
833
|
-
function
|
|
832
|
+
const ut = Bt.bind(void 0, !0);
|
|
833
|
+
function Gr(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 Vr(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 B(`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 Vr(e, t, r, a, n) {
|
|
|
849
849
|
}
|
|
850
850
|
return new Set(a.crit);
|
|
851
851
|
}
|
|
852
|
-
const
|
|
852
|
+
const Vr = (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 Jr(e, t) {
|
|
859
859
|
const r = `SHA-${e.slice(-3)}`;
|
|
860
860
|
switch (e) {
|
|
861
861
|
case "HS256":
|
|
@@ -877,103 +877,103 @@ function Yr(e, t) {
|
|
|
877
877
|
case "EdDSA":
|
|
878
878
|
return { name: t.name };
|
|
879
879
|
default:
|
|
880
|
-
throw new
|
|
880
|
+
throw new B(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
async function
|
|
884
|
-
if (t = await
|
|
885
|
-
return
|
|
883
|
+
async function Yr(e, t, r) {
|
|
884
|
+
if (t = await Lr.normalizePublicKey(t, e), Dt(t))
|
|
885
|
+
return Ar(t, e, r), t;
|
|
886
886
|
if (t instanceof Uint8Array) {
|
|
887
887
|
if (!e.startsWith("HS"))
|
|
888
|
-
throw new TypeError(
|
|
888
|
+
throw new TypeError(lt(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(lt(t, ...Ce, "Uint8Array", "JSON Web Key"));
|
|
892
892
|
}
|
|
893
|
-
const
|
|
894
|
-
const n = await
|
|
895
|
-
|
|
896
|
-
const o =
|
|
893
|
+
const Fr = async (e, t, r, a) => {
|
|
894
|
+
const n = await Yr(e, t, "verify");
|
|
895
|
+
Rr(e, n);
|
|
896
|
+
const o = Jr(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 zr(e, t, r) {
|
|
904
904
|
if (!me(e))
|
|
905
|
-
throw new
|
|
905
|
+
throw new A("Flattened JWS must be an object");
|
|
906
906
|
if (e.protected === void 0 && e.header === void 0)
|
|
907
|
-
throw new
|
|
907
|
+
throw new A('Flattened JWS must have either of the "protected" or "header" members');
|
|
908
908
|
if (e.protected !== void 0 && typeof e.protected != "string")
|
|
909
|
-
throw new
|
|
909
|
+
throw new A("JWS Protected Header incorrect type");
|
|
910
910
|
if (e.payload === void 0)
|
|
911
|
-
throw new
|
|
911
|
+
throw new A("JWS Payload missing");
|
|
912
912
|
if (typeof e.signature != "string")
|
|
913
|
-
throw new
|
|
913
|
+
throw new A("JWS Signature missing or incorrect type");
|
|
914
914
|
if (e.header !== void 0 && !me(e.header))
|
|
915
|
-
throw new
|
|
915
|
+
throw new A("JWS Unprotected Header incorrect type");
|
|
916
916
|
let a = {};
|
|
917
917
|
if (e.protected)
|
|
918
918
|
try {
|
|
919
919
|
const y = X(e.protected);
|
|
920
920
|
a = JSON.parse(be.decode(y));
|
|
921
921
|
} catch {
|
|
922
|
-
throw new
|
|
922
|
+
throw new A("JWS Protected Header is invalid");
|
|
923
923
|
}
|
|
924
|
-
if (!
|
|
925
|
-
throw new
|
|
924
|
+
if (!_r(a, e.header))
|
|
925
|
+
throw new A("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 = Gr(A, /* @__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
|
-
throw new
|
|
932
|
+
throw new A('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
|
-
throw new
|
|
936
|
-
const u = r &&
|
|
935
|
+
throw new A('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
936
|
+
const u = r && Vr("algorithms", r.algorithms);
|
|
937
937
|
if (u && !u.has(i))
|
|
938
|
-
throw new
|
|
938
|
+
throw new Ir('"alg" (Algorithm) Header Parameter value not allowed');
|
|
939
939
|
if (s) {
|
|
940
940
|
if (typeof e.payload != "string")
|
|
941
|
-
throw new
|
|
941
|
+
throw new A("JWS Payload must be a string");
|
|
942
942
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
943
|
-
throw new
|
|
943
|
+
throw new A("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, ut(i, t, "verify"), he(t) && (t = await Hr(t, i))) : ut(i, t, "verify");
|
|
946
|
+
const p = wr(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
|
-
throw new
|
|
951
|
+
throw new A("Failed to base64url decode the signature");
|
|
952
952
|
}
|
|
953
|
-
if (!await
|
|
954
|
-
throw new
|
|
953
|
+
if (!await Fr(i, t, m, p))
|
|
954
|
+
throw new vr();
|
|
955
955
|
let c;
|
|
956
956
|
if (s)
|
|
957
957
|
try {
|
|
958
958
|
c = X(e.payload);
|
|
959
959
|
} catch {
|
|
960
|
-
throw new
|
|
960
|
+
throw new A("Failed to base64url decode the payload");
|
|
961
961
|
}
|
|
962
962
|
else typeof e.payload == "string" ? c = we.encode(e.payload) : c = e.payload;
|
|
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 jr(e, t, r) {
|
|
967
967
|
if (e instanceof Uint8Array && (e = be.decode(e)), typeof e != "string")
|
|
968
|
-
throw new
|
|
968
|
+
throw new A("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
|
-
throw new
|
|
972
|
-
const i = await
|
|
971
|
+
throw new A("Invalid Compact JWS");
|
|
972
|
+
const i = await zr({ 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 qr = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Gt = Wt * 60, et = Gt * 24, Xr = et * 7, Qr = et * 365.25, Zr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, mt = (e) => {
|
|
976
|
+
const t = Zr.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();
|
|
@@ -998,24 +998,24 @@ const Xr = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Vt = Wt * 60, tt = Vt
|
|
|
998
998
|
case "hr":
|
|
999
999
|
case "hrs":
|
|
1000
1000
|
case "h":
|
|
1001
|
-
n = Math.round(r *
|
|
1001
|
+
n = Math.round(r * Gt);
|
|
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 * et);
|
|
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 * Xr);
|
|
1012
1012
|
break;
|
|
1013
1013
|
default:
|
|
1014
|
-
n = Math.round(r *
|
|
1014
|
+
n = Math.round(r * Qr);
|
|
1015
1015
|
break;
|
|
1016
1016
|
}
|
|
1017
1017
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
1018
|
-
},
|
|
1018
|
+
}, ht = (e) => e.toLowerCase().replace(/^application\//, ""), ea = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, ta = (e, t, r = {}) => {
|
|
1019
1019
|
let a;
|
|
1020
1020
|
try {
|
|
1021
1021
|
a = JSON.parse(be.decode(t));
|
|
@@ -1024,7 +1024,7 @@ const Xr = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Vt = Wt * 60, tt = Vt
|
|
|
1024
1024
|
if (!me(a))
|
|
1025
1025
|
throw new Y("JWT Claims Set must be a top-level JSON object");
|
|
1026
1026
|
const { typ: n } = r;
|
|
1027
|
-
if (n && (typeof e.typ != "string" ||
|
|
1027
|
+
if (n && (typeof e.typ != "string" || ht(e.typ) !== ht(n)))
|
|
1028
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");
|
|
@@ -1035,12 +1035,12 @@ const Xr = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Vt = Wt * 60, tt = Vt
|
|
|
1035
1035
|
throw new K('unexpected "iss" claim value', a, "iss", "check_failed");
|
|
1036
1036
|
if (i && a.sub !== i)
|
|
1037
1037
|
throw new K('unexpected "sub" claim value', a, "sub", "check_failed");
|
|
1038
|
-
if (u && !
|
|
1038
|
+
if (u && !ea(a.aud, typeof u == "string" ? [u] : u))
|
|
1039
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 = mt(r.clockTolerance);
|
|
1044
1044
|
break;
|
|
1045
1045
|
case "number":
|
|
1046
1046
|
m = r.clockTolerance;
|
|
@@ -1051,7 +1051,7 @@ const Xr = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Vt = Wt * 60, tt = Vt
|
|
|
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 = qr(c || /* @__PURE__ */ new Date());
|
|
1055
1055
|
if ((a.iat !== void 0 || h) && typeof a.iat != "number")
|
|
1056
1056
|
throw new K('"iat" claim must be a number', a, "iat", "invalid");
|
|
1057
1057
|
if (a.nbf !== void 0) {
|
|
@@ -1064,27 +1064,27 @@ const Xr = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Vt = Wt * 60, tt = Vt
|
|
|
1064
1064
|
if (typeof a.exp != "number")
|
|
1065
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 ct('"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 : mt(h);
|
|
1071
1071
|
if (y - m > b)
|
|
1072
|
-
throw new
|
|
1072
|
+
throw new ct('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
|
1073
1073
|
if (y < 0 - m)
|
|
1074
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 ra(e, t, r) {
|
|
1079
1079
|
var a;
|
|
1080
|
-
const n = await
|
|
1080
|
+
const n = await jr(e, t, r);
|
|
1081
1081
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
1082
1082
|
throw new Y("JWTs MUST NOT use unencoded payload");
|
|
1083
|
-
const o = { payload:
|
|
1083
|
+
const o = { payload: ta(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 aa = X;
|
|
1087
|
+
function na(e) {
|
|
1088
1088
|
if (typeof e != "string")
|
|
1089
1089
|
throw new Y("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1090
1090
|
const { 1: t, length: r } = e.split(".");
|
|
@@ -1096,7 +1096,7 @@ function oa(e) {
|
|
|
1096
1096
|
throw new Y("JWTs must contain a payload");
|
|
1097
1097
|
let a;
|
|
1098
1098
|
try {
|
|
1099
|
-
a =
|
|
1099
|
+
a = aa(t);
|
|
1100
1100
|
} catch {
|
|
1101
1101
|
throw new Y("Failed to base64url decode the payload");
|
|
1102
1102
|
}
|
|
@@ -1112,81 +1112,81 @@ function oa(e) {
|
|
|
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 Kr(Er, t);
|
|
1116
|
+
return await ra(e, r, {
|
|
1117
1117
|
issuer: _.ISSUER
|
|
1118
1118
|
});
|
|
1119
1119
|
} catch {
|
|
1120
1120
|
return;
|
|
1121
1121
|
}
|
|
1122
|
-
},
|
|
1122
|
+
}, oa = (e) => {
|
|
1123
1123
|
try {
|
|
1124
|
-
return
|
|
1124
|
+
return na(e);
|
|
1125
1125
|
} catch {
|
|
1126
1126
|
return;
|
|
1127
1127
|
}
|
|
1128
1128
|
};
|
|
1129
|
-
var
|
|
1130
|
-
for (var
|
|
1131
|
-
|
|
1132
|
-
function
|
|
1133
|
-
return (
|
|
1134
|
-
}
|
|
1135
|
-
var Ie,
|
|
1136
|
-
function
|
|
1129
|
+
var S = [];
|
|
1130
|
+
for (var Ge = 0; Ge < 256; ++Ge)
|
|
1131
|
+
S.push((Ge + 256).toString(16).slice(1));
|
|
1132
|
+
function sa(e, t = 0) {
|
|
1133
|
+
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();
|
|
1134
|
+
}
|
|
1135
|
+
var Ie, ia = new Uint8Array(16);
|
|
1136
|
+
function ca() {
|
|
1137
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 Ie(
|
|
1139
|
+
return Ie(ia);
|
|
1140
1140
|
}
|
|
1141
|
-
var
|
|
1142
|
-
const
|
|
1143
|
-
randomUUID:
|
|
1141
|
+
var la = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1142
|
+
const pt = {
|
|
1143
|
+
randomUUID: la
|
|
1144
1144
|
};
|
|
1145
|
-
function
|
|
1146
|
-
if (
|
|
1147
|
-
return
|
|
1145
|
+
function gt(e, t, r) {
|
|
1146
|
+
if (pt.randomUUID && !t && !e)
|
|
1147
|
+
return pt.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 || ca)();
|
|
1150
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, sa(a);
|
|
1151
1151
|
}
|
|
1152
|
-
const
|
|
1152
|
+
const ft = globalThis.crypto, da = (e) => `${gt()}${gt()}`.slice(0, e), ua = (e) => btoa(
|
|
1153
1153
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1154
1154
|
);
|
|
1155
|
-
async function
|
|
1156
|
-
if (!
|
|
1155
|
+
async function ma(e) {
|
|
1156
|
+
if (!ft.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 ft.subtle.digest("SHA-256", t);
|
|
1161
|
+
return ua(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1162
1162
|
}
|
|
1163
|
-
async function
|
|
1164
|
-
const t =
|
|
1163
|
+
async function ha(e) {
|
|
1164
|
+
const t = da(43), r = await ma(t);
|
|
1165
1165
|
return {
|
|
1166
1166
|
code_verifier: t,
|
|
1167
1167
|
code_challenge: r
|
|
1168
1168
|
};
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function Vt(e, t) {
|
|
1171
1171
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
1172
1172
|
}
|
|
1173
|
-
const
|
|
1173
|
+
const yt = (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
|
-
},
|
|
1177
|
+
window.localStorage.setItem(e, r), Vt(e, r);
|
|
1178
|
+
}, pa = (e) => {
|
|
1179
|
+
window.localStorage.removeItem(e), Vt(e, null);
|
|
1180
|
+
}, bt = (e) => window.localStorage.getItem(e), ga = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
1181
1181
|
function ve({
|
|
1182
1182
|
key: e,
|
|
1183
1183
|
initialValue: t
|
|
1184
1184
|
}) {
|
|
1185
|
-
const r =
|
|
1185
|
+
const r = lr(ga, () => bt(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 ? pa(e) : yt(e, i);
|
|
1190
1190
|
} catch (i) {
|
|
1191
1191
|
console.warn(i);
|
|
1192
1192
|
}
|
|
@@ -1199,39 +1199,39 @@ function ve({
|
|
|
1199
1199
|
}, [a]);
|
|
1200
1200
|
return Q(() => {
|
|
1201
1201
|
try {
|
|
1202
|
-
|
|
1202
|
+
bt(e) === null && typeof t < "u" && yt(e, t);
|
|
1203
1203
|
} catch (s) {
|
|
1204
1204
|
console.warn(s);
|
|
1205
1205
|
}
|
|
1206
1206
|
}, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
|
|
1207
1207
|
}
|
|
1208
|
-
var
|
|
1208
|
+
var k = [];
|
|
1209
1209
|
for (var Ve = 0; Ve < 256; ++Ve)
|
|
1210
|
-
|
|
1211
|
-
function
|
|
1212
|
-
return (
|
|
1210
|
+
k.push((Ve + 256).toString(16).slice(1));
|
|
1211
|
+
function fa(e, t = 0) {
|
|
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
|
|
1215
|
-
function
|
|
1216
|
-
if (!
|
|
1214
|
+
var Se, ya = new Uint8Array(16);
|
|
1215
|
+
function ba() {
|
|
1216
|
+
if (!Se && (Se = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Se))
|
|
1217
1217
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1218
|
-
return
|
|
1218
|
+
return Se(ya);
|
|
1219
1219
|
}
|
|
1220
|
-
var
|
|
1221
|
-
const
|
|
1222
|
-
randomUUID:
|
|
1220
|
+
var Ea = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1221
|
+
const Et = {
|
|
1222
|
+
randomUUID: Ea
|
|
1223
1223
|
};
|
|
1224
1224
|
function Je(e, t, r) {
|
|
1225
|
-
if (
|
|
1226
|
-
return
|
|
1225
|
+
if (Et.randomUUID && !t && !e)
|
|
1226
|
+
return Et.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 || ba)();
|
|
1229
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, fa(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.", wa = "Your session has been successfully terminated.", Ye = "Login failed. Please try again.", Ta = "Error getting access token, please re-authenticate.", Ia = "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
|
-
},
|
|
1234
|
+
}, ke = "@@auth@@", ge = "LOADING", Ne = "LOGIN", Jt = "LOGOUT", Ee = "success", W = "failure", Yt = "include", Ft = "POST", zt = "application/json", Ae = {
|
|
1235
1235
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1236
1236
|
$clientId: String!,
|
|
1237
1237
|
$username: String!,
|
|
@@ -1314,19 +1314,19 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1314
1314
|
}`
|
|
1315
1315
|
}, se = {
|
|
1316
1316
|
GET_REGISTRATION_OPTIONS: {
|
|
1317
|
-
schema:
|
|
1317
|
+
schema: Ae.GET_REGISTRATION_OPTIONS,
|
|
1318
1318
|
method: "getPasskeyRegistrationOptions"
|
|
1319
1319
|
},
|
|
1320
1320
|
VERIFY_REGISTRATION: {
|
|
1321
|
-
schema:
|
|
1321
|
+
schema: Ae.VERIFY_REGISTRATION,
|
|
1322
1322
|
method: "verifyPasskeyRegistration"
|
|
1323
1323
|
},
|
|
1324
1324
|
GET_AUTHENTICATION_OPTIONS: {
|
|
1325
|
-
schema:
|
|
1325
|
+
schema: Ae.GET_AUTHENTICATION_OPTIONS,
|
|
1326
1326
|
method: "getPasskeyAuthenticationOptions"
|
|
1327
1327
|
},
|
|
1328
1328
|
VERIFY_AUTHENTICATION: {
|
|
1329
|
-
schema:
|
|
1329
|
+
schema: Ae.VERIFY_AUTHENTICATION,
|
|
1330
1330
|
method: "verifyPasskeyAuthentication"
|
|
1331
1331
|
}
|
|
1332
1332
|
}, ie = async ({
|
|
@@ -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
|
+
jt ? `${Pe.dev}/graphql` : `${Pe.prod}/graphql`,
|
|
1341
1341
|
{
|
|
1342
|
-
credentials:
|
|
1343
|
-
method:
|
|
1342
|
+
credentials: Yt,
|
|
1343
|
+
method: Ft,
|
|
1344
1344
|
headers: {
|
|
1345
1345
|
authorization: n,
|
|
1346
|
-
"Content-Type":
|
|
1347
|
-
[
|
|
1346
|
+
"Content-Type": zt,
|
|
1347
|
+
[Pt.CLIENT_ID]: `${r}`
|
|
1348
1348
|
},
|
|
1349
1349
|
body: JSON.stringify({
|
|
1350
1350
|
query: t.schema,
|
|
@@ -1353,14 +1353,14 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1353
1353
|
}
|
|
1354
1354
|
);
|
|
1355
1355
|
if (o.status !== 200)
|
|
1356
|
-
return { status:
|
|
1356
|
+
return { status: W, data: [] };
|
|
1357
1357
|
const { data: s } = await o.json();
|
|
1358
1358
|
return {
|
|
1359
1359
|
status: Ee,
|
|
1360
1360
|
data: s[t.method]
|
|
1361
1361
|
};
|
|
1362
1362
|
} catch (n) {
|
|
1363
|
-
return console.error(n), { status:
|
|
1363
|
+
return console.error(n), { status: W, data: [] };
|
|
1364
1364
|
}
|
|
1365
1365
|
}, Me = async ({
|
|
1366
1366
|
type: e,
|
|
@@ -1369,28 +1369,28 @@ 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
|
+
jt ? `${Pe.dev}/${e}` : `${Pe.prod}/${e}`,
|
|
1373
1373
|
{
|
|
1374
|
-
credentials:
|
|
1375
|
-
method:
|
|
1374
|
+
credentials: Yt,
|
|
1375
|
+
method: Ft,
|
|
1376
1376
|
headers: {
|
|
1377
|
-
"Content-Type":
|
|
1378
|
-
[
|
|
1377
|
+
"Content-Type": zt,
|
|
1378
|
+
[Pt.CLIENT_ID]: `${t}`
|
|
1379
1379
|
},
|
|
1380
1380
|
body: JSON.stringify(r)
|
|
1381
1381
|
}
|
|
1382
1382
|
);
|
|
1383
1383
|
if (a.status !== 200)
|
|
1384
|
-
return { status:
|
|
1384
|
+
return { status: W, data: [] };
|
|
1385
1385
|
const { data: n } = await a.json();
|
|
1386
1386
|
return {
|
|
1387
1387
|
status: Ee,
|
|
1388
1388
|
data: n || []
|
|
1389
1389
|
};
|
|
1390
1390
|
} catch (a) {
|
|
1391
|
-
return console.error(a), { status:
|
|
1391
|
+
return console.error(a), { status: W, data: [] };
|
|
1392
1392
|
}
|
|
1393
|
-
},
|
|
1393
|
+
}, va = process.env.NODE_ENV === "production", jt = !va, qt = {
|
|
1394
1394
|
isLoading: !0,
|
|
1395
1395
|
isAuthenticated: !1,
|
|
1396
1396
|
user: void 0,
|
|
@@ -1399,7 +1399,7 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1399
1399
|
authenticationType: ""
|
|
1400
1400
|
}, Sa = (e) => {
|
|
1401
1401
|
try {
|
|
1402
|
-
const t =
|
|
1402
|
+
const t = oa(e);
|
|
1403
1403
|
return t ? t[_.USER_ID_KEY] : "";
|
|
1404
1404
|
} catch {
|
|
1405
1405
|
return "";
|
|
@@ -1421,14 +1421,14 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1421
1421
|
domain: r,
|
|
1422
1422
|
idToken: a
|
|
1423
1423
|
}
|
|
1424
|
-
})) == null ? void 0 : n.status) ||
|
|
1424
|
+
})) == null ? void 0 : n.status) || W
|
|
1425
1425
|
};
|
|
1426
1426
|
} catch {
|
|
1427
1427
|
return {
|
|
1428
|
-
status:
|
|
1428
|
+
status: W
|
|
1429
1429
|
};
|
|
1430
1430
|
}
|
|
1431
|
-
},
|
|
1431
|
+
}, Aa = 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
|
+
}, _a = async ({
|
|
1476
1476
|
nonce: e,
|
|
1477
1477
|
clientId: t,
|
|
1478
1478
|
code_challenge: r
|
|
@@ -1492,16 +1492,16 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1492
1492
|
status: Ee,
|
|
1493
1493
|
data: n.data.code
|
|
1494
1494
|
} : {
|
|
1495
|
-
status:
|
|
1495
|
+
status: W,
|
|
1496
1496
|
data: ""
|
|
1497
1497
|
};
|
|
1498
1498
|
} catch {
|
|
1499
1499
|
return {
|
|
1500
|
-
status:
|
|
1500
|
+
status: W,
|
|
1501
1501
|
data: ""
|
|
1502
1502
|
};
|
|
1503
1503
|
}
|
|
1504
|
-
},
|
|
1504
|
+
}, Na = async ({
|
|
1505
1505
|
clientId: e,
|
|
1506
1506
|
userId: t,
|
|
1507
1507
|
nonce: 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 Ra {
|
|
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
|
}
|
|
@@ -1567,7 +1567,7 @@ class xa {
|
|
|
1567
1567
|
}) {
|
|
1568
1568
|
const o = await fe(this.refreshToken);
|
|
1569
1569
|
if (o && o.payload[_.USER_ID_KEY] !== "") {
|
|
1570
|
-
const s = await
|
|
1570
|
+
const s = await Na({
|
|
1571
1571
|
clientId: t,
|
|
1572
1572
|
userId: r,
|
|
1573
1573
|
nonce: a,
|
|
@@ -1580,22 +1580,22 @@ class xa {
|
|
|
1580
1580
|
newAccessToken: s.accessToken,
|
|
1581
1581
|
newRefreshToken: s.refreshToken
|
|
1582
1582
|
}) : {
|
|
1583
|
-
status:
|
|
1583
|
+
status: W
|
|
1584
1584
|
};
|
|
1585
1585
|
} else
|
|
1586
1586
|
return {
|
|
1587
|
-
status:
|
|
1587
|
+
status: W
|
|
1588
1588
|
};
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
|
-
const
|
|
1591
|
+
const xa = (e) => q(
|
|
1592
1592
|
(...t) => {
|
|
1593
1593
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1594
1594
|
},
|
|
1595
1595
|
[e]
|
|
1596
1596
|
), ce = () => {
|
|
1597
|
-
throw new Error(
|
|
1598
|
-
},
|
|
1597
|
+
throw new Error(Ia);
|
|
1598
|
+
}, Xt = cr({
|
|
1599
1599
|
isAuthenticated: !1,
|
|
1600
1600
|
isLoading: !1,
|
|
1601
1601
|
login: ce,
|
|
@@ -1606,11 +1606,11 @@ const Ca = (e) => q(
|
|
|
1606
1606
|
loginWithPasskey: ce,
|
|
1607
1607
|
logoutReason: "",
|
|
1608
1608
|
authenticationType: ""
|
|
1609
|
-
}),
|
|
1610
|
-
state:
|
|
1609
|
+
}), Ca = O.createContext({
|
|
1610
|
+
state: qt,
|
|
1611
1611
|
dispatch: () => {
|
|
1612
1612
|
}
|
|
1613
|
-
}),
|
|
1613
|
+
}), Oa = (e, t) => (t == null ? void 0 : t.type) === ge ? {
|
|
1614
1614
|
...e,
|
|
1615
1615
|
isLoading: t.payload.isLoading
|
|
1616
1616
|
} : (t == null ? void 0 : t.type) === Ne ? {
|
|
@@ -1620,34 +1620,34 @@ const Ca = (e) => q(
|
|
|
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) === Jt ? {
|
|
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, Pa = ({
|
|
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] = St(
|
|
1638
|
-
...
|
|
1637
|
+
const [o, s] = St(Oa, {
|
|
1638
|
+
...qt,
|
|
1639
1639
|
debug: n
|
|
1640
|
-
}), i =
|
|
1641
|
-
key: `${
|
|
1640
|
+
}), i = xa(n), u = L(!1), [h, p, , m] = ve({
|
|
1641
|
+
key: `${ke}::${r}::@@user@@`
|
|
1642
1642
|
}), [c, d, , y] = ve({
|
|
1643
|
-
key: `${
|
|
1643
|
+
key: `${ke}::${r}::@@access@@`
|
|
1644
1644
|
}), [b, v, , w] = ve(
|
|
1645
1645
|
{
|
|
1646
|
-
key: `${
|
|
1646
|
+
key: `${ke}::${r}::@@refresh@@`
|
|
1647
1647
|
}
|
|
1648
1648
|
), [C, D, , M] = ve({
|
|
1649
|
-
key: `${
|
|
1650
|
-
}), Z = new
|
|
1649
|
+
key: `${ke}::${r}::@@nonce@@`
|
|
1650
|
+
}), Z = new Ra(c, b), N = q(() => {
|
|
1651
1651
|
i("removeLocalStorage: removing local storage"), m(), y(), w(), M();
|
|
1652
1652
|
}, [
|
|
1653
1653
|
y,
|
|
@@ -1655,13 +1655,13 @@ const Ca = (e) => q(
|
|
|
1655
1655
|
M,
|
|
1656
1656
|
w,
|
|
1657
1657
|
i
|
|
1658
|
-
]),
|
|
1658
|
+
]), G = q(
|
|
1659
1659
|
(g) => {
|
|
1660
1660
|
i(
|
|
1661
1661
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1662
1662
|
g
|
|
1663
1663
|
), s({
|
|
1664
|
-
type:
|
|
1664
|
+
type: Jt,
|
|
1665
1665
|
payload: {
|
|
1666
1666
|
logoutReason: g || oe
|
|
1667
1667
|
}
|
|
@@ -1679,9 +1679,9 @@ const Ca = (e) => q(
|
|
|
1679
1679
|
clientId: r,
|
|
1680
1680
|
domain: a,
|
|
1681
1681
|
idToken: h
|
|
1682
|
-
}),
|
|
1682
|
+
}), G(g || oe);
|
|
1683
1683
|
},
|
|
1684
|
-
[h, o, r, a,
|
|
1684
|
+
[h, o, r, a, G, i]
|
|
1685
1685
|
);
|
|
1686
1686
|
Q(() => {
|
|
1687
1687
|
if (!u.current)
|
|
@@ -1712,20 +1712,20 @@ const Ca = (e) => q(
|
|
|
1712
1712
|
s({ type: ge, payload: { isLoading: !0 } }), N();
|
|
1713
1713
|
const E = Je();
|
|
1714
1714
|
D(E), i("login: Logging in with password");
|
|
1715
|
-
const { code_verifier: F, code_challenge:
|
|
1715
|
+
const { code_verifier: F, code_challenge: ir } = await ha(), st = await _a({
|
|
1716
1716
|
nonce: E,
|
|
1717
1717
|
clientId: r,
|
|
1718
|
-
code_challenge:
|
|
1718
|
+
code_challenge: ir
|
|
1719
1719
|
});
|
|
1720
|
-
if (
|
|
1721
|
-
const re = await
|
|
1720
|
+
if (st.status) {
|
|
1721
|
+
const re = await Aa({
|
|
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:
|
|
1728
|
+
code: st.data,
|
|
1729
1729
|
code_verifier: F,
|
|
1730
1730
|
domain: a,
|
|
1731
1731
|
ua: navigator.userAgent
|
|
@@ -1740,11 +1740,11 @@ const Ca = (e) => q(
|
|
|
1740
1740
|
email: re.email
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
|
-
}), !0) : (
|
|
1743
|
+
}), !0) : (G(Ye), !1);
|
|
1744
1744
|
}
|
|
1745
1745
|
return !1;
|
|
1746
1746
|
}, pe = async (g) => {
|
|
1747
|
-
g == null || g.preventDefault(), await P(
|
|
1747
|
+
g == null || g.preventDefault(), await P(wa);
|
|
1748
1748
|
}, ee = async () => {
|
|
1749
1749
|
const { isAuthenticated: g, user: T } = o;
|
|
1750
1750
|
try {
|
|
@@ -1772,7 +1772,7 @@ const Ca = (e) => q(
|
|
|
1772
1772
|
} catch {
|
|
1773
1773
|
return i(
|
|
1774
1774
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1775
|
-
), await P(
|
|
1775
|
+
), await P(Ta), "";
|
|
1776
1776
|
}
|
|
1777
1777
|
}, R = () => o.isAuthenticated && h ? h : "", $ = async () => {
|
|
1778
1778
|
const { user: g } = o;
|
|
@@ -1788,7 +1788,7 @@ const Ca = (e) => q(
|
|
|
1788
1788
|
});
|
|
1789
1789
|
if (T.status)
|
|
1790
1790
|
try {
|
|
1791
|
-
const E = await
|
|
1791
|
+
const E = await gr(T.data);
|
|
1792
1792
|
return T = await ie({
|
|
1793
1793
|
accessToken: c,
|
|
1794
1794
|
clientId: r,
|
|
@@ -1830,7 +1830,7 @@ const Ca = (e) => q(
|
|
|
1830
1830
|
});
|
|
1831
1831
|
if (E.status)
|
|
1832
1832
|
try {
|
|
1833
|
-
const F = await
|
|
1833
|
+
const F = await br(E.data);
|
|
1834
1834
|
return E = await ie({
|
|
1835
1835
|
accessToken: c,
|
|
1836
1836
|
clientId: r,
|
|
@@ -1854,7 +1854,7 @@ const Ca = (e) => q(
|
|
|
1854
1854
|
email: E.data.email
|
|
1855
1855
|
}
|
|
1856
1856
|
}
|
|
1857
|
-
}), !0) : (
|
|
1857
|
+
}), !0) : (G(Ye), !1);
|
|
1858
1858
|
} catch {
|
|
1859
1859
|
return await ie({
|
|
1860
1860
|
accessToken: c,
|
|
@@ -1868,12 +1868,12 @@ const Ca = (e) => q(
|
|
|
1868
1868
|
domain: a,
|
|
1869
1869
|
sessionExpiration: t
|
|
1870
1870
|
}
|
|
1871
|
-
}),
|
|
1871
|
+
}), G(Ye), !1;
|
|
1872
1872
|
}
|
|
1873
1873
|
return !1;
|
|
1874
1874
|
};
|
|
1875
|
-
return /* @__PURE__ */ l(
|
|
1876
|
-
|
|
1875
|
+
return /* @__PURE__ */ l(Ca.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ l(
|
|
1876
|
+
Xt.Provider,
|
|
1877
1877
|
{
|
|
1878
1878
|
value: {
|
|
1879
1879
|
...o,
|
|
@@ -1887,33 +1887,19 @@ const Ca = (e) => q(
|
|
|
1887
1887
|
children: e
|
|
1888
1888
|
}
|
|
1889
1889
|
) });
|
|
1890
|
-
},
|
|
1891
|
-
|
|
1892
|
-
PROOFREAD_CONTENT: "proofread-content",
|
|
1893
|
-
REPHRASE_CONTENT: "rephrase-content"
|
|
1894
|
-
}, Po = {
|
|
1895
|
-
[ze.SUMMARIZE_ARTICLE]: {
|
|
1896
|
-
label: "Summarize...",
|
|
1897
|
-
content: "Summarize this article: "
|
|
1898
|
-
},
|
|
1899
|
-
[ze.PROOFREAD_CONTENT]: {
|
|
1900
|
-
label: "Proofread...",
|
|
1901
|
-
content: "Proofread this: "
|
|
1902
|
-
},
|
|
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", Go = "engine-toggle", Bo = "==stats==", $a = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Tt = (e) => Number.isFinite(e) ? e : 0;
|
|
1905
|
-
function La(e) {
|
|
1890
|
+
}, tt = (e = Xt) => Qe(e), ho = "user", po = "assistant", go = "system", fo = "internal", yo = "hidden", bo = "I'm having trouble right now. Please try again later.", Fe = "OpenAI", Eo = "OpenAI", wo = "Anthropic", To = 128e3, Io = "action-message", vo = "action-reset", So = "action-model", ko = "action-restore", Ao = "action-streaming", _o = "action-engine", No = "action-search", Ro = "action-sort", xo = "action-toggle-tag", Co = "action-reset-tags", Oo = "action-set-tags", Po = "sassy-saint-", Do = "details", $o = "search", Lo = "sort", Mo = "engine-toggle", Uo = "==stats==", Da = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", wt = (e) => Number.isFinite(e) ? e : 0;
|
|
1891
|
+
function $a(e) {
|
|
1906
1892
|
return {
|
|
1907
1893
|
days: Math.trunc(e / 864e5),
|
|
1908
1894
|
hours: Math.trunc(e / 36e5 % 24),
|
|
1909
1895
|
minutes: Math.trunc(e / 6e4 % 60),
|
|
1910
1896
|
seconds: Math.trunc(e / 1e3 % 60),
|
|
1911
1897
|
milliseconds: Math.trunc(e % 1e3),
|
|
1912
|
-
microseconds: Math.trunc(
|
|
1913
|
-
nanoseconds: Math.trunc(
|
|
1898
|
+
microseconds: Math.trunc(wt(e * 1e3) % 1e3),
|
|
1899
|
+
nanoseconds: Math.trunc(wt(e * 1e6) % 1e3)
|
|
1914
1900
|
};
|
|
1915
1901
|
}
|
|
1916
|
-
function
|
|
1902
|
+
function La(e) {
|
|
1917
1903
|
return {
|
|
1918
1904
|
days: e / 86400000n,
|
|
1919
1905
|
hours: e / 3600000n % 24n,
|
|
@@ -1924,19 +1910,19 @@ function Ma(e) {
|
|
|
1924
1910
|
nanoseconds: 0n
|
|
1925
1911
|
};
|
|
1926
1912
|
}
|
|
1927
|
-
function
|
|
1913
|
+
function Ma(e) {
|
|
1928
1914
|
switch (typeof e) {
|
|
1929
1915
|
case "number": {
|
|
1930
1916
|
if (Number.isFinite(e))
|
|
1931
|
-
return
|
|
1917
|
+
return $a(e);
|
|
1932
1918
|
break;
|
|
1933
1919
|
}
|
|
1934
1920
|
case "bigint":
|
|
1935
|
-
return
|
|
1921
|
+
return La(e);
|
|
1936
1922
|
}
|
|
1937
1923
|
throw new TypeError("Expected a finite number or bigint");
|
|
1938
1924
|
}
|
|
1939
|
-
const
|
|
1925
|
+
const Ua = (e) => e === 0 || e === 0n, Ka = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Ha = 1e-7, Ba = 24n * 60n * 60n * 1000n;
|
|
1940
1926
|
function Wa(e, t) {
|
|
1941
1927
|
const r = typeof e == "bigint";
|
|
1942
1928
|
if (!r && !Number.isFinite(e))
|
|
@@ -1946,18 +1932,18 @@ function Wa(e, t) {
|
|
|
1946
1932
|
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
1933
|
let n = [];
|
|
1948
1934
|
const o = (p, m) => {
|
|
1949
|
-
const c = Math.floor(p * 10 ** m +
|
|
1935
|
+
const c = Math.floor(p * 10 ** m + Ha);
|
|
1950
1936
|
return (Math.round(c) / 10 ** m).toFixed(m);
|
|
1951
1937
|
}, s = (p, m, c, d) => {
|
|
1952
|
-
if (!((n.length === 0 || !t.colonNotation) &&
|
|
1938
|
+
if (!((n.length === 0 || !t.colonNotation) && Ua(p) && !(t.colonNotation && c === "m"))) {
|
|
1953
1939
|
if (d ?? (d = String(p)), t.colonNotation) {
|
|
1954
1940
|
const y = d.includes(".") ? d.split(".")[0].length : d.length, b = n.length > 0 ? 2 : 1;
|
|
1955
1941
|
d = "0".repeat(Math.max(0, b - y)) + d;
|
|
1956
1942
|
} else
|
|
1957
|
-
d += t.verbose ? " " +
|
|
1943
|
+
d += t.verbose ? " " + Ka(m, p) : c;
|
|
1958
1944
|
n.push(d);
|
|
1959
1945
|
}
|
|
1960
|
-
}, i =
|
|
1946
|
+
}, i = Ma(e), u = BigInt(i.days);
|
|
1961
1947
|
if (t.hideYearAndDays ? s(BigInt(u) * 24n + BigInt(i.hours), "hour", "h") : (t.hideYear ? s(u, "day", "d") : (s(u / 365n, "year", "y"), s(u % 365n, "day", "d")), s(Number(i.hours), "hour", "h")), s(Number(i.minutes), "minute", "m"), !t.hideSeconds)
|
|
1962
1948
|
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1963
1949
|
const p = Number(i.seconds), m = Number(i.milliseconds), c = Number(i.microseconds), d = Number(i.nanoseconds);
|
|
@@ -1981,7 +1967,7 @@ function Wa(e, t) {
|
|
|
1981
1967
|
const h = t.colonNotation ? ":" : " ";
|
|
1982
1968
|
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(h);
|
|
1983
1969
|
}
|
|
1984
|
-
const
|
|
1970
|
+
const Ga = process.env.NODE_ENV === "production", rt = !Ga, Va = rt ? "gizmette.local.com" : "gizmette.com", Ko = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, Ho = async () => {
|
|
1985
1971
|
const e = {
|
|
1986
1972
|
/**
|
|
1987
1973
|
* A boolean value that indicates the application would
|
|
@@ -2030,11 +2016,11 @@ const Va = process.env.NODE_ENV === "production", at = !Va, Ja = at ? "gizmette.
|
|
|
2030
2016
|
e
|
|
2031
2017
|
);
|
|
2032
2018
|
});
|
|
2033
|
-
},
|
|
2019
|
+
}, Bo = (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: [
|
|
2034
2020
|
/* @__PURE__ */ l("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2035
2021
|
/* @__PURE__ */ l("dd", { className: "my-1 inline-block", children: t[r] })
|
|
2036
2022
|
] }) }, `${e}-${r}`)) : null;
|
|
2037
|
-
function
|
|
2023
|
+
function Wo({
|
|
2038
2024
|
data: e,
|
|
2039
2025
|
formatter: t = (r) => r
|
|
2040
2026
|
}) {
|
|
@@ -2046,18 +2032,18 @@ function Yo({
|
|
|
2046
2032
|
);
|
|
2047
2033
|
return t(a ? a / r.length : 0);
|
|
2048
2034
|
}
|
|
2049
|
-
const
|
|
2035
|
+
const Go = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Vo = new Intl.NumberFormat("en", {
|
|
2050
2036
|
style: "decimal",
|
|
2051
2037
|
signDisplay: "never",
|
|
2052
2038
|
minimumFractionDigits: 0,
|
|
2053
2039
|
maximumFractionDigits: 0
|
|
2054
|
-
}),
|
|
2040
|
+
}), Jo = (e) => e > 0 ? Wa(e, {
|
|
2055
2041
|
secondsDecimalDigits: 2,
|
|
2056
2042
|
unitCount: 2
|
|
2057
|
-
}) : "N/A",
|
|
2043
|
+
}) : "N/A", Ja = (e) => f(
|
|
2058
2044
|
"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",
|
|
2059
|
-
e ||
|
|
2060
|
-
),
|
|
2045
|
+
e || rt ? "pt-4" : "pt-10"
|
|
2046
|
+
), Yo = (e, t) => t === 1 ? e : `${e}s`, Tt = "av-button", Ya = (e) => {
|
|
2061
2047
|
let t = "";
|
|
2062
2048
|
if (typeof e == "number" || typeof e == "string")
|
|
2063
2049
|
t = "m-" + e;
|
|
@@ -2066,7 +2052,7 @@ const Fo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2066
2052
|
(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(" ");
|
|
2067
2053
|
}
|
|
2068
2054
|
return t;
|
|
2069
|
-
},
|
|
2055
|
+
}, at = "icon", Qt = "button", Fa = "link", za = ({
|
|
2070
2056
|
type: e,
|
|
2071
2057
|
size: t,
|
|
2072
2058
|
labelRight: r,
|
|
@@ -2075,19 +2061,19 @@ const Fo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2075
2061
|
}) => {
|
|
2076
2062
|
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";
|
|
2077
2063
|
switch (e) {
|
|
2078
|
-
case
|
|
2064
|
+
case Qt:
|
|
2079
2065
|
return f("px-4", {
|
|
2080
2066
|
[o]: t === "small",
|
|
2081
2067
|
[s]: t === "medium",
|
|
2082
2068
|
[i]: t === "large"
|
|
2083
2069
|
});
|
|
2084
|
-
case
|
|
2070
|
+
case Fa:
|
|
2085
2071
|
return f("px-4 text-center", {
|
|
2086
2072
|
[o]: t === "small",
|
|
2087
2073
|
[s]: t === "medium",
|
|
2088
2074
|
[i]: t === "large"
|
|
2089
2075
|
});
|
|
2090
|
-
case
|
|
2076
|
+
case at:
|
|
2091
2077
|
return f("inline-flex items-center", {
|
|
2092
2078
|
"justify-center": n === "center",
|
|
2093
2079
|
"justify-start": n === "left",
|
|
@@ -2100,7 +2086,7 @@ const Fo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2100
2086
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
2101
2087
|
});
|
|
2102
2088
|
}
|
|
2103
|
-
},
|
|
2089
|
+
}, ja = ({
|
|
2104
2090
|
mode: e,
|
|
2105
2091
|
noBackground: t,
|
|
2106
2092
|
noTruncate: r,
|
|
@@ -2132,7 +2118,7 @@ const Fo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2132
2118
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
2133
2119
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
2134
2120
|
});
|
|
2135
|
-
},
|
|
2121
|
+
}, qa = ({
|
|
2136
2122
|
mode: e,
|
|
2137
2123
|
disabled: t,
|
|
2138
2124
|
variant: r
|
|
@@ -2160,7 +2146,7 @@ const Fo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2160
2146
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
2161
2147
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
2162
2148
|
});
|
|
2163
|
-
},
|
|
2149
|
+
}, Xa = ({
|
|
2164
2150
|
mode: e,
|
|
2165
2151
|
disabled: t,
|
|
2166
2152
|
variant: r
|
|
@@ -2188,7 +2174,7 @@ const Fo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2188
2174
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
2189
2175
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
2190
2176
|
});
|
|
2191
|
-
},
|
|
2177
|
+
}, Qa = ({
|
|
2192
2178
|
mode: e,
|
|
2193
2179
|
noBorder: t,
|
|
2194
2180
|
variant: r
|
|
@@ -2216,12 +2202,12 @@ const Fo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2216
2202
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
2217
2203
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
2218
2204
|
});
|
|
2219
|
-
},
|
|
2205
|
+
}, Za = ({ focusMode: e }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2220
2206
|
"focus:outline-focus-dark": e === "dark",
|
|
2221
2207
|
"focus:outline-focus-light": e === "light",
|
|
2222
2208
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2223
2209
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2224
|
-
}),
|
|
2210
|
+
}), nt = ({
|
|
2225
2211
|
type: e,
|
|
2226
2212
|
className: t,
|
|
2227
2213
|
raw: r,
|
|
@@ -2238,21 +2224,21 @@ const Fo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2238
2224
|
variant: d,
|
|
2239
2225
|
noTruncate: y,
|
|
2240
2226
|
align: b
|
|
2241
|
-
}) => (d || (d = "primary"), r ? f(
|
|
2242
|
-
|
|
2227
|
+
}) => (d || (d = "primary"), r ? f(Tt, t) : f(
|
|
2228
|
+
Tt,
|
|
2243
2229
|
t,
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2230
|
+
Ya(m),
|
|
2231
|
+
ja({ mode: a, variant: d, noBackground: c, noTruncate: y }),
|
|
2232
|
+
za({ type: e, size: i, labelRight: h, labelLeft: p, align: b }),
|
|
2233
|
+
Qa({ mode: a, variant: d, noBorder: u }),
|
|
2234
|
+
Za({ focusMode: n }),
|
|
2235
|
+
qa({ mode: a, variant: d, disabled: o }),
|
|
2249
2236
|
Xa({ mode: a, variant: d, disabled: o }),
|
|
2250
|
-
Qa({ mode: a, variant: d, disabled: o }),
|
|
2251
2237
|
{
|
|
2252
2238
|
"w-full": s,
|
|
2253
2239
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
2254
2240
|
}
|
|
2255
|
-
)),
|
|
2241
|
+
)), en = (e, t, r) => {
|
|
2256
2242
|
var a;
|
|
2257
2243
|
!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);
|
|
2258
2244
|
}, Ue = O.forwardRef((e, t) => {
|
|
@@ -2262,14 +2248,14 @@ const Fo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2262
2248
|
{
|
|
2263
2249
|
ref: t,
|
|
2264
2250
|
onClick: (o) => {
|
|
2265
|
-
|
|
2251
|
+
en(o, a, r);
|
|
2266
2252
|
},
|
|
2267
2253
|
...n
|
|
2268
2254
|
}
|
|
2269
2255
|
);
|
|
2270
2256
|
});
|
|
2271
2257
|
Ue.displayName = "BaseButton";
|
|
2272
|
-
const
|
|
2258
|
+
const Zt = O.forwardRef(
|
|
2273
2259
|
({
|
|
2274
2260
|
children: e,
|
|
2275
2261
|
disabled: t = !1,
|
|
@@ -2285,8 +2271,8 @@ const er = O.forwardRef(
|
|
|
2285
2271
|
noTruncate: m = !1,
|
|
2286
2272
|
...c
|
|
2287
2273
|
}, d) => {
|
|
2288
|
-
const y =
|
|
2289
|
-
type:
|
|
2274
|
+
const y = nt({
|
|
2275
|
+
type: Qt,
|
|
2290
2276
|
mode: r,
|
|
2291
2277
|
focusMode: a,
|
|
2292
2278
|
fullWidth: n,
|
|
@@ -2311,8 +2297,8 @@ const er = O.forwardRef(
|
|
|
2311
2297
|
);
|
|
2312
2298
|
}
|
|
2313
2299
|
);
|
|
2314
|
-
|
|
2315
|
-
const
|
|
2300
|
+
Zt.displayName = "Button";
|
|
2301
|
+
const Xe = O.forwardRef(
|
|
2316
2302
|
({
|
|
2317
2303
|
children: e,
|
|
2318
2304
|
disabled: t = !1,
|
|
@@ -2333,8 +2319,8 @@ const Qe = O.forwardRef(
|
|
|
2333
2319
|
align: v = "center",
|
|
2334
2320
|
...w
|
|
2335
2321
|
}, C) => {
|
|
2336
|
-
const D =
|
|
2337
|
-
type:
|
|
2322
|
+
const D = nt({
|
|
2323
|
+
type: at,
|
|
2338
2324
|
mode: r,
|
|
2339
2325
|
focusMode: a,
|
|
2340
2326
|
fullWidth: n,
|
|
@@ -2372,7 +2358,7 @@ const Qe = O.forwardRef(
|
|
|
2372
2358
|
);
|
|
2373
2359
|
}
|
|
2374
2360
|
);
|
|
2375
|
-
|
|
2361
|
+
Xe.displayName = "ButtonIcon";
|
|
2376
2362
|
/*!
|
|
2377
2363
|
@versini/ui-button v1.1.11
|
|
2378
2364
|
© 2024 gizmette.com
|
|
@@ -2386,7 +2372,7 @@ try {
|
|
|
2386
2372
|
});
|
|
2387
2373
|
} catch {
|
|
2388
2374
|
}
|
|
2389
|
-
const
|
|
2375
|
+
const tn = O.forwardRef(
|
|
2390
2376
|
({
|
|
2391
2377
|
children: e,
|
|
2392
2378
|
disabled: t = !1,
|
|
@@ -2408,8 +2394,8 @@ const rn = O.forwardRef(
|
|
|
2408
2394
|
active: w = !1,
|
|
2409
2395
|
...C
|
|
2410
2396
|
}, D) => {
|
|
2411
|
-
const M =
|
|
2412
|
-
type:
|
|
2397
|
+
const M = nt({
|
|
2398
|
+
type: at,
|
|
2413
2399
|
mode: r,
|
|
2414
2400
|
focusMode: a,
|
|
2415
2401
|
fullWidth: n,
|
|
@@ -2463,7 +2449,7 @@ const rn = O.forwardRef(
|
|
|
2463
2449
|
) });
|
|
2464
2450
|
}
|
|
2465
2451
|
);
|
|
2466
|
-
|
|
2452
|
+
tn.displayName = "ButtonSort";
|
|
2467
2453
|
/*!
|
|
2468
2454
|
@versini/ui-card v1.0.10
|
|
2469
2455
|
© 2024 gizmette.com
|
|
@@ -2478,11 +2464,11 @@ try {
|
|
|
2478
2464
|
} catch {
|
|
2479
2465
|
}
|
|
2480
2466
|
const Re = "av-card";
|
|
2481
|
-
function
|
|
2467
|
+
function rn(e) {
|
|
2482
2468
|
const t = kt();
|
|
2483
2469
|
return `${e}${t}`;
|
|
2484
2470
|
}
|
|
2485
|
-
const
|
|
2471
|
+
const an = (e) => {
|
|
2486
2472
|
let t = "";
|
|
2487
2473
|
if (typeof e == "number" || typeof e == "string")
|
|
2488
2474
|
t = "m-" + e;
|
|
@@ -2491,7 +2477,7 @@ const nn = (e) => {
|
|
|
2491
2477
|
(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(" ");
|
|
2492
2478
|
}
|
|
2493
2479
|
return t;
|
|
2494
|
-
},
|
|
2480
|
+
}, nn = ({
|
|
2495
2481
|
className: e,
|
|
2496
2482
|
headerClassName: t,
|
|
2497
2483
|
bodyClassName: r,
|
|
@@ -2505,7 +2491,7 @@ const nn = (e) => {
|
|
|
2505
2491
|
Re,
|
|
2506
2492
|
e,
|
|
2507
2493
|
"rounded-md",
|
|
2508
|
-
|
|
2494
|
+
an(n),
|
|
2509
2495
|
{
|
|
2510
2496
|
"border-none": i,
|
|
2511
2497
|
"border-2": !i,
|
|
@@ -2533,7 +2519,7 @@ const nn = (e) => {
|
|
|
2533
2519
|
footer: m
|
|
2534
2520
|
};
|
|
2535
2521
|
};
|
|
2536
|
-
function
|
|
2522
|
+
function on({
|
|
2537
2523
|
id: e,
|
|
2538
2524
|
content: t,
|
|
2539
2525
|
userAriaLabelledby: r,
|
|
@@ -2541,7 +2527,7 @@ function sn({
|
|
|
2541
2527
|
}) {
|
|
2542
2528
|
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;
|
|
2543
2529
|
}
|
|
2544
|
-
const
|
|
2530
|
+
const sn = ({
|
|
2545
2531
|
header: e,
|
|
2546
2532
|
headerClassName: t,
|
|
2547
2533
|
footer: r,
|
|
@@ -2557,7 +2543,7 @@ const cn = ({
|
|
|
2557
2543
|
...c
|
|
2558
2544
|
}) => {
|
|
2559
2545
|
let d = null, y = null;
|
|
2560
|
-
const b = typeof e == "string", v =
|
|
2546
|
+
const b = typeof e == "string", v = rn(Re), w = nn({
|
|
2561
2547
|
className: o,
|
|
2562
2548
|
headerClassName: t,
|
|
2563
2549
|
bodyClassName: s,
|
|
@@ -2577,7 +2563,7 @@ const cn = ({
|
|
|
2577
2563
|
...c,
|
|
2578
2564
|
children: [
|
|
2579
2565
|
/* @__PURE__ */ l(
|
|
2580
|
-
|
|
2566
|
+
on,
|
|
2581
2567
|
{
|
|
2582
2568
|
...d && { id: d },
|
|
2583
2569
|
content: e,
|
|
@@ -2590,7 +2576,7 @@ const cn = ({
|
|
|
2590
2576
|
]
|
|
2591
2577
|
}
|
|
2592
2578
|
) });
|
|
2593
|
-
},
|
|
2579
|
+
}, cn = (e) => {
|
|
2594
2580
|
let t = "";
|
|
2595
2581
|
if (typeof e == "number" || typeof e == "string")
|
|
2596
2582
|
t = "m-" + e;
|
|
@@ -2611,7 +2597,7 @@ const cn = ({
|
|
|
2611
2597
|
semantic: u = !1,
|
|
2612
2598
|
...h
|
|
2613
2599
|
}) => {
|
|
2614
|
-
const p =
|
|
2600
|
+
const p = cn(s), m = f(
|
|
2615
2601
|
p,
|
|
2616
2602
|
a || o
|
|
2617
2603
|
);
|
|
@@ -2646,7 +2632,7 @@ try {
|
|
|
2646
2632
|
});
|
|
2647
2633
|
} catch {
|
|
2648
2634
|
}
|
|
2649
|
-
const
|
|
2635
|
+
const ln = ({
|
|
2650
2636
|
className: e,
|
|
2651
2637
|
viewBox: t,
|
|
2652
2638
|
spacing: r,
|
|
@@ -2671,7 +2657,7 @@ const dn = ({
|
|
|
2671
2657
|
}
|
|
2672
2658
|
) })
|
|
2673
2659
|
}
|
|
2674
|
-
),
|
|
2660
|
+
), dn = ({
|
|
2675
2661
|
className: e,
|
|
2676
2662
|
viewBox: t,
|
|
2677
2663
|
spacing: r,
|
|
@@ -2699,7 +2685,7 @@ const dn = ({
|
|
|
2699
2685
|
/* @__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" })
|
|
2700
2686
|
]
|
|
2701
2687
|
}
|
|
2702
|
-
),
|
|
2688
|
+
), un = ({
|
|
2703
2689
|
className: e,
|
|
2704
2690
|
viewBox: t,
|
|
2705
2691
|
spacing: r,
|
|
@@ -2738,7 +2724,7 @@ const dn = ({
|
|
|
2738
2724
|
]
|
|
2739
2725
|
}
|
|
2740
2726
|
);
|
|
2741
|
-
},
|
|
2727
|
+
}, mn = ({
|
|
2742
2728
|
className: e,
|
|
2743
2729
|
viewBox: t,
|
|
2744
2730
|
spacing: r,
|
|
@@ -2793,7 +2779,7 @@ try {
|
|
|
2793
2779
|
});
|
|
2794
2780
|
} catch {
|
|
2795
2781
|
}
|
|
2796
|
-
const
|
|
2782
|
+
const hn = "av-main", pn = (e) => {
|
|
2797
2783
|
let t = "";
|
|
2798
2784
|
if (typeof e == "number" || typeof e == "string")
|
|
2799
2785
|
t = "m-" + e;
|
|
@@ -2802,17 +2788,17 @@ const pn = "av-main", gn = (e) => {
|
|
|
2802
2788
|
(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(" ");
|
|
2803
2789
|
}
|
|
2804
2790
|
return t;
|
|
2805
|
-
},
|
|
2791
|
+
}, gn = ({
|
|
2806
2792
|
children: e,
|
|
2807
2793
|
className: t,
|
|
2808
2794
|
raw: r = !1,
|
|
2809
2795
|
spacing: a
|
|
2810
2796
|
}) => {
|
|
2811
|
-
const n = f(t,
|
|
2797
|
+
const n = f(t, hn, pn(a), {
|
|
2812
2798
|
"mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
|
|
2813
2799
|
});
|
|
2814
2800
|
return /* @__PURE__ */ l("main", { className: n, children: e });
|
|
2815
|
-
},
|
|
2801
|
+
}, fn = (e) => {
|
|
2816
2802
|
let t = "";
|
|
2817
2803
|
if (typeof e == "number" || typeof e == "string")
|
|
2818
2804
|
t = "m-" + e;
|
|
@@ -2821,10 +2807,10 @@ const pn = "av-main", gn = (e) => {
|
|
|
2821
2807
|
(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(" ");
|
|
2822
2808
|
}
|
|
2823
2809
|
return t;
|
|
2824
|
-
},
|
|
2810
|
+
}, yn = "av-flexgrid", _e = "av-flexgrid-item", De = 0.25, er = O.createContext({
|
|
2825
2811
|
columnGap: 0,
|
|
2826
2812
|
rowGap: 0
|
|
2827
|
-
}),
|
|
2813
|
+
}), It = ({
|
|
2828
2814
|
children: e,
|
|
2829
2815
|
className: t,
|
|
2830
2816
|
columnGap: r = 1,
|
|
@@ -2851,12 +2837,12 @@ const pn = "av-main", gn = (e) => {
|
|
|
2851
2837
|
marginLeft: r * -1 * De + "rem",
|
|
2852
2838
|
marginTop: a * -1 * De + "rem"
|
|
2853
2839
|
}, c = f(
|
|
2854
|
-
|
|
2840
|
+
yn,
|
|
2855
2841
|
t,
|
|
2856
2842
|
"box-border flex flex-wrap"
|
|
2857
2843
|
), d = { columnGap: r, rowGap: a }, y = h ? "div" : O.Fragment;
|
|
2858
|
-
return /* @__PURE__ */ l(y, { ...h ? { className:
|
|
2859
|
-
},
|
|
2844
|
+
return /* @__PURE__ */ l(y, { ...h ? { className: fn(h) } : {}, children: /* @__PURE__ */ l("div", { className: c, style: m, ...p, children: /* @__PURE__ */ l(er.Provider, { value: d, children: e }) }) });
|
|
2845
|
+
}, ze = (e, t) => f({
|
|
2860
2846
|
"basis-1/12": e === 1 && !t,
|
|
2861
2847
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
2862
2848
|
"md:basis-1/12": e === 1 && t === "md",
|
|
@@ -2929,7 +2915,7 @@ const pn = "av-main", gn = (e) => {
|
|
|
2929
2915
|
"lg:basis-full": e === 12 && t === "lg",
|
|
2930
2916
|
"xl:basis-full": e === 12 && t === "xl",
|
|
2931
2917
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
2932
|
-
}),
|
|
2918
|
+
}), bn = ({
|
|
2933
2919
|
className: e,
|
|
2934
2920
|
span: t
|
|
2935
2921
|
}) => {
|
|
@@ -2937,14 +2923,14 @@ const pn = "av-main", gn = (e) => {
|
|
|
2937
2923
|
return f(e, _e, "box-border basis-auto");
|
|
2938
2924
|
if (typeof t == "number")
|
|
2939
2925
|
return f(e, _e, "box-border max-w-full", {
|
|
2940
|
-
[`${
|
|
2926
|
+
[`${ze(t)}`]: !0
|
|
2941
2927
|
});
|
|
2942
2928
|
if (typeof t == "string")
|
|
2943
2929
|
return f(e, _e, "box-border basis-auto", {
|
|
2944
2930
|
"max-w-full grow": t === "auto"
|
|
2945
2931
|
});
|
|
2946
2932
|
if (typeof t == "object") {
|
|
2947
|
-
const r = Object.entries(t).map(([a, n]) => a === "fallback" ?
|
|
2933
|
+
const r = Object.entries(t).map(([a, n]) => a === "fallback" ? ze(n) : ze(n, a));
|
|
2948
2934
|
return f(
|
|
2949
2935
|
e,
|
|
2950
2936
|
_e,
|
|
@@ -2958,10 +2944,10 @@ const pn = "av-main", gn = (e) => {
|
|
|
2958
2944
|
span: r,
|
|
2959
2945
|
...a
|
|
2960
2946
|
}) => {
|
|
2961
|
-
const { columnGap: n, rowGap: o } =
|
|
2947
|
+
const { columnGap: n, rowGap: o } = Qe(er), s = {
|
|
2962
2948
|
paddingLeft: n * De + "rem",
|
|
2963
2949
|
paddingTop: o * De + "rem"
|
|
2964
|
-
}, i =
|
|
2950
|
+
}, i = bn({
|
|
2965
2951
|
className: t,
|
|
2966
2952
|
span: r
|
|
2967
2953
|
});
|
|
@@ -2980,14 +2966,14 @@ try {
|
|
|
2980
2966
|
});
|
|
2981
2967
|
} catch {
|
|
2982
2968
|
}
|
|
2983
|
-
const
|
|
2984
|
-
function
|
|
2969
|
+
const tr = "av-text-input", En = "av-text-input-wrapper", je = "av-text-input-helper-text";
|
|
2970
|
+
function wn() {
|
|
2985
2971
|
const e = L(!1);
|
|
2986
2972
|
return Q(() => (e.current = !0, () => {
|
|
2987
2973
|
e.current = !1;
|
|
2988
2974
|
}), []), q(() => e.current, []);
|
|
2989
2975
|
}
|
|
2990
|
-
const
|
|
2976
|
+
const Tn = {
|
|
2991
2977
|
x: 0,
|
|
2992
2978
|
y: 0,
|
|
2993
2979
|
width: 0,
|
|
@@ -2997,8 +2983,8 @@ const In = {
|
|
|
2997
2983
|
bottom: 0,
|
|
2998
2984
|
right: 0
|
|
2999
2985
|
};
|
|
3000
|
-
function
|
|
3001
|
-
const t =
|
|
2986
|
+
function In(e) {
|
|
2987
|
+
const t = wn(), r = L(0), a = L(null), [n, o] = j(Tn), s = At(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
3002
2988
|
const u = i[0];
|
|
3003
2989
|
u && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
3004
2990
|
a.current && t() && o(u.contentRect);
|
|
@@ -3008,7 +2994,7 @@ function vn(e) {
|
|
|
3008
2994
|
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
3009
2995
|
}), [s, e]), [a, n];
|
|
3010
2996
|
}
|
|
3011
|
-
function
|
|
2997
|
+
function vn(e) {
|
|
3012
2998
|
const t = kt();
|
|
3013
2999
|
if (!e)
|
|
3014
3000
|
return t;
|
|
@@ -3019,7 +3005,7 @@ function An(e) {
|
|
|
3019
3005
|
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
3020
3006
|
}
|
|
3021
3007
|
}
|
|
3022
|
-
const
|
|
3008
|
+
const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", Sn = {
|
|
3023
3009
|
alert: null,
|
|
3024
3010
|
alertdialog: null,
|
|
3025
3011
|
log: "polite",
|
|
@@ -3029,12 +3015,12 @@ const ar = "SET_ANNOUNCEMENT", nr = "CLEAR_ANNOUNCEMENT", Sn = {
|
|
|
3029
3015
|
timer: "assertive"
|
|
3030
3016
|
}, kn = (e, t) => {
|
|
3031
3017
|
switch (t == null ? void 0 : t.type) {
|
|
3032
|
-
case
|
|
3018
|
+
case rr:
|
|
3033
3019
|
return {
|
|
3034
3020
|
...e,
|
|
3035
3021
|
announcement: t.payload
|
|
3036
3022
|
};
|
|
3037
|
-
case
|
|
3023
|
+
case ar:
|
|
3038
3024
|
return {
|
|
3039
3025
|
...e,
|
|
3040
3026
|
announcement: null
|
|
@@ -3042,14 +3028,14 @@ const ar = "SET_ANNOUNCEMENT", nr = "CLEAR_ANNOUNCEMENT", Sn = {
|
|
|
3042
3028
|
default:
|
|
3043
3029
|
return e;
|
|
3044
3030
|
}
|
|
3045
|
-
},
|
|
3031
|
+
}, An = ({
|
|
3046
3032
|
onAnnouncementClear: e,
|
|
3047
3033
|
dispatch: t
|
|
3048
3034
|
}) => {
|
|
3049
3035
|
t({
|
|
3050
|
-
type:
|
|
3036
|
+
type: ar
|
|
3051
3037
|
}), typeof e == "function" && e();
|
|
3052
|
-
},
|
|
3038
|
+
}, vt = ({
|
|
3053
3039
|
children: e,
|
|
3054
3040
|
clearAnnouncementDelay: t,
|
|
3055
3041
|
clearAnnouncementTimeoutRef: r,
|
|
@@ -3057,16 +3043,16 @@ const ar = "SET_ANNOUNCEMENT", nr = "CLEAR_ANNOUNCEMENT", Sn = {
|
|
|
3057
3043
|
dispatch: n
|
|
3058
3044
|
}) => {
|
|
3059
3045
|
(r == null ? void 0 : r.current) !== null && clearTimeout(r.current), e !== null && n({
|
|
3060
|
-
type:
|
|
3046
|
+
type: rr,
|
|
3061
3047
|
payload: e
|
|
3062
3048
|
}), t && (r.current = setTimeout(
|
|
3063
|
-
() =>
|
|
3049
|
+
() => An({
|
|
3064
3050
|
onAnnouncementClear: a,
|
|
3065
3051
|
dispatch: n
|
|
3066
3052
|
}),
|
|
3067
3053
|
t
|
|
3068
3054
|
));
|
|
3069
|
-
},
|
|
3055
|
+
}, _n = ({
|
|
3070
3056
|
children: e,
|
|
3071
3057
|
announcementTimeoutRef: t,
|
|
3072
3058
|
announcementDelay: r,
|
|
@@ -3075,13 +3061,13 @@ const ar = "SET_ANNOUNCEMENT", nr = "CLEAR_ANNOUNCEMENT", Sn = {
|
|
|
3075
3061
|
onAnnouncementClear: o,
|
|
3076
3062
|
dispatch: s
|
|
3077
3063
|
}) => {
|
|
3078
|
-
clearTimeout(t.current), r ? t.current = setTimeout(
|
|
3064
|
+
clearTimeout(t.current), r ? t.current = setTimeout(vt, r, {
|
|
3079
3065
|
children: e,
|
|
3080
3066
|
clearAnnouncementDelay: a,
|
|
3081
3067
|
clearAnnouncementTimeoutRef: n,
|
|
3082
3068
|
onAnnouncementClear: o,
|
|
3083
3069
|
dispatch: s
|
|
3084
|
-
}) :
|
|
3070
|
+
}) : vt({
|
|
3085
3071
|
children: e,
|
|
3086
3072
|
clearAnnouncementDelay: a,
|
|
3087
3073
|
clearAnnouncementTimeoutRef: n,
|
|
@@ -3089,7 +3075,7 @@ const ar = "SET_ANNOUNCEMENT", nr = "CLEAR_ANNOUNCEMENT", Sn = {
|
|
|
3089
3075
|
dispatch: s
|
|
3090
3076
|
});
|
|
3091
3077
|
};
|
|
3092
|
-
function
|
|
3078
|
+
function nr({
|
|
3093
3079
|
children: e,
|
|
3094
3080
|
className: t,
|
|
3095
3081
|
politeness: r,
|
|
@@ -3105,7 +3091,7 @@ function or({
|
|
|
3105
3091
|
});
|
|
3106
3092
|
let d = r;
|
|
3107
3093
|
typeof d > "u" && (d = a ? Sn[a] : "assertive"), Q(() => {
|
|
3108
|
-
|
|
3094
|
+
_n({
|
|
3109
3095
|
announcementTimeoutRef: h,
|
|
3110
3096
|
announcementDelay: n,
|
|
3111
3097
|
children: e,
|
|
@@ -3134,7 +3120,7 @@ function or({
|
|
|
3134
3120
|
}
|
|
3135
3121
|
);
|
|
3136
3122
|
}
|
|
3137
|
-
const
|
|
3123
|
+
const Nn = (e) => {
|
|
3138
3124
|
let t = "";
|
|
3139
3125
|
if (typeof e == "number" || typeof e == "string")
|
|
3140
3126
|
t = "m-" + e;
|
|
@@ -3157,21 +3143,21 @@ try {
|
|
|
3157
3143
|
});
|
|
3158
3144
|
} catch {
|
|
3159
3145
|
}
|
|
3160
|
-
const
|
|
3146
|
+
const Rn = ({
|
|
3161
3147
|
mode: e
|
|
3162
3148
|
}) => f({
|
|
3163
3149
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
3164
3150
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
3165
3151
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
3166
3152
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
3167
|
-
}),
|
|
3153
|
+
}), xn = ({
|
|
3168
3154
|
focusMode: e
|
|
3169
3155
|
}) => f("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
3170
3156
|
"focus:outline-focus-dark": e === "dark",
|
|
3171
3157
|
"focus:outline-focus-light": e === "light",
|
|
3172
3158
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3173
3159
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3174
|
-
}),
|
|
3160
|
+
}), Cn = ({
|
|
3175
3161
|
noBorder: e,
|
|
3176
3162
|
error: t
|
|
3177
3163
|
}) => f("border-2", {
|
|
@@ -3179,7 +3165,7 @@ const xn = ({
|
|
|
3179
3165
|
"focus:border-border-dark": !e && t,
|
|
3180
3166
|
"border-border-error-dark": !e && t,
|
|
3181
3167
|
"border-transparent": e
|
|
3182
|
-
}),
|
|
3168
|
+
}), On = ({
|
|
3183
3169
|
disabled: e,
|
|
3184
3170
|
raw: t,
|
|
3185
3171
|
error: r,
|
|
@@ -3203,7 +3189,7 @@ const xn = ({
|
|
|
3203
3189
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
3204
3190
|
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
3205
3191
|
});
|
|
3206
|
-
},
|
|
3192
|
+
}, Pn = ({
|
|
3207
3193
|
error: e,
|
|
3208
3194
|
raw: t,
|
|
3209
3195
|
mode: r,
|
|
@@ -3213,24 +3199,24 @@ const xn = ({
|
|
|
3213
3199
|
return "";
|
|
3214
3200
|
if (a)
|
|
3215
3201
|
return f(
|
|
3216
|
-
|
|
3202
|
+
je,
|
|
3217
3203
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
3218
3204
|
);
|
|
3219
3205
|
if (!e)
|
|
3220
|
-
return f(
|
|
3206
|
+
return f(je, "absolute px-2 font-medium", {
|
|
3221
3207
|
"text-copy-lighter": r === "dark",
|
|
3222
3208
|
"text-copy-dark": r === "light",
|
|
3223
3209
|
"text-copy-dark dark:text-copy-lighter": r === "system",
|
|
3224
3210
|
"text-copy-lighter dark:text-copy-dark": r === "alt-system"
|
|
3225
3211
|
});
|
|
3226
3212
|
if (e)
|
|
3227
|
-
return f(
|
|
3213
|
+
return f(je, "absolute px-2 font-medium", {
|
|
3228
3214
|
"text-copy-error-light bg-surface-darker": r === "dark",
|
|
3229
3215
|
"text-copy-error-dark": r === "light",
|
|
3230
3216
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
3231
3217
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
3232
3218
|
});
|
|
3233
|
-
},
|
|
3219
|
+
}, Dn = ({
|
|
3234
3220
|
className: e,
|
|
3235
3221
|
inputClassName: t,
|
|
3236
3222
|
raw: r,
|
|
@@ -3245,9 +3231,9 @@ const xn = ({
|
|
|
3245
3231
|
}) => {
|
|
3246
3232
|
const m = r ? e : f(
|
|
3247
3233
|
"relative flex w-full flex-col justify-center",
|
|
3248
|
-
|
|
3234
|
+
En,
|
|
3249
3235
|
e,
|
|
3250
|
-
|
|
3236
|
+
Nn(s)
|
|
3251
3237
|
);
|
|
3252
3238
|
let c = "";
|
|
3253
3239
|
switch (h) {
|
|
@@ -3268,22 +3254,22 @@ const xn = ({
|
|
|
3268
3254
|
break;
|
|
3269
3255
|
}
|
|
3270
3256
|
const d = r ? f(t) : f(
|
|
3271
|
-
|
|
3257
|
+
tr,
|
|
3272
3258
|
t,
|
|
3273
3259
|
c,
|
|
3274
3260
|
"rounded-md text-base px-4",
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3261
|
+
Rn({ mode: i }),
|
|
3262
|
+
xn({ focusMode: u }),
|
|
3263
|
+
Cn({ noBorder: n, error: o }),
|
|
3278
3264
|
{
|
|
3279
3265
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
3280
3266
|
}
|
|
3281
|
-
), y = r ? void 0 : "sr-only", b =
|
|
3267
|
+
), y = r ? void 0 : "sr-only", b = On({
|
|
3282
3268
|
disabled: a,
|
|
3283
3269
|
raw: r,
|
|
3284
3270
|
error: o,
|
|
3285
3271
|
mode: i
|
|
3286
|
-
}), v =
|
|
3272
|
+
}), v = Pn({
|
|
3287
3273
|
error: o,
|
|
3288
3274
|
raw: r,
|
|
3289
3275
|
mode: i,
|
|
@@ -3297,7 +3283,7 @@ const xn = ({
|
|
|
3297
3283
|
helperText: v,
|
|
3298
3284
|
rightElement: w
|
|
3299
3285
|
};
|
|
3300
|
-
},
|
|
3286
|
+
}, ot = O.forwardRef(
|
|
3301
3287
|
({
|
|
3302
3288
|
id: e,
|
|
3303
3289
|
name: t,
|
|
@@ -3320,13 +3306,13 @@ const xn = ({
|
|
|
3320
3306
|
size: C = "md",
|
|
3321
3307
|
...D
|
|
3322
3308
|
}, M) => {
|
|
3323
|
-
const [Z, N] =
|
|
3309
|
+
const [Z, N] = In(), [G, P] = j(0), V = vn({ id: e, prefix: `${tr}-` }), pe = `${t} error, ${y}`, ee = L(null), R = L(null), $ = {
|
|
3324
3310
|
xs: { label: "-25px", helperText: "30px" },
|
|
3325
3311
|
sm: { label: "-29px", helperText: "34px" },
|
|
3326
3312
|
md: { label: "-33px", helperText: "38px" },
|
|
3327
3313
|
lg: { label: "-15px", helperText: "22px" },
|
|
3328
3314
|
xl: { label: "-19px", helperText: "25px" }
|
|
3329
|
-
}, U =
|
|
3315
|
+
}, U = Dn({
|
|
3330
3316
|
className: o,
|
|
3331
3317
|
inputClassName: s,
|
|
3332
3318
|
error: a,
|
|
@@ -3339,9 +3325,9 @@ const xn = ({
|
|
|
3339
3325
|
size: C,
|
|
3340
3326
|
rightElementClassName: v
|
|
3341
3327
|
});
|
|
3342
|
-
return
|
|
3328
|
+
return it(() => {
|
|
3343
3329
|
N && N.width && P(N.width + 18 + 10);
|
|
3344
|
-
}, [N]),
|
|
3330
|
+
}, [N]), it(() => {
|
|
3345
3331
|
var g, T;
|
|
3346
3332
|
const { label: E, helperText: F } = $[C];
|
|
3347
3333
|
(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(
|
|
@@ -3370,7 +3356,7 @@ const xn = ({
|
|
|
3370
3356
|
className: U.input,
|
|
3371
3357
|
...y && { "aria-describedby": `${V}-helper` },
|
|
3372
3358
|
...a && { "aria-invalid": "true" },
|
|
3373
|
-
...b && !n && { style: { paddingRight:
|
|
3359
|
+
...b && !n && { style: { paddingRight: G } },
|
|
3374
3360
|
...D
|
|
3375
3361
|
}
|
|
3376
3362
|
),
|
|
@@ -3401,20 +3387,20 @@ const xn = ({
|
|
|
3401
3387
|
children: b
|
|
3402
3388
|
}
|
|
3403
3389
|
),
|
|
3404
|
-
a && y && /* @__PURE__ */ l(
|
|
3390
|
+
a && y && /* @__PURE__ */ l(nr, { politeness: "polite", clearAnnouncementDelay: 500, children: pe })
|
|
3405
3391
|
] });
|
|
3406
3392
|
}
|
|
3407
3393
|
);
|
|
3408
|
-
|
|
3409
|
-
function
|
|
3410
|
-
return
|
|
3394
|
+
ot.displayName = "TextInput";
|
|
3395
|
+
function $n(e) {
|
|
3396
|
+
return At(() => e.every((t) => t == null) ? () => {
|
|
3411
3397
|
} : (t) => {
|
|
3412
3398
|
e.forEach((r) => {
|
|
3413
3399
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
3414
3400
|
});
|
|
3415
3401
|
}, e);
|
|
3416
3402
|
}
|
|
3417
|
-
const
|
|
3403
|
+
const Ln = 500, Mn = 5e3, Un = 2e4, or = O.forwardRef(
|
|
3418
3404
|
({
|
|
3419
3405
|
name: e,
|
|
3420
3406
|
disabled: t,
|
|
@@ -3432,19 +3418,19 @@ const Mn = 500, Un = 5e3, Kn = 2e4, sr = O.forwardRef(
|
|
|
3432
3418
|
const [d, y] = j(!0), [b, v] = j({
|
|
3433
3419
|
message: null,
|
|
3434
3420
|
politeness: null
|
|
3435
|
-
}), w = L(!0), C = L(), D = L(null), M =
|
|
3421
|
+
}), w = L(!0), C = L(), D = L(null), M = $n([c, D]), Z = d ? "Show" : "Hide", N = () => {
|
|
3436
3422
|
clearTimeout(C.current), w.current || (C.current = window.setTimeout(() => {
|
|
3437
3423
|
w.current = !0, y(!0), v({
|
|
3438
|
-
announcementTimeout:
|
|
3424
|
+
announcementTimeout: Mn,
|
|
3439
3425
|
politeness: "polite",
|
|
3440
3426
|
message: `${r} hiding characters`
|
|
3441
3427
|
}), n && n(!0);
|
|
3442
|
-
},
|
|
3443
|
-
},
|
|
3428
|
+
}, Un));
|
|
3429
|
+
}, G = (R) => {
|
|
3444
3430
|
R.preventDefault();
|
|
3445
3431
|
const $ = !w.current;
|
|
3446
3432
|
w.current = $, N(), y($), v({
|
|
3447
|
-
announcementTimeout:
|
|
3433
|
+
announcementTimeout: Ln,
|
|
3448
3434
|
politeness: "assertive",
|
|
3449
3435
|
message: $ ? "Characters hidden" : "Characters showing"
|
|
3450
3436
|
}), n && n($);
|
|
@@ -3463,7 +3449,7 @@ const Mn = 500, Un = 5e3, Kn = 2e4, sr = O.forwardRef(
|
|
|
3463
3449
|
clearTimeout(C.current);
|
|
3464
3450
|
}, []), /* @__PURE__ */ I(ye, { children: [
|
|
3465
3451
|
/* @__PURE__ */ l(
|
|
3466
|
-
|
|
3452
|
+
ot,
|
|
3467
3453
|
{
|
|
3468
3454
|
ref: M,
|
|
3469
3455
|
name: e,
|
|
@@ -3478,7 +3464,7 @@ const Mn = 500, Un = 5e3, Kn = 2e4, sr = O.forwardRef(
|
|
|
3478
3464
|
rightElement: O.cloneElement(h, {
|
|
3479
3465
|
ref: c,
|
|
3480
3466
|
label: Z,
|
|
3481
|
-
onClick:
|
|
3467
|
+
onClick: G,
|
|
3482
3468
|
onBlur: P,
|
|
3483
3469
|
disabled: t
|
|
3484
3470
|
}),
|
|
@@ -3486,7 +3472,7 @@ const Mn = 500, Un = 5e3, Kn = 2e4, sr = O.forwardRef(
|
|
|
3486
3472
|
}
|
|
3487
3473
|
),
|
|
3488
3474
|
/* @__PURE__ */ l(
|
|
3489
|
-
|
|
3475
|
+
nr,
|
|
3490
3476
|
{
|
|
3491
3477
|
role: "status",
|
|
3492
3478
|
politeness: b.politeness,
|
|
@@ -3497,7 +3483,7 @@ const Mn = 500, Un = 5e3, Kn = 2e4, sr = O.forwardRef(
|
|
|
3497
3483
|
] });
|
|
3498
3484
|
}
|
|
3499
3485
|
);
|
|
3500
|
-
|
|
3486
|
+
or.displayName = "TextInputMask";
|
|
3501
3487
|
/*!
|
|
3502
3488
|
@versini/ui-textinput v1.2.2
|
|
3503
3489
|
© 2024 gizmette.com
|
|
@@ -3511,11 +3497,7 @@ try {
|
|
|
3511
3497
|
});
|
|
3512
3498
|
} catch {
|
|
3513
3499
|
}
|
|
3514
|
-
const
|
|
3515
|
-
TAGS: {
|
|
3516
|
-
TITLE: "Pre-filled tags",
|
|
3517
|
-
DESCRIPTION: "Tags are pre-filled buttons available on the main screen, to help you quickly start requests."
|
|
3518
|
-
},
|
|
3500
|
+
const Kn = "ASK! ME! ANYTHING!", sr = "Sassy Saint", Hn = "gizmette.com", Bn = "Log in", Wn = "Sign in with a Passkey", Fo = "Log out", Gn = "Password", Vn = "Powered by ", zo = "Send", jo = "Profile", qo = "Statistics", Xo = "Chat history", Qo = "About", Zo = "Type your question here", es = "Clear chat", ts = "Cancel chat", rs = "N/A", as = "Tags are pre-filled buttons available on the main screen, to help you quickly start requests. The label is used for the button, and the content is what will be inserted in the chat when the button is pressed.", ns = {
|
|
3519
3501
|
PREFERENCES: {
|
|
3520
3502
|
TITLE: "User settings",
|
|
3521
3503
|
NAME: "Name",
|
|
@@ -3563,7 +3545,7 @@ try {
|
|
|
3563
3545
|
});
|
|
3564
3546
|
} catch {
|
|
3565
3547
|
}
|
|
3566
|
-
const
|
|
3548
|
+
const Jn = "av-footer", Yn = (e) => {
|
|
3567
3549
|
let t = "";
|
|
3568
3550
|
if (typeof e == "number" || typeof e == "string")
|
|
3569
3551
|
t = "m-" + e;
|
|
@@ -3572,7 +3554,7 @@ const Yn = "av-footer", Fn = (e) => {
|
|
|
3572
3554
|
(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(" ");
|
|
3573
3555
|
}
|
|
3574
3556
|
return t;
|
|
3575
|
-
},
|
|
3557
|
+
}, Fn = ({
|
|
3576
3558
|
className: e,
|
|
3577
3559
|
mode: t = "system",
|
|
3578
3560
|
row1: r,
|
|
@@ -3581,7 +3563,7 @@ const Yn = "av-footer", Fn = (e) => {
|
|
|
3581
3563
|
spacing: o,
|
|
3582
3564
|
raw: s = !1
|
|
3583
3565
|
}) => {
|
|
3584
|
-
const i = f(
|
|
3566
|
+
const i = f(Jn, e, Yn(o), {
|
|
3585
3567
|
"text-copy-dark": !s && t === "dark",
|
|
3586
3568
|
"text-copy-lighter": !s && t === "light",
|
|
3587
3569
|
"text-copy-dark dark:text-copy-lighter": !s && t === "system",
|
|
@@ -3593,14 +3575,15 @@ const Yn = "av-footer", Fn = (e) => {
|
|
|
3593
3575
|
r && /* @__PURE__ */ l("div", { children: r }),
|
|
3594
3576
|
a && /* @__PURE__ */ l("div", { children: a })
|
|
3595
3577
|
] });
|
|
3596
|
-
},
|
|
3578
|
+
}, zn = O.createContext({
|
|
3597
3579
|
state: {
|
|
3598
3580
|
id: "",
|
|
3599
3581
|
model: Fe,
|
|
3600
3582
|
engine: Fe,
|
|
3601
3583
|
usage: 0,
|
|
3602
3584
|
messages: [],
|
|
3603
|
-
isComponent: !1
|
|
3585
|
+
isComponent: !1,
|
|
3586
|
+
tags: []
|
|
3604
3587
|
},
|
|
3605
3588
|
dispatch: () => {
|
|
3606
3589
|
},
|
|
@@ -3611,58 +3594,58 @@ const Yn = "av-footer", Fn = (e) => {
|
|
|
3611
3594
|
engine: Fe,
|
|
3612
3595
|
engines: []
|
|
3613
3596
|
}
|
|
3614
|
-
}),
|
|
3597
|
+
}), os = O.createContext({
|
|
3615
3598
|
state: { searchString: "", sortedCell: "", sortDirection: "" },
|
|
3616
3599
|
dispatch: () => {
|
|
3617
3600
|
}
|
|
3618
|
-
}),
|
|
3601
|
+
}), ss = O.createContext({
|
|
3619
3602
|
state: { tag: "" },
|
|
3620
3603
|
dispatch: () => {
|
|
3621
3604
|
}
|
|
3622
|
-
}),
|
|
3605
|
+
}), jn = ({
|
|
3623
3606
|
serverStats: e
|
|
3624
3607
|
}) => {
|
|
3625
|
-
const { state: t } =
|
|
3608
|
+
const { state: t } = Qe(zn);
|
|
3626
3609
|
return /* @__PURE__ */ l(
|
|
3627
|
-
|
|
3610
|
+
Fn,
|
|
3628
3611
|
{
|
|
3629
3612
|
mode: "light",
|
|
3630
3613
|
row1: /* @__PURE__ */ I("div", { children: [
|
|
3631
|
-
|
|
3614
|
+
sr,
|
|
3632
3615
|
" v",
|
|
3633
|
-
"5.5.
|
|
3616
|
+
"5.5.1",
|
|
3634
3617
|
" - ",
|
|
3635
|
-
|
|
3618
|
+
Vn,
|
|
3636
3619
|
t && t.engine,
|
|
3637
|
-
|
|
3620
|
+
rt && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
|
|
3638
3621
|
] }),
|
|
3639
3622
|
row2: /* @__PURE__ */ I("div", { children: [
|
|
3640
3623
|
"© ",
|
|
3641
3624
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
3642
3625
|
" ",
|
|
3643
|
-
|
|
3626
|
+
Hn
|
|
3644
3627
|
] })
|
|
3645
3628
|
}
|
|
3646
3629
|
);
|
|
3647
|
-
},
|
|
3630
|
+
}, qn = _t(
|
|
3648
3631
|
() => import(
|
|
3649
3632
|
/* webpackChunkName: "LazyHeader" */
|
|
3650
|
-
"./LazyHeader.
|
|
3633
|
+
"./LazyHeader.C3UmEKkw.js"
|
|
3651
3634
|
)
|
|
3652
|
-
),
|
|
3653
|
-
const { isAuthenticated: e } =
|
|
3635
|
+
), Xn = () => {
|
|
3636
|
+
const { isAuthenticated: e } = tt();
|
|
3654
3637
|
return /* @__PURE__ */ I(ye, { children: [
|
|
3655
|
-
e && /* @__PURE__ */ l(
|
|
3638
|
+
e && /* @__PURE__ */ l(Nt, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(qn, {}) }),
|
|
3656
3639
|
/* @__PURE__ */ I("div", { className: "flex items-center justify-center", children: [
|
|
3657
|
-
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(
|
|
3640
|
+
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(ln, {}) }),
|
|
3658
3641
|
/* @__PURE__ */ I("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3659
|
-
/* @__PURE__ */ l("h1", { children:
|
|
3660
|
-
/* @__PURE__ */ l("h2", { children:
|
|
3642
|
+
/* @__PURE__ */ l("h1", { children: sr }),
|
|
3643
|
+
/* @__PURE__ */ l("h2", { children: Kn })
|
|
3661
3644
|
] })
|
|
3662
3645
|
] })
|
|
3663
3646
|
] });
|
|
3664
|
-
},
|
|
3665
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } =
|
|
3647
|
+
}, Qn = () => {
|
|
3648
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = tt(), [a, n] = j(""), [o, s] = j(""), [i, u] = j(!0), [h, p] = j({
|
|
3666
3649
|
username: "",
|
|
3667
3650
|
password: ""
|
|
3668
3651
|
}), m = async (c) => {
|
|
@@ -3677,13 +3660,13 @@ const Yn = "av-footer", Fn = (e) => {
|
|
|
3677
3660
|
}), Q(() => {
|
|
3678
3661
|
t && s(t);
|
|
3679
3662
|
}, [t]), /* @__PURE__ */ I(ye, { children: [
|
|
3680
|
-
/* @__PURE__ */ I(
|
|
3681
|
-
/* @__PURE__ */ l("div", { className:
|
|
3663
|
+
/* @__PURE__ */ I(gn, { children: [
|
|
3664
|
+
/* @__PURE__ */ l("div", { className: Ja(), children: /* @__PURE__ */ l(Xn, {}) }),
|
|
3682
3665
|
/* @__PURE__ */ I("form", { className: "mt-5", onSubmit: m, children: [
|
|
3683
|
-
/* @__PURE__ */ l(
|
|
3666
|
+
/* @__PURE__ */ l(It, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ l(le, { span: 6, children: /* @__PURE__ */ I(sn, { mode: "dark", children: [
|
|
3684
3667
|
/* @__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 }) }),
|
|
3685
3668
|
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3686
|
-
|
|
3669
|
+
ot,
|
|
3687
3670
|
{
|
|
3688
3671
|
required: !0,
|
|
3689
3672
|
autoCapitalize: "off",
|
|
@@ -3703,7 +3686,7 @@ const Yn = "av-footer", Fn = (e) => {
|
|
|
3703
3686
|
}
|
|
3704
3687
|
) }),
|
|
3705
3688
|
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3706
|
-
|
|
3689
|
+
or,
|
|
3707
3690
|
{
|
|
3708
3691
|
required: !0,
|
|
3709
3692
|
autoCapitalize: "off",
|
|
@@ -3712,8 +3695,8 @@ const Yn = "av-footer", Fn = (e) => {
|
|
|
3712
3695
|
mode: "dark",
|
|
3713
3696
|
focusMode: "light",
|
|
3714
3697
|
name: "password",
|
|
3715
|
-
label:
|
|
3716
|
-
rightElement: /* @__PURE__ */ l(
|
|
3698
|
+
label: Gn,
|
|
3699
|
+
rightElement: /* @__PURE__ */ l(Xe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ l(mn, {}) : /* @__PURE__ */ l(dn, {}) }),
|
|
3717
3700
|
onMaskChange: u,
|
|
3718
3701
|
onChange: (c) => {
|
|
3719
3702
|
p({
|
|
@@ -3726,7 +3709,7 @@ const Yn = "av-footer", Fn = (e) => {
|
|
|
3726
3709
|
}
|
|
3727
3710
|
) }),
|
|
3728
3711
|
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3729
|
-
|
|
3712
|
+
Zt,
|
|
3730
3713
|
{
|
|
3731
3714
|
mode: "light",
|
|
3732
3715
|
focusMode: "light",
|
|
@@ -3739,8 +3722,8 @@ const Yn = "av-footer", Fn = (e) => {
|
|
|
3739
3722
|
) })
|
|
3740
3723
|
] }) }) }),
|
|
3741
3724
|
/* @__PURE__ */ l("div", { className: "text-center text-copy-light", children: "or" }),
|
|
3742
|
-
/* @__PURE__ */ l(
|
|
3743
|
-
|
|
3725
|
+
/* @__PURE__ */ l(It, { alignHorizontal: "center", children: /* @__PURE__ */ l(le, { span: 6, children: /* @__PURE__ */ l(
|
|
3726
|
+
Xe,
|
|
3744
3727
|
{
|
|
3745
3728
|
mode: "dark",
|
|
3746
3729
|
focusMode: "light",
|
|
@@ -3749,90 +3732,87 @@ const Yn = "av-footer", Fn = (e) => {
|
|
|
3749
3732
|
className: "mb-4 mt-1",
|
|
3750
3733
|
labelRight: Wn,
|
|
3751
3734
|
onClick: r,
|
|
3752
|
-
children: /* @__PURE__ */ l(
|
|
3735
|
+
children: /* @__PURE__ */ l(un, { className: "size-7" })
|
|
3753
3736
|
}
|
|
3754
3737
|
) }) })
|
|
3755
3738
|
] })
|
|
3756
3739
|
] }),
|
|
3757
|
-
/* @__PURE__ */ l(
|
|
3740
|
+
/* @__PURE__ */ l(jn, {})
|
|
3758
3741
|
] });
|
|
3759
|
-
},
|
|
3742
|
+
}, Zn = new URL(document.location.href).searchParams, eo = !!Zn.get("debug") || !1, to = _t(() => import(
|
|
3760
3743
|
/* webpackChunkName: "LazyApp" */
|
|
3761
|
-
"./App.
|
|
3762
|
-
).then((e) => e.App)),
|
|
3763
|
-
const { isAuthenticated: t } =
|
|
3764
|
-
return t ? /* @__PURE__ */ l(
|
|
3765
|
-
},
|
|
3744
|
+
"./App.CiWR0jbo.js"
|
|
3745
|
+
).then((e) => e.App)), ro = ({ isComponent: e }) => {
|
|
3746
|
+
const { isAuthenticated: t } = tt();
|
|
3747
|
+
return t ? /* @__PURE__ */ l(Nt, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(to, { isComponent: e }) }) : /* @__PURE__ */ l(Qn, {});
|
|
3748
|
+
}, ao = ({
|
|
3766
3749
|
isComponent: e = !1,
|
|
3767
|
-
domain: t =
|
|
3768
|
-
}) => /* @__PURE__ */ l(ye, { children: /* @__PURE__ */ l(
|
|
3750
|
+
domain: t = Va
|
|
3751
|
+
}) => /* @__PURE__ */ l(ye, { children: /* @__PURE__ */ l(Pa, { clientId: Da, domain: t, debug: eo, children: /* @__PURE__ */ l(ro, { isComponent: e }) }) }), is = ({ domain: e }) => /* @__PURE__ */ l(ao, { isComponent: !0, domain: e });
|
|
3769
3752
|
export {
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3753
|
+
Qo as ABOUT_TITLE,
|
|
3754
|
+
_o as ACTION_ENGINE,
|
|
3755
|
+
Io as ACTION_MESSAGE,
|
|
3773
3756
|
So as ACTION_MODEL,
|
|
3774
|
-
|
|
3775
|
-
|
|
3757
|
+
vo as ACTION_RESET,
|
|
3758
|
+
Co as ACTION_RESET_TAGS,
|
|
3776
3759
|
ko as ACTION_RESTORE,
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
ns as
|
|
3760
|
+
No as ACTION_SEARCH,
|
|
3761
|
+
Oo as ACTION_SET_TAGS,
|
|
3762
|
+
Ro as ACTION_SORT,
|
|
3763
|
+
Ao as ACTION_STREAMING,
|
|
3764
|
+
xo as ACTION_TOGGLE_TAG,
|
|
3765
|
+
zn as AppContext,
|
|
3766
|
+
jn as AppFooter,
|
|
3767
|
+
ts as CANCEL,
|
|
3768
|
+
ns as CARDS,
|
|
3769
|
+
es as CLEAR,
|
|
3786
3770
|
Fe as DEFAULT_AI_ENGINE,
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3771
|
+
sn as E,
|
|
3772
|
+
wo as ENGINE_ANTHROPIC,
|
|
3773
|
+
Eo as ENGINE_OPENAI,
|
|
3774
|
+
bo as ERROR_MESSAGE,
|
|
3791
3775
|
ue as G,
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
go as
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
vt as b,
|
|
3823
|
-
fn as d,
|
|
3824
|
-
jo as durationFormatter,
|
|
3825
|
-
Yo as extractAverage,
|
|
3776
|
+
To as GPT4_MAX_TOKENS,
|
|
3777
|
+
Xo as HISTORY_TITLE,
|
|
3778
|
+
os as HistoryContext,
|
|
3779
|
+
Do as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3780
|
+
Mo as LOCAL_STORAGE_ENGINE_TOGGLE,
|
|
3781
|
+
Po as LOCAL_STORAGE_PREFIX,
|
|
3782
|
+
$o as LOCAL_STORAGE_SEARCH,
|
|
3783
|
+
Lo as LOCAL_STORAGE_SORT,
|
|
3784
|
+
Fo as LOG_OUT,
|
|
3785
|
+
Xn as MessagesContainerHeader,
|
|
3786
|
+
rs as NA,
|
|
3787
|
+
Xe as O,
|
|
3788
|
+
jo as PROFILE_TITLE,
|
|
3789
|
+
Zt as R,
|
|
3790
|
+
po as ROLE_ASSISTANT,
|
|
3791
|
+
yo as ROLE_HIDDEN,
|
|
3792
|
+
fo as ROLE_INTERNAL,
|
|
3793
|
+
go as ROLE_SYSTEM,
|
|
3794
|
+
ho as ROLE_USER,
|
|
3795
|
+
zo as SEND,
|
|
3796
|
+
qo as STATS,
|
|
3797
|
+
Uo as STATS_SEPARATOR,
|
|
3798
|
+
is as SassySaint,
|
|
3799
|
+
as as TAGS_DESCRIPTION,
|
|
3800
|
+
Zo as TYPE_QUESTION,
|
|
3801
|
+
ss as TagsContext,
|
|
3802
|
+
It as b,
|
|
3803
|
+
gn as d,
|
|
3804
|
+
Jo as durationFormatter,
|
|
3805
|
+
Wo as extractAverage,
|
|
3826
3806
|
Ke as g,
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3807
|
+
Ho as getCurrentGeoLocation,
|
|
3808
|
+
Ja as getMessageContaintWrapperClass,
|
|
3809
|
+
Go as isLastMessageFromRole,
|
|
3830
3810
|
le as j,
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3811
|
+
ot as me,
|
|
3812
|
+
Vo as numberFormatter,
|
|
3813
|
+
Yo as pluralize,
|
|
3814
|
+
Bo as renderDataAsList,
|
|
3815
|
+
tt as rn,
|
|
3816
|
+
Ko as truncate,
|
|
3817
|
+
un as v
|
|
3838
3818
|
};
|