@neuctra/authix 1.0.15 → 1.0.17
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/neuctra-authix.es.js +284 -269
- package/dist/neuctra-authix.umd.js +10 -10
- package/dist/src/sdk/index.d.ts +81 -21
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import zt, { forwardRef as At, createElement as Ge, useState as O, useEffect as ie, useRef as dt } from "react";
|
|
2
2
|
function _t(e, t) {
|
|
3
3
|
return function() {
|
|
4
4
|
return e.apply(t, arguments);
|
|
@@ -16,7 +16,7 @@ function ur(e) {
|
|
|
16
16
|
let t;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && $t(e.buffer), t;
|
|
18
18
|
}
|
|
19
|
-
const pr = Me("string"), te = Me("function"), Ut = Me("number"), Te = (e) => e !== null && typeof e == "object", fr = (e) => e === !0 || e === !1,
|
|
19
|
+
const pr = Me("string"), te = Me("function"), Ut = Me("number"), Te = (e) => e !== null && typeof e == "object", fr = (e) => e === !0 || e === !1, Ae = (e) => {
|
|
20
20
|
if (Le(e) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const t = st(e);
|
|
@@ -65,7 +65,7 @@ const pe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typ
|
|
|
65
65
|
function Ze() {
|
|
66
66
|
const { caseless: e, skipUndefined: t } = Ft(this) && this || {}, r = {}, s = (o, i) => {
|
|
67
67
|
const a = e && Dt(r, i) || i;
|
|
68
|
-
|
|
68
|
+
Ae(r[a]) && Ae(o) ? r[a] = Ze(r[a], o) : Ae(o) ? r[a] = Ze({}, o) : we(o) ? r[a] = o.slice() : (!t || !ye(o)) && (r[a] = o);
|
|
69
69
|
};
|
|
70
70
|
for (let o = 0, i = arguments.length; o < i; o++)
|
|
71
71
|
arguments[o] && Re(arguments[o], s);
|
|
@@ -91,7 +91,7 @@ const Tr = (e, t, r, { allOwnKeys: s } = {}) => (Re(t, (o, i) => {
|
|
|
91
91
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
92
92
|
const s = e.indexOf(t, r);
|
|
93
93
|
return s !== -1 && s === r;
|
|
94
|
-
},
|
|
94
|
+
}, zr = (e) => {
|
|
95
95
|
if (!e) return null;
|
|
96
96
|
if (we(e)) return e;
|
|
97
97
|
let t = e.length;
|
|
@@ -100,7 +100,7 @@ const Tr = (e, t, r, { allOwnKeys: s } = {}) => (Re(t, (o, i) => {
|
|
|
100
100
|
for (; t-- > 0; )
|
|
101
101
|
r[t] = e[t];
|
|
102
102
|
return r;
|
|
103
|
-
},
|
|
103
|
+
}, Ar = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && st(Uint8Array)), _r = (e, t) => {
|
|
104
104
|
const s = (e && e[Fe]).call(e);
|
|
105
105
|
let o;
|
|
106
106
|
for (; (o = s.next()) && !o.done; ) {
|
|
@@ -187,7 +187,7 @@ const qr = (e) => {
|
|
|
187
187
|
isNumber: Ut,
|
|
188
188
|
isBoolean: fr,
|
|
189
189
|
isObject: Te,
|
|
190
|
-
isPlainObject:
|
|
190
|
+
isPlainObject: Ae,
|
|
191
191
|
isEmptyObject: xr,
|
|
192
192
|
isReadableStream: vr,
|
|
193
193
|
isRequest: Sr,
|
|
@@ -201,7 +201,7 @@ const qr = (e) => {
|
|
|
201
201
|
isFunction: te,
|
|
202
202
|
isStream: br,
|
|
203
203
|
isURLSearchParams: jr,
|
|
204
|
-
isTypedArray:
|
|
204
|
+
isTypedArray: Ar,
|
|
205
205
|
isFileList: yr,
|
|
206
206
|
forEach: Re,
|
|
207
207
|
merge: Ze,
|
|
@@ -213,7 +213,7 @@ const qr = (e) => {
|
|
|
213
213
|
kindOf: Le,
|
|
214
214
|
kindOfTest: oe,
|
|
215
215
|
endsWith: Or,
|
|
216
|
-
toArray:
|
|
216
|
+
toArray: zr,
|
|
217
217
|
forEachEntry: _r,
|
|
218
218
|
matchAll: Nr,
|
|
219
219
|
isHTMLForm: $r,
|
|
@@ -336,11 +336,11 @@ function Be(e, t, r) {
|
|
|
336
336
|
if (p.endsWith(b, "{}"))
|
|
337
337
|
b = s ? b : b.slice(0, -2), d = JSON.stringify(d);
|
|
338
338
|
else if (p.isArray(d) && Xr(d) || (p.isFileList(d) || p.endsWith(b, "[]")) && (L = p.toArray(d)))
|
|
339
|
-
return b = qt(b), L.forEach(function(
|
|
340
|
-
!(p.isUndefined(
|
|
339
|
+
return b = qt(b), L.forEach(function(z, k) {
|
|
340
|
+
!(p.isUndefined(z) || z === null) && t.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
a === !0 ? pt([b],
|
|
343
|
-
c(
|
|
342
|
+
a === !0 ? pt([b], k, i) : a === null ? b : b + "[]",
|
|
343
|
+
c(z)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
@@ -1034,13 +1034,13 @@ const Zt = (e) => {
|
|
|
1034
1034
|
function L() {
|
|
1035
1035
|
if (!g)
|
|
1036
1036
|
return;
|
|
1037
|
-
const
|
|
1037
|
+
const z = re.from(
|
|
1038
1038
|
"getAllResponseHeaders" in g && g.getAllResponseHeaders()
|
|
1039
1039
|
), M = {
|
|
1040
1040
|
data: !l || l === "text" || l === "json" ? g.responseText : g.response,
|
|
1041
1041
|
status: g.status,
|
|
1042
1042
|
statusText: g.statusText,
|
|
1043
|
-
headers:
|
|
1043
|
+
headers: z,
|
|
1044
1044
|
config: e,
|
|
1045
1045
|
request: g
|
|
1046
1046
|
};
|
|
@@ -1054,22 +1054,22 @@ const Zt = (e) => {
|
|
|
1054
1054
|
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(L);
|
|
1055
1055
|
}, g.onabort = function() {
|
|
1056
1056
|
g && (s(new U("Request aborted", U.ECONNABORTED, e, g)), g = null);
|
|
1057
|
-
}, g.onerror = function(
|
|
1058
|
-
const M =
|
|
1059
|
-
m.event =
|
|
1057
|
+
}, g.onerror = function(k) {
|
|
1058
|
+
const M = k && k.message ? k.message : "Network Error", m = new U(M, U.ERR_NETWORK, e, g);
|
|
1059
|
+
m.event = k || null, s(m), g = null;
|
|
1060
1060
|
}, g.ontimeout = function() {
|
|
1061
|
-
let
|
|
1061
|
+
let k = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
1062
|
const M = o.transitional || Yt;
|
|
1063
|
-
o.timeoutErrorMessage && (
|
|
1064
|
-
|
|
1063
|
+
o.timeoutErrorMessage && (k = o.timeoutErrorMessage), s(new U(
|
|
1064
|
+
k,
|
|
1065
1065
|
M.clarifyTimeoutError ? U.ETIMEDOUT : U.ECONNABORTED,
|
|
1066
1066
|
e,
|
|
1067
1067
|
g
|
|
1068
1068
|
)), g = null;
|
|
1069
|
-
}, i === void 0 && a.setContentType(null), "setRequestHeader" in g && p.forEach(a.toJSON(), function(
|
|
1070
|
-
g.setRequestHeader(M,
|
|
1071
|
-
}), p.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), l && l !== "json" && (g.responseType = o.responseType), c && ([T, d] = De(c, !0), g.addEventListener("progress", T)), h && g.upload && ([y, S] = De(h), g.upload.addEventListener("progress", y), g.upload.addEventListener("loadend", S)), (o.cancelToken || o.signal) && (u = (
|
|
1072
|
-
g && (s(!
|
|
1069
|
+
}, i === void 0 && a.setContentType(null), "setRequestHeader" in g && p.forEach(a.toJSON(), function(k, M) {
|
|
1070
|
+
g.setRequestHeader(M, k);
|
|
1071
|
+
}), p.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), l && l !== "json" && (g.responseType = o.responseType), c && ([T, d] = De(c, !0), g.addEventListener("progress", T)), h && g.upload && ([y, S] = De(h), g.upload.addEventListener("progress", y), g.upload.addEventListener("loadend", S)), (o.cancelToken || o.signal) && (u = (z) => {
|
|
1072
|
+
g && (s(!z || z.type ? new je(null, e, g) : z), g.abort(), g = null);
|
|
1073
1073
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1074
1074
|
const $ = yn(o.url);
|
|
1075
1075
|
if ($ && ee.protocols.indexOf($) === -1) {
|
|
@@ -1170,7 +1170,7 @@ const Zt = (e) => {
|
|
|
1170
1170
|
} catch {
|
|
1171
1171
|
return !1;
|
|
1172
1172
|
}
|
|
1173
|
-
},
|
|
1173
|
+
}, zn = (e) => {
|
|
1174
1174
|
e = p.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
1176
|
}, On, e);
|
|
@@ -1222,8 +1222,8 @@ const Zt = (e) => {
|
|
|
1222
1222
|
method: g,
|
|
1223
1223
|
data: L,
|
|
1224
1224
|
signal: $,
|
|
1225
|
-
cancelToken:
|
|
1226
|
-
timeout:
|
|
1225
|
+
cancelToken: z,
|
|
1226
|
+
timeout: k,
|
|
1227
1227
|
onDownloadProgress: M,
|
|
1228
1228
|
onUploadProgress: m,
|
|
1229
1229
|
responseType: N,
|
|
@@ -1232,28 +1232,28 @@ const Zt = (e) => {
|
|
|
1232
1232
|
fetchOptions: K
|
|
1233
1233
|
} = Zt(d), F = t || fetch;
|
|
1234
1234
|
N = N ? (N + "").toLowerCase() : "text";
|
|
1235
|
-
let V = Tn([$,
|
|
1236
|
-
const
|
|
1235
|
+
let V = Tn([$, z && z.toAbortSignal()], k), Z = null;
|
|
1236
|
+
const E = V && V.unsubscribe && (() => {
|
|
1237
1237
|
V.unsubscribe();
|
|
1238
1238
|
});
|
|
1239
1239
|
let J;
|
|
1240
1240
|
try {
|
|
1241
1241
|
if (m && c && g !== "get" && g !== "head" && (J = await S(w, L)) !== 0) {
|
|
1242
|
-
let
|
|
1242
|
+
let C = new r(b, {
|
|
1243
1243
|
method: "POST",
|
|
1244
1244
|
body: L,
|
|
1245
1245
|
duplex: "half"
|
|
1246
1246
|
}), _;
|
|
1247
|
-
if (p.isFormData(L) && (_ =
|
|
1247
|
+
if (p.isFormData(L) && (_ = C.headers.get("content-type")) && w.setContentType(_), C.body) {
|
|
1248
1248
|
const [P, x] = gt(
|
|
1249
1249
|
J,
|
|
1250
1250
|
De(mt(m))
|
|
1251
1251
|
);
|
|
1252
|
-
L = bt(
|
|
1252
|
+
L = bt(C.body, wt, P, x);
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
p.isString(D) || (D = D ? "include" : "omit");
|
|
1256
|
-
const q = i && "credentials" in r.prototype,
|
|
1256
|
+
const q = i && "credentials" in r.prototype, A = {
|
|
1257
1257
|
...K,
|
|
1258
1258
|
signal: V,
|
|
1259
1259
|
method: g.toUpperCase(),
|
|
@@ -1262,13 +1262,13 @@ const Zt = (e) => {
|
|
|
1262
1262
|
duplex: "half",
|
|
1263
1263
|
credentials: q ? D : void 0
|
|
1264
1264
|
};
|
|
1265
|
-
Z = i && new r(b,
|
|
1266
|
-
let R = await (i ? F(Z, K) : F(b,
|
|
1265
|
+
Z = i && new r(b, A);
|
|
1266
|
+
let R = await (i ? F(Z, K) : F(b, A));
|
|
1267
1267
|
const Y = u && (N === "stream" || N === "response");
|
|
1268
|
-
if (u && (M || Y &&
|
|
1269
|
-
const
|
|
1268
|
+
if (u && (M || Y && E)) {
|
|
1269
|
+
const C = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((j) => {
|
|
1271
|
-
|
|
1271
|
+
C[j] = R[j];
|
|
1272
1272
|
});
|
|
1273
1273
|
const _ = p.toFiniteNumber(R.headers.get("content-length")), [P, x] = M && gt(
|
|
1274
1274
|
_,
|
|
@@ -1276,15 +1276,15 @@ const Zt = (e) => {
|
|
|
1276
1276
|
) || [];
|
|
1277
1277
|
R = new s(
|
|
1278
1278
|
bt(R.body, wt, P, () => {
|
|
1279
|
-
x && x(),
|
|
1279
|
+
x && x(), E && E();
|
|
1280
1280
|
}),
|
|
1281
|
-
|
|
1281
|
+
C
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
1284
|
N = N || "text";
|
|
1285
1285
|
let f = await y[p.findKey(y, N) || "text"](R, d);
|
|
1286
|
-
return !Y &&
|
|
1287
|
-
Xt(
|
|
1286
|
+
return !Y && E && E(), await new Promise((C, _) => {
|
|
1287
|
+
Xt(C, _, {
|
|
1288
1288
|
data: f,
|
|
1289
1289
|
headers: re.from(R.headers),
|
|
1290
1290
|
status: R.status,
|
|
@@ -1294,7 +1294,7 @@ const Zt = (e) => {
|
|
|
1294
1294
|
});
|
|
1295
1295
|
});
|
|
1296
1296
|
} catch (q) {
|
|
1297
|
-
throw
|
|
1297
|
+
throw E && E(), q && q.name === "TypeError" && /Load failed|fetch/i.test(q.message) ? Object.assign(
|
|
1298
1298
|
new U("Network Error", U.ERR_NETWORK, d, Z),
|
|
1299
1299
|
{
|
|
1300
1300
|
cause: q.cause || q
|
|
@@ -1302,16 +1302,16 @@ const Zt = (e) => {
|
|
|
1302
1302
|
) : U.from(q, q && q.code, d, Z);
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
|
-
},
|
|
1305
|
+
}, An = /* @__PURE__ */ new Map(), Qt = (e) => {
|
|
1306
1306
|
let t = e ? e.env : {};
|
|
1307
1307
|
const { fetch: r, Request: s, Response: o } = t, i = [
|
|
1308
1308
|
s,
|
|
1309
1309
|
o,
|
|
1310
1310
|
r
|
|
1311
1311
|
];
|
|
1312
|
-
let a = i.length, l = a, h, c, u =
|
|
1312
|
+
let a = i.length, l = a, h, c, u = An;
|
|
1313
1313
|
for (; l--; )
|
|
1314
|
-
h = i[l], c = u.get(h), c === void 0 && u.set(h, c = l ? /* @__PURE__ */ new Map() :
|
|
1314
|
+
h = i[l], c = u.get(h), c === void 0 && u.set(h, c = l ? /* @__PURE__ */ new Map() : zn(t)), u = c;
|
|
1315
1315
|
return c;
|
|
1316
1316
|
};
|
|
1317
1317
|
Qt();
|
|
@@ -1773,36 +1773,47 @@ class co {
|
|
|
1773
1773
|
});
|
|
1774
1774
|
}
|
|
1775
1775
|
/**
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1776
|
+
* 🌐 Universal request helper with structured responses and error handling
|
|
1777
|
+
* @param method HTTP method (GET, POST, PUT, DELETE)
|
|
1778
|
+
* @param path API endpoint path
|
|
1779
|
+
* @param data optional request body
|
|
1780
|
+
* @param extraHeaders optional headers
|
|
1781
|
+
*/
|
|
1782
1782
|
async request(t, r, s, o = {}) {
|
|
1783
|
-
if (!t)
|
|
1784
|
-
if (!r)
|
|
1783
|
+
if (!t) return { success: !1, message: "HTTP method is required" };
|
|
1784
|
+
if (!r) return { success: !1, message: "Request path is required" };
|
|
1785
1785
|
try {
|
|
1786
1786
|
const i = {
|
|
1787
1787
|
...this.appId ? { appId: this.appId } : {},
|
|
1788
1788
|
...s || {}
|
|
1789
1789
|
};
|
|
1790
|
-
return
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1790
|
+
return {
|
|
1791
|
+
success: !0,
|
|
1792
|
+
data: (await this.client.request({
|
|
1793
|
+
url: r,
|
|
1794
|
+
method: t,
|
|
1795
|
+
data: i,
|
|
1796
|
+
headers: o
|
|
1797
|
+
})).data,
|
|
1798
|
+
message: "✅ Request completed successfully"
|
|
1799
|
+
};
|
|
1796
1800
|
} catch (i) {
|
|
1797
|
-
if (i.isAxiosError && !i.response)
|
|
1798
|
-
|
|
1801
|
+
if (console.error("❌ [Request Error]:", i), i.isAxiosError && !i.response)
|
|
1802
|
+
return {
|
|
1803
|
+
success: !1,
|
|
1804
|
+
message: `🌐 Network error: ${i.message}`
|
|
1805
|
+
};
|
|
1799
1806
|
if (i.response) {
|
|
1800
|
-
const a = i.response.status, l = i.response.data?.message || i.response.statusText;
|
|
1801
|
-
|
|
1807
|
+
const a = i.response.status, l = i.response.data?.message || i.response.statusText || "Server returned an error";
|
|
1808
|
+
return {
|
|
1809
|
+
success: !1,
|
|
1810
|
+
message: `⚠️ Request failed (${a}): ${l}`
|
|
1811
|
+
};
|
|
1802
1812
|
}
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1813
|
+
return {
|
|
1814
|
+
success: !1,
|
|
1815
|
+
message: `🚨 Unexpected error: ${i.message || "Something went wrong"}`
|
|
1816
|
+
};
|
|
1806
1817
|
}
|
|
1807
1818
|
}
|
|
1808
1819
|
// ================= USERS =================
|
|
@@ -1995,7 +2006,7 @@ class co {
|
|
|
1995
2006
|
return this.request("DELETE", `/users/${r}/data/${s}`);
|
|
1996
2007
|
}
|
|
1997
2008
|
}
|
|
1998
|
-
var
|
|
2009
|
+
var ze = { exports: {} }, ke = {};
|
|
1999
2010
|
/**
|
|
2000
2011
|
* @license React
|
|
2001
2012
|
* react-jsx-runtime.production.js
|
|
@@ -2065,19 +2076,19 @@ function Ln() {
|
|
|
2065
2076
|
), f.$$typeof) {
|
|
2066
2077
|
case d:
|
|
2067
2078
|
return "Portal";
|
|
2068
|
-
case
|
|
2079
|
+
case z:
|
|
2069
2080
|
return (f.displayName || "Context") + ".Provider";
|
|
2070
2081
|
case $:
|
|
2071
2082
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
2072
|
-
case
|
|
2073
|
-
var
|
|
2074
|
-
return f = f.displayName, f || (f =
|
|
2083
|
+
case k:
|
|
2084
|
+
var C = f.render;
|
|
2085
|
+
return f = f.displayName, f || (f = C.displayName || C.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
2075
2086
|
case N:
|
|
2076
|
-
return
|
|
2087
|
+
return C = f.displayName || null, C !== null ? C : e(f.type) || "Memo";
|
|
2077
2088
|
case w:
|
|
2078
|
-
|
|
2089
|
+
C = f._payload, f = f._init;
|
|
2079
2090
|
try {
|
|
2080
|
-
return e(f(
|
|
2091
|
+
return e(f(C));
|
|
2081
2092
|
} catch {
|
|
2082
2093
|
}
|
|
2083
2094
|
}
|
|
@@ -2089,15 +2100,15 @@ function Ln() {
|
|
|
2089
2100
|
function r(f) {
|
|
2090
2101
|
try {
|
|
2091
2102
|
t(f);
|
|
2092
|
-
var
|
|
2103
|
+
var C = !1;
|
|
2093
2104
|
} catch {
|
|
2094
|
-
|
|
2105
|
+
C = !0;
|
|
2095
2106
|
}
|
|
2096
|
-
if (
|
|
2097
|
-
|
|
2098
|
-
var _ =
|
|
2107
|
+
if (C) {
|
|
2108
|
+
C = console;
|
|
2109
|
+
var _ = C.error, P = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
2099
2110
|
return _.call(
|
|
2100
|
-
|
|
2111
|
+
C,
|
|
2101
2112
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
2102
2113
|
P
|
|
2103
2114
|
), t(f);
|
|
@@ -2108,8 +2119,8 @@ function Ln() {
|
|
|
2108
2119
|
if (typeof f == "object" && f !== null && f.$$typeof === w)
|
|
2109
2120
|
return "<...>";
|
|
2110
2121
|
try {
|
|
2111
|
-
var
|
|
2112
|
-
return
|
|
2122
|
+
var C = e(f);
|
|
2123
|
+
return C ? "<" + C + ">" : "<...>";
|
|
2113
2124
|
} catch {
|
|
2114
2125
|
return "<...>";
|
|
2115
2126
|
}
|
|
@@ -2123,16 +2134,16 @@ function Ln() {
|
|
|
2123
2134
|
}
|
|
2124
2135
|
function a(f) {
|
|
2125
2136
|
if (V.call(f, "key")) {
|
|
2126
|
-
var
|
|
2127
|
-
if (
|
|
2137
|
+
var C = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
2138
|
+
if (C && C.isReactWarning) return !1;
|
|
2128
2139
|
}
|
|
2129
2140
|
return f.key !== void 0;
|
|
2130
2141
|
}
|
|
2131
|
-
function l(f,
|
|
2142
|
+
function l(f, C) {
|
|
2132
2143
|
function _() {
|
|
2133
2144
|
J || (J = !0, console.error(
|
|
2134
2145
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
2135
|
-
|
|
2146
|
+
C
|
|
2136
2147
|
));
|
|
2137
2148
|
}
|
|
2138
2149
|
_.isReactWarning = !0, Object.defineProperty(f, "key", {
|
|
@@ -2146,11 +2157,11 @@ function Ln() {
|
|
|
2146
2157
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
2147
2158
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
2148
2159
|
}
|
|
2149
|
-
function c(f,
|
|
2160
|
+
function c(f, C, _, P, x, j, X, ne) {
|
|
2150
2161
|
return _ = j.ref, f = {
|
|
2151
2162
|
$$typeof: S,
|
|
2152
2163
|
type: f,
|
|
2153
|
-
key:
|
|
2164
|
+
key: C,
|
|
2154
2165
|
props: j,
|
|
2155
2166
|
_owner: x
|
|
2156
2167
|
}, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(f, "ref", {
|
|
@@ -2178,8 +2189,8 @@ function Ln() {
|
|
|
2178
2189
|
value: ne
|
|
2179
2190
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
2180
2191
|
}
|
|
2181
|
-
function u(f,
|
|
2182
|
-
var G =
|
|
2192
|
+
function u(f, C, _, P, x, j, X, ne) {
|
|
2193
|
+
var G = C.children;
|
|
2183
2194
|
if (G !== void 0)
|
|
2184
2195
|
if (P)
|
|
2185
2196
|
if (Z(G)) {
|
|
@@ -2191,9 +2202,9 @@ function Ln() {
|
|
|
2191
2202
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
2192
2203
|
);
|
|
2193
2204
|
else y(G);
|
|
2194
|
-
if (V.call(
|
|
2205
|
+
if (V.call(C, "key")) {
|
|
2195
2206
|
G = e(f);
|
|
2196
|
-
var se = Object.keys(
|
|
2207
|
+
var se = Object.keys(C).filter(function(I) {
|
|
2197
2208
|
return I !== "key";
|
|
2198
2209
|
});
|
|
2199
2210
|
P = 0 < se.length ? "{key: someKey, " + se.join(": ..., ") + ": ...}" : "{key: someKey}", Y[G + P] || (se = 0 < se.length ? "{" + se.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
@@ -2209,11 +2220,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2209
2220
|
G
|
|
2210
2221
|
), Y[G + P] = !0);
|
|
2211
2222
|
}
|
|
2212
|
-
if (G = null, _ !== void 0 && (r(_), G = "" + _), a(
|
|
2223
|
+
if (G = null, _ !== void 0 && (r(_), G = "" + _), a(C) && (r(C.key), G = "" + C.key), "key" in C) {
|
|
2213
2224
|
_ = {};
|
|
2214
|
-
for (var le in
|
|
2215
|
-
le !== "key" && (_[le] =
|
|
2216
|
-
} else _ =
|
|
2225
|
+
for (var le in C)
|
|
2226
|
+
le !== "key" && (_[le] = C[le]);
|
|
2227
|
+
} else _ = C;
|
|
2217
2228
|
return G && l(
|
|
2218
2229
|
_,
|
|
2219
2230
|
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
@@ -2231,7 +2242,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2231
2242
|
function y(f) {
|
|
2232
2243
|
typeof f == "object" && f !== null && f.$$typeof === S && f._store && (f._store.validated = 1);
|
|
2233
2244
|
}
|
|
2234
|
-
var T =
|
|
2245
|
+
var T = zt, S = Symbol.for("react.transitional.element"), d = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), L = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), z = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), D = Symbol.for("react.activity"), K = Symbol.for("react.client.reference"), F = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, Z = Array.isArray, E = console.createTask ? console.createTask : function() {
|
|
2235
2246
|
return null;
|
|
2236
2247
|
};
|
|
2237
2248
|
T = {
|
|
@@ -2239,40 +2250,40 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2239
2250
|
return f();
|
|
2240
2251
|
}
|
|
2241
2252
|
};
|
|
2242
|
-
var J, q = {},
|
|
2253
|
+
var J, q = {}, A = T.react_stack_bottom_frame.bind(
|
|
2243
2254
|
T,
|
|
2244
2255
|
i
|
|
2245
|
-
)(), R =
|
|
2246
|
-
Ee.Fragment = b, Ee.jsx = function(f,
|
|
2256
|
+
)(), R = E(s(i)), Y = {};
|
|
2257
|
+
Ee.Fragment = b, Ee.jsx = function(f, C, _, P, x) {
|
|
2247
2258
|
var j = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
2248
2259
|
return u(
|
|
2249
2260
|
f,
|
|
2250
|
-
|
|
2261
|
+
C,
|
|
2251
2262
|
_,
|
|
2252
2263
|
!1,
|
|
2253
2264
|
P,
|
|
2254
2265
|
x,
|
|
2255
|
-
j ? Error("react-stack-top-frame") :
|
|
2256
|
-
j ?
|
|
2266
|
+
j ? Error("react-stack-top-frame") : A,
|
|
2267
|
+
j ? E(s(f)) : R
|
|
2257
2268
|
);
|
|
2258
|
-
}, Ee.jsxs = function(f,
|
|
2269
|
+
}, Ee.jsxs = function(f, C, _, P, x) {
|
|
2259
2270
|
var j = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
2260
2271
|
return u(
|
|
2261
2272
|
f,
|
|
2262
|
-
|
|
2273
|
+
C,
|
|
2263
2274
|
_,
|
|
2264
2275
|
!0,
|
|
2265
2276
|
P,
|
|
2266
2277
|
x,
|
|
2267
|
-
j ? Error("react-stack-top-frame") :
|
|
2268
|
-
j ?
|
|
2278
|
+
j ? Error("react-stack-top-frame") : A,
|
|
2279
|
+
j ? E(s(f)) : R
|
|
2269
2280
|
);
|
|
2270
2281
|
};
|
|
2271
2282
|
})()), Ee;
|
|
2272
2283
|
}
|
|
2273
2284
|
var It;
|
|
2274
2285
|
function Mn() {
|
|
2275
|
-
return It || (It = 1, process.env.NODE_ENV === "production" ?
|
|
2286
|
+
return It || (It = 1, process.env.NODE_ENV === "production" ? ze.exports = Fn() : ze.exports = Ln()), ze.exports;
|
|
2276
2287
|
}
|
|
2277
2288
|
var n = Mn();
|
|
2278
2289
|
const Bn = async (e, t) => {
|
|
@@ -2370,7 +2381,7 @@ var Vn = {
|
|
|
2370
2381
|
* This source code is licensed under the ISC license.
|
|
2371
2382
|
* See the LICENSE file in the root directory of this source tree.
|
|
2372
2383
|
*/
|
|
2373
|
-
const Yn =
|
|
2384
|
+
const Yn = At(
|
|
2374
2385
|
({
|
|
2375
2386
|
color: e = "currentColor",
|
|
2376
2387
|
size: t = 24,
|
|
@@ -2406,7 +2417,7 @@ const Yn = zt(
|
|
|
2406
2417
|
* See the LICENSE file in the root directory of this source tree.
|
|
2407
2418
|
*/
|
|
2408
2419
|
const W = (e, t) => {
|
|
2409
|
-
const r =
|
|
2420
|
+
const r = At(
|
|
2410
2421
|
({ className: s, ...o }, i) => Ge(Yn, {
|
|
2411
2422
|
ref: i,
|
|
2412
2423
|
iconNode: t,
|
|
@@ -2785,7 +2796,7 @@ const Os = [
|
|
|
2785
2796
|
* This source code is licensed under the ISC license.
|
|
2786
2797
|
* See the LICENSE file in the root directory of this source tree.
|
|
2787
2798
|
*/
|
|
2788
|
-
const
|
|
2799
|
+
const zs = [
|
|
2789
2800
|
[
|
|
2790
2801
|
"path",
|
|
2791
2802
|
{
|
|
@@ -2795,19 +2806,19 @@ const As = [
|
|
|
2795
2806
|
],
|
|
2796
2807
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
2797
2808
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
2798
|
-
], Ot = W("triangle-alert",
|
|
2809
|
+
], Ot = W("triangle-alert", zs);
|
|
2799
2810
|
/**
|
|
2800
2811
|
* @license lucide-react v0.544.0 - ISC
|
|
2801
2812
|
*
|
|
2802
2813
|
* This source code is licensed under the ISC license.
|
|
2803
2814
|
* See the LICENSE file in the root directory of this source tree.
|
|
2804
2815
|
*/
|
|
2805
|
-
const
|
|
2816
|
+
const As = [
|
|
2806
2817
|
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
2807
2818
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
2808
2819
|
["line", { x1: "17", x2: "22", y1: "8", y2: "13", key: "3nzzx3" }],
|
|
2809
2820
|
["line", { x1: "22", x2: "17", y1: "8", y2: "13", key: "1swrse" }]
|
|
2810
|
-
], _s = W("user-x",
|
|
2821
|
+
], _s = W("user-x", As);
|
|
2811
2822
|
/**
|
|
2812
2823
|
* @license lucide-react v0.544.0 - ISC
|
|
2813
2824
|
*
|
|
@@ -2855,24 +2866,24 @@ const $s = [
|
|
|
2855
2866
|
email: "",
|
|
2856
2867
|
password: "",
|
|
2857
2868
|
...h && { avatarUrl: "" }
|
|
2858
|
-
}, [g, L] = O(b), [$,
|
|
2859
|
-
const { name: f, value:
|
|
2860
|
-
L((_) => ({ ..._, [f]:
|
|
2869
|
+
}, [g, L] = O(b), [$, z] = O(!1), [k, M] = O(!1), [m, N] = O(null), [w, D] = O({}), K = typeof window < "u" ? window.innerWidth < 768 : !1, F = l ? "#ffffff" : "#111827", V = l ? "#a1a1aa" : "#6b7280", Z = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", E = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)", J = (Y) => {
|
|
2870
|
+
const { name: f, value: C } = Y.target;
|
|
2871
|
+
L((_) => ({ ..._, [f]: C })), w[f] && D((_) => ({ ..._, [f]: void 0 }));
|
|
2861
2872
|
}, q = () => {
|
|
2862
2873
|
const Y = {};
|
|
2863
2874
|
return g.name.trim() || (Y.name = "Name is required"), g.email.trim() ? /\S+@\S+\.\S+/.test(g.email) || (Y.email = "Invalid email address") : Y.email = "Email is required", g.password ? g.password.length < 6 && (Y.password = "Password must be at least 6 characters") : Y.password = "Password is required", D(Y), Object.keys(Y).length === 0;
|
|
2864
|
-
},
|
|
2875
|
+
}, A = async (Y) => {
|
|
2865
2876
|
if (Y.preventDefault(), !!q()) {
|
|
2866
2877
|
M(!0), N(null);
|
|
2867
2878
|
try {
|
|
2868
2879
|
const f = {
|
|
2869
2880
|
...g,
|
|
2870
2881
|
appId: d
|
|
2871
|
-
},
|
|
2872
|
-
N({ type: "success", text: "Account created successfully!" }), u && u(
|
|
2882
|
+
}, C = await Bn(f, { baseUrl: T, apiKey: S });
|
|
2883
|
+
N({ type: "success", text: "Account created successfully!" }), u && u(C);
|
|
2873
2884
|
} catch (f) {
|
|
2874
|
-
const
|
|
2875
|
-
N({ type: "error", text:
|
|
2885
|
+
const C = f.message || "Signup failed. Please try again.";
|
|
2886
|
+
N({ type: "error", text: C }), y && y(f);
|
|
2876
2887
|
} finally {
|
|
2877
2888
|
M(!1);
|
|
2878
2889
|
}
|
|
@@ -2881,7 +2892,7 @@ const $s = [
|
|
|
2881
2892
|
width: "100%",
|
|
2882
2893
|
padding: K ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
2883
2894
|
backgroundColor: Z,
|
|
2884
|
-
border: `1px solid ${
|
|
2895
|
+
border: `1px solid ${E}`,
|
|
2885
2896
|
borderRadius: "10px",
|
|
2886
2897
|
color: F,
|
|
2887
2898
|
fontSize: "15px",
|
|
@@ -2994,7 +3005,7 @@ const $s = [
|
|
|
2994
3005
|
/* @__PURE__ */ n.jsxs(
|
|
2995
3006
|
"form",
|
|
2996
3007
|
{
|
|
2997
|
-
onSubmit:
|
|
3008
|
+
onSubmit: A,
|
|
2998
3009
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
2999
3010
|
children: [
|
|
3000
3011
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
@@ -3035,7 +3046,7 @@ const $s = [
|
|
|
3035
3046
|
onChange: J,
|
|
3036
3047
|
style: {
|
|
3037
3048
|
...R,
|
|
3038
|
-
borderColor: w.name ? "#ef4444" :
|
|
3049
|
+
borderColor: w.name ? "#ef4444" : E
|
|
3039
3050
|
}
|
|
3040
3051
|
}
|
|
3041
3052
|
)
|
|
@@ -3090,7 +3101,7 @@ const $s = [
|
|
|
3090
3101
|
onChange: J,
|
|
3091
3102
|
style: {
|
|
3092
3103
|
...R,
|
|
3093
|
-
borderColor: w.email ? "#ef4444" :
|
|
3104
|
+
borderColor: w.email ? "#ef4444" : E
|
|
3094
3105
|
}
|
|
3095
3106
|
}
|
|
3096
3107
|
)
|
|
@@ -3145,7 +3156,7 @@ const $s = [
|
|
|
3145
3156
|
onChange: J,
|
|
3146
3157
|
style: {
|
|
3147
3158
|
...R,
|
|
3148
|
-
borderColor: w.password ? "#ef4444" :
|
|
3159
|
+
borderColor: w.password ? "#ef4444" : E
|
|
3149
3160
|
}
|
|
3150
3161
|
}
|
|
3151
3162
|
),
|
|
@@ -3153,7 +3164,7 @@ const $s = [
|
|
|
3153
3164
|
"button",
|
|
3154
3165
|
{
|
|
3155
3166
|
type: "button",
|
|
3156
|
-
onClick: () =>
|
|
3167
|
+
onClick: () => z(!$),
|
|
3157
3168
|
style: {
|
|
3158
3169
|
position: "absolute",
|
|
3159
3170
|
right: "14px",
|
|
@@ -3274,7 +3285,7 @@ const $s = [
|
|
|
3274
3285
|
"button",
|
|
3275
3286
|
{
|
|
3276
3287
|
type: "submit",
|
|
3277
|
-
disabled:
|
|
3288
|
+
disabled: k,
|
|
3278
3289
|
style: {
|
|
3279
3290
|
padding: "12px",
|
|
3280
3291
|
background: a,
|
|
@@ -3283,14 +3294,14 @@ const $s = [
|
|
|
3283
3294
|
borderRadius: "10px",
|
|
3284
3295
|
fontSize: "14px",
|
|
3285
3296
|
fontWeight: 600,
|
|
3286
|
-
cursor:
|
|
3287
|
-
opacity:
|
|
3297
|
+
cursor: k ? "not-allowed" : "pointer",
|
|
3298
|
+
opacity: k ? 0.7 : 1,
|
|
3288
3299
|
display: "flex",
|
|
3289
3300
|
alignItems: "center",
|
|
3290
3301
|
justifyContent: "center",
|
|
3291
3302
|
gap: "8px"
|
|
3292
3303
|
},
|
|
3293
|
-
children:
|
|
3304
|
+
children: k ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3294
3305
|
/* @__PURE__ */ n.jsx(
|
|
3295
3306
|
hs,
|
|
3296
3307
|
{
|
|
@@ -3371,12 +3382,12 @@ const $s = [
|
|
|
3371
3382
|
onSuccess: c,
|
|
3372
3383
|
onError: u
|
|
3373
3384
|
}) => {
|
|
3374
|
-
const { baseUrl: y, apiKey: T, appId: S } = ve(), [d, b] = O("login"), [g, L] = O(1), [$,
|
|
3385
|
+
const { baseUrl: y, apiKey: T, appId: S } = ve(), [d, b] = O("login"), [g, L] = O(1), [$, z] = O(!1), [k, M] = O(!1), [m, N] = O(null), [w, D] = O(""), [K, F] = O(""), [V, Z] = O({
|
|
3375
3386
|
email: "",
|
|
3376
3387
|
otp: "",
|
|
3377
3388
|
newPassword: "",
|
|
3378
3389
|
appId: S
|
|
3379
|
-
}),
|
|
3390
|
+
}), E = window.innerWidth < 768, J = l ? "#ffffff" : "#111827", q = l ? "#a1a1aa" : "#6b7280", A = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", R = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)", Y = async (x) => {
|
|
3380
3391
|
x.preventDefault(), M(!0), N(null);
|
|
3381
3392
|
try {
|
|
3382
3393
|
const j = await Us(
|
|
@@ -3392,7 +3403,7 @@ const $s = [
|
|
|
3392
3403
|
}
|
|
3393
3404
|
}, f = (x) => {
|
|
3394
3405
|
Z({ ...V, [x.target.name]: x.target.value });
|
|
3395
|
-
},
|
|
3406
|
+
}, C = async (x) => {
|
|
3396
3407
|
x.preventDefault(), M(!0), N(null);
|
|
3397
3408
|
try {
|
|
3398
3409
|
const j = await B.post(
|
|
@@ -3434,8 +3445,8 @@ const $s = [
|
|
|
3434
3445
|
}
|
|
3435
3446
|
}, P = {
|
|
3436
3447
|
width: "100%",
|
|
3437
|
-
padding:
|
|
3438
|
-
backgroundColor:
|
|
3448
|
+
padding: E ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
3449
|
+
backgroundColor: A,
|
|
3439
3450
|
border: `1px solid ${R}`,
|
|
3440
3451
|
borderRadius: "10px",
|
|
3441
3452
|
color: J,
|
|
@@ -3455,15 +3466,15 @@ const $s = [
|
|
|
3455
3466
|
"div",
|
|
3456
3467
|
{
|
|
3457
3468
|
style: {
|
|
3458
|
-
minWidth:
|
|
3459
|
-
maxWidth:
|
|
3469
|
+
minWidth: E ? "320px" : "380px",
|
|
3470
|
+
maxWidth: E ? "340px" : "390px",
|
|
3460
3471
|
width: "100%",
|
|
3461
3472
|
display: "flex",
|
|
3462
3473
|
flexDirection: "column",
|
|
3463
3474
|
borderRadius: "10px",
|
|
3464
3475
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
3465
3476
|
backgroundColor: l ? "#000000" : "#ffffff",
|
|
3466
|
-
padding:
|
|
3477
|
+
padding: E ? "30px 24px" : "18px 28px"
|
|
3467
3478
|
},
|
|
3468
3479
|
children: [
|
|
3469
3480
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -3614,7 +3625,7 @@ const $s = [
|
|
|
3614
3625
|
"button",
|
|
3615
3626
|
{
|
|
3616
3627
|
type: "button",
|
|
3617
|
-
onClick: () =>
|
|
3628
|
+
onClick: () => z(!$),
|
|
3618
3629
|
style: {
|
|
3619
3630
|
position: "absolute",
|
|
3620
3631
|
right: "14px",
|
|
@@ -3676,7 +3687,7 @@ const $s = [
|
|
|
3676
3687
|
"button",
|
|
3677
3688
|
{
|
|
3678
3689
|
type: "submit",
|
|
3679
|
-
disabled:
|
|
3690
|
+
disabled: k,
|
|
3680
3691
|
style: {
|
|
3681
3692
|
padding: "12px",
|
|
3682
3693
|
background: a,
|
|
@@ -3686,7 +3697,7 @@ const $s = [
|
|
|
3686
3697
|
fontSize: "14px",
|
|
3687
3698
|
fontWeight: 600
|
|
3688
3699
|
},
|
|
3689
|
-
children:
|
|
3700
|
+
children: k ? "Signing In..." : "Sign In"
|
|
3690
3701
|
}
|
|
3691
3702
|
)
|
|
3692
3703
|
]
|
|
@@ -3695,7 +3706,7 @@ const $s = [
|
|
|
3695
3706
|
d === "forgot" && /* @__PURE__ */ n.jsxs(
|
|
3696
3707
|
"form",
|
|
3697
3708
|
{
|
|
3698
|
-
onSubmit: g === 1 ?
|
|
3709
|
+
onSubmit: g === 1 ? C : _,
|
|
3699
3710
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3700
3711
|
children: [
|
|
3701
3712
|
g === 1 ? /* @__PURE__ */ n.jsxs(
|
|
@@ -3852,7 +3863,7 @@ const $s = [
|
|
|
3852
3863
|
"button",
|
|
3853
3864
|
{
|
|
3854
3865
|
type: "submit",
|
|
3855
|
-
disabled:
|
|
3866
|
+
disabled: k,
|
|
3856
3867
|
style: {
|
|
3857
3868
|
padding: "12px",
|
|
3858
3869
|
background: a,
|
|
@@ -3862,7 +3873,7 @@ const $s = [
|
|
|
3862
3873
|
borderRadius: "10px",
|
|
3863
3874
|
fontWeight: 600
|
|
3864
3875
|
},
|
|
3865
|
-
children:
|
|
3876
|
+
children: k ? "Please wait..." : g === 1 ? "Send Reset OTP" : "Reset Password"
|
|
3866
3877
|
}
|
|
3867
3878
|
),
|
|
3868
3879
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4006,7 +4017,7 @@ const $s = [
|
|
|
4006
4017
|
} finally {
|
|
4007
4018
|
y(!1);
|
|
4008
4019
|
}
|
|
4009
|
-
},
|
|
4020
|
+
}, z = T.toLowerCase() === "delete my account", k = (m) => {
|
|
4010
4021
|
m.target === m.currentTarget && d !== "processing" && d !== "success" && t();
|
|
4011
4022
|
}, M = () => {
|
|
4012
4023
|
switch (d) {
|
|
@@ -4330,7 +4341,7 @@ const $s = [
|
|
|
4330
4341
|
width: "100%",
|
|
4331
4342
|
padding: "14px 16px",
|
|
4332
4343
|
borderRadius: "10px",
|
|
4333
|
-
border: `2px solid ${
|
|
4344
|
+
border: `2px solid ${z ? a.success : a.error}`,
|
|
4334
4345
|
backgroundColor: "transparent",
|
|
4335
4346
|
color: a.textPrimary,
|
|
4336
4347
|
fontSize: "15px",
|
|
@@ -4347,7 +4358,7 @@ const $s = [
|
|
|
4347
4358
|
autoFocus: !0
|
|
4348
4359
|
}
|
|
4349
4360
|
),
|
|
4350
|
-
|
|
4361
|
+
z && /* @__PURE__ */ n.jsxs(
|
|
4351
4362
|
"div",
|
|
4352
4363
|
{
|
|
4353
4364
|
style: {
|
|
@@ -4409,7 +4420,7 @@ const $s = [
|
|
|
4409
4420
|
"button",
|
|
4410
4421
|
{
|
|
4411
4422
|
onClick: $,
|
|
4412
|
-
disabled: !
|
|
4423
|
+
disabled: !z || u,
|
|
4413
4424
|
style: {
|
|
4414
4425
|
padding: "10px 24px",
|
|
4415
4426
|
borderRadius: "10px",
|
|
@@ -4418,22 +4429,22 @@ const $s = [
|
|
|
4418
4429
|
color: "white",
|
|
4419
4430
|
fontSize: "14px",
|
|
4420
4431
|
fontWeight: 600,
|
|
4421
|
-
cursor: !
|
|
4432
|
+
cursor: !z || u ? "not-allowed" : "pointer",
|
|
4422
4433
|
flex: g ? "none" : 1,
|
|
4423
4434
|
minWidth: g ? "100%" : "140px",
|
|
4424
|
-
opacity: !
|
|
4435
|
+
opacity: !z || u ? 0.6 : 1,
|
|
4425
4436
|
display: "flex",
|
|
4426
4437
|
alignItems: "center",
|
|
4427
4438
|
justifyContent: "center",
|
|
4428
4439
|
gap: "8px",
|
|
4429
4440
|
transition: "all 0.2s ease",
|
|
4430
|
-
boxShadow: !
|
|
4441
|
+
boxShadow: !z || u ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
|
|
4431
4442
|
},
|
|
4432
4443
|
onMouseOver: (m) => {
|
|
4433
|
-
|
|
4444
|
+
z && !u && (m.currentTarget.style.transform = "translateY(-1px)", m.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
|
|
4434
4445
|
},
|
|
4435
4446
|
onMouseOut: (m) => {
|
|
4436
|
-
|
|
4447
|
+
z && !u && (m.currentTarget.style.transform = "translateY(0)", m.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
4437
4448
|
},
|
|
4438
4449
|
children: [
|
|
4439
4450
|
/* @__PURE__ */ n.jsx($e, { size: 16 }),
|
|
@@ -4750,7 +4761,7 @@ const $s = [
|
|
|
4750
4761
|
zIndex: 1e4,
|
|
4751
4762
|
animation: "fadeIn 0.3s ease-out"
|
|
4752
4763
|
},
|
|
4753
|
-
onClick:
|
|
4764
|
+
onClick: k,
|
|
4754
4765
|
children: [
|
|
4755
4766
|
/* @__PURE__ */ n.jsx(
|
|
4756
4767
|
"div",
|
|
@@ -5295,16 +5306,16 @@ const $s = [
|
|
|
5295
5306
|
newPassword: !1,
|
|
5296
5307
|
confirmPassword: !1
|
|
5297
5308
|
}), [L, $] = O(!1);
|
|
5298
|
-
if (
|
|
5309
|
+
if (zt.useEffect(() => {
|
|
5299
5310
|
const w = () => {
|
|
5300
5311
|
$(window.innerWidth < 640);
|
|
5301
5312
|
};
|
|
5302
5313
|
return w(), window.addEventListener("resize", w), () => window.removeEventListener("resize", w);
|
|
5303
5314
|
}, []), !e) return null;
|
|
5304
|
-
const
|
|
5315
|
+
const z = (w) => {
|
|
5305
5316
|
const { name: D, value: K } = w.target;
|
|
5306
5317
|
u((F) => ({ ...F, [D]: K })), y[D] && T((F) => ({ ...F, [D]: "" }));
|
|
5307
|
-
},
|
|
5318
|
+
}, k = (w) => {
|
|
5308
5319
|
g((D) => ({ ...D, [w]: !D[w] }));
|
|
5309
5320
|
}, M = () => {
|
|
5310
5321
|
const w = {};
|
|
@@ -5516,7 +5527,7 @@ const $s = [
|
|
|
5516
5527
|
name: w,
|
|
5517
5528
|
placeholder: `Enter ${D.toLowerCase()}`,
|
|
5518
5529
|
value: c[w],
|
|
5519
|
-
onChange:
|
|
5530
|
+
onChange: z,
|
|
5520
5531
|
style: {
|
|
5521
5532
|
width: "100%",
|
|
5522
5533
|
padding: "14px 48px 14px 44px",
|
|
@@ -5541,7 +5552,7 @@ const $s = [
|
|
|
5541
5552
|
"button",
|
|
5542
5553
|
{
|
|
5543
5554
|
type: "button",
|
|
5544
|
-
onClick: () =>
|
|
5555
|
+
onClick: () => k(w),
|
|
5545
5556
|
style: {
|
|
5546
5557
|
position: "absolute",
|
|
5547
5558
|
right: "14px",
|
|
@@ -6013,12 +6024,12 @@ const $s = [
|
|
|
6013
6024
|
onLogout: o,
|
|
6014
6025
|
primaryColor: i = "#00C212"
|
|
6015
6026
|
}) => {
|
|
6016
|
-
const { baseUrl: a, apiKey: l, appId: h } = ve(), [c, u] = O(t), [y, T] = O(!0), [S, d] = O(!1), [b, g] = O(!1), [L, $] = O(!1), [
|
|
6027
|
+
const { baseUrl: a, apiKey: l, appId: h } = ve(), [c, u] = O(t), [y, T] = O(!0), [S, d] = O(!1), [b, g] = O(!1), [L, $] = O(!1), [z, k] = O(!1), [M, m] = O(!1), [N, w] = O(!1), [D, K] = O(!1), [F, V] = O(!1), [Z, E] = O(null), [J, q] = O(!1), [A, R] = O({
|
|
6017
6028
|
email: "",
|
|
6018
6029
|
otp: "",
|
|
6019
6030
|
appId: h
|
|
6020
|
-
}), [Y, f] = O(!1), [
|
|
6021
|
-
|
|
6031
|
+
}), [Y, f] = O(!1), [C, _] = O(!1), P = (v, H) => {
|
|
6032
|
+
E({ type: v, message: H }), setTimeout(() => E(null), 3e3);
|
|
6022
6033
|
}, x = () => {
|
|
6023
6034
|
V(!0);
|
|
6024
6035
|
const v = setTimeout(() => {
|
|
@@ -6036,7 +6047,7 @@ const $s = [
|
|
|
6036
6047
|
};
|
|
6037
6048
|
}, [D]);
|
|
6038
6049
|
const j = async () => {
|
|
6039
|
-
if (!
|
|
6050
|
+
if (!A.email || !/\S+@\S+\.\S+/.test(A.email)) {
|
|
6040
6051
|
P("error", "Please enter a valid email");
|
|
6041
6052
|
return;
|
|
6042
6053
|
}
|
|
@@ -6044,7 +6055,7 @@ const $s = [
|
|
|
6044
6055
|
_(!0);
|
|
6045
6056
|
const v = await B.post(
|
|
6046
6057
|
`${a}/users/send-verify-otp/${c?.id}`,
|
|
6047
|
-
{ email:
|
|
6058
|
+
{ email: A.email },
|
|
6048
6059
|
{
|
|
6049
6060
|
headers: { "x-api-key": l, "x-app-id": h }
|
|
6050
6061
|
}
|
|
@@ -6056,7 +6067,7 @@ const $s = [
|
|
|
6056
6067
|
_(!1);
|
|
6057
6068
|
}
|
|
6058
6069
|
}, X = async (v) => {
|
|
6059
|
-
if (v.preventDefault(), !
|
|
6070
|
+
if (v.preventDefault(), !A.email || !A.otp) {
|
|
6060
6071
|
P("error", "Please fill in all fields");
|
|
6061
6072
|
return;
|
|
6062
6073
|
}
|
|
@@ -6064,7 +6075,7 @@ const $s = [
|
|
|
6064
6075
|
_(!0);
|
|
6065
6076
|
const H = await B.post(
|
|
6066
6077
|
`${a}/users/verify-email`,
|
|
6067
|
-
|
|
6078
|
+
A
|
|
6068
6079
|
);
|
|
6069
6080
|
if (H.data.success) {
|
|
6070
6081
|
if (P("success", H.data.message || "Email verified!"), c) {
|
|
@@ -6668,7 +6679,7 @@ const $s = [
|
|
|
6668
6679
|
"button",
|
|
6669
6680
|
{
|
|
6670
6681
|
onClick: () => {
|
|
6671
|
-
|
|
6682
|
+
k(!0), x();
|
|
6672
6683
|
},
|
|
6673
6684
|
style: {
|
|
6674
6685
|
width: "100%",
|
|
@@ -7084,8 +7095,8 @@ const $s = [
|
|
|
7084
7095
|
apiKey: l,
|
|
7085
7096
|
appId: h,
|
|
7086
7097
|
userId: c.id,
|
|
7087
|
-
isOpen:
|
|
7088
|
-
onClose: () =>
|
|
7098
|
+
isOpen: z,
|
|
7099
|
+
onClose: () => k(!1),
|
|
7089
7100
|
onSuccess: (v) => P("success", v),
|
|
7090
7101
|
onError: (v) => P("error", v),
|
|
7091
7102
|
colors: I
|
|
@@ -7115,10 +7126,10 @@ const $s = [
|
|
|
7115
7126
|
},
|
|
7116
7127
|
onVerify: X,
|
|
7117
7128
|
onSendOTP: j,
|
|
7118
|
-
verifyFormData:
|
|
7129
|
+
verifyFormData: A,
|
|
7119
7130
|
setVerifyFormData: R,
|
|
7120
7131
|
otpSent: Y,
|
|
7121
|
-
verifying:
|
|
7132
|
+
verifying: C,
|
|
7122
7133
|
user: c,
|
|
7123
7134
|
colors: I,
|
|
7124
7135
|
darkMode: r
|
|
@@ -7236,7 +7247,7 @@ const $s = [
|
|
|
7236
7247
|
viewProfileLabel: S = "View Profile",
|
|
7237
7248
|
logoutLabel: d = "Sign Out"
|
|
7238
7249
|
}) => {
|
|
7239
|
-
const { baseUrl: b, apiKey: g, appId: L } = ve(), [$,
|
|
7250
|
+
const { baseUrl: b, apiKey: g, appId: L } = ve(), [$, z] = O(!1), [k, M] = O(null), [m, N] = O(!0), [w, D] = O(null), K = dt(null), F = dt(null), [V, Z] = O(!1), [E, J] = O(!1);
|
|
7240
7251
|
ie(() => {
|
|
7241
7252
|
const x = () => {
|
|
7242
7253
|
J(window.innerWidth < 768);
|
|
@@ -7297,17 +7308,17 @@ const $s = [
|
|
|
7297
7308
|
return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
7298
7309
|
}, [$]), ie(() => {
|
|
7299
7310
|
const x = (ne) => {
|
|
7300
|
-
K.current && !K.current.contains(ne.target) && !F.current?.contains(ne.target) &&
|
|
7311
|
+
K.current && !K.current.contains(ne.target) && !F.current?.contains(ne.target) && z(!1);
|
|
7301
7312
|
}, j = (ne) => {
|
|
7302
|
-
ne.key === "Escape" &&
|
|
7313
|
+
ne.key === "Escape" && z(!1);
|
|
7303
7314
|
}, X = () => {
|
|
7304
|
-
$ &&
|
|
7315
|
+
$ && z(!1);
|
|
7305
7316
|
};
|
|
7306
7317
|
return $ && (document.addEventListener("mousedown", x), document.addEventListener("keydown", j), window.addEventListener("scroll", X, { passive: !0 })), () => {
|
|
7307
7318
|
document.removeEventListener("mousedown", x), document.removeEventListener("keydown", j), window.removeEventListener("scroll", X);
|
|
7308
7319
|
};
|
|
7309
7320
|
}, [$]);
|
|
7310
|
-
const
|
|
7321
|
+
const A = e ? {
|
|
7311
7322
|
surface: "#000000",
|
|
7312
7323
|
surfaceElevated: "#000000",
|
|
7313
7324
|
surfaceHover: "#262626",
|
|
@@ -7339,22 +7350,22 @@ const $s = [
|
|
|
7339
7350
|
avatarButton: {
|
|
7340
7351
|
display: "flex",
|
|
7341
7352
|
alignItems: "center",
|
|
7342
|
-
gap:
|
|
7343
|
-
padding:
|
|
7353
|
+
gap: E ? "6px" : "8px",
|
|
7354
|
+
padding: E ? "6px 10px 6px 6px" : "8px 12px 8px 8px",
|
|
7344
7355
|
borderRadius: "24px",
|
|
7345
|
-
backgroundColor:
|
|
7356
|
+
backgroundColor: A.surface,
|
|
7346
7357
|
cursor: "pointer",
|
|
7347
7358
|
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7348
|
-
minWidth:
|
|
7349
|
-
maxWidth:
|
|
7359
|
+
minWidth: E ? "auto" : "140px",
|
|
7360
|
+
maxWidth: E ? "200px" : "none",
|
|
7350
7361
|
outline: "none"
|
|
7351
7362
|
},
|
|
7352
7363
|
avatarImage: {
|
|
7353
|
-
width:
|
|
7354
|
-
height:
|
|
7364
|
+
width: E ? "28px" : "32px",
|
|
7365
|
+
height: E ? "28px" : "32px",
|
|
7355
7366
|
borderRadius: "50%",
|
|
7356
7367
|
objectFit: "cover",
|
|
7357
|
-
border: `2px solid ${
|
|
7368
|
+
border: `2px solid ${A.borderLight}`,
|
|
7358
7369
|
flexShrink: 0
|
|
7359
7370
|
},
|
|
7360
7371
|
userInfo: {
|
|
@@ -7366,28 +7377,28 @@ const $s = [
|
|
|
7366
7377
|
overflow: "hidden"
|
|
7367
7378
|
},
|
|
7368
7379
|
userName: {
|
|
7369
|
-
fontSize:
|
|
7380
|
+
fontSize: E ? "13px" : "14px",
|
|
7370
7381
|
fontWeight: 600,
|
|
7371
|
-
color:
|
|
7382
|
+
color: A.textPrimary,
|
|
7372
7383
|
lineHeight: "1.2",
|
|
7373
7384
|
whiteSpace: "nowrap",
|
|
7374
7385
|
overflow: "hidden",
|
|
7375
7386
|
textOverflow: "ellipsis",
|
|
7376
|
-
maxWidth:
|
|
7387
|
+
maxWidth: E ? "80px" : "120px"
|
|
7377
7388
|
},
|
|
7378
7389
|
userEmail: {
|
|
7379
|
-
fontSize:
|
|
7380
|
-
color:
|
|
7390
|
+
fontSize: E ? "11px" : "12px",
|
|
7391
|
+
color: A.textTertiary,
|
|
7381
7392
|
lineHeight: "1.2",
|
|
7382
7393
|
whiteSpace: "nowrap",
|
|
7383
7394
|
overflow: "hidden",
|
|
7384
7395
|
textOverflow: "ellipsis",
|
|
7385
|
-
maxWidth:
|
|
7396
|
+
maxWidth: E ? "80px" : "120px"
|
|
7386
7397
|
},
|
|
7387
7398
|
chevron: {
|
|
7388
7399
|
transition: "transform 0.2s ease",
|
|
7389
7400
|
transform: $ ? "rotate(180deg)" : "rotate(0deg)",
|
|
7390
|
-
color:
|
|
7401
|
+
color: A.textTertiary,
|
|
7391
7402
|
flexShrink: 0
|
|
7392
7403
|
},
|
|
7393
7404
|
dropdown: {
|
|
@@ -7395,8 +7406,8 @@ const $s = [
|
|
|
7395
7406
|
top: "100%",
|
|
7396
7407
|
marginTop: "8px",
|
|
7397
7408
|
[V ? "left" : "right"]: "0",
|
|
7398
|
-
backgroundColor:
|
|
7399
|
-
border: `1px solid ${
|
|
7409
|
+
backgroundColor: A.surfaceElevated,
|
|
7410
|
+
border: `1px solid ${A.border}`,
|
|
7400
7411
|
borderRadius: "12px",
|
|
7401
7412
|
boxShadow: "0 20px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1)",
|
|
7402
7413
|
width: "min(280px, 90vw)",
|
|
@@ -7411,7 +7422,7 @@ const $s = [
|
|
|
7411
7422
|
overflow: "hidden"
|
|
7412
7423
|
},
|
|
7413
7424
|
dropdownSection: {
|
|
7414
|
-
padding:
|
|
7425
|
+
padding: E ? "10px 12px" : "0px 16px",
|
|
7415
7426
|
"&:last-child": {
|
|
7416
7427
|
borderBottom: "none"
|
|
7417
7428
|
}
|
|
@@ -7419,15 +7430,15 @@ const $s = [
|
|
|
7419
7430
|
userSection: {
|
|
7420
7431
|
display: "flex",
|
|
7421
7432
|
alignItems: "center",
|
|
7422
|
-
gap:
|
|
7423
|
-
padding:
|
|
7433
|
+
gap: E ? "10px" : "12px",
|
|
7434
|
+
padding: E ? "14px" : "16px"
|
|
7424
7435
|
},
|
|
7425
7436
|
dropdownAvatar: {
|
|
7426
|
-
width:
|
|
7427
|
-
height:
|
|
7437
|
+
width: E ? "40px" : "48px",
|
|
7438
|
+
height: E ? "40px" : "48px",
|
|
7428
7439
|
borderRadius: "50%",
|
|
7429
7440
|
objectFit: "cover",
|
|
7430
|
-
border: `2px solid ${
|
|
7441
|
+
border: `2px solid ${A.borderLight}`,
|
|
7431
7442
|
flexShrink: 0
|
|
7432
7443
|
},
|
|
7433
7444
|
dropdownUserInfo: {
|
|
@@ -7437,17 +7448,17 @@ const $s = [
|
|
|
7437
7448
|
minWidth: 0
|
|
7438
7449
|
},
|
|
7439
7450
|
dropdownUserName: {
|
|
7440
|
-
fontSize:
|
|
7451
|
+
fontSize: E ? "15px" : "16px",
|
|
7441
7452
|
fontWeight: 600,
|
|
7442
|
-
color:
|
|
7453
|
+
color: A.textPrimary,
|
|
7443
7454
|
lineHeight: "1.2",
|
|
7444
7455
|
marginBottom: "2px",
|
|
7445
7456
|
overflow: "hidden",
|
|
7446
7457
|
textOverflow: "ellipsis"
|
|
7447
7458
|
},
|
|
7448
7459
|
dropdownUserEmail: {
|
|
7449
|
-
fontSize:
|
|
7450
|
-
color:
|
|
7460
|
+
fontSize: E ? "13px" : "14px",
|
|
7461
|
+
color: A.textSecondary,
|
|
7451
7462
|
lineHeight: "1.2",
|
|
7452
7463
|
overflow: "hidden",
|
|
7453
7464
|
textOverflow: "ellipsis"
|
|
@@ -7455,17 +7466,17 @@ const $s = [
|
|
|
7455
7466
|
menuItem: {
|
|
7456
7467
|
display: "flex",
|
|
7457
7468
|
alignItems: "center",
|
|
7458
|
-
gap:
|
|
7459
|
-
padding:
|
|
7469
|
+
gap: E ? "10px" : "12px",
|
|
7470
|
+
padding: E ? "10px 12px" : "12px 16px",
|
|
7460
7471
|
borderRadius: "8px",
|
|
7461
7472
|
cursor: "pointer",
|
|
7462
7473
|
transition: "all 0.15s ease",
|
|
7463
|
-
color:
|
|
7474
|
+
color: A.textPrimary,
|
|
7464
7475
|
textDecoration: "none",
|
|
7465
7476
|
border: "none",
|
|
7466
7477
|
background: "none",
|
|
7467
7478
|
width: "100%",
|
|
7468
|
-
fontSize:
|
|
7479
|
+
fontSize: E ? "13px" : "14px",
|
|
7469
7480
|
textAlign: "left",
|
|
7470
7481
|
outline: "none"
|
|
7471
7482
|
},
|
|
@@ -7473,38 +7484,38 @@ const $s = [
|
|
|
7473
7484
|
flex: 1
|
|
7474
7485
|
},
|
|
7475
7486
|
icon: {
|
|
7476
|
-
width:
|
|
7477
|
-
height:
|
|
7478
|
-
color:
|
|
7487
|
+
width: E ? "16px" : "18px",
|
|
7488
|
+
height: E ? "16px" : "18px",
|
|
7489
|
+
color: A.textSecondary,
|
|
7479
7490
|
flexShrink: 0
|
|
7480
7491
|
},
|
|
7481
7492
|
logoutButton: {
|
|
7482
7493
|
display: "flex",
|
|
7483
7494
|
alignItems: "center",
|
|
7484
|
-
gap:
|
|
7485
|
-
padding:
|
|
7495
|
+
gap: E ? "10px" : "12px",
|
|
7496
|
+
padding: E ? "10px 12px" : "12px 16px",
|
|
7486
7497
|
borderRadius: "8px",
|
|
7487
7498
|
cursor: "pointer",
|
|
7488
7499
|
transition: "all 0.15s ease",
|
|
7489
7500
|
background: "none",
|
|
7490
7501
|
border: "none",
|
|
7491
7502
|
width: "100%",
|
|
7492
|
-
fontSize:
|
|
7493
|
-
color:
|
|
7503
|
+
fontSize: E ? "13px" : "14px",
|
|
7504
|
+
color: A.error,
|
|
7494
7505
|
textAlign: "left",
|
|
7495
7506
|
outline: "none"
|
|
7496
7507
|
},
|
|
7497
7508
|
loadingText: {
|
|
7498
|
-
padding:
|
|
7509
|
+
padding: E ? "16px 12px" : "20px 16px",
|
|
7499
7510
|
textAlign: "center",
|
|
7500
|
-
color:
|
|
7501
|
-
fontSize:
|
|
7511
|
+
color: A.textSecondary,
|
|
7512
|
+
fontSize: E ? "13px" : "14px"
|
|
7502
7513
|
},
|
|
7503
7514
|
errorState: {
|
|
7504
|
-
padding:
|
|
7515
|
+
padding: E ? "16px 12px" : "20px 16px",
|
|
7505
7516
|
textAlign: "center",
|
|
7506
|
-
color:
|
|
7507
|
-
fontSize:
|
|
7517
|
+
color: A.textSecondary,
|
|
7518
|
+
fontSize: E ? "13px" : "14px",
|
|
7508
7519
|
display: "flex",
|
|
7509
7520
|
alignItems: "center",
|
|
7510
7521
|
justifyContent: "center",
|
|
@@ -7514,7 +7525,7 @@ const $s = [
|
|
|
7514
7525
|
retryButton: {
|
|
7515
7526
|
marginTop: "8px",
|
|
7516
7527
|
padding: "8px 16px",
|
|
7517
|
-
backgroundColor:
|
|
7528
|
+
backgroundColor: A.accent,
|
|
7518
7529
|
color: "#ffffff",
|
|
7519
7530
|
border: "none",
|
|
7520
7531
|
borderRadius: "6px",
|
|
@@ -7536,8 +7547,8 @@ const $s = [
|
|
|
7536
7547
|
N(!1);
|
|
7537
7548
|
}, f = (x, j) => {
|
|
7538
7549
|
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), j());
|
|
7539
|
-
},
|
|
7540
|
-
const x =
|
|
7550
|
+
}, C = () => a || k?.profileUrl, _ = () => {
|
|
7551
|
+
const x = C();
|
|
7541
7552
|
x && window.open(x, "_self", "noopener,noreferrer");
|
|
7542
7553
|
}, P = () => {
|
|
7543
7554
|
l && window.open(l, "_self", "noopener,noreferrer");
|
|
@@ -7555,43 +7566,47 @@ const $s = [
|
|
|
7555
7566
|
"div",
|
|
7556
7567
|
{
|
|
7557
7568
|
ref: F,
|
|
7558
|
-
onClick: () =>
|
|
7559
|
-
onKeyDown: (x) => f(x, () =>
|
|
7569
|
+
onClick: () => z((x) => !x),
|
|
7570
|
+
onKeyDown: (x) => f(x, () => z((j) => !j)),
|
|
7560
7571
|
tabIndex: 0,
|
|
7561
7572
|
role: "button",
|
|
7562
7573
|
"aria-haspopup": "true",
|
|
7563
7574
|
"aria-expanded": $,
|
|
7564
7575
|
"aria-label": "Toggle user menu",
|
|
7565
|
-
children:
|
|
7576
|
+
children: k?.avatarUrl ? /* @__PURE__ */ n.jsx(
|
|
7566
7577
|
"img",
|
|
7567
7578
|
{
|
|
7568
|
-
src:
|
|
7569
|
-
alt: `${
|
|
7579
|
+
src: k.avatarUrl,
|
|
7580
|
+
alt: `${k?.name || "User"}'s avatar`,
|
|
7570
7581
|
style: {
|
|
7571
|
-
width:
|
|
7572
|
-
height:
|
|
7582
|
+
width: E ? "34px" : "40px",
|
|
7583
|
+
height: E ? "34px" : "40px",
|
|
7573
7584
|
borderRadius: "50%",
|
|
7574
7585
|
objectFit: "cover",
|
|
7575
|
-
border: `2px solid ${
|
|
7586
|
+
border: `2px solid ${A.borderLight}`,
|
|
7576
7587
|
flexShrink: 0
|
|
7577
7588
|
},
|
|
7578
7589
|
loading: "lazy",
|
|
7579
7590
|
onError: (x) => {
|
|
7580
7591
|
const j = x.target;
|
|
7581
|
-
j.src =
|
|
7592
|
+
j.onerror = null, j.src = `https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(
|
|
7593
|
+
k?.name || "User"
|
|
7594
|
+
)}`;
|
|
7582
7595
|
}
|
|
7583
7596
|
}
|
|
7584
7597
|
) : /* @__PURE__ */ n.jsx(
|
|
7585
7598
|
"img",
|
|
7586
7599
|
{
|
|
7587
|
-
src:
|
|
7600
|
+
src: `https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(
|
|
7601
|
+
k?.name || "User"
|
|
7602
|
+
)}`,
|
|
7588
7603
|
alt: "Default user avatar",
|
|
7589
7604
|
style: {
|
|
7590
|
-
width:
|
|
7591
|
-
height:
|
|
7605
|
+
width: E ? "34px" : "40px",
|
|
7606
|
+
height: E ? "34px" : "40px",
|
|
7592
7607
|
borderRadius: "50%",
|
|
7593
7608
|
objectFit: "cover",
|
|
7594
|
-
border: `2px solid ${
|
|
7609
|
+
border: `2px solid ${A.borderLight}`,
|
|
7595
7610
|
flexShrink: 0
|
|
7596
7611
|
},
|
|
7597
7612
|
loading: "lazy"
|
|
@@ -7603,28 +7618,28 @@ const $s = [
|
|
|
7603
7618
|
{
|
|
7604
7619
|
ref: F,
|
|
7605
7620
|
style: R.avatarButton,
|
|
7606
|
-
onClick: () =>
|
|
7607
|
-
onKeyDown: (x) => f(x, () =>
|
|
7621
|
+
onClick: () => z((x) => !x),
|
|
7622
|
+
onKeyDown: (x) => f(x, () => z((j) => !j)),
|
|
7608
7623
|
tabIndex: 0,
|
|
7609
7624
|
role: "button",
|
|
7610
7625
|
"aria-haspopup": "true",
|
|
7611
7626
|
"aria-expanded": $,
|
|
7612
7627
|
"aria-label": "Toggle user menu",
|
|
7613
7628
|
onMouseOver: (x) => {
|
|
7614
|
-
x.currentTarget.style.backgroundColor =
|
|
7629
|
+
x.currentTarget.style.backgroundColor = A.surfaceHover, x.currentTarget.style.boxShadow = "0 4px 12px rgba(0,0,0,0.15)";
|
|
7615
7630
|
},
|
|
7616
7631
|
onMouseOut: (x) => {
|
|
7617
|
-
x.currentTarget.style.backgroundColor =
|
|
7632
|
+
x.currentTarget.style.backgroundColor = A.surface, x.currentTarget.style.boxShadow = "none";
|
|
7618
7633
|
},
|
|
7619
7634
|
onBlur: (x) => {
|
|
7620
7635
|
x.currentTarget.style.outline = "none";
|
|
7621
7636
|
},
|
|
7622
7637
|
children: [
|
|
7623
|
-
|
|
7638
|
+
k?.avatarUrl ? /* @__PURE__ */ n.jsx(
|
|
7624
7639
|
"img",
|
|
7625
7640
|
{
|
|
7626
|
-
src:
|
|
7627
|
-
alt: `${
|
|
7641
|
+
src: k.avatarUrl,
|
|
7642
|
+
alt: `${k.name}'s avatar`,
|
|
7628
7643
|
style: R.avatarImage,
|
|
7629
7644
|
loading: "lazy",
|
|
7630
7645
|
onError: (x) => {
|
|
@@ -7641,14 +7656,14 @@ const $s = [
|
|
|
7641
7656
|
loading: "lazy"
|
|
7642
7657
|
}
|
|
7643
7658
|
),
|
|
7644
|
-
!
|
|
7645
|
-
/* @__PURE__ */ n.jsx("div", { style: R.userName, title:
|
|
7646
|
-
|
|
7659
|
+
!E && /* @__PURE__ */ n.jsxs("div", { style: R.userInfo, children: [
|
|
7660
|
+
/* @__PURE__ */ n.jsx("div", { style: R.userName, title: k?.name, children: k?.name || "Guest" }),
|
|
7661
|
+
k?.email && /* @__PURE__ */ n.jsx("div", { style: R.userEmail, title: k.email, children: k.email })
|
|
7647
7662
|
] }),
|
|
7648
7663
|
/* @__PURE__ */ n.jsx(
|
|
7649
7664
|
Xn,
|
|
7650
7665
|
{
|
|
7651
|
-
size:
|
|
7666
|
+
size: E ? 14 : 16,
|
|
7652
7667
|
style: R.chevron,
|
|
7653
7668
|
"aria-hidden": "true"
|
|
7654
7669
|
}
|
|
@@ -7656,42 +7671,42 @@ const $s = [
|
|
|
7656
7671
|
]
|
|
7657
7672
|
}
|
|
7658
7673
|
),
|
|
7659
|
-
$ && /* @__PURE__ */ n.jsx("div", { style: R.dropdown, role: "menu", "aria-label": "User options", children: m ? /* @__PURE__ */ n.jsx("div", { style: R.loadingText, role: "status", "aria-live": "polite", children: "Loading user information..." }) :
|
|
7674
|
+
$ && /* @__PURE__ */ n.jsx("div", { style: R.dropdown, role: "menu", "aria-label": "User options", children: m ? /* @__PURE__ */ n.jsx("div", { style: R.loadingText, role: "status", "aria-live": "polite", children: "Loading user information..." }) : k ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
7660
7675
|
/* @__PURE__ */ n.jsxs("div", { style: R.userSection, children: [
|
|
7661
|
-
|
|
7676
|
+
k?.avatarUrl ? /* @__PURE__ */ n.jsx(
|
|
7662
7677
|
"img",
|
|
7663
7678
|
{
|
|
7664
|
-
src:
|
|
7665
|
-
alt: `${
|
|
7679
|
+
src: k.avatarUrl,
|
|
7680
|
+
alt: `${k.name}'s profile picture`,
|
|
7666
7681
|
style: R.dropdownAvatar,
|
|
7667
7682
|
loading: "lazy",
|
|
7668
7683
|
onError: (x) => {
|
|
7669
7684
|
const j = x.target;
|
|
7670
|
-
j.src = `https://api.dicebear.com/9.x/initials/svg?seed=${
|
|
7685
|
+
j.src = `https://api.dicebear.com/9.x/initials/svg?seed=${k.name}`;
|
|
7671
7686
|
}
|
|
7672
7687
|
}
|
|
7673
7688
|
) : /* @__PURE__ */ n.jsx(
|
|
7674
7689
|
"img",
|
|
7675
7690
|
{
|
|
7676
|
-
src: `https://api.dicebear.com/9.x/initials/svg?seed=${
|
|
7677
|
-
alt: `${
|
|
7691
|
+
src: `https://api.dicebear.com/9.x/initials/svg?seed=${k.name}`,
|
|
7692
|
+
alt: `${k.name}'s default avatar`,
|
|
7678
7693
|
style: R.dropdownAvatar,
|
|
7679
7694
|
loading: "lazy"
|
|
7680
7695
|
}
|
|
7681
7696
|
),
|
|
7682
7697
|
/* @__PURE__ */ n.jsxs("div", { style: R.dropdownUserInfo, children: [
|
|
7683
|
-
/* @__PURE__ */ n.jsx("div", { style: R.dropdownUserName, title:
|
|
7684
|
-
/* @__PURE__ */ n.jsx("div", { style: R.dropdownUserEmail, title:
|
|
7698
|
+
/* @__PURE__ */ n.jsx("div", { style: R.dropdownUserName, title: k.name, children: k.name }),
|
|
7699
|
+
/* @__PURE__ */ n.jsx("div", { style: R.dropdownUserEmail, title: k.email, children: k.email })
|
|
7685
7700
|
] })
|
|
7686
7701
|
] }),
|
|
7687
7702
|
/* @__PURE__ */ n.jsxs("div", { style: R.dropdownSection, children: [
|
|
7688
|
-
h &&
|
|
7703
|
+
h && C() && /* @__PURE__ */ n.jsxs(
|
|
7689
7704
|
"button",
|
|
7690
7705
|
{
|
|
7691
7706
|
style: R.menuItem,
|
|
7692
7707
|
onClick: _,
|
|
7693
7708
|
onMouseOver: (x) => {
|
|
7694
|
-
x.currentTarget.style.backgroundColor =
|
|
7709
|
+
x.currentTarget.style.backgroundColor = A.surfaceHover;
|
|
7695
7710
|
},
|
|
7696
7711
|
onMouseOut: (x) => {
|
|
7697
7712
|
x.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -7711,7 +7726,7 @@ const $s = [
|
|
|
7711
7726
|
style: R.menuItem,
|
|
7712
7727
|
onClick: P,
|
|
7713
7728
|
onMouseOver: (x) => {
|
|
7714
|
-
x.currentTarget.style.backgroundColor =
|
|
7729
|
+
x.currentTarget.style.backgroundColor = A.surfaceHover;
|
|
7715
7730
|
},
|
|
7716
7731
|
onMouseOut: (x) => {
|
|
7717
7732
|
x.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -7725,15 +7740,15 @@ const $s = [
|
|
|
7725
7740
|
]
|
|
7726
7741
|
}
|
|
7727
7742
|
),
|
|
7728
|
-
u &&
|
|
7743
|
+
u && k.profileUrl && /* @__PURE__ */ n.jsxs(
|
|
7729
7744
|
"a",
|
|
7730
7745
|
{
|
|
7731
|
-
href:
|
|
7746
|
+
href: k.profileUrl,
|
|
7732
7747
|
target: "_self",
|
|
7733
7748
|
rel: "noopener noreferrer",
|
|
7734
7749
|
style: R.menuItem,
|
|
7735
7750
|
onMouseOver: (x) => {
|
|
7736
|
-
x.currentTarget.style.backgroundColor =
|
|
7751
|
+
x.currentTarget.style.backgroundColor = A.surfaceHover;
|
|
7737
7752
|
},
|
|
7738
7753
|
onMouseOut: (x) => {
|
|
7739
7754
|
x.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -7753,7 +7768,7 @@ const $s = [
|
|
|
7753
7768
|
style: R.logoutButton,
|
|
7754
7769
|
onClick: r,
|
|
7755
7770
|
onMouseOver: (x) => {
|
|
7756
|
-
x.currentTarget.style.backgroundColor =
|
|
7771
|
+
x.currentTarget.style.backgroundColor = A.surfaceHover;
|
|
7757
7772
|
},
|
|
7758
7773
|
onMouseOut: (x) => {
|
|
7759
7774
|
x.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -7765,7 +7780,7 @@ const $s = [
|
|
|
7765
7780
|
/* @__PURE__ */ n.jsx(
|
|
7766
7781
|
ct,
|
|
7767
7782
|
{
|
|
7768
|
-
style: { ...R.icon, color:
|
|
7783
|
+
style: { ...R.icon, color: A.error },
|
|
7769
7784
|
"aria-hidden": "true"
|
|
7770
7785
|
}
|
|
7771
7786
|
),
|
|
@@ -7790,10 +7805,10 @@ const $s = [
|
|
|
7790
7805
|
style: R.retryButton,
|
|
7791
7806
|
onClick: Y,
|
|
7792
7807
|
onMouseOver: (x) => {
|
|
7793
|
-
x.currentTarget.style.backgroundColor =
|
|
7808
|
+
x.currentTarget.style.backgroundColor = A.accentHover;
|
|
7794
7809
|
},
|
|
7795
7810
|
onMouseOut: (x) => {
|
|
7796
|
-
x.currentTarget.style.backgroundColor =
|
|
7811
|
+
x.currentTarget.style.backgroundColor = A.accent;
|
|
7797
7812
|
},
|
|
7798
7813
|
children: "Try Again"
|
|
7799
7814
|
}
|