@neuctra/authix 1.2.8 → 1.2.10
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 +708 -689
- package/dist/neuctra-authix.umd.js +47 -47
- package/dist/sdk/index.d.ts +6 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/interfaces.d.ts +3 -0
- package/dist/sdk/interfaces.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,23 +4,23 @@ function At(t, e) {
|
|
|
4
4
|
return t.apply(e, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString: ur } = Object.prototype, { getPrototypeOf: rt } = Object, { iterator:
|
|
7
|
+
const { toString: ur } = Object.prototype, { getPrototypeOf: rt } = Object, { iterator: Fe, toStringTag: _t } = Symbol, Le = /* @__PURE__ */ ((t) => (e) => {
|
|
8
8
|
const n = ur.call(e);
|
|
9
9
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), ie = (t) => (t = t.toLowerCase(), (e) => Le(e) === t), qe = (t) => (e) => typeof e === t, { isArray: je } = Array, be = qe("undefined");
|
|
11
11
|
function Te(t) {
|
|
12
12
|
return t !== null && !be(t) && t.constructor !== null && !be(t.constructor) && te(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
13
13
|
}
|
|
14
|
-
const Ut =
|
|
14
|
+
const Ut = ie("ArrayBuffer");
|
|
15
15
|
function pr(t) {
|
|
16
16
|
let e;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Ut(t.buffer), e;
|
|
18
18
|
}
|
|
19
19
|
const fr = qe("string"), te = qe("function"), $t = qe("number"), Re = (t) => t !== null && typeof t == "object", xr = (t) => t === !0 || t === !1, _e = (t) => {
|
|
20
|
-
if (
|
|
20
|
+
if (Le(t) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const e = rt(t);
|
|
23
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(_t in t) && !(
|
|
23
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(_t in t) && !(Fe in t);
|
|
24
24
|
}, hr = (t) => {
|
|
25
25
|
if (!Re(t) || Te(t))
|
|
26
26
|
return !1;
|
|
@@ -29,25 +29,25 @@ const fr = qe("string"), te = qe("function"), $t = qe("number"), Re = (t) => t !
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
}, mr =
|
|
32
|
+
}, mr = ie("Date"), gr = ie("File"), yr = ie("Blob"), br = ie("FileList"), wr = (t) => Re(t) && te(t.pipe), jr = (t) => {
|
|
33
33
|
let e;
|
|
34
|
-
return t && (typeof FormData == "function" && t instanceof FormData || te(t.append) && ((e =
|
|
34
|
+
return t && (typeof FormData == "function" && t instanceof FormData || te(t.append) && ((e = Le(t)) === "formdata" || // detect form-data instance
|
|
35
35
|
e === "object" && te(t.toString) && t.toString() === "[object FormData]"));
|
|
36
|
-
}, vr =
|
|
36
|
+
}, vr = ie("URLSearchParams"), [Sr, kr, Er, Cr] = ["ReadableStream", "Request", "Response", "Headers"].map(ie), Tr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
37
|
function Pe(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
38
38
|
if (t === null || typeof t > "u")
|
|
39
39
|
return;
|
|
40
|
-
let s,
|
|
40
|
+
let s, a;
|
|
41
41
|
if (typeof t != "object" && (t = [t]), je(t))
|
|
42
|
-
for (s = 0,
|
|
42
|
+
for (s = 0, a = t.length; s < a; s++)
|
|
43
43
|
e.call(null, t[s], s, t);
|
|
44
44
|
else {
|
|
45
45
|
if (Te(t))
|
|
46
46
|
return;
|
|
47
|
-
const
|
|
47
|
+
const i = n ? Object.getOwnPropertyNames(t) : Object.keys(t), o = i.length;
|
|
48
48
|
let c;
|
|
49
49
|
for (s = 0; s < o; s++)
|
|
50
|
-
c =
|
|
50
|
+
c = i[s], e.call(null, t[c], c, t);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
function Dt(t, e) {
|
|
@@ -55,35 +55,35 @@ function Dt(t, e) {
|
|
|
55
55
|
return null;
|
|
56
56
|
e = e.toLowerCase();
|
|
57
57
|
const n = Object.keys(t);
|
|
58
|
-
let s = n.length,
|
|
58
|
+
let s = n.length, a;
|
|
59
59
|
for (; s-- > 0; )
|
|
60
|
-
if (
|
|
61
|
-
return
|
|
60
|
+
if (a = n[s], e === a.toLowerCase())
|
|
61
|
+
return a;
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
64
|
const xe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Nt = (t) => !be(t) && t !== xe;
|
|
65
65
|
function Ge() {
|
|
66
|
-
const { caseless: t, skipUndefined: e } = Nt(this) && this || {}, n = {}, s = (
|
|
67
|
-
const o = t && Dt(n,
|
|
68
|
-
_e(n[o]) && _e(
|
|
66
|
+
const { caseless: t, skipUndefined: e } = Nt(this) && this || {}, n = {}, s = (a, i) => {
|
|
67
|
+
const o = t && Dt(n, i) || i;
|
|
68
|
+
_e(n[o]) && _e(a) ? n[o] = Ge(n[o], a) : _e(a) ? n[o] = Ge({}, a) : je(a) ? n[o] = a.slice() : (!e || !be(a)) && (n[o] = a);
|
|
69
69
|
};
|
|
70
|
-
for (let
|
|
71
|
-
arguments[
|
|
70
|
+
for (let a = 0, i = arguments.length; a < i; a++)
|
|
71
|
+
arguments[a] && Pe(arguments[a], s);
|
|
72
72
|
return n;
|
|
73
73
|
}
|
|
74
|
-
const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (
|
|
75
|
-
n && te(
|
|
76
|
-
}, { allOwnKeys: s }), t), Pr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t),
|
|
74
|
+
const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (a, i) => {
|
|
75
|
+
n && te(a) ? t[i] = At(a, n) : t[i] = a;
|
|
76
|
+
}, { allOwnKeys: s }), t), Pr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Ir = (t, e, n, 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
|
}), n && Object.assign(t.prototype, n);
|
|
80
|
-
},
|
|
81
|
-
let
|
|
80
|
+
}, Or = (t, e, n, s) => {
|
|
81
|
+
let a, i, o;
|
|
82
82
|
const c = {};
|
|
83
83
|
if (e = e || {}, t == null) return e;
|
|
84
84
|
do {
|
|
85
|
-
for (
|
|
86
|
-
o = i
|
|
85
|
+
for (a = Object.getOwnPropertyNames(t), i = a.length; i-- > 0; )
|
|
86
|
+
o = a[i], (!s || s(o, t, e)) && !c[o] && (e[o] = t[o], c[o] = !0);
|
|
87
87
|
t = n !== !1 && rt(t);
|
|
88
88
|
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
|
89
89
|
return e;
|
|
@@ -101,11 +101,11 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
|
|
|
101
101
|
n[e] = t[e];
|
|
102
102
|
return n;
|
|
103
103
|
}, _r = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && rt(Uint8Array)), Ur = (t, e) => {
|
|
104
|
-
const s = (t && t[
|
|
105
|
-
let
|
|
106
|
-
for (; (
|
|
107
|
-
const
|
|
108
|
-
e.call(t,
|
|
104
|
+
const s = (t && t[Fe]).call(t);
|
|
105
|
+
let a;
|
|
106
|
+
for (; (a = s.next()) && !a.done; ) {
|
|
107
|
+
const i = a.value;
|
|
108
|
+
e.call(t, i[0], i[1]);
|
|
109
109
|
}
|
|
110
110
|
}, $r = (t, e) => {
|
|
111
111
|
let n;
|
|
@@ -113,19 +113,19 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
|
|
|
113
113
|
for (; (n = t.exec(e)) !== null; )
|
|
114
114
|
s.push(n);
|
|
115
115
|
return s;
|
|
116
|
-
}, Dr =
|
|
116
|
+
}, Dr = ie("HTMLFormElement"), Nr = (t) => t.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
|
-
function(n, s,
|
|
119
|
-
return s.toUpperCase() +
|
|
118
|
+
function(n, s, a) {
|
|
119
|
+
return s.toUpperCase() + a;
|
|
120
120
|
}
|
|
121
|
-
), ut = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype),
|
|
121
|
+
), ut = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Fr = ie("RegExp"), Ft = (t, e) => {
|
|
122
122
|
const n = Object.getOwnPropertyDescriptors(t), s = {};
|
|
123
|
-
Pe(n, (
|
|
123
|
+
Pe(n, (a, i) => {
|
|
124
124
|
let o;
|
|
125
|
-
(o = e(
|
|
125
|
+
(o = e(a, i, t)) !== !1 && (s[i] = o || a);
|
|
126
126
|
}), Object.defineProperties(t, s);
|
|
127
|
-
},
|
|
128
|
-
|
|
127
|
+
}, Lr = (t) => {
|
|
128
|
+
Ft(t, (e, n) => {
|
|
129
129
|
if (te(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
130
130
|
return !1;
|
|
131
131
|
const s = t[n];
|
|
@@ -140,44 +140,44 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
|
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
}, qr = (t, e) => {
|
|
143
|
-
const n = {}, s = (
|
|
144
|
-
|
|
145
|
-
n[
|
|
143
|
+
const n = {}, s = (a) => {
|
|
144
|
+
a.forEach((i) => {
|
|
145
|
+
n[i] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
148
|
return je(t) ? s(t) : s(String(t).split(e)), n;
|
|
149
149
|
}, Mr = () => {
|
|
150
150
|
}, Wr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
151
151
|
function Br(t) {
|
|
152
|
-
return !!(t && te(t.append) && t[_t] === "FormData" && t[
|
|
152
|
+
return !!(t && te(t.append) && t[_t] === "FormData" && t[Fe]);
|
|
153
153
|
}
|
|
154
154
|
const Hr = (t) => {
|
|
155
|
-
const e = new Array(10), n = (s,
|
|
155
|
+
const e = new Array(10), n = (s, a) => {
|
|
156
156
|
if (Re(s)) {
|
|
157
157
|
if (e.indexOf(s) >= 0)
|
|
158
158
|
return;
|
|
159
159
|
if (Te(s))
|
|
160
160
|
return s;
|
|
161
161
|
if (!("toJSON" in s)) {
|
|
162
|
-
e[
|
|
163
|
-
const
|
|
162
|
+
e[a] = s;
|
|
163
|
+
const i = je(s) ? [] : {};
|
|
164
164
|
return Pe(s, (o, c) => {
|
|
165
|
-
const u = n(o,
|
|
166
|
-
!be(u) && (
|
|
167
|
-
}), e[
|
|
165
|
+
const u = n(o, a + 1);
|
|
166
|
+
!be(u) && (i[c] = u);
|
|
167
|
+
}), e[a] = void 0, i;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return s;
|
|
171
171
|
};
|
|
172
172
|
return n(t, 0);
|
|
173
|
-
}, Vr =
|
|
174
|
-
|
|
175
|
-
}, !1), (
|
|
176
|
-
s.push(
|
|
173
|
+
}, Vr = ie("AsyncFunction"), Yr = (t) => t && (Re(t) || te(t)) && te(t.then) && te(t.catch), Lt = ((t, e) => t ? setImmediate : e ? ((n, s) => (xe.addEventListener("message", ({ source: a, data: i }) => {
|
|
174
|
+
a === xe && i === n && s.length && s.shift()();
|
|
175
|
+
}, !1), (a) => {
|
|
176
|
+
s.push(a), xe.postMessage(n, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
179
|
te(xe.postMessage)
|
|
180
|
-
), Jr = typeof queueMicrotask < "u" ? queueMicrotask.bind(xe) : typeof process < "u" && process.nextTick ||
|
|
180
|
+
), Jr = typeof queueMicrotask < "u" ? queueMicrotask.bind(xe) : typeof process < "u" && process.nextTick || Lt, Kr = (t) => t != null && te(t[Fe]), f = {
|
|
181
181
|
isArray: je,
|
|
182
182
|
isArrayBuffer: Ut,
|
|
183
183
|
isBuffer: Te,
|
|
@@ -197,7 +197,7 @@ const Hr = (t) => {
|
|
|
197
197
|
isDate: mr,
|
|
198
198
|
isFile: gr,
|
|
199
199
|
isBlob: yr,
|
|
200
|
-
isRegExp:
|
|
200
|
+
isRegExp: Fr,
|
|
201
201
|
isFunction: te,
|
|
202
202
|
isStream: wr,
|
|
203
203
|
isURLSearchParams: vr,
|
|
@@ -208,10 +208,10 @@ const Hr = (t) => {
|
|
|
208
208
|
extend: Rr,
|
|
209
209
|
trim: Tr,
|
|
210
210
|
stripBOM: Pr,
|
|
211
|
-
inherits:
|
|
212
|
-
toFlatObject:
|
|
213
|
-
kindOf:
|
|
214
|
-
kindOfTest:
|
|
211
|
+
inherits: Ir,
|
|
212
|
+
toFlatObject: Or,
|
|
213
|
+
kindOf: Le,
|
|
214
|
+
kindOfTest: ie,
|
|
215
215
|
endsWith: zr,
|
|
216
216
|
toArray: Ar,
|
|
217
217
|
forEachEntry: Ur,
|
|
@@ -220,8 +220,8 @@ const Hr = (t) => {
|
|
|
220
220
|
hasOwnProperty: ut,
|
|
221
221
|
hasOwnProp: ut,
|
|
222
222
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
|
-
reduceDescriptors:
|
|
224
|
-
freezeMethods:
|
|
223
|
+
reduceDescriptors: Ft,
|
|
224
|
+
freezeMethods: Lr,
|
|
225
225
|
toObjectSet: qr,
|
|
226
226
|
toCamelCase: Nr,
|
|
227
227
|
noop: Mr,
|
|
@@ -233,12 +233,12 @@ const Hr = (t) => {
|
|
|
233
233
|
toJSONObject: Hr,
|
|
234
234
|
isAsyncFn: Vr,
|
|
235
235
|
isThenable: Yr,
|
|
236
|
-
setImmediate:
|
|
236
|
+
setImmediate: Lt,
|
|
237
237
|
asap: Jr,
|
|
238
238
|
isIterable: Kr
|
|
239
239
|
};
|
|
240
|
-
function $(t, e, n, 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), n && (this.config = n), s && (this.request = s),
|
|
240
|
+
function $(t, e, n, s, a) {
|
|
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), n && (this.config = n), s && (this.request = s), a && (this.response = a, this.status = a.status ? a.status : null);
|
|
242
242
|
}
|
|
243
243
|
f.inherits($, Error, {
|
|
244
244
|
toJSON: function() {
|
|
@@ -281,13 +281,13 @@ const qt = $.prototype, Mt = {};
|
|
|
281
281
|
});
|
|
282
282
|
Object.defineProperties($, Mt);
|
|
283
283
|
Object.defineProperty(qt, "isAxiosError", { value: !0 });
|
|
284
|
-
$.from = (t, e, n, s,
|
|
284
|
+
$.from = (t, e, n, s, a, i) => {
|
|
285
285
|
const o = Object.create(qt);
|
|
286
286
|
f.toFlatObject(t, o, function(d) {
|
|
287
287
|
return d !== Error.prototype;
|
|
288
288
|
}, (x) => x !== "isAxiosError");
|
|
289
289
|
const c = t && t.message ? t.message : "Error", u = e == null && t ? t.code : e;
|
|
290
|
-
return $.call(o, c, u, n, s,
|
|
290
|
+
return $.call(o, c, u, n, s, a), t && o.cause == null && Object.defineProperty(o, "cause", { value: t, configurable: !0 }), o.name = t && t.name || "Error", i && Object.assign(o, i), o;
|
|
291
291
|
};
|
|
292
292
|
const Gr = null;
|
|
293
293
|
function Xe(t) {
|
|
@@ -297,8 +297,8 @@ function Wt(t) {
|
|
|
297
297
|
return f.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
298
298
|
}
|
|
299
299
|
function pt(t, e, n) {
|
|
300
|
-
return t ? t.concat(e).map(function(
|
|
301
|
-
return
|
|
300
|
+
return t ? t.concat(e).map(function(a, i) {
|
|
301
|
+
return a = Wt(a), !n && i ? "[" + a + "]" : a;
|
|
302
302
|
}).join(n ? "." : "") : e;
|
|
303
303
|
}
|
|
304
304
|
function Xr(t) {
|
|
@@ -317,8 +317,8 @@ function Me(t, e, n) {
|
|
|
317
317
|
}, !1, function(w, h) {
|
|
318
318
|
return !f.isUndefined(h[w]);
|
|
319
319
|
});
|
|
320
|
-
const s = n.metaTokens,
|
|
321
|
-
if (!f.isFunction(
|
|
320
|
+
const s = n.metaTokens, a = n.visitor || d, i = n.dots, o = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(e);
|
|
321
|
+
if (!f.isFunction(a))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
323
|
function x(p) {
|
|
324
324
|
if (p === null) return "";
|
|
@@ -331,20 +331,20 @@ function Me(t, e, n) {
|
|
|
331
331
|
return f.isArrayBuffer(p) || f.isTypedArray(p) ? u && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
332
332
|
}
|
|
333
333
|
function d(p, w, h) {
|
|
334
|
-
let
|
|
334
|
+
let I = p;
|
|
335
335
|
if (p && !h && typeof p == "object") {
|
|
336
336
|
if (f.endsWith(w, "{}"))
|
|
337
337
|
w = s ? w : w.slice(0, -2), p = JSON.stringify(p);
|
|
338
|
-
else if (f.isArray(p) && Xr(p) || (f.isFileList(p) || f.endsWith(w, "[]")) && (
|
|
339
|
-
return w = Wt(w),
|
|
338
|
+
else if (f.isArray(p) && Xr(p) || (f.isFileList(p) || f.endsWith(w, "[]")) && (I = f.toArray(p)))
|
|
339
|
+
return w = Wt(w), I.forEach(function(g, A) {
|
|
340
340
|
!(f.isUndefined(g) || g === null) && e.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
o === !0 ? pt([w], A,
|
|
342
|
+
o === !0 ? pt([w], A, i) : o === null ? w : w + "[]",
|
|
343
343
|
x(g)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return Xe(p) ? !0 : (e.append(pt(h, w,
|
|
347
|
+
return Xe(p) ? !0 : (e.append(pt(h, w, i), x(p)), !1);
|
|
348
348
|
}
|
|
349
349
|
const y = [], k = Object.assign(Zr, {
|
|
350
350
|
defaultVisitor: d,
|
|
@@ -355,14 +355,14 @@ function Me(t, e, n) {
|
|
|
355
355
|
if (!f.isUndefined(p)) {
|
|
356
356
|
if (y.indexOf(p) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + w.join("."));
|
|
358
|
-
y.push(p), f.forEach(p, function(
|
|
359
|
-
(!(f.isUndefined(
|
|
358
|
+
y.push(p), f.forEach(p, function(I, C) {
|
|
359
|
+
(!(f.isUndefined(I) || I === null) && a.call(
|
|
360
360
|
e,
|
|
361
|
-
|
|
361
|
+
I,
|
|
362
362
|
f.isString(C) ? C.trim() : C,
|
|
363
363
|
w,
|
|
364
364
|
k
|
|
365
|
-
)) === !0 && E(
|
|
365
|
+
)) === !0 && E(I, w ? w.concat(C) : [C]);
|
|
366
366
|
}), y.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
@@ -395,8 +395,8 @@ Bt.toString = function(e) {
|
|
|
395
395
|
const n = e ? function(s) {
|
|
396
396
|
return e.call(this, s, ft);
|
|
397
397
|
} : ft;
|
|
398
|
-
return this._pairs.map(function(
|
|
399
|
-
return n(
|
|
398
|
+
return this._pairs.map(function(a) {
|
|
399
|
+
return n(a[0]) + "=" + n(a[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
402
|
function Qr(t) {
|
|
@@ -409,11 +409,11 @@ function Ht(t, e, n) {
|
|
|
409
409
|
f.isFunction(n) && (n = {
|
|
410
410
|
serialize: n
|
|
411
411
|
});
|
|
412
|
-
const
|
|
413
|
-
let
|
|
414
|
-
if (
|
|
412
|
+
const a = n && n.serialize;
|
|
413
|
+
let i;
|
|
414
|
+
if (a ? i = a(e, n) : i = f.isURLSearchParams(e) ? e.toString() : new nt(e, n).toString(s), i) {
|
|
415
415
|
const o = t.indexOf("#");
|
|
416
|
-
o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") +
|
|
416
|
+
o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
417
417
|
}
|
|
418
418
|
return t;
|
|
419
419
|
}
|
|
@@ -497,8 +497,8 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", on
|
|
|
497
497
|
};
|
|
498
498
|
function cn(t, e) {
|
|
499
499
|
return Me(t, new Q.classes.URLSearchParams(), {
|
|
500
|
-
visitor: function(n, s,
|
|
501
|
-
return Q.isNode && f.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) :
|
|
500
|
+
visitor: function(n, s, a, i) {
|
|
501
|
+
return Q.isNode && f.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...e
|
|
504
504
|
});
|
|
@@ -509,23 +509,23 @@ function dn(t) {
|
|
|
509
509
|
function un(t) {
|
|
510
510
|
const e = {}, n = Object.keys(t);
|
|
511
511
|
let s;
|
|
512
|
-
const
|
|
513
|
-
let
|
|
514
|
-
for (s = 0; s <
|
|
515
|
-
|
|
512
|
+
const a = n.length;
|
|
513
|
+
let i;
|
|
514
|
+
for (s = 0; s < a; s++)
|
|
515
|
+
i = n[s], e[i] = t[i];
|
|
516
516
|
return e;
|
|
517
517
|
}
|
|
518
518
|
function Yt(t) {
|
|
519
|
-
function e(n, s,
|
|
520
|
-
let o = n[
|
|
519
|
+
function e(n, s, a, i) {
|
|
520
|
+
let o = n[i++];
|
|
521
521
|
if (o === "__proto__") return !0;
|
|
522
|
-
const c = Number.isFinite(+o), u =
|
|
523
|
-
return o = !o && f.isArray(
|
|
522
|
+
const c = Number.isFinite(+o), u = i >= n.length;
|
|
523
|
+
return o = !o && f.isArray(a) ? a.length : o, u ? (f.hasOwnProp(a, o) ? a[o] = [a[o], s] : a[o] = s, !c) : ((!a[o] || !f.isObject(a[o])) && (a[o] = []), e(n, s, a[o], i) && f.isArray(a[o]) && (a[o] = un(a[o])), !c);
|
|
524
524
|
}
|
|
525
525
|
if (f.isFormData(t) && f.isFunction(t.entries)) {
|
|
526
526
|
const n = {};
|
|
527
|
-
return f.forEachEntry(t, (s,
|
|
528
|
-
e(dn(s),
|
|
527
|
+
return f.forEachEntry(t, (s, a) => {
|
|
528
|
+
e(dn(s), a, n, 0);
|
|
529
529
|
}), n;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
@@ -540,13 +540,13 @@ function pn(t, e, n) {
|
|
|
540
540
|
}
|
|
541
541
|
return (n || JSON.stringify)(t);
|
|
542
542
|
}
|
|
543
|
-
const
|
|
543
|
+
const Ie = {
|
|
544
544
|
transitional: Vt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(e, n) {
|
|
547
|
-
const s = n.getContentType() || "",
|
|
548
|
-
if (
|
|
549
|
-
return
|
|
547
|
+
const s = n.getContentType() || "", a = s.indexOf("application/json") > -1, i = f.isObject(e);
|
|
548
|
+
if (i && f.isHTMLForm(e) && (e = new FormData(e)), f.isFormData(e))
|
|
549
|
+
return a ? JSON.stringify(Yt(e)) : e;
|
|
550
550
|
if (f.isArrayBuffer(e) || f.isBuffer(e) || f.isStream(e) || f.isFile(e) || f.isBlob(e) || f.isReadableStream(e))
|
|
551
551
|
return e;
|
|
552
552
|
if (f.isArrayBufferView(e))
|
|
@@ -554,7 +554,7 @@ const Oe = {
|
|
|
554
554
|
if (f.isURLSearchParams(e))
|
|
555
555
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
556
556
|
let c;
|
|
557
|
-
if (
|
|
557
|
+
if (i) {
|
|
558
558
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
559
|
return cn(e, this.formSerializer).toString();
|
|
560
560
|
if ((c = f.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
|
@@ -566,14 +566,14 @@ const Oe = {
|
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return
|
|
569
|
+
return i || a ? (n.setContentType("application/json", !1), pn(e)) : e;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(e) {
|
|
572
|
-
const n = this.transitional ||
|
|
572
|
+
const n = this.transitional || Ie.transitional, s = n && n.forcedJSONParsing, a = this.responseType === "json";
|
|
573
573
|
if (f.isResponse(e) || f.isReadableStream(e))
|
|
574
574
|
return e;
|
|
575
|
-
if (e && f.isString(e) && (s && !this.responseType ||
|
|
576
|
-
const o = !(n && n.silentJSONParsing) &&
|
|
575
|
+
if (e && f.isString(e) && (s && !this.responseType || a)) {
|
|
576
|
+
const o = !(n && n.silentJSONParsing) && a;
|
|
577
577
|
try {
|
|
578
578
|
return JSON.parse(e, this.parseReviver);
|
|
579
579
|
} catch (c) {
|
|
@@ -607,7 +607,7 @@ const Oe = {
|
|
|
607
607
|
}
|
|
608
608
|
};
|
|
609
609
|
f.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
610
|
-
|
|
610
|
+
Ie.headers[t] = {};
|
|
611
611
|
});
|
|
612
612
|
const fn = f.toObjectSet([
|
|
613
613
|
"age",
|
|
@@ -629,10 +629,10 @@ const fn = f.toObjectSet([
|
|
|
629
629
|
"user-agent"
|
|
630
630
|
]), xn = (t) => {
|
|
631
631
|
const e = {};
|
|
632
|
-
let n, s,
|
|
632
|
+
let n, s, a;
|
|
633
633
|
return t && t.split(`
|
|
634
634
|
`).forEach(function(o) {
|
|
635
|
-
|
|
635
|
+
a = o.indexOf(":"), n = o.substring(0, a).trim().toLowerCase(), s = o.substring(a + 1).trim(), !(!n || e[n] && fn[n]) && (n === "set-cookie" ? e[n] ? e[n].push(s) : e[n] = [s] : e[n] = e[n] ? e[n] + ", " + s : s);
|
|
636
636
|
}), e;
|
|
637
637
|
}, ht = Symbol("internals");
|
|
638
638
|
function Se(t) {
|
|
@@ -649,10 +649,10 @@ function hn(t) {
|
|
|
649
649
|
return e;
|
|
650
650
|
}
|
|
651
651
|
const mn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
652
|
-
function He(t, e, n, s,
|
|
652
|
+
function He(t, e, n, s, a) {
|
|
653
653
|
if (f.isFunction(s))
|
|
654
654
|
return s.call(this, e, n);
|
|
655
|
-
if (
|
|
655
|
+
if (a && (e = n), !!f.isString(e)) {
|
|
656
656
|
if (f.isString(s))
|
|
657
657
|
return e.indexOf(s) !== -1;
|
|
658
658
|
if (f.isRegExp(s))
|
|
@@ -666,8 +666,8 @@ function yn(t, e) {
|
|
|
666
666
|
const n = f.toCamelCase(" " + e);
|
|
667
667
|
["get", "set", "has"].forEach((s) => {
|
|
668
668
|
Object.defineProperty(t, s + n, {
|
|
669
|
-
value: function(
|
|
670
|
-
return this[s].call(this, e,
|
|
669
|
+
value: function(a, i, o) {
|
|
670
|
+
return this[s].call(this, e, a, i, o);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
@@ -678,15 +678,15 @@ let re = class {
|
|
|
678
678
|
e && this.set(e);
|
|
679
679
|
}
|
|
680
680
|
set(e, n, s) {
|
|
681
|
-
const
|
|
682
|
-
function
|
|
681
|
+
const a = this;
|
|
682
|
+
function i(c, u, x) {
|
|
683
683
|
const d = Se(u);
|
|
684
684
|
if (!d)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const y = f.findKey(
|
|
687
|
-
(!y ||
|
|
686
|
+
const y = f.findKey(a, d);
|
|
687
|
+
(!y || a[y] === void 0 || x === !0 || x === void 0 && a[y] !== !1) && (a[y || u] = Ue(c));
|
|
688
688
|
}
|
|
689
|
-
const o = (c, u) => f.forEach(c, (x, d) =>
|
|
689
|
+
const o = (c, u) => f.forEach(c, (x, d) => i(x, d, u));
|
|
690
690
|
if (f.isPlainObject(e) || e instanceof this.constructor)
|
|
691
691
|
o(e, n);
|
|
692
692
|
else if (f.isString(e) && (e = e.trim()) && !mn(e))
|
|
@@ -700,22 +700,22 @@ let re = class {
|
|
|
700
700
|
}
|
|
701
701
|
o(c, n);
|
|
702
702
|
} else
|
|
703
|
-
e != null &&
|
|
703
|
+
e != null && i(n, e, s);
|
|
704
704
|
return this;
|
|
705
705
|
}
|
|
706
706
|
get(e, n) {
|
|
707
707
|
if (e = Se(e), e) {
|
|
708
708
|
const s = f.findKey(this, e);
|
|
709
709
|
if (s) {
|
|
710
|
-
const
|
|
710
|
+
const a = this[s];
|
|
711
711
|
if (!n)
|
|
712
|
-
return
|
|
712
|
+
return a;
|
|
713
713
|
if (n === !0)
|
|
714
|
-
return hn(
|
|
714
|
+
return hn(a);
|
|
715
715
|
if (f.isFunction(n))
|
|
716
|
-
return n.call(this,
|
|
716
|
+
return n.call(this, a, s);
|
|
717
717
|
if (f.isRegExp(n))
|
|
718
|
-
return n.exec(
|
|
718
|
+
return n.exec(a);
|
|
719
719
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
720
720
|
}
|
|
721
721
|
}
|
|
@@ -729,34 +729,34 @@ let re = class {
|
|
|
729
729
|
}
|
|
730
730
|
delete(e, n) {
|
|
731
731
|
const s = this;
|
|
732
|
-
let
|
|
733
|
-
function
|
|
732
|
+
let a = !1;
|
|
733
|
+
function i(o) {
|
|
734
734
|
if (o = Se(o), o) {
|
|
735
735
|
const c = f.findKey(s, o);
|
|
736
|
-
c && (!n || He(s, s[c], c, n)) && (delete s[c],
|
|
736
|
+
c && (!n || He(s, s[c], c, n)) && (delete s[c], a = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
return f.isArray(e) ? e.forEach(
|
|
739
|
+
return f.isArray(e) ? e.forEach(i) : i(e), a;
|
|
740
740
|
}
|
|
741
741
|
clear(e) {
|
|
742
742
|
const n = Object.keys(this);
|
|
743
|
-
let s = n.length,
|
|
743
|
+
let s = n.length, a = !1;
|
|
744
744
|
for (; s--; ) {
|
|
745
|
-
const
|
|
746
|
-
(!e || He(this, this[
|
|
745
|
+
const i = n[s];
|
|
746
|
+
(!e || He(this, this[i], i, e, !0)) && (delete this[i], a = !0);
|
|
747
747
|
}
|
|
748
|
-
return
|
|
748
|
+
return a;
|
|
749
749
|
}
|
|
750
750
|
normalize(e) {
|
|
751
751
|
const n = this, s = {};
|
|
752
|
-
return f.forEach(this, (
|
|
753
|
-
const o = f.findKey(s,
|
|
752
|
+
return f.forEach(this, (a, i) => {
|
|
753
|
+
const o = f.findKey(s, i);
|
|
754
754
|
if (o) {
|
|
755
|
-
n[o] = Ue(
|
|
755
|
+
n[o] = Ue(a), delete n[i];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const c = e ? gn(
|
|
759
|
-
c !==
|
|
758
|
+
const c = e ? gn(i) : String(i).trim();
|
|
759
|
+
c !== i && delete n[i], n[c] = Ue(a), s[c] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...e) {
|
|
@@ -764,8 +764,8 @@ let re = class {
|
|
|
764
764
|
}
|
|
765
765
|
toJSON(e) {
|
|
766
766
|
const n = /* @__PURE__ */ Object.create(null);
|
|
767
|
-
return f.forEach(this, (s,
|
|
768
|
-
s != null && s !== !1 && (n[
|
|
767
|
+
return f.forEach(this, (s, a) => {
|
|
768
|
+
s != null && s !== !1 && (n[a] = e && f.isArray(s) ? s.join(", ") : s);
|
|
769
769
|
}), n;
|
|
770
770
|
}
|
|
771
771
|
[Symbol.iterator]() {
|
|
@@ -786,17 +786,17 @@ let re = class {
|
|
|
786
786
|
}
|
|
787
787
|
static concat(e, ...n) {
|
|
788
788
|
const s = new this(e);
|
|
789
|
-
return n.forEach((
|
|
789
|
+
return n.forEach((a) => s.set(a)), s;
|
|
790
790
|
}
|
|
791
791
|
static accessor(e) {
|
|
792
792
|
const s = (this[ht] = this[ht] = {
|
|
793
793
|
accessors: {}
|
|
794
|
-
}).accessors,
|
|
795
|
-
function
|
|
794
|
+
}).accessors, a = this.prototype;
|
|
795
|
+
function i(o) {
|
|
796
796
|
const c = Se(o);
|
|
797
|
-
s[c] || (yn(
|
|
797
|
+
s[c] || (yn(a, o), s[c] = !0);
|
|
798
798
|
}
|
|
799
|
-
return f.isArray(e) ? e.forEach(
|
|
799
|
+
return f.isArray(e) ? e.forEach(i) : i(e), this;
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
802
|
re.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -811,11 +811,11 @@ f.reduceDescriptors(re.prototype, ({ value: t }, e) => {
|
|
|
811
811
|
});
|
|
812
812
|
f.freezeMethods(re);
|
|
813
813
|
function Ve(t, e) {
|
|
814
|
-
const n = this ||
|
|
815
|
-
let
|
|
814
|
+
const n = this || Ie, s = e || n, a = re.from(s.headers);
|
|
815
|
+
let i = s.data;
|
|
816
816
|
return f.forEach(t, function(c) {
|
|
817
|
-
|
|
818
|
-
}),
|
|
817
|
+
i = c.call(n, i, a.normalize(), e ? e.status : void 0);
|
|
818
|
+
}), a.normalize(), i;
|
|
819
819
|
}
|
|
820
820
|
function Jt(t) {
|
|
821
821
|
return !!(t && t.__CANCEL__);
|
|
@@ -843,36 +843,36 @@ function bn(t) {
|
|
|
843
843
|
function wn(t, e) {
|
|
844
844
|
t = t || 10;
|
|
845
845
|
const n = new Array(t), s = new Array(t);
|
|
846
|
-
let
|
|
846
|
+
let a = 0, i = 0, o;
|
|
847
847
|
return e = e !== void 0 ? e : 1e3, function(u) {
|
|
848
|
-
const x = Date.now(), d = s[
|
|
849
|
-
o || (o = x), n[
|
|
850
|
-
let y =
|
|
851
|
-
for (; y !==
|
|
848
|
+
const x = Date.now(), d = s[i];
|
|
849
|
+
o || (o = x), n[a] = u, s[a] = x;
|
|
850
|
+
let y = i, k = 0;
|
|
851
|
+
for (; y !== a; )
|
|
852
852
|
k += n[y++], y = y % t;
|
|
853
|
-
if (
|
|
853
|
+
if (a = (a + 1) % t, a === i && (i = (i + 1) % t), x - o < e)
|
|
854
854
|
return;
|
|
855
855
|
const E = d && x - d;
|
|
856
856
|
return E ? Math.round(k * 1e3 / E) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
859
|
function jn(t, e) {
|
|
860
|
-
let n = 0, s = 1e3 / e,
|
|
860
|
+
let n = 0, s = 1e3 / e, a, i;
|
|
861
861
|
const o = (x, d = Date.now()) => {
|
|
862
|
-
n = d,
|
|
862
|
+
n = d, a = null, i && (clearTimeout(i), i = null), t(...x);
|
|
863
863
|
};
|
|
864
864
|
return [(...x) => {
|
|
865
865
|
const d = Date.now(), y = d - n;
|
|
866
|
-
y >= s ? o(x, d) : (
|
|
867
|
-
|
|
866
|
+
y >= s ? o(x, d) : (a = x, i || (i = setTimeout(() => {
|
|
867
|
+
i = null, o(a);
|
|
868
868
|
}, s - y)));
|
|
869
|
-
}, () =>
|
|
869
|
+
}, () => a && o(a)];
|
|
870
870
|
}
|
|
871
871
|
const Ne = (t, e, n = 3) => {
|
|
872
872
|
let s = 0;
|
|
873
|
-
const
|
|
874
|
-
return jn((
|
|
875
|
-
const o =
|
|
873
|
+
const a = wn(50, 250);
|
|
874
|
+
return jn((i) => {
|
|
875
|
+
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, u = o - s, x = a(u), d = o <= c;
|
|
876
876
|
s = o;
|
|
877
877
|
const y = {
|
|
878
878
|
loaded: o,
|
|
@@ -881,7 +881,7 @@ const Ne = (t, e, n = 3) => {
|
|
|
881
881
|
bytes: u,
|
|
882
882
|
rate: x || void 0,
|
|
883
883
|
estimated: x && c && d ? (c - o) / x : void 0,
|
|
884
|
-
event:
|
|
884
|
+
event: i,
|
|
885
885
|
lengthComputable: c != null,
|
|
886
886
|
[e ? "download" : "upload"]: !0
|
|
887
887
|
};
|
|
@@ -900,9 +900,9 @@ const Ne = (t, e, n = 3) => {
|
|
|
900
900
|
) : () => !0, Sn = Q.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(t, e, n, s,
|
|
903
|
+
write(t, e, n, s, a, i) {
|
|
904
904
|
const o = [t + "=" + encodeURIComponent(e)];
|
|
905
|
-
f.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), f.isString(s) && o.push("path=" + s), f.isString(
|
|
905
|
+
f.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), f.isString(s) && o.push("path=" + s), f.isString(a) && o.push("domain=" + a), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
906
906
|
},
|
|
907
907
|
read(t) {
|
|
908
908
|
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
@@ -941,13 +941,13 @@ function me(t, e) {
|
|
|
941
941
|
function s(x, d, y, k) {
|
|
942
942
|
return f.isPlainObject(x) && f.isPlainObject(d) ? f.merge.call({ caseless: k }, x, d) : f.isPlainObject(d) ? f.merge({}, d) : f.isArray(d) ? d.slice() : d;
|
|
943
943
|
}
|
|
944
|
-
function
|
|
944
|
+
function a(x, d, y, k) {
|
|
945
945
|
if (f.isUndefined(d)) {
|
|
946
946
|
if (!f.isUndefined(x))
|
|
947
947
|
return s(void 0, x, y, k);
|
|
948
948
|
} else return s(x, d, y, k);
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function i(x, d) {
|
|
951
951
|
if (!f.isUndefined(d))
|
|
952
952
|
return s(void 0, d);
|
|
953
953
|
}
|
|
@@ -964,9 +964,9 @@ function me(t, e) {
|
|
|
964
964
|
return s(void 0, x);
|
|
965
965
|
}
|
|
966
966
|
const u = {
|
|
967
|
-
url:
|
|
968
|
-
method:
|
|
969
|
-
data:
|
|
967
|
+
url: i,
|
|
968
|
+
method: i,
|
|
969
|
+
data: i,
|
|
970
970
|
baseURL: o,
|
|
971
971
|
transformRequest: o,
|
|
972
972
|
transformResponse: o,
|
|
@@ -992,16 +992,16 @@ function me(t, e) {
|
|
|
992
992
|
socketPath: o,
|
|
993
993
|
responseEncoding: o,
|
|
994
994
|
validateStatus: c,
|
|
995
|
-
headers: (x, d, y) =>
|
|
995
|
+
headers: (x, d, y) => a(yt(x), yt(d), y, !0)
|
|
996
996
|
};
|
|
997
997
|
return f.forEach(Object.keys({ ...t, ...e }), function(d) {
|
|
998
|
-
const y = u[d] ||
|
|
998
|
+
const y = u[d] || a, k = y(t[d], e[d], d);
|
|
999
999
|
f.isUndefined(k) && y !== c || (n[d] = k);
|
|
1000
1000
|
}), n;
|
|
1001
1001
|
}
|
|
1002
1002
|
const Xt = (t) => {
|
|
1003
1003
|
const e = me({}, t);
|
|
1004
|
-
let { data: n, withXSRFToken: s, xsrfHeaderName:
|
|
1004
|
+
let { data: n, withXSRFToken: s, xsrfHeaderName: a, xsrfCookieName: i, headers: o, auth: c } = e;
|
|
1005
1005
|
if (e.headers = o = re.from(o), e.url = Ht(Gt(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), c && o.set(
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
@@ -1016,22 +1016,22 @@ const Xt = (t) => {
|
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
if (Q.hasStandardBrowserEnv && (s && f.isFunction(s) && (s = s(e)), s || s !== !1 && vn(e.url))) {
|
|
1019
|
-
const u =
|
|
1020
|
-
u && o.set(
|
|
1019
|
+
const u = a && i && Sn.read(i);
|
|
1020
|
+
u && o.set(a, u);
|
|
1021
1021
|
}
|
|
1022
1022
|
return e;
|
|
1023
1023
|
}, Cn = typeof XMLHttpRequest < "u", Tn = Cn && function(t) {
|
|
1024
1024
|
return new Promise(function(n, s) {
|
|
1025
|
-
const
|
|
1026
|
-
let
|
|
1027
|
-
const o = re.from(
|
|
1028
|
-
let { responseType: c, onUploadProgress: u, onDownloadProgress: x } =
|
|
1025
|
+
const a = Xt(t);
|
|
1026
|
+
let i = a.data;
|
|
1027
|
+
const o = re.from(a.headers).normalize();
|
|
1028
|
+
let { responseType: c, onUploadProgress: u, onDownloadProgress: x } = a, d, y, k, E, p;
|
|
1029
1029
|
function w() {
|
|
1030
|
-
E && E(), p && p(),
|
|
1030
|
+
E && E(), p && p(), a.cancelToken && a.cancelToken.unsubscribe(d), a.signal && a.signal.removeEventListener("abort", d);
|
|
1031
1031
|
}
|
|
1032
1032
|
let h = new XMLHttpRequest();
|
|
1033
|
-
h.open(
|
|
1034
|
-
function
|
|
1033
|
+
h.open(a.method.toUpperCase(), a.url, !0), h.timeout = a.timeout;
|
|
1034
|
+
function I() {
|
|
1035
1035
|
if (!h)
|
|
1036
1036
|
return;
|
|
1037
1037
|
const g = re.from(
|
|
@@ -1050,54 +1050,54 @@ const Xt = (t) => {
|
|
|
1050
1050
|
s(j), w();
|
|
1051
1051
|
}, N), h = null;
|
|
1052
1052
|
}
|
|
1053
|
-
"onloadend" in h ? h.onloadend =
|
|
1054
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1053
|
+
"onloadend" in h ? h.onloadend = I : h.onreadystatechange = function() {
|
|
1054
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(I);
|
|
1055
1055
|
}, h.onabort = function() {
|
|
1056
1056
|
h && (s(new $("Request aborted", $.ECONNABORTED, t, h)), h = null);
|
|
1057
1057
|
}, h.onerror = function(A) {
|
|
1058
1058
|
const N = A && A.message ? A.message : "Network Error", b = new $(N, $.ERR_NETWORK, t, h);
|
|
1059
1059
|
b.event = A || null, s(b), h = null;
|
|
1060
1060
|
}, h.ontimeout = function() {
|
|
1061
|
-
let A =
|
|
1062
|
-
const N =
|
|
1063
|
-
|
|
1061
|
+
let A = a.timeout ? "timeout of " + a.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
|
+
const N = a.transitional || Vt;
|
|
1063
|
+
a.timeoutErrorMessage && (A = a.timeoutErrorMessage), s(new $(
|
|
1064
1064
|
A,
|
|
1065
1065
|
N.clarifyTimeoutError ? $.ETIMEDOUT : $.ECONNABORTED,
|
|
1066
1066
|
t,
|
|
1067
1067
|
h
|
|
1068
1068
|
)), h = null;
|
|
1069
|
-
},
|
|
1069
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && f.forEach(o.toJSON(), function(A, N) {
|
|
1070
1070
|
h.setRequestHeader(N, A);
|
|
1071
|
-
}), f.isUndefined(
|
|
1071
|
+
}), f.isUndefined(a.withCredentials) || (h.withCredentials = !!a.withCredentials), c && c !== "json" && (h.responseType = a.responseType), x && ([k, p] = Ne(x, !0), h.addEventListener("progress", k)), u && h.upload && ([y, E] = Ne(u), h.upload.addEventListener("progress", y), h.upload.addEventListener("loadend", E)), (a.cancelToken || a.signal) && (d = (g) => {
|
|
1072
1072
|
h && (s(!g || g.type ? new ve(null, t, h) : g), h.abort(), h = null);
|
|
1073
|
-
},
|
|
1074
|
-
const C = bn(
|
|
1073
|
+
}, a.cancelToken && a.cancelToken.subscribe(d), a.signal && (a.signal.aborted ? d() : a.signal.addEventListener("abort", d)));
|
|
1074
|
+
const C = bn(a.url);
|
|
1075
1075
|
if (C && Q.protocols.indexOf(C) === -1) {
|
|
1076
1076
|
s(new $("Unsupported protocol " + C + ":", $.ERR_BAD_REQUEST, t));
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
|
-
h.send(
|
|
1079
|
+
h.send(i || null);
|
|
1080
1080
|
});
|
|
1081
1081
|
}, Rn = (t, e) => {
|
|
1082
1082
|
const { length: n } = t = t ? t.filter(Boolean) : [];
|
|
1083
1083
|
if (e || n) {
|
|
1084
|
-
let s = new AbortController(),
|
|
1085
|
-
const
|
|
1086
|
-
if (!
|
|
1087
|
-
|
|
1084
|
+
let s = new AbortController(), a;
|
|
1085
|
+
const i = function(x) {
|
|
1086
|
+
if (!a) {
|
|
1087
|
+
a = !0, c();
|
|
1088
1088
|
const d = x instanceof Error ? x : this.reason;
|
|
1089
1089
|
s.abort(d instanceof $ ? d : new ve(d instanceof Error ? d.message : d));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
1092
|
let o = e && setTimeout(() => {
|
|
1093
|
-
o = null,
|
|
1093
|
+
o = null, i(new $(`timeout ${e} of ms exceeded`, $.ETIMEDOUT));
|
|
1094
1094
|
}, e);
|
|
1095
1095
|
const c = () => {
|
|
1096
1096
|
t && (o && clearTimeout(o), o = null, t.forEach((x) => {
|
|
1097
|
-
x.unsubscribe ? x.unsubscribe(
|
|
1097
|
+
x.unsubscribe ? x.unsubscribe(i) : x.removeEventListener("abort", i);
|
|
1098
1098
|
}), t = null);
|
|
1099
1099
|
};
|
|
1100
|
-
t.forEach((x) => x.addEventListener("abort",
|
|
1100
|
+
t.forEach((x) => x.addEventListener("abort", i));
|
|
1101
1101
|
const { signal: u } = s;
|
|
1102
1102
|
return u.unsubscribe = () => f.asap(c), u;
|
|
1103
1103
|
}
|
|
@@ -1107,13 +1107,13 @@ const Xt = (t) => {
|
|
|
1107
1107
|
yield t;
|
|
1108
1108
|
return;
|
|
1109
1109
|
}
|
|
1110
|
-
let s = 0,
|
|
1110
|
+
let s = 0, a;
|
|
1111
1111
|
for (; s < n; )
|
|
1112
|
-
|
|
1113
|
-
},
|
|
1114
|
-
for await (const n of
|
|
1112
|
+
a = s + e, yield t.slice(s, a), s = a;
|
|
1113
|
+
}, In = async function* (t, e) {
|
|
1114
|
+
for await (const n of On(t))
|
|
1115
1115
|
yield* Pn(n, e);
|
|
1116
|
-
},
|
|
1116
|
+
}, On = async function* (t) {
|
|
1117
1117
|
if (t[Symbol.asyncIterator]) {
|
|
1118
1118
|
yield* t;
|
|
1119
1119
|
return;
|
|
@@ -1130,21 +1130,21 @@ const Xt = (t) => {
|
|
|
1130
1130
|
await e.cancel();
|
|
1131
1131
|
}
|
|
1132
1132
|
}, bt = (t, e, n, s) => {
|
|
1133
|
-
const
|
|
1134
|
-
let
|
|
1133
|
+
const a = In(t, e);
|
|
1134
|
+
let i = 0, o, c = (u) => {
|
|
1135
1135
|
o || (o = !0, s && s(u));
|
|
1136
1136
|
};
|
|
1137
1137
|
return new ReadableStream({
|
|
1138
1138
|
async pull(u) {
|
|
1139
1139
|
try {
|
|
1140
|
-
const { done: x, value: d } = await
|
|
1140
|
+
const { done: x, value: d } = await a.next();
|
|
1141
1141
|
if (x) {
|
|
1142
1142
|
c(), u.close();
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
1145
|
let y = d.byteLength;
|
|
1146
1146
|
if (n) {
|
|
1147
|
-
let k =
|
|
1147
|
+
let k = i += y;
|
|
1148
1148
|
n(k);
|
|
1149
1149
|
}
|
|
1150
1150
|
u.enqueue(new Uint8Array(d));
|
|
@@ -1153,7 +1153,7 @@ const Xt = (t) => {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
},
|
|
1155
1155
|
cancel(u) {
|
|
1156
|
-
return c(u),
|
|
1156
|
+
return c(u), a.return();
|
|
1157
1157
|
}
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
@@ -1174,10 +1174,10 @@ const Xt = (t) => {
|
|
|
1174
1174
|
t = f.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
1176
|
}, zn, t);
|
|
1177
|
-
const { fetch: e, Request: n, Response: s } = t,
|
|
1178
|
-
if (!
|
|
1177
|
+
const { fetch: e, Request: n, Response: s } = t, a = e ? ze(e) : typeof fetch == "function", i = ze(n), o = ze(s);
|
|
1178
|
+
if (!a)
|
|
1179
1179
|
return !1;
|
|
1180
|
-
const c =
|
|
1180
|
+
const c = a && ze(jt), u = a && (typeof vt == "function" ? /* @__PURE__ */ ((p) => (w) => p.encode(w))(new vt()) : async (p) => new Uint8Array(await new n(p).arrayBuffer())), x = i && c && St(() => {
|
|
1181
1181
|
let p = !1;
|
|
1182
1182
|
const w = new n(Q.origin, {
|
|
1183
1183
|
body: new jt(),
|
|
@@ -1190,11 +1190,11 @@ const Xt = (t) => {
|
|
|
1190
1190
|
}), d = o && c && St(() => f.isReadableStream(new s("").body)), y = {
|
|
1191
1191
|
stream: d && ((p) => p.body)
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1193
|
+
a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
1194
1194
|
!y[p] && (y[p] = (w, h) => {
|
|
1195
|
-
let
|
|
1196
|
-
if (
|
|
1197
|
-
return
|
|
1195
|
+
let I = w && w[p];
|
|
1196
|
+
if (I)
|
|
1197
|
+
return I.call(w);
|
|
1198
1198
|
throw new $(`Response type '${p}' is not supported`, $.ERR_NOT_SUPPORT, h);
|
|
1199
1199
|
});
|
|
1200
1200
|
});
|
|
@@ -1220,7 +1220,7 @@ const Xt = (t) => {
|
|
|
1220
1220
|
let {
|
|
1221
1221
|
url: w,
|
|
1222
1222
|
method: h,
|
|
1223
|
-
data:
|
|
1223
|
+
data: I,
|
|
1224
1224
|
signal: C,
|
|
1225
1225
|
cancelToken: g,
|
|
1226
1226
|
timeout: A,
|
|
@@ -1228,7 +1228,7 @@ const Xt = (t) => {
|
|
|
1228
1228
|
onUploadProgress: b,
|
|
1229
1229
|
responseType: j,
|
|
1230
1230
|
headers: q,
|
|
1231
|
-
withCredentials:
|
|
1231
|
+
withCredentials: O = "same-origin",
|
|
1232
1232
|
fetchOptions: X
|
|
1233
1233
|
} = Xt(p), W = e || fetch;
|
|
1234
1234
|
j = j ? (j + "").toLowerCase() : "text";
|
|
@@ -1238,34 +1238,34 @@ const Xt = (t) => {
|
|
|
1238
1238
|
});
|
|
1239
1239
|
let z;
|
|
1240
1240
|
try {
|
|
1241
|
-
if (b && x && h !== "get" && h !== "head" && (z = await E(q,
|
|
1241
|
+
if (b && x && h !== "get" && h !== "head" && (z = await E(q, I)) !== 0) {
|
|
1242
1242
|
let l = new n(w, {
|
|
1243
1243
|
method: "POST",
|
|
1244
|
-
body:
|
|
1244
|
+
body: I,
|
|
1245
1245
|
duplex: "half"
|
|
1246
1246
|
}), m;
|
|
1247
|
-
if (f.isFormData(
|
|
1247
|
+
if (f.isFormData(I) && (m = l.headers.get("content-type")) && q.setContentType(m), l.body) {
|
|
1248
1248
|
const [S, D] = mt(
|
|
1249
1249
|
z,
|
|
1250
1250
|
Ne(gt(b))
|
|
1251
1251
|
);
|
|
1252
|
-
|
|
1252
|
+
I = bt(l.body, wt, S, D);
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
|
-
f.isString(
|
|
1256
|
-
const M =
|
|
1255
|
+
f.isString(O) || (O = O ? "include" : "omit");
|
|
1256
|
+
const M = i && "credentials" in n.prototype, K = {
|
|
1257
1257
|
...X,
|
|
1258
1258
|
signal: T,
|
|
1259
1259
|
method: h.toUpperCase(),
|
|
1260
1260
|
headers: q.normalize().toJSON(),
|
|
1261
|
-
body:
|
|
1261
|
+
body: I,
|
|
1262
1262
|
duplex: "half",
|
|
1263
|
-
credentials: M ?
|
|
1263
|
+
credentials: M ? O : void 0
|
|
1264
1264
|
};
|
|
1265
|
-
G =
|
|
1266
|
-
let H = await (
|
|
1267
|
-
const
|
|
1268
|
-
if (d && (N ||
|
|
1265
|
+
G = i && new n(w, K);
|
|
1266
|
+
let H = await (i ? W(G, X) : W(w, K));
|
|
1267
|
+
const F = d && (j === "stream" || j === "response");
|
|
1268
|
+
if (d && (N || F && R)) {
|
|
1269
1269
|
const l = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((ne) => {
|
|
1271
1271
|
l[ne] = H[ne];
|
|
@@ -1283,7 +1283,7 @@ const Xt = (t) => {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
j = j || "text";
|
|
1285
1285
|
let Y = await y[f.findKey(y, j) || "text"](H, p);
|
|
1286
|
-
return !
|
|
1286
|
+
return !F && R && R(), await new Promise((l, m) => {
|
|
1287
1287
|
Kt(l, m, {
|
|
1288
1288
|
data: Y,
|
|
1289
1289
|
headers: re.from(H.headers),
|
|
@@ -1304,14 +1304,14 @@ const Xt = (t) => {
|
|
|
1304
1304
|
};
|
|
1305
1305
|
}, _n = /* @__PURE__ */ new Map(), Zt = (t) => {
|
|
1306
1306
|
let e = t ? t.env : {};
|
|
1307
|
-
const { fetch: n, Request: s, Response:
|
|
1307
|
+
const { fetch: n, Request: s, Response: a } = e, i = [
|
|
1308
1308
|
s,
|
|
1309
|
-
|
|
1309
|
+
a,
|
|
1310
1310
|
n
|
|
1311
1311
|
];
|
|
1312
|
-
let o =
|
|
1312
|
+
let o = i.length, c = o, u, x, d = _n;
|
|
1313
1313
|
for (; c--; )
|
|
1314
|
-
u =
|
|
1314
|
+
u = i[c], x = d.get(u), x === void 0 && d.set(u, x = c ? /* @__PURE__ */ new Map() : An(e)), d = x;
|
|
1315
1315
|
return x;
|
|
1316
1316
|
};
|
|
1317
1317
|
Zt();
|
|
@@ -1335,19 +1335,19 @@ const kt = (t) => `- ${t}`, Un = (t) => f.isFunction(t) || t === null || t === !
|
|
|
1335
1335
|
getAdapter: (t, e) => {
|
|
1336
1336
|
t = f.isArray(t) ? t : [t];
|
|
1337
1337
|
const { length: n } = t;
|
|
1338
|
-
let s,
|
|
1339
|
-
const
|
|
1338
|
+
let s, a;
|
|
1339
|
+
const i = {};
|
|
1340
1340
|
for (let o = 0; o < n; o++) {
|
|
1341
1341
|
s = t[o];
|
|
1342
1342
|
let c;
|
|
1343
|
-
if (
|
|
1343
|
+
if (a = s, !Un(s) && (a = Qe[(c = String(s)).toLowerCase()], a === void 0))
|
|
1344
1344
|
throw new $(`Unknown adapter '${c}'`);
|
|
1345
|
-
if (
|
|
1345
|
+
if (a && (f.isFunction(a) || (a = a.get(e))))
|
|
1346
1346
|
break;
|
|
1347
|
-
|
|
1347
|
+
i[c || "#" + o] = a;
|
|
1348
1348
|
}
|
|
1349
|
-
if (!
|
|
1350
|
-
const o = Object.entries(
|
|
1349
|
+
if (!a) {
|
|
1350
|
+
const o = Object.entries(i).map(
|
|
1351
1351
|
([u, x]) => `adapter ${u} ` + (x === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1352
1352
|
);
|
|
1353
1353
|
let c = n ? o.length > 1 ? `since :
|
|
@@ -1358,7 +1358,7 @@ const kt = (t) => `- ${t}`, Un = (t) => f.isFunction(t) || t === null || t === !
|
|
|
1358
1358
|
"ERR_NOT_SUPPORT"
|
|
1359
1359
|
);
|
|
1360
1360
|
}
|
|
1361
|
-
return
|
|
1361
|
+
return a;
|
|
1362
1362
|
},
|
|
1363
1363
|
adapters: Qe
|
|
1364
1364
|
};
|
|
@@ -1370,7 +1370,7 @@ function Et(t) {
|
|
|
1370
1370
|
return Ye(t), t.headers = re.from(t.headers), t.data = Ve.call(
|
|
1371
1371
|
t,
|
|
1372
1372
|
t.transformRequest
|
|
1373
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Qt.getAdapter(t.adapter ||
|
|
1373
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Qt.getAdapter(t.adapter || Ie.adapter, t)(t).then(function(s) {
|
|
1374
1374
|
return Ye(t), s.data = Ve.call(
|
|
1375
1375
|
t,
|
|
1376
1376
|
t.transformResponse,
|
|
@@ -1392,21 +1392,21 @@ const er = "1.12.2", We = {};
|
|
|
1392
1392
|
});
|
|
1393
1393
|
const Ct = {};
|
|
1394
1394
|
We.transitional = function(e, n, s) {
|
|
1395
|
-
function i
|
|
1396
|
-
return "[Axios v" + er + "] Transitional option '" +
|
|
1395
|
+
function a(i, o) {
|
|
1396
|
+
return "[Axios v" + er + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
|
1397
1397
|
}
|
|
1398
|
-
return (
|
|
1398
|
+
return (i, o, c) => {
|
|
1399
1399
|
if (e === !1)
|
|
1400
1400
|
throw new $(
|
|
1401
|
-
|
|
1401
|
+
a(o, " has been removed" + (n ? " in " + n : "")),
|
|
1402
1402
|
$.ERR_DEPRECATED
|
|
1403
1403
|
);
|
|
1404
1404
|
return n && !Ct[o] && (Ct[o] = !0, console.warn(
|
|
1405
|
-
|
|
1405
|
+
a(
|
|
1406
1406
|
o,
|
|
1407
1407
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1408
1408
|
)
|
|
1409
|
-
)), e ? e(
|
|
1409
|
+
)), e ? e(i, o, c) : !0;
|
|
1410
1410
|
};
|
|
1411
1411
|
};
|
|
1412
1412
|
We.spelling = function(e) {
|
|
@@ -1416,17 +1416,17 @@ function $n(t, e, n) {
|
|
|
1416
1416
|
if (typeof t != "object")
|
|
1417
1417
|
throw new $("options must be an object", $.ERR_BAD_OPTION_VALUE);
|
|
1418
1418
|
const s = Object.keys(t);
|
|
1419
|
-
let
|
|
1420
|
-
for (;
|
|
1421
|
-
const
|
|
1419
|
+
let a = s.length;
|
|
1420
|
+
for (; a-- > 0; ) {
|
|
1421
|
+
const i = s[a], o = e[i];
|
|
1422
1422
|
if (o) {
|
|
1423
|
-
const c = t[
|
|
1423
|
+
const c = t[i], u = c === void 0 || o(c, i, t);
|
|
1424
1424
|
if (u !== !0)
|
|
1425
|
-
throw new $("option " +
|
|
1425
|
+
throw new $("option " + i + " must be " + u, $.ERR_BAD_OPTION_VALUE);
|
|
1426
1426
|
continue;
|
|
1427
1427
|
}
|
|
1428
1428
|
if (n !== !0)
|
|
1429
|
-
throw new $("Unknown option " +
|
|
1429
|
+
throw new $("Unknown option " + i, $.ERR_BAD_OPTION);
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
const $e = {
|
|
@@ -1453,12 +1453,12 @@ let he = class {
|
|
|
1453
1453
|
return await this._request(e, n);
|
|
1454
1454
|
} catch (s) {
|
|
1455
1455
|
if (s instanceof Error) {
|
|
1456
|
-
let
|
|
1457
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1458
|
-
const
|
|
1456
|
+
let a = {};
|
|
1457
|
+
Error.captureStackTrace ? Error.captureStackTrace(a) : a = new Error();
|
|
1458
|
+
const i = a.stack ? a.stack.replace(/^.+\n/, "") : "";
|
|
1459
1459
|
try {
|
|
1460
|
-
s.stack ?
|
|
1461
|
-
` +
|
|
1460
|
+
s.stack ? i && !String(s.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1461
|
+
` + i) : s.stack = i;
|
|
1462
1462
|
} catch {
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
@@ -1467,30 +1467,30 @@ let he = class {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
_request(e, n) {
|
|
1469
1469
|
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = me(this.defaults, n);
|
|
1470
|
-
const { transitional: s, paramsSerializer:
|
|
1470
|
+
const { transitional: s, paramsSerializer: a, headers: i } = n;
|
|
1471
1471
|
s !== void 0 && $e.assertOptions(s, {
|
|
1472
1472
|
silentJSONParsing: ce.transitional(ce.boolean),
|
|
1473
1473
|
forcedJSONParsing: ce.transitional(ce.boolean),
|
|
1474
1474
|
clarifyTimeoutError: ce.transitional(ce.boolean)
|
|
1475
|
-
}, !1),
|
|
1476
|
-
serialize:
|
|
1477
|
-
} : $e.assertOptions(
|
|
1475
|
+
}, !1), a != null && (f.isFunction(a) ? n.paramsSerializer = {
|
|
1476
|
+
serialize: a
|
|
1477
|
+
} : $e.assertOptions(a, {
|
|
1478
1478
|
encode: ce.function,
|
|
1479
1479
|
serialize: ce.function
|
|
1480
1480
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), $e.assertOptions(n, {
|
|
1481
1481
|
baseUrl: ce.spelling("baseURL"),
|
|
1482
1482
|
withXsrfToken: ce.spelling("withXSRFToken")
|
|
1483
1483
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1484
|
-
let o =
|
|
1485
|
-
|
|
1486
|
-
|
|
1484
|
+
let o = i && f.merge(
|
|
1485
|
+
i.common,
|
|
1486
|
+
i[n.method]
|
|
1487
1487
|
);
|
|
1488
|
-
|
|
1488
|
+
i && f.forEach(
|
|
1489
1489
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1490
1490
|
(p) => {
|
|
1491
|
-
delete
|
|
1491
|
+
delete i[p];
|
|
1492
1492
|
}
|
|
1493
|
-
), n.headers = re.concat(o,
|
|
1493
|
+
), n.headers = re.concat(o, i);
|
|
1494
1494
|
const c = [];
|
|
1495
1495
|
let u = !0;
|
|
1496
1496
|
this.interceptors.request.forEach(function(w) {
|
|
@@ -1544,13 +1544,13 @@ f.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1544
1544
|
});
|
|
1545
1545
|
f.forEach(["post", "put", "patch"], function(e) {
|
|
1546
1546
|
function n(s) {
|
|
1547
|
-
return function(
|
|
1547
|
+
return function(i, o, c) {
|
|
1548
1548
|
return this.request(me(c || {}, {
|
|
1549
1549
|
method: e,
|
|
1550
1550
|
headers: s ? {
|
|
1551
1551
|
"Content-Type": "multipart/form-data"
|
|
1552
1552
|
} : {},
|
|
1553
|
-
url:
|
|
1553
|
+
url: i,
|
|
1554
1554
|
data: o
|
|
1555
1555
|
}));
|
|
1556
1556
|
};
|
|
@@ -1562,26 +1562,26 @@ let Dn = class tr {
|
|
|
1562
1562
|
if (typeof e != "function")
|
|
1563
1563
|
throw new TypeError("executor must be a function.");
|
|
1564
1564
|
let n;
|
|
1565
|
-
this.promise = new Promise(function(
|
|
1566
|
-
n =
|
|
1565
|
+
this.promise = new Promise(function(i) {
|
|
1566
|
+
n = i;
|
|
1567
1567
|
});
|
|
1568
1568
|
const s = this;
|
|
1569
|
-
this.promise.then((
|
|
1569
|
+
this.promise.then((a) => {
|
|
1570
1570
|
if (!s._listeners) return;
|
|
1571
|
-
let
|
|
1572
|
-
for (;
|
|
1573
|
-
s._listeners[
|
|
1571
|
+
let i = s._listeners.length;
|
|
1572
|
+
for (; i-- > 0; )
|
|
1573
|
+
s._listeners[i](a);
|
|
1574
1574
|
s._listeners = null;
|
|
1575
|
-
}), this.promise.then = (
|
|
1576
|
-
let
|
|
1575
|
+
}), this.promise.then = (a) => {
|
|
1576
|
+
let i;
|
|
1577
1577
|
const o = new Promise((c) => {
|
|
1578
|
-
s.subscribe(c),
|
|
1579
|
-
}).then(
|
|
1578
|
+
s.subscribe(c), i = c;
|
|
1579
|
+
}).then(a);
|
|
1580
1580
|
return o.cancel = function() {
|
|
1581
|
-
s.unsubscribe(
|
|
1581
|
+
s.unsubscribe(i);
|
|
1582
1582
|
}, o;
|
|
1583
|
-
}, e(function(
|
|
1584
|
-
s.reason || (s.reason = new ve(
|
|
1583
|
+
}, e(function(i, o, c) {
|
|
1584
|
+
s.reason || (s.reason = new ve(i, o, c), n(s.reason));
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
1587
|
/**
|
|
@@ -1623,8 +1623,8 @@ let Dn = class tr {
|
|
|
1623
1623
|
static source() {
|
|
1624
1624
|
let e;
|
|
1625
1625
|
return {
|
|
1626
|
-
token: new tr(function(
|
|
1627
|
-
e =
|
|
1626
|
+
token: new tr(function(a) {
|
|
1627
|
+
e = a;
|
|
1628
1628
|
}),
|
|
1629
1629
|
cancel: e
|
|
1630
1630
|
};
|
|
@@ -1635,7 +1635,7 @@ function Nn(t) {
|
|
|
1635
1635
|
return t.apply(null, n);
|
|
1636
1636
|
};
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1638
|
+
function Fn(t) {
|
|
1639
1639
|
return f.isObject(t) && t.isAxiosError === !0;
|
|
1640
1640
|
}
|
|
1641
1641
|
const et = {
|
|
@@ -1708,11 +1708,11 @@ Object.entries(et).forEach(([t, e]) => {
|
|
|
1708
1708
|
});
|
|
1709
1709
|
function rr(t) {
|
|
1710
1710
|
const e = new he(t), n = At(he.prototype.request, e);
|
|
1711
|
-
return f.extend(n, he.prototype, e, { allOwnKeys: !0 }), f.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(
|
|
1712
|
-
return rr(me(t,
|
|
1711
|
+
return f.extend(n, he.prototype, e, { allOwnKeys: !0 }), f.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(a) {
|
|
1712
|
+
return rr(me(t, a));
|
|
1713
1713
|
}, n;
|
|
1714
1714
|
}
|
|
1715
|
-
const J = rr(
|
|
1715
|
+
const J = rr(Ie);
|
|
1716
1716
|
J.Axios = he;
|
|
1717
1717
|
J.CanceledError = ve;
|
|
1718
1718
|
J.CancelToken = Dn;
|
|
@@ -1725,7 +1725,7 @@ J.all = function(e) {
|
|
|
1725
1725
|
return Promise.all(e);
|
|
1726
1726
|
};
|
|
1727
1727
|
J.spread = Nn;
|
|
1728
|
-
J.isAxiosError =
|
|
1728
|
+
J.isAxiosError = Fn;
|
|
1729
1729
|
J.mergeConfig = me;
|
|
1730
1730
|
J.AxiosHeaders = re;
|
|
1731
1731
|
J.formToJSON = (t) => Yt(f.isHTMLForm(t) ? new FormData(t) : t);
|
|
@@ -1741,16 +1741,16 @@ const {
|
|
|
1741
1741
|
VERSION: Xs,
|
|
1742
1742
|
all: Zs,
|
|
1743
1743
|
Cancel: Qs,
|
|
1744
|
-
isAxiosError:
|
|
1745
|
-
spread:
|
|
1746
|
-
toFormData:
|
|
1747
|
-
AxiosHeaders:
|
|
1748
|
-
HttpStatusCode:
|
|
1749
|
-
formToJSON:
|
|
1750
|
-
getAdapter:
|
|
1751
|
-
mergeConfig:
|
|
1744
|
+
isAxiosError: ea,
|
|
1745
|
+
spread: ta,
|
|
1746
|
+
toFormData: ra,
|
|
1747
|
+
AxiosHeaders: na,
|
|
1748
|
+
HttpStatusCode: sa,
|
|
1749
|
+
formToJSON: aa,
|
|
1750
|
+
getAdapter: ia,
|
|
1751
|
+
mergeConfig: oa
|
|
1752
1752
|
} = J;
|
|
1753
|
-
class
|
|
1753
|
+
class la {
|
|
1754
1754
|
baseUrl;
|
|
1755
1755
|
apiKey;
|
|
1756
1756
|
appId;
|
|
@@ -1781,7 +1781,7 @@ class li {
|
|
|
1781
1781
|
* @param data Optional request body
|
|
1782
1782
|
* @param extraHeaders Optional custom headers
|
|
1783
1783
|
*/
|
|
1784
|
-
async request(e, n, s,
|
|
1784
|
+
async request(e, n, s, a = {}, i = !1) {
|
|
1785
1785
|
try {
|
|
1786
1786
|
const o = {
|
|
1787
1787
|
...this.appId ? { appId: this.appId } : {},
|
|
@@ -1791,8 +1791,8 @@ class li {
|
|
|
1791
1791
|
url: n,
|
|
1792
1792
|
method: e,
|
|
1793
1793
|
data: o,
|
|
1794
|
-
headers:
|
|
1795
|
-
withCredentials:
|
|
1794
|
+
headers: a,
|
|
1795
|
+
withCredentials: i
|
|
1796
1796
|
// 👈 override axios default
|
|
1797
1797
|
})).data;
|
|
1798
1798
|
} catch (o) {
|
|
@@ -1808,8 +1808,8 @@ class li {
|
|
|
1808
1808
|
* @param params user details
|
|
1809
1809
|
*/
|
|
1810
1810
|
async signupUser(e) {
|
|
1811
|
-
const { name: n, email: s, password:
|
|
1812
|
-
if (!n || !s || !
|
|
1811
|
+
const { name: n, email: s, password: a } = e;
|
|
1812
|
+
if (!n || !s || !a)
|
|
1813
1813
|
throw new Error("signup: 'name', 'email', and 'password' are required");
|
|
1814
1814
|
return await this.request("POST", "/users/signup", e, {}, !0);
|
|
1815
1815
|
}
|
|
@@ -1829,8 +1829,8 @@ class li {
|
|
|
1829
1829
|
{},
|
|
1830
1830
|
!0
|
|
1831
1831
|
);
|
|
1832
|
-
} catch (
|
|
1833
|
-
throw new Error(
|
|
1832
|
+
} catch (a) {
|
|
1833
|
+
throw new Error(a.message || "Login failed due to an unknown error");
|
|
1834
1834
|
}
|
|
1835
1835
|
}
|
|
1836
1836
|
/**
|
|
@@ -1856,16 +1856,16 @@ class li {
|
|
|
1856
1856
|
* @param params requires userId, currentPassword, newPassword
|
|
1857
1857
|
*/
|
|
1858
1858
|
async changePassword(e) {
|
|
1859
|
-
const { userId: n, currentPassword: s, newPassword:
|
|
1859
|
+
const { userId: n, currentPassword: s, newPassword: a } = e;
|
|
1860
1860
|
if (!n) throw new Error("changePassword: 'userId' is required");
|
|
1861
|
-
if (!s || !
|
|
1861
|
+
if (!s || !a)
|
|
1862
1862
|
throw new Error(
|
|
1863
1863
|
"changePassword: both 'currentPassword' and 'newPassword' are required"
|
|
1864
1864
|
);
|
|
1865
1865
|
return await this.request(
|
|
1866
1866
|
"PUT",
|
|
1867
1867
|
`/users/change-password/${n}`,
|
|
1868
|
-
{ currentPassword: s, newPassword:
|
|
1868
|
+
{ currentPassword: s, newPassword: a },
|
|
1869
1869
|
{},
|
|
1870
1870
|
!0
|
|
1871
1871
|
);
|
|
@@ -1894,10 +1894,10 @@ class li {
|
|
|
1894
1894
|
{},
|
|
1895
1895
|
!0
|
|
1896
1896
|
);
|
|
1897
|
-
} catch (
|
|
1898
|
-
throw console.error("requestEmailVerificationOTP Error:",
|
|
1899
|
-
message:
|
|
1900
|
-
status:
|
|
1897
|
+
} catch (a) {
|
|
1898
|
+
throw console.error("requestEmailVerificationOTP Error:", a), {
|
|
1899
|
+
message: a?.message || "Failed to send verification OTP",
|
|
1900
|
+
status: a?.status || 500
|
|
1901
1901
|
};
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
@@ -1917,10 +1917,10 @@ class li {
|
|
|
1917
1917
|
{},
|
|
1918
1918
|
!0
|
|
1919
1919
|
);
|
|
1920
|
-
} catch (
|
|
1920
|
+
} catch (a) {
|
|
1921
1921
|
throw {
|
|
1922
|
-
message:
|
|
1923
|
-
status:
|
|
1922
|
+
message: a.message || "Failed to verify email",
|
|
1923
|
+
status: a.status || 500
|
|
1924
1924
|
};
|
|
1925
1925
|
}
|
|
1926
1926
|
}
|
|
@@ -2007,15 +2007,15 @@ class li {
|
|
|
2007
2007
|
* @param params requires email, otp, newPassword
|
|
2008
2008
|
*/
|
|
2009
2009
|
async resetUserPassword(e) {
|
|
2010
|
-
const { email: n, otp: s, newPassword:
|
|
2011
|
-
if (!n || !s || !
|
|
2010
|
+
const { email: n, otp: s, newPassword: a } = e;
|
|
2011
|
+
if (!n || !s || !a)
|
|
2012
2012
|
throw new Error(
|
|
2013
2013
|
"resetPassword: 'email', 'otp' and 'newPassword' are required"
|
|
2014
2014
|
);
|
|
2015
2015
|
return await this.request("POST", "/users/reset-password", {
|
|
2016
2016
|
email: n,
|
|
2017
2017
|
otp: s,
|
|
2018
|
-
newPassword:
|
|
2018
|
+
newPassword: a
|
|
2019
2019
|
});
|
|
2020
2020
|
}
|
|
2021
2021
|
/**
|
|
@@ -2035,10 +2035,10 @@ class li {
|
|
|
2035
2035
|
async searchUserData(e) {
|
|
2036
2036
|
const { userId: n, ...s } = e;
|
|
2037
2037
|
if (!n) throw new Error("userId required");
|
|
2038
|
-
const
|
|
2038
|
+
const a = new URLSearchParams(s).toString();
|
|
2039
2039
|
return await this.request(
|
|
2040
2040
|
"GET",
|
|
2041
|
-
`/users/${n}/data/search?${
|
|
2041
|
+
`/users/${n}/data/search?${a}`,
|
|
2042
2042
|
void 0,
|
|
2043
2043
|
{},
|
|
2044
2044
|
!1
|
|
@@ -2060,15 +2060,15 @@ class li {
|
|
|
2060
2060
|
const { userId: n, ...s } = e;
|
|
2061
2061
|
if (!n)
|
|
2062
2062
|
throw new Error("searchUserDataByKeys: 'userId' is required");
|
|
2063
|
-
const
|
|
2063
|
+
const a = new URLSearchParams(
|
|
2064
2064
|
Object.entries(s).reduce(
|
|
2065
|
-
(
|
|
2065
|
+
(i, [o, c]) => (c != null && (i[o] = String(c)), i),
|
|
2066
2066
|
{}
|
|
2067
2067
|
)
|
|
2068
2068
|
).toString();
|
|
2069
2069
|
return await this.request(
|
|
2070
2070
|
"GET",
|
|
2071
|
-
`/users/${n}/data/searchbyref?${
|
|
2071
|
+
`/users/${n}/data/searchbyref?${a}`,
|
|
2072
2072
|
void 0,
|
|
2073
2073
|
{},
|
|
2074
2074
|
!1
|
|
@@ -2113,17 +2113,17 @@ class li {
|
|
|
2113
2113
|
* @param params requires userId and data object
|
|
2114
2114
|
*/
|
|
2115
2115
|
async addUserData(e) {
|
|
2116
|
-
const { userId: n, dataCategory: s, data:
|
|
2116
|
+
const { userId: n, dataCategory: s, data: a } = e;
|
|
2117
2117
|
if (!n) throw new Error("addUserData: 'userId' is required");
|
|
2118
2118
|
if (!s)
|
|
2119
2119
|
throw new Error("addUserData: 'dataCategory' is required");
|
|
2120
|
-
if (!
|
|
2120
|
+
if (!a) throw new Error("addUserData: 'data' is required");
|
|
2121
2121
|
return await this.request(
|
|
2122
2122
|
"POST",
|
|
2123
2123
|
`/users/${n}/data`,
|
|
2124
2124
|
{
|
|
2125
2125
|
dataCategory: s,
|
|
2126
|
-
...
|
|
2126
|
+
...a
|
|
2127
2127
|
},
|
|
2128
2128
|
{},
|
|
2129
2129
|
!1
|
|
@@ -2135,14 +2135,14 @@ class li {
|
|
|
2135
2135
|
* @param params requires userId, dataId, and updated fields
|
|
2136
2136
|
*/
|
|
2137
2137
|
async updateUserData(e) {
|
|
2138
|
-
const { userId: n, dataId: s, data:
|
|
2138
|
+
const { userId: n, dataId: s, data: a } = e;
|
|
2139
2139
|
if (!n || !s)
|
|
2140
2140
|
throw new Error("updateUserData: 'userId' and 'dataId' are required");
|
|
2141
|
-
if (!
|
|
2141
|
+
if (!a) throw new Error("updateUserData: 'data' is required");
|
|
2142
2142
|
return await this.request(
|
|
2143
2143
|
"PUT",
|
|
2144
2144
|
`/users/${n}/data/${s}`,
|
|
2145
|
-
|
|
2145
|
+
a,
|
|
2146
2146
|
{},
|
|
2147
2147
|
!1
|
|
2148
2148
|
// 👈 no credentials
|
|
@@ -2165,6 +2165,25 @@ class li {
|
|
|
2165
2165
|
// 👈 no credentials
|
|
2166
2166
|
);
|
|
2167
2167
|
}
|
|
2168
|
+
/**
|
|
2169
|
+
* Search all users' data by category from a specific app
|
|
2170
|
+
* @param params requires appId and category
|
|
2171
|
+
*/
|
|
2172
|
+
async searchAllUsersDataFromApp(e) {
|
|
2173
|
+
const { dataCategory: n } = e, s = this.appId;
|
|
2174
|
+
if (!s)
|
|
2175
|
+
throw new Error("searchAllUsersDataFromApp: 'appId' is required");
|
|
2176
|
+
if (!n)
|
|
2177
|
+
throw new Error("searchAllUsersDataFromApp: 'category' is required");
|
|
2178
|
+
return await this.request(
|
|
2179
|
+
"GET",
|
|
2180
|
+
`/users/app/${encodeURIComponent(s)}/category/${encodeURIComponent(n)}`,
|
|
2181
|
+
void 0,
|
|
2182
|
+
{},
|
|
2183
|
+
!1
|
|
2184
|
+
// 👈 no credentials
|
|
2185
|
+
);
|
|
2186
|
+
}
|
|
2168
2187
|
// ================= APP DATA =================
|
|
2169
2188
|
/**
|
|
2170
2189
|
* Get all app data items for the current app
|
|
@@ -2221,15 +2240,15 @@ class li {
|
|
|
2221
2240
|
async addAppData(e) {
|
|
2222
2241
|
const n = this.appId;
|
|
2223
2242
|
if (!n) throw new Error("addAppData: 'appId' is required");
|
|
2224
|
-
const { dataCategory: s, data:
|
|
2243
|
+
const { dataCategory: s, data: a } = e;
|
|
2225
2244
|
if (!s)
|
|
2226
2245
|
throw new Error("addAppData: 'dataCategory' is required");
|
|
2227
|
-
if (!
|
|
2246
|
+
if (!a || typeof a != "object")
|
|
2228
2247
|
throw new Error("addAppData: 'data' is required");
|
|
2229
2248
|
return await this.request(
|
|
2230
2249
|
"POST",
|
|
2231
2250
|
`/app/${n}/data/${encodeURIComponent(s)}`,
|
|
2232
|
-
{ item:
|
|
2251
|
+
{ item: a },
|
|
2233
2252
|
{},
|
|
2234
2253
|
!1
|
|
2235
2254
|
);
|
|
@@ -2277,23 +2296,23 @@ var Ae = { exports: {} }, ke = {};
|
|
|
2277
2296
|
* LICENSE file in the root directory of this source tree.
|
|
2278
2297
|
*/
|
|
2279
2298
|
var Tt;
|
|
2280
|
-
function
|
|
2299
|
+
function Ln() {
|
|
2281
2300
|
if (Tt) return ke;
|
|
2282
2301
|
Tt = 1;
|
|
2283
2302
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
2284
|
-
function n(s,
|
|
2303
|
+
function n(s, a, i) {
|
|
2285
2304
|
var o = null;
|
|
2286
|
-
if (
|
|
2287
|
-
|
|
2288
|
-
for (var c in
|
|
2289
|
-
c !== "key" && (
|
|
2290
|
-
} else
|
|
2291
|
-
return
|
|
2305
|
+
if (i !== void 0 && (o = "" + i), a.key !== void 0 && (o = "" + a.key), "key" in a) {
|
|
2306
|
+
i = {};
|
|
2307
|
+
for (var c in a)
|
|
2308
|
+
c !== "key" && (i[c] = a[c]);
|
|
2309
|
+
} else i = a;
|
|
2310
|
+
return a = i.ref, {
|
|
2292
2311
|
$$typeof: t,
|
|
2293
2312
|
type: s,
|
|
2294
2313
|
key: o,
|
|
2295
|
-
ref:
|
|
2296
|
-
props:
|
|
2314
|
+
ref: a !== void 0 ? a : null,
|
|
2315
|
+
props: i
|
|
2297
2316
|
};
|
|
2298
2317
|
}
|
|
2299
2318
|
return ke.Fragment = e, ke.jsx = n, ke.jsxs = n, ke;
|
|
@@ -2321,7 +2340,7 @@ function qn() {
|
|
|
2321
2340
|
return "Fragment";
|
|
2322
2341
|
case C:
|
|
2323
2342
|
return "Profiler";
|
|
2324
|
-
case
|
|
2343
|
+
case I:
|
|
2325
2344
|
return "StrictMode";
|
|
2326
2345
|
case b:
|
|
2327
2346
|
return "Suspense";
|
|
@@ -2345,7 +2364,7 @@ function qn() {
|
|
|
2345
2364
|
return l = l.displayName, l || (l = m.displayName || m.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
2346
2365
|
case q:
|
|
2347
2366
|
return m = l.displayName || null, m !== null ? m : t(l.type) || "Memo";
|
|
2348
|
-
case
|
|
2367
|
+
case O:
|
|
2349
2368
|
m = l._payload, l = l._init;
|
|
2350
2369
|
try {
|
|
2351
2370
|
return t(l(m));
|
|
@@ -2376,7 +2395,7 @@ function qn() {
|
|
|
2376
2395
|
}
|
|
2377
2396
|
function s(l) {
|
|
2378
2397
|
if (l === h) return "<>";
|
|
2379
|
-
if (typeof l == "object" && l !== null && l.$$typeof ===
|
|
2398
|
+
if (typeof l == "object" && l !== null && l.$$typeof === O)
|
|
2380
2399
|
return "<...>";
|
|
2381
2400
|
try {
|
|
2382
2401
|
var m = t(l);
|
|
@@ -2385,11 +2404,11 @@ function qn() {
|
|
|
2385
2404
|
return "<...>";
|
|
2386
2405
|
}
|
|
2387
2406
|
}
|
|
2388
|
-
function
|
|
2407
|
+
function a() {
|
|
2389
2408
|
var l = T.A;
|
|
2390
2409
|
return l === null ? null : l.getOwner();
|
|
2391
2410
|
}
|
|
2392
|
-
function
|
|
2411
|
+
function i() {
|
|
2393
2412
|
return Error("react-stack-top-frame");
|
|
2394
2413
|
}
|
|
2395
2414
|
function o(l) {
|
|
@@ -2493,18 +2512,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2493
2512
|
l,
|
|
2494
2513
|
B,
|
|
2495
2514
|
S,
|
|
2496
|
-
|
|
2515
|
+
a(),
|
|
2497
2516
|
ne,
|
|
2498
2517
|
oe
|
|
2499
2518
|
);
|
|
2500
2519
|
}
|
|
2501
2520
|
function y(l) {
|
|
2502
|
-
k(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof ===
|
|
2521
|
+
k(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === O && (l._payload.status === "fulfilled" ? k(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
|
|
2503
2522
|
}
|
|
2504
2523
|
function k(l) {
|
|
2505
2524
|
return typeof l == "object" && l !== null && l.$$typeof === p;
|
|
2506
2525
|
}
|
|
2507
|
-
var E = Ce, p = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), h = Symbol.for("react.fragment"),
|
|
2526
|
+
var E = Ce, p = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), A = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), q = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), X = Symbol.for("react.activity"), W = Symbol.for("react.client.reference"), T = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, G = Object.prototype.hasOwnProperty, R = Array.isArray, z = console.createTask ? console.createTask : function() {
|
|
2508
2527
|
return null;
|
|
2509
2528
|
};
|
|
2510
2529
|
E = {
|
|
@@ -2514,8 +2533,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2514
2533
|
};
|
|
2515
2534
|
var M, K = {}, H = E.react_stack_bottom_frame.bind(
|
|
2516
2535
|
E,
|
|
2517
|
-
|
|
2518
|
-
)(),
|
|
2536
|
+
i
|
|
2537
|
+
)(), F = z(s(i)), Y = {};
|
|
2519
2538
|
Ee.Fragment = h, Ee.jsx = function(l, m, S) {
|
|
2520
2539
|
var D = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
2521
2540
|
return d(
|
|
@@ -2524,7 +2543,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2524
2543
|
S,
|
|
2525
2544
|
!1,
|
|
2526
2545
|
D ? Error("react-stack-top-frame") : H,
|
|
2527
|
-
D ? z(s(l)) :
|
|
2546
|
+
D ? z(s(l)) : F
|
|
2528
2547
|
);
|
|
2529
2548
|
}, Ee.jsxs = function(l, m, S) {
|
|
2530
2549
|
var D = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
@@ -2534,14 +2553,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2534
2553
|
S,
|
|
2535
2554
|
!0,
|
|
2536
2555
|
D ? Error("react-stack-top-frame") : H,
|
|
2537
|
-
D ? z(s(l)) :
|
|
2556
|
+
D ? z(s(l)) : F
|
|
2538
2557
|
);
|
|
2539
2558
|
};
|
|
2540
2559
|
})()), Ee;
|
|
2541
2560
|
}
|
|
2542
2561
|
var Pt;
|
|
2543
2562
|
function Mn() {
|
|
2544
|
-
return Pt || (Pt = 1, process.env.NODE_ENV === "production" ? Ae.exports =
|
|
2563
|
+
return Pt || (Pt = 1, process.env.NODE_ENV === "production" ? Ae.exports = Ln() : Ae.exports = qn()), Ae.exports;
|
|
2545
2564
|
}
|
|
2546
2565
|
var r = Mn();
|
|
2547
2566
|
/**
|
|
@@ -2553,7 +2572,7 @@ var r = Mn();
|
|
|
2553
2572
|
const Wn = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Bn = (t) => t.replace(
|
|
2554
2573
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2555
2574
|
(e, n, s) => s ? s.toUpperCase() : n.toLowerCase()
|
|
2556
|
-
),
|
|
2575
|
+
), It = (t) => {
|
|
2557
2576
|
const e = Bn(t);
|
|
2558
2577
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2559
2578
|
}, nr = (...t) => t.filter((e, n, s) => !!e && e.trim() !== "" && s.indexOf(e) === n).join(" ").trim(), Hn = (t) => {
|
|
@@ -2590,8 +2609,8 @@ const Yn = zt(
|
|
|
2590
2609
|
size: e = 24,
|
|
2591
2610
|
strokeWidth: n = 2,
|
|
2592
2611
|
absoluteStrokeWidth: s,
|
|
2593
|
-
className:
|
|
2594
|
-
children:
|
|
2612
|
+
className: a = "",
|
|
2613
|
+
children: i,
|
|
2595
2614
|
iconNode: o,
|
|
2596
2615
|
...c
|
|
2597
2616
|
}, u) => Ke(
|
|
@@ -2603,13 +2622,13 @@ const Yn = zt(
|
|
|
2603
2622
|
height: e,
|
|
2604
2623
|
stroke: t,
|
|
2605
2624
|
strokeWidth: s ? Number(n) * 24 / Number(e) : n,
|
|
2606
|
-
className: nr("lucide",
|
|
2607
|
-
...!
|
|
2625
|
+
className: nr("lucide", a),
|
|
2626
|
+
...!i && !Hn(c) && { "aria-hidden": "true" },
|
|
2608
2627
|
...c
|
|
2609
2628
|
},
|
|
2610
2629
|
[
|
|
2611
2630
|
...o.map(([x, d]) => Ke(x, d)),
|
|
2612
|
-
...Array.isArray(
|
|
2631
|
+
...Array.isArray(i) ? i : [i]
|
|
2613
2632
|
]
|
|
2614
2633
|
)
|
|
2615
2634
|
);
|
|
@@ -2619,20 +2638,20 @@ const Yn = zt(
|
|
|
2619
2638
|
* This source code is licensed under the ISC license.
|
|
2620
2639
|
* See the LICENSE file in the root directory of this source tree.
|
|
2621
2640
|
*/
|
|
2622
|
-
const
|
|
2641
|
+
const L = (t, e) => {
|
|
2623
2642
|
const n = zt(
|
|
2624
|
-
({ className: s, ...
|
|
2625
|
-
ref:
|
|
2643
|
+
({ className: s, ...a }, i) => Ke(Yn, {
|
|
2644
|
+
ref: i,
|
|
2626
2645
|
iconNode: e,
|
|
2627
2646
|
className: nr(
|
|
2628
|
-
`lucide-${Wn(
|
|
2647
|
+
`lucide-${Wn(It(t))}`,
|
|
2629
2648
|
`lucide-${t}`,
|
|
2630
2649
|
s
|
|
2631
2650
|
),
|
|
2632
|
-
...
|
|
2651
|
+
...a
|
|
2633
2652
|
})
|
|
2634
2653
|
);
|
|
2635
|
-
return n.displayName =
|
|
2654
|
+
return n.displayName = It(t), n;
|
|
2636
2655
|
};
|
|
2637
2656
|
/**
|
|
2638
2657
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -2649,7 +2668,7 @@ const Jn = [
|
|
|
2649
2668
|
}
|
|
2650
2669
|
],
|
|
2651
2670
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2652
|
-
], Kn =
|
|
2671
|
+
], Kn = L("badge-check", Jn);
|
|
2653
2672
|
/**
|
|
2654
2673
|
* @license lucide-react v0.544.0 - ISC
|
|
2655
2674
|
*
|
|
@@ -2665,14 +2684,14 @@ const Gn = [
|
|
|
2665
2684
|
}
|
|
2666
2685
|
],
|
|
2667
2686
|
["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
|
|
2668
|
-
], tt =
|
|
2687
|
+
], tt = L("camera", Gn);
|
|
2669
2688
|
/**
|
|
2670
2689
|
* @license lucide-react v0.544.0 - ISC
|
|
2671
2690
|
*
|
|
2672
2691
|
* This source code is licensed under the ISC license.
|
|
2673
2692
|
* See the LICENSE file in the root directory of this source tree.
|
|
2674
2693
|
*/
|
|
2675
|
-
const Xn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Zn =
|
|
2694
|
+
const Xn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Zn = L("chevron-down", Xn);
|
|
2676
2695
|
/**
|
|
2677
2696
|
* @license lucide-react v0.544.0 - ISC
|
|
2678
2697
|
*
|
|
@@ -2683,7 +2702,7 @@ const Qn = [
|
|
|
2683
2702
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2684
2703
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
2685
2704
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
2686
|
-
], se =
|
|
2705
|
+
], se = L("circle-alert", Qn);
|
|
2687
2706
|
/**
|
|
2688
2707
|
* @license lucide-react v0.544.0 - ISC
|
|
2689
2708
|
*
|
|
@@ -2693,7 +2712,7 @@ const Qn = [
|
|
|
2693
2712
|
const es = [
|
|
2694
2713
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
2695
2714
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
2696
|
-
], ue =
|
|
2715
|
+
], ue = L("circle-check-big", es);
|
|
2697
2716
|
/**
|
|
2698
2717
|
* @license lucide-react v0.544.0 - ISC
|
|
2699
2718
|
*
|
|
@@ -2703,7 +2722,7 @@ const es = [
|
|
|
2703
2722
|
const ts = [
|
|
2704
2723
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2705
2724
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2706
|
-
], Je =
|
|
2725
|
+
], Je = L("circle-check", ts);
|
|
2707
2726
|
/**
|
|
2708
2727
|
* @license lucide-react v0.544.0 - ISC
|
|
2709
2728
|
*
|
|
@@ -2714,7 +2733,7 @@ const rs = [
|
|
|
2714
2733
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
2715
2734
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
2716
2735
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
2717
|
-
], ns =
|
|
2736
|
+
], ns = L("database", rs);
|
|
2718
2737
|
/**
|
|
2719
2738
|
* @license lucide-react v0.544.0 - ISC
|
|
2720
2739
|
*
|
|
@@ -2725,14 +2744,14 @@ const ss = [
|
|
|
2725
2744
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2726
2745
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
2727
2746
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
2728
|
-
],
|
|
2747
|
+
], as = L("ellipsis-vertical", ss);
|
|
2729
2748
|
/**
|
|
2730
2749
|
* @license lucide-react v0.544.0 - ISC
|
|
2731
2750
|
*
|
|
2732
2751
|
* This source code is licensed under the ISC license.
|
|
2733
2752
|
* See the LICENSE file in the root directory of this source tree.
|
|
2734
2753
|
*/
|
|
2735
|
-
const
|
|
2754
|
+
const is = [
|
|
2736
2755
|
[
|
|
2737
2756
|
"path",
|
|
2738
2757
|
{
|
|
@@ -2749,7 +2768,7 @@ const as = [
|
|
|
2749
2768
|
}
|
|
2750
2769
|
],
|
|
2751
2770
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
2752
|
-
],
|
|
2771
|
+
], at = L("eye-off", is);
|
|
2753
2772
|
/**
|
|
2754
2773
|
* @license lucide-react v0.544.0 - ISC
|
|
2755
2774
|
*
|
|
@@ -2765,7 +2784,7 @@ const os = [
|
|
|
2765
2784
|
}
|
|
2766
2785
|
],
|
|
2767
2786
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2768
|
-
],
|
|
2787
|
+
], it = L("eye", os);
|
|
2769
2788
|
/**
|
|
2770
2789
|
* @license lucide-react v0.544.0 - ISC
|
|
2771
2790
|
*
|
|
@@ -2781,7 +2800,7 @@ const ls = [
|
|
|
2781
2800
|
key: "r6nss1"
|
|
2782
2801
|
}
|
|
2783
2802
|
]
|
|
2784
|
-
], cs =
|
|
2803
|
+
], cs = L("house", ls);
|
|
2785
2804
|
/**
|
|
2786
2805
|
* @license lucide-react v0.544.0 - ISC
|
|
2787
2806
|
*
|
|
@@ -2792,7 +2811,7 @@ const ds = [
|
|
|
2792
2811
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
2793
2812
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
2794
2813
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
2795
|
-
], sr =
|
|
2814
|
+
], sr = L("image", ds);
|
|
2796
2815
|
/**
|
|
2797
2816
|
* @license lucide-react v0.544.0 - ISC
|
|
2798
2817
|
*
|
|
@@ -2808,7 +2827,7 @@ const us = [
|
|
|
2808
2827
|
}
|
|
2809
2828
|
],
|
|
2810
2829
|
["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }]
|
|
2811
|
-
],
|
|
2830
|
+
], ar = L("key-round", us);
|
|
2812
2831
|
/**
|
|
2813
2832
|
* @license lucide-react v0.544.0 - ISC
|
|
2814
2833
|
*
|
|
@@ -2819,7 +2838,7 @@ const ps = [
|
|
|
2819
2838
|
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
|
|
2820
2839
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
2821
2840
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
2822
|
-
], ot =
|
|
2841
|
+
], ot = L("key", ps);
|
|
2823
2842
|
/**
|
|
2824
2843
|
* @license lucide-react v0.544.0 - ISC
|
|
2825
2844
|
*
|
|
@@ -2830,14 +2849,14 @@ const fs = [
|
|
|
2830
2849
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
2831
2850
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
2832
2851
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
2833
|
-
], xs =
|
|
2852
|
+
], xs = L("link-2", fs);
|
|
2834
2853
|
/**
|
|
2835
2854
|
* @license lucide-react v0.544.0 - ISC
|
|
2836
2855
|
*
|
|
2837
2856
|
* This source code is licensed under the ISC license.
|
|
2838
2857
|
* See the LICENSE file in the root directory of this source tree.
|
|
2839
2858
|
*/
|
|
2840
|
-
const hs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]],
|
|
2859
|
+
const hs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ae = L("loader-circle", hs);
|
|
2841
2860
|
/**
|
|
2842
2861
|
* @license lucide-react v0.544.0 - ISC
|
|
2843
2862
|
*
|
|
@@ -2853,7 +2872,7 @@ const ms = [
|
|
|
2853
2872
|
["path", { d: "m4.9 19.1 2.9-2.9", key: "bwix9q" }],
|
|
2854
2873
|
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
2855
2874
|
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
2856
|
-
], gs =
|
|
2875
|
+
], gs = L("loader", ms);
|
|
2857
2876
|
/**
|
|
2858
2877
|
* @license lucide-react v0.544.0 - ISC
|
|
2859
2878
|
*
|
|
@@ -2863,7 +2882,7 @@ const ms = [
|
|
|
2863
2882
|
const ys = [
|
|
2864
2883
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
2865
2884
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
2866
|
-
], ye =
|
|
2885
|
+
], ye = L("lock", ys);
|
|
2867
2886
|
/**
|
|
2868
2887
|
* @license lucide-react v0.544.0 - ISC
|
|
2869
2888
|
*
|
|
@@ -2874,7 +2893,7 @@ const bs = [
|
|
|
2874
2893
|
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
2875
2894
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
2876
2895
|
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
2877
|
-
], lt =
|
|
2896
|
+
], lt = L("log-out", bs);
|
|
2878
2897
|
/**
|
|
2879
2898
|
* @license lucide-react v0.544.0 - ISC
|
|
2880
2899
|
*
|
|
@@ -2884,7 +2903,7 @@ const bs = [
|
|
|
2884
2903
|
const ws = [
|
|
2885
2904
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
2886
2905
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
2887
|
-
], fe =
|
|
2906
|
+
], fe = L("mail", ws);
|
|
2888
2907
|
/**
|
|
2889
2908
|
* @license lucide-react v0.544.0 - ISC
|
|
2890
2909
|
*
|
|
@@ -2900,7 +2919,7 @@ const js = [
|
|
|
2900
2919
|
}
|
|
2901
2920
|
],
|
|
2902
2921
|
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }]
|
|
2903
|
-
], vs =
|
|
2922
|
+
], vs = L("map-pin", js);
|
|
2904
2923
|
/**
|
|
2905
2924
|
* @license lucide-react v0.544.0 - ISC
|
|
2906
2925
|
*
|
|
@@ -2916,7 +2935,7 @@ const Ss = [
|
|
|
2916
2935
|
key: "1a8usu"
|
|
2917
2936
|
}
|
|
2918
2937
|
]
|
|
2919
|
-
], ks =
|
|
2938
|
+
], ks = L("pen-line", Ss);
|
|
2920
2939
|
/**
|
|
2921
2940
|
* @license lucide-react v0.544.0 - ISC
|
|
2922
2941
|
*
|
|
@@ -2931,7 +2950,7 @@ const Es = [
|
|
|
2931
2950
|
key: "9njp5v"
|
|
2932
2951
|
}
|
|
2933
2952
|
]
|
|
2934
|
-
], Cs =
|
|
2953
|
+
], Cs = L("phone", Es);
|
|
2935
2954
|
/**
|
|
2936
2955
|
* @license lucide-react v0.544.0 - ISC
|
|
2937
2956
|
*
|
|
@@ -2948,7 +2967,7 @@ const Ts = [
|
|
|
2948
2967
|
],
|
|
2949
2968
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
2950
2969
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
2951
|
-
], Rs =
|
|
2970
|
+
], Rs = L("save", Ts);
|
|
2952
2971
|
/**
|
|
2953
2972
|
* @license lucide-react v0.544.0 - ISC
|
|
2954
2973
|
*
|
|
@@ -2964,14 +2983,14 @@ const Ps = [
|
|
|
2964
2983
|
}
|
|
2965
2984
|
],
|
|
2966
2985
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
2967
|
-
], ct =
|
|
2986
|
+
], ct = L("send", Ps);
|
|
2968
2987
|
/**
|
|
2969
2988
|
* @license lucide-react v0.544.0 - ISC
|
|
2970
2989
|
*
|
|
2971
2990
|
* This source code is licensed under the ISC license.
|
|
2972
2991
|
* See the LICENSE file in the root directory of this source tree.
|
|
2973
2992
|
*/
|
|
2974
|
-
const
|
|
2993
|
+
const Is = [
|
|
2975
2994
|
[
|
|
2976
2995
|
"path",
|
|
2977
2996
|
{
|
|
@@ -2980,7 +2999,7 @@ const Os = [
|
|
|
2980
2999
|
}
|
|
2981
3000
|
],
|
|
2982
3001
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2983
|
-
],
|
|
3002
|
+
], Os = L("settings", Is);
|
|
2984
3003
|
/**
|
|
2985
3004
|
* @license lucide-react v0.544.0 - ISC
|
|
2986
3005
|
*
|
|
@@ -2995,7 +3014,7 @@ const zs = [
|
|
|
2995
3014
|
key: "oel41y"
|
|
2996
3015
|
}
|
|
2997
3016
|
]
|
|
2998
|
-
],
|
|
3017
|
+
], ir = L("shield", zs);
|
|
2999
3018
|
/**
|
|
3000
3019
|
* @license lucide-react v0.544.0 - ISC
|
|
3001
3020
|
*
|
|
@@ -3008,7 +3027,7 @@ const As = [
|
|
|
3008
3027
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
3009
3028
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
3010
3029
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
3011
|
-
], De =
|
|
3030
|
+
], De = L("trash-2", As);
|
|
3012
3031
|
/**
|
|
3013
3032
|
* @license lucide-react v0.544.0 - ISC
|
|
3014
3033
|
*
|
|
@@ -3025,7 +3044,7 @@ const _s = [
|
|
|
3025
3044
|
],
|
|
3026
3045
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
3027
3046
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
3028
|
-
],
|
|
3047
|
+
], Ot = L("triangle-alert", _s);
|
|
3029
3048
|
/**
|
|
3030
3049
|
* @license lucide-react v0.544.0 - ISC
|
|
3031
3050
|
*
|
|
@@ -3037,7 +3056,7 @@ const Us = [
|
|
|
3037
3056
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
3038
3057
|
["line", { x1: "17", x2: "22", y1: "8", y2: "13", key: "3nzzx3" }],
|
|
3039
3058
|
["line", { x1: "22", x2: "17", y1: "8", y2: "13", key: "1swrse" }]
|
|
3040
|
-
], $s =
|
|
3059
|
+
], $s = L("user-x", Us);
|
|
3041
3060
|
/**
|
|
3042
3061
|
* @license lucide-react v0.544.0 - ISC
|
|
3043
3062
|
*
|
|
@@ -3047,7 +3066,7 @@ const Us = [
|
|
|
3047
3066
|
const Ds = [
|
|
3048
3067
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
3049
3068
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
3050
|
-
], we =
|
|
3069
|
+
], we = L("user", Ds);
|
|
3051
3070
|
/**
|
|
3052
3071
|
* @license lucide-react v0.544.0 - ISC
|
|
3053
3072
|
*
|
|
@@ -3057,7 +3076,7 @@ const Ds = [
|
|
|
3057
3076
|
const Ns = [
|
|
3058
3077
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
3059
3078
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
3060
|
-
],
|
|
3079
|
+
], Oe = L("x", Ns), or = cr(null), ca = ({
|
|
3061
3080
|
authix: t,
|
|
3062
3081
|
children: e
|
|
3063
3082
|
}) => /* @__PURE__ */ r.jsx(or.Provider, { value: t, children: e }), pe = () => {
|
|
@@ -3065,13 +3084,13 @@ const Ns = [
|
|
|
3065
3084
|
if (!t)
|
|
3066
3085
|
throw new Error("useAuthix must be used inside <AuthixProvider />");
|
|
3067
3086
|
return t;
|
|
3068
|
-
},
|
|
3087
|
+
}, da = ({
|
|
3069
3088
|
logoUrl: t,
|
|
3070
3089
|
logoLinkUrl: e,
|
|
3071
3090
|
title: n = "Create Your Account",
|
|
3072
3091
|
subtitle: s = "Join our platform today",
|
|
3073
|
-
primaryColor:
|
|
3074
|
-
gradient:
|
|
3092
|
+
primaryColor: a = "#00C214",
|
|
3093
|
+
gradient: i = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3075
3094
|
darkMode: o = !0,
|
|
3076
3095
|
// Only avatar is optional
|
|
3077
3096
|
showAvatar: c = !1,
|
|
@@ -3089,21 +3108,21 @@ const Ns = [
|
|
|
3089
3108
|
password: "",
|
|
3090
3109
|
role: u.length ? u[0] : "user",
|
|
3091
3110
|
...c && { avatarUrl: "" }
|
|
3092
|
-
}, [w, h] = P(p), [
|
|
3111
|
+
}, [w, h] = P(p), [I, C] = P(!1), [g, A] = P(!1), [N, b] = P(null), [j, q] = P({}), [O, X] = P(!1), W = o ? "#ffffff" : "#111827", T = o ? "#a1a1aa" : "#6b7280", G = o ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", R = o ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
3093
3112
|
Ce.useEffect(() => {
|
|
3094
3113
|
if (typeof window < "u") {
|
|
3095
|
-
const
|
|
3096
|
-
return
|
|
3114
|
+
const F = () => X(window.innerWidth < 768);
|
|
3115
|
+
return F(), window.addEventListener("resize", F), () => window.removeEventListener("resize", F);
|
|
3097
3116
|
}
|
|
3098
3117
|
}, []);
|
|
3099
|
-
const z = (
|
|
3100
|
-
const { name: Y, value: l } =
|
|
3118
|
+
const z = (F) => {
|
|
3119
|
+
const { name: Y, value: l } = F.target;
|
|
3101
3120
|
h((m) => ({ ...m, [Y]: l })), j[Y] && q((m) => ({ ...m, [Y]: void 0 }));
|
|
3102
3121
|
}, M = () => {
|
|
3103
|
-
const
|
|
3104
|
-
return w.name.trim() || (
|
|
3105
|
-
}, K = async (
|
|
3106
|
-
if (
|
|
3122
|
+
const F = {};
|
|
3123
|
+
return w.name.trim() || (F.name = "Name is required"), w.email.trim() ? /\S+@\S+\.\S+/.test(w.email) || (F.email = "Invalid email address") : F.email = "Email is required", w.password ? w.password.length < 6 && (F.password = "Password must be at least 6 characters") : F.password = "Password is required", q(F), Object.keys(F).length === 0;
|
|
3124
|
+
}, K = async (F) => {
|
|
3125
|
+
if (F.preventDefault(), !!M()) {
|
|
3107
3126
|
A(!0), b(null);
|
|
3108
3127
|
try {
|
|
3109
3128
|
const Y = {
|
|
@@ -3128,7 +3147,7 @@ const Ns = [
|
|
|
3128
3147
|
}
|
|
3129
3148
|
}, H = {
|
|
3130
3149
|
width: "100%",
|
|
3131
|
-
padding:
|
|
3150
|
+
padding: O ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
3132
3151
|
backgroundColor: G,
|
|
3133
3152
|
border: `1px solid ${R}`,
|
|
3134
3153
|
borderRadius: "10px",
|
|
@@ -3151,15 +3170,15 @@ const Ns = [
|
|
|
3151
3170
|
"div",
|
|
3152
3171
|
{
|
|
3153
3172
|
style: {
|
|
3154
|
-
minWidth:
|
|
3173
|
+
minWidth: O ? "320px" : "380px",
|
|
3155
3174
|
width: "100%",
|
|
3156
|
-
maxWidth:
|
|
3175
|
+
maxWidth: O ? "340px" : "390px",
|
|
3157
3176
|
display: "flex",
|
|
3158
3177
|
flexDirection: "column",
|
|
3159
3178
|
borderRadius: "10px",
|
|
3160
3179
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
3161
3180
|
backgroundColor: o ? "#000000" : "#ffffff",
|
|
3162
|
-
padding:
|
|
3181
|
+
padding: O ? "30px 24px" : "20px 28px"
|
|
3163
3182
|
},
|
|
3164
3183
|
children: [
|
|
3165
3184
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -3191,7 +3210,7 @@ const Ns = [
|
|
|
3191
3210
|
we,
|
|
3192
3211
|
{
|
|
3193
3212
|
size: 40,
|
|
3194
|
-
color:
|
|
3213
|
+
color: a,
|
|
3195
3214
|
style: { marginBottom: "10px" }
|
|
3196
3215
|
}
|
|
3197
3216
|
),
|
|
@@ -3238,10 +3257,10 @@ const Ns = [
|
|
|
3238
3257
|
height: "60px",
|
|
3239
3258
|
borderRadius: "50%",
|
|
3240
3259
|
objectFit: "cover",
|
|
3241
|
-
border: `2px solid ${
|
|
3260
|
+
border: `2px solid ${a}30`
|
|
3242
3261
|
},
|
|
3243
|
-
onError: (
|
|
3244
|
-
const Y =
|
|
3262
|
+
onError: (F) => {
|
|
3263
|
+
const Y = F.target;
|
|
3245
3264
|
Y.style.display = "none";
|
|
3246
3265
|
}
|
|
3247
3266
|
}
|
|
@@ -3308,13 +3327,13 @@ const Ns = [
|
|
|
3308
3327
|
"button",
|
|
3309
3328
|
{
|
|
3310
3329
|
type: "button",
|
|
3311
|
-
onClick: () => h((
|
|
3330
|
+
onClick: () => h((F) => ({ ...F, role: u[0] })),
|
|
3312
3331
|
style: {
|
|
3313
3332
|
flex: 1,
|
|
3314
3333
|
zIndex: 10,
|
|
3315
3334
|
border: "none",
|
|
3316
3335
|
background: "transparent",
|
|
3317
|
-
color: w.role === u[0] ?
|
|
3336
|
+
color: w.role === u[0] ? a : o ? "#9ca3af" : "#6b7280",
|
|
3318
3337
|
// theme-aware inactive color
|
|
3319
3338
|
fontWeight: w.role === u[0] ? 600 : 500,
|
|
3320
3339
|
fontSize: "14px",
|
|
@@ -3330,13 +3349,13 @@ const Ns = [
|
|
|
3330
3349
|
"button",
|
|
3331
3350
|
{
|
|
3332
3351
|
type: "button",
|
|
3333
|
-
onClick: () => h((
|
|
3352
|
+
onClick: () => h((F) => ({ ...F, role: u[1] })),
|
|
3334
3353
|
style: {
|
|
3335
3354
|
flex: 1,
|
|
3336
3355
|
zIndex: 10,
|
|
3337
3356
|
border: "none",
|
|
3338
3357
|
background: "transparent",
|
|
3339
|
-
color: w.role === u[1] ?
|
|
3358
|
+
color: w.role === u[1] ? a : o ? "#9ca3af" : "#6b7280",
|
|
3340
3359
|
fontWeight: w.role === u[1] ? 600 : 500,
|
|
3341
3360
|
fontSize: "14px",
|
|
3342
3361
|
display: "flex",
|
|
@@ -3494,7 +3513,7 @@ const Ns = [
|
|
|
3494
3513
|
"input",
|
|
3495
3514
|
{
|
|
3496
3515
|
id: "signup-password",
|
|
3497
|
-
type:
|
|
3516
|
+
type: I ? "text" : "password",
|
|
3498
3517
|
name: "password",
|
|
3499
3518
|
placeholder: "Create a secure password",
|
|
3500
3519
|
value: w.password,
|
|
@@ -3509,7 +3528,7 @@ const Ns = [
|
|
|
3509
3528
|
"button",
|
|
3510
3529
|
{
|
|
3511
3530
|
type: "button",
|
|
3512
|
-
onClick: () => C(!
|
|
3531
|
+
onClick: () => C(!I),
|
|
3513
3532
|
style: {
|
|
3514
3533
|
position: "absolute",
|
|
3515
3534
|
right: "14px",
|
|
@@ -3521,7 +3540,7 @@ const Ns = [
|
|
|
3521
3540
|
cursor: "pointer",
|
|
3522
3541
|
padding: "4px"
|
|
3523
3542
|
},
|
|
3524
|
-
children:
|
|
3543
|
+
children: I ? /* @__PURE__ */ r.jsx(at, { size: 20 }) : /* @__PURE__ */ r.jsx(it, { size: 20 })
|
|
3525
3544
|
}
|
|
3526
3545
|
)
|
|
3527
3546
|
] }),
|
|
@@ -3597,7 +3616,7 @@ const Ns = [
|
|
|
3597
3616
|
{
|
|
3598
3617
|
href: d,
|
|
3599
3618
|
style: {
|
|
3600
|
-
color:
|
|
3619
|
+
color: a,
|
|
3601
3620
|
textDecoration: "none",
|
|
3602
3621
|
fontWeight: 500
|
|
3603
3622
|
},
|
|
@@ -3616,9 +3635,9 @@ const Ns = [
|
|
|
3616
3635
|
display: "flex",
|
|
3617
3636
|
alignItems: "start",
|
|
3618
3637
|
gap: "10px",
|
|
3619
|
-
backgroundColor: N.type === "success" ? `${
|
|
3620
|
-
border: N.type === "success" ? `1px solid ${
|
|
3621
|
-
color: N.type === "success" ?
|
|
3638
|
+
backgroundColor: N.type === "success" ? `${a}15` : "rgba(239,68,68,0.1)",
|
|
3639
|
+
border: N.type === "success" ? `1px solid ${a}30` : "1px solid rgba(239,68,68,0.3)",
|
|
3640
|
+
color: N.type === "success" ? a : "#ef4444"
|
|
3622
3641
|
},
|
|
3623
3642
|
children: [
|
|
3624
3643
|
N.type === "success" ? /* @__PURE__ */ r.jsx(ue, { size: 20 }) : /* @__PURE__ */ r.jsx(se, { size: 20 }),
|
|
@@ -3633,7 +3652,7 @@ const Ns = [
|
|
|
3633
3652
|
disabled: g,
|
|
3634
3653
|
style: {
|
|
3635
3654
|
padding: "12px",
|
|
3636
|
-
background:
|
|
3655
|
+
background: i,
|
|
3637
3656
|
color: "#fff",
|
|
3638
3657
|
border: "none",
|
|
3639
3658
|
borderRadius: "10px",
|
|
@@ -3674,7 +3693,7 @@ const Ns = [
|
|
|
3674
3693
|
children: [
|
|
3675
3694
|
"Secure authentication powered by",
|
|
3676
3695
|
" ",
|
|
3677
|
-
/* @__PURE__ */ r.jsx("span", { style: { color:
|
|
3696
|
+
/* @__PURE__ */ r.jsx("span", { style: { color: a, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
3678
3697
|
]
|
|
3679
3698
|
}
|
|
3680
3699
|
)
|
|
@@ -3690,19 +3709,19 @@ const Ns = [
|
|
|
3690
3709
|
]
|
|
3691
3710
|
}
|
|
3692
3711
|
);
|
|
3693
|
-
},
|
|
3712
|
+
}, ua = ({
|
|
3694
3713
|
logoUrl: t,
|
|
3695
3714
|
logoLinkUrl: e,
|
|
3696
3715
|
title: n = "Sign In to Your Account",
|
|
3697
3716
|
subtitle: s = "Welcome back! Please enter your details",
|
|
3698
|
-
primaryColor:
|
|
3699
|
-
gradient:
|
|
3717
|
+
primaryColor: a = "#00C214",
|
|
3718
|
+
gradient: i = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3700
3719
|
darkMode: o = !0,
|
|
3701
3720
|
signupUrl: c,
|
|
3702
3721
|
onSuccess: u,
|
|
3703
3722
|
onError: x
|
|
3704
3723
|
}) => {
|
|
3705
|
-
const d = pe(), [y, k] = P("login"), [E, p] = P(1), [w, h] = P(!1), [
|
|
3724
|
+
const d = pe(), [y, k] = P("login"), [E, p] = P(1), [w, h] = P(!1), [I, C] = P(!1), [g, A] = P(null), [N, b] = P(""), [j, q] = P(""), [O, X] = P({
|
|
3706
3725
|
email: "",
|
|
3707
3726
|
otp: "",
|
|
3708
3727
|
newPassword: ""
|
|
@@ -3731,12 +3750,12 @@ const Ns = [
|
|
|
3731
3750
|
C(!1);
|
|
3732
3751
|
}
|
|
3733
3752
|
}, H = (m) => {
|
|
3734
|
-
X({ ...
|
|
3735
|
-
},
|
|
3753
|
+
X({ ...O, [m.target.name]: m.target.value });
|
|
3754
|
+
}, F = async (m) => {
|
|
3736
3755
|
m.preventDefault(), C(!0), A(null);
|
|
3737
3756
|
try {
|
|
3738
3757
|
const S = await d.requestResetUserPasswordOTP({
|
|
3739
|
-
email:
|
|
3758
|
+
email: O.email
|
|
3740
3759
|
});
|
|
3741
3760
|
S.success ? (p(2), A({
|
|
3742
3761
|
type: "success",
|
|
@@ -3757,9 +3776,9 @@ const Ns = [
|
|
|
3757
3776
|
m.preventDefault(), C(!0), A(null);
|
|
3758
3777
|
try {
|
|
3759
3778
|
const S = await d.resetUserPassword({
|
|
3760
|
-
email:
|
|
3761
|
-
otp:
|
|
3762
|
-
newPassword:
|
|
3779
|
+
email: O.email,
|
|
3780
|
+
otp: O.otp,
|
|
3781
|
+
newPassword: O.newPassword
|
|
3763
3782
|
});
|
|
3764
3783
|
S.success ? (A({
|
|
3765
3784
|
type: "success",
|
|
@@ -3836,7 +3855,7 @@ const Ns = [
|
|
|
3836
3855
|
we,
|
|
3837
3856
|
{
|
|
3838
3857
|
size: 40,
|
|
3839
|
-
color:
|
|
3858
|
+
color: a,
|
|
3840
3859
|
style: { marginBottom: "10px" }
|
|
3841
3860
|
}
|
|
3842
3861
|
),
|
|
@@ -3975,7 +3994,7 @@ const Ns = [
|
|
|
3975
3994
|
color: R,
|
|
3976
3995
|
cursor: "pointer"
|
|
3977
3996
|
},
|
|
3978
|
-
children: w ? /* @__PURE__ */ r.jsx(
|
|
3997
|
+
children: w ? /* @__PURE__ */ r.jsx(at, { size: 20 }) : /* @__PURE__ */ r.jsx(it, { size: 20 })
|
|
3979
3998
|
}
|
|
3980
3999
|
)
|
|
3981
4000
|
] })
|
|
@@ -3996,7 +4015,7 @@ const Ns = [
|
|
|
3996
4015
|
{
|
|
3997
4016
|
href: c,
|
|
3998
4017
|
style: {
|
|
3999
|
-
color:
|
|
4018
|
+
color: a,
|
|
4000
4019
|
textDecoration: "none",
|
|
4001
4020
|
fontWeight: 500
|
|
4002
4021
|
},
|
|
@@ -4011,7 +4030,7 @@ const Ns = [
|
|
|
4011
4030
|
style: {
|
|
4012
4031
|
background: "none",
|
|
4013
4032
|
border: "none",
|
|
4014
|
-
color:
|
|
4033
|
+
color: a,
|
|
4015
4034
|
fontWeight: 500,
|
|
4016
4035
|
cursor: "pointer"
|
|
4017
4036
|
},
|
|
@@ -4025,17 +4044,17 @@ const Ns = [
|
|
|
4025
4044
|
"button",
|
|
4026
4045
|
{
|
|
4027
4046
|
type: "submit",
|
|
4028
|
-
disabled:
|
|
4047
|
+
disabled: I,
|
|
4029
4048
|
style: {
|
|
4030
4049
|
padding: "12px",
|
|
4031
|
-
background:
|
|
4050
|
+
background: i,
|
|
4032
4051
|
color: "#fff",
|
|
4033
4052
|
border: "none",
|
|
4034
4053
|
borderRadius: "10px",
|
|
4035
4054
|
fontSize: "14px",
|
|
4036
4055
|
fontWeight: 600
|
|
4037
4056
|
},
|
|
4038
|
-
children:
|
|
4057
|
+
children: I ? "Signing In..." : "Sign In"
|
|
4039
4058
|
}
|
|
4040
4059
|
)
|
|
4041
4060
|
]
|
|
@@ -4044,7 +4063,7 @@ const Ns = [
|
|
|
4044
4063
|
y === "forgot" && /* @__PURE__ */ r.jsxs(
|
|
4045
4064
|
"form",
|
|
4046
4065
|
{
|
|
4047
|
-
onSubmit: E === 1 ?
|
|
4066
|
+
onSubmit: E === 1 ? F : Y,
|
|
4048
4067
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
4049
4068
|
children: [
|
|
4050
4069
|
E === 1 ? /* @__PURE__ */ r.jsxs(
|
|
@@ -4085,7 +4104,7 @@ const Ns = [
|
|
|
4085
4104
|
type: "email",
|
|
4086
4105
|
name: "email",
|
|
4087
4106
|
placeholder: "Enter your email",
|
|
4088
|
-
value:
|
|
4107
|
+
value: O.email,
|
|
4089
4108
|
onChange: H,
|
|
4090
4109
|
style: l
|
|
4091
4110
|
}
|
|
@@ -4117,7 +4136,7 @@ const Ns = [
|
|
|
4117
4136
|
),
|
|
4118
4137
|
/* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
4119
4138
|
/* @__PURE__ */ r.jsx(
|
|
4120
|
-
|
|
4139
|
+
ar,
|
|
4121
4140
|
{
|
|
4122
4141
|
size: 20,
|
|
4123
4142
|
style: {
|
|
@@ -4136,7 +4155,7 @@ const Ns = [
|
|
|
4136
4155
|
type: "text",
|
|
4137
4156
|
name: "otp",
|
|
4138
4157
|
placeholder: "Enter OTP",
|
|
4139
|
-
value:
|
|
4158
|
+
value: O.otp,
|
|
4140
4159
|
onChange: H,
|
|
4141
4160
|
style: l
|
|
4142
4161
|
}
|
|
@@ -4187,7 +4206,7 @@ const Ns = [
|
|
|
4187
4206
|
type: "password",
|
|
4188
4207
|
name: "newPassword",
|
|
4189
4208
|
placeholder: "Enter new password",
|
|
4190
|
-
value:
|
|
4209
|
+
value: O.newPassword,
|
|
4191
4210
|
onChange: H,
|
|
4192
4211
|
style: l
|
|
4193
4212
|
}
|
|
@@ -4201,17 +4220,17 @@ const Ns = [
|
|
|
4201
4220
|
"button",
|
|
4202
4221
|
{
|
|
4203
4222
|
type: "submit",
|
|
4204
|
-
disabled:
|
|
4223
|
+
disabled: I,
|
|
4205
4224
|
style: {
|
|
4206
4225
|
padding: "12px",
|
|
4207
|
-
background:
|
|
4226
|
+
background: i,
|
|
4208
4227
|
color: "#fff",
|
|
4209
4228
|
border: "none",
|
|
4210
4229
|
fontSize: "14px",
|
|
4211
4230
|
borderRadius: "10px",
|
|
4212
4231
|
fontWeight: 600
|
|
4213
4232
|
},
|
|
4214
|
-
children:
|
|
4233
|
+
children: I ? "Please wait..." : E === 1 ? "Send Reset OTP" : "Reset Password"
|
|
4215
4234
|
}
|
|
4216
4235
|
),
|
|
4217
4236
|
/* @__PURE__ */ r.jsx(
|
|
@@ -4246,9 +4265,9 @@ const Ns = [
|
|
|
4246
4265
|
display: "flex",
|
|
4247
4266
|
alignItems: "center",
|
|
4248
4267
|
gap: "10px",
|
|
4249
|
-
backgroundColor: g.type === "success" ? `${
|
|
4250
|
-
border: g.type === "success" ? `1px solid ${
|
|
4251
|
-
color: g.type === "success" ?
|
|
4268
|
+
backgroundColor: g.type === "success" ? `${a}15` : "rgba(239,68,68,0.1)",
|
|
4269
|
+
border: g.type === "success" ? `1px solid ${a}30` : "1px solid rgba(239,68,68,0.3)",
|
|
4270
|
+
color: g.type === "success" ? a : "#ef4444"
|
|
4252
4271
|
},
|
|
4253
4272
|
children: [
|
|
4254
4273
|
g.type === "success" ? /* @__PURE__ */ r.jsx(ue, { size: 20 }) : /* @__PURE__ */ r.jsx(se, { size: 20 }),
|
|
@@ -4269,7 +4288,7 @@ const Ns = [
|
|
|
4269
4288
|
children: [
|
|
4270
4289
|
"Secure authentication powered by",
|
|
4271
4290
|
" ",
|
|
4272
|
-
/* @__PURE__ */ r.jsx("span", { style: { color:
|
|
4291
|
+
/* @__PURE__ */ r.jsx("span", { style: { color: a, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
4273
4292
|
]
|
|
4274
4293
|
}
|
|
4275
4294
|
)
|
|
@@ -4278,53 +4297,53 @@ const Ns = [
|
|
|
4278
4297
|
)
|
|
4279
4298
|
}
|
|
4280
4299
|
);
|
|
4281
|
-
},
|
|
4300
|
+
}, pa = ({
|
|
4282
4301
|
children: t,
|
|
4283
4302
|
fallback: e = null
|
|
4284
4303
|
}) => {
|
|
4285
|
-
const n = pe(), [s,
|
|
4304
|
+
const n = pe(), [s, a] = P("loading");
|
|
4286
4305
|
ee(() => {
|
|
4287
4306
|
(async () => {
|
|
4288
4307
|
if (!(document.cookie.split(";").map((d) => d.trim()).find((d) => d.startsWith("a_s_b="))?.split("=")[1] === "true")) {
|
|
4289
|
-
|
|
4308
|
+
a("unauthenticated");
|
|
4290
4309
|
return;
|
|
4291
4310
|
}
|
|
4292
4311
|
try {
|
|
4293
|
-
(await n.checkUserSession())?.user?.id ?
|
|
4312
|
+
(await n.checkUserSession())?.user?.id ? a("authenticated") : (document.cookie = "a_s_b=false; path=/; max-age=0; SameSite=Lax", a("unauthenticated"));
|
|
4294
4313
|
} catch (d) {
|
|
4295
|
-
console.error("Session validation failed:", d), document.cookie = "a_s_b=false; path=/; max-age=0; SameSite=Lax",
|
|
4314
|
+
console.error("Session validation failed:", d), document.cookie = "a_s_b=false; path=/; max-age=0; SameSite=Lax", a("unauthenticated");
|
|
4296
4315
|
}
|
|
4297
4316
|
})();
|
|
4298
4317
|
}, [n]);
|
|
4299
|
-
const
|
|
4300
|
-
return s === "loading" ? null : s === "unauthenticated" ?
|
|
4301
|
-
},
|
|
4318
|
+
const i = (o) => typeof o == "function" ? o() : o;
|
|
4319
|
+
return s === "loading" ? null : s === "unauthenticated" ? i(e) ?? null : /* @__PURE__ */ r.jsx(r.Fragment, { children: t });
|
|
4320
|
+
}, fa = ({
|
|
4302
4321
|
children: t,
|
|
4303
4322
|
fallback: e = null
|
|
4304
4323
|
}) => {
|
|
4305
|
-
const n = pe(), [s,
|
|
4324
|
+
const n = pe(), [s, a] = P("loading");
|
|
4306
4325
|
ee(() => {
|
|
4307
4326
|
(async () => {
|
|
4308
4327
|
if (!(document.cookie.split(";").map((d) => d.trim()).find((d) => d.startsWith("a_s_b="))?.split("=")[1] === "true")) {
|
|
4309
|
-
|
|
4328
|
+
a("unauthenticated");
|
|
4310
4329
|
return;
|
|
4311
4330
|
}
|
|
4312
4331
|
try {
|
|
4313
|
-
(await n.checkUserSession())?.user?.id ?
|
|
4332
|
+
(await n.checkUserSession())?.user?.id ? a("authenticated") : (document.cookie = "a_s_b=false; path=/; max-age=0; SameSite=Lax", a("unauthenticated"));
|
|
4314
4333
|
} catch (d) {
|
|
4315
|
-
console.error("Session validation failed:", d), document.cookie = "a_s_b=false; path=/; max-age=0; SameSite=Lax",
|
|
4334
|
+
console.error("Session validation failed:", d), document.cookie = "a_s_b=false; path=/; max-age=0; SameSite=Lax", a("unauthenticated");
|
|
4316
4335
|
}
|
|
4317
4336
|
})();
|
|
4318
4337
|
}, [n]);
|
|
4319
|
-
const
|
|
4320
|
-
return s === "loading" ? null : s === "authenticated" ?
|
|
4321
|
-
},
|
|
4338
|
+
const i = (o) => typeof o == "function" ? o() : o;
|
|
4339
|
+
return s === "loading" ? null : s === "authenticated" ? i(e) ?? null : /* @__PURE__ */ r.jsx(r.Fragment, { children: t });
|
|
4340
|
+
}, Fs = ({
|
|
4322
4341
|
isOpen: t,
|
|
4323
4342
|
onClose: e,
|
|
4324
4343
|
onSuccess: n,
|
|
4325
4344
|
onError: s,
|
|
4326
|
-
userId:
|
|
4327
|
-
colors:
|
|
4345
|
+
userId: a,
|
|
4346
|
+
colors: i
|
|
4328
4347
|
}) => {
|
|
4329
4348
|
const o = pe(), [c, u] = P(!1), [x, d] = P(""), [y, k] = P("warning"), [E, p] = P(!1);
|
|
4330
4349
|
if (ee(() => {
|
|
@@ -4338,7 +4357,7 @@ const Ns = [
|
|
|
4338
4357
|
u(!0), k("processing");
|
|
4339
4358
|
try {
|
|
4340
4359
|
const g = await o.deleteUser({
|
|
4341
|
-
userId:
|
|
4360
|
+
userId: a
|
|
4342
4361
|
});
|
|
4343
4362
|
g.success ? (n(g.message || "Account deleted successfully"), k("success"), setTimeout(() => {
|
|
4344
4363
|
localStorage.removeItem("userInfo"), localStorage.removeItem("userToken"), window.location.href = "/";
|
|
@@ -4348,7 +4367,7 @@ const Ns = [
|
|
|
4348
4367
|
} finally {
|
|
4349
4368
|
u(!1);
|
|
4350
4369
|
}
|
|
4351
|
-
}, h = x.toLowerCase() === "delete my account",
|
|
4370
|
+
}, h = x.toLowerCase() === "delete my account", I = (g) => {
|
|
4352
4371
|
g.target === g.currentTarget && y !== "processing" && y !== "success" && e();
|
|
4353
4372
|
}, C = () => {
|
|
4354
4373
|
switch (y) {
|
|
@@ -4396,7 +4415,7 @@ const Ns = [
|
|
|
4396
4415
|
"h3",
|
|
4397
4416
|
{
|
|
4398
4417
|
style: {
|
|
4399
|
-
color:
|
|
4418
|
+
color: i.textPrimary,
|
|
4400
4419
|
margin: 0,
|
|
4401
4420
|
fontSize: "20px",
|
|
4402
4421
|
fontWeight: 700,
|
|
@@ -4416,7 +4435,7 @@ const Ns = [
|
|
|
4416
4435
|
style: {
|
|
4417
4436
|
background: "transparent",
|
|
4418
4437
|
border: "none",
|
|
4419
|
-
color:
|
|
4438
|
+
color: i.textTertiary,
|
|
4420
4439
|
cursor: "pointer",
|
|
4421
4440
|
padding: "8px",
|
|
4422
4441
|
borderRadius: "8px",
|
|
@@ -4429,12 +4448,12 @@ const Ns = [
|
|
|
4429
4448
|
transition: "all 0.2s ease"
|
|
4430
4449
|
},
|
|
4431
4450
|
onMouseOver: (g) => {
|
|
4432
|
-
g.currentTarget.style.backgroundColor =
|
|
4451
|
+
g.currentTarget.style.backgroundColor = i.border, g.currentTarget.style.color = i.textPrimary;
|
|
4433
4452
|
},
|
|
4434
4453
|
onMouseOut: (g) => {
|
|
4435
|
-
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color =
|
|
4454
|
+
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color = i.textTertiary;
|
|
4436
4455
|
},
|
|
4437
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4456
|
+
children: /* @__PURE__ */ r.jsx(Oe, { size: 20 })
|
|
4438
4457
|
}
|
|
4439
4458
|
)
|
|
4440
4459
|
]
|
|
@@ -4447,8 +4466,8 @@ const Ns = [
|
|
|
4447
4466
|
display: "flex",
|
|
4448
4467
|
gap: "16px",
|
|
4449
4468
|
padding: "20px",
|
|
4450
|
-
background: `${
|
|
4451
|
-
border: `1px solid ${
|
|
4469
|
+
background: `${i.error}15`,
|
|
4470
|
+
border: `1px solid ${i.error}30`,
|
|
4452
4471
|
borderRadius: "12px",
|
|
4453
4472
|
marginBottom: "20px"
|
|
4454
4473
|
},
|
|
@@ -4457,12 +4476,12 @@ const Ns = [
|
|
|
4457
4476
|
"div",
|
|
4458
4477
|
{
|
|
4459
4478
|
style: {
|
|
4460
|
-
color:
|
|
4479
|
+
color: i.error,
|
|
4461
4480
|
flexShrink: 0,
|
|
4462
4481
|
display: "flex",
|
|
4463
4482
|
alignItems: "flex-start"
|
|
4464
4483
|
},
|
|
4465
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4484
|
+
children: /* @__PURE__ */ r.jsx(Ot, { size: 24 })
|
|
4466
4485
|
}
|
|
4467
4486
|
),
|
|
4468
4487
|
/* @__PURE__ */ r.jsxs("div", { style: { flex: 1 }, children: [
|
|
@@ -4470,7 +4489,7 @@ const Ns = [
|
|
|
4470
4489
|
"h4",
|
|
4471
4490
|
{
|
|
4472
4491
|
style: {
|
|
4473
|
-
color:
|
|
4492
|
+
color: i.textPrimary,
|
|
4474
4493
|
margin: "0 0 12px 0",
|
|
4475
4494
|
fontSize: "16px",
|
|
4476
4495
|
fontWeight: 600
|
|
@@ -4507,10 +4526,10 @@ const Ns = [
|
|
|
4507
4526
|
alignItems: "center",
|
|
4508
4527
|
gap: "10px",
|
|
4509
4528
|
fontSize: "14px",
|
|
4510
|
-
color:
|
|
4529
|
+
color: i.textSecondary
|
|
4511
4530
|
},
|
|
4512
4531
|
children: [
|
|
4513
|
-
/* @__PURE__ */ r.jsx("div", { style: { color:
|
|
4532
|
+
/* @__PURE__ */ r.jsx("div", { style: { color: i.error, flexShrink: 0 }, children: g.icon }),
|
|
4514
4533
|
/* @__PURE__ */ r.jsx("span", { children: g.text })
|
|
4515
4534
|
]
|
|
4516
4535
|
},
|
|
@@ -4540,9 +4559,9 @@ const Ns = [
|
|
|
4540
4559
|
style: {
|
|
4541
4560
|
padding: "10px 24px",
|
|
4542
4561
|
borderRadius: "10px",
|
|
4543
|
-
border: `1.5px solid ${
|
|
4562
|
+
border: `1.5px solid ${i.border}`,
|
|
4544
4563
|
background: "transparent",
|
|
4545
|
-
color:
|
|
4564
|
+
color: i.textPrimary,
|
|
4546
4565
|
fontSize: "14px",
|
|
4547
4566
|
fontWeight: 500,
|
|
4548
4567
|
cursor: "pointer",
|
|
@@ -4551,7 +4570,7 @@ const Ns = [
|
|
|
4551
4570
|
transition: "all 0.2s ease"
|
|
4552
4571
|
},
|
|
4553
4572
|
onMouseOver: (g) => {
|
|
4554
|
-
g.currentTarget.style.backgroundColor =
|
|
4573
|
+
g.currentTarget.style.backgroundColor = i.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4555
4574
|
},
|
|
4556
4575
|
onMouseOut: (g) => {
|
|
4557
4576
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4623,14 +4642,14 @@ const Ns = [
|
|
|
4623
4642
|
color: "white",
|
|
4624
4643
|
flexShrink: 0
|
|
4625
4644
|
},
|
|
4626
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4645
|
+
children: /* @__PURE__ */ r.jsx(Ot, { size: 24 })
|
|
4627
4646
|
}
|
|
4628
4647
|
),
|
|
4629
4648
|
/* @__PURE__ */ r.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ r.jsx(
|
|
4630
4649
|
"h3",
|
|
4631
4650
|
{
|
|
4632
4651
|
style: {
|
|
4633
|
-
color:
|
|
4652
|
+
color: i.textPrimary,
|
|
4634
4653
|
margin: 0,
|
|
4635
4654
|
fontSize: "20px",
|
|
4636
4655
|
fontWeight: 700,
|
|
@@ -4647,7 +4666,7 @@ const Ns = [
|
|
|
4647
4666
|
"p",
|
|
4648
4667
|
{
|
|
4649
4668
|
style: {
|
|
4650
|
-
color:
|
|
4669
|
+
color: i.textSecondary,
|
|
4651
4670
|
marginBottom: "16px",
|
|
4652
4671
|
fontSize: "14px",
|
|
4653
4672
|
lineHeight: "1.5"
|
|
@@ -4655,7 +4674,7 @@ const Ns = [
|
|
|
4655
4674
|
children: [
|
|
4656
4675
|
"Type",
|
|
4657
4676
|
" ",
|
|
4658
|
-
/* @__PURE__ */ r.jsx("strong", { style: { color:
|
|
4677
|
+
/* @__PURE__ */ r.jsx("strong", { style: { color: i.textPrimary }, children: '"delete my account"' }),
|
|
4659
4678
|
" ",
|
|
4660
4679
|
"to confirm:"
|
|
4661
4680
|
]
|
|
@@ -4672,16 +4691,16 @@ const Ns = [
|
|
|
4672
4691
|
width: "100%",
|
|
4673
4692
|
padding: "14px 16px",
|
|
4674
4693
|
borderRadius: "10px",
|
|
4675
|
-
border: `2px solid ${h ?
|
|
4694
|
+
border: `2px solid ${h ? i.success : i.error}`,
|
|
4676
4695
|
backgroundColor: "transparent",
|
|
4677
|
-
color:
|
|
4696
|
+
color: i.textPrimary,
|
|
4678
4697
|
fontSize: "15px",
|
|
4679
4698
|
outline: "none",
|
|
4680
4699
|
transition: "all 0.2s ease",
|
|
4681
4700
|
boxSizing: "border-box"
|
|
4682
4701
|
},
|
|
4683
4702
|
onFocus: (g) => {
|
|
4684
|
-
g.target.style.boxShadow = `0 0 0 3px ${
|
|
4703
|
+
g.target.style.boxShadow = `0 0 0 3px ${i.accent}20`;
|
|
4685
4704
|
},
|
|
4686
4705
|
onBlur: (g) => {
|
|
4687
4706
|
g.target.style.boxShadow = "none";
|
|
@@ -4697,7 +4716,7 @@ const Ns = [
|
|
|
4697
4716
|
alignItems: "center",
|
|
4698
4717
|
gap: "8px",
|
|
4699
4718
|
marginTop: "10px",
|
|
4700
|
-
color:
|
|
4719
|
+
color: i.success,
|
|
4701
4720
|
fontSize: "14px",
|
|
4702
4721
|
fontWeight: 500
|
|
4703
4722
|
},
|
|
@@ -4728,9 +4747,9 @@ const Ns = [
|
|
|
4728
4747
|
style: {
|
|
4729
4748
|
padding: "10px 24px",
|
|
4730
4749
|
borderRadius: "10px",
|
|
4731
|
-
border: `1.5px solid ${
|
|
4750
|
+
border: `1.5px solid ${i.border}`,
|
|
4732
4751
|
background: "transparent",
|
|
4733
|
-
color:
|
|
4752
|
+
color: i.textPrimary,
|
|
4734
4753
|
fontSize: "14px",
|
|
4735
4754
|
fontWeight: 500,
|
|
4736
4755
|
cursor: "pointer",
|
|
@@ -4739,7 +4758,7 @@ const Ns = [
|
|
|
4739
4758
|
transition: "all 0.2s ease"
|
|
4740
4759
|
},
|
|
4741
4760
|
onMouseOver: (g) => {
|
|
4742
|
-
g.currentTarget.style.backgroundColor =
|
|
4761
|
+
g.currentTarget.style.backgroundColor = i.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4743
4762
|
},
|
|
4744
4763
|
onMouseOut: (g) => {
|
|
4745
4764
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4814,7 +4833,7 @@ const Ns = [
|
|
|
4814
4833
|
flexShrink: 0
|
|
4815
4834
|
},
|
|
4816
4835
|
children: /* @__PURE__ */ r.jsx(
|
|
4817
|
-
|
|
4836
|
+
ae,
|
|
4818
4837
|
{
|
|
4819
4838
|
size: 20,
|
|
4820
4839
|
style: {
|
|
@@ -4829,7 +4848,7 @@ const Ns = [
|
|
|
4829
4848
|
"h3",
|
|
4830
4849
|
{
|
|
4831
4850
|
style: {
|
|
4832
|
-
color:
|
|
4851
|
+
color: i.textPrimary,
|
|
4833
4852
|
margin: 0,
|
|
4834
4853
|
fontSize: "20px",
|
|
4835
4854
|
fontWeight: 700,
|
|
@@ -4842,7 +4861,7 @@ const Ns = [
|
|
|
4842
4861
|
"p",
|
|
4843
4862
|
{
|
|
4844
4863
|
style: {
|
|
4845
|
-
color:
|
|
4864
|
+
color: i.textTertiary,
|
|
4846
4865
|
margin: "4px 0 0 0",
|
|
4847
4866
|
fontSize: "14px",
|
|
4848
4867
|
lineHeight: "1.4"
|
|
@@ -4876,7 +4895,7 @@ const Ns = [
|
|
|
4876
4895
|
padding: "12px",
|
|
4877
4896
|
borderRadius: "8px",
|
|
4878
4897
|
transition: "all 0.2s ease",
|
|
4879
|
-
backgroundColor: g.active ? `${
|
|
4898
|
+
backgroundColor: g.active ? `${i.accent}10` : "transparent"
|
|
4880
4899
|
},
|
|
4881
4900
|
children: [
|
|
4882
4901
|
/* @__PURE__ */ r.jsx(
|
|
@@ -4886,9 +4905,9 @@ const Ns = [
|
|
|
4886
4905
|
width: "8px",
|
|
4887
4906
|
height: "8px",
|
|
4888
4907
|
borderRadius: "50%",
|
|
4889
|
-
backgroundColor: g.active ?
|
|
4908
|
+
backgroundColor: g.active ? i.accent : i.textTertiary,
|
|
4890
4909
|
transition: "all 0.3s ease",
|
|
4891
|
-
boxShadow: g.active ? `0 0 0 4px ${
|
|
4910
|
+
boxShadow: g.active ? `0 0 0 4px ${i.accent}20` : "none"
|
|
4892
4911
|
}
|
|
4893
4912
|
}
|
|
4894
4913
|
),
|
|
@@ -4897,7 +4916,7 @@ const Ns = [
|
|
|
4897
4916
|
{
|
|
4898
4917
|
style: {
|
|
4899
4918
|
fontSize: "14px",
|
|
4900
|
-
color: g.active ?
|
|
4919
|
+
color: g.active ? i.textPrimary : i.textSecondary,
|
|
4901
4920
|
fontWeight: g.active ? 500 : 400
|
|
4902
4921
|
},
|
|
4903
4922
|
children: g.text
|
|
@@ -4917,17 +4936,17 @@ const Ns = [
|
|
|
4917
4936
|
alignItems: "center",
|
|
4918
4937
|
gap: "10px",
|
|
4919
4938
|
padding: "16px",
|
|
4920
|
-
background: `${
|
|
4939
|
+
background: `${i.accent}10`,
|
|
4921
4940
|
borderRadius: "10px",
|
|
4922
4941
|
fontSize: "14px",
|
|
4923
|
-
color:
|
|
4942
|
+
color: i.textSecondary
|
|
4924
4943
|
},
|
|
4925
4944
|
children: [
|
|
4926
4945
|
/* @__PURE__ */ r.jsx(
|
|
4927
|
-
|
|
4946
|
+
ir,
|
|
4928
4947
|
{
|
|
4929
4948
|
size: 18,
|
|
4930
|
-
style: { color:
|
|
4949
|
+
style: { color: i.accent, flexShrink: 0 }
|
|
4931
4950
|
}
|
|
4932
4951
|
),
|
|
4933
4952
|
/* @__PURE__ */ r.jsx("span", { children: "You will be redirected to the login page shortly" })
|
|
@@ -4969,7 +4988,7 @@ const Ns = [
|
|
|
4969
4988
|
"h3",
|
|
4970
4989
|
{
|
|
4971
4990
|
style: {
|
|
4972
|
-
color:
|
|
4991
|
+
color: i.textPrimary,
|
|
4973
4992
|
margin: 0,
|
|
4974
4993
|
fontSize: "20px",
|
|
4975
4994
|
fontWeight: 700,
|
|
@@ -4982,7 +5001,7 @@ const Ns = [
|
|
|
4982
5001
|
"p",
|
|
4983
5002
|
{
|
|
4984
5003
|
style: {
|
|
4985
|
-
color:
|
|
5004
|
+
color: i.textTertiary,
|
|
4986
5005
|
margin: "4px 0 0 0",
|
|
4987
5006
|
fontSize: "14px",
|
|
4988
5007
|
lineHeight: "1.4"
|
|
@@ -5000,8 +5019,8 @@ const Ns = [
|
|
|
5000
5019
|
style: {
|
|
5001
5020
|
textAlign: "center",
|
|
5002
5021
|
padding: "20px",
|
|
5003
|
-
background: `${
|
|
5004
|
-
border: `1px solid ${
|
|
5022
|
+
background: `${i.success}10`,
|
|
5023
|
+
border: `1px solid ${i.success}20`,
|
|
5005
5024
|
borderRadius: "12px",
|
|
5006
5025
|
marginBottom: "24px"
|
|
5007
5026
|
},
|
|
@@ -5011,7 +5030,7 @@ const Ns = [
|
|
|
5011
5030
|
{
|
|
5012
5031
|
size: 48,
|
|
5013
5032
|
style: {
|
|
5014
|
-
color:
|
|
5033
|
+
color: i.success,
|
|
5015
5034
|
marginBottom: "12px",
|
|
5016
5035
|
display: "block",
|
|
5017
5036
|
margin: "0 auto 12px auto"
|
|
@@ -5022,7 +5041,7 @@ const Ns = [
|
|
|
5022
5041
|
"p",
|
|
5023
5042
|
{
|
|
5024
5043
|
style: {
|
|
5025
|
-
color:
|
|
5044
|
+
color: i.textPrimary,
|
|
5026
5045
|
fontSize: "16px",
|
|
5027
5046
|
fontWeight: 600,
|
|
5028
5047
|
margin: "0 0 8px 0"
|
|
@@ -5034,7 +5053,7 @@ const Ns = [
|
|
|
5034
5053
|
"p",
|
|
5035
5054
|
{
|
|
5036
5055
|
style: {
|
|
5037
|
-
color:
|
|
5056
|
+
color: i.textSecondary,
|
|
5038
5057
|
fontSize: "14px",
|
|
5039
5058
|
margin: 0,
|
|
5040
5059
|
lineHeight: "1.5"
|
|
@@ -5053,20 +5072,20 @@ const Ns = [
|
|
|
5053
5072
|
alignItems: "center",
|
|
5054
5073
|
gap: "10px",
|
|
5055
5074
|
padding: "16px",
|
|
5056
|
-
background: `${
|
|
5075
|
+
background: `${i.accent}10`,
|
|
5057
5076
|
borderRadius: "10px",
|
|
5058
5077
|
fontSize: "14px",
|
|
5059
|
-
color:
|
|
5078
|
+
color: i.textSecondary,
|
|
5060
5079
|
justifyContent: "center"
|
|
5061
5080
|
},
|
|
5062
5081
|
children: [
|
|
5063
5082
|
/* @__PURE__ */ r.jsx(
|
|
5064
|
-
|
|
5083
|
+
ae,
|
|
5065
5084
|
{
|
|
5066
5085
|
size: 16,
|
|
5067
5086
|
style: {
|
|
5068
5087
|
animation: "spin 1s linear infinite",
|
|
5069
|
-
color:
|
|
5088
|
+
color: i.accent
|
|
5070
5089
|
}
|
|
5071
5090
|
}
|
|
5072
5091
|
),
|
|
@@ -5092,14 +5111,14 @@ const Ns = [
|
|
|
5092
5111
|
zIndex: 1e4,
|
|
5093
5112
|
animation: "fadeIn 0.3s ease-out"
|
|
5094
5113
|
},
|
|
5095
|
-
onClick:
|
|
5114
|
+
onClick: I,
|
|
5096
5115
|
children: [
|
|
5097
5116
|
/* @__PURE__ */ r.jsx(
|
|
5098
5117
|
"div",
|
|
5099
5118
|
{
|
|
5100
5119
|
style: {
|
|
5101
|
-
backgroundColor:
|
|
5102
|
-
border: `1px solid ${
|
|
5120
|
+
backgroundColor: i.surface,
|
|
5121
|
+
border: `1px solid ${i.border}`,
|
|
5103
5122
|
borderRadius: "20px",
|
|
5104
5123
|
width: "100%",
|
|
5105
5124
|
maxWidth: "480px",
|
|
@@ -5169,13 +5188,13 @@ const Ns = [
|
|
|
5169
5188
|
]
|
|
5170
5189
|
}
|
|
5171
5190
|
);
|
|
5172
|
-
},
|
|
5191
|
+
}, Ls = ({
|
|
5173
5192
|
isOpen: t,
|
|
5174
5193
|
onClose: e,
|
|
5175
5194
|
onUpdate: n,
|
|
5176
5195
|
colors: s
|
|
5177
5196
|
}) => {
|
|
5178
|
-
const [
|
|
5197
|
+
const [a, i] = P(""), [o, c] = P(!1), [u, x] = P(!1), [d, y] = P({ isValid: !1, message: "", type: null });
|
|
5179
5198
|
if (ee(() => {
|
|
5180
5199
|
if (typeof window > "u") return;
|
|
5181
5200
|
const p = () => {
|
|
@@ -5183,12 +5202,12 @@ const Ns = [
|
|
|
5183
5202
|
};
|
|
5184
5203
|
return p(), window.addEventListener("resize", p), () => window.removeEventListener("resize", p);
|
|
5185
5204
|
}, []), ee(() => {
|
|
5186
|
-
if (!
|
|
5205
|
+
if (!a.trim()) {
|
|
5187
5206
|
y({ isValid: !1, message: "", type: null });
|
|
5188
5207
|
return;
|
|
5189
5208
|
}
|
|
5190
5209
|
try {
|
|
5191
|
-
const p = new URL(
|
|
5210
|
+
const p = new URL(a), w = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(p.pathname);
|
|
5192
5211
|
y(w ? {
|
|
5193
5212
|
isValid: !0,
|
|
5194
5213
|
message: "Valid image URL",
|
|
@@ -5205,12 +5224,12 @@ const Ns = [
|
|
|
5205
5224
|
type: "error"
|
|
5206
5225
|
});
|
|
5207
5226
|
}
|
|
5208
|
-
}, [
|
|
5227
|
+
}, [a]), !t) return null;
|
|
5209
5228
|
const k = async () => {
|
|
5210
|
-
if (!(!
|
|
5229
|
+
if (!(!a || !d.isValid)) {
|
|
5211
5230
|
c(!0);
|
|
5212
5231
|
try {
|
|
5213
|
-
await n(
|
|
5232
|
+
await n(a) && (i(""), e());
|
|
5214
5233
|
} finally {
|
|
5215
5234
|
c(!1);
|
|
5216
5235
|
}
|
|
@@ -5329,7 +5348,7 @@ const Ns = [
|
|
|
5329
5348
|
onMouseOut: (p) => {
|
|
5330
5349
|
p.currentTarget.style.backgroundColor = "transparent", p.currentTarget.style.color = s.textTertiary;
|
|
5331
5350
|
},
|
|
5332
|
-
children: /* @__PURE__ */ r.jsx(
|
|
5351
|
+
children: /* @__PURE__ */ r.jsx(Oe, { size: 20 })
|
|
5333
5352
|
}
|
|
5334
5353
|
)
|
|
5335
5354
|
]
|
|
@@ -5371,8 +5390,8 @@ const Ns = [
|
|
|
5371
5390
|
type: "url",
|
|
5372
5391
|
id: "avatar-url",
|
|
5373
5392
|
placeholder: "https://example.com/your-avatar.jpg",
|
|
5374
|
-
value:
|
|
5375
|
-
onChange: (p) =>
|
|
5393
|
+
value: a,
|
|
5394
|
+
onChange: (p) => i(p.target.value),
|
|
5376
5395
|
style: {
|
|
5377
5396
|
width: "100%",
|
|
5378
5397
|
padding: "14px 16px",
|
|
@@ -5429,7 +5448,7 @@ const Ns = [
|
|
|
5429
5448
|
}
|
|
5430
5449
|
)
|
|
5431
5450
|
] }),
|
|
5432
|
-
|
|
5451
|
+
a && d.type === "success" && /* @__PURE__ */ r.jsxs(
|
|
5433
5452
|
"div",
|
|
5434
5453
|
{
|
|
5435
5454
|
style: {
|
|
@@ -5455,7 +5474,7 @@ const Ns = [
|
|
|
5455
5474
|
/* @__PURE__ */ r.jsx(
|
|
5456
5475
|
"img",
|
|
5457
5476
|
{
|
|
5458
|
-
src:
|
|
5477
|
+
src: a,
|
|
5459
5478
|
alt: "Avatar preview",
|
|
5460
5479
|
style: {
|
|
5461
5480
|
width: "80px",
|
|
@@ -5548,7 +5567,7 @@ const Ns = [
|
|
|
5548
5567
|
},
|
|
5549
5568
|
children: o ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
5550
5569
|
/* @__PURE__ */ r.jsx(
|
|
5551
|
-
|
|
5570
|
+
ae,
|
|
5552
5571
|
{
|
|
5553
5572
|
size: 16,
|
|
5554
5573
|
style: {
|
|
@@ -5626,8 +5645,8 @@ const Ns = [
|
|
|
5626
5645
|
onClose: e,
|
|
5627
5646
|
onSuccess: n,
|
|
5628
5647
|
onError: s,
|
|
5629
|
-
userId:
|
|
5630
|
-
colors:
|
|
5648
|
+
userId: a,
|
|
5649
|
+
colors: i
|
|
5631
5650
|
}) => {
|
|
5632
5651
|
const o = pe(), [c, u] = P({
|
|
5633
5652
|
currentPassword: "",
|
|
@@ -5645,9 +5664,9 @@ const Ns = [
|
|
|
5645
5664
|
};
|
|
5646
5665
|
return b(), window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
|
|
5647
5666
|
}, []), !t) return null;
|
|
5648
|
-
const
|
|
5667
|
+
const I = (b) => {
|
|
5649
5668
|
const { name: j, value: q } = b.target;
|
|
5650
|
-
u((
|
|
5669
|
+
u((O) => ({ ...O, [j]: q })), x[j] && d((O) => ({ ...O, [j]: "" }));
|
|
5651
5670
|
}, C = (b) => {
|
|
5652
5671
|
p((j) => ({ ...j, [b]: !j[b] }));
|
|
5653
5672
|
}, g = () => {
|
|
@@ -5660,7 +5679,7 @@ const Ns = [
|
|
|
5660
5679
|
const { data: j } = await o.changePassword({
|
|
5661
5680
|
currentPassword: c.currentPassword,
|
|
5662
5681
|
newPassword: c.newPassword,
|
|
5663
|
-
userId:
|
|
5682
|
+
userId: a
|
|
5664
5683
|
});
|
|
5665
5684
|
j.success ? (n(j.message || "Password updated successfully"), u({
|
|
5666
5685
|
currentPassword: "",
|
|
@@ -5708,8 +5727,8 @@ const Ns = [
|
|
|
5708
5727
|
"div",
|
|
5709
5728
|
{
|
|
5710
5729
|
style: {
|
|
5711
|
-
backgroundColor:
|
|
5712
|
-
border: `1px solid ${
|
|
5730
|
+
backgroundColor: i.surface,
|
|
5731
|
+
border: `1px solid ${i.border}`,
|
|
5713
5732
|
borderRadius: "16px",
|
|
5714
5733
|
maxWidth: "440px",
|
|
5715
5734
|
width: "100%",
|
|
@@ -5748,11 +5767,11 @@ const Ns = [
|
|
|
5748
5767
|
width: "40px",
|
|
5749
5768
|
height: "40px",
|
|
5750
5769
|
borderRadius: "10px",
|
|
5751
|
-
background: `linear-gradient(135deg, ${
|
|
5770
|
+
background: `linear-gradient(135deg, ${i.accent}20, ${i.accent}40)`,
|
|
5752
5771
|
display: "flex",
|
|
5753
5772
|
alignItems: "center",
|
|
5754
5773
|
justifyContent: "center",
|
|
5755
|
-
color:
|
|
5774
|
+
color: i.accent,
|
|
5756
5775
|
flexShrink: 0
|
|
5757
5776
|
},
|
|
5758
5777
|
children: /* @__PURE__ */ r.jsx(ye, { size: 20 })
|
|
@@ -5762,7 +5781,7 @@ const Ns = [
|
|
|
5762
5781
|
"h3",
|
|
5763
5782
|
{
|
|
5764
5783
|
style: {
|
|
5765
|
-
color:
|
|
5784
|
+
color: i.textPrimary,
|
|
5766
5785
|
margin: 0,
|
|
5767
5786
|
fontSize: "18px",
|
|
5768
5787
|
fontWeight: 600,
|
|
@@ -5782,7 +5801,7 @@ const Ns = [
|
|
|
5782
5801
|
style: {
|
|
5783
5802
|
background: "transparent",
|
|
5784
5803
|
border: "none",
|
|
5785
|
-
color:
|
|
5804
|
+
color: i.textTertiary,
|
|
5786
5805
|
cursor: "pointer",
|
|
5787
5806
|
padding: "8px",
|
|
5788
5807
|
borderRadius: "8px",
|
|
@@ -5794,12 +5813,12 @@ const Ns = [
|
|
|
5794
5813
|
justifyContent: "center"
|
|
5795
5814
|
},
|
|
5796
5815
|
onMouseOver: (b) => {
|
|
5797
|
-
b.currentTarget.style.backgroundColor =
|
|
5816
|
+
b.currentTarget.style.backgroundColor = i.border, b.currentTarget.style.color = i.textPrimary;
|
|
5798
5817
|
},
|
|
5799
5818
|
onMouseOut: (b) => {
|
|
5800
|
-
b.currentTarget.style.backgroundColor = "transparent", b.currentTarget.style.color =
|
|
5819
|
+
b.currentTarget.style.backgroundColor = "transparent", b.currentTarget.style.color = i.textTertiary;
|
|
5801
5820
|
},
|
|
5802
|
-
children: /* @__PURE__ */ r.jsx(
|
|
5821
|
+
children: /* @__PURE__ */ r.jsx(Oe, { size: 20 })
|
|
5803
5822
|
}
|
|
5804
5823
|
)
|
|
5805
5824
|
]
|
|
@@ -5821,7 +5840,7 @@ const Ns = [
|
|
|
5821
5840
|
style: {
|
|
5822
5841
|
display: "block",
|
|
5823
5842
|
marginBottom: "8px",
|
|
5824
|
-
color:
|
|
5843
|
+
color: i.textPrimary,
|
|
5825
5844
|
fontSize: "14px",
|
|
5826
5845
|
fontWeight: 500,
|
|
5827
5846
|
lineHeight: "1.4"
|
|
@@ -5838,7 +5857,7 @@ const Ns = [
|
|
|
5838
5857
|
left: "14px",
|
|
5839
5858
|
top: "50%",
|
|
5840
5859
|
transform: "translateY(-50%)",
|
|
5841
|
-
color:
|
|
5860
|
+
color: i.textTertiary,
|
|
5842
5861
|
zIndex: 2
|
|
5843
5862
|
},
|
|
5844
5863
|
children: q
|
|
@@ -5852,24 +5871,24 @@ const Ns = [
|
|
|
5852
5871
|
name: b,
|
|
5853
5872
|
placeholder: `Enter ${j.toLowerCase()}`,
|
|
5854
5873
|
value: c[b],
|
|
5855
|
-
onChange:
|
|
5874
|
+
onChange: I,
|
|
5856
5875
|
style: {
|
|
5857
5876
|
width: "100%",
|
|
5858
5877
|
padding: "14px 48px 14px 44px",
|
|
5859
5878
|
borderRadius: "10px",
|
|
5860
|
-
border: `1.5px solid ${x[b] ?
|
|
5879
|
+
border: `1.5px solid ${x[b] ? i.error : i.border}`,
|
|
5861
5880
|
backgroundColor: "transparent",
|
|
5862
|
-
color:
|
|
5881
|
+
color: i.textPrimary,
|
|
5863
5882
|
fontSize: "15px",
|
|
5864
5883
|
outline: "none",
|
|
5865
5884
|
transition: "all 0.2s ease",
|
|
5866
5885
|
boxSizing: "border-box"
|
|
5867
5886
|
},
|
|
5868
|
-
onFocus: (
|
|
5869
|
-
|
|
5887
|
+
onFocus: (O) => {
|
|
5888
|
+
O.target.style.borderColor = i.accent, O.target.style.boxShadow = `0 0 0 3px ${i.accent}20`;
|
|
5870
5889
|
},
|
|
5871
|
-
onBlur: (
|
|
5872
|
-
|
|
5890
|
+
onBlur: (O) => {
|
|
5891
|
+
O.target.style.borderColor = x[b] ? i.error : i.border, O.target.style.boxShadow = "none";
|
|
5873
5892
|
}
|
|
5874
5893
|
}
|
|
5875
5894
|
),
|
|
@@ -5886,7 +5905,7 @@ const Ns = [
|
|
|
5886
5905
|
background: "transparent",
|
|
5887
5906
|
border: "none",
|
|
5888
5907
|
cursor: "pointer",
|
|
5889
|
-
color:
|
|
5908
|
+
color: i.textTertiary,
|
|
5890
5909
|
padding: "4px",
|
|
5891
5910
|
borderRadius: "4px",
|
|
5892
5911
|
width: "32px",
|
|
@@ -5895,13 +5914,13 @@ const Ns = [
|
|
|
5895
5914
|
alignItems: "center",
|
|
5896
5915
|
justifyContent: "center"
|
|
5897
5916
|
},
|
|
5898
|
-
onMouseOver: (
|
|
5899
|
-
|
|
5917
|
+
onMouseOver: (O) => {
|
|
5918
|
+
O.currentTarget.style.backgroundColor = i.border, O.currentTarget.style.color = i.textPrimary;
|
|
5900
5919
|
},
|
|
5901
|
-
onMouseOut: (
|
|
5902
|
-
|
|
5920
|
+
onMouseOut: (O) => {
|
|
5921
|
+
O.currentTarget.style.backgroundColor = "transparent", O.currentTarget.style.color = i.textTertiary;
|
|
5903
5922
|
},
|
|
5904
|
-
children: E[b] ? /* @__PURE__ */ r.jsx(
|
|
5923
|
+
children: E[b] ? /* @__PURE__ */ r.jsx(at, { size: 18 }) : /* @__PURE__ */ r.jsx(it, { size: 18 })
|
|
5905
5924
|
}
|
|
5906
5925
|
)
|
|
5907
5926
|
] }),
|
|
@@ -5910,7 +5929,7 @@ const Ns = [
|
|
|
5910
5929
|
{
|
|
5911
5930
|
style: {
|
|
5912
5931
|
fontSize: "13px",
|
|
5913
|
-
color:
|
|
5932
|
+
color: i.error,
|
|
5914
5933
|
marginTop: "6px",
|
|
5915
5934
|
display: "flex",
|
|
5916
5935
|
alignItems: "center",
|
|
@@ -5946,9 +5965,9 @@ const Ns = [
|
|
|
5946
5965
|
style: {
|
|
5947
5966
|
padding: "14px 24px",
|
|
5948
5967
|
borderRadius: "10px",
|
|
5949
|
-
border: `1.5px solid ${
|
|
5968
|
+
border: `1.5px solid ${i.border}`,
|
|
5950
5969
|
background: "transparent",
|
|
5951
|
-
color:
|
|
5970
|
+
color: i.textPrimary,
|
|
5952
5971
|
fontSize: "14px",
|
|
5953
5972
|
fontWeight: 500,
|
|
5954
5973
|
cursor: y ? "not-allowed" : "pointer",
|
|
@@ -5958,7 +5977,7 @@ const Ns = [
|
|
|
5958
5977
|
transition: "all 0.2s ease"
|
|
5959
5978
|
},
|
|
5960
5979
|
onMouseOver: (b) => {
|
|
5961
|
-
y || (b.currentTarget.style.backgroundColor =
|
|
5980
|
+
y || (b.currentTarget.style.backgroundColor = i.border, b.currentTarget.style.transform = "translateY(-1px)");
|
|
5962
5981
|
},
|
|
5963
5982
|
onMouseOut: (b) => {
|
|
5964
5983
|
y || (b.currentTarget.style.backgroundColor = "transparent", b.currentTarget.style.transform = "translateY(0)");
|
|
@@ -5975,7 +5994,7 @@ const Ns = [
|
|
|
5975
5994
|
padding: "14px 24px",
|
|
5976
5995
|
borderRadius: "10px",
|
|
5977
5996
|
border: "none",
|
|
5978
|
-
background: `linear-gradient(135deg, ${
|
|
5997
|
+
background: `linear-gradient(135deg, ${i.accent}, ${i.accent}E6)`,
|
|
5979
5998
|
color: "#fff",
|
|
5980
5999
|
fontSize: "14px",
|
|
5981
6000
|
fontWeight: 600,
|
|
@@ -5988,17 +6007,17 @@ const Ns = [
|
|
|
5988
6007
|
justifyContent: "center",
|
|
5989
6008
|
gap: "8px",
|
|
5990
6009
|
transition: "all 0.2s ease",
|
|
5991
|
-
boxShadow: y ? "none" : `0 4px 12px ${
|
|
6010
|
+
boxShadow: y ? "none" : `0 4px 12px ${i.accent}40`
|
|
5992
6011
|
},
|
|
5993
6012
|
onMouseOver: (b) => {
|
|
5994
|
-
y || (b.currentTarget.style.transform = "translateY(-1px)", b.currentTarget.style.boxShadow = `0 6px 20px ${
|
|
6013
|
+
y || (b.currentTarget.style.transform = "translateY(-1px)", b.currentTarget.style.boxShadow = `0 6px 20px ${i.accent}60`);
|
|
5995
6014
|
},
|
|
5996
6015
|
onMouseOut: (b) => {
|
|
5997
|
-
y || (b.currentTarget.style.transform = "translateY(0)", b.currentTarget.style.boxShadow = `0 4px 12px ${
|
|
6016
|
+
y || (b.currentTarget.style.transform = "translateY(0)", b.currentTarget.style.boxShadow = `0 4px 12px ${i.accent}40`);
|
|
5998
6017
|
},
|
|
5999
6018
|
children: y ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
6000
6019
|
/* @__PURE__ */ r.jsx(
|
|
6001
|
-
|
|
6020
|
+
ae,
|
|
6002
6021
|
{
|
|
6003
6022
|
size: 16,
|
|
6004
6023
|
style: {
|
|
@@ -6029,12 +6048,12 @@ const Ns = [
|
|
|
6029
6048
|
}
|
|
6030
6049
|
|
|
6031
6050
|
.change-password-modal::-webkit-scrollbar-thumb {
|
|
6032
|
-
background: ${
|
|
6051
|
+
background: ${i.border};
|
|
6033
6052
|
border-radius: 3px;
|
|
6034
6053
|
}
|
|
6035
6054
|
|
|
6036
6055
|
.change-password-modal::-webkit-scrollbar-thumb:hover {
|
|
6037
|
-
background: ${
|
|
6056
|
+
background: ${i.textTertiary};
|
|
6038
6057
|
}
|
|
6039
6058
|
|
|
6040
6059
|
/* Mobile responsiveness */
|
|
@@ -6063,8 +6082,8 @@ const Ns = [
|
|
|
6063
6082
|
onClose: e,
|
|
6064
6083
|
onVerify: n,
|
|
6065
6084
|
onSendOTP: s,
|
|
6066
|
-
verifyFormData:
|
|
6067
|
-
setVerifyFormData:
|
|
6085
|
+
verifyFormData: a,
|
|
6086
|
+
setVerifyFormData: i,
|
|
6068
6087
|
otpSent: o,
|
|
6069
6088
|
verifying: c,
|
|
6070
6089
|
user: u,
|
|
@@ -6073,7 +6092,7 @@ const Ns = [
|
|
|
6073
6092
|
}) => {
|
|
6074
6093
|
if (!t) return null;
|
|
6075
6094
|
const y = () => {
|
|
6076
|
-
e(),
|
|
6095
|
+
e(), i({ email: u?.email || "", otp: "" });
|
|
6077
6096
|
};
|
|
6078
6097
|
return /* @__PURE__ */ r.jsxs(
|
|
6079
6098
|
"div",
|
|
@@ -6101,7 +6120,7 @@ const Ns = [
|
|
|
6101
6120
|
className: "close-btn",
|
|
6102
6121
|
style: { color: x.textTertiary },
|
|
6103
6122
|
"aria-label": "Close verification modal",
|
|
6104
|
-
children: /* @__PURE__ */ r.jsx(
|
|
6123
|
+
children: /* @__PURE__ */ r.jsx(Oe, { size: 20, "aria-hidden": "true" })
|
|
6105
6124
|
}
|
|
6106
6125
|
)
|
|
6107
6126
|
] }),
|
|
@@ -6121,8 +6140,8 @@ const Ns = [
|
|
|
6121
6140
|
"input",
|
|
6122
6141
|
{
|
|
6123
6142
|
type: "email",
|
|
6124
|
-
value:
|
|
6125
|
-
onChange: (k) =>
|
|
6143
|
+
value: a.email,
|
|
6144
|
+
onChange: (k) => i((E) => ({
|
|
6126
6145
|
...E,
|
|
6127
6146
|
email: k.target.value
|
|
6128
6147
|
})),
|
|
@@ -6143,7 +6162,7 @@ const Ns = [
|
|
|
6143
6162
|
/* @__PURE__ */ r.jsx("label", { style: { color: x.textSecondary }, children: "OTP" }),
|
|
6144
6163
|
/* @__PURE__ */ r.jsxs("div", { className: "input-container", children: [
|
|
6145
6164
|
/* @__PURE__ */ r.jsx(
|
|
6146
|
-
|
|
6165
|
+
ar,
|
|
6147
6166
|
{
|
|
6148
6167
|
size: 18,
|
|
6149
6168
|
style: { color: x.textTertiary },
|
|
@@ -6154,8 +6173,8 @@ const Ns = [
|
|
|
6154
6173
|
"input",
|
|
6155
6174
|
{
|
|
6156
6175
|
type: "text",
|
|
6157
|
-
value:
|
|
6158
|
-
onChange: (k) =>
|
|
6176
|
+
value: a.otp,
|
|
6177
|
+
onChange: (k) => i((E) => ({
|
|
6159
6178
|
...E,
|
|
6160
6179
|
otp: k.target.value
|
|
6161
6180
|
})),
|
|
@@ -6184,7 +6203,7 @@ const Ns = [
|
|
|
6184
6203
|
},
|
|
6185
6204
|
"aria-label": c ? "Verifying email" : "Verify email",
|
|
6186
6205
|
children: [
|
|
6187
|
-
c ? /* @__PURE__ */ r.jsx(
|
|
6206
|
+
c ? /* @__PURE__ */ r.jsx(ae, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ r.jsx(ue, { size: 16, "aria-hidden": "true" }),
|
|
6188
6207
|
c ? "Verifying..." : "Verify Email"
|
|
6189
6208
|
]
|
|
6190
6209
|
}
|
|
@@ -6201,7 +6220,7 @@ const Ns = [
|
|
|
6201
6220
|
},
|
|
6202
6221
|
"aria-label": c ? "Sending OTP" : "Send OTP",
|
|
6203
6222
|
children: [
|
|
6204
|
-
c ? /* @__PURE__ */ r.jsx(
|
|
6223
|
+
c ? /* @__PURE__ */ r.jsx(ae, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ r.jsx(ct, { size: 16, "aria-hidden": "true" }),
|
|
6205
6224
|
c ? "Sending..." : "Send OTP"
|
|
6206
6225
|
]
|
|
6207
6226
|
}
|
|
@@ -6361,17 +6380,17 @@ const Ns = [
|
|
|
6361
6380
|
]
|
|
6362
6381
|
}
|
|
6363
6382
|
);
|
|
6364
|
-
},
|
|
6383
|
+
}, xa = ({
|
|
6365
6384
|
darkMode: t = !0,
|
|
6366
6385
|
homeUrl: e,
|
|
6367
6386
|
onLogout: n,
|
|
6368
6387
|
onVerify: s,
|
|
6369
|
-
primaryColor:
|
|
6388
|
+
primaryColor: a = "#00C212"
|
|
6370
6389
|
}) => {
|
|
6371
|
-
const
|
|
6390
|
+
const i = pe(), [o, c] = P(null), [u, x] = P(), [d, y] = P(!0), [k, E] = P(!1), [p, w] = P(!1), [h, I] = P(!1), [C, g] = P(!1), [A, N] = P(!1), [b, j] = P(!1), [q, O] = P(!1), [X, W] = P(!1), [T, G] = P(null), [R, z] = P(!1), [M, K] = P({
|
|
6372
6391
|
email: "",
|
|
6373
6392
|
otp: ""
|
|
6374
|
-
}), [H,
|
|
6393
|
+
}), [H, F] = P(!1), [Y, l] = P(!1);
|
|
6375
6394
|
ee(() => {
|
|
6376
6395
|
if (typeof window < "u") {
|
|
6377
6396
|
const v = () => c(window.innerWidth);
|
|
@@ -6383,7 +6402,7 @@ const Ns = [
|
|
|
6383
6402
|
}, S = () => {
|
|
6384
6403
|
W(!0);
|
|
6385
6404
|
const v = setTimeout(() => {
|
|
6386
|
-
|
|
6405
|
+
O(!1), W(!1);
|
|
6387
6406
|
}, 150);
|
|
6388
6407
|
return () => clearTimeout(v);
|
|
6389
6408
|
};
|
|
@@ -6407,11 +6426,11 @@ const Ns = [
|
|
|
6407
6426
|
}
|
|
6408
6427
|
try {
|
|
6409
6428
|
l(!0);
|
|
6410
|
-
const v = await
|
|
6429
|
+
const v = await i.requestEmailVerificationOTP({
|
|
6411
6430
|
userId: u.id,
|
|
6412
6431
|
email: M.email
|
|
6413
6432
|
}), U = v?.data?.success ?? v?.success, V = v?.data?.message ?? v?.message;
|
|
6414
|
-
U ? (m("success", V || "OTP sent to email!"),
|
|
6433
|
+
U ? (m("success", V || "OTP sent to email!"), F(!0)) : m("error", V || "Failed to send OTP");
|
|
6415
6434
|
} catch (v) {
|
|
6416
6435
|
const U = v?.response?.data?.message || v?.message || "Server error";
|
|
6417
6436
|
m("error", U);
|
|
@@ -6429,14 +6448,14 @@ const Ns = [
|
|
|
6429
6448
|
}
|
|
6430
6449
|
try {
|
|
6431
6450
|
l(!0);
|
|
6432
|
-
const U = await
|
|
6451
|
+
const U = await i.verifyEmail({
|
|
6433
6452
|
email: M.email,
|
|
6434
6453
|
otp: M.otp
|
|
6435
6454
|
}), V = U?.data?.success ?? U?.success, Z = U?.data?.message ?? U?.message;
|
|
6436
6455
|
if (V) {
|
|
6437
6456
|
m("success", Z || "Email verified!");
|
|
6438
6457
|
const de = { ...u, isVerified: !0 };
|
|
6439
|
-
x(de), typeof s == "function" && s(de), K({ email: de.email, otp: "" }),
|
|
6458
|
+
x(de), typeof s == "function" && s(de), K({ email: de.email, otp: "" }), F(!1), j?.(!1);
|
|
6440
6459
|
} else
|
|
6441
6460
|
m("error", Z || "Verification failed");
|
|
6442
6461
|
} catch (U) {
|
|
@@ -6448,7 +6467,7 @@ const Ns = [
|
|
|
6448
6467
|
}, oe = async (v) => {
|
|
6449
6468
|
if (!u) return !1;
|
|
6450
6469
|
try {
|
|
6451
|
-
const U = await
|
|
6470
|
+
const U = await i.updateUser({
|
|
6452
6471
|
userId: u.id,
|
|
6453
6472
|
avatarUrl: v
|
|
6454
6473
|
});
|
|
@@ -6470,7 +6489,7 @@ const Ns = [
|
|
|
6470
6489
|
if (u) {
|
|
6471
6490
|
w(!0);
|
|
6472
6491
|
try {
|
|
6473
|
-
const v = u.email, U = await
|
|
6492
|
+
const v = u.email, U = await i.updateUser({
|
|
6474
6493
|
userId: u.id,
|
|
6475
6494
|
...u
|
|
6476
6495
|
});
|
|
@@ -6496,7 +6515,7 @@ const Ns = [
|
|
|
6496
6515
|
}
|
|
6497
6516
|
}, le = async (v) => {
|
|
6498
6517
|
try {
|
|
6499
|
-
const U = await
|
|
6518
|
+
const U = await i.checkIfUserExists(v);
|
|
6500
6519
|
U?.success === !0 && U?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), x(null));
|
|
6501
6520
|
} catch (U) {
|
|
6502
6521
|
console.error("⚠️ User validation request failed:", U);
|
|
@@ -6506,9 +6525,9 @@ const Ns = [
|
|
|
6506
6525
|
(async () => {
|
|
6507
6526
|
try {
|
|
6508
6527
|
y(!0);
|
|
6509
|
-
const U = await
|
|
6528
|
+
const U = await i.checkUserSession();
|
|
6510
6529
|
if (U.user?.id) {
|
|
6511
|
-
const V = U.user.id, Z = await
|
|
6530
|
+
const V = U.user.id, Z = await i.getUserProfile({ userId: V });
|
|
6512
6531
|
if (Z.user) {
|
|
6513
6532
|
const de = Z.user;
|
|
6514
6533
|
x(de), le(V);
|
|
@@ -6536,8 +6555,8 @@ const Ns = [
|
|
|
6536
6555
|
textPrimary: "#ffffff",
|
|
6537
6556
|
textSecondary: "#d4d4d8",
|
|
6538
6557
|
textTertiary: "#a1a1aa",
|
|
6539
|
-
accent:
|
|
6540
|
-
accentHover: ge(
|
|
6558
|
+
accent: a,
|
|
6559
|
+
accentHover: ge(a, -15),
|
|
6541
6560
|
success: "#10b981",
|
|
6542
6561
|
error: "#ef4444",
|
|
6543
6562
|
border: "#27272a",
|
|
@@ -6550,8 +6569,8 @@ const Ns = [
|
|
|
6550
6569
|
textPrimary: "#18181b",
|
|
6551
6570
|
textSecondary: "#52525b",
|
|
6552
6571
|
textTertiary: "#71717a",
|
|
6553
|
-
accent:
|
|
6554
|
-
accentHover: ge(
|
|
6572
|
+
accent: a,
|
|
6573
|
+
accentHover: ge(a, -15),
|
|
6555
6574
|
success: "#10b981",
|
|
6556
6575
|
error: "#ef4444",
|
|
6557
6576
|
border: "#e4e4e7",
|
|
@@ -6582,7 +6601,7 @@ const Ns = [
|
|
|
6582
6601
|
},
|
|
6583
6602
|
children: [
|
|
6584
6603
|
/* @__PURE__ */ r.jsx(
|
|
6585
|
-
|
|
6604
|
+
ae,
|
|
6586
6605
|
{
|
|
6587
6606
|
size: 40,
|
|
6588
6607
|
color: _.accent,
|
|
@@ -6815,7 +6834,7 @@ const Ns = [
|
|
|
6815
6834
|
/* @__PURE__ */ r.jsx(
|
|
6816
6835
|
"button",
|
|
6817
6836
|
{
|
|
6818
|
-
onClick: () =>
|
|
6837
|
+
onClick: () => I(!0),
|
|
6819
6838
|
style: {
|
|
6820
6839
|
position: "absolute",
|
|
6821
6840
|
bottom: "8px",
|
|
@@ -6920,7 +6939,7 @@ const Ns = [
|
|
|
6920
6939
|
flex: o && window.innerWidth < 1024 ? "1" : "auto"
|
|
6921
6940
|
},
|
|
6922
6941
|
children: [
|
|
6923
|
-
/* @__PURE__ */ r.jsx(
|
|
6942
|
+
/* @__PURE__ */ r.jsx(Oe, { size: 16, "aria-hidden": "true" }),
|
|
6924
6943
|
"Cancel"
|
|
6925
6944
|
]
|
|
6926
6945
|
}
|
|
@@ -6951,7 +6970,7 @@ const Ns = [
|
|
|
6951
6970
|
},
|
|
6952
6971
|
children: [
|
|
6953
6972
|
p ? /* @__PURE__ */ r.jsx(
|
|
6954
|
-
|
|
6973
|
+
ae,
|
|
6955
6974
|
{
|
|
6956
6975
|
size: 16,
|
|
6957
6976
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -7017,7 +7036,7 @@ const Ns = [
|
|
|
7017
7036
|
},
|
|
7018
7037
|
children: [
|
|
7019
7038
|
R ? /* @__PURE__ */ r.jsx(
|
|
7020
|
-
|
|
7039
|
+
ae,
|
|
7021
7040
|
{
|
|
7022
7041
|
size: 14,
|
|
7023
7042
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -7051,9 +7070,9 @@ const Ns = [
|
|
|
7051
7070
|
width: "100%",
|
|
7052
7071
|
boxSizing: "border-box"
|
|
7053
7072
|
},
|
|
7054
|
-
onClick: () =>
|
|
7073
|
+
onClick: () => O(!q),
|
|
7055
7074
|
children: [
|
|
7056
|
-
/* @__PURE__ */ r.jsx(
|
|
7075
|
+
/* @__PURE__ */ r.jsx(as, { size: 16, "aria-hidden": "true" }),
|
|
7057
7076
|
"More Actions"
|
|
7058
7077
|
]
|
|
7059
7078
|
}
|
|
@@ -7268,7 +7287,7 @@ const Ns = [
|
|
|
7268
7287
|
style: {
|
|
7269
7288
|
padding: "12px",
|
|
7270
7289
|
borderRadius: "8px",
|
|
7271
|
-
border: `1px solid ${
|
|
7290
|
+
border: `1px solid ${a}`,
|
|
7272
7291
|
backgroundColor: "transparent",
|
|
7273
7292
|
color: _.textPrimary,
|
|
7274
7293
|
fontSize: "12px",
|
|
@@ -7332,7 +7351,7 @@ const Ns = [
|
|
|
7332
7351
|
gap: "8px"
|
|
7333
7352
|
},
|
|
7334
7353
|
children: [
|
|
7335
|
-
/* @__PURE__ */ r.jsx(
|
|
7354
|
+
/* @__PURE__ */ r.jsx(ir, { size: 20, "aria-hidden": "true" }),
|
|
7336
7355
|
"Security Status"
|
|
7337
7356
|
]
|
|
7338
7357
|
}
|
|
@@ -7440,11 +7459,11 @@ const Ns = [
|
|
|
7440
7459
|
}
|
|
7441
7460
|
),
|
|
7442
7461
|
/* @__PURE__ */ r.jsx(
|
|
7443
|
-
|
|
7462
|
+
Ls,
|
|
7444
7463
|
{
|
|
7445
7464
|
isOpen: h,
|
|
7446
7465
|
onClose: () => {
|
|
7447
|
-
|
|
7466
|
+
I(!1);
|
|
7448
7467
|
},
|
|
7449
7468
|
onUpdate: oe,
|
|
7450
7469
|
colors: _
|
|
@@ -7462,7 +7481,7 @@ const Ns = [
|
|
|
7462
7481
|
}
|
|
7463
7482
|
),
|
|
7464
7483
|
/* @__PURE__ */ r.jsx(
|
|
7465
|
-
|
|
7484
|
+
Fs,
|
|
7466
7485
|
{
|
|
7467
7486
|
userId: u.id,
|
|
7468
7487
|
isOpen: A,
|
|
@@ -7477,7 +7496,7 @@ const Ns = [
|
|
|
7477
7496
|
{
|
|
7478
7497
|
isOpen: b,
|
|
7479
7498
|
onClose: () => {
|
|
7480
|
-
j(!1),
|
|
7499
|
+
j(!1), F(!1), K({ email: u?.email || "", otp: "" });
|
|
7481
7500
|
},
|
|
7482
7501
|
onVerify: ne,
|
|
7483
7502
|
onSendOTP: D,
|
|
@@ -7582,13 +7601,13 @@ const Ns = [
|
|
|
7582
7601
|
]
|
|
7583
7602
|
}
|
|
7584
7603
|
);
|
|
7585
|
-
},
|
|
7604
|
+
}, ha = ({
|
|
7586
7605
|
darkMode: t = !0,
|
|
7587
7606
|
primaryColor: e = "#3b82f6",
|
|
7588
7607
|
onLogout: n,
|
|
7589
7608
|
varient: s = "classic",
|
|
7590
|
-
propUser:
|
|
7591
|
-
className:
|
|
7609
|
+
propUser: a,
|
|
7610
|
+
className: i = "",
|
|
7592
7611
|
// New URL props with defaults
|
|
7593
7612
|
profileUrl: o,
|
|
7594
7613
|
settingsUrl: c,
|
|
@@ -7602,7 +7621,7 @@ const Ns = [
|
|
|
7602
7621
|
viewProfileLabel: E = "View Profile",
|
|
7603
7622
|
logoutLabel: p = "Sign Out"
|
|
7604
7623
|
}) => {
|
|
7605
|
-
const w = pe(), [h,
|
|
7624
|
+
const w = pe(), [h, I] = P(!1), [C, g] = P(null), [A, N] = P(!0), [b, j] = P(null), q = dt(null), O = dt(null), [X, W] = P(!1), [T, G] = P(!1);
|
|
7606
7625
|
ee(() => {
|
|
7607
7626
|
if (typeof window > "u") return;
|
|
7608
7627
|
const l = () => {
|
|
@@ -7613,10 +7632,10 @@ const Ns = [
|
|
|
7613
7632
|
let l = !0;
|
|
7614
7633
|
return (async () => {
|
|
7615
7634
|
try {
|
|
7616
|
-
if (N(!0), j(null),
|
|
7617
|
-
if (!
|
|
7635
|
+
if (N(!0), j(null), a) {
|
|
7636
|
+
if (!a.id || !a.name || !a.email)
|
|
7618
7637
|
throw new Error("Invalid user data provided");
|
|
7619
|
-
l && g(
|
|
7638
|
+
l && g(a);
|
|
7620
7639
|
return;
|
|
7621
7640
|
}
|
|
7622
7641
|
const S = await w.checkUserSession();
|
|
@@ -7640,11 +7659,11 @@ const Ns = [
|
|
|
7640
7659
|
})(), () => {
|
|
7641
7660
|
l = !1;
|
|
7642
7661
|
};
|
|
7643
|
-
}, [
|
|
7662
|
+
}, [a, w]), ee(() => {
|
|
7644
7663
|
if (typeof window > "u") return;
|
|
7645
7664
|
const l = () => {
|
|
7646
|
-
if (!h || !
|
|
7647
|
-
const m =
|
|
7665
|
+
if (!h || !O.current) return;
|
|
7666
|
+
const m = O.current.getBoundingClientRect(), S = window.innerWidth, D = window.innerHeight, ne = 280, oe = S - m.right, B = m.left;
|
|
7648
7667
|
D - m.bottom;
|
|
7649
7668
|
const le = oe >= ne || oe > B;
|
|
7650
7669
|
W(le);
|
|
@@ -7654,11 +7673,11 @@ const Ns = [
|
|
|
7654
7673
|
if (typeof window > "u" || typeof document > "u")
|
|
7655
7674
|
return;
|
|
7656
7675
|
const l = (D) => {
|
|
7657
|
-
q.current && !q.current.contains(D.target) && !
|
|
7676
|
+
q.current && !q.current.contains(D.target) && !O.current?.contains(D.target) && I(!1);
|
|
7658
7677
|
}, m = (D) => {
|
|
7659
|
-
D.key === "Escape" &&
|
|
7678
|
+
D.key === "Escape" && I(!1);
|
|
7660
7679
|
}, S = () => {
|
|
7661
|
-
h &&
|
|
7680
|
+
h && I(!1);
|
|
7662
7681
|
};
|
|
7663
7682
|
return h && (document.addEventListener("mousedown", l), document.addEventListener("keydown", m), window.addEventListener("scroll", S)), () => {
|
|
7664
7683
|
document.removeEventListener("mousedown", l), document.removeEventListener("keydown", m), window.removeEventListener("scroll", S);
|
|
@@ -7883,10 +7902,10 @@ const Ns = [
|
|
|
7883
7902
|
}, M = async () => {
|
|
7884
7903
|
j(null), N(!0);
|
|
7885
7904
|
try {
|
|
7886
|
-
if (
|
|
7887
|
-
if (!
|
|
7905
|
+
if (a) {
|
|
7906
|
+
if (!a.id || !a.name || !a.email)
|
|
7888
7907
|
throw new Error("Invalid user data provided");
|
|
7889
|
-
g(
|
|
7908
|
+
g(a);
|
|
7890
7909
|
return;
|
|
7891
7910
|
}
|
|
7892
7911
|
const l = await w.checkUserSession();
|
|
@@ -7908,7 +7927,7 @@ const Ns = [
|
|
|
7908
7927
|
}
|
|
7909
7928
|
}, K = (l, m) => {
|
|
7910
7929
|
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), m());
|
|
7911
|
-
}, H = () => o || C?.profileUrl,
|
|
7930
|
+
}, H = () => o || C?.profileUrl, F = () => {
|
|
7912
7931
|
const l = H();
|
|
7913
7932
|
l && window.open(l, "_self", "noopener,noreferrer");
|
|
7914
7933
|
}, Y = () => {
|
|
@@ -7919,16 +7938,16 @@ const Ns = [
|
|
|
7919
7938
|
{
|
|
7920
7939
|
style: z.wrapper,
|
|
7921
7940
|
ref: q,
|
|
7922
|
-
className:
|
|
7941
|
+
className: i,
|
|
7923
7942
|
role: "menu",
|
|
7924
7943
|
"aria-label": "User menu",
|
|
7925
7944
|
children: [
|
|
7926
7945
|
s === "classic" ? /* @__PURE__ */ r.jsx(
|
|
7927
7946
|
"div",
|
|
7928
7947
|
{
|
|
7929
|
-
ref:
|
|
7930
|
-
onClick: () =>
|
|
7931
|
-
onKeyDown: (l) => K(l, () =>
|
|
7948
|
+
ref: O,
|
|
7949
|
+
onClick: () => I((l) => !l),
|
|
7950
|
+
onKeyDown: (l) => K(l, () => I((m) => !m)),
|
|
7932
7951
|
tabIndex: 0,
|
|
7933
7952
|
role: "button",
|
|
7934
7953
|
"aria-haspopup": "true",
|
|
@@ -7977,10 +7996,10 @@ const Ns = [
|
|
|
7977
7996
|
) : /* @__PURE__ */ r.jsxs(
|
|
7978
7997
|
"div",
|
|
7979
7998
|
{
|
|
7980
|
-
ref:
|
|
7999
|
+
ref: O,
|
|
7981
8000
|
style: z.avatarButton,
|
|
7982
|
-
onClick: () =>
|
|
7983
|
-
onKeyDown: (l) => K(l, () =>
|
|
8001
|
+
onClick: () => I((l) => !l),
|
|
8002
|
+
onKeyDown: (l) => K(l, () => I((m) => !m)),
|
|
7984
8003
|
tabIndex: 0,
|
|
7985
8004
|
role: "button",
|
|
7986
8005
|
"aria-haspopup": "true",
|
|
@@ -8065,14 +8084,14 @@ const Ns = [
|
|
|
8065
8084
|
"button",
|
|
8066
8085
|
{
|
|
8067
8086
|
style: z.menuItem,
|
|
8068
|
-
onClick:
|
|
8087
|
+
onClick: F,
|
|
8069
8088
|
onMouseOver: (l) => {
|
|
8070
8089
|
l.currentTarget.style.backgroundColor = R.surfaceHover;
|
|
8071
8090
|
},
|
|
8072
8091
|
onMouseOut: (l) => {
|
|
8073
8092
|
l.currentTarget.style.backgroundColor = "transparent";
|
|
8074
8093
|
},
|
|
8075
|
-
onKeyDown: (l) => K(l,
|
|
8094
|
+
onKeyDown: (l) => K(l, F),
|
|
8076
8095
|
role: "menuitem",
|
|
8077
8096
|
tabIndex: 0,
|
|
8078
8097
|
children: [
|
|
@@ -8096,7 +8115,7 @@ const Ns = [
|
|
|
8096
8115
|
role: "menuitem",
|
|
8097
8116
|
tabIndex: 0,
|
|
8098
8117
|
children: [
|
|
8099
|
-
/* @__PURE__ */ r.jsx(
|
|
8118
|
+
/* @__PURE__ */ r.jsx(Os, { style: z.icon, "aria-hidden": "true" }),
|
|
8100
8119
|
/* @__PURE__ */ r.jsx("span", { style: z.menuItemText, children: k })
|
|
8101
8120
|
]
|
|
8102
8121
|
}
|
|
@@ -8178,13 +8197,13 @@ const Ns = [
|
|
|
8178
8197
|
]
|
|
8179
8198
|
}
|
|
8180
8199
|
);
|
|
8181
|
-
},
|
|
8200
|
+
}, ma = ({
|
|
8182
8201
|
user: t,
|
|
8183
8202
|
darkMode: e = !0,
|
|
8184
8203
|
primaryColor: n = "#00C212",
|
|
8185
8204
|
onVerify: s
|
|
8186
8205
|
}) => {
|
|
8187
|
-
const
|
|
8206
|
+
const a = pe();
|
|
8188
8207
|
if (!t)
|
|
8189
8208
|
return /* @__PURE__ */ r.jsxs(
|
|
8190
8209
|
"div",
|
|
@@ -8208,7 +8227,7 @@ const Ns = [
|
|
|
8208
8227
|
]
|
|
8209
8228
|
}
|
|
8210
8229
|
);
|
|
8211
|
-
const [
|
|
8230
|
+
const [i, o] = P(!1), [c, u] = P({
|
|
8212
8231
|
email: t?.email || "",
|
|
8213
8232
|
otp: ""
|
|
8214
8233
|
}), [x, d] = P(!1), [y, k] = P(!1), [E, p] = P(null);
|
|
@@ -8219,8 +8238,8 @@ const Ns = [
|
|
|
8219
8238
|
}
|
|
8220
8239
|
}, []);
|
|
8221
8240
|
const w = (b, j) => {
|
|
8222
|
-
let q = parseInt(b.replace("#", ""), 16),
|
|
8223
|
-
return
|
|
8241
|
+
let q = parseInt(b.replace("#", ""), 16), O = (q >> 16) + j, X = (q >> 8 & 255) + j, W = (q & 255) + j;
|
|
8242
|
+
return O = Math.min(255, Math.max(0, O)), X = Math.min(255, Math.max(0, X)), W = Math.min(255, Math.max(0, W)), `#${(W | X << 8 | O << 16).toString(16).padStart(6, "0")}`;
|
|
8224
8243
|
}, h = e ? {
|
|
8225
8244
|
surface: "#000000",
|
|
8226
8245
|
textPrimary: "#ffffff",
|
|
@@ -8245,53 +8264,53 @@ const Ns = [
|
|
|
8245
8264
|
ee(() => {
|
|
8246
8265
|
t?.email && u((b) => ({ ...b, email: t.email }));
|
|
8247
8266
|
}, [t?.email]);
|
|
8248
|
-
const
|
|
8267
|
+
const I = (b, j) => {
|
|
8249
8268
|
p({ type: b, message: j }), setTimeout(() => p(null), 3e3);
|
|
8250
8269
|
}, C = async () => {
|
|
8251
8270
|
if (!c.email || !/\S+@\S+\.\S+/.test(c.email)) {
|
|
8252
|
-
|
|
8271
|
+
I("error", "Please enter a valid email");
|
|
8253
8272
|
return;
|
|
8254
8273
|
}
|
|
8255
8274
|
if (!t?.id) {
|
|
8256
|
-
|
|
8275
|
+
I("error", "User ID missing");
|
|
8257
8276
|
return;
|
|
8258
8277
|
}
|
|
8259
8278
|
try {
|
|
8260
8279
|
k(!0);
|
|
8261
|
-
const b = await
|
|
8280
|
+
const b = await a.requestEmailVerificationOTP({
|
|
8262
8281
|
userId: t.id,
|
|
8263
8282
|
email: c.email
|
|
8264
8283
|
});
|
|
8265
8284
|
if (console.log("Send OTP response:", b), b.success || b.data?.success) {
|
|
8266
8285
|
const j = b.message || b.data?.message || "OTP sent!";
|
|
8267
|
-
|
|
8286
|
+
I("success", j), d(!0);
|
|
8268
8287
|
} else {
|
|
8269
8288
|
const j = b.message || b.data?.message || "Failed to send OTP";
|
|
8270
|
-
|
|
8289
|
+
I("error", j);
|
|
8271
8290
|
}
|
|
8272
8291
|
} catch (b) {
|
|
8273
|
-
console.error("Send OTP error:", b),
|
|
8292
|
+
console.error("Send OTP error:", b), I("error", b.message || "Server error");
|
|
8274
8293
|
} finally {
|
|
8275
8294
|
k(!1);
|
|
8276
8295
|
}
|
|
8277
8296
|
}, g = async (b) => {
|
|
8278
8297
|
if (b.preventDefault(), !c.email || !c.otp) {
|
|
8279
|
-
|
|
8298
|
+
I("error", "Please fill in all fields");
|
|
8280
8299
|
return;
|
|
8281
8300
|
}
|
|
8282
8301
|
try {
|
|
8283
8302
|
k(!0);
|
|
8284
|
-
const j = await
|
|
8303
|
+
const j = await a.verifyEmail({
|
|
8285
8304
|
email: c.email,
|
|
8286
8305
|
otp: c.otp
|
|
8287
8306
|
});
|
|
8288
8307
|
if (j.success) {
|
|
8289
8308
|
const q = { ...t, isVerified: !0 };
|
|
8290
|
-
s?.(q),
|
|
8309
|
+
s?.(q), I("success", j.message || "Email verified!"), d(!1), u({ email: t.email, otp: "" });
|
|
8291
8310
|
} else
|
|
8292
|
-
|
|
8311
|
+
I("error", j.message || "Verification failed");
|
|
8293
8312
|
} catch (j) {
|
|
8294
|
-
|
|
8313
|
+
I("error", j.message || "Server error");
|
|
8295
8314
|
} finally {
|
|
8296
8315
|
k(!1);
|
|
8297
8316
|
}
|
|
@@ -8326,7 +8345,7 @@ const Ns = [
|
|
|
8326
8345
|
onSubmit: g,
|
|
8327
8346
|
style: {
|
|
8328
8347
|
width: "100%",
|
|
8329
|
-
maxWidth:
|
|
8348
|
+
maxWidth: i ? "340px" : "400px",
|
|
8330
8349
|
display: "flex",
|
|
8331
8350
|
flexDirection: "column",
|
|
8332
8351
|
gap: 20,
|
|
@@ -8509,7 +8528,7 @@ const Ns = [
|
|
|
8509
8528
|
fontSize: 14
|
|
8510
8529
|
},
|
|
8511
8530
|
children: [
|
|
8512
|
-
y ? /* @__PURE__ */ r.jsx(
|
|
8531
|
+
y ? /* @__PURE__ */ r.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ r.jsx(ue, { size: 16 }),
|
|
8513
8532
|
y ? "Verifying..." : "Verify Email"
|
|
8514
8533
|
]
|
|
8515
8534
|
}
|
|
@@ -8526,7 +8545,7 @@ const Ns = [
|
|
|
8526
8545
|
fontSize: 14
|
|
8527
8546
|
},
|
|
8528
8547
|
children: [
|
|
8529
|
-
y ? /* @__PURE__ */ r.jsx(
|
|
8548
|
+
y ? /* @__PURE__ */ r.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ r.jsx(ct, { size: 16 }),
|
|
8530
8549
|
y ? "Sending..." : "Send OTP"
|
|
8531
8550
|
]
|
|
8532
8551
|
}
|
|
@@ -8536,13 +8555,13 @@ const Ns = [
|
|
|
8536
8555
|
);
|
|
8537
8556
|
};
|
|
8538
8557
|
export {
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8558
|
+
ca as AuthixProvider,
|
|
8559
|
+
la as NeuctraAuthix,
|
|
8560
|
+
ma as ReactEmailVerification,
|
|
8561
|
+
pa as ReactSignedIn,
|
|
8562
|
+
fa as ReactSignedOut,
|
|
8563
|
+
ha as ReactUserButton,
|
|
8564
|
+
ua as ReactUserLogin,
|
|
8565
|
+
xa as ReactUserProfile,
|
|
8566
|
+
da as ReactUserSignUp
|
|
8548
8567
|
};
|