@neuctra/authix 1.1.28 → 1.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neuctra-authix.es.js +754 -753
- package/dist/neuctra-authix.umd.js +21 -21
- package/dist/react/SignedIn.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +10 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Le, { forwardRef as Nt, createElement as
|
|
1
|
+
import Le, { forwardRef as Nt, createElement as Xe, useState as O, useEffect as te, useRef as xt } from "react";
|
|
2
2
|
function Ut(t, e) {
|
|
3
3
|
return function() {
|
|
4
4
|
return t.apply(e, arguments);
|
|
@@ -7,11 +7,11 @@ function Ut(t, e) {
|
|
|
7
7
|
const { toString: fr } = Object.prototype, { getPrototypeOf: st } = Object, { iterator: Fe, toStringTag: Dt } = Symbol, Me = /* @__PURE__ */ ((t) => (e) => {
|
|
8
8
|
const r = fr.call(e);
|
|
9
9
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), ae = (t) => (t = t.toLowerCase(), (e) => Me(e) === t), We = (t) => (e) => typeof e === t, { isArray: we } = Array, ye = We("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 = ae("ArrayBuffer");
|
|
15
15
|
function xr(t) {
|
|
16
16
|
let e;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Lt(t.buffer), e;
|
|
@@ -29,24 +29,24 @@ const hr = We("string"), re = We("function"), Ft = We("number"), Te = (t) => t !
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
}, yr =
|
|
32
|
+
}, yr = ae("Date"), br = ae("File"), wr = ae("Blob"), jr = ae("FileList"), vr = (t) => Te(t) && re(t.pipe), Sr = (t) => {
|
|
33
33
|
let e;
|
|
34
34
|
return t && (typeof FormData == "function" && t instanceof FormData || re(t.append) && ((e = Me(t)) === "formdata" || // detect form-data instance
|
|
35
35
|
e === "object" && re(t.toString) && t.toString() === "[object FormData]"));
|
|
36
|
-
}, kr =
|
|
36
|
+
}, kr = ae("URLSearchParams"), [Er, Cr, Tr, Rr] = ["ReadableStream", "Request", "Response", "Headers"].map(ae), Ir = (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;
|
|
40
|
-
let s,
|
|
40
|
+
let s, o;
|
|
41
41
|
if (typeof t != "object" && (t = [t]), we(t))
|
|
42
|
-
for (s = 0,
|
|
42
|
+
for (s = 0, o = t.length; s < o; s++)
|
|
43
43
|
e.call(null, t[s], s, t);
|
|
44
44
|
else {
|
|
45
45
|
if (Ce(t))
|
|
46
46
|
return;
|
|
47
|
-
const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t),
|
|
47
|
+
const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t), a = i.length;
|
|
48
48
|
let l;
|
|
49
|
-
for (s = 0; s <
|
|
49
|
+
for (s = 0; s < a; s++)
|
|
50
50
|
l = i[s], e.call(null, t[l], l, t);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -55,35 +55,35 @@ function Mt(t, e) {
|
|
|
55
55
|
return null;
|
|
56
56
|
e = e.toLowerCase();
|
|
57
57
|
const r = Object.keys(t);
|
|
58
|
-
let s = r.length,
|
|
58
|
+
let s = r.length, o;
|
|
59
59
|
for (; s-- > 0; )
|
|
60
|
-
if (
|
|
61
|
-
return
|
|
60
|
+
if (o = r[s], e === o.toLowerCase())
|
|
61
|
+
return o;
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const fe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Wt = (t) => !ye(t) && t !== fe;
|
|
65
65
|
function Ze() {
|
|
66
|
-
const { caseless: t, skipUndefined: e } = Wt(this) && this || {}, r = {}, s = (
|
|
67
|
-
const
|
|
68
|
-
Ae(r[
|
|
66
|
+
const { caseless: t, skipUndefined: e } = Wt(this) && this || {}, r = {}, s = (o, i) => {
|
|
67
|
+
const a = t && Mt(r, i) || i;
|
|
68
|
+
Ae(r[a]) && Ae(o) ? r[a] = Ze(r[a], o) : Ae(o) ? r[a] = Ze({}, o) : we(o) ? r[a] = o.slice() : (!e || !ye(o)) && (r[a] = o);
|
|
69
69
|
};
|
|
70
|
-
for (let
|
|
71
|
-
arguments[
|
|
70
|
+
for (let o = 0, i = arguments.length; o < i; o++)
|
|
71
|
+
arguments[o] && Re(arguments[o], s);
|
|
72
72
|
return r;
|
|
73
73
|
}
|
|
74
|
-
const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (
|
|
75
|
-
r && re(
|
|
74
|
+
const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (o, i) => {
|
|
75
|
+
r && re(o) ? t[i] = Ut(o, r) : t[i] = o;
|
|
76
76
|
}, { allOwnKeys: s }), t), Or = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), zr = (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
|
}, Ar = (t, e, r, s) => {
|
|
81
|
-
let
|
|
81
|
+
let o, i, a;
|
|
82
82
|
const l = {};
|
|
83
83
|
if (e = e || {}, t == null) return e;
|
|
84
84
|
do {
|
|
85
|
-
for (
|
|
86
|
-
|
|
85
|
+
for (o = Object.getOwnPropertyNames(t), i = o.length; i-- > 0; )
|
|
86
|
+
a = o[i], (!s || s(a, t, e)) && !l[a] && (e[a] = t[a], l[a] = !0);
|
|
87
87
|
t = r !== !1 && st(t);
|
|
88
88
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
89
89
|
return e;
|
|
@@ -102,9 +102,9 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, i) => {
|
|
|
102
102
|
return r;
|
|
103
103
|
}, Nr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && st(Uint8Array)), Ur = (t, e) => {
|
|
104
104
|
const s = (t && t[Fe]).call(t);
|
|
105
|
-
let
|
|
106
|
-
for (; (
|
|
107
|
-
const i =
|
|
105
|
+
let o;
|
|
106
|
+
for (; (o = s.next()) && !o.done; ) {
|
|
107
|
+
const i = o.value;
|
|
108
108
|
e.call(t, i[0], i[1]);
|
|
109
109
|
}
|
|
110
110
|
}, Dr = (t, e) => {
|
|
@@ -113,16 +113,16 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, i) => {
|
|
|
113
113
|
for (; (r = t.exec(e)) !== null; )
|
|
114
114
|
s.push(r);
|
|
115
115
|
return s;
|
|
116
|
-
}, Lr =
|
|
116
|
+
}, Lr = ae("HTMLFormElement"), Fr = (t) => t.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
|
-
function(r, s,
|
|
119
|
-
return s.toUpperCase() +
|
|
118
|
+
function(r, s, o) {
|
|
119
|
+
return s.toUpperCase() + o;
|
|
120
120
|
}
|
|
121
|
-
), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Mr =
|
|
121
|
+
), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Mr = ae("RegExp"), qt = (t, e) => {
|
|
122
122
|
const r = Object.getOwnPropertyDescriptors(t), s = {};
|
|
123
|
-
Re(r, (
|
|
124
|
-
let
|
|
125
|
-
(
|
|
123
|
+
Re(r, (o, i) => {
|
|
124
|
+
let a;
|
|
125
|
+
(a = e(o, i, t)) !== !1 && (s[i] = a || o);
|
|
126
126
|
}), Object.defineProperties(t, s);
|
|
127
127
|
}, Wr = (t) => {
|
|
128
128
|
qt(t, (e, r) => {
|
|
@@ -140,8 +140,8 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, i) => {
|
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
}, qr = (t, e) => {
|
|
143
|
-
const r = {}, s = (
|
|
144
|
-
|
|
143
|
+
const r = {}, s = (o) => {
|
|
144
|
+
o.forEach((i) => {
|
|
145
145
|
r[i] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
@@ -152,32 +152,32 @@ function Vr(t) {
|
|
|
152
152
|
return !!(t && re(t.append) && t[Dt] === "FormData" && t[Fe]);
|
|
153
153
|
}
|
|
154
154
|
const Yr = (t) => {
|
|
155
|
-
const e = new Array(10), r = (s,
|
|
155
|
+
const e = new Array(10), r = (s, o) => {
|
|
156
156
|
if (Te(s)) {
|
|
157
157
|
if (e.indexOf(s) >= 0)
|
|
158
158
|
return;
|
|
159
159
|
if (Ce(s))
|
|
160
160
|
return s;
|
|
161
161
|
if (!("toJSON" in s)) {
|
|
162
|
-
e[
|
|
162
|
+
e[o] = s;
|
|
163
163
|
const i = we(s) ? [] : {};
|
|
164
|
-
return Re(s, (
|
|
165
|
-
const h = r(
|
|
164
|
+
return Re(s, (a, l) => {
|
|
165
|
+
const h = r(a, o + 1);
|
|
166
166
|
!ye(h) && (i[l] = h);
|
|
167
|
-
}), e[
|
|
167
|
+
}), e[o] = void 0, i;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return s;
|
|
171
171
|
};
|
|
172
172
|
return r(t, 0);
|
|
173
|
-
}, Kr =
|
|
174
|
-
|
|
175
|
-
}, !1), (
|
|
176
|
-
s.push(
|
|
173
|
+
}, Kr = ae("AsyncFunction"), Jr = (t) => t && (Te(t) || re(t)) && re(t.then) && re(t.catch), Bt = ((t, e) => t ? setImmediate : e ? ((r, s) => (fe.addEventListener("message", ({ source: o, data: i }) => {
|
|
174
|
+
o === fe && i === r && s.length && s.shift()();
|
|
175
|
+
}, !1), (o) => {
|
|
176
|
+
s.push(o), fe.postMessage(r, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
|
-
re(
|
|
180
|
-
),
|
|
179
|
+
re(fe.postMessage)
|
|
180
|
+
), Gr = typeof queueMicrotask < "u" ? queueMicrotask.bind(fe) : typeof process < "u" && process.nextTick || Bt, Xr = (t) => t != null && re(t[Fe]), p = {
|
|
181
181
|
isArray: we,
|
|
182
182
|
isArrayBuffer: Lt,
|
|
183
183
|
isBuffer: Ce,
|
|
@@ -211,7 +211,7 @@ const Yr = (t) => {
|
|
|
211
211
|
inherits: zr,
|
|
212
212
|
toFlatObject: Ar,
|
|
213
213
|
kindOf: Me,
|
|
214
|
-
kindOfTest:
|
|
214
|
+
kindOfTest: ae,
|
|
215
215
|
endsWith: _r,
|
|
216
216
|
toArray: $r,
|
|
217
217
|
forEachEntry: Ur,
|
|
@@ -227,18 +227,18 @@ const Yr = (t) => {
|
|
|
227
227
|
noop: Br,
|
|
228
228
|
toFiniteNumber: Hr,
|
|
229
229
|
findKey: Mt,
|
|
230
|
-
global:
|
|
230
|
+
global: fe,
|
|
231
231
|
isContextDefined: Wt,
|
|
232
232
|
isSpecCompliantForm: Vr,
|
|
233
233
|
toJSONObject: Yr,
|
|
234
234
|
isAsyncFn: Kr,
|
|
235
235
|
isThenable: Jr,
|
|
236
236
|
setImmediate: Bt,
|
|
237
|
-
asap:
|
|
238
|
-
isIterable:
|
|
237
|
+
asap: Gr,
|
|
238
|
+
isIterable: Xr
|
|
239
239
|
};
|
|
240
|
-
function L(t, e, r, s,
|
|
241
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), s && (this.request = s),
|
|
240
|
+
function L(t, e, r, s, o) {
|
|
241
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), s && (this.request = s), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
242
242
|
}
|
|
243
243
|
p.inherits(L, Error, {
|
|
244
244
|
toJSON: function() {
|
|
@@ -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,
|
|
285
|
-
const
|
|
286
|
-
p.toFlatObject(t,
|
|
287
|
-
return
|
|
284
|
+
L.from = (t, e, r, s, o, i) => {
|
|
285
|
+
const a = Object.create(Ht);
|
|
286
|
+
p.toFlatObject(t, a, function(u) {
|
|
287
|
+
return u !== 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(a, l, h, r, s, o), t && a.cause == null && Object.defineProperty(a, "cause", { value: t, configurable: !0 }), a.name = t && t.name || "Error", i && Object.assign(a, i), a;
|
|
291
291
|
};
|
|
292
292
|
const Zr = 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(
|
|
301
|
-
return
|
|
300
|
+
return t ? t.concat(e).map(function(o, i) {
|
|
301
|
+
return o = Yt(o), !r && i ? "[" + o + "]" : o;
|
|
302
302
|
}).join(r ? "." : "") : e;
|
|
303
303
|
}
|
|
304
304
|
function Qr(t) {
|
|
@@ -317,46 +317,46 @@ function qe(t, e, r) {
|
|
|
317
317
|
}, !1, function(j, m) {
|
|
318
318
|
return !p.isUndefined(m[j]);
|
|
319
319
|
});
|
|
320
|
-
const s = r.metaTokens,
|
|
321
|
-
if (!p.isFunction(
|
|
320
|
+
const s = r.metaTokens, o = r.visitor || u, i = r.dots, a = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(e);
|
|
321
|
+
if (!p.isFunction(o))
|
|
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(d) {
|
|
324
|
+
if (d === null) return "";
|
|
325
|
+
if (p.isDate(d))
|
|
326
|
+
return d.toISOString();
|
|
327
|
+
if (p.isBoolean(d))
|
|
328
|
+
return d.toString();
|
|
329
|
+
if (!h && p.isBlob(d))
|
|
330
330
|
throw new L("Blob is not supported. Use a Buffer instead.");
|
|
331
|
-
return p.isArrayBuffer(
|
|
331
|
+
return p.isArrayBuffer(d) || p.isTypedArray(d) ? h && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
332
332
|
}
|
|
333
|
-
function d
|
|
334
|
-
let _ =
|
|
335
|
-
if (
|
|
333
|
+
function u(d, j, m) {
|
|
334
|
+
let _ = d;
|
|
335
|
+
if (d && !m && typeof d == "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), d = JSON.stringify(d);
|
|
338
|
+
else if (p.isArray(d) && Qr(d) || (p.isFileList(d) || p.endsWith(j, "[]")) && (_ = p.toArray(d)))
|
|
339
339
|
return j = Yt(j), _.forEach(function(A, C) {
|
|
340
340
|
!(p.isUndefined(A) || A === null) && e.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
|
|
342
|
+
a === !0 ? gt([j], C, i) : a === null ? j : j + "[]",
|
|
343
343
|
c(A)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return Qe(
|
|
347
|
+
return Qe(d) ? !0 : (e.append(gt(m, j, i), c(d)), !1);
|
|
348
348
|
}
|
|
349
349
|
const b = [], y = Object.assign(en, {
|
|
350
|
-
defaultVisitor:
|
|
350
|
+
defaultVisitor: u,
|
|
351
351
|
convertValue: c,
|
|
352
352
|
isVisitable: Qe
|
|
353
353
|
});
|
|
354
|
-
function w(
|
|
355
|
-
if (!p.isUndefined(
|
|
356
|
-
if (b.indexOf(
|
|
354
|
+
function w(d, j) {
|
|
355
|
+
if (!p.isUndefined(d)) {
|
|
356
|
+
if (b.indexOf(d) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + j.join("."));
|
|
358
|
-
b.push(
|
|
359
|
-
(!(p.isUndefined(_) || _ === null) &&
|
|
358
|
+
b.push(d), p.forEach(d, function(_, R) {
|
|
359
|
+
(!(p.isUndefined(_) || _ === null) && o.call(
|
|
360
360
|
e,
|
|
361
361
|
_,
|
|
362
362
|
p.isString(R) ? R.trim() : R,
|
|
@@ -384,10 +384,10 @@ function mt(t) {
|
|
|
384
384
|
return e[s];
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function ot(t, e) {
|
|
388
388
|
this._pairs = [], t && qe(t, this, e);
|
|
389
389
|
}
|
|
390
|
-
const Kt =
|
|
390
|
+
const Kt = ot.prototype;
|
|
391
391
|
Kt.append = function(e, r) {
|
|
392
392
|
this._pairs.push([e, r]);
|
|
393
393
|
};
|
|
@@ -395,8 +395,8 @@ Kt.toString = function(e) {
|
|
|
395
395
|
const r = e ? function(s) {
|
|
396
396
|
return e.call(this, s, mt);
|
|
397
397
|
} : mt;
|
|
398
|
-
return this._pairs.map(function(
|
|
399
|
-
return r(
|
|
398
|
+
return this._pairs.map(function(o) {
|
|
399
|
+
return r(o[0]) + "=" + r(o[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
402
|
function tn(t) {
|
|
@@ -409,11 +409,11 @@ function Jt(t, e, r) {
|
|
|
409
409
|
p.isFunction(r) && (r = {
|
|
410
410
|
serialize: r
|
|
411
411
|
});
|
|
412
|
-
const
|
|
412
|
+
const o = r && r.serialize;
|
|
413
413
|
let i;
|
|
414
|
-
if (
|
|
415
|
-
const
|
|
416
|
-
|
|
414
|
+
if (o ? i = o(e, r) : i = p.isURLSearchParams(e) ? e.toString() : new ot(e, r).toString(s), i) {
|
|
415
|
+
const a = t.indexOf("#");
|
|
416
|
+
a !== -1 && (t = t.slice(0, a)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
417
417
|
}
|
|
418
418
|
return t;
|
|
419
419
|
}
|
|
@@ -471,11 +471,11 @@ class yt {
|
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const Gt = {
|
|
475
475
|
silentJSONParsing: !0,
|
|
476
476
|
forcedJSONParsing: !0,
|
|
477
477
|
clarifyTimeoutError: !1
|
|
478
|
-
}, rn = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
478
|
+
}, rn = typeof URLSearchParams < "u" ? URLSearchParams : ot, nn = typeof FormData < "u" ? FormData : null, sn = typeof Blob < "u" ? Blob : null, on = {
|
|
479
479
|
isBrowser: !0,
|
|
480
480
|
classes: {
|
|
481
481
|
URLSearchParams: rn,
|
|
@@ -483,21 +483,21 @@ const Xt = {
|
|
|
483
483
|
Blob: sn
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
},
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cn =
|
|
486
|
+
}, at = typeof window < "u" && typeof document < "u", et = typeof navigator == "object" && navigator || void 0, an = at && (!et || ["ReactNative", "NativeScript", "NS"].indexOf(et.product) < 0), ln = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cn = at && window.location.href || "http://localhost", dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
|
-
hasBrowserEnv:
|
|
490
|
-
hasStandardBrowserEnv:
|
|
489
|
+
hasBrowserEnv: at,
|
|
490
|
+
hasStandardBrowserEnv: an,
|
|
491
491
|
hasStandardBrowserWebWorkerEnv: ln,
|
|
492
492
|
navigator: et,
|
|
493
493
|
origin: cn
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), ee = {
|
|
495
495
|
...dn,
|
|
496
|
-
...
|
|
496
|
+
...on
|
|
497
497
|
};
|
|
498
498
|
function un(t, e) {
|
|
499
499
|
return qe(t, new ee.classes.URLSearchParams(), {
|
|
500
|
-
visitor: function(r, s,
|
|
500
|
+
visitor: function(r, s, o, i) {
|
|
501
501
|
return ee.isNode && p.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...e
|
|
@@ -509,23 +509,23 @@ function pn(t) {
|
|
|
509
509
|
function fn(t) {
|
|
510
510
|
const e = {}, r = Object.keys(t);
|
|
511
511
|
let s;
|
|
512
|
-
const
|
|
512
|
+
const o = r.length;
|
|
513
513
|
let i;
|
|
514
|
-
for (s = 0; s <
|
|
514
|
+
for (s = 0; s < o; s++)
|
|
515
515
|
i = r[s], e[i] = t[i];
|
|
516
516
|
return e;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
function e(r, s,
|
|
520
|
-
let
|
|
521
|
-
if (
|
|
522
|
-
const l = Number.isFinite(+
|
|
523
|
-
return
|
|
518
|
+
function Xt(t) {
|
|
519
|
+
function e(r, s, o, i) {
|
|
520
|
+
let a = r[i++];
|
|
521
|
+
if (a === "__proto__") return !0;
|
|
522
|
+
const l = Number.isFinite(+a), h = i >= r.length;
|
|
523
|
+
return a = !a && p.isArray(o) ? o.length : a, h ? (p.hasOwnProp(o, a) ? o[a] = [o[a], s] : o[a] = s, !l) : ((!o[a] || !p.isObject(o[a])) && (o[a] = []), e(r, s, o[a], i) && p.isArray(o[a]) && (o[a] = fn(o[a])), !l);
|
|
524
524
|
}
|
|
525
525
|
if (p.isFormData(t) && p.isFunction(t.entries)) {
|
|
526
526
|
const r = {};
|
|
527
|
-
return p.forEachEntry(t, (s,
|
|
528
|
-
e(pn(s),
|
|
527
|
+
return p.forEachEntry(t, (s, o) => {
|
|
528
|
+
e(pn(s), o, r, 0);
|
|
529
529
|
}), r;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
@@ -541,12 +541,12 @@ function xn(t, e, r) {
|
|
|
541
541
|
return (r || JSON.stringify)(t);
|
|
542
542
|
}
|
|
543
543
|
const Ie = {
|
|
544
|
-
transitional:
|
|
544
|
+
transitional: Gt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(e, r) {
|
|
547
|
-
const s = r.getContentType() || "",
|
|
547
|
+
const s = r.getContentType() || "", o = s.indexOf("application/json") > -1, i = p.isObject(e);
|
|
548
548
|
if (i && p.isHTMLForm(e) && (e = new FormData(e)), p.isFormData(e))
|
|
549
|
-
return
|
|
549
|
+
return o ? 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;
|
|
552
552
|
if (p.isArrayBufferView(e))
|
|
@@ -566,18 +566,18 @@ const Ie = {
|
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return i ||
|
|
569
|
+
return i || o ? (r.setContentType("application/json", !1), xn(e)) : e;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(e) {
|
|
572
|
-
const r = this.transitional || Ie.transitional, s = r && r.forcedJSONParsing,
|
|
572
|
+
const r = this.transitional || Ie.transitional, s = r && r.forcedJSONParsing, o = this.responseType === "json";
|
|
573
573
|
if (p.isResponse(e) || p.isReadableStream(e))
|
|
574
574
|
return e;
|
|
575
|
-
if (e && p.isString(e) && (s && !this.responseType ||
|
|
576
|
-
const
|
|
575
|
+
if (e && p.isString(e) && (s && !this.responseType || o)) {
|
|
576
|
+
const a = !(r && r.silentJSONParsing) && o;
|
|
577
577
|
try {
|
|
578
578
|
return JSON.parse(e, this.parseReviver);
|
|
579
579
|
} catch (l) {
|
|
580
|
-
if (
|
|
580
|
+
if (a)
|
|
581
581
|
throw l.name === "SyntaxError" ? L.from(l, L.ERR_BAD_RESPONSE, this, null, this.response) : l;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
@@ -629,10 +629,10 @@ const hn = p.toObjectSet([
|
|
|
629
629
|
"user-agent"
|
|
630
630
|
]), gn = (t) => {
|
|
631
631
|
const e = {};
|
|
632
|
-
let r, s,
|
|
632
|
+
let r, s, o;
|
|
633
633
|
return t && t.split(`
|
|
634
|
-
`).forEach(function(
|
|
635
|
-
|
|
634
|
+
`).forEach(function(a) {
|
|
635
|
+
o = a.indexOf(":"), r = a.substring(0, o).trim().toLowerCase(), s = a.substring(o + 1).trim(), !(!r || e[r] && hn[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 Se(t) {
|
|
@@ -649,10 +649,10 @@ function mn(t) {
|
|
|
649
649
|
return e;
|
|
650
650
|
}
|
|
651
651
|
const yn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
652
|
-
function Ye(t, e, r, s,
|
|
652
|
+
function Ye(t, e, r, s, o) {
|
|
653
653
|
if (p.isFunction(s))
|
|
654
654
|
return s.call(this, e, r);
|
|
655
|
-
if (
|
|
655
|
+
if (o && (e = r), !!p.isString(e)) {
|
|
656
656
|
if (p.isString(s))
|
|
657
657
|
return e.indexOf(s) !== -1;
|
|
658
658
|
if (p.isRegExp(s))
|
|
@@ -666,8 +666,8 @@ function wn(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(
|
|
670
|
-
return this[s].call(this, e,
|
|
669
|
+
value: function(o, i, a) {
|
|
670
|
+
return this[s].call(this, e, o, i, a);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
@@ -678,27 +678,27 @@ let ne = class {
|
|
|
678
678
|
e && this.set(e);
|
|
679
679
|
}
|
|
680
680
|
set(e, r, s) {
|
|
681
|
-
const
|
|
681
|
+
const o = this;
|
|
682
682
|
function i(l, h, c) {
|
|
683
|
-
const
|
|
684
|
-
if (!
|
|
683
|
+
const u = Se(h);
|
|
684
|
+
if (!u)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const b = p.findKey(
|
|
687
|
-
(!b ||
|
|
686
|
+
const b = p.findKey(o, u);
|
|
687
|
+
(!b || o[b] === void 0 || c === !0 || c === void 0 && o[b] !== !1) && (o[b || h] = _e(l));
|
|
688
688
|
}
|
|
689
|
-
const
|
|
689
|
+
const a = (l, h) => p.forEach(l, (c, u) => i(c, u, h));
|
|
690
690
|
if (p.isPlainObject(e) || e instanceof this.constructor)
|
|
691
|
-
|
|
691
|
+
a(e, r);
|
|
692
692
|
else if (p.isString(e) && (e = e.trim()) && !yn(e))
|
|
693
|
-
|
|
693
|
+
a(gn(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 u of e) {
|
|
697
|
+
if (!p.isArray(u))
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
-
l[c =
|
|
699
|
+
l[c = u[0]] = (h = l[c]) ? p.isArray(h) ? [...h, u[1]] : [h, u[1]] : u[1];
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
a(l, r);
|
|
702
702
|
} else
|
|
703
703
|
e != null && i(r, e, s);
|
|
704
704
|
return this;
|
|
@@ -707,15 +707,15 @@ let ne = class {
|
|
|
707
707
|
if (e = Se(e), e) {
|
|
708
708
|
const s = p.findKey(this, e);
|
|
709
709
|
if (s) {
|
|
710
|
-
const
|
|
710
|
+
const o = this[s];
|
|
711
711
|
if (!r)
|
|
712
|
-
return
|
|
712
|
+
return o;
|
|
713
713
|
if (r === !0)
|
|
714
|
-
return mn(
|
|
714
|
+
return mn(o);
|
|
715
715
|
if (p.isFunction(r))
|
|
716
|
-
return r.call(this,
|
|
716
|
+
return r.call(this, o, s);
|
|
717
717
|
if (p.isRegExp(r))
|
|
718
|
-
return r.exec(
|
|
718
|
+
return r.exec(o);
|
|
719
719
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
720
720
|
}
|
|
721
721
|
}
|
|
@@ -729,34 +729,34 @@ let ne = class {
|
|
|
729
729
|
}
|
|
730
730
|
delete(e, r) {
|
|
731
731
|
const s = this;
|
|
732
|
-
let
|
|
733
|
-
function i(
|
|
734
|
-
if (
|
|
735
|
-
const l = p.findKey(s,
|
|
736
|
-
l && (!r || Ye(s, s[l], l, r)) && (delete s[l],
|
|
732
|
+
let o = !1;
|
|
733
|
+
function i(a) {
|
|
734
|
+
if (a = Se(a), a) {
|
|
735
|
+
const l = p.findKey(s, a);
|
|
736
|
+
l && (!r || Ye(s, s[l], l, r)) && (delete s[l], o = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
return p.isArray(e) ? e.forEach(i) : i(e),
|
|
739
|
+
return p.isArray(e) ? e.forEach(i) : i(e), o;
|
|
740
740
|
}
|
|
741
741
|
clear(e) {
|
|
742
742
|
const r = Object.keys(this);
|
|
743
|
-
let s = r.length,
|
|
743
|
+
let s = r.length, o = !1;
|
|
744
744
|
for (; s--; ) {
|
|
745
745
|
const i = r[s];
|
|
746
|
-
(!e || Ye(this, this[i], i, e, !0)) && (delete this[i],
|
|
746
|
+
(!e || Ye(this, this[i], i, e, !0)) && (delete this[i], o = !0);
|
|
747
747
|
}
|
|
748
|
-
return
|
|
748
|
+
return o;
|
|
749
749
|
}
|
|
750
750
|
normalize(e) {
|
|
751
751
|
const r = this, s = {};
|
|
752
|
-
return p.forEach(this, (
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
r[
|
|
752
|
+
return p.forEach(this, (o, i) => {
|
|
753
|
+
const a = p.findKey(s, i);
|
|
754
|
+
if (a) {
|
|
755
|
+
r[a] = _e(o), delete r[i];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
758
|
const l = e ? bn(i) : String(i).trim();
|
|
759
|
-
l !== i && delete r[i], r[l] = _e(
|
|
759
|
+
l !== i && delete r[i], r[l] = _e(o), s[l] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...e) {
|
|
@@ -764,8 +764,8 @@ let ne = class {
|
|
|
764
764
|
}
|
|
765
765
|
toJSON(e) {
|
|
766
766
|
const r = /* @__PURE__ */ Object.create(null);
|
|
767
|
-
return p.forEach(this, (s,
|
|
768
|
-
s != null && s !== !1 && (r[
|
|
767
|
+
return p.forEach(this, (s, o) => {
|
|
768
|
+
s != null && s !== !1 && (r[o] = e && p.isArray(s) ? s.join(", ") : s);
|
|
769
769
|
}), r;
|
|
770
770
|
}
|
|
771
771
|
[Symbol.iterator]() {
|
|
@@ -786,15 +786,15 @@ let ne = class {
|
|
|
786
786
|
}
|
|
787
787
|
static concat(e, ...r) {
|
|
788
788
|
const s = new this(e);
|
|
789
|
-
return r.forEach((
|
|
789
|
+
return r.forEach((o) => s.set(o)), s;
|
|
790
790
|
}
|
|
791
791
|
static accessor(e) {
|
|
792
792
|
const s = (this[bt] = this[bt] = {
|
|
793
793
|
accessors: {}
|
|
794
|
-
}).accessors,
|
|
795
|
-
function i(
|
|
796
|
-
const l = Se(
|
|
797
|
-
s[l] || (wn(
|
|
794
|
+
}).accessors, o = this.prototype;
|
|
795
|
+
function i(a) {
|
|
796
|
+
const l = Se(a);
|
|
797
|
+
s[l] || (wn(o, a), s[l] = !0);
|
|
798
798
|
}
|
|
799
799
|
return p.isArray(e) ? e.forEach(i) : i(e), this;
|
|
800
800
|
}
|
|
@@ -811,11 +811,11 @@ p.reduceDescriptors(ne.prototype, ({ value: t }, e) => {
|
|
|
811
811
|
});
|
|
812
812
|
p.freezeMethods(ne);
|
|
813
813
|
function Ke(t, e) {
|
|
814
|
-
const r = this || Ie, s = e || r,
|
|
814
|
+
const r = this || Ie, s = e || r, o = ne.from(s.headers);
|
|
815
815
|
let i = s.data;
|
|
816
816
|
return p.forEach(t, function(l) {
|
|
817
|
-
i = l.call(r, i,
|
|
818
|
-
}),
|
|
817
|
+
i = l.call(r, i, o.normalize(), e ? e.status : void 0);
|
|
818
|
+
}), o.normalize(), i;
|
|
819
819
|
}
|
|
820
820
|
function Zt(t) {
|
|
821
821
|
return !!(t && t.__CANCEL__);
|
|
@@ -843,44 +843,44 @@ function jn(t) {
|
|
|
843
843
|
function vn(t, e) {
|
|
844
844
|
t = t || 10;
|
|
845
845
|
const r = new Array(t), s = new Array(t);
|
|
846
|
-
let
|
|
846
|
+
let o = 0, i = 0, a;
|
|
847
847
|
return e = e !== void 0 ? e : 1e3, function(h) {
|
|
848
|
-
const c = Date.now(),
|
|
849
|
-
|
|
848
|
+
const c = Date.now(), u = s[i];
|
|
849
|
+
a || (a = c), r[o] = h, s[o] = c;
|
|
850
850
|
let b = i, y = 0;
|
|
851
|
-
for (; b !==
|
|
851
|
+
for (; b !== o; )
|
|
852
852
|
y += r[b++], b = b % t;
|
|
853
|
-
if (
|
|
853
|
+
if (o = (o + 1) % t, o === i && (i = (i + 1) % t), c - a < e)
|
|
854
854
|
return;
|
|
855
|
-
const w =
|
|
855
|
+
const w = u && c - u;
|
|
856
856
|
return w ? Math.round(y * 1e3 / w) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
859
|
function Sn(t, e) {
|
|
860
|
-
let r = 0, s = 1e3 / e,
|
|
861
|
-
const
|
|
862
|
-
r =
|
|
860
|
+
let r = 0, s = 1e3 / e, o, i;
|
|
861
|
+
const a = (c, u = Date.now()) => {
|
|
862
|
+
r = u, o = null, i && (clearTimeout(i), i = null), t(...c);
|
|
863
863
|
};
|
|
864
864
|
return [(...c) => {
|
|
865
|
-
const
|
|
866
|
-
b >= s ?
|
|
867
|
-
i = null, o
|
|
865
|
+
const u = Date.now(), b = u - r;
|
|
866
|
+
b >= s ? a(c, u) : (o = c, i || (i = setTimeout(() => {
|
|
867
|
+
i = null, a(o);
|
|
868
868
|
}, s - b)));
|
|
869
|
-
}, () =>
|
|
869
|
+
}, () => o && a(o)];
|
|
870
870
|
}
|
|
871
871
|
const De = (t, e, r = 3) => {
|
|
872
872
|
let s = 0;
|
|
873
|
-
const
|
|
873
|
+
const o = vn(50, 250);
|
|
874
874
|
return Sn((i) => {
|
|
875
|
-
const
|
|
876
|
-
s =
|
|
875
|
+
const a = i.loaded, l = i.lengthComputable ? i.total : void 0, h = a - s, c = o(h), u = a <= l;
|
|
876
|
+
s = a;
|
|
877
877
|
const b = {
|
|
878
|
-
loaded:
|
|
878
|
+
loaded: a,
|
|
879
879
|
total: l,
|
|
880
|
-
progress: l ?
|
|
880
|
+
progress: l ? a / l : void 0,
|
|
881
881
|
bytes: h,
|
|
882
882
|
rate: c || void 0,
|
|
883
|
-
estimated: c && l &&
|
|
883
|
+
estimated: c && l && u ? (l - a) / c : void 0,
|
|
884
884
|
event: i,
|
|
885
885
|
lengthComputable: l != null,
|
|
886
886
|
[e ? "download" : "upload"]: !0
|
|
@@ -900,9 +900,9 @@ const De = (t, e, r = 3) => {
|
|
|
900
900
|
) : () => !0, En = ee.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(t, e, r, s,
|
|
904
|
-
const
|
|
905
|
-
p.isNumber(r) &&
|
|
903
|
+
write(t, e, r, s, o, i) {
|
|
904
|
+
const a = [t + "=" + encodeURIComponent(e)];
|
|
905
|
+
p.isNumber(r) && a.push("expires=" + new Date(r).toGMTString()), p.isString(s) && a.push("path=" + s), p.isString(o) && a.push("domain=" + o), i === !0 && a.push("secure"), document.cookie = a.join("; ");
|
|
906
906
|
},
|
|
907
907
|
read(t) {
|
|
908
908
|
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
@@ -935,31 +935,31 @@ function er(t, e, r) {
|
|
|
935
935
|
return t && (s || r == !1) ? Tn(t, e) : e;
|
|
936
936
|
}
|
|
937
937
|
const vt = (t) => t instanceof ne ? { ...t } : t;
|
|
938
|
-
function
|
|
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, u, b, y) {
|
|
942
|
+
return p.isPlainObject(c) && p.isPlainObject(u) ? p.merge.call({ caseless: y }, c, u) : p.isPlainObject(u) ? p.merge({}, u) : p.isArray(u) ? u.slice() : u;
|
|
943
943
|
}
|
|
944
|
-
function
|
|
945
|
-
if (p.isUndefined(
|
|
944
|
+
function o(c, u, b, y) {
|
|
945
|
+
if (p.isUndefined(u)) {
|
|
946
946
|
if (!p.isUndefined(c))
|
|
947
947
|
return s(void 0, c, b, y);
|
|
948
|
-
} else return s(c,
|
|
948
|
+
} else return s(c, u, b, y);
|
|
949
949
|
}
|
|
950
|
-
function i(c,
|
|
951
|
-
if (!p.isUndefined(
|
|
952
|
-
return s(void 0,
|
|
950
|
+
function i(c, u) {
|
|
951
|
+
if (!p.isUndefined(u))
|
|
952
|
+
return s(void 0, u);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
955
|
-
if (p.isUndefined(
|
|
954
|
+
function a(c, u) {
|
|
955
|
+
if (p.isUndefined(u)) {
|
|
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, u);
|
|
959
959
|
}
|
|
960
|
-
function l(c,
|
|
960
|
+
function l(c, u, b) {
|
|
961
961
|
if (b in e)
|
|
962
|
-
return s(c,
|
|
962
|
+
return s(c, u);
|
|
963
963
|
if (b in t)
|
|
964
964
|
return s(void 0, c);
|
|
965
965
|
}
|
|
@@ -967,70 +967,70 @@ function ge(t, e) {
|
|
|
967
967
|
url: i,
|
|
968
968
|
method: i,
|
|
969
969
|
data: i,
|
|
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:
|
|
970
|
+
baseURL: a,
|
|
971
|
+
transformRequest: a,
|
|
972
|
+
transformResponse: a,
|
|
973
|
+
paramsSerializer: a,
|
|
974
|
+
timeout: a,
|
|
975
|
+
timeoutMessage: a,
|
|
976
|
+
withCredentials: a,
|
|
977
|
+
withXSRFToken: a,
|
|
978
|
+
adapter: a,
|
|
979
|
+
responseType: a,
|
|
980
|
+
xsrfCookieName: a,
|
|
981
|
+
xsrfHeaderName: a,
|
|
982
|
+
onUploadProgress: a,
|
|
983
|
+
onDownloadProgress: a,
|
|
984
|
+
decompress: a,
|
|
985
|
+
maxContentLength: a,
|
|
986
|
+
maxBodyLength: a,
|
|
987
|
+
beforeRedirect: a,
|
|
988
|
+
transport: a,
|
|
989
|
+
httpAgent: a,
|
|
990
|
+
httpsAgent: a,
|
|
991
|
+
cancelToken: a,
|
|
992
|
+
socketPath: a,
|
|
993
|
+
responseEncoding: a,
|
|
994
994
|
validateStatus: l,
|
|
995
|
-
headers: (c,
|
|
995
|
+
headers: (c, u, b) => o(vt(c), vt(u), b, !0)
|
|
996
996
|
};
|
|
997
|
-
return p.forEach(Object.keys({ ...t, ...e }), function(
|
|
998
|
-
const b = h[
|
|
999
|
-
p.isUndefined(y) && b !== l || (r[
|
|
997
|
+
return p.forEach(Object.keys({ ...t, ...e }), function(u) {
|
|
998
|
+
const b = h[u] || o, y = b(t[u], e[u], u);
|
|
999
|
+
p.isUndefined(y) && b !== l || (r[u] = y);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
const tr = (t) => {
|
|
1003
|
-
const e =
|
|
1004
|
-
let { data: r, withXSRFToken: s, xsrfHeaderName:
|
|
1005
|
-
if (e.headers =
|
|
1003
|
+
const e = he({}, t);
|
|
1004
|
+
let { data: r, withXSRFToken: s, xsrfHeaderName: o, xsrfCookieName: i, headers: a, auth: l } = e;
|
|
1005
|
+
if (e.headers = a = ne.from(a), e.url = Jt(er(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), l && a.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
|
+
a.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(([u, b]) => {
|
|
1014
|
+
c.includes(u.toLowerCase()) && a.set(u, b);
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
if (ee.hasStandardBrowserEnv && (s && p.isFunction(s) && (s = s(e)), s || s !== !1 && kn(e.url))) {
|
|
1019
|
-
const h =
|
|
1020
|
-
h &&
|
|
1019
|
+
const h = o && i && En.read(i);
|
|
1020
|
+
h && a.set(o, h);
|
|
1021
1021
|
}
|
|
1022
1022
|
return e;
|
|
1023
1023
|
}, Rn = typeof XMLHttpRequest < "u", In = Rn && function(t) {
|
|
1024
1024
|
return new Promise(function(r, s) {
|
|
1025
|
-
const
|
|
1026
|
-
let i =
|
|
1027
|
-
const
|
|
1028
|
-
let { responseType: l, onUploadProgress: h, onDownloadProgress: c } =
|
|
1025
|
+
const o = tr(t);
|
|
1026
|
+
let i = o.data;
|
|
1027
|
+
const a = ne.from(o.headers).normalize();
|
|
1028
|
+
let { responseType: l, onUploadProgress: h, onDownloadProgress: c } = o, u, b, y, w, d;
|
|
1029
1029
|
function j() {
|
|
1030
|
-
w && w(),
|
|
1030
|
+
w && w(), d && d(), o.cancelToken && o.cancelToken.unsubscribe(u), o.signal && o.signal.removeEventListener("abort", u);
|
|
1031
1031
|
}
|
|
1032
1032
|
let m = new XMLHttpRequest();
|
|
1033
|
-
m.open(
|
|
1033
|
+
m.open(o.method.toUpperCase(), o.url, !0), m.timeout = o.timeout;
|
|
1034
1034
|
function _() {
|
|
1035
1035
|
if (!m)
|
|
1036
1036
|
return;
|
|
@@ -1058,20 +1058,20 @@ const tr = (t) => {
|
|
|
1058
1058
|
const M = C && C.message ? C.message : "Network Error", g = new L(M, L.ERR_NETWORK, t, m);
|
|
1059
1059
|
g.event = C || null, s(g), m = null;
|
|
1060
1060
|
}, m.ontimeout = function() {
|
|
1061
|
-
let C =
|
|
1062
|
-
const M =
|
|
1063
|
-
|
|
1061
|
+
let C = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
|
+
const M = o.transitional || Gt;
|
|
1063
|
+
o.timeoutErrorMessage && (C = o.timeoutErrorMessage), s(new L(
|
|
1064
1064
|
C,
|
|
1065
1065
|
M.clarifyTimeoutError ? L.ETIMEDOUT : L.ECONNABORTED,
|
|
1066
1066
|
t,
|
|
1067
1067
|
m
|
|
1068
1068
|
)), m = null;
|
|
1069
|
-
}, i === void 0 &&
|
|
1069
|
+
}, i === void 0 && a.setContentType(null), "setRequestHeader" in m && p.forEach(a.toJSON(), function(C, M) {
|
|
1070
1070
|
m.setRequestHeader(M, C);
|
|
1071
|
-
}), p.isUndefined(
|
|
1071
|
+
}), p.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), l && l !== "json" && (m.responseType = o.responseType), c && ([y, d] = De(c, !0), m.addEventListener("progress", y)), h && m.upload && ([b, w] = De(h), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (o.cancelToken || o.signal) && (u = (A) => {
|
|
1072
1072
|
m && (s(!A || A.type ? new je(null, t, m) : A), m.abort(), m = null);
|
|
1073
|
-
},
|
|
1074
|
-
const R = jn(
|
|
1073
|
+
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1074
|
+
const R = jn(o.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;
|
|
@@ -1081,19 +1081,19 @@ const tr = (t) => {
|
|
|
1081
1081
|
}, Pn = (t, e) => {
|
|
1082
1082
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
1083
1083
|
if (e || r) {
|
|
1084
|
-
let s = new AbortController(),
|
|
1084
|
+
let s = new AbortController(), o;
|
|
1085
1085
|
const i = function(c) {
|
|
1086
|
-
if (!
|
|
1087
|
-
|
|
1088
|
-
const
|
|
1089
|
-
s.abort(
|
|
1086
|
+
if (!o) {
|
|
1087
|
+
o = !0, l();
|
|
1088
|
+
const u = c instanceof Error ? c : this.reason;
|
|
1089
|
+
s.abort(u instanceof L ? u : new je(u instanceof Error ? u.message : u));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
|
-
let
|
|
1093
|
-
|
|
1092
|
+
let a = e && setTimeout(() => {
|
|
1093
|
+
a = null, i(new L(`timeout ${e} of ms exceeded`, L.ETIMEDOUT));
|
|
1094
1094
|
}, e);
|
|
1095
1095
|
const l = () => {
|
|
1096
|
-
t && (
|
|
1096
|
+
t && (a && clearTimeout(a), a = null, t.forEach((c) => {
|
|
1097
1097
|
c.unsubscribe ? c.unsubscribe(i) : c.removeEventListener("abort", i);
|
|
1098
1098
|
}), t = null);
|
|
1099
1099
|
};
|
|
@@ -1107,9 +1107,9 @@ const tr = (t) => {
|
|
|
1107
1107
|
yield t;
|
|
1108
1108
|
return;
|
|
1109
1109
|
}
|
|
1110
|
-
let s = 0,
|
|
1110
|
+
let s = 0, o;
|
|
1111
1111
|
for (; s < r; )
|
|
1112
|
-
|
|
1112
|
+
o = s + e, yield t.slice(s, o), s = o;
|
|
1113
1113
|
}, zn = async function* (t, e) {
|
|
1114
1114
|
for await (const r of An(t))
|
|
1115
1115
|
yield* On(r, e);
|
|
@@ -1130,30 +1130,30 @@ const tr = (t) => {
|
|
|
1130
1130
|
await e.cancel();
|
|
1131
1131
|
}
|
|
1132
1132
|
}, St = (t, e, r, s) => {
|
|
1133
|
-
const
|
|
1134
|
-
let i = 0,
|
|
1135
|
-
|
|
1133
|
+
const o = zn(t, e);
|
|
1134
|
+
let i = 0, a, l = (h) => {
|
|
1135
|
+
a || (a = !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: u } = await o.next();
|
|
1141
1141
|
if (c) {
|
|
1142
1142
|
l(), h.close();
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
|
-
let b =
|
|
1145
|
+
let b = u.byteLength;
|
|
1146
1146
|
if (r) {
|
|
1147
1147
|
let y = i += b;
|
|
1148
1148
|
r(y);
|
|
1149
1149
|
}
|
|
1150
|
-
h.enqueue(new Uint8Array(
|
|
1150
|
+
h.enqueue(new Uint8Array(u));
|
|
1151
1151
|
} catch (c) {
|
|
1152
1152
|
throw l(c), c;
|
|
1153
1153
|
}
|
|
1154
1154
|
},
|
|
1155
1155
|
cancel(h) {
|
|
1156
|
-
return l(h),
|
|
1156
|
+
return l(h), o.return();
|
|
1157
1157
|
}
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
@@ -1174,49 +1174,49 @@ const tr = (t) => {
|
|
|
1174
1174
|
t = p.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
1176
|
}, _n, t);
|
|
1177
|
-
const { fetch: e, Request: r, Response: s } = t,
|
|
1178
|
-
if (!
|
|
1177
|
+
const { fetch: e, Request: r, Response: s } = t, o = e ? Oe(e) : typeof fetch == "function", i = Oe(r), a = Oe(s);
|
|
1178
|
+
if (!o)
|
|
1179
1179
|
return !1;
|
|
1180
|
-
const l =
|
|
1181
|
-
let
|
|
1180
|
+
const l = o && Oe(Et), h = o && (typeof Ct == "function" ? /* @__PURE__ */ ((d) => (j) => d.encode(j))(new Ct()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), c = i && l && Tt(() => {
|
|
1181
|
+
let d = !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 d = !0, "half";
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
|
-
return
|
|
1190
|
-
}),
|
|
1191
|
-
stream:
|
|
1189
|
+
return d && !j;
|
|
1190
|
+
}), u = a && l && Tt(() => p.isReadableStream(new s("").body)), b = {
|
|
1191
|
+
stream: u && ((d) => d.body)
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1194
|
-
!b[
|
|
1195
|
-
let _ = j && j[
|
|
1193
|
+
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
1194
|
+
!b[d] && (b[d] = (j, m) => {
|
|
1195
|
+
let _ = j && j[d];
|
|
1196
1196
|
if (_)
|
|
1197
1197
|
return _.call(j);
|
|
1198
|
-
throw new L(`Response type '${
|
|
1198
|
+
throw new L(`Response type '${d}' is not supported`, L.ERR_NOT_SUPPORT, m);
|
|
1199
1199
|
});
|
|
1200
1200
|
});
|
|
1201
|
-
const y = async (
|
|
1202
|
-
if (
|
|
1201
|
+
const y = async (d) => {
|
|
1202
|
+
if (d == null)
|
|
1203
1203
|
return 0;
|
|
1204
|
-
if (p.isBlob(
|
|
1205
|
-
return
|
|
1206
|
-
if (p.isSpecCompliantForm(
|
|
1204
|
+
if (p.isBlob(d))
|
|
1205
|
+
return d.size;
|
|
1206
|
+
if (p.isSpecCompliantForm(d))
|
|
1207
1207
|
return (await new r(ee.origin, {
|
|
1208
1208
|
method: "POST",
|
|
1209
|
-
body:
|
|
1209
|
+
body: d
|
|
1210
1210
|
}).arrayBuffer()).byteLength;
|
|
1211
|
-
if (p.isArrayBufferView(
|
|
1212
|
-
return
|
|
1213
|
-
if (p.isURLSearchParams(
|
|
1214
|
-
return (await h(
|
|
1215
|
-
}, w = async (
|
|
1216
|
-
const m = p.toFiniteNumber(
|
|
1211
|
+
if (p.isArrayBufferView(d) || p.isArrayBuffer(d))
|
|
1212
|
+
return d.byteLength;
|
|
1213
|
+
if (p.isURLSearchParams(d) && (d = d + ""), p.isString(d))
|
|
1214
|
+
return (await h(d)).byteLength;
|
|
1215
|
+
}, w = async (d, j) => {
|
|
1216
|
+
const m = p.toFiniteNumber(d.getContentLength());
|
|
1217
1217
|
return m ?? y(j);
|
|
1218
1218
|
};
|
|
1219
|
-
return async (
|
|
1219
|
+
return async (d) => {
|
|
1220
1220
|
let {
|
|
1221
1221
|
url: j,
|
|
1222
1222
|
method: m,
|
|
@@ -1230,7 +1230,7 @@ const tr = (t) => {
|
|
|
1230
1230
|
headers: v,
|
|
1231
1231
|
withCredentials: U = "same-origin",
|
|
1232
1232
|
fetchOptions: q
|
|
1233
|
-
} = tr(
|
|
1233
|
+
} = tr(d), F = e || fetch;
|
|
1234
1234
|
I = I ? (I + "").toLowerCase() : "text";
|
|
1235
1235
|
let V = Pn([R, A && A.toAbortSignal()], C), Z = null;
|
|
1236
1236
|
const T = V && V.unsubscribe && (() => {
|
|
@@ -1264,8 +1264,8 @@ const tr = (t) => {
|
|
|
1264
1264
|
};
|
|
1265
1265
|
Z = i && new r(j, P);
|
|
1266
1266
|
let K = await (i ? F(Z, q) : F(j, P));
|
|
1267
|
-
const Q =
|
|
1268
|
-
if (
|
|
1267
|
+
const Q = u && (I === "stream" || I === "response");
|
|
1268
|
+
if (u && (M || 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
|
|
1285
|
+
let G = await b[p.findKey(b, I) || "text"](K, d);
|
|
1286
1286
|
return !Q && T && T(), await new Promise((f, S) => {
|
|
1287
1287
|
Qt(f, S, {
|
|
1288
|
-
data:
|
|
1288
|
+
data: G,
|
|
1289
1289
|
headers: ne.from(K.headers),
|
|
1290
1290
|
status: K.status,
|
|
1291
1291
|
statusText: K.statusText,
|
|
1292
|
-
config:
|
|
1292
|
+
config: d,
|
|
1293
1293
|
request: Z
|
|
1294
1294
|
});
|
|
1295
1295
|
});
|
|
1296
1296
|
} catch (z) {
|
|
1297
1297
|
throw T && T(), z && z.name === "TypeError" && /Load failed|fetch/i.test(z.message) ? Object.assign(
|
|
1298
|
-
new L("Network Error", L.ERR_NETWORK,
|
|
1298
|
+
new L("Network Error", L.ERR_NETWORK, d, Z),
|
|
1299
1299
|
{
|
|
1300
1300
|
cause: z.cause || z
|
|
1301
1301
|
}
|
|
1302
|
-
) : L.from(z, z && z.code,
|
|
1302
|
+
) : L.from(z, z && z.code, d, Z);
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
1305
|
}, Nn = /* @__PURE__ */ new Map(), rr = (t) => {
|
|
1306
1306
|
let e = t ? t.env : {};
|
|
1307
|
-
const { fetch: r, Request: s, Response:
|
|
1307
|
+
const { fetch: r, Request: s, Response: o } = e, i = [
|
|
1308
1308
|
s,
|
|
1309
|
-
|
|
1309
|
+
o,
|
|
1310
1310
|
r
|
|
1311
1311
|
];
|
|
1312
|
-
let
|
|
1312
|
+
let a = i.length, l = a, h, c, u = Nn;
|
|
1313
1313
|
for (; l--; )
|
|
1314
|
-
h = i[l], c =
|
|
1314
|
+
h = i[l], c = u.get(h), c === void 0 && u.set(h, c = l ? /* @__PURE__ */ new Map() : $n(e)), u = c;
|
|
1315
1315
|
return c;
|
|
1316
1316
|
};
|
|
1317
1317
|
rr();
|
|
@@ -1335,30 +1335,30 @@ const Rt = (t) => `- ${t}`, Un = (t) => p.isFunction(t) || t === null || t === !
|
|
|
1335
1335
|
getAdapter: (t, e) => {
|
|
1336
1336
|
t = p.isArray(t) ? t : [t];
|
|
1337
1337
|
const { length: r } = t;
|
|
1338
|
-
let s,
|
|
1338
|
+
let s, o;
|
|
1339
1339
|
const i = {};
|
|
1340
|
-
for (let
|
|
1341
|
-
s = t[
|
|
1340
|
+
for (let a = 0; a < r; a++) {
|
|
1341
|
+
s = t[a];
|
|
1342
1342
|
let l;
|
|
1343
|
-
if (
|
|
1343
|
+
if (o = s, !Un(s) && (o = tt[(l = String(s)).toLowerCase()], o === void 0))
|
|
1344
1344
|
throw new L(`Unknown adapter '${l}'`);
|
|
1345
|
-
if (
|
|
1345
|
+
if (o && (p.isFunction(o) || (o = o.get(e))))
|
|
1346
1346
|
break;
|
|
1347
|
-
i[l || "#" +
|
|
1347
|
+
i[l || "#" + a] = o;
|
|
1348
1348
|
}
|
|
1349
|
-
if (!
|
|
1350
|
-
const
|
|
1349
|
+
if (!o) {
|
|
1350
|
+
const a = 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 ? a.length > 1 ? `since :
|
|
1354
|
+
` + a.map(Rt).join(`
|
|
1355
|
+
`) : " " + Rt(a[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"
|
|
1359
1359
|
);
|
|
1360
1360
|
}
|
|
1361
|
-
return
|
|
1361
|
+
return o;
|
|
1362
1362
|
},
|
|
1363
1363
|
adapters: tt
|
|
1364
1364
|
};
|
|
@@ -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
|
|
1396
|
-
return "[Axios v" + sr + "] Transitional option '" + i + "'" +
|
|
1395
|
+
function o(i, a) {
|
|
1396
|
+
return "[Axios v" + sr + "] Transitional option '" + i + "'" + a + (s ? ". " + s : "");
|
|
1397
1397
|
}
|
|
1398
|
-
return (i,
|
|
1398
|
+
return (i, a, l) => {
|
|
1399
1399
|
if (e === !1)
|
|
1400
1400
|
throw new L(
|
|
1401
|
-
a
|
|
1401
|
+
o(a, " has been removed" + (r ? " in " + r : "")),
|
|
1402
1402
|
L.ERR_DEPRECATED
|
|
1403
1403
|
);
|
|
1404
|
-
return r && !Pt[
|
|
1405
|
-
|
|
1406
|
-
|
|
1404
|
+
return r && !Pt[a] && (Pt[a] = !0, console.warn(
|
|
1405
|
+
o(
|
|
1406
|
+
a,
|
|
1407
1407
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1408
1408
|
)
|
|
1409
|
-
)), e ? e(i,
|
|
1409
|
+
)), e ? e(i, a, l) : !0;
|
|
1410
1410
|
};
|
|
1411
1411
|
};
|
|
1412
1412
|
Be.spelling = function(e) {
|
|
@@ -1416,11 +1416,11 @@ function Dn(t, e, r) {
|
|
|
1416
1416
|
if (typeof t != "object")
|
|
1417
1417
|
throw new L("options must be an object", L.ERR_BAD_OPTION_VALUE);
|
|
1418
1418
|
const s = Object.keys(t);
|
|
1419
|
-
let
|
|
1420
|
-
for (;
|
|
1421
|
-
const i = s[
|
|
1422
|
-
if (
|
|
1423
|
-
const l = t[i], h = l === void 0 ||
|
|
1419
|
+
let o = s.length;
|
|
1420
|
+
for (; o-- > 0; ) {
|
|
1421
|
+
const i = s[o], a = e[i];
|
|
1422
|
+
if (a) {
|
|
1423
|
+
const l = t[i], h = l === void 0 || a(l, i, t);
|
|
1424
1424
|
if (h !== !0)
|
|
1425
1425
|
throw new L("option " + i + " must be " + h, L.ERR_BAD_OPTION_VALUE);
|
|
1426
1426
|
continue;
|
|
@@ -1433,7 +1433,7 @@ const $e = {
|
|
|
1433
1433
|
assertOptions: Dn,
|
|
1434
1434
|
validators: Be
|
|
1435
1435
|
}, ie = $e.validators;
|
|
1436
|
-
let
|
|
1436
|
+
let xe = class {
|
|
1437
1437
|
constructor(e) {
|
|
1438
1438
|
this.defaults = e || {}, this.interceptors = {
|
|
1439
1439
|
request: new yt(),
|
|
@@ -1453,9 +1453,9 @@ let he = class {
|
|
|
1453
1453
|
return await this._request(e, r);
|
|
1454
1454
|
} catch (s) {
|
|
1455
1455
|
if (s instanceof Error) {
|
|
1456
|
-
let
|
|
1457
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1458
|
-
const i =
|
|
1456
|
+
let o = {};
|
|
1457
|
+
Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
|
|
1458
|
+
const i = o.stack ? o.stack.replace(/^.+\n/, "") : "";
|
|
1459
1459
|
try {
|
|
1460
1460
|
s.stack ? i && !String(s.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1461
1461
|
` + i) : s.stack = i;
|
|
@@ -1466,31 +1466,31 @@ let he = class {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
1468
|
_request(e, r) {
|
|
1469
|
-
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r =
|
|
1470
|
-
const { transitional: s, paramsSerializer:
|
|
1469
|
+
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = he(this.defaults, r);
|
|
1470
|
+
const { transitional: s, paramsSerializer: o, headers: i } = r;
|
|
1471
1471
|
s !== void 0 && $e.assertOptions(s, {
|
|
1472
1472
|
silentJSONParsing: ie.transitional(ie.boolean),
|
|
1473
1473
|
forcedJSONParsing: ie.transitional(ie.boolean),
|
|
1474
1474
|
clarifyTimeoutError: ie.transitional(ie.boolean)
|
|
1475
|
-
}, !1),
|
|
1476
|
-
serialize:
|
|
1477
|
-
} : $e.assertOptions(
|
|
1475
|
+
}, !1), o != null && (p.isFunction(o) ? r.paramsSerializer = {
|
|
1476
|
+
serialize: o
|
|
1477
|
+
} : $e.assertOptions(o, {
|
|
1478
1478
|
encode: ie.function,
|
|
1479
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
1481
|
baseUrl: ie.spelling("baseURL"),
|
|
1482
1482
|
withXsrfToken: ie.spelling("withXSRFToken")
|
|
1483
1483
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1484
|
-
let
|
|
1484
|
+
let a = i && p.merge(
|
|
1485
1485
|
i.common,
|
|
1486
1486
|
i[r.method]
|
|
1487
1487
|
);
|
|
1488
1488
|
i && p.forEach(
|
|
1489
1489
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1490
|
-
(
|
|
1491
|
-
delete i[
|
|
1490
|
+
(d) => {
|
|
1491
|
+
delete i[d];
|
|
1492
1492
|
}
|
|
1493
|
-
), r.headers = ne.concat(
|
|
1493
|
+
), r.headers = ne.concat(a, i);
|
|
1494
1494
|
const l = [];
|
|
1495
1495
|
let h = !0;
|
|
1496
1496
|
this.interceptors.request.forEach(function(j) {
|
|
@@ -1500,42 +1500,42 @@ let he = class {
|
|
|
1500
1500
|
this.interceptors.response.forEach(function(j) {
|
|
1501
1501
|
c.push(j.fulfilled, j.rejected);
|
|
1502
1502
|
});
|
|
1503
|
-
let
|
|
1503
|
+
let u, b = 0, y;
|
|
1504
1504
|
if (!h) {
|
|
1505
|
-
const
|
|
1506
|
-
for (
|
|
1507
|
-
|
|
1508
|
-
return
|
|
1505
|
+
const d = [It.bind(this), void 0];
|
|
1506
|
+
for (d.unshift(...l), d.push(...c), y = d.length, u = Promise.resolve(r); b < y; )
|
|
1507
|
+
u = u.then(d[b++], d[b++]);
|
|
1508
|
+
return u;
|
|
1509
1509
|
}
|
|
1510
1510
|
y = l.length;
|
|
1511
1511
|
let w = r;
|
|
1512
1512
|
for (; b < y; ) {
|
|
1513
|
-
const
|
|
1513
|
+
const d = l[b++], j = l[b++];
|
|
1514
1514
|
try {
|
|
1515
|
-
w =
|
|
1515
|
+
w = d(w);
|
|
1516
1516
|
} catch (m) {
|
|
1517
1517
|
j.call(this, m);
|
|
1518
1518
|
break;
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
try {
|
|
1522
|
-
|
|
1523
|
-
} catch (
|
|
1524
|
-
return Promise.reject(
|
|
1522
|
+
u = It.call(this, w);
|
|
1523
|
+
} catch (d) {
|
|
1524
|
+
return Promise.reject(d);
|
|
1525
1525
|
}
|
|
1526
1526
|
for (b = 0, y = c.length; b < y; )
|
|
1527
|
-
|
|
1528
|
-
return
|
|
1527
|
+
u = u.then(c[b++], c[b++]);
|
|
1528
|
+
return u;
|
|
1529
1529
|
}
|
|
1530
1530
|
getUri(e) {
|
|
1531
|
-
e =
|
|
1531
|
+
e = he(this.defaults, e);
|
|
1532
1532
|
const r = er(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1533
1533
|
return Jt(r, e.params, e.paramsSerializer);
|
|
1534
1534
|
}
|
|
1535
1535
|
};
|
|
1536
1536
|
p.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1537
|
-
|
|
1538
|
-
return this.request(
|
|
1537
|
+
xe.prototype[e] = function(r, s) {
|
|
1538
|
+
return this.request(he(s || {}, {
|
|
1539
1539
|
method: e,
|
|
1540
1540
|
url: r,
|
|
1541
1541
|
data: (s || {}).data
|
|
@@ -1544,20 +1544,20 @@ 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(i,
|
|
1548
|
-
return this.request(
|
|
1547
|
+
return function(i, a, l) {
|
|
1548
|
+
return this.request(he(l || {}, {
|
|
1549
1549
|
method: e,
|
|
1550
1550
|
headers: s ? {
|
|
1551
1551
|
"Content-Type": "multipart/form-data"
|
|
1552
1552
|
} : {},
|
|
1553
1553
|
url: i,
|
|
1554
|
-
data:
|
|
1554
|
+
data: a
|
|
1555
1555
|
}));
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
1558
|
-
|
|
1558
|
+
xe.prototype[e] = r(), xe.prototype[e + "Form"] = r(!0);
|
|
1559
1559
|
});
|
|
1560
|
-
let Ln = class
|
|
1560
|
+
let Ln = class or {
|
|
1561
1561
|
constructor(e) {
|
|
1562
1562
|
if (typeof e != "function")
|
|
1563
1563
|
throw new TypeError("executor must be a function.");
|
|
@@ -1566,22 +1566,22 @@ let Ln = class ar {
|
|
|
1566
1566
|
r = i;
|
|
1567
1567
|
});
|
|
1568
1568
|
const s = this;
|
|
1569
|
-
this.promise.then((
|
|
1569
|
+
this.promise.then((o) => {
|
|
1570
1570
|
if (!s._listeners) return;
|
|
1571
1571
|
let i = s._listeners.length;
|
|
1572
1572
|
for (; i-- > 0; )
|
|
1573
|
-
s._listeners[i](
|
|
1573
|
+
s._listeners[i](o);
|
|
1574
1574
|
s._listeners = null;
|
|
1575
|
-
}), this.promise.then = (
|
|
1575
|
+
}), this.promise.then = (o) => {
|
|
1576
1576
|
let i;
|
|
1577
|
-
const
|
|
1577
|
+
const a = new Promise((l) => {
|
|
1578
1578
|
s.subscribe(l), i = l;
|
|
1579
|
-
}).then(
|
|
1580
|
-
return
|
|
1579
|
+
}).then(o);
|
|
1580
|
+
return a.cancel = function() {
|
|
1581
1581
|
s.unsubscribe(i);
|
|
1582
|
-
},
|
|
1583
|
-
}, e(function(i,
|
|
1584
|
-
s.reason || (s.reason = new je(i,
|
|
1582
|
+
}, a;
|
|
1583
|
+
}, e(function(i, a, l) {
|
|
1584
|
+
s.reason || (s.reason = new je(i, a, l), r(s.reason));
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
1587
|
/**
|
|
@@ -1623,8 +1623,8 @@ let Ln = class ar {
|
|
|
1623
1623
|
static source() {
|
|
1624
1624
|
let e;
|
|
1625
1625
|
return {
|
|
1626
|
-
token: new
|
|
1627
|
-
e =
|
|
1626
|
+
token: new or(function(o) {
|
|
1627
|
+
e = o;
|
|
1628
1628
|
}),
|
|
1629
1629
|
cancel: e
|
|
1630
1630
|
};
|
|
@@ -1706,14 +1706,14 @@ const rt = {
|
|
|
1706
1706
|
Object.entries(rt).forEach(([t, e]) => {
|
|
1707
1707
|
rt[e] = t;
|
|
1708
1708
|
});
|
|
1709
|
-
function
|
|
1710
|
-
const e = new
|
|
1711
|
-
return p.extend(r,
|
|
1712
|
-
return
|
|
1709
|
+
function ar(t) {
|
|
1710
|
+
const e = new xe(t), r = Ut(xe.prototype.request, e);
|
|
1711
|
+
return p.extend(r, xe.prototype, e, { allOwnKeys: !0 }), p.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(o) {
|
|
1712
|
+
return ar(he(t, o));
|
|
1713
1713
|
}, r;
|
|
1714
1714
|
}
|
|
1715
|
-
const W =
|
|
1716
|
-
W.Axios =
|
|
1715
|
+
const W = ar(Ie);
|
|
1716
|
+
W.Axios = xe;
|
|
1717
1717
|
W.CanceledError = je;
|
|
1718
1718
|
W.CancelToken = Ln;
|
|
1719
1719
|
W.isCancel = Zt;
|
|
@@ -1726,31 +1726,31 @@ W.all = function(e) {
|
|
|
1726
1726
|
};
|
|
1727
1727
|
W.spread = Fn;
|
|
1728
1728
|
W.isAxiosError = Mn;
|
|
1729
|
-
W.mergeConfig =
|
|
1729
|
+
W.mergeConfig = he;
|
|
1730
1730
|
W.AxiosHeaders = ne;
|
|
1731
|
-
W.formToJSON = (t) =>
|
|
1731
|
+
W.formToJSON = (t) => Xt(p.isHTMLForm(t) ? new FormData(t) : t);
|
|
1732
1732
|
W.getAdapter = nr.getAdapter;
|
|
1733
1733
|
W.HttpStatusCode = rt;
|
|
1734
1734
|
W.default = W;
|
|
1735
1735
|
const {
|
|
1736
1736
|
Axios: Ks,
|
|
1737
1737
|
AxiosError: Js,
|
|
1738
|
-
CanceledError:
|
|
1739
|
-
isCancel:
|
|
1738
|
+
CanceledError: Gs,
|
|
1739
|
+
isCancel: Xs,
|
|
1740
1740
|
CancelToken: Zs,
|
|
1741
1741
|
VERSION: Qs,
|
|
1742
|
-
all:
|
|
1743
|
-
Cancel:
|
|
1744
|
-
isAxiosError:
|
|
1745
|
-
spread:
|
|
1746
|
-
toFormData:
|
|
1747
|
-
AxiosHeaders:
|
|
1748
|
-
HttpStatusCode:
|
|
1749
|
-
formToJSON:
|
|
1750
|
-
getAdapter:
|
|
1751
|
-
mergeConfig:
|
|
1742
|
+
all: eo,
|
|
1743
|
+
Cancel: to,
|
|
1744
|
+
isAxiosError: ro,
|
|
1745
|
+
spread: no,
|
|
1746
|
+
toFormData: so,
|
|
1747
|
+
AxiosHeaders: oo,
|
|
1748
|
+
HttpStatusCode: ao,
|
|
1749
|
+
formToJSON: io,
|
|
1750
|
+
getAdapter: lo,
|
|
1751
|
+
mergeConfig: co
|
|
1752
1752
|
} = W;
|
|
1753
|
-
class
|
|
1753
|
+
class uo {
|
|
1754
1754
|
baseUrl;
|
|
1755
1755
|
apiKey;
|
|
1756
1756
|
appId;
|
|
@@ -1779,7 +1779,7 @@ class da {
|
|
|
1779
1779
|
* @param data Optional request body
|
|
1780
1780
|
* @param extraHeaders Optional custom headers
|
|
1781
1781
|
*/
|
|
1782
|
-
async request(e, r, s,
|
|
1782
|
+
async request(e, r, s, o = {}) {
|
|
1783
1783
|
if (!e) throw new Error("HTTP method is required");
|
|
1784
1784
|
if (!r) throw new Error("Request path is required");
|
|
1785
1785
|
try {
|
|
@@ -1791,12 +1791,12 @@ class da {
|
|
|
1791
1791
|
url: r,
|
|
1792
1792
|
method: e,
|
|
1793
1793
|
data: i,
|
|
1794
|
-
headers:
|
|
1794
|
+
headers: o
|
|
1795
1795
|
})).data;
|
|
1796
1796
|
} catch (i) {
|
|
1797
1797
|
if (console.error("❌ [Request Error]:", i), i.isAxiosError) {
|
|
1798
|
-
const
|
|
1799
|
-
throw new Error(`Request failed (${
|
|
1798
|
+
const a = i.response?.status || 0, l = i.response?.data?.message || i.message || "Unknown Axios error occurred";
|
|
1799
|
+
throw new Error(`Request failed (${a}): ${l}`);
|
|
1800
1800
|
}
|
|
1801
1801
|
throw new Error(`Unexpected error: ${i.message || "Unknown failure"}`);
|
|
1802
1802
|
}
|
|
@@ -1807,8 +1807,8 @@ class da {
|
|
|
1807
1807
|
* @param params user details
|
|
1808
1808
|
*/
|
|
1809
1809
|
async signup(e) {
|
|
1810
|
-
const { name: r, email: s, password:
|
|
1811
|
-
if (!r || !s || !
|
|
1810
|
+
const { name: r, email: s, password: o } = e;
|
|
1811
|
+
if (!r || !s || !o)
|
|
1812
1812
|
throw new Error("signup: 'name', 'email', and 'password' are required");
|
|
1813
1813
|
return this.request("POST", "/users/signup", e);
|
|
1814
1814
|
}
|
|
@@ -1817,13 +1817,13 @@ class da {
|
|
|
1817
1817
|
* @param params login details
|
|
1818
1818
|
*/
|
|
1819
1819
|
async login(e) {
|
|
1820
|
-
const { email: r, password: s, appId:
|
|
1820
|
+
const { email: r, password: s, appId: o } = e;
|
|
1821
1821
|
if (!r || !s)
|
|
1822
1822
|
throw new Error("login: 'email' and 'password' are required");
|
|
1823
1823
|
return this.request("POST", "/users/login", {
|
|
1824
1824
|
email: r,
|
|
1825
1825
|
password: s,
|
|
1826
|
-
appId:
|
|
1826
|
+
appId: o || this.appId
|
|
1827
1827
|
});
|
|
1828
1828
|
}
|
|
1829
1829
|
/**
|
|
@@ -1843,15 +1843,15 @@ class da {
|
|
|
1843
1843
|
* @param params requires userId, currentPassword, newPassword
|
|
1844
1844
|
*/
|
|
1845
1845
|
async changePassword(e) {
|
|
1846
|
-
const { userId: r, currentPassword: s, newPassword:
|
|
1846
|
+
const { userId: r, currentPassword: s, newPassword: o, appId: i } = e;
|
|
1847
1847
|
if (!r) throw new Error("changePassword: 'userId' is required");
|
|
1848
|
-
if (!s || !
|
|
1848
|
+
if (!s || !o)
|
|
1849
1849
|
throw new Error(
|
|
1850
1850
|
"changePassword: both 'currentPassword' and 'newPassword' are required"
|
|
1851
1851
|
);
|
|
1852
1852
|
return this.request("PUT", `/users/change-password/${r}`, {
|
|
1853
1853
|
currentPassword: s,
|
|
1854
|
-
newPassword:
|
|
1854
|
+
newPassword: o,
|
|
1855
1855
|
appId: i || this.appId
|
|
1856
1856
|
});
|
|
1857
1857
|
}
|
|
@@ -1900,13 +1900,13 @@ class da {
|
|
|
1900
1900
|
* @param params requires token + otp
|
|
1901
1901
|
*/
|
|
1902
1902
|
async verifyEmail(e) {
|
|
1903
|
-
const { token: r, otp: s, appId:
|
|
1903
|
+
const { token: r, otp: s, appId: o } = e;
|
|
1904
1904
|
if (!r) throw new Error("verifyEmail: 'token' is required");
|
|
1905
1905
|
if (!s) throw new Error("verifyEmail: 'otp' is required");
|
|
1906
1906
|
return this.request(
|
|
1907
1907
|
"POST",
|
|
1908
1908
|
"/users/verify-email",
|
|
1909
|
-
{ otp: s, appId:
|
|
1909
|
+
{ otp: s, appId: o || this.appId },
|
|
1910
1910
|
{ Authorization: `Bearer ${r}` }
|
|
1911
1911
|
);
|
|
1912
1912
|
}
|
|
@@ -1927,18 +1927,33 @@ class da {
|
|
|
1927
1927
|
* @param params requires email, otp, newPassword
|
|
1928
1928
|
*/
|
|
1929
1929
|
async resetPassword(e) {
|
|
1930
|
-
const { email: r, otp: s, newPassword:
|
|
1931
|
-
if (!r || !s || !
|
|
1930
|
+
const { email: r, otp: s, newPassword: o, appId: i } = e;
|
|
1931
|
+
if (!r || !s || !o)
|
|
1932
1932
|
throw new Error(
|
|
1933
1933
|
"resetPassword: 'email', 'otp' and 'newPassword' are required"
|
|
1934
1934
|
);
|
|
1935
1935
|
return this.request("POST", "/users/reset-password", {
|
|
1936
1936
|
email: r,
|
|
1937
1937
|
otp: s,
|
|
1938
|
-
newPassword:
|
|
1938
|
+
newPassword: o,
|
|
1939
1939
|
appId: i || this.appId
|
|
1940
1940
|
});
|
|
1941
1941
|
}
|
|
1942
|
+
/**
|
|
1943
|
+
* Check if a user exists for this app (lightweight)
|
|
1944
|
+
* @param userId user id to check
|
|
1945
|
+
* @returns { exists: boolean }
|
|
1946
|
+
*/
|
|
1947
|
+
async checkUser(e) {
|
|
1948
|
+
if (!e)
|
|
1949
|
+
throw new Error("checkUser: 'userId' is required");
|
|
1950
|
+
if (!this.appId)
|
|
1951
|
+
throw new Error("checkUser: SDK 'appId' is missing in config");
|
|
1952
|
+
return this.request(
|
|
1953
|
+
"GET",
|
|
1954
|
+
`/users/check-user/${e}?appId=${this.appId}`
|
|
1955
|
+
);
|
|
1956
|
+
}
|
|
1942
1957
|
// ================= USER EXTRA DATA =================
|
|
1943
1958
|
async searchAllUsersData(e) {
|
|
1944
1959
|
if (!this.appId) throw new Error("searchAllUsersData: appId missing");
|
|
@@ -1948,8 +1963,8 @@ class da {
|
|
|
1948
1963
|
async searchUserData(e) {
|
|
1949
1964
|
const { userId: r, ...s } = e;
|
|
1950
1965
|
if (!r) throw new Error("userId required");
|
|
1951
|
-
const
|
|
1952
|
-
return this.request("GET", `/users/${r}/data/search?${
|
|
1966
|
+
const o = new URLSearchParams(s).toString();
|
|
1967
|
+
return this.request("GET", `/users/${r}/data/search?${o}`);
|
|
1953
1968
|
}
|
|
1954
1969
|
/**
|
|
1955
1970
|
* Fetch ALL users' merged data for a specific app
|
|
@@ -1984,14 +1999,14 @@ class da {
|
|
|
1984
1999
|
* @param params requires userId and data object
|
|
1985
2000
|
*/
|
|
1986
2001
|
async addUserData(e) {
|
|
1987
|
-
const { userId: r, dataCategory: s, data:
|
|
2002
|
+
const { userId: r, dataCategory: s, data: o } = e;
|
|
1988
2003
|
if (!r) throw new Error("addUserData: 'userId' is required");
|
|
1989
2004
|
if (!s)
|
|
1990
2005
|
throw new Error("addUserData: 'dataCategory' is required");
|
|
1991
|
-
if (!
|
|
2006
|
+
if (!o) throw new Error("addUserData: 'data' is required");
|
|
1992
2007
|
return this.request("POST", `/users/${r}/data`, {
|
|
1993
2008
|
dataCategory: s,
|
|
1994
|
-
...
|
|
2009
|
+
...o
|
|
1995
2010
|
});
|
|
1996
2011
|
}
|
|
1997
2012
|
/**
|
|
@@ -1999,11 +2014,11 @@ class da {
|
|
|
1999
2014
|
* @param params requires userId, dataId, and updated fields
|
|
2000
2015
|
*/
|
|
2001
2016
|
async updateUserData(e) {
|
|
2002
|
-
const { userId: r, dataId: s, data:
|
|
2017
|
+
const { userId: r, dataId: s, data: o } = e;
|
|
2003
2018
|
if (!r || !s)
|
|
2004
2019
|
throw new Error("updateUserData: 'userId' and 'dataId' are required");
|
|
2005
|
-
if (!
|
|
2006
|
-
return this.request("PUT", `/users/${r}/data/${s}`,
|
|
2020
|
+
if (!o) throw new Error("updateUserData: 'data' is required");
|
|
2021
|
+
return this.request("PUT", `/users/${r}/data/${s}`, o);
|
|
2007
2022
|
}
|
|
2008
2023
|
/**
|
|
2009
2024
|
* Delete a data object by its id
|
|
@@ -2031,18 +2046,18 @@ function Wn() {
|
|
|
2031
2046
|
if (Ot) return ke;
|
|
2032
2047
|
Ot = 1;
|
|
2033
2048
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
2034
|
-
function r(s,
|
|
2035
|
-
var
|
|
2036
|
-
if (i !== void 0 && (
|
|
2049
|
+
function r(s, o, i) {
|
|
2050
|
+
var a = null;
|
|
2051
|
+
if (i !== void 0 && (a = "" + i), o.key !== void 0 && (a = "" + o.key), "key" in o) {
|
|
2037
2052
|
i = {};
|
|
2038
|
-
for (var l in
|
|
2039
|
-
l !== "key" && (i[l] =
|
|
2040
|
-
} else i =
|
|
2041
|
-
return
|
|
2053
|
+
for (var l in o)
|
|
2054
|
+
l !== "key" && (i[l] = o[l]);
|
|
2055
|
+
} else i = o;
|
|
2056
|
+
return o = i.ref, {
|
|
2042
2057
|
$$typeof: t,
|
|
2043
2058
|
type: s,
|
|
2044
|
-
key:
|
|
2045
|
-
ref:
|
|
2059
|
+
key: a,
|
|
2060
|
+
ref: o !== void 0 ? o : null,
|
|
2046
2061
|
props: i
|
|
2047
2062
|
};
|
|
2048
2063
|
}
|
|
@@ -2135,14 +2150,14 @@ function qn() {
|
|
|
2135
2150
|
return "<...>";
|
|
2136
2151
|
}
|
|
2137
2152
|
}
|
|
2138
|
-
function
|
|
2153
|
+
function o() {
|
|
2139
2154
|
var f = V.A;
|
|
2140
2155
|
return f === null ? null : f.getOwner();
|
|
2141
2156
|
}
|
|
2142
2157
|
function i() {
|
|
2143
2158
|
return Error("react-stack-top-frame");
|
|
2144
2159
|
}
|
|
2145
|
-
function
|
|
2160
|
+
function a(f) {
|
|
2146
2161
|
if (Z.call(f, "key")) {
|
|
2147
2162
|
var S = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
2148
2163
|
if (S && S.isReactWarning) return !1;
|
|
@@ -2170,7 +2185,7 @@ function qn() {
|
|
|
2170
2185
|
function c(f, S, x, k, $, N) {
|
|
2171
2186
|
var Y = x.ref;
|
|
2172
2187
|
return f = {
|
|
2173
|
-
$$typeof:
|
|
2188
|
+
$$typeof: d,
|
|
2174
2189
|
type: f,
|
|
2175
2190
|
key: S,
|
|
2176
2191
|
props: x,
|
|
@@ -2200,7 +2215,7 @@ function qn() {
|
|
|
2200
2215
|
value: N
|
|
2201
2216
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
2202
2217
|
}
|
|
2203
|
-
function
|
|
2218
|
+
function u(f, S, x, k, $, N) {
|
|
2204
2219
|
var Y = S.children;
|
|
2205
2220
|
if (Y !== void 0)
|
|
2206
2221
|
if (k)
|
|
@@ -2218,7 +2233,7 @@ function qn() {
|
|
|
2218
2233
|
var se = Object.keys(S).filter(function(ve) {
|
|
2219
2234
|
return ve !== "key";
|
|
2220
2235
|
});
|
|
2221
|
-
k = 0 < se.length ? "{key: someKey, " + se.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
2236
|
+
k = 0 < se.length ? "{key: someKey, " + se.join(": ..., ") + ": ...}" : "{key: someKey}", G[Y + k] || (se = 0 < se.length ? "{" + se.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
2222
2237
|
`A props object containing a "key" prop is being spread into JSX:
|
|
2223
2238
|
let props = %s;
|
|
2224
2239
|
<%s {...props} />
|
|
@@ -2229,12 +2244,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2229
2244
|
Y,
|
|
2230
2245
|
se,
|
|
2231
2246
|
Y
|
|
2232
|
-
),
|
|
2247
|
+
), G[Y + k] = !0);
|
|
2233
2248
|
}
|
|
2234
|
-
if (Y = null, x !== void 0 && (r(x), Y = "" + x),
|
|
2249
|
+
if (Y = null, x !== void 0 && (r(x), Y = "" + x), a(S) && (r(S.key), Y = "" + S.key), "key" in S) {
|
|
2235
2250
|
x = {};
|
|
2236
|
-
for (var
|
|
2237
|
-
|
|
2251
|
+
for (var ue in S)
|
|
2252
|
+
ue !== "key" && (x[ue] = S[ue]);
|
|
2238
2253
|
} else x = S;
|
|
2239
2254
|
return Y && l(
|
|
2240
2255
|
x,
|
|
@@ -2243,7 +2258,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2243
2258
|
f,
|
|
2244
2259
|
Y,
|
|
2245
2260
|
x,
|
|
2246
|
-
|
|
2261
|
+
o(),
|
|
2247
2262
|
$,
|
|
2248
2263
|
N
|
|
2249
2264
|
);
|
|
@@ -2252,9 +2267,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2252
2267
|
y(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === U && (f._payload.status === "fulfilled" ? y(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
|
|
2253
2268
|
}
|
|
2254
2269
|
function y(f) {
|
|
2255
|
-
return typeof f == "object" && f !== null && f.$$typeof ===
|
|
2270
|
+
return typeof f == "object" && f !== null && f.$$typeof === d;
|
|
2256
2271
|
}
|
|
2257
|
-
var w = Le,
|
|
2272
|
+
var w = Le, d = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), C = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), q = Symbol.for("react.activity"), 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() {
|
|
2258
2273
|
return null;
|
|
2259
2274
|
};
|
|
2260
2275
|
w = {
|
|
@@ -2265,10 +2280,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2265
2280
|
var z, P = {}, K = w.react_stack_bottom_frame.bind(
|
|
2266
2281
|
w,
|
|
2267
2282
|
i
|
|
2268
|
-
)(), Q = J(s(i)),
|
|
2283
|
+
)(), Q = J(s(i)), G = {};
|
|
2269
2284
|
Ee.Fragment = m, Ee.jsx = function(f, S, x) {
|
|
2270
2285
|
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2271
|
-
return
|
|
2286
|
+
return u(
|
|
2272
2287
|
f,
|
|
2273
2288
|
S,
|
|
2274
2289
|
x,
|
|
@@ -2278,7 +2293,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2278
2293
|
);
|
|
2279
2294
|
}, Ee.jsxs = function(f, S, x) {
|
|
2280
2295
|
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2281
|
-
return
|
|
2296
|
+
return u(
|
|
2282
2297
|
f,
|
|
2283
2298
|
S,
|
|
2284
2299
|
x,
|
|
@@ -2295,10 +2310,10 @@ function Bn() {
|
|
|
2295
2310
|
}
|
|
2296
2311
|
var n = Bn();
|
|
2297
2312
|
const Hn = async (t, e) => {
|
|
2298
|
-
const { name: r, email: s, password:
|
|
2313
|
+
const { name: r, email: s, password: o, appId: i, phone: a, address: l, avatarUrl: h, isActive: c = !0, role: u = "user" } = t, { baseUrl: b, apiKey: y } = e;
|
|
2299
2314
|
if (!y)
|
|
2300
2315
|
throw new Error("API key is required for signup");
|
|
2301
|
-
if (!r || !s || !
|
|
2316
|
+
if (!r || !s || !o || !i)
|
|
2302
2317
|
throw new Error("Name, email, password, and appId are required");
|
|
2303
2318
|
try {
|
|
2304
2319
|
const w = await W.post(
|
|
@@ -2306,13 +2321,13 @@ const Hn = async (t, e) => {
|
|
|
2306
2321
|
{
|
|
2307
2322
|
name: r,
|
|
2308
2323
|
email: s,
|
|
2309
|
-
password:
|
|
2324
|
+
password: o,
|
|
2310
2325
|
appId: i,
|
|
2311
|
-
phone:
|
|
2326
|
+
phone: a,
|
|
2312
2327
|
address: l,
|
|
2313
2328
|
avatarUrl: h,
|
|
2314
2329
|
isActive: c,
|
|
2315
|
-
role:
|
|
2330
|
+
role: u
|
|
2316
2331
|
},
|
|
2317
2332
|
{
|
|
2318
2333
|
headers: {
|
|
@@ -2323,15 +2338,15 @@ const Hn = async (t, e) => {
|
|
|
2323
2338
|
);
|
|
2324
2339
|
return w.data?.user && localStorage.setItem("userInfo", JSON.stringify(w.data.user)), w.data.user;
|
|
2325
2340
|
} catch (w) {
|
|
2326
|
-
const
|
|
2327
|
-
if (console.error("Signup API Error:",
|
|
2328
|
-
if (
|
|
2341
|
+
const d = w.response?.data?.message || w.message || "Signup failed";
|
|
2342
|
+
if (console.error("Signup API Error:", d), w.response?.status === 400) {
|
|
2343
|
+
if (d.includes("already exists"))
|
|
2329
2344
|
throw {
|
|
2330
2345
|
success: !1,
|
|
2331
2346
|
message: "User with this email already exists for this app",
|
|
2332
2347
|
status: 400
|
|
2333
2348
|
};
|
|
2334
|
-
if (
|
|
2349
|
+
if (d.includes("inactive"))
|
|
2335
2350
|
throw {
|
|
2336
2351
|
success: !1,
|
|
2337
2352
|
message: "Cannot signup under an inactive app",
|
|
@@ -2344,7 +2359,7 @@ const Hn = async (t, e) => {
|
|
|
2344
2359
|
status: 404
|
|
2345
2360
|
} : {
|
|
2346
2361
|
success: !1,
|
|
2347
|
-
message:
|
|
2362
|
+
message: d,
|
|
2348
2363
|
status: w.response?.status || 500
|
|
2349
2364
|
};
|
|
2350
2365
|
}
|
|
@@ -2389,17 +2404,17 @@ var Jn = {
|
|
|
2389
2404
|
* This source code is licensed under the ISC license.
|
|
2390
2405
|
* See the LICENSE file in the root directory of this source tree.
|
|
2391
2406
|
*/
|
|
2392
|
-
const
|
|
2407
|
+
const Gn = Nt(
|
|
2393
2408
|
({
|
|
2394
2409
|
color: t = "currentColor",
|
|
2395
2410
|
size: e = 24,
|
|
2396
2411
|
strokeWidth: r = 2,
|
|
2397
2412
|
absoluteStrokeWidth: s,
|
|
2398
|
-
className:
|
|
2413
|
+
className: o = "",
|
|
2399
2414
|
children: i,
|
|
2400
|
-
iconNode:
|
|
2415
|
+
iconNode: a,
|
|
2401
2416
|
...l
|
|
2402
|
-
}, h) =>
|
|
2417
|
+
}, h) => Xe(
|
|
2403
2418
|
"svg",
|
|
2404
2419
|
{
|
|
2405
2420
|
ref: h,
|
|
@@ -2408,12 +2423,12 @@ const Xn = Nt(
|
|
|
2408
2423
|
height: e,
|
|
2409
2424
|
stroke: t,
|
|
2410
2425
|
strokeWidth: s ? Number(r) * 24 / Number(e) : r,
|
|
2411
|
-
className: ir("lucide",
|
|
2426
|
+
className: ir("lucide", o),
|
|
2412
2427
|
...!i && !Kn(l) && { "aria-hidden": "true" },
|
|
2413
2428
|
...l
|
|
2414
2429
|
},
|
|
2415
2430
|
[
|
|
2416
|
-
...
|
|
2431
|
+
...a.map(([c, u]) => Xe(c, u)),
|
|
2417
2432
|
...Array.isArray(i) ? i : [i]
|
|
2418
2433
|
]
|
|
2419
2434
|
)
|
|
@@ -2426,7 +2441,7 @@ const Xn = Nt(
|
|
|
2426
2441
|
*/
|
|
2427
2442
|
const B = (t, e) => {
|
|
2428
2443
|
const r = Nt(
|
|
2429
|
-
({ className: s, ...
|
|
2444
|
+
({ className: s, ...o }, i) => Xe(Gn, {
|
|
2430
2445
|
ref: i,
|
|
2431
2446
|
iconNode: e,
|
|
2432
2447
|
className: ir(
|
|
@@ -2434,7 +2449,7 @@ const B = (t, e) => {
|
|
|
2434
2449
|
`lucide-${t}`,
|
|
2435
2450
|
s
|
|
2436
2451
|
),
|
|
2437
|
-
...
|
|
2452
|
+
...o
|
|
2438
2453
|
})
|
|
2439
2454
|
);
|
|
2440
2455
|
return r.displayName = _t(t), r;
|
|
@@ -2445,7 +2460,7 @@ const B = (t, e) => {
|
|
|
2445
2460
|
* This source code is licensed under the ISC license.
|
|
2446
2461
|
* See the LICENSE file in the root directory of this source tree.
|
|
2447
2462
|
*/
|
|
2448
|
-
const
|
|
2463
|
+
const Xn = [
|
|
2449
2464
|
[
|
|
2450
2465
|
"path",
|
|
2451
2466
|
{
|
|
@@ -2454,7 +2469,7 @@ const Gn = [
|
|
|
2454
2469
|
}
|
|
2455
2470
|
],
|
|
2456
2471
|
["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
|
|
2457
|
-
], nt = B("camera",
|
|
2472
|
+
], nt = B("camera", Xn);
|
|
2458
2473
|
/**
|
|
2459
2474
|
* @license lucide-react v0.544.0 - ISC
|
|
2460
2475
|
*
|
|
@@ -2492,7 +2507,7 @@ const ts = [
|
|
|
2492
2507
|
const rs = [
|
|
2493
2508
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2494
2509
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2495
|
-
],
|
|
2510
|
+
], Ge = B("circle-check", rs);
|
|
2496
2511
|
/**
|
|
2497
2512
|
* @license lucide-react v0.544.0 - ISC
|
|
2498
2513
|
*
|
|
@@ -2510,11 +2525,11 @@ const ns = [
|
|
|
2510
2525
|
* This source code is licensed under the ISC license.
|
|
2511
2526
|
* See the LICENSE file in the root directory of this source tree.
|
|
2512
2527
|
*/
|
|
2513
|
-
const
|
|
2528
|
+
const os = [
|
|
2514
2529
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2515
2530
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
2516
2531
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
2517
|
-
],
|
|
2532
|
+
], as = B("ellipsis-vertical", os);
|
|
2518
2533
|
/**
|
|
2519
2534
|
* @license lucide-react v0.544.0 - ISC
|
|
2520
2535
|
*
|
|
@@ -2626,7 +2641,7 @@ const xs = [
|
|
|
2626
2641
|
* This source code is licensed under the ISC license.
|
|
2627
2642
|
* See the LICENSE file in the root directory of this source tree.
|
|
2628
2643
|
*/
|
|
2629
|
-
const gs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]],
|
|
2644
|
+
const gs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], oe = B("loader-circle", gs);
|
|
2630
2645
|
/**
|
|
2631
2646
|
* @license lucide-react v0.544.0 - ISC
|
|
2632
2647
|
*
|
|
@@ -2850,30 +2865,30 @@ const Ls = [
|
|
|
2850
2865
|
baseUrl: "",
|
|
2851
2866
|
apiKey: "",
|
|
2852
2867
|
appId: ""
|
|
2853
|
-
},
|
|
2868
|
+
}, po = (t) => {
|
|
2854
2869
|
if (!t.baseUrl || !t.apiKey || !t.appId)
|
|
2855
2870
|
throw new Error("baseUrl, apiKey, and appId are required");
|
|
2856
2871
|
Ue.baseUrl = t.baseUrl, Ue.apiKey = t.apiKey, Ue.appId = t.appId;
|
|
2857
|
-
},
|
|
2872
|
+
}, ge = () => Ue, fo = ({
|
|
2858
2873
|
logoUrl: t,
|
|
2859
2874
|
logoLinkUrl: e,
|
|
2860
2875
|
title: r = "Create Your Account",
|
|
2861
2876
|
subtitle: s = "Join our platform today",
|
|
2862
|
-
footerText:
|
|
2877
|
+
footerText: o = "Secure authentication powered by Neuctra Authix",
|
|
2863
2878
|
primaryColor: i = "#00C214",
|
|
2864
|
-
gradient:
|
|
2879
|
+
gradient: a = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
2865
2880
|
darkMode: l = !0,
|
|
2866
2881
|
// Only avatar is optional
|
|
2867
2882
|
showAvatar: h = !1,
|
|
2868
2883
|
roles: c = [],
|
|
2869
2884
|
// 🔥 FIXED
|
|
2870
|
-
showRoleSelector:
|
|
2885
|
+
showRoleSelector: u = !1,
|
|
2871
2886
|
// 🔥 FIXED
|
|
2872
2887
|
loginUrl: b,
|
|
2873
2888
|
onSuccess: y,
|
|
2874
2889
|
onError: w
|
|
2875
2890
|
}) => {
|
|
2876
|
-
const { baseUrl:
|
|
2891
|
+
const { baseUrl: d, apiKey: j, appId: m } = ge(), _ = {
|
|
2877
2892
|
name: "",
|
|
2878
2893
|
email: "",
|
|
2879
2894
|
password: "",
|
|
@@ -2892,14 +2907,14 @@ const Ls = [
|
|
|
2892
2907
|
}, Q = () => {
|
|
2893
2908
|
const S = {};
|
|
2894
2909
|
return R.name.trim() || (S.name = "Name is required"), R.email.trim() ? /\S+@\S+\.\S+/.test(R.email) || (S.email = "Invalid email address") : S.email = "Email is required", R.password ? R.password.length < 6 && (S.password = "Password must be at least 6 characters") : S.password = "Password is required", F(S), Object.keys(S).length === 0;
|
|
2895
|
-
},
|
|
2910
|
+
}, G = async (S) => {
|
|
2896
2911
|
if (S.preventDefault(), !!Q()) {
|
|
2897
2912
|
I(!0), U(null);
|
|
2898
2913
|
try {
|
|
2899
2914
|
const x = {
|
|
2900
2915
|
...R,
|
|
2901
2916
|
appId: m
|
|
2902
|
-
}, k = await Hn(x, { baseUrl:
|
|
2917
|
+
}, k = await Hn(x, { baseUrl: d, apiKey: j });
|
|
2903
2918
|
U({ type: "success", text: "Account created successfully!" }), y && y(k);
|
|
2904
2919
|
} catch (x) {
|
|
2905
2920
|
const k = x.message || "Signup failed. Please try again.";
|
|
@@ -3033,10 +3048,10 @@ const Ls = [
|
|
|
3033
3048
|
/* @__PURE__ */ n.jsxs(
|
|
3034
3049
|
"form",
|
|
3035
3050
|
{
|
|
3036
|
-
onSubmit:
|
|
3051
|
+
onSubmit: G,
|
|
3037
3052
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3038
3053
|
children: [
|
|
3039
|
-
|
|
3054
|
+
u && c && c.length === 2 && /* @__PURE__ */ n.jsxs(
|
|
3040
3055
|
"div",
|
|
3041
3056
|
{
|
|
3042
3057
|
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
@@ -3415,7 +3430,7 @@ const Ls = [
|
|
|
3415
3430
|
disabled: g,
|
|
3416
3431
|
style: {
|
|
3417
3432
|
padding: "12px",
|
|
3418
|
-
background:
|
|
3433
|
+
background: a,
|
|
3419
3434
|
color: "#fff",
|
|
3420
3435
|
border: "none",
|
|
3421
3436
|
borderRadius: "10px",
|
|
@@ -3473,17 +3488,17 @@ const Ls = [
|
|
|
3473
3488
|
}
|
|
3474
3489
|
);
|
|
3475
3490
|
}, Fs = async (t, e) => {
|
|
3476
|
-
const { email: r, password: s, appId:
|
|
3477
|
-
if (!
|
|
3491
|
+
const { email: r, password: s, appId: o } = t, { baseUrl: i, apiKey: a } = e;
|
|
3492
|
+
if (!a)
|
|
3478
3493
|
throw new Error("API key is required for login");
|
|
3479
3494
|
try {
|
|
3480
3495
|
const l = await W.post(
|
|
3481
3496
|
`${i}/users/login`,
|
|
3482
|
-
{ email: r, password: s, appId:
|
|
3497
|
+
{ email: r, password: s, appId: o },
|
|
3483
3498
|
{
|
|
3484
3499
|
headers: {
|
|
3485
3500
|
"Content-Type": "application/json",
|
|
3486
|
-
"x-api-key":
|
|
3501
|
+
"x-api-key": a
|
|
3487
3502
|
}
|
|
3488
3503
|
}
|
|
3489
3504
|
);
|
|
@@ -3496,20 +3511,20 @@ const Ls = [
|
|
|
3496
3511
|
status: l.response?.status || 500
|
|
3497
3512
|
};
|
|
3498
3513
|
}
|
|
3499
|
-
},
|
|
3514
|
+
}, xo = ({
|
|
3500
3515
|
logoUrl: t,
|
|
3501
3516
|
logoLinkUrl: e,
|
|
3502
3517
|
title: r = "Sign In to Your Account",
|
|
3503
3518
|
subtitle: s = "Welcome back! Please enter your details",
|
|
3504
|
-
footerText:
|
|
3519
|
+
footerText: o = "Secure authentication powered by Neuctra Authix",
|
|
3505
3520
|
primaryColor: i = "#00C214",
|
|
3506
|
-
gradient:
|
|
3521
|
+
gradient: a = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3507
3522
|
darkMode: l = !0,
|
|
3508
3523
|
signupUrl: h,
|
|
3509
3524
|
onSuccess: c,
|
|
3510
|
-
onError:
|
|
3525
|
+
onError: u
|
|
3511
3526
|
}) => {
|
|
3512
|
-
const { baseUrl: b, apiKey: y, appId: w } =
|
|
3527
|
+
const { baseUrl: b, apiKey: y, appId: w } = ge(), [d, j] = O("login"), [m, _] = O(1), [R, A] = O(!1), [C, M] = O(!1), [g, I] = O(null), [v, U] = O(""), [q, F] = O(""), [V, Z] = O({
|
|
3513
3528
|
email: "",
|
|
3514
3529
|
otp: "",
|
|
3515
3530
|
newPassword: "",
|
|
@@ -3521,7 +3536,7 @@ const Ls = [
|
|
|
3521
3536
|
return $(), window.addEventListener("resize", $), () => window.removeEventListener("resize", $);
|
|
3522
3537
|
}
|
|
3523
3538
|
}, []);
|
|
3524
|
-
const
|
|
3539
|
+
const G = async ($) => {
|
|
3525
3540
|
$.preventDefault(), M(!0), I(null);
|
|
3526
3541
|
try {
|
|
3527
3542
|
const N = await Fs(
|
|
@@ -3531,7 +3546,7 @@ const Ls = [
|
|
|
3531
3546
|
I({ type: "success", text: `Welcome ${N.name}` }), c?.(N);
|
|
3532
3547
|
} catch (N) {
|
|
3533
3548
|
const Y = N.message || "Login failed";
|
|
3534
|
-
I({ type: "error", text: Y }),
|
|
3549
|
+
I({ type: "error", text: Y }), u?.(N);
|
|
3535
3550
|
} finally {
|
|
3536
3551
|
M(!1);
|
|
3537
3552
|
}
|
|
@@ -3653,7 +3668,7 @@ const Ls = [
|
|
|
3653
3668
|
color: z,
|
|
3654
3669
|
margin: 0
|
|
3655
3670
|
},
|
|
3656
|
-
children:
|
|
3671
|
+
children: d === "login" ? r : m === 1 ? "Forgot Password" : "Reset Password"
|
|
3657
3672
|
}
|
|
3658
3673
|
),
|
|
3659
3674
|
/* @__PURE__ */ n.jsx(
|
|
@@ -3663,16 +3678,16 @@ const Ls = [
|
|
|
3663
3678
|
fontSize: "14px",
|
|
3664
3679
|
color: P
|
|
3665
3680
|
},
|
|
3666
|
-
children:
|
|
3681
|
+
children: d === "login" ? s : "Follow the steps to reset your password"
|
|
3667
3682
|
}
|
|
3668
3683
|
)
|
|
3669
3684
|
]
|
|
3670
3685
|
}
|
|
3671
3686
|
),
|
|
3672
|
-
|
|
3687
|
+
d === "login" && /* @__PURE__ */ n.jsxs(
|
|
3673
3688
|
"form",
|
|
3674
3689
|
{
|
|
3675
|
-
onSubmit:
|
|
3690
|
+
onSubmit: G,
|
|
3676
3691
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3677
3692
|
children: [
|
|
3678
3693
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -3832,7 +3847,7 @@ const Ls = [
|
|
|
3832
3847
|
disabled: C,
|
|
3833
3848
|
style: {
|
|
3834
3849
|
padding: "12px",
|
|
3835
|
-
background:
|
|
3850
|
+
background: a,
|
|
3836
3851
|
color: "#fff",
|
|
3837
3852
|
border: "none",
|
|
3838
3853
|
borderRadius: "10px",
|
|
@@ -3845,7 +3860,7 @@ const Ls = [
|
|
|
3845
3860
|
]
|
|
3846
3861
|
}
|
|
3847
3862
|
),
|
|
3848
|
-
|
|
3863
|
+
d === "forgot" && /* @__PURE__ */ n.jsxs(
|
|
3849
3864
|
"form",
|
|
3850
3865
|
{
|
|
3851
3866
|
onSubmit: m === 1 ? S : x,
|
|
@@ -4008,7 +4023,7 @@ const Ls = [
|
|
|
4008
4023
|
disabled: C,
|
|
4009
4024
|
style: {
|
|
4010
4025
|
padding: "12px",
|
|
4011
|
-
background:
|
|
4026
|
+
background: a,
|
|
4012
4027
|
color: "#fff",
|
|
4013
4028
|
border: "none",
|
|
4014
4029
|
fontSize: "14px",
|
|
@@ -4082,52 +4097,38 @@ const Ls = [
|
|
|
4082
4097
|
)
|
|
4083
4098
|
}
|
|
4084
4099
|
);
|
|
4085
|
-
},
|
|
4100
|
+
}, ho = ({
|
|
4086
4101
|
children: t,
|
|
4087
4102
|
fallback: e = null,
|
|
4088
4103
|
className: r,
|
|
4089
4104
|
width: s,
|
|
4090
|
-
height:
|
|
4105
|
+
height: o
|
|
4091
4106
|
}) => {
|
|
4092
|
-
const
|
|
4107
|
+
const [i, a] = O(() => {
|
|
4108
|
+
if (typeof window > "u") return !1;
|
|
4109
|
+
try {
|
|
4110
|
+
const l = localStorage.getItem("userInfo");
|
|
4111
|
+
return !!(l && l !== "undefined" && l !== "null");
|
|
4112
|
+
} catch {
|
|
4113
|
+
return !1;
|
|
4114
|
+
}
|
|
4115
|
+
});
|
|
4093
4116
|
return te(() => {
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
}
|
|
4102
|
-
|
|
4103
|
-
if (!u?.id) {
|
|
4104
|
-
l(!1);
|
|
4105
|
-
return;
|
|
4106
|
-
}
|
|
4107
|
-
const j = await fetch(
|
|
4108
|
-
`https://server.authix.neuctra.com/api/users/check-user/${u.id}?appId=${i}`,
|
|
4109
|
-
{
|
|
4110
|
-
credentials: "include"
|
|
4111
|
-
}
|
|
4112
|
-
);
|
|
4113
|
-
if (!j.ok) {
|
|
4114
|
-
l(!1);
|
|
4115
|
-
return;
|
|
4117
|
+
const l = () => {
|
|
4118
|
+
if (!(typeof window > "u"))
|
|
4119
|
+
try {
|
|
4120
|
+
const h = localStorage.getItem("userInfo");
|
|
4121
|
+
a(
|
|
4122
|
+
!!(h && h !== "undefined" && h !== "null")
|
|
4123
|
+
);
|
|
4124
|
+
} catch {
|
|
4125
|
+
a(!1);
|
|
4116
4126
|
}
|
|
4117
|
-
const m = await j.json();
|
|
4118
|
-
d || l(!!m?.exists);
|
|
4119
|
-
} catch {
|
|
4120
|
-
d || l(!1);
|
|
4121
|
-
} finally {
|
|
4122
|
-
d || c(!1);
|
|
4123
|
-
}
|
|
4124
4127
|
};
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
return window.addEventListener("storage", y), () => {
|
|
4128
|
-
d = !0, window.removeEventListener("storage", y);
|
|
4128
|
+
return window.addEventListener("storage", l), () => {
|
|
4129
|
+
window.removeEventListener("storage", l);
|
|
4129
4130
|
};
|
|
4130
|
-
}, [
|
|
4131
|
+
}, []), i ? /* @__PURE__ */ n.jsx(
|
|
4131
4132
|
"div",
|
|
4132
4133
|
{
|
|
4133
4134
|
className: r,
|
|
@@ -4135,19 +4136,19 @@ const Ls = [
|
|
|
4135
4136
|
display: "flex",
|
|
4136
4137
|
alignItems: "center",
|
|
4137
4138
|
width: s,
|
|
4138
|
-
height:
|
|
4139
|
+
height: o
|
|
4139
4140
|
},
|
|
4140
4141
|
children: t
|
|
4141
4142
|
}
|
|
4142
4143
|
) : typeof e == "function" ? e() : e;
|
|
4143
|
-
},
|
|
4144
|
+
}, go = ({
|
|
4144
4145
|
children: t,
|
|
4145
4146
|
fallback: e = null,
|
|
4146
4147
|
className: r,
|
|
4147
4148
|
width: s,
|
|
4148
|
-
height:
|
|
4149
|
+
height: o
|
|
4149
4150
|
}) => {
|
|
4150
|
-
const [i,
|
|
4151
|
+
const [i, a] = O(() => {
|
|
4151
4152
|
if (typeof window > "u") return !0;
|
|
4152
4153
|
try {
|
|
4153
4154
|
const l = localStorage.getItem("userInfo");
|
|
@@ -4160,11 +4161,11 @@ const Ls = [
|
|
|
4160
4161
|
const l = () => {
|
|
4161
4162
|
try {
|
|
4162
4163
|
const h = localStorage.getItem("userInfo");
|
|
4163
|
-
|
|
4164
|
+
a(
|
|
4164
4165
|
!h || h === "undefined" || h === "null"
|
|
4165
4166
|
);
|
|
4166
4167
|
} catch {
|
|
4167
|
-
|
|
4168
|
+
a(!0);
|
|
4168
4169
|
}
|
|
4169
4170
|
};
|
|
4170
4171
|
return l(), window.addEventListener("storage", l), () => window.removeEventListener("storage", l);
|
|
@@ -4176,7 +4177,7 @@ const Ls = [
|
|
|
4176
4177
|
display: "flex",
|
|
4177
4178
|
alignItems: "center",
|
|
4178
4179
|
width: s,
|
|
4179
|
-
height:
|
|
4180
|
+
height: o
|
|
4180
4181
|
},
|
|
4181
4182
|
children: t
|
|
4182
4183
|
}
|
|
@@ -4186,11 +4187,11 @@ const Ls = [
|
|
|
4186
4187
|
onClose: e,
|
|
4187
4188
|
onSuccess: r,
|
|
4188
4189
|
onError: s,
|
|
4189
|
-
userId:
|
|
4190
|
+
userId: o,
|
|
4190
4191
|
token: i,
|
|
4191
|
-
colors:
|
|
4192
|
+
colors: a
|
|
4192
4193
|
}) => {
|
|
4193
|
-
const { baseUrl: l, apiKey: h, appId: c } =
|
|
4194
|
+
const { baseUrl: l, apiKey: h, appId: c } = ge(), [u, b] = O(!1), [y, w] = O(""), [d, j] = O("warning"), [m, _] = O(!1);
|
|
4194
4195
|
if (te(() => {
|
|
4195
4196
|
if (typeof window > "u") return;
|
|
4196
4197
|
const g = () => {
|
|
@@ -4201,7 +4202,7 @@ const Ls = [
|
|
|
4201
4202
|
const R = async () => {
|
|
4202
4203
|
b(!0), j("processing");
|
|
4203
4204
|
try {
|
|
4204
|
-
const { data: g } = await W.delete(`${l}/users/delete/${
|
|
4205
|
+
const { data: g } = await W.delete(`${l}/users/delete/${o}`, {
|
|
4205
4206
|
data: { appId: c },
|
|
4206
4207
|
headers: {
|
|
4207
4208
|
"x-api-key": h
|
|
@@ -4216,9 +4217,9 @@ const Ls = [
|
|
|
4216
4217
|
b(!1);
|
|
4217
4218
|
}
|
|
4218
4219
|
}, A = y.toLowerCase() === "delete my account", C = (g) => {
|
|
4219
|
-
g.target === g.currentTarget &&
|
|
4220
|
+
g.target === g.currentTarget && d !== "processing" && d !== "success" && e();
|
|
4220
4221
|
}, M = () => {
|
|
4221
|
-
switch (
|
|
4222
|
+
switch (d) {
|
|
4222
4223
|
case "warning":
|
|
4223
4224
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4224
4225
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -4263,7 +4264,7 @@ const Ls = [
|
|
|
4263
4264
|
"h3",
|
|
4264
4265
|
{
|
|
4265
4266
|
style: {
|
|
4266
|
-
color:
|
|
4267
|
+
color: a.textPrimary,
|
|
4267
4268
|
margin: 0,
|
|
4268
4269
|
fontSize: "20px",
|
|
4269
4270
|
fontWeight: 700,
|
|
@@ -4283,7 +4284,7 @@ const Ls = [
|
|
|
4283
4284
|
style: {
|
|
4284
4285
|
background: "transparent",
|
|
4285
4286
|
border: "none",
|
|
4286
|
-
color:
|
|
4287
|
+
color: a.textTertiary,
|
|
4287
4288
|
cursor: "pointer",
|
|
4288
4289
|
padding: "8px",
|
|
4289
4290
|
borderRadius: "8px",
|
|
@@ -4296,10 +4297,10 @@ const Ls = [
|
|
|
4296
4297
|
transition: "all 0.2s ease"
|
|
4297
4298
|
},
|
|
4298
4299
|
onMouseOver: (g) => {
|
|
4299
|
-
g.currentTarget.style.backgroundColor =
|
|
4300
|
+
g.currentTarget.style.backgroundColor = a.border, g.currentTarget.style.color = a.textPrimary;
|
|
4300
4301
|
},
|
|
4301
4302
|
onMouseOut: (g) => {
|
|
4302
|
-
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color =
|
|
4303
|
+
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color = a.textTertiary;
|
|
4303
4304
|
},
|
|
4304
4305
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
|
|
4305
4306
|
}
|
|
@@ -4314,8 +4315,8 @@ const Ls = [
|
|
|
4314
4315
|
display: "flex",
|
|
4315
4316
|
gap: "16px",
|
|
4316
4317
|
padding: "20px",
|
|
4317
|
-
background: `${
|
|
4318
|
-
border: `1px solid ${
|
|
4318
|
+
background: `${a.error}15`,
|
|
4319
|
+
border: `1px solid ${a.error}30`,
|
|
4319
4320
|
borderRadius: "12px",
|
|
4320
4321
|
marginBottom: "20px"
|
|
4321
4322
|
},
|
|
@@ -4324,7 +4325,7 @@ const Ls = [
|
|
|
4324
4325
|
"div",
|
|
4325
4326
|
{
|
|
4326
4327
|
style: {
|
|
4327
|
-
color:
|
|
4328
|
+
color: a.error,
|
|
4328
4329
|
flexShrink: 0,
|
|
4329
4330
|
display: "flex",
|
|
4330
4331
|
alignItems: "flex-start"
|
|
@@ -4337,7 +4338,7 @@ const Ls = [
|
|
|
4337
4338
|
"h4",
|
|
4338
4339
|
{
|
|
4339
4340
|
style: {
|
|
4340
|
-
color:
|
|
4341
|
+
color: a.textPrimary,
|
|
4341
4342
|
margin: "0 0 12px 0",
|
|
4342
4343
|
fontSize: "16px",
|
|
4343
4344
|
fontWeight: 600
|
|
@@ -4374,10 +4375,10 @@ const Ls = [
|
|
|
4374
4375
|
alignItems: "center",
|
|
4375
4376
|
gap: "10px",
|
|
4376
4377
|
fontSize: "14px",
|
|
4377
|
-
color:
|
|
4378
|
+
color: a.textSecondary
|
|
4378
4379
|
},
|
|
4379
4380
|
children: [
|
|
4380
|
-
/* @__PURE__ */ n.jsx("div", { style: { color:
|
|
4381
|
+
/* @__PURE__ */ n.jsx("div", { style: { color: a.error, flexShrink: 0 }, children: g.icon }),
|
|
4381
4382
|
/* @__PURE__ */ n.jsx("span", { children: g.text })
|
|
4382
4383
|
]
|
|
4383
4384
|
},
|
|
@@ -4407,9 +4408,9 @@ const Ls = [
|
|
|
4407
4408
|
style: {
|
|
4408
4409
|
padding: "10px 24px",
|
|
4409
4410
|
borderRadius: "10px",
|
|
4410
|
-
border: `1.5px solid ${
|
|
4411
|
+
border: `1.5px solid ${a.border}`,
|
|
4411
4412
|
background: "transparent",
|
|
4412
|
-
color:
|
|
4413
|
+
color: a.textPrimary,
|
|
4413
4414
|
fontSize: "14px",
|
|
4414
4415
|
fontWeight: 500,
|
|
4415
4416
|
cursor: "pointer",
|
|
@@ -4418,7 +4419,7 @@ const Ls = [
|
|
|
4418
4419
|
transition: "all 0.2s ease"
|
|
4419
4420
|
},
|
|
4420
4421
|
onMouseOver: (g) => {
|
|
4421
|
-
g.currentTarget.style.backgroundColor =
|
|
4422
|
+
g.currentTarget.style.backgroundColor = a.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4422
4423
|
},
|
|
4423
4424
|
onMouseOut: (g) => {
|
|
4424
4425
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4497,7 +4498,7 @@ const Ls = [
|
|
|
4497
4498
|
"h3",
|
|
4498
4499
|
{
|
|
4499
4500
|
style: {
|
|
4500
|
-
color:
|
|
4501
|
+
color: a.textPrimary,
|
|
4501
4502
|
margin: 0,
|
|
4502
4503
|
fontSize: "20px",
|
|
4503
4504
|
fontWeight: 700,
|
|
@@ -4514,7 +4515,7 @@ const Ls = [
|
|
|
4514
4515
|
"p",
|
|
4515
4516
|
{
|
|
4516
4517
|
style: {
|
|
4517
|
-
color:
|
|
4518
|
+
color: a.textSecondary,
|
|
4518
4519
|
marginBottom: "16px",
|
|
4519
4520
|
fontSize: "14px",
|
|
4520
4521
|
lineHeight: "1.5"
|
|
@@ -4522,7 +4523,7 @@ const Ls = [
|
|
|
4522
4523
|
children: [
|
|
4523
4524
|
"Type",
|
|
4524
4525
|
" ",
|
|
4525
|
-
/* @__PURE__ */ n.jsx("strong", { style: { color:
|
|
4526
|
+
/* @__PURE__ */ n.jsx("strong", { style: { color: a.textPrimary }, children: '"delete my account"' }),
|
|
4526
4527
|
" ",
|
|
4527
4528
|
"to confirm:"
|
|
4528
4529
|
]
|
|
@@ -4539,16 +4540,16 @@ const Ls = [
|
|
|
4539
4540
|
width: "100%",
|
|
4540
4541
|
padding: "14px 16px",
|
|
4541
4542
|
borderRadius: "10px",
|
|
4542
|
-
border: `2px solid ${A ?
|
|
4543
|
+
border: `2px solid ${A ? a.success : a.error}`,
|
|
4543
4544
|
backgroundColor: "transparent",
|
|
4544
|
-
color:
|
|
4545
|
+
color: a.textPrimary,
|
|
4545
4546
|
fontSize: "15px",
|
|
4546
4547
|
outline: "none",
|
|
4547
4548
|
transition: "all 0.2s ease",
|
|
4548
4549
|
boxSizing: "border-box"
|
|
4549
4550
|
},
|
|
4550
4551
|
onFocus: (g) => {
|
|
4551
|
-
g.target.style.boxShadow = `0 0 0 3px ${
|
|
4552
|
+
g.target.style.boxShadow = `0 0 0 3px ${a.accent}20`;
|
|
4552
4553
|
},
|
|
4553
4554
|
onBlur: (g) => {
|
|
4554
4555
|
g.target.style.boxShadow = "none";
|
|
@@ -4564,12 +4565,12 @@ const Ls = [
|
|
|
4564
4565
|
alignItems: "center",
|
|
4565
4566
|
gap: "8px",
|
|
4566
4567
|
marginTop: "10px",
|
|
4567
|
-
color:
|
|
4568
|
+
color: a.success,
|
|
4568
4569
|
fontSize: "14px",
|
|
4569
4570
|
fontWeight: 500
|
|
4570
4571
|
},
|
|
4571
4572
|
children: [
|
|
4572
|
-
/* @__PURE__ */ n.jsx(
|
|
4573
|
+
/* @__PURE__ */ n.jsx(Ge, { size: 16 }),
|
|
4573
4574
|
/* @__PURE__ */ n.jsx("span", { children: "Confirmation accepted" })
|
|
4574
4575
|
]
|
|
4575
4576
|
}
|
|
@@ -4595,9 +4596,9 @@ const Ls = [
|
|
|
4595
4596
|
style: {
|
|
4596
4597
|
padding: "10px 24px",
|
|
4597
4598
|
borderRadius: "10px",
|
|
4598
|
-
border: `1.5px solid ${
|
|
4599
|
+
border: `1.5px solid ${a.border}`,
|
|
4599
4600
|
background: "transparent",
|
|
4600
|
-
color:
|
|
4601
|
+
color: a.textPrimary,
|
|
4601
4602
|
fontSize: "14px",
|
|
4602
4603
|
fontWeight: 500,
|
|
4603
4604
|
cursor: "pointer",
|
|
@@ -4606,7 +4607,7 @@ const Ls = [
|
|
|
4606
4607
|
transition: "all 0.2s ease"
|
|
4607
4608
|
},
|
|
4608
4609
|
onMouseOver: (g) => {
|
|
4609
|
-
g.currentTarget.style.backgroundColor =
|
|
4610
|
+
g.currentTarget.style.backgroundColor = a.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4610
4611
|
},
|
|
4611
4612
|
onMouseOut: (g) => {
|
|
4612
4613
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4618,7 +4619,7 @@ const Ls = [
|
|
|
4618
4619
|
"button",
|
|
4619
4620
|
{
|
|
4620
4621
|
onClick: R,
|
|
4621
|
-
disabled: !A ||
|
|
4622
|
+
disabled: !A || u,
|
|
4622
4623
|
style: {
|
|
4623
4624
|
padding: "10px 24px",
|
|
4624
4625
|
borderRadius: "10px",
|
|
@@ -4627,22 +4628,22 @@ const Ls = [
|
|
|
4627
4628
|
color: "white",
|
|
4628
4629
|
fontSize: "14px",
|
|
4629
4630
|
fontWeight: 600,
|
|
4630
|
-
cursor: !A ||
|
|
4631
|
+
cursor: !A || u ? "not-allowed" : "pointer",
|
|
4631
4632
|
flex: m ? "none" : 1,
|
|
4632
4633
|
minWidth: m ? "100%" : "140px",
|
|
4633
|
-
opacity: !A ||
|
|
4634
|
+
opacity: !A || u ? 0.6 : 1,
|
|
4634
4635
|
display: "flex",
|
|
4635
4636
|
alignItems: "center",
|
|
4636
4637
|
justifyContent: "center",
|
|
4637
4638
|
gap: "8px",
|
|
4638
4639
|
transition: "all 0.2s ease",
|
|
4639
|
-
boxShadow: !A ||
|
|
4640
|
+
boxShadow: !A || u ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
|
|
4640
4641
|
},
|
|
4641
4642
|
onMouseOver: (g) => {
|
|
4642
|
-
A && !
|
|
4643
|
+
A && !u && (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
|
|
4643
4644
|
},
|
|
4644
4645
|
onMouseOut: (g) => {
|
|
4645
|
-
A && !
|
|
4646
|
+
A && !u && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
4646
4647
|
},
|
|
4647
4648
|
children: [
|
|
4648
4649
|
/* @__PURE__ */ n.jsx(Ne, { size: 16 }),
|
|
@@ -4681,7 +4682,7 @@ const Ls = [
|
|
|
4681
4682
|
flexShrink: 0
|
|
4682
4683
|
},
|
|
4683
4684
|
children: /* @__PURE__ */ n.jsx(
|
|
4684
|
-
|
|
4685
|
+
oe,
|
|
4685
4686
|
{
|
|
4686
4687
|
size: 20,
|
|
4687
4688
|
style: {
|
|
@@ -4696,7 +4697,7 @@ const Ls = [
|
|
|
4696
4697
|
"h3",
|
|
4697
4698
|
{
|
|
4698
4699
|
style: {
|
|
4699
|
-
color:
|
|
4700
|
+
color: a.textPrimary,
|
|
4700
4701
|
margin: 0,
|
|
4701
4702
|
fontSize: "20px",
|
|
4702
4703
|
fontWeight: 700,
|
|
@@ -4709,7 +4710,7 @@ const Ls = [
|
|
|
4709
4710
|
"p",
|
|
4710
4711
|
{
|
|
4711
4712
|
style: {
|
|
4712
|
-
color:
|
|
4713
|
+
color: a.textTertiary,
|
|
4713
4714
|
margin: "4px 0 0 0",
|
|
4714
4715
|
fontSize: "14px",
|
|
4715
4716
|
lineHeight: "1.4"
|
|
@@ -4743,7 +4744,7 @@ const Ls = [
|
|
|
4743
4744
|
padding: "12px",
|
|
4744
4745
|
borderRadius: "8px",
|
|
4745
4746
|
transition: "all 0.2s ease",
|
|
4746
|
-
backgroundColor: g.active ? `${
|
|
4747
|
+
backgroundColor: g.active ? `${a.accent}10` : "transparent"
|
|
4747
4748
|
},
|
|
4748
4749
|
children: [
|
|
4749
4750
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4753,9 +4754,9 @@ const Ls = [
|
|
|
4753
4754
|
width: "8px",
|
|
4754
4755
|
height: "8px",
|
|
4755
4756
|
borderRadius: "50%",
|
|
4756
|
-
backgroundColor: g.active ?
|
|
4757
|
+
backgroundColor: g.active ? a.accent : a.textTertiary,
|
|
4757
4758
|
transition: "all 0.3s ease",
|
|
4758
|
-
boxShadow: g.active ? `0 0 0 4px ${
|
|
4759
|
+
boxShadow: g.active ? `0 0 0 4px ${a.accent}20` : "none"
|
|
4759
4760
|
}
|
|
4760
4761
|
}
|
|
4761
4762
|
),
|
|
@@ -4764,7 +4765,7 @@ const Ls = [
|
|
|
4764
4765
|
{
|
|
4765
4766
|
style: {
|
|
4766
4767
|
fontSize: "14px",
|
|
4767
|
-
color: g.active ?
|
|
4768
|
+
color: g.active ? a.textPrimary : a.textSecondary,
|
|
4768
4769
|
fontWeight: g.active ? 500 : 400
|
|
4769
4770
|
},
|
|
4770
4771
|
children: g.text
|
|
@@ -4784,17 +4785,17 @@ const Ls = [
|
|
|
4784
4785
|
alignItems: "center",
|
|
4785
4786
|
gap: "10px",
|
|
4786
4787
|
padding: "16px",
|
|
4787
|
-
background: `${
|
|
4788
|
+
background: `${a.accent}10`,
|
|
4788
4789
|
borderRadius: "10px",
|
|
4789
4790
|
fontSize: "14px",
|
|
4790
|
-
color:
|
|
4791
|
+
color: a.textSecondary
|
|
4791
4792
|
},
|
|
4792
4793
|
children: [
|
|
4793
4794
|
/* @__PURE__ */ n.jsx(
|
|
4794
4795
|
dr,
|
|
4795
4796
|
{
|
|
4796
4797
|
size: 18,
|
|
4797
|
-
style: { color:
|
|
4798
|
+
style: { color: a.accent, flexShrink: 0 }
|
|
4798
4799
|
}
|
|
4799
4800
|
),
|
|
4800
4801
|
/* @__PURE__ */ n.jsx("span", { children: "You will be redirected to the login page shortly" })
|
|
@@ -4828,7 +4829,7 @@ const Ls = [
|
|
|
4828
4829
|
color: "white",
|
|
4829
4830
|
flexShrink: 0
|
|
4830
4831
|
},
|
|
4831
|
-
children: /* @__PURE__ */ n.jsx(
|
|
4832
|
+
children: /* @__PURE__ */ n.jsx(Ge, { size: 20 })
|
|
4832
4833
|
}
|
|
4833
4834
|
),
|
|
4834
4835
|
/* @__PURE__ */ n.jsxs("div", { style: { flex: 1 }, children: [
|
|
@@ -4836,7 +4837,7 @@ const Ls = [
|
|
|
4836
4837
|
"h3",
|
|
4837
4838
|
{
|
|
4838
4839
|
style: {
|
|
4839
|
-
color:
|
|
4840
|
+
color: a.textPrimary,
|
|
4840
4841
|
margin: 0,
|
|
4841
4842
|
fontSize: "20px",
|
|
4842
4843
|
fontWeight: 700,
|
|
@@ -4849,7 +4850,7 @@ const Ls = [
|
|
|
4849
4850
|
"p",
|
|
4850
4851
|
{
|
|
4851
4852
|
style: {
|
|
4852
|
-
color:
|
|
4853
|
+
color: a.textTertiary,
|
|
4853
4854
|
margin: "4px 0 0 0",
|
|
4854
4855
|
fontSize: "14px",
|
|
4855
4856
|
lineHeight: "1.4"
|
|
@@ -4867,18 +4868,18 @@ const Ls = [
|
|
|
4867
4868
|
style: {
|
|
4868
4869
|
textAlign: "center",
|
|
4869
4870
|
padding: "20px",
|
|
4870
|
-
background: `${
|
|
4871
|
-
border: `1px solid ${
|
|
4871
|
+
background: `${a.success}10`,
|
|
4872
|
+
border: `1px solid ${a.success}20`,
|
|
4872
4873
|
borderRadius: "12px",
|
|
4873
4874
|
marginBottom: "24px"
|
|
4874
4875
|
},
|
|
4875
4876
|
children: [
|
|
4876
4877
|
/* @__PURE__ */ n.jsx(
|
|
4877
|
-
|
|
4878
|
+
Ge,
|
|
4878
4879
|
{
|
|
4879
4880
|
size: 48,
|
|
4880
4881
|
style: {
|
|
4881
|
-
color:
|
|
4882
|
+
color: a.success,
|
|
4882
4883
|
marginBottom: "12px",
|
|
4883
4884
|
display: "block",
|
|
4884
4885
|
margin: "0 auto 12px auto"
|
|
@@ -4889,7 +4890,7 @@ const Ls = [
|
|
|
4889
4890
|
"p",
|
|
4890
4891
|
{
|
|
4891
4892
|
style: {
|
|
4892
|
-
color:
|
|
4893
|
+
color: a.textPrimary,
|
|
4893
4894
|
fontSize: "16px",
|
|
4894
4895
|
fontWeight: 600,
|
|
4895
4896
|
margin: "0 0 8px 0"
|
|
@@ -4901,7 +4902,7 @@ const Ls = [
|
|
|
4901
4902
|
"p",
|
|
4902
4903
|
{
|
|
4903
4904
|
style: {
|
|
4904
|
-
color:
|
|
4905
|
+
color: a.textSecondary,
|
|
4905
4906
|
fontSize: "14px",
|
|
4906
4907
|
margin: 0,
|
|
4907
4908
|
lineHeight: "1.5"
|
|
@@ -4920,20 +4921,20 @@ const Ls = [
|
|
|
4920
4921
|
alignItems: "center",
|
|
4921
4922
|
gap: "10px",
|
|
4922
4923
|
padding: "16px",
|
|
4923
|
-
background: `${
|
|
4924
|
+
background: `${a.accent}10`,
|
|
4924
4925
|
borderRadius: "10px",
|
|
4925
4926
|
fontSize: "14px",
|
|
4926
|
-
color:
|
|
4927
|
+
color: a.textSecondary,
|
|
4927
4928
|
justifyContent: "center"
|
|
4928
4929
|
},
|
|
4929
4930
|
children: [
|
|
4930
4931
|
/* @__PURE__ */ n.jsx(
|
|
4931
|
-
|
|
4932
|
+
oe,
|
|
4932
4933
|
{
|
|
4933
4934
|
size: 16,
|
|
4934
4935
|
style: {
|
|
4935
4936
|
animation: "spin 1s linear infinite",
|
|
4936
|
-
color:
|
|
4937
|
+
color: a.accent
|
|
4937
4938
|
}
|
|
4938
4939
|
}
|
|
4939
4940
|
),
|
|
@@ -4965,8 +4966,8 @@ const Ls = [
|
|
|
4965
4966
|
"div",
|
|
4966
4967
|
{
|
|
4967
4968
|
style: {
|
|
4968
|
-
backgroundColor:
|
|
4969
|
-
border: `1px solid ${
|
|
4969
|
+
backgroundColor: a.surface,
|
|
4970
|
+
border: `1px solid ${a.border}`,
|
|
4970
4971
|
borderRadius: "20px",
|
|
4971
4972
|
width: "100%",
|
|
4972
4973
|
maxWidth: "480px",
|
|
@@ -5042,20 +5043,20 @@ const Ls = [
|
|
|
5042
5043
|
onUpdate: r,
|
|
5043
5044
|
colors: s
|
|
5044
5045
|
}) => {
|
|
5045
|
-
const [
|
|
5046
|
+
const [o, i] = O(""), [a, l] = O(!1), [h, c] = O(!1), [u, b] = O({ isValid: !1, message: "", type: null });
|
|
5046
5047
|
if (te(() => {
|
|
5047
5048
|
if (typeof window > "u") return;
|
|
5048
|
-
const
|
|
5049
|
+
const d = () => {
|
|
5049
5050
|
c(window.innerWidth < 640);
|
|
5050
5051
|
};
|
|
5051
|
-
return
|
|
5052
|
+
return d(), window.addEventListener("resize", d), () => window.removeEventListener("resize", d);
|
|
5052
5053
|
}, []), te(() => {
|
|
5053
|
-
if (!
|
|
5054
|
+
if (!o.trim()) {
|
|
5054
5055
|
b({ isValid: !1, message: "", type: null });
|
|
5055
5056
|
return;
|
|
5056
5057
|
}
|
|
5057
5058
|
try {
|
|
5058
|
-
const
|
|
5059
|
+
const d = new URL(o), j = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(d.pathname);
|
|
5059
5060
|
b(j ? {
|
|
5060
5061
|
isValid: !0,
|
|
5061
5062
|
message: "Valid image URL",
|
|
@@ -5072,18 +5073,18 @@ const Ls = [
|
|
|
5072
5073
|
type: "error"
|
|
5073
5074
|
});
|
|
5074
5075
|
}
|
|
5075
|
-
}, [
|
|
5076
|
+
}, [o]), !t) return null;
|
|
5076
5077
|
const y = async () => {
|
|
5077
|
-
if (!(!
|
|
5078
|
+
if (!(!o || !u.isValid)) {
|
|
5078
5079
|
l(!0);
|
|
5079
5080
|
try {
|
|
5080
|
-
await r(
|
|
5081
|
+
await r(o) && (i(""), e());
|
|
5081
5082
|
} finally {
|
|
5082
5083
|
l(!1);
|
|
5083
5084
|
}
|
|
5084
5085
|
}
|
|
5085
|
-
}, w = (
|
|
5086
|
-
|
|
5086
|
+
}, w = (d) => {
|
|
5087
|
+
d.target === d.currentTarget && e();
|
|
5087
5088
|
};
|
|
5088
5089
|
return /* @__PURE__ */ n.jsxs(
|
|
5089
5090
|
"div",
|
|
@@ -5190,11 +5191,11 @@ const Ls = [
|
|
|
5190
5191
|
flexShrink: 0,
|
|
5191
5192
|
transition: "all 0.2s ease"
|
|
5192
5193
|
},
|
|
5193
|
-
onMouseOver: (
|
|
5194
|
-
|
|
5194
|
+
onMouseOver: (d) => {
|
|
5195
|
+
d.currentTarget.style.backgroundColor = s.border, d.currentTarget.style.color = s.textPrimary;
|
|
5195
5196
|
},
|
|
5196
|
-
onMouseOut: (
|
|
5197
|
-
|
|
5197
|
+
onMouseOut: (d) => {
|
|
5198
|
+
d.currentTarget.style.backgroundColor = "transparent", d.currentTarget.style.color = s.textTertiary;
|
|
5198
5199
|
},
|
|
5199
5200
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
|
|
5200
5201
|
}
|
|
@@ -5238,14 +5239,14 @@ const Ls = [
|
|
|
5238
5239
|
type: "url",
|
|
5239
5240
|
id: "avatar-url",
|
|
5240
5241
|
placeholder: "https://example.com/your-avatar.jpg",
|
|
5241
|
-
value:
|
|
5242
|
-
onChange: (
|
|
5242
|
+
value: o,
|
|
5243
|
+
onChange: (d) => i(d.target.value),
|
|
5243
5244
|
style: {
|
|
5244
5245
|
width: "100%",
|
|
5245
5246
|
padding: "14px 16px",
|
|
5246
5247
|
paddingLeft: "44px",
|
|
5247
5248
|
borderRadius: "12px",
|
|
5248
|
-
border: `1.5px solid ${
|
|
5249
|
+
border: `1.5px solid ${u.type === "error" ? s.error : u.type === "success" ? s.success : s.border}`,
|
|
5249
5250
|
backgroundColor: "transparent",
|
|
5250
5251
|
color: s.textPrimary,
|
|
5251
5252
|
fontSize: "15px",
|
|
@@ -5253,13 +5254,13 @@ const Ls = [
|
|
|
5253
5254
|
transition: "all 0.2s ease",
|
|
5254
5255
|
boxSizing: "border-box"
|
|
5255
5256
|
},
|
|
5256
|
-
onFocus: (
|
|
5257
|
-
|
|
5257
|
+
onFocus: (d) => {
|
|
5258
|
+
d.target.style.borderColor = s.accent, d.target.style.boxShadow = `0 0 0 3px ${s.accent}20`;
|
|
5258
5259
|
},
|
|
5259
|
-
onBlur: (
|
|
5260
|
-
|
|
5260
|
+
onBlur: (d) => {
|
|
5261
|
+
d.target.style.borderColor = u.type === "error" ? s.error : u.type === "success" ? s.success : s.border, d.target.style.boxShadow = "none";
|
|
5261
5262
|
},
|
|
5262
|
-
disabled:
|
|
5263
|
+
disabled: a
|
|
5263
5264
|
}
|
|
5264
5265
|
),
|
|
5265
5266
|
/* @__PURE__ */ n.jsx(
|
|
@@ -5276,7 +5277,7 @@ const Ls = [
|
|
|
5276
5277
|
}
|
|
5277
5278
|
)
|
|
5278
5279
|
] }),
|
|
5279
|
-
|
|
5280
|
+
u.message && /* @__PURE__ */ n.jsxs(
|
|
5280
5281
|
"div",
|
|
5281
5282
|
{
|
|
5282
5283
|
style: {
|
|
@@ -5285,18 +5286,18 @@ const Ls = [
|
|
|
5285
5286
|
gap: "6px",
|
|
5286
5287
|
marginTop: "8px",
|
|
5287
5288
|
fontSize: "13px",
|
|
5288
|
-
color:
|
|
5289
|
+
color: u.type === "success" ? s.success : u.type === "error" ? s.error : s.textTertiary
|
|
5289
5290
|
},
|
|
5290
5291
|
children: [
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5292
|
+
u.type === "success" && /* @__PURE__ */ n.jsx(ce, { size: 14 }),
|
|
5293
|
+
u.type === "error" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
|
|
5294
|
+
u.type === "warning" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
|
|
5295
|
+
u.message
|
|
5295
5296
|
]
|
|
5296
5297
|
}
|
|
5297
5298
|
)
|
|
5298
5299
|
] }),
|
|
5299
|
-
|
|
5300
|
+
o && u.type === "success" && /* @__PURE__ */ n.jsxs(
|
|
5300
5301
|
"div",
|
|
5301
5302
|
{
|
|
5302
5303
|
style: {
|
|
@@ -5322,7 +5323,7 @@ const Ls = [
|
|
|
5322
5323
|
/* @__PURE__ */ n.jsx(
|
|
5323
5324
|
"img",
|
|
5324
5325
|
{
|
|
5325
|
-
src:
|
|
5326
|
+
src: o,
|
|
5326
5327
|
alt: "Avatar preview",
|
|
5327
5328
|
style: {
|
|
5328
5329
|
width: "80px",
|
|
@@ -5332,8 +5333,8 @@ const Ls = [
|
|
|
5332
5333
|
border: `2px solid ${s.success}40`,
|
|
5333
5334
|
margin: "0 auto"
|
|
5334
5335
|
},
|
|
5335
|
-
onError: (
|
|
5336
|
-
|
|
5336
|
+
onError: (d) => {
|
|
5337
|
+
d.currentTarget.style.display = "none";
|
|
5337
5338
|
}
|
|
5338
5339
|
}
|
|
5339
5340
|
)
|
|
@@ -5359,7 +5360,7 @@ const Ls = [
|
|
|
5359
5360
|
"button",
|
|
5360
5361
|
{
|
|
5361
5362
|
onClick: e,
|
|
5362
|
-
disabled:
|
|
5363
|
+
disabled: a,
|
|
5363
5364
|
style: {
|
|
5364
5365
|
padding: "10px 24px",
|
|
5365
5366
|
borderRadius: "10px",
|
|
@@ -5368,17 +5369,17 @@ const Ls = [
|
|
|
5368
5369
|
color: s.textPrimary,
|
|
5369
5370
|
fontSize: "14px",
|
|
5370
5371
|
fontWeight: 500,
|
|
5371
|
-
cursor:
|
|
5372
|
+
cursor: a ? "not-allowed" : "pointer",
|
|
5372
5373
|
flex: h ? "none" : 1,
|
|
5373
5374
|
minWidth: h ? "100%" : "120px",
|
|
5374
|
-
opacity:
|
|
5375
|
+
opacity: a ? 0.6 : 1,
|
|
5375
5376
|
transition: "all 0.2s ease"
|
|
5376
5377
|
},
|
|
5377
|
-
onMouseOver: (
|
|
5378
|
-
|
|
5378
|
+
onMouseOver: (d) => {
|
|
5379
|
+
a || (d.currentTarget.style.backgroundColor = s.border, d.currentTarget.style.transform = "translateY(-1px)");
|
|
5379
5380
|
},
|
|
5380
|
-
onMouseOut: (
|
|
5381
|
-
|
|
5381
|
+
onMouseOut: (d) => {
|
|
5382
|
+
a || (d.currentTarget.style.backgroundColor = "transparent", d.currentTarget.style.transform = "translateY(0)");
|
|
5382
5383
|
},
|
|
5383
5384
|
children: "Cancel"
|
|
5384
5385
|
}
|
|
@@ -5387,7 +5388,7 @@ const Ls = [
|
|
|
5387
5388
|
"button",
|
|
5388
5389
|
{
|
|
5389
5390
|
onClick: y,
|
|
5390
|
-
disabled:
|
|
5391
|
+
disabled: a || !u.isValid,
|
|
5391
5392
|
style: {
|
|
5392
5393
|
padding: "10px 24px",
|
|
5393
5394
|
borderRadius: "10px",
|
|
@@ -5396,26 +5397,26 @@ const Ls = [
|
|
|
5396
5397
|
color: "#fff",
|
|
5397
5398
|
fontSize: "14px",
|
|
5398
5399
|
fontWeight: 600,
|
|
5399
|
-
cursor:
|
|
5400
|
+
cursor: a || !u.isValid ? "not-allowed" : "pointer",
|
|
5400
5401
|
flex: h ? "none" : 1,
|
|
5401
5402
|
minWidth: h ? "100%" : "140px",
|
|
5402
|
-
opacity:
|
|
5403
|
+
opacity: a || !u.isValid ? 0.6 : 1,
|
|
5403
5404
|
display: "flex",
|
|
5404
5405
|
alignItems: "center",
|
|
5405
5406
|
justifyContent: "center",
|
|
5406
5407
|
gap: "8px",
|
|
5407
5408
|
transition: "all 0.2s ease",
|
|
5408
|
-
boxShadow:
|
|
5409
|
+
boxShadow: a || !u.isValid ? "none" : `0 4px 12px ${s.accent}40`
|
|
5409
5410
|
},
|
|
5410
|
-
onMouseOver: (
|
|
5411
|
-
!
|
|
5411
|
+
onMouseOver: (d) => {
|
|
5412
|
+
!a && u.isValid && (d.currentTarget.style.transform = "translateY(-1px)", d.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
|
|
5412
5413
|
},
|
|
5413
|
-
onMouseOut: (
|
|
5414
|
-
!
|
|
5414
|
+
onMouseOut: (d) => {
|
|
5415
|
+
!a && u.isValid && (d.currentTarget.style.transform = "translateY(0)", d.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
|
|
5415
5416
|
},
|
|
5416
|
-
children:
|
|
5417
|
+
children: a ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5417
5418
|
/* @__PURE__ */ n.jsx(
|
|
5418
|
-
|
|
5419
|
+
oe,
|
|
5419
5420
|
{
|
|
5420
5421
|
size: 16,
|
|
5421
5422
|
style: {
|
|
@@ -5493,14 +5494,14 @@ const Ls = [
|
|
|
5493
5494
|
onClose: e,
|
|
5494
5495
|
onSuccess: r,
|
|
5495
5496
|
onError: s,
|
|
5496
|
-
userId:
|
|
5497
|
+
userId: o,
|
|
5497
5498
|
colors: i
|
|
5498
5499
|
}) => {
|
|
5499
|
-
const { baseUrl:
|
|
5500
|
+
const { baseUrl: a, apiKey: l, appId: h } = ge(), [c, u] = O({
|
|
5500
5501
|
currentPassword: "",
|
|
5501
5502
|
newPassword: "",
|
|
5502
5503
|
confirmPassword: ""
|
|
5503
|
-
}), [b, y] = O({}), [w,
|
|
5504
|
+
}), [b, y] = O({}), [w, d] = O(!1), [j, m] = O({
|
|
5504
5505
|
currentPassword: !1,
|
|
5505
5506
|
newPassword: !1,
|
|
5506
5507
|
confirmPassword: !1
|
|
@@ -5514,7 +5515,7 @@ const Ls = [
|
|
|
5514
5515
|
}, []), !t) return null;
|
|
5515
5516
|
const A = (v) => {
|
|
5516
5517
|
const { name: U, value: q } = v.target;
|
|
5517
|
-
|
|
5518
|
+
u((F) => ({ ...F, [U]: q })), b[U] && y((F) => ({ ...F, [U]: "" }));
|
|
5518
5519
|
}, C = (v) => {
|
|
5519
5520
|
m((U) => ({ ...U, [v]: !U[v] }));
|
|
5520
5521
|
}, M = () => {
|
|
@@ -5522,10 +5523,10 @@ const Ls = [
|
|
|
5522
5523
|
return c.currentPassword || (v.currentPassword = "Current password is required"), c.newPassword ? c.newPassword.length < 6 && (v.newPassword = "Password must be at least 6 characters") : v.newPassword = "New password is required", c.newPassword !== c.confirmPassword && (v.confirmPassword = "Passwords do not match"), y(v), Object.keys(v).length === 0;
|
|
5523
5524
|
}, g = async (v) => {
|
|
5524
5525
|
if (v.preventDefault(), !!M()) {
|
|
5525
|
-
|
|
5526
|
+
d(!0);
|
|
5526
5527
|
try {
|
|
5527
5528
|
const { data: U } = await W.put(
|
|
5528
|
-
`${
|
|
5529
|
+
`${a}/users/change-password/${o}`,
|
|
5529
5530
|
{
|
|
5530
5531
|
appId: h,
|
|
5531
5532
|
currentPassword: c.currentPassword,
|
|
@@ -5537,7 +5538,7 @@ const Ls = [
|
|
|
5537
5538
|
}
|
|
5538
5539
|
}
|
|
5539
5540
|
);
|
|
5540
|
-
U.success ? (r(U.message || "Password updated successfully"),
|
|
5541
|
+
U.success ? (r(U.message || "Password updated successfully"), u({
|
|
5541
5542
|
currentPassword: "",
|
|
5542
5543
|
newPassword: "",
|
|
5543
5544
|
confirmPassword: ""
|
|
@@ -5545,7 +5546,7 @@ const Ls = [
|
|
|
5545
5546
|
} catch (U) {
|
|
5546
5547
|
s(U.response?.data?.message || "Something went wrong");
|
|
5547
5548
|
} finally {
|
|
5548
|
-
|
|
5549
|
+
d(!1);
|
|
5549
5550
|
}
|
|
5550
5551
|
}
|
|
5551
5552
|
}, I = [
|
|
@@ -5873,7 +5874,7 @@ const Ls = [
|
|
|
5873
5874
|
},
|
|
5874
5875
|
children: w ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5875
5876
|
/* @__PURE__ */ n.jsx(
|
|
5876
|
-
|
|
5877
|
+
oe,
|
|
5877
5878
|
{
|
|
5878
5879
|
size: 16,
|
|
5879
5880
|
style: {
|
|
@@ -5938,24 +5939,24 @@ const Ls = [
|
|
|
5938
5939
|
onClose: e,
|
|
5939
5940
|
onVerify: r,
|
|
5940
5941
|
onSendOTP: s,
|
|
5941
|
-
verifyFormData:
|
|
5942
|
+
verifyFormData: o,
|
|
5942
5943
|
setVerifyFormData: i,
|
|
5943
|
-
otpSent:
|
|
5944
|
+
otpSent: a,
|
|
5944
5945
|
verifying: l,
|
|
5945
5946
|
user: h,
|
|
5946
5947
|
colors: c,
|
|
5947
|
-
darkMode:
|
|
5948
|
+
darkMode: u
|
|
5948
5949
|
}) => {
|
|
5949
5950
|
if (!t) return null;
|
|
5950
5951
|
const b = () => {
|
|
5951
|
-
e(), i({ email: h?.email || "", otp: "", appId:
|
|
5952
|
+
e(), i({ email: h?.email || "", otp: "", appId: o.appId });
|
|
5952
5953
|
};
|
|
5953
5954
|
return /* @__PURE__ */ n.jsxs(
|
|
5954
5955
|
"div",
|
|
5955
5956
|
{
|
|
5956
5957
|
className: "modal-overlay",
|
|
5957
5958
|
style: {
|
|
5958
|
-
backgroundColor:
|
|
5959
|
+
backgroundColor: u ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.5)"
|
|
5959
5960
|
},
|
|
5960
5961
|
children: [
|
|
5961
5962
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -5989,7 +5990,7 @@ const Ls = [
|
|
|
5989
5990
|
"input",
|
|
5990
5991
|
{
|
|
5991
5992
|
type: "email",
|
|
5992
|
-
value:
|
|
5993
|
+
value: o.email,
|
|
5993
5994
|
onChange: (y) => i((w) => ({ ...w, email: y.target.value })),
|
|
5994
5995
|
placeholder: "Enter your email",
|
|
5995
5996
|
style: {
|
|
@@ -6004,7 +6005,7 @@ const Ls = [
|
|
|
6004
6005
|
)
|
|
6005
6006
|
] })
|
|
6006
6007
|
] }),
|
|
6007
|
-
|
|
6008
|
+
a && /* @__PURE__ */ n.jsxs("div", { className: "form-group", children: [
|
|
6008
6009
|
/* @__PURE__ */ n.jsx("label", { style: { color: c.textSecondary }, children: "OTP" }),
|
|
6009
6010
|
/* @__PURE__ */ n.jsxs("div", { className: "input-container", children: [
|
|
6010
6011
|
/* @__PURE__ */ n.jsx(cr, { size: 18, style: { color: c.textTertiary }, "aria-hidden": "true" }),
|
|
@@ -6012,7 +6013,7 @@ const Ls = [
|
|
|
6012
6013
|
"input",
|
|
6013
6014
|
{
|
|
6014
6015
|
type: "text",
|
|
6015
|
-
value:
|
|
6016
|
+
value: o.otp,
|
|
6016
6017
|
onChange: (y) => i((w) => ({ ...w, otp: y.target.value })),
|
|
6017
6018
|
placeholder: "Enter OTP",
|
|
6018
6019
|
style: {
|
|
@@ -6027,7 +6028,7 @@ const Ls = [
|
|
|
6027
6028
|
)
|
|
6028
6029
|
] })
|
|
6029
6030
|
] }),
|
|
6030
|
-
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children:
|
|
6031
|
+
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children: a ? /* @__PURE__ */ n.jsxs(
|
|
6031
6032
|
"button",
|
|
6032
6033
|
{
|
|
6033
6034
|
type: "submit",
|
|
@@ -6039,7 +6040,7 @@ const Ls = [
|
|
|
6039
6040
|
},
|
|
6040
6041
|
"aria-label": l ? "Verifying email" : "Verify email",
|
|
6041
6042
|
children: [
|
|
6042
|
-
l ? /* @__PURE__ */ n.jsx(
|
|
6043
|
+
l ? /* @__PURE__ */ n.jsx(oe, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ce, { size: 16, "aria-hidden": "true" }),
|
|
6043
6044
|
l ? "Verifying..." : "Verify Email"
|
|
6044
6045
|
]
|
|
6045
6046
|
}
|
|
@@ -6056,7 +6057,7 @@ const Ls = [
|
|
|
6056
6057
|
},
|
|
6057
6058
|
"aria-label": l ? "Sending OTP" : "Send OTP",
|
|
6058
6059
|
children: [
|
|
6059
|
-
l ? /* @__PURE__ */ n.jsx(
|
|
6060
|
+
l ? /* @__PURE__ */ n.jsx(oe, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ut, { size: 16, "aria-hidden": "true" }),
|
|
6060
6061
|
l ? "Sending..." : "Send OTP"
|
|
6061
6062
|
]
|
|
6062
6063
|
}
|
|
@@ -6114,7 +6115,7 @@ const Ls = [
|
|
|
6114
6115
|
}
|
|
6115
6116
|
|
|
6116
6117
|
.close-btn:hover {
|
|
6117
|
-
background-color: ${
|
|
6118
|
+
background-color: ${u ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)"};
|
|
6118
6119
|
}
|
|
6119
6120
|
|
|
6120
6121
|
.verify-form {
|
|
@@ -6216,16 +6217,16 @@ const Ls = [
|
|
|
6216
6217
|
]
|
|
6217
6218
|
}
|
|
6218
6219
|
);
|
|
6219
|
-
},
|
|
6220
|
+
}, mo = ({
|
|
6220
6221
|
token: t,
|
|
6221
6222
|
user: e = null,
|
|
6222
6223
|
darkMode: r = !0,
|
|
6223
6224
|
homeUrl: s,
|
|
6224
|
-
onLogout:
|
|
6225
|
+
onLogout: o,
|
|
6225
6226
|
onVerify: i,
|
|
6226
|
-
primaryColor:
|
|
6227
|
+
primaryColor: a = "#00C212"
|
|
6227
6228
|
}) => {
|
|
6228
|
-
const { baseUrl: l, apiKey: h, appId: c } =
|
|
6229
|
+
const { baseUrl: l, apiKey: h, appId: c } = ge(), [u, b] = O(null), [y, w] = O(e), [d, j] = O(!0), [m, _] = O(!1), [R, A] = O(!1), [C, M] = O(!1), [g, I] = O(!1), [v, U] = O(!1), [q, F] = O(!1), [V, Z] = O(!1), [T, J] = O(!1), [z, P] = O(null), [K, Q] = O(!1), [G, f] = O({
|
|
6229
6230
|
email: "",
|
|
6230
6231
|
otp: "",
|
|
6231
6232
|
appId: c
|
|
@@ -6247,15 +6248,15 @@ const Ls = [
|
|
|
6247
6248
|
};
|
|
6248
6249
|
te(() => {
|
|
6249
6250
|
const E = (H) => {
|
|
6250
|
-
const
|
|
6251
|
-
|
|
6251
|
+
const X = document.querySelector(".dropdown-container");
|
|
6252
|
+
X && !X.contains(H.target) && Y();
|
|
6252
6253
|
};
|
|
6253
6254
|
return V && document.addEventListener("mousedown", E), () => {
|
|
6254
6255
|
document.removeEventListener("mousedown", E);
|
|
6255
6256
|
};
|
|
6256
6257
|
}, [V]);
|
|
6257
6258
|
const se = async () => {
|
|
6258
|
-
if (!
|
|
6259
|
+
if (!G.email || !/\S+@\S+\.\S+/.test(G.email)) {
|
|
6259
6260
|
N("error", "Please enter a valid email");
|
|
6260
6261
|
return;
|
|
6261
6262
|
}
|
|
@@ -6263,7 +6264,7 @@ const Ls = [
|
|
|
6263
6264
|
$(!0);
|
|
6264
6265
|
const E = await W.post(
|
|
6265
6266
|
`${l}/users/send-verify-otp/${y?.id}`,
|
|
6266
|
-
{ email:
|
|
6267
|
+
{ email: G.email },
|
|
6267
6268
|
{
|
|
6268
6269
|
headers: { "x-api-key": h, "x-app-id": c }
|
|
6269
6270
|
}
|
|
@@ -6274,8 +6275,8 @@ const Ls = [
|
|
|
6274
6275
|
} finally {
|
|
6275
6276
|
$(!1);
|
|
6276
6277
|
}
|
|
6277
|
-
},
|
|
6278
|
-
if (E.preventDefault(), !
|
|
6278
|
+
}, ue = async (E) => {
|
|
6279
|
+
if (E.preventDefault(), !G.email || !G.otp) {
|
|
6279
6280
|
N("error", "Please fill in all fields");
|
|
6280
6281
|
return;
|
|
6281
6282
|
}
|
|
@@ -6283,15 +6284,15 @@ const Ls = [
|
|
|
6283
6284
|
$(!0);
|
|
6284
6285
|
const H = await W.post(
|
|
6285
6286
|
`${l}/users/verify-email`,
|
|
6286
|
-
|
|
6287
|
+
G
|
|
6287
6288
|
);
|
|
6288
6289
|
if (H.data.success) {
|
|
6289
6290
|
if (N("success", H.data.message || "Email verified!"), y) {
|
|
6290
|
-
const
|
|
6291
|
-
w(
|
|
6291
|
+
const X = { ...y, isVerified: !0 };
|
|
6292
|
+
w(X), localStorage.setItem(
|
|
6292
6293
|
"userInfo",
|
|
6293
|
-
JSON.stringify({ ...
|
|
6294
|
-
), typeof i == "function" && i(
|
|
6294
|
+
JSON.stringify({ ...X, token: t })
|
|
6295
|
+
), typeof i == "function" && i(X);
|
|
6295
6296
|
}
|
|
6296
6297
|
f({ email: "", otp: "", appId: c }), x(!1), F(!1);
|
|
6297
6298
|
} else
|
|
@@ -6307,15 +6308,15 @@ const Ls = [
|
|
|
6307
6308
|
}, ve = async (E) => {
|
|
6308
6309
|
if (!y) return !1;
|
|
6309
6310
|
try {
|
|
6310
|
-
const H = { ...y, avatarUrl: E }, { data:
|
|
6311
|
+
const H = { ...y, avatarUrl: E }, { data: X } = await W.put(
|
|
6311
6312
|
`${l}/users/update/${y.id}`,
|
|
6312
6313
|
H,
|
|
6313
6314
|
{ headers: { "x-api-key": h } }
|
|
6314
6315
|
);
|
|
6315
|
-
return
|
|
6316
|
+
return X.success ? (w(H), localStorage.setItem(
|
|
6316
6317
|
"userInfo",
|
|
6317
6318
|
JSON.stringify({ ...H, token: t })
|
|
6318
|
-
), N("success", "Avatar updated successfully!"), !0) : (N("error",
|
|
6319
|
+
), N("success", "Avatar updated successfully!"), !0) : (N("error", X.message || "Failed to update avatar"), !1);
|
|
6319
6320
|
} catch (H) {
|
|
6320
6321
|
return console.error("Avatar update error:", H), N("error", "Failed to update avatar"), !1;
|
|
6321
6322
|
}
|
|
@@ -6356,8 +6357,8 @@ const Ls = [
|
|
|
6356
6357
|
else {
|
|
6357
6358
|
const H = localStorage.getItem("userInfo");
|
|
6358
6359
|
if (H) {
|
|
6359
|
-
const
|
|
6360
|
-
w(
|
|
6360
|
+
const X = JSON.parse(H);
|
|
6361
|
+
w(X), j(!1), pt(X.id);
|
|
6361
6362
|
} else
|
|
6362
6363
|
j(!1);
|
|
6363
6364
|
}
|
|
@@ -6366,8 +6367,8 @@ const Ls = [
|
|
|
6366
6367
|
y?.email && f((E) => ({ ...E, email: y.email }));
|
|
6367
6368
|
}, [y?.email]);
|
|
6368
6369
|
const ft = (E, H) => {
|
|
6369
|
-
let
|
|
6370
|
-
return
|
|
6370
|
+
let X = parseInt(E.replace("#", ""), 16), pe = (X >> 16) + H, He = (X >> 8 & 255) + H, Ve = (X & 255) + H;
|
|
6371
|
+
return pe = Math.min(255, Math.max(0, pe)), He = Math.min(255, Math.max(0, He)), Ve = Math.min(255, Math.max(0, Ve)), `#${(Ve | He << 8 | pe << 16).toString(16).padStart(6, "0")}`;
|
|
6371
6372
|
}, D = r ? {
|
|
6372
6373
|
background: "#000000",
|
|
6373
6374
|
surface: "#09090b",
|
|
@@ -6376,8 +6377,8 @@ const Ls = [
|
|
|
6376
6377
|
textPrimary: "#ffffff",
|
|
6377
6378
|
textSecondary: "#d4d4d8",
|
|
6378
6379
|
textTertiary: "#a1a1aa",
|
|
6379
|
-
accent:
|
|
6380
|
-
accentHover: ft(
|
|
6380
|
+
accent: a,
|
|
6381
|
+
accentHover: ft(a, -15),
|
|
6381
6382
|
success: "#10b981",
|
|
6382
6383
|
error: "#ef4444",
|
|
6383
6384
|
border: "#27272a",
|
|
@@ -6390,14 +6391,14 @@ const Ls = [
|
|
|
6390
6391
|
textPrimary: "#18181b",
|
|
6391
6392
|
textSecondary: "#52525b",
|
|
6392
6393
|
textTertiary: "#71717a",
|
|
6393
|
-
accent:
|
|
6394
|
-
accentHover: ft(
|
|
6394
|
+
accent: a,
|
|
6395
|
+
accentHover: ft(a, -15),
|
|
6395
6396
|
success: "#10b981",
|
|
6396
6397
|
error: "#ef4444",
|
|
6397
6398
|
border: "#e4e4e7",
|
|
6398
6399
|
warning: "#d97706"
|
|
6399
6400
|
};
|
|
6400
|
-
if (
|
|
6401
|
+
if (d)
|
|
6401
6402
|
return /* @__PURE__ */ n.jsx(
|
|
6402
6403
|
"div",
|
|
6403
6404
|
{
|
|
@@ -6422,7 +6423,7 @@ const Ls = [
|
|
|
6422
6423
|
},
|
|
6423
6424
|
children: [
|
|
6424
6425
|
/* @__PURE__ */ n.jsx(
|
|
6425
|
-
|
|
6426
|
+
oe,
|
|
6426
6427
|
{
|
|
6427
6428
|
size: 40,
|
|
6428
6429
|
color: D.accent,
|
|
@@ -6565,14 +6566,14 @@ const Ls = [
|
|
|
6565
6566
|
display: "grid",
|
|
6566
6567
|
gap: "24px",
|
|
6567
6568
|
gridTemplateColumns: "1fr",
|
|
6568
|
-
...
|
|
6569
|
+
...u && window.innerWidth >= 1024 && {
|
|
6569
6570
|
gridTemplateColumns: "1fr 2fr",
|
|
6570
6571
|
gap: "10px"
|
|
6571
6572
|
},
|
|
6572
|
-
...
|
|
6573
|
+
...u && window.innerWidth >= 768 && u && window.innerWidth < 1024 && {
|
|
6573
6574
|
gap: "10px"
|
|
6574
6575
|
},
|
|
6575
|
-
...
|
|
6576
|
+
...u && window.innerWidth >= 600 && u && window.innerWidth < 768 && {
|
|
6576
6577
|
gap: "28px"
|
|
6577
6578
|
}
|
|
6578
6579
|
},
|
|
@@ -6757,7 +6758,7 @@ const Ls = [
|
|
|
6757
6758
|
gap: "8px",
|
|
6758
6759
|
textDecoration: "none",
|
|
6759
6760
|
minHeight: "36px",
|
|
6760
|
-
flex:
|
|
6761
|
+
flex: u && window.innerWidth < 1024 ? "1" : "auto"
|
|
6761
6762
|
},
|
|
6762
6763
|
children: [
|
|
6763
6764
|
/* @__PURE__ */ n.jsx(Pe, { size: 16, "aria-hidden": "true" }),
|
|
@@ -6787,11 +6788,11 @@ const Ls = [
|
|
|
6787
6788
|
gap: "8px",
|
|
6788
6789
|
textDecoration: "none",
|
|
6789
6790
|
minHeight: "36px",
|
|
6790
|
-
flex:
|
|
6791
|
+
flex: u && window.innerWidth < 1024 ? "1" : "auto"
|
|
6791
6792
|
},
|
|
6792
6793
|
children: [
|
|
6793
6794
|
R ? /* @__PURE__ */ n.jsx(
|
|
6794
|
-
|
|
6795
|
+
oe,
|
|
6795
6796
|
{
|
|
6796
6797
|
size: 16,
|
|
6797
6798
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -6823,7 +6824,7 @@ const Ls = [
|
|
|
6823
6824
|
gap: "8px",
|
|
6824
6825
|
textDecoration: "none",
|
|
6825
6826
|
minHeight: "36px",
|
|
6826
|
-
flex:
|
|
6827
|
+
flex: u && window.innerWidth < 1024 ? "1" : "auto"
|
|
6827
6828
|
},
|
|
6828
6829
|
children: [
|
|
6829
6830
|
/* @__PURE__ */ n.jsx(Es, { size: 16, "aria-hidden": "true" }),
|
|
@@ -6853,11 +6854,11 @@ const Ls = [
|
|
|
6853
6854
|
gap: "8px",
|
|
6854
6855
|
minHeight: "36px",
|
|
6855
6856
|
opacity: K ? 0.7 : 1,
|
|
6856
|
-
flex:
|
|
6857
|
+
flex: u && window.innerWidth < 1024 ? "1" : "auto"
|
|
6857
6858
|
},
|
|
6858
6859
|
children: [
|
|
6859
6860
|
K ? /* @__PURE__ */ n.jsx(
|
|
6860
|
-
|
|
6861
|
+
oe,
|
|
6861
6862
|
{
|
|
6862
6863
|
size: 14,
|
|
6863
6864
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -6893,7 +6894,7 @@ const Ls = [
|
|
|
6893
6894
|
},
|
|
6894
6895
|
onClick: () => Z(!V),
|
|
6895
6896
|
children: [
|
|
6896
|
-
/* @__PURE__ */ n.jsx(
|
|
6897
|
+
/* @__PURE__ */ n.jsx(as, { size: 16, "aria-hidden": "true" }),
|
|
6897
6898
|
"More Actions"
|
|
6898
6899
|
]
|
|
6899
6900
|
}
|
|
@@ -6946,11 +6947,11 @@ const Ls = [
|
|
|
6946
6947
|
]
|
|
6947
6948
|
}
|
|
6948
6949
|
),
|
|
6949
|
-
|
|
6950
|
+
o && /* @__PURE__ */ n.jsxs(
|
|
6950
6951
|
"button",
|
|
6951
6952
|
{
|
|
6952
6953
|
onClick: () => {
|
|
6953
|
-
|
|
6954
|
+
o(), Y();
|
|
6954
6955
|
},
|
|
6955
6956
|
style: {
|
|
6956
6957
|
width: "100%",
|
|
@@ -7063,7 +7064,7 @@ const Ls = [
|
|
|
7063
7064
|
display: "grid",
|
|
7064
7065
|
gap: "20px",
|
|
7065
7066
|
gridTemplateColumns: "1fr",
|
|
7066
|
-
...
|
|
7067
|
+
...u && window.innerWidth >= 600 && {
|
|
7067
7068
|
gridTemplateColumns: "1fr 1fr",
|
|
7068
7069
|
gap: "20px"
|
|
7069
7070
|
}
|
|
@@ -7102,13 +7103,13 @@ const Ls = [
|
|
|
7102
7103
|
type: E.type,
|
|
7103
7104
|
name: E.name,
|
|
7104
7105
|
value: y[E.name],
|
|
7105
|
-
onChange: (
|
|
7106
|
-
(
|
|
7106
|
+
onChange: (X) => w(
|
|
7107
|
+
(pe) => pe && { ...pe, [X.target.name]: X.target.value }
|
|
7107
7108
|
),
|
|
7108
7109
|
style: {
|
|
7109
7110
|
padding: "12px",
|
|
7110
7111
|
borderRadius: "8px",
|
|
7111
|
-
border: `1px solid ${
|
|
7112
|
+
border: `1px solid ${a}`,
|
|
7112
7113
|
backgroundColor: "transparent",
|
|
7113
7114
|
color: D.textPrimary,
|
|
7114
7115
|
fontSize: "12px",
|
|
@@ -7326,9 +7327,9 @@ const Ls = [
|
|
|
7326
7327
|
onClose: () => {
|
|
7327
7328
|
F(!1), x(!1), f({ email: y?.email || "", otp: "", appId: c });
|
|
7328
7329
|
},
|
|
7329
|
-
onVerify:
|
|
7330
|
+
onVerify: ue,
|
|
7330
7331
|
onSendOTP: se,
|
|
7331
|
-
verifyFormData:
|
|
7332
|
+
verifyFormData: G,
|
|
7332
7333
|
setVerifyFormData: f,
|
|
7333
7334
|
otpSent: S,
|
|
7334
7335
|
verifying: k,
|
|
@@ -7429,27 +7430,27 @@ const Ls = [
|
|
|
7429
7430
|
]
|
|
7430
7431
|
}
|
|
7431
7432
|
);
|
|
7432
|
-
},
|
|
7433
|
+
}, yo = ({
|
|
7433
7434
|
darkMode: t = !0,
|
|
7434
7435
|
primaryColor: e = "#3b82f6",
|
|
7435
7436
|
onLogout: r,
|
|
7436
7437
|
varient: s = "classic",
|
|
7437
|
-
propUser:
|
|
7438
|
+
propUser: o,
|
|
7438
7439
|
className: i = "",
|
|
7439
7440
|
// New URL props with defaults
|
|
7440
|
-
profileUrl:
|
|
7441
|
+
profileUrl: a,
|
|
7441
7442
|
settingsUrl: l,
|
|
7442
7443
|
// Menu item visibility with defaults
|
|
7443
7444
|
showProfileMenuItem: h = !0,
|
|
7444
7445
|
showSettingsMenuItem: c = !0,
|
|
7445
|
-
showViewProfileMenuItem:
|
|
7446
|
+
showViewProfileMenuItem: u = !0,
|
|
7446
7447
|
// Custom labels with defaults
|
|
7447
7448
|
profileLabel: b = "My Profile",
|
|
7448
7449
|
settingsLabel: y = "Settings",
|
|
7449
7450
|
viewProfileLabel: w = "View Profile",
|
|
7450
|
-
logoutLabel:
|
|
7451
|
+
logoutLabel: d = "Sign Out"
|
|
7451
7452
|
}) => {
|
|
7452
|
-
const { baseUrl: j, apiKey: m, appId: _ } =
|
|
7453
|
+
const { baseUrl: j, apiKey: m, appId: _ } = ge(), [R, A] = O(!1), [C, M] = O(null), [g, I] = O(!0), [v, U] = O(null), q = xt(null), F = xt(null), [V, Z] = O(!1), [T, J] = O(!1);
|
|
7453
7454
|
te(() => {
|
|
7454
7455
|
if (typeof window > "u") return;
|
|
7455
7456
|
const x = () => {
|
|
@@ -7459,10 +7460,10 @@ const Ls = [
|
|
|
7459
7460
|
}, []), te(() => {
|
|
7460
7461
|
(async () => {
|
|
7461
7462
|
try {
|
|
7462
|
-
if (I(!0), U(null),
|
|
7463
|
-
if (!
|
|
7463
|
+
if (I(!0), U(null), o) {
|
|
7464
|
+
if (!o.id || !o.name || !o.email)
|
|
7464
7465
|
throw new Error("Invalid user data provided");
|
|
7465
|
-
M(
|
|
7466
|
+
M(o);
|
|
7466
7467
|
} else if (typeof window < "u") {
|
|
7467
7468
|
const k = localStorage.getItem("userInfo");
|
|
7468
7469
|
if (k)
|
|
@@ -7481,13 +7482,13 @@ const Ls = [
|
|
|
7481
7482
|
I(!1);
|
|
7482
7483
|
}
|
|
7483
7484
|
})();
|
|
7484
|
-
}, [
|
|
7485
|
+
}, [o]), te(() => {
|
|
7485
7486
|
if (typeof window > "u") return;
|
|
7486
7487
|
const x = () => {
|
|
7487
7488
|
if (!R || !F.current) return;
|
|
7488
|
-
const k = F.current.getBoundingClientRect(), $ = window.innerWidth, N = window.innerHeight, Y = 280, se = $ - k.right,
|
|
7489
|
+
const k = F.current.getBoundingClientRect(), $ = window.innerWidth, N = window.innerHeight, Y = 280, se = $ - k.right, ue = k.left;
|
|
7489
7490
|
N - k.bottom;
|
|
7490
|
-
const ve = se >= Y || se >
|
|
7491
|
+
const ve = se >= Y || se > ue;
|
|
7491
7492
|
Z(ve);
|
|
7492
7493
|
};
|
|
7493
7494
|
return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
@@ -7728,7 +7729,7 @@ const Ls = [
|
|
|
7728
7729
|
if (x) {
|
|
7729
7730
|
const k = JSON.parse(x);
|
|
7730
7731
|
M(k);
|
|
7731
|
-
} else
|
|
7732
|
+
} else o && M(o);
|
|
7732
7733
|
} catch (x) {
|
|
7733
7734
|
console.error("Retry failed:", x), U("Invalid user data"), localStorage.removeItem("userInfo"), M(null);
|
|
7734
7735
|
} finally {
|
|
@@ -7736,8 +7737,8 @@ const Ls = [
|
|
|
7736
7737
|
}
|
|
7737
7738
|
}, Q = (x, k) => {
|
|
7738
7739
|
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), k());
|
|
7739
|
-
},
|
|
7740
|
-
const x =
|
|
7740
|
+
}, G = () => a || C?.profileUrl, f = () => {
|
|
7741
|
+
const x = G();
|
|
7741
7742
|
x && window.open(x, "_self", "noopener,noreferrer");
|
|
7742
7743
|
}, S = () => {
|
|
7743
7744
|
l && window.open(l, "_self", "noopener,noreferrer");
|
|
@@ -7889,7 +7890,7 @@ const Ls = [
|
|
|
7889
7890
|
] })
|
|
7890
7891
|
] }),
|
|
7891
7892
|
/* @__PURE__ */ n.jsxs("div", { style: P.dropdownSection, children: [
|
|
7892
|
-
h &&
|
|
7893
|
+
h && G() && /* @__PURE__ */ n.jsxs(
|
|
7893
7894
|
"button",
|
|
7894
7895
|
{
|
|
7895
7896
|
style: P.menuItem,
|
|
@@ -7929,7 +7930,7 @@ const Ls = [
|
|
|
7929
7930
|
]
|
|
7930
7931
|
}
|
|
7931
7932
|
),
|
|
7932
|
-
|
|
7933
|
+
u && C.profileUrl && /* @__PURE__ */ n.jsxs(
|
|
7933
7934
|
"a",
|
|
7934
7935
|
{
|
|
7935
7936
|
href: C.profileUrl,
|
|
@@ -7973,7 +7974,7 @@ const Ls = [
|
|
|
7973
7974
|
"aria-hidden": "true"
|
|
7974
7975
|
}
|
|
7975
7976
|
),
|
|
7976
|
-
/* @__PURE__ */ n.jsx("span", { style: P.menuItemText, children:
|
|
7977
|
+
/* @__PURE__ */ n.jsx("span", { style: P.menuItemText, children: d })
|
|
7977
7978
|
]
|
|
7978
7979
|
}
|
|
7979
7980
|
) })
|
|
@@ -8006,17 +8007,17 @@ const Ls = [
|
|
|
8006
8007
|
]
|
|
8007
8008
|
}
|
|
8008
8009
|
);
|
|
8009
|
-
},
|
|
8010
|
+
}, bo = ({
|
|
8010
8011
|
user: t,
|
|
8011
8012
|
darkMode: e = !0,
|
|
8012
8013
|
primaryColor: r = "#00C212",
|
|
8013
8014
|
onVerify: s
|
|
8014
8015
|
}) => {
|
|
8015
|
-
const { appId:
|
|
8016
|
+
const { appId: o, baseUrl: i, apiKey: a } = ge(), [l, h] = O({
|
|
8016
8017
|
email: t?.email || "",
|
|
8017
8018
|
otp: "",
|
|
8018
|
-
appId:
|
|
8019
|
-
}), [c,
|
|
8019
|
+
appId: o
|
|
8020
|
+
}), [c, u] = O(!1), [b, y] = O(!1), [w, d] = O(null), j = (g, I) => {
|
|
8020
8021
|
let v = parseInt(g.replace("#", ""), 16), U = (v >> 16) + I, q = (v >> 8 & 255) + I, F = (v & 255) + I;
|
|
8021
8022
|
return U = Math.min(255, Math.max(0, U)), q = Math.min(255, Math.max(0, q)), F = Math.min(255, Math.max(0, F)), `#${(F | q << 8 | U << 16).toString(16).padStart(6, "0")}`;
|
|
8022
8023
|
}, m = e ? {
|
|
@@ -8046,7 +8047,7 @@ const Ls = [
|
|
|
8046
8047
|
t?.email && h((g) => ({ ...g, email: t.email }));
|
|
8047
8048
|
}, [t?.email]);
|
|
8048
8049
|
const _ = (g, I) => {
|
|
8049
|
-
|
|
8050
|
+
d({ type: g, message: I }), setTimeout(() => d(null), 3e3);
|
|
8050
8051
|
}, R = async () => {
|
|
8051
8052
|
if (!l.email || !/\S+@\S+\.\S+/.test(l.email)) {
|
|
8052
8053
|
_("error", "Please enter a valid email");
|
|
@@ -8057,9 +8058,9 @@ const Ls = [
|
|
|
8057
8058
|
const g = await W.post(
|
|
8058
8059
|
`${i}/users/send-verify-otp/${t?.id}`,
|
|
8059
8060
|
{ email: l.email },
|
|
8060
|
-
{ headers: { "x-api-key":
|
|
8061
|
+
{ headers: { "x-api-key": a, "x-app-id": o } }
|
|
8061
8062
|
);
|
|
8062
|
-
g.data.success ? (_("success", g.data.message || "OTP sent!"),
|
|
8063
|
+
g.data.success ? (_("success", g.data.message || "OTP sent!"), u(!0)) : _("error", g.data.message || "Failed to send OTP");
|
|
8063
8064
|
} catch (g) {
|
|
8064
8065
|
_("error", g.response?.data?.message || "Server error");
|
|
8065
8066
|
} finally {
|
|
@@ -8075,7 +8076,7 @@ const Ls = [
|
|
|
8075
8076
|
const I = await W.post(`${i}/users/verify-email`, l);
|
|
8076
8077
|
if (I.data.success && t) {
|
|
8077
8078
|
const v = { ...t, isVerified: !0 };
|
|
8078
|
-
s?.(v), _("success", I.data.message || "Email verified!"),
|
|
8079
|
+
s?.(v), _("success", I.data.message || "Email verified!"), u(!1), h({ email: t.email, otp: "", appId: o });
|
|
8079
8080
|
} else
|
|
8080
8081
|
_("error", I.data.message || "Verification failed");
|
|
8081
8082
|
} catch (I) {
|
|
@@ -8206,7 +8207,7 @@ const Ls = [
|
|
|
8206
8207
|
] })
|
|
8207
8208
|
] }),
|
|
8208
8209
|
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 12 }, children: c ? /* @__PURE__ */ n.jsxs("button", { type: "submit", disabled: b, style: M(b), children: [
|
|
8209
|
-
b ? /* @__PURE__ */ n.jsx(
|
|
8210
|
+
b ? /* @__PURE__ */ n.jsx(oe, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ce, { size: 16 }),
|
|
8210
8211
|
b ? "Verifying..." : "Verify Email"
|
|
8211
8212
|
] }) : /* @__PURE__ */ n.jsxs(
|
|
8212
8213
|
"button",
|
|
@@ -8216,7 +8217,7 @@ const Ls = [
|
|
|
8216
8217
|
disabled: b,
|
|
8217
8218
|
style: M(b),
|
|
8218
8219
|
children: [
|
|
8219
|
-
b ? /* @__PURE__ */ n.jsx(
|
|
8220
|
+
b ? /* @__PURE__ */ n.jsx(oe, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ut, { size: 16 }),
|
|
8220
8221
|
b ? "Sending..." : "Send OTP"
|
|
8221
8222
|
]
|
|
8222
8223
|
}
|
|
@@ -8226,14 +8227,14 @@ const Ls = [
|
|
|
8226
8227
|
);
|
|
8227
8228
|
};
|
|
8228
8229
|
export {
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8230
|
+
uo as NeuctraAuthix,
|
|
8231
|
+
bo as ReactEmailVerification,
|
|
8232
|
+
ho as ReactSignedIn,
|
|
8233
|
+
go as ReactSignedOut,
|
|
8234
|
+
yo as ReactUserButton,
|
|
8235
|
+
xo as ReactUserLogin,
|
|
8236
|
+
mo as ReactUserProfile,
|
|
8237
|
+
fo as ReactUserSignUp,
|
|
8238
|
+
ge as getSdkConfig,
|
|
8239
|
+
po as setSdkConfig
|
|
8239
8240
|
};
|