@versini/sassysaint 1.0.6 → 1.0.8
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.DpwMzH8A.js → App.D3duFcJD.js} +3 -3
- package/dist/chunks/{LazyHeader.C1RUIYBp.js → LazyHeader.B56caFgn.js} +22 -22
- package/dist/chunks/{LazyMarkdownWithExtra.BlxpnMyE.js → LazyMarkdownWithExtra.C659-_hy.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.CpqGU5k9.js → LazyMessageAssistant.BP4_wS5W.js} +4 -4
- package/dist/chunks/{index.BKyjC-Gq.js → index.DcXJ8skl.js} +1783 -1347
- package/dist/chunks/{index.DruzEDnN.CTTNEhUa.js → index.DruzEDnN.C6Ffe-lT.js} +1 -1
- package/dist/chunks/{useLocalStorage.CRw27Sp5.js → useLocalStorage.Cx1iecci.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +4 -4
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as l, jsxs as T, Fragment as le } from "react/jsx-runtime";
|
|
2
|
+
import B, { createContext as ur, useReducer as Et, useRef as J, useCallback as te, useEffect as z, useContext as vt, useSyncExternalStore as mr, useId as Tt, useMemo as hr, useState as j, useLayoutEffect as pr, lazy as St, Suspense as It } from "react";
|
|
3
3
|
import f from "clsx";
|
|
4
|
-
var
|
|
4
|
+
var gr = Object.defineProperty, fr = (e, t, r) => t in e ? gr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Le = (e, t, r) => fr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
|
-
@versini/auth-provider v6.
|
|
6
|
+
@versini/auth-provider v6.2.1
|
|
7
7
|
© 2024 gizmette.com
|
|
8
8
|
*/
|
|
9
9
|
try {
|
|
10
10
|
window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
|
|
11
|
-
version: "6.
|
|
12
|
-
buildTime: "07/
|
|
11
|
+
version: "6.2.1",
|
|
12
|
+
buildTime: "07/18/2024 12:26 PM EDT",
|
|
13
13
|
homepage: "https://github.com/aversini/auth-client",
|
|
14
14
|
license: "MIT"
|
|
15
15
|
});
|
|
@@ -18,106 +18,106 @@ try {
|
|
|
18
18
|
function M(e) {
|
|
19
19
|
const t = new Uint8Array(e);
|
|
20
20
|
let r = "";
|
|
21
|
-
for (const
|
|
22
|
-
r += String.fromCharCode(
|
|
21
|
+
for (const n of t)
|
|
22
|
+
r += String.fromCharCode(n);
|
|
23
23
|
return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4,
|
|
27
|
-
for (let i = 0; i <
|
|
28
|
-
s[i] =
|
|
25
|
+
function Se(e) {
|
|
26
|
+
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, n = t.padEnd(t.length + r, "="), a = atob(n), o = new ArrayBuffer(a.length), s = new Uint8Array(o);
|
|
27
|
+
for (let i = 0; i < a.length; i++)
|
|
28
|
+
s[i] = a.charCodeAt(i);
|
|
29
29
|
return o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Ye() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function At(e) {
|
|
35
35
|
const { id: t } = e;
|
|
36
36
|
return {
|
|
37
37
|
...e,
|
|
38
|
-
id:
|
|
38
|
+
id: Se(t),
|
|
39
39
|
transports: e.transports
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
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
|
|
46
|
-
constructor({ message: t, code: r, cause:
|
|
47
|
-
super(t, { cause:
|
|
45
|
+
let N = class extends Error {
|
|
46
|
+
constructor({ message: t, code: r, cause: n, name: a }) {
|
|
47
|
+
super(t, { cause: n }), this.name = a ?? n.name, this.code = r;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
function
|
|
51
|
-
var r,
|
|
52
|
-
const { publicKey:
|
|
53
|
-
if (!
|
|
50
|
+
function yr({ error: e, options: t }) {
|
|
51
|
+
var r, n;
|
|
52
|
+
const { publicKey: a } = t;
|
|
53
|
+
if (!a)
|
|
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 N({
|
|
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
|
-
if (((r =
|
|
64
|
-
return new
|
|
63
|
+
if (((r = a.authenticatorSelection) == null ? void 0 : r.requireResidentKey) === !0)
|
|
64
|
+
return new N({
|
|
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
|
-
if (((
|
|
70
|
-
return new
|
|
69
|
+
if (((n = a.authenticatorSelection) == null ? void 0 : n.userVerification) === "required")
|
|
70
|
+
return new N({
|
|
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 N({
|
|
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 N({
|
|
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
|
|
89
|
+
return a.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new N({
|
|
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 N({
|
|
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
|
|
97
97
|
});
|
|
98
98
|
if (e.name === "SecurityError") {
|
|
99
99
|
const o = window.location.hostname;
|
|
100
|
-
if (
|
|
101
|
-
if (
|
|
102
|
-
return new
|
|
103
|
-
message: `The RP ID "${
|
|
100
|
+
if (kt(o)) {
|
|
101
|
+
if (a.rp.id !== o)
|
|
102
|
+
return new N({
|
|
103
|
+
message: `The RP ID "${a.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 N({
|
|
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
|
-
if (
|
|
114
|
-
return new
|
|
113
|
+
if (a.user.id.byteLength < 1 || a.user.id.byteLength > 64)
|
|
114
|
+
return new N({
|
|
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 N({
|
|
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
|
|
@@ -125,7 +125,7 @@ function ar({ error: e, options: t }) {
|
|
|
125
125
|
}
|
|
126
126
|
return e;
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class br {
|
|
129
129
|
createNewAbortSignal() {
|
|
130
130
|
if (this.controller) {
|
|
131
131
|
const r = new Error("Cancelling existing WebAuthn API call for new one");
|
|
@@ -141,118 +141,118 @@ class nr {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
function
|
|
146
|
-
if (e && !(
|
|
144
|
+
const _t = new br(), wr = ["cross-platform", "platform"];
|
|
145
|
+
function Rt(e) {
|
|
146
|
+
if (e && !(wr.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
|
-
async function
|
|
149
|
+
async function Er(e) {
|
|
150
150
|
var t;
|
|
151
|
-
if (!
|
|
151
|
+
if (!Ye())
|
|
152
152
|
throw new Error("WebAuthn is not supported in this browser");
|
|
153
153
|
const r = { publicKey: {
|
|
154
154
|
...e,
|
|
155
|
-
challenge:
|
|
155
|
+
challenge: Se(e.challenge),
|
|
156
156
|
user: {
|
|
157
157
|
...e.user,
|
|
158
|
-
id:
|
|
158
|
+
id: Se(e.user.id)
|
|
159
159
|
},
|
|
160
|
-
excludeCredentials: (t = e.excludeCredentials) == null ? void 0 : t.map(
|
|
160
|
+
excludeCredentials: (t = e.excludeCredentials) == null ? void 0 : t.map(At)
|
|
161
161
|
} };
|
|
162
|
-
r.signal =
|
|
163
|
-
let
|
|
162
|
+
r.signal = _t.createNewAbortSignal();
|
|
163
|
+
let n;
|
|
164
164
|
try {
|
|
165
|
-
|
|
166
|
-
} catch (
|
|
167
|
-
throw
|
|
165
|
+
n = await navigator.credentials.create(r);
|
|
166
|
+
} catch (c) {
|
|
167
|
+
throw yr({ error: c, options: r });
|
|
168
168
|
}
|
|
169
|
-
if (!
|
|
169
|
+
if (!n)
|
|
170
170
|
throw new Error("Registration was not completed");
|
|
171
|
-
const { id:
|
|
172
|
-
let
|
|
173
|
-
typeof s.getTransports == "function" && (
|
|
174
|
-
let
|
|
171
|
+
const { id: a, rawId: o, response: s, type: i } = n;
|
|
172
|
+
let m;
|
|
173
|
+
typeof s.getTransports == "function" && (m = s.getTransports());
|
|
174
|
+
let d;
|
|
175
175
|
if (typeof s.getPublicKeyAlgorithm == "function")
|
|
176
176
|
try {
|
|
177
|
-
|
|
178
|
-
} catch (
|
|
179
|
-
|
|
177
|
+
d = s.getPublicKeyAlgorithm();
|
|
178
|
+
} catch (c) {
|
|
179
|
+
Ue("getPublicKeyAlgorithm()", c);
|
|
180
180
|
}
|
|
181
|
-
let
|
|
181
|
+
let h;
|
|
182
182
|
if (typeof s.getPublicKey == "function")
|
|
183
183
|
try {
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
} catch (
|
|
187
|
-
|
|
184
|
+
const c = s.getPublicKey();
|
|
185
|
+
c !== null && (h = M(c));
|
|
186
|
+
} catch (c) {
|
|
187
|
+
Ue("getPublicKey()", c);
|
|
188
188
|
}
|
|
189
|
-
let
|
|
189
|
+
let g;
|
|
190
190
|
if (typeof s.getAuthenticatorData == "function")
|
|
191
191
|
try {
|
|
192
|
-
|
|
193
|
-
} catch (
|
|
194
|
-
|
|
192
|
+
g = M(s.getAuthenticatorData());
|
|
193
|
+
} catch (c) {
|
|
194
|
+
Ue("getAuthenticatorData()", c);
|
|
195
195
|
}
|
|
196
196
|
return {
|
|
197
|
-
id:
|
|
197
|
+
id: a,
|
|
198
198
|
rawId: M(o),
|
|
199
199
|
response: {
|
|
200
200
|
attestationObject: M(s.attestationObject),
|
|
201
201
|
clientDataJSON: M(s.clientDataJSON),
|
|
202
|
-
transports:
|
|
203
|
-
publicKeyAlgorithm:
|
|
204
|
-
publicKey:
|
|
205
|
-
authenticatorData:
|
|
202
|
+
transports: m,
|
|
203
|
+
publicKeyAlgorithm: d,
|
|
204
|
+
publicKey: h,
|
|
205
|
+
authenticatorData: g
|
|
206
206
|
},
|
|
207
207
|
type: i,
|
|
208
|
-
clientExtensionResults:
|
|
209
|
-
authenticatorAttachment:
|
|
208
|
+
clientExtensionResults: n.getClientExtensionResults(),
|
|
209
|
+
authenticatorAttachment: Rt(n.authenticatorAttachment)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function Ue(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 vr() {
|
|
217
|
+
if (!Ye())
|
|
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 Tr({ error: e, options: t }) {
|
|
223
223
|
const { publicKey: r } = t;
|
|
224
224
|
if (!r)
|
|
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 N({
|
|
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 N({
|
|
236
236
|
message: e.message,
|
|
237
237
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
238
238
|
cause: e
|
|
239
239
|
});
|
|
240
240
|
if (e.name === "SecurityError") {
|
|
241
|
-
const
|
|
242
|
-
if (
|
|
243
|
-
if (r.rpId !==
|
|
244
|
-
return new
|
|
241
|
+
const n = window.location.hostname;
|
|
242
|
+
if (kt(n)) {
|
|
243
|
+
if (r.rpId !== n)
|
|
244
|
+
return new N({
|
|
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 N({
|
|
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 N({
|
|
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
|
|
@@ -260,47 +260,47 @@ function cr({ error: e, options: t }) {
|
|
|
260
260
|
}
|
|
261
261
|
return e;
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
264
|
-
var r,
|
|
265
|
-
if (!
|
|
263
|
+
async function Sr(e, t = !1) {
|
|
264
|
+
var r, n;
|
|
265
|
+
if (!Ye())
|
|
266
266
|
throw new Error("WebAuthn is not supported in this browser");
|
|
267
|
-
let
|
|
268
|
-
((r = e.allowCredentials) == null ? void 0 : r.length) !== 0 && (
|
|
267
|
+
let a;
|
|
268
|
+
((r = e.allowCredentials) == null ? void 0 : r.length) !== 0 && (a = (n = e.allowCredentials) == null ? void 0 : n.map(At));
|
|
269
269
|
const o = {
|
|
270
270
|
...e,
|
|
271
|
-
challenge:
|
|
272
|
-
allowCredentials:
|
|
271
|
+
challenge: Se(e.challenge),
|
|
272
|
+
allowCredentials: a
|
|
273
273
|
}, s = {};
|
|
274
274
|
if (t) {
|
|
275
|
-
if (!await
|
|
275
|
+
if (!await vr())
|
|
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
|
s.mediation = "conditional", o.allowCredentials = [];
|
|
280
280
|
}
|
|
281
|
-
s.publicKey = o, s.signal =
|
|
281
|
+
s.publicKey = o, s.signal = _t.createNewAbortSignal();
|
|
282
282
|
let i;
|
|
283
283
|
try {
|
|
284
284
|
i = await navigator.credentials.get(s);
|
|
285
|
-
} catch (
|
|
286
|
-
throw
|
|
285
|
+
} catch (u) {
|
|
286
|
+
throw Tr({ error: u, options: s });
|
|
287
287
|
}
|
|
288
288
|
if (!i)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
290
|
-
const { id:
|
|
291
|
-
let
|
|
292
|
-
return
|
|
293
|
-
id:
|
|
294
|
-
rawId: M(
|
|
290
|
+
const { id: m, rawId: d, response: h, type: g } = i;
|
|
291
|
+
let c;
|
|
292
|
+
return h.userHandle && (c = M(h.userHandle)), {
|
|
293
|
+
id: m,
|
|
294
|
+
rawId: M(d),
|
|
295
295
|
response: {
|
|
296
|
-
authenticatorData: M(
|
|
297
|
-
clientDataJSON: M(
|
|
298
|
-
signature: M(
|
|
299
|
-
userHandle:
|
|
296
|
+
authenticatorData: M(h.authenticatorData),
|
|
297
|
+
clientDataJSON: M(h.clientDataJSON),
|
|
298
|
+
signature: M(h.signature),
|
|
299
|
+
userHandle: c
|
|
300
300
|
},
|
|
301
|
-
type:
|
|
301
|
+
type: g,
|
|
302
302
|
clientExtensionResults: i.getClientExtensionResults(),
|
|
303
|
-
authenticatorAttachment:
|
|
303
|
+
authenticatorAttachment: Rt(i.authenticatorAttachment)
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
/*!
|
|
@@ -310,22 +310,22 @@ async function lr(e, t = !1) {
|
|
|
310
310
|
try {
|
|
311
311
|
window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
|
|
312
312
|
version: "2.12.1",
|
|
313
|
-
buildTime: "07/
|
|
313
|
+
buildTime: "07/18/2024 12:26 PM EDT",
|
|
314
314
|
homepage: "https://github.com/aversini/auth-client",
|
|
315
315
|
license: "MIT"
|
|
316
316
|
});
|
|
317
317
|
} catch {
|
|
318
318
|
}
|
|
319
|
-
const
|
|
319
|
+
const re = {
|
|
320
320
|
ID_TOKEN: "id_token",
|
|
321
321
|
ACCESS_TOKEN: "token",
|
|
322
322
|
ID_AND_ACCESS_TOKEN: "id_token token",
|
|
323
323
|
CODE: "code",
|
|
324
324
|
REFRESH_TOKEN: "refresh_token",
|
|
325
325
|
PASSKEY: "passkey"
|
|
326
|
-
},
|
|
326
|
+
}, Nt = {
|
|
327
327
|
CLIENT_ID: "X-Auth-ClientId"
|
|
328
|
-
},
|
|
328
|
+
}, C = {
|
|
329
329
|
ALG: "RS256",
|
|
330
330
|
USER_ID_KEY: "sub",
|
|
331
331
|
TOKEN_ID_KEY: "__raw",
|
|
@@ -333,7 +333,7 @@ const q = {
|
|
|
333
333
|
USERNAME_KEY: "username",
|
|
334
334
|
AUTH_TYPE_KEY: "auth_type",
|
|
335
335
|
ISSUER: "gizmette.com"
|
|
336
|
-
},
|
|
336
|
+
}, Ir = `-----BEGIN PUBLIC KEY-----
|
|
337
337
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
338
338
|
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
339
339
|
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
@@ -341,33 +341,33 @@ aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
|
|
|
341
341
|
l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
|
|
342
342
|
sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
|
|
343
343
|
awIDAQAB
|
|
344
|
-
-----END PUBLIC KEY-----`,
|
|
344
|
+
-----END PUBLIC KEY-----`, Re = {
|
|
345
345
|
AUTHENTICATE: "authenticate",
|
|
346
346
|
CODE: "code",
|
|
347
347
|
LOGOUT: "logout"
|
|
348
|
-
},
|
|
349
|
-
function
|
|
350
|
-
const t = e.reduce((
|
|
351
|
-
let
|
|
352
|
-
for (const
|
|
353
|
-
r.set(
|
|
348
|
+
}, Ne = crypto, Ct = (e) => e instanceof CryptoKey, ue = new TextEncoder(), de = new TextDecoder();
|
|
349
|
+
function Ar(...e) {
|
|
350
|
+
const t = e.reduce((a, { length: o }) => a + o, 0), r = new Uint8Array(t);
|
|
351
|
+
let n = 0;
|
|
352
|
+
for (const a of e)
|
|
353
|
+
r.set(a, n), n += a.length;
|
|
354
354
|
return r;
|
|
355
355
|
}
|
|
356
|
-
const
|
|
356
|
+
const kr = (e) => {
|
|
357
357
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
358
|
-
for (let
|
|
359
|
-
r[
|
|
358
|
+
for (let n = 0; n < t.length; n++)
|
|
359
|
+
r[n] = t.charCodeAt(n);
|
|
360
360
|
return r;
|
|
361
|
-
},
|
|
361
|
+
}, ie = (e) => {
|
|
362
362
|
let t = e;
|
|
363
|
-
t instanceof Uint8Array && (t =
|
|
363
|
+
t instanceof Uint8Array && (t = de.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
364
364
|
try {
|
|
365
|
-
return
|
|
365
|
+
return kr(t);
|
|
366
366
|
} catch {
|
|
367
367
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
368
368
|
}
|
|
369
369
|
};
|
|
370
|
-
let
|
|
370
|
+
let Y = class extends Error {
|
|
371
371
|
static get code() {
|
|
372
372
|
return "ERR_JOSE_GENERIC";
|
|
373
373
|
}
|
|
@@ -375,23 +375,22 @@ let W = class extends Error {
|
|
|
375
375
|
var r;
|
|
376
376
|
super(t), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (r = Error.captureStackTrace) == null || r.call(Error, this, this.constructor);
|
|
377
377
|
}
|
|
378
|
-
},
|
|
378
|
+
}, $ = class extends Y {
|
|
379
379
|
static get code() {
|
|
380
380
|
return "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
381
381
|
}
|
|
382
|
-
constructor(t, r,
|
|
383
|
-
super(t), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim =
|
|
382
|
+
constructor(t, r, n = "unspecified", a = "unspecified") {
|
|
383
|
+
super(t), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = n, this.reason = a, this.payload = r;
|
|
384
384
|
}
|
|
385
|
-
}
|
|
386
|
-
class Qe extends W {
|
|
385
|
+
}, rt = class extends Y {
|
|
387
386
|
static get code() {
|
|
388
387
|
return "ERR_JWT_EXPIRED";
|
|
389
388
|
}
|
|
390
|
-
constructor(t, r
|
|
391
|
-
super(
|
|
389
|
+
constructor(e, t, r = "unspecified", n = "unspecified") {
|
|
390
|
+
super(e), this.code = "ERR_JWT_EXPIRED", this.claim = r, this.reason = n, this.payload = t;
|
|
392
391
|
}
|
|
393
|
-
}
|
|
394
|
-
class
|
|
392
|
+
};
|
|
393
|
+
class _r extends Y {
|
|
395
394
|
constructor() {
|
|
396
395
|
super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
397
396
|
}
|
|
@@ -399,21 +398,23 @@ class hr extends W {
|
|
|
399
398
|
return "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
400
399
|
}
|
|
401
400
|
}
|
|
402
|
-
let
|
|
401
|
+
let F = class extends Y {
|
|
403
402
|
constructor() {
|
|
404
403
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
405
404
|
}
|
|
406
405
|
static get code() {
|
|
407
406
|
return "ERR_JOSE_NOT_SUPPORTED";
|
|
408
407
|
}
|
|
409
|
-
}
|
|
408
|
+
};
|
|
409
|
+
class R extends Y {
|
|
410
410
|
constructor() {
|
|
411
411
|
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
412
412
|
}
|
|
413
413
|
static get code() {
|
|
414
414
|
return "ERR_JWS_INVALID";
|
|
415
415
|
}
|
|
416
|
-
}
|
|
416
|
+
}
|
|
417
|
+
let G = class extends Y {
|
|
417
418
|
constructor() {
|
|
418
419
|
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
419
420
|
}
|
|
@@ -421,7 +422,7 @@ let B = class extends W {
|
|
|
421
422
|
return "ERR_JWT_INVALID";
|
|
422
423
|
}
|
|
423
424
|
};
|
|
424
|
-
class
|
|
425
|
+
class Rr extends Y {
|
|
425
426
|
constructor() {
|
|
426
427
|
super(...arguments), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED", this.message = "signature verification failed";
|
|
427
428
|
}
|
|
@@ -429,16 +430,16 @@ class pr extends W {
|
|
|
429
430
|
return "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
430
431
|
}
|
|
431
432
|
}
|
|
432
|
-
function
|
|
433
|
+
function K(e, t = "algorithm.name") {
|
|
433
434
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
434
435
|
}
|
|
435
|
-
function
|
|
436
|
+
function me(e, t) {
|
|
436
437
|
return e.name === t;
|
|
437
438
|
}
|
|
438
|
-
function
|
|
439
|
+
function He(e) {
|
|
439
440
|
return parseInt(e.name.slice(4), 10);
|
|
440
441
|
}
|
|
441
|
-
function
|
|
442
|
+
function Nr(e) {
|
|
442
443
|
switch (e) {
|
|
443
444
|
case "ES256":
|
|
444
445
|
return "P-256";
|
|
@@ -450,92 +451,92 @@ function gr(e) {
|
|
|
450
451
|
throw new Error("unreachable");
|
|
451
452
|
}
|
|
452
453
|
}
|
|
453
|
-
function
|
|
454
|
+
function Cr(e, t) {
|
|
454
455
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
455
456
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
456
457
|
if (t.length > 2) {
|
|
457
|
-
const
|
|
458
|
-
r += `one of ${t.join(", ")}, or ${
|
|
458
|
+
const n = t.pop();
|
|
459
|
+
r += `one of ${t.join(", ")}, or ${n}.`;
|
|
459
460
|
} else t.length === 2 ? r += `one of ${t[0]} or ${t[1]}.` : r += `${t[0]}.`;
|
|
460
461
|
throw new TypeError(r);
|
|
461
462
|
}
|
|
462
463
|
}
|
|
463
|
-
function
|
|
464
|
+
function xr(e, t, ...r) {
|
|
464
465
|
switch (t) {
|
|
465
466
|
case "HS256":
|
|
466
467
|
case "HS384":
|
|
467
468
|
case "HS512": {
|
|
468
|
-
if (!
|
|
469
|
-
throw
|
|
470
|
-
const
|
|
471
|
-
if (
|
|
472
|
-
throw
|
|
469
|
+
if (!me(e.algorithm, "HMAC"))
|
|
470
|
+
throw K("HMAC");
|
|
471
|
+
const n = parseInt(t.slice(2), 10);
|
|
472
|
+
if (He(e.algorithm.hash) !== n)
|
|
473
|
+
throw K(`SHA-${n}`, "algorithm.hash");
|
|
473
474
|
break;
|
|
474
475
|
}
|
|
475
476
|
case "RS256":
|
|
476
477
|
case "RS384":
|
|
477
478
|
case "RS512": {
|
|
478
|
-
if (!
|
|
479
|
-
throw
|
|
480
|
-
const
|
|
481
|
-
if (
|
|
482
|
-
throw
|
|
479
|
+
if (!me(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
480
|
+
throw K("RSASSA-PKCS1-v1_5");
|
|
481
|
+
const n = parseInt(t.slice(2), 10);
|
|
482
|
+
if (He(e.algorithm.hash) !== n)
|
|
483
|
+
throw K(`SHA-${n}`, "algorithm.hash");
|
|
483
484
|
break;
|
|
484
485
|
}
|
|
485
486
|
case "PS256":
|
|
486
487
|
case "PS384":
|
|
487
488
|
case "PS512": {
|
|
488
|
-
if (!
|
|
489
|
-
throw
|
|
490
|
-
const
|
|
491
|
-
if (
|
|
492
|
-
throw
|
|
489
|
+
if (!me(e.algorithm, "RSA-PSS"))
|
|
490
|
+
throw K("RSA-PSS");
|
|
491
|
+
const n = parseInt(t.slice(2), 10);
|
|
492
|
+
if (He(e.algorithm.hash) !== n)
|
|
493
|
+
throw K(`SHA-${n}`, "algorithm.hash");
|
|
493
494
|
break;
|
|
494
495
|
}
|
|
495
496
|
case "EdDSA": {
|
|
496
497
|
if (e.algorithm.name !== "Ed25519" && e.algorithm.name !== "Ed448")
|
|
497
|
-
throw
|
|
498
|
+
throw K("Ed25519 or Ed448");
|
|
498
499
|
break;
|
|
499
500
|
}
|
|
500
501
|
case "ES256":
|
|
501
502
|
case "ES384":
|
|
502
503
|
case "ES512": {
|
|
503
|
-
if (!
|
|
504
|
-
throw
|
|
505
|
-
const
|
|
506
|
-
if (e.algorithm.namedCurve !==
|
|
507
|
-
throw
|
|
504
|
+
if (!me(e.algorithm, "ECDSA"))
|
|
505
|
+
throw K("ECDSA");
|
|
506
|
+
const n = Nr(t);
|
|
507
|
+
if (e.algorithm.namedCurve !== n)
|
|
508
|
+
throw K(n, "algorithm.namedCurve");
|
|
508
509
|
break;
|
|
509
510
|
}
|
|
510
511
|
default:
|
|
511
512
|
throw new TypeError("CryptoKey does not support this operation");
|
|
512
513
|
}
|
|
513
|
-
|
|
514
|
+
Cr(e, r);
|
|
514
515
|
}
|
|
515
|
-
function
|
|
516
|
-
var
|
|
516
|
+
function xt(e, t, ...r) {
|
|
517
|
+
var n;
|
|
517
518
|
if (r.length > 2) {
|
|
518
|
-
const
|
|
519
|
-
e += `one of type ${r.join(", ")}, or ${
|
|
519
|
+
const a = r.pop();
|
|
520
|
+
e += `one of type ${r.join(", ")}, or ${a}.`;
|
|
520
521
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
521
|
-
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (
|
|
522
|
+
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (n = t.constructor) != null && n.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
522
523
|
}
|
|
523
|
-
const
|
|
524
|
-
function
|
|
525
|
-
return
|
|
524
|
+
const nt = (e, ...t) => xt("Key must be ", e, ...t);
|
|
525
|
+
function Ot(e, t, ...r) {
|
|
526
|
+
return xt(`Key for the ${e} algorithm must be `, t, ...r);
|
|
526
527
|
}
|
|
527
|
-
const
|
|
528
|
+
const Pt = (e) => Ct(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ie = ["CryptoKey"], Or = (...e) => {
|
|
528
529
|
const t = e.filter(Boolean);
|
|
529
530
|
if (t.length === 0 || t.length === 1)
|
|
530
531
|
return !0;
|
|
531
532
|
let r;
|
|
532
|
-
for (const
|
|
533
|
-
const
|
|
533
|
+
for (const n of t) {
|
|
534
|
+
const a = Object.keys(n);
|
|
534
535
|
if (!r || r.size === 0) {
|
|
535
|
-
r = new Set(
|
|
536
|
+
r = new Set(a);
|
|
536
537
|
continue;
|
|
537
538
|
}
|
|
538
|
-
for (const o of
|
|
539
|
+
for (const o of a) {
|
|
539
540
|
if (r.has(o))
|
|
540
541
|
return !1;
|
|
541
542
|
r.add(o);
|
|
@@ -543,11 +544,11 @@ const _t = (e) => vt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
543
544
|
}
|
|
544
545
|
return !0;
|
|
545
546
|
};
|
|
546
|
-
function
|
|
547
|
+
function Pr(e) {
|
|
547
548
|
return typeof e == "object" && e !== null;
|
|
548
549
|
}
|
|
549
|
-
function
|
|
550
|
-
if (!
|
|
550
|
+
function Ae(e) {
|
|
551
|
+
if (!Pr(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
551
552
|
return !1;
|
|
552
553
|
if (Object.getPrototypeOf(e) === null)
|
|
553
554
|
return !0;
|
|
@@ -556,14 +557,14 @@ function Ge(e) {
|
|
|
556
557
|
t = Object.getPrototypeOf(t);
|
|
557
558
|
return Object.getPrototypeOf(e) === t;
|
|
558
559
|
}
|
|
559
|
-
const
|
|
560
|
+
const Dr = (e, t) => {
|
|
560
561
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
561
562
|
const { modulusLength: r } = t.algorithm;
|
|
562
563
|
if (typeof r != "number" || r < 2048)
|
|
563
564
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
564
565
|
}
|
|
565
566
|
};
|
|
566
|
-
function
|
|
567
|
+
function $r(e) {
|
|
567
568
|
let t, r;
|
|
568
569
|
switch (e.kty) {
|
|
569
570
|
case "RSA": {
|
|
@@ -588,7 +589,7 @@ function Tr(e) {
|
|
|
588
589
|
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
589
590
|
break;
|
|
590
591
|
default:
|
|
591
|
-
throw new
|
|
592
|
+
throw new F('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
592
593
|
}
|
|
593
594
|
break;
|
|
594
595
|
}
|
|
@@ -610,7 +611,7 @@ function Tr(e) {
|
|
|
610
611
|
t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
611
612
|
break;
|
|
612
613
|
default:
|
|
613
|
-
throw new
|
|
614
|
+
throw new F('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
614
615
|
}
|
|
615
616
|
break;
|
|
616
617
|
}
|
|
@@ -626,83 +627,83 @@ function Tr(e) {
|
|
|
626
627
|
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
627
628
|
break;
|
|
628
629
|
default:
|
|
629
|
-
throw new
|
|
630
|
+
throw new F('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
630
631
|
}
|
|
631
632
|
break;
|
|
632
633
|
}
|
|
633
634
|
default:
|
|
634
|
-
throw new
|
|
635
|
+
throw new F('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
635
636
|
}
|
|
636
637
|
return { algorithm: t, keyUsages: r };
|
|
637
638
|
}
|
|
638
|
-
const
|
|
639
|
+
const Mr = async (e) => {
|
|
639
640
|
if (!e.alg)
|
|
640
641
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
641
|
-
const { algorithm: t, keyUsages: r } =
|
|
642
|
+
const { algorithm: t, keyUsages: r } = $r(e), n = [
|
|
642
643
|
t,
|
|
643
644
|
e.ext ?? !1,
|
|
644
645
|
e.key_ops ?? r
|
|
645
|
-
],
|
|
646
|
-
return delete
|
|
647
|
-
},
|
|
648
|
-
let
|
|
649
|
-
const
|
|
650
|
-
let
|
|
651
|
-
if (
|
|
652
|
-
return n
|
|
653
|
-
const o = await
|
|
654
|
-
return
|
|
655
|
-
},
|
|
656
|
-
if (
|
|
646
|
+
], a = { ...e };
|
|
647
|
+
return delete a.alg, delete a.use, Ne.subtle.importKey("jwk", a, ...n);
|
|
648
|
+
}, Dt = (e) => ie(e);
|
|
649
|
+
let Ke, Ge;
|
|
650
|
+
const $t = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Mt = async (e, t, r, n) => {
|
|
651
|
+
let a = e.get(t);
|
|
652
|
+
if (a != null && a[n])
|
|
653
|
+
return a[n];
|
|
654
|
+
const o = await Mr({ ...r, alg: n });
|
|
655
|
+
return a ? a[n] = o : e.set(t, { [n]: o }), o;
|
|
656
|
+
}, Lr = (e, t) => {
|
|
657
|
+
if ($t(e)) {
|
|
657
658
|
let r = e.export({ format: "jwk" });
|
|
658
|
-
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ?
|
|
659
|
+
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Dt(r.k) : (Ge || (Ge = /* @__PURE__ */ new WeakMap()), Mt(Ge, e, r, t));
|
|
659
660
|
}
|
|
660
661
|
return e;
|
|
661
|
-
},
|
|
662
|
-
if (
|
|
662
|
+
}, Ur = (e, t) => {
|
|
663
|
+
if ($t(e)) {
|
|
663
664
|
let r = e.export({ format: "jwk" });
|
|
664
|
-
return r.k ?
|
|
665
|
+
return r.k ? Dt(r.k) : (Ke || (Ke = /* @__PURE__ */ new WeakMap()), Mt(Ke, e, r, t));
|
|
665
666
|
}
|
|
666
667
|
return e;
|
|
667
|
-
},
|
|
668
|
+
}, Hr = { normalizePublicKey: Lr, normalizePrivateKey: Ur }, V = (e, t, r = 0) => {
|
|
668
669
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
669
|
-
const
|
|
670
|
-
if (
|
|
670
|
+
const n = e.indexOf(t[0], r);
|
|
671
|
+
if (n === -1)
|
|
671
672
|
return !1;
|
|
672
|
-
const
|
|
673
|
-
return
|
|
674
|
-
},
|
|
673
|
+
const a = e.subarray(n, n + t.length);
|
|
674
|
+
return a.length !== t.length ? !1 : a.every((o, s) => o === t[s]) || V(e, t, n + 1);
|
|
675
|
+
}, at = (e) => {
|
|
675
676
|
switch (!0) {
|
|
676
|
-
case
|
|
677
|
+
case V(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
|
677
678
|
return "P-256";
|
|
678
|
-
case
|
|
679
|
+
case V(e, [43, 129, 4, 0, 34]):
|
|
679
680
|
return "P-384";
|
|
680
|
-
case
|
|
681
|
+
case V(e, [43, 129, 4, 0, 35]):
|
|
681
682
|
return "P-521";
|
|
682
|
-
case
|
|
683
|
+
case V(e, [43, 101, 110]):
|
|
683
684
|
return "X25519";
|
|
684
|
-
case
|
|
685
|
+
case V(e, [43, 101, 111]):
|
|
685
686
|
return "X448";
|
|
686
|
-
case
|
|
687
|
+
case V(e, [43, 101, 112]):
|
|
687
688
|
return "Ed25519";
|
|
688
|
-
case
|
|
689
|
+
case V(e, [43, 101, 113]):
|
|
689
690
|
return "Ed448";
|
|
690
691
|
default:
|
|
691
|
-
throw new
|
|
692
|
+
throw new F("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
692
693
|
}
|
|
693
|
-
},
|
|
694
|
+
}, Kr = async (e, t, r, n, a) => {
|
|
694
695
|
let o, s;
|
|
695
|
-
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((
|
|
696
|
-
switch (
|
|
696
|
+
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((m) => m.charCodeAt(0)));
|
|
697
|
+
switch (n) {
|
|
697
698
|
case "PS256":
|
|
698
699
|
case "PS384":
|
|
699
700
|
case "PS512":
|
|
700
|
-
o = { name: "RSA-PSS", hash: `SHA-${
|
|
701
|
+
o = { name: "RSA-PSS", hash: `SHA-${n.slice(-3)}` }, s = ["verify"];
|
|
701
702
|
break;
|
|
702
703
|
case "RS256":
|
|
703
704
|
case "RS384":
|
|
704
705
|
case "RS512":
|
|
705
|
-
o = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${
|
|
706
|
+
o = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${n.slice(-3)}` }, s = ["verify"];
|
|
706
707
|
break;
|
|
707
708
|
case "RSA-OAEP":
|
|
708
709
|
case "RSA-OAEP-256":
|
|
@@ -710,7 +711,7 @@ const Nt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
710
711
|
case "RSA-OAEP-512":
|
|
711
712
|
o = {
|
|
712
713
|
name: "RSA-OAEP",
|
|
713
|
-
hash: `SHA-${parseInt(
|
|
714
|
+
hash: `SHA-${parseInt(n.slice(-3), 10) || 1}`
|
|
714
715
|
}, s = ["encrypt", "wrapKey"];
|
|
715
716
|
break;
|
|
716
717
|
case "ES256":
|
|
@@ -726,68 +727,68 @@ const Nt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
726
727
|
case "ECDH-ES+A128KW":
|
|
727
728
|
case "ECDH-ES+A192KW":
|
|
728
729
|
case "ECDH-ES+A256KW": {
|
|
729
|
-
const
|
|
730
|
-
o =
|
|
730
|
+
const m = at(i);
|
|
731
|
+
o = m.startsWith("P-") ? { name: "ECDH", namedCurve: m } : { name: m }, s = [];
|
|
731
732
|
break;
|
|
732
733
|
}
|
|
733
734
|
case "EdDSA":
|
|
734
|
-
o = { name:
|
|
735
|
+
o = { name: at(i) }, s = ["verify"];
|
|
735
736
|
break;
|
|
736
737
|
default:
|
|
737
|
-
throw new
|
|
738
|
+
throw new F('Invalid or unsupported "alg" (Algorithm) value');
|
|
738
739
|
}
|
|
739
|
-
return
|
|
740
|
-
},
|
|
741
|
-
async function
|
|
740
|
+
return Ne.subtle.importKey(t, i, o, !1, s);
|
|
741
|
+
}, Gr = (e, t, r) => Kr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
742
|
+
async function Br(e, t, r) {
|
|
742
743
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
743
744
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
744
|
-
return
|
|
745
|
+
return Gr(e, t);
|
|
745
746
|
}
|
|
746
|
-
const
|
|
747
|
+
const ve = (e) => e == null ? void 0 : e[Symbol.toStringTag], Wr = (e, t) => {
|
|
747
748
|
if (!(t instanceof Uint8Array)) {
|
|
748
|
-
if (!
|
|
749
|
-
throw new TypeError(
|
|
749
|
+
if (!Pt(t))
|
|
750
|
+
throw new TypeError(Ot(e, t, ...Ie, "Uint8Array"));
|
|
750
751
|
if (t.type !== "secret")
|
|
751
|
-
throw new TypeError(`${
|
|
752
|
+
throw new TypeError(`${ve(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
752
753
|
}
|
|
753
|
-
},
|
|
754
|
-
if (!
|
|
755
|
-
throw new TypeError(
|
|
754
|
+
}, Vr = (e, t, r) => {
|
|
755
|
+
if (!Pt(t))
|
|
756
|
+
throw new TypeError(Ot(e, t, ...Ie));
|
|
756
757
|
if (t.type === "secret")
|
|
757
|
-
throw new TypeError(`${
|
|
758
|
+
throw new TypeError(`${ve(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
758
759
|
if (t.algorithm && r === "verify" && t.type === "private")
|
|
759
|
-
throw new TypeError(`${
|
|
760
|
+
throw new TypeError(`${ve(t)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
760
761
|
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
761
|
-
throw new TypeError(`${
|
|
762
|
-
},
|
|
763
|
-
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ?
|
|
762
|
+
throw new TypeError(`${ve(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
763
|
+
}, Fr = (e, t, r) => {
|
|
764
|
+
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? Wr(e, t) : Vr(e, t, r);
|
|
764
765
|
};
|
|
765
|
-
function
|
|
766
|
-
if (
|
|
766
|
+
function Jr(e, t, r, n, a) {
|
|
767
|
+
if (a.crit !== void 0 && (n == null ? void 0 : n.crit) === void 0)
|
|
767
768
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
768
|
-
if (!
|
|
769
|
+
if (!n || n.crit === void 0)
|
|
769
770
|
return /* @__PURE__ */ new Set();
|
|
770
|
-
if (!Array.isArray(
|
|
771
|
+
if (!Array.isArray(n.crit) || n.crit.length === 0 || n.crit.some((s) => typeof s != "string" || s.length === 0))
|
|
771
772
|
throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');
|
|
772
773
|
let o;
|
|
773
774
|
r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
|
|
774
|
-
for (const s of
|
|
775
|
+
for (const s of n.crit) {
|
|
775
776
|
if (!o.has(s))
|
|
776
|
-
throw new
|
|
777
|
-
if (
|
|
777
|
+
throw new F(`Extension Header Parameter "${s}" is not recognized`);
|
|
778
|
+
if (a[s] === void 0)
|
|
778
779
|
throw new e(`Extension Header Parameter "${s}" is missing`);
|
|
779
|
-
if (o.get(s) &&
|
|
780
|
+
if (o.get(s) && n[s] === void 0)
|
|
780
781
|
throw new e(`Extension Header Parameter "${s}" MUST be integrity protected`);
|
|
781
782
|
}
|
|
782
|
-
return new Set(
|
|
783
|
+
return new Set(n.crit);
|
|
783
784
|
}
|
|
784
|
-
const
|
|
785
|
+
const jr = (e, t) => {
|
|
785
786
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
786
787
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
787
788
|
if (t)
|
|
788
789
|
return new Set(t);
|
|
789
790
|
};
|
|
790
|
-
function
|
|
791
|
+
function zr(e, t) {
|
|
791
792
|
const r = `SHA-${e.slice(-3)}`;
|
|
792
793
|
switch (e) {
|
|
793
794
|
case "HS256":
|
|
@@ -809,374 +810,770 @@ function Dr(e, t) {
|
|
|
809
810
|
case "EdDSA":
|
|
810
811
|
return { name: t.name };
|
|
811
812
|
default:
|
|
812
|
-
throw new
|
|
813
|
+
throw new F(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
813
814
|
}
|
|
814
815
|
}
|
|
815
|
-
async function
|
|
816
|
-
if (t = await
|
|
817
|
-
return
|
|
816
|
+
async function Yr(e, t, r) {
|
|
817
|
+
if (t = await Hr.normalizePublicKey(t, e), Ct(t))
|
|
818
|
+
return xr(t, e, r), t;
|
|
818
819
|
if (t instanceof Uint8Array) {
|
|
819
820
|
if (!e.startsWith("HS"))
|
|
820
|
-
throw new TypeError(
|
|
821
|
-
return
|
|
821
|
+
throw new TypeError(nt(t, ...Ie));
|
|
822
|
+
return Ne.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
822
823
|
}
|
|
823
|
-
throw new TypeError(
|
|
824
|
+
throw new TypeError(nt(t, ...Ie, "Uint8Array"));
|
|
824
825
|
}
|
|
825
|
-
const
|
|
826
|
-
const
|
|
827
|
-
|
|
828
|
-
const o =
|
|
826
|
+
const qr = async (e, t, r, n) => {
|
|
827
|
+
const a = await Yr(e, t, "verify");
|
|
828
|
+
Dr(e, a);
|
|
829
|
+
const o = zr(e, a.algorithm);
|
|
829
830
|
try {
|
|
830
|
-
return await
|
|
831
|
+
return await Ne.subtle.verify(o, a, r, n);
|
|
831
832
|
} catch {
|
|
832
833
|
return !1;
|
|
833
834
|
}
|
|
834
835
|
};
|
|
835
|
-
async function
|
|
836
|
-
if (!
|
|
837
|
-
throw new
|
|
836
|
+
async function Qr(e, t, r) {
|
|
837
|
+
if (!Ae(e))
|
|
838
|
+
throw new R("Flattened JWS must be an object");
|
|
838
839
|
if (e.protected === void 0 && e.header === void 0)
|
|
839
|
-
throw new
|
|
840
|
+
throw new R('Flattened JWS must have either of the "protected" or "header" members');
|
|
840
841
|
if (e.protected !== void 0 && typeof e.protected != "string")
|
|
841
|
-
throw new
|
|
842
|
+
throw new R("JWS Protected Header incorrect type");
|
|
842
843
|
if (e.payload === void 0)
|
|
843
|
-
throw new
|
|
844
|
+
throw new R("JWS Payload missing");
|
|
844
845
|
if (typeof e.signature != "string")
|
|
845
|
-
throw new
|
|
846
|
-
if (e.header !== void 0 && !
|
|
847
|
-
throw new
|
|
848
|
-
let
|
|
846
|
+
throw new R("JWS Signature missing or incorrect type");
|
|
847
|
+
if (e.header !== void 0 && !Ae(e.header))
|
|
848
|
+
throw new R("JWS Unprotected Header incorrect type");
|
|
849
|
+
let n = {};
|
|
849
850
|
if (e.protected)
|
|
850
851
|
try {
|
|
851
|
-
const
|
|
852
|
-
|
|
852
|
+
const p = ie(e.protected);
|
|
853
|
+
n = JSON.parse(de.decode(p));
|
|
853
854
|
} catch {
|
|
854
|
-
throw new
|
|
855
|
+
throw new R("JWS Protected Header is invalid");
|
|
855
856
|
}
|
|
856
|
-
if (!
|
|
857
|
-
throw new
|
|
858
|
-
const
|
|
859
|
-
...
|
|
857
|
+
if (!Or(n, e.header))
|
|
858
|
+
throw new R("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
859
|
+
const a = {
|
|
860
|
+
...n,
|
|
860
861
|
...e.header
|
|
861
|
-
}, o =
|
|
862
|
+
}, o = Jr(R, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, n, a);
|
|
862
863
|
let s = !0;
|
|
863
|
-
if (o.has("b64") && (s =
|
|
864
|
-
throw new
|
|
865
|
-
const { alg: i } =
|
|
864
|
+
if (o.has("b64") && (s = n.b64, typeof s != "boolean"))
|
|
865
|
+
throw new R('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
866
|
+
const { alg: i } = a;
|
|
866
867
|
if (typeof i != "string" || !i)
|
|
867
|
-
throw new
|
|
868
|
-
const
|
|
869
|
-
if (
|
|
870
|
-
throw new
|
|
868
|
+
throw new R('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
869
|
+
const m = r && jr("algorithms", r.algorithms);
|
|
870
|
+
if (m && !m.has(i))
|
|
871
|
+
throw new _r('"alg" (Algorithm) Header Parameter value not allowed');
|
|
871
872
|
if (s) {
|
|
872
873
|
if (typeof e.payload != "string")
|
|
873
|
-
throw new
|
|
874
|
+
throw new R("JWS Payload must be a string");
|
|
874
875
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
875
|
-
throw new
|
|
876
|
-
let
|
|
877
|
-
typeof t == "function" && (t = await t(
|
|
878
|
-
const
|
|
879
|
-
let
|
|
876
|
+
throw new R("JWS Payload must be a string or an Uint8Array instance");
|
|
877
|
+
let d = !1;
|
|
878
|
+
typeof t == "function" && (t = await t(n, e), d = !0), Fr(i, t, "verify");
|
|
879
|
+
const h = Ar(ue.encode(e.protected ?? ""), ue.encode("."), typeof e.payload == "string" ? ue.encode(e.payload) : e.payload);
|
|
880
|
+
let g;
|
|
880
881
|
try {
|
|
881
|
-
|
|
882
|
+
g = ie(e.signature);
|
|
882
883
|
} catch {
|
|
883
|
-
throw new
|
|
884
|
+
throw new R("Failed to base64url decode the signature");
|
|
884
885
|
}
|
|
885
|
-
if (!await
|
|
886
|
-
throw new
|
|
887
|
-
let
|
|
886
|
+
if (!await qr(i, t, g, h))
|
|
887
|
+
throw new Rr();
|
|
888
|
+
let c;
|
|
888
889
|
if (s)
|
|
889
890
|
try {
|
|
890
|
-
|
|
891
|
+
c = ie(e.payload);
|
|
891
892
|
} catch {
|
|
892
|
-
throw new
|
|
893
|
+
throw new R("Failed to base64url decode the payload");
|
|
893
894
|
}
|
|
894
|
-
else typeof e.payload == "string" ?
|
|
895
|
-
const
|
|
896
|
-
return e.protected !== void 0 && (
|
|
897
|
-
}
|
|
898
|
-
async function
|
|
899
|
-
if (e instanceof Uint8Array && (e =
|
|
900
|
-
throw new
|
|
901
|
-
const { 0:
|
|
895
|
+
else typeof e.payload == "string" ? c = ue.encode(e.payload) : c = e.payload;
|
|
896
|
+
const u = { payload: c };
|
|
897
|
+
return e.protected !== void 0 && (u.protectedHeader = n), e.header !== void 0 && (u.unprotectedHeader = e.header), d ? { ...u, key: t } : u;
|
|
898
|
+
}
|
|
899
|
+
async function Xr(e, t, r) {
|
|
900
|
+
if (e instanceof Uint8Array && (e = de.decode(e)), typeof e != "string")
|
|
901
|
+
throw new R("Compact JWS must be a string or Uint8Array");
|
|
902
|
+
const { 0: n, 1: a, 2: o, length: s } = e.split(".");
|
|
902
903
|
if (s !== 3)
|
|
903
|
-
throw new
|
|
904
|
-
const i = await
|
|
905
|
-
return typeof t == "function" ? { ...
|
|
904
|
+
throw new R("Invalid Compact JWS");
|
|
905
|
+
const i = await Qr({ payload: a, protected: n, signature: o }, t, r), m = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
906
|
+
return typeof t == "function" ? { ...m, key: i.key } : m;
|
|
906
907
|
}
|
|
907
|
-
const
|
|
908
|
-
const t =
|
|
908
|
+
const Zr = (e) => Math.floor(e.getTime() / 1e3), Lt = 60, Ut = Lt * 60, qe = Ut * 24, en = qe * 7, tn = qe * 365.25, rn = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, ot = (e) => {
|
|
909
|
+
const t = rn.exec(e);
|
|
909
910
|
if (!t || t[4] && t[1])
|
|
910
911
|
throw new TypeError("Invalid time period format");
|
|
911
|
-
const r = parseFloat(t[2]),
|
|
912
|
-
let
|
|
913
|
-
switch (
|
|
912
|
+
const r = parseFloat(t[2]), n = t[3].toLowerCase();
|
|
913
|
+
let a;
|
|
914
|
+
switch (n) {
|
|
914
915
|
case "sec":
|
|
915
916
|
case "secs":
|
|
916
917
|
case "second":
|
|
917
918
|
case "seconds":
|
|
918
919
|
case "s":
|
|
919
|
-
|
|
920
|
+
a = Math.round(r);
|
|
920
921
|
break;
|
|
921
922
|
case "minute":
|
|
922
923
|
case "minutes":
|
|
923
924
|
case "min":
|
|
924
925
|
case "mins":
|
|
925
926
|
case "m":
|
|
926
|
-
|
|
927
|
+
a = Math.round(r * Lt);
|
|
927
928
|
break;
|
|
928
929
|
case "hour":
|
|
929
930
|
case "hours":
|
|
930
931
|
case "hr":
|
|
931
932
|
case "hrs":
|
|
932
933
|
case "h":
|
|
933
|
-
|
|
934
|
+
a = Math.round(r * Ut);
|
|
934
935
|
break;
|
|
935
936
|
case "day":
|
|
936
937
|
case "days":
|
|
937
938
|
case "d":
|
|
938
|
-
|
|
939
|
+
a = Math.round(r * qe);
|
|
939
940
|
break;
|
|
940
941
|
case "week":
|
|
941
942
|
case "weeks":
|
|
942
943
|
case "w":
|
|
943
|
-
|
|
944
|
+
a = Math.round(r * en);
|
|
944
945
|
break;
|
|
945
946
|
default:
|
|
946
|
-
|
|
947
|
+
a = Math.round(r * tn);
|
|
947
948
|
break;
|
|
948
949
|
}
|
|
949
|
-
return t[1] === "-" || t[4] === "ago" ? -
|
|
950
|
-
},
|
|
951
|
-
let
|
|
950
|
+
return t[1] === "-" || t[4] === "ago" ? -a : a;
|
|
951
|
+
}, st = (e) => e.toLowerCase().replace(/^application\//, ""), nn = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, an = (e, t, r = {}) => {
|
|
952
|
+
let n;
|
|
952
953
|
try {
|
|
953
|
-
|
|
954
|
+
n = JSON.parse(de.decode(t));
|
|
954
955
|
} catch {
|
|
955
956
|
}
|
|
956
|
-
if (!
|
|
957
|
-
throw new
|
|
958
|
-
const { typ:
|
|
959
|
-
if (
|
|
960
|
-
throw new
|
|
961
|
-
const { requiredClaims: o = [], issuer: s, subject: i, audience:
|
|
962
|
-
|
|
963
|
-
for (const
|
|
964
|
-
if (!(
|
|
965
|
-
throw new
|
|
966
|
-
if (s && !(Array.isArray(s) ? s : [s]).includes(
|
|
967
|
-
throw new
|
|
968
|
-
if (i &&
|
|
969
|
-
throw new
|
|
970
|
-
if (
|
|
971
|
-
throw new
|
|
972
|
-
let
|
|
957
|
+
if (!Ae(n))
|
|
958
|
+
throw new G("JWT Claims Set must be a top-level JSON object");
|
|
959
|
+
const { typ: a } = r;
|
|
960
|
+
if (a && (typeof e.typ != "string" || st(e.typ) !== st(a)))
|
|
961
|
+
throw new $('unexpected "typ" JWT header value', n, "typ", "check_failed");
|
|
962
|
+
const { requiredClaims: o = [], issuer: s, subject: i, audience: m, maxTokenAge: d } = r, h = [...o];
|
|
963
|
+
d !== void 0 && h.push("iat"), m !== void 0 && h.push("aud"), i !== void 0 && h.push("sub"), s !== void 0 && h.push("iss");
|
|
964
|
+
for (const p of new Set(h.reverse()))
|
|
965
|
+
if (!(p in n))
|
|
966
|
+
throw new $(`missing required "${p}" claim`, n, p, "missing");
|
|
967
|
+
if (s && !(Array.isArray(s) ? s : [s]).includes(n.iss))
|
|
968
|
+
throw new $('unexpected "iss" claim value', n, "iss", "check_failed");
|
|
969
|
+
if (i && n.sub !== i)
|
|
970
|
+
throw new $('unexpected "sub" claim value', n, "sub", "check_failed");
|
|
971
|
+
if (m && !nn(n.aud, typeof m == "string" ? [m] : m))
|
|
972
|
+
throw new $('unexpected "aud" claim value', n, "aud", "check_failed");
|
|
973
|
+
let g;
|
|
973
974
|
switch (typeof r.clockTolerance) {
|
|
974
975
|
case "string":
|
|
975
|
-
|
|
976
|
+
g = ot(r.clockTolerance);
|
|
976
977
|
break;
|
|
977
978
|
case "number":
|
|
978
|
-
|
|
979
|
+
g = r.clockTolerance;
|
|
979
980
|
break;
|
|
980
981
|
case "undefined":
|
|
981
|
-
|
|
982
|
+
g = 0;
|
|
982
983
|
break;
|
|
983
984
|
default:
|
|
984
985
|
throw new TypeError("Invalid clockTolerance option type");
|
|
985
986
|
}
|
|
986
|
-
const { currentDate:
|
|
987
|
-
if ((
|
|
988
|
-
throw new
|
|
989
|
-
if (
|
|
990
|
-
if (typeof
|
|
991
|
-
throw new
|
|
992
|
-
if (
|
|
993
|
-
throw new
|
|
994
|
-
}
|
|
995
|
-
if (
|
|
996
|
-
if (typeof
|
|
997
|
-
throw new
|
|
998
|
-
if (
|
|
999
|
-
throw new
|
|
1000
|
-
}
|
|
1001
|
-
if (
|
|
1002
|
-
const
|
|
1003
|
-
if (
|
|
1004
|
-
throw new
|
|
1005
|
-
if (
|
|
1006
|
-
throw new
|
|
987
|
+
const { currentDate: c } = r, u = Zr(c || /* @__PURE__ */ new Date());
|
|
988
|
+
if ((n.iat !== void 0 || d) && typeof n.iat != "number")
|
|
989
|
+
throw new $('"iat" claim must be a number', n, "iat", "invalid");
|
|
990
|
+
if (n.nbf !== void 0) {
|
|
991
|
+
if (typeof n.nbf != "number")
|
|
992
|
+
throw new $('"nbf" claim must be a number', n, "nbf", "invalid");
|
|
993
|
+
if (n.nbf > u + g)
|
|
994
|
+
throw new $('"nbf" claim timestamp check failed', n, "nbf", "check_failed");
|
|
995
|
+
}
|
|
996
|
+
if (n.exp !== void 0) {
|
|
997
|
+
if (typeof n.exp != "number")
|
|
998
|
+
throw new $('"exp" claim must be a number', n, "exp", "invalid");
|
|
999
|
+
if (n.exp <= u - g)
|
|
1000
|
+
throw new rt('"exp" claim timestamp check failed', n, "exp", "check_failed");
|
|
1001
|
+
}
|
|
1002
|
+
if (d) {
|
|
1003
|
+
const p = u - n.iat, b = typeof d == "number" ? d : ot(d);
|
|
1004
|
+
if (p - g > b)
|
|
1005
|
+
throw new rt('"iat" claim timestamp check failed (too far in the past)', n, "iat", "check_failed");
|
|
1006
|
+
if (p < 0 - g)
|
|
1007
|
+
throw new $('"iat" claim timestamp check failed (it should be in the past)', n, "iat", "check_failed");
|
|
1008
|
+
}
|
|
1009
|
+
return n;
|
|
1010
|
+
};
|
|
1011
|
+
async function on(e, t, r) {
|
|
1012
|
+
var n;
|
|
1013
|
+
const a = await Xr(e, t, r);
|
|
1014
|
+
if ((n = a.protectedHeader.crit) != null && n.includes("b64") && a.protectedHeader.b64 === !1)
|
|
1015
|
+
throw new G("JWTs MUST NOT use unencoded payload");
|
|
1016
|
+
const o = { payload: an(a.protectedHeader, a.payload, r), protectedHeader: a.protectedHeader };
|
|
1017
|
+
return typeof t == "function" ? { ...o, key: a.key } : o;
|
|
1018
|
+
}
|
|
1019
|
+
const sn = ie;
|
|
1020
|
+
function cn(e) {
|
|
1021
|
+
if (typeof e != "string")
|
|
1022
|
+
throw new G("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1023
|
+
const { 1: t, length: r } = e.split(".");
|
|
1024
|
+
if (r === 5)
|
|
1025
|
+
throw new G("Only JWTs using Compact JWS serialization can be decoded");
|
|
1026
|
+
if (r !== 3)
|
|
1027
|
+
throw new G("Invalid JWT");
|
|
1028
|
+
if (!t)
|
|
1029
|
+
throw new G("JWTs must contain a payload");
|
|
1030
|
+
let n;
|
|
1031
|
+
try {
|
|
1032
|
+
n = sn(t);
|
|
1033
|
+
} catch {
|
|
1034
|
+
throw new G("Failed to base64url decode the payload");
|
|
1035
|
+
}
|
|
1036
|
+
let a;
|
|
1037
|
+
try {
|
|
1038
|
+
a = JSON.parse(de.decode(n));
|
|
1039
|
+
} catch {
|
|
1040
|
+
throw new G("Failed to parse the decoded payload as JSON");
|
|
1007
1041
|
}
|
|
1042
|
+
if (!Ae(a))
|
|
1043
|
+
throw new G("Invalid JWT Claims Set");
|
|
1008
1044
|
return a;
|
|
1009
|
-
}
|
|
1010
|
-
async
|
|
1011
|
-
var a;
|
|
1012
|
-
const n = await Ur(e, t, r);
|
|
1013
|
-
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
1014
|
-
throw new At("JWTs MUST NOT use unencoded payload");
|
|
1015
|
-
const o = { payload: Wr(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
|
|
1016
|
-
return typeof t == "function" ? { ...o, key: n.key } : o;
|
|
1017
|
-
}
|
|
1018
|
-
const ae = async (e) => {
|
|
1045
|
+
}
|
|
1046
|
+
const ce = async (e) => {
|
|
1019
1047
|
try {
|
|
1020
|
-
const t =
|
|
1021
|
-
return await
|
|
1022
|
-
issuer:
|
|
1048
|
+
const t = C.ALG, r = await Br(Ir, t);
|
|
1049
|
+
return await on(e, r, {
|
|
1050
|
+
issuer: C.ISSUER
|
|
1023
1051
|
});
|
|
1024
1052
|
} catch {
|
|
1025
1053
|
return;
|
|
1026
1054
|
}
|
|
1055
|
+
}, ln = (e) => {
|
|
1056
|
+
try {
|
|
1057
|
+
return cn(e);
|
|
1058
|
+
} catch {
|
|
1059
|
+
return;
|
|
1060
|
+
}
|
|
1027
1061
|
};
|
|
1028
|
-
var
|
|
1029
|
-
for (var
|
|
1030
|
-
|
|
1031
|
-
function
|
|
1032
|
-
return (
|
|
1033
|
-
}
|
|
1034
|
-
var
|
|
1035
|
-
function
|
|
1036
|
-
if (!
|
|
1062
|
+
var k = [];
|
|
1063
|
+
for (var Be = 0; Be < 256; ++Be)
|
|
1064
|
+
k.push((Be + 256).toString(16).slice(1));
|
|
1065
|
+
function dn(e, t = 0) {
|
|
1066
|
+
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();
|
|
1067
|
+
}
|
|
1068
|
+
var he, un = new Uint8Array(16);
|
|
1069
|
+
function mn() {
|
|
1070
|
+
if (!he && (he = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !he))
|
|
1037
1071
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1038
|
-
return
|
|
1072
|
+
return he(un);
|
|
1039
1073
|
}
|
|
1040
|
-
var
|
|
1041
|
-
const
|
|
1042
|
-
randomUUID:
|
|
1074
|
+
var hn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1075
|
+
const it = {
|
|
1076
|
+
randomUUID: hn
|
|
1043
1077
|
};
|
|
1044
|
-
function
|
|
1045
|
-
if (
|
|
1046
|
-
return
|
|
1078
|
+
function ct(e, t, r) {
|
|
1079
|
+
if (it.randomUUID && !t && !e)
|
|
1080
|
+
return it.randomUUID();
|
|
1047
1081
|
e = e || {};
|
|
1048
|
-
var
|
|
1049
|
-
return
|
|
1082
|
+
var n = e.random || (e.rng || mn)();
|
|
1083
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, dn(n);
|
|
1050
1084
|
}
|
|
1051
|
-
const
|
|
1085
|
+
const lt = globalThis.crypto, pn = (e) => `${ct()}${ct()}`.slice(0, e), gn = (e) => btoa(
|
|
1052
1086
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1053
1087
|
);
|
|
1054
|
-
async function
|
|
1055
|
-
if (!
|
|
1088
|
+
async function fn(e) {
|
|
1089
|
+
if (!lt.subtle)
|
|
1056
1090
|
throw new Error(
|
|
1057
1091
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1058
1092
|
);
|
|
1059
|
-
const t = new TextEncoder().encode(e), r = await
|
|
1060
|
-
return
|
|
1093
|
+
const t = new TextEncoder().encode(e), r = await lt.subtle.digest("SHA-256", t);
|
|
1094
|
+
return gn(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1061
1095
|
}
|
|
1062
|
-
async function
|
|
1063
|
-
const t =
|
|
1096
|
+
async function yn(e) {
|
|
1097
|
+
const t = pn(43), r = await fn(t);
|
|
1064
1098
|
return {
|
|
1065
1099
|
code_verifier: t,
|
|
1066
1100
|
code_challenge: r
|
|
1067
1101
|
};
|
|
1068
1102
|
}
|
|
1069
|
-
function
|
|
1103
|
+
function Ht(e, t) {
|
|
1070
1104
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
1071
1105
|
}
|
|
1072
|
-
const
|
|
1106
|
+
const dt = (e, t) => {
|
|
1073
1107
|
const r = JSON.stringify(
|
|
1074
1108
|
typeof t == "function" ? t() : t
|
|
1075
1109
|
);
|
|
1076
|
-
window.localStorage.setItem(e, r),
|
|
1077
|
-
},
|
|
1078
|
-
window.localStorage.removeItem(e),
|
|
1079
|
-
},
|
|
1080
|
-
function
|
|
1110
|
+
window.localStorage.setItem(e, r), Ht(e, r);
|
|
1111
|
+
}, bn = (e) => {
|
|
1112
|
+
window.localStorage.removeItem(e), Ht(e, null);
|
|
1113
|
+
}, ut = (e) => window.localStorage.getItem(e), wn = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
1114
|
+
function pe({
|
|
1081
1115
|
key: e,
|
|
1082
1116
|
initialValue: t
|
|
1083
1117
|
}) {
|
|
1084
|
-
const r =
|
|
1118
|
+
const r = mr(wn, () => ut(e)), n = te(
|
|
1085
1119
|
(s) => {
|
|
1086
1120
|
try {
|
|
1087
1121
|
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
1088
|
-
i == null ?
|
|
1122
|
+
i == null ? bn(e) : dt(e, i);
|
|
1089
1123
|
} catch (i) {
|
|
1090
1124
|
console.warn(i);
|
|
1091
1125
|
}
|
|
1092
1126
|
},
|
|
1093
1127
|
[e, r]
|
|
1094
|
-
),
|
|
1095
|
-
|
|
1096
|
-
}, [t,
|
|
1097
|
-
|
|
1098
|
-
}, [
|
|
1128
|
+
), a = te(() => {
|
|
1129
|
+
n(t);
|
|
1130
|
+
}, [t, n]), o = te(() => {
|
|
1131
|
+
n(null);
|
|
1132
|
+
}, [n]);
|
|
1099
1133
|
return z(() => {
|
|
1100
1134
|
try {
|
|
1101
|
-
|
|
1135
|
+
ut(e) === null && typeof t < "u" && dt(e, t);
|
|
1102
1136
|
} catch (s) {
|
|
1103
1137
|
console.warn(s);
|
|
1104
1138
|
}
|
|
1105
|
-
}, [e, t]), [r ? JSON.parse(r) : null,
|
|
1139
|
+
}, [e, t]), [r ? JSON.parse(r) : null, n, a, o];
|
|
1106
1140
|
}
|
|
1107
|
-
var
|
|
1108
|
-
for (var
|
|
1109
|
-
|
|
1110
|
-
function
|
|
1111
|
-
return (
|
|
1141
|
+
var _ = [];
|
|
1142
|
+
for (var We = 0; We < 256; ++We)
|
|
1143
|
+
_.push((We + 256).toString(16).slice(1));
|
|
1144
|
+
function En(e, t = 0) {
|
|
1145
|
+
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();
|
|
1112
1146
|
}
|
|
1113
|
-
var
|
|
1114
|
-
function
|
|
1115
|
-
if (!
|
|
1147
|
+
var ge, vn = new Uint8Array(16);
|
|
1148
|
+
function Tn() {
|
|
1149
|
+
if (!ge && (ge = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ge))
|
|
1116
1150
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1117
|
-
return
|
|
1151
|
+
return ge(vn);
|
|
1118
1152
|
}
|
|
1119
|
-
var
|
|
1120
|
-
const
|
|
1121
|
-
randomUUID:
|
|
1153
|
+
var Sn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1154
|
+
const mt = {
|
|
1155
|
+
randomUUID: Sn
|
|
1122
1156
|
};
|
|
1123
|
-
function
|
|
1124
|
-
if (
|
|
1125
|
-
return
|
|
1157
|
+
function Ve(e, t, r) {
|
|
1158
|
+
if (mt.randomUUID && !t && !e)
|
|
1159
|
+
return mt.randomUUID();
|
|
1126
1160
|
e = e || {};
|
|
1127
|
-
var
|
|
1128
|
-
return
|
|
1161
|
+
var n = e.random || (e.rng || Tn)();
|
|
1162
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, En(n);
|
|
1163
|
+
}
|
|
1164
|
+
/*!
|
|
1165
|
+
@versini/ui-fingerprint v1.0.1
|
|
1166
|
+
© 2024 gizmette.com
|
|
1167
|
+
*/
|
|
1168
|
+
try {
|
|
1169
|
+
window.__VERSINI_UI_FINGERPRINT__ || (window.__VERSINI_UI_FINGERPRINT__ = {
|
|
1170
|
+
version: "1.0.1",
|
|
1171
|
+
buildTime: "07/18/2024 09:17 AM EDT",
|
|
1172
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
1173
|
+
license: "MIT"
|
|
1174
|
+
});
|
|
1175
|
+
} catch {
|
|
1176
|
+
}
|
|
1177
|
+
const In = (e) => Array.from(e).map((t) => t.toString(16).padStart(2, "0")).join(""), Kt = async (e) => {
|
|
1178
|
+
if (e === "")
|
|
1179
|
+
return "";
|
|
1180
|
+
const t = new TextEncoder().encode(e), r = await crypto.subtle.digest("SHA-256", t);
|
|
1181
|
+
return Array.from(new Uint8Array(r)).map((n) => n.toString(16).padStart(2, "0")).join("");
|
|
1182
|
+
};
|
|
1183
|
+
function ht(e, t) {
|
|
1184
|
+
return new Promise((r) => setTimeout(r, e, t));
|
|
1185
|
+
}
|
|
1186
|
+
async function An(e, t, r = 50) {
|
|
1187
|
+
var n, a, o;
|
|
1188
|
+
const s = document;
|
|
1189
|
+
for (; !s.body; )
|
|
1190
|
+
await ht(r);
|
|
1191
|
+
const i = s.createElement("iframe");
|
|
1192
|
+
try {
|
|
1193
|
+
for (await new Promise((m, d) => {
|
|
1194
|
+
let h = !1;
|
|
1195
|
+
const g = () => {
|
|
1196
|
+
h = !0, m();
|
|
1197
|
+
}, c = (b) => {
|
|
1198
|
+
h = !0, d(b);
|
|
1199
|
+
};
|
|
1200
|
+
i.onload = g, i.onerror = c;
|
|
1201
|
+
const { style: u } = i;
|
|
1202
|
+
u.setProperty("display", "block", "important"), u.position = "absolute", u.top = "0", u.left = "0", u.visibility = "hidden", i.src = "about:blank", s.body.appendChild(i);
|
|
1203
|
+
const p = () => {
|
|
1204
|
+
var b, w;
|
|
1205
|
+
h || (((w = (b = i.contentWindow) == null ? void 0 : b.document) == null ? void 0 : w.readyState) === "complete" ? g() : setTimeout(p, 10));
|
|
1206
|
+
};
|
|
1207
|
+
p();
|
|
1208
|
+
}); !((a = (n = i.contentWindow) == null ? void 0 : n.document) != null && a.body); )
|
|
1209
|
+
await ht(r);
|
|
1210
|
+
return await e(i, i.contentWindow);
|
|
1211
|
+
} finally {
|
|
1212
|
+
(o = i.parentNode) == null || o.removeChild(i);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
const kn = {
|
|
1216
|
+
audio: {
|
|
1217
|
+
sampleHash: "",
|
|
1218
|
+
oscillator: "",
|
|
1219
|
+
maxChannels: 0,
|
|
1220
|
+
channelCountMode: ""
|
|
1221
|
+
}
|
|
1222
|
+
}, _n = async (e) => new Promise((t) => {
|
|
1223
|
+
try {
|
|
1224
|
+
const r = new window.OfflineAudioContext(1, 5e3, 44100), n = r.createBufferSource(), a = r.createOscillator();
|
|
1225
|
+
a.frequency.value = 1e3;
|
|
1226
|
+
const o = r.createDynamicsCompressor();
|
|
1227
|
+
o.threshold.value = -50, o.knee.value = 40, o.ratio.value = 12, o.attack.value = 0, o.release.value = 0.2, a.connect(o), o.connect(r.destination), a.start(), r.startRendering(), r.oncomplete = (s) => {
|
|
1228
|
+
const i = s.renderedBuffer.getChannelData(0);
|
|
1229
|
+
a.disconnect(), o.disconnect(), t({
|
|
1230
|
+
audio: {
|
|
1231
|
+
sampleHash: In(i),
|
|
1232
|
+
oscillator: a.type,
|
|
1233
|
+
maxChannels: r.destination.maxChannelCount,
|
|
1234
|
+
channelCountMode: n.channelCountMode
|
|
1235
|
+
}
|
|
1236
|
+
});
|
|
1237
|
+
};
|
|
1238
|
+
} catch {
|
|
1239
|
+
t({
|
|
1240
|
+
audio: {
|
|
1241
|
+
sampleHash: "",
|
|
1242
|
+
oscillator: "",
|
|
1243
|
+
maxChannels: 0,
|
|
1244
|
+
channelCountMode: ""
|
|
1245
|
+
}
|
|
1246
|
+
});
|
|
1247
|
+
}
|
|
1248
|
+
}), Gt = { browser: "" }, Rn = async (e) => typeof navigator > "u" ? Gt : { browser: navigator.userAgent }, Bt = {
|
|
1249
|
+
canvas: {
|
|
1250
|
+
data: ""
|
|
1251
|
+
}
|
|
1252
|
+
}, Nn = async (e) => {
|
|
1253
|
+
try {
|
|
1254
|
+
const t = Array.from(
|
|
1255
|
+
{ length: 3 },
|
|
1256
|
+
() => Cn(300, 30)
|
|
1257
|
+
), r = On(t, 300, 30);
|
|
1258
|
+
return {
|
|
1259
|
+
canvas: {
|
|
1260
|
+
data: (await Kt(r.data.toString())).toString()
|
|
1261
|
+
}
|
|
1262
|
+
};
|
|
1263
|
+
} catch {
|
|
1264
|
+
return Bt;
|
|
1265
|
+
}
|
|
1266
|
+
}, Cn = (e, t) => {
|
|
1267
|
+
const r = document.createElement("canvas"), n = r.getContext("2d");
|
|
1268
|
+
if (!n)
|
|
1269
|
+
return new ImageData(1, 1);
|
|
1270
|
+
r.width = e, r.height = t;
|
|
1271
|
+
const a = n.createLinearGradient(0, 0, r.width, r.height);
|
|
1272
|
+
a.addColorStop(0, "red"), a.addColorStop(1 / 6, "orange"), a.addColorStop(2 / 6, "yellow"), a.addColorStop(3 / 6, "green"), a.addColorStop(4 / 6, "blue"), a.addColorStop(5 / 6, "indigo"), a.addColorStop(1, "violet"), n.fillStyle = a, n.fillRect(0, 0, r.width, r.height);
|
|
1273
|
+
const o = "mmMwWLliI0O&1 - Les sanglots longs des violons de l'automne blessent mon coeur d'une langueur monotone";
|
|
1274
|
+
return n.font = "26.321px Arial", n.fillStyle = "black", n.fillText(o, -5, 15), n.fillStyle = "rgba(0, 0, 255, 0.5)", n.fillText(o, -3.3, 17.7), n.beginPath(), n.moveTo(0, 0), n.lineTo(r.width * 2 / 7, r.height), n.strokeStyle = "white", n.lineWidth = 2, n.stroke(), n.getImageData(0, 0, r.width, r.height);
|
|
1275
|
+
}, xn = (e) => {
|
|
1276
|
+
if (e.length === 0)
|
|
1277
|
+
return 0;
|
|
1278
|
+
const t = {};
|
|
1279
|
+
for (const n of e)
|
|
1280
|
+
t[n] = (t[n] || 0) + 1;
|
|
1281
|
+
let r = e[0];
|
|
1282
|
+
for (const n in t)
|
|
1283
|
+
t[n] > t[r] && (r = parseInt(n, 10));
|
|
1284
|
+
return r;
|
|
1285
|
+
}, On = (e, t, r) => {
|
|
1286
|
+
const n = [];
|
|
1287
|
+
for (let s = 0; s < e[0].data.length; s++) {
|
|
1288
|
+
const i = [];
|
|
1289
|
+
for (let m = 0; m < e.length; m++)
|
|
1290
|
+
i.push(e[m].data[s]);
|
|
1291
|
+
n.push(xn(i));
|
|
1292
|
+
}
|
|
1293
|
+
const a = n, o = new Uint8ClampedArray(a);
|
|
1294
|
+
return new ImageData(o, t, r);
|
|
1295
|
+
}, Pn = [], Dn = "mmMwWLliI0O&1", $n = "48px", q = ["monospace", "sans-serif", "serif"], pt = [
|
|
1296
|
+
"sans-serif-thin",
|
|
1297
|
+
"ARNO PRO",
|
|
1298
|
+
"Agency FB",
|
|
1299
|
+
"Arabic Typesetting",
|
|
1300
|
+
"Arial Unicode MS",
|
|
1301
|
+
"AvantGarde Bk BT",
|
|
1302
|
+
"BankGothic Md BT",
|
|
1303
|
+
"Bitstream Vera Sans Mono",
|
|
1304
|
+
"Calibri",
|
|
1305
|
+
"Century",
|
|
1306
|
+
"Century Gothic",
|
|
1307
|
+
"Clarendon",
|
|
1308
|
+
"EUROSTILE",
|
|
1309
|
+
"Franklin Gothic",
|
|
1310
|
+
"GOTHAM",
|
|
1311
|
+
"Gill Sans",
|
|
1312
|
+
"Helvetica Neue",
|
|
1313
|
+
"Letter Gothic",
|
|
1314
|
+
"Menlo",
|
|
1315
|
+
"MS Outlook",
|
|
1316
|
+
"MS Reference Specialty",
|
|
1317
|
+
"MS UI Gothic",
|
|
1318
|
+
"MT Extra",
|
|
1319
|
+
"MYRIAD PRO",
|
|
1320
|
+
"Marlett",
|
|
1321
|
+
"Microsoft Uighur",
|
|
1322
|
+
"Minion Pro",
|
|
1323
|
+
"Monotype Corsiva",
|
|
1324
|
+
"PMingLiU",
|
|
1325
|
+
"Pristina",
|
|
1326
|
+
"SCRIPTINA",
|
|
1327
|
+
"SimHei",
|
|
1328
|
+
"Small Fonts",
|
|
1329
|
+
"Staccato222 BT",
|
|
1330
|
+
"TRAJAN PRO",
|
|
1331
|
+
"Univers CE 55 Medium",
|
|
1332
|
+
"ZWAdobeF"
|
|
1333
|
+
], Mn = async (e) => An(async (t, { document: r }) => {
|
|
1334
|
+
const n = r.body;
|
|
1335
|
+
n.style.fontSize = $n;
|
|
1336
|
+
const a = r.createElement("div");
|
|
1337
|
+
a.style.setProperty("visibility", "hidden", "important");
|
|
1338
|
+
const o = {}, s = {}, i = (p) => {
|
|
1339
|
+
const b = r.createElement("span"), { style: w } = b;
|
|
1340
|
+
return w.position = "absolute", w.top = "0", w.left = "0", w.fontFamily = p, b.textContent = Dn, a.appendChild(b), b;
|
|
1341
|
+
}, m = (p, b) => i(`'${p}',${b}`), d = () => q.map(i), h = () => {
|
|
1342
|
+
const p = {};
|
|
1343
|
+
for (const b of pt)
|
|
1344
|
+
p[b] = q.map(
|
|
1345
|
+
(w) => m(b, w)
|
|
1346
|
+
);
|
|
1347
|
+
return p;
|
|
1348
|
+
}, g = (p) => q.some(
|
|
1349
|
+
(b, w) => p[w].offsetWidth !== o[b] || p[w].offsetHeight !== s[b]
|
|
1350
|
+
), c = d(), u = h();
|
|
1351
|
+
n.appendChild(a);
|
|
1352
|
+
for (let p = 0; p < q.length; p++)
|
|
1353
|
+
o[q[p]] = c[p].offsetWidth, s[q[p]] = c[p].offsetHeight;
|
|
1354
|
+
return pt.filter((p) => g(u[p]));
|
|
1355
|
+
}), Wt = {
|
|
1356
|
+
vendor: "",
|
|
1357
|
+
vendorUnmasked: "",
|
|
1358
|
+
renderer: "",
|
|
1359
|
+
rendererUnmasked: "",
|
|
1360
|
+
version: "",
|
|
1361
|
+
shadingLanguageVersion: ""
|
|
1362
|
+
}, Vt = {
|
|
1363
|
+
hardware: {
|
|
1364
|
+
videocard: Wt,
|
|
1365
|
+
architecture: 0,
|
|
1366
|
+
deviceMemory: "undefined",
|
|
1367
|
+
jsHeapSizeLimit: 0
|
|
1368
|
+
}
|
|
1369
|
+
};
|
|
1370
|
+
function Ln() {
|
|
1371
|
+
const e = document.createElement("canvas"), t = e.getContext("webgl") ?? e.getContext("experimental-webgl");
|
|
1372
|
+
if (t && "getParameter" in t) {
|
|
1373
|
+
const r = t.getExtension("WEBGL_debug_renderer_info");
|
|
1374
|
+
return {
|
|
1375
|
+
vendor: (t.getParameter(t.VENDOR) || "").toString(),
|
|
1376
|
+
vendorUnmasked: r ? (t.getParameter(r.UNMASKED_VENDOR_WEBGL) || "").toString() : "",
|
|
1377
|
+
renderer: (t.getParameter(t.RENDERER) || "").toString(),
|
|
1378
|
+
rendererUnmasked: r ? (t.getParameter(r.UNMASKED_RENDERER_WEBGL) || "").toString() : "",
|
|
1379
|
+
version: (t.getParameter(t.VERSION) || "").toString(),
|
|
1380
|
+
shadingLanguageVersion: (t.getParameter(t.SHADING_LANGUAGE_VERSION) || "").toString()
|
|
1381
|
+
};
|
|
1382
|
+
}
|
|
1383
|
+
return Wt;
|
|
1384
|
+
}
|
|
1385
|
+
function Un() {
|
|
1386
|
+
const e = new Float32Array(1), t = new Uint8Array(e.buffer);
|
|
1387
|
+
return e[0] = 1 / 0, e[0] = e[0] - e[0], t[3];
|
|
1129
1388
|
}
|
|
1130
|
-
const
|
|
1389
|
+
const Hn = () => navigator.deviceMemory || 0, Kn = () => window.performance && window.performance.memory || {
|
|
1390
|
+
jsHeapSizeLimit: 0
|
|
1391
|
+
}, Gn = async (e) => new Promise((t) => {
|
|
1392
|
+
try {
|
|
1393
|
+
const r = Hn(), n = Kn();
|
|
1394
|
+
t({
|
|
1395
|
+
hardware: {
|
|
1396
|
+
videocard: Ln(),
|
|
1397
|
+
architecture: Un(),
|
|
1398
|
+
deviceMemory: r.toString() || "undefined",
|
|
1399
|
+
jsHeapSizeLimit: n.jsHeapSizeLimit || 0
|
|
1400
|
+
}
|
|
1401
|
+
});
|
|
1402
|
+
} catch {
|
|
1403
|
+
t(Vt);
|
|
1404
|
+
}
|
|
1405
|
+
}), Bn = {
|
|
1406
|
+
locales: {
|
|
1407
|
+
languages: "",
|
|
1408
|
+
timezone: ""
|
|
1409
|
+
}
|
|
1410
|
+
}, Wn = async (e) => new Promise((t) => {
|
|
1411
|
+
t({
|
|
1412
|
+
locales: {
|
|
1413
|
+
languages: navigator.language,
|
|
1414
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
1415
|
+
}
|
|
1416
|
+
});
|
|
1417
|
+
}), Ft = {
|
|
1418
|
+
screen: {
|
|
1419
|
+
colorDepth: 0,
|
|
1420
|
+
pixelDepth: 0,
|
|
1421
|
+
isTouchScreen: !1,
|
|
1422
|
+
maxTouchPoints: 0,
|
|
1423
|
+
mediaMatches: []
|
|
1424
|
+
}
|
|
1425
|
+
}, Vn = async (e) => new Promise((t) => {
|
|
1426
|
+
try {
|
|
1427
|
+
const r = window.screen, n = {
|
|
1428
|
+
screen: {
|
|
1429
|
+
colorDepth: r.colorDepth,
|
|
1430
|
+
pixelDepth: r.pixelDepth,
|
|
1431
|
+
isTouchScreen: navigator.maxTouchPoints > 0,
|
|
1432
|
+
maxTouchPoints: navigator.maxTouchPoints,
|
|
1433
|
+
mediaMatches: Fn()
|
|
1434
|
+
}
|
|
1435
|
+
};
|
|
1436
|
+
t(n);
|
|
1437
|
+
} catch {
|
|
1438
|
+
t(Ft);
|
|
1439
|
+
}
|
|
1440
|
+
});
|
|
1441
|
+
function Fn() {
|
|
1442
|
+
const e = [], t = {
|
|
1443
|
+
"prefers-contrast": [
|
|
1444
|
+
"high",
|
|
1445
|
+
"more",
|
|
1446
|
+
"low",
|
|
1447
|
+
"less",
|
|
1448
|
+
"forced",
|
|
1449
|
+
"no-preference"
|
|
1450
|
+
],
|
|
1451
|
+
"any-hover": ["hover", "none"],
|
|
1452
|
+
"any-pointer": ["none", "coarse", "fine"],
|
|
1453
|
+
pointer: ["none", "coarse", "fine"],
|
|
1454
|
+
hover: ["hover", "none"],
|
|
1455
|
+
update: ["fast", "slow"],
|
|
1456
|
+
"inverted-colors": ["inverted", "none"],
|
|
1457
|
+
"prefers-reduced-motion": ["reduce", "no-preference"],
|
|
1458
|
+
"prefers-reduced-transparency": ["reduce", "no-preference"],
|
|
1459
|
+
scripting: ["none", "initial-only", "enabled"],
|
|
1460
|
+
"forced-colors": ["active", "none"],
|
|
1461
|
+
"color-gamut": ["srgb", "p3", "rec2020"]
|
|
1462
|
+
};
|
|
1463
|
+
return Object.keys(t).forEach((r) => {
|
|
1464
|
+
t[r].forEach((n) => {
|
|
1465
|
+
matchMedia(`(${r}: ${n})`).matches && e.push(`${r}: ${n}`);
|
|
1466
|
+
});
|
|
1467
|
+
}), e;
|
|
1468
|
+
}
|
|
1469
|
+
const Jn = async (e) => {
|
|
1470
|
+
try {
|
|
1471
|
+
return {
|
|
1472
|
+
system: {
|
|
1473
|
+
platform: navigator.platform,
|
|
1474
|
+
cookieEnabled: navigator.cookieEnabled,
|
|
1475
|
+
productSub: navigator.productSub,
|
|
1476
|
+
product: navigator.product
|
|
1477
|
+
}
|
|
1478
|
+
};
|
|
1479
|
+
} catch {
|
|
1480
|
+
return Jt;
|
|
1481
|
+
}
|
|
1482
|
+
}, Jt = {
|
|
1483
|
+
system: {
|
|
1484
|
+
platform: "",
|
|
1485
|
+
cookieEnabled: !1,
|
|
1486
|
+
productSub: "",
|
|
1487
|
+
product: ""
|
|
1488
|
+
}
|
|
1489
|
+
}, jn = async (e) => {
|
|
1490
|
+
try {
|
|
1491
|
+
return Promise.all([
|
|
1492
|
+
_n(),
|
|
1493
|
+
Rn(),
|
|
1494
|
+
Nn(),
|
|
1495
|
+
Mn(),
|
|
1496
|
+
Gn(),
|
|
1497
|
+
Wn(),
|
|
1498
|
+
Vn(),
|
|
1499
|
+
Jn()
|
|
1500
|
+
]);
|
|
1501
|
+
} catch {
|
|
1502
|
+
return [
|
|
1503
|
+
kn,
|
|
1504
|
+
Gt,
|
|
1505
|
+
Bt,
|
|
1506
|
+
Pn,
|
|
1507
|
+
Vt,
|
|
1508
|
+
Bn,
|
|
1509
|
+
Ft,
|
|
1510
|
+
Jt
|
|
1511
|
+
];
|
|
1512
|
+
}
|
|
1513
|
+
}, zn = async (e) => {
|
|
1514
|
+
try {
|
|
1515
|
+
const t = await jn();
|
|
1516
|
+
return await Kt(JSON.stringify(t));
|
|
1517
|
+
} catch {
|
|
1518
|
+
return "";
|
|
1519
|
+
}
|
|
1520
|
+
}, fe = "Oops! It looks like your session has expired. For your security, please log in again to continue.", Yn = "Your session has been successfully terminated.", ye = "Login failed. Please try again.", Fe = "Error getting access token, please re-authenticate.", qn = "You forgot to wrap your component in <AuthProvider>.", ke = {
|
|
1131
1521
|
dev: "https://auth.gizmette.local.com:3003",
|
|
1132
1522
|
prod: "https://mylogin.gizmette.com/auth"
|
|
1133
|
-
},
|
|
1523
|
+
}, be = "@@auth@@", oe = "LOADING", se = "LOGIN", jt = "LOGOUT", Qn = process.env.NODE_ENV === "production", zt = !Qn, Xn = (e) => {
|
|
1524
|
+
try {
|
|
1525
|
+
const t = ln(e);
|
|
1526
|
+
return t ? t[C.USER_ID_KEY] : "";
|
|
1527
|
+
} catch {
|
|
1528
|
+
return "";
|
|
1529
|
+
}
|
|
1530
|
+
}, Ce = async ({
|
|
1134
1531
|
type: e,
|
|
1135
1532
|
clientId: t,
|
|
1136
1533
|
params: r = {}
|
|
1137
1534
|
}) => {
|
|
1138
1535
|
try {
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1536
|
+
const n = await fetch(
|
|
1537
|
+
zt ? `${ke.dev}/${e}` : `${ke.prod}/${e}`,
|
|
1141
1538
|
{
|
|
1142
1539
|
credentials: "include",
|
|
1143
1540
|
method: "POST",
|
|
1144
1541
|
headers: {
|
|
1145
1542
|
"Content-Type": "application/json",
|
|
1146
|
-
[
|
|
1543
|
+
[Nt.CLIENT_ID]: `${t}`
|
|
1147
1544
|
},
|
|
1148
1545
|
body: JSON.stringify(r)
|
|
1149
1546
|
}
|
|
1150
1547
|
);
|
|
1151
|
-
if (
|
|
1152
|
-
return { status:
|
|
1153
|
-
const { data:
|
|
1548
|
+
if (n.status !== 200)
|
|
1549
|
+
return { status: n.status, data: [] };
|
|
1550
|
+
const { data: a, errors: o } = await n.json();
|
|
1154
1551
|
return {
|
|
1155
|
-
status:
|
|
1156
|
-
data:
|
|
1552
|
+
status: n.status,
|
|
1553
|
+
data: a,
|
|
1157
1554
|
errors: o
|
|
1158
1555
|
};
|
|
1159
|
-
} catch (
|
|
1160
|
-
return console.error(
|
|
1556
|
+
} catch (n) {
|
|
1557
|
+
return console.error(n), { status: 500, data: [] };
|
|
1161
1558
|
}
|
|
1162
|
-
},
|
|
1559
|
+
}, Zn = async ({
|
|
1163
1560
|
userId: e,
|
|
1164
1561
|
idToken: t,
|
|
1165
1562
|
accessToken: r,
|
|
1166
|
-
refreshToken:
|
|
1167
|
-
clientId:
|
|
1563
|
+
refreshToken: n,
|
|
1564
|
+
clientId: a,
|
|
1168
1565
|
domain: o
|
|
1169
1566
|
}) => {
|
|
1170
1567
|
try {
|
|
1171
1568
|
return {
|
|
1172
|
-
status: (await
|
|
1173
|
-
type:
|
|
1174
|
-
clientId:
|
|
1569
|
+
status: (await Ce({
|
|
1570
|
+
type: Re.LOGOUT,
|
|
1571
|
+
clientId: a,
|
|
1175
1572
|
params: {
|
|
1176
1573
|
userId: e,
|
|
1177
1574
|
idToken: t,
|
|
1178
1575
|
accessToken: r,
|
|
1179
|
-
refreshToken:
|
|
1576
|
+
refreshToken: n,
|
|
1180
1577
|
domain: o
|
|
1181
1578
|
}
|
|
1182
1579
|
})).status === 200
|
|
@@ -1186,37 +1583,39 @@ const de = "Oops! It looks like your session has expired. For your security, ple
|
|
|
1186
1583
|
status: !1
|
|
1187
1584
|
};
|
|
1188
1585
|
}
|
|
1189
|
-
},
|
|
1586
|
+
}, gt = async ({
|
|
1190
1587
|
username: e,
|
|
1191
1588
|
password: t,
|
|
1192
1589
|
clientId: r,
|
|
1193
|
-
nonce:
|
|
1194
|
-
type:
|
|
1590
|
+
nonce: n,
|
|
1591
|
+
type: a,
|
|
1195
1592
|
sessionExpiration: o,
|
|
1196
1593
|
code: s,
|
|
1197
1594
|
code_verifier: i,
|
|
1198
|
-
domain:
|
|
1595
|
+
domain: m,
|
|
1596
|
+
fingerprint: d
|
|
1199
1597
|
}) => {
|
|
1200
1598
|
try {
|
|
1201
|
-
const
|
|
1202
|
-
type:
|
|
1599
|
+
const h = await Ce({
|
|
1600
|
+
type: Re.AUTHENTICATE,
|
|
1203
1601
|
clientId: r,
|
|
1204
1602
|
params: {
|
|
1205
|
-
type:
|
|
1603
|
+
type: a || re.ID_AND_ACCESS_TOKEN,
|
|
1206
1604
|
username: e,
|
|
1207
1605
|
password: t,
|
|
1208
1606
|
sessionExpiration: o,
|
|
1209
|
-
nonce:
|
|
1607
|
+
nonce: n,
|
|
1210
1608
|
code: s,
|
|
1211
1609
|
code_verifier: i,
|
|
1212
|
-
domain:
|
|
1610
|
+
domain: m,
|
|
1611
|
+
fingerprint: d
|
|
1213
1612
|
}
|
|
1214
|
-
}),
|
|
1215
|
-
return
|
|
1216
|
-
idToken:
|
|
1217
|
-
accessToken:
|
|
1218
|
-
refreshToken:
|
|
1219
|
-
userId:
|
|
1613
|
+
}), g = await ce(h.data.idToken);
|
|
1614
|
+
return g && g.payload[C.USER_ID_KEY] !== "" && g.payload[C.NONCE_KEY] === n ? {
|
|
1615
|
+
idToken: h.data.idToken,
|
|
1616
|
+
accessToken: h.data.accessToken,
|
|
1617
|
+
refreshToken: h.data.refreshToken,
|
|
1618
|
+
userId: g.payload[C.USER_ID_KEY],
|
|
1220
1619
|
status: !0
|
|
1221
1620
|
} : {
|
|
1222
1621
|
status: !1
|
|
@@ -1226,24 +1625,24 @@ const de = "Oops! It looks like your session has expired. For your security, ple
|
|
|
1226
1625
|
status: !1
|
|
1227
1626
|
};
|
|
1228
1627
|
}
|
|
1229
|
-
},
|
|
1628
|
+
}, ea = async ({
|
|
1230
1629
|
nonce: e,
|
|
1231
1630
|
clientId: t,
|
|
1232
1631
|
code_challenge: r
|
|
1233
1632
|
}) => {
|
|
1234
1633
|
try {
|
|
1235
|
-
const
|
|
1236
|
-
type:
|
|
1634
|
+
const n = await Ce({
|
|
1635
|
+
type: Re.CODE,
|
|
1237
1636
|
clientId: t,
|
|
1238
1637
|
params: {
|
|
1239
|
-
type:
|
|
1638
|
+
type: re.CODE,
|
|
1240
1639
|
nonce: e,
|
|
1241
1640
|
code_challenge: r
|
|
1242
1641
|
}
|
|
1243
1642
|
});
|
|
1244
|
-
return
|
|
1643
|
+
return n.data.code ? {
|
|
1245
1644
|
status: !0,
|
|
1246
|
-
code:
|
|
1645
|
+
code: n.data.code
|
|
1247
1646
|
} : {
|
|
1248
1647
|
status: !1
|
|
1249
1648
|
};
|
|
@@ -1252,31 +1651,32 @@ const de = "Oops! It looks like your session has expired. For your security, ple
|
|
|
1252
1651
|
status: !1
|
|
1253
1652
|
};
|
|
1254
1653
|
}
|
|
1255
|
-
},
|
|
1654
|
+
}, ta = async ({
|
|
1256
1655
|
clientId: e,
|
|
1257
1656
|
userId: t,
|
|
1258
1657
|
nonce: r,
|
|
1259
|
-
refreshToken:
|
|
1260
|
-
accessToken:
|
|
1658
|
+
refreshToken: n,
|
|
1659
|
+
accessToken: a,
|
|
1261
1660
|
domain: o
|
|
1262
1661
|
}) => {
|
|
1263
1662
|
try {
|
|
1264
|
-
const s = await
|
|
1265
|
-
type:
|
|
1663
|
+
const s = await Ce({
|
|
1664
|
+
type: Re.AUTHENTICATE,
|
|
1266
1665
|
clientId: e,
|
|
1267
1666
|
params: {
|
|
1268
|
-
type:
|
|
1667
|
+
type: re.REFRESH_TOKEN,
|
|
1269
1668
|
userId: t,
|
|
1270
1669
|
nonce: r,
|
|
1271
|
-
refreshToken:
|
|
1272
|
-
accessToken:
|
|
1273
|
-
domain: o
|
|
1670
|
+
refreshToken: n,
|
|
1671
|
+
accessToken: a,
|
|
1672
|
+
domain: o,
|
|
1673
|
+
fingerprint: await Yt()
|
|
1274
1674
|
}
|
|
1275
|
-
}), i = await
|
|
1276
|
-
return i && i.payload[
|
|
1675
|
+
}), i = await ce(s.data.accessToken);
|
|
1676
|
+
return i && i.payload[C.USER_ID_KEY] !== "" && i.payload[C.NONCE_KEY] === r ? {
|
|
1277
1677
|
accessToken: s.data.accessToken,
|
|
1278
1678
|
refreshToken: s.data.refreshToken,
|
|
1279
|
-
userId: i.payload[
|
|
1679
|
+
userId: i.payload[C.USER_ID_KEY],
|
|
1280
1680
|
status: !0
|
|
1281
1681
|
} : {
|
|
1282
1682
|
status: !1
|
|
@@ -1286,7 +1686,7 @@ const de = "Oops! It looks like your session has expired. For your security, ple
|
|
|
1286
1686
|
status: !1
|
|
1287
1687
|
};
|
|
1288
1688
|
}
|
|
1289
|
-
},
|
|
1689
|
+
}, we = {
|
|
1290
1690
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1291
1691
|
$clientId: String!,
|
|
1292
1692
|
$username: String!,
|
|
@@ -1344,13 +1744,15 @@ const de = "Oops! It looks like your session has expired. For your security, ple
|
|
|
1344
1744
|
$id: String!,
|
|
1345
1745
|
$authentication: AuthenticationOptionsInput!,
|
|
1346
1746
|
$nonce: String!,
|
|
1347
|
-
$domain: String
|
|
1747
|
+
$domain: String,
|
|
1748
|
+
$fingerprint: String) {
|
|
1348
1749
|
verifyPasskeyAuthentication(
|
|
1349
1750
|
clientId: $clientId,
|
|
1350
1751
|
id: $id,
|
|
1351
1752
|
authentication: $authentication,
|
|
1352
1753
|
nonce: $nonce,
|
|
1353
|
-
domain: $domain
|
|
1754
|
+
domain: $domain,
|
|
1755
|
+
fingerprint: $fingerprint) {
|
|
1354
1756
|
status,
|
|
1355
1757
|
idToken,
|
|
1356
1758
|
accessToken,
|
|
@@ -1359,32 +1761,32 @@ const de = "Oops! It looks like your session has expired. For your security, ple
|
|
|
1359
1761
|
username,
|
|
1360
1762
|
}
|
|
1361
1763
|
}`
|
|
1362
|
-
},
|
|
1764
|
+
}, Q = {
|
|
1363
1765
|
GET_REGISTRATION_OPTIONS: {
|
|
1364
|
-
schema:
|
|
1766
|
+
schema: we.GET_REGISTRATION_OPTIONS,
|
|
1365
1767
|
method: "getPasskeyRegistrationOptions"
|
|
1366
1768
|
},
|
|
1367
1769
|
VERIFY_REGISTRATION: {
|
|
1368
|
-
schema:
|
|
1770
|
+
schema: we.VERIFY_REGISTRATION,
|
|
1369
1771
|
method: "verifyPasskeyRegistration"
|
|
1370
1772
|
},
|
|
1371
1773
|
GET_AUTHENTICATION_OPTIONS: {
|
|
1372
|
-
schema:
|
|
1774
|
+
schema: we.GET_AUTHENTICATION_OPTIONS,
|
|
1373
1775
|
method: "getPasskeyAuthenticationOptions"
|
|
1374
1776
|
},
|
|
1375
1777
|
VERIFY_AUTHENTICATION: {
|
|
1376
|
-
schema:
|
|
1778
|
+
schema: we.VERIFY_AUTHENTICATION,
|
|
1377
1779
|
method: "verifyPasskeyAuthentication"
|
|
1378
1780
|
}
|
|
1379
|
-
},
|
|
1781
|
+
}, X = async ({
|
|
1380
1782
|
accessToken: e,
|
|
1381
1783
|
type: t,
|
|
1382
1784
|
clientId: r,
|
|
1383
|
-
params:
|
|
1785
|
+
params: n = {}
|
|
1384
1786
|
}) => {
|
|
1385
1787
|
try {
|
|
1386
|
-
const
|
|
1387
|
-
|
|
1788
|
+
const a = t != null && t.data ? t.data(n) : n, o = `Bearer ${e}`, s = await fetch(
|
|
1789
|
+
zt ? `${ke.dev}/graphql` : `${ke.prod}/graphql`,
|
|
1388
1790
|
{
|
|
1389
1791
|
method: "POST",
|
|
1390
1792
|
credentials: "include",
|
|
@@ -1392,41 +1794,47 @@ const de = "Oops! It looks like your session has expired. For your security, ple
|
|
|
1392
1794
|
authorization: o,
|
|
1393
1795
|
"Content-Type": "application/json",
|
|
1394
1796
|
Accept: "application/json",
|
|
1395
|
-
[
|
|
1797
|
+
[Nt.CLIENT_ID]: `${r}`
|
|
1396
1798
|
},
|
|
1397
1799
|
body: JSON.stringify({
|
|
1398
1800
|
query: t.schema,
|
|
1399
|
-
variables:
|
|
1801
|
+
variables: a
|
|
1400
1802
|
})
|
|
1401
1803
|
}
|
|
1402
1804
|
);
|
|
1403
1805
|
if (s.status !== 200)
|
|
1404
1806
|
return { status: s.status, data: [] };
|
|
1405
|
-
const { data: i, errors:
|
|
1807
|
+
const { data: i, errors: m } = await s.json();
|
|
1406
1808
|
return {
|
|
1407
1809
|
status: s.status,
|
|
1408
1810
|
data: i[t.method],
|
|
1409
|
-
errors:
|
|
1811
|
+
errors: m
|
|
1410
1812
|
};
|
|
1411
|
-
} catch (
|
|
1412
|
-
return console.error(
|
|
1813
|
+
} catch (a) {
|
|
1814
|
+
return console.error(a), { status: 500, data: [] };
|
|
1815
|
+
}
|
|
1816
|
+
}, Yt = async () => {
|
|
1817
|
+
try {
|
|
1818
|
+
return await zn();
|
|
1819
|
+
} catch {
|
|
1820
|
+
return "";
|
|
1413
1821
|
}
|
|
1414
1822
|
};
|
|
1415
|
-
class
|
|
1823
|
+
class ra {
|
|
1416
1824
|
constructor(t = null, r = null) {
|
|
1417
|
-
|
|
1825
|
+
Le(this, "refreshTokenPromise", null), Le(this, "accessToken"), Le(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1418
1826
|
}
|
|
1419
1827
|
async refreshtoken({
|
|
1420
1828
|
clientId: t,
|
|
1421
1829
|
userId: r,
|
|
1422
|
-
nonce:
|
|
1423
|
-
domain:
|
|
1830
|
+
nonce: n,
|
|
1831
|
+
domain: a
|
|
1424
1832
|
}) {
|
|
1425
1833
|
this.refreshTokenPromise || (this.refreshTokenPromise = this._refreshToken({
|
|
1426
1834
|
clientId: t,
|
|
1427
1835
|
userId: r,
|
|
1428
|
-
nonce:
|
|
1429
|
-
domain:
|
|
1836
|
+
nonce: n,
|
|
1837
|
+
domain: a
|
|
1430
1838
|
}));
|
|
1431
1839
|
try {
|
|
1432
1840
|
return await this.refreshTokenPromise;
|
|
@@ -1437,18 +1845,18 @@ class ma {
|
|
|
1437
1845
|
async _refreshToken({
|
|
1438
1846
|
clientId: t,
|
|
1439
1847
|
userId: r,
|
|
1440
|
-
nonce:
|
|
1441
|
-
domain:
|
|
1848
|
+
nonce: n,
|
|
1849
|
+
domain: a
|
|
1442
1850
|
}) {
|
|
1443
|
-
const o = await
|
|
1444
|
-
if (o && o.payload[
|
|
1445
|
-
const s = await
|
|
1851
|
+
const o = await ce(this.refreshToken);
|
|
1852
|
+
if (o && o.payload[C.USER_ID_KEY] !== "") {
|
|
1853
|
+
const s = await ta({
|
|
1446
1854
|
clientId: t,
|
|
1447
1855
|
userId: r,
|
|
1448
|
-
nonce:
|
|
1856
|
+
nonce: n,
|
|
1449
1857
|
refreshToken: this.refreshToken,
|
|
1450
1858
|
accessToken: this.accessToken,
|
|
1451
|
-
domain:
|
|
1859
|
+
domain: a
|
|
1452
1860
|
});
|
|
1453
1861
|
return s.status ? (this.accessToken = s.accessToken, this.refreshToken = s.refreshToken, {
|
|
1454
1862
|
status: "success",
|
|
@@ -1463,319 +1871,347 @@ class ma {
|
|
|
1463
1871
|
};
|
|
1464
1872
|
}
|
|
1465
1873
|
}
|
|
1466
|
-
const
|
|
1467
|
-
throw new Error(
|
|
1468
|
-
},
|
|
1874
|
+
const Z = () => {
|
|
1875
|
+
throw new Error(qn);
|
|
1876
|
+
}, qt = ur({
|
|
1469
1877
|
isAuthenticated: !1,
|
|
1470
1878
|
isLoading: !1,
|
|
1471
1879
|
authenticationType: null,
|
|
1472
|
-
login:
|
|
1473
|
-
logout:
|
|
1474
|
-
getAccessToken:
|
|
1475
|
-
getIdToken:
|
|
1476
|
-
registeringForPasskey:
|
|
1477
|
-
loginWithPasskey:
|
|
1880
|
+
login: Z,
|
|
1881
|
+
logout: Z,
|
|
1882
|
+
getAccessToken: Z,
|
|
1883
|
+
getIdToken: Z,
|
|
1884
|
+
registeringForPasskey: Z,
|
|
1885
|
+
loginWithPasskey: Z,
|
|
1478
1886
|
logoutReason: ""
|
|
1479
|
-
}),
|
|
1887
|
+
}), na = B.createContext({
|
|
1480
1888
|
state: {
|
|
1481
1889
|
isLoading: !0,
|
|
1482
1890
|
isAuthenticated: !1,
|
|
1483
1891
|
authenticationType: null,
|
|
1484
1892
|
user: void 0,
|
|
1485
|
-
logoutReason: ""
|
|
1893
|
+
logoutReason: "",
|
|
1894
|
+
debug: !1
|
|
1486
1895
|
},
|
|
1487
1896
|
dispatch: () => {
|
|
1488
1897
|
}
|
|
1489
|
-
}),
|
|
1898
|
+
}), aa = (e, t) => (t == null ? void 0 : t.type) === oe ? {
|
|
1490
1899
|
...e,
|
|
1491
1900
|
isLoading: t.payload.isLoading
|
|
1492
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1901
|
+
} : (t == null ? void 0 : t.type) === se ? {
|
|
1493
1902
|
...e,
|
|
1494
1903
|
isLoading: !1,
|
|
1495
1904
|
isAuthenticated: !0,
|
|
1496
1905
|
user: t.payload.user,
|
|
1497
1906
|
authenticationType: t.payload.authenticationType,
|
|
1498
1907
|
logoutReason: ""
|
|
1499
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1908
|
+
} : (t == null ? void 0 : t.type) === jt ? {
|
|
1500
1909
|
...e,
|
|
1501
1910
|
isLoading: !1,
|
|
1502
1911
|
isAuthenticated: !1,
|
|
1503
1912
|
user: void 0,
|
|
1504
1913
|
authenticationType: null,
|
|
1505
1914
|
logoutReason: t.payload.logoutReason
|
|
1506
|
-
} : e,
|
|
1915
|
+
} : e, oa = ({
|
|
1507
1916
|
children: e,
|
|
1508
1917
|
sessionExpiration: t,
|
|
1509
1918
|
clientId: r,
|
|
1510
|
-
domain:
|
|
1919
|
+
domain: n = "",
|
|
1920
|
+
debug: a = !1
|
|
1511
1921
|
}) => {
|
|
1512
|
-
const [
|
|
1922
|
+
const [o, s] = Et(aa, {
|
|
1513
1923
|
isLoading: !0,
|
|
1514
1924
|
isAuthenticated: !1,
|
|
1515
1925
|
authenticationType: null,
|
|
1516
1926
|
user: void 0,
|
|
1517
|
-
logoutReason: ""
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1927
|
+
logoutReason: "",
|
|
1928
|
+
debug: a
|
|
1929
|
+
}), i = J(!1), m = J(""), [d, h, , g] = pe({
|
|
1930
|
+
key: `${be}::${r}::@@user@@`
|
|
1931
|
+
}), [c, u, , p] = pe({
|
|
1932
|
+
key: `${be}::${r}::@@access@@`
|
|
1933
|
+
}), [b, w, , S] = pe(
|
|
1523
1934
|
{
|
|
1524
|
-
key: `${
|
|
1935
|
+
key: `${be}::${r}::@@refresh@@`
|
|
1525
1936
|
}
|
|
1526
|
-
), [
|
|
1527
|
-
key: `${
|
|
1528
|
-
}),
|
|
1529
|
-
(
|
|
1530
|
-
console.
|
|
1531
|
-
|
|
1937
|
+
), [L, P, , W] = pe({
|
|
1938
|
+
key: `${be}::${r}::@@nonce@@`
|
|
1939
|
+
}), v = te(
|
|
1940
|
+
(...y) => {
|
|
1941
|
+
a && console.info(`==> [Auth ${Date.now()}]: `, ...y);
|
|
1942
|
+
},
|
|
1943
|
+
[a]
|
|
1944
|
+
), x = new ra(c, b), D = te(
|
|
1945
|
+
(y) => {
|
|
1946
|
+
v(
|
|
1947
|
+
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1948
|
+
y
|
|
1949
|
+
), s({
|
|
1950
|
+
type: jt,
|
|
1532
1951
|
payload: {
|
|
1533
|
-
logoutReason:
|
|
1952
|
+
logoutReason: y || fe
|
|
1534
1953
|
}
|
|
1535
|
-
}),
|
|
1954
|
+
}), g(), p(), S(), W(), s({ type: oe, payload: { isLoading: !1 } });
|
|
1536
1955
|
},
|
|
1537
|
-
[
|
|
1538
|
-
),
|
|
1539
|
-
async (
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1956
|
+
[p, g, W, S, v]
|
|
1957
|
+
), I = te(
|
|
1958
|
+
async (y) => {
|
|
1959
|
+
v("invalidateAndLogout: invalidating and logging out");
|
|
1960
|
+
const { user: A } = o, E = (A == null ? void 0 : A.userId) || Xn(d);
|
|
1961
|
+
E || v(
|
|
1962
|
+
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1963
|
+
), await Zn({
|
|
1964
|
+
userId: E,
|
|
1965
|
+
idToken: d,
|
|
1966
|
+
accessToken: c,
|
|
1967
|
+
refreshToken: b,
|
|
1546
1968
|
clientId: r,
|
|
1547
|
-
domain:
|
|
1548
|
-
}),
|
|
1969
|
+
domain: n
|
|
1970
|
+
}), D(y || fe);
|
|
1549
1971
|
},
|
|
1550
1972
|
[
|
|
1551
|
-
|
|
1552
|
-
|
|
1973
|
+
c,
|
|
1974
|
+
o,
|
|
1553
1975
|
r,
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1976
|
+
n,
|
|
1977
|
+
d,
|
|
1978
|
+
b,
|
|
1979
|
+
D,
|
|
1980
|
+
v
|
|
1558
1981
|
]
|
|
1559
1982
|
);
|
|
1560
|
-
z(() => {
|
|
1561
|
-
|
|
1562
|
-
|
|
1983
|
+
z(() => ((async () => (v("useEffect: setting the fingerprint"), m.current = await Yt()))(), () => {
|
|
1984
|
+
v("useEffect: cleaning up the fingerprint"), m.current = "";
|
|
1985
|
+
}), []), z(() => {
|
|
1986
|
+
if (!i.current)
|
|
1987
|
+
return o.isLoading && d !== null ? (async () => {
|
|
1563
1988
|
try {
|
|
1564
|
-
const
|
|
1565
|
-
|
|
1566
|
-
type:
|
|
1989
|
+
const y = await ce(d);
|
|
1990
|
+
y && y.payload[C.USER_ID_KEY] !== "" ? (v("useEffect: setting the authentication state"), s({
|
|
1991
|
+
type: se,
|
|
1567
1992
|
payload: {
|
|
1568
|
-
authenticationType:
|
|
1993
|
+
authenticationType: y.payload[C.AUTH_TYPE_KEY],
|
|
1569
1994
|
user: {
|
|
1570
|
-
userId:
|
|
1571
|
-
username:
|
|
1995
|
+
userId: y.payload[C.USER_ID_KEY],
|
|
1996
|
+
username: y.payload[C.USERNAME_KEY]
|
|
1572
1997
|
}
|
|
1573
1998
|
}
|
|
1574
|
-
}) : await
|
|
1999
|
+
})) : (v("useEffect: invalid JWT, invalidating and logging out"), await I(fe));
|
|
1575
2000
|
} catch {
|
|
1576
|
-
|
|
2001
|
+
v(
|
|
2002
|
+
"useEffect: exception validating JWT, invalidating and logging out"
|
|
2003
|
+
), await I(fe);
|
|
1577
2004
|
}
|
|
1578
|
-
})() :
|
|
1579
|
-
|
|
2005
|
+
})() : (v("useEffect: setting the loading state to false"), s({ type: oe, payload: { isLoading: !1 } })), () => {
|
|
2006
|
+
i.current = !0;
|
|
1580
2007
|
};
|
|
1581
|
-
}, [
|
|
1582
|
-
const
|
|
1583
|
-
const
|
|
1584
|
-
if (
|
|
1585
|
-
const { code_verifier:
|
|
1586
|
-
nonce:
|
|
2008
|
+
}, [o.isLoading, d, I, v]);
|
|
2009
|
+
const Pe = async (y, A, E) => {
|
|
2010
|
+
const H = Ve();
|
|
2011
|
+
if (P(H), s({ type: oe, payload: { isLoading: !0 } }), g(), p(), S(), v("login: Logging in with type: ", E), E === re.CODE) {
|
|
2012
|
+
const { code_verifier: lr, code_challenge: dr } = await yn(), tt = await ea({
|
|
2013
|
+
nonce: H,
|
|
1587
2014
|
clientId: r,
|
|
1588
|
-
code_challenge:
|
|
2015
|
+
code_challenge: dr
|
|
1589
2016
|
});
|
|
1590
|
-
if (
|
|
1591
|
-
const
|
|
1592
|
-
username:
|
|
1593
|
-
password:
|
|
2017
|
+
if (tt.status) {
|
|
2018
|
+
const ae = await gt({
|
|
2019
|
+
username: y,
|
|
2020
|
+
password: A,
|
|
1594
2021
|
clientId: r,
|
|
1595
2022
|
sessionExpiration: t,
|
|
1596
|
-
nonce:
|
|
2023
|
+
nonce: H,
|
|
1597
2024
|
type: E,
|
|
1598
|
-
code:
|
|
1599
|
-
code_verifier:
|
|
1600
|
-
domain:
|
|
2025
|
+
code: tt.code,
|
|
2026
|
+
code_verifier: lr,
|
|
2027
|
+
domain: n,
|
|
2028
|
+
fingerprint: m.current
|
|
1601
2029
|
});
|
|
1602
|
-
return
|
|
1603
|
-
type:
|
|
2030
|
+
return ae.status ? (h(ae.idToken), u(ae.accessToken), w(ae.refreshToken), s({
|
|
2031
|
+
type: se,
|
|
1604
2032
|
payload: {
|
|
1605
2033
|
authenticationType: E,
|
|
1606
2034
|
user: {
|
|
1607
|
-
userId:
|
|
1608
|
-
username:
|
|
2035
|
+
userId: ae.userId,
|
|
2036
|
+
username: y
|
|
1609
2037
|
}
|
|
1610
2038
|
}
|
|
1611
|
-
}), !0) : (
|
|
2039
|
+
}), !0) : (D(ye), !1);
|
|
1612
2040
|
}
|
|
1613
2041
|
return !1;
|
|
1614
2042
|
}
|
|
1615
|
-
const
|
|
1616
|
-
username:
|
|
1617
|
-
password:
|
|
2043
|
+
const ne = await gt({
|
|
2044
|
+
username: y,
|
|
2045
|
+
password: A,
|
|
1618
2046
|
clientId: r,
|
|
1619
2047
|
sessionExpiration: t,
|
|
1620
|
-
nonce:
|
|
2048
|
+
nonce: H,
|
|
1621
2049
|
type: E,
|
|
1622
|
-
domain:
|
|
2050
|
+
domain: n,
|
|
2051
|
+
fingerprint: m.current
|
|
1623
2052
|
});
|
|
1624
|
-
return
|
|
1625
|
-
type:
|
|
2053
|
+
return ne.status ? (h(ne.idToken), u(ne.accessToken), w(ne.refreshToken), s({
|
|
2054
|
+
type: se,
|
|
1626
2055
|
payload: {
|
|
1627
2056
|
authenticationType: E,
|
|
1628
2057
|
user: {
|
|
1629
|
-
userId:
|
|
1630
|
-
username:
|
|
2058
|
+
userId: ne.userId,
|
|
2059
|
+
username: y
|
|
1631
2060
|
}
|
|
1632
2061
|
}
|
|
1633
|
-
}), !0) : (
|
|
1634
|
-
},
|
|
1635
|
-
|
|
1636
|
-
},
|
|
1637
|
-
const { isAuthenticated:
|
|
2062
|
+
}), !0) : (D(ye), !1);
|
|
2063
|
+
}, De = async (y) => {
|
|
2064
|
+
y == null || y.preventDefault(), await I(Yn);
|
|
2065
|
+
}, $e = async () => {
|
|
2066
|
+
const { isAuthenticated: y, user: A } = o;
|
|
1638
2067
|
try {
|
|
1639
|
-
if (
|
|
1640
|
-
if (
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
2068
|
+
if (y && A && A.userId) {
|
|
2069
|
+
if (c) {
|
|
2070
|
+
v("getAccessToken");
|
|
2071
|
+
const H = await ce(c);
|
|
2072
|
+
if (H && H.payload[C.USER_ID_KEY] !== "")
|
|
2073
|
+
return c;
|
|
1644
2074
|
}
|
|
1645
|
-
|
|
2075
|
+
v("getAccessToken: invalid access token, refreshing it");
|
|
2076
|
+
const E = await x.refreshtoken({
|
|
1646
2077
|
clientId: r,
|
|
1647
|
-
userId:
|
|
1648
|
-
nonce:
|
|
1649
|
-
domain:
|
|
2078
|
+
userId: A.userId,
|
|
2079
|
+
nonce: L,
|
|
2080
|
+
domain: n
|
|
1650
2081
|
});
|
|
1651
|
-
return E.status && E.status === "success" ? (
|
|
2082
|
+
return E.status && E.status === "success" ? (u(E.newAccessToken), w(E.newRefreshToken), E.newAccessToken) : (v("getAccessToken: invalid refresh token, re-authenticating user"), await I(Fe), "");
|
|
1652
2083
|
}
|
|
1653
|
-
return
|
|
2084
|
+
return v(
|
|
2085
|
+
"getAccessToken: user is not authenticated, cannot get access token"
|
|
2086
|
+
), await I(Fe), "";
|
|
1654
2087
|
} catch {
|
|
1655
|
-
return
|
|
2088
|
+
return v(
|
|
2089
|
+
"getAccessToken: exception occurred, invalidating and logging out"
|
|
2090
|
+
), await I(Fe), "";
|
|
1656
2091
|
}
|
|
1657
|
-
},
|
|
1658
|
-
if (
|
|
1659
|
-
return
|
|
1660
|
-
},
|
|
1661
|
-
const { user:
|
|
1662
|
-
let
|
|
1663
|
-
accessToken:
|
|
2092
|
+
}, O = () => {
|
|
2093
|
+
if (o.isAuthenticated && d)
|
|
2094
|
+
return d;
|
|
2095
|
+
}, U = async () => {
|
|
2096
|
+
const { user: y } = o;
|
|
2097
|
+
let A = await X({
|
|
2098
|
+
accessToken: c,
|
|
1664
2099
|
clientId: r,
|
|
1665
|
-
type:
|
|
2100
|
+
type: Q.GET_REGISTRATION_OPTIONS,
|
|
1666
2101
|
params: {
|
|
1667
2102
|
clientId: r,
|
|
1668
|
-
id:
|
|
1669
|
-
username:
|
|
2103
|
+
id: y == null ? void 0 : y.userId,
|
|
2104
|
+
username: y == null ? void 0 : y.username
|
|
1670
2105
|
}
|
|
1671
2106
|
});
|
|
1672
|
-
if (
|
|
2107
|
+
if (A.status)
|
|
1673
2108
|
try {
|
|
1674
|
-
const E = await
|
|
1675
|
-
|
|
1676
|
-
accessToken:
|
|
2109
|
+
const E = await Er(A.data);
|
|
2110
|
+
A = await X({
|
|
2111
|
+
accessToken: c,
|
|
1677
2112
|
clientId: r,
|
|
1678
|
-
type:
|
|
2113
|
+
type: Q.VERIFY_REGISTRATION,
|
|
1679
2114
|
params: {
|
|
1680
2115
|
clientId: r,
|
|
1681
|
-
id:
|
|
1682
|
-
username:
|
|
2116
|
+
id: y == null ? void 0 : y.userId,
|
|
2117
|
+
username: y == null ? void 0 : y.username,
|
|
1683
2118
|
registration: E
|
|
1684
2119
|
}
|
|
1685
2120
|
});
|
|
1686
2121
|
} catch {
|
|
1687
|
-
return await
|
|
1688
|
-
accessToken:
|
|
2122
|
+
return await X({
|
|
2123
|
+
accessToken: c,
|
|
1689
2124
|
clientId: r,
|
|
1690
|
-
type:
|
|
2125
|
+
type: Q.VERIFY_REGISTRATION,
|
|
1691
2126
|
params: {
|
|
1692
2127
|
clientId: r,
|
|
1693
|
-
id:
|
|
1694
|
-
username:
|
|
2128
|
+
id: y == null ? void 0 : y.userId,
|
|
2129
|
+
username: y == null ? void 0 : y.username,
|
|
1695
2130
|
registration: {}
|
|
1696
2131
|
}
|
|
1697
2132
|
}), !1;
|
|
1698
2133
|
}
|
|
1699
|
-
},
|
|
1700
|
-
const
|
|
1701
|
-
|
|
1702
|
-
const
|
|
1703
|
-
let E = await
|
|
1704
|
-
accessToken:
|
|
2134
|
+
}, Me = async () => {
|
|
2135
|
+
const y = Ve();
|
|
2136
|
+
P(y), s({ type: oe, payload: { isLoading: !0 } }), g(), p(), S(), v("loginWithPasskey");
|
|
2137
|
+
const A = Ve();
|
|
2138
|
+
let E = await X({
|
|
2139
|
+
accessToken: c,
|
|
1705
2140
|
clientId: r,
|
|
1706
|
-
type:
|
|
2141
|
+
type: Q.GET_AUTHENTICATION_OPTIONS,
|
|
1707
2142
|
params: {
|
|
1708
|
-
id:
|
|
2143
|
+
id: A,
|
|
1709
2144
|
clientId: r
|
|
1710
2145
|
}
|
|
1711
2146
|
});
|
|
1712
2147
|
if (E.status)
|
|
1713
2148
|
try {
|
|
1714
|
-
const
|
|
1715
|
-
return E = await
|
|
1716
|
-
accessToken:
|
|
2149
|
+
const H = await Sr(E.data);
|
|
2150
|
+
return E = await X({
|
|
2151
|
+
accessToken: c,
|
|
1717
2152
|
clientId: r,
|
|
1718
|
-
type:
|
|
2153
|
+
type: Q.VERIFY_AUTHENTICATION,
|
|
1719
2154
|
params: {
|
|
1720
2155
|
clientId: r,
|
|
1721
|
-
id:
|
|
1722
|
-
authentication:
|
|
1723
|
-
nonce:
|
|
1724
|
-
domain:
|
|
2156
|
+
id: A,
|
|
2157
|
+
authentication: H,
|
|
2158
|
+
nonce: y,
|
|
2159
|
+
domain: n,
|
|
2160
|
+
fingerprint: m.current
|
|
1725
2161
|
}
|
|
1726
|
-
}), E.data.status === "success" ? (h(E.data.idToken),
|
|
1727
|
-
type:
|
|
2162
|
+
}), E.data.status === "success" ? (h(E.data.idToken), u(E.data.accessToken), w(E.data.refreshToken), s({
|
|
2163
|
+
type: se,
|
|
1728
2164
|
payload: {
|
|
1729
|
-
authenticationType:
|
|
2165
|
+
authenticationType: re.PASSKEY,
|
|
1730
2166
|
user: {
|
|
1731
2167
|
userId: E.data.userId,
|
|
1732
2168
|
username: E.data.username
|
|
1733
2169
|
}
|
|
1734
2170
|
}
|
|
1735
|
-
}), !0) : (
|
|
2171
|
+
}), !0) : (D(ye), !1);
|
|
1736
2172
|
} catch {
|
|
1737
|
-
return await
|
|
1738
|
-
accessToken:
|
|
2173
|
+
return await X({
|
|
2174
|
+
accessToken: c,
|
|
1739
2175
|
clientId: r,
|
|
1740
|
-
type:
|
|
2176
|
+
type: Q.VERIFY_AUTHENTICATION,
|
|
1741
2177
|
params: {
|
|
1742
2178
|
clientId: r,
|
|
1743
|
-
id:
|
|
2179
|
+
id: A,
|
|
1744
2180
|
authentication: {},
|
|
1745
|
-
nonce:
|
|
1746
|
-
domain:
|
|
2181
|
+
nonce: y,
|
|
2182
|
+
domain: n
|
|
1747
2183
|
}
|
|
1748
|
-
}),
|
|
2184
|
+
}), D(ye), !1;
|
|
1749
2185
|
}
|
|
1750
2186
|
};
|
|
1751
|
-
return /* @__PURE__ */
|
|
1752
|
-
|
|
2187
|
+
return /* @__PURE__ */ l(na.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ l(
|
|
2188
|
+
qt.Provider,
|
|
1753
2189
|
{
|
|
1754
2190
|
value: {
|
|
1755
|
-
...
|
|
1756
|
-
login:
|
|
1757
|
-
logout:
|
|
1758
|
-
getAccessToken:
|
|
1759
|
-
getIdToken:
|
|
1760
|
-
registeringForPasskey:
|
|
1761
|
-
loginWithPasskey:
|
|
2191
|
+
...o,
|
|
2192
|
+
login: Pe,
|
|
2193
|
+
logout: De,
|
|
2194
|
+
getAccessToken: $e,
|
|
2195
|
+
getIdToken: O,
|
|
2196
|
+
registeringForPasskey: U,
|
|
2197
|
+
loginWithPasskey: Me
|
|
1762
2198
|
},
|
|
1763
2199
|
children: e
|
|
1764
2200
|
}
|
|
1765
2201
|
) });
|
|
1766
|
-
},
|
|
1767
|
-
function
|
|
2202
|
+
}, Qe = (e = qt) => vt(e), Co = "user", xo = "assistant", Oo = "system", Po = "internal", Do = "hidden", $o = "I'm having trouble right now. Please try again later.", Mo = "gpt-4", Lo = 128e3, Uo = "action-message", Ho = "action-reset", Ko = "action-model", Go = "action-restore", Bo = "action-location", Wo = "action-streaming", Vo = "action-search", Fo = "action-sort", Jo = "sassy-saint-", jo = "details", zo = "search", Yo = "sort", qo = "location", Qo = "==stats==", sa = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", ft = (e) => Number.isFinite(e) ? e : 0;
|
|
2203
|
+
function ia(e) {
|
|
1768
2204
|
return {
|
|
1769
2205
|
days: Math.trunc(e / 864e5),
|
|
1770
2206
|
hours: Math.trunc(e / 36e5 % 24),
|
|
1771
2207
|
minutes: Math.trunc(e / 6e4 % 60),
|
|
1772
2208
|
seconds: Math.trunc(e / 1e3 % 60),
|
|
1773
2209
|
milliseconds: Math.trunc(e % 1e3),
|
|
1774
|
-
microseconds: Math.trunc(
|
|
1775
|
-
nanoseconds: Math.trunc(
|
|
2210
|
+
microseconds: Math.trunc(ft(e * 1e3) % 1e3),
|
|
2211
|
+
nanoseconds: Math.trunc(ft(e * 1e6) % 1e3)
|
|
1776
2212
|
};
|
|
1777
2213
|
}
|
|
1778
|
-
function
|
|
2214
|
+
function ca(e) {
|
|
1779
2215
|
return {
|
|
1780
2216
|
days: e / 86400000n,
|
|
1781
2217
|
hours: e / 3600000n % 24n,
|
|
@@ -1786,79 +2222,79 @@ function ba(e) {
|
|
|
1786
2222
|
nanoseconds: 0n
|
|
1787
2223
|
};
|
|
1788
2224
|
}
|
|
1789
|
-
function
|
|
2225
|
+
function la(e) {
|
|
1790
2226
|
switch (typeof e) {
|
|
1791
2227
|
case "number": {
|
|
1792
2228
|
if (Number.isFinite(e))
|
|
1793
|
-
return
|
|
2229
|
+
return ia(e);
|
|
1794
2230
|
break;
|
|
1795
2231
|
}
|
|
1796
2232
|
case "bigint":
|
|
1797
|
-
return
|
|
2233
|
+
return ca(e);
|
|
1798
2234
|
}
|
|
1799
2235
|
throw new TypeError("Expected a finite number or bigint");
|
|
1800
2236
|
}
|
|
1801
|
-
const
|
|
1802
|
-
function
|
|
2237
|
+
const da = (e) => e === 0 || e === 0n, ua = (e, t) => t === 1 || t === 1n ? e : `${e}s`, ma = 1e-7, ha = 24n * 60n * 60n * 1000n;
|
|
2238
|
+
function pa(e, t) {
|
|
1803
2239
|
const r = typeof e == "bigint";
|
|
1804
2240
|
if (!r && !Number.isFinite(e))
|
|
1805
2241
|
throw new TypeError("Expected a finite number or bigint");
|
|
1806
2242
|
t = { ...t }, 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);
|
|
1807
|
-
let
|
|
1808
|
-
const
|
|
1809
|
-
const
|
|
1810
|
-
return (Math.round(
|
|
1811
|
-
}, o = (
|
|
1812
|
-
if (!((
|
|
1813
|
-
if (
|
|
1814
|
-
const
|
|
1815
|
-
|
|
2243
|
+
let n = [];
|
|
2244
|
+
const a = (d, h) => {
|
|
2245
|
+
const g = Math.floor(d * 10 ** h + ma);
|
|
2246
|
+
return (Math.round(g) / 10 ** h).toFixed(h);
|
|
2247
|
+
}, o = (d, h, g, c) => {
|
|
2248
|
+
if (!((n.length === 0 || !t.colonNotation) && da(d) && !(t.colonNotation && g === "m"))) {
|
|
2249
|
+
if (c = c ?? String(d), t.colonNotation) {
|
|
2250
|
+
const u = c.includes(".") ? c.split(".")[0].length : c.length, p = n.length > 0 ? 2 : 1;
|
|
2251
|
+
c = "0".repeat(Math.max(0, p - u)) + c;
|
|
1816
2252
|
} else
|
|
1817
|
-
|
|
1818
|
-
|
|
2253
|
+
c += t.verbose ? " " + ua(h, d) : g;
|
|
2254
|
+
n.push(c);
|
|
1819
2255
|
}
|
|
1820
|
-
}, s =
|
|
2256
|
+
}, s = la(e), i = BigInt(s.days);
|
|
1821
2257
|
if (o(i / 365n, "year", "y"), o(i % 365n, "day", "d"), o(Number(s.hours), "hour", "h"), o(Number(s.minutes), "minute", "m"), t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1822
|
-
const
|
|
1823
|
-
if (o(
|
|
1824
|
-
o(
|
|
2258
|
+
const d = Number(s.seconds), h = Number(s.milliseconds), g = Number(s.microseconds), c = Number(s.nanoseconds);
|
|
2259
|
+
if (o(d, "second", "s"), t.formatSubMilliseconds)
|
|
2260
|
+
o(h, "millisecond", "ms"), o(g, "microsecond", "µs"), o(c, "nanosecond", "ns");
|
|
1825
2261
|
else {
|
|
1826
|
-
const
|
|
2262
|
+
const u = h + g / 1e3 + c / 1e6, p = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, b = u >= 1 ? Math.round(u) : Math.ceil(u), w = p ? u.toFixed(p) : b;
|
|
1827
2263
|
o(
|
|
1828
|
-
Number.parseFloat(
|
|
2264
|
+
Number.parseFloat(w),
|
|
1829
2265
|
"millisecond",
|
|
1830
2266
|
"ms",
|
|
1831
|
-
|
|
2267
|
+
w
|
|
1832
2268
|
);
|
|
1833
2269
|
}
|
|
1834
2270
|
} else {
|
|
1835
|
-
const
|
|
1836
|
-
o(Number.parseFloat(
|
|
2271
|
+
const d = (r ? Number(e % ha) : e) / 1e3 % 60, h = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, g = a(d, h), c = t.keepDecimalsOnWholeSeconds ? g : g.replace(/\.0+$/, "");
|
|
2272
|
+
o(Number.parseFloat(c), "second", "s", c);
|
|
1837
2273
|
}
|
|
1838
|
-
if (
|
|
2274
|
+
if (n.length === 0)
|
|
1839
2275
|
return "0" + (t.verbose ? " milliseconds" : "ms");
|
|
1840
|
-
const
|
|
1841
|
-
return typeof t.unitCount == "number" && (
|
|
2276
|
+
const m = t.colonNotation ? ":" : " ";
|
|
2277
|
+
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), n.join(m);
|
|
1842
2278
|
}
|
|
1843
|
-
const
|
|
1844
|
-
const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N",
|
|
2279
|
+
const ga = process.env.NODE_ENV === "production", Xe = !ga, fa = Xe ? "gizmette.local.com" : "gizmette.com", Xo = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, Qt = (e, t) => {
|
|
2280
|
+
const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N", n = 0 | Math.abs(e), a = 0 | Math.abs(e) * 60 % 60, o = (0 | Math.abs(e) * 60 % 1 * 6e3) / 100;
|
|
1845
2281
|
return {
|
|
1846
2282
|
dir: r,
|
|
1847
|
-
deg:
|
|
1848
|
-
min:
|
|
2283
|
+
deg: n,
|
|
2284
|
+
min: a,
|
|
1849
2285
|
sec: o
|
|
1850
2286
|
};
|
|
1851
|
-
},
|
|
2287
|
+
}, Zo = (e) => {
|
|
1852
2288
|
if (!e && e !== 0)
|
|
1853
2289
|
return "N/A";
|
|
1854
|
-
const t =
|
|
2290
|
+
const t = Qt(e, !1);
|
|
1855
2291
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
1856
|
-
},
|
|
2292
|
+
}, es = (e) => {
|
|
1857
2293
|
if (!e && e !== 0)
|
|
1858
2294
|
return "N/A";
|
|
1859
|
-
const t =
|
|
2295
|
+
const t = Qt(e, !0);
|
|
1860
2296
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
1861
|
-
},
|
|
2297
|
+
}, ts = async () => {
|
|
1862
2298
|
const e = {
|
|
1863
2299
|
/**
|
|
1864
2300
|
* A boolean value that indicates the application would
|
|
@@ -1892,49 +2328,49 @@ const ka = process.env.NODE_ENV === "production", Fe = !ka, Sa = Fe ? "gizmette.
|
|
|
1892
2328
|
maximumAge: 6e4
|
|
1893
2329
|
};
|
|
1894
2330
|
return new Promise((t, r) => {
|
|
1895
|
-
var
|
|
1896
|
-
(
|
|
1897
|
-
(
|
|
2331
|
+
var n;
|
|
2332
|
+
(n = navigator == null ? void 0 : navigator.geolocation) == null || n.getCurrentPosition(
|
|
2333
|
+
(a) => {
|
|
1898
2334
|
t({
|
|
1899
|
-
latitude:
|
|
1900
|
-
longitude:
|
|
1901
|
-
accuracy:
|
|
2335
|
+
latitude: a.coords.latitude,
|
|
2336
|
+
longitude: a.coords.longitude,
|
|
2337
|
+
accuracy: a.coords.accuracy
|
|
1902
2338
|
});
|
|
1903
2339
|
},
|
|
1904
|
-
(
|
|
1905
|
-
r(
|
|
2340
|
+
(a) => {
|
|
2341
|
+
r(a);
|
|
1906
2342
|
},
|
|
1907
2343
|
e
|
|
1908
2344
|
);
|
|
1909
2345
|
});
|
|
1910
|
-
},
|
|
1911
|
-
/* @__PURE__ */
|
|
1912
|
-
/* @__PURE__ */
|
|
2346
|
+
}, rs = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ l("dl", { className: "my-0", children: /* @__PURE__ */ T("div", { className: "flex items-center justify-between", children: [
|
|
2347
|
+
/* @__PURE__ */ l("dt", { className: "inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2348
|
+
/* @__PURE__ */ l("dd", { className: "inline-block", children: t[r] })
|
|
1913
2349
|
] }) }, `${e}-${r}`)) : null;
|
|
1914
|
-
function
|
|
2350
|
+
function ns({
|
|
1915
2351
|
data: e,
|
|
1916
2352
|
formatter: t = (r) => r
|
|
1917
2353
|
}) {
|
|
1918
2354
|
const r = e.filter(
|
|
1919
|
-
(
|
|
1920
|
-
),
|
|
1921
|
-
(
|
|
2355
|
+
(a) => typeof a == "number" && a > 0
|
|
2356
|
+
), n = r.reduce(
|
|
2357
|
+
(a, o) => (a || 0) + (o || 0),
|
|
1922
2358
|
0
|
|
1923
2359
|
);
|
|
1924
|
-
return t(
|
|
2360
|
+
return t(n ? n / r.length : 0);
|
|
1925
2361
|
}
|
|
1926
|
-
const
|
|
2362
|
+
const as = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, os = new Intl.NumberFormat("en", {
|
|
1927
2363
|
style: "decimal",
|
|
1928
2364
|
signDisplay: "never",
|
|
1929
2365
|
minimumFractionDigits: 0,
|
|
1930
2366
|
maximumFractionDigits: 0
|
|
1931
|
-
}),
|
|
2367
|
+
}), ss = (e) => pa(e, {
|
|
1932
2368
|
secondsDecimalDigits: 2,
|
|
1933
2369
|
unitCount: 2
|
|
1934
|
-
}),
|
|
2370
|
+
}), ya = (e) => f(
|
|
1935
2371
|
"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",
|
|
1936
|
-
e ||
|
|
1937
|
-
),
|
|
2372
|
+
e || Xe ? "pt-4" : "pt-10"
|
|
2373
|
+
), is = (e, t) => t === 1 ? e : `${e}s`, xe = (e) => {
|
|
1938
2374
|
let t = "";
|
|
1939
2375
|
if (typeof e == "number" || typeof e == "string")
|
|
1940
2376
|
t = "m-" + e;
|
|
@@ -1943,49 +2379,49 @@ const ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
1943
2379
|
(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(" ");
|
|
1944
2380
|
}
|
|
1945
2381
|
return t;
|
|
1946
|
-
},
|
|
2382
|
+
}, cs = "av-bubble", yt = "av-button", Te = "av-card", ba = "av-footer", wa = "av-main", ls = "av-messagebox", ds = "av-panel", us = "av-spinner", Xt = "icon", Zt = "button", Ea = "link", va = ({
|
|
1947
2383
|
type: e,
|
|
1948
2384
|
size: t,
|
|
1949
2385
|
labelRight: r,
|
|
1950
|
-
labelLeft:
|
|
1951
|
-
align:
|
|
2386
|
+
labelLeft: n,
|
|
2387
|
+
align: a
|
|
1952
2388
|
}) => {
|
|
1953
2389
|
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";
|
|
1954
2390
|
switch (e) {
|
|
1955
|
-
case
|
|
2391
|
+
case Zt:
|
|
1956
2392
|
return f("px-4", {
|
|
1957
2393
|
[o]: t === "small",
|
|
1958
2394
|
[s]: t === "medium",
|
|
1959
2395
|
[i]: t === "large"
|
|
1960
2396
|
});
|
|
1961
|
-
case
|
|
2397
|
+
case Ea:
|
|
1962
2398
|
return f("px-4 text-center", {
|
|
1963
2399
|
[o]: t === "small",
|
|
1964
2400
|
[s]: t === "medium",
|
|
1965
2401
|
[i]: t === "large"
|
|
1966
2402
|
});
|
|
1967
|
-
case
|
|
2403
|
+
case Xt:
|
|
1968
2404
|
return f("inline-flex items-center", {
|
|
1969
|
-
"justify-center":
|
|
1970
|
-
"justify-start":
|
|
1971
|
-
"justify-end":
|
|
1972
|
-
"h-6 w-6 p-0": t === "small" && !(r ||
|
|
1973
|
-
"h-6 px-4 text-sm font-medium": t === "small" && (r ||
|
|
1974
|
-
"h-8 w-8 p-1": t === "medium" && !(r ||
|
|
1975
|
-
"h-8 px-4 text-base font-medium": t === "medium" && (r ||
|
|
1976
|
-
"h-12 w-12 p-2": t === "large" && !(r ||
|
|
1977
|
-
"h-12 px-4 text-lg font-medium": t === "large" && (r ||
|
|
2405
|
+
"justify-center": a === "center",
|
|
2406
|
+
"justify-start": a === "left",
|
|
2407
|
+
"justify-end": a === "right",
|
|
2408
|
+
"h-6 w-6 p-0": t === "small" && !(r || n),
|
|
2409
|
+
"h-6 px-4 text-sm font-medium": t === "small" && (r || n),
|
|
2410
|
+
"h-8 w-8 p-1": t === "medium" && !(r || n),
|
|
2411
|
+
"h-8 px-4 text-base font-medium": t === "medium" && (r || n),
|
|
2412
|
+
"h-12 w-12 p-2": t === "large" && !(r || n),
|
|
2413
|
+
"h-12 px-4 text-lg font-medium": t === "large" && (r || n)
|
|
1978
2414
|
});
|
|
1979
2415
|
}
|
|
1980
|
-
},
|
|
2416
|
+
}, Ta = ({
|
|
1981
2417
|
mode: e,
|
|
1982
2418
|
noBackground: t,
|
|
1983
2419
|
noTruncate: r,
|
|
1984
|
-
variant:
|
|
2420
|
+
variant: n
|
|
1985
2421
|
}) => {
|
|
1986
2422
|
if (t)
|
|
1987
2423
|
return "not-prose rounded-full";
|
|
1988
|
-
if (
|
|
2424
|
+
if (n === "primary")
|
|
1989
2425
|
return f("not-prose rounded-full", {
|
|
1990
2426
|
truncate: !r,
|
|
1991
2427
|
"bg-action-dark text-copy-light": e === "dark",
|
|
@@ -1993,7 +2429,7 @@ const ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
1993
2429
|
"bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "system",
|
|
1994
2430
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
|
|
1995
2431
|
});
|
|
1996
|
-
if (
|
|
2432
|
+
if (n === "secondary")
|
|
1997
2433
|
return f("not-prose rounded-full", {
|
|
1998
2434
|
truncate: !r,
|
|
1999
2435
|
"bg-action-dark text-copy-light": e === "light",
|
|
@@ -2001,7 +2437,7 @@ const ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2001
2437
|
"bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "alt-system",
|
|
2002
2438
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
|
|
2003
2439
|
});
|
|
2004
|
-
if (
|
|
2440
|
+
if (n === "danger")
|
|
2005
2441
|
return f("not-prose rounded-full", {
|
|
2006
2442
|
truncate: !r,
|
|
2007
2443
|
"bg-action-danger-dark text-copy-light": e === "dark",
|
|
@@ -2009,7 +2445,7 @@ const ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2009
2445
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
2010
2446
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
2011
2447
|
});
|
|
2012
|
-
},
|
|
2448
|
+
}, Sa = ({
|
|
2013
2449
|
mode: e,
|
|
2014
2450
|
disabled: t,
|
|
2015
2451
|
variant: r
|
|
@@ -2037,7 +2473,7 @@ const ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2037
2473
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
2038
2474
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
2039
2475
|
});
|
|
2040
|
-
},
|
|
2476
|
+
}, Ia = ({
|
|
2041
2477
|
mode: e,
|
|
2042
2478
|
disabled: t,
|
|
2043
2479
|
variant: r
|
|
@@ -2065,7 +2501,7 @@ const ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2065
2501
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
2066
2502
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
2067
2503
|
});
|
|
2068
|
-
},
|
|
2504
|
+
}, Aa = ({
|
|
2069
2505
|
mode: e,
|
|
2070
2506
|
noBorder: t,
|
|
2071
2507
|
variant: r
|
|
@@ -2093,184 +2529,184 @@ const ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2093
2529
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
2094
2530
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
2095
2531
|
});
|
|
2096
|
-
},
|
|
2532
|
+
}, ka = ({ focusMode: e }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2097
2533
|
"focus:outline-focus-dark": e === "dark",
|
|
2098
2534
|
"focus:outline-focus-light": e === "light",
|
|
2099
2535
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2100
2536
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2101
|
-
}),
|
|
2537
|
+
}), er = ({
|
|
2102
2538
|
type: e,
|
|
2103
2539
|
className: t,
|
|
2104
2540
|
raw: r,
|
|
2105
|
-
mode:
|
|
2106
|
-
focusMode:
|
|
2541
|
+
mode: n,
|
|
2542
|
+
focusMode: a,
|
|
2107
2543
|
disabled: o,
|
|
2108
2544
|
fullWidth: s,
|
|
2109
2545
|
size: i,
|
|
2110
|
-
noBorder:
|
|
2111
|
-
labelRight:
|
|
2112
|
-
labelLeft:
|
|
2113
|
-
spacing:
|
|
2114
|
-
noBackground:
|
|
2115
|
-
variant:
|
|
2116
|
-
noTruncate:
|
|
2117
|
-
align:
|
|
2118
|
-
}) => (
|
|
2119
|
-
|
|
2546
|
+
noBorder: m,
|
|
2547
|
+
labelRight: d,
|
|
2548
|
+
labelLeft: h,
|
|
2549
|
+
spacing: g,
|
|
2550
|
+
noBackground: c,
|
|
2551
|
+
variant: u,
|
|
2552
|
+
noTruncate: p,
|
|
2553
|
+
align: b
|
|
2554
|
+
}) => (u || (u = "primary"), r ? f(yt, t) : f(
|
|
2555
|
+
yt,
|
|
2120
2556
|
t,
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2557
|
+
xe(g),
|
|
2558
|
+
Ta({ mode: n, variant: u, noBackground: c, noTruncate: p }),
|
|
2559
|
+
va({ type: e, size: i, labelRight: d, labelLeft: h, align: b }),
|
|
2560
|
+
Aa({ mode: n, variant: u, noBorder: m }),
|
|
2561
|
+
ka({ focusMode: a }),
|
|
2562
|
+
Sa({ mode: n, variant: u, disabled: o }),
|
|
2563
|
+
Ia({ mode: n, variant: u, disabled: o }),
|
|
2128
2564
|
{
|
|
2129
2565
|
"w-full": s,
|
|
2130
2566
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
2131
2567
|
}
|
|
2132
|
-
)),
|
|
2133
|
-
var
|
|
2134
|
-
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((
|
|
2135
|
-
},
|
|
2568
|
+
)), _a = (e, t, r) => {
|
|
2569
|
+
var n;
|
|
2570
|
+
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((n = e == null ? void 0 : e.currentTarget) == null ? void 0 : n.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
2571
|
+
}, Ze = B.forwardRef(
|
|
2136
2572
|
(e, t) => {
|
|
2137
|
-
const { onClick: r, noInternalClick:
|
|
2138
|
-
return /* @__PURE__ */
|
|
2573
|
+
const { onClick: r, noInternalClick: n = !1, ...a } = e;
|
|
2574
|
+
return /* @__PURE__ */ l(
|
|
2139
2575
|
"button",
|
|
2140
2576
|
{
|
|
2141
2577
|
ref: t,
|
|
2142
2578
|
onClick: (o) => {
|
|
2143
|
-
|
|
2579
|
+
_a(o, n, r);
|
|
2144
2580
|
},
|
|
2145
|
-
...
|
|
2581
|
+
...a
|
|
2146
2582
|
}
|
|
2147
2583
|
);
|
|
2148
2584
|
}
|
|
2149
2585
|
);
|
|
2150
|
-
|
|
2151
|
-
const
|
|
2586
|
+
Ze.displayName = "BaseButton";
|
|
2587
|
+
const ze = B.forwardRef(
|
|
2152
2588
|
({
|
|
2153
2589
|
children: e,
|
|
2154
2590
|
disabled: t = !1,
|
|
2155
2591
|
mode: r = "system",
|
|
2156
|
-
focusMode:
|
|
2157
|
-
fullWidth:
|
|
2592
|
+
focusMode: n = "system",
|
|
2593
|
+
fullWidth: a = !1,
|
|
2158
2594
|
className: o,
|
|
2159
2595
|
type: s = "button",
|
|
2160
2596
|
raw: i = !1,
|
|
2161
|
-
noBorder:
|
|
2162
|
-
"aria-label":
|
|
2163
|
-
label:
|
|
2164
|
-
size:
|
|
2165
|
-
labelRight:
|
|
2166
|
-
labelLeft:
|
|
2167
|
-
spacing:
|
|
2168
|
-
noBackground:
|
|
2169
|
-
align:
|
|
2170
|
-
...
|
|
2171
|
-
},
|
|
2172
|
-
const
|
|
2173
|
-
type:
|
|
2597
|
+
noBorder: m = !1,
|
|
2598
|
+
"aria-label": d,
|
|
2599
|
+
label: h,
|
|
2600
|
+
size: g = "medium",
|
|
2601
|
+
labelRight: c,
|
|
2602
|
+
labelLeft: u,
|
|
2603
|
+
spacing: p,
|
|
2604
|
+
noBackground: b = !1,
|
|
2605
|
+
align: w = "center",
|
|
2606
|
+
...S
|
|
2607
|
+
}, L) => {
|
|
2608
|
+
const P = er({
|
|
2609
|
+
type: Xt,
|
|
2174
2610
|
mode: r,
|
|
2175
|
-
focusMode:
|
|
2176
|
-
fullWidth:
|
|
2611
|
+
focusMode: n,
|
|
2612
|
+
fullWidth: a,
|
|
2177
2613
|
disabled: t,
|
|
2178
2614
|
raw: i,
|
|
2179
2615
|
className: o,
|
|
2180
|
-
noBorder:
|
|
2181
|
-
size:
|
|
2182
|
-
labelRight:
|
|
2183
|
-
labelLeft:
|
|
2184
|
-
spacing:
|
|
2185
|
-
noBackground:
|
|
2186
|
-
align:
|
|
2187
|
-
}),
|
|
2616
|
+
noBorder: m,
|
|
2617
|
+
size: g,
|
|
2618
|
+
labelRight: c,
|
|
2619
|
+
labelLeft: u,
|
|
2620
|
+
spacing: p,
|
|
2621
|
+
noBackground: b,
|
|
2622
|
+
align: w
|
|
2623
|
+
}), W = f({
|
|
2188
2624
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2189
2625
|
"text-copy-light": r === "dark" && !i,
|
|
2190
2626
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
2191
2627
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
2192
2628
|
});
|
|
2193
2629
|
return /* @__PURE__ */ T(
|
|
2194
|
-
|
|
2630
|
+
Ze,
|
|
2195
2631
|
{
|
|
2196
|
-
ref:
|
|
2197
|
-
className:
|
|
2632
|
+
ref: L,
|
|
2633
|
+
className: P,
|
|
2198
2634
|
disabled: t,
|
|
2199
2635
|
type: s,
|
|
2200
|
-
"aria-label":
|
|
2201
|
-
...
|
|
2636
|
+
"aria-label": d || h,
|
|
2637
|
+
...S,
|
|
2202
2638
|
children: [
|
|
2203
|
-
|
|
2204
|
-
/* @__PURE__ */
|
|
2205
|
-
|
|
2639
|
+
u && /* @__PURE__ */ l("span", { className: "pr-2", children: u }),
|
|
2640
|
+
/* @__PURE__ */ l("div", { className: W, children: e }),
|
|
2641
|
+
c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
|
|
2206
2642
|
]
|
|
2207
2643
|
}
|
|
2208
2644
|
);
|
|
2209
2645
|
}
|
|
2210
2646
|
);
|
|
2211
|
-
|
|
2212
|
-
const
|
|
2647
|
+
ze.displayName = "ButtonIcon";
|
|
2648
|
+
const tr = B.forwardRef(
|
|
2213
2649
|
({
|
|
2214
2650
|
children: e,
|
|
2215
2651
|
disabled: t = !1,
|
|
2216
2652
|
mode: r = "system",
|
|
2217
|
-
focusMode:
|
|
2218
|
-
fullWidth:
|
|
2653
|
+
focusMode: n = "system",
|
|
2654
|
+
fullWidth: a = !1,
|
|
2219
2655
|
className: o,
|
|
2220
2656
|
size: s = "medium",
|
|
2221
2657
|
raw: i = !1,
|
|
2222
|
-
noBorder:
|
|
2223
|
-
spacing:
|
|
2224
|
-
variant:
|
|
2225
|
-
noTruncate:
|
|
2226
|
-
...
|
|
2227
|
-
},
|
|
2228
|
-
const
|
|
2229
|
-
type:
|
|
2658
|
+
noBorder: m = !1,
|
|
2659
|
+
spacing: d,
|
|
2660
|
+
variant: h = "primary",
|
|
2661
|
+
noTruncate: g = !1,
|
|
2662
|
+
...c
|
|
2663
|
+
}, u) => {
|
|
2664
|
+
const p = er({
|
|
2665
|
+
type: Zt,
|
|
2230
2666
|
mode: r,
|
|
2231
|
-
focusMode:
|
|
2232
|
-
fullWidth:
|
|
2667
|
+
focusMode: n,
|
|
2668
|
+
fullWidth: a,
|
|
2233
2669
|
disabled: t,
|
|
2234
2670
|
raw: i,
|
|
2235
2671
|
className: o,
|
|
2236
2672
|
size: s,
|
|
2237
|
-
noBorder:
|
|
2238
|
-
spacing:
|
|
2239
|
-
variant:
|
|
2240
|
-
noTruncate:
|
|
2673
|
+
noBorder: m,
|
|
2674
|
+
spacing: d,
|
|
2675
|
+
variant: h,
|
|
2676
|
+
noTruncate: g
|
|
2241
2677
|
});
|
|
2242
|
-
return /* @__PURE__ */
|
|
2243
|
-
|
|
2678
|
+
return /* @__PURE__ */ l(
|
|
2679
|
+
Ze,
|
|
2244
2680
|
{
|
|
2245
|
-
ref:
|
|
2246
|
-
className:
|
|
2681
|
+
ref: u,
|
|
2682
|
+
className: p,
|
|
2247
2683
|
disabled: t,
|
|
2248
|
-
...
|
|
2684
|
+
...c,
|
|
2249
2685
|
children: e
|
|
2250
2686
|
}
|
|
2251
2687
|
);
|
|
2252
2688
|
}
|
|
2253
2689
|
);
|
|
2254
|
-
|
|
2255
|
-
function
|
|
2256
|
-
const t =
|
|
2690
|
+
tr.displayName = "Button";
|
|
2691
|
+
function Ra(e) {
|
|
2692
|
+
const t = Tt();
|
|
2257
2693
|
return `${e}${t}`;
|
|
2258
2694
|
}
|
|
2259
|
-
const
|
|
2695
|
+
const Na = ({
|
|
2260
2696
|
className: e,
|
|
2261
2697
|
headerClassName: t,
|
|
2262
2698
|
bodyClassName: r,
|
|
2263
|
-
footerClassName:
|
|
2264
|
-
spacing:
|
|
2699
|
+
footerClassName: n,
|
|
2700
|
+
spacing: a,
|
|
2265
2701
|
mode: o,
|
|
2266
2702
|
compact: s,
|
|
2267
2703
|
noBorder: i
|
|
2268
2704
|
}) => {
|
|
2269
|
-
const
|
|
2270
|
-
|
|
2705
|
+
const m = f(
|
|
2706
|
+
Te,
|
|
2271
2707
|
e,
|
|
2272
2708
|
"rounded-md",
|
|
2273
|
-
|
|
2709
|
+
xe(a),
|
|
2274
2710
|
{
|
|
2275
2711
|
"border-none": i,
|
|
2276
2712
|
"border-2": !i,
|
|
@@ -2282,7 +2718,7 @@ const Ha = ({
|
|
|
2282
2718
|
"border-border-dark bg-surface-lighter text-copy-dark dark:border-border-accent dark:bg-surface-dark dark:text-copy-light": o === "system",
|
|
2283
2719
|
"border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": o === "alt-system"
|
|
2284
2720
|
}
|
|
2285
|
-
),
|
|
2721
|
+
), d = t || f(`${Te}__header mt-0 border-b-2`, {
|
|
2286
2722
|
"text-copy-light border-border-accent": o === "darker",
|
|
2287
2723
|
"border-border-accent": o === "dark",
|
|
2288
2724
|
"border-border-medium": o === "light",
|
|
@@ -2290,102 +2726,102 @@ const Ha = ({
|
|
|
2290
2726
|
"border-border-accent dark:border-border-medium": o === "alt-system",
|
|
2291
2727
|
"mb-4": !s,
|
|
2292
2728
|
"mb-2": s
|
|
2293
|
-
}),
|
|
2729
|
+
}), h = f(r), g = n || f(`${Te}__footer pt-2`);
|
|
2294
2730
|
return {
|
|
2295
|
-
wrapper:
|
|
2296
|
-
header:
|
|
2297
|
-
body:
|
|
2298
|
-
footer:
|
|
2731
|
+
wrapper: m,
|
|
2732
|
+
header: d,
|
|
2733
|
+
body: h,
|
|
2734
|
+
footer: g
|
|
2299
2735
|
};
|
|
2300
2736
|
};
|
|
2301
|
-
function
|
|
2737
|
+
function Ca({
|
|
2302
2738
|
id: e,
|
|
2303
2739
|
content: t,
|
|
2304
2740
|
userAriaLabelledby: r,
|
|
2305
|
-
className:
|
|
2741
|
+
className: n
|
|
2306
2742
|
}) {
|
|
2307
|
-
return typeof t == "string" ? /* @__PURE__ */
|
|
2743
|
+
return typeof t == "string" ? /* @__PURE__ */ l("h2", { id: e, className: n, children: t }) : r ? /* @__PURE__ */ l("div", { className: n, children: t }) : t ? /* @__PURE__ */ l("div", { className: n, id: e, children: t }) : null;
|
|
2308
2744
|
}
|
|
2309
|
-
const
|
|
2745
|
+
const xa = ({
|
|
2310
2746
|
header: e,
|
|
2311
2747
|
headerClassName: t,
|
|
2312
2748
|
footer: r,
|
|
2313
|
-
footerClassName:
|
|
2314
|
-
children:
|
|
2749
|
+
footerClassName: n,
|
|
2750
|
+
children: a,
|
|
2315
2751
|
className: o,
|
|
2316
2752
|
bodyClassName: s,
|
|
2317
2753
|
"aria-labelledby": i,
|
|
2318
|
-
spacing:
|
|
2319
|
-
mode:
|
|
2320
|
-
compact:
|
|
2321
|
-
noBorder:
|
|
2322
|
-
...
|
|
2754
|
+
spacing: m,
|
|
2755
|
+
mode: d = "system",
|
|
2756
|
+
compact: h = !1,
|
|
2757
|
+
noBorder: g = !1,
|
|
2758
|
+
...c
|
|
2323
2759
|
}) => {
|
|
2324
|
-
let
|
|
2325
|
-
const
|
|
2760
|
+
let u = null, p = null;
|
|
2761
|
+
const b = typeof e == "string", w = Ra(Te), S = Na({
|
|
2326
2762
|
className: o,
|
|
2327
2763
|
headerClassName: t,
|
|
2328
2764
|
bodyClassName: s,
|
|
2329
|
-
footerClassName:
|
|
2330
|
-
spacing:
|
|
2331
|
-
mode:
|
|
2332
|
-
compact:
|
|
2333
|
-
noBorder:
|
|
2765
|
+
footerClassName: n,
|
|
2766
|
+
spacing: m,
|
|
2767
|
+
mode: d,
|
|
2768
|
+
compact: h,
|
|
2769
|
+
noBorder: g
|
|
2334
2770
|
});
|
|
2335
|
-
return
|
|
2771
|
+
return b ? (u = w, p = u) : !b && e && i ? (u = null, p = i) : !b && e && !i ? (u = w, p = u) : (u = null, p = i || null), /* @__PURE__ */ l("div", { className: S.wrapper, children: /* @__PURE__ */ T(
|
|
2336
2772
|
"section",
|
|
2337
2773
|
{
|
|
2338
|
-
...
|
|
2339
|
-
"aria-labelledby":
|
|
2774
|
+
...p && {
|
|
2775
|
+
"aria-labelledby": p
|
|
2340
2776
|
},
|
|
2341
|
-
className:
|
|
2342
|
-
...
|
|
2777
|
+
className: S.body,
|
|
2778
|
+
...c,
|
|
2343
2779
|
children: [
|
|
2344
|
-
/* @__PURE__ */
|
|
2345
|
-
|
|
2780
|
+
/* @__PURE__ */ l(
|
|
2781
|
+
Ca,
|
|
2346
2782
|
{
|
|
2347
|
-
...
|
|
2783
|
+
...u && { id: u },
|
|
2348
2784
|
content: e,
|
|
2349
|
-
className:
|
|
2785
|
+
className: S.header,
|
|
2350
2786
|
userAriaLabelledby: i
|
|
2351
2787
|
}
|
|
2352
2788
|
),
|
|
2353
|
-
/* @__PURE__ */
|
|
2354
|
-
r ? /* @__PURE__ */
|
|
2789
|
+
/* @__PURE__ */ l("div", { children: a }),
|
|
2790
|
+
r ? /* @__PURE__ */ l("div", { className: S.footer, children: r }) : null
|
|
2355
2791
|
]
|
|
2356
2792
|
}
|
|
2357
2793
|
) });
|
|
2358
|
-
},
|
|
2794
|
+
}, Oa = ({
|
|
2359
2795
|
className: e,
|
|
2360
2796
|
mode: t = "system",
|
|
2361
2797
|
row1: r,
|
|
2362
|
-
row2:
|
|
2363
|
-
noMargins:
|
|
2798
|
+
row2: n,
|
|
2799
|
+
noMargins: a = !1,
|
|
2364
2800
|
spacing: o,
|
|
2365
2801
|
raw: s = !1
|
|
2366
2802
|
}) => {
|
|
2367
|
-
const i = f(
|
|
2803
|
+
const i = f(ba, e, xe(o), {
|
|
2368
2804
|
"text-copy-dark": !s && t === "dark",
|
|
2369
2805
|
"text-copy-lighter": !s && t === "light",
|
|
2370
2806
|
"text-copy-dark dark:text-copy-lighter": !s && t === "system",
|
|
2371
2807
|
"text-copy-lighter dark:text-copy-dark": !s && t === "alt-system",
|
|
2372
|
-
"mb-[100px]": !
|
|
2808
|
+
"mb-[100px]": !a && !s,
|
|
2373
2809
|
"mt-0 flex w-full flex-col p-2 text-center text-xs sm:mt-3 md:mx-auto md:max-w-4xl": !s
|
|
2374
2810
|
});
|
|
2375
2811
|
return /* @__PURE__ */ T("footer", { className: i, children: [
|
|
2376
|
-
r && /* @__PURE__ */
|
|
2377
|
-
|
|
2812
|
+
r && /* @__PURE__ */ l("div", { children: r }),
|
|
2813
|
+
n && /* @__PURE__ */ l("div", { children: n })
|
|
2378
2814
|
] });
|
|
2379
|
-
},
|
|
2815
|
+
}, Pa = ({
|
|
2380
2816
|
children: e,
|
|
2381
2817
|
className: t,
|
|
2382
2818
|
raw: r = !1,
|
|
2383
|
-
spacing:
|
|
2819
|
+
spacing: n
|
|
2384
2820
|
}) => {
|
|
2385
|
-
const
|
|
2821
|
+
const a = f(t, wa, xe(n), {
|
|
2386
2822
|
"mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
|
|
2387
2823
|
});
|
|
2388
|
-
return /* @__PURE__ */
|
|
2824
|
+
return /* @__PURE__ */ l("main", { className: a, children: e });
|
|
2389
2825
|
};
|
|
2390
2826
|
/*!
|
|
2391
2827
|
@versini/ui-components v5.20.0
|
|
@@ -2400,26 +2836,26 @@ try {
|
|
|
2400
2836
|
});
|
|
2401
2837
|
} catch {
|
|
2402
2838
|
}
|
|
2403
|
-
function
|
|
2404
|
-
return
|
|
2839
|
+
function Da(e) {
|
|
2840
|
+
return hr(() => e.every((t) => t == null) ? () => {
|
|
2405
2841
|
} : (t) => {
|
|
2406
2842
|
e.forEach((r) => {
|
|
2407
2843
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
2408
2844
|
});
|
|
2409
2845
|
}, e);
|
|
2410
2846
|
}
|
|
2411
|
-
function
|
|
2412
|
-
const t =
|
|
2847
|
+
function $a(e) {
|
|
2848
|
+
const t = Tt();
|
|
2413
2849
|
if (!e)
|
|
2414
2850
|
return t;
|
|
2415
2851
|
if (typeof e == "number" || typeof e == "string")
|
|
2416
2852
|
return `${e}${t}`;
|
|
2417
2853
|
if (typeof e == "object") {
|
|
2418
|
-
const { id: r, prefix:
|
|
2419
|
-
return typeof r == "number" || typeof r == "string" ? `${
|
|
2854
|
+
const { id: r, prefix: n = "" } = e;
|
|
2855
|
+
return typeof r == "number" || typeof r == "string" ? `${n}${r}` : `${n}${t}`;
|
|
2420
2856
|
}
|
|
2421
2857
|
}
|
|
2422
|
-
const
|
|
2858
|
+
const rr = "SET_ANNOUNCEMENT", nr = "CLEAR_ANNOUNCEMENT", Ma = {
|
|
2423
2859
|
alert: null,
|
|
2424
2860
|
alertdialog: null,
|
|
2425
2861
|
log: "polite",
|
|
@@ -2427,14 +2863,14 @@ const Gt = "SET_ANNOUNCEMENT", Vt = "CLEAR_ANNOUNCEMENT", ja = {
|
|
|
2427
2863
|
progressbar: null,
|
|
2428
2864
|
status: "polite",
|
|
2429
2865
|
timer: "assertive"
|
|
2430
|
-
},
|
|
2866
|
+
}, La = (e, t) => {
|
|
2431
2867
|
switch (t == null ? void 0 : t.type) {
|
|
2432
|
-
case
|
|
2868
|
+
case rr:
|
|
2433
2869
|
return {
|
|
2434
2870
|
...e,
|
|
2435
2871
|
announcement: t.payload
|
|
2436
2872
|
};
|
|
2437
|
-
case
|
|
2873
|
+
case nr:
|
|
2438
2874
|
return {
|
|
2439
2875
|
...e,
|
|
2440
2876
|
announcement: null
|
|
@@ -2442,95 +2878,95 @@ const Gt = "SET_ANNOUNCEMENT", Vt = "CLEAR_ANNOUNCEMENT", ja = {
|
|
|
2442
2878
|
default:
|
|
2443
2879
|
return e;
|
|
2444
2880
|
}
|
|
2445
|
-
},
|
|
2881
|
+
}, Ua = ({
|
|
2446
2882
|
onAnnouncementClear: e,
|
|
2447
2883
|
dispatch: t
|
|
2448
2884
|
}) => {
|
|
2449
2885
|
t({
|
|
2450
|
-
type:
|
|
2886
|
+
type: nr
|
|
2451
2887
|
}), typeof e == "function" && e();
|
|
2452
|
-
},
|
|
2888
|
+
}, bt = ({
|
|
2453
2889
|
children: e,
|
|
2454
2890
|
clearAnnouncementDelay: t,
|
|
2455
2891
|
clearAnnouncementTimeoutRef: r,
|
|
2456
|
-
onAnnouncementClear:
|
|
2457
|
-
dispatch:
|
|
2892
|
+
onAnnouncementClear: n,
|
|
2893
|
+
dispatch: a
|
|
2458
2894
|
}) => {
|
|
2459
|
-
(r == null ? void 0 : r.current) !== null && clearTimeout(r.current), e !== null &&
|
|
2460
|
-
type:
|
|
2895
|
+
(r == null ? void 0 : r.current) !== null && clearTimeout(r.current), e !== null && a({
|
|
2896
|
+
type: rr,
|
|
2461
2897
|
payload: e
|
|
2462
2898
|
}), t && (r.current = setTimeout(
|
|
2463
|
-
() =>
|
|
2464
|
-
onAnnouncementClear:
|
|
2465
|
-
dispatch:
|
|
2899
|
+
() => Ua({
|
|
2900
|
+
onAnnouncementClear: n,
|
|
2901
|
+
dispatch: a
|
|
2466
2902
|
}),
|
|
2467
2903
|
t
|
|
2468
2904
|
));
|
|
2469
|
-
},
|
|
2905
|
+
}, Ha = ({
|
|
2470
2906
|
children: e,
|
|
2471
2907
|
announcementTimeoutRef: t,
|
|
2472
2908
|
announcementDelay: r,
|
|
2473
|
-
clearAnnouncementDelay:
|
|
2474
|
-
clearAnnouncementTimeoutRef:
|
|
2909
|
+
clearAnnouncementDelay: n,
|
|
2910
|
+
clearAnnouncementTimeoutRef: a,
|
|
2475
2911
|
onAnnouncementClear: o,
|
|
2476
2912
|
dispatch: s
|
|
2477
2913
|
}) => {
|
|
2478
|
-
clearTimeout(t.current), r ? t.current = setTimeout(
|
|
2914
|
+
clearTimeout(t.current), r ? t.current = setTimeout(bt, r, {
|
|
2479
2915
|
children: e,
|
|
2480
|
-
clearAnnouncementDelay:
|
|
2481
|
-
clearAnnouncementTimeoutRef:
|
|
2916
|
+
clearAnnouncementDelay: n,
|
|
2917
|
+
clearAnnouncementTimeoutRef: a,
|
|
2482
2918
|
onAnnouncementClear: o,
|
|
2483
2919
|
dispatch: s
|
|
2484
|
-
}) :
|
|
2920
|
+
}) : bt({
|
|
2485
2921
|
children: e,
|
|
2486
|
-
clearAnnouncementDelay:
|
|
2487
|
-
clearAnnouncementTimeoutRef:
|
|
2922
|
+
clearAnnouncementDelay: n,
|
|
2923
|
+
clearAnnouncementTimeoutRef: a,
|
|
2488
2924
|
onAnnouncementClear: o,
|
|
2489
2925
|
dispatch: s
|
|
2490
2926
|
});
|
|
2491
2927
|
};
|
|
2492
|
-
function
|
|
2928
|
+
function ar({
|
|
2493
2929
|
children: e,
|
|
2494
2930
|
className: t,
|
|
2495
2931
|
politeness: r,
|
|
2496
|
-
role:
|
|
2497
|
-
announcementDelay:
|
|
2932
|
+
role: n = null,
|
|
2933
|
+
announcementDelay: a,
|
|
2498
2934
|
clearAnnouncementDelay: o,
|
|
2499
2935
|
onAnnouncementClear: s,
|
|
2500
2936
|
visible: i,
|
|
2501
|
-
...
|
|
2937
|
+
...m
|
|
2502
2938
|
}) {
|
|
2503
|
-
const
|
|
2939
|
+
const d = J(), h = J(), [g, c] = Et(La, {
|
|
2504
2940
|
announcement: null
|
|
2505
2941
|
});
|
|
2506
|
-
let
|
|
2507
|
-
typeof
|
|
2508
|
-
|
|
2509
|
-
announcementTimeoutRef:
|
|
2510
|
-
announcementDelay:
|
|
2942
|
+
let u = r;
|
|
2943
|
+
typeof u > "u" && (u = n ? Ma[n] : "assertive"), z(() => {
|
|
2944
|
+
Ha({
|
|
2945
|
+
announcementTimeoutRef: d,
|
|
2946
|
+
announcementDelay: a,
|
|
2511
2947
|
children: e,
|
|
2512
2948
|
clearAnnouncementDelay: o,
|
|
2513
|
-
clearAnnouncementTimeoutRef:
|
|
2949
|
+
clearAnnouncementTimeoutRef: h,
|
|
2514
2950
|
onAnnouncementClear: s,
|
|
2515
|
-
dispatch:
|
|
2951
|
+
dispatch: c
|
|
2516
2952
|
});
|
|
2517
2953
|
}, [
|
|
2518
2954
|
e,
|
|
2519
|
-
|
|
2955
|
+
a,
|
|
2520
2956
|
o,
|
|
2521
2957
|
s
|
|
2522
2958
|
]);
|
|
2523
|
-
const
|
|
2959
|
+
const p = f(t, {
|
|
2524
2960
|
"sr-only": !i
|
|
2525
2961
|
});
|
|
2526
|
-
return /* @__PURE__ */
|
|
2962
|
+
return /* @__PURE__ */ l(
|
|
2527
2963
|
"div",
|
|
2528
2964
|
{
|
|
2529
|
-
"aria-live":
|
|
2530
|
-
...
|
|
2531
|
-
className:
|
|
2532
|
-
...
|
|
2533
|
-
children:
|
|
2965
|
+
"aria-live": u,
|
|
2966
|
+
...n && { role: n },
|
|
2967
|
+
className: p,
|
|
2968
|
+
...m,
|
|
2969
|
+
children: g.announcement
|
|
2534
2970
|
}
|
|
2535
2971
|
);
|
|
2536
2972
|
}
|
|
@@ -2547,7 +2983,7 @@ try {
|
|
|
2547
2983
|
});
|
|
2548
2984
|
} catch {
|
|
2549
2985
|
}
|
|
2550
|
-
const
|
|
2986
|
+
const Ka = (e) => {
|
|
2551
2987
|
let t = "";
|
|
2552
2988
|
if (typeof e == "number" || typeof e == "string")
|
|
2553
2989
|
t = "m-" + e;
|
|
@@ -2556,21 +2992,21 @@ const qa = (e) => {
|
|
|
2556
2992
|
(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(" ");
|
|
2557
2993
|
}
|
|
2558
2994
|
return t;
|
|
2559
|
-
},
|
|
2995
|
+
}, or = "av-text-input", Ga = "av-text-input-wrapper", Je = "av-text-input-helper-text", ms = "av-text-area", hs = "av-text-area-wrapper", ps = "av-text-area-helper-text", gs = "av-text-area__control--right", fs = "av-toggle", Ba = ({
|
|
2560
2996
|
mode: e
|
|
2561
2997
|
}) => f({
|
|
2562
2998
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
2563
2999
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
2564
3000
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
2565
3001
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
2566
|
-
}),
|
|
3002
|
+
}), Wa = ({
|
|
2567
3003
|
focusMode: e
|
|
2568
3004
|
}) => f("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
2569
3005
|
"focus:outline-focus-dark": e === "dark",
|
|
2570
3006
|
"focus:outline-focus-light": e === "light",
|
|
2571
3007
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2572
3008
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2573
|
-
}),
|
|
3009
|
+
}), Va = ({
|
|
2574
3010
|
noBorder: e,
|
|
2575
3011
|
error: t
|
|
2576
3012
|
}) => f("border-2", {
|
|
@@ -2578,11 +3014,11 @@ const qa = (e) => {
|
|
|
2578
3014
|
"focus:border-border-dark": !e && t,
|
|
2579
3015
|
"border-border-error-dark": !e && t,
|
|
2580
3016
|
"border-transparent": e
|
|
2581
|
-
}),
|
|
3017
|
+
}), Fa = ({
|
|
2582
3018
|
disabled: e,
|
|
2583
3019
|
raw: t,
|
|
2584
3020
|
error: r,
|
|
2585
|
-
mode:
|
|
3021
|
+
mode: n
|
|
2586
3022
|
}) => {
|
|
2587
3023
|
if (t)
|
|
2588
3024
|
return "";
|
|
@@ -2590,264 +3026,264 @@ const qa = (e) => {
|
|
|
2590
3026
|
return f("absolute px-2 cursor-not-allowed opacity-50 font-medium");
|
|
2591
3027
|
if (!r)
|
|
2592
3028
|
return f("absolute px-2 cursor-text font-medium", {
|
|
2593
|
-
"text-copy-lighter":
|
|
2594
|
-
"text-copy-dark":
|
|
2595
|
-
"text-copy-dark dark:text-copy-lighter":
|
|
2596
|
-
"text-copy-lighter dark:text-copy-dark":
|
|
3029
|
+
"text-copy-lighter": n === "dark",
|
|
3030
|
+
"text-copy-dark": n === "light",
|
|
3031
|
+
"text-copy-dark dark:text-copy-lighter": n === "system",
|
|
3032
|
+
"text-copy-lighter dark:text-copy-dark": n === "alt-system"
|
|
2597
3033
|
});
|
|
2598
3034
|
if (r)
|
|
2599
3035
|
return f("absolute px-2 cursor-text font-medium", {
|
|
2600
|
-
"text-copy-lighter":
|
|
2601
|
-
"text-copy-error-dark":
|
|
2602
|
-
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker":
|
|
2603
|
-
"text-copy-lighter dark:text-copy-error-dark":
|
|
3036
|
+
"text-copy-lighter": n === "dark",
|
|
3037
|
+
"text-copy-error-dark": n === "light",
|
|
3038
|
+
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": n === "system",
|
|
3039
|
+
"text-copy-lighter dark:text-copy-error-dark": n === "alt-system"
|
|
2604
3040
|
});
|
|
2605
|
-
},
|
|
3041
|
+
}, Ja = ({
|
|
2606
3042
|
error: e,
|
|
2607
3043
|
raw: t,
|
|
2608
3044
|
mode: r,
|
|
2609
|
-
disabled:
|
|
3045
|
+
disabled: n
|
|
2610
3046
|
}) => {
|
|
2611
3047
|
if (t)
|
|
2612
3048
|
return "";
|
|
2613
|
-
if (
|
|
3049
|
+
if (n)
|
|
2614
3050
|
return f(
|
|
2615
|
-
|
|
3051
|
+
Je,
|
|
2616
3052
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
2617
3053
|
);
|
|
2618
3054
|
if (!e)
|
|
2619
|
-
return f(
|
|
3055
|
+
return f(Je, "absolute px-2 font-medium", {
|
|
2620
3056
|
"text-copy-lighter": r === "dark",
|
|
2621
3057
|
"text-copy-dark": r === "light",
|
|
2622
3058
|
"text-copy-dark dark:text-copy-lighter": r === "system",
|
|
2623
3059
|
"text-copy-lighter dark:text-copy-dark": r === "alt-system"
|
|
2624
3060
|
});
|
|
2625
3061
|
if (e)
|
|
2626
|
-
return f(
|
|
3062
|
+
return f(Je, "absolute px-2 font-medium", {
|
|
2627
3063
|
"text-copy-error-light bg-surface-darker": r === "dark",
|
|
2628
3064
|
"text-copy-error-dark": r === "light",
|
|
2629
3065
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
2630
3066
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
2631
3067
|
});
|
|
2632
|
-
},
|
|
3068
|
+
}, ja = ({
|
|
2633
3069
|
className: e,
|
|
2634
3070
|
inputClassName: t,
|
|
2635
3071
|
raw: r,
|
|
2636
|
-
disabled:
|
|
2637
|
-
noBorder:
|
|
3072
|
+
disabled: n,
|
|
3073
|
+
noBorder: a,
|
|
2638
3074
|
error: o,
|
|
2639
3075
|
spacing: s,
|
|
2640
3076
|
mode: i,
|
|
2641
|
-
focusMode:
|
|
3077
|
+
focusMode: m
|
|
2642
3078
|
}) => {
|
|
2643
|
-
const
|
|
3079
|
+
const d = r ? e : f(
|
|
2644
3080
|
"relative flex w-full flex-col justify-center",
|
|
2645
|
-
|
|
3081
|
+
Ga,
|
|
2646
3082
|
e,
|
|
2647
|
-
|
|
2648
|
-
),
|
|
2649
|
-
|
|
3083
|
+
Ka(s)
|
|
3084
|
+
), h = r ? f(t) : f(
|
|
3085
|
+
or,
|
|
2650
3086
|
t,
|
|
2651
3087
|
"h-12 rounded-md px-4 text-base",
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
3088
|
+
Ba({ mode: i }),
|
|
3089
|
+
Wa({ focusMode: m }),
|
|
3090
|
+
Va({ noBorder: a, error: o }),
|
|
2655
3091
|
{
|
|
2656
|
-
"disabled:cursor-not-allowed disabled:opacity-50":
|
|
3092
|
+
"disabled:cursor-not-allowed disabled:opacity-50": n
|
|
2657
3093
|
}
|
|
2658
|
-
),
|
|
2659
|
-
disabled:
|
|
3094
|
+
), g = r ? void 0 : "sr-only", c = Fa({
|
|
3095
|
+
disabled: n,
|
|
2660
3096
|
raw: r,
|
|
2661
3097
|
error: o,
|
|
2662
3098
|
mode: i
|
|
2663
|
-
}),
|
|
3099
|
+
}), u = Ja({
|
|
2664
3100
|
error: o,
|
|
2665
3101
|
raw: r,
|
|
2666
3102
|
mode: i,
|
|
2667
|
-
disabled:
|
|
3103
|
+
disabled: n
|
|
2668
3104
|
});
|
|
2669
3105
|
return {
|
|
2670
|
-
wrapper:
|
|
2671
|
-
input:
|
|
2672
|
-
accessibleLabel:
|
|
2673
|
-
visibleLabel:
|
|
2674
|
-
helperText:
|
|
3106
|
+
wrapper: d,
|
|
3107
|
+
input: h,
|
|
3108
|
+
accessibleLabel: g,
|
|
3109
|
+
visibleLabel: c,
|
|
3110
|
+
helperText: u,
|
|
2675
3111
|
rightElement: r ? void 0 : "absolute right-3"
|
|
2676
3112
|
};
|
|
2677
|
-
},
|
|
3113
|
+
}, et = B.forwardRef(
|
|
2678
3114
|
({
|
|
2679
3115
|
id: e,
|
|
2680
3116
|
name: t,
|
|
2681
3117
|
label: r,
|
|
2682
|
-
error:
|
|
2683
|
-
raw:
|
|
3118
|
+
error: n = !1,
|
|
3119
|
+
raw: a = !1,
|
|
2684
3120
|
className: o,
|
|
2685
3121
|
inputClassName: s,
|
|
2686
3122
|
mode: i = "system",
|
|
2687
|
-
focusMode:
|
|
2688
|
-
disabled:
|
|
2689
|
-
noBorder:
|
|
2690
|
-
labelId:
|
|
2691
|
-
labelHidden:
|
|
2692
|
-
type:
|
|
2693
|
-
helperText:
|
|
2694
|
-
rightElement:
|
|
2695
|
-
spacing:
|
|
2696
|
-
...
|
|
2697
|
-
},
|
|
2698
|
-
const
|
|
3123
|
+
focusMode: m = "system",
|
|
3124
|
+
disabled: d = !1,
|
|
3125
|
+
noBorder: h = !1,
|
|
3126
|
+
labelId: g,
|
|
3127
|
+
labelHidden: c = !1,
|
|
3128
|
+
type: u = "text",
|
|
3129
|
+
helperText: p = "",
|
|
3130
|
+
rightElement: b,
|
|
3131
|
+
spacing: w,
|
|
3132
|
+
...S
|
|
3133
|
+
}, L) => {
|
|
3134
|
+
const P = J(null), [W, v] = j(0), x = $a({ id: e, prefix: `${or}-` }), D = `${t} error, ${p}`, I = ja({
|
|
2699
3135
|
className: o,
|
|
2700
3136
|
inputClassName: s,
|
|
2701
|
-
error:
|
|
2702
|
-
raw:
|
|
2703
|
-
focusMode:
|
|
2704
|
-
disabled:
|
|
2705
|
-
noBorder:
|
|
2706
|
-
spacing:
|
|
3137
|
+
error: n,
|
|
3138
|
+
raw: a,
|
|
3139
|
+
focusMode: m,
|
|
3140
|
+
disabled: d,
|
|
3141
|
+
noBorder: h,
|
|
3142
|
+
spacing: w,
|
|
2707
3143
|
mode: i
|
|
2708
3144
|
});
|
|
2709
|
-
return
|
|
2710
|
-
|
|
2711
|
-
}, []), /* @__PURE__ */ T("div", { className:
|
|
2712
|
-
/* @__PURE__ */
|
|
3145
|
+
return pr(() => {
|
|
3146
|
+
P.current && v(P.current.offsetWidth + 18 + 10);
|
|
3147
|
+
}, []), /* @__PURE__ */ T("div", { className: I.wrapper, children: [
|
|
3148
|
+
/* @__PURE__ */ l(
|
|
2713
3149
|
"label",
|
|
2714
3150
|
{
|
|
2715
3151
|
htmlFor: x,
|
|
2716
|
-
id:
|
|
2717
|
-
className:
|
|
3152
|
+
id: g,
|
|
3153
|
+
className: I.accessibleLabel,
|
|
2718
3154
|
children: r
|
|
2719
3155
|
}
|
|
2720
3156
|
),
|
|
2721
|
-
/* @__PURE__ */
|
|
3157
|
+
/* @__PURE__ */ l(
|
|
2722
3158
|
"input",
|
|
2723
3159
|
{
|
|
2724
|
-
ref:
|
|
3160
|
+
ref: L,
|
|
2725
3161
|
id: x,
|
|
2726
3162
|
name: t,
|
|
2727
|
-
type:
|
|
2728
|
-
disabled:
|
|
2729
|
-
placeholder:
|
|
2730
|
-
className:
|
|
2731
|
-
...
|
|
2732
|
-
...
|
|
2733
|
-
...
|
|
2734
|
-
...
|
|
3163
|
+
type: u,
|
|
3164
|
+
disabled: d,
|
|
3165
|
+
placeholder: a ? void 0 : " ",
|
|
3166
|
+
className: I.input,
|
|
3167
|
+
...p && { "aria-describedby": `${x}-helper` },
|
|
3168
|
+
...n && { "aria-invalid": "true" },
|
|
3169
|
+
...b && !a && { style: { paddingRight: W } },
|
|
3170
|
+
...S
|
|
2735
3171
|
}
|
|
2736
3172
|
),
|
|
2737
|
-
!
|
|
3173
|
+
!a && !c && /* @__PURE__ */ l(
|
|
2738
3174
|
"label",
|
|
2739
3175
|
{
|
|
2740
3176
|
"aria-hidden": !0,
|
|
2741
3177
|
htmlFor: x,
|
|
2742
|
-
className:
|
|
3178
|
+
className: I.visibleLabel,
|
|
2743
3179
|
children: r
|
|
2744
3180
|
}
|
|
2745
3181
|
),
|
|
2746
|
-
|
|
3182
|
+
p && /* @__PURE__ */ l(
|
|
2747
3183
|
"div",
|
|
2748
3184
|
{
|
|
2749
3185
|
id: `${x}-helper`,
|
|
2750
|
-
className:
|
|
2751
|
-
children:
|
|
3186
|
+
className: I.helperText,
|
|
3187
|
+
children: p
|
|
2752
3188
|
}
|
|
2753
3189
|
),
|
|
2754
|
-
|
|
3190
|
+
b && /* @__PURE__ */ l(
|
|
2755
3191
|
"div",
|
|
2756
3192
|
{
|
|
2757
|
-
ref:
|
|
2758
|
-
className:
|
|
2759
|
-
children:
|
|
3193
|
+
ref: P,
|
|
3194
|
+
className: I.rightElement,
|
|
3195
|
+
children: b
|
|
2760
3196
|
}
|
|
2761
3197
|
),
|
|
2762
|
-
|
|
3198
|
+
n && p && /* @__PURE__ */ l(ar, { politeness: "polite", clearAnnouncementDelay: 500, children: D })
|
|
2763
3199
|
] });
|
|
2764
3200
|
}
|
|
2765
3201
|
);
|
|
2766
|
-
|
|
2767
|
-
const
|
|
3202
|
+
et.displayName = "TextInput";
|
|
3203
|
+
const za = 500, Ya = 5e3, qa = 2e4, sr = B.forwardRef(
|
|
2768
3204
|
({
|
|
2769
3205
|
name: e,
|
|
2770
3206
|
disabled: t,
|
|
2771
3207
|
label: r,
|
|
2772
|
-
labelHidden:
|
|
2773
|
-
onMaskChange:
|
|
3208
|
+
labelHidden: n,
|
|
3209
|
+
onMaskChange: a,
|
|
2774
3210
|
onChange: o,
|
|
2775
3211
|
onBlur: s,
|
|
2776
3212
|
onFocus: i,
|
|
2777
|
-
onTextInputMaskBlur:
|
|
2778
|
-
rightElement:
|
|
2779
|
-
spacing:
|
|
2780
|
-
...
|
|
2781
|
-
},
|
|
2782
|
-
const [
|
|
3213
|
+
onTextInputMaskBlur: m,
|
|
3214
|
+
rightElement: d,
|
|
3215
|
+
spacing: h,
|
|
3216
|
+
...g
|
|
3217
|
+
}, c) => {
|
|
3218
|
+
const [u, p] = j(!0), [b, w] = j({
|
|
2783
3219
|
message: null,
|
|
2784
3220
|
politeness: null
|
|
2785
|
-
}),
|
|
2786
|
-
clearTimeout(
|
|
2787
|
-
|
|
2788
|
-
announcementTimeout:
|
|
3221
|
+
}), S = J(!0), L = J(), P = J(null), W = Da([c, P]), v = u ? "Show" : "Hide", x = () => {
|
|
3222
|
+
clearTimeout(L.current), S.current || (L.current = window.setTimeout(() => {
|
|
3223
|
+
S.current = !0, p(!0), w({
|
|
3224
|
+
announcementTimeout: Ya,
|
|
2789
3225
|
politeness: "polite",
|
|
2790
3226
|
message: `${r} hiding characters`
|
|
2791
|
-
}),
|
|
2792
|
-
},
|
|
2793
|
-
},
|
|
2794
|
-
|
|
2795
|
-
const
|
|
2796
|
-
|
|
2797
|
-
announcementTimeout:
|
|
3227
|
+
}), a && a(!0);
|
|
3228
|
+
}, qa));
|
|
3229
|
+
}, D = (O) => {
|
|
3230
|
+
O.preventDefault();
|
|
3231
|
+
const U = !S.current;
|
|
3232
|
+
S.current = U, x(), p(U), w({
|
|
3233
|
+
announcementTimeout: za,
|
|
2798
3234
|
politeness: "assertive",
|
|
2799
|
-
message:
|
|
2800
|
-
}),
|
|
2801
|
-
},
|
|
2802
|
-
var
|
|
2803
|
-
const { relatedTarget:
|
|
2804
|
-
|
|
2805
|
-
},
|
|
2806
|
-
x(), s && s(
|
|
2807
|
-
},
|
|
2808
|
-
x(), i && i(
|
|
2809
|
-
},
|
|
2810
|
-
x(), o && o(
|
|
3235
|
+
message: U ? "Characters hidden" : "Characters showing"
|
|
3236
|
+
}), a && a(U);
|
|
3237
|
+
}, I = (O) => {
|
|
3238
|
+
var U;
|
|
3239
|
+
const { relatedTarget: Me } = O, y = (U = P.current) == null ? void 0 : U.parentElement;
|
|
3240
|
+
y != null && y.contains(Me) || m && m();
|
|
3241
|
+
}, Pe = (O) => {
|
|
3242
|
+
x(), s && s(O), I(O);
|
|
3243
|
+
}, De = (O) => {
|
|
3244
|
+
x(), i && i(O);
|
|
3245
|
+
}, $e = (O) => {
|
|
3246
|
+
x(), o && o(O);
|
|
2811
3247
|
};
|
|
2812
3248
|
return z(() => () => {
|
|
2813
|
-
clearTimeout(
|
|
2814
|
-
}, []), /* @__PURE__ */ T(
|
|
2815
|
-
/* @__PURE__ */
|
|
2816
|
-
|
|
3249
|
+
clearTimeout(L.current);
|
|
3250
|
+
}, []), /* @__PURE__ */ T(le, { children: [
|
|
3251
|
+
/* @__PURE__ */ l(
|
|
3252
|
+
et,
|
|
2817
3253
|
{
|
|
2818
|
-
ref:
|
|
3254
|
+
ref: W,
|
|
2819
3255
|
name: e,
|
|
2820
3256
|
label: r,
|
|
2821
|
-
labelHidden:
|
|
2822
|
-
type:
|
|
3257
|
+
labelHidden: n,
|
|
3258
|
+
type: u ? "password" : "text",
|
|
2823
3259
|
disabled: t,
|
|
2824
|
-
spacing:
|
|
2825
|
-
onBlur:
|
|
2826
|
-
onFocus:
|
|
2827
|
-
onChange:
|
|
2828
|
-
rightElement:
|
|
2829
|
-
ref:
|
|
2830
|
-
label:
|
|
2831
|
-
onClick:
|
|
2832
|
-
onBlur:
|
|
3260
|
+
spacing: h,
|
|
3261
|
+
onBlur: Pe,
|
|
3262
|
+
onFocus: De,
|
|
3263
|
+
onChange: $e,
|
|
3264
|
+
rightElement: B.cloneElement(d, {
|
|
3265
|
+
ref: c,
|
|
3266
|
+
label: v,
|
|
3267
|
+
onClick: D,
|
|
3268
|
+
onBlur: I,
|
|
2833
3269
|
disabled: t
|
|
2834
3270
|
}),
|
|
2835
|
-
...
|
|
3271
|
+
...g
|
|
2836
3272
|
}
|
|
2837
3273
|
),
|
|
2838
|
-
/* @__PURE__ */
|
|
2839
|
-
|
|
3274
|
+
/* @__PURE__ */ l(
|
|
3275
|
+
ar,
|
|
2840
3276
|
{
|
|
2841
3277
|
role: "status",
|
|
2842
|
-
politeness:
|
|
2843
|
-
clearAnnouncementDelay:
|
|
2844
|
-
children:
|
|
3278
|
+
politeness: b.politeness,
|
|
3279
|
+
clearAnnouncementDelay: b.announcementTimeout,
|
|
3280
|
+
children: b.message
|
|
2845
3281
|
}
|
|
2846
3282
|
)
|
|
2847
3283
|
] });
|
|
2848
3284
|
}
|
|
2849
3285
|
);
|
|
2850
|
-
|
|
3286
|
+
sr.displayName = "TextInputMask";
|
|
2851
3287
|
/*!
|
|
2852
3288
|
@versini/ui-form v1.3.6
|
|
2853
3289
|
© 2024 gizmette.com
|
|
@@ -2861,7 +3297,7 @@ try {
|
|
|
2861
3297
|
});
|
|
2862
3298
|
} catch {
|
|
2863
3299
|
}
|
|
2864
|
-
const
|
|
3300
|
+
const Qa = (e) => {
|
|
2865
3301
|
let t = "";
|
|
2866
3302
|
if (typeof e == "number" || typeof e == "string")
|
|
2867
3303
|
t = "m-" + e;
|
|
@@ -2870,38 +3306,38 @@ const cn = (e) => {
|
|
|
2870
3306
|
(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(" ");
|
|
2871
3307
|
}
|
|
2872
3308
|
return t;
|
|
2873
|
-
},
|
|
3309
|
+
}, Oe = ({
|
|
2874
3310
|
children: e,
|
|
2875
3311
|
fill: t,
|
|
2876
3312
|
viewBox: r,
|
|
2877
|
-
className:
|
|
2878
|
-
defaultViewBox:
|
|
3313
|
+
className: n,
|
|
3314
|
+
defaultViewBox: a,
|
|
2879
3315
|
defaultClassName: o,
|
|
2880
3316
|
spacing: s,
|
|
2881
3317
|
title: i,
|
|
2882
|
-
semantic:
|
|
2883
|
-
...
|
|
3318
|
+
semantic: m = !1,
|
|
3319
|
+
...d
|
|
2884
3320
|
}) => {
|
|
2885
|
-
const
|
|
2886
|
-
|
|
2887
|
-
|
|
3321
|
+
const h = Qa(s), g = f(
|
|
3322
|
+
h,
|
|
3323
|
+
n || o
|
|
2888
3324
|
);
|
|
2889
|
-
return /* @__PURE__ */ T(
|
|
2890
|
-
/* @__PURE__ */
|
|
3325
|
+
return /* @__PURE__ */ T(le, { children: [
|
|
3326
|
+
/* @__PURE__ */ l(
|
|
2891
3327
|
"svg",
|
|
2892
3328
|
{
|
|
2893
3329
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2894
|
-
className:
|
|
2895
|
-
viewBox: r ||
|
|
3330
|
+
className: g,
|
|
3331
|
+
viewBox: r || a,
|
|
2896
3332
|
fill: t || "currentColor",
|
|
2897
3333
|
role: "img",
|
|
2898
|
-
"aria-hidden": !
|
|
3334
|
+
"aria-hidden": !m,
|
|
2899
3335
|
focusable: !1,
|
|
2900
|
-
...
|
|
3336
|
+
...d,
|
|
2901
3337
|
children: e
|
|
2902
3338
|
}
|
|
2903
3339
|
),
|
|
2904
|
-
i &&
|
|
3340
|
+
i && m && /* @__PURE__ */ l("span", { className: "sr-only", children: i })
|
|
2905
3341
|
] });
|
|
2906
3342
|
};
|
|
2907
3343
|
/*!
|
|
@@ -2917,13 +3353,13 @@ try {
|
|
|
2917
3353
|
});
|
|
2918
3354
|
} catch {
|
|
2919
3355
|
}
|
|
2920
|
-
const
|
|
3356
|
+
const Xa = ({
|
|
2921
3357
|
className: e,
|
|
2922
3358
|
viewBox: t,
|
|
2923
3359
|
spacing: r,
|
|
2924
|
-
...
|
|
2925
|
-
}) => /* @__PURE__ */
|
|
2926
|
-
|
|
3360
|
+
...n
|
|
3361
|
+
}) => /* @__PURE__ */ l(
|
|
3362
|
+
Oe,
|
|
2927
3363
|
{
|
|
2928
3364
|
defaultViewBox: "0 0 1200 500",
|
|
2929
3365
|
defaultClassName: "w-full",
|
|
@@ -2931,8 +3367,8 @@ const ln = ({
|
|
|
2931
3367
|
className: e,
|
|
2932
3368
|
spacing: r,
|
|
2933
3369
|
title: "Sassy Dog",
|
|
2934
|
-
...
|
|
2935
|
-
children: /* @__PURE__ */
|
|
3370
|
+
...n,
|
|
3371
|
+
children: /* @__PURE__ */ l("g", { transform: "matrix(11.9092 0 0 11.9092 470.0017 250.0009)", id: "879221", children: /* @__PURE__ */ l(
|
|
2936
3372
|
"path",
|
|
2937
3373
|
{
|
|
2938
3374
|
vectorEffect: "non-scaling-stroke",
|
|
@@ -2942,61 +3378,61 @@ const ln = ({
|
|
|
2942
3378
|
}
|
|
2943
3379
|
) })
|
|
2944
3380
|
}
|
|
2945
|
-
),
|
|
3381
|
+
), Za = ({
|
|
2946
3382
|
className: e,
|
|
2947
3383
|
viewBox: t,
|
|
2948
3384
|
spacing: r,
|
|
2949
|
-
title:
|
|
2950
|
-
monotone:
|
|
3385
|
+
title: n,
|
|
3386
|
+
monotone: a,
|
|
2951
3387
|
...o
|
|
2952
3388
|
}) => /* @__PURE__ */ T(
|
|
2953
|
-
|
|
3389
|
+
Oe,
|
|
2954
3390
|
{
|
|
2955
3391
|
defaultViewBox: "0 0 640 512",
|
|
2956
3392
|
defaultClassName: "size-5",
|
|
2957
3393
|
viewBox: t,
|
|
2958
3394
|
className: e,
|
|
2959
3395
|
spacing: r,
|
|
2960
|
-
title:
|
|
3396
|
+
title: n || "Hide",
|
|
2961
3397
|
...o,
|
|
2962
3398
|
children: [
|
|
2963
|
-
/* @__PURE__ */
|
|
3399
|
+
/* @__PURE__ */ l(
|
|
2964
3400
|
"path",
|
|
2965
3401
|
{
|
|
2966
|
-
opacity:
|
|
3402
|
+
opacity: a ? "1" : "0.4",
|
|
2967
3403
|
d: "M360.8 380.3C339.4 392.8 314.6 400 288 400c-79.5 0-144-64.5-144-144c0-14.5 2.1-28.5 6.1-41.7L63.5 146c-29.4 34.7-49.9 70.8-61.1 97.6c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480c56.1 0 104.4-17.8 144.5-43.2l-71.7-56.5zM198.5 252.4c-3.7 .8-6.7 3.7-6.5 7.7c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9c1.9-.5 3.9-1.1 5.7-1.7l-120-94.6zm89-52.4l94.8 74.3c2.7-13.9 2.4-28.6-1.5-43.2c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 2.7-.2 5.4-.5 8zM432 256c0 17.7-3.2 34.6-9 50.2l84.1 65.9c32.3-36.6 54.6-75.4 66.4-103.9c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32c-60 0-111.1 20.3-152.8 48.7L207 136.9c23.1-15.7 51-24.9 81-24.9c79.5 0 144 64.5 144 144z"
|
|
2968
3404
|
}
|
|
2969
3405
|
),
|
|
2970
|
-
/* @__PURE__ */
|
|
3406
|
+
/* @__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" })
|
|
2971
3407
|
]
|
|
2972
3408
|
}
|
|
2973
|
-
),
|
|
3409
|
+
), eo = ({
|
|
2974
3410
|
className: e,
|
|
2975
3411
|
viewBox: t,
|
|
2976
3412
|
spacing: r,
|
|
2977
|
-
title:
|
|
2978
|
-
monotone:
|
|
3413
|
+
title: n,
|
|
3414
|
+
monotone: a,
|
|
2979
3415
|
...o
|
|
2980
3416
|
}) => /* @__PURE__ */ T(
|
|
2981
|
-
|
|
3417
|
+
Oe,
|
|
2982
3418
|
{
|
|
2983
3419
|
defaultViewBox: "0 0 512 512",
|
|
2984
3420
|
defaultClassName: "size-5",
|
|
2985
3421
|
viewBox: t,
|
|
2986
3422
|
className: e,
|
|
2987
3423
|
spacing: r,
|
|
2988
|
-
title:
|
|
3424
|
+
title: n || "Key",
|
|
2989
3425
|
...o,
|
|
2990
3426
|
children: [
|
|
2991
|
-
/* @__PURE__ */
|
|
3427
|
+
/* @__PURE__ */ l(
|
|
2992
3428
|
"path",
|
|
2993
3429
|
{
|
|
2994
3430
|
className: "fa-secondary",
|
|
2995
|
-
opacity:
|
|
3431
|
+
opacity: a ? "1" : "0.4",
|
|
2996
3432
|
d: "M168.3 229.7L282.3 343.7l0 0s0 0 0 0L249 377c-4.5 4.5-10.6 7-17 7H192v40c0 13.3-10.7 24-24 24H128v40c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V408c0-6.4 2.5-12.5 7-17L168.3 229.7s0 0 0 0l0 0z"
|
|
2997
3433
|
}
|
|
2998
3434
|
),
|
|
2999
|
-
/* @__PURE__ */
|
|
3435
|
+
/* @__PURE__ */ l(
|
|
3000
3436
|
"path",
|
|
3001
3437
|
{
|
|
3002
3438
|
className: "fa-primary",
|
|
@@ -3005,32 +3441,32 @@ const ln = ({
|
|
|
3005
3441
|
)
|
|
3006
3442
|
]
|
|
3007
3443
|
}
|
|
3008
|
-
),
|
|
3444
|
+
), to = ({
|
|
3009
3445
|
className: e,
|
|
3010
3446
|
viewBox: t,
|
|
3011
3447
|
spacing: r,
|
|
3012
|
-
title:
|
|
3013
|
-
monotone:
|
|
3448
|
+
title: n,
|
|
3449
|
+
monotone: a,
|
|
3014
3450
|
...o
|
|
3015
3451
|
}) => /* @__PURE__ */ T(
|
|
3016
|
-
|
|
3452
|
+
Oe,
|
|
3017
3453
|
{
|
|
3018
3454
|
defaultViewBox: "0 0 576 512",
|
|
3019
3455
|
defaultClassName: "size-5",
|
|
3020
3456
|
viewBox: t,
|
|
3021
3457
|
className: e,
|
|
3022
3458
|
spacing: r,
|
|
3023
|
-
title:
|
|
3459
|
+
title: n || "Show",
|
|
3024
3460
|
...o,
|
|
3025
3461
|
children: [
|
|
3026
|
-
/* @__PURE__ */
|
|
3462
|
+
/* @__PURE__ */ l(
|
|
3027
3463
|
"path",
|
|
3028
3464
|
{
|
|
3029
|
-
opacity:
|
|
3465
|
+
opacity: a ? "1" : "0.4",
|
|
3030
3466
|
d: "M95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 400a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"
|
|
3031
3467
|
}
|
|
3032
3468
|
),
|
|
3033
|
-
/* @__PURE__ */
|
|
3469
|
+
/* @__PURE__ */ l("path", { d: "M224 256c35.3 0 64-28.7 64-64c0-7.1-1.2-13.9-3.3-20.3c-1.8-5.5 1.6-11.9 7.4-11.7c40.8 1.7 77.5 29.6 88.6 71.1c13.7 51.2-16.7 103.9-67.9 117.6s-103.9-16.7-117.6-67.9c-1.9-6.9-2.9-13.9-3.2-20.7c-.3-5.8 6.1-9.2 11.7-7.4c6.4 2.1 13.2 3.3 20.3 3.3z" })
|
|
3034
3470
|
]
|
|
3035
3471
|
}
|
|
3036
3472
|
);
|
|
@@ -3047,7 +3483,7 @@ try {
|
|
|
3047
3483
|
});
|
|
3048
3484
|
} catch {
|
|
3049
3485
|
}
|
|
3050
|
-
const
|
|
3486
|
+
const ro = (e) => {
|
|
3051
3487
|
let t = "";
|
|
3052
3488
|
if (typeof e == "number" || typeof e == "string")
|
|
3053
3489
|
t = "m-" + e;
|
|
@@ -3056,42 +3492,42 @@ const hn = (e) => {
|
|
|
3056
3492
|
(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(" ");
|
|
3057
3493
|
}
|
|
3058
3494
|
return t;
|
|
3059
|
-
},
|
|
3495
|
+
}, no = "av-flexgrid", Ee = "av-flexgrid-item", _e = 0.25, ir = B.createContext({
|
|
3060
3496
|
columnGap: 0,
|
|
3061
3497
|
rowGap: 0
|
|
3062
|
-
}),
|
|
3498
|
+
}), wt = ({
|
|
3063
3499
|
children: e,
|
|
3064
3500
|
className: t,
|
|
3065
3501
|
columnGap: r = 1,
|
|
3066
|
-
rowGap:
|
|
3067
|
-
height:
|
|
3502
|
+
rowGap: n = 0,
|
|
3503
|
+
height: a = "auto",
|
|
3068
3504
|
width: o = "auto",
|
|
3069
3505
|
direction: s = "row",
|
|
3070
3506
|
alignHorizontal: i = "normal",
|
|
3071
|
-
alignVertical:
|
|
3072
|
-
spacing:
|
|
3073
|
-
...
|
|
3507
|
+
alignVertical: m = "normal",
|
|
3508
|
+
spacing: d,
|
|
3509
|
+
...h
|
|
3074
3510
|
}) => {
|
|
3075
|
-
const
|
|
3511
|
+
const g = {
|
|
3076
3512
|
flexDirection: s,
|
|
3077
3513
|
justifyContent: i,
|
|
3078
|
-
alignItems:
|
|
3079
|
-
height:
|
|
3514
|
+
alignItems: m,
|
|
3515
|
+
height: a,
|
|
3080
3516
|
width: o,
|
|
3081
3517
|
/**
|
|
3082
3518
|
* Trick to account for the extra space taken
|
|
3083
3519
|
* by the columnGap and rowGap that will be applied
|
|
3084
3520
|
* to all FlexgridItems (see context and paddings).
|
|
3085
3521
|
*/
|
|
3086
|
-
marginLeft: r * -1 *
|
|
3087
|
-
marginTop:
|
|
3088
|
-
},
|
|
3089
|
-
|
|
3522
|
+
marginLeft: r * -1 * _e + "rem",
|
|
3523
|
+
marginTop: n * -1 * _e + "rem"
|
|
3524
|
+
}, c = f(
|
|
3525
|
+
no,
|
|
3090
3526
|
t,
|
|
3091
3527
|
"box-border flex flex-wrap"
|
|
3092
|
-
),
|
|
3093
|
-
return /* @__PURE__ */
|
|
3094
|
-
},
|
|
3528
|
+
), u = { columnGap: r, rowGap: n }, p = d ? "div" : B.Fragment;
|
|
3529
|
+
return /* @__PURE__ */ l(p, { ...d ? { className: ro(d) } : {}, children: /* @__PURE__ */ l("div", { className: c, style: g, ...h, children: /* @__PURE__ */ l(ir.Provider, { value: u, children: e }) }) });
|
|
3530
|
+
}, je = (e, t) => f({
|
|
3095
3531
|
"basis-1/12": e === 1 && !t,
|
|
3096
3532
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
3097
3533
|
"md:basis-1/12": e === 1 && t === "md",
|
|
@@ -3164,43 +3600,43 @@ const hn = (e) => {
|
|
|
3164
3600
|
"lg:basis-full": e === 12 && t === "lg",
|
|
3165
3601
|
"xl:basis-full": e === 12 && t === "xl",
|
|
3166
3602
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
3167
|
-
}),
|
|
3603
|
+
}), ao = ({
|
|
3168
3604
|
className: e,
|
|
3169
3605
|
span: t
|
|
3170
3606
|
}) => {
|
|
3171
3607
|
if (!t)
|
|
3172
|
-
return f(e,
|
|
3608
|
+
return f(e, Ee, "box-border basis-auto");
|
|
3173
3609
|
if (typeof t == "number")
|
|
3174
|
-
return f(e,
|
|
3175
|
-
[`${
|
|
3610
|
+
return f(e, Ee, "box-border max-w-full", {
|
|
3611
|
+
[`${je(t)}`]: !0
|
|
3176
3612
|
});
|
|
3177
3613
|
if (typeof t == "string")
|
|
3178
|
-
return f(e,
|
|
3614
|
+
return f(e, Ee, "box-border basis-auto", {
|
|
3179
3615
|
"max-w-full grow": t === "auto"
|
|
3180
3616
|
});
|
|
3181
3617
|
if (typeof t == "object") {
|
|
3182
|
-
const r = Object.entries(t).map(([
|
|
3618
|
+
const r = Object.entries(t).map(([n, a]) => n === "fallback" ? je(a) : je(a, n));
|
|
3183
3619
|
return f(
|
|
3184
3620
|
e,
|
|
3185
|
-
|
|
3621
|
+
Ee,
|
|
3186
3622
|
"box-border",
|
|
3187
3623
|
r
|
|
3188
3624
|
);
|
|
3189
3625
|
}
|
|
3190
|
-
},
|
|
3626
|
+
}, ee = ({
|
|
3191
3627
|
children: e,
|
|
3192
3628
|
className: t,
|
|
3193
3629
|
span: r,
|
|
3194
|
-
...
|
|
3630
|
+
...n
|
|
3195
3631
|
}) => {
|
|
3196
|
-
const { columnGap:
|
|
3197
|
-
paddingLeft:
|
|
3198
|
-
paddingTop: o *
|
|
3199
|
-
}, i =
|
|
3632
|
+
const { columnGap: a, rowGap: o } = vt(ir), s = {
|
|
3633
|
+
paddingLeft: a * _e + "rem",
|
|
3634
|
+
paddingTop: o * _e + "rem"
|
|
3635
|
+
}, i = ao({
|
|
3200
3636
|
className: t,
|
|
3201
3637
|
span: r
|
|
3202
3638
|
});
|
|
3203
|
-
return /* @__PURE__ */
|
|
3639
|
+
return /* @__PURE__ */ l("div", { className: i, style: s, ...n, children: e });
|
|
3204
3640
|
};
|
|
3205
3641
|
/*!
|
|
3206
3642
|
@versini/ui-system v1.4.2
|
|
@@ -3215,7 +3651,7 @@ try {
|
|
|
3215
3651
|
});
|
|
3216
3652
|
} catch {
|
|
3217
3653
|
}
|
|
3218
|
-
const
|
|
3654
|
+
const oo = "ASK! ME! ANYTHING!", cr = "Sassy Saint", so = "gizmette.com", io = "Log in", co = "Sign in with a Passkey", ys = "Log out", lo = "Password", uo = "Powered by OpenAI", bs = "Send", ws = "Profile", Es = "Statistics", vs = "Chat history", Ts = "About", Ss = "Type your question here", Is = "Clear chat", As = "Cancel chat", ks = "N/A", _s = {
|
|
3219
3655
|
PREFERENCES: {
|
|
3220
3656
|
TITLE: "User preferences",
|
|
3221
3657
|
NAME: "Name",
|
|
@@ -3247,66 +3683,66 @@ const fn = "ASK! ME! ANYTHING!", Jt = "Sassy Saint", yn = "gizmette.com", bn = "
|
|
|
3247
3683
|
ENGINE: "OpenAI model",
|
|
3248
3684
|
PLUGIN: "Plugin"
|
|
3249
3685
|
}
|
|
3250
|
-
},
|
|
3686
|
+
}, mo = ({
|
|
3251
3687
|
serverStats: e
|
|
3252
|
-
}) => /* @__PURE__ */
|
|
3253
|
-
|
|
3688
|
+
}) => /* @__PURE__ */ l(
|
|
3689
|
+
Oa,
|
|
3254
3690
|
{
|
|
3255
3691
|
mode: "light",
|
|
3256
3692
|
row1: /* @__PURE__ */ T("div", { children: [
|
|
3257
|
-
|
|
3693
|
+
cr,
|
|
3258
3694
|
" v",
|
|
3259
|
-
"3.4.
|
|
3695
|
+
"3.4.2",
|
|
3260
3696
|
" - ",
|
|
3261
|
-
|
|
3262
|
-
|
|
3697
|
+
uo,
|
|
3698
|
+
Xe && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
|
|
3263
3699
|
] }),
|
|
3264
3700
|
row2: /* @__PURE__ */ T("div", { children: [
|
|
3265
3701
|
"© ",
|
|
3266
3702
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
3267
3703
|
" ",
|
|
3268
|
-
|
|
3704
|
+
so
|
|
3269
3705
|
] })
|
|
3270
3706
|
}
|
|
3271
|
-
),
|
|
3272
|
-
const { isAuthenticated: e } =
|
|
3273
|
-
return /* @__PURE__ */ T(
|
|
3274
|
-
e && /* @__PURE__ */
|
|
3707
|
+
), ho = St(() => import("./LazyHeader.B56caFgn.js")), po = () => {
|
|
3708
|
+
const { isAuthenticated: e } = Qe();
|
|
3709
|
+
return /* @__PURE__ */ T(le, { children: [
|
|
3710
|
+
e && /* @__PURE__ */ l(It, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(ho, {}) }),
|
|
3275
3711
|
/* @__PURE__ */ T("div", { className: "flex items-center justify-center", children: [
|
|
3276
|
-
/* @__PURE__ */
|
|
3712
|
+
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(Xa, {}) }),
|
|
3277
3713
|
/* @__PURE__ */ T("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3278
|
-
/* @__PURE__ */
|
|
3279
|
-
/* @__PURE__ */
|
|
3714
|
+
/* @__PURE__ */ l("h1", { children: cr }),
|
|
3715
|
+
/* @__PURE__ */ l("h2", { children: oo })
|
|
3280
3716
|
] })
|
|
3281
3717
|
] })
|
|
3282
3718
|
] });
|
|
3283
|
-
},
|
|
3284
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } =
|
|
3719
|
+
}, go = () => {
|
|
3720
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = Qe(), [n, a] = j(""), [o, s] = j(""), [i, m] = j(!0), [d, h] = j({
|
|
3285
3721
|
username: "",
|
|
3286
3722
|
password: ""
|
|
3287
|
-
}),
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
) || (s(""),
|
|
3723
|
+
}), g = async (c) => {
|
|
3724
|
+
c.preventDefault(), await e(
|
|
3725
|
+
d.username,
|
|
3726
|
+
d.password,
|
|
3727
|
+
re.CODE
|
|
3728
|
+
) || (s(""), a("Invalid username or password"));
|
|
3293
3729
|
};
|
|
3294
3730
|
return z(() => {
|
|
3295
|
-
var
|
|
3296
|
-
(
|
|
3297
|
-
var
|
|
3298
|
-
(
|
|
3731
|
+
var c;
|
|
3732
|
+
(c = document.getElementById("logo")) == null || c.classList.add("fadeOut"), setTimeout(() => {
|
|
3733
|
+
var u;
|
|
3734
|
+
(u = document.getElementById("root")) == null || u.classList.replace("app-hidden", "fadeIn");
|
|
3299
3735
|
}, 500);
|
|
3300
3736
|
}), z(() => {
|
|
3301
3737
|
t && s(t);
|
|
3302
|
-
}, [t]), /* @__PURE__ */ T(
|
|
3303
|
-
/* @__PURE__ */ T(
|
|
3304
|
-
/* @__PURE__ */
|
|
3305
|
-
/* @__PURE__ */ T("form", { className: "mt-5", onSubmit:
|
|
3306
|
-
/* @__PURE__ */
|
|
3307
|
-
/* @__PURE__ */
|
|
3308
|
-
/* @__PURE__ */
|
|
3309
|
-
|
|
3738
|
+
}, [t]), /* @__PURE__ */ T(le, { children: [
|
|
3739
|
+
/* @__PURE__ */ T(Pa, { children: [
|
|
3740
|
+
/* @__PURE__ */ l("div", { className: ya(), children: /* @__PURE__ */ l(po, {}) }),
|
|
3741
|
+
/* @__PURE__ */ T("form", { className: "mt-5", onSubmit: g, children: [
|
|
3742
|
+
/* @__PURE__ */ l(wt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ l(ee, { span: 6, children: /* @__PURE__ */ T(xa, { mode: "dark", children: [
|
|
3743
|
+
/* @__PURE__ */ l(ee, { span: 12, children: o && /* @__PURE__ */ l("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
|
|
3744
|
+
/* @__PURE__ */ l(ee, { span: 12, children: /* @__PURE__ */ l(
|
|
3745
|
+
et,
|
|
3310
3746
|
{
|
|
3311
3747
|
required: !0,
|
|
3312
3748
|
autoCapitalize: "off",
|
|
@@ -3316,17 +3752,17 @@ const fn = "ASK! ME! ANYTHING!", Jt = "Sassy Saint", yn = "gizmette.com", bn = "
|
|
|
3316
3752
|
focusMode: "light",
|
|
3317
3753
|
name: "username",
|
|
3318
3754
|
label: "Username",
|
|
3319
|
-
onChange: (
|
|
3320
|
-
|
|
3321
|
-
...
|
|
3322
|
-
username:
|
|
3323
|
-
}),
|
|
3755
|
+
onChange: (c) => {
|
|
3756
|
+
h({
|
|
3757
|
+
...d,
|
|
3758
|
+
username: c.target.value
|
|
3759
|
+
}), a("");
|
|
3324
3760
|
},
|
|
3325
|
-
error:
|
|
3761
|
+
error: n !== ""
|
|
3326
3762
|
}
|
|
3327
3763
|
) }),
|
|
3328
|
-
/* @__PURE__ */
|
|
3329
|
-
|
|
3764
|
+
/* @__PURE__ */ l(ee, { span: 12, children: /* @__PURE__ */ l(
|
|
3765
|
+
sr,
|
|
3330
3766
|
{
|
|
3331
3767
|
required: !0,
|
|
3332
3768
|
autoCapitalize: "off",
|
|
@@ -3335,21 +3771,21 @@ const fn = "ASK! ME! ANYTHING!", Jt = "Sassy Saint", yn = "gizmette.com", bn = "
|
|
|
3335
3771
|
mode: "dark",
|
|
3336
3772
|
focusMode: "light",
|
|
3337
3773
|
name: "password",
|
|
3338
|
-
label:
|
|
3339
|
-
rightElement: /* @__PURE__ */
|
|
3340
|
-
onMaskChange:
|
|
3341
|
-
onChange: (
|
|
3342
|
-
|
|
3343
|
-
...
|
|
3344
|
-
password:
|
|
3345
|
-
}),
|
|
3774
|
+
label: lo,
|
|
3775
|
+
rightElement: /* @__PURE__ */ l(ze, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ l(to, {}) : /* @__PURE__ */ l(Za, {}) }),
|
|
3776
|
+
onMaskChange: m,
|
|
3777
|
+
onChange: (c) => {
|
|
3778
|
+
h({
|
|
3779
|
+
...d,
|
|
3780
|
+
password: c.target.value
|
|
3781
|
+
}), a("");
|
|
3346
3782
|
},
|
|
3347
|
-
error:
|
|
3348
|
-
helperText:
|
|
3783
|
+
error: n !== "",
|
|
3784
|
+
helperText: n
|
|
3349
3785
|
}
|
|
3350
3786
|
) }),
|
|
3351
|
-
/* @__PURE__ */
|
|
3352
|
-
|
|
3787
|
+
/* @__PURE__ */ l(ee, { span: 12, children: /* @__PURE__ */ l(
|
|
3788
|
+
tr,
|
|
3353
3789
|
{
|
|
3354
3790
|
mode: "light",
|
|
3355
3791
|
focusMode: "light",
|
|
@@ -3357,110 +3793,110 @@ const fn = "ASK! ME! ANYTHING!", Jt = "Sassy Saint", yn = "gizmette.com", bn = "
|
|
|
3357
3793
|
noBorder: !0,
|
|
3358
3794
|
type: "submit",
|
|
3359
3795
|
className: "mb-4 mt-6",
|
|
3360
|
-
children:
|
|
3796
|
+
children: io
|
|
3361
3797
|
}
|
|
3362
3798
|
) })
|
|
3363
3799
|
] }) }) }),
|
|
3364
|
-
/* @__PURE__ */
|
|
3365
|
-
/* @__PURE__ */
|
|
3366
|
-
|
|
3800
|
+
/* @__PURE__ */ l("div", { className: "text-center text-copy-light", children: "or" }),
|
|
3801
|
+
/* @__PURE__ */ l(wt, { alignHorizontal: "center", children: /* @__PURE__ */ l(ee, { span: 6, children: /* @__PURE__ */ l(
|
|
3802
|
+
ze,
|
|
3367
3803
|
{
|
|
3368
3804
|
mode: "dark",
|
|
3369
3805
|
focusMode: "light",
|
|
3370
3806
|
fullWidth: !0,
|
|
3371
3807
|
noBorder: !0,
|
|
3372
3808
|
className: "mb-4 mt-1",
|
|
3373
|
-
labelRight:
|
|
3809
|
+
labelRight: co,
|
|
3374
3810
|
onClick: r,
|
|
3375
|
-
children: /* @__PURE__ */
|
|
3811
|
+
children: /* @__PURE__ */ l(eo, { className: "size-4" })
|
|
3376
3812
|
}
|
|
3377
3813
|
) }) })
|
|
3378
3814
|
] })
|
|
3379
3815
|
] }),
|
|
3380
|
-
/* @__PURE__ */
|
|
3816
|
+
/* @__PURE__ */ l(mo, {})
|
|
3381
3817
|
] });
|
|
3382
|
-
},
|
|
3383
|
-
const { isAuthenticated: t } =
|
|
3384
|
-
return t ? /* @__PURE__ */
|
|
3385
|
-
},
|
|
3818
|
+
}, fo = new URL(document.location.href).searchParams, yo = !!fo.get("debug") || !1, bo = St(() => import("./App.D3duFcJD.js").then((e) => e.App)), wo = ({ isComponent: e }) => {
|
|
3819
|
+
const { isAuthenticated: t } = Qe();
|
|
3820
|
+
return t ? /* @__PURE__ */ l(It, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(bo, { isComponent: e }) }) : /* @__PURE__ */ l(go, {});
|
|
3821
|
+
}, Eo = ({
|
|
3386
3822
|
isComponent: e = !1,
|
|
3387
|
-
domain: t =
|
|
3388
|
-
}) => /* @__PURE__ */
|
|
3389
|
-
|
|
3823
|
+
domain: t = fa
|
|
3824
|
+
}) => /* @__PURE__ */ l(le, { children: /* @__PURE__ */ l(oa, { clientId: sa, domain: t, debug: yo, children: /* @__PURE__ */ l(wo, { isComponent: e }) }) }), vo = ({ domain: e }) => /* @__PURE__ */ l(Eo, { isComponent: !0, domain: e });
|
|
3825
|
+
vo.displayName = "SassySaint-3.4.2";
|
|
3390
3826
|
export {
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3827
|
+
er as A,
|
|
3828
|
+
Ts as ABOUT_TITLE,
|
|
3829
|
+
Bo as ACTION_LOCATION,
|
|
3830
|
+
Uo as ACTION_MESSAGE,
|
|
3831
|
+
Ko as ACTION_MODEL,
|
|
3832
|
+
Ho as ACTION_RESET,
|
|
3833
|
+
Go as ACTION_RESTORE,
|
|
3834
|
+
Vo as ACTION_SEARCH,
|
|
3835
|
+
Fo as ACTION_SORT,
|
|
3836
|
+
Wo as ACTION_STREAMING,
|
|
3837
|
+
mo as AppFooter,
|
|
3838
|
+
As as CANCEL,
|
|
3839
|
+
_s as CARDS,
|
|
3840
|
+
Is as CLEAR,
|
|
3841
|
+
Qe as Cr,
|
|
3842
|
+
$o as ERROR_MESSAGE,
|
|
3843
|
+
et as G,
|
|
3844
|
+
Lo as GPT4_MAX_TOKENS,
|
|
3845
|
+
vs as HISTORY_TITLE,
|
|
3846
|
+
jo as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3847
|
+
qo as LOCAL_STORAGE_LOCATION,
|
|
3848
|
+
Jo as LOCAL_STORAGE_PREFIX,
|
|
3849
|
+
zo as LOCAL_STORAGE_SEARCH,
|
|
3850
|
+
Yo as LOCAL_STORAGE_SORT,
|
|
3851
|
+
ys as LOG_OUT,
|
|
3852
|
+
$a as M,
|
|
3853
|
+
Mo as MODEL_GPT4,
|
|
3854
|
+
po as MessagesContainerHeader,
|
|
3855
|
+
ls as N,
|
|
3856
|
+
xa as N$1,
|
|
3857
|
+
ks as NA,
|
|
3858
|
+
ze as O,
|
|
3859
|
+
ws as PROFILE_TITLE,
|
|
3860
|
+
xo as ROLE_ASSISTANT,
|
|
3861
|
+
Do as ROLE_HIDDEN,
|
|
3862
|
+
Po as ROLE_INTERNAL,
|
|
3863
|
+
Oo as ROLE_SYSTEM,
|
|
3864
|
+
Co as ROLE_USER,
|
|
3865
|
+
xe as S,
|
|
3866
|
+
bs as SEND,
|
|
3867
|
+
Es as STATS,
|
|
3868
|
+
Qo as STATS_SEPARATOR,
|
|
3869
|
+
vo as SassySaint,
|
|
3870
|
+
Ss as TYPE_QUESTION,
|
|
3871
|
+
ar as U,
|
|
3872
|
+
ps as a,
|
|
3873
|
+
wt as b,
|
|
3874
|
+
Pa as c,
|
|
3875
|
+
us as c$1,
|
|
3876
|
+
Zo as convertLatitudeToDMS,
|
|
3877
|
+
es as convertLongitudeToDMS,
|
|
3878
|
+
ss as durationFormatter,
|
|
3879
|
+
ns as extractAverage,
|
|
3880
|
+
Xt as f,
|
|
3881
|
+
Da as f$1,
|
|
3882
|
+
eo as f$2,
|
|
3883
|
+
Oe as g,
|
|
3884
|
+
ts as getCurrentGeoLocation,
|
|
3885
|
+
ya as getMessageContaintWrapperClass,
|
|
3886
|
+
Ze as i,
|
|
3887
|
+
ds as i$1,
|
|
3888
|
+
as as isLastMessageFromRole,
|
|
3889
|
+
ee as j,
|
|
3890
|
+
re as j$1,
|
|
3891
|
+
gs as l,
|
|
3892
|
+
ms as n,
|
|
3893
|
+
os as numberFormatter,
|
|
3894
|
+
Ka as o,
|
|
3895
|
+
fs as p,
|
|
3896
|
+
is as pluralize,
|
|
3897
|
+
hs as r,
|
|
3898
|
+
rs as renderDataAsList,
|
|
3899
|
+
cs as s,
|
|
3900
|
+
Xo as truncate,
|
|
3901
|
+
tr as x
|
|
3466
3902
|
};
|