@akad/sdk 1.0.16 → 1.0.18
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/authAkad/index.d.ts +3 -1
- package/authAkad/types.d.ts +10 -0
- package/base.d.ts +1 -0
- package/main.d.ts +2 -0
- package/package.json +1 -1
- package/ts-lib.js +455 -448
- package/ts-lib.umd.cjs +6 -6
package/ts-lib.js
CHANGED
|
@@ -6,16 +6,16 @@ function Be(e, t) {
|
|
|
6
6
|
const { toString: nt } = Object.prototype, { getPrototypeOf: le } = Object, K = /* @__PURE__ */ ((e) => (t) => {
|
|
7
7
|
const n = nt.call(t);
|
|
8
8
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
9
|
-
})(/* @__PURE__ */ Object.create(null)), A = (e) => (e = e.toLowerCase(), (t) => K(t) === e),
|
|
9
|
+
})(/* @__PURE__ */ Object.create(null)), A = (e) => (e = e.toLowerCase(), (t) => K(t) === e), v = (e) => (t) => typeof t === e, { isArray: U } = Array, $ = v("undefined");
|
|
10
10
|
function rt(e) {
|
|
11
11
|
return e !== null && !$(e) && e.constructor !== null && !$(e.constructor) && R(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const qe = A("ArrayBuffer");
|
|
14
14
|
function st(e) {
|
|
15
15
|
let t;
|
|
16
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
16
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && qe(e.buffer), t;
|
|
17
17
|
}
|
|
18
|
-
const ot =
|
|
18
|
+
const ot = v("string"), R = v("function"), Fe = v("number"), W = (e) => e !== null && typeof e == "object", it = (e) => e === !0 || e === !1, M = (e) => {
|
|
19
19
|
if (K(e) !== "object")
|
|
20
20
|
return !1;
|
|
21
21
|
const t = le(e);
|
|
@@ -24,7 +24,7 @@ const ot = Q("string"), R = Q("function"), Le = Q("number"), W = (e) => e !== nu
|
|
|
24
24
|
let t;
|
|
25
25
|
return e && (typeof FormData == "function" && e instanceof FormData || R(e.append) && ((t = K(e)) === "formdata" || // detect form-data instance
|
|
26
26
|
t === "object" && R(e.toString) && e.toString() === "[object FormData]"));
|
|
27
|
-
}, ht = A("URLSearchParams"), [pt, mt, yt, gt] = ["ReadableStream", "Request", "Response", "Headers"].map(A),
|
|
27
|
+
}, ht = A("URLSearchParams"), [pt, mt, yt, gt] = ["ReadableStream", "Request", "Response", "Headers"].map(A), wt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
28
28
|
function I(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
29
29
|
if (e === null || typeof e > "u")
|
|
30
30
|
return;
|
|
@@ -33,10 +33,10 @@ function I(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
33
33
|
for (r = 0, s = e.length; r < s; r++)
|
|
34
34
|
t.call(null, e[r], r, e);
|
|
35
35
|
else {
|
|
36
|
-
const
|
|
36
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
37
37
|
let u;
|
|
38
|
-
for (r = 0; r <
|
|
39
|
-
u =
|
|
38
|
+
for (r = 0; r < i; r++)
|
|
39
|
+
u = o[r], t.call(null, e[u], u, e);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
function Ue(e, t) {
|
|
@@ -48,30 +48,30 @@ function Ue(e, t) {
|
|
|
48
48
|
return s;
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const Le = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, _e = (e) => !$(e) && e !== Le;
|
|
52
52
|
function re() {
|
|
53
53
|
const { caseless: e } = _e(this) && this || {}, t = {}, n = (r, s) => {
|
|
54
|
-
const
|
|
55
|
-
|
|
54
|
+
const o = e && Ue(t, s) || s;
|
|
55
|
+
M(t[o]) && M(r) ? t[o] = re(t[o], r) : M(r) ? t[o] = re({}, r) : U(r) ? t[o] = r.slice() : t[o] = r;
|
|
56
56
|
};
|
|
57
57
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
58
58
|
arguments[r] && I(arguments[r], n);
|
|
59
59
|
return t;
|
|
60
60
|
}
|
|
61
|
-
const
|
|
62
|
-
n && R(s) ? e[
|
|
63
|
-
}, { allOwnKeys: r }), e),
|
|
61
|
+
const bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
|
|
62
|
+
n && R(s) ? e[o] = Be(s, n) : e[o] = s;
|
|
63
|
+
}, { allOwnKeys: r }), e), Tt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), St = (e, t, n, r) => {
|
|
64
64
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
65
65
|
value: t.prototype
|
|
66
66
|
}), n && Object.assign(e.prototype, n);
|
|
67
|
-
},
|
|
68
|
-
let s,
|
|
67
|
+
}, Et = (e, t, n, r) => {
|
|
68
|
+
let s, o, i;
|
|
69
69
|
const u = {};
|
|
70
70
|
if (t = t || {}, e == null)
|
|
71
71
|
return t;
|
|
72
72
|
do {
|
|
73
|
-
for (s = Object.getOwnPropertyNames(e),
|
|
74
|
-
|
|
73
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
74
|
+
i = s[o], (!r || r(i, e, t)) && !u[i] && (t[i] = e[i], u[i] = !0);
|
|
75
75
|
e = n !== !1 && le(e);
|
|
76
76
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
77
77
|
return t;
|
|
@@ -85,7 +85,7 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
|
|
|
85
85
|
if (U(e))
|
|
86
86
|
return e;
|
|
87
87
|
let t = e.length;
|
|
88
|
-
if (!
|
|
88
|
+
if (!Fe(t))
|
|
89
89
|
return null;
|
|
90
90
|
const n = new Array(t);
|
|
91
91
|
for (; t-- > 0; )
|
|
@@ -95,8 +95,8 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
|
|
|
95
95
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
96
96
|
let s;
|
|
97
97
|
for (; (s = r.next()) && !s.done; ) {
|
|
98
|
-
const
|
|
99
|
-
t.call(e,
|
|
98
|
+
const o = s.value;
|
|
99
|
+
t.call(e, o[0], o[1]);
|
|
100
100
|
}
|
|
101
101
|
}, Nt = (e, t) => {
|
|
102
102
|
let n;
|
|
@@ -111,9 +111,9 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
|
|
|
111
111
|
}
|
|
112
112
|
), me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), xt = A("RegExp"), De = (e, t) => {
|
|
113
113
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
114
|
-
I(n, (s,
|
|
115
|
-
let
|
|
116
|
-
(
|
|
114
|
+
I(n, (s, o) => {
|
|
115
|
+
let i;
|
|
116
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
117
117
|
}), Object.defineProperties(e, r);
|
|
118
118
|
}, Bt = (e) => {
|
|
119
119
|
De(e, (t, n) => {
|
|
@@ -130,19 +130,19 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
|
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
-
},
|
|
133
|
+
}, qt = (e, t) => {
|
|
134
134
|
const n = {}, r = (s) => {
|
|
135
|
-
s.forEach((
|
|
136
|
-
n[
|
|
135
|
+
s.forEach((o) => {
|
|
136
|
+
n[o] = !0;
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
139
|
return U(e) ? r(e) : r(String(e).split(t)), n;
|
|
140
|
-
},
|
|
140
|
+
}, Ft = () => {
|
|
141
141
|
}, Ut = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Z = "abcdefghijklmnopqrstuvwxyz", ye = "0123456789", $e = {
|
|
142
142
|
DIGIT: ye,
|
|
143
143
|
ALPHA: Z,
|
|
144
144
|
ALPHA_DIGIT: Z + Z.toUpperCase() + ye
|
|
145
|
-
},
|
|
145
|
+
}, Lt = (e = 16, t = $e.ALPHA_DIGIT) => {
|
|
146
146
|
let n = "";
|
|
147
147
|
const { length: r } = t;
|
|
148
148
|
for (; e--; )
|
|
@@ -159,11 +159,11 @@ const Dt = (e) => {
|
|
|
159
159
|
return;
|
|
160
160
|
if (!("toJSON" in r)) {
|
|
161
161
|
t[s] = r;
|
|
162
|
-
const
|
|
163
|
-
return I(r, (
|
|
164
|
-
const f = n(
|
|
165
|
-
!$(f) && (
|
|
166
|
-
}), t[s] = void 0,
|
|
162
|
+
const o = U(r) ? [] : {};
|
|
163
|
+
return I(r, (i, u) => {
|
|
164
|
+
const f = n(i, s + 1);
|
|
165
|
+
!$(f) && (o[u] = f);
|
|
166
|
+
}), t[s] = void 0, o;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
return r;
|
|
@@ -171,15 +171,15 @@ const Dt = (e) => {
|
|
|
171
171
|
return n(e, 0);
|
|
172
172
|
}, $t = A("AsyncFunction"), It = (e) => e && (W(e) || R(e)) && R(e.then) && R(e.catch), c = {
|
|
173
173
|
isArray: U,
|
|
174
|
-
isArrayBuffer:
|
|
174
|
+
isArrayBuffer: qe,
|
|
175
175
|
isBuffer: rt,
|
|
176
176
|
isFormData: dt,
|
|
177
177
|
isArrayBufferView: st,
|
|
178
178
|
isString: ot,
|
|
179
|
-
isNumber:
|
|
179
|
+
isNumber: Fe,
|
|
180
180
|
isBoolean: it,
|
|
181
181
|
isObject: W,
|
|
182
|
-
isPlainObject:
|
|
182
|
+
isPlainObject: M,
|
|
183
183
|
isReadableStream: pt,
|
|
184
184
|
isRequest: mt,
|
|
185
185
|
isResponse: yt,
|
|
@@ -196,11 +196,11 @@ const Dt = (e) => {
|
|
|
196
196
|
isFileList: lt,
|
|
197
197
|
forEach: I,
|
|
198
198
|
merge: re,
|
|
199
|
-
extend:
|
|
200
|
-
trim:
|
|
201
|
-
stripBOM:
|
|
199
|
+
extend: bt,
|
|
200
|
+
trim: wt,
|
|
201
|
+
stripBOM: Tt,
|
|
202
202
|
inherits: St,
|
|
203
|
-
toFlatObject:
|
|
203
|
+
toFlatObject: Et,
|
|
204
204
|
kindOf: K,
|
|
205
205
|
kindOfTest: A,
|
|
206
206
|
endsWith: Rt,
|
|
@@ -213,24 +213,24 @@ const Dt = (e) => {
|
|
|
213
213
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
214
214
|
reduceDescriptors: De,
|
|
215
215
|
freezeMethods: Bt,
|
|
216
|
-
toObjectSet:
|
|
216
|
+
toObjectSet: qt,
|
|
217
217
|
toCamelCase: kt,
|
|
218
|
-
noop:
|
|
218
|
+
noop: Ft,
|
|
219
219
|
toFiniteNumber: Ut,
|
|
220
220
|
findKey: Ue,
|
|
221
|
-
global:
|
|
221
|
+
global: Le,
|
|
222
222
|
isContextDefined: _e,
|
|
223
223
|
ALPHABET: $e,
|
|
224
|
-
generateString:
|
|
224
|
+
generateString: Lt,
|
|
225
225
|
isSpecCompliantForm: _t,
|
|
226
226
|
toJSONObject: Dt,
|
|
227
227
|
isAsyncFn: $t,
|
|
228
228
|
isThenable: It
|
|
229
229
|
};
|
|
230
|
-
function
|
|
230
|
+
function y(e, t, n, r, s) {
|
|
231
231
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
|
|
232
232
|
}
|
|
233
|
-
c.inherits(
|
|
233
|
+
c.inherits(y, Error, {
|
|
234
234
|
toJSON: function() {
|
|
235
235
|
return {
|
|
236
236
|
// Standard
|
|
@@ -251,7 +251,7 @@ c.inherits(m, Error, {
|
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
|
-
const Ie =
|
|
254
|
+
const Ie = y.prototype, je = {};
|
|
255
255
|
[
|
|
256
256
|
"ERR_BAD_OPTION_VALUE",
|
|
257
257
|
"ERR_BAD_OPTION",
|
|
@@ -269,13 +269,13 @@ const Ie = m.prototype, je = {};
|
|
|
269
269
|
].forEach((e) => {
|
|
270
270
|
je[e] = { value: e };
|
|
271
271
|
});
|
|
272
|
-
Object.defineProperties(
|
|
272
|
+
Object.defineProperties(y, je);
|
|
273
273
|
Object.defineProperty(Ie, "isAxiosError", { value: !0 });
|
|
274
|
-
|
|
275
|
-
const
|
|
276
|
-
return c.toFlatObject(e,
|
|
274
|
+
y.from = (e, t, n, r, s, o) => {
|
|
275
|
+
const i = Object.create(Ie);
|
|
276
|
+
return c.toFlatObject(e, i, function(f) {
|
|
277
277
|
return f !== Error.prototype;
|
|
278
|
-
}, (u) => u !== "isAxiosError"),
|
|
278
|
+
}, (u) => u !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
279
279
|
};
|
|
280
280
|
const jt = null;
|
|
281
281
|
function se(e) {
|
|
@@ -285,27 +285,27 @@ function He(e) {
|
|
|
285
285
|
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
286
286
|
}
|
|
287
287
|
function ge(e, t, n) {
|
|
288
|
-
return e ? e.concat(t).map(function(s,
|
|
289
|
-
return s = He(s), !n &&
|
|
288
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
289
|
+
return s = He(s), !n && o ? "[" + s + "]" : s;
|
|
290
290
|
}).join(n ? "." : "") : t;
|
|
291
291
|
}
|
|
292
292
|
function Ht(e) {
|
|
293
293
|
return c.isArray(e) && !e.some(se);
|
|
294
294
|
}
|
|
295
|
-
const
|
|
295
|
+
const Jt = c.toFlatObject(c, {}, null, function(t) {
|
|
296
296
|
return /^is[A-Z]/.test(t);
|
|
297
297
|
});
|
|
298
|
-
function
|
|
298
|
+
function Q(e, t, n) {
|
|
299
299
|
if (!c.isObject(e))
|
|
300
300
|
throw new TypeError("target must be an object");
|
|
301
301
|
t = t || new FormData(), n = c.toFlatObject(n, {
|
|
302
302
|
metaTokens: !0,
|
|
303
303
|
dots: !1,
|
|
304
304
|
indexes: !1
|
|
305
|
-
}, !1, function(p,
|
|
306
|
-
return !c.isUndefined(
|
|
305
|
+
}, !1, function(p, w) {
|
|
306
|
+
return !c.isUndefined(w[p]);
|
|
307
307
|
});
|
|
308
|
-
const r = n.metaTokens, s = n.visitor || a,
|
|
308
|
+
const r = n.metaTokens, s = n.visitor || a, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
309
309
|
if (!c.isFunction(s))
|
|
310
310
|
throw new TypeError("visitor must be a function");
|
|
311
311
|
function l(h) {
|
|
@@ -314,26 +314,26 @@ function v(e, t, n) {
|
|
|
314
314
|
if (c.isDate(h))
|
|
315
315
|
return h.toISOString();
|
|
316
316
|
if (!f && c.isBlob(h))
|
|
317
|
-
throw new
|
|
317
|
+
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
318
318
|
return c.isArrayBuffer(h) || c.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
319
319
|
}
|
|
320
|
-
function a(h, p,
|
|
320
|
+
function a(h, p, w) {
|
|
321
321
|
let S = h;
|
|
322
|
-
if (h && !
|
|
322
|
+
if (h && !w && typeof h == "object") {
|
|
323
323
|
if (c.endsWith(p, "{}"))
|
|
324
324
|
p = r ? p : p.slice(0, -2), h = JSON.stringify(h);
|
|
325
325
|
else if (c.isArray(h) && Ht(h) || (c.isFileList(h) || c.endsWith(p, "[]")) && (S = c.toArray(h)))
|
|
326
326
|
return p = He(p), S.forEach(function(b, _) {
|
|
327
327
|
!(c.isUndefined(b) || b === null) && t.append(
|
|
328
328
|
// eslint-disable-next-line no-nested-ternary
|
|
329
|
-
|
|
329
|
+
i === !0 ? ge([p], _, o) : i === null ? p : p + "[]",
|
|
330
330
|
l(b)
|
|
331
331
|
);
|
|
332
332
|
}), !1;
|
|
333
333
|
}
|
|
334
|
-
return se(h) ? !0 : (t.append(ge(
|
|
334
|
+
return se(h) ? !0 : (t.append(ge(w, p, o), l(h)), !1);
|
|
335
335
|
}
|
|
336
|
-
const d = [],
|
|
336
|
+
const d = [], m = Object.assign(Jt, {
|
|
337
337
|
defaultVisitor: a,
|
|
338
338
|
convertValue: l,
|
|
339
339
|
isVisitable: se
|
|
@@ -348,7 +348,7 @@ function v(e, t, n) {
|
|
|
348
348
|
S,
|
|
349
349
|
c.isString(N) ? N.trim() : N,
|
|
350
350
|
p,
|
|
351
|
-
|
|
351
|
+
m
|
|
352
352
|
)) === !0 && g(S, p ? p.concat(N) : [N]);
|
|
353
353
|
}), d.pop();
|
|
354
354
|
}
|
|
@@ -357,7 +357,7 @@ function v(e, t, n) {
|
|
|
357
357
|
throw new TypeError("data must be an object");
|
|
358
358
|
return g(e), t;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function we(e) {
|
|
361
361
|
const t = {
|
|
362
362
|
"!": "%21",
|
|
363
363
|
"'": "%27",
|
|
@@ -372,35 +372,35 @@ function be(e) {
|
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
374
|
function fe(e, t) {
|
|
375
|
-
this._pairs = [], e &&
|
|
375
|
+
this._pairs = [], e && Q(e, this, t);
|
|
376
376
|
}
|
|
377
|
-
const
|
|
378
|
-
|
|
377
|
+
const Je = fe.prototype;
|
|
378
|
+
Je.append = function(t, n) {
|
|
379
379
|
this._pairs.push([t, n]);
|
|
380
380
|
};
|
|
381
|
-
|
|
381
|
+
Je.toString = function(t) {
|
|
382
382
|
const n = t ? function(r) {
|
|
383
|
-
return t.call(this, r,
|
|
384
|
-
} :
|
|
383
|
+
return t.call(this, r, we);
|
|
384
|
+
} : we;
|
|
385
385
|
return this._pairs.map(function(s) {
|
|
386
386
|
return n(s[0]) + "=" + n(s[1]);
|
|
387
387
|
}, "").join("&");
|
|
388
388
|
};
|
|
389
|
-
function
|
|
389
|
+
function Mt(e) {
|
|
390
390
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function Me(e, t, n) {
|
|
393
393
|
if (!t)
|
|
394
394
|
return e;
|
|
395
|
-
const r = n && n.encode ||
|
|
396
|
-
let
|
|
397
|
-
if (s ?
|
|
398
|
-
const
|
|
399
|
-
|
|
395
|
+
const r = n && n.encode || Mt, s = n && n.serialize;
|
|
396
|
+
let o;
|
|
397
|
+
if (s ? o = s(t, n) : o = c.isURLSearchParams(t) ? t.toString() : new fe(t, n).toString(r), o) {
|
|
398
|
+
const i = e.indexOf("#");
|
|
399
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
400
400
|
}
|
|
401
401
|
return e;
|
|
402
402
|
}
|
|
403
|
-
class
|
|
403
|
+
class be {
|
|
404
404
|
constructor() {
|
|
405
405
|
this.handlers = [];
|
|
406
406
|
}
|
|
@@ -454,33 +454,33 @@ class we {
|
|
|
454
454
|
});
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
const
|
|
457
|
+
const ze = {
|
|
458
458
|
silentJSONParsing: !0,
|
|
459
459
|
forcedJSONParsing: !0,
|
|
460
460
|
clarifyTimeoutError: !1
|
|
461
|
-
},
|
|
461
|
+
}, zt = typeof URLSearchParams < "u" ? URLSearchParams : fe, Vt = typeof FormData < "u" ? FormData : null, Gt = typeof Blob < "u" ? Blob : null, Kt = {
|
|
462
462
|
isBrowser: !0,
|
|
463
463
|
classes: {
|
|
464
|
-
URLSearchParams:
|
|
464
|
+
URLSearchParams: zt,
|
|
465
465
|
FormData: Vt,
|
|
466
466
|
Blob: Gt
|
|
467
467
|
},
|
|
468
468
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
469
|
-
}, de = typeof window < "u" && typeof document < "u",
|
|
470
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
469
|
+
}, de = typeof window < "u" && typeof document < "u", vt = ((e) => de && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Wt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
470
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Qt = de && window.location.href || "http://localhost", Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
471
471
|
__proto__: null,
|
|
472
472
|
hasBrowserEnv: de,
|
|
473
|
-
hasStandardBrowserEnv:
|
|
473
|
+
hasStandardBrowserEnv: vt,
|
|
474
474
|
hasStandardBrowserWebWorkerEnv: Wt,
|
|
475
|
-
origin:
|
|
475
|
+
origin: Qt
|
|
476
476
|
}, Symbol.toStringTag, { value: "Module" })), O = {
|
|
477
477
|
...Xt,
|
|
478
478
|
...Kt
|
|
479
479
|
};
|
|
480
480
|
function Zt(e, t) {
|
|
481
|
-
return
|
|
482
|
-
visitor: function(n, r, s,
|
|
483
|
-
return O.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) :
|
|
481
|
+
return Q(e, new O.classes.URLSearchParams(), Object.assign({
|
|
482
|
+
visitor: function(n, r, s, o) {
|
|
483
|
+
return O.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
484
484
|
}
|
|
485
485
|
}, t));
|
|
486
486
|
}
|
|
@@ -491,18 +491,18 @@ function en(e) {
|
|
|
491
491
|
const t = {}, n = Object.keys(e);
|
|
492
492
|
let r;
|
|
493
493
|
const s = n.length;
|
|
494
|
-
let
|
|
494
|
+
let o;
|
|
495
495
|
for (r = 0; r < s; r++)
|
|
496
|
-
|
|
496
|
+
o = n[r], t[o] = e[o];
|
|
497
497
|
return t;
|
|
498
498
|
}
|
|
499
499
|
function Ve(e) {
|
|
500
|
-
function t(n, r, s,
|
|
501
|
-
let
|
|
502
|
-
if (
|
|
500
|
+
function t(n, r, s, o) {
|
|
501
|
+
let i = n[o++];
|
|
502
|
+
if (i === "__proto__")
|
|
503
503
|
return !0;
|
|
504
|
-
const u = Number.isFinite(+
|
|
505
|
-
return
|
|
504
|
+
const u = Number.isFinite(+i), f = o >= n.length;
|
|
505
|
+
return i = !i && c.isArray(s) ? s.length : i, f ? (c.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !u) : ((!s[i] || !c.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && c.isArray(s[i]) && (s[i] = en(s[i])), !u);
|
|
506
506
|
}
|
|
507
507
|
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
508
508
|
const n = {};
|
|
@@ -523,11 +523,11 @@ function tn(e, t, n) {
|
|
|
523
523
|
return (n || JSON.stringify)(e);
|
|
524
524
|
}
|
|
525
525
|
const j = {
|
|
526
|
-
transitional:
|
|
526
|
+
transitional: ze,
|
|
527
527
|
adapter: ["xhr", "http", "fetch"],
|
|
528
528
|
transformRequest: [function(t, n) {
|
|
529
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1,
|
|
530
|
-
if (
|
|
529
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = c.isObject(t);
|
|
530
|
+
if (o && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
|
|
531
531
|
return s ? JSON.stringify(Ve(t)) : t;
|
|
532
532
|
if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
|
|
533
533
|
return t;
|
|
@@ -536,31 +536,31 @@ const j = {
|
|
|
536
536
|
if (c.isURLSearchParams(t))
|
|
537
537
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
538
538
|
let u;
|
|
539
|
-
if (
|
|
539
|
+
if (o) {
|
|
540
540
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
541
541
|
return Zt(t, this.formSerializer).toString();
|
|
542
542
|
if ((u = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
543
543
|
const f = this.env && this.env.FormData;
|
|
544
|
-
return
|
|
544
|
+
return Q(
|
|
545
545
|
u ? { "files[]": t } : t,
|
|
546
546
|
f && new f(),
|
|
547
547
|
this.formSerializer
|
|
548
548
|
);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
return
|
|
551
|
+
return o || s ? (n.setContentType("application/json", !1), tn(t)) : t;
|
|
552
552
|
}],
|
|
553
553
|
transformResponse: [function(t) {
|
|
554
554
|
const n = this.transitional || j.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
555
555
|
if (c.isResponse(t) || c.isReadableStream(t))
|
|
556
556
|
return t;
|
|
557
557
|
if (t && c.isString(t) && (r && !this.responseType || s)) {
|
|
558
|
-
const
|
|
558
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
559
559
|
try {
|
|
560
560
|
return JSON.parse(t);
|
|
561
561
|
} catch (u) {
|
|
562
|
-
if (
|
|
563
|
-
throw u.name === "SyntaxError" ?
|
|
562
|
+
if (i)
|
|
563
|
+
throw u.name === "SyntaxError" ? y.from(u, y.ERR_BAD_RESPONSE, this, null, this.response) : u;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
return t;
|
|
@@ -613,15 +613,15 @@ const nn = c.toObjectSet([
|
|
|
613
613
|
const t = {};
|
|
614
614
|
let n, r, s;
|
|
615
615
|
return e && e.split(`
|
|
616
|
-
`).forEach(function(
|
|
617
|
-
s =
|
|
616
|
+
`).forEach(function(i) {
|
|
617
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && nn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
618
618
|
}), t;
|
|
619
|
-
},
|
|
619
|
+
}, Te = Symbol("internals");
|
|
620
620
|
function D(e) {
|
|
621
621
|
return e && String(e).trim().toLowerCase();
|
|
622
622
|
}
|
|
623
|
-
function
|
|
624
|
-
return e === !1 || e == null ? e : c.isArray(e) ? e.map(
|
|
623
|
+
function z(e) {
|
|
624
|
+
return e === !1 || e == null ? e : c.isArray(e) ? e.map(z) : String(e);
|
|
625
625
|
}
|
|
626
626
|
function sn(e) {
|
|
627
627
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -648,36 +648,36 @@ function cn(e, t) {
|
|
|
648
648
|
const n = c.toCamelCase(" " + t);
|
|
649
649
|
["get", "set", "has"].forEach((r) => {
|
|
650
650
|
Object.defineProperty(e, r + n, {
|
|
651
|
-
value: function(s,
|
|
652
|
-
return this[r].call(this, t, s,
|
|
651
|
+
value: function(s, o, i) {
|
|
652
|
+
return this[r].call(this, t, s, o, i);
|
|
653
653
|
},
|
|
654
654
|
configurable: !0
|
|
655
655
|
});
|
|
656
656
|
});
|
|
657
657
|
}
|
|
658
|
-
let
|
|
658
|
+
let E = class {
|
|
659
659
|
constructor(t) {
|
|
660
660
|
t && this.set(t);
|
|
661
661
|
}
|
|
662
662
|
set(t, n, r) {
|
|
663
663
|
const s = this;
|
|
664
|
-
function
|
|
664
|
+
function o(u, f, l) {
|
|
665
665
|
const a = D(f);
|
|
666
666
|
if (!a)
|
|
667
667
|
throw new Error("header name must be a non-empty string");
|
|
668
668
|
const d = c.findKey(s, a);
|
|
669
|
-
(!d || s[d] === void 0 || l === !0 || l === void 0 && s[d] !== !1) && (s[d || f] =
|
|
669
|
+
(!d || s[d] === void 0 || l === !0 || l === void 0 && s[d] !== !1) && (s[d || f] = z(u));
|
|
670
670
|
}
|
|
671
|
-
const
|
|
671
|
+
const i = (u, f) => c.forEach(u, (l, a) => o(l, a, f));
|
|
672
672
|
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
673
|
-
|
|
673
|
+
i(t, n);
|
|
674
674
|
else if (c.isString(t) && (t = t.trim()) && !on(t))
|
|
675
|
-
|
|
675
|
+
i(rn(t), n);
|
|
676
676
|
else if (c.isHeaders(t))
|
|
677
677
|
for (const [u, f] of t.entries())
|
|
678
|
-
|
|
678
|
+
o(f, u, r);
|
|
679
679
|
else
|
|
680
|
-
t != null &&
|
|
680
|
+
t != null && o(n, t, r);
|
|
681
681
|
return this;
|
|
682
682
|
}
|
|
683
683
|
get(t, n) {
|
|
@@ -707,33 +707,33 @@ let T = class {
|
|
|
707
707
|
delete(t, n) {
|
|
708
708
|
const r = this;
|
|
709
709
|
let s = !1;
|
|
710
|
-
function i
|
|
711
|
-
if (
|
|
712
|
-
const u = c.findKey(r,
|
|
710
|
+
function o(i) {
|
|
711
|
+
if (i = D(i), i) {
|
|
712
|
+
const u = c.findKey(r, i);
|
|
713
713
|
u && (!n || Y(r, r[u], u, n)) && (delete r[u], s = !0);
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
return c.isArray(t) ? t.forEach(
|
|
716
|
+
return c.isArray(t) ? t.forEach(o) : o(t), s;
|
|
717
717
|
}
|
|
718
718
|
clear(t) {
|
|
719
719
|
const n = Object.keys(this);
|
|
720
720
|
let r = n.length, s = !1;
|
|
721
721
|
for (; r--; ) {
|
|
722
|
-
const
|
|
723
|
-
(!t || Y(this, this[
|
|
722
|
+
const o = n[r];
|
|
723
|
+
(!t || Y(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
724
724
|
}
|
|
725
725
|
return s;
|
|
726
726
|
}
|
|
727
727
|
normalize(t) {
|
|
728
728
|
const n = this, r = {};
|
|
729
|
-
return c.forEach(this, (s,
|
|
730
|
-
const
|
|
731
|
-
if (
|
|
732
|
-
n[
|
|
729
|
+
return c.forEach(this, (s, o) => {
|
|
730
|
+
const i = c.findKey(r, o);
|
|
731
|
+
if (i) {
|
|
732
|
+
n[i] = z(s), delete n[o];
|
|
733
733
|
return;
|
|
734
734
|
}
|
|
735
|
-
const u = t ? an(
|
|
736
|
-
u !==
|
|
735
|
+
const u = t ? an(o) : String(o).trim();
|
|
736
|
+
u !== o && delete n[o], n[u] = z(s), r[u] = !0;
|
|
737
737
|
}), this;
|
|
738
738
|
}
|
|
739
739
|
concat(...t) {
|
|
@@ -763,18 +763,18 @@ let T = class {
|
|
|
763
763
|
return n.forEach((s) => r.set(s)), r;
|
|
764
764
|
}
|
|
765
765
|
static accessor(t) {
|
|
766
|
-
const r = (this[
|
|
766
|
+
const r = (this[Te] = this[Te] = {
|
|
767
767
|
accessors: {}
|
|
768
768
|
}).accessors, s = this.prototype;
|
|
769
|
-
function i
|
|
770
|
-
const u = D(
|
|
771
|
-
r[u] || (cn(s,
|
|
769
|
+
function o(i) {
|
|
770
|
+
const u = D(i);
|
|
771
|
+
r[u] || (cn(s, i), r[u] = !0);
|
|
772
772
|
}
|
|
773
|
-
return c.isArray(t) ? t.forEach(
|
|
773
|
+
return c.isArray(t) ? t.forEach(o) : o(t), this;
|
|
774
774
|
}
|
|
775
775
|
};
|
|
776
|
-
|
|
777
|
-
c.reduceDescriptors(
|
|
776
|
+
E.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
777
|
+
c.reduceDescriptors(E.prototype, ({ value: e }, t) => {
|
|
778
778
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
779
779
|
return {
|
|
780
780
|
get: () => e,
|
|
@@ -783,28 +783,28 @@ c.reduceDescriptors(T.prototype, ({ value: e }, t) => {
|
|
|
783
783
|
}
|
|
784
784
|
};
|
|
785
785
|
});
|
|
786
|
-
c.freezeMethods(
|
|
786
|
+
c.freezeMethods(E);
|
|
787
787
|
function ee(e, t) {
|
|
788
|
-
const n = this || j, r = t || n, s =
|
|
789
|
-
let
|
|
788
|
+
const n = this || j, r = t || n, s = E.from(r.headers);
|
|
789
|
+
let o = r.data;
|
|
790
790
|
return c.forEach(e, function(u) {
|
|
791
|
-
|
|
792
|
-
}), s.normalize(),
|
|
791
|
+
o = u.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
792
|
+
}), s.normalize(), o;
|
|
793
793
|
}
|
|
794
794
|
function Ge(e) {
|
|
795
795
|
return !!(e && e.__CANCEL__);
|
|
796
796
|
}
|
|
797
|
-
function
|
|
798
|
-
|
|
797
|
+
function L(e, t, n) {
|
|
798
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
799
799
|
}
|
|
800
|
-
c.inherits(
|
|
800
|
+
c.inherits(L, y, {
|
|
801
801
|
__CANCEL__: !0
|
|
802
802
|
});
|
|
803
803
|
function Ke(e, t, n) {
|
|
804
804
|
const r = n.config.validateStatus;
|
|
805
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
805
|
+
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
806
806
|
"Request failed with status code " + n.status,
|
|
807
|
-
[
|
|
807
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
808
808
|
n.config,
|
|
809
809
|
n.request,
|
|
810
810
|
n
|
|
@@ -817,17 +817,17 @@ function un(e) {
|
|
|
817
817
|
function ln(e, t) {
|
|
818
818
|
e = e || 10;
|
|
819
819
|
const n = new Array(e), r = new Array(e);
|
|
820
|
-
let s = 0,
|
|
820
|
+
let s = 0, o = 0, i;
|
|
821
821
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
822
|
-
const l = Date.now(), a = r[
|
|
823
|
-
|
|
824
|
-
let d =
|
|
822
|
+
const l = Date.now(), a = r[o];
|
|
823
|
+
i || (i = l), n[s] = f, r[s] = l;
|
|
824
|
+
let d = o, m = 0;
|
|
825
825
|
for (; d !== s; )
|
|
826
|
-
|
|
827
|
-
if (s = (s + 1) % e, s ===
|
|
826
|
+
m += n[d++], d = d % e;
|
|
827
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
|
|
828
828
|
return;
|
|
829
829
|
const g = a && l - a;
|
|
830
|
-
return g ? Math.round(
|
|
830
|
+
return g ? Math.round(m * 1e3 / g) : void 0;
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
833
|
function fn(e, t) {
|
|
@@ -835,8 +835,8 @@ function fn(e, t) {
|
|
|
835
835
|
const r = 1e3 / t;
|
|
836
836
|
let s = null;
|
|
837
837
|
return function() {
|
|
838
|
-
const
|
|
839
|
-
if (
|
|
838
|
+
const i = this === !0, u = Date.now();
|
|
839
|
+
if (i || u - n > r)
|
|
840
840
|
return s && (clearTimeout(s), s = null), n = u, e.apply(null, arguments);
|
|
841
841
|
s || (s = setTimeout(() => (s = null, n = Date.now(), e.apply(null, arguments)), r - (u - n)));
|
|
842
842
|
};
|
|
@@ -844,17 +844,17 @@ function fn(e, t) {
|
|
|
844
844
|
const V = (e, t, n = 3) => {
|
|
845
845
|
let r = 0;
|
|
846
846
|
const s = ln(50, 250);
|
|
847
|
-
return fn((
|
|
848
|
-
const
|
|
849
|
-
r =
|
|
847
|
+
return fn((o) => {
|
|
848
|
+
const i = o.loaded, u = o.lengthComputable ? o.total : void 0, f = i - r, l = s(f), a = i <= u;
|
|
849
|
+
r = i;
|
|
850
850
|
const d = {
|
|
851
|
-
loaded:
|
|
851
|
+
loaded: i,
|
|
852
852
|
total: u,
|
|
853
|
-
progress: u ?
|
|
853
|
+
progress: u ? i / u : void 0,
|
|
854
854
|
bytes: f,
|
|
855
855
|
rate: l || void 0,
|
|
856
|
-
estimated: l && u && a ? (u -
|
|
857
|
-
event:
|
|
856
|
+
estimated: l && u && a ? (u - i) / l : void 0,
|
|
857
|
+
event: o,
|
|
858
858
|
lengthComputable: u != null
|
|
859
859
|
};
|
|
860
860
|
d[t ? "download" : "upload"] = !0, e(d);
|
|
@@ -865,9 +865,9 @@ const V = (e, t, n = 3) => {
|
|
|
865
865
|
function() {
|
|
866
866
|
const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
|
|
867
867
|
let r;
|
|
868
|
-
function s(
|
|
869
|
-
let
|
|
870
|
-
return t && (n.setAttribute("href",
|
|
868
|
+
function s(o) {
|
|
869
|
+
let i = o;
|
|
870
|
+
return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
|
|
871
871
|
href: n.href,
|
|
872
872
|
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
873
873
|
host: n.host,
|
|
@@ -878,8 +878,8 @@ const V = (e, t, n = 3) => {
|
|
|
878
878
|
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
879
879
|
};
|
|
880
880
|
}
|
|
881
|
-
return r = s(window.location.href), function(
|
|
882
|
-
const u = c.isString(
|
|
881
|
+
return r = s(window.location.href), function(i) {
|
|
882
|
+
const u = c.isString(i) ? s(i) : i;
|
|
883
883
|
return u.protocol === r.protocol && u.host === r.host;
|
|
884
884
|
};
|
|
885
885
|
}()
|
|
@@ -893,9 +893,9 @@ const V = (e, t, n = 3) => {
|
|
|
893
893
|
), hn = O.hasStandardBrowserEnv ? (
|
|
894
894
|
// Standard browser envs support document.cookie
|
|
895
895
|
{
|
|
896
|
-
write(e, t, n, r, s,
|
|
897
|
-
const
|
|
898
|
-
c.isNumber(n) &&
|
|
896
|
+
write(e, t, n, r, s, o) {
|
|
897
|
+
const i = [e + "=" + encodeURIComponent(t)];
|
|
898
|
+
c.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), c.isString(r) && i.push("path=" + r), c.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
899
899
|
},
|
|
900
900
|
read(e) {
|
|
901
901
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -923,11 +923,11 @@ function pn(e) {
|
|
|
923
923
|
function mn(e, t) {
|
|
924
924
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function ve(e, t) {
|
|
927
927
|
return e && !pn(t) ? mn(e, t) : t;
|
|
928
928
|
}
|
|
929
|
-
const Se = (e) => e instanceof
|
|
930
|
-
function
|
|
929
|
+
const Se = (e) => e instanceof E ? { ...e } : e;
|
|
930
|
+
function q(e, t) {
|
|
931
931
|
t = t || {};
|
|
932
932
|
const n = {};
|
|
933
933
|
function r(l, a, d) {
|
|
@@ -940,11 +940,11 @@ function F(e, t) {
|
|
|
940
940
|
} else
|
|
941
941
|
return r(l, a, d);
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function o(l, a) {
|
|
944
944
|
if (!c.isUndefined(a))
|
|
945
945
|
return r(void 0, a);
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function i(l, a) {
|
|
948
948
|
if (c.isUndefined(a)) {
|
|
949
949
|
if (!c.isUndefined(l))
|
|
950
950
|
return r(void 0, l);
|
|
@@ -958,67 +958,67 @@ function F(e, t) {
|
|
|
958
958
|
return r(void 0, l);
|
|
959
959
|
}
|
|
960
960
|
const f = {
|
|
961
|
-
url:
|
|
962
|
-
method:
|
|
963
|
-
data:
|
|
964
|
-
baseURL:
|
|
965
|
-
transformRequest:
|
|
966
|
-
transformResponse:
|
|
967
|
-
paramsSerializer:
|
|
968
|
-
timeout:
|
|
969
|
-
timeoutMessage:
|
|
970
|
-
withCredentials:
|
|
971
|
-
withXSRFToken:
|
|
972
|
-
adapter:
|
|
973
|
-
responseType:
|
|
974
|
-
xsrfCookieName:
|
|
975
|
-
xsrfHeaderName:
|
|
976
|
-
onUploadProgress:
|
|
977
|
-
onDownloadProgress:
|
|
978
|
-
decompress:
|
|
979
|
-
maxContentLength:
|
|
980
|
-
maxBodyLength:
|
|
981
|
-
beforeRedirect:
|
|
982
|
-
transport:
|
|
983
|
-
httpAgent:
|
|
984
|
-
httpsAgent:
|
|
985
|
-
cancelToken:
|
|
986
|
-
socketPath:
|
|
987
|
-
responseEncoding:
|
|
961
|
+
url: o,
|
|
962
|
+
method: o,
|
|
963
|
+
data: o,
|
|
964
|
+
baseURL: i,
|
|
965
|
+
transformRequest: i,
|
|
966
|
+
transformResponse: i,
|
|
967
|
+
paramsSerializer: i,
|
|
968
|
+
timeout: i,
|
|
969
|
+
timeoutMessage: i,
|
|
970
|
+
withCredentials: i,
|
|
971
|
+
withXSRFToken: i,
|
|
972
|
+
adapter: i,
|
|
973
|
+
responseType: i,
|
|
974
|
+
xsrfCookieName: i,
|
|
975
|
+
xsrfHeaderName: i,
|
|
976
|
+
onUploadProgress: i,
|
|
977
|
+
onDownloadProgress: i,
|
|
978
|
+
decompress: i,
|
|
979
|
+
maxContentLength: i,
|
|
980
|
+
maxBodyLength: i,
|
|
981
|
+
beforeRedirect: i,
|
|
982
|
+
transport: i,
|
|
983
|
+
httpAgent: i,
|
|
984
|
+
httpsAgent: i,
|
|
985
|
+
cancelToken: i,
|
|
986
|
+
socketPath: i,
|
|
987
|
+
responseEncoding: i,
|
|
988
988
|
validateStatus: u,
|
|
989
989
|
headers: (l, a) => s(Se(l), Se(a), !0)
|
|
990
990
|
};
|
|
991
991
|
return c.forEach(Object.keys(Object.assign({}, e, t)), function(a) {
|
|
992
|
-
const d = f[a] || s,
|
|
993
|
-
c.isUndefined(
|
|
992
|
+
const d = f[a] || s, m = d(e[a], t[a], a);
|
|
993
|
+
c.isUndefined(m) && d !== u || (n[a] = m);
|
|
994
994
|
}), n;
|
|
995
995
|
}
|
|
996
996
|
const We = (e) => {
|
|
997
|
-
const t =
|
|
998
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName:
|
|
999
|
-
t.headers =
|
|
997
|
+
const t = q({}, e);
|
|
998
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: u } = t;
|
|
999
|
+
t.headers = i = E.from(i), t.url = Me(ve(t.baseURL, t.url), e.params, e.paramsSerializer), u && i.set(
|
|
1000
1000
|
"Authorization",
|
|
1001
1001
|
"Basic " + btoa((u.username || "") + ":" + (u.password ? unescape(encodeURIComponent(u.password)) : ""))
|
|
1002
1002
|
);
|
|
1003
1003
|
let f;
|
|
1004
1004
|
if (c.isFormData(n)) {
|
|
1005
1005
|
if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
|
|
1006
|
-
|
|
1007
|
-
else if ((f =
|
|
1006
|
+
i.setContentType(void 0);
|
|
1007
|
+
else if ((f = i.getContentType()) !== !1) {
|
|
1008
1008
|
const [l, ...a] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1009
|
-
|
|
1009
|
+
i.setContentType([l || "multipart/form-data", ...a].join("; "));
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
1012
|
if (O.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && dn(t.url))) {
|
|
1013
|
-
const l = s &&
|
|
1014
|
-
l &&
|
|
1013
|
+
const l = s && o && hn.read(o);
|
|
1014
|
+
l && i.set(s, l);
|
|
1015
1015
|
}
|
|
1016
1016
|
return t;
|
|
1017
1017
|
}, yn = typeof XMLHttpRequest < "u", gn = yn && function(e) {
|
|
1018
1018
|
return new Promise(function(n, r) {
|
|
1019
1019
|
const s = We(e);
|
|
1020
|
-
let
|
|
1021
|
-
const
|
|
1020
|
+
let o = s.data;
|
|
1021
|
+
const i = E.from(s.headers).normalize();
|
|
1022
1022
|
let { responseType: u } = s, f;
|
|
1023
1023
|
function l() {
|
|
1024
1024
|
s.cancelToken && s.cancelToken.unsubscribe(f), s.signal && s.signal.removeEventListener("abort", f);
|
|
@@ -1028,7 +1028,7 @@ const We = (e) => {
|
|
|
1028
1028
|
function d() {
|
|
1029
1029
|
if (!a)
|
|
1030
1030
|
return;
|
|
1031
|
-
const g =
|
|
1031
|
+
const g = E.from(
|
|
1032
1032
|
"getAllResponseHeaders" in a && a.getAllResponseHeaders()
|
|
1033
1033
|
), p = {
|
|
1034
1034
|
data: !u || u === "text" || u === "json" ? a.responseText : a.response,
|
|
@@ -1047,53 +1047,53 @@ const We = (e) => {
|
|
|
1047
1047
|
"onloadend" in a ? a.onloadend = d : a.onreadystatechange = function() {
|
|
1048
1048
|
!a || a.readyState !== 4 || a.status === 0 && !(a.responseURL && a.responseURL.indexOf("file:") === 0) || setTimeout(d);
|
|
1049
1049
|
}, a.onabort = function() {
|
|
1050
|
-
a && (r(new
|
|
1050
|
+
a && (r(new y("Request aborted", y.ECONNABORTED, s, a)), a = null);
|
|
1051
1051
|
}, a.onerror = function() {
|
|
1052
|
-
r(new
|
|
1052
|
+
r(new y("Network Error", y.ERR_NETWORK, s, a)), a = null;
|
|
1053
1053
|
}, a.ontimeout = function() {
|
|
1054
1054
|
let h = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1055
|
-
const p = s.transitional ||
|
|
1056
|
-
s.timeoutErrorMessage && (h = s.timeoutErrorMessage), r(new
|
|
1055
|
+
const p = s.transitional || ze;
|
|
1056
|
+
s.timeoutErrorMessage && (h = s.timeoutErrorMessage), r(new y(
|
|
1057
1057
|
h,
|
|
1058
|
-
p.clarifyTimeoutError ?
|
|
1058
|
+
p.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1059
1059
|
s,
|
|
1060
1060
|
a
|
|
1061
1061
|
)), a = null;
|
|
1062
|
-
},
|
|
1062
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in a && c.forEach(i.toJSON(), function(h, p) {
|
|
1063
1063
|
a.setRequestHeader(p, h);
|
|
1064
1064
|
}), c.isUndefined(s.withCredentials) || (a.withCredentials = !!s.withCredentials), u && u !== "json" && (a.responseType = s.responseType), typeof s.onDownloadProgress == "function" && a.addEventListener("progress", V(s.onDownloadProgress, !0)), typeof s.onUploadProgress == "function" && a.upload && a.upload.addEventListener("progress", V(s.onUploadProgress)), (s.cancelToken || s.signal) && (f = (g) => {
|
|
1065
|
-
a && (r(!g || g.type ? new
|
|
1065
|
+
a && (r(!g || g.type ? new L(null, e, a) : g), a.abort(), a = null);
|
|
1066
1066
|
}, s.cancelToken && s.cancelToken.subscribe(f), s.signal && (s.signal.aborted ? f() : s.signal.addEventListener("abort", f)));
|
|
1067
|
-
const
|
|
1068
|
-
if (
|
|
1069
|
-
r(new
|
|
1067
|
+
const m = un(s.url);
|
|
1068
|
+
if (m && O.protocols.indexOf(m) === -1) {
|
|
1069
|
+
r(new y("Unsupported protocol " + m + ":", y.ERR_BAD_REQUEST, e));
|
|
1070
1070
|
return;
|
|
1071
1071
|
}
|
|
1072
|
-
a.send(
|
|
1072
|
+
a.send(o || null);
|
|
1073
1073
|
});
|
|
1074
|
-
},
|
|
1074
|
+
}, wn = (e, t) => {
|
|
1075
1075
|
let n = new AbortController(), r;
|
|
1076
1076
|
const s = function(f) {
|
|
1077
1077
|
if (!r) {
|
|
1078
|
-
r = !0,
|
|
1078
|
+
r = !0, i();
|
|
1079
1079
|
const l = f instanceof Error ? f : this.reason;
|
|
1080
|
-
n.abort(l instanceof
|
|
1080
|
+
n.abort(l instanceof y ? l : new L(l instanceof Error ? l.message : l));
|
|
1081
1081
|
}
|
|
1082
1082
|
};
|
|
1083
|
-
let
|
|
1084
|
-
s(new
|
|
1083
|
+
let o = t && setTimeout(() => {
|
|
1084
|
+
s(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1085
1085
|
}, t);
|
|
1086
|
-
const
|
|
1087
|
-
e && (
|
|
1086
|
+
const i = () => {
|
|
1087
|
+
e && (o && clearTimeout(o), o = null, e.forEach((f) => {
|
|
1088
1088
|
f && (f.removeEventListener ? f.removeEventListener("abort", s) : f.unsubscribe(s));
|
|
1089
1089
|
}), e = null);
|
|
1090
1090
|
};
|
|
1091
1091
|
e.forEach((f) => f && f.addEventListener && f.addEventListener("abort", s));
|
|
1092
1092
|
const { signal: u } = n;
|
|
1093
|
-
return u.unsubscribe =
|
|
1094
|
-
|
|
1093
|
+
return u.unsubscribe = i, [u, () => {
|
|
1094
|
+
o && clearTimeout(o), o = null;
|
|
1095
1095
|
}];
|
|
1096
|
-
},
|
|
1096
|
+
}, bn = function* (e, t) {
|
|
1097
1097
|
let n = e.byteLength;
|
|
1098
1098
|
if (!t || n < t) {
|
|
1099
1099
|
yield e;
|
|
@@ -1102,25 +1102,25 @@ const We = (e) => {
|
|
|
1102
1102
|
let r = 0, s;
|
|
1103
1103
|
for (; r < n; )
|
|
1104
1104
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1105
|
-
},
|
|
1105
|
+
}, Tn = async function* (e, t, n) {
|
|
1106
1106
|
for await (const r of e)
|
|
1107
|
-
yield*
|
|
1108
|
-
},
|
|
1109
|
-
const
|
|
1110
|
-
let
|
|
1107
|
+
yield* bn(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
|
|
1108
|
+
}, Ee = (e, t, n, r, s) => {
|
|
1109
|
+
const o = Tn(e, t, s);
|
|
1110
|
+
let i = 0;
|
|
1111
1111
|
return new ReadableStream({
|
|
1112
1112
|
type: "bytes",
|
|
1113
1113
|
async pull(u) {
|
|
1114
|
-
const { done: f, value: l } = await
|
|
1114
|
+
const { done: f, value: l } = await o.next();
|
|
1115
1115
|
if (f) {
|
|
1116
1116
|
u.close(), r();
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
1119
|
let a = l.byteLength;
|
|
1120
|
-
n && n(
|
|
1120
|
+
n && n(i += a), u.enqueue(new Uint8Array(l));
|
|
1121
1121
|
},
|
|
1122
1122
|
cancel(u) {
|
|
1123
|
-
return r(u),
|
|
1123
|
+
return r(u), o.return();
|
|
1124
1124
|
}
|
|
1125
1125
|
}, {
|
|
1126
1126
|
highWaterMark: 2
|
|
@@ -1132,7 +1132,7 @@ const We = (e) => {
|
|
|
1132
1132
|
total: e,
|
|
1133
1133
|
loaded: r
|
|
1134
1134
|
}));
|
|
1135
|
-
}, X = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1135
|
+
}, X = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Qe = X && typeof ReadableStream == "function", oe = X && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Sn = Qe && (() => {
|
|
1136
1136
|
let e = !1;
|
|
1137
1137
|
const t = new Request(O.origin, {
|
|
1138
1138
|
body: new ReadableStream(),
|
|
@@ -1142,7 +1142,7 @@ const We = (e) => {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
}).headers.has("Content-Type");
|
|
1144
1144
|
return e && !t;
|
|
1145
|
-
})(), Oe = 64 * 1024, ie =
|
|
1145
|
+
})(), Oe = 64 * 1024, ie = Qe && !!(() => {
|
|
1146
1146
|
try {
|
|
1147
1147
|
return c.isReadableStream(new Response("").body);
|
|
1148
1148
|
} catch {
|
|
@@ -1153,11 +1153,11 @@ const We = (e) => {
|
|
|
1153
1153
|
X && ((e) => {
|
|
1154
1154
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1155
1155
|
!G[t] && (G[t] = c.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1156
|
-
throw new
|
|
1156
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1157
1157
|
});
|
|
1158
1158
|
});
|
|
1159
1159
|
})(new Response());
|
|
1160
|
-
const
|
|
1160
|
+
const En = async (e) => {
|
|
1161
1161
|
if (e == null)
|
|
1162
1162
|
return 0;
|
|
1163
1163
|
if (c.isBlob(e))
|
|
@@ -1170,24 +1170,24 @@ const Tn = async (e) => {
|
|
|
1170
1170
|
return (await oe(e)).byteLength;
|
|
1171
1171
|
}, Rn = async (e, t) => {
|
|
1172
1172
|
const n = c.toFiniteNumber(e.getContentLength());
|
|
1173
|
-
return n ??
|
|
1173
|
+
return n ?? En(t);
|
|
1174
1174
|
}, On = X && (async (e) => {
|
|
1175
1175
|
let {
|
|
1176
1176
|
url: t,
|
|
1177
1177
|
method: n,
|
|
1178
1178
|
data: r,
|
|
1179
1179
|
signal: s,
|
|
1180
|
-
cancelToken:
|
|
1181
|
-
timeout:
|
|
1180
|
+
cancelToken: o,
|
|
1181
|
+
timeout: i,
|
|
1182
1182
|
onDownloadProgress: u,
|
|
1183
1183
|
onUploadProgress: f,
|
|
1184
1184
|
responseType: l,
|
|
1185
1185
|
headers: a,
|
|
1186
1186
|
withCredentials: d = "same-origin",
|
|
1187
|
-
fetchOptions:
|
|
1187
|
+
fetchOptions: m
|
|
1188
1188
|
} = We(e);
|
|
1189
1189
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1190
|
-
let [g, h] = s ||
|
|
1190
|
+
let [g, h] = s || o || i ? wn([s, o], i) : [], p, w;
|
|
1191
1191
|
const S = () => {
|
|
1192
1192
|
!p && setTimeout(() => {
|
|
1193
1193
|
g && g.unsubscribe();
|
|
@@ -1200,14 +1200,14 @@ const Tn = async (e) => {
|
|
|
1200
1200
|
method: "POST",
|
|
1201
1201
|
body: r,
|
|
1202
1202
|
duplex: "half"
|
|
1203
|
-
}),
|
|
1204
|
-
c.isFormData(r) && (
|
|
1203
|
+
}), F;
|
|
1204
|
+
c.isFormData(r) && (F = C.headers.get("content-type")) && a.setContentType(F), C.body && (r = Ee(C.body, Oe, Re(
|
|
1205
1205
|
N,
|
|
1206
1206
|
V(f)
|
|
1207
1207
|
), null, oe));
|
|
1208
1208
|
}
|
|
1209
|
-
c.isString(d) || (d = d ? "cors" : "omit"),
|
|
1210
|
-
...
|
|
1209
|
+
c.isString(d) || (d = d ? "cors" : "omit"), w = new Request(t, {
|
|
1210
|
+
...m,
|
|
1211
1211
|
signal: g,
|
|
1212
1212
|
method: n.toUpperCase(),
|
|
1213
1213
|
headers: a.normalize().toJSON(),
|
|
@@ -1215,17 +1215,17 @@ const Tn = async (e) => {
|
|
|
1215
1215
|
duplex: "half",
|
|
1216
1216
|
withCredentials: d
|
|
1217
1217
|
});
|
|
1218
|
-
let b = await fetch(
|
|
1218
|
+
let b = await fetch(w);
|
|
1219
1219
|
const _ = ie && (l === "stream" || l === "response");
|
|
1220
1220
|
if (ie && (u || _)) {
|
|
1221
1221
|
const C = {};
|
|
1222
1222
|
["status", "statusText", "headers"].forEach((pe) => {
|
|
1223
1223
|
C[pe] = b[pe];
|
|
1224
1224
|
});
|
|
1225
|
-
const
|
|
1225
|
+
const F = c.toFiniteNumber(b.headers.get("content-length"));
|
|
1226
1226
|
b = new Response(
|
|
1227
|
-
|
|
1228
|
-
|
|
1227
|
+
Ee(b.body, Oe, u && Re(
|
|
1228
|
+
F,
|
|
1229
1229
|
V(u, !0)
|
|
1230
1230
|
), _ && S, oe),
|
|
1231
1231
|
C
|
|
@@ -1233,23 +1233,23 @@ const Tn = async (e) => {
|
|
|
1233
1233
|
}
|
|
1234
1234
|
l = l || "text";
|
|
1235
1235
|
let tt = await G[c.findKey(G, l) || "text"](b, e);
|
|
1236
|
-
return !_ && S(), h && h(), await new Promise((C,
|
|
1237
|
-
Ke(C,
|
|
1236
|
+
return !_ && S(), h && h(), await new Promise((C, F) => {
|
|
1237
|
+
Ke(C, F, {
|
|
1238
1238
|
data: tt,
|
|
1239
|
-
headers:
|
|
1239
|
+
headers: E.from(b.headers),
|
|
1240
1240
|
status: b.status,
|
|
1241
1241
|
statusText: b.statusText,
|
|
1242
1242
|
config: e,
|
|
1243
|
-
request:
|
|
1243
|
+
request: w
|
|
1244
1244
|
});
|
|
1245
1245
|
});
|
|
1246
1246
|
} catch (b) {
|
|
1247
1247
|
throw S(), b && b.name === "TypeError" && /fetch/i.test(b.message) ? Object.assign(
|
|
1248
|
-
new
|
|
1248
|
+
new y("Network Error", y.ERR_NETWORK, e, w),
|
|
1249
1249
|
{
|
|
1250
1250
|
cause: b.cause || b
|
|
1251
1251
|
}
|
|
1252
|
-
) :
|
|
1252
|
+
) : y.from(b, b && b.code, e, w);
|
|
1253
1253
|
}
|
|
1254
1254
|
}), ae = {
|
|
1255
1255
|
http: jt,
|
|
@@ -1271,24 +1271,24 @@ const Ae = (e) => `- ${e}`, An = (e) => c.isFunction(e) || e === null || e === !
|
|
|
1271
1271
|
const { length: t } = e;
|
|
1272
1272
|
let n, r;
|
|
1273
1273
|
const s = {};
|
|
1274
|
-
for (let
|
|
1275
|
-
n = e[
|
|
1276
|
-
let
|
|
1277
|
-
if (r = n, !An(n) && (r = ae[(
|
|
1278
|
-
throw new
|
|
1274
|
+
for (let o = 0; o < t; o++) {
|
|
1275
|
+
n = e[o];
|
|
1276
|
+
let i;
|
|
1277
|
+
if (r = n, !An(n) && (r = ae[(i = String(n)).toLowerCase()], r === void 0))
|
|
1278
|
+
throw new y(`Unknown adapter '${i}'`);
|
|
1279
1279
|
if (r)
|
|
1280
1280
|
break;
|
|
1281
|
-
s[
|
|
1281
|
+
s[i || "#" + o] = r;
|
|
1282
1282
|
}
|
|
1283
1283
|
if (!r) {
|
|
1284
|
-
const
|
|
1284
|
+
const o = Object.entries(s).map(
|
|
1285
1285
|
([u, f]) => `adapter ${u} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1286
1286
|
);
|
|
1287
|
-
let
|
|
1288
|
-
` +
|
|
1289
|
-
`) : " " + Ae(
|
|
1290
|
-
throw new
|
|
1291
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1287
|
+
let i = t ? o.length > 1 ? `since :
|
|
1288
|
+
` + o.map(Ae).join(`
|
|
1289
|
+
`) : " " + Ae(o[0]) : "as no adapter specified";
|
|
1290
|
+
throw new y(
|
|
1291
|
+
"There is no suitable adapter to dispatch the request " + i,
|
|
1292
1292
|
"ERR_NOT_SUPPORT"
|
|
1293
1293
|
);
|
|
1294
1294
|
}
|
|
@@ -1298,10 +1298,10 @@ const Ae = (e) => `- ${e}`, An = (e) => c.isFunction(e) || e === null || e === !
|
|
|
1298
1298
|
};
|
|
1299
1299
|
function te(e) {
|
|
1300
1300
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1301
|
-
throw new
|
|
1301
|
+
throw new L(null, e);
|
|
1302
1302
|
}
|
|
1303
1303
|
function Pe(e) {
|
|
1304
|
-
return te(e), e.headers =
|
|
1304
|
+
return te(e), e.headers = E.from(e.headers), e.data = ee.call(
|
|
1305
1305
|
e,
|
|
1306
1306
|
e.transformRequest
|
|
1307
1307
|
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Xe.getAdapter(e.adapter || j.adapter)(e).then(function(r) {
|
|
@@ -1309,13 +1309,13 @@ function Pe(e) {
|
|
|
1309
1309
|
e,
|
|
1310
1310
|
e.transformResponse,
|
|
1311
1311
|
r
|
|
1312
|
-
), r.headers =
|
|
1312
|
+
), r.headers = E.from(r.headers), r;
|
|
1313
1313
|
}, function(r) {
|
|
1314
1314
|
return Ge(r) || (te(e), r && r.response && (r.response.data = ee.call(
|
|
1315
1315
|
e,
|
|
1316
1316
|
e.transformResponse,
|
|
1317
1317
|
r.response
|
|
1318
|
-
), r.response.headers =
|
|
1318
|
+
), r.response.headers = E.from(r.response.headers))), Promise.reject(r);
|
|
1319
1319
|
});
|
|
1320
1320
|
}
|
|
1321
1321
|
const Ze = "1.7.2", he = {};
|
|
@@ -1326,38 +1326,38 @@ const Ze = "1.7.2", he = {};
|
|
|
1326
1326
|
});
|
|
1327
1327
|
const Ne = {};
|
|
1328
1328
|
he.transitional = function(t, n, r) {
|
|
1329
|
-
function s(
|
|
1330
|
-
return "[Axios v" + Ze + "] Transitional option '" +
|
|
1329
|
+
function s(o, i) {
|
|
1330
|
+
return "[Axios v" + Ze + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1331
1331
|
}
|
|
1332
|
-
return (
|
|
1332
|
+
return (o, i, u) => {
|
|
1333
1333
|
if (t === !1)
|
|
1334
|
-
throw new
|
|
1335
|
-
s(
|
|
1336
|
-
|
|
1334
|
+
throw new y(
|
|
1335
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1336
|
+
y.ERR_DEPRECATED
|
|
1337
1337
|
);
|
|
1338
|
-
return n && !Ne[
|
|
1338
|
+
return n && !Ne[i] && (Ne[i] = !0, console.warn(
|
|
1339
1339
|
s(
|
|
1340
|
-
|
|
1340
|
+
i,
|
|
1341
1341
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1342
1342
|
)
|
|
1343
|
-
)), t ? t(
|
|
1343
|
+
)), t ? t(o, i, u) : !0;
|
|
1344
1344
|
};
|
|
1345
1345
|
};
|
|
1346
1346
|
function Pn(e, t, n) {
|
|
1347
1347
|
if (typeof e != "object")
|
|
1348
|
-
throw new
|
|
1348
|
+
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1349
1349
|
const r = Object.keys(e);
|
|
1350
1350
|
let s = r.length;
|
|
1351
1351
|
for (; s-- > 0; ) {
|
|
1352
|
-
const
|
|
1353
|
-
if (
|
|
1354
|
-
const u = e[
|
|
1352
|
+
const o = r[s], i = t[o];
|
|
1353
|
+
if (i) {
|
|
1354
|
+
const u = e[o], f = u === void 0 || i(u, o, e);
|
|
1355
1355
|
if (f !== !0)
|
|
1356
|
-
throw new
|
|
1356
|
+
throw new y("option " + o + " must be " + f, y.ERR_BAD_OPTION_VALUE);
|
|
1357
1357
|
continue;
|
|
1358
1358
|
}
|
|
1359
1359
|
if (n !== !0)
|
|
1360
|
-
throw new
|
|
1360
|
+
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
1363
1363
|
const ce = {
|
|
@@ -1367,8 +1367,8 @@ const ce = {
|
|
|
1367
1367
|
let B = class {
|
|
1368
1368
|
constructor(t) {
|
|
1369
1369
|
this.defaults = t, this.interceptors = {
|
|
1370
|
-
request: new
|
|
1371
|
-
response: new
|
|
1370
|
+
request: new be(),
|
|
1371
|
+
response: new be()
|
|
1372
1372
|
};
|
|
1373
1373
|
}
|
|
1374
1374
|
/**
|
|
@@ -1386,10 +1386,10 @@ let B = class {
|
|
|
1386
1386
|
if (r instanceof Error) {
|
|
1387
1387
|
let s;
|
|
1388
1388
|
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1389
|
-
const
|
|
1389
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1390
1390
|
try {
|
|
1391
|
-
r.stack ?
|
|
1392
|
-
` +
|
|
1391
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1392
|
+
` + o) : r.stack = o;
|
|
1393
1393
|
} catch {
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
@@ -1397,8 +1397,8 @@ let B = class {
|
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
1399
|
_request(t, n) {
|
|
1400
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1401
|
-
const { transitional: r, paramsSerializer: s, headers:
|
|
1400
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = q(this.defaults, n);
|
|
1401
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1402
1402
|
r !== void 0 && ce.assertOptions(r, {
|
|
1403
1403
|
silentJSONParsing: k.transitional(k.boolean),
|
|
1404
1404
|
forcedJSONParsing: k.transitional(k.boolean),
|
|
@@ -1409,16 +1409,16 @@ let B = class {
|
|
|
1409
1409
|
encode: k.function,
|
|
1410
1410
|
serialize: k.function
|
|
1411
1411
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1412
|
-
let
|
|
1413
|
-
|
|
1414
|
-
|
|
1412
|
+
let i = o && c.merge(
|
|
1413
|
+
o.common,
|
|
1414
|
+
o[n.method]
|
|
1415
1415
|
);
|
|
1416
|
-
|
|
1416
|
+
o && c.forEach(
|
|
1417
1417
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1418
1418
|
(h) => {
|
|
1419
|
-
delete
|
|
1419
|
+
delete o[h];
|
|
1420
1420
|
}
|
|
1421
|
-
), n.headers =
|
|
1421
|
+
), n.headers = E.concat(i, o);
|
|
1422
1422
|
const u = [];
|
|
1423
1423
|
let f = !0;
|
|
1424
1424
|
this.interceptors.request.forEach(function(p) {
|
|
@@ -1428,21 +1428,21 @@ let B = class {
|
|
|
1428
1428
|
this.interceptors.response.forEach(function(p) {
|
|
1429
1429
|
l.push(p.fulfilled, p.rejected);
|
|
1430
1430
|
});
|
|
1431
|
-
let a, d = 0,
|
|
1431
|
+
let a, d = 0, m;
|
|
1432
1432
|
if (!f) {
|
|
1433
1433
|
const h = [Pe.bind(this), void 0];
|
|
1434
|
-
for (h.unshift.apply(h, u), h.push.apply(h, l),
|
|
1434
|
+
for (h.unshift.apply(h, u), h.push.apply(h, l), m = h.length, a = Promise.resolve(n); d < m; )
|
|
1435
1435
|
a = a.then(h[d++], h[d++]);
|
|
1436
1436
|
return a;
|
|
1437
1437
|
}
|
|
1438
|
-
|
|
1438
|
+
m = u.length;
|
|
1439
1439
|
let g = n;
|
|
1440
|
-
for (d = 0; d <
|
|
1440
|
+
for (d = 0; d < m; ) {
|
|
1441
1441
|
const h = u[d++], p = u[d++];
|
|
1442
1442
|
try {
|
|
1443
1443
|
g = h(g);
|
|
1444
|
-
} catch (
|
|
1445
|
-
p.call(this,
|
|
1444
|
+
} catch (w) {
|
|
1445
|
+
p.call(this, w);
|
|
1446
1446
|
break;
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
@@ -1451,19 +1451,19 @@ let B = class {
|
|
|
1451
1451
|
} catch (h) {
|
|
1452
1452
|
return Promise.reject(h);
|
|
1453
1453
|
}
|
|
1454
|
-
for (d = 0,
|
|
1454
|
+
for (d = 0, m = l.length; d < m; )
|
|
1455
1455
|
a = a.then(l[d++], l[d++]);
|
|
1456
1456
|
return a;
|
|
1457
1457
|
}
|
|
1458
1458
|
getUri(t) {
|
|
1459
|
-
t =
|
|
1460
|
-
const n =
|
|
1461
|
-
return
|
|
1459
|
+
t = q(this.defaults, t);
|
|
1460
|
+
const n = ve(t.baseURL, t.url);
|
|
1461
|
+
return Me(n, t.params, t.paramsSerializer);
|
|
1462
1462
|
}
|
|
1463
1463
|
};
|
|
1464
1464
|
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1465
1465
|
B.prototype[t] = function(n, r) {
|
|
1466
|
-
return this.request(
|
|
1466
|
+
return this.request(q(r || {}, {
|
|
1467
1467
|
method: t,
|
|
1468
1468
|
url: n,
|
|
1469
1469
|
data: (r || {}).data
|
|
@@ -1472,14 +1472,14 @@ c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1472
1472
|
});
|
|
1473
1473
|
c.forEach(["post", "put", "patch"], function(t) {
|
|
1474
1474
|
function n(r) {
|
|
1475
|
-
return function(
|
|
1476
|
-
return this.request(
|
|
1475
|
+
return function(o, i, u) {
|
|
1476
|
+
return this.request(q(u || {}, {
|
|
1477
1477
|
method: t,
|
|
1478
1478
|
headers: r ? {
|
|
1479
1479
|
"Content-Type": "multipart/form-data"
|
|
1480
1480
|
} : {},
|
|
1481
|
-
url:
|
|
1482
|
-
data:
|
|
1481
|
+
url: o,
|
|
1482
|
+
data: i
|
|
1483
1483
|
}));
|
|
1484
1484
|
};
|
|
1485
1485
|
}
|
|
@@ -1490,27 +1490,27 @@ let Nn = class Ye {
|
|
|
1490
1490
|
if (typeof t != "function")
|
|
1491
1491
|
throw new TypeError("executor must be a function.");
|
|
1492
1492
|
let n;
|
|
1493
|
-
this.promise = new Promise(function(
|
|
1494
|
-
n =
|
|
1493
|
+
this.promise = new Promise(function(o) {
|
|
1494
|
+
n = o;
|
|
1495
1495
|
});
|
|
1496
1496
|
const r = this;
|
|
1497
1497
|
this.promise.then((s) => {
|
|
1498
1498
|
if (!r._listeners)
|
|
1499
1499
|
return;
|
|
1500
|
-
let
|
|
1501
|
-
for (;
|
|
1502
|
-
r._listeners[
|
|
1500
|
+
let o = r._listeners.length;
|
|
1501
|
+
for (; o-- > 0; )
|
|
1502
|
+
r._listeners[o](s);
|
|
1503
1503
|
r._listeners = null;
|
|
1504
1504
|
}), this.promise.then = (s) => {
|
|
1505
|
-
let
|
|
1506
|
-
const
|
|
1507
|
-
r.subscribe(u),
|
|
1505
|
+
let o;
|
|
1506
|
+
const i = new Promise((u) => {
|
|
1507
|
+
r.subscribe(u), o = u;
|
|
1508
1508
|
}).then(s);
|
|
1509
|
-
return
|
|
1510
|
-
r.unsubscribe(
|
|
1511
|
-
},
|
|
1512
|
-
}, t(function(
|
|
1513
|
-
r.reason || (r.reason = new
|
|
1509
|
+
return i.cancel = function() {
|
|
1510
|
+
r.unsubscribe(o);
|
|
1511
|
+
}, i;
|
|
1512
|
+
}, t(function(o, i, u) {
|
|
1513
|
+
r.reason || (r.reason = new L(o, i, u), n(r.reason));
|
|
1514
1514
|
});
|
|
1515
1515
|
}
|
|
1516
1516
|
/**
|
|
@@ -1632,34 +1632,34 @@ Object.entries(ue).forEach(([e, t]) => {
|
|
|
1632
1632
|
function et(e) {
|
|
1633
1633
|
const t = new B(e), n = Be(B.prototype.request, t);
|
|
1634
1634
|
return c.extend(n, B.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1635
|
-
return et(
|
|
1635
|
+
return et(q(e, s));
|
|
1636
1636
|
}, n;
|
|
1637
1637
|
}
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1638
|
+
const T = et(j);
|
|
1639
|
+
T.Axios = B;
|
|
1640
|
+
T.CanceledError = L;
|
|
1641
|
+
T.CancelToken = Nn;
|
|
1642
|
+
T.isCancel = Ge;
|
|
1643
|
+
T.VERSION = Ze;
|
|
1644
|
+
T.toFormData = Q;
|
|
1645
|
+
T.AxiosError = y;
|
|
1646
|
+
T.Cancel = T.CanceledError;
|
|
1647
|
+
T.all = function(t) {
|
|
1648
1648
|
return Promise.all(t);
|
|
1649
1649
|
};
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1650
|
+
T.spread = Cn;
|
|
1651
|
+
T.isAxiosError = kn;
|
|
1652
|
+
T.mergeConfig = q;
|
|
1653
|
+
T.AxiosHeaders = E;
|
|
1654
|
+
T.formToJSON = (e) => Ve(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
1655
|
+
T.getAdapter = Xe.getAdapter;
|
|
1656
|
+
T.HttpStatusCode = ue;
|
|
1657
|
+
T.default = T;
|
|
1658
1658
|
const {
|
|
1659
|
-
Axios:
|
|
1659
|
+
Axios: vn,
|
|
1660
1660
|
AxiosError: xn,
|
|
1661
1661
|
CanceledError: Wn,
|
|
1662
|
-
isCancel:
|
|
1662
|
+
isCancel: Qn,
|
|
1663
1663
|
CancelToken: Xn,
|
|
1664
1664
|
VERSION: Zn,
|
|
1665
1665
|
all: Yn,
|
|
@@ -1672,7 +1672,7 @@ const {
|
|
|
1672
1672
|
formToJSON: or,
|
|
1673
1673
|
getAdapter: ir,
|
|
1674
1674
|
mergeConfig: ar
|
|
1675
|
-
} =
|
|
1675
|
+
} = T, H = () => new xn(
|
|
1676
1676
|
"Unauthorized",
|
|
1677
1677
|
"ERR_UNAUTHORIZED",
|
|
1678
1678
|
{ headers: new Ce() },
|
|
@@ -1686,55 +1686,55 @@ const {
|
|
|
1686
1686
|
}
|
|
1687
1687
|
), Bn = (e) => {
|
|
1688
1688
|
let t = !1;
|
|
1689
|
-
const n = [], r = () => localStorage.getItem("accessToken"), s = () => localStorage.getItem("refreshToken"),
|
|
1689
|
+
const n = [], r = () => localStorage.getItem("accessToken"), s = () => localStorage.getItem("refreshToken"), o = (a) => {
|
|
1690
1690
|
localStorage.setItem("accessToken", a.accessToken), localStorage.setItem("refreshToken", a.refreshToken);
|
|
1691
|
-
},
|
|
1691
|
+
}, i = () => {
|
|
1692
1692
|
localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken");
|
|
1693
1693
|
}, u = (a, d = null) => {
|
|
1694
|
-
n.forEach((
|
|
1695
|
-
a ?
|
|
1694
|
+
n.forEach((m) => {
|
|
1695
|
+
a ? m.reject(a) : (m.requestConfig.headers || (m.requestConfig.headers = {}), m.requestConfig.headers.Authorization = `Bearer ${d}`, m.resolve(m.requestConfig));
|
|
1696
1696
|
}), n.length = 0;
|
|
1697
1697
|
};
|
|
1698
1698
|
return {
|
|
1699
1699
|
getAccessToken: r,
|
|
1700
|
-
setTokens:
|
|
1701
|
-
clearTokens:
|
|
1700
|
+
setTokens: o,
|
|
1701
|
+
clearTokens: i,
|
|
1702
1702
|
handleTokenRefresh: async (a) => {
|
|
1703
1703
|
var h;
|
|
1704
1704
|
if ((h = a.url) == null ? void 0 : h.includes(
|
|
1705
1705
|
e.refreshTokenEndpointPath
|
|
1706
1706
|
)) {
|
|
1707
|
-
|
|
1707
|
+
i();
|
|
1708
1708
|
const p = H();
|
|
1709
1709
|
throw u(p), p;
|
|
1710
1710
|
}
|
|
1711
1711
|
if (!r()) {
|
|
1712
|
-
|
|
1712
|
+
i();
|
|
1713
1713
|
const p = H();
|
|
1714
1714
|
throw u(p), p;
|
|
1715
1715
|
}
|
|
1716
1716
|
if (t)
|
|
1717
|
-
return new Promise((p,
|
|
1717
|
+
return new Promise((p, w) => {
|
|
1718
1718
|
n.push({
|
|
1719
1719
|
resolve: p,
|
|
1720
|
-
reject:
|
|
1720
|
+
reject: w,
|
|
1721
1721
|
requestConfig: a
|
|
1722
1722
|
});
|
|
1723
1723
|
});
|
|
1724
1724
|
const g = s();
|
|
1725
1725
|
if (!g) {
|
|
1726
|
-
|
|
1726
|
+
i();
|
|
1727
1727
|
const p = H();
|
|
1728
1728
|
throw u(p), p;
|
|
1729
1729
|
}
|
|
1730
1730
|
t = !0;
|
|
1731
1731
|
try {
|
|
1732
1732
|
const p = await e.onRefreshToken(g);
|
|
1733
|
-
return
|
|
1733
|
+
return o(p), a.headers || (a.headers = {}), a.headers.Authorization = `Bearer ${p.accessToken}`, u(null, p.accessToken), t = !1, a;
|
|
1734
1734
|
} catch {
|
|
1735
|
-
|
|
1736
|
-
const
|
|
1737
|
-
throw u(
|
|
1735
|
+
i();
|
|
1736
|
+
const w = H();
|
|
1737
|
+
throw u(w), t = !1, w;
|
|
1738
1738
|
}
|
|
1739
1739
|
},
|
|
1740
1740
|
isAuthError: (a) => {
|
|
@@ -1743,59 +1743,58 @@ const {
|
|
|
1743
1743
|
}
|
|
1744
1744
|
};
|
|
1745
1745
|
}, P = (e) => {
|
|
1746
|
-
const t =
|
|
1746
|
+
const t = T.create(), n = e.apiVersion, r = e.productCode, s = e.baseUrl, o = s ? s.replace(/\/$/, "") : "", i = e.refreshTokenApiVersion || n, u = e.refreshTokenEndpointPath || "/refresh-token", f = `${o}/auth/${i}${u}`, l = Bn({
|
|
1747
1747
|
baseUrl: s || "",
|
|
1748
1748
|
apiVersion: n,
|
|
1749
|
-
refreshTokenEndpointPath:
|
|
1750
|
-
onRefreshToken: async (
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
)).data
|
|
1749
|
+
refreshTokenEndpointPath: u,
|
|
1750
|
+
onRefreshToken: async (d) => (await t.post(f, {
|
|
1751
|
+
refreshToken: d
|
|
1752
|
+
})).data
|
|
1754
1753
|
});
|
|
1755
1754
|
return t.interceptors.response.use(
|
|
1756
|
-
(
|
|
1757
|
-
async (
|
|
1758
|
-
const
|
|
1759
|
-
if (!
|
|
1760
|
-
return Promise.reject(
|
|
1761
|
-
|
|
1755
|
+
(d) => d,
|
|
1756
|
+
async (d) => {
|
|
1757
|
+
const m = d.config;
|
|
1758
|
+
if (!l.isAuthError(d) || m._retry)
|
|
1759
|
+
return Promise.reject(d);
|
|
1760
|
+
m._retry = !0;
|
|
1762
1761
|
try {
|
|
1763
|
-
const
|
|
1764
|
-
return t(
|
|
1765
|
-
} catch (
|
|
1766
|
-
return Promise.reject(
|
|
1762
|
+
const g = await l.handleTokenRefresh(m);
|
|
1763
|
+
return t.request(g);
|
|
1764
|
+
} catch (g) {
|
|
1765
|
+
return Promise.reject(g);
|
|
1767
1766
|
}
|
|
1768
1767
|
}
|
|
1769
1768
|
), e.responseInterceptor && t.interceptors.response.use(
|
|
1770
1769
|
e.responseInterceptor.onFulfilled,
|
|
1771
1770
|
e.responseInterceptor.onReject
|
|
1772
1771
|
), {
|
|
1773
|
-
request: async (
|
|
1774
|
-
const
|
|
1775
|
-
"Content-Type": (
|
|
1772
|
+
request: async (d, m) => {
|
|
1773
|
+
const g = d.startsWith("/") ? d.substring(1) : d, h = `${o}/${r}/${n}/${g}`, p = {
|
|
1774
|
+
"Content-Type": (m == null ? void 0 : m.contentType) || "application/json",
|
|
1776
1775
|
apiVersion: n,
|
|
1777
1776
|
Authorization: "",
|
|
1778
1777
|
...e.headers ?? {}
|
|
1779
|
-
},
|
|
1780
|
-
|
|
1781
|
-
const
|
|
1782
|
-
method: (
|
|
1783
|
-
headers:
|
|
1784
|
-
url:
|
|
1785
|
-
data:
|
|
1786
|
-
responseType:
|
|
1778
|
+
}, w = l.getAccessToken();
|
|
1779
|
+
w && (p.Authorization = `Bearer ${w}`);
|
|
1780
|
+
const S = {
|
|
1781
|
+
method: (m == null ? void 0 : m.method) || "GET",
|
|
1782
|
+
headers: p,
|
|
1783
|
+
url: h,
|
|
1784
|
+
data: m == null ? void 0 : m.data,
|
|
1785
|
+
responseType: m == null ? void 0 : m.responseType
|
|
1787
1786
|
};
|
|
1788
|
-
return await t.request(
|
|
1787
|
+
return await t.request(S);
|
|
1789
1788
|
},
|
|
1790
|
-
getAccessToken:
|
|
1791
|
-
setTokens:
|
|
1792
|
-
clearTokens:
|
|
1789
|
+
getAccessToken: l.getAccessToken,
|
|
1790
|
+
setTokens: l.setTokens,
|
|
1791
|
+
clearTokens: l.clearTokens
|
|
1793
1792
|
};
|
|
1794
|
-
},
|
|
1795
|
-
function
|
|
1793
|
+
}, qn = "cep";
|
|
1794
|
+
function Fn(e) {
|
|
1796
1795
|
const t = P(e);
|
|
1797
1796
|
function n(r) {
|
|
1798
|
-
return t.request(`/${
|
|
1797
|
+
return t.request(`/${qn}`, {
|
|
1799
1798
|
method: "POST",
|
|
1800
1799
|
data: JSON.stringify(r)
|
|
1801
1800
|
});
|
|
@@ -1808,36 +1807,44 @@ const ke = "auth", Un = (e) => {
|
|
|
1808
1807
|
const t = P(e);
|
|
1809
1808
|
return {
|
|
1810
1809
|
postLogin: async (s) => {
|
|
1811
|
-
var
|
|
1812
|
-
const
|
|
1810
|
+
var i;
|
|
1811
|
+
const o = await t.request(`/${ke}/login`, {
|
|
1813
1812
|
method: "POST",
|
|
1814
1813
|
data: JSON.stringify(s)
|
|
1815
1814
|
});
|
|
1816
|
-
return
|
|
1815
|
+
return o.status === 200 && ((i = o.data) != null && i.accessToken) && localStorage.setItem("accessToken", o.data.accessToken), o;
|
|
1817
1816
|
},
|
|
1818
1817
|
getToken: async (s) => await t.request(`/${ke}?code=${s}`, {
|
|
1819
1818
|
method: "GET",
|
|
1820
1819
|
data: ""
|
|
1821
1820
|
})
|
|
1822
1821
|
};
|
|
1823
|
-
},
|
|
1822
|
+
}, Ln = (e) => {
|
|
1824
1823
|
const t = P(e);
|
|
1825
1824
|
return {
|
|
1826
|
-
signUp: async (
|
|
1825
|
+
signUp: async (u) => await t.request("/sign-up", {
|
|
1827
1826
|
method: "POST",
|
|
1828
|
-
data: JSON.stringify(
|
|
1827
|
+
data: JSON.stringify(u)
|
|
1829
1828
|
}),
|
|
1830
|
-
signIn: async (
|
|
1831
|
-
var
|
|
1832
|
-
const
|
|
1829
|
+
signIn: async (u) => {
|
|
1830
|
+
var l, a;
|
|
1831
|
+
const f = await t.request("/sign-in", {
|
|
1833
1832
|
method: "POST",
|
|
1834
|
-
data: JSON.stringify(
|
|
1833
|
+
data: JSON.stringify(u)
|
|
1835
1834
|
});
|
|
1836
|
-
return
|
|
1835
|
+
return f.status === 200 && ((l = f.data) != null && l.accessToken) && ((a = f.data) != null && a.refreshToken) && t.setTokens(f.data), f;
|
|
1837
1836
|
},
|
|
1838
1837
|
getProfile: async () => await t.request("/me", {
|
|
1839
1838
|
method: "GET",
|
|
1840
1839
|
data: ""
|
|
1840
|
+
}),
|
|
1841
|
+
recoverPassword: async (u) => await t.request("/recovery", {
|
|
1842
|
+
method: "POST",
|
|
1843
|
+
data: JSON.stringify(u)
|
|
1844
|
+
}),
|
|
1845
|
+
updatePassword: async (u) => await t.request("/update-password", {
|
|
1846
|
+
method: "POST",
|
|
1847
|
+
data: JSON.stringify(u)
|
|
1841
1848
|
})
|
|
1842
1849
|
};
|
|
1843
1850
|
}, xe = "digital", _n = (e) => {
|
|
@@ -1866,48 +1873,48 @@ const ke = "auth", Un = (e) => {
|
|
|
1866
1873
|
}, ne = "payment", In = (e) => {
|
|
1867
1874
|
const t = P(e);
|
|
1868
1875
|
return {
|
|
1869
|
-
postPayment: (
|
|
1876
|
+
postPayment: (o) => t.request(`/${ne}`, {
|
|
1870
1877
|
method: "POST",
|
|
1871
|
-
data: JSON.stringify(
|
|
1878
|
+
data: JSON.stringify(o)
|
|
1872
1879
|
}),
|
|
1873
|
-
getPaymentStatus: (
|
|
1874
|
-
`/${ne}/status?policyId=${
|
|
1880
|
+
getPaymentStatus: (o) => t.request(
|
|
1881
|
+
`/${ne}/status?policyId=${o.policyId}`,
|
|
1875
1882
|
{
|
|
1876
1883
|
method: "GET",
|
|
1877
1884
|
data: ""
|
|
1878
1885
|
}
|
|
1879
1886
|
),
|
|
1880
|
-
getPaymentSummary: (
|
|
1881
|
-
`/${ne}/summary?policyId=${
|
|
1887
|
+
getPaymentSummary: (o) => t.request(
|
|
1888
|
+
`/${ne}/summary?policyId=${o.policyId}`,
|
|
1882
1889
|
{
|
|
1883
1890
|
method: "GET",
|
|
1884
1891
|
data: ""
|
|
1885
1892
|
}
|
|
1886
1893
|
)
|
|
1887
1894
|
};
|
|
1888
|
-
},
|
|
1895
|
+
}, J = "product/action", jn = (e) => {
|
|
1889
1896
|
const t = P(e);
|
|
1890
1897
|
return {
|
|
1891
|
-
getCnpjStatus: (
|
|
1898
|
+
getCnpjStatus: (i) => t.request(`/${J}/Custom/CnpjCheck?cnpj=${i}`, {
|
|
1892
1899
|
method: "GET",
|
|
1893
1900
|
data: ""
|
|
1894
1901
|
}),
|
|
1895
|
-
getKeyNumber: () => t.request(`/${
|
|
1902
|
+
getKeyNumber: () => t.request(`/${J}/Custom/GetKeyNumber`, {
|
|
1896
1903
|
method: "GET",
|
|
1897
1904
|
data: ""
|
|
1898
1905
|
}),
|
|
1899
|
-
getProposalNumberByKeyNumber: (
|
|
1900
|
-
`/${
|
|
1906
|
+
getProposalNumberByKeyNumber: (i) => t.request(
|
|
1907
|
+
`/${J}/Custom/GetProposalNoByKeyNumber?keyNumber=${i.keyNumber}`,
|
|
1901
1908
|
{
|
|
1902
1909
|
method: "GET",
|
|
1903
1910
|
data: ""
|
|
1904
1911
|
}
|
|
1905
1912
|
),
|
|
1906
|
-
postCoveragesAndClausesRules: (
|
|
1907
|
-
`/${
|
|
1913
|
+
postCoveragesAndClausesRules: (i) => t.request(
|
|
1914
|
+
`/${J}/Custom/LoadRules`,
|
|
1908
1915
|
{
|
|
1909
1916
|
method: "POST",
|
|
1910
|
-
data: JSON.stringify(
|
|
1917
|
+
data: JSON.stringify(i)
|
|
1911
1918
|
}
|
|
1912
1919
|
)
|
|
1913
1920
|
};
|
|
@@ -1965,7 +1972,7 @@ const ke = "auth", Un = (e) => {
|
|
|
1965
1972
|
}
|
|
1966
1973
|
)
|
|
1967
1974
|
};
|
|
1968
|
-
},
|
|
1975
|
+
}, Jn = "report", Mn = (e) => {
|
|
1969
1976
|
const t = P(e);
|
|
1970
1977
|
return {
|
|
1971
1978
|
getReportStream: (r) => {
|
|
@@ -1975,7 +1982,7 @@ const ke = "auth", Un = (e) => {
|
|
|
1975
1982
|
...r.additionalParams
|
|
1976
1983
|
});
|
|
1977
1984
|
return t.request(
|
|
1978
|
-
`/${
|
|
1985
|
+
`/${Jn}/generate-stream?${s.toString()}`,
|
|
1979
1986
|
{
|
|
1980
1987
|
method: "GET",
|
|
1981
1988
|
data: "",
|
|
@@ -1984,11 +1991,11 @@ const ke = "auth", Un = (e) => {
|
|
|
1984
1991
|
);
|
|
1985
1992
|
}
|
|
1986
1993
|
};
|
|
1987
|
-
},
|
|
1994
|
+
}, zn = "SubscriberData", Vn = (e) => {
|
|
1988
1995
|
const t = P(e);
|
|
1989
1996
|
return {
|
|
1990
1997
|
getSubscriber: (r) => t.request(
|
|
1991
|
-
`/${
|
|
1998
|
+
`/${zn}/get-subscriber-data?cnpj=${r}`,
|
|
1992
1999
|
{
|
|
1993
2000
|
method: "GET",
|
|
1994
2001
|
data: ""
|
|
@@ -1997,14 +2004,14 @@ const ke = "auth", Un = (e) => {
|
|
|
1997
2004
|
};
|
|
1998
2005
|
};
|
|
1999
2006
|
function cr(e) {
|
|
2000
|
-
const t = Un(e), n =
|
|
2007
|
+
const t = Un(e), n = Ln(e), r = $n(e), s = Hn(e), o = In(e), i = Fn(e), u = _n(e), f = jn(e), l = Mn(e), a = Vn(e);
|
|
2001
2008
|
return {
|
|
2002
2009
|
auth: t,
|
|
2003
2010
|
authAkad: n,
|
|
2004
2011
|
data: r,
|
|
2005
2012
|
quotation: s,
|
|
2006
|
-
payment:
|
|
2007
|
-
address:
|
|
2013
|
+
payment: o,
|
|
2014
|
+
address: i,
|
|
2008
2015
|
broker: u,
|
|
2009
2016
|
plugin: f,
|
|
2010
2017
|
report: l,
|