@neuctra/authix 1.1.36 → 1.1.37
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 +454 -423
- package/dist/neuctra-authix.umd.js +48 -48
- package/dist/sdk/index.d.ts +13 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ function xr(t) {
|
|
|
16
16
|
let e;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Lt(t.buffer), e;
|
|
18
18
|
}
|
|
19
|
-
const hr = Me("string"), re = Me("function"), Ft = Me("number"), Te = (t) => t !== null && typeof t == "object", gr = (t) => t === !0 || t === !1,
|
|
19
|
+
const hr = Me("string"), re = Me("function"), Ft = Me("number"), Te = (t) => t !== null && typeof t == "object", gr = (t) => t === !0 || t === !1, ze = (t) => {
|
|
20
20
|
if (qe(t) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const e = st(t);
|
|
@@ -33,8 +33,8 @@ const hr = Me("string"), re = Me("function"), Ft = Me("number"), Te = (t) => t !
|
|
|
33
33
|
let e;
|
|
34
34
|
return t && (typeof FormData == "function" && t instanceof FormData || re(t.append) && ((e = qe(t)) === "formdata" || // detect form-data instance
|
|
35
35
|
e === "object" && re(t.toString) && t.toString() === "[object FormData]"));
|
|
36
|
-
},
|
|
37
|
-
function
|
|
36
|
+
}, Er = oe("URLSearchParams"), [kr, Cr, Tr, Ir] = ["ReadableStream", "Request", "Response", "Headers"].map(oe), Rr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
|
+
function Ie(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
38
38
|
if (t === null || typeof t > "u")
|
|
39
39
|
return;
|
|
40
40
|
let s, a;
|
|
@@ -65,19 +65,19 @@ const fe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typ
|
|
|
65
65
|
function Ze() {
|
|
66
66
|
const { caseless: t, skipUndefined: e } = Mt(this) && this || {}, r = {}, s = (a, i) => {
|
|
67
67
|
const o = t && qt(r, i) || i;
|
|
68
|
-
|
|
68
|
+
ze(r[o]) && ze(a) ? r[o] = Ze(r[o], a) : ze(a) ? r[o] = Ze({}, a) : we(a) ? r[o] = a.slice() : (!e || !ye(a)) && (r[o] = a);
|
|
69
69
|
};
|
|
70
70
|
for (let a = 0, i = arguments.length; a < i; a++)
|
|
71
|
-
arguments[a] &&
|
|
71
|
+
arguments[a] && Ie(arguments[a], s);
|
|
72
72
|
return r;
|
|
73
73
|
}
|
|
74
|
-
const Pr = (t, e, r, { allOwnKeys: s } = {}) => (
|
|
74
|
+
const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Ie(e, (a, i) => {
|
|
75
75
|
r && re(a) ? t[i] = Dt(a, r) : t[i] = a;
|
|
76
|
-
}, { allOwnKeys: s }), t), Or = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t),
|
|
76
|
+
}, { allOwnKeys: s }), t), Or = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Ar = (t, e, r, s) => {
|
|
77
77
|
t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
78
78
|
value: e.prototype
|
|
79
79
|
}), r && Object.assign(t.prototype, r);
|
|
80
|
-
},
|
|
80
|
+
}, zr = (t, e, r, s) => {
|
|
81
81
|
let a, i, o;
|
|
82
82
|
const l = {};
|
|
83
83
|
if (e = e || {}, t == null) return e;
|
|
@@ -118,14 +118,14 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, i) => {
|
|
|
118
118
|
function(r, s, a) {
|
|
119
119
|
return s.toUpperCase() + a;
|
|
120
120
|
}
|
|
121
|
-
), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), qr = oe("RegExp"),
|
|
121
|
+
), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), qr = oe("RegExp"), Bt = (t, e) => {
|
|
122
122
|
const r = Object.getOwnPropertyDescriptors(t), s = {};
|
|
123
|
-
|
|
123
|
+
Ie(r, (a, i) => {
|
|
124
124
|
let o;
|
|
125
125
|
(o = e(a, i, t)) !== !1 && (s[i] = o || a);
|
|
126
126
|
}), Object.defineProperties(t, s);
|
|
127
127
|
}, Mr = (t) => {
|
|
128
|
-
|
|
128
|
+
Bt(t, (e, r) => {
|
|
129
129
|
if (re(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
130
130
|
return !1;
|
|
131
131
|
const s = t[r];
|
|
@@ -139,14 +139,14 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, i) => {
|
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
|
-
},
|
|
142
|
+
}, Br = (t, e) => {
|
|
143
143
|
const r = {}, s = (a) => {
|
|
144
144
|
a.forEach((i) => {
|
|
145
145
|
r[i] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
148
|
return we(t) ? s(t) : s(String(t).split(e)), r;
|
|
149
|
-
},
|
|
149
|
+
}, Wr = () => {
|
|
150
150
|
}, Hr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
151
151
|
function Vr(t) {
|
|
152
152
|
return !!(t && re(t.append) && t[Ut] === "FormData" && t[Fe]);
|
|
@@ -161,7 +161,7 @@ const Yr = (t) => {
|
|
|
161
161
|
if (!("toJSON" in s)) {
|
|
162
162
|
e[a] = s;
|
|
163
163
|
const i = we(s) ? [] : {};
|
|
164
|
-
return
|
|
164
|
+
return Ie(s, (o, l) => {
|
|
165
165
|
const h = r(o, a + 1);
|
|
166
166
|
!ye(h) && (i[l] = h);
|
|
167
167
|
}), e[a] = void 0, i;
|
|
@@ -170,14 +170,14 @@ const Yr = (t) => {
|
|
|
170
170
|
return s;
|
|
171
171
|
};
|
|
172
172
|
return r(t, 0);
|
|
173
|
-
}, Kr = oe("AsyncFunction"), Jr = (t) => t && (Te(t) || re(t)) && re(t.then) && re(t.catch),
|
|
173
|
+
}, Kr = oe("AsyncFunction"), Jr = (t) => t && (Te(t) || re(t)) && re(t.then) && re(t.catch), Wt = ((t, e) => t ? setImmediate : e ? ((r, s) => (fe.addEventListener("message", ({ source: a, data: i }) => {
|
|
174
174
|
a === fe && i === r && s.length && s.shift()();
|
|
175
175
|
}, !1), (a) => {
|
|
176
176
|
s.push(a), fe.postMessage(r, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
179
|
re(fe.postMessage)
|
|
180
|
-
), Gr = typeof queueMicrotask < "u" ? queueMicrotask.bind(fe) : typeof process < "u" && process.nextTick ||
|
|
180
|
+
), Gr = typeof queueMicrotask < "u" ? queueMicrotask.bind(fe) : typeof process < "u" && process.nextTick || Wt, Xr = (t) => t != null && re(t[Fe]), p = {
|
|
181
181
|
isArray: we,
|
|
182
182
|
isArrayBuffer: Lt,
|
|
183
183
|
isBuffer: Ce,
|
|
@@ -187,12 +187,12 @@ const Yr = (t) => {
|
|
|
187
187
|
isNumber: Ft,
|
|
188
188
|
isBoolean: gr,
|
|
189
189
|
isObject: Te,
|
|
190
|
-
isPlainObject:
|
|
190
|
+
isPlainObject: ze,
|
|
191
191
|
isEmptyObject: mr,
|
|
192
|
-
isReadableStream:
|
|
192
|
+
isReadableStream: kr,
|
|
193
193
|
isRequest: Cr,
|
|
194
194
|
isResponse: Tr,
|
|
195
|
-
isHeaders:
|
|
195
|
+
isHeaders: Ir,
|
|
196
196
|
isUndefined: ye,
|
|
197
197
|
isDate: yr,
|
|
198
198
|
isFile: br,
|
|
@@ -200,16 +200,16 @@ const Yr = (t) => {
|
|
|
200
200
|
isRegExp: qr,
|
|
201
201
|
isFunction: re,
|
|
202
202
|
isStream: vr,
|
|
203
|
-
isURLSearchParams:
|
|
203
|
+
isURLSearchParams: Er,
|
|
204
204
|
isTypedArray: Nr,
|
|
205
205
|
isFileList: jr,
|
|
206
|
-
forEach:
|
|
206
|
+
forEach: Ie,
|
|
207
207
|
merge: Ze,
|
|
208
208
|
extend: Pr,
|
|
209
|
-
trim:
|
|
209
|
+
trim: Rr,
|
|
210
210
|
stripBOM: Or,
|
|
211
|
-
inherits:
|
|
212
|
-
toFlatObject:
|
|
211
|
+
inherits: Ar,
|
|
212
|
+
toFlatObject: zr,
|
|
213
213
|
kindOf: qe,
|
|
214
214
|
kindOfTest: oe,
|
|
215
215
|
endsWith: $r,
|
|
@@ -220,11 +220,11 @@ const Yr = (t) => {
|
|
|
220
220
|
hasOwnProperty: ht,
|
|
221
221
|
hasOwnProp: ht,
|
|
222
222
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
|
-
reduceDescriptors:
|
|
223
|
+
reduceDescriptors: Bt,
|
|
224
224
|
freezeMethods: Mr,
|
|
225
|
-
toObjectSet:
|
|
225
|
+
toObjectSet: Br,
|
|
226
226
|
toCamelCase: Fr,
|
|
227
|
-
noop:
|
|
227
|
+
noop: Wr,
|
|
228
228
|
toFiniteNumber: Hr,
|
|
229
229
|
findKey: qt,
|
|
230
230
|
global: fe,
|
|
@@ -233,7 +233,7 @@ const Yr = (t) => {
|
|
|
233
233
|
toJSONObject: Yr,
|
|
234
234
|
isAsyncFn: Kr,
|
|
235
235
|
isThenable: Jr,
|
|
236
|
-
setImmediate:
|
|
236
|
+
setImmediate: Wt,
|
|
237
237
|
asap: Gr,
|
|
238
238
|
isIterable: Xr
|
|
239
239
|
};
|
|
@@ -307,7 +307,7 @@ function Qr(t) {
|
|
|
307
307
|
const en = p.toFlatObject(p, {}, null, function(e) {
|
|
308
308
|
return /^is[A-Z]/.test(e);
|
|
309
309
|
});
|
|
310
|
-
function
|
|
310
|
+
function Be(t, e, r) {
|
|
311
311
|
if (!p.isObject(t))
|
|
312
312
|
throw new TypeError("target must be an object");
|
|
313
313
|
e = e || new FormData(), r = p.toFlatObject(r, {
|
|
@@ -336,11 +336,11 @@ function We(t, e, r) {
|
|
|
336
336
|
if (p.endsWith(j, "{}"))
|
|
337
337
|
j = s ? j : j.slice(0, -2), c = JSON.stringify(c);
|
|
338
338
|
else if (p.isArray(c) && Qr(c) || (p.isFileList(c) || p.endsWith(j, "[]")) && ($ = p.toArray(c)))
|
|
339
|
-
return j = Yt(j), $.forEach(function(
|
|
340
|
-
!(p.isUndefined(
|
|
339
|
+
return j = Yt(j), $.forEach(function(z, C) {
|
|
340
|
+
!(p.isUndefined(z) || z === null) && e.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
342
|
o === !0 ? gt([j], C, i) : o === null ? j : j + "[]",
|
|
343
|
-
d(
|
|
343
|
+
d(z)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
@@ -355,14 +355,14 @@ function We(t, e, r) {
|
|
|
355
355
|
if (!p.isUndefined(c)) {
|
|
356
356
|
if (b.indexOf(c) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + j.join("."));
|
|
358
|
-
b.push(c), p.forEach(c, function($,
|
|
358
|
+
b.push(c), p.forEach(c, function($, I) {
|
|
359
359
|
(!(p.isUndefined($) || $ === null) && a.call(
|
|
360
360
|
e,
|
|
361
361
|
$,
|
|
362
|
-
p.isString(
|
|
362
|
+
p.isString(I) ? I.trim() : I,
|
|
363
363
|
j,
|
|
364
364
|
y
|
|
365
|
-
)) === !0 && w($, j ? j.concat(
|
|
365
|
+
)) === !0 && w($, j ? j.concat(I) : [I]);
|
|
366
366
|
}), b.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
@@ -385,7 +385,7 @@ function mt(t) {
|
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
387
|
function at(t, e) {
|
|
388
|
-
this._pairs = [], t &&
|
|
388
|
+
this._pairs = [], t && Be(t, this, e);
|
|
389
389
|
}
|
|
390
390
|
const Kt = at.prototype;
|
|
391
391
|
Kt.append = function(e, r) {
|
|
@@ -496,7 +496,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", dn
|
|
|
496
496
|
...an
|
|
497
497
|
};
|
|
498
498
|
function un(t, e) {
|
|
499
|
-
return
|
|
499
|
+
return Be(t, new ee.classes.URLSearchParams(), {
|
|
500
500
|
visitor: function(r, s, a, i) {
|
|
501
501
|
return ee.isNode && p.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
@@ -540,7 +540,7 @@ function xn(t, e, r) {
|
|
|
540
540
|
}
|
|
541
541
|
return (r || JSON.stringify)(t);
|
|
542
542
|
}
|
|
543
|
-
const
|
|
543
|
+
const Re = {
|
|
544
544
|
transitional: Gt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(e, r) {
|
|
@@ -559,7 +559,7 @@ const Ie = {
|
|
|
559
559
|
return un(e, this.formSerializer).toString();
|
|
560
560
|
if ((l = p.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
|
561
561
|
const h = this.env && this.env.FormData;
|
|
562
|
-
return
|
|
562
|
+
return Be(
|
|
563
563
|
l ? { "files[]": e } : e,
|
|
564
564
|
h && new h(),
|
|
565
565
|
this.formSerializer
|
|
@@ -569,7 +569,7 @@ const Ie = {
|
|
|
569
569
|
return i || a ? (r.setContentType("application/json", !1), xn(e)) : e;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(e) {
|
|
572
|
-
const r = this.transitional ||
|
|
572
|
+
const r = this.transitional || Re.transitional, s = r && r.forcedJSONParsing, a = this.responseType === "json";
|
|
573
573
|
if (p.isResponse(e) || p.isReadableStream(e))
|
|
574
574
|
return e;
|
|
575
575
|
if (e && p.isString(e) && (s && !this.responseType || a)) {
|
|
@@ -607,7 +607,7 @@ const Ie = {
|
|
|
607
607
|
}
|
|
608
608
|
};
|
|
609
609
|
p.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
610
|
-
|
|
610
|
+
Re.headers[t] = {};
|
|
611
611
|
});
|
|
612
612
|
const hn = p.toObjectSet([
|
|
613
613
|
"age",
|
|
@@ -811,7 +811,7 @@ p.reduceDescriptors(ne.prototype, ({ value: t }, e) => {
|
|
|
811
811
|
});
|
|
812
812
|
p.freezeMethods(ne);
|
|
813
813
|
function Ke(t, e) {
|
|
814
|
-
const r = this ||
|
|
814
|
+
const r = this || Re, s = e || r, a = ne.from(s.headers);
|
|
815
815
|
let i = s.data;
|
|
816
816
|
return p.forEach(t, function(l) {
|
|
817
817
|
i = l.call(r, i, a.normalize(), e ? e.status : void 0);
|
|
@@ -894,10 +894,10 @@ const Ue = (t, e, r = 3) => {
|
|
|
894
894
|
total: t,
|
|
895
895
|
loaded: s
|
|
896
896
|
}), e[1]];
|
|
897
|
-
}, jt = (t) => (...e) => p.asap(() => t(...e)),
|
|
897
|
+
}, jt = (t) => (...e) => p.asap(() => t(...e)), En = ee.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, ee.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
|
|
898
898
|
new URL(ee.origin),
|
|
899
899
|
ee.navigator && /(msie|trident)/i.test(ee.navigator.userAgent)
|
|
900
|
-
) : () => !0,
|
|
900
|
+
) : () => !0, kn = ee.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
903
|
write(t, e, r, s, a, i) {
|
|
@@ -1015,12 +1015,12 @@ const tr = (t) => {
|
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
if (ee.hasStandardBrowserEnv && (s && p.isFunction(s) && (s = s(e)), s || s !== !1 &&
|
|
1019
|
-
const h = a && i &&
|
|
1018
|
+
if (ee.hasStandardBrowserEnv && (s && p.isFunction(s) && (s = s(e)), s || s !== !1 && En(e.url))) {
|
|
1019
|
+
const h = a && i && kn.read(i);
|
|
1020
1020
|
h && o.set(a, h);
|
|
1021
1021
|
}
|
|
1022
1022
|
return e;
|
|
1023
|
-
},
|
|
1023
|
+
}, In = typeof XMLHttpRequest < "u", Rn = In && function(t) {
|
|
1024
1024
|
return new Promise(function(r, s) {
|
|
1025
1025
|
const a = tr(t);
|
|
1026
1026
|
let i = a.data;
|
|
@@ -1034,20 +1034,20 @@ const tr = (t) => {
|
|
|
1034
1034
|
function $() {
|
|
1035
1035
|
if (!m)
|
|
1036
1036
|
return;
|
|
1037
|
-
const
|
|
1037
|
+
const z = ne.from(
|
|
1038
1038
|
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1039
1039
|
), q = {
|
|
1040
1040
|
data: !l || l === "text" || l === "json" ? m.responseText : m.response,
|
|
1041
1041
|
status: m.status,
|
|
1042
1042
|
statusText: m.statusText,
|
|
1043
|
-
headers:
|
|
1043
|
+
headers: z,
|
|
1044
1044
|
config: t,
|
|
1045
1045
|
request: m
|
|
1046
1046
|
};
|
|
1047
|
-
Qt(function(
|
|
1048
|
-
r(
|
|
1049
|
-
}, function(
|
|
1050
|
-
s(
|
|
1047
|
+
Qt(function(R) {
|
|
1048
|
+
r(R), j();
|
|
1049
|
+
}, function(R) {
|
|
1050
|
+
s(R), j();
|
|
1051
1051
|
}, q), m = null;
|
|
1052
1052
|
}
|
|
1053
1053
|
"onloadend" in m ? m.onloadend = $ : m.onreadystatechange = function() {
|
|
@@ -1068,12 +1068,12 @@ const tr = (t) => {
|
|
|
1068
1068
|
)), m = null;
|
|
1069
1069
|
}, i === void 0 && o.setContentType(null), "setRequestHeader" in m && p.forEach(o.toJSON(), function(C, q) {
|
|
1070
1070
|
m.setRequestHeader(q, C);
|
|
1071
|
-
}), p.isUndefined(a.withCredentials) || (m.withCredentials = !!a.withCredentials), l && l !== "json" && (m.responseType = a.responseType), d && ([y, c] = Ue(d, !0), m.addEventListener("progress", y)), h && m.upload && ([b, w] = Ue(h), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (a.cancelToken || a.signal) && (u = (
|
|
1072
|
-
m && (s(!
|
|
1071
|
+
}), p.isUndefined(a.withCredentials) || (m.withCredentials = !!a.withCredentials), l && l !== "json" && (m.responseType = a.responseType), d && ([y, c] = Ue(d, !0), m.addEventListener("progress", y)), h && m.upload && ([b, w] = Ue(h), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (a.cancelToken || a.signal) && (u = (z) => {
|
|
1072
|
+
m && (s(!z || z.type ? new je(null, t, m) : z), m.abort(), m = null);
|
|
1073
1073
|
}, a.cancelToken && a.cancelToken.subscribe(u), a.signal && (a.signal.aborted ? u() : a.signal.addEventListener("abort", u)));
|
|
1074
|
-
const
|
|
1075
|
-
if (
|
|
1076
|
-
s(new L("Unsupported protocol " +
|
|
1074
|
+
const I = jn(a.url);
|
|
1075
|
+
if (I && ee.protocols.indexOf(I) === -1) {
|
|
1076
|
+
s(new L("Unsupported protocol " + I + ":", L.ERR_BAD_REQUEST, t));
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
1079
|
m.send(i || null);
|
|
@@ -1110,10 +1110,10 @@ const tr = (t) => {
|
|
|
1110
1110
|
let s = 0, a;
|
|
1111
1111
|
for (; s < r; )
|
|
1112
1112
|
a = s + e, yield t.slice(s, a), s = a;
|
|
1113
|
-
},
|
|
1114
|
-
for await (const r of
|
|
1113
|
+
}, An = async function* (t, e) {
|
|
1114
|
+
for await (const r of zn(t))
|
|
1115
1115
|
yield* On(r, e);
|
|
1116
|
-
},
|
|
1116
|
+
}, zn = async function* (t) {
|
|
1117
1117
|
if (t[Symbol.asyncIterator]) {
|
|
1118
1118
|
yield* t;
|
|
1119
1119
|
return;
|
|
@@ -1130,7 +1130,7 @@ const tr = (t) => {
|
|
|
1130
1130
|
await e.cancel();
|
|
1131
1131
|
}
|
|
1132
1132
|
}, St = (t, e, r, s) => {
|
|
1133
|
-
const a =
|
|
1133
|
+
const a = An(t, e);
|
|
1134
1134
|
let i = 0, o, l = (h) => {
|
|
1135
1135
|
o || (o = !0, s && s(h));
|
|
1136
1136
|
};
|
|
@@ -1158,11 +1158,11 @@ const tr = (t) => {
|
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
1160
1160
|
});
|
|
1161
|
-
},
|
|
1161
|
+
}, Et = 64 * 1024, { isFunction: Oe } = p, $n = (({ Request: t, Response: e }) => ({
|
|
1162
1162
|
Request: t,
|
|
1163
1163
|
Response: e
|
|
1164
1164
|
}))(p.global), {
|
|
1165
|
-
ReadableStream:
|
|
1165
|
+
ReadableStream: kt,
|
|
1166
1166
|
TextEncoder: Ct
|
|
1167
1167
|
} = p.global, Tt = (t, ...e) => {
|
|
1168
1168
|
try {
|
|
@@ -1177,10 +1177,10 @@ const tr = (t) => {
|
|
|
1177
1177
|
const { fetch: e, Request: r, Response: s } = t, a = e ? Oe(e) : typeof fetch == "function", i = Oe(r), o = Oe(s);
|
|
1178
1178
|
if (!a)
|
|
1179
1179
|
return !1;
|
|
1180
|
-
const l = a && Oe(
|
|
1180
|
+
const l = a && Oe(kt), h = a && (typeof Ct == "function" ? /* @__PURE__ */ ((c) => (j) => c.encode(j))(new Ct()) : async (c) => new Uint8Array(await new r(c).arrayBuffer())), d = i && l && Tt(() => {
|
|
1181
1181
|
let c = !1;
|
|
1182
1182
|
const j = new r(ee.origin, {
|
|
1183
|
-
body: new
|
|
1183
|
+
body: new kt(),
|
|
1184
1184
|
method: "POST",
|
|
1185
1185
|
get duplex() {
|
|
1186
1186
|
return c = !0, "half";
|
|
@@ -1221,18 +1221,18 @@ const tr = (t) => {
|
|
|
1221
1221
|
url: j,
|
|
1222
1222
|
method: m,
|
|
1223
1223
|
data: $,
|
|
1224
|
-
signal:
|
|
1225
|
-
cancelToken:
|
|
1224
|
+
signal: I,
|
|
1225
|
+
cancelToken: z,
|
|
1226
1226
|
timeout: C,
|
|
1227
1227
|
onDownloadProgress: q,
|
|
1228
1228
|
onUploadProgress: g,
|
|
1229
|
-
responseType:
|
|
1229
|
+
responseType: R,
|
|
1230
1230
|
headers: v,
|
|
1231
1231
|
withCredentials: D = "same-origin",
|
|
1232
|
-
fetchOptions:
|
|
1232
|
+
fetchOptions: B
|
|
1233
1233
|
} = tr(c), F = e || fetch;
|
|
1234
|
-
|
|
1235
|
-
let V = Pn([
|
|
1234
|
+
R = R ? (R + "").toLowerCase() : "text";
|
|
1235
|
+
let V = Pn([I, z && z.toAbortSignal()], C), Z = null;
|
|
1236
1236
|
const T = V && V.unsubscribe && (() => {
|
|
1237
1237
|
V.unsubscribe();
|
|
1238
1238
|
});
|
|
@@ -1245,44 +1245,44 @@ const tr = (t) => {
|
|
|
1245
1245
|
duplex: "half"
|
|
1246
1246
|
}), S;
|
|
1247
1247
|
if (p.isFormData($) && (S = f.headers.get("content-type")) && v.setContentType(S), f.body) {
|
|
1248
|
-
const [x,
|
|
1248
|
+
const [x, E] = wt(
|
|
1249
1249
|
J,
|
|
1250
1250
|
Ue(jt(g))
|
|
1251
1251
|
);
|
|
1252
|
-
$ = St(f.body,
|
|
1252
|
+
$ = St(f.body, Et, x, E);
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
p.isString(D) || (D = D ? "include" : "omit");
|
|
1256
|
-
const
|
|
1257
|
-
...
|
|
1256
|
+
const A = i && "credentials" in r.prototype, P = {
|
|
1257
|
+
...B,
|
|
1258
1258
|
signal: V,
|
|
1259
1259
|
method: m.toUpperCase(),
|
|
1260
1260
|
headers: v.normalize().toJSON(),
|
|
1261
1261
|
body: $,
|
|
1262
1262
|
duplex: "half",
|
|
1263
|
-
credentials:
|
|
1263
|
+
credentials: A ? D : void 0
|
|
1264
1264
|
};
|
|
1265
1265
|
Z = i && new r(j, P);
|
|
1266
|
-
let K = await (i ? F(Z,
|
|
1267
|
-
const Q = u && (
|
|
1266
|
+
let K = await (i ? F(Z, B) : F(j, P));
|
|
1267
|
+
const Q = u && (R === "stream" || R === "response");
|
|
1268
1268
|
if (u && (q || Q && T)) {
|
|
1269
1269
|
const f = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((_) => {
|
|
1271
1271
|
f[_] = K[_];
|
|
1272
1272
|
});
|
|
1273
|
-
const S = p.toFiniteNumber(K.headers.get("content-length")), [x,
|
|
1273
|
+
const S = p.toFiniteNumber(K.headers.get("content-length")), [x, E] = q && wt(
|
|
1274
1274
|
S,
|
|
1275
1275
|
Ue(jt(q), !0)
|
|
1276
1276
|
) || [];
|
|
1277
1277
|
K = new s(
|
|
1278
|
-
St(K.body,
|
|
1279
|
-
|
|
1278
|
+
St(K.body, Et, x, () => {
|
|
1279
|
+
E && E(), T && T();
|
|
1280
1280
|
}),
|
|
1281
1281
|
f
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
|
-
|
|
1285
|
-
let G = await b[p.findKey(b,
|
|
1284
|
+
R = R || "text";
|
|
1285
|
+
let G = await b[p.findKey(b, R) || "text"](K, c);
|
|
1286
1286
|
return !Q && T && T(), await new Promise((f, S) => {
|
|
1287
1287
|
Qt(f, S, {
|
|
1288
1288
|
data: G,
|
|
@@ -1293,13 +1293,13 @@ const tr = (t) => {
|
|
|
1293
1293
|
request: Z
|
|
1294
1294
|
});
|
|
1295
1295
|
});
|
|
1296
|
-
} catch (
|
|
1297
|
-
throw T && T(),
|
|
1296
|
+
} catch (A) {
|
|
1297
|
+
throw T && T(), A && A.name === "TypeError" && /Load failed|fetch/i.test(A.message) ? Object.assign(
|
|
1298
1298
|
new L("Network Error", L.ERR_NETWORK, c, Z),
|
|
1299
1299
|
{
|
|
1300
|
-
cause:
|
|
1300
|
+
cause: A.cause || A
|
|
1301
1301
|
}
|
|
1302
|
-
) : L.from(
|
|
1302
|
+
) : L.from(A, A && A.code, c, Z);
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
1305
|
}, Nn = /* @__PURE__ */ new Map(), rr = (t) => {
|
|
@@ -1317,7 +1317,7 @@ const tr = (t) => {
|
|
|
1317
1317
|
rr();
|
|
1318
1318
|
const tt = {
|
|
1319
1319
|
http: Zr,
|
|
1320
|
-
xhr:
|
|
1320
|
+
xhr: Rn,
|
|
1321
1321
|
fetch: {
|
|
1322
1322
|
get: rr
|
|
1323
1323
|
}
|
|
@@ -1331,7 +1331,7 @@ p.forEach(tt, (t, e) => {
|
|
|
1331
1331
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1332
1332
|
}
|
|
1333
1333
|
});
|
|
1334
|
-
const
|
|
1334
|
+
const It = (t) => `- ${t}`, Dn = (t) => p.isFunction(t) || t === null || t === !1, nr = {
|
|
1335
1335
|
getAdapter: (t, e) => {
|
|
1336
1336
|
t = p.isArray(t) ? t : [t];
|
|
1337
1337
|
const { length: r } = t;
|
|
@@ -1351,8 +1351,8 @@ const Rt = (t) => `- ${t}`, Dn = (t) => p.isFunction(t) || t === null || t === !
|
|
|
1351
1351
|
([h, d]) => `adapter ${h} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1352
1352
|
);
|
|
1353
1353
|
let l = r ? o.length > 1 ? `since :
|
|
1354
|
-
` + o.map(
|
|
1355
|
-
`) : " " +
|
|
1354
|
+
` + o.map(It).join(`
|
|
1355
|
+
`) : " " + It(o[0]) : "as no adapter specified";
|
|
1356
1356
|
throw new L(
|
|
1357
1357
|
"There is no suitable adapter to dispatch the request " + l,
|
|
1358
1358
|
"ERR_NOT_SUPPORT"
|
|
@@ -1366,11 +1366,11 @@ function Je(t) {
|
|
|
1366
1366
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1367
1367
|
throw new je(null, t);
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1369
|
+
function Rt(t) {
|
|
1370
1370
|
return Je(t), t.headers = ne.from(t.headers), t.data = Ke.call(
|
|
1371
1371
|
t,
|
|
1372
1372
|
t.transformRequest
|
|
1373
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), nr.getAdapter(t.adapter ||
|
|
1373
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), nr.getAdapter(t.adapter || Re.adapter, t)(t).then(function(s) {
|
|
1374
1374
|
return Je(t), s.data = Ke.call(
|
|
1375
1375
|
t,
|
|
1376
1376
|
t.transformResponse,
|
|
@@ -1384,14 +1384,14 @@ function It(t) {
|
|
|
1384
1384
|
), s.response.headers = ne.from(s.response.headers))), Promise.reject(s);
|
|
1385
1385
|
});
|
|
1386
1386
|
}
|
|
1387
|
-
const sr = "1.12.2",
|
|
1387
|
+
const sr = "1.12.2", We = {};
|
|
1388
1388
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1389
|
-
|
|
1389
|
+
We[t] = function(s) {
|
|
1390
1390
|
return typeof s === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
1391
1391
|
};
|
|
1392
1392
|
});
|
|
1393
1393
|
const Pt = {};
|
|
1394
|
-
|
|
1394
|
+
We.transitional = function(e, r, s) {
|
|
1395
1395
|
function a(i, o) {
|
|
1396
1396
|
return "[Axios v" + sr + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
|
1397
1397
|
}
|
|
@@ -1409,7 +1409,7 @@ Be.transitional = function(e, r, s) {
|
|
|
1409
1409
|
)), e ? e(i, o, l) : !0;
|
|
1410
1410
|
};
|
|
1411
1411
|
};
|
|
1412
|
-
|
|
1412
|
+
We.spelling = function(e) {
|
|
1413
1413
|
return (r, s) => (console.warn(`${s} is likely a misspelling of ${e}`), !0);
|
|
1414
1414
|
};
|
|
1415
1415
|
function Un(t, e, r) {
|
|
@@ -1431,7 +1431,7 @@ function Un(t, e, r) {
|
|
|
1431
1431
|
}
|
|
1432
1432
|
const _e = {
|
|
1433
1433
|
assertOptions: Un,
|
|
1434
|
-
validators:
|
|
1434
|
+
validators: We
|
|
1435
1435
|
}, ie = _e.validators;
|
|
1436
1436
|
let xe = class {
|
|
1437
1437
|
constructor(e) {
|
|
@@ -1502,7 +1502,7 @@ let xe = class {
|
|
|
1502
1502
|
});
|
|
1503
1503
|
let u, b = 0, y;
|
|
1504
1504
|
if (!h) {
|
|
1505
|
-
const c = [
|
|
1505
|
+
const c = [Rt.bind(this), void 0];
|
|
1506
1506
|
for (c.unshift(...l), c.push(...d), y = c.length, u = Promise.resolve(r); b < y; )
|
|
1507
1507
|
u = u.then(c[b++], c[b++]);
|
|
1508
1508
|
return u;
|
|
@@ -1519,7 +1519,7 @@ let xe = class {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
try {
|
|
1522
|
-
u =
|
|
1522
|
+
u = Rt.call(this, w);
|
|
1523
1523
|
} catch (c) {
|
|
1524
1524
|
return Promise.reject(c);
|
|
1525
1525
|
}
|
|
@@ -1712,13 +1712,13 @@ function or(t) {
|
|
|
1712
1712
|
return or(he(t, a));
|
|
1713
1713
|
}, r;
|
|
1714
1714
|
}
|
|
1715
|
-
const M = or(
|
|
1715
|
+
const M = or(Re);
|
|
1716
1716
|
M.Axios = xe;
|
|
1717
1717
|
M.CanceledError = je;
|
|
1718
1718
|
M.CancelToken = Ln;
|
|
1719
1719
|
M.isCancel = Zt;
|
|
1720
1720
|
M.VERSION = sr;
|
|
1721
|
-
M.toFormData =
|
|
1721
|
+
M.toFormData = Be;
|
|
1722
1722
|
M.AxiosError = L;
|
|
1723
1723
|
M.Cancel = M.CanceledError;
|
|
1724
1724
|
M.all = function(e) {
|
|
@@ -1982,7 +1982,10 @@ class ca {
|
|
|
1982
1982
|
if (!r)
|
|
1983
1983
|
throw new Error("searchUserDataByKeys: 'userId' is required");
|
|
1984
1984
|
const a = new URLSearchParams(
|
|
1985
|
-
Object.entries(s).reduce(
|
|
1985
|
+
Object.entries(s).reduce(
|
|
1986
|
+
(i, [o, l]) => (l != null && (i[o] = String(l)), i),
|
|
1987
|
+
{}
|
|
1988
|
+
)
|
|
1986
1989
|
).toString();
|
|
1987
1990
|
return this.request("GET", `/users/${r}/data/searchbyref?${a}`);
|
|
1988
1991
|
}
|
|
@@ -2004,7 +2007,10 @@ class ca {
|
|
|
2004
2007
|
"searchAllUsersDataByKeys: 'appId' is required on SDK initialization"
|
|
2005
2008
|
);
|
|
2006
2009
|
const s = new URLSearchParams(
|
|
2007
|
-
Object.entries(e).reduce(
|
|
2010
|
+
Object.entries(e).reduce(
|
|
2011
|
+
(a, [i, o]) => (o != null && (a[i] = String(o)), a),
|
|
2012
|
+
{}
|
|
2013
|
+
)
|
|
2008
2014
|
).toString();
|
|
2009
2015
|
return this.request(
|
|
2010
2016
|
"GET",
|
|
@@ -2099,6 +2105,31 @@ class ca {
|
|
|
2099
2105
|
`/app/${r}/data/${e.dataId}`
|
|
2100
2106
|
);
|
|
2101
2107
|
}
|
|
2108
|
+
/**
|
|
2109
|
+
* 🔍 Search app data items by dynamic keys
|
|
2110
|
+
* @example
|
|
2111
|
+
* sdk.searchAppDataByKeys({
|
|
2112
|
+
* dataCategory: "orders",
|
|
2113
|
+
* shopId: 12,
|
|
2114
|
+
* status: "active",
|
|
2115
|
+
* productId: "abc123"
|
|
2116
|
+
* })
|
|
2117
|
+
*/
|
|
2118
|
+
async searchAppDataByKeys(e) {
|
|
2119
|
+
const r = this.appId;
|
|
2120
|
+
if (!r)
|
|
2121
|
+
throw new Error("searchAppDataByKeys: 'appId' is required in SDK config");
|
|
2122
|
+
const s = new URLSearchParams(
|
|
2123
|
+
Object.entries(e).reduce(
|
|
2124
|
+
(a, [i, o]) => (o != null && (a[i] = String(o)), a),
|
|
2125
|
+
{}
|
|
2126
|
+
)
|
|
2127
|
+
).toString();
|
|
2128
|
+
return this.request(
|
|
2129
|
+
"GET",
|
|
2130
|
+
`/app/${encodeURIComponent(r)}/data/searchByKeys${s ? `?${s}` : ""}`
|
|
2131
|
+
);
|
|
2132
|
+
}
|
|
2102
2133
|
/**
|
|
2103
2134
|
* Add a new item to app.appData[] under a specific category
|
|
2104
2135
|
*/
|
|
@@ -2141,7 +2172,7 @@ class ca {
|
|
|
2141
2172
|
);
|
|
2142
2173
|
}
|
|
2143
2174
|
}
|
|
2144
|
-
var
|
|
2175
|
+
var Ae = { exports: {} }, Ee = {};
|
|
2145
2176
|
/**
|
|
2146
2177
|
* @license React
|
|
2147
2178
|
* react-jsx-runtime.production.js
|
|
@@ -2153,7 +2184,7 @@ var ze = { exports: {} }, ke = {};
|
|
|
2153
2184
|
*/
|
|
2154
2185
|
var Ot;
|
|
2155
2186
|
function Mn() {
|
|
2156
|
-
if (Ot) return
|
|
2187
|
+
if (Ot) return Ee;
|
|
2157
2188
|
Ot = 1;
|
|
2158
2189
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
2159
2190
|
function r(s, a, i) {
|
|
@@ -2171,9 +2202,9 @@ function Mn() {
|
|
|
2171
2202
|
props: i
|
|
2172
2203
|
};
|
|
2173
2204
|
}
|
|
2174
|
-
return
|
|
2205
|
+
return Ee.Fragment = e, Ee.jsx = r, Ee.jsxs = r, Ee;
|
|
2175
2206
|
}
|
|
2176
|
-
var
|
|
2207
|
+
var ke = {};
|
|
2177
2208
|
/**
|
|
2178
2209
|
* @license React
|
|
2179
2210
|
* react-jsx-runtime.development.js
|
|
@@ -2183,9 +2214,9 @@ var Ee = {};
|
|
|
2183
2214
|
* This source code is licensed under the MIT license found in the
|
|
2184
2215
|
* LICENSE file in the root directory of this source tree.
|
|
2185
2216
|
*/
|
|
2186
|
-
var
|
|
2187
|
-
function
|
|
2188
|
-
return
|
|
2217
|
+
var At;
|
|
2218
|
+
function Bn() {
|
|
2219
|
+
return At || (At = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
2189
2220
|
function t(f) {
|
|
2190
2221
|
if (f == null) return null;
|
|
2191
2222
|
if (typeof f == "function")
|
|
@@ -2194,15 +2225,15 @@ function Wn() {
|
|
|
2194
2225
|
switch (f) {
|
|
2195
2226
|
case m:
|
|
2196
2227
|
return "Fragment";
|
|
2197
|
-
case
|
|
2228
|
+
case I:
|
|
2198
2229
|
return "Profiler";
|
|
2199
2230
|
case $:
|
|
2200
2231
|
return "StrictMode";
|
|
2201
2232
|
case g:
|
|
2202
2233
|
return "Suspense";
|
|
2203
|
-
case
|
|
2234
|
+
case R:
|
|
2204
2235
|
return "SuspenseList";
|
|
2205
|
-
case
|
|
2236
|
+
case B:
|
|
2206
2237
|
return "Activity";
|
|
2207
2238
|
}
|
|
2208
2239
|
if (typeof f == "object")
|
|
@@ -2213,7 +2244,7 @@ function Wn() {
|
|
|
2213
2244
|
return "Portal";
|
|
2214
2245
|
case C:
|
|
2215
2246
|
return f.displayName || "Context";
|
|
2216
|
-
case
|
|
2247
|
+
case z:
|
|
2217
2248
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
2218
2249
|
case q:
|
|
2219
2250
|
var S = f.render;
|
|
@@ -2241,11 +2272,11 @@ function Wn() {
|
|
|
2241
2272
|
}
|
|
2242
2273
|
if (S) {
|
|
2243
2274
|
S = console;
|
|
2244
|
-
var x = S.error,
|
|
2275
|
+
var x = S.error, E = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
2245
2276
|
return x.call(
|
|
2246
2277
|
S,
|
|
2247
2278
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
2248
|
-
|
|
2279
|
+
E
|
|
2249
2280
|
), e(f);
|
|
2250
2281
|
}
|
|
2251
2282
|
}
|
|
@@ -2276,7 +2307,7 @@ function Wn() {
|
|
|
2276
2307
|
}
|
|
2277
2308
|
function l(f, S) {
|
|
2278
2309
|
function x() {
|
|
2279
|
-
|
|
2310
|
+
A || (A = !0, console.error(
|
|
2280
2311
|
"%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)",
|
|
2281
2312
|
S
|
|
2282
2313
|
));
|
|
@@ -2292,14 +2323,14 @@ function Wn() {
|
|
|
2292
2323
|
"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."
|
|
2293
2324
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
2294
2325
|
}
|
|
2295
|
-
function d(f, S, x,
|
|
2326
|
+
function d(f, S, x, E, _, N) {
|
|
2296
2327
|
var Y = x.ref;
|
|
2297
2328
|
return f = {
|
|
2298
2329
|
$$typeof: c,
|
|
2299
2330
|
type: f,
|
|
2300
2331
|
key: S,
|
|
2301
2332
|
props: x,
|
|
2302
|
-
_owner:
|
|
2333
|
+
_owner: E
|
|
2303
2334
|
}, (Y !== void 0 ? Y : null) !== null ? Object.defineProperty(f, "ref", {
|
|
2304
2335
|
enumerable: !1,
|
|
2305
2336
|
get: h
|
|
@@ -2325,13 +2356,13 @@ function Wn() {
|
|
|
2325
2356
|
value: N
|
|
2326
2357
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
2327
2358
|
}
|
|
2328
|
-
function u(f, S, x,
|
|
2359
|
+
function u(f, S, x, E, _, N) {
|
|
2329
2360
|
var Y = S.children;
|
|
2330
2361
|
if (Y !== void 0)
|
|
2331
|
-
if (
|
|
2362
|
+
if (E)
|
|
2332
2363
|
if (T(Y)) {
|
|
2333
|
-
for (
|
|
2334
|
-
b(Y[
|
|
2364
|
+
for (E = 0; E < Y.length; E++)
|
|
2365
|
+
b(Y[E]);
|
|
2335
2366
|
Object.freeze && Object.freeze(Y);
|
|
2336
2367
|
} else
|
|
2337
2368
|
console.error(
|
|
@@ -2343,18 +2374,18 @@ function Wn() {
|
|
|
2343
2374
|
var se = Object.keys(S).filter(function(ve) {
|
|
2344
2375
|
return ve !== "key";
|
|
2345
2376
|
});
|
|
2346
|
-
|
|
2377
|
+
E = 0 < se.length ? "{key: someKey, " + se.join(": ..., ") + ": ...}" : "{key: someKey}", G[Y + E] || (se = 0 < se.length ? "{" + se.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
2347
2378
|
`A props object containing a "key" prop is being spread into JSX:
|
|
2348
2379
|
let props = %s;
|
|
2349
2380
|
<%s {...props} />
|
|
2350
2381
|
React keys must be passed directly to JSX without using spread:
|
|
2351
2382
|
let props = %s;
|
|
2352
2383
|
<%s key={someKey} {...props} />`,
|
|
2353
|
-
|
|
2384
|
+
E,
|
|
2354
2385
|
Y,
|
|
2355
2386
|
se,
|
|
2356
2387
|
Y
|
|
2357
|
-
), G[Y +
|
|
2388
|
+
), G[Y + E] = !0);
|
|
2358
2389
|
}
|
|
2359
2390
|
if (Y = null, x !== void 0 && (r(x), Y = "" + x), o(S) && (r(S.key), Y = "" + S.key), "key" in S) {
|
|
2360
2391
|
x = {};
|
|
@@ -2379,7 +2410,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2379
2410
|
function y(f) {
|
|
2380
2411
|
return typeof f == "object" && f !== null && f.$$typeof === c;
|
|
2381
2412
|
}
|
|
2382
|
-
var w = Le, c = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"),
|
|
2413
|
+
var w = Le, c = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), z = Symbol.for("react.consumer"), C = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), V = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, T = Array.isArray, J = console.createTask ? console.createTask : function() {
|
|
2383
2414
|
return null;
|
|
2384
2415
|
};
|
|
2385
2416
|
w = {
|
|
@@ -2387,38 +2418,38 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2387
2418
|
return f();
|
|
2388
2419
|
}
|
|
2389
2420
|
};
|
|
2390
|
-
var
|
|
2421
|
+
var A, P = {}, K = w.react_stack_bottom_frame.bind(
|
|
2391
2422
|
w,
|
|
2392
2423
|
i
|
|
2393
2424
|
)(), Q = J(s(i)), G = {};
|
|
2394
|
-
|
|
2395
|
-
var
|
|
2425
|
+
ke.Fragment = m, ke.jsx = function(f, S, x) {
|
|
2426
|
+
var E = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2396
2427
|
return u(
|
|
2397
2428
|
f,
|
|
2398
2429
|
S,
|
|
2399
2430
|
x,
|
|
2400
2431
|
!1,
|
|
2401
|
-
|
|
2402
|
-
|
|
2432
|
+
E ? Error("react-stack-top-frame") : K,
|
|
2433
|
+
E ? J(s(f)) : Q
|
|
2403
2434
|
);
|
|
2404
|
-
},
|
|
2405
|
-
var
|
|
2435
|
+
}, ke.jsxs = function(f, S, x) {
|
|
2436
|
+
var E = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2406
2437
|
return u(
|
|
2407
2438
|
f,
|
|
2408
2439
|
S,
|
|
2409
2440
|
x,
|
|
2410
2441
|
!0,
|
|
2411
|
-
|
|
2412
|
-
|
|
2442
|
+
E ? Error("react-stack-top-frame") : K,
|
|
2443
|
+
E ? J(s(f)) : Q
|
|
2413
2444
|
);
|
|
2414
2445
|
};
|
|
2415
|
-
})()),
|
|
2446
|
+
})()), ke;
|
|
2416
2447
|
}
|
|
2417
|
-
var
|
|
2418
|
-
function
|
|
2419
|
-
return
|
|
2448
|
+
var zt;
|
|
2449
|
+
function Wn() {
|
|
2450
|
+
return zt || (zt = 1, process.env.NODE_ENV === "production" ? Ae.exports = Mn() : Ae.exports = Bn()), Ae.exports;
|
|
2420
2451
|
}
|
|
2421
|
-
var n =
|
|
2452
|
+
var n = Wn();
|
|
2422
2453
|
const Hn = async (t, e) => {
|
|
2423
2454
|
const { name: r, email: s, password: a, appId: i, phone: o, address: l, avatarUrl: h, isActive: d = !0, role: u = "user" } = t, { baseUrl: b, apiKey: y } = e;
|
|
2424
2455
|
if (!y)
|
|
@@ -2549,7 +2580,7 @@ const Gn = Nt(
|
|
|
2549
2580
|
* This source code is licensed under the ISC license.
|
|
2550
2581
|
* See the LICENSE file in the root directory of this source tree.
|
|
2551
2582
|
*/
|
|
2552
|
-
const
|
|
2583
|
+
const W = (t, e) => {
|
|
2553
2584
|
const r = Nt(
|
|
2554
2585
|
({ className: s, ...a }, i) => Xe(Gn, {
|
|
2555
2586
|
ref: i,
|
|
@@ -2579,14 +2610,14 @@ const Xn = [
|
|
|
2579
2610
|
}
|
|
2580
2611
|
],
|
|
2581
2612
|
["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
|
|
2582
|
-
], nt =
|
|
2613
|
+
], nt = W("camera", Xn);
|
|
2583
2614
|
/**
|
|
2584
2615
|
* @license lucide-react v0.544.0 - ISC
|
|
2585
2616
|
*
|
|
2586
2617
|
* This source code is licensed under the ISC license.
|
|
2587
2618
|
* See the LICENSE file in the root directory of this source tree.
|
|
2588
2619
|
*/
|
|
2589
|
-
const Zn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Qn =
|
|
2620
|
+
const Zn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Qn = W("chevron-down", Zn);
|
|
2590
2621
|
/**
|
|
2591
2622
|
* @license lucide-react v0.544.0 - ISC
|
|
2592
2623
|
*
|
|
@@ -2597,7 +2628,7 @@ const es = [
|
|
|
2597
2628
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2598
2629
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
2599
2630
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
2600
|
-
], le =
|
|
2631
|
+
], le = W("circle-alert", es);
|
|
2601
2632
|
/**
|
|
2602
2633
|
* @license lucide-react v0.544.0 - ISC
|
|
2603
2634
|
*
|
|
@@ -2607,7 +2638,7 @@ const es = [
|
|
|
2607
2638
|
const ts = [
|
|
2608
2639
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
2609
2640
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
2610
|
-
], de =
|
|
2641
|
+
], de = W("circle-check-big", ts);
|
|
2611
2642
|
/**
|
|
2612
2643
|
* @license lucide-react v0.544.0 - ISC
|
|
2613
2644
|
*
|
|
@@ -2617,7 +2648,7 @@ const ts = [
|
|
|
2617
2648
|
const rs = [
|
|
2618
2649
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2619
2650
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2620
|
-
], Ge =
|
|
2651
|
+
], Ge = W("circle-check", rs);
|
|
2621
2652
|
/**
|
|
2622
2653
|
* @license lucide-react v0.544.0 - ISC
|
|
2623
2654
|
*
|
|
@@ -2628,7 +2659,7 @@ const ns = [
|
|
|
2628
2659
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
2629
2660
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
2630
2661
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
2631
|
-
], ss =
|
|
2662
|
+
], ss = W("database", ns);
|
|
2632
2663
|
/**
|
|
2633
2664
|
* @license lucide-react v0.544.0 - ISC
|
|
2634
2665
|
*
|
|
@@ -2639,7 +2670,7 @@ const as = [
|
|
|
2639
2670
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2640
2671
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
2641
2672
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
2642
|
-
], os =
|
|
2673
|
+
], os = W("ellipsis-vertical", as);
|
|
2643
2674
|
/**
|
|
2644
2675
|
* @license lucide-react v0.544.0 - ISC
|
|
2645
2676
|
*
|
|
@@ -2663,7 +2694,7 @@ const is = [
|
|
|
2663
2694
|
}
|
|
2664
2695
|
],
|
|
2665
2696
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
2666
|
-
], it =
|
|
2697
|
+
], it = W("eye-off", is);
|
|
2667
2698
|
/**
|
|
2668
2699
|
* @license lucide-react v0.544.0 - ISC
|
|
2669
2700
|
*
|
|
@@ -2679,7 +2710,7 @@ const ls = [
|
|
|
2679
2710
|
}
|
|
2680
2711
|
],
|
|
2681
2712
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2682
|
-
], lt =
|
|
2713
|
+
], lt = W("eye", ls);
|
|
2683
2714
|
/**
|
|
2684
2715
|
* @license lucide-react v0.544.0 - ISC
|
|
2685
2716
|
*
|
|
@@ -2695,7 +2726,7 @@ const ds = [
|
|
|
2695
2726
|
key: "r6nss1"
|
|
2696
2727
|
}
|
|
2697
2728
|
]
|
|
2698
|
-
], cs =
|
|
2729
|
+
], cs = W("house", ds);
|
|
2699
2730
|
/**
|
|
2700
2731
|
* @license lucide-react v0.544.0 - ISC
|
|
2701
2732
|
*
|
|
@@ -2706,7 +2737,7 @@ const us = [
|
|
|
2706
2737
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
2707
2738
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
2708
2739
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
2709
|
-
], lr =
|
|
2740
|
+
], lr = W("image", us);
|
|
2710
2741
|
/**
|
|
2711
2742
|
* @license lucide-react v0.544.0 - ISC
|
|
2712
2743
|
*
|
|
@@ -2722,7 +2753,7 @@ const ps = [
|
|
|
2722
2753
|
}
|
|
2723
2754
|
],
|
|
2724
2755
|
["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }]
|
|
2725
|
-
], dr =
|
|
2756
|
+
], dr = W("key-round", ps);
|
|
2726
2757
|
/**
|
|
2727
2758
|
* @license lucide-react v0.544.0 - ISC
|
|
2728
2759
|
*
|
|
@@ -2733,7 +2764,7 @@ const fs = [
|
|
|
2733
2764
|
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
|
|
2734
2765
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
2735
2766
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
2736
|
-
], dt =
|
|
2767
|
+
], dt = W("key", fs);
|
|
2737
2768
|
/**
|
|
2738
2769
|
* @license lucide-react v0.544.0 - ISC
|
|
2739
2770
|
*
|
|
@@ -2744,14 +2775,14 @@ const xs = [
|
|
|
2744
2775
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
2745
2776
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
2746
2777
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
2747
|
-
], hs =
|
|
2778
|
+
], hs = W("link-2", xs);
|
|
2748
2779
|
/**
|
|
2749
2780
|
* @license lucide-react v0.544.0 - ISC
|
|
2750
2781
|
*
|
|
2751
2782
|
* This source code is licensed under the ISC license.
|
|
2752
2783
|
* See the LICENSE file in the root directory of this source tree.
|
|
2753
2784
|
*/
|
|
2754
|
-
const gs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ae =
|
|
2785
|
+
const gs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ae = W("loader-circle", gs);
|
|
2755
2786
|
/**
|
|
2756
2787
|
* @license lucide-react v0.544.0 - ISC
|
|
2757
2788
|
*
|
|
@@ -2767,7 +2798,7 @@ const ms = [
|
|
|
2767
2798
|
["path", { d: "m4.9 19.1 2.9-2.9", key: "bwix9q" }],
|
|
2768
2799
|
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
2769
2800
|
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
2770
|
-
], ys =
|
|
2801
|
+
], ys = W("loader", ms);
|
|
2771
2802
|
/**
|
|
2772
2803
|
* @license lucide-react v0.544.0 - ISC
|
|
2773
2804
|
*
|
|
@@ -2777,7 +2808,7 @@ const ms = [
|
|
|
2777
2808
|
const bs = [
|
|
2778
2809
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
2779
2810
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
2780
|
-
], me =
|
|
2811
|
+
], me = W("lock", bs);
|
|
2781
2812
|
/**
|
|
2782
2813
|
* @license lucide-react v0.544.0 - ISC
|
|
2783
2814
|
*
|
|
@@ -2788,7 +2819,7 @@ const ws = [
|
|
|
2788
2819
|
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
2789
2820
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
2790
2821
|
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
2791
|
-
], ct =
|
|
2822
|
+
], ct = W("log-out", ws);
|
|
2792
2823
|
/**
|
|
2793
2824
|
* @license lucide-react v0.544.0 - ISC
|
|
2794
2825
|
*
|
|
@@ -2798,7 +2829,7 @@ const ws = [
|
|
|
2798
2829
|
const js = [
|
|
2799
2830
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
2800
2831
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
2801
|
-
], ce =
|
|
2832
|
+
], ce = W("mail", js);
|
|
2802
2833
|
/**
|
|
2803
2834
|
* @license lucide-react v0.544.0 - ISC
|
|
2804
2835
|
*
|
|
@@ -2814,14 +2845,14 @@ const vs = [
|
|
|
2814
2845
|
}
|
|
2815
2846
|
],
|
|
2816
2847
|
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }]
|
|
2817
|
-
], Ss =
|
|
2848
|
+
], Ss = W("map-pin", vs);
|
|
2818
2849
|
/**
|
|
2819
2850
|
* @license lucide-react v0.544.0 - ISC
|
|
2820
2851
|
*
|
|
2821
2852
|
* This source code is licensed under the ISC license.
|
|
2822
2853
|
* See the LICENSE file in the root directory of this source tree.
|
|
2823
2854
|
*/
|
|
2824
|
-
const
|
|
2855
|
+
const Es = [
|
|
2825
2856
|
["path", { d: "M13 21h8", key: "1jsn5i" }],
|
|
2826
2857
|
[
|
|
2827
2858
|
"path",
|
|
@@ -2830,7 +2861,7 @@ const ks = [
|
|
|
2830
2861
|
key: "1a8usu"
|
|
2831
2862
|
}
|
|
2832
2863
|
]
|
|
2833
|
-
],
|
|
2864
|
+
], ks = W("pen-line", Es);
|
|
2834
2865
|
/**
|
|
2835
2866
|
* @license lucide-react v0.544.0 - ISC
|
|
2836
2867
|
*
|
|
@@ -2845,14 +2876,14 @@ const Cs = [
|
|
|
2845
2876
|
key: "9njp5v"
|
|
2846
2877
|
}
|
|
2847
2878
|
]
|
|
2848
|
-
], Ts =
|
|
2879
|
+
], Ts = W("phone", Cs);
|
|
2849
2880
|
/**
|
|
2850
2881
|
* @license lucide-react v0.544.0 - ISC
|
|
2851
2882
|
*
|
|
2852
2883
|
* This source code is licensed under the ISC license.
|
|
2853
2884
|
* See the LICENSE file in the root directory of this source tree.
|
|
2854
2885
|
*/
|
|
2855
|
-
const
|
|
2886
|
+
const Is = [
|
|
2856
2887
|
[
|
|
2857
2888
|
"path",
|
|
2858
2889
|
{
|
|
@@ -2862,7 +2893,7 @@ const Rs = [
|
|
|
2862
2893
|
],
|
|
2863
2894
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
2864
2895
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
2865
|
-
],
|
|
2896
|
+
], Rs = W("save", Is);
|
|
2866
2897
|
/**
|
|
2867
2898
|
* @license lucide-react v0.544.0 - ISC
|
|
2868
2899
|
*
|
|
@@ -2878,7 +2909,7 @@ const Ps = [
|
|
|
2878
2909
|
}
|
|
2879
2910
|
],
|
|
2880
2911
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
2881
|
-
], ut =
|
|
2912
|
+
], ut = W("send", Ps);
|
|
2882
2913
|
/**
|
|
2883
2914
|
* @license lucide-react v0.544.0 - ISC
|
|
2884
2915
|
*
|
|
@@ -2894,14 +2925,14 @@ const Os = [
|
|
|
2894
2925
|
}
|
|
2895
2926
|
],
|
|
2896
2927
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2897
|
-
],
|
|
2928
|
+
], As = W("settings", Os);
|
|
2898
2929
|
/**
|
|
2899
2930
|
* @license lucide-react v0.544.0 - ISC
|
|
2900
2931
|
*
|
|
2901
2932
|
* This source code is licensed under the ISC license.
|
|
2902
2933
|
* See the LICENSE file in the root directory of this source tree.
|
|
2903
2934
|
*/
|
|
2904
|
-
const
|
|
2935
|
+
const zs = [
|
|
2905
2936
|
[
|
|
2906
2937
|
"path",
|
|
2907
2938
|
{
|
|
@@ -2909,7 +2940,7 @@ const As = [
|
|
|
2909
2940
|
key: "oel41y"
|
|
2910
2941
|
}
|
|
2911
2942
|
]
|
|
2912
|
-
], cr =
|
|
2943
|
+
], cr = W("shield", zs);
|
|
2913
2944
|
/**
|
|
2914
2945
|
* @license lucide-react v0.544.0 - ISC
|
|
2915
2946
|
*
|
|
@@ -2922,7 +2953,7 @@ const $s = [
|
|
|
2922
2953
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
2923
2954
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
2924
2955
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
2925
|
-
], Ne =
|
|
2956
|
+
], Ne = W("trash-2", $s);
|
|
2926
2957
|
/**
|
|
2927
2958
|
* @license lucide-react v0.544.0 - ISC
|
|
2928
2959
|
*
|
|
@@ -2939,7 +2970,7 @@ const _s = [
|
|
|
2939
2970
|
],
|
|
2940
2971
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
2941
2972
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
2942
|
-
], _t =
|
|
2973
|
+
], _t = W("triangle-alert", _s);
|
|
2943
2974
|
/**
|
|
2944
2975
|
* @license lucide-react v0.544.0 - ISC
|
|
2945
2976
|
*
|
|
@@ -2951,7 +2982,7 @@ const Ns = [
|
|
|
2951
2982
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
2952
2983
|
["line", { x1: "17", x2: "22", y1: "8", y2: "13", key: "3nzzx3" }],
|
|
2953
2984
|
["line", { x1: "22", x2: "17", y1: "8", y2: "13", key: "1swrse" }]
|
|
2954
|
-
], Ds =
|
|
2985
|
+
], Ds = W("user-x", Ns);
|
|
2955
2986
|
/**
|
|
2956
2987
|
* @license lucide-react v0.544.0 - ISC
|
|
2957
2988
|
*
|
|
@@ -2961,7 +2992,7 @@ const Ns = [
|
|
|
2961
2992
|
const Us = [
|
|
2962
2993
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
2963
2994
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
2964
|
-
], be =
|
|
2995
|
+
], be = W("user", Us);
|
|
2965
2996
|
/**
|
|
2966
2997
|
* @license lucide-react v0.544.0 - ISC
|
|
2967
2998
|
*
|
|
@@ -2971,7 +3002,7 @@ const Us = [
|
|
|
2971
3002
|
const Ls = [
|
|
2972
3003
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
2973
3004
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
2974
|
-
], Pe =
|
|
3005
|
+
], Pe = W("x", Ls), De = {
|
|
2975
3006
|
baseUrl: "",
|
|
2976
3007
|
apiKey: "",
|
|
2977
3008
|
appId: ""
|
|
@@ -3004,7 +3035,7 @@ const Ls = [
|
|
|
3004
3035
|
password: "",
|
|
3005
3036
|
role: d.length ? d[0] : "user",
|
|
3006
3037
|
...h && { avatarUrl: "" }
|
|
3007
|
-
}, [
|
|
3038
|
+
}, [I, z] = O($), [C, q] = O(!1), [g, R] = O(!1), [v, D] = O(null), [B, F] = O({}), [V, Z] = O(!1), T = l ? "#ffffff" : "#111827", J = l ? "#a1a1aa" : "#6b7280", A = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", P = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
3008
3039
|
Le.useEffect(() => {
|
|
3009
3040
|
if (typeof window < "u") {
|
|
3010
3041
|
const S = () => Z(window.innerWidth < 768);
|
|
@@ -3012,31 +3043,31 @@ const Ls = [
|
|
|
3012
3043
|
}
|
|
3013
3044
|
}, []);
|
|
3014
3045
|
const K = (S) => {
|
|
3015
|
-
const { name: x, value:
|
|
3016
|
-
|
|
3046
|
+
const { name: x, value: E } = S.target;
|
|
3047
|
+
z((_) => ({ ..._, [x]: E })), B[x] && F((_) => ({ ..._, [x]: void 0 }));
|
|
3017
3048
|
}, Q = () => {
|
|
3018
3049
|
const S = {};
|
|
3019
|
-
return
|
|
3050
|
+
return I.name.trim() || (S.name = "Name is required"), I.email.trim() ? /\S+@\S+\.\S+/.test(I.email) || (S.email = "Invalid email address") : S.email = "Email is required", I.password ? I.password.length < 6 && (S.password = "Password must be at least 6 characters") : S.password = "Password is required", F(S), Object.keys(S).length === 0;
|
|
3020
3051
|
}, G = async (S) => {
|
|
3021
3052
|
if (S.preventDefault(), !!Q()) {
|
|
3022
|
-
|
|
3053
|
+
R(!0), D(null);
|
|
3023
3054
|
try {
|
|
3024
3055
|
const x = {
|
|
3025
|
-
...
|
|
3056
|
+
...I,
|
|
3026
3057
|
appId: m
|
|
3027
|
-
},
|
|
3028
|
-
D({ type: "success", text: "Account created successfully!" }), y && y(
|
|
3058
|
+
}, E = await Hn(x, { baseUrl: c, apiKey: j });
|
|
3059
|
+
D({ type: "success", text: "Account created successfully!" }), y && y(E);
|
|
3029
3060
|
} catch (x) {
|
|
3030
|
-
const
|
|
3031
|
-
D({ type: "error", text:
|
|
3061
|
+
const E = x.message || "Signup failed. Please try again.";
|
|
3062
|
+
D({ type: "error", text: E }), w && w(x);
|
|
3032
3063
|
} finally {
|
|
3033
|
-
|
|
3064
|
+
R(!1);
|
|
3034
3065
|
}
|
|
3035
3066
|
}
|
|
3036
3067
|
}, f = {
|
|
3037
3068
|
width: "100%",
|
|
3038
3069
|
padding: V ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
3039
|
-
backgroundColor:
|
|
3070
|
+
backgroundColor: A,
|
|
3040
3071
|
border: `1px solid ${P}`,
|
|
3041
3072
|
borderRadius: "10px",
|
|
3042
3073
|
color: T,
|
|
@@ -3127,7 +3158,7 @@ const Ls = [
|
|
|
3127
3158
|
]
|
|
3128
3159
|
}
|
|
3129
3160
|
),
|
|
3130
|
-
h &&
|
|
3161
|
+
h && I.avatarUrl && /* @__PURE__ */ n.jsx(
|
|
3131
3162
|
"div",
|
|
3132
3163
|
{
|
|
3133
3164
|
style: {
|
|
@@ -3138,7 +3169,7 @@ const Ls = [
|
|
|
3138
3169
|
children: /* @__PURE__ */ n.jsx(
|
|
3139
3170
|
"img",
|
|
3140
3171
|
{
|
|
3141
|
-
src:
|
|
3172
|
+
src: I.avatarUrl,
|
|
3142
3173
|
alt: "Avatar Preview",
|
|
3143
3174
|
style: {
|
|
3144
3175
|
width: "60px",
|
|
@@ -3185,7 +3216,7 @@ const Ls = [
|
|
|
3185
3216
|
display: "flex",
|
|
3186
3217
|
borderRadius: "10px",
|
|
3187
3218
|
border: `1px solid ${P}`,
|
|
3188
|
-
backgroundColor:
|
|
3219
|
+
backgroundColor: A,
|
|
3189
3220
|
overflow: "hidden",
|
|
3190
3221
|
cursor: "pointer",
|
|
3191
3222
|
height: "42px"
|
|
@@ -3206,7 +3237,7 @@ const Ls = [
|
|
|
3206
3237
|
// subtle shadow
|
|
3207
3238
|
borderRadius: "10px",
|
|
3208
3239
|
transition: "transform 0.3s ease, background-color 0.3s ease",
|
|
3209
|
-
transform:
|
|
3240
|
+
transform: I.role === d[1] ? "translateX(100%)" : "translateX(0)",
|
|
3210
3241
|
zIndex: 0
|
|
3211
3242
|
}
|
|
3212
3243
|
}
|
|
@@ -3215,15 +3246,15 @@ const Ls = [
|
|
|
3215
3246
|
"button",
|
|
3216
3247
|
{
|
|
3217
3248
|
type: "button",
|
|
3218
|
-
onClick: () =>
|
|
3249
|
+
onClick: () => z((S) => ({ ...S, role: d[0] })),
|
|
3219
3250
|
style: {
|
|
3220
3251
|
flex: 1,
|
|
3221
3252
|
zIndex: 10,
|
|
3222
3253
|
border: "none",
|
|
3223
3254
|
background: "transparent",
|
|
3224
|
-
color:
|
|
3255
|
+
color: I.role === d[0] ? i : l ? "#9ca3af" : "#6b7280",
|
|
3225
3256
|
// theme-aware inactive color
|
|
3226
|
-
fontWeight:
|
|
3257
|
+
fontWeight: I.role === d[0] ? 600 : 500,
|
|
3227
3258
|
fontSize: "14px",
|
|
3228
3259
|
display: "flex",
|
|
3229
3260
|
alignItems: "center",
|
|
@@ -3237,14 +3268,14 @@ const Ls = [
|
|
|
3237
3268
|
"button",
|
|
3238
3269
|
{
|
|
3239
3270
|
type: "button",
|
|
3240
|
-
onClick: () =>
|
|
3271
|
+
onClick: () => z((S) => ({ ...S, role: d[1] })),
|
|
3241
3272
|
style: {
|
|
3242
3273
|
flex: 1,
|
|
3243
3274
|
zIndex: 10,
|
|
3244
3275
|
border: "none",
|
|
3245
3276
|
background: "transparent",
|
|
3246
|
-
color:
|
|
3247
|
-
fontWeight:
|
|
3277
|
+
color: I.role === d[1] ? i : l ? "#9ca3af" : "#6b7280",
|
|
3278
|
+
fontWeight: I.role === d[1] ? 600 : 500,
|
|
3248
3279
|
fontSize: "14px",
|
|
3249
3280
|
display: "flex",
|
|
3250
3281
|
alignItems: "center",
|
|
@@ -3294,16 +3325,16 @@ const Ls = [
|
|
|
3294
3325
|
type: "text",
|
|
3295
3326
|
name: "name",
|
|
3296
3327
|
placeholder: "Enter your full name",
|
|
3297
|
-
value:
|
|
3328
|
+
value: I.name,
|
|
3298
3329
|
onChange: K,
|
|
3299
3330
|
style: {
|
|
3300
3331
|
...f,
|
|
3301
|
-
borderColor:
|
|
3332
|
+
borderColor: B.name ? "#ef4444" : P
|
|
3302
3333
|
}
|
|
3303
3334
|
}
|
|
3304
3335
|
)
|
|
3305
3336
|
] }),
|
|
3306
|
-
|
|
3337
|
+
B.name && /* @__PURE__ */ n.jsx(
|
|
3307
3338
|
"span",
|
|
3308
3339
|
{
|
|
3309
3340
|
style: {
|
|
@@ -3311,7 +3342,7 @@ const Ls = [
|
|
|
3311
3342
|
fontSize: "12px",
|
|
3312
3343
|
marginTop: "2px"
|
|
3313
3344
|
},
|
|
3314
|
-
children:
|
|
3345
|
+
children: B.name
|
|
3315
3346
|
}
|
|
3316
3347
|
)
|
|
3317
3348
|
] }),
|
|
@@ -3349,16 +3380,16 @@ const Ls = [
|
|
|
3349
3380
|
type: "email",
|
|
3350
3381
|
name: "email",
|
|
3351
3382
|
placeholder: "Enter your email address",
|
|
3352
|
-
value:
|
|
3383
|
+
value: I.email,
|
|
3353
3384
|
onChange: K,
|
|
3354
3385
|
style: {
|
|
3355
3386
|
...f,
|
|
3356
|
-
borderColor:
|
|
3387
|
+
borderColor: B.email ? "#ef4444" : P
|
|
3357
3388
|
}
|
|
3358
3389
|
}
|
|
3359
3390
|
)
|
|
3360
3391
|
] }),
|
|
3361
|
-
|
|
3392
|
+
B.email && /* @__PURE__ */ n.jsx(
|
|
3362
3393
|
"span",
|
|
3363
3394
|
{
|
|
3364
3395
|
style: {
|
|
@@ -3366,7 +3397,7 @@ const Ls = [
|
|
|
3366
3397
|
fontSize: "12px",
|
|
3367
3398
|
marginTop: "2px"
|
|
3368
3399
|
},
|
|
3369
|
-
children:
|
|
3400
|
+
children: B.email
|
|
3370
3401
|
}
|
|
3371
3402
|
)
|
|
3372
3403
|
] }),
|
|
@@ -3404,11 +3435,11 @@ const Ls = [
|
|
|
3404
3435
|
type: C ? "text" : "password",
|
|
3405
3436
|
name: "password",
|
|
3406
3437
|
placeholder: "Create a secure password",
|
|
3407
|
-
value:
|
|
3438
|
+
value: I.password,
|
|
3408
3439
|
onChange: K,
|
|
3409
3440
|
style: {
|
|
3410
3441
|
...f,
|
|
3411
|
-
borderColor:
|
|
3442
|
+
borderColor: B.password ? "#ef4444" : P
|
|
3412
3443
|
}
|
|
3413
3444
|
}
|
|
3414
3445
|
),
|
|
@@ -3432,7 +3463,7 @@ const Ls = [
|
|
|
3432
3463
|
}
|
|
3433
3464
|
)
|
|
3434
3465
|
] }),
|
|
3435
|
-
|
|
3466
|
+
B.password && /* @__PURE__ */ n.jsx(
|
|
3436
3467
|
"span",
|
|
3437
3468
|
{
|
|
3438
3469
|
style: {
|
|
@@ -3440,7 +3471,7 @@ const Ls = [
|
|
|
3440
3471
|
fontSize: "12px",
|
|
3441
3472
|
marginTop: "2px"
|
|
3442
3473
|
},
|
|
3443
|
-
children:
|
|
3474
|
+
children: B.password
|
|
3444
3475
|
}
|
|
3445
3476
|
)
|
|
3446
3477
|
] }),
|
|
@@ -3482,7 +3513,7 @@ const Ls = [
|
|
|
3482
3513
|
type: "url",
|
|
3483
3514
|
name: "avatarUrl",
|
|
3484
3515
|
placeholder: "Paste your avatar image URL",
|
|
3485
|
-
value:
|
|
3516
|
+
value: I.avatarUrl || "",
|
|
3486
3517
|
onChange: K,
|
|
3487
3518
|
style: f
|
|
3488
3519
|
}
|
|
@@ -3634,12 +3665,12 @@ const Ls = [
|
|
|
3634
3665
|
onSuccess: d,
|
|
3635
3666
|
onError: u
|
|
3636
3667
|
}) => {
|
|
3637
|
-
const { baseUrl: b, apiKey: y, appId: w } = ge(), [c, j] = O("login"), [m, $] = O(1), [
|
|
3668
|
+
const { baseUrl: b, apiKey: y, appId: w } = ge(), [c, j] = O("login"), [m, $] = O(1), [I, z] = O(!1), [C, q] = O(!1), [g, R] = O(null), [v, D] = O(""), [B, F] = O(""), [V, Z] = O({
|
|
3638
3669
|
email: "",
|
|
3639
3670
|
otp: "",
|
|
3640
3671
|
newPassword: "",
|
|
3641
3672
|
appId: w
|
|
3642
|
-
}), [T, J] = O(!1),
|
|
3673
|
+
}), [T, J] = O(!1), A = l ? "#ffffff" : "#111827", P = l ? "#a1a1aa" : "#6b7280", K = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", Q = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
3643
3674
|
Le.useEffect(() => {
|
|
3644
3675
|
if (typeof window < "u") {
|
|
3645
3676
|
const _ = () => J(window.innerWidth < 768);
|
|
@@ -3647,23 +3678,23 @@ const Ls = [
|
|
|
3647
3678
|
}
|
|
3648
3679
|
}, []);
|
|
3649
3680
|
const G = async (_) => {
|
|
3650
|
-
_.preventDefault(), q(!0),
|
|
3681
|
+
_.preventDefault(), q(!0), R(null);
|
|
3651
3682
|
try {
|
|
3652
3683
|
const N = await Fs(
|
|
3653
|
-
{ email: v, password:
|
|
3684
|
+
{ email: v, password: B, appId: w },
|
|
3654
3685
|
{ baseUrl: b, apiKey: y }
|
|
3655
3686
|
);
|
|
3656
|
-
|
|
3687
|
+
R({ type: "success", text: `Welcome ${N.name}` }), d?.(N);
|
|
3657
3688
|
} catch (N) {
|
|
3658
3689
|
const Y = N.message || "Login failed";
|
|
3659
|
-
|
|
3690
|
+
R({ type: "error", text: Y }), u?.(N);
|
|
3660
3691
|
} finally {
|
|
3661
3692
|
q(!1);
|
|
3662
3693
|
}
|
|
3663
3694
|
}, f = (_) => {
|
|
3664
3695
|
Z({ ...V, [_.target.name]: _.target.value });
|
|
3665
3696
|
}, S = async (_) => {
|
|
3666
|
-
_.preventDefault(), q(!0),
|
|
3697
|
+
_.preventDefault(), q(!0), R(null);
|
|
3667
3698
|
try {
|
|
3668
3699
|
const N = await M.post(
|
|
3669
3700
|
`${b}/users/forgot-password`,
|
|
@@ -3673,12 +3704,12 @@ const Ls = [
|
|
|
3673
3704
|
},
|
|
3674
3705
|
{ headers: { "x-api-key": y } }
|
|
3675
3706
|
);
|
|
3676
|
-
N.data.success ? ($(2),
|
|
3707
|
+
N.data.success ? ($(2), R({ type: "success", text: "OTP sent to your email" })) : R({
|
|
3677
3708
|
type: "error",
|
|
3678
3709
|
text: N.data.message || "Failed to send OTP"
|
|
3679
3710
|
});
|
|
3680
3711
|
} catch (N) {
|
|
3681
|
-
|
|
3712
|
+
R({
|
|
3682
3713
|
type: "error",
|
|
3683
3714
|
text: N.response?.data?.message || "Something went wrong"
|
|
3684
3715
|
});
|
|
@@ -3686,29 +3717,29 @@ const Ls = [
|
|
|
3686
3717
|
q(!1);
|
|
3687
3718
|
}
|
|
3688
3719
|
}, x = async (_) => {
|
|
3689
|
-
_.preventDefault(), q(!0),
|
|
3720
|
+
_.preventDefault(), q(!0), R(null);
|
|
3690
3721
|
try {
|
|
3691
3722
|
const N = await M.post(
|
|
3692
3723
|
`${b}/users/reset-password`,
|
|
3693
3724
|
V,
|
|
3694
3725
|
{ headers: { "x-api-key": y } }
|
|
3695
3726
|
);
|
|
3696
|
-
N.data.success ? (
|
|
3727
|
+
N.data.success ? (R({ type: "success", text: "Password reset successfully!" }), $(1), Z({ email: "", otp: "", newPassword: "", appId: w }), j("login")) : R({ type: "error", text: N.data.message || "Reset failed" });
|
|
3697
3728
|
} catch (N) {
|
|
3698
|
-
|
|
3729
|
+
R({
|
|
3699
3730
|
type: "error",
|
|
3700
3731
|
text: N.response?.data?.message || "Something went wrong"
|
|
3701
3732
|
});
|
|
3702
3733
|
} finally {
|
|
3703
3734
|
q(!1);
|
|
3704
3735
|
}
|
|
3705
|
-
},
|
|
3736
|
+
}, E = {
|
|
3706
3737
|
width: "100%",
|
|
3707
3738
|
padding: T ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
3708
3739
|
backgroundColor: K,
|
|
3709
3740
|
border: `1px solid ${Q}`,
|
|
3710
3741
|
borderRadius: "10px",
|
|
3711
|
-
color:
|
|
3742
|
+
color: A,
|
|
3712
3743
|
fontSize: "15px",
|
|
3713
3744
|
outline: "none",
|
|
3714
3745
|
transition: "all 0.2s ease"
|
|
@@ -3775,7 +3806,7 @@ const Ls = [
|
|
|
3775
3806
|
style: {
|
|
3776
3807
|
fontSize: "24px",
|
|
3777
3808
|
fontWeight: 700,
|
|
3778
|
-
color:
|
|
3809
|
+
color: A,
|
|
3779
3810
|
margin: 0
|
|
3780
3811
|
},
|
|
3781
3812
|
children: c === "login" ? r : m === 1 ? "Forgot Password" : "Reset Password"
|
|
@@ -3839,7 +3870,7 @@ const Ls = [
|
|
|
3839
3870
|
placeholder: "Enter your email",
|
|
3840
3871
|
value: v,
|
|
3841
3872
|
onChange: (_) => D(_.target.value),
|
|
3842
|
-
style:
|
|
3873
|
+
style: E
|
|
3843
3874
|
}
|
|
3844
3875
|
)
|
|
3845
3876
|
] })
|
|
@@ -3881,18 +3912,18 @@ const Ls = [
|
|
|
3881
3912
|
"input",
|
|
3882
3913
|
{
|
|
3883
3914
|
id: "login-password",
|
|
3884
|
-
type:
|
|
3915
|
+
type: I ? "text" : "password",
|
|
3885
3916
|
placeholder: "Enter your password",
|
|
3886
|
-
value:
|
|
3917
|
+
value: B,
|
|
3887
3918
|
onChange: (_) => F(_.target.value),
|
|
3888
|
-
style:
|
|
3919
|
+
style: E
|
|
3889
3920
|
}
|
|
3890
3921
|
),
|
|
3891
3922
|
/* @__PURE__ */ n.jsx(
|
|
3892
3923
|
"button",
|
|
3893
3924
|
{
|
|
3894
3925
|
type: "button",
|
|
3895
|
-
onClick: () =>
|
|
3926
|
+
onClick: () => z(!I),
|
|
3896
3927
|
style: {
|
|
3897
3928
|
position: "absolute",
|
|
3898
3929
|
right: "14px",
|
|
@@ -3904,7 +3935,7 @@ const Ls = [
|
|
|
3904
3935
|
color: P,
|
|
3905
3936
|
cursor: "pointer"
|
|
3906
3937
|
},
|
|
3907
|
-
children:
|
|
3938
|
+
children: I ? /* @__PURE__ */ n.jsx(it, { size: 20 }) : /* @__PURE__ */ n.jsx(lt, { size: 20 })
|
|
3908
3939
|
}
|
|
3909
3940
|
)
|
|
3910
3941
|
] })
|
|
@@ -4016,7 +4047,7 @@ const Ls = [
|
|
|
4016
4047
|
placeholder: "Enter your email",
|
|
4017
4048
|
value: V.email,
|
|
4018
4049
|
onChange: f,
|
|
4019
|
-
style:
|
|
4050
|
+
style: E
|
|
4020
4051
|
}
|
|
4021
4052
|
)
|
|
4022
4053
|
] })
|
|
@@ -4067,7 +4098,7 @@ const Ls = [
|
|
|
4067
4098
|
placeholder: "Enter OTP",
|
|
4068
4099
|
value: V.otp,
|
|
4069
4100
|
onChange: f,
|
|
4070
|
-
style:
|
|
4101
|
+
style: E
|
|
4071
4102
|
}
|
|
4072
4103
|
)
|
|
4073
4104
|
] })
|
|
@@ -4118,7 +4149,7 @@ const Ls = [
|
|
|
4118
4149
|
placeholder: "Enter new password",
|
|
4119
4150
|
value: V.newPassword,
|
|
4120
4151
|
onChange: f,
|
|
4121
|
-
style:
|
|
4152
|
+
style: E
|
|
4122
4153
|
}
|
|
4123
4154
|
)
|
|
4124
4155
|
] })
|
|
@@ -4309,7 +4340,7 @@ const Ls = [
|
|
|
4309
4340
|
};
|
|
4310
4341
|
return g(), window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
|
|
4311
4342
|
}, []), !t) return null;
|
|
4312
|
-
const
|
|
4343
|
+
const I = async () => {
|
|
4313
4344
|
b(!0), j("processing");
|
|
4314
4345
|
try {
|
|
4315
4346
|
const { data: g } = await M.delete(`${l}/users/delete/${a}`, {
|
|
@@ -4326,7 +4357,7 @@ const Ls = [
|
|
|
4326
4357
|
} finally {
|
|
4327
4358
|
b(!1);
|
|
4328
4359
|
}
|
|
4329
|
-
},
|
|
4360
|
+
}, z = y.toLowerCase() === "delete my account", C = (g) => {
|
|
4330
4361
|
g.target === g.currentTarget && c !== "processing" && c !== "success" && e();
|
|
4331
4362
|
}, q = () => {
|
|
4332
4363
|
switch (c) {
|
|
@@ -4477,7 +4508,7 @@ const Ls = [
|
|
|
4477
4508
|
icon: /* @__PURE__ */ n.jsx(ct, { size: 16 }),
|
|
4478
4509
|
text: "You will lose access to all services"
|
|
4479
4510
|
}
|
|
4480
|
-
].map((g,
|
|
4511
|
+
].map((g, R) => /* @__PURE__ */ n.jsxs(
|
|
4481
4512
|
"div",
|
|
4482
4513
|
{
|
|
4483
4514
|
style: {
|
|
@@ -4492,7 +4523,7 @@ const Ls = [
|
|
|
4492
4523
|
/* @__PURE__ */ n.jsx("span", { children: g.text })
|
|
4493
4524
|
]
|
|
4494
4525
|
},
|
|
4495
|
-
|
|
4526
|
+
R
|
|
4496
4527
|
))
|
|
4497
4528
|
}
|
|
4498
4529
|
)
|
|
@@ -4650,7 +4681,7 @@ const Ls = [
|
|
|
4650
4681
|
width: "100%",
|
|
4651
4682
|
padding: "14px 16px",
|
|
4652
4683
|
borderRadius: "10px",
|
|
4653
|
-
border: `2px solid ${
|
|
4684
|
+
border: `2px solid ${z ? o.success : o.error}`,
|
|
4654
4685
|
backgroundColor: "transparent",
|
|
4655
4686
|
color: o.textPrimary,
|
|
4656
4687
|
fontSize: "15px",
|
|
@@ -4667,7 +4698,7 @@ const Ls = [
|
|
|
4667
4698
|
autoFocus: !0
|
|
4668
4699
|
}
|
|
4669
4700
|
),
|
|
4670
|
-
|
|
4701
|
+
z && /* @__PURE__ */ n.jsxs(
|
|
4671
4702
|
"div",
|
|
4672
4703
|
{
|
|
4673
4704
|
style: {
|
|
@@ -4728,8 +4759,8 @@ const Ls = [
|
|
|
4728
4759
|
/* @__PURE__ */ n.jsxs(
|
|
4729
4760
|
"button",
|
|
4730
4761
|
{
|
|
4731
|
-
onClick:
|
|
4732
|
-
disabled: !
|
|
4762
|
+
onClick: I,
|
|
4763
|
+
disabled: !z || u,
|
|
4733
4764
|
style: {
|
|
4734
4765
|
padding: "10px 24px",
|
|
4735
4766
|
borderRadius: "10px",
|
|
@@ -4738,22 +4769,22 @@ const Ls = [
|
|
|
4738
4769
|
color: "white",
|
|
4739
4770
|
fontSize: "14px",
|
|
4740
4771
|
fontWeight: 600,
|
|
4741
|
-
cursor: !
|
|
4772
|
+
cursor: !z || u ? "not-allowed" : "pointer",
|
|
4742
4773
|
flex: m ? "none" : 1,
|
|
4743
4774
|
minWidth: m ? "100%" : "140px",
|
|
4744
|
-
opacity: !
|
|
4775
|
+
opacity: !z || u ? 0.6 : 1,
|
|
4745
4776
|
display: "flex",
|
|
4746
4777
|
alignItems: "center",
|
|
4747
4778
|
justifyContent: "center",
|
|
4748
4779
|
gap: "8px",
|
|
4749
4780
|
transition: "all 0.2s ease",
|
|
4750
|
-
boxShadow: !
|
|
4781
|
+
boxShadow: !z || u ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
|
|
4751
4782
|
},
|
|
4752
4783
|
onMouseOver: (g) => {
|
|
4753
|
-
|
|
4784
|
+
z && !u && (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
|
|
4754
4785
|
},
|
|
4755
4786
|
onMouseOut: (g) => {
|
|
4756
|
-
|
|
4787
|
+
z && !u && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
4757
4788
|
},
|
|
4758
4789
|
children: [
|
|
4759
4790
|
/* @__PURE__ */ n.jsx(Ne, { size: 16 }),
|
|
@@ -4844,7 +4875,7 @@ const Ls = [
|
|
|
4844
4875
|
{ text: "Removing your data", active: !0 },
|
|
4845
4876
|
{ text: "Closing active sessions", active: !1 },
|
|
4846
4877
|
{ text: "Finalizing deletion", active: !1 }
|
|
4847
|
-
].map((g,
|
|
4878
|
+
].map((g, R) => /* @__PURE__ */ n.jsxs(
|
|
4848
4879
|
"div",
|
|
4849
4880
|
{
|
|
4850
4881
|
style: {
|
|
@@ -4883,7 +4914,7 @@ const Ls = [
|
|
|
4883
4914
|
)
|
|
4884
4915
|
]
|
|
4885
4916
|
},
|
|
4886
|
-
|
|
4917
|
+
R
|
|
4887
4918
|
))
|
|
4888
4919
|
}
|
|
4889
4920
|
) }),
|
|
@@ -5599,7 +5630,7 @@ const Ls = [
|
|
|
5599
5630
|
]
|
|
5600
5631
|
}
|
|
5601
5632
|
);
|
|
5602
|
-
},
|
|
5633
|
+
}, Bs = ({
|
|
5603
5634
|
isOpen: t,
|
|
5604
5635
|
onClose: e,
|
|
5605
5636
|
onSuccess: r,
|
|
@@ -5615,17 +5646,17 @@ const Ls = [
|
|
|
5615
5646
|
currentPassword: !1,
|
|
5616
5647
|
newPassword: !1,
|
|
5617
5648
|
confirmPassword: !1
|
|
5618
|
-
}), [$,
|
|
5649
|
+
}), [$, I] = O(!1);
|
|
5619
5650
|
if (Le.useEffect(() => {
|
|
5620
5651
|
if (typeof window > "u") return;
|
|
5621
5652
|
const v = () => {
|
|
5622
|
-
|
|
5653
|
+
I(window.innerWidth < 640);
|
|
5623
5654
|
};
|
|
5624
5655
|
return v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
|
|
5625
5656
|
}, []), !t) return null;
|
|
5626
|
-
const
|
|
5627
|
-
const { name: D, value:
|
|
5628
|
-
u((F) => ({ ...F, [D]:
|
|
5657
|
+
const z = (v) => {
|
|
5658
|
+
const { name: D, value: B } = v.target;
|
|
5659
|
+
u((F) => ({ ...F, [D]: B })), b[D] && y((F) => ({ ...F, [D]: "" }));
|
|
5629
5660
|
}, C = (v) => {
|
|
5630
5661
|
m((D) => ({ ...D, [v]: !D[v] }));
|
|
5631
5662
|
}, q = () => {
|
|
@@ -5659,7 +5690,7 @@ const Ls = [
|
|
|
5659
5690
|
c(!1);
|
|
5660
5691
|
}
|
|
5661
5692
|
}
|
|
5662
|
-
},
|
|
5693
|
+
}, R = [
|
|
5663
5694
|
{
|
|
5664
5695
|
field: "currentPassword",
|
|
5665
5696
|
label: "Current Password",
|
|
@@ -5792,7 +5823,7 @@ const Ls = [
|
|
|
5792
5823
|
}
|
|
5793
5824
|
),
|
|
5794
5825
|
/* @__PURE__ */ n.jsxs("form", { onSubmit: g, children: [
|
|
5795
|
-
|
|
5826
|
+
R.map(({ field: v, label: D, icon: B }) => /* @__PURE__ */ n.jsxs(
|
|
5796
5827
|
"div",
|
|
5797
5828
|
{
|
|
5798
5829
|
style: {
|
|
@@ -5827,7 +5858,7 @@ const Ls = [
|
|
|
5827
5858
|
color: i.textTertiary,
|
|
5828
5859
|
zIndex: 2
|
|
5829
5860
|
},
|
|
5830
|
-
children:
|
|
5861
|
+
children: B
|
|
5831
5862
|
}
|
|
5832
5863
|
),
|
|
5833
5864
|
/* @__PURE__ */ n.jsx(
|
|
@@ -5838,7 +5869,7 @@ const Ls = [
|
|
|
5838
5869
|
name: v,
|
|
5839
5870
|
placeholder: `Enter ${D.toLowerCase()}`,
|
|
5840
5871
|
value: d[v],
|
|
5841
|
-
onChange:
|
|
5872
|
+
onChange: z,
|
|
5842
5873
|
style: {
|
|
5843
5874
|
width: "100%",
|
|
5844
5875
|
padding: "14px 48px 14px 44px",
|
|
@@ -6044,7 +6075,7 @@ const Ls = [
|
|
|
6044
6075
|
)
|
|
6045
6076
|
}
|
|
6046
6077
|
);
|
|
6047
|
-
},
|
|
6078
|
+
}, Ws = ({
|
|
6048
6079
|
isOpen: t,
|
|
6049
6080
|
onClose: e,
|
|
6050
6081
|
onVerify: r,
|
|
@@ -6336,33 +6367,33 @@ const Ls = [
|
|
|
6336
6367
|
onVerify: i,
|
|
6337
6368
|
primaryColor: o = "#00C212"
|
|
6338
6369
|
}) => {
|
|
6339
|
-
const { baseUrl: l, apiKey: h, appId: d } = ge(), [u, b] = O(null), [y, w] = O(e), [c, j] = O(!0), [m, $] = O(!1), [
|
|
6370
|
+
const { baseUrl: l, apiKey: h, appId: d } = ge(), [u, b] = O(null), [y, w] = O(e), [c, j] = O(!0), [m, $] = O(!1), [I, z] = O(!1), [C, q] = O(!1), [g, R] = O(!1), [v, D] = O(!1), [B, F] = O(!1), [V, Z] = O(!1), [T, J] = O(!1), [A, P] = O(null), [K, Q] = O(!1), [G, f] = O({
|
|
6340
6371
|
email: "",
|
|
6341
6372
|
otp: "",
|
|
6342
6373
|
appId: d
|
|
6343
|
-
}), [S, x] = O(!1), [
|
|
6374
|
+
}), [S, x] = O(!1), [E, _] = O(!1);
|
|
6344
6375
|
te(() => {
|
|
6345
6376
|
if (typeof window < "u") {
|
|
6346
|
-
const
|
|
6347
|
-
return
|
|
6377
|
+
const k = () => b(window.innerWidth);
|
|
6378
|
+
return k(), window.addEventListener("resize", k), () => window.removeEventListener("resize", k);
|
|
6348
6379
|
}
|
|
6349
6380
|
}, []);
|
|
6350
|
-
const N = (
|
|
6351
|
-
P({ type:
|
|
6381
|
+
const N = (k, H) => {
|
|
6382
|
+
P({ type: k, message: H }), setTimeout(() => P(null), 3e3);
|
|
6352
6383
|
}, Y = () => {
|
|
6353
6384
|
J(!0);
|
|
6354
|
-
const
|
|
6385
|
+
const k = setTimeout(() => {
|
|
6355
6386
|
Z(!1), J(!1);
|
|
6356
6387
|
}, 150);
|
|
6357
|
-
return () => clearTimeout(
|
|
6388
|
+
return () => clearTimeout(k);
|
|
6358
6389
|
};
|
|
6359
6390
|
te(() => {
|
|
6360
|
-
const
|
|
6391
|
+
const k = (H) => {
|
|
6361
6392
|
const X = document.querySelector(".dropdown-container");
|
|
6362
6393
|
X && !X.contains(H.target) && Y();
|
|
6363
6394
|
};
|
|
6364
|
-
return V && document.addEventListener("mousedown",
|
|
6365
|
-
document.removeEventListener("mousedown",
|
|
6395
|
+
return V && document.addEventListener("mousedown", k), () => {
|
|
6396
|
+
document.removeEventListener("mousedown", k);
|
|
6366
6397
|
};
|
|
6367
6398
|
}, [V]);
|
|
6368
6399
|
const se = async () => {
|
|
@@ -6372,21 +6403,21 @@ const Ls = [
|
|
|
6372
6403
|
}
|
|
6373
6404
|
try {
|
|
6374
6405
|
_(!0);
|
|
6375
|
-
const
|
|
6406
|
+
const k = await M.post(
|
|
6376
6407
|
`${l}/users/send-verify-otp/${y?.id}`,
|
|
6377
6408
|
{ email: G.email },
|
|
6378
6409
|
{
|
|
6379
6410
|
headers: { "x-api-key": h, "x-app-id": d }
|
|
6380
6411
|
}
|
|
6381
6412
|
);
|
|
6382
|
-
|
|
6383
|
-
} catch (
|
|
6384
|
-
N("error",
|
|
6413
|
+
k.data.success ? (N("success", k.data.message || "OTP sent to email!"), x(!0)) : N("error", k.data.message || "Failed to send OTP");
|
|
6414
|
+
} catch (k) {
|
|
6415
|
+
N("error", k.response?.data?.message || "Server error");
|
|
6385
6416
|
} finally {
|
|
6386
6417
|
_(!1);
|
|
6387
6418
|
}
|
|
6388
|
-
}, ue = async (
|
|
6389
|
-
if (
|
|
6419
|
+
}, ue = async (k) => {
|
|
6420
|
+
if (k.preventDefault(), !G.email || !G.otp) {
|
|
6390
6421
|
N("error", "Please fill in all fields");
|
|
6391
6422
|
return;
|
|
6392
6423
|
}
|
|
@@ -6415,10 +6446,10 @@ const Ls = [
|
|
|
6415
6446
|
} finally {
|
|
6416
6447
|
_(!1);
|
|
6417
6448
|
}
|
|
6418
|
-
}, ve = async (
|
|
6449
|
+
}, ve = async (k) => {
|
|
6419
6450
|
if (!y) return !1;
|
|
6420
6451
|
try {
|
|
6421
|
-
const H = { ...y, avatarUrl:
|
|
6452
|
+
const H = { ...y, avatarUrl: k }, { data: X } = await M.put(
|
|
6422
6453
|
`${l}/users/update/${y.id}`,
|
|
6423
6454
|
H,
|
|
6424
6455
|
{ headers: { "x-api-key": h } }
|
|
@@ -6432,27 +6463,27 @@ const Ls = [
|
|
|
6432
6463
|
}
|
|
6433
6464
|
}, ur = async () => {
|
|
6434
6465
|
if (y) {
|
|
6435
|
-
|
|
6466
|
+
z(!0);
|
|
6436
6467
|
try {
|
|
6437
|
-
const { data:
|
|
6468
|
+
const { data: k } = await M.put(
|
|
6438
6469
|
`${l}/users/update/${y.id}`,
|
|
6439
6470
|
y,
|
|
6440
6471
|
{ headers: { "x-api-key": h } }
|
|
6441
6472
|
);
|
|
6442
|
-
|
|
6473
|
+
k.success ? (w(k.user), $(!1), localStorage.setItem(
|
|
6443
6474
|
"userInfo",
|
|
6444
|
-
JSON.stringify({ ...
|
|
6445
|
-
), N("success", "Profile updated successfully")) : N("error",
|
|
6446
|
-
} catch (
|
|
6447
|
-
console.error(
|
|
6475
|
+
JSON.stringify({ ...k.user, token: t })
|
|
6476
|
+
), N("success", "Profile updated successfully")) : N("error", k.message);
|
|
6477
|
+
} catch (k) {
|
|
6478
|
+
console.error(k), N("error", "Update failed");
|
|
6448
6479
|
} finally {
|
|
6449
|
-
|
|
6480
|
+
z(!1);
|
|
6450
6481
|
}
|
|
6451
6482
|
}
|
|
6452
|
-
}, pt = async (
|
|
6483
|
+
}, pt = async (k) => {
|
|
6453
6484
|
try {
|
|
6454
6485
|
const { data: H } = await M.get(
|
|
6455
|
-
`${l}/users/check-user/${
|
|
6486
|
+
`${l}/users/check-user/${k}?appId=${d}`,
|
|
6456
6487
|
{ headers: { "x-api-key": h } }
|
|
6457
6488
|
);
|
|
6458
6489
|
H?.success === !0 && H?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), w(null));
|
|
@@ -6474,10 +6505,10 @@ const Ls = [
|
|
|
6474
6505
|
}
|
|
6475
6506
|
})();
|
|
6476
6507
|
}, [e]), te(() => {
|
|
6477
|
-
y?.email && f((
|
|
6508
|
+
y?.email && f((k) => ({ ...k, email: y.email }));
|
|
6478
6509
|
}, [y?.email]);
|
|
6479
|
-
const ft = (
|
|
6480
|
-
let X = parseInt(
|
|
6510
|
+
const ft = (k, H) => {
|
|
6511
|
+
let X = parseInt(k.replace("#", ""), 16), pe = (X >> 16) + H, He = (X >> 8 & 255) + H, Ve = (X & 255) + H;
|
|
6481
6512
|
return pe = Math.min(255, Math.max(0, pe)), He = Math.min(255, Math.max(0, He)), Ve = Math.min(255, Math.max(0, Ve)), `#${(Ve | He << 8 | pe << 16).toString(16).padStart(6, "0")}`;
|
|
6482
6513
|
}, U = r ? {
|
|
6483
6514
|
background: "#000000",
|
|
@@ -6622,7 +6653,7 @@ const Ls = [
|
|
|
6622
6653
|
minHeight: "80vh"
|
|
6623
6654
|
},
|
|
6624
6655
|
children: [
|
|
6625
|
-
|
|
6656
|
+
A && /* @__PURE__ */ n.jsxs(
|
|
6626
6657
|
"div",
|
|
6627
6658
|
{
|
|
6628
6659
|
style: {
|
|
@@ -6642,7 +6673,7 @@ const Ls = [
|
|
|
6642
6673
|
fontWeight: 500,
|
|
6643
6674
|
maxWidth: "400px",
|
|
6644
6675
|
animation: "slideIn 0.3s ease-out",
|
|
6645
|
-
...
|
|
6676
|
+
...A.type === "success" ? {
|
|
6646
6677
|
backgroundColor: r ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)",
|
|
6647
6678
|
borderColor: r ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)",
|
|
6648
6679
|
color: r ? "#34d399" : "#059669"
|
|
@@ -6655,8 +6686,8 @@ const Ls = [
|
|
|
6655
6686
|
role: "alert",
|
|
6656
6687
|
"aria-live": "polite",
|
|
6657
6688
|
children: [
|
|
6658
|
-
|
|
6659
|
-
|
|
6689
|
+
A.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(le, { size: 20, "aria-hidden": "true" }),
|
|
6690
|
+
A.message
|
|
6660
6691
|
]
|
|
6661
6692
|
}
|
|
6662
6693
|
),
|
|
@@ -6880,15 +6911,15 @@ const Ls = [
|
|
|
6880
6911
|
"button",
|
|
6881
6912
|
{
|
|
6882
6913
|
onClick: ur,
|
|
6883
|
-
disabled:
|
|
6914
|
+
disabled: I,
|
|
6884
6915
|
style: {
|
|
6885
6916
|
background: `linear-gradient(to right, ${U.accent}, ${U.accentHover})`,
|
|
6886
|
-
opacity:
|
|
6917
|
+
opacity: I ? 0.7 : 1,
|
|
6887
6918
|
color: "white",
|
|
6888
6919
|
padding: "10px 20px",
|
|
6889
6920
|
borderRadius: "6px",
|
|
6890
6921
|
border: "none",
|
|
6891
|
-
cursor:
|
|
6922
|
+
cursor: I ? "not-allowed" : "pointer",
|
|
6892
6923
|
transition: "all 0.2s ease",
|
|
6893
6924
|
fontSize: "12px",
|
|
6894
6925
|
fontWeight: 500,
|
|
@@ -6901,15 +6932,15 @@ const Ls = [
|
|
|
6901
6932
|
flex: u && window.innerWidth < 1024 ? "1" : "auto"
|
|
6902
6933
|
},
|
|
6903
6934
|
children: [
|
|
6904
|
-
|
|
6935
|
+
I ? /* @__PURE__ */ n.jsx(
|
|
6905
6936
|
ae,
|
|
6906
6937
|
{
|
|
6907
6938
|
size: 16,
|
|
6908
6939
|
style: { animation: "spin 1s linear infinite" },
|
|
6909
6940
|
"aria-hidden": "true"
|
|
6910
6941
|
}
|
|
6911
|
-
) : /* @__PURE__ */ n.jsx(
|
|
6912
|
-
|
|
6942
|
+
) : /* @__PURE__ */ n.jsx(Rs, { size: 16, "aria-hidden": "true" }),
|
|
6943
|
+
I ? "Saving..." : "Save Changes"
|
|
6913
6944
|
]
|
|
6914
6945
|
}
|
|
6915
6946
|
)
|
|
@@ -6937,7 +6968,7 @@ const Ls = [
|
|
|
6937
6968
|
flex: u && window.innerWidth < 1024 ? "1" : "auto"
|
|
6938
6969
|
},
|
|
6939
6970
|
children: [
|
|
6940
|
-
/* @__PURE__ */ n.jsx(
|
|
6971
|
+
/* @__PURE__ */ n.jsx(ks, { size: 16, "aria-hidden": "true" }),
|
|
6941
6972
|
"Edit Profile"
|
|
6942
6973
|
]
|
|
6943
6974
|
}
|
|
@@ -7032,7 +7063,7 @@ const Ls = [
|
|
|
7032
7063
|
"button",
|
|
7033
7064
|
{
|
|
7034
7065
|
onClick: () => {
|
|
7035
|
-
|
|
7066
|
+
R(!0), Y();
|
|
7036
7067
|
},
|
|
7037
7068
|
style: {
|
|
7038
7069
|
width: "100%",
|
|
@@ -7049,8 +7080,8 @@ const Ls = [
|
|
|
7049
7080
|
gap: "8px",
|
|
7050
7081
|
textAlign: "left"
|
|
7051
7082
|
},
|
|
7052
|
-
onMouseEnter: (
|
|
7053
|
-
onMouseLeave: (
|
|
7083
|
+
onMouseEnter: (k) => k.currentTarget.style.backgroundColor = U.surfaceLight,
|
|
7084
|
+
onMouseLeave: (k) => k.currentTarget.style.backgroundColor = "transparent",
|
|
7054
7085
|
children: [
|
|
7055
7086
|
/* @__PURE__ */ n.jsx(dt, { size: 14, "aria-hidden": "true" }),
|
|
7056
7087
|
"Change Password"
|
|
@@ -7078,10 +7109,10 @@ const Ls = [
|
|
|
7078
7109
|
gap: "8px",
|
|
7079
7110
|
textAlign: "left"
|
|
7080
7111
|
},
|
|
7081
|
-
onMouseEnter: (
|
|
7082
|
-
|
|
7112
|
+
onMouseEnter: (k) => {
|
|
7113
|
+
k.currentTarget.style.backgroundColor = r ? "rgba(239, 68, 68, 0.1)" : "rgba(239, 68, 68, 0.05)";
|
|
7083
7114
|
},
|
|
7084
|
-
onMouseLeave: (
|
|
7115
|
+
onMouseLeave: (k) => k.currentTarget.style.backgroundColor = "transparent",
|
|
7085
7116
|
children: [
|
|
7086
7117
|
/* @__PURE__ */ n.jsx(ct, { size: 14, "aria-hidden": "true" }),
|
|
7087
7118
|
"Logout"
|
|
@@ -7109,10 +7140,10 @@ const Ls = [
|
|
|
7109
7140
|
gap: "8px",
|
|
7110
7141
|
textAlign: "left"
|
|
7111
7142
|
},
|
|
7112
|
-
onMouseEnter: (
|
|
7113
|
-
|
|
7143
|
+
onMouseEnter: (k) => {
|
|
7144
|
+
k.currentTarget.style.backgroundColor = r ? "rgba(239, 68, 68, 0.1)" : "rgba(239, 68, 68, 0.05)";
|
|
7114
7145
|
},
|
|
7115
|
-
onMouseLeave: (
|
|
7146
|
+
onMouseLeave: (k) => k.currentTarget.style.backgroundColor = "transparent",
|
|
7116
7147
|
children: [
|
|
7117
7148
|
/* @__PURE__ */ n.jsx(Ne, { size: 14, "aria-hidden": "true" }),
|
|
7118
7149
|
"Delete Account"
|
|
@@ -7179,8 +7210,8 @@ const Ls = [
|
|
|
7179
7210
|
gap: "20px"
|
|
7180
7211
|
}
|
|
7181
7212
|
},
|
|
7182
|
-
children: pr.map((
|
|
7183
|
-
const H =
|
|
7213
|
+
children: pr.map((k) => {
|
|
7214
|
+
const H = k.icon;
|
|
7184
7215
|
return /* @__PURE__ */ n.jsxs(
|
|
7185
7216
|
"div",
|
|
7186
7217
|
{
|
|
@@ -7203,16 +7234,16 @@ const Ls = [
|
|
|
7203
7234
|
},
|
|
7204
7235
|
children: [
|
|
7205
7236
|
/* @__PURE__ */ n.jsx(H, { size: 16, "aria-hidden": "true" }),
|
|
7206
|
-
|
|
7237
|
+
k.label
|
|
7207
7238
|
]
|
|
7208
7239
|
}
|
|
7209
7240
|
),
|
|
7210
7241
|
m ? /* @__PURE__ */ n.jsx(
|
|
7211
7242
|
"input",
|
|
7212
7243
|
{
|
|
7213
|
-
type:
|
|
7214
|
-
name:
|
|
7215
|
-
value: y[
|
|
7244
|
+
type: k.type,
|
|
7245
|
+
name: k.name,
|
|
7246
|
+
value: y[k.name],
|
|
7216
7247
|
onChange: (X) => w(
|
|
7217
7248
|
(pe) => pe && { ...pe, [X.target.name]: X.target.value }
|
|
7218
7249
|
),
|
|
@@ -7229,8 +7260,8 @@ const Ls = [
|
|
|
7229
7260
|
width: "100%",
|
|
7230
7261
|
boxSizing: "border-box"
|
|
7231
7262
|
},
|
|
7232
|
-
placeholder: `Enter ${
|
|
7233
|
-
"aria-label":
|
|
7263
|
+
placeholder: `Enter ${k.label.toLowerCase()}`,
|
|
7264
|
+
"aria-label": k.label
|
|
7234
7265
|
}
|
|
7235
7266
|
) : /* @__PURE__ */ n.jsx(
|
|
7236
7267
|
"div",
|
|
@@ -7247,12 +7278,12 @@ const Ls = [
|
|
|
7247
7278
|
color: U.textPrimary,
|
|
7248
7279
|
backgroundColor: r ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)"
|
|
7249
7280
|
},
|
|
7250
|
-
children:
|
|
7281
|
+
children: k.value
|
|
7251
7282
|
}
|
|
7252
7283
|
)
|
|
7253
7284
|
]
|
|
7254
7285
|
},
|
|
7255
|
-
|
|
7286
|
+
k.name
|
|
7256
7287
|
);
|
|
7257
7288
|
})
|
|
7258
7289
|
}
|
|
@@ -7402,16 +7433,16 @@ const Ls = [
|
|
|
7402
7433
|
}
|
|
7403
7434
|
),
|
|
7404
7435
|
/* @__PURE__ */ n.jsx(
|
|
7405
|
-
|
|
7436
|
+
Bs,
|
|
7406
7437
|
{
|
|
7407
7438
|
baseUrl: l,
|
|
7408
7439
|
apiKey: h,
|
|
7409
7440
|
appId: d,
|
|
7410
7441
|
userId: y.id,
|
|
7411
7442
|
isOpen: g,
|
|
7412
|
-
onClose: () =>
|
|
7413
|
-
onSuccess: (
|
|
7414
|
-
onError: (
|
|
7443
|
+
onClose: () => R(!1),
|
|
7444
|
+
onSuccess: (k) => N("success", k),
|
|
7445
|
+
onError: (k) => N("error", k),
|
|
7415
7446
|
colors: U
|
|
7416
7447
|
}
|
|
7417
7448
|
),
|
|
@@ -7425,15 +7456,15 @@ const Ls = [
|
|
|
7425
7456
|
token: t,
|
|
7426
7457
|
isOpen: v,
|
|
7427
7458
|
onClose: () => D(!1),
|
|
7428
|
-
onSuccess: (
|
|
7429
|
-
onError: (
|
|
7459
|
+
onSuccess: (k) => N("success", k),
|
|
7460
|
+
onError: (k) => N("error", k),
|
|
7430
7461
|
colors: U
|
|
7431
7462
|
}
|
|
7432
7463
|
),
|
|
7433
7464
|
/* @__PURE__ */ n.jsx(
|
|
7434
|
-
|
|
7465
|
+
Ws,
|
|
7435
7466
|
{
|
|
7436
|
-
isOpen:
|
|
7467
|
+
isOpen: B,
|
|
7437
7468
|
onClose: () => {
|
|
7438
7469
|
F(!1), x(!1), f({ email: y?.email || "", otp: "", appId: d });
|
|
7439
7470
|
},
|
|
@@ -7442,7 +7473,7 @@ const Ls = [
|
|
|
7442
7473
|
verifyFormData: G,
|
|
7443
7474
|
setVerifyFormData: f,
|
|
7444
7475
|
otpSent: S,
|
|
7445
|
-
verifying:
|
|
7476
|
+
verifying: E,
|
|
7446
7477
|
user: y,
|
|
7447
7478
|
colors: U,
|
|
7448
7479
|
darkMode: r
|
|
@@ -7560,7 +7591,7 @@ const Ls = [
|
|
|
7560
7591
|
viewProfileLabel: w = "View Profile",
|
|
7561
7592
|
logoutLabel: c = "Sign Out"
|
|
7562
7593
|
}) => {
|
|
7563
|
-
const { baseUrl: j, apiKey: m, appId: $ } = ge(), [
|
|
7594
|
+
const { baseUrl: j, apiKey: m, appId: $ } = ge(), [I, z] = O(!1), [C, q] = O(null), [g, R] = O(!0), [v, D] = O(null), B = xt(null), F = xt(null), [V, Z] = O(!1), [T, J] = O(!1);
|
|
7564
7595
|
te(() => {
|
|
7565
7596
|
if (typeof window > "u") return;
|
|
7566
7597
|
const x = () => {
|
|
@@ -7570,15 +7601,15 @@ const Ls = [
|
|
|
7570
7601
|
}, []), te(() => {
|
|
7571
7602
|
(async () => {
|
|
7572
7603
|
try {
|
|
7573
|
-
if (
|
|
7604
|
+
if (R(!0), D(null), a) {
|
|
7574
7605
|
if (!a.id || !a.name || !a.email)
|
|
7575
7606
|
throw new Error("Invalid user data provided");
|
|
7576
7607
|
q(a);
|
|
7577
7608
|
} else if (typeof window < "u") {
|
|
7578
|
-
const
|
|
7579
|
-
if (
|
|
7609
|
+
const E = localStorage.getItem("userInfo");
|
|
7610
|
+
if (E)
|
|
7580
7611
|
try {
|
|
7581
|
-
const _ = JSON.parse(
|
|
7612
|
+
const _ = JSON.parse(E);
|
|
7582
7613
|
if (!_.id || !_.name || !_.email)
|
|
7583
7614
|
throw new Error("Invalid stored user data");
|
|
7584
7615
|
q(_);
|
|
@@ -7586,37 +7617,37 @@ const Ls = [
|
|
|
7586
7617
|
console.error("Failed to parse stored user data:", _), localStorage.removeItem("userInfo"), D("Invalid user data");
|
|
7587
7618
|
}
|
|
7588
7619
|
}
|
|
7589
|
-
} catch (
|
|
7590
|
-
console.error("User initialization failed:",
|
|
7620
|
+
} catch (E) {
|
|
7621
|
+
console.error("User initialization failed:", E), D(E.message || "Failed to load user");
|
|
7591
7622
|
} finally {
|
|
7592
|
-
|
|
7623
|
+
R(!1);
|
|
7593
7624
|
}
|
|
7594
7625
|
})();
|
|
7595
7626
|
}, [a]), te(() => {
|
|
7596
7627
|
if (typeof window > "u") return;
|
|
7597
7628
|
const x = () => {
|
|
7598
|
-
if (!
|
|
7599
|
-
const
|
|
7600
|
-
N -
|
|
7629
|
+
if (!I || !F.current) return;
|
|
7630
|
+
const E = F.current.getBoundingClientRect(), _ = window.innerWidth, N = window.innerHeight, Y = 280, se = _ - E.right, ue = E.left;
|
|
7631
|
+
N - E.bottom;
|
|
7601
7632
|
const ve = se >= Y || se > ue;
|
|
7602
7633
|
Z(ve);
|
|
7603
7634
|
};
|
|
7604
7635
|
return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
7605
|
-
}, [
|
|
7636
|
+
}, [I]), te(() => {
|
|
7606
7637
|
if (typeof window > "u" || typeof document > "u")
|
|
7607
7638
|
return;
|
|
7608
7639
|
const x = (N) => {
|
|
7609
|
-
|
|
7610
|
-
},
|
|
7611
|
-
N.key === "Escape" &&
|
|
7640
|
+
B.current && !B.current.contains(N.target) && !F.current?.contains(N.target) && z(!1);
|
|
7641
|
+
}, E = (N) => {
|
|
7642
|
+
N.key === "Escape" && z(!1);
|
|
7612
7643
|
}, _ = () => {
|
|
7613
|
-
|
|
7644
|
+
I && z(!1);
|
|
7614
7645
|
};
|
|
7615
|
-
return
|
|
7616
|
-
document.removeEventListener("mousedown", x), document.removeEventListener("keydown",
|
|
7646
|
+
return I && (document.addEventListener("mousedown", x), document.addEventListener("keydown", E), window.addEventListener("scroll", _)), () => {
|
|
7647
|
+
document.removeEventListener("mousedown", x), document.removeEventListener("keydown", E), window.removeEventListener("scroll", _);
|
|
7617
7648
|
};
|
|
7618
|
-
}, [
|
|
7619
|
-
const
|
|
7649
|
+
}, [I]);
|
|
7650
|
+
const A = t ? {
|
|
7620
7651
|
surface: "#000000",
|
|
7621
7652
|
surfaceElevated: "#000000",
|
|
7622
7653
|
surfaceHover: "#262626",
|
|
@@ -7651,7 +7682,7 @@ const Ls = [
|
|
|
7651
7682
|
gap: T ? "6px" : "8px",
|
|
7652
7683
|
padding: T ? "6px 10px 6px 6px" : "8px 12px 8px 8px",
|
|
7653
7684
|
borderRadius: "24px",
|
|
7654
|
-
backgroundColor:
|
|
7685
|
+
backgroundColor: A.surface,
|
|
7655
7686
|
cursor: "pointer",
|
|
7656
7687
|
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7657
7688
|
minWidth: T ? "auto" : "140px",
|
|
@@ -7663,7 +7694,7 @@ const Ls = [
|
|
|
7663
7694
|
height: T ? "28px" : "32px",
|
|
7664
7695
|
borderRadius: "50%",
|
|
7665
7696
|
objectFit: "cover",
|
|
7666
|
-
border: `2px solid ${
|
|
7697
|
+
border: `2px solid ${A.borderLight}`,
|
|
7667
7698
|
flexShrink: 0
|
|
7668
7699
|
},
|
|
7669
7700
|
userInfo: {
|
|
@@ -7677,7 +7708,7 @@ const Ls = [
|
|
|
7677
7708
|
userName: {
|
|
7678
7709
|
fontSize: T ? "13px" : "14px",
|
|
7679
7710
|
fontWeight: 600,
|
|
7680
|
-
color:
|
|
7711
|
+
color: A.textPrimary,
|
|
7681
7712
|
lineHeight: "1.2",
|
|
7682
7713
|
whiteSpace: "nowrap",
|
|
7683
7714
|
overflow: "hidden",
|
|
@@ -7686,7 +7717,7 @@ const Ls = [
|
|
|
7686
7717
|
},
|
|
7687
7718
|
userEmail: {
|
|
7688
7719
|
fontSize: T ? "11px" : "12px",
|
|
7689
|
-
color:
|
|
7720
|
+
color: A.textTertiary,
|
|
7690
7721
|
lineHeight: "1.2",
|
|
7691
7722
|
whiteSpace: "nowrap",
|
|
7692
7723
|
overflow: "hidden",
|
|
@@ -7695,8 +7726,8 @@ const Ls = [
|
|
|
7695
7726
|
},
|
|
7696
7727
|
chevron: {
|
|
7697
7728
|
transition: "transform 0.2s ease",
|
|
7698
|
-
transform:
|
|
7699
|
-
color:
|
|
7729
|
+
transform: I ? "rotate(180deg)" : "rotate(0deg)",
|
|
7730
|
+
color: A.textTertiary,
|
|
7700
7731
|
flexShrink: 0
|
|
7701
7732
|
},
|
|
7702
7733
|
dropdown: {
|
|
@@ -7704,8 +7735,8 @@ const Ls = [
|
|
|
7704
7735
|
top: "100%",
|
|
7705
7736
|
marginTop: "8px",
|
|
7706
7737
|
[V ? "left" : "right"]: "0",
|
|
7707
|
-
backgroundColor:
|
|
7708
|
-
border: `1px solid ${
|
|
7738
|
+
backgroundColor: A.surfaceElevated,
|
|
7739
|
+
border: `1px solid ${A.border}`,
|
|
7709
7740
|
borderRadius: "12px",
|
|
7710
7741
|
boxShadow: "0 20px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1)",
|
|
7711
7742
|
width: "min(280px, 90vw)",
|
|
@@ -7713,10 +7744,10 @@ const Ls = [
|
|
|
7713
7744
|
padding: "6px 6px 16px 6px",
|
|
7714
7745
|
zIndex: 1e3,
|
|
7715
7746
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
7716
|
-
opacity:
|
|
7717
|
-
pointerEvents:
|
|
7747
|
+
opacity: I ? 1 : 0,
|
|
7748
|
+
pointerEvents: I ? "auto" : "none",
|
|
7718
7749
|
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7719
|
-
transform:
|
|
7750
|
+
transform: I ? "translateY(0) scale(1)" : "translateY(-8px) scale(0.95)",
|
|
7720
7751
|
overflow: "hidden"
|
|
7721
7752
|
},
|
|
7722
7753
|
dropdownSection: {
|
|
@@ -7736,7 +7767,7 @@ const Ls = [
|
|
|
7736
7767
|
height: T ? "40px" : "48px",
|
|
7737
7768
|
borderRadius: "50%",
|
|
7738
7769
|
objectFit: "cover",
|
|
7739
|
-
border: `2px solid ${
|
|
7770
|
+
border: `2px solid ${A.borderLight}`,
|
|
7740
7771
|
flexShrink: 0
|
|
7741
7772
|
},
|
|
7742
7773
|
dropdownUserInfo: {
|
|
@@ -7748,7 +7779,7 @@ const Ls = [
|
|
|
7748
7779
|
dropdownUserName: {
|
|
7749
7780
|
fontSize: T ? "15px" : "16px",
|
|
7750
7781
|
fontWeight: 600,
|
|
7751
|
-
color:
|
|
7782
|
+
color: A.textPrimary,
|
|
7752
7783
|
lineHeight: "1.2",
|
|
7753
7784
|
marginBottom: "2px",
|
|
7754
7785
|
overflow: "hidden",
|
|
@@ -7756,7 +7787,7 @@ const Ls = [
|
|
|
7756
7787
|
},
|
|
7757
7788
|
dropdownUserEmail: {
|
|
7758
7789
|
fontSize: T ? "13px" : "14px",
|
|
7759
|
-
color:
|
|
7790
|
+
color: A.textSecondary,
|
|
7760
7791
|
lineHeight: "1.2",
|
|
7761
7792
|
overflow: "hidden",
|
|
7762
7793
|
textOverflow: "ellipsis"
|
|
@@ -7769,7 +7800,7 @@ const Ls = [
|
|
|
7769
7800
|
borderRadius: "8px",
|
|
7770
7801
|
cursor: "pointer",
|
|
7771
7802
|
transition: "all 0.15s ease",
|
|
7772
|
-
color:
|
|
7803
|
+
color: A.textPrimary,
|
|
7773
7804
|
textDecoration: "none",
|
|
7774
7805
|
border: "none",
|
|
7775
7806
|
background: "none",
|
|
@@ -7784,7 +7815,7 @@ const Ls = [
|
|
|
7784
7815
|
icon: {
|
|
7785
7816
|
width: T ? "16px" : "18px",
|
|
7786
7817
|
height: T ? "16px" : "18px",
|
|
7787
|
-
color:
|
|
7818
|
+
color: A.textSecondary,
|
|
7788
7819
|
flexShrink: 0
|
|
7789
7820
|
},
|
|
7790
7821
|
logoutButton: {
|
|
@@ -7799,20 +7830,20 @@ const Ls = [
|
|
|
7799
7830
|
border: "none",
|
|
7800
7831
|
width: "100%",
|
|
7801
7832
|
fontSize: T ? "13px" : "14px",
|
|
7802
|
-
color:
|
|
7833
|
+
color: A.error,
|
|
7803
7834
|
textAlign: "left",
|
|
7804
7835
|
outline: "none"
|
|
7805
7836
|
},
|
|
7806
7837
|
loadingText: {
|
|
7807
7838
|
padding: T ? "16px 12px" : "20px 16px",
|
|
7808
7839
|
textAlign: "center",
|
|
7809
|
-
color:
|
|
7840
|
+
color: A.textSecondary,
|
|
7810
7841
|
fontSize: T ? "13px" : "14px"
|
|
7811
7842
|
},
|
|
7812
7843
|
errorState: {
|
|
7813
7844
|
padding: T ? "16px 12px" : "20px 16px",
|
|
7814
7845
|
textAlign: "center",
|
|
7815
|
-
color:
|
|
7846
|
+
color: A.textSecondary,
|
|
7816
7847
|
fontSize: T ? "13px" : "14px",
|
|
7817
7848
|
display: "flex",
|
|
7818
7849
|
alignItems: "center",
|
|
@@ -7823,7 +7854,7 @@ const Ls = [
|
|
|
7823
7854
|
retryButton: {
|
|
7824
7855
|
marginTop: "8px",
|
|
7825
7856
|
padding: "8px 16px",
|
|
7826
|
-
backgroundColor:
|
|
7857
|
+
backgroundColor: A.accent,
|
|
7827
7858
|
color: "#ffffff",
|
|
7828
7859
|
border: "none",
|
|
7829
7860
|
borderRadius: "6px",
|
|
@@ -7833,20 +7864,20 @@ const Ls = [
|
|
|
7833
7864
|
transition: "background-color 0.2s ease"
|
|
7834
7865
|
}
|
|
7835
7866
|
}, K = async () => {
|
|
7836
|
-
D(null),
|
|
7867
|
+
D(null), R(!0);
|
|
7837
7868
|
try {
|
|
7838
7869
|
const x = localStorage.getItem("userInfo");
|
|
7839
7870
|
if (x) {
|
|
7840
|
-
const
|
|
7841
|
-
q(
|
|
7871
|
+
const E = JSON.parse(x);
|
|
7872
|
+
q(E);
|
|
7842
7873
|
} else a && q(a);
|
|
7843
7874
|
} catch (x) {
|
|
7844
7875
|
console.error("Retry failed:", x), D("Invalid user data"), localStorage.removeItem("userInfo"), q(null);
|
|
7845
7876
|
} finally {
|
|
7846
|
-
|
|
7877
|
+
R(!1);
|
|
7847
7878
|
}
|
|
7848
|
-
}, Q = (x,
|
|
7849
|
-
(x.key === "Enter" || x.key === " ") && (x.preventDefault(),
|
|
7879
|
+
}, Q = (x, E) => {
|
|
7880
|
+
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), E());
|
|
7850
7881
|
}, G = () => o || C?.profileUrl, f = () => {
|
|
7851
7882
|
const x = G();
|
|
7852
7883
|
x && window.open(x, "_self", "noopener,noreferrer");
|
|
@@ -7857,7 +7888,7 @@ const Ls = [
|
|
|
7857
7888
|
"div",
|
|
7858
7889
|
{
|
|
7859
7890
|
style: P.wrapper,
|
|
7860
|
-
ref:
|
|
7891
|
+
ref: B,
|
|
7861
7892
|
className: i,
|
|
7862
7893
|
role: "menu",
|
|
7863
7894
|
"aria-label": "User menu",
|
|
@@ -7866,12 +7897,12 @@ const Ls = [
|
|
|
7866
7897
|
"div",
|
|
7867
7898
|
{
|
|
7868
7899
|
ref: F,
|
|
7869
|
-
onClick: () =>
|
|
7870
|
-
onKeyDown: (x) => Q(x, () =>
|
|
7900
|
+
onClick: () => z((x) => !x),
|
|
7901
|
+
onKeyDown: (x) => Q(x, () => z((E) => !E)),
|
|
7871
7902
|
tabIndex: 0,
|
|
7872
7903
|
role: "button",
|
|
7873
7904
|
"aria-haspopup": "true",
|
|
7874
|
-
"aria-expanded":
|
|
7905
|
+
"aria-expanded": I,
|
|
7875
7906
|
"aria-label": "Toggle user menu",
|
|
7876
7907
|
children: C?.avatarUrl ? /* @__PURE__ */ n.jsx(
|
|
7877
7908
|
"img",
|
|
@@ -7883,13 +7914,13 @@ const Ls = [
|
|
|
7883
7914
|
height: T ? "34px" : "36px",
|
|
7884
7915
|
borderRadius: "50%",
|
|
7885
7916
|
objectFit: "cover",
|
|
7886
|
-
border: `2px solid ${
|
|
7917
|
+
border: `2px solid ${A.borderLight}`,
|
|
7887
7918
|
flexShrink: 0
|
|
7888
7919
|
},
|
|
7889
7920
|
loading: "lazy",
|
|
7890
7921
|
onError: (x) => {
|
|
7891
|
-
const
|
|
7892
|
-
|
|
7922
|
+
const E = x.target;
|
|
7923
|
+
E.onerror = null, E.src = `https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(
|
|
7893
7924
|
C?.name || "User"
|
|
7894
7925
|
)}`;
|
|
7895
7926
|
}
|
|
@@ -7906,7 +7937,7 @@ const Ls = [
|
|
|
7906
7937
|
height: T ? "34px" : "40px",
|
|
7907
7938
|
borderRadius: "50%",
|
|
7908
7939
|
objectFit: "cover",
|
|
7909
|
-
border: `2px solid ${
|
|
7940
|
+
border: `2px solid ${A.borderLight}`,
|
|
7910
7941
|
flexShrink: 0
|
|
7911
7942
|
},
|
|
7912
7943
|
loading: "lazy"
|
|
@@ -7918,18 +7949,18 @@ const Ls = [
|
|
|
7918
7949
|
{
|
|
7919
7950
|
ref: F,
|
|
7920
7951
|
style: P.avatarButton,
|
|
7921
|
-
onClick: () =>
|
|
7922
|
-
onKeyDown: (x) => Q(x, () =>
|
|
7952
|
+
onClick: () => z((x) => !x),
|
|
7953
|
+
onKeyDown: (x) => Q(x, () => z((E) => !E)),
|
|
7923
7954
|
tabIndex: 0,
|
|
7924
7955
|
role: "button",
|
|
7925
7956
|
"aria-haspopup": "true",
|
|
7926
|
-
"aria-expanded":
|
|
7957
|
+
"aria-expanded": I,
|
|
7927
7958
|
"aria-label": "Toggle user menu",
|
|
7928
7959
|
onMouseOver: (x) => {
|
|
7929
|
-
x.currentTarget.style.backgroundColor =
|
|
7960
|
+
x.currentTarget.style.backgroundColor = A.surfaceHover, x.currentTarget.style.boxShadow = "0 4px 12px rgba(0,0,0,0.15)";
|
|
7930
7961
|
},
|
|
7931
7962
|
onMouseOut: (x) => {
|
|
7932
|
-
x.currentTarget.style.backgroundColor =
|
|
7963
|
+
x.currentTarget.style.backgroundColor = A.surface, x.currentTarget.style.boxShadow = "none";
|
|
7933
7964
|
},
|
|
7934
7965
|
onBlur: (x) => {
|
|
7935
7966
|
x.currentTarget.style.outline = "none";
|
|
@@ -7943,8 +7974,8 @@ const Ls = [
|
|
|
7943
7974
|
style: P.avatarImage,
|
|
7944
7975
|
loading: "lazy",
|
|
7945
7976
|
onError: (x) => {
|
|
7946
|
-
const
|
|
7947
|
-
|
|
7977
|
+
const E = x.target;
|
|
7978
|
+
E.src = "https://api.dicebear.com/9.x/glass/svg?seed=Kingston";
|
|
7948
7979
|
}
|
|
7949
7980
|
}
|
|
7950
7981
|
) : /* @__PURE__ */ n.jsx(
|
|
@@ -7971,7 +8002,7 @@ const Ls = [
|
|
|
7971
8002
|
]
|
|
7972
8003
|
}
|
|
7973
8004
|
),
|
|
7974
|
-
|
|
8005
|
+
I && /* @__PURE__ */ n.jsx("div", { style: P.dropdown, role: "menu", "aria-label": "User options", children: g ? /* @__PURE__ */ n.jsx("div", { style: P.loadingText, role: "status", "aria-live": "polite", children: "Loading user information..." }) : C ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
7975
8006
|
/* @__PURE__ */ n.jsxs("div", { style: P.userSection, children: [
|
|
7976
8007
|
C?.avatarUrl ? /* @__PURE__ */ n.jsx(
|
|
7977
8008
|
"img",
|
|
@@ -7981,8 +8012,8 @@ const Ls = [
|
|
|
7981
8012
|
style: P.dropdownAvatar,
|
|
7982
8013
|
loading: "lazy",
|
|
7983
8014
|
onError: (x) => {
|
|
7984
|
-
const
|
|
7985
|
-
|
|
8015
|
+
const E = x.target;
|
|
8016
|
+
E.src = `https://api.dicebear.com/9.x/initials/svg?seed=${C.name}`;
|
|
7986
8017
|
}
|
|
7987
8018
|
}
|
|
7988
8019
|
) : /* @__PURE__ */ n.jsx(
|
|
@@ -8006,7 +8037,7 @@ const Ls = [
|
|
|
8006
8037
|
style: P.menuItem,
|
|
8007
8038
|
onClick: f,
|
|
8008
8039
|
onMouseOver: (x) => {
|
|
8009
|
-
x.currentTarget.style.backgroundColor =
|
|
8040
|
+
x.currentTarget.style.backgroundColor = A.surfaceHover;
|
|
8010
8041
|
},
|
|
8011
8042
|
onMouseOut: (x) => {
|
|
8012
8043
|
x.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -8026,7 +8057,7 @@ const Ls = [
|
|
|
8026
8057
|
style: P.menuItem,
|
|
8027
8058
|
onClick: S,
|
|
8028
8059
|
onMouseOver: (x) => {
|
|
8029
|
-
x.currentTarget.style.backgroundColor =
|
|
8060
|
+
x.currentTarget.style.backgroundColor = A.surfaceHover;
|
|
8030
8061
|
},
|
|
8031
8062
|
onMouseOut: (x) => {
|
|
8032
8063
|
x.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -8035,7 +8066,7 @@ const Ls = [
|
|
|
8035
8066
|
role: "menuitem",
|
|
8036
8067
|
tabIndex: 0,
|
|
8037
8068
|
children: [
|
|
8038
|
-
/* @__PURE__ */ n.jsx(
|
|
8069
|
+
/* @__PURE__ */ n.jsx(As, { style: P.icon, "aria-hidden": "true" }),
|
|
8039
8070
|
/* @__PURE__ */ n.jsx("span", { style: P.menuItemText, children: y })
|
|
8040
8071
|
]
|
|
8041
8072
|
}
|
|
@@ -8048,7 +8079,7 @@ const Ls = [
|
|
|
8048
8079
|
rel: "noopener noreferrer",
|
|
8049
8080
|
style: P.menuItem,
|
|
8050
8081
|
onMouseOver: (x) => {
|
|
8051
|
-
x.currentTarget.style.backgroundColor =
|
|
8082
|
+
x.currentTarget.style.backgroundColor = A.surfaceHover;
|
|
8052
8083
|
},
|
|
8053
8084
|
onMouseOut: (x) => {
|
|
8054
8085
|
x.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -8068,7 +8099,7 @@ const Ls = [
|
|
|
8068
8099
|
style: P.logoutButton,
|
|
8069
8100
|
onClick: r,
|
|
8070
8101
|
onMouseOver: (x) => {
|
|
8071
|
-
x.currentTarget.style.backgroundColor =
|
|
8102
|
+
x.currentTarget.style.backgroundColor = A.surfaceHover;
|
|
8072
8103
|
},
|
|
8073
8104
|
onMouseOut: (x) => {
|
|
8074
8105
|
x.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -8080,7 +8111,7 @@ const Ls = [
|
|
|
8080
8111
|
/* @__PURE__ */ n.jsx(
|
|
8081
8112
|
ct,
|
|
8082
8113
|
{
|
|
8083
|
-
style: { ...P.icon, color:
|
|
8114
|
+
style: { ...P.icon, color: A.error },
|
|
8084
8115
|
"aria-hidden": "true"
|
|
8085
8116
|
}
|
|
8086
8117
|
),
|
|
@@ -8105,10 +8136,10 @@ const Ls = [
|
|
|
8105
8136
|
style: P.retryButton,
|
|
8106
8137
|
onClick: K,
|
|
8107
8138
|
onMouseOver: (x) => {
|
|
8108
|
-
x.currentTarget.style.backgroundColor =
|
|
8139
|
+
x.currentTarget.style.backgroundColor = A.accentHover;
|
|
8109
8140
|
},
|
|
8110
8141
|
onMouseOut: (x) => {
|
|
8111
|
-
x.currentTarget.style.backgroundColor =
|
|
8142
|
+
x.currentTarget.style.backgroundColor = A.accent;
|
|
8112
8143
|
},
|
|
8113
8144
|
children: "Try Again"
|
|
8114
8145
|
}
|
|
@@ -8127,9 +8158,9 @@ const Ls = [
|
|
|
8127
8158
|
email: t?.email || "",
|
|
8128
8159
|
otp: "",
|
|
8129
8160
|
appId: a
|
|
8130
|
-
}), [d, u] = O(!1), [b, y] = O(!1), [w, c] = O(null), j = (g,
|
|
8131
|
-
let v = parseInt(g.replace("#", ""), 16), D = (v >> 16) +
|
|
8132
|
-
return D = Math.min(255, Math.max(0, D)),
|
|
8161
|
+
}), [d, u] = O(!1), [b, y] = O(!1), [w, c] = O(null), j = (g, R) => {
|
|
8162
|
+
let v = parseInt(g.replace("#", ""), 16), D = (v >> 16) + R, B = (v >> 8 & 255) + R, F = (v & 255) + R;
|
|
8163
|
+
return D = Math.min(255, Math.max(0, D)), B = Math.min(255, Math.max(0, B)), F = Math.min(255, Math.max(0, F)), `#${(F | B << 8 | D << 16).toString(16).padStart(6, "0")}`;
|
|
8133
8164
|
}, m = e ? {
|
|
8134
8165
|
surface: "#09090b",
|
|
8135
8166
|
surfaceLight: "#27272a",
|
|
@@ -8156,9 +8187,9 @@ const Ls = [
|
|
|
8156
8187
|
te(() => {
|
|
8157
8188
|
t?.email && h((g) => ({ ...g, email: t.email }));
|
|
8158
8189
|
}, [t?.email]);
|
|
8159
|
-
const $ = (g,
|
|
8160
|
-
c({ type: g, message:
|
|
8161
|
-
},
|
|
8190
|
+
const $ = (g, R) => {
|
|
8191
|
+
c({ type: g, message: R }), setTimeout(() => c(null), 3e3);
|
|
8192
|
+
}, I = async () => {
|
|
8162
8193
|
if (!l.email || !/\S+@\S+\.\S+/.test(l.email)) {
|
|
8163
8194
|
$("error", "Please enter a valid email");
|
|
8164
8195
|
return;
|
|
@@ -8176,21 +8207,21 @@ const Ls = [
|
|
|
8176
8207
|
} finally {
|
|
8177
8208
|
y(!1);
|
|
8178
8209
|
}
|
|
8179
|
-
},
|
|
8210
|
+
}, z = async (g) => {
|
|
8180
8211
|
if (g.preventDefault(), !l.email || !l.otp) {
|
|
8181
8212
|
$("error", "Please fill in all fields");
|
|
8182
8213
|
return;
|
|
8183
8214
|
}
|
|
8184
8215
|
try {
|
|
8185
8216
|
y(!0);
|
|
8186
|
-
const
|
|
8187
|
-
if (
|
|
8217
|
+
const R = await M.post(`${i}/users/verify-email`, l);
|
|
8218
|
+
if (R.data.success && t) {
|
|
8188
8219
|
const v = { ...t, isVerified: !0 };
|
|
8189
|
-
s?.(v), $("success",
|
|
8220
|
+
s?.(v), $("success", R.data.message || "Email verified!"), u(!1), h({ email: t.email, otp: "", appId: a });
|
|
8190
8221
|
} else
|
|
8191
|
-
$("error",
|
|
8192
|
-
} catch (
|
|
8193
|
-
$("error",
|
|
8222
|
+
$("error", R.data.message || "Verification failed");
|
|
8223
|
+
} catch (R) {
|
|
8224
|
+
$("error", R.response?.data?.message || "Server error");
|
|
8194
8225
|
} finally {
|
|
8195
8226
|
y(!1);
|
|
8196
8227
|
}
|
|
@@ -8222,7 +8253,7 @@ const Ls = [
|
|
|
8222
8253
|
return /* @__PURE__ */ n.jsxs(
|
|
8223
8254
|
"form",
|
|
8224
8255
|
{
|
|
8225
|
-
onSubmit:
|
|
8256
|
+
onSubmit: z,
|
|
8226
8257
|
style: {
|
|
8227
8258
|
width: "100%",
|
|
8228
8259
|
height: "100%",
|
|
@@ -8278,7 +8309,7 @@ const Ls = [
|
|
|
8278
8309
|
{
|
|
8279
8310
|
type: "email",
|
|
8280
8311
|
value: l.email,
|
|
8281
|
-
onChange: (g) => h((
|
|
8312
|
+
onChange: (g) => h((R) => ({ ...R, email: g.target.value })),
|
|
8282
8313
|
placeholder: "Enter your email",
|
|
8283
8314
|
style: C,
|
|
8284
8315
|
required: !0
|
|
@@ -8308,7 +8339,7 @@ const Ls = [
|
|
|
8308
8339
|
{
|
|
8309
8340
|
type: "text",
|
|
8310
8341
|
value: l.otp,
|
|
8311
|
-
onChange: (g) => h((
|
|
8342
|
+
onChange: (g) => h((R) => ({ ...R, otp: g.target.value })),
|
|
8312
8343
|
placeholder: "Enter OTP",
|
|
8313
8344
|
style: C,
|
|
8314
8345
|
required: !0
|
|
@@ -8323,7 +8354,7 @@ const Ls = [
|
|
|
8323
8354
|
"button",
|
|
8324
8355
|
{
|
|
8325
8356
|
type: "button",
|
|
8326
|
-
onClick:
|
|
8357
|
+
onClick: I,
|
|
8327
8358
|
disabled: b,
|
|
8328
8359
|
style: q(b),
|
|
8329
8360
|
children: [
|