@neuctra/authix 1.1.24 → 1.1.26
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 +521 -498
- package/dist/neuctra-authix.umd.js +2 -2
- package/dist/react/SignedIn.d.ts +1 -1
- package/dist/react/SignedIn.d.ts.map +1 -1
- package/dist/react/SignedOut.d.ts +1 -6
- package/dist/react/SignedOut.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -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
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,28 +152,28 @@ 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
179
|
re(fe.postMessage)
|
|
@@ -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,
|
|
@@ -237,8 +237,8 @@ const Yr = (t) => {
|
|
|
237
237
|
asap: Xr,
|
|
238
238
|
isIterable: Gr
|
|
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,
|
|
284
|
+
L.from = (t, e, r, s, o, i) => {
|
|
285
|
+
const a = Object.create(Ht);
|
|
286
|
+
p.toFlatObject(t, a, function(u) {
|
|
287
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,8 +317,8 @@ 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
323
|
function c(d) {
|
|
324
324
|
if (d === null) return "";
|
|
@@ -339,7 +339,7 @@ function qe(t, e, r) {
|
|
|
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;
|
|
@@ -356,7 +356,7 @@ function qe(t, e, r) {
|
|
|
356
356
|
if (b.indexOf(d) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + j.join("."));
|
|
358
358
|
b.push(d), p.forEach(d, function(_, R) {
|
|
359
|
-
(!(p.isUndefined(_) || _ === null) &&
|
|
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
|
}
|
|
@@ -475,7 +475,7 @@ const Xt = {
|
|
|
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
518
|
function Gt(t) {
|
|
519
|
-
function e(r, s,
|
|
520
|
-
let
|
|
521
|
-
if (
|
|
522
|
-
const l = Number.isFinite(+
|
|
523
|
-
return
|
|
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;
|
|
@@ -544,9 +544,9 @@ const Ie = {
|
|
|
544
544
|
transitional: Xt,
|
|
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(Gt(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,19 +678,19 @@ 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
683
|
const u = Se(h);
|
|
684
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
696
|
for (const u of e) {
|
|
@@ -698,7 +698,7 @@ let ne = class {
|
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
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
848
|
const c = Date.now(), u = s[i];
|
|
849
|
-
|
|
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
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 = u,
|
|
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
865
|
const u = Date.now(), b = u - r;
|
|
866
|
-
b >= s ?
|
|
867
|
-
i = null, o
|
|
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 && u ? (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 + ")=([^;]*)"));
|
|
@@ -941,7 +941,7 @@ function he(t, e) {
|
|
|
941
941
|
function s(c, u, b, y) {
|
|
942
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
|
|
944
|
+
function o(c, u, b, y) {
|
|
945
945
|
if (p.isUndefined(u)) {
|
|
946
946
|
if (!p.isUndefined(c))
|
|
947
947
|
return s(void 0, c, b, y);
|
|
@@ -951,7 +951,7 @@ function he(t, e) {
|
|
|
951
951
|
if (!p.isUndefined(u))
|
|
952
952
|
return s(void 0, u);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
954
|
+
function a(c, u) {
|
|
955
955
|
if (p.isUndefined(u)) {
|
|
956
956
|
if (!p.isUndefined(c))
|
|
957
957
|
return s(void 0, c);
|
|
@@ -967,70 +967,70 @@ function he(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, u, b) =>
|
|
995
|
+
headers: (c, u, b) => o(vt(c), vt(u), b, !0)
|
|
996
996
|
};
|
|
997
997
|
return p.forEach(Object.keys({ ...t, ...e }), function(u) {
|
|
998
|
-
const b = h[u] ||
|
|
998
|
+
const b = h[u] || o, y = b(t[u], e[u], u);
|
|
999
999
|
p.isUndefined(y) && b !== l || (r[u] = y);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
const tr = (t) => {
|
|
1003
1003
|
const e = he({}, t);
|
|
1004
|
-
let { data: r, withXSRFToken: s, xsrfHeaderName:
|
|
1005
|
-
if (e.headers =
|
|
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
1013
|
Object.entries(h).forEach(([u, b]) => {
|
|
1014
|
-
c.includes(u.toLowerCase()) &&
|
|
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(), d && d(),
|
|
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 || Xt;
|
|
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
|
-
|
|
1086
|
+
if (!o) {
|
|
1087
|
+
o = !0, l();
|
|
1088
1088
|
const u = c instanceof Error ? c : this.reason;
|
|
1089
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,14 +1130,14 @@ 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: u } = await
|
|
1140
|
+
const { done: c, value: u } = await o.next();
|
|
1141
1141
|
if (c) {
|
|
1142
1142
|
l(), h.close();
|
|
1143
1143
|
return;
|
|
@@ -1153,7 +1153,7 @@ const tr = (t) => {
|
|
|
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,10 +1174,10 @@ 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 =
|
|
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
1181
|
let d = !1;
|
|
1182
1182
|
const j = new r(ee.origin, {
|
|
1183
1183
|
body: new Et(),
|
|
@@ -1187,10 +1187,10 @@ const tr = (t) => {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
1189
|
return d && !j;
|
|
1190
|
-
}), u =
|
|
1190
|
+
}), u = a && l && Tt(() => p.isReadableStream(new s("").body)), b = {
|
|
1191
1191
|
stream: u && ((d) => d.body)
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1193
|
+
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
1194
1194
|
!b[d] && (b[d] = (j, m) => {
|
|
1195
1195
|
let _ = j && j[d];
|
|
1196
1196
|
if (_)
|
|
@@ -1304,12 +1304,12 @@ const tr = (t) => {
|
|
|
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
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;
|
|
@@ -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;
|
|
@@ -1453,9 +1453,9 @@ let xe = 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;
|
|
@@ -1467,21 +1467,21 @@ let xe = class {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
_request(e, r) {
|
|
1469
1469
|
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = he(this.defaults, r);
|
|
1470
|
-
const { transitional: s, paramsSerializer:
|
|
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
|
);
|
|
@@ -1490,7 +1490,7 @@ let xe = class {
|
|
|
1490
1490
|
(d) => {
|
|
1491
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) {
|
|
@@ -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,
|
|
1547
|
+
return function(i, a, l) {
|
|
1548
1548
|
return this.request(he(l || {}, {
|
|
1549
1549
|
method: e,
|
|
1550
1550
|
headers: s ? {
|
|
1551
1551
|
"Content-Type": "multipart/form-data"
|
|
1552
1552
|
} : {},
|
|
1553
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,13 +1706,13 @@ const rt = {
|
|
|
1706
1706
|
Object.entries(rt).forEach(([t, e]) => {
|
|
1707
1707
|
rt[e] = t;
|
|
1708
1708
|
});
|
|
1709
|
-
function
|
|
1709
|
+
function ar(t) {
|
|
1710
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(
|
|
1712
|
-
return
|
|
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 =
|
|
1715
|
+
const W = ar(Ie);
|
|
1716
1716
|
W.Axios = xe;
|
|
1717
1717
|
W.CanceledError = je;
|
|
1718
1718
|
W.CancelToken = Ln;
|
|
@@ -1739,18 +1739,18 @@ const {
|
|
|
1739
1739
|
isCancel: Gs,
|
|
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,15 +1927,15 @@ 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
|
}
|
|
@@ -1948,8 +1948,8 @@ class da {
|
|
|
1948
1948
|
async searchUserData(e) {
|
|
1949
1949
|
const { userId: r, ...s } = e;
|
|
1950
1950
|
if (!r) throw new Error("userId required");
|
|
1951
|
-
const
|
|
1952
|
-
return this.request("GET", `/users/${r}/data/search?${
|
|
1951
|
+
const o = new URLSearchParams(s).toString();
|
|
1952
|
+
return this.request("GET", `/users/${r}/data/search?${o}`);
|
|
1953
1953
|
}
|
|
1954
1954
|
/**
|
|
1955
1955
|
* Fetch ALL users' merged data for a specific app
|
|
@@ -1984,21 +1984,26 @@ class da {
|
|
|
1984
1984
|
* @param params requires userId and data object
|
|
1985
1985
|
*/
|
|
1986
1986
|
async addUserData(e) {
|
|
1987
|
-
const { userId: r,
|
|
1987
|
+
const { userId: r, dataCategory: s, data: o } = e;
|
|
1988
1988
|
if (!r) throw new Error("addUserData: 'userId' is required");
|
|
1989
|
-
if (!s)
|
|
1990
|
-
|
|
1989
|
+
if (!s)
|
|
1990
|
+
throw new Error("addUserData: 'dataCategory' is required");
|
|
1991
|
+
if (!o) throw new Error("addUserData: 'data' is required");
|
|
1992
|
+
return this.request("POST", `/users/${r}/data`, {
|
|
1993
|
+
dataCategory: s,
|
|
1994
|
+
...o
|
|
1995
|
+
});
|
|
1991
1996
|
}
|
|
1992
1997
|
/**
|
|
1993
1998
|
* Update a data object by its id
|
|
1994
1999
|
* @param params requires userId, dataId, and updated fields
|
|
1995
2000
|
*/
|
|
1996
2001
|
async updateUserData(e) {
|
|
1997
|
-
const { userId: r, dataId: s, data:
|
|
2002
|
+
const { userId: r, dataId: s, data: o } = e;
|
|
1998
2003
|
if (!r || !s)
|
|
1999
2004
|
throw new Error("updateUserData: 'userId' and 'dataId' are required");
|
|
2000
|
-
if (!
|
|
2001
|
-
return this.request("PUT", `/users/${r}/data/${s}`,
|
|
2005
|
+
if (!o) throw new Error("updateUserData: 'data' is required");
|
|
2006
|
+
return this.request("PUT", `/users/${r}/data/${s}`, o);
|
|
2002
2007
|
}
|
|
2003
2008
|
/**
|
|
2004
2009
|
* Delete a data object by its id
|
|
@@ -2026,18 +2031,18 @@ function Wn() {
|
|
|
2026
2031
|
if (Ot) return ke;
|
|
2027
2032
|
Ot = 1;
|
|
2028
2033
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
2029
|
-
function r(s,
|
|
2030
|
-
var
|
|
2031
|
-
if (i !== void 0 && (
|
|
2034
|
+
function r(s, o, i) {
|
|
2035
|
+
var a = null;
|
|
2036
|
+
if (i !== void 0 && (a = "" + i), o.key !== void 0 && (a = "" + o.key), "key" in o) {
|
|
2032
2037
|
i = {};
|
|
2033
|
-
for (var l in
|
|
2034
|
-
l !== "key" && (i[l] =
|
|
2035
|
-
} else i =
|
|
2036
|
-
return
|
|
2038
|
+
for (var l in o)
|
|
2039
|
+
l !== "key" && (i[l] = o[l]);
|
|
2040
|
+
} else i = o;
|
|
2041
|
+
return o = i.ref, {
|
|
2037
2042
|
$$typeof: t,
|
|
2038
2043
|
type: s,
|
|
2039
|
-
key:
|
|
2040
|
-
ref:
|
|
2044
|
+
key: a,
|
|
2045
|
+
ref: o !== void 0 ? o : null,
|
|
2041
2046
|
props: i
|
|
2042
2047
|
};
|
|
2043
2048
|
}
|
|
@@ -2130,14 +2135,14 @@ function qn() {
|
|
|
2130
2135
|
return "<...>";
|
|
2131
2136
|
}
|
|
2132
2137
|
}
|
|
2133
|
-
function
|
|
2138
|
+
function o() {
|
|
2134
2139
|
var f = V.A;
|
|
2135
2140
|
return f === null ? null : f.getOwner();
|
|
2136
2141
|
}
|
|
2137
2142
|
function i() {
|
|
2138
2143
|
return Error("react-stack-top-frame");
|
|
2139
2144
|
}
|
|
2140
|
-
function
|
|
2145
|
+
function a(f) {
|
|
2141
2146
|
if (Z.call(f, "key")) {
|
|
2142
2147
|
var S = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
2143
2148
|
if (S && S.isReactWarning) return !1;
|
|
@@ -2226,7 +2231,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2226
2231
|
Y
|
|
2227
2232
|
), X[Y + k] = !0);
|
|
2228
2233
|
}
|
|
2229
|
-
if (Y = null, x !== void 0 && (r(x), Y = "" + x),
|
|
2234
|
+
if (Y = null, x !== void 0 && (r(x), Y = "" + x), a(S) && (r(S.key), Y = "" + S.key), "key" in S) {
|
|
2230
2235
|
x = {};
|
|
2231
2236
|
for (var ue in S)
|
|
2232
2237
|
ue !== "key" && (x[ue] = S[ue]);
|
|
@@ -2238,7 +2243,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2238
2243
|
f,
|
|
2239
2244
|
Y,
|
|
2240
2245
|
x,
|
|
2241
|
-
|
|
2246
|
+
o(),
|
|
2242
2247
|
$,
|
|
2243
2248
|
N
|
|
2244
2249
|
);
|
|
@@ -2290,10 +2295,10 @@ function Bn() {
|
|
|
2290
2295
|
}
|
|
2291
2296
|
var n = Bn();
|
|
2292
2297
|
const Hn = async (t, e) => {
|
|
2293
|
-
const { name: r, email: s, password:
|
|
2298
|
+
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;
|
|
2294
2299
|
if (!y)
|
|
2295
2300
|
throw new Error("API key is required for signup");
|
|
2296
|
-
if (!r || !s || !
|
|
2301
|
+
if (!r || !s || !o || !i)
|
|
2297
2302
|
throw new Error("Name, email, password, and appId are required");
|
|
2298
2303
|
try {
|
|
2299
2304
|
const w = await W.post(
|
|
@@ -2301,9 +2306,9 @@ const Hn = async (t, e) => {
|
|
|
2301
2306
|
{
|
|
2302
2307
|
name: r,
|
|
2303
2308
|
email: s,
|
|
2304
|
-
password:
|
|
2309
|
+
password: o,
|
|
2305
2310
|
appId: i,
|
|
2306
|
-
phone:
|
|
2311
|
+
phone: a,
|
|
2307
2312
|
address: l,
|
|
2308
2313
|
avatarUrl: h,
|
|
2309
2314
|
isActive: c,
|
|
@@ -2390,9 +2395,9 @@ const Xn = Nt(
|
|
|
2390
2395
|
size: e = 24,
|
|
2391
2396
|
strokeWidth: r = 2,
|
|
2392
2397
|
absoluteStrokeWidth: s,
|
|
2393
|
-
className:
|
|
2398
|
+
className: o = "",
|
|
2394
2399
|
children: i,
|
|
2395
|
-
iconNode:
|
|
2400
|
+
iconNode: a,
|
|
2396
2401
|
...l
|
|
2397
2402
|
}, h) => Ge(
|
|
2398
2403
|
"svg",
|
|
@@ -2403,12 +2408,12 @@ const Xn = Nt(
|
|
|
2403
2408
|
height: e,
|
|
2404
2409
|
stroke: t,
|
|
2405
2410
|
strokeWidth: s ? Number(r) * 24 / Number(e) : r,
|
|
2406
|
-
className: ir("lucide",
|
|
2411
|
+
className: ir("lucide", o),
|
|
2407
2412
|
...!i && !Kn(l) && { "aria-hidden": "true" },
|
|
2408
2413
|
...l
|
|
2409
2414
|
},
|
|
2410
2415
|
[
|
|
2411
|
-
...
|
|
2416
|
+
...a.map(([c, u]) => Ge(c, u)),
|
|
2412
2417
|
...Array.isArray(i) ? i : [i]
|
|
2413
2418
|
]
|
|
2414
2419
|
)
|
|
@@ -2421,7 +2426,7 @@ const Xn = Nt(
|
|
|
2421
2426
|
*/
|
|
2422
2427
|
const B = (t, e) => {
|
|
2423
2428
|
const r = Nt(
|
|
2424
|
-
({ className: s, ...
|
|
2429
|
+
({ className: s, ...o }, i) => Ge(Xn, {
|
|
2425
2430
|
ref: i,
|
|
2426
2431
|
iconNode: e,
|
|
2427
2432
|
className: ir(
|
|
@@ -2429,7 +2434,7 @@ const B = (t, e) => {
|
|
|
2429
2434
|
`lucide-${t}`,
|
|
2430
2435
|
s
|
|
2431
2436
|
),
|
|
2432
|
-
...
|
|
2437
|
+
...o
|
|
2433
2438
|
})
|
|
2434
2439
|
);
|
|
2435
2440
|
return r.displayName = _t(t), r;
|
|
@@ -2505,11 +2510,11 @@ const ns = [
|
|
|
2505
2510
|
* This source code is licensed under the ISC license.
|
|
2506
2511
|
* See the LICENSE file in the root directory of this source tree.
|
|
2507
2512
|
*/
|
|
2508
|
-
const
|
|
2513
|
+
const os = [
|
|
2509
2514
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2510
2515
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
2511
2516
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
2512
|
-
],
|
|
2517
|
+
], as = B("ellipsis-vertical", os);
|
|
2513
2518
|
/**
|
|
2514
2519
|
* @license lucide-react v0.544.0 - ISC
|
|
2515
2520
|
*
|
|
@@ -2621,7 +2626,7 @@ const xs = [
|
|
|
2621
2626
|
* This source code is licensed under the ISC license.
|
|
2622
2627
|
* See the LICENSE file in the root directory of this source tree.
|
|
2623
2628
|
*/
|
|
2624
|
-
const gs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]],
|
|
2629
|
+
const gs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], oe = B("loader-circle", gs);
|
|
2625
2630
|
/**
|
|
2626
2631
|
* @license lucide-react v0.544.0 - ISC
|
|
2627
2632
|
*
|
|
@@ -2845,18 +2850,18 @@ const Ls = [
|
|
|
2845
2850
|
baseUrl: "",
|
|
2846
2851
|
apiKey: "",
|
|
2847
2852
|
appId: ""
|
|
2848
|
-
},
|
|
2853
|
+
}, po = (t) => {
|
|
2849
2854
|
if (!t.baseUrl || !t.apiKey || !t.appId)
|
|
2850
2855
|
throw new Error("baseUrl, apiKey, and appId are required");
|
|
2851
2856
|
Ue.baseUrl = t.baseUrl, Ue.apiKey = t.apiKey, Ue.appId = t.appId;
|
|
2852
|
-
}, ge = () => Ue,
|
|
2857
|
+
}, ge = () => Ue, fo = ({
|
|
2853
2858
|
logoUrl: t,
|
|
2854
2859
|
logoLinkUrl: e,
|
|
2855
2860
|
title: r = "Create Your Account",
|
|
2856
2861
|
subtitle: s = "Join our platform today",
|
|
2857
|
-
footerText:
|
|
2862
|
+
footerText: o = "Secure authentication powered by Neuctra Authix",
|
|
2858
2863
|
primaryColor: i = "#00C214",
|
|
2859
|
-
gradient:
|
|
2864
|
+
gradient: a = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
2860
2865
|
darkMode: l = !0,
|
|
2861
2866
|
// Only avatar is optional
|
|
2862
2867
|
showAvatar: h = !1,
|
|
@@ -3410,7 +3415,7 @@ const Ls = [
|
|
|
3410
3415
|
disabled: g,
|
|
3411
3416
|
style: {
|
|
3412
3417
|
padding: "12px",
|
|
3413
|
-
background:
|
|
3418
|
+
background: a,
|
|
3414
3419
|
color: "#fff",
|
|
3415
3420
|
border: "none",
|
|
3416
3421
|
borderRadius: "10px",
|
|
@@ -3468,17 +3473,17 @@ const Ls = [
|
|
|
3468
3473
|
}
|
|
3469
3474
|
);
|
|
3470
3475
|
}, Fs = async (t, e) => {
|
|
3471
|
-
const { email: r, password: s, appId:
|
|
3472
|
-
if (!
|
|
3476
|
+
const { email: r, password: s, appId: o } = t, { baseUrl: i, apiKey: a } = e;
|
|
3477
|
+
if (!a)
|
|
3473
3478
|
throw new Error("API key is required for login");
|
|
3474
3479
|
try {
|
|
3475
3480
|
const l = await W.post(
|
|
3476
3481
|
`${i}/users/login`,
|
|
3477
|
-
{ email: r, password: s, appId:
|
|
3482
|
+
{ email: r, password: s, appId: o },
|
|
3478
3483
|
{
|
|
3479
3484
|
headers: {
|
|
3480
3485
|
"Content-Type": "application/json",
|
|
3481
|
-
"x-api-key":
|
|
3486
|
+
"x-api-key": a
|
|
3482
3487
|
}
|
|
3483
3488
|
}
|
|
3484
3489
|
);
|
|
@@ -3491,14 +3496,14 @@ const Ls = [
|
|
|
3491
3496
|
status: l.response?.status || 500
|
|
3492
3497
|
};
|
|
3493
3498
|
}
|
|
3494
|
-
},
|
|
3499
|
+
}, xo = ({
|
|
3495
3500
|
logoUrl: t,
|
|
3496
3501
|
logoLinkUrl: e,
|
|
3497
3502
|
title: r = "Sign In to Your Account",
|
|
3498
3503
|
subtitle: s = "Welcome back! Please enter your details",
|
|
3499
|
-
footerText:
|
|
3504
|
+
footerText: o = "Secure authentication powered by Neuctra Authix",
|
|
3500
3505
|
primaryColor: i = "#00C214",
|
|
3501
|
-
gradient:
|
|
3506
|
+
gradient: a = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3502
3507
|
darkMode: l = !0,
|
|
3503
3508
|
signupUrl: h,
|
|
3504
3509
|
onSuccess: c,
|
|
@@ -3827,7 +3832,7 @@ const Ls = [
|
|
|
3827
3832
|
disabled: C,
|
|
3828
3833
|
style: {
|
|
3829
3834
|
padding: "12px",
|
|
3830
|
-
background:
|
|
3835
|
+
background: a,
|
|
3831
3836
|
color: "#fff",
|
|
3832
3837
|
border: "none",
|
|
3833
3838
|
borderRadius: "10px",
|
|
@@ -4003,7 +4008,7 @@ const Ls = [
|
|
|
4003
4008
|
disabled: C,
|
|
4004
4009
|
style: {
|
|
4005
4010
|
padding: "12px",
|
|
4006
|
-
background:
|
|
4011
|
+
background: a,
|
|
4007
4012
|
color: "#fff",
|
|
4008
4013
|
border: "none",
|
|
4009
4014
|
fontSize: "14px",
|
|
@@ -4077,81 +4082,99 @@ const Ls = [
|
|
|
4077
4082
|
)
|
|
4078
4083
|
}
|
|
4079
4084
|
);
|
|
4080
|
-
},
|
|
4085
|
+
}, ho = ({
|
|
4081
4086
|
children: t,
|
|
4082
4087
|
fallback: e = null,
|
|
4083
4088
|
className: r,
|
|
4084
4089
|
width: s,
|
|
4085
|
-
height:
|
|
4090
|
+
height: o
|
|
4086
4091
|
}) => {
|
|
4087
|
-
const [i,
|
|
4092
|
+
const [i, a] = O(() => {
|
|
4093
|
+
if (typeof window > "u") return !1;
|
|
4094
|
+
try {
|
|
4095
|
+
const l = localStorage.getItem("userInfo");
|
|
4096
|
+
return !!(l && l !== "undefined" && l !== "null");
|
|
4097
|
+
} catch {
|
|
4098
|
+
return !1;
|
|
4099
|
+
}
|
|
4100
|
+
});
|
|
4088
4101
|
return te(() => {
|
|
4089
4102
|
const l = () => {
|
|
4090
|
-
if (typeof window > "u")
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4103
|
+
if (!(typeof window > "u"))
|
|
4104
|
+
try {
|
|
4105
|
+
const h = localStorage.getItem("userInfo");
|
|
4106
|
+
a(
|
|
4107
|
+
!!(h && h !== "undefined" && h !== "null")
|
|
4108
|
+
);
|
|
4109
|
+
} catch {
|
|
4110
|
+
a(!1);
|
|
4111
|
+
}
|
|
4112
|
+
};
|
|
4113
|
+
return window.addEventListener("storage", l), () => {
|
|
4114
|
+
window.removeEventListener("storage", l);
|
|
4100
4115
|
};
|
|
4101
4116
|
}, []), i ? /* @__PURE__ */ n.jsx(
|
|
4102
|
-
"
|
|
4117
|
+
"div",
|
|
4103
4118
|
{
|
|
4104
4119
|
className: r,
|
|
4105
4120
|
style: {
|
|
4106
|
-
display: "
|
|
4121
|
+
display: "flex",
|
|
4107
4122
|
alignItems: "center",
|
|
4108
|
-
verticalAlign: "middle",
|
|
4109
4123
|
width: s,
|
|
4110
|
-
height:
|
|
4124
|
+
height: o
|
|
4111
4125
|
},
|
|
4112
4126
|
children: t
|
|
4113
4127
|
}
|
|
4114
|
-
) :
|
|
4115
|
-
},
|
|
4128
|
+
) : typeof e == "function" ? e() : e;
|
|
4129
|
+
}, go = ({
|
|
4116
4130
|
children: t,
|
|
4117
4131
|
fallback: e = null,
|
|
4118
4132
|
className: r,
|
|
4119
4133
|
width: s,
|
|
4120
|
-
height:
|
|
4134
|
+
height: o
|
|
4121
4135
|
}) => {
|
|
4122
|
-
const [i,
|
|
4136
|
+
const [i, a] = O(() => {
|
|
4137
|
+
if (typeof window > "u") return !0;
|
|
4138
|
+
try {
|
|
4139
|
+
const l = localStorage.getItem("userInfo");
|
|
4140
|
+
return !l || l === "undefined" || l === "null";
|
|
4141
|
+
} catch {
|
|
4142
|
+
return !0;
|
|
4143
|
+
}
|
|
4144
|
+
});
|
|
4123
4145
|
return te(() => {
|
|
4124
4146
|
const l = () => {
|
|
4125
4147
|
try {
|
|
4126
|
-
const
|
|
4127
|
-
|
|
4148
|
+
const h = localStorage.getItem("userInfo");
|
|
4149
|
+
a(
|
|
4150
|
+
!h || h === "undefined" || h === "null"
|
|
4151
|
+
);
|
|
4128
4152
|
} catch {
|
|
4129
|
-
|
|
4153
|
+
a(!0);
|
|
4130
4154
|
}
|
|
4131
|
-
}
|
|
4132
|
-
return
|
|
4155
|
+
};
|
|
4156
|
+
return l(), window.addEventListener("storage", l), () => window.removeEventListener("storage", l);
|
|
4133
4157
|
}, []), i ? /* @__PURE__ */ n.jsx(
|
|
4134
|
-
"
|
|
4158
|
+
"div",
|
|
4135
4159
|
{
|
|
4136
4160
|
className: r,
|
|
4137
4161
|
style: {
|
|
4138
|
-
display: "
|
|
4162
|
+
display: "flex",
|
|
4139
4163
|
alignItems: "center",
|
|
4140
|
-
verticalAlign: "middle",
|
|
4141
4164
|
width: s,
|
|
4142
|
-
height:
|
|
4165
|
+
height: o
|
|
4143
4166
|
},
|
|
4144
4167
|
children: t
|
|
4145
4168
|
}
|
|
4146
|
-
) :
|
|
4169
|
+
) : typeof e == "function" ? e() : e;
|
|
4147
4170
|
}, Ms = ({
|
|
4148
4171
|
isOpen: t,
|
|
4149
4172
|
onClose: e,
|
|
4150
4173
|
onSuccess: r,
|
|
4151
4174
|
onError: s,
|
|
4152
|
-
userId:
|
|
4175
|
+
userId: o,
|
|
4153
4176
|
token: i,
|
|
4154
|
-
colors:
|
|
4177
|
+
colors: a
|
|
4155
4178
|
}) => {
|
|
4156
4179
|
const { baseUrl: l, apiKey: h, appId: c } = ge(), [u, b] = O(!1), [y, w] = O(""), [d, j] = O("warning"), [m, _] = O(!1);
|
|
4157
4180
|
if (te(() => {
|
|
@@ -4164,7 +4187,7 @@ const Ls = [
|
|
|
4164
4187
|
const R = async () => {
|
|
4165
4188
|
b(!0), j("processing");
|
|
4166
4189
|
try {
|
|
4167
|
-
const { data: g } = await W.delete(`${l}/users/delete/${
|
|
4190
|
+
const { data: g } = await W.delete(`${l}/users/delete/${o}`, {
|
|
4168
4191
|
data: { appId: c },
|
|
4169
4192
|
headers: {
|
|
4170
4193
|
"x-api-key": h
|
|
@@ -4226,7 +4249,7 @@ const Ls = [
|
|
|
4226
4249
|
"h3",
|
|
4227
4250
|
{
|
|
4228
4251
|
style: {
|
|
4229
|
-
color:
|
|
4252
|
+
color: a.textPrimary,
|
|
4230
4253
|
margin: 0,
|
|
4231
4254
|
fontSize: "20px",
|
|
4232
4255
|
fontWeight: 700,
|
|
@@ -4246,7 +4269,7 @@ const Ls = [
|
|
|
4246
4269
|
style: {
|
|
4247
4270
|
background: "transparent",
|
|
4248
4271
|
border: "none",
|
|
4249
|
-
color:
|
|
4272
|
+
color: a.textTertiary,
|
|
4250
4273
|
cursor: "pointer",
|
|
4251
4274
|
padding: "8px",
|
|
4252
4275
|
borderRadius: "8px",
|
|
@@ -4259,10 +4282,10 @@ const Ls = [
|
|
|
4259
4282
|
transition: "all 0.2s ease"
|
|
4260
4283
|
},
|
|
4261
4284
|
onMouseOver: (g) => {
|
|
4262
|
-
g.currentTarget.style.backgroundColor =
|
|
4285
|
+
g.currentTarget.style.backgroundColor = a.border, g.currentTarget.style.color = a.textPrimary;
|
|
4263
4286
|
},
|
|
4264
4287
|
onMouseOut: (g) => {
|
|
4265
|
-
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color =
|
|
4288
|
+
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color = a.textTertiary;
|
|
4266
4289
|
},
|
|
4267
4290
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
|
|
4268
4291
|
}
|
|
@@ -4277,8 +4300,8 @@ const Ls = [
|
|
|
4277
4300
|
display: "flex",
|
|
4278
4301
|
gap: "16px",
|
|
4279
4302
|
padding: "20px",
|
|
4280
|
-
background: `${
|
|
4281
|
-
border: `1px solid ${
|
|
4303
|
+
background: `${a.error}15`,
|
|
4304
|
+
border: `1px solid ${a.error}30`,
|
|
4282
4305
|
borderRadius: "12px",
|
|
4283
4306
|
marginBottom: "20px"
|
|
4284
4307
|
},
|
|
@@ -4287,7 +4310,7 @@ const Ls = [
|
|
|
4287
4310
|
"div",
|
|
4288
4311
|
{
|
|
4289
4312
|
style: {
|
|
4290
|
-
color:
|
|
4313
|
+
color: a.error,
|
|
4291
4314
|
flexShrink: 0,
|
|
4292
4315
|
display: "flex",
|
|
4293
4316
|
alignItems: "flex-start"
|
|
@@ -4300,7 +4323,7 @@ const Ls = [
|
|
|
4300
4323
|
"h4",
|
|
4301
4324
|
{
|
|
4302
4325
|
style: {
|
|
4303
|
-
color:
|
|
4326
|
+
color: a.textPrimary,
|
|
4304
4327
|
margin: "0 0 12px 0",
|
|
4305
4328
|
fontSize: "16px",
|
|
4306
4329
|
fontWeight: 600
|
|
@@ -4337,10 +4360,10 @@ const Ls = [
|
|
|
4337
4360
|
alignItems: "center",
|
|
4338
4361
|
gap: "10px",
|
|
4339
4362
|
fontSize: "14px",
|
|
4340
|
-
color:
|
|
4363
|
+
color: a.textSecondary
|
|
4341
4364
|
},
|
|
4342
4365
|
children: [
|
|
4343
|
-
/* @__PURE__ */ n.jsx("div", { style: { color:
|
|
4366
|
+
/* @__PURE__ */ n.jsx("div", { style: { color: a.error, flexShrink: 0 }, children: g.icon }),
|
|
4344
4367
|
/* @__PURE__ */ n.jsx("span", { children: g.text })
|
|
4345
4368
|
]
|
|
4346
4369
|
},
|
|
@@ -4370,9 +4393,9 @@ const Ls = [
|
|
|
4370
4393
|
style: {
|
|
4371
4394
|
padding: "10px 24px",
|
|
4372
4395
|
borderRadius: "10px",
|
|
4373
|
-
border: `1.5px solid ${
|
|
4396
|
+
border: `1.5px solid ${a.border}`,
|
|
4374
4397
|
background: "transparent",
|
|
4375
|
-
color:
|
|
4398
|
+
color: a.textPrimary,
|
|
4376
4399
|
fontSize: "14px",
|
|
4377
4400
|
fontWeight: 500,
|
|
4378
4401
|
cursor: "pointer",
|
|
@@ -4381,7 +4404,7 @@ const Ls = [
|
|
|
4381
4404
|
transition: "all 0.2s ease"
|
|
4382
4405
|
},
|
|
4383
4406
|
onMouseOver: (g) => {
|
|
4384
|
-
g.currentTarget.style.backgroundColor =
|
|
4407
|
+
g.currentTarget.style.backgroundColor = a.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4385
4408
|
},
|
|
4386
4409
|
onMouseOut: (g) => {
|
|
4387
4410
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4460,7 +4483,7 @@ const Ls = [
|
|
|
4460
4483
|
"h3",
|
|
4461
4484
|
{
|
|
4462
4485
|
style: {
|
|
4463
|
-
color:
|
|
4486
|
+
color: a.textPrimary,
|
|
4464
4487
|
margin: 0,
|
|
4465
4488
|
fontSize: "20px",
|
|
4466
4489
|
fontWeight: 700,
|
|
@@ -4477,7 +4500,7 @@ const Ls = [
|
|
|
4477
4500
|
"p",
|
|
4478
4501
|
{
|
|
4479
4502
|
style: {
|
|
4480
|
-
color:
|
|
4503
|
+
color: a.textSecondary,
|
|
4481
4504
|
marginBottom: "16px",
|
|
4482
4505
|
fontSize: "14px",
|
|
4483
4506
|
lineHeight: "1.5"
|
|
@@ -4485,7 +4508,7 @@ const Ls = [
|
|
|
4485
4508
|
children: [
|
|
4486
4509
|
"Type",
|
|
4487
4510
|
" ",
|
|
4488
|
-
/* @__PURE__ */ n.jsx("strong", { style: { color:
|
|
4511
|
+
/* @__PURE__ */ n.jsx("strong", { style: { color: a.textPrimary }, children: '"delete my account"' }),
|
|
4489
4512
|
" ",
|
|
4490
4513
|
"to confirm:"
|
|
4491
4514
|
]
|
|
@@ -4502,16 +4525,16 @@ const Ls = [
|
|
|
4502
4525
|
width: "100%",
|
|
4503
4526
|
padding: "14px 16px",
|
|
4504
4527
|
borderRadius: "10px",
|
|
4505
|
-
border: `2px solid ${A ?
|
|
4528
|
+
border: `2px solid ${A ? a.success : a.error}`,
|
|
4506
4529
|
backgroundColor: "transparent",
|
|
4507
|
-
color:
|
|
4530
|
+
color: a.textPrimary,
|
|
4508
4531
|
fontSize: "15px",
|
|
4509
4532
|
outline: "none",
|
|
4510
4533
|
transition: "all 0.2s ease",
|
|
4511
4534
|
boxSizing: "border-box"
|
|
4512
4535
|
},
|
|
4513
4536
|
onFocus: (g) => {
|
|
4514
|
-
g.target.style.boxShadow = `0 0 0 3px ${
|
|
4537
|
+
g.target.style.boxShadow = `0 0 0 3px ${a.accent}20`;
|
|
4515
4538
|
},
|
|
4516
4539
|
onBlur: (g) => {
|
|
4517
4540
|
g.target.style.boxShadow = "none";
|
|
@@ -4527,7 +4550,7 @@ const Ls = [
|
|
|
4527
4550
|
alignItems: "center",
|
|
4528
4551
|
gap: "8px",
|
|
4529
4552
|
marginTop: "10px",
|
|
4530
|
-
color:
|
|
4553
|
+
color: a.success,
|
|
4531
4554
|
fontSize: "14px",
|
|
4532
4555
|
fontWeight: 500
|
|
4533
4556
|
},
|
|
@@ -4558,9 +4581,9 @@ const Ls = [
|
|
|
4558
4581
|
style: {
|
|
4559
4582
|
padding: "10px 24px",
|
|
4560
4583
|
borderRadius: "10px",
|
|
4561
|
-
border: `1.5px solid ${
|
|
4584
|
+
border: `1.5px solid ${a.border}`,
|
|
4562
4585
|
background: "transparent",
|
|
4563
|
-
color:
|
|
4586
|
+
color: a.textPrimary,
|
|
4564
4587
|
fontSize: "14px",
|
|
4565
4588
|
fontWeight: 500,
|
|
4566
4589
|
cursor: "pointer",
|
|
@@ -4569,7 +4592,7 @@ const Ls = [
|
|
|
4569
4592
|
transition: "all 0.2s ease"
|
|
4570
4593
|
},
|
|
4571
4594
|
onMouseOver: (g) => {
|
|
4572
|
-
g.currentTarget.style.backgroundColor =
|
|
4595
|
+
g.currentTarget.style.backgroundColor = a.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4573
4596
|
},
|
|
4574
4597
|
onMouseOut: (g) => {
|
|
4575
4598
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4644,7 +4667,7 @@ const Ls = [
|
|
|
4644
4667
|
flexShrink: 0
|
|
4645
4668
|
},
|
|
4646
4669
|
children: /* @__PURE__ */ n.jsx(
|
|
4647
|
-
|
|
4670
|
+
oe,
|
|
4648
4671
|
{
|
|
4649
4672
|
size: 20,
|
|
4650
4673
|
style: {
|
|
@@ -4659,7 +4682,7 @@ const Ls = [
|
|
|
4659
4682
|
"h3",
|
|
4660
4683
|
{
|
|
4661
4684
|
style: {
|
|
4662
|
-
color:
|
|
4685
|
+
color: a.textPrimary,
|
|
4663
4686
|
margin: 0,
|
|
4664
4687
|
fontSize: "20px",
|
|
4665
4688
|
fontWeight: 700,
|
|
@@ -4672,7 +4695,7 @@ const Ls = [
|
|
|
4672
4695
|
"p",
|
|
4673
4696
|
{
|
|
4674
4697
|
style: {
|
|
4675
|
-
color:
|
|
4698
|
+
color: a.textTertiary,
|
|
4676
4699
|
margin: "4px 0 0 0",
|
|
4677
4700
|
fontSize: "14px",
|
|
4678
4701
|
lineHeight: "1.4"
|
|
@@ -4706,7 +4729,7 @@ const Ls = [
|
|
|
4706
4729
|
padding: "12px",
|
|
4707
4730
|
borderRadius: "8px",
|
|
4708
4731
|
transition: "all 0.2s ease",
|
|
4709
|
-
backgroundColor: g.active ? `${
|
|
4732
|
+
backgroundColor: g.active ? `${a.accent}10` : "transparent"
|
|
4710
4733
|
},
|
|
4711
4734
|
children: [
|
|
4712
4735
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4716,9 +4739,9 @@ const Ls = [
|
|
|
4716
4739
|
width: "8px",
|
|
4717
4740
|
height: "8px",
|
|
4718
4741
|
borderRadius: "50%",
|
|
4719
|
-
backgroundColor: g.active ?
|
|
4742
|
+
backgroundColor: g.active ? a.accent : a.textTertiary,
|
|
4720
4743
|
transition: "all 0.3s ease",
|
|
4721
|
-
boxShadow: g.active ? `0 0 0 4px ${
|
|
4744
|
+
boxShadow: g.active ? `0 0 0 4px ${a.accent}20` : "none"
|
|
4722
4745
|
}
|
|
4723
4746
|
}
|
|
4724
4747
|
),
|
|
@@ -4727,7 +4750,7 @@ const Ls = [
|
|
|
4727
4750
|
{
|
|
4728
4751
|
style: {
|
|
4729
4752
|
fontSize: "14px",
|
|
4730
|
-
color: g.active ?
|
|
4753
|
+
color: g.active ? a.textPrimary : a.textSecondary,
|
|
4731
4754
|
fontWeight: g.active ? 500 : 400
|
|
4732
4755
|
},
|
|
4733
4756
|
children: g.text
|
|
@@ -4747,17 +4770,17 @@ const Ls = [
|
|
|
4747
4770
|
alignItems: "center",
|
|
4748
4771
|
gap: "10px",
|
|
4749
4772
|
padding: "16px",
|
|
4750
|
-
background: `${
|
|
4773
|
+
background: `${a.accent}10`,
|
|
4751
4774
|
borderRadius: "10px",
|
|
4752
4775
|
fontSize: "14px",
|
|
4753
|
-
color:
|
|
4776
|
+
color: a.textSecondary
|
|
4754
4777
|
},
|
|
4755
4778
|
children: [
|
|
4756
4779
|
/* @__PURE__ */ n.jsx(
|
|
4757
4780
|
dr,
|
|
4758
4781
|
{
|
|
4759
4782
|
size: 18,
|
|
4760
|
-
style: { color:
|
|
4783
|
+
style: { color: a.accent, flexShrink: 0 }
|
|
4761
4784
|
}
|
|
4762
4785
|
),
|
|
4763
4786
|
/* @__PURE__ */ n.jsx("span", { children: "You will be redirected to the login page shortly" })
|
|
@@ -4799,7 +4822,7 @@ const Ls = [
|
|
|
4799
4822
|
"h3",
|
|
4800
4823
|
{
|
|
4801
4824
|
style: {
|
|
4802
|
-
color:
|
|
4825
|
+
color: a.textPrimary,
|
|
4803
4826
|
margin: 0,
|
|
4804
4827
|
fontSize: "20px",
|
|
4805
4828
|
fontWeight: 700,
|
|
@@ -4812,7 +4835,7 @@ const Ls = [
|
|
|
4812
4835
|
"p",
|
|
4813
4836
|
{
|
|
4814
4837
|
style: {
|
|
4815
|
-
color:
|
|
4838
|
+
color: a.textTertiary,
|
|
4816
4839
|
margin: "4px 0 0 0",
|
|
4817
4840
|
fontSize: "14px",
|
|
4818
4841
|
lineHeight: "1.4"
|
|
@@ -4830,8 +4853,8 @@ const Ls = [
|
|
|
4830
4853
|
style: {
|
|
4831
4854
|
textAlign: "center",
|
|
4832
4855
|
padding: "20px",
|
|
4833
|
-
background: `${
|
|
4834
|
-
border: `1px solid ${
|
|
4856
|
+
background: `${a.success}10`,
|
|
4857
|
+
border: `1px solid ${a.success}20`,
|
|
4835
4858
|
borderRadius: "12px",
|
|
4836
4859
|
marginBottom: "24px"
|
|
4837
4860
|
},
|
|
@@ -4841,7 +4864,7 @@ const Ls = [
|
|
|
4841
4864
|
{
|
|
4842
4865
|
size: 48,
|
|
4843
4866
|
style: {
|
|
4844
|
-
color:
|
|
4867
|
+
color: a.success,
|
|
4845
4868
|
marginBottom: "12px",
|
|
4846
4869
|
display: "block",
|
|
4847
4870
|
margin: "0 auto 12px auto"
|
|
@@ -4852,7 +4875,7 @@ const Ls = [
|
|
|
4852
4875
|
"p",
|
|
4853
4876
|
{
|
|
4854
4877
|
style: {
|
|
4855
|
-
color:
|
|
4878
|
+
color: a.textPrimary,
|
|
4856
4879
|
fontSize: "16px",
|
|
4857
4880
|
fontWeight: 600,
|
|
4858
4881
|
margin: "0 0 8px 0"
|
|
@@ -4864,7 +4887,7 @@ const Ls = [
|
|
|
4864
4887
|
"p",
|
|
4865
4888
|
{
|
|
4866
4889
|
style: {
|
|
4867
|
-
color:
|
|
4890
|
+
color: a.textSecondary,
|
|
4868
4891
|
fontSize: "14px",
|
|
4869
4892
|
margin: 0,
|
|
4870
4893
|
lineHeight: "1.5"
|
|
@@ -4883,20 +4906,20 @@ const Ls = [
|
|
|
4883
4906
|
alignItems: "center",
|
|
4884
4907
|
gap: "10px",
|
|
4885
4908
|
padding: "16px",
|
|
4886
|
-
background: `${
|
|
4909
|
+
background: `${a.accent}10`,
|
|
4887
4910
|
borderRadius: "10px",
|
|
4888
4911
|
fontSize: "14px",
|
|
4889
|
-
color:
|
|
4912
|
+
color: a.textSecondary,
|
|
4890
4913
|
justifyContent: "center"
|
|
4891
4914
|
},
|
|
4892
4915
|
children: [
|
|
4893
4916
|
/* @__PURE__ */ n.jsx(
|
|
4894
|
-
|
|
4917
|
+
oe,
|
|
4895
4918
|
{
|
|
4896
4919
|
size: 16,
|
|
4897
4920
|
style: {
|
|
4898
4921
|
animation: "spin 1s linear infinite",
|
|
4899
|
-
color:
|
|
4922
|
+
color: a.accent
|
|
4900
4923
|
}
|
|
4901
4924
|
}
|
|
4902
4925
|
),
|
|
@@ -4928,8 +4951,8 @@ const Ls = [
|
|
|
4928
4951
|
"div",
|
|
4929
4952
|
{
|
|
4930
4953
|
style: {
|
|
4931
|
-
backgroundColor:
|
|
4932
|
-
border: `1px solid ${
|
|
4954
|
+
backgroundColor: a.surface,
|
|
4955
|
+
border: `1px solid ${a.border}`,
|
|
4933
4956
|
borderRadius: "20px",
|
|
4934
4957
|
width: "100%",
|
|
4935
4958
|
maxWidth: "480px",
|
|
@@ -5005,7 +5028,7 @@ const Ls = [
|
|
|
5005
5028
|
onUpdate: r,
|
|
5006
5029
|
colors: s
|
|
5007
5030
|
}) => {
|
|
5008
|
-
const [
|
|
5031
|
+
const [o, i] = O(""), [a, l] = O(!1), [h, c] = O(!1), [u, b] = O({ isValid: !1, message: "", type: null });
|
|
5009
5032
|
if (te(() => {
|
|
5010
5033
|
if (typeof window > "u") return;
|
|
5011
5034
|
const d = () => {
|
|
@@ -5013,12 +5036,12 @@ const Ls = [
|
|
|
5013
5036
|
};
|
|
5014
5037
|
return d(), window.addEventListener("resize", d), () => window.removeEventListener("resize", d);
|
|
5015
5038
|
}, []), te(() => {
|
|
5016
|
-
if (!
|
|
5039
|
+
if (!o.trim()) {
|
|
5017
5040
|
b({ isValid: !1, message: "", type: null });
|
|
5018
5041
|
return;
|
|
5019
5042
|
}
|
|
5020
5043
|
try {
|
|
5021
|
-
const d = new URL(
|
|
5044
|
+
const d = new URL(o), j = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(d.pathname);
|
|
5022
5045
|
b(j ? {
|
|
5023
5046
|
isValid: !0,
|
|
5024
5047
|
message: "Valid image URL",
|
|
@@ -5035,12 +5058,12 @@ const Ls = [
|
|
|
5035
5058
|
type: "error"
|
|
5036
5059
|
});
|
|
5037
5060
|
}
|
|
5038
|
-
}, [
|
|
5061
|
+
}, [o]), !t) return null;
|
|
5039
5062
|
const y = async () => {
|
|
5040
|
-
if (!(!
|
|
5063
|
+
if (!(!o || !u.isValid)) {
|
|
5041
5064
|
l(!0);
|
|
5042
5065
|
try {
|
|
5043
|
-
await r(
|
|
5066
|
+
await r(o) && (i(""), e());
|
|
5044
5067
|
} finally {
|
|
5045
5068
|
l(!1);
|
|
5046
5069
|
}
|
|
@@ -5201,7 +5224,7 @@ const Ls = [
|
|
|
5201
5224
|
type: "url",
|
|
5202
5225
|
id: "avatar-url",
|
|
5203
5226
|
placeholder: "https://example.com/your-avatar.jpg",
|
|
5204
|
-
value:
|
|
5227
|
+
value: o,
|
|
5205
5228
|
onChange: (d) => i(d.target.value),
|
|
5206
5229
|
style: {
|
|
5207
5230
|
width: "100%",
|
|
@@ -5222,7 +5245,7 @@ const Ls = [
|
|
|
5222
5245
|
onBlur: (d) => {
|
|
5223
5246
|
d.target.style.borderColor = u.type === "error" ? s.error : u.type === "success" ? s.success : s.border, d.target.style.boxShadow = "none";
|
|
5224
5247
|
},
|
|
5225
|
-
disabled:
|
|
5248
|
+
disabled: a
|
|
5226
5249
|
}
|
|
5227
5250
|
),
|
|
5228
5251
|
/* @__PURE__ */ n.jsx(
|
|
@@ -5259,7 +5282,7 @@ const Ls = [
|
|
|
5259
5282
|
}
|
|
5260
5283
|
)
|
|
5261
5284
|
] }),
|
|
5262
|
-
|
|
5285
|
+
o && u.type === "success" && /* @__PURE__ */ n.jsxs(
|
|
5263
5286
|
"div",
|
|
5264
5287
|
{
|
|
5265
5288
|
style: {
|
|
@@ -5285,7 +5308,7 @@ const Ls = [
|
|
|
5285
5308
|
/* @__PURE__ */ n.jsx(
|
|
5286
5309
|
"img",
|
|
5287
5310
|
{
|
|
5288
|
-
src:
|
|
5311
|
+
src: o,
|
|
5289
5312
|
alt: "Avatar preview",
|
|
5290
5313
|
style: {
|
|
5291
5314
|
width: "80px",
|
|
@@ -5322,7 +5345,7 @@ const Ls = [
|
|
|
5322
5345
|
"button",
|
|
5323
5346
|
{
|
|
5324
5347
|
onClick: e,
|
|
5325
|
-
disabled:
|
|
5348
|
+
disabled: a,
|
|
5326
5349
|
style: {
|
|
5327
5350
|
padding: "10px 24px",
|
|
5328
5351
|
borderRadius: "10px",
|
|
@@ -5331,17 +5354,17 @@ const Ls = [
|
|
|
5331
5354
|
color: s.textPrimary,
|
|
5332
5355
|
fontSize: "14px",
|
|
5333
5356
|
fontWeight: 500,
|
|
5334
|
-
cursor:
|
|
5357
|
+
cursor: a ? "not-allowed" : "pointer",
|
|
5335
5358
|
flex: h ? "none" : 1,
|
|
5336
5359
|
minWidth: h ? "100%" : "120px",
|
|
5337
|
-
opacity:
|
|
5360
|
+
opacity: a ? 0.6 : 1,
|
|
5338
5361
|
transition: "all 0.2s ease"
|
|
5339
5362
|
},
|
|
5340
5363
|
onMouseOver: (d) => {
|
|
5341
|
-
|
|
5364
|
+
a || (d.currentTarget.style.backgroundColor = s.border, d.currentTarget.style.transform = "translateY(-1px)");
|
|
5342
5365
|
},
|
|
5343
5366
|
onMouseOut: (d) => {
|
|
5344
|
-
|
|
5367
|
+
a || (d.currentTarget.style.backgroundColor = "transparent", d.currentTarget.style.transform = "translateY(0)");
|
|
5345
5368
|
},
|
|
5346
5369
|
children: "Cancel"
|
|
5347
5370
|
}
|
|
@@ -5350,7 +5373,7 @@ const Ls = [
|
|
|
5350
5373
|
"button",
|
|
5351
5374
|
{
|
|
5352
5375
|
onClick: y,
|
|
5353
|
-
disabled:
|
|
5376
|
+
disabled: a || !u.isValid,
|
|
5354
5377
|
style: {
|
|
5355
5378
|
padding: "10px 24px",
|
|
5356
5379
|
borderRadius: "10px",
|
|
@@ -5359,26 +5382,26 @@ const Ls = [
|
|
|
5359
5382
|
color: "#fff",
|
|
5360
5383
|
fontSize: "14px",
|
|
5361
5384
|
fontWeight: 600,
|
|
5362
|
-
cursor:
|
|
5385
|
+
cursor: a || !u.isValid ? "not-allowed" : "pointer",
|
|
5363
5386
|
flex: h ? "none" : 1,
|
|
5364
5387
|
minWidth: h ? "100%" : "140px",
|
|
5365
|
-
opacity:
|
|
5388
|
+
opacity: a || !u.isValid ? 0.6 : 1,
|
|
5366
5389
|
display: "flex",
|
|
5367
5390
|
alignItems: "center",
|
|
5368
5391
|
justifyContent: "center",
|
|
5369
5392
|
gap: "8px",
|
|
5370
5393
|
transition: "all 0.2s ease",
|
|
5371
|
-
boxShadow:
|
|
5394
|
+
boxShadow: a || !u.isValid ? "none" : `0 4px 12px ${s.accent}40`
|
|
5372
5395
|
},
|
|
5373
5396
|
onMouseOver: (d) => {
|
|
5374
|
-
!
|
|
5397
|
+
!a && u.isValid && (d.currentTarget.style.transform = "translateY(-1px)", d.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
|
|
5375
5398
|
},
|
|
5376
5399
|
onMouseOut: (d) => {
|
|
5377
|
-
!
|
|
5400
|
+
!a && u.isValid && (d.currentTarget.style.transform = "translateY(0)", d.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
|
|
5378
5401
|
},
|
|
5379
|
-
children:
|
|
5402
|
+
children: a ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5380
5403
|
/* @__PURE__ */ n.jsx(
|
|
5381
|
-
|
|
5404
|
+
oe,
|
|
5382
5405
|
{
|
|
5383
5406
|
size: 16,
|
|
5384
5407
|
style: {
|
|
@@ -5456,10 +5479,10 @@ const Ls = [
|
|
|
5456
5479
|
onClose: e,
|
|
5457
5480
|
onSuccess: r,
|
|
5458
5481
|
onError: s,
|
|
5459
|
-
userId:
|
|
5482
|
+
userId: o,
|
|
5460
5483
|
colors: i
|
|
5461
5484
|
}) => {
|
|
5462
|
-
const { baseUrl:
|
|
5485
|
+
const { baseUrl: a, apiKey: l, appId: h } = ge(), [c, u] = O({
|
|
5463
5486
|
currentPassword: "",
|
|
5464
5487
|
newPassword: "",
|
|
5465
5488
|
confirmPassword: ""
|
|
@@ -5488,7 +5511,7 @@ const Ls = [
|
|
|
5488
5511
|
d(!0);
|
|
5489
5512
|
try {
|
|
5490
5513
|
const { data: U } = await W.put(
|
|
5491
|
-
`${
|
|
5514
|
+
`${a}/users/change-password/${o}`,
|
|
5492
5515
|
{
|
|
5493
5516
|
appId: h,
|
|
5494
5517
|
currentPassword: c.currentPassword,
|
|
@@ -5836,7 +5859,7 @@ const Ls = [
|
|
|
5836
5859
|
},
|
|
5837
5860
|
children: w ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5838
5861
|
/* @__PURE__ */ n.jsx(
|
|
5839
|
-
|
|
5862
|
+
oe,
|
|
5840
5863
|
{
|
|
5841
5864
|
size: 16,
|
|
5842
5865
|
style: {
|
|
@@ -5901,9 +5924,9 @@ const Ls = [
|
|
|
5901
5924
|
onClose: e,
|
|
5902
5925
|
onVerify: r,
|
|
5903
5926
|
onSendOTP: s,
|
|
5904
|
-
verifyFormData:
|
|
5927
|
+
verifyFormData: o,
|
|
5905
5928
|
setVerifyFormData: i,
|
|
5906
|
-
otpSent:
|
|
5929
|
+
otpSent: a,
|
|
5907
5930
|
verifying: l,
|
|
5908
5931
|
user: h,
|
|
5909
5932
|
colors: c,
|
|
@@ -5911,7 +5934,7 @@ const Ls = [
|
|
|
5911
5934
|
}) => {
|
|
5912
5935
|
if (!t) return null;
|
|
5913
5936
|
const b = () => {
|
|
5914
|
-
e(), i({ email: h?.email || "", otp: "", appId:
|
|
5937
|
+
e(), i({ email: h?.email || "", otp: "", appId: o.appId });
|
|
5915
5938
|
};
|
|
5916
5939
|
return /* @__PURE__ */ n.jsxs(
|
|
5917
5940
|
"div",
|
|
@@ -5952,7 +5975,7 @@ const Ls = [
|
|
|
5952
5975
|
"input",
|
|
5953
5976
|
{
|
|
5954
5977
|
type: "email",
|
|
5955
|
-
value:
|
|
5978
|
+
value: o.email,
|
|
5956
5979
|
onChange: (y) => i((w) => ({ ...w, email: y.target.value })),
|
|
5957
5980
|
placeholder: "Enter your email",
|
|
5958
5981
|
style: {
|
|
@@ -5967,7 +5990,7 @@ const Ls = [
|
|
|
5967
5990
|
)
|
|
5968
5991
|
] })
|
|
5969
5992
|
] }),
|
|
5970
|
-
|
|
5993
|
+
a && /* @__PURE__ */ n.jsxs("div", { className: "form-group", children: [
|
|
5971
5994
|
/* @__PURE__ */ n.jsx("label", { style: { color: c.textSecondary }, children: "OTP" }),
|
|
5972
5995
|
/* @__PURE__ */ n.jsxs("div", { className: "input-container", children: [
|
|
5973
5996
|
/* @__PURE__ */ n.jsx(cr, { size: 18, style: { color: c.textTertiary }, "aria-hidden": "true" }),
|
|
@@ -5975,7 +5998,7 @@ const Ls = [
|
|
|
5975
5998
|
"input",
|
|
5976
5999
|
{
|
|
5977
6000
|
type: "text",
|
|
5978
|
-
value:
|
|
6001
|
+
value: o.otp,
|
|
5979
6002
|
onChange: (y) => i((w) => ({ ...w, otp: y.target.value })),
|
|
5980
6003
|
placeholder: "Enter OTP",
|
|
5981
6004
|
style: {
|
|
@@ -5990,7 +6013,7 @@ const Ls = [
|
|
|
5990
6013
|
)
|
|
5991
6014
|
] })
|
|
5992
6015
|
] }),
|
|
5993
|
-
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children:
|
|
6016
|
+
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children: a ? /* @__PURE__ */ n.jsxs(
|
|
5994
6017
|
"button",
|
|
5995
6018
|
{
|
|
5996
6019
|
type: "submit",
|
|
@@ -6002,7 +6025,7 @@ const Ls = [
|
|
|
6002
6025
|
},
|
|
6003
6026
|
"aria-label": l ? "Verifying email" : "Verify email",
|
|
6004
6027
|
children: [
|
|
6005
|
-
l ? /* @__PURE__ */ n.jsx(
|
|
6028
|
+
l ? /* @__PURE__ */ n.jsx(oe, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ce, { size: 16, "aria-hidden": "true" }),
|
|
6006
6029
|
l ? "Verifying..." : "Verify Email"
|
|
6007
6030
|
]
|
|
6008
6031
|
}
|
|
@@ -6019,7 +6042,7 @@ const Ls = [
|
|
|
6019
6042
|
},
|
|
6020
6043
|
"aria-label": l ? "Sending OTP" : "Send OTP",
|
|
6021
6044
|
children: [
|
|
6022
|
-
l ? /* @__PURE__ */ n.jsx(
|
|
6045
|
+
l ? /* @__PURE__ */ n.jsx(oe, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ut, { size: 16, "aria-hidden": "true" }),
|
|
6023
6046
|
l ? "Sending..." : "Send OTP"
|
|
6024
6047
|
]
|
|
6025
6048
|
}
|
|
@@ -6179,14 +6202,14 @@ const Ls = [
|
|
|
6179
6202
|
]
|
|
6180
6203
|
}
|
|
6181
6204
|
);
|
|
6182
|
-
},
|
|
6205
|
+
}, mo = ({
|
|
6183
6206
|
token: t,
|
|
6184
6207
|
user: e = null,
|
|
6185
6208
|
darkMode: r = !0,
|
|
6186
6209
|
homeUrl: s,
|
|
6187
|
-
onLogout:
|
|
6210
|
+
onLogout: o,
|
|
6188
6211
|
onVerify: i,
|
|
6189
|
-
primaryColor:
|
|
6212
|
+
primaryColor: a = "#00C212"
|
|
6190
6213
|
}) => {
|
|
6191
6214
|
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), [X, f] = O({
|
|
6192
6215
|
email: "",
|
|
@@ -6339,8 +6362,8 @@ const Ls = [
|
|
|
6339
6362
|
textPrimary: "#ffffff",
|
|
6340
6363
|
textSecondary: "#d4d4d8",
|
|
6341
6364
|
textTertiary: "#a1a1aa",
|
|
6342
|
-
accent:
|
|
6343
|
-
accentHover: ft(
|
|
6365
|
+
accent: a,
|
|
6366
|
+
accentHover: ft(a, -15),
|
|
6344
6367
|
success: "#10b981",
|
|
6345
6368
|
error: "#ef4444",
|
|
6346
6369
|
border: "#27272a",
|
|
@@ -6353,8 +6376,8 @@ const Ls = [
|
|
|
6353
6376
|
textPrimary: "#18181b",
|
|
6354
6377
|
textSecondary: "#52525b",
|
|
6355
6378
|
textTertiary: "#71717a",
|
|
6356
|
-
accent:
|
|
6357
|
-
accentHover: ft(
|
|
6379
|
+
accent: a,
|
|
6380
|
+
accentHover: ft(a, -15),
|
|
6358
6381
|
success: "#10b981",
|
|
6359
6382
|
error: "#ef4444",
|
|
6360
6383
|
border: "#e4e4e7",
|
|
@@ -6385,7 +6408,7 @@ const Ls = [
|
|
|
6385
6408
|
},
|
|
6386
6409
|
children: [
|
|
6387
6410
|
/* @__PURE__ */ n.jsx(
|
|
6388
|
-
|
|
6411
|
+
oe,
|
|
6389
6412
|
{
|
|
6390
6413
|
size: 40,
|
|
6391
6414
|
color: D.accent,
|
|
@@ -6754,7 +6777,7 @@ const Ls = [
|
|
|
6754
6777
|
},
|
|
6755
6778
|
children: [
|
|
6756
6779
|
R ? /* @__PURE__ */ n.jsx(
|
|
6757
|
-
|
|
6780
|
+
oe,
|
|
6758
6781
|
{
|
|
6759
6782
|
size: 16,
|
|
6760
6783
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -6820,7 +6843,7 @@ const Ls = [
|
|
|
6820
6843
|
},
|
|
6821
6844
|
children: [
|
|
6822
6845
|
K ? /* @__PURE__ */ n.jsx(
|
|
6823
|
-
|
|
6846
|
+
oe,
|
|
6824
6847
|
{
|
|
6825
6848
|
size: 14,
|
|
6826
6849
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -6856,7 +6879,7 @@ const Ls = [
|
|
|
6856
6879
|
},
|
|
6857
6880
|
onClick: () => Z(!V),
|
|
6858
6881
|
children: [
|
|
6859
|
-
/* @__PURE__ */ n.jsx(
|
|
6882
|
+
/* @__PURE__ */ n.jsx(as, { size: 16, "aria-hidden": "true" }),
|
|
6860
6883
|
"More Actions"
|
|
6861
6884
|
]
|
|
6862
6885
|
}
|
|
@@ -6909,11 +6932,11 @@ const Ls = [
|
|
|
6909
6932
|
]
|
|
6910
6933
|
}
|
|
6911
6934
|
),
|
|
6912
|
-
|
|
6935
|
+
o && /* @__PURE__ */ n.jsxs(
|
|
6913
6936
|
"button",
|
|
6914
6937
|
{
|
|
6915
6938
|
onClick: () => {
|
|
6916
|
-
|
|
6939
|
+
o(), Y();
|
|
6917
6940
|
},
|
|
6918
6941
|
style: {
|
|
6919
6942
|
width: "100%",
|
|
@@ -7071,7 +7094,7 @@ const Ls = [
|
|
|
7071
7094
|
style: {
|
|
7072
7095
|
padding: "12px",
|
|
7073
7096
|
borderRadius: "8px",
|
|
7074
|
-
border: `1px solid ${
|
|
7097
|
+
border: `1px solid ${a}`,
|
|
7075
7098
|
backgroundColor: "transparent",
|
|
7076
7099
|
color: D.textPrimary,
|
|
7077
7100
|
fontSize: "12px",
|
|
@@ -7392,15 +7415,15 @@ const Ls = [
|
|
|
7392
7415
|
]
|
|
7393
7416
|
}
|
|
7394
7417
|
);
|
|
7395
|
-
},
|
|
7418
|
+
}, yo = ({
|
|
7396
7419
|
darkMode: t = !0,
|
|
7397
7420
|
primaryColor: e = "#3b82f6",
|
|
7398
7421
|
onLogout: r,
|
|
7399
7422
|
varient: s = "classic",
|
|
7400
|
-
propUser:
|
|
7423
|
+
propUser: o,
|
|
7401
7424
|
className: i = "",
|
|
7402
7425
|
// New URL props with defaults
|
|
7403
|
-
profileUrl:
|
|
7426
|
+
profileUrl: a,
|
|
7404
7427
|
settingsUrl: l,
|
|
7405
7428
|
// Menu item visibility with defaults
|
|
7406
7429
|
showProfileMenuItem: h = !0,
|
|
@@ -7422,10 +7445,10 @@ const Ls = [
|
|
|
7422
7445
|
}, []), te(() => {
|
|
7423
7446
|
(async () => {
|
|
7424
7447
|
try {
|
|
7425
|
-
if (I(!0), U(null),
|
|
7426
|
-
if (!
|
|
7448
|
+
if (I(!0), U(null), o) {
|
|
7449
|
+
if (!o.id || !o.name || !o.email)
|
|
7427
7450
|
throw new Error("Invalid user data provided");
|
|
7428
|
-
M(
|
|
7451
|
+
M(o);
|
|
7429
7452
|
} else if (typeof window < "u") {
|
|
7430
7453
|
const k = localStorage.getItem("userInfo");
|
|
7431
7454
|
if (k)
|
|
@@ -7444,7 +7467,7 @@ const Ls = [
|
|
|
7444
7467
|
I(!1);
|
|
7445
7468
|
}
|
|
7446
7469
|
})();
|
|
7447
|
-
}, [
|
|
7470
|
+
}, [o]), te(() => {
|
|
7448
7471
|
if (typeof window > "u") return;
|
|
7449
7472
|
const x = () => {
|
|
7450
7473
|
if (!R || !F.current) return;
|
|
@@ -7691,7 +7714,7 @@ const Ls = [
|
|
|
7691
7714
|
if (x) {
|
|
7692
7715
|
const k = JSON.parse(x);
|
|
7693
7716
|
M(k);
|
|
7694
|
-
} else
|
|
7717
|
+
} else o && M(o);
|
|
7695
7718
|
} catch (x) {
|
|
7696
7719
|
console.error("Retry failed:", x), U("Invalid user data"), localStorage.removeItem("userInfo"), M(null);
|
|
7697
7720
|
} finally {
|
|
@@ -7699,7 +7722,7 @@ const Ls = [
|
|
|
7699
7722
|
}
|
|
7700
7723
|
}, Q = (x, k) => {
|
|
7701
7724
|
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), k());
|
|
7702
|
-
}, X = () =>
|
|
7725
|
+
}, X = () => a || C?.profileUrl, f = () => {
|
|
7703
7726
|
const x = X();
|
|
7704
7727
|
x && window.open(x, "_self", "noopener,noreferrer");
|
|
7705
7728
|
}, S = () => {
|
|
@@ -7969,16 +7992,16 @@ const Ls = [
|
|
|
7969
7992
|
]
|
|
7970
7993
|
}
|
|
7971
7994
|
);
|
|
7972
|
-
},
|
|
7995
|
+
}, bo = ({
|
|
7973
7996
|
user: t,
|
|
7974
7997
|
darkMode: e = !0,
|
|
7975
7998
|
primaryColor: r = "#00C212",
|
|
7976
7999
|
onVerify: s
|
|
7977
8000
|
}) => {
|
|
7978
|
-
const { appId:
|
|
8001
|
+
const { appId: o, baseUrl: i, apiKey: a } = ge(), [l, h] = O({
|
|
7979
8002
|
email: t?.email || "",
|
|
7980
8003
|
otp: "",
|
|
7981
|
-
appId:
|
|
8004
|
+
appId: o
|
|
7982
8005
|
}), [c, u] = O(!1), [b, y] = O(!1), [w, d] = O(null), j = (g, I) => {
|
|
7983
8006
|
let v = parseInt(g.replace("#", ""), 16), U = (v >> 16) + I, q = (v >> 8 & 255) + I, F = (v & 255) + I;
|
|
7984
8007
|
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")}`;
|
|
@@ -8020,7 +8043,7 @@ const Ls = [
|
|
|
8020
8043
|
const g = await W.post(
|
|
8021
8044
|
`${i}/users/send-verify-otp/${t?.id}`,
|
|
8022
8045
|
{ email: l.email },
|
|
8023
|
-
{ headers: { "x-api-key":
|
|
8046
|
+
{ headers: { "x-api-key": a, "x-app-id": o } }
|
|
8024
8047
|
);
|
|
8025
8048
|
g.data.success ? (_("success", g.data.message || "OTP sent!"), u(!0)) : _("error", g.data.message || "Failed to send OTP");
|
|
8026
8049
|
} catch (g) {
|
|
@@ -8038,7 +8061,7 @@ const Ls = [
|
|
|
8038
8061
|
const I = await W.post(`${i}/users/verify-email`, l);
|
|
8039
8062
|
if (I.data.success && t) {
|
|
8040
8063
|
const v = { ...t, isVerified: !0 };
|
|
8041
|
-
s?.(v), _("success", I.data.message || "Email verified!"), u(!1), h({ email: t.email, otp: "", appId:
|
|
8064
|
+
s?.(v), _("success", I.data.message || "Email verified!"), u(!1), h({ email: t.email, otp: "", appId: o });
|
|
8042
8065
|
} else
|
|
8043
8066
|
_("error", I.data.message || "Verification failed");
|
|
8044
8067
|
} catch (I) {
|
|
@@ -8169,7 +8192,7 @@ const Ls = [
|
|
|
8169
8192
|
] })
|
|
8170
8193
|
] }),
|
|
8171
8194
|
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 12 }, children: c ? /* @__PURE__ */ n.jsxs("button", { type: "submit", disabled: b, style: M(b), children: [
|
|
8172
|
-
b ? /* @__PURE__ */ n.jsx(
|
|
8195
|
+
b ? /* @__PURE__ */ n.jsx(oe, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ce, { size: 16 }),
|
|
8173
8196
|
b ? "Verifying..." : "Verify Email"
|
|
8174
8197
|
] }) : /* @__PURE__ */ n.jsxs(
|
|
8175
8198
|
"button",
|
|
@@ -8179,7 +8202,7 @@ const Ls = [
|
|
|
8179
8202
|
disabled: b,
|
|
8180
8203
|
style: M(b),
|
|
8181
8204
|
children: [
|
|
8182
|
-
b ? /* @__PURE__ */ n.jsx(
|
|
8205
|
+
b ? /* @__PURE__ */ n.jsx(oe, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ut, { size: 16 }),
|
|
8183
8206
|
b ? "Sending..." : "Send OTP"
|
|
8184
8207
|
]
|
|
8185
8208
|
}
|
|
@@ -8189,14 +8212,14 @@ const Ls = [
|
|
|
8189
8212
|
);
|
|
8190
8213
|
};
|
|
8191
8214
|
export {
|
|
8192
|
-
|
|
8193
|
-
|
|
8194
|
-
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8215
|
+
uo as NeuctraAuthix,
|
|
8216
|
+
bo as ReactEmailVerification,
|
|
8217
|
+
ho as ReactSignedIn,
|
|
8218
|
+
go as ReactSignedOut,
|
|
8219
|
+
yo as ReactUserButton,
|
|
8220
|
+
xo as ReactUserLogin,
|
|
8221
|
+
mo as ReactUserProfile,
|
|
8222
|
+
fo as ReactUserSignUp,
|
|
8200
8223
|
ge as getSdkConfig,
|
|
8201
|
-
|
|
8224
|
+
po as setSdkConfig
|
|
8202
8225
|
};
|