@neuctra/authix 1.1.20 → 1.1.21
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.
|
@@ -1036,7 +1036,7 @@ const rr = (e) => {
|
|
|
1036
1036
|
return;
|
|
1037
1037
|
const $ = re.from(
|
|
1038
1038
|
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1039
|
-
),
|
|
1039
|
+
), F = {
|
|
1040
1040
|
data: !l || l === "text" || l === "json" ? m.responseText : m.response,
|
|
1041
1041
|
status: m.status,
|
|
1042
1042
|
statusText: m.statusText,
|
|
@@ -1048,26 +1048,26 @@ const rr = (e) => {
|
|
|
1048
1048
|
n(I), j();
|
|
1049
1049
|
}, function(I) {
|
|
1050
1050
|
s(I), j();
|
|
1051
|
-
},
|
|
1051
|
+
}, F), m = null;
|
|
1052
1052
|
}
|
|
1053
1053
|
"onloadend" in m ? m.onloadend = _ : m.onreadystatechange = function() {
|
|
1054
1054
|
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(_);
|
|
1055
1055
|
}, m.onabort = function() {
|
|
1056
1056
|
m && (s(new L("Request aborted", L.ECONNABORTED, e, m)), m = null);
|
|
1057
1057
|
}, m.onerror = function(C) {
|
|
1058
|
-
const
|
|
1058
|
+
const F = C && C.message ? C.message : "Network Error", g = new L(F, L.ERR_NETWORK, e, m);
|
|
1059
1059
|
g.event = C || null, s(g), m = null;
|
|
1060
1060
|
}, m.ontimeout = function() {
|
|
1061
1061
|
let C = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
|
-
const
|
|
1062
|
+
const F = o.transitional || Gt;
|
|
1063
1063
|
o.timeoutErrorMessage && (C = o.timeoutErrorMessage), s(new L(
|
|
1064
1064
|
C,
|
|
1065
|
-
|
|
1065
|
+
F.clarifyTimeoutError ? L.ETIMEDOUT : L.ECONNABORTED,
|
|
1066
1066
|
e,
|
|
1067
1067
|
m
|
|
1068
1068
|
)), m = null;
|
|
1069
|
-
}, i === void 0 && a.setContentType(null), "setRequestHeader" in m && p.forEach(a.toJSON(), function(C,
|
|
1070
|
-
m.setRequestHeader(
|
|
1069
|
+
}, i === void 0 && a.setContentType(null), "setRequestHeader" in m && p.forEach(a.toJSON(), function(C, F) {
|
|
1070
|
+
m.setRequestHeader(F, C);
|
|
1071
1071
|
}), p.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), l && l !== "json" && (m.responseType = o.responseType), c && ([y, d] = De(c, !0), m.addEventListener("progress", y)), x && m.upload && ([b, w] = De(x), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (o.cancelToken || o.signal) && (u = ($) => {
|
|
1072
1072
|
m && (s(!$ || $.type ? new je(null, e, m) : $), m.abort(), m = null);
|
|
1073
1073
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
@@ -1224,17 +1224,17 @@ const rr = (e) => {
|
|
|
1224
1224
|
signal: R,
|
|
1225
1225
|
cancelToken: $,
|
|
1226
1226
|
timeout: C,
|
|
1227
|
-
onDownloadProgress:
|
|
1227
|
+
onDownloadProgress: F,
|
|
1228
1228
|
onUploadProgress: g,
|
|
1229
1229
|
responseType: I,
|
|
1230
1230
|
headers: v,
|
|
1231
1231
|
withCredentials: U = "same-origin",
|
|
1232
1232
|
fetchOptions: q
|
|
1233
|
-
} = rr(d),
|
|
1233
|
+
} = rr(d), M = t || fetch;
|
|
1234
1234
|
I = I ? (I + "").toLowerCase() : "text";
|
|
1235
|
-
let
|
|
1236
|
-
const T =
|
|
1237
|
-
|
|
1235
|
+
let K = Pn([R, $ && $.toAbortSignal()], C), Z = null;
|
|
1236
|
+
const T = K && K.unsubscribe && (() => {
|
|
1237
|
+
K.unsubscribe();
|
|
1238
1238
|
});
|
|
1239
1239
|
let X;
|
|
1240
1240
|
try {
|
|
@@ -1253,26 +1253,26 @@ const rr = (e) => {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
p.isString(U) || (U = U ? "include" : "omit");
|
|
1256
|
-
const
|
|
1256
|
+
const V = i && "credentials" in n.prototype, z = {
|
|
1257
1257
|
...q,
|
|
1258
|
-
signal:
|
|
1258
|
+
signal: K,
|
|
1259
1259
|
method: m.toUpperCase(),
|
|
1260
1260
|
headers: v.normalize().toJSON(),
|
|
1261
1261
|
body: _,
|
|
1262
1262
|
duplex: "half",
|
|
1263
|
-
credentials:
|
|
1263
|
+
credentials: V ? U : void 0
|
|
1264
1264
|
};
|
|
1265
|
-
Z = i && new n(j,
|
|
1266
|
-
let P = await (i ?
|
|
1265
|
+
Z = i && new n(j, z);
|
|
1266
|
+
let P = await (i ? M(Z, q) : M(j, z));
|
|
1267
1267
|
const ne = u && (I === "stream" || I === "response");
|
|
1268
|
-
if (u && (
|
|
1268
|
+
if (u && (F || ne && T)) {
|
|
1269
1269
|
const f = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((k) => {
|
|
1271
1271
|
f[k] = P[k];
|
|
1272
1272
|
});
|
|
1273
|
-
const S = p.toFiniteNumber(P.headers.get("content-length")), [N, h] =
|
|
1273
|
+
const S = p.toFiniteNumber(P.headers.get("content-length")), [N, h] = F && jt(
|
|
1274
1274
|
S,
|
|
1275
|
-
De(vt(
|
|
1275
|
+
De(vt(F), !0)
|
|
1276
1276
|
) || [];
|
|
1277
1277
|
P = new s(
|
|
1278
1278
|
kt(P.body, Et, N, () => {
|
|
@@ -1293,13 +1293,13 @@ const rr = (e) => {
|
|
|
1293
1293
|
request: Z
|
|
1294
1294
|
});
|
|
1295
1295
|
});
|
|
1296
|
-
} catch (
|
|
1297
|
-
throw T && T(),
|
|
1296
|
+
} catch (V) {
|
|
1297
|
+
throw T && T(), V && V.name === "TypeError" && /Load failed|fetch/i.test(V.message) ? Object.assign(
|
|
1298
1298
|
new L("Network Error", L.ERR_NETWORK, d, Z),
|
|
1299
1299
|
{
|
|
1300
|
-
cause:
|
|
1300
|
+
cause: V.cause || V
|
|
1301
1301
|
}
|
|
1302
|
-
) : L.from(
|
|
1302
|
+
) : L.from(V, V && V.code, d, Z);
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
1305
|
}, Nn = /* @__PURE__ */ new Map(), nr = (e) => {
|
|
@@ -2039,7 +2039,7 @@ function Bn() {
|
|
|
2039
2039
|
function e(f) {
|
|
2040
2040
|
if (f == null) return null;
|
|
2041
2041
|
if (typeof f == "function")
|
|
2042
|
-
return f.$$typeof ===
|
|
2042
|
+
return f.$$typeof === M ? null : f.displayName || f.name || null;
|
|
2043
2043
|
if (typeof f == "string") return f;
|
|
2044
2044
|
switch (f) {
|
|
2045
2045
|
case m:
|
|
@@ -2065,7 +2065,7 @@ function Bn() {
|
|
|
2065
2065
|
return f.displayName || "Context";
|
|
2066
2066
|
case $:
|
|
2067
2067
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
2068
|
-
case
|
|
2068
|
+
case F:
|
|
2069
2069
|
var S = f.render;
|
|
2070
2070
|
return f = f.displayName, f || (f = S.displayName || S.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
2071
2071
|
case v:
|
|
@@ -2111,7 +2111,7 @@ function Bn() {
|
|
|
2111
2111
|
}
|
|
2112
2112
|
}
|
|
2113
2113
|
function o() {
|
|
2114
|
-
var f =
|
|
2114
|
+
var f = K.A;
|
|
2115
2115
|
return f === null ? null : f.getOwner();
|
|
2116
2116
|
}
|
|
2117
2117
|
function i() {
|
|
@@ -2126,7 +2126,7 @@ function Bn() {
|
|
|
2126
2126
|
}
|
|
2127
2127
|
function l(f, S) {
|
|
2128
2128
|
function N() {
|
|
2129
|
-
|
|
2129
|
+
V || (V = !0, console.error(
|
|
2130
2130
|
"%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)",
|
|
2131
2131
|
S
|
|
2132
2132
|
));
|
|
@@ -2138,11 +2138,11 @@ function Bn() {
|
|
|
2138
2138
|
}
|
|
2139
2139
|
function x() {
|
|
2140
2140
|
var f = e(this.type);
|
|
2141
|
-
return
|
|
2141
|
+
return z[f] || (z[f] = !0, console.error(
|
|
2142
2142
|
"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."
|
|
2143
2143
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
2144
2144
|
}
|
|
2145
|
-
function c(f, S, N, h, k,
|
|
2145
|
+
function c(f, S, N, h, k, A) {
|
|
2146
2146
|
var B = N.ref;
|
|
2147
2147
|
return f = {
|
|
2148
2148
|
$$typeof: d,
|
|
@@ -2172,10 +2172,10 @@ function Bn() {
|
|
|
2172
2172
|
configurable: !1,
|
|
2173
2173
|
enumerable: !1,
|
|
2174
2174
|
writable: !0,
|
|
2175
|
-
value:
|
|
2175
|
+
value: A
|
|
2176
2176
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
2177
2177
|
}
|
|
2178
|
-
function u(f, S, N, h, k,
|
|
2178
|
+
function u(f, S, N, h, k, A) {
|
|
2179
2179
|
var B = S.children;
|
|
2180
2180
|
if (B !== void 0)
|
|
2181
2181
|
if (h)
|
|
@@ -2220,7 +2220,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2220
2220
|
N,
|
|
2221
2221
|
o(),
|
|
2222
2222
|
k,
|
|
2223
|
-
|
|
2223
|
+
A
|
|
2224
2224
|
);
|
|
2225
2225
|
}
|
|
2226
2226
|
function b(f) {
|
|
@@ -2229,7 +2229,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2229
2229
|
function y(f) {
|
|
2230
2230
|
return typeof f == "object" && f !== null && f.$$typeof === d;
|
|
2231
2231
|
}
|
|
2232
|
-
var w = Le, d = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), C = Symbol.for("react.context"),
|
|
2232
|
+
var w = Le, d = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), C = Symbol.for("react.context"), F = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), q = Symbol.for("react.activity"), M = Symbol.for("react.client.reference"), K = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, T = Array.isArray, X = console.createTask ? console.createTask : function() {
|
|
2233
2233
|
return null;
|
|
2234
2234
|
};
|
|
2235
2235
|
w = {
|
|
@@ -2237,12 +2237,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2237
2237
|
return f();
|
|
2238
2238
|
}
|
|
2239
2239
|
};
|
|
2240
|
-
var
|
|
2240
|
+
var V, z = {}, P = w.react_stack_bottom_frame.bind(
|
|
2241
2241
|
w,
|
|
2242
2242
|
i
|
|
2243
2243
|
)(), ne = X(s(i)), J = {};
|
|
2244
2244
|
Ee.Fragment = m, Ee.jsx = function(f, S, N) {
|
|
2245
|
-
var h = 1e4 >
|
|
2245
|
+
var h = 1e4 > K.recentlyCreatedOwnerStacks++;
|
|
2246
2246
|
return u(
|
|
2247
2247
|
f,
|
|
2248
2248
|
S,
|
|
@@ -2252,7 +2252,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2252
2252
|
h ? X(s(f)) : ne
|
|
2253
2253
|
);
|
|
2254
2254
|
}, Ee.jsxs = function(f, S, N) {
|
|
2255
|
-
var h = 1e4 >
|
|
2255
|
+
var h = 1e4 > K.recentlyCreatedOwnerStacks++;
|
|
2256
2256
|
return u(
|
|
2257
2257
|
f,
|
|
2258
2258
|
S,
|
|
@@ -2854,7 +2854,7 @@ const Ls = [
|
|
|
2854
2854
|
password: "",
|
|
2855
2855
|
role: c.length ? c[0] : "user",
|
|
2856
2856
|
...x && { avatarUrl: "" }
|
|
2857
|
-
}, [R, $] = O(_), [C,
|
|
2857
|
+
}, [R, $] = O(_), [C, F] = O(!1), [g, I] = O(!1), [v, U] = O(null), [q, M] = O({}), [K, Z] = O(!1), T = l ? "#ffffff" : "#111827", X = l ? "#a1a1aa" : "#6b7280", V = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", z = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
2858
2858
|
Le.useEffect(() => {
|
|
2859
2859
|
if (typeof window < "u") {
|
|
2860
2860
|
const S = () => Z(window.innerWidth < 768);
|
|
@@ -2863,10 +2863,10 @@ const Ls = [
|
|
|
2863
2863
|
}, []);
|
|
2864
2864
|
const P = (S) => {
|
|
2865
2865
|
const { name: N, value: h } = S.target;
|
|
2866
|
-
$((k) => ({ ...k, [N]: h })), q[N] &&
|
|
2866
|
+
$((k) => ({ ...k, [N]: h })), q[N] && M((k) => ({ ...k, [N]: void 0 }));
|
|
2867
2867
|
}, ne = () => {
|
|
2868
2868
|
const S = {};
|
|
2869
|
-
return R.name.trim() || (S.name = "Name is required"), R.email.trim() ? /\S+@\S+\.\S+/.test(R.email) || (S.email = "Invalid email address") : S.email = "Email is required", R.password ? R.password.length < 6 && (S.password = "Password must be at least 6 characters") : S.password = "Password is required",
|
|
2869
|
+
return R.name.trim() || (S.name = "Name is required"), R.email.trim() ? /\S+@\S+\.\S+/.test(R.email) || (S.email = "Invalid email address") : S.email = "Email is required", R.password ? R.password.length < 6 && (S.password = "Password must be at least 6 characters") : S.password = "Password is required", M(S), Object.keys(S).length === 0;
|
|
2870
2870
|
}, J = async (S) => {
|
|
2871
2871
|
if (S.preventDefault(), !!ne()) {
|
|
2872
2872
|
I(!0), U(null);
|
|
@@ -2885,9 +2885,9 @@ const Ls = [
|
|
|
2885
2885
|
}
|
|
2886
2886
|
}, f = {
|
|
2887
2887
|
width: "100%",
|
|
2888
|
-
padding:
|
|
2889
|
-
backgroundColor:
|
|
2890
|
-
border: `1px solid ${
|
|
2888
|
+
padding: K ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
2889
|
+
backgroundColor: V,
|
|
2890
|
+
border: `1px solid ${z}`,
|
|
2891
2891
|
borderRadius: "10px",
|
|
2892
2892
|
color: T,
|
|
2893
2893
|
fontSize: "15px",
|
|
@@ -2908,15 +2908,15 @@ const Ls = [
|
|
|
2908
2908
|
"div",
|
|
2909
2909
|
{
|
|
2910
2910
|
style: {
|
|
2911
|
-
minWidth:
|
|
2911
|
+
minWidth: K ? "320px" : "380px",
|
|
2912
2912
|
width: "100%",
|
|
2913
|
-
maxWidth:
|
|
2913
|
+
maxWidth: K ? "340px" : "390px",
|
|
2914
2914
|
display: "flex",
|
|
2915
2915
|
flexDirection: "column",
|
|
2916
2916
|
borderRadius: "10px",
|
|
2917
2917
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
2918
2918
|
backgroundColor: l ? "#000000" : "#ffffff",
|
|
2919
|
-
padding:
|
|
2919
|
+
padding: K ? "30px 24px" : "20px 28px"
|
|
2920
2920
|
},
|
|
2921
2921
|
children: [
|
|
2922
2922
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -3034,8 +3034,8 @@ const Ls = [
|
|
|
3034
3034
|
position: "relative",
|
|
3035
3035
|
display: "flex",
|
|
3036
3036
|
borderRadius: "10px",
|
|
3037
|
-
border: `1px solid ${
|
|
3038
|
-
backgroundColor:
|
|
3037
|
+
border: `1px solid ${z}`,
|
|
3038
|
+
backgroundColor: V,
|
|
3039
3039
|
overflow: "hidden",
|
|
3040
3040
|
cursor: "pointer",
|
|
3041
3041
|
height: "42px"
|
|
@@ -3148,7 +3148,7 @@ const Ls = [
|
|
|
3148
3148
|
onChange: P,
|
|
3149
3149
|
style: {
|
|
3150
3150
|
...f,
|
|
3151
|
-
borderColor: q.name ? "#ef4444" :
|
|
3151
|
+
borderColor: q.name ? "#ef4444" : z
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
3154
|
)
|
|
@@ -3203,7 +3203,7 @@ const Ls = [
|
|
|
3203
3203
|
onChange: P,
|
|
3204
3204
|
style: {
|
|
3205
3205
|
...f,
|
|
3206
|
-
borderColor: q.email ? "#ef4444" :
|
|
3206
|
+
borderColor: q.email ? "#ef4444" : z
|
|
3207
3207
|
}
|
|
3208
3208
|
}
|
|
3209
3209
|
)
|
|
@@ -3258,7 +3258,7 @@ const Ls = [
|
|
|
3258
3258
|
onChange: P,
|
|
3259
3259
|
style: {
|
|
3260
3260
|
...f,
|
|
3261
|
-
borderColor: q.password ? "#ef4444" :
|
|
3261
|
+
borderColor: q.password ? "#ef4444" : z
|
|
3262
3262
|
}
|
|
3263
3263
|
}
|
|
3264
3264
|
),
|
|
@@ -3266,7 +3266,7 @@ const Ls = [
|
|
|
3266
3266
|
"button",
|
|
3267
3267
|
{
|
|
3268
3268
|
type: "button",
|
|
3269
|
-
onClick: () =>
|
|
3269
|
+
onClick: () => F(!C),
|
|
3270
3270
|
style: {
|
|
3271
3271
|
position: "absolute",
|
|
3272
3272
|
right: "14px",
|
|
@@ -3484,12 +3484,12 @@ const Ls = [
|
|
|
3484
3484
|
onSuccess: c,
|
|
3485
3485
|
onError: u
|
|
3486
3486
|
}) => {
|
|
3487
|
-
const { baseUrl: b, apiKey: y, appId: w } = ge(), [d, j] = O("login"), [m, _] = O(1), [R, $] = O(!1), [C,
|
|
3487
|
+
const { baseUrl: b, apiKey: y, appId: w } = ge(), [d, j] = O("login"), [m, _] = O(1), [R, $] = O(!1), [C, F] = O(!1), [g, I] = O(null), [v, U] = O(""), [q, M] = O(""), [K, Z] = O({
|
|
3488
3488
|
email: "",
|
|
3489
3489
|
otp: "",
|
|
3490
3490
|
newPassword: "",
|
|
3491
3491
|
appId: w
|
|
3492
|
-
}), [T, X] = O(!1),
|
|
3492
|
+
}), [T, X] = O(!1), V = l ? "#ffffff" : "#111827", z = l ? "#a1a1aa" : "#6b7280", P = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", ne = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
3493
3493
|
Le.useEffect(() => {
|
|
3494
3494
|
if (typeof window < "u") {
|
|
3495
3495
|
const k = () => X(window.innerWidth < 768);
|
|
@@ -3497,60 +3497,60 @@ const Ls = [
|
|
|
3497
3497
|
}
|
|
3498
3498
|
}, []);
|
|
3499
3499
|
const J = async (k) => {
|
|
3500
|
-
k.preventDefault(),
|
|
3500
|
+
k.preventDefault(), F(!0), I(null);
|
|
3501
3501
|
try {
|
|
3502
|
-
const
|
|
3502
|
+
const A = await Fs(
|
|
3503
3503
|
{ email: v, password: q, appId: w },
|
|
3504
3504
|
{ baseUrl: b, apiKey: y }
|
|
3505
3505
|
);
|
|
3506
|
-
I({ type: "success", text: `Welcome ${
|
|
3507
|
-
} catch (
|
|
3508
|
-
const B =
|
|
3509
|
-
I({ type: "error", text: B }), u?.(
|
|
3506
|
+
I({ type: "success", text: `Welcome ${A.name}` }), c?.(A);
|
|
3507
|
+
} catch (A) {
|
|
3508
|
+
const B = A.message || "Login failed";
|
|
3509
|
+
I({ type: "error", text: B }), u?.(A);
|
|
3510
3510
|
} finally {
|
|
3511
|
-
|
|
3511
|
+
F(!1);
|
|
3512
3512
|
}
|
|
3513
3513
|
}, f = (k) => {
|
|
3514
|
-
Z({ ...
|
|
3514
|
+
Z({ ...K, [k.target.name]: k.target.value });
|
|
3515
3515
|
}, S = async (k) => {
|
|
3516
|
-
k.preventDefault(),
|
|
3516
|
+
k.preventDefault(), F(!0), I(null);
|
|
3517
3517
|
try {
|
|
3518
|
-
const
|
|
3518
|
+
const A = await W.post(
|
|
3519
3519
|
`${b}/users/forgot-password`,
|
|
3520
3520
|
{
|
|
3521
|
-
email:
|
|
3521
|
+
email: K.email,
|
|
3522
3522
|
appId: w
|
|
3523
3523
|
},
|
|
3524
3524
|
{ headers: { "x-api-key": y } }
|
|
3525
3525
|
);
|
|
3526
|
-
|
|
3526
|
+
A.data.success ? (_(2), I({ type: "success", text: "OTP sent to your email" })) : I({
|
|
3527
3527
|
type: "error",
|
|
3528
|
-
text:
|
|
3528
|
+
text: A.data.message || "Failed to send OTP"
|
|
3529
3529
|
});
|
|
3530
|
-
} catch (
|
|
3530
|
+
} catch (A) {
|
|
3531
3531
|
I({
|
|
3532
3532
|
type: "error",
|
|
3533
|
-
text:
|
|
3533
|
+
text: A.response?.data?.message || "Something went wrong"
|
|
3534
3534
|
});
|
|
3535
3535
|
} finally {
|
|
3536
|
-
|
|
3536
|
+
F(!1);
|
|
3537
3537
|
}
|
|
3538
3538
|
}, N = async (k) => {
|
|
3539
|
-
k.preventDefault(),
|
|
3539
|
+
k.preventDefault(), F(!0), I(null);
|
|
3540
3540
|
try {
|
|
3541
|
-
const
|
|
3541
|
+
const A = await W.post(
|
|
3542
3542
|
`${b}/users/reset-password`,
|
|
3543
|
-
|
|
3543
|
+
K,
|
|
3544
3544
|
{ headers: { "x-api-key": y } }
|
|
3545
3545
|
);
|
|
3546
|
-
|
|
3547
|
-
} catch (
|
|
3546
|
+
A.data.success ? (I({ type: "success", text: "Password reset successfully!" }), _(1), Z({ email: "", otp: "", newPassword: "", appId: w }), j("login")) : I({ type: "error", text: A.data.message || "Reset failed" });
|
|
3547
|
+
} catch (A) {
|
|
3548
3548
|
I({
|
|
3549
3549
|
type: "error",
|
|
3550
|
-
text:
|
|
3550
|
+
text: A.response?.data?.message || "Something went wrong"
|
|
3551
3551
|
});
|
|
3552
3552
|
} finally {
|
|
3553
|
-
|
|
3553
|
+
F(!1);
|
|
3554
3554
|
}
|
|
3555
3555
|
}, h = {
|
|
3556
3556
|
width: "100%",
|
|
@@ -3558,7 +3558,7 @@ const Ls = [
|
|
|
3558
3558
|
backgroundColor: P,
|
|
3559
3559
|
border: `1px solid ${ne}`,
|
|
3560
3560
|
borderRadius: "10px",
|
|
3561
|
-
color:
|
|
3561
|
+
color: V,
|
|
3562
3562
|
fontSize: "15px",
|
|
3563
3563
|
outline: "none",
|
|
3564
3564
|
transition: "all 0.2s ease"
|
|
@@ -3625,7 +3625,7 @@ const Ls = [
|
|
|
3625
3625
|
style: {
|
|
3626
3626
|
fontSize: "24px",
|
|
3627
3627
|
fontWeight: 700,
|
|
3628
|
-
color:
|
|
3628
|
+
color: V,
|
|
3629
3629
|
margin: 0
|
|
3630
3630
|
},
|
|
3631
3631
|
children: d === "login" ? n : m === 1 ? "Forgot Password" : "Reset Password"
|
|
@@ -3636,7 +3636,7 @@ const Ls = [
|
|
|
3636
3636
|
{
|
|
3637
3637
|
style: {
|
|
3638
3638
|
fontSize: "14px",
|
|
3639
|
-
color:
|
|
3639
|
+
color: z
|
|
3640
3640
|
},
|
|
3641
3641
|
children: d === "login" ? s : "Follow the steps to reset your password"
|
|
3642
3642
|
}
|
|
@@ -3677,7 +3677,7 @@ const Ls = [
|
|
|
3677
3677
|
left: "14px",
|
|
3678
3678
|
top: "50%",
|
|
3679
3679
|
transform: "translateY(-50%)",
|
|
3680
|
-
color:
|
|
3680
|
+
color: z
|
|
3681
3681
|
}
|
|
3682
3682
|
}
|
|
3683
3683
|
),
|
|
@@ -3723,7 +3723,7 @@ const Ls = [
|
|
|
3723
3723
|
left: "14px",
|
|
3724
3724
|
top: "50%",
|
|
3725
3725
|
transform: "translateY(-50%)",
|
|
3726
|
-
color:
|
|
3726
|
+
color: z
|
|
3727
3727
|
}
|
|
3728
3728
|
}
|
|
3729
3729
|
),
|
|
@@ -3734,7 +3734,7 @@ const Ls = [
|
|
|
3734
3734
|
type: R ? "text" : "password",
|
|
3735
3735
|
placeholder: "Enter your password",
|
|
3736
3736
|
value: q,
|
|
3737
|
-
onChange: (k) =>
|
|
3737
|
+
onChange: (k) => M(k.target.value),
|
|
3738
3738
|
style: h
|
|
3739
3739
|
}
|
|
3740
3740
|
),
|
|
@@ -3751,7 +3751,7 @@ const Ls = [
|
|
|
3751
3751
|
transform: "translateY(-50%)",
|
|
3752
3752
|
background: "transparent",
|
|
3753
3753
|
border: "none",
|
|
3754
|
-
color:
|
|
3754
|
+
color: z,
|
|
3755
3755
|
cursor: "pointer"
|
|
3756
3756
|
},
|
|
3757
3757
|
children: R ? /* @__PURE__ */ r.jsx(lt, { size: 20 }) : /* @__PURE__ */ r.jsx(ct, { size: 20 })
|
|
@@ -3853,7 +3853,7 @@ const Ls = [
|
|
|
3853
3853
|
left: "14px",
|
|
3854
3854
|
top: "50%",
|
|
3855
3855
|
transform: "translateY(-50%)",
|
|
3856
|
-
color:
|
|
3856
|
+
color: z
|
|
3857
3857
|
}
|
|
3858
3858
|
}
|
|
3859
3859
|
),
|
|
@@ -3864,7 +3864,7 @@ const Ls = [
|
|
|
3864
3864
|
type: "email",
|
|
3865
3865
|
name: "email",
|
|
3866
3866
|
placeholder: "Enter your email",
|
|
3867
|
-
value:
|
|
3867
|
+
value: K.email,
|
|
3868
3868
|
onChange: f,
|
|
3869
3869
|
style: h
|
|
3870
3870
|
}
|
|
@@ -3904,7 +3904,7 @@ const Ls = [
|
|
|
3904
3904
|
left: "14px",
|
|
3905
3905
|
top: "50%",
|
|
3906
3906
|
transform: "translateY(-50%)",
|
|
3907
|
-
color:
|
|
3907
|
+
color: z
|
|
3908
3908
|
}
|
|
3909
3909
|
}
|
|
3910
3910
|
),
|
|
@@ -3915,7 +3915,7 @@ const Ls = [
|
|
|
3915
3915
|
type: "text",
|
|
3916
3916
|
name: "otp",
|
|
3917
3917
|
placeholder: "Enter OTP",
|
|
3918
|
-
value:
|
|
3918
|
+
value: K.otp,
|
|
3919
3919
|
onChange: f,
|
|
3920
3920
|
style: h
|
|
3921
3921
|
}
|
|
@@ -3955,7 +3955,7 @@ const Ls = [
|
|
|
3955
3955
|
left: "14px",
|
|
3956
3956
|
top: "50%",
|
|
3957
3957
|
transform: "translateY(-50%)",
|
|
3958
|
-
color:
|
|
3958
|
+
color: z
|
|
3959
3959
|
}
|
|
3960
3960
|
}
|
|
3961
3961
|
),
|
|
@@ -3966,7 +3966,7 @@ const Ls = [
|
|
|
3966
3966
|
type: "password",
|
|
3967
3967
|
name: "newPassword",
|
|
3968
3968
|
placeholder: "Enter new password",
|
|
3969
|
-
value:
|
|
3969
|
+
value: K.newPassword,
|
|
3970
3970
|
onChange: f,
|
|
3971
3971
|
style: h
|
|
3972
3972
|
}
|
|
@@ -4004,7 +4004,7 @@ const Ls = [
|
|
|
4004
4004
|
background: "none",
|
|
4005
4005
|
border: "none",
|
|
4006
4006
|
fontSize: "14px",
|
|
4007
|
-
color:
|
|
4007
|
+
color: z,
|
|
4008
4008
|
marginTop: "6px",
|
|
4009
4009
|
cursor: "pointer"
|
|
4010
4010
|
},
|
|
@@ -4041,7 +4041,7 @@ const Ls = [
|
|
|
4041
4041
|
style: {
|
|
4042
4042
|
textAlign: "center",
|
|
4043
4043
|
fontSize: "12px",
|
|
4044
|
-
color:
|
|
4044
|
+
color: z,
|
|
4045
4045
|
marginTop: "16px",
|
|
4046
4046
|
padding: "0 4px"
|
|
4047
4047
|
},
|
|
@@ -4156,7 +4156,7 @@ const Ls = [
|
|
|
4156
4156
|
}
|
|
4157
4157
|
}, $ = y.toLowerCase() === "delete my account", C = (g) => {
|
|
4158
4158
|
g.target === g.currentTarget && d !== "processing" && d !== "success" && t();
|
|
4159
|
-
},
|
|
4159
|
+
}, F = () => {
|
|
4160
4160
|
switch (d) {
|
|
4161
4161
|
case "warning":
|
|
4162
4162
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
@@ -4914,7 +4914,7 @@ const Ls = [
|
|
|
4914
4914
|
animation: "scaleIn 0.3s ease-out"
|
|
4915
4915
|
},
|
|
4916
4916
|
className: "delete-modal-container",
|
|
4917
|
-
children:
|
|
4917
|
+
children: F()
|
|
4918
4918
|
}
|
|
4919
4919
|
),
|
|
4920
4920
|
/* @__PURE__ */ r.jsx("style", { children: `
|
|
@@ -5453,14 +5453,14 @@ const Ls = [
|
|
|
5453
5453
|
}, []), !e) return null;
|
|
5454
5454
|
const $ = (v) => {
|
|
5455
5455
|
const { name: U, value: q } = v.target;
|
|
5456
|
-
u((
|
|
5456
|
+
u((M) => ({ ...M, [U]: q })), b[U] && y((M) => ({ ...M, [U]: "" }));
|
|
5457
5457
|
}, C = (v) => {
|
|
5458
5458
|
m((U) => ({ ...U, [v]: !U[v] }));
|
|
5459
|
-
},
|
|
5459
|
+
}, F = () => {
|
|
5460
5460
|
const v = {};
|
|
5461
5461
|
return c.currentPassword || (v.currentPassword = "Current password is required"), c.newPassword ? c.newPassword.length < 6 && (v.newPassword = "Password must be at least 6 characters") : v.newPassword = "New password is required", c.newPassword !== c.confirmPassword && (v.confirmPassword = "Passwords do not match"), y(v), Object.keys(v).length === 0;
|
|
5462
5462
|
}, g = async (v) => {
|
|
5463
|
-
if (v.preventDefault(), !!
|
|
5463
|
+
if (v.preventDefault(), !!F()) {
|
|
5464
5464
|
d(!0);
|
|
5465
5465
|
try {
|
|
5466
5466
|
const { data: U } = await W.put(
|
|
@@ -5679,11 +5679,11 @@ const Ls = [
|
|
|
5679
5679
|
transition: "all 0.2s ease",
|
|
5680
5680
|
boxSizing: "border-box"
|
|
5681
5681
|
},
|
|
5682
|
-
onFocus: (
|
|
5683
|
-
|
|
5682
|
+
onFocus: (M) => {
|
|
5683
|
+
M.target.style.borderColor = i.accent, M.target.style.boxShadow = `0 0 0 3px ${i.accent}20`;
|
|
5684
5684
|
},
|
|
5685
|
-
onBlur: (
|
|
5686
|
-
|
|
5685
|
+
onBlur: (M) => {
|
|
5686
|
+
M.target.style.borderColor = b[v] ? i.error : i.border, M.target.style.boxShadow = "none";
|
|
5687
5687
|
}
|
|
5688
5688
|
}
|
|
5689
5689
|
),
|
|
@@ -5709,11 +5709,11 @@ const Ls = [
|
|
|
5709
5709
|
alignItems: "center",
|
|
5710
5710
|
justifyContent: "center"
|
|
5711
5711
|
},
|
|
5712
|
-
onMouseOver: (
|
|
5713
|
-
|
|
5712
|
+
onMouseOver: (M) => {
|
|
5713
|
+
M.currentTarget.style.backgroundColor = i.border, M.currentTarget.style.color = i.textPrimary;
|
|
5714
5714
|
},
|
|
5715
|
-
onMouseOut: (
|
|
5716
|
-
|
|
5715
|
+
onMouseOut: (M) => {
|
|
5716
|
+
M.currentTarget.style.backgroundColor = "transparent", M.currentTarget.style.color = i.textTertiary;
|
|
5717
5717
|
},
|
|
5718
5718
|
children: j[v] ? /* @__PURE__ */ r.jsx(lt, { size: 18 }) : /* @__PURE__ */ r.jsx(ct, { size: 18 })
|
|
5719
5719
|
}
|
|
@@ -6164,7 +6164,7 @@ const Ls = [
|
|
|
6164
6164
|
onVerify: i,
|
|
6165
6165
|
primaryColor: a = "#00C212"
|
|
6166
6166
|
}) => {
|
|
6167
|
-
const { baseUrl: l, apiKey: x, appId: c } = ge(), [u, b] = O(null), [y, w] = O(t), [d, j] = O(!0), [m, _] = O(!1), [R, $] = O(!1), [C,
|
|
6167
|
+
const { baseUrl: l, apiKey: x, appId: c } = ge(), [u, b] = O(null), [y, w] = O(t), [d, j] = O(!0), [m, _] = O(!1), [R, $] = O(!1), [C, F] = O(!1), [g, I] = O(!1), [v, U] = O(!1), [q, M] = O(!1), [K, Z] = O(!1), [T, X] = O(!1), [V, z] = O(null), [P, ne] = O(!1), [J, f] = O({
|
|
6168
6168
|
email: "",
|
|
6169
6169
|
otp: "",
|
|
6170
6170
|
appId: c
|
|
@@ -6175,8 +6175,8 @@ const Ls = [
|
|
|
6175
6175
|
return E(), window.addEventListener("resize", E), () => window.removeEventListener("resize", E);
|
|
6176
6176
|
}
|
|
6177
6177
|
}, []);
|
|
6178
|
-
const
|
|
6179
|
-
|
|
6178
|
+
const A = (E, Y) => {
|
|
6179
|
+
z({ type: E, message: Y }), setTimeout(() => z(null), 3e3);
|
|
6180
6180
|
}, B = () => {
|
|
6181
6181
|
X(!0);
|
|
6182
6182
|
const E = setTimeout(() => {
|
|
@@ -6185,17 +6185,17 @@ const Ls = [
|
|
|
6185
6185
|
return () => clearTimeout(E);
|
|
6186
6186
|
};
|
|
6187
6187
|
ee(() => {
|
|
6188
|
-
const E = (
|
|
6188
|
+
const E = (Y) => {
|
|
6189
6189
|
const G = document.querySelector(".dropdown-container");
|
|
6190
|
-
G && !G.contains(
|
|
6190
|
+
G && !G.contains(Y.target) && B();
|
|
6191
6191
|
};
|
|
6192
|
-
return
|
|
6192
|
+
return K && document.addEventListener("mousedown", E), () => {
|
|
6193
6193
|
document.removeEventListener("mousedown", E);
|
|
6194
6194
|
};
|
|
6195
|
-
}, [
|
|
6195
|
+
}, [K]);
|
|
6196
6196
|
const ae = async () => {
|
|
6197
6197
|
if (!J.email || !/\S+@\S+\.\S+/.test(J.email)) {
|
|
6198
|
-
|
|
6198
|
+
A("error", "Please enter a valid email");
|
|
6199
6199
|
return;
|
|
6200
6200
|
}
|
|
6201
6201
|
try {
|
|
@@ -6207,38 +6207,38 @@ const Ls = [
|
|
|
6207
6207
|
headers: { "x-api-key": x, "x-app-id": c }
|
|
6208
6208
|
}
|
|
6209
6209
|
);
|
|
6210
|
-
E.data.success ? (
|
|
6210
|
+
E.data.success ? (A("success", E.data.message || "OTP sent to email!"), N(!0)) : A("error", E.data.message || "Failed to send OTP");
|
|
6211
6211
|
} catch (E) {
|
|
6212
|
-
|
|
6212
|
+
A("error", E.response?.data?.message || "Server error");
|
|
6213
6213
|
} finally {
|
|
6214
6214
|
k(!1);
|
|
6215
6215
|
}
|
|
6216
6216
|
}, de = async (E) => {
|
|
6217
6217
|
if (E.preventDefault(), !J.email || !J.otp) {
|
|
6218
|
-
|
|
6218
|
+
A("error", "Please fill in all fields");
|
|
6219
6219
|
return;
|
|
6220
6220
|
}
|
|
6221
6221
|
try {
|
|
6222
6222
|
k(!0);
|
|
6223
|
-
const
|
|
6223
|
+
const Y = await W.post(
|
|
6224
6224
|
`${l}/users/verify-email`,
|
|
6225
6225
|
J
|
|
6226
6226
|
);
|
|
6227
|
-
if (
|
|
6228
|
-
if (
|
|
6227
|
+
if (Y.data.success) {
|
|
6228
|
+
if (A("success", Y.data.message || "Email verified!"), y) {
|
|
6229
6229
|
const G = { ...y, isVerified: !0 };
|
|
6230
6230
|
w(G), localStorage.setItem(
|
|
6231
6231
|
"userInfo",
|
|
6232
6232
|
JSON.stringify({ ...G, token: e })
|
|
6233
6233
|
), typeof i == "function" && i(G);
|
|
6234
6234
|
}
|
|
6235
|
-
f({ email: "", otp: "", appId: c }), N(!1),
|
|
6235
|
+
f({ email: "", otp: "", appId: c }), N(!1), M(!1);
|
|
6236
6236
|
} else
|
|
6237
|
-
|
|
6238
|
-
} catch (
|
|
6239
|
-
|
|
6237
|
+
A("error", Y.data.message || "Verification failed");
|
|
6238
|
+
} catch (Y) {
|
|
6239
|
+
A(
|
|
6240
6240
|
"error",
|
|
6241
|
-
|
|
6241
|
+
Y.response?.data?.message || "Something went wrong"
|
|
6242
6242
|
);
|
|
6243
6243
|
} finally {
|
|
6244
6244
|
k(!1);
|
|
@@ -6246,17 +6246,17 @@ const Ls = [
|
|
|
6246
6246
|
}, ve = async (E) => {
|
|
6247
6247
|
if (!y) return !1;
|
|
6248
6248
|
try {
|
|
6249
|
-
const
|
|
6249
|
+
const Y = { ...y, avatarUrl: E }, { data: G } = await W.put(
|
|
6250
6250
|
`${l}/users/update/${y.id}`,
|
|
6251
|
-
|
|
6251
|
+
Y,
|
|
6252
6252
|
{ headers: { "x-api-key": x } }
|
|
6253
6253
|
);
|
|
6254
|
-
return G.success ? (w(
|
|
6254
|
+
return G.success ? (w(Y), localStorage.setItem(
|
|
6255
6255
|
"userInfo",
|
|
6256
|
-
JSON.stringify({ ...
|
|
6257
|
-
),
|
|
6258
|
-
} catch (
|
|
6259
|
-
return console.error("Avatar update error:",
|
|
6256
|
+
JSON.stringify({ ...Y, token: e })
|
|
6257
|
+
), A("success", "Avatar updated successfully!"), !0) : (A("error", G.message || "Failed to update avatar"), !1);
|
|
6258
|
+
} catch (Y) {
|
|
6259
|
+
return console.error("Avatar update error:", Y), A("error", "Failed to update avatar"), !1;
|
|
6260
6260
|
}
|
|
6261
6261
|
}, He = async () => {
|
|
6262
6262
|
if (y) {
|
|
@@ -6270,22 +6270,22 @@ const Ls = [
|
|
|
6270
6270
|
E.success ? (w(E.user), _(!1), localStorage.setItem(
|
|
6271
6271
|
"userInfo",
|
|
6272
6272
|
JSON.stringify({ ...E.user, token: e })
|
|
6273
|
-
),
|
|
6273
|
+
), A("success", "Profile updated successfully")) : A("error", E.message);
|
|
6274
6274
|
} catch (E) {
|
|
6275
|
-
console.error(E),
|
|
6275
|
+
console.error(E), A("error", "Update failed");
|
|
6276
6276
|
} finally {
|
|
6277
6277
|
$(!1);
|
|
6278
6278
|
}
|
|
6279
6279
|
}
|
|
6280
6280
|
}, ft = async (E) => {
|
|
6281
6281
|
try {
|
|
6282
|
-
const { data:
|
|
6282
|
+
const { data: Y } = await W.get(
|
|
6283
6283
|
`${l}/users/check-user/${E}?appId=${c}`,
|
|
6284
6284
|
{ headers: { "x-api-key": x } }
|
|
6285
6285
|
);
|
|
6286
|
-
|
|
6287
|
-
} catch (
|
|
6288
|
-
console.error("⚠️ User validation request failed:",
|
|
6286
|
+
Y?.success === !0 && Y?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), w(null));
|
|
6287
|
+
} catch (Y) {
|
|
6288
|
+
console.error("⚠️ User validation request failed:", Y);
|
|
6289
6289
|
}
|
|
6290
6290
|
};
|
|
6291
6291
|
ee(() => {
|
|
@@ -6293,9 +6293,9 @@ const Ls = [
|
|
|
6293
6293
|
if (t)
|
|
6294
6294
|
w(t), j(!1), ft(t.id);
|
|
6295
6295
|
else {
|
|
6296
|
-
const
|
|
6297
|
-
if (
|
|
6298
|
-
const G = JSON.parse(
|
|
6296
|
+
const Y = localStorage.getItem("userInfo");
|
|
6297
|
+
if (Y) {
|
|
6298
|
+
const G = JSON.parse(Y);
|
|
6299
6299
|
w(G), j(!1), ft(G.id);
|
|
6300
6300
|
} else
|
|
6301
6301
|
j(!1);
|
|
@@ -6304,8 +6304,8 @@ const Ls = [
|
|
|
6304
6304
|
}, [t]), ee(() => {
|
|
6305
6305
|
y?.email && f((E) => ({ ...E, email: y.email }));
|
|
6306
6306
|
}, [y?.email]);
|
|
6307
|
-
const xt = (E,
|
|
6308
|
-
let G = parseInt(E.replace("#", ""), 16), pe = (G >> 16) +
|
|
6307
|
+
const xt = (E, Y) => {
|
|
6308
|
+
let G = parseInt(E.replace("#", ""), 16), pe = (G >> 16) + Y, Ve = (G >> 8 & 255) + Y, Ye = (G & 255) + Y;
|
|
6309
6309
|
return pe = Math.min(255, Math.max(0, pe)), Ve = Math.min(255, Math.max(0, Ve)), Ye = Math.min(255, Math.max(0, Ye)), `#${(Ye | Ve << 8 | pe << 16).toString(16).padStart(6, "0")}`;
|
|
6310
6310
|
}, D = n ? {
|
|
6311
6311
|
background: "#000000",
|
|
@@ -6450,7 +6450,7 @@ const Ls = [
|
|
|
6450
6450
|
minHeight: "80vh"
|
|
6451
6451
|
},
|
|
6452
6452
|
children: [
|
|
6453
|
-
|
|
6453
|
+
V && /* @__PURE__ */ r.jsxs(
|
|
6454
6454
|
"div",
|
|
6455
6455
|
{
|
|
6456
6456
|
style: {
|
|
@@ -6470,7 +6470,7 @@ const Ls = [
|
|
|
6470
6470
|
fontWeight: 500,
|
|
6471
6471
|
maxWidth: "400px",
|
|
6472
6472
|
animation: "slideIn 0.3s ease-out",
|
|
6473
|
-
...
|
|
6473
|
+
...V.type === "success" ? {
|
|
6474
6474
|
backgroundColor: n ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)",
|
|
6475
6475
|
borderColor: n ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)",
|
|
6476
6476
|
color: n ? "#34d399" : "#059669"
|
|
@@ -6483,8 +6483,8 @@ const Ls = [
|
|
|
6483
6483
|
role: "alert",
|
|
6484
6484
|
"aria-live": "polite",
|
|
6485
6485
|
children: [
|
|
6486
|
-
|
|
6487
|
-
|
|
6486
|
+
V.type === "success" ? /* @__PURE__ */ r.jsx(ce, { size: 20, "aria-hidden": "true" }) : /* @__PURE__ */ r.jsx(le, { size: 20, "aria-hidden": "true" }),
|
|
6487
|
+
V.message
|
|
6488
6488
|
]
|
|
6489
6489
|
}
|
|
6490
6490
|
),
|
|
@@ -6594,7 +6594,7 @@ const Ls = [
|
|
|
6594
6594
|
/* @__PURE__ */ r.jsx(
|
|
6595
6595
|
"button",
|
|
6596
6596
|
{
|
|
6597
|
-
onClick: () =>
|
|
6597
|
+
onClick: () => F(!0),
|
|
6598
6598
|
style: {
|
|
6599
6599
|
position: "absolute",
|
|
6600
6600
|
bottom: "8px",
|
|
@@ -6773,7 +6773,7 @@ const Ls = [
|
|
|
6773
6773
|
!y.isVerified && /* @__PURE__ */ r.jsxs(
|
|
6774
6774
|
"button",
|
|
6775
6775
|
{
|
|
6776
|
-
onClick: () =>
|
|
6776
|
+
onClick: () => M(!0),
|
|
6777
6777
|
disabled: P,
|
|
6778
6778
|
style: {
|
|
6779
6779
|
background: "linear-gradient(to right, #fbbf24, #f59e0b)",
|
|
@@ -6830,14 +6830,14 @@ const Ls = [
|
|
|
6830
6830
|
width: "100%",
|
|
6831
6831
|
boxSizing: "border-box"
|
|
6832
6832
|
},
|
|
6833
|
-
onClick: () => Z(!
|
|
6833
|
+
onClick: () => Z(!K),
|
|
6834
6834
|
children: [
|
|
6835
6835
|
/* @__PURE__ */ r.jsx(as, { size: 16, "aria-hidden": "true" }),
|
|
6836
6836
|
"More Actions"
|
|
6837
6837
|
]
|
|
6838
6838
|
}
|
|
6839
6839
|
),
|
|
6840
|
-
|
|
6840
|
+
K && /* @__PURE__ */ r.jsxs(
|
|
6841
6841
|
"div",
|
|
6842
6842
|
{
|
|
6843
6843
|
className: `dropdown-container ${T ? "closing" : ""}`,
|
|
@@ -7008,7 +7008,7 @@ const Ls = [
|
|
|
7008
7008
|
}
|
|
7009
7009
|
},
|
|
7010
7010
|
children: pr.map((E) => {
|
|
7011
|
-
const
|
|
7011
|
+
const Y = E.icon;
|
|
7012
7012
|
return /* @__PURE__ */ r.jsxs(
|
|
7013
7013
|
"div",
|
|
7014
7014
|
{
|
|
@@ -7030,7 +7030,7 @@ const Ls = [
|
|
|
7030
7030
|
gap: "8px"
|
|
7031
7031
|
},
|
|
7032
7032
|
children: [
|
|
7033
|
-
/* @__PURE__ */ r.jsx(
|
|
7033
|
+
/* @__PURE__ */ r.jsx(Y, { size: 16, "aria-hidden": "true" }),
|
|
7034
7034
|
E.label
|
|
7035
7035
|
]
|
|
7036
7036
|
}
|
|
@@ -7223,7 +7223,7 @@ const Ls = [
|
|
|
7223
7223
|
{
|
|
7224
7224
|
isOpen: C,
|
|
7225
7225
|
onClose: () => {
|
|
7226
|
-
|
|
7226
|
+
F(!1);
|
|
7227
7227
|
},
|
|
7228
7228
|
onUpdate: ve,
|
|
7229
7229
|
colors: D
|
|
@@ -7238,8 +7238,8 @@ const Ls = [
|
|
|
7238
7238
|
userId: y.id,
|
|
7239
7239
|
isOpen: g,
|
|
7240
7240
|
onClose: () => I(!1),
|
|
7241
|
-
onSuccess: (E) =>
|
|
7242
|
-
onError: (E) =>
|
|
7241
|
+
onSuccess: (E) => A("success", E),
|
|
7242
|
+
onError: (E) => A("error", E),
|
|
7243
7243
|
colors: D
|
|
7244
7244
|
}
|
|
7245
7245
|
),
|
|
@@ -7253,8 +7253,8 @@ const Ls = [
|
|
|
7253
7253
|
token: e,
|
|
7254
7254
|
isOpen: v,
|
|
7255
7255
|
onClose: () => U(!1),
|
|
7256
|
-
onSuccess: (E) =>
|
|
7257
|
-
onError: (E) =>
|
|
7256
|
+
onSuccess: (E) => A("success", E),
|
|
7257
|
+
onError: (E) => A("error", E),
|
|
7258
7258
|
colors: D
|
|
7259
7259
|
}
|
|
7260
7260
|
),
|
|
@@ -7263,7 +7263,7 @@ const Ls = [
|
|
|
7263
7263
|
{
|
|
7264
7264
|
isOpen: q,
|
|
7265
7265
|
onClose: () => {
|
|
7266
|
-
|
|
7266
|
+
M(!1), N(!1), f({ email: y?.email || "", otp: "", appId: c });
|
|
7267
7267
|
},
|
|
7268
7268
|
onVerify: de,
|
|
7269
7269
|
onSendOTP: ae,
|
|
@@ -7388,23 +7388,15 @@ const Ls = [
|
|
|
7388
7388
|
viewProfileLabel: w = "View Profile",
|
|
7389
7389
|
logoutLabel: d = "Sign Out"
|
|
7390
7390
|
}) => {
|
|
7391
|
-
const { baseUrl: j, apiKey: m, appId: _ } = ge(), [R, $] = O(!1), [C,
|
|
7391
|
+
const { baseUrl: j, apiKey: m, appId: _ } = ge(), [R, $] = O(!1), [C, F] = O(null), [g, I] = O(!0), [v, U] = O(null), q = ht(null), M = ht(null), [K, Z] = O(!1), [T, X] = O(!1), V = async (h) => {
|
|
7392
7392
|
try {
|
|
7393
|
-
if (!h)
|
|
7394
|
-
throw new Error("Invalid user ID");
|
|
7395
7393
|
const { data: k } = await W.get(
|
|
7396
7394
|
`${j}/users/check-user/${h}?appId=${_}`,
|
|
7397
|
-
{
|
|
7398
|
-
headers: { "x-api-key": m },
|
|
7399
|
-
timeout: 1e4
|
|
7400
|
-
// 10 second timeout
|
|
7401
|
-
}
|
|
7395
|
+
{ headers: { "x-api-key": m } }
|
|
7402
7396
|
);
|
|
7403
|
-
|
|
7397
|
+
k?.success === !0 && k?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), F(null));
|
|
7404
7398
|
} catch (k) {
|
|
7405
|
-
console.error("User validation failed:", k);
|
|
7406
|
-
const z = k.response?.status === 404 ? "User not found" : k.code === "NETWORK_ERROR" ? "Network error" : "Validation failed";
|
|
7407
|
-
U(z), k.response?.status === 404 && (localStorage.removeItem("userInfo"), M(null));
|
|
7399
|
+
console.error("⚠️ User validation request failed:", k);
|
|
7408
7400
|
}
|
|
7409
7401
|
};
|
|
7410
7402
|
ee(() => {
|
|
@@ -7419,17 +7411,17 @@ const Ls = [
|
|
|
7419
7411
|
if (I(!0), U(null), o) {
|
|
7420
7412
|
if (!o.id || !o.name || !o.email)
|
|
7421
7413
|
throw new Error("Invalid user data provided");
|
|
7422
|
-
|
|
7414
|
+
F(o), await V(o.id);
|
|
7423
7415
|
} else if (typeof window < "u") {
|
|
7424
7416
|
const k = localStorage.getItem("userInfo");
|
|
7425
7417
|
if (k)
|
|
7426
7418
|
try {
|
|
7427
|
-
const
|
|
7428
|
-
if (!
|
|
7419
|
+
const A = JSON.parse(k);
|
|
7420
|
+
if (!A.id || !A.name || !A.email)
|
|
7429
7421
|
throw new Error("Invalid stored user data");
|
|
7430
|
-
|
|
7431
|
-
} catch (
|
|
7432
|
-
console.error("Failed to parse stored user data:",
|
|
7422
|
+
F(A), await V(A.id);
|
|
7423
|
+
} catch (A) {
|
|
7424
|
+
console.error("Failed to parse stored user data:", A), localStorage.removeItem("userInfo"), U("Invalid user data");
|
|
7433
7425
|
}
|
|
7434
7426
|
}
|
|
7435
7427
|
} catch (k) {
|
|
@@ -7441,8 +7433,8 @@ const Ls = [
|
|
|
7441
7433
|
}, [o]), ee(() => {
|
|
7442
7434
|
if (typeof window > "u") return;
|
|
7443
7435
|
const h = () => {
|
|
7444
|
-
if (!R || !
|
|
7445
|
-
const k =
|
|
7436
|
+
if (!R || !M.current) return;
|
|
7437
|
+
const k = M.current.getBoundingClientRect(), A = window.innerWidth, B = window.innerHeight, ae = 280, de = A - k.right, ve = k.left;
|
|
7446
7438
|
B - k.bottom;
|
|
7447
7439
|
const He = de >= ae || de > ve;
|
|
7448
7440
|
Z(He);
|
|
@@ -7452,17 +7444,17 @@ const Ls = [
|
|
|
7452
7444
|
if (typeof window > "u" || typeof document > "u")
|
|
7453
7445
|
return;
|
|
7454
7446
|
const h = (B) => {
|
|
7455
|
-
q.current && !q.current.contains(B.target) && !
|
|
7447
|
+
q.current && !q.current.contains(B.target) && !M.current?.contains(B.target) && $(!1);
|
|
7456
7448
|
}, k = (B) => {
|
|
7457
7449
|
B.key === "Escape" && $(!1);
|
|
7458
|
-
},
|
|
7450
|
+
}, A = () => {
|
|
7459
7451
|
R && $(!1);
|
|
7460
7452
|
};
|
|
7461
|
-
return R && (document.addEventListener("mousedown", h), document.addEventListener("keydown", k), window.addEventListener("scroll",
|
|
7462
|
-
document.removeEventListener("mousedown", h), document.removeEventListener("keydown", k), window.removeEventListener("scroll",
|
|
7453
|
+
return R && (document.addEventListener("mousedown", h), document.addEventListener("keydown", k), window.addEventListener("scroll", A)), () => {
|
|
7454
|
+
document.removeEventListener("mousedown", h), document.removeEventListener("keydown", k), window.removeEventListener("scroll", A);
|
|
7463
7455
|
};
|
|
7464
7456
|
}, [R]);
|
|
7465
|
-
const
|
|
7457
|
+
const z = e ? {
|
|
7466
7458
|
surface: "#000000",
|
|
7467
7459
|
surfaceElevated: "#000000",
|
|
7468
7460
|
surfaceHover: "#262626",
|
|
@@ -7497,7 +7489,7 @@ const Ls = [
|
|
|
7497
7489
|
gap: T ? "6px" : "8px",
|
|
7498
7490
|
padding: T ? "6px 10px 6px 6px" : "8px 12px 8px 8px",
|
|
7499
7491
|
borderRadius: "24px",
|
|
7500
|
-
backgroundColor:
|
|
7492
|
+
backgroundColor: z.surface,
|
|
7501
7493
|
cursor: "pointer",
|
|
7502
7494
|
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7503
7495
|
minWidth: T ? "auto" : "140px",
|
|
@@ -7509,7 +7501,7 @@ const Ls = [
|
|
|
7509
7501
|
height: T ? "28px" : "32px",
|
|
7510
7502
|
borderRadius: "50%",
|
|
7511
7503
|
objectFit: "cover",
|
|
7512
|
-
border: `2px solid ${
|
|
7504
|
+
border: `2px solid ${z.borderLight}`,
|
|
7513
7505
|
flexShrink: 0
|
|
7514
7506
|
},
|
|
7515
7507
|
userInfo: {
|
|
@@ -7523,7 +7515,7 @@ const Ls = [
|
|
|
7523
7515
|
userName: {
|
|
7524
7516
|
fontSize: T ? "13px" : "14px",
|
|
7525
7517
|
fontWeight: 600,
|
|
7526
|
-
color:
|
|
7518
|
+
color: z.textPrimary,
|
|
7527
7519
|
lineHeight: "1.2",
|
|
7528
7520
|
whiteSpace: "nowrap",
|
|
7529
7521
|
overflow: "hidden",
|
|
@@ -7532,7 +7524,7 @@ const Ls = [
|
|
|
7532
7524
|
},
|
|
7533
7525
|
userEmail: {
|
|
7534
7526
|
fontSize: T ? "11px" : "12px",
|
|
7535
|
-
color:
|
|
7527
|
+
color: z.textTertiary,
|
|
7536
7528
|
lineHeight: "1.2",
|
|
7537
7529
|
whiteSpace: "nowrap",
|
|
7538
7530
|
overflow: "hidden",
|
|
@@ -7542,16 +7534,16 @@ const Ls = [
|
|
|
7542
7534
|
chevron: {
|
|
7543
7535
|
transition: "transform 0.2s ease",
|
|
7544
7536
|
transform: R ? "rotate(180deg)" : "rotate(0deg)",
|
|
7545
|
-
color:
|
|
7537
|
+
color: z.textTertiary,
|
|
7546
7538
|
flexShrink: 0
|
|
7547
7539
|
},
|
|
7548
7540
|
dropdown: {
|
|
7549
7541
|
position: "absolute",
|
|
7550
7542
|
top: "100%",
|
|
7551
7543
|
marginTop: "8px",
|
|
7552
|
-
[
|
|
7553
|
-
backgroundColor:
|
|
7554
|
-
border: `1px solid ${
|
|
7544
|
+
[K ? "left" : "right"]: "0",
|
|
7545
|
+
backgroundColor: z.surfaceElevated,
|
|
7546
|
+
border: `1px solid ${z.border}`,
|
|
7555
7547
|
borderRadius: "12px",
|
|
7556
7548
|
boxShadow: "0 20px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1)",
|
|
7557
7549
|
width: "min(280px, 90vw)",
|
|
@@ -7582,7 +7574,7 @@ const Ls = [
|
|
|
7582
7574
|
height: T ? "40px" : "48px",
|
|
7583
7575
|
borderRadius: "50%",
|
|
7584
7576
|
objectFit: "cover",
|
|
7585
|
-
border: `2px solid ${
|
|
7577
|
+
border: `2px solid ${z.borderLight}`,
|
|
7586
7578
|
flexShrink: 0
|
|
7587
7579
|
},
|
|
7588
7580
|
dropdownUserInfo: {
|
|
@@ -7594,7 +7586,7 @@ const Ls = [
|
|
|
7594
7586
|
dropdownUserName: {
|
|
7595
7587
|
fontSize: T ? "15px" : "16px",
|
|
7596
7588
|
fontWeight: 600,
|
|
7597
|
-
color:
|
|
7589
|
+
color: z.textPrimary,
|
|
7598
7590
|
lineHeight: "1.2",
|
|
7599
7591
|
marginBottom: "2px",
|
|
7600
7592
|
overflow: "hidden",
|
|
@@ -7602,7 +7594,7 @@ const Ls = [
|
|
|
7602
7594
|
},
|
|
7603
7595
|
dropdownUserEmail: {
|
|
7604
7596
|
fontSize: T ? "13px" : "14px",
|
|
7605
|
-
color:
|
|
7597
|
+
color: z.textSecondary,
|
|
7606
7598
|
lineHeight: "1.2",
|
|
7607
7599
|
overflow: "hidden",
|
|
7608
7600
|
textOverflow: "ellipsis"
|
|
@@ -7615,7 +7607,7 @@ const Ls = [
|
|
|
7615
7607
|
borderRadius: "8px",
|
|
7616
7608
|
cursor: "pointer",
|
|
7617
7609
|
transition: "all 0.15s ease",
|
|
7618
|
-
color:
|
|
7610
|
+
color: z.textPrimary,
|
|
7619
7611
|
textDecoration: "none",
|
|
7620
7612
|
border: "none",
|
|
7621
7613
|
background: "none",
|
|
@@ -7630,7 +7622,7 @@ const Ls = [
|
|
|
7630
7622
|
icon: {
|
|
7631
7623
|
width: T ? "16px" : "18px",
|
|
7632
7624
|
height: T ? "16px" : "18px",
|
|
7633
|
-
color:
|
|
7625
|
+
color: z.textSecondary,
|
|
7634
7626
|
flexShrink: 0
|
|
7635
7627
|
},
|
|
7636
7628
|
logoutButton: {
|
|
@@ -7645,20 +7637,20 @@ const Ls = [
|
|
|
7645
7637
|
border: "none",
|
|
7646
7638
|
width: "100%",
|
|
7647
7639
|
fontSize: T ? "13px" : "14px",
|
|
7648
|
-
color:
|
|
7640
|
+
color: z.error,
|
|
7649
7641
|
textAlign: "left",
|
|
7650
7642
|
outline: "none"
|
|
7651
7643
|
},
|
|
7652
7644
|
loadingText: {
|
|
7653
7645
|
padding: T ? "16px 12px" : "20px 16px",
|
|
7654
7646
|
textAlign: "center",
|
|
7655
|
-
color:
|
|
7647
|
+
color: z.textSecondary,
|
|
7656
7648
|
fontSize: T ? "13px" : "14px"
|
|
7657
7649
|
},
|
|
7658
7650
|
errorState: {
|
|
7659
7651
|
padding: T ? "16px 12px" : "20px 16px",
|
|
7660
7652
|
textAlign: "center",
|
|
7661
|
-
color:
|
|
7653
|
+
color: z.textSecondary,
|
|
7662
7654
|
fontSize: T ? "13px" : "14px",
|
|
7663
7655
|
display: "flex",
|
|
7664
7656
|
alignItems: "center",
|
|
@@ -7669,7 +7661,7 @@ const Ls = [
|
|
|
7669
7661
|
retryButton: {
|
|
7670
7662
|
marginTop: "8px",
|
|
7671
7663
|
padding: "8px 16px",
|
|
7672
|
-
backgroundColor:
|
|
7664
|
+
backgroundColor: z.accent,
|
|
7673
7665
|
color: "#ffffff",
|
|
7674
7666
|
border: "none",
|
|
7675
7667
|
borderRadius: "6px",
|
|
@@ -7678,17 +7670,19 @@ const Ls = [
|
|
|
7678
7670
|
fontWeight: 500,
|
|
7679
7671
|
transition: "background-color 0.2s ease"
|
|
7680
7672
|
}
|
|
7681
|
-
}, ne = () => {
|
|
7673
|
+
}, ne = async () => {
|
|
7682
7674
|
U(null), I(!0);
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
|
|
7675
|
+
try {
|
|
7676
|
+
const h = localStorage.getItem("userInfo");
|
|
7677
|
+
if (h) {
|
|
7686
7678
|
const k = JSON.parse(h);
|
|
7687
|
-
|
|
7688
|
-
}
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7679
|
+
F(k), await V(k.id);
|
|
7680
|
+
} else o && (F(o), await V(o.id));
|
|
7681
|
+
} catch (h) {
|
|
7682
|
+
console.error("Retry failed:", h), U("Invalid user data"), localStorage.removeItem("userInfo"), F(null);
|
|
7683
|
+
} finally {
|
|
7684
|
+
I(!1);
|
|
7685
|
+
}
|
|
7692
7686
|
}, J = (h, k) => {
|
|
7693
7687
|
(h.key === "Enter" || h.key === " ") && (h.preventDefault(), k());
|
|
7694
7688
|
}, f = () => a || C?.profileUrl, S = () => {
|
|
@@ -7709,7 +7703,7 @@ const Ls = [
|
|
|
7709
7703
|
s === "classic" ? /* @__PURE__ */ r.jsx(
|
|
7710
7704
|
"div",
|
|
7711
7705
|
{
|
|
7712
|
-
ref:
|
|
7706
|
+
ref: M,
|
|
7713
7707
|
onClick: () => $((h) => !h),
|
|
7714
7708
|
onKeyDown: (h) => J(h, () => $((k) => !k)),
|
|
7715
7709
|
tabIndex: 0,
|
|
@@ -7727,7 +7721,7 @@ const Ls = [
|
|
|
7727
7721
|
height: T ? "34px" : "40px",
|
|
7728
7722
|
borderRadius: "50%",
|
|
7729
7723
|
objectFit: "cover",
|
|
7730
|
-
border: `2px solid ${
|
|
7724
|
+
border: `2px solid ${z.borderLight}`,
|
|
7731
7725
|
flexShrink: 0
|
|
7732
7726
|
},
|
|
7733
7727
|
loading: "lazy",
|
|
@@ -7750,7 +7744,7 @@ const Ls = [
|
|
|
7750
7744
|
height: T ? "34px" : "40px",
|
|
7751
7745
|
borderRadius: "50%",
|
|
7752
7746
|
objectFit: "cover",
|
|
7753
|
-
border: `2px solid ${
|
|
7747
|
+
border: `2px solid ${z.borderLight}`,
|
|
7754
7748
|
flexShrink: 0
|
|
7755
7749
|
},
|
|
7756
7750
|
loading: "lazy"
|
|
@@ -7760,7 +7754,7 @@ const Ls = [
|
|
|
7760
7754
|
) : /* @__PURE__ */ r.jsxs(
|
|
7761
7755
|
"div",
|
|
7762
7756
|
{
|
|
7763
|
-
ref:
|
|
7757
|
+
ref: M,
|
|
7764
7758
|
style: P.avatarButton,
|
|
7765
7759
|
onClick: () => $((h) => !h),
|
|
7766
7760
|
onKeyDown: (h) => J(h, () => $((k) => !k)),
|
|
@@ -7770,10 +7764,10 @@ const Ls = [
|
|
|
7770
7764
|
"aria-expanded": R,
|
|
7771
7765
|
"aria-label": "Toggle user menu",
|
|
7772
7766
|
onMouseOver: (h) => {
|
|
7773
|
-
h.currentTarget.style.backgroundColor =
|
|
7767
|
+
h.currentTarget.style.backgroundColor = z.surfaceHover, h.currentTarget.style.boxShadow = "0 4px 12px rgba(0,0,0,0.15)";
|
|
7774
7768
|
},
|
|
7775
7769
|
onMouseOut: (h) => {
|
|
7776
|
-
h.currentTarget.style.backgroundColor =
|
|
7770
|
+
h.currentTarget.style.backgroundColor = z.surface, h.currentTarget.style.boxShadow = "none";
|
|
7777
7771
|
},
|
|
7778
7772
|
onBlur: (h) => {
|
|
7779
7773
|
h.currentTarget.style.outline = "none";
|
|
@@ -7850,7 +7844,7 @@ const Ls = [
|
|
|
7850
7844
|
style: P.menuItem,
|
|
7851
7845
|
onClick: S,
|
|
7852
7846
|
onMouseOver: (h) => {
|
|
7853
|
-
h.currentTarget.style.backgroundColor =
|
|
7847
|
+
h.currentTarget.style.backgroundColor = z.surfaceHover;
|
|
7854
7848
|
},
|
|
7855
7849
|
onMouseOut: (h) => {
|
|
7856
7850
|
h.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -7870,7 +7864,7 @@ const Ls = [
|
|
|
7870
7864
|
style: P.menuItem,
|
|
7871
7865
|
onClick: N,
|
|
7872
7866
|
onMouseOver: (h) => {
|
|
7873
|
-
h.currentTarget.style.backgroundColor =
|
|
7867
|
+
h.currentTarget.style.backgroundColor = z.surfaceHover;
|
|
7874
7868
|
},
|
|
7875
7869
|
onMouseOut: (h) => {
|
|
7876
7870
|
h.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -7892,7 +7886,7 @@ const Ls = [
|
|
|
7892
7886
|
rel: "noopener noreferrer",
|
|
7893
7887
|
style: P.menuItem,
|
|
7894
7888
|
onMouseOver: (h) => {
|
|
7895
|
-
h.currentTarget.style.backgroundColor =
|
|
7889
|
+
h.currentTarget.style.backgroundColor = z.surfaceHover;
|
|
7896
7890
|
},
|
|
7897
7891
|
onMouseOut: (h) => {
|
|
7898
7892
|
h.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -7912,7 +7906,7 @@ const Ls = [
|
|
|
7912
7906
|
style: P.logoutButton,
|
|
7913
7907
|
onClick: n,
|
|
7914
7908
|
onMouseOver: (h) => {
|
|
7915
|
-
h.currentTarget.style.backgroundColor =
|
|
7909
|
+
h.currentTarget.style.backgroundColor = z.surfaceHover;
|
|
7916
7910
|
},
|
|
7917
7911
|
onMouseOut: (h) => {
|
|
7918
7912
|
h.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -7924,7 +7918,7 @@ const Ls = [
|
|
|
7924
7918
|
/* @__PURE__ */ r.jsx(
|
|
7925
7919
|
ut,
|
|
7926
7920
|
{
|
|
7927
|
-
style: { ...P.icon, color:
|
|
7921
|
+
style: { ...P.icon, color: z.error },
|
|
7928
7922
|
"aria-hidden": "true"
|
|
7929
7923
|
}
|
|
7930
7924
|
),
|
|
@@ -7949,10 +7943,10 @@ const Ls = [
|
|
|
7949
7943
|
style: P.retryButton,
|
|
7950
7944
|
onClick: ne,
|
|
7951
7945
|
onMouseOver: (h) => {
|
|
7952
|
-
h.currentTarget.style.backgroundColor =
|
|
7946
|
+
h.currentTarget.style.backgroundColor = z.accentHover;
|
|
7953
7947
|
},
|
|
7954
7948
|
onMouseOut: (h) => {
|
|
7955
|
-
h.currentTarget.style.backgroundColor =
|
|
7949
|
+
h.currentTarget.style.backgroundColor = z.accent;
|
|
7956
7950
|
},
|
|
7957
7951
|
children: "Try Again"
|
|
7958
7952
|
}
|
|
@@ -7972,8 +7966,8 @@ const Ls = [
|
|
|
7972
7966
|
otp: "",
|
|
7973
7967
|
appId: o
|
|
7974
7968
|
}), [c, u] = O(!1), [b, y] = O(!1), [w, d] = O(null), j = (g, I) => {
|
|
7975
|
-
let v = parseInt(g.replace("#", ""), 16), U = (v >> 16) + I, q = (v >> 8 & 255) + I,
|
|
7976
|
-
return U = Math.min(255, Math.max(0, U)), q = Math.min(255, Math.max(0, q)),
|
|
7969
|
+
let v = parseInt(g.replace("#", ""), 16), U = (v >> 16) + I, q = (v >> 8 & 255) + I, M = (v & 255) + I;
|
|
7970
|
+
return U = Math.min(255, Math.max(0, U)), q = Math.min(255, Math.max(0, q)), M = Math.min(255, Math.max(0, M)), `#${(M | q << 8 | U << 16).toString(16).padStart(6, "0")}`;
|
|
7977
7971
|
}, m = t ? {
|
|
7978
7972
|
surface: "#09090b",
|
|
7979
7973
|
surfaceLight: "#27272a",
|
|
@@ -8047,7 +8041,7 @@ const Ls = [
|
|
|
8047
8041
|
color: m.textPrimary,
|
|
8048
8042
|
fontSize: 14,
|
|
8049
8043
|
outline: "none"
|
|
8050
|
-
},
|
|
8044
|
+
}, F = (g = !1) => ({
|
|
8051
8045
|
flex: 1,
|
|
8052
8046
|
padding: 12,
|
|
8053
8047
|
borderRadius: 8,
|
|
@@ -8158,7 +8152,7 @@ const Ls = [
|
|
|
8158
8152
|
)
|
|
8159
8153
|
] })
|
|
8160
8154
|
] }),
|
|
8161
|
-
/* @__PURE__ */ r.jsx("div", { style: { display: "flex", gap: 12 }, children: c ? /* @__PURE__ */ r.jsxs("button", { type: "submit", disabled: b, style:
|
|
8155
|
+
/* @__PURE__ */ r.jsx("div", { style: { display: "flex", gap: 12 }, children: c ? /* @__PURE__ */ r.jsxs("button", { type: "submit", disabled: b, style: F(b), children: [
|
|
8162
8156
|
b ? /* @__PURE__ */ r.jsx(se, { size: 16, className: "spinner" }) : /* @__PURE__ */ r.jsx(ce, { size: 16 }),
|
|
8163
8157
|
b ? "Verifying..." : "Verify Email"
|
|
8164
8158
|
] }) : /* @__PURE__ */ r.jsxs(
|
|
@@ -8167,7 +8161,7 @@ const Ls = [
|
|
|
8167
8161
|
type: "button",
|
|
8168
8162
|
onClick: R,
|
|
8169
8163
|
disabled: b,
|
|
8170
|
-
style:
|
|
8164
|
+
style: F(b),
|
|
8171
8165
|
children: [
|
|
8172
8166
|
b ? /* @__PURE__ */ r.jsx(se, { size: 16, className: "spinner" }) : /* @__PURE__ */ r.jsx(pt, { size: 16 }),
|
|
8173
8167
|
b ? "Sending..." : "Send OTP"
|