@versini/sassysaint 5.5.19 → 5.5.20
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.CN26Vdes.js → App.BCrssLN1.js} +294 -294
- package/dist/chunks/{HeaderToolbar.RG5VcCoN.js → HeaderToolbar.Dcsv3jhf.js} +595 -595
- package/dist/chunks/{MarkdownWithExtra.D9aZRrcd.js → MarkdownWithExtra.Dx_iSGfx.js} +2 -2
- package/dist/chunks/{MessageAssistant.DpLJVr9t.js → MessageAssistant.PRne9DXL.js} +3 -3
- package/dist/chunks/{index.DaKlCgCU.js → index.D4jSn1Cz.js} +275 -275
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l, jsxs as O, Fragment as Oe } from "react/jsx-runtime";
|
|
2
|
-
import z, { createContext as ar, useReducer as wt, useRef as
|
|
2
|
+
import z, { createContext as ar, useReducer as wt, useRef as M, useCallback as q, useEffect as Q, useContext as Tt, useSyncExternalStore as nr, useId as It, useState as j, useLayoutEffect as ot, useMemo as St, lazy as or, Suspense as sr } from "react";
|
|
3
3
|
import g from "clsx";
|
|
4
4
|
var ir = Object.defineProperty, cr = (e, t, r) => t in e ? ir(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ke = (e, t, r) => cr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
@@ -42,7 +42,7 @@ function _t(e) {
|
|
|
42
42
|
function kt(e) {
|
|
43
43
|
return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
|
|
44
44
|
}
|
|
45
|
-
let
|
|
45
|
+
let R = class extends Error {
|
|
46
46
|
constructor({ message: t, code: r, cause: a, name: n }) {
|
|
47
47
|
super(t, { cause: a }), this.name = n ?? a.name, this.code = r;
|
|
48
48
|
}
|
|
@@ -54,43 +54,43 @@ function lr({ error: e, options: t }) {
|
|
|
54
54
|
throw Error("options was missing required publicKey property");
|
|
55
55
|
if (e.name === "AbortError") {
|
|
56
56
|
if (t.signal instanceof AbortSignal)
|
|
57
|
-
return new
|
|
57
|
+
return new R({
|
|
58
58
|
message: "Registration ceremony was sent an abort signal",
|
|
59
59
|
code: "ERROR_CEREMONY_ABORTED",
|
|
60
60
|
cause: e
|
|
61
61
|
});
|
|
62
62
|
} else if (e.name === "ConstraintError") {
|
|
63
63
|
if (((a = r.authenticatorSelection) == null ? void 0 : a.requireResidentKey) === !0)
|
|
64
|
-
return new
|
|
64
|
+
return new R({
|
|
65
65
|
message: "Discoverable credentials were required but no available authenticator supported it",
|
|
66
66
|
code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
|
|
67
67
|
cause: e
|
|
68
68
|
});
|
|
69
69
|
if (((n = r.authenticatorSelection) == null ? void 0 : n.userVerification) === "required")
|
|
70
|
-
return new
|
|
70
|
+
return new R({
|
|
71
71
|
message: "User verification was required but no available authenticator supported it",
|
|
72
72
|
code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
|
|
73
73
|
cause: e
|
|
74
74
|
});
|
|
75
75
|
} else {
|
|
76
76
|
if (e.name === "InvalidStateError")
|
|
77
|
-
return new
|
|
77
|
+
return new R({
|
|
78
78
|
message: "The authenticator was previously registered",
|
|
79
79
|
code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
|
|
80
80
|
cause: e
|
|
81
81
|
});
|
|
82
82
|
if (e.name === "NotAllowedError")
|
|
83
|
-
return new
|
|
83
|
+
return new R({
|
|
84
84
|
message: e.message,
|
|
85
85
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
86
86
|
cause: e
|
|
87
87
|
});
|
|
88
88
|
if (e.name === "NotSupportedError")
|
|
89
|
-
return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new
|
|
89
|
+
return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new R({
|
|
90
90
|
message: 'No entry in pubKeyCredParams was of type "public-key"',
|
|
91
91
|
code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
|
|
92
92
|
cause: e
|
|
93
|
-
}) : new
|
|
93
|
+
}) : new R({
|
|
94
94
|
message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
|
|
95
95
|
code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
|
|
96
96
|
cause: e
|
|
@@ -99,25 +99,25 @@ function lr({ error: e, options: t }) {
|
|
|
99
99
|
const o = window.location.hostname;
|
|
100
100
|
if (kt(o)) {
|
|
101
101
|
if (r.rp.id !== o)
|
|
102
|
-
return new
|
|
102
|
+
return new R({
|
|
103
103
|
message: `The RP ID "${r.rp.id}" is invalid for this domain`,
|
|
104
104
|
code: "ERROR_INVALID_RP_ID",
|
|
105
105
|
cause: e
|
|
106
106
|
});
|
|
107
|
-
} else return new
|
|
107
|
+
} else return new R({
|
|
108
108
|
message: `${window.location.hostname} is an invalid domain`,
|
|
109
109
|
code: "ERROR_INVALID_DOMAIN",
|
|
110
110
|
cause: e
|
|
111
111
|
});
|
|
112
112
|
} else if (e.name === "TypeError") {
|
|
113
113
|
if (r.user.id.byteLength < 1 || r.user.id.byteLength > 64)
|
|
114
|
-
return new
|
|
114
|
+
return new R({
|
|
115
115
|
message: "User ID was not between 1 and 64 characters",
|
|
116
116
|
code: "ERROR_INVALID_USER_ID_LENGTH",
|
|
117
117
|
cause: e
|
|
118
118
|
});
|
|
119
119
|
} else if (e.name === "UnknownError")
|
|
120
|
-
return new
|
|
120
|
+
return new R({
|
|
121
121
|
message: "The authenticator was unable to process the specified options, or could not create a new credential",
|
|
122
122
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
123
123
|
cause: e
|
|
@@ -146,7 +146,7 @@ function vt(e) {
|
|
|
146
146
|
if (e && !(ur.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
|
-
async function
|
|
149
|
+
async function mr(e) {
|
|
150
150
|
var u;
|
|
151
151
|
if (!Ze())
|
|
152
152
|
throw new Error("WebAuthn is not supported in this browser");
|
|
@@ -178,11 +178,11 @@ async function hr(e) {
|
|
|
178
178
|
} catch (c) {
|
|
179
179
|
He("getPublicKeyAlgorithm()", c);
|
|
180
180
|
}
|
|
181
|
-
let
|
|
181
|
+
let h;
|
|
182
182
|
if (typeof o.getPublicKey == "function")
|
|
183
183
|
try {
|
|
184
184
|
const c = o.getPublicKey();
|
|
185
|
-
c !== null && (
|
|
185
|
+
c !== null && (h = J(c));
|
|
186
186
|
} catch (c) {
|
|
187
187
|
He("getPublicKey()", c);
|
|
188
188
|
}
|
|
@@ -201,7 +201,7 @@ async function hr(e) {
|
|
|
201
201
|
clientDataJSON: J(o.clientDataJSON),
|
|
202
202
|
transports: i,
|
|
203
203
|
publicKeyAlgorithm: d,
|
|
204
|
-
publicKey:
|
|
204
|
+
publicKey: h,
|
|
205
205
|
authenticatorData: p
|
|
206
206
|
},
|
|
207
207
|
type: s,
|
|
@@ -213,7 +213,7 @@ function He(e, t) {
|
|
|
213
213
|
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
214
214
|
`, t);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function hr() {
|
|
217
217
|
if (!Ze())
|
|
218
218
|
return new Promise((t) => t(!1));
|
|
219
219
|
const e = window.PublicKeyCredential;
|
|
@@ -225,14 +225,14 @@ function pr({ error: e, options: t }) {
|
|
|
225
225
|
throw Error("options was missing required publicKey property");
|
|
226
226
|
if (e.name === "AbortError") {
|
|
227
227
|
if (t.signal instanceof AbortSignal)
|
|
228
|
-
return new
|
|
228
|
+
return new R({
|
|
229
229
|
message: "Authentication ceremony was sent an abort signal",
|
|
230
230
|
code: "ERROR_CEREMONY_ABORTED",
|
|
231
231
|
cause: e
|
|
232
232
|
});
|
|
233
233
|
} else {
|
|
234
234
|
if (e.name === "NotAllowedError")
|
|
235
|
-
return new
|
|
235
|
+
return new R({
|
|
236
236
|
message: e.message,
|
|
237
237
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
238
238
|
cause: e
|
|
@@ -241,18 +241,18 @@ function pr({ error: e, options: t }) {
|
|
|
241
241
|
const a = window.location.hostname;
|
|
242
242
|
if (kt(a)) {
|
|
243
243
|
if (r.rpId !== a)
|
|
244
|
-
return new
|
|
244
|
+
return new R({
|
|
245
245
|
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
246
246
|
code: "ERROR_INVALID_RP_ID",
|
|
247
247
|
cause: e
|
|
248
248
|
});
|
|
249
|
-
} else return new
|
|
249
|
+
} else return new R({
|
|
250
250
|
message: `${window.location.hostname} is an invalid domain`,
|
|
251
251
|
code: "ERROR_INVALID_DOMAIN",
|
|
252
252
|
cause: e
|
|
253
253
|
});
|
|
254
254
|
} else if (e.name === "UnknownError")
|
|
255
|
-
return new
|
|
255
|
+
return new R({
|
|
256
256
|
message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
|
|
257
257
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
258
258
|
cause: e
|
|
@@ -272,7 +272,7 @@ async function gr(e, t = !1) {
|
|
|
272
272
|
allowCredentials: r
|
|
273
273
|
}, n = {};
|
|
274
274
|
if (t) {
|
|
275
|
-
if (!await
|
|
275
|
+
if (!await hr())
|
|
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');
|
|
@@ -282,12 +282,12 @@ async function gr(e, t = !1) {
|
|
|
282
282
|
let o;
|
|
283
283
|
try {
|
|
284
284
|
o = await navigator.credentials.get(n);
|
|
285
|
-
} catch (
|
|
286
|
-
throw pr({ error:
|
|
285
|
+
} catch (m) {
|
|
286
|
+
throw pr({ error: m, options: n });
|
|
287
287
|
}
|
|
288
288
|
if (!o)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
290
|
-
const { id: s, rawId: i, response: d, type:
|
|
290
|
+
const { id: s, rawId: i, response: d, type: h } = o;
|
|
291
291
|
let p;
|
|
292
292
|
return d.userHandle && (p = J(d.userHandle)), {
|
|
293
293
|
id: s,
|
|
@@ -298,7 +298,7 @@ async function gr(e, t = !1) {
|
|
|
298
298
|
signature: J(d.signature),
|
|
299
299
|
userHandle: p
|
|
300
300
|
},
|
|
301
|
-
type:
|
|
301
|
+
type: h,
|
|
302
302
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
303
303
|
authenticatorAttachment: vt(o.authenticatorAttachment)
|
|
304
304
|
};
|
|
@@ -323,7 +323,7 @@ const ue = {
|
|
|
323
323
|
CODE: "code",
|
|
324
324
|
REFRESH_TOKEN: "refresh_token",
|
|
325
325
|
PASSKEY: "passkey"
|
|
326
|
-
},
|
|
326
|
+
}, Rt = {
|
|
327
327
|
CLIENT_ID: "X-Auth-ClientId"
|
|
328
328
|
}, A = {
|
|
329
329
|
ALG: "RS256",
|
|
@@ -351,7 +351,7 @@ awIDAQAB
|
|
|
351
351
|
LOGOUT: "logout",
|
|
352
352
|
LOGIN: "login",
|
|
353
353
|
REFRESH: "refresh"
|
|
354
|
-
}, De = crypto,
|
|
354
|
+
}, De = crypto, Nt = (e) => e instanceof CryptoKey, Ee = new TextEncoder(), fe = new TextDecoder();
|
|
355
355
|
function fr(...e) {
|
|
356
356
|
const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
|
|
357
357
|
let a = 0;
|
|
@@ -422,12 +422,12 @@ let S = class extends C {
|
|
|
422
422
|
}
|
|
423
423
|
};
|
|
424
424
|
S.code = "ERR_JWS_INVALID";
|
|
425
|
-
let
|
|
425
|
+
let G = class extends C {
|
|
426
426
|
constructor() {
|
|
427
427
|
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
-
|
|
430
|
+
G.code = "ERR_JWT_INVALID";
|
|
431
431
|
class Tr extends C {
|
|
432
432
|
constructor() {
|
|
433
433
|
super(...arguments), this.code = "ERR_JWK_INVALID";
|
|
@@ -495,7 +495,7 @@ function vr(e, t) {
|
|
|
495
495
|
throw new TypeError(r);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Rr(e, t, ...r) {
|
|
499
499
|
switch (t) {
|
|
500
500
|
case "HS256":
|
|
501
501
|
case "HS384":
|
|
@@ -559,7 +559,7 @@ const st = (e, ...t) => Ot("Key must be ", e, ...t);
|
|
|
559
559
|
function Pt(e, t, ...r) {
|
|
560
560
|
return Ot(`Key for the ${e} algorithm must be `, t, ...r);
|
|
561
561
|
}
|
|
562
|
-
const Dt = (e) =>
|
|
562
|
+
const Dt = (e) => Nt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Re = ["CryptoKey"], Nr = (...e) => {
|
|
563
563
|
const t = e.filter(Boolean);
|
|
564
564
|
if (t.length === 0 || t.length === 1)
|
|
565
565
|
return !0;
|
|
@@ -581,7 +581,7 @@ const Dt = (e) => Rt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
581
581
|
function xr(e) {
|
|
582
582
|
return typeof e == "object" && e !== null;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function me(e) {
|
|
585
585
|
if (!xr(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
586
586
|
return !1;
|
|
587
587
|
if (Object.getPrototypeOf(e) === null)
|
|
@@ -598,8 +598,8 @@ const Cr = (e, t) => {
|
|
|
598
598
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
599
599
|
}
|
|
600
600
|
};
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function he(e) {
|
|
602
|
+
return me(e) && typeof e.kty == "string";
|
|
603
603
|
}
|
|
604
604
|
function Or(e) {
|
|
605
605
|
return e.kty !== "oct" && typeof e.d == "string";
|
|
@@ -608,7 +608,7 @@ function Pr(e) {
|
|
|
608
608
|
return e.kty !== "oct" && typeof e.d > "u";
|
|
609
609
|
}
|
|
610
610
|
function Dr(e) {
|
|
611
|
-
return
|
|
611
|
+
return he(e) && e.kty === "oct" && typeof e.k == "string";
|
|
612
612
|
}
|
|
613
613
|
function Lr(e) {
|
|
614
614
|
let t, r;
|
|
@@ -691,27 +691,27 @@ const Lt = async (e) => {
|
|
|
691
691
|
e.key_ops ?? r
|
|
692
692
|
], n = { ...e };
|
|
693
693
|
return delete n.alg, delete n.use, De.subtle.importKey("jwk", n, ...a);
|
|
694
|
-
},
|
|
694
|
+
}, Mt = (e) => X(e);
|
|
695
695
|
let ne, oe;
|
|
696
|
-
const
|
|
696
|
+
const $t = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ne = async (e, t, r, a, n = !1) => {
|
|
697
697
|
let o = e.get(t);
|
|
698
698
|
if (o != null && o[a])
|
|
699
699
|
return o[a];
|
|
700
700
|
const s = await Lt({ ...r, alg: a });
|
|
701
701
|
return n && Object.freeze(t), o ? o[a] = s : e.set(t, { [a]: s }), s;
|
|
702
|
-
},
|
|
703
|
-
if (
|
|
702
|
+
}, Mr = (e, t) => {
|
|
703
|
+
if ($t(e)) {
|
|
704
704
|
let r = e.export({ format: "jwk" });
|
|
705
|
-
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ?
|
|
705
|
+
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Mt(r.k) : (oe || (oe = /* @__PURE__ */ new WeakMap()), Ne(oe, e, r, t));
|
|
706
706
|
}
|
|
707
|
-
return
|
|
708
|
-
},
|
|
709
|
-
if (
|
|
707
|
+
return he(e) ? e.k ? X(e.k) : (oe || (oe = /* @__PURE__ */ new WeakMap()), Ne(oe, e, e, t, !0)) : e;
|
|
708
|
+
}, $r = (e, t) => {
|
|
709
|
+
if ($t(e)) {
|
|
710
710
|
let r = e.export({ format: "jwk" });
|
|
711
|
-
return r.k ?
|
|
711
|
+
return r.k ? Mt(r.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), Ne(ne, e, r, t));
|
|
712
712
|
}
|
|
713
|
-
return
|
|
714
|
-
}, Ur = { normalizePublicKey:
|
|
713
|
+
return he(e) ? e.k ? X(e.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), Ne(ne, e, e, t, !0)) : e;
|
|
714
|
+
}, Ur = { normalizePublicKey: Mr, normalizePrivateKey: $r }, F = (e, t, r = 0) => {
|
|
715
715
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
716
716
|
const a = e.indexOf(t[0], r);
|
|
717
717
|
if (a === -1)
|
|
@@ -790,8 +790,8 @@ async function Wr(e, t, r) {
|
|
|
790
790
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
791
791
|
return Hr(e, t);
|
|
792
792
|
}
|
|
793
|
-
async function
|
|
794
|
-
if (!
|
|
793
|
+
async function Br(e, t) {
|
|
794
|
+
if (!me(e))
|
|
795
795
|
throw new TypeError("JWK must be an object");
|
|
796
796
|
switch (t || (t = e.alg), e.kty) {
|
|
797
797
|
case "oct":
|
|
@@ -817,20 +817,20 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], je = (e, t, r) =>
|
|
|
817
817
|
if (t.alg !== void 0 && t.alg !== e)
|
|
818
818
|
throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);
|
|
819
819
|
return !0;
|
|
820
|
-
},
|
|
820
|
+
}, Gr = (e, t, r, a) => {
|
|
821
821
|
if (!(t instanceof Uint8Array)) {
|
|
822
|
-
if (a &&
|
|
822
|
+
if (a && he(t)) {
|
|
823
823
|
if (Dr(t) && je(e, t, r))
|
|
824
824
|
return;
|
|
825
825
|
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
826
826
|
}
|
|
827
827
|
if (!Dt(t))
|
|
828
|
-
throw new TypeError(Pt(e, t, ...
|
|
828
|
+
throw new TypeError(Pt(e, t, ...Re, "Uint8Array", a ? "JSON Web Key" : null));
|
|
829
829
|
if (t.type !== "secret")
|
|
830
830
|
throw new TypeError(`${de(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
831
831
|
}
|
|
832
832
|
}, Jr = (e, t, r, a) => {
|
|
833
|
-
if (a &&
|
|
833
|
+
if (a && he(t))
|
|
834
834
|
switch (r) {
|
|
835
835
|
case "sign":
|
|
836
836
|
if (Or(t) && je(e, t, r))
|
|
@@ -842,7 +842,7 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], je = (e, t, r) =>
|
|
|
842
842
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
843
843
|
}
|
|
844
844
|
if (!Dt(t))
|
|
845
|
-
throw new TypeError(Pt(e, t, ...
|
|
845
|
+
throw new TypeError(Pt(e, t, ...Re, a ? "JSON Web Key" : null));
|
|
846
846
|
if (t.type === "secret")
|
|
847
847
|
throw new TypeError(`${de(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
848
848
|
if (r === "sign" && t.type === "public")
|
|
@@ -855,7 +855,7 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], je = (e, t, r) =>
|
|
|
855
855
|
throw new TypeError(`${de(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
856
856
|
};
|
|
857
857
|
function Ut(e, t, r, a) {
|
|
858
|
-
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ?
|
|
858
|
+
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Gr(t, r, a, e) : Jr(t, r, a, e);
|
|
859
859
|
}
|
|
860
860
|
Ut.bind(void 0, !1);
|
|
861
861
|
const ct = Ut.bind(void 0, !0);
|
|
@@ -910,14 +910,14 @@ function zr(e, t) {
|
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
912
|
async function Fr(e, t, r) {
|
|
913
|
-
if (t = await Ur.normalizePublicKey(t, e),
|
|
914
|
-
return
|
|
913
|
+
if (t = await Ur.normalizePublicKey(t, e), Nt(t))
|
|
914
|
+
return Rr(t, e, r), t;
|
|
915
915
|
if (t instanceof Uint8Array) {
|
|
916
916
|
if (!e.startsWith("HS"))
|
|
917
|
-
throw new TypeError(st(t, ...
|
|
917
|
+
throw new TypeError(st(t, ...Re));
|
|
918
918
|
return De.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
919
919
|
}
|
|
920
|
-
throw new TypeError(st(t, ...
|
|
920
|
+
throw new TypeError(st(t, ...Re, "Uint8Array", "JSON Web Key"));
|
|
921
921
|
}
|
|
922
922
|
const jr = async (e, t, r, a) => {
|
|
923
923
|
const n = await Fr(e, t, "verify");
|
|
@@ -930,7 +930,7 @@ const jr = async (e, t, r, a) => {
|
|
|
930
930
|
}
|
|
931
931
|
};
|
|
932
932
|
async function qr(e, t, r) {
|
|
933
|
-
if (!
|
|
933
|
+
if (!me(e))
|
|
934
934
|
throw new S("Flattened JWS must be an object");
|
|
935
935
|
if (e.protected === void 0 && e.header === void 0)
|
|
936
936
|
throw new S('Flattened JWS must have either of the "protected" or "header" members');
|
|
@@ -940,7 +940,7 @@ async function qr(e, t, r) {
|
|
|
940
940
|
throw new S("JWS Payload missing");
|
|
941
941
|
if (typeof e.signature != "string")
|
|
942
942
|
throw new S("JWS Signature missing or incorrect type");
|
|
943
|
-
if (e.header !== void 0 && !
|
|
943
|
+
if (e.header !== void 0 && !me(e.header))
|
|
944
944
|
throw new S("JWS Unprotected Header incorrect type");
|
|
945
945
|
let a = {};
|
|
946
946
|
if (e.protected)
|
|
@@ -950,7 +950,7 @@ async function qr(e, t, r) {
|
|
|
950
950
|
} catch {
|
|
951
951
|
throw new S("JWS Protected Header is invalid");
|
|
952
952
|
}
|
|
953
|
-
if (!
|
|
953
|
+
if (!Nr(a, e.header))
|
|
954
954
|
throw new S("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
955
955
|
const n = {
|
|
956
956
|
...a,
|
|
@@ -970,8 +970,8 @@ async function qr(e, t, r) {
|
|
|
970
970
|
throw new S("JWS Payload must be a string");
|
|
971
971
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
972
972
|
throw new S("JWS Payload must be a string or an Uint8Array instance");
|
|
973
|
-
let
|
|
974
|
-
typeof t == "function" ? (t = await t(a, e),
|
|
973
|
+
let h = !1;
|
|
974
|
+
typeof t == "function" ? (t = await t(a, e), h = !0, ct(i, t, "verify"), he(t) && (t = await Br(t, i))) : ct(i, t, "verify");
|
|
975
975
|
const p = fr(Ee.encode(e.protected ?? ""), Ee.encode("."), typeof e.payload == "string" ? Ee.encode(e.payload) : e.payload);
|
|
976
976
|
let u;
|
|
977
977
|
try {
|
|
@@ -989,8 +989,8 @@ async function qr(e, t, r) {
|
|
|
989
989
|
throw new S("Failed to base64url decode the payload");
|
|
990
990
|
}
|
|
991
991
|
else typeof e.payload == "string" ? c = Ee.encode(e.payload) : c = e.payload;
|
|
992
|
-
const
|
|
993
|
-
return e.protected !== void 0 && (
|
|
992
|
+
const m = { payload: c };
|
|
993
|
+
return e.protected !== void 0 && (m.protectedHeader = a), e.header !== void 0 && (m.unprotectedHeader = e.header), h ? { ...m, key: t } : m;
|
|
994
994
|
}
|
|
995
995
|
async function Xr(e, t, r) {
|
|
996
996
|
if (e instanceof Uint8Array && (e = fe.decode(e)), typeof e != "string")
|
|
@@ -1050,13 +1050,13 @@ const Qr = (e) => Math.floor(e.getTime() / 1e3), Kt = 60, Ht = Kt * 60, et = Ht
|
|
|
1050
1050
|
a = JSON.parse(fe.decode(t));
|
|
1051
1051
|
} catch {
|
|
1052
1052
|
}
|
|
1053
|
-
if (!
|
|
1054
|
-
throw new
|
|
1053
|
+
if (!me(a))
|
|
1054
|
+
throw new G("JWT Claims Set must be a top-level JSON object");
|
|
1055
1055
|
const { typ: n } = r;
|
|
1056
1056
|
if (n && (typeof e.typ != "string" || dt(e.typ) !== dt(n)))
|
|
1057
1057
|
throw new D('unexpected "typ" JWT header value', a, "typ", "check_failed");
|
|
1058
|
-
const { requiredClaims: o = [], issuer: s, subject: i, audience: d, maxTokenAge:
|
|
1059
|
-
|
|
1058
|
+
const { requiredClaims: o = [], issuer: s, subject: i, audience: d, maxTokenAge: h } = r, p = [...o];
|
|
1059
|
+
h !== void 0 && p.push("iat"), d !== void 0 && p.push("aud"), i !== void 0 && p.push("sub"), s !== void 0 && p.push("iss");
|
|
1060
1060
|
for (const f of new Set(p.reverse()))
|
|
1061
1061
|
if (!(f in a))
|
|
1062
1062
|
throw new D(`missing required "${f}" claim`, a, f, "missing");
|
|
@@ -1080,23 +1080,23 @@ const Qr = (e) => Math.floor(e.getTime() / 1e3), Kt = 60, Ht = Kt * 60, et = Ht
|
|
|
1080
1080
|
default:
|
|
1081
1081
|
throw new TypeError("Invalid clockTolerance option type");
|
|
1082
1082
|
}
|
|
1083
|
-
const { currentDate: c } = r,
|
|
1084
|
-
if ((a.iat !== void 0 ||
|
|
1083
|
+
const { currentDate: c } = r, m = Qr(c || /* @__PURE__ */ new Date());
|
|
1084
|
+
if ((a.iat !== void 0 || h) && typeof a.iat != "number")
|
|
1085
1085
|
throw new D('"iat" claim must be a number', a, "iat", "invalid");
|
|
1086
1086
|
if (a.nbf !== void 0) {
|
|
1087
1087
|
if (typeof a.nbf != "number")
|
|
1088
1088
|
throw new D('"nbf" claim must be a number', a, "nbf", "invalid");
|
|
1089
|
-
if (a.nbf >
|
|
1089
|
+
if (a.nbf > m + u)
|
|
1090
1090
|
throw new D('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
|
|
1091
1091
|
}
|
|
1092
1092
|
if (a.exp !== void 0) {
|
|
1093
1093
|
if (typeof a.exp != "number")
|
|
1094
1094
|
throw new D('"exp" claim must be a number', a, "exp", "invalid");
|
|
1095
|
-
if (a.exp <=
|
|
1095
|
+
if (a.exp <= m - u)
|
|
1096
1096
|
throw new Fe('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
|
1097
1097
|
}
|
|
1098
|
-
if (
|
|
1099
|
-
const f =
|
|
1098
|
+
if (h) {
|
|
1099
|
+
const f = m - a.iat, E = typeof h == "number" ? h : lt(h);
|
|
1100
1100
|
if (f - u > E)
|
|
1101
1101
|
throw new Fe('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
|
1102
1102
|
if (f < 0 - u)
|
|
@@ -1108,35 +1108,35 @@ async function na(e, t, r) {
|
|
|
1108
1108
|
var a;
|
|
1109
1109
|
const n = await Xr(e, t, r);
|
|
1110
1110
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
1111
|
-
throw new
|
|
1111
|
+
throw new G("JWTs MUST NOT use unencoded payload");
|
|
1112
1112
|
const o = { payload: aa(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
|
|
1113
1113
|
return typeof t == "function" ? { ...o, key: n.key } : o;
|
|
1114
1114
|
}
|
|
1115
1115
|
const oa = X;
|
|
1116
1116
|
function sa(e) {
|
|
1117
1117
|
if (typeof e != "string")
|
|
1118
|
-
throw new
|
|
1118
|
+
throw new G("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1119
1119
|
const { 1: t, length: r } = e.split(".");
|
|
1120
1120
|
if (r === 5)
|
|
1121
|
-
throw new
|
|
1121
|
+
throw new G("Only JWTs using Compact JWS serialization can be decoded");
|
|
1122
1122
|
if (r !== 3)
|
|
1123
|
-
throw new
|
|
1123
|
+
throw new G("Invalid JWT");
|
|
1124
1124
|
if (!t)
|
|
1125
|
-
throw new
|
|
1125
|
+
throw new G("JWTs must contain a payload");
|
|
1126
1126
|
let a;
|
|
1127
1127
|
try {
|
|
1128
1128
|
a = oa(t);
|
|
1129
1129
|
} catch {
|
|
1130
|
-
throw new
|
|
1130
|
+
throw new G("Failed to base64url decode the payload");
|
|
1131
1131
|
}
|
|
1132
1132
|
let n;
|
|
1133
1133
|
try {
|
|
1134
1134
|
n = JSON.parse(fe.decode(a));
|
|
1135
1135
|
} catch {
|
|
1136
|
-
throw new
|
|
1136
|
+
throw new G("Failed to parse the decoded payload as JSON");
|
|
1137
1137
|
}
|
|
1138
|
-
if (!
|
|
1139
|
-
throw new
|
|
1138
|
+
if (!me(n))
|
|
1139
|
+
throw new G("Invalid JWT Claims Set");
|
|
1140
1140
|
return n;
|
|
1141
1141
|
}
|
|
1142
1142
|
const ye = async (e) => {
|
|
@@ -1160,37 +1160,37 @@ for (let e = 0; e < 256; ++e)
|
|
|
1160
1160
|
function ca(e, t = 0) {
|
|
1161
1161
|
return (_[e[t + 0]] + _[e[t + 1]] + _[e[t + 2]] + _[e[t + 3]] + "-" + _[e[t + 4]] + _[e[t + 5]] + "-" + _[e[t + 6]] + _[e[t + 7]] + "-" + _[e[t + 8]] + _[e[t + 9]] + "-" + _[e[t + 10]] + _[e[t + 11]] + _[e[t + 12]] + _[e[t + 13]] + _[e[t + 14]] + _[e[t + 15]]).toLowerCase();
|
|
1162
1162
|
}
|
|
1163
|
-
let
|
|
1163
|
+
let Be;
|
|
1164
1164
|
const la = new Uint8Array(16);
|
|
1165
1165
|
function da() {
|
|
1166
|
-
if (!
|
|
1166
|
+
if (!Be) {
|
|
1167
1167
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1168
1168
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1169
|
-
|
|
1169
|
+
Be = crypto.getRandomValues.bind(crypto);
|
|
1170
1170
|
}
|
|
1171
|
-
return
|
|
1171
|
+
return Be(la);
|
|
1172
1172
|
}
|
|
1173
1173
|
const ua = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ut = { randomUUID: ua };
|
|
1174
|
-
function
|
|
1174
|
+
function mt(e, t, r) {
|
|
1175
1175
|
if (ut.randomUUID && !t && !e)
|
|
1176
1176
|
return ut.randomUUID();
|
|
1177
1177
|
e = e || {};
|
|
1178
1178
|
const a = e.random || (e.rng || da)();
|
|
1179
1179
|
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, ca(a);
|
|
1180
1180
|
}
|
|
1181
|
-
const
|
|
1181
|
+
const ht = globalThis.crypto, ma = (e) => `${mt()}${mt()}`.slice(0, e), ha = (e) => btoa(
|
|
1182
1182
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1183
1183
|
);
|
|
1184
1184
|
async function pa(e) {
|
|
1185
|
-
if (!
|
|
1185
|
+
if (!ht.subtle)
|
|
1186
1186
|
throw new Error(
|
|
1187
1187
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1188
1188
|
);
|
|
1189
|
-
const t = new TextEncoder().encode(e), r = await
|
|
1190
|
-
return
|
|
1189
|
+
const t = new TextEncoder().encode(e), r = await ht.subtle.digest("SHA-256", t);
|
|
1190
|
+
return ha(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1191
1191
|
}
|
|
1192
1192
|
async function ga(e) {
|
|
1193
|
-
const t =
|
|
1193
|
+
const t = ma(43), r = await pa(t);
|
|
1194
1194
|
return {
|
|
1195
1195
|
code_verifier: t,
|
|
1196
1196
|
code_challenge: r
|
|
@@ -1240,15 +1240,15 @@ for (let e = 0; e < 256; ++e)
|
|
|
1240
1240
|
function ba(e, t = 0) {
|
|
1241
1241
|
return (k[e[t + 0]] + k[e[t + 1]] + k[e[t + 2]] + k[e[t + 3]] + "-" + k[e[t + 4]] + k[e[t + 5]] + "-" + k[e[t + 6]] + k[e[t + 7]] + "-" + k[e[t + 8]] + k[e[t + 9]] + "-" + k[e[t + 10]] + k[e[t + 11]] + k[e[t + 12]] + k[e[t + 13]] + k[e[t + 14]] + k[e[t + 15]]).toLowerCase();
|
|
1242
1242
|
}
|
|
1243
|
-
let
|
|
1243
|
+
let Ge;
|
|
1244
1244
|
const Ea = new Uint8Array(16);
|
|
1245
1245
|
function wa() {
|
|
1246
|
-
if (!
|
|
1246
|
+
if (!Ge) {
|
|
1247
1247
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1248
1248
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1249
|
-
|
|
1249
|
+
Ge = crypto.getRandomValues.bind(crypto);
|
|
1250
1250
|
}
|
|
1251
|
-
return
|
|
1251
|
+
return Ge(Ea);
|
|
1252
1252
|
}
|
|
1253
1253
|
const Ta = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), yt = { randomUUID: Ta };
|
|
1254
1254
|
function Je(e, t, r) {
|
|
@@ -1261,7 +1261,7 @@ function Je(e, t, r) {
|
|
|
1261
1261
|
const se = "Your session has expired. For your security, please log in again to continue.", Ia = "Your session has been successfully terminated.", Ve = "Login failed. Please try again.", Sa = "Error getting access token, please re-authenticate.", _a = "You forgot to wrap your component in <AuthProvider>.", xe = {
|
|
1262
1262
|
dev: "https://auth.gizmette.local.com:3003",
|
|
1263
1263
|
prod: "https://mylogin.gizmette.com/auth"
|
|
1264
|
-
}, Ie = "@@auth@@", ge = "LOADING", ke = "LOGIN",
|
|
1264
|
+
}, Ie = "@@auth@@", ge = "LOADING", ke = "LOGIN", Bt = "LOGOUT", be = "success", V = "failure", Gt = "include", Jt = "POST", Vt = "application/json", Se = {
|
|
1265
1265
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1266
1266
|
$clientId: String!,
|
|
1267
1267
|
$username: String!,
|
|
@@ -1369,12 +1369,12 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1369
1369
|
const n = `Bearer ${e}`, o = await fetch(
|
|
1370
1370
|
Yt ? `${xe.dev}/graphql` : `${xe.prod}/graphql`,
|
|
1371
1371
|
{
|
|
1372
|
-
credentials:
|
|
1372
|
+
credentials: Gt,
|
|
1373
1373
|
method: Jt,
|
|
1374
1374
|
headers: {
|
|
1375
1375
|
authorization: n,
|
|
1376
1376
|
"Content-Type": Vt,
|
|
1377
|
-
[
|
|
1377
|
+
[Rt.CLIENT_ID]: `${r}`
|
|
1378
1378
|
},
|
|
1379
1379
|
body: JSON.stringify({
|
|
1380
1380
|
query: t.schema,
|
|
@@ -1401,11 +1401,11 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1401
1401
|
const a = await fetch(
|
|
1402
1402
|
Yt ? `${xe.dev}/${e}` : `${xe.prod}/${e}`,
|
|
1403
1403
|
{
|
|
1404
|
-
credentials:
|
|
1404
|
+
credentials: Gt,
|
|
1405
1405
|
method: Jt,
|
|
1406
1406
|
headers: {
|
|
1407
1407
|
"Content-Type": Vt,
|
|
1408
|
-
[
|
|
1408
|
+
[Rt.CLIENT_ID]: `${t}`
|
|
1409
1409
|
},
|
|
1410
1410
|
body: JSON.stringify(r)
|
|
1411
1411
|
}
|
|
@@ -1458,7 +1458,7 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1458
1458
|
status: V
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
-
},
|
|
1461
|
+
}, Ra = async ({
|
|
1462
1462
|
username: e,
|
|
1463
1463
|
password: t,
|
|
1464
1464
|
clientId: r,
|
|
@@ -1468,7 +1468,7 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1468
1468
|
code: s,
|
|
1469
1469
|
code_verifier: i,
|
|
1470
1470
|
domain: d,
|
|
1471
|
-
ua:
|
|
1471
|
+
ua: h
|
|
1472
1472
|
}) => {
|
|
1473
1473
|
var p;
|
|
1474
1474
|
try {
|
|
@@ -1484,7 +1484,7 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1484
1484
|
code: s,
|
|
1485
1485
|
code_verifier: i,
|
|
1486
1486
|
domain: d,
|
|
1487
|
-
ua:
|
|
1487
|
+
ua: h
|
|
1488
1488
|
}
|
|
1489
1489
|
}), c = await ye((p = u == null ? void 0 : u.data) == null ? void 0 : p.idToken);
|
|
1490
1490
|
return c && c.payload[A.USER_ID_KEY] !== "" && c.payload[A.NONCE_KEY] === a ? {
|
|
@@ -1502,7 +1502,7 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1502
1502
|
status: !1
|
|
1503
1503
|
};
|
|
1504
1504
|
}
|
|
1505
|
-
},
|
|
1505
|
+
}, Na = async ({
|
|
1506
1506
|
nonce: e,
|
|
1507
1507
|
clientId: t,
|
|
1508
1508
|
code_challenge: r
|
|
@@ -1650,7 +1650,7 @@ const Oa = (e) => q(
|
|
|
1650
1650
|
user: t.payload.user,
|
|
1651
1651
|
authenticationType: t.payload.authenticationType,
|
|
1652
1652
|
logoutReason: ""
|
|
1653
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1653
|
+
} : (t == null ? void 0 : t.type) === Bt ? {
|
|
1654
1654
|
...e,
|
|
1655
1655
|
isLoading: !1,
|
|
1656
1656
|
isAuthenticated: !1,
|
|
@@ -1667,17 +1667,17 @@ const Oa = (e) => q(
|
|
|
1667
1667
|
const [o, s] = wt(Da, {
|
|
1668
1668
|
...zt,
|
|
1669
1669
|
debug: n
|
|
1670
|
-
}), i = Oa(n), d =
|
|
1670
|
+
}), i = Oa(n), d = M(!1), [h, p, , u] = Te({
|
|
1671
1671
|
key: `${Ie}::${r}::@@user@@`
|
|
1672
|
-
}), [c,
|
|
1672
|
+
}), [c, m, , f] = Te({
|
|
1673
1673
|
key: `${Ie}::${r}::@@access@@`
|
|
1674
1674
|
}), [E, w, , I] = Te(
|
|
1675
1675
|
{
|
|
1676
1676
|
key: `${Ie}::${r}::@@refresh@@`
|
|
1677
1677
|
}
|
|
1678
|
-
), [
|
|
1678
|
+
), [$, U, , K] = Te({
|
|
1679
1679
|
key: `${Ie}::${r}::@@nonce@@`
|
|
1680
|
-
}),
|
|
1680
|
+
}), N = new Ca(c, E), H = q(() => {
|
|
1681
1681
|
i("removeLocalStorage: removing local storage"), u(), f(), I(), K();
|
|
1682
1682
|
}, [
|
|
1683
1683
|
f,
|
|
@@ -1691,7 +1691,7 @@ const Oa = (e) => q(
|
|
|
1691
1691
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1692
1692
|
y
|
|
1693
1693
|
), s({
|
|
1694
|
-
type:
|
|
1694
|
+
type: Bt,
|
|
1695
1695
|
payload: {
|
|
1696
1696
|
logoutReason: y || se
|
|
1697
1697
|
}
|
|
@@ -1701,23 +1701,23 @@ const Oa = (e) => q(
|
|
|
1701
1701
|
), x = q(
|
|
1702
1702
|
async (y) => {
|
|
1703
1703
|
i("invalidateAndLogout: invalidating and logging out");
|
|
1704
|
-
const { user: T } = o, b = (T == null ? void 0 : T.userId) || Aa(
|
|
1704
|
+
const { user: T } = o, b = (T == null ? void 0 : T.userId) || Aa(h);
|
|
1705
1705
|
b || i(
|
|
1706
1706
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1707
1707
|
), await va({
|
|
1708
1708
|
userId: b,
|
|
1709
1709
|
clientId: r,
|
|
1710
1710
|
domain: a,
|
|
1711
|
-
idToken:
|
|
1711
|
+
idToken: h
|
|
1712
1712
|
}), W(y || se);
|
|
1713
1713
|
},
|
|
1714
|
-
[
|
|
1714
|
+
[h, o, r, a, W, i]
|
|
1715
1715
|
);
|
|
1716
1716
|
Q(() => {
|
|
1717
1717
|
if (!d.current)
|
|
1718
|
-
return o.isLoading &&
|
|
1718
|
+
return o.isLoading && h !== null ? (async () => {
|
|
1719
1719
|
try {
|
|
1720
|
-
const y = await ye(
|
|
1720
|
+
const y = await ye(h);
|
|
1721
1721
|
y && y.payload[A.USER_ID_KEY] !== "" ? (i("useEffect: setting the authentication state"), s({
|
|
1722
1722
|
type: ke,
|
|
1723
1723
|
payload: {
|
|
@@ -1737,18 +1737,18 @@ const Oa = (e) => q(
|
|
|
1737
1737
|
})() : (i("useEffect: setting the loading state to false"), s({ type: ge, payload: { isLoading: !1 } })), () => {
|
|
1738
1738
|
d.current = !0;
|
|
1739
1739
|
};
|
|
1740
|
-
}, [o.isLoading,
|
|
1740
|
+
}, [o.isLoading, h, x, i]);
|
|
1741
1741
|
const pe = async (y, T) => {
|
|
1742
1742
|
s({ type: ge, payload: { isLoading: !0 } }), H();
|
|
1743
1743
|
const b = Je();
|
|
1744
1744
|
U(b), i("login: Logging in with password");
|
|
1745
|
-
const { code_verifier: re, code_challenge: rr } = await ga(), nt = await
|
|
1745
|
+
const { code_verifier: re, code_challenge: rr } = await ga(), nt = await Na({
|
|
1746
1746
|
nonce: b,
|
|
1747
1747
|
clientId: r,
|
|
1748
1748
|
code_challenge: rr
|
|
1749
1749
|
});
|
|
1750
1750
|
if (nt.status) {
|
|
1751
|
-
const ae = await
|
|
1751
|
+
const ae = await Ra({
|
|
1752
1752
|
username: y,
|
|
1753
1753
|
password: T,
|
|
1754
1754
|
clientId: r,
|
|
@@ -1760,7 +1760,7 @@ const Oa = (e) => q(
|
|
|
1760
1760
|
domain: a,
|
|
1761
1761
|
ua: navigator.userAgent
|
|
1762
1762
|
});
|
|
1763
|
-
return ae.status ? (p(ae.idToken),
|
|
1763
|
+
return ae.status ? (p(ae.idToken), m(ae.accessToken), w(ae.refreshToken), s({
|
|
1764
1764
|
type: ke,
|
|
1765
1765
|
payload: {
|
|
1766
1766
|
authenticationType: ue.CODE,
|
|
@@ -1786,13 +1786,13 @@ const Oa = (e) => q(
|
|
|
1786
1786
|
return c;
|
|
1787
1787
|
}
|
|
1788
1788
|
i("getAccessToken: invalid access token, trying to refresh it");
|
|
1789
|
-
const b = await
|
|
1789
|
+
const b = await N.refreshtoken({
|
|
1790
1790
|
clientId: r,
|
|
1791
1791
|
userId: T.userId,
|
|
1792
|
-
nonce:
|
|
1792
|
+
nonce: $,
|
|
1793
1793
|
domain: a
|
|
1794
1794
|
});
|
|
1795
|
-
return b.status && b.status === "success" && b.newAccessToken ? (
|
|
1795
|
+
return b.status && b.status === "success" && b.newAccessToken ? (m(b.newAccessToken), w(b.newRefreshToken), b.newAccessToken) : (i(
|
|
1796
1796
|
"getAccessToken: invalid refresh token, need to re-authenticate"
|
|
1797
1797
|
), await x(se), "");
|
|
1798
1798
|
}
|
|
@@ -1804,7 +1804,7 @@ const Oa = (e) => q(
|
|
|
1804
1804
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1805
1805
|
), await x(Sa), "";
|
|
1806
1806
|
}
|
|
1807
|
-
}, P = () => o.isAuthenticated &&
|
|
1807
|
+
}, P = () => o.isAuthenticated && h ? h : "", B = async () => {
|
|
1808
1808
|
const { user: y } = o;
|
|
1809
1809
|
let T = await ce({
|
|
1810
1810
|
accessToken: c,
|
|
@@ -1818,7 +1818,7 @@ const Oa = (e) => q(
|
|
|
1818
1818
|
});
|
|
1819
1819
|
if (T.status)
|
|
1820
1820
|
try {
|
|
1821
|
-
const b = await
|
|
1821
|
+
const b = await mr(T.data);
|
|
1822
1822
|
return T = await ce({
|
|
1823
1823
|
accessToken: c,
|
|
1824
1824
|
clientId: r,
|
|
@@ -1874,7 +1874,7 @@ const Oa = (e) => q(
|
|
|
1874
1874
|
sessionExpiration: t,
|
|
1875
1875
|
ua: navigator.userAgent
|
|
1876
1876
|
}
|
|
1877
|
-
}), b.data.status === be ? (p(b.data.idToken),
|
|
1877
|
+
}), b.data.status === be ? (p(b.data.idToken), m(b.data.accessToken), w(b.data.refreshToken), s({
|
|
1878
1878
|
type: ke,
|
|
1879
1879
|
payload: {
|
|
1880
1880
|
authenticationType: ue.PASSKEY,
|
|
@@ -1911,14 +1911,14 @@ const Oa = (e) => q(
|
|
|
1911
1911
|
logout: Z,
|
|
1912
1912
|
getAccessToken: v,
|
|
1913
1913
|
getIdToken: P,
|
|
1914
|
-
registeringForPasskey:
|
|
1914
|
+
registeringForPasskey: B,
|
|
1915
1915
|
loginWithPasskey: ee
|
|
1916
1916
|
},
|
|
1917
1917
|
children: e
|
|
1918
1918
|
}
|
|
1919
1919
|
) });
|
|
1920
|
-
}, jt = (e = Ft) => Tt(e), io = "user", co = "assistant", lo = "system", uo = "internal",
|
|
1921
|
-
function
|
|
1920
|
+
}, jt = (e = Ft) => Tt(e), io = "user", co = "assistant", lo = "system", uo = "internal", mo = "hidden", ho = "I'm having trouble right now. Please try again later.", po = "OpenAI", go = "OpenAI", yo = "Anthropic", fo = "action-message", bo = "action-reset", Eo = "action-model", wo = "action-restore", To = "action-streaming", Io = "action-engine", So = "action-search", _o = "action-sort", ko = "action-toggle-prompt", Ao = "action-reset-prompts", vo = "action-set-prompts", Ro = "sassy-saint-", No = "details", xo = "search", Co = "sort", Oo = "engine-toggle", Po = "==stats==", Ma = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Do = 10, Lo = 30, ft = (e) => Number.isFinite(e) ? e : 0;
|
|
1921
|
+
function $a(e) {
|
|
1922
1922
|
return {
|
|
1923
1923
|
days: Math.trunc(e / 864e5),
|
|
1924
1924
|
hours: Math.trunc(e / 36e5 % 24),
|
|
@@ -1944,7 +1944,7 @@ function Ka(e) {
|
|
|
1944
1944
|
switch (typeof e) {
|
|
1945
1945
|
case "number": {
|
|
1946
1946
|
if (Number.isFinite(e))
|
|
1947
|
-
return
|
|
1947
|
+
return $a(e);
|
|
1948
1948
|
break;
|
|
1949
1949
|
}
|
|
1950
1950
|
case "bigint":
|
|
@@ -1952,7 +1952,7 @@ function Ka(e) {
|
|
|
1952
1952
|
}
|
|
1953
1953
|
throw new TypeError("Expected a finite number or bigint");
|
|
1954
1954
|
}
|
|
1955
|
-
const Ha = (e) => e === 0 || e === 0n, Wa = (e, t) => t === 1 || t === 1n ? e : `${e}s`,
|
|
1955
|
+
const Ha = (e) => e === 0 || e === 0n, Wa = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Ba = 1e-7, Ga = 24n * 60n * 60n * 1000n;
|
|
1956
1956
|
function Ja(e, t) {
|
|
1957
1957
|
const r = typeof e == "bigint";
|
|
1958
1958
|
if (!r && !Number.isFinite(e))
|
|
@@ -1962,25 +1962,25 @@ function Ja(e, t) {
|
|
|
1962
1962
|
e = e < 0 ? -e : e, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
|
|
1963
1963
|
let n = [];
|
|
1964
1964
|
const o = (p, u) => {
|
|
1965
|
-
const c = Math.floor(p * 10 ** u +
|
|
1965
|
+
const c = Math.floor(p * 10 ** u + Ba);
|
|
1966
1966
|
return (Math.round(c) / 10 ** u).toFixed(u);
|
|
1967
|
-
}, s = (p, u, c,
|
|
1967
|
+
}, s = (p, u, c, m) => {
|
|
1968
1968
|
if (!((n.length === 0 || !t.colonNotation) && Ha(p) && !(t.colonNotation && c === "m"))) {
|
|
1969
|
-
if (
|
|
1970
|
-
const f =
|
|
1971
|
-
|
|
1969
|
+
if (m ?? (m = String(p)), t.colonNotation) {
|
|
1970
|
+
const f = m.includes(".") ? m.split(".")[0].length : m.length, E = n.length > 0 ? 2 : 1;
|
|
1971
|
+
m = "0".repeat(Math.max(0, E - f)) + m;
|
|
1972
1972
|
} else
|
|
1973
|
-
|
|
1974
|
-
n.push(
|
|
1973
|
+
m += t.verbose ? " " + Wa(u, p) : c;
|
|
1974
|
+
n.push(m);
|
|
1975
1975
|
}
|
|
1976
1976
|
}, i = Ka(e), d = BigInt(i.days);
|
|
1977
1977
|
if (t.hideYearAndDays ? s(BigInt(d) * 24n + BigInt(i.hours), "hour", "h") : (t.hideYear ? s(d, "day", "d") : (s(d / 365n, "year", "y"), s(d % 365n, "day", "d")), s(Number(i.hours), "hour", "h")), s(Number(i.minutes), "minute", "m"), !t.hideSeconds)
|
|
1978
1978
|
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1979
|
-
const p = Number(i.seconds), u = Number(i.milliseconds), c = Number(i.microseconds),
|
|
1979
|
+
const p = Number(i.seconds), u = Number(i.milliseconds), c = Number(i.microseconds), m = Number(i.nanoseconds);
|
|
1980
1980
|
if (s(p, "second", "s"), t.formatSubMilliseconds)
|
|
1981
|
-
s(u, "millisecond", "ms"), s(c, "microsecond", "µs"), s(
|
|
1981
|
+
s(u, "millisecond", "ms"), s(c, "microsecond", "µs"), s(m, "nanosecond", "ns");
|
|
1982
1982
|
else {
|
|
1983
|
-
const f = u + c / 1e3 +
|
|
1983
|
+
const f = u + c / 1e3 + m / 1e6, E = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, w = f >= 1 ? Math.round(f) : Math.ceil(f), I = E ? f.toFixed(E) : w;
|
|
1984
1984
|
s(
|
|
1985
1985
|
Number.parseFloat(I),
|
|
1986
1986
|
"millisecond",
|
|
@@ -1989,15 +1989,15 @@ function Ja(e, t) {
|
|
|
1989
1989
|
);
|
|
1990
1990
|
}
|
|
1991
1991
|
} else {
|
|
1992
|
-
const p = (r ? Number(e %
|
|
1993
|
-
s(Number.parseFloat(
|
|
1992
|
+
const p = (r ? Number(e % Ga) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, c = o(p, u), m = t.keepDecimalsOnWholeSeconds ? c : c.replace(/\.0+$/, "");
|
|
1993
|
+
s(Number.parseFloat(m), "second", "s", m);
|
|
1994
1994
|
}
|
|
1995
1995
|
if (n.length === 0)
|
|
1996
1996
|
return a + "0" + (t.verbose ? " milliseconds" : "ms");
|
|
1997
|
-
const
|
|
1998
|
-
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(
|
|
1997
|
+
const h = t.colonNotation ? ":" : " ";
|
|
1998
|
+
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(h);
|
|
1999
1999
|
}
|
|
2000
|
-
const Va = process.env.NODE_ENV === "production", Ya = !Va, za = Ya ? "gizmette.local.com" : "gizmette.com",
|
|
2000
|
+
const Va = process.env.NODE_ENV === "production", Ya = !Va, za = Ya ? "gizmette.local.com" : "gizmette.com", Mo = async () => {
|
|
2001
2001
|
const e = {
|
|
2002
2002
|
/**
|
|
2003
2003
|
* A boolean value that indicates the application would
|
|
@@ -2046,7 +2046,7 @@ const Va = process.env.NODE_ENV === "production", Ya = !Va, za = Ya ? "gizmette.
|
|
|
2046
2046
|
e
|
|
2047
2047
|
);
|
|
2048
2048
|
});
|
|
2049
|
-
},
|
|
2049
|
+
}, $o = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ l("dl", { className: "my-0", children: /* @__PURE__ */ O("div", { className: "flex items-center justify-between", children: [
|
|
2050
2050
|
/* @__PURE__ */ l("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2051
2051
|
/* @__PURE__ */ l("dd", { className: "my-1 inline-block", children: t[r] })
|
|
2052
2052
|
] }) }, `${e}-${r}`)) : null, Uo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Ko = (e) => e > 0 ? Ja(e, {
|
|
@@ -2066,7 +2066,7 @@ const Va = process.env.NODE_ENV === "production", Ya = !Va, za = Ya ? "gizmette.
|
|
|
2066
2066
|
return (...a) => {
|
|
2067
2067
|
window.clearTimeout(r), r = window.setTimeout(() => e(...a), t);
|
|
2068
2068
|
};
|
|
2069
|
-
}, bt = "av-button",
|
|
2069
|
+
}, bt = "av-button", Me = "icon", tt = "button", qe = "link", qa = ({
|
|
2070
2070
|
type: e,
|
|
2071
2071
|
size: t,
|
|
2072
2072
|
labelRight: r,
|
|
@@ -2082,7 +2082,7 @@ const Va = process.env.NODE_ENV === "production", Ya = !Va, za = Ya ? "gizmette.
|
|
|
2082
2082
|
[s]: t === "medium",
|
|
2083
2083
|
[i]: t === "large"
|
|
2084
2084
|
});
|
|
2085
|
-
case
|
|
2085
|
+
case Me:
|
|
2086
2086
|
return g("inline-flex items-center", {
|
|
2087
2087
|
"justify-center": n === "center",
|
|
2088
2088
|
"justify-start": n === "left",
|
|
@@ -2111,7 +2111,7 @@ const Va = process.env.NODE_ENV === "production", Ya = !Va, za = Ya ? "gizmette.
|
|
|
2111
2111
|
[o]: t === "medium",
|
|
2112
2112
|
[s]: t === "large"
|
|
2113
2113
|
});
|
|
2114
|
-
case
|
|
2114
|
+
case Me:
|
|
2115
2115
|
return g({
|
|
2116
2116
|
[n]: t === "small" && (r || a),
|
|
2117
2117
|
[o]: t === "medium" && (r || a),
|
|
@@ -2297,11 +2297,11 @@ const Va = process.env.NODE_ENV === "production", Ya = !Va, za = Ya ? "gizmette.
|
|
|
2297
2297
|
fullWidth: s,
|
|
2298
2298
|
size: i,
|
|
2299
2299
|
noBorder: d,
|
|
2300
|
-
labelRight:
|
|
2300
|
+
labelRight: h,
|
|
2301
2301
|
labelLeft: p,
|
|
2302
2302
|
noBackground: u,
|
|
2303
2303
|
variant: c,
|
|
2304
|
-
noTruncate:
|
|
2304
|
+
noTruncate: m,
|
|
2305
2305
|
align: f,
|
|
2306
2306
|
radius: E
|
|
2307
2307
|
}) => (c || (c = "primary"), r ? g(bt, t) : g(
|
|
@@ -2310,18 +2310,18 @@ const Va = process.env.NODE_ENV === "production", Ya = !Va, za = Ya ? "gizmette.
|
|
|
2310
2310
|
mode: a,
|
|
2311
2311
|
variant: c,
|
|
2312
2312
|
noBackground: u,
|
|
2313
|
-
noTruncate:
|
|
2313
|
+
noTruncate: m
|
|
2314
2314
|
}),
|
|
2315
2315
|
Za({ mode: a, noBackground: u, variant: c }),
|
|
2316
2316
|
en({ radius: E }),
|
|
2317
2317
|
qa({
|
|
2318
2318
|
type: e,
|
|
2319
2319
|
size: i,
|
|
2320
|
-
labelRight:
|
|
2320
|
+
labelRight: h,
|
|
2321
2321
|
labelLeft: p,
|
|
2322
2322
|
align: f
|
|
2323
2323
|
}),
|
|
2324
|
-
Xa({ type: e, size: i, labelRight:
|
|
2324
|
+
Xa({ type: e, size: i, labelRight: h, labelLeft: p }),
|
|
2325
2325
|
an({ mode: a, variant: c, noBorder: d }),
|
|
2326
2326
|
nn({ focusMode: n }),
|
|
2327
2327
|
tn({ mode: a, variant: c, disabled: o }),
|
|
@@ -2334,7 +2334,7 @@ const Va = process.env.NODE_ENV === "production", Ya = !Va, za = Ya ? "gizmette.
|
|
|
2334
2334
|
)), on = (e, t, r) => {
|
|
2335
2335
|
var a;
|
|
2336
2336
|
!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);
|
|
2337
|
-
},
|
|
2337
|
+
}, $e = z.forwardRef((e, t) => {
|
|
2338
2338
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
2339
2339
|
return /* @__PURE__ */ l(
|
|
2340
2340
|
"button",
|
|
@@ -2347,7 +2347,7 @@ const Va = process.env.NODE_ENV === "production", Ya = !Va, za = Ya ? "gizmette.
|
|
|
2347
2347
|
}
|
|
2348
2348
|
);
|
|
2349
2349
|
});
|
|
2350
|
-
|
|
2350
|
+
$e.displayName = "BaseButton";
|
|
2351
2351
|
const qt = z.forwardRef(
|
|
2352
2352
|
({
|
|
2353
2353
|
children: e,
|
|
@@ -2359,11 +2359,11 @@ const qt = z.forwardRef(
|
|
|
2359
2359
|
size: s = "medium",
|
|
2360
2360
|
raw: i = !1,
|
|
2361
2361
|
noBorder: d = !1,
|
|
2362
|
-
variant:
|
|
2362
|
+
variant: h = "primary",
|
|
2363
2363
|
noTruncate: p = !1,
|
|
2364
2364
|
radius: u = "large",
|
|
2365
2365
|
...c
|
|
2366
|
-
},
|
|
2366
|
+
}, m) => {
|
|
2367
2367
|
const f = rt({
|
|
2368
2368
|
type: tt,
|
|
2369
2369
|
mode: r,
|
|
@@ -2374,14 +2374,14 @@ const qt = z.forwardRef(
|
|
|
2374
2374
|
className: o,
|
|
2375
2375
|
size: s,
|
|
2376
2376
|
noBorder: d,
|
|
2377
|
-
variant:
|
|
2377
|
+
variant: h,
|
|
2378
2378
|
noTruncate: p,
|
|
2379
2379
|
radius: u
|
|
2380
2380
|
});
|
|
2381
2381
|
return /* @__PURE__ */ l(
|
|
2382
|
-
|
|
2382
|
+
$e,
|
|
2383
2383
|
{
|
|
2384
|
-
ref:
|
|
2384
|
+
ref: m,
|
|
2385
2385
|
className: f,
|
|
2386
2386
|
disabled: t,
|
|
2387
2387
|
...c,
|
|
@@ -2402,19 +2402,19 @@ const Xe = z.forwardRef(
|
|
|
2402
2402
|
type: s = "button",
|
|
2403
2403
|
raw: i = !1,
|
|
2404
2404
|
noBorder: d = !1,
|
|
2405
|
-
"aria-label":
|
|
2405
|
+
"aria-label": h,
|
|
2406
2406
|
label: p,
|
|
2407
2407
|
size: u = "medium",
|
|
2408
2408
|
labelRight: c,
|
|
2409
|
-
labelLeft:
|
|
2409
|
+
labelLeft: m,
|
|
2410
2410
|
noBackground: f = !1,
|
|
2411
2411
|
align: E = "center",
|
|
2412
2412
|
radius: w = "large",
|
|
2413
2413
|
variant: I = "primary",
|
|
2414
|
-
|
|
2414
|
+
...$
|
|
2415
2415
|
}, U) => {
|
|
2416
2416
|
const K = rt({
|
|
2417
|
-
type:
|
|
2417
|
+
type: Me,
|
|
2418
2418
|
mode: r,
|
|
2419
2419
|
focusMode: a,
|
|
2420
2420
|
fullWidth: n,
|
|
@@ -2424,29 +2424,29 @@ const Xe = z.forwardRef(
|
|
|
2424
2424
|
noBorder: d,
|
|
2425
2425
|
size: u,
|
|
2426
2426
|
labelRight: c,
|
|
2427
|
-
labelLeft:
|
|
2427
|
+
labelLeft: m,
|
|
2428
2428
|
noBackground: f,
|
|
2429
2429
|
align: E,
|
|
2430
2430
|
radius: w,
|
|
2431
2431
|
variant: I
|
|
2432
|
-
}),
|
|
2432
|
+
}), N = g({
|
|
2433
2433
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2434
2434
|
"text-copy-light": r === "dark" && !i,
|
|
2435
2435
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
2436
2436
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
2437
2437
|
});
|
|
2438
2438
|
return /* @__PURE__ */ O(
|
|
2439
|
-
|
|
2439
|
+
$e,
|
|
2440
2440
|
{
|
|
2441
2441
|
ref: U,
|
|
2442
2442
|
className: K,
|
|
2443
2443
|
disabled: t,
|
|
2444
2444
|
type: s,
|
|
2445
|
-
"aria-label":
|
|
2446
|
-
|
|
2445
|
+
"aria-label": h || p,
|
|
2446
|
+
...$,
|
|
2447
2447
|
children: [
|
|
2448
|
-
|
|
2449
|
-
/* @__PURE__ */ l("div", { className:
|
|
2448
|
+
m && /* @__PURE__ */ l("span", { className: "pr-2", children: m }),
|
|
2449
|
+
/* @__PURE__ */ l("div", { className: N, children: e }),
|
|
2450
2450
|
c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
|
|
2451
2451
|
]
|
|
2452
2452
|
}
|
|
@@ -2478,19 +2478,19 @@ const sn = z.forwardRef(
|
|
|
2478
2478
|
type: s = "button",
|
|
2479
2479
|
raw: i = !1,
|
|
2480
2480
|
noBorder: d = !1,
|
|
2481
|
-
"aria-label":
|
|
2481
|
+
"aria-label": h,
|
|
2482
2482
|
label: p,
|
|
2483
2483
|
size: u = "medium",
|
|
2484
2484
|
labelRight: c,
|
|
2485
|
-
labelLeft:
|
|
2485
|
+
labelLeft: m,
|
|
2486
2486
|
noBackground: f = !1,
|
|
2487
2487
|
align: E = "center",
|
|
2488
2488
|
active: w = !1,
|
|
2489
2489
|
radius: I = "large",
|
|
2490
|
-
|
|
2490
|
+
...$
|
|
2491
2491
|
}, U) => {
|
|
2492
2492
|
const K = rt({
|
|
2493
|
-
type:
|
|
2493
|
+
type: Me,
|
|
2494
2494
|
mode: r,
|
|
2495
2495
|
focusMode: a,
|
|
2496
2496
|
fullWidth: n,
|
|
@@ -2500,11 +2500,11 @@ const sn = z.forwardRef(
|
|
|
2500
2500
|
noBorder: d,
|
|
2501
2501
|
size: u,
|
|
2502
2502
|
labelRight: c,
|
|
2503
|
-
labelLeft:
|
|
2503
|
+
labelLeft: m,
|
|
2504
2504
|
noBackground: f,
|
|
2505
2505
|
align: E,
|
|
2506
2506
|
radius: I
|
|
2507
|
-
}),
|
|
2507
|
+
}), N = g({
|
|
2508
2508
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2509
2509
|
"text-copy-light": r === "dark" && !i,
|
|
2510
2510
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
@@ -2527,17 +2527,17 @@ const sn = z.forwardRef(
|
|
|
2527
2527
|
}
|
|
2528
2528
|
) : "";
|
|
2529
2529
|
return /* @__PURE__ */ l("div", { className: H, children: /* @__PURE__ */ O(
|
|
2530
|
-
|
|
2530
|
+
$e,
|
|
2531
2531
|
{
|
|
2532
2532
|
ref: U,
|
|
2533
2533
|
className: K,
|
|
2534
2534
|
disabled: t,
|
|
2535
2535
|
type: s,
|
|
2536
|
-
"aria-label":
|
|
2537
|
-
|
|
2536
|
+
"aria-label": h || p,
|
|
2537
|
+
...$,
|
|
2538
2538
|
children: [
|
|
2539
|
-
|
|
2540
|
-
/* @__PURE__ */ l("div", { className:
|
|
2539
|
+
m && /* @__PURE__ */ l("span", { className: "pr-2", children: m }),
|
|
2540
|
+
/* @__PURE__ */ l("div", { className: N, children: e }),
|
|
2541
2541
|
c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
|
|
2542
2542
|
]
|
|
2543
2543
|
}
|
|
@@ -2595,11 +2595,11 @@ const ln = ({
|
|
|
2595
2595
|
"border-border-accent dark:border-border-medium": n === "alt-system",
|
|
2596
2596
|
"mb-4": !o,
|
|
2597
2597
|
"mb-2": o
|
|
2598
|
-
}),
|
|
2598
|
+
}), h = g(r), p = a || g(`${Ae}__footer pt-2`);
|
|
2599
2599
|
return {
|
|
2600
2600
|
wrapper: i,
|
|
2601
2601
|
header: d,
|
|
2602
|
-
body:
|
|
2602
|
+
body: h,
|
|
2603
2603
|
footer: p
|
|
2604
2604
|
};
|
|
2605
2605
|
};
|
|
@@ -2621,25 +2621,25 @@ const un = ({
|
|
|
2621
2621
|
bodyClassName: s,
|
|
2622
2622
|
"aria-labelledby": i,
|
|
2623
2623
|
mode: d = "system",
|
|
2624
|
-
compact:
|
|
2624
|
+
compact: h = !1,
|
|
2625
2625
|
noBorder: p = !1,
|
|
2626
2626
|
...u
|
|
2627
2627
|
}) => {
|
|
2628
|
-
let c = null,
|
|
2628
|
+
let c = null, m = null;
|
|
2629
2629
|
const f = typeof e == "string", E = cn(Ae), w = ln({
|
|
2630
2630
|
className: o,
|
|
2631
2631
|
headerClassName: t,
|
|
2632
2632
|
bodyClassName: s,
|
|
2633
2633
|
footerClassName: a,
|
|
2634
2634
|
mode: d,
|
|
2635
|
-
compact:
|
|
2635
|
+
compact: h,
|
|
2636
2636
|
noBorder: p
|
|
2637
2637
|
});
|
|
2638
|
-
return f ? (c = E,
|
|
2638
|
+
return f ? (c = E, m = c) : !f && e && i ? (c = null, m = i) : !f && e && !i ? (c = E, m = c) : (c = null, m = i || null), /* @__PURE__ */ l("div", { className: w.wrapper, children: /* @__PURE__ */ O(
|
|
2639
2639
|
"section",
|
|
2640
2640
|
{
|
|
2641
|
-
...
|
|
2642
|
-
"aria-labelledby":
|
|
2641
|
+
...m && {
|
|
2642
|
+
"aria-labelledby": m
|
|
2643
2643
|
},
|
|
2644
2644
|
className: w.body,
|
|
2645
2645
|
...u,
|
|
@@ -2669,13 +2669,13 @@ const un = ({
|
|
|
2669
2669
|
semantic: i = !1,
|
|
2670
2670
|
...d
|
|
2671
2671
|
}) => {
|
|
2672
|
-
const
|
|
2672
|
+
const h = g(o, a);
|
|
2673
2673
|
return /* @__PURE__ */ O(Oe, { children: [
|
|
2674
2674
|
/* @__PURE__ */ l(
|
|
2675
2675
|
"svg",
|
|
2676
2676
|
{
|
|
2677
2677
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2678
|
-
className:
|
|
2678
|
+
className: h,
|
|
2679
2679
|
viewBox: r || n,
|
|
2680
2680
|
fill: t || "currentColor",
|
|
2681
2681
|
role: "img",
|
|
@@ -2701,7 +2701,7 @@ try {
|
|
|
2701
2701
|
});
|
|
2702
2702
|
} catch {
|
|
2703
2703
|
}
|
|
2704
|
-
const
|
|
2704
|
+
const mn = ({ className: e, viewBox: t, ...r }) => /* @__PURE__ */ l(
|
|
2705
2705
|
Ue,
|
|
2706
2706
|
{
|
|
2707
2707
|
defaultViewBox: "0 0 1200 500",
|
|
@@ -2719,7 +2719,7 @@ const hn = ({ className: e, viewBox: t, ...r }) => /* @__PURE__ */ l(
|
|
|
2719
2719
|
}
|
|
2720
2720
|
) })
|
|
2721
2721
|
}
|
|
2722
|
-
),
|
|
2722
|
+
), hn = ({
|
|
2723
2723
|
className: e,
|
|
2724
2724
|
viewBox: t,
|
|
2725
2725
|
title: r,
|
|
@@ -2879,7 +2879,7 @@ const yn = "av-main", fn = ({
|
|
|
2879
2879
|
direction: s = "row",
|
|
2880
2880
|
alignHorizontal: i = "normal",
|
|
2881
2881
|
alignVertical: d = "normal",
|
|
2882
|
-
...
|
|
2882
|
+
...h
|
|
2883
2883
|
}) => {
|
|
2884
2884
|
const p = {
|
|
2885
2885
|
flexDirection: s,
|
|
@@ -2898,7 +2898,7 @@ const yn = "av-main", fn = ({
|
|
|
2898
2898
|
bn,
|
|
2899
2899
|
"box-border flex flex-wrap"
|
|
2900
2900
|
), c = { columnGap: r, rowGap: a };
|
|
2901
|
-
return t ? /* @__PURE__ */ l("div", { className: t, children: /* @__PURE__ */ l("div", { className: u, style: p, ...
|
|
2901
|
+
return t ? /* @__PURE__ */ l("div", { className: t, children: /* @__PURE__ */ l("div", { className: u, style: p, ...h, children: /* @__PURE__ */ l(Qe.Provider, { value: c, children: e }) }) }) : /* @__PURE__ */ l("div", { className: u, style: p, ...h, children: /* @__PURE__ */ l(Qe.Provider, { value: c, children: e }) });
|
|
2902
2902
|
}, Ye = (e, t) => g({
|
|
2903
2903
|
"basis-1/12": e === 1 && !t,
|
|
2904
2904
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
@@ -3025,7 +3025,7 @@ try {
|
|
|
3025
3025
|
}
|
|
3026
3026
|
const Xt = "av-text-input", Tn = "av-text-input-wrapper", ze = "av-text-input-helper-text";
|
|
3027
3027
|
function In() {
|
|
3028
|
-
const e =
|
|
3028
|
+
const e = M(!1);
|
|
3029
3029
|
return Q(() => (e.current = !0, () => {
|
|
3030
3030
|
e.current = !1;
|
|
3031
3031
|
}), []), q(() => e.current, []);
|
|
@@ -3041,7 +3041,7 @@ const Sn = {
|
|
|
3041
3041
|
right: 0
|
|
3042
3042
|
};
|
|
3043
3043
|
function _n(e) {
|
|
3044
|
-
const t = In(), r =
|
|
3044
|
+
const t = In(), r = M(0), a = M(null), [n, o] = j(Sn), s = St(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
3045
3045
|
const d = i[0];
|
|
3046
3046
|
d && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
3047
3047
|
a.current && t() && o(d.contentRect);
|
|
@@ -3085,7 +3085,7 @@ const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", An = {
|
|
|
3085
3085
|
default:
|
|
3086
3086
|
return e;
|
|
3087
3087
|
}
|
|
3088
|
-
},
|
|
3088
|
+
}, Rn = ({
|
|
3089
3089
|
onAnnouncementClear: e,
|
|
3090
3090
|
dispatch: t
|
|
3091
3091
|
}) => {
|
|
@@ -3103,13 +3103,13 @@ const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", An = {
|
|
|
3103
3103
|
type: Qt,
|
|
3104
3104
|
payload: e
|
|
3105
3105
|
}), t && (r.current = setTimeout(
|
|
3106
|
-
() =>
|
|
3106
|
+
() => Rn({
|
|
3107
3107
|
onAnnouncementClear: a,
|
|
3108
3108
|
dispatch: n
|
|
3109
3109
|
}),
|
|
3110
3110
|
t
|
|
3111
3111
|
));
|
|
3112
|
-
},
|
|
3112
|
+
}, Nn = ({
|
|
3113
3113
|
children: e,
|
|
3114
3114
|
announcementTimeoutRef: t,
|
|
3115
3115
|
announcementDelay: r,
|
|
@@ -3143,13 +3143,13 @@ function er({
|
|
|
3143
3143
|
visible: i,
|
|
3144
3144
|
...d
|
|
3145
3145
|
}) {
|
|
3146
|
-
const
|
|
3146
|
+
const h = M(null), p = M(null), [u, c] = wt(vn, {
|
|
3147
3147
|
announcement: null
|
|
3148
3148
|
});
|
|
3149
|
-
let
|
|
3150
|
-
typeof
|
|
3151
|
-
|
|
3152
|
-
announcementTimeoutRef:
|
|
3149
|
+
let m = r;
|
|
3150
|
+
typeof m > "u" && (m = a ? An[a] : "assertive"), Q(() => {
|
|
3151
|
+
Nn({
|
|
3152
|
+
announcementTimeoutRef: h,
|
|
3153
3153
|
announcementDelay: n,
|
|
3154
3154
|
children: e,
|
|
3155
3155
|
clearAnnouncementDelay: o,
|
|
@@ -3169,7 +3169,7 @@ function er({
|
|
|
3169
3169
|
return /* @__PURE__ */ l(
|
|
3170
3170
|
"div",
|
|
3171
3171
|
{
|
|
3172
|
-
"aria-live":
|
|
3172
|
+
"aria-live": m,
|
|
3173
3173
|
...a && { role: a },
|
|
3174
3174
|
className: f,
|
|
3175
3175
|
...d,
|
|
@@ -3273,7 +3273,7 @@ const xn = ({
|
|
|
3273
3273
|
mode: s,
|
|
3274
3274
|
focusMode: i,
|
|
3275
3275
|
size: d,
|
|
3276
|
-
rightElementClassName:
|
|
3276
|
+
rightElementClassName: h
|
|
3277
3277
|
}) => {
|
|
3278
3278
|
const p = r ? e : g(
|
|
3279
3279
|
"relative flex w-full flex-col justify-center",
|
|
@@ -3309,7 +3309,7 @@ const xn = ({
|
|
|
3309
3309
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
3310
3310
|
},
|
|
3311
3311
|
t
|
|
3312
|
-
),
|
|
3312
|
+
), m = r ? void 0 : "sr-only", f = Pn({
|
|
3313
3313
|
disabled: a,
|
|
3314
3314
|
raw: r,
|
|
3315
3315
|
error: o,
|
|
@@ -3319,11 +3319,11 @@ const xn = ({
|
|
|
3319
3319
|
raw: r,
|
|
3320
3320
|
mode: s,
|
|
3321
3321
|
disabled: a
|
|
3322
|
-
}), w = r ? void 0 : g("absolute right-3",
|
|
3322
|
+
}), w = r ? void 0 : g("absolute right-3", h);
|
|
3323
3323
|
return {
|
|
3324
3324
|
wrapper: p,
|
|
3325
3325
|
input: c,
|
|
3326
|
-
accessibleLabel:
|
|
3326
|
+
accessibleLabel: m,
|
|
3327
3327
|
visibleLabel: f,
|
|
3328
3328
|
helperText: E,
|
|
3329
3329
|
rightElement: w
|
|
@@ -3339,51 +3339,51 @@ const xn = ({
|
|
|
3339
3339
|
inputClassName: s,
|
|
3340
3340
|
mode: i = "system",
|
|
3341
3341
|
focusMode: d = "system",
|
|
3342
|
-
disabled:
|
|
3342
|
+
disabled: h = !1,
|
|
3343
3343
|
noBorder: p = !1,
|
|
3344
3344
|
labelId: u,
|
|
3345
3345
|
labelHidden: c = !1,
|
|
3346
|
-
type:
|
|
3346
|
+
type: m = "text",
|
|
3347
3347
|
helperText: f = "",
|
|
3348
3348
|
rightElement: E,
|
|
3349
3349
|
rightElementClassName: w,
|
|
3350
3350
|
size: I = "md",
|
|
3351
|
-
|
|
3351
|
+
...$
|
|
3352
3352
|
}, U) => {
|
|
3353
|
-
const [K,
|
|
3353
|
+
const [K, N] = _n(), [H, W] = j(0), x = kn({ id: e, prefix: `${Xt}-` }), pe = `${t} error, ${f}`, Z = M(null), v = M(null), P = {
|
|
3354
3354
|
xs: { label: "-25px", helperText: "30px" },
|
|
3355
3355
|
sm: { label: "-29px", helperText: "34px" },
|
|
3356
3356
|
md: { label: "-33px", helperText: "38px" },
|
|
3357
3357
|
lg: { label: "-15px", helperText: "22px" },
|
|
3358
3358
|
xl: { label: "-19px", helperText: "25px" }
|
|
3359
|
-
},
|
|
3359
|
+
}, B = Ln({
|
|
3360
3360
|
className: o,
|
|
3361
3361
|
inputClassName: s,
|
|
3362
3362
|
error: a,
|
|
3363
3363
|
raw: n,
|
|
3364
3364
|
focusMode: d,
|
|
3365
|
-
disabled:
|
|
3365
|
+
disabled: h,
|
|
3366
3366
|
noBorder: p,
|
|
3367
3367
|
mode: i,
|
|
3368
3368
|
size: I,
|
|
3369
3369
|
rightElementClassName: w
|
|
3370
3370
|
});
|
|
3371
3371
|
return ot(() => {
|
|
3372
|
-
|
|
3373
|
-
}, [
|
|
3372
|
+
N && N.width && W(N.width + 18 + 10);
|
|
3373
|
+
}, [N]), ot(() => {
|
|
3374
3374
|
var ee, y;
|
|
3375
3375
|
const { label: T, helperText: b } = P[I];
|
|
3376
3376
|
(ee = Z == null ? void 0 : Z.current) == null || ee.style.setProperty("--av-text-input-label", T), (y = v == null ? void 0 : v.current) == null || y.style.setProperty(
|
|
3377
3377
|
"--av-text-input-helper-text",
|
|
3378
3378
|
b
|
|
3379
3379
|
);
|
|
3380
|
-
}, [I]), /* @__PURE__ */ O("div", { className:
|
|
3380
|
+
}, [I]), /* @__PURE__ */ O("div", { className: B.wrapper, children: [
|
|
3381
3381
|
/* @__PURE__ */ l(
|
|
3382
3382
|
"label",
|
|
3383
3383
|
{
|
|
3384
3384
|
htmlFor: x,
|
|
3385
3385
|
id: u,
|
|
3386
|
-
className:
|
|
3386
|
+
className: B.accessibleLabel,
|
|
3387
3387
|
children: r
|
|
3388
3388
|
}
|
|
3389
3389
|
),
|
|
@@ -3393,14 +3393,14 @@ const xn = ({
|
|
|
3393
3393
|
ref: U,
|
|
3394
3394
|
id: x,
|
|
3395
3395
|
name: t,
|
|
3396
|
-
type:
|
|
3397
|
-
disabled:
|
|
3396
|
+
type: m,
|
|
3397
|
+
disabled: h,
|
|
3398
3398
|
placeholder: n ? void 0 : " ",
|
|
3399
|
-
className:
|
|
3399
|
+
className: B.input,
|
|
3400
3400
|
...f && { "aria-describedby": `${x}-helper` },
|
|
3401
3401
|
...a && { "aria-invalid": "true" },
|
|
3402
3402
|
...E && !n && { style: { paddingRight: H } },
|
|
3403
|
-
|
|
3403
|
+
...$
|
|
3404
3404
|
}
|
|
3405
3405
|
),
|
|
3406
3406
|
!n && !c && /* @__PURE__ */ l(
|
|
@@ -3409,7 +3409,7 @@ const xn = ({
|
|
|
3409
3409
|
ref: Z,
|
|
3410
3410
|
"aria-hidden": !0,
|
|
3411
3411
|
htmlFor: x,
|
|
3412
|
-
className:
|
|
3412
|
+
className: B.visibleLabel,
|
|
3413
3413
|
children: r
|
|
3414
3414
|
}
|
|
3415
3415
|
),
|
|
@@ -3418,7 +3418,7 @@ const xn = ({
|
|
|
3418
3418
|
{
|
|
3419
3419
|
ref: v,
|
|
3420
3420
|
id: `${x}-helper`,
|
|
3421
|
-
className:
|
|
3421
|
+
className: B.helperText,
|
|
3422
3422
|
children: f
|
|
3423
3423
|
}
|
|
3424
3424
|
),
|
|
@@ -3426,7 +3426,7 @@ const xn = ({
|
|
|
3426
3426
|
"div",
|
|
3427
3427
|
{
|
|
3428
3428
|
ref: K,
|
|
3429
|
-
className:
|
|
3429
|
+
className: B.rightElement,
|
|
3430
3430
|
children: E
|
|
3431
3431
|
}
|
|
3432
3432
|
),
|
|
@@ -3435,7 +3435,7 @@ const xn = ({
|
|
|
3435
3435
|
}
|
|
3436
3436
|
);
|
|
3437
3437
|
at.displayName = "TextInput";
|
|
3438
|
-
function
|
|
3438
|
+
function Mn(e) {
|
|
3439
3439
|
return St(() => e.every((t) => t == null) ? () => {
|
|
3440
3440
|
} : (t) => {
|
|
3441
3441
|
e.forEach((r) => {
|
|
@@ -3443,7 +3443,7 @@ function $n(e) {
|
|
|
3443
3443
|
});
|
|
3444
3444
|
}, e);
|
|
3445
3445
|
}
|
|
3446
|
-
const
|
|
3446
|
+
const $n = 500, Un = 5e3, Kn = 2e4, tr = z.forwardRef(
|
|
3447
3447
|
({
|
|
3448
3448
|
name: e,
|
|
3449
3449
|
disabled: t,
|
|
@@ -3454,15 +3454,15 @@ const Mn = 500, Un = 5e3, Kn = 2e4, tr = z.forwardRef(
|
|
|
3454
3454
|
onBlur: s,
|
|
3455
3455
|
onFocus: i,
|
|
3456
3456
|
onTextInputMaskBlur: d,
|
|
3457
|
-
rightElement:
|
|
3457
|
+
rightElement: h,
|
|
3458
3458
|
...p
|
|
3459
3459
|
}, u) => {
|
|
3460
|
-
const [c,
|
|
3460
|
+
const [c, m] = j(!0), [f, E] = j({
|
|
3461
3461
|
message: null,
|
|
3462
3462
|
politeness: null
|
|
3463
|
-
}), w =
|
|
3463
|
+
}), w = M(!0), I = M(null), $ = M(null), U = Mn([u, $]), K = c ? "Show" : "Hide", N = () => {
|
|
3464
3464
|
I.current && clearTimeout(I.current), w.current || (I.current = setTimeout(() => {
|
|
3465
|
-
w.current = !0,
|
|
3465
|
+
w.current = !0, m(!0), E({
|
|
3466
3466
|
announcementTimeout: Un,
|
|
3467
3467
|
politeness: "polite",
|
|
3468
3468
|
message: `${r} hiding characters`
|
|
@@ -3471,21 +3471,21 @@ const Mn = 500, Un = 5e3, Kn = 2e4, tr = z.forwardRef(
|
|
|
3471
3471
|
}, H = (v) => {
|
|
3472
3472
|
v.preventDefault();
|
|
3473
3473
|
const P = !w.current;
|
|
3474
|
-
w.current = P,
|
|
3475
|
-
announcementTimeout:
|
|
3474
|
+
w.current = P, N(), m(P), E({
|
|
3475
|
+
announcementTimeout: $n,
|
|
3476
3476
|
politeness: "assertive",
|
|
3477
3477
|
message: P ? "Characters hidden" : "Characters showing"
|
|
3478
3478
|
}), n && n(P);
|
|
3479
3479
|
}, W = (v) => {
|
|
3480
3480
|
var P;
|
|
3481
|
-
const { relatedTarget:
|
|
3482
|
-
ee != null && ee.contains(
|
|
3481
|
+
const { relatedTarget: B } = v, ee = (P = $.current) == null ? void 0 : P.parentElement;
|
|
3482
|
+
ee != null && ee.contains(B) || d && d();
|
|
3483
3483
|
}, x = (v) => {
|
|
3484
|
-
|
|
3484
|
+
N(), s && s(v), W(v);
|
|
3485
3485
|
}, pe = (v) => {
|
|
3486
|
-
|
|
3486
|
+
N(), i && i(v);
|
|
3487
3487
|
}, Z = (v) => {
|
|
3488
|
-
|
|
3488
|
+
N(), o && o(v);
|
|
3489
3489
|
};
|
|
3490
3490
|
return Q(() => () => {
|
|
3491
3491
|
I.current && clearTimeout(I.current);
|
|
@@ -3502,7 +3502,7 @@ const Mn = 500, Un = 5e3, Kn = 2e4, tr = z.forwardRef(
|
|
|
3502
3502
|
onBlur: x,
|
|
3503
3503
|
onFocus: pe,
|
|
3504
3504
|
onChange: Z,
|
|
3505
|
-
rightElement: z.cloneElement(
|
|
3505
|
+
rightElement: z.cloneElement(h, {
|
|
3506
3506
|
ref: u,
|
|
3507
3507
|
label: K,
|
|
3508
3508
|
onClick: H,
|
|
@@ -3538,7 +3538,7 @@ try {
|
|
|
3538
3538
|
});
|
|
3539
3539
|
} catch {
|
|
3540
3540
|
}
|
|
3541
|
-
const Hn = "ASK! ME! ANYTHING!", Wn = "Callisto",
|
|
3541
|
+
const Hn = "ASK! ME! ANYTHING!", Wn = "Callisto", Bn = "Log in", Gn = "Sign in with a Passkey", Bo = "Log out", Jn = "Password", Go = "Send", Jo = "Profile", Vo = "Settings", Yo = "Chat history", zo = "About", Fo = "Type your question here", jo = "{{clipboard}}", qo = "Prompts 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. You can use the special placeholder {{clipboard}} to automatically insert the content of your clipboard.", Xo = {
|
|
3542
3542
|
PREFERENCES: {
|
|
3543
3543
|
TITLE: "User profile",
|
|
3544
3544
|
NAME: "Name",
|
|
@@ -3576,23 +3576,23 @@ const Hn = "ASK! ME! ANYTHING!", Wn = "Callisto", Gn = "Log in", Bn = "Sign in w
|
|
|
3576
3576
|
TITLE: "AI Engine"
|
|
3577
3577
|
}
|
|
3578
3578
|
}, Vn = () => /* @__PURE__ */ O("div", { className: "flex items-center justify-center", children: [
|
|
3579
|
-
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(
|
|
3579
|
+
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(mn, {}) }),
|
|
3580
3580
|
/* @__PURE__ */ O("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3581
3581
|
/* @__PURE__ */ l("h1", { children: Wn }),
|
|
3582
3582
|
/* @__PURE__ */ l("h2", { children: Hn })
|
|
3583
3583
|
] })
|
|
3584
3584
|
] }), Yn = () => {
|
|
3585
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } = jt(), [a, n] = j(""), [o, s] = j(""), [i, d] = j(!0), [
|
|
3585
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = jt(), [a, n] = j(""), [o, s] = j(""), [i, d] = j(!0), [h, p] = j({
|
|
3586
3586
|
username: "",
|
|
3587
3587
|
password: ""
|
|
3588
3588
|
}), u = async (c) => {
|
|
3589
|
-
c.preventDefault(), await e(
|
|
3589
|
+
c.preventDefault(), await e(h.username, h.password) || (s(""), n("Invalid username or password"));
|
|
3590
3590
|
};
|
|
3591
3591
|
return Q(() => {
|
|
3592
3592
|
var c;
|
|
3593
3593
|
(c = document.getElementById("logo")) == null || c.classList.add("fadeOut"), setTimeout(() => {
|
|
3594
|
-
var
|
|
3595
|
-
(
|
|
3594
|
+
var m;
|
|
3595
|
+
(m = document.getElementById("root")) == null || m.classList.replace("app-hidden", "fadeIn");
|
|
3596
3596
|
}, 500);
|
|
3597
3597
|
}), Q(() => {
|
|
3598
3598
|
t && s(t);
|
|
@@ -3630,7 +3630,7 @@ const Hn = "ASK! ME! ANYTHING!", Wn = "Callisto", Gn = "Log in", Bn = "Sign in w
|
|
|
3630
3630
|
label: "Username",
|
|
3631
3631
|
onChange: (c) => {
|
|
3632
3632
|
p({
|
|
3633
|
-
...
|
|
3633
|
+
...h,
|
|
3634
3634
|
username: c.target.value
|
|
3635
3635
|
}), n("");
|
|
3636
3636
|
},
|
|
@@ -3649,11 +3649,11 @@ const Hn = "ASK! ME! ANYTHING!", Wn = "Callisto", Gn = "Log in", Bn = "Sign in w
|
|
|
3649
3649
|
focusMode: "light",
|
|
3650
3650
|
name: "password",
|
|
3651
3651
|
label: Jn,
|
|
3652
|
-
rightElement: /* @__PURE__ */ l(Xe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ l(gn, {}) : /* @__PURE__ */ l(
|
|
3652
|
+
rightElement: /* @__PURE__ */ l(Xe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ l(gn, {}) : /* @__PURE__ */ l(hn, {}) }),
|
|
3653
3653
|
onMaskChange: d,
|
|
3654
3654
|
onChange: (c) => {
|
|
3655
3655
|
p({
|
|
3656
|
-
...
|
|
3656
|
+
...h,
|
|
3657
3657
|
password: c.target.value
|
|
3658
3658
|
}), n("");
|
|
3659
3659
|
},
|
|
@@ -3670,7 +3670,7 @@ const Hn = "ASK! ME! ANYTHING!", Wn = "Callisto", Gn = "Log in", Bn = "Sign in w
|
|
|
3670
3670
|
noBorder: !0,
|
|
3671
3671
|
type: "submit",
|
|
3672
3672
|
className: "mt-7",
|
|
3673
|
-
children:
|
|
3673
|
+
children: Bn
|
|
3674
3674
|
}
|
|
3675
3675
|
) }),
|
|
3676
3676
|
/* @__PURE__ */ l(te, { span: 12, children: /* @__PURE__ */ l("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
|
|
@@ -3682,7 +3682,7 @@ const Hn = "ASK! ME! ANYTHING!", Wn = "Callisto", Gn = "Log in", Bn = "Sign in w
|
|
|
3682
3682
|
focusMode: "light",
|
|
3683
3683
|
fullWidth: !0,
|
|
3684
3684
|
className: "mb-4",
|
|
3685
|
-
labelRight:
|
|
3685
|
+
labelRight: Gn,
|
|
3686
3686
|
onClick: r,
|
|
3687
3687
|
children: /* @__PURE__ */ l(pn, { size: "size-7" })
|
|
3688
3688
|
}
|
|
@@ -3693,72 +3693,72 @@ const Hn = "ASK! ME! ANYTHING!", Wn = "Callisto", Gn = "Log in", Bn = "Sign in w
|
|
|
3693
3693
|
) });
|
|
3694
3694
|
}, zn = new URL(document.location.href).searchParams, Fn = !!zn.get("debug") || !1, jn = or(() => import(
|
|
3695
3695
|
/* webpackChunkName: "LazyApp" */
|
|
3696
|
-
"./App.
|
|
3696
|
+
"./App.BCrssLN1.js"
|
|
3697
3697
|
).then((e) => e.App)), qn = ({ isComponent: e }) => {
|
|
3698
3698
|
const { isAuthenticated: t } = jt();
|
|
3699
3699
|
return t ? /* @__PURE__ */ l(sr, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(jn, { isComponent: e }) }) : /* @__PURE__ */ l(Yn, {});
|
|
3700
3700
|
}, Xn = ({
|
|
3701
3701
|
isComponent: e = !1,
|
|
3702
3702
|
domain: t = za
|
|
3703
|
-
}) => /* @__PURE__ */ l(Oe, { children: /* @__PURE__ */ l(La, { clientId:
|
|
3703
|
+
}) => /* @__PURE__ */ l(Oe, { children: /* @__PURE__ */ l(La, { clientId: Ma, domain: t, debug: Fn, children: /* @__PURE__ */ l(qn, { isComponent: e }) }) }), Qo = ({ domain: e }) => /* @__PURE__ */ l(Xn, { isComponent: !0, domain: e });
|
|
3704
3704
|
export {
|
|
3705
3705
|
zo as ABOUT_TITLE,
|
|
3706
3706
|
Io as ACTION_ENGINE,
|
|
3707
3707
|
fo as ACTION_MESSAGE,
|
|
3708
3708
|
Eo as ACTION_MODEL,
|
|
3709
3709
|
bo as ACTION_RESET,
|
|
3710
|
-
Ao as
|
|
3710
|
+
Ao as ACTION_RESET_PROMPTS,
|
|
3711
3711
|
wo as ACTION_RESTORE,
|
|
3712
3712
|
So as ACTION_SEARCH,
|
|
3713
|
-
vo as
|
|
3713
|
+
vo as ACTION_SET_PROMPTS,
|
|
3714
3714
|
_o as ACTION_SORT,
|
|
3715
3715
|
To as ACTION_STREAMING,
|
|
3716
|
-
ko as
|
|
3716
|
+
ko as ACTION_TOGGLE_PROMPT,
|
|
3717
3717
|
Wn as APP_NAME,
|
|
3718
3718
|
qt as C,
|
|
3719
3719
|
Xo as CARDS,
|
|
3720
|
-
jo as
|
|
3720
|
+
jo as CLIPBOARD_PROMPT,
|
|
3721
3721
|
po as DEFAULT_AI_ENGINE,
|
|
3722
3722
|
yo as ENGINE_ANTHROPIC,
|
|
3723
3723
|
go as ENGINE_OPENAI,
|
|
3724
|
-
|
|
3724
|
+
ho as ERROR_MESSAGE,
|
|
3725
3725
|
Yo as HISTORY_TITLE,
|
|
3726
3726
|
Lo as INFINITE_SCROLL_LIMIT,
|
|
3727
3727
|
Do as INFINITE_SCROLL_THRESHOLD,
|
|
3728
3728
|
En as L,
|
|
3729
|
-
|
|
3729
|
+
No as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3730
3730
|
Oo as LOCAL_STORAGE_ENGINE_TOGGLE,
|
|
3731
|
-
|
|
3731
|
+
Ro as LOCAL_STORAGE_PREFIX,
|
|
3732
3732
|
xo as LOCAL_STORAGE_SEARCH,
|
|
3733
3733
|
Co as LOCAL_STORAGE_SORT,
|
|
3734
|
-
|
|
3734
|
+
Bo as LOG_OUT,
|
|
3735
3735
|
Vn as Logo,
|
|
3736
3736
|
ue as M,
|
|
3737
3737
|
Xe as P,
|
|
3738
3738
|
Jo as PROFILE_TITLE,
|
|
3739
|
+
qo as PROMPTS_DESCRIPTION,
|
|
3739
3740
|
un as R,
|
|
3740
3741
|
co as ROLE_ASSISTANT,
|
|
3741
|
-
|
|
3742
|
+
mo as ROLE_HIDDEN,
|
|
3742
3743
|
uo as ROLE_INTERNAL,
|
|
3743
3744
|
lo as ROLE_SYSTEM,
|
|
3744
3745
|
io as ROLE_USER,
|
|
3745
|
-
|
|
3746
|
+
Go as SEND,
|
|
3746
3747
|
Vo as SETTINGS_TITLE,
|
|
3747
3748
|
Po as STATS_SEPARATOR,
|
|
3748
3749
|
Qo as SassySaint,
|
|
3749
|
-
qo as TAGS_DESCRIPTION,
|
|
3750
3750
|
Fo as TYPE_QUESTION,
|
|
3751
3751
|
Wo as debounce,
|
|
3752
3752
|
Ko as durationFormatter,
|
|
3753
3753
|
Ue as g,
|
|
3754
|
-
|
|
3754
|
+
Mo as getCurrentGeoLocation,
|
|
3755
3755
|
ja as getMainPaddingClass,
|
|
3756
3756
|
Fa as getMessageContaintWrapperClass,
|
|
3757
3757
|
Uo as isLastMessageFromRole,
|
|
3758
3758
|
te as j,
|
|
3759
3759
|
Ho as pluralize,
|
|
3760
3760
|
fn as r,
|
|
3761
|
-
|
|
3761
|
+
$o as renderDataAsList,
|
|
3762
3762
|
jt as un,
|
|
3763
3763
|
at as ye,
|
|
3764
3764
|
pn as z
|