@neuctra/authix 1.1.60 → 1.1.61
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.
|
@@ -7,11 +7,11 @@ function Ut(t, e) {
|
|
|
7
7
|
const { toString: mr } = Object.prototype, { getPrototypeOf: st } = Object, { iterator: Fe, toStringTag: Dt } = Symbol, qe = /* @__PURE__ */ ((t) => (e) => {
|
|
8
8
|
const r = mr.call(e);
|
|
9
9
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), oe = (t) => (t = t.toLowerCase(), (e) => qe(e) === t), Me = (t) => (e) => typeof e === t, { isArray: we } = Array, ye = Me("undefined");
|
|
11
11
|
function Ce(t) {
|
|
12
12
|
return t !== null && !ye(t) && t.constructor !== null && !ye(t.constructor) && re(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
13
13
|
}
|
|
14
|
-
const Lt =
|
|
14
|
+
const Lt = oe("ArrayBuffer");
|
|
15
15
|
function yr(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;
|
|
@@ -29,11 +29,11 @@ const br = Me("string"), re = Me("function"), Ft = Me("number"), Te = (t) => t !
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
}, Sr =
|
|
32
|
+
}, Sr = oe("Date"), vr = oe("File"), kr = oe("Blob"), Er = oe("FileList"), Cr = (t) => Te(t) && re(t.pipe), Tr = (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
|
-
}, Rr =
|
|
36
|
+
}, Rr = oe("URLSearchParams"), [Ir, Pr, Or, Ar] = ["ReadableStream", "Request", "Response", "Headers"].map(oe), zr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
37
|
function Re(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
38
38
|
if (t === null || typeof t > "u")
|
|
39
39
|
return;
|
|
@@ -44,10 +44,10 @@ function Re(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
|
44
44
|
else {
|
|
45
45
|
if (Ce(t))
|
|
46
46
|
return;
|
|
47
|
-
const
|
|
47
|
+
const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t), o = i.length;
|
|
48
48
|
let l;
|
|
49
|
-
for (s = 0; s <
|
|
50
|
-
l =
|
|
49
|
+
for (s = 0; s < o; s++)
|
|
50
|
+
l = i[s], e.call(null, t[l], l, t);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
function qt(t, e) {
|
|
@@ -63,27 +63,27 @@ function qt(t, e) {
|
|
|
63
63
|
}
|
|
64
64
|
const fe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Mt = (t) => !ye(t) && t !== fe;
|
|
65
65
|
function Ze() {
|
|
66
|
-
const { caseless: t, skipUndefined: e } = Mt(this) && this || {}, r = {}, s = (a,
|
|
67
|
-
const
|
|
68
|
-
ze(r[
|
|
66
|
+
const { caseless: t, skipUndefined: e } = Mt(this) && this || {}, r = {}, s = (a, i) => {
|
|
67
|
+
const o = t && qt(r, i) || i;
|
|
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
|
-
for (let a = 0,
|
|
70
|
+
for (let a = 0, i = arguments.length; a < i; a++)
|
|
71
71
|
arguments[a] && Re(arguments[a], s);
|
|
72
72
|
return r;
|
|
73
73
|
}
|
|
74
|
-
const $r = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a,
|
|
75
|
-
r && re(a) ? t[
|
|
74
|
+
const $r = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, i) => {
|
|
75
|
+
r && re(a) ? t[i] = Ut(a, r) : t[i] = a;
|
|
76
76
|
}, { allOwnKeys: s }), t), _r = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Nr = (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
|
}, Ur = (t, e, r, s) => {
|
|
81
|
-
let a,
|
|
81
|
+
let a, i, o;
|
|
82
82
|
const l = {};
|
|
83
83
|
if (e = e || {}, t == null) return e;
|
|
84
84
|
do {
|
|
85
|
-
for (a = Object.getOwnPropertyNames(t),
|
|
86
|
-
|
|
85
|
+
for (a = Object.getOwnPropertyNames(t), i = a.length; i-- > 0; )
|
|
86
|
+
o = a[i], (!s || s(o, t, e)) && !l[o] && (e[o] = t[o], l[o] = !0);
|
|
87
87
|
t = r !== !1 && st(t);
|
|
88
88
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
89
89
|
return e;
|
|
@@ -104,8 +104,8 @@ const $r = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, o) => {
|
|
|
104
104
|
const s = (t && t[Fe]).call(t);
|
|
105
105
|
let a;
|
|
106
106
|
for (; (a = s.next()) && !a.done; ) {
|
|
107
|
-
const
|
|
108
|
-
e.call(t,
|
|
107
|
+
const i = a.value;
|
|
108
|
+
e.call(t, i[0], i[1]);
|
|
109
109
|
}
|
|
110
110
|
}, Mr = (t, e) => {
|
|
111
111
|
let r;
|
|
@@ -113,16 +113,16 @@ const $r = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, o) => {
|
|
|
113
113
|
for (; (r = t.exec(e)) !== null; )
|
|
114
114
|
s.push(r);
|
|
115
115
|
return s;
|
|
116
|
-
}, Wr =
|
|
116
|
+
}, Wr = oe("HTMLFormElement"), Br = (t) => t.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
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), Hr =
|
|
121
|
+
), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Hr = oe("RegExp"), Wt = (t, e) => {
|
|
122
122
|
const r = Object.getOwnPropertyDescriptors(t), s = {};
|
|
123
|
-
Re(r, (a,
|
|
124
|
-
let
|
|
125
|
-
(
|
|
123
|
+
Re(r, (a, i) => {
|
|
124
|
+
let o;
|
|
125
|
+
(o = e(a, i, t)) !== !1 && (s[i] = o || a);
|
|
126
126
|
}), Object.defineProperties(t, s);
|
|
127
127
|
}, Vr = (t) => {
|
|
128
128
|
Wt(t, (e, r) => {
|
|
@@ -141,8 +141,8 @@ const $r = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, o) => {
|
|
|
141
141
|
});
|
|
142
142
|
}, Yr = (t, e) => {
|
|
143
143
|
const r = {}, s = (a) => {
|
|
144
|
-
a.forEach((
|
|
145
|
-
r[
|
|
144
|
+
a.forEach((i) => {
|
|
145
|
+
r[i] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
148
|
return we(t) ? s(t) : s(String(t).split(e)), r;
|
|
@@ -160,18 +160,18 @@ const Xr = (t) => {
|
|
|
160
160
|
return s;
|
|
161
161
|
if (!("toJSON" in s)) {
|
|
162
162
|
e[a] = s;
|
|
163
|
-
const
|
|
164
|
-
return Re(s, (
|
|
165
|
-
const h = r(
|
|
166
|
-
!ye(h) && (
|
|
167
|
-
}), e[a] = void 0,
|
|
163
|
+
const i = we(s) ? [] : {};
|
|
164
|
+
return Re(s, (o, l) => {
|
|
165
|
+
const h = r(o, a + 1);
|
|
166
|
+
!ye(h) && (i[l] = h);
|
|
167
|
+
}), e[a] = void 0, i;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return s;
|
|
171
171
|
};
|
|
172
172
|
return r(t, 0);
|
|
173
|
-
}, Zr =
|
|
174
|
-
a === fe &&
|
|
173
|
+
}, Zr = oe("AsyncFunction"), Qr = (t) => t && (Te(t) || re(t)) && re(t.then) && re(t.catch), Bt = ((t, e) => t ? setImmediate : e ? ((r, s) => (fe.addEventListener("message", ({ source: a, data: i }) => {
|
|
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))(
|
|
@@ -211,7 +211,7 @@ const Xr = (t) => {
|
|
|
211
211
|
inherits: Nr,
|
|
212
212
|
toFlatObject: Ur,
|
|
213
213
|
kindOf: qe,
|
|
214
|
-
kindOfTest:
|
|
214
|
+
kindOfTest: oe,
|
|
215
215
|
endsWith: Dr,
|
|
216
216
|
toArray: Lr,
|
|
217
217
|
forEachEntry: qr,
|
|
@@ -281,13 +281,13 @@ const Ht = L.prototype, Vt = {};
|
|
|
281
281
|
});
|
|
282
282
|
Object.defineProperties(L, Vt);
|
|
283
283
|
Object.defineProperty(Ht, "isAxiosError", { value: !0 });
|
|
284
|
-
L.from = (t, e, r, s, a,
|
|
285
|
-
const
|
|
286
|
-
p.toFlatObject(t,
|
|
287
|
-
return
|
|
284
|
+
L.from = (t, e, r, s, a, i) => {
|
|
285
|
+
const o = Object.create(Ht);
|
|
286
|
+
p.toFlatObject(t, o, function(d) {
|
|
287
|
+
return d !== Error.prototype;
|
|
288
288
|
}, (c) => c !== "isAxiosError");
|
|
289
289
|
const l = t && t.message ? t.message : "Error", h = e == null && t ? t.code : e;
|
|
290
|
-
return L.call(
|
|
290
|
+
return L.call(o, l, h, r, s, a), t && o.cause == null && Object.defineProperty(o, "cause", { value: t, configurable: !0 }), o.name = t && t.name || "Error", i && Object.assign(o, i), o;
|
|
291
291
|
};
|
|
292
292
|
const rn = null;
|
|
293
293
|
function Qe(t) {
|
|
@@ -297,8 +297,8 @@ function Yt(t) {
|
|
|
297
297
|
return p.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
298
298
|
}
|
|
299
299
|
function gt(t, e, r) {
|
|
300
|
-
return t ? t.concat(e).map(function(a,
|
|
301
|
-
return a = Yt(a), !r &&
|
|
300
|
+
return t ? t.concat(e).map(function(a, i) {
|
|
301
|
+
return a = Yt(a), !r && i ? "[" + a + "]" : a;
|
|
302
302
|
}).join(r ? "." : "") : e;
|
|
303
303
|
}
|
|
304
304
|
function nn(t) {
|
|
@@ -314,48 +314,48 @@ function We(t, e, r) {
|
|
|
314
314
|
metaTokens: !0,
|
|
315
315
|
dots: !1,
|
|
316
316
|
indexes: !1
|
|
317
|
-
}, !1, function(j,
|
|
318
|
-
return !p.isUndefined(
|
|
317
|
+
}, !1, function(j, y) {
|
|
318
|
+
return !p.isUndefined(y[j]);
|
|
319
319
|
});
|
|
320
|
-
const s = r.metaTokens, a = r.visitor ||
|
|
320
|
+
const s = r.metaTokens, a = r.visitor || d, i = r.dots, o = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(e);
|
|
321
321
|
if (!p.isFunction(a))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
|
-
function c(
|
|
324
|
-
if (
|
|
325
|
-
if (p.isDate(
|
|
326
|
-
return
|
|
327
|
-
if (p.isBoolean(
|
|
328
|
-
return
|
|
329
|
-
if (!h && p.isBlob(
|
|
323
|
+
function c(u) {
|
|
324
|
+
if (u === null) return "";
|
|
325
|
+
if (p.isDate(u))
|
|
326
|
+
return u.toISOString();
|
|
327
|
+
if (p.isBoolean(u))
|
|
328
|
+
return u.toString();
|
|
329
|
+
if (!h && p.isBlob(u))
|
|
330
330
|
throw new L("Blob is not supported. Use a Buffer instead.");
|
|
331
|
-
return p.isArrayBuffer(
|
|
331
|
+
return p.isArrayBuffer(u) || p.isTypedArray(u) ? h && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
|
|
332
332
|
}
|
|
333
|
-
function u
|
|
334
|
-
let $ =
|
|
335
|
-
if (
|
|
333
|
+
function d(u, j, y) {
|
|
334
|
+
let $ = u;
|
|
335
|
+
if (u && !y && typeof u == "object") {
|
|
336
336
|
if (p.endsWith(j, "{}"))
|
|
337
|
-
j = s ? j : j.slice(0, -2),
|
|
338
|
-
else if (p.isArray(
|
|
337
|
+
j = s ? j : j.slice(0, -2), u = JSON.stringify(u);
|
|
338
|
+
else if (p.isArray(u) && nn(u) || (p.isFileList(u) || p.endsWith(j, "[]")) && ($ = p.toArray(u)))
|
|
339
339
|
return j = Yt(j), $.forEach(function(z, C) {
|
|
340
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
343
|
c(z)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return Qe(
|
|
347
|
+
return Qe(u) ? !0 : (e.append(gt(y, j, i), c(u)), !1);
|
|
348
348
|
}
|
|
349
|
-
const
|
|
350
|
-
defaultVisitor:
|
|
349
|
+
const m = [], b = Object.assign(sn, {
|
|
350
|
+
defaultVisitor: d,
|
|
351
351
|
convertValue: c,
|
|
352
352
|
isVisitable: Qe
|
|
353
353
|
});
|
|
354
|
-
function w(
|
|
355
|
-
if (!p.isUndefined(
|
|
356
|
-
if (
|
|
354
|
+
function w(u, j) {
|
|
355
|
+
if (!p.isUndefined(u)) {
|
|
356
|
+
if (m.indexOf(u) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + j.join("."));
|
|
358
|
-
|
|
358
|
+
m.push(u), p.forEach(u, function($, R) {
|
|
359
359
|
(!(p.isUndefined($) || $ === null) && a.call(
|
|
360
360
|
e,
|
|
361
361
|
$,
|
|
@@ -363,7 +363,7 @@ function We(t, e, r) {
|
|
|
363
363
|
j,
|
|
364
364
|
b
|
|
365
365
|
)) === !0 && w($, j ? j.concat(R) : [R]);
|
|
366
|
-
}),
|
|
366
|
+
}), m.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
if (!p.isObject(t))
|
|
@@ -410,10 +410,10 @@ function Jt(t, e, r) {
|
|
|
410
410
|
serialize: r
|
|
411
411
|
});
|
|
412
412
|
const a = r && r.serialize;
|
|
413
|
-
let
|
|
414
|
-
if (a ?
|
|
415
|
-
const
|
|
416
|
-
|
|
413
|
+
let i;
|
|
414
|
+
if (a ? i = a(e, r) : i = p.isURLSearchParams(e) ? e.toString() : new at(e, r).toString(s), i) {
|
|
415
|
+
const o = t.indexOf("#");
|
|
416
|
+
o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
417
417
|
}
|
|
418
418
|
return t;
|
|
419
419
|
}
|
|
@@ -483,10 +483,10 @@ const Gt = {
|
|
|
483
483
|
Blob: dn
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
},
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", fn =
|
|
486
|
+
}, ot = typeof window < "u" && typeof document < "u", et = typeof navigator == "object" && navigator || void 0, un = ot && (!et || ["ReactNative", "NativeScript", "NS"].indexOf(et.product) < 0), pn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", fn = ot && window.location.href || "http://localhost", xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
|
-
hasBrowserEnv:
|
|
489
|
+
hasBrowserEnv: ot,
|
|
490
490
|
hasStandardBrowserEnv: un,
|
|
491
491
|
hasStandardBrowserWebWorkerEnv: pn,
|
|
492
492
|
navigator: et,
|
|
@@ -497,8 +497,8 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", fn
|
|
|
497
497
|
};
|
|
498
498
|
function hn(t, e) {
|
|
499
499
|
return We(t, new ee.classes.URLSearchParams(), {
|
|
500
|
-
visitor: function(r, s, a,
|
|
501
|
-
return ee.isNode && p.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) :
|
|
500
|
+
visitor: function(r, s, a, i) {
|
|
501
|
+
return ee.isNode && p.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...e
|
|
504
504
|
});
|
|
@@ -510,17 +510,17 @@ function mn(t) {
|
|
|
510
510
|
const e = {}, r = Object.keys(t);
|
|
511
511
|
let s;
|
|
512
512
|
const a = r.length;
|
|
513
|
-
let
|
|
513
|
+
let i;
|
|
514
514
|
for (s = 0; s < a; s++)
|
|
515
|
-
|
|
515
|
+
i = r[s], e[i] = t[i];
|
|
516
516
|
return e;
|
|
517
517
|
}
|
|
518
518
|
function Xt(t) {
|
|
519
|
-
function e(r, s, a,
|
|
520
|
-
let
|
|
521
|
-
if (
|
|
522
|
-
const l = Number.isFinite(+
|
|
523
|
-
return
|
|
519
|
+
function e(r, s, a, i) {
|
|
520
|
+
let o = r[i++];
|
|
521
|
+
if (o === "__proto__") return !0;
|
|
522
|
+
const l = Number.isFinite(+o), h = i >= r.length;
|
|
523
|
+
return o = !o && p.isArray(a) ? a.length : o, h ? (p.hasOwnProp(a, o) ? a[o] = [a[o], s] : a[o] = s, !l) : ((!a[o] || !p.isObject(a[o])) && (a[o] = []), e(r, s, a[o], i) && p.isArray(a[o]) && (a[o] = mn(a[o])), !l);
|
|
524
524
|
}
|
|
525
525
|
if (p.isFormData(t) && p.isFunction(t.entries)) {
|
|
526
526
|
const r = {};
|
|
@@ -544,8 +544,8 @@ const Ie = {
|
|
|
544
544
|
transitional: Gt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(e, r) {
|
|
547
|
-
const s = r.getContentType() || "", a = s.indexOf("application/json") > -1,
|
|
548
|
-
if (
|
|
547
|
+
const s = r.getContentType() || "", a = s.indexOf("application/json") > -1, i = p.isObject(e);
|
|
548
|
+
if (i && p.isHTMLForm(e) && (e = new FormData(e)), p.isFormData(e))
|
|
549
549
|
return a ? JSON.stringify(Xt(e)) : e;
|
|
550
550
|
if (p.isArrayBuffer(e) || p.isBuffer(e) || p.isStream(e) || p.isFile(e) || p.isBlob(e) || p.isReadableStream(e))
|
|
551
551
|
return e;
|
|
@@ -554,7 +554,7 @@ const Ie = {
|
|
|
554
554
|
if (p.isURLSearchParams(e))
|
|
555
555
|
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
556
556
|
let l;
|
|
557
|
-
if (
|
|
557
|
+
if (i) {
|
|
558
558
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
559
|
return hn(e, this.formSerializer).toString();
|
|
560
560
|
if ((l = p.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
|
@@ -566,18 +566,18 @@ const Ie = {
|
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return
|
|
569
|
+
return i || a ? (r.setContentType("application/json", !1), yn(e)) : e;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(e) {
|
|
572
572
|
const r = this.transitional || Ie.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)) {
|
|
576
|
-
const
|
|
576
|
+
const o = !(r && r.silentJSONParsing) && a;
|
|
577
577
|
try {
|
|
578
578
|
return JSON.parse(e, this.parseReviver);
|
|
579
579
|
} catch (l) {
|
|
580
|
-
if (
|
|
580
|
+
if (o)
|
|
581
581
|
throw l.name === "SyntaxError" ? L.from(l, L.ERR_BAD_RESPONSE, this, null, this.response) : l;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
@@ -631,8 +631,8 @@ const bn = p.toObjectSet([
|
|
|
631
631
|
const e = {};
|
|
632
632
|
let r, s, a;
|
|
633
633
|
return t && t.split(`
|
|
634
|
-
`).forEach(function(
|
|
635
|
-
a =
|
|
634
|
+
`).forEach(function(o) {
|
|
635
|
+
a = o.indexOf(":"), r = o.substring(0, a).trim().toLowerCase(), s = o.substring(a + 1).trim(), !(!r || e[r] && bn[r]) && (r === "set-cookie" ? e[r] ? e[r].push(s) : e[r] = [s] : e[r] = e[r] ? e[r] + ", " + s : s);
|
|
636
636
|
}), e;
|
|
637
637
|
}, bt = Symbol("internals");
|
|
638
638
|
function ve(t) {
|
|
@@ -666,8 +666,8 @@ function kn(t, e) {
|
|
|
666
666
|
const r = p.toCamelCase(" " + e);
|
|
667
667
|
["get", "set", "has"].forEach((s) => {
|
|
668
668
|
Object.defineProperty(t, s + r, {
|
|
669
|
-
value: function(a,
|
|
670
|
-
return this[s].call(this, e, a,
|
|
669
|
+
value: function(a, i, o) {
|
|
670
|
+
return this[s].call(this, e, a, i, o);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
@@ -679,28 +679,28 @@ let ne = class {
|
|
|
679
679
|
}
|
|
680
680
|
set(e, r, s) {
|
|
681
681
|
const a = this;
|
|
682
|
-
function
|
|
683
|
-
const
|
|
684
|
-
if (!
|
|
682
|
+
function i(l, h, c) {
|
|
683
|
+
const d = ve(h);
|
|
684
|
+
if (!d)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const
|
|
687
|
-
(!
|
|
686
|
+
const m = p.findKey(a, d);
|
|
687
|
+
(!m || a[m] === void 0 || c === !0 || c === void 0 && a[m] !== !1) && (a[m || h] = $e(l));
|
|
688
688
|
}
|
|
689
|
-
const
|
|
689
|
+
const o = (l, h) => p.forEach(l, (c, d) => i(c, d, h));
|
|
690
690
|
if (p.isPlainObject(e) || e instanceof this.constructor)
|
|
691
|
-
|
|
691
|
+
o(e, r);
|
|
692
692
|
else if (p.isString(e) && (e = e.trim()) && !Sn(e))
|
|
693
|
-
|
|
693
|
+
o(wn(e), r);
|
|
694
694
|
else if (p.isObject(e) && p.isIterable(e)) {
|
|
695
695
|
let l = {}, h, c;
|
|
696
|
-
for (const
|
|
697
|
-
if (!p.isArray(
|
|
696
|
+
for (const d of e) {
|
|
697
|
+
if (!p.isArray(d))
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
-
l[c =
|
|
699
|
+
l[c = d[0]] = (h = l[c]) ? p.isArray(h) ? [...h, d[1]] : [h, d[1]] : d[1];
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
o(l, r);
|
|
702
702
|
} else
|
|
703
|
-
e != null &&
|
|
703
|
+
e != null && i(r, e, s);
|
|
704
704
|
return this;
|
|
705
705
|
}
|
|
706
706
|
get(e, r) {
|
|
@@ -730,33 +730,33 @@ let ne = class {
|
|
|
730
730
|
delete(e, r) {
|
|
731
731
|
const s = this;
|
|
732
732
|
let a = !1;
|
|
733
|
-
function o
|
|
734
|
-
if (
|
|
735
|
-
const l = p.findKey(s,
|
|
733
|
+
function i(o) {
|
|
734
|
+
if (o = ve(o), o) {
|
|
735
|
+
const l = p.findKey(s, o);
|
|
736
736
|
l && (!r || Ye(s, s[l], l, r)) && (delete s[l], a = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
return p.isArray(e) ? e.forEach(
|
|
739
|
+
return p.isArray(e) ? e.forEach(i) : i(e), a;
|
|
740
740
|
}
|
|
741
741
|
clear(e) {
|
|
742
742
|
const r = Object.keys(this);
|
|
743
743
|
let s = r.length, a = !1;
|
|
744
744
|
for (; s--; ) {
|
|
745
|
-
const
|
|
746
|
-
(!e || Ye(this, this[
|
|
745
|
+
const i = r[s];
|
|
746
|
+
(!e || Ye(this, this[i], i, e, !0)) && (delete this[i], a = !0);
|
|
747
747
|
}
|
|
748
748
|
return a;
|
|
749
749
|
}
|
|
750
750
|
normalize(e) {
|
|
751
751
|
const r = this, s = {};
|
|
752
|
-
return p.forEach(this, (a,
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
r[
|
|
752
|
+
return p.forEach(this, (a, i) => {
|
|
753
|
+
const o = p.findKey(s, i);
|
|
754
|
+
if (o) {
|
|
755
|
+
r[o] = $e(a), delete r[i];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const l = e ? vn(
|
|
759
|
-
l !==
|
|
758
|
+
const l = e ? vn(i) : String(i).trim();
|
|
759
|
+
l !== i && delete r[i], r[l] = $e(a), s[l] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...e) {
|
|
@@ -792,11 +792,11 @@ let ne = class {
|
|
|
792
792
|
const s = (this[bt] = this[bt] = {
|
|
793
793
|
accessors: {}
|
|
794
794
|
}).accessors, a = this.prototype;
|
|
795
|
-
function o
|
|
796
|
-
const l = ve(
|
|
797
|
-
s[l] || (kn(a,
|
|
795
|
+
function i(o) {
|
|
796
|
+
const l = ve(o);
|
|
797
|
+
s[l] || (kn(a, o), s[l] = !0);
|
|
798
798
|
}
|
|
799
|
-
return p.isArray(e) ? e.forEach(
|
|
799
|
+
return p.isArray(e) ? e.forEach(i) : i(e), this;
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
802
|
ne.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -812,10 +812,10 @@ p.reduceDescriptors(ne.prototype, ({ value: t }, e) => {
|
|
|
812
812
|
p.freezeMethods(ne);
|
|
813
813
|
function Ke(t, e) {
|
|
814
814
|
const r = this || Ie, s = e || r, a = ne.from(s.headers);
|
|
815
|
-
let
|
|
815
|
+
let i = s.data;
|
|
816
816
|
return p.forEach(t, function(l) {
|
|
817
|
-
|
|
818
|
-
}), a.normalize(),
|
|
817
|
+
i = l.call(r, i, a.normalize(), e ? e.status : void 0);
|
|
818
|
+
}), a.normalize(), i;
|
|
819
819
|
}
|
|
820
820
|
function Zt(t) {
|
|
821
821
|
return !!(t && t.__CANCEL__);
|
|
@@ -843,49 +843,49 @@ function En(t) {
|
|
|
843
843
|
function Cn(t, e) {
|
|
844
844
|
t = t || 10;
|
|
845
845
|
const r = new Array(t), s = new Array(t);
|
|
846
|
-
let a = 0,
|
|
846
|
+
let a = 0, i = 0, o;
|
|
847
847
|
return e = e !== void 0 ? e : 1e3, function(h) {
|
|
848
|
-
const c = Date.now(),
|
|
849
|
-
|
|
850
|
-
let
|
|
851
|
-
for (;
|
|
852
|
-
b += r[
|
|
853
|
-
if (a = (a + 1) % t, a ===
|
|
848
|
+
const c = Date.now(), d = s[i];
|
|
849
|
+
o || (o = c), r[a] = h, s[a] = c;
|
|
850
|
+
let m = i, b = 0;
|
|
851
|
+
for (; m !== a; )
|
|
852
|
+
b += r[m++], m = m % t;
|
|
853
|
+
if (a = (a + 1) % t, a === i && (i = (i + 1) % t), c - o < e)
|
|
854
854
|
return;
|
|
855
|
-
const w =
|
|
855
|
+
const w = d && c - d;
|
|
856
856
|
return w ? Math.round(b * 1e3 / w) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
859
|
function Tn(t, e) {
|
|
860
|
-
let r = 0, s = 1e3 / e, a,
|
|
861
|
-
const
|
|
862
|
-
r =
|
|
860
|
+
let r = 0, s = 1e3 / e, a, i;
|
|
861
|
+
const o = (c, d = Date.now()) => {
|
|
862
|
+
r = d, a = null, i && (clearTimeout(i), i = null), t(...c);
|
|
863
863
|
};
|
|
864
864
|
return [(...c) => {
|
|
865
|
-
const
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
}, s -
|
|
869
|
-
}, () => a &&
|
|
865
|
+
const d = Date.now(), m = d - r;
|
|
866
|
+
m >= s ? o(c, d) : (a = c, i || (i = setTimeout(() => {
|
|
867
|
+
i = null, o(a);
|
|
868
|
+
}, s - m)));
|
|
869
|
+
}, () => a && o(a)];
|
|
870
870
|
}
|
|
871
871
|
const De = (t, e, r = 3) => {
|
|
872
872
|
let s = 0;
|
|
873
873
|
const a = Cn(50, 250);
|
|
874
|
-
return Tn((
|
|
875
|
-
const
|
|
876
|
-
s =
|
|
877
|
-
const
|
|
878
|
-
loaded:
|
|
874
|
+
return Tn((i) => {
|
|
875
|
+
const o = i.loaded, l = i.lengthComputable ? i.total : void 0, h = o - s, c = a(h), d = o <= l;
|
|
876
|
+
s = o;
|
|
877
|
+
const m = {
|
|
878
|
+
loaded: o,
|
|
879
879
|
total: l,
|
|
880
|
-
progress: l ?
|
|
880
|
+
progress: l ? o / l : void 0,
|
|
881
881
|
bytes: h,
|
|
882
882
|
rate: c || void 0,
|
|
883
|
-
estimated: c && l &&
|
|
884
|
-
event:
|
|
883
|
+
estimated: c && l && d ? (l - o) / c : void 0,
|
|
884
|
+
event: i,
|
|
885
885
|
lengthComputable: l != null,
|
|
886
886
|
[e ? "download" : "upload"]: !0
|
|
887
887
|
};
|
|
888
|
-
t(
|
|
888
|
+
t(m);
|
|
889
889
|
}, r);
|
|
890
890
|
}, wt = (t, e) => {
|
|
891
891
|
const r = t != null;
|
|
@@ -900,9 +900,9 @@ const De = (t, e, r = 3) => {
|
|
|
900
900
|
) : () => !0, In = ee.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(t, e, r, s, a,
|
|
904
|
-
const
|
|
905
|
-
p.isNumber(r) &&
|
|
903
|
+
write(t, e, r, s, a, i) {
|
|
904
|
+
const o = [t + "=" + encodeURIComponent(e)];
|
|
905
|
+
p.isNumber(r) && o.push("expires=" + new Date(r).toGMTString()), p.isString(s) && o.push("path=" + s), p.isString(a) && o.push("domain=" + a), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
906
906
|
},
|
|
907
907
|
read(t) {
|
|
908
908
|
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
@@ -938,166 +938,166 @@ const St = (t) => t instanceof ne ? { ...t } : t;
|
|
|
938
938
|
function he(t, e) {
|
|
939
939
|
e = e || {};
|
|
940
940
|
const r = {};
|
|
941
|
-
function s(c,
|
|
942
|
-
return p.isPlainObject(c) && p.isPlainObject(
|
|
941
|
+
function s(c, d, m, b) {
|
|
942
|
+
return p.isPlainObject(c) && p.isPlainObject(d) ? p.merge.call({ caseless: b }, c, d) : p.isPlainObject(d) ? p.merge({}, d) : p.isArray(d) ? d.slice() : d;
|
|
943
943
|
}
|
|
944
|
-
function a(c,
|
|
945
|
-
if (p.isUndefined(
|
|
944
|
+
function a(c, d, m, b) {
|
|
945
|
+
if (p.isUndefined(d)) {
|
|
946
946
|
if (!p.isUndefined(c))
|
|
947
|
-
return s(void 0, c,
|
|
948
|
-
} else return s(c,
|
|
947
|
+
return s(void 0, c, m, b);
|
|
948
|
+
} else return s(c, d, m, b);
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
if (!p.isUndefined(
|
|
952
|
-
return s(void 0,
|
|
950
|
+
function i(c, d) {
|
|
951
|
+
if (!p.isUndefined(d))
|
|
952
|
+
return s(void 0, d);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
955
|
-
if (p.isUndefined(
|
|
954
|
+
function o(c, d) {
|
|
955
|
+
if (p.isUndefined(d)) {
|
|
956
956
|
if (!p.isUndefined(c))
|
|
957
957
|
return s(void 0, c);
|
|
958
|
-
} else return s(void 0,
|
|
958
|
+
} else return s(void 0, d);
|
|
959
959
|
}
|
|
960
|
-
function l(c,
|
|
961
|
-
if (
|
|
962
|
-
return s(c,
|
|
963
|
-
if (
|
|
960
|
+
function l(c, d, m) {
|
|
961
|
+
if (m in e)
|
|
962
|
+
return s(c, d);
|
|
963
|
+
if (m in t)
|
|
964
964
|
return s(void 0, c);
|
|
965
965
|
}
|
|
966
966
|
const h = {
|
|
967
|
-
url:
|
|
968
|
-
method:
|
|
969
|
-
data:
|
|
970
|
-
baseURL:
|
|
971
|
-
transformRequest:
|
|
972
|
-
transformResponse:
|
|
973
|
-
paramsSerializer:
|
|
974
|
-
timeout:
|
|
975
|
-
timeoutMessage:
|
|
976
|
-
withCredentials:
|
|
977
|
-
withXSRFToken:
|
|
978
|
-
adapter:
|
|
979
|
-
responseType:
|
|
980
|
-
xsrfCookieName:
|
|
981
|
-
xsrfHeaderName:
|
|
982
|
-
onUploadProgress:
|
|
983
|
-
onDownloadProgress:
|
|
984
|
-
decompress:
|
|
985
|
-
maxContentLength:
|
|
986
|
-
maxBodyLength:
|
|
987
|
-
beforeRedirect:
|
|
988
|
-
transport:
|
|
989
|
-
httpAgent:
|
|
990
|
-
httpsAgent:
|
|
991
|
-
cancelToken:
|
|
992
|
-
socketPath:
|
|
993
|
-
responseEncoding:
|
|
967
|
+
url: i,
|
|
968
|
+
method: i,
|
|
969
|
+
data: i,
|
|
970
|
+
baseURL: o,
|
|
971
|
+
transformRequest: o,
|
|
972
|
+
transformResponse: o,
|
|
973
|
+
paramsSerializer: o,
|
|
974
|
+
timeout: o,
|
|
975
|
+
timeoutMessage: o,
|
|
976
|
+
withCredentials: o,
|
|
977
|
+
withXSRFToken: o,
|
|
978
|
+
adapter: o,
|
|
979
|
+
responseType: o,
|
|
980
|
+
xsrfCookieName: o,
|
|
981
|
+
xsrfHeaderName: o,
|
|
982
|
+
onUploadProgress: o,
|
|
983
|
+
onDownloadProgress: o,
|
|
984
|
+
decompress: o,
|
|
985
|
+
maxContentLength: o,
|
|
986
|
+
maxBodyLength: o,
|
|
987
|
+
beforeRedirect: o,
|
|
988
|
+
transport: o,
|
|
989
|
+
httpAgent: o,
|
|
990
|
+
httpsAgent: o,
|
|
991
|
+
cancelToken: o,
|
|
992
|
+
socketPath: o,
|
|
993
|
+
responseEncoding: o,
|
|
994
994
|
validateStatus: l,
|
|
995
|
-
headers: (c,
|
|
995
|
+
headers: (c, d, m) => a(St(c), St(d), m, !0)
|
|
996
996
|
};
|
|
997
|
-
return p.forEach(Object.keys({ ...t, ...e }), function(
|
|
998
|
-
const
|
|
999
|
-
p.isUndefined(b) &&
|
|
997
|
+
return p.forEach(Object.keys({ ...t, ...e }), function(d) {
|
|
998
|
+
const m = h[d] || a, b = m(t[d], e[d], d);
|
|
999
|
+
p.isUndefined(b) && m !== l || (r[d] = b);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
const tr = (t) => {
|
|
1003
1003
|
const e = he({}, t);
|
|
1004
|
-
let { data: r, withXSRFToken: s, xsrfHeaderName: a, xsrfCookieName:
|
|
1005
|
-
if (e.headers =
|
|
1004
|
+
let { data: r, withXSRFToken: s, xsrfHeaderName: a, xsrfCookieName: i, headers: o, auth: l } = e;
|
|
1005
|
+
if (e.headers = o = ne.from(o), e.url = Jt(er(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), l && o.set(
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
|
|
1008
1008
|
), p.isFormData(r)) {
|
|
1009
1009
|
if (ee.hasStandardBrowserEnv || ee.hasStandardBrowserWebWorkerEnv)
|
|
1010
|
-
|
|
1010
|
+
o.setContentType(void 0);
|
|
1011
1011
|
else if (p.isFunction(r.getHeaders)) {
|
|
1012
1012
|
const h = r.getHeaders(), c = ["content-type", "content-length"];
|
|
1013
|
-
Object.entries(h).forEach(([
|
|
1014
|
-
c.includes(
|
|
1013
|
+
Object.entries(h).forEach(([d, m]) => {
|
|
1014
|
+
c.includes(d.toLowerCase()) && o.set(d, m);
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
if (ee.hasStandardBrowserEnv && (s && p.isFunction(s) && (s = s(e)), s || s !== !1 && Rn(e.url))) {
|
|
1019
|
-
const h = a &&
|
|
1020
|
-
h &&
|
|
1019
|
+
const h = a && i && In.read(i);
|
|
1020
|
+
h && o.set(a, h);
|
|
1021
1021
|
}
|
|
1022
1022
|
return e;
|
|
1023
1023
|
}, An = typeof XMLHttpRequest < "u", zn = An && function(t) {
|
|
1024
1024
|
return new Promise(function(r, s) {
|
|
1025
1025
|
const a = tr(t);
|
|
1026
|
-
let
|
|
1027
|
-
const
|
|
1028
|
-
let { responseType: l, onUploadProgress: h, onDownloadProgress: c } = a,
|
|
1026
|
+
let i = a.data;
|
|
1027
|
+
const o = ne.from(a.headers).normalize();
|
|
1028
|
+
let { responseType: l, onUploadProgress: h, onDownloadProgress: c } = a, d, m, b, w, u;
|
|
1029
1029
|
function j() {
|
|
1030
|
-
w && w(),
|
|
1030
|
+
w && w(), u && u(), a.cancelToken && a.cancelToken.unsubscribe(d), a.signal && a.signal.removeEventListener("abort", d);
|
|
1031
1031
|
}
|
|
1032
|
-
let
|
|
1033
|
-
|
|
1032
|
+
let y = new XMLHttpRequest();
|
|
1033
|
+
y.open(a.method.toUpperCase(), a.url, !0), y.timeout = a.timeout;
|
|
1034
1034
|
function $() {
|
|
1035
|
-
if (!
|
|
1035
|
+
if (!y)
|
|
1036
1036
|
return;
|
|
1037
1037
|
const z = ne.from(
|
|
1038
|
-
"getAllResponseHeaders" in
|
|
1038
|
+
"getAllResponseHeaders" in y && y.getAllResponseHeaders()
|
|
1039
1039
|
), q = {
|
|
1040
|
-
data: !l || l === "text" || l === "json" ?
|
|
1041
|
-
status:
|
|
1042
|
-
statusText:
|
|
1040
|
+
data: !l || l === "text" || l === "json" ? y.responseText : y.response,
|
|
1041
|
+
status: y.status,
|
|
1042
|
+
statusText: y.statusText,
|
|
1043
1043
|
headers: z,
|
|
1044
1044
|
config: t,
|
|
1045
|
-
request:
|
|
1045
|
+
request: y
|
|
1046
1046
|
};
|
|
1047
1047
|
Qt(function(I) {
|
|
1048
1048
|
r(I), j();
|
|
1049
1049
|
}, function(I) {
|
|
1050
1050
|
s(I), j();
|
|
1051
|
-
}, q),
|
|
1051
|
+
}, q), y = null;
|
|
1052
1052
|
}
|
|
1053
|
-
"onloadend" in
|
|
1054
|
-
!
|
|
1055
|
-
},
|
|
1056
|
-
|
|
1057
|
-
},
|
|
1058
|
-
const q = C && C.message ? C.message : "Network Error", g = new L(q, L.ERR_NETWORK, t,
|
|
1059
|
-
g.event = C || null, s(g),
|
|
1060
|
-
},
|
|
1053
|
+
"onloadend" in y ? y.onloadend = $ : y.onreadystatechange = function() {
|
|
1054
|
+
!y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout($);
|
|
1055
|
+
}, y.onabort = function() {
|
|
1056
|
+
y && (s(new L("Request aborted", L.ECONNABORTED, t, y)), y = null);
|
|
1057
|
+
}, y.onerror = function(C) {
|
|
1058
|
+
const q = C && C.message ? C.message : "Network Error", g = new L(q, L.ERR_NETWORK, t, y);
|
|
1059
|
+
g.event = C || null, s(g), y = null;
|
|
1060
|
+
}, y.ontimeout = function() {
|
|
1061
1061
|
let C = a.timeout ? "timeout of " + a.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
1062
|
const q = a.transitional || Gt;
|
|
1063
1063
|
a.timeoutErrorMessage && (C = a.timeoutErrorMessage), s(new L(
|
|
1064
1064
|
C,
|
|
1065
1065
|
q.clarifyTimeoutError ? L.ETIMEDOUT : L.ECONNABORTED,
|
|
1066
1066
|
t,
|
|
1067
|
-
|
|
1068
|
-
)),
|
|
1069
|
-
},
|
|
1070
|
-
|
|
1071
|
-
}), p.isUndefined(a.withCredentials) || (
|
|
1072
|
-
|
|
1073
|
-
}, a.cancelToken && a.cancelToken.subscribe(
|
|
1067
|
+
y
|
|
1068
|
+
)), y = null;
|
|
1069
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in y && p.forEach(o.toJSON(), function(C, q) {
|
|
1070
|
+
y.setRequestHeader(q, C);
|
|
1071
|
+
}), p.isUndefined(a.withCredentials) || (y.withCredentials = !!a.withCredentials), l && l !== "json" && (y.responseType = a.responseType), c && ([b, u] = De(c, !0), y.addEventListener("progress", b)), h && y.upload && ([m, w] = De(h), y.upload.addEventListener("progress", m), y.upload.addEventListener("loadend", w)), (a.cancelToken || a.signal) && (d = (z) => {
|
|
1072
|
+
y && (s(!z || z.type ? new je(null, t, y) : z), y.abort(), y = null);
|
|
1073
|
+
}, a.cancelToken && a.cancelToken.subscribe(d), a.signal && (a.signal.aborted ? d() : a.signal.addEventListener("abort", d)));
|
|
1074
1074
|
const R = En(a.url);
|
|
1075
1075
|
if (R && ee.protocols.indexOf(R) === -1) {
|
|
1076
1076
|
s(new L("Unsupported protocol " + R + ":", L.ERR_BAD_REQUEST, t));
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
|
-
|
|
1079
|
+
y.send(i || null);
|
|
1080
1080
|
});
|
|
1081
1081
|
}, $n = (t, e) => {
|
|
1082
1082
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
1083
1083
|
if (e || r) {
|
|
1084
1084
|
let s = new AbortController(), a;
|
|
1085
|
-
const
|
|
1085
|
+
const i = function(c) {
|
|
1086
1086
|
if (!a) {
|
|
1087
1087
|
a = !0, l();
|
|
1088
|
-
const
|
|
1089
|
-
s.abort(
|
|
1088
|
+
const d = c instanceof Error ? c : this.reason;
|
|
1089
|
+
s.abort(d instanceof L ? d : new je(d instanceof Error ? d.message : d));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
|
-
let
|
|
1093
|
-
|
|
1092
|
+
let o = e && setTimeout(() => {
|
|
1093
|
+
o = null, i(new L(`timeout ${e} of ms exceeded`, L.ETIMEDOUT));
|
|
1094
1094
|
}, e);
|
|
1095
1095
|
const l = () => {
|
|
1096
|
-
t && (
|
|
1097
|
-
c.unsubscribe ? c.unsubscribe(
|
|
1096
|
+
t && (o && clearTimeout(o), o = null, t.forEach((c) => {
|
|
1097
|
+
c.unsubscribe ? c.unsubscribe(i) : c.removeEventListener("abort", i);
|
|
1098
1098
|
}), t = null);
|
|
1099
1099
|
};
|
|
1100
|
-
t.forEach((c) => c.addEventListener("abort",
|
|
1100
|
+
t.forEach((c) => c.addEventListener("abort", i));
|
|
1101
1101
|
const { signal: h } = s;
|
|
1102
1102
|
return h.unsubscribe = () => p.asap(l), h;
|
|
1103
1103
|
}
|
|
@@ -1131,23 +1131,23 @@ const tr = (t) => {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
}, vt = (t, e, r, s) => {
|
|
1133
1133
|
const a = Nn(t, e);
|
|
1134
|
-
let
|
|
1135
|
-
|
|
1134
|
+
let i = 0, o, l = (h) => {
|
|
1135
|
+
o || (o = !0, s && s(h));
|
|
1136
1136
|
};
|
|
1137
1137
|
return new ReadableStream({
|
|
1138
1138
|
async pull(h) {
|
|
1139
1139
|
try {
|
|
1140
|
-
const { done: c, value:
|
|
1140
|
+
const { done: c, value: d } = await a.next();
|
|
1141
1141
|
if (c) {
|
|
1142
1142
|
l(), h.close();
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
|
-
let
|
|
1145
|
+
let m = d.byteLength;
|
|
1146
1146
|
if (r) {
|
|
1147
|
-
let b =
|
|
1147
|
+
let b = i += m;
|
|
1148
1148
|
r(b);
|
|
1149
1149
|
}
|
|
1150
|
-
h.enqueue(new Uint8Array(
|
|
1150
|
+
h.enqueue(new Uint8Array(d));
|
|
1151
1151
|
} catch (c) {
|
|
1152
1152
|
throw l(c), c;
|
|
1153
1153
|
}
|
|
@@ -1174,52 +1174,52 @@ const tr = (t) => {
|
|
|
1174
1174
|
t = p.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
1176
|
}, Dn, t);
|
|
1177
|
-
const { fetch: e, Request: r, Response: s } = t, a = e ? Oe(e) : typeof fetch == "function",
|
|
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(Et), h = a && (typeof Ct == "function" ? /* @__PURE__ */ ((
|
|
1181
|
-
let
|
|
1180
|
+
const l = a && Oe(Et), h = a && (typeof Ct == "function" ? /* @__PURE__ */ ((u) => (j) => u.encode(j))(new Ct()) : async (u) => new Uint8Array(await new r(u).arrayBuffer())), c = i && l && Tt(() => {
|
|
1181
|
+
let u = !1;
|
|
1182
1182
|
const j = new r(ee.origin, {
|
|
1183
1183
|
body: new Et(),
|
|
1184
1184
|
method: "POST",
|
|
1185
1185
|
get duplex() {
|
|
1186
|
-
return
|
|
1186
|
+
return u = !0, "half";
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
|
-
return
|
|
1190
|
-
}),
|
|
1191
|
-
stream:
|
|
1189
|
+
return u && !j;
|
|
1190
|
+
}), d = o && l && Tt(() => p.isReadableStream(new s("").body)), m = {
|
|
1191
|
+
stream: d && ((u) => u.body)
|
|
1192
1192
|
};
|
|
1193
|
-
a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
1194
|
-
!
|
|
1195
|
-
let $ = j && j[
|
|
1193
|
+
a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
|
|
1194
|
+
!m[u] && (m[u] = (j, y) => {
|
|
1195
|
+
let $ = j && j[u];
|
|
1196
1196
|
if ($)
|
|
1197
1197
|
return $.call(j);
|
|
1198
|
-
throw new L(`Response type '${
|
|
1198
|
+
throw new L(`Response type '${u}' is not supported`, L.ERR_NOT_SUPPORT, y);
|
|
1199
1199
|
});
|
|
1200
1200
|
});
|
|
1201
|
-
const b = async (
|
|
1202
|
-
if (
|
|
1201
|
+
const b = async (u) => {
|
|
1202
|
+
if (u == null)
|
|
1203
1203
|
return 0;
|
|
1204
|
-
if (p.isBlob(
|
|
1205
|
-
return
|
|
1206
|
-
if (p.isSpecCompliantForm(
|
|
1204
|
+
if (p.isBlob(u))
|
|
1205
|
+
return u.size;
|
|
1206
|
+
if (p.isSpecCompliantForm(u))
|
|
1207
1207
|
return (await new r(ee.origin, {
|
|
1208
1208
|
method: "POST",
|
|
1209
|
-
body:
|
|
1209
|
+
body: u
|
|
1210
1210
|
}).arrayBuffer()).byteLength;
|
|
1211
|
-
if (p.isArrayBufferView(
|
|
1212
|
-
return
|
|
1213
|
-
if (p.isURLSearchParams(
|
|
1214
|
-
return (await h(
|
|
1215
|
-
}, w = async (
|
|
1216
|
-
const
|
|
1217
|
-
return
|
|
1211
|
+
if (p.isArrayBufferView(u) || p.isArrayBuffer(u))
|
|
1212
|
+
return u.byteLength;
|
|
1213
|
+
if (p.isURLSearchParams(u) && (u = u + ""), p.isString(u))
|
|
1214
|
+
return (await h(u)).byteLength;
|
|
1215
|
+
}, w = async (u, j) => {
|
|
1216
|
+
const y = p.toFiniteNumber(u.getContentLength());
|
|
1217
|
+
return y ?? b(j);
|
|
1218
1218
|
};
|
|
1219
|
-
return async (
|
|
1219
|
+
return async (u) => {
|
|
1220
1220
|
let {
|
|
1221
1221
|
url: j,
|
|
1222
|
-
method:
|
|
1222
|
+
method: y,
|
|
1223
1223
|
data: $,
|
|
1224
1224
|
signal: R,
|
|
1225
1225
|
cancelToken: z,
|
|
@@ -1230,7 +1230,7 @@ const tr = (t) => {
|
|
|
1230
1230
|
headers: S,
|
|
1231
1231
|
withCredentials: U = "same-origin",
|
|
1232
1232
|
fetchOptions: W
|
|
1233
|
-
} = tr(
|
|
1233
|
+
} = tr(u), F = e || fetch;
|
|
1234
1234
|
I = I ? (I + "").toLowerCase() : "text";
|
|
1235
1235
|
let V = $n([R, z && z.toAbortSignal()], C), Z = null;
|
|
1236
1236
|
const T = V && V.unsubscribe && (() => {
|
|
@@ -1238,7 +1238,7 @@ const tr = (t) => {
|
|
|
1238
1238
|
});
|
|
1239
1239
|
let J;
|
|
1240
1240
|
try {
|
|
1241
|
-
if (g && c &&
|
|
1241
|
+
if (g && c && y !== "get" && y !== "head" && (J = await w(S, $)) !== 0) {
|
|
1242
1242
|
let f = new r(j, {
|
|
1243
1243
|
method: "POST",
|
|
1244
1244
|
body: $,
|
|
@@ -1253,19 +1253,19 @@ const tr = (t) => {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
p.isString(U) || (U = U ? "include" : "omit");
|
|
1256
|
-
const A =
|
|
1256
|
+
const A = i && "credentials" in r.prototype, O = {
|
|
1257
1257
|
...W,
|
|
1258
1258
|
signal: V,
|
|
1259
|
-
method:
|
|
1259
|
+
method: y.toUpperCase(),
|
|
1260
1260
|
headers: S.normalize().toJSON(),
|
|
1261
1261
|
body: $,
|
|
1262
1262
|
duplex: "half",
|
|
1263
1263
|
credentials: A ? U : void 0
|
|
1264
1264
|
};
|
|
1265
|
-
Z =
|
|
1266
|
-
let K = await (
|
|
1267
|
-
const Q =
|
|
1268
|
-
if (
|
|
1265
|
+
Z = i && new r(j, O);
|
|
1266
|
+
let K = await (i ? F(Z, W) : F(j, O));
|
|
1267
|
+
const Q = d && (I === "stream" || I === "response");
|
|
1268
|
+
if (d && (q || Q && T)) {
|
|
1269
1269
|
const f = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((_) => {
|
|
1271
1271
|
f[_] = K[_];
|
|
@@ -1282,36 +1282,36 @@ const tr = (t) => {
|
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
1284
|
I = I || "text";
|
|
1285
|
-
let G = await
|
|
1285
|
+
let G = await m[p.findKey(m, I) || "text"](K, u);
|
|
1286
1286
|
return !Q && T && T(), await new Promise((f, v) => {
|
|
1287
1287
|
Qt(f, v, {
|
|
1288
1288
|
data: G,
|
|
1289
1289
|
headers: ne.from(K.headers),
|
|
1290
1290
|
status: K.status,
|
|
1291
1291
|
statusText: K.statusText,
|
|
1292
|
-
config:
|
|
1292
|
+
config: u,
|
|
1293
1293
|
request: Z
|
|
1294
1294
|
});
|
|
1295
1295
|
});
|
|
1296
1296
|
} catch (A) {
|
|
1297
1297
|
throw T && T(), A && A.name === "TypeError" && /Load failed|fetch/i.test(A.message) ? Object.assign(
|
|
1298
|
-
new L("Network Error", L.ERR_NETWORK,
|
|
1298
|
+
new L("Network Error", L.ERR_NETWORK, u, Z),
|
|
1299
1299
|
{
|
|
1300
1300
|
cause: A.cause || A
|
|
1301
1301
|
}
|
|
1302
|
-
) : L.from(A, A && A.code,
|
|
1302
|
+
) : L.from(A, A && A.code, u, Z);
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
1305
|
}, Fn = /* @__PURE__ */ new Map(), rr = (t) => {
|
|
1306
1306
|
let e = t ? t.env : {};
|
|
1307
|
-
const { fetch: r, Request: s, Response: a } = e,
|
|
1307
|
+
const { fetch: r, Request: s, Response: a } = e, i = [
|
|
1308
1308
|
s,
|
|
1309
1309
|
a,
|
|
1310
1310
|
r
|
|
1311
1311
|
];
|
|
1312
|
-
let
|
|
1312
|
+
let o = i.length, l = o, h, c, d = Fn;
|
|
1313
1313
|
for (; l--; )
|
|
1314
|
-
h =
|
|
1314
|
+
h = i[l], c = d.get(h), c === void 0 && d.set(h, c = l ? /* @__PURE__ */ new Map() : Ln(e)), d = c;
|
|
1315
1315
|
return c;
|
|
1316
1316
|
};
|
|
1317
1317
|
rr();
|
|
@@ -1336,23 +1336,23 @@ const Rt = (t) => `- ${t}`, qn = (t) => p.isFunction(t) || t === null || t === !
|
|
|
1336
1336
|
t = p.isArray(t) ? t : [t];
|
|
1337
1337
|
const { length: r } = t;
|
|
1338
1338
|
let s, a;
|
|
1339
|
-
const
|
|
1340
|
-
for (let
|
|
1341
|
-
s = t[
|
|
1339
|
+
const i = {};
|
|
1340
|
+
for (let o = 0; o < r; o++) {
|
|
1341
|
+
s = t[o];
|
|
1342
1342
|
let l;
|
|
1343
1343
|
if (a = s, !qn(s) && (a = tt[(l = String(s)).toLowerCase()], a === void 0))
|
|
1344
1344
|
throw new L(`Unknown adapter '${l}'`);
|
|
1345
1345
|
if (a && (p.isFunction(a) || (a = a.get(e))))
|
|
1346
1346
|
break;
|
|
1347
|
-
|
|
1347
|
+
i[l || "#" + o] = a;
|
|
1348
1348
|
}
|
|
1349
1349
|
if (!a) {
|
|
1350
|
-
const
|
|
1350
|
+
const o = Object.entries(i).map(
|
|
1351
1351
|
([h, c]) => `adapter ${h} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1352
1352
|
);
|
|
1353
|
-
let l = r ?
|
|
1354
|
-
` +
|
|
1355
|
-
`) : " " + Rt(
|
|
1353
|
+
let l = r ? o.length > 1 ? `since :
|
|
1354
|
+
` + o.map(Rt).join(`
|
|
1355
|
+
`) : " " + Rt(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"
|
|
@@ -1392,21 +1392,21 @@ const sr = "1.12.2", Be = {};
|
|
|
1392
1392
|
});
|
|
1393
1393
|
const Pt = {};
|
|
1394
1394
|
Be.transitional = function(e, r, s) {
|
|
1395
|
-
function a(
|
|
1396
|
-
return "[Axios v" + sr + "] Transitional option '" +
|
|
1395
|
+
function a(i, o) {
|
|
1396
|
+
return "[Axios v" + sr + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
|
1397
1397
|
}
|
|
1398
|
-
return (
|
|
1398
|
+
return (i, o, l) => {
|
|
1399
1399
|
if (e === !1)
|
|
1400
1400
|
throw new L(
|
|
1401
|
-
a(
|
|
1401
|
+
a(o, " has been removed" + (r ? " in " + r : "")),
|
|
1402
1402
|
L.ERR_DEPRECATED
|
|
1403
1403
|
);
|
|
1404
|
-
return r && !Pt[
|
|
1404
|
+
return r && !Pt[o] && (Pt[o] = !0, console.warn(
|
|
1405
1405
|
a(
|
|
1406
|
-
|
|
1406
|
+
o,
|
|
1407
1407
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1408
1408
|
)
|
|
1409
|
-
)), e ? e(
|
|
1409
|
+
)), e ? e(i, o, l) : !0;
|
|
1410
1410
|
};
|
|
1411
1411
|
};
|
|
1412
1412
|
Be.spelling = function(e) {
|
|
@@ -1418,21 +1418,21 @@ function Mn(t, e, r) {
|
|
|
1418
1418
|
const s = Object.keys(t);
|
|
1419
1419
|
let a = s.length;
|
|
1420
1420
|
for (; a-- > 0; ) {
|
|
1421
|
-
const
|
|
1422
|
-
if (
|
|
1423
|
-
const l = t[
|
|
1421
|
+
const i = s[a], o = e[i];
|
|
1422
|
+
if (o) {
|
|
1423
|
+
const l = t[i], h = l === void 0 || o(l, i, t);
|
|
1424
1424
|
if (h !== !0)
|
|
1425
|
-
throw new L("option " +
|
|
1425
|
+
throw new L("option " + i + " must be " + h, L.ERR_BAD_OPTION_VALUE);
|
|
1426
1426
|
continue;
|
|
1427
1427
|
}
|
|
1428
1428
|
if (r !== !0)
|
|
1429
|
-
throw new L("Unknown option " +
|
|
1429
|
+
throw new L("Unknown option " + i, L.ERR_BAD_OPTION);
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
const _e = {
|
|
1433
1433
|
assertOptions: Mn,
|
|
1434
1434
|
validators: Be
|
|
1435
|
-
},
|
|
1435
|
+
}, ie = _e.validators;
|
|
1436
1436
|
let xe = class {
|
|
1437
1437
|
constructor(e) {
|
|
1438
1438
|
this.defaults = e || {}, this.interceptors = {
|
|
@@ -1455,10 +1455,10 @@ let xe = class {
|
|
|
1455
1455
|
if (s instanceof Error) {
|
|
1456
1456
|
let a = {};
|
|
1457
1457
|
Error.captureStackTrace ? Error.captureStackTrace(a) : a = new Error();
|
|
1458
|
-
const
|
|
1458
|
+
const i = a.stack ? a.stack.replace(/^.+\n/, "") : "";
|
|
1459
1459
|
try {
|
|
1460
|
-
s.stack ?
|
|
1461
|
-
` +
|
|
1460
|
+
s.stack ? i && !String(s.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1461
|
+
` + i) : s.stack = i;
|
|
1462
1462
|
} catch {
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
@@ -1467,30 +1467,30 @@ let xe = class {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
_request(e, r) {
|
|
1469
1469
|
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = he(this.defaults, r);
|
|
1470
|
-
const { transitional: s, paramsSerializer: a, headers:
|
|
1470
|
+
const { transitional: s, paramsSerializer: a, headers: i } = r;
|
|
1471
1471
|
s !== void 0 && _e.assertOptions(s, {
|
|
1472
|
-
silentJSONParsing:
|
|
1473
|
-
forcedJSONParsing:
|
|
1474
|
-
clarifyTimeoutError:
|
|
1472
|
+
silentJSONParsing: ie.transitional(ie.boolean),
|
|
1473
|
+
forcedJSONParsing: ie.transitional(ie.boolean),
|
|
1474
|
+
clarifyTimeoutError: ie.transitional(ie.boolean)
|
|
1475
1475
|
}, !1), a != null && (p.isFunction(a) ? r.paramsSerializer = {
|
|
1476
1476
|
serialize: a
|
|
1477
1477
|
} : _e.assertOptions(a, {
|
|
1478
|
-
encode:
|
|
1479
|
-
serialize:
|
|
1478
|
+
encode: ie.function,
|
|
1479
|
+
serialize: ie.function
|
|
1480
1480
|
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), _e.assertOptions(r, {
|
|
1481
|
-
baseUrl:
|
|
1482
|
-
withXsrfToken:
|
|
1481
|
+
baseUrl: ie.spelling("baseURL"),
|
|
1482
|
+
withXsrfToken: ie.spelling("withXSRFToken")
|
|
1483
1483
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1484
|
-
let
|
|
1485
|
-
|
|
1486
|
-
|
|
1484
|
+
let o = i && p.merge(
|
|
1485
|
+
i.common,
|
|
1486
|
+
i[r.method]
|
|
1487
1487
|
);
|
|
1488
|
-
|
|
1488
|
+
i && p.forEach(
|
|
1489
1489
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1490
|
-
(
|
|
1491
|
-
delete
|
|
1490
|
+
(u) => {
|
|
1491
|
+
delete i[u];
|
|
1492
1492
|
}
|
|
1493
|
-
), r.headers = ne.concat(
|
|
1493
|
+
), r.headers = ne.concat(o, i);
|
|
1494
1494
|
const l = [];
|
|
1495
1495
|
let h = !0;
|
|
1496
1496
|
this.interceptors.request.forEach(function(j) {
|
|
@@ -1500,32 +1500,32 @@ let xe = class {
|
|
|
1500
1500
|
this.interceptors.response.forEach(function(j) {
|
|
1501
1501
|
c.push(j.fulfilled, j.rejected);
|
|
1502
1502
|
});
|
|
1503
|
-
let
|
|
1503
|
+
let d, m = 0, b;
|
|
1504
1504
|
if (!h) {
|
|
1505
|
-
const
|
|
1506
|
-
for (
|
|
1507
|
-
|
|
1508
|
-
return
|
|
1505
|
+
const u = [It.bind(this), void 0];
|
|
1506
|
+
for (u.unshift(...l), u.push(...c), b = u.length, d = Promise.resolve(r); m < b; )
|
|
1507
|
+
d = d.then(u[m++], u[m++]);
|
|
1508
|
+
return d;
|
|
1509
1509
|
}
|
|
1510
1510
|
b = l.length;
|
|
1511
1511
|
let w = r;
|
|
1512
|
-
for (;
|
|
1513
|
-
const
|
|
1512
|
+
for (; m < b; ) {
|
|
1513
|
+
const u = l[m++], j = l[m++];
|
|
1514
1514
|
try {
|
|
1515
|
-
w =
|
|
1516
|
-
} catch (
|
|
1517
|
-
j.call(this,
|
|
1515
|
+
w = u(w);
|
|
1516
|
+
} catch (y) {
|
|
1517
|
+
j.call(this, y);
|
|
1518
1518
|
break;
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
try {
|
|
1522
|
-
|
|
1523
|
-
} catch (
|
|
1524
|
-
return Promise.reject(
|
|
1522
|
+
d = It.call(this, w);
|
|
1523
|
+
} catch (u) {
|
|
1524
|
+
return Promise.reject(u);
|
|
1525
1525
|
}
|
|
1526
|
-
for (
|
|
1527
|
-
|
|
1528
|
-
return
|
|
1526
|
+
for (m = 0, b = c.length; m < b; )
|
|
1527
|
+
d = d.then(c[m++], c[m++]);
|
|
1528
|
+
return d;
|
|
1529
1529
|
}
|
|
1530
1530
|
getUri(e) {
|
|
1531
1531
|
e = he(this.defaults, e);
|
|
@@ -1544,14 +1544,14 @@ p.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1544
1544
|
});
|
|
1545
1545
|
p.forEach(["post", "put", "patch"], function(e) {
|
|
1546
1546
|
function r(s) {
|
|
1547
|
-
return function(
|
|
1547
|
+
return function(i, o, l) {
|
|
1548
1548
|
return this.request(he(l || {}, {
|
|
1549
1549
|
method: e,
|
|
1550
1550
|
headers: s ? {
|
|
1551
1551
|
"Content-Type": "multipart/form-data"
|
|
1552
1552
|
} : {},
|
|
1553
|
-
url:
|
|
1554
|
-
data:
|
|
1553
|
+
url: i,
|
|
1554
|
+
data: o
|
|
1555
1555
|
}));
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
@@ -1562,26 +1562,26 @@ let Wn = class ar {
|
|
|
1562
1562
|
if (typeof e != "function")
|
|
1563
1563
|
throw new TypeError("executor must be a function.");
|
|
1564
1564
|
let r;
|
|
1565
|
-
this.promise = new Promise(function(
|
|
1566
|
-
r =
|
|
1565
|
+
this.promise = new Promise(function(i) {
|
|
1566
|
+
r = i;
|
|
1567
1567
|
});
|
|
1568
1568
|
const s = this;
|
|
1569
1569
|
this.promise.then((a) => {
|
|
1570
1570
|
if (!s._listeners) return;
|
|
1571
|
-
let
|
|
1572
|
-
for (;
|
|
1573
|
-
s._listeners[
|
|
1571
|
+
let i = s._listeners.length;
|
|
1572
|
+
for (; i-- > 0; )
|
|
1573
|
+
s._listeners[i](a);
|
|
1574
1574
|
s._listeners = null;
|
|
1575
1575
|
}), this.promise.then = (a) => {
|
|
1576
|
-
let
|
|
1577
|
-
const
|
|
1578
|
-
s.subscribe(l),
|
|
1576
|
+
let i;
|
|
1577
|
+
const o = new Promise((l) => {
|
|
1578
|
+
s.subscribe(l), i = l;
|
|
1579
1579
|
}).then(a);
|
|
1580
|
-
return
|
|
1581
|
-
s.unsubscribe(
|
|
1582
|
-
},
|
|
1583
|
-
}, e(function(
|
|
1584
|
-
s.reason || (s.reason = new je(
|
|
1580
|
+
return o.cancel = function() {
|
|
1581
|
+
s.unsubscribe(i);
|
|
1582
|
+
}, o;
|
|
1583
|
+
}, e(function(i, o, l) {
|
|
1584
|
+
s.reason || (s.reason = new je(i, o, l), r(s.reason));
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
1587
|
/**
|
|
@@ -1706,13 +1706,13 @@ const rt = {
|
|
|
1706
1706
|
Object.entries(rt).forEach(([t, e]) => {
|
|
1707
1707
|
rt[e] = t;
|
|
1708
1708
|
});
|
|
1709
|
-
function
|
|
1709
|
+
function or(t) {
|
|
1710
1710
|
const e = new xe(t), r = Ut(xe.prototype.request, e);
|
|
1711
1711
|
return p.extend(r, xe.prototype, e, { allOwnKeys: !0 }), p.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(a) {
|
|
1712
|
-
return
|
|
1712
|
+
return or(he(t, a));
|
|
1713
1713
|
}, r;
|
|
1714
1714
|
}
|
|
1715
|
-
const M =
|
|
1715
|
+
const M = or(Ie);
|
|
1716
1716
|
M.Axios = xe;
|
|
1717
1717
|
M.CanceledError = je;
|
|
1718
1718
|
M.CancelToken = Wn;
|
|
@@ -1741,8 +1741,8 @@ const {
|
|
|
1741
1741
|
VERSION: na,
|
|
1742
1742
|
all: sa,
|
|
1743
1743
|
Cancel: aa,
|
|
1744
|
-
isAxiosError:
|
|
1745
|
-
spread:
|
|
1744
|
+
isAxiosError: oa,
|
|
1745
|
+
spread: ia,
|
|
1746
1746
|
toFormData: la,
|
|
1747
1747
|
AxiosHeaders: da,
|
|
1748
1748
|
HttpStatusCode: ca,
|
|
@@ -1785,22 +1785,22 @@ class xa {
|
|
|
1785
1785
|
if (!e) throw new Error("HTTP method is required");
|
|
1786
1786
|
if (!r) throw new Error("Request path is required");
|
|
1787
1787
|
try {
|
|
1788
|
-
const
|
|
1788
|
+
const i = {
|
|
1789
1789
|
...this.appId ? { appId: this.appId } : {},
|
|
1790
1790
|
...s || {}
|
|
1791
1791
|
};
|
|
1792
1792
|
return (await this.client.request({
|
|
1793
1793
|
url: r,
|
|
1794
1794
|
method: e,
|
|
1795
|
-
data:
|
|
1795
|
+
data: i,
|
|
1796
1796
|
headers: a
|
|
1797
1797
|
})).data;
|
|
1798
|
-
} catch (
|
|
1799
|
-
if (console.error("❌ [Request Error]:",
|
|
1800
|
-
const
|
|
1801
|
-
throw new Error(`Request failed (${
|
|
1798
|
+
} catch (i) {
|
|
1799
|
+
if (console.error("❌ [Request Error]:", i), i.isAxiosError) {
|
|
1800
|
+
const o = i.response?.status || 0, l = i.response?.data?.message || i.message || "Unknown Axios error occurred";
|
|
1801
|
+
throw new Error(`Request failed (${o}): ${l}`);
|
|
1802
1802
|
}
|
|
1803
|
-
throw new Error(`Unexpected error: ${
|
|
1803
|
+
throw new Error(`Unexpected error: ${i.message || "Unknown failure"}`);
|
|
1804
1804
|
}
|
|
1805
1805
|
}
|
|
1806
1806
|
// ================= USERS =================
|
|
@@ -1858,7 +1858,7 @@ class xa {
|
|
|
1858
1858
|
* @param params requires userId, currentPassword, newPassword
|
|
1859
1859
|
*/
|
|
1860
1860
|
async changePassword(e) {
|
|
1861
|
-
const { userId: r, currentPassword: s, newPassword: a, appId:
|
|
1861
|
+
const { userId: r, currentPassword: s, newPassword: a, appId: i } = e;
|
|
1862
1862
|
if (!r) throw new Error("changePassword: 'userId' is required");
|
|
1863
1863
|
if (!s || !a)
|
|
1864
1864
|
throw new Error(
|
|
@@ -1867,7 +1867,7 @@ class xa {
|
|
|
1867
1867
|
return this.request("PUT", `/users/change-password/${r}`, {
|
|
1868
1868
|
currentPassword: s,
|
|
1869
1869
|
newPassword: a,
|
|
1870
|
-
appId:
|
|
1870
|
+
appId: i || this.appId
|
|
1871
1871
|
});
|
|
1872
1872
|
}
|
|
1873
1873
|
/**
|
|
@@ -1942,7 +1942,7 @@ class xa {
|
|
|
1942
1942
|
* @param params requires email, otp, newPassword
|
|
1943
1943
|
*/
|
|
1944
1944
|
async resetPassword(e) {
|
|
1945
|
-
const { email: r, otp: s, newPassword: a, appId:
|
|
1945
|
+
const { email: r, otp: s, newPassword: a, appId: i } = e;
|
|
1946
1946
|
if (!r || !s || !a)
|
|
1947
1947
|
throw new Error(
|
|
1948
1948
|
"resetPassword: 'email', 'otp' and 'newPassword' are required"
|
|
@@ -1951,7 +1951,7 @@ class xa {
|
|
|
1951
1951
|
email: r,
|
|
1952
1952
|
otp: s,
|
|
1953
1953
|
newPassword: a,
|
|
1954
|
-
appId:
|
|
1954
|
+
appId: i || this.appId
|
|
1955
1955
|
});
|
|
1956
1956
|
}
|
|
1957
1957
|
/**
|
|
@@ -1998,7 +1998,7 @@ class xa {
|
|
|
1998
1998
|
throw new Error("searchUserDataByKeys: 'userId' is required");
|
|
1999
1999
|
const a = new URLSearchParams(
|
|
2000
2000
|
Object.entries(s).reduce(
|
|
2001
|
-
(
|
|
2001
|
+
(i, [o, l]) => (l != null && (i[o] = String(l)), i),
|
|
2002
2002
|
{}
|
|
2003
2003
|
)
|
|
2004
2004
|
).toString();
|
|
@@ -2023,7 +2023,7 @@ class xa {
|
|
|
2023
2023
|
);
|
|
2024
2024
|
const s = new URLSearchParams(
|
|
2025
2025
|
Object.entries(e).reduce(
|
|
2026
|
-
(a, [
|
|
2026
|
+
(a, [i, o]) => (o != null && (a[i] = String(o)), a),
|
|
2027
2027
|
{}
|
|
2028
2028
|
)
|
|
2029
2029
|
).toString();
|
|
@@ -2210,19 +2210,19 @@ function Vn() {
|
|
|
2210
2210
|
if (Ot) return ke;
|
|
2211
2211
|
Ot = 1;
|
|
2212
2212
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
2213
|
-
function r(s, a,
|
|
2214
|
-
var
|
|
2215
|
-
if (
|
|
2216
|
-
|
|
2213
|
+
function r(s, a, i) {
|
|
2214
|
+
var o = null;
|
|
2215
|
+
if (i !== void 0 && (o = "" + i), a.key !== void 0 && (o = "" + a.key), "key" in a) {
|
|
2216
|
+
i = {};
|
|
2217
2217
|
for (var l in a)
|
|
2218
|
-
l !== "key" && (
|
|
2219
|
-
} else
|
|
2220
|
-
return a =
|
|
2218
|
+
l !== "key" && (i[l] = a[l]);
|
|
2219
|
+
} else i = a;
|
|
2220
|
+
return a = i.ref, {
|
|
2221
2221
|
$$typeof: t,
|
|
2222
2222
|
type: s,
|
|
2223
|
-
key:
|
|
2223
|
+
key: o,
|
|
2224
2224
|
ref: a !== void 0 ? a : null,
|
|
2225
|
-
props:
|
|
2225
|
+
props: i
|
|
2226
2226
|
};
|
|
2227
2227
|
}
|
|
2228
2228
|
return ke.Fragment = e, ke.jsx = r, ke.jsxs = r, ke;
|
|
@@ -2246,7 +2246,7 @@ function Yn() {
|
|
|
2246
2246
|
return f.$$typeof === F ? null : f.displayName || f.name || null;
|
|
2247
2247
|
if (typeof f == "string") return f;
|
|
2248
2248
|
switch (f) {
|
|
2249
|
-
case
|
|
2249
|
+
case y:
|
|
2250
2250
|
return "Fragment";
|
|
2251
2251
|
case R:
|
|
2252
2252
|
return "Profiler";
|
|
@@ -2304,7 +2304,7 @@ function Yn() {
|
|
|
2304
2304
|
}
|
|
2305
2305
|
}
|
|
2306
2306
|
function s(f) {
|
|
2307
|
-
if (f ===
|
|
2307
|
+
if (f === y) return "<>";
|
|
2308
2308
|
if (typeof f == "object" && f !== null && f.$$typeof === U)
|
|
2309
2309
|
return "<...>";
|
|
2310
2310
|
try {
|
|
@@ -2318,10 +2318,10 @@ function Yn() {
|
|
|
2318
2318
|
var f = V.A;
|
|
2319
2319
|
return f === null ? null : f.getOwner();
|
|
2320
2320
|
}
|
|
2321
|
-
function
|
|
2321
|
+
function i() {
|
|
2322
2322
|
return Error("react-stack-top-frame");
|
|
2323
2323
|
}
|
|
2324
|
-
function
|
|
2324
|
+
function o(f) {
|
|
2325
2325
|
if (Z.call(f, "key")) {
|
|
2326
2326
|
var v = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
2327
2327
|
if (v && v.isReactWarning) return !1;
|
|
@@ -2349,7 +2349,7 @@ function Yn() {
|
|
|
2349
2349
|
function c(f, v, x, k, _, N) {
|
|
2350
2350
|
var Y = x.ref;
|
|
2351
2351
|
return f = {
|
|
2352
|
-
$$typeof:
|
|
2352
|
+
$$typeof: u,
|
|
2353
2353
|
type: f,
|
|
2354
2354
|
key: v,
|
|
2355
2355
|
props: x,
|
|
@@ -2379,19 +2379,19 @@ function Yn() {
|
|
|
2379
2379
|
value: N
|
|
2380
2380
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2382
|
+
function d(f, v, x, k, _, N) {
|
|
2383
2383
|
var Y = v.children;
|
|
2384
2384
|
if (Y !== void 0)
|
|
2385
2385
|
if (k)
|
|
2386
2386
|
if (T(Y)) {
|
|
2387
2387
|
for (k = 0; k < Y.length; k++)
|
|
2388
|
-
|
|
2388
|
+
m(Y[k]);
|
|
2389
2389
|
Object.freeze && Object.freeze(Y);
|
|
2390
2390
|
} else
|
|
2391
2391
|
console.error(
|
|
2392
2392
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
2393
2393
|
);
|
|
2394
|
-
else
|
|
2394
|
+
else m(Y);
|
|
2395
2395
|
if (Z.call(v, "key")) {
|
|
2396
2396
|
Y = t(f);
|
|
2397
2397
|
var se = Object.keys(v).filter(function(Se) {
|
|
@@ -2410,7 +2410,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2410
2410
|
Y
|
|
2411
2411
|
), G[Y + k] = !0);
|
|
2412
2412
|
}
|
|
2413
|
-
if (Y = null, x !== void 0 && (r(x), Y = "" + x),
|
|
2413
|
+
if (Y = null, x !== void 0 && (r(x), Y = "" + x), o(v) && (r(v.key), Y = "" + v.key), "key" in v) {
|
|
2414
2414
|
x = {};
|
|
2415
2415
|
for (var ue in v)
|
|
2416
2416
|
ue !== "key" && (x[ue] = v[ue]);
|
|
@@ -2427,13 +2427,13 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2427
2427
|
N
|
|
2428
2428
|
);
|
|
2429
2429
|
}
|
|
2430
|
-
function
|
|
2430
|
+
function m(f) {
|
|
2431
2431
|
b(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === U && (f._payload.status === "fulfilled" ? b(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
|
|
2432
2432
|
}
|
|
2433
2433
|
function b(f) {
|
|
2434
|
-
return typeof f == "object" && f !== null && f.$$typeof ===
|
|
2434
|
+
return typeof f == "object" && f !== null && f.$$typeof === u;
|
|
2435
2435
|
}
|
|
2436
|
-
var w = Le,
|
|
2436
|
+
var w = Le, u = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), R = 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"), I = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), W = 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() {
|
|
2437
2437
|
return null;
|
|
2438
2438
|
};
|
|
2439
2439
|
w = {
|
|
@@ -2443,11 +2443,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2443
2443
|
};
|
|
2444
2444
|
var A, O = {}, K = w.react_stack_bottom_frame.bind(
|
|
2445
2445
|
w,
|
|
2446
|
-
|
|
2447
|
-
)(), Q = J(s(
|
|
2448
|
-
Ee.Fragment =
|
|
2446
|
+
i
|
|
2447
|
+
)(), Q = J(s(i)), G = {};
|
|
2448
|
+
Ee.Fragment = y, Ee.jsx = function(f, v, x) {
|
|
2449
2449
|
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2450
|
-
return
|
|
2450
|
+
return d(
|
|
2451
2451
|
f,
|
|
2452
2452
|
v,
|
|
2453
2453
|
x,
|
|
@@ -2457,7 +2457,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2457
2457
|
);
|
|
2458
2458
|
}, Ee.jsxs = function(f, v, x) {
|
|
2459
2459
|
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2460
|
-
return
|
|
2460
|
+
return d(
|
|
2461
2461
|
f,
|
|
2462
2462
|
v,
|
|
2463
2463
|
x,
|
|
@@ -2474,24 +2474,24 @@ function Kn() {
|
|
|
2474
2474
|
}
|
|
2475
2475
|
var n = Kn();
|
|
2476
2476
|
const Jn = async (t, e) => {
|
|
2477
|
-
const { name: r, email: s, password: a, appId:
|
|
2477
|
+
const { name: r, email: s, password: a, appId: i, phone: o, address: l, avatarUrl: h, isActive: c = !0, role: d = "user" } = t, { baseUrl: m, apiKey: b } = e;
|
|
2478
2478
|
if (!b)
|
|
2479
2479
|
throw new Error("API key is required for signup");
|
|
2480
|
-
if (!r || !s || !a || !
|
|
2480
|
+
if (!r || !s || !a || !i)
|
|
2481
2481
|
throw new Error("Name, email, password, and appId are required");
|
|
2482
2482
|
try {
|
|
2483
2483
|
const w = await M.post(
|
|
2484
|
-
`${
|
|
2484
|
+
`${m}/users/signup`,
|
|
2485
2485
|
{
|
|
2486
2486
|
name: r,
|
|
2487
2487
|
email: s,
|
|
2488
2488
|
password: a,
|
|
2489
|
-
appId:
|
|
2490
|
-
phone:
|
|
2489
|
+
appId: i,
|
|
2490
|
+
phone: o,
|
|
2491
2491
|
address: l,
|
|
2492
2492
|
avatarUrl: h,
|
|
2493
2493
|
isActive: c,
|
|
2494
|
-
role:
|
|
2494
|
+
role: d
|
|
2495
2495
|
},
|
|
2496
2496
|
{
|
|
2497
2497
|
headers: {
|
|
@@ -2502,15 +2502,15 @@ const Jn = async (t, e) => {
|
|
|
2502
2502
|
);
|
|
2503
2503
|
return w.data?.user && localStorage.setItem("userInfo", JSON.stringify(w.data.user)), w.data.user;
|
|
2504
2504
|
} catch (w) {
|
|
2505
|
-
const
|
|
2506
|
-
if (console.error("Signup API Error:",
|
|
2507
|
-
if (
|
|
2505
|
+
const u = w.response?.data?.message || w.message || "Signup failed";
|
|
2506
|
+
if (console.error("Signup API Error:", u), w.response?.status === 400) {
|
|
2507
|
+
if (u.includes("already exists"))
|
|
2508
2508
|
throw {
|
|
2509
2509
|
success: !1,
|
|
2510
2510
|
message: "User with this email already exists for this app",
|
|
2511
2511
|
status: 400
|
|
2512
2512
|
};
|
|
2513
|
-
if (
|
|
2513
|
+
if (u.includes("inactive"))
|
|
2514
2514
|
throw {
|
|
2515
2515
|
success: !1,
|
|
2516
2516
|
message: "Cannot signup under an inactive app",
|
|
@@ -2523,7 +2523,7 @@ const Jn = async (t, e) => {
|
|
|
2523
2523
|
status: 404
|
|
2524
2524
|
} : {
|
|
2525
2525
|
success: !1,
|
|
2526
|
-
message:
|
|
2526
|
+
message: u,
|
|
2527
2527
|
status: w.response?.status || 500
|
|
2528
2528
|
};
|
|
2529
2529
|
}
|
|
@@ -2540,7 +2540,7 @@ const Gn = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Xn = (
|
|
|
2540
2540
|
), $t = (t) => {
|
|
2541
2541
|
const e = Xn(t);
|
|
2542
2542
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2543
|
-
},
|
|
2543
|
+
}, ir = (...t) => t.filter((e, r, s) => !!e && e.trim() !== "" && s.indexOf(e) === r).join(" ").trim(), Zn = (t) => {
|
|
2544
2544
|
for (const e in t)
|
|
2545
2545
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
2546
2546
|
return !0;
|
|
@@ -2575,8 +2575,8 @@ const es = Nt(
|
|
|
2575
2575
|
strokeWidth: r = 2,
|
|
2576
2576
|
absoluteStrokeWidth: s,
|
|
2577
2577
|
className: a = "",
|
|
2578
|
-
children:
|
|
2579
|
-
iconNode:
|
|
2578
|
+
children: i,
|
|
2579
|
+
iconNode: o,
|
|
2580
2580
|
...l
|
|
2581
2581
|
}, h) => Xe(
|
|
2582
2582
|
"svg",
|
|
@@ -2587,13 +2587,13 @@ const es = Nt(
|
|
|
2587
2587
|
height: e,
|
|
2588
2588
|
stroke: t,
|
|
2589
2589
|
strokeWidth: s ? Number(r) * 24 / Number(e) : r,
|
|
2590
|
-
className:
|
|
2591
|
-
...!
|
|
2590
|
+
className: ir("lucide", a),
|
|
2591
|
+
...!i && !Zn(l) && { "aria-hidden": "true" },
|
|
2592
2592
|
...l
|
|
2593
2593
|
},
|
|
2594
2594
|
[
|
|
2595
|
-
...
|
|
2596
|
-
...Array.isArray(
|
|
2595
|
+
...o.map(([c, d]) => Xe(c, d)),
|
|
2596
|
+
...Array.isArray(i) ? i : [i]
|
|
2597
2597
|
]
|
|
2598
2598
|
)
|
|
2599
2599
|
);
|
|
@@ -2605,10 +2605,10 @@ const es = Nt(
|
|
|
2605
2605
|
*/
|
|
2606
2606
|
const B = (t, e) => {
|
|
2607
2607
|
const r = Nt(
|
|
2608
|
-
({ className: s, ...a },
|
|
2609
|
-
ref:
|
|
2608
|
+
({ className: s, ...a }, i) => Xe(es, {
|
|
2609
|
+
ref: i,
|
|
2610
2610
|
iconNode: e,
|
|
2611
|
-
className:
|
|
2611
|
+
className: ir(
|
|
2612
2612
|
`lucide-${Gn($t(t))}`,
|
|
2613
2613
|
`lucide-${t}`,
|
|
2614
2614
|
s
|
|
@@ -2668,21 +2668,21 @@ const as = [
|
|
|
2668
2668
|
* This source code is licensed under the ISC license.
|
|
2669
2669
|
* See the LICENSE file in the root directory of this source tree.
|
|
2670
2670
|
*/
|
|
2671
|
-
const
|
|
2671
|
+
const os = [
|
|
2672
2672
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2673
2673
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2674
|
-
], Ge = B("circle-check",
|
|
2674
|
+
], Ge = B("circle-check", os);
|
|
2675
2675
|
/**
|
|
2676
2676
|
* @license lucide-react v0.544.0 - ISC
|
|
2677
2677
|
*
|
|
2678
2678
|
* This source code is licensed under the ISC license.
|
|
2679
2679
|
* See the LICENSE file in the root directory of this source tree.
|
|
2680
2680
|
*/
|
|
2681
|
-
const
|
|
2681
|
+
const is = [
|
|
2682
2682
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
2683
2683
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
2684
2684
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
2685
|
-
], ls = B("database",
|
|
2685
|
+
], ls = B("database", is);
|
|
2686
2686
|
/**
|
|
2687
2687
|
* @license lucide-react v0.544.0 - ISC
|
|
2688
2688
|
*
|
|
@@ -2717,7 +2717,7 @@ const us = [
|
|
|
2717
2717
|
}
|
|
2718
2718
|
],
|
|
2719
2719
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
2720
|
-
],
|
|
2720
|
+
], it = B("eye-off", us);
|
|
2721
2721
|
/**
|
|
2722
2722
|
* @license lucide-react v0.544.0 - ISC
|
|
2723
2723
|
*
|
|
@@ -3039,20 +3039,20 @@ const Ws = [
|
|
|
3039
3039
|
title: r = "Create Your Account",
|
|
3040
3040
|
subtitle: s = "Join our platform today",
|
|
3041
3041
|
footerText: a = "Secure authentication powered by Neuctra Authix",
|
|
3042
|
-
primaryColor:
|
|
3043
|
-
gradient:
|
|
3042
|
+
primaryColor: i = "#00C214",
|
|
3043
|
+
gradient: o = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3044
3044
|
darkMode: l = !0,
|
|
3045
3045
|
// Only avatar is optional
|
|
3046
3046
|
showAvatar: h = !1,
|
|
3047
3047
|
roles: c = [],
|
|
3048
3048
|
// 🔥 FIXED
|
|
3049
|
-
showRoleSelector:
|
|
3049
|
+
showRoleSelector: d = !1,
|
|
3050
3050
|
// 🔥 FIXED
|
|
3051
|
-
loginUrl:
|
|
3051
|
+
loginUrl: m,
|
|
3052
3052
|
onSuccess: b,
|
|
3053
3053
|
onError: w
|
|
3054
3054
|
}) => {
|
|
3055
|
-
const { baseUrl:
|
|
3055
|
+
const { baseUrl: u, apiKey: j, appId: y } = ge(), $ = {
|
|
3056
3056
|
name: "",
|
|
3057
3057
|
email: "",
|
|
3058
3058
|
password: "",
|
|
@@ -3077,8 +3077,8 @@ const Ws = [
|
|
|
3077
3077
|
try {
|
|
3078
3078
|
const x = {
|
|
3079
3079
|
...R,
|
|
3080
|
-
appId:
|
|
3081
|
-
}, k = await Jn(x, { baseUrl:
|
|
3080
|
+
appId: y
|
|
3081
|
+
}, k = await Jn(x, { baseUrl: u, apiKey: j });
|
|
3082
3082
|
U({ type: "success", text: "Account created successfully!" }), b && b(k);
|
|
3083
3083
|
} catch (x) {
|
|
3084
3084
|
const k = x.message || "Signup failed. Please try again.";
|
|
@@ -3152,7 +3152,7 @@ const Ws = [
|
|
|
3152
3152
|
be,
|
|
3153
3153
|
{
|
|
3154
3154
|
size: 40,
|
|
3155
|
-
color:
|
|
3155
|
+
color: i,
|
|
3156
3156
|
style: { marginBottom: "10px" }
|
|
3157
3157
|
}
|
|
3158
3158
|
),
|
|
@@ -3199,7 +3199,7 @@ const Ws = [
|
|
|
3199
3199
|
height: "60px",
|
|
3200
3200
|
borderRadius: "50%",
|
|
3201
3201
|
objectFit: "cover",
|
|
3202
|
-
border: `2px solid ${
|
|
3202
|
+
border: `2px solid ${i}30`
|
|
3203
3203
|
},
|
|
3204
3204
|
onError: (v) => {
|
|
3205
3205
|
const x = v.target;
|
|
@@ -3215,7 +3215,7 @@ const Ws = [
|
|
|
3215
3215
|
onSubmit: G,
|
|
3216
3216
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3217
3217
|
children: [
|
|
3218
|
-
|
|
3218
|
+
d && c && c.length === 2 && /* @__PURE__ */ n.jsxs(
|
|
3219
3219
|
"div",
|
|
3220
3220
|
{
|
|
3221
3221
|
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
@@ -3275,7 +3275,7 @@ const Ws = [
|
|
|
3275
3275
|
zIndex: 10,
|
|
3276
3276
|
border: "none",
|
|
3277
3277
|
background: "transparent",
|
|
3278
|
-
color: R.role === c[0] ?
|
|
3278
|
+
color: R.role === c[0] ? i : l ? "#9ca3af" : "#6b7280",
|
|
3279
3279
|
// theme-aware inactive color
|
|
3280
3280
|
fontWeight: R.role === c[0] ? 600 : 500,
|
|
3281
3281
|
fontSize: "14px",
|
|
@@ -3297,7 +3297,7 @@ const Ws = [
|
|
|
3297
3297
|
zIndex: 10,
|
|
3298
3298
|
border: "none",
|
|
3299
3299
|
background: "transparent",
|
|
3300
|
-
color: R.role === c[1] ?
|
|
3300
|
+
color: R.role === c[1] ? i : l ? "#9ca3af" : "#6b7280",
|
|
3301
3301
|
fontWeight: R.role === c[1] ? 600 : 500,
|
|
3302
3302
|
fontSize: "14px",
|
|
3303
3303
|
display: "flex",
|
|
@@ -3482,7 +3482,7 @@ const Ws = [
|
|
|
3482
3482
|
cursor: "pointer",
|
|
3483
3483
|
padding: "4px"
|
|
3484
3484
|
},
|
|
3485
|
-
children: C ? /* @__PURE__ */ n.jsx(
|
|
3485
|
+
children: C ? /* @__PURE__ */ n.jsx(it, { size: 20 }) : /* @__PURE__ */ n.jsx(lt, { size: 20 })
|
|
3486
3486
|
}
|
|
3487
3487
|
)
|
|
3488
3488
|
] }),
|
|
@@ -3545,7 +3545,7 @@ const Ws = [
|
|
|
3545
3545
|
]
|
|
3546
3546
|
}
|
|
3547
3547
|
),
|
|
3548
|
-
|
|
3548
|
+
m && /* @__PURE__ */ n.jsx(
|
|
3549
3549
|
"div",
|
|
3550
3550
|
{
|
|
3551
3551
|
style: {
|
|
@@ -3556,9 +3556,9 @@ const Ws = [
|
|
|
3556
3556
|
children: /* @__PURE__ */ n.jsx(
|
|
3557
3557
|
"a",
|
|
3558
3558
|
{
|
|
3559
|
-
href:
|
|
3559
|
+
href: m,
|
|
3560
3560
|
style: {
|
|
3561
|
-
color:
|
|
3561
|
+
color: i,
|
|
3562
3562
|
textDecoration: "none",
|
|
3563
3563
|
fontWeight: 500
|
|
3564
3564
|
},
|
|
@@ -3577,9 +3577,9 @@ const Ws = [
|
|
|
3577
3577
|
display: "flex",
|
|
3578
3578
|
alignItems: "start",
|
|
3579
3579
|
gap: "10px",
|
|
3580
|
-
backgroundColor: S.type === "success" ? `${
|
|
3581
|
-
border: S.type === "success" ? `1px solid ${
|
|
3582
|
-
color: S.type === "success" ?
|
|
3580
|
+
backgroundColor: S.type === "success" ? `${i}15` : "rgba(239,68,68,0.1)",
|
|
3581
|
+
border: S.type === "success" ? `1px solid ${i}30` : "1px solid rgba(239,68,68,0.3)",
|
|
3582
|
+
color: S.type === "success" ? i : "#ef4444"
|
|
3583
3583
|
},
|
|
3584
3584
|
children: [
|
|
3585
3585
|
S.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20 }) : /* @__PURE__ */ n.jsx(le, { size: 20 }),
|
|
@@ -3594,7 +3594,7 @@ const Ws = [
|
|
|
3594
3594
|
disabled: g,
|
|
3595
3595
|
style: {
|
|
3596
3596
|
padding: "12px",
|
|
3597
|
-
background:
|
|
3597
|
+
background: o,
|
|
3598
3598
|
color: "#fff",
|
|
3599
3599
|
border: "none",
|
|
3600
3600
|
borderRadius: "10px",
|
|
@@ -3635,7 +3635,7 @@ const Ws = [
|
|
|
3635
3635
|
children: [
|
|
3636
3636
|
"Secure authentication powered by",
|
|
3637
3637
|
" ",
|
|
3638
|
-
/* @__PURE__ */ n.jsx("span", { style: { color:
|
|
3638
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: i, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
3639
3639
|
]
|
|
3640
3640
|
}
|
|
3641
3641
|
)
|
|
@@ -3652,12 +3652,12 @@ const Ws = [
|
|
|
3652
3652
|
}
|
|
3653
3653
|
);
|
|
3654
3654
|
}, Bs = async (t, e) => {
|
|
3655
|
-
const { email: r, password: s, appId: a } = t, { baseUrl:
|
|
3656
|
-
if (!
|
|
3655
|
+
const { email: r, password: s, appId: a } = t, { baseUrl: i, apiKey: o } = e;
|
|
3656
|
+
if (!o)
|
|
3657
3657
|
throw new Error("API key is required for login");
|
|
3658
3658
|
try {
|
|
3659
3659
|
const l = await M.post(
|
|
3660
|
-
`${
|
|
3660
|
+
`${i}/users/login`,
|
|
3661
3661
|
{
|
|
3662
3662
|
email: r,
|
|
3663
3663
|
password: s,
|
|
@@ -3666,7 +3666,7 @@ const Ws = [
|
|
|
3666
3666
|
{
|
|
3667
3667
|
headers: {
|
|
3668
3668
|
"Content-Type": "application/json",
|
|
3669
|
-
"x-api-key":
|
|
3669
|
+
"x-api-key": o
|
|
3670
3670
|
},
|
|
3671
3671
|
withCredentials: !0
|
|
3672
3672
|
}
|
|
@@ -3686,14 +3686,14 @@ const Ws = [
|
|
|
3686
3686
|
title: r = "Sign In to Your Account",
|
|
3687
3687
|
subtitle: s = "Welcome back! Please enter your details",
|
|
3688
3688
|
footerText: a = "Secure authentication powered by Neuctra Authix",
|
|
3689
|
-
primaryColor:
|
|
3690
|
-
gradient:
|
|
3689
|
+
primaryColor: i = "#00C214",
|
|
3690
|
+
gradient: o = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3691
3691
|
darkMode: l = !0,
|
|
3692
3692
|
signupUrl: h,
|
|
3693
3693
|
onSuccess: c,
|
|
3694
|
-
onError:
|
|
3694
|
+
onError: d
|
|
3695
3695
|
}) => {
|
|
3696
|
-
const { baseUrl:
|
|
3696
|
+
const { baseUrl: m, apiKey: b, appId: w } = ge(), [u, j] = P("login"), [y, $] = P(1), [R, z] = P(!1), [C, q] = P(!1), [g, I] = P(null), [S, U] = P(""), [W, F] = P(""), [V, Z] = P({
|
|
3697
3697
|
email: "",
|
|
3698
3698
|
otp: "",
|
|
3699
3699
|
newPassword: "",
|
|
@@ -3710,12 +3710,12 @@ const Ws = [
|
|
|
3710
3710
|
try {
|
|
3711
3711
|
const N = await Bs(
|
|
3712
3712
|
{ email: S, password: W, appId: w },
|
|
3713
|
-
{ baseUrl:
|
|
3713
|
+
{ baseUrl: m, apiKey: b }
|
|
3714
3714
|
);
|
|
3715
3715
|
I({ type: "success", text: `Welcome ${N.name}` }), c?.(N);
|
|
3716
3716
|
} catch (N) {
|
|
3717
3717
|
const Y = N.message || "Login failed";
|
|
3718
|
-
I({ type: "error", text: Y }),
|
|
3718
|
+
I({ type: "error", text: Y }), d?.(N);
|
|
3719
3719
|
} finally {
|
|
3720
3720
|
q(!1);
|
|
3721
3721
|
}
|
|
@@ -3725,7 +3725,7 @@ const Ws = [
|
|
|
3725
3725
|
_.preventDefault(), q(!0), I(null);
|
|
3726
3726
|
try {
|
|
3727
3727
|
const N = await M.post(
|
|
3728
|
-
`${
|
|
3728
|
+
`${m}/users/forgot-password`,
|
|
3729
3729
|
{
|
|
3730
3730
|
email: V.email,
|
|
3731
3731
|
appId: w
|
|
@@ -3748,7 +3748,7 @@ const Ws = [
|
|
|
3748
3748
|
_.preventDefault(), q(!0), I(null);
|
|
3749
3749
|
try {
|
|
3750
3750
|
const N = await M.post(
|
|
3751
|
-
`${
|
|
3751
|
+
`${m}/users/reset-password`,
|
|
3752
3752
|
V,
|
|
3753
3753
|
{ headers: { "x-api-key": b } }
|
|
3754
3754
|
);
|
|
@@ -3824,7 +3824,7 @@ const Ws = [
|
|
|
3824
3824
|
be,
|
|
3825
3825
|
{
|
|
3826
3826
|
size: 40,
|
|
3827
|
-
color:
|
|
3827
|
+
color: i,
|
|
3828
3828
|
style: { marginBottom: "10px" }
|
|
3829
3829
|
}
|
|
3830
3830
|
),
|
|
@@ -3837,7 +3837,7 @@ const Ws = [
|
|
|
3837
3837
|
color: A,
|
|
3838
3838
|
margin: 0
|
|
3839
3839
|
},
|
|
3840
|
-
children:
|
|
3840
|
+
children: u === "login" ? r : y === 1 ? "Forgot Password" : "Reset Password"
|
|
3841
3841
|
}
|
|
3842
3842
|
),
|
|
3843
3843
|
/* @__PURE__ */ n.jsx(
|
|
@@ -3847,13 +3847,13 @@ const Ws = [
|
|
|
3847
3847
|
fontSize: "14px",
|
|
3848
3848
|
color: O
|
|
3849
3849
|
},
|
|
3850
|
-
children:
|
|
3850
|
+
children: u === "login" ? s : "Follow the steps to reset your password"
|
|
3851
3851
|
}
|
|
3852
3852
|
)
|
|
3853
3853
|
]
|
|
3854
3854
|
}
|
|
3855
3855
|
),
|
|
3856
|
-
|
|
3856
|
+
u === "login" && /* @__PURE__ */ n.jsxs(
|
|
3857
3857
|
"form",
|
|
3858
3858
|
{
|
|
3859
3859
|
onSubmit: G,
|
|
@@ -3963,7 +3963,7 @@ const Ws = [
|
|
|
3963
3963
|
color: O,
|
|
3964
3964
|
cursor: "pointer"
|
|
3965
3965
|
},
|
|
3966
|
-
children: R ? /* @__PURE__ */ n.jsx(
|
|
3966
|
+
children: R ? /* @__PURE__ */ n.jsx(it, { size: 20 }) : /* @__PURE__ */ n.jsx(lt, { size: 20 })
|
|
3967
3967
|
}
|
|
3968
3968
|
)
|
|
3969
3969
|
] })
|
|
@@ -3984,7 +3984,7 @@ const Ws = [
|
|
|
3984
3984
|
{
|
|
3985
3985
|
href: h,
|
|
3986
3986
|
style: {
|
|
3987
|
-
color:
|
|
3987
|
+
color: i,
|
|
3988
3988
|
textDecoration: "none",
|
|
3989
3989
|
fontWeight: 500
|
|
3990
3990
|
},
|
|
@@ -3999,7 +3999,7 @@ const Ws = [
|
|
|
3999
3999
|
style: {
|
|
4000
4000
|
background: "none",
|
|
4001
4001
|
border: "none",
|
|
4002
|
-
color:
|
|
4002
|
+
color: i,
|
|
4003
4003
|
fontWeight: 500,
|
|
4004
4004
|
cursor: "pointer"
|
|
4005
4005
|
},
|
|
@@ -4016,7 +4016,7 @@ const Ws = [
|
|
|
4016
4016
|
disabled: C,
|
|
4017
4017
|
style: {
|
|
4018
4018
|
padding: "12px",
|
|
4019
|
-
background:
|
|
4019
|
+
background: o,
|
|
4020
4020
|
color: "#fff",
|
|
4021
4021
|
border: "none",
|
|
4022
4022
|
borderRadius: "10px",
|
|
@@ -4029,13 +4029,13 @@ const Ws = [
|
|
|
4029
4029
|
]
|
|
4030
4030
|
}
|
|
4031
4031
|
),
|
|
4032
|
-
|
|
4032
|
+
u === "forgot" && /* @__PURE__ */ n.jsxs(
|
|
4033
4033
|
"form",
|
|
4034
4034
|
{
|
|
4035
|
-
onSubmit:
|
|
4035
|
+
onSubmit: y === 1 ? v : x,
|
|
4036
4036
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
4037
4037
|
children: [
|
|
4038
|
-
|
|
4038
|
+
y === 1 ? /* @__PURE__ */ n.jsxs(
|
|
4039
4039
|
"div",
|
|
4040
4040
|
{
|
|
4041
4041
|
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
@@ -4192,14 +4192,14 @@ const Ws = [
|
|
|
4192
4192
|
disabled: C,
|
|
4193
4193
|
style: {
|
|
4194
4194
|
padding: "12px",
|
|
4195
|
-
background:
|
|
4195
|
+
background: o,
|
|
4196
4196
|
color: "#fff",
|
|
4197
4197
|
border: "none",
|
|
4198
4198
|
fontSize: "14px",
|
|
4199
4199
|
borderRadius: "10px",
|
|
4200
4200
|
fontWeight: 600
|
|
4201
4201
|
},
|
|
4202
|
-
children: C ? "Please wait..." :
|
|
4202
|
+
children: C ? "Please wait..." : y === 1 ? "Send Reset OTP" : "Reset Password"
|
|
4203
4203
|
}
|
|
4204
4204
|
),
|
|
4205
4205
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4234,9 +4234,9 @@ const Ws = [
|
|
|
4234
4234
|
display: "flex",
|
|
4235
4235
|
alignItems: "center",
|
|
4236
4236
|
gap: "10px",
|
|
4237
|
-
backgroundColor: g.type === "success" ? `${
|
|
4238
|
-
border: g.type === "success" ? `1px solid ${
|
|
4239
|
-
color: g.type === "success" ?
|
|
4237
|
+
backgroundColor: g.type === "success" ? `${i}15` : "rgba(239,68,68,0.1)",
|
|
4238
|
+
border: g.type === "success" ? `1px solid ${i}30` : "1px solid rgba(239,68,68,0.3)",
|
|
4239
|
+
color: g.type === "success" ? i : "#ef4444"
|
|
4240
4240
|
},
|
|
4241
4241
|
children: [
|
|
4242
4242
|
g.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20 }) : /* @__PURE__ */ n.jsx(le, { size: 20 }),
|
|
@@ -4257,7 +4257,7 @@ const Ws = [
|
|
|
4257
4257
|
children: [
|
|
4258
4258
|
"Secure authentication powered by",
|
|
4259
4259
|
" ",
|
|
4260
|
-
/* @__PURE__ */ n.jsx("span", { style: { color:
|
|
4260
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: i, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
4261
4261
|
]
|
|
4262
4262
|
}
|
|
4263
4263
|
)
|
|
@@ -4277,127 +4277,117 @@ const Ws = [
|
|
|
4277
4277
|
}, ba = ({
|
|
4278
4278
|
children: t,
|
|
4279
4279
|
fallback: e = null,
|
|
4280
|
-
loading: r = null
|
|
4281
|
-
className: s = "",
|
|
4282
|
-
width: a,
|
|
4283
|
-
height: o
|
|
4280
|
+
loading: r = null
|
|
4284
4281
|
}) => {
|
|
4285
|
-
const
|
|
4282
|
+
const s = pr(), [a, i] = P(!1), [o, l] = P(null);
|
|
4286
4283
|
if (te(() => {
|
|
4287
|
-
console.log("[ReactSignedIn] Component mounted"),
|
|
4284
|
+
console.log("[ReactSignedIn] Component mounted"), i(!0), (async () => {
|
|
4288
4285
|
try {
|
|
4289
4286
|
console.log("[ReactSignedIn] Checking session...");
|
|
4290
|
-
const
|
|
4291
|
-
console.log("[ReactSignedIn] Session response:",
|
|
4292
|
-
} catch (
|
|
4293
|
-
console.error("[ReactSignedIn] Error fetching session:",
|
|
4287
|
+
const m = await s.checkSession();
|
|
4288
|
+
console.log("[ReactSignedIn] Session response:", m), l(!!m?.authenticated), console.log("[ReactSignedIn] SignedIn state set to:", !!m?.authenticated);
|
|
4289
|
+
} catch (m) {
|
|
4290
|
+
console.error("[ReactSignedIn] Error fetching session:", m), l(!1);
|
|
4294
4291
|
}
|
|
4295
4292
|
})();
|
|
4296
|
-
}, [
|
|
4297
|
-
const
|
|
4293
|
+
}, [s]), !a) return null;
|
|
4294
|
+
const h = (d) => typeof d == "function" ? d() : d, c = /* @__PURE__ */ n.jsxs(
|
|
4298
4295
|
"div",
|
|
4299
4296
|
{
|
|
4300
4297
|
style: {
|
|
4298
|
+
position: "fixed",
|
|
4301
4299
|
display: "flex",
|
|
4302
|
-
alignItems: "center",
|
|
4303
4300
|
justifyContent: "center",
|
|
4304
|
-
|
|
4305
|
-
|
|
4301
|
+
alignItems: "center",
|
|
4302
|
+
width: "100%",
|
|
4303
|
+
height: "100%"
|
|
4306
4304
|
},
|
|
4307
4305
|
children: [
|
|
4308
|
-
/* @__PURE__ */ n.jsx(
|
|
4306
|
+
/* @__PURE__ */ n.jsx(
|
|
4307
|
+
"div",
|
|
4308
|
+
{
|
|
4309
|
+
style: {
|
|
4310
|
+
border: "4px solid rgba(0,0,0,0.1)",
|
|
4311
|
+
borderTop: "4px solid #3498db",
|
|
4312
|
+
borderRadius: "50%",
|
|
4313
|
+
width: "36px",
|
|
4314
|
+
height: "36px",
|
|
4315
|
+
animation: "spin 1s linear infinite"
|
|
4316
|
+
}
|
|
4317
|
+
}
|
|
4318
|
+
),
|
|
4309
4319
|
/* @__PURE__ */ n.jsx("style", { children: `
|
|
4310
|
-
.react-signedin-spinner {
|
|
4311
|
-
border: 4px solid rgba(0, 0, 0, 0.1);
|
|
4312
|
-
border-top: 4px solid #3498db;
|
|
4313
|
-
border-radius: 50%;
|
|
4314
|
-
width: 36px;
|
|
4315
|
-
height: 36px;
|
|
4316
|
-
animation: spin 1s linear infinite;
|
|
4317
|
-
}
|
|
4318
4320
|
@keyframes spin {
|
|
4319
|
-
0% { transform: rotate(0deg);}
|
|
4320
|
-
100% { transform: rotate(360deg);}
|
|
4321
|
+
0% { transform: rotate(0deg); }
|
|
4322
|
+
100% { transform: rotate(360deg); }
|
|
4321
4323
|
}
|
|
4322
4324
|
` })
|
|
4323
4325
|
]
|
|
4324
4326
|
}
|
|
4325
4327
|
);
|
|
4326
|
-
return
|
|
4327
|
-
"div",
|
|
4328
|
-
{
|
|
4329
|
-
className: s,
|
|
4330
|
-
style: { display: "flex", alignItems: "center", width: a, height: o },
|
|
4331
|
-
children: t
|
|
4332
|
-
}
|
|
4333
|
-
)) : (console.log("[ReactSignedIn] User not signed in, showing fallback"), y(e));
|
|
4328
|
+
return o === null ? (console.log("[ReactSignedIn] Still loading session..."), h(r) ?? c) : o ? (console.log("[ReactSignedIn] User signed in, rendering children"), /* @__PURE__ */ n.jsx(n.Fragment, { children: t })) : (console.log("[ReactSignedIn] User not signed in, showing fallback"), h(e));
|
|
4334
4329
|
}, wa = ({
|
|
4335
4330
|
children: t,
|
|
4336
4331
|
fallback: e = null,
|
|
4337
|
-
loading: r = null
|
|
4338
|
-
className: s = "",
|
|
4339
|
-
width: a,
|
|
4340
|
-
height: o
|
|
4332
|
+
loading: r = null
|
|
4341
4333
|
}) => {
|
|
4342
|
-
const
|
|
4334
|
+
const s = pr(), [a, i] = P(!1), [o, l] = P(null);
|
|
4343
4335
|
if (te(() => {
|
|
4344
|
-
console.log("[ReactSignedOut] Component mounted"),
|
|
4336
|
+
console.log("[ReactSignedOut] Component mounted"), i(!0), (async () => {
|
|
4345
4337
|
try {
|
|
4346
4338
|
console.log("[ReactSignedOut] Checking session...");
|
|
4347
|
-
const
|
|
4348
|
-
console.log("[ReactSignedOut] Session response:",
|
|
4349
|
-
} catch (
|
|
4350
|
-
console.error("[ReactSignedOut] Error fetching session:",
|
|
4339
|
+
const m = await s.checkSession();
|
|
4340
|
+
console.log("[ReactSignedOut] Session response:", m), l(!m?.authenticated), console.log("[ReactSignedOut] SignedOut state set to:", !m?.authenticated);
|
|
4341
|
+
} catch (m) {
|
|
4342
|
+
console.error("[ReactSignedOut] Error fetching session:", m), l(!0);
|
|
4351
4343
|
}
|
|
4352
4344
|
})();
|
|
4353
|
-
}, [
|
|
4354
|
-
const
|
|
4345
|
+
}, [s]), !a) return null;
|
|
4346
|
+
const h = (d) => typeof d == "function" ? d() : d, c = /* @__PURE__ */ n.jsxs(
|
|
4355
4347
|
"div",
|
|
4356
4348
|
{
|
|
4357
4349
|
style: {
|
|
4350
|
+
position: "fixed",
|
|
4358
4351
|
display: "flex",
|
|
4359
|
-
alignItems: "center",
|
|
4360
4352
|
justifyContent: "center",
|
|
4361
|
-
|
|
4362
|
-
|
|
4353
|
+
alignItems: "center",
|
|
4354
|
+
width: "100%",
|
|
4355
|
+
height: "100%"
|
|
4363
4356
|
},
|
|
4364
4357
|
children: [
|
|
4365
|
-
/* @__PURE__ */ n.jsx(
|
|
4358
|
+
/* @__PURE__ */ n.jsx(
|
|
4359
|
+
"div",
|
|
4360
|
+
{
|
|
4361
|
+
style: {
|
|
4362
|
+
border: "4px solid rgba(0,0,0,0.1)",
|
|
4363
|
+
borderTop: "4px solid #e74c3c",
|
|
4364
|
+
borderRadius: "50%",
|
|
4365
|
+
width: "36px",
|
|
4366
|
+
height: "36px",
|
|
4367
|
+
animation: "spin 1s linear infinite"
|
|
4368
|
+
}
|
|
4369
|
+
}
|
|
4370
|
+
),
|
|
4366
4371
|
/* @__PURE__ */ n.jsx("style", { children: `
|
|
4367
|
-
.react-signedout-spinner {
|
|
4368
|
-
border: 4px solid rgba(0, 0, 0, 0.1);
|
|
4369
|
-
border-top: 4px solid #e74c3c;
|
|
4370
|
-
border-radius: 50%;
|
|
4371
|
-
width: 36px;
|
|
4372
|
-
height: 36px;
|
|
4373
|
-
animation: spin 1s linear infinite;
|
|
4374
|
-
}
|
|
4375
4372
|
@keyframes spin {
|
|
4376
|
-
0% { transform: rotate(0deg);}
|
|
4377
|
-
100% { transform: rotate(360deg);}
|
|
4373
|
+
0% { transform: rotate(0deg); }
|
|
4374
|
+
100% { transform: rotate(360deg); }
|
|
4378
4375
|
}
|
|
4379
4376
|
` })
|
|
4380
4377
|
]
|
|
4381
4378
|
}
|
|
4382
4379
|
);
|
|
4383
|
-
return
|
|
4384
|
-
"div",
|
|
4385
|
-
{
|
|
4386
|
-
className: s,
|
|
4387
|
-
style: { display: "flex", alignItems: "center", width: a, height: o },
|
|
4388
|
-
children: t
|
|
4389
|
-
}
|
|
4390
|
-
)) : (console.log("[ReactSignedOut] User is signed in, showing fallback"), y(e));
|
|
4380
|
+
return o === null ? (console.log("[ReactSignedOut] Still checking session..."), h(r) ?? c) : o ? (console.log("[ReactSignedOut] User is signed out, rendering children"), /* @__PURE__ */ n.jsx(n.Fragment, { children: t })) : (console.log("[ReactSignedOut] User is signed in, showing fallback"), h(e));
|
|
4391
4381
|
}, Hs = ({
|
|
4392
4382
|
isOpen: t,
|
|
4393
4383
|
onClose: e,
|
|
4394
4384
|
onSuccess: r,
|
|
4395
4385
|
onError: s,
|
|
4396
4386
|
userId: a,
|
|
4397
|
-
token:
|
|
4398
|
-
colors:
|
|
4387
|
+
token: i,
|
|
4388
|
+
colors: o
|
|
4399
4389
|
}) => {
|
|
4400
|
-
const { baseUrl: l, apiKey: h, appId: c } = ge(), [
|
|
4390
|
+
const { baseUrl: l, apiKey: h, appId: c } = ge(), [d, m] = P(!1), [b, w] = P(""), [u, j] = P("warning"), [y, $] = P(!1);
|
|
4401
4391
|
if (te(() => {
|
|
4402
4392
|
if (typeof window > "u") return;
|
|
4403
4393
|
const g = () => {
|
|
@@ -4406,7 +4396,7 @@ const Ws = [
|
|
|
4406
4396
|
return g(), window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
|
|
4407
4397
|
}, []), !t) return null;
|
|
4408
4398
|
const R = async () => {
|
|
4409
|
-
|
|
4399
|
+
m(!0), j("processing");
|
|
4410
4400
|
try {
|
|
4411
4401
|
const { data: g } = await M.delete(`${l}/users/delete/${a}`, {
|
|
4412
4402
|
data: { appId: c },
|
|
@@ -4420,12 +4410,12 @@ const Ws = [
|
|
|
4420
4410
|
} catch (g) {
|
|
4421
4411
|
s(g.response?.data?.message || "Something went wrong"), j("warning");
|
|
4422
4412
|
} finally {
|
|
4423
|
-
|
|
4413
|
+
m(!1);
|
|
4424
4414
|
}
|
|
4425
4415
|
}, z = b.toLowerCase() === "delete my account", C = (g) => {
|
|
4426
|
-
g.target === g.currentTarget &&
|
|
4416
|
+
g.target === g.currentTarget && u !== "processing" && u !== "success" && e();
|
|
4427
4417
|
}, q = () => {
|
|
4428
|
-
switch (
|
|
4418
|
+
switch (u) {
|
|
4429
4419
|
case "warning":
|
|
4430
4420
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4431
4421
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -4470,7 +4460,7 @@ const Ws = [
|
|
|
4470
4460
|
"h3",
|
|
4471
4461
|
{
|
|
4472
4462
|
style: {
|
|
4473
|
-
color:
|
|
4463
|
+
color: o.textPrimary,
|
|
4474
4464
|
margin: 0,
|
|
4475
4465
|
fontSize: "20px",
|
|
4476
4466
|
fontWeight: 700,
|
|
@@ -4490,7 +4480,7 @@ const Ws = [
|
|
|
4490
4480
|
style: {
|
|
4491
4481
|
background: "transparent",
|
|
4492
4482
|
border: "none",
|
|
4493
|
-
color:
|
|
4483
|
+
color: o.textTertiary,
|
|
4494
4484
|
cursor: "pointer",
|
|
4495
4485
|
padding: "8px",
|
|
4496
4486
|
borderRadius: "8px",
|
|
@@ -4503,10 +4493,10 @@ const Ws = [
|
|
|
4503
4493
|
transition: "all 0.2s ease"
|
|
4504
4494
|
},
|
|
4505
4495
|
onMouseOver: (g) => {
|
|
4506
|
-
g.currentTarget.style.backgroundColor =
|
|
4496
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.color = o.textPrimary;
|
|
4507
4497
|
},
|
|
4508
4498
|
onMouseOut: (g) => {
|
|
4509
|
-
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color =
|
|
4499
|
+
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color = o.textTertiary;
|
|
4510
4500
|
},
|
|
4511
4501
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
|
|
4512
4502
|
}
|
|
@@ -4521,8 +4511,8 @@ const Ws = [
|
|
|
4521
4511
|
display: "flex",
|
|
4522
4512
|
gap: "16px",
|
|
4523
4513
|
padding: "20px",
|
|
4524
|
-
background: `${
|
|
4525
|
-
border: `1px solid ${
|
|
4514
|
+
background: `${o.error}15`,
|
|
4515
|
+
border: `1px solid ${o.error}30`,
|
|
4526
4516
|
borderRadius: "12px",
|
|
4527
4517
|
marginBottom: "20px"
|
|
4528
4518
|
},
|
|
@@ -4531,7 +4521,7 @@ const Ws = [
|
|
|
4531
4521
|
"div",
|
|
4532
4522
|
{
|
|
4533
4523
|
style: {
|
|
4534
|
-
color:
|
|
4524
|
+
color: o.error,
|
|
4535
4525
|
flexShrink: 0,
|
|
4536
4526
|
display: "flex",
|
|
4537
4527
|
alignItems: "flex-start"
|
|
@@ -4544,7 +4534,7 @@ const Ws = [
|
|
|
4544
4534
|
"h4",
|
|
4545
4535
|
{
|
|
4546
4536
|
style: {
|
|
4547
|
-
color:
|
|
4537
|
+
color: o.textPrimary,
|
|
4548
4538
|
margin: "0 0 12px 0",
|
|
4549
4539
|
fontSize: "16px",
|
|
4550
4540
|
fontWeight: 600
|
|
@@ -4581,10 +4571,10 @@ const Ws = [
|
|
|
4581
4571
|
alignItems: "center",
|
|
4582
4572
|
gap: "10px",
|
|
4583
4573
|
fontSize: "14px",
|
|
4584
|
-
color:
|
|
4574
|
+
color: o.textSecondary
|
|
4585
4575
|
},
|
|
4586
4576
|
children: [
|
|
4587
|
-
/* @__PURE__ */ n.jsx("div", { style: { color:
|
|
4577
|
+
/* @__PURE__ */ n.jsx("div", { style: { color: o.error, flexShrink: 0 }, children: g.icon }),
|
|
4588
4578
|
/* @__PURE__ */ n.jsx("span", { children: g.text })
|
|
4589
4579
|
]
|
|
4590
4580
|
},
|
|
@@ -4602,7 +4592,7 @@ const Ws = [
|
|
|
4602
4592
|
style: {
|
|
4603
4593
|
display: "flex",
|
|
4604
4594
|
gap: "12px",
|
|
4605
|
-
flexDirection:
|
|
4595
|
+
flexDirection: y ? "column-reverse" : "row",
|
|
4606
4596
|
justifyContent: "flex-end",
|
|
4607
4597
|
alignItems: "stretch"
|
|
4608
4598
|
},
|
|
@@ -4614,18 +4604,18 @@ const Ws = [
|
|
|
4614
4604
|
style: {
|
|
4615
4605
|
padding: "10px 24px",
|
|
4616
4606
|
borderRadius: "10px",
|
|
4617
|
-
border: `1.5px solid ${
|
|
4607
|
+
border: `1.5px solid ${o.border}`,
|
|
4618
4608
|
background: "transparent",
|
|
4619
|
-
color:
|
|
4609
|
+
color: o.textPrimary,
|
|
4620
4610
|
fontSize: "14px",
|
|
4621
4611
|
fontWeight: 500,
|
|
4622
4612
|
cursor: "pointer",
|
|
4623
|
-
flex:
|
|
4624
|
-
minWidth:
|
|
4613
|
+
flex: y ? "none" : 1,
|
|
4614
|
+
minWidth: y ? "100%" : "120px",
|
|
4625
4615
|
transition: "all 0.2s ease"
|
|
4626
4616
|
},
|
|
4627
4617
|
onMouseOver: (g) => {
|
|
4628
|
-
g.currentTarget.style.backgroundColor =
|
|
4618
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4629
4619
|
},
|
|
4630
4620
|
onMouseOut: (g) => {
|
|
4631
4621
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4646,8 +4636,8 @@ const Ws = [
|
|
|
4646
4636
|
fontSize: "14px",
|
|
4647
4637
|
fontWeight: 600,
|
|
4648
4638
|
cursor: "pointer",
|
|
4649
|
-
flex:
|
|
4650
|
-
minWidth:
|
|
4639
|
+
flex: y ? "none" : 1,
|
|
4640
|
+
minWidth: y ? "100%" : "140px",
|
|
4651
4641
|
display: "flex",
|
|
4652
4642
|
alignItems: "center",
|
|
4653
4643
|
justifyContent: "center",
|
|
@@ -4704,7 +4694,7 @@ const Ws = [
|
|
|
4704
4694
|
"h3",
|
|
4705
4695
|
{
|
|
4706
4696
|
style: {
|
|
4707
|
-
color:
|
|
4697
|
+
color: o.textPrimary,
|
|
4708
4698
|
margin: 0,
|
|
4709
4699
|
fontSize: "20px",
|
|
4710
4700
|
fontWeight: 700,
|
|
@@ -4721,7 +4711,7 @@ const Ws = [
|
|
|
4721
4711
|
"p",
|
|
4722
4712
|
{
|
|
4723
4713
|
style: {
|
|
4724
|
-
color:
|
|
4714
|
+
color: o.textSecondary,
|
|
4725
4715
|
marginBottom: "16px",
|
|
4726
4716
|
fontSize: "14px",
|
|
4727
4717
|
lineHeight: "1.5"
|
|
@@ -4729,7 +4719,7 @@ const Ws = [
|
|
|
4729
4719
|
children: [
|
|
4730
4720
|
"Type",
|
|
4731
4721
|
" ",
|
|
4732
|
-
/* @__PURE__ */ n.jsx("strong", { style: { color:
|
|
4722
|
+
/* @__PURE__ */ n.jsx("strong", { style: { color: o.textPrimary }, children: '"delete my account"' }),
|
|
4733
4723
|
" ",
|
|
4734
4724
|
"to confirm:"
|
|
4735
4725
|
]
|
|
@@ -4746,16 +4736,16 @@ const Ws = [
|
|
|
4746
4736
|
width: "100%",
|
|
4747
4737
|
padding: "14px 16px",
|
|
4748
4738
|
borderRadius: "10px",
|
|
4749
|
-
border: `2px solid ${z ?
|
|
4739
|
+
border: `2px solid ${z ? o.success : o.error}`,
|
|
4750
4740
|
backgroundColor: "transparent",
|
|
4751
|
-
color:
|
|
4741
|
+
color: o.textPrimary,
|
|
4752
4742
|
fontSize: "15px",
|
|
4753
4743
|
outline: "none",
|
|
4754
4744
|
transition: "all 0.2s ease",
|
|
4755
4745
|
boxSizing: "border-box"
|
|
4756
4746
|
},
|
|
4757
4747
|
onFocus: (g) => {
|
|
4758
|
-
g.target.style.boxShadow = `0 0 0 3px ${
|
|
4748
|
+
g.target.style.boxShadow = `0 0 0 3px ${o.accent}20`;
|
|
4759
4749
|
},
|
|
4760
4750
|
onBlur: (g) => {
|
|
4761
4751
|
g.target.style.boxShadow = "none";
|
|
@@ -4771,7 +4761,7 @@ const Ws = [
|
|
|
4771
4761
|
alignItems: "center",
|
|
4772
4762
|
gap: "8px",
|
|
4773
4763
|
marginTop: "10px",
|
|
4774
|
-
color:
|
|
4764
|
+
color: o.success,
|
|
4775
4765
|
fontSize: "14px",
|
|
4776
4766
|
fontWeight: 500
|
|
4777
4767
|
},
|
|
@@ -4802,18 +4792,18 @@ const Ws = [
|
|
|
4802
4792
|
style: {
|
|
4803
4793
|
padding: "10px 24px",
|
|
4804
4794
|
borderRadius: "10px",
|
|
4805
|
-
border: `1.5px solid ${
|
|
4795
|
+
border: `1.5px solid ${o.border}`,
|
|
4806
4796
|
background: "transparent",
|
|
4807
|
-
color:
|
|
4797
|
+
color: o.textPrimary,
|
|
4808
4798
|
fontSize: "14px",
|
|
4809
4799
|
fontWeight: 500,
|
|
4810
4800
|
cursor: "pointer",
|
|
4811
|
-
flex:
|
|
4812
|
-
minWidth:
|
|
4801
|
+
flex: y ? "none" : 1,
|
|
4802
|
+
minWidth: y ? "100%" : "120px",
|
|
4813
4803
|
transition: "all 0.2s ease"
|
|
4814
4804
|
},
|
|
4815
4805
|
onMouseOver: (g) => {
|
|
4816
|
-
g.currentTarget.style.backgroundColor =
|
|
4806
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4817
4807
|
},
|
|
4818
4808
|
onMouseOut: (g) => {
|
|
4819
4809
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4825,7 +4815,7 @@ const Ws = [
|
|
|
4825
4815
|
"button",
|
|
4826
4816
|
{
|
|
4827
4817
|
onClick: R,
|
|
4828
|
-
disabled: !z ||
|
|
4818
|
+
disabled: !z || d,
|
|
4829
4819
|
style: {
|
|
4830
4820
|
padding: "10px 24px",
|
|
4831
4821
|
borderRadius: "10px",
|
|
@@ -4834,22 +4824,22 @@ const Ws = [
|
|
|
4834
4824
|
color: "white",
|
|
4835
4825
|
fontSize: "14px",
|
|
4836
4826
|
fontWeight: 600,
|
|
4837
|
-
cursor: !z ||
|
|
4838
|
-
flex:
|
|
4839
|
-
minWidth:
|
|
4840
|
-
opacity: !z ||
|
|
4827
|
+
cursor: !z || d ? "not-allowed" : "pointer",
|
|
4828
|
+
flex: y ? "none" : 1,
|
|
4829
|
+
minWidth: y ? "100%" : "140px",
|
|
4830
|
+
opacity: !z || d ? 0.6 : 1,
|
|
4841
4831
|
display: "flex",
|
|
4842
4832
|
alignItems: "center",
|
|
4843
4833
|
justifyContent: "center",
|
|
4844
4834
|
gap: "8px",
|
|
4845
4835
|
transition: "all 0.2s ease",
|
|
4846
|
-
boxShadow: !z ||
|
|
4836
|
+
boxShadow: !z || d ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
|
|
4847
4837
|
},
|
|
4848
4838
|
onMouseOver: (g) => {
|
|
4849
|
-
z && !
|
|
4839
|
+
z && !d && (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
|
|
4850
4840
|
},
|
|
4851
4841
|
onMouseOut: (g) => {
|
|
4852
|
-
z && !
|
|
4842
|
+
z && !d && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
4853
4843
|
},
|
|
4854
4844
|
children: [
|
|
4855
4845
|
/* @__PURE__ */ n.jsx(Ne, { size: 16 }),
|
|
@@ -4903,7 +4893,7 @@ const Ws = [
|
|
|
4903
4893
|
"h3",
|
|
4904
4894
|
{
|
|
4905
4895
|
style: {
|
|
4906
|
-
color:
|
|
4896
|
+
color: o.textPrimary,
|
|
4907
4897
|
margin: 0,
|
|
4908
4898
|
fontSize: "20px",
|
|
4909
4899
|
fontWeight: 700,
|
|
@@ -4916,7 +4906,7 @@ const Ws = [
|
|
|
4916
4906
|
"p",
|
|
4917
4907
|
{
|
|
4918
4908
|
style: {
|
|
4919
|
-
color:
|
|
4909
|
+
color: o.textTertiary,
|
|
4920
4910
|
margin: "4px 0 0 0",
|
|
4921
4911
|
fontSize: "14px",
|
|
4922
4912
|
lineHeight: "1.4"
|
|
@@ -4950,7 +4940,7 @@ const Ws = [
|
|
|
4950
4940
|
padding: "12px",
|
|
4951
4941
|
borderRadius: "8px",
|
|
4952
4942
|
transition: "all 0.2s ease",
|
|
4953
|
-
backgroundColor: g.active ? `${
|
|
4943
|
+
backgroundColor: g.active ? `${o.accent}10` : "transparent"
|
|
4954
4944
|
},
|
|
4955
4945
|
children: [
|
|
4956
4946
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4960,9 +4950,9 @@ const Ws = [
|
|
|
4960
4950
|
width: "8px",
|
|
4961
4951
|
height: "8px",
|
|
4962
4952
|
borderRadius: "50%",
|
|
4963
|
-
backgroundColor: g.active ?
|
|
4953
|
+
backgroundColor: g.active ? o.accent : o.textTertiary,
|
|
4964
4954
|
transition: "all 0.3s ease",
|
|
4965
|
-
boxShadow: g.active ? `0 0 0 4px ${
|
|
4955
|
+
boxShadow: g.active ? `0 0 0 4px ${o.accent}20` : "none"
|
|
4966
4956
|
}
|
|
4967
4957
|
}
|
|
4968
4958
|
),
|
|
@@ -4971,7 +4961,7 @@ const Ws = [
|
|
|
4971
4961
|
{
|
|
4972
4962
|
style: {
|
|
4973
4963
|
fontSize: "14px",
|
|
4974
|
-
color: g.active ?
|
|
4964
|
+
color: g.active ? o.textPrimary : o.textSecondary,
|
|
4975
4965
|
fontWeight: g.active ? 500 : 400
|
|
4976
4966
|
},
|
|
4977
4967
|
children: g.text
|
|
@@ -4991,17 +4981,17 @@ const Ws = [
|
|
|
4991
4981
|
alignItems: "center",
|
|
4992
4982
|
gap: "10px",
|
|
4993
4983
|
padding: "16px",
|
|
4994
|
-
background: `${
|
|
4984
|
+
background: `${o.accent}10`,
|
|
4995
4985
|
borderRadius: "10px",
|
|
4996
4986
|
fontSize: "14px",
|
|
4997
|
-
color:
|
|
4987
|
+
color: o.textSecondary
|
|
4998
4988
|
},
|
|
4999
4989
|
children: [
|
|
5000
4990
|
/* @__PURE__ */ n.jsx(
|
|
5001
4991
|
cr,
|
|
5002
4992
|
{
|
|
5003
4993
|
size: 18,
|
|
5004
|
-
style: { color:
|
|
4994
|
+
style: { color: o.accent, flexShrink: 0 }
|
|
5005
4995
|
}
|
|
5006
4996
|
),
|
|
5007
4997
|
/* @__PURE__ */ n.jsx("span", { children: "You will be redirected to the login page shortly" })
|
|
@@ -5043,7 +5033,7 @@ const Ws = [
|
|
|
5043
5033
|
"h3",
|
|
5044
5034
|
{
|
|
5045
5035
|
style: {
|
|
5046
|
-
color:
|
|
5036
|
+
color: o.textPrimary,
|
|
5047
5037
|
margin: 0,
|
|
5048
5038
|
fontSize: "20px",
|
|
5049
5039
|
fontWeight: 700,
|
|
@@ -5056,7 +5046,7 @@ const Ws = [
|
|
|
5056
5046
|
"p",
|
|
5057
5047
|
{
|
|
5058
5048
|
style: {
|
|
5059
|
-
color:
|
|
5049
|
+
color: o.textTertiary,
|
|
5060
5050
|
margin: "4px 0 0 0",
|
|
5061
5051
|
fontSize: "14px",
|
|
5062
5052
|
lineHeight: "1.4"
|
|
@@ -5074,8 +5064,8 @@ const Ws = [
|
|
|
5074
5064
|
style: {
|
|
5075
5065
|
textAlign: "center",
|
|
5076
5066
|
padding: "20px",
|
|
5077
|
-
background: `${
|
|
5078
|
-
border: `1px solid ${
|
|
5067
|
+
background: `${o.success}10`,
|
|
5068
|
+
border: `1px solid ${o.success}20`,
|
|
5079
5069
|
borderRadius: "12px",
|
|
5080
5070
|
marginBottom: "24px"
|
|
5081
5071
|
},
|
|
@@ -5085,7 +5075,7 @@ const Ws = [
|
|
|
5085
5075
|
{
|
|
5086
5076
|
size: 48,
|
|
5087
5077
|
style: {
|
|
5088
|
-
color:
|
|
5078
|
+
color: o.success,
|
|
5089
5079
|
marginBottom: "12px",
|
|
5090
5080
|
display: "block",
|
|
5091
5081
|
margin: "0 auto 12px auto"
|
|
@@ -5096,7 +5086,7 @@ const Ws = [
|
|
|
5096
5086
|
"p",
|
|
5097
5087
|
{
|
|
5098
5088
|
style: {
|
|
5099
|
-
color:
|
|
5089
|
+
color: o.textPrimary,
|
|
5100
5090
|
fontSize: "16px",
|
|
5101
5091
|
fontWeight: 600,
|
|
5102
5092
|
margin: "0 0 8px 0"
|
|
@@ -5108,7 +5098,7 @@ const Ws = [
|
|
|
5108
5098
|
"p",
|
|
5109
5099
|
{
|
|
5110
5100
|
style: {
|
|
5111
|
-
color:
|
|
5101
|
+
color: o.textSecondary,
|
|
5112
5102
|
fontSize: "14px",
|
|
5113
5103
|
margin: 0,
|
|
5114
5104
|
lineHeight: "1.5"
|
|
@@ -5127,10 +5117,10 @@ const Ws = [
|
|
|
5127
5117
|
alignItems: "center",
|
|
5128
5118
|
gap: "10px",
|
|
5129
5119
|
padding: "16px",
|
|
5130
|
-
background: `${
|
|
5120
|
+
background: `${o.accent}10`,
|
|
5131
5121
|
borderRadius: "10px",
|
|
5132
5122
|
fontSize: "14px",
|
|
5133
|
-
color:
|
|
5123
|
+
color: o.textSecondary,
|
|
5134
5124
|
justifyContent: "center"
|
|
5135
5125
|
},
|
|
5136
5126
|
children: [
|
|
@@ -5140,7 +5130,7 @@ const Ws = [
|
|
|
5140
5130
|
size: 16,
|
|
5141
5131
|
style: {
|
|
5142
5132
|
animation: "spin 1s linear infinite",
|
|
5143
|
-
color:
|
|
5133
|
+
color: o.accent
|
|
5144
5134
|
}
|
|
5145
5135
|
}
|
|
5146
5136
|
),
|
|
@@ -5172,8 +5162,8 @@ const Ws = [
|
|
|
5172
5162
|
"div",
|
|
5173
5163
|
{
|
|
5174
5164
|
style: {
|
|
5175
|
-
backgroundColor:
|
|
5176
|
-
border: `1px solid ${
|
|
5165
|
+
backgroundColor: o.surface,
|
|
5166
|
+
border: `1px solid ${o.border}`,
|
|
5177
5167
|
borderRadius: "20px",
|
|
5178
5168
|
width: "100%",
|
|
5179
5169
|
maxWidth: "480px",
|
|
@@ -5249,21 +5239,21 @@ const Ws = [
|
|
|
5249
5239
|
onUpdate: r,
|
|
5250
5240
|
colors: s
|
|
5251
5241
|
}) => {
|
|
5252
|
-
const [a,
|
|
5242
|
+
const [a, i] = P(""), [o, l] = P(!1), [h, c] = P(!1), [d, m] = P({ isValid: !1, message: "", type: null });
|
|
5253
5243
|
if (te(() => {
|
|
5254
5244
|
if (typeof window > "u") return;
|
|
5255
|
-
const
|
|
5245
|
+
const u = () => {
|
|
5256
5246
|
c(window.innerWidth < 640);
|
|
5257
5247
|
};
|
|
5258
|
-
return
|
|
5248
|
+
return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
|
|
5259
5249
|
}, []), te(() => {
|
|
5260
5250
|
if (!a.trim()) {
|
|
5261
|
-
|
|
5251
|
+
m({ isValid: !1, message: "", type: null });
|
|
5262
5252
|
return;
|
|
5263
5253
|
}
|
|
5264
5254
|
try {
|
|
5265
|
-
const
|
|
5266
|
-
|
|
5255
|
+
const u = new URL(a), j = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(u.pathname);
|
|
5256
|
+
m(j ? {
|
|
5267
5257
|
isValid: !0,
|
|
5268
5258
|
message: "Valid image URL",
|
|
5269
5259
|
type: "success"
|
|
@@ -5273,7 +5263,7 @@ const Ws = [
|
|
|
5273
5263
|
type: "warning"
|
|
5274
5264
|
});
|
|
5275
5265
|
} catch {
|
|
5276
|
-
|
|
5266
|
+
m({
|
|
5277
5267
|
isValid: !1,
|
|
5278
5268
|
message: "Please enter a valid URL",
|
|
5279
5269
|
type: "error"
|
|
@@ -5281,16 +5271,16 @@ const Ws = [
|
|
|
5281
5271
|
}
|
|
5282
5272
|
}, [a]), !t) return null;
|
|
5283
5273
|
const b = async () => {
|
|
5284
|
-
if (!(!a || !
|
|
5274
|
+
if (!(!a || !d.isValid)) {
|
|
5285
5275
|
l(!0);
|
|
5286
5276
|
try {
|
|
5287
|
-
await r(a) && (
|
|
5277
|
+
await r(a) && (i(""), e());
|
|
5288
5278
|
} finally {
|
|
5289
5279
|
l(!1);
|
|
5290
5280
|
}
|
|
5291
5281
|
}
|
|
5292
|
-
}, w = (
|
|
5293
|
-
|
|
5282
|
+
}, w = (u) => {
|
|
5283
|
+
u.target === u.currentTarget && e();
|
|
5294
5284
|
};
|
|
5295
5285
|
return /* @__PURE__ */ n.jsxs(
|
|
5296
5286
|
"div",
|
|
@@ -5397,11 +5387,11 @@ const Ws = [
|
|
|
5397
5387
|
flexShrink: 0,
|
|
5398
5388
|
transition: "all 0.2s ease"
|
|
5399
5389
|
},
|
|
5400
|
-
onMouseOver: (
|
|
5401
|
-
|
|
5390
|
+
onMouseOver: (u) => {
|
|
5391
|
+
u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.color = s.textPrimary;
|
|
5402
5392
|
},
|
|
5403
|
-
onMouseOut: (
|
|
5404
|
-
|
|
5393
|
+
onMouseOut: (u) => {
|
|
5394
|
+
u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.color = s.textTertiary;
|
|
5405
5395
|
},
|
|
5406
5396
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
|
|
5407
5397
|
}
|
|
@@ -5446,13 +5436,13 @@ const Ws = [
|
|
|
5446
5436
|
id: "avatar-url",
|
|
5447
5437
|
placeholder: "https://example.com/your-avatar.jpg",
|
|
5448
5438
|
value: a,
|
|
5449
|
-
onChange: (
|
|
5439
|
+
onChange: (u) => i(u.target.value),
|
|
5450
5440
|
style: {
|
|
5451
5441
|
width: "100%",
|
|
5452
5442
|
padding: "14px 16px",
|
|
5453
5443
|
paddingLeft: "44px",
|
|
5454
5444
|
borderRadius: "12px",
|
|
5455
|
-
border: `1.5px solid ${
|
|
5445
|
+
border: `1.5px solid ${d.type === "error" ? s.error : d.type === "success" ? s.success : s.border}`,
|
|
5456
5446
|
backgroundColor: "transparent",
|
|
5457
5447
|
color: s.textPrimary,
|
|
5458
5448
|
fontSize: "15px",
|
|
@@ -5460,13 +5450,13 @@ const Ws = [
|
|
|
5460
5450
|
transition: "all 0.2s ease",
|
|
5461
5451
|
boxSizing: "border-box"
|
|
5462
5452
|
},
|
|
5463
|
-
onFocus: (
|
|
5464
|
-
|
|
5453
|
+
onFocus: (u) => {
|
|
5454
|
+
u.target.style.borderColor = s.accent, u.target.style.boxShadow = `0 0 0 3px ${s.accent}20`;
|
|
5465
5455
|
},
|
|
5466
|
-
onBlur: (
|
|
5467
|
-
|
|
5456
|
+
onBlur: (u) => {
|
|
5457
|
+
u.target.style.borderColor = d.type === "error" ? s.error : d.type === "success" ? s.success : s.border, u.target.style.boxShadow = "none";
|
|
5468
5458
|
},
|
|
5469
|
-
disabled:
|
|
5459
|
+
disabled: o
|
|
5470
5460
|
}
|
|
5471
5461
|
),
|
|
5472
5462
|
/* @__PURE__ */ n.jsx(
|
|
@@ -5483,7 +5473,7 @@ const Ws = [
|
|
|
5483
5473
|
}
|
|
5484
5474
|
)
|
|
5485
5475
|
] }),
|
|
5486
|
-
|
|
5476
|
+
d.message && /* @__PURE__ */ n.jsxs(
|
|
5487
5477
|
"div",
|
|
5488
5478
|
{
|
|
5489
5479
|
style: {
|
|
@@ -5492,18 +5482,18 @@ const Ws = [
|
|
|
5492
5482
|
gap: "6px",
|
|
5493
5483
|
marginTop: "8px",
|
|
5494
5484
|
fontSize: "13px",
|
|
5495
|
-
color:
|
|
5485
|
+
color: d.type === "success" ? s.success : d.type === "error" ? s.error : s.textTertiary
|
|
5496
5486
|
},
|
|
5497
5487
|
children: [
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5488
|
+
d.type === "success" && /* @__PURE__ */ n.jsx(de, { size: 14 }),
|
|
5489
|
+
d.type === "error" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
|
|
5490
|
+
d.type === "warning" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
|
|
5491
|
+
d.message
|
|
5502
5492
|
]
|
|
5503
5493
|
}
|
|
5504
5494
|
)
|
|
5505
5495
|
] }),
|
|
5506
|
-
a &&
|
|
5496
|
+
a && d.type === "success" && /* @__PURE__ */ n.jsxs(
|
|
5507
5497
|
"div",
|
|
5508
5498
|
{
|
|
5509
5499
|
style: {
|
|
@@ -5539,8 +5529,8 @@ const Ws = [
|
|
|
5539
5529
|
border: `2px solid ${s.success}40`,
|
|
5540
5530
|
margin: "0 auto"
|
|
5541
5531
|
},
|
|
5542
|
-
onError: (
|
|
5543
|
-
|
|
5532
|
+
onError: (u) => {
|
|
5533
|
+
u.currentTarget.style.display = "none";
|
|
5544
5534
|
}
|
|
5545
5535
|
}
|
|
5546
5536
|
)
|
|
@@ -5566,7 +5556,7 @@ const Ws = [
|
|
|
5566
5556
|
"button",
|
|
5567
5557
|
{
|
|
5568
5558
|
onClick: e,
|
|
5569
|
-
disabled:
|
|
5559
|
+
disabled: o,
|
|
5570
5560
|
style: {
|
|
5571
5561
|
padding: "10px 24px",
|
|
5572
5562
|
borderRadius: "10px",
|
|
@@ -5575,17 +5565,17 @@ const Ws = [
|
|
|
5575
5565
|
color: s.textPrimary,
|
|
5576
5566
|
fontSize: "14px",
|
|
5577
5567
|
fontWeight: 500,
|
|
5578
|
-
cursor:
|
|
5568
|
+
cursor: o ? "not-allowed" : "pointer",
|
|
5579
5569
|
flex: h ? "none" : 1,
|
|
5580
5570
|
minWidth: h ? "100%" : "120px",
|
|
5581
|
-
opacity:
|
|
5571
|
+
opacity: o ? 0.6 : 1,
|
|
5582
5572
|
transition: "all 0.2s ease"
|
|
5583
5573
|
},
|
|
5584
|
-
onMouseOver: (
|
|
5585
|
-
|
|
5574
|
+
onMouseOver: (u) => {
|
|
5575
|
+
o || (u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.transform = "translateY(-1px)");
|
|
5586
5576
|
},
|
|
5587
|
-
onMouseOut: (
|
|
5588
|
-
|
|
5577
|
+
onMouseOut: (u) => {
|
|
5578
|
+
o || (u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.transform = "translateY(0)");
|
|
5589
5579
|
},
|
|
5590
5580
|
children: "Cancel"
|
|
5591
5581
|
}
|
|
@@ -5594,7 +5584,7 @@ const Ws = [
|
|
|
5594
5584
|
"button",
|
|
5595
5585
|
{
|
|
5596
5586
|
onClick: b,
|
|
5597
|
-
disabled:
|
|
5587
|
+
disabled: o || !d.isValid,
|
|
5598
5588
|
style: {
|
|
5599
5589
|
padding: "10px 24px",
|
|
5600
5590
|
borderRadius: "10px",
|
|
@@ -5603,24 +5593,24 @@ const Ws = [
|
|
|
5603
5593
|
color: "#fff",
|
|
5604
5594
|
fontSize: "14px",
|
|
5605
5595
|
fontWeight: 600,
|
|
5606
|
-
cursor:
|
|
5596
|
+
cursor: o || !d.isValid ? "not-allowed" : "pointer",
|
|
5607
5597
|
flex: h ? "none" : 1,
|
|
5608
5598
|
minWidth: h ? "100%" : "140px",
|
|
5609
|
-
opacity:
|
|
5599
|
+
opacity: o || !d.isValid ? 0.6 : 1,
|
|
5610
5600
|
display: "flex",
|
|
5611
5601
|
alignItems: "center",
|
|
5612
5602
|
justifyContent: "center",
|
|
5613
5603
|
gap: "8px",
|
|
5614
5604
|
transition: "all 0.2s ease",
|
|
5615
|
-
boxShadow:
|
|
5605
|
+
boxShadow: o || !d.isValid ? "none" : `0 4px 12px ${s.accent}40`
|
|
5616
5606
|
},
|
|
5617
|
-
onMouseOver: (
|
|
5618
|
-
!
|
|
5607
|
+
onMouseOver: (u) => {
|
|
5608
|
+
!o && d.isValid && (u.currentTarget.style.transform = "translateY(-1px)", u.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
|
|
5619
5609
|
},
|
|
5620
|
-
onMouseOut: (
|
|
5621
|
-
!
|
|
5610
|
+
onMouseOut: (u) => {
|
|
5611
|
+
!o && d.isValid && (u.currentTarget.style.transform = "translateY(0)", u.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
|
|
5622
5612
|
},
|
|
5623
|
-
children:
|
|
5613
|
+
children: o ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5624
5614
|
/* @__PURE__ */ n.jsx(
|
|
5625
5615
|
ae,
|
|
5626
5616
|
{
|
|
@@ -5701,13 +5691,13 @@ const Ws = [
|
|
|
5701
5691
|
onSuccess: r,
|
|
5702
5692
|
onError: s,
|
|
5703
5693
|
userId: a,
|
|
5704
|
-
colors:
|
|
5694
|
+
colors: i
|
|
5705
5695
|
}) => {
|
|
5706
|
-
const { baseUrl:
|
|
5696
|
+
const { baseUrl: o, apiKey: l, appId: h } = ge(), [c, d] = P({
|
|
5707
5697
|
currentPassword: "",
|
|
5708
5698
|
newPassword: "",
|
|
5709
5699
|
confirmPassword: ""
|
|
5710
|
-
}), [
|
|
5700
|
+
}), [m, b] = P({}), [w, u] = P(!1), [j, y] = P({
|
|
5711
5701
|
currentPassword: !1,
|
|
5712
5702
|
newPassword: !1,
|
|
5713
5703
|
confirmPassword: !1
|
|
@@ -5721,18 +5711,18 @@ const Ws = [
|
|
|
5721
5711
|
}, []), !t) return null;
|
|
5722
5712
|
const z = (S) => {
|
|
5723
5713
|
const { name: U, value: W } = S.target;
|
|
5724
|
-
|
|
5714
|
+
d((F) => ({ ...F, [U]: W })), m[U] && b((F) => ({ ...F, [U]: "" }));
|
|
5725
5715
|
}, C = (S) => {
|
|
5726
|
-
|
|
5716
|
+
y((U) => ({ ...U, [S]: !U[S] }));
|
|
5727
5717
|
}, q = () => {
|
|
5728
5718
|
const S = {};
|
|
5729
5719
|
return c.currentPassword || (S.currentPassword = "Current password is required"), c.newPassword ? c.newPassword.length < 6 && (S.newPassword = "Password must be at least 6 characters") : S.newPassword = "New password is required", c.newPassword !== c.confirmPassword && (S.confirmPassword = "Passwords do not match"), b(S), Object.keys(S).length === 0;
|
|
5730
5720
|
}, g = async (S) => {
|
|
5731
5721
|
if (S.preventDefault(), !!q()) {
|
|
5732
|
-
|
|
5722
|
+
u(!0);
|
|
5733
5723
|
try {
|
|
5734
5724
|
const { data: U } = await M.put(
|
|
5735
|
-
`${
|
|
5725
|
+
`${o}/users/change-password/${a}`,
|
|
5736
5726
|
{
|
|
5737
5727
|
appId: h,
|
|
5738
5728
|
currentPassword: c.currentPassword,
|
|
@@ -5744,7 +5734,7 @@ const Ws = [
|
|
|
5744
5734
|
}
|
|
5745
5735
|
}
|
|
5746
5736
|
);
|
|
5747
|
-
U.success ? (r(U.message || "Password updated successfully"),
|
|
5737
|
+
U.success ? (r(U.message || "Password updated successfully"), d({
|
|
5748
5738
|
currentPassword: "",
|
|
5749
5739
|
newPassword: "",
|
|
5750
5740
|
confirmPassword: ""
|
|
@@ -5752,7 +5742,7 @@ const Ws = [
|
|
|
5752
5742
|
} catch (U) {
|
|
5753
5743
|
s(U.response?.data?.message || "Something went wrong");
|
|
5754
5744
|
} finally {
|
|
5755
|
-
|
|
5745
|
+
u(!1);
|
|
5756
5746
|
}
|
|
5757
5747
|
}
|
|
5758
5748
|
}, I = [
|
|
@@ -5790,8 +5780,8 @@ const Ws = [
|
|
|
5790
5780
|
"div",
|
|
5791
5781
|
{
|
|
5792
5782
|
style: {
|
|
5793
|
-
backgroundColor:
|
|
5794
|
-
border: `1px solid ${
|
|
5783
|
+
backgroundColor: i.surface,
|
|
5784
|
+
border: `1px solid ${i.border}`,
|
|
5795
5785
|
borderRadius: "16px",
|
|
5796
5786
|
maxWidth: "440px",
|
|
5797
5787
|
width: "100%",
|
|
@@ -5830,11 +5820,11 @@ const Ws = [
|
|
|
5830
5820
|
width: "40px",
|
|
5831
5821
|
height: "40px",
|
|
5832
5822
|
borderRadius: "10px",
|
|
5833
|
-
background: `linear-gradient(135deg, ${
|
|
5823
|
+
background: `linear-gradient(135deg, ${i.accent}20, ${i.accent}40)`,
|
|
5834
5824
|
display: "flex",
|
|
5835
5825
|
alignItems: "center",
|
|
5836
5826
|
justifyContent: "center",
|
|
5837
|
-
color:
|
|
5827
|
+
color: i.accent,
|
|
5838
5828
|
flexShrink: 0
|
|
5839
5829
|
},
|
|
5840
5830
|
children: /* @__PURE__ */ n.jsx(me, { size: 20 })
|
|
@@ -5844,7 +5834,7 @@ const Ws = [
|
|
|
5844
5834
|
"h3",
|
|
5845
5835
|
{
|
|
5846
5836
|
style: {
|
|
5847
|
-
color:
|
|
5837
|
+
color: i.textPrimary,
|
|
5848
5838
|
margin: 0,
|
|
5849
5839
|
fontSize: "18px",
|
|
5850
5840
|
fontWeight: 600,
|
|
@@ -5864,7 +5854,7 @@ const Ws = [
|
|
|
5864
5854
|
style: {
|
|
5865
5855
|
background: "transparent",
|
|
5866
5856
|
border: "none",
|
|
5867
|
-
color:
|
|
5857
|
+
color: i.textTertiary,
|
|
5868
5858
|
cursor: "pointer",
|
|
5869
5859
|
padding: "8px",
|
|
5870
5860
|
borderRadius: "8px",
|
|
@@ -5876,10 +5866,10 @@ const Ws = [
|
|
|
5876
5866
|
justifyContent: "center"
|
|
5877
5867
|
},
|
|
5878
5868
|
onMouseOver: (S) => {
|
|
5879
|
-
S.currentTarget.style.backgroundColor =
|
|
5869
|
+
S.currentTarget.style.backgroundColor = i.border, S.currentTarget.style.color = i.textPrimary;
|
|
5880
5870
|
},
|
|
5881
5871
|
onMouseOut: (S) => {
|
|
5882
|
-
S.currentTarget.style.backgroundColor = "transparent", S.currentTarget.style.color =
|
|
5872
|
+
S.currentTarget.style.backgroundColor = "transparent", S.currentTarget.style.color = i.textTertiary;
|
|
5883
5873
|
},
|
|
5884
5874
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
|
|
5885
5875
|
}
|
|
@@ -5903,7 +5893,7 @@ const Ws = [
|
|
|
5903
5893
|
style: {
|
|
5904
5894
|
display: "block",
|
|
5905
5895
|
marginBottom: "8px",
|
|
5906
|
-
color:
|
|
5896
|
+
color: i.textPrimary,
|
|
5907
5897
|
fontSize: "14px",
|
|
5908
5898
|
fontWeight: 500,
|
|
5909
5899
|
lineHeight: "1.4"
|
|
@@ -5920,7 +5910,7 @@ const Ws = [
|
|
|
5920
5910
|
left: "14px",
|
|
5921
5911
|
top: "50%",
|
|
5922
5912
|
transform: "translateY(-50%)",
|
|
5923
|
-
color:
|
|
5913
|
+
color: i.textTertiary,
|
|
5924
5914
|
zIndex: 2
|
|
5925
5915
|
},
|
|
5926
5916
|
children: W
|
|
@@ -5939,19 +5929,19 @@ const Ws = [
|
|
|
5939
5929
|
width: "100%",
|
|
5940
5930
|
padding: "14px 48px 14px 44px",
|
|
5941
5931
|
borderRadius: "10px",
|
|
5942
|
-
border: `1.5px solid ${
|
|
5932
|
+
border: `1.5px solid ${m[S] ? i.error : i.border}`,
|
|
5943
5933
|
backgroundColor: "transparent",
|
|
5944
|
-
color:
|
|
5934
|
+
color: i.textPrimary,
|
|
5945
5935
|
fontSize: "15px",
|
|
5946
5936
|
outline: "none",
|
|
5947
5937
|
transition: "all 0.2s ease",
|
|
5948
5938
|
boxSizing: "border-box"
|
|
5949
5939
|
},
|
|
5950
5940
|
onFocus: (F) => {
|
|
5951
|
-
F.target.style.borderColor =
|
|
5941
|
+
F.target.style.borderColor = i.accent, F.target.style.boxShadow = `0 0 0 3px ${i.accent}20`;
|
|
5952
5942
|
},
|
|
5953
5943
|
onBlur: (F) => {
|
|
5954
|
-
F.target.style.borderColor =
|
|
5944
|
+
F.target.style.borderColor = m[S] ? i.error : i.border, F.target.style.boxShadow = "none";
|
|
5955
5945
|
}
|
|
5956
5946
|
}
|
|
5957
5947
|
),
|
|
@@ -5968,7 +5958,7 @@ const Ws = [
|
|
|
5968
5958
|
background: "transparent",
|
|
5969
5959
|
border: "none",
|
|
5970
5960
|
cursor: "pointer",
|
|
5971
|
-
color:
|
|
5961
|
+
color: i.textTertiary,
|
|
5972
5962
|
padding: "4px",
|
|
5973
5963
|
borderRadius: "4px",
|
|
5974
5964
|
width: "32px",
|
|
@@ -5978,21 +5968,21 @@ const Ws = [
|
|
|
5978
5968
|
justifyContent: "center"
|
|
5979
5969
|
},
|
|
5980
5970
|
onMouseOver: (F) => {
|
|
5981
|
-
F.currentTarget.style.backgroundColor =
|
|
5971
|
+
F.currentTarget.style.backgroundColor = i.border, F.currentTarget.style.color = i.textPrimary;
|
|
5982
5972
|
},
|
|
5983
5973
|
onMouseOut: (F) => {
|
|
5984
|
-
F.currentTarget.style.backgroundColor = "transparent", F.currentTarget.style.color =
|
|
5974
|
+
F.currentTarget.style.backgroundColor = "transparent", F.currentTarget.style.color = i.textTertiary;
|
|
5985
5975
|
},
|
|
5986
|
-
children: j[S] ? /* @__PURE__ */ n.jsx(
|
|
5976
|
+
children: j[S] ? /* @__PURE__ */ n.jsx(it, { size: 18 }) : /* @__PURE__ */ n.jsx(lt, { size: 18 })
|
|
5987
5977
|
}
|
|
5988
5978
|
)
|
|
5989
5979
|
] }),
|
|
5990
|
-
|
|
5980
|
+
m[S] && /* @__PURE__ */ n.jsxs(
|
|
5991
5981
|
"div",
|
|
5992
5982
|
{
|
|
5993
5983
|
style: {
|
|
5994
5984
|
fontSize: "13px",
|
|
5995
|
-
color:
|
|
5985
|
+
color: i.error,
|
|
5996
5986
|
marginTop: "6px",
|
|
5997
5987
|
display: "flex",
|
|
5998
5988
|
alignItems: "center",
|
|
@@ -6000,7 +5990,7 @@ const Ws = [
|
|
|
6000
5990
|
},
|
|
6001
5991
|
children: [
|
|
6002
5992
|
/* @__PURE__ */ n.jsx("span", { style: { fontSize: "16px" }, children: "⚠" }),
|
|
6003
|
-
|
|
5993
|
+
m[S]
|
|
6004
5994
|
]
|
|
6005
5995
|
}
|
|
6006
5996
|
)
|
|
@@ -6028,9 +6018,9 @@ const Ws = [
|
|
|
6028
6018
|
style: {
|
|
6029
6019
|
padding: "14px 24px",
|
|
6030
6020
|
borderRadius: "10px",
|
|
6031
|
-
border: `1.5px solid ${
|
|
6021
|
+
border: `1.5px solid ${i.border}`,
|
|
6032
6022
|
background: "transparent",
|
|
6033
|
-
color:
|
|
6023
|
+
color: i.textPrimary,
|
|
6034
6024
|
fontSize: "14px",
|
|
6035
6025
|
fontWeight: 500,
|
|
6036
6026
|
cursor: w ? "not-allowed" : "pointer",
|
|
@@ -6040,7 +6030,7 @@ const Ws = [
|
|
|
6040
6030
|
transition: "all 0.2s ease"
|
|
6041
6031
|
},
|
|
6042
6032
|
onMouseOver: (S) => {
|
|
6043
|
-
w || (S.currentTarget.style.backgroundColor =
|
|
6033
|
+
w || (S.currentTarget.style.backgroundColor = i.border, S.currentTarget.style.transform = "translateY(-1px)");
|
|
6044
6034
|
},
|
|
6045
6035
|
onMouseOut: (S) => {
|
|
6046
6036
|
w || (S.currentTarget.style.backgroundColor = "transparent", S.currentTarget.style.transform = "translateY(0)");
|
|
@@ -6057,7 +6047,7 @@ const Ws = [
|
|
|
6057
6047
|
padding: "14px 24px",
|
|
6058
6048
|
borderRadius: "10px",
|
|
6059
6049
|
border: "none",
|
|
6060
|
-
background: `linear-gradient(135deg, ${
|
|
6050
|
+
background: `linear-gradient(135deg, ${i.accent}, ${i.accent}E6)`,
|
|
6061
6051
|
color: "#fff",
|
|
6062
6052
|
fontSize: "14px",
|
|
6063
6053
|
fontWeight: 600,
|
|
@@ -6070,13 +6060,13 @@ const Ws = [
|
|
|
6070
6060
|
justifyContent: "center",
|
|
6071
6061
|
gap: "8px",
|
|
6072
6062
|
transition: "all 0.2s ease",
|
|
6073
|
-
boxShadow: w ? "none" : `0 4px 12px ${
|
|
6063
|
+
boxShadow: w ? "none" : `0 4px 12px ${i.accent}40`
|
|
6074
6064
|
},
|
|
6075
6065
|
onMouseOver: (S) => {
|
|
6076
|
-
w || (S.currentTarget.style.transform = "translateY(-1px)", S.currentTarget.style.boxShadow = `0 6px 20px ${
|
|
6066
|
+
w || (S.currentTarget.style.transform = "translateY(-1px)", S.currentTarget.style.boxShadow = `0 6px 20px ${i.accent}60`);
|
|
6077
6067
|
},
|
|
6078
6068
|
onMouseOut: (S) => {
|
|
6079
|
-
w || (S.currentTarget.style.transform = "translateY(0)", S.currentTarget.style.boxShadow = `0 4px 12px ${
|
|
6069
|
+
w || (S.currentTarget.style.transform = "translateY(0)", S.currentTarget.style.boxShadow = `0 4px 12px ${i.accent}40`);
|
|
6080
6070
|
},
|
|
6081
6071
|
children: w ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
6082
6072
|
/* @__PURE__ */ n.jsx(
|
|
@@ -6111,12 +6101,12 @@ const Ws = [
|
|
|
6111
6101
|
}
|
|
6112
6102
|
|
|
6113
6103
|
.change-password-modal::-webkit-scrollbar-thumb {
|
|
6114
|
-
background: ${
|
|
6104
|
+
background: ${i.border};
|
|
6115
6105
|
border-radius: 3px;
|
|
6116
6106
|
}
|
|
6117
6107
|
|
|
6118
6108
|
.change-password-modal::-webkit-scrollbar-thumb:hover {
|
|
6119
|
-
background: ${
|
|
6109
|
+
background: ${i.textTertiary};
|
|
6120
6110
|
}
|
|
6121
6111
|
|
|
6122
6112
|
/* Mobile responsiveness */
|
|
@@ -6146,23 +6136,23 @@ const Ws = [
|
|
|
6146
6136
|
onVerify: r,
|
|
6147
6137
|
onSendOTP: s,
|
|
6148
6138
|
verifyFormData: a,
|
|
6149
|
-
setVerifyFormData:
|
|
6150
|
-
otpSent:
|
|
6139
|
+
setVerifyFormData: i,
|
|
6140
|
+
otpSent: o,
|
|
6151
6141
|
verifying: l,
|
|
6152
6142
|
user: h,
|
|
6153
6143
|
colors: c,
|
|
6154
|
-
darkMode:
|
|
6144
|
+
darkMode: d
|
|
6155
6145
|
}) => {
|
|
6156
6146
|
if (!t) return null;
|
|
6157
|
-
const
|
|
6158
|
-
e(),
|
|
6147
|
+
const m = () => {
|
|
6148
|
+
e(), i({ email: h?.email || "", otp: "", appId: a.appId });
|
|
6159
6149
|
};
|
|
6160
6150
|
return /* @__PURE__ */ n.jsxs(
|
|
6161
6151
|
"div",
|
|
6162
6152
|
{
|
|
6163
6153
|
className: "modal-overlay",
|
|
6164
6154
|
style: {
|
|
6165
|
-
backgroundColor:
|
|
6155
|
+
backgroundColor: d ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.5)"
|
|
6166
6156
|
},
|
|
6167
6157
|
children: [
|
|
6168
6158
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -6179,7 +6169,7 @@ const Ws = [
|
|
|
6179
6169
|
/* @__PURE__ */ n.jsx(
|
|
6180
6170
|
"button",
|
|
6181
6171
|
{
|
|
6182
|
-
onClick:
|
|
6172
|
+
onClick: m,
|
|
6183
6173
|
className: "close-btn",
|
|
6184
6174
|
style: { color: c.textTertiary },
|
|
6185
6175
|
"aria-label": "Close verification modal",
|
|
@@ -6197,7 +6187,7 @@ const Ws = [
|
|
|
6197
6187
|
{
|
|
6198
6188
|
type: "email",
|
|
6199
6189
|
value: a.email,
|
|
6200
|
-
onChange: (b) =>
|
|
6190
|
+
onChange: (b) => i((w) => ({ ...w, email: b.target.value })),
|
|
6201
6191
|
placeholder: "Enter your email",
|
|
6202
6192
|
style: {
|
|
6203
6193
|
backgroundColor: c.surfaceLight,
|
|
@@ -6211,7 +6201,7 @@ const Ws = [
|
|
|
6211
6201
|
)
|
|
6212
6202
|
] })
|
|
6213
6203
|
] }),
|
|
6214
|
-
|
|
6204
|
+
o && /* @__PURE__ */ n.jsxs("div", { className: "form-group", children: [
|
|
6215
6205
|
/* @__PURE__ */ n.jsx("label", { style: { color: c.textSecondary }, children: "OTP" }),
|
|
6216
6206
|
/* @__PURE__ */ n.jsxs("div", { className: "input-container", children: [
|
|
6217
6207
|
/* @__PURE__ */ n.jsx(dr, { size: 18, style: { color: c.textTertiary }, "aria-hidden": "true" }),
|
|
@@ -6220,7 +6210,7 @@ const Ws = [
|
|
|
6220
6210
|
{
|
|
6221
6211
|
type: "text",
|
|
6222
6212
|
value: a.otp,
|
|
6223
|
-
onChange: (b) =>
|
|
6213
|
+
onChange: (b) => i((w) => ({ ...w, otp: b.target.value })),
|
|
6224
6214
|
placeholder: "Enter OTP",
|
|
6225
6215
|
style: {
|
|
6226
6216
|
backgroundColor: c.surfaceLight,
|
|
@@ -6234,7 +6224,7 @@ const Ws = [
|
|
|
6234
6224
|
)
|
|
6235
6225
|
] })
|
|
6236
6226
|
] }),
|
|
6237
|
-
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children:
|
|
6227
|
+
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children: o ? /* @__PURE__ */ n.jsxs(
|
|
6238
6228
|
"button",
|
|
6239
6229
|
{
|
|
6240
6230
|
type: "submit",
|
|
@@ -6321,7 +6311,7 @@ const Ws = [
|
|
|
6321
6311
|
}
|
|
6322
6312
|
|
|
6323
6313
|
.close-btn:hover {
|
|
6324
|
-
background-color: ${
|
|
6314
|
+
background-color: ${d ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)"};
|
|
6325
6315
|
}
|
|
6326
6316
|
|
|
6327
6317
|
.verify-form {
|
|
@@ -6429,17 +6419,17 @@ const Ws = [
|
|
|
6429
6419
|
darkMode: r = !0,
|
|
6430
6420
|
homeUrl: s,
|
|
6431
6421
|
onLogout: a,
|
|
6432
|
-
onVerify:
|
|
6433
|
-
primaryColor:
|
|
6422
|
+
onVerify: i,
|
|
6423
|
+
primaryColor: o = "#00C212"
|
|
6434
6424
|
}) => {
|
|
6435
|
-
const { baseUrl: l, apiKey: h, appId: c } = ge(), [
|
|
6425
|
+
const { baseUrl: l, apiKey: h, appId: c } = ge(), [d, m] = P(null), [b, w] = P(e), [u, j] = P(!0), [y, $] = P(!1), [R, z] = P(!1), [C, q] = P(!1), [g, I] = P(!1), [S, U] = P(!1), [W, F] = P(!1), [V, Z] = P(!1), [T, J] = P(!1), [A, O] = P(null), [K, Q] = P(!1), [G, f] = P({
|
|
6436
6426
|
email: "",
|
|
6437
6427
|
otp: "",
|
|
6438
6428
|
appId: c
|
|
6439
6429
|
}), [v, x] = P(!1), [k, _] = P(!1);
|
|
6440
6430
|
te(() => {
|
|
6441
6431
|
if (typeof window < "u") {
|
|
6442
|
-
const E = () =>
|
|
6432
|
+
const E = () => m(window.innerWidth);
|
|
6443
6433
|
return E(), window.addEventListener("resize", E), () => window.removeEventListener("resize", E);
|
|
6444
6434
|
}
|
|
6445
6435
|
}, []);
|
|
@@ -6498,7 +6488,7 @@ const Ws = [
|
|
|
6498
6488
|
w(X), localStorage.setItem(
|
|
6499
6489
|
"userInfo",
|
|
6500
6490
|
JSON.stringify({ ...X, token: t })
|
|
6501
|
-
), typeof
|
|
6491
|
+
), typeof i == "function" && i(X);
|
|
6502
6492
|
}
|
|
6503
6493
|
f({ email: "", otp: "", appId: c }), x(!1), F(!1);
|
|
6504
6494
|
} else
|
|
@@ -6583,8 +6573,8 @@ const Ws = [
|
|
|
6583
6573
|
textPrimary: "#ffffff",
|
|
6584
6574
|
textSecondary: "#d4d4d8",
|
|
6585
6575
|
textTertiary: "#a1a1aa",
|
|
6586
|
-
accent:
|
|
6587
|
-
accentHover: ft(
|
|
6576
|
+
accent: o,
|
|
6577
|
+
accentHover: ft(o, -15),
|
|
6588
6578
|
success: "#10b981",
|
|
6589
6579
|
error: "#ef4444",
|
|
6590
6580
|
border: "#27272a",
|
|
@@ -6597,14 +6587,14 @@ const Ws = [
|
|
|
6597
6587
|
textPrimary: "#18181b",
|
|
6598
6588
|
textSecondary: "#52525b",
|
|
6599
6589
|
textTertiary: "#71717a",
|
|
6600
|
-
accent:
|
|
6601
|
-
accentHover: ft(
|
|
6590
|
+
accent: o,
|
|
6591
|
+
accentHover: ft(o, -15),
|
|
6602
6592
|
success: "#10b981",
|
|
6603
6593
|
error: "#ef4444",
|
|
6604
6594
|
border: "#e4e4e7",
|
|
6605
6595
|
warning: "#d97706"
|
|
6606
6596
|
};
|
|
6607
|
-
if (
|
|
6597
|
+
if (u)
|
|
6608
6598
|
return /* @__PURE__ */ n.jsx(
|
|
6609
6599
|
"div",
|
|
6610
6600
|
{
|
|
@@ -6772,14 +6762,14 @@ const Ws = [
|
|
|
6772
6762
|
display: "grid",
|
|
6773
6763
|
gap: "24px",
|
|
6774
6764
|
gridTemplateColumns: "1fr",
|
|
6775
|
-
...
|
|
6765
|
+
...d && window.innerWidth >= 1024 && {
|
|
6776
6766
|
gridTemplateColumns: "1fr 2fr",
|
|
6777
6767
|
gap: "10px"
|
|
6778
6768
|
},
|
|
6779
|
-
...
|
|
6769
|
+
...d && window.innerWidth >= 768 && d && window.innerWidth < 1024 && {
|
|
6780
6770
|
gap: "10px"
|
|
6781
6771
|
},
|
|
6782
|
-
...
|
|
6772
|
+
...d && window.innerWidth >= 600 && d && window.innerWidth < 768 && {
|
|
6783
6773
|
gap: "28px"
|
|
6784
6774
|
}
|
|
6785
6775
|
},
|
|
@@ -6942,7 +6932,7 @@ const Ws = [
|
|
|
6942
6932
|
flexDirection: "column",
|
|
6943
6933
|
gap: "6px"
|
|
6944
6934
|
},
|
|
6945
|
-
children:
|
|
6935
|
+
children: y ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
6946
6936
|
/* @__PURE__ */ n.jsxs(
|
|
6947
6937
|
"button",
|
|
6948
6938
|
{
|
|
@@ -6964,7 +6954,7 @@ const Ws = [
|
|
|
6964
6954
|
gap: "8px",
|
|
6965
6955
|
textDecoration: "none",
|
|
6966
6956
|
minHeight: "36px",
|
|
6967
|
-
flex:
|
|
6957
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6968
6958
|
},
|
|
6969
6959
|
children: [
|
|
6970
6960
|
/* @__PURE__ */ n.jsx(Pe, { size: 16, "aria-hidden": "true" }),
|
|
@@ -6994,7 +6984,7 @@ const Ws = [
|
|
|
6994
6984
|
gap: "8px",
|
|
6995
6985
|
textDecoration: "none",
|
|
6996
6986
|
minHeight: "36px",
|
|
6997
|
-
flex:
|
|
6987
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6998
6988
|
},
|
|
6999
6989
|
children: [
|
|
7000
6990
|
R ? /* @__PURE__ */ n.jsx(
|
|
@@ -7030,7 +7020,7 @@ const Ws = [
|
|
|
7030
7020
|
gap: "8px",
|
|
7031
7021
|
textDecoration: "none",
|
|
7032
7022
|
minHeight: "36px",
|
|
7033
|
-
flex:
|
|
7023
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
7034
7024
|
},
|
|
7035
7025
|
children: [
|
|
7036
7026
|
/* @__PURE__ */ n.jsx(Is, { size: 16, "aria-hidden": "true" }),
|
|
@@ -7060,7 +7050,7 @@ const Ws = [
|
|
|
7060
7050
|
gap: "8px",
|
|
7061
7051
|
minHeight: "36px",
|
|
7062
7052
|
opacity: K ? 0.7 : 1,
|
|
7063
|
-
flex:
|
|
7053
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
7064
7054
|
},
|
|
7065
7055
|
children: [
|
|
7066
7056
|
K ? /* @__PURE__ */ n.jsx(
|
|
@@ -7270,7 +7260,7 @@ const Ws = [
|
|
|
7270
7260
|
display: "grid",
|
|
7271
7261
|
gap: "20px",
|
|
7272
7262
|
gridTemplateColumns: "1fr",
|
|
7273
|
-
...
|
|
7263
|
+
...d && window.innerWidth >= 600 && {
|
|
7274
7264
|
gridTemplateColumns: "1fr 1fr",
|
|
7275
7265
|
gap: "20px"
|
|
7276
7266
|
}
|
|
@@ -7303,7 +7293,7 @@ const Ws = [
|
|
|
7303
7293
|
]
|
|
7304
7294
|
}
|
|
7305
7295
|
),
|
|
7306
|
-
|
|
7296
|
+
y ? /* @__PURE__ */ n.jsx(
|
|
7307
7297
|
"input",
|
|
7308
7298
|
{
|
|
7309
7299
|
type: E.type,
|
|
@@ -7315,7 +7305,7 @@ const Ws = [
|
|
|
7315
7305
|
style: {
|
|
7316
7306
|
padding: "12px",
|
|
7317
7307
|
borderRadius: "8px",
|
|
7318
|
-
border: `1px solid ${
|
|
7308
|
+
border: `1px solid ${o}`,
|
|
7319
7309
|
backgroundColor: "transparent",
|
|
7320
7310
|
color: D.textPrimary,
|
|
7321
7311
|
fontSize: "12px",
|
|
@@ -7642,21 +7632,21 @@ const Ws = [
|
|
|
7642
7632
|
onLogout: r,
|
|
7643
7633
|
varient: s = "classic",
|
|
7644
7634
|
propUser: a,
|
|
7645
|
-
className:
|
|
7635
|
+
className: i = "",
|
|
7646
7636
|
// New URL props with defaults
|
|
7647
|
-
profileUrl:
|
|
7637
|
+
profileUrl: o,
|
|
7648
7638
|
settingsUrl: l,
|
|
7649
7639
|
// Menu item visibility with defaults
|
|
7650
7640
|
showProfileMenuItem: h = !0,
|
|
7651
7641
|
showSettingsMenuItem: c = !0,
|
|
7652
|
-
showViewProfileMenuItem:
|
|
7642
|
+
showViewProfileMenuItem: d = !0,
|
|
7653
7643
|
// Custom labels with defaults
|
|
7654
|
-
profileLabel:
|
|
7644
|
+
profileLabel: m = "My Profile",
|
|
7655
7645
|
settingsLabel: b = "Settings",
|
|
7656
7646
|
viewProfileLabel: w = "View Profile",
|
|
7657
|
-
logoutLabel:
|
|
7647
|
+
logoutLabel: u = "Sign Out"
|
|
7658
7648
|
}) => {
|
|
7659
|
-
const { baseUrl: j, apiKey:
|
|
7649
|
+
const { baseUrl: j, apiKey: y, appId: $ } = ge(), [R, z] = P(!1), [C, q] = P(null), [g, I] = P(!0), [S, U] = P(null), W = xt(null), F = xt(null), [V, Z] = P(!1), [T, J] = P(!1);
|
|
7660
7650
|
te(() => {
|
|
7661
7651
|
if (typeof window > "u") return;
|
|
7662
7652
|
const x = () => {
|
|
@@ -7943,7 +7933,7 @@ const Ws = [
|
|
|
7943
7933
|
}
|
|
7944
7934
|
}, Q = (x, k) => {
|
|
7945
7935
|
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), k());
|
|
7946
|
-
}, G = () =>
|
|
7936
|
+
}, G = () => o || C?.profileUrl, f = () => {
|
|
7947
7937
|
const x = G();
|
|
7948
7938
|
x && window.open(x, "_self", "noopener,noreferrer");
|
|
7949
7939
|
}, v = () => {
|
|
@@ -7954,7 +7944,7 @@ const Ws = [
|
|
|
7954
7944
|
{
|
|
7955
7945
|
style: O.wrapper,
|
|
7956
7946
|
ref: W,
|
|
7957
|
-
className:
|
|
7947
|
+
className: i,
|
|
7958
7948
|
role: "menu",
|
|
7959
7949
|
"aria-label": "User menu",
|
|
7960
7950
|
children: [
|
|
@@ -8112,7 +8102,7 @@ const Ws = [
|
|
|
8112
8102
|
tabIndex: 0,
|
|
8113
8103
|
children: [
|
|
8114
8104
|
/* @__PURE__ */ n.jsx(be, { style: O.icon, "aria-hidden": "true" }),
|
|
8115
|
-
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children:
|
|
8105
|
+
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: m })
|
|
8116
8106
|
]
|
|
8117
8107
|
}
|
|
8118
8108
|
),
|
|
@@ -8136,7 +8126,7 @@ const Ws = [
|
|
|
8136
8126
|
]
|
|
8137
8127
|
}
|
|
8138
8128
|
),
|
|
8139
|
-
|
|
8129
|
+
d && C.profileUrl && /* @__PURE__ */ n.jsxs(
|
|
8140
8130
|
"a",
|
|
8141
8131
|
{
|
|
8142
8132
|
href: C.profileUrl,
|
|
@@ -8180,7 +8170,7 @@ const Ws = [
|
|
|
8180
8170
|
"aria-hidden": "true"
|
|
8181
8171
|
}
|
|
8182
8172
|
),
|
|
8183
|
-
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children:
|
|
8173
|
+
/* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: u })
|
|
8184
8174
|
]
|
|
8185
8175
|
}
|
|
8186
8176
|
) })
|
|
@@ -8219,14 +8209,14 @@ const Ws = [
|
|
|
8219
8209
|
primaryColor: r = "#00C212",
|
|
8220
8210
|
onVerify: s
|
|
8221
8211
|
}) => {
|
|
8222
|
-
const { appId: a, baseUrl:
|
|
8212
|
+
const { appId: a, baseUrl: i, apiKey: o } = ge(), [l, h] = P({
|
|
8223
8213
|
email: t?.email || "",
|
|
8224
8214
|
otp: "",
|
|
8225
8215
|
appId: a
|
|
8226
|
-
}), [c,
|
|
8216
|
+
}), [c, d] = P(!1), [m, b] = P(!1), [w, u] = P(null), j = (g, I) => {
|
|
8227
8217
|
let S = parseInt(g.replace("#", ""), 16), U = (S >> 16) + I, W = (S >> 8 & 255) + I, F = (S & 255) + I;
|
|
8228
8218
|
return U = Math.min(255, Math.max(0, U)), W = Math.min(255, Math.max(0, W)), F = Math.min(255, Math.max(0, F)), `#${(F | W << 8 | U << 16).toString(16).padStart(6, "0")}`;
|
|
8229
|
-
},
|
|
8219
|
+
}, y = e ? {
|
|
8230
8220
|
surface: "#09090b",
|
|
8231
8221
|
surfaceLight: "#27272a",
|
|
8232
8222
|
textPrimary: "#ffffff",
|
|
@@ -8253,7 +8243,7 @@ const Ws = [
|
|
|
8253
8243
|
t?.email && h((g) => ({ ...g, email: t.email }));
|
|
8254
8244
|
}, [t?.email]);
|
|
8255
8245
|
const $ = (g, I) => {
|
|
8256
|
-
|
|
8246
|
+
u({ type: g, message: I }), setTimeout(() => u(null), 3e3);
|
|
8257
8247
|
}, R = async () => {
|
|
8258
8248
|
if (!l.email || !/\S+@\S+\.\S+/.test(l.email)) {
|
|
8259
8249
|
$("error", "Please enter a valid email");
|
|
@@ -8262,11 +8252,11 @@ const Ws = [
|
|
|
8262
8252
|
try {
|
|
8263
8253
|
b(!0);
|
|
8264
8254
|
const g = await M.post(
|
|
8265
|
-
`${
|
|
8255
|
+
`${i}/users/send-verify-otp/${t?.id}`,
|
|
8266
8256
|
{ email: l.email },
|
|
8267
|
-
{ headers: { "x-api-key":
|
|
8257
|
+
{ headers: { "x-api-key": o, "x-app-id": a } }
|
|
8268
8258
|
);
|
|
8269
|
-
g.data.success ? ($("success", g.data.message || "OTP sent!"),
|
|
8259
|
+
g.data.success ? ($("success", g.data.message || "OTP sent!"), d(!0)) : $("error", g.data.message || "Failed to send OTP");
|
|
8270
8260
|
} catch (g) {
|
|
8271
8261
|
$("error", g.response?.data?.message || "Server error");
|
|
8272
8262
|
} finally {
|
|
@@ -8279,10 +8269,10 @@ const Ws = [
|
|
|
8279
8269
|
}
|
|
8280
8270
|
try {
|
|
8281
8271
|
b(!0);
|
|
8282
|
-
const I = await M.post(`${
|
|
8272
|
+
const I = await M.post(`${i}/users/verify-email`, l);
|
|
8283
8273
|
if (I.data.success && t) {
|
|
8284
8274
|
const S = { ...t, isVerified: !0 };
|
|
8285
|
-
s?.(S), $("success", I.data.message || "Email verified!"),
|
|
8275
|
+
s?.(S), $("success", I.data.message || "Email verified!"), d(!1), h({ email: t.email, otp: "", appId: a });
|
|
8286
8276
|
} else
|
|
8287
8277
|
$("error", I.data.message || "Verification failed");
|
|
8288
8278
|
} catch (I) {
|
|
@@ -8294,9 +8284,9 @@ const Ws = [
|
|
|
8294
8284
|
width: "100%",
|
|
8295
8285
|
padding: "12px 12px 12px 40px",
|
|
8296
8286
|
borderRadius: 8,
|
|
8297
|
-
border: `1px solid ${
|
|
8298
|
-
backgroundColor:
|
|
8299
|
-
color:
|
|
8287
|
+
border: `1px solid ${y.border}`,
|
|
8288
|
+
backgroundColor: y.surfaceLight,
|
|
8289
|
+
color: y.textPrimary,
|
|
8300
8290
|
fontSize: 14,
|
|
8301
8291
|
outline: "none"
|
|
8302
8292
|
}, q = (g = !1) => ({
|
|
@@ -8306,7 +8296,7 @@ const Ws = [
|
|
|
8306
8296
|
color: "#fff",
|
|
8307
8297
|
fontWeight: 500,
|
|
8308
8298
|
cursor: g ? "not-allowed" : "pointer",
|
|
8309
|
-
background: `linear-gradient(to right, ${
|
|
8299
|
+
background: `linear-gradient(to right, ${y.accent}, ${y.accentHover})`,
|
|
8310
8300
|
opacity: g ? 0.7 : 1,
|
|
8311
8301
|
display: "flex",
|
|
8312
8302
|
alignItems: "center",
|
|
@@ -8325,10 +8315,10 @@ const Ws = [
|
|
|
8325
8315
|
display: "flex",
|
|
8326
8316
|
flexDirection: "column",
|
|
8327
8317
|
gap: 16,
|
|
8328
|
-
backgroundColor:
|
|
8318
|
+
backgroundColor: y.surface,
|
|
8329
8319
|
padding: 24,
|
|
8330
8320
|
borderRadius: 16,
|
|
8331
|
-
border: `1px solid ${
|
|
8321
|
+
border: `1px solid ${y.border}`
|
|
8332
8322
|
},
|
|
8333
8323
|
children: [
|
|
8334
8324
|
w && /* @__PURE__ */ n.jsxs(
|
|
@@ -8339,9 +8329,9 @@ const Ws = [
|
|
|
8339
8329
|
borderRadius: 12,
|
|
8340
8330
|
fontSize: 13,
|
|
8341
8331
|
fontWeight: 500,
|
|
8342
|
-
color: w.type === "success" ?
|
|
8343
|
-
border: `1px solid ${w.type === "success" ?
|
|
8344
|
-
backgroundColor: w.type === "success" ? `${
|
|
8332
|
+
color: w.type === "success" ? y.success : y.warning,
|
|
8333
|
+
border: `1px solid ${w.type === "success" ? y.success : y.warning}`,
|
|
8334
|
+
backgroundColor: w.type === "success" ? `${y.success}20` : `${y.warning}20`,
|
|
8345
8335
|
display: "flex",
|
|
8346
8336
|
alignItems: "center",
|
|
8347
8337
|
gap: 8
|
|
@@ -8353,7 +8343,7 @@ const Ws = [
|
|
|
8353
8343
|
}
|
|
8354
8344
|
),
|
|
8355
8345
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
8356
|
-
/* @__PURE__ */ n.jsx("label", { style: { color:
|
|
8346
|
+
/* @__PURE__ */ n.jsx("label", { style: { color: y.textSecondary }, children: "Email" }),
|
|
8357
8347
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
8358
8348
|
/* @__PURE__ */ n.jsx(
|
|
8359
8349
|
ce,
|
|
@@ -8364,7 +8354,7 @@ const Ws = [
|
|
|
8364
8354
|
left: 12,
|
|
8365
8355
|
top: "50%",
|
|
8366
8356
|
transform: "translateY(-50%)",
|
|
8367
|
-
color:
|
|
8357
|
+
color: y.textTertiary,
|
|
8368
8358
|
pointerEvents: "none"
|
|
8369
8359
|
}
|
|
8370
8360
|
}
|
|
@@ -8383,7 +8373,7 @@ const Ws = [
|
|
|
8383
8373
|
] })
|
|
8384
8374
|
] }),
|
|
8385
8375
|
c && /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
8386
|
-
/* @__PURE__ */ n.jsx("label", { style: { color:
|
|
8376
|
+
/* @__PURE__ */ n.jsx("label", { style: { color: y.textSecondary }, children: "OTP" }),
|
|
8387
8377
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
8388
8378
|
/* @__PURE__ */ n.jsx(
|
|
8389
8379
|
dt,
|
|
@@ -8394,7 +8384,7 @@ const Ws = [
|
|
|
8394
8384
|
left: 12,
|
|
8395
8385
|
top: "50%",
|
|
8396
8386
|
transform: "translateY(-50%)",
|
|
8397
|
-
color:
|
|
8387
|
+
color: y.textTertiary,
|
|
8398
8388
|
pointerEvents: "none"
|
|
8399
8389
|
}
|
|
8400
8390
|
}
|
|
@@ -8412,19 +8402,19 @@ const Ws = [
|
|
|
8412
8402
|
)
|
|
8413
8403
|
] })
|
|
8414
8404
|
] }),
|
|
8415
|
-
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 12 }, children: c ? /* @__PURE__ */ n.jsxs("button", { type: "submit", disabled:
|
|
8416
|
-
|
|
8417
|
-
|
|
8405
|
+
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 12 }, children: c ? /* @__PURE__ */ n.jsxs("button", { type: "submit", disabled: m, style: q(m), children: [
|
|
8406
|
+
m ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(de, { size: 16 }),
|
|
8407
|
+
m ? "Verifying..." : "Verify Email"
|
|
8418
8408
|
] }) : /* @__PURE__ */ n.jsxs(
|
|
8419
8409
|
"button",
|
|
8420
8410
|
{
|
|
8421
8411
|
type: "button",
|
|
8422
8412
|
onClick: R,
|
|
8423
|
-
disabled:
|
|
8424
|
-
style: q(
|
|
8413
|
+
disabled: m,
|
|
8414
|
+
style: q(m),
|
|
8425
8415
|
children: [
|
|
8426
|
-
|
|
8427
|
-
|
|
8416
|
+
m ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ut, { size: 16 }),
|
|
8417
|
+
m ? "Sending..." : "Send OTP"
|
|
8428
8418
|
]
|
|
8429
8419
|
}
|
|
8430
8420
|
) })
|